/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.25/esri/copyright.txt for details. */ import has from"../../core/has.js";import{isSome as e,isNone as t}from"../../core/maybe.js";var r;function o(t,r,o={}){const l=n(t);for(;l.length>1;){const t=c(r,l.shift(),o);if(e(t))return t}return i(r,l.shift(),o)}function n(e){const t=has("esri-force-webgl");if(t===r.WEBGL1||t===r.WEBGL2)return[t];switch(e){case"2d":return has("mac")&&has("chrome")?[r.WEBGL1,r.WEBGL2]:[r.WEBGL2,r.WEBGL1];case"3d":return[r.WEBGL2,r.WEBGL1]}}function i(e,r,o={}){if(!window.WebGLRenderingContext)return l(e,a),null;const n=c(e,r,o);return t(n)&&l(e,s),n}function c(e,t,o={}){const n=t===r.WEBGL1?["webgl","experimental-webgl","webkit-3d","moz-webgl"]:["webgl2"];let i=null;for(const r of n){try{i=e.getContext(r,o)}catch(c){}if(i)break}return i}function l(e,t){const r=e.parentNode;r&&(r.innerHTML='
'+t+" |