lightly-studio 0.3.1__py3-none-any.whl → 0.3.2__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.

Potentially problematic release.


This version of lightly-studio might be problematic. Click here for more details.

Files changed (133) hide show
  1. lightly_studio/__init__.py +4 -4
  2. lightly_studio/api/app.py +1 -1
  3. lightly_studio/api/routes/api/annotation.py +6 -16
  4. lightly_studio/api/routes/api/annotation_label.py +2 -5
  5. lightly_studio/api/routes/api/annotation_task.py +4 -5
  6. lightly_studio/api/routes/api/classifier.py +2 -5
  7. lightly_studio/api/routes/api/dataset.py +2 -3
  8. lightly_studio/api/routes/api/dataset_tag.py +2 -3
  9. lightly_studio/api/routes/api/metadata.py +2 -4
  10. lightly_studio/api/routes/api/metrics.py +2 -6
  11. lightly_studio/api/routes/api/sample.py +5 -13
  12. lightly_studio/api/routes/api/settings.py +2 -6
  13. lightly_studio/api/routes/images.py +6 -6
  14. lightly_studio/core/add_samples.py +383 -0
  15. lightly_studio/core/dataset.py +250 -362
  16. lightly_studio/core/dataset_query/__init__.py +0 -0
  17. lightly_studio/core/dataset_query/boolean_expression.py +67 -0
  18. lightly_studio/core/dataset_query/dataset_query.py +211 -0
  19. lightly_studio/core/dataset_query/field.py +113 -0
  20. lightly_studio/core/dataset_query/field_expression.py +79 -0
  21. lightly_studio/core/dataset_query/match_expression.py +23 -0
  22. lightly_studio/core/dataset_query/order_by.py +79 -0
  23. lightly_studio/core/dataset_query/sample_field.py +28 -0
  24. lightly_studio/core/dataset_query/tags_expression.py +46 -0
  25. lightly_studio/core/sample.py +159 -32
  26. lightly_studio/core/start_gui.py +35 -0
  27. lightly_studio/dataset/edge_embedding_generator.py +13 -8
  28. lightly_studio/dataset/embedding_generator.py +2 -3
  29. lightly_studio/dataset/embedding_manager.py +74 -6
  30. lightly_studio/dataset/fsspec_lister.py +275 -0
  31. lightly_studio/dataset/loader.py +49 -30
  32. lightly_studio/dataset/mobileclip_embedding_generator.py +6 -4
  33. lightly_studio/db_manager.py +145 -0
  34. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/SelectableSvgGroup.BBm0IWdq.css +1 -0
  35. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/SelectableSvgGroup.BNTuXSAe.css +1 -0
  36. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/2O287xak.js +3 -0
  37. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{O-EABkf9.js → 7YNGEs1C.js} +1 -1
  38. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BBoGk9hq.js +1 -0
  39. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BRnH9v23.js +92 -0
  40. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Bg1Y5eUZ.js +1 -0
  41. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DOlTMNyt.js → BqBqV92V.js} +1 -1
  42. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C0JiMuYn.js +1 -0
  43. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DjfY96ND.js → C98Hk3r5.js} +1 -1
  44. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{r64xT6ao.js → CG0dMCJi.js} +1 -1
  45. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{C8I8rFJQ.js → Ccq4ZD0B.js} +1 -1
  46. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cpy-nab_.js +1 -0
  47. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Bu7uvVrG.js → Crk-jcvV.js} +1 -1
  48. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cs31G8Qn.js +1 -0
  49. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CsKrY2zA.js +1 -0
  50. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{x9G_hzyY.js → Cur71c3O.js} +1 -1
  51. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CzgC3GFB.js +1 -0
  52. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D8GZDMNN.js +1 -0
  53. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DFRh-Spp.js +1 -0
  54. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{BylOuP6i.js → DRZO-E-T.js} +1 -1
  55. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{l7KrR96u.js → DcGCxgpH.js} +1 -1
  56. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Bsi3UGy5.js → Df3aMO5B.js} +1 -1
  57. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{hQVEETDE.js → DkR_EZ_B.js} +1 -1
  58. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DqUGznj_.js +1 -0
  59. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/KpAtIldw.js +1 -0
  60. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/M1Q1F7bw.js +4 -0
  61. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{CDnpyLsT.js → OH7-C_mc.js} +1 -1
  62. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{D6su9Aln.js → gLNdjSzu.js} +1 -1
  63. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/i0ZZ4z06.js +1 -0
  64. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.BI-EA5gL.js +2 -0
  65. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.CcsRl3cZ.js +1 -0
  66. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.BbO4Zc3r.js +1 -0
  67. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{1.B4rNYwVp.js → 1._I9GR805.js} +1 -1
  68. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.J2RBFrSr.js +1 -0
  69. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.Cmqj25a-.js +1 -0
  70. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/2.C45iKJHA.js +6 -0
  71. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{3.CWHpKonm.js → 3.w9g4AcAx.js} +1 -1
  72. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{4.OUWOLQeV.js → 4.BBI8KwnD.js} +1 -1
  73. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.huHuxdiF.js +1 -0
  74. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/6.CrbkRPam.js +1 -0
  75. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.FomEdhD6.js +1 -0
  76. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.Cb_ADSLk.js +1 -0
  77. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{9.CPu3CiBc.js → 9.CajIG5ce.js} +1 -1
  78. lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -1
  79. lightly_studio/dist_lightly_studio_view_app/index.html +14 -14
  80. lightly_studio/examples/example.py +13 -12
  81. lightly_studio/examples/example_coco.py +13 -0
  82. lightly_studio/examples/example_metadata.py +83 -98
  83. lightly_studio/examples/example_selection.py +7 -19
  84. lightly_studio/examples/example_split_work.py +12 -36
  85. lightly_studio/examples/{example_v2.py → example_yolo.py} +3 -4
  86. lightly_studio/models/annotation/annotation_base.py +7 -8
  87. lightly_studio/models/annotation/instance_segmentation.py +8 -8
  88. lightly_studio/models/annotation/object_detection.py +4 -4
  89. lightly_studio/models/dataset.py +6 -2
  90. lightly_studio/models/sample.py +10 -3
  91. lightly_studio/resolvers/dataset_resolver.py +10 -0
  92. lightly_studio/resolvers/embedding_model_resolver.py +22 -0
  93. lightly_studio/resolvers/sample_resolver.py +53 -9
  94. lightly_studio/resolvers/tag_resolver.py +23 -0
  95. lightly_studio/selection/select.py +55 -46
  96. lightly_studio/selection/select_via_db.py +23 -19
  97. lightly_studio/selection/selection_config.py +6 -3
  98. lightly_studio/services/annotations_service/__init__.py +4 -0
  99. lightly_studio/services/annotations_service/update_annotation.py +21 -32
  100. lightly_studio/services/annotations_service/update_annotation_bounding_box.py +36 -0
  101. lightly_studio-0.3.2.dist-info/METADATA +689 -0
  102. {lightly_studio-0.3.1.dist-info → lightly_studio-0.3.2.dist-info}/RECORD +104 -91
  103. lightly_studio/api/db.py +0 -133
  104. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/SelectableSvgGroup.OwPEPQZu.css +0 -1
  105. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/SelectableSvgGroup.b653GmVf.css +0 -1
  106. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/B2FVR0s0.js +0 -1
  107. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/B9zumHo5.js +0 -1
  108. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BJXwVxaE.js +0 -1
  109. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Bx1xMsFy.js +0 -1
  110. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CcaPhhk3.js +0 -1
  111. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CvOmgdoc.js +0 -93
  112. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CxtLVaYz.js +0 -3
  113. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D5-A_Ffd.js +0 -4
  114. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D6RI2Zrd.js +0 -1
  115. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D98V7j6A.js +0 -1
  116. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DIRAtgl0.js +0 -1
  117. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DjUWrjOv.js +0 -1
  118. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/XO7A28GO.js +0 -1
  119. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/nAHhluT7.js +0 -1
  120. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/vC4nQVEB.js +0 -1
  121. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.CjnvpsmS.js +0 -2
  122. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.0o1H7wM9.js +0 -1
  123. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.XRq_TUwu.js +0 -1
  124. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.DfBwOEhN.js +0 -1
  125. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.CwF2_8mP.js +0 -1
  126. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/2.CS4muRY-.js +0 -6
  127. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.Dm6t9F5W.js +0 -1
  128. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/6.Bw5ck4gK.js +0 -1
  129. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.CF0EDTR6.js +0 -1
  130. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.Cw30LEcV.js +0 -1
  131. lightly_studio-0.3.1.dist-info/METADATA +0 -520
  132. /lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/{OpenSans- → OpenSans-Medium.DVUZMR_6.ttf} +0 -0
  133. {lightly_studio-0.3.1.dist-info → lightly_studio-0.3.2.dist-info}/WHEEL +0 -0
@@ -0,0 +1,3 @@
1
+ var tt=e=>{throw TypeError(e)};var Gt=(e,t,n)=>t.has(e)||tt("Cannot "+n);var k=(e,t,n)=>(Gt(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?tt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{aG as mt,u as Mt,b as he,i as _t,w as De,a7 as C,g as N,J as O,aw as qt}from"./DcGCxgpH.js";import{l as Ht}from"./DIeogL5L.js";import{H as Se,S as Fe,R as Ve}from"./CYgJF_JY.js";function ge(e){he===null&&mt(),Ht&&he.l!==null?Kt(he).m.push(e):Mt(()=>{const t=_t(e);if(typeof t=="function")return t})}function zn(e){he===null&&mt(),ge(()=>()=>_t(e))}function Kt(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}new URL("sveltekit-internal://");function Wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Yt(e){return e.split("%25").map(decodeURI).join("%25")}function Jt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function Te({href:e}){return e.split("#")[0]}function zt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function Xt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function Zt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}const Qt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&Y.delete(Be(e)),Qt(e,t));const Y=new Map;function en(e,t){const n=Be(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Zt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function tn(e,t,n){if(Y.size>0){const r=Be(e,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(t,n)}function Be(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Xt(...a)}"]`}return r}const nn=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function an(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${on(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return Pe(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Pe(String.fromCharCode(...c.slice(2).split("-").map(p=>parseInt(p,16))));const h=nn.exec(c),[,u,_,f,m]=h;return t.push({name:f,matcher:m,optional:!!u,rest:!!_,chained:_?l===1&&i[0]==="":!1}),_?"(.*?)":u?"([^/]*)?":"([^/]+?)"}return Pe(c)}).join("")}).join("")}/?$`),params:t}}function rn(e){return!/^\([^)]+\)$/.test(e)}function on(e){return e.slice(1).split("/").filter(rn)}function sn(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(h=>h).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const h=t[o+1],u=a[o+1];h&&!h.rest&&h.optional&&u&&c.chained&&(i=0),!h&&!u&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function Pe(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function cn({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,h]])=>{const{pattern:u,params:_}=an(o),f={id:o,exec:m=>{const p=u.exec(m);if(p)return sn(p,_,r)},errors:[1,...h||[]].map(m=>e[m]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function wt(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function nt(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}var ut;const P=((ut=globalThis.__sveltekit_1hp03lk)==null?void 0:ut.base)??"";var dt;const ln=((dt=globalThis.__sveltekit_1hp03lk)==null?void 0:dt.assets)??P,fn="1758802389068",yt="sveltekit:snapshot",vt="sveltekit:scroll",bt="sveltekit:states",un="sveltekit:pageurl",M="sveltekit:history",z="sveltekit:navigation",V={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},fe=location.origin;function kt(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function Ge(){return{x:pageXOffset,y:pageYOffset}}function G(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const at={...V,"":V.hover};function At(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function St(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=At(e)}}function Oe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||Ee(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===fe&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function me(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=G(o,"preload-code")),a===null&&(a=G(o,"preload-data")),t===null&&(t=G(o,"keepfocus")),n===null&&(n=G(o,"noscroll")),s===null&&(s=G(o,"reload")),i===null&&(i=G(o,"replacestate")),o=At(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:at[r??"off"],preload_data:at[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function rt(e){const t=De(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const Et={v:()=>{}};function dn(){const{set:e,subscribe:t}=De(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${ln}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==fn;return i&&(e(!0),Et.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function Ee(e,t,n){return e.origin!==fe||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function Xn(e){}function ot(e){const t=pn(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const hn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function pn(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=hn.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const gn=-1,mn=-2,_n=-3,wn=-4,yn=-5,vn=-6;function bn(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===gn)return;if(s===_n)return NaN;if(s===wn)return 1/0;if(s===yn)return-1/0;if(s===vn)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t==null?void 0:t[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const h=new Set;r[s]=h;for(let f=1;f<o.length;f+=1)h.add(a(o[f]));break;case"Map":const u=new Map;r[s]=u;for(let f=1;f<o.length;f+=2)u.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const _=Object.create(null);r[s]=_;for(let f=1;f<o.length;f+=2)_[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],m=o[1],p=ot(m),d=new f(p);r[s]=d;break}case"ArrayBuffer":{const f=o[1],m=ot(f);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const h=o[l];h!==mn&&(c[l]=a(h))}}else{const c={};r[s]=c;for(const l in o){const h=o[l];c[l]=a(h)}}return r[s]}return a(0)}const Rt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Rt];const kn=new Set([...Rt]);[...kn];function An(e){return e.filter(t=>t!=null)}const Sn="x-sveltekit-invalidated",En="x-sveltekit-trailing-slash";function _e(e){return e instanceof Se||e instanceof Fe?e.status:500}function Rn(e){return e instanceof Fe?e.text:"Internal Error"}let R,X,xe;const In=ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(ge.toString());var ee,te,ne,ae,re,oe,se,ie,ht,ce,pt,le,gt;In?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},X={current:null},xe={current:!1}):(R=new(ht=class{constructor(){x(this,ee,C({}));x(this,te,C(null));x(this,ne,C(null));x(this,ae,C({}));x(this,re,C({id:null}));x(this,oe,C({}));x(this,se,C(-1));x(this,ie,C(new URL("https://example.com")))}get data(){return N(k(this,ee))}set data(t){O(k(this,ee),t)}get form(){return N(k(this,te))}set form(t){O(k(this,te),t)}get error(){return N(k(this,ne))}set error(t){O(k(this,ne),t)}get params(){return N(k(this,ae))}set params(t){O(k(this,ae),t)}get route(){return N(k(this,re))}set route(t){O(k(this,re),t)}get state(){return N(k(this,oe))}set state(t){O(k(this,oe),t)}get status(){return N(k(this,se))}set status(t){O(k(this,se),t)}get url(){return N(k(this,ie))}set url(t){O(k(this,ie),t)}},ee=new WeakMap,te=new WeakMap,ne=new WeakMap,ae=new WeakMap,re=new WeakMap,oe=new WeakMap,se=new WeakMap,ie=new WeakMap,ht),X=new(pt=class{constructor(){x(this,ce,C(null))}get current(){return N(k(this,ce))}set current(t){O(k(this,ce),t)}},ce=new WeakMap,pt),xe=new(gt=class{constructor(){x(this,le,C(!1))}get current(){return N(k(this,le))}set current(t){O(k(this,le),t)}},le=new WeakMap,gt),Et.v=()=>xe.current=!0);function It(e){Object.assign(R,e)}const Un="/__data.json",Ln=".html__data.json";function Tn(e){return e.endsWith(".html")?e.replace(/\.html$/,Ln):e.replace(/\/$/,"")+Un}const Pn=new Set(["icon","shortcut icon","apple-touch-icon"]),B=wt(vt)??{},Z=wt(yt)??{},D={url:rt({}),page:rt({}),navigating:De(null),updated:dn()};function Me(e){B[e]=Ge()}function xn(e,t){let n=e+1;for(;B[n];)delete B[n],n+=1;for(n=t+1;Z[n];)delete Z[n],n+=1}function K(e){return location.href=e.href,new Promise(()=>{})}async function Ut(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(P||"/");e&&await e.update()}}function st(){}let qe,je,we,j,$e,A;const ye=[],ve=[];let L=null;const de=new Map,He=new Set,Cn=new Set,q=new Set;let y={branch:[],error:null,url:null},Ke=!1,be=!1,it=!0,Q=!1,W=!1,Lt=!1,We=!1,Ye,E,T,$;const J=new Set;let Ce;async function ta(e,t,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),A=e,await((s=(a=e.hooks).init)==null?void 0:s.call(a)),qe=cn(e),j=document.documentElement,$e=t,je=e.nodes[0],we=e.nodes[1],je(),we(),E=(i=history.state)==null?void 0:i[M],T=(o=history.state)==null?void 0:o[z],E||(E=T=Date.now(),history.replaceState({...history.state,[M]:E,[z]:T},""));const r=B[E];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await Mn($e,n):await Bn(A.hash?Hn(new URL(location.href)):location.href,{replaceState:!0}),Gn()}async function Nn(){if(await(Ce||(Ce=Promise.resolve())),!Ce)return;Ce=null;const e=$={},t=await ue(y.url,!0);L=null;const n=t&&await Xe(t);if(!(!n||e!==$)){if(n.type==="redirect")return Re(new URL(n.location,y.url).href,{},1,e);n.props.page&&Object.assign(R,n.props.page),y=n.state,Tt(),Ye.$set(n.props),It(n.props.page)}}function Tt(){ye.length=0,We=!1}function Pt(e){ve.some(t=>t==null?void 0:t.snapshot)&&(Z[e]=ve.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function xt(e){var t;(t=Z[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=ve[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ct(){Me(E),nt(vt,B),Pt(T),nt(yt,Z)}async function Re(e,t,n,r){return pe({type:"goto",url:kt(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(We=!0),t.invalidate&&t.invalidate.forEach(Dt)}})}async function On(e){if(e.id!==(L==null?void 0:L.id)){const t={};J.add(t),L={id:e.id,token:t,promise:Xe({...e,preload:t}).then(n=>(J.delete(t),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function Ne(e){var n;const t=(n=await ue(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].map(r=>r==null?void 0:r[1]()))}function Ct(e,t,n){var s;y=e.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(R,e.props.page),Ye=new A.root({target:t,props:{...e.props,stores:D,components:ve},hydrate:n,sync:!1}),xt(T);const a={from:null,to:{params:y.params,route:{id:((s=y.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};q.forEach(i=>i(a)),be=!0}function ke({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(P&&(e.pathname===P||e.pathname===P+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);e.pathname=Wt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:An(n).map(f=>f.node.component),page:Ze(R)}};i!==void 0&&(c.props.form=i);let l={},h=!R,u=0;for(let f=0;f<Math.max(n.length,y.branch.length);f+=1){const m=n[f],p=y.branch[f];(m==null?void 0:m.data)!==(p==null?void 0:p.data)&&(h=!0),m&&(l={...l,...m.data},h&&(c.props[`data_${u}`]=l),u+=1)}return(!y.url||e.href!==y.url.href||y.error!==a||i!==void 0&&i!==R.form||h)&&(c.props.page={error:a,params:t,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:i??null,data:h?l:R.data}),c}async function Je({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){var h,u,_;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if((h=l.universal)!=null&&h.load){let f=function(...p){for(const d of p){const{href:v}=new URL(d,n);c.dependencies.add(v)}};const m={route:new Proxy(a,{get:(p,d)=>(o&&(c.route=!0),p[d])}),params:new Proxy(r,{get:(p,d)=>(o&&c.params.add(d),p[d])}),data:(s==null?void 0:s.data)??null,url:zt(n,()=>{o&&(c.url=!0)},p=>{o&&c.search_params.add(p)},A.hash),async fetch(p,d){p instanceof Request&&(d={body:p.method==="GET"||p.method==="HEAD"?void 0:await p.blob(),cache:p.cache,credentials:p.credentials,headers:[...p.headers].length?p.headers:void 0,integrity:p.integrity,keepalive:p.keepalive,method:p.method,mode:p.mode,redirect:p.redirect,referrer:p.referrer,referrerPolicy:p.referrerPolicy,signal:p.signal,...d});const{resolved:v,promise:I}=Nt(p,d,n);return o&&f(v.href),I},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),t()},untrack(p){o=!1;try{return p()}finally{o=!0}}};i=await l.universal.load.call(null,m)??null}return{node:l,loader:e,server:s,universal:(u=l.universal)!=null&&u.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((_=l.universal)==null?void 0:_.trailingSlash)??(s==null?void 0:s.slash)}}function Nt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=be?tn(r,a.href,t):en(r,t);return{resolved:a,promise:s}}function lt(e,t,n,r,a,s){if(We)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==y.params[i])return!0;for(const i of a.dependencies)if(ye.some(o=>o(new URL(i))))return!0;return!1}function ze(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function jn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function ft({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ze(R),constructors:[]}}}async function Xe({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===e)return J.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let h=null;const u=y.url?e!==Ae(y.url):!1,_=y.route?a.id!==y.route.id:!1,f=jn(y.url,n);let m=!1;const p=l.map((g,w)=>{var F;const b=y.branch[w],S=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||lt(m,_,u,f,(F=b.server)==null?void 0:F.uses,r));return S&&(m=!0),S});if(p.some(Boolean)){try{h=await Ft(n,p)}catch(g){const w=await H(g,{url:n,params:r,route:{id:e}});return J.has(s)?ft({error:w,url:n,params:r,route:a}):Ie({status:_e(g),error:w,url:n,route:a})}if(h.type==="redirect")return h}const d=h==null?void 0:h.nodes;let v=!1;const I=l.map(async(g,w)=>{var Ue;if(!g)return;const b=y.branch[w],S=d==null?void 0:d[w];if((!S||S.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!lt(v,_,u,f,(Ue=b.universal)==null?void 0:Ue.uses,r))return b;if(v=!0,(S==null?void 0:S.type)==="error")throw S;return Je({loader:g[1],url:n,params:r,route:a,parent:async()=>{var et;const Qe={};for(let Le=0;Le<w;Le+=1)Object.assign(Qe,(et=await I[Le])==null?void 0:et.data);return Qe},server_data_node:ze(S===void 0&&g[0]?{type:"skip"}:S??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of I)g.catch(()=>{});const U=[];for(let g=0;g<l.length;g+=1)if(l[g])try{U.push(await I[g])}catch(w){if(w instanceof Ve)return{type:"redirect",location:w.location};if(J.has(s))return ft({error:await H(w,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=_e(w),S;if(d!=null&&d.includes(w))b=w.status??b,S=w.error;else if(w instanceof Se)S=w.body;else{if(await D.updated.check())return await Ut(),await K(n);S=await H(w,{params:r,url:n,route:{id:a.id}})}const F=await $n(g,U,i);return F?ke({url:n,params:r,branch:U.slice(0,F.idx).concat(F.node),status:b,error:S,route:a}):await jt(n,{id:a.id},S,b)}else U.push(void 0);return ke({url:n,params:r,branch:U,status:200,error:null,route:a,form:t?void 0:null})}async function $n(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ie({status:e,error:t,url:n,route:r}){const a={};let s=null;if(A.server_loads[0]===0)try{const o=await Ft(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==fe||n.pathname!==location.pathname||Ke)&&await K(n)}try{const o=await Je({loader:je,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:ze(s)}),c={node:await we(),loader:we,universal:null,server:null,data:null};return ke({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Ve)return Re(new URL(o.location,location.href),{},0);throw o}}async function Dn(e){const t=e.href;if(de.has(t))return de.get(t);let n;try{const r=(async()=>{let a=await A.hooks.reroute({url:new URL(e),fetch:async(s,i)=>Nt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);A.hash?s.hash=a:s.pathname=a,a=s}return a})();de.set(t,r),n=await r}catch{de.delete(t);return}return n}async function ue(e,t){if(e&&!Ee(e,P,A.hash)){const n=await Dn(e);if(!n)return;const r=Fn(n);for(const a of qe){const s=a.exec(r);if(s)return{id:Ae(e),invalidating:t,route:a,params:Jt(s),url:e}}}}function Fn(e){return Yt(A.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(P.length))||"/"}function Ae(e){return(A.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function Ot({url:e,type:t,intent:n,delta:r}){let a=!1;const s=Bt(y,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Q||He.forEach(o=>o(i)),a?null:s}async function pe({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=st,block:h=st}){const u=$;$=c;const _=await ue(t,!1),f=Ot({url:t,type:e,delta:n==null?void 0:n.delta,intent:_});if(!f){h(),$===c&&($=u);return}const m=E,p=T;l(),Q=!0,be&&D.navigating.set(X.current=f.navigation);let d=_&&await Xe(_);if(!d){if(Ee(t,P,A.hash))return await K(t);d=await jt(t,{id:null},await H(new Fe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=(_==null?void 0:_.url)||t,$!==c)return f.reject(new Error("navigation aborted")),!1;if(d.type==="redirect")if(o>=20)d=await Ie({status:500,error:await H(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await Re(new URL(d.location,t).href,{},o+1,c),!1;else d.props.page.status>=400&&await D.updated.check()&&(await Ut(),await K(t));if(Tt(),Me(m),Pt(p),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,w={[M]:E+=g,[z]:T+=g,[bt]:i};(s?history.replaceState:history.pushState).call(history,w,"",t),s||xn(E,T)}if(L=null,d.props.page.state=i,be){y=d.state,d.props.page&&(d.props.page.url=t);const g=(await Promise.all(Array.from(Cn,w=>w(f.navigation)))).filter(w=>typeof w=="function");if(g.length>0){let w=function(){g.forEach(b=>{q.delete(b)})};g.push(w),g.forEach(b=>{q.add(b)})}Ye.$set(d.props),It(d.props.page),Lt=!0}else Ct(d,$e,!1);const{activeElement:v}=document;await qt();const I=n?n.scroll:a?Ge():null;if(it){const g=t.hash&&document.getElementById(decodeURIComponent(A.hash?t.hash.split("#")[2]??"":t.hash.slice(1)));I?scrollTo(I.x,I.y):g?g.scrollIntoView():scrollTo(0,0)}const U=document.activeElement!==v&&document.activeElement!==document.body;!r&&!U&&qn(),it=!0,d.props.page&&Object.assign(R,d.props.page),Q=!1,e==="popstate"&&xt(T),f.fulfil(void 0),q.forEach(g=>g(f.navigation)),D.navigating.set(X.current=null)}async function jt(e,t,n,r){return e.origin===fe&&e.pathname===location.pathname&&!Ke?await Ie({status:r,error:n,url:e,route:t}):await K(e)}function Vn(){let e,t,n;j.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,V.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],V.tap)}j.addEventListener("mousedown",r),j.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(Ne(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=St(o,j),h=l===t&&c>=n;if(!l||h)return;const{url:u,external:_,download:f}=Oe(l,P,A.hash);if(_||f)return;const m=me(l),p=u&&Ae(y.url)===Ae(u);if(!(m.reload||p))if(c<=m.preload_data){t=l,n=V.tap;const d=await ue(u,!1);if(!d)return;On(d)}else c<=m.preload_code&&(t=l,n=c,Ne(u))}function i(){a.disconnect();for(const o of j.querySelectorAll("a")){const{url:c,external:l,download:h}=Oe(o,P,A.hash);if(l||h)continue;const u=me(o);u.reload||(u.preload_code===V.viewport&&a.observe(o),u.preload_code===V.eager&&Ne(c))}}q.add(i),i()}function H(e,t){if(e instanceof Se)return e.body;const n=_e(e),r=Rn(e);return A.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function $t(e,t){ge(()=>(e.add(t),()=>{e.delete(t)}))}function na(e){$t(q,e)}function aa(e){$t(He,e)}function Bn(e,t={}){return e=new URL(kt(e)),e.origin!==fe?Promise.reject(new Error("goto: invalid URL")):Re(e,t,0)}function ra(e){return Dt(e),Nn()}function Dt(e){if(typeof e=="function")ye.push(e);else{const{href:t}=new URL(e,location.href);ye.push(n=>n.href===t)}}function Gn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ct(),!Q){const a=Bt(y,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};He.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ct()}),(t=navigator.connection)!=null&&t.saveData||Vn(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=St(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Oe(r,P,A.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=me(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[h,u]=(A.hash?a.hash.replace(/^#/,""):a.href).split("#"),_=h===Te(location);if(s||c.reload&&(!_||!u)){Ot({url:a,type:"link"})?Q=!0:n.preventDefault();return}if(u!==void 0&&_){const[,f]=y.url.href.split("#");if(f===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(u));m&&(m.scrollIntoView(),m.focus())}return}if(W=!0,Me(E),e(a),!c.replace_state)return;W=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await pe({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(Ee(o,P,!1))return;const c=n.target,l=me(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const h=new FormData(c),u=a==null?void 0:a.getAttribute("name");u&&h.append(u,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(h).toString(),pe({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[M]){const a=n.state[M];if($={},a===E)return;const s=B[a],i=n.state[bt]??{},o=new URL(n.state[un]??location.href),c=n.state[z],l=y.url?Te(location)===Te(y.url):!1;if(c===T&&(Lt||l)){i!==R.state&&(R.state=i),e(o),B[E]=Ge(),s&&scrollTo(s.x,s.y),E=a;return}const u=a-E;await pe({type:"popstate",url:o,popped:{state:i,scroll:s,delta:u},accept:()=>{E=a,T=c},block:()=>{history.go(-u)},nav_token:$})}else if(!W){const a=new URL(location.href);e(a),A.hash&&location.reload()}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[M]:++E,[z]:T},"",location.href))});for(const n of document.querySelectorAll("link"))Pn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&D.navigating.set(X.current=null)});function e(n){y.url=R.url=n,D.page.set(Ze(R)),D.page.notify()}}async function Mn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Ke=!0;const l=new URL(location.href);let h;({params:a={},route:s={id:null}}=await ue(l,!1)||{}),h=qe.find(({id:f})=>f===s.id);let u,_=!0;try{const f=r.map(async(p,d)=>{const v=o[d];return v!=null&&v.uses&&(v.uses=Vt(v.uses)),Je({loader:A.nodes[p],url:l,params:a,route:s,parent:async()=>{const I={};for(let U=0;U<d;U+=1)Object.assign(I,(await f[U]).data);return I},server_data_node:ze(v)})}),m=await Promise.all(f);if(h){const p=h.layouts;for(let d=0;d<p.length;d++)p[d]||m.splice(d,0,void 0)}u=ke({url:l,params:a,branch:m,status:t,error:n,form:c,route:h??null})}catch(f){if(f instanceof Ve){await K(new URL(f.location,location.href));return}u=await Ie({status:_e(f),error:await H(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",_=!1}u.props.page&&(u.props.page.state={}),Ct(u,e,_)}async function Ft(e,t){var s;const n=new URL(e);n.pathname=Tn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(En,"1"),n.searchParams.append(Sn,t.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new Se(a.status,i)}return new Promise(async i=>{var _;const o=new Map,c=a.body.getReader(),l=new TextDecoder;function h(f){return bn(f,{...A.decoders,Promise:m=>new Promise((p,d)=>{o.set(m,{fulfil:p,reject:d})})})}let u="";for(;;){const{done:f,value:m}=await c.read();if(f&&!u)break;for(u+=!m&&u?`
2
+ `:l.decode(m,{stream:!0});;){const p=u.indexOf(`
3
+ `);if(p===-1)break;const d=JSON.parse(u.slice(0,p));if(u=u.slice(p+1),d.type==="redirect")return i(d);if(d.type==="data")(_=d.nodes)==null||_.forEach(v=>{(v==null?void 0:v.type)==="data"&&(v.uses=Vt(v.uses),v.data=h(v.data))}),i(d);else if(d.type==="chunk"){const{id:v,data:I,error:U}=d,g=o.get(v);o.delete(v),U?g.reject(h(U)):g.fulfil(h(I))}}}})}function Vt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}function qn(){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const t=document.body,n=t.getAttribute("tabindex");t.tabIndex=-1,t.focus({preventScroll:!0,focusVisible:!1}),n!==null?t.setAttribute("tabindex",n):t.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function Bt(e,t,n,r){var c,l;let a,s;const i=new Promise((h,u)=>{a=h,s=u});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((l=t==null?void 0:t.route)==null?void 0:l.id)??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function Ze(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Hn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}export{na as a,P as b,aa as c,zn as d,ta as e,Bn as g,ra as i,Xn as l,ge as o,R as p,D as s};
@@ -1 +1 @@
1
- import{b as d,e as g,u as c,h as l,i as b,j as m,g as p,k as h,d as k}from"./l7KrR96u.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let r=()=>h(s.s);if(n){let o=0,t={};const _=k(()=>{let i=!1;const a=s.s;for(const f in a)a[f]!==t[f]&&(t[f]=a[f],i=!0);return i&&o++,o});r=()=>p(_)}e.b.length&&g(()=>{u(s,r),l(e.b)}),c(()=>{const o=b(()=>e.m.map(m));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&c(()=>{u(s,r),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
1
+ import{b as d,e as g,u as c,h as l,i as b,j as m,g as p,k as h,d as k}from"./DcGCxgpH.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let r=()=>h(s.s);if(n){let o=0,t={};const _=k(()=>{let i=!1;const a=s.s;for(const f in a)a[f]!==t[f]&&(t[f]=a[f],i=!0);return i&&o++,o});r=()=>p(_)}e.b.length&&g(()=>{u(s,r),l(e.b)}),c(()=>{const o=b(()=>e.m.map(m));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&c(()=>{u(s,r),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
@@ -0,0 +1 @@
1
+ import{a as E}from"./Cpy-nab_.js";import{w as n,l as g}from"./DcGCxgpH.js";function d(s,o){const i=n((()=>{if(typeof sessionStorage>"u")return o;try{const a=sessionStorage.getItem(s);if(a)return JSON.parse(a)}catch(a){console.warn(`Failed to read ${s} from sessionStorage`,a)}return o})());return i.subscribe(a=>{if(!(typeof sessionStorage>"u"))try{sessionStorage.setItem(s,JSON.stringify(a))}catch(h){console.warn(`Failed to write ${s} to sessionStorage`,h)}}),i}const r=n([]),I=()=>({reversibleActions:r,addReversibleAction:s=>{r.update(o=>[s,...o].slice(0,50))},executeReversibleAction:async s=>{const o=g(r),l=o.find(i=>i.id===s);if(l){await l.execute();const i=o.findIndex(a=>a.id===s);r.update(a=>a.slice(i+1))}},clearReversibleActions:()=>{r.set([])},clearReversibleActionsByGroupId:s=>{r.update(o=>o.filter(l=>l.groupId!==s))},hasReversibleActions:()=>g(r).length>0}),b=n("samples"),u=n(new Set),p=n(new Set),S=n(new Set),v=n(0),w=n(0),y=n(!1),C=n(void 0),f=n(null),_=d("lightlyStudio_sampleSize",{width:200,height:200}),T=d("lightlyStudio_metadata_bounds",{}),x=d("lightlyStudio_metadata_values",{}),M=d("lightlyStudio_metadata_info",[]),B=n(void 0),G=n([]),m=n({}),R=n(!1),V=s=>{R.set(s)},J=()=>{const s=I();return{tags:B,textEmbedding:C,setTextEmbedding:e=>{C.set(e)},selectedSampleIds:u,selectedSampleAnnotationCropIds:p,selectedAnnotationFilterIds:S,annotationsTotalCount:v,samplesTotalCount:w,datasetVersions:m,hideAnnotations:y,classifiers:G,classifierSamples:f,setClassifierSamples:e=>{f.set(e)},clearClassifierSamples:()=>{f.set(null)},metadataBounds:T,metadataValues:x,metadataInfo:M,updateMetadataValues:e=>{x.set(e)},updateMetadataBounds:e=>{T.set(e)},updateMetadataInfo:e=>{M.set(e)},setHideAnnotations:e=>{y.set(e)},getDatasetVersion:async e=>{const t=g(m);if(t[e])return t[e];const{data:c}=await E({path:{dataset_id:e}});if(c!=null&&c.created_at){const A=new Date(c.created_at).getTime().toString();return m.update(z=>({...z,[e]:A})),A}return""},toggleSampleSelection:e=>{u.update(t=>(t.has(e)?t.delete(e):t.add(e),t))},clearSelectedSamples:()=>{u.update(e=>(e.clear(),e))},toggleSampleAnnotationCropSelection:e=>{p.update(t=>(t.has(e)?t.delete(e):t.add(e),t))},clearSelectedSampleAnnotationCrops:()=>{p.update(e=>(e.clear(),e))},lastGridType:b,setLastGridType:e=>{b.set(e)},setSelectedAnnotationFilterIds:e=>{S.update(t=>(t.has(e)?t.delete(e):t.add(e),t))},clearSelectedAnnotationFilterIds:()=>{S.update(e=>(e.clear(),e))},setAnnotationsTotalCount:e=>{v.set(e)},setSamplesTotalCount:e=>{w.set(e)},sampleSize:_,updateSampleSize:e=>{_.set({width:e,height:e})},isEditingMode:R,setIsEditingMode:V,...s}};export{d as a,J as u};