lightly-studio 0.4.6__py3-none-any.whl

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 (356) hide show
  1. lightly_studio/__init__.py +12 -0
  2. lightly_studio/api/__init__.py +0 -0
  3. lightly_studio/api/app.py +131 -0
  4. lightly_studio/api/cache.py +77 -0
  5. lightly_studio/api/db_tables.py +35 -0
  6. lightly_studio/api/features.py +5 -0
  7. lightly_studio/api/routes/api/annotation.py +305 -0
  8. lightly_studio/api/routes/api/annotation_label.py +87 -0
  9. lightly_studio/api/routes/api/annotations/__init__.py +7 -0
  10. lightly_studio/api/routes/api/annotations/create_annotation.py +52 -0
  11. lightly_studio/api/routes/api/caption.py +100 -0
  12. lightly_studio/api/routes/api/classifier.py +384 -0
  13. lightly_studio/api/routes/api/dataset.py +191 -0
  14. lightly_studio/api/routes/api/dataset_tag.py +266 -0
  15. lightly_studio/api/routes/api/embeddings2d.py +90 -0
  16. lightly_studio/api/routes/api/exceptions.py +114 -0
  17. lightly_studio/api/routes/api/export.py +114 -0
  18. lightly_studio/api/routes/api/features.py +17 -0
  19. lightly_studio/api/routes/api/frame.py +241 -0
  20. lightly_studio/api/routes/api/image.py +155 -0
  21. lightly_studio/api/routes/api/metadata.py +161 -0
  22. lightly_studio/api/routes/api/operator.py +75 -0
  23. lightly_studio/api/routes/api/sample.py +103 -0
  24. lightly_studio/api/routes/api/selection.py +87 -0
  25. lightly_studio/api/routes/api/settings.py +41 -0
  26. lightly_studio/api/routes/api/status.py +19 -0
  27. lightly_studio/api/routes/api/text_embedding.py +50 -0
  28. lightly_studio/api/routes/api/validators.py +17 -0
  29. lightly_studio/api/routes/api/video.py +133 -0
  30. lightly_studio/api/routes/healthz.py +13 -0
  31. lightly_studio/api/routes/images.py +104 -0
  32. lightly_studio/api/routes/video_frames_media.py +116 -0
  33. lightly_studio/api/routes/video_media.py +223 -0
  34. lightly_studio/api/routes/webapp.py +51 -0
  35. lightly_studio/api/server.py +94 -0
  36. lightly_studio/core/__init__.py +0 -0
  37. lightly_studio/core/add_samples.py +533 -0
  38. lightly_studio/core/add_videos.py +294 -0
  39. lightly_studio/core/dataset.py +780 -0
  40. lightly_studio/core/dataset_query/__init__.py +14 -0
  41. lightly_studio/core/dataset_query/boolean_expression.py +67 -0
  42. lightly_studio/core/dataset_query/dataset_query.py +317 -0
  43. lightly_studio/core/dataset_query/field.py +113 -0
  44. lightly_studio/core/dataset_query/field_expression.py +79 -0
  45. lightly_studio/core/dataset_query/match_expression.py +23 -0
  46. lightly_studio/core/dataset_query/order_by.py +79 -0
  47. lightly_studio/core/dataset_query/sample_field.py +37 -0
  48. lightly_studio/core/dataset_query/tags_expression.py +46 -0
  49. lightly_studio/core/image_sample.py +36 -0
  50. lightly_studio/core/loading_log.py +56 -0
  51. lightly_studio/core/sample.py +291 -0
  52. lightly_studio/core/start_gui.py +54 -0
  53. lightly_studio/core/video_sample.py +38 -0
  54. lightly_studio/dataset/__init__.py +0 -0
  55. lightly_studio/dataset/edge_embedding_generator.py +155 -0
  56. lightly_studio/dataset/embedding_generator.py +129 -0
  57. lightly_studio/dataset/embedding_manager.py +349 -0
  58. lightly_studio/dataset/env.py +20 -0
  59. lightly_studio/dataset/file_utils.py +49 -0
  60. lightly_studio/dataset/fsspec_lister.py +275 -0
  61. lightly_studio/dataset/mobileclip_embedding_generator.py +158 -0
  62. lightly_studio/dataset/perception_encoder_embedding_generator.py +260 -0
  63. lightly_studio/db_manager.py +166 -0
  64. lightly_studio/dist_lightly_studio_view_app/_app/env.js +1 -0
  65. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.GcXvs2l7.css +1 -0
  66. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/12.Dx6SXgAb.css +1 -0
  67. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/17.9X9_k6TP.css +1 -0
  68. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/18.BxiimdIO.css +1 -0
  69. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/2.CkOblLn7.css +1 -0
  70. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/ClassifierSamplesGrid.BJbCDlvs.css +1 -0
  71. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/LightlyLogo.BNjCIww-.png +0 -0
  72. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-Bold.DGvYQtcs.ttf +0 -0
  73. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-Italic-VariableFont_wdth_wght.B4AZ-wl6.ttf +0 -0
  74. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-Medium.DVUZMR_6.ttf +0 -0
  75. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-Regular.DxJTClRG.ttf +0 -0
  76. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-SemiBold.D3TTYgdB.ttf +0 -0
  77. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/OpenSans-VariableFont_wdth_wght.BZBpG5Iz.ttf +0 -0
  78. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.CefECEWA.css +1 -0
  79. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.D5tDcjY-.css +1 -0
  80. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_page.9X9_k6TP.css +1 -0
  81. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_page.BxiimdIO.css +1 -0
  82. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_page.Dx6SXgAb.css +1 -0
  83. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform._-1mPSEI.css +1 -0
  84. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/0dDyq72A.js +20 -0
  85. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/69_IOA4Y.js +1 -0
  86. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BK4An2kI.js +1 -0
  87. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BRmB-kJ9.js +1 -0
  88. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/B_1cpokE.js +1 -0
  89. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BiqpDEr0.js +1 -0
  90. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BpLiSKgx.js +1 -0
  91. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BscxbINH.js +39 -0
  92. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C1FmrZbK.js +1 -0
  93. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C80h3dJx.js +1 -0
  94. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C8mfFM-u.js +2 -0
  95. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CGY1p9L4.js +517 -0
  96. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/COfLknXM.js +1 -0
  97. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CWj6FrbW.js +1 -0
  98. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CYgJF_JY.js +1 -0
  99. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CmLg0ys7.js +1 -0
  100. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CvGjimpO.js +1 -0
  101. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D3RDXHoj.js +39 -0
  102. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D4y7iiT3.js +1 -0
  103. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D9SC3jBb.js +1 -0
  104. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DCuAdx1Q.js +20 -0
  105. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DDBy-_jD.js +1 -0
  106. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DIeogL5L.js +1 -0
  107. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DL9a7v5o.js +1 -0
  108. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DSKECuqX.js +39 -0
  109. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D_FFv0Oe.js +1 -0
  110. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DiZ5o5vz.js +1 -0
  111. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DkbXUtyG.js +1 -0
  112. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DmK2hulV.js +1 -0
  113. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DqnHaLTj.js +1 -0
  114. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DtWZc_tl.js +1 -0
  115. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DuUalyFS.js +1 -0
  116. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DwIonDAZ.js +1 -0
  117. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Il-mSPmK.js +1 -0
  118. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/KNLP4aJU.js +1 -0
  119. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/KjYeVjkE.js +1 -0
  120. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/MErlcOXj.js +1 -0
  121. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/VRI4prUD.js +1 -0
  122. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/VYb2dkNs.js +1 -0
  123. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/VqWvU2yF.js +1 -0
  124. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/dHC3otuL.js +1 -0
  125. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/da7Oy_lO.js +1 -0
  126. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/eAy8rZzC.js +2 -0
  127. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/erjNR5MX.js +1 -0
  128. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/f1oG3eFE.js +1 -0
  129. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/rsLi1iKv.js +20 -0
  130. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/rwuuBP9f.js +1 -0
  131. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/xGHZQ1pe.js +3 -0
  132. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.DrTRUgT3.js +2 -0
  133. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.BK5EOJl2.js +1 -0
  134. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.CIvTuljF.js +4 -0
  135. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/1.UBvSzxdA.js +1 -0
  136. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.CQ_tiLJa.js +1 -0
  137. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/11.KqkAcaxW.js +1 -0
  138. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.DoYsmxQc.js +1 -0
  139. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/13.571n2LZA.js +1 -0
  140. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/14.DGs689M-.js +1 -0
  141. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/15.CWG1ehzT.js +1 -0
  142. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/16.Dpq6jbSh.js +1 -0
  143. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/17.B5AZbHUU.js +1 -0
  144. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/18.CBga8cnq.js +1 -0
  145. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/2.D2HXgz-8.js +1090 -0
  146. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/3.f4HAg-y3.js +1 -0
  147. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/4.BKF4xuKQ.js +1 -0
  148. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.BAE0Pm_f.js +39 -0
  149. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/6.CouWWpzA.js +1 -0
  150. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.UBHT0ktp.js +1 -0
  151. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.FiYNElcc.js +1 -0
  152. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.B3-UaT23.js +1 -0
  153. lightly_studio/dist_lightly_studio_view_app/_app/immutable/workers/clustering.worker-DKqeLtG0.js +2 -0
  154. lightly_studio/dist_lightly_studio_view_app/_app/immutable/workers/search.worker-vNSty3B0.js +1 -0
  155. lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -0
  156. lightly_studio/dist_lightly_studio_view_app/apple-touch-icon-precomposed.png +0 -0
  157. lightly_studio/dist_lightly_studio_view_app/apple-touch-icon.png +0 -0
  158. lightly_studio/dist_lightly_studio_view_app/favicon.png +0 -0
  159. lightly_studio/dist_lightly_studio_view_app/index.html +45 -0
  160. lightly_studio/errors.py +5 -0
  161. lightly_studio/examples/example.py +25 -0
  162. lightly_studio/examples/example_coco.py +27 -0
  163. lightly_studio/examples/example_coco_caption.py +29 -0
  164. lightly_studio/examples/example_metadata.py +369 -0
  165. lightly_studio/examples/example_operators.py +111 -0
  166. lightly_studio/examples/example_selection.py +28 -0
  167. lightly_studio/examples/example_split_work.py +48 -0
  168. lightly_studio/examples/example_video.py +22 -0
  169. lightly_studio/examples/example_video_annotations.py +157 -0
  170. lightly_studio/examples/example_yolo.py +22 -0
  171. lightly_studio/export/coco_captions.py +69 -0
  172. lightly_studio/export/export_dataset.py +104 -0
  173. lightly_studio/export/lightly_studio_label_input.py +120 -0
  174. lightly_studio/export_schema.py +18 -0
  175. lightly_studio/export_version.py +57 -0
  176. lightly_studio/few_shot_classifier/__init__.py +0 -0
  177. lightly_studio/few_shot_classifier/classifier.py +80 -0
  178. lightly_studio/few_shot_classifier/classifier_manager.py +644 -0
  179. lightly_studio/few_shot_classifier/random_forest_classifier.py +495 -0
  180. lightly_studio/metadata/complex_metadata.py +47 -0
  181. lightly_studio/metadata/compute_similarity.py +84 -0
  182. lightly_studio/metadata/compute_typicality.py +67 -0
  183. lightly_studio/metadata/gps_coordinate.py +41 -0
  184. lightly_studio/metadata/metadata_protocol.py +17 -0
  185. lightly_studio/models/__init__.py +1 -0
  186. lightly_studio/models/annotation/__init__.py +0 -0
  187. lightly_studio/models/annotation/annotation_base.py +303 -0
  188. lightly_studio/models/annotation/instance_segmentation.py +56 -0
  189. lightly_studio/models/annotation/links.py +17 -0
  190. lightly_studio/models/annotation/object_detection.py +47 -0
  191. lightly_studio/models/annotation/semantic_segmentation.py +44 -0
  192. lightly_studio/models/annotation_label.py +47 -0
  193. lightly_studio/models/caption.py +49 -0
  194. lightly_studio/models/classifier.py +20 -0
  195. lightly_studio/models/dataset.py +70 -0
  196. lightly_studio/models/embedding_model.py +30 -0
  197. lightly_studio/models/image.py +96 -0
  198. lightly_studio/models/metadata.py +208 -0
  199. lightly_studio/models/range.py +17 -0
  200. lightly_studio/models/sample.py +154 -0
  201. lightly_studio/models/sample_embedding.py +36 -0
  202. lightly_studio/models/settings.py +69 -0
  203. lightly_studio/models/tag.py +96 -0
  204. lightly_studio/models/two_dim_embedding.py +16 -0
  205. lightly_studio/models/video.py +161 -0
  206. lightly_studio/plugins/__init__.py +0 -0
  207. lightly_studio/plugins/base_operator.py +60 -0
  208. lightly_studio/plugins/operator_registry.py +47 -0
  209. lightly_studio/plugins/parameter.py +70 -0
  210. lightly_studio/py.typed +0 -0
  211. lightly_studio/resolvers/__init__.py +0 -0
  212. lightly_studio/resolvers/annotation_label_resolver/__init__.py +22 -0
  213. lightly_studio/resolvers/annotation_label_resolver/create.py +27 -0
  214. lightly_studio/resolvers/annotation_label_resolver/delete.py +28 -0
  215. lightly_studio/resolvers/annotation_label_resolver/get_all.py +37 -0
  216. lightly_studio/resolvers/annotation_label_resolver/get_by_id.py +24 -0
  217. lightly_studio/resolvers/annotation_label_resolver/get_by_ids.py +25 -0
  218. lightly_studio/resolvers/annotation_label_resolver/get_by_label_name.py +24 -0
  219. lightly_studio/resolvers/annotation_label_resolver/names_by_ids.py +25 -0
  220. lightly_studio/resolvers/annotation_label_resolver/update.py +38 -0
  221. lightly_studio/resolvers/annotation_resolver/__init__.py +40 -0
  222. lightly_studio/resolvers/annotation_resolver/count_annotations_by_dataset.py +129 -0
  223. lightly_studio/resolvers/annotation_resolver/create_many.py +124 -0
  224. lightly_studio/resolvers/annotation_resolver/delete_annotation.py +87 -0
  225. lightly_studio/resolvers/annotation_resolver/delete_annotations.py +60 -0
  226. lightly_studio/resolvers/annotation_resolver/get_all.py +85 -0
  227. lightly_studio/resolvers/annotation_resolver/get_all_with_payload.py +179 -0
  228. lightly_studio/resolvers/annotation_resolver/get_by_id.py +34 -0
  229. lightly_studio/resolvers/annotation_resolver/get_by_id_with_payload.py +130 -0
  230. lightly_studio/resolvers/annotation_resolver/update_annotation_label.py +142 -0
  231. lightly_studio/resolvers/annotation_resolver/update_bounding_box.py +68 -0
  232. lightly_studio/resolvers/annotations/__init__.py +1 -0
  233. lightly_studio/resolvers/annotations/annotations_filter.py +88 -0
  234. lightly_studio/resolvers/caption_resolver.py +129 -0
  235. lightly_studio/resolvers/dataset_resolver/__init__.py +55 -0
  236. lightly_studio/resolvers/dataset_resolver/check_dataset_type.py +29 -0
  237. lightly_studio/resolvers/dataset_resolver/create.py +20 -0
  238. lightly_studio/resolvers/dataset_resolver/delete.py +20 -0
  239. lightly_studio/resolvers/dataset_resolver/export.py +267 -0
  240. lightly_studio/resolvers/dataset_resolver/get_all.py +19 -0
  241. lightly_studio/resolvers/dataset_resolver/get_by_id.py +16 -0
  242. lightly_studio/resolvers/dataset_resolver/get_by_name.py +12 -0
  243. lightly_studio/resolvers/dataset_resolver/get_dataset_details.py +27 -0
  244. lightly_studio/resolvers/dataset_resolver/get_hierarchy.py +31 -0
  245. lightly_studio/resolvers/dataset_resolver/get_or_create_child_dataset.py +58 -0
  246. lightly_studio/resolvers/dataset_resolver/get_parent_dataset_by_sample_id.py +27 -0
  247. lightly_studio/resolvers/dataset_resolver/get_parent_dataset_id.py +22 -0
  248. lightly_studio/resolvers/dataset_resolver/get_root_dataset.py +61 -0
  249. lightly_studio/resolvers/dataset_resolver/get_root_datasets_overview.py +41 -0
  250. lightly_studio/resolvers/dataset_resolver/update.py +25 -0
  251. lightly_studio/resolvers/embedding_model_resolver.py +120 -0
  252. lightly_studio/resolvers/image_filter.py +50 -0
  253. lightly_studio/resolvers/image_resolver/__init__.py +21 -0
  254. lightly_studio/resolvers/image_resolver/create_many.py +52 -0
  255. lightly_studio/resolvers/image_resolver/delete.py +20 -0
  256. lightly_studio/resolvers/image_resolver/filter_new_paths.py +23 -0
  257. lightly_studio/resolvers/image_resolver/get_all_by_dataset_id.py +117 -0
  258. lightly_studio/resolvers/image_resolver/get_by_id.py +14 -0
  259. lightly_studio/resolvers/image_resolver/get_dimension_bounds.py +75 -0
  260. lightly_studio/resolvers/image_resolver/get_many_by_id.py +22 -0
  261. lightly_studio/resolvers/image_resolver/get_samples_excluding.py +43 -0
  262. lightly_studio/resolvers/metadata_resolver/__init__.py +15 -0
  263. lightly_studio/resolvers/metadata_resolver/metadata_filter.py +163 -0
  264. lightly_studio/resolvers/metadata_resolver/sample/__init__.py +21 -0
  265. lightly_studio/resolvers/metadata_resolver/sample/bulk_update_metadata.py +46 -0
  266. lightly_studio/resolvers/metadata_resolver/sample/get_by_sample_id.py +24 -0
  267. lightly_studio/resolvers/metadata_resolver/sample/get_metadata_info.py +104 -0
  268. lightly_studio/resolvers/metadata_resolver/sample/get_value_for_sample.py +27 -0
  269. lightly_studio/resolvers/metadata_resolver/sample/set_value_for_sample.py +53 -0
  270. lightly_studio/resolvers/sample_embedding_resolver.py +132 -0
  271. lightly_studio/resolvers/sample_resolver/__init__.py +17 -0
  272. lightly_studio/resolvers/sample_resolver/count_by_dataset_id.py +16 -0
  273. lightly_studio/resolvers/sample_resolver/create.py +16 -0
  274. lightly_studio/resolvers/sample_resolver/create_many.py +25 -0
  275. lightly_studio/resolvers/sample_resolver/get_by_id.py +14 -0
  276. lightly_studio/resolvers/sample_resolver/get_filtered_samples.py +56 -0
  277. lightly_studio/resolvers/sample_resolver/get_many_by_id.py +22 -0
  278. lightly_studio/resolvers/sample_resolver/sample_filter.py +74 -0
  279. lightly_studio/resolvers/settings_resolver.py +62 -0
  280. lightly_studio/resolvers/tag_resolver.py +299 -0
  281. lightly_studio/resolvers/twodim_embedding_resolver.py +119 -0
  282. lightly_studio/resolvers/video_frame_resolver/__init__.py +23 -0
  283. lightly_studio/resolvers/video_frame_resolver/count_video_frames_annotations.py +83 -0
  284. lightly_studio/resolvers/video_frame_resolver/create_many.py +57 -0
  285. lightly_studio/resolvers/video_frame_resolver/get_all_by_dataset_id.py +63 -0
  286. lightly_studio/resolvers/video_frame_resolver/get_by_id.py +13 -0
  287. lightly_studio/resolvers/video_frame_resolver/get_table_fields_bounds.py +44 -0
  288. lightly_studio/resolvers/video_frame_resolver/video_frame_annotations_counter_filter.py +47 -0
  289. lightly_studio/resolvers/video_frame_resolver/video_frame_filter.py +57 -0
  290. lightly_studio/resolvers/video_resolver/__init__.py +27 -0
  291. lightly_studio/resolvers/video_resolver/count_video_frame_annotations_by_video_dataset.py +86 -0
  292. lightly_studio/resolvers/video_resolver/create_many.py +58 -0
  293. lightly_studio/resolvers/video_resolver/filter_new_paths.py +33 -0
  294. lightly_studio/resolvers/video_resolver/get_all_by_dataset_id.py +181 -0
  295. lightly_studio/resolvers/video_resolver/get_by_id.py +22 -0
  296. lightly_studio/resolvers/video_resolver/get_table_fields_bounds.py +72 -0
  297. lightly_studio/resolvers/video_resolver/get_view_by_id.py +52 -0
  298. lightly_studio/resolvers/video_resolver/video_count_annotations_filter.py +50 -0
  299. lightly_studio/resolvers/video_resolver/video_filter.py +98 -0
  300. lightly_studio/selection/__init__.py +1 -0
  301. lightly_studio/selection/mundig.py +143 -0
  302. lightly_studio/selection/select.py +203 -0
  303. lightly_studio/selection/select_via_db.py +273 -0
  304. lightly_studio/selection/selection_config.py +49 -0
  305. lightly_studio/services/annotations_service/__init__.py +33 -0
  306. lightly_studio/services/annotations_service/create_annotation.py +64 -0
  307. lightly_studio/services/annotations_service/delete_annotation.py +22 -0
  308. lightly_studio/services/annotations_service/get_annotation_by_id.py +31 -0
  309. lightly_studio/services/annotations_service/update_annotation.py +54 -0
  310. lightly_studio/services/annotations_service/update_annotation_bounding_box.py +36 -0
  311. lightly_studio/services/annotations_service/update_annotation_label.py +48 -0
  312. lightly_studio/services/annotations_service/update_annotations.py +29 -0
  313. lightly_studio/setup_logging.py +59 -0
  314. lightly_studio/type_definitions.py +31 -0
  315. lightly_studio/utils/__init__.py +3 -0
  316. lightly_studio/utils/download.py +94 -0
  317. lightly_studio/vendor/__init__.py +1 -0
  318. lightly_studio/vendor/mobileclip/ACKNOWLEDGEMENTS +422 -0
  319. lightly_studio/vendor/mobileclip/LICENSE +31 -0
  320. lightly_studio/vendor/mobileclip/LICENSE_weights_data +50 -0
  321. lightly_studio/vendor/mobileclip/README.md +5 -0
  322. lightly_studio/vendor/mobileclip/__init__.py +96 -0
  323. lightly_studio/vendor/mobileclip/clip.py +77 -0
  324. lightly_studio/vendor/mobileclip/configs/mobileclip_b.json +18 -0
  325. lightly_studio/vendor/mobileclip/configs/mobileclip_s0.json +18 -0
  326. lightly_studio/vendor/mobileclip/configs/mobileclip_s1.json +18 -0
  327. lightly_studio/vendor/mobileclip/configs/mobileclip_s2.json +18 -0
  328. lightly_studio/vendor/mobileclip/image_encoder.py +67 -0
  329. lightly_studio/vendor/mobileclip/logger.py +154 -0
  330. lightly_studio/vendor/mobileclip/models/__init__.py +10 -0
  331. lightly_studio/vendor/mobileclip/models/mci.py +933 -0
  332. lightly_studio/vendor/mobileclip/models/vit.py +433 -0
  333. lightly_studio/vendor/mobileclip/modules/__init__.py +4 -0
  334. lightly_studio/vendor/mobileclip/modules/common/__init__.py +4 -0
  335. lightly_studio/vendor/mobileclip/modules/common/mobileone.py +341 -0
  336. lightly_studio/vendor/mobileclip/modules/common/transformer.py +451 -0
  337. lightly_studio/vendor/mobileclip/modules/image/__init__.py +4 -0
  338. lightly_studio/vendor/mobileclip/modules/image/image_projection.py +113 -0
  339. lightly_studio/vendor/mobileclip/modules/image/replknet.py +188 -0
  340. lightly_studio/vendor/mobileclip/modules/text/__init__.py +4 -0
  341. lightly_studio/vendor/mobileclip/modules/text/repmixer.py +281 -0
  342. lightly_studio/vendor/mobileclip/modules/text/tokenizer.py +38 -0
  343. lightly_studio/vendor/mobileclip/text_encoder.py +245 -0
  344. lightly_studio/vendor/perception_encoder/LICENSE.PE +201 -0
  345. lightly_studio/vendor/perception_encoder/README.md +11 -0
  346. lightly_studio/vendor/perception_encoder/vision_encoder/__init__.py +0 -0
  347. lightly_studio/vendor/perception_encoder/vision_encoder/bpe_simple_vocab_16e6.txt.gz +0 -0
  348. lightly_studio/vendor/perception_encoder/vision_encoder/config.py +205 -0
  349. lightly_studio/vendor/perception_encoder/vision_encoder/config_src.py +264 -0
  350. lightly_studio/vendor/perception_encoder/vision_encoder/pe.py +766 -0
  351. lightly_studio/vendor/perception_encoder/vision_encoder/rope.py +352 -0
  352. lightly_studio/vendor/perception_encoder/vision_encoder/tokenizer.py +347 -0
  353. lightly_studio/vendor/perception_encoder/vision_encoder/transforms.py +36 -0
  354. lightly_studio-0.4.6.dist-info/METADATA +88 -0
  355. lightly_studio-0.4.6.dist-info/RECORD +356 -0
  356. lightly_studio-0.4.6.dist-info/WHEEL +4 -0
@@ -0,0 +1,39 @@
1
+ import"./CvGjimpO.js";import{I as gt,X as Tt,K as Bt,$ as kt,a0 as $,a1 as nt,Q as G,a2 as H,a3 as ot,a4 as St,a5 as Zt,B as it}from"./CGY1p9L4.js";import"./CWj6FrbW.js";import{o as Dt}from"./xGHZQ1pe.js";import{p as ut,f as vt,j as pt,a as ct,c as j,n as It,s as Q,r as U,t as yt,u as ht,g as u,d as K,h as O,e as Et,b as at}from"./DkbXUtyG.js";import{c as xt,a as L,f as zt,t as At}from"./CmLg0ys7.js";import{s as lt}from"./VqWvU2yF.js";import{s as rt,d as Rt}from"./C8mfFM-u.js";import{s as wt,r as bt,p as Pt,b as mt}from"./DuUalyFS.js";import{s as Yt}from"./eAy8rZzC.js";function Nt(n,o){ut(o,!0);/**
2
+ * @license @lucide/svelte v0.482.0 - ISC
3
+ *
4
+ * ISC License
5
+ *
6
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
7
+ *
8
+ * Permission to use, copy, modify, and/or distribute this software for any
9
+ * purpose with or without fee is hereby granted, provided that the above
10
+ * copyright notice and this permission notice appear in all copies.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
+ *
20
+ */let a=bt(o,["$$slots","$$events","$$legacy"]);const g=[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]];gt(n,wt({name:"zoom-in"},()=>a,{get iconNode(){return g},children:(v,d)=>{var c=xt(),z=vt(c);lt(z,()=>o.children??pt),L(v,c)},$$slots:{default:!0}})),ct()}function Vt(n,o){ut(o,!0);/**
21
+ * @license @lucide/svelte v0.482.0 - ISC
22
+ *
23
+ * ISC License
24
+ *
25
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
26
+ *
27
+ * Permission to use, copy, modify, and/or distribute this software for any
28
+ * purpose with or without fee is hereby granted, provided that the above
29
+ * copyright notice and this permission notice appear in all copies.
30
+ *
31
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
32
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
33
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
34
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
35
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
37
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38
+ *
39
+ */let a=bt(o,["$$slots","$$events","$$legacy"]);const g=[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]];gt(n,wt({name:"zoom-out"},()=>a,{get iconNode(){return g},children:(v,d)=>{var c=xt(),z=vt(c);lt(z,()=>o.children??pt),L(v,c)},$$slots:{default:!0}})),ct()}function Xt(n){return new Tt([document.querySelectorAll(n)],[document.documentElement])}const Ct="bbox-change-annotation-details",de=({annotation:n,dataset_id:o,addReversibleAction:a,updateAnnotation:g})=>{const v=Bt(n),d=async()=>{const c={annotation_id:n.sample_id,dataset_id:o,bounding_box:v};await g(c)};a({id:`bbox-change-${n.sample_id}-${Date.now()}`,description:`Revert bounding box change for annotation ${n.sample_id}`,execute:d,timestamp:new Date,groupId:Ct})};var Ot=1e-12;function ft(n){return((n=Math.exp(n))+1/n)/2}function Gt(n){return((n=Math.exp(n))-1/n)/2}function qt(n){return((n=Math.exp(2*n))-1)/(n+1)}const Ft=function n(o,a,g){function v(d,c){var z=d[0],x=d[1],p=d[2],B=c[0],F=c[1],w=c[2],N=B-z,V=F-x,S=N*N+V*V,R,s;if(S<Ot)s=Math.log(w/p)/o,R=function(h){return[z+h*N,x+h*V,p*Math.exp(o*h*s)]};else{var Z=Math.sqrt(S),M=(w*w-p*p+g*S)/(2*p*a*Z),D=(w*w-p*p-g*S)/(2*w*a*Z),P=Math.log(Math.sqrt(M*M+1)-M),T=Math.log(Math.sqrt(D*D+1)-D);s=(T-P)/o,R=function(h){var k=h*s,I=ft(P),q=p/(a*Z)*(I*qt(o*k+P)-Gt(P));return[z+q*N,x+q*V,p*I/ft(o*k+P)]}}return R.duration=s*1e3*o/Math.SQRT2,R}return v.rho=function(d){var c=Math.max(.001,+d),z=c*c,x=z*z;return n(c,z,x)},v}(Math.SQRT2,2,4),J=n=>()=>n;function Ht(n,{sourceEvent:o,target:a,transform:g,dispatch:v}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:o,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},transform:{value:g,enumerable:!0,configurable:!0},_:{value:v}})}function st(n){n.stopImmediatePropagation()}function W(n){n.preventDefault(),n.stopImmediatePropagation()}function Kt(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function Wt(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function dt(){return this.__zoom||$}function jt(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function Qt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ut(n,o,a){var g=n.invertX(o[0][0])-a[0][0],v=n.invertX(o[1][0])-a[1][0],d=n.invertY(o[0][1])-a[0][1],c=n.invertY(o[1][1])-a[1][1];return n.translate(v>g?(g+v)/2:Math.min(0,g)||Math.max(0,v),c>d?(d+c)/2:Math.min(0,d)||Math.max(0,c))}function Lt(){var n=Kt,o=Wt,a=Ut,g=jt,v=Qt,d=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],z=250,x=Ft,p=kt("start","zoom","end"),B,F,w,N=500,V=150,S=0,R=10;function s(t){t.property("__zoom",dt).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",q).filter(v).on("touchstart.zoom",tt).on("touchmove.zoom",_t).on("touchend.zoom touchcancel.zoom",Mt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}s.transform=function(t,i,e,r){var l=t.selection?t.selection():t;l.property("__zoom",dt),t!==l?P(t,i,e,r):l.interrupt().each(function(){T(this,arguments).event(r).start().zoom(null,typeof i=="function"?i.apply(this,arguments):i).end()})},s.scaleBy=function(t,i,e,r){s.scaleTo(t,function(){var l=this.__zoom.k,m=typeof i=="function"?i.apply(this,arguments):i;return l*m},e,r)},s.scaleTo=function(t,i,e,r){s.transform(t,function(){var l=o.apply(this,arguments),m=this.__zoom,f=e==null?D(l):typeof e=="function"?e.apply(this,arguments):e,y=m.invert(f),b=typeof i=="function"?i.apply(this,arguments):i;return a(M(Z(m,b),f,y),l,c)},e,r)},s.translateBy=function(t,i,e,r){s.transform(t,function(){return a(this.__zoom.translate(typeof i=="function"?i.apply(this,arguments):i,typeof e=="function"?e.apply(this,arguments):e),o.apply(this,arguments),c)},null,r)},s.translateTo=function(t,i,e,r,l){s.transform(t,function(){var m=o.apply(this,arguments),f=this.__zoom,y=r==null?D(m):typeof r=="function"?r.apply(this,arguments):r;return a($.translate(y[0],y[1]).scale(f.k).translate(typeof i=="function"?-i.apply(this,arguments):-i,typeof e=="function"?-e.apply(this,arguments):-e),m,c)},r,l)};function Z(t,i){return i=Math.max(d[0],Math.min(d[1],i)),i===t.k?t:new nt(i,t.x,t.y)}function M(t,i,e){var r=i[0]-e[0]*t.k,l=i[1]-e[1]*t.k;return r===t.x&&l===t.y?t:new nt(t.k,r,l)}function D(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function P(t,i,e,r){t.on("start.zoom",function(){T(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(r).end()}).tween("zoom",function(){var l=this,m=arguments,f=T(l,m).event(r),y=o.apply(l,m),b=e==null?D(y):typeof e=="function"?e.apply(l,m):e,Y=Math.max(y[1][0]-y[0][0],y[1][1]-y[0][1]),_=l.__zoom,E=typeof i=="function"?i.apply(l,m):i,X=x(_.invert(b).concat(Y/_.k),E.invert(b).concat(Y/E.k));return function(A){if(A===1)A=E;else{var C=X(A),et=Y/C[2];A=new nt(et,b[0]-C[0]*et,b[1]-C[1]*et)}f.zoom(null,A)}})}function T(t,i,e){return!e&&t.__zooming||new h(t,i)}function h(t,i){this.that=t,this.args=i,this.active=0,this.sourceEvent=null,this.extent=o.apply(t,i),this.taps=0}h.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,i){return this.mouse&&t!=="mouse"&&(this.mouse[1]=i.invert(this.mouse[0])),this.touch0&&t!=="touch"&&(this.touch0[1]=i.invert(this.touch0[0])),this.touch1&&t!=="touch"&&(this.touch1[1]=i.invert(this.touch1[0])),this.that.__zoom=i,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var i=G(this.that).datum();p.call(t,this.that,new Ht(t,{sourceEvent:this.sourceEvent,target:s,transform:this.that.__zoom,dispatch:p}),i)}};function k(t,...i){if(!n.apply(this,arguments))return;var e=T(this,i).event(t),r=this.__zoom,l=Math.max(d[0],Math.min(d[1],r.k*Math.pow(2,g.apply(this,arguments)))),m=H(t);if(e.wheel)(e.mouse[0][0]!==m[0]||e.mouse[0][1]!==m[1])&&(e.mouse[1]=r.invert(e.mouse[0]=m)),clearTimeout(e.wheel);else{if(r.k===l)return;e.mouse=[m,r.invert(m)],ot(this),e.start()}W(t),e.wheel=setTimeout(f,V),e.zoom("mouse",a(M(Z(r,l),e.mouse[0],e.mouse[1]),e.extent,c));function f(){e.wheel=null,e.end()}}function I(t,...i){if(w||!n.apply(this,arguments))return;var e=t.currentTarget,r=T(this,i,!0).event(t),l=G(t.view).on("mousemove.zoom",b,!0).on("mouseup.zoom",Y,!0),m=H(t,e),f=t.clientX,y=t.clientY;St(t.view),st(t),r.mouse=[m,this.__zoom.invert(m)],ot(this),r.start();function b(_){if(W(_),!r.moved){var E=_.clientX-f,X=_.clientY-y;r.moved=E*E+X*X>S}r.event(_).zoom("mouse",a(M(r.that.__zoom,r.mouse[0]=H(_,e),r.mouse[1]),r.extent,c))}function Y(_){l.on("mousemove.zoom mouseup.zoom",null),Zt(_.view,r.moved),W(_),r.event(_).end()}}function q(t,...i){if(n.apply(this,arguments)){var e=this.__zoom,r=H(t.changedTouches?t.changedTouches[0]:t,this),l=e.invert(r),m=e.k*(t.shiftKey?.5:2),f=a(M(Z(e,m),r,l),o.apply(this,i),c);W(t),z>0?G(this).transition().duration(z).call(P,f,r,t):G(this).call(s.transform,f,r,t)}}function tt(t,...i){if(n.apply(this,arguments)){var e=t.touches,r=e.length,l=T(this,i,t.changedTouches.length===r).event(t),m,f,y,b;for(st(t),f=0;f<r;++f)y=e[f],b=H(y,this),b=[b,this.__zoom.invert(b),y.identifier],l.touch0?!l.touch1&&l.touch0[2]!==b[2]&&(l.touch1=b,l.taps=0):(l.touch0=b,m=!0,l.taps=1+!!B);B&&(B=clearTimeout(B)),m&&(l.taps<2&&(F=b[0],B=setTimeout(function(){B=null},N)),ot(this),l.start())}}function _t(t,...i){if(this.__zooming){var e=T(this,i).event(t),r=t.changedTouches,l=r.length,m,f,y,b;for(W(t),m=0;m<l;++m)f=r[m],y=H(f,this),e.touch0&&e.touch0[2]===f.identifier?e.touch0[0]=y:e.touch1&&e.touch1[2]===f.identifier&&(e.touch1[0]=y);if(f=e.that.__zoom,e.touch1){var Y=e.touch0[0],_=e.touch0[1],E=e.touch1[0],X=e.touch1[1],A=(A=E[0]-Y[0])*A+(A=E[1]-Y[1])*A,C=(C=X[0]-_[0])*C+(C=X[1]-_[1])*C;f=Z(f,Math.sqrt(A/C)),y=[(Y[0]+E[0])/2,(Y[1]+E[1])/2],b=[(_[0]+X[0])/2,(_[1]+X[1])/2]}else if(e.touch0)y=e.touch0[0],b=e.touch0[1];else return;e.zoom("touch",a(M(f,y,b),e.extent,c))}}function Mt(t,...i){if(this.__zooming){var e=T(this,i).event(t),r=t.changedTouches,l=r.length,m,f;for(st(t),w&&clearTimeout(w),w=setTimeout(function(){w=null},N),m=0;m<l;++m)f=r[m],e.touch0&&e.touch0[2]===f.identifier?delete e.touch0:e.touch1&&e.touch1[2]===f.identifier&&delete e.touch1;if(e.touch1&&!e.touch0&&(e.touch0=e.touch1,delete e.touch1),e.touch0)e.touch0[1]=this.__zoom.invert(e.touch0[0]);else if(e.end(),e.taps===2&&(f=H(f,this),Math.hypot(F[0]-f[0],F[1]-f[1])<R)){var y=G(this).on("dblclick.zoom");y&&y.apply(this,arguments)}}}return s.wheelDelta=function(t){return arguments.length?(g=typeof t=="function"?t:J(+t),s):g},s.filter=function(t){return arguments.length?(n=typeof t=="function"?t:J(!!t),s):n},s.touchable=function(t){return arguments.length?(v=typeof t=="function"?t:J(!!t),s):v},s.extent=function(t){return arguments.length?(o=typeof t=="function"?t:J([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),s):o},s.scaleExtent=function(t){return arguments.length?(d[0]=+t[0],d[1]=+t[1],s):[d[0],d[1]]},s.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],s):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},s.constrain=function(t){return arguments.length?(a=t,s):a},s.duration=function(t){return arguments.length?(z=+t,s):z},s.interpolate=function(t){return arguments.length?(x=t,s):x},s.on=function(){var t=p.on.apply(p,arguments);return t===p?s:t},s.clickDistance=function(t){return arguments.length?(S=(t=+t)*t,s):Math.sqrt(S)},s.tapDistance=function(t){return arguments.length?(R=+t,s):R},s}function Jt(n,o){let a=n.scaleIndependentXForm;a||(a=n.scaleIndependentXForm=o.createSVGTransform(),n.transform.baseVal.appendItem(a));const g=n.parentNode;if(g){const v=g.getScreenCTM();if(v){const d=v.inverse().multiply(o.getScreenCTM());d.e=d.f=0,a.setMatrix(d)}}}var $t=zt('<div class="pointer-events-auto absolute bottom-0 left-1 z-20 flex select-none items-center gap-1 rounded-lg bg-muted bg-opacity-80 shadow-md backdrop-blur-sm"><!> <div class="h-6 w-px bg-white bg-opacity-20"></div> <!> <div class="w-[32px] text-center text-sm text-muted-foreground" data-testid="zoom-level"> </div> <!></div>');function te(n,o){var a=$t(),g=j(a);it(g,{variant:"ghost","data-testid":"zoom-reset",size:"sm",get onclick(){return o.onZoomReset},get disabled(){return o.isResetDisabled},children:(x,p)=>{It();var B=At("Reset");L(x,B)},$$slots:{default:!0}});var v=Q(g,4);it(v,{title:"zoom out",variant:"ghost",size:"icon","data-testid":"zoom-out",get onclick(){return o.onZoomOut},get disabled(){return o.isZoominDisabled},children:(x,p)=>{Vt(x,{class:"h-4 w-4"})},$$slots:{default:!0}});var d=Q(v,2),c=j(d);U(d);var z=Q(d,2);it(z,{title:"zoom in",variant:"ghost",size:"icon","data-testid":"zoom-in",get onclick(){return o.onZoomIn},get disabled(){return o.isZoomoutDisabled},children:(x,p)=>{Nt(x,{class:"h-4 w-4"})},$$slots:{default:!0}}),U(a),yt(x=>Yt(c,`${x??""}%`),[()=>Math.round(o.scale*100)]),L(n,a)}var ee=zt('<div class="relative flex h-full w-full select-none items-center justify-center"><!> <svg class="z-10 h-full w-full" preserveAspectRatio="xMidYMid meet"><g><!></g></svg> <svg class="pointer-events-none absolute inset-0" preserveAspectRatio="xMidYMid meet"></svg></div>');function ge(n,o){ut(o,!0);let a=K(null),g=K(null);const v=Pt(o,"cursor",3,"auto");let d=K(800),c=K(600);ht(()=>{if(!u(a))return;O(d,u(a).clientWidth,!0),O(c,u(a).clientHeight,!0);const h=new ResizeObserver(()=>{u(a)&&(O(d,u(a).clientWidth,!0),O(c,u(a).clientHeight,!0))});return h.observe(u(a)),()=>h.disconnect()});const z=10,x=at(()=>{const h={x:0,y:0,width:o.width,height:o.height};if(o.boundingBox){S();const{x:k,y:I,width:q,height:tt}=o.boundingBox;return{x:Math.round(Math.max(0,k-z)),y:Math.round(Math.max(0,I-z)),width:Math.round(Math.min(o.width-k,q+z*2)),height:Math.round(Math.min(o.height-I,tt+z*2))}}return h});let p=K(Et({k:1,x:0,y:0}));const B=at(()=>{if(!u(a))return 1;const h=u(d)/o.width,k=u(c)/o.height,I=Math.min(h,k);return u(p).k*I}),F=at(()=>{if(!u(a))return 1;let h=u(B);if(o.boundingBox){const k=o.width/u(x).width,I=o.height/u(x).height,q=Math.min(k,I);h*=q}return h});let w=K(null);const N=()=>{u(a)&&(O(w,Lt().on("zoom",h=>{O(p,h.transform,!0)}).filter(h=>(!h.ctrlKey||h.type==="wheel")&&!h.button&&!(h.type==="mousedown"&&h.button===2)).wheelDelta(h=>-h.deltaY*.002),!0),G(u(a)).call(u(w)).on("dblclick.zoom",null))},V=h=>{if(!u(a)||!u(w))return;const k=h?1.5:.75;G(u(a)).transition().duration(300).call(u(w).scaleBy,k)},S=()=>{!u(a)||!u(w)||G(u(a)).transition().duration(300).call(u(w).transform,$)},R=()=>{O(p,{k:1,x:0,y:0},!0),u(a)&&u(w)&&G(u(a)).call(u(w).transform,$)};Dt(()=>{var h;N(),(h=o.registerResetFn)==null||h.call(o,R)}),ht(()=>{u(p).k,Xt(".unscaled").each(function(){Jt(this,u(g))})});var s=ee(),Z=j(s);te(Z,{get scale(){return u(B)},onZoomIn:()=>V(!0),onZoomOut:()=>V(!1),onZoomReset:S});var M=Q(Z,2),D=j(M),P=j(D);lt(P,()=>o.zoomableContent,()=>({scale:u(F)})),U(D),U(M),mt(M,h=>O(a,h),()=>u(a));var T=Q(M,2);rt(T,"viewBox","0 0 1024 768"),mt(T,h=>O(g,h),()=>u(g)),U(s),yt(()=>{Rt(M,`cursor: ${v()};`),rt(M,"viewBox",`${u(x).x} ${u(x).y} ${u(x).width} ${u(x).height}`),rt(D,"transform",`translate(${u(p).x}, ${u(p).y}) scale(${u(p).k})`)}),L(n,s),ct()}export{ge as Z,de as a};
@@ -0,0 +1 @@
1
+ const E="modulepreload",y=function(a,l){return new URL(a,l).href},m={},g=function(l,c,u){let f=Promise.resolve();if(c&&c.length>0){const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),h=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));f=Promise.allSettled(c.map(t=>{if(t=y(t,u),t in m)return;m[t]=!0;const o=t.endsWith(".css"),v=o?'[rel="stylesheet"]':"";if(!!u)for(let s=r.length-1;s>=0;s--){const i=r[s];if(i.href===t&&(!o||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${v}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":E,o||(n.as="script"),n.crossOrigin="",n.href=t,h&&n.setAttribute("nonce",h),document.head.appendChild(n),o)return new Promise((s,i)=>{n.addEventListener("load",s),n.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${t}`)))})}))}function d(r){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r}return f.then(r=>{for(const e of r||[])e.status==="rejected"&&d(e.reason);return l().catch(d)})};export{g as _};
@@ -0,0 +1 @@
1
+ import{s as t,p as r}from"./xGHZQ1pe.js";const e={get data(){return r.data},get error(){return r.error},get form(){return r.form},get params(){return r.params},get route(){return r.route},get state(){return r.state},get status(){return r.status},get url(){return r.url}};t.updated.check;const s=e;export{s as p};
@@ -0,0 +1,2 @@
1
+ var gt=Object.defineProperty;var Oe=t=>{throw TypeError(t)};var vt=(t,e,s)=>e in t?gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var N=(t,e,s)=>vt(t,typeof e!="symbol"?e+"":e,s),he=(t,e,s)=>e.has(t)||Oe("Cannot "+s);var S=(t,e,s)=>(he(t,e,"read from private field"),s?s.call(t):e.get(t)),U=(t,e,s)=>e.has(t)?Oe("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),X=(t,e,s,r)=>(he(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),q=(t,e,s)=>(he(t,e,"access private method"),s);import{aQ as _t,aR as pt,aS as mt,A as oe,D as C,P as Ke,V as Se,B as Y,W as Ye,Y as xe,F as K,X as Qe,_ as Xe,g as x,af as yt,Q as bt,R as wt,S as ke,T as ge,U as z,a7 as St,aJ as At,aq as Le,a0 as Tt,ao as Me,aH as Je,M as Ze,aT as ue,Z as ze,aU as fe,aV as Pt,aW as ve,C as ee,az as Et,aX as It,aG as Nt,aY as Ct,a2 as Ot,O as kt,H as We,aZ as et,a_ as Lt,a8 as tt,a$ as Mt,b0 as Rt,G as Dt,b1 as Ft,b2 as Gt,b3 as Ht,b4 as Ut,b5 as qt,b6 as Vt,b7 as $t,b8 as jt,aP as Bt,aO as Kt,y as Ae,i as G,x as le,d as Re,e as De,h as Fe,m as Ge,b as Yt}from"./DkbXUtyG.js";import{c as xt,d as Qt}from"./D9SC3jBb.js";import{i as Xt,n as Jt,a as Zt}from"./eAy8rZzC.js";import{c as st}from"./DtWZc_tl.js";import{G as zt}from"./BpLiSKgx.js";import{R as Wt,j as es,e as ts,k as ss,l as rs,m as is}from"./MErlcOXj.js";function Hs(t,e,s){C&&Ke();var r=t,i=Qe,n,a,u=null,h=_t()?pt:mt;function v(){n&&Xe(n),u!==null&&(u.lastChild.remove(),r.before(u),u=null),n=a}oe(()=>{if(h(i,i=e())){var p=r,y=xe();y&&(u=document.createDocumentFragment(),u.append(p=Se())),a=Y(()=>s(p)),y?Ye.add_callback(v):v()}}),C&&(r=K)}function Us(t,e){return e}function as(t,e,s){for(var r=t.items,i=[],n=e.length,a=0;a<n;a++)It(e[a].e,i,!0);var u=n>0&&i.length===0&&s!==null;if(u){var h=s.parentNode;Nt(h),h.append(s),r.clear(),R(t,e[0].prev,e[n-1].next)}Ct(i,()=>{for(var v=0;v<n;v++){var p=e[v];u||(r.delete(p.k),R(t,p.prev,p.next)),ee(p.e,!u)}})}function qs(t,e,s,r,i,n=null){var a=t,u={flags:e,items:new Map,first:null},h=(e&et)!==0;if(h){var v=t;a=C?ge(Ot(v)):v.appendChild(Se())}C&&Ke();var p=null,y=!1,g=new Map,A=yt(()=>{var T=s();return Ze(T)?T:T==null?[]:Je(T)}),c,_;function d(){ns(_,c,u,g,a,i,e,r,s),n!==null&&(c.length===0?p?ze(p):p=Y(()=>n(a)):p!==null&&Xe(p,()=>{p=null}))}oe(()=>{_??(_=kt),c=x(A);var T=c.length;if(y&&T===0)return;y=T===0;let P=!1;if(C){var b=bt(a)===wt;b!==(T===0)&&(a=ke(),ge(a),z(!1),P=!0)}if(C){for(var m=null,w,o=0;o<T;o++){if(K.nodeType===St&&K.data===At){a=K,P=!0,z(!1);break}var f=c[o],l=r(f,o);w=ye(K,u,m,null,f,l,o,i,e,s),u.items.set(l,w),m=w}T>0&&ge(ke())}if(C)T===0&&n&&(p=Y(()=>n(a)));else if(xe()){var E=new Set,I=Ye;for(o=0;o<T;o+=1){f=c[o],l=r(f,o);var H=u.items.get(l)??g.get(l);H?e&(fe|ue)&&rt(H,f,o,e):(w=ye(null,u,null,null,f,l,o,i,e,s,!0),g.set(l,w)),E.add(l)}for(const[k,ie]of u.items)E.has(k)||I.skipped_effects.add(ie.e);I.add_callback(d)}else d();P&&z(!0),x(A)}),C&&(a=K)}function ns(t,e,s,r,i,n,a,u,h){var Pe,Ee,Ie,Ne;var v=(a&Lt)!==0,p=(a&(fe|ue))!==0,y=e.length,g=s.items,A=s.first,c=A,_,d=null,T,P=[],b=[],m,w,o,f;if(v)for(f=0;f<y;f+=1)m=e[f],w=u(m,f),o=g.get(w),o!==void 0&&((Pe=o.a)==null||Pe.measure(),(T??(T=new Set)).add(o));for(f=0;f<y;f+=1){if(m=e[f],w=u(m,f),o=g.get(w),o===void 0){var l=r.get(w);if(l!==void 0){r.delete(w),g.set(w,l);var E=d?d.next:c;R(s,d,l),R(s,l,E),_e(l,E,i),d=l}else{var I=c?c.e.nodes_start:i;d=ye(I,s,d,d===null?s.first:d.next,m,w,f,n,a,h)}g.set(w,d),P=[],b=[],c=d.next;continue}if(p&&rt(o,m,f,a),o.e.f&ve&&(ze(o.e),v&&((Ee=o.a)==null||Ee.unfix(),(T??(T=new Set)).delete(o))),o!==c){if(_!==void 0&&_.has(o)){if(P.length<b.length){var H=b[0],k;d=H.prev;var ie=P[0],ce=P[P.length-1];for(k=0;k<P.length;k+=1)_e(P[k],H,i);for(k=0;k<b.length;k+=1)_.delete(b[k]);R(s,ie.prev,ce.next),R(s,d,ie),R(s,ce,H),c=H,d=ce,f-=1,P=[],b=[]}else _.delete(o),_e(o,c,i),R(s,o.prev,o.next),R(s,o,d===null?s.first:d.next),R(s,d,o),d=o;continue}for(P=[],b=[];c!==null&&c.k!==w;)c.e.f&ve||(_??(_=new Set)).add(c),b.push(c),c=c.next;if(c===null)continue;o=c}P.push(o),d=o,c=o.next}if(c!==null||_!==void 0){for(var Q=_===void 0?[]:Je(_);c!==null;)c.e.f&ve||Q.push(c),c=c.next;var de=Q.length;if(de>0){var dt=a&et&&y===0?i:null;if(v){for(f=0;f<de;f+=1)(Ie=Q[f].a)==null||Ie.measure();for(f=0;f<de;f+=1)(Ne=Q[f].a)==null||Ne.fix()}as(s,Q,dt)}}v&&We(()=>{var Ce;if(T!==void 0)for(o of T)(Ce=o.a)==null||Ce.apply()}),t.first=s.first&&s.first.e,t.last=d&&d.e;for(var ht of r.values())ee(ht.e);r.clear()}function rt(t,e,s,r){r&fe&&Le(t.v,e),r&ue?Le(t.i,s):t.i=s}function ye(t,e,s,r,i,n,a,u,h,v,p){var y=(h&fe)!==0,g=(h&Pt)===0,A=y?g?Tt(i,!1,!1):Me(i):i,c=h&ue?Me(a):a,_={i:c,v:A,k:n,a:null,e:null,prev:s,next:r};try{if(t===null){var d=document.createDocumentFragment();d.append(t=Se())}return _.e=Y(()=>u(t,A,c,v),C),_.e.prev=s&&s.e,_.e.next=r&&r.e,s===null?p||(e.first=_):(s.next=_,s.e.next=_.e),r!==null&&(r.prev=_,r.e.prev=_.e),_}finally{}}function _e(t,e,s){for(var r=t.next?t.next.e.nodes_start:s,i=e?e.e.nodes_start:s,n=t.e.nodes_start;n!==null&&n!==r;){var a=Et(n);i.before(n),n=a}}function R(t,e,s){e===null?t.first=s:(e.next=s,e.e.next=s&&s.e),s!==null&&(s.prev=e,s.e.prev=e&&e.e)}function os(t,e){var s=void 0,r;oe(()=>{s!==(s=e())&&(r&&(ee(r),r=null),s&&(r=Y(()=>{tt(()=>s(t))})))})}function it(t){var e,s,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(s=it(t[e]))&&(r&&(r+=" "),r+=s)}else for(s in t)t[s]&&(r&&(r+=" "),r+=s);return r}function us(){for(var t,e,s=0,r="",i=arguments.length;s<i;s++)(t=arguments[s])&&(e=it(t))&&(r&&(r+=" "),r+=e);return r}function fs(t){return typeof t=="object"?us(t):t??""}const He=[...`
2
+ \r\f \v\uFEFF`];function ls(t,e,s){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),s){for(var i in s)if(s[i])r=r?r+" "+i:i;else if(r.length)for(var n=i.length,a=0;(a=r.indexOf(i,a))>=0;){var u=a+n;(a===0||He.includes(r[a-1]))&&(u===r.length||He.includes(r[u]))?r=(a===0?"":r.substring(0,a))+r.substring(u+1):a=u}}return r===""?null:r}function Ue(t,e=!1){var s=e?" !important;":";",r="";for(var i in t){var n=t[i];n!=null&&n!==""&&(r+=" "+i+": "+n+s)}return r}function pe(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function cs(t,e){if(e){var s="",r,i;if(Array.isArray(e)?(r=e[0],i=e[1]):r=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var n=!1,a=0,u=!1,h=[];r&&h.push(...Object.keys(r).map(pe)),i&&h.push(...Object.keys(i).map(pe));var v=0,p=-1;const _=t.length;for(var y=0;y<_;y++){var g=t[y];if(u?g==="/"&&t[y-1]==="*"&&(u=!1):n?n===g&&(n=!1):g==="/"&&t[y+1]==="*"?u=!0:g==='"'||g==="'"?n=g:g==="("?a++:g===")"&&a--,!u&&n===!1&&a===0){if(g===":"&&p===-1)p=y;else if(g===";"||y===_-1){if(p!==-1){var A=pe(t.substring(v,p).trim());if(!h.includes(A)){g!==";"&&y++;var c=t.substring(v,y).trim();s+=" "+c+";"}}v=y+1,p=-1}}}}return r&&(s+=Ue(r)),i&&(s+=Ue(i,!0)),s=s.trim(),s===""?null:s}return t==null?null:String(t)}function ds(t,e,s,r,i,n){var a=t.__className;if(C||a!==s||a===void 0){var u=ls(s,r,n);(!C||u!==t.getAttribute("class"))&&(u==null?t.removeAttribute("class"):e?t.className=u:t.setAttribute("class",u)),t.__className=s}else if(n&&i!==n)for(var h in n){var v=!!n[h];(i==null||v!==!!i[h])&&t.classList.toggle(h,v)}return n}function me(t,e={},s,r){for(var i in s){var n=s[i];e[i]!==n&&(s[i]==null?t.style.removeProperty(i):t.style.setProperty(i,n,r))}}function hs(t,e,s,r){var i=t.__style;if(C||i!==e){var n=cs(e,r);(!C||n!==t.getAttribute("style"))&&(n==null?t.removeAttribute("style"):t.style.cssText=n),t.__style=e}else r&&(Array.isArray(r)?(me(t,s==null?void 0:s[0],r[0]),me(t,s==null?void 0:s[1],r[1],"important")):me(t,s,r));return r}function be(t,e,s=!1){if(t.multiple){if(e==null)return;if(!Ze(e))return Mt();for(var r of t.options)r.selected=e.includes(qe(r));return}for(r of t.options){var i=qe(r);if(Rt(i,e)){r.selected=!0;return}}(!s||e!==void 0)&&(t.selectedIndex=-1)}function gs(t){var e=new MutationObserver(()=>{be(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Dt(()=>{e.disconnect()})}function qe(t){return"__value"in t?t.__value:t.value}const J=Symbol("class"),Z=Symbol("style"),at=Symbol("is custom element"),nt=Symbol("is html");function vs(t){if(C){var e=!1,s=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var r=t.value;ae(t,"value",null),t.value=r}if(t.hasAttribute("checked")){var i=t.checked;ae(t,"checked",null),t.checked=i}}};t.__on_r=s,We(s),$t()}}function Vs(t,e){var s=Te(t);s.value===(s.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function _s(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function ae(t,e,s,r){var i=Te(t);C&&(i[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||i[e]!==(i[e]=s)&&(e==="loading"&&(t[jt]=s),s==null?t.removeAttribute(e):typeof s!="string"&&ot(t).includes(e)?t[e]=s:t.setAttribute(e,s))}function ps(t,e,s,r,i=!1,n=!1){if(C&&i&&t.tagName==="INPUT"){var a=t,u=a.type==="checkbox"?"defaultChecked":"defaultValue";u in s||vs(a)}var h=Te(t),v=h[at],p=!h[nt];let y=C&&v;y&&z(!1);var g=e||{},A=t.tagName==="OPTION";for(var c in e)c in s||(s[c]=null);s.class?s.class=fs(s.class):(r||s[J])&&(s.class=null),s[Z]&&(s.style??(s.style=null));var _=ot(t);for(const o in s){let f=s[o];if(A&&o==="value"&&f==null){t.value=t.__value="",g[o]=f;continue}if(o==="class"){var d=t.namespaceURI==="http://www.w3.org/1999/xhtml";ds(t,d,f,r,e==null?void 0:e[J],s[J]),g[o]=f,g[J]=s[J];continue}if(o==="style"){hs(t,f,e==null?void 0:e[Z],s[Z]),g[o]=f,g[Z]=s[Z];continue}var T=g[o];if(!(f===T&&!(f===void 0&&t.hasAttribute(o)))){g[o]=f;var P=o[0]+o[1];if(P!=="$$")if(P==="on"){const l={},E="$$"+o;let I=o.slice(2);var b=Zt(I);if(Xt(I)&&(I=I.slice(0,-7),l.capture=!0),!b&&T){if(f!=null)continue;t.removeEventListener(I,g[E],l),g[E]=null}if(f!=null)if(b)t[`__${I}`]=f,Qt([I]);else{let H=function(k){g[o].call(this,k)};g[E]=xt(I,t,H,l)}else b&&(t[`__${I}`]=void 0)}else if(o==="style")ae(t,o,f);else if(o==="autofocus")Vt(t,!!f);else if(!v&&(o==="__value"||o==="value"&&f!=null))t.value=t.__value=f;else if(o==="selected"&&A)_s(t,f);else{var m=o;p||(m=Jt(m));var w=m==="defaultValue"||m==="defaultChecked";if(f==null&&!v&&!w)if(h[o]=null,m==="value"||m==="checked"){let l=t;const E=e===void 0;if(m==="value"){let I=l.defaultValue;l.removeAttribute(m),l.defaultValue=I,l.value=l.__value=E?I:null}else{let I=l.defaultChecked;l.removeAttribute(m),l.defaultChecked=I,l.checked=E?I:!1}}else t.removeAttribute(o);else w||_.includes(m)&&(v||typeof f!="string")?(t[m]=f,m in h&&(h[m]=Qe)):typeof f!="function"&&ae(t,m,f)}}}return y&&z(!0),g}function $s(t,e,s=[],r=[],i,n=!1,a=!1){Ft(s,r,u=>{var h=void 0,v={},p=t.nodeName==="SELECT",y=!1;if(oe(()=>{var A=e(...u.map(x)),c=ps(t,h,A,i,n,a);y&&p&&"value"in A&&be(t,A.value);for(let d of Object.getOwnPropertySymbols(v))A[d]||ee(v[d]);for(let d of Object.getOwnPropertySymbols(A)){var _=A[d];d.description===Ut&&(!h||_!==h[d])&&(v[d]&&ee(v[d]),v[d]=Y(()=>os(t,()=>_))),c[d]=_}h=c}),p){var g=t;tt(()=>{be(g,h.value,!0),gs(g)})}y=!0})}function Te(t){return t.__attributes??(t.__attributes={[at]:t.nodeName.includes("-"),[nt]:t.namespaceURI===Gt})}var Ve=new Map;function ot(t){var e=t.getAttribute("is")||t.nodeName,s=Ve.get(e);if(s)return s;Ve.set(e,s=[]);for(var r,i=t,n=Element.prototype;n!==i;){r=qt(i);for(var a in r)r[a].set&&s.push(a);i=Ht(i)}return s}const ms="data-no-translate",js="paraglide:lang",Bs="paraglide_lang",ut={},ys=()=>Kt(ut),Ks=t=>{Bt(ut,t)};function Ys(){const t=ys();function e(r,i){return typeof r!="string"||!t?r:t.translateHref(r,i)}function s(r,i){if(r[ms])return r;for(const{attribute_name:n,lang_attribute_name:a}of i)if(n in r){const u=r[n],h=a?r[a]:void 0;r[n]=e(u,typeof h=="string"?h:void 0)}return r}return[e,s]}const ft={setting_id:"00000000-0000-0000-0000-000000000000",grid_view_sample_rendering:"contain",key_hide_annotations:"v",key_go_back:"Escape",key_toggle_edit_mode:"e",show_annotation_text_labels:!0,show_sample_filenames:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()},M=le(ft),$=le(!1),B=le(null),W=le(!1),bs=Ae(M,t=>t.grid_view_sample_rendering||"contain"),ws=Ae(M,t=>t.show_annotation_text_labels??!0),Ss=Ae(M,t=>t.show_sample_filenames??!0),$e=async()=>{if(M.set(ft),!(G(W)||G($))){$.set(!0),B.set(null);try{const{data:t}=await zt();t&&(M.set(t),W.set(!0))}catch(t){B.set(String(t))}finally{$.set(!1)}}},lt=async t=>{$.set(!0),B.set(null);try{const e=G(M),s={setting_id:e.setting_id||"",grid_view_sample_rendering:t.grid_view_sample_rendering||e.grid_view_sample_rendering||"contain",key_hide_annotations:t.key_hide_annotations||e.key_hide_annotations||"v",key_go_back:t.key_go_back||e.key_go_back||"Escape",key_toggle_edit_mode:t.key_toggle_edit_mode||e.key_toggle_edit_mode||"e",show_annotation_text_labels:t.show_annotation_text_labels!==void 0?t.show_annotation_text_labels:e.show_annotation_text_labels??!0,show_sample_filenames:t.show_sample_filenames!==void 0?t.show_sample_filenames:e.show_sample_filenames??!0,created_at:e.created_at||new Date().toISOString(),updated_at:new Date().toISOString()},r=await st.POST("/api/settings",{body:s,headers:{"Content-Type":"application/json"}});if(r.error){const i=JSON.stringify(r.error);return console.error("Settings API error:",i),B.set(i),{success:!1,error:i}}return r.data?(M.set(r.data),{success:!0}):{success:!1,error:"No data returned from API"}}catch(e){const s=String(e);return console.error("Error saving settings:",s),B.set(s),{success:!1,error:s}}finally{$.set(!1)}},As=async t=>lt({grid_view_sample_rendering:t}),Ts=async t=>{const e=!!t,r={...G(M),show_annotation_text_labels:e};try{const i=await st.POST("/api/settings",{body:r,headers:{"Content-Type":"application/json"}});return i.error?(console.error("API error saving setting:",i.error),{success:!1,error:JSON.stringify(i.error)}):i.data?(M.set(i.data),{success:!0}):{success:!1,error:"No data returned from API"}}catch(i){return console.error("Error saving annotation text label setting:",i),{success:!1,error:String(i)}}};function xs(){return!G(W)&&!G($)&&$e(),{settingsStore:M,isLoadingStore:$,errorStore:B,isLoadedStore:W,gridViewSampleRenderingStore:bs,showAnnotationTextLabelsStore:ws,showSampleFilenamesStore:Ss,initSettings:$e,saveSettings:lt,updateGridViewSampleRendering:As,updateShowAnnotationTextLabels:Ts,get settings(){return G(M)},get isLoading(){return G($)},get error(){return G(B)},get isLoaded(){return G(W)}}}var D,O,j,F,V,Be,Qs=(Be=class extends Wt{constructor(e){super();U(this,F);U(this,D);U(this,O);U(this,j);this.mutationId=e.mutationId,X(this,O,e.mutationCache),X(this,D,[]),this.state=e.state||Ps(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){S(this,D).includes(e)||(S(this,D).push(e),this.clearGcTimeout(),S(this,O).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){X(this,D,S(this,D).filter(s=>s!==e)),this.scheduleGc(),S(this,O).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){S(this,D).length||(this.state.status==="pending"?this.scheduleGc():S(this,O).remove(this))}continue(){var e;return((e=S(this,j))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,n,a,u,h,v,p,y,g,A,c,_,d,T,P,b,m,w,o,f;X(this,j,es({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(l,E)=>{q(this,F,V).call(this,{type:"failed",failureCount:l,error:E})},onPause:()=>{q(this,F,V).call(this,{type:"pause"})},onContinue:()=>{q(this,F,V).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>S(this,O).canRun(this)}));const s=this.state.status==="pending",r=!S(this,j).canStart();try{if(!s){q(this,F,V).call(this,{type:"pending",variables:e,isPaused:r}),await((n=(i=S(this,O).config).onMutate)==null?void 0:n.call(i,e,this));const E=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,e));E!==this.state.context&&q(this,F,V).call(this,{type:"pending",context:E,variables:e,isPaused:r})}const l=await S(this,j).start();return await((v=(h=S(this,O).config).onSuccess)==null?void 0:v.call(h,l,e,this.state.context,this)),await((y=(p=this.options).onSuccess)==null?void 0:y.call(p,l,e,this.state.context)),await((A=(g=S(this,O).config).onSettled)==null?void 0:A.call(g,l,null,this.state.variables,this.state.context,this)),await((_=(c=this.options).onSettled)==null?void 0:_.call(c,l,null,e,this.state.context)),q(this,F,V).call(this,{type:"success",data:l}),l}catch(l){try{throw await((T=(d=S(this,O).config).onError)==null?void 0:T.call(d,l,e,this.state.context,this)),await((b=(P=this.options).onError)==null?void 0:b.call(P,l,e,this.state.context)),await((w=(m=S(this,O).config).onSettled)==null?void 0:w.call(m,void 0,l,this.state.variables,this.state.context,this)),await((f=(o=this.options).onSettled)==null?void 0:f.call(o,void 0,l,e,this.state.context)),l}finally{q(this,F,V).call(this,{type:"error",error:l})}}finally{S(this,O).runNext(this)}}},D=new WeakMap,O=new WeakMap,j=new WeakMap,F=new WeakSet,V=function(e){const s=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ts.batch(()=>{S(this,D).forEach(r=>{r.onMutationUpdate(e)}),S(this,O).notify({mutation:this,type:"updated",action:e})})},Be);function Ps(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}function Xs(t){return{onFetch:(e,s)=>{var p,y,g,A,c;const r=e.options,i=(g=(y=(p=e.fetchOptions)==null?void 0:p.meta)==null?void 0:y.fetchMore)==null?void 0:g.direction,n=((A=e.state.data)==null?void 0:A.pages)||[],a=((c=e.state.data)==null?void 0:c.pageParams)||[];let u={pages:[],pageParams:[]},h=0;const v=async()=>{let _=!1;const d=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(e.signal.aborted?_=!0:e.signal.addEventListener("abort",()=>{_=!0}),e.signal)})},T=ss(e.options,e.fetchOptions),P=async(b,m,w)=>{if(_)return Promise.reject();if(m==null&&b.pages.length)return Promise.resolve(b);const o={client:e.client,queryKey:e.queryKey,pageParam:m,direction:w?"backward":"forward",meta:e.options.meta};d(o);const f=await T(o),{maxPages:l}=e.options,E=w?rs:is;return{pages:E(b.pages,f,l),pageParams:E(b.pageParams,m,l)}};if(i&&n.length){const b=i==="backward",m=b?ct:we,w={pages:n,pageParams:a},o=m(r,w);u=await P(w,o,b)}else{const b=t??n.length;do{const m=h===0?a[0]??r.initialPageParam:we(r,u);if(h>0&&m==null)break;u=await P(u,m),h++}while(h<b)}return u};e.options.persister?e.fetchFn=()=>{var _,d;return(d=(_=e.options).persister)==null?void 0:d.call(_,v,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=v}}}function we(t,{pages:e,pageParams:s}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function ct(t,{pages:e,pageParams:s}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,s[0],s):void 0}function Js(t,e){return e?we(t,e)!=null:!1}function Zs(t,e){return!e||!t.getPreviousPageParam?!1:ct(t,e)!=null}function zs(...t){return t.filter(Boolean).join(" ")}const Es=typeof document<"u";let je=0;var te,se,re;class Is{constructor(){U(this,te,Re(De([])));U(this,se,Re(De([])));U(this,re,e=>{const s=this.toasts.findIndex(r=>r.id===e);return s===-1?null:s});N(this,"addToast",e=>{Es&&this.toasts.unshift(e)});N(this,"updateToast",({id:e,data:s,type:r,message:i})=>{const n=this.toasts.findIndex(u=>u.id===e),a=this.toasts[n];this.toasts[n]={...a,...s,id:e,title:i,type:r,updated:!0}});N(this,"create",e=>{var u;const{message:s,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||e.id&&((u=e.id)==null?void 0:u.length)>0?e.id:je++,n=e.dismissable===void 0?!0:e.dismissable,a=e.type===void 0?"default":e.type;return Ge(()=>{this.toasts.find(v=>v.id===i)?this.updateToast({id:i,data:e,type:a,message:s,dismissable:n}):this.addToast({...r,id:i,title:s,dismissable:n,type:a})}),i});N(this,"dismiss",e=>(Ge(()=>{if(e===void 0){this.toasts=this.toasts.map(r=>({...r,dismiss:!0}));return}const s=this.toasts.findIndex(r=>r.id===e);this.toasts[s]&&(this.toasts[s]={...this.toasts[s],dismiss:!0})}),e));N(this,"remove",e=>{if(e===void 0){this.toasts=[];return}const s=S(this,re).call(this,e);if(s!==null)return this.toasts.splice(s,1),e});N(this,"message",(e,s)=>this.create({...s,type:"default",message:e}));N(this,"error",(e,s)=>this.create({...s,type:"error",message:e}));N(this,"success",(e,s)=>this.create({...s,type:"success",message:e}));N(this,"info",(e,s)=>this.create({...s,type:"info",message:e}));N(this,"warning",(e,s)=>this.create({...s,type:"warning",message:e}));N(this,"loading",(e,s)=>this.create({...s,type:"loading",message:e}));N(this,"promise",(e,s)=>{if(!s)return;let r;s.loading!==void 0&&(r=this.create({...s,promise:e,type:"loading",message:typeof s.loading=="string"?s.loading:s.loading()}));const i=e instanceof Promise?e:e();let n=r!==void 0;return i.then(a=>{if(typeof a=="object"&&a&&"ok"in a&&typeof a.ok=="boolean"&&!a.ok){n=!1;const u=Ns(a);this.create({id:r,type:"error",message:u})}else if(s.success!==void 0){n=!1;const u=typeof s.success=="function"?s.success(a):s.success;this.create({id:r,type:"success",message:u})}}).catch(a=>{if(s.error!==void 0){n=!1;const u=typeof s.error=="function"?s.error(a):s.error;this.create({id:r,type:"error",message:u})}}).finally(()=>{var a;n&&(this.dismiss(r),r=void 0),(a=s.finally)==null||a.call(s)}),r});N(this,"custom",(e,s)=>{const r=(s==null?void 0:s.id)||je++;return this.create({component:e,id:r,...s}),r});N(this,"removeHeight",e=>{this.heights=this.heights.filter(s=>s.toastId!==e)});N(this,"setHeight",e=>{const s=S(this,re).call(this,e.toastId);if(s===null){this.heights.push(e);return}this.heights[s]=e});N(this,"reset",()=>{this.toasts=[],this.heights=[]})}get toasts(){return x(S(this,te))}set toasts(e){Fe(S(this,te),e,!0)}get heights(){return x(S(this,se))}set heights(e){Fe(S(this,se),e,!0)}}te=new WeakMap,se=new WeakMap,re=new WeakMap;function Ns(t){return t&&typeof t=="object"&&"status"in t?`HTTP error! Status: ${t.status}`:`Error! ${t}`}const L=new Is;function Cs(t,e){return L.create({message:t,...e})}var ne;class Ws{constructor(){U(this,ne,Yt(()=>L.toasts.filter(e=>!e.dismiss)))}get toasts(){return x(S(this,ne))}}ne=new WeakMap;const Os=Cs,er=Object.assign(Os,{success:L.success,info:L.info,warning:L.warning,error:L.error,custom:L.custom,message:L.message,promise:L.promise,dismiss:L.dismiss,loading:L.loading,getActiveToasts:()=>L.toasts.filter(t=>!t.dismiss)});export{Bs as L,Qs as M,Z as S,ds as a,$s as b,fs as c,hs as d,qs as e,Ks as f,Ys as g,js as h,Us as i,Xs as j,Hs as k,L as l,zs as m,Ws as n,us as o,Zs as p,Js as q,Ps as r,ae as s,er as t,xs as u,vs as v,Vs as w};