diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx index 9e115dfaac7..728c8ad4348 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx +++ b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx @@ -23,6 +23,7 @@ import { ThemeProvider } from '@apache-superset/core/theme'; import { supersetTheme } from '@apache-superset/core/theme'; import MatrixifyGridRenderer from './MatrixifyGridRenderer'; import { generateMatrixifyGrid } from './MatrixifyGridGenerator'; +import { Mock } from 'vitest'; // Mock the MatrixifyGridGenerator vi.mock('./MatrixifyGridGenerator', () => ({ @@ -37,7 +38,7 @@ vi.mock('./MatrixifyGridCell', () => ), ); -const mockGenerateMatrixifyGrid = generateMatrixifyGrid as vi.MockedFunction< +const mockGenerateMatrixifyGrid = generateMatrixifyGrid as Mock< typeof generateMatrixifyGrid >; diff --git a/superset-frontend/packages/superset-ui-core/src/chart/types/matrixify.mocks.ts b/superset-frontend/packages/superset-ui-core/src/chart/types/matrixify.mocks.ts index e829d0d463e..c0d5f47e9b5 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/types/matrixify.mocks.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/types/matrixify.mocks.ts @@ -17,6 +17,6 @@ * under the License. */ -export const isMatrixifyEnabled = jest.fn(() => false); +export const isMatrixifyEnabled = vi.fn(() => false); -export const MatrixifyGridRenderer = jest.fn(() => null); +export const MatrixifyGridRenderer = vi.fn(() => null); diff --git a/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/useJsonValidation.test.ts b/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/useJsonValidation.test.ts index e9179b4ce70..22d45c64bfd 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/useJsonValidation.test.ts +++ b/superset-frontend/packages/superset-ui-core/src/components/AsyncAceEditor/useJsonValidation.test.ts @@ -74,7 +74,7 @@ describe('useJsonValidation', () => { }); test('falls back to "syntax error" when thrown error has no message (line 59 || branch)', () => { - const spy = jest.spyOn(JSON, 'parse').mockImplementationOnce(() => { + const spy = vi.spyOn(JSON, 'parse').mockImplementationOnce(() => { throw {}; // no .message property → error.message is undefined → falsy }); @@ -86,7 +86,7 @@ describe('useJsonValidation', () => { }); test('extracts row and column from error when message contains (line X column Y)', () => { - const spy = jest.spyOn(JSON, 'parse').mockImplementationOnce(() => { + const spy = vi.spyOn(JSON, 'parse').mockImplementationOnce(() => { throw new SyntaxError('Unexpected token (line 3 column 5)'); }); diff --git a/superset-frontend/packages/superset-ui-core/src/components/Table/utils/InteractiveTableUtils.test.ts b/superset-frontend/packages/superset-ui-core/src/components/Table/utils/InteractiveTableUtils.test.ts index 827a87a6007..0df43238dd3 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/Table/utils/InteractiveTableUtils.test.ts +++ b/superset-frontend/packages/superset-ui-core/src/components/Table/utils/InteractiveTableUtils.test.ts @@ -45,7 +45,7 @@ afterEach(() => { test('constructor initializes with correct defaults', () => { const table = createMockTable(); - const setDerivedColumns = jest.fn(); + const setDerivedColumns = vi.fn(); const utils = new InteractiveTableUtils( table, mockColumns, @@ -62,7 +62,7 @@ test('constructor initializes with correct defaults', () => { test('setTableRef updates tableRef', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const newTable = createMockTable(); utils.setTableRef(newTable); expect(utils.tableRef).toBe(newTable); @@ -70,14 +70,14 @@ test('setTableRef updates tableRef', () => { test('getColumnIndex returns -1 when columnRef has no parent', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); utils.columnRef = null; expect(utils.getColumnIndex()).toBe(-1); }); test('getColumnIndex returns correct index when columnRef is in a row', () => { const table = createMockTable(3); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const row = table.rows[0]; utils.columnRef = row.cells[1] as unknown as typeof utils.columnRef; expect(utils.getColumnIndex()).toBe(1); @@ -85,15 +85,15 @@ test('getColumnIndex returns correct index when columnRef is in a row', () => { test('allowDrop calls preventDefault on the event', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); - const event = { preventDefault: jest.fn() } as unknown as DragEvent; + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); + const event = { preventDefault: vi.fn() } as unknown as DragEvent; utils.allowDrop(event); expect(event.preventDefault).toHaveBeenCalledTimes(1); }); test('handleMouseup clears mouseDown and resets dragging state', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const th = document.createElement('th') as unknown as typeof utils.columnRef; utils.columnRef = th; (th as any).mouseDown = true; @@ -107,7 +107,7 @@ test('handleMouseup clears mouseDown and resets dragging state', () => { test('handleMouseup works when columnRef is null', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); utils.columnRef = null; utils.isDragging = true; @@ -118,7 +118,7 @@ test('handleMouseup works when columnRef is null', () => { test('handleMouseDown sets mouseDown and oldX when within resize range', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const target = document.createElement('th') as any; Object.defineProperty(target, 'offsetWidth', { value: 100, @@ -141,7 +141,7 @@ test('handleMouseDown sets mouseDown and oldX when within resize range', () => { test('handleMouseDown sets draggable when outside resize range and reorderable', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); utils.reorderable = true; const target = document.createElement('th') as any; @@ -163,9 +163,9 @@ test('handleMouseDown sets draggable when outside resize range and reorderable', test('initializeResizableColumns adds event listeners when resizable is true', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const cell = table.rows[0].cells[0]; - const addEventSpy = jest.spyOn(cell, 'addEventListener'); + const addEventSpy = vi.spyOn(cell, 'addEventListener'); utils.initializeResizableColumns(true, table); @@ -180,9 +180,9 @@ test('initializeResizableColumns adds event listeners when resizable is true', ( test('initializeResizableColumns removes event listeners when resizable is false', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const cell = table.rows[0].cells[0]; - const removeEventSpy = jest.spyOn(cell, 'removeEventListener'); + const removeEventSpy = vi.spyOn(cell, 'removeEventListener'); utils.initializeResizableColumns(false, table); @@ -200,9 +200,9 @@ test('initializeResizableColumns removes event listeners when resizable is false test('initializeDragDropColumns adds event listeners when reorderable is true', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const cell = table.rows[0].cells[0]; - const addEventSpy = jest.spyOn(cell, 'addEventListener'); + const addEventSpy = vi.spyOn(cell, 'addEventListener'); utils.initializeDragDropColumns(true, table); @@ -216,9 +216,9 @@ test('initializeDragDropColumns adds event listeners when reorderable is true', test('initializeDragDropColumns removes event listeners when reorderable is false', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const cell = table.rows[0].cells[0]; - const removeEventSpy = jest.spyOn(cell, 'removeEventListener'); + const removeEventSpy = vi.spyOn(cell, 'removeEventListener'); utils.initializeDragDropColumns(false, table); @@ -232,11 +232,11 @@ test('initializeDragDropColumns removes event listeners when reorderable is fals test('handleColumnDragStart sets isDragging and calls setData', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const row = table.rows[0]; const target = row.cells[0] as any; - const setDataMock = jest.fn(); + const setDataMock = vi.fn(); const event = { currentTarget: target, dataTransfer: { setData: setDataMock }, @@ -253,7 +253,7 @@ test('handleColumnDragStart sets isDragging and calls setData', () => { test('handleDragDrop reorders columns when valid drag data exists', () => { const table = createMockTable(2); - const setDerivedColumns = jest.fn(); + const setDerivedColumns = vi.fn(); const utils = new InteractiveTableUtils( table, mockColumns, @@ -268,8 +268,8 @@ test('handleDragDrop reorders columns when valid drag data exists', () => { const dropTarget = row.cells[1]; const event = { currentTarget: dropTarget, - dataTransfer: { getData: jest.fn().mockReturnValue(dragData) }, - preventDefault: jest.fn(), + dataTransfer: { getData: vi.fn().mockReturnValue(dragData) }, + preventDefault: vi.fn(), } as unknown as DragEvent; utils.handleDragDrop(event); @@ -280,7 +280,7 @@ test('handleDragDrop reorders columns when valid drag data exists', () => { test('handleDragDrop does nothing when no drag data', () => { const table = createMockTable(2); - const setDerivedColumns = jest.fn(); + const setDerivedColumns = vi.fn(); const utils = new InteractiveTableUtils( table, mockColumns, @@ -290,8 +290,8 @@ test('handleDragDrop does nothing when no drag data', () => { const row = table.rows[0]; const event = { currentTarget: row.cells[0], - dataTransfer: { getData: jest.fn().mockReturnValue('') }, - preventDefault: jest.fn(), + dataTransfer: { getData: vi.fn().mockReturnValue('') }, + preventDefault: vi.fn(), } as unknown as DragEvent; utils.handleDragDrop(event); @@ -302,7 +302,7 @@ test('handleDragDrop does nothing when no drag data', () => { test('handleMouseMove updates cursor to col-resize when within resize range', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); utils.resizable = true; const target = document.createElement('th') as any; @@ -325,7 +325,7 @@ test('handleMouseMove updates cursor to col-resize when within resize range', () test('handleMouseMove sets default cursor when outside resize range', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); utils.resizable = true; const target = document.createElement('th') as any; @@ -348,7 +348,7 @@ test('handleMouseMove sets default cursor when outside resize range', () => { test('handleMouseMove resizes column when mouseDown and within bounds', () => { const table = createMockTable(2); - const setDerivedColumns = jest.fn(); + const setDerivedColumns = vi.fn(); const utils = new InteractiveTableUtils( table, mockColumns, @@ -384,7 +384,7 @@ test('handleMouseMove resizes column when mouseDown and within bounds', () => { test('handleMouseMove skips resize when not resizable', () => { const table = createMockTable(2); - const setDerivedColumns = jest.fn(); + const setDerivedColumns = vi.fn(); const utils = new InteractiveTableUtils( table, mockColumns, @@ -406,7 +406,7 @@ test('handleMouseMove skips resize when not resizable', () => { test('handleMouseMove handles negative diff by keeping original width', () => { const table = createMockTable(2); - const setDerivedColumns = jest.fn(); + const setDerivedColumns = vi.fn(); const utils = new InteractiveTableUtils( table, mockColumns, @@ -442,11 +442,11 @@ test('handleMouseMove handles negative diff by keeping original width', () => { test('handleColumnDragStart does not set columnRef when currentTarget is null (line 82 false)', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const event = { currentTarget: null, - dataTransfer: { setData: jest.fn() }, + dataTransfer: { setData: vi.fn() }, } as unknown as DragEvent; utils.handleColumnDragStart(event); @@ -457,7 +457,7 @@ test('handleColumnDragStart does not set columnRef when currentTarget is null (l test('handleMouseDown does nothing when currentTarget is null (line 118 false)', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); const event = { currentTarget: null, @@ -472,7 +472,7 @@ test('handleMouseDown does nothing when currentTarget is null (line 118 false)', test('handleMouseDown does nothing to draggable when outside resize range and not reorderable (line 132 false)', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); utils.reorderable = false; const target = document.createElement('th') as any; @@ -494,7 +494,7 @@ test('handleMouseDown does nothing to draggable when outside resize range and no test('handleMouseMove skips column update when getColumnIndex returns NaN (line 162 false)', () => { const table = createMockTable(2); - const setDerivedColumns = jest.fn(); + const setDerivedColumns = vi.fn(); const utils = new InteractiveTableUtils( table, mockColumns, @@ -509,7 +509,7 @@ test('handleMouseMove skips column update when getColumnIndex returns NaN (line col.oldX = 50; utils.columnRef = col; - jest.spyOn(utils, 'getColumnIndex').mockReturnValueOnce(NaN); + vi.spyOn(utils, 'getColumnIndex').mockReturnValueOnce(NaN); const target = document.createElement('th') as any; Object.defineProperty(target, 'offsetWidth', { @@ -531,7 +531,7 @@ test('handleMouseMove skips column update when getColumnIndex returns NaN (line test('initializeResizableColumns does nothing when table is null (lines 182-187 false)', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); expect(() => utils.initializeResizableColumns(true, null)).not.toThrow(); expect(utils.tableRef).toBeNull(); @@ -539,7 +539,7 @@ test('initializeResizableColumns does nothing when table is null (lines 182-187 test('initializeResizableColumns uses default resizable=false when first arg is undefined (line 182 default branch)', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); utils.initializeResizableColumns(undefined, table); @@ -548,7 +548,7 @@ test('initializeResizableColumns uses default resizable=false when first arg is test('initializeDragDropColumns does nothing when table is null (lines 206-211 false)', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); expect(() => utils.initializeDragDropColumns(true, null)).not.toThrow(); expect(utils.tableRef).toBeNull(); @@ -556,7 +556,7 @@ test('initializeDragDropColumns does nothing when table is null (lines 206-211 f test('initializeDragDropColumns uses default reorderable=false when first arg is undefined (line 206 default branch)', () => { const table = createMockTable(2); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); utils.initializeDragDropColumns(undefined, table); @@ -565,8 +565,8 @@ test('initializeDragDropColumns uses default reorderable=false when first arg is test('clearListeners removes document mouseup listener', () => { const table = createMockTable(); - const utils = new InteractiveTableUtils(table, mockColumns, jest.fn()); - const removeEventSpy = jest.spyOn(document, 'removeEventListener'); + const utils = new InteractiveTableUtils(table, mockColumns, vi.fn()); + const removeEventSpy = vi.spyOn(document, 'removeEventListener'); utils.clearListeners(); diff --git a/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/setupAGGridModules.test.ts b/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/setupAGGridModules.test.ts index 57a3f2a7d46..fa31a2f8b0c 100644 --- a/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/setupAGGridModules.test.ts +++ b/superset-frontend/packages/superset-ui-core/src/components/ThemedAgGridReact/setupAGGridModules.test.ts @@ -18,6 +18,7 @@ */ import { ModuleRegistry } from 'ag-grid-community'; import { setupAGGridModules, defaultModules } from './setupAGGridModules'; +import { Mock } from 'vitest'; vi.mock('ag-grid-community', () => ({ ModuleRegistry: { @@ -88,7 +89,7 @@ test('setupAGGridModules registers default + additional modules when provided', expect(ModuleRegistry.registerModules).toHaveBeenCalledTimes(1); - const registeredModules = (ModuleRegistry.registerModules as vi.Mock).mock + const registeredModules = (ModuleRegistry.registerModules as Mock).mock .calls[0][0]; // Should contain all default modules diff --git a/superset-frontend/packages/superset-ui-core/src/utils/withLabel.test.ts b/superset-frontend/packages/superset-ui-core/src/utils/withLabel.test.ts index 67e51eb2c93..5fff712430f 100644 --- a/superset-frontend/packages/superset-ui-core/src/utils/withLabel.test.ts +++ b/superset-frontend/packages/superset-ui-core/src/utils/withLabel.test.ts @@ -32,7 +32,7 @@ test('withLabel prepends label to validator error message', () => { }); test('withLabel passes value and state to underlying validator', () => { - const validator = jest.fn(() => false as false); + const validator = vi.fn(() => false as false); const labeled = withLabel(validator, 'Field'); labeled('value', { someState: true }); expect(validator).toHaveBeenCalledWith('value', { someState: true }); diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/ChartDataProvider.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/ChartDataProvider.test.tsx index d2f9da03aab..1a7df99adc2 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/ChartDataProvider.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/ChartDataProvider.test.tsx @@ -18,23 +18,11 @@ */ import '@testing-library/jest-dom'; import { render, screen, act } from '@testing-library/react'; -import ChartClient from '../../../src/chart/clients/ChartClient'; import ChartDataProvider, { ChartDataProviderProps, } from '../../../src/chart/components/ChartDataProvider'; import { bigNumberFormData } from '../fixtures/formData'; -// Keep existing mock setup -const defaultMockLoadFormData = vi.fn(({ formData }: { formData: unknown }) => - Promise.resolve(formData), -); - -type MockLoadFormData = - | typeof defaultMockLoadFormData - | vi.Mock, unknown[]>; - -let mockLoadFormData: MockLoadFormData = defaultMockLoadFormData; - function createPromise(input: T) { return Promise.resolve(input); } @@ -43,24 +31,34 @@ function createArrayPromise(input: T) { return Promise.resolve([input]); } -const mockLoadDatasource = vi.fn, unknown[]>(createPromise); -const mockLoadQueryData = vi.fn, unknown[]>( - createArrayPromise, +const { mockLoadDatasource, mockLoadQueryData, mockLoadFormData } = vi.hoisted( + () => ({ + mockLoadDatasource: vi.fn().mockImplementation(createPromise), + mockLoadQueryData: vi.fn().mockImplementation(createArrayPromise), + mockLoadFormData: vi.fn(({ formData }: { formData: unknown }) => + Promise.resolve(formData), + ), + }), ); -const actual = vi.requireActual('../../../src/chart/clients/ChartClient'); -vi.spyOn(actual, 'default').mockImplementation(() => ({ - loadDatasource: mockLoadDatasource, - loadFormData: mockLoadFormData, - loadQueryData: mockLoadQueryData, -})); - -const ChartClientMock = ChartClient as vi.Mock; +vi.mock('../../../src/chart/clients/ChartClient', async importActual => { + const actual = (await importActual()) as Record; + return { + ...actual, + default: function () { + return { + ...actual.default, + loadDatasource: mockLoadDatasource, + loadFormData: mockLoadFormData, + loadQueryData: mockLoadQueryData, + }; + }, + }; +}); describe('ChartDataProvider', () => { beforeEach(() => { - ChartClientMock.mockClear(); - mockLoadFormData = defaultMockLoadFormData; + mockLoadFormData.mockClear(); mockLoadFormData.mockClear(); mockLoadDatasource.mockClear(); mockLoadQueryData.mockClear(); @@ -81,11 +79,6 @@ describe('ChartDataProvider', () => { return render(); } - test('instantiates a new ChartClient()', () => { - setup(); - expect(ChartClientMock).toHaveBeenCalledTimes(1); - }); - describe('ChartClient.loadFormData', () => { test('calls method on mount', () => { setup(); @@ -100,7 +93,7 @@ describe('ChartDataProvider', () => { const options = { host: 'override' }; setup({ formDataRequestOptions: options }); expect(mockLoadFormData).toHaveBeenCalledTimes(1); - expect(mockLoadFormData.mock.calls[0][1]).toEqual(options); + expect((mockLoadFormData.mock.calls[0] as any[])[1]).toEqual(options); }); test('calls ChartClient.loadFormData when formData or sliceId change', async () => { diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChart.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChart.test.tsx index 4743d5bbc65..02a3dffdfd5 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChart.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChart.test.tsx @@ -19,7 +19,6 @@ import '@testing-library/jest-dom'; import { render, screen } from '@superset-ui/core/spec'; -import mockConsole, { RestoreConsole } from 'jest-mock-console'; import { triggerResizeObserver } from 'resize-observer-polyfill'; import { ErrorBoundary } from 'react-error-boundary'; @@ -34,6 +33,7 @@ import { import { isMatrixifyEnabled } from '../../../src/chart/types/matrixify'; import MatrixifyGridRenderer from '../../../src/chart/components/Matrixify/MatrixifyGridRenderer'; +import { Mock } from 'vitest'; // Mock Matrixify imports vi.mock('../../../src/chart/types/matrixify', () => ({ @@ -65,8 +65,6 @@ function getDimensionText(container: HTMLElement) { describe('SuperChart', () => { vi.setConfig({ testTimeout: 5000 }); - let restoreConsole: RestoreConsole; - const plugins = [ new DiligentChartPlugin().configure({ key: ChartKeys.DILIGENT }), new BuggyChartPlugin().configure({ key: ChartKeys.BUGGY }), @@ -78,15 +76,6 @@ describe('SuperChart', () => { }); }); - beforeEach(() => { - restoreConsole = mockConsole(); - triggerResizeObserver([]); // Reset any pending resize observers - }); - - afterEach(() => { - restoreConsole(); - }); - describe('includes ErrorBoundary', () => { let expectedErrors = 0; let actualErrors = 0; @@ -458,11 +447,12 @@ describe('SuperChart', () => { }); test('should render MatrixifyGridRenderer when matrixify is enabled with empty data', () => { - const mockIsMatrixifyEnabled = isMatrixifyEnabled as vi.MockedFunction< + const mockIsMatrixifyEnabled = isMatrixifyEnabled as Mock< typeof isMatrixifyEnabled >; - const mockMatrixifyGridRenderer = - MatrixifyGridRenderer as vi.MockedFunction; + const mockMatrixifyGridRenderer = MatrixifyGridRenderer as Mock< + typeof MatrixifyGridRenderer + >; mockIsMatrixifyEnabled.mockReturnValue(true); @@ -481,11 +471,12 @@ describe('SuperChart', () => { }); test('should render MatrixifyGridRenderer when matrixify is enabled with null data', () => { - const mockIsMatrixifyEnabled = isMatrixifyEnabled as vi.MockedFunction< + const mockIsMatrixifyEnabled = isMatrixifyEnabled as Mock< typeof isMatrixifyEnabled >; - const mockMatrixifyGridRenderer = - MatrixifyGridRenderer as vi.MockedFunction; + const mockMatrixifyGridRenderer = MatrixifyGridRenderer as Mock< + typeof MatrixifyGridRenderer + >; mockIsMatrixifyEnabled.mockReturnValue(true); @@ -504,11 +495,12 @@ describe('SuperChart', () => { }); test('should ignore custom noResults component when matrixify is enabled', () => { - const mockIsMatrixifyEnabled = isMatrixifyEnabled as vi.MockedFunction< + const mockIsMatrixifyEnabled = isMatrixifyEnabled as Mock< typeof isMatrixifyEnabled >; - const mockMatrixifyGridRenderer = - MatrixifyGridRenderer as vi.MockedFunction; + const mockMatrixifyGridRenderer = MatrixifyGridRenderer as Mock< + typeof MatrixifyGridRenderer + >; mockIsMatrixifyEnabled.mockReturnValue(true); @@ -532,11 +524,12 @@ describe('SuperChart', () => { }); test('should apply error boundary to matrixify grid renderer', () => { - const mockIsMatrixifyEnabled = isMatrixifyEnabled as vi.MockedFunction< + const mockIsMatrixifyEnabled = isMatrixifyEnabled as Mock< typeof isMatrixifyEnabled >; - const mockMatrixifyGridRenderer = - MatrixifyGridRenderer as vi.MockedFunction; + const mockMatrixifyGridRenderer = MatrixifyGridRenderer as Mock< + typeof MatrixifyGridRenderer + >; mockIsMatrixifyEnabled.mockReturnValue(true); const onErrorBoundary = vi.fn(); diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx index 0c3bc4dc2cd..311bcf60157 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/SuperChartCore.test.tsx @@ -18,7 +18,6 @@ */ import '@testing-library/jest-dom'; -import mockConsole, { RestoreConsole } from 'jest-mock-console'; import { ChartProps } from '@superset-ui/core'; import { supersetTheme } from '@apache-superset/core/theme'; import { render, screen, waitFor } from '@superset-ui/core/spec'; @@ -38,8 +37,6 @@ describe('SuperChartCore', () => { new SlowChartPlugin().configure({ key: ChartKeys.SLOW }), ]; - let restoreConsole: RestoreConsole; - beforeAll(() => { vi.setConfig({ testTimeout: 30000 }); plugins.forEach(p => { @@ -53,14 +50,6 @@ describe('SuperChartCore', () => { }); }); - beforeEach(() => { - restoreConsole = mockConsole(); - }); - - afterEach(() => { - restoreConsole(); - }); - describe('registered charts', () => { test('renders registered chart', async () => { const { container } = render( diff --git a/superset-frontend/packages/superset-ui-core/test/chart/components/createLoadableRenderer.test.tsx b/superset-frontend/packages/superset-ui-core/test/chart/components/createLoadableRenderer.test.tsx index 1e7086f1f2f..f9369a7798e 100644 --- a/superset-frontend/packages/superset-ui-core/test/chart/components/createLoadableRenderer.test.tsx +++ b/superset-frontend/packages/superset-ui-core/test/chart/components/createLoadableRenderer.test.tsx @@ -19,7 +19,6 @@ import '@testing-library/jest-dom'; import { ComponentType } from 'react'; -import mockConsole, { RestoreConsole } from 'jest-mock-console'; import { render as renderTestComponent, screen } from '@testing-library/react'; import createLoadableRenderer, { LoadableRenderer as LoadableRendererType, @@ -33,10 +32,8 @@ describe('createLoadableRenderer', () => { let render: (loaded: { Chart: ComponentType }) => JSX.Element; let loading: () => JSX.Element; let LoadableRenderer: LoadableRendererType<{}>; - let restoreConsole: RestoreConsole; beforeEach(() => { - restoreConsole = mockConsole(); loadChartSuccess = vi.fn(() => Promise.resolve(TestComponent)); render = vi.fn(loaded => { const { Chart } = loaded; @@ -54,10 +51,6 @@ describe('createLoadableRenderer', () => { }); }); - afterEach(() => { - restoreConsole(); - }); - describe('returns a LoadableRenderer class', () => { test('LoadableRenderer.preload() preloads the lazy-load components', () => { expect(LoadableRenderer.preload).toBeInstanceOf(Function); diff --git a/superset-frontend/packages/superset-ui-core/test/currency-format/CurrencyFormatter.test.ts b/superset-frontend/packages/superset-ui-core/test/currency-format/CurrencyFormatter.test.ts index 1b27d0d0d7a..a98c5c5a960 100644 --- a/superset-frontend/packages/superset-ui-core/test/currency-format/CurrencyFormatter.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/currency-format/CurrencyFormatter.test.ts @@ -233,7 +233,7 @@ test('CurrencyFormatter AUTO mode returns plain value when getCurrencySymbol ret const OrigNumberFormat = Intl.NumberFormat; // Return formatToParts without a 'currency' entry so getCurrencySymbol → undefined - Intl.NumberFormat = jest.fn().mockImplementation(() => ({ + Intl.NumberFormat = vi.fn().mockImplementation(() => ({ formatToParts: () => [{ type: 'integer', value: '1' }], })) as unknown as typeof Intl.NumberFormat; @@ -254,7 +254,7 @@ test('CurrencyFormatter AUTO mode falls back to plain value when getCurrencySymb // Mock Intl.NumberFormat to throw to simulate an environment where the // currency code is rejected, triggering the catch block in format() const OrigNumberFormat = Intl.NumberFormat; - Intl.NumberFormat = jest.fn().mockImplementation(() => { + Intl.NumberFormat = vi.fn().mockImplementation(() => { throw new RangeError('Invalid currency code'); }) as unknown as typeof Intl.NumberFormat; diff --git a/superset-frontend/packages/superset-ui-core/test/models/Registry.test.ts b/superset-frontend/packages/superset-ui-core/test/models/Registry.test.ts index ac4139cb9a2..77097b5d649 100644 --- a/superset-frontend/packages/superset-ui-core/test/models/Registry.test.ts +++ b/superset-frontend/packages/superset-ui-core/test/models/Registry.test.ts @@ -17,12 +17,13 @@ * under the License. */ -/* eslint no-console: 0 */ -import mockConsole from 'jest-mock-console'; import { Registry, OverwritePolicy } from '@superset-ui/core'; const loader = () => 'testValue'; +const consoleWarnSpy = vi.spyOn(console, 'warn'); +const consoleErrorSpy = vi.spyOn(console, 'error'); + describe('Registry', () => { test('exists', () => { expect(Registry !== undefined).toBe(true); @@ -308,18 +309,18 @@ describe('Registry', () => { describe('=ALLOW', () => { describe('.registerValue(key, value)', () => { test('registers normally', () => { - const restoreConsole = mockConsole(); + // const restoreConsole = mockConsole(); const registry = new Registry(); registry.registerValue('a', 'testValue'); expect(() => registry.registerValue('a', 'testValue2')).not.toThrow(); expect(registry.get('a')).toEqual('testValue2'); expect(console.warn).not.toHaveBeenCalled(); - restoreConsole(); + // restoreConsole(); }); }); describe('.registerLoader(key, loader)', () => { test('registers normally', () => { - const restoreConsole = mockConsole(); + // const restoreConsole = mockConsole(); const registry = new Registry(); registry.registerLoader('a', () => 'testValue'); expect(() => @@ -327,14 +328,14 @@ describe('Registry', () => { ).not.toThrow(); expect(registry.get('a')).toEqual('testValue2'); expect(console.warn).not.toHaveBeenCalled(); - restoreConsole(); + // restoreConsole(); }); }); }); describe('=WARN', () => { describe('.registerValue(key, value)', () => { test('warns when overwrite', () => { - const restoreConsole = mockConsole(); + // const restoreConsole = mockConsole(); const registry = new Registry({ overwritePolicy: OverwritePolicy.Warn, }); @@ -342,12 +343,12 @@ describe('Registry', () => { expect(() => registry.registerValue('a', 'testValue2')).not.toThrow(); expect(registry.get('a')).toEqual('testValue2'); expect(console.warn).toHaveBeenCalled(); - restoreConsole(); + // restoreConsole(); }); }); describe('.registerLoader(key, loader)', () => { test('warns when overwrite', () => { - const restoreConsole = mockConsole(); + // const restoreConsole = mockConsole(); const registry = new Registry({ overwritePolicy: OverwritePolicy.Warn, }); @@ -357,7 +358,7 @@ describe('Registry', () => { ).not.toThrow(); expect(registry.get('a')).toEqual('testValue2'); expect(console.warn).toHaveBeenCalled(); - restoreConsole(); + // restoreConsole(); }); }); }); @@ -438,12 +439,12 @@ describe('Registry', () => { }); describe('with a broken listener', () => { - let restoreConsole: any; + // let restoreConsole: any; beforeEach(() => { - restoreConsole = mockConsole(); + // restoreConsole = mockConsole(); }); afterEach(() => { - restoreConsole(); + // restoreConsole(); }); test('keeps working', () => { diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/afghanistan.geojson b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/afghanistan.geojson index 9560cad8f21..c8bc29ba868 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/afghanistan.geojson +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/src/countries/afghanistan.geojson @@ -1,41 +1,10688 @@ { -"type": "FeatureCollection", -"name": "afghanistan", -"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, -"features": [ -{ "type": "Feature", "properties": { "ISO": "AF-BDS", "NAME_1": "Badakhshan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 74.794018189000099, 37.213931173000063 ], [ 74.737380819000123, 37.296122538000091 ], [ 74.721464477000097, 37.297776185000131 ], [ 74.623279256000103, 37.230803528000038 ], [ 74.589999634000094, 37.243360901000059 ], [ 74.500082642000052, 37.231630351000078 ], [ 74.456674439000039, 37.177318420000105 ], [ 74.368307740000034, 37.167060649000021 ], [ 74.382570434000115, 37.126572164000024 ], [ 74.476621541000043, 37.083138123000126 ], [ 74.547418254000092, 37.015674540000091 ], [ 74.537393026000075, 36.962241109000061 ], [ 74.52137333100012, 36.958494568000063 ], [ 74.456984497000121, 37.004383240000024 ], [ 74.394042603000116, 36.994022115000107 ], [ 74.235706015000119, 36.902167257000045 ], [ 74.12966597500008, 36.898420716000132 ], [ 74.094319295000105, 36.831241354000085 ], [ 74.035304809000138, 36.815583394000029 ], [ 73.946938110000133, 36.830879618000083 ], [ 73.865082642000118, 36.872582499000103 ], [ 73.772891887000071, 36.892012838000099 ], [ 73.331781861000081, 36.882090963000095 ], [ 73.267496379000136, 36.866536357000072 ], [ 73.191842082000051, 36.877026673000032 ], [ 73.042497192000098, 36.864262594000039 ], [ 72.990510702000051, 36.841576641000088 ], [ 72.945862264000141, 36.852221985000071 ], [ 72.867727498000136, 36.830414531000045 ], [ 72.6296024990001, 36.832946676000049 ], [ 72.516741170000046, 36.800597229000047 ], [ 72.454109334000123, 36.757964173000076 ], [ 72.16968225100004, 36.711352031 ], [ 72.149631796000108, 36.689337870000102 ], [ 72.171645956000077, 36.653629456000104 ], [ 72.059094686000094, 36.627119446 ], [ 72.038837525000076, 36.580455627000035 ], [ 71.977032511000118, 36.563040670000092 ], [ 71.874713176000114, 36.499065246000029 ], [ 71.773220662000142, 36.480048320000051 ], [ 71.794408, 36.407597962000082 ], [ 71.782625773000063, 36.396539205000053 ], [ 71.73632369000012, 36.395919088000099 ], [ 71.649300578000066, 36.452763163000057 ], [ 71.610439900000074, 36.45793080600005 ], [ 71.547187948000101, 36.371631165000096 ], [ 71.558350057000041, 36.327861227000099 ], [ 71.479078410000113, 36.300524394000078 ], [ 71.402752320000047, 36.231381327000079 ], [ 71.319139852000035, 36.200582174000104 ], [ 71.30208662900003, 36.163323467000097 ], [ 71.223073364000072, 36.125392965000103 ], [ 71.165919230000043, 36.045707906000032 ], [ 71.169913421866909, 36.03080174600376 ], [ 71.084633010005348, 35.941940822810693 ], [ 71.061947055612109, 35.854504298934216 ], [ 71.019779086835342, 35.799417222726618 ], [ 70.973218622341506, 35.775413520517532 ], [ 70.96887780076986, 35.739601752219073 ], [ 71.013681267876166, 35.699164944206814 ], [ 70.959989454749518, 35.642372544757109 ], [ 70.877927281219002, 35.625706894957204 ], [ 70.86614505355135, 35.600256252823783 ], [ 70.882733188985469, 35.516282050476207 ], [ 70.86443973210794, 35.484242662069164 ], [ 70.757676222579562, 35.488764349894836 ], [ 70.687241245287225, 35.537004299209002 ], [ 70.650757684319672, 35.510700995454556 ], [ 70.634789667409166, 35.46569082277324 ], [ 70.576912062341762, 35.442410590076634 ], [ 70.537948032675558, 35.458869534301527 ], [ 70.554691196841247, 35.56687327727991 ], [ 70.499449090103383, 35.622063707174334 ], [ 70.479450310883124, 35.666944687747105 ], [ 70.383848911398104, 35.698131415432442 ], [ 70.294035271610483, 35.660562648847133 ], [ 70.231196730045042, 35.670355333331941 ], [ 70.273364698821752, 35.850215156004651 ], [ 70.300546502618943, 35.879515693294593 ], [ 70.461776970730568, 35.970517889688836 ], [ 70.429014112811046, 36.037852281557548 ], [ 70.474799431848282, 36.149602566005569 ], [ 70.472473992780522, 36.283573716853539 ], [ 70.440641310847809, 36.303882555335633 ], [ 70.22401370636743, 36.327033595923695 ], [ 70.139626091970513, 36.404909980211414 ], [ 70.038443638363162, 36.462115789911763 ], [ 70.037358432745464, 36.515265001578541 ], [ 70.003820427570645, 36.61505219210494 ], [ 70.00661095643045, 36.922294420251262 ], [ 70.037358432745464, 36.941207993853823 ], [ 70.056427035978913, 36.979655260481877 ], [ 70.096166212900357, 36.996114202908132 ], [ 70.124123163053525, 37.042545477991382 ], [ 70.033017612972401, 37.135097967996785 ], [ 70.034412876053352, 37.188376369973469 ], [ 70.00428551556405, 37.276200466578246 ], [ 70.018289828612694, 37.359166978573171 ], [ 70.041699253417789, 37.387304795879629 ], [ 70.00506066281929, 37.407665310305788 ], [ 69.998549431810773, 37.530913601581403 ], [ 70.004187461582035, 37.551370518834347 ], [ 70.12913496900012, 37.532283834000069 ], [ 70.157867065000119, 37.541430562000031 ], [ 70.216468140000131, 37.617136536000103 ], [ 70.24830082200009, 37.623337708000079 ], [ 70.283079061000137, 37.704831442000042 ], [ 70.275120890000096, 37.774181213000091 ], [ 70.247163940000064, 37.8191655480001 ], [ 70.196004273000085, 37.839913636000048 ], [ 70.16520511900012, 37.88991058400002 ], [ 70.172129761000122, 37.946082866 ], [ 70.214711141000066, 37.92926218700002 ], [ 70.26152998900011, 37.939287415000038 ], [ 70.253933553000138, 37.97339386 ], [ 70.470302775000107, 38.120516663000089 ], [ 70.547197306000101, 38.26265269 ], [ 70.583060751000062, 38.275080872000089 ], [ 70.600010620000035, 38.347066142000031 ], [ 70.641351766000071, 38.354197489000072 ], [ 70.684759969000083, 38.386650289 ], [ 70.664864543000078, 38.405408834000085 ], [ 70.74181075100006, 38.419438985000099 ], [ 70.777260783000031, 38.446465759000048 ], [ 70.843044881000083, 38.440161235000048 ], [ 70.871001831000115, 38.453209534000067 ], [ 70.936217489000114, 38.433004049000075 ], [ 70.950738566000041, 38.473053284000073 ], [ 70.998229207000065, 38.465663554000074 ], [ 71.049802287000091, 38.408664450000074 ], [ 71.117395060000035, 38.398639221000039 ], [ 71.217699016000097, 38.325827128000057 ], [ 71.334384399000101, 38.280661927 ], [ 71.358155558000135, 38.251258037000113 ], [ 71.359085734000075, 38.184104513000065 ], [ 71.272631063000119, 37.997991842 ], [ 71.25826501500012, 37.926471659000057 ], [ 71.34115401300005, 37.893295390000034 ], [ 71.501195923000125, 37.946212057000125 ], [ 71.53705936700004, 37.944455058000059 ], [ 71.59772749900003, 37.898359681000031 ], [ 71.590286093000032, 37.81572906500007 ], [ 71.529514608000113, 37.761132915000033 ], [ 71.542537069000048, 37.719559225000054 ], [ 71.497165161000112, 37.566545309000063 ], [ 71.511221151000029, 37.485878398000054 ], [ 71.487139933000094, 37.409087219000085 ], [ 71.493857870000113, 37.30754303 ], [ 71.487036580000051, 37.267054546000097 ], [ 71.45013960700004, 37.21667002400001 ], [ 71.43112268100009, 37.066989237000129 ], [ 71.459958130000132, 37.010739441000041 ], [ 71.463058716000035, 36.948081767000119 ], [ 71.52848107900013, 36.856149394000042 ], [ 71.55287235600008, 36.769591370000043 ], [ 71.611060018000046, 36.704840800000042 ], [ 71.653021281000065, 36.687012431000099 ], [ 71.748519328000043, 36.678640849000104 ], [ 71.836575969000137, 36.699156392000091 ], [ 72.259805949000054, 36.967305400000058 ], [ 72.405946899000128, 37.007664693000024 ], [ 72.474986613000112, 36.99748443600005 ], [ 72.657714478000059, 37.028826192000068 ], [ 72.790729614000099, 37.220261536000081 ], [ 72.902247356000089, 37.253799541 ], [ 72.995574992000059, 37.309300029000056 ], [ 73.067508586000088, 37.315061951000033 ], [ 73.132104126000058, 37.384385885000071 ], [ 73.170241333000035, 37.408260396000045 ], [ 73.211479126000086, 37.408260396000045 ], [ 73.296331828000064, 37.464949443000066 ], [ 73.378394003000039, 37.452547099000085 ], [ 73.440612427000076, 37.479935608000048 ], [ 73.485260864000111, 37.480969137000031 ], [ 73.674499959000116, 37.431049703000056 ], [ 73.753461548000075, 37.428388367000125 ], [ 73.739095500000076, 37.338342184000069 ], [ 73.690416300000038, 37.305217591000073 ], [ 73.630988403000117, 37.295993348000067 ], [ 73.597295369000051, 37.261809387000071 ], [ 73.617655884000101, 37.233180644000086 ], [ 73.680494425000063, 37.24245656300009 ], [ 73.709226522000051, 37.217005920000091 ], [ 73.798213339000142, 37.228529765000118 ], [ 73.836247192000087, 37.256745097000092 ], [ 74.187646932000064, 37.338393861000085 ], [ 74.223923788000093, 37.403351136000126 ], [ 74.303815552000117, 37.400173035000066 ], [ 74.315597779000029, 37.426915588000028 ], [ 74.37812626200008, 37.393765158000022 ], [ 74.521166626000081, 37.375600891 ], [ 74.660382935000086, 37.393971863000061 ], [ 74.788540487000034, 37.331159160000098 ], [ 74.86264449100014, 37.244601135 ], [ 74.892306763000079, 37.231113587000024 ], [ 74.794018189000099, 37.213931173000063 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-TAK", "NAME_1": "Takhar" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.895247436000091, 37.618170065000086 ], [ 69.918811890000086, 37.617136536000103 ], [ 69.955398804000083, 37.575485331 ], [ 70.004187461582035, 37.551370518834347 ], [ 70.00506066281929, 37.407665310305788 ], [ 70.041699253417789, 37.387304795879629 ], [ 70.018289828612694, 37.359166978573171 ], [ 70.00428551556405, 37.276200466578246 ], [ 70.034412876053352, 37.188376369973469 ], [ 70.033017612972401, 37.135097967996785 ], [ 70.124123163053525, 37.042545477991382 ], [ 70.096166212900357, 36.996114202908132 ], [ 70.056427035978913, 36.979655260481877 ], [ 70.037358432745464, 36.941207993853823 ], [ 70.00661095643045, 36.922294420251262 ], [ 70.003820427570645, 36.61505219210494 ], [ 70.037358432745464, 36.515265001578541 ], [ 70.038443638363162, 36.462115789911763 ], [ 70.139626091970513, 36.404909980211414 ], [ 70.235020785880522, 36.322331040944789 ], [ 70.460019973343037, 36.297009589121217 ], [ 70.472473992780522, 36.283573716853539 ], [ 70.477589959808768, 36.178076280096207 ], [ 70.429014112811046, 36.037852281557548 ], [ 70.463482293972675, 35.978321030990742 ], [ 70.456919387020037, 35.964626777203989 ], [ 70.300546502618943, 35.879515693294593 ], [ 70.273364698821752, 35.850215156004651 ], [ 70.176833124249242, 35.892253933572135 ], [ 70.171562127590107, 35.860705471580218 ], [ 70.135595330560022, 35.828304347967276 ], [ 69.982116326906919, 35.791407375849701 ], [ 69.961032342068904, 35.80985586235812 ], [ 69.956381463933383, 35.8869570993906 ], [ 69.886049839428495, 36.006122952412284 ], [ 69.788122999976451, 36.099063015145987 ], [ 69.777736037188333, 36.213577989132887 ], [ 69.765798780789055, 36.232982490049835 ], [ 69.707766147889402, 36.247141831830049 ], [ 69.681101108928999, 36.35008128552289 ], [ 69.522661166979219, 36.295459296409376 ], [ 69.444112990022461, 36.24719350777417 ], [ 69.300607538007455, 36.228176581384105 ], [ 69.268309768081281, 36.275150457927282 ], [ 69.220664097070369, 36.296957913177152 ], [ 69.20144046420603, 36.389096992032535 ], [ 69.147283563085921, 36.483044745118889 ], [ 69.221749301788805, 36.544513862025099 ], [ 69.255597365326139, 36.612235825722735 ], [ 69.207176547959307, 36.722074083152393 ], [ 69.216168246767154, 36.79274160444146 ], [ 69.28200402186809, 36.811345120580825 ], [ 69.304638299417945, 36.849895738197745 ], [ 69.311459588788978, 37.030634060013824 ], [ 69.339364862098648, 37.077478746247095 ], [ 69.308616678000078, 37.116882043000103 ], [ 69.407731974000114, 37.177473450000051 ], [ 69.442148479000082, 37.223620504000095 ], [ 69.445197388000111, 37.236410421000059 ], [ 69.409850708000079, 37.245660503000082 ], [ 69.417912231000059, 37.267674662000061 ], [ 69.377036174000068, 37.380665182000072 ], [ 69.384477580000066, 37.453270569 ], [ 69.491447795000056, 37.536986390000024 ], [ 69.508656046000056, 37.578973490000052 ], [ 69.528654826000093, 37.586027324000057 ], [ 69.66497725500011, 37.57615712500008 ], [ 69.754274130000056, 37.596672669000057 ], [ 69.802229858000089, 37.581505636000131 ], [ 69.895247436000091, 37.618170065000086 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-KDZ", "NAME_1": "Kunduz" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.245674683000061, 37.103886210000056 ], [ 69.308616678000078, 37.116882043000103 ], [ 69.339364862098648, 37.077478746247095 ], [ 69.311459588788978, 37.030634060013824 ], [ 69.293011102280502, 36.821887112100512 ], [ 69.215238071679607, 36.788969225449364 ], [ 69.207951695214547, 36.717862453689293 ], [ 69.255597365326139, 36.612235825722735 ], [ 69.221749301788805, 36.544513862025099 ], [ 69.147128534354351, 36.487256375481309 ], [ 69.20144046420603, 36.389096992032535 ], [ 69.220664097070369, 36.296957913177152 ], [ 69.190433383793618, 36.328790595109865 ], [ 69.061810743970625, 36.365274156077419 ], [ 68.986983270061842, 36.421937364317898 ], [ 68.914532912064203, 36.433151150305321 ], [ 68.853089633579714, 36.414573473486996 ], [ 68.798622674097089, 36.44759471292565 ], [ 68.722761672313311, 36.53430776639027 ], [ 68.623284540149371, 36.521750393266018 ], [ 68.538535191445874, 36.541077378917862 ], [ 68.322372674059636, 36.548105373863905 ], [ 68.206927524985247, 36.578956203865687 ], [ 68.161142205948011, 36.642776598261378 ], [ 68.118819208439675, 36.67323985373622 ], [ 68.038100620247405, 36.817003689068997 ], [ 68.024819692000051, 36.925518466000071 ], [ 68.186411173000067, 37.018310038000024 ], [ 68.277775106000092, 37.01006764800006 ], [ 68.28831709800005, 37.103214417000075 ], [ 68.307282349000104, 37.114221497000059 ], [ 68.391876669000112, 37.105436503000064 ], [ 68.418024943000091, 37.128277486000073 ], [ 68.403710571000033, 37.151635234000125 ], [ 68.523858276000055, 37.16465769400007 ], [ 68.551453491000075, 37.192614645000063 ], [ 68.626901083000064, 37.206257222000076 ], [ 68.648605184000132, 37.244368591000026 ], [ 68.671239461000084, 37.247184957000101 ], [ 68.657545207000055, 37.267674662000061 ], [ 68.668862345000036, 37.278294169000034 ], [ 68.759606161000079, 37.275245260000119 ], [ 68.820377645000121, 37.2509056600001 ], [ 68.810197388000063, 37.31209055600003 ], [ 68.835828898000045, 37.329143778000073 ], [ 68.904713582000056, 37.276692200000113 ], [ 68.917632691000051, 37.302427064000099 ], [ 68.887867066000069, 37.338135478000098 ], [ 68.985225464000109, 37.320358785000067 ], [ 69.123614950000103, 37.169205221000098 ], [ 69.245674683000061, 37.103886210000056 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-BAL", "NAME_1": "Balkh" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 67.780544475000113, 37.188868103000047 ], [ 67.771966187000089, 37.124970195000074 ], [ 67.785350382000104, 37.096548157000072 ], [ 67.878109579000125, 37.064431254000041 ], [ 68.024819692000051, 36.925518466000071 ], [ 68.038100620247405, 36.817003689068997 ], [ 68.092102491736568, 36.711170356426805 ], [ 68.174991490265029, 36.62779043238254 ], [ 68.189099156101122, 36.593244736855127 ], [ 68.079855177874151, 36.562161362856614 ], [ 67.83237674339199, 36.589601549072199 ], [ 67.688044468177623, 36.647944241233745 ], [ 67.614043816568824, 36.63161448821802 ], [ 67.485834587895908, 36.636162014465356 ], [ 67.461339960171017, 36.600531114219507 ], [ 67.371939732432679, 36.561282863713188 ], [ 67.420050489638356, 36.471572576713015 ], [ 67.382223342433292, 36.370596829579995 ], [ 67.373800082607715, 36.2893614774502 ], [ 67.333337437073055, 36.250862534878081 ], [ 67.334887729784896, 36.211562608427641 ], [ 67.267708368446392, 36.153219916266096 ], [ 67.181873814125197, 36.138311266551682 ], [ 67.067513868869923, 36.063948879736984 ], [ 67.124151238688682, 35.980749823745327 ], [ 67.119965447647246, 35.933517563884436 ], [ 67.002970004961753, 35.821793117858078 ], [ 66.928039178265408, 35.779676825025433 ], [ 66.904888136778084, 35.718078517809317 ], [ 66.799674920860866, 35.674825344314172 ], [ 66.689965854640434, 35.66725474700894 ], [ 66.663145786049142, 35.692007758051545 ], [ 66.505325961723713, 35.671156318109581 ], [ 66.535298292582127, 35.743399970532209 ], [ 66.586044549016719, 35.778979193934617 ], [ 66.629762811404589, 35.875614122193952 ], [ 66.610384148909304, 35.992299506516986 ], [ 66.59203901608771, 36.020437323823387 ], [ 66.602322626088267, 36.163426011900924 ], [ 66.544445021020863, 36.174071357107437 ], [ 66.461400994660153, 36.22424917276112 ], [ 66.53013064960976, 36.314166165336246 ], [ 66.57157514797467, 36.407752184115964 ], [ 66.663610874042547, 36.508598740939135 ], [ 66.679888950214831, 36.54608999315866 ], [ 66.63534386642624, 36.57035207778614 ], [ 66.527340121649274, 36.587689521154459 ], [ 66.471012811092351, 36.636730455246266 ], [ 66.462331170646962, 36.705124213411693 ], [ 66.417682733171546, 36.746077786260798 ], [ 66.469927606373915, 36.774654853138941 ], [ 66.509666783295359, 36.767575182248834 ], [ 66.559792922105657, 36.781992906447442 ], [ 66.568939649645074, 36.798012600201332 ], [ 66.540104201247857, 36.885965888015278 ], [ 66.462796257741047, 36.990455634419959 ], [ 66.503620640280303, 37.112412014502866 ], [ 66.434580926068861, 37.185224106807084 ], [ 66.401973097780228, 37.25625336420137 ], [ 66.255212029811275, 37.302529608754412 ], [ 66.250847716000067, 37.359650022000054 ], [ 66.294433634000086, 37.331210836000125 ], [ 66.413496135000059, 37.349633484000023 ], [ 66.451064901000052, 37.322942607000087 ], [ 66.539018189000046, 37.369089661000103 ], [ 66.6940991620001, 37.343406474000048 ], [ 66.734975220000081, 37.363301900000053 ], [ 67.005914754000116, 37.384385885000071 ], [ 67.097382039000081, 37.340590108000058 ], [ 67.123323609000124, 37.281963196000035 ], [ 67.187815796000052, 37.258243714000102 ], [ 67.236753377000127, 37.192407939000091 ], [ 67.259129272000109, 37.185147400000048 ], [ 67.391162557000087, 37.219589742 ], [ 67.503145386000142, 37.281963196000035 ], [ 67.52614139800005, 37.27289398200007 ], [ 67.561384725000039, 37.219899801000068 ], [ 67.592287231000057, 37.247184957000101 ], [ 67.633163290000141, 37.254057923000047 ], [ 67.677501668000104, 37.23354237900007 ], [ 67.746593058000087, 37.22940826500006 ], [ 67.780544475000113, 37.188868103000047 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-JOW", "NAME_1": "Jawzjan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 65.761442912000064, 37.578379212000087 ], [ 65.804334351000136, 37.565305074000023 ], [ 65.855183960000033, 37.507944235000039 ], [ 66.079666382000141, 37.440868225000102 ], [ 66.142918335000047, 37.385057679000042 ], [ 66.250847716000067, 37.359650022000054 ], [ 66.257537468879036, 37.300565903993231 ], [ 66.357117953830482, 37.278138332917706 ], [ 66.409414503876235, 37.249612941983685 ], [ 66.434580926068861, 37.185224106807084 ], [ 66.503620640280303, 37.112412014502866 ], [ 66.462796257741047, 36.990455634419959 ], [ 66.540104201247857, 36.885965888015278 ], [ 66.568939649645074, 36.798012600201332 ], [ 66.564753858603638, 36.783749904734293 ], [ 66.51586795414272, 36.768272813339649 ], [ 66.474113397415351, 36.775429999494861 ], [ 66.435511102055671, 36.762510891164652 ], [ 66.417476026697216, 36.739256496889823 ], [ 66.462331170646962, 36.705124213411693 ], [ 66.479901158012012, 36.623242906135204 ], [ 66.527340121649274, 36.587689521154459 ], [ 66.234231397760766, 36.535444647952147 ], [ 66.0714506369373, 36.537821763863292 ], [ 65.966857537745113, 36.475448310291256 ], [ 65.847691684723429, 36.45028188719931 ], [ 65.711937697166945, 36.357341824465607 ], [ 65.527091098675214, 36.339616808368987 ], [ 65.501976353326029, 36.316543281247391 ], [ 65.490659213651782, 36.096815090444068 ], [ 65.534274123252146, 36.044570217241699 ], [ 65.527091098675214, 35.977855942997337 ], [ 65.685220982262479, 36.000412706181407 ], [ 65.674678989843471, 35.97232656481907 ], [ 65.576493767972977, 35.927884832918664 ], [ 65.525437453175869, 35.959355781444117 ], [ 65.48864383294648, 35.919177354051612 ], [ 65.415263298962032, 35.909539700097071 ], [ 65.304003940929078, 35.937031562256777 ], [ 65.275736932413452, 35.929486803373266 ], [ 65.261629265678039, 35.947986964926486 ], [ 65.144943882254324, 35.937083238200842 ], [ 65.105669794225605, 35.96695221627175 ], [ 65.103499382990094, 35.989173081772265 ], [ 65.18168582474101, 36.048626817073909 ], [ 65.170988803590376, 36.099915675867749 ], [ 65.215998977171012, 36.146837877366124 ], [ 65.21134809813617, 36.24486806870641 ], [ 65.245454543192579, 36.345895494481454 ], [ 65.277907341850323, 36.361243395566248 ], [ 65.457121210275602, 36.364757392139893 ], [ 65.484768101166878, 36.385634671402954 ], [ 65.432936639114587, 36.498857734197031 ], [ 65.447509392944085, 36.578801174234798 ], [ 65.392422315837166, 36.619573879930613 ], [ 65.416813591673872, 36.650424709932395 ], [ 65.44456383715135, 36.758686835329172 ], [ 65.403584425880524, 36.811500149312394 ], [ 65.39211225837397, 36.853668118089161 ], [ 65.340280796321679, 36.906791490434898 ], [ 65.338885532341408, 36.996398423748246 ], [ 65.366997512125465, 37.070321560091884 ], [ 65.487921778966893, 37.241997468508316 ], [ 65.536857137000084, 37.257106833000094 ], [ 65.624086955000053, 37.345137635000114 ], [ 65.620986369000036, 37.430403748000074 ], [ 65.65871016400007, 37.510269674000071 ], [ 65.681034384000043, 37.526392720000061 ], [ 65.739428752000094, 37.529054057000067 ], [ 65.761442912000064, 37.578379212000087 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-FYB", "NAME_1": "Faryab" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 64.728548628816156, 36.850569547146847 ], [ 64.778763875000095, 36.938469950000112 ], [ 64.760160360000043, 37.092620748000101 ], [ 64.807909383000094, 37.13551218700006 ], [ 65.063087606000124, 37.233232321000102 ], [ 65.487921778966893, 37.241997468508316 ], [ 65.366997512125465, 37.070321560091884 ], [ 65.331444126245401, 36.950871487129405 ], [ 65.340280796321679, 36.906791490434898 ], [ 65.39211225837397, 36.853668118089161 ], [ 65.403584425880524, 36.811500149312394 ], [ 65.44456383715135, 36.758686835329172 ], [ 65.416813591673872, 36.650424709932395 ], [ 65.392422315837166, 36.619573879930613 ], [ 65.447509392944085, 36.578801174234798 ], [ 65.432936639114587, 36.498857734197031 ], [ 65.484768101166878, 36.385634671402954 ], [ 65.457121210275602, 36.364757392139893 ], [ 65.277907341850323, 36.361243395566248 ], [ 65.245454543192579, 36.345895494481454 ], [ 65.21134809813617, 36.24486806870641 ], [ 65.215998977171012, 36.146837877366124 ], [ 65.170988803590376, 36.099915675867749 ], [ 65.18168582474101, 36.048626817073909 ], [ 65.107375115669015, 35.993875636751227 ], [ 65.102259148640769, 35.974419460789477 ], [ 65.161997104782529, 35.931812242441026 ], [ 65.261629265678039, 35.947986964926486 ], [ 65.275736932413452, 35.929486803373266 ], [ 65.304003940929078, 35.937031562256777 ], [ 65.415263298962032, 35.909539700097071 ], [ 65.48864383294648, 35.919177354051612 ], [ 65.53086347766731, 35.960027574113212 ], [ 65.576493767972977, 35.927884832918664 ], [ 65.668012730103385, 35.967107245003319 ], [ 65.685220982262479, 36.000412706181407 ], [ 65.733331740367476, 36.020747382185903 ], [ 65.757567986573292, 36.004417630069554 ], [ 65.739998000107562, 35.960854397312573 ], [ 65.791674431629701, 35.897369899701062 ], [ 65.816685825090701, 35.836572577262586 ], [ 65.792914666878346, 35.793319403767441 ], [ 65.679949985603344, 35.78735077601749 ], [ 65.679329867978993, 35.746552231899955 ], [ 65.623002557422069, 35.676065579562817 ], [ 65.52838300986798, 35.679269517774003 ], [ 65.483527865918234, 35.65105418610176 ], [ 65.47035037606895, 35.607594306132285 ], [ 65.485853305885314, 35.556641344122738 ], [ 65.407615187291015, 35.423161118790574 ], [ 65.410095655989721, 35.321461900346378 ], [ 65.451385125623005, 35.253946642223752 ], [ 65.382035353049048, 35.203872179357575 ], [ 65.26628014471288, 35.18699982398266 ], [ 65.244214308843254, 35.237694404473189 ], [ 65.200185988092869, 35.224697780877875 ], [ 65.133006625855046, 35.256452949344123 ], [ 65.017354771205703, 35.219736843480518 ], [ 65.00324710536961, 35.238727932348183 ], [ 64.912038201601717, 35.212760525377917 ], [ 64.854160598332896, 35.239813137066619 ], [ 64.632727085186787, 35.199557197106913 ], [ 64.416409539968242, 35.236815904430443 ], [ 64.40633263464332, 35.274022935809796 ], [ 64.424005974795875, 35.411327216078121 ], [ 64.298328891664994, 35.398382270225568 ], [ 64.251148308647487, 35.418871974961633 ], [ 64.262155389059899, 35.445511176399634 ], [ 64.247117547236996, 35.468429673890341 ], [ 64.016382276920524, 35.491864936217837 ], [ 64.001137730421874, 35.50555919000459 ], [ 63.988580357297622, 35.64588654223013 ], [ 63.946205682046582, 35.691671861267366 ], [ 63.889258253865307, 35.712755846105381 ], [ 63.947445917295227, 35.943801173885049 ], [ 63.935663689627518, 36.017698472706343 ], [ 63.906327060745241, 36.031732343772603 ], [ 64.045113566000055, 35.99873403000008 ], [ 64.036225220000119, 36.076403707000068 ], [ 64.057257528000036, 36.105239156000025 ], [ 64.158698365000134, 36.160274556000061 ], [ 64.266133667000076, 36.15247141600004 ], [ 64.303650757000071, 36.211537578 ], [ 64.444572388000097, 36.249984843000036 ], [ 64.498160848000055, 36.291429342000114 ], [ 64.576657349000072, 36.38961456400007 ], [ 64.605854533000127, 36.461083069 ], [ 64.588801311000054, 36.600454407000072 ], [ 64.60482100400003, 36.66055409800002 ], [ 64.728548628816156, 36.850569547146847 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-BDG", "NAME_1": "Badghis" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 63.342934204000073, 35.856262106000074 ], [ 63.511089315000049, 35.901840719000049 ], [ 63.582092732000035, 35.959046530000094 ], [ 63.765905802000077, 35.977288310000048 ], [ 63.889825887000143, 36.029636536000069 ], [ 63.935663689627518, 36.017698472706343 ], [ 63.943570183716986, 35.904552924277993 ], [ 63.915044793682227, 35.775180976520801 ], [ 63.887397901891632, 35.720507311463223 ], [ 63.946205682046582, 35.691671861267366 ], [ 63.988580357297622, 35.64588654223013 ], [ 64.002532992603506, 35.501683458224988 ], [ 64.02707929897042, 35.487188218761275 ], [ 64.247117547236996, 35.468429673890341 ], [ 64.262155389059899, 35.445511176399634 ], [ 64.251148308647487, 35.418871974961633 ], [ 64.298328891664994, 35.398382270225568 ], [ 64.415789422343948, 35.417657579034028 ], [ 64.425091180413631, 35.388873806580875 ], [ 64.410828484946592, 35.239658108334993 ], [ 64.614226921834927, 35.199298813789198 ], [ 64.730137159802041, 35.213148098106217 ], [ 64.764915399326185, 35.166639309556444 ], [ 64.867958204907211, 35.133773097950098 ], [ 64.999371371791369, 35.025821030915836 ], [ 65.044691602835201, 34.950425117125462 ], [ 65.014409213614272, 34.793587144730907 ], [ 64.965574985996795, 34.765397651480384 ], [ 64.708743116601511, 34.694730130191317 ], [ 64.529374221243302, 34.711111559151107 ], [ 64.496301304061888, 34.700311184313705 ], [ 64.476302524841628, 34.671424059073047 ], [ 64.36550825390276, 34.664680284067856 ], [ 64.201797316193165, 34.680312405093389 ], [ 64.150120883771763, 34.656179510775758 ], [ 64.124179315223216, 34.617241319531274 ], [ 64.078910760123449, 34.606802679899715 ], [ 64.011731397885683, 34.562180080846019 ], [ 63.785491977872425, 34.509366766862797 ], [ 63.650306431096908, 34.557529201811178 ], [ 63.607776727114242, 34.547865709434916 ], [ 63.531915725330407, 34.560733140921684 ], [ 63.360298292632081, 34.634630438843658 ], [ 63.244233025933397, 34.644914048844271 ], [ 63.173332960647599, 34.610652574156973 ], [ 63.034271682092424, 34.645585842412686 ], [ 63.026210158372066, 34.690751043825571 ], [ 62.99468753390255, 34.726330268127356 ], [ 62.912625360372033, 34.731885483828023 ], [ 62.750774773736794, 34.82469635715114 ], [ 62.668402540944498, 34.843454902022074 ], [ 62.651762729566315, 34.894046128825778 ], [ 62.671813184730638, 35.041995755199935 ], [ 62.70002851820152, 35.111578070871246 ], [ 62.784157749280666, 35.227049059266676 ], [ 62.823063429000058, 35.327514064000084 ], [ 62.918205607000061, 35.388176982000076 ], [ 63.080211222000059, 35.437062887000067 ], [ 63.100726766000037, 35.524964499000063 ], [ 63.077369018000127, 35.558760885000041 ], [ 63.076645549000034, 35.624700012000048 ], [ 63.213588094000045, 35.69229278600001 ], [ 63.112043905000121, 35.769910787000114 ], [ 63.088634481000042, 35.843394674000066 ], [ 63.125273072000141, 35.860241191000043 ], [ 63.342934204000073, 35.856262106000074 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-HER", "NAME_1": "Hirat" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 62.604529663000051, 35.219401754000032 ], [ 62.693619832000138, 35.248392232000114 ], [ 62.760489136000103, 35.302445781000088 ], [ 62.823063429000058, 35.327514064000084 ], [ 62.784157749280666, 35.227049059266676 ], [ 62.689796584145029, 35.092121894010177 ], [ 62.664216749903062, 35.006080634113971 ], [ 62.655018344620885, 34.871954454534432 ], [ 62.671813184730638, 34.841336168529324 ], [ 62.750774773736794, 34.82469635715114 ], [ 62.912625360372033, 34.731885483828023 ], [ 62.99468753390255, 34.726330268127356 ], [ 63.026210158372066, 34.690751043825571 ], [ 63.034271682092424, 34.645585842412686 ], [ 63.173332960647599, 34.610652574156973 ], [ 63.244233025933397, 34.644914048844271 ], [ 63.360298292632081, 34.634630438843658 ], [ 63.531915725330407, 34.560733140921684 ], [ 63.607776727114242, 34.547865709434916 ], [ 63.650306431096908, 34.557529201811178 ], [ 63.785491977872425, 34.509366766862797 ], [ 64.011731397885683, 34.562180080846019 ], [ 64.078910760123449, 34.606802679899715 ], [ 64.124179315223216, 34.617241319531274 ], [ 64.150120883771763, 34.656179510775758 ], [ 64.201797316193165, 34.680312405093389 ], [ 64.36550825390276, 34.664680284067856 ], [ 64.476302524841628, 34.671424059073047 ], [ 64.459559360675939, 34.559389552885534 ], [ 64.481573520601444, 34.492416897122098 ], [ 64.434858025577398, 34.491900133184572 ], [ 64.40478234193148, 34.52021881854364 ], [ 64.301429477987995, 34.477637436818213 ], [ 64.197766554782675, 34.469911810781412 ], [ 64.188154738350477, 34.34022980376244 ], [ 64.208618604664821, 34.287313136991656 ], [ 64.194976026822133, 34.264213772347716 ], [ 64.117978142577215, 34.225559801043971 ], [ 64.061650832020234, 34.224009508332131 ], [ 64.006150343763352, 34.245713608995857 ], [ 63.976643100898343, 34.21783417410785 ], [ 63.849880812149706, 34.219927070078199 ], [ 63.741256952446349, 34.268451240232537 ], [ 63.493106724395773, 34.268451240232537 ], [ 63.47667361769328, 34.210961208792753 ], [ 63.387893507579292, 34.073992825308608 ], [ 63.445771111747376, 33.974929104294688 ], [ 63.516257765883154, 33.912555649823332 ], [ 63.538271925808715, 33.857003486521648 ], [ 63.582972040127515, 33.802820746080556 ], [ 63.504578891902327, 33.767164008312307 ], [ 63.515792677889749, 33.70091482206135 ], [ 63.47729373621695, 33.65970286679385 ], [ 63.241132439610396, 33.618516750847334 ], [ 63.074630974839579, 33.532837226157028 ], [ 63.090443963018458, 33.460180162584436 ], [ 63.130028111208333, 33.394757799532783 ], [ 63.140260044365505, 33.319491075152996 ], [ 63.083157586553341, 33.281508897417666 ], [ 63.041403028926595, 33.176476549553115 ], [ 62.927198114201587, 33.126427924209338 ], [ 62.916811151413469, 33.151284288039449 ], [ 62.74162804619732, 33.121337796502075 ], [ 62.70095869328901, 33.072968655079364 ], [ 62.645251498557798, 33.054261786152495 ], [ 62.508722364645394, 33.057724106782075 ], [ 62.383510370407237, 32.983904324125263 ], [ 62.348887159614719, 32.842724311178017 ], [ 62.150708041642758, 32.826368719740628 ], [ 62.073761835140544, 32.783218899032931 ], [ 62.028286573566504, 32.791667996380909 ], [ 61.99542036285942, 32.8974754915007 ], [ 61.964672885645143, 32.892075304531659 ], [ 61.855738966679951, 32.816808580151815 ], [ 61.778482700016582, 32.881714179265941 ], [ 61.690477736258515, 32.89192027400145 ], [ 61.666293165996763, 32.912487494002619 ], [ 61.676680128784881, 33.0119904654876 ], [ 61.843336623186588, 33.155831814286785 ], [ 61.755021600166685, 33.271664536988794 ], [ 61.823131138391318, 33.342771307849546 ], [ 61.828918898088659, 33.408400377375472 ], [ 61.858994581734521, 33.452428697226594 ], [ 61.847367384597078, 33.476458237857344 ], [ 61.550227899298079, 33.516042385147955 ], [ 61.451525912590739, 33.45966339774759 ], [ 61.164463331717343, 33.461472072877825 ], [ 60.9197882926955, 33.512570519114149 ], [ 60.8951249590001, 33.541132101000031 ], [ 60.846032348000051, 33.555782370000102 ], [ 60.655553019000081, 33.559890645000038 ], [ 60.574834432000046, 33.587795919000101 ], [ 60.511789185000112, 33.638387146000056 ], [ 60.486881145000041, 33.711380107000096 ], [ 60.528015585000048, 33.841449687000036 ], [ 60.486777791000122, 34.094276632000017 ], [ 60.49277225700007, 34.139028422000095 ], [ 60.552406861000065, 34.220057068000088 ], [ 60.65059208200006, 34.285350241000046 ], [ 60.643667440000058, 34.306640930000029 ], [ 60.890474080000104, 34.318914083000053 ], [ 60.779369751000047, 34.455081482000068 ], [ 60.699684692000062, 34.516395569000011 ], [ 60.739268840000136, 34.548021546000101 ], [ 60.838487590000113, 34.570914205000022 ], [ 60.895435018000057, 34.62832672200004 ], [ 60.947524862000137, 34.637990214000055 ], [ 60.959927206000089, 34.723204651000017 ], [ 61.009639933000074, 34.760980123000067 ], [ 61.034754680000106, 34.806248678000074 ], [ 61.065450480000038, 34.814723613000083 ], [ 61.074752238000087, 34.93311431900004 ], [ 61.115886678000038, 35.059876608000096 ], [ 61.147305949000099, 35.102096252000067 ], [ 61.139864543000101, 35.139665019000077 ], [ 61.096352987000046, 35.193201802000104 ], [ 61.112372681000124, 35.202038472000098 ], [ 61.102450806000036, 35.256660462000056 ], [ 61.12270796700011, 35.287666321000088 ], [ 61.187096802000099, 35.300378723000037 ], [ 61.195054973000083, 35.390089010000011 ], [ 61.290036255000075, 35.548063863000024 ], [ 61.269675741000128, 35.618498840000072 ], [ 61.351531210000076, 35.627800599000082 ], [ 61.351531210000076, 35.607130026000064 ], [ 61.383467245000077, 35.586459453000074 ], [ 61.39318241400008, 35.55359324100003 ], [ 61.427702271000101, 35.542844543000015 ], [ 61.538703247000058, 35.452307434000019 ], [ 61.604745728000069, 35.430603332000103 ], [ 61.739621216000046, 35.413756816000031 ], [ 61.919351847000087, 35.451842346 ], [ 62.007460164000122, 35.438923239000061 ], [ 62.136341187000141, 35.34135813400006 ], [ 62.233699585000068, 35.29376414000005 ], [ 62.251217896000128, 35.260381165000055 ], [ 62.250959513000055, 35.202348532000101 ], [ 62.286202840000044, 35.140646871000044 ], [ 62.431878703000109, 35.280638326000073 ], [ 62.458905477000087, 35.281878561 ], [ 62.535489950000056, 35.227359924 ], [ 62.604529663000051, 35.219401754000032 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-NIM", "NAME_1": "Nimroz" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 60.844378703000075, 29.858178610000053 ], [ 61.80225305200014, 30.847058818000036 ], [ 61.800185995000106, 30.961418762 ], [ 61.826334269000085, 31.034592591 ], [ 61.779205363000074, 31.181095276000079 ], [ 61.742721802000062, 31.239541321000061 ], [ 61.749233032000063, 31.302379863000041 ], [ 61.686911255000098, 31.373176575000073 ], [ 61.606258629632009, 31.388741287780192 ], [ 61.629809605029209, 31.469371446535035 ], [ 61.605314976404998, 31.517508043061696 ], [ 61.637251011125215, 31.499317938971672 ], [ 61.668308546702065, 31.516009426293977 ], [ 61.665052931647438, 31.597890733570466 ], [ 61.724015741433277, 31.606236477231619 ], [ 61.802047153553247, 31.716617337020466 ], [ 61.885556267907418, 31.794002793993741 ], [ 61.888346795867903, 31.883299668944574 ], [ 61.984516636133833, 31.945905667412603 ], [ 61.979245640373961, 32.021120714049687 ], [ 62.394517449920329, 32.043548285125212 ], [ 62.539418165915606, 32.071763616797455 ], [ 62.600861444400095, 32.05489126232186 ], [ 62.743333367640787, 31.930015163968619 ], [ 62.862189162299956, 31.97569713021835 ], [ 62.981199985690751, 31.989753119211059 ], [ 63.033651563568753, 32.018045966148406 ], [ 63.081762322573127, 32.06938650178563 ], [ 63.102381219417737, 32.200851345513172 ], [ 63.157468295625335, 32.252579453878695 ], [ 63.530055373356788, 32.200205390366477 ], [ 63.538426955439604, 32.136669215911581 ], [ 63.569639519748023, 32.079902655782917 ], [ 63.533621046773874, 32.038716538937081 ], [ 63.538892043433009, 31.996264350219576 ], [ 63.497757603430614, 31.918749701137756 ], [ 63.429493035575092, 31.860329495509802 ], [ 63.407633905280477, 31.804932359141048 ], [ 63.354407180147234, 31.480249334838902 ], [ 63.352701856905128, 31.374958604555957 ], [ 63.316373324669144, 31.316615912394411 ], [ 63.349601270582127, 31.250030829359275 ], [ 63.342935011741361, 31.125283922215203 ], [ 63.285522494667362, 31.083529365487834 ], [ 63.225939569055811, 30.985860908454129 ], [ 63.143050572326047, 30.936354885469541 ], [ 63.156538119638469, 30.773651638112597 ], [ 63.057371046736364, 30.681770942574929 ], [ 63.085172967258586, 30.650222480583011 ], [ 63.0619185729837, 30.608829658162165 ], [ 63.098350458007189, 30.539273180013254 ], [ 63.092304314992134, 30.518705960012028 ], [ 63.011482374911623, 30.456926784743303 ], [ 62.96228641118887, 30.365950425871461 ], [ 62.889939405978794, 30.276421006923897 ], [ 62.767517937902483, 30.204539088807906 ], [ 62.758681267826205, 30.073177598767131 ], [ 62.718373651023171, 30.006334133313601 ], [ 62.720957473408646, 29.90703786920227 ], [ 62.602581131613931, 29.418069628010926 ], [ 62.477508993000129, 29.407818502000069 ], [ 62.37446618600012, 29.424871725000017 ], [ 60.844378703000075, 29.858178610000053 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-FRA", "NAME_1": "Farah" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 61.606258629632009, 31.388741287780192 ], [ 60.821744425000134, 31.494667868000093 ], [ 60.792598918000124, 31.660084127000047 ], [ 60.805311320000101, 31.733981426000113 ], [ 60.792598918000124, 32.011277161000052 ], [ 60.774925578000136, 32.027193502000088 ], [ 60.814819783000075, 32.08786163300006 ], [ 60.830322713000044, 32.248885397000024 ], [ 60.577521607000108, 32.994343770000071 ], [ 60.56150191200004, 33.137306621 ], [ 60.757045533000053, 33.366336568000051 ], [ 60.829082479000135, 33.416281841000014 ], [ 60.832183065000095, 33.484494731000055 ], [ 60.9197882926955, 33.512570519114149 ], [ 61.164463331717343, 33.461472072877825 ], [ 61.3948885436713, 33.469636949385688 ], [ 61.438038365278317, 33.45868154581666 ], [ 61.490800002418155, 33.473719386740299 ], [ 61.517620070110127, 33.507489935911792 ], [ 61.550227899298079, 33.516042385147955 ], [ 61.847367384597078, 33.476458237857344 ], [ 61.858994581734521, 33.452428697226594 ], [ 61.828918898088659, 33.408400377375472 ], [ 61.823131138391318, 33.342771307849546 ], [ 61.755021600166685, 33.271664536988794 ], [ 61.843336623186588, 33.155831814286785 ], [ 61.676680128784881, 33.0119904654876 ], [ 61.666293165996763, 32.912487494002619 ], [ 61.690477736258515, 32.89192027400145 ], [ 61.778482700016582, 32.881714179265941 ], [ 61.855738966679951, 32.816808580151815 ], [ 61.964672885645143, 32.892075304531659 ], [ 61.99542036285942, 32.8974754915007 ], [ 62.013868850267215, 32.816395169001851 ], [ 62.032472364607884, 32.786629543718448 ], [ 62.059809198036021, 32.782056179049391 ], [ 62.150708041642758, 32.826368719740628 ], [ 62.348887159614719, 32.842724311178017 ], [ 62.383510370407237, 32.983904324125263 ], [ 62.508722364645394, 33.057724106782075 ], [ 62.645251498557798, 33.054261786152495 ], [ 62.70095869328901, 33.072968655079364 ], [ 62.74162804619732, 33.121337796502075 ], [ 62.916811151413469, 33.151284288039449 ], [ 62.927198114201587, 33.126427924209338 ], [ 63.014582961234623, 33.153919786369045 ], [ 63.043883497625302, 33.18037811885506 ], [ 63.092614374253913, 33.294453844169539 ], [ 63.140260044365505, 33.319491075152996 ], [ 63.206819288978977, 33.307062893237912 ], [ 63.296374546348204, 33.328508613281883 ], [ 63.551139357295483, 33.344011542198871 ], [ 63.681829054667105, 33.404886379902507 ], [ 63.807351109066417, 33.424006659080021 ], [ 63.869569533007507, 33.485036526414547 ], [ 63.933648308922272, 33.514440416491993 ], [ 63.958659702383329, 33.516688341193969 ], [ 64.011524693209992, 33.487387803904028 ], [ 64.099064568974654, 33.349127509227174 ], [ 64.107281122325901, 33.278227443941375 ], [ 64.150430943033541, 33.264145616526946 ], [ 64.229392531140377, 33.15898407655385 ], [ 64.254713982963892, 33.164255073213042 ], [ 64.331505160734537, 33.122578029952081 ], [ 64.399304640596654, 33.140819810885546 ], [ 64.376360304684283, 33.18231598609384 ], [ 64.475527377586388, 33.227636217137672 ], [ 64.522862990234785, 33.309724229089852 ], [ 64.551078321907028, 33.322953395782577 ], [ 64.608025750987565, 33.283033351707786 ], [ 64.680217726566809, 33.278459987938049 ], [ 64.694015334040387, 33.247040717155357 ], [ 64.738198684421718, 33.211564846540398 ], [ 64.697115920363387, 33.165882880290667 ], [ 64.699441359431148, 33.140742296519761 ], [ 64.715874465234378, 33.133378403890219 ], [ 64.614381952365193, 33.066870836120188 ], [ 64.562705519044414, 33.010543525563207 ], [ 64.573247512362798, 32.995531521262649 ], [ 64.540536330387283, 32.938480740293926 ], [ 64.577950067341703, 32.921375840922281 ], [ 64.574384393025298, 32.908844306219748 ], [ 64.395428907917733, 32.848925482924699 ], [ 64.334605747057537, 32.767741808537608 ], [ 64.266651239363171, 32.719527695846466 ], [ 64.255179070957354, 32.688651028322283 ], [ 64.299104038020914, 32.667851264324383 ], [ 64.293522983898583, 32.629998276898959 ], [ 64.177406040356459, 32.57219818799598 ], [ 64.04366743440454, 32.55752208137892 ], [ 64.029714797300016, 32.575531318315655 ], [ 64.014211866584333, 32.571655584737414 ], [ 63.996021763393628, 32.533699246323124 ], [ 64.020878127223739, 32.450035102338063 ], [ 63.952406853793264, 32.400244859412737 ], [ 63.917680292011823, 32.403913886516648 ], [ 63.846780226726025, 32.355518907571479 ], [ 63.826729770662382, 32.322471828811842 ], [ 63.726477492142521, 32.319577948963172 ], [ 63.649841343103446, 32.25803131769112 ], [ 63.530055373356788, 32.200205390366477 ], [ 63.157468295625335, 32.252579453878695 ], [ 63.102381219417737, 32.200851345513172 ], [ 63.081762322573127, 32.06938650178563 ], [ 63.033651563568753, 32.018045966148406 ], [ 62.981199985690751, 31.989753119211059 ], [ 62.862189162299956, 31.97569713021835 ], [ 62.743333367640787, 31.930015163968619 ], [ 62.600861444400095, 32.05489126232186 ], [ 62.539418165915606, 32.071763616797455 ], [ 62.394517449920329, 32.043548285125212 ], [ 61.979245640373961, 32.021120714049687 ], [ 61.984516636133833, 31.945905667412603 ], [ 61.888346795867903, 31.883299668944574 ], [ 61.885556267907418, 31.794002793993741 ], [ 61.802047153553247, 31.716617337020466 ], [ 61.724015741433277, 31.606236477231619 ], [ 61.665052931647438, 31.597890733570466 ], [ 61.668308546702065, 31.516009426293977 ], [ 61.637251011125215, 31.499317938971672 ], [ 61.605314976404998, 31.517508043061696 ], [ 61.629809605029209, 31.469371446535035 ], [ 61.606258629632009, 31.388741287780192 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-KNR", "NAME_1": "Kunar" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 71.445238796932927, 34.937756747875596 ], [ 71.289477580000096, 34.875030009000071 ], [ 71.203074585000138, 34.748164368000076 ], [ 71.080601441000056, 34.672923483000048 ], [ 71.065821981000113, 34.558460185000044 ], [ 70.822995232843709, 34.552309881995427 ], [ 70.741863234400739, 34.531045030004123 ], [ 70.73219974202442, 34.555048733112528 ], [ 70.765272658306515, 34.584271756036685 ], [ 70.696698032987797, 34.589826971737352 ], [ 70.652773065024917, 34.629979559808817 ], [ 70.66688073086101, 34.749352118405511 ], [ 70.615514356802066, 34.800201728526929 ], [ 70.617219680044172, 34.889834500261941 ], [ 70.574431593643112, 34.994040024927187 ], [ 70.651997918668997, 35.131602688513226 ], [ 70.852967563702066, 35.069280910885311 ], [ 70.967637567319855, 35.08734182376611 ], [ 71.034971958289191, 35.075197861791878 ], [ 71.09393476807503, 35.124057928730394 ], [ 71.11129804896575, 35.103439032785104 ], [ 71.20844974206193, 35.299886989992558 ], [ 71.353402134001271, 35.351976834463301 ], [ 71.443215772889573, 35.342959296334413 ], [ 71.469157342337439, 35.38781443938484 ], [ 71.593421979000141, 35.464193788000031 ], [ 71.622428833000072, 35.429621481000041 ], [ 71.620878540000035, 35.410139465000057 ], [ 71.53158166500009, 35.327922262000115 ], [ 71.529824667000071, 35.30089548800008 ], [ 71.637931763000097, 35.189687806000066 ], [ 71.604135376000102, 35.138166402000067 ], [ 71.508947388000138, 35.072020569000088 ], [ 71.511324504000072, 35.008716939000081 ], [ 71.445238796932927, 34.937756747875596 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-NUR", "NAME_1": "Nuristan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 71.169913421866909, 36.03080174600376 ], [ 71.257438192000109, 35.971552226000099 ], [ 71.341567424000061, 35.947264303000097 ], [ 71.371333049000043, 35.885149231000113 ], [ 71.431019328000048, 35.843704733000052 ], [ 71.47091353400009, 35.779936015000132 ], [ 71.475564413000029, 35.741023661000057 ], [ 71.519799438000064, 35.683766175000088 ], [ 71.483315877000052, 35.626560364000071 ], [ 71.593490031000101, 35.549355774000091 ], [ 71.581707805000065, 35.493131816000087 ], [ 71.593421979000141, 35.464193788000031 ], [ 71.579641554913792, 35.4471906603207 ], [ 71.469157342337439, 35.38781443938484 ], [ 71.443215772889573, 35.342959296334413 ], [ 71.353402134001271, 35.351976834463301 ], [ 71.20844974206193, 35.299886989992558 ], [ 71.11129804896575, 35.103439032785104 ], [ 71.09393476807503, 35.124057928730394 ], [ 71.034971958289191, 35.075197861791878 ], [ 70.967637567319855, 35.08734182376611 ], [ 70.852967563702066, 35.069280910885311 ], [ 70.651997918668997, 35.131602688513226 ], [ 70.555776401559626, 34.972749335413482 ], [ 70.496503534310648, 34.934534614580798 ], [ 70.391600375856626, 34.904071357307259 ], [ 70.259567092247494, 34.942156886930775 ], [ 70.150168085288897, 35.090985012448357 ], [ 70.026816441225776, 35.1075731469831 ], [ 70.010021600216646, 35.173615628558366 ], [ 69.972194452112262, 35.235782376555392 ], [ 69.974674920810912, 35.288854072057745 ], [ 69.921603225308559, 35.355826727821238 ], [ 70.031777377723756, 35.415642198328783 ], [ 70.076632520774183, 35.476000271195517 ], [ 70.135130242566618, 35.478093167165923 ], [ 70.163810663131585, 35.500055650248044 ], [ 70.177970004911742, 35.523775133415654 ], [ 70.171717157220996, 35.561111355104913 ], [ 70.210681186887257, 35.585683498994285 ], [ 70.231196730045042, 35.670355333331941 ], [ 70.294035271610483, 35.660562648847133 ], [ 70.383848911398104, 35.698131415432442 ], [ 70.479450310883124, 35.666944687747105 ], [ 70.499449090103383, 35.622063707174334 ], [ 70.554691196841247, 35.56687327727991 ], [ 70.535777622339367, 35.498453680692762 ], [ 70.543529086797889, 35.446312161177275 ], [ 70.576912062341762, 35.442410590076634 ], [ 70.634789667409166, 35.46569082277324 ], [ 70.650757684319672, 35.510700995454556 ], [ 70.687241245287225, 35.537004299209002 ], [ 70.757676222579562, 35.488764349894836 ], [ 70.86443973210794, 35.484242662069164 ], [ 70.882733188985469, 35.516282050476207 ], [ 70.86614505355135, 35.600256252823783 ], [ 70.877927281219002, 35.625706894957204 ], [ 70.959989454749518, 35.642372544757109 ], [ 71.013681267876166, 35.699164944206814 ], [ 70.96887780076986, 35.739601752219073 ], [ 70.973218622341506, 35.775413520517532 ], [ 71.024274937138614, 35.8048949240615 ], [ 71.067063022640355, 35.864787908934829 ], [ 71.084633010005348, 35.941940822810693 ], [ 71.169913421866909, 36.03080174600376 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-NAN", "NAME_1": "Nangarhar" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 70.983355946819472, 34.555256106883803 ], [ 70.956991415000061, 34.53200185200005 ], [ 70.970840698000131, 34.468879090000101 ], [ 71.05093916900006, 34.3897883100001 ], [ 71.122045939000088, 34.356818746000059 ], [ 71.12638675900007, 34.33222076400007 ], [ 71.097086223000133, 34.262457581000021 ], [ 71.1080933020001, 34.165228373 ], [ 71.062773071000095, 34.10530955000003 ], [ 71.062618042000054, 34.054253235000047 ], [ 70.939731486000085, 34.000923157000059 ], [ 70.88433435100012, 34.007046815000123 ], [ 70.862216837000119, 33.964775492000044 ], [ 70.491490112000065, 33.939609070000088 ], [ 70.328192587000103, 33.957282410000104 ], [ 70.002837769000109, 34.043788758000105 ], [ 69.905445463287649, 34.035847602660887 ], [ 69.792515496592841, 34.208093167365746 ], [ 69.727764927109661, 34.251656399223407 ], [ 69.48586754674983, 34.159000556430499 ], [ 69.480441522258388, 34.202357082713149 ], [ 69.617590772895824, 34.30111074536461 ], [ 69.664771355913331, 34.355035102487989 ], [ 69.66260094557714, 34.393172308954888 ], [ 70.006300897168614, 34.422033595773826 ], [ 70.064695266173544, 34.411594957041586 ], [ 70.353463169389727, 34.486887518943831 ], [ 70.394080844555276, 34.513294176385102 ], [ 70.419557326009738, 34.557219143448663 ], [ 70.40575971943548, 34.654680894907358 ], [ 70.494643182336972, 34.694936834867008 ], [ 70.50844078981055, 34.746768296919356 ], [ 70.585283644424635, 34.792321071959861 ], [ 70.615514356802066, 34.800201728526929 ], [ 70.658509148778137, 34.768937486475807 ], [ 70.667810906847819, 34.738009142108183 ], [ 70.647347039634155, 34.664292711339556 ], [ 70.652773065024917, 34.629979559808817 ], [ 70.696698032987797, 34.589826971737352 ], [ 70.765272658306515, 34.584271756036685 ], [ 70.73219974202442, 34.555048733112528 ], [ 70.741863234400739, 34.531045030004123 ], [ 70.822995232843709, 34.552309881995427 ], [ 70.983355946819472, 34.555256106883803 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-KHO", "NAME_1": "Khost" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.996478142951901, 33.742090995103297 ], [ 70.11812788900005, 33.71652191200009 ], [ 70.132545613000048, 33.661434835000122 ], [ 70.174093466000045, 33.632108459000065 ], [ 70.154973185000131, 33.506612244000067 ], [ 70.285714559000041, 33.382873027000031 ], [ 70.301579224000079, 33.351789653000097 ], [ 70.294447876000049, 33.318949280000069 ], [ 70.124794149000138, 33.199034119000075 ], [ 70.048002970000084, 33.194073181000036 ], [ 70.006868530000077, 33.131803080000012 ], [ 69.95581221600014, 33.127694805000104 ], [ 69.880933065000079, 33.089247539000056 ], [ 69.838713420000033, 33.086663717000064 ], [ 69.771844116000125, 33.114775696 ], [ 69.667767782000055, 33.077000224000031 ], [ 69.547516724000104, 33.07501068200007 ], [ 69.478125248000083, 33.011350078000035 ], [ 69.345307652326255, 33.043280545061066 ], [ 69.34081180202304, 33.067697659319492 ], [ 69.402875197232561, 33.140277208526356 ], [ 69.390007765745736, 33.194976712005655 ], [ 69.406130812287131, 33.265101630036156 ], [ 69.452639601736223, 33.330394801878583 ], [ 69.54560550289159, 33.401656603269601 ], [ 69.574647657763137, 33.4771817082692 ], [ 69.556612583304059, 33.504544379219681 ], [ 69.583639356571041, 33.554644680507579 ], [ 69.70637088390913, 33.605752672148071 ], [ 69.775255567590364, 33.611540431845413 ], [ 69.795926141278358, 33.599861558763905 ], [ 69.840626254697838, 33.646990464937971 ], [ 69.972194452112262, 33.69711660374827 ], [ 69.996478142951901, 33.742090995103297 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-PKA", "NAME_1": "Paktya" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.905445463287649, 34.035847602660887 ], [ 69.872613160000128, 34.017227071 ], [ 69.871993042000042, 33.971519267000062 ], [ 69.841090536000138, 33.941805319000096 ], [ 69.885428914000101, 33.889457093000075 ], [ 69.957517538000104, 33.752695415000019 ], [ 69.996478142951901, 33.742090995103297 ], [ 69.988782586647005, 33.712593696042234 ], [ 69.831427850314981, 33.641874497909726 ], [ 69.795926141278358, 33.599861558763905 ], [ 69.775255567590364, 33.611540431845413 ], [ 69.70637088390913, 33.605752672148071 ], [ 69.583639356571041, 33.554644680507579 ], [ 69.556612583304059, 33.504544379219681 ], [ 69.574647657763137, 33.4771817082692 ], [ 69.54560550289159, 33.401656603269601 ], [ 69.452639601736223, 33.330394801878583 ], [ 69.401169874889774, 33.244560248456708 ], [ 69.370422397675497, 33.2551797552415 ], [ 69.290220575219337, 33.237919827138285 ], [ 69.207796664684281, 33.275204372883479 ], [ 69.196014438815268, 33.245257880446786 ], [ 69.003571404596642, 33.153687242372314 ], [ 68.989773797123007, 33.194124050384573 ], [ 68.985898065343406, 33.349385890746248 ], [ 68.954427117717273, 33.397470811328844 ], [ 68.867662388308531, 33.419510810575446 ], [ 68.768805372869622, 33.393285020287408 ], [ 68.80017296680893, 33.464004218419916 ], [ 68.773301223172894, 33.522708644888041 ], [ 68.772371047186027, 33.612961534247404 ], [ 68.968844841915882, 33.602419541828397 ], [ 69.009514194824192, 33.613039049512508 ], [ 69.087700636575107, 33.720370998922419 ], [ 69.198339877883029, 33.789772447440498 ], [ 69.330218132760592, 33.846849066830941 ], [ 69.481061638983419, 33.975497545075598 ], [ 69.520645786273974, 34.038723660268658 ], [ 69.561883579063874, 34.053994046088349 ], [ 69.635625848254278, 34.052133694114673 ], [ 69.686527134319761, 34.038723660268658 ], [ 69.689937779005277, 34.010120754968852 ], [ 69.705440707922321, 34.006167507024827 ], [ 69.818250359566434, 34.07848867381324 ], [ 69.905445463287649, 34.035847602660887 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-PIA", "NAME_1": "Paktika" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.301157298970168, 31.941281701489288 ], [ 69.223763876000135, 31.881931051000024 ], [ 69.114313192000111, 31.737753804000036 ], [ 69.040105835000134, 31.673106588000067 ], [ 68.843528686000127, 31.606495666000072 ], [ 68.803841186000113, 31.602568258000119 ], [ 68.777279500000134, 31.618587952000055 ], [ 68.70544926000008, 31.701270244000042 ], [ 68.688292684000032, 31.768604634000027 ], [ 68.527475627000058, 31.822968242000101 ], [ 68.418748413000117, 31.783022360000032 ], [ 68.439574016000051, 31.766589254000067 ], [ 68.549799846000099, 31.75351511700002 ], [ 68.498020061000034, 31.725248108000059 ], [ 68.356064901000082, 31.762506816000055 ], [ 68.255037475000108, 31.766382548000124 ], [ 68.159126018000052, 31.825913798 ], [ 68.125743042000067, 31.81149607400009 ], [ 68.098340425969866, 31.759123609167204 ], [ 68.028953891808612, 31.802296860811452 ], [ 68.008955112588353, 31.87353282288143 ], [ 68.076444533188635, 32.003447373897188 ], [ 68.051329786940073, 32.098402818235456 ], [ 68.084816115271451, 32.178914699953395 ], [ 68.068072951105762, 32.249194648514219 ], [ 68.082645704935317, 32.2753429217384 ], [ 68.089622023037919, 32.399908963527821 ], [ 68.07690962118204, 32.450138455125568 ], [ 68.053190138913749, 32.509256292743714 ], [ 67.946736687747887, 32.578270169432756 ], [ 67.929321730013783, 32.612299099224003 ], [ 67.81542687365129, 32.691984157742638 ], [ 67.81883751833675, 32.706918646778092 ], [ 67.908082717343518, 32.817015285726825 ], [ 68.044663527199987, 32.720251166258322 ], [ 68.152770623865194, 32.730586453102319 ], [ 68.233334182426574, 32.77244436351657 ], [ 68.266975538590202, 32.806266587732807 ], [ 68.272763299186863, 32.8358255074412 ], [ 68.424640334184062, 32.975015978104864 ], [ 68.477867059317305, 33.103276881822637 ], [ 68.642973260107851, 33.232132066541624 ], [ 68.685347935358891, 33.326028144583177 ], [ 68.768805372869622, 33.393285020287408 ], [ 68.867662388308531, 33.419510810575446 ], [ 68.954427117717273, 33.397470811328844 ], [ 68.985898065343406, 33.349385890746248 ], [ 68.989773797123007, 33.194124050384573 ], [ 69.003571404596642, 33.153687242372314 ], [ 69.196014438815268, 33.245257880446786 ], [ 69.207796664684281, 33.275204372883479 ], [ 69.290220575219337, 33.237919827138285 ], [ 69.370422397675497, 33.2551797552415 ], [ 69.401169874889774, 33.244560248456708 ], [ 69.390007765745736, 33.194976712005655 ], [ 69.402875197232561, 33.140277208526356 ], [ 69.34081180202304, 33.067697659319492 ], [ 69.345307652326255, 33.043280545061066 ], [ 69.478125248000083, 33.011350078000035 ], [ 69.468503459000033, 32.994292095000063 ], [ 69.487210327000128, 32.88587493900009 ], [ 69.477288452000096, 32.856832785 ], [ 69.376312703000053, 32.771876729000027 ], [ 69.383237346000044, 32.744462383000084 ], [ 69.414656616000116, 32.725574646000055 ], [ 69.426025431000085, 32.655087992000077 ], [ 69.361223186000075, 32.568478293000069 ], [ 69.281951538000044, 32.532795715000063 ], [ 69.232858927000109, 32.462670797 ], [ 69.228001343000074, 32.42130381300008 ], [ 69.268102254000098, 32.301336976000059 ], [ 69.251049031000036, 32.130649720000079 ], [ 69.301157298970168, 31.941281701489288 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-ZAB", "NAME_1": "Zabul" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 68.098340425969866, 31.759123609167204 ], [ 68.06047570800007, 31.725558167000131 ], [ 68.046574748000069, 31.688402812000035 ], [ 67.966062867000119, 31.638224996000091 ], [ 67.842711223000094, 31.623497213000107 ], [ 67.748280163998345, 31.544392093020633 ], [ 67.652232699879164, 31.570941473770006 ], [ 67.560352004341496, 31.55021922503721 ], [ 67.41663984585216, 31.546395169201674 ], [ 67.421755811981086, 31.581302599035723 ], [ 67.396641065732581, 31.629852606712404 ], [ 67.335662876140816, 31.655277411323482 ], [ 67.31736941926323, 31.632746487460395 ], [ 67.29313317215815, 31.640730495915648 ], [ 67.263935987655657, 31.680262966362761 ], [ 67.229829542599305, 31.688841254020645 ], [ 67.188540073865283, 31.760955715234047 ], [ 67.054801467014045, 31.719201158506621 ], [ 66.954239130131725, 31.731009222797354 ], [ 66.770064325208409, 31.816972968327832 ], [ 66.692756381701599, 31.876943468466266 ], [ 66.549405959317539, 31.774908352338571 ], [ 66.435201043693155, 31.764521389550453 ], [ 66.311642694055081, 31.694809881770595 ], [ 66.190461460328095, 31.792840074010201 ], [ 66.182089878245279, 31.835111396473735 ], [ 66.299550408924176, 31.895391954075421 ], [ 66.329677769413479, 31.930170192700189 ], [ 66.343475375987794, 31.987505195408403 ], [ 66.310712518068215, 32.029363104923334 ], [ 66.341149936920033, 32.09289927847891 ], [ 66.325491978372099, 32.204391181407857 ], [ 66.400732863430846, 32.275317084216056 ], [ 66.431170282282665, 32.33474498109598 ], [ 66.498659701983627, 32.372236233315505 ], [ 66.523929477863078, 32.413086453377105 ], [ 66.539639113254452, 32.507318427303574 ], [ 66.477420689313306, 32.554757391840155 ], [ 66.444812860125353, 32.55695363969869 ], [ 66.392826369341435, 32.487397162449042 ], [ 66.358358189079127, 32.480911769862246 ], [ 66.31102257733005, 32.515199082971264 ], [ 66.327197299815509, 32.577469183755795 ], [ 66.418096144321566, 32.67376821523095 ], [ 66.514782749424342, 32.699813137466322 ], [ 66.560878126824036, 32.75986115197054 ], [ 66.623716669288854, 32.759938666336382 ], [ 66.598446893409346, 32.677902330328266 ], [ 66.616430291924416, 32.665060737263218 ], [ 66.664075962036009, 32.683845120555873 ], [ 66.689500766647029, 32.741412665462121 ], [ 66.794093865839216, 32.806576646095323 ], [ 66.905043166408973, 32.831588040455699 ], [ 66.958269890642896, 32.819831651209711 ], [ 66.987312046413763, 32.830502834837944 ], [ 67.005760532922238, 32.860888576846321 ], [ 67.011496615776139, 32.927137763097278 ], [ 67.0535612317654, 32.933571478840634 ], [ 67.0971244654217, 32.999846503513311 ], [ 67.072164747904765, 33.040645046731527 ], [ 67.082086622699421, 33.059972032383371 ], [ 67.160634799656236, 33.05705231411298 ], [ 67.189470248952773, 32.993593654923188 ], [ 67.250448439443915, 32.988736070313394 ], [ 67.258199903902437, 32.965016588045103 ], [ 67.294218377775906, 32.947084866373473 ], [ 67.351165805957123, 32.952433377398449 ], [ 67.39834638897463, 33.002947088936992 ], [ 67.425166456666602, 33.009122423161273 ], [ 67.418500196926516, 32.983697618550252 ], [ 67.43746544827178, 32.941064560880761 ], [ 67.376797316143211, 32.899361680996776 ], [ 67.440876092057977, 32.852284450766774 ], [ 67.407648146144993, 32.835515449078684 ], [ 67.406562941426557, 32.798851020058521 ], [ 67.465680779944023, 32.730147203530578 ], [ 67.617764519616856, 32.601369534076696 ], [ 67.663704868285038, 32.580802314075527 ], [ 67.594613478129475, 32.513700466203545 ], [ 67.658227166950155, 32.474323025387264 ], [ 67.685253941116457, 32.420346991420502 ], [ 67.733984815946485, 32.41050263099163 ], [ 67.780700310970531, 32.378618272215476 ], [ 67.725148145870207, 32.320430610584197 ], [ 67.645204705832498, 32.306297105427063 ], [ 67.629236688022729, 32.258160508900346 ], [ 67.706958041780183, 32.244414578270153 ], [ 67.721427442822176, 32.224131578209722 ], [ 67.720032179741281, 32.158890082311416 ], [ 67.845554234140536, 32.124757798833343 ], [ 67.921105177561856, 32.076595363884906 ], [ 68.005389439171267, 32.073184719199389 ], [ 68.051329786940073, 32.098402818235456 ], [ 68.076444533188635, 32.003447373897188 ], [ 68.010040318206109, 31.885315050549139 ], [ 68.010040318206109, 31.858159085173611 ], [ 68.028953891808612, 31.802296860811452 ], [ 68.098340425969866, 31.759123609167204 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-KAN", "NAME_1": "Kandahar" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 67.748280163998345, 31.544392093020633 ], [ 67.665461060000041, 31.518128967000067 ], [ 67.568981160000078, 31.529859517000048 ], [ 67.556113729000117, 31.51218617800005 ], [ 67.61145918800014, 31.410797018000025 ], [ 67.65114668800004, 31.395294088000085 ], [ 67.770364217000122, 31.394673971000131 ], [ 67.764731486000073, 31.334057516000044 ], [ 67.692797892000044, 31.32522084600005 ], [ 67.583657267000092, 31.26522450800006 ], [ 67.346204061000094, 31.207760315000044 ], [ 67.213757365000106, 31.212256165000056 ], [ 67.13675948100007, 31.241091614000098 ], [ 67.035266968000087, 31.235923971000076 ], [ 67.015268189000039, 31.244657288000056 ], [ 67.025965210000095, 31.27302764900007 ], [ 67.016818482000076, 31.309149475000098 ], [ 66.905920858000059, 31.305532125000113 ], [ 66.838483113000052, 31.277006734000068 ], [ 66.759521525000082, 31.21478831000006 ], [ 66.696993042000088, 31.195823059000091 ], [ 66.663093303000096, 31.083116760000067 ], [ 66.55002526800007, 30.976973368000031 ], [ 66.375358927000093, 30.93671742800008 ], [ 66.267975301000035, 30.601389059000084 ], [ 66.264926391000074, 30.557825826000041 ], [ 66.313760620000039, 30.47829579700003 ], [ 66.321822144000066, 30.437368063000022 ], [ 66.305285685000058, 30.24477 ], [ 66.219296102000101, 30.057856344000086 ], [ 66.340529013000037, 29.956570536000086 ], [ 66.275210001000062, 29.885153707000072 ], [ 66.195628296000052, 29.835337627000044 ], [ 65.036370890000057, 29.540161845000043 ], [ 64.820311727000103, 29.567886251000076 ], [ 64.499477017000061, 29.570202960000088 ], [ 64.660167271402429, 30.415301419225102 ], [ 64.673654819614228, 30.738408311494368 ], [ 64.736028273186207, 31.425110581787919 ], [ 64.821242709883109, 31.716333116180351 ], [ 64.792665643004966, 31.743954169549284 ], [ 64.812251011075261, 31.838909613887552 ], [ 64.905216913130005, 31.925441799299563 ], [ 64.920254754952964, 32.004455064249782 ], [ 64.94614464665807, 32.044400946746293 ], [ 65.010068393841266, 32.073856512767804 ], [ 65.067635938747571, 32.055356350315321 ], [ 65.109855585267042, 32.060859890071868 ], [ 65.139982944856968, 32.137289334435195 ], [ 65.129389275594576, 32.15263723372135 ], [ 65.149439731658276, 32.169948839567269 ], [ 65.166492954186481, 32.231030381946539 ], [ 65.216619093896043, 32.264103298228633 ], [ 65.235377638766977, 32.323944607157898 ], [ 65.268140496686556, 32.302369696804021 ], [ 65.333149448588131, 32.303351548734952 ], [ 65.414333123874542, 32.27405101234433 ], [ 65.442858513909243, 32.281466580018616 ], [ 65.42627038027382, 32.316890773790135 ], [ 65.463942498747315, 32.364872340685963 ], [ 65.457276239007172, 32.427323310422423 ], [ 65.513293491201637, 32.459466050717651 ], [ 65.533809035258741, 32.513054511056794 ], [ 65.589051141097229, 32.572663275989385 ], [ 65.715038282590626, 32.568348293738723 ], [ 65.716743604933413, 32.439829005803972 ], [ 65.806557244721034, 32.488017280073393 ], [ 65.999310337302177, 32.465744736830118 ], [ 66.035948927900677, 32.428718574402694 ], [ 66.13196373943498, 32.420321152998781 ], [ 66.170617709839405, 32.429312852705948 ], [ 66.186275669286658, 32.470240587133389 ], [ 66.209891798767444, 32.458561713152505 ], [ 66.326577183090478, 32.491660467856263 ], [ 66.387090284688838, 32.483159695463542 ], [ 66.444812860125353, 32.55695363969869 ], [ 66.477420689313306, 32.554757391840155 ], [ 66.537468702918261, 32.512951158269345 ], [ 66.523929477863078, 32.413086453377105 ], [ 66.498659701983627, 32.372236233315505 ], [ 66.431170282282665, 32.33474498109598 ], [ 66.400732863430846, 32.275317084216056 ], [ 66.325491978372099, 32.204391181407857 ], [ 66.341149936920033, 32.09289927847891 ], [ 66.310712518068215, 32.029363104923334 ], [ 66.343475375987794, 31.987505195408403 ], [ 66.329677769413479, 31.930170192700189 ], [ 66.299550408924176, 31.895391954075421 ], [ 66.182089878245279, 31.835111396473735 ], [ 66.190461460328095, 31.792840074010201 ], [ 66.311642694055081, 31.694809881770595 ], [ 66.435201043693155, 31.764521389550453 ], [ 66.549405959317539, 31.774908352338571 ], [ 66.692756381701599, 31.876943468466266 ], [ 66.770064325208409, 31.816972968327832 ], [ 66.954239130131725, 31.731009222797354 ], [ 67.054801467014045, 31.719201158506621 ], [ 67.188540073865283, 31.760955715234047 ], [ 67.229829542599305, 31.688841254020645 ], [ 67.263935987655657, 31.680262966362761 ], [ 67.29313317215815, 31.640730495915648 ], [ 67.31736941926323, 31.632746487460395 ], [ 67.335662876140816, 31.655277411323482 ], [ 67.396641065732581, 31.629852606712404 ], [ 67.421755811981086, 31.581302599035723 ], [ 67.41663984585216, 31.546395169201674 ], [ 67.560352004341496, 31.55021922503721 ], [ 67.652232699879164, 31.570941473770006 ], [ 67.748280163998345, 31.544392093020633 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-HEL", "NAME_1": "Hilmand" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 64.499477017000061, 29.570202960000088 ], [ 64.207739299000139, 29.499983419000031 ], [ 64.172599325000078, 29.484299622000051 ], [ 64.113378134000072, 29.396294658000059 ], [ 64.086092977000078, 29.386605326000037 ], [ 63.971991414000058, 29.429574280000097 ], [ 63.568605184000091, 29.497477112000055 ], [ 62.602581131613931, 29.418069628010926 ], [ 62.720957473408646, 29.90703786920227 ], [ 62.718373651023171, 30.006334133313601 ], [ 62.758681267826205, 30.073177598767131 ], [ 62.767517937902483, 30.204539088807906 ], [ 62.889939405978794, 30.276421006923897 ], [ 62.96228641118887, 30.365950425871461 ], [ 63.011482374911623, 30.456926784743303 ], [ 63.092304314992134, 30.518705960012028 ], [ 63.098350458007189, 30.539273180013254 ], [ 63.0619185729837, 30.608829658162165 ], [ 63.085172967258586, 30.650222480583011 ], [ 63.057371046736364, 30.681770942574929 ], [ 63.156538119638469, 30.773651638112597 ], [ 63.143050572326047, 30.936354885469541 ], [ 63.225939569055811, 30.985860908454129 ], [ 63.285522494667362, 31.083529365487834 ], [ 63.342935011741361, 31.125283922215203 ], [ 63.349601270582127, 31.250030829359275 ], [ 63.316373324669144, 31.316615912394411 ], [ 63.352701856905128, 31.374958604555957 ], [ 63.354407180147234, 31.480249334838902 ], [ 63.407633905280477, 31.804932359141048 ], [ 63.429493035575092, 31.860329495509802 ], [ 63.497757603430614, 31.918749701137756 ], [ 63.538892043433009, 31.996264350219576 ], [ 63.533621046773874, 32.038716538937081 ], [ 63.569639519748023, 32.079902655782917 ], [ 63.538426955439604, 32.136669215911581 ], [ 63.530055373356788, 32.200205390366477 ], [ 63.649841343103446, 32.25803131769112 ], [ 63.726477492142521, 32.319577948963172 ], [ 63.826729770662382, 32.322471828811842 ], [ 63.846780226726025, 32.355518907571479 ], [ 63.917680292011823, 32.403913886516648 ], [ 63.952406853793264, 32.400244859412737 ], [ 64.014366896215279, 32.444867459365753 ], [ 64.022738478298095, 32.466752428082088 ], [ 63.996021763393628, 32.533699246323124 ], [ 64.014211866584333, 32.571655584737414 ], [ 64.029714797300016, 32.575531318315655 ], [ 64.04366743440454, 32.55752208137892 ], [ 64.177406040356459, 32.57219818799598 ], [ 64.284634636978865, 32.621497504506181 ], [ 64.30096438999459, 32.664233914063857 ], [ 64.255179070957354, 32.688651028322283 ], [ 64.266651239363171, 32.719527695846466 ], [ 64.334605747057537, 32.767741808537608 ], [ 64.395428907917733, 32.848925482924699 ], [ 64.578880243328513, 32.913805242717729 ], [ 64.540536330387283, 32.938480740293926 ], [ 64.573247512362798, 32.995531521262649 ], [ 64.562705519044414, 33.010543525563207 ], [ 64.614381952365193, 33.066870836120188 ], [ 64.715874465234378, 33.133378403890219 ], [ 64.699441359431148, 33.140742296519761 ], [ 64.697115920363387, 33.165882880290667 ], [ 64.738405389097409, 33.208670965792408 ], [ 64.725176223304004, 33.227791245869298 ], [ 64.782433709847794, 33.246834011580347 ], [ 64.791942172593167, 33.209058539420028 ], [ 64.823878208212705, 33.204433498806907 ], [ 64.890127393564342, 33.254895535300705 ], [ 64.953275995290937, 33.249211127491492 ], [ 65.158741489727959, 33.362640895860636 ], [ 65.219099561695373, 33.362950955122471 ], [ 65.258218621891842, 33.335097357756808 ], [ 65.297441033976497, 33.330084744415387 ], [ 65.296510857989688, 33.29760610643666 ], [ 65.361726516365593, 33.220194811041665 ], [ 65.34818729041109, 33.092476507884498 ], [ 65.324467808142799, 33.092476507884498 ], [ 65.28860436390022, 33.063150133072156 ], [ 65.285038689583814, 33.027312527251297 ], [ 65.18437299991399, 32.896183580307991 ], [ 65.211038038874392, 32.85817556415094 ], [ 65.197550489763273, 32.800995591972992 ], [ 65.20809248218228, 32.771824245892219 ], [ 65.177810092961408, 32.685317898002552 ], [ 65.269690790297716, 32.647103176270548 ], [ 65.293720330928522, 32.558917345359191 ], [ 65.262869500926683, 32.510729071989033 ], [ 65.273566522077317, 32.440139065065807 ], [ 65.218789504232177, 32.267824002175928 ], [ 65.166492954186481, 32.231030381946539 ], [ 65.149439731658276, 32.169948839567269 ], [ 65.129389275594576, 32.15263723372135 ], [ 65.139982944856968, 32.137289334435195 ], [ 65.109855585267042, 32.060859890071868 ], [ 65.067635938747571, 32.055356350315321 ], [ 65.010068393841266, 32.073856512767804 ], [ 64.94614464665807, 32.044400946746293 ], [ 64.920254754952964, 32.004455064249782 ], [ 64.905216913130005, 31.925441799299563 ], [ 64.812251011075261, 31.838909613887552 ], [ 64.792665643004966, 31.743954169549284 ], [ 64.821242709883109, 31.716333116180351 ], [ 64.736028273186207, 31.425110581787919 ], [ 64.673654819614228, 30.738408311494368 ], [ 64.660167271402429, 30.415301419225102 ], [ 64.499477017000061, 29.570202960000088 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-URU", "NAME_1": "Uruzgan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 66.829182162826498, 33.280940457536076 ], [ 66.844220004649458, 33.249133613125707 ], [ 66.972222527747419, 33.249391995544158 ], [ 67.000334506632157, 33.227713731503513 ], [ 66.999714389907126, 33.196527004717495 ], [ 66.91558515792866, 33.13301666958364 ], [ 66.906283399858978, 33.048370672768328 ], [ 66.93005455897071, 32.952588406130019 ], [ 67.011496615776139, 32.927137763097278 ], [ 67.005760532922238, 32.860888576846321 ], [ 66.987312046413763, 32.830502834837944 ], [ 66.958269890642896, 32.819831651209711 ], [ 66.905043166408973, 32.831588040455699 ], [ 66.794093865839216, 32.806576646095323 ], [ 66.689500766647029, 32.741412665462121 ], [ 66.664075962036009, 32.683845120555873 ], [ 66.616430291924416, 32.665060737263218 ], [ 66.598446893409346, 32.677902330328266 ], [ 66.623716669288854, 32.759938666336382 ], [ 66.560878126824036, 32.75986115197054 ], [ 66.53075076723411, 32.711698717022159 ], [ 66.418096144321566, 32.67376821523095 ], [ 66.335878941160161, 32.588553779433369 ], [ 66.310609165280709, 32.519436549956822 ], [ 66.326577183090478, 32.491660467856263 ], [ 66.286527947806519, 32.470085558401763 ], [ 66.209891798767444, 32.458561713152505 ], [ 66.186275669286658, 32.470240587133389 ], [ 66.164571567723613, 32.425127060765249 ], [ 66.044940626708524, 32.425928046442152 ], [ 65.999310337302177, 32.465744736830118 ], [ 65.806557244721034, 32.488017280073393 ], [ 65.713798049140621, 32.440164903487471 ], [ 65.715038282590626, 32.568348293738723 ], [ 65.597577752810992, 32.574756171060415 ], [ 65.543885938785024, 32.527575588942284 ], [ 65.505697056374004, 32.451301174209789 ], [ 65.457276239007172, 32.427323310422423 ], [ 65.463942498747315, 32.364872340685963 ], [ 65.42627038027382, 32.316890773790135 ], [ 65.437122430156023, 32.276867376927896 ], [ 65.333149448588131, 32.303351548734952 ], [ 65.268140496686556, 32.302369696804021 ], [ 65.235377638766977, 32.323944607157898 ], [ 65.273566522077317, 32.440139065065807 ], [ 65.262869500926683, 32.510729071989033 ], [ 65.293720330928522, 32.558917345359191 ], [ 65.269690790297716, 32.647103176270548 ], [ 65.177810092961408, 32.685317898002552 ], [ 65.20809248218228, 32.771824245892219 ], [ 65.197550489763273, 32.800995591972992 ], [ 65.211038038874392, 32.85817556415094 ], [ 65.18437299991399, 32.896183580307991 ], [ 65.285038689583814, 33.027312527251297 ], [ 65.28860436390022, 33.063150133072156 ], [ 65.324467808142799, 33.092476507884498 ], [ 65.416968622204138, 33.067129218538582 ], [ 65.44936974491776, 33.091933906424629 ], [ 65.490814243282671, 33.076973578068134 ], [ 65.471435580787386, 33.144178778727621 ], [ 65.482442661199798, 33.150199083321013 ], [ 65.574581740055237, 33.145289821867777 ], [ 65.659331088758734, 33.105524807423876 ], [ 65.758653192191048, 33.109323024837693 ], [ 65.799425896987543, 33.142783514747407 ], [ 65.878594190669332, 33.090357774391748 ], [ 66.049746535374254, 33.061599840360316 ], [ 66.090105829020786, 33.186346747504388 ], [ 66.314949985953035, 33.306158556572086 ], [ 66.382904493647459, 33.296882636024804 ], [ 66.47442345577781, 33.319000148737871 ], [ 66.52842532726703, 33.242803250169857 ], [ 66.556382277420141, 33.236937975207354 ], [ 66.69167117698322, 33.280888779793315 ], [ 66.740402052712511, 33.318638414431234 ], [ 66.766808710153839, 33.271328640204558 ], [ 66.829182162826498, 33.280940457536076 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-GHA", "NAME_1": "Ghazni" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 66.870161574097324, 33.245206204502722 ], [ 66.844220004649458, 33.249133613125707 ], [ 66.829182162826498, 33.280940457536076 ], [ 66.860343052090172, 33.426564643043832 ], [ 66.829492222088334, 33.526377671991952 ], [ 66.844375034280404, 33.580224513850226 ], [ 66.958890008267247, 33.629007066422957 ], [ 67.045344680212793, 33.638618882855155 ], [ 67.182028842856766, 33.683887437055546 ], [ 67.225333693195353, 33.737295030241455 ], [ 67.382688430426697, 33.865323390861761 ], [ 67.362482944732108, 33.923459378347616 ], [ 67.327601353319778, 33.947282213403412 ], [ 67.367598910861034, 34.012084458830714 ], [ 67.346980014915744, 34.036630764298309 ], [ 67.377417433767505, 34.099469305863749 ], [ 67.431367629312604, 34.13864004200434 ], [ 67.526503940804218, 34.142360745052315 ], [ 67.543402133701477, 34.176441351687004 ], [ 67.579575637205835, 34.196362617440798 ], [ 67.672696567992205, 34.209333400815751 ], [ 67.740496046954945, 34.191815090294142 ], [ 67.807520379561822, 34.149647122416752 ], [ 67.867258334804262, 34.14401439145098 ], [ 67.959449089603766, 34.165718492114706 ], [ 68.032364535594809, 34.203028876281621 ], [ 68.054275343632185, 34.198843085240185 ], [ 68.112463006162784, 34.147270006505551 ], [ 68.145174188138242, 33.956325589054643 ], [ 68.230388624835143, 33.926870022133812 ], [ 68.404176466970341, 33.786051744392466 ], [ 68.456162957754259, 33.786516832385871 ], [ 68.456938104110179, 33.694481106317994 ], [ 68.554193149993864, 33.680838528475306 ], [ 68.645608758437447, 33.726882229031617 ], [ 68.711857944688347, 33.790056668280613 ], [ 68.745861036957251, 33.774166164836629 ], [ 68.772681104649223, 33.715255031894173 ], [ 68.744775832238815, 33.677014471740449 ], [ 68.769425489594653, 33.635259915013023 ], [ 68.773301223172894, 33.522708644888041 ], [ 68.80017296680893, 33.464004218419916 ], [ 68.768805372869622, 33.393285020287408 ], [ 68.685347935358891, 33.326028144583177 ], [ 68.642973260107851, 33.232132066541624 ], [ 68.477867059317305, 33.103276881822637 ], [ 68.424640334184062, 32.975015978104864 ], [ 68.272763299186863, 32.8358255074412 ], [ 68.259534133393515, 32.795492052216389 ], [ 68.179332310038035, 32.739500637544381 ], [ 68.052725050920344, 32.719527695846466 ], [ 67.993710565190383, 32.745779324556167 ], [ 67.908082717343518, 32.817015285726825 ], [ 67.81883751833675, 32.706918646778092 ], [ 67.81542687365129, 32.691984157742638 ], [ 67.929321730013783, 32.612299099224003 ], [ 67.946736687747887, 32.578270169432756 ], [ 68.053190138913749, 32.509256292743714 ], [ 68.07690962118204, 32.450138455125568 ], [ 68.089622023037919, 32.399908963527821 ], [ 68.082645704935317, 32.2753429217384 ], [ 68.068072951105762, 32.249194648514219 ], [ 68.084816115271451, 32.178914699953395 ], [ 68.051329786940073, 32.098402818235456 ], [ 68.005389439171267, 32.073184719199389 ], [ 67.930561965262427, 32.07341726319612 ], [ 67.845554234140536, 32.124757798833343 ], [ 67.744371778734546, 32.144524034056928 ], [ 67.71708662304917, 32.162300726996932 ], [ 67.722822706802447, 32.214829820140039 ], [ 67.706958041780183, 32.244414578270153 ], [ 67.682773472417807, 32.257411200066826 ], [ 67.632647332708189, 32.252191881150395 ], [ 67.645204705832498, 32.306297105427063 ], [ 67.725148145870207, 32.320430610584197 ], [ 67.780700310970531, 32.378618272215476 ], [ 67.733984815946485, 32.41050263099163 ], [ 67.685253941116457, 32.420346991420502 ], [ 67.658227166950155, 32.474323025387264 ], [ 67.594613478129475, 32.513700466203545 ], [ 67.663704868285038, 32.580802314075527 ], [ 67.617764519616856, 32.601369534076696 ], [ 67.465680779944023, 32.730147203530578 ], [ 67.406562941426557, 32.798851020058521 ], [ 67.407648146144993, 32.835515449078684 ], [ 67.440876092057977, 32.852284450766774 ], [ 67.376797316143211, 32.899361680996776 ], [ 67.43746544827178, 32.941064560880761 ], [ 67.418500196926516, 32.983697618550252 ], [ 67.427543572577804, 33.006745307250128 ], [ 67.39834638897463, 33.002947088936992 ], [ 67.351165805957123, 32.952433377398449 ], [ 67.294218377775906, 32.947084866373473 ], [ 67.258199903902437, 32.965016588045103 ], [ 67.250448439443915, 32.988736070313394 ], [ 67.189470248952773, 32.993593654923188 ], [ 67.160634799656236, 33.05705231411298 ], [ 67.095470819023035, 33.063511868278056 ], [ 67.071544631179734, 33.049430039964363 ], [ 67.0971244654217, 32.999846503513311 ], [ 67.0535612317654, 32.933571478840634 ], [ 67.011496615776139, 32.927137763097278 ], [ 66.939046257778557, 32.945302028765582 ], [ 66.910314162168845, 32.996280829196905 ], [ 66.914654981941851, 33.129761054529013 ], [ 66.999714389907126, 33.196527004717495 ], [ 67.000334506632157, 33.227713731503513 ], [ 66.972222527747419, 33.249391995544158 ], [ 66.870161574097324, 33.245206204502722 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-PAR", "NAME_1": "Parwan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 70.176833124249242, 35.892253933572135 ], [ 70.273364698821752, 35.850215156004651 ], [ 70.215487094653668, 35.598757636056064 ], [ 70.171717157220996, 35.561111355104913 ], [ 70.177970004911742, 35.523775133415654 ], [ 70.151253290007276, 35.4884284531106 ], [ 70.076632520774183, 35.476000271195517 ], [ 70.031777377723756, 35.415642198328783 ], [ 69.921603225308559, 35.355826727821238 ], [ 69.974674920810912, 35.288854072057745 ], [ 69.972194452112262, 35.235782376555392 ], [ 69.919587843703994, 35.16715607439329 ], [ 69.816079950129563, 35.117598375464638 ], [ 69.796856317265224, 35.080856432078633 ], [ 69.728074986371496, 35.150361233384217 ], [ 69.678000522605998, 35.164572252007815 ], [ 69.429850294555422, 35.153461818807898 ], [ 69.307738884841626, 35.181883856954414 ], [ 69.245675489632106, 35.157285875542698 ], [ 69.26350385941555, 35.392413642475617 ], [ 69.402875197232561, 35.416262315053757 ], [ 69.456877068721724, 35.457836005527213 ], [ 69.556147495310654, 35.456182359128547 ], [ 69.748900587891796, 35.541086738362253 ], [ 69.782386916223174, 35.653121242751126 ], [ 69.817630242841403, 35.705572822427769 ], [ 69.870856967974646, 35.715623888431708 ], [ 69.961032342068904, 35.80985586235812 ], [ 69.98599205868652, 35.791769111055601 ], [ 70.135595330560022, 35.828304347967276 ], [ 70.171562127590107, 35.860705471580218 ], [ 70.176833124249242, 35.892253933572135 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-KAB", "NAME_1": "Kabul" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.897056918941644, 34.853609320813462 ], [ 69.927804396155921, 34.753847967809463 ], [ 69.853338658352357, 34.681604316286155 ], [ 69.850703159123441, 34.616001085181892 ], [ 69.82336632659468, 34.584607651921601 ], [ 69.839075961985998, 34.529933986863966 ], [ 69.80925866075853, 34.456295071360444 ], [ 69.812049187819753, 34.411026516260677 ], [ 69.66260094557714, 34.393172308954888 ], [ 69.664771355913331, 34.355035102487989 ], [ 69.617590772895824, 34.30111074536461 ], [ 69.480441522258388, 34.202357082713149 ], [ 69.48586754674983, 34.159000556430499 ], [ 69.469434441845976, 34.143290921039181 ], [ 69.281487257930564, 34.36407847813922 ], [ 69.181131625723935, 34.309534003391548 ], [ 69.116897821077544, 34.307751165783657 ], [ 68.969154901177717, 34.349143989103766 ], [ 68.946210565265346, 34.413093573809363 ], [ 68.867352329046696, 34.4457789173631 ], [ 68.841927525334995, 34.492752793906277 ], [ 68.850299107417868, 34.587501533568911 ], [ 68.875723911129569, 34.661579697744855 ], [ 68.871538120088132, 34.704186916992626 ], [ 68.982797479020405, 34.895389715962608 ], [ 69.055144484230539, 34.880145169463958 ], [ 69.209812046288846, 34.879473374996223 ], [ 69.299212274027184, 34.832241116034652 ], [ 69.346702915407207, 34.749558823980522 ], [ 69.394968703143093, 34.725839341712231 ], [ 69.448298781063841, 34.591222235717566 ], [ 69.469589470577546, 34.588302517447175 ], [ 69.52328128370425, 34.606466783115536 ], [ 69.557077671297463, 34.655378525998174 ], [ 69.626634149446431, 34.639281317878499 ], [ 69.719238316295218, 34.650391751078416 ], [ 69.779751417893578, 34.778135890858664 ], [ 69.857369418863584, 34.813456732741997 ], [ 69.897056918941644, 34.853609320813462 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-LAG", "NAME_1": "Laghman" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.812049187819753, 34.411026516260677 ], [ 69.80925866075853, 34.456295071360444 ], [ 69.839075961985998, 34.529933986863966 ], [ 69.82336632659468, 34.584607651921601 ], [ 69.850703159123441, 34.616001085181892 ], [ 69.853338658352357, 34.681604316286155 ], [ 69.927804396155921, 34.753847967809463 ], [ 69.928889601773676, 34.780151272463229 ], [ 69.897056918941644, 34.853609320813462 ], [ 69.916177199018477, 34.876734523879179 ], [ 69.906720412217226, 34.912132880128297 ], [ 69.796856317265224, 35.080856432078633 ], [ 69.816079950129563, 35.117598375464638 ], [ 69.919587843703994, 35.16715607439329 ], [ 69.972194452112262, 35.235782376555392 ], [ 70.010021600216646, 35.173615628558366 ], [ 70.026816441225776, 35.1075731469831 ], [ 70.150168085288897, 35.090985012448357 ], [ 70.270884230123102, 34.936110744814982 ], [ 70.391600375856626, 34.904071357307259 ], [ 70.508130731448091, 34.939986477493903 ], [ 70.574431593643112, 34.994040024927187 ], [ 70.586833937136475, 34.98081085913384 ], [ 70.617219680044172, 34.889834500261941 ], [ 70.615514356802066, 34.800201728526929 ], [ 70.519034458173678, 34.757723700488384 ], [ 70.494643182336972, 34.694936834867008 ], [ 70.40575971943548, 34.654680894907358 ], [ 70.421417677983413, 34.571275133340691 ], [ 70.394080844555276, 34.513294176385102 ], [ 70.303337029680165, 34.465855210949201 ], [ 70.064695266173544, 34.411594957041586 ], [ 70.006300897168614, 34.422033595773826 ], [ 69.812049187819753, 34.411026516260677 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-LOG", "NAME_1": "Logar" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.281487257930564, 34.36407847813922 ], [ 69.391971469607597, 34.248710842531352 ], [ 69.462303094112485, 34.143135891408235 ], [ 69.735102980418162, 34.250157783355007 ], [ 69.792515496592841, 34.208093167365746 ], [ 69.897573683778432, 34.045079860746966 ], [ 69.818250359566434, 34.07848867381324 ], [ 69.705440707922321, 34.006167507024827 ], [ 69.66973229420995, 34.045260727900256 ], [ 69.542659947098855, 34.050066637465306 ], [ 69.514289584896403, 34.033220120512112 ], [ 69.481061638983419, 33.975497545075598 ], [ 69.330218132760592, 33.846849066830941 ], [ 69.198339877883029, 33.789772447440498 ], [ 69.087700636575107, 33.720370998922419 ], [ 69.009514194824192, 33.613039049512508 ], [ 68.968844841915882, 33.602419541828397 ], [ 68.772371047186027, 33.612961534247404 ], [ 68.744775832238815, 33.677014471740449 ], [ 68.772681104649223, 33.715255031894173 ], [ 68.745861036957251, 33.774166164836629 ], [ 68.711857944688347, 33.790056668280613 ], [ 68.757333205363125, 33.842430731792831 ], [ 68.763844436371585, 33.878190823247849 ], [ 68.746481153682282, 33.910178533912188 ], [ 68.762139113129535, 33.933975532344903 ], [ 68.798002557372115, 33.964309597509896 ], [ 68.888126254622932, 33.992860825966318 ], [ 68.871693149719079, 34.030377915708243 ], [ 68.806684197817447, 34.089082343075631 ], [ 68.84084231971724, 34.197086086953334 ], [ 68.893603956857078, 34.240856025285325 ], [ 68.969154901177717, 34.349143989103766 ], [ 69.116897821077544, 34.307751165783657 ], [ 69.181131625723935, 34.309534003391548 ], [ 69.281487257930564, 34.36407847813922 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-KAP", "NAME_1": "Kapisa" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.897056918941644, 34.853609320813462 ], [ 69.857369418863584, 34.813456732741997 ], [ 69.779751417893578, 34.778135890858664 ], [ 69.719238316295218, 34.650391751078416 ], [ 69.637641228959524, 34.639281317878499 ], [ 69.604258254314971, 34.649306546359981 ], [ 69.615110305096493, 34.694290879720313 ], [ 69.564674107024416, 34.757439480547589 ], [ 69.565966018217125, 34.910272529053941 ], [ 69.428765089836986, 34.935929876762373 ], [ 69.367786900245221, 34.989957587572576 ], [ 69.297661981315343, 35.013857936994157 ], [ 69.278386671607564, 35.048506985309132 ], [ 69.28334760900492, 35.161704210580808 ], [ 69.307738884841626, 35.181883856954414 ], [ 69.429850294555422, 35.153461818807898 ], [ 69.564053990299385, 35.152531642821032 ], [ 69.633300409186518, 35.168758043049252 ], [ 69.728074986371496, 35.150361233384217 ], [ 69.852408482365547, 35.011454983560611 ], [ 69.906720412217226, 34.912132880128297 ], [ 69.916177199018477, 34.876734523879179 ], [ 69.897056918941644, 34.853609320813462 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-WAR", "NAME_1": "Wardak" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 68.862701450011855, 34.622228095350295 ], [ 68.841927525334995, 34.492752793906277 ], [ 68.867352329046696, 34.4457789173631 ], [ 68.946210565265346, 34.413093573809363 ], [ 68.969154901177717, 34.349143989103766 ], [ 68.893603956857078, 34.240856025285325 ], [ 68.84084231971724, 34.197086086953334 ], [ 68.810094841603643, 34.124894111374147 ], [ 68.811645135214803, 34.077816881144145 ], [ 68.871693149719079, 34.030377915708243 ], [ 68.888126254622932, 33.992860825966318 ], [ 68.773507927848584, 33.946868801354071 ], [ 68.746481153682282, 33.910178533912188 ], [ 68.763844436371585, 33.878190823247849 ], [ 68.745395948963846, 33.82178599742582 ], [ 68.645608758437447, 33.726882229031617 ], [ 68.545666538280102, 33.677996324570699 ], [ 68.454302605780583, 33.69711660374827 ], [ 68.456162957754259, 33.786516832385871 ], [ 68.404176466970341, 33.786051744392466 ], [ 68.230388624835143, 33.926870022133812 ], [ 68.145174188138242, 33.956325589054643 ], [ 68.112463006162784, 34.147270006505551 ], [ 68.069158155824198, 34.190419827213248 ], [ 68.032364535594809, 34.203028876281621 ], [ 67.959449089603766, 34.165718492114706 ], [ 67.867258334804262, 34.14401439145098 ], [ 67.807520379561822, 34.149647122416752 ], [ 67.740496046954945, 34.191815090294142 ], [ 67.647530144900259, 34.208248196097372 ], [ 67.562677443409257, 34.190290636004022 ], [ 67.526503940804218, 34.142360745052315 ], [ 67.431367629312604, 34.13864004200434 ], [ 67.409353469387099, 34.16099009871408 ], [ 67.422065871242921, 34.200367540429625 ], [ 67.509605747007583, 34.231683458424868 ], [ 67.548104688680382, 34.277701321458778 ], [ 67.380362989560297, 34.338731186994664 ], [ 67.427026808640278, 34.370873928189212 ], [ 67.409663526850238, 34.409036973977152 ], [ 67.276700067254296, 34.415419012877123 ], [ 67.248433058738613, 34.43944855440725 ], [ 67.269723749151694, 34.490504869204301 ], [ 67.347445102909148, 34.527195135746922 ], [ 67.346359898190713, 34.552309881995427 ], [ 67.300264519891641, 34.592514146011013 ], [ 67.290342645096985, 34.620341904954955 ], [ 67.308946161236349, 34.639074612303489 ], [ 67.506970248677987, 34.68113922829275 ], [ 67.572754347834859, 34.653673204554707 ], [ 67.728868849817559, 34.644784858534365 ], [ 67.974331902695099, 34.595950629118192 ], [ 68.039030796234215, 34.685867620794056 ], [ 68.093032667723378, 34.687753811189395 ], [ 68.167550083269703, 34.750954087960793 ], [ 68.282685173981577, 34.800305081314434 ], [ 68.299583367778155, 34.742324124358845 ], [ 68.351104770568668, 34.699406846748559 ], [ 68.374979283367225, 34.628610134250266 ], [ 68.406656935668991, 34.6254320344608 ], [ 68.555950148280715, 34.691526191080811 ], [ 68.70286624498118, 34.647575384696211 ], [ 68.862701450011855, 34.622228095350295 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-BAM", "NAME_1": "Bamyan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 67.431367629312604, 34.13864004200434 ], [ 67.377417433767505, 34.099469305863749 ], [ 67.346980014915744, 34.036630764298309 ], [ 67.314682244989569, 34.010870062903052 ], [ 67.198306919029051, 33.992085680509717 ], [ 67.161875034005561, 33.956170559423754 ], [ 67.122600945976842, 33.974877428350624 ], [ 67.03351077660102, 33.937928779389608 ], [ 66.960595330609976, 33.973843899576309 ], [ 66.783241815057693, 34.00386790637873 ], [ 66.644645623596602, 33.974438177879563 ], [ 66.530027296822254, 34.046139227943002 ], [ 66.513232455813181, 34.070788886198102 ], [ 66.516022983773667, 34.114507147686709 ], [ 66.549871047310944, 34.192150987078378 ], [ 66.530440707972275, 34.261113186024716 ], [ 66.580101759688432, 34.306795152274447 ], [ 66.552041456747816, 34.327827460269077 ], [ 66.484552036147534, 34.338937893468994 ], [ 66.46868737202459, 34.368496812278067 ], [ 66.548320753699784, 34.42477244689087 ], [ 66.612554559245496, 34.441825670318394 ], [ 66.65291385289197, 34.433789985019757 ], [ 66.735906203308616, 34.487352606937236 ], [ 66.710326369066649, 34.5275051950087 ], [ 66.71513227683306, 34.556573188301968 ], [ 66.7740950866189, 34.621607977725944 ], [ 66.754716424123671, 34.654680894907358 ], [ 66.707690870737054, 34.68150096349865 ], [ 66.637824335124947, 34.68532501933413 ], [ 66.646402621883453, 34.710000515111687 ], [ 66.600927362108052, 34.738706773198999 ], [ 66.577001174264751, 34.792863674319108 ], [ 66.519433627559806, 34.8443334011655 ], [ 66.436596306774106, 34.895338040018487 ], [ 66.337894321865406, 34.931769924142657 ], [ 66.333088413199675, 34.983601386195005 ], [ 66.355102574024556, 35.080132962566154 ], [ 66.335103793904921, 35.114652817873207 ], [ 66.357738072354152, 35.171496894166296 ], [ 66.3925163100796, 35.185707912789894 ], [ 66.55653730705103, 35.173305569296588 ], [ 66.669036900332628, 35.20281281216154 ], [ 66.807426385319388, 35.370606187225746 ], [ 67.01676761333465, 35.352467759979106 ], [ 67.306155633275807, 35.436622830379292 ], [ 67.403617384734503, 35.4229027372715 ], [ 67.57352949419078, 35.469359849877151 ], [ 67.743906690741142, 35.443418281328604 ], [ 67.818992547068376, 35.459386298239053 ], [ 67.861057163057581, 35.435201727977358 ], [ 68.088536818319483, 35.461220810891689 ], [ 68.106055128841092, 35.376135566303333 ], [ 68.10099083775691, 35.307948512813596 ], [ 68.06109663300316, 35.208858954277275 ], [ 68.012055698911354, 35.172168686835391 ], [ 68.01546634269755, 35.06442332627546 ], [ 68.071793654153794, 35.032228909136848 ], [ 68.122074822594982, 35.035639552922987 ], [ 68.183983189072876, 35.009594630687616 ], [ 68.236589796581825, 34.963240871768789 ], [ 68.253487990378403, 34.885829576373851 ], [ 68.247131789000832, 34.825523180350444 ], [ 68.282685173981577, 34.800305081314434 ], [ 68.167550083269703, 34.750954087960793 ], [ 68.093032667723378, 34.687753811189395 ], [ 68.039030796234215, 34.685867620794056 ], [ 67.974331902695099, 34.595950629118192 ], [ 67.728868849817559, 34.644784858534365 ], [ 67.572754347834859, 34.653673204554707 ], [ 67.506970248677987, 34.68113922829275 ], [ 67.299024286441636, 34.634992174049557 ], [ 67.300264519891641, 34.592514146011013 ], [ 67.346359898190713, 34.552309881995427 ], [ 67.347445102909148, 34.527195135746922 ], [ 67.269723749151694, 34.490504869204301 ], [ 67.251068557068209, 34.430921942693487 ], [ 67.276700067254296, 34.415419012877123 ], [ 67.409663526850238, 34.409036973977152 ], [ 67.427026808640278, 34.370873928189212 ], [ 67.380362989560297, 34.338731186994664 ], [ 67.548104688680382, 34.277701321458778 ], [ 67.509605747007583, 34.231683458424868 ], [ 67.422065871242921, 34.200367540429625 ], [ 67.409353469387099, 34.16099009871408 ], [ 67.431367629312604, 34.13864004200434 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-PAR", "NAME_1": "Parwan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.055144484230539, 34.880145169463958 ], [ 68.982797479020405, 34.895389715962608 ], [ 68.941352979756175, 34.84205963804186 ], [ 68.871538120088132, 34.704186916992626 ], [ 68.862701450011855, 34.622228095350295 ], [ 68.70286624498118, 34.647575384696211 ], [ 68.555950148280715, 34.691526191080811 ], [ 68.406656935668991, 34.6254320344608 ], [ 68.380560336590236, 34.627189032747651 ], [ 68.351104770568668, 34.699406846748559 ], [ 68.299583367778155, 34.742324124358845 ], [ 68.282685173981577, 34.800305081314434 ], [ 68.249457228068593, 34.820329698057094 ], [ 68.249457228068593, 34.933733628903838 ], [ 68.183983189072876, 35.009594630687616 ], [ 68.25519331182187, 35.04230581356245 ], [ 68.281444939632252, 35.072536525939881 ], [ 68.37621951681723, 35.054785672320918 ], [ 68.575638869138459, 35.06385488549455 ], [ 68.60323408408567, 35.076128037778687 ], [ 68.5999784690311, 35.117029933784409 ], [ 68.651809930184072, 35.128243719771831 ], [ 68.74198530517765, 35.18240062089194 ], [ 68.809629755408878, 35.257538154062559 ], [ 68.854174839197412, 35.269707953559191 ], [ 68.913912795339229, 35.24828807193694 ], [ 68.978921747240804, 35.294125067817617 ], [ 69.028117710064237, 35.307509264141231 ], [ 69.069097121335062, 35.357221991801453 ], [ 69.185317416765315, 35.420112210210334 ], [ 69.240869581865695, 35.415409654332052 ], [ 69.26350385941555, 35.392413642475617 ], [ 69.245675489632106, 35.157285875542698 ], [ 69.28334760900492, 35.161704210580808 ], [ 69.282314081129925, 35.02897329408222 ], [ 69.380964390094505, 34.98194773979634 ], [ 69.428765089836986, 34.935929876762373 ], [ 69.565966018217125, 34.910272529053941 ], [ 69.564674107024416, 34.757439480547589 ], [ 69.615110305096493, 34.694290879720313 ], [ 69.604258254314971, 34.649306546359981 ], [ 69.557077671297463, 34.655378525998174 ], [ 69.52328128370425, 34.606466783115536 ], [ 69.448298781063841, 34.591222235717566 ], [ 69.394968703143093, 34.725839341712231 ], [ 69.346702915407207, 34.749558823980522 ], [ 69.299212274027184, 34.832241116034652 ], [ 69.209812046288846, 34.879473374996223 ], [ 69.055144484230539, 34.880145169463958 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-SAR", "NAME_1": "Sari Pul" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 66.527340121649274, 36.587689521154459 ], [ 66.664386021297787, 36.562213039699998 ], [ 66.680199008577347, 36.542110907692233 ], [ 66.589248488127168, 36.433745429507951 ], [ 66.53013064960976, 36.314166165336246 ], [ 66.461400994660153, 36.22424917276112 ], [ 66.544445021020863, 36.174071357107437 ], [ 66.602322626088267, 36.163426011900924 ], [ 66.59203901608771, 36.020437323823387 ], [ 66.610384148909304, 35.992299506516986 ], [ 66.629762811404589, 35.875614122193952 ], [ 66.586044549016719, 35.778979193934617 ], [ 66.535298292582127, 35.743399970532209 ], [ 66.503000522655952, 35.676013901820113 ], [ 66.663145786049142, 35.692007758051545 ], [ 66.689965854640434, 35.66725474700894 ], [ 66.799674920860866, 35.674825344314172 ], [ 66.904888136778084, 35.718078517809317 ], [ 67.022348666557662, 35.66554942556553 ], [ 67.024053989799768, 35.641959132707768 ], [ 66.983746372097357, 35.611625068442152 ], [ 67.012116734299809, 35.595915432151457 ], [ 67.01273685102484, 35.562584133450969 ], [ 66.989482455850634, 35.553359889747071 ], [ 66.993668246892071, 35.494267890550702 ], [ 66.977183465144776, 35.46470897084231 ], [ 66.912949659599064, 35.414479478345243 ], [ 66.796574335437185, 35.36316478112974 ], [ 66.669036900332628, 35.20281281216154 ], [ 66.55653730705103, 35.173305569296588 ], [ 66.364766066400819, 35.178008124275493 ], [ 66.335103793904921, 35.114652817873207 ], [ 66.355102574024556, 35.080132962566154 ], [ 66.330607945400345, 34.957375596806344 ], [ 66.363629184838999, 34.914199936777663 ], [ 66.323166538405019, 34.900919094140875 ], [ 66.240122512044252, 34.916215318382228 ], [ 66.239502394419958, 34.8851836212271 ], [ 66.175888705599277, 34.852834174457541 ], [ 66.173718296162406, 34.831414292835348 ], [ 66.104988641212799, 34.784362901027066 ], [ 66.107779169173284, 34.828985500980082 ], [ 66.079357131026768, 34.910789292991467 ], [ 66.039514602217082, 34.944844062103755 ], [ 66.051451856817721, 34.969235337940461 ], [ 66.02618208183759, 34.990836086716001 ], [ 66.047731153769689, 35.014012965725783 ], [ 66.036879102988166, 35.062769679876794 ], [ 65.907894727959274, 35.075740465050387 ], [ 65.797410516282298, 35.10816742618573 ], [ 65.760203484902888, 35.151291409371026 ], [ 65.754312372418042, 35.192735907735937 ], [ 65.68584109898751, 35.203872179357575 ], [ 65.640882603149578, 35.246324368075079 ], [ 65.642277866230529, 35.269552923928302 ], [ 65.561249220575064, 35.241466783465285 ], [ 65.471590611317652, 35.236092434018587 ], [ 65.421309441977144, 35.29009430640707 ], [ 65.406685012203525, 35.336603094956843 ], [ 65.411025831976531, 35.447836616366715 ], [ 65.440067986848078, 35.472357083412646 ], [ 65.485853305885314, 35.556641344122738 ], [ 65.47035037606895, 35.607594306132285 ], [ 65.483527865918234, 35.65105418610176 ], [ 65.52838300986798, 35.679269517774003 ], [ 65.623002557422069, 35.676065579562817 ], [ 65.679329867978993, 35.746552231899955 ], [ 65.679949985603344, 35.78735077601749 ], [ 65.792914666878346, 35.793319403767441 ], [ 65.816685825090701, 35.836572577262586 ], [ 65.791674431629701, 35.897369899701062 ], [ 65.739998000107562, 35.960854397312573 ], [ 65.757878045835128, 36.001213690959048 ], [ 65.745475702341764, 36.016768296719476 ], [ 65.71085249244851, 36.017181707869497 ], [ 65.661501499094868, 35.989793199396615 ], [ 65.527091098675214, 35.977855942997337 ], [ 65.534274123252146, 36.044570217241699 ], [ 65.490659213651782, 36.096815090444068 ], [ 65.501976353326029, 36.316543281247391 ], [ 65.527091098675214, 36.339616808368987 ], [ 65.711937697166945, 36.357341824465607 ], [ 65.847691684723429, 36.45028188719931 ], [ 65.966857537745113, 36.475448310291256 ], [ 66.0714506369373, 36.537821763863292 ], [ 66.234231397760766, 36.535444647952147 ], [ 66.527340121649274, 36.587689521154459 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-GHO", "NAME_1": "Ghor" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 66.363629184838999, 34.914199936777663 ], [ 66.436596306774106, 34.895338040018487 ], [ 66.519433627559806, 34.8443334011655 ], [ 66.577001174264751, 34.792863674319108 ], [ 66.600927362108052, 34.738706773198999 ], [ 66.646402621883453, 34.710000515111687 ], [ 66.637824335124947, 34.68532501933413 ], [ 66.700869582265398, 34.683697211357185 ], [ 66.764948358180163, 34.644965724788335 ], [ 66.770219353939979, 34.608042914249097 ], [ 66.718542922417896, 34.562076728058514 ], [ 66.709551222710729, 34.532621161137683 ], [ 66.735906203308616, 34.487352606937236 ], [ 66.661440463706413, 34.437045600074384 ], [ 66.557777541400412, 34.428674017991511 ], [ 66.487032504846184, 34.389219061910183 ], [ 66.324716831116859, 34.376454983210863 ], [ 66.212062209103635, 34.406323961281771 ], [ 66.155269809653987, 34.35852326153929 ], [ 66.010472447345535, 34.358419907852465 ], [ 65.945463495443903, 34.320980333375644 ], [ 65.624862909395745, 34.352089544896558 ], [ 65.521820102915399, 34.344958198062386 ], [ 65.467353143432774, 34.075078030027043 ], [ 65.490039096926751, 34.039059557052894 ], [ 65.519494662948318, 34.026915595078606 ], [ 65.520476515778569, 33.973327134739463 ], [ 65.469523552869646, 33.905346787724056 ], [ 65.408442009591056, 33.884805406144551 ], [ 65.399398634839088, 33.866253566848627 ], [ 65.40947553926469, 33.833852444134948 ], [ 65.487248569865585, 33.773494371268214 ], [ 65.50833255380428, 33.678254706089774 ], [ 65.567450393221065, 33.629833888722942 ], [ 65.576907180022317, 33.604770820217141 ], [ 65.379864942712913, 33.475373033138965 ], [ 65.363276809077433, 33.452532050014099 ], [ 65.370253127180035, 33.424833482279382 ], [ 65.219099561695373, 33.362950955122471 ], [ 65.158741489727959, 33.362640895860636 ], [ 64.945834588295611, 33.246420600430326 ], [ 64.890127393564342, 33.254895535300705 ], [ 64.817677035566703, 33.203115750091797 ], [ 64.789099968688561, 33.212469184105544 ], [ 64.782433709847794, 33.246834011580347 ], [ 64.725176223304004, 33.227791245869298 ], [ 64.694015334040387, 33.247040717155357 ], [ 64.680217726566809, 33.278459987938049 ], [ 64.608025750987565, 33.283033351707786 ], [ 64.565651075736525, 33.32049876640491 ], [ 64.534025100278143, 33.319646103884565 ], [ 64.475527377586388, 33.227636217137672 ], [ 64.376360304684283, 33.18231598609384 ], [ 64.402405226919655, 33.142835190691471 ], [ 64.331505160734537, 33.122578029952081 ], [ 64.254713982963892, 33.164255073213042 ], [ 64.229392531140377, 33.15898407655385 ], [ 64.150430943033541, 33.264145616526946 ], [ 64.107281122325901, 33.278227443941375 ], [ 64.102165155297655, 33.340962632719311 ], [ 64.068368767704442, 33.409433906149843 ], [ 64.011524693209992, 33.487387803904028 ], [ 63.958659702383329, 33.516688341193969 ], [ 63.888638137140276, 33.496922105071064 ], [ 63.807351109066417, 33.424006659080021 ], [ 63.681829054667105, 33.404886379902507 ], [ 63.551139357295483, 33.344011542198871 ], [ 63.296374546348204, 33.328508613281883 ], [ 63.206819288978977, 33.307062893237912 ], [ 63.140260044365505, 33.319491075152996 ], [ 63.130028111208333, 33.394757799532783 ], [ 63.090443963018458, 33.460180162584436 ], [ 63.074630974839579, 33.532837226157028 ], [ 63.241132439610396, 33.618516750847334 ], [ 63.47729373621695, 33.65970286679385 ], [ 63.515792677889749, 33.70091482206135 ], [ 63.504578891902327, 33.767164008312307 ], [ 63.582972040127515, 33.802820746080556 ], [ 63.538271925808715, 33.857003486521648 ], [ 63.516257765883154, 33.912555649823332 ], [ 63.445771111747376, 33.974929104294688 ], [ 63.387893507579292, 34.073992825308608 ], [ 63.47667361769328, 34.210961208792753 ], [ 63.493106724395773, 34.268451240232537 ], [ 63.741256952446349, 34.268451240232537 ], [ 63.849880812149706, 34.219927070078199 ], [ 63.976643100898343, 34.21783417410785 ], [ 64.006150343763352, 34.245713608995857 ], [ 64.061650832020234, 34.224009508332131 ], [ 64.117978142577215, 34.225559801043971 ], [ 64.194976026822133, 34.264213772347716 ], [ 64.208618604664821, 34.287313136991656 ], [ 64.188154738350477, 34.34022980376244 ], [ 64.197766554782675, 34.469911810781412 ], [ 64.301429477987995, 34.477637436818213 ], [ 64.40478234193148, 34.52021881854364 ], [ 64.434858025577398, 34.491900133184572 ], [ 64.481573520601444, 34.492416897122098 ], [ 64.459972771825903, 34.586157945532761 ], [ 64.476302524841628, 34.671424059073047 ], [ 64.496301304061888, 34.700311184313705 ], [ 64.529374221243302, 34.711111559151107 ], [ 64.708743116601511, 34.694730130191317 ], [ 65.010843540197186, 34.789246324058581 ], [ 65.04732710206406, 34.939728095075509 ], [ 64.999371371791369, 35.025821030915836 ], [ 64.867958204907211, 35.133773097950098 ], [ 64.764915399326185, 35.166639309556444 ], [ 64.730137159802041, 35.213148098106217 ], [ 64.854160598332896, 35.239813137066619 ], [ 64.912038201601717, 35.212760525377917 ], [ 65.00324710536961, 35.238727932348183 ], [ 65.017354771205703, 35.219736843480518 ], [ 65.133006625855046, 35.256452949344123 ], [ 65.200185988092869, 35.224697780877875 ], [ 65.244214308843254, 35.237694404473189 ], [ 65.26628014471288, 35.18699982398266 ], [ 65.332839390225672, 35.188291734276106 ], [ 65.382035353049048, 35.203872179357575 ], [ 65.451385125623005, 35.253946642223752 ], [ 65.471590611317652, 35.236092434018587 ], [ 65.530553420204171, 35.236609198855433 ], [ 65.642277866230529, 35.269552923928302 ], [ 65.640882603149578, 35.246324368075079 ], [ 65.68584109898751, 35.203872179357575 ], [ 65.754312372418042, 35.192735907735937 ], [ 65.760203484902888, 35.151291409371026 ], [ 65.797410516282298, 35.10816742618573 ], [ 65.907894727959274, 35.075740465050387 ], [ 66.036879102988166, 35.062769679876794 ], [ 66.047731153769689, 35.014012965725783 ], [ 66.02618208183759, 34.990836086716001 ], [ 66.051451856817721, 34.969235337940461 ], [ 66.039514602217082, 34.944844062103755 ], [ 66.079357131026768, 34.910789292991467 ], [ 66.107779169173284, 34.828985500980082 ], [ 66.104988641212799, 34.784362901027066 ], [ 66.173718296162406, 34.831414292835348 ], [ 66.175888705599277, 34.852834174457541 ], [ 66.239502394419958, 34.8851836212271 ], [ 66.240122512044252, 34.916215318382228 ], [ 66.323166538405019, 34.900919094140875 ], [ 66.363629184838999, 34.914199936777663 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-BGL", "NAME_1": "Baghlan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 69.961032342068904, 35.80985586235812 ], [ 69.870856967974646, 35.715623888431708 ], [ 69.817630242841403, 35.705572822427769 ], [ 69.791430291874462, 35.673275050703012 ], [ 69.748900587891796, 35.541086738362253 ], [ 69.556147495310654, 35.456182359128547 ], [ 69.456877068721724, 35.457836005527213 ], [ 69.402875197232561, 35.416262315053757 ], [ 69.339881626036174, 35.402438870057779 ], [ 69.26350385941555, 35.392413642475617 ], [ 69.240869581865695, 35.415409654332052 ], [ 69.185317416765315, 35.420112210210334 ], [ 69.069097121335062, 35.357221991801453 ], [ 69.028117710064237, 35.307509264141231 ], [ 68.978921747240804, 35.294125067817617 ], [ 68.913912795339229, 35.24828807193694 ], [ 68.854174839197412, 35.269707953559191 ], [ 68.809629755408878, 35.257538154062559 ], [ 68.74198530517765, 35.18240062089194 ], [ 68.651809930184072, 35.128243719771831 ], [ 68.5999784690311, 35.117029933784409 ], [ 68.60323408408567, 35.076128037778687 ], [ 68.575638869138459, 35.06385488549455 ], [ 68.37621951681723, 35.054785672320918 ], [ 68.281444939632252, 35.072536525939881 ], [ 68.25519331182187, 35.04230581356245 ], [ 68.173441196653869, 35.006700750838945 ], [ 68.122074822594982, 35.035639552922987 ], [ 68.071793654153794, 35.032228909136848 ], [ 68.01794681229552, 35.056775213705123 ], [ 68.009730258944273, 35.165450751151241 ], [ 68.06109663300316, 35.208858954277275 ], [ 68.10099083775691, 35.307948512813596 ], [ 68.106055128841092, 35.376135566303333 ], [ 68.088536818319483, 35.461220810891689 ], [ 68.142538689808646, 35.507031969249965 ], [ 68.188789096839344, 35.58307383908641 ], [ 68.194060092599159, 35.613330389885562 ], [ 68.151840447878328, 35.642165839182098 ], [ 68.156181267651334, 35.676530667556221 ], [ 68.311675652909003, 35.853522447003286 ], [ 68.337617222356869, 35.98834625947228 ], [ 68.467325066898297, 36.073250636907346 ], [ 68.531403842813063, 36.152599799541122 ], [ 68.491354608428423, 36.196602280970467 ], [ 68.371413609050762, 36.263729967264169 ], [ 68.324543085295147, 36.314114488492805 ], [ 68.173441196653869, 36.515187486313437 ], [ 68.201811557957001, 36.557458807877651 ], [ 68.23953535327388, 36.571204739407165 ], [ 68.322372674059636, 36.548105373863905 ], [ 68.538535191445874, 36.541077378917862 ], [ 68.634911737286814, 36.521026922854162 ], [ 68.722761672313311, 36.53430776639027 ], [ 68.798622674097089, 36.44759471292565 ], [ 68.8423926133284, 36.419766953981707 ], [ 68.862081333286881, 36.412609767826495 ], [ 68.914532912064203, 36.433151150305321 ], [ 68.999230584823579, 36.417389838070562 ], [ 69.081344436096799, 36.355326442861042 ], [ 69.198494908413238, 36.324191392918408 ], [ 69.232808059044658, 36.283134467281798 ], [ 69.268309768081281, 36.275150457927282 ], [ 69.300607538007455, 36.228176581384105 ], [ 69.444112990022461, 36.24719350777417 ], [ 69.522661166979219, 36.295459296409376 ], [ 69.681101108928999, 36.35008128552289 ], [ 69.711796909299892, 36.240785631351798 ], [ 69.765798780789055, 36.232982490049835 ], [ 69.777736037188333, 36.213577989132887 ], [ 69.788122999976451, 36.099063015145987 ], [ 69.868531528906885, 36.033563136829287 ], [ 69.956381463933383, 35.8869570993906 ], [ 69.961032342068904, 35.80985586235812 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-SAM", "NAME_1": "Samangan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 67.688044468177623, 36.647944241233745 ], [ 67.83237674339199, 36.589601549072199 ], [ 68.079855177874151, 36.562161362856614 ], [ 68.189099156101122, 36.593244736855127 ], [ 68.23953535327388, 36.571204739407165 ], [ 68.193595004605754, 36.553789780773741 ], [ 68.172666050297948, 36.521181952485108 ], [ 68.207082553716873, 36.464751288241359 ], [ 68.371413609050762, 36.263729967264169 ], [ 68.529078403745302, 36.160816351993049 ], [ 68.467325066898297, 36.073250636907346 ], [ 68.332966343322028, 35.981705838153914 ], [ 68.311675652909003, 35.853522447003286 ], [ 68.156181267651334, 35.676530667556221 ], [ 68.151840447878328, 35.642165839182098 ], [ 68.194060092599159, 35.613330389885562 ], [ 68.142538689808646, 35.507031969249965 ], [ 68.088536818319483, 35.461220810891689 ], [ 68.000738560136426, 35.445666205131261 ], [ 67.861057163057581, 35.435201727977358 ], [ 67.818992547068376, 35.459386298239053 ], [ 67.743906690741142, 35.443418281328604 ], [ 67.57352949419078, 35.469359849877151 ], [ 67.403617384734503, 35.4229027372715 ], [ 67.306155633275807, 35.436622830379292 ], [ 67.01676761333465, 35.352467759979106 ], [ 66.9163603051839, 35.352881171129127 ], [ 66.83460818911658, 35.375153714372402 ], [ 66.929899530239084, 35.425899969907675 ], [ 66.99134280782431, 35.485844630725126 ], [ 66.98901736785723, 35.551215317832657 ], [ 67.011341587044569, 35.559793606389803 ], [ 67.01351199738076, 35.593383287508686 ], [ 66.984779900871672, 35.618213812917134 ], [ 67.024053989799768, 35.641959132707768 ], [ 67.022348666557662, 35.66554942556553 ], [ 66.903647902428702, 35.729085598221786 ], [ 66.935480585260791, 35.787040716755655 ], [ 67.002970004961753, 35.821793117858078 ], [ 67.119965447647246, 35.933517563884436 ], [ 67.124151238688682, 35.980749823745327 ], [ 67.067513868869923, 36.063948879736984 ], [ 67.181873814125197, 36.138311266551682 ], [ 67.27576989126743, 36.158206692085173 ], [ 67.330081822018428, 36.204043687066473 ], [ 67.333337437073055, 36.250862534878081 ], [ 67.373800082607715, 36.2893614774502 ], [ 67.382223342433292, 36.370596829579995 ], [ 67.420050489638356, 36.471572576713015 ], [ 67.371939732432679, 36.561282863713188 ], [ 67.461339960171017, 36.600531114219507 ], [ 67.500148960206332, 36.640218614297567 ], [ 67.614043816568824, 36.63161448821802 ], [ 67.688044468177623, 36.647944241233745 ] ] ] } }, -{ "type": "Feature", "properties": { "ISO": "AF-URU", "NAME_1": "Uruzgan" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 67.346980014915744, 34.036630764298309 ], [ 67.367598910861034, 34.012084458830714 ], [ 67.327601353319778, 33.947282213403412 ], [ 67.362482944732108, 33.923459378347616 ], [ 67.379277784841861, 33.860104071945329 ], [ 67.160789829287182, 33.671226712043108 ], [ 66.958890008267247, 33.629007066422957 ], [ 66.844375034280404, 33.580224513850226 ], [ 66.829492222088334, 33.526377671991952 ], [ 66.860343052090172, 33.426564643043832 ], [ 66.829182162826498, 33.280940457536076 ], [ 66.766808710153839, 33.271328640204558 ], [ 66.740402052712511, 33.318638414431234 ], [ 66.69167117698322, 33.280888779793315 ], [ 66.556382277420141, 33.236937975207354 ], [ 66.52842532726703, 33.242803250169857 ], [ 66.47442345577781, 33.319000148737871 ], [ 66.382904493647459, 33.296882636024804 ], [ 66.327507359077345, 33.309595037880683 ], [ 66.090105829020786, 33.186346747504388 ], [ 66.049746535374254, 33.061599840360316 ], [ 65.878594190669332, 33.090357774391748 ], [ 65.805627068734225, 33.142447617963171 ], [ 65.758653192191048, 33.109323024837693 ], [ 65.659331088758734, 33.105524807423876 ], [ 65.574581740055237, 33.145289821867777 ], [ 65.482442661199798, 33.150199083321013 ], [ 65.471435580787386, 33.144178778727621 ], [ 65.490814243282671, 33.076973578068134 ], [ 65.44936974491776, 33.091933906424629 ], [ 65.416968622204138, 33.067129218538582 ], [ 65.34818729041109, 33.092476507884498 ], [ 65.361726516365593, 33.220194811041665 ], [ 65.296510857989688, 33.29760610643666 ], [ 65.297441033976497, 33.330084744415387 ], [ 65.258218621891842, 33.335097357756808 ], [ 65.219099561695373, 33.362950955122471 ], [ 65.370253127180035, 33.424833482279382 ], [ 65.363276809077433, 33.452532050014099 ], [ 65.379864942712913, 33.475373033138965 ], [ 65.576907180022317, 33.604770820217141 ], [ 65.567450393221065, 33.629833888722942 ], [ 65.50833255380428, 33.678254706089774 ], [ 65.487248569865585, 33.773494371268214 ], [ 65.40947553926469, 33.833852444134948 ], [ 65.399398634839088, 33.866253566848627 ], [ 65.408442009591056, 33.884805406144551 ], [ 65.469523552869646, 33.905346787724056 ], [ 65.520476515778569, 33.973327134739463 ], [ 65.519494662948318, 34.026915595078606 ], [ 65.490039096926751, 34.039059557052894 ], [ 65.467353143432774, 34.075078030027043 ], [ 65.495155063954996, 34.181092230721845 ], [ 65.490814243282671, 34.236980291707084 ], [ 65.532103712916012, 34.349143989103766 ], [ 65.945463495443903, 34.320980333375644 ], [ 66.010472447345535, 34.358419907852465 ], [ 66.155269809653987, 34.35852326153929 ], [ 66.212062209103635, 34.406323961281771 ], [ 66.324716831116859, 34.376454983210863 ], [ 66.464501580983153, 34.396453762431179 ], [ 66.487032504846184, 34.389219061910183 ], [ 66.467602167306154, 34.360176907038635 ], [ 66.484552036147534, 34.338937893468994 ], [ 66.552041456747816, 34.327827460269077 ], [ 66.580101759688432, 34.306795152274447 ], [ 66.530440707972275, 34.261113186024716 ], [ 66.549405959317539, 34.185665595390901 ], [ 66.516022983773667, 34.114507147686709 ], [ 66.51586795414272, 34.061073716978456 ], [ 66.587284784265364, 34.000095527386634 ], [ 66.644645623596602, 33.974438177879563 ], [ 66.783241815057693, 34.00386790637873 ], [ 66.960595330609976, 33.973843899576309 ], [ 67.03351077660102, 33.937928779389608 ], [ 67.122600945976842, 33.974877428350624 ], [ 67.161875034005561, 33.956170559423754 ], [ 67.198306919029051, 33.992085680509717 ], [ 67.314682244989569, 34.010870062903052 ], [ 67.346980014915744, 34.036630764298309 ] ] ] } } -] + "type": "FeatureCollection", + "name": "afghanistan", + "crs": { + "type": "name", + "properties": { + "name": "urn:ogc:def:crs:OGC:1.3:CRS84" + } + }, + "features": [ + { + "type": "Feature", + "properties": { + "ISO": "AF-BDS", + "NAME_1": "Badakhshan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 74.794018189000099, + 37.213931173000063 + ], + [ + 74.737380819000123, + 37.296122538000091 + ], + [ + 74.721464477000097, + 37.297776185000131 + ], + [ + 74.623279256000103, + 37.230803528000038 + ], + [ + 74.589999634000094, + 37.243360901000059 + ], + [ + 74.500082642000052, + 37.231630351000078 + ], + [ + 74.456674439000039, + 37.177318420000105 + ], + [ + 74.368307740000034, + 37.167060649000021 + ], + [ + 74.382570434000115, + 37.126572164000024 + ], + [ + 74.476621541000043, + 37.083138123000126 + ], + [ + 74.547418254000092, + 37.015674540000091 + ], + [ + 74.537393026000075, + 36.962241109000061 + ], + [ + 74.52137333100012, + 36.958494568000063 + ], + [ + 74.456984497000121, + 37.004383240000024 + ], + [ + 74.394042603000116, + 36.994022115000107 + ], + [ + 74.235706015000119, + 36.902167257000045 + ], + [ + 74.12966597500008, + 36.898420716000132 + ], + [ + 74.094319295000105, + 36.831241354000085 + ], + [ + 74.035304809000138, + 36.815583394000029 + ], + [ + 73.946938110000133, + 36.830879618000083 + ], + [ + 73.865082642000118, + 36.872582499000103 + ], + [ + 73.772891887000071, + 36.892012838000099 + ], + [ + 73.331781861000081, + 36.882090963000095 + ], + [ + 73.267496379000136, + 36.866536357000072 + ], + [ + 73.191842082000051, + 36.877026673000032 + ], + [ + 73.042497192000098, + 36.864262594000039 + ], + [ + 72.990510702000051, + 36.841576641000088 + ], + [ + 72.945862264000141, + 36.852221985000071 + ], + [ + 72.867727498000136, + 36.830414531000045 + ], + [ + 72.6296024990001, + 36.832946676000049 + ], + [ + 72.516741170000046, + 36.800597229000047 + ], + [ + 72.454109334000123, + 36.757964173000076 + ], + [ + 72.16968225100004, + 36.711352031 + ], + [ + 72.149631796000108, + 36.689337870000102 + ], + [ + 72.171645956000077, + 36.653629456000104 + ], + [ + 72.059094686000094, + 36.627119446 + ], + [ + 72.038837525000076, + 36.580455627000035 + ], + [ + 71.977032511000118, + 36.563040670000092 + ], + [ + 71.874713176000114, + 36.499065246000029 + ], + [ + 71.773220662000142, + 36.480048320000051 + ], + [ + 71.794408, + 36.407597962000082 + ], + [ + 71.782625773000063, + 36.396539205000053 + ], + [ + 71.73632369000012, + 36.395919088000099 + ], + [ + 71.649300578000066, + 36.452763163000057 + ], + [ + 71.610439900000074, + 36.45793080600005 + ], + [ + 71.547187948000101, + 36.371631165000096 + ], + [ + 71.558350057000041, + 36.327861227000099 + ], + [ + 71.479078410000113, + 36.300524394000078 + ], + [ + 71.402752320000047, + 36.231381327000079 + ], + [ + 71.319139852000035, + 36.200582174000104 + ], + [ + 71.30208662900003, + 36.163323467000097 + ], + [ + 71.223073364000072, + 36.125392965000103 + ], + [ + 71.165919230000043, + 36.045707906000032 + ], + [ + 71.169913421866909, + 36.03080174600376 + ], + [ + 71.084633010005348, + 35.941940822810693 + ], + [ + 71.061947055612109, + 35.854504298934216 + ], + [ + 71.019779086835342, + 35.799417222726618 + ], + [ + 70.973218622341506, + 35.775413520517532 + ], + [ + 70.96887780076986, + 35.739601752219073 + ], + [ + 71.013681267876166, + 35.699164944206814 + ], + [ + 70.959989454749518, + 35.642372544757109 + ], + [ + 70.877927281219002, + 35.625706894957204 + ], + [ + 70.86614505355135, + 35.600256252823783 + ], + [ + 70.882733188985469, + 35.516282050476207 + ], + [ + 70.86443973210794, + 35.484242662069164 + ], + [ + 70.757676222579562, + 35.488764349894836 + ], + [ + 70.687241245287225, + 35.537004299209002 + ], + [ + 70.650757684319672, + 35.510700995454556 + ], + [ + 70.634789667409166, + 35.46569082277324 + ], + [ + 70.576912062341762, + 35.442410590076634 + ], + [ + 70.537948032675558, + 35.458869534301527 + ], + [ + 70.554691196841247, + 35.56687327727991 + ], + [ + 70.499449090103383, + 35.622063707174334 + ], + [ + 70.479450310883124, + 35.666944687747105 + ], + [ + 70.383848911398104, + 35.698131415432442 + ], + [ + 70.294035271610483, + 35.660562648847133 + ], + [ + 70.231196730045042, + 35.670355333331941 + ], + [ + 70.273364698821752, + 35.850215156004651 + ], + [ + 70.300546502618943, + 35.879515693294593 + ], + [ + 70.461776970730568, + 35.970517889688836 + ], + [ + 70.429014112811046, + 36.037852281557548 + ], + [ + 70.474799431848282, + 36.149602566005569 + ], + [ + 70.472473992780522, + 36.283573716853539 + ], + [ + 70.440641310847809, + 36.303882555335633 + ], + [ + 70.22401370636743, + 36.327033595923695 + ], + [ + 70.139626091970513, + 36.404909980211414 + ], + [ + 70.038443638363162, + 36.462115789911763 + ], + [ + 70.037358432745464, + 36.515265001578541 + ], + [ + 70.003820427570645, + 36.61505219210494 + ], + [ + 70.00661095643045, + 36.922294420251262 + ], + [ + 70.037358432745464, + 36.941207993853823 + ], + [ + 70.056427035978913, + 36.979655260481877 + ], + [ + 70.096166212900357, + 36.996114202908132 + ], + [ + 70.124123163053525, + 37.042545477991382 + ], + [ + 70.033017612972401, + 37.135097967996785 + ], + [ + 70.034412876053352, + 37.188376369973469 + ], + [ + 70.00428551556405, + 37.276200466578246 + ], + [ + 70.018289828612694, + 37.359166978573171 + ], + [ + 70.041699253417789, + 37.387304795879629 + ], + [ + 70.00506066281929, + 37.407665310305788 + ], + [ + 69.998549431810773, + 37.530913601581403 + ], + [ + 70.004187461582035, + 37.551370518834347 + ], + [ + 70.12913496900012, + 37.532283834000069 + ], + [ + 70.157867065000119, + 37.541430562000031 + ], + [ + 70.216468140000131, + 37.617136536000103 + ], + [ + 70.24830082200009, + 37.623337708000079 + ], + [ + 70.283079061000137, + 37.704831442000042 + ], + [ + 70.275120890000096, + 37.774181213000091 + ], + [ + 70.247163940000064, + 37.8191655480001 + ], + [ + 70.196004273000085, + 37.839913636000048 + ], + [ + 70.16520511900012, + 37.88991058400002 + ], + [ + 70.172129761000122, + 37.946082866 + ], + [ + 70.214711141000066, + 37.92926218700002 + ], + [ + 70.26152998900011, + 37.939287415000038 + ], + [ + 70.253933553000138, + 37.97339386 + ], + [ + 70.470302775000107, + 38.120516663000089 + ], + [ + 70.547197306000101, + 38.26265269 + ], + [ + 70.583060751000062, + 38.275080872000089 + ], + [ + 70.600010620000035, + 38.347066142000031 + ], + [ + 70.641351766000071, + 38.354197489000072 + ], + [ + 70.684759969000083, + 38.386650289 + ], + [ + 70.664864543000078, + 38.405408834000085 + ], + [ + 70.74181075100006, + 38.419438985000099 + ], + [ + 70.777260783000031, + 38.446465759000048 + ], + [ + 70.843044881000083, + 38.440161235000048 + ], + [ + 70.871001831000115, + 38.453209534000067 + ], + [ + 70.936217489000114, + 38.433004049000075 + ], + [ + 70.950738566000041, + 38.473053284000073 + ], + [ + 70.998229207000065, + 38.465663554000074 + ], + [ + 71.049802287000091, + 38.408664450000074 + ], + [ + 71.117395060000035, + 38.398639221000039 + ], + [ + 71.217699016000097, + 38.325827128000057 + ], + [ + 71.334384399000101, + 38.280661927 + ], + [ + 71.358155558000135, + 38.251258037000113 + ], + [ + 71.359085734000075, + 38.184104513000065 + ], + [ + 71.272631063000119, + 37.997991842 + ], + [ + 71.25826501500012, + 37.926471659000057 + ], + [ + 71.34115401300005, + 37.893295390000034 + ], + [ + 71.501195923000125, + 37.946212057000125 + ], + [ + 71.53705936700004, + 37.944455058000059 + ], + [ + 71.59772749900003, + 37.898359681000031 + ], + [ + 71.590286093000032, + 37.81572906500007 + ], + [ + 71.529514608000113, + 37.761132915000033 + ], + [ + 71.542537069000048, + 37.719559225000054 + ], + [ + 71.497165161000112, + 37.566545309000063 + ], + [ + 71.511221151000029, + 37.485878398000054 + ], + [ + 71.487139933000094, + 37.409087219000085 + ], + [ + 71.493857870000113, + 37.30754303 + ], + [ + 71.487036580000051, + 37.267054546000097 + ], + [ + 71.45013960700004, + 37.21667002400001 + ], + [ + 71.43112268100009, + 37.066989237000129 + ], + [ + 71.459958130000132, + 37.010739441000041 + ], + [ + 71.463058716000035, + 36.948081767000119 + ], + [ + 71.52848107900013, + 36.856149394000042 + ], + [ + 71.55287235600008, + 36.769591370000043 + ], + [ + 71.611060018000046, + 36.704840800000042 + ], + [ + 71.653021281000065, + 36.687012431000099 + ], + [ + 71.748519328000043, + 36.678640849000104 + ], + [ + 71.836575969000137, + 36.699156392000091 + ], + [ + 72.259805949000054, + 36.967305400000058 + ], + [ + 72.405946899000128, + 37.007664693000024 + ], + [ + 72.474986613000112, + 36.99748443600005 + ], + [ + 72.657714478000059, + 37.028826192000068 + ], + [ + 72.790729614000099, + 37.220261536000081 + ], + [ + 72.902247356000089, + 37.253799541 + ], + [ + 72.995574992000059, + 37.309300029000056 + ], + [ + 73.067508586000088, + 37.315061951000033 + ], + [ + 73.132104126000058, + 37.384385885000071 + ], + [ + 73.170241333000035, + 37.408260396000045 + ], + [ + 73.211479126000086, + 37.408260396000045 + ], + [ + 73.296331828000064, + 37.464949443000066 + ], + [ + 73.378394003000039, + 37.452547099000085 + ], + [ + 73.440612427000076, + 37.479935608000048 + ], + [ + 73.485260864000111, + 37.480969137000031 + ], + [ + 73.674499959000116, + 37.431049703000056 + ], + [ + 73.753461548000075, + 37.428388367000125 + ], + [ + 73.739095500000076, + 37.338342184000069 + ], + [ + 73.690416300000038, + 37.305217591000073 + ], + [ + 73.630988403000117, + 37.295993348000067 + ], + [ + 73.597295369000051, + 37.261809387000071 + ], + [ + 73.617655884000101, + 37.233180644000086 + ], + [ + 73.680494425000063, + 37.24245656300009 + ], + [ + 73.709226522000051, + 37.217005920000091 + ], + [ + 73.798213339000142, + 37.228529765000118 + ], + [ + 73.836247192000087, + 37.256745097000092 + ], + [ + 74.187646932000064, + 37.338393861000085 + ], + [ + 74.223923788000093, + 37.403351136000126 + ], + [ + 74.303815552000117, + 37.400173035000066 + ], + [ + 74.315597779000029, + 37.426915588000028 + ], + [ + 74.37812626200008, + 37.393765158000022 + ], + [ + 74.521166626000081, + 37.375600891 + ], + [ + 74.660382935000086, + 37.393971863000061 + ], + [ + 74.788540487000034, + 37.331159160000098 + ], + [ + 74.86264449100014, + 37.244601135 + ], + [ + 74.892306763000079, + 37.231113587000024 + ], + [ + 74.794018189000099, + 37.213931173000063 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-TAK", + "NAME_1": "Takhar" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.895247436000091, + 37.618170065000086 + ], + [ + 69.918811890000086, + 37.617136536000103 + ], + [ + 69.955398804000083, + 37.575485331 + ], + [ + 70.004187461582035, + 37.551370518834347 + ], + [ + 70.00506066281929, + 37.407665310305788 + ], + [ + 70.041699253417789, + 37.387304795879629 + ], + [ + 70.018289828612694, + 37.359166978573171 + ], + [ + 70.00428551556405, + 37.276200466578246 + ], + [ + 70.034412876053352, + 37.188376369973469 + ], + [ + 70.033017612972401, + 37.135097967996785 + ], + [ + 70.124123163053525, + 37.042545477991382 + ], + [ + 70.096166212900357, + 36.996114202908132 + ], + [ + 70.056427035978913, + 36.979655260481877 + ], + [ + 70.037358432745464, + 36.941207993853823 + ], + [ + 70.00661095643045, + 36.922294420251262 + ], + [ + 70.003820427570645, + 36.61505219210494 + ], + [ + 70.037358432745464, + 36.515265001578541 + ], + [ + 70.038443638363162, + 36.462115789911763 + ], + [ + 70.139626091970513, + 36.404909980211414 + ], + [ + 70.235020785880522, + 36.322331040944789 + ], + [ + 70.460019973343037, + 36.297009589121217 + ], + [ + 70.472473992780522, + 36.283573716853539 + ], + [ + 70.477589959808768, + 36.178076280096207 + ], + [ + 70.429014112811046, + 36.037852281557548 + ], + [ + 70.463482293972675, + 35.978321030990742 + ], + [ + 70.456919387020037, + 35.964626777203989 + ], + [ + 70.300546502618943, + 35.879515693294593 + ], + [ + 70.273364698821752, + 35.850215156004651 + ], + [ + 70.176833124249242, + 35.892253933572135 + ], + [ + 70.171562127590107, + 35.860705471580218 + ], + [ + 70.135595330560022, + 35.828304347967276 + ], + [ + 69.982116326906919, + 35.791407375849701 + ], + [ + 69.961032342068904, + 35.80985586235812 + ], + [ + 69.956381463933383, + 35.8869570993906 + ], + [ + 69.886049839428495, + 36.006122952412284 + ], + [ + 69.788122999976451, + 36.099063015145987 + ], + [ + 69.777736037188333, + 36.213577989132887 + ], + [ + 69.765798780789055, + 36.232982490049835 + ], + [ + 69.707766147889402, + 36.247141831830049 + ], + [ + 69.681101108928999, + 36.35008128552289 + ], + [ + 69.522661166979219, + 36.295459296409376 + ], + [ + 69.444112990022461, + 36.24719350777417 + ], + [ + 69.300607538007455, + 36.228176581384105 + ], + [ + 69.268309768081281, + 36.275150457927282 + ], + [ + 69.220664097070369, + 36.296957913177152 + ], + [ + 69.20144046420603, + 36.389096992032535 + ], + [ + 69.147283563085921, + 36.483044745118889 + ], + [ + 69.221749301788805, + 36.544513862025099 + ], + [ + 69.255597365326139, + 36.612235825722735 + ], + [ + 69.207176547959307, + 36.722074083152393 + ], + [ + 69.216168246767154, + 36.79274160444146 + ], + [ + 69.28200402186809, + 36.811345120580825 + ], + [ + 69.304638299417945, + 36.849895738197745 + ], + [ + 69.311459588788978, + 37.030634060013824 + ], + [ + 69.339364862098648, + 37.077478746247095 + ], + [ + 69.308616678000078, + 37.116882043000103 + ], + [ + 69.407731974000114, + 37.177473450000051 + ], + [ + 69.442148479000082, + 37.223620504000095 + ], + [ + 69.445197388000111, + 37.236410421000059 + ], + [ + 69.409850708000079, + 37.245660503000082 + ], + [ + 69.417912231000059, + 37.267674662000061 + ], + [ + 69.377036174000068, + 37.380665182000072 + ], + [ + 69.384477580000066, + 37.453270569 + ], + [ + 69.491447795000056, + 37.536986390000024 + ], + [ + 69.508656046000056, + 37.578973490000052 + ], + [ + 69.528654826000093, + 37.586027324000057 + ], + [ + 69.66497725500011, + 37.57615712500008 + ], + [ + 69.754274130000056, + 37.596672669000057 + ], + [ + 69.802229858000089, + 37.581505636000131 + ], + [ + 69.895247436000091, + 37.618170065000086 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-KDZ", + "NAME_1": "Kunduz" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.245674683000061, + 37.103886210000056 + ], + [ + 69.308616678000078, + 37.116882043000103 + ], + [ + 69.339364862098648, + 37.077478746247095 + ], + [ + 69.311459588788978, + 37.030634060013824 + ], + [ + 69.293011102280502, + 36.821887112100512 + ], + [ + 69.215238071679607, + 36.788969225449364 + ], + [ + 69.207951695214547, + 36.717862453689293 + ], + [ + 69.255597365326139, + 36.612235825722735 + ], + [ + 69.221749301788805, + 36.544513862025099 + ], + [ + 69.147128534354351, + 36.487256375481309 + ], + [ + 69.20144046420603, + 36.389096992032535 + ], + [ + 69.220664097070369, + 36.296957913177152 + ], + [ + 69.190433383793618, + 36.328790595109865 + ], + [ + 69.061810743970625, + 36.365274156077419 + ], + [ + 68.986983270061842, + 36.421937364317898 + ], + [ + 68.914532912064203, + 36.433151150305321 + ], + [ + 68.853089633579714, + 36.414573473486996 + ], + [ + 68.798622674097089, + 36.44759471292565 + ], + [ + 68.722761672313311, + 36.53430776639027 + ], + [ + 68.623284540149371, + 36.521750393266018 + ], + [ + 68.538535191445874, + 36.541077378917862 + ], + [ + 68.322372674059636, + 36.548105373863905 + ], + [ + 68.206927524985247, + 36.578956203865687 + ], + [ + 68.161142205948011, + 36.642776598261378 + ], + [ + 68.118819208439675, + 36.67323985373622 + ], + [ + 68.038100620247405, + 36.817003689068997 + ], + [ + 68.024819692000051, + 36.925518466000071 + ], + [ + 68.186411173000067, + 37.018310038000024 + ], + [ + 68.277775106000092, + 37.01006764800006 + ], + [ + 68.28831709800005, + 37.103214417000075 + ], + [ + 68.307282349000104, + 37.114221497000059 + ], + [ + 68.391876669000112, + 37.105436503000064 + ], + [ + 68.418024943000091, + 37.128277486000073 + ], + [ + 68.403710571000033, + 37.151635234000125 + ], + [ + 68.523858276000055, + 37.16465769400007 + ], + [ + 68.551453491000075, + 37.192614645000063 + ], + [ + 68.626901083000064, + 37.206257222000076 + ], + [ + 68.648605184000132, + 37.244368591000026 + ], + [ + 68.671239461000084, + 37.247184957000101 + ], + [ + 68.657545207000055, + 37.267674662000061 + ], + [ + 68.668862345000036, + 37.278294169000034 + ], + [ + 68.759606161000079, + 37.275245260000119 + ], + [ + 68.820377645000121, + 37.2509056600001 + ], + [ + 68.810197388000063, + 37.31209055600003 + ], + [ + 68.835828898000045, + 37.329143778000073 + ], + [ + 68.904713582000056, + 37.276692200000113 + ], + [ + 68.917632691000051, + 37.302427064000099 + ], + [ + 68.887867066000069, + 37.338135478000098 + ], + [ + 68.985225464000109, + 37.320358785000067 + ], + [ + 69.123614950000103, + 37.169205221000098 + ], + [ + 69.245674683000061, + 37.103886210000056 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-BAL", + "NAME_1": "Balkh" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 67.780544475000113, + 37.188868103000047 + ], + [ + 67.771966187000089, + 37.124970195000074 + ], + [ + 67.785350382000104, + 37.096548157000072 + ], + [ + 67.878109579000125, + 37.064431254000041 + ], + [ + 68.024819692000051, + 36.925518466000071 + ], + [ + 68.038100620247405, + 36.817003689068997 + ], + [ + 68.092102491736568, + 36.711170356426805 + ], + [ + 68.174991490265029, + 36.62779043238254 + ], + [ + 68.189099156101122, + 36.593244736855127 + ], + [ + 68.079855177874151, + 36.562161362856614 + ], + [ + 67.83237674339199, + 36.589601549072199 + ], + [ + 67.688044468177623, + 36.647944241233745 + ], + [ + 67.614043816568824, + 36.63161448821802 + ], + [ + 67.485834587895908, + 36.636162014465356 + ], + [ + 67.461339960171017, + 36.600531114219507 + ], + [ + 67.371939732432679, + 36.561282863713188 + ], + [ + 67.420050489638356, + 36.471572576713015 + ], + [ + 67.382223342433292, + 36.370596829579995 + ], + [ + 67.373800082607715, + 36.2893614774502 + ], + [ + 67.333337437073055, + 36.250862534878081 + ], + [ + 67.334887729784896, + 36.211562608427641 + ], + [ + 67.267708368446392, + 36.153219916266096 + ], + [ + 67.181873814125197, + 36.138311266551682 + ], + [ + 67.067513868869923, + 36.063948879736984 + ], + [ + 67.124151238688682, + 35.980749823745327 + ], + [ + 67.119965447647246, + 35.933517563884436 + ], + [ + 67.002970004961753, + 35.821793117858078 + ], + [ + 66.928039178265408, + 35.779676825025433 + ], + [ + 66.904888136778084, + 35.718078517809317 + ], + [ + 66.799674920860866, + 35.674825344314172 + ], + [ + 66.689965854640434, + 35.66725474700894 + ], + [ + 66.663145786049142, + 35.692007758051545 + ], + [ + 66.505325961723713, + 35.671156318109581 + ], + [ + 66.535298292582127, + 35.743399970532209 + ], + [ + 66.586044549016719, + 35.778979193934617 + ], + [ + 66.629762811404589, + 35.875614122193952 + ], + [ + 66.610384148909304, + 35.992299506516986 + ], + [ + 66.59203901608771, + 36.020437323823387 + ], + [ + 66.602322626088267, + 36.163426011900924 + ], + [ + 66.544445021020863, + 36.174071357107437 + ], + [ + 66.461400994660153, + 36.22424917276112 + ], + [ + 66.53013064960976, + 36.314166165336246 + ], + [ + 66.57157514797467, + 36.407752184115964 + ], + [ + 66.663610874042547, + 36.508598740939135 + ], + [ + 66.679888950214831, + 36.54608999315866 + ], + [ + 66.63534386642624, + 36.57035207778614 + ], + [ + 66.527340121649274, + 36.587689521154459 + ], + [ + 66.471012811092351, + 36.636730455246266 + ], + [ + 66.462331170646962, + 36.705124213411693 + ], + [ + 66.417682733171546, + 36.746077786260798 + ], + [ + 66.469927606373915, + 36.774654853138941 + ], + [ + 66.509666783295359, + 36.767575182248834 + ], + [ + 66.559792922105657, + 36.781992906447442 + ], + [ + 66.568939649645074, + 36.798012600201332 + ], + [ + 66.540104201247857, + 36.885965888015278 + ], + [ + 66.462796257741047, + 36.990455634419959 + ], + [ + 66.503620640280303, + 37.112412014502866 + ], + [ + 66.434580926068861, + 37.185224106807084 + ], + [ + 66.401973097780228, + 37.25625336420137 + ], + [ + 66.255212029811275, + 37.302529608754412 + ], + [ + 66.250847716000067, + 37.359650022000054 + ], + [ + 66.294433634000086, + 37.331210836000125 + ], + [ + 66.413496135000059, + 37.349633484000023 + ], + [ + 66.451064901000052, + 37.322942607000087 + ], + [ + 66.539018189000046, + 37.369089661000103 + ], + [ + 66.6940991620001, + 37.343406474000048 + ], + [ + 66.734975220000081, + 37.363301900000053 + ], + [ + 67.005914754000116, + 37.384385885000071 + ], + [ + 67.097382039000081, + 37.340590108000058 + ], + [ + 67.123323609000124, + 37.281963196000035 + ], + [ + 67.187815796000052, + 37.258243714000102 + ], + [ + 67.236753377000127, + 37.192407939000091 + ], + [ + 67.259129272000109, + 37.185147400000048 + ], + [ + 67.391162557000087, + 37.219589742 + ], + [ + 67.503145386000142, + 37.281963196000035 + ], + [ + 67.52614139800005, + 37.27289398200007 + ], + [ + 67.561384725000039, + 37.219899801000068 + ], + [ + 67.592287231000057, + 37.247184957000101 + ], + [ + 67.633163290000141, + 37.254057923000047 + ], + [ + 67.677501668000104, + 37.23354237900007 + ], + [ + 67.746593058000087, + 37.22940826500006 + ], + [ + 67.780544475000113, + 37.188868103000047 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-JOW", + "NAME_1": "Jawzjan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 65.761442912000064, + 37.578379212000087 + ], + [ + 65.804334351000136, + 37.565305074000023 + ], + [ + 65.855183960000033, + 37.507944235000039 + ], + [ + 66.079666382000141, + 37.440868225000102 + ], + [ + 66.142918335000047, + 37.385057679000042 + ], + [ + 66.250847716000067, + 37.359650022000054 + ], + [ + 66.257537468879036, + 37.300565903993231 + ], + [ + 66.357117953830482, + 37.278138332917706 + ], + [ + 66.409414503876235, + 37.249612941983685 + ], + [ + 66.434580926068861, + 37.185224106807084 + ], + [ + 66.503620640280303, + 37.112412014502866 + ], + [ + 66.462796257741047, + 36.990455634419959 + ], + [ + 66.540104201247857, + 36.885965888015278 + ], + [ + 66.568939649645074, + 36.798012600201332 + ], + [ + 66.564753858603638, + 36.783749904734293 + ], + [ + 66.51586795414272, + 36.768272813339649 + ], + [ + 66.474113397415351, + 36.775429999494861 + ], + [ + 66.435511102055671, + 36.762510891164652 + ], + [ + 66.417476026697216, + 36.739256496889823 + ], + [ + 66.462331170646962, + 36.705124213411693 + ], + [ + 66.479901158012012, + 36.623242906135204 + ], + [ + 66.527340121649274, + 36.587689521154459 + ], + [ + 66.234231397760766, + 36.535444647952147 + ], + [ + 66.0714506369373, + 36.537821763863292 + ], + [ + 65.966857537745113, + 36.475448310291256 + ], + [ + 65.847691684723429, + 36.45028188719931 + ], + [ + 65.711937697166945, + 36.357341824465607 + ], + [ + 65.527091098675214, + 36.339616808368987 + ], + [ + 65.501976353326029, + 36.316543281247391 + ], + [ + 65.490659213651782, + 36.096815090444068 + ], + [ + 65.534274123252146, + 36.044570217241699 + ], + [ + 65.527091098675214, + 35.977855942997337 + ], + [ + 65.685220982262479, + 36.000412706181407 + ], + [ + 65.674678989843471, + 35.97232656481907 + ], + [ + 65.576493767972977, + 35.927884832918664 + ], + [ + 65.525437453175869, + 35.959355781444117 + ], + [ + 65.48864383294648, + 35.919177354051612 + ], + [ + 65.415263298962032, + 35.909539700097071 + ], + [ + 65.304003940929078, + 35.937031562256777 + ], + [ + 65.275736932413452, + 35.929486803373266 + ], + [ + 65.261629265678039, + 35.947986964926486 + ], + [ + 65.144943882254324, + 35.937083238200842 + ], + [ + 65.105669794225605, + 35.96695221627175 + ], + [ + 65.103499382990094, + 35.989173081772265 + ], + [ + 65.18168582474101, + 36.048626817073909 + ], + [ + 65.170988803590376, + 36.099915675867749 + ], + [ + 65.215998977171012, + 36.146837877366124 + ], + [ + 65.21134809813617, + 36.24486806870641 + ], + [ + 65.245454543192579, + 36.345895494481454 + ], + [ + 65.277907341850323, + 36.361243395566248 + ], + [ + 65.457121210275602, + 36.364757392139893 + ], + [ + 65.484768101166878, + 36.385634671402954 + ], + [ + 65.432936639114587, + 36.498857734197031 + ], + [ + 65.447509392944085, + 36.578801174234798 + ], + [ + 65.392422315837166, + 36.619573879930613 + ], + [ + 65.416813591673872, + 36.650424709932395 + ], + [ + 65.44456383715135, + 36.758686835329172 + ], + [ + 65.403584425880524, + 36.811500149312394 + ], + [ + 65.39211225837397, + 36.853668118089161 + ], + [ + 65.340280796321679, + 36.906791490434898 + ], + [ + 65.338885532341408, + 36.996398423748246 + ], + [ + 65.366997512125465, + 37.070321560091884 + ], + [ + 65.487921778966893, + 37.241997468508316 + ], + [ + 65.536857137000084, + 37.257106833000094 + ], + [ + 65.624086955000053, + 37.345137635000114 + ], + [ + 65.620986369000036, + 37.430403748000074 + ], + [ + 65.65871016400007, + 37.510269674000071 + ], + [ + 65.681034384000043, + 37.526392720000061 + ], + [ + 65.739428752000094, + 37.529054057000067 + ], + [ + 65.761442912000064, + 37.578379212000087 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-FYB", + "NAME_1": "Faryab" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 64.728548628816156, + 36.850569547146847 + ], + [ + 64.778763875000095, + 36.938469950000112 + ], + [ + 64.760160360000043, + 37.092620748000101 + ], + [ + 64.807909383000094, + 37.13551218700006 + ], + [ + 65.063087606000124, + 37.233232321000102 + ], + [ + 65.487921778966893, + 37.241997468508316 + ], + [ + 65.366997512125465, + 37.070321560091884 + ], + [ + 65.331444126245401, + 36.950871487129405 + ], + [ + 65.340280796321679, + 36.906791490434898 + ], + [ + 65.39211225837397, + 36.853668118089161 + ], + [ + 65.403584425880524, + 36.811500149312394 + ], + [ + 65.44456383715135, + 36.758686835329172 + ], + [ + 65.416813591673872, + 36.650424709932395 + ], + [ + 65.392422315837166, + 36.619573879930613 + ], + [ + 65.447509392944085, + 36.578801174234798 + ], + [ + 65.432936639114587, + 36.498857734197031 + ], + [ + 65.484768101166878, + 36.385634671402954 + ], + [ + 65.457121210275602, + 36.364757392139893 + ], + [ + 65.277907341850323, + 36.361243395566248 + ], + [ + 65.245454543192579, + 36.345895494481454 + ], + [ + 65.21134809813617, + 36.24486806870641 + ], + [ + 65.215998977171012, + 36.146837877366124 + ], + [ + 65.170988803590376, + 36.099915675867749 + ], + [ + 65.18168582474101, + 36.048626817073909 + ], + [ + 65.107375115669015, + 35.993875636751227 + ], + [ + 65.102259148640769, + 35.974419460789477 + ], + [ + 65.161997104782529, + 35.931812242441026 + ], + [ + 65.261629265678039, + 35.947986964926486 + ], + [ + 65.275736932413452, + 35.929486803373266 + ], + [ + 65.304003940929078, + 35.937031562256777 + ], + [ + 65.415263298962032, + 35.909539700097071 + ], + [ + 65.48864383294648, + 35.919177354051612 + ], + [ + 65.53086347766731, + 35.960027574113212 + ], + [ + 65.576493767972977, + 35.927884832918664 + ], + [ + 65.668012730103385, + 35.967107245003319 + ], + [ + 65.685220982262479, + 36.000412706181407 + ], + [ + 65.733331740367476, + 36.020747382185903 + ], + [ + 65.757567986573292, + 36.004417630069554 + ], + [ + 65.739998000107562, + 35.960854397312573 + ], + [ + 65.791674431629701, + 35.897369899701062 + ], + [ + 65.816685825090701, + 35.836572577262586 + ], + [ + 65.792914666878346, + 35.793319403767441 + ], + [ + 65.679949985603344, + 35.78735077601749 + ], + [ + 65.679329867978993, + 35.746552231899955 + ], + [ + 65.623002557422069, + 35.676065579562817 + ], + [ + 65.52838300986798, + 35.679269517774003 + ], + [ + 65.483527865918234, + 35.65105418610176 + ], + [ + 65.47035037606895, + 35.607594306132285 + ], + [ + 65.485853305885314, + 35.556641344122738 + ], + [ + 65.407615187291015, + 35.423161118790574 + ], + [ + 65.410095655989721, + 35.321461900346378 + ], + [ + 65.451385125623005, + 35.253946642223752 + ], + [ + 65.382035353049048, + 35.203872179357575 + ], + [ + 65.26628014471288, + 35.18699982398266 + ], + [ + 65.244214308843254, + 35.237694404473189 + ], + [ + 65.200185988092869, + 35.224697780877875 + ], + [ + 65.133006625855046, + 35.256452949344123 + ], + [ + 65.017354771205703, + 35.219736843480518 + ], + [ + 65.00324710536961, + 35.238727932348183 + ], + [ + 64.912038201601717, + 35.212760525377917 + ], + [ + 64.854160598332896, + 35.239813137066619 + ], + [ + 64.632727085186787, + 35.199557197106913 + ], + [ + 64.416409539968242, + 35.236815904430443 + ], + [ + 64.40633263464332, + 35.274022935809796 + ], + [ + 64.424005974795875, + 35.411327216078121 + ], + [ + 64.298328891664994, + 35.398382270225568 + ], + [ + 64.251148308647487, + 35.418871974961633 + ], + [ + 64.262155389059899, + 35.445511176399634 + ], + [ + 64.247117547236996, + 35.468429673890341 + ], + [ + 64.016382276920524, + 35.491864936217837 + ], + [ + 64.001137730421874, + 35.50555919000459 + ], + [ + 63.988580357297622, + 35.64588654223013 + ], + [ + 63.946205682046582, + 35.691671861267366 + ], + [ + 63.889258253865307, + 35.712755846105381 + ], + [ + 63.947445917295227, + 35.943801173885049 + ], + [ + 63.935663689627518, + 36.017698472706343 + ], + [ + 63.906327060745241, + 36.031732343772603 + ], + [ + 64.045113566000055, + 35.99873403000008 + ], + [ + 64.036225220000119, + 36.076403707000068 + ], + [ + 64.057257528000036, + 36.105239156000025 + ], + [ + 64.158698365000134, + 36.160274556000061 + ], + [ + 64.266133667000076, + 36.15247141600004 + ], + [ + 64.303650757000071, + 36.211537578 + ], + [ + 64.444572388000097, + 36.249984843000036 + ], + [ + 64.498160848000055, + 36.291429342000114 + ], + [ + 64.576657349000072, + 36.38961456400007 + ], + [ + 64.605854533000127, + 36.461083069 + ], + [ + 64.588801311000054, + 36.600454407000072 + ], + [ + 64.60482100400003, + 36.66055409800002 + ], + [ + 64.728548628816156, + 36.850569547146847 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-BDG", + "NAME_1": "Badghis" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 63.342934204000073, + 35.856262106000074 + ], + [ + 63.511089315000049, + 35.901840719000049 + ], + [ + 63.582092732000035, + 35.959046530000094 + ], + [ + 63.765905802000077, + 35.977288310000048 + ], + [ + 63.889825887000143, + 36.029636536000069 + ], + [ + 63.935663689627518, + 36.017698472706343 + ], + [ + 63.943570183716986, + 35.904552924277993 + ], + [ + 63.915044793682227, + 35.775180976520801 + ], + [ + 63.887397901891632, + 35.720507311463223 + ], + [ + 63.946205682046582, + 35.691671861267366 + ], + [ + 63.988580357297622, + 35.64588654223013 + ], + [ + 64.002532992603506, + 35.501683458224988 + ], + [ + 64.02707929897042, + 35.487188218761275 + ], + [ + 64.247117547236996, + 35.468429673890341 + ], + [ + 64.262155389059899, + 35.445511176399634 + ], + [ + 64.251148308647487, + 35.418871974961633 + ], + [ + 64.298328891664994, + 35.398382270225568 + ], + [ + 64.415789422343948, + 35.417657579034028 + ], + [ + 64.425091180413631, + 35.388873806580875 + ], + [ + 64.410828484946592, + 35.239658108334993 + ], + [ + 64.614226921834927, + 35.199298813789198 + ], + [ + 64.730137159802041, + 35.213148098106217 + ], + [ + 64.764915399326185, + 35.166639309556444 + ], + [ + 64.867958204907211, + 35.133773097950098 + ], + [ + 64.999371371791369, + 35.025821030915836 + ], + [ + 65.044691602835201, + 34.950425117125462 + ], + [ + 65.014409213614272, + 34.793587144730907 + ], + [ + 64.965574985996795, + 34.765397651480384 + ], + [ + 64.708743116601511, + 34.694730130191317 + ], + [ + 64.529374221243302, + 34.711111559151107 + ], + [ + 64.496301304061888, + 34.700311184313705 + ], + [ + 64.476302524841628, + 34.671424059073047 + ], + [ + 64.36550825390276, + 34.664680284067856 + ], + [ + 64.201797316193165, + 34.680312405093389 + ], + [ + 64.150120883771763, + 34.656179510775758 + ], + [ + 64.124179315223216, + 34.617241319531274 + ], + [ + 64.078910760123449, + 34.606802679899715 + ], + [ + 64.011731397885683, + 34.562180080846019 + ], + [ + 63.785491977872425, + 34.509366766862797 + ], + [ + 63.650306431096908, + 34.557529201811178 + ], + [ + 63.607776727114242, + 34.547865709434916 + ], + [ + 63.531915725330407, + 34.560733140921684 + ], + [ + 63.360298292632081, + 34.634630438843658 + ], + [ + 63.244233025933397, + 34.644914048844271 + ], + [ + 63.173332960647599, + 34.610652574156973 + ], + [ + 63.034271682092424, + 34.645585842412686 + ], + [ + 63.026210158372066, + 34.690751043825571 + ], + [ + 62.99468753390255, + 34.726330268127356 + ], + [ + 62.912625360372033, + 34.731885483828023 + ], + [ + 62.750774773736794, + 34.82469635715114 + ], + [ + 62.668402540944498, + 34.843454902022074 + ], + [ + 62.651762729566315, + 34.894046128825778 + ], + [ + 62.671813184730638, + 35.041995755199935 + ], + [ + 62.70002851820152, + 35.111578070871246 + ], + [ + 62.784157749280666, + 35.227049059266676 + ], + [ + 62.823063429000058, + 35.327514064000084 + ], + [ + 62.918205607000061, + 35.388176982000076 + ], + [ + 63.080211222000059, + 35.437062887000067 + ], + [ + 63.100726766000037, + 35.524964499000063 + ], + [ + 63.077369018000127, + 35.558760885000041 + ], + [ + 63.076645549000034, + 35.624700012000048 + ], + [ + 63.213588094000045, + 35.69229278600001 + ], + [ + 63.112043905000121, + 35.769910787000114 + ], + [ + 63.088634481000042, + 35.843394674000066 + ], + [ + 63.125273072000141, + 35.860241191000043 + ], + [ + 63.342934204000073, + 35.856262106000074 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-HER", + "NAME_1": "Hirat" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 62.604529663000051, + 35.219401754000032 + ], + [ + 62.693619832000138, + 35.248392232000114 + ], + [ + 62.760489136000103, + 35.302445781000088 + ], + [ + 62.823063429000058, + 35.327514064000084 + ], + [ + 62.784157749280666, + 35.227049059266676 + ], + [ + 62.689796584145029, + 35.092121894010177 + ], + [ + 62.664216749903062, + 35.006080634113971 + ], + [ + 62.655018344620885, + 34.871954454534432 + ], + [ + 62.671813184730638, + 34.841336168529324 + ], + [ + 62.750774773736794, + 34.82469635715114 + ], + [ + 62.912625360372033, + 34.731885483828023 + ], + [ + 62.99468753390255, + 34.726330268127356 + ], + [ + 63.026210158372066, + 34.690751043825571 + ], + [ + 63.034271682092424, + 34.645585842412686 + ], + [ + 63.173332960647599, + 34.610652574156973 + ], + [ + 63.244233025933397, + 34.644914048844271 + ], + [ + 63.360298292632081, + 34.634630438843658 + ], + [ + 63.531915725330407, + 34.560733140921684 + ], + [ + 63.607776727114242, + 34.547865709434916 + ], + [ + 63.650306431096908, + 34.557529201811178 + ], + [ + 63.785491977872425, + 34.509366766862797 + ], + [ + 64.011731397885683, + 34.562180080846019 + ], + [ + 64.078910760123449, + 34.606802679899715 + ], + [ + 64.124179315223216, + 34.617241319531274 + ], + [ + 64.150120883771763, + 34.656179510775758 + ], + [ + 64.201797316193165, + 34.680312405093389 + ], + [ + 64.36550825390276, + 34.664680284067856 + ], + [ + 64.476302524841628, + 34.671424059073047 + ], + [ + 64.459559360675939, + 34.559389552885534 + ], + [ + 64.481573520601444, + 34.492416897122098 + ], + [ + 64.434858025577398, + 34.491900133184572 + ], + [ + 64.40478234193148, + 34.52021881854364 + ], + [ + 64.301429477987995, + 34.477637436818213 + ], + [ + 64.197766554782675, + 34.469911810781412 + ], + [ + 64.188154738350477, + 34.34022980376244 + ], + [ + 64.208618604664821, + 34.287313136991656 + ], + [ + 64.194976026822133, + 34.264213772347716 + ], + [ + 64.117978142577215, + 34.225559801043971 + ], + [ + 64.061650832020234, + 34.224009508332131 + ], + [ + 64.006150343763352, + 34.245713608995857 + ], + [ + 63.976643100898343, + 34.21783417410785 + ], + [ + 63.849880812149706, + 34.219927070078199 + ], + [ + 63.741256952446349, + 34.268451240232537 + ], + [ + 63.493106724395773, + 34.268451240232537 + ], + [ + 63.47667361769328, + 34.210961208792753 + ], + [ + 63.387893507579292, + 34.073992825308608 + ], + [ + 63.445771111747376, + 33.974929104294688 + ], + [ + 63.516257765883154, + 33.912555649823332 + ], + [ + 63.538271925808715, + 33.857003486521648 + ], + [ + 63.582972040127515, + 33.802820746080556 + ], + [ + 63.504578891902327, + 33.767164008312307 + ], + [ + 63.515792677889749, + 33.70091482206135 + ], + [ + 63.47729373621695, + 33.65970286679385 + ], + [ + 63.241132439610396, + 33.618516750847334 + ], + [ + 63.074630974839579, + 33.532837226157028 + ], + [ + 63.090443963018458, + 33.460180162584436 + ], + [ + 63.130028111208333, + 33.394757799532783 + ], + [ + 63.140260044365505, + 33.319491075152996 + ], + [ + 63.083157586553341, + 33.281508897417666 + ], + [ + 63.041403028926595, + 33.176476549553115 + ], + [ + 62.927198114201587, + 33.126427924209338 + ], + [ + 62.916811151413469, + 33.151284288039449 + ], + [ + 62.74162804619732, + 33.121337796502075 + ], + [ + 62.70095869328901, + 33.072968655079364 + ], + [ + 62.645251498557798, + 33.054261786152495 + ], + [ + 62.508722364645394, + 33.057724106782075 + ], + [ + 62.383510370407237, + 32.983904324125263 + ], + [ + 62.348887159614719, + 32.842724311178017 + ], + [ + 62.150708041642758, + 32.826368719740628 + ], + [ + 62.073761835140544, + 32.783218899032931 + ], + [ + 62.028286573566504, + 32.791667996380909 + ], + [ + 61.99542036285942, + 32.8974754915007 + ], + [ + 61.964672885645143, + 32.892075304531659 + ], + [ + 61.855738966679951, + 32.816808580151815 + ], + [ + 61.778482700016582, + 32.881714179265941 + ], + [ + 61.690477736258515, + 32.89192027400145 + ], + [ + 61.666293165996763, + 32.912487494002619 + ], + [ + 61.676680128784881, + 33.0119904654876 + ], + [ + 61.843336623186588, + 33.155831814286785 + ], + [ + 61.755021600166685, + 33.271664536988794 + ], + [ + 61.823131138391318, + 33.342771307849546 + ], + [ + 61.828918898088659, + 33.408400377375472 + ], + [ + 61.858994581734521, + 33.452428697226594 + ], + [ + 61.847367384597078, + 33.476458237857344 + ], + [ + 61.550227899298079, + 33.516042385147955 + ], + [ + 61.451525912590739, + 33.45966339774759 + ], + [ + 61.164463331717343, + 33.461472072877825 + ], + [ + 60.9197882926955, + 33.512570519114149 + ], + [ + 60.8951249590001, + 33.541132101000031 + ], + [ + 60.846032348000051, + 33.555782370000102 + ], + [ + 60.655553019000081, + 33.559890645000038 + ], + [ + 60.574834432000046, + 33.587795919000101 + ], + [ + 60.511789185000112, + 33.638387146000056 + ], + [ + 60.486881145000041, + 33.711380107000096 + ], + [ + 60.528015585000048, + 33.841449687000036 + ], + [ + 60.486777791000122, + 34.094276632000017 + ], + [ + 60.49277225700007, + 34.139028422000095 + ], + [ + 60.552406861000065, + 34.220057068000088 + ], + [ + 60.65059208200006, + 34.285350241000046 + ], + [ + 60.643667440000058, + 34.306640930000029 + ], + [ + 60.890474080000104, + 34.318914083000053 + ], + [ + 60.779369751000047, + 34.455081482000068 + ], + [ + 60.699684692000062, + 34.516395569000011 + ], + [ + 60.739268840000136, + 34.548021546000101 + ], + [ + 60.838487590000113, + 34.570914205000022 + ], + [ + 60.895435018000057, + 34.62832672200004 + ], + [ + 60.947524862000137, + 34.637990214000055 + ], + [ + 60.959927206000089, + 34.723204651000017 + ], + [ + 61.009639933000074, + 34.760980123000067 + ], + [ + 61.034754680000106, + 34.806248678000074 + ], + [ + 61.065450480000038, + 34.814723613000083 + ], + [ + 61.074752238000087, + 34.93311431900004 + ], + [ + 61.115886678000038, + 35.059876608000096 + ], + [ + 61.147305949000099, + 35.102096252000067 + ], + [ + 61.139864543000101, + 35.139665019000077 + ], + [ + 61.096352987000046, + 35.193201802000104 + ], + [ + 61.112372681000124, + 35.202038472000098 + ], + [ + 61.102450806000036, + 35.256660462000056 + ], + [ + 61.12270796700011, + 35.287666321000088 + ], + [ + 61.187096802000099, + 35.300378723000037 + ], + [ + 61.195054973000083, + 35.390089010000011 + ], + [ + 61.290036255000075, + 35.548063863000024 + ], + [ + 61.269675741000128, + 35.618498840000072 + ], + [ + 61.351531210000076, + 35.627800599000082 + ], + [ + 61.351531210000076, + 35.607130026000064 + ], + [ + 61.383467245000077, + 35.586459453000074 + ], + [ + 61.39318241400008, + 35.55359324100003 + ], + [ + 61.427702271000101, + 35.542844543000015 + ], + [ + 61.538703247000058, + 35.452307434000019 + ], + [ + 61.604745728000069, + 35.430603332000103 + ], + [ + 61.739621216000046, + 35.413756816000031 + ], + [ + 61.919351847000087, + 35.451842346 + ], + [ + 62.007460164000122, + 35.438923239000061 + ], + [ + 62.136341187000141, + 35.34135813400006 + ], + [ + 62.233699585000068, + 35.29376414000005 + ], + [ + 62.251217896000128, + 35.260381165000055 + ], + [ + 62.250959513000055, + 35.202348532000101 + ], + [ + 62.286202840000044, + 35.140646871000044 + ], + [ + 62.431878703000109, + 35.280638326000073 + ], + [ + 62.458905477000087, + 35.281878561 + ], + [ + 62.535489950000056, + 35.227359924 + ], + [ + 62.604529663000051, + 35.219401754000032 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-NIM", + "NAME_1": "Nimroz" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 60.844378703000075, + 29.858178610000053 + ], + [ + 61.80225305200014, + 30.847058818000036 + ], + [ + 61.800185995000106, + 30.961418762 + ], + [ + 61.826334269000085, + 31.034592591 + ], + [ + 61.779205363000074, + 31.181095276000079 + ], + [ + 61.742721802000062, + 31.239541321000061 + ], + [ + 61.749233032000063, + 31.302379863000041 + ], + [ + 61.686911255000098, + 31.373176575000073 + ], + [ + 61.606258629632009, + 31.388741287780192 + ], + [ + 61.629809605029209, + 31.469371446535035 + ], + [ + 61.605314976404998, + 31.517508043061696 + ], + [ + 61.637251011125215, + 31.499317938971672 + ], + [ + 61.668308546702065, + 31.516009426293977 + ], + [ + 61.665052931647438, + 31.597890733570466 + ], + [ + 61.724015741433277, + 31.606236477231619 + ], + [ + 61.802047153553247, + 31.716617337020466 + ], + [ + 61.885556267907418, + 31.794002793993741 + ], + [ + 61.888346795867903, + 31.883299668944574 + ], + [ + 61.984516636133833, + 31.945905667412603 + ], + [ + 61.979245640373961, + 32.021120714049687 + ], + [ + 62.394517449920329, + 32.043548285125212 + ], + [ + 62.539418165915606, + 32.071763616797455 + ], + [ + 62.600861444400095, + 32.05489126232186 + ], + [ + 62.743333367640787, + 31.930015163968619 + ], + [ + 62.862189162299956, + 31.97569713021835 + ], + [ + 62.981199985690751, + 31.989753119211059 + ], + [ + 63.033651563568753, + 32.018045966148406 + ], + [ + 63.081762322573127, + 32.06938650178563 + ], + [ + 63.102381219417737, + 32.200851345513172 + ], + [ + 63.157468295625335, + 32.252579453878695 + ], + [ + 63.530055373356788, + 32.200205390366477 + ], + [ + 63.538426955439604, + 32.136669215911581 + ], + [ + 63.569639519748023, + 32.079902655782917 + ], + [ + 63.533621046773874, + 32.038716538937081 + ], + [ + 63.538892043433009, + 31.996264350219576 + ], + [ + 63.497757603430614, + 31.918749701137756 + ], + [ + 63.429493035575092, + 31.860329495509802 + ], + [ + 63.407633905280477, + 31.804932359141048 + ], + [ + 63.354407180147234, + 31.480249334838902 + ], + [ + 63.352701856905128, + 31.374958604555957 + ], + [ + 63.316373324669144, + 31.316615912394411 + ], + [ + 63.349601270582127, + 31.250030829359275 + ], + [ + 63.342935011741361, + 31.125283922215203 + ], + [ + 63.285522494667362, + 31.083529365487834 + ], + [ + 63.225939569055811, + 30.985860908454129 + ], + [ + 63.143050572326047, + 30.936354885469541 + ], + [ + 63.156538119638469, + 30.773651638112597 + ], + [ + 63.057371046736364, + 30.681770942574929 + ], + [ + 63.085172967258586, + 30.650222480583011 + ], + [ + 63.0619185729837, + 30.608829658162165 + ], + [ + 63.098350458007189, + 30.539273180013254 + ], + [ + 63.092304314992134, + 30.518705960012028 + ], + [ + 63.011482374911623, + 30.456926784743303 + ], + [ + 62.96228641118887, + 30.365950425871461 + ], + [ + 62.889939405978794, + 30.276421006923897 + ], + [ + 62.767517937902483, + 30.204539088807906 + ], + [ + 62.758681267826205, + 30.073177598767131 + ], + [ + 62.718373651023171, + 30.006334133313601 + ], + [ + 62.720957473408646, + 29.90703786920227 + ], + [ + 62.602581131613931, + 29.418069628010926 + ], + [ + 62.477508993000129, + 29.407818502000069 + ], + [ + 62.37446618600012, + 29.424871725000017 + ], + [ + 60.844378703000075, + 29.858178610000053 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-FRA", + "NAME_1": "Farah" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 61.606258629632009, + 31.388741287780192 + ], + [ + 60.821744425000134, + 31.494667868000093 + ], + [ + 60.792598918000124, + 31.660084127000047 + ], + [ + 60.805311320000101, + 31.733981426000113 + ], + [ + 60.792598918000124, + 32.011277161000052 + ], + [ + 60.774925578000136, + 32.027193502000088 + ], + [ + 60.814819783000075, + 32.08786163300006 + ], + [ + 60.830322713000044, + 32.248885397000024 + ], + [ + 60.577521607000108, + 32.994343770000071 + ], + [ + 60.56150191200004, + 33.137306621 + ], + [ + 60.757045533000053, + 33.366336568000051 + ], + [ + 60.829082479000135, + 33.416281841000014 + ], + [ + 60.832183065000095, + 33.484494731000055 + ], + [ + 60.9197882926955, + 33.512570519114149 + ], + [ + 61.164463331717343, + 33.461472072877825 + ], + [ + 61.3948885436713, + 33.469636949385688 + ], + [ + 61.438038365278317, + 33.45868154581666 + ], + [ + 61.490800002418155, + 33.473719386740299 + ], + [ + 61.517620070110127, + 33.507489935911792 + ], + [ + 61.550227899298079, + 33.516042385147955 + ], + [ + 61.847367384597078, + 33.476458237857344 + ], + [ + 61.858994581734521, + 33.452428697226594 + ], + [ + 61.828918898088659, + 33.408400377375472 + ], + [ + 61.823131138391318, + 33.342771307849546 + ], + [ + 61.755021600166685, + 33.271664536988794 + ], + [ + 61.843336623186588, + 33.155831814286785 + ], + [ + 61.676680128784881, + 33.0119904654876 + ], + [ + 61.666293165996763, + 32.912487494002619 + ], + [ + 61.690477736258515, + 32.89192027400145 + ], + [ + 61.778482700016582, + 32.881714179265941 + ], + [ + 61.855738966679951, + 32.816808580151815 + ], + [ + 61.964672885645143, + 32.892075304531659 + ], + [ + 61.99542036285942, + 32.8974754915007 + ], + [ + 62.013868850267215, + 32.816395169001851 + ], + [ + 62.032472364607884, + 32.786629543718448 + ], + [ + 62.059809198036021, + 32.782056179049391 + ], + [ + 62.150708041642758, + 32.826368719740628 + ], + [ + 62.348887159614719, + 32.842724311178017 + ], + [ + 62.383510370407237, + 32.983904324125263 + ], + [ + 62.508722364645394, + 33.057724106782075 + ], + [ + 62.645251498557798, + 33.054261786152495 + ], + [ + 62.70095869328901, + 33.072968655079364 + ], + [ + 62.74162804619732, + 33.121337796502075 + ], + [ + 62.916811151413469, + 33.151284288039449 + ], + [ + 62.927198114201587, + 33.126427924209338 + ], + [ + 63.014582961234623, + 33.153919786369045 + ], + [ + 63.043883497625302, + 33.18037811885506 + ], + [ + 63.092614374253913, + 33.294453844169539 + ], + [ + 63.140260044365505, + 33.319491075152996 + ], + [ + 63.206819288978977, + 33.307062893237912 + ], + [ + 63.296374546348204, + 33.328508613281883 + ], + [ + 63.551139357295483, + 33.344011542198871 + ], + [ + 63.681829054667105, + 33.404886379902507 + ], + [ + 63.807351109066417, + 33.424006659080021 + ], + [ + 63.869569533007507, + 33.485036526414547 + ], + [ + 63.933648308922272, + 33.514440416491993 + ], + [ + 63.958659702383329, + 33.516688341193969 + ], + [ + 64.011524693209992, + 33.487387803904028 + ], + [ + 64.099064568974654, + 33.349127509227174 + ], + [ + 64.107281122325901, + 33.278227443941375 + ], + [ + 64.150430943033541, + 33.264145616526946 + ], + [ + 64.229392531140377, + 33.15898407655385 + ], + [ + 64.254713982963892, + 33.164255073213042 + ], + [ + 64.331505160734537, + 33.122578029952081 + ], + [ + 64.399304640596654, + 33.140819810885546 + ], + [ + 64.376360304684283, + 33.18231598609384 + ], + [ + 64.475527377586388, + 33.227636217137672 + ], + [ + 64.522862990234785, + 33.309724229089852 + ], + [ + 64.551078321907028, + 33.322953395782577 + ], + [ + 64.608025750987565, + 33.283033351707786 + ], + [ + 64.680217726566809, + 33.278459987938049 + ], + [ + 64.694015334040387, + 33.247040717155357 + ], + [ + 64.738198684421718, + 33.211564846540398 + ], + [ + 64.697115920363387, + 33.165882880290667 + ], + [ + 64.699441359431148, + 33.140742296519761 + ], + [ + 64.715874465234378, + 33.133378403890219 + ], + [ + 64.614381952365193, + 33.066870836120188 + ], + [ + 64.562705519044414, + 33.010543525563207 + ], + [ + 64.573247512362798, + 32.995531521262649 + ], + [ + 64.540536330387283, + 32.938480740293926 + ], + [ + 64.577950067341703, + 32.921375840922281 + ], + [ + 64.574384393025298, + 32.908844306219748 + ], + [ + 64.395428907917733, + 32.848925482924699 + ], + [ + 64.334605747057537, + 32.767741808537608 + ], + [ + 64.266651239363171, + 32.719527695846466 + ], + [ + 64.255179070957354, + 32.688651028322283 + ], + [ + 64.299104038020914, + 32.667851264324383 + ], + [ + 64.293522983898583, + 32.629998276898959 + ], + [ + 64.177406040356459, + 32.57219818799598 + ], + [ + 64.04366743440454, + 32.55752208137892 + ], + [ + 64.029714797300016, + 32.575531318315655 + ], + [ + 64.014211866584333, + 32.571655584737414 + ], + [ + 63.996021763393628, + 32.533699246323124 + ], + [ + 64.020878127223739, + 32.450035102338063 + ], + [ + 63.952406853793264, + 32.400244859412737 + ], + [ + 63.917680292011823, + 32.403913886516648 + ], + [ + 63.846780226726025, + 32.355518907571479 + ], + [ + 63.826729770662382, + 32.322471828811842 + ], + [ + 63.726477492142521, + 32.319577948963172 + ], + [ + 63.649841343103446, + 32.25803131769112 + ], + [ + 63.530055373356788, + 32.200205390366477 + ], + [ + 63.157468295625335, + 32.252579453878695 + ], + [ + 63.102381219417737, + 32.200851345513172 + ], + [ + 63.081762322573127, + 32.06938650178563 + ], + [ + 63.033651563568753, + 32.018045966148406 + ], + [ + 62.981199985690751, + 31.989753119211059 + ], + [ + 62.862189162299956, + 31.97569713021835 + ], + [ + 62.743333367640787, + 31.930015163968619 + ], + [ + 62.600861444400095, + 32.05489126232186 + ], + [ + 62.539418165915606, + 32.071763616797455 + ], + [ + 62.394517449920329, + 32.043548285125212 + ], + [ + 61.979245640373961, + 32.021120714049687 + ], + [ + 61.984516636133833, + 31.945905667412603 + ], + [ + 61.888346795867903, + 31.883299668944574 + ], + [ + 61.885556267907418, + 31.794002793993741 + ], + [ + 61.802047153553247, + 31.716617337020466 + ], + [ + 61.724015741433277, + 31.606236477231619 + ], + [ + 61.665052931647438, + 31.597890733570466 + ], + [ + 61.668308546702065, + 31.516009426293977 + ], + [ + 61.637251011125215, + 31.499317938971672 + ], + [ + 61.605314976404998, + 31.517508043061696 + ], + [ + 61.629809605029209, + 31.469371446535035 + ], + [ + 61.606258629632009, + 31.388741287780192 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-KNR", + "NAME_1": "Kunar" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 71.445238796932927, + 34.937756747875596 + ], + [ + 71.289477580000096, + 34.875030009000071 + ], + [ + 71.203074585000138, + 34.748164368000076 + ], + [ + 71.080601441000056, + 34.672923483000048 + ], + [ + 71.065821981000113, + 34.558460185000044 + ], + [ + 70.822995232843709, + 34.552309881995427 + ], + [ + 70.741863234400739, + 34.531045030004123 + ], + [ + 70.73219974202442, + 34.555048733112528 + ], + [ + 70.765272658306515, + 34.584271756036685 + ], + [ + 70.696698032987797, + 34.589826971737352 + ], + [ + 70.652773065024917, + 34.629979559808817 + ], + [ + 70.66688073086101, + 34.749352118405511 + ], + [ + 70.615514356802066, + 34.800201728526929 + ], + [ + 70.617219680044172, + 34.889834500261941 + ], + [ + 70.574431593643112, + 34.994040024927187 + ], + [ + 70.651997918668997, + 35.131602688513226 + ], + [ + 70.852967563702066, + 35.069280910885311 + ], + [ + 70.967637567319855, + 35.08734182376611 + ], + [ + 71.034971958289191, + 35.075197861791878 + ], + [ + 71.09393476807503, + 35.124057928730394 + ], + [ + 71.11129804896575, + 35.103439032785104 + ], + [ + 71.20844974206193, + 35.299886989992558 + ], + [ + 71.353402134001271, + 35.351976834463301 + ], + [ + 71.443215772889573, + 35.342959296334413 + ], + [ + 71.469157342337439, + 35.38781443938484 + ], + [ + 71.593421979000141, + 35.464193788000031 + ], + [ + 71.622428833000072, + 35.429621481000041 + ], + [ + 71.620878540000035, + 35.410139465000057 + ], + [ + 71.53158166500009, + 35.327922262000115 + ], + [ + 71.529824667000071, + 35.30089548800008 + ], + [ + 71.637931763000097, + 35.189687806000066 + ], + [ + 71.604135376000102, + 35.138166402000067 + ], + [ + 71.508947388000138, + 35.072020569000088 + ], + [ + 71.511324504000072, + 35.008716939000081 + ], + [ + 71.445238796932927, + 34.937756747875596 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-NUR", + "NAME_1": "Nuristan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 71.169913421866909, + 36.03080174600376 + ], + [ + 71.257438192000109, + 35.971552226000099 + ], + [ + 71.341567424000061, + 35.947264303000097 + ], + [ + 71.371333049000043, + 35.885149231000113 + ], + [ + 71.431019328000048, + 35.843704733000052 + ], + [ + 71.47091353400009, + 35.779936015000132 + ], + [ + 71.475564413000029, + 35.741023661000057 + ], + [ + 71.519799438000064, + 35.683766175000088 + ], + [ + 71.483315877000052, + 35.626560364000071 + ], + [ + 71.593490031000101, + 35.549355774000091 + ], + [ + 71.581707805000065, + 35.493131816000087 + ], + [ + 71.593421979000141, + 35.464193788000031 + ], + [ + 71.579641554913792, + 35.4471906603207 + ], + [ + 71.469157342337439, + 35.38781443938484 + ], + [ + 71.443215772889573, + 35.342959296334413 + ], + [ + 71.353402134001271, + 35.351976834463301 + ], + [ + 71.20844974206193, + 35.299886989992558 + ], + [ + 71.11129804896575, + 35.103439032785104 + ], + [ + 71.09393476807503, + 35.124057928730394 + ], + [ + 71.034971958289191, + 35.075197861791878 + ], + [ + 70.967637567319855, + 35.08734182376611 + ], + [ + 70.852967563702066, + 35.069280910885311 + ], + [ + 70.651997918668997, + 35.131602688513226 + ], + [ + 70.555776401559626, + 34.972749335413482 + ], + [ + 70.496503534310648, + 34.934534614580798 + ], + [ + 70.391600375856626, + 34.904071357307259 + ], + [ + 70.259567092247494, + 34.942156886930775 + ], + [ + 70.150168085288897, + 35.090985012448357 + ], + [ + 70.026816441225776, + 35.1075731469831 + ], + [ + 70.010021600216646, + 35.173615628558366 + ], + [ + 69.972194452112262, + 35.235782376555392 + ], + [ + 69.974674920810912, + 35.288854072057745 + ], + [ + 69.921603225308559, + 35.355826727821238 + ], + [ + 70.031777377723756, + 35.415642198328783 + ], + [ + 70.076632520774183, + 35.476000271195517 + ], + [ + 70.135130242566618, + 35.478093167165923 + ], + [ + 70.163810663131585, + 35.500055650248044 + ], + [ + 70.177970004911742, + 35.523775133415654 + ], + [ + 70.171717157220996, + 35.561111355104913 + ], + [ + 70.210681186887257, + 35.585683498994285 + ], + [ + 70.231196730045042, + 35.670355333331941 + ], + [ + 70.294035271610483, + 35.660562648847133 + ], + [ + 70.383848911398104, + 35.698131415432442 + ], + [ + 70.479450310883124, + 35.666944687747105 + ], + [ + 70.499449090103383, + 35.622063707174334 + ], + [ + 70.554691196841247, + 35.56687327727991 + ], + [ + 70.535777622339367, + 35.498453680692762 + ], + [ + 70.543529086797889, + 35.446312161177275 + ], + [ + 70.576912062341762, + 35.442410590076634 + ], + [ + 70.634789667409166, + 35.46569082277324 + ], + [ + 70.650757684319672, + 35.510700995454556 + ], + [ + 70.687241245287225, + 35.537004299209002 + ], + [ + 70.757676222579562, + 35.488764349894836 + ], + [ + 70.86443973210794, + 35.484242662069164 + ], + [ + 70.882733188985469, + 35.516282050476207 + ], + [ + 70.86614505355135, + 35.600256252823783 + ], + [ + 70.877927281219002, + 35.625706894957204 + ], + [ + 70.959989454749518, + 35.642372544757109 + ], + [ + 71.013681267876166, + 35.699164944206814 + ], + [ + 70.96887780076986, + 35.739601752219073 + ], + [ + 70.973218622341506, + 35.775413520517532 + ], + [ + 71.024274937138614, + 35.8048949240615 + ], + [ + 71.067063022640355, + 35.864787908934829 + ], + [ + 71.084633010005348, + 35.941940822810693 + ], + [ + 71.169913421866909, + 36.03080174600376 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-NAN", + "NAME_1": "Nangarhar" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 70.983355946819472, + 34.555256106883803 + ], + [ + 70.956991415000061, + 34.53200185200005 + ], + [ + 70.970840698000131, + 34.468879090000101 + ], + [ + 71.05093916900006, + 34.3897883100001 + ], + [ + 71.122045939000088, + 34.356818746000059 + ], + [ + 71.12638675900007, + 34.33222076400007 + ], + [ + 71.097086223000133, + 34.262457581000021 + ], + [ + 71.1080933020001, + 34.165228373 + ], + [ + 71.062773071000095, + 34.10530955000003 + ], + [ + 71.062618042000054, + 34.054253235000047 + ], + [ + 70.939731486000085, + 34.000923157000059 + ], + [ + 70.88433435100012, + 34.007046815000123 + ], + [ + 70.862216837000119, + 33.964775492000044 + ], + [ + 70.491490112000065, + 33.939609070000088 + ], + [ + 70.328192587000103, + 33.957282410000104 + ], + [ + 70.002837769000109, + 34.043788758000105 + ], + [ + 69.905445463287649, + 34.035847602660887 + ], + [ + 69.792515496592841, + 34.208093167365746 + ], + [ + 69.727764927109661, + 34.251656399223407 + ], + [ + 69.48586754674983, + 34.159000556430499 + ], + [ + 69.480441522258388, + 34.202357082713149 + ], + [ + 69.617590772895824, + 34.30111074536461 + ], + [ + 69.664771355913331, + 34.355035102487989 + ], + [ + 69.66260094557714, + 34.393172308954888 + ], + [ + 70.006300897168614, + 34.422033595773826 + ], + [ + 70.064695266173544, + 34.411594957041586 + ], + [ + 70.353463169389727, + 34.486887518943831 + ], + [ + 70.394080844555276, + 34.513294176385102 + ], + [ + 70.419557326009738, + 34.557219143448663 + ], + [ + 70.40575971943548, + 34.654680894907358 + ], + [ + 70.494643182336972, + 34.694936834867008 + ], + [ + 70.50844078981055, + 34.746768296919356 + ], + [ + 70.585283644424635, + 34.792321071959861 + ], + [ + 70.615514356802066, + 34.800201728526929 + ], + [ + 70.658509148778137, + 34.768937486475807 + ], + [ + 70.667810906847819, + 34.738009142108183 + ], + [ + 70.647347039634155, + 34.664292711339556 + ], + [ + 70.652773065024917, + 34.629979559808817 + ], + [ + 70.696698032987797, + 34.589826971737352 + ], + [ + 70.765272658306515, + 34.584271756036685 + ], + [ + 70.73219974202442, + 34.555048733112528 + ], + [ + 70.741863234400739, + 34.531045030004123 + ], + [ + 70.822995232843709, + 34.552309881995427 + ], + [ + 70.983355946819472, + 34.555256106883803 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-KHO", + "NAME_1": "Khost" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.996478142951901, + 33.742090995103297 + ], + [ + 70.11812788900005, + 33.71652191200009 + ], + [ + 70.132545613000048, + 33.661434835000122 + ], + [ + 70.174093466000045, + 33.632108459000065 + ], + [ + 70.154973185000131, + 33.506612244000067 + ], + [ + 70.285714559000041, + 33.382873027000031 + ], + [ + 70.301579224000079, + 33.351789653000097 + ], + [ + 70.294447876000049, + 33.318949280000069 + ], + [ + 70.124794149000138, + 33.199034119000075 + ], + [ + 70.048002970000084, + 33.194073181000036 + ], + [ + 70.006868530000077, + 33.131803080000012 + ], + [ + 69.95581221600014, + 33.127694805000104 + ], + [ + 69.880933065000079, + 33.089247539000056 + ], + [ + 69.838713420000033, + 33.086663717000064 + ], + [ + 69.771844116000125, + 33.114775696 + ], + [ + 69.667767782000055, + 33.077000224000031 + ], + [ + 69.547516724000104, + 33.07501068200007 + ], + [ + 69.478125248000083, + 33.011350078000035 + ], + [ + 69.345307652326255, + 33.043280545061066 + ], + [ + 69.34081180202304, + 33.067697659319492 + ], + [ + 69.402875197232561, + 33.140277208526356 + ], + [ + 69.390007765745736, + 33.194976712005655 + ], + [ + 69.406130812287131, + 33.265101630036156 + ], + [ + 69.452639601736223, + 33.330394801878583 + ], + [ + 69.54560550289159, + 33.401656603269601 + ], + [ + 69.574647657763137, + 33.4771817082692 + ], + [ + 69.556612583304059, + 33.504544379219681 + ], + [ + 69.583639356571041, + 33.554644680507579 + ], + [ + 69.70637088390913, + 33.605752672148071 + ], + [ + 69.775255567590364, + 33.611540431845413 + ], + [ + 69.795926141278358, + 33.599861558763905 + ], + [ + 69.840626254697838, + 33.646990464937971 + ], + [ + 69.972194452112262, + 33.69711660374827 + ], + [ + 69.996478142951901, + 33.742090995103297 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-PKA", + "NAME_1": "Paktya" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.905445463287649, + 34.035847602660887 + ], + [ + 69.872613160000128, + 34.017227071 + ], + [ + 69.871993042000042, + 33.971519267000062 + ], + [ + 69.841090536000138, + 33.941805319000096 + ], + [ + 69.885428914000101, + 33.889457093000075 + ], + [ + 69.957517538000104, + 33.752695415000019 + ], + [ + 69.996478142951901, + 33.742090995103297 + ], + [ + 69.988782586647005, + 33.712593696042234 + ], + [ + 69.831427850314981, + 33.641874497909726 + ], + [ + 69.795926141278358, + 33.599861558763905 + ], + [ + 69.775255567590364, + 33.611540431845413 + ], + [ + 69.70637088390913, + 33.605752672148071 + ], + [ + 69.583639356571041, + 33.554644680507579 + ], + [ + 69.556612583304059, + 33.504544379219681 + ], + [ + 69.574647657763137, + 33.4771817082692 + ], + [ + 69.54560550289159, + 33.401656603269601 + ], + [ + 69.452639601736223, + 33.330394801878583 + ], + [ + 69.401169874889774, + 33.244560248456708 + ], + [ + 69.370422397675497, + 33.2551797552415 + ], + [ + 69.290220575219337, + 33.237919827138285 + ], + [ + 69.207796664684281, + 33.275204372883479 + ], + [ + 69.196014438815268, + 33.245257880446786 + ], + [ + 69.003571404596642, + 33.153687242372314 + ], + [ + 68.989773797123007, + 33.194124050384573 + ], + [ + 68.985898065343406, + 33.349385890746248 + ], + [ + 68.954427117717273, + 33.397470811328844 + ], + [ + 68.867662388308531, + 33.419510810575446 + ], + [ + 68.768805372869622, + 33.393285020287408 + ], + [ + 68.80017296680893, + 33.464004218419916 + ], + [ + 68.773301223172894, + 33.522708644888041 + ], + [ + 68.772371047186027, + 33.612961534247404 + ], + [ + 68.968844841915882, + 33.602419541828397 + ], + [ + 69.009514194824192, + 33.613039049512508 + ], + [ + 69.087700636575107, + 33.720370998922419 + ], + [ + 69.198339877883029, + 33.789772447440498 + ], + [ + 69.330218132760592, + 33.846849066830941 + ], + [ + 69.481061638983419, + 33.975497545075598 + ], + [ + 69.520645786273974, + 34.038723660268658 + ], + [ + 69.561883579063874, + 34.053994046088349 + ], + [ + 69.635625848254278, + 34.052133694114673 + ], + [ + 69.686527134319761, + 34.038723660268658 + ], + [ + 69.689937779005277, + 34.010120754968852 + ], + [ + 69.705440707922321, + 34.006167507024827 + ], + [ + 69.818250359566434, + 34.07848867381324 + ], + [ + 69.905445463287649, + 34.035847602660887 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-PIA", + "NAME_1": "Paktika" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.301157298970168, + 31.941281701489288 + ], + [ + 69.223763876000135, + 31.881931051000024 + ], + [ + 69.114313192000111, + 31.737753804000036 + ], + [ + 69.040105835000134, + 31.673106588000067 + ], + [ + 68.843528686000127, + 31.606495666000072 + ], + [ + 68.803841186000113, + 31.602568258000119 + ], + [ + 68.777279500000134, + 31.618587952000055 + ], + [ + 68.70544926000008, + 31.701270244000042 + ], + [ + 68.688292684000032, + 31.768604634000027 + ], + [ + 68.527475627000058, + 31.822968242000101 + ], + [ + 68.418748413000117, + 31.783022360000032 + ], + [ + 68.439574016000051, + 31.766589254000067 + ], + [ + 68.549799846000099, + 31.75351511700002 + ], + [ + 68.498020061000034, + 31.725248108000059 + ], + [ + 68.356064901000082, + 31.762506816000055 + ], + [ + 68.255037475000108, + 31.766382548000124 + ], + [ + 68.159126018000052, + 31.825913798 + ], + [ + 68.125743042000067, + 31.81149607400009 + ], + [ + 68.098340425969866, + 31.759123609167204 + ], + [ + 68.028953891808612, + 31.802296860811452 + ], + [ + 68.008955112588353, + 31.87353282288143 + ], + [ + 68.076444533188635, + 32.003447373897188 + ], + [ + 68.051329786940073, + 32.098402818235456 + ], + [ + 68.084816115271451, + 32.178914699953395 + ], + [ + 68.068072951105762, + 32.249194648514219 + ], + [ + 68.082645704935317, + 32.2753429217384 + ], + [ + 68.089622023037919, + 32.399908963527821 + ], + [ + 68.07690962118204, + 32.450138455125568 + ], + [ + 68.053190138913749, + 32.509256292743714 + ], + [ + 67.946736687747887, + 32.578270169432756 + ], + [ + 67.929321730013783, + 32.612299099224003 + ], + [ + 67.81542687365129, + 32.691984157742638 + ], + [ + 67.81883751833675, + 32.706918646778092 + ], + [ + 67.908082717343518, + 32.817015285726825 + ], + [ + 68.044663527199987, + 32.720251166258322 + ], + [ + 68.152770623865194, + 32.730586453102319 + ], + [ + 68.233334182426574, + 32.77244436351657 + ], + [ + 68.266975538590202, + 32.806266587732807 + ], + [ + 68.272763299186863, + 32.8358255074412 + ], + [ + 68.424640334184062, + 32.975015978104864 + ], + [ + 68.477867059317305, + 33.103276881822637 + ], + [ + 68.642973260107851, + 33.232132066541624 + ], + [ + 68.685347935358891, + 33.326028144583177 + ], + [ + 68.768805372869622, + 33.393285020287408 + ], + [ + 68.867662388308531, + 33.419510810575446 + ], + [ + 68.954427117717273, + 33.397470811328844 + ], + [ + 68.985898065343406, + 33.349385890746248 + ], + [ + 68.989773797123007, + 33.194124050384573 + ], + [ + 69.003571404596642, + 33.153687242372314 + ], + [ + 69.196014438815268, + 33.245257880446786 + ], + [ + 69.207796664684281, + 33.275204372883479 + ], + [ + 69.290220575219337, + 33.237919827138285 + ], + [ + 69.370422397675497, + 33.2551797552415 + ], + [ + 69.401169874889774, + 33.244560248456708 + ], + [ + 69.390007765745736, + 33.194976712005655 + ], + [ + 69.402875197232561, + 33.140277208526356 + ], + [ + 69.34081180202304, + 33.067697659319492 + ], + [ + 69.345307652326255, + 33.043280545061066 + ], + [ + 69.478125248000083, + 33.011350078000035 + ], + [ + 69.468503459000033, + 32.994292095000063 + ], + [ + 69.487210327000128, + 32.88587493900009 + ], + [ + 69.477288452000096, + 32.856832785 + ], + [ + 69.376312703000053, + 32.771876729000027 + ], + [ + 69.383237346000044, + 32.744462383000084 + ], + [ + 69.414656616000116, + 32.725574646000055 + ], + [ + 69.426025431000085, + 32.655087992000077 + ], + [ + 69.361223186000075, + 32.568478293000069 + ], + [ + 69.281951538000044, + 32.532795715000063 + ], + [ + 69.232858927000109, + 32.462670797 + ], + [ + 69.228001343000074, + 32.42130381300008 + ], + [ + 69.268102254000098, + 32.301336976000059 + ], + [ + 69.251049031000036, + 32.130649720000079 + ], + [ + 69.301157298970168, + 31.941281701489288 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-ZAB", + "NAME_1": "Zabul" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 68.098340425969866, + 31.759123609167204 + ], + [ + 68.06047570800007, + 31.725558167000131 + ], + [ + 68.046574748000069, + 31.688402812000035 + ], + [ + 67.966062867000119, + 31.638224996000091 + ], + [ + 67.842711223000094, + 31.623497213000107 + ], + [ + 67.748280163998345, + 31.544392093020633 + ], + [ + 67.652232699879164, + 31.570941473770006 + ], + [ + 67.560352004341496, + 31.55021922503721 + ], + [ + 67.41663984585216, + 31.546395169201674 + ], + [ + 67.421755811981086, + 31.581302599035723 + ], + [ + 67.396641065732581, + 31.629852606712404 + ], + [ + 67.335662876140816, + 31.655277411323482 + ], + [ + 67.31736941926323, + 31.632746487460395 + ], + [ + 67.29313317215815, + 31.640730495915648 + ], + [ + 67.263935987655657, + 31.680262966362761 + ], + [ + 67.229829542599305, + 31.688841254020645 + ], + [ + 67.188540073865283, + 31.760955715234047 + ], + [ + 67.054801467014045, + 31.719201158506621 + ], + [ + 66.954239130131725, + 31.731009222797354 + ], + [ + 66.770064325208409, + 31.816972968327832 + ], + [ + 66.692756381701599, + 31.876943468466266 + ], + [ + 66.549405959317539, + 31.774908352338571 + ], + [ + 66.435201043693155, + 31.764521389550453 + ], + [ + 66.311642694055081, + 31.694809881770595 + ], + [ + 66.190461460328095, + 31.792840074010201 + ], + [ + 66.182089878245279, + 31.835111396473735 + ], + [ + 66.299550408924176, + 31.895391954075421 + ], + [ + 66.329677769413479, + 31.930170192700189 + ], + [ + 66.343475375987794, + 31.987505195408403 + ], + [ + 66.310712518068215, + 32.029363104923334 + ], + [ + 66.341149936920033, + 32.09289927847891 + ], + [ + 66.325491978372099, + 32.204391181407857 + ], + [ + 66.400732863430846, + 32.275317084216056 + ], + [ + 66.431170282282665, + 32.33474498109598 + ], + [ + 66.498659701983627, + 32.372236233315505 + ], + [ + 66.523929477863078, + 32.413086453377105 + ], + [ + 66.539639113254452, + 32.507318427303574 + ], + [ + 66.477420689313306, + 32.554757391840155 + ], + [ + 66.444812860125353, + 32.55695363969869 + ], + [ + 66.392826369341435, + 32.487397162449042 + ], + [ + 66.358358189079127, + 32.480911769862246 + ], + [ + 66.31102257733005, + 32.515199082971264 + ], + [ + 66.327197299815509, + 32.577469183755795 + ], + [ + 66.418096144321566, + 32.67376821523095 + ], + [ + 66.514782749424342, + 32.699813137466322 + ], + [ + 66.560878126824036, + 32.75986115197054 + ], + [ + 66.623716669288854, + 32.759938666336382 + ], + [ + 66.598446893409346, + 32.677902330328266 + ], + [ + 66.616430291924416, + 32.665060737263218 + ], + [ + 66.664075962036009, + 32.683845120555873 + ], + [ + 66.689500766647029, + 32.741412665462121 + ], + [ + 66.794093865839216, + 32.806576646095323 + ], + [ + 66.905043166408973, + 32.831588040455699 + ], + [ + 66.958269890642896, + 32.819831651209711 + ], + [ + 66.987312046413763, + 32.830502834837944 + ], + [ + 67.005760532922238, + 32.860888576846321 + ], + [ + 67.011496615776139, + 32.927137763097278 + ], + [ + 67.0535612317654, + 32.933571478840634 + ], + [ + 67.0971244654217, + 32.999846503513311 + ], + [ + 67.072164747904765, + 33.040645046731527 + ], + [ + 67.082086622699421, + 33.059972032383371 + ], + [ + 67.160634799656236, + 33.05705231411298 + ], + [ + 67.189470248952773, + 32.993593654923188 + ], + [ + 67.250448439443915, + 32.988736070313394 + ], + [ + 67.258199903902437, + 32.965016588045103 + ], + [ + 67.294218377775906, + 32.947084866373473 + ], + [ + 67.351165805957123, + 32.952433377398449 + ], + [ + 67.39834638897463, + 33.002947088936992 + ], + [ + 67.425166456666602, + 33.009122423161273 + ], + [ + 67.418500196926516, + 32.983697618550252 + ], + [ + 67.43746544827178, + 32.941064560880761 + ], + [ + 67.376797316143211, + 32.899361680996776 + ], + [ + 67.440876092057977, + 32.852284450766774 + ], + [ + 67.407648146144993, + 32.835515449078684 + ], + [ + 67.406562941426557, + 32.798851020058521 + ], + [ + 67.465680779944023, + 32.730147203530578 + ], + [ + 67.617764519616856, + 32.601369534076696 + ], + [ + 67.663704868285038, + 32.580802314075527 + ], + [ + 67.594613478129475, + 32.513700466203545 + ], + [ + 67.658227166950155, + 32.474323025387264 + ], + [ + 67.685253941116457, + 32.420346991420502 + ], + [ + 67.733984815946485, + 32.41050263099163 + ], + [ + 67.780700310970531, + 32.378618272215476 + ], + [ + 67.725148145870207, + 32.320430610584197 + ], + [ + 67.645204705832498, + 32.306297105427063 + ], + [ + 67.629236688022729, + 32.258160508900346 + ], + [ + 67.706958041780183, + 32.244414578270153 + ], + [ + 67.721427442822176, + 32.224131578209722 + ], + [ + 67.720032179741281, + 32.158890082311416 + ], + [ + 67.845554234140536, + 32.124757798833343 + ], + [ + 67.921105177561856, + 32.076595363884906 + ], + [ + 68.005389439171267, + 32.073184719199389 + ], + [ + 68.051329786940073, + 32.098402818235456 + ], + [ + 68.076444533188635, + 32.003447373897188 + ], + [ + 68.010040318206109, + 31.885315050549139 + ], + [ + 68.010040318206109, + 31.858159085173611 + ], + [ + 68.028953891808612, + 31.802296860811452 + ], + [ + 68.098340425969866, + 31.759123609167204 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-KAN", + "NAME_1": "Kandahar" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 67.748280163998345, + 31.544392093020633 + ], + [ + 67.665461060000041, + 31.518128967000067 + ], + [ + 67.568981160000078, + 31.529859517000048 + ], + [ + 67.556113729000117, + 31.51218617800005 + ], + [ + 67.61145918800014, + 31.410797018000025 + ], + [ + 67.65114668800004, + 31.395294088000085 + ], + [ + 67.770364217000122, + 31.394673971000131 + ], + [ + 67.764731486000073, + 31.334057516000044 + ], + [ + 67.692797892000044, + 31.32522084600005 + ], + [ + 67.583657267000092, + 31.26522450800006 + ], + [ + 67.346204061000094, + 31.207760315000044 + ], + [ + 67.213757365000106, + 31.212256165000056 + ], + [ + 67.13675948100007, + 31.241091614000098 + ], + [ + 67.035266968000087, + 31.235923971000076 + ], + [ + 67.015268189000039, + 31.244657288000056 + ], + [ + 67.025965210000095, + 31.27302764900007 + ], + [ + 67.016818482000076, + 31.309149475000098 + ], + [ + 66.905920858000059, + 31.305532125000113 + ], + [ + 66.838483113000052, + 31.277006734000068 + ], + [ + 66.759521525000082, + 31.21478831000006 + ], + [ + 66.696993042000088, + 31.195823059000091 + ], + [ + 66.663093303000096, + 31.083116760000067 + ], + [ + 66.55002526800007, + 30.976973368000031 + ], + [ + 66.375358927000093, + 30.93671742800008 + ], + [ + 66.267975301000035, + 30.601389059000084 + ], + [ + 66.264926391000074, + 30.557825826000041 + ], + [ + 66.313760620000039, + 30.47829579700003 + ], + [ + 66.321822144000066, + 30.437368063000022 + ], + [ + 66.305285685000058, + 30.24477 + ], + [ + 66.219296102000101, + 30.057856344000086 + ], + [ + 66.340529013000037, + 29.956570536000086 + ], + [ + 66.275210001000062, + 29.885153707000072 + ], + [ + 66.195628296000052, + 29.835337627000044 + ], + [ + 65.036370890000057, + 29.540161845000043 + ], + [ + 64.820311727000103, + 29.567886251000076 + ], + [ + 64.499477017000061, + 29.570202960000088 + ], + [ + 64.660167271402429, + 30.415301419225102 + ], + [ + 64.673654819614228, + 30.738408311494368 + ], + [ + 64.736028273186207, + 31.425110581787919 + ], + [ + 64.821242709883109, + 31.716333116180351 + ], + [ + 64.792665643004966, + 31.743954169549284 + ], + [ + 64.812251011075261, + 31.838909613887552 + ], + [ + 64.905216913130005, + 31.925441799299563 + ], + [ + 64.920254754952964, + 32.004455064249782 + ], + [ + 64.94614464665807, + 32.044400946746293 + ], + [ + 65.010068393841266, + 32.073856512767804 + ], + [ + 65.067635938747571, + 32.055356350315321 + ], + [ + 65.109855585267042, + 32.060859890071868 + ], + [ + 65.139982944856968, + 32.137289334435195 + ], + [ + 65.129389275594576, + 32.15263723372135 + ], + [ + 65.149439731658276, + 32.169948839567269 + ], + [ + 65.166492954186481, + 32.231030381946539 + ], + [ + 65.216619093896043, + 32.264103298228633 + ], + [ + 65.235377638766977, + 32.323944607157898 + ], + [ + 65.268140496686556, + 32.302369696804021 + ], + [ + 65.333149448588131, + 32.303351548734952 + ], + [ + 65.414333123874542, + 32.27405101234433 + ], + [ + 65.442858513909243, + 32.281466580018616 + ], + [ + 65.42627038027382, + 32.316890773790135 + ], + [ + 65.463942498747315, + 32.364872340685963 + ], + [ + 65.457276239007172, + 32.427323310422423 + ], + [ + 65.513293491201637, + 32.459466050717651 + ], + [ + 65.533809035258741, + 32.513054511056794 + ], + [ + 65.589051141097229, + 32.572663275989385 + ], + [ + 65.715038282590626, + 32.568348293738723 + ], + [ + 65.716743604933413, + 32.439829005803972 + ], + [ + 65.806557244721034, + 32.488017280073393 + ], + [ + 65.999310337302177, + 32.465744736830118 + ], + [ + 66.035948927900677, + 32.428718574402694 + ], + [ + 66.13196373943498, + 32.420321152998781 + ], + [ + 66.170617709839405, + 32.429312852705948 + ], + [ + 66.186275669286658, + 32.470240587133389 + ], + [ + 66.209891798767444, + 32.458561713152505 + ], + [ + 66.326577183090478, + 32.491660467856263 + ], + [ + 66.387090284688838, + 32.483159695463542 + ], + [ + 66.444812860125353, + 32.55695363969869 + ], + [ + 66.477420689313306, + 32.554757391840155 + ], + [ + 66.537468702918261, + 32.512951158269345 + ], + [ + 66.523929477863078, + 32.413086453377105 + ], + [ + 66.498659701983627, + 32.372236233315505 + ], + [ + 66.431170282282665, + 32.33474498109598 + ], + [ + 66.400732863430846, + 32.275317084216056 + ], + [ + 66.325491978372099, + 32.204391181407857 + ], + [ + 66.341149936920033, + 32.09289927847891 + ], + [ + 66.310712518068215, + 32.029363104923334 + ], + [ + 66.343475375987794, + 31.987505195408403 + ], + [ + 66.329677769413479, + 31.930170192700189 + ], + [ + 66.299550408924176, + 31.895391954075421 + ], + [ + 66.182089878245279, + 31.835111396473735 + ], + [ + 66.190461460328095, + 31.792840074010201 + ], + [ + 66.311642694055081, + 31.694809881770595 + ], + [ + 66.435201043693155, + 31.764521389550453 + ], + [ + 66.549405959317539, + 31.774908352338571 + ], + [ + 66.692756381701599, + 31.876943468466266 + ], + [ + 66.770064325208409, + 31.816972968327832 + ], + [ + 66.954239130131725, + 31.731009222797354 + ], + [ + 67.054801467014045, + 31.719201158506621 + ], + [ + 67.188540073865283, + 31.760955715234047 + ], + [ + 67.229829542599305, + 31.688841254020645 + ], + [ + 67.263935987655657, + 31.680262966362761 + ], + [ + 67.29313317215815, + 31.640730495915648 + ], + [ + 67.31736941926323, + 31.632746487460395 + ], + [ + 67.335662876140816, + 31.655277411323482 + ], + [ + 67.396641065732581, + 31.629852606712404 + ], + [ + 67.421755811981086, + 31.581302599035723 + ], + [ + 67.41663984585216, + 31.546395169201674 + ], + [ + 67.560352004341496, + 31.55021922503721 + ], + [ + 67.652232699879164, + 31.570941473770006 + ], + [ + 67.748280163998345, + 31.544392093020633 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-HEL", + "NAME_1": "Hilmand" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 64.499477017000061, + 29.570202960000088 + ], + [ + 64.207739299000139, + 29.499983419000031 + ], + [ + 64.172599325000078, + 29.484299622000051 + ], + [ + 64.113378134000072, + 29.396294658000059 + ], + [ + 64.086092977000078, + 29.386605326000037 + ], + [ + 63.971991414000058, + 29.429574280000097 + ], + [ + 63.568605184000091, + 29.497477112000055 + ], + [ + 62.602581131613931, + 29.418069628010926 + ], + [ + 62.720957473408646, + 29.90703786920227 + ], + [ + 62.718373651023171, + 30.006334133313601 + ], + [ + 62.758681267826205, + 30.073177598767131 + ], + [ + 62.767517937902483, + 30.204539088807906 + ], + [ + 62.889939405978794, + 30.276421006923897 + ], + [ + 62.96228641118887, + 30.365950425871461 + ], + [ + 63.011482374911623, + 30.456926784743303 + ], + [ + 63.092304314992134, + 30.518705960012028 + ], + [ + 63.098350458007189, + 30.539273180013254 + ], + [ + 63.0619185729837, + 30.608829658162165 + ], + [ + 63.085172967258586, + 30.650222480583011 + ], + [ + 63.057371046736364, + 30.681770942574929 + ], + [ + 63.156538119638469, + 30.773651638112597 + ], + [ + 63.143050572326047, + 30.936354885469541 + ], + [ + 63.225939569055811, + 30.985860908454129 + ], + [ + 63.285522494667362, + 31.083529365487834 + ], + [ + 63.342935011741361, + 31.125283922215203 + ], + [ + 63.349601270582127, + 31.250030829359275 + ], + [ + 63.316373324669144, + 31.316615912394411 + ], + [ + 63.352701856905128, + 31.374958604555957 + ], + [ + 63.354407180147234, + 31.480249334838902 + ], + [ + 63.407633905280477, + 31.804932359141048 + ], + [ + 63.429493035575092, + 31.860329495509802 + ], + [ + 63.497757603430614, + 31.918749701137756 + ], + [ + 63.538892043433009, + 31.996264350219576 + ], + [ + 63.533621046773874, + 32.038716538937081 + ], + [ + 63.569639519748023, + 32.079902655782917 + ], + [ + 63.538426955439604, + 32.136669215911581 + ], + [ + 63.530055373356788, + 32.200205390366477 + ], + [ + 63.649841343103446, + 32.25803131769112 + ], + [ + 63.726477492142521, + 32.319577948963172 + ], + [ + 63.826729770662382, + 32.322471828811842 + ], + [ + 63.846780226726025, + 32.355518907571479 + ], + [ + 63.917680292011823, + 32.403913886516648 + ], + [ + 63.952406853793264, + 32.400244859412737 + ], + [ + 64.014366896215279, + 32.444867459365753 + ], + [ + 64.022738478298095, + 32.466752428082088 + ], + [ + 63.996021763393628, + 32.533699246323124 + ], + [ + 64.014211866584333, + 32.571655584737414 + ], + [ + 64.029714797300016, + 32.575531318315655 + ], + [ + 64.04366743440454, + 32.55752208137892 + ], + [ + 64.177406040356459, + 32.57219818799598 + ], + [ + 64.284634636978865, + 32.621497504506181 + ], + [ + 64.30096438999459, + 32.664233914063857 + ], + [ + 64.255179070957354, + 32.688651028322283 + ], + [ + 64.266651239363171, + 32.719527695846466 + ], + [ + 64.334605747057537, + 32.767741808537608 + ], + [ + 64.395428907917733, + 32.848925482924699 + ], + [ + 64.578880243328513, + 32.913805242717729 + ], + [ + 64.540536330387283, + 32.938480740293926 + ], + [ + 64.573247512362798, + 32.995531521262649 + ], + [ + 64.562705519044414, + 33.010543525563207 + ], + [ + 64.614381952365193, + 33.066870836120188 + ], + [ + 64.715874465234378, + 33.133378403890219 + ], + [ + 64.699441359431148, + 33.140742296519761 + ], + [ + 64.697115920363387, + 33.165882880290667 + ], + [ + 64.738405389097409, + 33.208670965792408 + ], + [ + 64.725176223304004, + 33.227791245869298 + ], + [ + 64.782433709847794, + 33.246834011580347 + ], + [ + 64.791942172593167, + 33.209058539420028 + ], + [ + 64.823878208212705, + 33.204433498806907 + ], + [ + 64.890127393564342, + 33.254895535300705 + ], + [ + 64.953275995290937, + 33.249211127491492 + ], + [ + 65.158741489727959, + 33.362640895860636 + ], + [ + 65.219099561695373, + 33.362950955122471 + ], + [ + 65.258218621891842, + 33.335097357756808 + ], + [ + 65.297441033976497, + 33.330084744415387 + ], + [ + 65.296510857989688, + 33.29760610643666 + ], + [ + 65.361726516365593, + 33.220194811041665 + ], + [ + 65.34818729041109, + 33.092476507884498 + ], + [ + 65.324467808142799, + 33.092476507884498 + ], + [ + 65.28860436390022, + 33.063150133072156 + ], + [ + 65.285038689583814, + 33.027312527251297 + ], + [ + 65.18437299991399, + 32.896183580307991 + ], + [ + 65.211038038874392, + 32.85817556415094 + ], + [ + 65.197550489763273, + 32.800995591972992 + ], + [ + 65.20809248218228, + 32.771824245892219 + ], + [ + 65.177810092961408, + 32.685317898002552 + ], + [ + 65.269690790297716, + 32.647103176270548 + ], + [ + 65.293720330928522, + 32.558917345359191 + ], + [ + 65.262869500926683, + 32.510729071989033 + ], + [ + 65.273566522077317, + 32.440139065065807 + ], + [ + 65.218789504232177, + 32.267824002175928 + ], + [ + 65.166492954186481, + 32.231030381946539 + ], + [ + 65.149439731658276, + 32.169948839567269 + ], + [ + 65.129389275594576, + 32.15263723372135 + ], + [ + 65.139982944856968, + 32.137289334435195 + ], + [ + 65.109855585267042, + 32.060859890071868 + ], + [ + 65.067635938747571, + 32.055356350315321 + ], + [ + 65.010068393841266, + 32.073856512767804 + ], + [ + 64.94614464665807, + 32.044400946746293 + ], + [ + 64.920254754952964, + 32.004455064249782 + ], + [ + 64.905216913130005, + 31.925441799299563 + ], + [ + 64.812251011075261, + 31.838909613887552 + ], + [ + 64.792665643004966, + 31.743954169549284 + ], + [ + 64.821242709883109, + 31.716333116180351 + ], + [ + 64.736028273186207, + 31.425110581787919 + ], + [ + 64.673654819614228, + 30.738408311494368 + ], + [ + 64.660167271402429, + 30.415301419225102 + ], + [ + 64.499477017000061, + 29.570202960000088 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-URU", + "NAME_1": "Uruzgan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 66.829182162826498, + 33.280940457536076 + ], + [ + 66.844220004649458, + 33.249133613125707 + ], + [ + 66.972222527747419, + 33.249391995544158 + ], + [ + 67.000334506632157, + 33.227713731503513 + ], + [ + 66.999714389907126, + 33.196527004717495 + ], + [ + 66.91558515792866, + 33.13301666958364 + ], + [ + 66.906283399858978, + 33.048370672768328 + ], + [ + 66.93005455897071, + 32.952588406130019 + ], + [ + 67.011496615776139, + 32.927137763097278 + ], + [ + 67.005760532922238, + 32.860888576846321 + ], + [ + 66.987312046413763, + 32.830502834837944 + ], + [ + 66.958269890642896, + 32.819831651209711 + ], + [ + 66.905043166408973, + 32.831588040455699 + ], + [ + 66.794093865839216, + 32.806576646095323 + ], + [ + 66.689500766647029, + 32.741412665462121 + ], + [ + 66.664075962036009, + 32.683845120555873 + ], + [ + 66.616430291924416, + 32.665060737263218 + ], + [ + 66.598446893409346, + 32.677902330328266 + ], + [ + 66.623716669288854, + 32.759938666336382 + ], + [ + 66.560878126824036, + 32.75986115197054 + ], + [ + 66.53075076723411, + 32.711698717022159 + ], + [ + 66.418096144321566, + 32.67376821523095 + ], + [ + 66.335878941160161, + 32.588553779433369 + ], + [ + 66.310609165280709, + 32.519436549956822 + ], + [ + 66.326577183090478, + 32.491660467856263 + ], + [ + 66.286527947806519, + 32.470085558401763 + ], + [ + 66.209891798767444, + 32.458561713152505 + ], + [ + 66.186275669286658, + 32.470240587133389 + ], + [ + 66.164571567723613, + 32.425127060765249 + ], + [ + 66.044940626708524, + 32.425928046442152 + ], + [ + 65.999310337302177, + 32.465744736830118 + ], + [ + 65.806557244721034, + 32.488017280073393 + ], + [ + 65.713798049140621, + 32.440164903487471 + ], + [ + 65.715038282590626, + 32.568348293738723 + ], + [ + 65.597577752810992, + 32.574756171060415 + ], + [ + 65.543885938785024, + 32.527575588942284 + ], + [ + 65.505697056374004, + 32.451301174209789 + ], + [ + 65.457276239007172, + 32.427323310422423 + ], + [ + 65.463942498747315, + 32.364872340685963 + ], + [ + 65.42627038027382, + 32.316890773790135 + ], + [ + 65.437122430156023, + 32.276867376927896 + ], + [ + 65.333149448588131, + 32.303351548734952 + ], + [ + 65.268140496686556, + 32.302369696804021 + ], + [ + 65.235377638766977, + 32.323944607157898 + ], + [ + 65.273566522077317, + 32.440139065065807 + ], + [ + 65.262869500926683, + 32.510729071989033 + ], + [ + 65.293720330928522, + 32.558917345359191 + ], + [ + 65.269690790297716, + 32.647103176270548 + ], + [ + 65.177810092961408, + 32.685317898002552 + ], + [ + 65.20809248218228, + 32.771824245892219 + ], + [ + 65.197550489763273, + 32.800995591972992 + ], + [ + 65.211038038874392, + 32.85817556415094 + ], + [ + 65.18437299991399, + 32.896183580307991 + ], + [ + 65.285038689583814, + 33.027312527251297 + ], + [ + 65.28860436390022, + 33.063150133072156 + ], + [ + 65.324467808142799, + 33.092476507884498 + ], + [ + 65.416968622204138, + 33.067129218538582 + ], + [ + 65.44936974491776, + 33.091933906424629 + ], + [ + 65.490814243282671, + 33.076973578068134 + ], + [ + 65.471435580787386, + 33.144178778727621 + ], + [ + 65.482442661199798, + 33.150199083321013 + ], + [ + 65.574581740055237, + 33.145289821867777 + ], + [ + 65.659331088758734, + 33.105524807423876 + ], + [ + 65.758653192191048, + 33.109323024837693 + ], + [ + 65.799425896987543, + 33.142783514747407 + ], + [ + 65.878594190669332, + 33.090357774391748 + ], + [ + 66.049746535374254, + 33.061599840360316 + ], + [ + 66.090105829020786, + 33.186346747504388 + ], + [ + 66.314949985953035, + 33.306158556572086 + ], + [ + 66.382904493647459, + 33.296882636024804 + ], + [ + 66.47442345577781, + 33.319000148737871 + ], + [ + 66.52842532726703, + 33.242803250169857 + ], + [ + 66.556382277420141, + 33.236937975207354 + ], + [ + 66.69167117698322, + 33.280888779793315 + ], + [ + 66.740402052712511, + 33.318638414431234 + ], + [ + 66.766808710153839, + 33.271328640204558 + ], + [ + 66.829182162826498, + 33.280940457536076 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-GHA", + "NAME_1": "Ghazni" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 66.870161574097324, + 33.245206204502722 + ], + [ + 66.844220004649458, + 33.249133613125707 + ], + [ + 66.829182162826498, + 33.280940457536076 + ], + [ + 66.860343052090172, + 33.426564643043832 + ], + [ + 66.829492222088334, + 33.526377671991952 + ], + [ + 66.844375034280404, + 33.580224513850226 + ], + [ + 66.958890008267247, + 33.629007066422957 + ], + [ + 67.045344680212793, + 33.638618882855155 + ], + [ + 67.182028842856766, + 33.683887437055546 + ], + [ + 67.225333693195353, + 33.737295030241455 + ], + [ + 67.382688430426697, + 33.865323390861761 + ], + [ + 67.362482944732108, + 33.923459378347616 + ], + [ + 67.327601353319778, + 33.947282213403412 + ], + [ + 67.367598910861034, + 34.012084458830714 + ], + [ + 67.346980014915744, + 34.036630764298309 + ], + [ + 67.377417433767505, + 34.099469305863749 + ], + [ + 67.431367629312604, + 34.13864004200434 + ], + [ + 67.526503940804218, + 34.142360745052315 + ], + [ + 67.543402133701477, + 34.176441351687004 + ], + [ + 67.579575637205835, + 34.196362617440798 + ], + [ + 67.672696567992205, + 34.209333400815751 + ], + [ + 67.740496046954945, + 34.191815090294142 + ], + [ + 67.807520379561822, + 34.149647122416752 + ], + [ + 67.867258334804262, + 34.14401439145098 + ], + [ + 67.959449089603766, + 34.165718492114706 + ], + [ + 68.032364535594809, + 34.203028876281621 + ], + [ + 68.054275343632185, + 34.198843085240185 + ], + [ + 68.112463006162784, + 34.147270006505551 + ], + [ + 68.145174188138242, + 33.956325589054643 + ], + [ + 68.230388624835143, + 33.926870022133812 + ], + [ + 68.404176466970341, + 33.786051744392466 + ], + [ + 68.456162957754259, + 33.786516832385871 + ], + [ + 68.456938104110179, + 33.694481106317994 + ], + [ + 68.554193149993864, + 33.680838528475306 + ], + [ + 68.645608758437447, + 33.726882229031617 + ], + [ + 68.711857944688347, + 33.790056668280613 + ], + [ + 68.745861036957251, + 33.774166164836629 + ], + [ + 68.772681104649223, + 33.715255031894173 + ], + [ + 68.744775832238815, + 33.677014471740449 + ], + [ + 68.769425489594653, + 33.635259915013023 + ], + [ + 68.773301223172894, + 33.522708644888041 + ], + [ + 68.80017296680893, + 33.464004218419916 + ], + [ + 68.768805372869622, + 33.393285020287408 + ], + [ + 68.685347935358891, + 33.326028144583177 + ], + [ + 68.642973260107851, + 33.232132066541624 + ], + [ + 68.477867059317305, + 33.103276881822637 + ], + [ + 68.424640334184062, + 32.975015978104864 + ], + [ + 68.272763299186863, + 32.8358255074412 + ], + [ + 68.259534133393515, + 32.795492052216389 + ], + [ + 68.179332310038035, + 32.739500637544381 + ], + [ + 68.052725050920344, + 32.719527695846466 + ], + [ + 67.993710565190383, + 32.745779324556167 + ], + [ + 67.908082717343518, + 32.817015285726825 + ], + [ + 67.81883751833675, + 32.706918646778092 + ], + [ + 67.81542687365129, + 32.691984157742638 + ], + [ + 67.929321730013783, + 32.612299099224003 + ], + [ + 67.946736687747887, + 32.578270169432756 + ], + [ + 68.053190138913749, + 32.509256292743714 + ], + [ + 68.07690962118204, + 32.450138455125568 + ], + [ + 68.089622023037919, + 32.399908963527821 + ], + [ + 68.082645704935317, + 32.2753429217384 + ], + [ + 68.068072951105762, + 32.249194648514219 + ], + [ + 68.084816115271451, + 32.178914699953395 + ], + [ + 68.051329786940073, + 32.098402818235456 + ], + [ + 68.005389439171267, + 32.073184719199389 + ], + [ + 67.930561965262427, + 32.07341726319612 + ], + [ + 67.845554234140536, + 32.124757798833343 + ], + [ + 67.744371778734546, + 32.144524034056928 + ], + [ + 67.71708662304917, + 32.162300726996932 + ], + [ + 67.722822706802447, + 32.214829820140039 + ], + [ + 67.706958041780183, + 32.244414578270153 + ], + [ + 67.682773472417807, + 32.257411200066826 + ], + [ + 67.632647332708189, + 32.252191881150395 + ], + [ + 67.645204705832498, + 32.306297105427063 + ], + [ + 67.725148145870207, + 32.320430610584197 + ], + [ + 67.780700310970531, + 32.378618272215476 + ], + [ + 67.733984815946485, + 32.41050263099163 + ], + [ + 67.685253941116457, + 32.420346991420502 + ], + [ + 67.658227166950155, + 32.474323025387264 + ], + [ + 67.594613478129475, + 32.513700466203545 + ], + [ + 67.663704868285038, + 32.580802314075527 + ], + [ + 67.617764519616856, + 32.601369534076696 + ], + [ + 67.465680779944023, + 32.730147203530578 + ], + [ + 67.406562941426557, + 32.798851020058521 + ], + [ + 67.407648146144993, + 32.835515449078684 + ], + [ + 67.440876092057977, + 32.852284450766774 + ], + [ + 67.376797316143211, + 32.899361680996776 + ], + [ + 67.43746544827178, + 32.941064560880761 + ], + [ + 67.418500196926516, + 32.983697618550252 + ], + [ + 67.427543572577804, + 33.006745307250128 + ], + [ + 67.39834638897463, + 33.002947088936992 + ], + [ + 67.351165805957123, + 32.952433377398449 + ], + [ + 67.294218377775906, + 32.947084866373473 + ], + [ + 67.258199903902437, + 32.965016588045103 + ], + [ + 67.250448439443915, + 32.988736070313394 + ], + [ + 67.189470248952773, + 32.993593654923188 + ], + [ + 67.160634799656236, + 33.05705231411298 + ], + [ + 67.095470819023035, + 33.063511868278056 + ], + [ + 67.071544631179734, + 33.049430039964363 + ], + [ + 67.0971244654217, + 32.999846503513311 + ], + [ + 67.0535612317654, + 32.933571478840634 + ], + [ + 67.011496615776139, + 32.927137763097278 + ], + [ + 66.939046257778557, + 32.945302028765582 + ], + [ + 66.910314162168845, + 32.996280829196905 + ], + [ + 66.914654981941851, + 33.129761054529013 + ], + [ + 66.999714389907126, + 33.196527004717495 + ], + [ + 67.000334506632157, + 33.227713731503513 + ], + [ + 66.972222527747419, + 33.249391995544158 + ], + [ + 66.870161574097324, + 33.245206204502722 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-PAR", + "NAME_1": "Parwan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 70.176833124249242, + 35.892253933572135 + ], + [ + 70.273364698821752, + 35.850215156004651 + ], + [ + 70.215487094653668, + 35.598757636056064 + ], + [ + 70.171717157220996, + 35.561111355104913 + ], + [ + 70.177970004911742, + 35.523775133415654 + ], + [ + 70.151253290007276, + 35.4884284531106 + ], + [ + 70.076632520774183, + 35.476000271195517 + ], + [ + 70.031777377723756, + 35.415642198328783 + ], + [ + 69.921603225308559, + 35.355826727821238 + ], + [ + 69.974674920810912, + 35.288854072057745 + ], + [ + 69.972194452112262, + 35.235782376555392 + ], + [ + 69.919587843703994, + 35.16715607439329 + ], + [ + 69.816079950129563, + 35.117598375464638 + ], + [ + 69.796856317265224, + 35.080856432078633 + ], + [ + 69.728074986371496, + 35.150361233384217 + ], + [ + 69.678000522605998, + 35.164572252007815 + ], + [ + 69.429850294555422, + 35.153461818807898 + ], + [ + 69.307738884841626, + 35.181883856954414 + ], + [ + 69.245675489632106, + 35.157285875542698 + ], + [ + 69.26350385941555, + 35.392413642475617 + ], + [ + 69.402875197232561, + 35.416262315053757 + ], + [ + 69.456877068721724, + 35.457836005527213 + ], + [ + 69.556147495310654, + 35.456182359128547 + ], + [ + 69.748900587891796, + 35.541086738362253 + ], + [ + 69.782386916223174, + 35.653121242751126 + ], + [ + 69.817630242841403, + 35.705572822427769 + ], + [ + 69.870856967974646, + 35.715623888431708 + ], + [ + 69.961032342068904, + 35.80985586235812 + ], + [ + 69.98599205868652, + 35.791769111055601 + ], + [ + 70.135595330560022, + 35.828304347967276 + ], + [ + 70.171562127590107, + 35.860705471580218 + ], + [ + 70.176833124249242, + 35.892253933572135 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-KAB", + "NAME_1": "Kabul" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.897056918941644, + 34.853609320813462 + ], + [ + 69.927804396155921, + 34.753847967809463 + ], + [ + 69.853338658352357, + 34.681604316286155 + ], + [ + 69.850703159123441, + 34.616001085181892 + ], + [ + 69.82336632659468, + 34.584607651921601 + ], + [ + 69.839075961985998, + 34.529933986863966 + ], + [ + 69.80925866075853, + 34.456295071360444 + ], + [ + 69.812049187819753, + 34.411026516260677 + ], + [ + 69.66260094557714, + 34.393172308954888 + ], + [ + 69.664771355913331, + 34.355035102487989 + ], + [ + 69.617590772895824, + 34.30111074536461 + ], + [ + 69.480441522258388, + 34.202357082713149 + ], + [ + 69.48586754674983, + 34.159000556430499 + ], + [ + 69.469434441845976, + 34.143290921039181 + ], + [ + 69.281487257930564, + 34.36407847813922 + ], + [ + 69.181131625723935, + 34.309534003391548 + ], + [ + 69.116897821077544, + 34.307751165783657 + ], + [ + 68.969154901177717, + 34.349143989103766 + ], + [ + 68.946210565265346, + 34.413093573809363 + ], + [ + 68.867352329046696, + 34.4457789173631 + ], + [ + 68.841927525334995, + 34.492752793906277 + ], + [ + 68.850299107417868, + 34.587501533568911 + ], + [ + 68.875723911129569, + 34.661579697744855 + ], + [ + 68.871538120088132, + 34.704186916992626 + ], + [ + 68.982797479020405, + 34.895389715962608 + ], + [ + 69.055144484230539, + 34.880145169463958 + ], + [ + 69.209812046288846, + 34.879473374996223 + ], + [ + 69.299212274027184, + 34.832241116034652 + ], + [ + 69.346702915407207, + 34.749558823980522 + ], + [ + 69.394968703143093, + 34.725839341712231 + ], + [ + 69.448298781063841, + 34.591222235717566 + ], + [ + 69.469589470577546, + 34.588302517447175 + ], + [ + 69.52328128370425, + 34.606466783115536 + ], + [ + 69.557077671297463, + 34.655378525998174 + ], + [ + 69.626634149446431, + 34.639281317878499 + ], + [ + 69.719238316295218, + 34.650391751078416 + ], + [ + 69.779751417893578, + 34.778135890858664 + ], + [ + 69.857369418863584, + 34.813456732741997 + ], + [ + 69.897056918941644, + 34.853609320813462 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-LAG", + "NAME_1": "Laghman" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.812049187819753, + 34.411026516260677 + ], + [ + 69.80925866075853, + 34.456295071360444 + ], + [ + 69.839075961985998, + 34.529933986863966 + ], + [ + 69.82336632659468, + 34.584607651921601 + ], + [ + 69.850703159123441, + 34.616001085181892 + ], + [ + 69.853338658352357, + 34.681604316286155 + ], + [ + 69.927804396155921, + 34.753847967809463 + ], + [ + 69.928889601773676, + 34.780151272463229 + ], + [ + 69.897056918941644, + 34.853609320813462 + ], + [ + 69.916177199018477, + 34.876734523879179 + ], + [ + 69.906720412217226, + 34.912132880128297 + ], + [ + 69.796856317265224, + 35.080856432078633 + ], + [ + 69.816079950129563, + 35.117598375464638 + ], + [ + 69.919587843703994, + 35.16715607439329 + ], + [ + 69.972194452112262, + 35.235782376555392 + ], + [ + 70.010021600216646, + 35.173615628558366 + ], + [ + 70.026816441225776, + 35.1075731469831 + ], + [ + 70.150168085288897, + 35.090985012448357 + ], + [ + 70.270884230123102, + 34.936110744814982 + ], + [ + 70.391600375856626, + 34.904071357307259 + ], + [ + 70.508130731448091, + 34.939986477493903 + ], + [ + 70.574431593643112, + 34.994040024927187 + ], + [ + 70.586833937136475, + 34.98081085913384 + ], + [ + 70.617219680044172, + 34.889834500261941 + ], + [ + 70.615514356802066, + 34.800201728526929 + ], + [ + 70.519034458173678, + 34.757723700488384 + ], + [ + 70.494643182336972, + 34.694936834867008 + ], + [ + 70.40575971943548, + 34.654680894907358 + ], + [ + 70.421417677983413, + 34.571275133340691 + ], + [ + 70.394080844555276, + 34.513294176385102 + ], + [ + 70.303337029680165, + 34.465855210949201 + ], + [ + 70.064695266173544, + 34.411594957041586 + ], + [ + 70.006300897168614, + 34.422033595773826 + ], + [ + 69.812049187819753, + 34.411026516260677 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-LOG", + "NAME_1": "Logar" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.281487257930564, + 34.36407847813922 + ], + [ + 69.391971469607597, + 34.248710842531352 + ], + [ + 69.462303094112485, + 34.143135891408235 + ], + [ + 69.735102980418162, + 34.250157783355007 + ], + [ + 69.792515496592841, + 34.208093167365746 + ], + [ + 69.897573683778432, + 34.045079860746966 + ], + [ + 69.818250359566434, + 34.07848867381324 + ], + [ + 69.705440707922321, + 34.006167507024827 + ], + [ + 69.66973229420995, + 34.045260727900256 + ], + [ + 69.542659947098855, + 34.050066637465306 + ], + [ + 69.514289584896403, + 34.033220120512112 + ], + [ + 69.481061638983419, + 33.975497545075598 + ], + [ + 69.330218132760592, + 33.846849066830941 + ], + [ + 69.198339877883029, + 33.789772447440498 + ], + [ + 69.087700636575107, + 33.720370998922419 + ], + [ + 69.009514194824192, + 33.613039049512508 + ], + [ + 68.968844841915882, + 33.602419541828397 + ], + [ + 68.772371047186027, + 33.612961534247404 + ], + [ + 68.744775832238815, + 33.677014471740449 + ], + [ + 68.772681104649223, + 33.715255031894173 + ], + [ + 68.745861036957251, + 33.774166164836629 + ], + [ + 68.711857944688347, + 33.790056668280613 + ], + [ + 68.757333205363125, + 33.842430731792831 + ], + [ + 68.763844436371585, + 33.878190823247849 + ], + [ + 68.746481153682282, + 33.910178533912188 + ], + [ + 68.762139113129535, + 33.933975532344903 + ], + [ + 68.798002557372115, + 33.964309597509896 + ], + [ + 68.888126254622932, + 33.992860825966318 + ], + [ + 68.871693149719079, + 34.030377915708243 + ], + [ + 68.806684197817447, + 34.089082343075631 + ], + [ + 68.84084231971724, + 34.197086086953334 + ], + [ + 68.893603956857078, + 34.240856025285325 + ], + [ + 68.969154901177717, + 34.349143989103766 + ], + [ + 69.116897821077544, + 34.307751165783657 + ], + [ + 69.181131625723935, + 34.309534003391548 + ], + [ + 69.281487257930564, + 34.36407847813922 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-KAP", + "NAME_1": "Kapisa" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.897056918941644, + 34.853609320813462 + ], + [ + 69.857369418863584, + 34.813456732741997 + ], + [ + 69.779751417893578, + 34.778135890858664 + ], + [ + 69.719238316295218, + 34.650391751078416 + ], + [ + 69.637641228959524, + 34.639281317878499 + ], + [ + 69.604258254314971, + 34.649306546359981 + ], + [ + 69.615110305096493, + 34.694290879720313 + ], + [ + 69.564674107024416, + 34.757439480547589 + ], + [ + 69.565966018217125, + 34.910272529053941 + ], + [ + 69.428765089836986, + 34.935929876762373 + ], + [ + 69.367786900245221, + 34.989957587572576 + ], + [ + 69.297661981315343, + 35.013857936994157 + ], + [ + 69.278386671607564, + 35.048506985309132 + ], + [ + 69.28334760900492, + 35.161704210580808 + ], + [ + 69.307738884841626, + 35.181883856954414 + ], + [ + 69.429850294555422, + 35.153461818807898 + ], + [ + 69.564053990299385, + 35.152531642821032 + ], + [ + 69.633300409186518, + 35.168758043049252 + ], + [ + 69.728074986371496, + 35.150361233384217 + ], + [ + 69.852408482365547, + 35.011454983560611 + ], + [ + 69.906720412217226, + 34.912132880128297 + ], + [ + 69.916177199018477, + 34.876734523879179 + ], + [ + 69.897056918941644, + 34.853609320813462 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-WAR", + "NAME_1": "Wardak" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 68.862701450011855, + 34.622228095350295 + ], + [ + 68.841927525334995, + 34.492752793906277 + ], + [ + 68.867352329046696, + 34.4457789173631 + ], + [ + 68.946210565265346, + 34.413093573809363 + ], + [ + 68.969154901177717, + 34.349143989103766 + ], + [ + 68.893603956857078, + 34.240856025285325 + ], + [ + 68.84084231971724, + 34.197086086953334 + ], + [ + 68.810094841603643, + 34.124894111374147 + ], + [ + 68.811645135214803, + 34.077816881144145 + ], + [ + 68.871693149719079, + 34.030377915708243 + ], + [ + 68.888126254622932, + 33.992860825966318 + ], + [ + 68.773507927848584, + 33.946868801354071 + ], + [ + 68.746481153682282, + 33.910178533912188 + ], + [ + 68.763844436371585, + 33.878190823247849 + ], + [ + 68.745395948963846, + 33.82178599742582 + ], + [ + 68.645608758437447, + 33.726882229031617 + ], + [ + 68.545666538280102, + 33.677996324570699 + ], + [ + 68.454302605780583, + 33.69711660374827 + ], + [ + 68.456162957754259, + 33.786516832385871 + ], + [ + 68.404176466970341, + 33.786051744392466 + ], + [ + 68.230388624835143, + 33.926870022133812 + ], + [ + 68.145174188138242, + 33.956325589054643 + ], + [ + 68.112463006162784, + 34.147270006505551 + ], + [ + 68.069158155824198, + 34.190419827213248 + ], + [ + 68.032364535594809, + 34.203028876281621 + ], + [ + 67.959449089603766, + 34.165718492114706 + ], + [ + 67.867258334804262, + 34.14401439145098 + ], + [ + 67.807520379561822, + 34.149647122416752 + ], + [ + 67.740496046954945, + 34.191815090294142 + ], + [ + 67.647530144900259, + 34.208248196097372 + ], + [ + 67.562677443409257, + 34.190290636004022 + ], + [ + 67.526503940804218, + 34.142360745052315 + ], + [ + 67.431367629312604, + 34.13864004200434 + ], + [ + 67.409353469387099, + 34.16099009871408 + ], + [ + 67.422065871242921, + 34.200367540429625 + ], + [ + 67.509605747007583, + 34.231683458424868 + ], + [ + 67.548104688680382, + 34.277701321458778 + ], + [ + 67.380362989560297, + 34.338731186994664 + ], + [ + 67.427026808640278, + 34.370873928189212 + ], + [ + 67.409663526850238, + 34.409036973977152 + ], + [ + 67.276700067254296, + 34.415419012877123 + ], + [ + 67.248433058738613, + 34.43944855440725 + ], + [ + 67.269723749151694, + 34.490504869204301 + ], + [ + 67.347445102909148, + 34.527195135746922 + ], + [ + 67.346359898190713, + 34.552309881995427 + ], + [ + 67.300264519891641, + 34.592514146011013 + ], + [ + 67.290342645096985, + 34.620341904954955 + ], + [ + 67.308946161236349, + 34.639074612303489 + ], + [ + 67.506970248677987, + 34.68113922829275 + ], + [ + 67.572754347834859, + 34.653673204554707 + ], + [ + 67.728868849817559, + 34.644784858534365 + ], + [ + 67.974331902695099, + 34.595950629118192 + ], + [ + 68.039030796234215, + 34.685867620794056 + ], + [ + 68.093032667723378, + 34.687753811189395 + ], + [ + 68.167550083269703, + 34.750954087960793 + ], + [ + 68.282685173981577, + 34.800305081314434 + ], + [ + 68.299583367778155, + 34.742324124358845 + ], + [ + 68.351104770568668, + 34.699406846748559 + ], + [ + 68.374979283367225, + 34.628610134250266 + ], + [ + 68.406656935668991, + 34.6254320344608 + ], + [ + 68.555950148280715, + 34.691526191080811 + ], + [ + 68.70286624498118, + 34.647575384696211 + ], + [ + 68.862701450011855, + 34.622228095350295 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-BAM", + "NAME_1": "Bamyan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 67.431367629312604, + 34.13864004200434 + ], + [ + 67.377417433767505, + 34.099469305863749 + ], + [ + 67.346980014915744, + 34.036630764298309 + ], + [ + 67.314682244989569, + 34.010870062903052 + ], + [ + 67.198306919029051, + 33.992085680509717 + ], + [ + 67.161875034005561, + 33.956170559423754 + ], + [ + 67.122600945976842, + 33.974877428350624 + ], + [ + 67.03351077660102, + 33.937928779389608 + ], + [ + 66.960595330609976, + 33.973843899576309 + ], + [ + 66.783241815057693, + 34.00386790637873 + ], + [ + 66.644645623596602, + 33.974438177879563 + ], + [ + 66.530027296822254, + 34.046139227943002 + ], + [ + 66.513232455813181, + 34.070788886198102 + ], + [ + 66.516022983773667, + 34.114507147686709 + ], + [ + 66.549871047310944, + 34.192150987078378 + ], + [ + 66.530440707972275, + 34.261113186024716 + ], + [ + 66.580101759688432, + 34.306795152274447 + ], + [ + 66.552041456747816, + 34.327827460269077 + ], + [ + 66.484552036147534, + 34.338937893468994 + ], + [ + 66.46868737202459, + 34.368496812278067 + ], + [ + 66.548320753699784, + 34.42477244689087 + ], + [ + 66.612554559245496, + 34.441825670318394 + ], + [ + 66.65291385289197, + 34.433789985019757 + ], + [ + 66.735906203308616, + 34.487352606937236 + ], + [ + 66.710326369066649, + 34.5275051950087 + ], + [ + 66.71513227683306, + 34.556573188301968 + ], + [ + 66.7740950866189, + 34.621607977725944 + ], + [ + 66.754716424123671, + 34.654680894907358 + ], + [ + 66.707690870737054, + 34.68150096349865 + ], + [ + 66.637824335124947, + 34.68532501933413 + ], + [ + 66.646402621883453, + 34.710000515111687 + ], + [ + 66.600927362108052, + 34.738706773198999 + ], + [ + 66.577001174264751, + 34.792863674319108 + ], + [ + 66.519433627559806, + 34.8443334011655 + ], + [ + 66.436596306774106, + 34.895338040018487 + ], + [ + 66.337894321865406, + 34.931769924142657 + ], + [ + 66.333088413199675, + 34.983601386195005 + ], + [ + 66.355102574024556, + 35.080132962566154 + ], + [ + 66.335103793904921, + 35.114652817873207 + ], + [ + 66.357738072354152, + 35.171496894166296 + ], + [ + 66.3925163100796, + 35.185707912789894 + ], + [ + 66.55653730705103, + 35.173305569296588 + ], + [ + 66.669036900332628, + 35.20281281216154 + ], + [ + 66.807426385319388, + 35.370606187225746 + ], + [ + 67.01676761333465, + 35.352467759979106 + ], + [ + 67.306155633275807, + 35.436622830379292 + ], + [ + 67.403617384734503, + 35.4229027372715 + ], + [ + 67.57352949419078, + 35.469359849877151 + ], + [ + 67.743906690741142, + 35.443418281328604 + ], + [ + 67.818992547068376, + 35.459386298239053 + ], + [ + 67.861057163057581, + 35.435201727977358 + ], + [ + 68.088536818319483, + 35.461220810891689 + ], + [ + 68.106055128841092, + 35.376135566303333 + ], + [ + 68.10099083775691, + 35.307948512813596 + ], + [ + 68.06109663300316, + 35.208858954277275 + ], + [ + 68.012055698911354, + 35.172168686835391 + ], + [ + 68.01546634269755, + 35.06442332627546 + ], + [ + 68.071793654153794, + 35.032228909136848 + ], + [ + 68.122074822594982, + 35.035639552922987 + ], + [ + 68.183983189072876, + 35.009594630687616 + ], + [ + 68.236589796581825, + 34.963240871768789 + ], + [ + 68.253487990378403, + 34.885829576373851 + ], + [ + 68.247131789000832, + 34.825523180350444 + ], + [ + 68.282685173981577, + 34.800305081314434 + ], + [ + 68.167550083269703, + 34.750954087960793 + ], + [ + 68.093032667723378, + 34.687753811189395 + ], + [ + 68.039030796234215, + 34.685867620794056 + ], + [ + 67.974331902695099, + 34.595950629118192 + ], + [ + 67.728868849817559, + 34.644784858534365 + ], + [ + 67.572754347834859, + 34.653673204554707 + ], + [ + 67.506970248677987, + 34.68113922829275 + ], + [ + 67.299024286441636, + 34.634992174049557 + ], + [ + 67.300264519891641, + 34.592514146011013 + ], + [ + 67.346359898190713, + 34.552309881995427 + ], + [ + 67.347445102909148, + 34.527195135746922 + ], + [ + 67.269723749151694, + 34.490504869204301 + ], + [ + 67.251068557068209, + 34.430921942693487 + ], + [ + 67.276700067254296, + 34.415419012877123 + ], + [ + 67.409663526850238, + 34.409036973977152 + ], + [ + 67.427026808640278, + 34.370873928189212 + ], + [ + 67.380362989560297, + 34.338731186994664 + ], + [ + 67.548104688680382, + 34.277701321458778 + ], + [ + 67.509605747007583, + 34.231683458424868 + ], + [ + 67.422065871242921, + 34.200367540429625 + ], + [ + 67.409353469387099, + 34.16099009871408 + ], + [ + 67.431367629312604, + 34.13864004200434 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-PAR", + "NAME_1": "Parwan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.055144484230539, + 34.880145169463958 + ], + [ + 68.982797479020405, + 34.895389715962608 + ], + [ + 68.941352979756175, + 34.84205963804186 + ], + [ + 68.871538120088132, + 34.704186916992626 + ], + [ + 68.862701450011855, + 34.622228095350295 + ], + [ + 68.70286624498118, + 34.647575384696211 + ], + [ + 68.555950148280715, + 34.691526191080811 + ], + [ + 68.406656935668991, + 34.6254320344608 + ], + [ + 68.380560336590236, + 34.627189032747651 + ], + [ + 68.351104770568668, + 34.699406846748559 + ], + [ + 68.299583367778155, + 34.742324124358845 + ], + [ + 68.282685173981577, + 34.800305081314434 + ], + [ + 68.249457228068593, + 34.820329698057094 + ], + [ + 68.249457228068593, + 34.933733628903838 + ], + [ + 68.183983189072876, + 35.009594630687616 + ], + [ + 68.25519331182187, + 35.04230581356245 + ], + [ + 68.281444939632252, + 35.072536525939881 + ], + [ + 68.37621951681723, + 35.054785672320918 + ], + [ + 68.575638869138459, + 35.06385488549455 + ], + [ + 68.60323408408567, + 35.076128037778687 + ], + [ + 68.5999784690311, + 35.117029933784409 + ], + [ + 68.651809930184072, + 35.128243719771831 + ], + [ + 68.74198530517765, + 35.18240062089194 + ], + [ + 68.809629755408878, + 35.257538154062559 + ], + [ + 68.854174839197412, + 35.269707953559191 + ], + [ + 68.913912795339229, + 35.24828807193694 + ], + [ + 68.978921747240804, + 35.294125067817617 + ], + [ + 69.028117710064237, + 35.307509264141231 + ], + [ + 69.069097121335062, + 35.357221991801453 + ], + [ + 69.185317416765315, + 35.420112210210334 + ], + [ + 69.240869581865695, + 35.415409654332052 + ], + [ + 69.26350385941555, + 35.392413642475617 + ], + [ + 69.245675489632106, + 35.157285875542698 + ], + [ + 69.28334760900492, + 35.161704210580808 + ], + [ + 69.282314081129925, + 35.02897329408222 + ], + [ + 69.380964390094505, + 34.98194773979634 + ], + [ + 69.428765089836986, + 34.935929876762373 + ], + [ + 69.565966018217125, + 34.910272529053941 + ], + [ + 69.564674107024416, + 34.757439480547589 + ], + [ + 69.615110305096493, + 34.694290879720313 + ], + [ + 69.604258254314971, + 34.649306546359981 + ], + [ + 69.557077671297463, + 34.655378525998174 + ], + [ + 69.52328128370425, + 34.606466783115536 + ], + [ + 69.448298781063841, + 34.591222235717566 + ], + [ + 69.394968703143093, + 34.725839341712231 + ], + [ + 69.346702915407207, + 34.749558823980522 + ], + [ + 69.299212274027184, + 34.832241116034652 + ], + [ + 69.209812046288846, + 34.879473374996223 + ], + [ + 69.055144484230539, + 34.880145169463958 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-SAR", + "NAME_1": "Sari Pul" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 66.527340121649274, + 36.587689521154459 + ], + [ + 66.664386021297787, + 36.562213039699998 + ], + [ + 66.680199008577347, + 36.542110907692233 + ], + [ + 66.589248488127168, + 36.433745429507951 + ], + [ + 66.53013064960976, + 36.314166165336246 + ], + [ + 66.461400994660153, + 36.22424917276112 + ], + [ + 66.544445021020863, + 36.174071357107437 + ], + [ + 66.602322626088267, + 36.163426011900924 + ], + [ + 66.59203901608771, + 36.020437323823387 + ], + [ + 66.610384148909304, + 35.992299506516986 + ], + [ + 66.629762811404589, + 35.875614122193952 + ], + [ + 66.586044549016719, + 35.778979193934617 + ], + [ + 66.535298292582127, + 35.743399970532209 + ], + [ + 66.503000522655952, + 35.676013901820113 + ], + [ + 66.663145786049142, + 35.692007758051545 + ], + [ + 66.689965854640434, + 35.66725474700894 + ], + [ + 66.799674920860866, + 35.674825344314172 + ], + [ + 66.904888136778084, + 35.718078517809317 + ], + [ + 67.022348666557662, + 35.66554942556553 + ], + [ + 67.024053989799768, + 35.641959132707768 + ], + [ + 66.983746372097357, + 35.611625068442152 + ], + [ + 67.012116734299809, + 35.595915432151457 + ], + [ + 67.01273685102484, + 35.562584133450969 + ], + [ + 66.989482455850634, + 35.553359889747071 + ], + [ + 66.993668246892071, + 35.494267890550702 + ], + [ + 66.977183465144776, + 35.46470897084231 + ], + [ + 66.912949659599064, + 35.414479478345243 + ], + [ + 66.796574335437185, + 35.36316478112974 + ], + [ + 66.669036900332628, + 35.20281281216154 + ], + [ + 66.55653730705103, + 35.173305569296588 + ], + [ + 66.364766066400819, + 35.178008124275493 + ], + [ + 66.335103793904921, + 35.114652817873207 + ], + [ + 66.355102574024556, + 35.080132962566154 + ], + [ + 66.330607945400345, + 34.957375596806344 + ], + [ + 66.363629184838999, + 34.914199936777663 + ], + [ + 66.323166538405019, + 34.900919094140875 + ], + [ + 66.240122512044252, + 34.916215318382228 + ], + [ + 66.239502394419958, + 34.8851836212271 + ], + [ + 66.175888705599277, + 34.852834174457541 + ], + [ + 66.173718296162406, + 34.831414292835348 + ], + [ + 66.104988641212799, + 34.784362901027066 + ], + [ + 66.107779169173284, + 34.828985500980082 + ], + [ + 66.079357131026768, + 34.910789292991467 + ], + [ + 66.039514602217082, + 34.944844062103755 + ], + [ + 66.051451856817721, + 34.969235337940461 + ], + [ + 66.02618208183759, + 34.990836086716001 + ], + [ + 66.047731153769689, + 35.014012965725783 + ], + [ + 66.036879102988166, + 35.062769679876794 + ], + [ + 65.907894727959274, + 35.075740465050387 + ], + [ + 65.797410516282298, + 35.10816742618573 + ], + [ + 65.760203484902888, + 35.151291409371026 + ], + [ + 65.754312372418042, + 35.192735907735937 + ], + [ + 65.68584109898751, + 35.203872179357575 + ], + [ + 65.640882603149578, + 35.246324368075079 + ], + [ + 65.642277866230529, + 35.269552923928302 + ], + [ + 65.561249220575064, + 35.241466783465285 + ], + [ + 65.471590611317652, + 35.236092434018587 + ], + [ + 65.421309441977144, + 35.29009430640707 + ], + [ + 65.406685012203525, + 35.336603094956843 + ], + [ + 65.411025831976531, + 35.447836616366715 + ], + [ + 65.440067986848078, + 35.472357083412646 + ], + [ + 65.485853305885314, + 35.556641344122738 + ], + [ + 65.47035037606895, + 35.607594306132285 + ], + [ + 65.483527865918234, + 35.65105418610176 + ], + [ + 65.52838300986798, + 35.679269517774003 + ], + [ + 65.623002557422069, + 35.676065579562817 + ], + [ + 65.679329867978993, + 35.746552231899955 + ], + [ + 65.679949985603344, + 35.78735077601749 + ], + [ + 65.792914666878346, + 35.793319403767441 + ], + [ + 65.816685825090701, + 35.836572577262586 + ], + [ + 65.791674431629701, + 35.897369899701062 + ], + [ + 65.739998000107562, + 35.960854397312573 + ], + [ + 65.757878045835128, + 36.001213690959048 + ], + [ + 65.745475702341764, + 36.016768296719476 + ], + [ + 65.71085249244851, + 36.017181707869497 + ], + [ + 65.661501499094868, + 35.989793199396615 + ], + [ + 65.527091098675214, + 35.977855942997337 + ], + [ + 65.534274123252146, + 36.044570217241699 + ], + [ + 65.490659213651782, + 36.096815090444068 + ], + [ + 65.501976353326029, + 36.316543281247391 + ], + [ + 65.527091098675214, + 36.339616808368987 + ], + [ + 65.711937697166945, + 36.357341824465607 + ], + [ + 65.847691684723429, + 36.45028188719931 + ], + [ + 65.966857537745113, + 36.475448310291256 + ], + [ + 66.0714506369373, + 36.537821763863292 + ], + [ + 66.234231397760766, + 36.535444647952147 + ], + [ + 66.527340121649274, + 36.587689521154459 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-GHO", + "NAME_1": "Ghor" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 66.363629184838999, + 34.914199936777663 + ], + [ + 66.436596306774106, + 34.895338040018487 + ], + [ + 66.519433627559806, + 34.8443334011655 + ], + [ + 66.577001174264751, + 34.792863674319108 + ], + [ + 66.600927362108052, + 34.738706773198999 + ], + [ + 66.646402621883453, + 34.710000515111687 + ], + [ + 66.637824335124947, + 34.68532501933413 + ], + [ + 66.700869582265398, + 34.683697211357185 + ], + [ + 66.764948358180163, + 34.644965724788335 + ], + [ + 66.770219353939979, + 34.608042914249097 + ], + [ + 66.718542922417896, + 34.562076728058514 + ], + [ + 66.709551222710729, + 34.532621161137683 + ], + [ + 66.735906203308616, + 34.487352606937236 + ], + [ + 66.661440463706413, + 34.437045600074384 + ], + [ + 66.557777541400412, + 34.428674017991511 + ], + [ + 66.487032504846184, + 34.389219061910183 + ], + [ + 66.324716831116859, + 34.376454983210863 + ], + [ + 66.212062209103635, + 34.406323961281771 + ], + [ + 66.155269809653987, + 34.35852326153929 + ], + [ + 66.010472447345535, + 34.358419907852465 + ], + [ + 65.945463495443903, + 34.320980333375644 + ], + [ + 65.624862909395745, + 34.352089544896558 + ], + [ + 65.521820102915399, + 34.344958198062386 + ], + [ + 65.467353143432774, + 34.075078030027043 + ], + [ + 65.490039096926751, + 34.039059557052894 + ], + [ + 65.519494662948318, + 34.026915595078606 + ], + [ + 65.520476515778569, + 33.973327134739463 + ], + [ + 65.469523552869646, + 33.905346787724056 + ], + [ + 65.408442009591056, + 33.884805406144551 + ], + [ + 65.399398634839088, + 33.866253566848627 + ], + [ + 65.40947553926469, + 33.833852444134948 + ], + [ + 65.487248569865585, + 33.773494371268214 + ], + [ + 65.50833255380428, + 33.678254706089774 + ], + [ + 65.567450393221065, + 33.629833888722942 + ], + [ + 65.576907180022317, + 33.604770820217141 + ], + [ + 65.379864942712913, + 33.475373033138965 + ], + [ + 65.363276809077433, + 33.452532050014099 + ], + [ + 65.370253127180035, + 33.424833482279382 + ], + [ + 65.219099561695373, + 33.362950955122471 + ], + [ + 65.158741489727959, + 33.362640895860636 + ], + [ + 64.945834588295611, + 33.246420600430326 + ], + [ + 64.890127393564342, + 33.254895535300705 + ], + [ + 64.817677035566703, + 33.203115750091797 + ], + [ + 64.789099968688561, + 33.212469184105544 + ], + [ + 64.782433709847794, + 33.246834011580347 + ], + [ + 64.725176223304004, + 33.227791245869298 + ], + [ + 64.694015334040387, + 33.247040717155357 + ], + [ + 64.680217726566809, + 33.278459987938049 + ], + [ + 64.608025750987565, + 33.283033351707786 + ], + [ + 64.565651075736525, + 33.32049876640491 + ], + [ + 64.534025100278143, + 33.319646103884565 + ], + [ + 64.475527377586388, + 33.227636217137672 + ], + [ + 64.376360304684283, + 33.18231598609384 + ], + [ + 64.402405226919655, + 33.142835190691471 + ], + [ + 64.331505160734537, + 33.122578029952081 + ], + [ + 64.254713982963892, + 33.164255073213042 + ], + [ + 64.229392531140377, + 33.15898407655385 + ], + [ + 64.150430943033541, + 33.264145616526946 + ], + [ + 64.107281122325901, + 33.278227443941375 + ], + [ + 64.102165155297655, + 33.340962632719311 + ], + [ + 64.068368767704442, + 33.409433906149843 + ], + [ + 64.011524693209992, + 33.487387803904028 + ], + [ + 63.958659702383329, + 33.516688341193969 + ], + [ + 63.888638137140276, + 33.496922105071064 + ], + [ + 63.807351109066417, + 33.424006659080021 + ], + [ + 63.681829054667105, + 33.404886379902507 + ], + [ + 63.551139357295483, + 33.344011542198871 + ], + [ + 63.296374546348204, + 33.328508613281883 + ], + [ + 63.206819288978977, + 33.307062893237912 + ], + [ + 63.140260044365505, + 33.319491075152996 + ], + [ + 63.130028111208333, + 33.394757799532783 + ], + [ + 63.090443963018458, + 33.460180162584436 + ], + [ + 63.074630974839579, + 33.532837226157028 + ], + [ + 63.241132439610396, + 33.618516750847334 + ], + [ + 63.47729373621695, + 33.65970286679385 + ], + [ + 63.515792677889749, + 33.70091482206135 + ], + [ + 63.504578891902327, + 33.767164008312307 + ], + [ + 63.582972040127515, + 33.802820746080556 + ], + [ + 63.538271925808715, + 33.857003486521648 + ], + [ + 63.516257765883154, + 33.912555649823332 + ], + [ + 63.445771111747376, + 33.974929104294688 + ], + [ + 63.387893507579292, + 34.073992825308608 + ], + [ + 63.47667361769328, + 34.210961208792753 + ], + [ + 63.493106724395773, + 34.268451240232537 + ], + [ + 63.741256952446349, + 34.268451240232537 + ], + [ + 63.849880812149706, + 34.219927070078199 + ], + [ + 63.976643100898343, + 34.21783417410785 + ], + [ + 64.006150343763352, + 34.245713608995857 + ], + [ + 64.061650832020234, + 34.224009508332131 + ], + [ + 64.117978142577215, + 34.225559801043971 + ], + [ + 64.194976026822133, + 34.264213772347716 + ], + [ + 64.208618604664821, + 34.287313136991656 + ], + [ + 64.188154738350477, + 34.34022980376244 + ], + [ + 64.197766554782675, + 34.469911810781412 + ], + [ + 64.301429477987995, + 34.477637436818213 + ], + [ + 64.40478234193148, + 34.52021881854364 + ], + [ + 64.434858025577398, + 34.491900133184572 + ], + [ + 64.481573520601444, + 34.492416897122098 + ], + [ + 64.459972771825903, + 34.586157945532761 + ], + [ + 64.476302524841628, + 34.671424059073047 + ], + [ + 64.496301304061888, + 34.700311184313705 + ], + [ + 64.529374221243302, + 34.711111559151107 + ], + [ + 64.708743116601511, + 34.694730130191317 + ], + [ + 65.010843540197186, + 34.789246324058581 + ], + [ + 65.04732710206406, + 34.939728095075509 + ], + [ + 64.999371371791369, + 35.025821030915836 + ], + [ + 64.867958204907211, + 35.133773097950098 + ], + [ + 64.764915399326185, + 35.166639309556444 + ], + [ + 64.730137159802041, + 35.213148098106217 + ], + [ + 64.854160598332896, + 35.239813137066619 + ], + [ + 64.912038201601717, + 35.212760525377917 + ], + [ + 65.00324710536961, + 35.238727932348183 + ], + [ + 65.017354771205703, + 35.219736843480518 + ], + [ + 65.133006625855046, + 35.256452949344123 + ], + [ + 65.200185988092869, + 35.224697780877875 + ], + [ + 65.244214308843254, + 35.237694404473189 + ], + [ + 65.26628014471288, + 35.18699982398266 + ], + [ + 65.332839390225672, + 35.188291734276106 + ], + [ + 65.382035353049048, + 35.203872179357575 + ], + [ + 65.451385125623005, + 35.253946642223752 + ], + [ + 65.471590611317652, + 35.236092434018587 + ], + [ + 65.530553420204171, + 35.236609198855433 + ], + [ + 65.642277866230529, + 35.269552923928302 + ], + [ + 65.640882603149578, + 35.246324368075079 + ], + [ + 65.68584109898751, + 35.203872179357575 + ], + [ + 65.754312372418042, + 35.192735907735937 + ], + [ + 65.760203484902888, + 35.151291409371026 + ], + [ + 65.797410516282298, + 35.10816742618573 + ], + [ + 65.907894727959274, + 35.075740465050387 + ], + [ + 66.036879102988166, + 35.062769679876794 + ], + [ + 66.047731153769689, + 35.014012965725783 + ], + [ + 66.02618208183759, + 34.990836086716001 + ], + [ + 66.051451856817721, + 34.969235337940461 + ], + [ + 66.039514602217082, + 34.944844062103755 + ], + [ + 66.079357131026768, + 34.910789292991467 + ], + [ + 66.107779169173284, + 34.828985500980082 + ], + [ + 66.104988641212799, + 34.784362901027066 + ], + [ + 66.173718296162406, + 34.831414292835348 + ], + [ + 66.175888705599277, + 34.852834174457541 + ], + [ + 66.239502394419958, + 34.8851836212271 + ], + [ + 66.240122512044252, + 34.916215318382228 + ], + [ + 66.323166538405019, + 34.900919094140875 + ], + [ + 66.363629184838999, + 34.914199936777663 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-BGL", + "NAME_1": "Baghlan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 69.961032342068904, + 35.80985586235812 + ], + [ + 69.870856967974646, + 35.715623888431708 + ], + [ + 69.817630242841403, + 35.705572822427769 + ], + [ + 69.791430291874462, + 35.673275050703012 + ], + [ + 69.748900587891796, + 35.541086738362253 + ], + [ + 69.556147495310654, + 35.456182359128547 + ], + [ + 69.456877068721724, + 35.457836005527213 + ], + [ + 69.402875197232561, + 35.416262315053757 + ], + [ + 69.339881626036174, + 35.402438870057779 + ], + [ + 69.26350385941555, + 35.392413642475617 + ], + [ + 69.240869581865695, + 35.415409654332052 + ], + [ + 69.185317416765315, + 35.420112210210334 + ], + [ + 69.069097121335062, + 35.357221991801453 + ], + [ + 69.028117710064237, + 35.307509264141231 + ], + [ + 68.978921747240804, + 35.294125067817617 + ], + [ + 68.913912795339229, + 35.24828807193694 + ], + [ + 68.854174839197412, + 35.269707953559191 + ], + [ + 68.809629755408878, + 35.257538154062559 + ], + [ + 68.74198530517765, + 35.18240062089194 + ], + [ + 68.651809930184072, + 35.128243719771831 + ], + [ + 68.5999784690311, + 35.117029933784409 + ], + [ + 68.60323408408567, + 35.076128037778687 + ], + [ + 68.575638869138459, + 35.06385488549455 + ], + [ + 68.37621951681723, + 35.054785672320918 + ], + [ + 68.281444939632252, + 35.072536525939881 + ], + [ + 68.25519331182187, + 35.04230581356245 + ], + [ + 68.173441196653869, + 35.006700750838945 + ], + [ + 68.122074822594982, + 35.035639552922987 + ], + [ + 68.071793654153794, + 35.032228909136848 + ], + [ + 68.01794681229552, + 35.056775213705123 + ], + [ + 68.009730258944273, + 35.165450751151241 + ], + [ + 68.06109663300316, + 35.208858954277275 + ], + [ + 68.10099083775691, + 35.307948512813596 + ], + [ + 68.106055128841092, + 35.376135566303333 + ], + [ + 68.088536818319483, + 35.461220810891689 + ], + [ + 68.142538689808646, + 35.507031969249965 + ], + [ + 68.188789096839344, + 35.58307383908641 + ], + [ + 68.194060092599159, + 35.613330389885562 + ], + [ + 68.151840447878328, + 35.642165839182098 + ], + [ + 68.156181267651334, + 35.676530667556221 + ], + [ + 68.311675652909003, + 35.853522447003286 + ], + [ + 68.337617222356869, + 35.98834625947228 + ], + [ + 68.467325066898297, + 36.073250636907346 + ], + [ + 68.531403842813063, + 36.152599799541122 + ], + [ + 68.491354608428423, + 36.196602280970467 + ], + [ + 68.371413609050762, + 36.263729967264169 + ], + [ + 68.324543085295147, + 36.314114488492805 + ], + [ + 68.173441196653869, + 36.515187486313437 + ], + [ + 68.201811557957001, + 36.557458807877651 + ], + [ + 68.23953535327388, + 36.571204739407165 + ], + [ + 68.322372674059636, + 36.548105373863905 + ], + [ + 68.538535191445874, + 36.541077378917862 + ], + [ + 68.634911737286814, + 36.521026922854162 + ], + [ + 68.722761672313311, + 36.53430776639027 + ], + [ + 68.798622674097089, + 36.44759471292565 + ], + [ + 68.8423926133284, + 36.419766953981707 + ], + [ + 68.862081333286881, + 36.412609767826495 + ], + [ + 68.914532912064203, + 36.433151150305321 + ], + [ + 68.999230584823579, + 36.417389838070562 + ], + [ + 69.081344436096799, + 36.355326442861042 + ], + [ + 69.198494908413238, + 36.324191392918408 + ], + [ + 69.232808059044658, + 36.283134467281798 + ], + [ + 69.268309768081281, + 36.275150457927282 + ], + [ + 69.300607538007455, + 36.228176581384105 + ], + [ + 69.444112990022461, + 36.24719350777417 + ], + [ + 69.522661166979219, + 36.295459296409376 + ], + [ + 69.681101108928999, + 36.35008128552289 + ], + [ + 69.711796909299892, + 36.240785631351798 + ], + [ + 69.765798780789055, + 36.232982490049835 + ], + [ + 69.777736037188333, + 36.213577989132887 + ], + [ + 69.788122999976451, + 36.099063015145987 + ], + [ + 69.868531528906885, + 36.033563136829287 + ], + [ + 69.956381463933383, + 35.8869570993906 + ], + [ + 69.961032342068904, + 35.80985586235812 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-SAM", + "NAME_1": "Samangan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 67.688044468177623, + 36.647944241233745 + ], + [ + 67.83237674339199, + 36.589601549072199 + ], + [ + 68.079855177874151, + 36.562161362856614 + ], + [ + 68.189099156101122, + 36.593244736855127 + ], + [ + 68.23953535327388, + 36.571204739407165 + ], + [ + 68.193595004605754, + 36.553789780773741 + ], + [ + 68.172666050297948, + 36.521181952485108 + ], + [ + 68.207082553716873, + 36.464751288241359 + ], + [ + 68.371413609050762, + 36.263729967264169 + ], + [ + 68.529078403745302, + 36.160816351993049 + ], + [ + 68.467325066898297, + 36.073250636907346 + ], + [ + 68.332966343322028, + 35.981705838153914 + ], + [ + 68.311675652909003, + 35.853522447003286 + ], + [ + 68.156181267651334, + 35.676530667556221 + ], + [ + 68.151840447878328, + 35.642165839182098 + ], + [ + 68.194060092599159, + 35.613330389885562 + ], + [ + 68.142538689808646, + 35.507031969249965 + ], + [ + 68.088536818319483, + 35.461220810891689 + ], + [ + 68.000738560136426, + 35.445666205131261 + ], + [ + 67.861057163057581, + 35.435201727977358 + ], + [ + 67.818992547068376, + 35.459386298239053 + ], + [ + 67.743906690741142, + 35.443418281328604 + ], + [ + 67.57352949419078, + 35.469359849877151 + ], + [ + 67.403617384734503, + 35.4229027372715 + ], + [ + 67.306155633275807, + 35.436622830379292 + ], + [ + 67.01676761333465, + 35.352467759979106 + ], + [ + 66.9163603051839, + 35.352881171129127 + ], + [ + 66.83460818911658, + 35.375153714372402 + ], + [ + 66.929899530239084, + 35.425899969907675 + ], + [ + 66.99134280782431, + 35.485844630725126 + ], + [ + 66.98901736785723, + 35.551215317832657 + ], + [ + 67.011341587044569, + 35.559793606389803 + ], + [ + 67.01351199738076, + 35.593383287508686 + ], + [ + 66.984779900871672, + 35.618213812917134 + ], + [ + 67.024053989799768, + 35.641959132707768 + ], + [ + 67.022348666557662, + 35.66554942556553 + ], + [ + 66.903647902428702, + 35.729085598221786 + ], + [ + 66.935480585260791, + 35.787040716755655 + ], + [ + 67.002970004961753, + 35.821793117858078 + ], + [ + 67.119965447647246, + 35.933517563884436 + ], + [ + 67.124151238688682, + 35.980749823745327 + ], + [ + 67.067513868869923, + 36.063948879736984 + ], + [ + 67.181873814125197, + 36.138311266551682 + ], + [ + 67.27576989126743, + 36.158206692085173 + ], + [ + 67.330081822018428, + 36.204043687066473 + ], + [ + 67.333337437073055, + 36.250862534878081 + ], + [ + 67.373800082607715, + 36.2893614774502 + ], + [ + 67.382223342433292, + 36.370596829579995 + ], + [ + 67.420050489638356, + 36.471572576713015 + ], + [ + 67.371939732432679, + 36.561282863713188 + ], + [ + 67.461339960171017, + 36.600531114219507 + ], + [ + 67.500148960206332, + 36.640218614297567 + ], + [ + 67.614043816568824, + 36.63161448821802 + ], + [ + 67.688044468177623, + 36.647944241233745 + ] + ] + ] + } + }, + { + "type": "Feature", + "properties": { + "ISO": "AF-URU", + "NAME_1": "Uruzgan" + }, + "geometry": { + "type": "Polygon", + "coordinates": [ + [ + [ + 67.346980014915744, + 34.036630764298309 + ], + [ + 67.367598910861034, + 34.012084458830714 + ], + [ + 67.327601353319778, + 33.947282213403412 + ], + [ + 67.362482944732108, + 33.923459378347616 + ], + [ + 67.379277784841861, + 33.860104071945329 + ], + [ + 67.160789829287182, + 33.671226712043108 + ], + [ + 66.958890008267247, + 33.629007066422957 + ], + [ + 66.844375034280404, + 33.580224513850226 + ], + [ + 66.829492222088334, + 33.526377671991952 + ], + [ + 66.860343052090172, + 33.426564643043832 + ], + [ + 66.829182162826498, + 33.280940457536076 + ], + [ + 66.766808710153839, + 33.271328640204558 + ], + [ + 66.740402052712511, + 33.318638414431234 + ], + [ + 66.69167117698322, + 33.280888779793315 + ], + [ + 66.556382277420141, + 33.236937975207354 + ], + [ + 66.52842532726703, + 33.242803250169857 + ], + [ + 66.47442345577781, + 33.319000148737871 + ], + [ + 66.382904493647459, + 33.296882636024804 + ], + [ + 66.327507359077345, + 33.309595037880683 + ], + [ + 66.090105829020786, + 33.186346747504388 + ], + [ + 66.049746535374254, + 33.061599840360316 + ], + [ + 65.878594190669332, + 33.090357774391748 + ], + [ + 65.805627068734225, + 33.142447617963171 + ], + [ + 65.758653192191048, + 33.109323024837693 + ], + [ + 65.659331088758734, + 33.105524807423876 + ], + [ + 65.574581740055237, + 33.145289821867777 + ], + [ + 65.482442661199798, + 33.150199083321013 + ], + [ + 65.471435580787386, + 33.144178778727621 + ], + [ + 65.490814243282671, + 33.076973578068134 + ], + [ + 65.44936974491776, + 33.091933906424629 + ], + [ + 65.416968622204138, + 33.067129218538582 + ], + [ + 65.34818729041109, + 33.092476507884498 + ], + [ + 65.361726516365593, + 33.220194811041665 + ], + [ + 65.296510857989688, + 33.29760610643666 + ], + [ + 65.297441033976497, + 33.330084744415387 + ], + [ + 65.258218621891842, + 33.335097357756808 + ], + [ + 65.219099561695373, + 33.362950955122471 + ], + [ + 65.370253127180035, + 33.424833482279382 + ], + [ + 65.363276809077433, + 33.452532050014099 + ], + [ + 65.379864942712913, + 33.475373033138965 + ], + [ + 65.576907180022317, + 33.604770820217141 + ], + [ + 65.567450393221065, + 33.629833888722942 + ], + [ + 65.50833255380428, + 33.678254706089774 + ], + [ + 65.487248569865585, + 33.773494371268214 + ], + [ + 65.40947553926469, + 33.833852444134948 + ], + [ + 65.399398634839088, + 33.866253566848627 + ], + [ + 65.408442009591056, + 33.884805406144551 + ], + [ + 65.469523552869646, + 33.905346787724056 + ], + [ + 65.520476515778569, + 33.973327134739463 + ], + [ + 65.519494662948318, + 34.026915595078606 + ], + [ + 65.490039096926751, + 34.039059557052894 + ], + [ + 65.467353143432774, + 34.075078030027043 + ], + [ + 65.495155063954996, + 34.181092230721845 + ], + [ + 65.490814243282671, + 34.236980291707084 + ], + [ + 65.532103712916012, + 34.349143989103766 + ], + [ + 65.945463495443903, + 34.320980333375644 + ], + [ + 66.010472447345535, + 34.358419907852465 + ], + [ + 66.155269809653987, + 34.35852326153929 + ], + [ + 66.212062209103635, + 34.406323961281771 + ], + [ + 66.324716831116859, + 34.376454983210863 + ], + [ + 66.464501580983153, + 34.396453762431179 + ], + [ + 66.487032504846184, + 34.389219061910183 + ], + [ + 66.467602167306154, + 34.360176907038635 + ], + [ + 66.484552036147534, + 34.338937893468994 + ], + [ + 66.552041456747816, + 34.327827460269077 + ], + [ + 66.580101759688432, + 34.306795152274447 + ], + [ + 66.530440707972275, + 34.261113186024716 + ], + [ + 66.549405959317539, + 34.185665595390901 + ], + [ + 66.516022983773667, + 34.114507147686709 + ], + [ + 66.51586795414272, + 34.061073716978456 + ], + [ + 66.587284784265364, + 34.000095527386634 + ], + [ + 66.644645623596602, + 33.974438177879563 + ], + [ + 66.783241815057693, + 34.00386790637873 + ], + [ + 66.960595330609976, + 33.973843899576309 + ], + [ + 67.03351077660102, + 33.937928779389608 + ], + [ + 67.122600945976842, + 33.974877428350624 + ], + [ + 67.161875034005561, + 33.956170559423754 + ], + [ + 67.198306919029051, + 33.992085680509717 + ], + [ + 67.314682244989569, + 34.010870062903052 + ], + [ + 67.346980014915744, + 34.036630764298309 + ] + ] + ] + } + } + ] } diff --git a/superset-frontend/plugins/legacy-plugin-chart-country-map/test/CountryMap.test.tsx b/superset-frontend/plugins/legacy-plugin-chart-country-map/test/CountryMap.test.tsx index 98a49c570ae..1aa35731855 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-country-map/test/CountryMap.test.tsx +++ b/superset-frontend/plugins/legacy-plugin-chart-country-map/test/CountryMap.test.tsx @@ -34,9 +34,9 @@ type Projection = ((...args: unknown[]) => void) & { }; type PathFn = (() => string) & { - projection: vi.Mock; - bounds: vi.Mock<[[number, number], [number, number]]>; - centroid: vi.Mock<[number, number]>; + projection: Mock; + bounds: Mock<[[number, number], [number, number]]>; + centroid: Mock<[number, number]>; }; const mockPath: PathFn = vi.fn(() => 'M10 10 L20 20') as unknown as PathFn; diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.test.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.test.tsx index 70b261a0975..07e1b800e0c 100644 --- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.test.tsx +++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.test.tsx @@ -24,6 +24,7 @@ import { configureStore } from '@reduxjs/toolkit'; import { DatasourceType, SupersetClient } from '@superset-ui/core'; import DeckMulti from './Multi'; import * as fitViewportModule from '../utils/fitViewport'; +import { Mock } from 'vitest'; // Mock DeckGLContainer vi.mock('../DeckGLContainer', () => ({ @@ -128,7 +129,7 @@ const renderWithProviders = (component: React.ReactElement) => describe('DeckMulti Autozoom Functionality', () => { beforeEach(() => { vi.clearAllMocks(); - (SupersetClient.get as vi.Mock).mockResolvedValue({ + (SupersetClient.get as Mock).mockResolvedValue({ json: { data: { features: [], @@ -451,7 +452,7 @@ describe('DeckMulti Autozoom Functionality', () => { describe('DeckMulti Component Rendering', () => { beforeEach(() => { vi.clearAllMocks(); - (SupersetClient.get as vi.Mock).mockResolvedValue({ + (SupersetClient.get as Mock).mockResolvedValue({ json: { data: { features: [], @@ -502,7 +503,7 @@ describe('DeckMulti Component Rendering', () => { }); // Check that all requests include the dashboardId - const { calls } = (SupersetClient.get as vi.Mock).mock; + const { calls } = (SupersetClient.get as Mock).mock; calls.forEach(call => { const url = call[0].endpoint; const urlParams = new URLSearchParams(url.split('?')[1]); @@ -529,7 +530,7 @@ describe('DeckMulti Component Rendering', () => { }); // Check that requests don't include dashboardId - const { calls } = (SupersetClient.get as vi.Mock).mock; + const { calls } = (SupersetClient.get as Mock).mock; calls.forEach(call => { const url = call[0].endpoint; const formData = JSON.parse( @@ -557,7 +558,7 @@ describe('DeckMulti Component Rendering', () => { }); // Verify dashboardId is preserved with filters - const { calls } = (SupersetClient.get as vi.Mock).mock; + const { calls } = (SupersetClient.get as Mock).mock; calls.forEach(call => { const url = call[0].endpoint; const formData = JSON.parse( diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/buildQuery.test.ts b/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/buildQuery.test.ts index 8e1ab0a685d..89df875092a 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/buildQuery.test.ts +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/buildQuery.test.ts @@ -39,7 +39,7 @@ describe('CartodiagramPlugin buildQuery', () => { geom_column: 'geom', }; - let chartQueryBuilderMock: vi.MockedFunction; + let chartQueryBuilderMock: Mock; beforeEach(() => { chartQueryBuilderMock = vi.fn(); diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/transformProps.test.ts index e62c3d044cd..92f646b6af7 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/test/plugin/transformProps.test.ts @@ -94,8 +94,8 @@ describe('CartodiagramPlugin transformProps', () => { theme: supersetTheme, }); - let chartTransformPropsPieMock: vi.MockedFunction; - let chartTransformPropsTimeseriesMock: vi.MockedFunction; + let chartTransformPropsPieMock: Mock; + let chartTransformPropsTimeseriesMock: Mock; beforeEach(() => { chartTransformPropsPieMock = vi.fn(); chartTransformPropsTimeseriesMock = vi.fn(); diff --git a/superset-frontend/plugins/plugin-chart-cartodiagram/test/util/transformPropsUtil.test.ts b/superset-frontend/plugins/plugin-chart-cartodiagram/test/util/transformPropsUtil.test.ts index 775940d28fc..3a6f72e10fc 100644 --- a/superset-frontend/plugins/plugin-chart-cartodiagram/test/util/transformPropsUtil.test.ts +++ b/superset-frontend/plugins/plugin-chart-cartodiagram/test/util/transformPropsUtil.test.ts @@ -175,7 +175,7 @@ describe('transformPropsUtil', () => { }); describe('getChartConfigs', () => { - let chartTransformer: vi.MockedFunction; + let chartTransformer: Mock; const geomColumn = 'geom'; const pieChartConfig = { params: {}, diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.test.ts index e36207b0f18..69829d78af9 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.test.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/transformProps.test.ts @@ -21,6 +21,7 @@ import { GenericDataType } from '@apache-superset/core/common'; import { getColorFormatters } from '@superset-ui/chart-controls'; import { BigNumberTotalChartProps } from '../types'; import transformProps from './transformProps'; +import { Mock } from 'vitest'; vi.mock('@superset-ui/chart-controls', () => ({ getColorFormatters: vi.fn(), @@ -234,7 +235,7 @@ describe('BigNumberTotal transformProps', () => { test('should propagate colorThresholdFormatters from getColorFormatters', () => { // Override the getColorFormatters mock to return specific value const mockFormatters = [{ formatter: 'red' }]; - (getColorFormatters as vi.Mock).mockReturnValueOnce(mockFormatters); + (getColorFormatters as Mock).mockReturnValueOnce(mockFormatters); const chartProps = { width: 800, diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx b/superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx index fef328b2a30..1e4c49f2ca5 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx +++ b/superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx @@ -20,8 +20,8 @@ import { TableRenderer } from '../../src/react-pivottable/TableRenderers'; import type { PivotData } from '../../src/react-pivottable/utilities'; let tableRenderer: TableRenderer; -let mockGetAggregatedData: vi.Mock; -let mockSortAndCacheData: vi.Mock; +let mockGetAggregatedData: Mock; +let mockSortAndCacheData: Mock; const columnIndex = 0; const visibleColKeys = [['col1'], ['col2']]; diff --git a/superset-frontend/plugins/plugin-chart-table/test/testData.ts b/superset-frontend/plugins/plugin-chart-table/test/testData.ts index 16285ff773c..13b72bea2d7 100644 --- a/superset-frontend/plugins/plugin-chart-table/test/testData.ts +++ b/superset-frontend/plugins/plugin-chart-table/test/testData.ts @@ -249,9 +249,9 @@ const comparison: TableChartProps = { filterState: { filters: {} }, ownState: {}, hooks: { - onAddFilter: jest.fn(), - setDataMask: jest.fn(), - onContextMenu: jest.fn(), + onAddFilter: vi.fn(), + setDataMask: vi.fn(), + onContextMenu: vi.fn(), }, emitCrossFilters: true, }; @@ -296,9 +296,9 @@ const comparisonWithConfig: TableChartProps = { filterState: { filters: {} }, ownState: {}, hooks: { - onAddFilter: jest.fn(), - setDataMask: jest.fn(), - onContextMenu: jest.fn(), + onAddFilter: vi.fn(), + setDataMask: vi.fn(), + onContextMenu: vi.fn(), }, emitCrossFilters: false, }; @@ -371,9 +371,9 @@ const comparisonWithHiddenColumns: TableChartProps = { filterState: { filters: {} }, ownState: {}, hooks: { - onAddFilter: jest.fn(), - setDataMask: jest.fn(), - onContextMenu: jest.fn(), + onAddFilter: vi.fn(), + setDataMask: vi.fn(), + onContextMenu: vi.fn(), }, emitCrossFilters: false, }; diff --git a/superset-frontend/spec/helpers/shim.jest.tsx b/superset-frontend/spec/helpers/shim.jest.tsx index 22492b2e682..ae5d5ec9a4a 100644 --- a/superset-frontend/spec/helpers/shim.jest.tsx +++ b/superset-frontend/spec/helpers/shim.jest.tsx @@ -65,15 +65,15 @@ g.caches = new CacheStorage(); Object.defineProperty(window, 'matchMedia', { writable: true, - value: jest.fn().mockImplementation(query => ({ + value: vi.fn().mockImplementation(query => ({ matches: false, media: query, onchange: null, - addListener: jest.fn(), // Deprecated - removeListener: jest.fn(), // Deprecated - addEventListener: jest.fn(), - removeEventListener: jest.fn(), - dispatchEvent: jest.fn(), + addListener: vi.fn(), // Deprecated + removeListener: vi.fn(), // Deprecated + addEventListener: vi.fn(), + removeEventListener: vi.fn(), + dispatchEvent: vi.fn(), })), }); @@ -93,8 +93,8 @@ jest.mock('src/hooks/useTabId', () => ({ jest.mock('react-markdown', () => ({ default: (props: any) => <>{props.children}, })); -jest.mock('rehype-sanitize', () => ({ default: () => jest.fn() })); -jest.mock('rehype-raw', () => ({ default: () => jest.fn() })); +jest.mock('rehype-sanitize', () => ({ default: () => vi.fn() })); +jest.mock('rehype-raw', () => ({ default: () => vi.fn() })); // Mocks the Icon component due to its async nature // Tests should override this when needed diff --git a/superset-frontend/src/SqlLab/components/EditorWrapper/EditorWrapper.test.tsx b/superset-frontend/src/SqlLab/components/EditorWrapper/EditorWrapper.test.tsx index 977cad986d4..f15a12a6525 100644 --- a/superset-frontend/src/SqlLab/components/EditorWrapper/EditorWrapper.test.tsx +++ b/superset-frontend/src/SqlLab/components/EditorWrapper/EditorWrapper.test.tsx @@ -47,7 +47,7 @@ vi.mock('@superset-ui/core/components/Select/AsyncSelect', () => () => ( )); // Mock EditorHost from the editors module -const MockEditorHost = jest +const MockEditorHost = vi .fn() .mockImplementation((props: editors.EditorProps) => (
{JSON.stringify(props)}
diff --git a/superset-frontend/src/SqlLab/components/QueryHistory/QueryHistory.test.tsx b/superset-frontend/src/SqlLab/components/QueryHistory/QueryHistory.test.tsx index 004eff75086..88b9694ed20 100644 --- a/superset-frontend/src/SqlLab/components/QueryHistory/QueryHistory.test.tsx +++ b/superset-frontend/src/SqlLab/components/QueryHistory/QueryHistory.test.tsx @@ -75,7 +75,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; const setup = (overrides = {}) => ( diff --git a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx index 23dce1a5ec9..a3a2aa83da6 100644 --- a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx +++ b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx @@ -64,7 +64,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; const unsavedQueryEditor = { id: defaultProps.queryEditorId, diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.tsx b/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.tsx index 3e26043c74e..38b6b2c0877 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.tsx @@ -127,11 +127,11 @@ const mockInitialState = { }, }; -vi.mock('@superset-ui/core', async (importActual) => ({ +vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), isFeatureEnabled: vi.fn(), })); -const mockIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockIsFeatureEnabled = isFeatureEnabled as Mock; const setup = (props: Props, store: Store) => render(, { @@ -184,8 +184,8 @@ describe('SqlEditor', () => { store = createStore(mockInitialState); actions = []; - (ResultSet as unknown as vi.Mock).mockClear(); - (ResultSet as unknown as vi.Mock).mockImplementation(() => ( + (ResultSet as unknown as Mock).mockClear(); + (ResultSet as unknown as Mock).mockImplementation(() => (
)); }); @@ -241,7 +241,7 @@ describe('SqlEditor', () => { const { findByTestId } = setup(mockedProps, store); const editor = await findByTestId('react-ace'); const sql = 'select *'; - const renderCountForSouthPane = (ResultSet as unknown as vi.Mock).mock.calls + const renderCountForSouthPane = (ResultSet as unknown as Mock).mock.calls .length; expect(ResultSet).toHaveBeenCalledTimes(renderCountForSouthPane); fireEvent.change(editor, { target: { value: sql } }); diff --git a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/SqlEditorTabHeader.test.tsx b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/SqlEditorTabHeader.test.tsx index 715260afeb4..ef391241dfc 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/SqlEditorTabHeader.test.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/SqlEditorTabHeader.test.tsx @@ -138,7 +138,7 @@ describe('SqlEditorTabHeader', () => { expect(screen.getByTestId('close-tab-menu-option')).toBeInTheDocument(), ); const expectedTitle = 'typed text'; - const mockPrompt = jest + const mockPrompt = vi .spyOn(window, 'prompt') .mockImplementation(() => expectedTitle); fireEvent.click(screen.getByTestId('rename-tab-menu-option')); diff --git a/superset-frontend/src/SqlLab/components/TableElement/TableElement.test.tsx b/superset-frontend/src/SqlLab/components/TableElement/TableElement.test.tsx index 55fa7719865..27034dadea7 100644 --- a/superset-frontend/src/SqlLab/components/TableElement/TableElement.test.tsx +++ b/superset-frontend/src/SqlLab/components/TableElement/TableElement.test.tsx @@ -30,7 +30,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; vi.mock('@superset-ui/core/components/Loading', () => ({ Loading: () =>
, diff --git a/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/DeckglLayerVisibilityCustomizationPlugin.test.tsx b/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/DeckglLayerVisibilityCustomizationPlugin.test.tsx index 705eba12678..e77f898e825 100644 --- a/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/DeckglLayerVisibilityCustomizationPlugin.test.tsx +++ b/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/DeckglLayerVisibilityCustomizationPlugin.test.tsx @@ -21,6 +21,7 @@ import userEvent from '@testing-library/user-event'; import { SupersetClient } from '@superset-ui/core'; import DeckglLayerVisibilityCustomizationPlugin from './DeckglLayerVisibilityCustomizationPlugin'; import { PluginDeckglLayerVisibilityProps } from './types'; +import { Mock } from 'vitest'; vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), @@ -29,7 +30,7 @@ vi.mock('@superset-ui/core', async importActual => ({ }, })); -const mockSupersetClientGet = SupersetClient.get as vi.Mock; +const mockSupersetClientGet = SupersetClient.get as Mock; const defaultProps: PluginDeckglLayerVisibilityProps = { formData: { diff --git a/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/useDeckLayerMetadata.test.ts b/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/useDeckLayerMetadata.test.ts index 5fa6dc1cd74..06fb2c5ddc1 100644 --- a/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/useDeckLayerMetadata.test.ts +++ b/superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/useDeckLayerMetadata.test.ts @@ -19,6 +19,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { SupersetClient } from '@superset-ui/core'; import { useDeckLayerMetadata } from './useDeckLayerMetadata'; +import { Mock } from 'vitest'; vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), @@ -27,7 +28,7 @@ vi.mock('@superset-ui/core', async importActual => ({ }, })); -const mockSupersetClientGet = SupersetClient.get as vi.Mock; +const mockSupersetClientGet = SupersetClient.get as Mock; beforeEach(() => { vi.clearAllMocks(); diff --git a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.test.tsx b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.test.tsx index 02013c5824e..3497afd8959 100644 --- a/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.test.tsx +++ b/superset-frontend/src/components/Chart/ChartContextMenu/ChartContextMenu.test.tsx @@ -27,10 +27,11 @@ import ChartContextMenu, { ChartContextMenuRef, ContextMenuItem, } from './ChartContextMenu'; +import { Mock } from 'vitest'; vi.mock('src/utils/cachedSupersetGet'); -const mockCachedSupersetGet = cachedSupersetGet as vi.MockedFunction< +const mockCachedSupersetGet = cachedSupersetGet as Mock< typeof cachedSupersetGet >; diff --git a/superset-frontend/src/components/Chart/ChartContextMenu/useContextMenu.test.tsx b/superset-frontend/src/components/Chart/ChartContextMenu/useContextMenu.test.tsx index 35b87f3dc37..6f35189c34b 100644 --- a/superset-frontend/src/components/Chart/ChartContextMenu/useContextMenu.test.tsx +++ b/superset-frontend/src/components/Chart/ChartContextMenu/useContextMenu.test.tsx @@ -25,10 +25,11 @@ import { noOp } from 'src/utils/common'; import { cachedSupersetGet } from 'src/utils/cachedSupersetGet'; import { useContextMenu } from './useContextMenu'; import { ContextMenuItem } from './ChartContextMenu'; +import { Mock } from 'vitest'; vi.mock('src/utils/cachedSupersetGet'); -const mockCachedSupersetGet = cachedSupersetGet as vi.MockedFunction< +const mockCachedSupersetGet = cachedSupersetGet as Mock< typeof cachedSupersetGet >; const CONTEXT_MENU_TEST_ID = 'chart-context-menu'; diff --git a/superset-frontend/src/components/Chart/ChartErrorMessage.test.tsx b/superset-frontend/src/components/Chart/ChartErrorMessage.test.tsx index 5cbf250f3ad..578ea32e6fc 100644 --- a/superset-frontend/src/components/Chart/ChartErrorMessage.test.tsx +++ b/superset-frontend/src/components/Chart/ChartErrorMessage.test.tsx @@ -25,13 +25,14 @@ import { ErrorType } from '@superset-ui/core'; import type { ErrorMessageComponentProps } from 'src/components/ErrorMessage/types'; import { getErrorMessageComponentRegistry } from 'src/components/ErrorMessage'; import { ChartErrorMessage } from './ChartErrorMessage'; +import { Mock } from 'vitest'; // Mock the useChartOwnerNames hook vi.mock('src/hooks/apiResources', () => ({ useChartOwnerNames: vi.fn(), })); -const mockUseChartOwnerNames = useChartOwnerNames as vi.MockedFunction< +const mockUseChartOwnerNames = useChartOwnerNames as Mock< typeof useChartOwnerNames >; diff --git a/superset-frontend/src/components/Chart/ChartRenderer.test.tsx b/superset-frontend/src/components/Chart/ChartRenderer.test.tsx index 2eab788315f..7258b0885e1 100644 --- a/superset-frontend/src/components/Chart/ChartRenderer.test.tsx +++ b/superset-frontend/src/components/Chart/ChartRenderer.test.tsx @@ -52,9 +52,9 @@ vi.mock('@superset-ui/core', async importActual => ({ ), })); -vi.mock('src/components/Chart/ChartContextMenu/ChartContextMenu', () => () => ( -
-)); +vi.mock('src/components/Chart/ChartContextMenu/ChartContextMenu', () => ({ + default: () =>
, +})); interface MockActions { chartRenderingSucceeded: (chartId: number) => Dispatch; diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.test.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.test.tsx index 2cb13c9784b..4b2dd8b3cf5 100644 --- a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.test.tsx +++ b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.test.tsx @@ -31,6 +31,7 @@ import chartQueries, { sliceId } from 'spec/fixtures/mockChartQueries'; import mockState from 'spec/fixtures/mockState'; import { DashboardPageIdContext } from 'src/dashboard/containers/DashboardPage'; import DrillByModal, { DrillByModalProps } from './DrillByModal'; +import { Mock } from 'vitest'; // Mock the isEmbedded function vi.mock('src/dashboard/util/isEmbedded', () => ({ @@ -286,20 +287,20 @@ test('should render "Edit chart" enabled with can_explore permission', async () }); // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks -describe('Embedded mode behavior', () => { +describe('Embedded mode behavior', async () => { // eslint-disable-next-line global-require, @typescript-eslint/no-var-requires - const { isEmbedded } = require('src/dashboard/util/isEmbedded'); + const { isEmbedded } = await import('src/dashboard/util/isEmbedded'); beforeEach(() => { - (isEmbedded as vi.Mock).mockClear(); + (isEmbedded as Mock).mockClear(); }); afterEach(() => { - (isEmbedded as vi.Mock).mockReturnValue(false); + (isEmbedded as Mock).mockReturnValue(false); }); test('should not render "Edit chart" button in embedded mode', async () => { - (isEmbedded as vi.Mock).mockReturnValue(true); + (isEmbedded as Mock).mockReturnValue(true); await renderModal(); @@ -311,7 +312,7 @@ describe('Embedded mode behavior', () => { }); test('should not call postFormData API in embedded mode', async () => { - (isEmbedded as vi.Mock).mockReturnValue(true); + (isEmbedded as Mock).mockReturnValue(true); await renderModal({ column: { column_name: 'name', verbose_name: null }, @@ -327,7 +328,7 @@ describe('Embedded mode behavior', () => { }); test('should render "Edit chart" button in non-embedded mode', async () => { - (isEmbedded as vi.Mock).mockReturnValue(false); + (isEmbedded as Mock).mockReturnValue(false); await renderModal(); @@ -337,7 +338,7 @@ describe('Embedded mode behavior', () => { }); test('should call postFormData API in non-embedded mode', async () => { - (isEmbedded as vi.Mock).mockReturnValue(false); + (isEmbedded as Mock).mockReturnValue(false); await renderModal({ column: { column_name: 'name', verbose_name: null }, diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.test.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.test.tsx index 5cea08c6a74..a306e3dbb06 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.test.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.test.tsx @@ -23,10 +23,10 @@ import { getMockStoreWithNativeFilters } from 'spec/fixtures/mockStore'; import chartQueries, { sliceId } from 'spec/fixtures/mockChartQueries'; import DrillDetailModal from './DrillDetailModal'; -vi.mock('./DrillDetailPane', () => () => null); +vi.mock('./DrillDetailPane', () => ({ default: () => null })); const mockHistoryPush = vi.fn(); -vi.mock('react-router-dom', () => ({ - ...vi.requireActual('react-router-dom'), +vi.mock('react-router-dom', async importActual => ({ + ...(await importActual()), useHistory: () => ({ push: mockHistoryPush, }), diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.test.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.test.tsx index 5df825f5cc3..4c7dda2c645 100644 --- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.test.tsx +++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailPane.test.tsx @@ -182,9 +182,9 @@ test('should render the metadata bar', async () => { }); test('should render the error', async () => { - jest - .spyOn(SupersetClient, 'post') - .mockRejectedValue(new Error('Something went wrong')); + vi.spyOn(SupersetClient, 'post').mockRejectedValue( + new Error('Something went wrong'), + ); await waitForRender(); expect(screen.getByText('Error: Something went wrong')).toBeInTheDocument(); }); diff --git a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx index 848d67e54f1..0a676abedcb 100644 --- a/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx +++ b/superset-frontend/src/components/Chart/useDrillDetailMenuItems/useDrillDetailMenuItems.test.tsx @@ -35,15 +35,13 @@ import { useDrillDetailMenuItems, DrillDetailMenuItemsProps } from './index'; /* eslint jest/expect-expect: ["warn", { "assertFunctionNames": ["expect*"] }] */ -vi.mock( - '../DrillDetail/DrillDetailPane', - () => - ({ - initialFilters, - }: { - initialFilters: BinaryQueryObjectFilterClause[]; - }) =>
{JSON.stringify(initialFilters)}
, -); +vi.mock('../DrillDetail/DrillDetailPane', () => ({ + default: ({ + initialFilters, + }: { + initialFilters: BinaryQueryObjectFilterClause[]; + }) =>
{JSON.stringify(initialFilters)}
, +})); const { id: defaultChartId, form_data: defaultFormData } = chartQueries[sliceId]; diff --git a/superset-frontend/src/components/Datasource/DatasourceModal/DatasourceModal.test.tsx b/superset-frontend/src/components/Datasource/DatasourceModal/DatasourceModal.test.tsx index 4189855a105..7c967cc8a5e 100644 --- a/superset-frontend/src/components/Datasource/DatasourceModal/DatasourceModal.test.tsx +++ b/superset-frontend/src/components/Datasource/DatasourceModal/DatasourceModal.test.tsx @@ -131,7 +131,7 @@ describe('DatasourceModal', () => { }); test('should render error dialog', async () => { - const putSpy = jest + const putSpy = vi .spyOn(SupersetClient, 'put') .mockRejectedValue(new Error('Something went wrong')); diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/FoldersEditor.test.tsx b/superset-frontend/src/components/Datasource/FoldersEditor/FoldersEditor.test.tsx index 6002bfcab5f..8ec4bed5a3e 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/FoldersEditor.test.tsx +++ b/superset-frontend/src/components/Datasource/FoldersEditor/FoldersEditor.test.tsx @@ -34,16 +34,13 @@ import { import { FoldersEditorItemType } from '../types'; // Mock react-virtualized-auto-sizer to provide dimensions in tests -vi.mock( - 'react-virtualized-auto-sizer', - () => - ({ - children, - }: { - children: (params: { height: number; width: number }) => ReactChild; - }) => - children({ height: 500, width: 400 }), -); +vi.mock('react-virtualized-auto-sizer', () => ({ + default: ({ + children, + }: { + children: (params: { height: number; width: number }) => ReactChild; + }) => children({ height: 500, width: 400 }), +})); // Mock react-window VariableSizeList to render all items for testing vi.mock('react-window', () => ({ diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/components/DragOverlayContent.test.tsx b/superset-frontend/src/components/Datasource/FoldersEditor/components/DragOverlayContent.test.tsx index ba921ef4600..17165c16719 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/components/DragOverlayContent.test.tsx +++ b/superset-frontend/src/components/Datasource/FoldersEditor/components/DragOverlayContent.test.tsx @@ -23,7 +23,7 @@ import { FoldersEditorItemType } from '../../types'; import { DragOverlayContent } from './DragOverlayContent'; // Mock TreeItem to avoid dnd-kit hook dependencies -jest.mock('../TreeItem', () => ({ +vi.mock('../TreeItem', () => ({ TreeItem: ({ name, id }: { name: string; id: string }) => (
{name}
), diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useDragHandlers.test.ts b/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useDragHandlers.test.ts index 45ed8865b49..f21ebbbcc03 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useDragHandlers.test.ts +++ b/superset-frontend/src/components/Datasource/FoldersEditor/hooks/useDragHandlers.test.ts @@ -71,12 +71,12 @@ function makeDragStartEvent(id: string): DragStartEvent { function setup(selectedIds: Set = new Set()) { return renderHook(() => useDragHandlers({ - setItems: jest.fn(), + setItems: vi.fn(), computeFlattenedItems: () => flatItems, fullFlattenedItems: flatItems, selectedItemIds: selectedIds, - onChange: jest.fn(), - addWarningToast: jest.fn(), + onChange: vi.fn(), + addWarningToast: vi.fn(), }), ); } diff --git a/superset-frontend/src/components/Datasource/FoldersEditor/sensors.test.ts b/superset-frontend/src/components/Datasource/FoldersEditor/sensors.test.ts index b1b32b30adc..11d0f3e0382 100644 --- a/superset-frontend/src/components/Datasource/FoldersEditor/sensors.test.ts +++ b/superset-frontend/src/components/Datasource/FoldersEditor/sensors.test.ts @@ -20,20 +20,18 @@ import { rectIntersection, pointerWithin, closestCenter } from '@dnd-kit/core'; import type { CollisionDescriptor } from '@dnd-kit/core'; import { getCollisionDetection } from './sensors'; +import { Mock } from 'vitest'; -jest.mock('@dnd-kit/core', () => { - const actual = jest.requireActual('@dnd-kit/core'); - return { - ...actual, - rectIntersection: jest.fn(), - pointerWithin: jest.fn(), - closestCenter: jest.fn(), - }; -}); +vi.mock('@dnd-kit/core', async importActual => ({ + ...((await importActual()) as any), + rectIntersection: vi.fn(), + pointerWithin: vi.fn(), + closestCenter: vi.fn(), +})); -const mockRectIntersection = rectIntersection as jest.Mock; -const mockPointerWithin = pointerWithin as jest.Mock; -const mockClosestCenter = closestCenter as jest.Mock; +const mockRectIntersection = rectIntersection as Mock; +const mockPointerWithin = pointerWithin as Mock; +const mockClosestCenter = closestCenter as Mock; const collision = (id: string): CollisionDescriptor => ({ id, diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DatasetUsageTab/DatasetUsageTab.test.tsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DatasetUsageTab/DatasetUsageTab.test.tsx index c86758921ac..faea35473aa 100644 --- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DatasetUsageTab/DatasetUsageTab.test.tsx +++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/components/DatasetUsageTab/DatasetUsageTab.test.tsx @@ -25,6 +25,7 @@ import { import userEvent from '@testing-library/user-event'; import fetchMock from 'fetch-mock'; import DatasetUsageTab from '.'; +import { Mock } from 'vitest'; const mockChartsResponse = { result: [ @@ -131,7 +132,7 @@ afterEach(() => { Element.prototype.scrollTo = originalScrollTo; // Restore console.error if it was spied on if (vi.isMockFunction(console.error)) { - (console.error as vi.Mock).mockRestore(); + (console.error as Mock).mockRestore(); } }); @@ -388,7 +389,7 @@ test('handles slow network without race condition', async () => { test('scrolls to top after data loads, not before', async () => { // Use the global scrollTo mock - const scrollToMock = Element.prototype.scrollTo as vi.Mock; + const scrollToMock = Element.prototype.scrollTo as Mock; let resolvePromise: (value: any) => void; const delayedPromise = new Promise(resolve => { @@ -437,7 +438,7 @@ test('scrolls to top after data loads, not before', async () => { test('does not scroll on initial mount, only on page change', async () => { // Use the global scrollTo mock - const scrollToMock = Element.prototype.scrollTo as vi.Mock; + const scrollToMock = Element.prototype.scrollTo as Mock; const mockOnFetchCharts = vi.fn(() => Promise.resolve({ @@ -504,7 +505,9 @@ test('cleans up animation frame on unmount during loading', async () => { }); test('handles AbortError without setState after unmount', async () => { - const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(); + const consoleErrorSpy = vi + .spyOn(console, 'error') + .mockImplementation(() => {}); let rejectPromise: (reason?: any) => void; const abortedPromise = new Promise((_, reject) => { diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.tsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.tsx index ed885461517..e5a42ae3338 100644 --- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.tsx +++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.tsx @@ -35,8 +35,9 @@ import { dismissDatasourceWarning, createDeferredPromise, } from './DatasourceEditor.test.utils'; +import { Mock } from 'vitest'; -vi.mock('@superset-ui/core', async (importActual) => ({ +vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), isFeatureEnabled: vi.fn(), })); @@ -57,7 +58,7 @@ afterEach(async () => { vi.mocked(isFeatureEnabled).mockReset(); // Restore console.error if it was spied on if (vi.isMockFunction(console.error)) { - (console.error as vi.Mock).mockRestore(); + (console.error as Mock).mockRestore(); } }); @@ -265,7 +266,7 @@ test('renders isSqla fields', async () => { }); test('Source Tab: edit mode', async () => { - (isFeatureEnabled as vi.Mock).mockImplementation(() => false); + (isFeatureEnabled as Mock).mockImplementation(() => false); const testProps = createProps(); await asyncRender({ @@ -288,7 +289,7 @@ test('Source Tab: edit mode', async () => { }); test('Source Tab: readOnly mode', async () => { - (isFeatureEnabled as vi.Mock).mockImplementation(() => false); + (isFeatureEnabled as Mock).mockImplementation(() => false); const testProps = createProps(); await asyncRender({ @@ -311,7 +312,7 @@ test('Source Tab: readOnly mode', async () => { }); test('calls onChange with empty SQL when switching to physical dataset', async () => { - (isFeatureEnabled as vi.Mock).mockImplementation(() => false); + (isFeatureEnabled as Mock).mockImplementation(() => false); const testProps = createProps(); @@ -440,7 +441,9 @@ test('default datetime dropdown shows only temporal columns', async () => { test('aborts pending requests on unmount without errors', async () => { // Spy on console.error to catch React warnings - const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(); + const consoleErrorSpy = vi + .spyOn(console, 'error') + .mockImplementation(() => {}); const props = createProps(); @@ -476,7 +479,9 @@ test('aborts pending requests on unmount without errors', async () => { test('resets loading state when request aborted', async () => { // Spy on console.error to catch React warnings - const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(); + const consoleErrorSpy = vi + .spyOn(console, 'error') + .mockImplementation(() => {}); const props = createProps(); const { unmount } = await asyncRender(props); @@ -515,7 +520,9 @@ test('allows simultaneous different async operations', async () => { }); test('fetchUsageData rethrows AbortError without updating state', async () => { - const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(); + const consoleErrorSpy = vi + .spyOn(console, 'error') + .mockImplementation(() => {}); const props = createProps(); const { unmount } = await asyncRender(props); @@ -548,7 +555,9 @@ test('fetchUsageData rethrows AbortError without updating state', async () => { }); test('immediate unmount after mount does not cause unhandled rejection from initial fetchUsageData', async () => { - const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(); + const consoleErrorSpy = vi + .spyOn(console, 'error') + .mockImplementation(() => {}); // Mock chart API to delay long enough for unmount to happen first fetchMock.get( diff --git a/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.utils.tsx b/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.utils.tsx index 442dfae754d..ee32db05fc3 100644 --- a/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.utils.tsx +++ b/superset-frontend/src/components/Datasource/components/DatasourceEditor/tests/DatasourceEditor.test.utils.tsx @@ -26,15 +26,14 @@ import { import mockDatasource from 'spec/fixtures/mockDatasource'; import type { DatasetObject } from 'src/features/datasets/types'; import DatasourceEditor from '..'; +import { Mock } from 'vitest'; export interface DatasourceEditorProps { datasource: DatasetObject; addSuccessToast: () => void; addDangerToast: () => void; - onChange: jest.MockedFunction< - (datasource: DatasetObject, errors?: unknown) => void - >; - formatQuery?: jest.Mock; + onChange: Mock<(datasource: DatasetObject, errors?: unknown) => void>; + formatQuery?: Mock; columnLabels?: Record; columnLabelTooltips?: Record; } @@ -47,8 +46,8 @@ export const createProps = (): DatasourceEditorProps => ({ datasource: JSON.parse(JSON.stringify(mockDatasource['7__table'])), addSuccessToast: () => {}, addDangerToast: () => {}, - onChange: jest.fn(), - formatQuery: jest.fn().mockResolvedValue({ json: { result: '' } }), + onChange: vi.fn(), + formatQuery: vi.fn().mockResolvedValue({ json: { result: '' } }), columnLabels: { state: 'State', }, @@ -65,7 +64,7 @@ export const props: DatasourceEditorProps = { datasource: mockDatasource['7__table'], addSuccessToast: () => {}, addDangerToast: () => {}, - onChange: jest.fn(), + onChange: vi.fn(), columnLabels: { state: 'State', }, diff --git a/superset-frontend/src/components/Datasource/utils/utils.test.tsx b/superset-frontend/src/components/Datasource/utils/utils.test.tsx index 8eeef1b494f..1ddbeab3bd6 100644 --- a/superset-frontend/src/components/Datasource/utils/utils.test.tsx +++ b/superset-frontend/src/components/Datasource/utils/utils.test.tsx @@ -22,7 +22,7 @@ import { updateColumns } from '.'; // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks describe('updateColumns', () => { - let addSuccessToast: vi.Mock; + let addSuccessToast: Mock; beforeEach(() => { addSuccessToast = vi.fn(); diff --git a/superset-frontend/src/components/FacePile/FacePile.test.tsx b/superset-frontend/src/components/FacePile/FacePile.test.tsx index 27aedcd2b56..c1aaf651eb3 100644 --- a/superset-frontend/src/components/FacePile/FacePile.test.tsx +++ b/superset-frontend/src/components/FacePile/FacePile.test.tsx @@ -28,6 +28,7 @@ import { store } from 'src/views/store'; import { isFeatureEnabled } from '@superset-ui/core'; import { FacePile } from '.'; import { getRandomColor } from './utils'; +import { Mock } from 'vitest'; // Mock the feature flag vi.mock('@superset-ui/core', async importActual => ({ @@ -35,9 +36,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockIsFeatureEnabled = isFeatureEnabled as vi.MockedFunction< - typeof isFeatureEnabled ->; +const mockIsFeatureEnabled = isFeatureEnabled as Mock; const users = Array.from({ length: 10 }, (_, i) => ({ first_name: 'user', @@ -115,7 +114,9 @@ describe('FacePile', () => { const firstAvatar = within(container).getByText('U0'); fireEvent.mouseEnter(firstAvatar); - act(() => vi.runAllTimers()); + act(() => { + vi.runAllTimers(); + }); expect(screen.getByRole('tooltip')).toHaveTextContent('user 0'); }); diff --git a/superset-frontend/src/components/GridTable/Header.test.tsx b/superset-frontend/src/components/GridTable/Header.test.tsx index 8e8f981cf79..5cee0c1a408 100644 --- a/superset-frontend/src/components/GridTable/Header.test.tsx +++ b/superset-frontend/src/components/GridTable/Header.test.tsx @@ -25,10 +25,9 @@ vi.mock('@superset-ui/core/components/Dropdown', () => ({ Dropdown: () =>
, })); -vi.mock('@superset-ui/core/components/Icons', () => { - const actualIcons = vi.requireActual('@superset-ui/core/components/Icons'); +vi.mock('@superset-ui/core/components/Icons', async importActual => { + const actualIcons = (await importActual()) as Record; return { - __esModule: true, Icons: { ...actualIcons.Icons, // retain the real `Icons` export Sort: vi.fn(() =>
), diff --git a/superset-frontend/src/components/GridTable/HeaderMenu.test.tsx b/superset-frontend/src/components/GridTable/HeaderMenu.test.tsx index 5295c214334..5b3ed9bfab7 100644 --- a/superset-frontend/src/components/GridTable/HeaderMenu.test.tsx +++ b/superset-frontend/src/components/GridTable/HeaderMenu.test.tsx @@ -24,8 +24,11 @@ import { userEvent, } from 'spec/helpers/testing-library'; import { HeaderMenu, type HeaderMenuProps } from './HeaderMenu'; +import { Mock } from 'vitest'; -vi.mock('src/utils/copy', () => vi.fn().mockImplementation(f => f())); +vi.mock('src/utils/copy', () => ({ + default: vi.fn().mockImplementation(f => f()), +})); const mockInvisibleColumn = { getColId: vi.fn().mockReturnValue('column2'), @@ -63,14 +66,14 @@ const mockedProps = { }; afterEach(() => { - (mockGridApi.getDataAsCsv as vi.Mock).mockClear(); - (mockGridApi.setColumnsPinned as vi.Mock).mockClear(); - (mockGridApi.setColumnsVisible as vi.Mock).mockClear(); - (mockGridApi.setColumnsVisible as vi.Mock).mockClear(); - (mockGridApi.setColumnsPinned as vi.Mock).mockClear(); - (mockGridApi.autoSizeColumns as vi.Mock).mockClear(); - (mockGridApi.autoSizeAllColumns as vi.Mock).mockClear(); - (mockGridApi.moveColumns as vi.Mock).mockClear(); + (mockGridApi.getDataAsCsv as Mock).mockClear(); + (mockGridApi.setColumnsPinned as Mock).mockClear(); + (mockGridApi.setColumnsVisible as Mock).mockClear(); + (mockGridApi.setColumnsVisible as Mock).mockClear(); + (mockGridApi.setColumnsPinned as Mock).mockClear(); + (mockGridApi.autoSizeColumns as Mock).mockClear(); + (mockGridApi.autoSizeAllColumns as Mock).mockClear(); + (mockGridApi.moveColumns as Mock).mockClear(); }); const setup = (props: HeaderMenuProps = mockedProps) => { diff --git a/superset-frontend/src/components/ListView/ListView.test.tsx b/superset-frontend/src/components/ListView/ListView.test.tsx index 781d6251cc6..05823a2d3a3 100644 --- a/superset-frontend/src/components/ListView/ListView.test.tsx +++ b/superset-frontend/src/components/ListView/ListView.test.tsx @@ -37,15 +37,15 @@ type MockedListViewProps = Omit< | 'disableBulkSelect' | 'bulkActions' > & { - fetchData: vi.Mock; - refreshData: vi.Mock; - addSuccessToast: vi.Mock; - addDangerToast: vi.Mock; - disableBulkSelect: vi.Mock; + fetchData: Mock; + refreshData: Mock; + addSuccessToast: Mock; + addDangerToast: Mock; + disableBulkSelect: Mock; bulkActions: Array<{ key: string; name: ReactNode; - onSelect: vi.Mock; + onSelect: Mock; type?: 'primary' | 'secondary' | 'danger'; }>; }; diff --git a/superset-frontend/src/components/SQLEditorWithValidation/SQLEditorWithValidation.test.tsx b/superset-frontend/src/components/SQLEditorWithValidation/SQLEditorWithValidation.test.tsx index bbd5810d899..cd0d1d883f7 100644 --- a/superset-frontend/src/components/SQLEditorWithValidation/SQLEditorWithValidation.test.tsx +++ b/superset-frontend/src/components/SQLEditorWithValidation/SQLEditorWithValidation.test.tsx @@ -25,6 +25,7 @@ import { import { SupersetClient } from '@superset-ui/core'; import { SqlExpressionType } from '../../types/SqlExpression'; import SQLEditorWithValidation from './index'; +import { Mock } from 'vitest'; vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), @@ -93,9 +94,7 @@ describe('SQLEditorWithValidation', () => { }); test('shows validating state when validation is in progress', async () => { - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; // Mock a slow API response mockPost.mockImplementation( @@ -119,9 +118,7 @@ describe('SQLEditorWithValidation', () => { }); test('shows success state when validation passes', async () => { - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockResolvedValue({ json: { result: [] } } as any); render(); @@ -140,9 +137,7 @@ describe('SQLEditorWithValidation', () => { }); test('shows error state when validation fails', async () => { - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockResolvedValue({ json: { result: [ @@ -171,9 +166,7 @@ describe('SQLEditorWithValidation', () => { }); test('handles API errors gracefully', async () => { - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockRejectedValue(new Error('Network error')); render(); @@ -191,9 +184,7 @@ describe('SQLEditorWithValidation', () => { }); test('sends correct payload for column expression', async () => { - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockResolvedValue({ json: { result: [] } } as any); render( @@ -223,9 +214,7 @@ describe('SQLEditorWithValidation', () => { }); test('sends correct payload for WHERE expression', async () => { - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockResolvedValue({ json: { result: [] } } as any); render( @@ -254,9 +243,7 @@ describe('SQLEditorWithValidation', () => { }); test('sends correct payload for HAVING expression', async () => { - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockResolvedValue({ json: { result: [] } } as any); render( @@ -316,9 +303,7 @@ describe('SQLEditorWithValidation', () => { test('calls onValidationComplete callback when provided', async () => { const onValidationComplete = vi.fn(); - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockResolvedValue({ json: { result: [] } } as any); render( @@ -340,9 +325,7 @@ describe('SQLEditorWithValidation', () => { test('calls onValidationComplete with errors when validation fails', async () => { const onValidationComplete = vi.fn(); - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; const validationError = { message: "Column 'invalid_col' does not exist", line_number: 1, @@ -376,9 +359,7 @@ describe('SQLEditorWithValidation', () => { const longErrorMessage = 'This is a very long error message that should be truncated in the display but shown in full in the tooltip when user hovers over it'; - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockResolvedValue({ json: { result: [ @@ -412,9 +393,7 @@ describe('SQLEditorWithValidation', () => { }); test('handles empty response gracefully', async () => { - const mockPost = SupersetClient.post as vi.MockedFunction< - typeof SupersetClient.post - >; + const mockPost = SupersetClient.post as Mock; mockPost.mockResolvedValue({ json: { result: null } } as any); render(); diff --git a/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.test.tsx b/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.test.tsx index fc1b5ab2355..4ec8dcdc6d4 100644 --- a/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.test.tsx +++ b/superset-frontend/src/dashboard/components/AddSliceCard/AddSliceCard.test.tsx @@ -67,7 +67,7 @@ test('render thumbnail if feature flag is set', async () => { }); test('does not render the tooltip with anchors', async () => { - const mock = jest + const mock = vi .spyOn(global.React, 'useState') .mockImplementation(() => [true, vi.fn()]); render( diff --git a/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.test.tsx b/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.test.tsx index 544dbf2a2c4..2ced55b87cf 100644 --- a/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.test.tsx +++ b/superset-frontend/src/dashboard/components/AutoRefreshStatus/StatusIndicatorDot.test.tsx @@ -20,11 +20,6 @@ import { render, screen, act } from 'spec/helpers/testing-library'; import { StatusIndicatorDot } from './StatusIndicatorDot'; import { AutoRefreshStatus } from '../../types/autoRefresh'; -afterEach(() => { - jest.runOnlyPendingTimers(); - jest.useRealTimers(); -}); - test('renders with success status', () => { render(); const dot = screen.getByTestId('status-indicator-dot'); @@ -70,7 +65,7 @@ test('has correct accessibility attributes', () => { }); test('fetching status updates immediately without debounce', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const { rerender } = render( , @@ -84,7 +79,7 @@ test('fetching status updates immediately without debounce', () => { }); test('debounces non-fetching status changes to prevent flickering', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const { rerender } = render( , @@ -99,7 +94,7 @@ test('debounces non-fetching status changes to prevent flickering', () => { // Fast forward past debounce time (100ms) act(() => { - jest.advanceTimersByTime(150); + vi.advanceTimersByTime(150); }); // Now should be error diff --git a/superset-frontend/src/dashboard/components/Dashboard.test.tsx b/superset-frontend/src/dashboard/components/Dashboard.test.tsx index a7e3781d50d..9a9d97094d8 100644 --- a/superset-frontend/src/dashboard/components/Dashboard.test.tsx +++ b/superset-frontend/src/dashboard/components/Dashboard.test.tsx @@ -36,6 +36,7 @@ import dashboardState from 'spec/fixtures/mockDashboardState'; import { sliceEntitiesForChart as sliceEntities } from 'spec/fixtures/mockSliceEntities'; import { getAllActiveFilters } from 'src/dashboard/util/activeAllDashboardFilters'; import { getRelatedCharts } from 'src/dashboard/util/getRelatedCharts'; +import { Mock } from 'vitest'; // Test mock data doesn't perfectly match strict component prop types, // so we use a loosely-typed wrapper for test rendering @@ -46,7 +47,7 @@ const Dashboard = DashboardComponent as unknown as React.FC< // mock data vi.mock('src/dashboard/util/getRelatedCharts'); -const mockGetRelatedCharts = getRelatedCharts as vi.Mock; +const mockGetRelatedCharts = getRelatedCharts as Mock; // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks describe('Dashboard', () => { diff --git a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx index 71ab9c81ab6..00b2288e9ce 100644 --- a/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx +++ b/superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.test.tsx @@ -43,14 +43,15 @@ import { storeWithState } from 'spec/fixtures/mockStore'; import mockState from 'spec/fixtures/mockState'; import { DASHBOARD_ROOT_ID } from 'src/dashboard/util/constants'; import * as useNativeFiltersModule from './state'; +import { Mock } from 'vitest'; fetchMock.get('glob:*/csstemplateasyncmodelview/api/read', {}); fetchMock.put('glob:*/api/v1/dashboard/*', {}); // Add mock for logging endpoint fetchMock.post('glob:*/superset/log/?*', {}); -vi.mock('src/dashboard/actions/dashboardState', () => ({ - ...vi.requireActual('src/dashboard/actions/dashboardState'), +vi.mock('src/dashboard/actions/dashboardState', async importActual => ({ + ...(await importActual()), fetchFaveStar: vi.fn(), setActiveTab: vi.fn(), setDirectPathToChild: vi.fn(), @@ -107,24 +108,24 @@ vi.mock('src/dashboard/containers/DashboardGrid', () => { // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks describe('DashboardBuilder', () => { - let favStarStub: vi.Mock; - let activeTabsStub: vi.Mock; + let favStarStub: Mock; + let activeTabsStub: Mock; beforeAll(() => { // this is invoked on mount, so we stub it instead of making a request - favStarStub = (fetchFaveStar as vi.Mock).mockReturnValue({ + favStarStub = (fetchFaveStar as Mock).mockReturnValue({ type: 'mock-action', }); - activeTabsStub = (setActiveTab as vi.Mock).mockReturnValue({ + activeTabsStub = (setActiveTab as Mock).mockReturnValue({ type: 'mock-action', }); - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [100, vi.fn()]); + (useStoredSidebarWidth as Mock).mockImplementation(() => [100, vi.fn()]); }); afterAll(() => { favStarStub.mockReset(); activeTabsStub.mockReset(); - (useStoredSidebarWidth as vi.Mock).mockReset(); + (useStoredSidebarWidth as Mock).mockReset(); }); function setup(overrideState = {}) { @@ -244,7 +245,7 @@ describe('DashboardBuilder', () => { }); test('should change redux state if a top-level Tab is clicked', async () => { - (setDirectPathToChild as vi.Mock).mockImplementation(arg0 => ({ + (setDirectPathToChild as Mock).mockImplementation(arg0 => ({ type: 'type', arg0, })); @@ -260,7 +261,7 @@ describe('DashboardBuilder', () => { 'TABS_ID', 'TAB_ID2', ]); - (setDirectPathToChild as vi.Mock).mockReset(); + (setDirectPathToChild as Mock).mockReset(); }); test('should not display a loading spinner when saving is not in progress', () => { @@ -280,7 +281,7 @@ describe('DashboardBuilder', () => { test('should set FilterBar width by useStoredSidebarWidth', () => { const expectedValue = 200; const setter = vi.fn(); - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [ + (useStoredSidebarWidth as Mock).mockImplementation(() => [ expectedValue, setter, ]); @@ -297,11 +298,11 @@ describe('DashboardBuilder', () => { test('should set header max width based on open filter bar width', () => { const expectedValue = 320; const setter = vi.fn(); - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [ + (useStoredSidebarWidth as Mock).mockImplementation(() => [ expectedValue, setter, ]); - const nativeFiltersSpy = jest + const nativeFiltersSpy = vi .spyOn(useNativeFiltersModule, 'useNativeFilters') .mockReturnValue({ showDashboard: true, @@ -323,11 +324,11 @@ describe('DashboardBuilder', () => { test('should use closed filter bar width when the panel is collapsed', () => { const setter = vi.fn(); - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [ + (useStoredSidebarWidth as Mock).mockImplementation(() => [ OPEN_FILTER_BAR_WIDTH, setter, ]); - const nativeFiltersSpy = jest + const nativeFiltersSpy = vi .spyOn(useNativeFiltersModule, 'useNativeFilters') .mockReturnValue({ showDashboard: true, @@ -349,11 +350,11 @@ describe('DashboardBuilder', () => { test('should not constrain header width when filter bar is hidden', () => { const setter = vi.fn(); - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [ + (useStoredSidebarWidth as Mock).mockImplementation(() => [ OPEN_FILTER_BAR_WIDTH, setter, ]); - const nativeFiltersSpy = jest + const nativeFiltersSpy = vi .spyOn(useNativeFiltersModule, 'useNativeFilters') .mockReturnValue({ showDashboard: true, @@ -378,7 +379,7 @@ describe('DashboardBuilder', () => { [FeatureFlag.FilterBarClosedByDefault]: true, }; const setter = vi.fn(); - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [ + (useStoredSidebarWidth as Mock).mockImplementation(() => [ CLOSED_FILTER_BAR_WIDTH, setter, ]); @@ -398,7 +399,7 @@ describe('DashboardBuilder', () => { [FeatureFlag.FilterBarClosedByDefault]: false, }; const setter = vi.fn(); - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [ + (useStoredSidebarWidth as Mock).mockImplementation(() => [ OPEN_FILTER_BAR_WIDTH, setter, ]); @@ -456,9 +457,9 @@ describe('DashboardBuilder', () => { }); test('should render ParentSize wrapper with height 100% for tabs', async () => { - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [100, vi.fn()]); - (fetchFaveStar as vi.Mock).mockReturnValue({ type: 'mock-action' }); - (setActiveTab as vi.Mock).mockReturnValue({ type: 'mock-action' }); + (useStoredSidebarWidth as Mock).mockImplementation(() => [100, vi.fn()]); + (fetchFaveStar as Mock).mockReturnValue({ type: 'mock-action' }); + (setActiveTab as Mock).mockReturnValue({ type: 'mock-action' }); const { findByTestId } = render(, { useRedux: true, @@ -482,10 +483,10 @@ test('should render ParentSize wrapper with height 100% for tabs', async () => { }); test('should maintain layout when switching between tabs', async () => { - (useStoredSidebarWidth as vi.Mock).mockImplementation(() => [100, vi.fn()]); - (fetchFaveStar as vi.Mock).mockReturnValue({ type: 'mock-action' }); - (setActiveTab as vi.Mock).mockReturnValue({ type: 'mock-action' }); - (setDirectPathToChild as vi.Mock).mockImplementation(arg0 => ({ + (useStoredSidebarWidth as Mock).mockImplementation(() => [100, vi.fn()]); + (fetchFaveStar as Mock).mockReturnValue({ type: 'mock-action' }); + (setActiveTab as Mock).mockReturnValue({ type: 'mock-action' }); + (setDirectPathToChild as Mock).mockImplementation(arg0 => ({ type: 'type', arg0, })); diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx index a01a138be03..d19853201b0 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx @@ -28,11 +28,12 @@ import * as SupersetCore from '@superset-ui/core'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import { t } from '@apache-superset/core/translation'; import PropertiesModal from '.'; +import { Mock } from 'vitest'; // Increase timeout for CI environment vi.setConfig({ testTimeout: 60000 }); -vi.mock('@superset-ui/core', async (importActual) => ({ +vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), isFeatureEnabled: vi.fn(), getCategoricalSchemeRegistry: vi.fn(() => ({ @@ -42,7 +43,7 @@ vi.mock('@superset-ui/core', async (importActual) => ({ })), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; const spyColorSchemeSelect = vi.spyOn(ColorSchemeSelect, 'default'); const mockedJsonMetadata = diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.test.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.test.tsx index 1872f74c2aa..b734fed079e 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.test.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/AccessSection.test.tsx @@ -19,9 +19,10 @@ import { render, screen } from 'spec/helpers/testing-library'; import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core'; import AccessSection from './AccessSection'; +import { Mock } from 'vitest'; // Mock feature flags -vi.mock('@superset-ui/core', async (importActual) => ({ +vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), isFeatureEnabled: vi.fn(), })); @@ -38,7 +39,7 @@ vi.mock('src/components/Tag/utils', () => ({ loadTags: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; const defaultProps = { isLoading: false, diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.test.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.test.tsx index e0b257d4207..2f91e054917 100644 --- a/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.test.tsx +++ b/superset-frontend/src/dashboard/components/PropertiesModal/sections/StylingSection.test.tsx @@ -24,9 +24,10 @@ import { } from 'spec/helpers/testing-library'; import { SupersetClient, isFeatureEnabled } from '@superset-ui/core'; import StylingSection from './StylingSection'; +import { Mock } from 'vitest'; // Mock SupersetClient -vi.mock('@superset-ui/core', async (importActual) => ({ +vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), SupersetClient: { get: vi.fn(), @@ -34,10 +35,8 @@ vi.mock('@superset-ui/core', async (importActual) => ({ isFeatureEnabled: vi.fn(), })); -const mockSupersetClient = SupersetClient as vi.Mocked; -const mockIsFeatureEnabled = isFeatureEnabled as vi.MockedFunction< - typeof isFeatureEnabled ->; +const mockSupersetClient = SupersetClient; +const mockIsFeatureEnabled = isFeatureEnabled as Mock; // Mock ColorSchemeSelect component vi.mock('src/dashboard/components/ColorSchemeSelect', () => ({ @@ -82,7 +81,7 @@ beforeEach(() => { vi.clearAllMocks(); // Reset mocks mockIsFeatureEnabled.mockReturnValue(false); - mockSupersetClient.get.mockResolvedValue({ + (mockSupersetClient.get as Mock).mockResolvedValue({ json: { result: mockCssTemplates }, response: {} as Response, }); @@ -242,7 +241,9 @@ describe('CSS Template functionality', () => { test('shows error toast when template fetch fails', async () => { mockIsFeatureEnabled.mockImplementation(flag => flag === 'CSS_TEMPLATES'); const addDangerToast = vi.fn(); - mockSupersetClient.get.mockRejectedValueOnce(new Error('API Error')); + (mockSupersetClient.get as Mock).mockRejectedValueOnce( + new Error('API Error'), + ); render( , @@ -257,7 +258,7 @@ describe('CSS Template functionality', () => { test('does not show CSS template select when no templates available', async () => { mockIsFeatureEnabled.mockImplementation(flag => flag === 'CSS_TEMPLATES'); - mockSupersetClient.get.mockResolvedValueOnce({ + (mockSupersetClient.get as Mock).mockResolvedValueOnce({ json: { result: [] }, response: {} as Response, }); diff --git a/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx b/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx index fcd207ce911..bf1bce6b73c 100644 --- a/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeader/SliceHeader.test.tsx @@ -23,6 +23,7 @@ import { render, screen, userEvent } from 'spec/helpers/testing-library'; import { isEmbedded } from 'src/dashboard/util/isEmbedded'; import { useUiConfig } from 'src/components/UiConfigContext'; import SliceHeader from '.'; +import { Mock } from 'vitest'; vi.mock('src/dashboard/components/SliceHeaderControls', () => ({ __esModule: true, @@ -566,7 +567,7 @@ test('Should render RowCountLabel when row limit is hit, and hide it otherwise', }, }; - const mockUseUiConfig = useUiConfig as vi.MockedFunction; + const mockUseUiConfig = useUiConfig as Mock; mockUseUiConfig.mockReturnValue({ hideTitle: false, hideTab: false, @@ -597,8 +598,8 @@ test('Should render RowCountLabel when row limit is hit, and hide it otherwise', }); test('Should hide warning in embedded by default for non-table charts', () => { - const mockIsEmbedded = isEmbedded as vi.MockedFunction; - const mockUseUiConfig = useUiConfig as vi.MockedFunction; + const mockIsEmbedded = isEmbedded as Mock; + const mockUseUiConfig = useUiConfig as Mock; mockIsEmbedded.mockReturnValue(true); mockUseUiConfig.mockReturnValue({ @@ -643,7 +644,7 @@ test('Should hide warning in embedded by default for non-table charts', () => { }); test('Should show row count badge for table chart without server pagination', () => { - const mockUseUiConfig = useUiConfig as vi.MockedFunction; + const mockUseUiConfig = useUiConfig as Mock; mockUseUiConfig.mockReturnValue({ hideTitle: false, hideTab: false, @@ -734,7 +735,7 @@ test('Should show row count warning for table chart with server pagination when }, }; - const mockUseUiConfig = useUiConfig as vi.MockedFunction; + const mockUseUiConfig = useUiConfig as Mock; mockUseUiConfig.mockReturnValue({ hideTitle: false, hideTab: false, @@ -793,7 +794,7 @@ test('Should NOT show row count warning for table chart with server pagination w }, }; - const mockUseUiConfig = useUiConfig as vi.MockedFunction; + const mockUseUiConfig = useUiConfig as Mock; mockUseUiConfig.mockReturnValue({ hideTitle: false, hideTab: false, diff --git a/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx b/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx index 87b1d548823..195b62b0303 100644 --- a/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx +++ b/superset-frontend/src/dashboard/components/SliceHeaderControls/SliceHeaderControls.test.tsx @@ -22,10 +22,11 @@ import { FeatureFlag, VizType } from '@superset-ui/core'; import mockState from 'spec/fixtures/mockState'; import { cachedSupersetGet } from 'src/utils/cachedSupersetGet'; import SliceHeaderControls, { SliceHeaderControlsProps } from '.'; +import { Mock } from 'vitest'; vi.mock('src/utils/cachedSupersetGet'); -const mockCachedSupersetGet = cachedSupersetGet as vi.MockedFunction< +const mockCachedSupersetGet = cachedSupersetGet as Mock< typeof cachedSupersetGet >; const SLICE_ID = 371; diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx b/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx index a6f3e8b209d..583811b61f0 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.test.tsx @@ -30,12 +30,12 @@ import chartQueries, { import Chart from './Chart'; let capturedChartContainerProps: Record = {}; -jest.mock('src/components/Chart/ChartContainer', () => { +vi.mock('src/components/Chart/ChartContainer', () => { const MockChartContainer = (props: Record) => { capturedChartContainerProps = props; return
; }; - return { __esModule: true, default: MockChartContainer }; + return { default: MockChartContainer }; }); const props = { @@ -175,7 +175,7 @@ test.skip('should call changeFilter when ChartContainer calls changeFilter', () }); test('should call exportChart when exportCSV is clicked', async () => { - const stubbedExportCSV = jest + const stubbedExportCSV = vi .spyOn(exploreUtils, 'exportChart') .mockImplementation((() => {}) as any); const { findByText, getByRole } = setup( @@ -205,7 +205,7 @@ test('should call exportChart with row_limit props.maxRows when exportFullCSV is (global as any).featureFlags = { [FeatureFlag.AllowFullCsvExport]: true, }; - const stubbedExportCSV = jest + const stubbedExportCSV = vi .spyOn(exploreUtils, 'exportChart') .mockImplementation((() => {}) as any); const { findByText, getByRole } = setup( @@ -233,7 +233,7 @@ test('should call exportChart with row_limit props.maxRows when exportFullCSV is }); test('should call exportChart when exportXLSX is clicked', async () => { - const stubbedExportXLSX = jest + const stubbedExportXLSX = vi .spyOn(exploreUtils, 'exportChart') .mockImplementation((() => {}) as any); const { findByText, getByRole } = setup( @@ -260,7 +260,7 @@ test('should call exportChart with row_limit props.maxRows when exportFullXLSX i (global as any).featureFlags = { [FeatureFlag.AllowFullCsvExport]: true, }; - const stubbedExportXLSX = jest + const stubbedExportXLSX = vi .spyOn(exploreUtils, 'exportChart') .mockImplementation((() => {}) as any); const { findByText, getByRole } = setup( diff --git a/superset-frontend/src/dashboard/components/gridComponents/Header/Header.test.tsx b/superset-frontend/src/dashboard/components/gridComponents/Header/Header.test.tsx index 19684078c8d..f1c80e5be7b 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Header/Header.test.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Header/Header.test.tsx @@ -43,8 +43,8 @@ describe('Header', () => { embeddedMode: boolean; filters: Record; handleComponentDrop: () => void; - deleteComponent: vi.Mock; - updateComponents: vi.Mock; + deleteComponent: Mock; + updateComponents: Mock; } const baseComponent = newComponentFactory(HEADER_TYPE); diff --git a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx index e01bcbe7f19..212f565b083 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Markdown/Markdown.test.tsx @@ -59,14 +59,14 @@ interface MarkdownProps { editMode: boolean; availableColumnCount: number; columnWidth: number; - onResizeStart: vi.Mock; - onResize: vi.Mock; - onResizeStop: vi.Mock; - handleComponentDrop: vi.Mock; - updateComponents: vi.Mock; - deleteComponent: vi.Mock; - logEvent: vi.Mock; - addDangerToast: vi.Mock; + onResizeStart: Mock; + onResize: Mock; + onResizeStop: Mock; + handleComponentDrop: Mock; + updateComponents: Mock; + deleteComponent: Mock; + logEvent: Mock; + addDangerToast: Mock; undoLength?: number; redoLength?: number; } diff --git a/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.test.tsx b/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.test.tsx index a33e57bd774..15ccfe1dfd4 100644 --- a/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.test.tsx +++ b/superset-frontend/src/dashboard/components/gridComponents/Tabs/Tabs.test.tsx @@ -30,6 +30,7 @@ import getLeafComponentIdFromPath from 'src/dashboard/util/getLeafComponentIdFro import emptyDashboardLayout from 'src/dashboard/fixtures/emptyDashboardLayout'; import React from 'react'; import TabsComponent from './Tabs'; +import { Mock } from 'vitest'; // Cast to accept partial mock props in tests const Tabs = TabsComponent as unknown as React.FC>; @@ -191,7 +192,7 @@ test('Should render editMode:false', () => { test('Update component props', () => { const props = createProps(); - (getLeafComponentIdFromPath as vi.Mock).mockResolvedValueOnce('none'); + (getLeafComponentIdFromPath as Mock).mockResolvedValueOnce('none'); props.editMode = false; const { rerender } = render(, { useRedux: true, diff --git a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadMenuItems.test.tsx b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadMenuItems.test.tsx index 0a22b717a41..50c4c53d3b6 100644 --- a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadMenuItems.test.tsx +++ b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadMenuItems.test.tsx @@ -26,12 +26,12 @@ import { import { Menu, MenuItem } from '@superset-ui/core/components/Menu'; import { SupersetClient } from '@superset-ui/core'; import { useDownloadMenuItems } from '.'; +import { Mock } from 'vitest'; const mockAddSuccessToast = vi.fn(); const mockAddDangerToast = vi.fn(); vi.mock('src/components/MessageToasts/withToasts', () => ({ - __esModule: true, default: (Component: React.ComponentType) => Component, useToasts: () => ({ addSuccessToast: mockAddSuccessToast, @@ -46,7 +46,7 @@ vi.mock('@superset-ui/core', async importActual => ({ }, })); -const mockSupersetClient = SupersetClient as vi.Mocked; +const mockSupersetClient = SupersetClient const createProps = () => ({ pdfMenuItemTitle: 'Export to PDF', @@ -99,7 +99,7 @@ test('Export as Example calls SupersetClient.get with correct endpoint', async ( 'Content-Disposition': 'attachment; filename="dashboard_123_example.zip"', }), }; - mockSupersetClient.get.mockResolvedValue(mockResponse as unknown as Response); + (mockSupersetClient.get as Mock).mockResolvedValue(mockResponse as unknown as Response); // Mock URL.createObjectURL / revokeObjectURL since jsdom doesn't support them const createObjectURL = vi.fn(() => 'blob:http://localhost/fake'); @@ -124,7 +124,7 @@ test('Export as Example calls SupersetClient.get with correct endpoint', async ( }); test('Export as Example shows error toast on failure', async () => { - mockSupersetClient.get.mockRejectedValue(new Error('Network error')); + (mockSupersetClient.get as Mock).mockRejectedValue(new Error('Network error')); render(, { useRedux: true }); diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx index e3a9457c6c2..77e4f2ed2e0 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.test.tsx @@ -32,6 +32,7 @@ import { FILTER_BAR_TEST_ID } from './utils'; import FilterBar from '.'; import { FILTERS_CONFIG_MODAL_TEST_ID } from '../FiltersConfigModal/FiltersConfigModal'; import * as dataMaskActions from 'src/dataMask/actions'; +import { Mock } from 'vitest'; vi.useFakeTimers(); @@ -40,7 +41,7 @@ vi.mock('@superset-ui/core', async importActual => ({ makeApi: vi.fn(), })); -const mockedMakeApi = makeApi as vi.Mock; +const mockedMakeApi = makeApi as Mock; class MainPreset extends Preset { constructor() { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.test.tsx index e4c3165d204..c93788c5006 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.test.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ColumnSelect.test.tsx @@ -25,13 +25,14 @@ import { import fetchMock from 'fetch-mock'; import { Column, JsonObject, getClientErrorObject } from '@superset-ui/core'; import { ColumnSelect } from './ColumnSelect'; +import { Mock } from 'vitest'; vi.mock('@superset-ui/core', async importActual => ({ ...(await importActual()), getClientErrorObject: vi.fn(() => Promise.resolve({ error: 'Error' })), })); -const mockedGetClientErrorObject = getClientErrorObject as vi.Mock; +const mockedGetClientErrorObject = getClientErrorObject as Mock; fetchMock.get('glob:*/api/v1/dataset/123?*', { body: { diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/__tests__/utils.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/__tests__/utils.tsx index 37f33132e55..6dcf53291f2 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/__tests__/utils.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/__tests__/utils.tsx @@ -24,22 +24,23 @@ import FiltersConfigForm, { import { mockStoreWithChartsInTabsAndRoot } from 'spec/fixtures/mockStore'; import { Form, type FormInstance } from '@superset-ui/core/components'; -export const createMockedProps = () => ({ - expanded: false, - filterId: 'DefaultFilterId', - dependencies: [], - setErroredFilters: jest.fn(), - restoreFilter: jest.fn(), - getAvailableFilters: () => [], - getDependencySuggestion: () => '', - save: jest.fn(), - removedFilters: {}, - handleActiveFilterPanelChange: jest.fn(), - activeFilterPanelKeys: `DefaultFilterId-${FilterPanels.configuration.key}`, - isActive: true, - validateDependencies: jest.fn(), - onModifyFilter: jest.fn(), -}); +export const createMockedProps = () => + ({ + expanded: false, + filterId: 'DefaultFilterId', + dependencies: [], + setErroredFilters: vi.fn(), + restoreFilter: vi.fn(), + getAvailableFilters: () => [], + getDependencySuggestion: () => '', + save: vi.fn(), + removedFilters: {}, + handleActiveFilterPanelChange: vi.fn(), + activeFilterPanelKeys: `DefaultFilterId-${FilterPanels.configuration.key}`, + isActive: true, + validateDependencies: vi.fn(), + onModifyFilter: vi.fn(), + }) as any; interface MockModalProps { scope?: object; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx index 0ae3e9ab40a..abc5ca661b6 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.test.tsx @@ -25,6 +25,7 @@ import { setNativeFilterFieldValues, doesColumnMatchFilterType, } from './utils'; +import { Mock } from 'vitest'; vi.mock('./utils', () => ({ getControlItems: vi.fn(), @@ -144,7 +145,7 @@ test('Should render null when has no "formFilter.filterType" is falsy value', () test('Should render null empty when "getControlItems" return []', () => { const props = createProps(); - (getControlItems as vi.Mock).mockReturnValue([]); + (getControlItems as Mock).mockReturnValue([]); const controlItemsMap = getControlItemsMap(props); const { container } = renderControlItems(controlItemsMap); expect(container.children).toHaveLength(0); @@ -152,7 +153,7 @@ test('Should render null empty when "getControlItems" return []', () => { test('Should render null empty when "getControlItems" return enableSingleValue', () => { const props = createProps(); - (getControlItems as vi.Mock).mockReturnValue([ + (getControlItems as Mock).mockReturnValue([ { name: 'enableSingleValue', config: { renderTrigger: true } }, ]); const controlItemsMap = getControlItemsMap(props); @@ -163,7 +164,7 @@ test('Should render null empty when "getControlItems" return enableSingleValue', test('Should render null empty when "controlItems" are falsy', () => { const props = createProps(); const controlItems = [null, false, {}, { config: { renderTrigger: false } }]; - (getControlItems as vi.Mock).mockReturnValue(controlItems); + (getControlItems as Mock).mockReturnValue(controlItems); const controlItemsMap = getControlItemsMap(props); const { container } = renderControlItems(controlItemsMap); expect(container.children).toHaveLength(0); @@ -176,7 +177,7 @@ test('Should render ControlItems', () => { ...createControlItems(), { name: 'name_2', config: { renderTrigger: true } }, ]; - (getControlItems as vi.Mock).mockReturnValue(controlItems); + (getControlItems as Mock).mockReturnValue(controlItems); const controlItemsMap = getControlItemsMap(props); renderControlItems(controlItemsMap); expect(screen.getAllByRole('checkbox')).toHaveLength(2); @@ -184,7 +185,7 @@ test('Should render ControlItems', () => { test('Clicking on checkbox', () => { const props = createProps(); - (getControlItems as vi.Mock).mockReturnValue(createControlItems()); + (getControlItems as Mock).mockReturnValue(createControlItems()); const controlItemsMap = getControlItemsMap(props); renderControlItems(controlItemsMap); expect(props.forceUpdate).not.toHaveBeenCalled(); @@ -196,7 +197,7 @@ test('Clicking on checkbox', () => { test('Clicking on checkbox when resetConfig:false', () => { const props = createProps(); - (getControlItems as vi.Mock).mockReturnValue([ + (getControlItems as Mock).mockReturnValue([ { name: 'name_1', config: { renderTrigger: true, resetConfig: false } }, ]); const controlItemsMap = getControlItemsMap(props); @@ -211,7 +212,7 @@ test('Clicking on checkbox when resetConfig:false', () => { // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks describe('ColumnSelect filterValues behavior', () => { beforeEach(() => { - (getControlItems as vi.Mock).mockReturnValue([ + (getControlItems as Mock).mockReturnValue([ { name: 'groupby', config: { label: 'Column', multiple: false, required: false }, @@ -220,7 +221,7 @@ describe('ColumnSelect filterValues behavior', () => { }); test('only renders filterable columns when doesColumnMatchFilterType returns true', () => { - (doesColumnMatchFilterType as vi.Mock).mockReturnValue(true); + (doesColumnMatchFilterType as Mock).mockReturnValue(true); const props = { ...createProps(), formFilter: { filterType: 'filterType' }, @@ -235,7 +236,7 @@ describe('ColumnSelect filterValues behavior', () => { }); test('renders no columns when doesColumnMatchFilterType returns false', () => { - (doesColumnMatchFilterType as vi.Mock).mockReturnValue(false); + (doesColumnMatchFilterType as Mock).mockReturnValue(false); const props = { ...createProps(), formFilter: { filterType: 'filterType' }, diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx index b791d3cd484..414e59853ed 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.test.tsx @@ -587,7 +587,7 @@ test('reorders filters via keyboard (Space, ArrowDown, Space)', async () => { sortableElements.forEach((el, index) => { const sortableNode = el.parentElement; if (sortableNode) { - jest.spyOn(sortableNode, 'getBoundingClientRect').mockImplementation( + vi.spyOn(sortableNode, 'getBoundingClientRect').mockImplementation( () => ({ bottom: (index + 1) * SORTABLE_ITEM_HEIGHT, diff --git a/superset-frontend/src/dashboard/hooks/useAutoRefreshTabPause.test.tsx b/superset-frontend/src/dashboard/hooks/useAutoRefreshTabPause.test.tsx index 72b30fb6531..a2992c69955 100644 --- a/superset-frontend/src/dashboard/hooks/useAutoRefreshTabPause.test.tsx +++ b/superset-frontend/src/dashboard/hooks/useAutoRefreshTabPause.test.tsx @@ -107,9 +107,9 @@ afterEach(() => { test('does nothing when not a real-time dashboard (refreshFrequency = 0)', () => { const store = createMockStore({ refreshFrequency: 0 }); - const onRefresh = jest.fn().mockResolvedValue(undefined); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockResolvedValue(undefined); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); renderHook( () => @@ -135,9 +135,9 @@ test('pauses immediately when mounted in a hidden tab', () => { refreshFrequency: 5, autoRefreshPauseOnInactiveTab: true, }); - const onRefresh = jest.fn().mockResolvedValue(undefined); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockResolvedValue(undefined); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); mockVisibilityState('hidden'); @@ -159,9 +159,9 @@ test('stops timer when tab becomes hidden for real-time dashboard', () => { refreshFrequency: 5, autoRefreshPauseOnInactiveTab: true, }); - const onRefresh = jest.fn().mockResolvedValue(undefined); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockResolvedValue(undefined); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); renderHook( () => @@ -188,9 +188,9 @@ test('does not stop timer when manually paused', () => { autoRefreshPaused: true, autoRefreshPauseOnInactiveTab: true, }); - const onRefresh = jest.fn().mockResolvedValue(undefined); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockResolvedValue(undefined); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); renderHook( () => @@ -217,9 +217,9 @@ test('refreshes and restarts timer when tab becomes visible after being paused b refreshFrequency: 5, autoRefreshPauseOnInactiveTab: true, }); - const onRefresh = jest.fn().mockResolvedValue(undefined); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockResolvedValue(undefined); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); // Start with tab visible mockVisibilityState('visible'); @@ -261,9 +261,9 @@ test('does not refresh when returning to visible if manually paused', () => { autoRefreshPaused: true, autoRefreshPauseOnInactiveTab: true, }); - const onRefresh = jest.fn().mockResolvedValue(undefined); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockResolvedValue(undefined); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); // Start with tab hidden mockVisibilityState('hidden'); @@ -293,9 +293,9 @@ test('restarts timer when refresh fails after tab resumes', async () => { refreshFrequency: 5, autoRefreshPauseOnInactiveTab: true, }); - const onRefresh = jest.fn().mockRejectedValue(new Error('boom')); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockRejectedValue(new Error('boom')); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); // Start with tab visible mockVisibilityState('visible'); @@ -332,9 +332,9 @@ test('does nothing when pause-on-inactive is disabled', () => { refreshFrequency: 5, autoRefreshPauseOnInactiveTab: false, }); - const onRefresh = jest.fn().mockResolvedValue(undefined); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockResolvedValue(undefined); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); renderHook( () => @@ -360,9 +360,9 @@ test('clears tab pause and restarts timer when pause-on-inactive is disabled', ( autoRefreshPauseOnInactiveTab: false, autoRefreshPausedByTab: true, }); - const onRefresh = jest.fn().mockResolvedValue(undefined); - const onRestartTimer = jest.fn(); - const onStopTimer = jest.fn(); + const onRefresh = vi.fn().mockResolvedValue(undefined); + const onRestartTimer = vi.fn(); + const onStopTimer = vi.fn(); renderHook( () => diff --git a/superset-frontend/src/dashboard/hooks/useCurrentTime.test.ts b/superset-frontend/src/dashboard/hooks/useCurrentTime.test.ts index e5349633c87..527b600f0b0 100644 --- a/superset-frontend/src/dashboard/hooks/useCurrentTime.test.ts +++ b/superset-frontend/src/dashboard/hooks/useCurrentTime.test.ts @@ -60,9 +60,9 @@ test('syncTrigger causes immediate time update', () => { }); test('syncTrigger update keeps ticking interval in sync', () => { - jest.useFakeTimers(); + vi.useFakeTimers(); const nowRef = { value: 1000 }; - const nowSpy = jest.spyOn(Date, 'now').mockImplementation(() => nowRef.value); + const nowSpy = vi.spyOn(Date, 'now').mockImplementation(() => nowRef.value); const { result, rerender } = renderHook( ({ syncTrigger }) => useCurrentTime(true, syncTrigger), @@ -79,13 +79,13 @@ test('syncTrigger update keeps ticking interval in sync', () => { nowRef.value = 3000; act(() => { - jest.advanceTimersByTime(1000); + vi.advanceTimersByTime(1000); }); expect(result.current).toBe(3000); nowSpy.mockRestore(); - jest.runOnlyPendingTimers(); - jest.useRealTimers(); + vi.runOnlyPendingTimers(); + vi.useRealTimers(); }); test('backward compatibility - works without syncTrigger parameter', () => { @@ -160,7 +160,7 @@ test('changing syncTrigger value triggers sync each time', () => { }); test('cleanup clears interval on unmount', () => { - const clearIntervalSpy = jest.spyOn(globalThis, 'clearInterval'); + const clearIntervalSpy = vi.spyOn(globalThis, 'clearInterval'); const { unmount } = renderHook(() => useCurrentTime(true)); @@ -171,7 +171,7 @@ test('cleanup clears interval on unmount', () => { }); test('disabled hook does not set up interval', () => { - const setIntervalSpy = jest.spyOn(globalThis, 'setInterval'); + const setIntervalSpy = vi.spyOn(globalThis, 'setInterval'); const callCountBefore = setIntervalSpy.mock.calls.length; renderHook(() => useCurrentTime(false, null)); diff --git a/superset-frontend/src/dashboard/hooks/useTabVisibility.test.ts b/superset-frontend/src/dashboard/hooks/useTabVisibility.test.ts index 4fe0a646f80..7eb735809b1 100644 --- a/superset-frontend/src/dashboard/hooks/useTabVisibility.test.ts +++ b/superset-frontend/src/dashboard/hooks/useTabVisibility.test.ts @@ -46,8 +46,8 @@ test('returns initial visibility state as hidden', () => { test('calls onHidden when tab becomes hidden', () => { mockVisibilityState('visible'); - const onHidden = jest.fn(); - const onVisible = jest.fn(); + const onHidden = vi.fn(); + const onVisible = vi.fn(); renderHook(() => useTabVisibility({ onHidden, onVisible })); @@ -63,8 +63,8 @@ test('calls onHidden when tab becomes hidden', () => { test('calls onVisible when tab becomes visible', () => { mockVisibilityState('hidden'); - const onHidden = jest.fn(); - const onVisible = jest.fn(); + const onHidden = vi.fn(); + const onVisible = vi.fn(); renderHook(() => useTabVisibility({ onHidden, onVisible })); @@ -101,7 +101,7 @@ test('updates isVisible state when visibility changes', () => { test('does not add listener when disabled', () => { mockVisibilityState('visible'); - const addEventListenerSpy = jest.spyOn(document, 'addEventListener'); + const addEventListenerSpy = vi.spyOn(document, 'addEventListener'); renderHook(() => useTabVisibility({ enabled: false })); @@ -115,7 +115,7 @@ test('does not add listener when disabled', () => { test('removes listener on unmount', () => { mockVisibilityState('visible'); - const removeEventListenerSpy = jest.spyOn(document, 'removeEventListener'); + const removeEventListenerSpy = vi.spyOn(document, 'removeEventListener'); const { unmount } = renderHook(() => useTabVisibility()); unmount(); @@ -130,8 +130,8 @@ test('removes listener on unmount', () => { test('does not call callbacks on same visibility state', () => { mockVisibilityState('visible'); - const onHidden = jest.fn(); - const onVisible = jest.fn(); + const onHidden = vi.fn(); + const onVisible = vi.fn(); renderHook(() => useTabVisibility({ onHidden, onVisible })); @@ -147,8 +147,8 @@ test('does not call callbacks on same visibility state', () => { test('handles multiple visibility changes', () => { mockVisibilityState('visible'); - const onHidden = jest.fn(); - const onVisible = jest.fn(); + const onHidden = vi.fn(); + const onVisible = vi.fn(); renderHook(() => useTabVisibility({ onHidden, onVisible })); diff --git a/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.test.tsx b/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.test.tsx index 576645a017a..332b24d4f10 100644 --- a/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.test.tsx +++ b/superset-frontend/src/dashboard/util/useFilterFocusHighlightStyles.test.tsx @@ -42,7 +42,7 @@ describe('useFilterFocusHighlightStyles', () => { { ...mockState, ...(initialState as any), ...customState }, compose(applyMiddleware(thunk)), ); - const mockGetRelatedCharts = getRelatedCharts as vi.Mock; + const mockGetRelatedCharts = getRelatedCharts as Mock; const renderWrapper = (chartId: number, store = createMockStore()) => render(, { diff --git a/superset-frontend/src/explore/actions/datasourcesActions.test.ts b/superset-frontend/src/explore/actions/datasourcesActions.test.ts index cf9657b901f..2647c3b1c29 100644 --- a/superset-frontend/src/explore/actions/datasourcesActions.test.ts +++ b/superset-frontend/src/explore/actions/datasourcesActions.test.ts @@ -31,7 +31,7 @@ vi.mock('@superset-ui/core', async importActual => ({ getClientErrorObject: vi.fn(), })); -const mockedGetClientErrorObject = getClientErrorObject as vi.Mock; +const mockedGetClientErrorObject = getClientErrorObject as Mock; const CURRENT_DATASOURCE = { id: 1, diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx index fecc2f9228b..8035342ac28 100644 --- a/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx +++ b/superset-frontend/src/explore/components/ControlPanelsContainer.test.tsx @@ -43,7 +43,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockIsFeatureEnabled = isFeatureEnabled as Mock; const FormDataMock = () => { const formData = useSelector( diff --git a/superset-frontend/src/explore/components/DataTablesPane/test/fixture.tsx b/superset-frontend/src/explore/components/DataTablesPane/test/fixture.tsx index 8ac133742ce..e1f0156cef2 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/test/fixture.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/test/fixture.tsx @@ -73,8 +73,8 @@ export const createDataTablesPaneProps = (sliceId: number) => datasource, queryForce: false, chartStatus: 'rendered' as ChartStatus, - onCollapseChange: jest.fn(), - setForceQuery: jest.fn(), + onCollapseChange: vi.fn(), + setForceQuery: vi.fn(), canDownload: true, }) as DataTablesPaneProps; @@ -92,7 +92,7 @@ export const createSamplesPaneProps = ({ datasource: { ...datasource, id: datasourceId }, queryForce, isVisible: true, - setForceQuery: jest.fn(), + setForceQuery: vi.fn(), canDownload: true, }) as SamplesPaneProps; @@ -118,7 +118,7 @@ export const createResultsPaneOnDashboardProps = ({ }, queryForce, isVisible: true, - setForceQuery: jest.fn(), + setForceQuery: vi.fn(), errorMessage, canDownload: true, }) as ResultsPaneProps; diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx index 5912aac3d6f..f919a54ed47 100644 --- a/superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx +++ b/superset-frontend/src/explore/components/ExploreChartHeader/ExploreChartHeader.test.tsx @@ -160,7 +160,7 @@ describe('ExploreChartHeader', () => { beforeEach(() => { vi.clearAllMocks(); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: false, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), @@ -398,13 +398,13 @@ describe('ExploreChartHeader', () => { ); const setSaveChartModalVisibilityMock = - setSaveChartModalVisibilitySpy as vi.Mock; + setSaveChartModalVisibilitySpy as Mock; const triggerManualSave = vi.fn(() => { setSaveChartModalVisibilityMock(true); }); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: false, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), @@ -430,7 +430,7 @@ describe('ExploreChartHeader', () => { test('Save disabled', async () => { const triggerManualSave = vi.fn(); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: false, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), @@ -455,7 +455,7 @@ describe('ExploreChartHeader', () => { test('should render UnsavedChangesModal when showModal is true', async () => { const props = createProps(); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: true, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), @@ -477,7 +477,7 @@ describe('ExploreChartHeader', () => { test('should call handleSaveAndCloseModal when clicking Save in UnsavedChangesModal', async () => { const handleSaveAndCloseModal = vi.fn(); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: true, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), @@ -501,7 +501,7 @@ describe('ExploreChartHeader', () => { test('should call handleConfirmNavigation when clicking Discard in UnsavedChangesModal', async () => { const handleConfirmNavigation = vi.fn(); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: true, setShowModal: vi.fn(), handleConfirmNavigation, @@ -525,7 +525,7 @@ describe('ExploreChartHeader', () => { test('should call setShowModal(false) when clicking close button in UnsavedChangesModal', async () => { const setShowModal = vi.fn(); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: true, setShowModal, handleConfirmNavigation: vi.fn(), @@ -579,7 +579,7 @@ describe('Additional actions tests', () => { vi.setConfig({ testTimeout: 15000 }); // ✅ Applies to all tests in this suite beforeEach(() => { - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: false, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), @@ -746,7 +746,7 @@ describe('Additional actions tests', () => { spyDownloadAsImage = vi.spyOn(downloadAsImage, 'default'); spyExportChart = vi.spyOn(exploreUtils, 'exportChart'); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: false, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), @@ -928,7 +928,7 @@ describe('Additional actions tests', () => { }); // Avoid jsdom navigation side-effects on .click() - anchorClickSpy = jest + anchorClickSpy = vi .spyOn(HTMLAnchorElement.prototype, 'click') .mockImplementation(() => {}); }); @@ -946,7 +946,7 @@ describe('Additional actions tests', () => { spyDownloadAsImage = vi.spyOn(downloadAsImage, 'default'); spyExportChart = vi.spyOn(exploreUtils, 'exportChart'); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: false, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), diff --git a/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx b/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx index a160c070e2e..44e6fc60e2d 100644 --- a/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx +++ b/superset-frontend/src/explore/components/PropertiesModal/PropertiesModal.test.tsx @@ -450,7 +450,7 @@ test('"Certification details" should not be empty when saved', async () => { }); test('Should display only custom tags when tagging system is enabled', async () => { - const mockIsFeatureEnabled = isFeatureEnabled as vi.MockedFunction< + const mockIsFeatureEnabled = isFeatureEnabled as Mock< typeof isFeatureEnabled >; mockIsFeatureEnabled.mockImplementation( diff --git a/superset-frontend/src/explore/components/SaveModal.test.tsx b/superset-frontend/src/explore/components/SaveModal.test.tsx index 0e25f7483f7..1d8d18d4723 100644 --- a/superset-frontend/src/explore/components/SaveModal.test.tsx +++ b/superset-frontend/src/explore/components/SaveModal.test.tsx @@ -497,7 +497,7 @@ test('onDashboardChange triggers tabs load for existing dashboard', async () => }, }); const component = new TestSaveModal(defaultProps); - const loadTabsMock = jest + const loadTabsMock = vi .fn() .mockResolvedValue([{ value: 'tab1', title: 'Main Tab' }]); component.loadTabs = loadTabsMock; diff --git a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointsControl.test.tsx b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointsControl.test.tsx index 0be6ede9e02..49e5d947c89 100644 --- a/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointsControl.test.tsx +++ b/superset-frontend/src/explore/components/controls/ColorBreakpointsControl/ColorBreakpointsControl.test.tsx @@ -25,7 +25,7 @@ interface Props extends ColorBreakpointsControlProps { name: string; label: string; value: ColorBreakpointType[]; - onChange: vi.Mock; + onChange: Mock; breakpoints: ColorBreakpointType[]; } diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/AdhocFilterControl.test.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/AdhocFilterControl.test.tsx index 7c78a3a6b4f..690032ca7cf 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/AdhocFilterControl.test.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterControl/AdhocFilterControl.test.tsx @@ -21,6 +21,7 @@ import userEvent from '@testing-library/user-event'; import AdhocFilterControl from '.'; import AdhocFilter from '../AdhocFilter'; import { Clauses, ExpressionTypes } from '../types'; +import { Mock } from 'vitest'; interface TestProps { name: string; @@ -38,7 +39,7 @@ interface TestProps { type?: string; [key: string]: unknown; }>; - onChange: vi.Mock; + onChange: Mock; sections: string[]; operators: string[]; [key: string]: unknown; @@ -136,13 +137,13 @@ describe('AdhocFilterControl', () => { }), }); - jest - .spyOn(response, 'json') - .mockImplementation(() => Promise.resolve(mockResponse)); + vi.spyOn(response, 'json').mockImplementation(() => + Promise.resolve(mockResponse), + ); return response; }; - global.fetch = jest + global.fetch = vi .fn() .mockImplementation(() => Promise.resolve(createMockResponse())); diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/AdhocFilterEditPopoverSimpleTabContent.test.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/AdhocFilterEditPopoverSimpleTabContent.test.tsx index ad7baa7fa61..0a9bf72eeea 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/AdhocFilterEditPopoverSimpleTabContent.test.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/AdhocFilterEditPopoverSimpleTabContent.test.tsx @@ -143,7 +143,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; const ADVANCED_DATA_TYPE_ENDPOINT_VALID = 'glob:*/api/v1/advanced_data_type/convert?q=(type:type,values:!(v))'; diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/AdhocFilterEditPopoverSqlTabContent.test.tsx b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/AdhocFilterEditPopoverSqlTabContent.test.tsx index 4c0a01212c5..65d705814c8 100644 --- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/AdhocFilterEditPopoverSqlTabContent.test.tsx +++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSqlTabContent/AdhocFilterEditPopoverSqlTabContent.test.tsx @@ -29,10 +29,10 @@ import { Clauses, ExpressionTypes } from '../types'; import AdhocFilterEditPopoverSqlTabContent from '.'; // Track resize calls for testing -const mockResize = jest.fn(); +const mockResize = vi.fn(); // Mock EditorHost with ref support for resize -jest.mock('src/core/editors', () => { +vi.mock('src/core/editors', () => { const React = require('react'); return { EditorHost: React.forwardRef( @@ -113,7 +113,7 @@ test('calls onChange when the SQL expression changes', async () => { }); test('calls editor resize when adhocFilter changes', async () => { - const onChange = jest.fn(); + const onChange = vi.fn(); const { rerender } = render( ({ fetchTimeRange: vi.fn(), })); -const mockedFetchTimeRange = fetchTimeRange as vi.Mock; +const mockedFetchTimeRange = fetchTimeRange as Mock; test('should return empty object if operator is not TEMPORAL_RANGE', () => { const adhocFilter = new AdhocFilter({ diff --git a/superset-frontend/src/explore/components/controls/JSEditorControl.test.tsx b/superset-frontend/src/explore/components/controls/JSEditorControl.test.tsx index 5a083702b94..fd5f805d931 100644 --- a/superset-frontend/src/explore/components/controls/JSEditorControl.test.tsx +++ b/superset-frontend/src/explore/components/controls/JSEditorControl.test.tsx @@ -20,8 +20,7 @@ import type { ReactNode } from 'react'; import { render, screen, userEvent } from 'spec/helpers/testing-library'; import JSEditorControl from 'src/explore/components/controls/JSEditorControl'; -jest.mock('react-virtualized-auto-sizer', () => ({ - __esModule: true, +vi.mock('react-virtualized-auto-sizer', () => ({ default: ({ children, }: { @@ -29,7 +28,7 @@ jest.mock('react-virtualized-auto-sizer', () => ({ }) => children({ width: 500, height: 250 }), })); -jest.mock('src/core/editors', () => ({ +vi.mock('src/core/editors', () => ({ EditorHost: ({ value, onChange, @@ -45,19 +44,19 @@ jest.mock('src/core/editors', () => ({ ), })); -jest.mock('src/hooks/useDebounceValue', () => ({ +vi.mock('src/hooks/useDebounceValue', () => ({ useDebounceValue: (value: string) => value, })); const defaultProps = { name: 'echartOptions', label: 'EChart Options', - onChange: jest.fn(), + onChange: vi.fn(), value: '', }; beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); test('renders the control with label', () => { diff --git a/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.test.tsx b/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.test.tsx index 4efb604eac2..5384f9b494e 100644 --- a/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.test.tsx +++ b/superset-frontend/src/explore/components/controls/MatrixifyDimensionControl.test.tsx @@ -151,7 +151,7 @@ test('should show value selector in members mode when dimension is selected', () values: [], }; - (SupersetClient.get as vi.Mock).mockResolvedValue({ + (SupersetClient.get as Mock).mockResolvedValue({ json: { result: ['USA', 'Canada'] }, }); @@ -174,7 +174,7 @@ test('should load dimension values from API in members mode', async () => { values: [], }; - (SupersetClient.get as vi.Mock).mockResolvedValue({ + (SupersetClient.get as Mock).mockResolvedValue({ json: { result: ['USA', 'Canada', 'Mexico'] }, }); @@ -200,7 +200,7 @@ test('should handle API errors gracefully in members mode', async () => { values: [], }; - (SupersetClient.get as vi.Mock).mockRejectedValue(new Error('API Error')); + (SupersetClient.get as Mock).mockRejectedValue(new Error('API Error')); render( { }); test('should fetch TopN values when all params are provided', async () => { - const mockFetchTopNValues = fetchTopNValues as vi.MockedFunction< - typeof fetchTopNValues - >; + const mockFetchTopNValues = fetchTopNValues as Mock; const onChange = vi.fn(); const value: MatrixifyDimensionControlValue = { dimension: 'country', @@ -275,9 +273,7 @@ test('should fetch TopN values when all params are provided', async () => { }); test('should display error when TopN fetch fails', async () => { - const mockFetchTopNValues = fetchTopNValues as vi.MockedFunction< - typeof fetchTopNValues - >; + const mockFetchTopNValues = fetchTopNValues as Mock; const value: MatrixifyDimensionControlValue = { dimension: 'country', values: [], @@ -301,9 +297,7 @@ test('should display error when TopN fetch fails', async () => { }); test('should convert string topNValue to number', async () => { - const mockFetchTopNValues = fetchTopNValues as vi.MockedFunction< - typeof fetchTopNValues - >; + const mockFetchTopNValues = fetchTopNValues as Mock; const value: MatrixifyDimensionControlValue = { dimension: 'country', values: [], @@ -439,7 +433,7 @@ test('should preserve dimension values when rerendering with same mode', async ( values: ['USA', 'Australia'], }; - (SupersetClient.get as vi.Mock).mockResolvedValue({ + (SupersetClient.get as Mock).mockResolvedValue({ json: { result: ['USA', 'Canada', 'Australia', 'Mexico'] }, }); @@ -483,7 +477,7 @@ test('should not clear values on initial render with members mode', async () => values: ['USA', 'Australia'], }; - (SupersetClient.get as vi.Mock).mockResolvedValue({ + (SupersetClient.get as Mock).mockResolvedValue({ json: { result: ['USA', 'Canada', 'Australia', 'Mexico'] }, }); @@ -517,7 +511,7 @@ test('should preserve values when other props change but mode stays the same', a values: ['USA', 'Australia'], }; - (SupersetClient.get as vi.Mock).mockResolvedValue({ + (SupersetClient.get as Mock).mockResolvedValue({ json: { result: ['USA', 'Canada', 'Australia', 'Mexico'] }, }); diff --git a/superset-frontend/src/explore/components/controls/SelectControl.test.tsx b/superset-frontend/src/explore/components/controls/SelectControl.test.tsx index ab139fab173..236ba115590 100644 --- a/superset-frontend/src/explore/components/controls/SelectControl.test.tsx +++ b/superset-frontend/src/explore/components/controls/SelectControl.test.tsx @@ -36,7 +36,7 @@ const defaultProps: { name: string; label: string; valueKey: string; - onChange: vi.Mock; + onChange: Mock; } = { choices: [ ['1 year ago', '1 year ago'], diff --git a/superset-frontend/src/explore/components/controls/ViewQuery.test.tsx b/superset-frontend/src/explore/components/controls/ViewQuery.test.tsx index 82fc7edbe48..789368ce07f 100644 --- a/superset-frontend/src/explore/components/controls/ViewQuery.test.tsx +++ b/superset-frontend/src/explore/components/controls/ViewQuery.test.tsx @@ -117,11 +117,11 @@ test('renders the component with Formatted SQL and buttons', async () => { test('copies the SQL to the clipboard when Copy button is clicked', async () => { setup(mockProps); - (copyTextToClipboard as vi.Mock).mockResolvedValue(''); + (copyTextToClipboard as Mock).mockResolvedValue(''); const copyButton = screen.getByText('Copy'); - expect(copyTextToClipboard as vi.Mock).not.toHaveBeenCalled(); + expect(copyTextToClipboard as Mock).not.toHaveBeenCalled(); fireEvent.click(copyButton); - expect(copyTextToClipboard as vi.Mock).toHaveBeenCalled(); + expect(copyTextToClipboard as Mock).toHaveBeenCalled(); }); test('shows the original SQL when Format switch is unchecked', async () => { diff --git a/superset-frontend/src/explore/exploreUtils/formData.test.ts b/superset-frontend/src/explore/exploreUtils/formData.test.ts index 3f6382896ea..b904f9f8f89 100644 --- a/superset-frontend/src/explore/exploreUtils/formData.test.ts +++ b/superset-frontend/src/explore/exploreUtils/formData.test.ts @@ -30,7 +30,7 @@ test('postFormData should call SupersetClient.post with correct payload and retu const mockKey = '123abc'; const mockResponse = { json: { key: mockKey } }; - (SupersetClient.post as vi.Mock).mockResolvedValue(mockResponse); + (SupersetClient.post as Mock).mockResolvedValue(mockResponse); const result = await postFormData( 1, @@ -57,7 +57,7 @@ test('putFormData should call SupersetClient.put with correct payload and return const mockMessage = 'Form data updated'; const mockResponse = { json: { message: mockMessage } }; - (SupersetClient.put as vi.Mock).mockResolvedValue(mockResponse); + (SupersetClient.put as Mock).mockResolvedValue(mockResponse); const result = await putFormData( 10, @@ -81,7 +81,7 @@ test('putFormData should call SupersetClient.put with correct payload and return }); test('postFormData without optional params should work', async () => { - (SupersetClient.post as vi.Mock).mockResolvedValue({ + (SupersetClient.post as Mock).mockResolvedValue({ json: { key: 'abc' }, }); diff --git a/superset-frontend/src/explore/exploreUtils/shouldUseLegacyApi.test.ts b/superset-frontend/src/explore/exploreUtils/shouldUseLegacyApi.test.ts index ba958395c8e..2b0ef5fc521 100644 --- a/superset-frontend/src/explore/exploreUtils/shouldUseLegacyApi.test.ts +++ b/superset-frontend/src/explore/exploreUtils/shouldUseLegacyApi.test.ts @@ -24,7 +24,7 @@ vi.mock('@superset-ui/core', async importActual => ({ getChartMetadataRegistry: vi.fn(), })); -const mockedGetChartMetadataRegistry = getChartMetadataRegistry as vi.Mock; +const mockedGetChartMetadataRegistry = getChartMetadataRegistry as Mock; test('Should return false', () => { const get = vi.fn(); diff --git a/superset-frontend/src/extensions/ExtensionsLoader.test.ts b/superset-frontend/src/extensions/ExtensionsLoader.test.ts index b22edba3dbe..97fcb89ae72 100644 --- a/superset-frontend/src/extensions/ExtensionsLoader.test.ts +++ b/superset-frontend/src/extensions/ExtensionsLoader.test.ts @@ -80,10 +80,10 @@ test('initializes extension without remoteEntry', async () => { test('handles initialization errors gracefully', async () => { const loader = ExtensionsLoader.getInstance(); - const errorSpy = jest.spyOn(logging, 'error').mockImplementation(); + const errorSpy = vi.spyOn(logging, 'error').mockImplementation(() => {}); // Intercept script element creation so onerror fires in jsdom - const appendChildSpy = jest + const appendChildSpy = vi .spyOn(document.head, 'appendChild') .mockImplementation((element: Node) => { if (element instanceof HTMLScriptElement && element.onerror) { diff --git a/superset-frontend/src/extensions/ExtensionsStartup.test.tsx b/superset-frontend/src/extensions/ExtensionsStartup.test.tsx index eee5c8b3bf3..c1df5ebd0fc 100644 --- a/superset-frontend/src/extensions/ExtensionsStartup.test.tsx +++ b/superset-frontend/src/extensions/ExtensionsStartup.test.tsx @@ -82,7 +82,7 @@ test('renders without crashing', () => { test('sets up global superset object when user is logged in', async () => { // Mock initializeExtensions to avoid API calls in this test const loader = ExtensionsLoader.getInstance(); - const initializeSpy = jest + const initializeSpy = vi .spyOn(loader, 'initializeExtensions') .mockImplementation(() => Promise.resolve()); @@ -121,7 +121,7 @@ test('does not set up global superset object when user is not logged in', async test('initializes ExtensionsLoader when user is logged in', async () => { // Mock initializeExtensions to avoid API calls, but track that it was called const loader = ExtensionsLoader.getInstance(); - const initializeSpy = jest + const initializeSpy = vi .spyOn(loader, 'initializeExtensions') .mockImplementation(() => Promise.resolve()); @@ -201,7 +201,7 @@ test('initializes ExtensionsLoader and logs success when EnableExtensions featur // Mock the initializeExtensions method to succeed const originalInitialize = ExtensionsLoader.prototype.initializeExtensions; - ExtensionsLoader.prototype.initializeExtensions = jest + ExtensionsLoader.prototype.initializeExtensions = vi .fn() .mockImplementation(() => Promise.resolve()); @@ -235,9 +235,9 @@ test('does not initialize ExtensionsLoader when EnableExtensions feature flag is mockIsFeatureEnabled.mockReturnValue(false); const loader = ExtensionsLoader.getInstance(); - const initializeSpy = jest + const initializeSpy = vi .spyOn(loader, 'initializeExtensions') - .mockImplementation(); + .mockImplementation(vi.fn()); render(, { useRedux: true, @@ -266,7 +266,7 @@ test('logs error when ExtensionsLoader initialization fails', async () => { // Mock the initializeExtensions method to throw an error const originalInitialize = ExtensionsLoader.prototype.initializeExtensions; - ExtensionsLoader.prototype.initializeExtensions = jest + ExtensionsLoader.prototype.initializeExtensions = vi .fn() .mockImplementation(() => { throw new Error('Test initialization error'); diff --git a/superset-frontend/src/features/alerts/AlertReportModal.test.tsx b/superset-frontend/src/features/alerts/AlertReportModal.test.tsx index 39130c952a9..da6756c19b0 100644 --- a/superset-frontend/src/features/alerts/AlertReportModal.test.tsx +++ b/superset-frontend/src/features/alerts/AlertReportModal.test.tsx @@ -31,12 +31,12 @@ import { buildErrorTooltipMessage } from './buildErrorTooltipMessage'; import AlertReportModal, { AlertReportModalProps } from './AlertReportModal'; import { AlertObject, NotificationMethodOption } from './types'; -jest.mock('@superset-ui/core', () => ({ - ...jest.requireActual('@superset-ui/core'), +vi.mock('@superset-ui/core', async importActual => ({ + ...(await importActual()), isFeatureEnabled: () => true, })); -jest.mock('src/features/databases/state.ts', () => ({ +vi.mock('src/features/databases/state.ts', () => ({ useCommonConf: () => ({ ALERT_REPORTS_NOTIFICATION_METHODS: ['Email', 'Slack', 'SlackV2'], }), @@ -287,8 +287,8 @@ const validAlert: AlertObject = { } as any, }; -jest.mock('./buildErrorTooltipMessage', () => ({ - buildErrorTooltipMessage: jest.fn(), +vi.mock('./buildErrorTooltipMessage', () => ({ + buildErrorTooltipMessage: vi.fn(), })); const generateMockedProps = ( @@ -307,8 +307,8 @@ const generateMockedProps = ( return { addDangerToast: () => {}, addSuccessToast: () => {}, - onAdd: jest.fn(() => []), - onHide: jest.fn(), + onAdd: vi.fn(() => []), + onHide: vi.fn(), alert: useValidAlert ? alert : null, show: true, isReport, diff --git a/superset-frontend/src/features/alerts/components/NotificationMethod.test.tsx b/superset-frontend/src/features/alerts/components/NotificationMethod.test.tsx index f8230840055..c43d1aacd72 100644 --- a/superset-frontend/src/features/alerts/components/NotificationMethod.test.tsx +++ b/superset-frontend/src/features/alerts/components/NotificationMethod.test.tsx @@ -392,14 +392,12 @@ describe('NotificationMethod', () => { window.featureFlags = { [FeatureFlag.AlertReportSlackV2]: true }; // Mock the SupersetClient.get to simulate an error - jest - .spyOn(SupersetClient, 'get') - .mockImplementation( - () => - Promise.resolve({ json: { result: [] } }) as unknown as Promise< - Response | JsonResponse | TextResponse - >, - ); + vi.spyOn(SupersetClient, 'get').mockImplementation( + () => + Promise.resolve({ json: { result: [] } }) as unknown as Promise< + Response | JsonResponse | TextResponse + >, + ); render( { // Set feature flag so that SlackV2 branch renders RefreshLabel window.featureFlags = { [FeatureFlag.AlertReportSlackV2]: true }; // Spy on SupersetClient.get which is called by updateSlackOptions - const supersetClientSpy = jest + const supersetClientSpy = vi .spyOn(SupersetClient, 'get') .mockImplementation( () => diff --git a/superset-frontend/src/features/dashboards/DashboardCard.test.tsx b/superset-frontend/src/features/dashboards/DashboardCard.test.tsx index e51dc6f9af2..29fdae74e64 100644 --- a/superset-frontend/src/features/dashboards/DashboardCard.test.tsx +++ b/superset-frontend/src/features/dashboards/DashboardCard.test.tsx @@ -56,7 +56,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; beforeAll(() => { mockedIsFeatureEnabled.mockReturnValue(true); diff --git a/superset-frontend/src/features/datasets/DuplicateDatasetModal.test.tsx b/superset-frontend/src/features/datasets/DuplicateDatasetModal.test.tsx index 7e9e76d8dee..1ff8768358d 100644 --- a/superset-frontend/src/features/datasets/DuplicateDatasetModal.test.tsx +++ b/superset-frontend/src/features/datasets/DuplicateDatasetModal.test.tsx @@ -66,8 +66,8 @@ const Wrapper = ({ onDuplicate, }: { dataset: VirtualDatasetFixture | null; - onHide: vi.Mock; - onDuplicate: vi.Mock; + onHide: Mock; + onDuplicate: Mock; }) => ( render( , diff --git a/superset-frontend/src/features/home/ChartTable.test.tsx b/superset-frontend/src/features/home/ChartTable.test.tsx index 94f45c68d7d..f1a95629b02 100644 --- a/superset-frontend/src/features/home/ChartTable.test.tsx +++ b/superset-frontend/src/features/home/ChartTable.test.tsx @@ -34,9 +34,7 @@ vi.mock('src/utils/export', () => ({ default: vi.fn(), })); -const mockExport = handleResourceExport as vi.MockedFunction< - typeof handleResourceExport ->; +const mockExport = handleResourceExport as Mock; const chartsEndpoint = 'glob:*/api/v1/chart/?*'; const chartsInfoEndpoint = 'glob:*/api/v1/chart/_info*'; diff --git a/superset-frontend/src/features/home/DashboardTable.test.tsx b/superset-frontend/src/features/home/DashboardTable.test.tsx index 83433e04412..ffa75bae919 100644 --- a/superset-frontend/src/features/home/DashboardTable.test.tsx +++ b/superset-frontend/src/features/home/DashboardTable.test.tsx @@ -37,9 +37,7 @@ vi.mock('src/utils/export', () => ({ default: vi.fn(), })); -const mockExport = handleResourceExport as vi.MockedFunction< - typeof handleResourceExport ->; +const mockExport = handleResourceExport as Mock; vi.mock('src/views/CRUD/utils', () => ({ ...vi.requireActual('src/views/CRUD/utils'), diff --git a/superset-frontend/src/features/home/Menu.test.tsx b/superset-frontend/src/features/home/Menu.test.tsx index 650ae2b7131..7bae7c062bc 100644 --- a/superset-frontend/src/features/home/Menu.test.tsx +++ b/superset-frontend/src/features/home/Menu.test.tsx @@ -26,9 +26,9 @@ import { Menu } from './Menu'; import * as getBootstrapData from 'src/utils/getBootstrapData'; import { Mock } from 'vitest'; -jest.mock('@apache-superset/core/theme', () => ({ - ...jest.requireActual('@apache-superset/core/theme'), - useTheme: jest.fn(), +vi.mock('@apache-superset/core/theme', async importActual => ({ + ...(await importActual()), + useTheme: vi.fn(), })); const dropdownItems = [ @@ -246,10 +246,7 @@ const notanonProps = { }; const useSelectorMock = vi.spyOn(reactRedux, 'useSelector'); -const staticAssetsPrefixMock = vi.spyOn( - getBootstrapData, - 'staticAssetsPrefix', -); +const staticAssetsPrefixMock = vi.spyOn(getBootstrapData, 'staticAssetsPrefix'); const applicationRootMock = vi.spyOn(getBootstrapData, 'applicationRoot'); const useThemeMock = CoreTheme.useTheme as Mock; diff --git a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.test.tsx b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.test.tsx index e58c43281c4..5f1512e1fd9 100644 --- a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.test.tsx +++ b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.test.tsx @@ -129,7 +129,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks describe('Header Report Dropdown', () => { diff --git a/superset-frontend/src/features/reports/ReportModal/ReportModal.test.tsx b/superset-frontend/src/features/reports/ReportModal/ReportModal.test.tsx index c1c668e337d..e1b1f1e0155 100644 --- a/superset-frontend/src/features/reports/ReportModal/ReportModal.test.tsx +++ b/superset-frontend/src/features/reports/ReportModal/ReportModal.test.tsx @@ -55,7 +55,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks describe('Email Report Modal', () => { beforeEach(() => { diff --git a/superset-frontend/src/features/roles/RoleListEditModal.test.tsx b/superset-frontend/src/features/roles/RoleListEditModal.test.tsx index f23653994fd..d35646eeee0 100644 --- a/superset-frontend/src/features/roles/RoleListEditModal.test.tsx +++ b/superset-frontend/src/features/roles/RoleListEditModal.test.tsx @@ -51,8 +51,8 @@ vi.mock('src/components/MessageToasts/withToasts', () => ({ useToasts: () => mockToasts, })); -vi.mock('@superset-ui/core', async (importActual) => { - const original = await importActual() as any; +vi.mock('@superset-ui/core', async importActual => { + const original = (await importActual()) as any; return { ...original, SupersetClient: { @@ -232,7 +232,7 @@ describe('RoleListEditModal', () => { }); test('preserves missing IDs as numeric fallbacks on partial hydration', async () => { - const mockGet = SupersetClient.get as jest.Mock; + const mockGet = SupersetClient.get as Mock; mockGet.mockImplementation(({ endpoint }) => { if (endpoint?.includes('/api/v1/security/permissions-resources/')) { // Only return permission id=10, not id=20 @@ -275,7 +275,7 @@ describe('RoleListEditModal', () => { test('does not fire fallback toast when hydration fetch fails', async () => { mockToasts.addDangerToast.mockClear(); - const mockGet = SupersetClient.get as jest.Mock; + const mockGet = SupersetClient.get as Mock; mockGet.mockImplementation(({ endpoint }) => { if (endpoint?.includes('/api/v1/security/permissions-resources/')) { return Promise.reject(new Error('network error')); @@ -308,7 +308,7 @@ describe('RoleListEditModal', () => { }); test('fires warning toast when hydration returns zero rows but IDs were expected', async () => { - const mockGet = SupersetClient.get as jest.Mock; + const mockGet = SupersetClient.get as Mock; mockGet.mockImplementation(({ endpoint }) => Promise.resolve({ json: { count: 0, result: [] } }), ); @@ -327,7 +327,7 @@ describe('RoleListEditModal', () => { }); test('does not leak state when switching roles', async () => { - const mockGet = SupersetClient.get as jest.Mock; + const mockGet = SupersetClient.get as Mock; // Role A: returns permission 10 with label const roleA = { @@ -371,12 +371,7 @@ describe('RoleListEditModal', () => { }); const { rerender, unmount } = render( - , + , ); await waitFor(() => { @@ -391,12 +386,7 @@ describe('RoleListEditModal', () => { // Switch to Role B rerender( - , + , ); await waitFor(() => { @@ -421,7 +411,7 @@ describe('RoleListEditModal', () => { }); test('fetches permissions and groups by id for hydration', async () => { - const mockGet = SupersetClient.get as jest.Mock; + const mockGet = SupersetClient.get as Mock; mockGet.mockResolvedValue({ json: { count: 0, diff --git a/superset-frontend/src/features/roles/utils.test.ts b/superset-frontend/src/features/roles/utils.test.ts index c6321716fa6..3772354a400 100644 --- a/superset-frontend/src/features/roles/utils.test.ts +++ b/superset-frontend/src/features/roles/utils.test.ts @@ -24,7 +24,7 @@ import { fetchPermissionOptions, } from './utils'; -const getMock = jest.spyOn(SupersetClient, 'get'); +const getMock = vi.spyOn(SupersetClient, 'get'); afterEach(() => { getMock.mockReset(); @@ -44,7 +44,7 @@ test('fetchPermissionOptions fetches all results on page 0 with large page_size' ], }, } as any); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const result = await fetchPermissionOptions('dataset', 0, 50, addDangerToast); @@ -94,7 +94,7 @@ test('fetchPermissionOptions serves cached slices on subsequent pages', async () } return Promise.resolve({ json: { count: 0, result: [] } } as any); }); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); // Page 0 populates the cache await fetchPermissionOptions('test', 0, 2, addDangerToast); @@ -115,7 +115,7 @@ test('fetchPermissionOptions makes single request when search term is empty', as getMock.mockResolvedValue({ json: { count: 0, result: [] }, } as any); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); await fetchPermissionOptions('', 0, 100, addDangerToast); @@ -130,7 +130,7 @@ test('fetchPermissionOptions makes single request when search term is empty', as test('fetchPermissionOptions fires single toast when both requests fail', async () => { getMock.mockRejectedValue(new Error('request failed')); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const result = await fetchPermissionOptions( 'dataset', @@ -178,7 +178,7 @@ test('fetchPermissionOptions deduplicates results from both columns', async () = } as any); }); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const result = await fetchPermissionOptions('chart', 0, 100, addDangerToast); // id=5 appears in both results but should be deduplicated @@ -199,7 +199,7 @@ test('fetchPermissionOptions preserves cache across empty searches', async () => result: [{ id: 1, permission: { name: 'a' }, view_menu: { name: 'X' } }], }, } as any); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); await fetchPermissionOptions('test', 0, 50, addDangerToast); expect(getMock).toHaveBeenCalledTimes(2); getMock.mockReset(); @@ -226,7 +226,7 @@ test('fetchGroupOptions sends filters array with search term', async () => { ], }, } as any); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const result = await fetchGroupOptions('eng', 1, 25, addDangerToast); @@ -252,7 +252,7 @@ test('fetchGroupOptions omits filters when search term is empty', async () => { getMock.mockResolvedValue({ json: { count: 0, result: [] }, } as any); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); await fetchGroupOptions('', 0, 100, addDangerToast); @@ -266,7 +266,7 @@ test('fetchGroupOptions omits filters when search term is empty', async () => { test('fetchGroupOptions returns empty options on error', async () => { getMock.mockRejectedValue(new Error('request failed')); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const result = await fetchGroupOptions('eng', 0, 100, addDangerToast); @@ -308,7 +308,7 @@ test('fetchPermissionOptions fetches multiple pages when results exceed PAGE_SIZ return Promise.resolve({ json: { count: 0, result: [] } } as any); }); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const result = await fetchPermissionOptions('multi', 0, 50, addDangerToast); // Two search branches (view_menu + permission), each needing 2 pages = 4 calls @@ -346,7 +346,7 @@ test('fetchPermissionOptions handles backend capping page_size below requested', } as any); }); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const result = await fetchPermissionOptions('cap', 0, 50, addDangerToast); // Two search branches, each needing 3 pages (500+500+200) = 6 calls @@ -369,7 +369,7 @@ test('fetchPermissionOptions shares cache across case variants', async () => { ], }, } as any); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); await fetchPermissionOptions('Dataset', 0, 50, addDangerToast); expect(getMock).toHaveBeenCalledTimes(2); @@ -401,7 +401,7 @@ test('fetchPermissionOptions evicts oldest cache entry when MAX_CACHE_ENTRIES is } as any); }); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); // Fill cache with 20 entries (MAX_CACHE_ENTRIES) for (let i = 0; i < 20; i += 1) { @@ -447,7 +447,7 @@ test('fetchPermissionOptions handles variable page sizes from backend', async () } as any); }); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const result = await fetchPermissionOptions('var', 0, 50, addDangerToast); // Both branches return identical IDs so deduplicated total is 1200 @@ -492,7 +492,7 @@ test('fetchPermissionOptions respects concurrency limit for parallel page fetche }); }); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); const fetchPromise = fetchPermissionOptions('conc', 0, 50, addDangerToast); // Resolve page 0 for both branches (2 calls) @@ -526,7 +526,7 @@ test('fetchPermissionOptions normalizes whitespace and case for cache keys', asy ], }, } as any); - const addDangerToast = jest.fn(); + const addDangerToast = vi.fn(); // Seed cache with "Dataset" await fetchPermissionOptions('Dataset', 0, 50, addDangerToast); diff --git a/superset-frontend/src/middleware/asyncEvent.test.ts b/superset-frontend/src/middleware/asyncEvent.test.ts index d037da88603..ca75742f221 100644 --- a/superset-frontend/src/middleware/asyncEvent.test.ts +++ b/superset-frontend/src/middleware/asyncEvent.test.ts @@ -26,7 +26,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks describe('asyncEvent middleware', () => { diff --git a/superset-frontend/src/pages/Chart/Chart.test.tsx b/superset-frontend/src/pages/Chart/Chart.test.tsx index 60fad8cf6a7..b8c5148781e 100644 --- a/superset-frontend/src/pages/Chart/Chart.test.tsx +++ b/superset-frontend/src/pages/Chart/Chart.test.tsx @@ -59,7 +59,7 @@ describe('ChartPage', () => { beforeEach(() => { vi.clearAllMocks(); - (useUnsavedChangesPrompt as vi.Mock).mockReturnValue({ + (useUnsavedChangesPrompt as Mock).mockReturnValue({ showModal: false, setShowModal: vi.fn(), handleConfirmNavigation: vi.fn(), @@ -98,7 +98,7 @@ describe('ChartPage', () => { const chartApiRoute = `glob:*/api/v1/chart/*`; const exploreApiRoute = 'glob:*/api/v1/explore/*'; const expectedDatasourceName = 'failed datasource name'; - (getParsedExploreURLParams as vi.Mock).mockReturnValue( + (getParsedExploreURLParams as Mock).mockReturnValue( new Map([['datasource_id', 1]]), ); fetchMock.get(exploreApiRoute, () => { @@ -141,7 +141,7 @@ describe('ChartPage', () => { test('fetches the chart api when explore metadata is prohibited and access from the chart link', async () => { const expectedChartId = 7; const expectedChartName = 'Unauthorized dataset owned chart name'; - (getParsedExploreURLParams as vi.Mock).mockReturnValue( + (getParsedExploreURLParams as Mock).mockReturnValue( new Map([['slice_id', expectedChartId]]), ); const chartApiRoute = `glob:*/api/v1/chart/${expectedChartId}`; @@ -201,14 +201,12 @@ describe('ChartPage', () => { afterEach(() => { localStorage.clear(); - (getFormDataWithExtraFilters as vi.Mock).mockClear(); + (getFormDataWithExtraFilters as Mock).mockClear(); }); test('overrides the form_data with dashboardContextFormData', async () => { const dashboardFormData = getDashboardFormData(); - (getFormDataWithExtraFilters as vi.Mock).mockReturnValue( - dashboardFormData, - ); + (getFormDataWithExtraFilters as Mock).mockReturnValue(dashboardFormData); const exploreApiRoute = 'glob:*/api/v1/explore/*'; const exploreFormData = getExploreFormData(); fetchMock.get(exploreApiRoute, { @@ -241,9 +239,7 @@ describe('ChartPage', () => { viz_type: VizType.Table, show_cell_bars: true, }; - (getFormDataWithExtraFilters as vi.Mock).mockReturnValue( - dashboardFormData, - ); + (getFormDataWithExtraFilters as Mock).mockReturnValue(dashboardFormData); const exploreApiRoute = 'glob:*/api/v1/explore/*'; const exploreFormData = getExploreFormData({ viz_type: VizType.Table, diff --git a/superset-frontend/src/pages/ChartList/ChartList.cardview.test.tsx b/superset-frontend/src/pages/ChartList/ChartList.cardview.test.tsx index c438f6682e0..91fcc1efd75 100644 --- a/superset-frontend/src/pages/ChartList/ChartList.cardview.test.tsx +++ b/superset-frontend/src/pages/ChartList/ChartList.cardview.test.tsx @@ -65,9 +65,7 @@ describe('ChartList Card View Tests', () => { setupMocks(); // Enable card view as default - ( - isFeatureEnabled as vi.MockedFunction - ).mockImplementation( + (isFeatureEnabled as Mock).mockImplementation( (feature: string) => feature === 'LISTVIEWS_DEFAULT_CARD_VIEW', ); }); @@ -118,9 +116,7 @@ describe('ChartList Card View Tests', () => { test('renders ChartList in card view with thumbnails enabled', async () => { // Enable thumbnails feature flag - ( - isFeatureEnabled as vi.MockedFunction - ).mockImplementation( + (isFeatureEnabled as Mock).mockImplementation( (feature: string) => feature === 'LISTVIEWS_DEFAULT_CARD_VIEW' || feature === 'THUMBNAILS', ); @@ -412,9 +408,7 @@ describe('ChartList Card View Tests', () => { test('can bulk add tags to selected charts', async () => { // Enable tagging system for this test - ( - isFeatureEnabled as vi.MockedFunction - ).mockImplementation( + (isFeatureEnabled as Mock).mockImplementation( (feature: string) => feature === 'LISTVIEWS_DEFAULT_CARD_VIEW' || feature === 'TAGGING_SYSTEM', diff --git a/superset-frontend/src/pages/ChartList/ChartList.listview.test.tsx b/superset-frontend/src/pages/ChartList/ChartList.listview.test.tsx index 44a7d2cad2b..21b03ca665d 100644 --- a/superset-frontend/src/pages/ChartList/ChartList.listview.test.tsx +++ b/superset-frontend/src/pages/ChartList/ChartList.listview.test.tsx @@ -43,9 +43,7 @@ vi.mock('src/utils/export', () => ({ default: vi.fn(), })); -const mockIsFeatureEnabled = isFeatureEnabled as vi.MockedFunction< - typeof isFeatureEnabled ->; +const mockIsFeatureEnabled = isFeatureEnabled as Mock; const mockUser = { userId: 1, diff --git a/superset-frontend/src/pages/ChartList/ChartList.permissions.test.tsx b/superset-frontend/src/pages/ChartList/ChartList.permissions.test.tsx index 1a786b990af..827f2fdd25d 100644 --- a/superset-frontend/src/pages/ChartList/ChartList.permissions.test.tsx +++ b/superset-frontend/src/pages/ChartList/ChartList.permissions.test.tsx @@ -131,14 +131,14 @@ const renderWithPermissions = async ( userId: number | undefined = 1, featureFlags: { tagging?: boolean; cardView?: boolean } = {}, ) => { - ( - isFeatureEnabled as vi.MockedFunction - ).mockImplementation((feature: string) => { - if (feature === 'TAGGING_SYSTEM') return featureFlags.tagging === true; - if (feature === 'LISTVIEWS_DEFAULT_CARD_VIEW') - return featureFlags.cardView === true; - return false; - }); + (isFeatureEnabled as Mock).mockImplementation( + (feature: string) => { + if (feature === 'TAGGING_SYSTEM') return featureFlags.tagging === true; + if (feature === 'LISTVIEWS_DEFAULT_CARD_VIEW') + return featureFlags.cardView === true; + return false; + }, + ); // Convert role permissions to API permissions setupMocks({ [API_ENDPOINTS.CHARTS_INFO]: permissions.map(perm => perm[0]) }); @@ -166,9 +166,7 @@ const renderWithPermissions = async ( describe('ChartList - Permission-based UI Tests', () => { beforeEach(() => { fetchMock.clearHistory().removeRoutes(); - ( - isFeatureEnabled as vi.MockedFunction - ).mockReset(); + (isFeatureEnabled as Mock).mockReset(); }); test('shows all UI elements for admin users with full permissions', async () => { diff --git a/superset-frontend/src/pages/ChartList/ChartList.test.tsx b/superset-frontend/src/pages/ChartList/ChartList.test.tsx index c58004106f0..24b3c8c93d9 100644 --- a/superset-frontend/src/pages/ChartList/ChartList.test.tsx +++ b/superset-frontend/src/pages/ChartList/ChartList.test.tsx @@ -75,9 +75,7 @@ describe('ChartList', () => { afterEach(() => { fetchMock.clearHistory(); // Reset feature flag mock - ( - isFeatureEnabled as vi.MockedFunction - ).mockReset(); + (isFeatureEnabled as Mock).mockReset(); }); test('renders component with basic structure', async () => { @@ -248,9 +246,7 @@ describe('ChartList - Global Filter Interactions', () => { afterEach(() => { fetchMock.clearHistory(); // Reset feature flag mock - ( - isFeatureEnabled as vi.MockedFunction - ).mockReset(); + (isFeatureEnabled as Mock).mockReset(); }); test('renders all standard filters', async () => { @@ -283,9 +279,7 @@ describe('ChartList - Global Filter Interactions', () => { test('renders Tags filter when TAGGING_SYSTEM is enabled', async () => { // Mock feature flag to enable tags - ( - isFeatureEnabled as vi.MockedFunction - ).mockImplementation( + (isFeatureEnabled as Mock).mockImplementation( (feature: string) => feature === 'TAGGING_SYSTEM' || feature !== 'LISTVIEWS_DEFAULT_CARD_VIEW', @@ -312,9 +306,7 @@ describe('ChartList - Global Filter Interactions', () => { }); test('does not render Tags filter when TAGGING_SYSTEM is disabled', async () => { - ( - isFeatureEnabled as vi.MockedFunction - ).mockImplementation( + (isFeatureEnabled as Mock).mockImplementation( (feature: string) => feature !== 'LISTVIEWS_DEFAULT_CARD_VIEW' && feature !== 'TAGGING_SYSTEM', diff --git a/superset-frontend/src/pages/DashboardList/DashboardList.behavior.test.tsx b/superset-frontend/src/pages/DashboardList/DashboardList.behavior.test.tsx index 997bca9fd87..3e8f406eb2a 100644 --- a/superset-frontend/src/pages/DashboardList/DashboardList.behavior.test.tsx +++ b/superset-frontend/src/pages/DashboardList/DashboardList.behavior.test.tsx @@ -26,22 +26,20 @@ import { setupMocks, renderDashboardList, } from './DashboardList.testHelpers'; +import { Mock } from 'vitest'; -jest.setTimeout(30000); +vi.setConfig({ testTimeout: 30000 }); -jest.mock('@superset-ui/core', () => ({ - ...jest.requireActual('@superset-ui/core'), - isFeatureEnabled: jest.fn(), +vi.mock('@superset-ui/core', async importActual => ({ + ...(await importActual()), + isFeatureEnabled: vi.fn(), })); -jest.mock('src/utils/export', () => ({ - __esModule: true, - default: jest.fn(), +vi.mock('src/utils/export', () => ({ + default: vi.fn(), })); -const mockIsFeatureEnabled = isFeatureEnabled as jest.MockedFunction< - typeof isFeatureEnabled ->; +const mockIsFeatureEnabled = isFeatureEnabled as Mock; const mockUser = { userId: 1, @@ -138,7 +136,7 @@ test('can unfavorite a dashboard', async () => { result: [], count: 0, }); - global.URL.createObjectURL = jest.fn(); + global.URL.createObjectURL = vi.fn(); fetchMock.get('/thumbnail', { body: new Blob(), sendAsJson: false }); fetchMock.get('glob:*', (callLog: any) => { const reqUrl = @@ -255,7 +253,7 @@ test('can edit dashboard title via properties modal', async () => { result: [], count: 0, }); - global.URL.createObjectURL = jest.fn(); + global.URL.createObjectURL = vi.fn(); fetchMock.get(API_ENDPOINTS.THUMBNAIL, { body: new Blob(), sendAsJson: false, diff --git a/superset-frontend/src/pages/DashboardList/DashboardList.cardview.test.tsx b/superset-frontend/src/pages/DashboardList/DashboardList.cardview.test.tsx index c03299cfc43..0a4b5ab9789 100644 --- a/superset-frontend/src/pages/DashboardList/DashboardList.cardview.test.tsx +++ b/superset-frontend/src/pages/DashboardList/DashboardList.cardview.test.tsx @@ -32,17 +32,17 @@ import { setupMocks, getLatestDashboardApiCall, } from './DashboardList.testHelpers'; +import { Mock } from 'vitest'; -jest.setTimeout(30000); +vi.setConfig({ testTimeout: 30000 }); -jest.mock('@superset-ui/core', () => ({ - ...jest.requireActual('@superset-ui/core'), - isFeatureEnabled: jest.fn(), +vi.mock('@superset-ui/core', async importActual => ({ + ...(await importActual()), + isFeatureEnabled: vi.fn(), })); -jest.mock('src/utils/export', () => ({ - __esModule: true, - default: jest.fn(), +vi.mock('src/utils/export', () => ({ + default: vi.fn(), })); const mockUser = { @@ -63,9 +63,7 @@ describe('DashboardList Card View Tests', () => { setupMocks(); // Enable card view as default - ( - isFeatureEnabled as jest.MockedFunction - ).mockImplementation( + (isFeatureEnabled as Mock).mockImplementation( (feature: string) => feature === 'LISTVIEWS_DEFAULT_CARD_VIEW', ); }); diff --git a/superset-frontend/src/pages/DashboardList/DashboardList.listview.test.tsx b/superset-frontend/src/pages/DashboardList/DashboardList.listview.test.tsx index 1030faf96c2..62f1681480d 100644 --- a/superset-frontend/src/pages/DashboardList/DashboardList.listview.test.tsx +++ b/superset-frontend/src/pages/DashboardList/DashboardList.listview.test.tsx @@ -32,22 +32,20 @@ import { renderDashboardList, getLatestDashboardApiCall, } from './DashboardList.testHelpers'; +import { Mock } from 'vitest'; -jest.setTimeout(30000); +vi.setConfig({ testTimeout: 30000 }); -jest.mock('@superset-ui/core', () => ({ - ...jest.requireActual('@superset-ui/core'), - isFeatureEnabled: jest.fn(), +vi.mock('@superset-ui/core', async importActual => ({ + ...((await importActual()) as any), + isFeatureEnabled: vi.fn(), })); -jest.mock('src/utils/export', () => ({ - __esModule: true, - default: jest.fn(), +vi.mock('src/utils/export', () => ({ + default: vi.fn(), })); -const mockIsFeatureEnabled = isFeatureEnabled as jest.MockedFunction< - typeof isFeatureEnabled ->; +const mockIsFeatureEnabled = isFeatureEnabled as Mock; const mockUser = { userId: 1, diff --git a/superset-frontend/src/pages/DashboardList/DashboardList.permissions.test.tsx b/superset-frontend/src/pages/DashboardList/DashboardList.permissions.test.tsx index 68d1229d97b..09c2f617ce7 100644 --- a/superset-frontend/src/pages/DashboardList/DashboardList.permissions.test.tsx +++ b/superset-frontend/src/pages/DashboardList/DashboardList.permissions.test.tsx @@ -30,22 +30,22 @@ import { mockDashboards, setupMocks, } from './DashboardList.testHelpers'; +import { Mock } from 'vitest'; // Cast to accept partial mock props in tests const DashboardList = DashboardListComponent as unknown as React.FC< Record >; -jest.setTimeout(30000); +vi.setConfig({ testTimeout: 30000 }); -jest.mock('@superset-ui/core', () => ({ - ...jest.requireActual('@superset-ui/core'), - isFeatureEnabled: jest.fn(), +vi.mock('@superset-ui/core', async importActual => ({ + ...(await importActual()), + isFeatureEnabled: vi.fn(), })); -jest.mock('src/utils/export', () => ({ - __esModule: true, - default: jest.fn(), +vi.mock('src/utils/export', () => ({ + default: vi.fn(), })); // Permission configurations @@ -137,14 +137,14 @@ const renderWithPermissions = async ( userId: number | undefined = 1, featureFlags: { tagging?: boolean; cardView?: boolean } = {}, ) => { - ( - isFeatureEnabled as jest.MockedFunction - ).mockImplementation((feature: string) => { - if (feature === 'TAGGING_SYSTEM') return featureFlags.tagging === true; - if (feature === 'LISTVIEWS_DEFAULT_CARD_VIEW') - return featureFlags.cardView === true; - return false; - }); + (isFeatureEnabled as Mock).mockImplementation( + (feature: string) => { + if (feature === 'TAGGING_SYSTEM') return featureFlags.tagging === true; + if (feature === 'LISTVIEWS_DEFAULT_CARD_VIEW') + return featureFlags.cardView === true; + return false; + }, + ); // Convert role permissions to API permissions setupMocks({ @@ -173,9 +173,7 @@ const renderWithPermissions = async ( describe('DashboardList - Permission-based UI Tests', () => { beforeEach(() => { fetchMock.clearHistory().removeRoutes(); - ( - isFeatureEnabled as jest.MockedFunction - ).mockReset(); + (isFeatureEnabled as Mock).mockReset(); }); test('shows all UI elements for admin users with full permissions', async () => { diff --git a/superset-frontend/src/pages/DashboardList/DashboardList.test.tsx b/superset-frontend/src/pages/DashboardList/DashboardList.test.tsx index ce643e4ea23..ecb2e510e77 100644 --- a/superset-frontend/src/pages/DashboardList/DashboardList.test.tsx +++ b/superset-frontend/src/pages/DashboardList/DashboardList.test.tsx @@ -32,6 +32,7 @@ import { API_ENDPOINTS, getLatestDashboardApiCall, } from './DashboardList.testHelpers'; +import { Mock } from 'vitest'; vi.setConfig({ testTimeout: 30000 }); @@ -41,13 +42,10 @@ vi.mock('@superset-ui/core', async importActual => ({ })); vi.mock('src/utils/export', () => ({ - __esModule: true, default: vi.fn(), })); -const mockIsFeatureEnabled = isFeatureEnabled as vi.MockedFunction< - typeof isFeatureEnabled ->; +const mockIsFeatureEnabled = isFeatureEnabled as Mock; beforeEach(() => { setupMocks(); diff --git a/superset-frontend/src/pages/DashboardList/DashboardList.testHelpers.tsx b/superset-frontend/src/pages/DashboardList/DashboardList.testHelpers.tsx index b5cc1e4ea20..93f0d04ee11 100644 --- a/superset-frontend/src/pages/DashboardList/DashboardList.testHelpers.tsx +++ b/superset-frontend/src/pages/DashboardList/DashboardList.testHelpers.tsx @@ -18,6 +18,7 @@ */ // eslint-disable-next-line import/no-extraneous-dependencies import fetchMock from 'fetch-mock'; +import { Mock } from 'vitest'; import rison from 'rison'; import { render, screen } from 'spec/helpers/testing-library'; import { Provider } from 'react-redux'; @@ -33,8 +34,9 @@ const DashboardList = DashboardListComponent as unknown as React.FC< Record >; -export const mockHandleResourceExport = - handleResourceExport as jest.MockedFunction; +export const mockHandleResourceExport = handleResourceExport as Mock< + typeof handleResourceExport +>; export const mockDashboards = [ { @@ -317,7 +319,7 @@ export const setupMocks = ( { name: API_ENDPOINTS.DASHBOARD_RELATED_CHANGED_BY }, ); - global.URL.createObjectURL = jest.fn(); + global.URL.createObjectURL = vi.fn(); fetchMock.get( API_ENDPOINTS.THUMBNAIL, { body: new Blob(), sendAsJson: false }, diff --git a/superset-frontend/src/pages/Home/Home.test.tsx b/superset-frontend/src/pages/Home/Home.test.tsx index 1e80966cd6a..fa923ea6357 100644 --- a/superset-frontend/src/pages/Home/Home.test.tsx +++ b/superset-frontend/src/pages/Home/Home.test.tsx @@ -146,7 +146,7 @@ vi.mock('@superset-ui/core', async importActual => ({ isFeatureEnabled: vi.fn(), })); -const mockedIsFeatureEnabled = isFeatureEnabled as vi.Mock; +const mockedIsFeatureEnabled = isFeatureEnabled as Mock; const renderWelcome = (props = mockedProps) => waitFor(() => { diff --git a/superset-frontend/src/pages/ThemeList/ThemeList.test.tsx b/superset-frontend/src/pages/ThemeList/ThemeList.test.tsx index 8afe50fc5c1..f9a1d0259a5 100644 --- a/superset-frontend/src/pages/ThemeList/ThemeList.test.tsx +++ b/superset-frontend/src/pages/ThemeList/ThemeList.test.tsx @@ -127,7 +127,7 @@ const mockRefreshData = vi.fn(); beforeEach(() => { // Mock the useListViewResource hook - (hooks.useListViewResource as vi.Mock).mockReturnValue({ + (hooks.useListViewResource as Mock).mockReturnValue({ state: { loading: false, resourceCollection: mockThemes, @@ -143,7 +143,7 @@ beforeEach(() => { // Mock useThemeContext mockGetAppliedThemeId.mockReturnValue(null); - (useThemeContext as vi.Mock).mockReturnValue({ + (useThemeContext as Mock).mockReturnValue({ getCurrentCrudThemeId: vi.fn().mockReturnValue('1'), appliedTheme: { theme_name: 'Light Theme', id: 1 }, setTemporaryTheme: mockSetTemporaryTheme, @@ -530,7 +530,7 @@ test('component loads successfully with applied theme ID set', async () => { // This test verifies that having a stored theme ID doesn't break the component // Mock hasDevOverride to return true since we have a dev override set mockGetAppliedThemeId.mockReturnValue(1); - (useThemeContext as vi.Mock).mockReturnValue({ + (useThemeContext as Mock).mockReturnValue({ getCurrentCrudThemeId: vi.fn().mockReturnValue('1'), appliedTheme: { theme_name: 'Light Theme', id: 1 }, setTemporaryTheme: mockSetTemporaryTheme, @@ -562,7 +562,7 @@ test('component loads successfully with applied theme ID set', async () => { test('component loads successfully and preserves applied theme state', async () => { // Mock hasDevOverride to return true and getAppliedThemeId to return a theme mockGetAppliedThemeId.mockReturnValue(1); - (useThemeContext as vi.Mock).mockReturnValue({ + (useThemeContext as Mock).mockReturnValue({ getCurrentCrudThemeId: vi.fn().mockReturnValue('1'), appliedTheme: { theme_name: 'Light Theme', id: 1 }, setTemporaryTheme: mockSetTemporaryTheme, diff --git a/superset-frontend/src/theme/tests/ThemeProvider.test.tsx b/superset-frontend/src/theme/tests/ThemeProvider.test.tsx index 62923c30fef..f4bc3bedd9d 100644 --- a/superset-frontend/src/theme/tests/ThemeProvider.test.tsx +++ b/superset-frontend/src/theme/tests/ThemeProvider.test.tsx @@ -26,9 +26,10 @@ import { act, render, screen } from '@superset-ui/core/spec'; import { renderHook } from '@testing-library/react-hooks'; import { SupersetThemeProvider, useThemeContext } from '../ThemeProvider'; import { ThemeController } from '../ThemeController'; +import { Mock } from 'vitest'; vi.mock('../ThemeController'); -const MockThemeController = ThemeController as vi.MockedClass< +const MockThemeController = ThemeController as Mock< typeof ThemeController >; @@ -58,7 +59,7 @@ const mockDarkTheme = { } as unknown as Theme; const createWrapper = - (controller: vi.Mocked) => + (controller: any) => ({ children }: { children: ReactNode }) => ( {children} @@ -67,8 +68,8 @@ const createWrapper = // eslint-disable-next-line no-restricted-globals -- TODO: Migrate from describe blocks describe('SupersetThemeProvider', () => { - let mockThemeController: vi.Mocked; - let mockOnChangeCallback: vi.Mock; + let mockThemeController: any; + let mockOnChangeCallback: any; beforeEach(() => { mockOnChangeCallback = vi.fn(); @@ -82,9 +83,9 @@ describe('SupersetThemeProvider', () => { canUpdateTheme: vi.fn().mockReturnValue(true), canUpdateMode: vi.fn().mockReturnValue(true), destroy: vi.fn(), - } as unknown as vi.Mocked; + } as unknown as Mock; - mockThemeController.onChange.mockImplementation(callback => { + mockThemeController.onChange.mockImplementation((callback: any) => { mockOnChangeCallback.mockImplementation(callback); return vi.fn(); }); diff --git a/superset-frontend/src/utils/pathUtils.test.ts b/superset-frontend/src/utils/pathUtils.test.ts index 31305880f4f..e0499216b87 100644 --- a/superset-frontend/src/utils/pathUtils.test.ts +++ b/superset-frontend/src/utils/pathUtils.test.ts @@ -172,7 +172,7 @@ const TEL_URL = 'tel:+1234567890'; async function loadPathUtils(appRoot = '') { const bootstrapData = { common: { application_root: appRoot } }; document.body.innerHTML = `
`; - jest.resetModules(); + vi.resetModules(); await import('./getBootstrapData'); return import('./pathUtils'); } diff --git a/superset-frontend/src/views/CRUD/hooks.test.tsx b/superset-frontend/src/views/CRUD/hooks.test.tsx index ce191f6e734..eefcda927cd 100644 --- a/superset-frontend/src/views/CRUD/hooks.test.tsx +++ b/superset-frontend/src/views/CRUD/hooks.test.tsx @@ -559,7 +559,7 @@ test('useFavoriteStatus: saveFaveStar posts when not starred', async () => { vi.spyOn(SupersetClient, 'get').mockResolvedValue({ json: { result: [] }, } as unknown as JsonResponse); - const postSpy = jest + const postSpy = vi .spyOn(SupersetClient, 'post') .mockResolvedValue({} as JsonResponse); @@ -579,7 +579,7 @@ test('useFavoriteStatus: saveFaveStar deletes when already starred', async () => vi.spyOn(SupersetClient, 'get').mockResolvedValue({ json: { result: [] }, } as unknown as JsonResponse); - const deleteSpy = jest + const deleteSpy = vi .spyOn(SupersetClient, 'delete') .mockResolvedValue({} as JsonResponse); @@ -617,7 +617,7 @@ test('useFavoriteStatus: saveFaveStar uses correct endpoint per type', async () vi.spyOn(SupersetClient, 'get').mockResolvedValue({ json: { result: [] }, } as unknown as JsonResponse); - const postSpy = jest + const postSpy = vi .spyOn(SupersetClient, 'post') .mockResolvedValue({} as JsonResponse); diff --git a/superset-frontend/vitest.config.ts b/superset-frontend/vitest.config.ts index 6f76a2df197..eb30f72b921 100644 --- a/superset-frontend/vitest.config.ts +++ b/superset-frontend/vitest.config.ts @@ -35,8 +35,26 @@ export default defineConfig({ }, include: '**/*.svg', }), + { + name: 'geojson-mock-plugin', + // 1. Intercept the resolution of any .geojson file + resolveId(id) { + if (id.endsWith('.geojson')) { + return id; // Return the id to claim responsibility for this file + } + }, + // 2. Provide a virtual mock implementation + load(id) { + if (id.endsWith('.geojson')) { + return 'export default { type: "FeatureCollection", features: [] };'; + } + }, + }, ], test: { + sequence: { + hooks: 'list', + }, globals: true, env: { // Timezone for unit tests diff --git a/superset-websocket/spec/index.test.ts b/superset-websocket/spec/index.test.ts index 1df2b51fe30..5448fc0bd69 100644 --- a/superset-websocket/spec/index.test.ts +++ b/superset-websocket/spec/index.test.ts @@ -42,7 +42,7 @@ const mockRedisXrange = vi.fn() as jest.MockedFunction; jest.mock('ws'); jest.mock('ioredis', () => { - return jest.fn().mockImplementation(() => { + return vi.fn().mockImplementation(() => { return { xrange: mockRedisXrange }; }); });