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ACT,IACf,EAAO,EAGlB,EAEA,KAAM,SAAS,GAEd,IAEC,EACA,EAHG,EAAY,KAAK,gBAAgB,KAAK,QAAS,GAClD,EAAW,KAAK,QAAQ,QAAQ,GAKjC,OAAI,IAAU,EACN,OAEU,IAAd,GACK,KAGT,EAAW,EAAW,OAEJ,KADlB,EAAY,KAAK,QAAQ,IAEjB,KAGA,EAAQ,IADJ,EAAY,GACiB,EAC1C,EAEA,SAAU,EAAE,IAAI,MAAM,SAEtB,EAAG,EAAE,IAAI,MAAM,EAGf,gBAAiB,SAAS,EAAO,GAEhC,IADA,IAAI,EACK,EAAI,EAAM,OAAQ,KACtB,EAAM,IAAM,SAAoB,IAAR,GAAqB,EAAM,EAAM,MAC5D,EAAM,EAAM,IAGd,OAAO,CACR,IAEM,EAAE,IACV","file":"/npm/@dev-linfeng/proj4leaflet-modif@1.0.0/proj4leaflet.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@dev-linfeng/proj4leaflet-modif@1.0.0/proj4leaflet.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function (factory) {\r\n\tvar L, proj4;\r\n\tif (typeof define === 'function' && define.amd) {\r\n\t\t// AMD\r\n\t\tdefine(['leaflet', 'proj4'], factory);\r\n\t} else if (typeof module === 'object' && typeof module.exports === \"object\") {\r\n\t\t// Node/CommonJS\r\n\t\tL = require('leaflet');\r\n\t\tproj4 = require('proj4');\r\n\t\tmodule.exports = factory(L, proj4);\r\n\t} else {\r\n\t\t// Browser globals\r\n\t\tif (typeof window.L === 'undefined' || typeof window.proj4 === 'undefined')\r\n\t\t\tthrow 'Leaflet and proj4 must be loaded first';\r\n\t\tfactory(window.L, window.proj4);\r\n\t}\r\n}(function (L, proj4) {\r\n\tif (proj4.__esModule && proj4.default) {\r\n\t\t// If proj4 was bundled as an ES6 module, unwrap it to get\r\n\t\t// to the actual main proj4 object.\r\n\t\t// See discussion in https://github.com/kartena/Proj4Leaflet/pull/147\r\n\t\tproj4 = proj4.default;\r\n\t}\r\n \r\n\tL.Proj = {};\r\n\r\n\tL.Proj._isProj4Obj = function(a) {\r\n\t\treturn (typeof a.inverse !== 'undefined' &&\r\n\t\t\ttypeof a.forward !== 'undefined');\r\n\t};\r\n\r\n\tL.Proj.Projection = L.Class.extend({\r\n\t\tinitialize: function(code, def, bounds) {\r\n\t\t\tvar isP4 = L.Proj._isProj4Obj(code);\r\n\t\t\tthis._proj = isP4 ? code : this._projFromCodeDef(code, def);\r\n\t\t\tthis.bounds = isP4 ? def : bounds;\r\n\t\t},\r\n\r\n\t\tproject: function (latlng) {\r\n\t\t\tvar point = this._proj.forward([latlng.lng, latlng.lat]);\r\n\t\t\treturn new L.Point(point[0], point[1]);\r\n\t\t},\r\n\r\n\t\tunproject: function (point, unbounded) {\r\n\t\t\tvar point2 = this._proj.inverse([point.x, point.y]);\r\n\t\t\treturn new L.LatLng(point2[1], point2[0], unbounded);\r\n\t\t},\r\n\r\n\t\t_projFromCodeDef: function(code, def) {\r\n\t\t\tif (def) {\r\n\t\t\t\tproj4.defs(code, def);\r\n\t\t\t} else if (proj4.defs[code] === undefined) {\r\n\t\t\t\tvar urn = code.split(':');\r\n\t\t\t\tif (urn.length > 3) {\r\n\t\t\t\t\tcode = urn[urn.length - 3] + ':' + urn[urn.length - 1];\r\n\t\t\t\t}\r\n\t\t\t\tif (proj4.defs[code] === undefined) {\r\n\t\t\t\t\tthrow 'No projection definition for code ' + code;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn proj4(code);\r\n\t\t}\r\n\t});\r\n\r\n\tL.Proj.CRS = L.Class.extend({\r\n\t\tincludes: L.CRS,\r\n\r\n\t\toptions: {\r\n\t\t\ttransformation: new L.Transformation(1, 0, -1, 0)\r\n\t\t},\r\n\r\n\t\tinitialize: function(a, b, c) {\r\n\t\t\tvar code,\r\n\t\t\t    proj,\r\n\t\t\t    def,\r\n\t\t\t    options;\r\n\r\n\t\t\tif (L.Proj._isProj4Obj(a)) {\r\n\t\t\t\tproj = a;\r\n\t\t\t\tcode = proj.srsCode;\r\n\t\t\t\toptions = b || {};\r\n\r\n\t\t\t\tthis.projection = new L.Proj.Projection(proj, options.bounds);\r\n\t\t\t} else {\r\n\t\t\t\tcode = a;\r\n\t\t\t\tdef = b;\r\n\t\t\t\toptions = c || {};\r\n\t\t\t\tthis.projection = new L.Proj.Projection(code, def, options.bounds);\r\n\t\t\t}\r\n\r\n\t\t\tL.Util.setOptions(this, options);\r\n\t\t\tthis.code = code;\r\n\t\t\tthis.transformation = this.options.transformation;\r\n\r\n\t\t\tif (this.options.scales) {\r\n\t\t\t\tthis._scales = this.options.scales;\r\n\t\t\t} else if (this.options.resolutions) {\r\n\t\t\t\tthis._scales = [];\r\n\t\t\t\tfor (var i = this.options.resolutions.length - 1; i >= 0; i--) {\r\n\t\t\t\t\tif (this.options.resolutions[i].resolution) {\r\n\t\t\t\t\t\tthis._scales[i] = 1 / this.options.resolutions[i].resolution;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.infinite = !this.options.bounds;\r\n\t\t},\r\n\r\n\t\tscale: function(zoom) {\r\n\t\t\tthis.transformation = new L.Transformation(1, -this.options.resolutions[zoom].origin[0], \r\n\t\t\t\t-1, this.options.resolutions[zoom].origin[1]);\r\n\t\t  var iZoom = Math.floor(zoom),\r\n\t\t\tbaseScale,\r\n\t\t\tnextScale,\r\n\t\t\tscaleDiff,\r\n\t\t\tzDiff;\r\n\t\t\tif (zoom === iZoom) {\r\n\t\t\t\treturn this._scales[zoom];\r\n\t\t\t} else {\r\n\t\t\t\t// Non-integer zoom, interpolate\r\n\t\t\t\tbaseScale = this._scales[iZoom];\r\n\t\t\t\tnextScale = this._scales[iZoom + 1];\r\n\t\t\t\tscaleDiff = nextScale - baseScale;\r\n\t\t\t\tzDiff = (zoom - iZoom);\r\n\t\t\t\treturn baseScale + scaleDiff * zDiff;\r\n\t\t\t}\r\n\t\t},\r\n\t\t\r\n\t\tzoom: function(scale) {\r\n\t\t\t// Find closest number in this._scales, down\r\n\t\t\tvar downScale = this._closestElement(this._scales, scale),\r\n\t\t\t\tdownZoom = this._scales.indexOf(downScale),\r\n\t\t\t\tnextScale,\r\n\t\t\t\tnextZoom,\r\n\t\t\t\tscaleDiff;\r\n\t\t\t// Check if scale is downScale => return array index\r\n\t\t\tif (scale === downScale) {\r\n\t\t\t\treturn downZoom;\r\n\t\t\t}\r\n\t\t\tif (downScale === undefined) {\r\n\t\t\t\treturn -Infinity;\r\n\t\t\t}\r\n\t\t\t// Interpolate\r\n\t\t\tnextZoom = downZoom + 1;\r\n\t\t\tnextScale = this._scales[nextZoom];\r\n\t\t\tif (nextScale === undefined) {\r\n\t\t\t\treturn Infinity;\r\n\t\t\t}\r\n\t\t\tscaleDiff = nextScale - downScale;\r\n\t\t\treturn (scale - downScale) / scaleDiff + downZoom;\r\n\t\t},\r\n\r\n\t\tdistance: L.CRS.Earth.distance,\r\n\r\n\t\tR: L.CRS.Earth.R,\r\n\r\n\t\t/* Get the closest lowest element in an array */\r\n\t\t_closestElement: function(array, element) {\r\n\t\t\tvar low;\r\n\t\t\tfor (var i = array.length; i--;) {\r\n\t\t\t\tif (array[i] <= element && (low === undefined || low < array[i])) {\r\n\t\t\t\t\tlow = array[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn low;\r\n\t\t}\r\n\t});\r\n\treturn L.Proj;\r\n}));\r\n"]}