uomtiles 0.1.2 → 0.1.3

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 (303) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/7KYNy7kZ.js +1 -0
  3. package/.output/public/_nuxt/7Rgc2iDI2.js +1 -0
  4. package/.output/public/_nuxt/BA52uD81.js +1 -0
  5. package/.output/public/_nuxt/{CU486JdV2.js → BHSn2vP72.js} +2 -2
  6. package/.output/public/_nuxt/BRsHq3Fz2.js +1 -0
  7. package/.output/public/_nuxt/Bh2Uv1S7.js +1 -0
  8. package/.output/public/_nuxt/BiRI-vq-.js +1 -0
  9. package/.output/public/_nuxt/Bpc1HTfh.js +1 -0
  10. package/.output/public/_nuxt/C-b4mqsD.js +1 -0
  11. package/.output/public/_nuxt/C5Y76DD6.js +1 -0
  12. package/.output/public/_nuxt/CD84FXNW.js +1 -0
  13. package/.output/public/_nuxt/CGkIG2vL2.js +1 -0
  14. package/.output/public/_nuxt/CM9IbYJz.js +1 -0
  15. package/.output/public/_nuxt/CUJ4QmLF.js +1 -0
  16. package/.output/public/_nuxt/CUQ3MZqI.js +1 -0
  17. package/.output/public/_nuxt/CVwoxklV.js +1 -0
  18. package/.output/public/_nuxt/CeHZqNQ0.js +1 -0
  19. package/.output/public/_nuxt/CkfS_Wbu.js +3 -0
  20. package/.output/public/_nuxt/CoPjdBwX.js +1 -0
  21. package/.output/public/_nuxt/CxkDmpVY.js +1 -0
  22. package/.output/public/_nuxt/CzRdWh7s2.js +1 -0
  23. package/.output/public/_nuxt/D-IOtyQX.js +1 -0
  24. package/.output/public/_nuxt/D3Us7gX72.js +1 -0
  25. package/.output/public/_nuxt/{DaQqwE3R.js → D8GHPYwQ.js} +44 -44
  26. package/.output/public/_nuxt/DLIy3f3M.js +1 -0
  27. package/.output/public/_nuxt/{CovBj6WN.js → DQ8r1OSk.js} +1 -1
  28. package/.output/public/_nuxt/D_9SjQFe.js +1 -0
  29. package/.output/public/_nuxt/D_Ggu6R_2.js +1 -0
  30. package/.output/public/_nuxt/{Q79ec-Ro.js → DnVJUY7B.js} +1 -1
  31. package/.output/public/_nuxt/{Bd1EvHmY.js → DuGgjt-h2.js} +1 -1
  32. package/.output/public/_nuxt/GEOST6As.js +1 -0
  33. package/.output/public/_nuxt/{DpIPeY5m.js → GqgcWtrL.js} +1 -1
  34. package/.output/public/_nuxt/{0hm88Oke.js → Hbp_Okvs.js} +1 -1
  35. package/.output/public/_nuxt/JdUwgqKv.js +1 -0
  36. package/.output/public/_nuxt/KttxEAyP2.js +1 -0
  37. package/.output/public/_nuxt/L0GXeO1Y2.js +1 -0
  38. package/.output/public/_nuxt/builds/latest.json +1 -1
  39. package/.output/public/_nuxt/builds/meta/ad8f3148-5aa4-4a0f-8e7a-e55147c5de1a.json +1 -0
  40. package/.output/public/_nuxt/entry.U-KS0GEu.css +1 -0
  41. package/.output/public/_nuxt/sMWyPZfC2.js +1 -0
  42. package/.output/public/_nuxt/zUWhKXtw2.js +1 -0
  43. package/.output/server/chunks/_/antigravity-nfz.mjs +629 -0
  44. package/.output/server/chunks/_/antigravity-nfz.mjs.map +1 -0
  45. package/.output/server/chunks/_/config.mjs +1 -1
  46. package/.output/server/chunks/_/file-workspace.mjs +1 -1
  47. package/.output/server/chunks/_/map-layer-update-manager.mjs +770 -0
  48. package/.output/server/chunks/_/map-layer-update-manager.mjs.map +1 -0
  49. package/.output/server/chunks/_/map-service.mjs +1 -1
  50. package/.output/server/chunks/_/uom-auth.mjs +1 -1
  51. package/.output/server/chunks/build/{CompletedTaskSelect-CKTpyHS3.mjs → CompletedTaskSelect-Ba03kTs9.mjs} +6 -7
  52. package/.output/server/chunks/build/{CompletedTaskSelect-CKTpyHS3.mjs.map → CompletedTaskSelect-Ba03kTs9.mjs.map} +1 -1
  53. package/.output/server/chunks/build/{Empty-BGIn09cL.mjs → Empty-CKvANuoV.mjs} +4 -103
  54. package/.output/server/chunks/build/Empty-CKvANuoV.mjs.map +1 -0
  55. package/.output/server/chunks/build/{FormField-DnJWfrKE.mjs → FormField-BJHVyy1m.mjs} +4 -35
  56. package/.output/server/chunks/build/FormField-BJHVyy1m.mjs.map +1 -0
  57. package/.output/server/chunks/build/{Input-AdlINKtJ.mjs → Input-DnAric-z.mjs} +1 -1
  58. package/.output/server/chunks/build/{Input-AdlINKtJ.mjs.map → Input-DnAric-z.mjs.map} +1 -1
  59. package/.output/server/chunks/build/MapLayerControl-DpNmYvcU.mjs +5720 -0
  60. package/.output/server/chunks/build/MapLayerControl-DpNmYvcU.mjs.map +1 -0
  61. package/.output/server/chunks/build/{Modal-CozaqIp1.mjs → Modal-BLhN9Eg2.mjs} +4 -18
  62. package/.output/server/chunks/build/{Modal-CozaqIp1.mjs.map → Modal-BLhN9Eg2.mjs.map} +1 -1
  63. package/.output/server/chunks/build/{OnlineMap-cFSicmkV.mjs → OnlineMap-B-sCfHkC.mjs} +6 -3
  64. package/.output/server/chunks/build/OnlineMap-B-sCfHkC.mjs.map +1 -0
  65. package/.output/server/chunks/build/{Pagination-GvNCxmOW.mjs → Pagination-CUzoLc_-.mjs} +1 -1
  66. package/.output/server/chunks/build/{Pagination-GvNCxmOW.mjs.map → Pagination-CUzoLc_-.mjs.map} +1 -1
  67. package/.output/server/chunks/build/Skeleton-CHp-GjOx.mjs +59 -0
  68. package/.output/server/chunks/build/Skeleton-CHp-GjOx.mjs.map +1 -0
  69. package/.output/server/chunks/build/{Slider-zQx1c7hB.mjs → Slider-CrIUK3pl.mjs} +5 -5
  70. package/.output/server/chunks/build/{Slider-zQx1c7hB.mjs.map → Slider-CrIUK3pl.mjs.map} +1 -1
  71. package/.output/server/chunks/build/{MapBaseLayerTabs-CRl5Zwlr.mjs → Tabs-cdLsZZoL.mjs} +429 -931
  72. package/.output/server/chunks/build/Tabs-cdLsZZoL.mjs.map +1 -0
  73. package/.output/server/chunks/build/{Tooltip-DNUdH4oF.mjs → Tooltip-DExIlyhu.mjs} +4 -195
  74. package/.output/server/chunks/build/Tooltip-DExIlyhu.mjs.map +1 -0
  75. package/.output/server/chunks/build/{advanced-5ZGMUBqC.mjs → advanced-DaSpS8Px.mjs} +31 -34
  76. package/.output/server/chunks/build/advanced-DaSpS8Px.mjs.map +1 -0
  77. package/.output/server/chunks/build/{compare-CtgF4Anj.mjs → compare-DaE10Dhp.mjs} +56 -37
  78. package/.output/server/chunks/build/compare-DaE10Dhp.mjs.map +1 -0
  79. package/.output/server/chunks/build/cookie-CziAmOf1.mjs +175 -0
  80. package/.output/server/chunks/build/cookie-CziAmOf1.mjs.map +1 -0
  81. package/.output/server/chunks/build/{dashboard-GneN-WPG.mjs → dashboard-Dq8mphss.mjs} +12 -6
  82. package/.output/server/chunks/build/{dashboard-GneN-WPG.mjs.map → dashboard-Dq8mphss.mjs.map} +1 -1
  83. package/.output/server/chunks/build/{details-CgufnL1d.mjs → details-DCNvSBgn.mjs} +5 -4
  84. package/.output/server/chunks/build/{details-CgufnL1d.mjs.map → details-DCNvSBgn.mjs.map} +1 -1
  85. package/.output/server/chunks/build/error-404-D9aQjJRn.mjs +1 -1
  86. package/.output/server/chunks/build/error-500-BNyA3wrb.mjs +1 -1
  87. package/.output/server/chunks/build/file-workspace-DMzPuPyG.mjs +104 -0
  88. package/.output/server/chunks/build/file-workspace-DMzPuPyG.mjs.map +1 -0
  89. package/.output/server/chunks/build/{interval-9B2MrM2e.mjs → interval-i5OZnTaK.mjs} +2 -2
  90. package/.output/server/chunks/build/{interval-9B2MrM2e.mjs.map → interval-i5OZnTaK.mjs.map} +1 -1
  91. package/.output/server/chunks/build/layers-50nqoWES.mjs +553 -0
  92. package/.output/server/chunks/build/layers-50nqoWES.mjs.map +1 -0
  93. package/.output/server/chunks/build/{login-Cf5EiCE4.mjs → login-BHSHtO-R.mjs} +6 -5
  94. package/.output/server/chunks/build/{login-Cf5EiCE4.mjs.map → login-BHSHtO-R.mjs.map} +1 -1
  95. package/.output/server/chunks/build/map-layers-C3HJoCLw.mjs +86 -0
  96. package/.output/server/chunks/build/map-layers-C3HJoCLw.mjs.map +1 -0
  97. package/.output/server/chunks/build/{DashboardSidebarToggle-CUI9NSow.mjs → overlay-BS4_B29H.mjs} +411 -4
  98. package/.output/server/chunks/build/overlay-BS4_B29H.mjs.map +1 -0
  99. package/.output/server/chunks/build/pages-5yYRS5nX.mjs +37 -0
  100. package/.output/server/chunks/build/pages-5yYRS5nX.mjs.map +1 -0
  101. package/.output/server/chunks/build/{pages-0c5sp_lv.mjs → pages-DfOPr0fC.mjs} +21 -21
  102. package/.output/server/chunks/build/pages-DfOPr0fC.mjs.map +1 -0
  103. package/.output/server/chunks/build/{services-BB49kSpd.mjs → services-DWlDpsbi.mjs} +45 -41
  104. package/.output/server/chunks/build/{services-BB49kSpd.mjs.map → services-DWlDpsbi.mjs.map} +1 -1
  105. package/.output/server/chunks/build/{tasks-BRcMLuRW.mjs → tasks-4b6D39Uy.mjs} +44 -100
  106. package/.output/server/chunks/build/{tasks-BRcMLuRW.mjs.map → tasks-4b6D39Uy.mjs.map} +1 -1
  107. package/.output/server/chunks/build/{tasks-Aa8PwjVL.mjs → tasks-BPPx2UMG.mjs} +10 -6
  108. package/.output/server/chunks/build/tasks-BPPx2UMG.mjs.map +1 -0
  109. package/.output/server/chunks/nitro/nitro.mjs +303 -244
  110. package/.output/server/chunks/routes/api/map/layers/_overlayLayer/update.get.mjs +29 -0
  111. package/.output/server/chunks/routes/api/map/layers/_overlayLayer/update.get.mjs.map +1 -0
  112. package/.output/server/chunks/routes/api/map/layers/_overlayLayer/update.post.mjs +31 -0
  113. package/.output/server/chunks/routes/api/map/layers/_overlayLayer/update.post.mjs.map +1 -0
  114. package/.output/server/chunks/routes/api/map/layers/_overlayLayer_.get.mjs +39 -0
  115. package/.output/server/chunks/routes/api/map/layers/_overlayLayer_.get.mjs.map +1 -0
  116. package/.output/server/chunks/routes/api/map/layers/status.get.mjs +60 -0
  117. package/.output/server/chunks/routes/api/map/layers/status.get.mjs.map +1 -0
  118. package/.output/server/chunks/routes/api/map/live/status.get.mjs +1 -1
  119. package/.output/server/chunks/routes/api/map/online/_layerGroup/_zoom/_tileX/_tileY_.get.mjs +1 -1
  120. package/.output/server/chunks/routes/api/map/online-root/_layerGroup/_rootX/_rootY_.get.mjs +1 -1
  121. package/.output/server/chunks/routes/api/workspace/_filename/analysis.get.mjs +1 -1
  122. package/.output/server/chunks/routes/api/workspace/_filename/download.get.mjs +1 -1
  123. package/.output/server/chunks/routes/api/workspace/_filename/export/_format_.get.mjs +1 -1
  124. package/.output/server/chunks/routes/api/workspace/_filename/export-estimate.get.mjs +1 -1
  125. package/.output/server/chunks/routes/api/workspace/_filename/tile.get.mjs +1 -1
  126. package/.output/server/chunks/routes/api/workspace/_filename/tiles.get.mjs +1 -1
  127. package/.output/server/chunks/routes/api/workspace/_filename_.delete.mjs +1 -1
  128. package/.output/server/chunks/routes/api/workspace/compare/batch.get.mjs +1 -1
  129. package/.output/server/chunks/routes/api/workspace/files.post.mjs +1 -1
  130. package/.output/server/chunks/routes/api/workspace/stop.post.mjs +1 -1
  131. package/.output/server/chunks/routes/api/workspace/tasks.post.mjs +2 -2
  132. package/.output/server/chunks/routes/renderer.mjs +3 -3
  133. package/.output/server/chunks/routes/services/wms.get.mjs +1 -1
  134. package/.output/server/chunks/routes/services/wmts.get.mjs +1 -1
  135. package/.output/server/chunks/virtual/entry.mjs +320 -443
  136. package/.output/server/chunks/virtual/entry.mjs.map +1 -1
  137. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  138. package/.output/server/chunks/virtual/styles.mjs +1 -1
  139. package/.output/server/node_modules/undici/index.js +234 -0
  140. package/.output/server/node_modules/undici/lib/api/abort-signal.js +59 -0
  141. package/.output/server/node_modules/undici/lib/api/api-connect.js +110 -0
  142. package/.output/server/node_modules/undici/lib/api/api-pipeline.js +252 -0
  143. package/.output/server/node_modules/undici/lib/api/api-request.js +214 -0
  144. package/.output/server/node_modules/undici/lib/api/api-stream.js +209 -0
  145. package/.output/server/node_modules/undici/lib/api/api-upgrade.js +111 -0
  146. package/.output/server/node_modules/undici/lib/api/index.js +7 -0
  147. package/.output/server/node_modules/undici/lib/api/readable.js +580 -0
  148. package/.output/server/node_modules/undici/lib/cache/memory-cache-store.js +279 -0
  149. package/.output/server/node_modules/undici/lib/cache/sqlite-cache-store.js +467 -0
  150. package/.output/server/node_modules/undici/lib/core/connect.js +153 -0
  151. package/.output/server/node_modules/undici/lib/core/constants.js +143 -0
  152. package/.output/server/node_modules/undici/lib/core/diagnostics.js +227 -0
  153. package/.output/server/node_modules/undici/lib/core/errors.js +477 -0
  154. package/.output/server/node_modules/undici/lib/core/request.js +464 -0
  155. package/.output/server/node_modules/undici/lib/core/socks5-client.js +422 -0
  156. package/.output/server/node_modules/undici/lib/core/socks5-utils.js +212 -0
  157. package/.output/server/node_modules/undici/lib/core/symbols.js +75 -0
  158. package/.output/server/node_modules/undici/lib/core/tree.js +160 -0
  159. package/.output/server/node_modules/undici/lib/core/util.js +992 -0
  160. package/.output/server/node_modules/undici/lib/dispatcher/agent.js +158 -0
  161. package/.output/server/node_modules/undici/lib/dispatcher/balanced-pool.js +219 -0
  162. package/.output/server/node_modules/undici/lib/dispatcher/client-h1.js +1731 -0
  163. package/.output/server/node_modules/undici/lib/dispatcher/client-h2.js +995 -0
  164. package/.output/server/node_modules/undici/lib/dispatcher/client.js +664 -0
  165. package/.output/server/node_modules/undici/lib/dispatcher/dispatcher-base.js +184 -0
  166. package/.output/server/node_modules/undici/lib/dispatcher/dispatcher.js +48 -0
  167. package/.output/server/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +146 -0
  168. package/.output/server/node_modules/undici/lib/dispatcher/fixed-queue.js +135 -0
  169. package/.output/server/node_modules/undici/lib/dispatcher/h2c-client.js +51 -0
  170. package/.output/server/node_modules/undici/lib/dispatcher/pool-base.js +214 -0
  171. package/.output/server/node_modules/undici/lib/dispatcher/pool.js +118 -0
  172. package/.output/server/node_modules/undici/lib/dispatcher/proxy-agent.js +319 -0
  173. package/.output/server/node_modules/undici/lib/dispatcher/retry-agent.js +35 -0
  174. package/.output/server/node_modules/undici/lib/dispatcher/round-robin-pool.js +137 -0
  175. package/.output/server/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +260 -0
  176. package/.output/server/node_modules/undici/lib/encoding/index.js +33 -0
  177. package/.output/server/node_modules/undici/lib/global.js +59 -0
  178. package/.output/server/node_modules/undici/lib/handler/cache-handler.js +760 -0
  179. package/.output/server/node_modules/undici/lib/handler/cache-revalidation-handler.js +124 -0
  180. package/.output/server/node_modules/undici/lib/handler/decorator-handler.js +67 -0
  181. package/.output/server/node_modules/undici/lib/handler/deduplication-handler.js +460 -0
  182. package/.output/server/node_modules/undici/lib/handler/redirect-handler.js +238 -0
  183. package/.output/server/node_modules/undici/lib/handler/retry-handler.js +418 -0
  184. package/.output/server/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
  185. package/.output/server/node_modules/undici/lib/handler/wrap-handler.js +105 -0
  186. package/.output/server/node_modules/undici/lib/interceptor/cache.js +602 -0
  187. package/.output/server/node_modules/undici/lib/interceptor/decompress.js +259 -0
  188. package/.output/server/node_modules/undici/lib/interceptor/deduplicate.js +117 -0
  189. package/.output/server/node_modules/undici/lib/interceptor/dns.js +571 -0
  190. package/.output/server/node_modules/undici/lib/interceptor/dump.js +112 -0
  191. package/.output/server/node_modules/undici/lib/interceptor/redirect.js +21 -0
  192. package/.output/server/node_modules/undici/lib/interceptor/response-error.js +95 -0
  193. package/.output/server/node_modules/undici/lib/interceptor/retry.js +19 -0
  194. package/.output/server/node_modules/undici/lib/llhttp/constants.js +531 -0
  195. package/.output/server/node_modules/undici/lib/llhttp/llhttp-wasm.js +15 -0
  196. package/.output/server/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +15 -0
  197. package/.output/server/node_modules/undici/lib/llhttp/utils.js +12 -0
  198. package/.output/server/node_modules/undici/lib/mock/mock-agent.js +232 -0
  199. package/.output/server/node_modules/undici/lib/mock/mock-call-history.js +248 -0
  200. package/.output/server/node_modules/undici/lib/mock/mock-client.js +68 -0
  201. package/.output/server/node_modules/undici/lib/mock/mock-errors.js +29 -0
  202. package/.output/server/node_modules/undici/lib/mock/mock-interceptor.js +209 -0
  203. package/.output/server/node_modules/undici/lib/mock/mock-pool.js +68 -0
  204. package/.output/server/node_modules/undici/lib/mock/mock-symbols.js +32 -0
  205. package/.output/server/node_modules/undici/lib/mock/mock-utils.js +486 -0
  206. package/.output/server/node_modules/undici/lib/mock/pending-interceptors-formatter.js +43 -0
  207. package/.output/server/node_modules/undici/lib/mock/snapshot-agent.js +353 -0
  208. package/.output/server/node_modules/undici/lib/mock/snapshot-recorder.js +588 -0
  209. package/.output/server/node_modules/undici/lib/mock/snapshot-utils.js +158 -0
  210. package/.output/server/node_modules/undici/lib/util/cache.js +676 -0
  211. package/.output/server/node_modules/undici/lib/util/date.js +670 -0
  212. package/.output/server/node_modules/undici/lib/util/promise.js +28 -0
  213. package/.output/server/node_modules/undici/lib/util/runtime-features.js +124 -0
  214. package/.output/server/node_modules/undici/lib/util/stats.js +32 -0
  215. package/.output/server/node_modules/undici/lib/util/timers.js +425 -0
  216. package/.output/server/node_modules/undici/lib/web/cache/cache.js +864 -0
  217. package/.output/server/node_modules/undici/lib/web/cache/cachestorage.js +152 -0
  218. package/.output/server/node_modules/undici/lib/web/cache/util.js +45 -0
  219. package/.output/server/node_modules/undici/lib/web/cookies/constants.js +12 -0
  220. package/.output/server/node_modules/undici/lib/web/cookies/index.js +199 -0
  221. package/.output/server/node_modules/undici/lib/web/cookies/parse.js +314 -0
  222. package/.output/server/node_modules/undici/lib/web/cookies/util.js +352 -0
  223. package/.output/server/node_modules/undici/lib/web/eventsource/eventsource-stream.js +399 -0
  224. package/.output/server/node_modules/undici/lib/web/eventsource/eventsource.js +501 -0
  225. package/.output/server/node_modules/undici/lib/web/eventsource/util.js +29 -0
  226. package/.output/server/node_modules/undici/lib/web/fetch/body.js +509 -0
  227. package/.output/server/node_modules/undici/lib/web/fetch/constants.js +131 -0
  228. package/.output/server/node_modules/undici/lib/web/fetch/data-url.js +596 -0
  229. package/.output/server/node_modules/undici/lib/web/fetch/formdata-parser.js +586 -0
  230. package/.output/server/node_modules/undici/lib/web/fetch/formdata.js +259 -0
  231. package/.output/server/node_modules/undici/lib/web/fetch/global.js +40 -0
  232. package/.output/server/node_modules/undici/lib/web/fetch/headers.js +719 -0
  233. package/.output/server/node_modules/undici/lib/web/fetch/index.js +2413 -0
  234. package/.output/server/node_modules/undici/lib/web/fetch/request.js +1115 -0
  235. package/.output/server/node_modules/undici/lib/web/fetch/response.js +641 -0
  236. package/.output/server/node_modules/undici/lib/web/fetch/util.js +1522 -0
  237. package/.output/server/node_modules/undici/lib/web/infra/index.js +229 -0
  238. package/.output/server/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +307 -0
  239. package/.output/server/node_modules/undici/lib/web/webidl/index.js +1006 -0
  240. package/.output/server/node_modules/undici/lib/web/websocket/connection.js +329 -0
  241. package/.output/server/node_modules/undici/lib/web/websocket/constants.js +126 -0
  242. package/.output/server/node_modules/undici/lib/web/websocket/events.js +331 -0
  243. package/.output/server/node_modules/undici/lib/web/websocket/frame.js +133 -0
  244. package/.output/server/node_modules/undici/lib/web/websocket/permessage-deflate.js +100 -0
  245. package/.output/server/node_modules/undici/lib/web/websocket/receiver.js +507 -0
  246. package/.output/server/node_modules/undici/lib/web/websocket/sender.js +109 -0
  247. package/.output/server/node_modules/undici/lib/web/websocket/stream/websocketerror.js +104 -0
  248. package/.output/server/node_modules/undici/lib/web/websocket/stream/websocketstream.js +498 -0
  249. package/.output/server/node_modules/undici/lib/web/websocket/util.js +347 -0
  250. package/.output/server/node_modules/undici/lib/web/websocket/websocket.js +758 -0
  251. package/.output/server/node_modules/undici/package.json +152 -0
  252. package/.output/server/package.json +2 -1
  253. package/LICENSE +201 -2
  254. package/README.md +17 -4
  255. package/dist/package.json +3 -2
  256. package/dist/shared/antigravity-schema.js +45 -0
  257. package/dist/shared/dji-grid.js +62 -0
  258. package/dist/shared/types/map-layers.js +2 -0
  259. package/dist/src/cli.js +63 -5
  260. package/dist/src/core/dji-snapshot.js +135 -0
  261. package/dist/src/core/map-layer-paths.js +11 -0
  262. package/dist/src/map-layer-update.js +646 -0
  263. package/package.json +3 -2
  264. package/.output/public/_nuxt/BNfSclJ4.js +0 -1
  265. package/.output/public/_nuxt/BYzlinOr2.js +0 -1
  266. package/.output/public/_nuxt/Be4dNlar.js +0 -1
  267. package/.output/public/_nuxt/C7fHMLd7.js +0 -1
  268. package/.output/public/_nuxt/CNs_Ozdc.js +0 -1
  269. package/.output/public/_nuxt/CQ8inUdm.js +0 -1
  270. package/.output/public/_nuxt/Cc_JfSB1.js +0 -1
  271. package/.output/public/_nuxt/CyZDc0eO2.js +0 -1
  272. package/.output/public/_nuxt/CzFefJH0.js +0 -1
  273. package/.output/public/_nuxt/D-t0hXHB.js +0 -1
  274. package/.output/public/_nuxt/D3Pl7yw22.js +0 -1
  275. package/.output/public/_nuxt/D4gbGuiW.js +0 -1
  276. package/.output/public/_nuxt/DDp9lK3g.js +0 -1
  277. package/.output/public/_nuxt/DIIXHC50.js +0 -1
  278. package/.output/public/_nuxt/DWFUvzz0.js +0 -1
  279. package/.output/public/_nuxt/D_VoD6-f.js +0 -1
  280. package/.output/public/_nuxt/DfXX-x_z.js +0 -1
  281. package/.output/public/_nuxt/Dgyf2aNY.js +0 -1
  282. package/.output/public/_nuxt/GM5myUL22.js +0 -1
  283. package/.output/public/_nuxt/IC4wc76W.js +0 -1
  284. package/.output/public/_nuxt/IfL46N3Z.js +0 -1
  285. package/.output/public/_nuxt/KEU2l6zJ.js +0 -3
  286. package/.output/public/_nuxt/SEETjfdJ.js +0 -1
  287. package/.output/public/_nuxt/builds/meta/2c4adba2-91b5-44e4-91d3-50a61695207b.json +0 -1
  288. package/.output/public/_nuxt/entry.CZ_dkjcs.css +0 -1
  289. package/.output/public/_nuxt/nGp0t_eD.js +0 -1
  290. package/.output/server/chunks/build/Alert-DHVVSgdD.mjs +0 -1074
  291. package/.output/server/chunks/build/Alert-DHVVSgdD.mjs.map +0 -1
  292. package/.output/server/chunks/build/DashboardSidebarToggle-CUI9NSow.mjs.map +0 -1
  293. package/.output/server/chunks/build/Empty-BGIn09cL.mjs.map +0 -1
  294. package/.output/server/chunks/build/FocusScope-DNZVMnza.mjs +0 -207
  295. package/.output/server/chunks/build/FocusScope-DNZVMnza.mjs.map +0 -1
  296. package/.output/server/chunks/build/FormField-DnJWfrKE.mjs.map +0 -1
  297. package/.output/server/chunks/build/MapBaseLayerTabs-CRl5Zwlr.mjs.map +0 -1
  298. package/.output/server/chunks/build/OnlineMap-cFSicmkV.mjs.map +0 -1
  299. package/.output/server/chunks/build/Tooltip-DNUdH4oF.mjs.map +0 -1
  300. package/.output/server/chunks/build/advanced-5ZGMUBqC.mjs.map +0 -1
  301. package/.output/server/chunks/build/compare-CtgF4Anj.mjs.map +0 -1
  302. package/.output/server/chunks/build/pages-0c5sp_lv.mjs.map +0 -1
  303. package/.output/server/chunks/build/tasks-Aa8PwjVL.mjs.map +0 -1
@@ -0,0 +1,602 @@
1
+ 'use strict'
2
+
3
+ const assert = require('node:assert')
4
+ const { Readable } = require('node:stream')
5
+ const util = require('../core/util')
6
+ const CacheHandler = require('../handler/cache-handler')
7
+ const MemoryCacheStore = require('../cache/memory-cache-store')
8
+ const CacheRevalidationHandler = require('../handler/cache-revalidation-handler')
9
+ const { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader, isInvalidOrWildcardVaryHeader } = require('../util/cache.js')
10
+ const { AbortError } = require('../core/errors.js')
11
+ const { parseHttpDate } = require('../util/date.js')
12
+
13
+ /**
14
+ * @param {(string | RegExp)[] | undefined} origins
15
+ * @param {string} name
16
+ */
17
+ function assertCacheOrigins (origins, name) {
18
+ if (origins === undefined) return
19
+ if (!Array.isArray(origins)) {
20
+ throw new TypeError(`expected ${name} to be an array or undefined, got ${typeof origins}`)
21
+ }
22
+ for (let i = 0; i < origins.length; i++) {
23
+ const origin = origins[i]
24
+ if (typeof origin !== 'string' && !(origin instanceof RegExp)) {
25
+ throw new TypeError(`expected ${name}[${i}] to be a string or RegExp, got ${typeof origin}`)
26
+ }
27
+ }
28
+ }
29
+
30
+ const nop = () => {}
31
+
32
+ function trimOWS (value) {
33
+ return value.replace(/^[\t ]+|[\t ]+$/g, '')
34
+ }
35
+
36
+ function arrayIncludes (array, value) {
37
+ for (let i = 0; i < array.length; i++) {
38
+ if (array[i] === value) {
39
+ return true
40
+ }
41
+ }
42
+
43
+ return false
44
+ }
45
+
46
+ function hasPragmaNoCache (headers) {
47
+ const pragma = headers?.pragma
48
+ if (!pragma) {
49
+ return false
50
+ }
51
+
52
+ const values = Array.isArray(pragma) ? pragma : [pragma]
53
+ for (let i = 0; i < values.length; i++) {
54
+ const value = values[i]
55
+ if (typeof value !== 'string') {
56
+ continue
57
+ }
58
+
59
+ const directives = value.split(',')
60
+ for (let j = 0; j < directives.length; j++) {
61
+ if (trimOWS(directives[j]).toLowerCase() === 'no-cache') {
62
+ return true
63
+ }
64
+ }
65
+ }
66
+
67
+ return false
68
+ }
69
+
70
+ /**
71
+ * @typedef {(options: import('../../types/dispatcher.d.ts').default.DispatchOptions, handler: import('../../types/dispatcher.d.ts').default.DispatchHandler) => void} DispatchFn
72
+ */
73
+
74
+ /**
75
+ * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result
76
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives
77
+ * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts
78
+ * @returns {boolean}
79
+ */
80
+ function needsRevalidation (result, cacheControlDirectives, { headers = {} }) {
81
+ // Always revalidate requests with the no-cache request directive.
82
+ if (cacheControlDirectives?.['no-cache']) {
83
+ return true
84
+ }
85
+
86
+ // Always revalidate requests with unqualified no-cache response directive.
87
+ if (result.cacheControlDirectives?.['no-cache'] && !Array.isArray(result.cacheControlDirectives['no-cache'])) {
88
+ return true
89
+ }
90
+
91
+ // Always revalidate requests with conditional headers.
92
+ if (headers['if-modified-since'] || headers['if-none-match']) {
93
+ return true
94
+ }
95
+
96
+ return false
97
+ }
98
+
99
+ /**
100
+ * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result
101
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType
102
+ * @returns {boolean}
103
+ */
104
+ function staleResponseRequiresRevalidation (result, cacheType) {
105
+ return result.cacheControlDirectives?.['must-revalidate'] === true ||
106
+ (cacheType === 'shared' && (
107
+ result.cacheControlDirectives?.['proxy-revalidate'] === true ||
108
+ // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.10
109
+ // s-maxage implies proxy-revalidate for shared caches.
110
+ result.cacheControlDirectives?.['s-maxage'] !== undefined
111
+ ))
112
+ }
113
+
114
+ /**
115
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType
116
+ * @param {import('../../types/header.d.ts').IncomingHttpHeaders} headers
117
+ * @returns {boolean}
118
+ */
119
+ function revalidationResponseDisallowsCachedReuse (cacheType, headers) {
120
+ if (headers.vary && isInvalidOrWildcardVaryHeader(headers.vary)) {
121
+ return true
122
+ }
123
+
124
+ const cacheControl = headers['cache-control']
125
+ if (!cacheControl) {
126
+ return false
127
+ }
128
+
129
+ const cacheControlDirectives = parseCacheControlHeader(cacheControl)
130
+ return cacheControlDirectives['no-store'] === true ||
131
+ (cacheType === 'shared' && cacheControlDirectives.private === true)
132
+ }
133
+
134
+ function revalidationResponseUpdatesCacheControl (headers) {
135
+ return headers['cache-control'] !== undefined
136
+ }
137
+
138
+ function deleteCachedValue (store, cacheKey) {
139
+ try {
140
+ store.delete(cacheKey)?.catch?.(nop)
141
+ } catch {
142
+ // Fail silently
143
+ }
144
+ }
145
+
146
+ function getUsableLastModified (headers) {
147
+ const lastModified = headers?.['last-modified']
148
+ if (typeof lastModified === 'string' && parseHttpDate(lastModified)) {
149
+ return lastModified
150
+ }
151
+ }
152
+
153
+ function makeRevalidationHeaders (opts, result) {
154
+ const headers = {
155
+ ...opts.headers,
156
+ 'if-modified-since': getUsableLastModified(result.headers) ?? new Date(result.cachedAt).toUTCString()
157
+ }
158
+
159
+ if (result.etag) {
160
+ headers['if-none-match'] = result.etag
161
+ }
162
+
163
+ if (result.vary) {
164
+ for (const key in result.vary) {
165
+ if (result.vary[key] != null) {
166
+ headers[key] = result.vary[key]
167
+ }
168
+ }
169
+ }
170
+
171
+ return headers
172
+ }
173
+
174
+ /**
175
+ * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result
176
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} cacheControlDirectives
177
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType
178
+ * @returns {boolean}
179
+ */
180
+ function isStale (result, cacheControlDirectives, cacheType) {
181
+ const now = Date.now()
182
+ if (now > result.staleAt) {
183
+ // Response is stale
184
+ if (!staleResponseRequiresRevalidation(result, cacheType) && cacheControlDirectives?.['max-stale']) {
185
+ // There's a threshold where we can serve stale responses, let's see if
186
+ // we're in it
187
+ // https://www.rfc-editor.org/rfc/rfc9111.html#name-max-stale
188
+ const gracePeriod = result.staleAt + (cacheControlDirectives['max-stale'] * 1000)
189
+ return now > gracePeriod
190
+ }
191
+
192
+ return true
193
+ }
194
+
195
+ if (cacheControlDirectives?.['min-fresh']) {
196
+ // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.1.3
197
+
198
+ // At this point, staleAt is always > now
199
+ const timeLeftTillStale = result.staleAt - now
200
+ const threshold = cacheControlDirectives['min-fresh'] * 1000
201
+
202
+ return timeLeftTillStale <= threshold
203
+ }
204
+
205
+ return false
206
+ }
207
+
208
+ /**
209
+ * Check if we're within the stale-while-revalidate window for a stale response
210
+ * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result
211
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType
212
+ * @returns {boolean}
213
+ */
214
+ function withinStaleWhileRevalidateWindow (result, cacheType) {
215
+ const staleWhileRevalidate = result.cacheControlDirectives?.['stale-while-revalidate']
216
+ if (!staleWhileRevalidate || staleResponseRequiresRevalidation(result, cacheType)) {
217
+ return false
218
+ }
219
+
220
+ const now = Date.now()
221
+ const staleWhileRevalidateExpiry = result.staleAt + (staleWhileRevalidate * 1000)
222
+ return now <= staleWhileRevalidateExpiry
223
+ }
224
+
225
+ /**
226
+ * @param {DispatchFn} dispatch
227
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts
228
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey
229
+ * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler
230
+ * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts
231
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl
232
+ */
233
+ function handleUncachedResponse (
234
+ dispatch,
235
+ globalOpts,
236
+ cacheKey,
237
+ handler,
238
+ opts,
239
+ reqCacheControl
240
+ ) {
241
+ if (reqCacheControl?.['only-if-cached']) {
242
+ let aborted = false
243
+ try {
244
+ if (typeof handler.onConnect === 'function') {
245
+ handler.onConnect(() => {
246
+ aborted = true
247
+ })
248
+
249
+ if (aborted) {
250
+ return
251
+ }
252
+ }
253
+
254
+ if (typeof handler.onHeaders === 'function') {
255
+ handler.onHeaders(504, [], nop, 'Gateway Timeout')
256
+ if (aborted) {
257
+ return
258
+ }
259
+ }
260
+
261
+ if (typeof handler.onComplete === 'function') {
262
+ handler.onComplete([])
263
+ }
264
+ } catch (err) {
265
+ if (typeof handler.onError === 'function') {
266
+ handler.onError(err)
267
+ }
268
+ }
269
+
270
+ return true
271
+ }
272
+
273
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))
274
+ }
275
+
276
+ /**
277
+ * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler
278
+ * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts
279
+ * @param {import('../../types/cache-interceptor.d.ts').default.GetResult} result
280
+ * @param {number} age
281
+ * @param {any} context
282
+ * @param {boolean} isStale
283
+ */
284
+ function sendCachedValue (handler, opts, result, age, context, isStale) {
285
+ // TODO (perf): Readable.from path can be optimized...
286
+ const stream = util.isStream(result.body)
287
+ ? result.body
288
+ : Readable.from(result.body ?? [])
289
+
290
+ assert(!stream.destroyed, 'stream should not be destroyed')
291
+ assert(!stream.readableDidRead, 'stream should not be readableDidRead')
292
+
293
+ const controller = {
294
+ resume () {
295
+ stream.resume()
296
+ },
297
+ pause () {
298
+ stream.pause()
299
+ },
300
+ get paused () {
301
+ return stream.isPaused()
302
+ },
303
+ get aborted () {
304
+ return stream.destroyed
305
+ },
306
+ get reason () {
307
+ return stream.errored
308
+ },
309
+ abort (reason) {
310
+ stream.destroy(reason ?? new AbortError())
311
+ }
312
+ }
313
+
314
+ stream
315
+ .on('error', function (err) {
316
+ if (!this.readableEnded) {
317
+ if (typeof handler.onResponseError === 'function') {
318
+ handler.onResponseError(controller, err)
319
+ } else {
320
+ throw err
321
+ }
322
+ }
323
+ })
324
+ .on('close', function () {
325
+ if (!this.errored) {
326
+ handler.onResponseEnd?.(controller, {})
327
+ }
328
+ })
329
+
330
+ handler.onRequestStart?.(controller, context)
331
+
332
+ if (stream.destroyed) {
333
+ return
334
+ }
335
+
336
+ // Add the age header
337
+ // https://www.rfc-editor.org/rfc/rfc9111.html#name-age
338
+ const headers = { ...result.headers, age: String(age) }
339
+
340
+ if (isStale) {
341
+ // Add warning header
342
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Warning
343
+ headers.warning = '110 - "response is stale"'
344
+ }
345
+
346
+ handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage)
347
+
348
+ if (opts.method === 'HEAD') {
349
+ stream.destroy()
350
+ } else {
351
+ stream.on('data', function (chunk) {
352
+ handler.onResponseData?.(controller, chunk)
353
+ })
354
+ }
355
+ }
356
+
357
+ /**
358
+ * @param {DispatchFn} dispatch
359
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheHandlerOptions} globalOpts
360
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} cacheKey
361
+ * @param {import('../../types/dispatcher.d.ts').default.DispatchHandler} handler
362
+ * @param {import('../../types/dispatcher.d.ts').default.RequestOptions} opts
363
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives | undefined} reqCacheControl
364
+ * @param {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} result
365
+ */
366
+ function handleResult (
367
+ dispatch,
368
+ globalOpts,
369
+ cacheKey,
370
+ handler,
371
+ opts,
372
+ reqCacheControl,
373
+ result
374
+ ) {
375
+ if (!result) {
376
+ return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl)
377
+ }
378
+
379
+ const now = Date.now()
380
+ if (now > result.deleteAt) {
381
+ // Response is expired, cache store shouldn't have given this to us
382
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))
383
+ }
384
+
385
+ const age = Math.round((now - result.cachedAt) / 1000)
386
+ const requestMaxAgeExpired = reqCacheControl?.['max-age'] !== undefined && age >= reqCacheControl['max-age']
387
+
388
+ const stale = requestMaxAgeExpired || isStale(result, reqCacheControl, globalOpts.type)
389
+ const revalidate = requestMaxAgeExpired || needsRevalidation(result, reqCacheControl, opts)
390
+
391
+ // Check if the response is stale
392
+ if (stale || revalidate) {
393
+ if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) {
394
+ // If body is a stream we can't revalidate...
395
+ // TODO (fix): This could be less strict...
396
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))
397
+ }
398
+
399
+ // RFC 5861: If we're within stale-while-revalidate window, serve stale immediately
400
+ // and revalidate in background, unless immediate revalidation is necessary
401
+ if (!revalidate && withinStaleWhileRevalidateWindow(result, globalOpts.type)) {
402
+ // Serve stale response immediately
403
+ sendCachedValue(handler, opts, result, age, null, true)
404
+
405
+ // Start background revalidation (fire-and-forget)
406
+ queueMicrotask(() => {
407
+ const headers = makeRevalidationHeaders(opts, result)
408
+
409
+ // Background revalidation - update cache if we get new data
410
+ dispatch(
411
+ {
412
+ ...opts,
413
+ headers
414
+ },
415
+ new CacheHandler(globalOpts, cacheKey, {
416
+ // Silent handler that just updates the cache
417
+ onRequestStart () {},
418
+ onRequestUpgrade () {},
419
+ onResponseStart () {},
420
+ onResponseData () {},
421
+ onResponseEnd () {},
422
+ onResponseError () {}
423
+ })
424
+ )
425
+ })
426
+
427
+ return true
428
+ }
429
+
430
+ let withinStaleIfErrorThreshold = false
431
+ if (!staleResponseRequiresRevalidation(result, globalOpts.type)) {
432
+ const staleIfErrorExpiry = result.cacheControlDirectives['stale-if-error'] ?? reqCacheControl?.['stale-if-error']
433
+ if (staleIfErrorExpiry) {
434
+ withinStaleIfErrorThreshold = now < (result.staleAt + (staleIfErrorExpiry * 1000))
435
+ }
436
+ }
437
+
438
+ const headers = makeRevalidationHeaders(opts, result)
439
+
440
+ // We need to revalidate the response
441
+ return dispatch(
442
+ {
443
+ ...opts,
444
+ headers
445
+ },
446
+ new CacheRevalidationHandler(
447
+ (success, context, statusCode, headers) => {
448
+ if (success) {
449
+ if (statusCode === 304) {
450
+ if (revalidationResponseDisallowsCachedReuse(globalOpts.type, headers)) {
451
+ if (util.isStream(result.body)) {
452
+ result.body.on('error', nop).destroy()
453
+ }
454
+
455
+ deleteCachedValue(globalOpts.store, cacheKey)
456
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler))
457
+ }
458
+
459
+ if (revalidationResponseUpdatesCacheControl(headers)) {
460
+ deleteCachedValue(globalOpts.store, cacheKey)
461
+ }
462
+ }
463
+
464
+ // TODO: successful revalidation should be considered fresh (not give stale warning).
465
+ sendCachedValue(handler, opts, result, age, context, stale)
466
+ } else if (util.isStream(result.body)) {
467
+ result.body.on('error', nop).destroy()
468
+ }
469
+ },
470
+ new CacheHandler(globalOpts, cacheKey, handler),
471
+ withinStaleIfErrorThreshold
472
+ )
473
+ )
474
+ }
475
+
476
+ // Dump request body.
477
+ if (util.isStream(opts.body)) {
478
+ opts.body.on('error', nop).destroy()
479
+ }
480
+
481
+ sendCachedValue(handler, opts, result, age, null, false)
482
+ }
483
+
484
+ /**
485
+ * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions} [opts]
486
+ * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor}
487
+ */
488
+ module.exports = (opts = {}) => {
489
+ const {
490
+ store = new MemoryCacheStore(),
491
+ methods = ['GET'],
492
+ cacheByDefault = undefined,
493
+ type = 'shared',
494
+ origins = undefined
495
+ } = opts
496
+
497
+ if (typeof opts !== 'object' || opts === null) {
498
+ throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? 'null' : typeof opts}`)
499
+ }
500
+
501
+ assertCacheStore(store, 'opts.store')
502
+ assertCacheMethods(methods, 'opts.methods')
503
+ assertCacheOrigins(origins, 'opts.origins')
504
+
505
+ if (typeof cacheByDefault !== 'undefined' && typeof cacheByDefault !== 'number') {
506
+ throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`)
507
+ }
508
+
509
+ if (typeof type !== 'undefined' && type !== 'shared' && type !== 'private') {
510
+ throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type}`)
511
+ }
512
+
513
+ const globalOpts = {
514
+ store,
515
+ methods,
516
+ cacheByDefault,
517
+ type
518
+ }
519
+
520
+ const safeMethodsToNotCache = []
521
+ for (let i = 0; i < util.safeHTTPMethods.length; i++) {
522
+ const method = util.safeHTTPMethods[i]
523
+ if (!arrayIncludes(methods, method)) {
524
+ safeMethodsToNotCache.push(method)
525
+ }
526
+ }
527
+
528
+ return dispatch => {
529
+ return (opts, handler) => {
530
+ if (!opts.origin || arrayIncludes(safeMethodsToNotCache, opts.method)) {
531
+ // Not a method we want to cache or we don't have the origin, skip
532
+ return dispatch(opts, handler)
533
+ }
534
+
535
+ // Check if origin is in whitelist
536
+ if (origins !== undefined) {
537
+ const requestOrigin = opts.origin.toString().toLowerCase()
538
+ let isAllowed = false
539
+
540
+ for (let i = 0; i < origins.length; i++) {
541
+ const allowed = origins[i]
542
+ if (typeof allowed === 'string') {
543
+ if (allowed.toLowerCase() === requestOrigin) {
544
+ isAllowed = true
545
+ break
546
+ }
547
+ } else if (allowed.test(requestOrigin)) {
548
+ isAllowed = true
549
+ break
550
+ }
551
+ }
552
+
553
+ if (!isAllowed) {
554
+ return dispatch(opts, handler)
555
+ }
556
+ }
557
+
558
+ opts = {
559
+ ...opts,
560
+ headers: normalizeHeaders(opts)
561
+ }
562
+
563
+ const reqCacheControl = opts.headers?.['cache-control']
564
+ ? parseCacheControlHeader(opts.headers['cache-control'])
565
+ : hasPragmaNoCache(opts.headers)
566
+ ? { 'no-cache': true }
567
+ : undefined
568
+
569
+ if (reqCacheControl?.['no-store']) {
570
+ return dispatch(opts, handler)
571
+ }
572
+
573
+ /**
574
+ * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey}
575
+ */
576
+ const cacheKey = makeCacheKey(opts)
577
+ const result = store.get(cacheKey)
578
+
579
+ if (result && typeof result.then === 'function') {
580
+ return result
581
+ .then(result => handleResult(dispatch,
582
+ globalOpts,
583
+ cacheKey,
584
+ handler,
585
+ opts,
586
+ reqCacheControl,
587
+ result
588
+ ))
589
+ } else {
590
+ return handleResult(
591
+ dispatch,
592
+ globalOpts,
593
+ cacheKey,
594
+ handler,
595
+ opts,
596
+ reqCacheControl,
597
+ result
598
+ )
599
+ }
600
+ }
601
+ }
602
+ }