cedar-model-typescript-library 1.0.22 → 1.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +83 -2
- package/conformance/CedarSchemaOracle.java +67 -0
- package/conformance/java-oracle.mjs +63 -0
- package/conformance/pom.xml +22 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.esm.js +1 -1
- package/index.esm.js.map +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/index.umd.js +1 -1
- package/index.umd.js.map +1 -1
- package/org/metadatacenter/io/reader/ReaderUtil.d.ts +29 -2
- package/org/metadatacenter/io/reader/ReaderUtil.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/SchemaReaderDefaults.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/CedarJsonReaders.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/JsonAbstractArtifactReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/JsonAbstractSchemaArtifactReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/JsonArtifactShape.d.ts +68 -0
- package/org/metadatacenter/io/reader/json/JsonArtifactShape.d.ts.map +1 -0
- package/org/metadatacenter/io/reader/json/JsonContainerArtifactReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/JsonTemplateElementReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/JsonTemplateFieldReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/JsonTemplateInstanceReader.d.ts +34 -10
- package/org/metadatacenter/io/reader/json/JsonTemplateInstanceReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/JsonTemplateReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/json/JsonTermConstraintChecks.d.ts +26 -0
- package/org/metadatacenter/io/reader/json/JsonTermConstraintChecks.d.ts.map +1 -0
- package/org/metadatacenter/io/reader/yaml/YamlAbstractArtifactReader.d.ts +47 -2
- package/org/metadatacenter/io/reader/yaml/YamlAbstractArtifactReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/yaml/YamlSourcePolicy.d.ts +15 -0
- package/org/metadatacenter/io/reader/yaml/YamlSourcePolicy.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/yaml/YamlTemplateElementReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/yaml/YamlTemplateFieldReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/yaml/YamlTemplateInstanceReader.d.ts +30 -2
- package/org/metadatacenter/io/reader/yaml/YamlTemplateInstanceReader.d.ts.map +1 -1
- package/org/metadatacenter/io/reader/yaml/YamlTemplateReader.d.ts.map +1 -1
- package/org/metadatacenter/io/writer/WriterUtil.d.ts +8 -0
- package/org/metadatacenter/io/writer/WriterUtil.d.ts.map +1 -1
- package/org/metadatacenter/io/writer/json/JsonAbstractArtifactWriter.d.ts +4 -0
- package/org/metadatacenter/io/writer/json/JsonAbstractArtifactWriter.d.ts.map +1 -1
- package/org/metadatacenter/io/writer/json/JsonAnnotationsWriter.d.ts +2 -0
- package/org/metadatacenter/io/writer/json/JsonAnnotationsWriter.d.ts.map +1 -1
- package/org/metadatacenter/io/writer/json/JsonTemplateInstanceWriter.d.ts +4 -1
- package/org/metadatacenter/io/writer/json/JsonTemplateInstanceWriter.d.ts.map +1 -1
- package/org/metadatacenter/io/writer/yaml/YamlAbstractArtifactWriter.d.ts.map +1 -1
- package/org/metadatacenter/io/writer/yaml/YamlTemplateInstanceWriter.d.ts +11 -0
- package/org/metadatacenter/io/writer/yaml/YamlTemplateInstanceWriter.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/AbstractArtifacBuilder.d.ts +10 -0
- package/org/metadatacenter/model/cedar/AbstractArtifacBuilder.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/ReservedNames.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/TemplateValueValidator.d.ts +0 -1
- package/org/metadatacenter/model/cedar/TemplateValueValidator.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/constants/YamlKeys.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/constants/YamlValues.d.ts +2 -0
- package/org/metadatacenter/model/cedar/constants/YamlValues.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/deployment/ItemBounds.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/checkbox/YamlFieldReaderCheckbox.d.ts +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/checkbox/YamlFieldReaderCheckbox.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/JsonFieldReaderControlledTerm.d.ts +3 -1
- package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/JsonFieldReaderControlledTerm.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/YamlFieldReaderControlledTerm.d.ts +29 -2
- package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/YamlFieldReaderControlledTerm.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/value-constraint/action/ControlledTermAction.d.ts +11 -0
- package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/value-constraint/action/ControlledTermAction.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/controlled-term/value-constraint/ontology/YamlValueConstraintsOntologyWriter.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/list-multiple-choice/YamlFieldReaderMultiSelectList.d.ts +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/list-multiple-choice/YamlFieldReaderMultiSelectList.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/list-single-choice/YamlFieldReaderSingleSelectList.d.ts +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/list-single-choice/YamlFieldReaderSingleSelectList.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/radio/YamlFieldReaderRadio.d.ts +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/radio/YamlFieldReaderRadio.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/temporal/JsonFieldReaderTemporal.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/temporal/JsonFieldWriterTemporal.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/temporal/TemporalField.d.ts +3 -2
- package/org/metadatacenter/model/cedar/field/dynamic/temporal/TemporalField.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/temporal/TemporalFieldImpl.d.ts +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/temporal/TemporalFieldImpl.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/temporal/YamlFieldReaderTemporal.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/field/dynamic/temporal/YamlFieldWriterTemporal.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/template-instance/InstanceDataContainer.d.ts +4 -0
- package/org/metadatacenter/model/cedar/template-instance/InstanceDataContainer.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/template-instance/InstanceInflater.d.ts +11 -8
- package/org/metadatacenter/model/cedar/template-instance/InstanceInflater.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/template-instance/InstanceValidator.d.ts +121 -2
- package/org/metadatacenter/model/cedar/template-instance/InstanceValidator.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/template-instance/StoredForm.d.ts +41 -0
- package/org/metadatacenter/model/cedar/template-instance/StoredForm.d.ts.map +1 -0
- package/org/metadatacenter/model/cedar/types/bioportal-types/BioportalTermType.d.ts +7 -0
- package/org/metadatacenter/model/cedar/types/bioportal-types/BioportalTermType.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/types/wrapped-types/BiboStatus.d.ts +7 -0
- package/org/metadatacenter/model/cedar/types/wrapped-types/BiboStatus.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/types/wrapped-types/NumberType.d.ts +6 -0
- package/org/metadatacenter/model/cedar/types/wrapped-types/NumberType.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/types/wrapped-types/TemporalGranularity.d.ts +7 -0
- package/org/metadatacenter/model/cedar/types/wrapped-types/TemporalGranularity.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/types/wrapped-types/TemporalType.d.ts +6 -0
- package/org/metadatacenter/model/cedar/types/wrapped-types/TemporalType.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/types/wrapped-types/TimeFormat.d.ts +6 -0
- package/org/metadatacenter/model/cedar/types/wrapped-types/TimeFormat.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/util/compare/JsonArtifactParsingResult.d.ts.map +1 -1
- package/org/metadatacenter/model/cedar/validation/SchemaArtifactValidator.d.ts +16 -0
- package/org/metadatacenter/model/cedar/validation/SchemaArtifactValidator.d.ts.map +1 -0
- package/org/metadatacenter/model/cedar/validation/SchemaFormats.d.ts +12 -0
- package/org/metadatacenter/model/cedar/validation/SchemaFormats.d.ts.map +1 -0
- package/org/metadatacenter/policy/FieldValuePolicy.d.ts +3 -0
- package/org/metadatacenter/policy/FieldValuePolicy.d.ts.map +1 -1
- package/org/metadatacenter/policy/IdentifierPolicy.d.ts +7 -0
- package/org/metadatacenter/policy/IdentifierPolicy.d.ts.map +1 -1
- package/org/metadatacenter/policy/JsonSourcePolicy.d.ts +6 -0
- package/org/metadatacenter/policy/JsonSourcePolicy.d.ts.map +1 -1
- package/org/metadatacenter/policy/SchemaValuePolicy.d.ts +6 -0
- package/org/metadatacenter/policy/SchemaValuePolicy.d.ts.map +1 -0
- package/org/metadatacenter/policy/TextPolicy.d.ts +8 -0
- package/org/metadatacenter/policy/TextPolicy.d.ts.map +1 -1
- package/org/metadatacenter/policy/TimestampPolicy.d.ts +11 -0
- package/org/metadatacenter/policy/TimestampPolicy.d.ts.map +1 -1
- package/package.json +3 -2
- package/policy.esm.js +1 -1
- package/policy.esm.js.map +1 -1
- package/policy.js +1 -1
- package/policy.js.map +1 -1
- package/policy.umd.js +1 -1
- package/policy.umd.js.map +1 -1
- package/schema.d.ts +3 -0
- package/schema.d.ts.map +1 -0
- package/schema.esm.js +2 -0
- package/schema.esm.js.map +1 -0
- package/schema.js +2 -0
- package/schema.js.map +1 -0
- package/schema.umd.js +2 -0
- package/schema.umd.js.map +1 -0
package/index.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CedarModelTypescriptLibrary=t():e.CedarModelTypescriptLibrary=t()}(this,()=>(()=>{"use strict";var e={5846(e,t,r){t.JsonReaderBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class i extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new i(t.C.STRICT,!1);static FEBRUARY_2024=new i(t.C.FEBRUARY_2024,!0)}t.JsonReaderBehavior=i},2022(e,t,r){t.JsonWriterBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class i extends n.ReaderWriterBehavior{value;_outputPages;_usePropertiesAtLanguage;_includeSkosNotationForLinksAndControlled;constructor(e,t,r,n,i){super(i),this.value=e,this._outputPages=t,this._usePropertiesAtLanguage=r,this._includeSkosNotationForLinksAndControlled=n}getValue(){return this.value}static STRICT=new i(t.C.STRICT,!1,!0,!0,!1);static FEBRUARY_2024=new i(t.C.FEBRUARY_2024,!0,!1,!1,!0);outputPages(){return this._outputPages}usePropertiesAtLanguage(){return this._usePropertiesAtLanguage}includeSkosNotationForLinksAndControlled(){return this._includeSkosNotationForLinksAndControlled}}t.JsonWriterBehavior=i},7639(e,t){t.ReaderWriterBehavior=void 0,t.ReaderWriterBehavior=class{_useWarningForKnownIssues;constructor(e){this._useWarningForKnownIssues=e}useWarningForKnownIssues(){return this._useWarningForKnownIssues}}},1395(e,t,r){t.YamlReaderBehavior=t.L=void 0;const n=r(7639);t.L={STRICT:"strict"};class i extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new i(t.L.STRICT,!1)}t.YamlReaderBehavior=i},9411(e,t,r){t.YamlWriterBehavior=t.D=void 0;const n=r(7639);t.D={STRICT:"strict"};class i extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new i(t.D.STRICT,!1)}t.YamlWriterBehavior=i},6568(e,t,r){t.CedarBuilders=void 0;const n=r(766),i=r(1762),a=r(4925),s=r(7889),o=r(1259),l=r(345),c=r(2875),d=r(8084),u=r(3675),m=r(9497),p=r(1667),h=r(2052),f=r(4675),y=r(9916),T=r(3138),g=r(2703),E=r(9521),C=r(5795),I=r(7674),A=r(9105),b=r(1513),R=r(7328),v=r(2376),S=r(3914),_=r(7162),N=r(3474),w=r(9062),L=r(6610);t.CedarBuilders=class{static templateBuilder(){return new n.TemplateBuilder}static templateElementBuilder(){return new i.TemplateElementBuilder}static templateInstanceBuilder(){return new a.TemplateInstanceBuilder}static textFieldBuilder(){return s.TextFieldBuilderImpl.create()}static textAreaBuilder(){return o.TextAreaBuilderImpl.create()}static temporalFieldBuilder(){return l.TemporalFieldBuilderImpl.create()}static phoneNumberFieldBuilder(){return d.PhoneNumberFieldBuilderImpl.create()}static numericFieldBuilder(){return u.NumericFieldBuilderImpl.create()}static emailFieldBuilder(){return p.EmailFieldBuilderImpl.create()}static attributeValueFieldBuilder(){return h.AttributeValueFieldBuilderImpl.create()}static youtubeFieldBuilder(){return I.StaticYoutubeFieldBuilderImpl.create()}static sectionBreakFieldBuilder(){return C.StaticSectionBreakFieldBuilderImpl.create()}static richTextFieldBuilder(){return E.StaticRichTextFieldBuilderImpl.create()}static pageBreakFieldBuilder(){return g.StaticPageBreakFieldBuilderImpl.create()}static imageFieldBuilder(){return T.StaticImageFieldBuilderImpl.create()}static linkFieldBuilder(){return m.LinkFieldBuilderImpl.create()}static extRorFieldBuilder(){return R.ExtRorFieldBuilderImpl.create()}static extOrcidFieldBuilder(){return v.ExtOrcidFieldBuilderImpl.create()}static extPfasFieldBuilder(){return S.ExtPfasFieldBuilderImpl.create()}static extPubmedFieldBuilder(){return _.ExtPubmedFieldBuilderImpl.create()}static extRridFieldBuilder(){return N.ExtRridFieldBuilderImpl.create()}static extNihGrantIdFieldBuilder(){return w.ExtNihGrantIdFieldBuilderImpl.create()}static extDoiFieldBuilder(){return L.ExtDoiFieldBuilderImpl.create()}static singleChoiceListFieldBuilder(){return A.SingleChoiceListFieldBuilderImpl.create()}static multipleChoiceListFieldBuilder(){return b.MultipleChoiceListFieldBuilderImpl.create()}static radioFieldBuilder(){return c.RadioFieldBuilderImpl.create()}static checkboxFieldBuilder(){return f.CheckboxFieldBuilderImpl.create()}static controlledTermFieldBuilder(){return y.ControlledTermFieldBuilderImpl.create()}}},1998(e,t,r){t.CedarReaders=void 0;const n=r(2103),i=r(8639);t.CedarReaders=class{static json(){return n.CedarJsonReaders}static yaml(){return i.CedarYamlReaders}}},8446(e,t,r){t.IriSyntax=void 0;const n=r(2500);t.IriSyntax=class{constructor(){}static isValid(e){if(""===e)return!1;try{return n.IdentifierPolicy.assertIdentifier(e,"value"),!0}catch{return!1}}}},8748(e,t,r){t.ReaderUtil=void 0;const n=r(2108),i=r(2500),a=r(9517),s=r(8802);class o{static assertIdentifierCharacters=i.IdentifierPolicy.assertIdentifierCharacters.bind(i.IdentifierPolicy);static assertFieldIri=i.IdentifierPolicy.assertFieldIri.bind(i.IdentifierPolicy);static assertIri=i.IdentifierPolicy.assertIri.bind(i.IdentifierPolicy);static assertIdentifier=i.IdentifierPolicy.assertIdentifier.bind(i.IdentifierPolicy);static getIri(e,t){const r=this.getString(e,t);return this.assertIri(r,t),r}static getIdentifier(e,t){const r=this.getString(e,t);return this.assertIdentifier(r,t),r}static getArtifactIdentifier(e,t,r){return r?this.getIri(e,t):this.getIdentifier(e,t)}static getString(e,t){return Object.hasOwn(e,t)?e[t]:null}static getSingleType(e,t){if(!Object.hasOwn(e,t))return null;const r=e[t];if(!Array.isArray(r))return r;if(r.length>1)throw new Error(`A field value can have at most one ${t}.`);return 1===r.length?r[0]:null}static getStringOrEmpty(e,t){return Object.hasOwn(e,t)?e[t]:""}static getBoolean(e,t){return!!Object.hasOwn(e,t)&&e[t]}static getBooleanOrNullOrUndefined(e,t){return Object.hasOwn(e,t)?null===e[t]?null:e[t]:void 0}static getBooleanOrNull(e,t){return Object.hasOwn(e,t)?null===e[t]?null:e[t]:null}static getNumber(e,t){return Object.hasOwn(e,t)?e[t]:null}static getNumericDefault(e,t){const r=e[t];if(null==r||""===r)return null;if("number"==typeof r||"string"==typeof r||n.ExactDecimal.isExact(r))try{return n.NumericPolicy.value(r)}catch(e){throw new Error("Numeric default must be a finite decimal number without surrounding whitespace.",{cause:e})}throw new Error(`Numeric default at "${t}" must be a number or numeric string.`)}static getExactNumber(e,t){const r=e[t];if(null==r)return null;if("number"==typeof r||n.ExactDecimal.isExact(r))return n.NumericPolicy.value(r);throw new Error(`Numeric bound at "${t}" must be a JSON number.`)}static getNumberOrZero(e,t){return Object.hasOwn(e,t)?e[t]:0}static getNumberOrNull(e,t){return Object.hasOwn(e,t)?e[t]:null}static getNode(e,t){return Object.hasOwn(e,t)?e[t]:a.JsonNode.getEmpty()}static getNodeOrNull(e,t){return Object.hasOwn(e,t)?e[t]:null}static getStringList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t]:[]}static getFilteredStringList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t].filter(e=>""!==e):[]}static getStringMap(e,t){if(Object.hasOwn(e,t)&&"object"==typeof e[t]&&!Array.isArray(e[t])&&null!==e[t]){const r=e[t],n=Object.entries(r),i=new Map;for(const[e,t]of n)i.set(e,t);return i}return new Map}static deepClone(e){return this.deepUnfreeze(e)}static deepUnfreeze(e){if(e instanceof n.ExactDecimal)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return e;const t=Array.isArray(e)?e.slice():{...e};return Object.getOwnPropertyNames(t).forEach(e=>{t[e]=this.deepUnfreeze(t[e])}),t}static deepFreeze(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const r=e[t];null===r||"object"!=typeof r&&"function"!=typeof r||Object.isFrozen(r)||this.deepFreeze(r)}),e}static getNodeList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t]:a.JsonNode.getEmptyList()}static getURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIri(r,t),new s.Iri(r)}static getIdentifierURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIdentifier(null===r?"":r,t),new s.Iri(r)}static deleteNodeKey(e,t){Object.hasOwn(e,t)&&delete e[t]}}t.ReaderUtil=o},797(e,t,r){t.applySchemaReaderDefaults=function(e,t,r,s){if(!r.equal(new n.JsonPath))return;const o="json"===s?"bibo:status":"status";null==t["json"===s?"pav:version":"version"]&&(e.pav_version=i.PavVersion.DEFAULT),null==t[o]&&(e.bibo_status=a.BiboStatus.DRAFT)};const n=r(3188),i=r(1027),a=r(3910)},2103(e,t,r){t.CedarJsonReaders=void 0;const n=r(5904),i=r(2763),a=r(8748),s=r(2733),o=r(5291),l=r(7909),c=r(5846),d=r(9232),u=r(4381);class m{behavior;constructor(e){this.behavior=e}static getStrict(){return new m(c.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new m(c.JsonReaderBehavior.FEBRUARY_2024)}static detectArtifactType(e){let t;if(t="string"==typeof e?n.JsonSourcePolicy.parse(e):e,t&&t["@type"]){const e=a.ReaderUtil.getString(t,s.JsonSchema.atType);return i.CedarArtifactType.forValue(e)}return i.CedarArtifactType.NULL}getReaderForArtifactType(e){switch(e){case i.CedarArtifactType.TEMPLATE:return o.JsonTemplateReader.getStrict();case i.CedarArtifactType.TEMPLATE_ELEMENT:return l.JsonTemplateElementReader.getStrict();case i.CedarArtifactType.TEMPLATE_FIELD:case i.CedarArtifactType.STATIC_TEMPLATE_FIELD:return u.JsonTemplateFieldReader.getStrict();case i.CedarArtifactType.TEMPLATE_INSTANCE:return d.JsonTemplateInstanceReader.getStrict();default:throw new Error(`No JSON reader available for CedarArtifactType: ${e}`)}}getTemplateReader(){return o.JsonTemplateReader.getForBehavior(this.behavior)}getTemplateElementReader(){return l.JsonTemplateElementReader.getForBehavior(this.behavior)}getTemplateFieldReader(){return u.JsonTemplateFieldReader.getForBehavior(this.behavior)}getTemplateInstanceReader(){return d.JsonTemplateInstanceReader.getForBehavior(this.behavior)}}t.CedarJsonReaders=m},7993(e,t,r){t.JsonAbstractArtifactReader=void 0;const n=r(3992),i=r(8534),a=r(8748),s=r(2733),o=r(2234),l=r(9857),c=r(2763),d=r(5226),u=r(936),m=r(2787),p=r(3549);class h{static refuseEmptyIdentifier(e,t=s.JsonSchema.atId){const r=a.ReaderUtil.getString(e,t);if(null!==r&&"string"!=typeof r)throw new Error(`Invalid URI at "${t}": expected a string.`);if(null!==r&&n.TextPolicy.isBlank(r))throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);a.ReaderUtil.assertIri(r,t)}behavior;knownArtifactType=c.CedarArtifactType.NULL;get lenient(){return this.behavior.useWarningForKnownIssues()}constructor(e){this.behavior=e}readNonReportableAttributes(e,t){h.refuseEmptyIdentifier(t),e.at_id=i.CedarArtifactId.forValue(a.ReaderUtil.getString(t,s.JsonSchema.atId)),e.schema_name=a.ReaderUtil.getString(t,s.JsonSchema.schemaName),e.schema_description=a.ReaderUtil.getStringOrEmpty(t,s.JsonSchema.schemaDescription),e.pav_createdBy=o.CedarUser.forValue(a.ReaderUtil.getString(t,s.JsonSchema.pavCreatedBy)),e.pav_createdOn=l.IsoDate.forValue(a.ReaderUtil.getString(t,s.JsonSchema.pavCreatedOn)),e.oslc_modifiedBy=o.CedarUser.forValue(a.ReaderUtil.getString(t,s.JsonSchema.oslcModifiedBy)),e.pav_lastUpdatedOn=l.IsoDate.forValue(a.ReaderUtil.getString(t,s.JsonSchema.pavLastUpdatedOn))}readAnnotations(e,t){const r=new d.Annotations,n=a.ReaderUtil.getNodeOrNull(t,u.CedarModel.annotations);null!==n&&Object.keys(n).forEach(e=>{const t=n[e];if(null===t||"object"!=typeof t||Array.isArray(t))throw new Error(`Value of annotation must be an object at /_annotations/${e}`);const i=a.ReaderUtil.getNode(n,e),o=a.ReaderUtil.getString(i,s.JsonSchema.atId);if(null!==o)r.add(new m.AnnotationAtId(e,o));else{const t=a.ReaderUtil.getString(i,s.JsonSchema.atValue);if(null===t)throw new Error(`Value of annotation must contain an @id or @value at /_annotations/${e}`);r.add(new p.AnnotationAtValue(e,t))}}),r.getSize()>0&&(e.annotations=r)}}t.JsonAbstractArtifactReader=h},3326(e,t,r){t.JsonAbstractInstanceArtifactReader=void 0;const n=r(8534),i=r(8748),a=r(2733),s=r(7993);class o extends s.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){i.ReaderUtil.getArtifactIdentifier(t,a.JsonSchema.atId,this.lenient),super.readNonReportableAttributes(e,t),e.schema_isBasedOn=n.CedarArtifactId.forValue(i.ReaderUtil.getArtifactIdentifier(t,a.JsonSchema.schemaIsBasedOn,this.lenient)),e.pav_derivedFrom=n.CedarArtifactId.forValue(i.ReaderUtil.getArtifactIdentifier(t,a.JsonSchema.pavDerivedFrom,this.lenient))}}t.JsonAbstractInstanceArtifactReader=o},978(e,t,r){t.JsonAbstractSchemaArtifactReader=void 0;const n=r(4443),i=r(8333),a=r(8534),s=r(8748),o=r(2733),l=r(5747),c=r(8557),d=r(1027),u=r(3910),m=r(7993);class p extends m.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){e.extensions=n.SchemaExtensions.fromJson(t),super.readNonReportableAttributes(e,t),e.title=null===e.schema_name?null:(0,i.internalNameFor)(e.schema_name,this.artifactTypeWord()),e.description=s.ReaderUtil.getString(t,l.TemplateProperty.description),e.schema_schemaVersion=c.SchemaVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.schemaVersion)),e.pav_version=d.PavVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.pavVersion)),e.bibo_status=u.BiboStatus.forJsonValue(s.ReaderUtil.getString(t,o.JsonSchema.biboStatus)),e.pav_derivedFrom=a.CedarArtifactId.forValue(s.ReaderUtil.getArtifactIdentifier(t,o.JsonSchema.pavDerivedFrom,this.lenient)),e.pav_previousVersion=a.CedarArtifactId.forValue(this.lenient?s.ReaderUtil.getString(t,o.JsonSchema.pavPreviousVersion):s.ReaderUtil.getIdentifier(t,o.JsonSchema.pavPreviousVersion)),e.schema_identifier=s.ReaderUtil.getString(t,o.JsonSchema.schemaIdentifier)}}t.JsonAbstractSchemaArtifactReader=p},8518(e,t){t.JsonArtifactReaderResult=void 0,t.JsonArtifactReaderResult=class{_artifact;_parsingResult;_artifactSourceObject;constructor(e,t,r){this._artifact=e,this._parsingResult=t,this._artifactSourceObject=r}get artifact(){return this._artifact}get parsingResult(){return this._parsingResult}get artifactSourceObject(){return this._artifactSourceObject}}},5510(e,t,r){t.JsonContainerArtifactReader=void 0;const n=r(5588),i=r(978),a=r(1492),s=r(455),o=r(2763),l=r(8748),c=r(2733),d=r(936),u=r(9034),m=r(2888),p=r(9760),h=r(3056),f=r(5793),y=r(2475),T=r(6968),g=r(3812),E=r(3608),C=r(3239),I=r(9519),A=r(7752),b=r(8220),R=new Set([o.CedarArtifactType.TEMPLATE.getValue(),o.CedarArtifactType.TEMPLATE_ELEMENT.getValue(),o.CedarArtifactType.TEMPLATE_FIELD.getValue(),o.CedarArtifactType.STATIC_TEMPLATE_FIELD.getValue()]);class v extends i.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return this.knownArtifactType===o.CedarArtifactType.TEMPLATE?"template":"element"}fieldReader;constructor(e){super(e),this.fieldReader=b.JsonTemplateFieldReaderInternal.getForBehavior(e)}readAndStoreCandidateChildInfo(e,t,r,n,i){const a=o.CedarArtifactType.forValue(l.ReaderUtil.getString(e,c.JsonSchema.atType));if(a!==o.CedarArtifactType.NULL){const r=new s.ChildDeploymentInfo(t);r.atType=a;const i=l.ReaderUtil.getNode(e,d.CedarModel.ui);return r.uiInputType=u.UiInputType.forValue(l.ReaderUtil.getString(i,d.CedarModel.inputType)),r.hidden=l.ReaderUtil.getBoolean(i,d.CedarModel.Ui.hidden),n.add(r),r}return this.reportBlueprintDifference(r,new m.ComparisonError("jtr09",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,i.add(t,c.JsonSchema.atType))),null}readReportableAttributes(e,t,r,n){h.JsonObjectComparator.comparePrimitive(r,this.knownArtifactType.getValue(),l.ReaderUtil.getString(t,c.JsonSchema.atType),n.add(c.JsonSchema.atType));const i=l.ReaderUtil.getNode(t,c.JsonSchema.atContext),a=T.JsonContainerArtifactContent.CONTEXT_VERBATIM;if(h.JsonObjectComparator.compareBothWays(r,a,i,n.add(c.JsonSchema.atContext),this.behavior,[c.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),h.JsonObjectComparator.comparePrimitive(r,f.JavascriptType.OBJECT.getValue(),l.ReaderUtil.getString(t,d.CedarModel.type),n.add(d.CedarModel.type)),h.JsonObjectComparator.comparePrimitive(r,y.ArtifactSchema.CURRENT.getValue(),l.ReaderUtil.getString(t,d.CedarModel.schema),n.add(d.CedarModel.schema)),e.language=A.Language.forValue(l.ReaderUtil.getString(i,c.JsonSchema.atLanguage)),e.language===A.Language.NULL){const r=l.ReaderUtil.getNode(l.ReaderUtil.getNode(t,c.JsonSchema.properties),c.JsonSchema.atContext);e.language=A.Language.forValue(l.ReaderUtil.getString(r,c.JsonSchema.atLanguage))}}parseChildren(e,t,r,n,i){for(const a of e.children){let e=l.ReaderUtil.getNode(t,a.name),d=i.add(c.JsonSchema.properties,a.name);if(a.isMultiInAnyWay()&&(e=l.ReaderUtil.getNode(e,c.JsonSchema.items),d=d.add(c.JsonSchema.items)),a.atType===o.CedarArtifactType.STATIC_TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,a,d),i=t.field.createDeploymentBuilder(a.name).withLabel(a.label).withDescription(a.description);i.withHidden(a.hidden);const s=i.build();r.addChild(t.field,s),n.merge(t.parsingResult)}else if(a.atType===o.CedarArtifactType.TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,a,d),i=t.field.createDeploymentBuilder(a.name),o=a;i.withIri(o.iri).withLabel(a.label).withDescription(a.description),a instanceof I.AbstractFieldChildDeploymentInfo&&i.withHidden(a.hidden).withRequiredValue(a.requiredValue).withRecommendedValue(a.recommendedValue).withContinuePreviousLine(a.continuePreviousLine).withValueRecommendationEnabled(a.valueRecommendationEnabled),i instanceof E.ChildDeploymentInfoBuilder&&a instanceof s.ChildDeploymentInfo?i.withMultiInstance(a.multiInstance).withMinItems(a.minItems).withMaxItems(a.maxItems):i instanceof C.ChildDeploymentInfoAlwaysMultipleBuilder&&i.withMinItems(o.minItems).withMaxItems(o.maxItems);const l=i.build();r.addChild(t.field,l),n.merge(t.parsingResult)}else if(a.atType===o.CedarArtifactType.TEMPLATE_ELEMENT){const t=this.getElementReader().readFromObject(e,d),i=t.element.createDeploymentBuilder(a.name).withLabel(a.label).withDescription(a.description);a instanceof g.AbstractDynamicChildDeploymentInfo&&i.withIri(a.iri),a instanceof s.ChildDeploymentInfo&&i.withMultiInstance(a.multiInstance).withMinItems(a.minItems).withMaxItems(a.maxItems),r.addChild(t.element,i.build()),n.merge(t.parsingResult)}}}validatePropertiesVsOrder(e,t,r,n){for(const i of e.children)t.includes(i.name)||this.reportBlueprintDifference(r,new m.ComparisonError("jtr08",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(d.CedarModel.ui,d.CedarModel.order),i.name,null))}finalizeChildInfo(e,t,r,n){const i=new a.ContainerArtifactChildrenInfo;for(const a of e){const e=t.get(a);null!=e?i.add(e):this.reportBlueprintDifference(r,new m.ComparisonError("jtr07",p.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,n.add(d.CedarModel.ui,d.CedarModel.order),null,a))}return i}getCandidateChildrenInfo(e,t,r,i){const s=new a.ContainerArtifactChildrenInfo;return Object.keys(e).forEach(a=>{if(n.ReservedNames.isReservedName(a)){const t=l.ReaderUtil.getNode(e,a),r="array"===l.ReaderUtil.getString(t,c.JsonSchema.type)?l.ReaderUtil.getNode(t,c.JsonSchema.items):t,n=r?.[c.JsonSchema.atType];if((Array.isArray(n)?n:[n]).some(e=>R.has(e)))throw new Error(`Child schema uses a reserved instance property name at ${i.add(c.JsonSchema.properties,a).toString()}`)}if(!t.has(a)){const t=l.ReaderUtil.getNode(e,a);if("object"==typeof t&&null!==t){let e=t;const n=l.ReaderUtil.getString(t,c.JsonSchema.type);if("object"==n)this.readAndStoreCandidateChildInfo(e,a,r,s,i.add(c.JsonSchema.properties,a));else if("array"==n){e=l.ReaderUtil.getNode(t,c.JsonSchema.items);const n=this.readAndStoreCandidateChildInfo(e,a,r,s,i.add(c.JsonSchema.properties,a,c.JsonSchema.items));null!==n&&(n.multiInstance=!0,n.minItems=l.ReaderUtil.getNumber(t,d.CedarModel.minItems),n.maxItems=l.ReaderUtil.getNumber(t,d.CedarModel.maxItems))}}}}),s}generateAndValidateRequiredMap(e,t,r,n){const i=e.reduce((e,t)=>(e.set(t,!0),e),new Map);for(const e of t)i.has(e)||this.reportBlueprintDifference(r,new m.ComparisonError("jtr01",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(c.JsonSchema.required),e));return i}checkRequiredBothWays(e,t,r,n,i,a){const s=e.getChildrenNamesForRequired();for(const e of s)t.has(e)||this.reportBlueprintDifference(i,new m.ComparisonError("jtr02",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,a.add(c.JsonSchema.required),e));for(const t of r)n.has(t)||e.has(t)||this.reportBlueprintDifference(i,new m.ComparisonError("jtr03",p.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,a.add(c.JsonSchema.required),t))}extractUIPreferredLabelsAndDescriptions(e,t,r,n){const i=l.ReaderUtil.getStringMap(e,d.CedarModel.propertyLabels);if(null!==i)for(const e of t.children)i.has(e.name)&&(e.label=i.get(e.name)??null);const a=l.ReaderUtil.getStringMap(e,d.CedarModel.propertyDescriptions);if(null!==a)for(const e of t.children)a.has(e.name)&&(e.description=a.get(e.name)??null)}reportBlueprintDifference(e,t){this.behavior.useWarningForKnownIssues()&&h.JsonObjectComparator.isKnownProductionVariation(t.errorPath)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}extractIRIMappings(e,t,r,n){const i=l.ReaderUtil.getNode(e,c.JsonSchema.atContext),a=l.ReaderUtil.getNode(i,c.JsonSchema.properties);for(const e of t.children)if(this.includeInIRIMapping(e)){if(null===a||!Object.hasOwn(a,e.name))continue;const t=l.ReaderUtil.getNode(a,e.name),i=l.ReaderUtil.getStringList(t,c.JsonSchema.enum);null===i||1!=i.length?this.reportBlueprintDifference(r,new m.ComparisonError("jtr06",p.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(c.JsonSchema.properties,c.JsonSchema.atContext,c.JsonSchema.properties,e.name,c.JsonSchema.enum,0))):e instanceof g.AbstractDynamicChildDeploymentInfo&&(l.ReaderUtil.assertIdentifier(i[0],c.JsonSchema.enum),e.iri=i[0])}}readInstanceTypeSpecification(e,t,r){const n=l.ReaderUtil.getNode(t,c.JsonSchema.properties);if(null!==n){const t=l.ReaderUtil.getNode(n,c.JsonSchema.atType);if(null!==t){const r=l.ReaderUtil.getNodeList(t,c.JsonSchema.oneOf);null!==r&&r.forEach(t=>{const r=l.ReaderUtil.getStringList(t,c.JsonSchema.enum);if(Object.hasOwn(t,c.JsonSchema.enum)){if(!Array.isArray(t[c.JsonSchema.enum])||0===r.length)throw new Error("Instance types must be a nonempty array of IRIs");e.instanceTypeSpecifications=r}})}}}}t.JsonContainerArtifactReader=v},7909(e,t,r){t.JsonTemplateElementReader=void 0;const n=r(5904),i=r(797),a=r(936),s=r(2733),o=r(2763),l=r(5747),c=r(8748),d=r(3056),u=r(4036),m=r(3188),p=r(5846),h=r(9932),f=r(4948),y=r(7661),T=r(5510),g=r(1501);class E extends T.JsonContainerArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e){super(e)}static getStrict(){return new E(p.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new E(p.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new E(e)}getElementReader(){return this}includeInIRIMapping(e){return e.atType!==o.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t,new m.JsonPath)}readFromObject(e,t=new m.JsonPath){const r=new u.JsonArtifactParsingResult,n=y.TemplateElement.buildEmptyWithNullValues();return null===t.getLastComponent()&&c.ReaderUtil.getArtifactIdentifier(e,s.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(n,e),(0,i.applySchemaReaderDefaults)(n,e,t,"json"),this.readReportableAttributes(n,e,r,t),this.readAnnotations(n,e),this.readInstanceTypeSpecification(n,e,r),this.readAndValidateChildrenInfo(n,e,r,t),new f.JsonTemplateElementReaderResult(n,r,e)}readNonReportableAttributes(e,t){e.skos_prefLabel=c.ReaderUtil.getString(t,a.CedarModel.skosPrefLabel),e.skos_altLabel=c.ReaderUtil.getFilteredStringList(t,a.CedarModel.skosAltLabel);const r=c.ReaderUtil.getNode(t,a.CedarModel.ui);null!==r&&(e.header=c.ReaderUtil.getString(r,a.CedarModel.header),e.footer=c.ReaderUtil.getString(r,a.CedarModel.footer)),super.readNonReportableAttributes(e,t)}readAndValidateChildrenInfo(e,t,r,n){const i=c.ReaderUtil.getStringList(t,s.JsonSchema.required),o=c.ReaderUtil.getNode(t,s.JsonSchema.properties),l=this.generateAndValidateRequiredMap(i,g.JsonTemplateElementContent.REQUIRED_PARTIAL,r,n),d=this.getCandidateChildrenInfo(o,g.JsonTemplateElementContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(d,l,i,g.JsonTemplateElementContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const u=c.ReaderUtil.getNode(t,a.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(u,d,r,n),this.extractIRIMappings(o,d,r,n);const m=c.ReaderUtil.getStringList(u,a.CedarModel.order),p=this.finalizeChildInfo(m,d,r,n);this.validatePropertiesVsOrder(d,m,r,n),this.validateProperties(p,o,e,r,n),this.parseChildren(p,o,e,r,n)}validateProperties(e,t,r,n,i){const a=c.ReaderUtil.deepClone(g.JsonTemplateElementContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(a[s.JsonSchema.atContext][l.TemplateProperty.additionalProperties]=h.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const o=a[s.JsonSchema.atContext],u=c.ReaderUtil.getNodeList(o,s.JsonSchema.required);null!=u&&0==u.length&&c.ReaderUtil.deleteNodeKey(o,s.JsonSchema.required),g.JsonTemplateElementContent.acceptEitherIdTyping(a,t),d.JsonObjectComparator.compareToLeft(n,a,t,i.add(s.JsonSchema.properties),this.behavior)}}t.JsonTemplateElementReader=E},4948(e,t,r){t.JsonTemplateElementReaderResult=void 0;const n=r(8518);class i extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get element(){return this._artifact}get elementSourceObject(){return this._artifactSourceObject}}t.JsonTemplateElementReaderResult=i},4381(e,t,r){t.JsonTemplateFieldReader=void 0;const n=r(5904),i=r(797),a=r(9517),s=r(4036),o=r(3188),l=r(8748),c=r(2733),d=r(5747),u=r(3056),m=r(2763),p=r(5793),h=r(936),f=r(2475),y=r(9932),T=r(9241),g=r(5933),E=r(6511),C=r(9148),I=r(6291),A=r(8596),b=r(7095),R=r(9251),v=r(9315),S=r(2691),_=r(1769),N=r(9683),w=r(1468),L=r(9053),F=r(9034),V=r(19),O=r(2419),x=r(9366),D=r(4869),M=r(8728),P=r(5846),U=r(6396),B=r(855),Y=r(978),J=r(455),k=r(7752),K=r(8244),W=r(4956),j=r(6854),$=r(3028),X=r(7004),q=r(1886),G=r(8583),z=r(6591),H=r(6731);class Q extends Y.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return"field"}constructor(e){super(e)}static getStrict(){return new Q(P.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new Q(P.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new Q(e)}static dynamicTypeReaderMap=new Map([[D.CedarFieldType.TEXT,new T.JsonFieldReaderTextField],[D.CedarFieldType.TEXTAREA,new N.JsonFieldReaderTextArea],[D.CedarFieldType.CONTROLLED_TERM,new M.JsonFieldReaderControlledTerm],[D.CedarFieldType.LINK,new b.JsonFieldReaderLink],[D.CedarFieldType.EXT_ROR,new K.JsonFieldReaderExtRor],[D.CedarFieldType.EXT_ORCID,new W.JsonFieldReaderExtOrcid],[D.CedarFieldType.EXT_PFAS,new j.JsonFieldReaderExtPfas],[D.CedarFieldType.EXT_PUBMED,new $.JsonFieldReaderExtPubmed],[D.CedarFieldType.EXT_RRID,new X.JsonFieldReaderExtRrid],[D.CedarFieldType.EXT_NIH_GRANT_ID,new q.JsonFieldReaderExtNihGrantId],[D.CedarFieldType.EXT_DOI,new G.JsonFieldReaderExtDoi],[D.CedarFieldType.TEMPORAL,new v.JsonFieldReaderTemporal],[D.CedarFieldType.EMAIL,new S.JsonFieldReaderEmail],[D.CedarFieldType.NUMERIC,new _.JsonFieldReaderNumeric],[D.CedarFieldType.PHONE_NUMBER,new w.JsonFieldReaderPhoneNumber],[D.CedarFieldType.RADIO,new L.JsonFieldReaderRadio],[D.CedarFieldType.CHECKBOX,new V.JsonFieldReaderCheckbox],[D.CedarFieldType.SINGLE_SELECT_LIST,new O.JsonFieldReaderList],[D.CedarFieldType.MULTIPLE_SELECT_LIST,new O.JsonFieldReaderList],[D.CedarFieldType.ATTRIBUTE_VALUE,new x.JsonFieldReaderAttributeValue],[D.CedarFieldType.STATIC_PAGE_BREAK,new g.JsonFieldReaderPageBreak],[D.CedarFieldType.STATIC_SECTION_BREAK,new E.JsonFieldReaderSectionBreak],[D.CedarFieldType.STATIC_IMAGE,new C.JsonFieldReaderImage],[D.CedarFieldType.STATIC_RICH_TEXT,new I.JsonFieldReaderRichText],[D.CedarFieldType.STATIC_YOUTUBE,new A.JsonFieldReaderYoutube]]);readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e){const t=l.ReaderUtil.getNode(e,c.JsonSchema.items);"array"===e.type&&"attribute-value"===l.ReaderUtil.getNode(t,h.CedarModel.ui)[h.CedarModel.inputType]&&(e=t);const r=J.ChildDeploymentInfo.standalone(),n=new o.JsonPath;return this.readFromObjectInternal(e,r,n)}readFromObjectInternal(e,t,r){const n=new s.JsonArtifactParsingResult,a=Q.readFieldSpecificAttributes(e,t,n,r);if(t instanceof J.ChildDeploymentInfo&&t.isStandalone()&&(a instanceof z.TextFieldImpl||a instanceof H.ControlledTermFieldImpl)&&(a.valueRecommendationEnabled=t.valueRecommendationEnabled),t instanceof J.ChildDeploymentInfo&&t.isStandalone()){const r=l.ReaderUtil.getNode(e,h.CedarModel.ui);a.hidden=l.ReaderUtil.getBoolean(r,h.CedarModel.Ui.hidden),a.continuePreviousLine=t.continuePreviousLine,a.cedarFieldType.recordsRequirement&&(a.requiredValue=t.requiredValue,a.recommendedValue=t.recommendedValue)}return t instanceof J.ChildDeploymentInfo&&t.isStandalone()&&l.ReaderUtil.getArtifactIdentifier(e,c.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(a,e),(0,i.applySchemaReaderDefaults)(a,e,r,"json"),this.readReportableAttributes(a,e,n,r),this.readAnnotations(a,e),new U.JsonTemplateFieldReaderResult(a,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=l.ReaderUtil.getString(t,h.CedarModel.skosPrefLabel),e.skos_altLabel=l.ReaderUtil.getFilteredStringList(t,h.CedarModel.skosAltLabel)}readReportableAttributes(e,t,r,n){const i=l.ReaderUtil.getNode(t,c.JsonSchema.atContext);let s=a.JsonNode.getEmpty();e.cedarArtifactType==m.CedarArtifactType.TEMPLATE_FIELD?s=y.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM:e.cedarArtifactType==m.CedarArtifactType.STATIC_TEMPLATE_FIELD&&(s=R.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM),u.JsonObjectComparator.compareBothWays(r,s,i,n.add(c.JsonSchema.atContext),this.behavior,[c.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),e.cedarFieldType===D.CedarFieldType.ATTRIBUTE_VALUE?u.JsonObjectComparator.comparePrimitive(r,p.JavascriptType.STRING.getValue(),l.ReaderUtil.getString(t,h.CedarModel.type),n.add(h.CedarModel.type)):u.JsonObjectComparator.comparePrimitive(r,p.JavascriptType.OBJECT.getValue(),l.ReaderUtil.getString(t,h.CedarModel.type),n.add(h.CedarModel.type)),u.JsonObjectComparator.comparePrimitive(r,!1,l.ReaderUtil.getBoolean(t,d.TemplateProperty.additionalProperties),n.add(d.TemplateProperty.additionalProperties)),u.JsonObjectComparator.comparePrimitive(r,f.ArtifactSchema.CURRENT.getValue(),l.ReaderUtil.getString(t,h.CedarModel.schema),n.add(h.CedarModel.schema)),e.language=k.Language.forValue(l.ReaderUtil.getString(i,c.JsonSchema.atLanguage))}static readFieldSpecificAttributes(e,t,r,n){const i=m.CedarArtifactType.forValue(l.ReaderUtil.getString(e,c.JsonSchema.atType)),a=l.ReaderUtil.getNode(e,h.CedarModel.ui),s=l.ReaderUtil.getString(a,h.CedarModel.inputType),o=F.UiInputType.forValue(s),d=this.getCedarFieldType(e,o);if(d===D.CedarFieldType.NULL)throw new Error(`Unknown uiInputType type: "${s}"`);if((i==m.CedarArtifactType.TEMPLATE_FIELD||i==m.CedarArtifactType.STATIC_TEMPLATE_FIELD)&&null!=o){const i=this.dynamicTypeReaderMap.get(d);if(!i)throw new Error(`\n No reader defined for dynamic input type "${d.getValue()}"`);return i.read(e,t,r,n)}return B.UnknownTemplateField.build()}static fieldHasValueConstraint(e){const t=l.ReaderUtil.getNode(e,h.CedarModel.valueConstraints);return l.ReaderUtil.getNodeList(t,h.CedarModel.ontologies).length>0||(l.ReaderUtil.getNodeList(t,h.CedarModel.branches).length>0||(l.ReaderUtil.getNodeList(t,h.CedarModel.classes).length>0||l.ReaderUtil.getNodeList(t,h.CedarModel.valueSets).length>0))}static getCedarFieldType(e,t){let r=D.CedarFieldType.forUiInputType(t);if(r===D.CedarFieldType.TEXT||r===D.CedarFieldType.CONTROLLED_TERM){const t=l.ReaderUtil.getNode(e,c.JsonSchema.properties);r=Object.prototype.hasOwnProperty.call(t,c.JsonSchema.atId)&&!Object.prototype.hasOwnProperty.call(t,c.JsonSchema.atValue)||this.fieldHasValueConstraint(e)?D.CedarFieldType.CONTROLLED_TERM:D.CedarFieldType.TEXT}return r}}t.JsonTemplateFieldReader=Q},8220(e,t,r){t.JsonTemplateFieldReaderInternal=void 0;const n=r(3188),i=r(4381),a=r(455);class s extends i.JsonTemplateFieldReader{constructor(e){super(e)}static getForBehavior(e){return new s(e)}readFromObjectInternal(e,t,r){return t=t||a.ChildDeploymentInfo.standalone(),r=r||new n.JsonPath,super.readFromObjectInternal(e,t,r)}}t.JsonTemplateFieldReaderInternal=s},6396(e,t,r){t.JsonTemplateFieldReaderResult=void 0;const n=r(8518);class i extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get field(){return this._artifact}get fieldSourceObject(){return this._artifactSourceObject}}t.JsonTemplateFieldReaderResult=i},4385(e,t,r){t.JsonTemplateFieldTypeSpecificReader=void 0;const n=r(855),i=r(8748),a=r(936);t.JsonTemplateFieldTypeSpecificReader=class{read(e,t,r,i){return n.UnknownTemplateField.build()}readRequiredAndHidden(e,t){const r=i.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);null!=r&&(t.requiredValue=i.ReaderUtil.getBoolean(r,a.CedarModel.requiredValue),t.recommendedValue=i.ReaderUtil.getBoolean(r,a.CedarModel.ValueConstraints.recommendedValue));const n=i.ReaderUtil.getNode(e,a.CedarModel.ui);n&&(t.hidden=i.ReaderUtil.getBoolean(n,a.CedarModel.Ui.hidden),t.continuePreviousLine=i.ReaderUtil.getBoolean(n,a.CedarModel.Ui.continuePreviousLine),t.valueRecommendationEnabled=i.ReaderUtil.getBoolean(n,a.CedarModel.Ui.valueRecommendationEnabled))}}},9232(e,t,r){t.JsonTemplateInstanceReader=void 0;const n=r(5904),i=r(3992),a=r(1625),s=r(9167),o=r(2763),l=r(4036),c=r(2888),d=r(9760),u=r(3188),m=r(5846),p=r(3326),h=r(2272),f=r(6537),y=r(8748),T=r(2733),g=r(7723),E=r(5222),C=r(7571),I=r(7548),A=r(8193),b=r(4877),R=r(4465),v=r(3644),S=r(9327),_=r(936),N=r(350),w=r(4033);class L extends p.JsonAbstractInstanceArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_INSTANCE;knownKeys={[T.JsonSchema.atId]:!0,[T.JsonSchema.atType]:!0,[T.JsonSchema.pavDerivedFrom]:!0,[T.JsonSchema.schemaIdentifier]:!0,[T.JsonSchema.oslcModifiedBy]:!0,[T.JsonSchema.pavLastUpdatedOn]:!0,[T.JsonSchema.pavCreatedBy]:!0,[T.JsonSchema.pavCreatedOn]:!0,[T.JsonSchema.schemaDescription]:!0,[T.JsonSchema.schemaName]:!0,[T.JsonSchema.schemaIsBasedOn]:!0,[T.JsonSchema.atContext]:!0,[_.CedarModel.annotations]:!0};constructor(e){super(e)}static getStrict(){return new L(m.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new L(m.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new L(e)}readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t,new u.JsonPath)}readFromObject(e,t){const r=new l.JsonArtifactParsingResult,n=h.TemplateInstance.buildEmptyWithNullValues();this.readNonReportableAttributes(n,e),n.descriptionWasAbsent=null===y.ReaderUtil.getString(e,T.JsonSchema.schemaDescription),n.schema_description=n.schema_description??"";const i=t??new u.JsonPath;return this.readInstanceData(e,n,i,r),L.reportEnvelope(e,i,r),new f.JsonTemplateInstanceReaderResult(n,r,e)}static ENVELOPE_KEYS=[T.JsonSchema.atContext,T.JsonSchema.atId,T.JsonSchema.schemaIsBasedOn,T.JsonSchema.pavCreatedOn,T.JsonSchema.pavCreatedBy,T.JsonSchema.oslcModifiedBy,T.JsonSchema.pavLastUpdatedOn];static reportEnvelope(e,t,r){for(const n of L.ENVELOPE_KEYS){if(!Object.hasOwn(e,n)){r.addBlueprintComparisonWarning(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,t.add(n),n));continue}const i=y.ReaderUtil.getNode(e,n);(null==i||n===T.JsonSchema.atContext&&0===Object.keys(i).length)&&r.addBlueprintComparisonWarning(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(n),n,null))}}readInstanceData(e,t,r,n){t.dataContainer=this.readInstanceContainer(e,r,n),this.readAnnotations(t,e)}readInstanceContainer(e,t,r){return this.parseContainer(e,t,r,"template")}isKnownKey(e){return Object.hasOwn(this.knownKeys,e)}parseContainer(e,t,r,n="element"){const a=new g.InstanceDataContainer;Object.keys(e).forEach(n=>{if(!this.isKnownKey(n)){const i=y.ReaderUtil.getNode(e,n);if(Array.isArray(i)){const e=[];a.setValue(n,e);const s=i.some(e=>null!==e&&"object"==typeof e&&Object.hasOwn(e,T.JsonSchema.atContext));i.forEach((i,a)=>{if(s){if(null===i||"object"!=typeof i||Array.isArray(i)||Object.hasOwn(i,T.JsonSchema.atValue))throw new Error(`Cannot mix fields and element instances in array "${n}" at index ${a}`);e[a]=this.parseContainer(i,t.add(n,a),r)}else e[a]=this.parseNode(i,t.add(n,a),r)})}else a.setValue(n,this.parseNode(i,t.add(n),r))}});for(const e of w.AttributeValueNamePolicy.findConflicts(a,n,!0).filter(e=>0===e.path.length))r.addBlueprintComparisonError(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.VALUE_MISMATCH,t.add(...w.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));this.packAttributeValues(a);const s=Object.hasOwn(e,T.JsonSchema.atContext)?y.ReaderUtil.getNode(e,T.JsonSchema.atContext):null;if(null!=s){const e=s;Object.keys(a.values).forEach(t=>{const r=y.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)}),Object.keys(a.values).forEach(t=>{const r=a.values[t];r instanceof S.InstanceDataAttributeValueField&&Object.keys(r.values).forEach(t=>{const r=y.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)})}),Object.keys(e).forEach(t=>{if(Object.hasOwn(N.JsonTemplateInstanceContent.CONTEXT_VERBATIM,t))return;const r=y.ReaderUtil.getString(e,t);null!==r&&a.setIri(t,r)})}if(Object.hasOwn(e,T.JsonSchema.atId)){const n=y.ReaderUtil.getString(e,T.JsonSchema.atId);if(null!==n){if("string"!=typeof n)throw new Error(`Invalid URI at "${T.JsonSchema.atId}": expected a string.`);i.TextPolicy.isBlank(n)?(this.behavior.useWarningForKnownIssues()||L.refuseEmptyIdentifier(e),r.addBlueprintComparisonWarning(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.VALUE_MISMATCH,t.add(T.JsonSchema.atId),"an absolute IRI or null while the occurrence awaits server assignment",n))):this.lenient?y.ReaderUtil.assertIri(n,T.JsonSchema.atId):y.ReaderUtil.assertIdentifier(n,T.JsonSchema.atId),a.id=n}}return a}static VALUE_ATOM_KEYS=new Set([T.JsonSchema.atValue,T.JsonSchema.atLanguage,T.JsonSchema.atId,T.JsonSchema.rdfsLabel,T.JsonSchema.atType,_.CedarModel.skosNotation,_.CedarModel.skosPrefLabel]);static isValueNode(e){if(null==e)return!1;if("string"==typeof e)return!0;if(Object.hasOwn(e,T.JsonSchema.atValue))return!0;if(Object.hasOwn(e,T.JsonSchema.atContext))return!1;const t=Object.keys(e);return t.length>0&&t.every(e=>L.VALUE_ATOM_KEYS.has(e))}static readValueNode(e){return null==e?new R.InstanceDataEmptyNode:"string"==typeof e?new v.InstanceDataAttributeValueFieldName(e):L.isValueNode(e)?L.parseDataAtom(e):new R.InstanceDataEmptyNode}parseNode(e,t,r){if(null==e)return new R.InstanceDataEmptyNode;if("string"==typeof e)return new v.InstanceDataAttributeValueFieldName(e);if(L.isValueNode(e)){const n=L.parseDataAtom(e);return L.reportNullIri(n,t,r),n}return 0===Object.keys(e).length?new R.InstanceDataEmptyNode:this.parseContainer(e,t,r)}static reportNullIri(e,t,r){(e instanceof C.InstanceDataLinkAtom||e instanceof A.InstanceDataControlledAtom)&&null===e.id&&r.addBlueprintComparisonError(new c.ComparisonError("JsonTemplateInstanceReader",d.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(T.JsonSchema.atId),"an IRI",null))}static parseDataAtom(e){if(Object.hasOwn(e,T.JsonSchema.atId)&&Object.hasOwn(e,T.JsonSchema.atValue))throw new Error("A field cannot contain both @id and @value.");const t=this.parseDataAtomWithoutNotation(e);return"language"in t&&(t.language=y.ReaderUtil.getString(e,T.JsonSchema.atLanguage)),"preferredLabel"in t&&(t.preferredLabel=y.ReaderUtil.getString(e,_.CedarModel.skosPrefLabel)),!("notation"in t)||t instanceof a.InstanceDataNotationAtom||(t.notation=y.ReaderUtil.getString(e,T.JsonSchema.skosNotation)),t}static parseDataAtomWithoutNotation(e){if(Object.hasOwn(e,T.JsonSchema.atValue)){const t=y.ReaderUtil.getString(e,T.JsonSchema.atValue),r=y.ReaderUtil.getSingleType(e,T.JsonSchema.atType);return null===r?new E.InstanceDataStringAtom(t,y.ReaderUtil.getString(e,T.JsonSchema.rdfsLabel)):new b.InstanceDataTypedAtom(t,r,y.ReaderUtil.getString(e,T.JsonSchema.rdfsLabel))}if(Object.hasOwn(e,T.JsonSchema.atId)){y.ReaderUtil.assertFieldIri(y.ReaderUtil.getString(e,T.JsonSchema.atId),T.JsonSchema.atId);const t=y.ReaderUtil.getString(e,T.JsonSchema.atId),r=y.ReaderUtil.getString(e,T.JsonSchema.rdfsLabel);return null===r?C.InstanceDataLinkAtom.fromParsedNode(t,y.ReaderUtil.getSingleType(e,T.JsonSchema.atType)):A.InstanceDataControlledAtom.fromParsedNode(t,r,y.ReaderUtil.getSingleType(e,T.JsonSchema.atType))}const t=y.ReaderUtil.getString(e,T.JsonSchema.rdfsLabel);if(null!==t)return new s.InstanceDataLabelAtom(t,y.ReaderUtil.getSingleType(e,T.JsonSchema.atType));const r=y.ReaderUtil.getString(e,T.JsonSchema.skosNotation);return null!==r?new a.InstanceDataNotationAtom(r,y.ReaderUtil.getSingleType(e,T.JsonSchema.atType)):new I.InstanceDataEmptyAtom(e)}packAttributeValues(e){const t=e.values,r=[];Object.keys(t).forEach(e=>{const n=t[e];if(Array.isArray(n)){let i=!1;if(n.forEach((e,t)=>{e instanceof v.InstanceDataAttributeValueFieldName||(i=!0)}),n.length>0&&!i){const i=new S.InstanceDataAttributeValueField(e);r.push(i),n.forEach((e,r)=>{const n=e.name;if(null!==n&&Object.hasOwn(t,n)){const e=t[n];i.addValue(n,e)}})}}}),r.forEach((e,r)=>{const n=e.name;null!==n&&(t[n]=e,Object.keys(e.values).forEach(e=>{Object.hasOwn(t,e)&&delete t[e]}))}),e.values=t}}t.JsonTemplateInstanceReader=L},6537(e,t,r){t.JsonTemplateInstanceReaderResult=void 0;const n=r(8518);class i extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.JsonTemplateInstanceReaderResult=i},5291(e,t,r){t.JsonTemplateReader=void 0;const n=r(5904),i=r(797),a=r(936),s=r(2733),o=r(2763),l=r(5747),c=r(8748),d=r(6551),u=r(3056),m=r(4036),p=r(7954),h=r(3188),f=r(5846),y=r(9932),T=r(7909),g=r(5510),E=r(3281);class C extends g.JsonContainerArtifactReader{elementReader;knownArtifactType=o.CedarArtifactType.TEMPLATE;constructor(e){super(e),this.elementReader=T.JsonTemplateElementReader.getForBehavior(e)}static getStrict(){return new C(f.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new C(f.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new C(e)}getElementReader(){return this.elementReader}includeInIRIMapping(e){return e.atType!==o.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e,t=new h.JsonPath){const r=new m.JsonArtifactParsingResult,n=E.Template.buildEmptyWithNullValues();return c.ReaderUtil.getArtifactIdentifier(e,s.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(n,e),(0,i.applySchemaReaderDefaults)(n,e,t,"json"),this.readReportableAttributes(n,e,r,t),this.readAnnotations(n,e),this.readInstanceTypeSpecification(n,e,r),this.readAndValidateChildrenInfo(n,e,r,t),new p.JsonTemplateReaderResult(n,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=c.ReaderUtil.getNode(t,a.CedarModel.ui);null!==r&&(e.header=c.ReaderUtil.getString(r,a.CedarModel.header),e.footer=c.ReaderUtil.getString(r,a.CedarModel.footer))}readAndValidateChildrenInfo(e,t,r,n){const i=c.ReaderUtil.getStringList(t,s.JsonSchema.required),o=c.ReaderUtil.getNode(t,s.JsonSchema.properties),l=this.generateAndValidateRequiredMap(i,d.JsonTemplateContent.REQUIRED_PARTIAL,r,n),u=this.getCandidateChildrenInfo(o,d.JsonTemplateContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(u,l,i,d.JsonTemplateContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const m=c.ReaderUtil.getNode(t,a.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(m,u,r,n),this.extractIRIMappings(o,u,r,n);const p=c.ReaderUtil.getStringList(m,a.CedarModel.order),h=this.finalizeChildInfo(p,u,r,n);this.validatePropertiesVsOrder(u,p,r,n),this.validateProperties(h,o,e,r,n),this.parseChildren(h,o,e,r,n)}validateProperties(e,t,r,n,i){let o=c.ReaderUtil.deepClone(d.JsonTemplateContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(o=c.ReaderUtil.deepClone(d.JsonTemplateContent.PROPERTIES_PARTIAL),o[s.JsonSchema.atContext][l.TemplateProperty.additionalProperties]=y.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE),a.CedarModel.annotations in t||delete o[a.CedarModel.annotations];const m=c.ReaderUtil.getNode(c.ReaderUtil.getNode(t,s.JsonSchema.atContext),s.JsonSchema.properties);a.CedarModel.annotations in m||delete c.ReaderUtil.getNode(c.ReaderUtil.getNode(o,s.JsonSchema.atContext),s.JsonSchema.properties)[a.CedarModel.annotations],u.JsonObjectComparator.compareToLeft(n,o,t,i.add(s.JsonSchema.properties),this.behavior)}}t.JsonTemplateReader=C},7954(e,t,r){t.JsonTemplateReaderResult=void 0;const n=r(8518);class i extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get template(){return this._artifact}get templateSourceObject(){return this._artifactSourceObject}}t.JsonTemplateReaderResult=i},8639(e,t,r){t.CedarYamlReaders=void 0;const n=r(2763),i=r(1395),a=r(5677),s=r(8239),o=r(2999),l=r(9946);class c{behavior;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}static getStrict(){return new c(i.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new c(i.YamlReaderBehavior.STRICT,!0)}getTemplateReader(){return a.YamlTemplateReader.getForBehavior(this.behavior,this.isCompact)}getTemplateElementReader(){return s.YamlTemplateElementReader.getForBehavior(this.behavior,this.isCompact)}getTemplateFieldReader(){return o.YamlTemplateFieldReader.getForBehavior(this.behavior,this.isCompact)}getTemplateInstanceReader(){return l.YamlTemplateInstanceReader.getForBehavior(this.behavior)}getReaderForArtifactType(e){switch(e){case n.CedarArtifactType.TEMPLATE:return a.YamlTemplateReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_ELEMENT:return s.YamlTemplateElementReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_FIELD:case n.CedarArtifactType.STATIC_TEMPLATE_FIELD:return o.YamlTemplateFieldReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_INSTANCE:return l.YamlTemplateInstanceReader.getForBehavior(this.behavior);default:throw new Error(`No YAML reader available for CedarArtifactType: ${e}`)}}}t.CedarYamlReaders=c},6575(e,t,r){t.YamlAbstractArtifactReader=void 0;const n=r(3992),i=r(4443),a=r(8333),s=r(8534),o=r(2234),l=r(9857),c=r(8557),d=r(1027),u=r(3910),m=r(2763),p=r(5226),h=r(2787),f=r(3549),y=r(8748),T=r(2099),g=r(7752);class E{behavior;knownArtifactType=m.CedarArtifactType.NULL;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}artifactTypeWord(){return this.knownArtifactType===m.CedarArtifactType.TEMPLATE?"template":this.knownArtifactType===m.CedarArtifactType.TEMPLATE_ELEMENT?"element":"field"}readNonReportableAttributes(e,t){if(e.extensions=i.SchemaExtensions.fromYaml(t),E.refuseEmptyIdentifier(t),e.at_id=s.CedarArtifactId.forValue(y.ReaderUtil.getString(t,T.YamlKeys.id)),e.schema_name=y.ReaderUtil.getString(t,T.YamlKeys.name),e.schema_description=y.ReaderUtil.getStringOrEmpty(t,T.YamlKeys.description),null!==e.schema_name){const t=this.artifactTypeWord();e.title=(0,a.internalNameFor)(e.schema_name,t),e.description=`${e.schema_name} ${t} schema generated by the CEDAR Artifact Library`}e.pav_createdBy=o.CedarUser.forValue(y.ReaderUtil.getString(t,T.YamlKeys.createdBy)),e.pav_createdOn=l.IsoDate.forValue(y.ReaderUtil.getString(t,T.YamlKeys.createdOn)),e.oslc_modifiedBy=o.CedarUser.forValue(y.ReaderUtil.getString(t,T.YamlKeys.modifiedBy)),e.pav_lastUpdatedOn=l.IsoDate.forValue(y.ReaderUtil.getString(t,T.YamlKeys.modifiedOn));const r=y.ReaderUtil.getString(t,T.YamlKeys.modelVersion);if(null===r&&!this.isCompact)throw new Error(`No ${T.YamlKeys.modelVersion} present. A document without one is the compact form, which a reader has to be asked for.`);e.schema_schemaVersion=c.SchemaVersion.forValue(r),e.pav_version=d.PavVersion.forValue(y.ReaderUtil.getString(t,T.YamlKeys.version)),e.bibo_status=u.BiboStatus.forYamlValue(y.ReaderUtil.getString(t,T.YamlKeys.status)),e.pav_derivedFrom=s.CedarArtifactId.forValue(y.ReaderUtil.getArtifactIdentifier(t,T.YamlKeys.derivedFrom,this.behavior.useWarningForKnownIssues())),e.pav_previousVersion=s.CedarArtifactId.forValue(y.ReaderUtil.getIdentifier(t,T.YamlKeys.previousVersion)),e.schema_identifier=y.ReaderUtil.getString(t,T.YamlKeys.identifier),e.language=g.Language.forValue(y.ReaderUtil.getString(t,T.YamlKeys.language))}static refuseEmptyIdentifier(e,t=T.YamlKeys.id){const r=y.ReaderUtil.getString(e,t);if(null!==r&&"string"!=typeof r)throw new Error(`Invalid URI at "${t}": expected a string.`);if(null!==r&&n.TextPolicy.isBlank(r))throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);y.ReaderUtil.assertIri(r,t)}readAnnotations(e,t,r,n){const i=new p.Annotations,a=y.ReaderUtil.getNode(t,T.YamlKeys.annotations);Object.keys(a).forEach(e=>{const t=a[e];if(null===t||"object"!=typeof t||Array.isArray(t))throw new Error(`Expected map value for annotation at /annotations/${e}`);const r=y.ReaderUtil.getNode(a,e),n=y.ReaderUtil.getString(r,T.YamlKeys.id),s=y.ReaderUtil.getString(r,T.YamlKeys.value);if(null!==e)if(null!==n)i.add(new h.AnnotationAtId(e,n));else{if(null===s)throw new Error(`Annotation must have either a value or id at /annotations/${e}`);i.add(new f.AnnotationAtValue(e,s))}}),i.getSize()>0&&(e.annotations=i)}}t.YamlAbstractArtifactReader=E},6532(e,t){t.YamlArtifactReaderResult=void 0,t.YamlArtifactReaderResult=class{_artifact;_parsingResult;_artifactSourceObject;constructor(e,t,r){this._artifact=e,this._parsingResult=t,this._artifactSourceObject=r}get artifact(){return this._artifact}get parsingResult(){return this._parsingResult}get artifactSourceObject(){return this._artifactSourceObject}}},9300(e,t,r){t.YamlContainerArtifactReader=void 0;const n=r(5588),i=r(6575),a=r(2999),s=r(455),o=r(2763),l=r(8748),c=r(2099),d=r(699),u=r(9499),m=r(4869),p=r(3239),h=r(8290),f=r(3608),y=r(513);class T extends i.YamlAbstractArtifactReader{fieldReader;constructor(e,t=!1){super(e,t),this.fieldReader=a.YamlTemplateFieldReader.getForBehavior(e,t)}readAndValidateChildrenInfo(e,t,r,i){l.ReaderUtil.getNodeList(t,c.YamlKeys.children).forEach(t=>{const r=l.ReaderUtil.getString(t,c.YamlKeys.type),a=l.ReaderUtil.getString(t,c.YamlKeys.key),g=u.YamlArtifactType.forValue(r);if(null===a)throw new Error(`A child without a ${c.YamlKeys.key} at ${i.add(c.YamlKeys.children).toString()}`);{if("string"!=typeof a)throw new Error(`Child key must be a string at ${i.add(c.YamlKeys.children,c.YamlKeys.key).toString()}`);if(n.ReservedNames.isReservedName(a))throw new Error(`Child schema uses a reserved instance property name at ${i.add(c.YamlKeys.children,a).toString()}`);const u=new s.ChildDeploymentInfo(a);u.atType=o.CedarArtifactType.forYamlArtifactType(g);const E=l.ReaderUtil.getNode(t,c.YamlKeys.configuration);if(u.label=l.ReaderUtil.getString(E,c.YamlKeys.overrideLabel),u.description=l.ReaderUtil.getString(E,c.YamlKeys.overrideDescription),u.multiInstance=l.ReaderUtil.getBoolean(E,c.YamlKeys.multiple),u.multiInstance&&(u.minItems=l.ReaderUtil.getNumber(E,c.YamlKeys.minItems)??y.AbstractChildDeploymentInfo.defaultMinItems,u.maxItems=l.ReaderUtil.getNumber(E,c.YamlKeys.maxItems)),u.requiredValue=l.ReaderUtil.getBoolean(E,c.YamlKeys.required),u.recommendedValue=l.ReaderUtil.getBoolean(E,c.YamlKeys.recommended),u.hidden=l.ReaderUtil.getBoolean(E,c.YamlKeys.hidden),u.valueRecommendationEnabled=l.ReaderUtil.getBoolean(E,c.YamlKeys.valueRecommendation),u.iri=l.ReaderUtil.getIdentifier(E,c.YamlKeys.propertyIri),g.isField()){const r=m.CedarFieldType.forYamlArtifactType(g);u.uiInputType=r.getUiInputType();const n=this.fieldReader.readFromObject(t,u,i.add(c.YamlKeys.children,a));(0,d.isSizedStaticField)(n.field)&&(n.field.width=l.ReaderUtil.getNumber(E,c.YamlKeys.width),n.field.height=l.ReaderUtil.getNumber(E,c.YamlKeys.height)),u.label=T.entryFor(u.label,n.field.schema_name),u.description=T.entryFor(u.description,n.field.schema_description);const s=n.field.createDeploymentBuilder(u.name).withLabel(u.label).withDescription(u.description);if(s instanceof h.ChildDeploymentInfoStaticBuilder&&s.withHidden(u.hidden),u.atType===o.CedarArtifactType.TEMPLATE_FIELD){const e=s;e.withHidden(u.hidden).withIri(u.iri).withContinuePreviousLine(l.ReaderUtil.getBoolean(E,c.YamlKeys.continuePreviousLine)).withRecommendedValue(u.recommendedValue).withRequiredValue(u.requiredValue).withValueRecommendationEnabled(u.valueRecommendationEnabled),e instanceof f.ChildDeploymentInfoBuilder&&e.withMultiInstance(u.multiInstance).withMinItems(u.minItems).withMaxItems(u.maxItems)}s instanceof p.ChildDeploymentInfoAlwaysMultipleBuilder&&s.withMinItems(l.ReaderUtil.getNumber(E,c.YamlKeys.minItems)).withMaxItems(l.ReaderUtil.getNumber(E,c.YamlKeys.maxItems));const y=s.build();e.addChild(n.field,y)}else{if(!g.isElement())throw new Error(`Unknown child type "${r}" at ${i.add(c.YamlKeys.children,a).toString()}`);{const r=this.getElementReader().readFromObject(t,u,i.add(c.YamlKeys.children,a)),n=r.element.createDeploymentBuilder(a).withLabel(T.entryFor(u.label,r.element.schema_name)).withDescription(T.entryFor(u.description,r.element.schema_description)).withIri(u.iri).withMultiInstance(u.multiInstance).withMinItems(u.minItems).withMaxItems(u.maxItems).build();e.addChild(r.element,n)}}}})}static entryFor(e,t){return null!==e?e:t}}t.YamlContainerArtifactReader=T},8979(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.YamlSourcePolicy=void 0;const n=r(3198),i=r(5904);t.YamlSourcePolicy=class{static parse(e){const t=(0,n.parseAllDocuments)(e,{version:"1.2",schema:"core",uniqueKeys:!1});if(1!==t.length)throw new SyntaxError("Expected one YAML document");const r=t[0];if(r.errors.length||r.warnings.length)throw new SyntaxError("Invalid or unsupported YAML syntax");const a=new Set;let s=1e6;const o=new Set(["str","bool","null","int","float","seq","map"].map(e=>"tag:yaml.org,2002:"+e)),l=function e(t,l){if(null===t)return null;if(!t||"object"!=typeof t||--s<0||l>50||a.has(t))throw new SyntaxError("YAML alias expansion, nesting limit or cycle");a.add(t);try{if((0,n.isAlias)(t))return e(t.resolve(r),l+1);const a="tag"in t?t.tag:void 0;if(a&&!o.has(a))throw new SyntaxError("Unsupported YAML tag");if((0,n.isMap)(t)&&(!a||a.endsWith(":map"))){const r={};for(const i of t.items){if(!(0,n.isScalar)(i.key))throw new SyntaxError("Artifact mapping keys must be scalar strings");if(i.key.tag&&!o.has(i.key.tag))throw new SyntaxError("Unsupported YAML key tag");const t=i.key.source??String(i.key.value??"");if(Object.hasOwn(r,t))throw new SyntaxError("Duplicate YAML mapping key");Object.defineProperty(r,t,{value:e(i.value,l+1),enumerable:!0,writable:!0,configurable:!0})}return r}if((0,n.isSeq)(t)&&(!a||a.endsWith(":seq")))return t.items.map(t=>e(t,l+1));if((0,n.isScalar)(t)){const e=t.source??"";if(a?.endsWith(":str")||!a&&t.type!==n.Scalar.PLAIN)return e;const r=a?.slice(18);if((!r||"null"===r)&&/^(?:~|null|Null|NULL|)$/.test(e))return null;if((!r||"bool"===r)&&/^(?:true|True|TRUE|false|False|FALSE)$/.test(e))return"true"===e.toLowerCase();if((!r||"int"===r)&&/^(?:0o[0-7]+|0x[0-9a-fA-F]+)$/.test(e))return i.JsonSourcePolicy.sourceNumber(BigInt(e).toString());if((!r||"int"===r)&&/^[-+]?[0-9]+$/.test(e))return i.JsonSourcePolicy.sourceNumber(e);if((!r||"float"===r)&&/^[-+]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][-+]?[0-9]+)?$/.test(e))return i.JsonSourcePolicy.sourceNumber(e);if(r||/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/.test(e))throw new SyntaxError("Invalid YAML scalar");return e}throw new SyntaxError("Unsupported YAML value")}finally{a.delete(t)}}(r.contents,0);if(!(0,n.isMap)(r.contents))throw new SyntaxError("Expected a YAML mapping");return l}}},8239(e,t,r){t.YamlTemplateElementReader=void 0;const n=r(8979),i=r(797),a=r(2763),s=r(3188),o=r(1395),l=r(7661),c=r(455),d=r(9300),u=r(4646),m=r(1591),p=r(8748),h=r(2099);class f extends d.YamlContainerArtifactReader{knownArtifactType=a.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e,t=!1){super(e,t)}static getStrict(){return new f(o.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new f(o.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new f(e,t)}getElementReader(){return this}readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t,c.ChildDeploymentInfo.empty(),new s.JsonPath)}readFromObject(e,t,r){const n=new m.YamlArtifactParsingResult,a=l.TemplateElement.buildEmptyWithNullValues();return null===r.getLastComponent()&&p.ReaderUtil.getIdentifier(e,h.YamlKeys.id),this.readNonReportableAttributes(a,e),(0,i.applySchemaReaderDefaults)(a,e,r,"yaml"),this.readAnnotations(a,e,n,r),super.readAndValidateChildrenInfo(a,e,n,r),new u.YamlTemplateElementReaderResult(a,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=t[h.YamlKeys.instanceType];if(null!=r&&"string"!=typeof r&&(!Array.isArray(r)||0===r.length))throw new Error("Instance types must be an IRI or a nonempty array of IRIs");e.instanceTypeSpecifications=Array.isArray(r)?r:"string"==typeof r?[r]:[],e.skos_prefLabel=p.ReaderUtil.getString(t,h.YamlKeys.prefLabel),e.skos_altLabel=p.ReaderUtil.getFilteredStringList(t,h.YamlKeys.altLabels),e.header=p.ReaderUtil.getString(t,h.YamlKeys.header),e.footer=p.ReaderUtil.getString(t,h.YamlKeys.footer)}}t.YamlTemplateElementReader=f},4646(e,t){t.YamlTemplateElementReaderResult=void 0,t.YamlTemplateElementReaderResult=class{_element;_parsingResult;_elementSourceObject;constructor(e,t,r){this._element=e,this._parsingResult=t,this._elementSourceObject=r}get element(){return this._element}get parsingResult(){return this._parsingResult}get elementSourceObject(){return this._elementSourceObject}}},2999(e,t,r){t.YamlTemplateFieldReader=void 0;const n=r(8979),i=r(797),a=r(3188),s=r(8748),o=r(2763),l=r(3054),c=r(1790),d=r(455),u=r(6575),m=r(1395),p=r(2099),h=r(9499),f=r(1268),y=r(3168),T=r(384),g=r(1872),E=r(529),C=r(4568),I=r(8568),A=r(3980),b=r(7941),R=r(1404),v=r(7089),S=r(4329),_=r(7268),N=r(2709),w=r(7124),L=r(4284),F=r(9299),V=r(1591),O=r(6651),x=r(7123),D=r(5075),M=r(7709),P=r(6089),U=r(8543),B=r(5907),Y=r(6731),J=r(6591);class k extends u.YamlAbstractArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_FIELD;constructor(e,t=!1){super(e,t)}static getStrict(){return new k(m.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new k(m.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new k(e,t)}static readerMap=new Map([[h.YamlArtifactType.TEXTFIELD,new f.YamlFieldReaderTextField],[h.YamlArtifactType.TEXTAREA,new y.YamlFieldReaderTextArea],[h.YamlArtifactType.CONTROLLED_TERM,new F.YamlFieldReaderControlledTerm],[h.YamlArtifactType.LINK,new I.YamlFieldReaderLink],[h.YamlArtifactType.EXT_ROR,new O.YamlFieldReaderExtRor],[h.YamlArtifactType.EXT_ORCID,new x.YamlFieldReaderExtOrcid],[h.YamlArtifactType.EXT_PFAS,new D.YamlFieldReaderExtPfas],[h.YamlArtifactType.EXT_PUBMED,new M.YamlFieldReaderExtPubmed],[h.YamlArtifactType.EXT_RRID,new P.YamlFieldReaderExtRrid],[h.YamlArtifactType.EXT_NIH_GRANT_ID,new U.YamlFieldReaderExtNihGrantId],[h.YamlArtifactType.EXT_DOI,new B.YamlFieldReaderExtDoi],[h.YamlArtifactType.TEMPORAL,new T.YamlFieldReaderTemporal],[h.YamlArtifactType.EMAIL,new l.YamlFieldReaderEmail],[h.YamlArtifactType.NUMERIC,new g.YamlFieldReaderNumeric],[h.YamlArtifactType.PHONE_NUMBER,new S.YamlFieldReaderPhoneNumber],[h.YamlArtifactType.RADIO,new L.YamlFieldReaderRadio],[h.YamlArtifactType.CHECKBOX,new _.YamlFieldReaderCheckbox],[h.YamlArtifactType.SINGLE_SELECT_LIST,new N.YamlFieldReaderSingleSelectList],[h.YamlArtifactType.MULTI_SELECT_LIST,new w.YamlFieldReaderMultiSelectList],[h.YamlArtifactType.ATTRIBUTE_VALUE,new E.YamlFieldReaderAttributeValue],[h.YamlArtifactType.PAGE_BREAK,new C.YamlFieldReaderPageBreak],[h.YamlArtifactType.SECTION_BREAK,new A.YamlFieldReaderSectionBreak],[h.YamlArtifactType.IMAGE,new b.YamlFieldReaderImage],[h.YamlArtifactType.RICH_TEXT,new R.YamlFieldReaderRichText],[h.YamlArtifactType.YOUTUBE,new v.YamlFieldReaderYoutube]]);readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t,d.ChildDeploymentInfo.empty(),new a.JsonPath)}readFromObject(e,t,r){const n=new V.YamlArtifactParsingResult,a=k.readFieldSpecificAttributes(e,t,n,r);return null===r.getLastComponent()&&s.ReaderUtil.getIdentifier(e,p.YamlKeys.id),this.readNonReportableAttributes(a,e),(0,i.applySchemaReaderDefaults)(a,e,r,"yaml"),this.readAnnotations(a,e,n,r),new c.YamlTemplateFieldReaderResult(a,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=s.ReaderUtil.getString(t,p.YamlKeys.prefLabel),e.skos_altLabel=s.ReaderUtil.getFilteredStringList(t,p.YamlKeys.altLabels),(e instanceof Y.ControlledTermFieldImpl||e instanceof J.TextFieldImpl)&&(e.valueRecommendationEnabled=s.ReaderUtil.getBoolean(t,p.YamlKeys.valueRecommendation));const r=s.ReaderUtil.getNode(t,p.YamlKeys.configuration);e.hidden=k.readFlag(r,t,p.YamlKeys.hidden),e.requiredValue=k.readFlag(r,t,p.YamlKeys.required),e.recommendedValue=k.readFlag(r,t,p.YamlKeys.recommended),e.continuePreviousLine=k.readFlag(r,t,p.YamlKeys.continuePreviousLine)}static readFlag(e,t,r){return s.ReaderUtil.getBoolean(e,r)||s.ReaderUtil.getBoolean(t,r)}static readFieldSpecificAttributes(e,t,r,n){const i=h.YamlArtifactType.forValue(s.ReaderUtil.getString(e,p.YamlKeys.type));if(i.isField()){const a=this.readerMap.get(i);if(!a)throw new Error(`No reader defined for dynamic input type "${i.getValue()}"`);const s=a.read(e,t,r,n);let l=o.CedarArtifactType.NULL;return i.isStaticField()?l=o.CedarArtifactType.STATIC_TEMPLATE_FIELD:i.isDynamicField()&&(l=o.CedarArtifactType.TEMPLATE_FIELD),s.cedarArtifactType=l,s}throw new Error(`Unknown field type "${s.ReaderUtil.getString(e,p.YamlKeys.type)}" at ${n.toString()}`)}}t.YamlTemplateFieldReader=k},1790(e,t){t.YamlTemplateFieldReaderResult=void 0,t.YamlTemplateFieldReaderResult=class{_field;_parsingResult;_fieldSourceObject;constructor(e,t,r){this._field=e,this._parsingResult=t,this._fieldSourceObject=r}get field(){return this._field}get parsingResult(){return this._parsingResult}get fieldSourceObject(){return this._fieldSourceObject}}},5675(e,t,r){t.YamlTemplateFieldTypeSpecificReader=void 0;const n=r(855),i=r(8748),a=r(2099),s=r(4081),o=r(6145);t.YamlTemplateFieldTypeSpecificReader=class{read(e,t,r,i){return n.UnknownTemplateField.build()}static readAndStoreListValueConstraints(e,t){t.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,a.YamlKeys.default);const r=i.ReaderUtil.getNodeList(e,a.YamlKeys.values);null!==r&&r.forEach(e=>{const r=i.ReaderUtil.getString(e,a.YamlKeys.label),n=i.ReaderUtil.getBoolean(e,a.YamlKeys.selected),o=Object.hasOwn(e,a.YamlKeys.selected);if(null!=r){const e=new s.ListOption(r,n,o);t.valueConstraints.literals.push(e)}})}}},9946(e,t,r){t.YamlTemplateInstanceReader=void 0;const n=r(8979),i=r(5588),a=r(1625),s=r(9167),o=r(8534),l=r(1395),c=r(6575),d=r(2234),u=r(9857),m=r(1591),p=r(2099),h=r(8748),f=r(2272),y=r(147),T=r(7723),g=r(5222),E=r(4877),C=r(7571),I=r(8193),A=r(4465),b=r(9327),R=r(4033),v=r(2888),S=r(6109),_=r(3188);class N extends c.YamlAbstractArtifactReader{constructor(e,t=!1){super(e,t)}static getStrict(){return new N(l.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new N(l.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new N(e,t)}readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e){const t=new m.YamlArtifactParsingResult,r=f.TemplateInstance.buildEmptyWithNullValues(),n=e??{};r.schema_name=h.ReaderUtil.getString(n,p.YamlKeys.name),r.schema_description=h.ReaderUtil.getString(n,p.YamlKeys.description)??"",r.descriptionWasAbsent=null===h.ReaderUtil.getString(n,p.YamlKeys.description),r.at_id=o.CedarArtifactId.forValue(h.ReaderUtil.getIdentifier(n,p.YamlKeys.id));const i=this.behavior.useWarningForKnownIssues();r.schema_isBasedOn=o.CedarArtifactId.forValue(h.ReaderUtil.getArtifactIdentifier(n,p.YamlKeys.isBasedOn,i)),r.pav_derivedFrom=o.CedarArtifactId.forValue(h.ReaderUtil.getArtifactIdentifier(n,p.YamlKeys.derivedFrom,i)),r.pav_createdBy=d.CedarUser.forValue(h.ReaderUtil.getString(n,p.YamlKeys.createdBy)),r.pav_createdOn=u.IsoDate.forValue(h.ReaderUtil.getString(n,p.YamlKeys.createdOn)),r.oslc_modifiedBy=d.CedarUser.forValue(h.ReaderUtil.getString(n,p.YamlKeys.modifiedBy)),r.pav_lastUpdatedOn=u.IsoDate.forValue(h.ReaderUtil.getString(n,p.YamlKeys.modifiedOn)),this.readAnnotations(r,n,t,new _.JsonPath),r.dataContainer=this.parseContainer(n,!0);for(const e of R.AttributeValueNamePolicy.findConflicts(r.dataContainer,"template",!0))t.addBlueprintComparisonError(new v.ComparisonError("YamlTemplateInstanceReader",S.YamlComparisonErrorType.VALUE_MISMATCH,new _.JsonPath(...R.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));return new y.YamlTemplateInstanceReaderResult(r,t,n)}static RESERVED_KEYS=i.ReservedNames.TEMPLATE_INSTANCE_YAML_KEYS;static ELEMENT_RESERVED_KEYS=i.ReservedNames.NESTED_ELEMENT_INSTANCE_YAML_KEYS;parseContainer(e,t=!1){const r=new T.InstanceDataContainer,n=h.ReaderUtil.getNode(e,p.YamlKeys.children);null!==n&&Object.keys(n).forEach(e=>{const t=h.ReaderUtil.getNode(n,e)??n[e];if(Array.isArray(t)){const n=[];r.setValue(e,n),t.forEach((e,t)=>{n[t]=this.parseNode(e)})}else r.setValue(e,this.parseNode(t))}),Object.keys(e).forEach(n=>{if((t?N.RESERVED_KEYS:N.ELEMENT_RESERVED_KEYS).has(n))return;const i=e[n];if(null===i||"object"!=typeof i||Array.isArray(i))return;const a=new b.InstanceDataAttributeValueField(n);Object.keys(i).forEach(e=>{const t=i[e];a.addValue(e,new g.InstanceDataStringAtom(this.parseAttributeValue(t)))}),r.setValue(n,a)});const i=h.ReaderUtil.getIdentifier(e,p.YamlKeys.id);return null!==i&&(r.id=i),r}parseAttributeValue(e){if("string"==typeof e)return e;if(null!==e&&"object"==typeof e&&!Array.isArray(e)){const t=e[p.YamlKeys.value];return"string"==typeof t?t:null}return null}parseNode(e){const t=this.parseNodeWithoutNotation(e);return null!==e&&"object"==typeof e&&"language"in t&&(t.language=h.ReaderUtil.getString(e,p.YamlKeys.language)),null!==e&&"object"==typeof e&&"preferredLabel"in t&&(t.preferredLabel=h.ReaderUtil.getString(e,p.YamlKeys.prefLabel)),null===e||"object"!=typeof e||!("notation"in t)||t instanceof a.InstanceDataNotationAtom||(t.notation=h.ReaderUtil.getString(e,p.YamlKeys.notation)),t}parseNodeWithoutNotation(e){if(null==e)return new A.InstanceDataEmptyNode;if("string"==typeof e)return new g.InstanceDataStringAtom(e);if(Object.hasOwn(e,p.YamlKeys.children)||"element-instance"===h.ReaderUtil.getString(e,p.YamlKeys.type))return this.parseContainer(e);if(Object.hasOwn(e,p.YamlKeys.id)&&Object.hasOwn(e,p.YamlKeys.value))throw new Error("A field cannot contain both id and value.");if(Array.isArray(e[p.YamlKeys.datatype]))throw new Error("A field value can have at most one datatype.");if(Object.hasOwn(e,p.YamlKeys.value)){const t=h.ReaderUtil.getString(e,p.YamlKeys.value),r=h.ReaderUtil.getString(e,p.YamlKeys.datatype),n=h.ReaderUtil.getString(e,p.YamlKeys.label);return null===r?new g.InstanceDataStringAtom(t,n):new E.InstanceDataTypedAtom(t,r,n)}if(Object.hasOwn(e,p.YamlKeys.id)){h.ReaderUtil.assertFieldIri(h.ReaderUtil.getString(e,p.YamlKeys.id),p.YamlKeys.id);const t=h.ReaderUtil.getString(e,p.YamlKeys.id),r=h.ReaderUtil.getString(e,p.YamlKeys.label),n=h.ReaderUtil.getString(e,p.YamlKeys.datatype);return null===r?C.InstanceDataLinkAtom.fromParsedNode(t,n):I.InstanceDataControlledAtom.fromParsedNode(t,r,n)}const t=h.ReaderUtil.getString(e,p.YamlKeys.label);if(null!==t)return new s.InstanceDataLabelAtom(t,h.ReaderUtil.getString(e,p.YamlKeys.datatype));const r=h.ReaderUtil.getString(e,p.YamlKeys.notation);return null!==r?new a.InstanceDataNotationAtom(r,h.ReaderUtil.getString(e,p.YamlKeys.datatype)):new A.InstanceDataEmptyNode}}t.YamlTemplateInstanceReader=N},147(e,t,r){t.YamlTemplateInstanceReaderResult=void 0;const n=r(6532);class i extends n.YamlArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.YamlTemplateInstanceReaderResult=i},5677(e,t,r){t.YamlTemplateReader=void 0;const n=r(8979),i=r(797),a=r(2763),s=r(8748),o=r(7868),l=r(3188),c=r(1395),d=r(8239),u=r(3281),m=r(9300),p=r(2099),h=r(1591);class f extends m.YamlContainerArtifactReader{elementReader;knownArtifactType=a.CedarArtifactType.TEMPLATE;constructor(e,t=!1){super(e,t),this.elementReader=d.YamlTemplateElementReader.getForBehavior(e,t)}static getStrict(){return new f(c.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new f(c.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new f(e,t)}getElementReader(){return this.elementReader}readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e,t=new l.JsonPath){const r=new h.YamlArtifactParsingResult,n=u.Template.buildEmptyWithNullValues();return s.ReaderUtil.getIdentifier(e,p.YamlKeys.id),this.readNonReportableAttributes(n,e),(0,i.applySchemaReaderDefaults)(n,e,t,"yaml"),this.readAnnotations(n,e,r,t),this.readInstanceTypeSpecification(n,e,r),this.readAndValidateChildrenInfo(n,e,r,t),new o.YamlTemplateReaderResult(n,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.header=s.ReaderUtil.getString(t,p.YamlKeys.header),e.footer=s.ReaderUtil.getString(t,p.YamlKeys.footer)}readInstanceTypeSpecification(e,t,r){const n=t[p.YamlKeys.instanceType];if(null!=n&&"string"!=typeof n&&(!Array.isArray(n)||0===n.length))throw new Error("Instance types must be an IRI or a nonempty array of IRIs");e.instanceTypeSpecifications=Array.isArray(n)?n:"string"==typeof n?[n]:[]}}t.YamlTemplateReader=f},7868(e,t){t.YamlTemplateReaderResult=void 0,t.YamlTemplateReaderResult=class{_template;_parsingResult;_templateSourceObject;constructor(e,t,r){this._template=e,this._parsingResult=t,this._templateSourceObject=r}get template(){return this._template}get parsingResult(){return this._parsingResult}get templateSourceObject(){return this._templateSourceObject}}},1888(e,t,r){t.RoundTrip=void 0;const n=r(5904),i=r(6396),a=r(2748),s=r(4036),o=r(3056),l=r(455),c=r(3188),d=r(7954),u=r(7519),m=r(4948),p=r(6645),h=r(2022);t.RoundTrip=class{static compare(e,t){if(e instanceof i.JsonTemplateFieldReaderResult&&t instanceof a.JsonTemplateFieldWriterInternal)return this.compareField(e,t);if(e instanceof m.JsonTemplateElementReaderResult&&t instanceof p.JsonTemplateElementWriter)return this.compareElement(e,t);if(e instanceof d.JsonTemplateReaderResult&&t instanceof u.JsonTemplateWriter)return this.compareTemplate(e,t);if("string"==typeof e&&"string"==typeof t)return this.compareString(e,t);throw new Error("Invalid argument types for compare method")}static compareField(e,t){const r=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.fieldSourceObject,t.getAsJsonNode(e.field,l.ChildDeploymentInfo.empty()),new c.JsonPath,t.getBehavior()),r}static compareElement(e,t){const r=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.elementSourceObject,t.getAsJsonNode(e.element),new c.JsonPath,t.getBehavior()),r}static compareTemplate(e,t){const r=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.templateSourceObject,t.getAsJsonNode(e.template),new c.JsonPath,t.getBehavior()),r}static compareString(e,t){const r=n.JsonSourcePolicy.parse(e),i=n.JsonSourcePolicy.parse(t),a=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(a,r,i,new c.JsonPath,h.JsonWriterBehavior.STRICT),a}}},2112(e,t){t.AbstractArtifactWriter=void 0,t.AbstractArtifactWriter=class{constructor(){}}},8810(e,t,r){t.CedarWriters=void 0;const n=r(9607),i=r(5359);t.CedarWriters=class{static json(){return n.CedarJsonWriters}static yaml(){return i.CedarYamlWriters}}},5692(e,t,r){t.WriterUtil=void 0;const n=r(8878),i=r(3812);t.WriterUtil=class{static getMultiMinMax(e,t){let r=null,a=null,s=!1;return e.isMultiInstanceByDefinition()?t instanceof n.ChildDeploymentInfoAlwaysMultiple&&(s=!0,r=t.minItems,a=t.maxItems):e.isSingleInstanceByDefinition()?s=!1:(s=t.isMultiInAnyWay(),s&&t instanceof i.AbstractDynamicChildDeploymentInfo&&(r=t.minItems,a=t.maxItems)),{isMultiInstance:s,minItems:r,maxItems:a}}}},9607(e,t,r){t.CedarJsonWriters=void 0;const n=r(2022),i=r(4872),a=r(7519),s=r(4869),o=r(7501),l=r(3691),c=r(4841),d=r(5459),u=r(8970),m=r(2347),p=r(41),h=r(6029),f=r(6766),y=r(9309),T=r(8663),g=r(7335),E=r(275),C=r(6876),I=r(9031),A=r(9129),b=r(1442),R=r(8280),v=r(8354),S=r(5996),_=r(2418),N=r(9222),w=r(9184),L=r(7054),F=r(2395),V=r(2813),O=r(6645),x=r(2981),D=r(7432),M=r(8014),P=r(3281),U=r(7661),B=r(6320),Y=r(7584),J=r(8096),k=r(6122),K=r(3312),W=r(4780),j=r(5250),$=r(7412);class X{behavior;jsonDynamicFieldWriters;jsonStaticFieldWriters;jsonValueConstraintsWriters;jsonAtomicWriter;jsonAnnotationsWriter;jsonTemplateWriter;jsonTemplateElementWriter;jsonTemplateInstanceWriter;constructor(e){this.behavior=e,this.jsonAtomicWriter=new i.JsonAtomicWriter(e),this.jsonAnnotationsWriter=new x.JsonAnnotationsWriter(e),this.jsonTemplateWriter=a.JsonTemplateWriter.getFor(e,this),this.jsonTemplateElementWriter=O.JsonTemplateElementWriter.getFor(e,this),this.jsonTemplateInstanceWriter=B.JsonTemplateInstanceWriter.getFor(e,this),this.jsonDynamicFieldWriters=new Map([[s.CedarFieldType.TEXT,new o.JsonFieldWriterTextField(e,this)],[s.CedarFieldType.TEXTAREA,new E.JsonFieldWriterTextArea(e,this)],[s.CedarFieldType.CONTROLLED_TERM,new R.JsonFieldWriterControlledTerm(e,this)],[s.CedarFieldType.PHONE_NUMBER,new C.JsonFieldWriterPhoneNumber(e,this)],[s.CedarFieldType.EMAIL,new I.JsonFieldWriterEmail(e,this)],[s.CedarFieldType.LINK,new l.JsonFieldWriterLink(e,this)],[s.CedarFieldType.EXT_ROR,new Y.JsonFieldWriterExtRor(e,this)],[s.CedarFieldType.EXT_ORCID,new J.JsonFieldWriterExtOrcid(e,this)],[s.CedarFieldType.EXT_PFAS,new k.JsonFieldWriterExtPfas(e,this)],[s.CedarFieldType.EXT_PUBMED,new K.JsonFieldWriterExtPubmed(e,this)],[s.CedarFieldType.EXT_RRID,new W.JsonFieldWriterExtRrid(e,this)],[s.CedarFieldType.EXT_NIH_GRANT_ID,new j.JsonFieldWriterExtNihGrantId(e,this)],[s.CedarFieldType.EXT_DOI,new $.JsonFieldWriterExtDoi(e,this)],[s.CedarFieldType.NUMERIC,new c.JsonFieldWriterNumeric(e,this)],[s.CedarFieldType.TEMPORAL,new d.JsonFieldWriterTemporal(e,this)],[s.CedarFieldType.RADIO,new y.JsonFieldWriterRadio(e,this)],[s.CedarFieldType.CHECKBOX,new T.JsonFieldWriterCheckbox(e,this)],[s.CedarFieldType.SINGLE_SELECT_LIST,new g.JsonFieldWriterList(e,this)],[s.CedarFieldType.MULTIPLE_SELECT_LIST,new g.JsonFieldWriterList(e,this)],[s.CedarFieldType.ATTRIBUTE_VALUE,new b.JsonFieldWriterAttributeValue(e,this)]]),this.jsonStaticFieldWriters=new Map([[s.CedarFieldType.STATIC_PAGE_BREAK,new m.JsonFieldWriterStaticPageBreak(e,this)],[s.CedarFieldType.STATIC_SECTION_BREAK,new p.JsonFieldWriterStaticSectionsBreak(e,this)],[s.CedarFieldType.STATIC_IMAGE,new u.JsonFieldWriterStaticImage(e,this)],[s.CedarFieldType.STATIC_RICH_TEXT,new h.JsonFieldWriterStaticRichText(e,this)],[s.CedarFieldType.STATIC_YOUTUBE,new f.JsonFieldWriterStaticYoutube(e,this)]]),this.jsonValueConstraintsWriters=new Map([[v.ControlledTermOntology.className,new S.JsonValueConstraintsOntologyWriter(e,this)],[_.ControlledTermClass.className,new N.JsonValueConstraintsClassWriter(e,this)],[w.ControlledTermBranch.className,new L.JsonValueConstraintsBranchWriter(e,this)],[F.ControlledTermValueSet.className,new V.JsonValueConstraintsValueSetWriter(e,this)],[D.ControlledTermAction.className,new M.JsonValueConstraintsActionWriter(e,this)]])}static getStrict(){return new X(n.JsonWriterBehavior.STRICT)}static getFebruary2024(){return new X(n.JsonWriterBehavior.FEBRUARY_2024)}static getFor(e){return new X(e)}getTemplateWriter(){return this.jsonTemplateWriter}getTemplateElementWriter(){return this.jsonTemplateElementWriter}getTemplateInstanceWriter(){return this.jsonTemplateInstanceWriter}getAtomicWriter(){return this.jsonAtomicWriter}getFieldWriterForType(e){let t;if(t=e.isStaticField?this.jsonStaticFieldWriters.get(e):this.jsonDynamicFieldWriters.get(e),t)return t;throw new Error(`No JSON writer found for field type: ${e.getValue()}`)}getWriterForValueConstraint(e){const t=e.className,r=this.jsonValueConstraintsWriters.get(t);if(r)return r;throw new Error(`No JSON writer found for class type: ${t}`)}getFieldWriterForField(e){return this.getFieldWriterForType(e.cedarFieldType)}getAnnotationsWriter(){return this.jsonAnnotationsWriter}getWriterForArtifact(e){if(e instanceof P.Template)return a.JsonTemplateWriter.getFor(this.behavior,this);if(e instanceof U.TemplateElement)return O.JsonTemplateElementWriter.getFor(this.behavior,this);if(e instanceof A.TemplateField)return this.getFieldWriterForType(e.cedarFieldType);throw new Error(`No JSON reader available for CedarArtifact: ${e}`)}}t.CedarJsonWriters=X},3161(e,t,r){t.JsonAbstractArtifactWriter=void 0;const n=r(2112),i=r(9517),a=r(2733),s=r(3910),o=r(1027),l=r(936),c=r(8534);class d extends n.AbstractArtifactWriter{behavior;writers;atomicWriter;annotationsWriter;constructor(e,t){super(),this.behavior=e,this.writers=t,this.atomicWriter=t.getAtomicWriter(),this.annotationsWriter=t.getAnnotationsWriter()}getBehavior(){return this.behavior}macroSchemaNameAndDescription(e){return{[a.JsonSchema.schemaName]:e.schema_name,[a.JsonSchema.schemaDescription]:e.schema_description}}macroProvenance(e,t){return{[a.JsonSchema.pavCreatedOn]:t.write(e.pav_createdOn),[a.JsonSchema.pavCreatedBy]:t.write(e.pav_createdBy),[a.JsonSchema.pavLastUpdatedOn]:t.write(e.pav_lastUpdatedOn),[a.JsonSchema.oslcModifiedBy]:t.write(e.oslc_modifiedBy)}}macroStatusAndVersion(e,t){const r=i.JsonNode.getEmpty();return e.pav_version!==o.PavVersion.NULL&&(r[a.JsonSchema.pavVersion]=t.write(e.pav_version)),e.bibo_status!==s.BiboStatus.NULL&&(r[a.JsonSchema.biboStatus]=t.write(e.bibo_status)),r}macroSkos(e){const t=i.JsonNode.getEmpty();return null!==e.skos_prefLabel&&(t[l.CedarModel.skosPrefLabel]=e.skos_prefLabel),null!==e.skos_altLabel&&e.skos_altLabel.length>0&&(t[l.CedarModel.skosAltLabel]=e.skos_altLabel),t}macroDerivedFrom(e){const t=i.JsonNode.getEmpty();return e.pav_derivedFrom!==c.CedarArtifactId.NULL&&(t[a.JsonSchema.pavDerivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),t}macroIsBasedOn(e){const t=i.JsonNode.getEmpty();return e.schema_isBasedOn!==c.CedarArtifactId.NULL&&(t[a.JsonSchema.schemaIsBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e){const t=i.JsonNode.getEmpty();return e.pav_previousVersion!==c.CedarArtifactId.NULL&&(t[a.JsonSchema.pavPreviousVersion]=this.atomicWriter.write(e.pav_previousVersion)),t}macroSchemaIdentifier(e){const t=i.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[a.JsonSchema.schemaIdentifier]=e.schema_identifier),t}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}}t.JsonAbstractArtifactWriter=d},8872(e,t,r){t.JsonAbstractContainerArtifactWriter=void 0;const n=r(8198),i=r(3161),a=r(6968),s=r(9517),o=r(9129),l=r(2733),c=r(936),d=r(5692),u=r(513),m=r(8748),p=r(7752);class h extends i.JsonAbstractArtifactWriter{macroContext(e){if(e.language===p.Language.NULL)return a.JsonContainerArtifactContent.CONTEXT_VERBATIM;const t=m.ReaderUtil.deepClone(a.JsonContainerArtifactContent.CONTEXT_VERBATIM);return t[l.JsonSchema.atLanguage]=this.atomicWriter.write(e.language),t}getChildMapAsJson(e){const t=s.JsonNode.getEmpty();return e.getChildrenInfo().getChildrenNames().forEach(r=>{const i=e.getChild(r);if(null!=i){let a=s.JsonNode.getEmpty();const m=e.getChildrenInfo().get(r);if(null!==m&&(a=i instanceof o.TemplateField?this.writers.getFieldWriterForType(i.cedarFieldType).getAsJsonNode(i,m):this.writers.getTemplateElementWriter().getAsJsonNode(i)),null!==m){const{isMultiInstance:e,minItems:o,maxItems:p}=d.WriterUtil.getMultiMinMax(i,m);let h=o;const f=p;if(e){null===h&&(h=u.AbstractChildDeploymentInfo.defaultMinItems);const e=s.JsonNode.getEmpty();e[c.CedarModel.minItems]=h,null!==f&&f!==n.UNBOUNDED_MAX_ITEMS&&(e[c.CedarModel.maxItems]=f),a={[l.JsonSchema.type]:"array",...e,[l.JsonSchema.items]:a}}t[r]=a}}}),t}expandInstanceTypeSpecification(e,t){if(e.instanceTypeSpecifications.length>0){const r=m.ReaderUtil.getNode(t,l.JsonSchema.atType);m.ReaderUtil.getNodeList(r,l.JsonSchema.oneOf).forEach(t=>{const r=m.ReaderUtil.getString(t,l.JsonSchema.type);"string"==r?t[l.JsonSchema.enum]=[...e.instanceTypeSpecifications]:"array"==r&&(m.ReaderUtil.getNode(t,l.JsonSchema.items)[l.JsonSchema.enum]=[...e.instanceTypeSpecifications])})}}}t.JsonAbstractContainerArtifactWriter=h},2981(e,t,r){t.JsonAnnotationsWriter=void 0;const n=r(9517),i=r(936),a=r(2787),s=r(2733),o=r(3549);t.JsonAnnotationsWriter=class{behavior;constructor(e){this.behavior=e}write(e){const t=n.JsonNode.getEmpty();if(null!==e&&e.getSize()>0){const r=n.JsonNode.getEmpty();e.getAnnotationNames().forEach(t=>{const n=e.get(t);n instanceof a.AnnotationAtId?r[t]={[s.JsonSchema.atId]:n.getAtId()}:n instanceof o.AnnotationAtValue&&(r[t]={[s.JsonSchema.atValue]:n.getAtValue()})}),t[i.CedarModel.annotations]=r}return t}}},4872(e,t,r){t.JsonAtomicWriter=void 0;const n=r(8534),i=r(2763),a=r(5793),s=r(9857),o=r(2234),l=r(3910),c=r(1027),d=r(2475),u=r(8557),m=r(3447),p=r(8588),h=r(7974),f=r(3764),y=r(9034),T=r(3746),g=r(9932),E=r(8802),C=r(4531),I=r(7752);t.JsonAtomicWriter=class{behavior;constructor(e){this.behavior=e}write(e){if(null==e)return null;if(e instanceof n.CedarArtifactId)return this.writeCedarArtifactId(e);if(e instanceof i.CedarArtifactType)return this.writeCedarArtifactType(e);if(e instanceof a.JavascriptType)return this.writeJavascriptType(e);if(e instanceof s.IsoDate)return this.writeCedarDate(e);if(e instanceof o.CedarUser)return this.writeCedarUser(e);if(e instanceof l.BiboStatus)return this.writeBiboStatusJson(e);if(e instanceof c.PavVersion)return this.writePavVersion(e);if(e instanceof d.ArtifactSchema)return this.writeCedarSchema(e);if(e instanceof u.SchemaVersion)return this.writeSchemaVersion(e);if(e instanceof m.NumberType)return this.writeNumberType(e);if(e instanceof p.TemporalType)return this.writeTemporalType(e);if(e instanceof h.TemporalGranularity)return this.writeTemporalGranularity(e);if(e instanceof f.TimeFormat)return this.writeTimeFormat(e);if(e instanceof y.UiInputType)return this.writeUiInputType(e);if(e instanceof T.AdditionalProperties)return this.writeAdditionalProperties(e);if(e instanceof E.Iri)return this.writeURI(e);if(e instanceof C.BioportalTermType)return this.writeBioportalTermTypeJson(e);if(e instanceof I.Language)return this.writeLanguage(e);throw new Error("Unsupported type")}writeCedarArtifactId(e){return e.getValue()}writeCedarArtifactType(e){return e.getValue()}writeJavascriptType(e){return e.getValue()}writeCedarDate(e){return e.getValue()}writeCedarUser(e){return e.getValue()}writeBiboStatusJson(e){return e.getJsonValue()}writePavVersion(e){return e.getValue()}writeCedarSchema(e){return e.getValue()}writeSchemaVersion(e){return null!==e.getValue()?e.getValue():u.SchemaVersion.CURRENT.getValue()}writeNumberType(e){return e.getValue()}writeTemporalType(e){return e.getValue()}writeTemporalGranularity(e){return e.getValue()}writeTimeFormat(e){return e.getValue()}writeUiInputType(e){return e.getValue()}writeAdditionalProperties(e){return e!==T.AdditionalProperties.FALSE&&(e===T.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE?g.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE:null)}writeURI(e){return e.getValue()}writeBioportalTermTypeJson(e){return e.getJsonValue()}writeLanguage(e){return e.getValue()}}},6645(e,t,r){t.JsonTemplateElementWriter=void 0;const n=r(8972),i=r(8557),a=r(8748),s=r(2733),o=r(936),l=r(2763),c=r(5793),d=r(5747),u=r(2475),m=r(9932),p=r(1501),h=r(8872);class f extends h.JsonAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new f(e,t)}buildProperties(e){const t=a.ReaderUtil.deepClone(p.JsonTemplateElementContent.PROPERTIES_PARTIAL),r=e.getChildrenInfo().getIRIMap();t[s.JsonSchema.atContext][s.JsonSchema.properties]={...t[s.JsonSchema.atContext][s.JsonSchema.properties],...r};const n=e.getChildrenInfo().getChildNamesWithIri();n.length>0?t[s.JsonSchema.atContext][s.JsonSchema.required]=[...t[s.JsonSchema.atContext][s.JsonSchema.required],...n]:a.ReaderUtil.deleteNodeKey(t[s.JsonSchema.atContext],s.JsonSchema.required),e.getChildrenInfo().hasAttributeValue()&&(t[s.JsonSchema.atContext][d.TemplateProperty.additionalProperties]=m.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const i={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,i),i}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e),t)}getAsJsonNode(e){const t=this.buildProperties(e),r={[o.CedarModel.order]:e.getChildrenInfo().getChildrenNames(),[o.CedarModel.propertyLabels]:e.getChildrenInfo().getPropertyLabelMap(e),[o.CedarModel.propertyDescriptions]:e.getChildrenInfo().getPropertyDescriptionMap(e)};return null!==e.header&&(r[o.CedarModel.header]=e.header),null!==e.footer&&(r[o.CedarModel.footer]=e.footer),e.extensions.applyJson({[s.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[s.JsonSchema.atType]:this.atomicWriter.write(l.CedarArtifactType.TEMPLATE_ELEMENT),[s.JsonSchema.atContext]:this.macroContext(e),[o.CedarModel.type]:this.atomicWriter.write(c.JavascriptType.OBJECT),[d.TemplateProperty.title]:e.title,[d.TemplateProperty.description]:e.description,[o.CedarModel.ui]:r,[s.JsonSchema.properties]:t,[s.JsonSchema.required]:[...p.JsonTemplateElementContent.REQUIRED_PARTIAL,...e.getChildrenInfo().getChildrenNamesForRequired()],...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[s.JsonSchema.schemaVersion]:this.atomicWriter.write(i.SchemaVersion.CURRENT),[d.TemplateProperty.additionalProperties]:this.atomicWriter.write(e.getAdditionalProperties()),...this.macroSchemaIdentifier(e),[o.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}}t.JsonTemplateElementWriter=f},2748(e,t,r){t.JsonTemplateFieldWriterInternal=void 0;const n=r(8972),i=r(8557),a=r(9517),s=r(936),o=r(2733),l=r(9932),c=r(5793),d=r(5747),u=r(2475),m=r(3161),p=r(3746),h=r(455),f=r(3812),y=r(9519),T=r(6731),g=r(6591),E=r(7752),C=r(8748);class I extends m.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[o.JsonSchema.properties]=l.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL,this.behavior.usePropertiesAtLanguage()||(e[o.JsonSchema.properties]=l.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE)}expandRequiredNode(e){e[o.JsonSchema.required]=[o.JsonSchema.atValue]}expandUINode(e,t,r){r instanceof f.AbstractDynamicChildDeploymentInfo&&(r.hidden&&(e[s.CedarModel.Ui.hidden]=r.hidden),r instanceof y.AbstractFieldChildDeploymentInfo&&(r.continuePreviousLine&&(e[s.CedarModel.Ui.continuePreviousLine]=r.continuePreviousLine),r.valueRecommendationEnabled&&t.supportsValueRecommendation()&&(e[s.CedarModel.Ui.valueRecommendationEnabled]=r.valueRecommendationEnabled))),void 0===e[s.CedarModel.Ui.hidden]&&t.hidden&&(e[s.CedarModel.Ui.hidden]=!0),void 0===e[s.CedarModel.Ui.continuePreviousLine]&&t.continuePreviousLine&&(e[s.CedarModel.Ui.continuePreviousLine]=!0),void 0===e[s.CedarModel.Ui.valueRecommendationEnabled]&&(t instanceof T.ControlledTermFieldImpl||t instanceof g.TextFieldImpl)&&t.valueRecommendationEnabled&&(e[s.CedarModel.Ui.valueRecommendationEnabled]=!0)}buildUIObject(e,t){const r={[s.CedarModel.inputType]:this.atomicWriter.write(e.cedarFieldType.getUiInputType())},n={[s.CedarModel.ui]:r};return this.expandUINode(r,e,t),n}expandTypeNode(e,t){}expandValueConstraintsNode(e,t,r){r instanceof f.AbstractDynamicChildDeploymentInfo&&(e[s.CedarModel.requiredValue]=r.requiredValue),!e[s.CedarModel.requiredValue]&&t.requiredValue&&(e[s.CedarModel.requiredValue]=!0),r instanceof f.AbstractDynamicChildDeploymentInfo&&r.recommendedValue&&(e[s.CedarModel.ValueConstraints.recommendedValue]=r.recommendedValue),!e[s.CedarModel.ValueConstraints.recommendedValue]&&t.recommendedValue&&(e[s.CedarModel.ValueConstraints.recommendedValue]=!0)}buildValueConstraintsObject(e,t){const r=a.JsonNode.getEmpty(),n={[s.CedarModel.valueConstraints]:r};return this.expandValueConstraintsNode(r,e,t),n}expandLiterals(e,t){const r=a.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=a.JsonNode.getEmpty();t[s.CedarModel.label]=e.label,(e.statesSelectedByDefault||e.selectedByDefault)&&(t[s.CedarModel.selectedByDefault]=e.selectedByDefault),r.push(t)}),r.length>0&&(t[s.CedarModel.literals]=r)}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e,h.ChildDeploymentInfo.standalone()),t)}getAsJsonNode(e,t=h.ChildDeploymentInfo.standalone()){const r=a.JsonNode.getEmpty();this.expandPropertiesNode(r);const n=a.JsonNode.getEmpty();this.expandRequiredNode(n);const l=this.buildUIObject(e,t),m=this.buildValueConstraintsObject(e,t),f={[s.CedarModel.type]:this.atomicWriter.write(c.JavascriptType.OBJECT)};return this.expandTypeNode(f,e),e.extensions.applyJson({[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[o.JsonSchema.atType]:this.atomicWriter.write(e.cedarArtifactType),[o.JsonSchema.atContext]:this.macroContext(e),...f,[d.TemplateProperty.title]:e.title,[d.TemplateProperty.description]:e.description,...l,...m,...r,...n,...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[o.JsonSchema.schemaVersion]:this.atomicWriter.write(i.SchemaVersion.CURRENT),[d.TemplateProperty.additionalProperties]:this.atomicWriter.write(p.AdditionalProperties.FALSE),...this.macroSchemaIdentifier(e),[s.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}macroContext(e){const t=C.ReaderUtil.deepClone(l.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM);return e.language!==E.Language.NULL&&(t[o.JsonSchema.atLanguage]=this.atomicWriter.write(e.language)),t}}t.JsonTemplateFieldWriterInternal=I},6320(e,t,r){t.JsonTemplateInstanceWriter=void 0;const n=r(3992),i=r(9868),a=r(1625),s=r(9167),o=r(8748),l=r(2733),c=r(936),d=r(9517),u=r(3161),m=r(350),p=r(7723),h=r(5222),f=r(4877),y=r(9327),T=r(3644),g=r(8193),E=r(7571),C=r(7548),I=r(4465),A=r(4033);class b extends u.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}macroContext(e){return m.JsonTemplateInstanceContent.CONTEXT_VERBATIM}static getFor(e,t){return new b(e,t)}buildContext(e){const t=o.ReaderUtil.deepClone(m.JsonTemplateInstanceContent.CONTEXT_VERBATIM);return Object.keys(e.dataContainer.iris).forEach(r=>{t[r]=e.dataContainer.iris[r]}),{...t}}getDataTree(e){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,t,!0),t}serializeDataLevelInto(e,t,r=!1){r||(t[l.JsonSchema.atId]=""===e.id?null:e.id),Object.keys(e.values).forEach(r=>{const i=e.values[r];if(Array.isArray(i)){const e=d.JsonNode.getEmptyList();t[r]=e,i.forEach((t,r)=>{if(t instanceof T.InstanceDataAttributeValueFieldName){const r=t.name;return void(n.TextPolicy.isBlank(r)||e.push(r))}const i=this.serializeCommonType(t);null!==i&&e.push(i)})}else{const e=this.serializeCommonType(i);if(null!==e&&(t[r]=e),i instanceof y.InstanceDataAttributeValueField){const e=[];Object.keys(i.values).forEach(t=>{e.push(t)}),t[r]=e}}}),this.serializeAttributeValueFields(e,t);const i=d.JsonNode.getEmpty();Object.keys(e.iris).forEach(t=>{i[t]=e.iris[t]}),t[l.JsonSchema.atContext]=i}static writeValueNode(e){const t=this.writeValueNodeWithoutNotation(e);return null!==t&&"language"in e&&null!==e.language&&(t[l.JsonSchema.atLanguage]=e.language),null!==t&&"notation"in e&&null!==e.notation&&(t[l.JsonSchema.skosNotation]=e.notation),null!==t&&"preferredLabel"in e&&null!==e.preferredLabel&&(t[c.CedarModel.skosPrefLabel]=e.preferredLabel),t}static writeValueNodeWithoutNotation(e){return e instanceof a.InstanceDataNotationAtom?null===e.type?d.JsonNode.getEmpty():{[l.JsonSchema.atType]:e.type}:e instanceof h.InstanceDataStringAtom?{[l.JsonSchema.atValue]:e.value,...null===e.label?{}:{[l.JsonSchema.rdfsLabel]:e.label}}:e instanceof f.InstanceDataTypedAtom?{[l.JsonSchema.atValue]:e.value,...null===e.label?{}:{[l.JsonSchema.rdfsLabel]:e.label},[l.JsonSchema.atType]:e.type}:e instanceof s.InstanceDataLabelAtom?{[l.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[l.JsonSchema.atType]:e.type}}:e instanceof g.InstanceDataControlledAtom?{[l.JsonSchema.atId]:e.id,[l.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[l.JsonSchema.atType]:e.type}}:e instanceof E.InstanceDataLinkAtom?{[l.JsonSchema.atId]:e.id,...null===e.type?{}:{[l.JsonSchema.atType]:e.type}}:e instanceof C.InstanceDataEmptyAtom||e instanceof I.InstanceDataEmptyNode?d.JsonNode.getEmpty():null}serializeCommonType(e){if(e instanceof p.InstanceDataContainer){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e,t),t}return b.writeValueNode(e)}serializeAtomString(e){return{[l.JsonSchema.atValue]:e.value,...null===e.label?{}:{[l.JsonSchema.rdfsLabel]:e.label}}}serializeAttributeValueFields(e,t){Object.keys(e.values).forEach(r=>{const n=e.values[r];n instanceof y.InstanceDataAttributeValueField&&Object.keys(n.values).forEach(e=>{const r=n.values[e];r instanceof h.InstanceDataStringAtom&&(t[e]=this.serializeAtomString(r))})})}getAsJsonString(e,t=2){return(0,i.stringifyInstance)(this.getAsJsonNode(e),e.dataContainer,t)}getAsJsonNode(e){A.AttributeValueNamePolicy.assertValid(e.dataContainer);const t=this.buildContext(e),r=this.macroSchemaNameAndDescription(e);return e.descriptionWasAbsent&&""===e.schema_description&&delete r[l.JsonSchema.schemaDescription],{[l.JsonSchema.atId]:this.atomicWriter.write(e.at_id),...r,...this.getDataTree(e),...this.macroAnnotations(e),[l.JsonSchema.atContext]:t,...this.macroIsBasedOn(e),[l.JsonSchema.schemaDescription]:e.schema_description,...this.macroProvenance(e,this.atomicWriter),...this.macroDerivedFrom(e)}}}t.JsonTemplateInstanceWriter=b},7519(e,t,r){t.JsonTemplateWriter=void 0;const n=r(8972),i=r(8557),a=r(8748),s=r(6551),o=r(2733),l=r(936),c=r(2763),d=r(5793),u=r(5747),m=r(2475),p=r(9932),h=r(8872);class f extends h.JsonAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new f(e,t)}buildProperties(e){const t=a.ReaderUtil.deepClone(s.JsonTemplateContent.PROPERTIES_PARTIAL),r=e.getChildrenInfo().getIRIMap();t[o.JsonSchema.atContext][o.JsonSchema.properties]={...t[o.JsonSchema.atContext][o.JsonSchema.properties],...r};const n=e.getChildrenInfo().getChildNamesWithIri();t[o.JsonSchema.atContext][o.JsonSchema.required]=[...t[o.JsonSchema.atContext][o.JsonSchema.required],...n],e.getChildrenInfo().hasAttributeValue()&&(t[o.JsonSchema.atContext][u.TemplateProperty.additionalProperties]=p.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const i={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,i),i}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e),t)}getAsJsonNode(e){const t=this.buildProperties(e),r={[l.CedarModel.order]:e.getChildrenInfo().getChildrenNames(),[l.CedarModel.propertyLabels]:e.getChildrenInfo().getPropertyLabelMap(e),[l.CedarModel.propertyDescriptions]:e.getChildrenInfo().getPropertyDescriptionMap(e)};return this.behavior.outputPages()&&(r[l.CedarModel.pages]=[]),null!==e.header&&(r[l.CedarModel.header]=e.header),null!==e.footer&&(r[l.CedarModel.footer]=e.footer),e.extensions.applyJson({[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[o.JsonSchema.atType]:this.atomicWriter.write(c.CedarArtifactType.TEMPLATE),[o.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(d.JavascriptType.OBJECT),[u.TemplateProperty.title]:e.title,[u.TemplateProperty.description]:e.description,[l.CedarModel.ui]:r,[o.JsonSchema.properties]:t,[o.JsonSchema.required]:[...s.JsonTemplateContent.REQUIRED_PARTIAL,...e.getChildrenInfo().getChildrenNamesForRequired()],[u.TemplateProperty.additionalProperties]:this.atomicWriter.write(e.getAdditionalProperties()),...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[o.JsonSchema.schemaVersion]:this.atomicWriter.write(i.SchemaVersion.CURRENT),...this.macroSchemaIdentifier(e),[l.CedarModel.schema]:this.atomicWriter.write(m.ArtifactSchema.CURRENT)})}}t.JsonTemplateWriter=f},9868(e,t,r){t.stringifyInstance=function(e,t,r){return n.JsonSourcePolicy.stringify(function e(t,r){const n={...t},s=new Map;for(const[o,l]of Object.entries(r.values))l instanceof a.InstanceDataAttributeValueField?s.set(o,t[o]):l instanceof i.InstanceDataContainer?n[o]=e(t[o],l):Array.isArray(l)&&Array.isArray(t[o])&&(n[o]=t[o].map((t,r)=>l[r]instanceof i.InstanceDataContainer?e(t,l[r]):t));const o=Object.keys(r.values),l=new Set([...o,...[...s.values()].flat()]),c=Object.keys(n).filter(e=>!l.has(e)),d=o.flatMap(e=>[e,...s.get(e)??[]]).filter(e=>Object.hasOwn(n,e)),u=c.findIndex(e=>"_annotations"===e||"@context"===e);return c.splice(u<0?c.length:u,0,...d),new Proxy(n,{ownKeys:()=>c})}(e,t),r)};const n=r(5904),i=r(7723),a=r(9327)},8972(e,t,r){t.stringifySchema=function(e,t){return n.JsonSourcePolicy.stringify(function e(t){if(Array.isArray(t))return t.map(e);if(!s(t)||i.ExactDecimal.isExact(t))return t;const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,e(r)])),n=r._ui,o=s(n)?n.order:void 0;if(Array.isArray(o)&&o.every(e=>"string"==typeof e)&&s(n)&&s(r.properties)){const e=new Set(o),t=r.properties;r.properties=a(t,[...Object.keys(t).filter(t=>!e.has(t)),...o]);const i=t["@context"];s(i)&&s(i.properties)&&(i.properties=a(i.properties,[...Object.keys(i.properties).filter(t=>!e.has(t)),...o]));for(const e of["propertyLabels","propertyDescriptions"]){const t=n[e];s(t)&&(n[e]=a(t,o))}}return r}(e),t)};const n=r(5904),i=r(2108);function a(e,t){const r=[...new Set([...t.filter(t=>Object.hasOwn(e,t)),...Object.keys(e)])];return new Proxy(e,{ownKeys:()=>r})}function s(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}},5359(e,t,r){t.CedarYamlWriters=void 0;const n=r(4869),i=r(1933),a=r(8354),s=r(2418),o=r(9184),l=r(2395),c=r(7432),d=r(6116),u=r(2342),m=r(2287),p=r(836),h=r(7436),f=r(7594),y=r(1784),T=r(6082),g=r(4935),E=r(6314),C=r(1903),I=r(5251),A=r(1521),b=r(1038),R=r(3292),v=r(9821),S=r(4500),_=r(3080),N=r(8136),w=r(9535),L=r(1181),F=r(765),V=r(3671),O=r(9532),x=r(4647),D=r(9411),M=r(9326),P=r(491),U=r(4355),B=r(5587),Y=r(6557),J=r(4077),k=r(3711),K=r(6967);class W{behavior;yamlDynamicFieldWriters;yamlStaticFieldWriters;yamlValueConstraintsWriters;yamlAtomicWriter;yamlAnnotationsWriter;yamlTemplateWriter;yamlTemplateElementWriter;yamlTemplateInstanceWriter;constructor(e){this.behavior=e,this.yamlAtomicWriter=new u.YamlAtomicWriter(e),this.yamlAnnotationsWriter=new m.YamlAnnotationsWriter(e),this.yamlTemplateWriter=i.YamlTemplateWriter.getFor(e,this),this.yamlTemplateElementWriter=I.YamlTemplateElementWriter.getFor(e,this),this.yamlTemplateInstanceWriter=M.YamlTemplateInstanceWriter.getFor(e,this),this.yamlDynamicFieldWriters=new Map([[n.CedarFieldType.TEXT,new d.YamlFieldWriterTextField(e,this)],[n.CedarFieldType.TEXTAREA,new p.YamlFieldWriterTextArea(e,this)],[n.CedarFieldType.CONTROLLED_TERM,new w.YamlFieldWriterControlledTerm(e,this)],[n.CedarFieldType.PHONE_NUMBER,new v.YamlFieldWriterPhoneNumber(e,this)],[n.CedarFieldType.EMAIL,new b.YamlFieldWriterEmail(e,this)],[n.CedarFieldType.LINK,new y.YamlFieldWriterLink(e,this)],[n.CedarFieldType.EXT_ROR,new P.YamlFieldWriterExtRor(e,this)],[n.CedarFieldType.EXT_ORCID,new U.YamlFieldWriterExtOrcid(e,this)],[n.CedarFieldType.EXT_PFAS,new B.YamlFieldWriterExtPfas(e,this)],[n.CedarFieldType.EXT_PUBMED,new Y.YamlFieldWriterExtPubmed(e,this)],[n.CedarFieldType.EXT_RRID,new J.YamlFieldWriterExtRrid(e,this)],[n.CedarFieldType.EXT_NIH_GRANT_ID,new k.YamlFieldWriterExtNihGrantId(e,this)],[n.CedarFieldType.EXT_DOI,new K.YamlFieldWriterExtDoi(e,this)],[n.CedarFieldType.NUMERIC,new R.YamlFieldWriterNumeric(e,this)],[n.CedarFieldType.TEMPORAL,new h.YamlFieldWriterTemporal(e,this)],[n.CedarFieldType.RADIO,new N.YamlFieldWriterRadio(e,this)],[n.CedarFieldType.CHECKBOX,new S.YamlFieldWriterCheckbox(e,this)],[n.CedarFieldType.SINGLE_SELECT_LIST,new _.YamlFieldWriterList(e,this)],[n.CedarFieldType.MULTIPLE_SELECT_LIST,new _.YamlFieldWriterList(e,this)],[n.CedarFieldType.ATTRIBUTE_VALUE,new A.YamlFieldWriterAttributeValue(e,this)]]),this.yamlStaticFieldWriters=new Map([[n.CedarFieldType.STATIC_PAGE_BREAK,new f.YamlFieldWriterStaticPageBreak(e,this)],[n.CedarFieldType.STATIC_SECTION_BREAK,new T.YAMLFieldWriterStaticSectionsBreak(e,this)],[n.CedarFieldType.STATIC_IMAGE,new g.YamlFieldWriterStaticImage(e,this)],[n.CedarFieldType.STATIC_RICH_TEXT,new E.YamlFieldWriterStaticRichText(e,this)],[n.CedarFieldType.STATIC_YOUTUBE,new C.YamlFieldWriterStaticYoutube(e,this)]]),this.yamlValueConstraintsWriters=new Map([[a.ControlledTermOntology.className,new L.YamlValueConstraintsOntologyWriter(e,this)],[s.ControlledTermClass.className,new F.YamlValueConstraintsClassWriter(e,this)],[o.ControlledTermBranch.className,new V.YamlValueConstraintsBranchWriter(e,this)],[l.ControlledTermValueSet.className,new O.YamlValueConstraintsValueSetWriter(e,this)],[c.ControlledTermAction.className,new x.YamlValueConstraintsActionWriter(e,this)]])}static getStrict(){return new W(D.YamlWriterBehavior.STRICT)}static getFor(e){return new W(e)}getFieldWriterForType(e){let t;if(t=e.isStaticField?this.yamlStaticFieldWriters.get(e):this.yamlDynamicFieldWriters.get(e),t)return t;throw new Error(`No YAML writer found for field type: ${e.getValue()}`)}getFieldWriterForField(e){return this.getFieldWriterForType(e.cedarFieldType)}getAtomicWriter(){return this.yamlAtomicWriter}getAnnotationsWriter(){return this.yamlAnnotationsWriter}getTemplateWriter(){return this.yamlTemplateWriter}getTemplateElementWriter(){return this.yamlTemplateElementWriter}getTemplateInstanceWriter(){return this.yamlTemplateInstanceWriter}getWriterForValueConstraint(e){const t=e.className,r=this.yamlValueConstraintsWriters.get(t);if(r)return r;throw new Error(`No YAML writer found for class type: ${t}`)}}t.CedarYamlWriters=W},7120(e,t){t.javaPlainDecimal=function(e){if(!Number.isFinite(e))throw new RangeError("Expected a finite number");if(0===e)return"0";if(Number.isSafeInteger(e))return String(e);const t=e<0?"-":"",r=Math.abs(e),n=new DataView(new ArrayBuffer(8));n.setFloat64(0,r);const i=n.getBigUint64(0),a=Number(i>>52n&2047n),s=i&(1n<<52n)-1n|(a?1n<<52n:0n),o=a?a-1075:-1074,l=s.toString(2).length,c=o+l-1;let d=s,u=1n;if(o>=0?d<<=BigInt(o):u<<=BigInt(-o),c<=62&&d%u===0n){let e=d/u;const r=c>l?(1n<<BigInt(c-l-1)).toString().length-1:0,n=10n**BigInt(r);return e=(e+n/2n)/n*n,t+String(e)}let m=Math.floor(.289529654*(Number(s)/2**(l-1)-1.5)+.176091259+.301029995663981*c),p=d,h=u;m>=0?h*=10n**BigInt(m):p*=10n**BigInt(-m);const f=o-1-(0n==(s&s-1n)?1:0);let y=1n,T=1n;function g(e,t){for(;t;)[e,t]=[t,e%t];return e}f>=0?y<<=BigInt(f):T<<=BigInt(-f),m>=0?T*=10n**BigInt(m):y*=10n**BigInt(-m);let E=h/g(h,T)*T;function C(e){let t=0;for(;0n==(1n&e);)e>>=1n,t++;return t}function I(e){return 0===e?0:e<27?(5n**BigInt(e)).toString(2).length:3*e}p*=E/h,y*=E/T,h=E,E=g(g(p,h),y),p/=E,h/=E,y/=E;const A=l-C(s)+C(p)+I(Math.max(0,-m)),b=C(h)+1+I(Math.max(0,m)+1),R=A<32&&b<32?32:A<64&&b<64?64:0,v=e=>R?BigInt.asIntN(R,e):e,S=10n*h;let _=0n,N=0,w=!0;for(;;){const e=p/h;p=p%h*10n,y=v(10n*y);let t=y<=0n||p<y,r=y<=0n||(R?v(p+y)>S:p+y>=S);if(w&&0n===e&&!r?m--:(_=10n*_+e,N++),w&&(m<-3||m>=8)&&(t=!1,r=!1),w=!1,t||r){const e=v(v(2n*p)-S);r&&(!t||e>0n||0n===e&&_%2n==1n)&&_++;break}}let L=String(_);const F=m-N+1;if(F>=0)return t+L+"0".repeat(F);const V=L.length+F;return L=V>0?L.slice(0,V)+"."+L.slice(V):"0."+"0".repeat(-V)+L,t+L.replace(/\.?0+$/,"")}},6574(e,t,r){var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),s=0;s<r.length;s++)"default"!==r[s]&&i(t,e,r[s]);return a(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleYamlSerializer=void 0;const o=r(2108),l=r(7120),c=s(r(3198)),d=r(1100),u={blockQuote:"literal",doubleQuotedMinMultiLineLength:1e9,lineWidth:0,minContentWidth:0,defaultStringType:"QUOTE_DOUBLE",defaultKeyType:"PLAIN",doubleQuotedAsJSON:!0},m=new Map([[0,"0"],[7,"a"],[8,"b"],[9,"t"],[10,"n"],[11,"v"],[12,"f"],[13,"r"],[27,"e"],[34,'"'],[92,"\\"],[133,"N"],[160,"_"],[8232,"L"],[8233,"P"]]);function p(e){let t='"';for(const r of e){const e=r.codePointAt(0),n=m.get(e);t+=void 0!==n?"\\"+n:e<32||e>=127&&e<=159?"\\x"+e.toString(16).padStart(2,"0"):e>=55296&&e<=57343||65534===e||65535===e?"\\u"+e.toString(16).padStart(4,"0"):r}return t+'"'}t.SimpleYamlSerializer=class{static serialize(e){const t=new WeakMap,r=new c.default.Document(e,{customTags:e=>[{tag:"tag:yaml.org,2002:float",default:!0,identify:e=>o.ExactDecimal.isExact(e),resolve:e=>o.ExactDecimal.forValue(e),stringify:e=>String(e.value)},...e.map(e=>"string"!=typeof e&&void 0===e.collection&&"tag:yaml.org,2002:str"===e.tag?{...e,stringify(r,n,i,a){const s=t.get(r);if(void 0!==s)return s;const o=e.stringify(r,n,i,a);return o.startsWith('"')?p(String(r.value)):o}}:"string"==typeof e||void 0!==e.collection||"tag:yaml.org,2002:float"!==e.tag&&"tag:yaml.org,2002:int"!==e.tag?e:{...e,stringify:(t,r,n,i)=>"number"==typeof t.value&&Number.isFinite(t.value)?(0,l.javaPlainDecimal)(t.value):e.stringify(t,r,n,i)})]});return(0,c.visit)(r,{Scalar(e,r,n){if("key"===e&&"string"==typeof r.value){const e=(0,d.yamlKeyNeedsQuoting)(r.value);r.type=e?c.Scalar.QUOTE_DOUBLE:c.Scalar.PLAIN,r.value.length>=128&&(t.set(r,e?p(r.value):r.value),r.type=c.Scalar.BLOCK_LITERAL)}else if("value"===e&&"string"==typeof r.value){const e=n.at(-1);(0,c.isPair)(e)&&(0,c.isScalar)(e.key)&&"string"==typeof e.key.value&&(0,d.mayWriteYamlValuePlain)(e.key.value,r.value)&&(r.type=c.Scalar.PLAIN)}}}),r.toString(u).trim()+"\n"}}},211(e,t,r){t.YamlAbstractArtifactWriter=void 0;const n=r(2112),i=r(8333),a=r(9517),s=r(2099),o=r(3910),l=r(1027),c=r(9129),d=r(8534),u=r(2234),m=r(9857),p=r(7661),h=r(9499),f=r(3281),y=r(6731),T=r(6591),g=r(7752),E=r(8557),C=r(2272);class I extends n.AbstractArtifactWriter{behavior;writers;atomicWriter;annotationsWriter;constructor(e,t){super(),this.behavior=e,this.writers=t,this.atomicWriter=t.getAtomicWriter(),this.annotationsWriter=t.getAnnotationsWriter()}macroNameAndDescription(e){const t=a.JsonNode.getEmpty();return e instanceof i.AbstractSchemaArtifact&&e.language!==g.Language.NULL&&(t[s.YamlKeys.language]=this.atomicWriter.write(e.language)),t[s.YamlKeys.name]=e.schema_name,""!==e.schema_description&&(t[s.YamlKeys.description]=e.schema_description),t}macroStatusAndVersion(e,t){const r=a.JsonNode.getEmpty();return t||(e.bibo_status!==o.BiboStatus.NULL&&(r[s.YamlKeys.status]=this.atomicWriter.write(e.bibo_status)),e.pav_version!==l.PavVersion.NULL&&(r[s.YamlKeys.version]=this.atomicWriter.write(e.pav_version)),r[s.YamlKeys.modelVersion]=this.atomicWriter.write(E.SchemaVersion.CURRENT)),r}macroInstanceType(e){const t=a.JsonNode.getEmpty();return e.instanceTypeSpecifications.length>0&&(t[s.YamlKeys.instanceType]=1===e.instanceTypeSpecifications.length?e.instanceTypeSpecifications[0]:[...e.instanceTypeSpecifications]),t}macroSkos(e){const t=a.JsonNode.getEmpty();return null!==e.skos_prefLabel&&(t[s.YamlKeys.prefLabel]=e.skos_prefLabel),null!==e.skos_altLabel&&e.skos_altLabel.length>0&&(t[s.YamlKeys.altLabels]=e.skos_altLabel),t}macroStandaloneFieldFlags(e){const t=a.JsonNode.getEmpty();return e.hidden&&(t[s.YamlKeys.hidden]=!0),e.continuePreviousLine&&(t[s.YamlKeys.continuePreviousLine]=!0),t}macroStandaloneFieldConfiguration(e){const t=a.JsonNode.getEmpty();return e.cedarFieldType.recordsRequirement&&(e.requiredValue&&(t[s.YamlKeys.required]=!0),e.recommendedValue&&(t[s.YamlKeys.recommended]=!0)),a.JsonNode.hasEntries(t)?{[s.YamlKeys.configuration]:t}:{}}macroValueRecommendation(e){const t=a.JsonNode.getEmpty();return(e instanceof y.ControlledTermFieldImpl||e instanceof T.TextFieldImpl)&&e.valueRecommendationEnabled&&(t[s.YamlKeys.valueRecommendation]=e.valueRecommendationEnabled),t}macroProvenance(e,t){const r=a.JsonNode.getEmpty();return t||(e.pav_createdOn!==m.IsoDate.NULL&&(r[s.YamlKeys.createdOn]=this.atomicWriter.write(e.pav_createdOn)),e.pav_createdBy!==u.CedarUser.NULL&&(r[s.YamlKeys.createdBy]=this.atomicWriter.write(e.pav_createdBy)),e.pav_lastUpdatedOn!==m.IsoDate.NULL&&(r[s.YamlKeys.modifiedOn]=this.atomicWriter.write(e.pav_lastUpdatedOn)),e.oslc_modifiedBy!==u.CedarUser.NULL&&(r[s.YamlKeys.modifiedBy]=this.atomicWriter.write(e.oslc_modifiedBy))),r}macroSchemaIdentifier(e){const t=a.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[s.YamlKeys.identifier]=e.schema_identifier),t}macroType(e){const t=a.JsonNode.getEmpty();return t[s.YamlKeys.type]=this.getYamlType(e),t}macroId(e,t=!1,r=!0){const n=a.JsonNode.getEmpty();return e.at_id===d.CedarArtifactId.NULL||t&&!r||(n[s.YamlKeys.id]=this.atomicWriter.write(e.at_id)),n}macroDerivedFrom(e,t){const r=a.JsonNode.getEmpty();return t||e.pav_derivedFrom!==d.CedarArtifactId.NULL&&(r[s.YamlKeys.derivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),r}macroIsBasedOn(e){const t=a.JsonNode.getEmpty();return e.schema_isBasedOn!==d.CedarArtifactId.NULL&&(t[s.YamlKeys.isBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e,t){const r=a.JsonNode.getEmpty();return t||e.pav_previousVersion!==d.CedarArtifactId.NULL&&(r[s.YamlKeys.previousVersion]=this.atomicWriter.write(e.pav_previousVersion)),r}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}getYamlType(e){return e instanceof f.Template?h.YamlArtifactType.TEMPLATE.getValue():e instanceof p.TemplateElement?h.YamlArtifactType.ELEMENT.getValue():e instanceof c.TemplateField?e.cedarFieldType.getYamlType().getValue():e instanceof C.TemplateInstance?h.YamlArtifactType.TEMPLATE_INSTANCE.getValue():void 0}}t.YamlAbstractArtifactWriter=I},5386(e,t,r){t.YamlAbstractContainerArtifactWriter=void 0;const n=r(8198),i=r(8878),a=r(9517),s=r(9129),o=r(211),l=r(2099),c=r(3812),d=r(9519),u=r(5692),m=r(699),p=r(513);class h extends o.YamlAbstractArtifactWriter{getChildListAsJSON(e,t){const r=a.JsonNode.getEmptyList();return e.getChildrenInfo().getChildrenNames().forEach(n=>{const i=e.getChild(n);if(null!=i){let o=a.JsonNode.getEmpty();const c=e.getChildrenInfo().get(n);if(null!==c){o[l.YamlKeys.key]=n,o=i instanceof s.TemplateField?{...o,...this.writers.getFieldWriterForType(i.cedarFieldType).getYamlAsJsonNode(i,c,t,!1)}:{...o,...this.writers.getTemplateElementWriter().getYamlAsJsonNode(i,t,!1)};const e=this.getDeploymentInfo(i,c,t);a.JsonNode.hasEntries(e)&&(o[l.YamlKeys.configuration]=e),r.push(o)}}}),r}getDeploymentInfo(e,t,r){const o=a.JsonNode.getEmpty();if(t instanceof c.AbstractDynamicChildDeploymentInfo){const n=!(e instanceof s.TemplateField)||e.cedarFieldType.recordsRequirement;t.requiredValue&&n&&(o[l.YamlKeys.required]=!0),t.hidden&&(o[l.YamlKeys.hidden]=!0),t.recommendedValue&&n&&(o[l.YamlKeys.recommended]=!0),null!==t.iri&&(r||(o[l.YamlKeys.propertyIri]=t.iri))}t instanceof c.AbstractDynamicChildDeploymentInfo||!t.hidden||(o[l.YamlKeys.hidden]=!0),null!==t.label&&t.label!==e?.schema_name&&(o[l.YamlKeys.overrideLabel]=t.label),null!==t.description&&t.description!==e?.schema_description&&(o[l.YamlKeys.overrideDescription]=t.description),t instanceof d.AbstractFieldChildDeploymentInfo&&(t.continuePreviousLine&&(o[l.YamlKeys.continuePreviousLine]=!0),t.valueRecommendationEnabled&&e instanceof s.TemplateField&&e.supportsValueRecommendation()&&(o[l.YamlKeys.valueRecommendation]=!0));const{isMultiInstance:h,minItems:f,maxItems:y}=u.WriterUtil.getMultiMinMax(e,t);let T=f;const g=y;return h&&(null===T&&(T=p.AbstractChildDeploymentInfo.defaultMinItems),e?.isMultiInstanceByDefinition()||e?.isSingleInstanceByDefinition()?t instanceof i.ChildDeploymentInfoAlwaysMultiple&&(o[l.YamlKeys.minItems]=T,null!==t.declaredMaxItems&&g!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=g)):(o[l.YamlKeys.multiple]=!0,o[l.YamlKeys.minItems]=T,null!==g&&g!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=g))),(0,m.isSizedStaticField)(e)&&(null!==e.width&&(o[l.YamlKeys.width]=e.width),null!==e.height&&(o[l.YamlKeys.height]=e.height)),o}}t.YamlAbstractContainerArtifactWriter=h},2287(e,t,r){t.YamlAnnotationsWriter=void 0;const n=r(9517),i=r(2787),a=r(3549),s=r(2099);t.YamlAnnotationsWriter=class{behavior;constructor(e){this.behavior=e}write(e){const t=n.JsonNode.getEmpty(),r=n.JsonNode.getEmpty();return null!==e&&e.getSize()>0&&(e.getAnnotationNames().forEach(t=>{const n=e.get(t);if(n instanceof i.AnnotationAtId){const e={[s.YamlKeys.id]:n.getAtId()};r[t]=e}else if(n instanceof a.AnnotationAtValue){const e={[s.YamlKeys.value]:n.getAtValue()};r[t]=e}}),t[s.YamlKeys.annotations]=r),t}}},2342(e,t,r){t.YamlAtomicWriter=void 0;const n=r(2022),i=r(4872),a=r(4531),s=r(3910);class o extends i.JsonAtomicWriter{constructor(e){super(n.JsonWriterBehavior.STRICT)}writeCedarArtifactType(e){return e.getYamlValue()}write(e){return null==e?null:e instanceof s.BiboStatus?this.writeBiboStatusYaml(e):e instanceof a.BioportalTermType?this.writeBioportalTermTypeYaml(e):super.write(e)}writeBiboStatusYaml(e){return e.getYamlValue()}writeBioportalTermTypeYaml(e){return e.getYamlValue()}}t.YamlAtomicWriter=o},1100(e,t,r){t.mayWriteYamlValuePlain=function(e,t){return(f.get(e)?.has(t)??(("version"===e||"modelVersion"===e)&&h.test(t)))&&(r=t,!(u.some(e=>e.test(r))||function(e){for(const t of e){const e=t.codePointAt(0)??0;if(9===e||13===e||e<=31&&10!==e||e>=127&&e<=160||5760===e||e>=8192&&e<=8202||8232===e||8233===e||8239===e||8287===e||12288===e||65279===e||e>=55296&&e<=57343||65534===e||65535===e)return!0}return e.startsWith(" ")||e.endsWith(" ")||e.includes(" \n")||0===e.length}(r)));var r},t.yamlKeyNeedsQuoting=function(e){return!/^[A-Za-z_](?:[A-Za-z0-9_ -]*[A-Za-z0-9_-])?$(?![\s\S])/.test(e)||/^(y|yes|n|no|true|false|on|off|null)$/i.test(e)};const n=r(8349),i=r(4531),a=r(3910),s=r(3447),o=r(7974),l=r(8588),c=r(3764),d=r(9499),u=[/^\d{4}-\d{1,2}-\d{1,2}(?:$|[Tt ])/,/^(y|Y|n|N|yes|Yes|YES|no|No|NO|on|On|ON|off|Off|OFF|true|True|TRUE|false|False|FALSE)$/,/^(null|Null|NULL|~|<<|=)$/,/^[-+]?[0-9][0-9_]*$/,/^[-+]?0[xX][0-9a-fA-F_]+$/,/^[-+]?0[bB][01_]+$/,/^[-+]?0[oO]?[0-7_]+$/,/^[-+]?[0-9_]*\.?[0-9_]+([eE][-+]?[0-9]+)?$/,/^[-+]?\.(inf|Inf|INF|nan|NaN|NAN)$/,/^[-+]?[0-9][0-9_]*(:[0-5]?[0-9])+(\.[0-9_]*)?$/];const m=new Set([...Object.values(d.YamlArtifactTypeValues),"element-instance",n.YamlValues.Controlled.class,i.BioportalTermTypeYamlValues.VALUE,n.YamlValues.Controlled.ontology,n.YamlValues.Controlled.branch,n.YamlValues.Controlled.valueSet]),p=new Set(["xsd:string","xsd:anyUri",...Object.values(l.TemporalTypeValues),...Object.values(s.NumberTypeValues),n.YamlValues.iri]),h=/^\d+\.\d+\.\d+$/,f=new Map([["type",m],["status",new Set(Object.values(a.BiboStatusYamlValues))],["datatype",p],["action",new Set(["move","delete"])],["granularity",new Set(Object.values(o.TemporalGranularityValues))],["termType",new Set(Object.values(i.BioportalTermTypeYamlValues))],["inputTimeFormat",new Set(Object.values(c.TimeFormatValues))]]);new Set([...f.keys(),"version","modelVersion"])},5251(e,t,r){t.YamlTemplateElementWriter=void 0;const n=r(9517),i=r(6574),a=r(2099),s=r(5386);class o extends s.YamlAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new o(e,t)}getYamlAsJsonNode(e,t=!1,r=!0){const i=n.JsonNode.getEmpty();null!==e.header&&(i[a.YamlKeys.header]=e.header),null!==e.footer&&(i[a.YamlKeys.footer]=e.footer);const s={...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,t,r),...this.macroStatusAndVersion(e,t),...this.macroInstanceType(e),...i,...this.macroPreviousVersion(e,t),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.macroSkos(e),...this.macroAnnotations(e)},o=this.getChildListAsJSON(e,t);return o.length>0&&(s[a.YamlKeys.children]=o),e.extensions.applyYaml(s)}getAsYamlString(e,t=!1){return i.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateElementWriter=o},5430(e,t,r){t.YamlTemplateFieldWriterInternal=void 0;const n=r(9517),i=r(936),a=r(455),s=r(2099),o=r(211),l=r(6574);class c extends o.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}getAsYamlString(e,t=!1){return l.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,a.ChildDeploymentInfo.empty(),t))}getYamlAsJsonNode(e,t=a.ChildDeploymentInfo.empty(),r=!1,n=!0){const i=this.buildUIObject(e,t),s=this.buildValueConstraintsObject(e,t);return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,n),...this.macroStatusAndVersion(e,r),...this.macroSkos(e),...i,...s,...this.macroPreviousVersion(e,r),...this.macroDerivedFrom(e,r),...this.macroProvenance(e,r),...this.macroAnnotations(e),...n?this.macroStandaloneFieldFlags(e):{},...this.macroValueRecommendation(e),...n?this.macroStandaloneFieldConfiguration(e):{}})}expandUINodeForYAML(e){return n.JsonNode.getEmpty()}expandValueConstraintsNodeForYAML(e,t,r){}buildValueConstraintsObject(e,t){const r=n.JsonNode.getEmpty();return this.expandValueConstraintsNodeForYAML(r,e,t),r}expandLiterals(e,t){const r=n.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=n.JsonNode.getEmpty();t[i.CedarModel.label]=e.label,(e.statesSelectedByDefault||e.selectedByDefault)&&(t[s.YamlKeys.selected]=e.selectedByDefault),r.push(t)}),r.length>0&&(t[s.YamlKeys.values]=r)}buildUIObject(e,t){return this.expandUINodeForYAML(e)}}t.YamlTemplateFieldWriterInternal=c},9326(e,t,r){t.YamlTemplateInstanceWriter=void 0;const n=r(3992),i=r(5588),a=r(1625),s=r(9167),o=r(9517),l=r(6574),c=r(211),d=r(7723),u=r(9327),m=r(5222),p=r(7571),h=r(4877),f=r(8193),y=r(2099),T=r(4033),g=r(3644),E="element-instance";class C extends c.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new C(e,t)}getYamlAsJsonNode(e,t=!1){return T.AttributeValueNamePolicy.assertValid(e.dataContainer),{...this.macroType(e),...this.macroNameAndDescription(e),...this.macroId(e,t,!0),...this.macroIsBasedOn(e),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.getDataTree(e,t),...this.macroAnnotations(e)}}getAsYamlString(e,t=!1){return l.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}getDataTree(e,t){const r=o.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,r,t,!0),r}serializeDataLevelInto(e,t,r,n=!1){const i=o.JsonNode.getEmpty(),a=this.getUnpackedAttributeValueGroups(e),s=new Set(Array.from(a.values()).flat());Object.keys(e.values).forEach(t=>{if(a.has(t)||s.has(t))return;const n=e.values[t];if(Array.isArray(n)){const e=o.JsonNode.getEmptyList();n.forEach((t,n)=>{const i=this.serializeCommonType(t,r);if(null!==i&&o.JsonNode.hasEntries(i))e.push(i);else if(t instanceof d.InstanceDataContainer){const n={[y.YamlKeys.type]:E};!r&&this.hasId(t.id)&&(n[y.YamlKeys.id]=t.id),e.push(n)}}),e.length>0&&(i[t]=e)}else{const e=this.serializeCommonType(n,r);null!==e&&o.JsonNode.hasEntries(e)&&(i[t]=e)}}),o.JsonNode.hasEntries(i)&&(!this.hasId(e.id)||r&&!n||(t[y.YamlKeys.id]=e.id),t[y.YamlKeys.children]=i);const l=o.JsonNode.getEmpty();this.serializeAttributeValueFields(e,l,a,n),n||!o.JsonNode.hasEntries(t)&&!o.JsonNode.hasEntries(l)||(Object.hasOwn(t,y.YamlKeys.children)||(t[y.YamlKeys.type]=E),!r&&this.hasId(e.id)&&(t[y.YamlKeys.id]=e.id)),Object.assign(t,l)}serializeAttributeValueFields(e,t,r,n){Object.keys(e.values).forEach(a=>{const s=e.values[a];if((s instanceof u.InstanceDataAttributeValueField||r.has(a))&&i.ReservedNames.yamlKeys(n?"template":"element").has(a))throw new Error(`Attribute-value field key "${a}" is reserved for CEDAR YAML metadata.`);if(s instanceof u.InstanceDataAttributeValueField){const e=o.JsonNode.getEmpty();let r=!1;Object.keys(s.values).forEach(t=>{const n=s.values[t];if(n instanceof m.InstanceDataStringAtom){const i=this.serializeAtomString(n);null!==i&&(e[t]=i,r=!0)}}),r&&(t[a]=e)}});for(const[n,i]of r){const r=o.JsonNode.getEmpty();for(const t of i){const n=e.values[t];if(n instanceof m.InstanceDataStringAtom){const e=this.serializeAtomString(n);null!==e&&(r[t]=e)}}o.JsonNode.hasEntries(r)&&(t[n]=r)}}getUnpackedAttributeValueGroups(e){const t=new Map;for(const[r,i]of Object.entries(e.values)){if(!Array.isArray(i))continue;const e=i.filter(e=>e instanceof g.InstanceDataAttributeValueFieldName).map(e=>e.name).filter(e=>!n.TextPolicy.isBlank(e));e.length>0&&t.set(r,e)}return t}serializeCommonType(e,t){let r=this.serializeCommonTypeWithoutNotation(e,t);if("notation"in e&&null!==e.notation){const t=r??o.JsonNode.getEmpty();t[y.YamlKeys.notation]=e.notation,r=t}if("preferredLabel"in e&&null!==e.preferredLabel){const t=r??o.JsonNode.getEmpty();t[y.YamlKeys.prefLabel]=e.preferredLabel,r=t}return null!==r&&"language"in e&&null!==e.language&&(r[y.YamlKeys.language]=e.language),r}serializeCommonTypeWithoutNotation(e,t){if(e instanceof a.InstanceDataNotationAtom)return null===e.type?o.JsonNode.getEmpty():{[y.YamlKeys.datatype]:e.type};if(e instanceof m.InstanceDataStringAtom)return this.serializeAtomString(e);if(e instanceof h.InstanceDataTypedAtom)return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[y.YamlKeys.datatype]:e.type,[y.YamlKeys.value]:e.value,...null===e.label?{}:{[y.YamlKeys.label]:e.label}};if(e instanceof s.InstanceDataLabelAtom)return{...null===e.type?{}:{[y.YamlKeys.datatype]:e.type},[y.YamlKeys.label]:e.label};if(e instanceof f.InstanceDataControlledAtom){const t=o.JsonNode.getEmpty();return null===e.type||!this.hasId(e.id)&&null===e.label&&null===e.notation||(t[y.YamlKeys.datatype]=e.type),this.hasId(e.id)&&(t[y.YamlKeys.id]=e.id),null!==e.label&&(t[y.YamlKeys.label]=e.label),o.JsonNode.hasEntries(t)?t:null}if(e instanceof p.InstanceDataLinkAtom)return this.serializeAtomLink(e);if(e instanceof d.InstanceDataContainer){const r=o.JsonNode.getEmpty();return this.serializeDataLevelInto(e,r,t),r}return null}serializeAtomString(e){return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[y.YamlKeys.value]:e.value,...null===e.label?{}:{[y.YamlKeys.label]:e.label}}}serializeAtomLink(e){return this.hasId(e.id)?{...null===e.type?{}:{[y.YamlKeys.datatype]:e.type},[y.YamlKeys.id]:e.id}:null!==e.notation&&null!==e.type?{[y.YamlKeys.datatype]:e.type}:null}hasId(e){return null!==e&&""!==e}}t.YamlTemplateInstanceWriter=C},1933(e,t,r){t.YamlTemplateWriter=void 0;const n=r(9517),i=r(6574),a=r(2099),s=r(5386);class o extends s.YamlAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new o(e,t)}getYamlAsJsonNode(e,t=!1){const r=n.JsonNode.getEmpty();null!==e.header&&(r[a.YamlKeys.header]=e.header),null!==e.footer&&(r[a.YamlKeys.footer]=e.footer);const i={...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,t,!0),...this.macroStatusAndVersion(e,t),...this.macroInstanceType(e),...r,...this.macroPreviousVersion(e,t),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.macroAnnotations(e)},s=this.getChildListAsJSON(e,t);return s.length>0&&(i[a.YamlKeys.children]=s),e.extensions.applyYaml(i)}getAsYamlString(e,t=!1){return i.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateWriter=o},1641(e,t,r){t.AbstractArtifactBuilder=void 0;const n=r(4443),i=r(8333),a=r(2763),s=r(9857),o=r(2234),l=r(1027),c=r(3910),d=r(8534),u=r(8557);class m{at_id=d.CedarArtifactId.NULL;title=null;description=null;schema_schemaVersion=u.SchemaVersion.CURRENT;pav_createdOn=s.IsoDate.NULL;pav_createdBy=o.CedarUser.NULL;pav_lastUpdatedOn=s.IsoDate.NULL;oslc_modifiedBy=o.CedarUser.NULL;extensions=new n.SchemaExtensions;withExtensions(e){return this.extensions=e,this}pav_version=l.PavVersion.DEFAULT;bibo_status=c.BiboStatus.DRAFT;schema_name=null;schema_description="";schema_identifier=null;pav_derivedFrom=d.CedarArtifactId.NULL;withAtId(e){return e instanceof d.CedarArtifactId?this.at_id=e:this.at_id=d.CedarArtifactId.forValue(e),this}withTitle(e){return this.title=e,this}withDescription(e){return this.description=e,this}withSchemaVersion(e){return this.schema_schemaVersion=e,this}withCreatedOn(e){return e instanceof s.IsoDate?this.pav_createdOn=e:this.pav_createdOn=s.IsoDate.forValue(e),this}withCreatedBy(e){return e instanceof o.CedarUser?this.pav_createdBy=e:this.pav_createdBy=o.CedarUser.forValue(e),this}withLastUpdatedOn(e){return e instanceof s.IsoDate?this.pav_lastUpdatedOn=e:this.pav_lastUpdatedOn=s.IsoDate.forValue(e),this}withModifiedBy(e){return e instanceof o.CedarUser?this.oslc_modifiedBy=e:this.oslc_modifiedBy=o.CedarUser.forValue(e),this}withVersion(e){return e instanceof l.PavVersion?this.pav_version=e:this.pav_version=l.PavVersion.forValue(e),this}withStatus(e){return e instanceof c.BiboStatus?this.bibo_status=e:this.bibo_status=c.BiboStatus.forJsonValue(e),this}withSchemaName(e){return this.schema_name=e,this}withSchemaDescription(e){return this.schema_description=e??"",this}withDerivedFrom(e){return this.pav_derivedFrom=e,this}withSchemaIdentifier(e){return this.schema_identifier=e,this}buildInternal(e){if(e.at_id=this.at_id,e.title=this.title,e.description=this.description,e.schema_schemaVersion=this.schema_schemaVersion,e.pav_createdOn=this.pav_createdOn,e.pav_createdBy=this.pav_createdBy,e.pav_lastUpdatedOn=this.pav_lastUpdatedOn,e.oslc_modifiedBy=this.oslc_modifiedBy,e.extensions=this.extensions,e.pav_version=this.pav_version,e.bibo_status=this.bibo_status,e.schema_name=this.schema_name,e.schema_description=this.schema_description,e.schema_identifier=this.schema_identifier,e.pav_derivedFrom=this.pav_derivedFrom,null===e.title&&null!==e.schema_name){const t=m.kindOf(e.cedarArtifactType);null!==t&&(e.title=(0,i.internalNameFor)(e.schema_name,t))}}static kindOf(e){return e===a.CedarArtifactType.TEMPLATE?"template":e===a.CedarArtifactType.TEMPLATE_ELEMENT?"element":e===a.CedarArtifactType.TEMPLATE_FIELD||e===a.CedarArtifactType.STATIC_TEMPLATE_FIELD?"field":null}}t.AbstractArtifactBuilder=m},2674(e,t,r){t.AbstractArtifact=void 0;const n=r(9857),i=r(2234),a=r(8534),s=r(2763);t.AbstractArtifact=class{at_id=a.CedarArtifactId.NULL;pav_createdOn=n.IsoDate.NULL;pav_createdBy=i.CedarUser.NULL;pav_lastUpdatedOn=n.IsoDate.NULL;oslc_modifiedBy=i.CedarUser.NULL;pav_derivedFrom=a.CedarArtifactId.NULL;schema_name=null;schema_description="";cedarArtifactType=s.CedarArtifactType.NULL;annotations=null}},5451(e,t,r){t.AbstractContainerArtifact=void 0;const n=r(8333),i=r(1492),a=r(3746),s=r(2763),o=r(4869),l=r(5588),c=r(4563);class d extends n.AbstractSchemaArtifact{childrenInfo=new i.ContainerArtifactChildrenInfo;childMap=new Map;instanceTypes=[];get instanceTypeSpecifications(){return[...this.instanceTypes]}set instanceTypeSpecifications(e){if(!Array.isArray(e)||e.some(e=>"string"!=typeof e||!/^[a-z][a-z0-9+.-]*:\S+$/i.test(e))||new Set(e).size!==e.length)throw new Error("Instance types must be unique absolute IRIs");this.instanceTypes=[...e]}get instanceTypeSpecification(){return this.instanceTypeSpecifications[0]??null}set instanceTypeSpecification(e){this.instanceTypeSpecifications=null===e?[]:[e]}addChild(e,t){d.refuseReservedChildName(this,e,t.name),this.childrenInfo.add(t),this.childMap.set(t.name,e)}static refuseReservedChildName(e,t,r){if(c.JavaStrings.isBlank(r))throw new Error("A child key must not be blank.");const n=t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD&&t.cedarFieldType===o.CedarFieldType.ATTRIBUTE_VALUE,i=e.cedarArtifactType===s.CedarArtifactType.TEMPLATE?"template":"element";if(n?l.ReservedNames.isReservedAttributeValueFieldName(r,i):l.ReservedNames.isReservedName(r))throw new Error(`Child name "${r}" is reserved for CEDAR instance metadata.`)}getChildrenInfo(){return this.childrenInfo}getAdditionalProperties(){return this.childrenInfo.hasAttributeValue()?a.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE:a.AdditionalProperties.FALSE}getChild(e){return this.childMap.get(e)??null}getElement(e){const t=this.getChild(e);return null!==t&&t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_ELEMENT?t:null}getField(e){const t=this.getChild(e);return null!==t&&t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD?t:null}getChildInfo(e){return this.childrenInfo.get(e)}}t.AbstractContainerArtifact=d},5697(e,t,r){t.AbstractInstanceArtifact=void 0;const n=r(8534),i=r(2674);class a extends i.AbstractArtifact{schema_isBasedOn=n.CedarArtifactId.NULL}t.AbstractInstanceArtifact=a},8333(e,t,r){t.AbstractSchemaArtifact=void 0,t.internalNameFor=function(e,t){return`${e} ${t} schema`};const n=r(4443),i=r(1027),a=r(3910),s=r(8534),o=r(8557),l=r(2674),c=r(7752);class d extends l.AbstractArtifact{extensions=new n.SchemaExtensions;title=null;description=null;schema_schemaVersion=o.SchemaVersion.NULL;pav_version=i.PavVersion.NULL;bibo_status=a.BiboStatus.NULL;schema_identifier=null;pav_previousVersion=s.CedarArtifactId.NULL;language=c.Language.NULL}t.AbstractSchemaArtifact=d},5588(e,t,r){t.ReservedNames=void 0;const n=r(2099);class i{static INSTANCE_PROPERTIES=new Set(["schema:name","schema:description","schema:identifier","schema:isBasedOn","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","pav:derivedFrom","oslc:modifiedBy","_annotations","rdfs:label","skos:notation","skos:prefLabel","skos:altLabel"]);static OBJECT_INTERNALS=new Set(["__proto__","constructor","prototype"]);static TEMPLATE_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.name,n.YamlKeys.description,n.YamlKeys.id,n.YamlKeys.isBasedOn,n.YamlKeys.derivedFrom,n.YamlKeys.children,n.YamlKeys.annotations,n.YamlKeys.createdOn,n.YamlKeys.createdBy,n.YamlKeys.modifiedOn,n.YamlKeys.modifiedBy]);static NESTED_ELEMENT_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.id,n.YamlKeys.children]);static STANDALONE_ELEMENT_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.name,n.YamlKeys.description,n.YamlKeys.id,n.YamlKeys.children,n.YamlKeys.createdOn,n.YamlKeys.createdBy,n.YamlKeys.modifiedOn,n.YamlKeys.modifiedBy]);static requireChildName(e){if(i.isReservedName(e))throw new Error(`Child name "${e}" is reserved for CEDAR instance metadata.`)}constructor(){}static isReservedName(e){return e.startsWith("@")||i.INSTANCE_PROPERTIES.has(e)||i.OBJECT_INTERNALS.has(e)}static isReservedAttributeValueFieldName(e,t){return i.isReservedName(e)||("template"===t?i.TEMPLATE_INSTANCE_YAML_KEYS:i.STANDALONE_ELEMENT_INSTANCE_YAML_KEYS).has(e)}static yamlKeys(e){return"template"===e?i.TEMPLATE_INSTANCE_YAML_KEYS:i.NESTED_ELEMENT_INSTANCE_YAML_KEYS}}t.ReservedNames=i},4443(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaExtensions=void 0;const r=new Set(["xsd","pav","bibo","oslc","schema","skos","rdfs","_annotations"]);function n(e){return/^[A-Za-z_][A-Za-z0-9_-]*$/.test(e)&&!r.has(e)}function i(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function a(e){return Array.isArray(e)?e.map(a):i(e)?Object.fromEntries(Object.keys(e).sort().map(t=>[t,a(e[t])])):e}class s{namespaces;values;constructor(e={},t={}){for(const[t,r]of Object.entries(e))if(!n(t)||"string"!=typeof r||!/^[A-Za-z][A-Za-z0-9+.-]*:[^\s]*$/.test(r))throw new Error(`Invalid schema extension prefix: ${t}`);for(const r of Object.keys(t)){const t=r.indexOf(":");if(t<1||t===r.length-1||!Object.hasOwn(e,r.slice(0,t)))throw new Error(`Unbound schema extension property: ${r}`)}this.namespaces=a(e),this.values=a(t)}get prefixes(){return{...this.namespaces}}get properties(){return a(this.values)}get isEmpty(){return 0===Object.keys(this.namespaces).length&&0===Object.keys(this.values).length}static fromJson(e){const t=i(e["@context"])?e["@context"]:{},r=Object.fromEntries(Object.entries(t).filter(([e,t])=>n(e)&&"string"==typeof t)),a=Object.fromEntries(Object.entries(e).filter(([e])=>{const t=e.indexOf(":");return t>0&&Object.hasOwn(r,e.slice(0,t))}));return new s(r,a)}static fromYaml(e){if(!Object.hasOwn(e,"extensions"))return new s;const t=e.extensions;if(!i(t)||2!==Object.keys(t).length||!i(t.prefixes)||!i(t.properties))throw new Error("extensions requires prefixes and properties objects");return new s(t.prefixes,t.properties)}applyJson(e){return e["@context"]={...e["@context"],...this.prefixes},Object.assign(e,this.properties),e}applyYaml(e){return this.isEmpty||(e.extensions={prefixes:this.prefixes,properties:this.properties}),e}}t.SchemaExtensions=s},4257(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateValueValidator=void 0;const n=r(6830),i=r(7092),a=r(3281),s=r(7661),o=r(9129),l=r(3939),c=r(3812);t.TemplateValueValidator=class{static validate(e){if(e instanceof a.Template||e instanceof s.TemplateElement||e instanceof o.TemplateField){const t=[];return this.visitModel(e,"",t),i.ValidationPolicy.summarize(t,"template")}return i.ValidationPolicy.summarize([i.ValidationPolicy.finding("valueShape","","Expected a template, element or field definition.")],"template")}static visitModel(e,t,r){if(e instanceof o.TemplateField)this.visit((0,l.validationFieldSchema)(e,!0),t,r);else if(e instanceof a.Template||e instanceof s.TemplateElement)for(const n of e.getChildrenInfo().getChildrenNames()){const a=e.getChildInfo(n),s=e.getChild(n);let o=i.ValidationPolicy.child(t+"/properties",n);a?.isMultiInAnyWay()&&(a instanceof c.AbstractDynamicChildDeploymentInfo&&null!=a.minItems&&null!=a.maxItems&&a.minItems>a.maxItems&&r.push(i.ValidationPolicy.finding("templateConstraint",o+"/maxItems","Minimum occurrence count exceeds maximum.")),o+="/items"),s&&this.visitModel(s,o,r)}}static validateSource(e){const t=[];return this.visit(e,"",t),i.ValidationPolicy.summarize(t,"template")}static visit(e,t,r){if(!e||"object"!=typeof e||Array.isArray(e))return void r.push(i.ValidationPolicy.finding("valueShape",t,"A definition must be an object."));const a=e;if("array"===a.type)return null!=a.minItems&&null!=a.maxItems&&a.minItems>a.maxItems&&r.push(i.ValidationPolicy.finding("templateConstraint",t+"/maxItems","Minimum occurrence count exceeds maximum.")),void this.visit(a.items,t+"/items",r);if(a._ui?.inputType){r.push(...n.FieldValuePolicy.validateConfiguration(a,t),...n.FieldValuePolicy.validateDefault(a,t));const e=a._valueConstraints?.defaultValue;if(null!=e&&""!==e&&(n.FieldValuePolicy.isControlled(a)||n.FieldValuePolicy.authorityTypes.has(a._ui.inputType))){const s=t+"/_valueConstraints/defaultValue"+(n.FieldValuePolicy.isControlled(a)&&"object"==typeof e?"/termUri":"");r.push(i.ValidationPolicy.finding("semanticNotChecked",s,"Default identifier membership or existence has not been verified.","notChecked"))}return}for(const[e,n]of Object.entries(a.properties??{})){const a="array"===n?.type?n.items:n;a&&"object"==typeof a&&a._ui&&this.visit(n,i.ValidationPolicy.child(t+"/properties",e),r)}}}},2787(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationAtId=void 0,t.AnnotationAtId=class{name;id;constructor(e,t){this.name=e,this.id=t}getName(){return this.name}getAtId(){return this.id}}},3549(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationAtValue=void 0,t.AnnotationAtValue=class{name;value;constructor(e,t){this.name=e,this.value=t}getName(){return this.name}getAtValue(){return this.value}}},5226(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Annotations=void 0,t.Annotations=class{annotations=new Map;add(e){this.annotations.set(e.getName(),e)}getSize(){return this.annotations.size}getAnnotationNames(){return Array.from(this.annotations.keys())}get(e){return this.annotations.has(e)?this.annotations.get(e):null}}},936(e,t){t.CedarModel=void 0,t.CedarModel=class{static ui="_ui";static schema="$schema";static order="order";static inputType="inputType";static type="type";static items="items";static valueConstraints="_valueConstraints";static requiredValue="requiredValue";static defaultValue="defaultValue";static minItems="minItems";static maxItems="maxItems";static minLength="minLength";static maxLength="maxLength";static numberType="numberType";static temporalType="temporalType";static temporalGranularity="temporalGranularity";static timezoneEnabled="timezoneEnabled";static inputTimeFormat="inputTimeFormat";static unitOfMeasure="unitOfMeasure";static minValue="minValue";static maxValue="maxValue";static decimalPlace="decimalPlace";static content="_content";static size="_size";static width="width";static height="height";static regex="regex";static pages="pages";static header="header";static footer="footer";static ontologies="ontologies";static valueSets="valueSets";static classes="classes";static branches="branches";static actions="actions";static multipleChoice="multipleChoice";static literals="literals";static label="label";static selectedByDefault="selectedByDefault";static propertyDescriptions="propertyDescriptions";static propertyLabels="propertyLabels";static skosPrefLabel="skos:prefLabel";static skosAltLabel="skos:altLabel";static skosNotation="skos:notation";static format="format";static enum="enum";static annotations="_annotations";static propertyIriPrefix="https://schema.metadatacenter.org/properties/";static ValueConstraints=class{static acronym="acronym";static name="name";static uri="uri";static numTerms="numTerms";static label="label";static source="source";static type="type";static termType="termType";static prefLabel="prefLabel";static maxDepth="maxDepth";static vsCollection="vsCollection";static termUri="termUri";static sourceUri="sourceUri";static iri="iri";static sourceSystem="sourceSystem";static version="version";static versionId="id";static versionEffectiveDate="effectiveDate";static versionDeclaredVersion="declaredVersion";static action="action";static to="to";static recommendedValue="recommendedValue"};static Ui=class{static hidden="hidden";static continuePreviousLine="continuePreviousLine";static valueRecommendationEnabled="valueRecommendationEnabled"}}},2733(e,t){t.JsonSchema=void 0,t.JsonSchema=class{static skosNotation="skos:notation";static properties="properties";static required="required";static atContext="@context";static atId="@id";static atType="@type";static atValue="@value";static atLanguage="@language";static schemaIsBasedOn="schema:isBasedOn";static schemaName="schema:name";static schemaDescription="schema:description";static schemaVersion="schema:schemaVersion";static schemaIdentifier="schema:identifier";static pavDerivedFrom="pav:derivedFrom";static pavPreviousVersion="pav:previousVersion";static pavCreatedOn="pav:createdOn";static pavCreatedBy="pav:createdBy";static pavLastUpdatedOn="pav:lastUpdatedOn";static oslcModifiedBy="oslc:modifiedBy";static pavVersion="pav:version";static biboStatus="bibo:status";static rdfsLabel="rdfs:label";static termUri="termUri";static enum="enum";static oneOf="oneOf";static type="type";static items="items"}},4216(e,t){t.NonStandardDatatype=void 0,t.NonStandardDatatype=class{static IRI="iri"}},5747(e,t){t.TemplateProperty=void 0,t.TemplateProperty=class{static title="title";static description="description";static additionalProperties="additionalProperties"}},2099(e,t){t.YamlKeys=void 0,t.YamlKeys=class{static notation="notation";static id="id";static type="type";static name="name";static description="description";static modelVersion="modelVersion";static status="status";static version="version";static language="language";static label="label";static prefLabel="prefLabel";static altLabels="altLabels";static datatype="datatype";static valueRecommendation="valueRecommendation";static required="required";static recommended="recommended";static hidden="hidden";static continuePreviousLine="continuePreviousLine";static propertyIri="propertyIri";static overrideLabel="overrideLabel";static overrideDescription="overrideDescription";static default="default";static minLength="minLength";static maxLength="maxLength";static regex="regex";static identifier="identifier";static derivedFrom="derivedFrom";static previousVersion="previousVersion";static createdOn="createdOn";static createdBy="createdBy";static modifiedOn="modifiedOn";static modifiedBy="modifiedBy";static isBasedOn="isBasedOn";static instanceType="instanceType";static annotations="annotations";static value="value";static granularity="granularity";static inputTimeZone="inputTimeZone";static inputTimeFormat="inputTimeFormat";static header="header";static footer="footer";static children="children";static multiple="multiple";static minItems="minItems";static maxItems="maxItems";static content="content";static height="height";static width="width";static key="key";static minValue="minValue";static maxValue="maxValue";static decimalPlaces="decimalPlaces";static unit="unit";static multipleChoice="multipleChoice";static values="values";static selected="selected";static actions="actions";static action="action";static configuration="configuration";static Controlled=class{static sourceSystem="sourceSystem";static sourceAcronym="sourceAcronym";static sourceName="sourceName";static sourceIri="sourceIri";static sourceUri="sourceUri";static termIri="termIri";static termType="termType";static termLabel="termLabel";static termDisplayLabel="termDisplayLabel";static termBaseIri="termBaseIri";static termBaseLabel="termBaseLabel";static termMaxDepth="termMaxDepth";static termCount="termCount";static versionId="id";static versionEffectiveDate="effectiveDate";static versionDeclaredVersion="declaredVersion";static to="to"}}},8349(e,t){t.YamlValues=void 0,t.YamlValues=class{static id="id";static value="value";static iri="iri";static string="string";static Controlled=class{static class="class";static ontology="ontology";static valueSet="valueSet";static branch="branch"}}},513(e,t,r){t.AbstractChildDeploymentInfo=void 0;const n=r(2763),i=r(9034);t.AbstractChildDeploymentInfo=class{static defaultMinItems=0;_name;_atType=n.CedarArtifactType.NULL;_uiInputType=i.UiInputType.NULL;_label=null;_description=null;constructor(e){this._name=e}get name(){return this._name}hasParent(){return""!==this._name}get atType(){return this._atType}set atType(e){this._atType=e}get uiInputType(){return this._uiInputType}set uiInputType(e){this._uiInputType=e}get label(){return this._label}set label(e){this._label=e}get description(){return this._description}set description(e){this._description=e}get hidden(){return!1}}},6910(e,t,r){t.AbstractChildDeploymentInfoBuilder=void 0;const n=r(2763),i=r(9034),a=r(9129);t.AbstractChildDeploymentInfoBuilder=class{child=null;name="";atType=n.CedarArtifactType.NULL;uiInputType=i.UiInputType.NULL;label=null;description=null;constructor(e,t){this.child=e,this.name=t}withLabel(e){return this.label=e,this}withDescription(e){return this.description=e,this}setCommonData(e){e.label=this.label,e.description=this.description,e.atType=this.atType,e.uiInputType=this.uiInputType,null!=this.child&&(e.atType=this.child.cedarArtifactType,this.child instanceof a.TemplateField&&(e.uiInputType=this.child.cedarFieldType.getUiInputType()))}}},3812(e,t,r){t.AbstractDynamicChildDeploymentInfo=void 0;const n=r(513);class i extends n.AbstractChildDeploymentInfo{_iri=null;constructor(e){super(e)}get iri(){return this._iri}set iri(e){this._iri=e}get requiredValue(){return!1}get recommendedValue(){return!1}get minItems(){return null}get maxItems(){return null}}t.AbstractDynamicChildDeploymentInfo=i},4809(e,t,r){t.AbstractDynamicChildDeploymentInfoBuilder=void 0;const n=r(455),i=r(6910);class a extends i.AbstractChildDeploymentInfoBuilder{iri=null;constructor(e,t){super(e,t)}withIri(e){return this.iri=e,this}build(){const e=new n.ChildDeploymentInfo(this.name);return this.setCommonData(e),e}setCommonData(e){super.setCommonData(e),e.iri=this.iri}}t.AbstractDynamicChildDeploymentInfoBuilder=a},9519(e,t,r){t.AbstractFieldChildDeploymentInfo=void 0;const n=r(3812);class i extends n.AbstractDynamicChildDeploymentInfo{_hidden=!1;_requiredValue=!1;_recommendedValue=!1;_continuePreviousLine=!1;_valueRecommendationEnabled=!1;constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get requiredValue(){return this._requiredValue}set requiredValue(e){this._requiredValue=e}get recommendedValue(){return this._recommendedValue}set recommendedValue(e){this._recommendedValue=e}get continuePreviousLine(){return this._continuePreviousLine}set continuePreviousLine(e){this._continuePreviousLine=e}get valueRecommendationEnabled(){return this._valueRecommendationEnabled}set valueRecommendationEnabled(e){this._valueRecommendationEnabled=e}}t.AbstractFieldChildDeploymentInfo=i},6096(e,t,r){t.AbstractFieldChildDeploymentInfoBuilder=void 0;const n=r(9129),i=r(4809),a=r(9519);class s extends i.AbstractDynamicChildDeploymentInfoBuilder{hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueRecommendationEnabled=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}get recordsRequirement(){return!(this.child instanceof n.TemplateField)||this.child.cedarFieldType.recordsRequirement}withRequiredValue(e){return this.recordsRequirement&&(this.requiredValue=e),this}withRecommendedValue(e){return this.recordsRequirement&&(this.recommendedValue=e),this}withContinuePreviousLine(e){return this.continuePreviousLine=e,this}withValueRecommendationEnabled(e){return this.valueRecommendationEnabled=e,this}setCommonData(e){super.setCommonData(e),e instanceof a.AbstractFieldChildDeploymentInfo&&(e.hidden=this.hidden,e.requiredValue=this.requiredValue,e.recommendedValue=this.recommendedValue,e.continuePreviousLine=this.continuePreviousLine,e.valueRecommendationEnabled=this.valueRecommendationEnabled)}}t.AbstractFieldChildDeploymentInfoBuilder=s},455(e,t,r){t.ChildDeploymentInfo=void 0;const n=r(9519);class i extends n.AbstractFieldChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;_standalone=!1;static empty(){return new i("")}static standalone(){const e=new i("");return e._standalone=!0,e}constructor(e){super(e)}get multiInstance(){return this._multiInstance}set multiInstance(e){this._multiInstance=e}get minItems(){return this._minItems}set minItems(e){this._minItems=e}get maxItems(){return this._maxItems}set maxItems(e){this._maxItems=e}isMultiInAnyWay(){return this._multiInstance}isStandalone(){return this._standalone}}t.ChildDeploymentInfo=i},8878(e,t,r){t.ChildDeploymentInfoAlwaysMultiple=void 0;const n=r(513),i=r(9519);class a extends i.AbstractFieldChildDeploymentInfo{_declaredMinItems=null;_declaredMaxItems=null;static empty(){return new a("")}constructor(e){super(e)}isMultiInAnyWay(){return!0}get declaredMinItems(){return this._declaredMinItems}get declaredMaxItems(){return this._declaredMaxItems}set declaredMinItems(e){this._declaredMinItems=e}set declaredMaxItems(e){this._declaredMaxItems=e}get minItems(){return null!==this._declaredMinItems?this._declaredMinItems:this.defaultMinItems}get defaultMinItems(){return n.AbstractChildDeploymentInfo.defaultMinItems}get maxItems(){return this._declaredMaxItems}}t.ChildDeploymentInfoAlwaysMultiple=a},3239(e,t,r){t.ChildDeploymentInfoAlwaysMultipleBuilder=void 0;const n=r(8198),i=r(8878),a=r(6096),s=r(9129),o=r(4869);class l extends a.AbstractFieldChildDeploymentInfoBuilder{declaredMinItems=null;declaredMaxItems=null;constructor(e,t){super(e,t)}withMinItems(e){return this.declaredMinItems=e,this}withMaxItems(e){return this.declaredMaxItems=e,this}build(){if((0,n.assertItemBounds)(this.name,this.declaredMinItems,this.declaredMaxItems),this.child instanceof s.TemplateField&&this.child.cedarFieldType===o.CedarFieldType.ATTRIBUTE_VALUE&&null!==this.declaredMinItems&&this.declaredMinItems>0)throw new Error(`minItems must be zero in attribute-value field ${this.name}`);const e=new i.ChildDeploymentInfoAlwaysMultiple(this.name);return this.setCommonData(e),e.declaredMinItems=this.declaredMinItems,e.declaredMaxItems=this.declaredMaxItems,e}}t.ChildDeploymentInfoAlwaysMultipleBuilder=l},2266(e,t,r){t.ChildDeploymentInfoAlwaysSingle=void 0;const n=r(9519);class i extends n.AbstractFieldChildDeploymentInfo{static empty(){return new i("")}constructor(e){super(e)}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoAlwaysSingle=i},587(e,t,r){t.ChildDeploymentInfoAlwaysSingleBuilder=void 0;const n=r(2266),i=r(6096);class a extends i.AbstractFieldChildDeploymentInfoBuilder{constructor(e,t){super(e,t)}build(){const e=new n.ChildDeploymentInfoAlwaysSingle(this.name);return this.setCommonData(e),e}}t.ChildDeploymentInfoAlwaysSingleBuilder=a},3608(e,t,r){t.ChildDeploymentInfoBuilder=void 0;const n=r(8198),i=r(455),a=r(6096);class s extends a.AbstractFieldChildDeploymentInfoBuilder{multiInstance=!1;minItems=null;maxItems=null;constructor(e,t){super(e,t)}withMultiInstance(e){return this.multiInstance=e,this}withMinItems(e){return this.minItems=e,this}withMaxItems(e){return this.maxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.minItems,this.maxItems);const e=new i.ChildDeploymentInfo(this.name);return this.setCommonData(e),e.multiInstance=this.multiInstance,e.minItems=this.minItems,e.maxItems=this.maxItems,e}}t.ChildDeploymentInfoBuilder=s},4831(e,t,r){t.ChildDeploymentInfoElement=void 0;const n=r(3812);class i extends n.AbstractDynamicChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;static empty(){return new i("")}constructor(e){super(e)}get multiInstance(){return this._multiInstance}set multiInstance(e){this._multiInstance=e}get minItems(){return this._minItems}set minItems(e){this._minItems=e}get maxItems(){return this._maxItems}set maxItems(e){this._maxItems=e}isMultiInAnyWay(){return this._multiInstance}}t.ChildDeploymentInfoElement=i},6976(e,t,r){t.ChildDeploymentInfoElementBuilder=void 0;const n=r(8198),i=r(4809),a=r(4831);class s extends i.AbstractDynamicChildDeploymentInfoBuilder{multiInstance=!1;minItems=null;maxItems=null;constructor(e,t){super(e,t)}withMultiInstance(e){return this.multiInstance=e,this}withMinItems(e){return this.minItems=e,this}withMaxItems(e){return this.maxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.minItems,this.maxItems);const e=new a.ChildDeploymentInfoElement(this.name);return this.setCommonData(e),e.multiInstance=this.multiInstance,e.minItems=this.minItems,e.maxItems=this.maxItems,e}}t.ChildDeploymentInfoElementBuilder=s},3581(e,t,r){t.ChildDeploymentInfoStatic=void 0;const n=r(513);class i extends n.AbstractChildDeploymentInfo{_hidden=!1;static empty(){return new i("")}constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoStatic=i},8290(e,t,r){t.ChildDeploymentInfoStaticBuilder=void 0;const n=r(6910),i=r(3581);class a extends n.AbstractChildDeploymentInfoBuilder{hidden=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}build(){const e=new i.ChildDeploymentInfoStatic(this.name);return super.setCommonData(e),e.hidden=this.hidden,e}}t.ChildDeploymentInfoStaticBuilder=a},1492(e,t,r){t.ContainerArtifactChildrenInfo=void 0;const n=r(2763),i=r(2733),a=r(9034),s=r(3812);t.ContainerArtifactChildrenInfo=class{childNameList=[];childMap=new Map;add(e){this.childNameList.push(e.name),this.childMap.set(e.name,e)}get children(){return this.childNameList.map(e=>this.childMap.get(e))}has(e){return this.childMap.has(e)}get(e){return this.childMap.get(e)??null}getChildrenNames(){return Array.from(this.childMap.keys())}getChildrenNamesForRequiredInProperties(){const e=[];for(const[t,r]of this.childMap.entries())r.atType!==n.CedarArtifactType.STATIC_TEMPLATE_FIELD&&r.uiInputType!==a.UiInputType.ATTRIBUTE_VALUE&&e.push(t);return e}getChildrenNamesForRequired(){const e=[];for(const[t,r]of this.childMap.entries())r.atType!==n.CedarArtifactType.STATIC_TEMPLATE_FIELD&&r.uiInputType!==a.UiInputType.ATTRIBUTE_VALUE&&e.push(t);return e}getOnlyElementNamesForPropertiesContextRequired(){const e=[];for(const[t,r]of this.childMap.entries())r.atType===n.CedarArtifactType.TEMPLATE_ELEMENT&&e.push(t);return e}getPropertyLabelMap(e){const t={};return this.childNameList.forEach(e=>{const r=this.getChildInfo(e);null!==r.label&&(t[r.name]=r.label)}),t}getPropertyDescriptionMap(e){const t={};return this.childNameList.forEach(e=>{const r=this.getChildInfo(e);null!==r.description&&(t[r.name]=r.description)}),t}getChildIriMap(){return this.collectChildIris(!1)}collectChildIris(e){const t={};return this.childNameList.forEach(r=>{const i=this.getChildInfo(r);i.atType===n.CedarArtifactType.STATIC_TEMPLATE_FIELD||!e&&i.uiInputType===a.UiInputType.ATTRIBUTE_VALUE||i instanceof s.AbstractDynamicChildDeploymentInfo&&null!==i.iri&&(t[i.name]=i.iri)}),t}getChildNamesWithIri(){const e=this.getChildIriMap();return this.getChildrenNames().filter(t=>Object.prototype.hasOwnProperty.call(e,t))}getIRIMap(){const e={},t=this.collectChildIris(!0);return Object.keys(t).forEach(r=>{e[r]={[i.JsonSchema.enum]:[t[r]]}}),e}hasAttributeValue(){for(const e of this.childMap.values())if(e.uiInputType===a.UiInputType.ATTRIBUTE_VALUE)return!0;return!1}getChildInfo(e){return this.childMap.get(e)}}},8198(e,t){t.UNBOUNDED_MAX_ITEMS=void 0,t.assertItemBounds=function(e,r,n){if(null!==r&&r<0)throw new Error(`minItems must be zero or greater in ${e}`);if(null!==n&&n<0)throw new Error(`maxItems must be zero or greater in ${e}`);if(null!==r&&null!==n&&n!==t.UNBOUNDED_MAX_ITEMS&&r>n)throw new Error(`minItems must be less than or equal to maxItems in ${e}`)},t.UNBOUNDED_MAX_ITEMS=0},7661(e,t,r){t.TemplateElement=void 0;const n=r(3910),i=r(8557),a=r(1027),s=r(5451),o=r(2763),l=r(6976);class c extends s.AbstractContainerArtifact{skos_altLabel=null;skos_prefLabel=null;header=null;footer=null;constructor(){super(),this.cedarArtifactType=o.CedarArtifactType.TEMPLATE_ELEMENT}static buildEmptyWithNullValues(){return new c}static buildEmptyWithDefaultValues(){const e=new c;return e.schema_schemaVersion=i.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=a.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){return new l.ChildDeploymentInfoElementBuilder(this,e)}}t.TemplateElement=c},1762(e,t,r){t.TemplateElementBuilder=void 0;const n=r(1641),i=r(7661);class a extends n.AbstractArtifactBuilder{children=[];instanceTypeSpecification=null;withInstanceTypeSpecification(e){return this.instanceTypeSpecification=e,this}addChild(e,t){return this.children.push([e,t]),this}build(){const e=i.TemplateElement.buildEmptyWithNullValues();return super.buildInternal(e),e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateElementBuilder=a},7282(e,t){t.ChoiceOptionEntity=void 0,t.ChoiceOptionEntity=class{label;selectedByDefault;statesSelectedByDefault;constructor(e,t,r=!0){if(null==e||""===e)throw new Error("A permitted value requires a label. A choice that names nothing cannot be chosen.");this.label=e,this.selectedByDefault=t,this.statesSelectedByDefault=r}}},6145(e,t,r){t.DefaultValueSerialization=void 0;const n=r(8802),i=r(8748);t.DefaultValueSerialization=class{static literalFromNode(e,t){return i.ReaderUtil.getString(e,t)}static writeLiteral(e,t,r){null!==r&&""!==r&&(e[t]=r)}static iriFromNode(e,t){if(""===i.ReaderUtil.getString(e,t))return null;const r=i.ReaderUtil.getIdentifier(e,t);return null===r?null:new n.Iri(r)}static writeIri(e,t,r){null===r||r.isEmpty()||(e[t]=r.getValue())}}},3557(e,t,r){t.JsonValueConstraintsWriter=void 0;const n=r(3161);class i extends n.JsonAbstractArtifactWriter{}t.JsonValueConstraintsWriter=i},9129(e,t,r){t.TemplateField=void 0;const n=r(4328),i=r(4869),a=r(8333);class s extends a.AbstractSchemaArtifact{skos_altLabel=null;skos_prefLabel=null;hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueConstraints=new n.ValueConstraints;cedarFieldType=i.CedarFieldType.NULL;isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}supportsValueRecommendation(){return!1}}t.TemplateField=s},3350(e,t,r){t.TemplateFieldBuilder=void 0;const n=r(1641);class i extends n.AbstractArtifactBuilder{skos_altLabel=null;skos_prefLabel=null;withAlternateLabels(e){return this.skos_altLabel=e,this}addAlternateLabel(e){return null===this.skos_altLabel&&(this.skos_altLabel=[]),this.skos_altLabel.push(e),this}withPreferredLabel(e){return this.skos_prefLabel=e,this}buildInternal(e){super.buildInternal(e),e.skos_altLabel=this.skos_altLabel,e.skos_prefLabel=this.skos_prefLabel}}t.TemplateFieldBuilder=i},855(e,t,r){t.UnknownTemplateField=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(3608);class o extends n.TemplateField{constructor(){super(),this.cedarFieldType=i.CedarFieldType.NULL,this.cedarArtifactType=a.CedarArtifactType.NULL}static build(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoBuilder(this,e)}}t.UnknownTemplateField=o},4328(e,t){t.ValueConstraints=void 0,t.ValueConstraints=class{constructor(){}}},1902(e,t,r){t.ValueConstraintsIriField=void 0;const n=r(4328);class i extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsIriField=i},7765(e,t,r){t.ValueConstraintsLiteralField=void 0;const n=r(4328);class i extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsLiteralField=i},119(e,t,r){t.YamlValueConstraintsWriter=void 0;const n=r(211);class i extends n.YamlAbstractArtifactWriter{}t.YamlValueConstraintsWriter=i},2052(e,t,r){t.AttributeValueFieldBuilderImpl=void 0;const n=r(3350),i=r(9571);class a extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new a}build(){const e=i.AttributeValueFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.AttributeValueFieldBuilderImpl=a},9571(e,t,r){t.AttributeValueFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(4328),o=r(3239);class l extends n.TemplateField{constructor(){super(),this.cedarFieldType=i.CedarFieldType.ATTRIBUTE_VALUE,this.valueConstraints=new s.ValueConstraints,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.AttributeValueFieldImpl=l},9366(e,t,r){t.JsonFieldReaderAttributeValue=void 0;const n=r(4385),i=r(9571);class a extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const a=i.AttributeValueFieldImpl.buildEmpty();return this.readRequiredAndHidden(e,t),a}}t.JsonFieldReaderAttributeValue=a},1442(e,t,r){t.JsonFieldWriterAttributeValue=void 0;const n=r(455),i=r(2748),a=r(9517),s=r(936),o=r(5793);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}getAsJsonNode(e,t=n.ChildDeploymentInfo.standalone()){const r=super.getAsJsonNode(e,t);return t instanceof n.ChildDeploymentInfo&&t.isStandalone()?{type:"array",minItems:0,items:r}:r}expandPropertiesNode(e){}expandRequiredNode(e){}expandTypeNode(e,t){e[s.CedarModel.type]=this.atomicWriter.write(o.JavascriptType.STRING)}buildValueConstraintsObject(e){return a.JsonNode.getEmpty()}}t.JsonFieldWriterAttributeValue=l},529(e,t,r){t.YamlFieldReaderAttributeValue=void 0;const n=r(5675),i=r(9571);class a extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){return i.AttributeValueFieldImpl.buildEmpty()}}t.YamlFieldReaderAttributeValue=a},1521(e,t,r){t.YamlFieldWriterAttributeValue=void 0;const n=r(5430);class i extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}}t.YamlFieldWriterAttributeValue=i},4675(e,t,r){t.CheckboxFieldBuilderImpl=void 0;const n=r(3350),i=r(9915),a=r(9282);class s extends n.TemplateFieldBuilder{defaultValue=null;literals=[];constructor(){super()}static create(){return new s}addCheckboxOption(e,t){return this.literals.push(new i.CheckboxOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.CheckboxFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.literals=this.literals,e}}t.CheckboxFieldBuilderImpl=s},9282(e,t,r){t.CheckboxFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1489),o=r(3239);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.CHECKBOX,this.valueConstraints=new s.ValueConstraintsCheckboxField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.CheckboxFieldImpl=l},9915(e,t,r){t.CheckboxOption=void 0;const n=r(7282);class i extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.CheckboxOption=i},19(e,t,r){t.JsonFieldReaderCheckbox=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(9915),o=r(9282),l=r(6145);class c extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const c=o.CheckboxFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=d){c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(d,i.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(d,i.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,i.CedarModel.label),r=n.ReaderUtil.getBoolean(e,i.CedarModel.selectedByDefault),a=Object.hasOwn(e,i.CedarModel.selectedByDefault);if(null!=t){const e=new s.CheckboxOption(t,r,a);c.valueConstraints.literals.push(e)}})}return c}}t.JsonFieldReaderCheckbox=c},8663(e,t,r){t.JsonFieldWriterCheckbox=void 0;const n=r(936),i=r(2748),a=r(6145);class s extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=!0}}t.JsonFieldWriterCheckbox=s},1489(e,t,r){t.ValueConstraintsCheckboxField=void 0;const n=r(7765);class i extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsCheckboxField=i},7268(e,t,r){t.YamlFieldReaderCheckbox=void 0;const n=r(8748),i=r(9915),a=r(5675),s=r(2099),o=r(9282),l=r(6145);class c extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const c=o.CheckboxFieldImpl.buildEmpty();c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const d=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==d&&d.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),a=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new i.CheckboxOption(t,r,a);c.valueConstraints.literals.push(e)}}),c}}t.YamlFieldReaderCheckbox=c},4500(e,t,r){t.YamlFieldWriterCheckbox=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterCheckbox=s},9916(e,t,r){t.ControlledTermFieldBuilderImpl=void 0;const n=r(5376),i=r(3350),a=r(6731);class s extends i.TemplateFieldBuilder{valueConstraints=new n.ValueConstraintsControlledTermField;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.valueConstraints.defaultValue=e,this}addOntology(e){return this.valueConstraints.ontologies.push(e),this}addValueSet(e){return this.valueConstraints.valueSets.push(e),this}addClass(e){return this.valueConstraints.classes.push(e),this}addBranch(e){return this.valueConstraints.branches.push(e),this}addAction(e){return this.valueConstraints.actions.push(e),this}build(){const e=a.ControlledTermFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints=this.valueConstraints,e}}t.ControlledTermFieldBuilderImpl=s},6731(e,t,r){t.ControlledTermFieldImpl=void 0;const n=r(9129),i=r(5376),a=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=a.CedarFieldType.CONTROLLED_TERM,this.valueConstraints=new i.ValueConstraintsControlledTermField,this.cedarArtifactType=s.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}supportsValueRecommendation(){return!0}}t.ControlledTermFieldImpl=l},8728(e,t,r){t.JsonFieldReaderControlledTerm=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(8354),o=r(2418),l=r(9184),c=r(2395),d=r(7295),u=r(2733),m=r(7432),p=r(4531),h=r(6731),f=r(5753),y=r(4563);class T extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const s=h.ControlledTermFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const o=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);return null!=o&&(s.valueConstraints.ontologies=this.getOntologies(n.ReaderUtil.getNodeList(o,i.CedarModel.ontologies)),s.valueConstraints.classes=this.getClasses(n.ReaderUtil.getNodeList(o,i.CedarModel.classes)),s.valueConstraints.branches=this.getBranches(n.ReaderUtil.getNodeList(o,i.CedarModel.branches)),s.valueConstraints.valueSets=this.getValueSets(n.ReaderUtil.getNodeList(o,i.CedarModel.valueSets)),s.valueConstraints.defaultValue=this.getDefaultValue(n.ReaderUtil.getNodeOrNull(o,i.CedarModel.defaultValue)),s.valueConstraints.actions=this.getActions(n.ReaderUtil.getNodeList(o,i.CedarModel.actions))),s}getOntologies(e){const t=[];return e.forEach(e=>{const r=new s.ControlledTermOntology(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrNull(e,i.CedarModel.ValueConstraints.numTerms),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.uri),...T.readSourceAndVersion(e));t.push(r)}),t}getClasses(e){const t=[];return e.forEach(e=>{const r=new o.ControlledTermClass(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.label),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonValue(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.type)),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.prefLabel),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.uri),...T.readSourceAndVersion(e));t.push(r)}),t}getBranches(e){const t=[];return e.forEach(e=>{const r=new l.ControlledTermBranch(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.source),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrZero(e,i.CedarModel.ValueConstraints.maxDepth),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.uri),...T.readSourceAndVersion(e));t.push(r)}),t}getValueSets(e){const t=[];return e.forEach(e=>{const r=new c.ControlledTermValueSet(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.vsCollection),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.name),n.ReaderUtil.getNumberOrNull(e,i.CedarModel.ValueConstraints.numTerms),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.uri),...T.readSourceAndVersion(e));t.push(r)}),t}getActions(e){const t=[];return e.forEach(e=>{const r=new m.ControlledTermAction(n.ReaderUtil.getNumber(e,i.CedarModel.ValueConstraints.to),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.action),n.ReaderUtil.getIdentifierURI(e,i.CedarModel.ValueConstraints.termUri),n.ReaderUtil.getURI(e,i.CedarModel.ValueConstraints.sourceUri),n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonValue(n.ReaderUtil.getStringOrEmpty(e,i.CedarModel.ValueConstraints.type)));t.push(r)}),t}static readSourceAndVersion(e){const t=n.ReaderUtil.getURI(e,i.CedarModel.ValueConstraints.iri),r=T.readVersion(n.ReaderUtil.getNodeOrNull(e,i.CedarModel.ValueConstraints.version));return[t.isEmpty()?null:t,n.ReaderUtil.getString(e,i.CedarModel.ValueConstraints.sourceSystem),r]}static readVersion(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;const t=n.ReaderUtil.getNodeOrNull(e,i.CedarModel.ValueConstraints.versionId);if("string"!=typeof t||""===t)throw new Error(`A pinned version needs a non-empty string at "${i.CedarModel.ValueConstraints.version}.${i.CedarModel.ValueConstraints.versionId}".`);if(y.JavaStrings.isBlank(t))throw new Error(`A pinned version's id at "${i.CedarModel.ValueConstraints.version}.${i.CedarModel.ValueConstraints.versionId}" must not be blank.`);return new f.ControlledTermVersion(t,n.ReaderUtil.getString(e,i.CedarModel.ValueConstraints.versionEffectiveDate),n.ReaderUtil.getString(e,i.CedarModel.ValueConstraints.versionDeclaredVersion))}getDefaultValue(e){if(null==e)return null;const t=n.ReaderUtil.getString(e,u.JsonSchema.rdfsLabel);return Object.hasOwn(e,u.JsonSchema.termUri)||null!==t?new d.ControlledTermDefaultValue(n.ReaderUtil.getIdentifierURI(e,u.JsonSchema.termUri),t??""):null}}t.JsonFieldReaderControlledTerm=T},8280(e,t,r){t.JsonFieldWriterControlledTerm=void 0;const n=r(9517),i=r(936),a=r(2748),s=r(2733),o=r(9932);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[s.JsonSchema.properties]=o.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[s.JsonSchema.properties]=o.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}expandValueConstraintsNode(e,t,r){const a=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[i.CedarModel.ontologies]=a;const o=n.JsonNode.getEmptyList();t.valueConstraints.valueSets.forEach(e=>{o.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[i.CedarModel.valueSets]=o;const l=n.JsonNode.getEmptyList();t.valueConstraints.classes.forEach(e=>{l.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[i.CedarModel.classes]=l;const c=n.JsonNode.getEmptyList();t.valueConstraints.branches.forEach(e=>{c.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[i.CedarModel.branches]=c;const d=n.JsonNode.getEmptyList();if(t.valueConstraints.actions.forEach(e=>{d.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),d.length>0&&(e[i.CedarModel.actions]=d),null!=t.valueConstraints.defaultValue){const r=n.JsonNode.getEmpty();r[s.JsonSchema.termUri]=this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),r[s.JsonSchema.rdfsLabel]=t.valueConstraints.defaultValue.rdfsLabel,e[i.CedarModel.defaultValue]=r}super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterControlledTerm=l},5376(e,t,r){t.ValueConstraintsControlledTermField=void 0;const n=r(4328);class i extends n.ValueConstraints{defaultValue=null;ontologies=[];valueSets=[];classes=[];branches=[];actions=[];constructor(){super()}}t.ValueConstraintsControlledTermField=i},9299(e,t,r){t.YamlFieldReaderControlledTerm=void 0;const n=r(8748),i=r(7295),a=r(4531),s=r(5675),o=r(2099),l=r(8349),c=r(5491),d=r(3091),u=r(2957),m=r(1556),p=r(7733),h=r(6731),f=r(8802),y=r(5753),T=r(4563);class g extends s.YamlTemplateFieldTypeSpecificReader{read(e,t,r,s){const f=h.ControlledTermFieldImpl.buildEmpty();n.ReaderUtil.getNodeList(e,o.YamlKeys.values).forEach(e=>{const t=n.ReaderUtil.getString(e,o.YamlKeys.type);if(t===l.YamlValues.Controlled.ontology){const t=(new c.ControlledTermOntologyBuilder).withAcronym(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceName)).withUri(this.ontologyUri(e)).withNumTerms(n.ReaderUtil.getNumberOrNull(e,o.YamlKeys.Controlled.termCount));this.readSourceAndVersion(e,t),f.valueConstraints.ontologies.push(t.build())}else if(t===l.YamlValues.Controlled.class){const t=n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termLabel),r=n.ReaderUtil.getString(e,o.YamlKeys.Controlled.termDisplayLabel),i=(new d.ControlledTermClassBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termIri)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withLabel(r??t).withPrefLabel(t).withType(a.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termType)));this.readSourceAndVersion(e,i),f.valueConstraints.classes.push(i.build())}else if(t===l.YamlValues.Controlled.branch){const t=(new u.ControlledTermBranchBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termBaseIri)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceName)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termBaseLabel)).withAcronym(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withMaxDepth(n.ReaderUtil.getNumberOrZero(e,o.YamlKeys.Controlled.termMaxDepth));this.readSourceAndVersion(e,t),f.valueConstraints.branches.push(t.build())}else if(t===l.YamlValues.Controlled.valueSet){const t=(new m.ControlledTermValueSetBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termBaseIri)).withNumTerms(n.ReaderUtil.getNumberOrNull(e,o.YamlKeys.Controlled.termCount)).withVsCollection(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termBaseLabel));this.readSourceAndVersion(e,t),f.valueConstraints.valueSets.push(t.build())}});const y=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.default);if(null!==y){const e=n.ReaderUtil.getIdentifierURI(y,o.YamlKeys.value),t=n.ReaderUtil.getStringOrEmpty(y,o.YamlKeys.label);f.valueConstraints.defaultValue=new i.ControlledTermDefaultValue(e,t)}return n.ReaderUtil.getNodeList(e,o.YamlKeys.actions).forEach(e=>{const t=(new p.ControlledTermActionBuilder).withAction(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.action)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withType(a.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.type))).withTermUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termIri)).withTo(n.ReaderUtil.getNumber(e,o.YamlKeys.Controlled.to)).withSourceUri(n.ReaderUtil.getURI(e,o.YamlKeys.Controlled.sourceIri));f.valueConstraints.actions.push(t.build())}),f}ontologyUri(e){return new f.Iri(`https://data.bioontology.org/ontologies/${n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)}`)}readSourceAndVersion(e,t){const r=n.ReaderUtil.getURI(e,o.YamlKeys.Controlled.sourceIri);r.isEmpty()||t.withIri(r),t.withSourceSystem(n.ReaderUtil.getString(e,o.YamlKeys.Controlled.sourceSystem)),t.withVersion(this.readVersion(n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.version)))}readVersion(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;const t=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.Controlled.versionId);if("string"!=typeof t||""===t)throw new Error(`A pinned version needs a non-empty string at "${o.YamlKeys.version}.${o.YamlKeys.Controlled.versionId}".`);if(T.JavaStrings.isBlank(t))throw new Error(`A pinned version's id at "${o.YamlKeys.version}.${o.YamlKeys.Controlled.versionId}" must not be blank.`);return new y.ControlledTermVersion(t,n.ReaderUtil.getString(e,o.YamlKeys.Controlled.versionEffectiveDate),n.ReaderUtil.getString(e,o.YamlKeys.Controlled.versionDeclaredVersion))}}t.YamlFieldReaderControlledTerm=g},9535(e,t,r){t.YamlFieldWriterControlledTerm=void 0;const n=r(9517),i=r(5430),a=r(2099),s=r(4216);class o extends i.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return{[a.YamlKeys.datatype]:s.NonStandardDatatype.IRI}}expandValueConstraintsNodeForYAML(e,t,r){if(null!=t.valueConstraints.defaultValue){const r={[a.YamlKeys.value]:this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),[a.YamlKeys.label]:t.valueConstraints.defaultValue.rdfsLabel};e[a.YamlKeys.default]=r}const i=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.classes.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.branches.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.valueSets.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),i.length>0&&(e[a.YamlKeys.values]=i);const s=n.JsonNode.getEmptyList();t.valueConstraints.actions.forEach(e=>{s.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),s.length>0&&(e[a.YamlKeys.actions]=s)}}t.YamlFieldWriterControlledTerm=o},1524(e,t,r){t.AbstractJsonControlledTermValueConstraintWriter=void 0;const n=r(9517),i=r(3557),a=r(936);class s extends i.JsonValueConstraintsWriter{writeSourceAndVersion(e,t){null===t.iri||t.iri.isEmpty()||(e[a.CedarModel.ValueConstraints.iri]=this.atomicWriter.write(t.iri)),null!==t.sourceSystem&&(e[a.CedarModel.ValueConstraints.sourceSystem]=t.sourceSystem);const r=t.version;if(null!==r){const t=n.JsonNode.getEmpty();t[a.CedarModel.ValueConstraints.versionId]=r.id,null!==r.effectiveDate&&(t[a.CedarModel.ValueConstraints.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(t[a.CedarModel.ValueConstraints.versionDeclaredVersion]=r.declaredVersion),e[a.CedarModel.ValueConstraints.version]=t}}}t.AbstractJsonControlledTermValueConstraintWriter=s},4339(e,t,r){t.AbstractYamlControlledTermValueConstraintWriter=void 0;const n=r(9517),i=r(119),a=r(2099);class s extends i.YamlValueConstraintsWriter{writeSourceSystem(e,t){null!==t.sourceSystem&&(e[a.YamlKeys.Controlled.sourceSystem]=t.sourceSystem)}writeSourceIri(e,t){null===t.iri||t.iri.isEmpty()||(e[a.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(t.iri))}writeVersion(e,t){const r=t.version;if(null===r)return;const i=n.JsonNode.getEmpty();i[a.YamlKeys.Controlled.versionId]=r.id,null!==r.effectiveDate&&(i[a.YamlKeys.Controlled.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(i[a.YamlKeys.Controlled.versionDeclaredVersion]=r.declaredVersion),e[a.YamlKeys.version]=i}}t.AbstractYamlControlledTermValueConstraintWriter=s},2369(e,t,r){t.ControlledTermAbstractValueConstraint=void 0;const n=r(4328);class i extends n.ValueConstraints{className="ControlledTermAbstractValueConstraint";_iri;_sourceSystem;_version;constructor(e=null,t=null,r=null){super(),this._iri=e,this._sourceSystem=t,this._version=r}get iri(){return this._iri}get sourceSystem(){return this._sourceSystem}get version(){return this._version}}t.ControlledTermAbstractValueConstraint=i},7295(e,t){t.ControlledTermDefaultValue=void 0,t.ControlledTermDefaultValue=class{_termUri;_rdfsLabel;constructor(e,t){this._termUri=e,this._rdfsLabel=t}get termUri(){return this._termUri}get rdfsLabel(){return this._rdfsLabel}isControlledDefaultValue(){return!1}}},2480(e,t,r){t.ControlledTermDefaultValueBuilder=void 0;const n=r(8802),i=r(7295),a=r(3539);t.ControlledTermDefaultValueBuilder=class{termUri=n.Iri.empty();rdfsLabel="";withTermUri(e){return this.termUri=e,this}withRdfsLabel(e){return this.rdfsLabel=e,this}build(){return a.ValueConstraintRequirements.requireIri(this.termUri,"a term URI","A controlled-term default value"),a.ValueConstraintRequirements.requireText(this.rdfsLabel,"a label","A controlled-term default value"),new i.ControlledTermDefaultValue(this.termUri,this.rdfsLabel)}}},5753(e,t,r){t.ControlledTermVersion=void 0;const n=r(4563);t.ControlledTermVersion=class{_id;_effectiveDate;_declaredVersion;constructor(e,t=null,r=null){if("string"!=typeof e||""===e)throw new Error("A pinned version requires an id. A version with no id identifies no snapshot.");if(n.JavaStrings.isBlank(e))throw new Error("A pinned version's id must not be blank. An id made only of whitespace identifies no snapshot.");this._id=e,this._effectiveDate=t,this._declaredVersion=r}get id(){return this._id}get effectiveDate(){return this._effectiveDate}get declaredVersion(){return this._declaredVersion}}},3539(e,t){t.ValueConstraintRequirements=void 0,t.ValueConstraintRequirements=class{static requireText(e,t,r){if(null==e||""===e)throw new Error(`${r} requires ${t}.`)}static requireIri(e,t,r){if(null==e||e.isEmpty())throw new Error(`${r} requires ${t}. A constraint that points at nothing cannot be resolved.`)}static requireTermType(e,t){if(null==e||null===e.getJsonValue())throw new Error(`${t} requires a term type.`)}}},7432(e,t,r){t.ControlledTermAction=void 0;const n=r(2369);class i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermAction";className="ControlledTermAction";_to=null;_action;_termUri;_sourceUri;_source;_type;constructor(e,t,r,n,i,a){super(),this._to=e,this._action=t,this._termUri=r,this._sourceUri=n,this._source=i,this._type=a}get to(){return this._to}get action(){return this._action}get termUri(){return this._termUri}get sourceUri(){return this._sourceUri}get source(){return this._source}get type(){return this._type}}t.ControlledTermAction=i},7733(e,t,r){t.ControlledTermActionBuilder=void 0;const n=r(8802),i=r(7432),a=r(3539),s=r(4531);t.ControlledTermActionBuilder=class{_to=null;_action="";_termUri=n.Iri.empty();_sourceUri=n.Iri.empty();_source="";_type=s.BioportalTermType.NULL;withTo(e){return this._to=e,this}withAction(e){return this._action=e,this}withTermUri(e){return this._termUri=e,this}withSourceUri(e){return this._sourceUri=e,this}withSource(e){return this._source=e,this}withType(e){return this._type=e,this}build(){return a.ValueConstraintRequirements.requireText(this._action,"an action","A controlled-term action"),a.ValueConstraintRequirements.requireIri(this._termUri,"a term URI","A controlled-term action"),a.ValueConstraintRequirements.requireIri(this._sourceUri,"a source URI","A controlled-term action"),a.ValueConstraintRequirements.requireText(this._source,"a source","A controlled-term action"),a.ValueConstraintRequirements.requireTermType(this._type,"A controlled-term action"),new i.ControlledTermAction(this._to,this._action,this._termUri,this._sourceUri,this._source,this._type)}}},8014(e,t,r){t.JsonValueConstraintsActionWriter=void 0;const n=r(9517),i=r(936),a=r(1524);class s extends a.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.CedarModel.ValueConstraints.termUri]=this.atomicWriter.write(e.termUri),t[i.CedarModel.ValueConstraints.source]=e.source,t[i.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),t[i.CedarModel.ValueConstraints.action]=e.action,t[i.CedarModel.ValueConstraints.sourceUri]=this.atomicWriter.write(e.sourceUri),null!==e.to&&(t[i.CedarModel.ValueConstraints.to]=e.to),t}}t.JsonValueConstraintsActionWriter=s},4647(e,t,r){t.YamlValueConstraintsActionWriter=void 0;const n=r(9517),i=r(4339),a=r(2099);class s extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.action]=e.action,null!==e.to&&(t[a.YamlKeys.Controlled.to]=e.to),t[a.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.termUri),t[a.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(e.sourceUri),t[a.YamlKeys.Controlled.sourceAcronym]=e.source,t[a.YamlKeys.type]=this.atomicWriter.write(e.type),t}}t.YamlValueConstraintsActionWriter=s},9184(e,t,r){t.ControlledTermBranch=void 0;const n=r(2369);class i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermBranch";className="ControlledTermBranch";_source;_acronym;_name;_uri;_maxDepth=0;constructor(e,t,r,n,i,a=null,s=null,o=null){super(a,s,o),this._source=e,this._acronym=t,this._uri=i,this._name=r,this._maxDepth=n}get source(){return this._source}get acronym(){return this._acronym}get name(){return this._name}get uri(){return this._uri}get maxDepth(){return this._maxDepth}}t.ControlledTermBranch=i},2957(e,t,r){t.ControlledTermBranchBuilder=void 0;const n=r(8802),i=r(9184),a=r(3539);t.ControlledTermBranchBuilder=class{_source="";_acronym="";_name="";_uri=n.Iri.empty();_maxDepth=0;_iri=null;_sourceSystem=null;_version=null;withSource(e){return this._source=e,this}withAcronym(e){return this._acronym=e,this}withName(e){return this._name=e,this}withUri(e){return this._uri=e,this}withMaxDepth(e){return this._maxDepth=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return a.ValueConstraintRequirements.requireIri(this._uri,"a URI","A branch constraint"),a.ValueConstraintRequirements.requireText(this._source,"a source","A branch constraint"),a.ValueConstraintRequirements.requireText(this._acronym,"an acronym","A branch constraint"),a.ValueConstraintRequirements.requireText(this._name,"a name","A branch constraint"),new i.ControlledTermBranch(this._source,this._acronym,this._name,this._maxDepth,this._uri,this._iri,this._sourceSystem,this._version)}}},7054(e,t,r){t.JsonValueConstraintsBranchWriter=void 0;const n=r(9517),i=r(936),a=r(1524);class s extends a.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[i.CedarModel.ValueConstraints.source]=e.source,t[i.CedarModel.ValueConstraints.acronym]=e.acronym,t[i.CedarModel.ValueConstraints.name]=e.name,t[i.CedarModel.ValueConstraints.maxDepth]=e.maxDepth,this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsBranchWriter=s},3671(e,t,r){t.YamlValueConstraintsBranchWriter=void 0;const n=r(9517),i=r(4339),a=r(2099),s=r(8349);class o extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.type]=s.YamlValues.Controlled.branch,this.writeSourceSystem(t,e),t[a.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[a.YamlKeys.Controlled.sourceName]=e.source,this.writeSourceIri(t,e),t[a.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[a.YamlKeys.Controlled.termBaseLabel]=e.name,t[a.YamlKeys.Controlled.termMaxDepth]=e.maxDepth,this.writeVersion(t,e),t}}t.YamlValueConstraintsBranchWriter=o},2418(e,t,r){t.ControlledTermClass=void 0;const n=r(2369);class i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermClass";className="ControlledTermClass";_label;_source;_type;_prefLabel;_uri;constructor(e,t,r,n,i,a=null,s=null,o=null){super(a,s,o),this._label=e,this._source=t,this._type=r,this._prefLabel=n,this._uri=i}get label(){return this._label}get source(){return this._source}get type(){return this._type}get prefLabel(){return this._prefLabel}get uri(){return this._uri}}t.ControlledTermClass=i},3091(e,t,r){t.ControlledTermClassBuilder=void 0;const n=r(8802),i=r(2418),a=r(3539),s=r(4531);t.ControlledTermClassBuilder=class{_label="";_source="";_type=s.BioportalTermType.NULL;_prefLabel="";_uri=n.Iri.empty();_iri=null;_sourceSystem=null;_version=null;withLabel(e){return this._label=e,this}withSource(e){return this._source=e,this}withType(e){return this._type=e,this}withPrefLabel(e){return this._prefLabel=e,this}withUri(e){return this._uri=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return a.ValueConstraintRequirements.requireIri(this._uri,"a URI","A class constraint"),a.ValueConstraintRequirements.requireText(this._label,"a label","A class constraint"),a.ValueConstraintRequirements.requireText(this._prefLabel,"a preferred label","A class constraint"),a.ValueConstraintRequirements.requireText(this._source,"a source","A class constraint"),a.ValueConstraintRequirements.requireTermType(this._type,"A class constraint"),new i.ControlledTermClass(this._label,this._source,this._type,this._prefLabel,this._uri,this._iri,this._sourceSystem,this._version)}}},9222(e,t,r){t.JsonValueConstraintsClassWriter=void 0;const n=r(9517),i=r(936),a=r(1524);class s extends a.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[i.CedarModel.ValueConstraints.source]=e.source,t[i.CedarModel.ValueConstraints.label]=e.label,t[i.CedarModel.ValueConstraints.prefLabel]=e.prefLabel,t[i.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsClassWriter=s},765(e,t,r){t.YamlValueConstraintsClassWriter=void 0;const n=r(9517),i=r(4339),a=r(2099),s=r(8349);class o extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.type]=s.YamlValues.Controlled.class,this.writeSourceSystem(t,e),t[a.YamlKeys.Controlled.sourceAcronym]=e.source,this.writeSourceIri(t,e),t[a.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.uri),t[a.YamlKeys.Controlled.termType]=this.atomicWriter.write(e.type),t[a.YamlKeys.Controlled.termLabel]=e.prefLabel,e.label!==e.prefLabel&&(t[a.YamlKeys.Controlled.termDisplayLabel]=e.label),this.writeVersion(t,e),t}}t.YamlValueConstraintsClassWriter=o},8354(e,t,r){t.ControlledTermOntology=void 0;const n=r(2369);class i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermOntology";className="ControlledTermOntology";_acronym;_name;_uri;_numTerms=0;constructor(e,t,r,n,i=null,a=null,s=null){super(i,a,s),this._acronym=e,this._name=t,this._uri=n,this._numTerms=r}get acronym(){return this._acronym}get name(){return this._name}get uri(){return this._uri}get numTerms(){return this._numTerms}}t.ControlledTermOntology=i},5491(e,t,r){t.ControlledTermOntologyBuilder=void 0;const n=r(8802),i=r(8354),a=r(3539);t.ControlledTermOntologyBuilder=class{acronym="";name="";numTerms=null;uri=n.Iri.empty();iri=null;sourceSystem=null;version=null;withAcronym(e){return this.acronym=e,this}withName(e){return this.name=e,this}withNumTerms(e){return this.numTerms=e,this}withUri(e){return this.uri=e,this}withIri(e){return this.iri=e,this}withSourceSystem(e){return this.sourceSystem=e,this}withVersion(e){return this.version=e,this}build(){return a.ValueConstraintRequirements.requireIri(this.uri,"a URI","An ontology constraint"),a.ValueConstraintRequirements.requireText(this.acronym,"an acronym","An ontology constraint"),a.ValueConstraintRequirements.requireText(this.name,"a name","An ontology constraint"),new i.ControlledTermOntology(this.acronym,this.name,this.numTerms,this.uri,this.iri,this.sourceSystem,this.version)}}},5996(e,t,r){t.JsonValueConstraintsOntologyWriter=void 0;const n=r(9517),i=r(936),a=r(1524);class s extends a.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[i.CedarModel.ValueConstraints.acronym]=e.acronym,t[i.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[i.CedarModel.ValueConstraints.numTerms]=e.numTerms),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsOntologyWriter=s},1181(e,t,r){t.YamlValueConstraintsOntologyWriter=void 0;const n=r(9517),i=r(4339),a=r(2099),s=r(8349);class o extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.type]=s.YamlValues.Controlled.ontology,this.writeSourceSystem(t,e),t[a.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[a.YamlKeys.Controlled.sourceName]=e.name,this.writeSourceIri(t,e),null!==e.numTerms&&(t[a.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsOntologyWriter=o},2395(e,t,r){t.ControlledTermValueSet=void 0;const n=r(2369);class i extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermValueSet";className="ControlledTermValueSet";_vsCollection;_name;_uri;_numTerms=0;constructor(e,t,r,n,i=null,a=null,s=null){super(i,a,s),this._vsCollection=e,this._name=t,this._uri=n,this._numTerms=r}get vsCollection(){return this._vsCollection}get name(){return this._name}get uri(){return this._uri}get numTerms(){return this._numTerms}}t.ControlledTermValueSet=i},1556(e,t,r){t.ControlledTermValueSetBuilder=void 0;const n=r(8802),i=r(2395),a=r(3539);t.ControlledTermValueSetBuilder=class{_vsCollection="";_name="";_uri=n.Iri.empty();_numTerms=null;_iri=null;_sourceSystem=null;_version=null;withVsCollection(e){return this._vsCollection=e,this}withName(e){return this._name=e,this}withUri(e){return this._uri=e,this}withNumTerms(e){return this._numTerms=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return a.ValueConstraintRequirements.requireIri(this._uri,"a URI","A value-set constraint"),a.ValueConstraintRequirements.requireText(this._vsCollection,"a value-set collection","A value-set constraint"),a.ValueConstraintRequirements.requireText(this._name,"a name","A value-set constraint"),new i.ControlledTermValueSet(this._vsCollection,this._name,this._numTerms,this._uri,this._iri,this._sourceSystem,this._version)}}},2813(e,t,r){t.JsonValueConstraintsValueSetWriter=void 0;const n=r(9517),i=r(936),a=r(1524);class s extends a.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[i.CedarModel.ValueConstraints.vsCollection]=e.vsCollection,t[i.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[i.CedarModel.ValueConstraints.numTerms]=e.numTerms),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsValueSetWriter=s},9532(e,t,r){t.YamlValueConstraintsValueSetWriter=void 0;const n=r(9517),i=r(4339),a=r(2099),s=r(8349);class o extends i.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.YamlKeys.type]=s.YamlValues.Controlled.valueSet,this.writeSourceSystem(t,e),t[a.YamlKeys.Controlled.sourceAcronym]=e.vsCollection,this.writeSourceIri(t,e),t[a.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[a.YamlKeys.Controlled.termBaseLabel]=e.name,null!==e.numTerms&&(t[a.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsValueSetWriter=o},1667(e,t,r){t.EmailFieldBuilderImpl=void 0;const n=r(6830),i=r(3350),a=r(4450);class s extends i.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"email"},_valueConstraints:{defaultValue:this.defaultValue}});const e=a.EmailFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.EmailFieldBuilderImpl=s},4450(e,t,r){t.EmailFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EMAIL,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.EmailFieldImpl=l},2691(e,t,r){t.JsonFieldReaderEmail=void 0;const n=r(4385),i=r(4450),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.EmailFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderEmail=l},9031(e,t,r){t.JsonFieldWriterEmail=void 0;const n=r(2748),i=r(936),a=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterEmail=s},3054(e,t,r){t.YamlFieldReaderEmail=void 0;const n=r(5675),i=r(4450),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.EmailFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderEmail=o},1038(e,t,r){t.YamlFieldWriterEmail=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterEmail=s},6610(e,t,r){t.ExtDoiFieldBuilderImpl=void 0;const n=r(3350),i=r(997);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtDoiFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtDoiFieldBuilderImpl=a},997(e,t,r){t.ExtDoiFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_DOI,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtDoiFieldImpl=l},8583(e,t,r){t.JsonFieldReaderExtDoi=void 0;const n=r(4385),i=r(997),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtDoiFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtDoi=l},7412(e,t,r){t.JsonFieldWriterExtDoi=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtDoi=l},5907(e,t,r){t.YamlFieldReaderExtDoi=void 0;const n=r(5675),i=r(997),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtDoiFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtDoi=o},6967(e,t,r){t.YamlFieldWriterExtDoi=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtDoi=s},9062(e,t,r){t.ExtNihGrantIdFieldBuilderImpl=void 0;const n=r(3350),i=r(7313);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtNihGrantIdFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtNihGrantIdFieldBuilderImpl=a},7313(e,t,r){t.ExtNihGrantIdFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_NIH_GRANT_ID,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtNihGrantIdFieldImpl=l},1886(e,t,r){t.JsonFieldReaderExtNihGrantId=void 0;const n=r(4385),i=r(7313),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtNihGrantIdFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtNihGrantId=l},5250(e,t,r){t.JsonFieldWriterExtNihGrantId=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtNihGrantId=l},8543(e,t,r){t.YamlFieldReaderExtNihGrantId=void 0;const n=r(5675),i=r(7313),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtNihGrantIdFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtNihGrantId=o},3711(e,t,r){t.YamlFieldWriterExtNihGrantId=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtNihGrantId=s},2376(e,t,r){t.ExtOrcidFieldBuilderImpl=void 0;const n=r(3350),i=r(5967);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtOrcidFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtOrcidFieldBuilderImpl=a},5967(e,t,r){t.ExtOrcidFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_ORCID,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtOrcidFieldImpl=l},4956(e,t,r){t.JsonFieldReaderExtOrcid=void 0;const n=r(4385),i=r(5967),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtOrcidFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtOrcid=l},8096(e,t,r){t.JsonFieldWriterExtOrcid=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtOrcid=l},7123(e,t,r){t.YamlFieldReaderExtOrcid=void 0;const n=r(5675),i=r(5967),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtOrcidFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtOrcid=o},4355(e,t,r){t.YamlFieldWriterExtOrcid=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtOrcid=s},3914(e,t,r){t.ExtPfasFieldBuilderImpl=void 0;const n=r(3350),i=r(6637);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtPfasFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPfasFieldBuilderImpl=a},6637(e,t,r){t.ExtPfasFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_PFAS,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtPfasFieldImpl=l},6854(e,t,r){t.JsonFieldReaderExtPfas=void 0;const n=r(4385),i=r(6637),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtPfasFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPfas=l},6122(e,t,r){t.JsonFieldWriterExtPfas=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtPfas=l},5075(e,t,r){t.YamlFieldReaderExtPfas=void 0;const n=r(5675),i=r(6637),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtPfasFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtPfas=o},5587(e,t,r){t.YamlFieldWriterExtPfas=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPfas=s},7162(e,t,r){t.ExtPubmedFieldBuilderImpl=void 0;const n=r(3350),i=r(2685);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtPubmedFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPubmedFieldBuilderImpl=a},2685(e,t,r){t.ExtPubmedFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_PUBMED,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtPubmedFieldImpl=l},3028(e,t,r){t.JsonFieldReaderExtPubmed=void 0;const n=r(4385),i=r(2685),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtPubmedFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPubmed=l},3312(e,t,r){t.JsonFieldWriterExtPubmed=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtPubmed=l},7709(e,t,r){t.YamlFieldReaderExtPubmed=void 0;const n=r(5675),i=r(2685),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtPubmedFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtPubmed=o},6557(e,t,r){t.YamlFieldWriterExtPubmed=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPubmed=s},7328(e,t,r){t.ExtRorFieldBuilderImpl=void 0;const n=r(3350),i=r(4007);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtRorFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRorFieldBuilderImpl=a},4007(e,t,r){t.ExtRorFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_ROR,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtRorFieldImpl=l},8244(e,t,r){t.JsonFieldReaderExtRor=void 0;const n=r(4385),i=r(4007),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtRorFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRor=l},7584(e,t,r){t.JsonFieldWriterExtRor=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtRor=l},6651(e,t,r){t.YamlFieldReaderExtRor=void 0;const n=r(5675),i=r(4007),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtRorFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtRor=o},491(e,t,r){t.YamlFieldWriterExtRor=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRor=s},3474(e,t,r){t.ExtRridFieldBuilderImpl=void 0;const n=r(3350),i=r(789);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.ExtRridFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRridFieldBuilderImpl=a},789(e,t,r){t.ExtRridFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.EXT_RRID,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtRridFieldImpl=l},7004(e,t,r){t.JsonFieldReaderExtRrid=void 0;const n=r(4385),i=r(789),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.ExtRridFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRrid=l},4780(e,t,r){t.JsonFieldWriterExtRrid=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtRrid=l},6089(e,t,r){t.YamlFieldReaderExtRrid=void 0;const n=r(5675),i=r(789),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.ExtRridFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderExtRrid=o},4077(e,t,r){t.YamlFieldWriterExtRrid=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRrid=s},7095(e,t,r){t.JsonFieldReaderLink=void 0;const n=r(4385),i=r(4084),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.LinkFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderLink=l},3691(e,t,r){t.JsonFieldWriterLink=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6145);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterLink=l},9497(e,t,r){t.LinkFieldBuilderImpl=void 0;const n=r(3350),i=r(4084);class a extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new a}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.LinkFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.LinkFieldBuilderImpl=a},4084(e,t,r){t.LinkFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.LINK,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.LinkFieldImpl=l},8568(e,t,r){t.YamlFieldReaderLink=void 0;const n=r(5675),i=r(4084),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.LinkFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderLink=o},1784(e,t,r){t.YamlFieldWriterLink=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeIri(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterLink=s},1513(e,t,r){t.MultipleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class i extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!0}static create(){return new i}build(){return super.build()}}t.MultipleChoiceListFieldBuilderImpl=i},4932(e,t,r){t.MultipleChoiceListFieldImpl=void 0;const n=r(5316),i=r(4869),a=r(3239);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!0,this.cedarFieldType=i.CedarFieldType.MULTIPLE_SELECT_LIST}static buildEmpty(){return new s}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new a.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.MultipleChoiceListFieldImpl=s},7124(e,t,r){t.YamlFieldReaderMultiSelectList=void 0;const n=r(5675),i=r(4932);class a extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const s=i.MultipleChoiceListFieldImpl.buildEmpty();return n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,s),s}}t.YamlFieldReaderMultiSelectList=a},9105(e,t,r){t.SingleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class i extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!1}static create(){return new i}build(){return super.build()}}t.SingleChoiceListFieldBuilderImpl=i},1676(e,t,r){t.SingleChoiceListFieldImpl=void 0;const n=r(5316),i=r(3608),a=r(4869);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!1,this.cedarFieldType=a.CedarFieldType.SINGLE_SELECT_LIST}static buildEmpty(){return new s}createDeploymentBuilder(e){return new i.ChildDeploymentInfoBuilder(this,e)}}t.SingleChoiceListFieldImpl=s},2709(e,t,r){t.YamlFieldReaderSingleSelectList=void 0;const n=r(5675),i=r(1676);class a extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const s=i.SingleChoiceListFieldImpl.buildEmpty();return n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,s),s}}t.YamlFieldReaderSingleSelectList=a},2419(e,t,r){t.JsonFieldReaderList=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(4081),o=r(4932),l=r(1676),c=r(6145);class d extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){let d=l.SingleChoiceListFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const u=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=u){n.ReaderUtil.getBoolean(u,i.CedarModel.multipleChoice)&&(d=o.MultipleChoiceListFieldImpl.buildEmpty()),d.valueConstraints.defaultValue=c.DefaultValueSerialization.literalFromNode(u,i.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(u,i.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,i.CedarModel.label),r=n.ReaderUtil.getBoolean(e,i.CedarModel.selectedByDefault),a=Object.hasOwn(e,i.CedarModel.selectedByDefault);if(null!=t){const e=new s.ListOption(t,r,a);d.valueConstraints.literals.push(e)}})}return d}}t.JsonFieldReaderList=d},7335(e,t,r){t.JsonFieldWriterList=void 0;const n=r(936),i=r(2748),a=r(6145);class s extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=t.multipleChoice}}t.JsonFieldWriterList=s},9513(e,t,r){t.ListFieldBuilderImpl=void 0;const n=r(4081),i=r(3350),a=r(4932),s=r(1676);class o extends i.TemplateFieldBuilder{multipleChoice=!1;defaultValue=null;literals=[];constructor(){super()}withDefaultValue(e){return this.defaultValue=e,this}addListOption(e,t){return this.literals.push(new n.ListOption(e,t??!1,void 0!==t)),this}build(){let e;if(e=this.multipleChoice?a.MultipleChoiceListFieldImpl.buildEmpty():s.SingleChoiceListFieldImpl.buildEmpty(),super.buildInternal(e),!this.multipleChoice){let e=-1;for(let t=this.literals.length-1;t>=0;t--)if(this.literals[t].selectedByDefault){e=t;break}-1!==e&&this.literals.forEach((t,r)=>{t.selectedByDefault=r===e,t.statesSelectedByDefault=t.selectedByDefault})}return e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.literals=this.literals,e}}t.ListFieldBuilderImpl=o},5316(e,t,r){t.ListFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1623);class o extends n.TemplateField{valueConstraints;multipleChoice;constructor(){super(),this.cedarFieldType=i.CedarFieldType.NULL,this.valueConstraints=new s.ValueConstraintsListField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD,this.multipleChoice=!1}}t.ListFieldImpl=o},4081(e,t,r){t.ListOption=void 0;const n=r(7282);class i extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.ListOption=i},1623(e,t,r){t.ValueConstraintsListField=void 0;const n=r(7765);class i extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsListField=i},3080(e,t,r){t.YamlFieldWriterList=void 0;const n=r(5430),i=r(9499),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){s.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}getYamlType(e){return e.multipleChoice?i.YamlArtifactType.MULTI_SELECT_LIST.getValue():i.YamlArtifactType.SINGLE_SELECT_LIST.getValue()}}t.YamlFieldWriterList=o},1769(e,t,r){t.JsonFieldReaderNumeric=void 0;const n=r(8748),i=r(936),a=r(3447),s=r(4385),o=r(4074),l=r(6444);class c extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const c=o.NumericFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=d){const e=n.ReaderUtil.getString(d,i.CedarModel.numberType);null!==e&&(c.valueConstraints.numberType=a.NumberType.forValue(e)),c.valueConstraints.minValue=n.ReaderUtil.getExactNumber(d,i.CedarModel.minValue),c.valueConstraints.maxValue=n.ReaderUtil.getExactNumber(d,i.CedarModel.maxValue),c.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(d,i.CedarModel.decimalPlace),c.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(d,i.CedarModel.unitOfMeasure),c.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(d,i.CedarModel.defaultValue),l.NumericDefaultValueValidator.assertValid(c.valueConstraints.numberType,c.valueConstraints.defaultValue,c.valueConstraints.minValue,c.valueConstraints.maxValue)}return c}}t.JsonFieldReaderNumeric=c},4841(e,t,r){t.JsonFieldWriterNumeric=void 0;const n=r(9932),i=r(2733),a=r(2748),s=r(936),o=r(6444);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[i.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL}expandRequiredNode(e){e[i.JsonSchema.required]=[i.JsonSchema.atValue,i.JsonSchema.atType]}expandValueConstraintsNode(e,t,r){o.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[s.CedarModel.numberType]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[s.CedarModel.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[s.CedarModel.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[s.CedarModel.decimalPlace]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[s.CedarModel.unitOfMeasure]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[s.CedarModel.defaultValue]=String(t.valueConstraints.defaultValue)),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterNumeric=l},6444(e,t,r){t.NumericDefaultValueValidator=void 0;const n=r(3447),i=r(2108);t.NumericDefaultValueValidator=class{static assertValid(e,t,r=null,a=null){if(null!==r&&i.NumericPolicy.value(r),null!==a&&i.NumericPolicy.value(a),null!==r&&null!==a&&i.NumericPolicy.compare(r,a)>0)throw new Error("Minimum value exceeds maximum value.");if(null===t)return;i.NumericPolicy.value(t);const s=e.getValue();if(null===s)throw new Error("Numeric default requires a numeric datatype.");const o={[n.NumberTypeValues.BYTE]:["-128","127"],[n.NumberTypeValues.SHORT]:["-32768","32767"],[n.NumberTypeValues.INT]:["-2147483648","2147483647"],[n.NumberTypeValues.LONG]:["-9223372036854775808","9223372036854775807"]}[s];if(o){if("number"==typeof t&&!Number.isSafeInteger(t))throw new Error("Numeric default requires exact decimal text for integers beyond the safe JavaScript range.");if(!i.NumericPolicy.isInteger(t))throw new Error(`Numeric default ${t} must be an integer for ${s}.`);if(i.NumericPolicy.compare(t,o[0])<0||i.NumericPolicy.compare(t,o[1])>0)throw new Error(`Numeric default ${t} is outside the ${s} range.`)}if(s===n.NumberTypeValues.FLOAT||s===n.NumberTypeValues.DOUBLE){const e=String(t).replace(/^-/,""),r=s===n.NumberTypeValues.FLOAT?"3.4028234663852886e38":"1.7976931348623157e308",a=s===n.NumberTypeValues.FLOAT?"1.401298464324817e-45":"4.9e-324";if(i.NumericPolicy.compare(e,r)>0||0!==i.NumericPolicy.compare(e,0)&&i.NumericPolicy.compare(e,a)<0)throw new Error(`Numeric default ${t} is outside the ${s} range.`)}if(null!==r&&i.NumericPolicy.compare(t,r)<0)throw new Error(`Numeric default ${t} is below minValue ${r}.`);if(null!==a&&i.NumericPolicy.compare(t,a)>0)throw new Error(`Numeric default ${t} is above maxValue ${a}.`)}}},3675(e,t,r){t.NumericFieldBuilderImpl=void 0;const n=r(6830),i=r(2108),a=r(3350),s=r(3447),o=r(4074),l=r(6444);class c extends a.TemplateFieldBuilder{numberType=s.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}static create(){return new c}withNumberType(e){return this.numberType=e,this}withMinValue(e){return this.minValue=null===e?null:i.NumericPolicy.value(e),this}withMaxValue(e){return this.maxValue=null===e?null:i.NumericPolicy.value(e),this}withDecimalPlaces(e){return this.decimalPlaces=e,this}withUnitOfMeasure(e){return this.unitOfMeasure=e,this}withDefaultValue(e){return this.defaultValue=null===e?null:i.NumericPolicy.value(e),this}build(){l.NumericDefaultValueValidator.assertValid(this.numberType,this.defaultValue,this.minValue,this.maxValue),n.FieldValuePolicy.assertConsistent({_ui:{inputType:"numeric"},_valueConstraints:{numberType:this.numberType.getValue(),defaultValue:this.defaultValue,minValue:this.minValue,maxValue:this.maxValue,decimalPlace:this.decimalPlaces}});const e=o.NumericFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.numberType=this.numberType,e.valueConstraints.minValue=this.minValue,e.valueConstraints.maxValue=this.maxValue,e.valueConstraints.decimalPlaces=this.decimalPlaces,e.valueConstraints.unitOfMeasure=this.unitOfMeasure,e.valueConstraints.defaultValue=this.defaultValue,e}}t.NumericFieldBuilderImpl=c},4074(e,t,r){t.NumericFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(1211),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.NUMERIC,this.valueConstraints=new s.ValueConstraintsNumericField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.NumericFieldImpl=l},1211(e,t,r){t.ValueConstraintsNumericField=void 0;const n=r(4328),i=r(3447);class a extends n.ValueConstraints{numberType=i.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}}t.ValueConstraintsNumericField=a},1872(e,t,r){t.YamlFieldReaderNumeric=void 0;const n=r(8748),i=r(3447),a=r(5675),s=r(2099),o=r(4074),l=r(6444);class c extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const c=o.NumericFieldImpl.buildEmpty(),d=n.ReaderUtil.getString(e,s.YamlKeys.datatype);return null!==d&&(c.valueConstraints.numberType=i.NumberType.forValue(d)),c.valueConstraints.minValue=n.ReaderUtil.getExactNumber(e,s.YamlKeys.minValue),c.valueConstraints.maxValue=n.ReaderUtil.getExactNumber(e,s.YamlKeys.maxValue),c.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(e,s.YamlKeys.decimalPlaces),c.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(e,s.YamlKeys.unit),c.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(e,s.YamlKeys.default),l.NumericDefaultValueValidator.assertValid(c.valueConstraints.numberType,c.valueConstraints.defaultValue,c.valueConstraints.minValue,c.valueConstraints.maxValue),c}}t.YamlFieldReaderNumeric=c},3292(e,t,r){t.YamlFieldWriterNumeric=void 0;const n=r(5430),i=r(2099),a=r(6444);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[i.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[i.YamlKeys.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[i.YamlKeys.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[i.YamlKeys.decimalPlaces]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[i.YamlKeys.unit]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[i.YamlKeys.default]=t.valueConstraints.defaultValue)}}t.YamlFieldWriterNumeric=s},1468(e,t,r){t.JsonFieldReaderPhoneNumber=void 0;const n=r(4385),i=r(7459),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.PhoneNumberFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderPhoneNumber=l},6876(e,t,r){t.JsonFieldWriterPhoneNumber=void 0;const n=r(2748),i=r(936),a=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterPhoneNumber=s},8084(e,t,r){t.PhoneNumberFieldBuilderImpl=void 0;const n=r(6830),i=r(3350),a=r(7459);class s extends i.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"phone-number"},_valueConstraints:{defaultValue:this.defaultValue}});const e=a.PhoneNumberFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.PhoneNumberFieldBuilderImpl=s},7459(e,t,r){t.PhoneNumberFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.PHONE_NUMBER,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.PhoneNumberFieldImpl=l},4329(e,t,r){t.YamlFieldReaderPhoneNumber=void 0;const n=r(5675),i=r(7459),a=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.PhoneNumberFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,a.YamlKeys.default),o}}t.YamlFieldReaderPhoneNumber=o},9821(e,t,r){t.YamlFieldWriterPhoneNumber=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterPhoneNumber=s},9053(e,t,r){t.JsonFieldReaderRadio=void 0;const n=r(8748),i=r(936),a=r(3315),s=r(4385),o=r(8618),l=r(6145);class c extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const c=o.RadioFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=d){c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(d,i.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(d,i.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,i.CedarModel.label),r=n.ReaderUtil.getBoolean(e,i.CedarModel.selectedByDefault),s=Object.hasOwn(e,i.CedarModel.selectedByDefault);if(null!=t){const e=new a.RadioOption(t,r,s);c.valueConstraints.literals.push(e)}})}return c}}t.JsonFieldReaderRadio=c},9309(e,t,r){t.JsonFieldWriterRadio=void 0;const n=r(936),i=r(2748),a=r(6145);class s extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=!1}}t.JsonFieldWriterRadio=s},2875(e,t,r){t.RadioFieldBuilderImpl=void 0;const n=r(3350),i=r(3315),a=r(8618);class s extends n.TemplateFieldBuilder{defaultValue=null;literals=[];constructor(){super()}static create(){return new s}addRadioOption(e,t){return this.literals.push(new i.RadioOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.RadioFieldImpl.buildEmpty();super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue;let t=-1;for(let e=this.literals.length-1;e>=0;e--)if(this.literals[e].selectedByDefault){t=e;break}return-1!==t&&this.literals.forEach((e,r)=>{e.selectedByDefault=r===t,e.statesSelectedByDefault=e.selectedByDefault}),e.valueConstraints.literals=this.literals,e}}t.RadioFieldBuilderImpl=s},8618(e,t,r){t.RadioFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(9931),o=r(587);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.RADIO,this.valueConstraints=new s.ValueConstraintsRadioField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isSingleInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysSingleBuilder(this,e)}}t.RadioFieldImpl=l},3315(e,t,r){t.RadioOption=void 0;const n=r(7282);class i extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.RadioOption=i},9931(e,t,r){t.ValueConstraintsRadioField=void 0;const n=r(7765);class i extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsRadioField=i},4284(e,t,r){t.YamlFieldReaderRadio=void 0;const n=r(8748),i=r(3315),a=r(5675),s=r(2099),o=r(8618),l=r(6145);class c extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const c=o.RadioFieldImpl.buildEmpty();c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const d=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==d&&d.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),a=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new i.RadioOption(t,r,a);c.valueConstraints.literals.push(e)}}),c}}t.YamlFieldReaderRadio=c},8136(e,t,r){t.YamlFieldWriterRadio=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterRadio=s},9315(e,t,r){t.JsonFieldReaderTemporal=void 0;const n=r(8748),i=r(936),a=r(8588),s=r(3764),o=r(7974),l=r(4385),c=r(964),d=r(6342);class u extends l.JsonTemplateFieldTypeSpecificReader{read(e,t,r,l){const u=c.TemporalFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const m=n.ReaderUtil.getNode(e,i.CedarModel.ui);null!=m&&(u.temporalGranularity=o.TemporalGranularity.forValue(n.ReaderUtil.getString(m,i.CedarModel.temporalGranularity)),u.inputTimeFormat=s.TimeFormat.forValue(n.ReaderUtil.getString(m,i.CedarModel.inputTimeFormat)),u.timezoneEnabled=n.ReaderUtil.getBoolean(m,i.CedarModel.timezoneEnabled));const p=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);if(null!=p){const e=n.ReaderUtil.getString(p,i.CedarModel.temporalType);null!==e&&(u.valueConstraints.temporalType=a.TemporalType.forValue(e)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(p,i.CedarModel.defaultValue),d.TemporalDefaultValueValidator.assertValid(u.valueConstraints.temporalType,u.temporalGranularity,u.valueConstraints.defaultValue)}return u}}t.JsonFieldReaderTemporal=u},5459(e,t,r){t.JsonFieldWriterTemporal=void 0;const n=r(936),i=r(3764),a=r(7974),s=r(2748),o=r(2733),l=r(6342);class c extends s.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINode(e,t,r){super.expandUINode(e,t,r),t.temporalGranularity!==a.TemporalGranularity.NULL&&(e[n.CedarModel.temporalGranularity]=this.atomicWriter.write(t.temporalGranularity)),a.TemporalGranularity.hasTime(t.temporalGranularity)&&(t.inputTimeFormat!==i.TimeFormat.NULL&&(e[n.CedarModel.inputTimeFormat]=this.atomicWriter.write(t.inputTimeFormat)),e[n.CedarModel.timezoneEnabled]=t.timezoneEnabled)}expandValueConstraintsNode(e,t,r){l.TemporalDefaultValueValidator.assertValid(t.valueConstraints.temporalType,t.temporalGranularity,t.valueConstraints.defaultValue),e[n.CedarModel.temporalType]=this.atomicWriter.write(t.valueConstraints.temporalType),null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[n.CedarModel.defaultValue]=t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandRequiredNode(e){e[o.JsonSchema.required]=[o.JsonSchema.atValue,o.JsonSchema.atType]}}t.JsonFieldWriterTemporal=c},6342(e,t,r){t.TemporalDefaultValueValidator=void 0;const n=r(5036);t.TemporalDefaultValueValidator=class{static assertValid(e,t,r){n.TemporalDefaultPolicy.assertValid(e.getValue(),t.getValue(),r)}}},345(e,t,r){t.TemporalFieldBuilderImpl=void 0;const n=r(3350),i=r(3764),a=r(7974),s=r(8588),o=r(964),l=r(6342),c=r(6830);class d extends n.TemplateFieldBuilder{timezoneEnabled=!1;inputTimeFormat=i.TimeFormat.NULL;temporalGranularity=a.TemporalGranularity.NULL;temporalType=s.TemporalType.DATETIME;defaultValue=null;constructor(){super()}static create(){return new d}withTimezoneEnabled(e){return this.timezoneEnabled=e,this}withInputTimeFormat(e){return this.inputTimeFormat=e,this}withTemporalGranularity(e){return this.temporalGranularity=e,this}withTemporalType(e){return this.temporalType=e,this}withDefaultValue(e){return this.defaultValue=e,this}build(){l.TemporalDefaultValueValidator.assertValid(this.temporalType,this.temporalGranularity,this.defaultValue),c.FieldValuePolicy.assertConsistent({_ui:{inputType:"temporal",timezoneEnabled:this.timezoneEnabled,temporalGranularity:this.temporalGranularity.getValue()},_valueConstraints:{temporalType:this.temporalType.getValue(),defaultValue:this.defaultValue}});const e=o.TemporalFieldImpl.buildEmpty();return super.buildInternal(e),e.timezoneEnabled=this.timezoneEnabled,e.inputTimeFormat=this.inputTimeFormat,e.temporalGranularity=this.temporalGranularity,e.valueConstraints.temporalType=this.temporalType,e.valueConstraints.defaultValue=this.defaultValue,e}}t.TemporalFieldBuilderImpl=d},964(e,t,r){t.TemporalFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(3567),o=r(3764),l=r(7974),c=r(3608);class d extends n.TemplateField{valueConstraints;timezoneEnabled=!1;inputTimeFormat=o.TimeFormat.NULL;temporalGranularity=l.TemporalGranularity.NULL;constructor(){super(),this.cedarFieldType=i.CedarFieldType.TEMPORAL,this.valueConstraints=new s.ValueConstraintsTemporalField,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new d}createDeploymentBuilder(e){return new c.ChildDeploymentInfoBuilder(this,e)}}t.TemporalFieldImpl=d},3567(e,t,r){t.ValueConstraintsTemporalField=void 0;const n=r(4328),i=r(8588);class a extends n.ValueConstraints{temporalType=i.TemporalType.DATETIME;defaultValue=null;constructor(){super()}}t.ValueConstraintsTemporalField=a},384(e,t,r){t.YamlFieldReaderTemporal=void 0;const n=r(8748),i=r(8588),a=r(3764),s=r(7974),o=r(5675),l=r(2099),c=r(964),d=r(6342);class u extends o.YamlTemplateFieldTypeSpecificReader{read(e,t,r,o){const u=c.TemporalFieldImpl.buildEmpty();u.temporalGranularity=s.TemporalGranularity.forValue(n.ReaderUtil.getString(e,l.YamlKeys.granularity)),u.inputTimeFormat=a.TimeFormat.forValue(n.ReaderUtil.getString(e,l.YamlKeys.inputTimeFormat)),u.timezoneEnabled=n.ReaderUtil.getBoolean(e,l.YamlKeys.inputTimeZone);const m=n.ReaderUtil.getString(e,l.YamlKeys.datatype);return null!==m&&(u.valueConstraints.temporalType=i.TemporalType.forValue(m)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(e,l.YamlKeys.default),d.TemporalDefaultValueValidator.assertValid(u.valueConstraints.temporalType,u.temporalGranularity,u.valueConstraints.defaultValue),u}}t.YamlFieldReaderTemporal=u},7436(e,t,r){t.YamlFieldWriterTemporal=void 0;const n=r(3764),i=r(7974),a=r(5430),s=r(2099),o=r(6342);class l extends a.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){o.TemporalDefaultValueValidator.assertValid(t.valueConstraints.temporalType,t.temporalGranularity,t.valueConstraints.defaultValue),e[s.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.temporalType),t.temporalGranularity!==i.TemporalGranularity.NULL?(e[s.YamlKeys.granularity]=this.atomicWriter.write(t.temporalGranularity),null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[s.YamlKeys.default]=t.valueConstraints.defaultValue),t.temporalGranularity!==i.TemporalGranularity.YEAR&&t.temporalGranularity!==i.TemporalGranularity.MONTH&&t.temporalGranularity!==i.TemporalGranularity.DAY&&(t.inputTimeFormat!==n.TimeFormat.NULL&&(e[s.YamlKeys.inputTimeFormat]=this.atomicWriter.write(t.inputTimeFormat)),t.timezoneEnabled&&(e[s.YamlKeys.inputTimeZone]=t.timezoneEnabled))):null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[s.YamlKeys.default]=t.valueConstraints.defaultValue)}}t.YamlFieldWriterTemporal=l},9683(e,t,r){t.JsonFieldReaderTextArea=void 0;const n=r(4385),i=r(5450),a=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=i.TextAreaImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=a.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue),l.valueConstraints.minLength=a.ReaderUtil.getNumber(c,s.CedarModel.minLength),l.valueConstraints.maxLength=a.ReaderUtil.getNumber(c,s.CedarModel.maxLength)),l}}t.JsonFieldReaderTextArea=l},275(e,t,r){t.JsonFieldWriterTextArea=void 0;const n=r(2748),i=r(936),a=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.CedarModel.defaultValue,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[i.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[i.CedarModel.maxLength]=t.valueConstraints.maxLength),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterTextArea=s},1259(e,t,r){t.TextAreaBuilderImpl=void 0;const n=r(6830),i=r(3350),a=r(5450);class s extends i.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"textarea"},_valueConstraints:{defaultValue:this.defaultValue,minLength:this.minLength,maxLength:this.maxLength}});const e=a.TextAreaImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.minLength=this.minLength,e.valueConstraints.maxLength=this.maxLength,e}}t.TextAreaBuilderImpl=s},5450(e,t,r){t.TextAreaImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(3608),o=r(5923);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=i.CedarFieldType.TEXTAREA,this.valueConstraints=new o.ValueConstraintsTextArea,this.cedarArtifactType=a.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new s.ChildDeploymentInfoBuilder(this,e)}}t.TextAreaImpl=l},5923(e,t,r){t.ValueConstraintsTextArea=void 0;const n=r(7765);class i extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;constructor(){super()}}t.ValueConstraintsTextArea=i},3168(e,t,r){t.YamlFieldReaderTextArea=void 0;const n=r(8748),i=r(5675),a=r(5450),s=r(2099),o=r(6145);class l extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const l=a.TextAreaImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,s.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,s.YamlKeys.maxLength),l}}t.YamlFieldReaderTextArea=l},836(e,t,r){t.YamlFieldWriterTextArea=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[i.YamlKeys.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[i.YamlKeys.maxLength]=t.valueConstraints.maxLength)}}t.YamlFieldWriterTextArea=s},9241(e,t,r){t.JsonFieldReaderTextField=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(6591),o=r(6145);class l extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const l=s.TextFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,i.CedarModel.defaultValue),l.valueConstraints.minLength=n.ReaderUtil.getNumber(c,i.CedarModel.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(c,i.CedarModel.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(c,i.CedarModel.regex)),l}}t.JsonFieldReaderTextField=l},7501(e,t,r){t.JsonFieldWriterTextField=void 0;const n=r(936),i=r(2748),a=r(6145);class s extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){null!==t.valueConstraints.minLength&&(e[n.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[n.CedarModel.maxLength]=t.valueConstraints.maxLength),a.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r),null!==t.valueConstraints.regex&&(e[n.CedarModel.regex]=t.valueConstraints.regex)}}t.JsonFieldWriterTextField=s},7889(e,t,r){t.TextFieldBuilderImpl=void 0;const n=r(6830),i=r(3350),a=r(6591);class s extends i.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;regex=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}withRegex(e){return this.regex=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"textfield"},_valueConstraints:{defaultValue:this.defaultValue,minLength:this.minLength,maxLength:this.maxLength,regex:this.regex}});const e=a.TextFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.minLength=this.minLength,e.valueConstraints.maxLength=this.maxLength,e.valueConstraints.regex=this.regex,e}}t.TextFieldBuilderImpl=s},6591(e,t,r){t.TextFieldImpl=void 0;const n=r(9129),i=r(9711),a=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=a.CedarFieldType.TEXT,this.valueConstraints=new i.ValueConstraintsTextField,this.cedarArtifactType=s.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}supportsValueRecommendation(){return!0}}t.TextFieldImpl=l},9711(e,t,r){t.ValueConstraintsTextField=void 0;const n=r(7765);class i extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;regex=null;constructor(){super()}}t.ValueConstraintsTextField=i},1268(e,t,r){t.YamlFieldReaderTextField=void 0;const n=r(8748),i=r(5675),a=r(2099),s=r(6591),o=r(6145);class l extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const l=s.TextFieldImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,a.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,a.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,a.YamlKeys.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(e,a.YamlKeys.regex),l}}t.YamlFieldReaderTextField=l},6116(e,t,r){t.YamlFieldWriterTextField=void 0;const n=r(5430),i=r(2099),a=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){a.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),null!=t.valueConstraints.minLength&&(e[i.YamlKeys.minLength]=t.valueConstraints.minLength),null!=t.valueConstraints.maxLength&&(e[i.YamlKeys.maxLength]=t.valueConstraints.maxLength),null!=t.valueConstraints.regex&&(e[i.YamlKeys.regex]=t.valueConstraints.regex)}}t.YamlFieldWriterTextField=s},8053(e,t,r){t.JsonStaticFieldWriter=void 0;const n=r(7752),i=r(455),a=r(2748),s=r(2733),o=r(9251),l=r(936),c=r(5793),d=r(5747),u=r(3746),m=r(2475);class p extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUiNode(e,t){}buildUIObject(e){const t={[l.CedarModel.inputType]:this.atomicWriter.write(e.cedarFieldType.getUiInputType())};return this.expandUiNode(t,e),l.CedarModel.content in t||(t[l.CedarModel.content]=null),{[l.CedarModel.ui]:t}}getAsJsonNode(e,t=i.ChildDeploymentInfo.empty()){const r=this.buildUIObject(e);return t.hidden&&(r[l.CedarModel.ui][l.CedarModel.Ui.hidden]=!0),e.extensions.applyJson({[s.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[s.JsonSchema.atType]:this.atomicWriter.write(e.cedarArtifactType),[s.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(c.JavascriptType.OBJECT),[d.TemplateProperty.title]:e.title,[d.TemplateProperty.description]:e.description,...r,...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroSchemaIdentifier(e),...this.macroAnnotations(e),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[s.JsonSchema.schemaVersion]:this.atomicWriter.write(e.schema_schemaVersion),[d.TemplateProperty.additionalProperties]:this.atomicWriter.write(u.AdditionalProperties.FALSE),[l.CedarModel.schema]:this.atomicWriter.write(m.ArtifactSchema.CURRENT)})}macroContext(e){const t={...o.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM};return e.language!==n.Language.NULL&&(t[s.JsonSchema.atLanguage]=this.atomicWriter.write(e.language)),t}}t.JsonStaticFieldWriter=p},699(e,t){t.isSizedStaticField=function(e){return null!==e&&"width"in e&&"height"in e}},934(e,t,r){t.YamlStaticFieldWriter=void 0;const n=r(9517),i=r(5430),a=r(455);class s extends i.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return super.expandUINodeForYAML(e)}expandSizeForYAML(e){return n.JsonNode.getEmpty()}buildUIObject(e){return this.expandUINodeForYAML(e)}getYamlAsJsonNode(e,t=a.ChildDeploymentInfo.empty(),r=!1,i=!0){return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,i),...this.macroStatusAndVersion(e,r),...this.macroSkos(e),...this.expandUINodeForYAML(e),...t.hasParent()?n.JsonNode.getEmpty():this.expandSizeForYAML(e),...this.macroProvenance(e,r),...this.macroDerivedFrom(e,r),...this.macroPreviousVersion(e,r),...this.macroAnnotations(e)})}}t.YamlStaticFieldWriter=s},9148(e,t,r){t.JsonFieldReaderImage=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(5573);class o extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticImageFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,i.CedarModel.ui);o.content=n.ReaderUtil.getString(l,i.CedarModel.content);const c=n.ReaderUtil.getNode(l,i.CedarModel.size);return o.width=n.ReaderUtil.getNumber(c,i.CedarModel.width),o.height=n.ReaderUtil.getNumber(c,i.CedarModel.height),o}}t.JsonFieldReaderImage=o},8970(e,t,r){t.JsonFieldWriterStaticImage=void 0;const n=r(9517),i=r(936),a=r(8053);class s extends a.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.content&&(e[i.CedarModel.content]=t.content),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[i.CedarModel.width]=t.width),null!==t.height&&(r[i.CedarModel.height]=t.height),e[i.CedarModel.size]=r}}}t.JsonFieldWriterStaticImage=s},3138(e,t,r){t.StaticImageFieldBuilderImpl=void 0;const n=r(3350),i=r(5573);class a extends n.TemplateFieldBuilder{content=null;width=null;height=null;constructor(){super()}static create(){return new a}withContent(e){return this.content=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=i.StaticImageFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e.width=this.width,e.height=this.height,e}}t.StaticImageFieldBuilderImpl=a},5573(e,t,r){t.StaticImageFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{content=null;width=null;height=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_IMAGE,this.cedarArtifactType=a.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticImageFieldImpl=o},7941(e,t,r){t.YamlFieldReaderImage=void 0;const n=r(8748),i=r(2099),a=r(5675),s=r(5573);class o extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticImageFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,i.YamlKeys.content),o.width=n.ReaderUtil.getNumber(e,i.YamlKeys.width),o.height=n.ReaderUtil.getNumber(e,i.YamlKeys.height),o}}t.YamlFieldReaderImage=o},4935(e,t,r){t.YamlFieldWriterStaticImage=void 0;const n=r(9517),i=r(934),a=r(2099);class s extends i.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.content&&(t[a.YamlKeys.content]=e.content),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[a.YamlKeys.width]=e.width),null!==e.height&&(t[a.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticImage=s},5933(e,t,r){t.JsonFieldReaderPageBreak=void 0;const n=r(4385),i=r(9046),a=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,a.CedarModel.ui),a.CedarModel.content),o}}t.JsonFieldReaderPageBreak=o},2347(e,t,r){t.JsonFieldWriterStaticPageBreak=void 0;const n=r(8053),i=r(936);class a extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[i.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticPageBreak=a},2703(e,t,r){t.StaticPageBreakFieldBuilderImpl=void 0;const n=r(3350),i=r(9046);class a extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new a}build(){const e=i.StaticPageBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticPageBreakFieldBuilderImpl=a},9046(e,t,r){t.StaticPageBreakFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_PAGE_BREAK,this.cedarArtifactType=a.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticPageBreakFieldImpl=o},4568(e,t,r){t.YamlFieldReaderPageBreak=void 0;const n=r(5675),i=r(9046),a=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,a.YamlKeys.content),o}}t.YamlFieldReaderPageBreak=o},7594(e,t,r){t.YamlFieldWriterStaticPageBreak=void 0;const n=r(934),i=r(2099),a=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[i.YamlKeys.content]:e.content}:a.JsonNode.getEmpty()}}t.YamlFieldWriterStaticPageBreak=s},6291(e,t,r){t.JsonFieldReaderRichText=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(5548);class o extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticRichTextFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,i.CedarModel.ui);return o.content=n.ReaderUtil.getString(l,i.CedarModel.content),o}}t.JsonFieldReaderRichText=o},6029(e,t,r){t.JsonFieldWriterStaticRichText=void 0;const n=r(936),i=r(8053);class a extends i.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[n.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticRichText=a},9521(e,t,r){t.StaticRichTextFieldBuilderImpl=void 0;const n=r(3350),i=r(5548);class a extends n.TemplateFieldBuilder{content=null;constructor(){super()}static create(){return new a}withContent(e){return this.content=e,this}build(){const e=i.StaticRichTextFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e}}t.StaticRichTextFieldBuilderImpl=a},5548(e,t,r){t.StaticRichTextFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_RICH_TEXT,this.cedarArtifactType=a.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticRichTextFieldImpl=o},1404(e,t,r){t.YamlFieldReaderRichText=void 0;const n=r(8748),i=r(5675),a=r(2099),s=r(5548);class o extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticRichTextFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,a.YamlKeys.content),o}}t.YamlFieldReaderRichText=o},6314(e,t,r){t.YamlFieldWriterStaticRichText=void 0;const n=r(9517),i=r(934),a=r(2099);class s extends i.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[a.YamlKeys.content]:e.content}:n.JsonNode.getEmpty()}}t.YamlFieldWriterStaticRichText=s},6511(e,t,r){t.JsonFieldReaderSectionBreak=void 0;const n=r(4385),i=r(2546),a=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,a.CedarModel.ui),a.CedarModel.content),o}}t.JsonFieldReaderSectionBreak=o},41(e,t,r){t.JsonFieldWriterStaticSectionsBreak=void 0;const n=r(8053),i=r(936);class a extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[i.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticSectionsBreak=a},5795(e,t,r){t.StaticSectionBreakFieldBuilderImpl=void 0;const n=r(3350),i=r(2546);class a extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new a}build(){const e=i.StaticSectionBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticSectionBreakFieldBuilderImpl=a},2546(e,t,r){t.StaticSectionBreakFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_SECTION_BREAK,this.cedarArtifactType=a.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticSectionBreakFieldImpl=o},3980(e,t,r){t.YamlFieldReaderSectionBreak=void 0;const n=r(5675),i=r(2546),a=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=i.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,a.YamlKeys.content),o}}t.YamlFieldReaderSectionBreak=o},6082(e,t,r){t.YAMLFieldWriterStaticSectionsBreak=void 0;const n=r(934),i=r(2099),a=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[i.YamlKeys.content]:e.content}:a.JsonNode.getEmpty()}}t.YAMLFieldWriterStaticSectionsBreak=s},8596(e,t,r){t.JsonFieldReaderYoutube=void 0;const n=r(8748),i=r(936),a=r(4385),s=r(477);class o extends a.JsonTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticYoutubeFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,i.CedarModel.ui);o.videoId=n.ReaderUtil.getString(l,i.CedarModel.content);const c=n.ReaderUtil.getNode(l,i.CedarModel.size);return o.width=n.ReaderUtil.getNumber(c,i.CedarModel.width),o.height=n.ReaderUtil.getNumber(c,i.CedarModel.height),o}}t.JsonFieldReaderYoutube=o},6766(e,t,r){t.JsonFieldWriterStaticYoutube=void 0;const n=r(9517),i=r(936),a=r(8053);class s extends a.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.videoId&&(e[i.CedarModel.content]=t.videoId),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[i.CedarModel.width]=t.width),null!==t.height&&(r[i.CedarModel.height]=t.height),e[i.CedarModel.size]=r}}}t.JsonFieldWriterStaticYoutube=s},7674(e,t,r){t.StaticYoutubeFieldBuilderImpl=void 0;const n=r(3350),i=r(477);class a extends n.TemplateFieldBuilder{videoId=null;width=null;height=null;constructor(){super()}static create(){return new a}withVideoId(e){return this.videoId=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=i.StaticYoutubeFieldImpl.buildEmpty();return super.buildInternal(e),e.videoId=this.videoId,e.width=this.width,e.height=this.height,e}}t.StaticYoutubeFieldBuilderImpl=a},477(e,t,r){t.StaticYoutubeFieldImpl=void 0;const n=r(9129),i=r(4869),a=r(2763),s=r(8290);class o extends n.TemplateField{videoId=null;width=null;height=null;constructor(){super(),this.cedarFieldType=i.CedarFieldType.STATIC_YOUTUBE,this.cedarArtifactType=a.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticYoutubeFieldImpl=o},7089(e,t,r){t.YamlFieldReaderYoutube=void 0;const n=r(8748),i=r(5675),a=r(2099),s=r(477);class o extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticYoutubeFieldImpl.buildEmpty();return o.videoId=n.ReaderUtil.getString(e,a.YamlKeys.content),o.width=n.ReaderUtil.getNumber(e,a.YamlKeys.width),o.height=n.ReaderUtil.getNumber(e,a.YamlKeys.height),o}}t.YamlFieldReaderYoutube=o},1903(e,t,r){t.YamlFieldWriterStaticYoutube=void 0;const n=r(9517),i=r(934),a=r(2099);class s extends i.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.videoId&&(t[a.YamlKeys.content]=e.videoId),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[a.YamlKeys.width]=e.width),null!==e.height&&(t[a.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticYoutube=s},4033(e,t,r){t.AttributeValueNamePolicy=void 0;const n=r(3992),i=r(5588),a=r(9327),s=r(3644),o=r(7723);class l{constructor(){}static isReserved(e){return i.ReservedNames.isReservedName(e)}static findConflicts(e,t="template",r=!1){const n=[];return l.scanContainer(e,[],n,t,r),n}static locationOf(e){return"reservedField"===e.kind?[...e.path,e.groupName]:[...e.path,e.groupName,e.name]}static assertValid(e){const t=l.findConflicts(e)[0];if(void 0===t)return;const r=l.locationOf(t).join("/");if("reservedField"===t.kind)throw new Error(`Attribute-value field name "${t.name}" at /${r} is reserved for CEDAR instance metadata`);const n="reserved"===t.kind?"is reserved for instance metadata":"blank"===t.kind?"must not be blank":"sibling"===t.kind?"collides with another child in the same object":`is also used by attribute-value field "${t.conflictingGroupName}"`;throw new Error(`Attribute-value name "${t.name}" at /${r} ${n}`)}static scanContainer(e,t,r,a,s){for(const t of Object.keys(e.values))i.ReservedNames.requireChildName(t);const o=l.attributeValueGroups(e),c=new Set(o.map(e=>e.name)),d=new Set(o.filter(e=>e.unpacked).flatMap(e=>e.attributeNames)),u=new Set(Object.keys(e.values).filter(e=>!c.has(e)&&!d.has(e))),m=new Map;for(const e of o){i.ReservedNames.isReservedAttributeValueFieldName(e.name,a)&&r.push({kind:"reservedField",name:e.name,groupName:e.name,path:t});const o=new Set;for(const i of e.attributeNames){if(n.TextPolicy.isBlank(i)){s&&r.push({kind:"blank",name:i,groupName:e.name,path:t});continue}l.isReserved(i)&&r.push({kind:"reserved",name:i,groupName:e.name,path:t}),(u.has(i)||c.has(i))&&r.push({kind:"sibling",name:i,groupName:e.name,path:t}),o.has(i)?r.push({kind:"duplicate",name:i,groupName:e.name,path:t,conflictingGroupName:e.name}):o.add(i);const a=m.get(i);void 0!==a&&a!==e.name?r.push({kind:"duplicate",name:i,groupName:e.name,path:t,conflictingGroupName:a}):m.set(i,e.name)}}for(const[n,i]of Object.entries(e.values))c.has(n)||d.has(n)||l.scanValue(i,[...t,n],r,s)}static scanValue(e,t,r,n){e instanceof o.InstanceDataContainer?l.scanContainer(e,t,r,"element",n):Array.isArray(e)&&e.forEach((e,i)=>l.scanValue(e,[...t,i],r,n))}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof a.InstanceDataAttributeValueField)t.push({name:r,attributeNames:Object.keys(n.values),unpacked:!1});else if(Array.isArray(n)){const e=n.filter(e=>e instanceof s.InstanceDataAttributeValueFieldName).map(e=>e.name);e.length>0&&t.push({name:r,attributeNames:e,unpacked:!0})}return t}}t.AttributeValueNamePolicy=l},9327(e,t,r){t.InstanceDataAttributeValueField=void 0;const n=r(5588);t.InstanceDataAttributeValueField=class{_name;_values=Object.create(null);_iris;constructor(e){this._name=e,this._values=Object.create(null),this._iris=Object.create(null)}addValue(e,t){n.ReservedNames.requireChildName(e),this._values[e]=t}get name(){return this._name}get values(){return this._values}setIri(e,t){this._iris[e]=t}get iris(){return this._iris}}},3644(e,t){t.InstanceDataAttributeValueFieldName=void 0,t.InstanceDataAttributeValueFieldName=class{_name;constructor(e){this._name=e}get name(){return this._name}}},7723(e,t,r){t.InstanceDataContainer=void 0;const n=r(5588);t.InstanceDataContainer=class{_id=null;_values;_iris;constructor(){this._values=Object.create(null),this._iris=Object.create(null)}setValue(e,t){n.ReservedNames.requireChildName(e),this._values[e]=t}hasValue(e){return Object.hasOwn(this._values,e)}removeValue(e){delete this._values[e],delete this._iris[e]}get values(){return this._values}set values(e){for(const t of Object.keys(e))n.ReservedNames.requireChildName(t);this._values=Object.assign(Object.create(null),e)}setIri(e,t){this._iris[e]=t}hasIri(e){return Object.hasOwn(this._iris,e)}removeIri(e){delete this._iris[e]}get iris(){return this._iris}set id(e){this._id=e}get id(){return this._id}}},8193(e,t,r){t.InstanceDataControlledAtom=void 0;const n=r(7571);class i{language=null;preferredLabel=null;notation=null;_id;_type;_label;constructor(e,t,r,i=null){if(r!==n.PARSED_NODE&&((0,n.assertIri)(e,"InstanceDataControlledAtom"),null==t||""===t))throw new Error("InstanceDataControlledAtom requires a label. An IRI on its own is a link, not a controlled term.");this._id=e,this._type=r===n.PARSED_NODE?i:r??null,this._label=t}static fromParsedNode(e,t,r=null){return new i(e,t,n.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}get label(){return this._label}}t.InstanceDataControlledAtom=i},7548(e,t){t.InstanceDataEmptyAtom=void 0,t.InstanceDataEmptyAtom=class{_discarded;constructor(e=null){this._discarded=e}get discarded(){return this._discarded}hasDiscardedContent(){return null!==this._discarded&&Object.keys(this._discarded).length>0}}},4465(e,t){t.InstanceDataEmptyNode=void 0,t.InstanceDataEmptyNode=class{}},9167(e,t){t.InstanceDataLabelAtom=void 0,t.InstanceDataLabelAtom=class{label;type;language=null;preferredLabel=null;notation=null;constructor(e,t=null){this.label=e,this.type=t}}},7571(e,t){function r(e,t){if(null==e||""===e)throw new Error(`${t} requires an IRI. An IRI-valued field with nothing in it is an empty node, not a null IRI.`)}t.InstanceDataLinkAtom=t.PARSED_NODE=void 0,t.assertIri=r,t.PARSED_NODE=Symbol("parsed node");class n{language=null;preferredLabel=null;notation=null;_id;_type;constructor(e,n,i=null){n!==t.PARSED_NODE&&r(e,"InstanceDataLinkAtom"),this._id=e,this._type=n===t.PARSED_NODE?i:n??null}static fromParsedNode(e,r=null){return new n(e,t.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}}t.InstanceDataLinkAtom=n},1625(e,t){t.InstanceDataNotationAtom=void 0,t.InstanceDataNotationAtom=class{notation;type;language=null;preferredLabel=null;constructor(e,t=null){this.notation=e,this.type=t}}},5222(e,t){t.InstanceDataStringAtom=void 0,t.InstanceDataStringAtom=class{label;language=null;preferredLabel=null;notation=null;_value;constructor(e,t=null){this.label=t,this._value=e}get value(){return this._value}}},4877(e,t){t.InstanceDataTypedAtom=void 0,t.InstanceDataTypedAtom=class{label;language=null;preferredLabel=null;notation=null;_value;_type;constructor(e,t,r=null){if(this.label=r,null==t||""===t)throw new Error("InstanceDataTypedAtom requires a type. A literal with no declared type is an InstanceDataStringAtom.");this._value=e,this._type=t}get value(){return this._value}get type(){return this._type}}},9961(e,t,r){t.InstanceInflater=void 0;const n=r(9129),i=r(4869),a=r(1211),s=r(3567),o=r(5222),l=r(4877),c=r(7723),d=r(4465),u=r(2763),m=r(7661),p=r(513),h=r(3812);class f{constructor(){}static inflate(e,t,r="lowerBound"){return f.inflateContainer(e.dataContainer,t,r),e}static emptyField(e){return e.valueConstraints instanceof a.ValueConstraintsNumericField?new l.InstanceDataTypedAtom(null,e.valueConstraints.numberType.getValue()??"xsd:decimal"):e.valueConstraints instanceof s.ValueConstraintsTemporalField?new l.InstanceDataTypedAtom(null,e.valueConstraints.temporalType.getValue()??"xsd:dateTime"):[i.CedarFieldType.CONTROLLED_TERM,i.CedarFieldType.LINK,i.CedarFieldType.EXT_ROR,i.CedarFieldType.EXT_ORCID,i.CedarFieldType.EXT_PFAS,i.CedarFieldType.EXT_PUBMED,i.CedarFieldType.EXT_RRID,i.CedarFieldType.EXT_NIH_GRANT_ID,i.CedarFieldType.EXT_DOI].includes(e.cedarFieldType)?new d.InstanceDataEmptyNode:new o.InstanceDataStringAtom(null)}static startingOccurrences(e,t){if(e instanceof n.TemplateField&&e.cedarFieldType===i.CedarFieldType.ATTRIBUTE_VALUE)return[];const r=(t instanceof h.AbstractDynamicChildDeploymentInfo?t.minItems:null)??p.AbstractChildDeploymentInfo.defaultMinItems;return Array.from({length:r},()=>e instanceof m.TemplateElement?new c.InstanceDataContainer:e instanceof n.TemplateField?f.emptyField(e):new d.InstanceDataEmptyNode)}static inflateContainer(e,t,r){const i=t.getChildrenInfo(),a=i.getChildIriMap();Object.keys(a).forEach(t=>e.setIri(t,a[t]));const s={};i.getChildrenNames().forEach(i=>{const a=t.getChild(i);let o=e.values[i];if(void 0===o){if(t.getChildInfo(i)?.atType===u.CedarArtifactType.STATIC_TEMPLATE_FIELD)return;const e=t.getChildInfo(i);o=e?.isMultiInAnyWay()?"empty"===r?[]:f.startingOccurrences(a,e):a instanceof m.TemplateElement?new c.InstanceDataContainer:a instanceof n.TemplateField?f.emptyField(a):new d.InstanceDataEmptyNode}a instanceof m.TemplateElement&&(o instanceof c.InstanceDataContainer?f.inflateContainer(o,a,r):Array.isArray(o)&&o.forEach(e=>{e instanceof c.InstanceDataContainer&&f.inflateContainer(e,a,r)})),s[i]=o}),Object.keys(e.values).forEach(t=>{Object.hasOwn(s,t)||(s[t]=e.values[t])}),e.values=s}}t.InstanceInflater=f},8410(e,t,r){t.InstanceValidator=void 0;const n=r(7723),i=r(7548),a=r(4465),s=r(5222),o=r(4877),l=r(3812),c=r(7661),d=r(4036),u=r(2888),m=r(9760),p=r(3188),h=r(9034),f=r(9327),y=r(3644),T=r(4033),g=r(2763),E=r(9129),C=r(6320),I=r(6830),A=r(7092),b=r(3939),R="InstanceValidator";class v{constructor(){}static validate(e,t){const r=new d.JsonArtifactParsingResult;return v.validateContainer(e.dataContainer,t,new p.JsonPath,r),r}static validateReport(e,t){return this.validate(e,t).getValidationReport()}static validateContainer(e,t,r,n){const i=t.getChildrenInfo(),a=new Set(v.attributeValueGroups(e).filter(([e])=>i.get(e)?.uiInputType===h.UiInputType.ATTRIBUTE_VALUE).flatMap(([,e])=>e));for(const t of Object.keys(e.values))null!==i.get(t)||a.has(t)||n.addValidationFinding(A.ValidationPolicy.finding("valueShape",r.add(t).toPointer(),"The template does not declare this property."));const s=t.cedarArtifactType===g.CedarArtifactType.TEMPLATE?"template":"element";for(const t of T.AttributeValueNamePolicy.findConflicts(e,s).filter(e=>0===e.path.length))n.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.VALUE_MISMATCH,r.add(...T.AttributeValueNamePolicy.locationOf(t)),"a unique, non-reserved attribute-value name",t.name));for(const[t,a]of v.attributeValueGroups(e))for(const e of a){const a=i.get(e);null!==a&&a.atType!==g.CedarArtifactType.STATIC_TEMPLATE_FIELD&&n.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.VALUE_MISMATCH,r.add(t,e),"a name different from every serializable template child",e))}for(const t of i.getChildrenNamesForRequiredInProperties())Object.hasOwn(e.values,t)||n.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add(t),t));for(const a of i.getChildrenNames()){const s=i.get(a);if(s?.uiInputType===h.UiInputType.ATTRIBUTE_VALUE)continue;const o=e.values[a];void 0!==o&&v.validateChild(a,o,s,t.getChild(a),r.add(a),n)}}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof f.InstanceDataAttributeValueField)t.push([r,Object.keys(n.values)]);else if(Array.isArray(n)){const e=n.filter(e=>e instanceof y.InstanceDataAttributeValueFieldName).map(e=>e.name??"").filter(e=>e.length>0);e.length>0&&t.push([r,e])}return t}static validateChild(e,t,r,n,i,a){const s=r?.isMultiInAnyWay()??!1,o=Array.isArray(t)?t:null,l=null!==o;if(s===l)return null!==o?(v.validateCardinality(o,r,i,a),void o.forEach((e,t)=>v.validateItem(e,n,i.add(t),a))):void v.validateItem(t,n,i,a);a.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.VALUE_MISMATCH,i,s?"a list of values":"a single value",l?"a list of values":"a single value"))}static validateCardinality(e,t,r,n){if(!(t instanceof l.AbstractDynamicChildDeploymentInfo))return;const{minItems:i,maxItems:a}=t;null!==i&&e.length<i&&n.addValidationFinding(A.ValidationPolicy.finding("minItems",r.toPointer(),`Fewer than ${i} entries.`)),null!==a&&e.length>a&&n.addValidationFinding(A.ValidationPolicy.finding("maxItems",r.toPointer(),`More than ${a} entries.`))}static validateItem(e,t,r,a){if(t instanceof c.TemplateElement)e instanceof n.InstanceDataContainer?v.validateContainer(e,t,r,a):v.isEmpty(e)?v.validateContainer(new n.InstanceDataContainer,t,r,a):a.addBlueprintComparisonError(new u.ComparisonError(R,m.ComparisonErrorType.VALUE_MISMATCH,r,"an element","a field value"));else if(t instanceof E.TemplateField){const n=(0,b.validationFieldSchema)(t),s=r.toPointer();for(const e of I.FieldValuePolicy.validateConfiguration(n,s))a.addValidationFinding(e);if(e instanceof i.InstanceDataEmptyAtom&&e.hasDiscardedContent())return void a.addValidationFinding(A.ValidationPolicy.finding("valueShape",s,"The supplied node contains an unrecognized value shape."));const o=C.JsonTemplateInstanceWriter.writeValueNode(e);for(const e of I.FieldValuePolicy.validateNode(n,o,s)){let t;if(("valueType"===e.code||"missingProperty"===e.code&&e.path.endsWith("/@type"))&&o){const e=n._valueConstraints?.numberType??n._valueConstraints?.temporalType;t=new u.ComparisonError("ValidationPolicy",Object.hasOwn(o,"@type")?m.ComparisonErrorType.VALUE_MISMATCH:m.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add("@type"),e,"string"==typeof o["@type"]?o["@type"]:void 0)}else"iriMalformed"===e.code&&o&&null===o["@id"]&&(t=new u.ComparisonError("ValidationPolicy",m.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,r.add("@id"),"an IRI",null));a.addValidationFinding(e,"instance",t)}o&&"object"==typeof o&&"string"==typeof o["@id"]&&(I.FieldValuePolicy.isControlled(n)||I.FieldValuePolicy.authorityTypes.has(n._ui?.inputType??""))&&a.addValidationFinding(A.ValidationPolicy.finding("semanticNotChecked",s+"/@id","Identifier membership or existence has not been verified.","notChecked"))}}static isEmpty(e){return e instanceof i.InstanceDataEmptyAtom||e instanceof a.InstanceDataEmptyNode||(e instanceof s.InstanceDataStringAtom||e instanceof o.InstanceDataTypedAtom)&&null===e.value}}t.InstanceValidator=v},2272(e,t,r){t.TemplateInstance=void 0;const n=r(2763),i=r(5697),a=r(7723);class s extends i.AbstractInstanceArtifact{dataContainer;descriptionWasAbsent=!1;constructor(){super(),this.cedarArtifactType=n.CedarArtifactType.TEMPLATE_INSTANCE,this.dataContainer=new a.InstanceDataContainer}static buildEmptyWithNullValues(){return new s}}t.TemplateInstance=s},4925(e,t,r){t.TemplateInstanceBuilder=void 0;const n=r(1641),i=r(2272),a=r(7723),s=r(8534);class o extends n.AbstractArtifactBuilder{schema_isBasedOn=s.CedarArtifactId.NULL;dataContainer=new a.InstanceDataContainer;withSchemaIsBasedOn(e){return e instanceof s.CedarArtifactId?this.schema_isBasedOn=e:this.schema_isBasedOn=s.CedarArtifactId.forValue(e),this}withDataValue(e,t){return this.dataContainer.setValue(e,t),this}withDataIri(e,t){return this.dataContainer.setIri(e,t),this}withDataId(e){return this.dataContainer.id=e,this}withDataContainer(e){return this.dataContainer=e,this}build(){const e=i.TemplateInstance.buildEmptyWithNullValues();return e.at_id=this.at_id,e.pav_createdOn=this.pav_createdOn,e.pav_createdBy=this.pav_createdBy,e.pav_lastUpdatedOn=this.pav_lastUpdatedOn,e.oslc_modifiedBy=this.oslc_modifiedBy,e.pav_derivedFrom=this.pav_derivedFrom,e.schema_name=this.schema_name,e.schema_description=this.schema_description,e.schema_isBasedOn=this.schema_isBasedOn,e.dataContainer=this.dataContainer,e}}t.TemplateInstanceBuilder=o},3281(e,t,r){t.Template=void 0;const n=r(3910),i=r(8557),a=r(1027),s=r(5451),o=r(2763);class l extends s.AbstractContainerArtifact{header=null;footer=null;constructor(){super(),this.cedarArtifactType=o.CedarArtifactType.TEMPLATE}static buildEmptyWithNullValues(){return new l}static buildEmptyWithDefaultValues(){const e=new l;return e.schema_schemaVersion=i.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=a.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){throw new Error("Method not supported.")}}t.Template=l},766(e,t,r){t.TemplateBuilder=void 0;const n=r(3281),i=r(1641);class a extends i.AbstractArtifactBuilder{header=null;footer=null;instanceTypeSpecification=null;children=[];withHeader(e){return this.header=e,this}withFooter(e){return this.footer=e,this}withInstanceTypeSpecification(e){return this.instanceTypeSpecification=e,this}addChild(e,t){return this.children.push([e,t]),this}build(){const e=n.Template.buildEmptyWithNullValues();return super.buildInternal(e),e.header=this.header,e.footer=this.footer,e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateBuilder=a},9517(e,t){t.JsonNode=void 0,t.JsonNode=class{static getEmpty(){return{}}static getEmptyList(){return[]}static hasEntries(e){return Object.keys(e).length>0}}},4531(e,t){t.BioportalTermType=t.BioportalTermTypeYamlValues=t.P=void 0,t.P={ONTOLOGY_CLASS:"OntologyClass",VALUE:"Value"},t.BioportalTermTypeYamlValues={ONTOLOGY_CLASS:"class",VALUE:"value"};class r{jsonValue;yamlValue;constructor(e,t){this.jsonValue=e,this.yamlValue=t}getJsonValue(){return this.jsonValue}getYamlValue(){return this.yamlValue}static ONTOLOGY_CLASS=new r(t.P.ONTOLOGY_CLASS,t.BioportalTermTypeYamlValues.ONTOLOGY_CLASS);static VALUE=new r(t.P.VALUE,t.BioportalTermTypeYamlValues.VALUE);static NULL=new r(null,null);static values(){return[r.ONTOLOGY_CLASS,r.VALUE]}static forJsonValue(e){for(const t of r.values())if(t.getJsonValue()===e)return t;return this.NULL}static forYamlValue(e){for(const t of r.values())if(t.getYamlValue()===e)return t;return this.NULL}}t.BioportalTermType=r},8534(e,t){t.CedarArtifactId=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e||""===e?r.NULL:new r(e)}}t.CedarArtifactId=r},2763(e,t){t.CedarArtifactType=t.df=t.KW=void 0,t.KW={TEMPLATE:"https://schema.metadatacenter.org/core/Template",TEMPLATE_ELEMENT:"https://schema.metadatacenter.org/core/TemplateElement",TEMPLATE_FIELD:"https://schema.metadatacenter.org/core/TemplateField",STATIC_TEMPLATE_FIELD:"https://schema.metadatacenter.org/core/StaticTemplateField",TEMPLATE_INSTANCE:"TemplateInstance"},t.df={TEMPLATE:"template",TEMPLATE_ELEMENT:"templateElement",TEMPLATE_FIELD:"templateField",STATIC_TEMPLATE_FIELD:"staticTemplateField",TEMPLATE_INSTANCE:"instance"};class r{value;yamlValue;constructor(e,t){this.value=e,this.yamlValue=t}getValue(){return this.value}getYamlValue(){return this.yamlValue}static TEMPLATE=new r(t.KW.TEMPLATE,t.df.TEMPLATE);static TEMPLATE_ELEMENT=new r(t.KW.TEMPLATE_ELEMENT,t.df.TEMPLATE_ELEMENT);static TEMPLATE_FIELD=new r(t.KW.TEMPLATE_FIELD,t.df.TEMPLATE_FIELD);static STATIC_TEMPLATE_FIELD=new r(t.KW.STATIC_TEMPLATE_FIELD,t.df.STATIC_TEMPLATE_FIELD);static TEMPLATE_INSTANCE=new r(t.KW.TEMPLATE_INSTANCE,t.df.TEMPLATE_INSTANCE);static NULL=new r(null,null);static values(){return[r.TEMPLATE,r.TEMPLATE_ELEMENT,r.TEMPLATE_FIELD,r.STATIC_TEMPLATE_FIELD,r.TEMPLATE_INSTANCE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static forYamlArtifactType(e){return e.isTemplate()?r.TEMPLATE:e.isElement()?r.TEMPLATE_ELEMENT:e.isDynamicField()?r.TEMPLATE_FIELD:e.isStaticField()?r.STATIC_TEMPLATE_FIELD:e.isTemplateInstance()?r.TEMPLATE_INSTANCE:r.NULL}}t.CedarArtifactType=r},8421(e,t){t.CedarFieldCategory=t.I=void 0,t.I={STATIC:"STATIC-field",DYNAMIC:"DYNAMIC-field",NONE:"NONE"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static values(){return[r.STATIC,r.DYNAMIC,r.NONE]}static STATIC=new r(t.I.STATIC);static DYNAMIC=new r(t.I.DYNAMIC);static NONE=new r(t.I.NONE);static NULL=new r(null)}t.CedarFieldCategory=r},4869(e,t,r){t.CedarFieldType=t.K=void 0;const n=r(9034),i=r(9499);t.K={TEXTFIELD:"DYNAMIC-textfield",TEXTAREA:"DYNAMIC-textarea",CONTROLLED_TERM:"DYNAMIC-controlled-term",LINK:"DYNAMIC-link",EXT_ROR:"DYNAMIC-ext-ror",EXT_ORCID:"DYNAMIC-ext-orcid",EXT_PFAS:"DYNAMIC-ext-pfas",EXT_PUBMED:"DYNAMIC-ext-pubmed",EXT_RRID:"DYNAMIC-ext-rrid",EXT_NIH_GRANT_ID:"DYNAMIC-ext-nih-grant-id",EXT_DOI:"DYNAMIC-ext-doi",TEMPORAL:"DYNAMIC-temporal",EMAIL:"DYNAMIC-email",NUMERIC:"DYNAMIC-numeric",PHONE_NUMBER:"DYNAMIC-phone-number",RADIO:"DYNAMIC-radio",CHECKBOX:"DYNAMIC-checkbox",SINGLE_SELECT_LIST:"DYNAMIC-single-select-list",MULTIPLE_SELECT_LIST:"DYNAMIC-multiple-select-list",ATTRIBUTE_VALUE:"DYNAMIC-attribute-value",STATIC_PAGE_BREAK:"STATIC-page-break",STATIC_SECTION_BREAK:"STATIC-section-break",STATIC_IMAGE:"STATIC-image",STATIC_RICH_TEXT:"STATIC-rich_text",STATIC_YOUTUBE:"STATIC-youtube"};class a{value;_uiInputType;_yamlType;staticField;constructor(e,t,r,n){this.value=e,this._uiInputType=t,this._yamlType=r,this.staticField=n}getValue(){return this.value}getUiInputType(){return this._uiInputType}getYamlType(){return this._yamlType}get isStaticField(){return this.staticField}get recordsRequirement(){return!this.staticField&&this.value!==t.K.ATTRIBUTE_VALUE}static values(){return[a.TEXT,a.TEXTAREA,a.CONTROLLED_TERM,a.LINK,a.EXT_ROR,a.EXT_ORCID,a.EXT_PFAS,a.EXT_PUBMED,a.EXT_RRID,a.EXT_NIH_GRANT_ID,a.EXT_DOI,a.TEMPORAL,a.EMAIL,a.NUMERIC,a.PHONE_NUMBER,a.RADIO,a.CHECKBOX,a.SINGLE_SELECT_LIST,a.MULTIPLE_SELECT_LIST,a.ATTRIBUTE_VALUE,a.STATIC_PAGE_BREAK,a.STATIC_SECTION_BREAK,a.STATIC_IMAGE,a.STATIC_RICH_TEXT,a.STATIC_YOUTUBE]}static TEXT=new a(t.K.TEXTFIELD,n.UiInputType.TEXTFIELD,i.YamlArtifactType.TEXTFIELD,!1);static TEXTAREA=new a(t.K.TEXTAREA,n.UiInputType.TEXTAREA,i.YamlArtifactType.TEXTAREA,!1);static CONTROLLED_TERM=new a(t.K.CONTROLLED_TERM,n.UiInputType.TEXTFIELD,i.YamlArtifactType.CONTROLLED_TERM,!1);static LINK=new a(t.K.LINK,n.UiInputType.LINK,i.YamlArtifactType.LINK,!1);static EXT_ROR=new a(t.K.EXT_ROR,n.UiInputType.EXT_ROR,i.YamlArtifactType.EXT_ROR,!1);static EXT_ORCID=new a(t.K.EXT_ORCID,n.UiInputType.EXT_ORCID,i.YamlArtifactType.EXT_ORCID,!1);static EXT_PFAS=new a(t.K.EXT_PFAS,n.UiInputType.EXT_PFAS,i.YamlArtifactType.EXT_PFAS,!1);static EXT_PUBMED=new a(t.K.EXT_PUBMED,n.UiInputType.EXT_PUBMED,i.YamlArtifactType.EXT_PUBMED,!1);static EXT_RRID=new a(t.K.EXT_RRID,n.UiInputType.EXT_RRID,i.YamlArtifactType.EXT_RRID,!1);static EXT_NIH_GRANT_ID=new a(t.K.EXT_NIH_GRANT_ID,n.UiInputType.EXT_NIH_GRANT_ID,i.YamlArtifactType.EXT_NIH_GRANT_ID,!1);static EXT_DOI=new a(t.K.EXT_DOI,n.UiInputType.EXT_DOI,i.YamlArtifactType.EXT_DOI,!1);static TEMPORAL=new a(t.K.TEMPORAL,n.UiInputType.TEMPORAL,i.YamlArtifactType.TEMPORAL,!1);static EMAIL=new a(t.K.EMAIL,n.UiInputType.EMAIL,i.YamlArtifactType.EMAIL,!1);static NUMERIC=new a(t.K.NUMERIC,n.UiInputType.NUMERIC,i.YamlArtifactType.NUMERIC,!1);static PHONE_NUMBER=new a(t.K.PHONE_NUMBER,n.UiInputType.PHONE_NUMBER,i.YamlArtifactType.PHONE_NUMBER,!1);static RADIO=new a(t.K.RADIO,n.UiInputType.RADIO,i.YamlArtifactType.RADIO,!1);static CHECKBOX=new a(t.K.CHECKBOX,n.UiInputType.CHECKBOX,i.YamlArtifactType.CHECKBOX,!1);static SINGLE_SELECT_LIST=new a(t.K.SINGLE_SELECT_LIST,n.UiInputType.LIST,i.YamlArtifactType.SINGLE_SELECT_LIST,!1);static MULTIPLE_SELECT_LIST=new a(t.K.MULTIPLE_SELECT_LIST,n.UiInputType.LIST,i.YamlArtifactType.MULTI_SELECT_LIST,!1);static ATTRIBUTE_VALUE=new a(t.K.ATTRIBUTE_VALUE,n.UiInputType.ATTRIBUTE_VALUE,i.YamlArtifactType.ATTRIBUTE_VALUE,!1);static STATIC_PAGE_BREAK=new a(t.K.STATIC_PAGE_BREAK,n.UiInputType.PAGE_BREAK,i.YamlArtifactType.PAGE_BREAK,!0);static STATIC_SECTION_BREAK=new a(t.K.STATIC_SECTION_BREAK,n.UiInputType.SECTION_BREAK,i.YamlArtifactType.SECTION_BREAK,!0);static STATIC_IMAGE=new a(t.K.STATIC_IMAGE,n.UiInputType.IMAGE,i.YamlArtifactType.IMAGE,!0);static STATIC_RICH_TEXT=new a(t.K.STATIC_RICH_TEXT,n.UiInputType.RICH_TEXT,i.YamlArtifactType.RICH_TEXT,!0);static STATIC_YOUTUBE=new a(t.K.STATIC_YOUTUBE,n.UiInputType.YOUTUBE,i.YamlArtifactType.YOUTUBE,!0);static NULL=new a(null,n.UiInputType.NULL,i.YamlArtifactType.NULL,!0);static forUiInputType(e){for(const t of a.values())if(t.getUiInputType()===e)return t;return this.NULL}static forYamlArtifactType(e){for(const t of a.values())if(t.getYamlType()===e)return t;return this.NULL}}t.CedarFieldType=a},2234(e,t){t.CedarUser=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e?r.NULL:new r(e)}}t.CedarUser=r},3746(e,t){t.AdditionalProperties=t.P=void 0,t.P={FALSE:"false",ALLOW_ATTRIBUTE_VALUE:"allow-attribute-value"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static FALSE=new r(t.P.FALSE);static ALLOW_ATTRIBUTE_VALUE=new r(t.P.ALLOW_ATTRIBUTE_VALUE);static NULL=new r(null);static values(){return[r.FALSE,r.ALLOW_ATTRIBUTE_VALUE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.AdditionalProperties=r},2475(e,t){t.ArtifactSchema=t.T=void 0,t.T={CURRENT:"http://json-schema.org/draft-04/schema#"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static CURRENT=new r(t.T.CURRENT);static NULL=new r(null);static forValue(e){return new r(null===e?t.T.CURRENT:e)}}t.ArtifactSchema=r},3910(e,t){t.BiboStatus=t.BiboStatusYamlValues=t.l=void 0,t.l={DRAFT:"bibo:draft",PUBLISHED:"bibo:published"},t.BiboStatusYamlValues={DRAFT:"draft",PUBLISHED:"published"};class r{jsonValue;yamlValue;constructor(e,t){this.jsonValue=e,this.yamlValue=t}getJsonValue(){return this.jsonValue}getYamlValue(){return this.yamlValue}static DRAFT=new r(t.l.DRAFT,t.BiboStatusYamlValues.DRAFT);static PUBLISHED=new r(t.l.PUBLISHED,t.BiboStatusYamlValues.PUBLISHED);static NULL=new r(null,null);static values(){return[r.DRAFT,r.PUBLISHED]}static forJsonValue(e){for(const t of r.values())if(t.getJsonValue()===e)return t;return this.NULL}static forYamlValue(e){for(const t of r.values())if(t.getYamlValue()===e)return t;return this.NULL}}t.BiboStatus=r},8802(e,t){t.Iri=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static empty(){return new r("")}isEmpty(){return""===this.value}}t.Iri=r},9857(e,t,r){t.IsoDate=void 0;const n=r(5435);class i{value;constructor(e){this.value=e}static NULL=new i(null);getValue(){return this.value}static forValue(e){return null===e||""===e?i.NULL:new i(n.TimestampPolicy.canonical(e))}static now(){const e=new Date,t=new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().slice(0,-1);return i.forValue(t+this.getCurrentGMTOffset())}static getCurrentGMTOffset(){const e=(new Date).getTimezoneOffset(),t=Math.abs(e),r=t%60;return`${e>0?"-":"+"}${Math.floor(t/60).toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}}t.IsoDate=i},5793(e,t){t.JavascriptType=t.W=void 0,t.W={ARRAY:"array",OBJECT:"object",STRING:"string"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static ARRAY=new r(t.W.ARRAY);static OBJECT=new r(t.W.OBJECT);static STRING=new r(t.W.STRING);static NULL=new r(null);static values(){return[r.ARRAY,r.OBJECT,r.STRING]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.JavascriptType=r},7752(e,t){t.Language=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e||""===e?r.NULL:new r(e)}}t.Language=r},3447(e,t){t.NumberType=t.NumberTypeValues=void 0,t.NumberTypeValues={DECIMAL:"xsd:decimal",INT:"xsd:int",LONG:"xsd:long",BYTE:"xsd:byte",SHORT:"xsd:short",FLOAT:"xsd:float",DOUBLE:"xsd:double"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static DECIMAL=new r(t.NumberTypeValues.DECIMAL);static INT=new r(t.NumberTypeValues.INT);static LONG=new r(t.NumberTypeValues.LONG);static BYTE=new r(t.NumberTypeValues.BYTE);static SHORT=new r(t.NumberTypeValues.SHORT);static FLOAT=new r(t.NumberTypeValues.FLOAT);static DOUBLE=new r(t.NumberTypeValues.DOUBLE);static NULL=new r(null);static values(){return[r.DECIMAL,r.INT,r.LONG,r.BYTE,r.SHORT,r.FLOAT,r.DOUBLE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.NumberType=r},1027(e,t,r){t.PavVersion=t.o=void 0;const n=r(4506);t.o={DEFAULT:"0.0.1"};class i extends n.SemVer{static DEFAULT=new i(t.o.DEFAULT);static NULL=new i(null);static values(){return[i.DEFAULT,i.NULL]}static forValue(e){for(const t of i.values())if(t.getValue()===e)return t;return new i(e)}}t.PavVersion=i},6389(e,t,r){t.PropertyIri=void 0;const n=r(936);t.PropertyIri=class{static get namespace(){return n.CedarModel.propertyIriPrefix}}},8557(e,t,r){t.SchemaVersion=t.y=void 0;const n=r(4506);t.y={CURRENT:"1.6.0"};class i extends n.SemVer{static CURRENT=new i(t.y.CURRENT);static NULL=new i(null);static values(){return[i.CURRENT]}static forValue(e){for(const t of i.values())if(t.getValue()===e)return t;return new i(e)}}t.SchemaVersion=i},4506(e,t){t.SemVer=void 0,t.SemVer=class{value;constructor(e){this.value=this.validateVersion(e)}getValue(){return this.value}validateVersion(e){if(null===e)return e;const t=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(e);if(null===t||t.slice(1).some(e=>e.length>10||Number(e)>2147483647))throw new Error(`Invalid version "${e}": expected three numbers without leading zeros, separated by periods.`);if("0.0.0"===e)throw new Error('Invalid version "0.0.0": a version is not all zeros.');return e}}},7974(e,t){t.TemporalGranularity=t.TemporalGranularityValues=void 0,t.TemporalGranularityValues={YEAR:"year",MONTH:"month",DAY:"day",HOUR:"hour",MINUTE:"minute",SECOND:"second",DECIMAL_SECOND:"decimalSecond"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static YEAR=new r(t.TemporalGranularityValues.YEAR);static MONTH=new r(t.TemporalGranularityValues.MONTH);static DAY=new r(t.TemporalGranularityValues.DAY);static HOUR=new r(t.TemporalGranularityValues.HOUR);static MINUTE=new r(t.TemporalGranularityValues.MINUTE);static SECOND=new r(t.TemporalGranularityValues.SECOND);static DECIMAL_SECOND=new r(t.TemporalGranularityValues.DECIMAL_SECOND);static NULL=new r(null);static values(){return[r.YEAR,r.MONTH,r.DAY,r.HOUR,r.MINUTE,r.SECOND,r.DECIMAL_SECOND]}static valuesWithTimes(){return[r.HOUR,r.MINUTE,r.SECOND,r.DECIMAL_SECOND]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static hasTime(e){return this.valuesWithTimes().includes(e)}}t.TemporalGranularity=r},8588(e,t){t.TemporalType=t.TemporalTypeValues=void 0,t.TemporalTypeValues={DATE:"xsd:date",TIME:"xsd:time",DATETIME:"xsd:dateTime"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static DATE=new r(t.TemporalTypeValues.DATE);static TIME=new r(t.TemporalTypeValues.TIME);static DATETIME=new r(t.TemporalTypeValues.DATETIME);static NULL=new r(null);static values(){return[r.DATE,r.TIME,r.DATETIME]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.TemporalType=r},3764(e,t){t.TimeFormat=t.TimeFormatValues=void 0,t.TimeFormatValues={H24:"24h",H12:"12h"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static H24=new r(t.TimeFormatValues.H24);static H12=new r(t.TimeFormatValues.H12);static NULL=new r(null);static values(){return[r.H24,r.H12]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.TimeFormat=r},9034(e,t){t.UiInputType=t.F=void 0,t.F={TEXTFIELD:"textfield",TEXTAREA:"textarea",LINK:"link",EXT_ROR:"ext-ror",EXT_ORCID:"ext-orcid",EXT_PFAS:"ext-pfas",EXT_PUBMED:"ext-pubmed",EXT_RRID:"ext-rrid",EXT_NIH_GRANT_ID:"ext-nih-grant-id",EXT_DOI:"ext-doi",TEMPORAL:"temporal",EMAIL:"email",NUMERIC:"numeric",PHONE_NUMBER:"phone-number",LIST:"list",CHECKBOX:"checkbox",RADIO:"radio",ATTRIBUTE_VALUE:"attribute-value",PAGE_BREAK:"page-break",SECTION_BREAK:"section-break",IMAGE:"image",RICH_TEXT:"richtext",YOUTUBE:"youtube"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static TEXTFIELD=new r(t.F.TEXTFIELD);static TEXTAREA=new r(t.F.TEXTAREA);static LINK=new r(t.F.LINK);static EXT_ROR=new r(t.F.EXT_ROR);static EXT_ORCID=new r(t.F.EXT_ORCID);static EXT_PFAS=new r(t.F.EXT_PFAS);static EXT_PUBMED=new r(t.F.EXT_PUBMED);static EXT_RRID=new r(t.F.EXT_RRID);static EXT_NIH_GRANT_ID=new r(t.F.EXT_NIH_GRANT_ID);static EXT_DOI=new r(t.F.EXT_DOI);static TEMPORAL=new r(t.F.TEMPORAL);static EMAIL=new r(t.F.EMAIL);static NUMERIC=new r(t.F.NUMERIC);static PHONE_NUMBER=new r(t.F.PHONE_NUMBER);static LIST=new r(t.F.LIST);static CHECKBOX=new r(t.F.CHECKBOX);static RADIO=new r(t.F.RADIO);static ATTRIBUTE_VALUE=new r(t.F.ATTRIBUTE_VALUE);static PAGE_BREAK=new r(t.F.PAGE_BREAK);static SECTION_BREAK=new r(t.F.SECTION_BREAK);static IMAGE=new r(t.F.IMAGE);static RICH_TEXT=new r(t.F.RICH_TEXT);static YOUTUBE=new r(t.F.YOUTUBE);static NULL=new r(null);static values(){return[r.TEXTFIELD,r.TEXTAREA,r.LINK,r.EXT_ROR,r.EXT_ORCID,r.EXT_PFAS,r.EXT_PUBMED,r.EXT_RRID,r.EXT_NIH_GRANT_ID,r.EXT_DOI,r.TEMPORAL,r.EMAIL,r.NUMERIC,r.PHONE_NUMBER,r.LIST,r.CHECKBOX,r.RADIO,r.ATTRIBUTE_VALUE,r.PAGE_BREAK,r.SECTION_BREAK,r.IMAGE,r.RICH_TEXT,r.YOUTUBE,r.NULL]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.UiInputType=r},9499(e,t,r){t.YamlArtifactType=t.YamlArtifactTypeValues=void 0;const n=r(8421);t.YamlArtifactTypeValues={TEMPLATE:"template",ELEMENT:"element",TEXTFIELD:"text-field",CONTROLLED_TERM:"controlled-term-field",TEXTAREA:"text-area-field",LINK:"link-field",EXT_ROR:"ext-ror-field",EXT_ORCID:"ext-orcid-field",EXT_PFAS:"ext-pfas-field",EXT_PUBMED:"ext-pubmed-field",EXT_RRID:"ext-rrid-field",EXT_NIH_GRANT_ID:"ext-nih-grant-id-field",EXT_DOI:"ext-doi-field",TEMPORAL:"temporal-field",EMAIL:"email-field",NUMERIC:"numeric-field",PHONE_NUMBER:"phone-number-field",SINGLE_SELECT_LIST:"single-select-list-field",MULTI_SELECT_LIST:"multi-select-list-field",CHECKBOX:"checkbox-field",RADIO:"radio-field",ATTRIBUTE_VALUE:"attribute-value-field",PAGE_BREAK:"static-page-break",SECTION_BREAK:"static-section-break",IMAGE:"static-image",RICH_TEXT:"static-rich-text",YOUTUBE:"static-youtube-video",TEMPLATE_INSTANCE:"instance"};class i{value;category;constructor(e,t){this.value=e,this.category=t}getValue(){return this.value}static TEMPLATE=new i(t.YamlArtifactTypeValues.TEMPLATE,n.CedarFieldCategory.NONE);static ELEMENT=new i(t.YamlArtifactTypeValues.ELEMENT,n.CedarFieldCategory.NONE);static TEXTFIELD=new i(t.YamlArtifactTypeValues.TEXTFIELD,n.CedarFieldCategory.DYNAMIC);static CONTROLLED_TERM=new i(t.YamlArtifactTypeValues.CONTROLLED_TERM,n.CedarFieldCategory.DYNAMIC);static TEXTAREA=new i(t.YamlArtifactTypeValues.TEXTAREA,n.CedarFieldCategory.DYNAMIC);static LINK=new i(t.YamlArtifactTypeValues.LINK,n.CedarFieldCategory.DYNAMIC);static EXT_ROR=new i(t.YamlArtifactTypeValues.EXT_ROR,n.CedarFieldCategory.DYNAMIC);static EXT_ORCID=new i(t.YamlArtifactTypeValues.EXT_ORCID,n.CedarFieldCategory.DYNAMIC);static EXT_PFAS=new i(t.YamlArtifactTypeValues.EXT_PFAS,n.CedarFieldCategory.DYNAMIC);static EXT_PUBMED=new i(t.YamlArtifactTypeValues.EXT_PUBMED,n.CedarFieldCategory.DYNAMIC);static EXT_RRID=new i(t.YamlArtifactTypeValues.EXT_RRID,n.CedarFieldCategory.DYNAMIC);static EXT_NIH_GRANT_ID=new i(t.YamlArtifactTypeValues.EXT_NIH_GRANT_ID,n.CedarFieldCategory.DYNAMIC);static EXT_DOI=new i(t.YamlArtifactTypeValues.EXT_DOI,n.CedarFieldCategory.DYNAMIC);static TEMPORAL=new i(t.YamlArtifactTypeValues.TEMPORAL,n.CedarFieldCategory.DYNAMIC);static EMAIL=new i(t.YamlArtifactTypeValues.EMAIL,n.CedarFieldCategory.DYNAMIC);static NUMERIC=new i(t.YamlArtifactTypeValues.NUMERIC,n.CedarFieldCategory.DYNAMIC);static PHONE_NUMBER=new i(t.YamlArtifactTypeValues.PHONE_NUMBER,n.CedarFieldCategory.DYNAMIC);static SINGLE_SELECT_LIST=new i(t.YamlArtifactTypeValues.SINGLE_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static MULTI_SELECT_LIST=new i(t.YamlArtifactTypeValues.MULTI_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static CHECKBOX=new i(t.YamlArtifactTypeValues.CHECKBOX,n.CedarFieldCategory.DYNAMIC);static RADIO=new i(t.YamlArtifactTypeValues.RADIO,n.CedarFieldCategory.DYNAMIC);static ATTRIBUTE_VALUE=new i(t.YamlArtifactTypeValues.ATTRIBUTE_VALUE,n.CedarFieldCategory.DYNAMIC);static PAGE_BREAK=new i(t.YamlArtifactTypeValues.PAGE_BREAK,n.CedarFieldCategory.STATIC);static SECTION_BREAK=new i(t.YamlArtifactTypeValues.SECTION_BREAK,n.CedarFieldCategory.STATIC);static IMAGE=new i(t.YamlArtifactTypeValues.IMAGE,n.CedarFieldCategory.STATIC);static RICH_TEXT=new i(t.YamlArtifactTypeValues.RICH_TEXT,n.CedarFieldCategory.STATIC);static YOUTUBE=new i(t.YamlArtifactTypeValues.YOUTUBE,n.CedarFieldCategory.STATIC);static TEMPLATE_INSTANCE=new i(t.YamlArtifactTypeValues.TEMPLATE_INSTANCE,n.CedarFieldCategory.NONE);static NULL=new i(null,n.CedarFieldCategory.NULL);static values(){return[i.TEMPLATE,i.ELEMENT,i.TEXTFIELD,i.CONTROLLED_TERM,i.TEXTAREA,i.LINK,i.EXT_ROR,i.EXT_ORCID,i.EXT_PFAS,i.EXT_PUBMED,i.EXT_RRID,i.EXT_NIH_GRANT_ID,i.EXT_DOI,i.TEMPORAL,i.EMAIL,i.NUMERIC,i.PHONE_NUMBER,i.SINGLE_SELECT_LIST,i.MULTI_SELECT_LIST,i.CHECKBOX,i.RADIO,i.ATTRIBUTE_VALUE,i.PAGE_BREAK,i.SECTION_BREAK,i.IMAGE,i.RICH_TEXT,i.YOUTUBE,i.TEMPLATE_INSTANCE,i.NULL]}static forValue(e){for(const t of i.values())if(t.getValue()===e)return t;return this.NULL}isTemplate(){return this.value===t.YamlArtifactTypeValues.TEMPLATE}isElement(){return this.value===t.YamlArtifactTypeValues.ELEMENT}isField(){return this.isDynamicField()||this.isStaticField()}isStaticField(){return this.category===n.CedarFieldCategory.STATIC}isDynamicField(){return this.category===n.CedarFieldCategory.DYNAMIC}isTemplateInstance(){return this.value===t.YamlArtifactTypeValues.TEMPLATE_INSTANCE}}t.YamlArtifactType=i},4563(e,t,r){t.JavaStrings=void 0;const n=r(3992);t.JavaStrings=class{static isBlank(e){return n.TextPolicy.isBlank(e)}static isWhitespace(e){return n.TextPolicy.isBlankCodePoint(e.codePointAt(0))}}},2888(e,t){t.ComparisonError=void 0,t.ComparisonError=class{errorLocation;errorType;errorPath;expectedValue;encounteredValue;stackTopLines;constructor(e,t,r,n,i){this.errorLocation=e,this.errorType=t,this.errorPath=r,this.expectedValue=n,this.encounteredValue=i}}},9760(e,t){t.ComparisonErrorType=t.e=void 0,t.e={MISSING_KEY_IN_REAL_OBJECT:"missingKeyInRealObject",UNEXPECTED_KEY_IN_REAL_OBJECT:"unexpectedKeyInRealObject",VALUE_MISMATCH:"valueMismatch",MISSING_INDEX_IN_REAL_OBJECT:"missingIndexInRealObject",UNEXPECTED_INDEX_IN_REAL_OBJECT:"unexpectedIndexInRealObject",MISSING_VALUE_IN_REAL_OBJECT:"missingValueInRealObject",UNEXPECTED_VALUE_IN_REAL_OBJECT:"unexpectedValueInRealObject"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static MISSING_KEY_IN_REAL_OBJECT=new r(t.e.MISSING_KEY_IN_REAL_OBJECT);static UNEXPECTED_KEY_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_KEY_IN_REAL_OBJECT);static VALUE_MISMATCH=new r(t.e.VALUE_MISMATCH);static MISSING_INDEX_IN_REAL_OBJECT=new r(t.e.MISSING_INDEX_IN_REAL_OBJECT);static UNEXPECTED_INDEX_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_INDEX_IN_REAL_OBJECT);static MISSING_VALUE_IN_REAL_OBJECT=new r(t.e.MISSING_VALUE_IN_REAL_OBJECT);static UNEXPECTED_VALUE_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_VALUE_IN_REAL_OBJECT);static NULL=new r(null);static values(){return[r.MISSING_KEY_IN_REAL_OBJECT,r.UNEXPECTED_KEY_IN_REAL_OBJECT,r.VALUE_MISMATCH,r.MISSING_INDEX_IN_REAL_OBJECT,r.UNEXPECTED_INDEX_IN_REAL_OBJECT,r.MISSING_VALUE_IN_REAL_OBJECT,r.UNEXPECTED_VALUE_IN_REAL_OBJECT]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}toJSON(){return this.value}}t.ComparisonErrorType=r},4325(e,t){t.ComparisonResult=void 0,t.ComparisonResult=class{comparisonErrors=[];comparisonWarnings=[];addComparisonError(e){this.comparisonErrors.push(e)}getComparisonErrors(){return this.comparisonErrors}getComparisonErrorCount(){return this.comparisonErrors.length}addComparisonWarning(e){this.comparisonWarnings.push(e)}getComparisonWarnings(){return this.comparisonWarnings}getComparisonWarningCount(){return this.comparisonWarnings.length}areEqual(){return 0===this.comparisonErrors.length&&0===this.comparisonWarnings.length}merge(e){this.comparisonErrors.push(...e.comparisonErrors),this.comparisonWarnings.push(...e.comparisonWarnings)}}},4036(e,t,r){t.JsonArtifactParsingResult=void 0;const n=r(2888),i=r(9760),a=r(3188),s=r(7092);t.JsonArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];validationFindings=[];getValidationFindings(){return[...this.validationFindings]}addValidationFinding(e,t="instance",r){if(this.validationFindings.some(t=>t.code===e.code&&t.path===e.path))return;if(this.validationFindings.push(e),"passed"===e.verificationStatus)return;const o=r??new n.ComparisonError("ValidationPolicy",i.ComparisonErrorType.VALUE_MISMATCH,a.JsonPath.fromPointer(e.path),e.message);s.ValidationPolicy.blocksSave(e,t)?this.addBlueprintComparisonError(o):this.addBlueprintComparisonWarning(o)}getValidationReport(e="instance"){const t=[...this.validationFindings];for(const e of this.blueprintComparisonErrors){if("ValidationPolicy"===e.errorLocation)continue;const r=e.errorType===i.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT?"missingProperty":"valueShape";t.push(s.ValidationPolicy.finding(r,e.errorPath.toPointer(),`Invalid structure: ${e.errorType}.`))}return s.ValidationPolicy.summarize(t,e)}addBlueprintComparisonError(e){this.blueprintComparisonErrors.push(e)}getBlueprintComparisonErrors(){return this.blueprintComparisonErrors}getBlueprintComparisonErrorCount(){return this.blueprintComparisonErrors.length}addBlueprintComparisonWarning(e){this.blueprintComparisonWarnings.push(e)}getBlueprintComparisonWarnings(){return this.blueprintComparisonWarnings}getBlueprintComparisonWarningCount(){return this.blueprintComparisonWarnings.length}wasSuccessful(){return 0===this.blueprintComparisonErrors.length}adheresToBlueprint(){return 0===this.blueprintComparisonErrors.length&&0===this.blueprintComparisonWarnings.length}merge(e){this.blueprintComparisonErrors.push(...e.blueprintComparisonErrors),this.blueprintComparisonWarnings.push(...e.blueprintComparisonWarnings),this.validationFindings.push(...e.validationFindings)}}},3056(e,t,r){t.JsonObjectComparator=void 0;const n=r(2108),i=r(2888),a=r(3188),s=r(9760),o=r(5747),l=r(2733),c=r(936);function d(e){return null!==e&&"object"==typeof e&&!n.ExactDecimal.isExact(e)}function u(e,t){return"number"!=typeof e&&!n.ExactDecimal.isExact(e)||"number"!=typeof t&&!n.ExactDecimal.isExact(t)?e===t:0===n.NumericPolicy.compare(e,t)}class m{static compareBothWays(e,t,r,n,o,p=[]){!function t(r,n,h){const f=r.getLastComponent()==l.JsonSchema.required;if(Array.isArray(n)&&Array.isArray(h))if(f){const t=new Set(n),a=new Set(h);n.forEach((t,n)=>{const o=r.add(n);a.has(t)||e.addBlueprintComparisonError(new i.ComparisonError("oca01",s.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,o,t))}),h.forEach((n,a)=>{const o=r.add(a);t.has(n)||e.addBlueprintComparisonError(new i.ComparisonError("oca02",s.ComparisonErrorType.UNEXPECTED_VALUE_IN_REAL_OBJECT,o,void 0,n))})}else{const a=Math.max(n.length,h.length);for(let o=0;o<a;o++){const a=r.add(o);o in n?o in h?d(n[o])&&d(h[o])?t(a,n[o],h[o]):u(n[o],h[o])||e.addBlueprintComparisonError(new i.ComparisonError("ocl03",s.ComparisonErrorType.VALUE_MISMATCH,a,n[o],h[o])):e.addBlueprintComparisonError(new i.ComparisonError("ocl02",s.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,a,n[o])):e.addBlueprintComparisonError(new i.ComparisonError("ocl01",s.ComparisonErrorType.UNEXPECTED_INDEX_IN_REAL_OBJECT,a,void 0,h[o]))}}else new Set([...Object.keys(n),...Object.keys(h)]).forEach(f=>{const y=r.add(f);if(f in n)if(f in h){if(d(n[f])&&d(h[f]))t(y,n[f],h[f]);else if(!u(n[f],h[f])){const t=new i.ComparisonError("oco03",s.ComparisonErrorType.VALUE_MISMATCH,y,n[f],h[f]);o.useWarningForKnownIssues()&&m.isKnownProductionVariation(y)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}}else o.useWarningForKnownIssues()&&(y.endsIn(c.CedarModel.literals,a.JsonPath.ANY,c.CedarModel.selectedByDefault)||y.endsIn(c.CedarModel.ui,c.CedarModel.pages)||m.isKnownProductionVariation(y))?e.addBlueprintComparisonWarning(new i.ComparisonError("wco02",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,y)):e.addBlueprintComparisonError(new i.ComparisonError("oco02",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,y));else o.useWarningForKnownIssues()&&(y.endsIn(l.JsonSchema.properties,l.JsonSchema.atLanguage)||m.isKnownProductionVariation(y))?e.addBlueprintComparisonWarning(new i.ComparisonError("wco01",s.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,y)):p.includes(f)||e.addBlueprintComparisonError(new i.ComparisonError("oco01",s.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,y))})}(n,t,r)}static isKnownProductionVariation(e){return e.endsIn(l.JsonSchema.atContext,o.TemplateProperty.additionalProperties)||e.endsIn(l.JsonSchema.atContext,l.JsonSchema.properties,a.JsonPath.ANY,c.CedarModel.enum,a.JsonPath.ANY)||e.endsIn(l.JsonSchema.atContext,l.JsonSchema.required,a.JsonPath.ANY)||e.endsIn(l.JsonSchema.atContext,a.JsonPath.ANY)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyDescriptions,a.JsonPath.ANY)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyDescriptions)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyLabels)||e.endsIn(l.JsonSchema.properties,a.JsonPath.ANY,c.CedarModel.enum,a.JsonPath.ANY)||e.endsIn(l.JsonSchema.required)}static reportToLeft(e,t,r){t.useWarningForKnownIssues()&&m.isKnownProductionVariation(r.errorPath)?e.addBlueprintComparisonWarning(r):e.addBlueprintComparisonError(r)}static compareToLeft(e,t,r,n,a){!function t(r,n,o){const c=r.getLastComponent()==l.JsonSchema.required;if(Array.isArray(n)&&Array.isArray(o))if(c){const t=new Set(o);n.forEach((n,o)=>{const l=r.add(o);t.has(n)||m.reportToLeft(e,a,new i.ComparisonError("ola01",s.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,l,n))})}else n.forEach((l,c)=>{const p=r.add(c);c in o?d(l)&&d(o[c])?t(p,l,o[c]):u(l,o[c])||m.reportToLeft(e,a,new i.ComparisonError("oll02",s.ComparisonErrorType.VALUE_MISMATCH,p,l,o[c])):m.reportToLeft(e,a,new i.ComparisonError("oll01",s.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,p,n[c]))});else Object.keys(n).forEach(l=>{const c=r.add(l);l in o?d(n[l])&&d(o[l])?t(c,n[l],o[l]):u(n[l],o[l])||m.reportToLeft(e,a,new i.ComparisonError("olo02",s.ComparisonErrorType.VALUE_MISMATCH,c,n[l],o[l])):m.reportToLeft(e,a,new i.ComparisonError("olo01",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,c))})}(n,t,r)}static comparePrimitive(e,t,r,n){return u(t,r)||e.addBlueprintComparisonError(new i.ComparisonError("opp1",s.ComparisonErrorType.VALUE_MISMATCH,n,t,r)),e}}t.JsonObjectComparator=m},1591(e,t){t.YamlArtifactParsingResult=void 0,t.YamlArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];addBlueprintComparisonError(e){this.blueprintComparisonErrors.push(e)}getBlueprintComparisonErrors(){return this.blueprintComparisonErrors}getBlueprintComparisonErrorCount(){return this.blueprintComparisonErrors.length}addBlueprintComparisonWarning(e){this.blueprintComparisonWarnings.push(e)}getBlueprintComparisonWarnings(){return this.blueprintComparisonWarnings}getBlueprintComparisonWarningCount(){return this.blueprintComparisonWarnings.length}wasSuccessful(){return 0===this.blueprintComparisonErrors.length}adheresToBlueprint(){return 0===this.blueprintComparisonErrors.length&&0===this.blueprintComparisonWarnings.length}merge(e){this.blueprintComparisonErrors.push(...e.blueprintComparisonErrors),this.blueprintComparisonWarnings.push(...e.blueprintComparisonWarnings)}}},6109(e,t){t.YamlComparisonErrorType=t.H=void 0,t.H={MISSING_KEY_IN_RIGHT_OBJECT:"missingKeyInRightObject",UNEXPECTED_KEY_IN_RIGHT_OBJECT:"unexpectedKeyInRightObject",VALUE_MISMATCH:"valueMismatch",MISSING_INDEX_IN_RIGHT_OBJECT:"missingIndexInRightObject",UNEXPECTED_INDEX_IN_RIGHT_OBJECT:"unexpectedIndexInRightObject",MISSING_VALUE_IN_RIGHT_OBJECT:"missingValueInRightObject",UNEXPECTED_VALUE_IN_RIGHT_OBJECT:"unexpectedValueInRightObject"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static MISSING_KEY_IN_RIGHT_OBJECT=new r(t.H.MISSING_KEY_IN_RIGHT_OBJECT);static UNEXPECTED_KEY_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_KEY_IN_RIGHT_OBJECT);static VALUE_MISMATCH=new r(t.H.VALUE_MISMATCH);static MISSING_INDEX_IN_RIGHT_OBJECT=new r(t.H.MISSING_INDEX_IN_RIGHT_OBJECT);static UNEXPECTED_INDEX_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_INDEX_IN_RIGHT_OBJECT);static MISSING_VALUE_IN_RIGHT_OBJECT=new r(t.H.MISSING_VALUE_IN_RIGHT_OBJECT);static UNEXPECTED_VALUE_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_VALUE_IN_RIGHT_OBJECT);static NULL=new r(null);static values(){return[r.MISSING_KEY_IN_RIGHT_OBJECT,r.UNEXPECTED_KEY_IN_RIGHT_OBJECT,r.VALUE_MISMATCH,r.MISSING_INDEX_IN_RIGHT_OBJECT,r.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,r.MISSING_VALUE_IN_RIGHT_OBJECT,r.UNEXPECTED_VALUE_IN_RIGHT_OBJECT]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}toJSON(){return this.value}}t.YamlComparisonErrorType=r},1885(e,t,r){t.YamlObjectComparator=void 0;const n=r(2888),i=r(3188),a=r(6109),s=r(4325);t.YamlObjectComparator=class{static compare(e,t){const r=new s.ComparisonResult;return this.compareBothWays(r,e,t,new i.JsonPath),r}static compareBothWays(e,t,r,i){!function t(r,i,s){if(Array.isArray(i)&&Array.isArray(s)){const o=Math.max(i.length,s.length);for(let l=0;l<o;l++){const o=r.add(l);l in i?l in s?"object"==typeof i[l]&&null!==i[l]&&"object"==typeof s[l]&&null!==s[l]?t(o,i[l],s[l]):i[l]!==s[l]&&e.addComparisonError(new n.ComparisonError("ocl03",a.YamlComparisonErrorType.VALUE_MISMATCH,o,i[l],s[l])):e.addComparisonError(new n.ComparisonError("ocl02",a.YamlComparisonErrorType.MISSING_INDEX_IN_RIGHT_OBJECT,o,i[l])):e.addComparisonError(new n.ComparisonError("ocl01",a.YamlComparisonErrorType.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,o,void 0,s[l]))}}else new Set([...Object.keys(i),...Object.keys(s)]).forEach(o=>{const l=r.add(o);o in i?o in s?"object"==typeof i[o]&&null!==i[o]&&"object"==typeof s[o]&&null!==s[o]?t(l,i[o],s[o]):i[o]!==s[o]&&e.addComparisonError(new n.ComparisonError("oco03",a.YamlComparisonErrorType.VALUE_MISMATCH,l,i[o],s[o])):e.addComparisonError(new n.ComparisonError("oco02",a.YamlComparisonErrorType.MISSING_KEY_IN_RIGHT_OBJECT,l)):e.addComparisonError(new n.ComparisonError("oco01",a.YamlComparisonErrorType.UNEXPECTED_KEY_IN_RIGHT_OBJECT,l))})}(i,t,r)}}},3188(e,t){t.JsonPath=void 0;class r{path;static ANY="*";constructor(...e){this.path=e}equal(e){return this.path.length===e.path.length&&this.path.every((t,r)=>t===e.path[r])}add(...e){return new r(...this.path,...e)}join(e){return new r(...this.path,...e.path)}toString(){let e="";return this.path.forEach(t=>{e+="number"==typeof t?`/[${t}]`:`/${t}`}),e+"/"}toPointer(){return this.path.map(e=>"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")).join("")}static fromPointer(e){return new r(...""===e?[]:e.slice(1).split("/").map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~")))}toJSON(){return this.toString()}getLastComponent(){return 0===this.path.length?null:this.path[this.path.length-1]}endsIn(...e){for(let t=1;t<=e.length;t++){if(t>this.path.length)return!1;const n=e[e.length-t];if(this.path[this.path.length-t]!==n&&n!=r.ANY)return!1}return!0}getLastNComponents(e){if(e<=0||0===this.path.length)return new r;const t=Math.max(this.path.length-e,0),n=this.path.slice(t);return new r(...n)}}t.JsonPath=r},6968(e,t,r){t.JsonContainerArtifactContent=void 0;const n=r(8748);class i{static CONTEXT_VERBATIM={xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#",schema:"http://schema.org/","schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"}};static CONTEXT_VERBATIM_NO_BIBO;static{this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM)}}t.JsonContainerArtifactContent=i},6551(e,t,r){t.JsonTemplateContent=void 0;const n=r(8748);class i{static ANNOTATIONS={type:"object",patternProperties:{"^.+$":{oneOf:[{type:"object",properties:{"@id":{type:"string",format:"uri"}},additionalProperties:!1},{type:"object",properties:{"@value":{type:["string","number","boolean","null"]}},additionalProperties:!1}]}},additionalProperties:!1};static REQUIRED_PARTIAL=["@context","@id","schema:isBasedOn","schema:name","schema:description","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","oslc:modifiedBy"];static PROPERTIES_PARTIAL={"@context":{type:"object",properties:{_annotations:{type:"string",enum:["@nest"]},rdfs:{type:"string",format:"uri",enum:["http://www.w3.org/2000/01/rdf-schema#"]},xsd:{type:"string",format:"uri",enum:["http://www.w3.org/2001/XMLSchema#"]},pav:{type:"string",format:"uri",enum:["http://purl.org/pav/"]},schema:{type:"string",format:"uri",enum:["http://schema.org/"]},oslc:{type:"string",format:"uri",enum:["http://open-services.net/ns/core#"]},skos:{type:"string",format:"uri",enum:["http://www.w3.org/2004/02/skos/core#"]},"rdfs:label":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"schema:isBasedOn":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"schema:name":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"schema:description":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"pav:derivedFrom":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"pav:createdOn":{type:"object",properties:{"@type":{type:"string",enum:["xsd:dateTime"]}}},"pav:createdBy":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"pav:lastUpdatedOn":{type:"object",properties:{"@type":{type:"string",enum:["xsd:dateTime"]}}},"oslc:modifiedBy":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"skos:notation":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}}},required:["xsd","pav","schema","oslc","schema:isBasedOn","schema:name","schema:description","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","oslc:modifiedBy"],additionalProperties:!1},"@id":{type:["string","null"],format:"uri"},"@type":{oneOf:[{type:"string",format:"uri"},{type:"array",minItems:1,items:{type:"string",format:"uri"},uniqueItems:!0}]},"schema:isBasedOn":{type:"string",format:"uri"},"schema:name":{type:"string",minLength:1},"schema:description":{type:"string"},"pav:derivedFrom":{type:"string",format:"uri"},"pav:createdOn":{type:["string","null"],format:"date-time"},"pav:createdBy":{type:["string","null"],format:"uri"},"pav:lastUpdatedOn":{type:["string","null"],format:"date-time"},"oslc:modifiedBy":{type:["string","null"],format:"uri"},_annotations:i.ANNOTATIONS};static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_LIST=[];static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(i.PROPERTIES_PARTIAL).forEach(e=>{this.PROPERTIES_PARTIAL_KEY_LIST.push(e),this.PROPERTIES_PARTIAL_KEY_MAP.set(e,!0)}),this.REQUIRED_PARTIAL_KEY_MAP=this.REQUIRED_PARTIAL.reduce((e,t)=>(e.set(t,!0),e),new Map),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL_KEY_MAP),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_LIST),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_MAP)}}t.JsonTemplateContent=i},1501(e,t,r){t.JsonTemplateElementContent=void 0;const n=r(8748);class i{static REQUIRED_PARTIAL=["@context","@id"];static PROPERTIES_PARTIAL={"@context":{type:"object",properties:{},required:[],additionalProperties:!1},"@id":{type:["string","null"],format:"uri"},"@type":{oneOf:[{type:"string",format:"uri"},{type:"array",minItems:1,items:{type:"string",format:"uri"},uniqueItems:!0}]}};static LEGACY_ID_TYPING={type:"string",format:"uri"};static acceptEitherIdTyping(e,t){const r=n.ReaderUtil.getNode(t,"@id");null!==r&&JSON.stringify(r)===JSON.stringify(i.LEGACY_ID_TYPING)&&(e["@id"]=n.ReaderUtil.deepClone(i.LEGACY_ID_TYPING))}static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(i.PROPERTIES_PARTIAL).forEach(e=>{this.PROPERTIES_PARTIAL_KEY_MAP.set(e,!0)}),this.REQUIRED_PARTIAL_KEY_MAP=this.REQUIRED_PARTIAL.reduce((e,t)=>(e.set(t,!0),e),new Map),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL_KEY_MAP),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_MAP)}}t.JsonTemplateElementContent=i},9932(e,t,r){t.JsonTemplateFieldContentDynamic=void 0;const n=r(8748),i=r(2733),a=r(936);class s{static CONTEXT_VERBATIM={xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#",schema:"http://schema.org/",skos:"http://www.w3.org/2004/02/skos/core#","schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"skos:prefLabel":{"@type":"xsd:string"},"skos:altLabel":{"@type":"xsd:string"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"}};static PROPERTIES_VERBATIM_LITERAL={"@type":{type:"string",format:"uri"},"rdfs:label":{type:["string","null"]},"@value":{type:["string","null"]},"@language":{type:["string","null"],minLength:1}};static PROPERTIES_VERBATIM_IRI={"@type":{type:"string",format:"uri"},"@id":{type:"string",format:"uri"},"rdfs:label":{type:["string","null"]},"skos:notation":{type:["string","null"]}};static ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE={type:"object",properties:{"@value":{type:["string","null"]},"@type":{type:"string",format:"uri"}},required:["@value"],additionalProperties:!1};static ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE={type:"string",format:"uri"};static PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE;static PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION;static CONTEXT_VERBATIM_NO_BIBO;static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_LITERAL),this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE=n.ReaderUtil.deepClone(this.PROPERTIES_VERBATIM_LITERAL),n.ReaderUtil.deleteNodeKey(this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE,i.JsonSchema.atLanguage),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE),this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION=n.ReaderUtil.deepClone(this.PROPERTIES_VERBATIM_IRI),n.ReaderUtil.deleteNodeKey(this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION,a.CedarModel.skosNotation),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION),this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_IRI),n.ReaderUtil.deepFreeze(this.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE),n.ReaderUtil.deepFreeze(this.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE)}}t.JsonTemplateFieldContentDynamic=s},9251(e,t,r){t.JsonTemplateFieldContentStatic=void 0;const n=r(8748);class i{static CONTEXT_VERBATIM={schema:"http://schema.org/",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#"};static CONTEXT_VERBATIM_NO_BIBO;static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM),this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO)}}t.JsonTemplateFieldContentStatic=i},350(e,t,r){t.JsonTemplateInstanceContent=void 0;const n=r(8748);class i{static CONTEXT_VERBATIM={rdfs:"http://www.w3.org/2000/01/rdf-schema#",xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",schema:"http://schema.org/",oslc:"http://open-services.net/ns/core#",skos:"http://www.w3.org/2004/02/skos/core#","rdfs:label":{"@type":"xsd:string"},"schema:isBasedOn":{"@type":"@id"},"schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"pav:derivedFrom":{"@type":"@id"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"},"skos:notation":{"@type":"xsd:string"}};static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM)}}t.JsonTemplateInstanceContent=i},3939(e,t,r){t.validationFieldSchema=function(e,t=!1){const r=e.valueConstraints,s=Object.assign(Object.create(Object.getPrototypeOf(e)),e);s.valueConstraints=Object.assign(Object.create(Object.getPrototypeOf(e.valueConstraints)),e.valueConstraints,{defaultValue:null,minValue:null,maxValue:null});const o=n.CedarJsonWriters.getStrict().getFieldWriterForField(s).getAsJsonNode(s);for(const e of["minValue","maxValue"])null!=r[e]&&((o._valueConstraints??={})[e]=r[e]);if(t&&null!=r.defaultValue){const e=r.defaultValue;(o._valueConstraints??={}).defaultValue=e instanceof i.ControlledTermDefaultValue?{termUri:e.termUri.getValue(),"rdfs:label":e.rdfsLabel}:e instanceof a.Iri?e.getValue():e}return o};const n=r(9607),i=r(7295),a=r(8802)},3068(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DisplayText=void 0;class r{static segmenter=new Intl.Segmenter("und",{granularity:"grapheme"});static take(e,t,r=!1){const n=Math.max(0,Math.trunc(t));if(!n)return"";const i=Array.from(this.segmenter.segment(e),({segment:e})=>e);return(r?i.slice(-n):i.slice(0,n)).join("")}static searchKey(e){return Array.from(this.segmenter.segment(e),({segment:e})=>e.normalize("NFC").toLowerCase()).join("")}static splitMatch(e,t){const r=this.searchKey(t);if(!r)return[e,"",""];let n="";const i=[];for(const{segment:t,index:r}of this.segmenter.segment(e)){const e=t.normalize("NFC").toLowerCase();n+=e;for(let n=0;n<e.length;n++)i.push({start:r,end:r+t.length})}const a=n.indexOf(r);if(a<0)return[e,"",""];const s=i[a].start,o=i[a+r.length-1].end;return[e.slice(0,s),e.slice(s,o),e.slice(o)]}static elide(e,t=96,r=28){const n=Array.from(this.segmenter.segment(e),({segment:e})=>e),i=Math.max(1,Math.trunc(t));if(n.length<=i)return e;const a=Math.max(0,Math.min(Math.trunc(r),i-1));return`${n.slice(0,i-a-1).join("").trimEnd()}…${a?n.slice(-a).join("").trimStart():""}`}}t.DisplayText=r},6830(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FieldValuePolicy=void 0;const n=r(5036),i=r(2500),a=r(2108),s=r(1991),o=r(3992),l=r(7092);class c{static authorityTypes=new Set(["ext-orcid","ext-ror","ext-pfas","ext-pubmed","ext-rrid","ext-nih-grant-id","ext-doi"]);static integerRanges={"xsd:byte":["-128","127"],"xsd:short":["-32768","32767"],"xsd:int":["-2147483648","2147483647"],"xsd:long":["-9223372036854775808","9223372036854775807"]};static isControlled(e){const t=e._valueConstraints??{};return["controlled","controlled-term"].includes(e._ui?.inputType??"")||Object.hasOwn(e.properties??{},"@id")&&["ontologies","branches","classes","valueSets"].some(e=>Object.hasOwn(t,e))}static isIri(e){const t=e._ui?.inputType??"";return"link"===t||this.authorityTypes.has(t)||this.isControlled(e)||Object.hasOwn(e.properties??{},"@id")}static validateConfiguration(e,t=""){const r=e._valueConstraints??{},n=[],i=(e,r)=>n.push(l.ValidationPolicy.finding("templateConstraint",l.ValidationPolicy.child(t+"/_valueConstraints",e),r));for(const e of["minLength","maxLength","decimalPlace"])Object.hasOwn(r,e)&&(!Number.isInteger(r[e])||r[e]<0||r[e]>2147483647)&&i(e,`${e} must be a nonnegative integer.`);null!=r.minLength&&null!=r.maxLength&&r.minLength>r.maxLength&&i("maxLength","Minimum length exceeds maximum length.");const s=new Set;for(const e of["minValue","maxValue"])if(Object.hasOwn(r,e))try{if("number"!=typeof r[e]&&!a.ExactDecimal.isExact(r[e]))throw new Error;a.NumericPolicy.value(r[e]),s.add(e)}catch{i(e,"Numeric bounds must be finite decimal values.")}if(2===s.size&&a.NumericPolicy.compare(r.minValue,r.maxValue)>0&&i("maxValue","Minimum value exceeds maximum value."),"numeric"===e._ui?.inputType){const e=r.numberType,t=Object.hasOwn(this.integerRanges,e);t||["xsd:float","xsd:double","xsd:decimal"].includes(e)||i("numberType","A numeric field requires a recognized datatype.");const n=Number.isInteger(r.decimalPlace)&&r.decimalPlace>=0&&r.decimalPlace<=2147483647;t&&n&&0!==r.decimalPlace&&i("decimalPlace","Integer datatypes cannot declare fractional decimal places.");for(const o of s)(t||["xsd:float","xsd:double","xsd:decimal"].includes(e))&&(this.numeric({numberType:e},r[o],"","template").some(e=>"numberType"===e.code)?i(o,"The bound is outside its numeric datatype."):n&&a.NumericPolicy.fractionalDigits(r[o])>r.decimalPlace&&i(o,"The bound exceeds the declared decimal precision."))}return Object.hasOwn(r,"regex")&&("string"!=typeof r.regex?i("regex","A pattern must be a string."):""!==r.regex&&n.push(...this.regex(r.regex,null,t+"/_valueConstraints/regex"))),n}static validate(e,t,r="",a="instance"){if(null==t||""===t)return[];const s=e._valueConstraints??{},c=e._ui?.inputType,d=[],u=(e,t)=>d.push(l.ValidationPolicy.finding(e,r,t));if("string"!=typeof t&&("template"!==a||"numeric"!==c))return u("valueShape","A populated field value must be a string."),d;const m=String(t);if(null!=s.minLength&&o.TextPolicy.codePointLength(m)<s.minLength&&u("minLength",`Shorter than the minimum ${s.minLength}.`),null!=s.maxLength&&o.TextPolicy.codePointLength(m)>s.maxLength&&u("maxLength",`Longer than the maximum ${s.maxLength}.`),"string"==typeof s.regex&&""!==s.regex&&d.push(...this.regex(s.regex,m,r)),"email"!==c||/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(m)||u("email","Not a valid email address."),"phone-number"!==c||/^[+0-9 \t\-()]+$/.test(m)||u("phoneNumber","Not a valid phone number."),this.isIri(e)&&(i.IdentifierPolicy.isValidAuthoringIri(m,!0)||u("iriMalformed","Not a valid absolute IRI.")),"numeric"===c&&d.push(...this.numeric(s,t,r,a)),"temporal"===c)if("template"===a){try{n.TemporalDefaultPolicy.assertValid(s.temporalType??null,e._ui?.temporalGranularity??null,m)}catch(e){u("temporalType",e instanceof Error?e.message:"Invalid temporal default.")}/(Z|[+-]\d{2}:\d{2})$/.test(m)&&!0!==e._ui?.timezoneEnabled&&u("timezone","Carries a timezone offset but none is enabled.")}else d.push(...this.temporal(e,m,r));return Array.isArray(s.literals)&&s.literals.length&&!s.literals.some(e=>e?.label===m)&&u("choiceMembership","Not one of the declared options."),d}static validateNode(e,t,r=""){const n=[],i=(e,t,i)=>n.push(l.ValidationPolicy.finding(e,null===t?r:l.ValidationPolicy.child(r,t),i)),a=e._valueConstraints??{};if(!t||"object"!=typeof t||Array.isArray(t))return i("valueShape",null,"A field slot must be an object."),n;const s=t;for(const e of["rdfs:label","skos:prefLabel","skos:notation","@language"])Object.hasOwn(s,e)&&null!==s[e]&&"string"!=typeof s[e]&&i("valueShape",e,`${e} must be a string or null.`);if(Object.hasOwn(s,"@id")&&("string"!=typeof s["@id"]||""===s["@id"]))return i("iriMalformed","@id","A populated IRI must be a nonempty string."),n;const o=(e.required??[]).filter(e=>!Object.hasOwn(s,e));for(const e of o)i("missingProperty",e,`The field slot must contain ${e}.`);if(o.length)return n;if(0===Object.keys(s).length)return this.isIri(e)?(!0===a.requiredValue&&i("required",null,"A value is required."),n):(i("missingProperty","@value","A literal field slot must contain @value."),n);if(this.isIri(e))return Object.hasOwn(s,"@id")?"string"!=typeof s["@id"]||""===s["@id"]?(i("iriMalformed","@id","A populated IRI must be a nonempty string."),n):(Object.hasOwn(s,"@value")&&null!==s["@value"]&&i("valueShape","@value","An IRI field cannot contain a literal value."),n.push(...this.validate(e,s["@id"],r+"/@id")),n):null===s["@value"]?(!0===a.requiredValue&&i("required",null,"A value is required."),n):(i("controlledStructure","@id","An IRI field requires @id."),n);if(Object.hasOwn(s,"@id"))return i("valueShape","@id","A literal field cannot contain an IRI value."),n;if(!Object.hasOwn(s,"@value"))return i("valueShape","@value","A literal field requires @value."),n;const c=s["@value"];if(null===c||""===c)return!0===a.requiredValue&&i("required","@value","A value is required."),n;const d="numeric"===e._ui?.inputType?a.numberType:"temporal"===e._ui?.inputType?a.temporalType:null,u=e=>"string"==typeof e?e.replace("http://www.w3.org/2001/XMLSchema#","xsd:"):e;return null!=d&&u(s["@type"])!==u(d)&&i("valueType","@type",`The value must declare ${d}.`),n.push(...this.validate(e,c,r+"/@value")),n}static validateDefault(e,t=""){const r=(e._valueConstraints??{}).defaultValue;if(null==r)return[];const n=t+"/_valueConstraints/defaultValue";return this.isControlled(e)?r&&"object"==typeof r&&"string"==typeof r.termUri&&""!==r.termUri&&"string"==typeof r["rdfs:label"]&&""!==r["rdfs:label"]?this.validate(e,r.termUri,n+"/termUri","template"):[l.ValidationPolicy.finding("controlledStructure",n,"A controlled default requires termUri and rdfs:label.")]:this.validate(e,r,n,"template")}static assertConsistent(e){const t={...e,_valueConstraints:Object.fromEntries(Object.entries(e._valueConstraints??{}).filter(([,e])=>null!=e))},r=[...this.validateConfiguration(t),...this.validateDefault(t)].find(e=>l.ValidationPolicy.blocksSave(e.code,"template"));if(r)throw new Error(`${r.message} (${r.path})`)}static regex(e,t,r){const n=s.RegexChecks.inspect(e,t);return"valid"===n||"match"===n||"invalid"===n&&null!==t?[]:"mismatch"===n?[l.ValidationPolicy.finding("regex",r,"Does not match the field pattern.")]:"invalid"===n?[l.ValidationPolicy.finding("templateConstraint",r,"The field pattern is invalid.")]:[l.ValidationPolicy.finding("pending"===n?"regexPending":"regexEvaluation",r,"pending"===n?"Pattern validation is pending.":`Pattern validation could not finish (${n}).`,"pending"===n?"notChecked":"unavailable")]}static numeric(e,t,r,n){const i=[],s=(e,t)=>i.push(l.ValidationPolicy.finding(e,r,t)),o=e.numberType??"xsd:decimal",c=this.integerRanges[o],d=String(t);if("instance"===n&&(c?!/^[+-]?(?:0|[1-9][0-9]*)$/.test(d):!/^[+-]?(?:(?:0|[1-9][0-9]*)(?:\.[0-9]*)?|\.[0-9]+)$/.test(d)))return s("numberType",`Not a valid ${o}.`),i;try{if(!c&&!["xsd:float","xsd:double","xsd:decimal"].includes(o))throw new Error("Unknown numeric datatype.");if(a.NumericPolicy.value(t),c&&(!a.NumericPolicy.isInteger(t)||a.NumericPolicy.compare(t,c[0])<0||a.NumericPolicy.compare(t,c[1])>0))return s("numberType",`Outside the range of ${o}.`),i;if("template"===n&&("xsd:float"===o||"xsd:double"===o)){const e=d.replace(/^-/,""),t="xsd:float"===o?"3.4028234663852886e38":"1.7976931348623157e308",r="xsd:float"===o?"1.401298464324817e-45":"4.9e-324";if(a.NumericPolicy.compare(e,t)>0||0!==a.NumericPolicy.compare(e,0)&&a.NumericPolicy.compare(e,r)<0)return s("numberType",`Outside the range of ${o}.`),i}const r="instance"===n?d.split(".")[1]?.length??0:a.NumericPolicy.fractionalDigits(t);null!=e.decimalPlace&&r>e.decimalPlace&&s("decimalPlace",`More than ${e.decimalPlace} decimal places.`),("number"==typeof e.minValue||a.ExactDecimal.isExact(e.minValue))&&a.NumericPolicy.compare(t,e.minValue)<0&&s("minValue",`Below the minimum ${e.minValue}.`),("number"==typeof e.maxValue||a.ExactDecimal.isExact(e.maxValue))&&a.NumericPolicy.compare(t,e.maxValue)>0&&s("maxValue",`Above the maximum ${e.maxValue}.`)}catch{s("numberType","Not a finite decimal value.")}return i}static temporal(e,t,r){const n=[],i=(e,t)=>n.push(l.ValidationPolicy.finding(e,r,t)),a=e._valueConstraints?.temporalType,s=e._ui?.temporalGranularity,o=t.match(/(Z|[+-]\d{2}:\d{2})$/)?.[0],c=o?t.slice(0,-o.length):t;if(o){if("Z"!==o){const e=Number(o.slice(1,3)),t=Number(o.slice(4));(e>14||t>59||14===e&&0!==t)&&i("timezoneOffset","Not a valid xsd timezone offset.")}!0!==e._ui?.timezoneEnabled&&i("timezone","Carries a timezone offset but none is enabled.")}const d=/^(\d{4})-(\d{2})-(\d{2})$/,u=/^(\d{2}):(\d{2})(?::(\d{2}))?(\.\d+)?$/,m=c.split("T"),p="xsd:time"===a?null:m[0],h="xsd:time"===a?c:2===m.length?m[1]:null;if(!("xsd:date"===a?1===m.length&&d.test(c):"xsd:time"===a?u.test(c):"xsd:dateTime"===a&&2===m.length&&d.test(m[0])&&u.test(m[1])))return i("temporalType",`Not a valid ${a}.`),n;const f=p?.match(d),y=h?.match(u);if(f){const e=Number(f[1]),t=Number(f[2]),r=Number(f[3]);(t<1||t>12||r<1||r>[31,e%4!=0||e%100==0&&e%400!=0?28:29,31,30,31,30,31,31,30,31,30,31][t-1])&&i("temporalCalendar","Not a real calendar date.")}if(y&&(Number(y[1])>23||Number(y[2])>59||Number(y[3]??0)>59)&&i("temporalCalendar","Not a real time of day."),s){let e=f&&("year"===s&&("01"!==f[2]||"01"!==f[3])||"month"===s&&"01"!==f[3]);if(y){const t="00"===y[1]&&"00"===y[2]&&(null==y[3]||"00"===y[3])&&null==y[4];e||=["year","month","day"].includes(s)&&!("xsd:dateTime"===a&&t),e||=("second"===s||"decimalSecond"===s)&&null==y[3],e||="decimalSecond"===s&&null==y[4],e||="hour"===s&&("00"!==y[2]||null!=y[3]&&"00"!==y[3]||null!=y[4]),e||="minute"===s&&(null!=y[3]&&"00"!==y[3]||null!=y[4]),e||="second"===s&&null!=y[4]}e&&i("temporalGranularity",`Does not match ${s} granularity.`)}return n}}t.FieldValuePolicy=c},2500(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifierPolicy=void 0,t.IdentifierPolicy=class{static assertIdentifierCharacters(e,t){if(null!==e){if(Array.from(e).some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)>=127&&e.charCodeAt(0)<=159||/\p{Z}/u.test(e)))throw new Error(`Invalid URI at "${t}": unescaped space or control character.`);if(e.indexOf("#")!==e.lastIndexOf("#"))throw new Error(`Invalid URI at "${t}": more than one fragment delimiter.`);if(e.split(/[/?#]/,1)[0].includes(":")&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))throw new Error(`Invalid URI at "${t}": malformed scheme.`)}}static assertFieldIri(e,t){if(null===e)return;if(""===e)throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);if("string"!=typeof e)throw new Error(`Invalid URI/IRI at "${t}": expected string.`);let r=!1,n=!1;for(const i of e){const e=i.codePointAt(0);if("#"===i?(n=!0,r=!1):"?"!==i||n||(r=!0),e<128){if(e<=32||127===e||'<>"{}|\\^`'.includes(i))throw new Error(`Invalid URI/IRI at "${t}": unescaped space, control or forbidden character.`)}else if(!(e>=160&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65519||e>=65536&&e<=917501&&(65535&e)<=65533||e>=921600&&e<=983037||r&&(e>=57344&&e<=63743||e>=983040&&e<=1048573||e>=1048576&&e<=1114109)))throw new Error(`Invalid URI/IRI at "${t}": forbidden Unicode character.`)}if(/%(?![0-9a-fA-F]{2})/.test(e))throw new Error(`Invalid URI/IRI at "${t}": malformed percent escape.`);const i=/^[A-Za-z][A-Za-z0-9+.-]*:/.exec(e)?.[0]??"",a=e.slice(i.length).split("#",1)[0];if(i&&!a||"//"===a)throw new Error(`Invalid URI/IRI at "${t}": missing scheme-specific part or authority.`);const s=Array.from(e,e=>e.codePointAt(0)>=128?encodeURIComponent(e):e).join("");this.assertIdentifierCharacters(s,t)}static assertIri(e,t){if(null!==e&&""!==e){if("string"!=typeof e)throw new Error(`Invalid URI at "${t}": expected a string.`);this.assertFieldIri(e,t),this.assertIdentifierCharacters(e,t)}}static assertIdentifier(e,t){if(null!==e){if("string"!=typeof e)throw new Error(`Invalid URI at "${t}": expected a string.`);if(""===e)throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);if(this.assertIri(e,t),!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))throw new Error(`Invalid URI at "${t}": an identifier must be an absolute IRI.`)}}static isValid(e){if("string"!=typeof e)return!1;try{return this.assertIdentifier(e,"value"),!0}catch{return!1}}static isValidFieldValue(e){if("string"!=typeof e)return!1;try{return this.assertFieldIri(e,"value"),!0}catch{return!1}}static isValidAuthoringIri(e,t=!1){if(!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))return!1;if(!(t?this.isValidFieldValue(e):this.isValid(e)))return!1;if(!/^https?:/i.test(e))return!0;if(!/^https?:\/\//i.test(e))return!1;try{return new URL(e).hostname.length>0}catch{return!1}}}},5904(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSourcePolicy=void 0;const n=r(2108),i=r(7120);class a{static sourceNumber(e){const t=n.NumericPolicy.value(e);return"number"==typeof t&&0!==n.NumericPolicy.compare(e,(0,i.javaPlainDecimal)(t))?n.ExactDecimal.forValue(e):t}static parse(e){let t=0;const r=()=>{for(;/[ \t\n\r]/.test(e[t]??"\0");)t++},i=()=>{throw new SyntaxError(`Invalid JSON at position ${t}`)};function s(){const r=t++;for(;;){if(t>=e.length)return i();const n=e[t++];if('"'===n)return JSON.parse(e.slice(r,t));if("\\"===n)t++;else if(n.charCodeAt(0)<32)return i()}}const o=function n(o){if(o>1e3)throw new RangeError("JSON nesting limit exceeded");r();const l=e[t];if('"'===l)return s();if("{"===l||"["===l){t++;const a={},c=[],d="{"===l?"}":"]";if(r(),e[t]!==d)for(;;){if(r(),"{"===l){if('"'!==e[t])return i();const l=s();if(Object.hasOwn(a,l))throw new SyntaxError("Duplicate JSON mapping key");if(r(),":"!==e[t++])return i();Object.defineProperty(a,l,{value:n(o+1),enumerable:!0,writable:!0,configurable:!0})}else c.push(n(o+1));if(r(),e[t]===d)break;if(","!==e[t++])return i()}return t++,"{"===l?a:c}for(const[r,n]of[["true",!0],["false",!1],["null",null]])if(e.startsWith(r,t))return t+=r.length,n;const c=/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?/.exec(e.slice(t));if(!c)return i();if(c[0].length>1e3)throw new RangeError("JSON number length limit exceeded");return t+=c[0].length,a.sourceNumber(c[0])}(0);if(r(),t!==e.length&&i(),null===o||"object"!=typeof o||Array.isArray(o)||o instanceof n.ExactDecimal)throw new SyntaxError("Expected a JSON object");return o}static clone(e){const t=new Set;return function e(r){if(n.ExactDecimal.isExact(r))return n.ExactDecimal.forValue(String(r));if(null==r||"string"==typeof r||"boolean"==typeof r)return r;if("number"==typeof r&&Number.isFinite(r))return r;if("object"!=typeof r||t.has(r))throw new TypeError("Expected acyclic JSON data");t.add(r);try{if(Array.isArray(r))return r.map(e);if(Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r))throw new TypeError("Expected a JSON object");return Object.fromEntries(Object.entries(r).map(([t,r])=>[t,e(r)]))}finally{t.delete(r)}}(e)}static stringify(e,t=0){const r=" ".repeat(Math.max(0,Math.min(10,t))),a=new Set,s=function e(t,s){if(n.ExactDecimal.isExact(t))return t.toString();if("number"==typeof t)return(0,i.javaPlainDecimal)(t);if("string"==typeof t||"boolean"==typeof t||null===t)return JSON.stringify(t);if(void 0!==t){if("object"!=typeof t)throw new TypeError("Expected a JSON value");if(s>1e3||a.has(t))throw new TypeError("Cyclic JSON value or nesting limit exceeded");a.add(t);try{const n=Array.isArray(t),i=[];if(n)for(const r of t)i.push(e(r,s+1)??"null");else for(const n of Object.keys(t)){const a=e(t[n],s+1);void 0!==a&&i.push(JSON.stringify(n)+(r?": ":":")+a)}const[a,o]=n?["[","]"]:["{","}"];return i.length?r?a+"\n"+r.repeat(s+1)+i.join(",\n"+r.repeat(s+1))+"\n"+r.repeat(s)+o:a+i.join(",")+o:a+o}finally{a.delete(t)}}}(e,0);if(void 0===s)throw new TypeError("Expected a JSON value");return s}}t.JsonSourcePolicy=a},2108(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NumericPolicy=t.ExactDecimal=void 0;class r{text;cedarExactDecimal=!0;static isExact(e){return null!==e&&"object"==typeof e&&!0===e.cedarExactDecimal&&"function"==typeof e.toJSON}constructor(e){this.text=e,Object.freeze(this)}static forValue(e){return new r(n.canonical(e))}toString(){return this.text}valueOf(){throw new Error("Use NumericPolicy.compare for exact decimals; implicit numeric coercion would lose precision.")}toJSON(){const e=JSON.rawJSON;if(!e)throw new Error("Use JsonSourcePolicy.stringify to serialize exact decimal numbers.");return e(this.text)}}t.ExactDecimal=r;class n{static parts(e){const t="string"==typeof e?e:String(e),r=/^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))(?:[eE]([+-]?\d+))?$/.exec(t);if(!r)throw new Error("Expected a finite decimal number without surrounding whitespace.");const n=r[3]??r[4]??"",i=BigInt(r[5]??"0");let a=i-BigInt(n.length);if(i<-2147483647n||i>2147483647n||a<-2147483647n||a>2147483648n)throw new Error("Decimal exponent or scale is outside the shared numeric range.");let s=((r[2]??"")+n).replace(/^0+/,"");if(!s)return{sign:0,digits:"0",exponent:0n};const o=/0+$/.exec(s)?.[0].length??0;return o&&(s=s.slice(0,-o),a+=BigInt(o)),{sign:"-"===r[1]?-1:1,digits:s,exponent:a}}static canonical(e){const{sign:t,digits:r,exponent:n}=this.parts(e);if(!t)return"0";const i=t<0?"-":"",a=n+BigInt(r.length-1);if(n>=0n&&a<1000n)return i+r+"0".repeat(Number(n));if(n<0n&&a>=-1000n){const e=r.length+Number(n);return i+(e>0?r.slice(0,e)+"."+r.slice(e):"0."+"0".repeat(-e)+r)}if(a>2147483647n){const e=n-2147483647n;return i+r+(e>0n?"0".repeat(Number(e)):"")+"E+"+(e>0n?2147483647n:n)}return i+r[0]+(r.length>1?"."+r.slice(1):"")+"E"+(a>=0n?"+":"")+a}static compare(e,t){const r=this.parts(e),n=this.parts(t);if(r.sign!==n.sign)return r.sign<n.sign?-1:1;if(!r.sign)return 0;const i=BigInt(r.digits.length)+r.exponent,a=BigInt(n.digits.length)+n.exponent;let s;if(i!==a)s=i<a?-1:1;else{const e=Math.max(r.digits.length,n.digits.length),t=r.digits.padEnd(e,"0"),i=n.digits.padEnd(e,"0");s=t===i?0:t<i?-1:1}return 0===s?0:s*r.sign}static isInteger(e){return this.parts(e).exponent>=0n}static fractionalDigits(e){return Math.max(0,-Number(this.parts(e).exponent))}static value(e){if(r.isExact(e))return e;if(this.parts(e),"number"==typeof e)return e;const t=Number(e);return!Number.isFinite(t)||Number.isInteger(t)&&!Number.isSafeInteger(t)||0!==this.compare(e,t)?r.forValue(e):t}}t.NumericPolicy=n},1991(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RegexChecks=void 0;const n=r(128);class i{changed;policy;entries=new Map;used=null;size=0;disposed=!1;capacityLimited=!1;static active=null;constructor(e=()=>{},t=new n.RegexPolicy){this.changed=e,this.policy=t}run(e){if(this.used)return e();const t=i.active;i.active=this,this.used=new Set,this.capacityLimited=!1;try{return e()}finally{const e=this.used;this.used=null,i.active=t;let r=!1;for(const[t,n]of this.entries)e.has(t)||(r=!0,this.entries.delete(t),this.size-=t.length,n.controller.abort());r&&this.capacityLimited&&queueMicrotask(()=>{this.disposed||this.changed()})}}static inspect(e,t=null){return this.active?.check(e,t)??"pending"}check(e,t){if(this.disposed)return"cancelled";if(e.length>1e4||(t?.length??0)>1e6)return"limit";const r=JSON.stringify([e,t]);this.used.add(r);const n=this.entries.get(r);if(n)return n.result;if(this.entries.size>=1024||this.size+r.length>4e6)return this.capacityLimited=!0,"limit";const i=new AbortController,a={result:"pending",controller:i,done:Promise.resolve()};return this.entries.set(r,a),this.size+=r.length,a.done=this.policy.evaluate(e,t,i.signal).then(e=>{this.disposed||this.entries.get(r)!==a||(a.result=e,this.pending||this.changed())}),"pending"}get pending(){return[...this.entries.values()].some(e=>"pending"===e.result)}async settled(){await Promise.all([...this.entries.values()].map(e=>e.done))}static async validate(e,t){const r=new i(void 0,t);try{let t=r.run(e);for(;r.pending;)await r.settled(),t=r.run(e);return t}finally{r.dispose()}}dispose(){this.disposed=!0;for(const e of this.entries.values())e.controller.abort();this.entries.clear(),this.size=0,this.policy.dispose()}}t.RegexChecks=i},128(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RegexPolicy=t.REGEX_WORKER_SOURCE=void 0,t.REGEX_WORKER_SOURCE="\n onmessage = ({data}) => {\n let result;\n try {\n const expression = new RegExp('^(?:' + data.pattern + ')$');\n result = data.value === null ? 'valid' : expression.test(data.value) ? 'match' : 'mismatch';\n } catch (_) { result = 'invalid'; }\n postMessage({id: data.id, result});\n };\n postMessage({ready: true});\n",t.RegexPolicy=class{worker=null;ready=!1;releaseSource=null;current=null;queue=[];serial=0;timer;idleTimer;closed=!1;options;constructor(e={}){this.options={workerFactory:e.workerFactory??(()=>{const e=globalThis,r=e.URL.createObjectURL(new e.Blob([t.REGEX_WORKER_SOURCE],{type:"text/javascript"}));return this.releaseSource=()=>e.URL.revokeObjectURL(r),new e.Worker(r)}),workTimeoutMs:e.workTimeoutMs??250,startupTimeoutMs:e.startupTimeoutMs??5e3,queueLimit:e.queueLimit??1024};for(const e of[this.options.workTimeoutMs,this.options.startupTimeoutMs,this.options.queueLimit])if(!Number.isSafeInteger(e)||e<1)throw new RangeError("Regex limits must be positive integers")}evaluate(e,t=null,r){return this.closed||r?.aborted?Promise.resolve("cancelled"):e.length>1e4||(t?.length??0)>1e6||this.queue.length>=this.options.queueLimit?Promise.resolve("limit"):new Promise(n=>{const i={id:++this.serial,pattern:e,value:t,finish:e=>{r?.removeEventListener("abort",a),n(e)}},a=()=>{this.current===i?this.fail("cancelled"):(this.queue=this.queue.filter(e=>e!==i),i.finish("cancelled"))};r?.addEventListener("abort",a,{once:!0}),this.queue.push(i),this.next()})}stopWorker(){clearTimeout(this.timer),clearTimeout(this.idleTimer),this.worker&&(this.worker.onmessage=null,this.worker.onerror=null,this.worker.terminate()),this.worker=null,this.ready=!1,this.releaseSource?.(),this.releaseSource=null}fail(e){this.stopWorker();const t=this.current;this.current=null,t?.finish(e),queueMicrotask(()=>this.next())}next(){if(!this.closed&&!this.current&&0!==this.queue.length)if(clearTimeout(this.idleTimer),this.current=this.queue.shift(),this.worker&&this.ready)this.send();else try{const e=this.options.workerFactory();this.worker=e,this.timer=setTimeout(()=>this.fail("unavailable"),this.options.startupTimeoutMs),e.onerror=()=>{this.worker===e&&this.fail("unavailable")},e.onmessage=({data:t})=>{if(this.worker!==e||!t||"object"!=typeof t)return;const r=t;if(r.ready&&!this.ready)clearTimeout(this.timer),this.ready=!0,this.send();else if(r.id===this.current?.id&&["valid","match","mismatch","invalid"].includes(r.result??"")){clearTimeout(this.timer);const e=this.current;this.current=null,e.finish(r.result),this.idleTimer=setTimeout(()=>this.stopWorker(),1e3),this.next()}}}catch{this.fail("unavailable")}}send(){if(this.current&&this.worker){this.timer=setTimeout(()=>this.fail("timeout"),this.options.workTimeoutMs);try{this.worker.postMessage({id:this.current.id,pattern:this.current.pattern,value:this.current.value})}catch{this.fail("unavailable")}}}dispose(){this.closed=!0,this.stopWorker(),this.current?.finish("cancelled"),this.current=null,this.queue.splice(0).forEach(e=>e.finish("cancelled"))}}},5036(e,t){t.TemporalDefaultPolicy=void 0,t.TemporalDefaultPolicy=class{static zone="(?:Z|[+-](?:(?:0\\d|1[0-3]):[0-5]\\d|14:00))?";static hour="(?:[01]\\d|2[0-3])";static minute="[0-5]\\d";static second="[0-5]\\d";static assertValid(e,t,r){if(null===r||""===r)return;const n=e;if(null===n)throw new Error("Temporal default requires a temporal datatype.");if(!this.isCompatibleGranularity(e,t))throw new Error(`Temporal datatype ${n} is not compatible with ${t} granularity.`);const i=this.datePattern(t,"xsd:date"===n),a=this.timePattern(t);let s;if(s="xsd:date"===n?i:"xsd:time"===n?a:this.dateTimePattern(t),!s.test(r)||!this.hasValidCalendarDate(r))throw new Error(`Temporal default "${r}" is not valid for ${n}`+(null===t?".":` at ${t} granularity.`))}static isCompatibleGranularity(e,t){return null===t||("xsd:date"===e?["year","month","day"].includes(t):"xsd:time"===e?["hour","minute","second","decimalSecond"].includes(t):["day","hour","minute","second","decimalSecond"].includes(t))}static datePattern(e,t){return"year"===e?/^\d{4}$/:"month"===e?/^\d{4}-(?:0[1-9]|1[0-2])$/:"day"!==e&&t?/^\d{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12]\d|3[01]))?)?$/:/^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$/}static timePattern(e){const t=this.zone,r=this.hour,n=this.minute,i=this.second;return"hour"===e?new RegExp(`^${r}${t}$`):"minute"===e?new RegExp(`^${r}:${n}${t}$`):"second"===e?new RegExp(`^${r}:${n}:${i}${t}$`):"decimalSecond"===e?new RegExp(`^${r}:${n}:${i}\\.\\d+${t}$`):new RegExp(`^${r}(?::${n}(?::${i}(?:\\.\\d+)?)?)?${t}$`)}static dateTimePattern(e){const t="\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])";return"hour"===e||"minute"===e||"second"===e||"decimalSecond"===e?new RegExp(`^${t}T${this.timePatternSource(e)}$`):"year"===e||"month"===e?/a^/:"day"===e?new RegExp(`^${t}$`):new RegExp(`^${t}(?:T${this.timePatternSource(null)})?$`)}static timePatternSource(e){return this.timePattern(e).source.replace(/^\^|\$$/g,"")}static hasValidCalendarDate(e){const t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);if(null===t)return!0;const r=Number(t[1]),n=Number(t[2]);return Number(t[3])<=[31,r%4!=0||r%100==0&&r%400!=0?28:29,31,30,31,30,31,31,30,31,30,31][n-1]}}},3992(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextPolicy=void 0,t.TextPolicy=class{constructor(){}static isBlank(e){for(const t of e)if(!this.isBlankCodePoint(t.codePointAt(0)))return!1;return!0}static isBlankCodePoint(e){return e>=9&&e<=13||e>=28&&e<=32||5760===e||e>=8192&&e<=8198||e>=8200&&e<=8202||8232===e||8233===e||8287===e||12288===e}static codePointLength(e){return Array.from(e).length}static trimInputPadding(e){return e.replace(/^[\t\n\r ]+|[\t\n\r ]+$/g,"")}}},5435(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampPolicy=void 0,t.TimestampPolicy=class{static canonical(e){const t=e.replace(/([+-][0-9]{2})([0-9]{2})$/,"$1:$2"),r=/^(\d{4}|-\d{4,9}|\+\d{5,9})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?([Zz]|[+-]\d{2}(?::\d{2}(?::\d{2})?)?)$/.exec(t);if(!r)throw new Error("Expected an ISO timestamp with an explicit offset.");const[,n,i,a,s,o,l="00",c="",d]=r,u=Number(n),m=Number(i),p=Number(a),h=[31,u%4!=0||u%100==0&&u%400!=0?28:29,31,30,31,30,31,31,30,31,30,31];if(0===u&&n.startsWith("-")||m<1||m>12||p<1||p>h[m-1]||Number(s)>23||Number(o)>59||Number(l)>59)throw new Error("Invalid timestamp calendar or clock value.");let f="Z";if("Z"!==d.toUpperCase()){const[e,t=0,r=0]=d.slice(1).split(":").map(Number);if(e>18||t>59||r>59||18===e&&(0!==t||0!==r))throw new Error("Timestamp offset is outside the ISO offset range.");(e||t||r)&&(f=`${d[0]}${String(e).padStart(2,"0")}:${String(t).padStart(2,"0")}`,r&&(f+=`:${String(r).padStart(2,"0")}`))}const y=(u<0?"-":u>9999?"+":"")+String(Math.abs(u)).padStart(4,"0"),T=c.replace(/0+$/,"");return`${y}-${i}-${a}T${s}:${o}:${l}${T?"."+T:""}${f}`}}},7092(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationPolicy=void 0;class r{static constraints=new Set(["minLength","maxLength","regex","pattern","email","link","phoneNumber","minValue","maxValue","decimalPlace","temporalGranularity","timezone","choiceMembership","maxItems","controlledTermMembership","authorityIdentifier","authorityMembership"]);static completeness=new Set(["required","minItems"]);static verification=new Set(["regexPending","regexEvaluation","regexUnavailable","semanticNotChecked","semanticUnavailable","controlledTermVerified","authorityVerified"]);static acceptsSemanticResult(e,t,r){switch(t){case"passed":return r===(e?"controlledTermVerified":"authorityVerified");case"failed":return e?"controlledTermMembership"===r:"authorityIdentifier"===r||"authorityMembership"===r;case"notChecked":return"semanticNotChecked"===r;case"unavailable":return"semanticUnavailable"===r;default:return!1}}static category(e){return this.constraints.has(e)?"constraint":this.completeness.has(e)?"completeness":this.verification.has(e)?"verification":"structural"}static blocksSave(e,t="instance"){if("string"!=typeof e&&"passed"===e.verificationStatus)return!1;const r="string"==typeof e?this.category(e):e.category;return"structural"===r||"template"===t&&("verification"!==r||"string"!=typeof e&&"failed"===e.verificationStatus)}static severity(e,t="instance"){return this.blocksSave(e,t)?"error":"warning"}static finding(e,t,r,n){const i={code:e,category:this.category(e),path:t,message:r};return void 0!==n&&(i.verificationStatus=n),i}static summarize(e,t="instance"){const r=e.filter(e=>"passed"!==e.verificationStatus);return{findings:[...e],structurallyValid:!r.some(e=>"structural"===e.category),canSave:!r.some(e=>this.blocksSave(e,t)),isValid:0===r.length}}static pointer(e){return e.map(e=>"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")).join("")}static child(e,t){return e+this.pointer([t])}}t.ValidationPolicy=r},3198(e,t,r){r.r(t),r.d(t,{Alias:()=>Y,CST:()=>n,Composer:()=>er,Document:()=>St,Lexer:()=>Nr,LineCounter:()=>wr,Pair:()=>Ee,Parser:()=>Pr,Scalar:()=>K,Schema:()=>vt,YAMLError:()=>Nt,YAMLMap:()=>ve,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,default:()=>i,isAlias:()=>m,isCollection:()=>g,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Jr,parseAllDocuments:()=>Br,parseDocument:()=>Yr,stringify:()=>kr,visit:()=>R,visitAsync:()=>S});var n={};r.r(n),r.d(n,{BOM:()=>hr,DOCUMENT:()=>fr,FLOW_END:()=>yr,SCALAR:()=>Tr,createScalarToken:()=>rr,isCollection:()=>gr,isScalar:()=>Er,prettyToken:()=>Cr,resolveAsScalar:()=>tr,setScalarValue:()=>nr,stringify:()=>sr,tokenType:()=>Ir,visit:()=>mr});var i={};r.r(i),r.d(i,{Alias:()=>Y,CST:()=>n,Composer:()=>er,Document:()=>St,Lexer:()=>Nr,LineCounter:()=>wr,Pair:()=>Ee,Parser:()=>Pr,Scalar:()=>K,Schema:()=>vt,YAMLError:()=>Nt,YAMLMap:()=>ve,YAMLParseError:()=>wt,YAMLSeq:()=>_e,YAMLWarning:()=>Lt,isAlias:()=>m,isCollection:()=>g,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Jr,parseAllDocuments:()=>Br,parseDocument:()=>Yr,stringify:()=>kr,visit:()=>R,visitAsync:()=>S});const a=Symbol.for("yaml.alias"),s=Symbol.for("yaml.document"),o=Symbol.for("yaml.map"),l=Symbol.for("yaml.pair"),c=Symbol.for("yaml.scalar"),d=Symbol.for("yaml.seq"),u=Symbol.for("yaml.node.type"),m=e=>!!e&&"object"==typeof e&&e[u]===a,p=e=>!!e&&"object"==typeof e&&e[u]===s,h=e=>!!e&&"object"==typeof e&&e[u]===o,f=e=>!!e&&"object"==typeof e&&e[u]===l,y=e=>!!e&&"object"==typeof e&&e[u]===c,T=e=>!!e&&"object"==typeof e&&e[u]===d;function g(e){if(e&&"object"==typeof e)switch(e[u]){case o:case d:return!0}return!1}function E(e){if(e&&"object"==typeof e)switch(e[u]){case a:case o:case c:case d:return!0}return!1}const C=e=>(y(e)||g(e))&&!!e.anchor,I=Symbol("break visit"),A=Symbol("skip children"),b=Symbol("remove node");function R(e,t){const r=N(t);p(e)?v(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):v(null,e,r,Object.freeze([]))}function v(e,t,r,n){const i=w(e,t,r,n);if(E(i)||f(i))return L(e,n,i),v(e,i,r,n);if("symbol"!=typeof i)if(g(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const i=v(e,t.items[e],r,n);if("number"==typeof i)e=i-1;else{if(i===I)return I;i===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=v("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const i=v("value",t.value,r,n);if(i===I)return I;i===b&&(t.value=null)}return i}async function S(e,t){const r=N(t);p(e)?await _(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):await _(null,e,r,Object.freeze([]))}async function _(e,t,r,n){const i=await w(e,t,r,n);if(E(i)||f(i))return L(e,n,i),_(e,i,r,n);if("symbol"!=typeof i)if(g(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const i=await _(e,t.items[e],r,n);if("number"==typeof i)e=i-1;else{if(i===I)return I;i===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=await _("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const i=await _("value",t.value,r,n);if(i===I)return I;i===b&&(t.value=null)}return i}function N(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function w(e,t,r,n){return"function"==typeof r?r(e,t,n):h(t)?r.Map?.(e,t,n):T(t)?r.Seq?.(e,t,n):f(t)?r.Pair?.(e,t,n):y(t)?r.Scalar?.(e,t,n):m(t)?r.Alias?.(e,t,n):void 0}function L(e,t,r){const n=t[t.length-1];if(g(n))n.items[e]=r;else if(f(n))"key"===e?n.key=r:n.value=r;else{if(!p(n)){const e=m(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=r}}R.BREAK=I,R.SKIP=A,R.REMOVE=b,S.BREAK=I,S.SKIP=A,S.REMOVE=b;const F={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},V=e=>e.replace(/[!,[\]{}]/g,e=>F[e]);class O{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},O.defaultYaml,e),this.tags=Object.assign({},O.defaultTags,t)}clone(){const e=new O(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new O(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:O.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},O.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:O.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},O.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=r;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+V(e.substring(r.length));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&E(e.contents)){const t={};R(e.contents,(e,r)=>{E(r)&&r.tag&&(t[r.tag]=!0)}),n=Object.keys(t)}else n=[];for(const[i,a]of r)"!!"===i&&"tag:yaml.org,2002:"===a||e&&!n.some(e=>e.startsWith(a))||t.push(`%TAG ${i} ${a}`);return t.join("\n")}}function x(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function D(e){const t=new Set;return R(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function M(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function P(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,r=n.length;t<r;++t){const r=n[t],i=P(e,n,String(t),r);void 0===i?delete n[t]:i!==r&&(n[t]=i)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const r=n.get(t),i=P(e,n,t,r);void 0===i?n.delete(t):i!==r&&n.set(t,i)}else if(n instanceof Set)for(const t of Array.from(n)){const r=P(e,n,t,t);void 0===r?n.delete(t):r!==t&&(n.delete(t),n.add(r))}else for(const[t,r]of Object.entries(n)){const i=P(e,n,t,r);void 0===i?delete n[t]:i!==r&&(n[t]=i)}return e.call(t,r,n)}function U(e,t,r){if(Array.isArray(e))return e.map((e,t)=>U(e,String(t),r));if(e&&"function"==typeof e.toJSON){if(!r||!C(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const i=e.toJSON(t,r);return r.onCreate&&r.onCreate(i),i}return"bigint"!=typeof e||r?.keep?e:Number(e)}O.defaultYaml={explicit:!1,version:"1.2"},O.defaultTags={"!!":"tag:yaml.org,2002:"};class B{constructor(e){Object.defineProperty(this,u,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:i}={}){if(!p(e))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},s=U(this,"",a);if("function"==typeof n)for(const{count:e,res:t}of a.anchors.values())n(t,e);return"function"==typeof i?P(i,{"":s},"",s):s}}class Y extends B{constructor(e){super(a),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(0===t?.maxAliasCount)throw new ReferenceError("Alias resolution is disabled");let r,n;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],R(e,{Node:(e,t)=>{(m(t)||C(t))&&r.push(t)}}),t&&(t.aliasResolveCache=r));for(const e of r){if(e===this)break;e.anchor===this.source&&(n=e)}if(n&&t){const{anchors:e,doc:r,maxAliasCount:i}=t;let a=e.get(n);if(a||(U(n,null,t),a=e.get(n)),void 0===a?.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(a.count+=1,0===a.aliasCount&&(a.aliasCount=J(r,n,e)),a.count*a.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return n}toJSON(e,t){if(!t)return{source:this.source};const r=this.resolve(t.doc,t);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}return t.anchors.get(r).res}toString(e,t,r){const n=`*${this.source}`;if(e){if(x(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function J(e,t,r){if(m(t)){const n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}if(g(t)){let n=0;for(const i of t.items){const t=J(e,i,r);t>n&&(n=t)}return n}if(f(t)){const n=J(e,t.key,r),i=J(e,t.value,r);return Math.max(n,i)}return 1}const k=e=>!e||"function"!=typeof e&&"object"!=typeof e;class K extends B{constructor(e){super(c),this.value=e}toJSON(e,t){return t?.keep?this.value:U(this.value,e,t)}toString(){return String(this.value)}}function W(e,t,r){if(p(e)&&(e=e.contents),E(e))return e;if(f(e)){const t=r.schema[o].createNode?.(r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:a,schema:s,sourceObjects:l}=r;let c;if(n&&e&&"object"==typeof e){if(c=l.get(e),c)return c.anchor??(c.anchor=i(e)),new Y(c.anchor);c={anchor:null,node:null},l.set(e,c)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let u=function(e,t,r){if(t){const e=r.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(t=>t.identify?.(e)&&!t.format)}(e,t,s.tags);if(!u){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new K(e);return c&&(c.node=t),t}u=e instanceof Map?s[o]:Symbol.iterator in Object(e)?s[d]:s[o]}a&&(a(u),delete r.onTagObj);const m=u?.createNode?u.createNode(r.schema,e,r):"function"==typeof u?.nodeClass?.from?u.nodeClass.from(r.schema,e,r):new K(e);return t?m.tag=t:u.default||(m.tag=u.tag),c&&(c.node=m),m}function j(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if("number"==typeof r&&Number.isInteger(r)&&r>=0){const e=[];e[r]=n,n=e}else n=new Map([[r,n]])}return W(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}K.BLOCK_FOLDED="BLOCK_FOLDED",K.BLOCK_LITERAL="BLOCK_LITERAL",K.PLAIN="PLAIN",K.QUOTE_DOUBLE="QUOTE_DOUBLE",K.QUOTE_SINGLE="QUOTE_SINGLE";const $=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class X extends B{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>E(t)||f(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if($(e))this.add(t);else{const[r,...n]=e,i=this.get(r,!0);if(g(i))i.addIn(n,t);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,j(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(g(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,i=this.get(r,!0);return 0===n.length?!t&&y(i)?i.value:i:g(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!f(t))return!1;const r=t.value;return null==r||e&&y(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!g(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(g(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,j(this.schema,n,t))}}}}const q=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function G(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const z=(e,t,r)=>e.endsWith("\n")?G(r,t):r.includes("\n")?"\n"+G(r,t):(e.endsWith(" ")?"":" ")+r,H="block",Q="quoted";function Z(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:a=20,onFold:s,onOverflow:o}={}){if(!i||i<0)return e;i<a&&(a=0);const l=Math.max(1+a,1+i-t.length);if(e.length<=l)return e;const c=[],d={};let u,m,p=i-t.length;"number"==typeof n&&(n>i-Math.max(2,a)?c.push(0):p=i-n);let h=!1,f=-1,y=-1,T=-1;r===H&&(f=ee(e,f,t.length),-1!==f&&(p=f+l));for(let n;n=e[f+=1];){if(r===Q&&"\\"===n){switch(y=f,e[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}T=f}if("\n"===n)r===H&&(f=ee(e,f,t.length)),p=f+t.length+l,u=void 0;else{if(" "===n&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const t=e[f+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(u=f)}if(f>=p)if(u)c.push(u),p=u+l,u=void 0;else if(r===Q){for(;" "===m||"\t"===m;)m=n,n=e[f+=1],h=!0;const t=f>T+1?f-2:y-1;if(d[t])return e;c.push(t),d[t]=!0,p=t+l,u=void 0}else h=!0}m=n}if(h&&o&&o(),0===c.length)return e;s&&s();let g=e.slice(0,c[0]);for(let n=0;n<c.length;++n){const i=c[n],a=c[n+1]||e.length;0===i?g=`\n${t}${e.slice(0,a)}`:(r===Q&&d[i]&&(g+=`${e[i]}\\`),g+=`\n${t}${e.slice(i+1,a)}`)}return g}function ee(e,t,r){let n=t,i=t+1,a=e[i];for(;" "===a||"\t"===a;)if(t<i+r)a=e[++t];else{do{a=e[++t]}while(a&&"\n"!==a);n=t,i=t+1,a=e[i]}return n}const te=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),re=e=>/^(%|---|\.\.\.)/m.test(e);function ne(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(re(e)?" ":"");let s="",o=0;for(let e=0,t=r[e];t;t=r[++e])if(" "===t&&"\\"===r[e+1]&&"n"===r[e+2]&&(s+=r.slice(o,e)+"\\ ",e+=1,o=e,t="\\"),"\\"===t)switch(r[e+1]){case"u":{s+=r.slice(o,e);const t=r.substr(e+2,4);switch(t){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===t.substr(0,2)?s+="\\x"+t.substr(2):s+=r.substr(e,6)}e+=5,o=e+1}break;case"n":if(n||'"'===r[e+2]||r.length<i)e+=1;else{for(s+=r.slice(o,e)+"\n\n";"\\"===r[e+2]&&"n"===r[e+3]&&'"'!==r[e+4];)s+="\n",e+=2;s+=a," "===r[e+2]&&(s+="\\"),e+=1,o=e+1}break;default:e+=1}return s=o?s+r.slice(o):r,n?s:Z(s,a,"quoted",te(t,!1))}function ie(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ne(e,t);const r=t.indent||(re(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${r}`)+"'";return t.implicitKey?n:Z(n,r,"flow",te(t,!1))}function ae(e,t){const{singleQuote:r}=t.options;let n;if(!1===r)n=ne;else{const t=e.includes('"'),i=e.includes("'");n=t&&!i?ie:i&&!t?ne:r?ie:ne}return n(e,t)}let se;try{se=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{se=/\n+(?!\n|$)/g}function oe({comment:e,type:t,value:r},n,i,a){const{blockQuote:s,commentString:o,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return ae(r,n);const c=n.indent||(n.forceBlockIndent||re(r)?" ":""),d="literal"===s||"folded"!==s&&t!==K.BLOCK_FOLDED&&(t===K.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;const n=t-r,i=e.length;if(i<=n)return!1;for(let t=0,r=0;t<i;++t)if("\n"===e[t]){if(t-r>n)return!0;if(r=t+1,i-r<=n)return!1}return!0}(r,l,c.length));if(!r)return d?"|\n":">\n";let u,m;for(m=r.length;m>0;--m){const e=r[m-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let p=r.substring(m);const h=p.indexOf("\n");-1===h?u="-":r===p||h!==p.length-1?(u="+",a&&a()):u="",p&&(r=r.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(se,`$&${c}`));let f,y=!1,T=-1;for(f=0;f<r.length;++f){const e=r[f];if(" "===e)y=!0;else{if("\n"!==e)break;T=f}}let g=r.substring(0,T<f?T+1:f);g&&(r=r.substring(g.length),g=g.replace(/\n+/g,`$&${c}`));let E=(y?c?"2":"1":"")+u;if(e&&(E+=" "+o(e.replace(/ ?[\r\n]+/g," ")),i&&i()),!d){const e=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let i=!1;const a=te(n,!0);"folded"!==s&&t!==K.BLOCK_FOLDED&&(a.onOverflow=()=>{i=!0});const o=Z(`${g}${e}${p}`,c,"block",a);if(!i)return`>${E}\n${c}${o}`}return`|${E}\n${c}${g}${r=r.replace(/\n+/g,`$&${c}`)}${p}`}function le(e,t,r,n){const{implicitKey:i,inFlow:a}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==K.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=K.QUOTE_DOUBLE);const l=e=>{switch(e){case K.BLOCK_FOLDED:case K.BLOCK_LITERAL:return i||a?ae(s.value,t):oe(s,t,r,n);case K.QUOTE_DOUBLE:return ne(s.value,t);case K.QUOTE_SINGLE:return ie(s.value,t);case K.PLAIN:return function(e,t,r,n){const{type:i,value:a}=e,{actualString:s,implicitKey:o,indent:l,indentStep:c,inFlow:d}=t;if(o&&a.includes("\n")||d&&/[[\]{},]/.test(a))return ae(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return o||d||!a.includes("\n")?ae(a,t):oe(e,t,r,n);if(!o&&!d&&i!==K.PLAIN&&a.includes("\n"))return oe(e,t,r,n);if(re(a)){if(""===l)return t.forceBlockIndent=!0,oe(e,t,r,n);if(o&&l===c)return ae(a,t)}const u=a.replace(/\n+/g,`$&\n${l}`);if(s){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(u),{compat:r,tags:n}=t.doc.schema;if(n.some(e)||r?.some(e))return ae(a,t)}return o?u:Z(u,l,"flow",te(t,!1))}(s,t,r,n);default:return null}};let c=l(o);if(null===c){const{defaultKeyType:e,defaultStringType:r}=t.options,n=i&&e||r;if(c=l(n),null===c)throw new Error(`Unsupported default string type ${n}`)}return c}function ce(e,t){const r=Object.assign({blockQuote:!0,commentString:q,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function de(e,t,r,n){if(f(e))return e.toString(t,r,n);if(m(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const a=E(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??(i=function(e,t){if(t.tag){const r=e.filter(e=>e.tag===t.tag);if(r.length>0)return r.find(e=>e.format===t.format)??r[0]}let r,n;if(y(t)){n=t.value;let i=e.filter(e=>e.identify?.(n));if(i.length>1){const e=i.filter(e=>e.test);e.length>0&&(i=e)}r=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else n=t,r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??(null===n?"null":typeof n)} value`);return r}(t.doc.schema.tags,a));const s=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const i=[],a=(y(e)||g(e))&&e.anchor;a&&x(a)&&(r.add(a),i.push(`&${a}`));const s=e.tag??(t.default?null:t.tag);return s&&i.push(n.directives.tagString(s)),i.join(" ")}(a,i,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const o="function"==typeof i.stringify?i.stringify(a,t,r,n):y(a)?le(a,t,r,n):a.toString(t,r,n);return s?y(a)||"{"===o[0]||"["===o[0]?`${s} ${o}`:`${s}\n${t.indent}${o}`:o}function ue(e,t){"debug"!==e&&"warn"!==e||console.warn(t)}const me="<<",pe={identify:e=>e===me||"symbol"==typeof e&&e.description===me,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new K(Symbol(me)),{addToJSMap:he}),stringify:()=>me};function he(e,t,r){const n=ye(e,r);if(T(n))for(const r of n.items)fe(e,t,r);else if(Array.isArray(n))for(const r of n)fe(e,t,r);else fe(e,t,n)}function fe(e,t,r){const n=ye(e,r);if(!h(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,e,Map);for(const[e,r]of i)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0});return t}function ye(e,t){return e&&m(t)?t.resolve(e.doc,e):t}function Te(e,t,{key:r,value:n}){if(E(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(((e,t)=>(pe.identify(t)||y(t)&&(!t.type||t.type===K.PLAIN)&&pe.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===pe.tag&&e.default))(e,r))he(e,t,n);else{const i=U(r,"",e);if(t instanceof Map)t.set(i,U(n,i,e));else if(t instanceof Set)t.add(i);else{const a=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(E(e)&&r?.doc){const t=ce(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),ue(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,i,e),s=U(n,a,e);a in t?Object.defineProperty(t,a,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[a]=s}}return t}function ge(e,t,r){const n=W(e,void 0,r),i=W(t,void 0,r);return new Ee(n,i)}class Ee{constructor(e,t=null){Object.defineProperty(this,u,{value:l}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return E(t)&&(t=t.clone(e)),E(r)&&(r=r.clone(e)),new Ee(t,r)}toJSON(e,t){return Te(t,t?.mapAsMap?new Map:{},this)}toString(e,t,r){return e?.doc?function({key:e,value:t},r,n,i){const{allNullValues:a,doc:s,indent:o,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:u}}=r;let m=E(e)&&e.comment||null;if(u){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(g(e)||!E(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let p=!u&&(!e||m&&null==t&&!r.inFlow||g(e)||(y(e)?e.type===K.BLOCK_FOLDED||e.type===K.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(u||!a),indent:o+l});let h,f,C,I=!1,A=!1,b=de(e,r,()=>I=!0,()=>A=!0);if(!p&&!r.inFlow&&b.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(a||null==t)return I&&n&&n(),""===b?"?":p?`? ${b}`:b}else if(a&&!u||null==t&&p)return b=`? ${b}`,m&&!I?b+=z(b,r.indent,c(m)):A&&i&&i(),b;I&&(m=null),p?(m&&(b+=z(b,r.indent,c(m))),b=`? ${b}\n${o}:`):(b=`${b}:`,m&&(b+=z(b,r.indent,c(m)))),E(t)?(h=!!t.spaceBefore,f=t.commentBefore,C=t.comment):(h=!1,f=null,C=null,t&&"object"==typeof t&&(t=s.createNode(t))),r.implicitKey=!1,p||m||!y(t)||(r.indentAtStart=b.length+1),A=!1,d||!(l.length>=2)||r.inFlow||p||!T(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let R=!1;const v=de(t,r,()=>R=!0,()=>A=!0);let S=" ";if(m||h||f)S=h?"\n":"",f&&(S+=`\n${G(c(f),r.indent)}`),""!==v||r.inFlow?S+=`\n${r.indent}`:"\n"===S&&C&&(S="\n\n");else if(!p&&g(t)){const e=v[0],n=v.indexOf("\n"),i=-1!==n,a=r.inFlow??t.flow??0===t.items.length;if(i||!a){let t=!1;if(i&&("&"===e||"!"===e)){let r=v.indexOf(" ");"&"===e&&-1!==r&&r<n&&"!"===v[r+1]&&(r=v.indexOf(" ",r+1)),(-1===r||n<r)&&(t=!0)}t||(S=`\n${r.indent}`)}}else""!==v&&"\n"!==v[0]||(S="");return b+=S+v,r.inFlow?R&&n&&n():C&&!R?b+=z(b,r.indent,c(C)):A&&i&&i(),b}(this,e,t,r):JSON.stringify(this)}}function Ce(e,t,r){return(t.inFlow??e.flow?Ae:Ie)(e,t,r)}function Ie({comment:e,items:t},r,{blockItemPrefix:n,flowChars:i,itemIndent:a,onChompKeep:s,onComment:o}){const{indent:l,options:{commentString:c}}=r,d=Object.assign({},r,{indent:a,type:null});let u=!1;const m=[];for(let e=0;e<t.length;++e){const i=t[e];let s=null;if(E(i))!u&&i.spaceBefore&&m.push(""),be(r,m,i.commentBefore,u),i.comment&&(s=i.comment);else if(f(i)){const e=E(i.key)?i.key:null;e&&(!u&&e.spaceBefore&&m.push(""),be(r,m,e.commentBefore,u))}u=!1;let o=de(i,d,()=>s=null,()=>u=!0);s&&(o+=z(o,a,c(s))),u&&s&&(u=!1),m.push(n+o)}let p;if(0===m.length)p=i.start+i.end;else{p=m[0];for(let e=1;e<m.length;++e){const t=m[e];p+=t?`\n${l}${t}`:"\n"}}return e?(p+="\n"+G(c(e),l),o&&o()):u&&s&&s(),p}function Ae({items:e},t,{flowChars:r,itemIndent:n}){const{indent:i,indentStep:a,flowCollectionPadding:s,options:{commentString:o}}=t;n+=a;const l=Object.assign({},t,{indent:n,inFlow:!0,type:null});let c=!1,d=0;const u=[];for(let r=0;r<e.length;++r){const i=e[r];let a=null;if(E(i))i.spaceBefore&&u.push(""),be(t,u,i.commentBefore,!1),i.comment&&(a=i.comment);else if(f(i)){const e=E(i.key)?i.key:null;e&&(e.spaceBefore&&u.push(""),be(t,u,e.commentBefore,!1),e.comment&&(c=!0));const r=E(i.value)?i.value:null;r?(r.comment&&(a=r.comment),r.commentBefore&&(c=!0)):null==i.value&&e?.comment&&(a=e.comment)}a&&(c=!0);let s=de(i,l,()=>a=null);c||(c=u.length>d||s.includes("\n")),r<e.length-1?s+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=u.reduce((e,t)=>e+t.length+2,2)+(s.length+2)>t.options.lineWidth)),c&&(s+=",")),a&&(s+=z(s,n,o(a))),u.push(s),d=u.length}const{start:m,end:p}=r;if(0===u.length)return m+p;if(!c){const e=u.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(c){let e=m;for(const t of u)e+=t?`\n${a}${i}${t}`:"\n";return`${e}\n${i}${p}`}return`${m}${s}${u.join(" ")}${s}${p}`}function be({indent:e,options:{commentString:t}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const i=G(t(n),e);r.push(i.trimStart())}}function Re(e,t){const r=y(t)?t.value:t;for(const n of e)if(f(n)){if(n.key===t||n.key===r)return n;if(y(n.key)&&n.key.value===r)return n}}class ve extends X{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:i}=r,a=new this(e),s=(e,s)=>{if("function"==typeof i)s=i.call(t,e,s);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==s||n)&&a.items.push(ge(e,s,r))};if(t instanceof Map)for(const[e,r]of t)s(e,r);else if(t&&"object"==typeof t)for(const e of Object.keys(t))s(e,t[e]);return"function"==typeof e.sortMapEntries&&a.items.sort(e.sortMapEntries),a}add(e,t){let r;r=f(e)?e:e&&"object"==typeof e&&"key"in e?new Ee(e.key,e.value):new Ee(e,e?.value);const n=Re(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);y(n.value)&&k(r.value)?n.value.value=r.value:n.value=r.value}else if(i){const e=this.items.findIndex(e=>i(r,e)<0);-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=Re(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=Re(this.items,e),n=r?.value;return(!t&&y(n)?n.value:n)??void 0}has(e){return!!Re(this.items,e)}set(e,t){this.add(new Ee(e,t),!0)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)Te(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items)if(!f(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Ce(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const Se={collection:"map",default:!0,nodeClass:ve,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>ve.from(e,t,r)};class _e extends X{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(d,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Ne(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const r=Ne(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&y(n)?n.value:n}has(e){const t=Ne(e);return"number"==typeof t&&t<this.items.length}set(e,t){const r=Ne(e);if("number"!=typeof r)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[r];y(n)&&k(t)?n.value=t:this.items[r]=t}toJSON(e,t){const r=[];t?.onCreate&&t.onCreate(r);let n=0;for(const e of this.items)r.push(U(e,String(n++),t));return r}toString(e,t,r){return e?Ce(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let a of t){if("function"==typeof n){const r=t instanceof Set?a:String(e++);a=n.call(t,r,a)}i.items.push(W(a,void 0,r))}}return i}}function Ne(e){let t=y(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const we={collection:"seq",default:!0,nodeClass:_e,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(T(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>_e.from(e,t,r)},Le={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>le(e,t=Object.assign({actualString:!0},t),r,n)},Fe={identify:e=>null==e,createNode:()=>new K(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new K(null),stringify:({source:e},t)=>"string"==typeof e&&Fe.test.test(e)?e:t.options.nullStr},Ve={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new K("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},r)=>e&&Ve.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?r.options.trueStr:r.options.falseStr};function Oe({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const i="number"==typeof n?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let a=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^-?\d/.test(a)&&!a.includes("e")){let e=a.indexOf(".");e<0&&(e=a.length,a+=".");let r=t-(a.length-e-1);for(;r-- >0;)a+="0"}return a}const xe={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Oe},De={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Oe(e)}},Me={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new K(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Oe},Pe=e=>"bigint"==typeof e||Number.isInteger(e),Ue=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Be(e,t,r){const{value:n}=e;return Pe(n)&&n>=0?r+n.toString(t):Oe(e)}const Ye={identify:e=>Pe(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Ue(e,2,8,r),stringify:e=>Be(e,8,"0o")},Je={identify:Pe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Ue(e,0,10,r),stringify:Oe},ke={identify:e=>Pe(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Ue(e,2,16,r),stringify:e=>Be(e,16,"0x")},Ke=[Se,we,Le,Fe,Ve,Ye,Je,ke,xe,De,Me];function We(e){return"bigint"==typeof e||Number.isInteger(e)}const je=({value:e})=>JSON.stringify(e),$e=[Se,we].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:je},{identify:e=>null==e,createNode:()=>new K(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:je},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:je},{identify:We,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>We(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:je}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),Xe={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,i,a){if(!r)return"";const s=r;let o;if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);o=btoa(e)}if(t??(t=K.BLOCK_LITERAL),t!==K.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(o.length/e),i=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)i[t]=o.substr(n,e);o=i.join(t===K.BLOCK_LITERAL?"\n":" ")}return le({comment:e,type:t,value:o},n,i,a)}};function qe(e,t){if(T(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(!f(n)){if(h(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new Ee(new K(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=f(n)?n:new Ee(n)}}else t("Expected a sequence for this tag");return e}function Ge(e,t,r){const{replacer:n}=r,i=new _e(e);i.tag="tag:yaml.org,2002:pairs";let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,o;if("function"==typeof n&&(e=n.call(t,String(a++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);s=e[0],o=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);s=t[0],o=e[s]}else s=e;i.items.push(ge(s,o,r))}return i}const ze={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:qe,createNode:Ge};class He extends _e{constructor(){super(),this.add=ve.prototype.add.bind(this),this.delete=ve.prototype.delete.bind(this),this.get=ve.prototype.get.bind(this),this.has=ve.prototype.has.bind(this),this.set=ve.prototype.set.bind(this),this.tag=He.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const e of this.items){let n,i;if(f(e)?(n=U(e.key,"",t),i=U(e.value,n,t)):n=U(e,"",t),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,i)}return r}static from(e,t,r){const n=Ge(e,t,r),i=new this;return i.items=n.items,i}}He.tag="tag:yaml.org,2002:omap";const Qe={collection:"seq",identify:e=>e instanceof Map,nodeClass:He,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=qe(e,t),n=[];for(const{key:e}of r.items)y(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new He,r)},createNode:(e,t,r)=>He.from(e,t,r)};function Ze({value:e,source:t},r){return t&&(e?et:tt).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const et={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new K(!0),stringify:Ze},tt={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new K(!1),stringify:Ze},rt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Oe},nt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Oe(e)}},it={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new K(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:Oe},at=e=>"bigint"==typeof e||Number.isInteger(e);function st(e,t,r,{intAsBigInt:n}){const i=e[0];if("-"!==i&&"+"!==i||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===i?BigInt(-1)*t:t}const a=parseInt(e,r);return"-"===i?-1*a:a}function ot(e,t,r){const{value:n}=e;if(at(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Oe(e)}const lt={identify:at,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>st(e,2,2,r),stringify:e=>ot(e,2,"0b")},ct={identify:at,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>st(e,1,8,r),stringify:e=>ot(e,8,"0")},dt={identify:at,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>st(e,0,10,r),stringify:Oe},ut={identify:at,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>st(e,2,16,r),stringify:e=>ot(e,16,"0x")};class mt extends ve{constructor(e){super(e),this.tag=mt.tag}add(e){let t;t=f(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new Ee(e.key,null):new Ee(e,null),Re(this.items,t.key)||this.items.push(t)}get(e,t){const r=Re(this.items,e);return!t&&f(r)?y(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=Re(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new Ee(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),i.items.push(ge(e,null,r));return i}}mt.tag="tag:yaml.org,2002:set";const pt={collection:"map",identify:e=>e instanceof Set,nodeClass:mt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>mt.from(e,t,r),resolve(e,t){if(h(e)){if(e.hasAllNullValues(!0))return Object.assign(new mt,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ht(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,i=e=>t?BigInt(e):Number(e),a=n.replace(/_/g,"").split(":").reduce((e,t)=>e*i(60)+i(t),i(0));return"-"===r?i(-1)*a:a}function ft(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Oe(e);let n="";t<0&&(n="-",t*=r(-1));const i=r(60),a=[t%i];return t<60?a.unshift(0):(t=(t-a[0])/i,a.unshift(t%i),t>=60&&(t=(t-a[0])/i,a.unshift(t))),n+a.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const yt={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>ht(e,r),stringify:ft},Tt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ht(e,!1),stringify:ft},gt={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(gt.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,i,a,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(r,n-1,i,a||0,s||0,o||0,l);const d=t[8];if(d&&"Z"!==d){let e=ht(d,!1);Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Et=[Se,we,Le,Fe,et,tt,lt,ct,dt,ut,rt,nt,it,Xe,pe,Qe,ze,pt,yt,Tt,gt],Ct=new Map([["core",Ke],["failsafe",[Se,we,Le]],["json",$e],["yaml11",Et],["yaml-1.1",Et]]),It={binary:Xe,bool:Ve,float:Me,floatExp:De,floatNaN:xe,floatTime:Tt,int:Je,intHex:ke,intOct:Ye,intTime:yt,map:Se,merge:pe,null:Fe,omap:Qe,pairs:ze,seq:we,set:pt,timestamp:gt},At={"tag:yaml.org,2002:binary":Xe,"tag:yaml.org,2002:merge":pe,"tag:yaml.org,2002:omap":Qe,"tag:yaml.org,2002:pairs":ze,"tag:yaml.org,2002:set":pt,"tag:yaml.org,2002:timestamp":gt};function bt(e,t,r){const n=Ct.get(t);if(n&&!e)return r&&!n.includes(pe)?n.concat(pe):n.slice();let i=n;if(!i){if(!Array.isArray(e)){const e=Array.from(Ct.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}i=[]}if(Array.isArray(e))for(const t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return r&&(i=i.concat(pe)),i.reduce((e,t)=>{const r="string"==typeof t?It[t]:t;if(!r){const e=JSON.stringify(t),r=Object.keys(It).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e},[])}const Rt=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class vt{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:a,toStringDefaults:s}){this.compat=Array.isArray(e)?bt(e,"compat"):e?bt(null,e):null,this.name="string"==typeof i&&i||"core",this.knownTags=n?At:{},this.tags=bt(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,o,{value:Se}),Object.defineProperty(this,c,{value:Le}),Object.defineProperty(this,d,{value:we}),this.sortMapEntries="function"==typeof a?a:!0===a?Rt:null}clone(){const e=Object.create(vt.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class St{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,u,{value:s});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:a}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(a=this.directives.yaml.version)):this.directives=new O({version:a}),this.setSchema(a,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(St.prototype,{[u]:{value:s}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=E(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){_t(this.contents)&&this.contents.add(e)}addIn(e,t){_t(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=D(this);e.anchor=!t||r.has(t)?M(t||"a",r):t}return new Y(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:a,flow:s,keepUndefined:o,onTagObj:l,tag:c}=r??{},{onAnchor:d,setAnchors:u,sourceObjects:m}=function(e,t){const r=[],n=new Map;let i=null;return{onAnchor:n=>{r.push(n),i??(i=D(e));const a=M(t,i);return i.add(a),a},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!y(t.node)&&!g(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,a||"a"),p=W(e,c,{aliasDuplicateObjects:i??!0,keepUndefined:o??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m});return s&&g(p)&&(p.flow=!0),u(),p}createPair(e,t,r={}){const n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new Ee(n,i)}delete(e){return!!_t(this.contents)&&this.contents.delete(e)}deleteIn(e){return $(e)?null!=this.contents&&(this.contents=null,!0):!!_t(this.contents)&&this.contents.deleteIn(e)}get(e,t){return g(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return $(e)?!t&&y(this.contents)?this.contents.value:this.contents:g(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!g(this.contents)&&this.contents.has(e)}hasIn(e){return $(e)?void 0!==this.contents:!!g(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=j(this.schema,[e],t):_t(this.contents)&&this.contents.set(e,t)}setIn(e,t){$(e)?this.contents=t:null==this.contents?this.contents=j(this.schema,Array.from(e),t):_t(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new O({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new O({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new vt(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:a}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=U(this.contents,t??"",s);if("function"==typeof i)for(const{count:e,res:t}of s.anchors.values())i(t,e);return"function"==typeof a?P(a,{"":o},"",o):o}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const r=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(r.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");const i=ce(e,t),{commentString:a}=i.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=a(e.commentBefore);r.unshift(G(t,""))}let s=!1,o=null;if(e.contents){if(E(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){const t=a(e.contents.commentBefore);r.push(G(t,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}const t=o?void 0:()=>s=!0;let l=de(e.contents,i,()=>o=null,t);o&&(l+=z(l,"",a(o))),"|"!==l[0]&&">"!==l[0]||"---"!==r[r.length-1]?r.push(l):r[r.length-1]=`--- ${l}`}else r.push(de(e.contents,i));if(e.directives?.docEnd)if(e.comment){const t=a(e.comment);t.includes("\n")?(r.push("..."),r.push(G(t,""))):r.push(`... ${t}`)}else r.push("...");else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,"")),t&&(s&&!o||""===r[r.length-1]||r.push(""),r.push(G(a(t),"")))}return r.join("\n")+"\n"}(this,e)}}function _t(e){if(g(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Nt extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class wt extends Nt{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class Lt extends Nt{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Ft=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map(e=>t.linePos(e));const{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let a=i-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(a>=60&&s.length>80){const e=Math.min(a-39,s.length-79);s="…"+s.substring(e),a-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),n>1&&/^ *$/.test(s.substring(0,a))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),s=r+s}if(/[^ ]/.test(s)){let e=1;const t=r.linePos[1];t?.line===n&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-a)));const o=" ".repeat(a)+"^".repeat(e);r.message+=`:\n\n${s}\n${o}\n`}};function Vt(e,{flow:t,indicator:r,next:n,offset:i,onError:a,parentIndent:s,startOnNewline:o}){let l=!1,c=o,d=o,u="",m="",p=!1,h=!1,f=null,y=null,T=null,g=null,E=null,C=null,I=null;for(const i of e)switch(h&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&a(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),f&&(c&&"comment"!==i.type&&"newline"!==i.type&&a(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),i.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!i.source.includes("\t")||(f=i),d=!0;break;case"comment":{d||a(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=i.source.substring(1)||" ";u?u+=m+e:u=e,m="",c=!1;break}case"newline":c?u?u+=i.source:C&&"seq-item-ind"===r||(l=!0):m+=i.source,c=!0,p=!0,(y||T)&&(g=i),d=!0;break;case"anchor":y&&a(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&a(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=i,I??(I=i.offset),c=!1,d=!1,h=!0;break;case"tag":T&&a(i,"MULTIPLE_TAGS","A node can have at most one tag"),T=i,I??(I=i.offset),c=!1,d=!1,h=!0;break;case r:(y||T)&&a(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),C&&a(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),C=i,c="seq-item-ind"===r||"explicit-key-ind"===r,d=!1;break;case"comma":if(t){E&&a(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),E=i,c=!1,d=!1;break}default:a(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),c=!1,d=!1}const A=e[e.length-1],b=A?A.offset+A.source.length:i;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&a(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(c&&f.indent<=s||"block-map"===n?.type||"block-seq"===n?.type)&&a(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:C,spaceBefore:l,comment:u,hasNewline:p,anchor:y,tag:T,newlineAfterProp:g,end:b,start:I??b}}function Ot(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Ot(t.key)||Ot(t.value))return!0}return!1;default:return!0}}function xt(e,t,r){if("flow-collection"===t?.type){const n=t.end[0];n.indent!==e||"]"!==n.source&&"}"!==n.source||!Ot(t)||r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Dt(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const i="function"==typeof n?n:(e,t)=>e===t||y(e)&&y(t)&&e.value===t.value;return t.some(e=>i(e.key,r))}const Mt="All mapping items must start at the same column";function Pt(e,t,r,n){let i="";if(e){let a=!1,s="";for(const o of e){const{source:e,type:l}=o;switch(l){case"space":a=!0;break;case"comment":{r&&!a&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";i?i+=s+t:i=t,s="";break}case"newline":i&&(s+=e),a=!0;break;default:n(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:i,offset:t}}const Ut="Block collections are not allowed within flow collections",Bt=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Yt(e,t,r,n,i,a){const s="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,i,a){const s=new(a?.nodeClass??ve)(r.schema);r.atRoot&&(r.atRoot=!1);let o=n.offset,l=null;for(const a of n.items){const{start:c,key:d,sep:u,value:m}=a,p=Vt(c,{indicator:"explicit-key-ind",next:d??u?.[0],offset:o,onError:i,parentIndent:n.indent,startOnNewline:!0}),h=!p.found;if(h){if(d&&("block-seq"===d.type?i(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&i(o,"BAD_INDENT",Mt)),!p.anchor&&!p.tag&&!u){l=p.end,p.comment&&(s.comment?s.comment+="\n"+p.comment:s.comment=p.comment);continue}(p.newlineAfterProp||Ot(d))&&i(d??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==n.indent&&i(o,"BAD_INDENT",Mt);r.atKey=!0;const f=p.end,y=d?e(r,d,p,i):t(r,f,c,null,p,i);r.schema.compat&&xt(n.indent,d,i),r.atKey=!1,Dt(r,s.items,y)&&i(f,"DUPLICATE_KEY","Map keys must be unique");const T=Vt(u??[],{indicator:"map-value-ind",next:m,offset:y.range[2],onError:i,parentIndent:n.indent,startOnNewline:!d||"block-scalar"===d.type});if(o=T.end,T.found){h&&("block-map"!==m?.type||T.hasNewline||i(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&p.start<T.found.offset-1024&&i(y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const l=m?e(r,m,T,i):t(r,o,u,null,T,i);r.schema.compat&&xt(n.indent,m,i),o=l.range[2];const c=new Ee(y,l);r.options.keepSourceTokens&&(c.srcToken=a),s.items.push(c)}else{h&&i(y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(y.comment?y.comment+="\n"+T.comment:y.comment=T.comment);const e=new Ee(y);r.options.keepSourceTokens&&(e.srcToken=a),s.items.push(e)}}return l&&l<o&&i(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[n.offset,o,l??o],s}(e,t,r,n,a):"block-seq"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,i,a){const s=new(a?.nodeClass??_e)(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let o=n.offset,l=null;for(const{start:a,value:c}of n.items){const d=Vt(a,{indicator:"seq-item-ind",next:c,offset:o,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!d.found){if(!(d.anchor||d.tag||c)){l=d.end,d.comment&&(s.comment=d.comment);continue}"block-seq"===c?.type?i(d.end,"BAD_INDENT","All sequence items must start at the same column"):i(o,"MISSING_CHAR","Sequence item without - indicator")}const u=c?e(r,c,d,i):t(r,d.end,a,null,d,i);r.schema.compat&&xt(n.indent,c,i),o=u.range[2],s.items.push(u)}return s.range=[n.offset,o,l??o],s}(e,t,r,n,a):function({composeNode:e,composeEmptyNode:t},r,n,i,a){const s="{"===n.start.source,o=s?"flow map":"flow sequence",l=new(a?.nodeClass??(s?ve:_e))(r.schema);l.flow=!0;const c=r.atRoot;c&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let d=n.offset+n.start.source.length;for(let a=0;a<n.items.length;++a){const c=n.items[a],{start:u,key:m,sep:p,value:h}=c,y=Vt(u,{flow:o,indicator:"explicit-key-ind",next:m??p?.[0],offset:d,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!y.found){if(!(y.anchor||y.tag||p||h)){0===a&&y.comma?i(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):a<n.items.length-1&&i(y.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),y.comment&&(l.comment?l.comment+="\n"+y.comment:l.comment=y.comment),d=y.end;continue}!s&&r.options.strict&&Ot(m)&&i(m,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===a)y.comma&&i(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(y.comma||i(y.start,"MISSING_CHAR",`Missing , between ${o} items`),y.comment){let e="";e:for(const t of u)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=l.items[l.items.length-1];f(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,y.comment=y.comment.substring(e.length+1)}}if(s||p||y.found){r.atKey=!0;const a=y.end,f=m?e(r,m,y,i):t(r,a,u,null,y,i);Bt(m)&&i(f.range,"BLOCK_IN_FLOW",Ut),r.atKey=!1;const T=Vt(p??[],{flow:o,indicator:"map-value-ind",next:h,offset:f.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(T.found){if(!s&&!y.found&&r.options.strict){if(p)for(const e of p){if(e===T.found)break;if("newline"===e.type){i(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}y.start<T.found.offset-1024&&i(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else h&&("source"in h&&":"===h.source?.[0]?i(h,"MISSING_CHAR",`Missing space after : in ${o}`):i(T.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const g=h?e(r,h,T,i):T.found?t(r,T.end,p,null,T,i):null;g?Bt(h)&&i(g.range,"BLOCK_IN_FLOW",Ut):T.comment&&(f.comment?f.comment+="\n"+T.comment:f.comment=T.comment);const E=new Ee(f,g);if(r.options.keepSourceTokens&&(E.srcToken=c),s){const e=l;Dt(r,e.items,f)&&i(a,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(E)}else{const e=new ve(r.schema);e.flow=!0,e.items.push(E);const t=(g??f).range;e.range=[f.range[0],t[1],t[2]],l.items.push(e)}d=g?g.range[2]:T.end}else{const n=h?e(r,h,y,i):t(r,y.end,p,null,y,i);l.items.push(n),d=n.range[2],Bt(h)&&i(n.range,"BLOCK_IN_FLOW",Ut)}}const u=s?"}":"]",[m,...p]=n.end;let h=d;if(m?.source===u)h=m.offset+m.source.length;else{const e=o[0].toUpperCase()+o.substring(1);i(d,c?"MISSING_CHAR":"BAD_INDENT",c?`${e} must end with a ${u}`:`${e} in block collection must be sufficiently indented and end with a ${u}`),m&&1!==m.source.length&&p.unshift(m)}if(p.length>0){const e=Pt(p,h,r.options.strict,i);e.comment&&(l.comment?l.comment+="\n"+e.comment:l.comment=e.comment),l.range=[n.offset,h,e.offset]}else l.range=[n.offset,h,h];return l}(e,t,r,n,a),o=s.constructor;return"!"===i||i===o.tagName?(s.tag=o.tagName,s):(i&&(s.tag=i),s)}function Jt(e,t,r){const n=t.offset,i=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=t[0],a=i[0];let s=0,o="",l=-1;for(let t=1;t<i.length;++t){const r=i[t];if(o||"-"!==r&&"+"!==r){const n=Number(r);!s&&n?s=n:-1===l&&(l=e+t)}else o=r}-1!==l&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,d="",u=i.length;for(let e=1;e<t.length;++e){const i=t[e];switch(i.type){case"space":c=!0;case"newline":u+=i.source.length;break;case"comment":r&&!c&&n(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=i.source.length,d=i.source.substring(1);break;case"error":n(i,"UNEXPECTED_TOKEN",i.message),u+=i.source.length;break;default:{n(i,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${i.type}`);const e=i.source;e&&"string"==typeof e&&(u+=e.length)}}}return{mode:a,indent:s,chomp:o,comment:d,length:u}}(t,e.options.strict,r);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};const a=">"===i.mode?K.BLOCK_FOLDED:K.BLOCK_LITERAL,s=t.source?function(e){const t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),i=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)i.push([t[e],t[e+1]]);return i}(t.source):[];let o=s.length;for(let e=s.length-1;e>=0;--e){const t=s[e][1];if(""!==t&&"\r"!==t)break;o=e}if(0===o){const e="+"===i.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"";let r=n+i.length;return t.source&&(r+=t.source.length),{value:e,type:a,comment:i.comment,range:[n,r,r]}}let l=t.indent+i.indent,c=t.offset+i.length,d=0;for(let t=0;t<o;++t){const[n,a]=s[t];if(""!==a&&"\r"!==a){if(n.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(c+n.length,"MISSING_CHAR",e)}0===i.indent&&(l=n.length),d=t,0!==l||e.atRoot||r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}0===i.indent&&n.length>l&&(l=n.length),c+=n.length+a.length+1}for(let e=s.length-1;e>=o;--e)s[e][0].length>l&&(o=e+1);let u="",m="",p=!1;for(let e=0;e<d;++e)u+=s[e][0].slice(l)+"\n";for(let e=d;e<o;++e){let[t,n]=s[e];c+=t.length+n.length+1;const o="\r"===n[n.length-1];if(o&&(n=n.slice(0,-1)),n&&t.length<l){const e="Block scalar lines must not be less indented than their "+(i.indent?"explicit indentation indicator":"first line");r(c-n.length-(o?2:1),"BAD_INDENT",e),t=""}a===K.BLOCK_LITERAL?(u+=m+t.slice(l)+n,m="\n"):t.length>l||"\t"===n[0]?(" "===m?m="\n":p||"\n"!==m||(m="\n\n"),u+=m+t.slice(l)+n,m="\n",p=!0):""===n?"\n"===m?u+="\n":m="\n":(u+=m+n,m=" ",p=!1)}switch(i.chomp){case"-":break;case"+":for(let e=o;e<s.length;++e)u+="\n"+s[e][0].slice(l);"\n"!==u[u.length-1]&&(u+="\n");break;default:u+="\n"}const h=n+i.length+t.source.length;return{value:u,type:a,comment:i.comment,range:[n,h,h]}}function kt(e,t,r){const{offset:n,type:i,source:a,end:s}=e;let o,l;const c=(e,t,i)=>r(n+e,t,i);switch(i){case"scalar":o=K.PLAIN,l=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Kt(e)}(a,c);break;case"single-quoted-scalar":o=K.QUOTE_SINGLE,l=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),Kt(e.slice(1,-1)).replace(/''/g,"'")}(a,c);break;case"double-quoted-scalar":o=K.QUOTE_DOUBLE,l=function(e,t){let r="";for(let n=1;n<e.length-1;++n){const i=e[n];if("\r"!==i||"\n"!==e[n+1])if("\n"===i){const{fold:t,offset:i}=Wt(e,n);r+=t,n=i}else if("\\"===i){let i=e[++n];const a=jt[i];if(a)r+=a;else if("\n"===i)for(i=e[n+1];" "===i||"\t"===i;)i=e[1+ ++n];else if("\r"===i&&"\n"===e[n+1])for(i=e[1+ ++n];" "===i||"\t"===i;)i=e[1+ ++n];else if("x"===i||"u"===i||"U"===i){const a="x"===i?2:"u"===i?4:8;r+=$t(e,n+1,a,t),n+=a}else{const i=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),r+=i}}else if(" "===i||"\t"===i){const t=n;let a=e[n+1];for(;" "===a||"\t"===a;)a=e[1+ ++n];"\n"===a||"\r"===a&&"\n"===e[n+2]||(r+=n>t?e.slice(t,n+1):i)}else r+=i}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(a,c);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+a.length,n+a.length]}}const d=n+a.length,u=Pt(s,d,t,r);return{value:l,type:o,comment:u.comment,range:[n,d,u.offset]}}function Kt(e){const t=/(.*?)\r?\n/sy;let r,n,i=t.exec(e);if(!i)return e;try{r=new RegExp("(?<![ \t])[ \t]+$"),n=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{r=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let a=i[1].replace(r,""),s=" ",o=t.lastIndex;for(;i=t.exec(e);){const e=i[1].replace(n,"");""===e?"\n"===s?a+=s:s="\n":(a+=s+e,s=" "),o=t.lastIndex}const l=/[ \t]*(.*)/sy;return l.lastIndex=o,i=l.exec(e),a+s+(i?.[1]??"")}function Wt(e,t){let r="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(r+="\n"),n=e[(t+=1)+1];return r||(r=" "),{fold:r,offset:t}}const jt={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function $t(e,t,r,n){const i=e.substr(t,r),a=i.length===r&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;try{return String.fromCodePoint(a)}catch{const i=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`),i}}function Xt(e,t,r,n){const{value:i,type:a,comment:s,range:o}="block-scalar"===t.type?Jt(e,t,n):kt(t,e.options.strict,n),l=r?e.directives.tagName(r.source,e=>n(r,"TAG_RESOLVE_FAILED",e)):null;let d,u;d=e.options.stringKeys&&e.atKey?e.schema[c]:l?function(e,t,r,n,i){if("!"===r)return e[c];const a=[];for(const t of e.tags)if(!t.collection&&t.tag===r){if(!t.default||!t.test)return t;a.push(t)}for(const e of a)if(e.test?.test(t))return e;const s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[c])}(e.schema,i,l,r,n):"scalar"===t.type?function({atKey:e,directives:t,schema:r},n,i,a){const s=r.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n))||r[c];if(r.compat){const e=r.compat.find(e=>e.default&&e.test?.test(n))??r[c];s.tag!==e.tag&&a(i,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(s.tag)} or ${t.tagString(e.tag)}`,!0)}return s}(e,i,t,n):e.schema[c];try{const a=d.resolve(i,e=>n(r??t,"TAG_RESOLVE_FAILED",e),e.options);u=y(a)?a:new K(a)}catch(e){const a=e instanceof Error?e.message:String(e);n(r??t,"TAG_RESOLVE_FAILED",a),u=new K(i)}return u.range=o,u.source=i,a&&(u.type=a),l&&(u.tag=l),d.format&&(u.format=d.format),s&&(u.comment=s),u}function qt(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===r?.type;)e+=r.source.length,r=t[++n];break}}return e}const Gt={composeNode:zt,composeEmptyNode:Ht};function zt(e,t,r,n){const i=e.atKey,{spaceBefore:a,comment:s,anchor:o,tag:l}=r;let c,d=!0;switch(t.type){case"alias":c=function({options:e},{offset:t,source:r,end:n},i){const a=new Y(r.substring(1));""===a.source&&i(t,"BAD_ALIAS","Alias cannot be an empty string"),a.source.endsWith(":")&&i(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,o=Pt(n,s,e.strict,i);return a.range=[t,s,o.offset],o.comment&&(a.comment=o.comment),a}(e,t,n),(o||l)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=Xt(e,t,l,n),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=function(e,t,r,n,i){const a=n.tag,s=a?t.directives.tagName(a.source,e=>i(a,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===r.type){const{anchor:e,newlineAfterProp:t}=n,r=e&&a?e.offset>a.offset?e:a:e??a;r&&(!t||t.offset<r.offset)&&i(r,"MISSING_CHAR","Missing newline after block sequence props")}const o="block-map"===r.type?"map":"block-seq"===r.type?"seq":"{"===r.start.source?"map":"seq";if(!a||!s||"!"===s||s===ve.tagName&&"map"===o||s===_e.tagName&&"seq"===o)return Yt(e,t,r,i,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===o);if(!l){const n=t.schema.knownTags[s];if(n?.collection!==o)return n?i(a,"BAD_COLLECTION_TYPE",`${n.tag} used for ${o} collection, but expects ${n.collection??"scalar"}`,!0):i(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Yt(e,t,r,i,s);t.schema.tags.push(Object.assign({},n,{default:!1})),l=n}const c=Yt(e,t,r,i,s,l),d=l.resolve?.(c,e=>i(a,"TAG_RESOLVE_FAILED",e),t.options)??c,u=E(d)?d:new K(d);return u.range=c.range,u.tag=s,l?.format&&(u.format=l.format),u}(Gt,e,t,r,n),o&&(c.anchor=o.source.substring(1))}catch(e){n(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),d=!1}return c??(c=Ht(e,t.offset,void 0,null,r,n)),o&&""===c.anchor&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&e.options.stringKeys&&(!y(c)||"string"!=typeof c.value||c.tag&&"tag:yaml.org,2002:str"!==c.tag)&&n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),a&&(c.spaceBefore=!0),s&&("scalar"===t.type&&""===t.source?c.comment=s:c.commentBefore=s),e.options.keepSourceTokens&&d&&(c.srcToken=t),c}function Ht(e,t,r,n,{spaceBefore:i,comment:a,anchor:s,tag:o,end:l},c){const d=Xt(e,{type:"scalar",offset:qt(t,r,n),indent:-1,source:""},o,c);return s&&(d.anchor=s.source.substring(1),""===d.anchor&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(d.spaceBefore=!0),a&&(d.comment=a,d.range[2]=l),d}function Qt(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function Zt(e){let t="",r=!1,n=!1;for(let i=0;i<e.length;++i){const a=e[i];switch(a[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(a.substring(1)||" "),r=!0,n=!1;break;case"%":"#"!==e[i+1]?.[0]&&(i+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}class er{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,r,n)=>{const i=Qt(e);n?this.warnings.push(new Lt(i,t,r)):this.errors.push(new wt(i,t,r))},this.directives=new O({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=Zt(this.prelude);if(r){const i=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!i)e.commentBefore=r;else if(g(i)&&!i.flow&&i.items.length>0){let e=i.items[0];f(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=i.commentBefore;i.commentBefore=e?`${r}\n${e}`:r}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Zt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{const i=Qt(e);i[0]+=t,this.onError(i,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:i,end:a},s){const o=Object.assign({_directives:t},e),l=new St(void 0,o),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=Vt(n,{indicator:"doc-start",next:i??a?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});d.found&&(l.directives.docStart=!0,!i||"block-map"!==i.type&&"block-seq"!==i.type||d.hasNewline||s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=i?zt(c,i,d,s):Ht(c,d.end,n,null,d,s);const u=l.contents.range[2],m=Pt(a,u,!1,s);return m.comment&&(l.comment=m.comment),l.range=[r,u,m.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new wt(Qt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new wt(Qt(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Pt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new wt(Qt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new St(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function tr(e,t=!0,r){if(e){const n=(e,t,n)=>{const i="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!r)throw new wt([i,i+1],t,n);r(i,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return kt(e,t,n);case"block-scalar":return Jt({options:{strict:t}},e,n)}}return null}function rr(e,t){const{implicitKey:r=!1,indent:n,inFlow:i=!1,offset:a=-1,type:s="PLAIN"}=t,o=le({type:s,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(o[0]){case"|":case">":{const e=o.indexOf("\n"),t=o.substring(0,e),r=o.substring(e+1)+"\n",i=[{type:"block-scalar-header",offset:a,indent:n,source:t}];return ir(i,l)||i.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:a,indent:n,props:i,source:r}}case'"':return{type:"double-quoted-scalar",offset:a,indent:n,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:a,indent:n,source:o,end:l};default:return{type:"scalar",offset:a,indent:n,source:o,end:l}}}function nr(e,t,r={}){let{afterKey:n=!1,implicitKey:i=!1,inFlow:a=!1,type:s}=r,o="indent"in e?e.indent:null;if(n&&"number"==typeof o&&(o+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");s=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const l=le({type:s,value:t},{implicitKey:i||null===o,indent:null!==o&&o>0?" ".repeat(o):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){const r=t.indexOf("\n"),n=t.substring(0,r),i=t.substring(r+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=i}else{const{offset:t}=e,r="indent"in e?e.indent:-1,a=[{type:"block-scalar-header",offset:t,indent:r,source:n}];ir(a,"end"in e?e.end:void 0)||a.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:a,source:i})}}(e,l);break;case'"':ar(e,l,"double-quoted-scalar");break;case"'":ar(e,l,"single-quoted-scalar");break;default:ar(e,l,"scalar")}}function ir(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function ar(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let i=t.length;"block-scalar-header"===e.props[0].type&&(i-=e.props[0].source.length);for(const e of n)e.offset+=i;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,i="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:i})}}}const sr=e=>"type"in e?or(e):lr(e);function or(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=or(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=lr(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=lr(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=lr(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function lr({start:e,key:t,sep:r,value:n}){let i="";for(const t of e)i+=t.source;if(t&&(i+=or(t)),r)for(const e of r)i+=e.source;return n&&(i+=or(n)),i}const cr=Symbol("break visit"),dr=Symbol("skip children"),ur=Symbol("remove item");function mr(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),pr(Object.freeze([]),e,t)}function pr(e,t,r){let n=r(t,e);if("symbol"==typeof n)return n;for(const i of["key","value"]){const a=t[i];if(a&&"items"in a){for(let t=0;t<a.items.length;++t){const n=pr(Object.freeze(e.concat([[i,t]])),a.items[t],r);if("number"==typeof n)t=n-1;else{if(n===cr)return cr;n===ur&&(a.items.splice(t,1),t-=1)}}"function"==typeof n&&"key"===i&&(n=n(t,e))}}return"function"==typeof n?n(t,e):n}mr.BREAK=cr,mr.SKIP=dr,mr.REMOVE=ur,mr.itemAtPath=(e,t)=>{let r=e;for(const[e,n]of t){const t=r?.[e];if(!t||!("items"in t))return;r=t.items[n]}return r},mr.parentCollection=(e,t)=>{const r=mr.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],i=r?.[n];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};const hr="\ufeff",fr="",yr="",Tr="",gr=e=>!!e&&"items"in e,Er=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function Cr(e){switch(e){case hr:return"<BOM>";case fr:return"<DOC>";case yr:return"<FLOW_END>";case Tr:return"<SCALAR>";default:return JSON.stringify(e)}}function Ir(e){switch(e){case hr:return"byte-order-mark";case fr:return"doc-mode";case yr:return"flow-error-end";case Tr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ar(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const br=new Set("0123456789ABCDEFabcdef"),Rr=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),vr=new Set(",[]{}"),Sr=new Set(" ,[]{}\n\r\t"),_r=e=>!e||Sr.has(e);class Nr{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&Ar(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===hr&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,r=e.indexOf("#");for(;-1!==r;){const n=e[r-1];if(" "===n||"\t"===n){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){const r=e[t-1];if(" "!==r&&"\t"!==r)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield fr,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&Ar(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ar(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&Ar(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(_r),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==r&&r<this.indentNext&&"#"!==n[0]||0===r&&(n.startsWith("---")||n.startsWith("..."))&&Ar(n[3]))&&(r!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield yr,yield*this.parseLineStart();let i=0;for(;","===n[i];)i+=(yield*this.pushCount(1)),i+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(i+=(yield*this.pushIndicators()),n[i]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-i),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(_r),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||Ar(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>Ar(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":r+=1;break;case"\n":t=n,r=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const i=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>i))break;t=e}return yield Tr,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(Ar(t)||e&&vr.has(t))break;r=n}else if(Ar(t)){let i=this.buffer[n+1];if("\r"===t&&("\n"===i?(n+=1,t="\n",i=this.buffer[n+1]):r=n),"#"===i||e&&vr.has(i))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&vr.has(t))break;r=n}return t||this.atEnd?(yield Tr,yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=(yield*this.pushTag()),e+=(yield*this.pushSpaces(!0));continue e;case"&":e+=(yield*this.pushUntil(_r)),e+=(yield*this.pushSpaces(!0));continue e;case"-":case"?":case":":{const t=this.flowLevel>0,r=this.charAt(1);if(Ar(r)||t&&vr.has(r)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=(yield*this.pushCount(1)),e+=(yield*this.pushSpaces(!0));continue e}}}break e}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!Ar(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(Rr.has(t))t=this.buffer[++e];else{if("%"!==t||!br.has(this.buffer[e+1])||!br.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class wr{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}function Lr(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Fr(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Vr(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Or(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function xr(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function Dr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function Mr(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||Lr(t.start,"explicit-key-ind")||Lr(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,Vr(t.value)?t.value.end?Dr(t.value.end,t.sep):t.value.end=t.sep:Dr(t.start,t.sep),delete t.sep)}class Pr{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Nr,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=Ir(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&Mr(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===Fr(r.start)&&(0===t.indent||r.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==Fr(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=xr(Or(this.peek(2)));let r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Dr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let i=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;n<t.sep.length;++n){const i=t.sep[n];switch(i.type){case"newline":r.push(n);break;case"space":break;case"comment":i.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(i=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?n||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Lr(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(Vr(t.key)&&!Lr(t.sep,"newline")){const e=xr(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else if(Lr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=xr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:i,key:null,sep:[this.sourceToken]}):Lr(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:i,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0))}default:{const n=this.startBlockValue(e);if(n){if("block-seq"===n.type){if(!t.explicitKey&&t.sep&&!Lr(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else r&&e.items.push({start:i});return void this.stack.push(n)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Dr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||Lr(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=xr(Or(t));Mr(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const i={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=xr(Or(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=xr(Or(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function Ur(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new wr||null,prettyErrors:t}}function Br(e,t={}){const{lineCounter:r,prettyErrors:n}=Ur(t),i=new Pr(r?.addNewLine),a=new er(t),s=Array.from(a.compose(i.parse(e)));if(n&&r)for(const t of s)t.errors.forEach(Ft(e,r)),t.warnings.forEach(Ft(e,r));return s.length>0?s:Object.assign([],{empty:!0},a.streamInfo())}function Yr(e,t={}){const{lineCounter:r,prettyErrors:n}=Ur(t),i=new Pr(r?.addNewLine),a=new er(t);let s=null;for(const t of a.compose(i.parse(e),!0,e.length))if(s){if("silent"!==s.options.logLevel){s.errors.push(new wt(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else s=t;return n&&r&&(s.errors.forEach(Ft(e,r)),s.warnings.forEach(Ft(e,r))),s}function Jr(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const i=Yr(e,r);if(!i)return null;if(i.warnings.forEach(e=>ue(i.options.logLevel,e)),i.errors.length>0){if("silent"!==i.options.logLevel)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},r))}function kr(e,t,r){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??t??{};if(!e)return}return p(e)&&!n?e.toString(r):new St(e,n,r).toString(r)}}};const t={};function r(n){const i=t[n];if(void 0!==i)return i.exports;const a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let n={};return(()=>{let e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.InstanceDataLinkAtom=e.InstanceDataTypedAtom=e.InstanceDataNotationAtom=e.InstanceDataLabelAtom=e.InstanceDataStringAtom=e.InstanceDataEmptyAtom=e.InstanceDataEmptyNode=e.ReservedNames=e.AttributeValueNamePolicy=e.InstanceDataAttributeValueFieldName=e.InstanceDataAttributeValueField=e.InstanceDataContainer=e.TemplateInstance=e.TemplateBuilder=e.Template=e.TemplateElementBuilder=e.TemplateElement=e.TemplateField=e.AbstractArtifact=e.AbstractInstanceArtifact=e.CedarFieldType=e.AbstractContainerArtifact=e.AbstractSchemaArtifact=e.YamlTemplateWriter=e.JsonTemplateWriter=e.YamlTemplateElementWriter=e.JsonTemplateElementWriter=e.JsonTemplateInstanceReader=e.InstanceValidator=e.InstanceInflater=e.YamlTemplateInstanceReader=e.YamlTemplateReader=e.JsonTemplateReader=e.YamlTemplateElementReader=e.JsonTemplateElementReader=e.YamlTemplateFieldReader=e.JsonTemplateFieldReader=e.JsonAbstractArtifactWriter=e.JsonAbstractArtifactReader=e.JsonAbstractInstanceArtifactReader=e.JsonAbstractSchemaArtifactReader=e.CedarYamlWriters=e.CedarYamlReaders=e.CedarJsonWriters=e.CedarJsonReaders=e.CedarReaders=e.CedarWriters=e.CedarBuilders=e.YamlTemplateFieldWriter=e.JsonTemplateFieldWriter=void 0,e.Language=e.PavVersion=e.CedarUser=e.CedarArtifactType=e.CedarFieldCategory=e.YamlValues=e.JsonTemplateInstanceWriter=e.JsonTemplateInstanceContent=e.PropertyIri=e.RoundTrip=e.ComparisonError=e.CedarArtifactId=e.BioportalTermType=e.BiboStatus=e.Iri=e.NumberType=e.TemporalType=e.TimeFormat=e.TemporalGranularity=e.JsonPath=e.SchemaVersion=e.IsoDate=e.JsonNode=e.ChildDeploymentInfoStaticBuilder=e.ChildDeploymentInfoStatic=e.ChildDeploymentInfoAlwaysMultipleBuilder=e.ChildDeploymentInfoAlwaysMultiple=e.ChildDeploymentInfoAlwaysSingleBuilder=e.ChildDeploymentInfoAlwaysSingle=e.ChildDeploymentInfoBuilder=e.ChildDeploymentInfo=e.ChildDeploymentInfoElementBuilder=e.ChildDeploymentInfoElement=e.AbstractFieldChildDeploymentInfoBuilder=e.AbstractFieldChildDeploymentInfo=e.AbstractDynamicChildDeploymentInfoBuilder=e.AbstractDynamicChildDeploymentInfo=e.AbstractChildDeploymentInfoBuilder=e.AbstractChildDeploymentInfo=e.ControlledTermVersion=e.ControlledTermActionBuilder=e.ControlledTermValueSetBuilder=e.ControlledTermOntologyBuilder=e.ControlledTermClassBuilder=e.ControlledTermBranchBuilder=e.IriSyntax=e.ControlledTermDefaultValue=e.ControlledTermDefaultValueBuilder=e.TemplateInstanceBuilder=e.InstanceDataControlledAtom=void 0,e.TemplateValueValidator=e.FieldValuePolicy=e.ValidationPolicy=e.RegexChecks=e.REGEX_WORKER_SOURCE=e.RegexPolicy=e.YamlSourcePolicy=e.JsonSourcePolicy=e.ExactDecimal=e.NumericPolicy=e.TimestampPolicy=e.DisplayText=e.IdentifierPolicy=e.TextPolicy=e.SchemaExtensions=e.AnnotationAtValue=e.AnnotationAtId=e.Annotations=e.YamlObjectComparator=e.JsonObjectComparator=e.ComparisonResult=e.YamlArtifactParsingResult=e.JsonArtifactParsingResult=e.YamlArtifactReaderResult=e.JsonArtifactReaderResult=e.YamlTemplateInstanceReaderResult=e.JsonTemplateInstanceReaderResult=e.YamlTemplateReaderResult=e.JsonTemplateReaderResult=e.YamlTemplateElementReaderResult=e.JsonTemplateElementReaderResult=e.YamlTemplateFieldReaderResult=e.JsonTemplateFieldReaderResult=e.ComparisonErrorType=void 0;const t=r(1625);Object.defineProperty(e,"InstanceDataNotationAtom",{enumerable:!0,get:function(){return t.InstanceDataNotationAtom}});const i=r(8810);Object.defineProperty(e,"CedarWriters",{enumerable:!0,get:function(){return i.CedarWriters}});const a=r(6568);Object.defineProperty(e,"CedarBuilders",{enumerable:!0,get:function(){return a.CedarBuilders}});const s=r(4381);Object.defineProperty(e,"JsonTemplateFieldReader",{enumerable:!0,get:function(){return s.JsonTemplateFieldReader}});const o=r(7909);Object.defineProperty(e,"JsonTemplateElementReader",{enumerable:!0,get:function(){return o.JsonTemplateElementReader}});const l=r(5291);Object.defineProperty(e,"JsonTemplateReader",{enumerable:!0,get:function(){return l.JsonTemplateReader}});const c=r(2748);Object.defineProperty(e,"JsonTemplateFieldWriter",{enumerable:!0,get:function(){return c.JsonTemplateFieldWriterInternal}});const d=r(5430);Object.defineProperty(e,"YamlTemplateFieldWriter",{enumerable:!0,get:function(){return d.YamlTemplateFieldWriterInternal}});const u=r(6645);Object.defineProperty(e,"JsonTemplateElementWriter",{enumerable:!0,get:function(){return u.JsonTemplateElementWriter}});const m=r(7519);Object.defineProperty(e,"JsonTemplateWriter",{enumerable:!0,get:function(){return m.JsonTemplateWriter}});const p=r(5251);Object.defineProperty(e,"YamlTemplateElementWriter",{enumerable:!0,get:function(){return p.YamlTemplateElementWriter}});const h=r(1933);Object.defineProperty(e,"YamlTemplateWriter",{enumerable:!0,get:function(){return h.YamlTemplateWriter}});const f=r(9129);Object.defineProperty(e,"TemplateField",{enumerable:!0,get:function(){return f.TemplateField}});const y=r(7661);Object.defineProperty(e,"TemplateElement",{enumerable:!0,get:function(){return y.TemplateElement}});const T=r(1762);Object.defineProperty(e,"TemplateElementBuilder",{enumerable:!0,get:function(){return T.TemplateElementBuilder}});const g=r(3281);Object.defineProperty(e,"Template",{enumerable:!0,get:function(){return g.Template}});const E=r(766);Object.defineProperty(e,"TemplateBuilder",{enumerable:!0,get:function(){return E.TemplateBuilder}});const C=r(4925);Object.defineProperty(e,"TemplateInstanceBuilder",{enumerable:!0,get:function(){return C.TemplateInstanceBuilder}});const I=r(9517);Object.defineProperty(e,"JsonNode",{enumerable:!0,get:function(){return I.JsonNode}});const A=r(9857);Object.defineProperty(e,"IsoDate",{enumerable:!0,get:function(){return A.IsoDate}});const b=r(8557);Object.defineProperty(e,"SchemaVersion",{enumerable:!0,get:function(){return b.SchemaVersion}});const R=r(3188);Object.defineProperty(e,"JsonPath",{enumerable:!0,get:function(){return R.JsonPath}});const v=r(7974);Object.defineProperty(e,"TemporalGranularity",{enumerable:!0,get:function(){return v.TemporalGranularity}});const S=r(3764);Object.defineProperty(e,"TimeFormat",{enumerable:!0,get:function(){return S.TimeFormat}});const _=r(8588);Object.defineProperty(e,"TemporalType",{enumerable:!0,get:function(){return _.TemporalType}});const N=r(3447);Object.defineProperty(e,"NumberType",{enumerable:!0,get:function(){return N.NumberType}});const w=r(8802);Object.defineProperty(e,"Iri",{enumerable:!0,get:function(){return w.Iri}});const L=r(2957);Object.defineProperty(e,"ControlledTermBranchBuilder",{enumerable:!0,get:function(){return L.ControlledTermBranchBuilder}});const F=r(3091);Object.defineProperty(e,"ControlledTermClassBuilder",{enumerable:!0,get:function(){return F.ControlledTermClassBuilder}});const V=r(5491);Object.defineProperty(e,"ControlledTermOntologyBuilder",{enumerable:!0,get:function(){return V.ControlledTermOntologyBuilder}});const O=r(1556);Object.defineProperty(e,"ControlledTermValueSetBuilder",{enumerable:!0,get:function(){return O.ControlledTermValueSetBuilder}});const x=r(2480);Object.defineProperty(e,"ControlledTermDefaultValueBuilder",{enumerable:!0,get:function(){return x.ControlledTermDefaultValueBuilder}});const D=r(7295);Object.defineProperty(e,"ControlledTermDefaultValue",{enumerable:!0,get:function(){return D.ControlledTermDefaultValue}});const M=r(8446);Object.defineProperty(e,"IriSyntax",{enumerable:!0,get:function(){return M.IriSyntax}});const P=r(5753);Object.defineProperty(e,"ControlledTermVersion",{enumerable:!0,get:function(){return P.ControlledTermVersion}});const U=r(3910);Object.defineProperty(e,"BiboStatus",{enumerable:!0,get:function(){return U.BiboStatus}});const B=r(455);Object.defineProperty(e,"ChildDeploymentInfo",{enumerable:!0,get:function(){return B.ChildDeploymentInfo}});const Y=r(3608);Object.defineProperty(e,"ChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return Y.ChildDeploymentInfoBuilder}});const J=r(8534);Object.defineProperty(e,"CedarArtifactId",{enumerable:!0,get:function(){return J.CedarArtifactId}});const k=r(2888);Object.defineProperty(e,"ComparisonError",{enumerable:!0,get:function(){return k.ComparisonError}});const K=r(1888);Object.defineProperty(e,"RoundTrip",{enumerable:!0,get:function(){return K.RoundTrip}});const W=r(6389);Object.defineProperty(e,"PropertyIri",{enumerable:!0,get:function(){return W.PropertyIri}});const j=r(6320);Object.defineProperty(e,"JsonTemplateInstanceWriter",{enumerable:!0,get:function(){return j.JsonTemplateInstanceWriter}});const $=r(350);Object.defineProperty(e,"JsonTemplateInstanceContent",{enumerable:!0,get:function(){return $.JsonTemplateInstanceContent}});const X=r(7733);Object.defineProperty(e,"ControlledTermActionBuilder",{enumerable:!0,get:function(){return X.ControlledTermActionBuilder}});const q=r(8349);Object.defineProperty(e,"YamlValues",{enumerable:!0,get:function(){return q.YamlValues}});const G=r(4531);Object.defineProperty(e,"BioportalTermType",{enumerable:!0,get:function(){return G.BioportalTermType}});const z=r(8421);Object.defineProperty(e,"CedarFieldCategory",{enumerable:!0,get:function(){return z.CedarFieldCategory}});const H=r(2999);Object.defineProperty(e,"YamlTemplateFieldReader",{enumerable:!0,get:function(){return H.YamlTemplateFieldReader}});const Q=r(8239);Object.defineProperty(e,"YamlTemplateElementReader",{enumerable:!0,get:function(){return Q.YamlTemplateElementReader}});const Z=r(5677);Object.defineProperty(e,"YamlTemplateReader",{enumerable:!0,get:function(){return Z.YamlTemplateReader}});const ee=r(9946);Object.defineProperty(e,"YamlTemplateInstanceReader",{enumerable:!0,get:function(){return ee.YamlTemplateInstanceReader}});const te=r(9961);Object.defineProperty(e,"InstanceInflater",{enumerable:!0,get:function(){return te.InstanceInflater}});const re=r(8410);Object.defineProperty(e,"InstanceValidator",{enumerable:!0,get:function(){return re.InstanceValidator}});const ne=r(2763);Object.defineProperty(e,"CedarArtifactType",{enumerable:!0,get:function(){return ne.CedarArtifactType}});const ie=r(978);Object.defineProperty(e,"JsonAbstractSchemaArtifactReader",{enumerable:!0,get:function(){return ie.JsonAbstractSchemaArtifactReader}});const ae=r(1998);Object.defineProperty(e,"CedarReaders",{enumerable:!0,get:function(){return ae.CedarReaders}});const se=r(8333);Object.defineProperty(e,"AbstractSchemaArtifact",{enumerable:!0,get:function(){return se.AbstractSchemaArtifact}});const oe=r(5451);Object.defineProperty(e,"AbstractContainerArtifact",{enumerable:!0,get:function(){return oe.AbstractContainerArtifact}});const le=r(4869);Object.defineProperty(e,"CedarFieldType",{enumerable:!0,get:function(){return le.CedarFieldType}});const ce=r(3161);Object.defineProperty(e,"JsonAbstractArtifactWriter",{enumerable:!0,get:function(){return ce.JsonAbstractArtifactWriter}});const de=r(9760);Object.defineProperty(e,"ComparisonErrorType",{enumerable:!0,get:function(){return de.ComparisonErrorType}});const ue=r(9607);Object.defineProperty(e,"CedarJsonWriters",{enumerable:!0,get:function(){return ue.CedarJsonWriters}});const me=r(2103);Object.defineProperty(e,"CedarJsonReaders",{enumerable:!0,get:function(){return me.CedarJsonReaders}});const pe=r(5359);Object.defineProperty(e,"CedarYamlWriters",{enumerable:!0,get:function(){return pe.CedarYamlWriters}});const he=r(8639);Object.defineProperty(e,"CedarYamlReaders",{enumerable:!0,get:function(){return he.CedarYamlReaders}});const fe=r(5697);Object.defineProperty(e,"AbstractInstanceArtifact",{enumerable:!0,get:function(){return fe.AbstractInstanceArtifact}});const ye=r(2674);Object.defineProperty(e,"AbstractArtifact",{enumerable:!0,get:function(){return ye.AbstractArtifact}});const Te=r(2272);Object.defineProperty(e,"TemplateInstance",{enumerable:!0,get:function(){return Te.TemplateInstance}});const ge=r(7723);Object.defineProperty(e,"InstanceDataContainer",{enumerable:!0,get:function(){return ge.InstanceDataContainer}});const Ee=r(9327);Object.defineProperty(e,"InstanceDataAttributeValueField",{enumerable:!0,get:function(){return Ee.InstanceDataAttributeValueField}});const Ce=r(3644);Object.defineProperty(e,"InstanceDataAttributeValueFieldName",{enumerable:!0,get:function(){return Ce.InstanceDataAttributeValueFieldName}});const Ie=r(4033);Object.defineProperty(e,"AttributeValueNamePolicy",{enumerable:!0,get:function(){return Ie.AttributeValueNamePolicy}});const Ae=r(5588);Object.defineProperty(e,"ReservedNames",{enumerable:!0,get:function(){return Ae.ReservedNames}});const be=r(4465);Object.defineProperty(e,"InstanceDataEmptyNode",{enumerable:!0,get:function(){return be.InstanceDataEmptyNode}});const Re=r(7548);Object.defineProperty(e,"InstanceDataEmptyAtom",{enumerable:!0,get:function(){return Re.InstanceDataEmptyAtom}});const ve=r(9167);Object.defineProperty(e,"InstanceDataLabelAtom",{enumerable:!0,get:function(){return ve.InstanceDataLabelAtom}});const Se=r(5222);Object.defineProperty(e,"InstanceDataStringAtom",{enumerable:!0,get:function(){return Se.InstanceDataStringAtom}});const _e=r(4877);Object.defineProperty(e,"InstanceDataTypedAtom",{enumerable:!0,get:function(){return _e.InstanceDataTypedAtom}});const Ne=r(7571);Object.defineProperty(e,"InstanceDataLinkAtom",{enumerable:!0,get:function(){return Ne.InstanceDataLinkAtom}});const we=r(8193);Object.defineProperty(e,"InstanceDataControlledAtom",{enumerable:!0,get:function(){return we.InstanceDataControlledAtom}});const Le=r(9232);Object.defineProperty(e,"JsonTemplateInstanceReader",{enumerable:!0,get:function(){return Le.JsonTemplateInstanceReader}});const Fe=r(3326);Object.defineProperty(e,"JsonAbstractInstanceArtifactReader",{enumerable:!0,get:function(){return Fe.JsonAbstractInstanceArtifactReader}});const Ve=r(7993);Object.defineProperty(e,"JsonAbstractArtifactReader",{enumerable:!0,get:function(){return Ve.JsonAbstractArtifactReader}});const Oe=r(7954);Object.defineProperty(e,"JsonTemplateReaderResult",{enumerable:!0,get:function(){return Oe.JsonTemplateReaderResult}});const xe=r(2234);Object.defineProperty(e,"CedarUser",{enumerable:!0,get:function(){return xe.CedarUser}});const De=r(8518);Object.defineProperty(e,"JsonArtifactReaderResult",{enumerable:!0,get:function(){return De.JsonArtifactReaderResult}});const Me=r(4948);Object.defineProperty(e,"JsonTemplateElementReaderResult",{enumerable:!0,get:function(){return Me.JsonTemplateElementReaderResult}});const Pe=r(6396);Object.defineProperty(e,"JsonTemplateFieldReaderResult",{enumerable:!0,get:function(){return Pe.JsonTemplateFieldReaderResult}});const Ue=r(6537);Object.defineProperty(e,"JsonTemplateInstanceReaderResult",{enumerable:!0,get:function(){return Ue.JsonTemplateInstanceReaderResult}});const Be=r(1027);Object.defineProperty(e,"PavVersion",{enumerable:!0,get:function(){return Be.PavVersion}});const Ye=r(3581);Object.defineProperty(e,"ChildDeploymentInfoStatic",{enumerable:!0,get:function(){return Ye.ChildDeploymentInfoStatic}});const Je=r(8290);Object.defineProperty(e,"ChildDeploymentInfoStaticBuilder",{enumerable:!0,get:function(){return Je.ChildDeploymentInfoStaticBuilder}});const ke=r(2266);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingle",{enumerable:!0,get:function(){return ke.ChildDeploymentInfoAlwaysSingle}});const Ke=r(587);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingleBuilder",{enumerable:!0,get:function(){return Ke.ChildDeploymentInfoAlwaysSingleBuilder}});const We=r(8878);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultiple",{enumerable:!0,get:function(){return We.ChildDeploymentInfoAlwaysMultiple}});const je=r(3239);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultipleBuilder",{enumerable:!0,get:function(){return je.ChildDeploymentInfoAlwaysMultipleBuilder}});const $e=r(513);Object.defineProperty(e,"AbstractChildDeploymentInfo",{enumerable:!0,get:function(){return $e.AbstractChildDeploymentInfo}});const Xe=r(6910);Object.defineProperty(e,"AbstractChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return Xe.AbstractChildDeploymentInfoBuilder}});const qe=r(4809);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return qe.AbstractDynamicChildDeploymentInfoBuilder}});const Ge=r(3812);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfo",{enumerable:!0,get:function(){return Ge.AbstractDynamicChildDeploymentInfo}});const ze=r(9519);Object.defineProperty(e,"AbstractFieldChildDeploymentInfo",{enumerable:!0,get:function(){return ze.AbstractFieldChildDeploymentInfo}});const He=r(6096);Object.defineProperty(e,"AbstractFieldChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return He.AbstractFieldChildDeploymentInfoBuilder}});const Qe=r(4831);Object.defineProperty(e,"ChildDeploymentInfoElement",{enumerable:!0,get:function(){return Qe.ChildDeploymentInfoElement}});const Ze=r(6976);Object.defineProperty(e,"ChildDeploymentInfoElementBuilder",{enumerable:!0,get:function(){return Ze.ChildDeploymentInfoElementBuilder}});const et=r(4036);Object.defineProperty(e,"JsonArtifactParsingResult",{enumerable:!0,get:function(){return et.JsonArtifactParsingResult}});const tt=r(1591);Object.defineProperty(e,"YamlArtifactParsingResult",{enumerable:!0,get:function(){return tt.YamlArtifactParsingResult}});const rt=r(4325);Object.defineProperty(e,"ComparisonResult",{enumerable:!0,get:function(){return rt.ComparisonResult}});const nt=r(1885);Object.defineProperty(e,"YamlObjectComparator",{enumerable:!0,get:function(){return nt.YamlObjectComparator}});const it=r(3056);Object.defineProperty(e,"JsonObjectComparator",{enumerable:!0,get:function(){return it.JsonObjectComparator}});const at=r(7868);Object.defineProperty(e,"YamlTemplateReaderResult",{enumerable:!0,get:function(){return at.YamlTemplateReaderResult}});const st=r(1790);Object.defineProperty(e,"YamlTemplateFieldReaderResult",{enumerable:!0,get:function(){return st.YamlTemplateFieldReaderResult}});const ot=r(4646);Object.defineProperty(e,"YamlTemplateElementReaderResult",{enumerable:!0,get:function(){return ot.YamlTemplateElementReaderResult}});const lt=r(6532);Object.defineProperty(e,"YamlArtifactReaderResult",{enumerable:!0,get:function(){return lt.YamlArtifactReaderResult}});const ct=r(147);Object.defineProperty(e,"YamlTemplateInstanceReaderResult",{enumerable:!0,get:function(){return ct.YamlTemplateInstanceReaderResult}});const dt=r(7752);Object.defineProperty(e,"Language",{enumerable:!0,get:function(){return dt.Language}});var ut=r(5226);Object.defineProperty(e,"Annotations",{enumerable:!0,get:function(){return ut.Annotations}});var mt=r(2787);Object.defineProperty(e,"AnnotationAtId",{enumerable:!0,get:function(){return mt.AnnotationAtId}});var pt=r(3549);Object.defineProperty(e,"AnnotationAtValue",{enumerable:!0,get:function(){return pt.AnnotationAtValue}});var ht=r(4443);Object.defineProperty(e,"SchemaExtensions",{enumerable:!0,get:function(){return ht.SchemaExtensions}});var ft=r(3992);Object.defineProperty(e,"TextPolicy",{enumerable:!0,get:function(){return ft.TextPolicy}});var yt=r(2500);Object.defineProperty(e,"IdentifierPolicy",{enumerable:!0,get:function(){return yt.IdentifierPolicy}});var Tt=r(3068);Object.defineProperty(e,"DisplayText",{enumerable:!0,get:function(){return Tt.DisplayText}});var gt=r(5435);Object.defineProperty(e,"TimestampPolicy",{enumerable:!0,get:function(){return gt.TimestampPolicy}});var Et=r(2108);Object.defineProperty(e,"NumericPolicy",{enumerable:!0,get:function(){return Et.NumericPolicy}}),Object.defineProperty(e,"ExactDecimal",{enumerable:!0,get:function(){return Et.ExactDecimal}});var Ct=r(5904);Object.defineProperty(e,"JsonSourcePolicy",{enumerable:!0,get:function(){return Ct.JsonSourcePolicy}});var It=r(8979);Object.defineProperty(e,"YamlSourcePolicy",{enumerable:!0,get:function(){return It.YamlSourcePolicy}});var At=r(128);Object.defineProperty(e,"RegexPolicy",{enumerable:!0,get:function(){return At.RegexPolicy}}),Object.defineProperty(e,"REGEX_WORKER_SOURCE",{enumerable:!0,get:function(){return At.REGEX_WORKER_SOURCE}});var bt=r(1991);Object.defineProperty(e,"RegexChecks",{enumerable:!0,get:function(){return bt.RegexChecks}});var Rt=r(7092);Object.defineProperty(e,"ValidationPolicy",{enumerable:!0,get:function(){return Rt.ValidationPolicy}});var vt=r(6830);Object.defineProperty(e,"FieldValuePolicy",{enumerable:!0,get:function(){return vt.FieldValuePolicy}});var St=r(4257);Object.defineProperty(e,"TemplateValueValidator",{enumerable:!0,get:function(){return St.TemplateValueValidator}})})(),n})());
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.CedarModelTypescriptLibrary=t():e.CedarModelTypescriptLibrary=t()}(this,()=>(()=>{"use strict";var e={5846(e,t,r){t.JsonReaderBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.C.STRICT,!1);static FEBRUARY_2024=new a(t.C.FEBRUARY_2024,!0)}t.JsonReaderBehavior=a},2022(e,t,r){t.JsonWriterBehavior=t.C=void 0;const n=r(7639);t.C={STRICT:"strict",FEBRUARY_2024:"february-2024"};class a extends n.ReaderWriterBehavior{value;_outputPages;_usePropertiesAtLanguage;_includeSkosNotationForLinksAndControlled;constructor(e,t,r,n,a){super(a),this.value=e,this._outputPages=t,this._usePropertiesAtLanguage=r,this._includeSkosNotationForLinksAndControlled=n}getValue(){return this.value}static STRICT=new a(t.C.STRICT,!1,!0,!0,!1);static FEBRUARY_2024=new a(t.C.FEBRUARY_2024,!0,!1,!1,!0);outputPages(){return this._outputPages}usePropertiesAtLanguage(){return this._usePropertiesAtLanguage}includeSkosNotationForLinksAndControlled(){return this._includeSkosNotationForLinksAndControlled}}t.JsonWriterBehavior=a},7639(e,t){t.ReaderWriterBehavior=void 0,t.ReaderWriterBehavior=class{_useWarningForKnownIssues;constructor(e){this._useWarningForKnownIssues=e}useWarningForKnownIssues(){return this._useWarningForKnownIssues}}},1395(e,t,r){t.YamlReaderBehavior=t.L=void 0;const n=r(7639);t.L={STRICT:"strict"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.L.STRICT,!1)}t.YamlReaderBehavior=a},9411(e,t,r){t.YamlWriterBehavior=t.D=void 0;const n=r(7639);t.D={STRICT:"strict"};class a extends n.ReaderWriterBehavior{value;constructor(e,t){super(t),this.value=e}getValue(){return this.value}static STRICT=new a(t.D.STRICT,!1)}t.YamlWriterBehavior=a},6568(e,t,r){t.CedarBuilders=void 0;const n=r(766),a=r(1762),i=r(4925),s=r(7889),o=r(1259),l=r(345),c=r(2875),d=r(8084),u=r(3675),m=r(9497),p=r(1667),h=r(2052),f=r(4675),y=r(9916),T=r(3138),g=r(2703),E=r(9521),C=r(5795),I=r(7674),A=r(9105),b=r(1513),v=r(7328),S=r(2376),R=r(3914),w=r(7162),N=r(3474),_=r(9062),L=r(6610);t.CedarBuilders=class{static templateBuilder(){return new n.TemplateBuilder}static templateElementBuilder(){return new a.TemplateElementBuilder}static templateInstanceBuilder(){return new i.TemplateInstanceBuilder}static textFieldBuilder(){return s.TextFieldBuilderImpl.create()}static textAreaBuilder(){return o.TextAreaBuilderImpl.create()}static temporalFieldBuilder(){return l.TemporalFieldBuilderImpl.create()}static phoneNumberFieldBuilder(){return d.PhoneNumberFieldBuilderImpl.create()}static numericFieldBuilder(){return u.NumericFieldBuilderImpl.create()}static emailFieldBuilder(){return p.EmailFieldBuilderImpl.create()}static attributeValueFieldBuilder(){return h.AttributeValueFieldBuilderImpl.create()}static youtubeFieldBuilder(){return I.StaticYoutubeFieldBuilderImpl.create()}static sectionBreakFieldBuilder(){return C.StaticSectionBreakFieldBuilderImpl.create()}static richTextFieldBuilder(){return E.StaticRichTextFieldBuilderImpl.create()}static pageBreakFieldBuilder(){return g.StaticPageBreakFieldBuilderImpl.create()}static imageFieldBuilder(){return T.StaticImageFieldBuilderImpl.create()}static linkFieldBuilder(){return m.LinkFieldBuilderImpl.create()}static extRorFieldBuilder(){return v.ExtRorFieldBuilderImpl.create()}static extOrcidFieldBuilder(){return S.ExtOrcidFieldBuilderImpl.create()}static extPfasFieldBuilder(){return R.ExtPfasFieldBuilderImpl.create()}static extPubmedFieldBuilder(){return w.ExtPubmedFieldBuilderImpl.create()}static extRridFieldBuilder(){return N.ExtRridFieldBuilderImpl.create()}static extNihGrantIdFieldBuilder(){return _.ExtNihGrantIdFieldBuilderImpl.create()}static extDoiFieldBuilder(){return L.ExtDoiFieldBuilderImpl.create()}static singleChoiceListFieldBuilder(){return A.SingleChoiceListFieldBuilderImpl.create()}static multipleChoiceListFieldBuilder(){return b.MultipleChoiceListFieldBuilderImpl.create()}static radioFieldBuilder(){return c.RadioFieldBuilderImpl.create()}static checkboxFieldBuilder(){return f.CheckboxFieldBuilderImpl.create()}static controlledTermFieldBuilder(){return y.ControlledTermFieldBuilderImpl.create()}}},1998(e,t,r){t.CedarReaders=void 0;const n=r(2103),a=r(8639);t.CedarReaders=class{static json(){return n.CedarJsonReaders}static yaml(){return a.CedarYamlReaders}}},8446(e,t,r){t.IriSyntax=void 0;const n=r(2500);t.IriSyntax=class{constructor(){}static isValid(e){if(""===e)return!1;try{return n.IdentifierPolicy.assertIdentifier(e,"value"),!0}catch{return!1}}}},8748(e,t,r){t.ReaderUtil=void 0;const n=r(2108),a=r(2500),i=r(9517),s=r(8802),o=r(5904);class l{static assertIdentifierCharacters=a.IdentifierPolicy.assertIdentifierCharacters.bind(a.IdentifierPolicy);static assertFieldIri=a.IdentifierPolicy.assertFieldIri.bind(a.IdentifierPolicy);static assertIri=a.IdentifierPolicy.assertIri.bind(a.IdentifierPolicy);static assertIdentifier=a.IdentifierPolicy.assertIdentifier.bind(a.IdentifierPolicy);static getIri(e,t){const r=this.getString(e,t);return this.assertIri(r,t),r}static getIdentifier(e,t){const r=this.getString(e,t);return this.assertIdentifier(r,t),r}static getArtifactIdentifier(e,t,r){return r?this.getIri(e,t):this.getIdentifier(e,t)}static getString(e,t){return Object.hasOwn(e,t)?e[t]:null}static getSingleType(e,t){if(!Object.hasOwn(e,t))return null;const r=e[t];if(!Array.isArray(r))return r;if(r.length>1)throw new Error(`A field value can have at most one ${t}.`);return 1===r.length?r[0]:null}static getStringOrEmpty(e,t){return Object.hasOwn(e,t)?e[t]:""}static getBoolean(e,t){return!!Object.hasOwn(e,t)&&e[t]}static getBooleanOrNullOrUndefined(e,t){return Object.hasOwn(e,t)?null===e[t]?null:e[t]:void 0}static getBooleanOrNull(e,t){return Object.hasOwn(e,t)?null===e[t]?null:e[t]:null}static getNumber(e,t){return Object.hasOwn(e,t)?e[t]:null}static getNumericDefault(e,t){const r=e[t];if(null==r||""===r)return null;if("number"==typeof r||"string"==typeof r||n.ExactDecimal.isExact(r))try{return n.NumericPolicy.value(r)}catch(e){throw new Error("Numeric default must be a finite decimal number without surrounding whitespace.",{cause:e})}throw new Error(`Numeric default at "${t}" must be a number or numeric string.`)}static getExactNumber(e,t){const r=e[t];if(null==r)return null;if("number"==typeof r||n.ExactDecimal.isExact(r))return n.NumericPolicy.value(r);throw new Error(`Numeric bound at "${t}" must be a JSON number.`)}static getJavaIntOrNull(e,t,r,n){const a=Object.hasOwn(e,t)?e[t]:void 0;return null==a?null:this.javaInt(a,t,r,n)}static getJsonJavaIntOrNull(e,t,r){return this.getJavaIntOrNull(e,t,r,this.jsonSpelling(e,t))}static getRequiredJsonJavaInt(e,t,r){const n=Object.hasOwn(e,t)?e[t]:void 0;if(void 0===n)throw new Error(`Missing ${t} at ${r.add(t).toPointer()}. Expected an integer from -2147483648 to 2147483647.`);return this.javaInt(n,t,r,this.jsonSpelling(e,t))}static javaInt(e,t,r,n){if("number"==typeof e&&Number.isInteger(e)&&e>=-2147483648&&e<=2147483647&&!1!==n?.integer)return 0===e?0:e;const a=n?.text??o.JsonSourcePolicy.stringify(e);throw new Error(`Invalid ${t} ${a} at ${r.add(t).toPointer()}. Expected an integer from -2147483648 to 2147483647.`)}static jsonSpelling(e,t){const r=o.JsonSourcePolicy.decimalSpelling(e,t);return null===r?null:{text:r,integer:!1}}static getNode(e,t){return Object.hasOwn(e,t)?e[t]:i.JsonNode.getEmpty()}static getNodeOrNull(e,t){return Object.hasOwn(e,t)?e[t]:null}static getStringList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t]:[]}static getFilteredStringList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t].filter(e=>""!==e):[]}static getStringMap(e,t){if(Object.hasOwn(e,t)&&"object"==typeof e[t]&&!Array.isArray(e[t])&&null!==e[t]){const r=e[t],n=Object.entries(r),a=new Map;for(const[e,t]of n)a.set(e,t);return a}return new Map}static deepClone(e){return this.deepUnfreeze(e)}static deepUnfreeze(e){if(e instanceof n.ExactDecimal)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return e;const t=Array.isArray(e)?e.slice():{...e};return Object.getOwnPropertyNames(t).forEach(e=>{t[e]=this.deepUnfreeze(t[e])}),t}static deepFreeze(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const r=e[t];null===r||"object"!=typeof r&&"function"!=typeof r||Object.isFrozen(r)||this.deepFreeze(r)}),e}static getNodeList(e,t){return Object.hasOwn(e,t)&&Array.isArray(e[t])?e[t]:i.JsonNode.getEmptyList()}static getURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIri(r,t),new s.Iri(r)}static getIdentifierURI(e,t){const r=this.getStringOrEmpty(e,t);return this.assertIdentifier(null===r?"":r,t),new s.Iri(r)}static deleteNodeKey(e,t){Object.hasOwn(e,t)&&delete e[t]}}t.ReaderUtil=l},797(e,t,r){t.applySchemaReaderDefaults=function(e,t,r,s){if(!r.equal(new n.JsonPath))return;const o="json"===s?"bibo:status":"status";null==t["json"===s?"pav:version":"version"]&&(e.pav_version=a.PavVersion.DEFAULT),(null==t[o]||"yaml"===s&&""===t[o])&&(e.bibo_status=i.BiboStatus.DRAFT)};const n=r(3188),a=r(1027),i=r(3910)},2103(e,t,r){t.CedarJsonReaders=void 0;const n=r(5904),a=r(2763),i=r(2733),s=r(5291),o=r(7909),l=r(5846),c=r(9232),d=r(4381);class u{behavior;constructor(e){this.behavior=e}static getStrict(){return new u(l.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new u(l.JsonReaderBehavior.FEBRUARY_2024)}static detectArtifactType(e){let t;if(t="string"==typeof e?n.JsonSourcePolicy.parse(e):e,t&&t["@type"]){const e=t[i.JsonSchema.atType],r=Array.isArray(e)&&1===e.length?e[0]:e;return a.CedarArtifactType.forValue(r)}return a.CedarArtifactType.NULL}getReaderForArtifactType(e){switch(e){case a.CedarArtifactType.TEMPLATE:return s.JsonTemplateReader.getStrict();case a.CedarArtifactType.TEMPLATE_ELEMENT:return o.JsonTemplateElementReader.getStrict();case a.CedarArtifactType.TEMPLATE_FIELD:case a.CedarArtifactType.STATIC_TEMPLATE_FIELD:return d.JsonTemplateFieldReader.getStrict();case a.CedarArtifactType.TEMPLATE_INSTANCE:return c.JsonTemplateInstanceReader.getStrict();default:throw new Error(`No JSON reader available for CedarArtifactType: ${e}`)}}getTemplateReader(){return s.JsonTemplateReader.getForBehavior(this.behavior)}getTemplateElementReader(){return o.JsonTemplateElementReader.getForBehavior(this.behavior)}getTemplateFieldReader(){return d.JsonTemplateFieldReader.getForBehavior(this.behavior)}getTemplateInstanceReader(){return c.JsonTemplateInstanceReader.getForBehavior(this.behavior)}}t.CedarJsonReaders=u},7993(e,t,r){t.JsonAbstractArtifactReader=void 0;const n=r(3992),a=r(8534),i=r(8748),s=r(2733),o=r(2234),l=r(9857),c=r(2763),d=r(5226),u=r(936),m=r(2787),p=r(3549);class h{static refuseEmptyIdentifier(e,t=s.JsonSchema.atId){const r=i.ReaderUtil.getString(e,t);if(null!==r&&"string"!=typeof r)throw new Error(`Invalid URI at "${t}": expected a string.`);if(null!==r&&n.TextPolicy.isBlank(r))throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);i.ReaderUtil.assertIri(r,t)}behavior;knownArtifactType=c.CedarArtifactType.NULL;get lenient(){return this.behavior.useWarningForKnownIssues()}constructor(e){this.behavior=e}readNonReportableAttributes(e,t){h.refuseEmptyIdentifier(t),e.at_id=a.CedarArtifactId.forValue(i.ReaderUtil.getString(t,s.JsonSchema.atId)),e.schema_name=i.ReaderUtil.getString(t,s.JsonSchema.schemaName),e.schema_description=i.ReaderUtil.getStringOrEmpty(t,s.JsonSchema.schemaDescription),e.pav_createdBy=o.CedarUser.forValue(i.ReaderUtil.getString(t,s.JsonSchema.pavCreatedBy)),e.pav_createdOn=l.IsoDate.forValue(i.ReaderUtil.getString(t,s.JsonSchema.pavCreatedOn)),e.oslc_modifiedBy=o.CedarUser.forValue(i.ReaderUtil.getString(t,s.JsonSchema.oslcModifiedBy)),e.pav_lastUpdatedOn=l.IsoDate.forValue(i.ReaderUtil.getString(t,s.JsonSchema.pavLastUpdatedOn))}readAnnotations(e,t){const r=new d.Annotations,n=i.ReaderUtil.getNodeOrNull(t,u.CedarModel.annotations);if(null!==n){if("object"!=typeof n||Array.isArray(n))throw new Error("The annotations must be an object at /_annotations");Object.keys(n).forEach(e=>{const t=n[e];if(null===t||"object"!=typeof t||Array.isArray(t))throw new Error(`Value of annotation must be an object at /_annotations/${e}`);const a=i.ReaderUtil.getNode(n,e);if(Object.hasOwn(a,s.JsonSchema.atValue)){const t=a[s.JsonSchema.atValue];if("string"!=typeof t)throw new Error(`The @value of an annotation must be a string at /_annotations/${e}`);r.add(new p.AnnotationAtValue(e,t))}else{if(!Object.hasOwn(a,s.JsonSchema.atId))throw new Error(`Value of annotation must contain an @id or @value at /_annotations/${e}`);{const t=a[s.JsonSchema.atId];if("string"!=typeof t)throw new Error(`The @id of an annotation must be an IRI at /_annotations/${e}`);i.ReaderUtil.assertIdentifier(t,`/_annotations/${e}/@id`),r.add(new m.AnnotationAtId(e,t))}}})}r.getSize()>0&&(e.annotations=r)}}t.JsonAbstractArtifactReader=h},3326(e,t,r){t.JsonAbstractInstanceArtifactReader=void 0;const n=r(8534),a=r(8748),i=r(2733),s=r(7993);class o extends s.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.atId,this.lenient),super.readNonReportableAttributes(e,t),e.schema_isBasedOn=n.CedarArtifactId.forValue(a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.schemaIsBasedOn,this.lenient)),e.pav_derivedFrom=n.CedarArtifactId.forValue(a.ReaderUtil.getArtifactIdentifier(t,i.JsonSchema.pavDerivedFrom,this.lenient))}}t.JsonAbstractInstanceArtifactReader=o},978(e,t,r){t.JsonAbstractSchemaArtifactReader=void 0;const n=r(4443),a=r(8333),i=r(8534),s=r(8748),o=r(2733),l=r(5747),c=r(8557),d=r(1027),u=r(3910),m=r(7993);class p extends m.JsonAbstractArtifactReader{constructor(e){super(e)}readNonReportableAttributes(e,t){e.extensions=n.SchemaExtensions.fromJson(t),super.readNonReportableAttributes(e,t),e.title=null===e.schema_name?null:(0,a.internalNameFor)(e.schema_name,this.artifactTypeWord()),e.description=s.ReaderUtil.getString(t,l.TemplateProperty.description),e.schema_schemaVersion=c.SchemaVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.schemaVersion)),e.pav_version=d.PavVersion.forValue(s.ReaderUtil.getString(t,o.JsonSchema.pavVersion)),e.bibo_status=u.BiboStatus.forJsonStatus(Object.hasOwn(t,o.JsonSchema.biboStatus)?t[o.JsonSchema.biboStatus]:void 0),e.pav_derivedFrom=i.CedarArtifactId.forValue(s.ReaderUtil.getArtifactIdentifier(t,o.JsonSchema.pavDerivedFrom,this.lenient)),e.pav_previousVersion=i.CedarArtifactId.forValue(this.lenient?s.ReaderUtil.getString(t,o.JsonSchema.pavPreviousVersion):s.ReaderUtil.getIdentifier(t,o.JsonSchema.pavPreviousVersion)),e.schema_identifier=s.ReaderUtil.getString(t,o.JsonSchema.schemaIdentifier)}}t.JsonAbstractSchemaArtifactReader=p},8518(e,t){t.JsonArtifactReaderResult=void 0,t.JsonArtifactReaderResult=class{_artifact;_parsingResult;_artifactSourceObject;constructor(e,t,r){this._artifact=e,this._parsingResult=t,this._artifactSourceObject=r}get artifact(){return this._artifact}get parsingResult(){return this._parsingResult}get artifactSourceObject(){return this._artifactSourceObject}}},639(e,t,r){t.JsonArtifactShape=void 0;const n=r(2733),a=r(936),i=r(2763),s=r(2475),o=r(8557),l=r(5793),c=[i.CedarArtifactType.TEMPLATE,i.CedarArtifactType.TEMPLATE_ELEMENT,i.CedarArtifactType.TEMPLATE_FIELD,i.CedarArtifactType.STATIC_TEMPLATE_FIELD],d={template:{types:[i.CedarArtifactType.TEMPLATE],word:"template"},element:{types:[i.CedarArtifactType.TEMPLATE_ELEMENT],word:"element"},field:{types:[i.CedarArtifactType.TEMPLATE_FIELD,i.CedarArtifactType.STATIC_TEMPLATE_FIELD],word:"field"}};class u{static shown(e){return"string"==typeof e?e:JSON.stringify(e)}static own(e,t){return Object.hasOwn(e,t)?e[t]:void 0}static declaredType(e,t){const r=u.own(e,n.JsonSchema.atType),a=Array.isArray(r)?r:null==r?[]:[r];if(0===a.length)throw new Error(`A schema artifact must declare a JSON-LD @type at ${t.toString()}`);if(1!==a.length)throw new Error(`Expecting a single JSON-LD @type for a schema artifact, got ${a.length} at ${t.toString()}`);const i=c.find(e=>e.getValue()===a[0]);if(void 0===i)throw new Error(`Unexpected schema artifact JSON-LD @type ${u.shown(a[0])} at ${t.toString()}`);return i}static declaredTypeOrNull(e,t){return Object.hasOwn(e,n.JsonSchema.atType)?u.declaredType(e,t):i.CedarArtifactType.NULL}static isTolerated(e,t,r){return r&&!Object.hasOwn(e,t)}static assertDeclaredKind(e,t,r,a){if(u.isTolerated(e,n.JsonSchema.atType,a))return;const i=u.declaredType(e,t);if(!d[r].types.includes(i))throw new Error(`Unexpected ${d[r].word} schema artifact JSON-LD @type ${i.getValue()} at ${t.toString()}`)}static childType(e,t){const r=u.declaredType(e,t);if(r===i.CedarArtifactType.TEMPLATE)throw new Error(`Invalid nesting of template schema artifact at ${t.toString()}`);return r}static assertJsonSchemaUri(e,t,r,n){if(!Object.hasOwn(e,a.CedarModel.schema)&&(!r||n))return;const i=u.own(e,a.CedarModel.schema);if(i!==s.CedarSchemaValues.CURRENT){const e=void 0===i?"none":u.shown(i);throw new Error(`Expecting ${s.CedarSchemaValues.CURRENT}, got ${e} at ${t.toString()}`)}}static assertObjectType(e,t,r){if(u.isTolerated(e,n.JsonSchema.type,r))return;const a=u.own(e,n.JsonSchema.type);if(a!==l.JavascriptTypeValues.OBJECT){const e=void 0===a?"none":u.shown(a);throw new Error(`Expecting artifact JSON Schema type ${l.JavascriptTypeValues.OBJECT}, got ${e} at ${t.toString()}`)}}static assertChildJsonSchemaType(e,t,r){if(u.isTolerated(e,n.JsonSchema.type,r))return;const a=u.own(e,n.JsonSchema.type);if(a!==l.JavascriptTypeValues.OBJECT&&a!==l.JavascriptTypeValues.ARRAY){const e=void 0===a?"none":u.shown(a);throw new Error(`Expecting array or object, got ${e} at ${t.toString()}`)}}static assertModelVersion(e,t,r){if(u.isTolerated(e,n.JsonSchema.schemaVersion,r))return;const a=u.own(e,n.JsonSchema.schemaVersion);if("string"==typeof a&&o.SchemaVersion.forValue(a),a!==o.SchemaVersionValues.CURRENT){const e=null==a?"none":u.shown(a);throw new Error(`Expecting model version ${o.SchemaVersionValues.CURRENT}, got ${e} at ${t.toString()}`)}}}t.JsonArtifactShape=u},5510(e,t,r){t.JsonContainerArtifactReader=void 0;const n=r(639),a=r(5588),i=r(978),s=r(1492),o=r(455),l=r(2763),c=r(8748),d=r(2733),u=r(936),m=r(9034),p=r(2888),h=r(9760),f=r(3056),y=r(5793),T=r(2475),g=r(6968),E=r(3812),C=r(3608),I=r(3239),A=r(9519),b=r(7752),v=r(8220),S=new Set([l.CedarArtifactType.TEMPLATE.getValue(),l.CedarArtifactType.TEMPLATE_ELEMENT.getValue(),l.CedarArtifactType.TEMPLATE_FIELD.getValue(),l.CedarArtifactType.STATIC_TEMPLATE_FIELD.getValue()]);class R extends i.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return this.knownArtifactType===l.CedarArtifactType.TEMPLATE?"template":"element"}fieldReader;constructor(e){super(e),this.fieldReader=v.JsonTemplateFieldReaderInternal.getForBehavior(e)}readAndStoreCandidateChildInfo(e,t,r,i,s){if((a.ReservedNames.isReservedName(t)||n.JsonArtifactShape.isTolerated(e,d.JsonSchema.atType,this.lenient))&&l.CedarArtifactType.forValue(c.ReaderUtil.getString(e,d.JsonSchema.atType))===l.CedarArtifactType.NULL)return this.reportBlueprintDifference(r,new p.ComparisonError("jtr09",h.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,s.add(t,d.JsonSchema.atType))),null;const f=n.JsonArtifactShape.childType(e,s),y=new o.ChildDeploymentInfo(t);y.atType=f;const T=c.ReaderUtil.getNode(e,u.CedarModel.ui);return y.uiInputType=m.UiInputType.forValue(c.ReaderUtil.getString(T,u.CedarModel.inputType)),y.hidden=c.ReaderUtil.getBoolean(T,u.CedarModel.Ui.hidden),i.add(y),y}readReportableAttributes(e,t,r,a){f.JsonObjectComparator.comparePrimitive(r,this.knownArtifactType.getValue(),n.JsonArtifactShape.declaredTypeOrNull(t,a).getValue(),a.add(d.JsonSchema.atType));const i=c.ReaderUtil.getNode(t,d.JsonSchema.atContext),s=g.JsonContainerArtifactContent.CONTEXT_VERBATIM;if(f.JsonObjectComparator.compareBothWays(r,s,i,a.add(d.JsonSchema.atContext),this.behavior,[d.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),f.JsonObjectComparator.comparePrimitive(r,y.JavascriptType.OBJECT.getValue(),c.ReaderUtil.getString(t,u.CedarModel.type),a.add(u.CedarModel.type)),f.JsonObjectComparator.comparePrimitive(r,T.ArtifactSchema.CURRENT.getValue(),c.ReaderUtil.getString(t,u.CedarModel.schema),a.add(u.CedarModel.schema)),e.language=b.Language.forValue(c.ReaderUtil.getString(i,d.JsonSchema.atLanguage)),e.language===b.Language.NULL){const r=c.ReaderUtil.getNode(c.ReaderUtil.getNode(t,d.JsonSchema.properties),d.JsonSchema.atContext);e.language=b.Language.forValue(c.ReaderUtil.getString(r,d.JsonSchema.atLanguage))}}parseChildren(e,t,r,n,a){for(const i of e.children){let e=c.ReaderUtil.getNode(t,i.name),s=a.add(d.JsonSchema.properties,i.name);if(i.isMultiInAnyWay()&&(e=c.ReaderUtil.getNode(e,d.JsonSchema.items),s=s.add(d.JsonSchema.items)),i.atType===l.CedarArtifactType.STATIC_TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,i,s),a=t.field.createDeploymentBuilder(i.name).withLabel(i.label).withDescription(i.description);a.withHidden(i.hidden);const o=a.build();r.addChild(t.field,o),n.merge(t.parsingResult)}else if(i.atType===l.CedarArtifactType.TEMPLATE_FIELD){const t=this.fieldReader.readFromObjectInternal(e,i,s),a=t.field.createDeploymentBuilder(i.name),l=i;a.withIri(l.iri).withLabel(i.label).withDescription(i.description),i instanceof A.AbstractFieldChildDeploymentInfo&&a.withHidden(i.hidden).withRequiredValue(i.requiredValue).withRecommendedValue(i.recommendedValue).withContinuePreviousLine(i.continuePreviousLine).withValueRecommendationEnabled(i.valueRecommendationEnabled),a instanceof C.ChildDeploymentInfoBuilder&&i instanceof o.ChildDeploymentInfo?a.withMultiInstance(i.multiInstance).withMinItems(i.minItems).withMaxItems(i.maxItems):a instanceof I.ChildDeploymentInfoAlwaysMultipleBuilder&&a.withMinItems(l.minItems).withMaxItems(l.maxItems);const c=a.build();r.addChild(t.field,c),n.merge(t.parsingResult)}else if(i.atType===l.CedarArtifactType.TEMPLATE_ELEMENT){const t=this.getElementReader().readFromObject(e,s),a=t.element.createDeploymentBuilder(i.name).withLabel(i.label).withDescription(i.description);i instanceof E.AbstractDynamicChildDeploymentInfo&&a.withIri(i.iri),i instanceof o.ChildDeploymentInfo&&a.withMultiInstance(i.multiInstance).withMinItems(i.minItems).withMaxItems(i.maxItems),r.addChild(t.element,a.build()),n.merge(t.parsingResult)}}}validatePropertiesVsOrder(e,t,r,n){for(const a of e.children)t.includes(a.name)||this.reportBlueprintDifference(r,new p.ComparisonError("jtr08",h.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(u.CedarModel.ui,u.CedarModel.order),a.name,null))}finalizeChildInfo(e,t,r,n){const a=new s.ContainerArtifactChildrenInfo;for(const i of e){const e=t.get(i);null!=e?a.add(e):this.reportBlueprintDifference(r,new p.ComparisonError("jtr07",h.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,n.add(u.CedarModel.ui,u.CedarModel.order),null,i))}return a}getCandidateChildrenInfo(e,t,r,i){const o=new s.ContainerArtifactChildrenInfo;return Object.keys(e).forEach(s=>{if(a.ReservedNames.isReservedName(s)){const t=c.ReaderUtil.getNode(e,s),r="array"===c.ReaderUtil.getString(t,d.JsonSchema.type)?c.ReaderUtil.getNode(t,d.JsonSchema.items):t,n=r?.[d.JsonSchema.atType];if((Array.isArray(n)?n:[n]).some(e=>S.has(e)))throw new Error(`Child schema uses a reserved instance property name at ${i.add(d.JsonSchema.properties,s).toString()}`)}if(!t.has(s)){const t=c.ReaderUtil.getNode(e,s);if("object"==typeof t&&null!==t){a.ReservedNames.isReservedName(s)||n.JsonArtifactShape.assertChildJsonSchemaType(t,i.add(d.JsonSchema.properties,s),this.lenient);let e=t;const l=c.ReaderUtil.getString(t,d.JsonSchema.type);if("object"==l)this.readAndStoreCandidateChildInfo(e,s,r,o,i.add(d.JsonSchema.properties,s));else if("array"==l){e=c.ReaderUtil.getNode(t,d.JsonSchema.items);const n=this.readAndStoreCandidateChildInfo(e,s,r,o,i.add(d.JsonSchema.properties,s,d.JsonSchema.items));null!==n&&(n.multiInstance=!0,n.minItems=c.ReaderUtil.getNumber(t,u.CedarModel.minItems),n.maxItems=c.ReaderUtil.getNumber(t,u.CedarModel.maxItems))}}}}),o}generateAndValidateRequiredMap(e,t,r,n){const a=e.reduce((e,t)=>(e.set(t,!0),e),new Map);for(const e of t)a.has(e)||this.reportBlueprintDifference(r,new p.ComparisonError("jtr01",h.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(d.JsonSchema.required),e));return a}checkRequiredBothWays(e,t,r,n,a,i){const s=e.getChildrenNamesForRequired();for(const e of s)t.has(e)||this.reportBlueprintDifference(a,new p.ComparisonError("jtr02",h.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,i.add(d.JsonSchema.required),e));for(const t of r)n.has(t)||e.has(t)||this.reportBlueprintDifference(a,new p.ComparisonError("jtr03",h.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,i.add(d.JsonSchema.required),t))}extractUIPreferredLabelsAndDescriptions(e,t,r,n){const a=c.ReaderUtil.getStringMap(e,u.CedarModel.propertyLabels);if(null!==a)for(const e of t.children)a.has(e.name)&&(e.label=a.get(e.name)??null);const i=c.ReaderUtil.getStringMap(e,u.CedarModel.propertyDescriptions);if(null!==i)for(const e of t.children)i.has(e.name)&&(e.description=i.get(e.name)??null)}reportBlueprintDifference(e,t){this.behavior.useWarningForKnownIssues()&&f.JsonObjectComparator.isKnownProductionVariation(t.errorPath)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}extractIRIMappings(e,t,r,n){const a=c.ReaderUtil.getNode(e,d.JsonSchema.atContext),i=c.ReaderUtil.getNode(a,d.JsonSchema.properties);for(const e of t.children)if(this.includeInIRIMapping(e)){if(null===i||!Object.hasOwn(i,e.name))continue;const t=c.ReaderUtil.getNode(i,e.name),a=c.ReaderUtil.getStringList(t,d.JsonSchema.enum);null===a||1!=a.length?this.reportBlueprintDifference(r,new p.ComparisonError("jtr06",h.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n.add(d.JsonSchema.properties,d.JsonSchema.atContext,d.JsonSchema.properties,e.name,d.JsonSchema.enum,0))):e instanceof E.AbstractDynamicChildDeploymentInfo&&(c.ReaderUtil.assertIdentifier(a[0],d.JsonSchema.enum),e.iri=a[0])}}readInstanceTypeSpecification(e,t,r){const n=c.ReaderUtil.getNode(t,d.JsonSchema.properties);if(null!==n){const t=c.ReaderUtil.getNode(n,d.JsonSchema.atType);if(null!==t){const r=c.ReaderUtil.getNodeList(t,d.JsonSchema.oneOf);null!==r&&r.forEach(t=>{const r=c.ReaderUtil.getStringList(t,d.JsonSchema.enum);if(Object.hasOwn(t,d.JsonSchema.enum)){if(!Array.isArray(t[d.JsonSchema.enum])||0===r.length)throw new Error("Instance types must be a nonempty array of IRIs");e.instanceTypeSpecifications=r}})}}}}t.JsonContainerArtifactReader=R},7909(e,t,r){t.JsonTemplateElementReader=void 0;const n=r(639),a=r(5904),i=r(797),s=r(936),o=r(2733),l=r(2763),c=r(5747),d=r(8748),u=r(3056),m=r(4036),p=r(3188),h=r(5846),f=r(9932),y=r(4948),T=r(7661),g=r(5510),E=r(1501);class C extends g.JsonContainerArtifactReader{knownArtifactType=l.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e){super(e)}static getStrict(){return new C(h.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new C(h.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new C(e)}getElementReader(){return this}includeInIRIMapping(e){return e.atType!==l.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){const t=a.JsonSourcePolicy.parse(e);return this.readFromObject(t,new p.JsonPath)}readFromObject(e,t=new p.JsonPath){n.JsonArtifactShape.assertDeclaredKind(e,t,"element",this.lenient),n.JsonArtifactShape.assertJsonSchemaUri(e,t,null===t.getLastComponent(),this.lenient),n.JsonArtifactShape.assertObjectType(e,t,this.lenient),n.JsonArtifactShape.assertModelVersion(e,t,this.lenient);const r=new m.JsonArtifactParsingResult,a=T.TemplateElement.buildEmptyWithNullValues();return null===t.getLastComponent()&&d.ReaderUtil.getArtifactIdentifier(e,o.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(a,e),(0,i.applySchemaReaderDefaults)(a,e,t,"json"),this.readReportableAttributes(a,e,r,t),this.readAnnotations(a,e),this.readInstanceTypeSpecification(a,e,r),this.readAndValidateChildrenInfo(a,e,r,t),new y.JsonTemplateElementReaderResult(a,r,e)}readNonReportableAttributes(e,t){e.skos_prefLabel=d.ReaderUtil.getString(t,s.CedarModel.skosPrefLabel),e.skos_altLabel=d.ReaderUtil.getFilteredStringList(t,s.CedarModel.skosAltLabel);const r=d.ReaderUtil.getNode(t,s.CedarModel.ui);null!==r&&(e.header=d.ReaderUtil.getString(r,s.CedarModel.header),e.footer=d.ReaderUtil.getString(r,s.CedarModel.footer)),super.readNonReportableAttributes(e,t)}readAndValidateChildrenInfo(e,t,r,n){const a=d.ReaderUtil.getStringList(t,o.JsonSchema.required),i=d.ReaderUtil.getNode(t,o.JsonSchema.properties),l=this.generateAndValidateRequiredMap(a,E.JsonTemplateElementContent.REQUIRED_PARTIAL,r,n),c=this.getCandidateChildrenInfo(i,E.JsonTemplateElementContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(c,l,a,E.JsonTemplateElementContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const u=d.ReaderUtil.getNode(t,s.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(u,c,r,n),this.extractIRIMappings(i,c,r,n);const m=d.ReaderUtil.getStringList(u,s.CedarModel.order),p=this.finalizeChildInfo(m,c,r,n);this.validatePropertiesVsOrder(c,m,r,n),this.validateProperties(p,i,e,r,n),this.parseChildren(p,i,e,r,n)}validateProperties(e,t,r,n,a){const i=d.ReaderUtil.deepClone(E.JsonTemplateElementContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(i[o.JsonSchema.atContext][c.TemplateProperty.additionalProperties]=f.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const s=i[o.JsonSchema.atContext],l=d.ReaderUtil.getNodeList(s,o.JsonSchema.required);null!=l&&0==l.length&&d.ReaderUtil.deleteNodeKey(s,o.JsonSchema.required),E.JsonTemplateElementContent.acceptEitherIdTyping(i,t),u.JsonObjectComparator.compareToLeft(n,i,t,a.add(o.JsonSchema.properties),this.behavior)}}t.JsonTemplateElementReader=C},4948(e,t,r){t.JsonTemplateElementReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get element(){return this._artifact}get elementSourceObject(){return this._artifactSourceObject}}t.JsonTemplateElementReaderResult=a},4381(e,t,r){t.JsonTemplateFieldReader=void 0;const n=r(639),a=r(5904),i=r(797),s=r(9517),o=r(4036),l=r(3188),c=r(8748),d=r(2733),u=r(5747),m=r(3056),p=r(2763),h=r(5793),f=r(936),y=r(2475),T=r(9932),g=r(9241),E=r(5933),C=r(6511),I=r(9148),A=r(6291),b=r(8596),v=r(7095),S=r(9251),R=r(9315),w=r(2691),N=r(1769),_=r(9683),L=r(1468),V=r(9053),O=r(9034),F=r(19),x=r(2419),M=r(9366),D=r(4869),P=r(8728),U=r(5846),Y=r(6396),J=r(855),B=r(978),k=r(455),K=r(7752),j=r(8244),W=r(4956),$=r(6854),q=r(3028),X=r(7004),G=r(1886),z=r(8583),H=r(6591),Q=r(6731),Z=r(6681);class ee extends B.JsonAbstractSchemaArtifactReader{artifactTypeWord(){return"field"}constructor(e){super(e)}static getStrict(){return new ee(U.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new ee(U.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new ee(e)}static dynamicTypeReaderMap=new Map([[D.CedarFieldType.TEXT,new g.JsonFieldReaderTextField],[D.CedarFieldType.TEXTAREA,new _.JsonFieldReaderTextArea],[D.CedarFieldType.CONTROLLED_TERM,new P.JsonFieldReaderControlledTerm],[D.CedarFieldType.LINK,new v.JsonFieldReaderLink],[D.CedarFieldType.EXT_ROR,new j.JsonFieldReaderExtRor],[D.CedarFieldType.EXT_ORCID,new W.JsonFieldReaderExtOrcid],[D.CedarFieldType.EXT_PFAS,new $.JsonFieldReaderExtPfas],[D.CedarFieldType.EXT_PUBMED,new q.JsonFieldReaderExtPubmed],[D.CedarFieldType.EXT_RRID,new X.JsonFieldReaderExtRrid],[D.CedarFieldType.EXT_NIH_GRANT_ID,new G.JsonFieldReaderExtNihGrantId],[D.CedarFieldType.EXT_DOI,new z.JsonFieldReaderExtDoi],[D.CedarFieldType.TEMPORAL,new R.JsonFieldReaderTemporal],[D.CedarFieldType.EMAIL,new w.JsonFieldReaderEmail],[D.CedarFieldType.NUMERIC,new N.JsonFieldReaderNumeric],[D.CedarFieldType.PHONE_NUMBER,new L.JsonFieldReaderPhoneNumber],[D.CedarFieldType.RADIO,new V.JsonFieldReaderRadio],[D.CedarFieldType.CHECKBOX,new F.JsonFieldReaderCheckbox],[D.CedarFieldType.SINGLE_SELECT_LIST,new x.JsonFieldReaderList],[D.CedarFieldType.MULTIPLE_SELECT_LIST,new x.JsonFieldReaderList],[D.CedarFieldType.ATTRIBUTE_VALUE,new M.JsonFieldReaderAttributeValue],[D.CedarFieldType.STATIC_PAGE_BREAK,new E.JsonFieldReaderPageBreak],[D.CedarFieldType.STATIC_SECTION_BREAK,new C.JsonFieldReaderSectionBreak],[D.CedarFieldType.STATIC_IMAGE,new I.JsonFieldReaderImage],[D.CedarFieldType.STATIC_RICH_TEXT,new A.JsonFieldReaderRichText],[D.CedarFieldType.STATIC_YOUTUBE,new b.JsonFieldReaderYoutube]]);readFromString(e){const t=a.JsonSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e){const t=c.ReaderUtil.getNode(e,d.JsonSchema.items);"array"===e.type&&"attribute-value"===c.ReaderUtil.getNode(t,f.CedarModel.ui)[f.CedarModel.inputType]&&(e=t);const r=k.ChildDeploymentInfo.standalone(),n=new l.JsonPath;return this.readFromObjectInternal(e,r,n)}readFromObjectInternal(e,t,r){n.JsonArtifactShape.assertDeclaredKind(e,r,"field",this.lenient),n.JsonArtifactShape.assertJsonSchemaUri(e,r,null===r.getLastComponent(),this.lenient),n.JsonArtifactShape.assertModelVersion(e,r,this.lenient);const a=new o.JsonArtifactParsingResult,s=ee.readFieldSpecificAttributes(e,t,a,r);if(t instanceof k.ChildDeploymentInfo&&t.isStandalone()&&(s instanceof H.TextFieldImpl||s instanceof Q.ControlledTermFieldImpl)&&(s.valueRecommendationEnabled=t.valueRecommendationEnabled),t instanceof k.ChildDeploymentInfo&&t.isStandalone()){const r=c.ReaderUtil.getNode(e,f.CedarModel.ui);s.hidden=c.ReaderUtil.getBoolean(r,f.CedarModel.Ui.hidden),s.continuePreviousLine=t.continuePreviousLine,s.cedarFieldType.recordsRequirement&&(s.requiredValue=t.requiredValue,s.recommendedValue=t.recommendedValue)}return t instanceof k.ChildDeploymentInfo&&t.isStandalone()&&c.ReaderUtil.getArtifactIdentifier(e,d.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(s,e),(0,i.applySchemaReaderDefaults)(s,e,r,"json"),this.readReportableAttributes(s,e,a,r),this.readAnnotations(s,e),new Y.JsonTemplateFieldReaderResult(s,a,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=c.ReaderUtil.getString(t,f.CedarModel.skosPrefLabel),e.skos_altLabel=c.ReaderUtil.getFilteredStringList(t,f.CedarModel.skosAltLabel)}readReportableAttributes(e,t,r,n){const a=c.ReaderUtil.getNode(t,d.JsonSchema.atContext);let i=s.JsonNode.getEmpty();e.cedarArtifactType==p.CedarArtifactType.TEMPLATE_FIELD?i=T.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM:e.cedarArtifactType==p.CedarArtifactType.STATIC_TEMPLATE_FIELD&&(i=S.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM),m.JsonObjectComparator.compareBothWays(r,i,a,n.add(d.JsonSchema.atContext),this.behavior,[d.JsonSchema.atLanguage,...Object.keys(e.extensions.prefixes)]),e.cedarFieldType===D.CedarFieldType.ATTRIBUTE_VALUE?m.JsonObjectComparator.comparePrimitive(r,h.JavascriptType.STRING.getValue(),c.ReaderUtil.getString(t,f.CedarModel.type),n.add(f.CedarModel.type)):m.JsonObjectComparator.comparePrimitive(r,h.JavascriptType.OBJECT.getValue(),c.ReaderUtil.getString(t,f.CedarModel.type),n.add(f.CedarModel.type)),m.JsonObjectComparator.comparePrimitive(r,!1,c.ReaderUtil.getBoolean(t,u.TemplateProperty.additionalProperties),n.add(u.TemplateProperty.additionalProperties)),m.JsonObjectComparator.comparePrimitive(r,y.ArtifactSchema.CURRENT.getValue(),c.ReaderUtil.getString(t,f.CedarModel.schema),n.add(f.CedarModel.schema)),e.language=K.Language.forValue(c.ReaderUtil.getString(a,d.JsonSchema.atLanguage))}static readFieldSpecificAttributes(e,t,r,a){const i=n.JsonArtifactShape.declaredTypeOrNull(e,a),s=c.ReaderUtil.getNode(e,f.CedarModel.ui),o=c.ReaderUtil.getString(s,f.CedarModel.inputType),l=O.UiInputType.forValue(o),d=this.getCedarFieldType(e,l);if(d===D.CedarFieldType.NULL)throw new Error(`Unknown uiInputType type: "${o}"`);if((i==p.CedarArtifactType.TEMPLATE_FIELD||i==p.CedarArtifactType.STATIC_TEMPLATE_FIELD)&&null!=l){const n=this.dynamicTypeReaderMap.get(d);if(!n)throw new Error(`\n No reader defined for dynamic input type "${d.getValue()}"`);return d!==D.CedarFieldType.CONTROLLED_TERM&&Z.JsonTermConstraintChecks.assertReadable(e,a),n.read(e,t,r,a)}return J.UnknownTemplateField.build()}static fieldHasValueConstraint(e){const t=c.ReaderUtil.getNode(e,f.CedarModel.valueConstraints);return c.ReaderUtil.getNodeList(t,f.CedarModel.ontologies).length>0||(c.ReaderUtil.getNodeList(t,f.CedarModel.branches).length>0||(c.ReaderUtil.getNodeList(t,f.CedarModel.classes).length>0||c.ReaderUtil.getNodeList(t,f.CedarModel.valueSets).length>0))}static getCedarFieldType(e,t){let r=D.CedarFieldType.forUiInputType(t);if(r===D.CedarFieldType.TEXT||r===D.CedarFieldType.CONTROLLED_TERM){const t=c.ReaderUtil.getNode(e,d.JsonSchema.properties);r=Object.prototype.hasOwnProperty.call(t,d.JsonSchema.atId)&&!Object.prototype.hasOwnProperty.call(t,d.JsonSchema.atValue)||this.fieldHasValueConstraint(e)?D.CedarFieldType.CONTROLLED_TERM:D.CedarFieldType.TEXT}return r}}t.JsonTemplateFieldReader=ee},8220(e,t,r){t.JsonTemplateFieldReaderInternal=void 0;const n=r(3188),a=r(4381),i=r(455);class s extends a.JsonTemplateFieldReader{constructor(e){super(e)}static getForBehavior(e){return new s(e)}readFromObjectInternal(e,t,r){return t=t||i.ChildDeploymentInfo.standalone(),r=r||new n.JsonPath,super.readFromObjectInternal(e,t,r)}}t.JsonTemplateFieldReaderInternal=s},6396(e,t,r){t.JsonTemplateFieldReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get field(){return this._artifact}get fieldSourceObject(){return this._artifactSourceObject}}t.JsonTemplateFieldReaderResult=a},4385(e,t,r){t.JsonTemplateFieldTypeSpecificReader=void 0;const n=r(855),a=r(8748),i=r(936);t.JsonTemplateFieldTypeSpecificReader=class{read(e,t,r,a){return n.UnknownTemplateField.build()}readRequiredAndHidden(e,t){const r=a.ReaderUtil.getNode(e,i.CedarModel.valueConstraints);null!=r&&(t.requiredValue=a.ReaderUtil.getBoolean(r,i.CedarModel.requiredValue),t.recommendedValue=a.ReaderUtil.getBoolean(r,i.CedarModel.ValueConstraints.recommendedValue));const n=a.ReaderUtil.getNode(e,i.CedarModel.ui);n&&(t.hidden=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.hidden),t.continuePreviousLine=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.continuePreviousLine),t.valueRecommendationEnabled=a.ReaderUtil.getBoolean(n,i.CedarModel.Ui.valueRecommendationEnabled))}}},9232(e,t,r){t.JsonTemplateInstanceReader=void 0;const n=r(5904),a=r(3992),i=r(5588),s=r(1625),o=r(9167),l=r(2763),c=r(4036),d=r(2888),u=r(9760),m=r(3188),p=r(5846),h=r(3326),f=r(2272),y=r(6537),T=r(8748),g=r(2733),E=r(7723),C=r(5222),I=r(7571),A=r(7548),b=r(1896),v=r(8193),S=r(4877),R=r(4465),w=r(3644),N=r(9327),_=r(936),L=r(350),V=r(4033);class O extends h.JsonAbstractInstanceArtifactReader{knownArtifactType=l.CedarArtifactType.TEMPLATE_INSTANCE;knownKeys={[g.JsonSchema.atId]:!0,[g.JsonSchema.atType]:!0,[g.JsonSchema.pavDerivedFrom]:!0,[g.JsonSchema.schemaIdentifier]:!0,[g.JsonSchema.oslcModifiedBy]:!0,[g.JsonSchema.pavLastUpdatedOn]:!0,[g.JsonSchema.pavCreatedBy]:!0,[g.JsonSchema.pavCreatedOn]:!0,[g.JsonSchema.schemaDescription]:!0,[g.JsonSchema.schemaName]:!0,[g.JsonSchema.schemaIsBasedOn]:!0,[g.JsonSchema.atContext]:!0,[_.CedarModel.annotations]:!0};constructor(e){super(e)}static getStrict(){return new O(p.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new O(p.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new O(e)}readFromString(e){const t=n.JsonSourcePolicy.parse(e);return this.readFromObject(t,new m.JsonPath)}readFromObject(e,t){const r=new c.JsonArtifactParsingResult,n=f.TemplateInstance.buildEmptyWithNullValues();this.readNonReportableAttributes(n,e),n.descriptionWasAbsent=null===T.ReaderUtil.getString(e,g.JsonSchema.schemaDescription),n.schema_description=n.schema_description??"";const a=t??new m.JsonPath;return this.readInstanceData(e,n,a,r),O.reportEnvelope(e,a,r),new y.JsonTemplateInstanceReaderResult(n,r,e)}static ENVELOPE_KEYS=[g.JsonSchema.atContext,g.JsonSchema.atId,g.JsonSchema.schemaIsBasedOn,g.JsonSchema.pavCreatedOn,g.JsonSchema.pavCreatedBy,g.JsonSchema.oslcModifiedBy,g.JsonSchema.pavLastUpdatedOn];static reportEnvelope(e,t,r){for(const n of O.ENVELOPE_KEYS){if(!Object.hasOwn(e,n)){r.addBlueprintComparisonWarning(new d.ComparisonError("JsonTemplateInstanceReader",u.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,t.add(n),n));continue}const a=T.ReaderUtil.getNode(e,n);(null==a||n===g.JsonSchema.atContext&&0===Object.keys(a).length)&&r.addBlueprintComparisonWarning(new d.ComparisonError("JsonTemplateInstanceReader",u.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(n),n,null))}}readInstanceData(e,t,r,n){t.dataContainer=this.readInstanceContainer(e,r,n),this.readAnnotations(t,e)}readInstanceContainer(e,t,r){return this.parseContainer(e,t,r,"template")}isKnownKey(e){return Object.hasOwn(this.knownKeys,e)}parseContainer(e,t,r,n="element"){const s=new E.InstanceDataContainer;Object.keys(e).forEach(n=>{if(!this.isKnownKey(n)){const a=T.ReaderUtil.getNode(e,n);if(Array.isArray(a)){const e=[];s.setValue(n,e);const i=a.some(e=>null!==e&&"object"==typeof e&&Object.hasOwn(e,g.JsonSchema.atContext));a.forEach((a,s)=>{if(i){if(null===a||"object"!=typeof a||Array.isArray(a)||Object.hasOwn(a,g.JsonSchema.atValue))throw new Error(`Cannot mix fields and element instances in array "${n}" at index ${s}`);O.refuseChildWithoutContext(a,t.add(n,s)),e[s]=this.parseContainer(a,t.add(n,s),r)}else e[s]=this.parseNode(a,t.add(n,s),r)})}else s.setValue(n,this.parseNode(a,t.add(n),r))}});for(const e of V.AttributeValueNamePolicy.findConflicts(s,n,!0).filter(e=>0===e.path.length))r.addBlueprintComparisonError(new d.ComparisonError("JsonTemplateInstanceReader",u.ComparisonErrorType.VALUE_MISMATCH,t.add(...V.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));this.packAttributeValues(s),s.types=O.readTypes(e),b.StoredForm.recordMembers(s,Object.fromEntries(Object.keys(e).filter(e=>i.ReservedNames.isReservedName(e)).map(t=>[t,e[t]])));const o=Object.hasOwn(e,g.JsonSchema.atContext)?T.ReaderUtil.getNode(e,g.JsonSchema.atContext):null;if(null!=o){const e=o;b.StoredForm.recordContextTerms(s,Object.fromEntries(Object.keys(e).filter(e=>Object.hasOwn(L.JsonTemplateInstanceContent.CONTEXT_VERBATIM,e)).map(t=>[t,e[t]]))),Object.keys(s.values).forEach(t=>{const r=T.ReaderUtil.getString(e,t);null!==r&&s.setIri(t,r)}),Object.keys(s.values).forEach(t=>{const r=s.values[t];r instanceof N.InstanceDataAttributeValueField&&Object.keys(r.values).forEach(t=>{const r=T.ReaderUtil.getString(e,t);null!==r&&s.setIri(t,r)})}),Object.keys(e).forEach(t=>{if(Object.hasOwn(L.JsonTemplateInstanceContent.CONTEXT_VERBATIM,t))return;const r=T.ReaderUtil.getString(e,t);null!==r&&s.setIri(t,r)})}if(Object.hasOwn(e,g.JsonSchema.atId)){const n=T.ReaderUtil.getString(e,g.JsonSchema.atId);if(null!==n){if("string"!=typeof n)throw new Error(`Invalid URI at "${g.JsonSchema.atId}": expected a string.`);a.TextPolicy.isBlank(n)?(this.behavior.useWarningForKnownIssues()||O.refuseEmptyIdentifier(e),r.addBlueprintComparisonWarning(new d.ComparisonError("JsonTemplateInstanceReader",u.ComparisonErrorType.VALUE_MISMATCH,t.add(g.JsonSchema.atId),"an absolute IRI or null while the occurrence awaits server assignment",n))):this.lenient?T.ReaderUtil.assertIri(n,g.JsonSchema.atId):T.ReaderUtil.assertIdentifier(n,g.JsonSchema.atId),s.id=n}}return s}static readTypes(e){const t=Object.hasOwn(e,g.JsonSchema.atType)?e[g.JsonSchema.atType]:null;return null===t?[]:(Array.isArray(t)?t:[t]).map((e,t)=>{if("string"!=typeof e)throw new Error(`Invalid @type at index ${t}: expected an IRI.`);return T.ReaderUtil.assertIdentifier(e,g.JsonSchema.atType),e})}static VALUE_ATOM_KEYS=new Set([g.JsonSchema.atValue,g.JsonSchema.atLanguage,g.JsonSchema.atId,g.JsonSchema.rdfsLabel,g.JsonSchema.atType,_.CedarModel.skosNotation,_.CedarModel.skosPrefLabel]);static VALUE_LABEL="_valueLabel";static refuseChildWithoutContext(e,t){if(Array.isArray(e)||Object.hasOwn(e,g.JsonSchema.atContext))return;const r=Object.keys(e).find(e=>!i.ReservedNames.isReservedName(e)&&e!==O.VALUE_LABEL);if(void 0!==r)throw new Error(`An element value must carry @context, and an object without one cannot carry the child key "${r}" at ${t.add(r).toPointer()}.`)}static isValueNode(e){if(null==e)return!1;if("string"==typeof e)return!0;if(Object.hasOwn(e,g.JsonSchema.atValue))return!0;if(Object.hasOwn(e,g.JsonSchema.atContext))return!1;const t=Object.keys(e);return t.length>0&&t.every(e=>O.VALUE_ATOM_KEYS.has(e))}static readValueNode(e){return null==e?new R.InstanceDataEmptyNode:"string"==typeof e?new w.InstanceDataAttributeValueFieldName(e):O.isValueNode(e)?O.parseDataAtom(e):new R.InstanceDataEmptyNode}parseNode(e,t,r){if(null==e)return new R.InstanceDataEmptyNode;if("string"==typeof e)return new w.InstanceDataAttributeValueFieldName(e);if("object"==typeof e&&O.refuseChildWithoutContext(e,t),O.isValueNode(e)){const n=O.parseDataAtom(e);return O.reportNullIri(n,t,r),n}return 0===Object.keys(e).length?new R.InstanceDataEmptyNode:this.parseContainer(e,t,r)}static reportNullIri(e,t,r){(e instanceof I.InstanceDataLinkAtom||e instanceof v.InstanceDataControlledAtom)&&null===e.id&&r.addBlueprintComparisonError(new d.ComparisonError("JsonTemplateInstanceReader",u.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,t.add(g.JsonSchema.atId),"an IRI",null))}static NULLABLE_VALUE_KEYS=[g.JsonSchema.rdfsLabel,g.JsonSchema.skosNotation,_.CedarModel.skosPrefLabel,g.JsonSchema.atLanguage];static parseDataAtom(e){if(Object.hasOwn(e,g.JsonSchema.atId)&&Object.hasOwn(e,g.JsonSchema.atValue))throw new Error("A field cannot contain both @id and @value.");const t=this.parseDataAtomWithoutNotation(e);return b.StoredForm.recordNulls(t,O.NULLABLE_VALUE_KEYS.filter(t=>Object.hasOwn(e,t)&&null===e[t])),"language"in t&&(t.language=T.ReaderUtil.getString(e,g.JsonSchema.atLanguage)),"preferredLabel"in t&&(t.preferredLabel=T.ReaderUtil.getString(e,_.CedarModel.skosPrefLabel)),!("notation"in t)||t instanceof s.InstanceDataNotationAtom||(t.notation=T.ReaderUtil.getString(e,g.JsonSchema.skosNotation)),t}static parseDataAtomWithoutNotation(e){if(Object.hasOwn(e,g.JsonSchema.atValue)){const t=T.ReaderUtil.getString(e,g.JsonSchema.atValue),r=T.ReaderUtil.getSingleType(e,g.JsonSchema.atType);return null===r?new C.InstanceDataStringAtom(t,T.ReaderUtil.getString(e,g.JsonSchema.rdfsLabel)):new S.InstanceDataTypedAtom(t,r,T.ReaderUtil.getString(e,g.JsonSchema.rdfsLabel))}if(Object.hasOwn(e,g.JsonSchema.atId)){T.ReaderUtil.assertFieldIri(T.ReaderUtil.getString(e,g.JsonSchema.atId),g.JsonSchema.atId);const t=T.ReaderUtil.getString(e,g.JsonSchema.atId),r=T.ReaderUtil.getString(e,g.JsonSchema.rdfsLabel);return null===r?I.InstanceDataLinkAtom.fromParsedNode(t,T.ReaderUtil.getSingleType(e,g.JsonSchema.atType)):v.InstanceDataControlledAtom.fromParsedNode(t,r,T.ReaderUtil.getSingleType(e,g.JsonSchema.atType))}const t=T.ReaderUtil.getString(e,g.JsonSchema.rdfsLabel);if(null!==t)return new o.InstanceDataLabelAtom(t,T.ReaderUtil.getSingleType(e,g.JsonSchema.atType));const r=T.ReaderUtil.getString(e,g.JsonSchema.skosNotation);return null!==r?new s.InstanceDataNotationAtom(r,T.ReaderUtil.getSingleType(e,g.JsonSchema.atType)):new A.InstanceDataEmptyAtom(e)}packAttributeValues(e){const t=e.values,r=[];Object.keys(t).forEach(e=>{const n=t[e];if(Array.isArray(n)){let a=!1;if(n.forEach((e,t)=>{e instanceof w.InstanceDataAttributeValueFieldName||(a=!0)}),n.length>0&&!a){const a=new N.InstanceDataAttributeValueField(e);r.push(a),n.forEach((e,r)=>{const n=e.name;if(null!==n&&Object.hasOwn(t,n)){const e=t[n];a.addValue(n,e)}})}}}),r.forEach((e,r)=>{const n=e.name;null!==n&&(t[n]=e,Object.keys(e.values).forEach(e=>{Object.hasOwn(t,e)&&delete t[e]}))}),e.values=t}}t.JsonTemplateInstanceReader=O},6537(e,t,r){t.JsonTemplateInstanceReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.JsonTemplateInstanceReaderResult=a},5291(e,t,r){t.JsonTemplateReader=void 0;const n=r(639),a=r(5904),i=r(797),s=r(936),o=r(2733),l=r(2763),c=r(5747),d=r(8748),u=r(6551),m=r(3056),p=r(4036),h=r(7954),f=r(3188),y=r(5846),T=r(9932),g=r(7909),E=r(5510),C=r(3281);class I extends E.JsonContainerArtifactReader{elementReader;knownArtifactType=l.CedarArtifactType.TEMPLATE;constructor(e){super(e),this.elementReader=g.JsonTemplateElementReader.getForBehavior(e)}static getStrict(){return new I(y.JsonReaderBehavior.STRICT)}static getFebruary2024(){return new I(y.JsonReaderBehavior.FEBRUARY_2024)}static getForBehavior(e){return new I(e)}getElementReader(){return this.elementReader}includeInIRIMapping(e){return e.atType!==l.CedarArtifactType.STATIC_TEMPLATE_FIELD}readFromString(e){const t=a.JsonSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e,t=new f.JsonPath){n.JsonArtifactShape.assertDeclaredKind(e,t,"template",this.lenient),n.JsonArtifactShape.assertJsonSchemaUri(e,t,!0,this.lenient),n.JsonArtifactShape.assertObjectType(e,t,this.lenient),n.JsonArtifactShape.assertModelVersion(e,t,this.lenient);const r=new p.JsonArtifactParsingResult,a=C.Template.buildEmptyWithNullValues();return d.ReaderUtil.getArtifactIdentifier(e,o.JsonSchema.atId,this.lenient),this.readNonReportableAttributes(a,e),(0,i.applySchemaReaderDefaults)(a,e,t,"json"),this.readReportableAttributes(a,e,r,t),this.readAnnotations(a,e),this.readInstanceTypeSpecification(a,e,r),this.readAndValidateChildrenInfo(a,e,r,t),new h.JsonTemplateReaderResult(a,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=d.ReaderUtil.getNode(t,s.CedarModel.ui);null!==r&&(e.header=d.ReaderUtil.getString(r,s.CedarModel.header),e.footer=d.ReaderUtil.getString(r,s.CedarModel.footer))}readAndValidateChildrenInfo(e,t,r,n){const a=d.ReaderUtil.getStringList(t,o.JsonSchema.required),i=d.ReaderUtil.getNode(t,o.JsonSchema.properties),l=this.generateAndValidateRequiredMap(a,u.JsonTemplateContent.REQUIRED_PARTIAL,r,n),c=this.getCandidateChildrenInfo(i,u.JsonTemplateContent.PROPERTIES_PARTIAL_KEY_MAP,r,n);this.checkRequiredBothWays(c,l,a,u.JsonTemplateContent.REQUIRED_PARTIAL_KEY_MAP,r,n);const m=d.ReaderUtil.getNode(t,s.CedarModel.ui);this.extractUIPreferredLabelsAndDescriptions(m,c,r,n),this.extractIRIMappings(i,c,r,n);const p=d.ReaderUtil.getStringList(m,s.CedarModel.order),h=this.finalizeChildInfo(p,c,r,n);this.validatePropertiesVsOrder(c,p,r,n),this.validateProperties(h,i,e,r,n),this.parseChildren(h,i,e,r,n)}validateProperties(e,t,r,n,a){let i=d.ReaderUtil.deepClone(u.JsonTemplateContent.PROPERTIES_PARTIAL);e.hasAttributeValue()&&(i=d.ReaderUtil.deepClone(u.JsonTemplateContent.PROPERTIES_PARTIAL),i[o.JsonSchema.atContext][c.TemplateProperty.additionalProperties]=T.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE),s.CedarModel.annotations in t||delete i[s.CedarModel.annotations];const l=d.ReaderUtil.getNode(d.ReaderUtil.getNode(t,o.JsonSchema.atContext),o.JsonSchema.properties);s.CedarModel.annotations in l||delete d.ReaderUtil.getNode(d.ReaderUtil.getNode(i,o.JsonSchema.atContext),o.JsonSchema.properties)[s.CedarModel.annotations],m.JsonObjectComparator.compareToLeft(n,i,t,a.add(o.JsonSchema.properties),this.behavior)}}t.JsonTemplateReader=I},7954(e,t,r){t.JsonTemplateReaderResult=void 0;const n=r(8518);class a extends n.JsonArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get template(){return this._artifact}get templateSourceObject(){return this._artifactSourceObject}}t.JsonTemplateReaderResult=a},6681(e,t,r){t.JsonTermConstraintChecks=void 0;const n=r(936),a=r(4531),i=r(2108),s=r(2500),o=r(5904),l=r(3992),c=r(8748),d=n.CedarModel.ValueConstraints,u=(e,t)=>Object.hasOwn(e,t)?e[t]:void 0,m=e=>"object"==typeof e&&null!==e&&!Array.isArray(e)&&!i.ExactDecimal.isExact(e),p=e=>o.JsonSourcePolicy.stringify(e)??"undefined",h=(e,t,r)=>new Error(`Missing ${e} at ${t.add(e).toPointer()}. Expected ${r}.`),f=(e,t,r,n)=>new Error(`Invalid ${e} ${p(t)} at ${r.add(e).toPointer()}. Expected ${n}.`),y=(e,t,r)=>{const n=u(e,t);if(void 0===n)throw h(t,r,"a string");if("string"!=typeof n)throw f(t,n,r,"a string")},T=(e,t,r)=>{const n=u(e,t);if(null!=n&&"string"!=typeof n)throw f(t,n,r,"a string")},g=(e,t,r)=>{const n=u(e,t);if(void 0===n)throw h(t,r,"an absolute IRI");if("string"!=typeof n||""===n)throw f(t,n,r,"an absolute IRI");s.IdentifierPolicy.assertIdentifier(n,r.add(t).toPointer())},E=(e,t,r)=>{c.ReaderUtil.getJsonJavaIntOrNull(e,t,r)},C=[[d.iri,(e,t,r)=>{const n=u(e,t);if(null!=n&&""!==n){if("string"!=typeof n)throw f(t,n,r,"a URI");s.IdentifierPolicy.assertIri(n,r.add(t).toPointer())}}],[d.sourceSystem,T],[d.version,(e,t,r)=>{const n=u(e,t);if(!m(n))return;const a=r.add(t);y(n,d.versionId,a);const i=n[d.versionId];if(""===i)throw f(d.versionId,i,a,"a non-empty string");if(l.TextPolicy.isBlank(i))throw f(d.versionId,i,a,"a string that is not blank");T(n,d.versionEffectiveDate,a),T(n,d.versionDeclaredVersion,a)}]],I=[[n.CedarModel.ontologies,[[d.uri,g],[d.acronym,y],[d.name,y],[d.numTerms,E],...C]],[n.CedarModel.valueSets,[[d.uri,g],[d.name,y],[d.vsCollection,y],[d.numTerms,E],...C]],[n.CedarModel.classes,[[d.uri,g],[d.prefLabel,y],[d.type,(e,t,r)=>{const n=Object.values(a.BioportalTermTypeJsonValues),i=n.join(" or "),s=u(e,t);if(void 0===s)throw h(t,r,i);if("string"!=typeof s||!n.some(e=>l.TextPolicy.equalsIgnoreCase(e,s)))throw f(t,s,r,i)}],[d.label,y],[d.source,y],...C]],[n.CedarModel.branches,[[d.uri,g],[d.source,y],[d.acronym,y],[d.name,y],[d.maxDepth,(e,t,r)=>{c.ReaderUtil.getRequiredJsonJavaInt(e,t,r)}],...C]]];class A{static assertReadable(e,t){A.forEachEntry(e,t,(e,t,r)=>{for(const[n,a]of t)a(e,n,r)})}static assertEntriesAreObjects(e,t){A.forEachEntry(e,t,()=>{})}static forEachEntry(e,t,r){const a=u(e,n.CedarModel.valueConstraints);if(!m(a))return;const i=t.add(n.CedarModel.valueConstraints);for(const[e,t]of I){const n=u(a,e);Array.isArray(n)&&n.forEach((n,a)=>{const s=i.add(e,a);if(!m(n))throw new Error(`Invalid ${e} entry ${p(n)} at ${s.toPointer()}. Expected an object.`);r(n,t,s)})}}}t.JsonTermConstraintChecks=A},8639(e,t,r){t.CedarYamlReaders=void 0;const n=r(2763),a=r(1395),i=r(5677),s=r(8239),o=r(2999),l=r(9946);class c{behavior;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}static getStrict(){return new c(a.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new c(a.YamlReaderBehavior.STRICT,!0)}getTemplateReader(){return i.YamlTemplateReader.getForBehavior(this.behavior,this.isCompact)}getTemplateElementReader(){return s.YamlTemplateElementReader.getForBehavior(this.behavior,this.isCompact)}getTemplateFieldReader(){return o.YamlTemplateFieldReader.getForBehavior(this.behavior,this.isCompact)}getTemplateInstanceReader(){return l.YamlTemplateInstanceReader.getForBehavior(this.behavior)}getReaderForArtifactType(e){switch(e){case n.CedarArtifactType.TEMPLATE:return i.YamlTemplateReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_ELEMENT:return s.YamlTemplateElementReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_FIELD:case n.CedarArtifactType.STATIC_TEMPLATE_FIELD:return o.YamlTemplateFieldReader.getForBehavior(this.behavior,this.isCompact);case n.CedarArtifactType.TEMPLATE_INSTANCE:return l.YamlTemplateInstanceReader.getForBehavior(this.behavior);default:throw new Error(`No YAML reader available for CedarArtifactType: ${e}`)}}}t.CedarYamlReaders=c},6575(e,t,r){t.YamlAbstractArtifactReader=void 0;const n=r(2500),a=r(3992),i=r(4443),s=r(8333),o=r(8534),l=r(2234),c=r(9857),d=r(8557),u=r(1027),m=r(3910),p=r(2763),h=r(5226),f=r(2787),y=r(3549),T=r(8748),g=r(2099),E=r(7752),C=r(2108),I=r(9499),A=r(8557),b=[g.YamlKeys.label,g.YamlKeys.prefLabel,g.YamlKeys.notation],v=m.BiboStatus.values().map(e=>e.getYamlValue());class S{behavior;knownArtifactType=p.CedarArtifactType.NULL;isCompact;constructor(e,t=!1){this.behavior=e,this.isCompact=t}artifactTypeWord(){return this.knownArtifactType===p.CedarArtifactType.TEMPLATE?"template":this.knownArtifactType===p.CedarArtifactType.TEMPLATE_ELEMENT?"element":"field"}readNonReportableAttributes(e,t){if(e.extensions=i.SchemaExtensions.fromYaml(t),S.refuseEmptyIdentifier(t),e.at_id=o.CedarArtifactId.forValue(T.ReaderUtil.getString(t,g.YamlKeys.id)),e.schema_name=T.ReaderUtil.getString(t,g.YamlKeys.name),e.schema_description=T.ReaderUtil.getStringOrEmpty(t,g.YamlKeys.description),null!==e.schema_name){const t=this.artifactTypeWord();e.title=(0,s.internalNameFor)(e.schema_name,t),e.description=`${e.schema_name} ${t} schema generated by the CEDAR Artifact Library`}e.pav_createdBy=l.CedarUser.forValue(T.ReaderUtil.getString(t,g.YamlKeys.createdBy)),e.pav_createdOn=c.IsoDate.forValue(T.ReaderUtil.getString(t,g.YamlKeys.createdOn)),e.oslc_modifiedBy=l.CedarUser.forValue(T.ReaderUtil.getString(t,g.YamlKeys.modifiedBy)),e.pav_lastUpdatedOn=c.IsoDate.forValue(T.ReaderUtil.getString(t,g.YamlKeys.modifiedOn));const r=T.ReaderUtil.getString(t,g.YamlKeys.modelVersion);if(null===r&&!this.isCompact)throw new Error(`No ${g.YamlKeys.modelVersion} present. A document without one is the compact form, which a reader has to be asked for.`);e.schema_schemaVersion=d.SchemaVersion.forValue(r),e.pav_version=u.PavVersion.forValue(T.ReaderUtil.getString(t,g.YamlKeys.version)),e.bibo_status=m.BiboStatus.forYamlValue(T.ReaderUtil.getString(t,g.YamlKeys.status)),e.pav_derivedFrom=o.CedarArtifactId.forValue(T.ReaderUtil.getArtifactIdentifier(t,g.YamlKeys.derivedFrom,this.behavior.useWarningForKnownIssues())),e.pav_previousVersion=o.CedarArtifactId.forValue(T.ReaderUtil.getIdentifier(t,g.YamlKeys.previousVersion)),e.schema_identifier=T.ReaderUtil.getString(t,g.YamlKeys.identifier),e.language=E.Language.forValue(T.ReaderUtil.getString(t,g.YamlKeys.language))}static refuseEmptyIdentifier(e,t=g.YamlKeys.id,r=t){const n=T.ReaderUtil.getString(e,t);if(null!==n&&"string"!=typeof n)throw new Error(`Invalid URI at "${r}": expected a string.`);if(null!==n&&a.TextPolicy.isBlank(n))throw new Error(`An empty string is not a URI at "${r}"; write null or leave the key out where there is no value.`);T.ReaderUtil.assertIri(n,r)}static isMapping(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)&&!C.ExactDecimal.isExact(e)}static refuseNullOrEmpty(e,t){if(null===e)throw new Error(`null is not a valid value at ${t}; omit the key if the value is unknown.`);if(Array.isArray(e)&&0===e.length)throw new Error(`An empty list ([]) is not a valid value at ${t}; omit the key if the value is unknown.`);if(S.isMapping(e)&&0===Object.keys(e).length)throw new Error(`An empty mapping ({}) is not a valid value at ${t}; omit the key if the value is unknown.`)}static refuseNullAndEmptyValues(e,t,r=!1){if(Array.isArray(e))e.forEach((e,n)=>{S.refuseNullOrEmpty(e,`${t}[${n}]`),S.refuseNullAndEmptyValues(e,`${t}[${n}]`,r)});else if(S.isMapping(e)){const n=e[g.YamlKeys.type],a="string"==typeof n?I.YamlArtifactType.forValue(n):I.YamlArtifactType.NULL,i=a.isTemplate()||a.isElement()||a.isField();for(const[n,a]of Object.entries(e))r&&n===g.YamlKeys.value&&null===a&&b.some(t=>"string"==typeof e[t])||!r&&"extensions"===n&&i||(S.refuseNullOrEmpty(a,`${t}/${n}`),S.refuseNullAndEmptyValues(a,`${t}/${n}`,r))}}static refuseNullAndEmptySchemaValues(e,t){S.refuseNullAndEmptyValues(e,t.toPointer())}static assertText(e,t,r){if(Object.hasOwn(e,t)&&"string"!=typeof e[t])throw new Error(`Expected a string at ${r}/${t}.`)}static assertType(e,t,r){const n=t.getValue();if(!Object.hasOwn(e,g.YamlKeys.type))throw new Error(`No ${g.YamlKeys.type} present. ${r} states its type, "${n}".`);if(S.assertText(e,g.YamlKeys.type,""),e[g.YamlKeys.type]!==n)throw new Error(`Invalid artifact type "${e[g.YamlKeys.type]}" at /${g.YamlKeys.type}. ${r} has the type "${n}".`)}static readName(e,t,r){if(!Object.hasOwn(e,g.YamlKeys.name))throw new Error(`No ${g.YamlKeys.name} present${""===t?"":` at ${t}`}. ${r} must have a name.`);S.assertText(e,g.YamlKeys.name,t);const n=e[g.YamlKeys.name];if(""===n)throw new Error(`Expected a non-empty string at ${t}/${g.YamlKeys.name}.`);return n}assertSchemaMetadata(e,t){const r=t.toPointer(),n=""===r,a=this.artifactTypeWord(),i="template"===a?"A template":"element"===a?"An element":"A field";if(n&&"template"===a?S.assertType(e,I.YamlArtifactType.TEMPLATE,i):n&&"element"===a&&S.assertType(e,I.YamlArtifactType.ELEMENT,i),n&&Object.hasOwn(e,g.YamlKeys.modelVersion)&&(S.assertText(e,g.YamlKeys.modelVersion,r),e[g.YamlKeys.modelVersion]!==A.SchemaVersionValues.CURRENT))throw new Error(`Invalid ${g.YamlKeys.modelVersion} "${e[g.YamlKeys.modelVersion]}" at /${g.YamlKeys.modelVersion}. This library reads model version "${A.SchemaVersionValues.CURRENT}".`);S.readName(e,r,i);const s=[g.YamlKeys.description,g.YamlKeys.identifier,g.YamlKeys.language,g.YamlKeys.createdOn,g.YamlKeys.modifiedOn];"field"!==a&&s.push(g.YamlKeys.header,g.YamlKeys.footer),"template"!==a&&s.push(g.YamlKeys.prefLabel),s.forEach(t=>S.assertText(e,t,r)),[g.YamlKeys.createdBy,g.YamlKeys.modifiedBy].forEach(t=>S.refuseEmptyIdentifier(e,t,`${r}/${t}`.slice(1))),S.assertText(e,g.YamlKeys.status,r);const o=e[g.YamlKeys.status];if(Object.hasOwn(e,g.YamlKeys.status)&&""!==o&&!v.includes(o))throw new Error(`Invalid ${g.YamlKeys.status} "${o}" at ${r}/${g.YamlKeys.status}. A status is one of ${v.join(", ")}.`);const l=e[g.YamlKeys.altLabels];if("template"!==a&&Array.isArray(l)){const e=l.indexOf("");if(e>=0)throw new Error(`Expected a non-empty string at ${r}/${g.YamlKeys.altLabels}[${e}].`)}}static readAltLabels(e){return T.ReaderUtil.getFilteredStringList(e,g.YamlKeys.altLabels).filter(e=>"string"==typeof e)}readAnnotations(e,t,r,a){const i=new h.Annotations;if(!Object.hasOwn(t,g.YamlKeys.annotations))return;const s=`${a.toPointer()}/${g.YamlKeys.annotations}`,o=t[g.YamlKeys.annotations];if(!S.isMapping(o))throw new Error(`Expected a mapping at ${s}.`);Object.keys(o).forEach(e=>{const t=o[e];if(!S.isMapping(t))throw new Error(`Expected map value for annotation at ${s}/${e}`);if(Object.hasOwn(t,g.YamlKeys.value))S.assertText(t,g.YamlKeys.value,`${s}/${e}`),i.add(new y.AnnotationAtValue(e,t[g.YamlKeys.value]));else{if(!Object.hasOwn(t,g.YamlKeys.id))throw new Error(`Annotation must have either a value or id at ${s}/${e}`);S.refuseEmptyIdentifier(t,g.YamlKeys.id,`${s}/${e}/${g.YamlKeys.id}`.slice(1)),n.IdentifierPolicy.assertIdentifier(t[g.YamlKeys.id],`${s}/${e}/${g.YamlKeys.id}`),i.add(new f.AnnotationAtId(e,t[g.YamlKeys.id]))}}),i.getSize()>0&&(e.annotations=i)}}t.YamlAbstractArtifactReader=S},6532(e,t){t.YamlArtifactReaderResult=void 0,t.YamlArtifactReaderResult=class{_artifact;_parsingResult;_artifactSourceObject;constructor(e,t,r){this._artifact=e,this._parsingResult=t,this._artifactSourceObject=r}get artifact(){return this._artifact}get parsingResult(){return this._parsingResult}get artifactSourceObject(){return this._artifactSourceObject}}},9300(e,t,r){t.YamlContainerArtifactReader=void 0;const n=r(5588),a=r(6575),i=r(2999),s=r(455),o=r(2763),l=r(8748),c=r(2099),d=r(699),u=r(9499),m=r(4869),p=r(3239),h=r(8290),f=r(3608),y=r(513);class T extends a.YamlAbstractArtifactReader{fieldReader;constructor(e,t=!1){super(e,t),this.fieldReader=i.YamlTemplateFieldReader.getForBehavior(e,t)}readAndValidateChildrenInfo(e,t,r,a){l.ReaderUtil.getNodeList(t,c.YamlKeys.children).forEach(t=>{const r=l.ReaderUtil.getString(t,c.YamlKeys.type),i=l.ReaderUtil.getString(t,c.YamlKeys.key),g=u.YamlArtifactType.forValue(r);if(null===i)throw new Error(`A child without a ${c.YamlKeys.key} at ${a.add(c.YamlKeys.children).toString()}`);{if("string"!=typeof i)throw new Error(`Child key must be a string at ${a.add(c.YamlKeys.children,c.YamlKeys.key).toString()}`);if(n.ReservedNames.isReservedName(i))throw new Error(`Child schema uses a reserved instance property name at ${a.add(c.YamlKeys.children,i).toString()}`);const u=new s.ChildDeploymentInfo(i);u.atType=o.CedarArtifactType.forYamlArtifactType(g);const E=l.ReaderUtil.getNode(t,c.YamlKeys.configuration);if(u.label=l.ReaderUtil.getString(E,c.YamlKeys.overrideLabel),u.description=l.ReaderUtil.getString(E,c.YamlKeys.overrideDescription),u.multiInstance=l.ReaderUtil.getBoolean(E,c.YamlKeys.multiple),u.multiInstance&&(u.minItems=l.ReaderUtil.getNumber(E,c.YamlKeys.minItems)??y.AbstractChildDeploymentInfo.defaultMinItems,u.maxItems=l.ReaderUtil.getNumber(E,c.YamlKeys.maxItems)),u.requiredValue=l.ReaderUtil.getBoolean(E,c.YamlKeys.required),u.recommendedValue=l.ReaderUtil.getBoolean(E,c.YamlKeys.recommended),u.hidden=l.ReaderUtil.getBoolean(E,c.YamlKeys.hidden),u.valueRecommendationEnabled=l.ReaderUtil.getBoolean(E,c.YamlKeys.valueRecommendation),u.iri=l.ReaderUtil.getIdentifier(E,c.YamlKeys.propertyIri),g.isField()){const r=m.CedarFieldType.forYamlArtifactType(g);u.uiInputType=r.getUiInputType();const n=this.fieldReader.readFromObject(t,u,a.add(c.YamlKeys.children,i));(0,d.isSizedStaticField)(n.field)&&(n.field.width=l.ReaderUtil.getNumber(E,c.YamlKeys.width),n.field.height=l.ReaderUtil.getNumber(E,c.YamlKeys.height)),u.label=T.entryFor(u.label,n.field.schema_name),u.description=T.entryFor(u.description,n.field.schema_description);const s=n.field.createDeploymentBuilder(u.name).withLabel(u.label).withDescription(u.description);if(s instanceof h.ChildDeploymentInfoStaticBuilder&&s.withHidden(u.hidden),u.atType===o.CedarArtifactType.TEMPLATE_FIELD){const e=s;e.withHidden(u.hidden).withIri(u.iri).withContinuePreviousLine(l.ReaderUtil.getBoolean(E,c.YamlKeys.continuePreviousLine)).withRecommendedValue(u.recommendedValue).withRequiredValue(u.requiredValue).withValueRecommendationEnabled(u.valueRecommendationEnabled),e instanceof f.ChildDeploymentInfoBuilder&&e.withMultiInstance(u.multiInstance).withMinItems(u.minItems).withMaxItems(u.maxItems)}s instanceof p.ChildDeploymentInfoAlwaysMultipleBuilder&&s.withMinItems(l.ReaderUtil.getNumber(E,c.YamlKeys.minItems)).withMaxItems(l.ReaderUtil.getNumber(E,c.YamlKeys.maxItems));const y=s.build();e.addChild(n.field,y)}else{if(!g.isElement())throw new Error(`Unknown child type "${r}" at ${a.add(c.YamlKeys.children,i).toString()}`);{const r=this.getElementReader().readFromObject(t,u,a.add(c.YamlKeys.children,i)),n=r.element.createDeploymentBuilder(i).withLabel(T.entryFor(u.label,r.element.schema_name)).withDescription(T.entryFor(u.description,r.element.schema_description)).withIri(u.iri).withMultiInstance(u.multiInstance).withMinItems(u.minItems).withMaxItems(u.maxItems).build();e.addChild(r.element,n)}}}})}static entryFor(e,t){return null!==e?e:t}}t.YamlContainerArtifactReader=T},8979(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.YamlSourcePolicy=void 0,t.yamlSpelling=function(e,t){return l(e,t)?.text??null},t.yamlNumberSpelling=function(e,t){const r=l(e,t);return null===r?null:{text:r.text,integer:r.integer}};const n=r(3198),a=r(5904),i=r(2108),s=new WeakMap,o=/^(?:[-+]?[0-9]+|0o[0-7]+|0x[0-9a-fA-F]+)$/;function l(e,t){const r=s.get(e)?.get(t);return void 0!==r&&Object.is(r.value,e[t])?r:null}t.YamlSourcePolicy=class{static parse(e){const t=(0,n.parseAllDocuments)(e,{version:"1.2",schema:"core",uniqueKeys:!1});if(1!==t.length)throw new SyntaxError("Expected one YAML document");const r=t[0];if(r.errors.length||r.warnings.length)throw new SyntaxError("Invalid or unsupported YAML syntax");const l=new Set;let c=1e6;const d=new Set(["str","bool","null","int","float","seq","map"].map(e=>"tag:yaml.org,2002:"+e)),u=function e(t,u){if(null===t)return null;if(!t||"object"!=typeof t||--c<0||u>50||l.has(t))throw new SyntaxError("YAML alias expansion, nesting limit or cycle");l.add(t);try{if((0,n.isAlias)(t))return e(t.resolve(r),u+1);const l="tag"in t?t.tag:void 0;if(l&&!d.has(l))throw new SyntaxError("Unsupported YAML tag");if((0,n.isMap)(t)&&(!l||l.endsWith(":map"))){const a={};for(const l of t.items){if(!(0,n.isScalar)(l.key))throw new SyntaxError("Artifact mapping keys must be scalar strings");if(l.key.tag&&!d.has(l.key.tag))throw new SyntaxError("Unsupported YAML key tag");const t=l.key.source??String(l.key.value??"");if(Object.hasOwn(a,t))throw new SyntaxError("Duplicate YAML mapping key");const c=e(l.value,u+1);Object.defineProperty(a,t,{value:c,enumerable:!0,writable:!0,configurable:!0});const m=(0,n.isAlias)(l.value)?l.value.resolve(r):l.value;if(("number"==typeof c||"boolean"==typeof c||i.ExactDecimal.isExact(c))&&(0,n.isScalar)(m)){const e=m.source??String(c),r="boolean"!=typeof c&&(m.tag?"tag:yaml.org,2002:int"===m.tag:o.test(e)),n=s.get(a)??new Map;s.set(a,n.set(t,{value:c,text:e,integer:r}))}}return a}if((0,n.isSeq)(t)&&(!l||l.endsWith(":seq")))return t.items.map(t=>e(t,u+1));if((0,n.isScalar)(t)){const e=t.source??"";if(l?.endsWith(":str")||!l&&t.type!==n.Scalar.PLAIN)return e;const r=l?.slice(18);if((!r||"null"===r)&&/^(?:~|null|Null|NULL|)$/.test(e))return null;if((!r||"bool"===r)&&/^(?:true|True|TRUE|false|False|FALSE)$/.test(e))return"true"===e.toLowerCase();if((!r||"int"===r)&&/^(?:0o[0-7]+|0x[0-9a-fA-F]+)$/.test(e))return a.JsonSourcePolicy.sourceNumber(BigInt(e).toString());if((!r||"int"===r)&&/^[-+]?[0-9]+$/.test(e))return a.JsonSourcePolicy.sourceNumber(e);if((!r||"float"===r)&&/^[-+]?(?:[0-9]+(?:\.[0-9]*)?|\.[0-9]+)(?:[eE][-+]?[0-9]+)?$/.test(e))return a.JsonSourcePolicy.sourceNumber(e);if(r||/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/.test(e))throw new SyntaxError("Invalid YAML scalar");return e}throw new SyntaxError("Unsupported YAML value")}finally{l.delete(t)}}(r.contents,0);if(!(0,n.isMap)(r.contents))throw new SyntaxError("Expected a YAML mapping");return u}}},8239(e,t,r){t.YamlTemplateElementReader=void 0;const n=r(8979),a=r(797),i=r(2763),s=r(3188),o=r(1395),l=r(7661),c=r(455),d=r(9300),u=r(4646),m=r(1591),p=r(8748),h=r(2099);class f extends d.YamlContainerArtifactReader{knownArtifactType=i.CedarArtifactType.TEMPLATE_ELEMENT;constructor(e,t=!1){super(e,t)}static getStrict(){return new f(o.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new f(o.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new f(e,t)}getElementReader(){return this}readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t,c.ChildDeploymentInfo.empty(),new s.JsonPath)}readFromObject(e,t,r){null===r.getLastComponent()&&f.refuseNullAndEmptySchemaValues(e,r);const n=new m.YamlArtifactParsingResult,i=l.TemplateElement.buildEmptyWithNullValues();return this.assertSchemaMetadata(e,r),null===r.getLastComponent()&&p.ReaderUtil.getIdentifier(e,h.YamlKeys.id),this.readNonReportableAttributes(i,e),(0,a.applySchemaReaderDefaults)(i,e,r,"yaml"),this.readAnnotations(i,e,n,r),super.readAndValidateChildrenInfo(i,e,n,r),new u.YamlTemplateElementReaderResult(i,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t);const r=t[h.YamlKeys.instanceType];if(null!=r&&"string"!=typeof r&&(!Array.isArray(r)||0===r.length))throw new Error("Instance types must be an IRI or a nonempty array of IRIs");e.instanceTypeSpecifications=Array.isArray(r)?r:"string"==typeof r?[r]:[],e.skos_prefLabel=p.ReaderUtil.getString(t,h.YamlKeys.prefLabel),e.skos_altLabel=f.readAltLabels(t),e.header=p.ReaderUtil.getString(t,h.YamlKeys.header),e.footer=p.ReaderUtil.getString(t,h.YamlKeys.footer)}}t.YamlTemplateElementReader=f},4646(e,t){t.YamlTemplateElementReaderResult=void 0,t.YamlTemplateElementReaderResult=class{_element;_parsingResult;_elementSourceObject;constructor(e,t,r){this._element=e,this._parsingResult=t,this._elementSourceObject=r}get element(){return this._element}get parsingResult(){return this._parsingResult}get elementSourceObject(){return this._elementSourceObject}}},2999(e,t,r){t.YamlTemplateFieldReader=void 0;const n=r(8979),a=r(797),i=r(3188),s=r(8748),o=r(2763),l=r(3054),c=r(1790),d=r(455),u=r(6575),m=r(1395),p=r(2099),h=r(9499),f=r(1268),y=r(3168),T=r(384),g=r(1872),E=r(529),C=r(4568),I=r(8568),A=r(3980),b=r(7941),v=r(1404),S=r(7089),R=r(4329),w=r(7268),N=r(2709),_=r(7124),L=r(4284),V=r(9299),O=r(1591),F=r(6651),x=r(7123),M=r(5075),D=r(7709),P=r(6089),U=r(8543),Y=r(5907),J=r(6731),B=r(6591);class k extends u.YamlAbstractArtifactReader{knownArtifactType=o.CedarArtifactType.TEMPLATE_FIELD;constructor(e,t=!1){super(e,t)}static getStrict(){return new k(m.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new k(m.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new k(e,t)}static readerMap=new Map([[h.YamlArtifactType.TEXTFIELD,new f.YamlFieldReaderTextField],[h.YamlArtifactType.TEXTAREA,new y.YamlFieldReaderTextArea],[h.YamlArtifactType.CONTROLLED_TERM,new V.YamlFieldReaderControlledTerm],[h.YamlArtifactType.LINK,new I.YamlFieldReaderLink],[h.YamlArtifactType.EXT_ROR,new F.YamlFieldReaderExtRor],[h.YamlArtifactType.EXT_ORCID,new x.YamlFieldReaderExtOrcid],[h.YamlArtifactType.EXT_PFAS,new M.YamlFieldReaderExtPfas],[h.YamlArtifactType.EXT_PUBMED,new D.YamlFieldReaderExtPubmed],[h.YamlArtifactType.EXT_RRID,new P.YamlFieldReaderExtRrid],[h.YamlArtifactType.EXT_NIH_GRANT_ID,new U.YamlFieldReaderExtNihGrantId],[h.YamlArtifactType.EXT_DOI,new Y.YamlFieldReaderExtDoi],[h.YamlArtifactType.TEMPORAL,new T.YamlFieldReaderTemporal],[h.YamlArtifactType.EMAIL,new l.YamlFieldReaderEmail],[h.YamlArtifactType.NUMERIC,new g.YamlFieldReaderNumeric],[h.YamlArtifactType.PHONE_NUMBER,new R.YamlFieldReaderPhoneNumber],[h.YamlArtifactType.RADIO,new L.YamlFieldReaderRadio],[h.YamlArtifactType.CHECKBOX,new w.YamlFieldReaderCheckbox],[h.YamlArtifactType.SINGLE_SELECT_LIST,new N.YamlFieldReaderSingleSelectList],[h.YamlArtifactType.MULTI_SELECT_LIST,new _.YamlFieldReaderMultiSelectList],[h.YamlArtifactType.ATTRIBUTE_VALUE,new E.YamlFieldReaderAttributeValue],[h.YamlArtifactType.PAGE_BREAK,new C.YamlFieldReaderPageBreak],[h.YamlArtifactType.SECTION_BREAK,new A.YamlFieldReaderSectionBreak],[h.YamlArtifactType.IMAGE,new b.YamlFieldReaderImage],[h.YamlArtifactType.RICH_TEXT,new v.YamlFieldReaderRichText],[h.YamlArtifactType.YOUTUBE,new S.YamlFieldReaderYoutube]]);readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t,d.ChildDeploymentInfo.empty(),new i.JsonPath)}readFromObject(e,t,r){null===r.getLastComponent()&&k.refuseNullAndEmptySchemaValues(e,r);const n=new O.YamlArtifactParsingResult,i=k.readFieldSpecificAttributes(e,t,n,r);return this.assertSchemaMetadata(e,r),null===r.getLastComponent()&&s.ReaderUtil.getIdentifier(e,p.YamlKeys.id),this.readNonReportableAttributes(i,e),(0,a.applySchemaReaderDefaults)(i,e,r,"yaml"),this.readAnnotations(i,e,n,r),new c.YamlTemplateFieldReaderResult(i,n,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.skos_prefLabel=s.ReaderUtil.getString(t,p.YamlKeys.prefLabel),e.skos_altLabel=k.readAltLabels(t),(e instanceof J.ControlledTermFieldImpl||e instanceof B.TextFieldImpl)&&(e.valueRecommendationEnabled=s.ReaderUtil.getBoolean(t,p.YamlKeys.valueRecommendation));const r=s.ReaderUtil.getNode(t,p.YamlKeys.configuration);e.hidden=k.readFlag(r,t,p.YamlKeys.hidden),e.requiredValue=k.readFlag(r,t,p.YamlKeys.required),e.recommendedValue=k.readFlag(r,t,p.YamlKeys.recommended),e.continuePreviousLine=k.readFlag(r,t,p.YamlKeys.continuePreviousLine)}static readFlag(e,t,r){return s.ReaderUtil.getBoolean(e,r)||s.ReaderUtil.getBoolean(t,r)}static readFieldSpecificAttributes(e,t,r,n){const a=h.YamlArtifactType.forValue(s.ReaderUtil.getString(e,p.YamlKeys.type));if(a.isField()){const i=this.readerMap.get(a);if(!i)throw new Error(`No reader defined for dynamic input type "${a.getValue()}"`);const s=i.read(e,t,r,n);let l=o.CedarArtifactType.NULL;return a.isStaticField()?l=o.CedarArtifactType.STATIC_TEMPLATE_FIELD:a.isDynamicField()&&(l=o.CedarArtifactType.TEMPLATE_FIELD),s.cedarArtifactType=l,s}throw new Error(`Unknown field type "${s.ReaderUtil.getString(e,p.YamlKeys.type)}" at ${n.toString()}`)}}t.YamlTemplateFieldReader=k},1790(e,t){t.YamlTemplateFieldReaderResult=void 0,t.YamlTemplateFieldReaderResult=class{_field;_parsingResult;_fieldSourceObject;constructor(e,t,r){this._field=e,this._parsingResult=t,this._fieldSourceObject=r}get field(){return this._field}get parsingResult(){return this._parsingResult}get fieldSourceObject(){return this._fieldSourceObject}}},5675(e,t,r){t.YamlTemplateFieldTypeSpecificReader=void 0;const n=r(855),a=r(8748),i=r(2099),s=r(4081),o=r(6145);t.YamlTemplateFieldTypeSpecificReader=class{read(e,t,r,a){return n.UnknownTemplateField.build()}static readAndStoreListValueConstraints(e,t){t.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default);const r=a.ReaderUtil.getNodeList(e,i.YamlKeys.values);null!==r&&r.forEach(e=>{const r=a.ReaderUtil.getString(e,i.YamlKeys.label),n=a.ReaderUtil.getBoolean(e,i.YamlKeys.selected),o=Object.hasOwn(e,i.YamlKeys.selected);if(null!=r){const e=new s.ListOption(r,n,o);t.valueConstraints.literals.push(e)}})}}},9946(e,t,r){t.YamlTemplateInstanceReader=void 0;const n=r(2500),a=r(8979),i=r(2108),s=r(5588),o=r(1625),l=r(9167),c=r(8534),d=r(1395),u=r(6575),m=r(2234),p=r(9857),h=r(1591),f=r(2099),y=r(8748),T=r(2272),g=r(147),E=r(7723),C=r(5222),I=r(4877),A=r(7571),b=r(8193),v=r(4465),S=r(9327),R=r(4033),w=r(2888),N=r(6109),_=r(3188),L=r(9499),V=[f.YamlKeys.label,f.YamlKeys.notation,f.YamlKeys.prefLabel,f.YamlKeys.language];class O extends u.YamlAbstractArtifactReader{constructor(e,t=!1){super(e,t)}static getStrict(){return new O(d.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new O(d.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new O(e,t)}readFromString(e){const t=a.YamlSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e){const t=new h.YamlArtifactParsingResult,r=T.TemplateInstance.buildEmptyWithNullValues(),n=e??{};if(O.refuseNullAndEmptyValues(n,"",!0),O.assertType(n,L.YamlArtifactType.TEMPLATE_INSTANCE,"A template instance"),r.schema_name=O.readName(n,"","A template instance"),O.assertText(n,f.YamlKeys.description,""),r.schema_description=y.ReaderUtil.getString(n,f.YamlKeys.description)??"",r.descriptionWasAbsent=null===y.ReaderUtil.getString(n,f.YamlKeys.description),r.at_id=c.CedarArtifactId.forValue(y.ReaderUtil.getIdentifier(n,f.YamlKeys.id)),!Object.hasOwn(n,f.YamlKeys.isBasedOn))throw new Error(`No ${f.YamlKeys.isBasedOn} present. A template instance names the template it is based on, as Java requires.`);const a=this.behavior.useWarningForKnownIssues();r.schema_isBasedOn=c.CedarArtifactId.forValue(y.ReaderUtil.getArtifactIdentifier(n,f.YamlKeys.isBasedOn,a)),r.pav_derivedFrom=c.CedarArtifactId.forValue(y.ReaderUtil.getArtifactIdentifier(n,f.YamlKeys.derivedFrom,a)),u.YamlAbstractArtifactReader.refuseEmptyIdentifier(n,f.YamlKeys.createdBy),u.YamlAbstractArtifactReader.refuseEmptyIdentifier(n,f.YamlKeys.modifiedBy),r.pav_createdBy=m.CedarUser.forValue(y.ReaderUtil.getString(n,f.YamlKeys.createdBy)),r.pav_createdOn=p.IsoDate.forValue(y.ReaderUtil.getString(n,f.YamlKeys.createdOn)),r.oslc_modifiedBy=m.CedarUser.forValue(y.ReaderUtil.getString(n,f.YamlKeys.modifiedBy)),r.pav_lastUpdatedOn=p.IsoDate.forValue(y.ReaderUtil.getString(n,f.YamlKeys.modifiedOn)),this.readAnnotations(r,n,t,new _.JsonPath),r.dataContainer=this.parseContainer(n,"",!0);for(const e of R.AttributeValueNamePolicy.findConflicts(r.dataContainer,"template",!0))t.addBlueprintComparisonError(new w.ComparisonError("YamlTemplateInstanceReader",N.YamlComparisonErrorType.VALUE_MISMATCH,new _.JsonPath(...R.AttributeValueNamePolicy.locationOf(e)),"a unique, non-reserved attribute-value name",e.name));return new g.YamlTemplateInstanceReaderResult(r,t,n)}static RESERVED_KEYS=s.ReservedNames.TEMPLATE_INSTANCE_YAML_KEYS;static ELEMENT_RESERVED_KEYS=s.ReservedNames.NESTED_ELEMENT_INSTANCE_YAML_KEYS;parseContainer(e,t,r=!1){const n=new E.InstanceDataContainer;n.types=O.readTypes(e,t);const a=`${t}/${f.YamlKeys.children}`,i=y.ReaderUtil.getNode(e,f.YamlKeys.children);if(!O.isMapping(i))throw new Error(`Expected a mapping of child instances at ${a}.`);Object.keys(i).forEach(e=>{const t=i[e],r=`${a}/${e}`;if(Array.isArray(t)){t.forEach((e,t)=>{if(!O.isMapping(e))throw new Error(`Expected a mapping for the entry of a multi-instance list at ${r}[${t}].`)});const a=t,i=O.isElementEntry(a[0]),s=a.findIndex(e=>O.isElementEntry(e)!==i);if(s>=0)throw new Error(`The repeated child at ${r}[${s}] mixes element and field entries.`);const o=[];n.setValue(e,o),a.forEach((e,t)=>{o[t]=this.parseNode(e,`${r}[${t}]`)})}else{if(!O.isMapping(t))throw new Error(`Expected a mapping or a list for the child instance at ${r}.`);n.setValue(e,this.parseNode(t,r))}}),Object.keys(e).forEach(a=>{if((r?O.RESERVED_KEYS:O.ELEMENT_RESERVED_KEYS).has(a))return;const i=e[a];if(!O.isMapping(i))return;const s=new S.InstanceDataAttributeValueField(a);Object.keys(i).forEach(e=>{s.addValue(e,O.parseAttributeValue(i,e,`${t}/${a}/${e}`))}),n.setValue(a,s)});const s=y.ReaderUtil.getIdentifier(e,f.YamlKeys.id);return null!==s&&(n.id=s),n}static parseAttributeValue(e,t,r){const n=e[t];if(!O.isMapping(n))throw new Error(`Expected a mapping for the attribute-value field at ${r}.`);return O.parseFieldValue(n,r)}static assertFieldValue(e,t){if(Object.hasOwn(e,f.YamlKeys.id)&&Object.hasOwn(e,f.YamlKeys.value))throw new Error("A field cannot contain both id and value.");if(Array.isArray(e[f.YamlKeys.datatype]))throw new Error("A field value can have at most one datatype.");O.assertText(e,f.YamlKeys.datatype,t),y.ReaderUtil.assertIri(y.ReaderUtil.getString(e,f.YamlKeys.datatype),f.YamlKeys.datatype),y.ReaderUtil.assertFieldIri(y.ReaderUtil.getString(e,f.YamlKeys.id),f.YamlKeys.id);const r=e[f.YamlKeys.value],n="string"==typeof r||"number"==typeof r||"boolean"==typeof r||i.ExactDecimal.isExact(r);if(Object.hasOwn(e,f.YamlKeys.value)&&null!==r&&!n)throw new Error(`Expected a string, number or boolean at ${t}/${f.YamlKeys.value}.`);V.forEach(r=>O.assertText(e,r,t))}static readValue(e,t){const r=e[t];return"number"==typeof r||"boolean"==typeof r||i.ExactDecimal.isExact(r)?(0,a.yamlSpelling)(e,t)??String(r):y.ReaderUtil.getString(e,t)}static readTypes(e,t){if(!Object.hasOwn(e,f.YamlKeys.instanceType))return[];const r=e[f.YamlKeys.instanceType],a=Array.isArray(r)?r:[r];if(0===a.length)throw new Error(`Instance types must not be empty at ${t}/${f.YamlKeys.instanceType}.`);return a.map(e=>{if("string"!=typeof e)throw new Error(`An instance type must be an IRI string at ${t}/${f.YamlKeys.instanceType}.`);return n.IdentifierPolicy.assertIdentifier(e,`${t}/${f.YamlKeys.instanceType}`),e})}static isElementEntry(e){return Object.hasOwn(e,f.YamlKeys.children)||"element-instance"===y.ReaderUtil.getString(e,f.YamlKeys.type)}parseNode(e,t){return O.isElementEntry(e)?this.parseContainer(e,t):O.parseFieldValue(e,t)}static parseFieldValue(e,t){const r=O.parseFieldValueWithoutNotation(e,t);return"language"in r&&(r.language=y.ReaderUtil.getString(e,f.YamlKeys.language)),"preferredLabel"in r&&(r.preferredLabel=y.ReaderUtil.getString(e,f.YamlKeys.prefLabel)),!("notation"in r)||r instanceof o.InstanceDataNotationAtom||(r.notation=y.ReaderUtil.getString(e,f.YamlKeys.notation)),r}static parseFieldValueWithoutNotation(e,t){if(O.assertFieldValue(e,t),Object.hasOwn(e,f.YamlKeys.value)){const t=O.readValue(e,f.YamlKeys.value),r=y.ReaderUtil.getString(e,f.YamlKeys.datatype),n=y.ReaderUtil.getString(e,f.YamlKeys.label);return null===r?new C.InstanceDataStringAtom(t,n):new I.InstanceDataTypedAtom(t,r,n)}if(Object.hasOwn(e,f.YamlKeys.id)){const t=y.ReaderUtil.getString(e,f.YamlKeys.id),r=y.ReaderUtil.getString(e,f.YamlKeys.label),n=y.ReaderUtil.getString(e,f.YamlKeys.datatype);return null===r?A.InstanceDataLinkAtom.fromParsedNode(t,n):b.InstanceDataControlledAtom.fromParsedNode(t,r,n)}const r=y.ReaderUtil.getString(e,f.YamlKeys.label);if(null!==r)return new l.InstanceDataLabelAtom(r,y.ReaderUtil.getString(e,f.YamlKeys.datatype));const n=y.ReaderUtil.getString(e,f.YamlKeys.notation);return null!==n?new o.InstanceDataNotationAtom(n,y.ReaderUtil.getString(e,f.YamlKeys.datatype)):new v.InstanceDataEmptyNode}}t.YamlTemplateInstanceReader=O},147(e,t,r){t.YamlTemplateInstanceReaderResult=void 0;const n=r(6532);class a extends n.YamlArtifactReaderResult{constructor(e,t,r){super(e,t,r)}get instance(){return this._artifact}get instanceSourceObject(){return this._artifactSourceObject}}t.YamlTemplateInstanceReaderResult=a},5677(e,t,r){t.YamlTemplateReader=void 0;const n=r(8979),a=r(797),i=r(2763),s=r(8748),o=r(7868),l=r(3188),c=r(1395),d=r(8239),u=r(3281),m=r(9300),p=r(2099),h=r(1591);class f extends m.YamlContainerArtifactReader{elementReader;knownArtifactType=i.CedarArtifactType.TEMPLATE;constructor(e,t=!1){super(e,t),this.elementReader=d.YamlTemplateElementReader.getForBehavior(e,t)}static getStrict(){return new f(c.YamlReaderBehavior.STRICT)}static getStrictForCompact(){return new f(c.YamlReaderBehavior.STRICT,!0)}static getForBehavior(e,t=!1){return new f(e,t)}getElementReader(){return this.elementReader}readFromString(e){const t=n.YamlSourcePolicy.parse(e);return this.readFromObject(t)}readFromObject(e,t=new l.JsonPath){f.refuseNullAndEmptySchemaValues(e,t);const r=new h.YamlArtifactParsingResult,n=u.Template.buildEmptyWithNullValues();return this.assertSchemaMetadata(e,t),s.ReaderUtil.getIdentifier(e,p.YamlKeys.id),this.readNonReportableAttributes(n,e),(0,a.applySchemaReaderDefaults)(n,e,t,"yaml"),this.readAnnotations(n,e,r,t),this.readInstanceTypeSpecification(n,e,r),this.readAndValidateChildrenInfo(n,e,r,t),new o.YamlTemplateReaderResult(n,r,e)}readNonReportableAttributes(e,t){super.readNonReportableAttributes(e,t),e.header=s.ReaderUtil.getString(t,p.YamlKeys.header),e.footer=s.ReaderUtil.getString(t,p.YamlKeys.footer)}readInstanceTypeSpecification(e,t,r){const n=t[p.YamlKeys.instanceType];if(null!=n&&"string"!=typeof n&&(!Array.isArray(n)||0===n.length))throw new Error("Instance types must be an IRI or a nonempty array of IRIs");e.instanceTypeSpecifications=Array.isArray(n)?n:"string"==typeof n?[n]:[]}}t.YamlTemplateReader=f},7868(e,t){t.YamlTemplateReaderResult=void 0,t.YamlTemplateReaderResult=class{_template;_parsingResult;_templateSourceObject;constructor(e,t,r){this._template=e,this._parsingResult=t,this._templateSourceObject=r}get template(){return this._template}get parsingResult(){return this._parsingResult}get templateSourceObject(){return this._templateSourceObject}}},1888(e,t,r){t.RoundTrip=void 0;const n=r(5904),a=r(6396),i=r(2748),s=r(4036),o=r(3056),l=r(455),c=r(3188),d=r(7954),u=r(7519),m=r(4948),p=r(6645),h=r(2022);t.RoundTrip=class{static compare(e,t){if(e instanceof a.JsonTemplateFieldReaderResult&&t instanceof i.JsonTemplateFieldWriterInternal)return this.compareField(e,t);if(e instanceof m.JsonTemplateElementReaderResult&&t instanceof p.JsonTemplateElementWriter)return this.compareElement(e,t);if(e instanceof d.JsonTemplateReaderResult&&t instanceof u.JsonTemplateWriter)return this.compareTemplate(e,t);if("string"==typeof e&&"string"==typeof t)return this.compareString(e,t);throw new Error("Invalid argument types for compare method")}static compareField(e,t){const r=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.fieldSourceObject,t.getAsJsonNode(e.field,l.ChildDeploymentInfo.empty()),new c.JsonPath,t.getBehavior()),r}static compareElement(e,t){const r=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.elementSourceObject,t.getAsJsonNode(e.element),new c.JsonPath,t.getBehavior()),r}static compareTemplate(e,t){const r=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(r,e.templateSourceObject,t.getAsJsonNode(e.template),new c.JsonPath,t.getBehavior()),r}static compareString(e,t){const r=n.JsonSourcePolicy.parse(e),a=n.JsonSourcePolicy.parse(t),i=new s.JsonArtifactParsingResult;return o.JsonObjectComparator.compareBothWays(i,r,a,new c.JsonPath,h.JsonWriterBehavior.STRICT),i}}},2112(e,t){t.AbstractArtifactWriter=void 0,t.AbstractArtifactWriter=class{constructor(){}}},8810(e,t,r){t.CedarWriters=void 0;const n=r(9607),a=r(5359);t.CedarWriters=class{static json(){return n.CedarJsonWriters}static yaml(){return a.CedarYamlWriters}}},5692(e,t,r){t.WriterUtil=void 0;const n=r(8878),a=r(3812);class i{static XSD_NAMESPACE="http://www.w3.org/2001/XMLSchema#";static writtenDatatype(e){return e.startsWith(i.XSD_NAMESPACE)&&e.length>i.XSD_NAMESPACE.length?"xsd:"+e.substring(i.XSD_NAMESPACE.length):e}static getMultiMinMax(e,t){let r=null,i=null,s=!1;return e.isMultiInstanceByDefinition()?t instanceof n.ChildDeploymentInfoAlwaysMultiple&&(s=!0,r=t.minItems,i=t.maxItems):e.isSingleInstanceByDefinition()?s=!1:(s=t.isMultiInAnyWay(),s&&t instanceof a.AbstractDynamicChildDeploymentInfo&&(r=t.minItems,i=t.maxItems)),{isMultiInstance:s,minItems:r,maxItems:i}}}t.WriterUtil=i},9607(e,t,r){t.CedarJsonWriters=void 0;const n=r(2022),a=r(4872),i=r(7519),s=r(4869),o=r(7501),l=r(3691),c=r(4841),d=r(5459),u=r(8970),m=r(2347),p=r(41),h=r(6029),f=r(6766),y=r(9309),T=r(8663),g=r(7335),E=r(275),C=r(6876),I=r(9031),A=r(9129),b=r(1442),v=r(8280),S=r(8354),R=r(5996),w=r(2418),N=r(9222),_=r(9184),L=r(7054),V=r(2395),O=r(2813),F=r(6645),x=r(2981),M=r(7432),D=r(8014),P=r(3281),U=r(7661),Y=r(6320),J=r(7584),B=r(8096),k=r(6122),K=r(3312),j=r(4780),W=r(5250),$=r(7412);class q{behavior;jsonDynamicFieldWriters;jsonStaticFieldWriters;jsonValueConstraintsWriters;jsonAtomicWriter;jsonAnnotationsWriter;jsonTemplateWriter;jsonTemplateElementWriter;jsonTemplateInstanceWriter;constructor(e){this.behavior=e,this.jsonAtomicWriter=new a.JsonAtomicWriter(e),this.jsonAnnotationsWriter=new x.JsonAnnotationsWriter(e),this.jsonTemplateWriter=i.JsonTemplateWriter.getFor(e,this),this.jsonTemplateElementWriter=F.JsonTemplateElementWriter.getFor(e,this),this.jsonTemplateInstanceWriter=Y.JsonTemplateInstanceWriter.getFor(e,this),this.jsonDynamicFieldWriters=new Map([[s.CedarFieldType.TEXT,new o.JsonFieldWriterTextField(e,this)],[s.CedarFieldType.TEXTAREA,new E.JsonFieldWriterTextArea(e,this)],[s.CedarFieldType.CONTROLLED_TERM,new v.JsonFieldWriterControlledTerm(e,this)],[s.CedarFieldType.PHONE_NUMBER,new C.JsonFieldWriterPhoneNumber(e,this)],[s.CedarFieldType.EMAIL,new I.JsonFieldWriterEmail(e,this)],[s.CedarFieldType.LINK,new l.JsonFieldWriterLink(e,this)],[s.CedarFieldType.EXT_ROR,new J.JsonFieldWriterExtRor(e,this)],[s.CedarFieldType.EXT_ORCID,new B.JsonFieldWriterExtOrcid(e,this)],[s.CedarFieldType.EXT_PFAS,new k.JsonFieldWriterExtPfas(e,this)],[s.CedarFieldType.EXT_PUBMED,new K.JsonFieldWriterExtPubmed(e,this)],[s.CedarFieldType.EXT_RRID,new j.JsonFieldWriterExtRrid(e,this)],[s.CedarFieldType.EXT_NIH_GRANT_ID,new W.JsonFieldWriterExtNihGrantId(e,this)],[s.CedarFieldType.EXT_DOI,new $.JsonFieldWriterExtDoi(e,this)],[s.CedarFieldType.NUMERIC,new c.JsonFieldWriterNumeric(e,this)],[s.CedarFieldType.TEMPORAL,new d.JsonFieldWriterTemporal(e,this)],[s.CedarFieldType.RADIO,new y.JsonFieldWriterRadio(e,this)],[s.CedarFieldType.CHECKBOX,new T.JsonFieldWriterCheckbox(e,this)],[s.CedarFieldType.SINGLE_SELECT_LIST,new g.JsonFieldWriterList(e,this)],[s.CedarFieldType.MULTIPLE_SELECT_LIST,new g.JsonFieldWriterList(e,this)],[s.CedarFieldType.ATTRIBUTE_VALUE,new b.JsonFieldWriterAttributeValue(e,this)]]),this.jsonStaticFieldWriters=new Map([[s.CedarFieldType.STATIC_PAGE_BREAK,new m.JsonFieldWriterStaticPageBreak(e,this)],[s.CedarFieldType.STATIC_SECTION_BREAK,new p.JsonFieldWriterStaticSectionsBreak(e,this)],[s.CedarFieldType.STATIC_IMAGE,new u.JsonFieldWriterStaticImage(e,this)],[s.CedarFieldType.STATIC_RICH_TEXT,new h.JsonFieldWriterStaticRichText(e,this)],[s.CedarFieldType.STATIC_YOUTUBE,new f.JsonFieldWriterStaticYoutube(e,this)]]),this.jsonValueConstraintsWriters=new Map([[S.ControlledTermOntology.className,new R.JsonValueConstraintsOntologyWriter(e,this)],[w.ControlledTermClass.className,new N.JsonValueConstraintsClassWriter(e,this)],[_.ControlledTermBranch.className,new L.JsonValueConstraintsBranchWriter(e,this)],[V.ControlledTermValueSet.className,new O.JsonValueConstraintsValueSetWriter(e,this)],[M.ControlledTermAction.className,new D.JsonValueConstraintsActionWriter(e,this)]])}static getStrict(){return new q(n.JsonWriterBehavior.STRICT)}static getFebruary2024(){return new q(n.JsonWriterBehavior.FEBRUARY_2024)}static getFor(e){return new q(e)}getTemplateWriter(){return this.jsonTemplateWriter}getTemplateElementWriter(){return this.jsonTemplateElementWriter}getTemplateInstanceWriter(){return this.jsonTemplateInstanceWriter}getAtomicWriter(){return this.jsonAtomicWriter}getFieldWriterForType(e){let t;if(t=e.isStaticField?this.jsonStaticFieldWriters.get(e):this.jsonDynamicFieldWriters.get(e),t)return t;throw new Error(`No JSON writer found for field type: ${e.getValue()}`)}getWriterForValueConstraint(e){const t=e.className,r=this.jsonValueConstraintsWriters.get(t);if(r)return r;throw new Error(`No JSON writer found for class type: ${t}`)}getFieldWriterForField(e){return this.getFieldWriterForType(e.cedarFieldType)}getAnnotationsWriter(){return this.jsonAnnotationsWriter}getWriterForArtifact(e){if(e instanceof P.Template)return i.JsonTemplateWriter.getFor(this.behavior,this);if(e instanceof U.TemplateElement)return F.JsonTemplateElementWriter.getFor(this.behavior,this);if(e instanceof A.TemplateField)return this.getFieldWriterForType(e.cedarFieldType);throw new Error(`No JSON reader available for CedarArtifact: ${e}`)}}t.CedarJsonWriters=q},3161(e,t,r){t.JsonAbstractArtifactWriter=void 0;const n=r(2112),a=r(9517),i=r(2733),s=r(3910),o=r(1027),l=r(936),c=r(8534);class d extends n.AbstractArtifactWriter{behavior;writers;atomicWriter;annotationsWriter;constructor(e,t){super(),this.behavior=e,this.writers=t,this.atomicWriter=t.getAtomicWriter(),this.annotationsWriter=t.getAnnotationsWriter()}getBehavior(){return this.behavior}macroSchemaNameAndDescription(e){return{[i.JsonSchema.schemaName]:e.schema_name,[i.JsonSchema.schemaDescription]:e.schema_description}}macroProvenance(e,t){return{[i.JsonSchema.pavCreatedOn]:t.write(e.pav_createdOn),[i.JsonSchema.pavCreatedBy]:t.write(e.pav_createdBy),[i.JsonSchema.pavLastUpdatedOn]:t.write(e.pav_lastUpdatedOn),[i.JsonSchema.oslcModifiedBy]:t.write(e.oslc_modifiedBy)}}macroStatusAndVersion(e,t){const r=a.JsonNode.getEmpty();return e.pav_version!==o.PavVersion.NULL&&(r[i.JsonSchema.pavVersion]=t.write(e.pav_version)),e.bibo_status!==s.BiboStatus.NULL&&(r[i.JsonSchema.biboStatus]=t.write(e.bibo_status)),r}macroSkos(e){const t=a.JsonNode.getEmpty();return null!==e.skos_prefLabel&&(t[l.CedarModel.skosPrefLabel]=e.skos_prefLabel),null!==e.skos_altLabel&&e.skos_altLabel.length>0&&(t[l.CedarModel.skosAltLabel]=e.skos_altLabel),t}macroDerivedFrom(e){const t=a.JsonNode.getEmpty();return e.pav_derivedFrom!==c.CedarArtifactId.NULL&&(t[i.JsonSchema.pavDerivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),t}macroIsBasedOn(e){const t=a.JsonNode.getEmpty();return e.schema_isBasedOn!==c.CedarArtifactId.NULL&&(t[i.JsonSchema.schemaIsBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e){const t=a.JsonNode.getEmpty();return e.pav_previousVersion!==c.CedarArtifactId.NULL&&(t[i.JsonSchema.pavPreviousVersion]=this.atomicWriter.write(e.pav_previousVersion)),t}macroSchemaIdentifier(e){const t=a.JsonNode.getEmpty();return null!==e.schema_identifier&&""!==e.schema_identifier&&(t[i.JsonSchema.schemaIdentifier]=e.schema_identifier),t}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}}t.JsonAbstractArtifactWriter=d},8872(e,t,r){t.JsonAbstractContainerArtifactWriter=void 0;const n=r(8198),a=r(3161),i=r(6968),s=r(9517),o=r(9129),l=r(2733),c=r(936),d=r(5692),u=r(513),m=r(8748),p=r(7752);class h extends a.JsonAbstractArtifactWriter{macroContext(e){if(e.language===p.Language.NULL)return i.JsonContainerArtifactContent.CONTEXT_VERBATIM;const t=m.ReaderUtil.deepClone(i.JsonContainerArtifactContent.CONTEXT_VERBATIM);return t[l.JsonSchema.atLanguage]=this.atomicWriter.write(e.language),t}getChildMapAsJson(e){const t=s.JsonNode.getEmpty();return e.getChildrenInfo().getChildrenNames().forEach(r=>{const a=e.getChild(r);if(null!=a){let i=s.JsonNode.getEmpty();const m=e.getChildrenInfo().get(r);if(null!==m&&(i=a instanceof o.TemplateField?this.writers.getFieldWriterForType(a.cedarFieldType).getAsJsonNode(a,m):this.writers.getTemplateElementWriter().getAsJsonNode(a)),null!==m){const{isMultiInstance:e,minItems:o,maxItems:p}=d.WriterUtil.getMultiMinMax(a,m);let h=o;const f=p;if(e){null===h&&(h=u.AbstractChildDeploymentInfo.defaultMinItems);const e=s.JsonNode.getEmpty();e[c.CedarModel.minItems]=h,null!==f&&f!==n.UNBOUNDED_MAX_ITEMS&&(e[c.CedarModel.maxItems]=f),i={[l.JsonSchema.type]:"array",...e,[l.JsonSchema.items]:i}}t[r]=i}}}),t}expandInstanceTypeSpecification(e,t){if(e.instanceTypeSpecifications.length>0){const r=m.ReaderUtil.getNode(t,l.JsonSchema.atType);m.ReaderUtil.getNodeList(r,l.JsonSchema.oneOf).forEach(t=>{const r=m.ReaderUtil.getString(t,l.JsonSchema.type);"string"==r?t[l.JsonSchema.enum]=[...e.instanceTypeSpecifications]:"array"==r&&(m.ReaderUtil.getNode(t,l.JsonSchema.items)[l.JsonSchema.enum]=[...e.instanceTypeSpecifications])})}}}t.JsonAbstractContainerArtifactWriter=h},2981(e,t,r){t.JsonAnnotationsWriter=void 0;const n=r(9517),a=r(936),i=r(2787),s=r(2733),o=r(3549);class l{behavior;constructor(e){this.behavior=e}write(e){const t=n.JsonNode.getEmpty(),r=l.annotationsNode(e);return null!==r&&(t[a.CedarModel.annotations]=r),t}static annotationsNode(e){if(null===e||0===e.getSize())return null;const t=n.JsonNode.getEmpty();return e.getAnnotationNames().forEach(r=>{const n=e.get(r);n instanceof i.AnnotationAtId?t[r]={[s.JsonSchema.atId]:n.getAtId()}:n instanceof o.AnnotationAtValue&&(t[r]={[s.JsonSchema.atValue]:n.getAtValue()})}),t}}t.JsonAnnotationsWriter=l},4872(e,t,r){t.JsonAtomicWriter=void 0;const n=r(8534),a=r(2763),i=r(5793),s=r(9857),o=r(2234),l=r(3910),c=r(1027),d=r(2475),u=r(8557),m=r(3447),p=r(8588),h=r(7974),f=r(3764),y=r(9034),T=r(3746),g=r(9932),E=r(8802),C=r(4531),I=r(7752);t.JsonAtomicWriter=class{behavior;constructor(e){this.behavior=e}write(e){if(null==e)return null;if(e instanceof n.CedarArtifactId)return this.writeCedarArtifactId(e);if(e instanceof a.CedarArtifactType)return this.writeCedarArtifactType(e);if(e instanceof i.JavascriptType)return this.writeJavascriptType(e);if(e instanceof s.IsoDate)return this.writeCedarDate(e);if(e instanceof o.CedarUser)return this.writeCedarUser(e);if(e instanceof l.BiboStatus)return this.writeBiboStatusJson(e);if(e instanceof c.PavVersion)return this.writePavVersion(e);if(e instanceof d.ArtifactSchema)return this.writeCedarSchema(e);if(e instanceof u.SchemaVersion)return this.writeSchemaVersion(e);if(e instanceof m.NumberType)return this.writeNumberType(e);if(e instanceof p.TemporalType)return this.writeTemporalType(e);if(e instanceof h.TemporalGranularity)return this.writeTemporalGranularity(e);if(e instanceof f.TimeFormat)return this.writeTimeFormat(e);if(e instanceof y.UiInputType)return this.writeUiInputType(e);if(e instanceof T.AdditionalProperties)return this.writeAdditionalProperties(e);if(e instanceof E.Iri)return this.writeURI(e);if(e instanceof C.BioportalTermType)return this.writeBioportalTermTypeJson(e);if(e instanceof I.Language)return this.writeLanguage(e);throw new Error("Unsupported type")}writeCedarArtifactId(e){return e.getValue()}writeCedarArtifactType(e){return e.getValue()}writeJavascriptType(e){return e.getValue()}writeCedarDate(e){return e.getValue()}writeCedarUser(e){return e.getValue()}writeBiboStatusJson(e){return e.getJsonValue()}writePavVersion(e){return e.getValue()}writeCedarSchema(e){return e.getValue()}writeSchemaVersion(e){return null!==e.getValue()?e.getValue():u.SchemaVersion.CURRENT.getValue()}writeNumberType(e){return e.getValue()}writeTemporalType(e){return e.getValue()}writeTemporalGranularity(e){return e.getValue()}writeTimeFormat(e){return e.getValue()}writeUiInputType(e){return e.getValue()}writeAdditionalProperties(e){return e!==T.AdditionalProperties.FALSE&&(e===T.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE?g.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE:null)}writeURI(e){return e.getValue()}writeBioportalTermTypeJson(e){return e.getJsonValue()}writeLanguage(e){return e.getValue()}}},6645(e,t,r){t.JsonTemplateElementWriter=void 0;const n=r(8972),a=r(8557),i=r(8748),s=r(2733),o=r(936),l=r(2763),c=r(5793),d=r(5747),u=r(2475),m=r(9932),p=r(1501),h=r(8872);class f extends h.JsonAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new f(e,t)}buildProperties(e){const t=i.ReaderUtil.deepClone(p.JsonTemplateElementContent.PROPERTIES_PARTIAL),r=e.getChildrenInfo().getIRIMap();t[s.JsonSchema.atContext][s.JsonSchema.properties]={...t[s.JsonSchema.atContext][s.JsonSchema.properties],...r};const n=e.getChildrenInfo().getChildNamesWithIri();n.length>0?t[s.JsonSchema.atContext][s.JsonSchema.required]=[...t[s.JsonSchema.atContext][s.JsonSchema.required],...n]:i.ReaderUtil.deleteNodeKey(t[s.JsonSchema.atContext],s.JsonSchema.required),e.getChildrenInfo().hasAttributeValue()&&(t[s.JsonSchema.atContext][d.TemplateProperty.additionalProperties]=m.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const a={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,a),a}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e),t)}getAsJsonNode(e){const t=this.buildProperties(e),r={[o.CedarModel.order]:e.getChildrenInfo().getChildrenNames(),[o.CedarModel.propertyLabels]:e.getChildrenInfo().getPropertyLabelMap(e),[o.CedarModel.propertyDescriptions]:e.getChildrenInfo().getPropertyDescriptionMap(e)};return null!==e.header&&(r[o.CedarModel.header]=e.header),null!==e.footer&&(r[o.CedarModel.footer]=e.footer),e.extensions.applyJson({[s.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[s.JsonSchema.atType]:this.atomicWriter.write(l.CedarArtifactType.TEMPLATE_ELEMENT),[s.JsonSchema.atContext]:this.macroContext(e),[o.CedarModel.type]:this.atomicWriter.write(c.JavascriptType.OBJECT),[d.TemplateProperty.title]:e.title,[d.TemplateProperty.description]:e.description,[o.CedarModel.ui]:r,[s.JsonSchema.properties]:t,[s.JsonSchema.required]:[...p.JsonTemplateElementContent.REQUIRED_PARTIAL,...e.getChildrenInfo().getChildrenNamesForRequired()],...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[s.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),[d.TemplateProperty.additionalProperties]:this.atomicWriter.write(e.getAdditionalProperties()),...this.macroSchemaIdentifier(e),[o.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}}t.JsonTemplateElementWriter=f},2748(e,t,r){t.JsonTemplateFieldWriterInternal=void 0;const n=r(8972),a=r(8557),i=r(9517),s=r(936),o=r(2733),l=r(9932),c=r(5793),d=r(5747),u=r(2475),m=r(3161),p=r(3746),h=r(455),f=r(3812),y=r(9519),T=r(6731),g=r(6591),E=r(7752),C=r(8748);class I extends m.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[o.JsonSchema.properties]=l.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL,this.behavior.usePropertiesAtLanguage()||(e[o.JsonSchema.properties]=l.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE)}expandRequiredNode(e){e[o.JsonSchema.required]=[o.JsonSchema.atValue]}expandUINode(e,t,r){r instanceof f.AbstractDynamicChildDeploymentInfo&&(r.hidden&&(e[s.CedarModel.Ui.hidden]=r.hidden),r instanceof y.AbstractFieldChildDeploymentInfo&&(r.continuePreviousLine&&(e[s.CedarModel.Ui.continuePreviousLine]=r.continuePreviousLine),r.valueRecommendationEnabled&&t.supportsValueRecommendation()&&(e[s.CedarModel.Ui.valueRecommendationEnabled]=r.valueRecommendationEnabled))),void 0===e[s.CedarModel.Ui.hidden]&&t.hidden&&(e[s.CedarModel.Ui.hidden]=!0),void 0===e[s.CedarModel.Ui.continuePreviousLine]&&t.continuePreviousLine&&(e[s.CedarModel.Ui.continuePreviousLine]=!0),void 0===e[s.CedarModel.Ui.valueRecommendationEnabled]&&(t instanceof T.ControlledTermFieldImpl||t instanceof g.TextFieldImpl)&&t.valueRecommendationEnabled&&(e[s.CedarModel.Ui.valueRecommendationEnabled]=!0)}buildUIObject(e,t){const r={[s.CedarModel.inputType]:this.atomicWriter.write(e.cedarFieldType.getUiInputType())},n={[s.CedarModel.ui]:r};return this.expandUINode(r,e,t),n}expandTypeNode(e,t){}expandValueConstraintsNode(e,t,r){r instanceof f.AbstractDynamicChildDeploymentInfo&&(e[s.CedarModel.requiredValue]=r.requiredValue),!e[s.CedarModel.requiredValue]&&t.requiredValue&&(e[s.CedarModel.requiredValue]=!0),r instanceof f.AbstractDynamicChildDeploymentInfo&&r.recommendedValue&&(e[s.CedarModel.ValueConstraints.recommendedValue]=r.recommendedValue),!e[s.CedarModel.ValueConstraints.recommendedValue]&&t.recommendedValue&&(e[s.CedarModel.ValueConstraints.recommendedValue]=!0)}buildValueConstraintsObject(e,t){const r=i.JsonNode.getEmpty(),n={[s.CedarModel.valueConstraints]:r};return this.expandValueConstraintsNode(r,e,t),n}expandLiterals(e,t){const r=i.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=i.JsonNode.getEmpty();t[s.CedarModel.label]=e.label,(e.statesSelectedByDefault||e.selectedByDefault)&&(t[s.CedarModel.selectedByDefault]=e.selectedByDefault),r.push(t)}),r.length>0&&(t[s.CedarModel.literals]=r)}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e,h.ChildDeploymentInfo.standalone()),t)}getAsJsonNode(e,t=h.ChildDeploymentInfo.standalone()){const r=i.JsonNode.getEmpty();this.expandPropertiesNode(r);const n=i.JsonNode.getEmpty();this.expandRequiredNode(n);const l=this.buildUIObject(e,t),m=this.buildValueConstraintsObject(e,t),f={[s.CedarModel.type]:this.atomicWriter.write(c.JavascriptType.OBJECT)};return this.expandTypeNode(f,e),e.extensions.applyJson({[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[o.JsonSchema.atType]:this.atomicWriter.write(e.cedarArtifactType),[o.JsonSchema.atContext]:this.macroContext(e),...f,[d.TemplateProperty.title]:e.title,[d.TemplateProperty.description]:e.description,...l,...m,...r,...n,...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[o.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),[d.TemplateProperty.additionalProperties]:this.atomicWriter.write(p.AdditionalProperties.FALSE),...this.macroSchemaIdentifier(e),[s.CedarModel.schema]:this.atomicWriter.write(u.ArtifactSchema.CURRENT)})}macroContext(e){const t=C.ReaderUtil.deepClone(l.JsonTemplateFieldContentDynamic.CONTEXT_VERBATIM);return e.language!==E.Language.NULL&&(t[o.JsonSchema.atLanguage]=this.atomicWriter.write(e.language)),t}}t.JsonTemplateFieldWriterInternal=I},6320(e,t,r){t.JsonTemplateInstanceWriter=void 0;const n=r(3992),a=r(9868),i=r(1625),s=r(9167),o=r(8748),l=r(2733),c=r(936),d=r(9517),u=r(3161),m=r(350),p=r(7723),h=r(5222),f=r(4877),y=r(9327),T=r(3644),g=r(8193),E=r(7571),C=r(7548),I=r(4465),A=r(4033),b=r(5692),v=r(8534);class S extends u.JsonAbstractArtifactWriter{constructor(e,t){super(e,t)}macroContext(e){return m.JsonTemplateInstanceContent.CONTEXT_VERBATIM}static getFor(e,t){return new S(e,t)}static writeTypes(e){const t=e.types;return 0===t.length?d.JsonNode.getEmpty():{[l.JsonSchema.atType]:1===t.length?t[0]:[...t]}}buildContext(e){const t=o.ReaderUtil.deepClone(m.JsonTemplateInstanceContent.CONTEXT_VERBATIM);return Object.keys(e.dataContainer.iris).forEach(r=>{t[r]=e.dataContainer.iris[r]}),{...t}}getDataTree(e){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,t,!0),t}serializeDataLevelInto(e,t,r=!1){r||(t[l.JsonSchema.atId]=""===e.id?null:e.id,Object.assign(t,S.writeTypes(e))),Object.keys(e.values).forEach(r=>{const a=e.values[r];if(Array.isArray(a)){const e=d.JsonNode.getEmptyList();t[r]=e,a.forEach((t,r)=>{if(t instanceof T.InstanceDataAttributeValueFieldName){const r=t.name;return void(n.TextPolicy.isBlank(r)||e.push(r))}const a=this.serializeCommonType(t);null!==a&&e.push(a)})}else{const e=this.serializeCommonType(a);if(null!==e&&(t[r]=e),a instanceof y.InstanceDataAttributeValueField){const e=[];Object.keys(a.values).forEach(t=>{e.push(t)}),t[r]=e}}}),this.serializeAttributeValueFields(e,t);const a=d.JsonNode.getEmpty();Object.keys(e.iris).forEach(t=>{a[t]=e.iris[t]}),t[l.JsonSchema.atContext]=a}static writeValueNode(e){const t=this.writeValueNodeWithoutNotation(e);return null!==t&&"language"in e&&null!==e.language&&(t[l.JsonSchema.atLanguage]=e.language),null!==t&&"notation"in e&&null!==e.notation&&(t[l.JsonSchema.skosNotation]=e.notation),null!==t&&"preferredLabel"in e&&null!==e.preferredLabel&&(t[c.CedarModel.skosPrefLabel]=e.preferredLabel),t}static writeValueNodeWithoutNotation(e){return e instanceof i.InstanceDataNotationAtom?null===e.type?d.JsonNode.getEmpty():{[l.JsonSchema.atType]:b.WriterUtil.writtenDatatype(e.type)}:e instanceof h.InstanceDataStringAtom?{[l.JsonSchema.atValue]:e.value,...null===e.label?{}:{[l.JsonSchema.rdfsLabel]:e.label}}:e instanceof f.InstanceDataTypedAtom?{[l.JsonSchema.atValue]:e.value,...null===e.label?{}:{[l.JsonSchema.rdfsLabel]:e.label},[l.JsonSchema.atType]:b.WriterUtil.writtenDatatype(e.type)}:e instanceof s.InstanceDataLabelAtom?{[l.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[l.JsonSchema.atType]:b.WriterUtil.writtenDatatype(e.type)}}:e instanceof g.InstanceDataControlledAtom?{[l.JsonSchema.atId]:e.id,[l.JsonSchema.rdfsLabel]:e.label,...null===e.type?{}:{[l.JsonSchema.atType]:b.WriterUtil.writtenDatatype(e.type)}}:e instanceof E.InstanceDataLinkAtom?{[l.JsonSchema.atId]:e.id,...null===e.type?{}:{[l.JsonSchema.atType]:b.WriterUtil.writtenDatatype(e.type)}}:e instanceof C.InstanceDataEmptyAtom||e instanceof I.InstanceDataEmptyNode?d.JsonNode.getEmpty():null}serializeCommonType(e){if(e instanceof p.InstanceDataContainer){const t=d.JsonNode.getEmpty();return this.serializeDataLevelInto(e,t),t}return S.writeValueNode(e)}serializeAttributeValueFields(e,t){Object.keys(e.values).forEach(r=>{const n=e.values[r];n instanceof y.InstanceDataAttributeValueField&&Object.keys(n.values).forEach(e=>{const r=S.writeValueNode(n.values[e]);null!==r&&(t[e]=r)})})}getAsJsonString(e,t=2){return(0,a.stringifyInstance)(this.getAsJsonNode(e),e.dataContainer,t)}getAsJsonNode(e){if(e.schema_isBasedOn===v.CedarArtifactId.NULL)throw new Error("A template instance must name the template it is based on.");A.AttributeValueNamePolicy.assertValid(e.dataContainer);const t=this.buildContext(e),r=this.macroSchemaNameAndDescription(e);return e.descriptionWasAbsent&&""===e.schema_description&&delete r[l.JsonSchema.schemaDescription],{[l.JsonSchema.atId]:this.atomicWriter.write(e.at_id),...S.writeTypes(e.dataContainer),...r,...this.getDataTree(e),...this.macroAnnotations(e),[l.JsonSchema.atContext]:t,...this.macroIsBasedOn(e),[l.JsonSchema.schemaDescription]:e.schema_description,...this.macroProvenance(e,this.atomicWriter),...this.macroDerivedFrom(e)}}}t.JsonTemplateInstanceWriter=S},7519(e,t,r){t.JsonTemplateWriter=void 0;const n=r(8972),a=r(8557),i=r(8748),s=r(6551),o=r(2733),l=r(936),c=r(2763),d=r(5793),u=r(5747),m=r(2475),p=r(9932),h=r(8872);class f extends h.JsonAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new f(e,t)}buildProperties(e){const t=i.ReaderUtil.deepClone(s.JsonTemplateContent.PROPERTIES_PARTIAL),r=e.getChildrenInfo().getIRIMap();t[o.JsonSchema.atContext][o.JsonSchema.properties]={...t[o.JsonSchema.atContext][o.JsonSchema.properties],...r};const n=e.getChildrenInfo().getChildNamesWithIri();t[o.JsonSchema.atContext][o.JsonSchema.required]=[...t[o.JsonSchema.atContext][o.JsonSchema.required],...n],e.getChildrenInfo().hasAttributeValue()&&(t[o.JsonSchema.atContext][u.TemplateProperty.additionalProperties]=p.JsonTemplateFieldContentDynamic.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE);const a={...t,...this.getChildMapAsJson(e)};return this.expandInstanceTypeSpecification(e,a),a}getAsJsonString(e,t=2){return(0,n.stringifySchema)(this.getAsJsonNode(e),t)}getAsJsonNode(e){const t=this.buildProperties(e),r={[l.CedarModel.order]:e.getChildrenInfo().getChildrenNames(),[l.CedarModel.propertyLabels]:e.getChildrenInfo().getPropertyLabelMap(e),[l.CedarModel.propertyDescriptions]:e.getChildrenInfo().getPropertyDescriptionMap(e)};return this.behavior.outputPages()&&(r[l.CedarModel.pages]=[]),null!==e.header&&(r[l.CedarModel.header]=e.header),null!==e.footer&&(r[l.CedarModel.footer]=e.footer),e.extensions.applyJson({[o.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[o.JsonSchema.atType]:this.atomicWriter.write(c.CedarArtifactType.TEMPLATE),[o.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(d.JavascriptType.OBJECT),[u.TemplateProperty.title]:e.title,[u.TemplateProperty.description]:e.description,[l.CedarModel.ui]:r,[o.JsonSchema.properties]:t,[o.JsonSchema.required]:[...s.JsonTemplateContent.REQUIRED_PARTIAL,...e.getChildrenInfo().getChildrenNamesForRequired()],[u.TemplateProperty.additionalProperties]:this.atomicWriter.write(e.getAdditionalProperties()),...this.macroAnnotations(e),...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[o.JsonSchema.schemaVersion]:this.atomicWriter.write(a.SchemaVersion.CURRENT),...this.macroSchemaIdentifier(e),[l.CedarModel.schema]:this.atomicWriter.write(m.ArtifactSchema.CURRENT)})}}t.JsonTemplateWriter=f},9868(e,t,r){t.stringifyInstance=function(e,t,r){return n.JsonSourcePolicy.stringify(function e(t,r){const n={...t},s=new Map;for(const[o,l]of Object.entries(r.values))l instanceof i.InstanceDataAttributeValueField?s.set(o,t[o]):l instanceof a.InstanceDataContainer?n[o]=e(t[o],l):Array.isArray(l)&&Array.isArray(t[o])&&(n[o]=t[o].map((t,r)=>l[r]instanceof a.InstanceDataContainer?e(t,l[r]):t));const o=Object.keys(r.values),l=new Set([...o,...[...s.values()].flat()]),c=Object.keys(n).filter(e=>!l.has(e)),d=o.flatMap(e=>[e,...s.get(e)??[]]).filter(e=>Object.hasOwn(n,e)),u=c.findIndex(e=>"_annotations"===e||"@context"===e);return c.splice(u<0?c.length:u,0,...d),new Proxy(n,{ownKeys:()=>c})}(e,t),r)};const n=r(5904),a=r(7723),i=r(9327)},8972(e,t,r){t.stringifySchema=function(e,t){return n.JsonSourcePolicy.stringify(function e(t){if(Array.isArray(t))return t.map(e);if(!s(t)||a.ExactDecimal.isExact(t))return t;const r=Object.fromEntries(Object.entries(t).map(([t,r])=>[t,e(r)])),n=r._ui,o=s(n)?n.order:void 0;if(Array.isArray(o)&&o.every(e=>"string"==typeof e)&&s(n)&&s(r.properties)){const e=new Set(o),t=r.properties;r.properties=i(t,[...Object.keys(t).filter(t=>!e.has(t)),...o]);const a=t["@context"];s(a)&&s(a.properties)&&(a.properties=i(a.properties,[...Object.keys(a.properties).filter(t=>!e.has(t)),...o]));for(const e of["propertyLabels","propertyDescriptions"]){const t=n[e];s(t)&&(n[e]=i(t,o))}}return r}(e),t)};const n=r(5904),a=r(2108);function i(e,t){const r=[...new Set([...t.filter(t=>Object.hasOwn(e,t)),...Object.keys(e)])];return new Proxy(e,{ownKeys:()=>r})}function s(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}},5359(e,t,r){t.CedarYamlWriters=void 0;const n=r(4869),a=r(1933),i=r(8354),s=r(2418),o=r(9184),l=r(2395),c=r(7432),d=r(6116),u=r(2342),m=r(2287),p=r(836),h=r(7436),f=r(7594),y=r(1784),T=r(6082),g=r(4935),E=r(6314),C=r(1903),I=r(5251),A=r(1521),b=r(1038),v=r(3292),S=r(9821),R=r(4500),w=r(3080),N=r(8136),_=r(9535),L=r(1181),V=r(765),O=r(3671),F=r(9532),x=r(4647),M=r(9411),D=r(9326),P=r(491),U=r(4355),Y=r(5587),J=r(6557),B=r(4077),k=r(3711),K=r(6967);class j{behavior;yamlDynamicFieldWriters;yamlStaticFieldWriters;yamlValueConstraintsWriters;yamlAtomicWriter;yamlAnnotationsWriter;yamlTemplateWriter;yamlTemplateElementWriter;yamlTemplateInstanceWriter;constructor(e){this.behavior=e,this.yamlAtomicWriter=new u.YamlAtomicWriter(e),this.yamlAnnotationsWriter=new m.YamlAnnotationsWriter(e),this.yamlTemplateWriter=a.YamlTemplateWriter.getFor(e,this),this.yamlTemplateElementWriter=I.YamlTemplateElementWriter.getFor(e,this),this.yamlTemplateInstanceWriter=D.YamlTemplateInstanceWriter.getFor(e,this),this.yamlDynamicFieldWriters=new Map([[n.CedarFieldType.TEXT,new d.YamlFieldWriterTextField(e,this)],[n.CedarFieldType.TEXTAREA,new p.YamlFieldWriterTextArea(e,this)],[n.CedarFieldType.CONTROLLED_TERM,new _.YamlFieldWriterControlledTerm(e,this)],[n.CedarFieldType.PHONE_NUMBER,new S.YamlFieldWriterPhoneNumber(e,this)],[n.CedarFieldType.EMAIL,new b.YamlFieldWriterEmail(e,this)],[n.CedarFieldType.LINK,new y.YamlFieldWriterLink(e,this)],[n.CedarFieldType.EXT_ROR,new P.YamlFieldWriterExtRor(e,this)],[n.CedarFieldType.EXT_ORCID,new U.YamlFieldWriterExtOrcid(e,this)],[n.CedarFieldType.EXT_PFAS,new Y.YamlFieldWriterExtPfas(e,this)],[n.CedarFieldType.EXT_PUBMED,new J.YamlFieldWriterExtPubmed(e,this)],[n.CedarFieldType.EXT_RRID,new B.YamlFieldWriterExtRrid(e,this)],[n.CedarFieldType.EXT_NIH_GRANT_ID,new k.YamlFieldWriterExtNihGrantId(e,this)],[n.CedarFieldType.EXT_DOI,new K.YamlFieldWriterExtDoi(e,this)],[n.CedarFieldType.NUMERIC,new v.YamlFieldWriterNumeric(e,this)],[n.CedarFieldType.TEMPORAL,new h.YamlFieldWriterTemporal(e,this)],[n.CedarFieldType.RADIO,new N.YamlFieldWriterRadio(e,this)],[n.CedarFieldType.CHECKBOX,new R.YamlFieldWriterCheckbox(e,this)],[n.CedarFieldType.SINGLE_SELECT_LIST,new w.YamlFieldWriterList(e,this)],[n.CedarFieldType.MULTIPLE_SELECT_LIST,new w.YamlFieldWriterList(e,this)],[n.CedarFieldType.ATTRIBUTE_VALUE,new A.YamlFieldWriterAttributeValue(e,this)]]),this.yamlStaticFieldWriters=new Map([[n.CedarFieldType.STATIC_PAGE_BREAK,new f.YamlFieldWriterStaticPageBreak(e,this)],[n.CedarFieldType.STATIC_SECTION_BREAK,new T.YAMLFieldWriterStaticSectionsBreak(e,this)],[n.CedarFieldType.STATIC_IMAGE,new g.YamlFieldWriterStaticImage(e,this)],[n.CedarFieldType.STATIC_RICH_TEXT,new E.YamlFieldWriterStaticRichText(e,this)],[n.CedarFieldType.STATIC_YOUTUBE,new C.YamlFieldWriterStaticYoutube(e,this)]]),this.yamlValueConstraintsWriters=new Map([[i.ControlledTermOntology.className,new L.YamlValueConstraintsOntologyWriter(e,this)],[s.ControlledTermClass.className,new V.YamlValueConstraintsClassWriter(e,this)],[o.ControlledTermBranch.className,new O.YamlValueConstraintsBranchWriter(e,this)],[l.ControlledTermValueSet.className,new F.YamlValueConstraintsValueSetWriter(e,this)],[c.ControlledTermAction.className,new x.YamlValueConstraintsActionWriter(e,this)]])}static getStrict(){return new j(M.YamlWriterBehavior.STRICT)}static getFor(e){return new j(e)}getFieldWriterForType(e){let t;if(t=e.isStaticField?this.yamlStaticFieldWriters.get(e):this.yamlDynamicFieldWriters.get(e),t)return t;throw new Error(`No YAML writer found for field type: ${e.getValue()}`)}getFieldWriterForField(e){return this.getFieldWriterForType(e.cedarFieldType)}getAtomicWriter(){return this.yamlAtomicWriter}getAnnotationsWriter(){return this.yamlAnnotationsWriter}getTemplateWriter(){return this.yamlTemplateWriter}getTemplateElementWriter(){return this.yamlTemplateElementWriter}getTemplateInstanceWriter(){return this.yamlTemplateInstanceWriter}getWriterForValueConstraint(e){const t=e.className,r=this.yamlValueConstraintsWriters.get(t);if(r)return r;throw new Error(`No YAML writer found for class type: ${t}`)}}t.CedarYamlWriters=j},7120(e,t){t.javaPlainDecimal=function(e){if(!Number.isFinite(e))throw new RangeError("Expected a finite number");if(0===e)return"0";if(Number.isSafeInteger(e))return String(e);const t=e<0?"-":"",r=Math.abs(e),n=new DataView(new ArrayBuffer(8));n.setFloat64(0,r);const a=n.getBigUint64(0),i=Number(a>>52n&2047n),s=a&(1n<<52n)-1n|(i?1n<<52n:0n),o=i?i-1075:-1074,l=s.toString(2).length,c=o+l-1;let d=s,u=1n;if(o>=0?d<<=BigInt(o):u<<=BigInt(-o),c<=62&&d%u===0n){let e=d/u;const r=c>l?(1n<<BigInt(c-l-1)).toString().length-1:0,n=10n**BigInt(r);return e=(e+n/2n)/n*n,t+String(e)}let m=Math.floor(.289529654*(Number(s)/2**(l-1)-1.5)+.176091259+.301029995663981*c),p=d,h=u;m>=0?h*=10n**BigInt(m):p*=10n**BigInt(-m);const f=o-1-(0n==(s&s-1n)?1:0);let y=1n,T=1n;function g(e,t){for(;t;)[e,t]=[t,e%t];return e}f>=0?y<<=BigInt(f):T<<=BigInt(-f),m>=0?T*=10n**BigInt(m):y*=10n**BigInt(-m);let E=h/g(h,T)*T;function C(e){let t=0;for(;0n==(1n&e);)e>>=1n,t++;return t}function I(e){return 0===e?0:e<27?(5n**BigInt(e)).toString(2).length:3*e}p*=E/h,y*=E/T,h=E,E=g(g(p,h),y),p/=E,h/=E,y/=E;const A=l-C(s)+C(p)+I(Math.max(0,-m)),b=C(h)+1+I(Math.max(0,m)+1),v=A<32&&b<32?32:A<64&&b<64?64:0,S=e=>v?BigInt.asIntN(v,e):e,R=10n*h;let w=0n,N=0,_=!0;for(;;){const e=p/h;p=p%h*10n,y=S(10n*y);let t=y<=0n||p<y,r=y<=0n||(v?S(p+y)>R:p+y>=R);if(_&&0n===e&&!r?m--:(w=10n*w+e,N++),_&&(m<-3||m>=8)&&(t=!1,r=!1),_=!1,t||r){const e=S(S(2n*p)-R);r&&(!t||e>0n||0n===e&&w%2n==1n)&&w++;break}}let L=String(w);const V=m-N+1;if(V>=0)return t+L+"0".repeat(V);const O=L.length+V;return L=O>0?L.slice(0,O)+"."+L.slice(O):"0."+"0".repeat(-O)+L,t+L.replace(/\.?0+$/,"")}},6574(e,t,r){var n,a=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);a&&!("get"in a?!t.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),s=0;s<r.length;s++)"default"!==r[s]&&a(t,e,r[s]);return i(t,e),t});Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleYamlSerializer=void 0;const o=r(2108),l=r(7120),c=s(r(3198)),d=r(1100),u={blockQuote:"literal",doubleQuotedMinMultiLineLength:1e9,lineWidth:0,minContentWidth:0,defaultStringType:"QUOTE_DOUBLE",defaultKeyType:"PLAIN",doubleQuotedAsJSON:!0},m=new Map([[0,"0"],[7,"a"],[8,"b"],[9,"t"],[10,"n"],[11,"v"],[12,"f"],[13,"r"],[27,"e"],[34,'"'],[92,"\\"],[133,"N"],[160,"_"],[8232,"L"],[8233,"P"]]);function p(e){let t='"';for(const r of e){const e=r.codePointAt(0),n=m.get(e);t+=void 0!==n?"\\"+n:e<32||e>=127&&e<=159?"\\x"+e.toString(16).padStart(2,"0"):e>=55296&&e<=57343||65534===e||65535===e?"\\u"+e.toString(16).padStart(4,"0"):r}return t+'"'}t.SimpleYamlSerializer=class{static serialize(e){const t=new WeakMap,r=new c.default.Document(e,{customTags:e=>[{tag:"tag:yaml.org,2002:float",default:!0,identify:e=>o.ExactDecimal.isExact(e),resolve:e=>o.ExactDecimal.forValue(e),stringify:e=>String(e.value)},...e.map(e=>"string"!=typeof e&&void 0===e.collection&&"tag:yaml.org,2002:str"===e.tag?{...e,stringify(r,n,a,i){const s=t.get(r);if(void 0!==s)return s;const o=e.stringify(r,n,a,i);return o.startsWith('"')?p(String(r.value)):o}}:"string"==typeof e||void 0!==e.collection||"tag:yaml.org,2002:float"!==e.tag&&"tag:yaml.org,2002:int"!==e.tag?e:{...e,stringify:(t,r,n,a)=>"number"==typeof t.value&&Number.isFinite(t.value)?(0,l.javaPlainDecimal)(t.value):e.stringify(t,r,n,a)})]});return(0,c.visit)(r,{Scalar(e,r,n){if("key"===e&&"string"==typeof r.value){const e=(0,d.yamlKeyNeedsQuoting)(r.value);r.type=e?c.Scalar.QUOTE_DOUBLE:c.Scalar.PLAIN,r.value.length>=128&&(t.set(r,e?p(r.value):r.value),r.type=c.Scalar.BLOCK_LITERAL)}else if("value"===e&&"string"==typeof r.value){const e=n.at(-1);(0,c.isPair)(e)&&(0,c.isScalar)(e.key)&&"string"==typeof e.key.value&&(0,d.mayWriteYamlValuePlain)(e.key.value,r.value)&&(r.type=c.Scalar.PLAIN)}}}),r.toString(u).trim()+"\n"}}},211(e,t,r){t.YamlAbstractArtifactWriter=void 0;const n=r(2112),a=r(8333),i=r(9517),s=r(2099),o=r(3910),l=r(1027),c=r(9129),d=r(8534),u=r(2234),m=r(9857),p=r(7661),h=r(9499),f=r(3281),y=r(6731),T=r(6591),g=r(7752),E=r(8557),C=r(2272);class I extends n.AbstractArtifactWriter{behavior;writers;atomicWriter;annotationsWriter;constructor(e,t){super(),this.behavior=e,this.writers=t,this.atomicWriter=t.getAtomicWriter(),this.annotationsWriter=t.getAnnotationsWriter()}macroNameAndDescription(e){const t=i.JsonNode.getEmpty();if(e instanceof a.AbstractSchemaArtifact){if(null===e.schema_name||""===e.schema_name){const t=e instanceof f.Template?"A template":e instanceof p.TemplateElement?"An element":"A field";throw new Error(`${t} must have a name.`)}e.language!==g.Language.NULL&&(t[s.YamlKeys.language]=this.atomicWriter.write(e.language))}return t[s.YamlKeys.name]=e.schema_name,""!==e.schema_description&&(t[s.YamlKeys.description]=e.schema_description),t}macroStatusAndVersion(e,t){const r=i.JsonNode.getEmpty();return t||(e.bibo_status!==o.BiboStatus.NULL&&(r[s.YamlKeys.status]=this.atomicWriter.write(e.bibo_status)),e.pav_version!==l.PavVersion.NULL&&(r[s.YamlKeys.version]=this.atomicWriter.write(e.pav_version)),r[s.YamlKeys.modelVersion]=this.atomicWriter.write(E.SchemaVersion.CURRENT)),r}macroInstanceType(e){const t=i.JsonNode.getEmpty();return e.instanceTypeSpecifications.length>0&&(t[s.YamlKeys.instanceType]=1===e.instanceTypeSpecifications.length?e.instanceTypeSpecifications[0]:[...e.instanceTypeSpecifications]),t}macroSkos(e){const t=i.JsonNode.getEmpty();return null!==e.skos_prefLabel&&(t[s.YamlKeys.prefLabel]=e.skos_prefLabel),null!==e.skos_altLabel&&e.skos_altLabel.length>0&&(t[s.YamlKeys.altLabels]=e.skos_altLabel),t}macroStandaloneFieldFlags(e){const t=i.JsonNode.getEmpty();return e.hidden&&(t[s.YamlKeys.hidden]=!0),e.continuePreviousLine&&(t[s.YamlKeys.continuePreviousLine]=!0),t}macroStandaloneFieldConfiguration(e){const t=i.JsonNode.getEmpty();return e.cedarFieldType.recordsRequirement&&(e.requiredValue&&(t[s.YamlKeys.required]=!0),e.recommendedValue&&(t[s.YamlKeys.recommended]=!0)),i.JsonNode.hasEntries(t)?{[s.YamlKeys.configuration]:t}:{}}macroValueRecommendation(e){const t=i.JsonNode.getEmpty();return(e instanceof y.ControlledTermFieldImpl||e instanceof T.TextFieldImpl)&&e.valueRecommendationEnabled&&(t[s.YamlKeys.valueRecommendation]=e.valueRecommendationEnabled),t}macroProvenance(e,t){const r=i.JsonNode.getEmpty();return t||(e.pav_createdOn!==m.IsoDate.NULL&&(r[s.YamlKeys.createdOn]=this.atomicWriter.write(e.pav_createdOn)),e.pav_createdBy!==u.CedarUser.NULL&&(r[s.YamlKeys.createdBy]=this.atomicWriter.write(e.pav_createdBy)),e.pav_lastUpdatedOn!==m.IsoDate.NULL&&(r[s.YamlKeys.modifiedOn]=this.atomicWriter.write(e.pav_lastUpdatedOn)),e.oslc_modifiedBy!==u.CedarUser.NULL&&(r[s.YamlKeys.modifiedBy]=this.atomicWriter.write(e.oslc_modifiedBy))),r}macroSchemaIdentifier(e){const t=i.JsonNode.getEmpty();return null!==e.schema_identifier&&(t[s.YamlKeys.identifier]=e.schema_identifier),t}macroType(e){const t=i.JsonNode.getEmpty();return t[s.YamlKeys.type]=this.getYamlType(e),t}macroId(e,t=!1,r=!0){const n=i.JsonNode.getEmpty();return e.at_id===d.CedarArtifactId.NULL||t&&!r||(n[s.YamlKeys.id]=this.atomicWriter.write(e.at_id)),n}macroDerivedFrom(e,t){const r=i.JsonNode.getEmpty();return t||e.pav_derivedFrom!==d.CedarArtifactId.NULL&&(r[s.YamlKeys.derivedFrom]=this.atomicWriter.write(e.pav_derivedFrom)),r}macroIsBasedOn(e){const t=i.JsonNode.getEmpty();return e.schema_isBasedOn!==d.CedarArtifactId.NULL&&(t[s.YamlKeys.isBasedOn]=this.atomicWriter.write(e.schema_isBasedOn)),t}macroPreviousVersion(e,t){const r=i.JsonNode.getEmpty();return t||e.pav_previousVersion!==d.CedarArtifactId.NULL&&(r[s.YamlKeys.previousVersion]=this.atomicWriter.write(e.pav_previousVersion)),r}macroAnnotations(e){return this.annotationsWriter.write(e.annotations)}getYamlType(e){return e instanceof f.Template?h.YamlArtifactType.TEMPLATE.getValue():e instanceof p.TemplateElement?h.YamlArtifactType.ELEMENT.getValue():e instanceof c.TemplateField?e.cedarFieldType.getYamlType().getValue():e instanceof C.TemplateInstance?h.YamlArtifactType.TEMPLATE_INSTANCE.getValue():void 0}}t.YamlAbstractArtifactWriter=I},5386(e,t,r){t.YamlAbstractContainerArtifactWriter=void 0;const n=r(8198),a=r(8878),i=r(9517),s=r(9129),o=r(211),l=r(2099),c=r(3812),d=r(9519),u=r(5692),m=r(699),p=r(513);class h extends o.YamlAbstractArtifactWriter{getChildListAsJSON(e,t){const r=i.JsonNode.getEmptyList();return e.getChildrenInfo().getChildrenNames().forEach(n=>{const a=e.getChild(n);if(null!=a){let o=i.JsonNode.getEmpty();const c=e.getChildrenInfo().get(n);if(null!==c){o[l.YamlKeys.key]=n,o=a instanceof s.TemplateField?{...o,...this.writers.getFieldWriterForType(a.cedarFieldType).getYamlAsJsonNode(a,c,t,!1)}:{...o,...this.writers.getTemplateElementWriter().getYamlAsJsonNode(a,t,!1)};const e=this.getDeploymentInfo(a,c,t);i.JsonNode.hasEntries(e)&&(o[l.YamlKeys.configuration]=e),r.push(o)}}}),r}getDeploymentInfo(e,t,r){const o=i.JsonNode.getEmpty();if(t instanceof c.AbstractDynamicChildDeploymentInfo){const n=!(e instanceof s.TemplateField)||e.cedarFieldType.recordsRequirement;t.requiredValue&&n&&(o[l.YamlKeys.required]=!0),t.hidden&&(o[l.YamlKeys.hidden]=!0),t.recommendedValue&&n&&(o[l.YamlKeys.recommended]=!0),null!==t.iri&&(r||(o[l.YamlKeys.propertyIri]=t.iri))}t instanceof c.AbstractDynamicChildDeploymentInfo||!t.hidden||(o[l.YamlKeys.hidden]=!0),null!==t.label&&t.label!==e?.schema_name&&(o[l.YamlKeys.overrideLabel]=t.label),null!==t.description&&t.description!==e?.schema_description&&(o[l.YamlKeys.overrideDescription]=t.description),t instanceof d.AbstractFieldChildDeploymentInfo&&(t.continuePreviousLine&&(o[l.YamlKeys.continuePreviousLine]=!0),t.valueRecommendationEnabled&&e instanceof s.TemplateField&&e.supportsValueRecommendation()&&(o[l.YamlKeys.valueRecommendation]=!0));const{isMultiInstance:h,minItems:f,maxItems:y}=u.WriterUtil.getMultiMinMax(e,t);let T=f;const g=y;return h&&(null===T&&(T=p.AbstractChildDeploymentInfo.defaultMinItems),e?.isMultiInstanceByDefinition()||e?.isSingleInstanceByDefinition()?t instanceof a.ChildDeploymentInfoAlwaysMultiple&&(o[l.YamlKeys.minItems]=T,null!==t.declaredMaxItems&&g!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=g)):(o[l.YamlKeys.multiple]=!0,o[l.YamlKeys.minItems]=T,null!==g&&g!==n.UNBOUNDED_MAX_ITEMS&&(o[l.YamlKeys.maxItems]=g))),(0,m.isSizedStaticField)(e)&&(null!==e.width&&(o[l.YamlKeys.width]=e.width),null!==e.height&&(o[l.YamlKeys.height]=e.height)),o}}t.YamlAbstractContainerArtifactWriter=h},2287(e,t,r){t.YamlAnnotationsWriter=void 0;const n=r(9517),a=r(2787),i=r(3549),s=r(2099);t.YamlAnnotationsWriter=class{behavior;constructor(e){this.behavior=e}write(e){const t=n.JsonNode.getEmpty(),r=n.JsonNode.getEmpty();return null!==e&&e.getSize()>0&&(e.getAnnotationNames().forEach(t=>{const n=e.get(t);if(n instanceof a.AnnotationAtId){const e={[s.YamlKeys.id]:n.getAtId()};r[t]=e}else if(n instanceof i.AnnotationAtValue){const e={[s.YamlKeys.value]:n.getAtValue()};r[t]=e}}),t[s.YamlKeys.annotations]=r),t}}},2342(e,t,r){t.YamlAtomicWriter=void 0;const n=r(2022),a=r(4872),i=r(4531),s=r(3910);class o extends a.JsonAtomicWriter{constructor(e){super(n.JsonWriterBehavior.STRICT)}writeCedarArtifactType(e){return e.getYamlValue()}write(e){return null==e?null:e instanceof s.BiboStatus?this.writeBiboStatusYaml(e):e instanceof i.BioportalTermType?this.writeBioportalTermTypeYaml(e):super.write(e)}writeBiboStatusYaml(e){return e.getYamlValue()}writeBioportalTermTypeYaml(e){return e.getYamlValue()}}t.YamlAtomicWriter=o},1100(e,t,r){t.mayWriteYamlValuePlain=function(e,t){return(f.get(e)?.has(t)??(("version"===e||"modelVersion"===e)&&h.test(t)))&&(r=t,!(u.some(e=>e.test(r))||function(e){for(const t of e){const e=t.codePointAt(0)??0;if(9===e||13===e||e<=31&&10!==e||e>=127&&e<=160||5760===e||e>=8192&&e<=8202||8232===e||8233===e||8239===e||8287===e||12288===e||65279===e||e>=55296&&e<=57343||65534===e||65535===e)return!0}return e.startsWith(" ")||e.endsWith(" ")||e.includes(" \n")||0===e.length}(r)));var r},t.yamlKeyNeedsQuoting=function(e){return!/^[A-Za-z_](?:[A-Za-z0-9_ -]*[A-Za-z0-9_-])?$(?![\s\S])/.test(e)||/^(y|yes|n|no|true|false|on|off|null)$/i.test(e)};const n=r(8349),a=r(4531),i=r(3910),s=r(3447),o=r(7974),l=r(8588),c=r(3764),d=r(9499),u=[/^\d{4}-\d{1,2}-\d{1,2}(?:$|[Tt ])/,/^(y|Y|n|N|yes|Yes|YES|no|No|NO|on|On|ON|off|Off|OFF|true|True|TRUE|false|False|FALSE)$/,/^(null|Null|NULL|~|<<|=)$/,/^[-+]?[0-9][0-9_]*$/,/^[-+]?0[xX][0-9a-fA-F_]+$/,/^[-+]?0[bB][01_]+$/,/^[-+]?0[oO]?[0-7_]+$/,/^[-+]?[0-9_]*\.?[0-9_]+([eE][-+]?[0-9]+)?$/,/^[-+]?\.(inf|Inf|INF|nan|NaN|NAN)$/,/^[-+]?[0-9][0-9_]*(:[0-5]?[0-9])+(\.[0-9_]*)?$/];const m=new Set([...Object.values(d.YamlArtifactTypeValues),"element-instance",n.YamlValues.Controlled.class,a.BioportalTermTypeYamlValues.VALUE,n.YamlValues.Controlled.ontology,n.YamlValues.Controlled.branch,n.YamlValues.Controlled.valueSet]),p=new Set(["xsd:string","xsd:anyURI",...Object.values(l.TemporalTypeValues),...Object.values(s.NumberTypeValues),n.YamlValues.iri]),h=/^\d+\.\d+\.\d+$/,f=new Map([["type",m],["status",new Set(Object.values(i.BiboStatusYamlValues))],["datatype",p],["action",new Set(["move","delete"])],["granularity",new Set(Object.values(o.TemporalGranularityValues))],["termType",new Set(Object.values(a.BioportalTermTypeYamlValues))],["inputTimeFormat",new Set(Object.values(c.TimeFormatValues))]]);new Set([...f.keys(),"version","modelVersion"])},5251(e,t,r){t.YamlTemplateElementWriter=void 0;const n=r(9517),a=r(6574),i=r(2099),s=r(5386);class o extends s.YamlAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new o(e,t)}getYamlAsJsonNode(e,t=!1,r=!0){const a=n.JsonNode.getEmpty();null!==e.header&&(a[i.YamlKeys.header]=e.header),null!==e.footer&&(a[i.YamlKeys.footer]=e.footer);const s={...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,t,r),...this.macroStatusAndVersion(e,t),...this.macroInstanceType(e),...a,...this.macroPreviousVersion(e,t),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.macroSkos(e),...this.macroAnnotations(e)},o=this.getChildListAsJSON(e,t);return o.length>0&&(s[i.YamlKeys.children]=o),e.extensions.applyYaml(s)}getAsYamlString(e,t=!1){return a.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateElementWriter=o},5430(e,t,r){t.YamlTemplateFieldWriterInternal=void 0;const n=r(9517),a=r(936),i=r(455),s=r(2099),o=r(211),l=r(6574);class c extends o.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}getAsYamlString(e,t=!1){return l.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,i.ChildDeploymentInfo.empty(),t))}getYamlAsJsonNode(e,t=i.ChildDeploymentInfo.empty(),r=!1,n=!0){const a=this.buildUIObject(e,t),s=this.buildValueConstraintsObject(e,t);return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,n),...this.macroStatusAndVersion(e,r),...this.macroSkos(e),...a,...s,...this.macroPreviousVersion(e,r),...this.macroDerivedFrom(e,r),...this.macroProvenance(e,r),...this.macroAnnotations(e),...n?this.macroStandaloneFieldFlags(e):{},...this.macroValueRecommendation(e),...n?this.macroStandaloneFieldConfiguration(e):{}})}expandUINodeForYAML(e){return n.JsonNode.getEmpty()}expandValueConstraintsNodeForYAML(e,t,r){}buildValueConstraintsObject(e,t){const r=n.JsonNode.getEmpty();return this.expandValueConstraintsNodeForYAML(r,e,t),r}expandLiterals(e,t){const r=n.JsonNode.getEmptyList();e.valueConstraints.literals.forEach(e=>{const t=n.JsonNode.getEmpty();t[a.CedarModel.label]=e.label,(e.statesSelectedByDefault||e.selectedByDefault)&&(t[s.YamlKeys.selected]=e.selectedByDefault),r.push(t)}),r.length>0&&(t[s.YamlKeys.values]=r)}buildUIObject(e,t){return this.expandUINodeForYAML(e)}}t.YamlTemplateFieldWriterInternal=c},9326(e,t,r){t.YamlTemplateInstanceWriter=void 0;const n=r(3992),a=r(5588),i=r(1625),s=r(9167),o=r(9517),l=r(6574),c=r(211),d=r(7723),u=r(9327),m=r(5222),p=r(7571),h=r(4877),f=r(8193),y=r(2099),T=r(4033),g=r(3644),E=r(5692),C=r(8534),I="element-instance";class A extends c.YamlAbstractArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new A(e,t)}getYamlAsJsonNode(e,t=!1){if(null===e.schema_name||""===e.schema_name)throw new Error("A template instance must have a name.");if(e.schema_isBasedOn===C.CedarArtifactId.NULL)throw new Error("A template instance must name the template it is based on.");return T.AttributeValueNamePolicy.assertValid(e.dataContainer),{...this.macroType(e),...this.macroNameAndDescription(e),...this.macroId(e,t,!0),...A.typesNode(e.dataContainer),...this.macroIsBasedOn(e),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.getDataTree(e,t),...this.macroAnnotations(e)}}getAsYamlString(e,t=!1){return l.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}getDataTree(e,t){const r=o.JsonNode.getEmpty();return this.serializeDataLevelInto(e.dataContainer,r,t,!0),r}serializeDataLevelInto(e,t,r,n=!1){const a=o.JsonNode.getEmpty(),i=this.getUnpackedAttributeValueGroups(e),s=new Set(Array.from(i.values()).flat());Object.keys(e.values).forEach(t=>{if(i.has(t)||s.has(t))return;const n=e.values[t];if(Array.isArray(n)){const e=o.JsonNode.getEmptyList();n.forEach((t,n)=>{const a=this.serializeCommonType(t,r);if(null!==a&&o.JsonNode.hasEntries(a))e.push(a);else if(t instanceof d.InstanceDataContainer){const n={[y.YamlKeys.type]:I};!r&&this.hasId(t.id)&&(n[y.YamlKeys.id]=t.id),e.push(n)}}),e.length>0&&(a[t]=e)}else{const e=this.serializeCommonType(n,r);null!==e&&o.JsonNode.hasEntries(e)&&(a[t]=e)}});const l=n?o.JsonNode.getEmpty():A.typesNode(e);o.JsonNode.hasEntries(a)&&(!this.hasId(e.id)||r&&!n||(t[y.YamlKeys.id]=e.id),Object.assign(t,l),t[y.YamlKeys.children]=a);const c=o.JsonNode.getEmpty();this.serializeAttributeValueFields(e,c,i,n),!n&&(o.JsonNode.hasEntries(t)||o.JsonNode.hasEntries(c)||o.JsonNode.hasEntries(l))&&(Object.hasOwn(t,y.YamlKeys.children)||(t[y.YamlKeys.type]=I),!r&&this.hasId(e.id)&&(t[y.YamlKeys.id]=e.id),Object.assign(t,l)),Object.assign(t,c)}static typesNode(e){const t=e.types;return 0===t.length?o.JsonNode.getEmpty():{[y.YamlKeys.instanceType]:1===t.length?t[0]:[...t]}}serializeAttributeValueFields(e,t,r,n){Object.keys(e.values).forEach(i=>{const s=e.values[i];if((s instanceof u.InstanceDataAttributeValueField||r.has(i))&&a.ReservedNames.yamlKeys(n?"template":"element").has(i))throw new Error(`Attribute-value field key "${i}" is reserved for CEDAR YAML metadata.`);if(s instanceof u.InstanceDataAttributeValueField){const e=o.JsonNode.getEmpty();let r=!1;Object.keys(s.values).forEach(t=>{const n=this.serializeAttribute(s.values[t]);null!==n&&(e[t]=n,r=!0)}),r&&(t[i]=e)}});for(const[n,a]of r){const r=o.JsonNode.getEmpty();for(const t of a){const n=e.values[t],a=void 0===n?null:this.serializeAttribute(n);null!==a&&(r[t]=a)}o.JsonNode.hasEntries(r)&&(t[n]=r)}}serializeAttribute(e){if(e instanceof d.InstanceDataContainer)return null;const t=this.serializeCommonType(e,!1);return null!==t&&o.JsonNode.hasEntries(t)?t:null}getUnpackedAttributeValueGroups(e){const t=new Map;for(const[r,a]of Object.entries(e.values)){if(!Array.isArray(a))continue;const e=a.filter(e=>e instanceof g.InstanceDataAttributeValueFieldName).map(e=>e.name).filter(e=>!n.TextPolicy.isBlank(e));e.length>0&&t.set(r,e)}return t}serializeCommonType(e,t){let r=this.serializeCommonTypeWithoutNotation(e,t);if("notation"in e&&null!==e.notation){const t=r??o.JsonNode.getEmpty();t[y.YamlKeys.notation]=e.notation,r=t}if("preferredLabel"in e&&null!==e.preferredLabel){const t=r??o.JsonNode.getEmpty();t[y.YamlKeys.prefLabel]=e.preferredLabel,r=t}return null!==r&&"language"in e&&null!==e.language&&(r[y.YamlKeys.language]=e.language),r}serializeCommonTypeWithoutNotation(e,t){if(e instanceof i.InstanceDataNotationAtom)return null===e.type?o.JsonNode.getEmpty():{[y.YamlKeys.datatype]:E.WriterUtil.writtenDatatype(e.type)};if(e instanceof m.InstanceDataStringAtom)return this.serializeAtomString(e);if(e instanceof h.InstanceDataTypedAtom)return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[y.YamlKeys.datatype]:E.WriterUtil.writtenDatatype(e.type),[y.YamlKeys.value]:e.value,...null===e.label?{}:{[y.YamlKeys.label]:e.label}};if(e instanceof s.InstanceDataLabelAtom)return{...null===e.type?{}:{[y.YamlKeys.datatype]:E.WriterUtil.writtenDatatype(e.type)},[y.YamlKeys.label]:e.label};if(e instanceof f.InstanceDataControlledAtom){const t=o.JsonNode.getEmpty();return null===e.type||!this.hasId(e.id)&&null===e.label&&null===e.notation||(t[y.YamlKeys.datatype]=E.WriterUtil.writtenDatatype(e.type)),this.hasId(e.id)&&(t[y.YamlKeys.id]=e.id),null!==e.label&&(t[y.YamlKeys.label]=e.label),o.JsonNode.hasEntries(t)?t:null}if(e instanceof p.InstanceDataLinkAtom)return this.serializeAtomLink(e);if(e instanceof d.InstanceDataContainer){const r=o.JsonNode.getEmpty();return this.serializeDataLevelInto(e,r,t),r}return null}serializeAtomString(e){return null===e.value&&null===e.label&&null===e.notation&&null===e.preferredLabel?null:{[y.YamlKeys.value]:e.value,...null===e.label?{}:{[y.YamlKeys.label]:e.label}}}serializeAtomLink(e){return this.hasId(e.id)?{...null===e.type?{}:{[y.YamlKeys.datatype]:E.WriterUtil.writtenDatatype(e.type)},[y.YamlKeys.id]:e.id}:null!==e.notation&&null!==e.type?{[y.YamlKeys.datatype]:E.WriterUtil.writtenDatatype(e.type)}:null}hasId(e){return null!==e&&""!==e}}t.YamlTemplateInstanceWriter=A},1933(e,t,r){t.YamlTemplateWriter=void 0;const n=r(9517),a=r(6574),i=r(2099),s=r(5386);class o extends s.YamlAbstractContainerArtifactWriter{constructor(e,t){super(e,t)}static getFor(e,t){return new o(e,t)}getYamlAsJsonNode(e,t=!1){const r=n.JsonNode.getEmpty();null!==e.header&&(r[i.YamlKeys.header]=e.header),null!==e.footer&&(r[i.YamlKeys.footer]=e.footer);const a={...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,t,!0),...this.macroStatusAndVersion(e,t),...this.macroInstanceType(e),...r,...this.macroPreviousVersion(e,t),...this.macroDerivedFrom(e,t),...this.macroProvenance(e,t),...this.macroAnnotations(e)},s=this.getChildListAsJSON(e,t);return s.length>0&&(a[i.YamlKeys.children]=s),e.extensions.applyYaml(a)}getAsYamlString(e,t=!1){return a.SimpleYamlSerializer.serialize(this.getYamlAsJsonNode(e,t))}}t.YamlTemplateWriter=o},1641(e,t,r){t.AbstractArtifactBuilder=void 0;const n=r(4443),a=r(8333),i=r(2763),s=r(9857),o=r(2234),l=r(1027),c=r(3910),d=r(8534),u=r(8557),m=r(4563);class p{at_id=d.CedarArtifactId.NULL;title=null;description=null;schema_schemaVersion=u.SchemaVersion.CURRENT;pav_createdOn=s.IsoDate.NULL;pav_createdBy=o.CedarUser.NULL;pav_lastUpdatedOn=s.IsoDate.NULL;oslc_modifiedBy=o.CedarUser.NULL;extensions=new n.SchemaExtensions;withExtensions(e){return this.extensions=e,this}pav_version=l.PavVersion.DEFAULT;bibo_status=c.BiboStatus.DRAFT;schema_name=null;schema_description="";schema_identifier=null;pav_derivedFrom=d.CedarArtifactId.NULL;withAtId(e){return e instanceof d.CedarArtifactId?this.at_id=e:this.at_id=d.CedarArtifactId.forValue(e),this}withTitle(e){return this.title=e,this}withDescription(e){return this.description=e,this}withSchemaVersion(e){return this.schema_schemaVersion=e,this}withCreatedOn(e){return e instanceof s.IsoDate?this.pav_createdOn=e:this.pav_createdOn=s.IsoDate.forValue(e),this}withCreatedBy(e){return e instanceof o.CedarUser?this.pav_createdBy=e:this.pav_createdBy=o.CedarUser.forValue(e),this}withLastUpdatedOn(e){return e instanceof s.IsoDate?this.pav_lastUpdatedOn=e:this.pav_lastUpdatedOn=s.IsoDate.forValue(e),this}withModifiedBy(e){return e instanceof o.CedarUser?this.oslc_modifiedBy=e:this.oslc_modifiedBy=o.CedarUser.forValue(e),this}withVersion(e){return e instanceof l.PavVersion?this.pav_version=e:this.pav_version=l.PavVersion.forValue(e),this}withStatus(e){return e instanceof c.BiboStatus?this.bibo_status=e:this.bibo_status=c.BiboStatus.forJsonValue(e),this}withSchemaName(e){return this.schema_name=e,this}withSchemaDescription(e){return this.schema_description=e??"",this}withDerivedFrom(e){return this.pav_derivedFrom=e,this}withSchemaIdentifier(e){return this.schema_identifier=e,this}buildInternal(e){if(this.assertNameNotBlank(e.cedarArtifactType),e.at_id=this.at_id,e.title=this.title,e.description=this.description,e.schema_schemaVersion=this.schema_schemaVersion,e.pav_createdOn=this.pav_createdOn,e.pav_createdBy=this.pav_createdBy,e.pav_lastUpdatedOn=this.pav_lastUpdatedOn,e.oslc_modifiedBy=this.oslc_modifiedBy,e.extensions=this.extensions,e.pav_version=this.pav_version,e.bibo_status=this.bibo_status,e.schema_name=this.schema_name,e.schema_description=this.schema_description,e.schema_identifier=this.schema_identifier,e.pav_derivedFrom=this.pav_derivedFrom,null===e.title&&null!==e.schema_name){const t=p.kindOf(e.cedarArtifactType);null!==t&&(e.title=(0,a.internalNameFor)(e.schema_name,t))}}assertNameNotBlank(e){const t=this.schema_name;if(null===t||""===t||!m.JavaStrings.isBlank(t))return;const r=p.kindOf(e)??"artifact",n="element"===r||"artifact"===r?"an":"a";throw new Error(`The name ${JSON.stringify(t)} is made only of whitespace, so ${n} ${r} cannot be built with it.`)}static kindOf(e){return e===i.CedarArtifactType.TEMPLATE?"template":e===i.CedarArtifactType.TEMPLATE_ELEMENT?"element":e===i.CedarArtifactType.TEMPLATE_FIELD||e===i.CedarArtifactType.STATIC_TEMPLATE_FIELD?"field":null}}t.AbstractArtifactBuilder=p},2674(e,t,r){t.AbstractArtifact=void 0;const n=r(9857),a=r(2234),i=r(8534),s=r(2763);t.AbstractArtifact=class{at_id=i.CedarArtifactId.NULL;pav_createdOn=n.IsoDate.NULL;pav_createdBy=a.CedarUser.NULL;pav_lastUpdatedOn=n.IsoDate.NULL;oslc_modifiedBy=a.CedarUser.NULL;pav_derivedFrom=i.CedarArtifactId.NULL;schema_name=null;schema_description="";cedarArtifactType=s.CedarArtifactType.NULL;annotations=null}},5451(e,t,r){t.AbstractContainerArtifact=void 0;const n=r(8333),a=r(1492),i=r(3746),s=r(2763),o=r(4869),l=r(5588),c=r(4563);class d extends n.AbstractSchemaArtifact{childrenInfo=new a.ContainerArtifactChildrenInfo;childMap=new Map;instanceTypes=[];get instanceTypeSpecifications(){return[...this.instanceTypes]}set instanceTypeSpecifications(e){if(!Array.isArray(e)||e.some(e=>"string"!=typeof e||!/^[a-z][a-z0-9+.-]*:\S+$/i.test(e))||new Set(e).size!==e.length)throw new Error("Instance types must be unique absolute IRIs");this.instanceTypes=[...e]}get instanceTypeSpecification(){return this.instanceTypeSpecifications[0]??null}set instanceTypeSpecification(e){this.instanceTypeSpecifications=null===e?[]:[e]}addChild(e,t){d.refuseReservedChildName(this,e,t.name),this.childrenInfo.add(t),this.childMap.set(t.name,e)}static refuseReservedChildName(e,t,r){if(c.JavaStrings.isBlank(r))throw new Error("A child key must not be blank.");const n=t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD&&t.cedarFieldType===o.CedarFieldType.ATTRIBUTE_VALUE,a=e.cedarArtifactType===s.CedarArtifactType.TEMPLATE?"template":"element";if(n?l.ReservedNames.isReservedAttributeValueFieldName(r,a):l.ReservedNames.isReservedName(r))throw new Error(`Child name "${r}" is reserved for CEDAR instance metadata.`)}getChildrenInfo(){return this.childrenInfo}getAdditionalProperties(){return this.childrenInfo.hasAttributeValue()?i.AdditionalProperties.ALLOW_ATTRIBUTE_VALUE:i.AdditionalProperties.FALSE}getChild(e){return this.childMap.get(e)??null}getElement(e){const t=this.getChild(e);return null!==t&&t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_ELEMENT?t:null}getField(e){const t=this.getChild(e);return null!==t&&t.cedarArtifactType===s.CedarArtifactType.TEMPLATE_FIELD?t:null}getChildInfo(e){return this.childrenInfo.get(e)}}t.AbstractContainerArtifact=d},5697(e,t,r){t.AbstractInstanceArtifact=void 0;const n=r(8534),a=r(2674);class i extends a.AbstractArtifact{schema_isBasedOn=n.CedarArtifactId.NULL}t.AbstractInstanceArtifact=i},8333(e,t,r){t.AbstractSchemaArtifact=void 0,t.internalNameFor=function(e,t){return`${e} ${t} schema`};const n=r(4443),a=r(1027),i=r(3910),s=r(8534),o=r(8557),l=r(2674),c=r(7752);class d extends l.AbstractArtifact{extensions=new n.SchemaExtensions;title=null;description=null;schema_schemaVersion=o.SchemaVersion.NULL;pav_version=a.PavVersion.NULL;bibo_status=i.BiboStatus.NULL;schema_identifier=null;pav_previousVersion=s.CedarArtifactId.NULL;language=c.Language.NULL}t.AbstractSchemaArtifact=d},5588(e,t,r){t.ReservedNames=void 0;const n=r(2099);class a{static INSTANCE_PROPERTIES=new Set(["schema:name","schema:description","schema:identifier","schema:isBasedOn","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","pav:derivedFrom","oslc:modifiedBy","_annotations","rdfs:label","skos:notation","skos:prefLabel","skos:altLabel"]);static OBJECT_INTERNALS=new Set(["__proto__","constructor","prototype"]);static TEMPLATE_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.name,n.YamlKeys.description,n.YamlKeys.id,n.YamlKeys.instanceType,n.YamlKeys.isBasedOn,n.YamlKeys.derivedFrom,n.YamlKeys.children,n.YamlKeys.annotations,n.YamlKeys.createdOn,n.YamlKeys.createdBy,n.YamlKeys.modifiedOn,n.YamlKeys.modifiedBy]);static NESTED_ELEMENT_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.id,n.YamlKeys.instanceType,n.YamlKeys.children]);static STANDALONE_ELEMENT_INSTANCE_YAML_KEYS=new Set([n.YamlKeys.type,n.YamlKeys.name,n.YamlKeys.description,n.YamlKeys.id,n.YamlKeys.instanceType,n.YamlKeys.children,n.YamlKeys.createdOn,n.YamlKeys.createdBy,n.YamlKeys.modifiedOn,n.YamlKeys.modifiedBy]);static requireChildName(e){if(a.isReservedName(e))throw new Error(`Child name "${e}" is reserved for CEDAR instance metadata.`)}constructor(){}static isReservedName(e){return e.startsWith("@")||a.INSTANCE_PROPERTIES.has(e)||a.OBJECT_INTERNALS.has(e)}static isReservedAttributeValueFieldName(e,t){return a.isReservedName(e)||("template"===t?a.TEMPLATE_INSTANCE_YAML_KEYS:a.STANDALONE_ELEMENT_INSTANCE_YAML_KEYS).has(e)}static yamlKeys(e){return"template"===e?a.TEMPLATE_INSTANCE_YAML_KEYS:a.NESTED_ELEMENT_INSTANCE_YAML_KEYS}}t.ReservedNames=a},4443(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaExtensions=void 0;const r=new Set(["xsd","pav","bibo","oslc","schema","skos","rdfs","_annotations"]);function n(e){return/^[A-Za-z_][A-Za-z0-9_-]*$/.test(e)&&!r.has(e)}function a(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function i(e){return Array.isArray(e)?e.map(i):a(e)?Object.fromEntries(Object.keys(e).sort().map(t=>[t,i(e[t])])):e}class s{namespaces;values;constructor(e={},t={}){for(const[t,r]of Object.entries(e))if(!n(t)||"string"!=typeof r||!/^[A-Za-z][A-Za-z0-9+.-]*:[^\s]*$/.test(r))throw new Error(`Invalid schema extension prefix: ${t}`);for(const r of Object.keys(t)){const t=r.indexOf(":");if(t<1||t===r.length-1||!Object.hasOwn(e,r.slice(0,t)))throw new Error(`Unbound schema extension property: ${r}`)}this.namespaces=i(e),this.values=i(t)}get prefixes(){return{...this.namespaces}}get properties(){return i(this.values)}get isEmpty(){return 0===Object.keys(this.namespaces).length&&0===Object.keys(this.values).length}static fromJson(e){const t=a(e["@context"])?e["@context"]:{},r=Object.fromEntries(Object.entries(t).filter(([e,t])=>n(e)&&"string"==typeof t)),i=Object.fromEntries(Object.entries(e).filter(([e])=>{const t=e.indexOf(":");return t>0&&Object.hasOwn(r,e.slice(0,t))}));return new s(r,i)}static fromYaml(e){if(!Object.hasOwn(e,"extensions"))return new s;const t=e.extensions;if(!a(t)||2!==Object.keys(t).length||!a(t.prefixes)||!a(t.properties))throw new Error("extensions requires prefixes and properties objects");return new s(t.prefixes,t.properties)}applyJson(e){return e["@context"]={...e["@context"],...this.prefixes},Object.assign(e,this.properties),e}applyYaml(e){return this.isEmpty||(e.extensions={prefixes:this.prefixes,properties:this.properties}),e}}t.SchemaExtensions=s},4257(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.TemplateValueValidator=void 0;const n=r(6403),a=r(7092),i=r(3281),s=r(7661),o=r(9129),l=r(3939),c=r(3812);t.TemplateValueValidator=class{static validate(e){if(e instanceof i.Template||e instanceof s.TemplateElement||e instanceof o.TemplateField){const t=[];return this.visitModel(e,"",t),a.ValidationPolicy.summarize(t,"template")}return a.ValidationPolicy.summarize([a.ValidationPolicy.finding("valueShape","","Expected a template, element or field definition.")],"template")}static visitModel(e,t,r){if(e instanceof o.TemplateField)n.SchemaValuePolicy.visit((0,l.validationFieldSchema)(e,!0),t,r);else if(e instanceof i.Template||e instanceof s.TemplateElement)for(const n of e.getChildrenInfo().getChildrenNames()){const i=e.getChildInfo(n),s=e.getChild(n);let o=a.ValidationPolicy.child(t+"/properties",n);i?.isMultiInAnyWay()&&(i instanceof c.AbstractDynamicChildDeploymentInfo&&null!=i.minItems&&null!=i.maxItems&&i.minItems>i.maxItems&&r.push(a.ValidationPolicy.finding("templateConstraint",o+"/maxItems","Minimum occurrence count exceeds maximum.")),o+="/items"),s&&this.visitModel(s,o,r)}}static validateSource(e){const t=[];return n.SchemaValuePolicy.visit(e,"",t),a.ValidationPolicy.summarize(t,"template")}}},2787(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationAtId=void 0,t.AnnotationAtId=class{name;id;constructor(e,t){this.name=e,this.id=t}getName(){return this.name}getAtId(){return this.id}}},3549(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationAtValue=void 0,t.AnnotationAtValue=class{name;value;constructor(e,t){this.name=e,this.value=t}getName(){return this.name}getAtValue(){return this.value}}},5226(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Annotations=void 0,t.Annotations=class{annotations=new Map;add(e){this.annotations.set(e.getName(),e)}getSize(){return this.annotations.size}getAnnotationNames(){return Array.from(this.annotations.keys())}get(e){return this.annotations.has(e)?this.annotations.get(e):null}}},936(e,t){t.CedarModel=void 0,t.CedarModel=class{static ui="_ui";static schema="$schema";static order="order";static inputType="inputType";static type="type";static items="items";static valueConstraints="_valueConstraints";static requiredValue="requiredValue";static defaultValue="defaultValue";static minItems="minItems";static maxItems="maxItems";static minLength="minLength";static maxLength="maxLength";static numberType="numberType";static temporalType="temporalType";static temporalGranularity="temporalGranularity";static timezoneEnabled="timezoneEnabled";static inputTimeFormat="inputTimeFormat";static unitOfMeasure="unitOfMeasure";static minValue="minValue";static maxValue="maxValue";static decimalPlace="decimalPlace";static content="_content";static size="_size";static width="width";static height="height";static regex="regex";static pages="pages";static header="header";static footer="footer";static ontologies="ontologies";static valueSets="valueSets";static classes="classes";static branches="branches";static actions="actions";static multipleChoice="multipleChoice";static literals="literals";static label="label";static selectedByDefault="selectedByDefault";static propertyDescriptions="propertyDescriptions";static propertyLabels="propertyLabels";static skosPrefLabel="skos:prefLabel";static skosAltLabel="skos:altLabel";static skosNotation="skos:notation";static format="format";static enum="enum";static annotations="_annotations";static propertyIriPrefix="https://schema.metadatacenter.org/properties/";static ValueConstraints=class{static acronym="acronym";static name="name";static uri="uri";static numTerms="numTerms";static label="label";static source="source";static type="type";static termType="termType";static prefLabel="prefLabel";static maxDepth="maxDepth";static vsCollection="vsCollection";static termUri="termUri";static sourceUri="sourceUri";static iri="iri";static sourceSystem="sourceSystem";static version="version";static versionId="id";static versionEffectiveDate="effectiveDate";static versionDeclaredVersion="declaredVersion";static action="action";static to="to";static recommendedValue="recommendedValue"};static Ui=class{static hidden="hidden";static continuePreviousLine="continuePreviousLine";static valueRecommendationEnabled="valueRecommendationEnabled"}}},2733(e,t){t.JsonSchema=void 0,t.JsonSchema=class{static skosNotation="skos:notation";static properties="properties";static required="required";static atContext="@context";static atId="@id";static atType="@type";static atValue="@value";static atLanguage="@language";static schemaIsBasedOn="schema:isBasedOn";static schemaName="schema:name";static schemaDescription="schema:description";static schemaVersion="schema:schemaVersion";static schemaIdentifier="schema:identifier";static pavDerivedFrom="pav:derivedFrom";static pavPreviousVersion="pav:previousVersion";static pavCreatedOn="pav:createdOn";static pavCreatedBy="pav:createdBy";static pavLastUpdatedOn="pav:lastUpdatedOn";static oslcModifiedBy="oslc:modifiedBy";static pavVersion="pav:version";static biboStatus="bibo:status";static rdfsLabel="rdfs:label";static termUri="termUri";static enum="enum";static oneOf="oneOf";static type="type";static items="items"}},4216(e,t){t.NonStandardDatatype=void 0,t.NonStandardDatatype=class{static IRI="iri"}},5747(e,t){t.TemplateProperty=void 0,t.TemplateProperty=class{static title="title";static description="description";static additionalProperties="additionalProperties"}},2099(e,t){t.YamlKeys=void 0,t.YamlKeys=class{static notation="notation";static id="id";static type="type";static name="name";static description="description";static modelVersion="modelVersion";static status="status";static version="version";static language="language";static label="label";static prefLabel="prefLabel";static altLabels="altLabels";static datatype="datatype";static valueRecommendation="valueRecommendation";static required="required";static recommended="recommended";static hidden="hidden";static continuePreviousLine="continuePreviousLine";static propertyIri="propertyIri";static overrideLabel="overrideLabel";static overrideDescription="overrideDescription";static default="default";static minLength="minLength";static maxLength="maxLength";static regex="regex";static identifier="identifier";static derivedFrom="derivedFrom";static previousVersion="previousVersion";static createdOn="createdOn";static createdBy="createdBy";static modifiedOn="modifiedOn";static modifiedBy="modifiedBy";static isBasedOn="isBasedOn";static instanceType="instanceType";static annotations="annotations";static value="value";static granularity="granularity";static inputTimeZone="inputTimeZone";static inputTimeFormat="inputTimeFormat";static header="header";static footer="footer";static children="children";static multiple="multiple";static minItems="minItems";static maxItems="maxItems";static content="content";static height="height";static width="width";static key="key";static minValue="minValue";static maxValue="maxValue";static decimalPlaces="decimalPlaces";static unit="unit";static multipleChoice="multipleChoice";static values="values";static selected="selected";static actions="actions";static action="action";static configuration="configuration";static Controlled=class{static sourceSystem="sourceSystem";static sourceAcronym="sourceAcronym";static sourceName="sourceName";static sourceIri="sourceIri";static sourceUri="sourceUri";static termIri="termIri";static termType="termType";static termLabel="termLabel";static termDisplayLabel="termDisplayLabel";static termBaseIri="termBaseIri";static termBaseLabel="termBaseLabel";static termMaxDepth="termMaxDepth";static termCount="termCount";static versionId="id";static versionEffectiveDate="effectiveDate";static versionDeclaredVersion="declaredVersion";static to="to"}}},8349(e,t){t.YamlValues=void 0,t.YamlValues=class{static id="id";static value="value";static iri="iri";static string="string";static Controlled=class{static class="class";static ontology="ontology";static valueSet="valueSet";static branch="branch";static derivedOntologyAddressPrefix="https://data.bioontology.org/ontologies/";static bioPortalOntologyAddress=/^https?:\/\/(?:data|bioportal)\.bioontology\.org\/ontologies\/([^/]+)$/}}},513(e,t,r){t.AbstractChildDeploymentInfo=void 0;const n=r(2763),a=r(9034);t.AbstractChildDeploymentInfo=class{static defaultMinItems=0;_name;_atType=n.CedarArtifactType.NULL;_uiInputType=a.UiInputType.NULL;_label=null;_description=null;constructor(e){this._name=e}get name(){return this._name}hasParent(){return""!==this._name}get atType(){return this._atType}set atType(e){this._atType=e}get uiInputType(){return this._uiInputType}set uiInputType(e){this._uiInputType=e}get label(){return this._label}set label(e){this._label=e}get description(){return this._description}set description(e){this._description=e}get hidden(){return!1}}},6910(e,t,r){t.AbstractChildDeploymentInfoBuilder=void 0;const n=r(2763),a=r(9034),i=r(9129);t.AbstractChildDeploymentInfoBuilder=class{child=null;name="";atType=n.CedarArtifactType.NULL;uiInputType=a.UiInputType.NULL;label=null;description=null;constructor(e,t){this.child=e,this.name=t}withLabel(e){return this.label=e,this}withDescription(e){return this.description=e,this}setCommonData(e){e.label=this.label,e.description=this.description,e.atType=this.atType,e.uiInputType=this.uiInputType,null!=this.child&&(e.atType=this.child.cedarArtifactType,this.child instanceof i.TemplateField&&(e.uiInputType=this.child.cedarFieldType.getUiInputType()))}}},3812(e,t,r){t.AbstractDynamicChildDeploymentInfo=void 0;const n=r(513);class a extends n.AbstractChildDeploymentInfo{_iri=null;constructor(e){super(e)}get iri(){return this._iri}set iri(e){this._iri=e}get requiredValue(){return!1}get recommendedValue(){return!1}get minItems(){return null}get maxItems(){return null}}t.AbstractDynamicChildDeploymentInfo=a},4809(e,t,r){t.AbstractDynamicChildDeploymentInfoBuilder=void 0;const n=r(455),a=r(6910);class i extends a.AbstractChildDeploymentInfoBuilder{iri=null;constructor(e,t){super(e,t)}withIri(e){return this.iri=e,this}build(){const e=new n.ChildDeploymentInfo(this.name);return this.setCommonData(e),e}setCommonData(e){super.setCommonData(e),e.iri=this.iri}}t.AbstractDynamicChildDeploymentInfoBuilder=i},9519(e,t,r){t.AbstractFieldChildDeploymentInfo=void 0;const n=r(3812);class a extends n.AbstractDynamicChildDeploymentInfo{_hidden=!1;_requiredValue=!1;_recommendedValue=!1;_continuePreviousLine=!1;_valueRecommendationEnabled=!1;constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}get requiredValue(){return this._requiredValue}set requiredValue(e){this._requiredValue=e}get recommendedValue(){return this._recommendedValue}set recommendedValue(e){this._recommendedValue=e}get continuePreviousLine(){return this._continuePreviousLine}set continuePreviousLine(e){this._continuePreviousLine=e}get valueRecommendationEnabled(){return this._valueRecommendationEnabled}set valueRecommendationEnabled(e){this._valueRecommendationEnabled=e}}t.AbstractFieldChildDeploymentInfo=a},6096(e,t,r){t.AbstractFieldChildDeploymentInfoBuilder=void 0;const n=r(9129),a=r(4809),i=r(9519);class s extends a.AbstractDynamicChildDeploymentInfoBuilder{hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueRecommendationEnabled=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}get recordsRequirement(){return!(this.child instanceof n.TemplateField)||this.child.cedarFieldType.recordsRequirement}withRequiredValue(e){return this.recordsRequirement&&(this.requiredValue=e),this}withRecommendedValue(e){return this.recordsRequirement&&(this.recommendedValue=e),this}withContinuePreviousLine(e){return this.continuePreviousLine=e,this}withValueRecommendationEnabled(e){return this.valueRecommendationEnabled=e,this}setCommonData(e){super.setCommonData(e),e instanceof i.AbstractFieldChildDeploymentInfo&&(e.hidden=this.hidden,e.requiredValue=this.requiredValue,e.recommendedValue=this.recommendedValue,e.continuePreviousLine=this.continuePreviousLine,e.valueRecommendationEnabled=this.valueRecommendationEnabled)}}t.AbstractFieldChildDeploymentInfoBuilder=s},455(e,t,r){t.ChildDeploymentInfo=void 0;const n=r(9519);class a extends n.AbstractFieldChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;_standalone=!1;static empty(){return new a("")}static standalone(){const e=new a("");return e._standalone=!0,e}constructor(e){super(e)}get multiInstance(){return this._multiInstance}set multiInstance(e){this._multiInstance=e}get minItems(){return this._minItems}set minItems(e){this._minItems=e}get maxItems(){return this._maxItems}set maxItems(e){this._maxItems=e}isMultiInAnyWay(){return this._multiInstance}isStandalone(){return this._standalone}}t.ChildDeploymentInfo=a},8878(e,t,r){t.ChildDeploymentInfoAlwaysMultiple=void 0;const n=r(513),a=r(9519);class i extends a.AbstractFieldChildDeploymentInfo{_declaredMinItems=null;_declaredMaxItems=null;static empty(){return new i("")}constructor(e){super(e)}isMultiInAnyWay(){return!0}get declaredMinItems(){return this._declaredMinItems}get declaredMaxItems(){return this._declaredMaxItems}set declaredMinItems(e){this._declaredMinItems=e}set declaredMaxItems(e){this._declaredMaxItems=e}get minItems(){return null!==this._declaredMinItems?this._declaredMinItems:this.defaultMinItems}get defaultMinItems(){return n.AbstractChildDeploymentInfo.defaultMinItems}get maxItems(){return this._declaredMaxItems}}t.ChildDeploymentInfoAlwaysMultiple=i},3239(e,t,r){t.ChildDeploymentInfoAlwaysMultipleBuilder=void 0;const n=r(8198),a=r(8878),i=r(6096),s=r(9129),o=r(4869);class l extends i.AbstractFieldChildDeploymentInfoBuilder{declaredMinItems=null;declaredMaxItems=null;constructor(e,t){super(e,t)}withMinItems(e){return this.declaredMinItems=e,this}withMaxItems(e){return this.declaredMaxItems=e,this}build(){if((0,n.assertItemBounds)(this.name,this.declaredMinItems,this.declaredMaxItems),this.child instanceof s.TemplateField&&this.child.cedarFieldType===o.CedarFieldType.ATTRIBUTE_VALUE&&null!==this.declaredMinItems&&this.declaredMinItems>0)throw new Error(`minItems must be zero in attribute-value field ${this.name}`);const e=new a.ChildDeploymentInfoAlwaysMultiple(this.name);return this.setCommonData(e),e.declaredMinItems=this.declaredMinItems,e.declaredMaxItems=this.declaredMaxItems,e}}t.ChildDeploymentInfoAlwaysMultipleBuilder=l},2266(e,t,r){t.ChildDeploymentInfoAlwaysSingle=void 0;const n=r(9519);class a extends n.AbstractFieldChildDeploymentInfo{static empty(){return new a("")}constructor(e){super(e)}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoAlwaysSingle=a},587(e,t,r){t.ChildDeploymentInfoAlwaysSingleBuilder=void 0;const n=r(2266),a=r(6096);class i extends a.AbstractFieldChildDeploymentInfoBuilder{constructor(e,t){super(e,t)}build(){const e=new n.ChildDeploymentInfoAlwaysSingle(this.name);return this.setCommonData(e),e}}t.ChildDeploymentInfoAlwaysSingleBuilder=i},3608(e,t,r){t.ChildDeploymentInfoBuilder=void 0;const n=r(8198),a=r(455),i=r(6096);class s extends i.AbstractFieldChildDeploymentInfoBuilder{multiInstance=!1;minItems=null;maxItems=null;constructor(e,t){super(e,t)}withMultiInstance(e){return this.multiInstance=e,this}withMinItems(e){return this.minItems=e,this}withMaxItems(e){return this.maxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.minItems,this.maxItems);const e=new a.ChildDeploymentInfo(this.name);return this.setCommonData(e),e.multiInstance=this.multiInstance,e.minItems=this.minItems,e.maxItems=this.maxItems,e}}t.ChildDeploymentInfoBuilder=s},4831(e,t,r){t.ChildDeploymentInfoElement=void 0;const n=r(3812);class a extends n.AbstractDynamicChildDeploymentInfo{_multiInstance=!1;_minItems=null;_maxItems=null;static empty(){return new a("")}constructor(e){super(e)}get multiInstance(){return this._multiInstance}set multiInstance(e){this._multiInstance=e}get minItems(){return this._minItems}set minItems(e){this._minItems=e}get maxItems(){return this._maxItems}set maxItems(e){this._maxItems=e}isMultiInAnyWay(){return this._multiInstance}}t.ChildDeploymentInfoElement=a},6976(e,t,r){t.ChildDeploymentInfoElementBuilder=void 0;const n=r(8198),a=r(4809),i=r(4831);class s extends a.AbstractDynamicChildDeploymentInfoBuilder{multiInstance=!1;minItems=null;maxItems=null;constructor(e,t){super(e,t)}withMultiInstance(e){return this.multiInstance=e,this}withMinItems(e){return this.minItems=e,this}withMaxItems(e){return this.maxItems=e,this}build(){(0,n.assertItemBounds)(this.name,this.minItems,this.maxItems);const e=new i.ChildDeploymentInfoElement(this.name);return this.setCommonData(e),e.multiInstance=this.multiInstance,e.minItems=this.minItems,e.maxItems=this.maxItems,e}}t.ChildDeploymentInfoElementBuilder=s},3581(e,t,r){t.ChildDeploymentInfoStatic=void 0;const n=r(513);class a extends n.AbstractChildDeploymentInfo{_hidden=!1;static empty(){return new a("")}constructor(e){super(e)}get hidden(){return this._hidden}set hidden(e){this._hidden=e}isMultiInAnyWay(){return!1}}t.ChildDeploymentInfoStatic=a},8290(e,t,r){t.ChildDeploymentInfoStaticBuilder=void 0;const n=r(6910),a=r(3581);class i extends n.AbstractChildDeploymentInfoBuilder{hidden=!1;constructor(e,t){super(e,t)}withHidden(e){return this.hidden=e,this}build(){const e=new a.ChildDeploymentInfoStatic(this.name);return super.setCommonData(e),e.hidden=this.hidden,e}}t.ChildDeploymentInfoStaticBuilder=i},1492(e,t,r){t.ContainerArtifactChildrenInfo=void 0;const n=r(2763),a=r(2733),i=r(9034),s=r(3812);t.ContainerArtifactChildrenInfo=class{childNameList=[];childMap=new Map;add(e){this.childNameList.push(e.name),this.childMap.set(e.name,e)}get children(){return this.childNameList.map(e=>this.childMap.get(e))}has(e){return this.childMap.has(e)}get(e){return this.childMap.get(e)??null}getChildrenNames(){return Array.from(this.childMap.keys())}getChildrenNamesForRequiredInProperties(){const e=[];for(const[t,r]of this.childMap.entries())r.atType!==n.CedarArtifactType.STATIC_TEMPLATE_FIELD&&r.uiInputType!==i.UiInputType.ATTRIBUTE_VALUE&&e.push(t);return e}getChildrenNamesForRequired(){const e=[];for(const[t,r]of this.childMap.entries())r.atType!==n.CedarArtifactType.STATIC_TEMPLATE_FIELD&&r.uiInputType!==i.UiInputType.ATTRIBUTE_VALUE&&e.push(t);return e}getOnlyElementNamesForPropertiesContextRequired(){const e=[];for(const[t,r]of this.childMap.entries())r.atType===n.CedarArtifactType.TEMPLATE_ELEMENT&&e.push(t);return e}getPropertyLabelMap(e){const t={};return this.childNameList.forEach(e=>{const r=this.getChildInfo(e);null!==r.label&&(t[r.name]=r.label)}),t}getPropertyDescriptionMap(e){const t={};return this.childNameList.forEach(e=>{const r=this.getChildInfo(e);null!==r.description&&(t[r.name]=r.description)}),t}getChildIriMap(){return this.collectChildIris(!1)}collectChildIris(e){const t={};return this.childNameList.forEach(r=>{const a=this.getChildInfo(r);a.atType===n.CedarArtifactType.STATIC_TEMPLATE_FIELD||!e&&a.uiInputType===i.UiInputType.ATTRIBUTE_VALUE||a instanceof s.AbstractDynamicChildDeploymentInfo&&null!==a.iri&&(t[a.name]=a.iri)}),t}getChildNamesWithIri(){const e=this.getChildIriMap();return this.getChildrenNames().filter(t=>Object.prototype.hasOwnProperty.call(e,t))}getIRIMap(){const e={},t=this.collectChildIris(!0);return Object.keys(t).forEach(r=>{e[r]={[a.JsonSchema.enum]:[t[r]]}}),e}hasAttributeValue(){for(const e of this.childMap.values())if(e.uiInputType===i.UiInputType.ATTRIBUTE_VALUE)return!0;return!1}getChildInfo(e){return this.childMap.get(e)}}},8198(e,t){t.UNBOUNDED_MAX_ITEMS=void 0,t.assertItemBounds=function(e,r,n){for(const[t,a]of[["minItems",r],["maxItems",n]])if(null!==a&&(!Number.isInteger(a)||a>2147483647))throw new Error(`${t} must be an integer no greater than 2147483647 in ${e}`);if(null!==r&&r<0)throw new Error(`minItems must be zero or greater in ${e}`);if(null!==n&&n<0)throw new Error(`maxItems must be zero or greater in ${e}`);if(null!==r&&null!==n&&n!==t.UNBOUNDED_MAX_ITEMS&&r>n)throw new Error(`minItems must be less than or equal to maxItems in ${e}`)},t.UNBOUNDED_MAX_ITEMS=0},7661(e,t,r){t.TemplateElement=void 0;const n=r(3910),a=r(8557),i=r(1027),s=r(5451),o=r(2763),l=r(6976);class c extends s.AbstractContainerArtifact{skos_altLabel=null;skos_prefLabel=null;header=null;footer=null;constructor(){super(),this.cedarArtifactType=o.CedarArtifactType.TEMPLATE_ELEMENT}static buildEmptyWithNullValues(){return new c}static buildEmptyWithDefaultValues(){const e=new c;return e.schema_schemaVersion=a.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=i.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){return new l.ChildDeploymentInfoElementBuilder(this,e)}}t.TemplateElement=c},1762(e,t,r){t.TemplateElementBuilder=void 0;const n=r(1641),a=r(7661);class i extends n.AbstractArtifactBuilder{children=[];instanceTypeSpecification=null;withInstanceTypeSpecification(e){return this.instanceTypeSpecification=e,this}addChild(e,t){return this.children.push([e,t]),this}build(){const e=a.TemplateElement.buildEmptyWithNullValues();return super.buildInternal(e),e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateElementBuilder=i},7282(e,t){t.ChoiceOptionEntity=void 0,t.ChoiceOptionEntity=class{label;selectedByDefault;statesSelectedByDefault;constructor(e,t,r=!0){if(null==e||""===e)throw new Error("A permitted value requires a label. A choice that names nothing cannot be chosen.");this.label=e,this.selectedByDefault=t,this.statesSelectedByDefault=r}}},6145(e,t,r){t.DefaultValueSerialization=void 0;const n=r(8802),a=r(8748);t.DefaultValueSerialization=class{static literalFromNode(e,t){return a.ReaderUtil.getString(e,t)}static writeLiteral(e,t,r){null!==r&&""!==r&&(e[t]=r)}static iriFromNode(e,t){if(""===a.ReaderUtil.getString(e,t))return null;const r=a.ReaderUtil.getIdentifier(e,t);return null===r?null:new n.Iri(r)}static writeIri(e,t,r){null===r||r.isEmpty()||(e[t]=r.getValue())}}},3557(e,t,r){t.JsonValueConstraintsWriter=void 0;const n=r(3161);class a extends n.JsonAbstractArtifactWriter{}t.JsonValueConstraintsWriter=a},9129(e,t,r){t.TemplateField=void 0;const n=r(4328),a=r(4869),i=r(8333);class s extends i.AbstractSchemaArtifact{skos_altLabel=null;skos_prefLabel=null;hidden=!1;requiredValue=!1;recommendedValue=!1;continuePreviousLine=!1;valueConstraints=new n.ValueConstraints;cedarFieldType=a.CedarFieldType.NULL;isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}supportsValueRecommendation(){return!1}}t.TemplateField=s},3350(e,t,r){t.TemplateFieldBuilder=void 0;const n=r(1641);class a extends n.AbstractArtifactBuilder{skos_altLabel=null;skos_prefLabel=null;withAlternateLabels(e){return this.skos_altLabel=e,this}addAlternateLabel(e){return null===this.skos_altLabel&&(this.skos_altLabel=[]),this.skos_altLabel.push(e),this}withPreferredLabel(e){return this.skos_prefLabel=e,this}buildInternal(e){super.buildInternal(e),e.skos_altLabel=this.skos_altLabel,e.skos_prefLabel=this.skos_prefLabel}}t.TemplateFieldBuilder=a},855(e,t,r){t.UnknownTemplateField=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3608);class o extends n.TemplateField{constructor(){super(),this.cedarFieldType=a.CedarFieldType.NULL,this.cedarArtifactType=i.CedarArtifactType.NULL}static build(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoBuilder(this,e)}}t.UnknownTemplateField=o},4328(e,t){t.ValueConstraints=void 0,t.ValueConstraints=class{constructor(){}}},1902(e,t,r){t.ValueConstraintsIriField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsIriField=a},7765(e,t,r){t.ValueConstraintsLiteralField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;constructor(){super()}}t.ValueConstraintsLiteralField=a},119(e,t,r){t.YamlValueConstraintsWriter=void 0;const n=r(211);class a extends n.YamlAbstractArtifactWriter{}t.YamlValueConstraintsWriter=a},2052(e,t,r){t.AttributeValueFieldBuilderImpl=void 0;const n=r(3350),a=r(9571);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.AttributeValueFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.AttributeValueFieldBuilderImpl=i},9571(e,t,r){t.AttributeValueFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(4328),o=r(3239);class l extends n.TemplateField{constructor(){super(),this.cedarFieldType=a.CedarFieldType.ATTRIBUTE_VALUE,this.valueConstraints=new s.ValueConstraints,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.AttributeValueFieldImpl=l},9366(e,t,r){t.JsonFieldReaderAttributeValue=void 0;const n=r(4385),a=r(9571);class i extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const i=a.AttributeValueFieldImpl.buildEmpty();return this.readRequiredAndHidden(e,t),i}}t.JsonFieldReaderAttributeValue=i},1442(e,t,r){t.JsonFieldWriterAttributeValue=void 0;const n=r(455),a=r(2748),i=r(9517),s=r(936),o=r(5793);class l extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}getAsJsonNode(e,t=n.ChildDeploymentInfo.standalone()){const r=super.getAsJsonNode(e,t);return t instanceof n.ChildDeploymentInfo&&t.isStandalone()?{type:"array",minItems:0,items:r}:r}expandPropertiesNode(e){}expandRequiredNode(e){}expandTypeNode(e,t){e[s.CedarModel.type]=this.atomicWriter.write(o.JavascriptType.STRING)}buildValueConstraintsObject(e){return i.JsonNode.getEmpty()}}t.JsonFieldWriterAttributeValue=l},529(e,t,r){t.YamlFieldReaderAttributeValue=void 0;const n=r(5675),a=r(9571);class i extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){return a.AttributeValueFieldImpl.buildEmpty()}}t.YamlFieldReaderAttributeValue=i},1521(e,t,r){t.YamlFieldWriterAttributeValue=void 0;const n=r(5430);class a extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}}t.YamlFieldWriterAttributeValue=a},4675(e,t,r){t.CheckboxFieldBuilderImpl=void 0;const n=r(3350),a=r(9915),i=r(9282);class s extends n.TemplateFieldBuilder{defaultValue=null;literals=[];constructor(){super()}static create(){return new s}addCheckboxOption(e,t){return this.literals.push(new a.CheckboxOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.CheckboxFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.literals=this.literals,e}}t.CheckboxFieldBuilderImpl=s},9282(e,t,r){t.CheckboxFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1489),o=r(3239);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.CHECKBOX,this.valueConstraints=new s.ValueConstraintsCheckboxField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.CheckboxFieldImpl=l},9915(e,t,r){t.CheckboxOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.CheckboxOption=a},19(e,t,r){t.JsonFieldReaderCheckbox=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(9915),o=r(9282),l=r(6145);class c extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const c=o.CheckboxFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=d){c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(d,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(d,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),i=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new s.CheckboxOption(t,r,i);c.valueConstraints.literals.push(e)}})}return c}}t.JsonFieldReaderCheckbox=c},8663(e,t,r){t.JsonFieldWriterCheckbox=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=!0}}t.JsonFieldWriterCheckbox=s},1489(e,t,r){t.ValueConstraintsCheckboxField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsCheckboxField=a},7268(e,t,r){t.YamlFieldReaderCheckbox=void 0;const n=r(8748),a=r(9915),i=r(5675),s=r(2099),o=r(9282),l=r(6145),c=r(9299);class d extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.CheckboxFieldImpl.buildEmpty();c.YamlFieldReaderControlledTerm.readStatedConstraints(e,i),d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const u=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==u&&u.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),i=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new a.CheckboxOption(t,r,i);d.valueConstraints.literals.push(e)}}),d}}t.YamlFieldReaderCheckbox=d},4500(e,t,r){t.YamlFieldWriterCheckbox=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterCheckbox=s},9916(e,t,r){t.ControlledTermFieldBuilderImpl=void 0;const n=r(5376),a=r(3350),i=r(6731);class s extends a.TemplateFieldBuilder{valueConstraints=new n.ValueConstraintsControlledTermField;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.valueConstraints.defaultValue=e,this}addOntology(e){return this.valueConstraints.ontologies.push(e),this}addValueSet(e){return this.valueConstraints.valueSets.push(e),this}addClass(e){return this.valueConstraints.classes.push(e),this}addBranch(e){return this.valueConstraints.branches.push(e),this}addAction(e){return this.valueConstraints.actions.push(e),this}build(){const e=i.ControlledTermFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints=this.valueConstraints,e}}t.ControlledTermFieldBuilderImpl=s},6731(e,t,r){t.ControlledTermFieldImpl=void 0;const n=r(9129),a=r(5376),i=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=i.CedarFieldType.CONTROLLED_TERM,this.valueConstraints=new a.ValueConstraintsControlledTermField,this.cedarArtifactType=s.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}supportsValueRecommendation(){return!0}}t.ControlledTermFieldImpl=l},8728(e,t,r){t.JsonFieldReaderControlledTerm=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(8354),o=r(2418),l=r(9184),c=r(2395),d=r(7295),u=r(2733),m=r(7432),p=r(4531),h=r(6731),f=r(5753),y=r(4563),T=r(6681);class g extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const s=h.ControlledTermFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const o=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=o){const t=i.add(a.CedarModel.valueConstraints);T.JsonTermConstraintChecks.assertEntriesAreObjects(e,i),s.valueConstraints.ontologies=this.getOntologies(n.ReaderUtil.getNodeList(o,a.CedarModel.ontologies),t.add(a.CedarModel.ontologies)),s.valueConstraints.classes=this.getClasses(n.ReaderUtil.getNodeList(o,a.CedarModel.classes)),s.valueConstraints.branches=this.getBranches(n.ReaderUtil.getNodeList(o,a.CedarModel.branches),t.add(a.CedarModel.branches)),s.valueConstraints.valueSets=this.getValueSets(n.ReaderUtil.getNodeList(o,a.CedarModel.valueSets),t.add(a.CedarModel.valueSets)),T.JsonTermConstraintChecks.assertReadable(e,i),s.valueConstraints.defaultValue=this.getDefaultValue(n.ReaderUtil.getNodeOrNull(o,a.CedarModel.defaultValue)),s.valueConstraints.actions=this.getActions(n.ReaderUtil.getNodeList(o,a.CedarModel.actions))}return s}getOntologies(e,t){const r=[];return e.forEach((e,i)=>{const o=new s.ControlledTermOntology(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getJsonJavaIntOrNull(e,a.CedarModel.ValueConstraints.numTerms,t.add(i)),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...g.readSourceAndVersion(e));r.push(o)}),r}getClasses(e){const t=[];return e.forEach(e=>{const r=new o.ControlledTermClass(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.label),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonType(g.own(e,a.CedarModel.ValueConstraints.type),"A class constraint"),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.prefLabel),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...g.readSourceAndVersion(e));t.push(r)}),t}getBranches(e,t){const r=[];return e.forEach((e,i)=>{const s=new l.ControlledTermBranch(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.acronym),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getRequiredJsonJavaInt(e,a.CedarModel.ValueConstraints.maxDepth,t.add(i)),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...g.readSourceAndVersion(e));r.push(s)}),r}getValueSets(e,t){const r=[];return e.forEach((e,i)=>{const s=new c.ControlledTermValueSet(n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.vsCollection),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.name),n.ReaderUtil.getJsonJavaIntOrNull(e,a.CedarModel.ValueConstraints.numTerms,t.add(i)),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.uri),...g.readSourceAndVersion(e));r.push(s)}),r}getActions(e){const t=[];return e.forEach(e=>{const r=new m.ControlledTermAction(n.ReaderUtil.getNumber(e,a.CedarModel.ValueConstraints.to),m.ControlledTermAction.forAction(g.own(e,a.CedarModel.ValueConstraints.action)),n.ReaderUtil.getIdentifierURI(e,a.CedarModel.ValueConstraints.termUri),n.ReaderUtil.getURI(e,a.CedarModel.ValueConstraints.sourceUri),n.ReaderUtil.getStringOrEmpty(e,a.CedarModel.ValueConstraints.source),p.BioportalTermType.forJsonType(g.own(e,a.CedarModel.ValueConstraints.type),"A controlled-term action"));t.push(r)}),t}static own(e,t){return Object.hasOwn(e,t)?e[t]:void 0}static readSourceAndVersion(e){const t=n.ReaderUtil.getURI(e,a.CedarModel.ValueConstraints.iri),r=g.readVersion(n.ReaderUtil.getNodeOrNull(e,a.CedarModel.ValueConstraints.version));return[t.isEmpty()?null:t,n.ReaderUtil.getString(e,a.CedarModel.ValueConstraints.sourceSystem),r]}static readVersion(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;const t=n.ReaderUtil.getNodeOrNull(e,a.CedarModel.ValueConstraints.versionId);if("string"!=typeof t||""===t)throw new Error(`A pinned version needs a non-empty string at "${a.CedarModel.ValueConstraints.version}.${a.CedarModel.ValueConstraints.versionId}".`);if(y.JavaStrings.isBlank(t))throw new Error(`A pinned version's id at "${a.CedarModel.ValueConstraints.version}.${a.CedarModel.ValueConstraints.versionId}" must not be blank.`);return new f.ControlledTermVersion(t,n.ReaderUtil.getString(e,a.CedarModel.ValueConstraints.versionEffectiveDate),n.ReaderUtil.getString(e,a.CedarModel.ValueConstraints.versionDeclaredVersion))}getDefaultValue(e){if(null==e)return null;const t=n.ReaderUtil.getString(e,u.JsonSchema.rdfsLabel);return Object.hasOwn(e,u.JsonSchema.termUri)||null!==t?new d.ControlledTermDefaultValue(n.ReaderUtil.getIdentifierURI(e,u.JsonSchema.termUri),t??""):null}}t.JsonFieldReaderControlledTerm=g},8280(e,t,r){t.JsonFieldWriterControlledTerm=void 0;const n=r(9517),a=r(936),i=r(2748),s=r(2733),o=r(9932);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[s.JsonSchema.properties]=o.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[s.JsonSchema.properties]=o.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}expandValueConstraintsNode(e,t,r){const i=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{i.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.ontologies]=i;const o=n.JsonNode.getEmptyList();t.valueConstraints.valueSets.forEach(e=>{o.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.valueSets]=o;const l=n.JsonNode.getEmptyList();t.valueConstraints.classes.forEach(e=>{l.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.classes]=l;const c=n.JsonNode.getEmptyList();t.valueConstraints.branches.forEach(e=>{c.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),e[a.CedarModel.branches]=c;const d=n.JsonNode.getEmptyList();if(t.valueConstraints.actions.forEach(e=>{d.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),d.length>0&&(e[a.CedarModel.actions]=d),null!=t.valueConstraints.defaultValue){const r=n.JsonNode.getEmpty();r[s.JsonSchema.termUri]=this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),r[s.JsonSchema.rdfsLabel]=t.valueConstraints.defaultValue.rdfsLabel,e[a.CedarModel.defaultValue]=r}super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterControlledTerm=l},5376(e,t,r){t.ValueConstraintsControlledTermField=void 0;const n=r(4328);class a extends n.ValueConstraints{defaultValue=null;ontologies=[];valueSets=[];classes=[];branches=[];actions=[];constructor(){super()}}t.ValueConstraintsControlledTermField=a},9299(e,t,r){t.YamlFieldReaderControlledTerm=void 0;const n=r(8748),a=r(7295),i=r(4531),s=r(5675),o=r(2099),l=r(8349),c=r(5491),d=r(3091),u=r(2957),m=r(1556),p=r(7733),h=r(7432),f=r(6731),y=r(8802),T=r(5753),g=r(4563),E=r(8979),C=[l.YamlValues.Controlled.ontology,l.YamlValues.Controlled.class,l.YamlValues.Controlled.branch,l.YamlValues.Controlled.valueSet],I=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class A extends s.YamlTemplateFieldTypeSpecificReader{read(e,t,r,s){const l=f.ControlledTermFieldImpl.buildEmpty();n.ReaderUtil.getNodeList(e,o.YamlKeys.values).forEach((e,t)=>{A.assertValueConstraintType(e,s.add(o.YamlKeys.values,t,o.YamlKeys.type)),this.readValueConstraint(e,l,s.add(o.YamlKeys.values,t))});const c=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.default);if(null!==c){const e=n.ReaderUtil.getIdentifierURI(c,o.YamlKeys.value),t=n.ReaderUtil.getStringOrEmpty(c,o.YamlKeys.label);l.valueConstraints.defaultValue=new a.ControlledTermDefaultValue(e,t)}return n.ReaderUtil.getNodeList(e,o.YamlKeys.actions).forEach(e=>{const t=(new p.ControlledTermActionBuilder).withAction(h.ControlledTermAction.forAction(Object.hasOwn(e,o.YamlKeys.action)?e[o.YamlKeys.action]:void 0)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withType(i.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.type))).withTermUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termIri)).withTo(n.ReaderUtil.getNumber(e,o.YamlKeys.Controlled.to)).withSourceUri(n.ReaderUtil.getURI(e,o.YamlKeys.Controlled.sourceIri));l.valueConstraints.actions.push(t.build())}),l}static readStatedConstraints(e,t){const r=new A;n.ReaderUtil.getNodeList(e,o.YamlKeys.values).forEach((e,n)=>{if(I(e)&&Object.hasOwn(e,o.YamlKeys.type)){A.assertValueConstraintType(e,t.add(o.YamlKeys.values,n,o.YamlKeys.type));try{r.readValueConstraint(e,f.ControlledTermFieldImpl.buildEmpty(),t.add(o.YamlKeys.values,n))}catch(r){const a=r instanceof Error?r.message:String(r);throw new Error(`The entry at ${t.add(o.YamlKeys.values,n).toPointer()} states the ${o.YamlKeys.type} "${e[o.YamlKeys.type]}" and is read as that kind of constraint. ${a}`,{cause:r})}}})}readValueConstraint(e,t,r){const a=n.ReaderUtil.getString(e,o.YamlKeys.type);if(a===l.YamlValues.Controlled.ontology){const a=(new c.ControlledTermOntologyBuilder).withAcronym(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceName)).withUri(this.ontologyUri(e)).withNumTerms(A.readInteger(e,o.YamlKeys.Controlled.termCount,r));this.readSourceAndVersion(e,a),t.valueConstraints.ontologies.push(a.build())}else if(a===l.YamlValues.Controlled.class){const r=n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termLabel),a=n.ReaderUtil.getString(e,o.YamlKeys.Controlled.termDisplayLabel),s=(new d.ControlledTermClassBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termIri)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withLabel(a??r).withPrefLabel(r).withType(i.BioportalTermType.forYamlValue(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termType)));this.readSourceAndVersion(e,s),t.valueConstraints.classes.push(s.build())}else if(a===l.YamlValues.Controlled.branch){const a=(new u.ControlledTermBranchBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termBaseIri)).withSource(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceName)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termBaseLabel)).withAcronym(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withMaxDepth(A.readInteger(e,o.YamlKeys.Controlled.termMaxDepth,r)??0);this.readSourceAndVersion(e,a),t.valueConstraints.branches.push(a.build())}else if(a===l.YamlValues.Controlled.valueSet){const a=(new m.ControlledTermValueSetBuilder).withUri(n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.termBaseIri)).withNumTerms(A.readInteger(e,o.YamlKeys.Controlled.termCount,r)).withVsCollection(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym)).withName(n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.termBaseLabel));this.readSourceAndVersion(e,a),t.valueConstraints.valueSets.push(a.build())}}static assertValueConstraintType(e,t){if(!I(e)||!Object.hasOwn(e,o.YamlKeys.type))return;const r=e[o.YamlKeys.type];if("string"!=typeof r||!C.includes(r)){const e="string"==typeof r?r:JSON.stringify(r);throw new Error(`Invalid value constraint type "${e}" at ${t.toPointer()}. A value constraint type is one of ontology, class, branch or valueSet.`)}}static readInteger(e,t,r){return n.ReaderUtil.getJavaIntOrNull(e,t,r,(0,E.yamlNumberSpelling)(e,t))}ontologyUri(e){return null!=n.ReaderUtil.getString(e,o.YamlKeys.Controlled.sourceUri)?n.ReaderUtil.getIdentifierURI(e,o.YamlKeys.Controlled.sourceUri):new y.Iri(l.YamlValues.Controlled.derivedOntologyAddressPrefix+n.ReaderUtil.getStringOrEmpty(e,o.YamlKeys.Controlled.sourceAcronym))}readSourceAndVersion(e,t){const r=n.ReaderUtil.getURI(e,o.YamlKeys.Controlled.sourceIri);r.isEmpty()||t.withIri(r),t.withSourceSystem(n.ReaderUtil.getString(e,o.YamlKeys.Controlled.sourceSystem)),t.withVersion(this.readVersion(n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.version)))}readVersion(e){if(null===e||"object"!=typeof e||Array.isArray(e))return null;const t=n.ReaderUtil.getNodeOrNull(e,o.YamlKeys.Controlled.versionId);if("string"!=typeof t||""===t)throw new Error(`A pinned version needs a non-empty string at "${o.YamlKeys.version}.${o.YamlKeys.Controlled.versionId}".`);if(g.JavaStrings.isBlank(t))throw new Error(`A pinned version's id at "${o.YamlKeys.version}.${o.YamlKeys.Controlled.versionId}" must not be blank.`);return new T.ControlledTermVersion(t,n.ReaderUtil.getString(e,o.YamlKeys.Controlled.versionEffectiveDate),n.ReaderUtil.getString(e,o.YamlKeys.Controlled.versionDeclaredVersion))}}t.YamlFieldReaderControlledTerm=A},9535(e,t,r){t.YamlFieldWriterControlledTerm=void 0;const n=r(9517),a=r(5430),i=r(2099),s=r(4216);class o extends a.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return{[i.YamlKeys.datatype]:s.NonStandardDatatype.IRI}}expandValueConstraintsNodeForYAML(e,t,r){if(null!=t.valueConstraints.defaultValue){const r={[i.YamlKeys.value]:this.atomicWriter.write(t.valueConstraints.defaultValue.termUri),[i.YamlKeys.label]:t.valueConstraints.defaultValue.rdfsLabel};e[i.YamlKeys.default]=r}const a=n.JsonNode.getEmptyList();t.valueConstraints.ontologies.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.classes.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.branches.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),t.valueConstraints.valueSets.forEach(e=>{a.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),a.length>0&&(e[i.YamlKeys.values]=a);const s=n.JsonNode.getEmptyList();t.valueConstraints.actions.forEach(e=>{s.push(this.writers.getWriterForValueConstraint(e).getAsJsonNode(e))}),s.length>0&&(e[i.YamlKeys.actions]=s)}}t.YamlFieldWriterControlledTerm=o},1524(e,t,r){t.AbstractJsonControlledTermValueConstraintWriter=void 0;const n=r(9517),a=r(3557),i=r(936);class s extends a.JsonValueConstraintsWriter{writeSourceAndVersion(e,t){null===t.iri||t.iri.isEmpty()||(e[i.CedarModel.ValueConstraints.iri]=this.atomicWriter.write(t.iri)),null!==t.sourceSystem&&(e[i.CedarModel.ValueConstraints.sourceSystem]=t.sourceSystem);const r=t.version;if(null!==r){const t=n.JsonNode.getEmpty();t[i.CedarModel.ValueConstraints.versionId]=r.id,null!==r.effectiveDate&&(t[i.CedarModel.ValueConstraints.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(t[i.CedarModel.ValueConstraints.versionDeclaredVersion]=r.declaredVersion),e[i.CedarModel.ValueConstraints.version]=t}}}t.AbstractJsonControlledTermValueConstraintWriter=s},4339(e,t,r){t.AbstractYamlControlledTermValueConstraintWriter=void 0;const n=r(9517),a=r(119),i=r(2099);class s extends a.YamlValueConstraintsWriter{writeSourceSystem(e,t){null!==t.sourceSystem&&(e[i.YamlKeys.Controlled.sourceSystem]=t.sourceSystem)}writeSourceIri(e,t){null===t.iri||t.iri.isEmpty()||(e[i.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(t.iri))}writeVersion(e,t){const r=t.version;if(null===r)return;const a=n.JsonNode.getEmpty();a[i.YamlKeys.Controlled.versionId]=r.id,null!==r.effectiveDate&&(a[i.YamlKeys.Controlled.versionEffectiveDate]=r.effectiveDate),null!==r.declaredVersion&&(a[i.YamlKeys.Controlled.versionDeclaredVersion]=r.declaredVersion),e[i.YamlKeys.version]=a}}t.AbstractYamlControlledTermValueConstraintWriter=s},2369(e,t,r){t.ControlledTermAbstractValueConstraint=void 0;const n=r(4328);class a extends n.ValueConstraints{className="ControlledTermAbstractValueConstraint";_iri;_sourceSystem;_version;constructor(e=null,t=null,r=null){super(),this._iri=e,this._sourceSystem=t,this._version=r}get iri(){return this._iri}get sourceSystem(){return this._sourceSystem}get version(){return this._version}}t.ControlledTermAbstractValueConstraint=a},7295(e,t){t.ControlledTermDefaultValue=void 0,t.ControlledTermDefaultValue=class{_termUri;_rdfsLabel;constructor(e,t){this._termUri=e,this._rdfsLabel=t}get termUri(){return this._termUri}get rdfsLabel(){return this._rdfsLabel}isControlledDefaultValue(){return!1}}},2480(e,t,r){t.ControlledTermDefaultValueBuilder=void 0;const n=r(8802),a=r(7295),i=r(3539);t.ControlledTermDefaultValueBuilder=class{termUri=n.Iri.empty();rdfsLabel="";withTermUri(e){return this.termUri=e,this}withRdfsLabel(e){return this.rdfsLabel=e,this}build(){return i.ValueConstraintRequirements.requireIri(this.termUri,"a term URI","A controlled-term default value"),i.ValueConstraintRequirements.requireText(this.rdfsLabel,"a label","A controlled-term default value"),new a.ControlledTermDefaultValue(this.termUri,this.rdfsLabel)}}},5753(e,t,r){t.ControlledTermVersion=void 0;const n=r(4563);t.ControlledTermVersion=class{_id;_effectiveDate;_declaredVersion;constructor(e,t=null,r=null){if("string"!=typeof e||""===e)throw new Error("A pinned version requires an id. A version with no id identifies no snapshot.");if(n.JavaStrings.isBlank(e))throw new Error("A pinned version's id must not be blank. An id made only of whitespace identifies no snapshot.");this._id=e,this._effectiveDate=t,this._declaredVersion=r}get id(){return this._id}get effectiveDate(){return this._effectiveDate}get declaredVersion(){return this._declaredVersion}}},3539(e,t){t.ValueConstraintRequirements=void 0,t.ValueConstraintRequirements=class{static requireText(e,t,r){if(null==e||""===e)throw new Error(`${r} requires ${t}.`)}static requireIri(e,t,r){if(null==e||e.isEmpty())throw new Error(`${r} requires ${t}. A constraint that points at nothing cannot be resolved.`)}static requireTermType(e,t){if(null==e||null===e.getJsonValue())throw new Error(`${t} requires a term type.`)}}},7432(e,t,r){t.ControlledTermAction=t.B=void 0;const n=r(2369);t.B={DELETE:"delete",MOVE:"move"};class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermAction";static forAction(e){if(null==e)throw new Error("A controlled-term action requires an action.");if(e!==t.B.DELETE&&e!==t.B.MOVE)throw new Error(`No value constraints action type constant with text ${"string"==typeof e?e:JSON.stringify(e)} found`);return e}className="ControlledTermAction";_to=null;_action;_termUri;_sourceUri;_source;_type;constructor(e,t,r,n,a,i){super(),this._to=e,this._action=t,this._termUri=r,this._sourceUri=n,this._source=a,this._type=i}get to(){return this._to}get action(){return this._action}get termUri(){return this._termUri}get sourceUri(){return this._sourceUri}get source(){return this._source}get type(){return this._type}}t.ControlledTermAction=a},7733(e,t,r){t.ControlledTermActionBuilder=void 0;const n=r(8802),a=r(7432),i=r(3539),s=r(4531);t.ControlledTermActionBuilder=class{_to=null;_action="";_termUri=n.Iri.empty();_sourceUri=n.Iri.empty();_source="";_type=s.BioportalTermType.NULL;withTo(e){return this._to=e,this}withAction(e){return this._action=e,this}withTermUri(e){return this._termUri=e,this}withSourceUri(e){return this._sourceUri=e,this}withSource(e){return this._source=e,this}withType(e){return this._type=e,this}build(){return i.ValueConstraintRequirements.requireText(this._action,"an action","A controlled-term action"),i.ValueConstraintRequirements.requireIri(this._termUri,"a term URI","A controlled-term action"),i.ValueConstraintRequirements.requireIri(this._sourceUri,"a source URI","A controlled-term action"),i.ValueConstraintRequirements.requireText(this._source,"a source","A controlled-term action"),i.ValueConstraintRequirements.requireTermType(this._type,"A controlled-term action"),new a.ControlledTermAction(this._to,this._action,this._termUri,this._sourceUri,this._source,this._type)}}},8014(e,t,r){t.JsonValueConstraintsActionWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.termUri]=this.atomicWriter.write(e.termUri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),t[a.CedarModel.ValueConstraints.action]=e.action,t[a.CedarModel.ValueConstraints.sourceUri]=this.atomicWriter.write(e.sourceUri),null!==e.to&&(t[a.CedarModel.ValueConstraints.to]=e.to),t}}t.JsonValueConstraintsActionWriter=s},4647(e,t,r){t.YamlValueConstraintsActionWriter=void 0;const n=r(9517),a=r(4339),i=r(2099);class s extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.action]=e.action,null!==e.to&&(t[i.YamlKeys.Controlled.to]=e.to),t[i.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.termUri),t[i.YamlKeys.Controlled.sourceIri]=this.atomicWriter.write(e.sourceUri),t[i.YamlKeys.Controlled.sourceAcronym]=e.source,t[i.YamlKeys.type]=this.atomicWriter.write(e.type),t}}t.YamlValueConstraintsActionWriter=s},9184(e,t,r){t.ControlledTermBranch=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermBranch";className="ControlledTermBranch";_source;_acronym;_name;_uri;_maxDepth=0;constructor(e,t,r,n,a,i=null,s=null,o=null){super(i,s,o),this._source=e,this._acronym=t,this._uri=a,this._name=r,this._maxDepth=n}get source(){return this._source}get acronym(){return this._acronym}get name(){return this._name}get uri(){return this._uri}get maxDepth(){return this._maxDepth}}t.ControlledTermBranch=a},2957(e,t,r){t.ControlledTermBranchBuilder=void 0;const n=r(8802),a=r(9184),i=r(3539);t.ControlledTermBranchBuilder=class{_source="";_acronym="";_name="";_uri=n.Iri.empty();_maxDepth=0;_iri=null;_sourceSystem=null;_version=null;withSource(e){return this._source=e,this}withAcronym(e){return this._acronym=e,this}withName(e){return this._name=e,this}withUri(e){return this._uri=e,this}withMaxDepth(e){return this._maxDepth=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A branch constraint"),i.ValueConstraintRequirements.requireText(this._source,"a source","A branch constraint"),i.ValueConstraintRequirements.requireText(this._acronym,"an acronym","A branch constraint"),i.ValueConstraintRequirements.requireText(this._name,"a name","A branch constraint"),new a.ControlledTermBranch(this._source,this._acronym,this._name,this._maxDepth,this._uri,this._iri,this._sourceSystem,this._version)}}},7054(e,t,r){t.JsonValueConstraintsBranchWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.acronym]=e.acronym,t[a.CedarModel.ValueConstraints.name]=e.name,t[a.CedarModel.ValueConstraints.maxDepth]=e.maxDepth,this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsBranchWriter=s},3671(e,t,r){t.YamlValueConstraintsBranchWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.branch,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[i.YamlKeys.Controlled.sourceName]=e.source,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termBaseLabel]=e.name,t[i.YamlKeys.Controlled.termMaxDepth]=e.maxDepth,this.writeVersion(t,e),t}}t.YamlValueConstraintsBranchWriter=o},2418(e,t,r){t.ControlledTermClass=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermClass";className="ControlledTermClass";_label;_source;_type;_prefLabel;_uri;constructor(e,t,r,n,a,i=null,s=null,o=null){super(i,s,o),this._label=e,this._source=t,this._type=r,this._prefLabel=n,this._uri=a}get label(){return this._label}get source(){return this._source}get type(){return this._type}get prefLabel(){return this._prefLabel}get uri(){return this._uri}}t.ControlledTermClass=a},3091(e,t,r){t.ControlledTermClassBuilder=void 0;const n=r(8802),a=r(2418),i=r(3539),s=r(4531);t.ControlledTermClassBuilder=class{_label="";_source="";_type=s.BioportalTermType.NULL;_prefLabel="";_uri=n.Iri.empty();_iri=null;_sourceSystem=null;_version=null;withLabel(e){return this._label=e,this}withSource(e){return this._source=e,this}withType(e){return this._type=e,this}withPrefLabel(e){return this._prefLabel=e,this}withUri(e){return this._uri=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A class constraint"),i.ValueConstraintRequirements.requireText(this._label,"a label","A class constraint"),i.ValueConstraintRequirements.requireText(this._prefLabel,"a preferred label","A class constraint"),i.ValueConstraintRequirements.requireText(this._source,"a source","A class constraint"),i.ValueConstraintRequirements.requireTermType(this._type,"A class constraint"),new a.ControlledTermClass(this._label,this._source,this._type,this._prefLabel,this._uri,this._iri,this._sourceSystem,this._version)}}},9222(e,t,r){t.JsonValueConstraintsClassWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.source]=e.source,t[a.CedarModel.ValueConstraints.label]=e.label,t[a.CedarModel.ValueConstraints.prefLabel]=e.prefLabel,t[a.CedarModel.ValueConstraints.type]=this.atomicWriter.write(e.type),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsClassWriter=s},765(e,t,r){t.YamlValueConstraintsClassWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.class,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.source,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termType]=this.atomicWriter.write(e.type),t[i.YamlKeys.Controlled.termLabel]=e.prefLabel,e.label!==e.prefLabel&&(t[i.YamlKeys.Controlled.termDisplayLabel]=e.label),this.writeVersion(t,e),t}}t.YamlValueConstraintsClassWriter=o},8354(e,t,r){t.ControlledTermOntology=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermOntology";className="ControlledTermOntology";_acronym;_name;_uri;_numTerms=0;constructor(e,t,r,n,a=null,i=null,s=null){super(a,i,s),this._acronym=e,this._name=t,this._uri=n,this._numTerms=r}get acronym(){return this._acronym}get name(){return this._name}get uri(){return this._uri}get numTerms(){return this._numTerms}}t.ControlledTermOntology=a},5491(e,t,r){t.ControlledTermOntologyBuilder=void 0;const n=r(8802),a=r(8354),i=r(3539);t.ControlledTermOntologyBuilder=class{acronym="";name="";numTerms=null;uri=n.Iri.empty();iri=null;sourceSystem=null;version=null;withAcronym(e){return this.acronym=e,this}withName(e){return this.name=e,this}withNumTerms(e){return this.numTerms=e,this}withUri(e){return this.uri=e,this}withIri(e){return this.iri=e,this}withSourceSystem(e){return this.sourceSystem=e,this}withVersion(e){return this.version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this.uri,"a URI","An ontology constraint"),i.ValueConstraintRequirements.requireText(this.acronym,"an acronym","An ontology constraint"),i.ValueConstraintRequirements.requireText(this.name,"a name","An ontology constraint"),new a.ControlledTermOntology(this.acronym,this.name,this.numTerms,this.uri,this.iri,this.sourceSystem,this.version)}}},5996(e,t,r){t.JsonValueConstraintsOntologyWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.acronym]=e.acronym,t[a.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[a.CedarModel.ValueConstraints.numTerms]=e.numTerms),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsOntologyWriter=s},1181(e,t,r){t.YamlValueConstraintsOntologyWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();t[i.YamlKeys.type]=s.YamlValues.Controlled.ontology,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.acronym,t[i.YamlKeys.Controlled.sourceName]=e.name,this.writeSourceIri(t,e);const r=s.YamlValues.Controlled.bioPortalOntologyAddress.exec(e.uri.getValue())?.[1];return e.uri.isEmpty()||r===e.acronym||(t[i.YamlKeys.Controlled.sourceUri]=this.atomicWriter.write(e.uri)),null!==e.numTerms&&(t[i.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsOntologyWriter=o},2395(e,t,r){t.ControlledTermValueSet=void 0;const n=r(2369);class a extends n.ControlledTermAbstractValueConstraint{static className="ControlledTermValueSet";className="ControlledTermValueSet";_vsCollection;_name;_uri;_numTerms=0;constructor(e,t,r,n,a=null,i=null,s=null){super(a,i,s),this._vsCollection=e,this._name=t,this._uri=n,this._numTerms=r}get vsCollection(){return this._vsCollection}get name(){return this._name}get uri(){return this._uri}get numTerms(){return this._numTerms}}t.ControlledTermValueSet=a},1556(e,t,r){t.ControlledTermValueSetBuilder=void 0;const n=r(8802),a=r(2395),i=r(3539);t.ControlledTermValueSetBuilder=class{_vsCollection="";_name="";_uri=n.Iri.empty();_numTerms=null;_iri=null;_sourceSystem=null;_version=null;withVsCollection(e){return this._vsCollection=e,this}withName(e){return this._name=e,this}withUri(e){return this._uri=e,this}withNumTerms(e){return this._numTerms=e,this}withIri(e){return this._iri=e,this}withSourceSystem(e){return this._sourceSystem=e,this}withVersion(e){return this._version=e,this}build(){return i.ValueConstraintRequirements.requireIri(this._uri,"a URI","A value-set constraint"),i.ValueConstraintRequirements.requireText(this._vsCollection,"a value-set collection","A value-set constraint"),i.ValueConstraintRequirements.requireText(this._name,"a name","A value-set constraint"),new a.ControlledTermValueSet(this._vsCollection,this._name,this._numTerms,this._uri,this._iri,this._sourceSystem,this._version)}}},2813(e,t,r){t.JsonValueConstraintsValueSetWriter=void 0;const n=r(9517),a=r(936),i=r(1524);class s extends i.AbstractJsonControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonString(e,t=2){return JSON.stringify(this.getAsJsonNode(e),null,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[a.CedarModel.ValueConstraints.uri]=this.atomicWriter.write(e.uri),t[a.CedarModel.ValueConstraints.vsCollection]=e.vsCollection,t[a.CedarModel.ValueConstraints.name]=e.name,null!==e.numTerms&&(t[a.CedarModel.ValueConstraints.numTerms]=e.numTerms),this.writeSourceAndVersion(t,e),t}}t.JsonValueConstraintsValueSetWriter=s},9532(e,t,r){t.YamlValueConstraintsValueSetWriter=void 0;const n=r(9517),a=r(4339),i=r(2099),s=r(8349);class o extends a.AbstractYamlControlledTermValueConstraintWriter{constructor(e,t){super(e,t)}getAsJsonNode(e){const t=n.JsonNode.getEmpty();return t[i.YamlKeys.type]=s.YamlValues.Controlled.valueSet,this.writeSourceSystem(t,e),t[i.YamlKeys.Controlled.sourceAcronym]=e.vsCollection,this.writeSourceIri(t,e),t[i.YamlKeys.Controlled.termBaseIri]=this.atomicWriter.write(e.uri),t[i.YamlKeys.Controlled.termBaseLabel]=e.name,null!==e.numTerms&&(t[i.YamlKeys.Controlled.termCount]=e.numTerms),this.writeVersion(t,e),t}}t.YamlValueConstraintsValueSetWriter=o},1667(e,t,r){t.EmailFieldBuilderImpl=void 0;const n=r(6830),a=r(3350),i=r(4450);class s extends a.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"email"},_valueConstraints:{defaultValue:this.defaultValue}});const e=i.EmailFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.EmailFieldBuilderImpl=s},4450(e,t,r){t.EmailFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EMAIL,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.EmailFieldImpl=l},2691(e,t,r){t.JsonFieldReaderEmail=void 0;const n=r(4385),a=r(4450),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.EmailFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderEmail=l},9031(e,t,r){t.JsonFieldWriterEmail=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterEmail=s},3054(e,t,r){t.YamlFieldReaderEmail=void 0;const n=r(5675),a=r(4450),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.EmailFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderEmail=o},1038(e,t,r){t.YamlFieldWriterEmail=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterEmail=s},6610(e,t,r){t.ExtDoiFieldBuilderImpl=void 0;const n=r(3350),a=r(997);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtDoiFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtDoiFieldBuilderImpl=i},997(e,t,r){t.ExtDoiFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_DOI,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtDoiFieldImpl=l},8583(e,t,r){t.JsonFieldReaderExtDoi=void 0;const n=r(4385),a=r(997),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtDoiFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtDoi=l},7412(e,t,r){t.JsonFieldWriterExtDoi=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtDoi=l},5907(e,t,r){t.YamlFieldReaderExtDoi=void 0;const n=r(5675),a=r(997),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtDoiFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtDoi=o},6967(e,t,r){t.YamlFieldWriterExtDoi=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtDoi=s},9062(e,t,r){t.ExtNihGrantIdFieldBuilderImpl=void 0;const n=r(3350),a=r(7313);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtNihGrantIdFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtNihGrantIdFieldBuilderImpl=i},7313(e,t,r){t.ExtNihGrantIdFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_NIH_GRANT_ID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtNihGrantIdFieldImpl=l},1886(e,t,r){t.JsonFieldReaderExtNihGrantId=void 0;const n=r(4385),a=r(7313),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtNihGrantIdFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtNihGrantId=l},5250(e,t,r){t.JsonFieldWriterExtNihGrantId=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtNihGrantId=l},8543(e,t,r){t.YamlFieldReaderExtNihGrantId=void 0;const n=r(5675),a=r(7313),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtNihGrantIdFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtNihGrantId=o},3711(e,t,r){t.YamlFieldWriterExtNihGrantId=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtNihGrantId=s},2376(e,t,r){t.ExtOrcidFieldBuilderImpl=void 0;const n=r(3350),a=r(5967);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtOrcidFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtOrcidFieldBuilderImpl=i},5967(e,t,r){t.ExtOrcidFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_ORCID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtOrcidFieldImpl=l},4956(e,t,r){t.JsonFieldReaderExtOrcid=void 0;const n=r(4385),a=r(5967),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtOrcidFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtOrcid=l},8096(e,t,r){t.JsonFieldWriterExtOrcid=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtOrcid=l},7123(e,t,r){t.YamlFieldReaderExtOrcid=void 0;const n=r(5675),a=r(5967),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtOrcidFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtOrcid=o},4355(e,t,r){t.YamlFieldWriterExtOrcid=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtOrcid=s},3914(e,t,r){t.ExtPfasFieldBuilderImpl=void 0;const n=r(3350),a=r(6637);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtPfasFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPfasFieldBuilderImpl=i},6637(e,t,r){t.ExtPfasFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_PFAS,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtPfasFieldImpl=l},6854(e,t,r){t.JsonFieldReaderExtPfas=void 0;const n=r(4385),a=r(6637),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtPfasFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPfas=l},6122(e,t,r){t.JsonFieldWriterExtPfas=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtPfas=l},5075(e,t,r){t.YamlFieldReaderExtPfas=void 0;const n=r(5675),a=r(6637),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtPfasFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtPfas=o},5587(e,t,r){t.YamlFieldWriterExtPfas=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPfas=s},7162(e,t,r){t.ExtPubmedFieldBuilderImpl=void 0;const n=r(3350),a=r(2685);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtPubmedFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtPubmedFieldBuilderImpl=i},2685(e,t,r){t.ExtPubmedFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_PUBMED,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtPubmedFieldImpl=l},3028(e,t,r){t.JsonFieldReaderExtPubmed=void 0;const n=r(4385),a=r(2685),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtPubmedFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtPubmed=l},3312(e,t,r){t.JsonFieldWriterExtPubmed=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtPubmed=l},7709(e,t,r){t.YamlFieldReaderExtPubmed=void 0;const n=r(5675),a=r(2685),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtPubmedFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtPubmed=o},6557(e,t,r){t.YamlFieldWriterExtPubmed=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtPubmed=s},7328(e,t,r){t.ExtRorFieldBuilderImpl=void 0;const n=r(3350),a=r(4007);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtRorFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRorFieldBuilderImpl=i},4007(e,t,r){t.ExtRorFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_ROR,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtRorFieldImpl=l},8244(e,t,r){t.JsonFieldReaderExtRor=void 0;const n=r(4385),a=r(4007),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtRorFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRor=l},7584(e,t,r){t.JsonFieldWriterExtRor=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtRor=l},6651(e,t,r){t.YamlFieldReaderExtRor=void 0;const n=r(5675),a=r(4007),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtRorFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtRor=o},491(e,t,r){t.YamlFieldWriterExtRor=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRor=s},3474(e,t,r){t.ExtRridFieldBuilderImpl=void 0;const n=r(3350),a=r(789);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.ExtRridFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.ExtRridFieldBuilderImpl=i},789(e,t,r){t.ExtRridFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.EXT_RRID,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.ExtRridFieldImpl=l},7004(e,t,r){t.JsonFieldReaderExtRrid=void 0;const n=r(4385),a=r(789),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.ExtRridFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderExtRrid=l},4780(e,t,r){t.JsonFieldWriterExtRrid=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterExtRrid=l},6089(e,t,r){t.YamlFieldReaderExtRrid=void 0;const n=r(5675),a=r(789),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.ExtRridFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderExtRrid=o},4077(e,t,r){t.YamlFieldWriterExtRrid=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterExtRrid=s},7095(e,t,r){t.JsonFieldReaderLink=void 0;const n=r(4385),a=r(4084),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.LinkFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.iriFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderLink=l},3691(e,t,r){t.JsonFieldWriterLink=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6145);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){o.DefaultValueSerialization.writeIri(e,s.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandPropertiesNode(e){this.behavior.includeSkosNotationForLinksAndControlled()?e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI:e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION}expandRequiredNode(e){}}t.JsonFieldWriterLink=l},9497(e,t,r){t.LinkFieldBuilderImpl=void 0;const n=r(3350),a=r(4084);class i extends n.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new i}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=a.LinkFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.LinkFieldBuilderImpl=i},4084(e,t,r){t.LinkFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1902),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.LINK,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.valueConstraints=new s.ValueConstraintsIriField}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.LinkFieldImpl=l},8568(e,t,r){t.YamlFieldReaderLink=void 0;const n=r(5675),a=r(4084),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.LinkFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.iriFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderLink=o},1784(e,t,r){t.YamlFieldWriterLink=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeIri(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterLink=s},1513(e,t,r){t.MultipleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class a extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!0}static create(){return new a}build(){return super.build()}}t.MultipleChoiceListFieldBuilderImpl=a},4932(e,t,r){t.MultipleChoiceListFieldImpl=void 0;const n=r(5316),a=r(4869),i=r(3239);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!0,this.cedarFieldType=a.CedarFieldType.MULTIPLE_SELECT_LIST}static buildEmpty(){return new s}isMultiInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new i.ChildDeploymentInfoAlwaysMultipleBuilder(this,e)}}t.MultipleChoiceListFieldImpl=s},7124(e,t,r){t.YamlFieldReaderMultiSelectList=void 0;const n=r(5675),a=r(4932),i=r(9299);class s extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,s){const o=a.MultipleChoiceListFieldImpl.buildEmpty();return i.YamlFieldReaderControlledTerm.readStatedConstraints(e,s),n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,o),o}}t.YamlFieldReaderMultiSelectList=s},9105(e,t,r){t.SingleChoiceListFieldBuilderImpl=void 0;const n=r(9513);class a extends n.ListFieldBuilderImpl{constructor(){super(),this.multipleChoice=!1}static create(){return new a}build(){return super.build()}}t.SingleChoiceListFieldBuilderImpl=a},1676(e,t,r){t.SingleChoiceListFieldImpl=void 0;const n=r(5316),a=r(3608),i=r(4869);class s extends n.ListFieldImpl{constructor(){super(),this.multipleChoice=!1,this.cedarFieldType=i.CedarFieldType.SINGLE_SELECT_LIST}static buildEmpty(){return new s}createDeploymentBuilder(e){return new a.ChildDeploymentInfoBuilder(this,e)}}t.SingleChoiceListFieldImpl=s},2709(e,t,r){t.YamlFieldReaderSingleSelectList=void 0;const n=r(5675),a=r(1676),i=r(9299);class s extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,s){const o=a.SingleChoiceListFieldImpl.buildEmpty();return i.YamlFieldReaderControlledTerm.readStatedConstraints(e,s),n.YamlTemplateFieldTypeSpecificReader.readAndStoreListValueConstraints(e,o),o}}t.YamlFieldReaderSingleSelectList=s},2419(e,t,r){t.JsonFieldReaderList=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(4081),o=r(4932),l=r(1676),c=r(6145);class d extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){let d=l.SingleChoiceListFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const u=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=u){n.ReaderUtil.getBoolean(u,a.CedarModel.multipleChoice)&&(d=o.MultipleChoiceListFieldImpl.buildEmpty()),d.valueConstraints.defaultValue=c.DefaultValueSerialization.literalFromNode(u,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(u,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),i=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new s.ListOption(t,r,i);d.valueConstraints.literals.push(e)}})}return d}}t.JsonFieldReaderList=d},7335(e,t,r){t.JsonFieldWriterList=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=t.multipleChoice}}t.JsonFieldWriterList=s},9513(e,t,r){t.ListFieldBuilderImpl=void 0;const n=r(4081),a=r(3350),i=r(4932),s=r(1676);class o extends a.TemplateFieldBuilder{multipleChoice=!1;defaultValue=null;literals=[];constructor(){super()}withDefaultValue(e){return this.defaultValue=e,this}addListOption(e,t){return this.literals.push(new n.ListOption(e,t??!1,void 0!==t)),this}build(){let e;if(e=this.multipleChoice?i.MultipleChoiceListFieldImpl.buildEmpty():s.SingleChoiceListFieldImpl.buildEmpty(),super.buildInternal(e),!this.multipleChoice){let e=-1;for(let t=this.literals.length-1;t>=0;t--)if(this.literals[t].selectedByDefault){e=t;break}-1!==e&&this.literals.forEach((t,r)=>{t.selectedByDefault=r===e,t.statesSelectedByDefault=t.selectedByDefault})}return e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.literals=this.literals,e}}t.ListFieldBuilderImpl=o},5316(e,t,r){t.ListFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1623);class o extends n.TemplateField{valueConstraints;multipleChoice;constructor(){super(),this.cedarFieldType=a.CedarFieldType.NULL,this.valueConstraints=new s.ValueConstraintsListField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD,this.multipleChoice=!1}}t.ListFieldImpl=o},4081(e,t,r){t.ListOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.ListOption=a},1623(e,t,r){t.ValueConstraintsListField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsListField=a},3080(e,t,r){t.YamlFieldWriterList=void 0;const n=r(5430),a=r(9499),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){s.DefaultValueSerialization.writeLiteral(e,i.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}getYamlType(e){return e.multipleChoice?a.YamlArtifactType.MULTI_SELECT_LIST.getValue():a.YamlArtifactType.SINGLE_SELECT_LIST.getValue()}}t.YamlFieldWriterList=o},1769(e,t,r){t.JsonFieldReaderNumeric=void 0;const n=r(8748),a=r(936),i=r(3447),s=r(4385),o=r(4074),l=r(6444);class c extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const c=o.NumericFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=d){const e=n.ReaderUtil.getString(d,a.CedarModel.numberType);null!==e&&(c.valueConstraints.numberType=i.NumberType.forDatatype(e)),c.valueConstraints.minValue=n.ReaderUtil.getExactNumber(d,a.CedarModel.minValue),c.valueConstraints.maxValue=n.ReaderUtil.getExactNumber(d,a.CedarModel.maxValue),c.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(d,a.CedarModel.decimalPlace),c.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(d,a.CedarModel.unitOfMeasure),c.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(d,a.CedarModel.defaultValue),l.NumericDefaultValueValidator.assertValid(c.valueConstraints.numberType,c.valueConstraints.defaultValue,c.valueConstraints.minValue,c.valueConstraints.maxValue)}return c}}t.JsonFieldReaderNumeric=c},4841(e,t,r){t.JsonFieldWriterNumeric=void 0;const n=r(9932),a=r(2733),i=r(2748),s=r(936),o=r(6444);class l extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandPropertiesNode(e){e[a.JsonSchema.properties]=n.JsonTemplateFieldContentDynamic.PROPERTIES_VERBATIM_LITERAL}expandRequiredNode(e){e[a.JsonSchema.required]=[a.JsonSchema.atValue,a.JsonSchema.atType]}expandValueConstraintsNode(e,t,r){o.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[s.CedarModel.numberType]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[s.CedarModel.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[s.CedarModel.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[s.CedarModel.decimalPlace]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[s.CedarModel.unitOfMeasure]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[s.CedarModel.defaultValue]=String(t.valueConstraints.defaultValue)),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterNumeric=l},6444(e,t,r){t.NumericDefaultValueValidator=void 0;const n=r(3447),a=r(2108);t.NumericDefaultValueValidator=class{static assertValid(e,t,r=null,i=null){if(null!==r&&a.NumericPolicy.value(r),null!==i&&a.NumericPolicy.value(i),null!==r&&null!==i&&a.NumericPolicy.compare(r,i)>0)throw new Error("Minimum value exceeds maximum value.");if(null===t)return;a.NumericPolicy.value(t);const s=e.getValue();if(null===s)throw new Error("Numeric default requires a numeric datatype.");const o={[n.NumberTypeValues.BYTE]:["-128","127"],[n.NumberTypeValues.SHORT]:["-32768","32767"],[n.NumberTypeValues.INT]:["-2147483648","2147483647"],[n.NumberTypeValues.LONG]:["-9223372036854775808","9223372036854775807"]}[s];if(o){if("number"==typeof t&&!Number.isSafeInteger(t))throw new Error("Numeric default requires exact decimal text for integers beyond the safe JavaScript range.");if(!a.NumericPolicy.isInteger(t))throw new Error(`Numeric default ${t} must be an integer for ${s}.`);if(a.NumericPolicy.compare(t,o[0])<0||a.NumericPolicy.compare(t,o[1])>0)throw new Error(`Numeric default ${t} is outside the ${s} range.`)}if(s===n.NumberTypeValues.FLOAT||s===n.NumberTypeValues.DOUBLE){const e=String(t).replace(/^-/,""),r=s===n.NumberTypeValues.FLOAT?"3.4028234663852886e38":"1.7976931348623157e308",i=s===n.NumberTypeValues.FLOAT?"1.401298464324817e-45":"4.9e-324";if(a.NumericPolicy.compare(e,r)>0||0!==a.NumericPolicy.compare(e,0)&&a.NumericPolicy.compare(e,i)<0)throw new Error(`Numeric default ${t} is outside the ${s} range.`)}if(null!==r&&a.NumericPolicy.compare(t,r)<0)throw new Error(`Numeric default ${t} is below minValue ${r}.`);if(null!==i&&a.NumericPolicy.compare(t,i)>0)throw new Error(`Numeric default ${t} is above maxValue ${i}.`)}}},3675(e,t,r){t.NumericFieldBuilderImpl=void 0;const n=r(6830),a=r(2108),i=r(3350),s=r(3447),o=r(4074),l=r(6444);class c extends i.TemplateFieldBuilder{numberType=s.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}static create(){return new c}withNumberType(e){return this.numberType=e,this}withMinValue(e){return this.minValue=null===e?null:a.NumericPolicy.value(e),this}withMaxValue(e){return this.maxValue=null===e?null:a.NumericPolicy.value(e),this}withDecimalPlaces(e){return this.decimalPlaces=e,this}withUnitOfMeasure(e){return this.unitOfMeasure=e,this}withDefaultValue(e){return this.defaultValue=null===e?null:a.NumericPolicy.value(e),this}build(){l.NumericDefaultValueValidator.assertValid(this.numberType,this.defaultValue,this.minValue,this.maxValue),n.FieldValuePolicy.assertConsistent({_ui:{inputType:"numeric"},_valueConstraints:{numberType:this.numberType.getValue(),defaultValue:this.defaultValue,minValue:this.minValue,maxValue:this.maxValue,decimalPlace:this.decimalPlaces}});const e=o.NumericFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.numberType=this.numberType,e.valueConstraints.minValue=this.minValue,e.valueConstraints.maxValue=this.maxValue,e.valueConstraints.decimalPlaces=this.decimalPlaces,e.valueConstraints.unitOfMeasure=this.unitOfMeasure,e.valueConstraints.defaultValue=this.defaultValue,e}}t.NumericFieldBuilderImpl=c},4074(e,t,r){t.NumericFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(1211),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.NUMERIC,this.valueConstraints=new s.ValueConstraintsNumericField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.NumericFieldImpl=l},1211(e,t,r){t.ValueConstraintsNumericField=void 0;const n=r(4328),a=r(3447);class i extends n.ValueConstraints{numberType=a.NumberType.DECIMAL;minValue=null;maxValue=null;decimalPlaces=null;unitOfMeasure=null;defaultValue=null;constructor(){super()}}t.ValueConstraintsNumericField=i},1872(e,t,r){t.YamlFieldReaderNumeric=void 0;const n=r(8748),a=r(3447),i=r(5675),s=r(2099),o=r(4074),l=r(6444);class c extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const c=o.NumericFieldImpl.buildEmpty(),d=n.ReaderUtil.getString(e,s.YamlKeys.datatype);return null!==d&&(c.valueConstraints.numberType=a.NumberType.forDatatype(d)),c.valueConstraints.minValue=n.ReaderUtil.getExactNumber(e,s.YamlKeys.minValue),c.valueConstraints.maxValue=n.ReaderUtil.getExactNumber(e,s.YamlKeys.maxValue),c.valueConstraints.decimalPlaces=n.ReaderUtil.getNumber(e,s.YamlKeys.decimalPlaces),c.valueConstraints.unitOfMeasure=n.ReaderUtil.getString(e,s.YamlKeys.unit),c.valueConstraints.defaultValue=n.ReaderUtil.getNumericDefault(e,s.YamlKeys.default),l.NumericDefaultValueValidator.assertValid(c.valueConstraints.numberType,c.valueConstraints.defaultValue,c.valueConstraints.minValue,c.valueConstraints.maxValue),c}}t.YamlFieldReaderNumeric=c},3292(e,t,r){t.YamlFieldWriterNumeric=void 0;const n=r(5430),a=r(2099),i=r(6444);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.NumericDefaultValueValidator.assertValid(t.valueConstraints.numberType,t.valueConstraints.defaultValue,t.valueConstraints.minValue,t.valueConstraints.maxValue),e[a.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.numberType),null!=t.valueConstraints.minValue&&(e[a.YamlKeys.minValue]=t.valueConstraints.minValue),null!=t.valueConstraints.maxValue&&(e[a.YamlKeys.maxValue]=t.valueConstraints.maxValue),null!=t.valueConstraints.decimalPlaces&&(e[a.YamlKeys.decimalPlaces]=t.valueConstraints.decimalPlaces),null!=t.valueConstraints.unitOfMeasure&&(e[a.YamlKeys.unit]=t.valueConstraints.unitOfMeasure),null!=t.valueConstraints.defaultValue&&(e[a.YamlKeys.default]=t.valueConstraints.defaultValue)}}t.YamlFieldWriterNumeric=s},1468(e,t,r){t.JsonFieldReaderPhoneNumber=void 0;const n=r(4385),a=r(7459),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.PhoneNumberFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue)),l}}t.JsonFieldReaderPhoneNumber=l},6876(e,t,r){t.JsonFieldWriterPhoneNumber=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterPhoneNumber=s},8084(e,t,r){t.PhoneNumberFieldBuilderImpl=void 0;const n=r(6830),a=r(3350),i=r(7459);class s extends a.TemplateFieldBuilder{defaultValue=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"phone-number"},_valueConstraints:{defaultValue:this.defaultValue}});const e=i.PhoneNumberFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e}}t.PhoneNumberFieldBuilderImpl=s},7459(e,t,r){t.PhoneNumberFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(7765),o=r(3608);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.PHONE_NUMBER,this.valueConstraints=new s.ValueConstraintsLiteralField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}}t.PhoneNumberFieldImpl=l},4329(e,t,r){t.YamlFieldReaderPhoneNumber=void 0;const n=r(5675),a=r(7459),i=r(2099),s=r(6145);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.PhoneNumberFieldImpl.buildEmpty();return o.valueConstraints.defaultValue=s.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),o}}t.YamlFieldReaderPhoneNumber=o},9821(e,t,r){t.YamlFieldWriterPhoneNumber=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue)}}t.YamlFieldWriterPhoneNumber=s},9053(e,t,r){t.JsonFieldReaderRadio=void 0;const n=r(8748),a=r(936),i=r(3315),s=r(4385),o=r(8618),l=r(6145);class c extends s.JsonTemplateFieldTypeSpecificReader{read(e,t,r,s){const c=o.RadioFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const d=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=d){c.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(d,a.CedarModel.defaultValue);const e=n.ReaderUtil.getNodeList(d,a.CedarModel.literals);null!==e&&e.forEach(e=>{const t=n.ReaderUtil.getString(e,a.CedarModel.label),r=n.ReaderUtil.getBoolean(e,a.CedarModel.selectedByDefault),s=Object.hasOwn(e,a.CedarModel.selectedByDefault);if(null!=t){const e=new i.RadioOption(t,r,s);c.valueConstraints.literals.push(e)}})}return c}}t.JsonFieldReaderRadio=c},9309(e,t,r){t.JsonFieldWriterRadio=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),this.expandLiterals(t,e),super.expandValueConstraintsNode(e,t,r),e[n.CedarModel.multipleChoice]=!1}}t.JsonFieldWriterRadio=s},2875(e,t,r){t.RadioFieldBuilderImpl=void 0;const n=r(3350),a=r(3315),i=r(8618);class s extends n.TemplateFieldBuilder{defaultValue=null;literals=[];constructor(){super()}static create(){return new s}addRadioOption(e,t){return this.literals.push(new a.RadioOption(e,t??!1,void 0!==t)),this}withDefaultValue(e){return this.defaultValue=e,this}build(){const e=i.RadioFieldImpl.buildEmpty();super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue;let t=-1;for(let e=this.literals.length-1;e>=0;e--)if(this.literals[e].selectedByDefault){t=e;break}return-1!==t&&this.literals.forEach((e,r)=>{e.selectedByDefault=r===t,e.statesSelectedByDefault=e.selectedByDefault}),e.valueConstraints.literals=this.literals,e}}t.RadioFieldBuilderImpl=s},8618(e,t,r){t.RadioFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(9931),o=r(587);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.RADIO,this.valueConstraints=new s.ValueConstraintsRadioField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}isSingleInstanceByDefinition(){return!0}createDeploymentBuilder(e){return new o.ChildDeploymentInfoAlwaysSingleBuilder(this,e)}}t.RadioFieldImpl=l},3315(e,t,r){t.RadioOption=void 0;const n=r(7282);class a extends n.ChoiceOptionEntity{constructor(e,t,r=!0){super(e,t,r)}}t.RadioOption=a},9931(e,t,r){t.ValueConstraintsRadioField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{literals=[];constructor(){super()}}t.ValueConstraintsRadioField=a},4284(e,t,r){t.YamlFieldReaderRadio=void 0;const n=r(8748),a=r(3315),i=r(5675),s=r(2099),o=r(8618),l=r(6145),c=r(9299);class d extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const d=o.RadioFieldImpl.buildEmpty();c.YamlFieldReaderControlledTerm.readStatedConstraints(e,i),d.valueConstraints.defaultValue=l.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default);const u=n.ReaderUtil.getNodeList(e,s.YamlKeys.values);return null!==u&&u.forEach(e=>{const t=n.ReaderUtil.getString(e,s.YamlKeys.label),r=n.ReaderUtil.getBoolean(e,s.YamlKeys.selected),i=Object.hasOwn(e,s.YamlKeys.selected);if(null!=t){const e=new a.RadioOption(t,r,i);d.valueConstraints.literals.push(e)}}),d}}t.YamlFieldReaderRadio=d},8136(e,t,r){t.YamlFieldWriterRadio=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),this.expandLiterals(t,e)}}t.YamlFieldWriterRadio=s},9315(e,t,r){t.JsonFieldReaderTemporal=void 0;const n=r(8748),a=r(936),i=r(8588),s=r(3764),o=r(7974),l=r(4385),c=r(964),d=r(6342);class u extends l.JsonTemplateFieldTypeSpecificReader{read(e,t,r,l){const u=c.TemporalFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const m=n.ReaderUtil.getNode(e,a.CedarModel.ui);if(null!=m){u.temporalGranularity=o.TemporalGranularity.forGranularity(n.ReaderUtil.getString(m,a.CedarModel.temporalGranularity));const e=n.ReaderUtil.getString(m,a.CedarModel.inputTimeFormat);null!==e&&(u.inputTimeFormat=s.TimeFormat.forInputTimeFormat(e)),u.timezoneEnabled=n.ReaderUtil.getBooleanOrNull(m,a.CedarModel.timezoneEnabled)}const p=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);if(null!=p){const e=n.ReaderUtil.getString(p,a.CedarModel.temporalType);null!==e&&(u.valueConstraints.temporalType=i.TemporalType.forDatatype(e)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(p,a.CedarModel.defaultValue),d.TemporalDefaultValueValidator.assertValid(u.valueConstraints.temporalType,u.temporalGranularity,u.valueConstraints.defaultValue)}return u}}t.JsonFieldReaderTemporal=u},5459(e,t,r){t.JsonFieldWriterTemporal=void 0;const n=r(936),a=r(3764),i=r(7974),s=r(2748),o=r(2733),l=r(6342);class c extends s.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINode(e,t,r){if(t.temporalGranularity===i.TemporalGranularity.NULL)throw new Error("A temporal field must have a granularity.");super.expandUINode(e,t,r),e[n.CedarModel.temporalGranularity]=this.atomicWriter.write(t.temporalGranularity),i.TemporalGranularity.hasTime(t.temporalGranularity)&&(t.inputTimeFormat!==a.TimeFormat.NULL&&(e[n.CedarModel.inputTimeFormat]=this.atomicWriter.write(t.inputTimeFormat)),null!==t.timezoneEnabled&&(e[n.CedarModel.timezoneEnabled]=t.timezoneEnabled))}expandValueConstraintsNode(e,t,r){l.TemporalDefaultValueValidator.assertValid(t.valueConstraints.temporalType,t.temporalGranularity,t.valueConstraints.defaultValue),e[n.CedarModel.temporalType]=this.atomicWriter.write(t.valueConstraints.temporalType),null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[n.CedarModel.defaultValue]=t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r)}expandRequiredNode(e){e[o.JsonSchema.required]=[o.JsonSchema.atValue,o.JsonSchema.atType]}}t.JsonFieldWriterTemporal=c},6342(e,t,r){t.TemporalDefaultValueValidator=void 0;const n=r(5036);t.TemporalDefaultValueValidator=class{static assertValid(e,t,r){n.TemporalDefaultPolicy.assertValid(e.getValue(),t.getValue(),r)}}},345(e,t,r){t.TemporalFieldBuilderImpl=void 0;const n=r(3350),a=r(3764),i=r(7974),s=r(8588),o=r(964),l=r(6342),c=r(6830);class d extends n.TemplateFieldBuilder{timezoneEnabled=!1;inputTimeFormat=a.TimeFormat.NULL;temporalGranularity=i.TemporalGranularity.NULL;temporalType=s.TemporalType.DATETIME;defaultValue=null;constructor(){super()}static create(){return new d}withTimezoneEnabled(e){return this.timezoneEnabled=e,this}withInputTimeFormat(e){return this.inputTimeFormat=e,this}withTemporalGranularity(e){return this.temporalGranularity=e,this}withTemporalType(e){return this.temporalType=e,this}withDefaultValue(e){return this.defaultValue=e,this}build(){l.TemporalDefaultValueValidator.assertValid(this.temporalType,this.temporalGranularity,this.defaultValue),c.FieldValuePolicy.assertConsistent({_ui:{inputType:"temporal",timezoneEnabled:this.timezoneEnabled,temporalGranularity:this.temporalGranularity.getValue()},_valueConstraints:{temporalType:this.temporalType.getValue(),defaultValue:this.defaultValue}});const e=o.TemporalFieldImpl.buildEmpty();return super.buildInternal(e),e.timezoneEnabled=this.timezoneEnabled,e.inputTimeFormat=this.inputTimeFormat,e.temporalGranularity=this.temporalGranularity,e.valueConstraints.temporalType=this.temporalType,e.valueConstraints.defaultValue=this.defaultValue,e}}t.TemporalFieldBuilderImpl=d},964(e,t,r){t.TemporalFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3567),o=r(3764),l=r(7974),c=r(3608);class d extends n.TemplateField{valueConstraints;timezoneEnabled=null;inputTimeFormat=o.TimeFormat.NULL;temporalGranularity=l.TemporalGranularity.NULL;constructor(){super(),this.cedarFieldType=a.CedarFieldType.TEMPORAL,this.valueConstraints=new s.ValueConstraintsTemporalField,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new d}createDeploymentBuilder(e){return new c.ChildDeploymentInfoBuilder(this,e)}}t.TemporalFieldImpl=d},3567(e,t,r){t.ValueConstraintsTemporalField=void 0;const n=r(4328),a=r(8588);class i extends n.ValueConstraints{temporalType=a.TemporalType.DATETIME;defaultValue=null;constructor(){super()}}t.ValueConstraintsTemporalField=i},384(e,t,r){t.YamlFieldReaderTemporal=void 0;const n=r(8748),a=r(8588),i=r(3764),s=r(7974),o=r(5675),l=r(2099),c=r(964),d=r(6342);class u extends o.YamlTemplateFieldTypeSpecificReader{read(e,t,r,o){const u=c.TemporalFieldImpl.buildEmpty();u.temporalGranularity=s.TemporalGranularity.forGranularity(n.ReaderUtil.getString(e,l.YamlKeys.granularity));const m=n.ReaderUtil.getString(e,l.YamlKeys.inputTimeFormat);null!==m&&(u.inputTimeFormat=i.TimeFormat.forInputTimeFormat(m)),u.timezoneEnabled=n.ReaderUtil.getBooleanOrNull(e,l.YamlKeys.inputTimeZone);const p=n.ReaderUtil.getString(e,l.YamlKeys.datatype);return null!==p&&(u.valueConstraints.temporalType=a.TemporalType.forDatatype(p)),u.valueConstraints.defaultValue=n.ReaderUtil.getString(e,l.YamlKeys.default),d.TemporalDefaultValueValidator.assertValid(u.valueConstraints.temporalType,u.temporalGranularity,u.valueConstraints.defaultValue),u}}t.YamlFieldReaderTemporal=u},7436(e,t,r){t.YamlFieldWriterTemporal=void 0;const n=r(3764),a=r(7974),i=r(5430),s=r(2099),o=r(6342);class l extends i.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){if(t.temporalGranularity===a.TemporalGranularity.NULL)throw new Error("A temporal field must have a granularity.");o.TemporalDefaultValueValidator.assertValid(t.valueConstraints.temporalType,t.temporalGranularity,t.valueConstraints.defaultValue),e[s.YamlKeys.datatype]=this.atomicWriter.write(t.valueConstraints.temporalType),e[s.YamlKeys.granularity]=this.atomicWriter.write(t.temporalGranularity),null!=t.valueConstraints.defaultValue&&""!==t.valueConstraints.defaultValue&&(e[s.YamlKeys.default]=t.valueConstraints.defaultValue),t.temporalGranularity!==a.TemporalGranularity.YEAR&&t.temporalGranularity!==a.TemporalGranularity.MONTH&&t.temporalGranularity!==a.TemporalGranularity.DAY&&(t.inputTimeFormat!==n.TimeFormat.NULL&&(e[s.YamlKeys.inputTimeFormat]=this.atomicWriter.write(t.inputTimeFormat)),null!==t.timezoneEnabled&&(e[s.YamlKeys.inputTimeZone]=t.timezoneEnabled))}}t.YamlFieldWriterTemporal=l},9683(e,t,r){t.JsonFieldReaderTextArea=void 0;const n=r(4385),a=r(5450),i=r(8748),s=r(936),o=r(6145);class l extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const l=a.TextAreaImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=i.ReaderUtil.getNode(e,s.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,s.CedarModel.defaultValue),l.valueConstraints.minLength=i.ReaderUtil.getNumber(c,s.CedarModel.minLength),l.valueConstraints.maxLength=i.ReaderUtil.getNumber(c,s.CedarModel.maxLength)),l}}t.JsonFieldReaderTextArea=l},275(e,t,r){t.JsonFieldWriterTextArea=void 0;const n=r(2748),a=r(936),i=r(6145);class s extends n.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.CedarModel.defaultValue,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[a.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[a.CedarModel.maxLength]=t.valueConstraints.maxLength),super.expandValueConstraintsNode(e,t,r)}}t.JsonFieldWriterTextArea=s},1259(e,t,r){t.TextAreaBuilderImpl=void 0;const n=r(6830),a=r(3350),i=r(5450);class s extends a.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"textarea"},_valueConstraints:{defaultValue:this.defaultValue,minLength:this.minLength,maxLength:this.maxLength}});const e=i.TextAreaImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.minLength=this.minLength,e.valueConstraints.maxLength=this.maxLength,e}}t.TextAreaBuilderImpl=s},5450(e,t,r){t.TextAreaImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(3608),o=r(5923);class l extends n.TemplateField{valueConstraints;constructor(){super(),this.cedarFieldType=a.CedarFieldType.TEXTAREA,this.valueConstraints=new o.ValueConstraintsTextArea,this.cedarArtifactType=i.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new s.ChildDeploymentInfoBuilder(this,e)}}t.TextAreaImpl=l},5923(e,t,r){t.ValueConstraintsTextArea=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;constructor(){super()}}t.ValueConstraintsTextArea=a},3168(e,t,r){t.YamlFieldReaderTextArea=void 0;const n=r(8748),a=r(5675),i=r(5450),s=r(2099),o=r(6145);class l extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const l=i.TextAreaImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,s.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,s.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,s.YamlKeys.maxLength),l}}t.YamlFieldReaderTextArea=l},836(e,t,r){t.YamlFieldWriterTextArea=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),null!==t.valueConstraints.minLength&&(e[a.YamlKeys.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[a.YamlKeys.maxLength]=t.valueConstraints.maxLength)}}t.YamlFieldWriterTextArea=s},9241(e,t,r){t.JsonFieldReaderTextField=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(6591),o=r(6145);class l extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const l=s.TextFieldImpl.buildEmpty();this.readRequiredAndHidden(e,t);const c=n.ReaderUtil.getNode(e,a.CedarModel.valueConstraints);return null!=c&&(l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(c,a.CedarModel.defaultValue),l.valueConstraints.minLength=n.ReaderUtil.getNumber(c,a.CedarModel.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(c,a.CedarModel.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(c,a.CedarModel.regex)),l}}t.JsonFieldReaderTextField=l},7501(e,t,r){t.JsonFieldWriterTextField=void 0;const n=r(936),a=r(2748),i=r(6145);class s extends a.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNode(e,t,r){null!==t.valueConstraints.minLength&&(e[n.CedarModel.minLength]=t.valueConstraints.minLength),null!==t.valueConstraints.maxLength&&(e[n.CedarModel.maxLength]=t.valueConstraints.maxLength),i.DefaultValueSerialization.writeLiteral(e,n.CedarModel.defaultValue,t.valueConstraints.defaultValue),super.expandValueConstraintsNode(e,t,r),null!==t.valueConstraints.regex&&(e[n.CedarModel.regex]=t.valueConstraints.regex)}}t.JsonFieldWriterTextField=s},7889(e,t,r){t.TextFieldBuilderImpl=void 0;const n=r(6830),a=r(3350),i=r(6591);class s extends a.TemplateFieldBuilder{defaultValue=null;minLength=null;maxLength=null;regex=null;constructor(){super()}static create(){return new s}withDefaultValue(e){return this.defaultValue=e,this}withMinLength(e){return this.minLength=e,this}withMaxLength(e){return this.maxLength=e,this}withRegex(e){return this.regex=e,this}build(){n.FieldValuePolicy.assertConsistent({_ui:{inputType:"textfield"},_valueConstraints:{defaultValue:this.defaultValue,minLength:this.minLength,maxLength:this.maxLength,regex:this.regex}});const e=i.TextFieldImpl.buildEmpty();return super.buildInternal(e),e.valueConstraints.defaultValue=this.defaultValue,e.valueConstraints.minLength=this.minLength,e.valueConstraints.maxLength=this.maxLength,e.valueConstraints.regex=this.regex,e}}t.TextFieldBuilderImpl=s},6591(e,t,r){t.TextFieldImpl=void 0;const n=r(9129),a=r(9711),i=r(4869),s=r(2763),o=r(3608);class l extends n.TemplateField{valueConstraints;valueRecommendationEnabled=!1;constructor(){super(),this.cedarFieldType=i.CedarFieldType.TEXT,this.valueConstraints=new a.ValueConstraintsTextField,this.cedarArtifactType=s.CedarArtifactType.TEMPLATE_FIELD}static buildEmpty(){return new l}createDeploymentBuilder(e){return new o.ChildDeploymentInfoBuilder(this,e)}supportsValueRecommendation(){return!0}}t.TextFieldImpl=l},9711(e,t,r){t.ValueConstraintsTextField=void 0;const n=r(7765);class a extends n.ValueConstraintsLiteralField{minLength=null;maxLength=null;regex=null;constructor(){super()}}t.ValueConstraintsTextField=a},1268(e,t,r){t.YamlFieldReaderTextField=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(6591),o=r(6145);class l extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const l=s.TextFieldImpl.buildEmpty();return l.valueConstraints.defaultValue=o.DefaultValueSerialization.literalFromNode(e,i.YamlKeys.default),l.valueConstraints.minLength=n.ReaderUtil.getNumber(e,i.YamlKeys.minLength),l.valueConstraints.maxLength=n.ReaderUtil.getNumber(e,i.YamlKeys.maxLength),l.valueConstraints.regex=n.ReaderUtil.getString(e,i.YamlKeys.regex),l}}t.YamlFieldReaderTextField=l},6116(e,t,r){t.YamlFieldWriterTextField=void 0;const n=r(5430),a=r(2099),i=r(6145);class s extends n.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandValueConstraintsNodeForYAML(e,t,r){i.DefaultValueSerialization.writeLiteral(e,a.YamlKeys.default,t.valueConstraints.defaultValue),null!=t.valueConstraints.minLength&&(e[a.YamlKeys.minLength]=t.valueConstraints.minLength),null!=t.valueConstraints.maxLength&&(e[a.YamlKeys.maxLength]=t.valueConstraints.maxLength),null!=t.valueConstraints.regex&&(e[a.YamlKeys.regex]=t.valueConstraints.regex)}}t.YamlFieldWriterTextField=s},8053(e,t,r){t.JsonStaticFieldWriter=void 0;const n=r(7752),a=r(455),i=r(2748),s=r(2733),o=r(9251),l=r(936),c=r(5793),d=r(5747),u=r(3746),m=r(2475);class p extends i.JsonTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUiNode(e,t){}buildUIObject(e){const t={[l.CedarModel.inputType]:this.atomicWriter.write(e.cedarFieldType.getUiInputType())};return this.expandUiNode(t,e),l.CedarModel.content in t||(t[l.CedarModel.content]=null),{[l.CedarModel.ui]:t}}getAsJsonNode(e,t=a.ChildDeploymentInfo.empty()){const r=this.buildUIObject(e);return t.hidden&&(r[l.CedarModel.ui][l.CedarModel.Ui.hidden]=!0),e.extensions.applyJson({[s.JsonSchema.atId]:this.atomicWriter.write(e.at_id),[s.JsonSchema.atType]:this.atomicWriter.write(e.cedarArtifactType),[s.JsonSchema.atContext]:this.macroContext(e),[l.CedarModel.type]:this.atomicWriter.write(c.JavascriptType.OBJECT),[d.TemplateProperty.title]:e.title,[d.TemplateProperty.description]:e.description,...r,...this.macroSchemaNameAndDescription(e),...this.macroProvenance(e,this.atomicWriter),...this.macroSkos(e),...this.macroStatusAndVersion(e,this.atomicWriter),...this.macroSchemaIdentifier(e),...this.macroAnnotations(e),...this.macroPreviousVersion(e),...this.macroDerivedFrom(e),[s.JsonSchema.schemaVersion]:this.atomicWriter.write(e.schema_schemaVersion),[d.TemplateProperty.additionalProperties]:this.atomicWriter.write(u.AdditionalProperties.FALSE),[l.CedarModel.schema]:this.atomicWriter.write(m.ArtifactSchema.CURRENT)})}macroContext(e){const t={...o.JsonTemplateFieldContentStatic.CONTEXT_VERBATIM};return e.language!==n.Language.NULL&&(t[s.JsonSchema.atLanguage]=this.atomicWriter.write(e.language)),t}}t.JsonStaticFieldWriter=p},699(e,t){t.isSizedStaticField=function(e){return null!==e&&"width"in e&&"height"in e}},934(e,t,r){t.YamlStaticFieldWriter=void 0;const n=r(9517),a=r(5430),i=r(455);class s extends a.YamlTemplateFieldWriterInternal{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return super.expandUINodeForYAML(e)}expandSizeForYAML(e){return n.JsonNode.getEmpty()}buildUIObject(e){return this.expandUINodeForYAML(e)}getYamlAsJsonNode(e,t=i.ChildDeploymentInfo.empty(),r=!1,a=!0){return e.extensions.applyYaml({...this.macroType(e),...this.macroNameAndDescription(e),...this.macroSchemaIdentifier(e),...this.macroId(e,r,a),...this.macroStatusAndVersion(e,r),...this.macroSkos(e),...this.expandUINodeForYAML(e),...t.hasParent()?n.JsonNode.getEmpty():this.expandSizeForYAML(e),...this.macroProvenance(e,r),...this.macroDerivedFrom(e,r),...this.macroPreviousVersion(e,r),...this.macroAnnotations(e)})}}t.YamlStaticFieldWriter=s},9148(e,t,r){t.JsonFieldReaderImage=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(5573);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticImageFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);o.content=n.ReaderUtil.getString(l,a.CedarModel.content);const c=n.ReaderUtil.getNode(l,a.CedarModel.size);return o.width=n.ReaderUtil.getNumber(c,a.CedarModel.width),o.height=n.ReaderUtil.getNumber(c,a.CedarModel.height),o}}t.JsonFieldReaderImage=o},8970(e,t,r){t.JsonFieldWriterStaticImage=void 0;const n=r(9517),a=r(936),i=r(8053);class s extends i.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.content&&(e[a.CedarModel.content]=t.content),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[a.CedarModel.width]=t.width),null!==t.height&&(r[a.CedarModel.height]=t.height),e[a.CedarModel.size]=r}}}t.JsonFieldWriterStaticImage=s},3138(e,t,r){t.StaticImageFieldBuilderImpl=void 0;const n=r(3350),a=r(5573);class i extends n.TemplateFieldBuilder{content=null;width=null;height=null;constructor(){super()}static create(){return new i}withContent(e){return this.content=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=a.StaticImageFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e.width=this.width,e.height=this.height,e}}t.StaticImageFieldBuilderImpl=i},5573(e,t,r){t.StaticImageFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;width=null;height=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_IMAGE,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticImageFieldImpl=o},7941(e,t,r){t.YamlFieldReaderImage=void 0;const n=r(8748),a=r(2099),i=r(5675),s=r(5573);class o extends i.YamlTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticImageFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,a.YamlKeys.content),o.width=n.ReaderUtil.getNumber(e,a.YamlKeys.width),o.height=n.ReaderUtil.getNumber(e,a.YamlKeys.height),o}}t.YamlFieldReaderImage=o},4935(e,t,r){t.YamlFieldWriterStaticImage=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.content&&(t[i.YamlKeys.content]=e.content),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[i.YamlKeys.width]=e.width),null!==e.height&&(t[i.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticImage=s},5933(e,t,r){t.JsonFieldReaderPageBreak=void 0;const n=r(4385),a=r(9046),i=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,i.CedarModel.ui),i.CedarModel.content),o}}t.JsonFieldReaderPageBreak=o},2347(e,t,r){t.JsonFieldWriterStaticPageBreak=void 0;const n=r(8053),a=r(936);class i extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[a.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticPageBreak=i},2703(e,t,r){t.StaticPageBreakFieldBuilderImpl=void 0;const n=r(3350),a=r(9046);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.StaticPageBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticPageBreakFieldBuilderImpl=i},9046(e,t,r){t.StaticPageBreakFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_PAGE_BREAK,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticPageBreakFieldImpl=o},4568(e,t,r){t.YamlFieldReaderPageBreak=void 0;const n=r(5675),a=r(9046),i=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticPageBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderPageBreak=o},7594(e,t,r){t.YamlFieldWriterStaticPageBreak=void 0;const n=r(934),a=r(2099),i=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[a.YamlKeys.content]:e.content}:i.JsonNode.getEmpty()}}t.YamlFieldWriterStaticPageBreak=s},6291(e,t,r){t.JsonFieldReaderRichText=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(5548);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticRichTextFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);return o.content=n.ReaderUtil.getString(l,a.CedarModel.content),o}}t.JsonFieldReaderRichText=o},6029(e,t,r){t.JsonFieldWriterStaticRichText=void 0;const n=r(936),a=r(8053);class i extends a.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[n.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticRichText=i},9521(e,t,r){t.StaticRichTextFieldBuilderImpl=void 0;const n=r(3350),a=r(5548);class i extends n.TemplateFieldBuilder{content=null;constructor(){super()}static create(){return new i}withContent(e){return this.content=e,this}build(){const e=a.StaticRichTextFieldImpl.buildEmpty();return super.buildInternal(e),e.content=this.content,e}}t.StaticRichTextFieldBuilderImpl=i},5548(e,t,r){t.StaticRichTextFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_RICH_TEXT,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticRichTextFieldImpl=o},1404(e,t,r){t.YamlFieldReaderRichText=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(5548);class o extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticRichTextFieldImpl.buildEmpty();return o.content=n.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderRichText=o},6314(e,t,r){t.YamlFieldWriterStaticRichText=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[i.YamlKeys.content]:e.content}:n.JsonNode.getEmpty()}}t.YamlFieldWriterStaticRichText=s},6511(e,t,r){t.JsonFieldReaderSectionBreak=void 0;const n=r(4385),a=r(2546),i=r(936),s=r(8748);class o extends n.JsonTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(s.ReaderUtil.getNode(e,i.CedarModel.ui),i.CedarModel.content),o}}t.JsonFieldReaderSectionBreak=o},41(e,t,r){t.JsonFieldWriterStaticSectionsBreak=void 0;const n=r(8053),a=r(936);class i extends n.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){null!==t.content&&(e[a.CedarModel.content]=t.content)}}t.JsonFieldWriterStaticSectionsBreak=i},5795(e,t,r){t.StaticSectionBreakFieldBuilderImpl=void 0;const n=r(3350),a=r(2546);class i extends n.TemplateFieldBuilder{constructor(){super()}static create(){return new i}build(){const e=a.StaticSectionBreakFieldImpl.buildEmpty();return super.buildInternal(e),e}}t.StaticSectionBreakFieldBuilderImpl=i},2546(e,t,r){t.StaticSectionBreakFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{content=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_SECTION_BREAK,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticSectionBreakFieldImpl=o},3980(e,t,r){t.YamlFieldReaderSectionBreak=void 0;const n=r(5675),a=r(2546),i=r(2099),s=r(8748);class o extends n.YamlTemplateFieldTypeSpecificReader{read(e,t,r,n){const o=a.StaticSectionBreakFieldImpl.buildEmpty();return o.content=s.ReaderUtil.getString(e,i.YamlKeys.content),o}}t.YamlFieldReaderSectionBreak=o},6082(e,t,r){t.YAMLFieldWriterStaticSectionsBreak=void 0;const n=r(934),a=r(2099),i=r(9517);class s extends n.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){return null!==e.content?{[a.YamlKeys.content]:e.content}:i.JsonNode.getEmpty()}}t.YAMLFieldWriterStaticSectionsBreak=s},8596(e,t,r){t.JsonFieldReaderYoutube=void 0;const n=r(8748),a=r(936),i=r(4385),s=r(477);class o extends i.JsonTemplateFieldTypeSpecificReader{read(e,t,r,i){const o=s.StaticYoutubeFieldImpl.buildEmpty(),l=n.ReaderUtil.getNode(e,a.CedarModel.ui);o.videoId=n.ReaderUtil.getString(l,a.CedarModel.content);const c=n.ReaderUtil.getNode(l,a.CedarModel.size);return o.width=n.ReaderUtil.getNumber(c,a.CedarModel.width),o.height=n.ReaderUtil.getNumber(c,a.CedarModel.height),o}}t.JsonFieldReaderYoutube=o},6766(e,t,r){t.JsonFieldWriterStaticYoutube=void 0;const n=r(9517),a=r(936),i=r(8053);class s extends i.JsonStaticFieldWriter{constructor(e,t){super(e,t)}expandUiNode(e,t){if(null!==t.videoId&&(e[a.CedarModel.content]=t.videoId),null!==t.width||null!==t.height){const r=n.JsonNode.getEmpty();null!==t.width&&(r[a.CedarModel.width]=t.width),null!==t.height&&(r[a.CedarModel.height]=t.height),e[a.CedarModel.size]=r}}}t.JsonFieldWriterStaticYoutube=s},7674(e,t,r){t.StaticYoutubeFieldBuilderImpl=void 0;const n=r(3350),a=r(477);class i extends n.TemplateFieldBuilder{videoId=null;width=null;height=null;constructor(){super()}static create(){return new i}withVideoId(e){return this.videoId=e,this}withWidth(e){return this.width=e,this}withHeight(e){return this.height=e,this}build(){const e=a.StaticYoutubeFieldImpl.buildEmpty();return super.buildInternal(e),e.videoId=this.videoId,e.width=this.width,e.height=this.height,e}}t.StaticYoutubeFieldBuilderImpl=i},477(e,t,r){t.StaticYoutubeFieldImpl=void 0;const n=r(9129),a=r(4869),i=r(2763),s=r(8290);class o extends n.TemplateField{videoId=null;width=null;height=null;constructor(){super(),this.cedarFieldType=a.CedarFieldType.STATIC_YOUTUBE,this.cedarArtifactType=i.CedarArtifactType.STATIC_TEMPLATE_FIELD}static buildEmpty(){return new o}createDeploymentBuilder(e){return new s.ChildDeploymentInfoStaticBuilder(this,e)}}t.StaticYoutubeFieldImpl=o},7089(e,t,r){t.YamlFieldReaderYoutube=void 0;const n=r(8748),a=r(5675),i=r(2099),s=r(477);class o extends a.YamlTemplateFieldTypeSpecificReader{read(e,t,r,a){const o=s.StaticYoutubeFieldImpl.buildEmpty();return o.videoId=n.ReaderUtil.getString(e,i.YamlKeys.content),o.width=n.ReaderUtil.getNumber(e,i.YamlKeys.width),o.height=n.ReaderUtil.getNumber(e,i.YamlKeys.height),o}}t.YamlFieldReaderYoutube=o},1903(e,t,r){t.YamlFieldWriterStaticYoutube=void 0;const n=r(9517),a=r(934),i=r(2099);class s extends a.YamlStaticFieldWriter{constructor(e,t){super(e,t)}expandUINodeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.videoId&&(t[i.YamlKeys.content]=e.videoId),t}expandSizeForYAML(e){const t=n.JsonNode.getEmpty();return null!==e.width&&(t[i.YamlKeys.width]=e.width),null!==e.height&&(t[i.YamlKeys.height]=e.height),t}}t.YamlFieldWriterStaticYoutube=s},4033(e,t,r){t.AttributeValueNamePolicy=void 0;const n=r(3992),a=r(5588),i=r(9327),s=r(3644),o=r(7723);class l{constructor(){}static isReserved(e){return a.ReservedNames.isReservedName(e)}static findConflicts(e,t="template",r=!1){const n=[];return l.scanContainer(e,[],n,t,r),n}static locationOf(e){return"reservedField"===e.kind?[...e.path,e.groupName]:[...e.path,e.groupName,e.name]}static assertValid(e){const t=l.findConflicts(e)[0];if(void 0===t)return;const r=l.locationOf(t).join("/");if("reservedField"===t.kind)throw new Error(`Attribute-value field name "${t.name}" at /${r} is reserved for CEDAR instance metadata`);const n="reserved"===t.kind?"is reserved for instance metadata":"blank"===t.kind?"must not be blank":"sibling"===t.kind?"collides with another child in the same object":`is also used by attribute-value field "${t.conflictingGroupName}"`;throw new Error(`Attribute-value name "${t.name}" at /${r} ${n}`)}static scanContainer(e,t,r,i,s){for(const t of Object.keys(e.values))a.ReservedNames.requireChildName(t);const o=l.attributeValueGroups(e),c=new Set(o.map(e=>e.name)),d=new Set(o.filter(e=>e.unpacked).flatMap(e=>e.attributeNames)),u=new Set(Object.keys(e.values).filter(e=>!c.has(e)&&!d.has(e))),m=new Map;for(const e of o){a.ReservedNames.isReservedAttributeValueFieldName(e.name,i)&&r.push({kind:"reservedField",name:e.name,groupName:e.name,path:t});const o=new Set;for(const a of e.attributeNames){if(n.TextPolicy.isBlank(a)){s&&r.push({kind:"blank",name:a,groupName:e.name,path:t});continue}l.isReserved(a)&&r.push({kind:"reserved",name:a,groupName:e.name,path:t}),(u.has(a)||c.has(a))&&r.push({kind:"sibling",name:a,groupName:e.name,path:t}),o.has(a)?r.push({kind:"duplicate",name:a,groupName:e.name,path:t,conflictingGroupName:e.name}):o.add(a);const i=m.get(a);void 0!==i&&i!==e.name?r.push({kind:"duplicate",name:a,groupName:e.name,path:t,conflictingGroupName:i}):m.set(a,e.name)}}for(const[n,a]of Object.entries(e.values))c.has(n)||d.has(n)||l.scanValue(a,[...t,n],r,s)}static scanValue(e,t,r,n){e instanceof o.InstanceDataContainer?l.scanContainer(e,t,r,"element",n):Array.isArray(e)&&e.forEach((e,a)=>l.scanValue(e,[...t,a],r,n))}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof i.InstanceDataAttributeValueField)t.push({name:r,attributeNames:Object.keys(n.values),unpacked:!1});else if(Array.isArray(n)){const e=n.filter(e=>e instanceof s.InstanceDataAttributeValueFieldName).map(e=>e.name);e.length>0&&t.push({name:r,attributeNames:e,unpacked:!0})}return t}}t.AttributeValueNamePolicy=l},9327(e,t,r){t.InstanceDataAttributeValueField=void 0;const n=r(5588);t.InstanceDataAttributeValueField=class{_name;_values=Object.create(null);_iris;constructor(e){this._name=e,this._values=Object.create(null),this._iris=Object.create(null)}addValue(e,t){n.ReservedNames.requireChildName(e),this._values[e]=t}get name(){return this._name}get values(){return this._values}setIri(e,t){this._iris[e]=t}get iris(){return this._iris}}},3644(e,t){t.InstanceDataAttributeValueFieldName=void 0,t.InstanceDataAttributeValueFieldName=class{_name;constructor(e){this._name=e}get name(){return this._name}}},7723(e,t,r){t.InstanceDataContainer=void 0;const n=r(5588);t.InstanceDataContainer=class{_id=null;_types=[];_values;_iris;constructor(){this._values=Object.create(null),this._iris=Object.create(null)}setValue(e,t){n.ReservedNames.requireChildName(e),this._values[e]=t}hasValue(e){return Object.hasOwn(this._values,e)}removeValue(e){delete this._values[e],delete this._iris[e]}get values(){return this._values}set values(e){for(const t of Object.keys(e))n.ReservedNames.requireChildName(t);this._values=Object.assign(Object.create(null),e)}setIri(e,t){this._iris[e]=t}hasIri(e){return Object.hasOwn(this._iris,e)}removeIri(e){delete this._iris[e]}get iris(){return this._iris}set id(e){this._id=e}get id(){return this._id}set types(e){this._types=[...e]}get types(){return this._types}}},8193(e,t,r){t.InstanceDataControlledAtom=void 0;const n=r(7571);class a{language=null;preferredLabel=null;notation=null;_id;_type;_label;constructor(e,t,r,a=null){if(r!==n.PARSED_NODE&&((0,n.assertIri)(e,"InstanceDataControlledAtom"),null==t||""===t))throw new Error("InstanceDataControlledAtom requires a label. An IRI on its own is a link, not a controlled term.");this._id=e,this._type=r===n.PARSED_NODE?a:r??null,this._label=t}static fromParsedNode(e,t,r=null){return new a(e,t,n.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}get label(){return this._label}}t.InstanceDataControlledAtom=a},7548(e,t){t.InstanceDataEmptyAtom=void 0,t.InstanceDataEmptyAtom=class{_discarded;constructor(e=null){this._discarded=e}get discarded(){return this._discarded}hasDiscardedContent(){return null!==this._discarded&&Object.keys(this._discarded).length>0}}},4465(e,t){t.InstanceDataEmptyNode=void 0,t.InstanceDataEmptyNode=class{}},9167(e,t){t.InstanceDataLabelAtom=void 0,t.InstanceDataLabelAtom=class{label;type;language=null;preferredLabel=null;notation=null;constructor(e,t=null){this.label=e,this.type=t}}},7571(e,t){function r(e,t){if(null==e||""===e)throw new Error(`${t} requires an IRI. An IRI-valued field with nothing in it is an empty node, not a null IRI.`)}t.InstanceDataLinkAtom=t.PARSED_NODE=void 0,t.assertIri=r,t.PARSED_NODE=Symbol("parsed node");class n{language=null;preferredLabel=null;notation=null;_id;_type;constructor(e,n,a=null){n!==t.PARSED_NODE&&r(e,"InstanceDataLinkAtom"),this._id=e,this._type=n===t.PARSED_NODE?a:n??null}static fromParsedNode(e,r=null){return new n(e,t.PARSED_NODE,r)}get type(){return this._type}get id(){return this._id}}t.InstanceDataLinkAtom=n},1625(e,t){t.InstanceDataNotationAtom=void 0,t.InstanceDataNotationAtom=class{notation;type;language=null;preferredLabel=null;constructor(e,t=null){this.notation=e,this.type=t}}},5222(e,t){t.InstanceDataStringAtom=void 0,t.InstanceDataStringAtom=class{label;language=null;preferredLabel=null;notation=null;_value;constructor(e,t=null){this.label=t,this._value=e}get value(){return this._value}}},4877(e,t){t.InstanceDataTypedAtom=void 0,t.InstanceDataTypedAtom=class{label;language=null;preferredLabel=null;notation=null;_value;_type;constructor(e,t,r=null){if(this.label=r,null==t||""===t)throw new Error("InstanceDataTypedAtom requires a type. A literal with no declared type is an InstanceDataStringAtom.");this._value=e,this._type=t}get value(){return this._value}get type(){return this._type}}},9961(e,t,r){t.InstanceInflater=void 0;const n=r(9129),a=r(4869),i=r(1211),s=r(3567),o=r(5222),l=r(4877),c=r(7723),d=r(4465),u=r(2763),m=r(7661),p=r(513),h=r(3812);class f{constructor(){}static inflate(e,t,r="lowerBound"){return f.inflateContainer(e.dataContainer,t,r),e}static emptyField(e){return e.valueConstraints instanceof i.ValueConstraintsNumericField?new l.InstanceDataTypedAtom(null,e.valueConstraints.numberType.getValue()??"xsd:decimal"):e.valueConstraints instanceof s.ValueConstraintsTemporalField?new l.InstanceDataTypedAtom(null,e.valueConstraints.temporalType.getValue()??"xsd:dateTime"):[a.CedarFieldType.CONTROLLED_TERM,a.CedarFieldType.LINK,a.CedarFieldType.EXT_ROR,a.CedarFieldType.EXT_ORCID,a.CedarFieldType.EXT_PFAS,a.CedarFieldType.EXT_PUBMED,a.CedarFieldType.EXT_RRID,a.CedarFieldType.EXT_NIH_GRANT_ID,a.CedarFieldType.EXT_DOI].includes(e.cedarFieldType)?new d.InstanceDataEmptyNode:new o.InstanceDataStringAtom(null)}static missingOccurrences(e,t,r){if(e instanceof n.TemplateField&&e.cedarFieldType===a.CedarFieldType.ATTRIBUTE_VALUE)return[];const i=t instanceof h.AbstractDynamicChildDeploymentInfo?t.minItems:null,s=Math.max(0,(i??p.AbstractChildDeploymentInfo.defaultMinItems)-r);return Array.from({length:s},()=>e instanceof m.TemplateElement?new c.InstanceDataContainer:e instanceof n.TemplateField?f.emptyField(e):new d.InstanceDataEmptyNode)}static inflateContainer(e,t,r){const a=t.getChildrenInfo(),i=a.getChildIriMap();Object.keys(i).forEach(t=>e.setIri(t,i[t]));const s={};a.getChildrenNames().forEach(a=>{const i=t.getChild(a);let o=e.values[a];if(void 0===o){if(t.getChildInfo(a)?.atType===u.CedarArtifactType.STATIC_TEMPLATE_FIELD)return;const e=t.getChildInfo(a);o=e?.isMultiInAnyWay()?"empty"===r?[]:f.missingOccurrences(i,e,0):i instanceof m.TemplateElement?new c.InstanceDataContainer:i instanceof n.TemplateField?f.emptyField(i):new d.InstanceDataEmptyNode}else if(Array.isArray(o)&&"lowerBound"===r){const e=t.getChildInfo(a);e?.isMultiInAnyWay()&&(o=[...o,...f.missingOccurrences(i,e,o.length)])}i instanceof m.TemplateElement&&(o instanceof c.InstanceDataContainer?f.inflateContainer(o,i,r):Array.isArray(o)&&o.forEach(e=>{e instanceof c.InstanceDataContainer&&f.inflateContainer(e,i,r)})),s[a]=o}),Object.keys(e.values).forEach(t=>{Object.hasOwn(s,t)||(s[t]=e.values[t])}),e.values=s}}t.InstanceInflater=f},8410(e,t,r){t.InstanceValidator=void 0;const n=r(7723),a=r(7548),i=r(4465),s=r(5222),o=r(4877),l=r(3812),c=r(7661),d=r(4036),u=r(2888),m=r(9760),p=r(3188),h=r(9034),f=r(9327),y=r(3644),T=r(4033),g=r(2763),E=r(9129),C=r(6320),I=r(6830),A=r(7092),b=r(3939),v=r(9517),S=r(1896),R=r(5588),w=r(350),N=r(2500),_=r(5435),L=r(2981),V=r(936),O=r(2733),F="InstanceValidator";class x{constructor(){}static validate(e,t,r=null,n={}){const a=new d.JsonArtifactParsingResult;x.validateContainer(e.dataContainer,t,new p.JsonPath,a,x.object(r),n);const i=!0===n.asWritten?null:S.StoredForm.membersOf(e.dataContainer),s=null!==i?i[V.CedarModel.annotations]:L.JsonAnnotationsWriter.annotationsNode(e.annotations)??void 0;return x.validateOwnTerm(V.CedarModel.annotations,s,x.object(r),new p.JsonPath,a),a}static validateReport(e,t,r=null,n={}){return this.validate(e,t,r,n).getValidationReport()}static validateContainer(e,t,r,n,a,i){const s=t.getChildrenInfo(),o=new Set(x.attributeValueGroups(e).filter(([e])=>s.get(e)?.uiInputType===h.UiInputType.ATTRIBUTE_VALUE).flatMap(([,e])=>e));for(const t of Object.keys(e.values))null!==s.get(t)||o.has(t)||x.admitsUndeclared(a,e.values[t])||n.addValidationFinding(A.ValidationPolicy.finding("valueShape",r.add(t).toPointer(),"The template does not declare this property."));const l=t.cedarArtifactType===g.CedarArtifactType.TEMPLATE?"template":"element";for(const t of T.AttributeValueNamePolicy.findConflicts(e,l).filter(e=>0===e.path.length))n.addBlueprintComparisonError(new u.ComparisonError(F,m.ComparisonErrorType.VALUE_MISMATCH,r.add(...T.AttributeValueNamePolicy.locationOf(t)),"a unique, non-reserved attribute-value name",t.name));for(const[t,a]of x.attributeValueGroups(e))for(const e of a){const a=s.get(e);null!==a&&a.atType!==g.CedarArtifactType.STATIC_TEMPLATE_FIELD&&n.addBlueprintComparisonError(new u.ComparisonError(F,m.ComparisonErrorType.VALUE_MISMATCH,r.add(t,e),"a name different from every serializable template child",e))}const c=x.object(x.object(a?.properties)?.[O.JsonSchema.atContext]);if(null!==c){const t=""===r.toPointer()?w.JsonTemplateInstanceContent.CONTEXT_VERBATIM:v.JsonNode.getEmpty(),a=!0===i.asWritten?t:S.StoredForm.contextTermsOf(e),o=!0===i.asWritten?s.getChildIriMap():{};x.validateContext(e,c,a,o,r,n)}!0===i.verbatim&&!0!==i.asWritten&&x.validateMembers(e,a,r,n),x.validateOwnTerm(O.JsonSchema.atType,x.statedTypes(e,i),a,r,n);for(const t of x.requiredChildren(s,a))Object.hasOwn(e.values,t)||n.addBlueprintComparisonError(new u.ComparisonError(F,m.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add(t),t));for(const o of s.getChildrenNames()){const l=s.get(o);if(l?.uiInputType===h.UiInputType.ATTRIBUTE_VALUE){x.validateAttributeNames(e.values[o],r.add(o),n);continue}const c=e.values[o];void 0!==c&&x.validateChild(o,c,l,t.getChild(o),r.add(o),n,x.object(x.object(a?.properties)?.[o]),i)}}static validateContext(e,t,r,n,a,i){const s=x.object(t.properties)??v.JsonNode.getEmpty(),o=a.add(O.JsonSchema.atContext),l=[...Object.entries(r??{}),...Object.entries(e.iris).filter(([e])=>!Object.hasOwn(n,e))];for(const[e,r]of l){const n=x.object(s[e]);if(null!==n){x.conformsTo(n,r)||i.addValidationFinding(A.ValidationPolicy.finding("valueShape",o.add(e).toPointer(),"The template's @context gives this property another value."));continue}const a=t.additionalProperties,l=x.object(a);(!1===a||null!==l&&!x.conformsTo(l,r))&&i.addValidationFinding(A.ValidationPolicy.finding("valueShape",o.add(e).toPointer(),"The template's @context does not declare this property."))}const c=Array.isArray(t.required)?t.required:[];for(const t of c)"string"!=typeof t||Object.hasOwn(n,t)||e.hasIri(t)||Object.hasOwn(w.JsonTemplateInstanceContent.CONTEXT_VERBATIM,t)&&(null===r||Object.hasOwn(r,t))||i.addValidationFinding(A.ValidationPolicy.finding("missingProperty",o.add(t).toPointer(),"The template's @context requires this property."))}static OWN_TERMS=new Set([O.JsonSchema.atContext,O.JsonSchema.atType,V.CedarModel.annotations]);static statedTypes(e,t){const r=!0===t.asWritten?null:S.StoredForm.membersOf(e);return null!==r?r[O.JsonSchema.atType]:C.JsonTemplateInstanceWriter.writeTypes(e)[O.JsonSchema.atType]}static unreadableOwnTerms(e,t){const r=[];e===O.JsonSchema.atType&&(Array.isArray(t)?t:[t]).forEach((e,n)=>{"string"!=typeof e||N.IdentifierPolicy.isValid(e)||r.push([Array.isArray(t)?[String(n)]:[],"A class must be an absolute IRI."])});const n=e===V.CedarModel.annotations?x.object(t):null;for(const[e,t]of Object.entries(n??{})){const n=x.object(t);null!==n&&("string"!=typeof n[O.JsonSchema.atId]||N.IdentifierPolicy.isValid(n[O.JsonSchema.atId])||r.push([[e,O.JsonSchema.atId],"An annotation's @id must be an absolute IRI."]),Object.hasOwn(n,O.JsonSchema.atValue)&&"string"!=typeof n[O.JsonSchema.atValue]&&r.push([[e,O.JsonSchema.atValue],"An annotation's @value must be a string."]))}return r}static validateOwnTerm(e,t,r,n,a){if(void 0===t)return;for(const[r,i]of x.unreadableOwnTerms(e,t))a.addValidationFinding(A.ValidationPolicy.finding("valueShape",n.add(e,...r).toPointer(),i));if(null===r)return;const i=x.object(x.object(r.properties)?.[e]);if(null!==i)return void(x.conformsTo(i,t)||a.addValidationFinding(A.ValidationPolicy.finding("valueShape",n.add(e).toPointer(),"The template does not admit this value here.")));const s=r.additionalProperties,o=x.object(s);(!1===s||null!==o&&!x.conformsTo(o,t))&&a.addValidationFinding(A.ValidationPolicy.finding("valueShape",n.add(e).toPointer(),"The template does not declare this property."))}static validateMembers(e,t,r,n){const a=S.StoredForm.membersOf(e);if(null===a||null===t)return;const i=Array.isArray(t.required)?t.required:[];for(const e of i)"string"==typeof e&&R.ReservedNames.isReservedName(e)&&!Object.hasOwn(a,e)&&n.addBlueprintComparisonError(new u.ComparisonError(F,m.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add(e),e));const s=x.object(t.properties)??v.JsonNode.getEmpty();for(const[e,t]of Object.entries(a)){const a=x.object(s[e]);x.OWN_TERMS.has(e)||null===a||x.conformsTo(a,t)||n.addValidationFinding(A.ValidationPolicy.finding("valueShape",r.add(e).toPointer(),"The template does not admit this value here."))}const o=""===r.toPointer()?x.ROOT_IDENTIFIERS:x.OCCURRENCE_IDENTIFIERS;for(const e of o){const t=a[e];"string"!=typeof t||N.IdentifierPolicy.isValid(t)||n.addValidationFinding(A.ValidationPolicy.finding("valueShape",r.add(e).toPointer(),"The server requires an absolute IRI here."))}}static ROOT_IDENTIFIERS=[O.JsonSchema.atId,O.JsonSchema.schemaIsBasedOn,O.JsonSchema.pavDerivedFrom];static OCCURRENCE_IDENTIFIERS=[O.JsonSchema.atId,O.JsonSchema.pavDerivedFrom];static conformsTo(e,t){if(Array.isArray(e.oneOf)&&1!==e.oneOf.map(e=>x.object(e)).filter(e=>null!==e).filter(e=>x.conformsTo(e,t)).length)return!1;if(Array.isArray(e.enum)&&!e.enum.some(e=>JSON.stringify(e)===JSON.stringify(t)))return!1;const r=void 0===e.type?null:Array.isArray(e.type)?e.type:[e.type];if(null!==r&&!r.some(e=>x.isOfType(e,t)))return!1;if("string"==typeof t&&"number"==typeof e.minLength&&[...t].length<e.minLength)return!1;if("string"==typeof t&&"uri"===e.format&&!N.IdentifierPolicy.matchesUriFormat(t))return!1;if("string"==typeof t&&"date-time"===e.format&&!_.TimestampPolicy.matchesFormat(t))return!1;if(Array.isArray(t)){if("number"==typeof e.minItems&&t.length<e.minItems)return!1;if("number"==typeof e.maxItems&&t.length>e.maxItems)return!1;if(!0===e.uniqueItems&&new Set(t.map(e=>JSON.stringify(e))).size!==t.length)return!1;const r=x.object(e.items);if(null!==r&&!t.every(e=>x.conformsTo(r,e)))return!1}const n=x.object(t);if(null===n)return!0;const a=x.object(e.properties)??v.JsonNode.getEmpty();if(Array.isArray(e.required)&&e.required.some(e=>"string"==typeof e&&!Object.hasOwn(n,e)))return!1;const i=Object.entries(x.object(e.patternProperties)??v.JsonNode.getEmpty());return Object.entries(n).every(([t,r])=>{const n=x.object(a[t]),s=i.filter(([e])=>new RegExp(e,"u").test(t)).map(([,e])=>x.object(e)).filter(e=>null!==e);if(null!==n||s.length>0)return(null===n||x.conformsTo(n,r))&&s.every(e=>x.conformsTo(e,r));const o=x.object(e.additionalProperties);return!1!==e.additionalProperties&&(null===o||x.conformsTo(o,r))})}static isOfType(e,t){switch(e){case"string":return"string"==typeof t;case"object":return null!==x.object(t);case"array":return Array.isArray(t);case"null":return null===t;case"boolean":return"boolean"==typeof t;case"number":return"number"==typeof t;case"integer":return Number.isInteger(t);default:return!0}}static object(e){return null===e||"object"!=typeof e||Array.isArray(e)?null:e}static requiredChildren(e,t){return null===t?e.getChildrenNamesForRequiredInProperties():(Array.isArray(t.required)?t.required:[]).filter(e=>"string"==typeof e&&!R.ReservedNames.isReservedName(e))}static admitsUndeclared(e,t){if(null===e)return!1;const r=e.additionalProperties;if(void 0===r||!0===r)return!0;const i=x.object(r);if(null===i)return!1;if(0===Object.keys(i).length)return!0;if(Array.isArray(t)||t instanceof n.InstanceDataContainer)return!1;const s=t instanceof a.InstanceDataEmptyAtom&&t.hasDiscardedContent()?t.discarded:C.JsonTemplateInstanceWriter.writeValueNode(t);return null!==s&&0===I.FieldValuePolicy.validateNode(i,s).length}static withStoredShape(e,t){if(null===t)return e;const r=x.object(t.properties);return{...e,properties:r??void 0,required:Array.isArray(t.required)?t.required.filter(e=>"string"==typeof e):void 0,additionalProperties:"boolean"==typeof t.additionalProperties?t.additionalProperties:void 0}}static validateAttributeNames(e,t,r){void 0===e||e instanceof f.InstanceDataAttributeValueField||(Array.isArray(e)?e.forEach((e,n)=>{e instanceof y.InstanceDataAttributeValueFieldName||r.addValidationFinding(A.ValidationPolicy.finding("valueShape",t.add(n).toPointer(),"An attribute-value field lists attribute names only."))}):r.addValidationFinding(A.ValidationPolicy.finding("valueShape",t.toPointer(),"An attribute-value field holds a list of attribute names.")))}static attributeValueGroups(e){const t=[];for(const[r,n]of Object.entries(e.values))if(n instanceof f.InstanceDataAttributeValueField)t.push([r,Object.keys(n.values)]);else if(Array.isArray(n)){const e=n.filter(e=>e instanceof y.InstanceDataAttributeValueFieldName).map(e=>e.name??"").filter(e=>e.length>0);e.length>0&&t.push([r,e])}return t}static validateChild(e,t,r,n,a,i,s,o){const l=r?.isMultiInAnyWay()??!1,c=Array.isArray(t)?t:null,d=null!==c;if(l===d){if(null!==c){x.validateCardinality(c,r,a,i);const e=x.object(s?.items)??s;return void c.forEach((t,r)=>x.validateItem(t,n,a.add(r),i,e,o))}x.validateItem(t,n,a,i,s,o)}else i.addBlueprintComparisonError(new u.ComparisonError(F,m.ComparisonErrorType.VALUE_MISMATCH,a,l?"a list of values":"a single value",d?"a list of values":"a single value"))}static validateCardinality(e,t,r,n){if(!(t instanceof l.AbstractDynamicChildDeploymentInfo))return;const{minItems:a,maxItems:i}=t;null!==a&&e.length<a&&n.addValidationFinding(A.ValidationPolicy.finding("minItems",r.toPointer(),`Fewer than ${a} entries.`)),null!==i&&e.length>i&&n.addValidationFinding(A.ValidationPolicy.finding("maxItems",r.toPointer(),`More than ${i} entries.`))}static validateItem(e,t,r,a,i,s){if(t instanceof c.TemplateElement)if(e instanceof n.InstanceDataContainer)x.validateContainer(e,t,r,a,i,s);else if(x.isEmpty(e)){const e=new n.InstanceDataContainer;S.StoredForm.recordMembers(e,{}),x.validateContainer(e,t,r,a,i,s)}else a.addBlueprintComparisonError(new u.ComparisonError(F,m.ComparisonErrorType.VALUE_MISMATCH,r,"an element","a field value"));else if(t instanceof E.TemplateField){const n=x.withStoredShape((0,b.validationFieldSchema)(t),i),o=r.toPointer();for(const e of I.FieldValuePolicy.validateConfiguration(n,o))a.addValidationFinding(e);const l=!0===s.asWritten?C.JsonTemplateInstanceWriter.writeValueNode(e):x.asStored(e);for(const e of I.FieldValuePolicy.validateNode(n,l,o)){let t;if(("valueType"===e.code||"missingProperty"===e.code&&e.path.endsWith("/@type"))&&l){const e=n._valueConstraints?.numberType??n._valueConstraints?.temporalType;t=new u.ComparisonError("ValidationPolicy",Object.hasOwn(l,"@type")?m.ComparisonErrorType.VALUE_MISMATCH:m.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,r.add("@type"),e,"string"==typeof l["@type"]?l["@type"]:void 0)}else"iriMalformed"===e.code&&l&&null===l["@id"]&&(t=new u.ComparisonError("ValidationPolicy",m.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,r.add("@id"),"an IRI",null));a.addValidationFinding(e,"instance",t)}l&&"object"==typeof l&&"string"==typeof l["@id"]&&(I.FieldValuePolicy.isControlled(n)||I.FieldValuePolicy.authorityTypes.has(n._ui?.inputType??""))&&a.addValidationFinding(A.ValidationPolicy.finding("semanticNotChecked",o+"/@id","Identifier membership or existence has not been verified.","notChecked"))}}static asStored(e){if(e instanceof a.InstanceDataEmptyAtom&&e.hasDiscardedContent())return e.discarded;const t=C.JsonTemplateInstanceWriter.writeValueNode(e);if(null===t||null===e||"object"!=typeof e)return t;const r=S.StoredForm.nullsOf(e).filter(e=>!Object.hasOwn(t,e));return 0===r.length?t:{...t,...Object.fromEntries(r.map(e=>[e,null]))}}static isEmpty(e){return e instanceof a.InstanceDataEmptyAtom||e instanceof i.InstanceDataEmptyNode||(e instanceof s.InstanceDataStringAtom||e instanceof o.InstanceDataTypedAtom)&&null===e.value}}t.InstanceValidator=x},1896(e,t){t.StoredForm=void 0;class r{static nulls=new WeakMap;static contextTerms=new WeakMap;static members=new WeakMap;constructor(){}static recordNulls(e,t){t.length>0&&r.nulls.set(e,t)}static nullsOf(e){return r.nulls.get(e)??[]}static recordContextTerms(e,t){r.contextTerms.set(e,t)}static contextTermsOf(e){return r.contextTerms.get(e)??null}static recordMembers(e,t){r.members.set(e,t)}static membersOf(e){return r.members.get(e)??null}}t.StoredForm=r},2272(e,t,r){t.TemplateInstance=void 0;const n=r(2763),a=r(5697),i=r(7723);class s extends a.AbstractInstanceArtifact{dataContainer;descriptionWasAbsent=!1;constructor(){super(),this.cedarArtifactType=n.CedarArtifactType.TEMPLATE_INSTANCE,this.dataContainer=new i.InstanceDataContainer}static buildEmptyWithNullValues(){return new s}}t.TemplateInstance=s},4925(e,t,r){t.TemplateInstanceBuilder=void 0;const n=r(1641),a=r(2272),i=r(7723),s=r(8534);class o extends n.AbstractArtifactBuilder{schema_isBasedOn=s.CedarArtifactId.NULL;dataContainer=new i.InstanceDataContainer;withSchemaIsBasedOn(e){return e instanceof s.CedarArtifactId?this.schema_isBasedOn=e:this.schema_isBasedOn=s.CedarArtifactId.forValue(e),this}withDataValue(e,t){return this.dataContainer.setValue(e,t),this}withDataIri(e,t){return this.dataContainer.setIri(e,t),this}withDataId(e){return this.dataContainer.id=e,this}withDataContainer(e){return this.dataContainer=e,this}build(){const e=a.TemplateInstance.buildEmptyWithNullValues();return e.at_id=this.at_id,e.pav_createdOn=this.pav_createdOn,e.pav_createdBy=this.pav_createdBy,e.pav_lastUpdatedOn=this.pav_lastUpdatedOn,e.oslc_modifiedBy=this.oslc_modifiedBy,e.pav_derivedFrom=this.pav_derivedFrom,e.schema_name=this.schema_name,e.schema_description=this.schema_description,e.schema_isBasedOn=this.schema_isBasedOn,e.dataContainer=this.dataContainer,e}}t.TemplateInstanceBuilder=o},3281(e,t,r){t.Template=void 0;const n=r(3910),a=r(8557),i=r(1027),s=r(5451),o=r(2763);class l extends s.AbstractContainerArtifact{header=null;footer=null;constructor(){super(),this.cedarArtifactType=o.CedarArtifactType.TEMPLATE}static buildEmptyWithNullValues(){return new l}static buildEmptyWithDefaultValues(){const e=new l;return e.schema_schemaVersion=a.SchemaVersion.CURRENT,e.bibo_status=n.BiboStatus.DRAFT,e.pav_version=i.PavVersion.DEFAULT,e}isMultiInstanceByDefinition(){return!1}isSingleInstanceByDefinition(){return!1}createDeploymentBuilder(e){throw new Error("Method not supported.")}}t.Template=l},766(e,t,r){t.TemplateBuilder=void 0;const n=r(3281),a=r(1641);class i extends a.AbstractArtifactBuilder{header=null;footer=null;instanceTypeSpecification=null;children=[];withHeader(e){return this.header=e,this}withFooter(e){return this.footer=e,this}withInstanceTypeSpecification(e){return this.instanceTypeSpecification=e,this}addChild(e,t){return this.children.push([e,t]),this}build(){const e=n.Template.buildEmptyWithNullValues();return super.buildInternal(e),e.header=this.header,e.footer=this.footer,e.instanceTypeSpecification=this.instanceTypeSpecification,this.children.forEach(([t,r])=>{e.addChild(t,r)}),e}}t.TemplateBuilder=i},9517(e,t){t.JsonNode=void 0,t.JsonNode=class{static getEmpty(){return{}}static getEmptyList(){return[]}static hasEntries(e){return Object.keys(e).length>0}}},4531(e,t,r){t.BioportalTermType=t.BioportalTermTypeYamlValues=t.BioportalTermTypeJsonValues=void 0;const n=r(3992);t.BioportalTermTypeJsonValues={ONTOLOGY_CLASS:"OntologyClass",VALUE:"Value"},t.BioportalTermTypeYamlValues={ONTOLOGY_CLASS:"class",VALUE:"value"};class a{jsonValue;yamlValue;constructor(e,t){this.jsonValue=e,this.yamlValue=t}getJsonValue(){return this.jsonValue}getYamlValue(){return this.yamlValue}static ONTOLOGY_CLASS=new a(t.BioportalTermTypeJsonValues.ONTOLOGY_CLASS,t.BioportalTermTypeYamlValues.ONTOLOGY_CLASS);static VALUE=new a(t.BioportalTermTypeJsonValues.VALUE,t.BioportalTermTypeYamlValues.VALUE);static NULL=new a(null,null);static values(){return[a.ONTOLOGY_CLASS,a.VALUE]}static forJsonValue(e){for(const t of a.values())if(t.getJsonValue()===e)return t;return this.NULL}static forJsonType(e,t){if(null==e)throw new Error(`${t} requires a term type.`);const r=a.values().find(t=>{const r=t.getJsonValue();return"string"==typeof e&&null!==r&&n.TextPolicy.equalsIgnoreCase(r,e)});if(void 0===r)throw new Error(`No value type constant with name ${"string"==typeof e?e:JSON.stringify(e)} found`);return r}static forYamlValue(e){for(const t of a.values())if(t.getYamlValue()===e)return t;return this.NULL}}t.BioportalTermType=a},8534(e,t){t.CedarArtifactId=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e||""===e?r.NULL:new r(e)}}t.CedarArtifactId=r},2763(e,t){t.CedarArtifactType=t.df=t.KW=void 0,t.KW={TEMPLATE:"https://schema.metadatacenter.org/core/Template",TEMPLATE_ELEMENT:"https://schema.metadatacenter.org/core/TemplateElement",TEMPLATE_FIELD:"https://schema.metadatacenter.org/core/TemplateField",STATIC_TEMPLATE_FIELD:"https://schema.metadatacenter.org/core/StaticTemplateField",TEMPLATE_INSTANCE:"TemplateInstance"},t.df={TEMPLATE:"template",TEMPLATE_ELEMENT:"templateElement",TEMPLATE_FIELD:"templateField",STATIC_TEMPLATE_FIELD:"staticTemplateField",TEMPLATE_INSTANCE:"instance"};class r{value;yamlValue;constructor(e,t){this.value=e,this.yamlValue=t}getValue(){return this.value}getYamlValue(){return this.yamlValue}static TEMPLATE=new r(t.KW.TEMPLATE,t.df.TEMPLATE);static TEMPLATE_ELEMENT=new r(t.KW.TEMPLATE_ELEMENT,t.df.TEMPLATE_ELEMENT);static TEMPLATE_FIELD=new r(t.KW.TEMPLATE_FIELD,t.df.TEMPLATE_FIELD);static STATIC_TEMPLATE_FIELD=new r(t.KW.STATIC_TEMPLATE_FIELD,t.df.STATIC_TEMPLATE_FIELD);static TEMPLATE_INSTANCE=new r(t.KW.TEMPLATE_INSTANCE,t.df.TEMPLATE_INSTANCE);static NULL=new r(null,null);static values(){return[r.TEMPLATE,r.TEMPLATE_ELEMENT,r.TEMPLATE_FIELD,r.STATIC_TEMPLATE_FIELD,r.TEMPLATE_INSTANCE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static forYamlArtifactType(e){return e.isTemplate()?r.TEMPLATE:e.isElement()?r.TEMPLATE_ELEMENT:e.isDynamicField()?r.TEMPLATE_FIELD:e.isStaticField()?r.STATIC_TEMPLATE_FIELD:e.isTemplateInstance()?r.TEMPLATE_INSTANCE:r.NULL}}t.CedarArtifactType=r},8421(e,t){t.CedarFieldCategory=t.I=void 0,t.I={STATIC:"STATIC-field",DYNAMIC:"DYNAMIC-field",NONE:"NONE"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static values(){return[r.STATIC,r.DYNAMIC,r.NONE]}static STATIC=new r(t.I.STATIC);static DYNAMIC=new r(t.I.DYNAMIC);static NONE=new r(t.I.NONE);static NULL=new r(null)}t.CedarFieldCategory=r},4869(e,t,r){t.CedarFieldType=t.K=void 0;const n=r(9034),a=r(9499);t.K={TEXTFIELD:"DYNAMIC-textfield",TEXTAREA:"DYNAMIC-textarea",CONTROLLED_TERM:"DYNAMIC-controlled-term",LINK:"DYNAMIC-link",EXT_ROR:"DYNAMIC-ext-ror",EXT_ORCID:"DYNAMIC-ext-orcid",EXT_PFAS:"DYNAMIC-ext-pfas",EXT_PUBMED:"DYNAMIC-ext-pubmed",EXT_RRID:"DYNAMIC-ext-rrid",EXT_NIH_GRANT_ID:"DYNAMIC-ext-nih-grant-id",EXT_DOI:"DYNAMIC-ext-doi",TEMPORAL:"DYNAMIC-temporal",EMAIL:"DYNAMIC-email",NUMERIC:"DYNAMIC-numeric",PHONE_NUMBER:"DYNAMIC-phone-number",RADIO:"DYNAMIC-radio",CHECKBOX:"DYNAMIC-checkbox",SINGLE_SELECT_LIST:"DYNAMIC-single-select-list",MULTIPLE_SELECT_LIST:"DYNAMIC-multiple-select-list",ATTRIBUTE_VALUE:"DYNAMIC-attribute-value",STATIC_PAGE_BREAK:"STATIC-page-break",STATIC_SECTION_BREAK:"STATIC-section-break",STATIC_IMAGE:"STATIC-image",STATIC_RICH_TEXT:"STATIC-rich_text",STATIC_YOUTUBE:"STATIC-youtube"};class i{value;_uiInputType;_yamlType;staticField;constructor(e,t,r,n){this.value=e,this._uiInputType=t,this._yamlType=r,this.staticField=n}getValue(){return this.value}getUiInputType(){return this._uiInputType}getYamlType(){return this._yamlType}get isStaticField(){return this.staticField}get recordsRequirement(){return!this.staticField&&this.value!==t.K.ATTRIBUTE_VALUE}static values(){return[i.TEXT,i.TEXTAREA,i.CONTROLLED_TERM,i.LINK,i.EXT_ROR,i.EXT_ORCID,i.EXT_PFAS,i.EXT_PUBMED,i.EXT_RRID,i.EXT_NIH_GRANT_ID,i.EXT_DOI,i.TEMPORAL,i.EMAIL,i.NUMERIC,i.PHONE_NUMBER,i.RADIO,i.CHECKBOX,i.SINGLE_SELECT_LIST,i.MULTIPLE_SELECT_LIST,i.ATTRIBUTE_VALUE,i.STATIC_PAGE_BREAK,i.STATIC_SECTION_BREAK,i.STATIC_IMAGE,i.STATIC_RICH_TEXT,i.STATIC_YOUTUBE]}static TEXT=new i(t.K.TEXTFIELD,n.UiInputType.TEXTFIELD,a.YamlArtifactType.TEXTFIELD,!1);static TEXTAREA=new i(t.K.TEXTAREA,n.UiInputType.TEXTAREA,a.YamlArtifactType.TEXTAREA,!1);static CONTROLLED_TERM=new i(t.K.CONTROLLED_TERM,n.UiInputType.TEXTFIELD,a.YamlArtifactType.CONTROLLED_TERM,!1);static LINK=new i(t.K.LINK,n.UiInputType.LINK,a.YamlArtifactType.LINK,!1);static EXT_ROR=new i(t.K.EXT_ROR,n.UiInputType.EXT_ROR,a.YamlArtifactType.EXT_ROR,!1);static EXT_ORCID=new i(t.K.EXT_ORCID,n.UiInputType.EXT_ORCID,a.YamlArtifactType.EXT_ORCID,!1);static EXT_PFAS=new i(t.K.EXT_PFAS,n.UiInputType.EXT_PFAS,a.YamlArtifactType.EXT_PFAS,!1);static EXT_PUBMED=new i(t.K.EXT_PUBMED,n.UiInputType.EXT_PUBMED,a.YamlArtifactType.EXT_PUBMED,!1);static EXT_RRID=new i(t.K.EXT_RRID,n.UiInputType.EXT_RRID,a.YamlArtifactType.EXT_RRID,!1);static EXT_NIH_GRANT_ID=new i(t.K.EXT_NIH_GRANT_ID,n.UiInputType.EXT_NIH_GRANT_ID,a.YamlArtifactType.EXT_NIH_GRANT_ID,!1);static EXT_DOI=new i(t.K.EXT_DOI,n.UiInputType.EXT_DOI,a.YamlArtifactType.EXT_DOI,!1);static TEMPORAL=new i(t.K.TEMPORAL,n.UiInputType.TEMPORAL,a.YamlArtifactType.TEMPORAL,!1);static EMAIL=new i(t.K.EMAIL,n.UiInputType.EMAIL,a.YamlArtifactType.EMAIL,!1);static NUMERIC=new i(t.K.NUMERIC,n.UiInputType.NUMERIC,a.YamlArtifactType.NUMERIC,!1);static PHONE_NUMBER=new i(t.K.PHONE_NUMBER,n.UiInputType.PHONE_NUMBER,a.YamlArtifactType.PHONE_NUMBER,!1);static RADIO=new i(t.K.RADIO,n.UiInputType.RADIO,a.YamlArtifactType.RADIO,!1);static CHECKBOX=new i(t.K.CHECKBOX,n.UiInputType.CHECKBOX,a.YamlArtifactType.CHECKBOX,!1);static SINGLE_SELECT_LIST=new i(t.K.SINGLE_SELECT_LIST,n.UiInputType.LIST,a.YamlArtifactType.SINGLE_SELECT_LIST,!1);static MULTIPLE_SELECT_LIST=new i(t.K.MULTIPLE_SELECT_LIST,n.UiInputType.LIST,a.YamlArtifactType.MULTI_SELECT_LIST,!1);static ATTRIBUTE_VALUE=new i(t.K.ATTRIBUTE_VALUE,n.UiInputType.ATTRIBUTE_VALUE,a.YamlArtifactType.ATTRIBUTE_VALUE,!1);static STATIC_PAGE_BREAK=new i(t.K.STATIC_PAGE_BREAK,n.UiInputType.PAGE_BREAK,a.YamlArtifactType.PAGE_BREAK,!0);static STATIC_SECTION_BREAK=new i(t.K.STATIC_SECTION_BREAK,n.UiInputType.SECTION_BREAK,a.YamlArtifactType.SECTION_BREAK,!0);static STATIC_IMAGE=new i(t.K.STATIC_IMAGE,n.UiInputType.IMAGE,a.YamlArtifactType.IMAGE,!0);static STATIC_RICH_TEXT=new i(t.K.STATIC_RICH_TEXT,n.UiInputType.RICH_TEXT,a.YamlArtifactType.RICH_TEXT,!0);static STATIC_YOUTUBE=new i(t.K.STATIC_YOUTUBE,n.UiInputType.YOUTUBE,a.YamlArtifactType.YOUTUBE,!0);static NULL=new i(null,n.UiInputType.NULL,a.YamlArtifactType.NULL,!0);static forUiInputType(e){for(const t of i.values())if(t.getUiInputType()===e)return t;return this.NULL}static forYamlArtifactType(e){for(const t of i.values())if(t.getYamlType()===e)return t;return this.NULL}}t.CedarFieldType=i},2234(e,t){t.CedarUser=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e?r.NULL:new r(e)}}t.CedarUser=r},3746(e,t){t.AdditionalProperties=t.P=void 0,t.P={FALSE:"false",ALLOW_ATTRIBUTE_VALUE:"allow-attribute-value"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static FALSE=new r(t.P.FALSE);static ALLOW_ATTRIBUTE_VALUE=new r(t.P.ALLOW_ATTRIBUTE_VALUE);static NULL=new r(null);static values(){return[r.FALSE,r.ALLOW_ATTRIBUTE_VALUE]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.AdditionalProperties=r},2475(e,t){t.ArtifactSchema=t.CedarSchemaValues=void 0,t.CedarSchemaValues={CURRENT:"http://json-schema.org/draft-04/schema#"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static CURRENT=new r(t.CedarSchemaValues.CURRENT);static NULL=new r(null);static forValue(e){return new r(null===e?t.CedarSchemaValues.CURRENT:e)}}t.ArtifactSchema=r},3910(e,t,r){t.BiboStatus=t.BiboStatusYamlValues=t.l=void 0;const n=r(3992);t.l={DRAFT:"bibo:draft",PUBLISHED:"bibo:published"},t.BiboStatusYamlValues={DRAFT:"draft",PUBLISHED:"published"};class a{jsonValue;yamlValue;constructor(e,t){this.jsonValue=e,this.yamlValue=t}getJsonValue(){return this.jsonValue}getYamlValue(){return this.yamlValue}static DRAFT=new a(t.l.DRAFT,t.BiboStatusYamlValues.DRAFT);static PUBLISHED=new a(t.l.PUBLISHED,t.BiboStatusYamlValues.PUBLISHED);static NULL=new a(null,null);static values(){return[a.DRAFT,a.PUBLISHED]}static forJsonValue(e){for(const t of a.values())if(t.getJsonValue()===e)return t;return this.NULL}static forJsonStatus(e){if(null==e)return a.NULL;const t=a.values().find(t=>{const r=t.getJsonValue();return"string"==typeof e&&null!==r&&n.TextPolicy.equalsIgnoreCase(r,e)});if(void 0===t)throw new Error(`No status constant with text ${"string"==typeof e?e:JSON.stringify(e)} found`);return t}static forYamlValue(e){for(const t of a.values())if(t.getYamlValue()===e)return t;return this.NULL}}t.BiboStatus=a},8802(e,t){t.Iri=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static empty(){return new r("")}isEmpty(){return""===this.value}}t.Iri=r},9857(e,t,r){t.IsoDate=void 0;const n=r(5435);class a{value;constructor(e){this.value=e}static NULL=new a(null);getValue(){return this.value}static forValue(e){return null===e||""===e?a.NULL:new a(n.TimestampPolicy.canonical(e))}static now(){const e=new Date,t=new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().slice(0,-1);return a.forValue(t+this.getCurrentGMTOffset())}static getCurrentGMTOffset(){const e=(new Date).getTimezoneOffset(),t=Math.abs(e),r=t%60;return`${e>0?"-":"+"}${Math.floor(t/60).toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}}t.IsoDate=a},5793(e,t){t.JavascriptType=t.JavascriptTypeValues=void 0,t.JavascriptTypeValues={ARRAY:"array",OBJECT:"object",STRING:"string"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static ARRAY=new r(t.JavascriptTypeValues.ARRAY);static OBJECT=new r(t.JavascriptTypeValues.OBJECT);static STRING=new r(t.JavascriptTypeValues.STRING);static NULL=new r(null);static values(){return[r.ARRAY,r.OBJECT,r.STRING]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.JavascriptType=r},7752(e,t){t.Language=void 0;class r{value;constructor(e){this.value=e}getValue(){return this.value}static NULL=new r(null);static forValue(e){return null===e||""===e?r.NULL:new r(e)}}t.Language=r},3447(e,t,r){t.NumberType=t.NumberTypeValues=void 0;const n=r(3992);t.NumberTypeValues={DECIMAL:"xsd:decimal",INT:"xsd:int",LONG:"xsd:long",BYTE:"xsd:byte",SHORT:"xsd:short",FLOAT:"xsd:float",DOUBLE:"xsd:double"};class a{value;constructor(e){this.value=e}getValue(){return this.value}static DECIMAL=new a(t.NumberTypeValues.DECIMAL);static INT=new a(t.NumberTypeValues.INT);static LONG=new a(t.NumberTypeValues.LONG);static BYTE=new a(t.NumberTypeValues.BYTE);static SHORT=new a(t.NumberTypeValues.SHORT);static FLOAT=new a(t.NumberTypeValues.FLOAT);static DOUBLE=new a(t.NumberTypeValues.DOUBLE);static NULL=new a(null);static values(){return[a.DECIMAL,a.INT,a.LONG,a.BYTE,a.SHORT,a.FLOAT,a.DOUBLE]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return this.NULL}static forDatatype(e){const t=a.values().find(t=>{const r=t.getValue();return"string"==typeof e&&null!==r&&n.TextPolicy.equalsIgnoreCase(r,e)});if(void 0===t)throw new Error(`No numeric datatype constant ${String(e)} found`);return t}}t.NumberType=a},1027(e,t,r){t.PavVersion=t.o=void 0;const n=r(4506);t.o={DEFAULT:"0.0.1"};class a extends n.SemVer{static DEFAULT=new a(t.o.DEFAULT);static NULL=new a(null);static values(){return[a.DEFAULT,a.NULL]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return new a(e)}}t.PavVersion=a},6389(e,t,r){t.PropertyIri=void 0;const n=r(936);t.PropertyIri=class{static get namespace(){return n.CedarModel.propertyIriPrefix}}},8557(e,t,r){t.SchemaVersion=t.SchemaVersionValues=void 0;const n=r(4506);t.SchemaVersionValues={CURRENT:"1.6.0"};class a extends n.SemVer{static CURRENT=new a(t.SchemaVersionValues.CURRENT);static NULL=new a(null);static values(){return[a.CURRENT]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return new a(e)}}t.SchemaVersion=a},4506(e,t){t.SemVer=void 0,t.SemVer=class{value;constructor(e){this.value=this.validateVersion(e)}getValue(){return this.value}validateVersion(e){if(null===e)return e;const t=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/.exec(e);if(null===t||t.slice(1).some(e=>e.length>10||Number(e)>2147483647))throw new Error(`Invalid version "${e}": expected three numbers without leading zeros, separated by periods.`);if("0.0.0"===e)throw new Error('Invalid version "0.0.0": a version is not all zeros.');return e}}},7974(e,t){t.TemporalGranularity=t.TemporalGranularityValues=void 0,t.TemporalGranularityValues={YEAR:"year",MONTH:"month",DAY:"day",HOUR:"hour",MINUTE:"minute",SECOND:"second",DECIMAL_SECOND:"decimalSecond"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static YEAR=new r(t.TemporalGranularityValues.YEAR);static MONTH=new r(t.TemporalGranularityValues.MONTH);static DAY=new r(t.TemporalGranularityValues.DAY);static HOUR=new r(t.TemporalGranularityValues.HOUR);static MINUTE=new r(t.TemporalGranularityValues.MINUTE);static SECOND=new r(t.TemporalGranularityValues.SECOND);static DECIMAL_SECOND=new r(t.TemporalGranularityValues.DECIMAL_SECOND);static NULL=new r(null);static values(){return[r.YEAR,r.MONTH,r.DAY,r.HOUR,r.MINUTE,r.SECOND,r.DECIMAL_SECOND]}static valuesWithTimes(){return[r.HOUR,r.MINUTE,r.SECOND,r.DECIMAL_SECOND]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static forGranularity(e){if(null==e)throw new Error("A temporal field must have a granularity.");const t=r.values().find(t=>t.getValue()===e);if(void 0===t)throw new Error(`No temporal granularity constant with name ${"string"==typeof e?e:JSON.stringify(e)} found`);return t}static hasTime(e){return this.valuesWithTimes().includes(e)}}t.TemporalGranularity=r},8588(e,t,r){t.TemporalType=t.TemporalTypeValues=void 0;const n=r(3992);t.TemporalTypeValues={DATE:"xsd:date",TIME:"xsd:time",DATETIME:"xsd:dateTime"};class a{value;constructor(e){this.value=e}getValue(){return this.value}static DATE=new a(t.TemporalTypeValues.DATE);static TIME=new a(t.TemporalTypeValues.TIME);static DATETIME=new a(t.TemporalTypeValues.DATETIME);static NULL=new a(null);static values(){return[a.DATE,a.TIME,a.DATETIME]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return this.NULL}static forDatatype(e){const t=a.values().find(t=>{const r=t.getValue();return"string"==typeof e&&null!==r&&n.TextPolicy.equalsIgnoreCase(r,e)});if(void 0===t)throw new Error(`No temporal datatype constant ${String(e)} found`);return t}}t.TemporalType=a},3764(e,t){t.TimeFormat=t.TimeFormatValues=void 0,t.TimeFormatValues={H24:"24h",H12:"12h"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static H24=new r(t.TimeFormatValues.H24);static H12=new r(t.TimeFormatValues.H12);static NULL=new r(null);static values(){return[r.H24,r.H12]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}static forInputTimeFormat(e){const t=r.values().find(t=>t.getValue()===e);if(void 0===t)throw new Error(`No input time format constant with text ${"string"==typeof e?e:JSON.stringify(e)} found`);return t}}t.TimeFormat=r},9034(e,t){t.UiInputType=t.F=void 0,t.F={TEXTFIELD:"textfield",TEXTAREA:"textarea",LINK:"link",EXT_ROR:"ext-ror",EXT_ORCID:"ext-orcid",EXT_PFAS:"ext-pfas",EXT_PUBMED:"ext-pubmed",EXT_RRID:"ext-rrid",EXT_NIH_GRANT_ID:"ext-nih-grant-id",EXT_DOI:"ext-doi",TEMPORAL:"temporal",EMAIL:"email",NUMERIC:"numeric",PHONE_NUMBER:"phone-number",LIST:"list",CHECKBOX:"checkbox",RADIO:"radio",ATTRIBUTE_VALUE:"attribute-value",PAGE_BREAK:"page-break",SECTION_BREAK:"section-break",IMAGE:"image",RICH_TEXT:"richtext",YOUTUBE:"youtube"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static TEXTFIELD=new r(t.F.TEXTFIELD);static TEXTAREA=new r(t.F.TEXTAREA);static LINK=new r(t.F.LINK);static EXT_ROR=new r(t.F.EXT_ROR);static EXT_ORCID=new r(t.F.EXT_ORCID);static EXT_PFAS=new r(t.F.EXT_PFAS);static EXT_PUBMED=new r(t.F.EXT_PUBMED);static EXT_RRID=new r(t.F.EXT_RRID);static EXT_NIH_GRANT_ID=new r(t.F.EXT_NIH_GRANT_ID);static EXT_DOI=new r(t.F.EXT_DOI);static TEMPORAL=new r(t.F.TEMPORAL);static EMAIL=new r(t.F.EMAIL);static NUMERIC=new r(t.F.NUMERIC);static PHONE_NUMBER=new r(t.F.PHONE_NUMBER);static LIST=new r(t.F.LIST);static CHECKBOX=new r(t.F.CHECKBOX);static RADIO=new r(t.F.RADIO);static ATTRIBUTE_VALUE=new r(t.F.ATTRIBUTE_VALUE);static PAGE_BREAK=new r(t.F.PAGE_BREAK);static SECTION_BREAK=new r(t.F.SECTION_BREAK);static IMAGE=new r(t.F.IMAGE);static RICH_TEXT=new r(t.F.RICH_TEXT);static YOUTUBE=new r(t.F.YOUTUBE);static NULL=new r(null);static values(){return[r.TEXTFIELD,r.TEXTAREA,r.LINK,r.EXT_ROR,r.EXT_ORCID,r.EXT_PFAS,r.EXT_PUBMED,r.EXT_RRID,r.EXT_NIH_GRANT_ID,r.EXT_DOI,r.TEMPORAL,r.EMAIL,r.NUMERIC,r.PHONE_NUMBER,r.LIST,r.CHECKBOX,r.RADIO,r.ATTRIBUTE_VALUE,r.PAGE_BREAK,r.SECTION_BREAK,r.IMAGE,r.RICH_TEXT,r.YOUTUBE,r.NULL]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}}t.UiInputType=r},9499(e,t,r){t.YamlArtifactType=t.YamlArtifactTypeValues=void 0;const n=r(8421);t.YamlArtifactTypeValues={TEMPLATE:"template",ELEMENT:"element",TEXTFIELD:"text-field",CONTROLLED_TERM:"controlled-term-field",TEXTAREA:"text-area-field",LINK:"link-field",EXT_ROR:"ext-ror-field",EXT_ORCID:"ext-orcid-field",EXT_PFAS:"ext-pfas-field",EXT_PUBMED:"ext-pubmed-field",EXT_RRID:"ext-rrid-field",EXT_NIH_GRANT_ID:"ext-nih-grant-id-field",EXT_DOI:"ext-doi-field",TEMPORAL:"temporal-field",EMAIL:"email-field",NUMERIC:"numeric-field",PHONE_NUMBER:"phone-number-field",SINGLE_SELECT_LIST:"single-select-list-field",MULTI_SELECT_LIST:"multi-select-list-field",CHECKBOX:"checkbox-field",RADIO:"radio-field",ATTRIBUTE_VALUE:"attribute-value-field",PAGE_BREAK:"static-page-break",SECTION_BREAK:"static-section-break",IMAGE:"static-image",RICH_TEXT:"static-rich-text",YOUTUBE:"static-youtube-video",TEMPLATE_INSTANCE:"instance"};class a{value;category;constructor(e,t){this.value=e,this.category=t}getValue(){return this.value}static TEMPLATE=new a(t.YamlArtifactTypeValues.TEMPLATE,n.CedarFieldCategory.NONE);static ELEMENT=new a(t.YamlArtifactTypeValues.ELEMENT,n.CedarFieldCategory.NONE);static TEXTFIELD=new a(t.YamlArtifactTypeValues.TEXTFIELD,n.CedarFieldCategory.DYNAMIC);static CONTROLLED_TERM=new a(t.YamlArtifactTypeValues.CONTROLLED_TERM,n.CedarFieldCategory.DYNAMIC);static TEXTAREA=new a(t.YamlArtifactTypeValues.TEXTAREA,n.CedarFieldCategory.DYNAMIC);static LINK=new a(t.YamlArtifactTypeValues.LINK,n.CedarFieldCategory.DYNAMIC);static EXT_ROR=new a(t.YamlArtifactTypeValues.EXT_ROR,n.CedarFieldCategory.DYNAMIC);static EXT_ORCID=new a(t.YamlArtifactTypeValues.EXT_ORCID,n.CedarFieldCategory.DYNAMIC);static EXT_PFAS=new a(t.YamlArtifactTypeValues.EXT_PFAS,n.CedarFieldCategory.DYNAMIC);static EXT_PUBMED=new a(t.YamlArtifactTypeValues.EXT_PUBMED,n.CedarFieldCategory.DYNAMIC);static EXT_RRID=new a(t.YamlArtifactTypeValues.EXT_RRID,n.CedarFieldCategory.DYNAMIC);static EXT_NIH_GRANT_ID=new a(t.YamlArtifactTypeValues.EXT_NIH_GRANT_ID,n.CedarFieldCategory.DYNAMIC);static EXT_DOI=new a(t.YamlArtifactTypeValues.EXT_DOI,n.CedarFieldCategory.DYNAMIC);static TEMPORAL=new a(t.YamlArtifactTypeValues.TEMPORAL,n.CedarFieldCategory.DYNAMIC);static EMAIL=new a(t.YamlArtifactTypeValues.EMAIL,n.CedarFieldCategory.DYNAMIC);static NUMERIC=new a(t.YamlArtifactTypeValues.NUMERIC,n.CedarFieldCategory.DYNAMIC);static PHONE_NUMBER=new a(t.YamlArtifactTypeValues.PHONE_NUMBER,n.CedarFieldCategory.DYNAMIC);static SINGLE_SELECT_LIST=new a(t.YamlArtifactTypeValues.SINGLE_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static MULTI_SELECT_LIST=new a(t.YamlArtifactTypeValues.MULTI_SELECT_LIST,n.CedarFieldCategory.DYNAMIC);static CHECKBOX=new a(t.YamlArtifactTypeValues.CHECKBOX,n.CedarFieldCategory.DYNAMIC);static RADIO=new a(t.YamlArtifactTypeValues.RADIO,n.CedarFieldCategory.DYNAMIC);static ATTRIBUTE_VALUE=new a(t.YamlArtifactTypeValues.ATTRIBUTE_VALUE,n.CedarFieldCategory.DYNAMIC);static PAGE_BREAK=new a(t.YamlArtifactTypeValues.PAGE_BREAK,n.CedarFieldCategory.STATIC);static SECTION_BREAK=new a(t.YamlArtifactTypeValues.SECTION_BREAK,n.CedarFieldCategory.STATIC);static IMAGE=new a(t.YamlArtifactTypeValues.IMAGE,n.CedarFieldCategory.STATIC);static RICH_TEXT=new a(t.YamlArtifactTypeValues.RICH_TEXT,n.CedarFieldCategory.STATIC);static YOUTUBE=new a(t.YamlArtifactTypeValues.YOUTUBE,n.CedarFieldCategory.STATIC);static TEMPLATE_INSTANCE=new a(t.YamlArtifactTypeValues.TEMPLATE_INSTANCE,n.CedarFieldCategory.NONE);static NULL=new a(null,n.CedarFieldCategory.NULL);static values(){return[a.TEMPLATE,a.ELEMENT,a.TEXTFIELD,a.CONTROLLED_TERM,a.TEXTAREA,a.LINK,a.EXT_ROR,a.EXT_ORCID,a.EXT_PFAS,a.EXT_PUBMED,a.EXT_RRID,a.EXT_NIH_GRANT_ID,a.EXT_DOI,a.TEMPORAL,a.EMAIL,a.NUMERIC,a.PHONE_NUMBER,a.SINGLE_SELECT_LIST,a.MULTI_SELECT_LIST,a.CHECKBOX,a.RADIO,a.ATTRIBUTE_VALUE,a.PAGE_BREAK,a.SECTION_BREAK,a.IMAGE,a.RICH_TEXT,a.YOUTUBE,a.TEMPLATE_INSTANCE,a.NULL]}static forValue(e){for(const t of a.values())if(t.getValue()===e)return t;return this.NULL}isTemplate(){return this.value===t.YamlArtifactTypeValues.TEMPLATE}isElement(){return this.value===t.YamlArtifactTypeValues.ELEMENT}isField(){return this.isDynamicField()||this.isStaticField()}isStaticField(){return this.category===n.CedarFieldCategory.STATIC}isDynamicField(){return this.category===n.CedarFieldCategory.DYNAMIC}isTemplateInstance(){return this.value===t.YamlArtifactTypeValues.TEMPLATE_INSTANCE}}t.YamlArtifactType=a},4563(e,t,r){t.JavaStrings=void 0;const n=r(3992);t.JavaStrings=class{static isBlank(e){return n.TextPolicy.isBlank(e)}static isWhitespace(e){return n.TextPolicy.isBlankCodePoint(e.codePointAt(0))}}},2888(e,t){t.ComparisonError=void 0,t.ComparisonError=class{errorLocation;errorType;errorPath;expectedValue;encounteredValue;stackTopLines;constructor(e,t,r,n,a){this.errorLocation=e,this.errorType=t,this.errorPath=r,this.expectedValue=n,this.encounteredValue=a}}},9760(e,t){t.ComparisonErrorType=t.e=void 0,t.e={MISSING_KEY_IN_REAL_OBJECT:"missingKeyInRealObject",UNEXPECTED_KEY_IN_REAL_OBJECT:"unexpectedKeyInRealObject",VALUE_MISMATCH:"valueMismatch",MISSING_INDEX_IN_REAL_OBJECT:"missingIndexInRealObject",UNEXPECTED_INDEX_IN_REAL_OBJECT:"unexpectedIndexInRealObject",MISSING_VALUE_IN_REAL_OBJECT:"missingValueInRealObject",UNEXPECTED_VALUE_IN_REAL_OBJECT:"unexpectedValueInRealObject"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static MISSING_KEY_IN_REAL_OBJECT=new r(t.e.MISSING_KEY_IN_REAL_OBJECT);static UNEXPECTED_KEY_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_KEY_IN_REAL_OBJECT);static VALUE_MISMATCH=new r(t.e.VALUE_MISMATCH);static MISSING_INDEX_IN_REAL_OBJECT=new r(t.e.MISSING_INDEX_IN_REAL_OBJECT);static UNEXPECTED_INDEX_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_INDEX_IN_REAL_OBJECT);static MISSING_VALUE_IN_REAL_OBJECT=new r(t.e.MISSING_VALUE_IN_REAL_OBJECT);static UNEXPECTED_VALUE_IN_REAL_OBJECT=new r(t.e.UNEXPECTED_VALUE_IN_REAL_OBJECT);static NULL=new r(null);static values(){return[r.MISSING_KEY_IN_REAL_OBJECT,r.UNEXPECTED_KEY_IN_REAL_OBJECT,r.VALUE_MISMATCH,r.MISSING_INDEX_IN_REAL_OBJECT,r.UNEXPECTED_INDEX_IN_REAL_OBJECT,r.MISSING_VALUE_IN_REAL_OBJECT,r.UNEXPECTED_VALUE_IN_REAL_OBJECT]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}toJSON(){return this.value}}t.ComparisonErrorType=r},4325(e,t){t.ComparisonResult=void 0,t.ComparisonResult=class{comparisonErrors=[];comparisonWarnings=[];addComparisonError(e){this.comparisonErrors.push(e)}getComparisonErrors(){return this.comparisonErrors}getComparisonErrorCount(){return this.comparisonErrors.length}addComparisonWarning(e){this.comparisonWarnings.push(e)}getComparisonWarnings(){return this.comparisonWarnings}getComparisonWarningCount(){return this.comparisonWarnings.length}areEqual(){return 0===this.comparisonErrors.length&&0===this.comparisonWarnings.length}merge(e){this.comparisonErrors.push(...e.comparisonErrors),this.comparisonWarnings.push(...e.comparisonWarnings)}}},4036(e,t,r){t.JsonArtifactParsingResult=void 0;const n=r(2888),a=r(9760),i=r(3188),s=r(7092);t.JsonArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];validationFindings=[];getValidationFindings(){return[...this.validationFindings]}addValidationFinding(e,t="instance",r){if(this.validationFindings.some(t=>t.code===e.code&&t.path===e.path))return;if(this.validationFindings.push(e),"passed"===e.verificationStatus)return;const o=r??new n.ComparisonError("ValidationPolicy",a.ComparisonErrorType.VALUE_MISMATCH,i.JsonPath.fromPointer(e.path),e.message);s.ValidationPolicy.blocksSave(e,t)?this.addBlueprintComparisonError(o):this.addBlueprintComparisonWarning(o)}getValidationReport(e="instance"){const t=[...this.validationFindings];for(const e of this.blueprintComparisonErrors){if("ValidationPolicy"===e.errorLocation)continue;const r=e.errorType===a.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,n=r?"The template requires this property.":`Invalid structure: ${e.errorType.getValue()}.`;t.push(s.ValidationPolicy.finding(r?"missingProperty":"valueShape",e.errorPath.toPointer(),n))}return s.ValidationPolicy.summarize(t,e)}addBlueprintComparisonError(e){this.blueprintComparisonErrors.push(e)}getBlueprintComparisonErrors(){return this.blueprintComparisonErrors}getBlueprintComparisonErrorCount(){return this.blueprintComparisonErrors.length}addBlueprintComparisonWarning(e){this.blueprintComparisonWarnings.push(e)}getBlueprintComparisonWarnings(){return this.blueprintComparisonWarnings}getBlueprintComparisonWarningCount(){return this.blueprintComparisonWarnings.length}wasSuccessful(){return 0===this.blueprintComparisonErrors.length}adheresToBlueprint(){return 0===this.blueprintComparisonErrors.length&&0===this.blueprintComparisonWarnings.length}merge(e){this.blueprintComparisonErrors.push(...e.blueprintComparisonErrors),this.blueprintComparisonWarnings.push(...e.blueprintComparisonWarnings),this.validationFindings.push(...e.validationFindings)}}},3056(e,t,r){t.JsonObjectComparator=void 0;const n=r(2108),a=r(2888),i=r(3188),s=r(9760),o=r(5747),l=r(2733),c=r(936);function d(e){return null!==e&&"object"==typeof e&&!n.ExactDecimal.isExact(e)}function u(e,t){return"number"!=typeof e&&!n.ExactDecimal.isExact(e)||"number"!=typeof t&&!n.ExactDecimal.isExact(t)?e===t:0===n.NumericPolicy.compare(e,t)}class m{static compareBothWays(e,t,r,n,o,p=[]){!function t(r,n,h){const f=r.getLastComponent()==l.JsonSchema.required;if(Array.isArray(n)&&Array.isArray(h))if(f){const t=new Set(n),i=new Set(h);n.forEach((t,n)=>{const o=r.add(n);i.has(t)||e.addBlueprintComparisonError(new a.ComparisonError("oca01",s.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,o,t))}),h.forEach((n,i)=>{const o=r.add(i);t.has(n)||e.addBlueprintComparisonError(new a.ComparisonError("oca02",s.ComparisonErrorType.UNEXPECTED_VALUE_IN_REAL_OBJECT,o,void 0,n))})}else{const i=Math.max(n.length,h.length);for(let o=0;o<i;o++){const i=r.add(o);o in n?o in h?d(n[o])&&d(h[o])?t(i,n[o],h[o]):u(n[o],h[o])||e.addBlueprintComparisonError(new a.ComparisonError("ocl03",s.ComparisonErrorType.VALUE_MISMATCH,i,n[o],h[o])):e.addBlueprintComparisonError(new a.ComparisonError("ocl02",s.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,i,n[o])):e.addBlueprintComparisonError(new a.ComparisonError("ocl01",s.ComparisonErrorType.UNEXPECTED_INDEX_IN_REAL_OBJECT,i,void 0,h[o]))}}else new Set([...Object.keys(n),...Object.keys(h)]).forEach(f=>{const y=r.add(f);if(f in n)if(f in h){if(d(n[f])&&d(h[f]))t(y,n[f],h[f]);else if(!u(n[f],h[f])){const t=new a.ComparisonError("oco03",s.ComparisonErrorType.VALUE_MISMATCH,y,n[f],h[f]);o.useWarningForKnownIssues()&&m.isKnownProductionVariation(y)?e.addBlueprintComparisonWarning(t):e.addBlueprintComparisonError(t)}}else o.useWarningForKnownIssues()&&(y.endsIn(c.CedarModel.literals,i.JsonPath.ANY,c.CedarModel.selectedByDefault)||y.endsIn(c.CedarModel.ui,c.CedarModel.pages)||m.isKnownProductionVariation(y))?e.addBlueprintComparisonWarning(new a.ComparisonError("wco02",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,y)):e.addBlueprintComparisonError(new a.ComparisonError("oco02",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,y));else o.useWarningForKnownIssues()&&(y.endsIn(l.JsonSchema.properties,l.JsonSchema.atLanguage)||m.isKnownProductionVariation(y))?e.addBlueprintComparisonWarning(new a.ComparisonError("wco01",s.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,y)):p.includes(f)||e.addBlueprintComparisonError(new a.ComparisonError("oco01",s.ComparisonErrorType.UNEXPECTED_KEY_IN_REAL_OBJECT,y))})}(n,t,r)}static isKnownProductionVariation(e){return e.endsIn(l.JsonSchema.atContext,o.TemplateProperty.additionalProperties)||e.endsIn(l.JsonSchema.atContext,l.JsonSchema.properties,i.JsonPath.ANY,c.CedarModel.enum,i.JsonPath.ANY)||e.endsIn(l.JsonSchema.atContext,l.JsonSchema.required,i.JsonPath.ANY)||e.endsIn(l.JsonSchema.atContext,i.JsonPath.ANY)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyDescriptions,i.JsonPath.ANY)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyDescriptions)||e.endsIn(c.CedarModel.ui,c.CedarModel.propertyLabels)||e.endsIn(l.JsonSchema.properties,i.JsonPath.ANY,c.CedarModel.enum,i.JsonPath.ANY)||e.endsIn(l.JsonSchema.required)}static reportToLeft(e,t,r){t.useWarningForKnownIssues()&&m.isKnownProductionVariation(r.errorPath)?e.addBlueprintComparisonWarning(r):e.addBlueprintComparisonError(r)}static compareToLeft(e,t,r,n,i){!function t(r,n,o){const c=r.getLastComponent()==l.JsonSchema.required;if(Array.isArray(n)&&Array.isArray(o))if(c){const t=new Set(o);n.forEach((n,o)=>{const l=r.add(o);t.has(n)||m.reportToLeft(e,i,new a.ComparisonError("ola01",s.ComparisonErrorType.MISSING_VALUE_IN_REAL_OBJECT,l,n))})}else n.forEach((l,c)=>{const p=r.add(c);c in o?d(l)&&d(o[c])?t(p,l,o[c]):u(l,o[c])||m.reportToLeft(e,i,new a.ComparisonError("oll02",s.ComparisonErrorType.VALUE_MISMATCH,p,l,o[c])):m.reportToLeft(e,i,new a.ComparisonError("oll01",s.ComparisonErrorType.MISSING_INDEX_IN_REAL_OBJECT,p,n[c]))});else Object.keys(n).forEach(l=>{const c=r.add(l);l in o?d(n[l])&&d(o[l])?t(c,n[l],o[l]):u(n[l],o[l])||m.reportToLeft(e,i,new a.ComparisonError("olo02",s.ComparisonErrorType.VALUE_MISMATCH,c,n[l],o[l])):m.reportToLeft(e,i,new a.ComparisonError("olo01",s.ComparisonErrorType.MISSING_KEY_IN_REAL_OBJECT,c))})}(n,t,r)}static comparePrimitive(e,t,r,n){return u(t,r)||e.addBlueprintComparisonError(new a.ComparisonError("opp1",s.ComparisonErrorType.VALUE_MISMATCH,n,t,r)),e}}t.JsonObjectComparator=m},1591(e,t){t.YamlArtifactParsingResult=void 0,t.YamlArtifactParsingResult=class{blueprintComparisonErrors=[];blueprintComparisonWarnings=[];addBlueprintComparisonError(e){this.blueprintComparisonErrors.push(e)}getBlueprintComparisonErrors(){return this.blueprintComparisonErrors}getBlueprintComparisonErrorCount(){return this.blueprintComparisonErrors.length}addBlueprintComparisonWarning(e){this.blueprintComparisonWarnings.push(e)}getBlueprintComparisonWarnings(){return this.blueprintComparisonWarnings}getBlueprintComparisonWarningCount(){return this.blueprintComparisonWarnings.length}wasSuccessful(){return 0===this.blueprintComparisonErrors.length}adheresToBlueprint(){return 0===this.blueprintComparisonErrors.length&&0===this.blueprintComparisonWarnings.length}merge(e){this.blueprintComparisonErrors.push(...e.blueprintComparisonErrors),this.blueprintComparisonWarnings.push(...e.blueprintComparisonWarnings)}}},6109(e,t){t.YamlComparisonErrorType=t.H=void 0,t.H={MISSING_KEY_IN_RIGHT_OBJECT:"missingKeyInRightObject",UNEXPECTED_KEY_IN_RIGHT_OBJECT:"unexpectedKeyInRightObject",VALUE_MISMATCH:"valueMismatch",MISSING_INDEX_IN_RIGHT_OBJECT:"missingIndexInRightObject",UNEXPECTED_INDEX_IN_RIGHT_OBJECT:"unexpectedIndexInRightObject",MISSING_VALUE_IN_RIGHT_OBJECT:"missingValueInRightObject",UNEXPECTED_VALUE_IN_RIGHT_OBJECT:"unexpectedValueInRightObject"};class r{value;constructor(e){this.value=e}getValue(){return this.value}static MISSING_KEY_IN_RIGHT_OBJECT=new r(t.H.MISSING_KEY_IN_RIGHT_OBJECT);static UNEXPECTED_KEY_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_KEY_IN_RIGHT_OBJECT);static VALUE_MISMATCH=new r(t.H.VALUE_MISMATCH);static MISSING_INDEX_IN_RIGHT_OBJECT=new r(t.H.MISSING_INDEX_IN_RIGHT_OBJECT);static UNEXPECTED_INDEX_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_INDEX_IN_RIGHT_OBJECT);static MISSING_VALUE_IN_RIGHT_OBJECT=new r(t.H.MISSING_VALUE_IN_RIGHT_OBJECT);static UNEXPECTED_VALUE_IN_RIGHT_OBJECT=new r(t.H.UNEXPECTED_VALUE_IN_RIGHT_OBJECT);static NULL=new r(null);static values(){return[r.MISSING_KEY_IN_RIGHT_OBJECT,r.UNEXPECTED_KEY_IN_RIGHT_OBJECT,r.VALUE_MISMATCH,r.MISSING_INDEX_IN_RIGHT_OBJECT,r.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,r.MISSING_VALUE_IN_RIGHT_OBJECT,r.UNEXPECTED_VALUE_IN_RIGHT_OBJECT]}static forValue(e){for(const t of r.values())if(t.getValue()===e)return t;return this.NULL}toJSON(){return this.value}}t.YamlComparisonErrorType=r},1885(e,t,r){t.YamlObjectComparator=void 0;const n=r(2888),a=r(3188),i=r(6109),s=r(4325);t.YamlObjectComparator=class{static compare(e,t){const r=new s.ComparisonResult;return this.compareBothWays(r,e,t,new a.JsonPath),r}static compareBothWays(e,t,r,a){!function t(r,a,s){if(Array.isArray(a)&&Array.isArray(s)){const o=Math.max(a.length,s.length);for(let l=0;l<o;l++){const o=r.add(l);l in a?l in s?"object"==typeof a[l]&&null!==a[l]&&"object"==typeof s[l]&&null!==s[l]?t(o,a[l],s[l]):a[l]!==s[l]&&e.addComparisonError(new n.ComparisonError("ocl03",i.YamlComparisonErrorType.VALUE_MISMATCH,o,a[l],s[l])):e.addComparisonError(new n.ComparisonError("ocl02",i.YamlComparisonErrorType.MISSING_INDEX_IN_RIGHT_OBJECT,o,a[l])):e.addComparisonError(new n.ComparisonError("ocl01",i.YamlComparisonErrorType.UNEXPECTED_INDEX_IN_RIGHT_OBJECT,o,void 0,s[l]))}}else new Set([...Object.keys(a),...Object.keys(s)]).forEach(o=>{const l=r.add(o);o in a?o in s?"object"==typeof a[o]&&null!==a[o]&&"object"==typeof s[o]&&null!==s[o]?t(l,a[o],s[o]):a[o]!==s[o]&&e.addComparisonError(new n.ComparisonError("oco03",i.YamlComparisonErrorType.VALUE_MISMATCH,l,a[o],s[o])):e.addComparisonError(new n.ComparisonError("oco02",i.YamlComparisonErrorType.MISSING_KEY_IN_RIGHT_OBJECT,l)):e.addComparisonError(new n.ComparisonError("oco01",i.YamlComparisonErrorType.UNEXPECTED_KEY_IN_RIGHT_OBJECT,l))})}(a,t,r)}}},3188(e,t){t.JsonPath=void 0;class r{path;static ANY="*";constructor(...e){this.path=e}equal(e){return this.path.length===e.path.length&&this.path.every((t,r)=>t===e.path[r])}add(...e){return new r(...this.path,...e)}join(e){return new r(...this.path,...e.path)}toString(){let e="";return this.path.forEach(t=>{e+="number"==typeof t?`/[${t}]`:`/${t}`}),e+"/"}toPointer(){return this.path.map(e=>"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")).join("")}static fromPointer(e){return new r(...""===e?[]:e.slice(1).split("/").map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~")))}toJSON(){return this.toString()}getLastComponent(){return 0===this.path.length?null:this.path[this.path.length-1]}endsIn(...e){for(let t=1;t<=e.length;t++){if(t>this.path.length)return!1;const n=e[e.length-t];if(this.path[this.path.length-t]!==n&&n!=r.ANY)return!1}return!0}getLastNComponents(e){if(e<=0||0===this.path.length)return new r;const t=Math.max(this.path.length-e,0),n=this.path.slice(t);return new r(...n)}}t.JsonPath=r},6968(e,t,r){t.JsonContainerArtifactContent=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#",schema:"http://schema.org/","schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"}};static CONTEXT_VERBATIM_NO_BIBO;static{this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM)}}t.JsonContainerArtifactContent=a},6551(e,t,r){t.JsonTemplateContent=void 0;const n=r(8748);class a{static ANNOTATIONS={type:"object",patternProperties:{"^.+$":{oneOf:[{type:"object",properties:{"@id":{type:"string",format:"uri"}},additionalProperties:!1},{type:"object",properties:{"@value":{type:["string","number","boolean","null"]}},additionalProperties:!1}]}},additionalProperties:!1};static REQUIRED_PARTIAL=["@context","@id","schema:isBasedOn","schema:name","schema:description","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","oslc:modifiedBy"];static PROPERTIES_PARTIAL={"@context":{type:"object",properties:{_annotations:{type:"string",enum:["@nest"]},rdfs:{type:"string",format:"uri",enum:["http://www.w3.org/2000/01/rdf-schema#"]},xsd:{type:"string",format:"uri",enum:["http://www.w3.org/2001/XMLSchema#"]},pav:{type:"string",format:"uri",enum:["http://purl.org/pav/"]},schema:{type:"string",format:"uri",enum:["http://schema.org/"]},oslc:{type:"string",format:"uri",enum:["http://open-services.net/ns/core#"]},skos:{type:"string",format:"uri",enum:["http://www.w3.org/2004/02/skos/core#"]},"rdfs:label":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"schema:isBasedOn":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"schema:name":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"schema:description":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}},"pav:derivedFrom":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"pav:createdOn":{type:"object",properties:{"@type":{type:"string",enum:["xsd:dateTime"]}}},"pav:createdBy":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"pav:lastUpdatedOn":{type:"object",properties:{"@type":{type:"string",enum:["xsd:dateTime"]}}},"oslc:modifiedBy":{type:"object",properties:{"@type":{type:"string",enum:["@id"]}}},"skos:notation":{type:"object",properties:{"@type":{type:"string",enum:["xsd:string"]}}}},required:["xsd","pav","schema","oslc","schema:isBasedOn","schema:name","schema:description","pav:createdOn","pav:createdBy","pav:lastUpdatedOn","oslc:modifiedBy"],additionalProperties:!1},"@id":{type:["string","null"],format:"uri"},"@type":{oneOf:[{type:"string",format:"uri"},{type:"array",minItems:1,items:{type:"string",format:"uri"},uniqueItems:!0}]},"schema:isBasedOn":{type:"string",format:"uri"},"schema:name":{type:"string",minLength:1},"schema:description":{type:"string"},"pav:derivedFrom":{type:"string",format:"uri"},"pav:createdOn":{type:["string","null"],format:"date-time"},"pav:createdBy":{type:["string","null"],format:"uri"},"pav:lastUpdatedOn":{type:["string","null"],format:"date-time"},"oslc:modifiedBy":{type:["string","null"],format:"uri"},_annotations:a.ANNOTATIONS};static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_LIST=[];static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(a.PROPERTIES_PARTIAL).forEach(e=>{this.PROPERTIES_PARTIAL_KEY_LIST.push(e),this.PROPERTIES_PARTIAL_KEY_MAP.set(e,!0)}),this.REQUIRED_PARTIAL_KEY_MAP=this.REQUIRED_PARTIAL.reduce((e,t)=>(e.set(t,!0),e),new Map),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL_KEY_MAP),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_LIST),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_MAP)}}t.JsonTemplateContent=a},1501(e,t,r){t.JsonTemplateElementContent=void 0;const n=r(8748);class a{static REQUIRED_PARTIAL=["@context","@id"];static PROPERTIES_PARTIAL={"@context":{type:"object",properties:{},required:[],additionalProperties:!1},"@id":{type:["string","null"],format:"uri"},"@type":{oneOf:[{type:"string",format:"uri"},{type:"array",minItems:1,items:{type:"string",format:"uri"},uniqueItems:!0}]}};static LEGACY_ID_TYPING={type:"string",format:"uri"};static acceptEitherIdTyping(e,t){const r=n.ReaderUtil.getNode(t,"@id");null!==r&&JSON.stringify(r)===JSON.stringify(a.LEGACY_ID_TYPING)&&(e["@id"]=n.ReaderUtil.deepClone(a.LEGACY_ID_TYPING))}static REQUIRED_PARTIAL_KEY_MAP;static PROPERTIES_PARTIAL_KEY_MAP=new Map;static CONTEXT_VERBATIM_NO_BIBO;static{Object.keys(a.PROPERTIES_PARTIAL).forEach(e=>{this.PROPERTIES_PARTIAL_KEY_MAP.set(e,!0)}),this.REQUIRED_PARTIAL_KEY_MAP=this.REQUIRED_PARTIAL.reduce((e,t)=>(e.set(t,!0),e),new Map),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL),n.ReaderUtil.deepFreeze(this.REQUIRED_PARTIAL_KEY_MAP),n.ReaderUtil.deepFreeze(this.PROPERTIES_PARTIAL_KEY_MAP)}}t.JsonTemplateElementContent=a},9932(e,t,r){t.JsonTemplateFieldContentDynamic=void 0;const n=r(8748),a=r(2733),i=r(936);class s{static CONTEXT_VERBATIM={xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#",schema:"http://schema.org/",skos:"http://www.w3.org/2004/02/skos/core#","schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"skos:prefLabel":{"@type":"xsd:string"},"skos:altLabel":{"@type":"xsd:string"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"}};static PROPERTIES_VERBATIM_LITERAL={"@type":{type:"string",format:"uri"},"rdfs:label":{type:["string","null"]},"@value":{type:["string","null"]},"@language":{type:["string","null"],minLength:1}};static PROPERTIES_VERBATIM_IRI={"@type":{type:"string",format:"uri"},"@id":{type:"string",format:"uri"},"rdfs:label":{type:["string","null"]},"skos:notation":{type:["string","null"]}};static ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE={type:"object",properties:{"@value":{type:["string","null"]},"@type":{type:"string",format:"uri"}},required:["@value"],additionalProperties:!1};static ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE={type:"string",format:"uri"};static PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE;static PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION;static CONTEXT_VERBATIM_NO_BIBO;static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_LITERAL),this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE=n.ReaderUtil.deepClone(this.PROPERTIES_VERBATIM_LITERAL),n.ReaderUtil.deleteNodeKey(this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE,a.JsonSchema.atLanguage),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_LITERAL_NO_AT_LANGUAGE),this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION=n.ReaderUtil.deepClone(this.PROPERTIES_VERBATIM_IRI),n.ReaderUtil.deleteNodeKey(this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION,i.CedarModel.skosNotation),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_IRI_NO_SKOS_NOTATION),this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO),n.ReaderUtil.deepFreeze(this.PROPERTIES_VERBATIM_IRI),n.ReaderUtil.deepFreeze(this.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_OUTSIDE),n.ReaderUtil.deepFreeze(this.ADDITIONAL_PROPERTIES_VERBATIM_ATTRIBUTE_VALUE_INSIDE)}}t.JsonTemplateFieldContentDynamic=s},9251(e,t,r){t.JsonTemplateFieldContentStatic=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={schema:"http://schema.org/",pav:"http://purl.org/pav/",bibo:"http://purl.org/ontology/bibo/",oslc:"http://open-services.net/ns/core#"};static CONTEXT_VERBATIM_NO_BIBO;static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM),this.CONTEXT_VERBATIM_NO_BIBO=n.ReaderUtil.deepClone(this.CONTEXT_VERBATIM),n.ReaderUtil.deleteNodeKey(this.CONTEXT_VERBATIM_NO_BIBO,"bibo"),n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM_NO_BIBO)}}t.JsonTemplateFieldContentStatic=a},350(e,t,r){t.JsonTemplateInstanceContent=void 0;const n=r(8748);class a{static CONTEXT_VERBATIM={rdfs:"http://www.w3.org/2000/01/rdf-schema#",xsd:"http://www.w3.org/2001/XMLSchema#",pav:"http://purl.org/pav/",schema:"http://schema.org/",oslc:"http://open-services.net/ns/core#",skos:"http://www.w3.org/2004/02/skos/core#","rdfs:label":{"@type":"xsd:string"},"schema:isBasedOn":{"@type":"@id"},"schema:name":{"@type":"xsd:string"},"schema:description":{"@type":"xsd:string"},"pav:derivedFrom":{"@type":"@id"},"pav:createdOn":{"@type":"xsd:dateTime"},"pav:createdBy":{"@type":"@id"},"pav:lastUpdatedOn":{"@type":"xsd:dateTime"},"oslc:modifiedBy":{"@type":"@id"},"skos:notation":{"@type":"xsd:string"}};static{n.ReaderUtil.deepFreeze(this.CONTEXT_VERBATIM)}}t.JsonTemplateInstanceContent=a},3939(e,t,r){t.validationFieldSchema=function(e,t=!1){const r=e.valueConstraints,s=Object.assign(Object.create(Object.getPrototypeOf(e)),e);s.valueConstraints=Object.assign(Object.create(Object.getPrototypeOf(e.valueConstraints)),e.valueConstraints,{defaultValue:null,minValue:null,maxValue:null});const o=n.CedarJsonWriters.getStrict().getFieldWriterForField(s).getAsJsonNode(s);for(const e of["minValue","maxValue"])null!=r[e]&&((o._valueConstraints??={})[e]=r[e]);if(t&&null!=r.defaultValue){const e=r.defaultValue;(o._valueConstraints??={}).defaultValue=e instanceof a.ControlledTermDefaultValue?{termUri:e.termUri.getValue(),"rdfs:label":e.rdfsLabel}:e instanceof i.Iri?e.getValue():e}return o};const n=r(9607),a=r(7295),i=r(8802)},3068(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.DisplayText=void 0;class r{static segmenter=new Intl.Segmenter("und",{granularity:"grapheme"});static take(e,t,r=!1){const n=Math.max(0,Math.trunc(t));if(!n)return"";const a=Array.from(this.segmenter.segment(e),({segment:e})=>e);return(r?a.slice(-n):a.slice(0,n)).join("")}static searchKey(e){return Array.from(this.segmenter.segment(e),({segment:e})=>e.normalize("NFC").toLowerCase()).join("")}static splitMatch(e,t){const r=this.searchKey(t);if(!r)return[e,"",""];let n="";const a=[];for(const{segment:t,index:r}of this.segmenter.segment(e)){const e=t.normalize("NFC").toLowerCase();n+=e;for(let n=0;n<e.length;n++)a.push({start:r,end:r+t.length})}const i=n.indexOf(r);if(i<0)return[e,"",""];const s=a[i].start,o=a[i+r.length-1].end;return[e.slice(0,s),e.slice(s,o),e.slice(o)]}static elide(e,t=96,r=28){const n=Array.from(this.segmenter.segment(e),({segment:e})=>e),a=Math.max(1,Math.trunc(t));if(n.length<=a)return e;const i=Math.max(0,Math.min(Math.trunc(r),a-1));return`${n.slice(0,a-i-1).join("").trimEnd()}…${i?n.slice(-i).join("").trimStart():""}`}}t.DisplayText=r},6830(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FieldValuePolicy=void 0;const n=r(5036),a=r(2500),i=r(2108),s=r(1991),o=r(3992),l=r(7092);class c{static authorityTypes=new Set(["ext-orcid","ext-ror","ext-pfas","ext-pubmed","ext-rrid","ext-nih-grant-id","ext-doi"]);static staticTypes=new Set(["page-break","section-break","richtext","image","youtube"]);static integerRanges={"xsd:byte":["-128","127"],"xsd:short":["-32768","32767"],"xsd:int":["-2147483648","2147483647"],"xsd:long":["-9223372036854775808","9223372036854775807"]};static isControlled(e){const t=e._valueConstraints??{};return["controlled","controlled-term"].includes(e._ui?.inputType??"")||Object.hasOwn(e.properties??{},"@id")&&["ontologies","branches","classes","valueSets"].some(e=>Object.hasOwn(t,e))}static isIri(e){const t=e._ui?.inputType??"";return"link"===t||this.authorityTypes.has(t)||this.isControlled(e)||Object.hasOwn(e.properties??{},"@id")}static validateConfiguration(e,t=""){const r=e._valueConstraints??{},n=[],a=(e,r)=>n.push(l.ValidationPolicy.finding("templateConstraint",l.ValidationPolicy.child(t+"/_valueConstraints",e),r));for(const e of["minLength","maxLength","decimalPlace"])Object.hasOwn(r,e)&&(!Number.isInteger(r[e])||r[e]<0||r[e]>2147483647)&&a(e,`${e} must be a nonnegative integer.`);null!=r.minLength&&null!=r.maxLength&&r.minLength>r.maxLength&&a("maxLength","Minimum length exceeds maximum length.");const s=new Set;for(const e of["minValue","maxValue"])if(Object.hasOwn(r,e))try{if("number"!=typeof r[e]&&!i.ExactDecimal.isExact(r[e]))throw new Error;i.NumericPolicy.value(r[e]),s.add(e)}catch{a(e,"Numeric bounds must be finite decimal values.")}if(2===s.size&&i.NumericPolicy.compare(r.minValue,r.maxValue)>0&&a("maxValue","Minimum value exceeds maximum value."),"numeric"===e._ui?.inputType){const e=r.numberType,t=Object.hasOwn(this.integerRanges,e);t||["xsd:float","xsd:double","xsd:decimal"].includes(e)||a("numberType","A numeric field requires a recognized datatype.");const n=Number.isInteger(r.decimalPlace)&&r.decimalPlace>=0&&r.decimalPlace<=2147483647;t&&n&&0!==r.decimalPlace&&a("decimalPlace","Integer datatypes cannot declare fractional decimal places.");for(const o of s)(t||["xsd:float","xsd:double","xsd:decimal"].includes(e))&&(this.numeric({numberType:e},r[o],"","template").some(e=>"numberType"===e.code)?a(o,"The bound is outside its numeric datatype."):n&&i.NumericPolicy.fractionalDigits(r[o])>r.decimalPlace&&a(o,"The bound exceeds the declared decimal precision."))}return Object.hasOwn(r,"regex")&&("string"!=typeof r.regex?a("regex","A pattern must be a string."):""!==r.regex&&n.push(...this.regex(r.regex,null,t+"/_valueConstraints/regex"))),n}static validate(e,t,r="",i="instance"){if(null==t||""===t)return[];const s=e._valueConstraints??{},c=e._ui?.inputType,d=[],u=(e,t)=>d.push(l.ValidationPolicy.finding(e,r,t));if("string"!=typeof t&&("template"!==i||"numeric"!==c))return u("valueShape","A populated field value must be a string."),d;const m=String(t);if(null!=s.minLength&&o.TextPolicy.codePointLength(m)<s.minLength&&u("minLength",`Shorter than the minimum ${s.minLength}.`),null!=s.maxLength&&o.TextPolicy.codePointLength(m)>s.maxLength&&u("maxLength",`Longer than the maximum ${s.maxLength}.`),"string"==typeof s.regex&&""!==s.regex&&d.push(...this.regex(s.regex,m,r)),"email"!==c||/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(m)||u("email","Not a valid email address."),"phone-number"!==c||/^[+0-9 \t\-()]+$/.test(m)||u("phoneNumber","Not a valid phone number."),this.isIri(e)&&(a.IdentifierPolicy.isValidAuthoringIri(m,!0)||u("iriMalformed","Not a valid absolute IRI.")),"numeric"===c&&d.push(...this.numeric(s,t,r,i)),"temporal"===c)if("template"===i){try{n.TemporalDefaultPolicy.assertValid(s.temporalType??null,e._ui?.temporalGranularity??null,m)}catch(e){u("temporalType",e instanceof Error?e.message:"Invalid temporal default.")}/(Z|[+-]\d{2}:\d{2})$/.test(m)&&!0!==e._ui?.timezoneEnabled&&u("timezone","Carries a timezone offset but none is enabled.")}else d.push(...this.temporal(e,m,r));return Array.isArray(s.literals)&&s.literals.length&&!s.literals.some(e=>e?.label===m)&&u("choiceMembership","Not one of the declared options."),d}static validateNode(e,t,r=""){const n=[],a=(e,t,a)=>n.push(l.ValidationPolicy.finding(e,null===t?r:l.ValidationPolicy.child(r,t),a)),i=e._valueConstraints??{};if(!t||"object"!=typeof t||Array.isArray(t))return a("valueShape",null,"A field slot must be an object."),n;const s=t,o=!1===e.additionalProperties,c=t=>!o||Object.hasOwn(e.properties??{},t);if(this.staticTypes.has(e._ui?.inputType??"")){for(const e of Object.keys(s).filter(e=>!c(e)))a("valueShape",e,"The template does not declare this property.");return n}for(const e of["rdfs:label","skos:prefLabel","skos:notation","@language"])Object.hasOwn(s,e)&&null!==s[e]&&"string"!=typeof s[e]&&a("valueShape",e,`${e} must be a string or null.`);for(const e of Object.keys(s))"@id"===e||"@value"===e||c(e)||a("valueShape",e,"The template does not declare this property.");if(Object.hasOwn(s,"@id")&&("string"!=typeof s["@id"]||""===s["@id"]))return a("iriMalformed","@id","A populated IRI must be a nonempty string."),n;const d=(e.required??[]).filter(e=>!Object.hasOwn(s,e));for(const e of d)a("missingProperty",e,`The field slot must contain ${e}.`);if(d.length)return n;if(0===Object.keys(s).length)return this.isIri(e)?(!0===i.requiredValue&&a("required",null,"A value is required."),n):(a("missingProperty","@value","A literal field slot must contain @value."),n);if(this.isIri(e)){if(!Object.hasOwn(s,"@value")||null===s["@value"]&&c("@value")||a("valueShape","@value","An IRI field cannot contain a literal value."),!Object.hasOwn(s,"@id")){!0===i.requiredValue&&a("required",null,"A value is required.");const t=s["rdfs:label"];return this.isControlled(e)&&"string"==typeof t&&""!==t&&a("controlledStructure",null,"A controlled-term label requires an IRI."),n}return n.push(...this.validate(e,s["@id"],r+"/@id")),n}if(Object.hasOwn(s,"@id"))return a("valueShape","@id","A literal field cannot contain an IRI value."),n;if(!Object.hasOwn(s,"@value"))return a("valueShape","@value","A literal field requires @value."),n;const u=s["@value"];if(null===u||""===u)return!0===i.requiredValue&&a("required","@value","A value is required."),n;const m="numeric"===e._ui?.inputType?i.numberType:"temporal"===e._ui?.inputType?i.temporalType:null,p=e=>"string"==typeof e?e.replace("http://www.w3.org/2001/XMLSchema#","xsd:"):e;return null!=m&&p(s["@type"])!==p(m)&&a("valueType","@type",`The value must declare ${m}.`),n.push(...this.validate(e,u,r+"/@value")),n}static validateDefault(e,t=""){const r=(e._valueConstraints??{}).defaultValue;if(null==r)return[];const n=t+"/_valueConstraints/defaultValue";return this.isControlled(e)?r&&"object"==typeof r&&"string"==typeof r.termUri&&""!==r.termUri&&"string"==typeof r["rdfs:label"]&&""!==r["rdfs:label"]?this.validate(e,r.termUri,n+"/termUri","template"):[l.ValidationPolicy.finding("controlledStructure",n,"A controlled default requires termUri and rdfs:label.")]:this.validate(e,r,n,"template")}static assertConsistent(e){const t={...e,_valueConstraints:Object.fromEntries(Object.entries(e._valueConstraints??{}).filter(([,e])=>null!=e))},r=[...this.validateConfiguration(t),...this.validateDefault(t)].find(e=>l.ValidationPolicy.blocksSave(e.code,"template"));if(r)throw new Error(`${r.message} (${r.path})`)}static regex(e,t,r){const n=s.RegexChecks.inspect(e,t);return"valid"===n||"match"===n||"invalid"===n&&null!==t?[]:"mismatch"===n?[l.ValidationPolicy.finding("regex",r,"Does not match the field pattern.")]:"invalid"===n?[l.ValidationPolicy.finding("templateConstraint",r,"The field pattern is invalid.")]:[l.ValidationPolicy.finding("pending"===n?"regexPending":"regexEvaluation",r,"pending"===n?"Pattern validation is pending.":`Pattern validation could not finish (${n}).`,"pending"===n?"notChecked":"unavailable")]}static numeric(e,t,r,n){const a=[],s=(e,t)=>a.push(l.ValidationPolicy.finding(e,r,t)),o=e.numberType??"xsd:decimal",c=this.integerRanges[o],d=String(t);if("instance"===n&&(c?!/^[+-]?(?:0|[1-9][0-9]*)$/.test(d):!/^[+-]?(?:(?:0|[1-9][0-9]*)(?:\.[0-9]*)?|\.[0-9]+)$/.test(d)))return s("numberType",`Not a valid ${o}.`),a;try{if(!c&&!["xsd:float","xsd:double","xsd:decimal"].includes(o))throw new Error("Unknown numeric datatype.");if(i.NumericPolicy.value(t),c&&(!i.NumericPolicy.isInteger(t)||i.NumericPolicy.compare(t,c[0])<0||i.NumericPolicy.compare(t,c[1])>0))return s("numberType",`Outside the range of ${o}.`),a;if("template"===n&&("xsd:float"===o||"xsd:double"===o)){const e=d.replace(/^-/,""),t="xsd:float"===o?"3.4028234663852886e38":"1.7976931348623157e308",r="xsd:float"===o?"1.401298464324817e-45":"4.9e-324";if(i.NumericPolicy.compare(e,t)>0||0!==i.NumericPolicy.compare(e,0)&&i.NumericPolicy.compare(e,r)<0)return s("numberType",`Outside the range of ${o}.`),a}const r="instance"===n?d.split(".")[1]?.length??0:i.NumericPolicy.fractionalDigits(t);null!=e.decimalPlace&&r>e.decimalPlace&&s("decimalPlace",`More than ${e.decimalPlace} decimal places.`),("number"==typeof e.minValue||i.ExactDecimal.isExact(e.minValue))&&i.NumericPolicy.compare(t,e.minValue)<0&&s("minValue",`Below the minimum ${e.minValue}.`),("number"==typeof e.maxValue||i.ExactDecimal.isExact(e.maxValue))&&i.NumericPolicy.compare(t,e.maxValue)>0&&s("maxValue",`Above the maximum ${e.maxValue}.`)}catch{s("numberType","Not a finite decimal value.")}return a}static temporal(e,t,r){const n=[],a=(e,t)=>n.push(l.ValidationPolicy.finding(e,r,t)),i=e._valueConstraints?.temporalType,s=e._ui?.temporalGranularity,o=t.match(/(Z|[+-]\d{2}:\d{2})$/)?.[0],c=o?t.slice(0,-o.length):t;if(o){if("Z"!==o){const e=Number(o.slice(1,3)),t=Number(o.slice(4));(e>14||t>59||14===e&&0!==t)&&a("timezoneOffset","Not a valid xsd timezone offset.")}!0!==e._ui?.timezoneEnabled&&a("timezone","Carries a timezone offset but none is enabled.")}const d=/^(\d{4})-(\d{2})-(\d{2})$/,u=/^(\d{2}):(\d{2})(?::(\d{2}))?(\.\d+)?$/,m=c.split("T"),p="xsd:time"===i?null:m[0],h="xsd:time"===i?c:2===m.length?m[1]:null;if(!("xsd:date"===i?1===m.length&&d.test(c):"xsd:time"===i?u.test(c):"xsd:dateTime"===i&&2===m.length&&d.test(m[0])&&u.test(m[1])))return a("temporalType",`Not a valid ${i}.`),n;const f=p?.match(d),y=h?.match(u);if(f){const e=Number(f[1]),t=Number(f[2]),r=Number(f[3]);(t<1||t>12||r<1||r>[31,e%4!=0||e%100==0&&e%400!=0?28:29,31,30,31,30,31,31,30,31,30,31][t-1])&&a("temporalCalendar","Not a real calendar date.")}if(y&&(Number(y[1])>23||Number(y[2])>59||Number(y[3]??0)>59)&&a("temporalCalendar","Not a real time of day."),s){let e=f&&("year"===s&&("01"!==f[2]||"01"!==f[3])||"month"===s&&"01"!==f[3]);if(y){const t="00"===y[1]&&"00"===y[2]&&(null==y[3]||"00"===y[3])&&null==y[4];e||=["year","month","day"].includes(s)&&!("xsd:dateTime"===i&&t),e||=("second"===s||"decimalSecond"===s)&&null==y[3],e||="decimalSecond"===s&&null==y[4],e||="hour"===s&&("00"!==y[2]||null!=y[3]&&"00"!==y[3]||null!=y[4]),e||="minute"===s&&(null!=y[3]&&"00"!==y[3]||null!=y[4]),e||="second"===s&&null!=y[4]}e&&a("temporalGranularity",`Does not match ${s} granularity.`)}return n}}t.FieldValuePolicy=c},2500(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.IdentifierPolicy=void 0,t.IdentifierPolicy=class{static assertIdentifierCharacters(e,t){if(null!==e){if(Array.from(e).some(e=>e.charCodeAt(0)<=32||e.charCodeAt(0)>=127&&e.charCodeAt(0)<=159||/\p{Z}/u.test(e)))throw new Error(`Invalid URI at "${t}": unescaped space or control character.`);if(e.indexOf("#")!==e.lastIndexOf("#"))throw new Error(`Invalid URI at "${t}": more than one fragment delimiter.`);if(e.split(/[/?#]/,1)[0].includes(":")&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))throw new Error(`Invalid URI at "${t}": malformed scheme.`)}}static assertFieldIri(e,t){if(null===e)return;if(""===e)throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);if("string"!=typeof e)throw new Error(`Invalid URI/IRI at "${t}": expected string.`);let r=!1,n=!1;for(const a of e){const e=a.codePointAt(0);if("#"===a?(n=!0,r=!1):"?"!==a||n||(r=!0),e<128){if(e<=32||127===e||'<>"{}|\\^`'.includes(a))throw new Error(`Invalid URI/IRI at "${t}": unescaped space, control or forbidden character.`)}else if(!(e>=160&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65519||e>=65536&&e<=917501&&(65535&e)<=65533||e>=921600&&e<=983037||r&&(e>=57344&&e<=63743||e>=983040&&e<=1048573||e>=1048576&&e<=1114109)))throw new Error(`Invalid URI/IRI at "${t}": forbidden Unicode character.`)}if(/%(?![0-9a-fA-F]{2})/.test(e))throw new Error(`Invalid URI/IRI at "${t}": malformed percent escape.`);const a=/^[A-Za-z][A-Za-z0-9+.-]*:/.exec(e)?.[0]??"",i=e.slice(a.length).split("#",1)[0];if(a&&!i||"//"===i)throw new Error(`Invalid URI/IRI at "${t}": missing scheme-specific part or authority.`);const s=Array.from(e,e=>e.codePointAt(0)>=128?encodeURIComponent(e):e).join("");this.assertIdentifierCharacters(s,t)}static assertIri(e,t){if(null!==e&&""!==e){if("string"!=typeof e)throw new Error(`Invalid URI at "${t}": expected a string.`);this.assertFieldIri(e,t),this.assertIdentifierCharacters(e,t)}}static assertIdentifier(e,t){if(null!==e){if("string"!=typeof e)throw new Error(`Invalid URI at "${t}": expected a string.`);if(""===e)throw new Error(`An empty string is not a URI at "${t}"; write null or leave the key out where there is no value.`);if(this.assertIri(e,t),!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))throw new Error(`Invalid URI at "${t}": an identifier must be an absolute IRI.`)}}static matchesUriFormat(e){if("string"!=typeof e)return!1;if(""===e)return!0;try{return this.assertFieldIri(e,"value"),!0}catch{return!1}}static isValid(e){if("string"!=typeof e)return!1;try{return this.assertIdentifier(e,"value"),!0}catch{return!1}}static isValidFieldValue(e){if("string"!=typeof e)return!1;try{return this.assertFieldIri(e,"value"),!0}catch{return!1}}static isValidAuthoringIri(e,t=!1){if(!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(e))return!1;if(!(t?this.isValidFieldValue(e):this.isValid(e)))return!1;if(!/^https?:/i.test(e))return!0;if(!/^https?:\/\//i.test(e))return!1;try{return new URL(e).hostname.length>0}catch{return!1}}}},5904(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.JsonSourcePolicy=void 0;const n=r(2108),a=r(7120),i=new WeakMap;class s{static decimalSpelling(e,t){const r=i.get(e)?.get(t);return void 0!==r&&Object.is(r.value,e[t])?r.text:null}static sourceNumber(e){const t=n.NumericPolicy.value(e);return"number"==typeof t&&0!==n.NumericPolicy.compare(e,(0,a.javaPlainDecimal)(t))?n.ExactDecimal.forValue(e):t}static parse(e){let t=0,r=null;const a=()=>{for(;/[ \t\n\r]/.test(e[t]??"\0");)t++},o=()=>{throw new SyntaxError(`Invalid JSON at position ${t}`)};function l(){const r=t++;for(;;){if(t>=e.length)return o();const n=e[t++];if('"'===n)return JSON.parse(e.slice(r,t));if("\\"===n)t++;else if(n.charCodeAt(0)<32)return o()}}const c=function c(d){if(d>1e3)throw new RangeError("JSON nesting limit exceeded");a();const u=e[t];if('"'===u)return l();if("{"===u||"["===u){t++;const s={},m=[],p="{"===u?"}":"]";if(a(),e[t]!==p)for(;;){if(a(),"{"===u){if('"'!==e[t])return o();const u=l();if(Object.hasOwn(s,u))throw new SyntaxError("Duplicate JSON mapping key");if(a(),":"!==e[t++])return o();r=null;const m=c(d+1);if(Object.defineProperty(s,u,{value:m,enumerable:!0,writable:!0,configurable:!0}),null!==r&&("number"==typeof m||n.ExactDecimal.isExact(m))){const e=i.get(s)??new Map;i.set(s,e.set(u,{value:m,text:r}))}}else m.push(c(d+1));if(a(),e[t]===p)break;if(","!==e[t++])return o()}return t++,"{"===u?s:m}for(const[r,n]of[["true",!0],["false",!1],["null",null]])if(e.startsWith(r,t))return t+=r.length,n;const m=/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?/.exec(e.slice(t));if(!m)return o();if(m[0].length>1e3)throw new RangeError("JSON number length limit exceeded");return t+=m[0].length,r=/[.eE]/.test(m[0])?m[0]:null,s.sourceNumber(m[0])}(0);if(a(),t!==e.length&&o(),null===c||"object"!=typeof c||Array.isArray(c)||c instanceof n.ExactDecimal)throw new SyntaxError("Expected a JSON object");return c}static clone(e){const t=new Set;return function e(r){if(n.ExactDecimal.isExact(r))return n.ExactDecimal.forValue(String(r));if(null==r||"string"==typeof r||"boolean"==typeof r)return r;if("number"==typeof r&&Number.isFinite(r))return r;if("object"!=typeof r||t.has(r))throw new TypeError("Expected acyclic JSON data");t.add(r);try{if(Array.isArray(r))return r.map(e);if(Object.getPrototypeOf(r)!==Object.prototype&&null!==Object.getPrototypeOf(r))throw new TypeError("Expected a JSON object");return Object.fromEntries(Object.entries(r).map(([t,r])=>[t,e(r)]))}finally{t.delete(r)}}(e)}static stringify(e,t=0){const r=" ".repeat(Math.max(0,Math.min(10,t))),i=new Set,s=function e(t,s){if(n.ExactDecimal.isExact(t))return t.toString();if("number"==typeof t)return(0,a.javaPlainDecimal)(t);if("string"==typeof t||"boolean"==typeof t||null===t)return JSON.stringify(t);if(void 0!==t){if("object"!=typeof t)throw new TypeError("Expected a JSON value");if(s>1e3||i.has(t))throw new TypeError("Cyclic JSON value or nesting limit exceeded");i.add(t);try{const n=Array.isArray(t),a=[];if(n)for(const r of t)a.push(e(r,s+1)??"null");else for(const n of Object.keys(t)){const i=e(t[n],s+1);void 0!==i&&a.push(JSON.stringify(n)+(r?": ":":")+i)}const[i,o]=n?["[","]"]:["{","}"];return a.length?r?i+"\n"+r.repeat(s+1)+a.join(",\n"+r.repeat(s+1))+"\n"+r.repeat(s)+o:i+a.join(",")+o:i+o}finally{i.delete(t)}}}(e,0);if(void 0===s)throw new TypeError("Expected a JSON value");return s}}t.JsonSourcePolicy=s},2108(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.NumericPolicy=t.ExactDecimal=void 0;class r{text;cedarExactDecimal=!0;static isExact(e){return null!==e&&"object"==typeof e&&!0===e.cedarExactDecimal&&"function"==typeof e.toJSON}constructor(e){this.text=e,Object.freeze(this)}static forValue(e){return new r(n.canonical(e))}toString(){return this.text}valueOf(){throw new Error("Use NumericPolicy.compare for exact decimals; implicit numeric coercion would lose precision.")}toJSON(){const e=JSON.rawJSON;if(!e)throw new Error("Use JsonSourcePolicy.stringify to serialize exact decimal numbers.");return e(this.text)}}t.ExactDecimal=r;class n{static parts(e){const t="string"==typeof e?e:String(e),r=/^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))(?:[eE]([+-]?\d+))?$/.exec(t);if(!r)throw new Error("Expected a finite decimal number without surrounding whitespace.");const n=r[3]??r[4]??"",a=BigInt(r[5]??"0");let i=a-BigInt(n.length);if(a<-2147483647n||a>2147483647n||i<-2147483647n||i>2147483648n)throw new Error("Decimal exponent or scale is outside the shared numeric range.");let s=((r[2]??"")+n).replace(/^0+/,"");if(!s)return{sign:0,digits:"0",exponent:0n};const o=/0+$/.exec(s)?.[0].length??0;return o&&(s=s.slice(0,-o),i+=BigInt(o)),{sign:"-"===r[1]?-1:1,digits:s,exponent:i}}static canonical(e){const{sign:t,digits:r,exponent:n}=this.parts(e);if(!t)return"0";const a=t<0?"-":"",i=n+BigInt(r.length-1);if(n>=0n&&i<1000n)return a+r+"0".repeat(Number(n));if(n<0n&&i>=-1000n){const e=r.length+Number(n);return a+(e>0?r.slice(0,e)+"."+r.slice(e):"0."+"0".repeat(-e)+r)}if(i>2147483647n){const e=n-2147483647n;return a+r+(e>0n?"0".repeat(Number(e)):"")+"E+"+(e>0n?2147483647n:n)}return a+r[0]+(r.length>1?"."+r.slice(1):"")+"E"+(i>=0n?"+":"")+i}static compare(e,t){const r=this.parts(e),n=this.parts(t);if(r.sign!==n.sign)return r.sign<n.sign?-1:1;if(!r.sign)return 0;const a=BigInt(r.digits.length)+r.exponent,i=BigInt(n.digits.length)+n.exponent;let s;if(a!==i)s=a<i?-1:1;else{const e=Math.max(r.digits.length,n.digits.length),t=r.digits.padEnd(e,"0"),a=n.digits.padEnd(e,"0");s=t===a?0:t<a?-1:1}return 0===s?0:s*r.sign}static isInteger(e){return this.parts(e).exponent>=0n}static fractionalDigits(e){return Math.max(0,-Number(this.parts(e).exponent))}static value(e){if(r.isExact(e))return e;if(this.parts(e),"number"==typeof e)return e;const t=Number(e);return!Number.isFinite(t)||Number.isInteger(t)&&!Number.isSafeInteger(t)||0!==this.compare(e,t)?r.forValue(e):t}}t.NumericPolicy=n},1991(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RegexChecks=void 0;const n=r(128);class a{changed;policy;entries=new Map;used=null;size=0;disposed=!1;capacityLimited=!1;static active=null;constructor(e=()=>{},t=new n.RegexPolicy){this.changed=e,this.policy=t}run(e){if(this.used)return e();const t=a.active;a.active=this,this.used=new Set,this.capacityLimited=!1;try{return e()}finally{const e=this.used;this.used=null,a.active=t;let r=!1;for(const[t,n]of this.entries)e.has(t)||(r=!0,this.entries.delete(t),this.size-=t.length,n.controller.abort());r&&this.capacityLimited&&queueMicrotask(()=>{this.disposed||this.changed()})}}static inspect(e,t=null){return this.active?.check(e,t)??"pending"}check(e,t){if(this.disposed)return"cancelled";if(e.length>1e4||(t?.length??0)>1e6)return"limit";const r=JSON.stringify([e,t]);this.used.add(r);const n=this.entries.get(r);if(n)return n.result;if(this.entries.size>=1024||this.size+r.length>4e6)return this.capacityLimited=!0,"limit";const a=new AbortController,i={result:"pending",controller:a,done:Promise.resolve()};return this.entries.set(r,i),this.size+=r.length,i.done=this.policy.evaluate(e,t,a.signal).then(e=>{this.disposed||this.entries.get(r)!==i||(i.result=e,this.pending||this.changed())}),"pending"}get pending(){return[...this.entries.values()].some(e=>"pending"===e.result)}async settled(){await Promise.all([...this.entries.values()].map(e=>e.done))}static async validate(e,t){const r=new a(void 0,t);try{let t=r.run(e);for(;r.pending;)await r.settled(),t=r.run(e);return t}finally{r.dispose()}}dispose(){this.disposed=!0;for(const e of this.entries.values())e.controller.abort();this.entries.clear(),this.size=0,this.policy.dispose()}}t.RegexChecks=a},128(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RegexPolicy=t.REGEX_WORKER_SOURCE=void 0,t.REGEX_WORKER_SOURCE="\n onmessage = ({data}) => {\n let result;\n try {\n const expression = new RegExp('^(?:' + data.pattern + ')$');\n result = data.value === null ? 'valid' : expression.test(data.value) ? 'match' : 'mismatch';\n } catch (_) { result = 'invalid'; }\n postMessage({id: data.id, result});\n };\n postMessage({ready: true});\n",t.RegexPolicy=class{worker=null;ready=!1;releaseSource=null;current=null;queue=[];serial=0;timer;idleTimer;closed=!1;options;constructor(e={}){this.options={workerFactory:e.workerFactory??(()=>{const e=globalThis,r=e.URL.createObjectURL(new e.Blob([t.REGEX_WORKER_SOURCE],{type:"text/javascript"}));return this.releaseSource=()=>e.URL.revokeObjectURL(r),new e.Worker(r)}),workTimeoutMs:e.workTimeoutMs??250,startupTimeoutMs:e.startupTimeoutMs??5e3,queueLimit:e.queueLimit??1024};for(const e of[this.options.workTimeoutMs,this.options.startupTimeoutMs,this.options.queueLimit])if(!Number.isSafeInteger(e)||e<1)throw new RangeError("Regex limits must be positive integers")}evaluate(e,t=null,r){return this.closed||r?.aborted?Promise.resolve("cancelled"):e.length>1e4||(t?.length??0)>1e6||this.queue.length>=this.options.queueLimit?Promise.resolve("limit"):new Promise(n=>{const a={id:++this.serial,pattern:e,value:t,finish:e=>{r?.removeEventListener("abort",i),n(e)}},i=()=>{this.current===a?this.fail("cancelled"):(this.queue=this.queue.filter(e=>e!==a),a.finish("cancelled"))};r?.addEventListener("abort",i,{once:!0}),this.queue.push(a),this.next()})}stopWorker(){clearTimeout(this.timer),clearTimeout(this.idleTimer),this.worker&&(this.worker.onmessage=null,this.worker.onerror=null,this.worker.terminate()),this.worker=null,this.ready=!1,this.releaseSource?.(),this.releaseSource=null}fail(e){this.stopWorker();const t=this.current;this.current=null,t?.finish(e),queueMicrotask(()=>this.next())}next(){if(!this.closed&&!this.current&&0!==this.queue.length)if(clearTimeout(this.idleTimer),this.current=this.queue.shift(),this.worker&&this.ready)this.send();else try{const e=this.options.workerFactory();this.worker=e,this.timer=setTimeout(()=>this.fail("unavailable"),this.options.startupTimeoutMs),e.onerror=()=>{this.worker===e&&this.fail("unavailable")},e.onmessage=({data:t})=>{if(this.worker!==e||!t||"object"!=typeof t)return;const r=t;if(r.ready&&!this.ready)clearTimeout(this.timer),this.ready=!0,this.send();else if(r.id===this.current?.id&&["valid","match","mismatch","invalid"].includes(r.result??"")){clearTimeout(this.timer);const e=this.current;this.current=null,e.finish(r.result),this.idleTimer=setTimeout(()=>this.stopWorker(),1e3),this.next()}}}catch{this.fail("unavailable")}}send(){if(this.current&&this.worker){this.timer=setTimeout(()=>this.fail("timeout"),this.options.workTimeoutMs);try{this.worker.postMessage({id:this.current.id,pattern:this.current.pattern,value:this.current.value})}catch{this.fail("unavailable")}}}dispose(){this.closed=!0,this.stopWorker(),this.current?.finish("cancelled"),this.current=null,this.queue.splice(0).forEach(e=>e.finish("cancelled"))}}},6403(e,t,r){t.SchemaValuePolicy=void 0;const n=r(6830),a=r(7092);t.SchemaValuePolicy=class{static visit(e,t,r){if(!e||"object"!=typeof e||Array.isArray(e))return void r.push(a.ValidationPolicy.finding("valueShape",t,"A definition must be an object."));const i=e;if("array"===i.type)return null!=i.minItems&&null!=i.maxItems&&i.minItems>i.maxItems&&r.push(a.ValidationPolicy.finding("templateConstraint",t+"/maxItems","Minimum occurrence count exceeds maximum.")),void this.visit(i.items,t+"/items",r);if(i._ui?.inputType){r.push(...n.FieldValuePolicy.validateConfiguration(i,t),...n.FieldValuePolicy.validateDefault(i,t));const e=i._valueConstraints?.defaultValue;if(null!=e&&""!==e&&(n.FieldValuePolicy.isControlled(i)||n.FieldValuePolicy.authorityTypes.has(i._ui.inputType))){const s=t+"/_valueConstraints/defaultValue"+(n.FieldValuePolicy.isControlled(i)&&"object"==typeof e?"/termUri":"");r.push(a.ValidationPolicy.finding("semanticNotChecked",s,"Default identifier membership or existence has not been verified.","notChecked"))}return}for(const[e,n]of Object.entries(i.properties??{})){const i="array"===n?.type?n.items:n;i&&"object"==typeof i&&i._ui&&this.visit(n,a.ValidationPolicy.child(t+"/properties",e),r)}}}},5036(e,t){t.TemporalDefaultPolicy=void 0,t.TemporalDefaultPolicy=class{static zone="(?:Z|[+-](?:(?:0\\d|1[0-3]):[0-5]\\d|14:00))?";static hour="(?:[01]\\d|2[0-3])";static minute="[0-5]\\d";static second="[0-5]\\d";static assertValid(e,t,r){if(null===r||""===r)return;const n=e;if(null===n)throw new Error("Temporal default requires a temporal datatype.");if(!this.isCompatibleGranularity(e,t))throw new Error(`Temporal datatype ${n} is not compatible with ${t} granularity.`);const a=this.datePattern(t,"xsd:date"===n),i=this.timePattern(t);let s;if(s="xsd:date"===n?a:"xsd:time"===n?i:this.dateTimePattern(t),!s.test(r)||!this.hasValidCalendarDate(r))throw new Error(`Temporal default "${r}" is not valid for ${n}`+(null===t?".":` at ${t} granularity.`))}static isCompatibleGranularity(e,t){return null===t||("xsd:date"===e?["year","month","day"].includes(t):"xsd:time"===e?["hour","minute","second","decimalSecond"].includes(t):["day","hour","minute","second","decimalSecond"].includes(t))}static datePattern(e,t){return"year"===e?/^\d{4}$/:"month"===e?/^\d{4}-(?:0[1-9]|1[0-2])$/:"day"!==e&&t?/^\d{4}(?:-(?:0[1-9]|1[0-2])(?:-(?:0[1-9]|[12]\d|3[01]))?)?$/:/^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$/}static timePattern(e){const t=this.zone,r=this.hour,n=this.minute,a=this.second;return"hour"===e?new RegExp(`^${r}${t}$`):"minute"===e?new RegExp(`^${r}:${n}${t}$`):"second"===e?new RegExp(`^${r}:${n}:${a}${t}$`):"decimalSecond"===e?new RegExp(`^${r}:${n}:${a}\\.\\d+${t}$`):new RegExp(`^${r}(?::${n}(?::${a}(?:\\.\\d+)?)?)?${t}$`)}static dateTimePattern(e){const t="\\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\\d|3[01])";return"hour"===e||"minute"===e||"second"===e||"decimalSecond"===e?new RegExp(`^${t}T${this.timePatternSource(e)}$`):"year"===e||"month"===e?/a^/:"day"===e?new RegExp(`^${t}$`):new RegExp(`^${t}(?:T${this.timePatternSource(null)})?$`)}static timePatternSource(e){return this.timePattern(e).source.replace(/^\^|\$$/g,"")}static hasValidCalendarDate(e){const t=/^(\d{4})-(\d{2})-(\d{2})/.exec(e);if(null===t)return!0;const r=Number(t[1]),n=Number(t[2]);return Number(t[3])<=[31,r%4!=0||r%100==0&&r%400!=0?28:29,31,30,31,30,31,31,30,31,30,31][n-1]}}},3992(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TextPolicy=void 0,t.TextPolicy=class{constructor(){}static isBlank(e){for(const t of e)if(!this.isBlankCodePoint(t.codePointAt(0)))return!1;return!0}static isBlankCodePoint(e){return e>=9&&e<=13||e>=28&&e<=32||5760===e||e>=8192&&e<=8198||e>=8200&&e<=8202||8232===e||8233===e||8287===e||12288===e}static codePointLength(e){return Array.from(e).length}static equalsIgnoreCase(e,t){const r=Array.from(e),n=Array.from(t);return e.length===t.length&&r.length===n.length&&r.every((e,t)=>{const r=n[t],a=e.toUpperCase(),i=r.toUpperCase();return e===r||a===i||a.toLowerCase()===i.toLowerCase()})}static trimInputPadding(e){return e.replace(/^[\t\n\r ]+|[\t\n\r ]+$/g,"")}}},5435(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TimestampPolicy=void 0,t.TimestampPolicy=class{static canonical(e){const t=e.replace(/([+-][0-9]{2})([0-9]{2})$/,"$1:$2"),r=/^(\d{4}|-\d{4,9}|\+\d{5,9})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,9}))?)?([Zz]|[+-]\d{2}(?::\d{2}(?::\d{2})?)?)$/.exec(t);if(!r)throw new Error("Expected an ISO timestamp with an explicit offset.");const[,n,a,i,s,o,l="00",c="",d]=r,u=Number(n),m=Number(a),p=Number(i),h=[31,u%4!=0||u%100==0&&u%400!=0?28:29,31,30,31,30,31,31,30,31,30,31];if(0===u&&n.startsWith("-")||m<1||m>12||p<1||p>h[m-1]||Number(s)>23||Number(o)>59||Number(l)>59)throw new Error("Invalid timestamp calendar or clock value.");let f="Z";if("Z"!==d.toUpperCase()){const[e,t=0,r=0]=d.slice(1).split(":").map(Number);if(e>18||t>59||r>59||18===e&&(0!==t||0!==r))throw new Error("Timestamp offset is outside the ISO offset range.");(e||t||r)&&(f=`${d[0]}${String(e).padStart(2,"0")}:${String(t).padStart(2,"0")}`,r&&(f+=`:${String(r).padStart(2,"0")}`))}const y=(u<0?"-":u>9999?"+":"")+String(Math.abs(u)).padStart(4,"0"),T=c.replace(/0+$/,"");return`${y}-${a}-${i}T${s}:${o}:${l}${T?"."+T:""}${f}`}static matchesFormat(e){const t=/^(\d{4}|\+\d{5,9})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])T(?:[01]\d|2[0-3]|24(?=:00:00(?:\.0{1,9})?[Z+-])):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](\d{2})(?::([0-5]\d)(?::([0-5]\d))?|([0-5]\d)))$/.exec(e);if(null===t||Number(t[1])<1)return!1;const[,,,,r="0",n,a="0",i]=t;return 3600*Number(r)+60*Number(n??i??0)+Number(a)<=64800}}},7092(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationPolicy=void 0;class r{static constraints=new Set(["minLength","maxLength","regex","pattern","email","link","phoneNumber","minValue","maxValue","decimalPlace","temporalGranularity","timezone","choiceMembership","maxItems","controlledTermMembership","authorityIdentifier","authorityMembership"]);static completeness=new Set(["required","minItems"]);static verification=new Set(["regexPending","regexEvaluation","regexUnavailable","semanticNotChecked","semanticUnavailable","controlledTermVerified","authorityVerified"]);static acceptsSemanticResult(e,t,r){switch(t){case"passed":return r===(e?"controlledTermVerified":"authorityVerified");case"failed":return e?"controlledTermMembership"===r:"authorityIdentifier"===r||"authorityMembership"===r;case"notChecked":return"semanticNotChecked"===r;case"unavailable":return"semanticUnavailable"===r;default:return!1}}static category(e){return this.constraints.has(e)?"constraint":this.completeness.has(e)?"completeness":this.verification.has(e)?"verification":"structural"}static blocksSave(e,t="instance"){if("string"!=typeof e&&"passed"===e.verificationStatus)return!1;const r="string"==typeof e?this.category(e):e.category;return"structural"===r||"template"===t&&("verification"!==r||"string"!=typeof e&&"failed"===e.verificationStatus)}static severity(e,t="instance"){return this.blocksSave(e,t)?"error":"warning"}static finding(e,t,r,n){const a={code:e,category:this.category(e),path:t,message:r};return void 0!==n&&(a.verificationStatus=n),a}static summarize(e,t="instance"){const r=e.filter(e=>"passed"!==e.verificationStatus);return{findings:[...e],structurallyValid:!r.some(e=>"structural"===e.category),canSave:!r.some(e=>this.blocksSave(e,t)),isValid:0===r.length}}static pointer(e){return e.map(e=>"/"+String(e).replace(/~/g,"~0").replace(/\//g,"~1")).join("")}static child(e,t){return e+this.pointer([t])}}t.ValidationPolicy=r},3198(e,t,r){r.r(t),r.d(t,{Alias:()=>J,CST:()=>n,Composer:()=>er,Document:()=>Rt,Lexer:()=>Nr,LineCounter:()=>_r,Pair:()=>Ee,Parser:()=>Pr,Scalar:()=>K,Schema:()=>St,YAMLError:()=>Nt,YAMLMap:()=>Se,YAMLParseError:()=>_t,YAMLSeq:()=>we,YAMLWarning:()=>Lt,default:()=>a,isAlias:()=>m,isCollection:()=>g,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Br,parseAllDocuments:()=>Yr,parseDocument:()=>Jr,stringify:()=>kr,visit:()=>v,visitAsync:()=>R});var n={};r.r(n),r.d(n,{BOM:()=>hr,DOCUMENT:()=>fr,FLOW_END:()=>yr,SCALAR:()=>Tr,createScalarToken:()=>rr,isCollection:()=>gr,isScalar:()=>Er,prettyToken:()=>Cr,resolveAsScalar:()=>tr,setScalarValue:()=>nr,stringify:()=>sr,tokenType:()=>Ir,visit:()=>mr});var a={};r.r(a),r.d(a,{Alias:()=>J,CST:()=>n,Composer:()=>er,Document:()=>Rt,Lexer:()=>Nr,LineCounter:()=>_r,Pair:()=>Ee,Parser:()=>Pr,Scalar:()=>K,Schema:()=>St,YAMLError:()=>Nt,YAMLMap:()=>Se,YAMLParseError:()=>_t,YAMLSeq:()=>we,YAMLWarning:()=>Lt,isAlias:()=>m,isCollection:()=>g,isDocument:()=>p,isMap:()=>h,isNode:()=>E,isPair:()=>f,isScalar:()=>y,isSeq:()=>T,parse:()=>Br,parseAllDocuments:()=>Yr,parseDocument:()=>Jr,stringify:()=>kr,visit:()=>v,visitAsync:()=>R});const i=Symbol.for("yaml.alias"),s=Symbol.for("yaml.document"),o=Symbol.for("yaml.map"),l=Symbol.for("yaml.pair"),c=Symbol.for("yaml.scalar"),d=Symbol.for("yaml.seq"),u=Symbol.for("yaml.node.type"),m=e=>!!e&&"object"==typeof e&&e[u]===i,p=e=>!!e&&"object"==typeof e&&e[u]===s,h=e=>!!e&&"object"==typeof e&&e[u]===o,f=e=>!!e&&"object"==typeof e&&e[u]===l,y=e=>!!e&&"object"==typeof e&&e[u]===c,T=e=>!!e&&"object"==typeof e&&e[u]===d;function g(e){if(e&&"object"==typeof e)switch(e[u]){case o:case d:return!0}return!1}function E(e){if(e&&"object"==typeof e)switch(e[u]){case i:case o:case c:case d:return!0}return!1}const C=e=>(y(e)||g(e))&&!!e.anchor,I=Symbol("break visit"),A=Symbol("skip children"),b=Symbol("remove node");function v(e,t){const r=N(t);p(e)?S(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):S(null,e,r,Object.freeze([]))}function S(e,t,r,n){const a=_(e,t,r,n);if(E(a)||f(a))return L(e,n,a),S(e,a,r,n);if("symbol"!=typeof a)if(g(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const a=S(e,t.items[e],r,n);if("number"==typeof a)e=a-1;else{if(a===I)return I;a===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=S("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const a=S("value",t.value,r,n);if(a===I)return I;a===b&&(t.value=null)}return a}async function R(e,t){const r=N(t);p(e)?await w(null,e.contents,r,Object.freeze([e]))===b&&(e.contents=null):await w(null,e,r,Object.freeze([]))}async function w(e,t,r,n){const a=await _(e,t,r,n);if(E(a)||f(a))return L(e,n,a),w(e,a,r,n);if("symbol"!=typeof a)if(g(t)){n=Object.freeze(n.concat(t));for(let e=0;e<t.items.length;++e){const a=await w(e,t.items[e],r,n);if("number"==typeof a)e=a-1;else{if(a===I)return I;a===b&&(t.items.splice(e,1),e-=1)}}}else if(f(t)){n=Object.freeze(n.concat(t));const e=await w("key",t.key,r,n);if(e===I)return I;e===b&&(t.key=null);const a=await w("value",t.value,r,n);if(a===I)return I;a===b&&(t.value=null)}return a}function N(e){return"object"==typeof e&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function _(e,t,r,n){return"function"==typeof r?r(e,t,n):h(t)?r.Map?.(e,t,n):T(t)?r.Seq?.(e,t,n):f(t)?r.Pair?.(e,t,n):y(t)?r.Scalar?.(e,t,n):m(t)?r.Alias?.(e,t,n):void 0}function L(e,t,r){const n=t[t.length-1];if(g(n))n.items[e]=r;else if(f(n))"key"===e?n.key=r:n.value=r;else{if(!p(n)){const e=m(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${e} parent`)}n.contents=r}}v.BREAK=I,v.SKIP=A,v.REMOVE=b,R.BREAK=I,R.SKIP=A,R.REMOVE=b;const V={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},O=e=>e.replace(/[!,[\]{}]/g,e=>V[e]);class F{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},F.defaultYaml,e),this.tags=Object.assign({},F.defaultTags,t)}clone(){const e=new F(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new F(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:F.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},F.defaultTags)}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:F.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},F.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),n=r.shift();switch(n){case"%TAG":{if(2!==r.length&&(t(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[e,n]=r;return this.tags[e]=n,!0}case"%YAML":{if(this.yaml.explicit=!0,1!==r.length)return t(0,"%YAML directive should contain exactly one part"),!1;const[e]=r;return"1.1"===e||"1.2"===e?(this.yaml.version=e,!0):(t(6,`Unsupported YAML version ${e}`,/^\d+\.\d+$/.test(e)),!1)}default:return t(0,`Unknown directive ${n}`,!0),!1}}tagName(e,t){if("!"===e)return"!";if("!"!==e[0])return t(`Not a valid tag: ${e}`),null;if("<"===e[1]){const r=e.slice(2,-1);return"!"===r||"!!"===r?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(">"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const a=this.tags[r];if(a)try{return a+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+O(e.substring(r.length));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&E(e.contents)){const t={};v(e.contents,(e,r)=>{E(r)&&r.tag&&(t[r.tag]=!0)}),n=Object.keys(t)}else n=[];for(const[a,i]of r)"!!"===a&&"tag:yaml.org,2002:"===i||e&&!n.some(e=>e.startsWith(i))||t.push(`%TAG ${a} ${i}`);return t.join("\n")}}function x(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function M(e){const t=new Set;return v(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function D(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function P(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,r=n.length;t<r;++t){const r=n[t],a=P(e,n,String(t),r);void 0===a?delete n[t]:a!==r&&(n[t]=a)}else if(n instanceof Map)for(const t of Array.from(n.keys())){const r=n.get(t),a=P(e,n,t,r);void 0===a?n.delete(t):a!==r&&n.set(t,a)}else if(n instanceof Set)for(const t of Array.from(n)){const r=P(e,n,t,t);void 0===r?n.delete(t):r!==t&&(n.delete(t),n.add(r))}else for(const[t,r]of Object.entries(n)){const a=P(e,n,t,r);void 0===a?delete n[t]:a!==r&&(n[t]=a)}return e.call(t,r,n)}function U(e,t,r){if(Array.isArray(e))return e.map((e,t)=>U(e,String(t),r));if(e&&"function"==typeof e.toJSON){if(!r||!C(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const a=e.toJSON(t,r);return r.onCreate&&r.onCreate(a),a}return"bigint"!=typeof e||r?.keep?e:Number(e)}F.defaultYaml={explicit:!1,version:"1.2"},F.defaultTags={"!!":"tag:yaml.org,2002:"};class Y{constructor(e){Object.defineProperty(this,u,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:a}={}){if(!p(e))throw new TypeError("A document argument is required");const i={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},s=U(this,"",i);if("function"==typeof n)for(const{count:e,res:t}of i.anchors.values())n(t,e);return"function"==typeof a?P(a,{"":s},"",s):s}}class J extends Y{constructor(e){super(i),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,t){if(0===t?.maxAliasCount)throw new ReferenceError("Alias resolution is disabled");let r,n;t?.aliasResolveCache?r=t.aliasResolveCache:(r=[],v(e,{Node:(e,t)=>{(m(t)||C(t))&&r.push(t)}}),t&&(t.aliasResolveCache=r));for(const e of r){if(e===this)break;e.anchor===this.source&&(n=e)}if(n&&t){const{anchors:e,doc:r,maxAliasCount:a}=t;let i=e.get(n);if(i||(U(n,null,t),i=e.get(n)),void 0===i?.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(a>=0&&(i.count+=1,0===i.aliasCount&&(i.aliasCount=B(r,n,e)),i.count*i.aliasCount>a))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return n}toJSON(e,t){if(!t)return{source:this.source};const r=this.resolve(t.doc,t);if(!r){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}return t.anchors.get(r).res}toString(e,t,r){const n=`*${this.source}`;if(e){if(x(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function B(e,t,r){if(m(t)){const n=t.resolve(e),a=r&&n&&r.get(n);return a?a.count*a.aliasCount:0}if(g(t)){let n=0;for(const a of t.items){const t=B(e,a,r);t>n&&(n=t)}return n}if(f(t)){const n=B(e,t.key,r),a=B(e,t.value,r);return Math.max(n,a)}return 1}const k=e=>!e||"function"!=typeof e&&"object"!=typeof e;class K extends Y{constructor(e){super(c),this.value=e}toJSON(e,t){return t?.keep?this.value:U(this.value,e,t)}toString(){return String(this.value)}}function j(e,t,r){if(p(e)&&(e=e.contents),E(e))return e;if(f(e)){const t=r.schema[o].createNode?.(r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:a,onTagObj:i,schema:s,sourceObjects:l}=r;let c;if(n&&e&&"object"==typeof e){if(c=l.get(e),c)return c.anchor??(c.anchor=a(e)),new J(c.anchor);c={anchor:null,node:null},l.set(e,c)}t?.startsWith("!!")&&(t="tag:yaml.org,2002:"+t.slice(2));let u=function(e,t,r){if(t){const e=r.filter(e=>e.tag===t),n=e.find(e=>!e.format)??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find(t=>t.identify?.(e)&&!t.format)}(e,t,s.tags);if(!u){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new K(e);return c&&(c.node=t),t}u=e instanceof Map?s[o]:Symbol.iterator in Object(e)?s[d]:s[o]}i&&(i(u),delete r.onTagObj);const m=u?.createNode?u.createNode(r.schema,e,r):"function"==typeof u?.nodeClass?.from?u.nodeClass.from(r.schema,e,r):new K(e);return t?m.tag=t:u.default||(m.tag=u.tag),c&&(c.node=m),m}function W(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if("number"==typeof r&&Number.isInteger(r)&&r>=0){const e=[];e[r]=n,n=e}else n=new Map([[r,n]])}return j(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}K.BLOCK_FOLDED="BLOCK_FOLDED",K.BLOCK_LITERAL="BLOCK_LITERAL",K.PLAIN="PLAIN",K.QUOTE_DOUBLE="QUOTE_DOUBLE",K.QUOTE_SINGLE="QUOTE_SINGLE";const $=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class q extends Y{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>E(t)||f(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if($(e))this.add(t);else{const[r,...n]=e,a=this.get(r,!0);if(g(a))a.addIn(n,t);else{if(void 0!==a||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,W(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(g(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,a=this.get(r,!0);return 0===n.length?!t&&y(a)?a.value:a:g(a)?a.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!f(t))return!1;const r=t.value;return null==r||e&&y(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!g(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(g(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,W(this.schema,n,t))}}}}const X=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function G(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const z=(e,t,r)=>e.endsWith("\n")?G(r,t):r.includes("\n")?"\n"+G(r,t):(e.endsWith(" ")?"":" ")+r,H="block",Q="quoted";function Z(e,t,r="flow",{indentAtStart:n,lineWidth:a=80,minContentWidth:i=20,onFold:s,onOverflow:o}={}){if(!a||a<0)return e;a<i&&(i=0);const l=Math.max(1+i,1+a-t.length);if(e.length<=l)return e;const c=[],d={};let u,m,p=a-t.length;"number"==typeof n&&(n>a-Math.max(2,i)?c.push(0):p=a-n);let h=!1,f=-1,y=-1,T=-1;r===H&&(f=ee(e,f,t.length),-1!==f&&(p=f+l));for(let n;n=e[f+=1];){if(r===Q&&"\\"===n){switch(y=f,e[f+1]){case"x":f+=3;break;case"u":f+=5;break;case"U":f+=9;break;default:f+=1}T=f}if("\n"===n)r===H&&(f=ee(e,f,t.length)),p=f+t.length+l,u=void 0;else{if(" "===n&&m&&" "!==m&&"\n"!==m&&"\t"!==m){const t=e[f+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(u=f)}if(f>=p)if(u)c.push(u),p=u+l,u=void 0;else if(r===Q){for(;" "===m||"\t"===m;)m=n,n=e[f+=1],h=!0;const t=f>T+1?f-2:y-1;if(d[t])return e;c.push(t),d[t]=!0,p=t+l,u=void 0}else h=!0}m=n}if(h&&o&&o(),0===c.length)return e;s&&s();let g=e.slice(0,c[0]);for(let n=0;n<c.length;++n){const a=c[n],i=c[n+1]||e.length;0===a?g=`\n${t}${e.slice(0,i)}`:(r===Q&&d[a]&&(g+=`${e[a]}\\`),g+=`\n${t}${e.slice(a+1,i)}`)}return g}function ee(e,t,r){let n=t,a=t+1,i=e[a];for(;" "===i||"\t"===i;)if(t<a+r)i=e[++t];else{do{i=e[++t]}while(i&&"\n"!==i);n=t,a=t+1,i=e[a]}return n}const te=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),re=e=>/^(%|---|\.\.\.)/m.test(e);function ne(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,a=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(re(e)?" ":"");let s="",o=0;for(let e=0,t=r[e];t;t=r[++e])if(" "===t&&"\\"===r[e+1]&&"n"===r[e+2]&&(s+=r.slice(o,e)+"\\ ",e+=1,o=e,t="\\"),"\\"===t)switch(r[e+1]){case"u":{s+=r.slice(o,e);const t=r.substr(e+2,4);switch(t){case"0000":s+="\\0";break;case"0007":s+="\\a";break;case"000b":s+="\\v";break;case"001b":s+="\\e";break;case"0085":s+="\\N";break;case"00a0":s+="\\_";break;case"2028":s+="\\L";break;case"2029":s+="\\P";break;default:"00"===t.substr(0,2)?s+="\\x"+t.substr(2):s+=r.substr(e,6)}e+=5,o=e+1}break;case"n":if(n||'"'===r[e+2]||r.length<a)e+=1;else{for(s+=r.slice(o,e)+"\n\n";"\\"===r[e+2]&&"n"===r[e+3]&&'"'!==r[e+4];)s+="\n",e+=2;s+=i," "===r[e+2]&&(s+="\\"),e+=1,o=e+1}break;default:e+=1}return s=o?s+r.slice(o):r,n?s:Z(s,i,"quoted",te(t,!1))}function ae(e,t){if(!1===t.options.singleQuote||t.implicitKey&&e.includes("\n")||/[ \t]\n|\n[ \t]/.test(e))return ne(e,t);const r=t.indent||(re(e)?" ":""),n="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&\n${r}`)+"'";return t.implicitKey?n:Z(n,r,"flow",te(t,!1))}function ie(e,t){const{singleQuote:r}=t.options;let n;if(!1===r)n=ne;else{const t=e.includes('"'),a=e.includes("'");n=t&&!a?ae:a&&!t?ne:r?ae:ne}return n(e,t)}let se;try{se=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{se=/\n+(?!\n|$)/g}function oe({comment:e,type:t,value:r},n,a,i){const{blockQuote:s,commentString:o,lineWidth:l}=n.options;if(!s||/\n[\t ]+$/.test(r))return ie(r,n);const c=n.indent||(n.forceBlockIndent||re(r)?" ":""),d="literal"===s||"folded"!==s&&t!==K.BLOCK_FOLDED&&(t===K.BLOCK_LITERAL||!function(e,t,r){if(!t||t<0)return!1;const n=t-r,a=e.length;if(a<=n)return!1;for(let t=0,r=0;t<a;++t)if("\n"===e[t]){if(t-r>n)return!0;if(r=t+1,a-r<=n)return!1}return!0}(r,l,c.length));if(!r)return d?"|\n":">\n";let u,m;for(m=r.length;m>0;--m){const e=r[m-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let p=r.substring(m);const h=p.indexOf("\n");-1===h?u="-":r===p||h!==p.length-1?(u="+",i&&i()):u="",p&&(r=r.slice(0,-p.length),"\n"===p[p.length-1]&&(p=p.slice(0,-1)),p=p.replace(se,`$&${c}`));let f,y=!1,T=-1;for(f=0;f<r.length;++f){const e=r[f];if(" "===e)y=!0;else{if("\n"!==e)break;T=f}}let g=r.substring(0,T<f?T+1:f);g&&(r=r.substring(g.length),g=g.replace(/\n+/g,`$&${c}`));let E=(y?c?"2":"1":"")+u;if(e&&(E+=" "+o(e.replace(/ ?[\r\n]+/g," ")),a&&a()),!d){const e=r.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${c}`);let a=!1;const i=te(n,!0);"folded"!==s&&t!==K.BLOCK_FOLDED&&(i.onOverflow=()=>{a=!0});const o=Z(`${g}${e}${p}`,c,"block",i);if(!a)return`>${E}\n${c}${o}`}return`|${E}\n${c}${g}${r=r.replace(/\n+/g,`$&${c}`)}${p}`}function le(e,t,r,n){const{implicitKey:a,inFlow:i}=t,s="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==K.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(s.value)&&(o=K.QUOTE_DOUBLE);const l=e=>{switch(e){case K.BLOCK_FOLDED:case K.BLOCK_LITERAL:return a||i?ie(s.value,t):oe(s,t,r,n);case K.QUOTE_DOUBLE:return ne(s.value,t);case K.QUOTE_SINGLE:return ae(s.value,t);case K.PLAIN:return function(e,t,r,n){const{type:a,value:i}=e,{actualString:s,implicitKey:o,indent:l,indentStep:c,inFlow:d}=t;if(o&&i.includes("\n")||d&&/[[\]{},]/.test(i))return ie(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||d||!i.includes("\n")?ie(i,t):oe(e,t,r,n);if(!o&&!d&&a!==K.PLAIN&&i.includes("\n"))return oe(e,t,r,n);if(re(i)){if(""===l)return t.forceBlockIndent=!0,oe(e,t,r,n);if(o&&l===c)return ie(i,t)}const u=i.replace(/\n+/g,`$&\n${l}`);if(s){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(u),{compat:r,tags:n}=t.doc.schema;if(n.some(e)||r?.some(e))return ie(i,t)}return o?u:Z(u,l,"flow",te(t,!1))}(s,t,r,n);default:return null}};let c=l(o);if(null===c){const{defaultKeyType:e,defaultStringType:r}=t.options,n=a&&e||r;if(c=l(n),null===c)throw new Error(`Unsupported default string type ${n}`)}return c}function ce(e,t){const r=Object.assign({blockQuote:!0,commentString:X,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function de(e,t,r,n){if(f(e))return e.toString(t,r,n);if(m(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let a;const i=E(e)?e:t.doc.createNode(e,{onTagObj:e=>a=e});a??(a=function(e,t){if(t.tag){const r=e.filter(e=>e.tag===t.tag);if(r.length>0)return r.find(e=>e.format===t.format)??r[0]}let r,n;if(y(t)){n=t.value;let a=e.filter(e=>e.identify?.(n));if(a.length>1){const e=a.filter(e=>e.test);e.length>0&&(a=e)}r=a.find(e=>e.format===t.format)??a.find(e=>!e.format)}else n=t,r=e.find(e=>e.nodeClass&&n instanceof e.nodeClass);if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??(null===n?"null":typeof n)} value`);return r}(t.doc.schema.tags,i));const s=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const a=[],i=(y(e)||g(e))&&e.anchor;i&&x(i)&&(r.add(i),a.push(`&${i}`));const s=e.tag??(t.default?null:t.tag);return s&&a.push(n.directives.tagString(s)),a.join(" ")}(i,a,t);s.length>0&&(t.indentAtStart=(t.indentAtStart??0)+s.length+1);const o="function"==typeof a.stringify?a.stringify(i,t,r,n):y(i)?le(i,t,r,n):i.toString(t,r,n);return s?y(i)||"{"===o[0]||"["===o[0]?`${s} ${o}`:`${s}\n${t.indent}${o}`:o}function ue(e,t){"debug"!==e&&"warn"!==e||console.warn(t)}const me="<<",pe={identify:e=>e===me||"symbol"==typeof e&&e.description===me,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new K(Symbol(me)),{addToJSMap:he}),stringify:()=>me};function he(e,t,r){const n=ye(e,r);if(T(n))for(const r of n.items)fe(e,t,r);else if(Array.isArray(n))for(const r of n)fe(e,t,r);else fe(e,t,n)}function fe(e,t,r){const n=ye(e,r);if(!h(n))throw new Error("Merge sources must be maps or map aliases");const a=n.toJSON(null,e,Map);for(const[e,r]of a)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0});return t}function ye(e,t){return e&&m(t)?t.resolve(e.doc,e):t}function Te(e,t,{key:r,value:n}){if(E(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(((e,t)=>(pe.identify(t)||y(t)&&(!t.type||t.type===K.PLAIN)&&pe.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===pe.tag&&e.default))(e,r))he(e,t,n);else{const a=U(r,"",e);if(t instanceof Map)t.set(a,U(n,a,e));else if(t instanceof Set)t.add(a);else{const i=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(E(e)&&r?.doc){const t=ce(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),ue(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,a,e),s=U(n,i,e);i in t?Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0}):t[i]=s}}return t}function ge(e,t,r){const n=j(e,void 0,r),a=j(t,void 0,r);return new Ee(n,a)}class Ee{constructor(e,t=null){Object.defineProperty(this,u,{value:l}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return E(t)&&(t=t.clone(e)),E(r)&&(r=r.clone(e)),new Ee(t,r)}toJSON(e,t){return Te(t,t?.mapAsMap?new Map:{},this)}toString(e,t,r){return e?.doc?function({key:e,value:t},r,n,a){const{allNullValues:i,doc:s,indent:o,indentStep:l,options:{commentString:c,indentSeq:d,simpleKeys:u}}=r;let m=E(e)&&e.comment||null;if(u){if(m)throw new Error("With simple keys, key nodes cannot have comments");if(g(e)||!E(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let p=!u&&(!e||m&&null==t&&!r.inFlow||g(e)||(y(e)?e.type===K.BLOCK_FOLDED||e.type===K.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!p&&(u||!i),indent:o+l});let h,f,C,I=!1,A=!1,b=de(e,r,()=>I=!0,()=>A=!0);if(!p&&!r.inFlow&&b.length>1024){if(u)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");p=!0}if(r.inFlow){if(i||null==t)return I&&n&&n(),""===b?"?":p?`? ${b}`:b}else if(i&&!u||null==t&&p)return b=`? ${b}`,m&&!I?b+=z(b,r.indent,c(m)):A&&a&&a(),b;I&&(m=null),p?(m&&(b+=z(b,r.indent,c(m))),b=`? ${b}\n${o}:`):(b=`${b}:`,m&&(b+=z(b,r.indent,c(m)))),E(t)?(h=!!t.spaceBefore,f=t.commentBefore,C=t.comment):(h=!1,f=null,C=null,t&&"object"==typeof t&&(t=s.createNode(t))),r.implicitKey=!1,p||m||!y(t)||(r.indentAtStart=b.length+1),A=!1,d||!(l.length>=2)||r.inFlow||p||!T(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let v=!1;const S=de(t,r,()=>v=!0,()=>A=!0);let R=" ";if(m||h||f)R=h?"\n":"",f&&(R+=`\n${G(c(f),r.indent)}`),""!==S||r.inFlow?R+=`\n${r.indent}`:"\n"===R&&C&&(R="\n\n");else if(!p&&g(t)){const e=S[0],n=S.indexOf("\n"),a=-1!==n,i=r.inFlow??t.flow??0===t.items.length;if(a||!i){let t=!1;if(a&&("&"===e||"!"===e)){let r=S.indexOf(" ");"&"===e&&-1!==r&&r<n&&"!"===S[r+1]&&(r=S.indexOf(" ",r+1)),(-1===r||n<r)&&(t=!0)}t||(R=`\n${r.indent}`)}}else""!==S&&"\n"!==S[0]||(R="");return b+=R+S,r.inFlow?v&&n&&n():C&&!v?b+=z(b,r.indent,c(C)):A&&a&&a(),b}(this,e,t,r):JSON.stringify(this)}}function Ce(e,t,r){return(t.inFlow??e.flow?Ae:Ie)(e,t,r)}function Ie({comment:e,items:t},r,{blockItemPrefix:n,flowChars:a,itemIndent:i,onChompKeep:s,onComment:o}){const{indent:l,options:{commentString:c}}=r,d=Object.assign({},r,{indent:i,type:null});let u=!1;const m=[];for(let e=0;e<t.length;++e){const a=t[e];let s=null;if(E(a))!u&&a.spaceBefore&&m.push(""),be(r,m,a.commentBefore,u),a.comment&&(s=a.comment);else if(f(a)){const e=E(a.key)?a.key:null;e&&(!u&&e.spaceBefore&&m.push(""),be(r,m,e.commentBefore,u))}u=!1;let o=de(a,d,()=>s=null,()=>u=!0);s&&(o+=z(o,i,c(s))),u&&s&&(u=!1),m.push(n+o)}let p;if(0===m.length)p=a.start+a.end;else{p=m[0];for(let e=1;e<m.length;++e){const t=m[e];p+=t?`\n${l}${t}`:"\n"}}return e?(p+="\n"+G(c(e),l),o&&o()):u&&s&&s(),p}function Ae({items:e},t,{flowChars:r,itemIndent:n}){const{indent:a,indentStep:i,flowCollectionPadding:s,options:{commentString:o}}=t;n+=i;const l=Object.assign({},t,{indent:n,inFlow:!0,type:null});let c=!1,d=0;const u=[];for(let r=0;r<e.length;++r){const a=e[r];let i=null;if(E(a))a.spaceBefore&&u.push(""),be(t,u,a.commentBefore,!1),a.comment&&(i=a.comment);else if(f(a)){const e=E(a.key)?a.key:null;e&&(e.spaceBefore&&u.push(""),be(t,u,e.commentBefore,!1),e.comment&&(c=!0));const r=E(a.value)?a.value:null;r?(r.comment&&(i=r.comment),r.commentBefore&&(c=!0)):null==a.value&&e?.comment&&(i=e.comment)}i&&(c=!0);let s=de(a,l,()=>i=null);c||(c=u.length>d||s.includes("\n")),r<e.length-1?s+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(c||(c=u.reduce((e,t)=>e+t.length+2,2)+(s.length+2)>t.options.lineWidth)),c&&(s+=",")),i&&(s+=z(s,n,o(i))),u.push(s),d=u.length}const{start:m,end:p}=r;if(0===u.length)return m+p;if(!c){const e=u.reduce((e,t)=>e+t.length+2,2);c=t.options.lineWidth>0&&e>t.options.lineWidth}if(c){let e=m;for(const t of u)e+=t?`\n${i}${a}${t}`:"\n";return`${e}\n${a}${p}`}return`${m}${s}${u.join(" ")}${s}${p}`}function be({indent:e,options:{commentString:t}},r,n,a){if(n&&a&&(n=n.replace(/^\n+/,"")),n){const a=G(t(n),e);r.push(a.trimStart())}}function ve(e,t){const r=y(t)?t.value:t;for(const n of e)if(f(n)){if(n.key===t||n.key===r)return n;if(y(n.key)&&n.key.value===r)return n}}class Se extends q{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(o,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:a}=r,i=new this(e),s=(e,s)=>{if("function"==typeof a)s=a.call(t,e,s);else if(Array.isArray(a)&&!a.includes(e))return;(void 0!==s||n)&&i.items.push(ge(e,s,r))};if(t instanceof Map)for(const[e,r]of t)s(e,r);else if(t&&"object"==typeof t)for(const e of Object.keys(t))s(e,t[e]);return"function"==typeof e.sortMapEntries&&i.items.sort(e.sortMapEntries),i}add(e,t){let r;r=f(e)?e:e&&"object"==typeof e&&"key"in e?new Ee(e.key,e.value):new Ee(e,e?.value);const n=ve(this.items,r.key),a=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);y(n.value)&&k(r.value)?n.value.value=r.value:n.value=r.value}else if(a){const e=this.items.findIndex(e=>a(r,e)<0);-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=ve(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=ve(this.items,e),n=r?.value;return(!t&&y(n)?n.value:n)??void 0}has(e){return!!ve(this.items,e)}set(e,t){this.add(new Ee(e,t),!0)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)Te(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items)if(!f(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Ce(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const Re={collection:"map",default:!0,nodeClass:Se,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(h(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>Se.from(e,t,r)};class we extends q{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(d,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Ne(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const r=Ne(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&y(n)?n.value:n}has(e){const t=Ne(e);return"number"==typeof t&&t<this.items.length}set(e,t){const r=Ne(e);if("number"!=typeof r)throw new Error(`Expected a valid index, not ${e}.`);const n=this.items[r];y(n)&&k(t)?n.value=t:this.items[r]=t}toJSON(e,t){const r=[];t?.onCreate&&t.onCreate(r);let n=0;for(const e of this.items)r.push(U(e,String(n++),t));return r}toString(e,t,r){return e?Ce(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:t}):JSON.stringify(this)}static from(e,t,r){const{replacer:n}=r,a=new this(e);if(t&&Symbol.iterator in Object(t)){let e=0;for(let i of t){if("function"==typeof n){const r=t instanceof Set?i:String(e++);i=n.call(t,r,i)}a.items.push(j(i,void 0,r))}}return a}}function Ne(e){let t=y(e)?e.value:e;return t&&"string"==typeof t&&(t=Number(t)),"number"==typeof t&&Number.isInteger(t)&&t>=0?t:null}const _e={collection:"seq",default:!0,nodeClass:we,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(T(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>we.from(e,t,r)},Le={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>le(e,t=Object.assign({actualString:!0},t),r,n)},Ve={identify:e=>null==e,createNode:()=>new K(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new K(null),stringify:({source:e},t)=>"string"==typeof e&&Ve.test.test(e)?e:t.options.nullStr},Oe={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new K("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},r)=>e&&Oe.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?r.options.trueStr:r.options.falseStr};function Fe({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const a="number"==typeof n?n:Number(n);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let i=Object.is(n,-0)?"-0":JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^-?\d/.test(i)&&!i.includes("e")){let e=i.indexOf(".");e<0&&(e=i.length,i+=".");let r=t-(i.length-e-1);for(;r-- >0;)i+="0"}return i}const xe={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fe},Me={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Fe(e)}},De={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new K(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:Fe},Pe=e=>"bigint"==typeof e||Number.isInteger(e),Ue=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function Ye(e,t,r){const{value:n}=e;return Pe(n)&&n>=0?r+n.toString(t):Fe(e)}const Je={identify:e=>Pe(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>Ue(e,2,8,r),stringify:e=>Ye(e,8,"0o")},Be={identify:Pe,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>Ue(e,0,10,r),stringify:Fe},ke={identify:e=>Pe(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>Ue(e,2,16,r),stringify:e=>Ye(e,16,"0x")},Ke=[Re,_e,Le,Ve,Oe,Je,Be,ke,xe,Me,De];function je(e){return"bigint"==typeof e||Number.isInteger(e)}const We=({value:e})=>JSON.stringify(e),$e=[Re,_e].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:We},{identify:e=>null==e,createNode:()=>new K(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:We},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:We},{identify:je,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>je(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:We}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),qe={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e<t.length;++e)r[e]=t.charCodeAt(e);return r}return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:r},n,a,i){if(!r)return"";const s=r;let o;if("function"!=typeof btoa)throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");{let e="";for(let t=0;t<s.length;++t)e+=String.fromCharCode(s[t]);o=btoa(e)}if(t??(t=K.BLOCK_LITERAL),t!==K.QUOTE_DOUBLE){const e=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),r=Math.ceil(o.length/e),a=new Array(r);for(let t=0,n=0;t<r;++t,n+=e)a[t]=o.substr(n,e);o=a.join(t===K.BLOCK_LITERAL?"\n":" ")}return le({comment:e,type:t,value:o},n,a,i)}};function Xe(e,t){if(T(e))for(let r=0;r<e.items.length;++r){let n=e.items[r];if(!f(n)){if(h(n)){n.items.length>1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new Ee(new K(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=f(n)?n:new Ee(n)}}else t("Expected a sequence for this tag");return e}function Ge(e,t,r){const{replacer:n}=r,a=new we(e);a.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let s,o;if("function"==typeof n&&(e=n.call(t,String(i++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);s=e[0],o=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);s=t[0],o=e[s]}else s=e;a.items.push(ge(s,o,r))}return a}const ze={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Xe,createNode:Ge};class He extends we{constructor(){super(),this.add=Se.prototype.add.bind(this),this.delete=Se.prototype.delete.bind(this),this.get=Se.prototype.get.bind(this),this.has=Se.prototype.has.bind(this),this.set=Se.prototype.set.bind(this),this.tag=He.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const e of this.items){let n,a;if(f(e)?(n=U(e.key,"",t),a=U(e.value,n,t)):n=U(e,"",t),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,a)}return r}static from(e,t,r){const n=Ge(e,t,r),a=new this;return a.items=n.items,a}}He.tag="tag:yaml.org,2002:omap";const Qe={collection:"seq",identify:e=>e instanceof Map,nodeClass:He,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=Xe(e,t),n=[];for(const{key:e}of r.items)y(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new He,r)},createNode:(e,t,r)=>He.from(e,t,r)};function Ze({value:e,source:t},r){return t&&(e?et:tt).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const et={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new K(!0),stringify:Ze},tt={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new K(!1),stringify:Ze},rt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Fe},nt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Fe(e)}},at={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new K(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:Fe},it=e=>"bigint"==typeof e||Number.isInteger(e);function st(e,t,r,{intAsBigInt:n}){const a=e[0];if("-"!==a&&"+"!==a||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===a?BigInt(-1)*t:t}const i=parseInt(e,r);return"-"===a?-1*i:i}function ot(e,t,r){const{value:n}=e;if(it(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return Fe(e)}const lt={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>st(e,2,2,r),stringify:e=>ot(e,2,"0b")},ct={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>st(e,1,8,r),stringify:e=>ot(e,8,"0")},dt={identify:it,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>st(e,0,10,r),stringify:Fe},ut={identify:it,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>st(e,2,16,r),stringify:e=>ot(e,16,"0x")};class mt extends Se{constructor(e){super(e),this.tag=mt.tag}add(e){let t;t=f(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new Ee(e.key,null):new Ee(e,null),ve(this.items,t.key)||this.items.push(t)}get(e,t){const r=ve(this.items,e);return!t&&f(r)?y(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=ve(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new Ee(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,a=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),a.items.push(ge(e,null,r));return a}}mt.tag="tag:yaml.org,2002:set";const pt={collection:"map",identify:e=>e instanceof Set,nodeClass:mt,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>mt.from(e,t,r),resolve(e,t){if(h(e)){if(e.hasAllNullValues(!0))return Object.assign(new mt,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ht(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,a=e=>t?BigInt(e):Number(e),i=n.replace(/_/g,"").split(":").reduce((e,t)=>e*a(60)+a(t),a(0));return"-"===r?a(-1)*i:i}function ft(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return Fe(e);let n="";t<0&&(n="-",t*=r(-1));const a=r(60),i=[t%a];return t<60?i.unshift(0):(t=(t-i[0])/a,i.unshift(t%a),t>=60&&(t=(t-i[0])/a,i.unshift(t))),n+i.map(e=>String(e).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const yt={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>ht(e,r),stringify:ft},Tt={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ht(e,!1),stringify:ft},gt={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(gt.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,a,i,s,o]=t.map(Number),l=t[7]?Number((t[7]+"00").substr(1,3)):0;let c=Date.UTC(r,n-1,a,i||0,s||0,o||0,l);const d=t[8];if(d&&"Z"!==d){let e=ht(d,!1);Math.abs(e)<30&&(e*=60),c-=6e4*e}return new Date(c)},stringify:({value:e})=>e?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},Et=[Re,_e,Le,Ve,et,tt,lt,ct,dt,ut,rt,nt,at,qe,pe,Qe,ze,pt,yt,Tt,gt],Ct=new Map([["core",Ke],["failsafe",[Re,_e,Le]],["json",$e],["yaml11",Et],["yaml-1.1",Et]]),It={binary:qe,bool:Oe,float:De,floatExp:Me,floatNaN:xe,floatTime:Tt,int:Be,intHex:ke,intOct:Je,intTime:yt,map:Re,merge:pe,null:Ve,omap:Qe,pairs:ze,seq:_e,set:pt,timestamp:gt},At={"tag:yaml.org,2002:binary":qe,"tag:yaml.org,2002:merge":pe,"tag:yaml.org,2002:omap":Qe,"tag:yaml.org,2002:pairs":ze,"tag:yaml.org,2002:set":pt,"tag:yaml.org,2002:timestamp":gt};function bt(e,t,r){const n=Ct.get(t);if(n&&!e)return r&&!n.includes(pe)?n.concat(pe):n.slice();let a=n;if(!a){if(!Array.isArray(e)){const e=Array.from(Ct.keys()).filter(e=>"yaml11"!==e).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}a=[]}if(Array.isArray(e))for(const t of e)a=a.concat(t);else"function"==typeof e&&(a=e(a.slice()));return r&&(a=a.concat(pe)),a.reduce((e,t)=>{const r="string"==typeof t?It[t]:t;if(!r){const e=JSON.stringify(t),r=Object.keys(It).map(e=>JSON.stringify(e)).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e},[])}const vt=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;class St{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:a,sortMapEntries:i,toStringDefaults:s}){this.compat=Array.isArray(e)?bt(e,"compat"):e?bt(null,e):null,this.name="string"==typeof a&&a||"core",this.knownTags=n?At:{},this.tags=bt(t,this.name,r),this.toStringOptions=s??null,Object.defineProperty(this,o,{value:Re}),Object.defineProperty(this,c,{value:Le}),Object.defineProperty(this,d,{value:_e}),this.sortMapEntries="function"==typeof i?i:!0===i?vt:null}clone(){const e=Object.create(St.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class Rt{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,u,{value:s});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const a=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=a;let{version:i}=a;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(i=this.directives.yaml.version)):this.directives=new F({version:i}),this.setSchema(i,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(Rt.prototype,{[u]:{value:s}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=E(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){wt(this.contents)&&this.contents.add(e)}addIn(e,t){wt(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=M(this);e.anchor=!t||r.has(t)?D(t||"a",r):t}return new J(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:a,anchorPrefix:i,flow:s,keepUndefined:o,onTagObj:l,tag:c}=r??{},{onAnchor:d,setAnchors:u,sourceObjects:m}=function(e,t){const r=[],n=new Map;let a=null;return{onAnchor:n=>{r.push(n),a??(a=M(e));const i=D(t,a);return a.add(i),i},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!y(t.node)&&!g(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,i||"a"),p=j(e,c,{aliasDuplicateObjects:a??!0,keepUndefined:o??!1,onAnchor:d,onTagObj:l,replacer:n,schema:this.schema,sourceObjects:m});return s&&g(p)&&(p.flow=!0),u(),p}createPair(e,t,r={}){const n=this.createNode(e,null,r),a=this.createNode(t,null,r);return new Ee(n,a)}delete(e){return!!wt(this.contents)&&this.contents.delete(e)}deleteIn(e){return $(e)?null!=this.contents&&(this.contents=null,!0):!!wt(this.contents)&&this.contents.deleteIn(e)}get(e,t){return g(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return $(e)?!t&&y(this.contents)?this.contents.value:this.contents:g(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!g(this.contents)&&this.contents.has(e)}hasIn(e){return $(e)?void 0!==this.contents:!!g(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=W(this.schema,[e],t):wt(this.contents)&&this.contents.set(e,t)}setIn(e,t){$(e)?this.contents=t:null==this.contents?this.contents=W(this.schema,Array.from(e),t):wt(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new F({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new F({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new St(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:a,reviver:i}={}){const s={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=U(this.contents,t??"",s);if("function"==typeof a)for(const{count:e,res:t}of s.anchors.values())a(t,e);return"function"==typeof i?P(i,{"":o},"",o):o}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const r=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(r.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");const a=ce(e,t),{commentString:i}=a.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=i(e.commentBefore);r.unshift(G(t,""))}let s=!1,o=null;if(e.contents){if(E(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){const t=i(e.contents.commentBefore);r.push(G(t,""))}a.forceBlockIndent=!!e.comment,o=e.contents.comment}const t=o?void 0:()=>s=!0;let l=de(e.contents,a,()=>o=null,t);o&&(l+=z(l,"",i(o))),"|"!==l[0]&&">"!==l[0]||"---"!==r[r.length-1]?r.push(l):r[r.length-1]=`--- ${l}`}else r.push(de(e.contents,a));if(e.directives?.docEnd)if(e.comment){const t=i(e.comment);t.includes("\n")?(r.push("..."),r.push(G(t,""))):r.push(`... ${t}`)}else r.push("...");else{let t=e.comment;t&&s&&(t=t.replace(/^\n+/,"")),t&&(s&&!o||""===r[r.length-1]||r.push(""),r.push(G(i(t),"")))}return r.join("\n")+"\n"}(this,e)}}function wt(e){if(g(e))return!0;throw new Error("Expected a YAML collection as document contents")}class Nt extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class _t extends Nt{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class Lt extends Nt{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const Vt=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map(e=>t.linePos(e));const{line:n,col:a}=r.linePos[0];r.message+=` at line ${n}, column ${a}`;let i=a-1,s=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(i>=60&&s.length>80){const e=Math.min(i-39,s.length-79);s="…"+s.substring(e),i-=e-1}if(s.length>80&&(s=s.substring(0,79)+"…"),n>1&&/^ *$/.test(s.substring(0,i))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),s=r+s}if(/[^ ]/.test(s)){let e=1;const t=r.linePos[1];t?.line===n&&t.col>a&&(e=Math.max(1,Math.min(t.col-a,80-i)));const o=" ".repeat(i)+"^".repeat(e);r.message+=`:\n\n${s}\n${o}\n`}};function Ot(e,{flow:t,indicator:r,next:n,offset:a,onError:i,parentIndent:s,startOnNewline:o}){let l=!1,c=o,d=o,u="",m="",p=!1,h=!1,f=null,y=null,T=null,g=null,E=null,C=null,I=null;for(const a of e)switch(h&&("space"!==a.type&&"newline"!==a.type&&"comma"!==a.type&&i(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),h=!1),f&&(c&&"comment"!==a.type&&"newline"!==a.type&&i(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),f=null),a.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!a.source.includes("\t")||(f=a),d=!0;break;case"comment":{d||i(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=a.source.substring(1)||" ";u?u+=m+e:u=e,m="",c=!1;break}case"newline":c?u?u+=a.source:C&&"seq-item-ind"===r||(l=!0):m+=a.source,c=!0,p=!0,(y||T)&&(g=a),d=!0;break;case"anchor":y&&i(a,"MULTIPLE_ANCHORS","A node can have at most one anchor"),a.source.endsWith(":")&&i(a.offset+a.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),y=a,I??(I=a.offset),c=!1,d=!1,h=!0;break;case"tag":T&&i(a,"MULTIPLE_TAGS","A node can have at most one tag"),T=a,I??(I=a.offset),c=!1,d=!1,h=!0;break;case r:(y||T)&&i(a,"BAD_PROP_ORDER",`Anchors and tags must be after the ${a.source} indicator`),C&&i(a,"UNEXPECTED_TOKEN",`Unexpected ${a.source} in ${t??"collection"}`),C=a,c="seq-item-ind"===r||"explicit-key-ind"===r,d=!1;break;case"comma":if(t){E&&i(a,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),E=a,c=!1,d=!1;break}default:i(a,"UNEXPECTED_TOKEN",`Unexpected ${a.type} token`),c=!1,d=!1}const A=e[e.length-1],b=A?A.offset+A.source.length:a;return h&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&i(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),f&&(c&&f.indent<=s||"block-map"===n?.type||"block-seq"===n?.type)&&i(f,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:E,found:C,spaceBefore:l,comment:u,hasNewline:p,anchor:y,tag:T,newlineAfterProp:g,end:b,start:I??b}}function Ft(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(Ft(t.key)||Ft(t.value))return!0}return!1;default:return!0}}function xt(e,t,r){if("flow-collection"===t?.type){const n=t.end[0];n.indent!==e||"]"!==n.source&&"}"!==n.source||!Ft(t)||r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Mt(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const a="function"==typeof n?n:(e,t)=>e===t||y(e)&&y(t)&&e.value===t.value;return t.some(e=>a(e.key,r))}const Dt="All mapping items must start at the same column";function Pt(e,t,r,n){let a="";if(e){let i=!1,s="";for(const o of e){const{source:e,type:l}=o;switch(l){case"space":i=!0;break;case"comment":{r&&!i&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";a?a+=s+t:a=t,s="";break}case"newline":a&&(s+=e),i=!0;break;default:n(o,"UNEXPECTED_TOKEN",`Unexpected ${l} at node end`)}t+=e.length}}return{comment:a,offset:t}}const Ut="Block collections are not allowed within flow collections",Yt=e=>e&&("block-map"===e.type||"block-seq"===e.type);function Jt(e,t,r,n,a,i){const s="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s=new(i?.nodeClass??Se)(r.schema);r.atRoot&&(r.atRoot=!1);let o=n.offset,l=null;for(const i of n.items){const{start:c,key:d,sep:u,value:m}=i,p=Ot(c,{indicator:"explicit-key-ind",next:d??u?.[0],offset:o,onError:a,parentIndent:n.indent,startOnNewline:!0}),h=!p.found;if(h){if(d&&("block-seq"===d.type?a(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in d&&d.indent!==n.indent&&a(o,"BAD_INDENT",Dt)),!p.anchor&&!p.tag&&!u){l=p.end,p.comment&&(s.comment?s.comment+="\n"+p.comment:s.comment=p.comment);continue}(p.newlineAfterProp||Ft(d))&&a(d??c[c.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else p.found?.indent!==n.indent&&a(o,"BAD_INDENT",Dt);r.atKey=!0;const f=p.end,y=d?e(r,d,p,a):t(r,f,c,null,p,a);r.schema.compat&&xt(n.indent,d,a),r.atKey=!1,Mt(r,s.items,y)&&a(f,"DUPLICATE_KEY","Map keys must be unique");const T=Ot(u??[],{indicator:"map-value-ind",next:m,offset:y.range[2],onError:a,parentIndent:n.indent,startOnNewline:!d||"block-scalar"===d.type});if(o=T.end,T.found){h&&("block-map"!==m?.type||T.hasNewline||a(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&p.start<T.found.offset-1024&&a(y.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const l=m?e(r,m,T,a):t(r,o,u,null,T,a);r.schema.compat&&xt(n.indent,m,a),o=l.range[2];const c=new Ee(y,l);r.options.keepSourceTokens&&(c.srcToken=i),s.items.push(c)}else{h&&a(y.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(y.comment?y.comment+="\n"+T.comment:y.comment=T.comment);const e=new Ee(y);r.options.keepSourceTokens&&(e.srcToken=i),s.items.push(e)}}return l&&l<o&&a(l,"IMPOSSIBLE","Map comment with trailing content"),s.range=[n.offset,o,l??o],s}(e,t,r,n,i):"block-seq"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s=new(i?.nodeClass??we)(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let o=n.offset,l=null;for(const{start:i,value:c}of n.items){const d=Ot(i,{indicator:"seq-item-ind",next:c,offset:o,onError:a,parentIndent:n.indent,startOnNewline:!0});if(!d.found){if(!(d.anchor||d.tag||c)){l=d.end,d.comment&&(s.comment=d.comment);continue}"block-seq"===c?.type?a(d.end,"BAD_INDENT","All sequence items must start at the same column"):a(o,"MISSING_CHAR","Sequence item without - indicator")}const u=c?e(r,c,d,a):t(r,d.end,i,null,d,a);r.schema.compat&&xt(n.indent,c,a),o=u.range[2],s.items.push(u)}return s.range=[n.offset,o,l??o],s}(e,t,r,n,i):function({composeNode:e,composeEmptyNode:t},r,n,a,i){const s="{"===n.start.source,o=s?"flow map":"flow sequence",l=new(i?.nodeClass??(s?Se:we))(r.schema);l.flow=!0;const c=r.atRoot;c&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let d=n.offset+n.start.source.length;for(let i=0;i<n.items.length;++i){const c=n.items[i],{start:u,key:m,sep:p,value:h}=c,y=Ot(u,{flow:o,indicator:"explicit-key-ind",next:m??p?.[0],offset:d,onError:a,parentIndent:n.indent,startOnNewline:!1});if(!y.found){if(!(y.anchor||y.tag||p||h)){0===i&&y.comma?a(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`):i<n.items.length-1&&a(y.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${o}`),y.comment&&(l.comment?l.comment+="\n"+y.comment:l.comment=y.comment),d=y.end;continue}!s&&r.options.strict&&Ft(m)&&a(m,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(0===i)y.comma&&a(y.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${o}`);else if(y.comma||a(y.start,"MISSING_CHAR",`Missing , between ${o} items`),y.comment){let e="";e:for(const t of u)switch(t.type){case"comma":case"space":break;case"comment":e=t.source.substring(1);break e;default:break e}if(e){let t=l.items[l.items.length-1];f(t)&&(t=t.value??t.key),t.comment?t.comment+="\n"+e:t.comment=e,y.comment=y.comment.substring(e.length+1)}}if(s||p||y.found){r.atKey=!0;const i=y.end,f=m?e(r,m,y,a):t(r,i,u,null,y,a);Yt(m)&&a(f.range,"BLOCK_IN_FLOW",Ut),r.atKey=!1;const T=Ot(p??[],{flow:o,indicator:"map-value-ind",next:h,offset:f.range[2],onError:a,parentIndent:n.indent,startOnNewline:!1});if(T.found){if(!s&&!y.found&&r.options.strict){if(p)for(const e of p){if(e===T.found)break;if("newline"===e.type){a(e,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}y.start<T.found.offset-1024&&a(T.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else h&&("source"in h&&":"===h.source?.[0]?a(h,"MISSING_CHAR",`Missing space after : in ${o}`):a(T.start,"MISSING_CHAR",`Missing , or : between ${o} items`));const g=h?e(r,h,T,a):T.found?t(r,T.end,p,null,T,a):null;g?Yt(h)&&a(g.range,"BLOCK_IN_FLOW",Ut):T.comment&&(f.comment?f.comment+="\n"+T.comment:f.comment=T.comment);const E=new Ee(f,g);if(r.options.keepSourceTokens&&(E.srcToken=c),s){const e=l;Mt(r,e.items,f)&&a(i,"DUPLICATE_KEY","Map keys must be unique"),e.items.push(E)}else{const e=new Se(r.schema);e.flow=!0,e.items.push(E);const t=(g??f).range;e.range=[f.range[0],t[1],t[2]],l.items.push(e)}d=g?g.range[2]:T.end}else{const n=h?e(r,h,y,a):t(r,y.end,p,null,y,a);l.items.push(n),d=n.range[2],Yt(h)&&a(n.range,"BLOCK_IN_FLOW",Ut)}}const u=s?"}":"]",[m,...p]=n.end;let h=d;if(m?.source===u)h=m.offset+m.source.length;else{const e=o[0].toUpperCase()+o.substring(1);a(d,c?"MISSING_CHAR":"BAD_INDENT",c?`${e} must end with a ${u}`:`${e} in block collection must be sufficiently indented and end with a ${u}`),m&&1!==m.source.length&&p.unshift(m)}if(p.length>0){const e=Pt(p,h,r.options.strict,a);e.comment&&(l.comment?l.comment+="\n"+e.comment:l.comment=e.comment),l.range=[n.offset,h,e.offset]}else l.range=[n.offset,h,h];return l}(e,t,r,n,i),o=s.constructor;return"!"===a||a===o.tagName?(s.tag=o.tagName,s):(a&&(s.tag=a),s)}function Bt(e,t,r){const n=t.offset,a=function({offset:e,props:t},r,n){if("block-scalar-header"!==t[0].type)return n(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=t[0],i=a[0];let s=0,o="",l=-1;for(let t=1;t<a.length;++t){const r=a[t];if(o||"-"!==r&&"+"!==r){const n=Number(r);!s&&n?s=n:-1===l&&(l=e+t)}else o=r}-1!==l&&n(l,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let c=!1,d="",u=a.length;for(let e=1;e<t.length;++e){const a=t[e];switch(a.type){case"space":c=!0;case"newline":u+=a.source.length;break;case"comment":r&&!c&&n(a,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),u+=a.source.length,d=a.source.substring(1);break;case"error":n(a,"UNEXPECTED_TOKEN",a.message),u+=a.source.length;break;default:{n(a,"UNEXPECTED_TOKEN",`Unexpected token in block scalar header: ${a.type}`);const e=a.source;e&&"string"==typeof e&&(u+=e.length)}}}return{mode:i,indent:s,chomp:o,comment:d,length:u}}(t,e.options.strict,r);if(!a)return{value:"",type:null,comment:"",range:[n,n,n]};const i=">"===a.mode?K.BLOCK_FOLDED:K.BLOCK_LITERAL,s=t.source?function(e){const t=e.split(/\n( *)/),r=t[0],n=r.match(/^( *)/),a=[n?.[1]?[n[1],r.slice(n[1].length)]:["",r]];for(let e=1;e<t.length;e+=2)a.push([t[e],t[e+1]]);return a}(t.source):[];let o=s.length;for(let e=s.length-1;e>=0;--e){const t=s[e][1];if(""!==t&&"\r"!==t)break;o=e}if(0===o){const e="+"===a.chomp&&s.length>0?"\n".repeat(Math.max(1,s.length-1)):"";let r=n+a.length;return t.source&&(r+=t.source.length),{value:e,type:i,comment:a.comment,range:[n,r,r]}}let l=t.indent+a.indent,c=t.offset+a.length,d=0;for(let t=0;t<o;++t){const[n,i]=s[t];if(""!==i&&"\r"!==i){if(n.length<l){const e="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";r(c+n.length,"MISSING_CHAR",e)}0===a.indent&&(l=n.length),d=t,0!==l||e.atRoot||r(c,"BAD_INDENT","Block scalar values in collections must be indented");break}0===a.indent&&n.length>l&&(l=n.length),c+=n.length+i.length+1}for(let e=s.length-1;e>=o;--e)s[e][0].length>l&&(o=e+1);let u="",m="",p=!1;for(let e=0;e<d;++e)u+=s[e][0].slice(l)+"\n";for(let e=d;e<o;++e){let[t,n]=s[e];c+=t.length+n.length+1;const o="\r"===n[n.length-1];if(o&&(n=n.slice(0,-1)),n&&t.length<l){const e="Block scalar lines must not be less indented than their "+(a.indent?"explicit indentation indicator":"first line");r(c-n.length-(o?2:1),"BAD_INDENT",e),t=""}i===K.BLOCK_LITERAL?(u+=m+t.slice(l)+n,m="\n"):t.length>l||"\t"===n[0]?(" "===m?m="\n":p||"\n"!==m||(m="\n\n"),u+=m+t.slice(l)+n,m="\n",p=!0):""===n?"\n"===m?u+="\n":m="\n":(u+=m+n,m=" ",p=!1)}switch(a.chomp){case"-":break;case"+":for(let e=o;e<s.length;++e)u+="\n"+s[e][0].slice(l);"\n"!==u[u.length-1]&&(u+="\n");break;default:u+="\n"}const h=n+a.length+t.source.length;return{value:u,type:i,comment:a.comment,range:[n,h,h]}}function kt(e,t,r){const{offset:n,type:a,source:i,end:s}=e;let o,l;const c=(e,t,a)=>r(n+e,t,a);switch(a){case"scalar":o=K.PLAIN,l=function(e,t){let r="";switch(e[0]){case"\t":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":r=`block scalar indicator ${e[0]}`;break;case"@":case"`":r=`reserved character ${e[0]}`}return r&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Kt(e)}(i,c);break;case"single-quoted-scalar":o=K.QUOTE_SINGLE,l=function(e,t){return"'"===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR","Missing closing 'quote"),Kt(e.slice(1,-1)).replace(/''/g,"'")}(i,c);break;case"double-quoted-scalar":o=K.QUOTE_DOUBLE,l=function(e,t){let r="";for(let n=1;n<e.length-1;++n){const a=e[n];if("\r"!==a||"\n"!==e[n+1])if("\n"===a){const{fold:t,offset:a}=jt(e,n);r+=t,n=a}else if("\\"===a){let a=e[++n];const i=Wt[a];if(i)r+=i;else if("\n"===a)for(a=e[n+1];" "===a||"\t"===a;)a=e[1+ ++n];else if("\r"===a&&"\n"===e[n+1])for(a=e[1+ ++n];" "===a||"\t"===a;)a=e[1+ ++n];else if("x"===a||"u"===a||"U"===a){const i="x"===a?2:"u"===a?4:8;r+=$t(e,n+1,i,t),n+=i}else{const a=e.substr(n-1,2);t(n-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),r+=a}}else if(" "===a||"\t"===a){const t=n;let i=e[n+1];for(;" "===i||"\t"===i;)i=e[1+ ++n];"\n"===i||"\r"===i&&"\n"===e[n+2]||(r+=n>t?e.slice(t,n+1):a)}else r+=a}return'"'===e[e.length-1]&&1!==e.length||t(e.length,"MISSING_CHAR",'Missing closing "quote'),r}(i,c);break;default:return r(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[n,n+i.length,n+i.length]}}const d=n+i.length,u=Pt(s,d,t,r);return{value:l,type:o,comment:u.comment,range:[n,d,u.offset]}}function Kt(e){const t=/(.*?)\r?\n/sy;let r,n,a=t.exec(e);if(!a)return e;try{r=new RegExp("(?<![ \t])[ \t]+$"),n=new RegExp("^[ \t]+|(?<![ \t])[ \t]+$","g")}catch{r=/[ \t]+$/,n=/^[ \t]+|[ \t]+$/g}let i=a[1].replace(r,""),s=" ",o=t.lastIndex;for(;a=t.exec(e);){const e=a[1].replace(n,"");""===e?"\n"===s?i+=s:s="\n":(i+=s+e,s=" "),o=t.lastIndex}const l=/[ \t]*(.*)/sy;return l.lastIndex=o,a=l.exec(e),i+s+(a?.[1]??"")}function jt(e,t){let r="",n=e[t+1];for(;!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||"\r"===n&&"\n"!==e[t+2]);)"\n"===n&&(r+="\n"),n=e[(t+=1)+1];return r||(r=" "),{fold:r,offset:t}}const Wt={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function $t(e,t,r,n){const a=e.substr(t,r),i=a.length===r&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;try{return String.fromCodePoint(i)}catch{const a=e.substr(t-2,r+2);return n(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${a}`),a}}function qt(e,t,r,n){const{value:a,type:i,comment:s,range:o}="block-scalar"===t.type?Bt(e,t,n):kt(t,e.options.strict,n),l=r?e.directives.tagName(r.source,e=>n(r,"TAG_RESOLVE_FAILED",e)):null;let d,u;d=e.options.stringKeys&&e.atKey?e.schema[c]:l?function(e,t,r,n,a){if("!"===r)return e[c];const i=[];for(const t of e.tags)if(!t.collection&&t.tag===r){if(!t.default||!t.test)return t;i.push(t)}for(const e of i)if(e.test?.test(t))return e;const s=e.knownTags[r];return s&&!s.collection?(e.tags.push(Object.assign({},s,{default:!1,test:void 0})),s):(a(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,"tag:yaml.org,2002:str"!==r),e[c])}(e.schema,a,l,r,n):"scalar"===t.type?function({atKey:e,directives:t,schema:r},n,a,i){const s=r.tags.find(t=>(!0===t.default||e&&"key"===t.default)&&t.test?.test(n))||r[c];if(r.compat){const e=r.compat.find(e=>e.default&&e.test?.test(n))??r[c];s.tag!==e.tag&&i(a,"TAG_RESOLVE_FAILED",`Value may be parsed as either ${t.tagString(s.tag)} or ${t.tagString(e.tag)}`,!0)}return s}(e,a,t,n):e.schema[c];try{const i=d.resolve(a,e=>n(r??t,"TAG_RESOLVE_FAILED",e),e.options);u=y(i)?i:new K(i)}catch(e){const i=e instanceof Error?e.message:String(e);n(r??t,"TAG_RESOLVE_FAILED",i),u=new K(a)}return u.range=o,u.source=a,i&&(u.type=i),l&&(u.tag=l),d.format&&(u.format=d.format),s&&(u.comment=s),u}function Xt(e,t,r){if(t){r??(r=t.length);for(let n=r-1;n>=0;--n){let r=t[n];switch(r.type){case"space":case"comment":case"newline":e-=r.source.length;continue}for(r=t[++n];"space"===r?.type;)e+=r.source.length,r=t[++n];break}}return e}const Gt={composeNode:zt,composeEmptyNode:Ht};function zt(e,t,r,n){const a=e.atKey,{spaceBefore:i,comment:s,anchor:o,tag:l}=r;let c,d=!0;switch(t.type){case"alias":c=function({options:e},{offset:t,source:r,end:n},a){const i=new J(r.substring(1));""===i.source&&a(t,"BAD_ALIAS","Alias cannot be an empty string"),i.source.endsWith(":")&&a(t+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const s=t+r.length,o=Pt(n,s,e.strict,a);return i.range=[t,s,o.offset],o.comment&&(i.comment=o.comment),i}(e,t,n),(o||l)&&n(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":c=qt(e,t,l,n),o&&(c.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{c=function(e,t,r,n,a){const i=n.tag,s=i?t.directives.tagName(i.source,e=>a(i,"TAG_RESOLVE_FAILED",e)):null;if("block-seq"===r.type){const{anchor:e,newlineAfterProp:t}=n,r=e&&i?e.offset>i.offset?e:i:e??i;r&&(!t||t.offset<r.offset)&&a(r,"MISSING_CHAR","Missing newline after block sequence props")}const o="block-map"===r.type?"map":"block-seq"===r.type?"seq":"{"===r.start.source?"map":"seq";if(!i||!s||"!"===s||s===Se.tagName&&"map"===o||s===we.tagName&&"seq"===o)return Jt(e,t,r,a,s);let l=t.schema.tags.find(e=>e.tag===s&&e.collection===o);if(!l){const n=t.schema.knownTags[s];if(n?.collection!==o)return n?a(i,"BAD_COLLECTION_TYPE",`${n.tag} used for ${o} collection, but expects ${n.collection??"scalar"}`,!0):a(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${s}`,!0),Jt(e,t,r,a,s);t.schema.tags.push(Object.assign({},n,{default:!1})),l=n}const c=Jt(e,t,r,a,s,l),d=l.resolve?.(c,e=>a(i,"TAG_RESOLVE_FAILED",e),t.options)??c,u=E(d)?d:new K(d);return u.range=c.range,u.tag=s,l?.format&&(u.format=l.format),u}(Gt,e,t,r,n),o&&(c.anchor=o.source.substring(1))}catch(e){n(t,"RESOURCE_EXHAUSTION",e instanceof Error?e.message:String(e))}break;default:n(t,"UNEXPECTED_TOKEN","error"===t.type?t.message:`Unsupported token (type: ${t.type})`),d=!1}return c??(c=Ht(e,t.offset,void 0,null,r,n)),o&&""===c.anchor&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),a&&e.options.stringKeys&&(!y(c)||"string"!=typeof c.value||c.tag&&"tag:yaml.org,2002:str"!==c.tag)&&n(l??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),i&&(c.spaceBefore=!0),s&&("scalar"===t.type&&""===t.source?c.comment=s:c.commentBefore=s),e.options.keepSourceTokens&&d&&(c.srcToken=t),c}function Ht(e,t,r,n,{spaceBefore:a,comment:i,anchor:s,tag:o,end:l},c){const d=qt(e,{type:"scalar",offset:Xt(t,r,n),indent:-1,source:""},o,c);return s&&(d.anchor=s.source.substring(1),""===d.anchor&&c(s,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(d.spaceBefore=!0),i&&(d.comment=i,d.range[2]=l),d}function Qt(e){if("number"==typeof e)return[e,e+1];if(Array.isArray(e))return 2===e.length?e:[e[0],e[1]];const{offset:t,source:r}=e;return[t,t+("string"==typeof r?r.length:1)]}function Zt(e){let t="",r=!1,n=!1;for(let a=0;a<e.length;++a){const i=e[a];switch(i[0]){case"#":t+=(""===t?"":n?"\n\n":"\n")+(i.substring(1)||" "),r=!0,n=!1;break;case"%":"#"!==e[a+1]?.[0]&&(a+=1),r=!1;break;default:r||(n=!0),r=!1}}return{comment:t,afterEmptyLine:n}}class er{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(e,t,r,n)=>{const a=Qt(e);n?this.warnings.push(new Lt(a,t,r)):this.errors.push(new _t(a,t,r))},this.directives=new F({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:r,afterEmptyLine:n}=Zt(this.prelude);if(r){const a=e.contents;if(t)e.comment=e.comment?`${e.comment}\n${r}`:r;else if(n||e.directives.docStart||!a)e.commentBefore=r;else if(g(a)&&!a.flow&&a.items.length>0){let e=a.items[0];f(e)&&(e=e.key);const t=e.commentBefore;e.commentBefore=t?`${r}\n${t}`:r}else{const e=a.commentBefore;a.commentBefore=e?`${r}\n${e}`:r}}if(t){for(let t=0;t<this.errors.length;++t)e.errors.push(this.errors[t]);for(let t=0;t<this.warnings.length;++t)e.warnings.push(this.warnings[t])}else e.errors=this.errors,e.warnings=this.warnings;this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Zt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,r=-1){for(const t of e)yield*this.next(t);yield*this.end(t,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,r,n)=>{const a=Qt(e);a[0]+=t,this.onError(a,"BAD_DIRECTIVE",r,n)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=function(e,t,{offset:r,start:n,value:a,end:i},s){const o=Object.assign({_directives:t},e),l=new Rt(void 0,o),c={atKey:!1,atRoot:!0,directives:l.directives,options:l.options,schema:l.schema},d=Ot(n,{indicator:"doc-start",next:a??i?.[0],offset:r,onError:s,parentIndent:0,startOnNewline:!0});d.found&&(l.directives.docStart=!0,!a||"block-map"!==a.type&&"block-seq"!==a.type||d.hasNewline||s(d.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),l.contents=a?zt(c,a,d,s):Ht(c,d.end,n,null,d,s);const u=l.contents.range[2],m=Pt(i,u,!1,s);return m.comment&&(l.comment=m.comment),l.range=[r,u,m.offset],l}(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new _t(Qt(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const t="Unexpected doc-end without preceding document";this.errors.push(new _t(Qt(e),"UNEXPECTED_TOKEN",t));break}this.doc.directives.docEnd=!0;const t=Pt(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const e=this.doc.comment;this.doc.comment=e?`${e}\n${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new _t(Qt(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const e=Object.assign({_directives:this.directives},this.options),r=new Rt(void 0,e);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),r.range=[0,t,t],this.decorate(r,!1),yield r}}}function tr(e,t=!0,r){if(e){const n=(e,t,n)=>{const a="number"==typeof e?e:Array.isArray(e)?e[0]:e.offset;if(!r)throw new _t([a,a+1],t,n);r(a,t,n)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return kt(e,t,n);case"block-scalar":return Bt({options:{strict:t}},e,n)}}return null}function rr(e,t){const{implicitKey:r=!1,indent:n,inFlow:a=!1,offset:i=-1,type:s="PLAIN"}=t,o=le({type:s,value:e},{implicitKey:r,indent:n>0?" ".repeat(n):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),l=t.end??[{type:"newline",offset:-1,indent:n,source:"\n"}];switch(o[0]){case"|":case">":{const e=o.indexOf("\n"),t=o.substring(0,e),r=o.substring(e+1)+"\n",a=[{type:"block-scalar-header",offset:i,indent:n,source:t}];return ar(a,l)||a.push({type:"newline",offset:-1,indent:n,source:"\n"}),{type:"block-scalar",offset:i,indent:n,props:a,source:r}}case'"':return{type:"double-quoted-scalar",offset:i,indent:n,source:o,end:l};case"'":return{type:"single-quoted-scalar",offset:i,indent:n,source:o,end:l};default:return{type:"scalar",offset:i,indent:n,source:o,end:l}}}function nr(e,t,r={}){let{afterKey:n=!1,implicitKey:a=!1,inFlow:i=!1,type:s}=r,o="indent"in e?e.indent:null;if(n&&"number"==typeof o&&(o+=2),!s)switch(e.type){case"single-quoted-scalar":s="QUOTE_SINGLE";break;case"double-quoted-scalar":s="QUOTE_DOUBLE";break;case"block-scalar":{const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");s=">"===t.source[0]?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:s="PLAIN"}const l=le({type:s,value:t},{implicitKey:a||null===o,indent:null!==o&&o>0?" ".repeat(o):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}});switch(l[0]){case"|":case">":!function(e,t){const r=t.indexOf("\n"),n=t.substring(0,r),a=t.substring(r+1)+"\n";if("block-scalar"===e.type){const t=e.props[0];if("block-scalar-header"!==t.type)throw new Error("Invalid block scalar header");t.source=n,e.source=a}else{const{offset:t}=e,r="indent"in e?e.indent:-1,i=[{type:"block-scalar-header",offset:t,indent:r,source:n}];ar(i,"end"in e?e.end:void 0)||i.push({type:"newline",offset:-1,indent:r,source:"\n"});for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:"block-scalar",indent:r,props:i,source:a})}}(e,l);break;case'"':ir(e,l,"double-quoted-scalar");break;case"'":ir(e,l,"single-quoted-scalar");break;default:ir(e,l,"scalar")}}function ar(e,t){if(t)for(const r of t)switch(r.type){case"space":case"comment":e.push(r);break;case"newline":return e.push(r),!0}return!1}function ir(e,t,r){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=r,e.source=t;break;case"block-scalar":{const n=e.props.slice(1);let a=t.length;"block-scalar-header"===e.props[0].type&&(a-=e.props[0].source.length);for(const e of n)e.offset+=a;delete e.props,Object.assign(e,{type:r,source:t,end:n});break}case"block-map":case"block-seq":{const n={type:"newline",offset:e.offset+t.length,indent:e.indent,source:"\n"};delete e.items,Object.assign(e,{type:r,source:t,end:[n]});break}default:{const n="indent"in e?e.indent:-1,a="end"in e&&Array.isArray(e.end)?e.end.filter(e=>"space"===e.type||"comment"===e.type||"newline"===e.type):[];for(const t of Object.keys(e))"type"!==t&&"offset"!==t&&delete e[t];Object.assign(e,{type:r,indent:n,source:t,end:a})}}}const sr=e=>"type"in e?or(e):lr(e);function or(e){switch(e.type){case"block-scalar":{let t="";for(const r of e.props)t+=or(r);return t+e.source}case"block-map":case"block-seq":{let t="";for(const r of e.items)t+=lr(r);return t}case"flow-collection":{let t=e.start.source;for(const r of e.items)t+=lr(r);for(const r of e.end)t+=r.source;return t}case"document":{let t=lr(e);if(e.end)for(const r of e.end)t+=r.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const r of e.end)t+=r.source;return t}}}function lr({start:e,key:t,sep:r,value:n}){let a="";for(const t of e)a+=t.source;if(t&&(a+=or(t)),r)for(const e of r)a+=e.source;return n&&(a+=or(n)),a}const cr=Symbol("break visit"),dr=Symbol("skip children"),ur=Symbol("remove item");function mr(e,t){"type"in e&&"document"===e.type&&(e={start:e.start,value:e.value}),pr(Object.freeze([]),e,t)}function pr(e,t,r){let n=r(t,e);if("symbol"==typeof n)return n;for(const a of["key","value"]){const i=t[a];if(i&&"items"in i){for(let t=0;t<i.items.length;++t){const n=pr(Object.freeze(e.concat([[a,t]])),i.items[t],r);if("number"==typeof n)t=n-1;else{if(n===cr)return cr;n===ur&&(i.items.splice(t,1),t-=1)}}"function"==typeof n&&"key"===a&&(n=n(t,e))}}return"function"==typeof n?n(t,e):n}mr.BREAK=cr,mr.SKIP=dr,mr.REMOVE=ur,mr.itemAtPath=(e,t)=>{let r=e;for(const[e,n]of t){const t=r?.[e];if(!t||!("items"in t))return;r=t.items[n]}return r},mr.parentCollection=(e,t)=>{const r=mr.itemAtPath(e,t.slice(0,-1)),n=t[t.length-1][0],a=r?.[n];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};const hr="\ufeff",fr="",yr="",Tr="",gr=e=>!!e&&"items"in e,Er=e=>!!e&&("scalar"===e.type||"single-quoted-scalar"===e.type||"double-quoted-scalar"===e.type||"block-scalar"===e.type);function Cr(e){switch(e){case hr:return"<BOM>";case fr:return"<DOC>";case yr:return"<FLOW_END>";case Tr:return"<SCALAR>";default:return JSON.stringify(e)}}function Ir(e){switch(e){case hr:return"byte-order-mark";case fr:return"doc-mode";case yr:return"flow-error-end";case Tr:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function Ar(e){switch(e){case void 0:case" ":case"\n":case"\r":case"\t":return!0;default:return!1}}const br=new Set("0123456789ABCDEFabcdef"),vr=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Sr=new Set(",[]{}"),Rr=new Set(" ,[]{}\n\r\t"),wr=e=>!e||Rr.has(e);class Nr{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,t=!1){if(e){if("string"!=typeof e)throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!t;let r=this.next??"stream";for(;r&&(t||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,t=this.buffer[e];for(;" "===t||"\t"===t;)t=this.buffer[++e];return!t||"#"===t||"\n"===t||"\r"===t&&"\n"===this.buffer[e+1]}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let t=this.buffer[e];if(this.indentNext>0){let r=0;for(;" "===t;)t=this.buffer[++r+e];if("\r"===t){const t=this.buffer[r+e+1];if("\n"===t||!t&&!this.atEnd)return e+r+1}return"\n"===t||r>=this.indentNext||!t&&!this.atEnd?e+r:-1}if("-"===t||"."===t){const t=this.buffer.substr(e,3);if(("---"===t||"..."===t)&&Ar(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return("number"!=typeof e||-1!==e&&e<this.pos)&&(e=this.buffer.indexOf("\n",this.pos),this.lineEndPos=e),-1===e?this.atEnd?this.buffer.substring(this.pos):null:("\r"===this.buffer[e-1]&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(null===e)return this.setNext("stream");if(e[0]===hr&&(yield*this.pushCount(1),e=e.substring(1)),"%"===e[0]){let t=e.length,r=e.indexOf("#");for(;-1!==r;){const n=e[r-1];if(" "===n||"\t"===n){t=r-1;break}r=e.indexOf("#",r+1)}for(;;){const r=e[t-1];if(" "!==r&&"\t"!==r)break;t-=1}const n=(yield*this.pushCount(t))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-n),this.pushNewline(),"stream"}if(this.atLineEnd()){const t=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-t),yield*this.pushNewline(),"stream"}return yield fr,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if("-"===e||"."===e){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const e=this.peek(3);if(("---"===e||"..."===e)&&Ar(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,"---"===e?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ar(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,t]=this.peek(2);if(!t&&!this.atEnd)return this.setNext("block-start");if(("-"===e||"?"===e||":"===e)&&Ar(t)){const e=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=e,"block-start"}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(null===e)return this.setNext("doc");let t=yield*this.pushIndicators();switch(e[t]){case"#":yield*this.pushCount(e.length-t);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(wr),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return t+=(yield*this.parseBlockScalarHeader()),t+=(yield*this.pushSpaces(!0)),yield*this.pushCount(e.length-t),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,t,r=-1;do{e=yield*this.pushNewline(),e>0?(t=yield*this.pushSpaces(!1),this.indentValue=r=t):t=0,t+=(yield*this.pushSpaces(!0))}while(e+t>0);const n=this.getLine();if(null===n)return this.setNext("flow");if((-1!==r&&r<this.indentNext&&"#"!==n[0]||0===r&&(n.startsWith("---")||n.startsWith("..."))&&Ar(n[3]))&&(r!==this.indentNext-1||1!==this.flowLevel||"]"!==n[0]&&"}"!==n[0]))return this.flowLevel=0,yield yr,yield*this.parseLineStart();let a=0;for(;","===n[a];)a+=(yield*this.pushCount(1)),a+=(yield*this.pushSpaces(!0)),this.flowKey=!1;switch(a+=(yield*this.pushIndicators()),n[a]){case void 0:return"flow";case"#":return yield*this.pushCount(n.length-a),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(wr),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const e=this.charAt(1);if(this.flowKey||Ar(e)||","===e)return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let t=this.buffer.indexOf(e,this.pos+1);if("'"===e)for(;-1!==t&&"'"===this.buffer[t+1];)t=this.buffer.indexOf("'",t+2);else for(;-1!==t;){let e=0;for(;"\\"===this.buffer[t-1-e];)e+=1;if(e%2==0)break;t=this.buffer.indexOf('"',t+1)}const r=this.buffer.substring(0,t);let n=r.indexOf("\n",this.pos);if(-1!==n){for(;-1!==n;){const e=this.continueScalar(n+1);if(-1===e)break;n=r.indexOf("\n",e)}-1!==n&&(t=n-("\r"===r[n-1]?2:1))}if(-1===t){if(!this.atEnd)return this.setNext("quoted-scalar");t=this.buffer.length}return yield*this.pushToIndex(t+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const t=this.buffer[++e];if("+"===t)this.blockScalarKeep=!0;else if(t>"0"&&t<="9")this.blockScalarIndent=Number(t)-1;else if("-"!==t)break}return yield*this.pushUntil(e=>Ar(e)||"#"===e)}*parseBlockScalar(){let e,t=this.pos-1,r=0;e:for(let n=this.pos;e=this.buffer[n];++n)switch(e){case" ":r+=1;break;case"\n":t=n,r=0;break;case"\r":{const e=this.buffer[n+1];if(!e&&!this.atEnd)return this.setNext("block-scalar");if("\n"===e)break}default:break e}if(!e&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){-1===this.blockScalarIndent?this.indentNext=r:this.indentNext=this.blockScalarIndent+(0===this.indentNext?1:this.indentNext);do{const e=this.continueScalar(t+1);if(-1===e)break;t=this.buffer.indexOf("\n",e)}while(-1!==t);if(-1===t){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let n=t+1;for(e=this.buffer[n];" "===e;)e=this.buffer[++n];if("\t"===e){for(;"\t"===e||" "===e||"\r"===e||"\n"===e;)e=this.buffer[++n];t=n-1}else if(!this.blockScalarKeep)for(;;){let e=t-1,n=this.buffer[e];"\r"===n&&(n=this.buffer[--e]);const a=e;for(;" "===n;)n=this.buffer[--e];if(!("\n"===n&&e>=this.pos&&e+1+r>a))break;t=e}return yield Tr,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let t,r=this.pos-1,n=this.pos-1;for(;t=this.buffer[++n];)if(":"===t){const t=this.buffer[n+1];if(Ar(t)||e&&Sr.has(t))break;r=n}else if(Ar(t)){let a=this.buffer[n+1];if("\r"===t&&("\n"===a?(n+=1,t="\n",a=this.buffer[n+1]):r=n),"#"===a||e&&Sr.has(a))break;if("\n"===t){const e=this.continueScalar(n+1);if(-1===e)break;n=Math.max(n,e-2)}}else{if(e&&Sr.has(t))break;r=n}return t||this.atEnd?(yield Tr,yield*this.pushToIndex(r+1,!0),e?"flow":"doc"):this.setNext("plain-scalar")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,t){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(t&&(yield""),0)}*pushIndicators(){let e=0;e:for(;;){switch(this.charAt(0)){case"!":e+=(yield*this.pushTag()),e+=(yield*this.pushSpaces(!0));continue e;case"&":e+=(yield*this.pushUntil(wr)),e+=(yield*this.pushSpaces(!0));continue e;case"-":case"?":case":":{const t=this.flowLevel>0,r=this.charAt(1);if(Ar(r)||t&&Sr.has(r)){t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,e+=(yield*this.pushCount(1)),e+=(yield*this.pushSpaces(!0));continue e}}}break e}return e}*pushTag(){if("<"===this.charAt(1)){let e=this.pos+2,t=this.buffer[e];for(;!Ar(t)&&">"!==t;)t=this.buffer[++e];return yield*this.pushToIndex(">"===t?e+1:e,!1)}{let e=this.pos+1,t=this.buffer[e];for(;t;)if(vr.has(t))t=this.buffer[++e];else{if("%"!==t||!br.has(this.buffer[e+1])||!br.has(this.buffer[e+2]))break;t=this.buffer[e+=3]}return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return"\n"===e?yield*this.pushCount(1):"\r"===e&&"\n"===this.charAt(1)?yield*this.pushCount(2):0}*pushSpaces(e){let t,r=this.pos-1;do{t=this.buffer[++r]}while(" "===t||e&&"\t"===t);const n=r-this.pos;return n>0&&(yield this.buffer.substr(this.pos,n),this.pos=r),n}*pushUntil(e){let t=this.pos,r=this.buffer[t];for(;!e(r);)r=this.buffer[++t];return yield*this.pushToIndex(t,!1)}}class _r{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let t=0,r=this.lineStarts.length;for(;t<r;){const n=t+r>>1;this.lineStarts[n]<e?t=n+1:r=n}return this.lineStarts[t]===e?{line:t+1,col:1}:0===t?{line:0,col:e}:{line:t,col:e-this.lineStarts[t-1]+1}}}}function Lr(e,t){for(let r=0;r<e.length;++r)if(e[r].type===t)return!0;return!1}function Vr(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function Or(e){switch(e?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Fr(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function xr(e){if(0===e.length)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;"space"===e[++t]?.type;);return e.splice(t,e.length)}function Mr(e,t){if(t.length<1e5)Array.prototype.push.apply(e,t);else for(let r=0;r<t.length;++r)e.push(t[r])}function Dr(e){if("flow-seq-start"===e.start.type)for(const t of e.items)!t.sep||t.value||Lr(t.start,"explicit-key-ind")||Lr(t.sep,"map-value-ind")||(t.key&&(t.value=t.key),delete t.key,Or(t.value)?t.value.end?Mr(t.value.end,t.sep):t.value.end=t.sep:Mr(t.start,t.sep),delete t.sep)}class Pr{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Nr,this.onNewLine=e}*parse(e,t=!1){this.onNewLine&&0===this.offset&&this.onNewLine(0);for(const r of this.lexer.lex(e,t))yield*this.next(r);t||(yield*this.end())}*next(e){if(this.source=e,this.atScalar)return this.atScalar=!1,yield*this.step(),void(this.offset+=e.length);const t=Ir(e);if(t)if("scalar"===t)this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=t,yield*this.step(),t){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&" "===e[0]&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const t=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:t,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if("doc-end"!==this.type||"doc-end"===e?.type){if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}else{for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source})}}peek(e){return this.stack[this.stack.length-e]}*pop(e){const t=e??this.stack.pop();if(t)if(0===this.stack.length)yield t;else{const e=this.peek(1);switch("block-scalar"===t.type?t.indent="indent"in e?e.indent:0:"flow-collection"===t.type&&"document"===e.type&&(t.indent=0),"flow-collection"===t.type&&Dr(t),e.type){case"document":e.value=t;break;case"block-scalar":e.props.push(t);break;case"block-map":{const r=e.items[e.items.length-1];if(r.value)return e.items.push({start:[],key:t,sep:[]}),void(this.onKeyLine=!0);if(!r.sep)return Object.assign(r,{key:t,sep:[]}),void(this.onKeyLine=!r.explicitKey);r.value=t;break}case"block-seq":{const r=e.items[e.items.length-1];r.value?e.items.push({start:[],value:t}):r.value=t;break}case"flow-collection":{const r=e.items[e.items.length-1];return void(!r||r.value?e.items.push({start:[],key:t,sep:[]}):r.sep?r.value=t:Object.assign(r,{key:t,sep:[]}))}default:yield*this.pop(),yield*this.pop(t)}if(!("document"!==e.type&&"block-map"!==e.type&&"block-seq"!==e.type||"block-map"!==t.type&&"block-seq"!==t.type)){const r=t.items[t.items.length-1];r&&!r.sep&&!r.value&&r.start.length>0&&-1===Vr(r.start)&&(0===t.indent||r.start.every(e=>"comment"!==e.type||e.indent<t.indent))&&("document"===e.type?e.end=r.start:e.items.push({start:r.start}),t.items.splice(-1,1))}}else{const e="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:e}}}*stream(){switch(this.type){case"directive-line":return void(yield{type:"directive",offset:this.offset,source:this.source});case"byte-order-mark":case"space":case"comment":case"newline":return void(yield this.sourceToken);case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};return"doc-start"===this.type&&e.start.push(this.sourceToken),void this.stack.push(e)}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":return void(-1!==Vr(e.start)?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken));case"anchor":case"tag":case"space":case"comment":case"newline":return void e.start.push(this.sourceToken)}const t=this.startBlockValue(e);t?this.stack.push(t):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if("map-value-ind"===this.type){const t=xr(Fr(this.peek(2)));let r;e.end?(r=e.end,r.push(this.sourceToken),delete e.end):r=[this.sourceToken];const n={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:t,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=n}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":return void e.props.push(this.sourceToken);case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Mr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const r=!this.onKeyLine&&this.indent===e.indent,n=r&&(t.sep||t.explicitKey)&&"seq-item-ind"!==this.type;let a=[];if(n&&t.sep&&!t.value){const r=[];for(let n=0;n<t.sep.length;++n){const a=t.sep[n];switch(a.type){case"newline":r.push(n);break;case"space":break;case"comment":a.indent>e.indent&&(r.length=0);break;default:r.length=0}}r.length>=2&&(a=t.sep.splice(r[1]))}switch(this.type){case"anchor":case"tag":return void(n||t.value?(a.push(this.sourceToken),e.items.push({start:a}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"explicit-key-ind":return t.sep||t.explicitKey?n||t.value?(a.push(this.sourceToken),e.items.push({start:a,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}):(t.start.push(this.sourceToken),t.explicitKey=!0),void(this.onKeyLine=!0);case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Lr(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]});else if(Or(t.key)&&!Lr(t.sep,"newline")){const e=xr(t.start),r=t.key,n=t.sep;n.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:r,sep:n}]})}else a.length>0?t.sep=t.sep.concat(a,this.sourceToken):t.sep.push(this.sourceToken);else if(Lr(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const e=xr(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||n?e.items.push({start:a,key:null,sep:[this.sourceToken]}):Lr(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return void(this.onKeyLine=!0);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(n||t.value?(e.items.push({start:a,key:r,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(r):(Object.assign(t,{key:r,sep:[]}),this.onKeyLine=!0))}default:{const n=this.startBlockValue(e);if(n){if("block-seq"===n.type){if(!t.explicitKey&&t.sep&&!Lr(t.sep,"newline"))return void(yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source}))}else r&&e.items.push({start:a});return void this.stack.push(n)}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const r="end"in t.value?t.value.end:void 0,n=Array.isArray(r)?r[r.length-1]:void 0;"comment"===n?.type?r?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const r=e.items[e.items.length-2],n=r?.value?.end;if(Array.isArray(n))return Mr(n,t.start),n.push(this.sourceToken),void e.items.pop()}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;return void t.start.push(this.sourceToken);case"seq-item-ind":if(this.indent!==e.indent)break;return void(t.value||Lr(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken))}if(this.indent>e.indent){const t=this.startBlockValue(e);if(t)return void this.stack.push(t)}yield*this.pop(),yield*this.step()}*flowCollection(e){const t=e.items[e.items.length-1];if("flow-error-end"===this.type){let e;do{yield*this.pop(),e=this.peek(1)}while("flow-collection"===e?.type)}else if(0===e.end.length){switch(this.type){case"comma":case"explicit-key-ind":return void(!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken));case"map-value-ind":return void(!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]}));case"space":case"comment":case"newline":case"anchor":case"tag":return void(!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken));case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const r=this.flowScalar(this.type);return void(!t||t.value?e.items.push({start:[],key:r,sep:[]}):t.sep?this.stack.push(r):Object.assign(t,{key:r,sep:[]}))}case"flow-map-end":case"flow-seq-end":return void e.end.push(this.sourceToken)}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const t=this.peek(2);if("block-map"===t.type&&("map-value-ind"===this.type&&t.indent===e.indent||"newline"===this.type&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if("map-value-ind"===this.type&&"flow-collection"!==t.type){const r=xr(Fr(t));Dr(e);const n=e.end.splice(1,e.end.length);n.push(this.sourceToken);const a={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:n}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=a}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf("\n")+1;for(;0!==e;)this.onNewLine(this.offset+e),e=this.source.indexOf("\n",e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=xr(Fr(e));return t.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=xr(Fr(e));return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return"comment"===this.type&&!(this.indent<=t)&&e.every(e=>"newline"===e.type||"space"===e.type)}*documentEnd(e){"doc-mode"!==this.type&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],"newline"===this.type&&(yield*this.pop())}}}function Ur(e){const t=!1!==e.prettyErrors;return{lineCounter:e.lineCounter||t&&new _r||null,prettyErrors:t}}function Yr(e,t={}){const{lineCounter:r,prettyErrors:n}=Ur(t),a=new Pr(r?.addNewLine),i=new er(t),s=Array.from(i.compose(a.parse(e)));if(n&&r)for(const t of s)t.errors.forEach(Vt(e,r)),t.warnings.forEach(Vt(e,r));return s.length>0?s:Object.assign([],{empty:!0},i.streamInfo())}function Jr(e,t={}){const{lineCounter:r,prettyErrors:n}=Ur(t),a=new Pr(r?.addNewLine),i=new er(t);let s=null;for(const t of i.compose(a.parse(e),!0,e.length))if(s){if("silent"!==s.options.logLevel){s.errors.push(new _t(t.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}else s=t;return n&&r&&(s.errors.forEach(Vt(e,r)),s.warnings.forEach(Vt(e,r))),s}function Br(e,t,r){let n;"function"==typeof t?n=t:void 0===r&&t&&"object"==typeof t&&(r=t);const a=Jr(e,r);if(!a)return null;if(a.warnings.forEach(e=>ue(a.options.logLevel,e)),a.errors.length>0){if("silent"!==a.options.logLevel)throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:n},r))}function kr(e,t,r){let n=null;if("function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t),"string"==typeof r&&(r=r.length),"number"==typeof r){const e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(void 0===e){const{keepUndefined:e}=r??t??{};if(!e)return}return p(e)&&!n?e.toString(r):new Rt(e,n,r).toString(r)}}};const t={};function r(n){const a=t[n];if(void 0!==a)return a.exports;const i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let n={};return(()=>{let e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.InstanceDataLinkAtom=e.InstanceDataTypedAtom=e.InstanceDataNotationAtom=e.InstanceDataLabelAtom=e.InstanceDataStringAtom=e.InstanceDataEmptyAtom=e.InstanceDataEmptyNode=e.ReservedNames=e.AttributeValueNamePolicy=e.InstanceDataAttributeValueFieldName=e.InstanceDataAttributeValueField=e.InstanceDataContainer=e.TemplateInstance=e.TemplateBuilder=e.Template=e.TemplateElementBuilder=e.TemplateElement=e.TemplateField=e.AbstractArtifact=e.AbstractInstanceArtifact=e.CedarFieldType=e.AbstractContainerArtifact=e.AbstractSchemaArtifact=e.YamlTemplateWriter=e.JsonTemplateWriter=e.YamlTemplateElementWriter=e.JsonTemplateElementWriter=e.JsonTemplateInstanceReader=e.InstanceValidator=e.InstanceInflater=e.YamlTemplateInstanceReader=e.YamlTemplateReader=e.JsonTemplateReader=e.YamlTemplateElementReader=e.JsonTemplateElementReader=e.YamlTemplateFieldReader=e.JsonTemplateFieldReader=e.JsonAbstractArtifactWriter=e.JsonAbstractArtifactReader=e.JsonAbstractInstanceArtifactReader=e.JsonAbstractSchemaArtifactReader=e.CedarYamlWriters=e.CedarYamlReaders=e.CedarJsonWriters=e.CedarJsonReaders=e.CedarReaders=e.CedarWriters=e.CedarBuilders=e.YamlTemplateFieldWriter=e.JsonTemplateFieldWriter=void 0,e.Language=e.PavVersion=e.CedarUser=e.CedarArtifactType=e.CedarFieldCategory=e.YamlValues=e.JsonTemplateInstanceWriter=e.JsonTemplateInstanceContent=e.PropertyIri=e.RoundTrip=e.ComparisonError=e.CedarArtifactId=e.BioportalTermType=e.BiboStatus=e.Iri=e.NumberType=e.TemporalType=e.TimeFormat=e.TemporalGranularity=e.JsonPath=e.SchemaVersion=e.IsoDate=e.JsonNode=e.ChildDeploymentInfoStaticBuilder=e.ChildDeploymentInfoStatic=e.ChildDeploymentInfoAlwaysMultipleBuilder=e.ChildDeploymentInfoAlwaysMultiple=e.ChildDeploymentInfoAlwaysSingleBuilder=e.ChildDeploymentInfoAlwaysSingle=e.ChildDeploymentInfoBuilder=e.ChildDeploymentInfo=e.ChildDeploymentInfoElementBuilder=e.ChildDeploymentInfoElement=e.AbstractFieldChildDeploymentInfoBuilder=e.AbstractFieldChildDeploymentInfo=e.AbstractDynamicChildDeploymentInfoBuilder=e.AbstractDynamicChildDeploymentInfo=e.AbstractChildDeploymentInfoBuilder=e.AbstractChildDeploymentInfo=e.ControlledTermVersion=e.ControlledTermActionBuilder=e.ControlledTermValueSetBuilder=e.ControlledTermOntologyBuilder=e.ControlledTermClassBuilder=e.ControlledTermBranchBuilder=e.IriSyntax=e.ControlledTermDefaultValue=e.ControlledTermDefaultValueBuilder=e.TemplateInstanceBuilder=e.InstanceDataControlledAtom=void 0,e.TemplateValueValidator=e.FieldValuePolicy=e.ValidationPolicy=e.RegexChecks=e.REGEX_WORKER_SOURCE=e.RegexPolicy=e.YamlSourcePolicy=e.JsonSourcePolicy=e.ExactDecimal=e.NumericPolicy=e.TimestampPolicy=e.DisplayText=e.IdentifierPolicy=e.TextPolicy=e.SchemaExtensions=e.AnnotationAtValue=e.AnnotationAtId=e.Annotations=e.YamlObjectComparator=e.JsonObjectComparator=e.ComparisonResult=e.YamlArtifactParsingResult=e.JsonArtifactParsingResult=e.YamlArtifactReaderResult=e.JsonArtifactReaderResult=e.YamlTemplateInstanceReaderResult=e.JsonTemplateInstanceReaderResult=e.YamlTemplateReaderResult=e.JsonTemplateReaderResult=e.YamlTemplateElementReaderResult=e.JsonTemplateElementReaderResult=e.YamlTemplateFieldReaderResult=e.JsonTemplateFieldReaderResult=e.ComparisonErrorType=void 0;const t=r(1625);Object.defineProperty(e,"InstanceDataNotationAtom",{enumerable:!0,get:function(){return t.InstanceDataNotationAtom}});const a=r(8810);Object.defineProperty(e,"CedarWriters",{enumerable:!0,get:function(){return a.CedarWriters}});const i=r(6568);Object.defineProperty(e,"CedarBuilders",{enumerable:!0,get:function(){return i.CedarBuilders}});const s=r(4381);Object.defineProperty(e,"JsonTemplateFieldReader",{enumerable:!0,get:function(){return s.JsonTemplateFieldReader}});const o=r(7909);Object.defineProperty(e,"JsonTemplateElementReader",{enumerable:!0,get:function(){return o.JsonTemplateElementReader}});const l=r(5291);Object.defineProperty(e,"JsonTemplateReader",{enumerable:!0,get:function(){return l.JsonTemplateReader}});const c=r(2748);Object.defineProperty(e,"JsonTemplateFieldWriter",{enumerable:!0,get:function(){return c.JsonTemplateFieldWriterInternal}});const d=r(5430);Object.defineProperty(e,"YamlTemplateFieldWriter",{enumerable:!0,get:function(){return d.YamlTemplateFieldWriterInternal}});const u=r(6645);Object.defineProperty(e,"JsonTemplateElementWriter",{enumerable:!0,get:function(){return u.JsonTemplateElementWriter}});const m=r(7519);Object.defineProperty(e,"JsonTemplateWriter",{enumerable:!0,get:function(){return m.JsonTemplateWriter}});const p=r(5251);Object.defineProperty(e,"YamlTemplateElementWriter",{enumerable:!0,get:function(){return p.YamlTemplateElementWriter}});const h=r(1933);Object.defineProperty(e,"YamlTemplateWriter",{enumerable:!0,get:function(){return h.YamlTemplateWriter}});const f=r(9129);Object.defineProperty(e,"TemplateField",{enumerable:!0,get:function(){return f.TemplateField}});const y=r(7661);Object.defineProperty(e,"TemplateElement",{enumerable:!0,get:function(){return y.TemplateElement}});const T=r(1762);Object.defineProperty(e,"TemplateElementBuilder",{enumerable:!0,get:function(){return T.TemplateElementBuilder}});const g=r(3281);Object.defineProperty(e,"Template",{enumerable:!0,get:function(){return g.Template}});const E=r(766);Object.defineProperty(e,"TemplateBuilder",{enumerable:!0,get:function(){return E.TemplateBuilder}});const C=r(4925);Object.defineProperty(e,"TemplateInstanceBuilder",{enumerable:!0,get:function(){return C.TemplateInstanceBuilder}});const I=r(9517);Object.defineProperty(e,"JsonNode",{enumerable:!0,get:function(){return I.JsonNode}});const A=r(9857);Object.defineProperty(e,"IsoDate",{enumerable:!0,get:function(){return A.IsoDate}});const b=r(8557);Object.defineProperty(e,"SchemaVersion",{enumerable:!0,get:function(){return b.SchemaVersion}});const v=r(3188);Object.defineProperty(e,"JsonPath",{enumerable:!0,get:function(){return v.JsonPath}});const S=r(7974);Object.defineProperty(e,"TemporalGranularity",{enumerable:!0,get:function(){return S.TemporalGranularity}});const R=r(3764);Object.defineProperty(e,"TimeFormat",{enumerable:!0,get:function(){return R.TimeFormat}});const w=r(8588);Object.defineProperty(e,"TemporalType",{enumerable:!0,get:function(){return w.TemporalType}});const N=r(3447);Object.defineProperty(e,"NumberType",{enumerable:!0,get:function(){return N.NumberType}});const _=r(8802);Object.defineProperty(e,"Iri",{enumerable:!0,get:function(){return _.Iri}});const L=r(2957);Object.defineProperty(e,"ControlledTermBranchBuilder",{enumerable:!0,get:function(){return L.ControlledTermBranchBuilder}});const V=r(3091);Object.defineProperty(e,"ControlledTermClassBuilder",{enumerable:!0,get:function(){return V.ControlledTermClassBuilder}});const O=r(5491);Object.defineProperty(e,"ControlledTermOntologyBuilder",{enumerable:!0,get:function(){return O.ControlledTermOntologyBuilder}});const F=r(1556);Object.defineProperty(e,"ControlledTermValueSetBuilder",{enumerable:!0,get:function(){return F.ControlledTermValueSetBuilder}});const x=r(2480);Object.defineProperty(e,"ControlledTermDefaultValueBuilder",{enumerable:!0,get:function(){return x.ControlledTermDefaultValueBuilder}});const M=r(7295);Object.defineProperty(e,"ControlledTermDefaultValue",{enumerable:!0,get:function(){return M.ControlledTermDefaultValue}});const D=r(8446);Object.defineProperty(e,"IriSyntax",{enumerable:!0,get:function(){return D.IriSyntax}});const P=r(5753);Object.defineProperty(e,"ControlledTermVersion",{enumerable:!0,get:function(){return P.ControlledTermVersion}});const U=r(3910);Object.defineProperty(e,"BiboStatus",{enumerable:!0,get:function(){return U.BiboStatus}});const Y=r(455);Object.defineProperty(e,"ChildDeploymentInfo",{enumerable:!0,get:function(){return Y.ChildDeploymentInfo}});const J=r(3608);Object.defineProperty(e,"ChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return J.ChildDeploymentInfoBuilder}});const B=r(8534);Object.defineProperty(e,"CedarArtifactId",{enumerable:!0,get:function(){return B.CedarArtifactId}});const k=r(2888);Object.defineProperty(e,"ComparisonError",{enumerable:!0,get:function(){return k.ComparisonError}});const K=r(1888);Object.defineProperty(e,"RoundTrip",{enumerable:!0,get:function(){return K.RoundTrip}});const j=r(6389);Object.defineProperty(e,"PropertyIri",{enumerable:!0,get:function(){return j.PropertyIri}});const W=r(6320);Object.defineProperty(e,"JsonTemplateInstanceWriter",{enumerable:!0,get:function(){return W.JsonTemplateInstanceWriter}});const $=r(350);Object.defineProperty(e,"JsonTemplateInstanceContent",{enumerable:!0,get:function(){return $.JsonTemplateInstanceContent}});const q=r(7733);Object.defineProperty(e,"ControlledTermActionBuilder",{enumerable:!0,get:function(){return q.ControlledTermActionBuilder}});const X=r(8349);Object.defineProperty(e,"YamlValues",{enumerable:!0,get:function(){return X.YamlValues}});const G=r(4531);Object.defineProperty(e,"BioportalTermType",{enumerable:!0,get:function(){return G.BioportalTermType}});const z=r(8421);Object.defineProperty(e,"CedarFieldCategory",{enumerable:!0,get:function(){return z.CedarFieldCategory}});const H=r(2999);Object.defineProperty(e,"YamlTemplateFieldReader",{enumerable:!0,get:function(){return H.YamlTemplateFieldReader}});const Q=r(8239);Object.defineProperty(e,"YamlTemplateElementReader",{enumerable:!0,get:function(){return Q.YamlTemplateElementReader}});const Z=r(5677);Object.defineProperty(e,"YamlTemplateReader",{enumerable:!0,get:function(){return Z.YamlTemplateReader}});const ee=r(9946);Object.defineProperty(e,"YamlTemplateInstanceReader",{enumerable:!0,get:function(){return ee.YamlTemplateInstanceReader}});const te=r(9961);Object.defineProperty(e,"InstanceInflater",{enumerable:!0,get:function(){return te.InstanceInflater}});const re=r(8410);Object.defineProperty(e,"InstanceValidator",{enumerable:!0,get:function(){return re.InstanceValidator}});const ne=r(2763);Object.defineProperty(e,"CedarArtifactType",{enumerable:!0,get:function(){return ne.CedarArtifactType}});const ae=r(978);Object.defineProperty(e,"JsonAbstractSchemaArtifactReader",{enumerable:!0,get:function(){return ae.JsonAbstractSchemaArtifactReader}});const ie=r(1998);Object.defineProperty(e,"CedarReaders",{enumerable:!0,get:function(){return ie.CedarReaders}});const se=r(8333);Object.defineProperty(e,"AbstractSchemaArtifact",{enumerable:!0,get:function(){return se.AbstractSchemaArtifact}});const oe=r(5451);Object.defineProperty(e,"AbstractContainerArtifact",{enumerable:!0,get:function(){return oe.AbstractContainerArtifact}});const le=r(4869);Object.defineProperty(e,"CedarFieldType",{enumerable:!0,get:function(){return le.CedarFieldType}});const ce=r(3161);Object.defineProperty(e,"JsonAbstractArtifactWriter",{enumerable:!0,get:function(){return ce.JsonAbstractArtifactWriter}});const de=r(9760);Object.defineProperty(e,"ComparisonErrorType",{enumerable:!0,get:function(){return de.ComparisonErrorType}});const ue=r(9607);Object.defineProperty(e,"CedarJsonWriters",{enumerable:!0,get:function(){return ue.CedarJsonWriters}});const me=r(2103);Object.defineProperty(e,"CedarJsonReaders",{enumerable:!0,get:function(){return me.CedarJsonReaders}});const pe=r(5359);Object.defineProperty(e,"CedarYamlWriters",{enumerable:!0,get:function(){return pe.CedarYamlWriters}});const he=r(8639);Object.defineProperty(e,"CedarYamlReaders",{enumerable:!0,get:function(){return he.CedarYamlReaders}});const fe=r(5697);Object.defineProperty(e,"AbstractInstanceArtifact",{enumerable:!0,get:function(){return fe.AbstractInstanceArtifact}});const ye=r(2674);Object.defineProperty(e,"AbstractArtifact",{enumerable:!0,get:function(){return ye.AbstractArtifact}});const Te=r(2272);Object.defineProperty(e,"TemplateInstance",{enumerable:!0,get:function(){return Te.TemplateInstance}});const ge=r(7723);Object.defineProperty(e,"InstanceDataContainer",{enumerable:!0,get:function(){return ge.InstanceDataContainer}});const Ee=r(9327);Object.defineProperty(e,"InstanceDataAttributeValueField",{enumerable:!0,get:function(){return Ee.InstanceDataAttributeValueField}});const Ce=r(3644);Object.defineProperty(e,"InstanceDataAttributeValueFieldName",{enumerable:!0,get:function(){return Ce.InstanceDataAttributeValueFieldName}});const Ie=r(4033);Object.defineProperty(e,"AttributeValueNamePolicy",{enumerable:!0,get:function(){return Ie.AttributeValueNamePolicy}});const Ae=r(5588);Object.defineProperty(e,"ReservedNames",{enumerable:!0,get:function(){return Ae.ReservedNames}});const be=r(4465);Object.defineProperty(e,"InstanceDataEmptyNode",{enumerable:!0,get:function(){return be.InstanceDataEmptyNode}});const ve=r(7548);Object.defineProperty(e,"InstanceDataEmptyAtom",{enumerable:!0,get:function(){return ve.InstanceDataEmptyAtom}});const Se=r(9167);Object.defineProperty(e,"InstanceDataLabelAtom",{enumerable:!0,get:function(){return Se.InstanceDataLabelAtom}});const Re=r(5222);Object.defineProperty(e,"InstanceDataStringAtom",{enumerable:!0,get:function(){return Re.InstanceDataStringAtom}});const we=r(4877);Object.defineProperty(e,"InstanceDataTypedAtom",{enumerable:!0,get:function(){return we.InstanceDataTypedAtom}});const Ne=r(7571);Object.defineProperty(e,"InstanceDataLinkAtom",{enumerable:!0,get:function(){return Ne.InstanceDataLinkAtom}});const _e=r(8193);Object.defineProperty(e,"InstanceDataControlledAtom",{enumerable:!0,get:function(){return _e.InstanceDataControlledAtom}});const Le=r(9232);Object.defineProperty(e,"JsonTemplateInstanceReader",{enumerable:!0,get:function(){return Le.JsonTemplateInstanceReader}});const Ve=r(3326);Object.defineProperty(e,"JsonAbstractInstanceArtifactReader",{enumerable:!0,get:function(){return Ve.JsonAbstractInstanceArtifactReader}});const Oe=r(7993);Object.defineProperty(e,"JsonAbstractArtifactReader",{enumerable:!0,get:function(){return Oe.JsonAbstractArtifactReader}});const Fe=r(7954);Object.defineProperty(e,"JsonTemplateReaderResult",{enumerable:!0,get:function(){return Fe.JsonTemplateReaderResult}});const xe=r(2234);Object.defineProperty(e,"CedarUser",{enumerable:!0,get:function(){return xe.CedarUser}});const Me=r(8518);Object.defineProperty(e,"JsonArtifactReaderResult",{enumerable:!0,get:function(){return Me.JsonArtifactReaderResult}});const De=r(4948);Object.defineProperty(e,"JsonTemplateElementReaderResult",{enumerable:!0,get:function(){return De.JsonTemplateElementReaderResult}});const Pe=r(6396);Object.defineProperty(e,"JsonTemplateFieldReaderResult",{enumerable:!0,get:function(){return Pe.JsonTemplateFieldReaderResult}});const Ue=r(6537);Object.defineProperty(e,"JsonTemplateInstanceReaderResult",{enumerable:!0,get:function(){return Ue.JsonTemplateInstanceReaderResult}});const Ye=r(1027);Object.defineProperty(e,"PavVersion",{enumerable:!0,get:function(){return Ye.PavVersion}});const Je=r(3581);Object.defineProperty(e,"ChildDeploymentInfoStatic",{enumerable:!0,get:function(){return Je.ChildDeploymentInfoStatic}});const Be=r(8290);Object.defineProperty(e,"ChildDeploymentInfoStaticBuilder",{enumerable:!0,get:function(){return Be.ChildDeploymentInfoStaticBuilder}});const ke=r(2266);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingle",{enumerable:!0,get:function(){return ke.ChildDeploymentInfoAlwaysSingle}});const Ke=r(587);Object.defineProperty(e,"ChildDeploymentInfoAlwaysSingleBuilder",{enumerable:!0,get:function(){return Ke.ChildDeploymentInfoAlwaysSingleBuilder}});const je=r(8878);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultiple",{enumerable:!0,get:function(){return je.ChildDeploymentInfoAlwaysMultiple}});const We=r(3239);Object.defineProperty(e,"ChildDeploymentInfoAlwaysMultipleBuilder",{enumerable:!0,get:function(){return We.ChildDeploymentInfoAlwaysMultipleBuilder}});const $e=r(513);Object.defineProperty(e,"AbstractChildDeploymentInfo",{enumerable:!0,get:function(){return $e.AbstractChildDeploymentInfo}});const qe=r(6910);Object.defineProperty(e,"AbstractChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return qe.AbstractChildDeploymentInfoBuilder}});const Xe=r(4809);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return Xe.AbstractDynamicChildDeploymentInfoBuilder}});const Ge=r(3812);Object.defineProperty(e,"AbstractDynamicChildDeploymentInfo",{enumerable:!0,get:function(){return Ge.AbstractDynamicChildDeploymentInfo}});const ze=r(9519);Object.defineProperty(e,"AbstractFieldChildDeploymentInfo",{enumerable:!0,get:function(){return ze.AbstractFieldChildDeploymentInfo}});const He=r(6096);Object.defineProperty(e,"AbstractFieldChildDeploymentInfoBuilder",{enumerable:!0,get:function(){return He.AbstractFieldChildDeploymentInfoBuilder}});const Qe=r(4831);Object.defineProperty(e,"ChildDeploymentInfoElement",{enumerable:!0,get:function(){return Qe.ChildDeploymentInfoElement}});const Ze=r(6976);Object.defineProperty(e,"ChildDeploymentInfoElementBuilder",{enumerable:!0,get:function(){return Ze.ChildDeploymentInfoElementBuilder}});const et=r(4036);Object.defineProperty(e,"JsonArtifactParsingResult",{enumerable:!0,get:function(){return et.JsonArtifactParsingResult}});const tt=r(1591);Object.defineProperty(e,"YamlArtifactParsingResult",{enumerable:!0,get:function(){return tt.YamlArtifactParsingResult}});const rt=r(4325);Object.defineProperty(e,"ComparisonResult",{enumerable:!0,get:function(){return rt.ComparisonResult}});const nt=r(1885);Object.defineProperty(e,"YamlObjectComparator",{enumerable:!0,get:function(){return nt.YamlObjectComparator}});const at=r(3056);Object.defineProperty(e,"JsonObjectComparator",{enumerable:!0,get:function(){return at.JsonObjectComparator}});const it=r(7868);Object.defineProperty(e,"YamlTemplateReaderResult",{enumerable:!0,get:function(){return it.YamlTemplateReaderResult}});const st=r(1790);Object.defineProperty(e,"YamlTemplateFieldReaderResult",{enumerable:!0,get:function(){return st.YamlTemplateFieldReaderResult}});const ot=r(4646);Object.defineProperty(e,"YamlTemplateElementReaderResult",{enumerable:!0,get:function(){return ot.YamlTemplateElementReaderResult}});const lt=r(6532);Object.defineProperty(e,"YamlArtifactReaderResult",{enumerable:!0,get:function(){return lt.YamlArtifactReaderResult}});const ct=r(147);Object.defineProperty(e,"YamlTemplateInstanceReaderResult",{enumerable:!0,get:function(){return ct.YamlTemplateInstanceReaderResult}});const dt=r(7752);Object.defineProperty(e,"Language",{enumerable:!0,get:function(){return dt.Language}});var ut=r(5226);Object.defineProperty(e,"Annotations",{enumerable:!0,get:function(){return ut.Annotations}});var mt=r(2787);Object.defineProperty(e,"AnnotationAtId",{enumerable:!0,get:function(){return mt.AnnotationAtId}});var pt=r(3549);Object.defineProperty(e,"AnnotationAtValue",{enumerable:!0,get:function(){return pt.AnnotationAtValue}});var ht=r(4443);Object.defineProperty(e,"SchemaExtensions",{enumerable:!0,get:function(){return ht.SchemaExtensions}});var ft=r(3992);Object.defineProperty(e,"TextPolicy",{enumerable:!0,get:function(){return ft.TextPolicy}});var yt=r(2500);Object.defineProperty(e,"IdentifierPolicy",{enumerable:!0,get:function(){return yt.IdentifierPolicy}});var Tt=r(3068);Object.defineProperty(e,"DisplayText",{enumerable:!0,get:function(){return Tt.DisplayText}});var gt=r(5435);Object.defineProperty(e,"TimestampPolicy",{enumerable:!0,get:function(){return gt.TimestampPolicy}});var Et=r(2108);Object.defineProperty(e,"NumericPolicy",{enumerable:!0,get:function(){return Et.NumericPolicy}}),Object.defineProperty(e,"ExactDecimal",{enumerable:!0,get:function(){return Et.ExactDecimal}});var Ct=r(5904);Object.defineProperty(e,"JsonSourcePolicy",{enumerable:!0,get:function(){return Ct.JsonSourcePolicy}});var It=r(8979);Object.defineProperty(e,"YamlSourcePolicy",{enumerable:!0,get:function(){return It.YamlSourcePolicy}});var At=r(128);Object.defineProperty(e,"RegexPolicy",{enumerable:!0,get:function(){return At.RegexPolicy}}),Object.defineProperty(e,"REGEX_WORKER_SOURCE",{enumerable:!0,get:function(){return At.REGEX_WORKER_SOURCE}});var bt=r(1991);Object.defineProperty(e,"RegexChecks",{enumerable:!0,get:function(){return bt.RegexChecks}});var vt=r(7092);Object.defineProperty(e,"ValidationPolicy",{enumerable:!0,get:function(){return vt.ValidationPolicy}});var St=r(6830);Object.defineProperty(e,"FieldValuePolicy",{enumerable:!0,get:function(){return St.FieldValuePolicy}});var Rt=r(4257);Object.defineProperty(e,"TemplateValueValidator",{enumerable:!0,get:function(){return Rt.TemplateValueValidator}})})(),n})());
|
|
2
2
|
//# sourceMappingURL=index.umd.js.map
|