/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import{O as m,U as u,a as l,b as o}from"./IXZEUVT2.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:c},d,f])=>{var p=l`.invalid-wkid-text{color:var(--calcite-color-status-danger);font-size:var(--calcite-font-size--0)}`,h=/^\s*\d+(?:\s*\+\s*\d+)*(?:\s*,\s*\d+(?:\s*\+\s*\d+)*)*\s*$/u;function T(i){if(!/^\d+$/u.test(i))return null;let t=Number(i);return Number.isSafeInteger(t)&&t>0?t:null}function v(i){if(!h.test(i))return null;let t=[];for(let s of i.split(",")){let r=[];for(let a of s.split("+")){let n=T(a.trim());if(n==null)return null;r.push(new f({wkid:n}))}t.push(new d({steps:r}))}return t}function _(i){return i==null||i.length===0?"":i.map(t=>t.steps.map(s=>s.wkid).filter(s=>s!=null).join("+")).filter(t=>t.length>0).join(",")}var e=class extends m{constructor(){super(...arguments),this._isValidDatumTransformations=!0}static{this.properties={_datumTransformations:16,_isValidDatumTransformations:16,templateOptions:0,viewModel:0,messages:0}}static{this.styles=p}loaded(){this.manager.onLifecycle(()=>[c(()=>this.viewModel.datumTransformations,t=>{this._datumTransformations=_(t),this._isValidDatumTransformations=!0},{initial:!0})])}render(){let{messages:t}=this,s=this.viewModel.cimVersion;if(!(s!=null&&Number.parseFloat(s)<3.7))return o`<div><calcite-label>${t.datumTransformations}<calcite-input .value=${this._datumTransformations??""} .max=${Number.MAX_SAFE_INTEGER} @calciteInputInput=${({currentTarget:r})=>{let a=r.value?.trim()??"";if(this._datumTransformations=a,a===""){this.viewModel.datumTransformations=null,this._isValidDatumTransformations=!0;return}let n=v(a);if(n==null){this._isValidDatumTransformations=!1;return}this._isValidDatumTransformations=!0,this.viewModel.datumTransformations=n}}></calcite-input>${this._isValidDatumTransformations?null:o`<div class="invalid-wkid-text">${t.invalidWkid}</div>`}</calcite-label></div>`}};u("arcgis-print-datum-transformation-input",e);return e},"core/reactiveUtils","geometry/operators/support/GeographicTransformation","geometry/operators/support/GeographicTransformationStep")