@things-factory/weather 9.0.0-beta.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/assets/images/wind.png +0 -0
  3. package/client/bootstrap.ts +1 -0
  4. package/client/index.ts +0 -0
  5. package/client/ol-components/webgl-canvas-layer.ts +413 -0
  6. package/client/ol-components/webgl-image-static.ts +174 -0
  7. package/client/ol-components/wind.ts +120 -0
  8. package/client/pages/weather-page.ts +318 -0
  9. package/client/route.ts +7 -0
  10. package/client/tsconfig.json +11 -0
  11. package/config/config.development.js +25 -0
  12. package/config/config.production.js +7 -0
  13. package/data/geo-json/countries-max-geo.json +1 -0
  14. package/dist-client/bootstrap.d.ts +1 -0
  15. package/dist-client/bootstrap.js +2 -0
  16. package/dist-client/bootstrap.js.map +1 -0
  17. package/dist-client/index.d.ts +0 -0
  18. package/dist-client/index.js +2 -0
  19. package/dist-client/index.js.map +1 -0
  20. package/dist-client/ol-components/webgl-canvas-layer.d.ts +61 -0
  21. package/dist-client/ol-components/webgl-canvas-layer.js +364 -0
  22. package/dist-client/ol-components/webgl-canvas-layer.js.map +1 -0
  23. package/dist-client/ol-components/webgl-image-static.d.ts +41 -0
  24. package/dist-client/ol-components/webgl-image-static.js +135 -0
  25. package/dist-client/ol-components/webgl-image-static.js.map +1 -0
  26. package/dist-client/ol-components/wind.d.ts +3 -0
  27. package/dist-client/ol-components/wind.js +104 -0
  28. package/dist-client/ol-components/wind.js.map +1 -0
  29. package/dist-client/pages/weather-page.d.ts +18 -0
  30. package/dist-client/pages/weather-page.js +300 -0
  31. package/dist-client/pages/weather-page.js.map +1 -0
  32. package/dist-client/route.d.ts +1 -0
  33. package/dist-client/route.js +8 -0
  34. package/dist-client/route.js.map +1 -0
  35. package/dist-client/tsconfig.tsbuildinfo +1 -0
  36. package/dist-server/controllers/open-meteo-adapter.d.ts +4 -0
  37. package/dist-server/controllers/open-meteo-adapter.js +83 -0
  38. package/dist-server/controllers/open-meteo-adapter.js.map +1 -0
  39. package/dist-server/controllers/types.d.ts +55 -0
  40. package/dist-server/controllers/types.js +3 -0
  41. package/dist-server/controllers/types.js.map +1 -0
  42. package/dist-server/controllers/weather-controller.d.ts +12 -0
  43. package/dist-server/controllers/weather-controller.js +164 -0
  44. package/dist-server/controllers/weather-controller.js.map +1 -0
  45. package/dist-server/index.d.ts +1 -0
  46. package/dist-server/index.js +4 -0
  47. package/dist-server/index.js.map +1 -0
  48. package/dist-server/routers/geo-router.d.ts +59 -0
  49. package/dist-server/routers/geo-router.js +277 -0
  50. package/dist-server/routers/geo-router.js.map +1 -0
  51. package/dist-server/routers/weather-router.d.ts +1 -0
  52. package/dist-server/routers/weather-router.js +10 -0
  53. package/dist-server/routers/weather-router.js.map +1 -0
  54. package/dist-server/routes.d.ts +1 -0
  55. package/dist-server/routes.js +11 -0
  56. package/dist-server/routes.js.map +1 -0
  57. package/dist-server/services/chrome-renderer.d.ts +13 -0
  58. package/dist-server/services/chrome-renderer.js +137 -0
  59. package/dist-server/services/chrome-renderer.js.map +1 -0
  60. package/dist-server/services/headless-pool.d.ts +4 -0
  61. package/dist-server/services/headless-pool.js +89 -0
  62. package/dist-server/services/headless-pool.js.map +1 -0
  63. package/dist-server/tsconfig.tsbuildinfo +1 -0
  64. package/dist-server/utils/svg-utils.d.ts +35 -0
  65. package/dist-server/utils/svg-utils.js +89 -0
  66. package/dist-server/utils/svg-utils.js.map +1 -0
  67. package/dist-server/utils/tile-utils.d.ts +38 -0
  68. package/dist-server/utils/tile-utils.js +64 -0
  69. package/dist-server/utils/tile-utils.js.map +1 -0
  70. package/package.json +45 -0
  71. package/server/controllers/open-meteo-adapter.ts +91 -0
  72. package/server/controllers/types.ts +63 -0
  73. package/server/controllers/weather-controller.ts +176 -0
  74. package/server/index.ts +1 -0
  75. package/server/routers/geo-router.ts +297 -0
  76. package/server/routers/weather-router.ts +8 -0
  77. package/server/routes.ts +10 -0
  78. package/server/services/chrome-renderer.ts +175 -0
  79. package/server/services/data.json +8438 -0
  80. package/server/services/headless-pool.ts +97 -0
  81. package/server/tsconfig.json +10 -0
  82. package/server/utils/svg-utils.ts +108 -0
  83. package/server/utils/tile-utils.ts +77 -0
  84. package/things-factory.config.js +8 -0
  85. package/translations/en.json +1 -0
  86. package/translations/ja.json +1 -0
  87. package/translations/ko.json +1 -0
  88. package/translations/ms.json +1 -0
  89. package/translations/zh.json +1 -0
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBrowserPool = getBrowserPool;
4
+ const tslib_1 = require("tslib");
5
+ const genericPool = tslib_1.__importStar(require("generic-pool"));
6
+ const env_1 = require("@things-factory/env");
7
+ // puppeteer 모듈 동적 로드 (에러 처리 포함)
8
+ let puppeteer;
9
+ try {
10
+ puppeteer = require('puppeteer');
11
+ }
12
+ catch (err) {
13
+ console.error('Puppeteer 로드 실패:', err);
14
+ }
15
+ // 브라우저 풀 인스턴스
16
+ let browserPool;
17
+ /**
18
+ * 헤드리스 브라우저 풀 가져오기 (싱글톤 패턴)
19
+ */
20
+ function getBrowserPool() {
21
+ if (!browserPool) {
22
+ browserPool = genericPool.createPool({
23
+ // 브라우저 인스턴스 생성
24
+ create() {
25
+ console.log('날씨 서비스용 headless 브라우저 인스턴스 생성');
26
+ return initializeChromium();
27
+ },
28
+ // 브라우저 인스턴스 유효성 검사
29
+ validate(browser) {
30
+ return Promise.race([
31
+ new Promise(res => setTimeout(() => res(false), 1500)),
32
+ browser
33
+ .version()
34
+ .then(_ => true)
35
+ .catch(_ => false)
36
+ ]);
37
+ },
38
+ // 브라우저 인스턴스 파괴
39
+ destroy(browser) {
40
+ return browser.close();
41
+ }
42
+ }, {
43
+ // 풀 설정
44
+ min: 1, // 최소 인스턴스 수
45
+ max: 5, // 최대 인스턴스 수
46
+ testOnBorrow: true,
47
+ acquireTimeoutMillis: 10000,
48
+ idleTimeoutMillis: 30000 // 30초 후 유휴 인스턴스 제거
49
+ });
50
+ // 애플리케이션 종료 시 정리
51
+ process.on('exit', async () => {
52
+ if (browserPool) {
53
+ await browserPool.drain();
54
+ await browserPool.clear();
55
+ }
56
+ });
57
+ }
58
+ return browserPool;
59
+ }
60
+ /**
61
+ * Chromium 초기화
62
+ */
63
+ async function initializeChromium() {
64
+ // puppeteer가 없으면 오류
65
+ if (!puppeteer) {
66
+ throw new Error('Puppeteer is not available');
67
+ }
68
+ // 크로미움 경로 (환경설정에서 가져옴)
69
+ const CHROMIUM_PATH = env_1.config.get('CHROMIUM_PATH');
70
+ // 실행 설정
71
+ const launchSettings = {
72
+ args: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
73
+ headless: 'new' // 'new' = 최신 헤드리스 모드
74
+ };
75
+ // 크로미움 경로가 설정되어 있으면 사용
76
+ if (CHROMIUM_PATH) {
77
+ launchSettings['executablePath'] = CHROMIUM_PATH;
78
+ }
79
+ try {
80
+ // 브라우저 실행
81
+ const browser = await puppeteer.launch(launchSettings);
82
+ return browser;
83
+ }
84
+ catch (err) {
85
+ console.error('크로미움 초기화 실패:', err);
86
+ throw err;
87
+ }
88
+ }
89
+ //# sourceMappingURL=headless-pool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"headless-pool.js","sourceRoot":"","sources":["../../server/services/headless-pool.ts"],"names":[],"mappings":";;AAiBA,wCA8CC;;AA/DD,kEAA2C;AAC3C,6CAA4C;AAE5C,gCAAgC;AAChC,IAAI,SAAS,CAAA;AACb,IAAI,CAAC;IACH,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;AAClC,CAAC;AAAC,OAAO,GAAG,EAAE,CAAC;IACb,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAA;AACxC,CAAC;AAED,cAAc;AACd,IAAI,WAAW,CAAA;AAEf;;GAEG;AACH,SAAgB,cAAc;IAC5B,IAAI,CA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AK,CAAC,4BAA4B,CAAC,CAAA;IAC/C,CAAC;IAED,uBAAuB;IACvB,MAAM,aAAa,GAAG,YAAM,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;IAEjD,QAAQ;IACR,MAAM,cAAc,GAAG;QACrB,IAAI,EAAE,CAAC,mBAAmB,EAAE,cAAc,EAAE,cAAc,EAAE,0BAA0B,EAAE,yBAAyB,CAAC;QAClH,QAAQ,EAAE,KAAK,CAAC,qBAAqB;KACtC,CAAA;IAED,uBAAuB;IACvB,IAAI,aAAa,EAAE,CAAC;QAClB,cAAc,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAA;IAClD,CAAC;IAED,IAAI,CAAC;QACH,UAAU;QACV,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;QACtD,OAAO,OAAO,CAAA;IAChB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAA;QAClC,MAAM,GAAG,CAAA;IACX,CAAC;AACH,CAAC","sourcesContent":["import * as genericPool from 'generic-pool'\nimport { config } from '@things-factory/env'\n\n// puppeteer 모듈 동적 로드 (에러 처리 포함)\nlet puppeteer\ntry {\n puppeteer = require('puppeteer')\n} catch (err) {\n console.error('Puppeteer 로드 실패:', err)\n}\n\n// 브라우저 풀 인스턴스\nlet browserPool\n\n/**\n * 헤드리스 브라우저 풀 가져오기 (싱글톤 패턴)\n */\nexport function getBrowserPool() {\n if (!browserPool) {\n browserPool = genericPool.createPool(\n {\n // 브라우저 인스턴스 생성\n create() {\n console.log('날씨 서비스용 headless 브라우저 인스턴스 생성')\n return initializeChromium()\n },\n\n // 브라우저 인스턴스 유효성 검사\n validate(browser) {\n return Promise.race([\n new Promise(res => setTimeout(() => res(false), 1500)),\n browser\n .version()\n .then(_ => true)\n .catch(_ => false)\n ])\n },\n\n // 브라우저 인스턴스 파괴\n destroy(browser) {\n return browser.close()\n }\n },\n {\n // 풀 설정\n min: 1, // 최소 인스턴스 수\n max: 5, // 최대 인스턴스 수\n testOnBorrow: true,\n acquireTimeoutMillis: 10000,\n idleTimeoutMillis: 30000 // 30초 후 유휴 인스턴스 제거\n }\n )\n\n // 애플리케이션 종료 시 정리\n process.on('exit', async () => {\n if (browserPool) {\n await browserPool.drain()\n await browserPool.clear()\n }\n })\n }\n\n return browserPool\n}\n\n/**\n * Chromium 초기화\n */\nasync function initializeChromium() {\n // puppeteer가 없으면 오류\n if (!puppeteer) {\n throw new Error('Puppeteer is not available')\n }\n\n // 크로미움 경로 (환경설정에서 가져옴)\n const CHROMIUM_PATH = config.get('CHROMIUM_PATH')\n\n // 실행 설정\n const launchSettings = {\n args: ['--hide-scrollbars', '--mute-audio', '--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],\n headless: 'new' // 'new' = 최신 헤드리스 모드\n }\n\n // 크로미움 경로가 설정되어 있으면 사용\n if (CHROMIUM_PATH) {\n launchSettings['executablePath'] = CHROMIUM_PATH\n }\n\n try {\n // 브라우저 실행\n const browser = await puppeteer.launch(launchSettings)\n return browser\n } catch (err) {\n console.error('크로미움 초기화 실패:', err)\n throw err\n }\n}\n"]}
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/tslib/tslib.d.ts","../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../node_modules/@types/node/compatibility/index.d.ts","../../../node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/undici-types/header.d.ts","../../../node_modules/undici-types/readable.d.ts","../../../node_modules/undici-types/file.d.ts","../../../node_modules/undici-types/fetch.d.ts","../../../node_modules/undici-types/formdata.d.ts","../../../node_modules/undici-types/connector.d.ts","../../../node_modules/undici-types/client.d.ts","../../../node_modules/undici-types/errors.d.ts","../../../node_modules/undici-types/dispatcher.d.ts","../../../node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/undici-types/global-origin.d.ts","../../../node_modules/undici-types/pool-stats.d.ts","../../../node_modules/undici-types/pool.d.ts","../../../node_modules/undici-types/handlers.d.ts","../../../node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/undici-types/agent.d.ts","../../../node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/undici-types/mock-agent.d.ts","../../../node_modules/undici-types/mock-client.d.ts","../../../node_modules/undici-types/mock-pool.d.ts","../../../node_modules/undici-types/mock-errors.d.ts","../../../node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/undici-types/retry-handler.d.ts","../../../node_modules/undici-types/retry-agent.d.ts","../../../node_modules/undici-types/api.d.ts","../../../node_modules/undici-types/interceptors.d.ts","../../../node_modules/undici-types/util.d.ts","../../../node_modules/undici-types/cookies.d.ts","../../../node_modules/undici-types/patch.d.ts","../../../node_modules/undici-types/websocket.d.ts","../../../node_modules/undici-types/eventsource.d.ts","../../../node_modules/undici-types/filereader.d.ts","../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/undici-types/content-type.d.ts","../../../node_modules/undici-types/cache.d.ts","../../../node_modules/undici-types/index.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/readline/promises.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/sea.d.ts","../../../node_modules/@types/node/sqlite.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/index.d.ts","../../../node_modules/generic-pool/index.d.ts","../../env/lib/dependency-graph.d.ts","../../env/lib/dependency-order.d.ts","../../env/lib/scene-modules.d.ts","../../env/lib/operato-modules.d.ts","../../env/lib/config.d.ts","../../../node_modules/@types/triple-beam/index.d.ts","../../../node_modules/logform/index.d.ts","../../../node_modules/winston-transport/index.d.ts","../../../node_modules/winston/lib/winston/config/index.d.ts","../../../node_modules/winston/lib/winston/transports/index.d.ts","../../../node_modules/winston/index.d.ts","../../../node_modules/winston-daily-rotate-file/index.d.ts","../../env/lib/logger.d.ts","../../env/lib/module-loader.d.ts","../../env/lib/app-root-path.d.ts","../../env/lib/app-package.d.ts","../../env/lib/index.d.ts","../server/services/headless-pool.ts","../../cache-service/dist-server/service/cache-store/cache-store.d.ts","../../cache-service/dist-server/service/index.d.ts","../../cache-service/dist-server/controllers/types.d.ts","../../cache-service/dist-server/controllers/cache-service.d.ts","../../cache-service/dist-server/index.d.ts","../server/controllers/types.ts","../server/controllers/open-meteo-adapter.ts","../server/services/chrome-renderer.ts","../server/controllers/weather-controller.ts","../server/routers/weather-router.ts","../server/routers/geo-router.ts","../server/routes.ts","../server/index.ts","../server/utils/svg-utils.ts","../server/utils/tile-utils.ts","../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../node_modules/@jest/schemas/build/index.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/expect/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts"],"fileIdsList":[[54,97],[54,97,184],[54,97,186,189],[54,94,97],[54,96,97],[97],[54,97,102,132],[54,97,98,103,109,110,117,129,140],[54,97,98,99,109,117],[49,50,51,54,97],[54,97,100,141],[54,97,101,102,110,118],[54,97,102,129,137],[54,97,103,105,109,117],[54,96,97,104],[54,97,105,106],[54,97,109],[54,97,107,109],[54,96,97,109],[54,97,109,110,111,129,140],[54,97,109,110,111,124,129,132],[54,92,97,145],[54,92,97,105,109,112,117,129,140],[54,97,109,110,112,113,117,129,137,140],[54,97,112,114,129,137,140],[52,53,54,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146],[54,97,109,115],[54,97,116,140],[54,97,105,109,117,129],[54,97,118],[54,97,119],[54,96,97,120],[54,94,95,96,97,98,99,100,101,102,103,104,105,106,107,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146],[54,97,122],[54,97,123],[54,97,109,124,125],[54,97,124,126,141,143],[54,97,109,129,130,132],[54,97,129,131],[54,97,129,130],[54,97,132],[54,97,133],[54,94,97,129],[54,97,109,135,136],[54,97,135,136],[54,97,102,117,129,137],[54,97,138],[54,97,117,139],[54,97,112,123,140],[54,97,102,141],[54,97,129,142],[54,97,116,143],[54,97,144],[54,97,102,109,111,120,129,140,143,145],[54,97,129,146],[54,97,182,188],[54,97,109,147],[54,97,186],[54,97,183,187],[54,97,154],[54,97,185],[54,64,68,97,140],[54,64,97,129,140],[54,59,97],[54,61,64,97,137,140],[54,97,117,137],[54,97,147],[54,59,97,147],[54,61,64,97,117,140],[54,56,57,60,63,97,109,129,140],[54,64,71,97],[54,56,62,97],[54,64,85,86,97],[54,60,64,97,132,140,147],[54,85,97,147],[54,58,59,97,147],[54,64,97],[54,58,59,60,61,62,63,64,65,66,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,86,87,88,89,90,91,97],[54,64,79,97],[54,64,71,72,97],[54,62,64,72,73,97],[54,63,97],[54,56,59,64,97],[54,64,68,72,73,97],[54,68,97],[54,62,64,67,97,140],[54,56,61,64,71,97],[54,97,129],[54,59,64,85,97,145,147],[54,97,156,158],[54,97,129,147,155],[54,97,129,147,155,156,157,158],[54,97,112,147,156],[54,97,169],[54,97,168,170],[54,97,167],[54,97,149,150,151,152,153,161,162,163,164],[54,97,159,160],[48,54,97,172],[48,54,97],[48,54,97,165,171,172,173,174],[48,54,97,178],[48,54,97,98,110,119,141,165],[48,54,97,175],[48,54,97,166,176,177],[48,54,97,166],[48,54,97,148,165]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"030e350db2525514580ed054f712ffb22d273e6bc7eddc1bb7eda1e0ba5d395e","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"8fa51737611c21ba3a5ac02c4e1535741d58bec67c9bdf94b1837a31c97a2263","affectsGlobalScope":true,"impliedFormat":1},{"version":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"d2bc987ae352271d0d615a420dcf98cc886aa16b87fb2b569358c1fe0ca0773d","affectsGlobalScope":true,"impliedFormat":1},{"version":"4f0539c58717cbc8b73acb29f9e992ab5ff20adba5f9b57130691c7f9b186a4d","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"76103716ba397bbb61f9fa9c9090dca59f39f9047cb1352b2179c5d8e7f4e8d0","impliedFormat":1},{"version":"f9677e434b7a3b14f0a9367f9dfa1227dfe3ee661792d0085523c3191ae6a1a4","affectsGlobalScope":true,"impliedFormat":1},{"version":"4314c7a11517e221f7296b46547dbc4df047115b182f544d072bdccffa57fc72","impliedFormat":1},{"version":"115971d64632ea4742b5b115fb64ed04bcaae2c3c342f13d9ba7e3f9ee39c4e7","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"9057f224b79846e3a95baf6dad2c8103278de2b0c5eebda23fc8188171ad2398","affectsGlobalScope":true,"impliedFormat":1},{"version":"19d5f8d3930e9f99aa2c36258bf95abbe5adf7e889e6181872d1cdba7c9a7dd5","impliedFormat":1},{"version":"e6f5a38687bebe43a4cef426b69d34373ef68be9a6b1538ec0a371e69f309354","impliedFormat":1},{"version":"a6bf63d17324010ca1fbf0389cab83f93389bb0b9a01dc8a346d092f65b3605f","impliedFormat":1},{"version":"e009777bef4b023a999b2e5b9a136ff2cde37dc3f77c744a02840f05b18be8ff","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true,"impliedFormat":1},{"version":"88bc59b32d0d5b4e5d9632ac38edea23454057e643684c3c0b94511296f2998c","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ff5a53a58e756d2661b73ba60ffe274231a4432d21f7a2d0d9e4f6aa99f4283","impliedFormat":1},{"version":"1e289f30a48126935a5d408a91129a13a59c9b0f8c007a816f9f16ef821e144e","impliedFormat":1},{"version":"2ea254f944dfe131df1264d1fb96e4b1f7d110195b21f1f5dbb68fdd394e5518","impliedFormat":1},{"version":"5135bdd72cc05a8192bd2e92f0914d7fc43ee077d1293dc622a049b7035a0afb","impliedFormat":1},{"version":"4f80de3a11c0d2f1329a72e92c7416b2f7eab14f67e92cac63bb4e8d01c6edc8","impliedFormat":1},{"version":"6d386bc0d7f3afa1d401afc3e00ed6b09205a354a9795196caed937494a713e6","impliedFormat":1},{"version":"f579f267a2f4c2278cca2ec84613e95059368b503ce96586972d304e5e40125b","affectsGlobalScope":true,"impliedFormat":1},{"version":"23459c1915878a7c1e86e8bdb9c187cddd3aea105b8b1dfce512f093c969bc7e","impliedFormat":1},{"version":"b1b6ee0d012aeebe11d776a155d8979730440082797695fc8e2a5c326285678f","impliedFormat":1},{"version":"45875bcae57270aeb3ebc73a5e3fb4c7b9d91d6b045f107c1d8513c28ece71c0","impliedFormat":1},{"version":"1dc73f8854e5c4506131c4d95b3a6c24d0c80336d3758e95110f4c7b5cb16397","affectsGlobalScope":true,"impliedFormat":1},{"version":"5f6f1d54779d0b9ed152b0516b0958cd34889764c1190434bbf18e7a8bb884cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"c6b4e0a02545304935ecbf7de7a8e056a31bb50939b5b321c9d50a405b5a0bba","impliedFormat":1},{"version":"fab29e6d649aa074a6b91e3bdf2bff484934a46067f6ee97a30fcd9762ae2213","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"e1120271ebbc9952fdc7b2dd3e145560e52e06956345e6fdf91d70ca4886464f","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"f7b1df115dbd1b8522cba4f404a9f4fdcd5169e2137129187ffeee9d287e4fd1","impliedFormat":1},{"version":"c878f74b6d10b267f6075c51ac1d8becd15b4aa6a58f79c0cfe3b24908357f60","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","impliedFormat":1},{"version":"fbf68fc8057932b1c30107ebc37420f8d8dc4bef1253c4c2f9e141886c0df5ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2754d8221d77c7b382096651925eb476f1066b3348da4b73fe71ced7801edada","impliedFormat":1},{"version":"993985beef40c7d113f6dd8f0ba26eed63028b691fbfeb6a5b63f26408dd2c6d","affectsGlobalScope":true,"impliedFormat":1},{"version":"bef91efa0baea5d0e0f0f27b574a8bc100ce62a6d7e70220a0d58af6acab5e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"282fd2a1268a25345b830497b4b7bf5037a5e04f6a9c44c840cb605e19fea841","impliedFormat":1},{"version":"5360a27d3ebca11b224d7d3e38e3e2c63f8290cb1fcf6c3610401898f8e68bc3","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"7d6ff413e198d25639f9f01f16673e7df4e4bd2875a42455afd4ecc02ef156da","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb094bb347d7df3380299eb69836c2c8758626ecf45917577707c03cf816b6f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"f689c4237b70ae6be5f0e4180e8833f34ace40529d1acc0676ab8fb8f70457d7","impliedFormat":1},{"version":"b02784111b3fc9c38590cd4339ff8718f9329a6f4d3fd66e9744a1dcd1d7e191","impliedFormat":1},{"version":"ac5ed35e649cdd8143131964336ab9076937fa91802ec760b3ea63b59175c10a","impliedFormat":1},{"version":"52a8e7e8a1454b6d1b5ad428efae3870ffc56f2c02d923467f2940c454aa9aec","affectsGlobalScope":true,"impliedFormat":1},{"version":"78dc0513cc4f1642906b74dda42146bcbd9df7401717d6e89ea6d72d12ecb539","impliedFormat":1},{"version":"ad90122e1cb599b3bc06a11710eb5489101be678f2920f2322b0ac3e195af78d","impliedFormat":1},{"version":"f025c51bcc3c7dacbedb4b9a398815f4d5c6f4c645db40880cee4ac6f89588de","impliedFormat":1},"61da60198d58f00210a34b39a0625a136ae63d7cf42500e764b91b2e5e2dbdcb","4c11afc0bcf5ad4cb8351103476e6e8076ad11f563ae65a94a14b94d158d046a","2ffaa1f7886d57fe801bd41337521c661ee17d657d1004e504d5422f62cfd23c","738433a0f2e73b2ba4ebbcaa6487030e0b8aa64e65813a160e1b845e20338d9c","972608570a8b1d91ef22149c069a5c29d75d00b4131e2697ea6d42302d3548b9",{"version":"908217c4f2244ec402b73533ebfcc46d6dcd34fc1c807ff403d7f98702abb3bc","impliedFormat":1},{"version":"1bc5991c91bf4be8b59db501ed284a34945d95abe9b7451d02ea001f7c5621a9","impliedFormat":1},{"version":"d8b8a5a6bf623239d5374ad4a7ff6f3b195ab5ee61293f59f1957e90d2a22809","impliedFormat":1},{"version":"35d283eca7dc0a0c7b099f5fbbf0678b87f3d837572cd5e539ba297ad9837e68","impliedFormat":1},{"version":"1c8384a195a2d931cf6e2b8f656acf558ca649a3f74922d86b95889f49a7f7c5","impliedFormat":1},{"version":"cd11655f57a3558dfcee05a6e78c026f9dfd30535eaf124439c5e88a5617359b","impliedFormat":1},{"version":"83a328cba2f47fc5a948eac394ae2ef2a5a0d26dd366ab373d2c2178bbdcd36c","impliedFormat":1},"2aafbaf6ace811133c4858f9184a6597866fbccb89eb6f1b9c4247e87d0bbfed","2a3c89ad1f603f3f0358499abf18332d30a4d34bb8070f23d5aa9e948cce3998","9e795af82140c310a86279c6f0079d8de3b4db03b4d9476267aa8703a9b7d7a7","46a0b34e1264c4d25ca6646ff0e6cfaa7275ea1ae5a6bc23d4dfd84edf2f2b2e","3dd00310a80b51f37de6c082119f40fdf820dce9410739658e6fa76eceadcaa0",{"version":"abeb98f9c33e1aa2f9e02485eda40de17e9a97230072109e96db1e92b9963b93","signature":"c7f308c98232b1db980cd30e47863d2c3ea0f5aa5be81ff12a3d10442ad9d9f7"},"cf27a60556daaea6b9d1d27168308f8a128880d8485851e22eb9f0c74b5da5dd","2ca9fb9328f97e06648279e69dada7c0543954567c7b6e9db53b30e785c5347c","5f3dcc311154776306a5c0eacd2155e8c6f7e535c03ef0b8357a3aa2d776f227","58ca4e75a54fdc39de06adff9084fe7734d956271cd5d4bed84726cf1efb56a3","63201ccadeea78aa45cab1e7bebccfa0b1ada7d961cbaa4f1a92af02ccfec77d",{"version":"d529a01a206d6a2397631eea0cf3454a35689f0eba1fae0821fe2fb28517ae3a","signature":"adc339cfac8f9b4e03f1436b1fdb29c6e291e719152d44f1b3a9b030d63505c1"},{"version":"488b1a03be05027c5e6b3df5f17da8f7f2651db7ce5df4a09c463655a589a1fe","signature":"edb860f972a326c5a15e28eb3606cda33fa628b63c8d5b92564070d409f0bc06"},{"version":"45202aa204fe3f0154100fa284c0b3960d45ccefb325f9d66c349f13726901da","signature":"397f949f93d23ebdd7f931b402870ac1fad7aaee26b3957f40a5bd739b699fe1"},{"version":"8577b1b8f6c2f5c8600216a5381dc8d76272d3e4ea51d724adebcaebdf61c476","signature":"5076845b7f976db2dd6c181620be3f63da5694d338a4a479e546abf670ea9155"},{"version":"0662ce577e896532102a21e6ed36c80fa41cd278405663e4d840e69e698f35fd","signature":"0cc0d21737c850957c564e38cf710bd59d9b015be2fce1ac9c4a6da8445e805b"},{"version":"32b6c43fffef936e49a7699393494860bf47b4e948db4de7552381ade0c4bca1","signature":"288b7d82945b9e05f8fd19807bfd58022a0b6c9b9bd001cdcd4758a5fef39832"},{"version":"3ca4b5241ab98292b46b14d6a6d0a45cc4e0201a55293d4b8a297c7389351743","signature":"8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881"},{"version":"f6144c943d1c134761f023d01b4737c6c1ddfdd4cac7ee13a0a64832473a66e1","signature":"50f956761821f6e8ca08bedf53b7ff35f307f6683d7c1c45bd45d9d7cf8e1856"},{"version":"0801e7f2e384cddc91022c5986738f6ad0f9ee27c638ce82d7281709f1281bb2","signature":"a05339ad4a2e5dc5cb11fea434eb6b2bc13a31a4008e0dddb655301e775cf926"},{"version":"7094f4136e5c2f71feeb4726b5a98468a6cd774cdb11e51d9ecde9d44d85d302","signature":"814c0d27a1cecf0f6cdc01ab233a9b351c52017d123c6db4d97dfd5f26822093"},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"c085e9aa62d1ae1375794c1fb927a445fa105fed891a7e24edbb1c3300f7384a","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1}],"root":[166,[172,181]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":1,"noEmitOnError":true,"noImplicitAny":false,"outDir":"./","skipLibCheck":true,"sourceMap":true,"strict":false,"target":4,"useDefineForClassFields":false},"referencedMap":[[182,1],[185,2],[184,1],[190,3],[94,4],[95,4],[96,5],[54,6],[97,7],[98,8],[99,9],[49,1],[52,10],[50,1],[51,1],[100,11],[101,12],[102,13],[103,14],[104,15],[105,16],[106,16],[108,17],[107,18],[109,19],[110,20],[111,21],[93,22],[53,1],[112,23],[113,24],[114,25],[147,26],[115,27],[116,28],[117,29],[118,30],[119,31],[120,32],[121,33],[122,34],[123,35],[124,36],[125,36],[126,37],[127,1],[128,1],[129,38],[131,39],[130,40],[132,41],[133,42],[134,43],[135,44],[136,45],[137,46],[138,47],[139,48],[140,49],[141,50],[142,51],[143,52],[144,53],[145,54],[146,55],[154,1],[55,1],[183,1],[189,56],[148,57],[187,58],[188,59],[155,60],[186,61],[48,1],[46,1],[47,1],[8,1],[9,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[20,1],[21,1],[4,1],[22,1],[26,1],[23,1],[24,1],[25,1],[27,1],[28,1],[29,1],[5,1],[30,1],[31,1],[32,1],[33,1],[6,1],[37,1],[34,1],[35,1],[36,1],[38,1],[7,1],[39,1],[44,1],[45,1],[40,1],[41,1],[42,1],[43,1],[1,1],[71,62],[81,63],[70,62],[91,64],[62,65],[61,66],[90,67],[84,68],[89,69],[64,70],[78,71],[63,72],[87,73],[59,74],[58,67],[88,75],[60,76],[65,77],[66,1],[69,77],[56,1],[92,78],[82,79],[73,80],[74,81],[76,82],[72,83],[75,84],[85,67],[67,85],[68,86],[77,87],[57,88],[80,79],[79,77],[83,1],[86,89],[160,90],[156,91],[159,92],[157,67],[158,93],[170,94],[169,1],[171,95],[167,1],[168,96],[164,1],[163,1],[153,1],[149,1],[150,1],[165,97],[161,98],[162,1],[152,1],[151,1],[173,99],[172,100],[175,101],[179,102],[177,103],[176,104],[178,105],[174,106],[166,107],[180,100],[181,100]],"version":"5.8.2"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * SVG 생성 유틸리티 함수
3
+ */
4
+ /**
5
+ * SVG 시작 태그 생성
6
+ */
7
+ export declare function createSvgStart(width?: number, height?: number): string;
8
+ /**
9
+ * SVG 종료 태그 생성
10
+ */
11
+ export declare function createSvgEnd(): string;
12
+ /**
13
+ * SVG 그라데이션 정의 생성
14
+ */
15
+ export declare function createSvgDefs(gradients: Array<{
16
+ id: string;
17
+ color: string;
18
+ opacity?: number;
19
+ }>): string;
20
+ /**
21
+ * SVG 원 요소 생성
22
+ */
23
+ export declare function createSvgCircle(cx: number, cy: number, radius: number, fill: string, opacity?: number): string;
24
+ /**
25
+ * SVG 라인 요소 생성
26
+ */
27
+ export declare function createSvgLine(x1: number, y1: number, x2: number, y2: number, stroke: string, strokeWidth?: number, opacity?: number): string;
28
+ /**
29
+ * SVG 화살표 생성 (바람 방향 표시용)
30
+ */
31
+ export declare function createSvgArrow(x: number, y: number, angle: number, length: number, color: string, strokeWidth?: number, opacity?: number): string;
32
+ /**
33
+ * 날씨 타일용 SVG 생성
34
+ */
35
+ export declare function createWeatherTileSvg(width: number, height: number, elements: string[]): string;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ /**
3
+ * SVG 생성 유틸리티 함수
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createSvgStart = createSvgStart;
7
+ exports.createSvgEnd = createSvgEnd;
8
+ exports.createSvgDefs = createSvgDefs;
9
+ exports.createSvgCircle = createSvgCircle;
10
+ exports.createSvgLine = createSvgLine;
11
+ exports.createSvgArrow = createSvgArrow;
12
+ exports.createWeatherTileSvg = createWeatherTileSvg;
13
+ /**
14
+ * SVG 시작 태그 생성
15
+ */
16
+ function createSvgStart(width = 256, height = 256) {
17
+ return `<svg width="${width}" height="${height}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">`;
18
+ }
19
+ /**
20
+ * SVG 종료 태그 생성
21
+ */
22
+ function createSvgEnd() {
23
+ return '</svg>';
24
+ }
25
+ /**
26
+ * SVG 그라데이션 정의 생성
27
+ */
28
+ function createSvgDefs(gradients) {
29
+ let defs = '<defs>';
30
+ gradients.forEach(gradient => {
31
+ const opacity = gradient.opacity !== undefined ? gradient.opacity : 0.8;
32
+ defs += `
33
+ <radialGradient id="${gradient.id}" cx="50%" cy="50%" r="50%" fx="50%" fy="50%">
34
+ <stop offset="0%" style="stop-color:${gradient.color}; stop-opacity:${opacity}" />
35
+ <stop offset="100%" style="stop-color:${gradient.color}; stop-opacity:0" />
36
+ </radialGradient>`;
37
+ });
38
+ defs += '</defs>';
39
+ return defs;
40
+ }
41
+ /**
42
+ * SVG 원 요소 생성
43
+ */
44
+ function createSvgCircle(cx, cy, radius, fill, opacity) {
45
+ const opacityAttr = opacity !== undefined ? ` opacity="${opacity}"` : '';
46
+ return `<circle cx="${cx}" cy="${cy}" r="${radius}" fill="${fill}"${opacityAttr} />`;
47
+ }
48
+ /**
49
+ * SVG 라인 요소 생성
50
+ */
51
+ function createSvgLine(x1, y1, x2, y2, stroke, strokeWidth = 1, opacity) {
52
+ const opacityAttr = opacity !== undefined ? ` opacity="${opacity}"` : '';
53
+ return `<line x1="${x1}" y1="${y1}" x2="${x2}" y2="${y2}" stroke="${stroke}" stroke-width="${strokeWidth}"${opacityAttr} />`;
54
+ }
55
+ /**
56
+ * SVG 화살표 생성 (바람 방향 표시용)
57
+ */
58
+ function createSvgArrow(x, y, angle, length, color, strokeWidth = 1, opacity) {
59
+ const opacityAttr = opacity !== undefined ? ` opacity="${opacity}"` : '';
60
+ // 라디안으로 변환
61
+ const rad = (angle * Math.PI) / 180;
62
+ // 화살표 끝점 계산
63
+ const endX = x + length * Math.cos(rad);
64
+ const endY = y + length * Math.sin(rad);
65
+ // 화살표 머리 계산 (각도에서 30도 틀어진 두 지점)
66
+ const headSize = length * 0.25;
67
+ const head1X = endX - headSize * Math.cos(rad + Math.PI / 6);
68
+ const head1Y = endY - headSize * Math.sin(rad + Math.PI / 6);
69
+ const head2X = endX - headSize * Math.cos(rad - Math.PI / 6);
70
+ const head2Y = endY - headSize * Math.sin(rad - Math.PI / 6);
71
+ return `
72
+ <g${opacityAttr}>
73
+ <line x1="${x}" y1="${y}" x2="${endX}" y2="${endY}" stroke="${color}" stroke-width="${strokeWidth}" />
74
+ <line x1="${endX}" y1="${endY}" x2="${head1X}" y2="${head1Y}" stroke="${color}" stroke-width="${strokeWidth}" />
75
+ <line x1="${endX}" y1="${endY}" x2="${head2X}" y2="${head2Y}" stroke="${color}" stroke-width="${strokeWidth}" />
76
+ </g>
77
+ `;
78
+ }
79
+ /**
80
+ * 날씨 타일용 SVG 생성
81
+ */
82
+ function createWeatherTileSvg(width, height, elements) {
83
+ return `
84
+ ${createSvgStart(width, height)}
85
+ ${elements.join('\n')}
86
+ ${createSvgEnd()}
87
+ `;
88
+ }
89
+ //# sourceMappingURL=svg-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svg-utils.js","sourceRoot":"","sources":["../../server/utils/svg-utils.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAKH,wCAEC;AAKD,oCAEC;AAKD,sCAcC;AAKD,0CAGC;AAKD,sCAWC;AAKD,wCAgCC;AAKD,oDAMC;AAvGD;;GAEG;AACH,SAAgB,cAAc,CAAC,QAAgB,GAAG,EAAE,SAAiB,GAAG;IACtE,OAAO,eAAe,KAAK,aAAa,MAAM,kFAAkF,CAAA;AAClI,CAAC;AAED;;GAEG;AACH,SAAgB,YAAY;IAC1B,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,SA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AACH,SAAgB,oBAAoB,CAAC,KAAa,EAAE,MAAc,EAAE,QAAkB;IACpF,OAAO;MACH,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC;MAC7B,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;MACnB,YAAY,EAAE;GACjB,CAAA;AACH,CAAC","sourcesContent":["/**\n * SVG 생성 유틸리티 함수\n */\n\n/**\n * SVG 시작 태그 생성\n */\nexport function createSvgStart(width: number = 256, height: number = 256): string {\n return `<svg width=\"${width}\" height=\"${height}\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">`\n}\n\n/**\n * SVG 종료 태그 생성\n */\nexport function createSvgEnd(): string {\n return '</svg>'\n}\n\n/**\n * SVG 그라데이션 정의 생성\n */\nexport function createSvgDefs(gradients: Array<{ id: string; color: string; opacity?: number }>): string {\n let defs = '<defs>'\n\n gradients.forEach(gradient => {\n const opacity = gradient.opacity !== undefined ? gradient.opacity : 0.8\n defs += `\n <radialGradient id=\"${gradient.id}\" cx=\"50%\" cy=\"50%\" r=\"50%\" fx=\"50%\" fy=\"50%\">\n <stop offset=\"0%\" style=\"stop-color:${gradient.color}; stop-opacity:${opacity}\" />\n <stop offset=\"100%\" style=\"stop-color:${gradient.color}; stop-opacity:0\" />\n </radialGradient>`\n })\n\n defs += '</defs>'\n return defs\n}\n\n/**\n * SVG 원 요소 생성\n */\nexport function createSvgCircle(cx: number, cy: number, radius: number, fill: string, opacity?: number): string {\n const opacityAttr = opacity !== undefined ? ` opacity=\"${opacity}\"` : ''\n return `<circle cx=\"${cx}\" cy=\"${cy}\" r=\"${radius}\" fill=\"${fill}\"${opacityAttr} />`\n}\n\n/**\n * SVG 라인 요소 생성\n */\nexport function createSvgLine(\n x1: number,\n y1: number,\n x2: number,\n y2: number,\n stroke: string,\n strokeWidth: number = 1,\n opacity?: number\n): string {\n const opacityAttr = opacity !== undefined ? ` opacity=\"${opacity}\"` : ''\n return `<line x1=\"${x1}\" y1=\"${y1}\" x2=\"${x2}\" y2=\"${y2}\" stroke=\"${stroke}\" stroke-width=\"${strokeWidth}\"${opacityAttr} />`\n}\n\n/**\n * SVG 화살표 생성 (바람 방향 표시용)\n */\nexport function createSvgArrow(\n x: number,\n y: number,\n angle: number,\n length: number,\n color: string,\n strokeWidth: number = 1,\n opacity?: number\n): string {\n const opacityAttr = opacity !== undefined ? ` opacity=\"${opacity}\"` : ''\n\n // 라디안으로 변환\n const rad = (angle * Math.PI) / 180\n\n // 화살표 끝점 계산\n const endX = x + length * Math.cos(rad)\n const endY = y + length * Math.sin(rad)\n\n // 화살표 머리 계산 (각도에서 30도 틀어진 두 지점)\n const headSize = length * 0.25\n const head1X = endX - headSize * Math.cos(rad + Math.PI / 6)\n const head1Y = endY - headSize * Math.sin(rad + Math.PI / 6)\n const head2X = endX - headSize * Math.cos(rad - Math.PI / 6)\n const head2Y = endY - headSize * Math.sin(rad - Math.PI / 6)\n\n return `\n <g${opacityAttr}>\n <line x1=\"${x}\" y1=\"${y}\" x2=\"${endX}\" y2=\"${endY}\" stroke=\"${color}\" stroke-width=\"${strokeWidth}\" />\n <line x1=\"${endX}\" y1=\"${endY}\" x2=\"${head1X}\" y2=\"${head1Y}\" stroke=\"${color}\" stroke-width=\"${strokeWidth}\" />\n <line x1=\"${endX}\" y1=\"${endY}\" x2=\"${head2X}\" y2=\"${head2Y}\" stroke=\"${color}\" stroke-width=\"${strokeWidth}\" />\n </g>\n `\n}\n\n/**\n * 날씨 타일용 SVG 생성\n */\nexport function createWeatherTileSvg(width: number, height: number, elements: string[]): string {\n return `\n ${createSvgStart(width, height)}\n ${elements.join('\\n')}\n ${createSvgEnd()}\n `\n}\n"]}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * 타일 좌표 관련 유틸리티 함수
3
+ */
4
+ export interface TileBounds {
5
+ west: number;
6
+ south: number;
7
+ east: number;
8
+ north: number;
9
+ }
10
+ /**
11
+ * 타일 좌표를 위경도 범위로 변환
12
+ */
13
+ export declare function getTileBounds(z: number, x: number, y: number): TileBounds;
14
+ /**
15
+ * 위경도를 타일 좌표로 변환
16
+ */
17
+ export declare function latLonToTile(lat: number, lon: number, zoom: number): {
18
+ x: number;
19
+ y: number;
20
+ };
21
+ /**
22
+ * 픽셀 좌표를 위경도로 변환
23
+ */
24
+ export declare function pixelToLatLon(x: number, y: number, z: number): {
25
+ lat: number;
26
+ lon: number;
27
+ };
28
+ /**
29
+ * 위경도를 픽셀 좌표로 변환
30
+ */
31
+ export declare function latLonToPixel(lat: number, lon: number, z: number): {
32
+ x: number;
33
+ y: number;
34
+ };
35
+ /**
36
+ * 두 위경도 사이의 거리 계산 (Haversine 공식)
37
+ */
38
+ export declare function getDistance(lat1: number, lon1: number, lat2: number, lon2: number): number;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /**
3
+ * 타일 좌표 관련 유틸리티 함수
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getTileBounds = getTileBounds;
7
+ exports.latLonToTile = latLonToTile;
8
+ exports.pixelToLatLon = pixelToLatLon;
9
+ exports.latLonToPixel = latLonToPixel;
10
+ exports.getDistance = getDistance;
11
+ /**
12
+ * 타일 좌표를 위경도 범위로 변환
13
+ */
14
+ function getTileBounds(z, x, y) {
15
+ const n = Math.pow(2, z);
16
+ const west = (x / n) * 360 - 180;
17
+ const east = ((x + 1) / n) * 360 - 180;
18
+ const north = Math.atan(Math.sinh(Math.PI * (1 - (2 * y) / n))) * (180 / Math.PI);
19
+ const south = Math.atan(Math.sinh(Math.PI * (1 - (2 * (y + 1)) / n))) * (180 / Math.PI);
20
+ return { west, south, east, north };
21
+ }
22
+ /**
23
+ * 위경도를 타일 좌표로 변환
24
+ */
25
+ function latLonToTile(lat, lon, zoom) {
26
+ const latRad = (lat * Math.PI) / 180;
27
+ const n = Math.pow(2, zoom);
28
+ const x = Math.floor(((lon + 180) / 360) * n);
29
+ const y = Math.floor(((1 - Math.log(Math.tan(latRad) + 1 / Math.cos(latRad)) / Math.PI) / 2) * n);
30
+ return { x, y };
31
+ }
32
+ /**
33
+ * 픽셀 좌표를 위경도로 변환
34
+ */
35
+ function pixelToLatLon(x, y, z) {
36
+ const size = Math.pow(2, z) * 256;
37
+ const lon = (x / size) * 360 - 180;
38
+ const n = Math.PI - (2 * Math.PI * y) / size;
39
+ const lat = (180 / Math.PI) * Math.atan(0.5 * (Math.exp(n) - Math.exp(-n)));
40
+ return { lat, lon };
41
+ }
42
+ /**
43
+ * 위경도를 픽셀 좌표로 변환
44
+ */
45
+ function latLonToPixel(lat, lon, z) {
46
+ const size = Math.pow(2, z) * 256;
47
+ const x = ((lon + 180) / 360) * size;
48
+ const latRad = (lat * Math.PI) / 180;
49
+ const y = ((1 - Math.log(Math.tan(latRad) + 1 / Math.cos(latRad)) / Math.PI) / 2) * size;
50
+ return { x, y };
51
+ }
52
+ /**
53
+ * 두 위경도 사이의 거리 계산 (Haversine 공식)
54
+ */
55
+ function getDistance(lat1, lon1, lat2, lon2) {
56
+ const R = 6371; // 지구 반경 (km)
57
+ const dLat = (lat2 - lat1) * (Math.PI / 180);
58
+ const dLon = (lon2 - lon1) * (Math.PI / 180);
59
+ const a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
60
+ Math.cos(lat1 * (Math.PI / 180)) * Math.cos(lat2 * (Math.PI / 180)) * Math.sin(dLon / 2) * Math.sin(dLon / 2);
61
+ const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
62
+ return R * c;
63
+ }
64
+ //# sourceMappingURL=tile-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tile-utils.js","sourceRoot":"","sources":["../../server/utils/tile-utils.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAYH,sCAQC;AAKD,oCAOC;AAKD,sCAQC;AAKD,sCAQC;AAKD,kCAWC;AAjED;;GAEG;AACH,SAAgB,aAAa,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IAC3D,MAAM,CAAC,GAAG,IAAI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;IACxD,OAAO,CAAC,GAAG,CAAC,CAAA;AACd,CAAC","sourcesContent":["/**\n * 타일 좌표 관련 유틸리티 함수\n */\n\nexport interface TileBounds {\n west: number\n south: number\n east: number\n north: number\n}\n\n/**\n * 타일 좌표를 위경도 범위로 변환\n */\nexport function getTileBounds(z: number, x: number, y: number): TileBounds {\n const n = Math.pow(2, z)\n const west = (x / n) * 360 - 180\n const east = ((x + 1) / n) * 360 - 180\n const north = Math.atan(Math.sinh(Math.PI * (1 - (2 * y) / n))) * (180 / Math.PI)\n const south = Math.atan(Math.sinh(Math.PI * (1 - (2 * (y + 1)) / n))) * (180 / Math.PI)\n\n return { west, south, east, north }\n}\n\n/**\n * 위경도를 타일 좌표로 변환\n */\nexport function latLonToTile(lat: number, lon: number, zoom: number): { x: number; y: number } {\n const latRad = (lat * Math.PI) / 180\n const n = Math.pow(2, zoom)\n const x = Math.floor(((lon + 180) / 360) * n)\n const y = Math.floor(((1 - Math.log(Math.tan(latRad) + 1 / Math.cos(latRad)) / Math.PI) / 2) * n)\n\n return { x, y }\n}\n\n/**\n * 픽셀 좌표를 위경도로 변환\n */\nexport function pixelToLatLon(x: number, y: number, z: number): { lat: number; lon: number } {\n const size = Math.pow(2, z) * 256\n const lon = (x / size) * 360 - 180\n\n const n = Math.PI - (2 * Math.PI * y) / size\n const lat = (180 / Math.PI) * Math.atan(0.5 * (Math.exp(n) - Math.exp(-n)))\n\n return { lat, lon }\n}\n\n/**\n * 위경도를 픽셀 좌표로 변환\n */\nexport function latLonToPixel(lat: number, lon: number, z: number): { x: number; y: number } {\n const size = Math.pow(2, z) * 256\n const x = ((lon + 180) / 360) * size\n\n const latRad = (lat * Math.PI) / 180\n const y = ((1 - Math.log(Math.tan(latRad) + 1 / Math.cos(latRad)) / Math.PI) / 2) * size\n\n return { x, y }\n}\n\n/**\n * 두 위경도 사이의 거리 계산 (Haversine 공식)\n */\nexport function getDistance(lat1: number, lon1: number, lat2: number, lon2: number): number {\n const R = 6371 // 지구 반경 (km)\n const dLat = (lat2 - lat1) * (Math.PI / 180)\n const dLon = (lon2 - lon1) * (Math.PI / 180)\n\n const a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(lat1 * (Math.PI / 180)) * Math.cos(lat2 * (Math.PI / 180)) * Math.sin(dLon / 2) * Math.sin(dLon / 2)\n\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a))\n return R * c\n}\n"]}
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@things-factory/weather",
3
+ "version": "9.0.0-beta.41",
4
+ "main": "dist-server/index.js",
5
+ "browser": "dist-client/index.js",
6
+ "things-factory": true,
7
+ "license": "MIT",
8
+ "author": "heartyoh <heartyoh@hatiolab.com>",
9
+ "description": "A module for weather service",
10
+ "publishConfig": {
11
+ "access": "public",
12
+ "@things-factory:registry": "https://registry.npmjs.org"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/hatiolab/things-factory.git",
17
+ "directory": "packages/weather"
18
+ },
19
+ "scripts": {
20
+ "build": "npm run build:server && npm run build:client",
21
+ "copy:files": "copyfiles -e \"./client/**/*.{ts,js,json}\" -u 1 \"./client/**/*\" dist-client",
22
+ "build:client": "npm run copy:files && npx tsc --p ./client/tsconfig.json",
23
+ "build:server": "npx tsc --p ./server/tsconfig.json",
24
+ "clean:client": "npx rimraf dist-client",
25
+ "clean:server": "npx rimraf dist-server",
26
+ "clean": "npm run clean:server && npm run clean:client",
27
+ "migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
28
+ },
29
+ "dependencies": {
30
+ "@mapbox/mbtiles": "^0.12.1",
31
+ "@operato/graphql": "^9.0.0-beta",
32
+ "@operato/shell": "^9.0.0-beta",
33
+ "@things-factory/auth-base": "^9.0.0-beta.38",
34
+ "@things-factory/cache-service": "^9.0.0-beta.38",
35
+ "@things-factory/env": "^9.0.0-beta.38",
36
+ "@things-factory/shell": "^9.0.0-beta.38",
37
+ "colormap": "^2.3.2",
38
+ "ol": "^10.4.0",
39
+ "puppeteer": "^23.0.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/colormap": "^2.3.4"
43
+ },
44
+ "gitHead": "aeb3bbc9d7d8281cc9a7f7cdf8a989c8a672e1b8"
45
+ }
@@ -0,0 +1,91 @@
1
+ import { WeatherService, WeatherData, WeatherAround, Location } from './types.js'
2
+
3
+ const baseUrl = 'https://api.open-meteo.com/v1/forecast'
4
+
5
+ export async function getWeatherByLocation(location: Location): Promise<WeatherData> {
6
+ const url = `${baseUrl}?latitude=${location.latitude}&longitude=${location.longitude}&current=temperature_2m,windspeed_10m,cloudcover,relative_humidity_2m,shortwave_radiation&timezone=UTC`
7
+
8
+ const response = await fetch(url)
9
+ if (!response.ok) throw new Error(`OpenMeteo API request failed: ${response.status}`)
10
+
11
+ const data = await response.json()
12
+
13
+ return {
14
+ location,
15
+ temperature: { current: data.current.temperature_2m, unit: '°C' },
16
+ wind: { speed: data.current.windspeed_10m, unit: 'm/s', direction: null },
17
+ humidity: data.current.relative_humidity_2m,
18
+ cloudCoverage: data.current.cloudcover,
19
+ solarRadiation: data.current.shortwave_radiation,
20
+ weatherDescription: 'N/A',
21
+ timestamp: new Date().toISOString()
22
+ }
23
+ }
24
+
25
+ export async function getWeatherAroundLocation(location: Location, radius: number): Promise<WeatherAround> {
26
+ // 그리드 크기를 도 단위로 명확히 정의
27
+ const gridSizeDegrees = 0.2 // 약 22km (적도 기준)
28
+
29
+ // Open-Meteo API는 grid 파라미터에 도 단위 사용
30
+ const url = `${baseUrl}?latitude=${location.latitude}&longitude=${location.longitude}&grid=${gridSizeDegrees}&hourly=temperature_2m,windspeed_10m,wind_direction_10m,cloudcover,relative_humidity_2m,shortwave_radiation&timezone=UTC`
31
+
32
+ const response = await fetch(url)
33
+ if (!response.ok) throw new Error(`OpenMeteo API request failed: ${response.status}`)
34
+
35
+ const data = await response.json()
36
+ const weatherPoints = []
37
+
38
+ // 2D 격자 구성 (API 응답에서 grid_latitude와 grid_longitude 배열 사용)
39
+ const latitudes = data.grid_latitude || [location.latitude]
40
+ const longitudes = data.grid_longitude || [location.longitude]
41
+
42
+ // 2차원 그리드 구성
43
+ for (let latIndex = 0; latIndex < latitudes.length; latIndex++) {
44
+ for (let lonIndex = 0; lonIndex < longitudes.length; lonIndex++) {
45
+ const pointIndex = latIndex * longitudes.length + lonIndex
46
+
47
+ // 데이터 포인트가 있는 경우만 추가
48
+ if (data.hourly.temperature_2m[pointIndex] !== undefined) {
49
+ weatherPoints.push({
50
+ location: {
51
+ latitude: latitudes[latIndex],
52
+ longitude: longitudes[lonIndex]
53
+ },
54
+ temperature: {
55
+ current: data.hourly.temperature_2m[pointIndex],
56
+ unit: '°C'
57
+ },
58
+ wind: {
59
+ speed: data.hourly.windspeed_10m[pointIndex],
60
+ unit: 'm/s',
61
+ direction: data.hourly.wind_direction_10m[pointIndex]
62
+ },
63
+ humidity: data.hourly.relative_humidity_2m[pointIndex],
64
+ cloudCoverage: data.hourly.cloudcover[pointIndex],
65
+ solarRadiation: data.hourly.shortwave_radiation[pointIndex],
66
+ weatherDescription: 'N/A',
67
+ timestamp: new Date().toISOString()
68
+ })
69
+ }
70
+ }
71
+ }
72
+
73
+ return { center: location, radius, weatherPoints }
74
+ }
75
+
76
+ export async function getGlobalWeatherData(gridResolution: number = 10): Promise<WeatherAround[]> {
77
+ const globalWeatherData: WeatherAround[] = []
78
+
79
+ for (let lat = -90; lat <= 90; lat += gridResolution) {
80
+ for (let lon = -180; lon <= 180; lon += gridResolution) {
81
+ try {
82
+ const regionWeather = await getWeatherAroundLocation({ latitude: lat, longitude: lon }, gridResolution)
83
+ globalWeatherData.push(regionWeather)
84
+ } catch (error) {
85
+ console.error(`Failed to fetch weather for (${lat}, ${lon}):`, error)
86
+ }
87
+ }
88
+ }
89
+
90
+ return globalWeatherData
91
+ }