/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
export default $arcgis.t(([{substitute:a,formatNumber:u},{stripHTML:c}])=>{function f(e,n){return n}function l(e,n,i){if(!n)return;if(typeof n=="number")return n;if(typeof n=="string")return c(n);if("value"in n||"unit"in n)return a(e.dotValue??"",n);if("colorName"in n&&"bandName"in n){let o=e[n.colorName],r=e[n.bandName]||n.bandName;return`${o}: ${r}`}if("showCount"in n)return n.showCount?e.clusterCountTitle:void 0;let t=null;return f(n,i)?t=n.ratioPercentTotal?"showRatioPercentTotal":n.ratioPercent?"showRatioPercent":n.ratio?"showRatio":n.normField?"showNormField":n.field?"showField":null:s(n,i)&&(t=n.normField?"showNormField":n.normByPct?"showNormPct":n.field?"showField":null),t?a(t==="showField"?"{field}":e[t]??"",{field:n.field,normField:n.normField}):void 0}function s(e,n){return!n}function h(e,n){if(!e.title||typeof e.title=="string")return e.title;let i=e.type==="color-ramp"||e.type==="opacity-ramp",t=e.title,o=l(n,t,i);return s(t,i)&&t.title?`${t.title} (${o})`:o}var d=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/iu;function w(e,n,i){switch(n){case"heatmap-ramp":return(i[e.label]||e.label)??null;case"stretch-ramp":let t="value"in e?e.value:void 0,o=e.label?i[e.label]:"";return o?`${o}: ${typeof t=="string"?t:u(t??0,{style:"decimal",notation:t?.toString().toLowerCase().includes("e")?"scientific":"standard"})}`:"";default:return e.label??null}}function y(e,n){return!!(n&&n==="Stretched"&&"version"in e&&typeof e.version=="number"&&e.version>=10.3&&e.declaredClass==="esri.layers.ImageryLayer")}function v(e){return e?e/72*96:0}function m(e){return e?e*72/96:0}function N(e){if(typeof e=="string"){let n=e.match(d);if(n){let i=Number(n[1]),t=n[3]?.toLowerCase(),o=e.startsWith("-"),r=t==="px"?m(i):i;return o?-r:r}return null}return e}function F(e,n){let i=l(e,n,!1),t=i?e.previewTemplateAriaLabel:e.previewAriaLabel;return a(t??"",{label:i})}function g(e,n){!n||!e||(e.querySelector("svg")??e.querySelector("canvas")??e).setAttribute("aria-label",n)}return{a:l,b:h,c:w,d:y,e:v,f:N,g:F,h:g}},"intl","applications/Components/stringUtils")