window.NewFiberMapConfig = class { static SDK_INIT_SRC_PREFIX = ''; static MAPBOX_TOKEN = "pk.eyJ1IjoibHVrYXNtYXJ0aW5lbGxpIiwiYSI6ImNpem85dmhwazAyajIyd284dGxhN2VxYnYifQ.HQCmyhEXZUTz3S98FMrVAQ"; static $import(e, t, o) { var a, l, i; e && "string" == typeof e && (a = e.substring(e.lastIndexOf(".") + 1)) && ["js", "css"].includes(a) && (i = (a = "js" == a) ? "script" : "link", l = document.getElementsByTagName("head")[0], (i = document.createElement(i)).type = a ? o || "text/javascript" : "text/css", i.charset = "UTF-8", a || (i.rel = "stylesheet"), (new Date).getTime(), i[a ? "src" : "href"] = (e.includes('http')?'':NewFiberMapConfig.SDK_INIT_SRC_PREFIX) + e, t && "function" == typeof t && (i.addEventListener ? i.addEventListener("load", function () { t.call() }, !1) : i.attachEvent && i.attachEvent("onreadystatechange", function () { "complete" == window.event.srcElement.readyState && t.call() })), l.appendChild(i)) } static getUrlParams = (e, t = "") => { let o = {}; return e.split("?")[1].split("&").forEach(e => { e = e.split("="); o[e[0]] = e[1] }), o[t] || o }; static setGlobalParams() { let e = null; for (var t of document.scripts) null !== t.getAttribute("newfiber") && (e = t.src); var o = e.split("?"); this.SDK_INIT_SRC_PREFIX = o[0].substring(0, o[0].lastIndexOf("/") + 1); } static init() { NewFiberMapConfig.$import("/libs/mapbox/mapbox-gl.css"); NewFiberMapConfig.$import("/libs/mapbox/mapbox-gl.js",()=>{ NewFiberMapConfig.$import("/libs/mapbox/extend/mapbox-extend.js"); ((window.__NEWFIBER || {}).callback) && ((window.__NEWFIBER || {}).callback)(); mapboxgl.accessToken = NewFiberMapConfig.MAPBOX_TOKEN; window.mapboxgl1 = mapboxgl; NewFiberMapConfig.$import("/libs/other/l7.js",()=> window.mapboxL7 = window.L7); NewFiberMapConfig.$import("/libs/other/gcoord.global.prod.js"); NewFiberMapConfig.$import("/libs/other/deck.gl.min.js"); NewFiberMapConfig.$import("/libs/other/lodash.js"); NewFiberMapConfig.$import("/libs/other/plotty.min.js"); NewFiberMapConfig.$import("/libs/other/terraformer.js"); NewFiberMapConfig.$import("/libs/other/tiff.min.js"); NewFiberMapConfig.$import("/libs/other/turf.min.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/AnimateGIF.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/CanvasLayer.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/mapbox-gl-contextmenu.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/mapbox-gl-draw.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/MeatureTool.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/RainfallEffect.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/RainsLayer.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/TrackLayer.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/WMSLayer.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/WMTSLayer.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/XYZLayer.js"); NewFiberMapConfig.$import("/libs/mapbox/extend/XYZLayer1.js"); }) } }; NewFiberMapConfig.setGlobalParams(),NewFiberMapConfig.init();