123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import {
- has
- } from "./chunk-SPWQ3AWG.js";
- import {
- r,
- t
- } from "./chunk-YXWMMD76.js";
- // node_modules/@arcgis/core/views/webgl/context-util.js
- var r2;
- function o(t2, r3, o2 = {}) {
- const l2 = n(t2);
- for (; l2.length > 1; ) {
- const t3 = c(r3, l2.shift(), o2);
- if (r(t3))
- return t3;
- }
- return i(r3, l2.shift(), o2);
- }
- function n(e) {
- const t2 = has("esri-force-webgl");
- if (t2 === r2.WEBGL1 || t2 === r2.WEBGL2)
- return [t2];
- switch (e) {
- case "2d":
- return has("mac") && has("chrome") ? [r2.WEBGL1, r2.WEBGL2] : [r2.WEBGL2, r2.WEBGL1];
- case "3d":
- return [r2.WEBGL2, r2.WEBGL1];
- }
- }
- function i(e, r3, o2 = {}) {
- if (!window.WebGLRenderingContext)
- return l(e, a), null;
- const n2 = c(e, r3, o2);
- return t(n2) && l(e, s), n2;
- }
- function c(e, t2, o2 = {}) {
- const n2 = t2 === r2.WEBGL1 ? ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"] : ["webgl2"];
- let i2 = null;
- for (const r3 of n2) {
- try {
- i2 = e.getContext(r3, o2);
- } catch (c2) {
- }
- if (i2)
- break;
- }
- return i2;
- }
- function l(e, t2) {
- const r3 = e.parentNode;
- r3 && (r3.innerHTML = '<table style="background-color: #8CE; width: 100%; height: 100%;"><tr><td align="center"><div style="display: table-cell; vertical-align: middle;"><div style="">' + t2 + "</div></div></td></tr></table>");
- }
- !function(e) {
- e[e.WEBGL1 = 1] = "WEBGL1", e[e.WEBGL2 = 2] = "WEBGL2";
- }(r2 || (r2 = {}));
- var a = 'This page requires a browser that supports WebGL.<br/><a href="http://get.webgl.org">Click here to upgrade your browser.</a>';
- var s = `It doesn't appear your computer can support WebGL.<br/><a href="http://get.webgl.org/troubleshooting/">Click here for more information.</a>`;
- export {
- r2 as r,
- o,
- n,
- c
- };
- //# sourceMappingURL=chunk-RWQH5X3O.js.map
|