diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index f7ccc4ca216d468ff93003bd59e06cb2a6802b40..0000000000000000000000000000000000000000 --- a/.gitattributes +++ /dev/null @@ -1,21 +0,0 @@ -data/.cache/lilac/concept/lilac/negative-sentiment/cohere.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/non-english/cohere.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/non-english/openai.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/positive-sentiment/cohere.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/profanity/cohere.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/profanity/gte-base.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/profanity/gte-small.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/profanity/openai.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/profanity/palm.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/profanity/sbert.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/question/cohere.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/question/gte-base.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/question/openai.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/question/palm.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/source-code/cohere.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/toxicity/cohere.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/toxicity/gte-base.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/toxicity/gte-small.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/toxicity/openai.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/toxicity/palm.pkl filter=lfs diff=lfs merge=lfs -text -data/.cache/lilac/concept/lilac/toxicity/sbert.pkl filter=lfs diff=lfs merge=lfs -text diff --git a/data/.cache/lilac/concept/lilac/legal-termination/cohere.pkl b/data/.cache/lilac/concept/lilac/legal-termination/cohere.pkl deleted file mode 100644 index be3ba5a3a39e1b9fbc372cbfe549d043ad7d3c54..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/legal-termination/cohere.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/legal-termination/gte-base.pkl b/data/.cache/lilac/concept/lilac/legal-termination/gte-base.pkl deleted file mode 100644 index 21865a5e935028d5c11a182d30db6147fad12b96..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/legal-termination/gte-base.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/legal-termination/gte-small.pkl b/data/.cache/lilac/concept/lilac/legal-termination/gte-small.pkl deleted file mode 100644 index 16a03f104b82aef2ab38d3d6b9362fe2e75eb39d..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/legal-termination/gte-small.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/legal-termination/openai.pkl b/data/.cache/lilac/concept/lilac/legal-termination/openai.pkl deleted file mode 100644 index cbb969f282ddd4f220529d90a517b6104480e896..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/legal-termination/openai.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/legal-termination/palm.pkl b/data/.cache/lilac/concept/lilac/legal-termination/palm.pkl deleted file mode 100644 index 7dbe2e39cfb22d83146ee88950cd5eeb6c56fa10..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/legal-termination/palm.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/legal-termination/sbert.pkl b/data/.cache/lilac/concept/lilac/legal-termination/sbert.pkl deleted file mode 100644 index 6a2b1157abb2c94c879e6043afa2fe669cbe7677..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/legal-termination/sbert.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/negative-sentiment/cohere.pkl b/data/.cache/lilac/concept/lilac/negative-sentiment/cohere.pkl deleted file mode 100644 index 779d300ec9a659fb944f3970350202aa1e940bb8..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/negative-sentiment/cohere.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:304385eb4cf66e780a49026dd1d45f0db5369a67b7562ec46ff10b8be36c411e -size 2088021 diff --git a/data/.cache/lilac/concept/lilac/negative-sentiment/gte-base.pkl b/data/.cache/lilac/concept/lilac/negative-sentiment/gte-base.pkl deleted file mode 100644 index ccfc918a12e250094cb6f9050f59ba1d85679a79..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/negative-sentiment/gte-base.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/negative-sentiment/gte-small.pkl b/data/.cache/lilac/concept/lilac/negative-sentiment/gte-small.pkl deleted file mode 100644 index 4695e73af9e23ccfbebfc5d70c2850f43e611c70..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/negative-sentiment/gte-small.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/negative-sentiment/openai.pkl b/data/.cache/lilac/concept/lilac/negative-sentiment/openai.pkl deleted file mode 100644 index 7b7f6784f7f85af56075af6ef8dae9d653c78c97..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/negative-sentiment/openai.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/negative-sentiment/palm.pkl b/data/.cache/lilac/concept/lilac/negative-sentiment/palm.pkl deleted file mode 100644 index cfedfba9f80d0acc9a7c357c42e3edcd28bbf3a2..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/negative-sentiment/palm.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/negative-sentiment/sbert.pkl b/data/.cache/lilac/concept/lilac/negative-sentiment/sbert.pkl deleted file mode 100644 index 7745eb7e387e4f3763ca6b2f9eeaa593be832fb1..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/negative-sentiment/sbert.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/non-english/cohere.pkl b/data/.cache/lilac/concept/lilac/non-english/cohere.pkl deleted file mode 100644 index 30820e2d19a2465e79999b29ae38c8e562a4bae8..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/non-english/cohere.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8073ad4261c03aac8350bcee76a40669df0a529b89b605e4a991189c7ad549ed -size 3374534 diff --git a/data/.cache/lilac/concept/lilac/non-english/gte-base.pkl b/data/.cache/lilac/concept/lilac/non-english/gte-base.pkl deleted file mode 100644 index 5ac2c905ff8599553caf4501d3a33e13aacdfa4b..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/non-english/gte-base.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/non-english/gte-small.pkl b/data/.cache/lilac/concept/lilac/non-english/gte-small.pkl deleted file mode 100644 index 5a0689fcc3f967e319f52e3359118bcb248ed87c..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/non-english/gte-small.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/non-english/openai.pkl b/data/.cache/lilac/concept/lilac/non-english/openai.pkl deleted file mode 100644 index 59a9e3d0589be52393de7533edbfeb5e0cd1bc0d..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/non-english/openai.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c924d11c7e0b61a76dfcafd4bd1cbf4f80afab97a5e537c0fb7ebb18db25a5d -size 1275037 diff --git a/data/.cache/lilac/concept/lilac/non-english/palm.pkl b/data/.cache/lilac/concept/lilac/non-english/palm.pkl deleted file mode 100644 index 9e6813cd60a45ae2a54bfdb1d82e544aaffaf2a8..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/non-english/palm.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/non-english/sbert.pkl b/data/.cache/lilac/concept/lilac/non-english/sbert.pkl deleted file mode 100644 index 60a61ba4bb4aee0b40211db01967b7715bffbc4a..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/non-english/sbert.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/positive-sentiment/cohere.pkl b/data/.cache/lilac/concept/lilac/positive-sentiment/cohere.pkl deleted file mode 100644 index 28b1285da4bb1c9128a2d5891a6d671aad327b9c..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/positive-sentiment/cohere.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fc23e270e1824e258a51ea5419de53e74b6cc23fa31ff586b6c2f0f0f7549b91 -size 1857652 diff --git a/data/.cache/lilac/concept/lilac/positive-sentiment/gte-base.pkl b/data/.cache/lilac/concept/lilac/positive-sentiment/gte-base.pkl deleted file mode 100644 index 4a00617d27924a0b428cad935de05a8b75197893..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/positive-sentiment/gte-base.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/positive-sentiment/gte-small.pkl b/data/.cache/lilac/concept/lilac/positive-sentiment/gte-small.pkl deleted file mode 100644 index e2e243d94bdf4f9489573de4468e4b42ab99102d..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/positive-sentiment/gte-small.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/positive-sentiment/openai.pkl b/data/.cache/lilac/concept/lilac/positive-sentiment/openai.pkl deleted file mode 100644 index 01d35a8665f65a659b4dfd0868f56e8159769129..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/positive-sentiment/openai.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/positive-sentiment/palm.pkl b/data/.cache/lilac/concept/lilac/positive-sentiment/palm.pkl deleted file mode 100644 index cfa89c34461647fcb9dedeb731cbdaa1bfd6c1ce..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/positive-sentiment/palm.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/positive-sentiment/sbert.pkl b/data/.cache/lilac/concept/lilac/positive-sentiment/sbert.pkl deleted file mode 100644 index 9692cf4c75a14632edaca8286598cb9c2d0e6542..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/positive-sentiment/sbert.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/profanity/cohere.pkl b/data/.cache/lilac/concept/lilac/profanity/cohere.pkl deleted file mode 100644 index 06a75b38ced603bc80365b3688e6e3c652ac30e1..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/profanity/cohere.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f6c694a83f498be11182ea462dba84e93970c502f687504f5b684a47f175c411 -size 17413997 diff --git a/data/.cache/lilac/concept/lilac/profanity/gte-base.pkl b/data/.cache/lilac/concept/lilac/profanity/gte-base.pkl deleted file mode 100644 index c41b04fab07479e85dcf1b2cf00d41571cafa249..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/profanity/gte-base.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3287d4d06a78e0757f0b8586651e24fc7ac8f9d742a0091b24dd5bfc3b4c441f -size 3301326 diff --git a/data/.cache/lilac/concept/lilac/profanity/gte-small.pkl b/data/.cache/lilac/concept/lilac/profanity/gte-small.pkl deleted file mode 100644 index 4459f7c07fcc01f3d9a454e0a01a89809038ad76..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/profanity/gte-small.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6f25837df92c799823a7ea284d3046d10fd2d146e97610d739fd088a44172e57 -size 1672960 diff --git a/data/.cache/lilac/concept/lilac/profanity/openai.pkl b/data/.cache/lilac/concept/lilac/profanity/openai.pkl deleted file mode 100644 index 83e8bf4911c611aa02b98ec20c6adb5defafdc0f..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/profanity/openai.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6c199a5348b201c91db1926c12c47ec370b69badde06981d18dead800210acc2 -size 6558076 diff --git a/data/.cache/lilac/concept/lilac/profanity/palm.pkl b/data/.cache/lilac/concept/lilac/profanity/palm.pkl deleted file mode 100644 index 1f5e1ec9c8112593138e33e3c01a0319dfa0c076..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/profanity/palm.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:17cbb10cf538ab7e823d4db1fddf81977a155e3270a986b182370297e5a48380 -size 3301322 diff --git a/data/.cache/lilac/concept/lilac/profanity/sbert.pkl b/data/.cache/lilac/concept/lilac/profanity/sbert.pkl deleted file mode 100644 index e8c5cc63b723eb885c52ae262b8fff472e10bed6..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/profanity/sbert.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:132800020bbe32723942388c651eac45ae9da9aa98e7bfdd46b3f5820e02a339 -size 1672951 diff --git a/data/.cache/lilac/concept/lilac/question/cohere.pkl b/data/.cache/lilac/concept/lilac/question/cohere.pkl deleted file mode 100644 index 39298487eaf8411f748bb63f8ac2f71fc0817fba..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/question/cohere.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2ce2b4f9bf3dba7d6afa146aad9b443d35987b230366b668fbf15325b27fcf8 -size 6254200 diff --git a/data/.cache/lilac/concept/lilac/question/gte-base.pkl b/data/.cache/lilac/concept/lilac/question/gte-base.pkl deleted file mode 100644 index af211a94b9c1608c83248fd11e9da6ffc6594e50..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/question/gte-base.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd6e9243c20ec84229419814178411b7f6f80a6d8e2f9e244fcc4f752d6ec5f0 -size 1194951 diff --git a/data/.cache/lilac/concept/lilac/question/gte-small.pkl b/data/.cache/lilac/concept/lilac/question/gte-small.pkl deleted file mode 100644 index cedb8d84248d6adb3d117dbe50ffbeebb5b9d084..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/question/gte-small.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/question/openai.pkl b/data/.cache/lilac/concept/lilac/question/openai.pkl deleted file mode 100644 index b90c36896439eac7fc317ab227dbfef57da1961d..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/question/openai.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b998b1370a2982689e6c5e0f099659f103130a52090f0f9f2b234abdc3c8d2b0 -size 2362458 diff --git a/data/.cache/lilac/concept/lilac/question/palm.pkl b/data/.cache/lilac/concept/lilac/question/palm.pkl deleted file mode 100644 index cbf1722dce7524cd3c179609f57f45929525a86a..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/question/palm.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98e077a03707541da691311fd28d9bed00ec9fb2a22a915adde2bc436f6362e6 -size 1194947 diff --git a/data/.cache/lilac/concept/lilac/question/sbert.pkl b/data/.cache/lilac/concept/lilac/question/sbert.pkl deleted file mode 100644 index 930ea2b66d3c00d09538e09ed0fb1ee2830365ea..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/question/sbert.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/source-code/cohere.pkl b/data/.cache/lilac/concept/lilac/source-code/cohere.pkl deleted file mode 100644 index 73a55cb17478c92e70dabd0b342962574e24c85d..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/source-code/cohere.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad4234a60f17ac8a068c3b407af1b63fd460800c9fd6c014da70d8eb3b0c0939 -size 1284715 diff --git a/data/.cache/lilac/concept/lilac/source-code/gte-base.pkl b/data/.cache/lilac/concept/lilac/source-code/gte-base.pkl deleted file mode 100644 index e56574f91dda0ea37a45ebf3ff94134e428ac607..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/source-code/gte-base.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/source-code/gte-small.pkl b/data/.cache/lilac/concept/lilac/source-code/gte-small.pkl deleted file mode 100644 index 30cc7cf16daa7b8cc3db94ca1787fdcff28d974b..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/source-code/gte-small.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/source-code/openai.pkl b/data/.cache/lilac/concept/lilac/source-code/openai.pkl deleted file mode 100644 index 15f7615dd10b2dd627b1cd2a5f8367b8ee7b9a17..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/source-code/openai.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/source-code/palm.pkl b/data/.cache/lilac/concept/lilac/source-code/palm.pkl deleted file mode 100644 index 381ae17e253fa809340342120556061c9b5f72d3..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/source-code/palm.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/source-code/sbert.pkl b/data/.cache/lilac/concept/lilac/source-code/sbert.pkl deleted file mode 100644 index 36919afe52228a6312d36e76562f26ef706827d6..0000000000000000000000000000000000000000 Binary files a/data/.cache/lilac/concept/lilac/source-code/sbert.pkl and /dev/null differ diff --git a/data/.cache/lilac/concept/lilac/toxicity/cohere.pkl b/data/.cache/lilac/concept/lilac/toxicity/cohere.pkl deleted file mode 100644 index 538cfa1091c8b650a823865c96804bb4e4dd2c1c..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/toxicity/cohere.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cc3d3f95d84b64657ec4697ce899aee940d62725e0fb88c9f8b38f03298d89b3 -size 19602537 diff --git a/data/.cache/lilac/concept/lilac/toxicity/gte-base.pkl b/data/.cache/lilac/concept/lilac/toxicity/gte-base.pkl deleted file mode 100644 index 50a50bc8c653118574c13356a2ae2391ac33d2d0..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/toxicity/gte-base.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e9363d2faacb10fe0528f06df2237a44f9b1686f4100d3cca2cdb1a621a90c2 -size 3719127 diff --git a/data/.cache/lilac/concept/lilac/toxicity/gte-small.pkl b/data/.cache/lilac/concept/lilac/toxicity/gte-small.pkl deleted file mode 100644 index 17711173669c9f669303ffd0b2a245e8888c8c7f..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/toxicity/gte-small.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b094a716fcbda3cd5b686457bf2510c0a17cabddac21d88d8c97f6a6908266ec -size 1886446 diff --git a/data/.cache/lilac/concept/lilac/toxicity/openai.pkl b/data/.cache/lilac/concept/lilac/toxicity/openai.pkl deleted file mode 100644 index 5eecaf0cfd4cf2104a54c75015f17c7fa1b7e277..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/toxicity/openai.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08ee50c3a7679c15e442d12996ddac07bd9ffb8de30f8a607f6b4dd72e7f0343 -size 7384512 diff --git a/data/.cache/lilac/concept/lilac/toxicity/palm.pkl b/data/.cache/lilac/concept/lilac/toxicity/palm.pkl deleted file mode 100644 index 58bf4a3724eb4c346d1fee07079b2ab827e54906..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/toxicity/palm.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e9d54189781c5a3e56f8640a7ed3516c82a411b09798e7dca84c6ba0f7efe48d -size 3719128 diff --git a/data/.cache/lilac/concept/lilac/toxicity/sbert.pkl b/data/.cache/lilac/concept/lilac/toxicity/sbert.pkl deleted file mode 100644 index 78f18ed8eaa20b4831fc4f8b2909874e59fb1cd9..0000000000000000000000000000000000000000 --- a/data/.cache/lilac/concept/lilac/toxicity/sbert.pkl +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:654c96a6ef52b60a0f81d099c8bf4cda9957dde8d9aaea43f21cddc6c54c1ab5 -size 1886440 diff --git a/docker_start.py b/docker_start.py index b13766b7592fd443e9655fbce6c874ea7c76dc11..f5b508f5db62d1ce857364f9d95af0e258d4e109 100644 --- a/docker_start.py +++ b/docker_start.py @@ -55,7 +55,7 @@ def main() -> None: with open(os.path.abspath('README.md')) as f: # Strip the '---' for the huggingface readme config. - readme = f.read().strip('---') + readme = f.read().strip().strip('---') hf_config: HfSpaceConfig = yaml.safe_load(readme) # Download the huggingface space data. This includes code and datasets, so we move the datasets diff --git a/lilac/env.py b/lilac/env.py index 66757562800a8b251c04bf9074500b03ea8fa3dc..1daea7a7e00c23d46432eca9810d8bc667df39e3 100644 --- a/lilac/env.py +++ b/lilac/env.py @@ -26,8 +26,8 @@ class LilacEnvironment(BaseModel): # API Keys. OPENAI_API_KEY: str = PydanticField( - description='The OpenAI API key, used for computing `openai` embeddings and generating positive ' - 'examples for concept seeding.') + description='The OpenAI API key, used for computing `openai` embeddings and generating ' + 'positive examples for concept seeding.') COHERE_API_KEY: str = PydanticField( description='The Cohere API key, used for computing `cohere` embeddings.') PALM_API_KEY: str = PydanticField( diff --git a/lilac/web/_app/immutable/chunks/ConceptView.d774cac2.js b/lilac/web/_app/immutable/chunks/ConceptView.d774cac2.js new file mode 100644 index 0000000000000000000000000000000000000000..a08b54e429f824372bfb29a0529b6237c87fb4f5 --- /dev/null +++ b/lilac/web/_app/immutable/chunks/ConceptView.d774cac2.js @@ -0,0 +1 @@ +import{S as ce,i as fe,s as ue,E as _e,Z as ae,_ as ie,m as D,h as g,n as S,$ as Se,b as L,a0 as b,L as qe,a1 as X,N as Ce,Q as Te,q as Z,r as j,u as ne,D as At,k as T,a as G,l as z,c as W,H as Le,I as Pt,J as Rt,K as Bt,v as te,d as V,f as le,g as k,y as N,z as H,A as O,B as F,w as Ee,T as Ve,U as De,a4 as Ae,C as xt,a6 as xe,O as Ie,ac as ye,a7 as Nt,ab as el,G as Pe,o as tl,e as we,M as ll}from"./index.b333a928.js";import{g as Ht}from"./navigation.1d886b5b.js";import{ae as nl,x as $e,ar as rl,as as sl,B as Ye,P as Ge,h as Ot,S as Ze,U as Ft,at as al,au as il,av as ol,aw as cl,c as Lt,a as He,e as fl,ax as Ut,a4 as Re,X as ul,z as Me,ay as dl,y as ml,O as Qt,af as qt,L as Be,az as Ne,a9 as Oe,aA as Yt,ag as et,ak as Zt,b as _l}from"./Commands.1fffdf33.js";import{f as jt}from"./utils.4eeb8687.js";import{T as hl,S as gl,a as Gt,b as Wt}from"./StringSpanHighlight.d53dc1a7.js";import{C as pl,a as bl}from"./ChevronUp.95b74f6d.js";import{g as Kt}from"./settingsStore.6e7d5078.js";import{i as vl,r as $l}from"./notificationsStore.e7f2bd3e.js";import{A as wl}from"./ArrowUpRight.e306cdcd.js";import{T as Jt}from"./ToastNotification.66c9609a.js";function tt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function kl(r){let e,l,t,n=r[1]&&tt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class lt extends ce{constructor(e){super(),fe(this,e,El,kl,ue,{size:0,title:1})}}function nt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Vl(r){let e,l,t=r[1]&&nt(r),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],o={};for(let s=0;s{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Kn extends ce{constructor(e){super(),fe(this,e,Dl,Vl,ue,{size:0,title:1})}}function rt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Il(r){let e,l,t,n=r[1]&&rt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Sl extends ce{constructor(e){super(),fe(this,e,yl,Il,ue,{size:0,title:1})}}function st(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Cl(r){let e,l,t,n=r[1]&&st(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class zl extends ce{constructor(e){super(),fe(this,e,Tl,Cl,ue,{size:0,title:1})}}const Ml=r=>({}),at=r=>({}),Al=r=>({}),it=r=>({});function Pl(r){let e,l;return e=new pl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rl(r){let e,l;return e=new bl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function ot(r){let e,l;const t=r[2].below,n=At(t,r,r[1],at);return{c(){e=T("div"),n&&n.c(),this.h()},l(o){e=z(o,"DIV",{class:!0});var s=D(e);n&&n.l(s),s.forEach(g),this.h()},h(){S(e,"class","p-4")},m(o,s){L(o,e,s),n&&n.m(e,null),l=!0},p(o,s){n&&n.p&&(!l||s&2)&&Pt(n,t,o,o[1],l?Bt(t,o[1],s,Ml):Rt(o[1]),at)},i(o){l||(k(n,o),l=!0)},o(o){V(n,o),l=!1},d(o){o&&g(e),n&&n.d(o)}}}function Bl(r){let e,l,t,n,o,s,a,i,c,f;const E=r[2].above,m=At(E,r,r[1],it),h=[Rl,Pl],u=[];function $(d,_){return d[0]?0:1}o=$(r),s=u[o]=h[o](r);let p=r[0]&&ot(r);return{c(){e=T("div"),l=T("button"),t=T("div"),m&&m.c(),n=G(),s.c(),a=G(),p&&p.c(),this.h()},l(d){e=z(d,"DIV",{class:!0});var _=D(e);l=z(_,"BUTTON",{class:!0});var v=D(l);t=z(v,"DIV",{class:!0});var w=D(t);m&&m.l(w),n=W(w),s.l(w),w.forEach(g),v.forEach(g),a=W(_),p&&p.l(_),_.forEach(g),this.h()},h(){S(t,"class","flex items-center justify-between"),S(l,"class","w-full p-4 text-left hover:bg-gray-200"),S(e,"class","rounded-xl border border-gray-200")},m(d,_){L(d,e,_),b(e,l),b(l,t),m&&m.m(t,null),b(t,n),u[o].m(t,null),b(e,a),p&&p.m(e,null),i=!0,c||(f=Le(l,"click",r[3]),c=!0)},p(d,[_]){m&&m.p&&(!i||_&2)&&Pt(m,E,d,d[1],i?Bt(E,d[1],_,Al):Rt(d[1]),it);let v=o;o=$(d),o!==v&&(te(),V(u[v],1,1,()=>{u[v]=null}),le(),s=u[o],s||(s=u[o]=h[o](d),s.c()),k(s,1),s.m(t,null)),d[0]?p?(p.p(d,_),_&1&&k(p,1)):(p=ot(d),p.c(),k(p,1),p.m(e,null)):p&&(te(),V(p,1,1,()=>{p=null}),le())},i(d){i||(k(m,d),k(s),k(p),i=!0)},o(d){V(m,d),V(s),V(p),i=!1},d(d){d&&g(e),m&&m.d(d),u[o].d(),p&&p.d(),c=!1,f()}}}function Nl(r,e,l){let{$$slots:t={},$$scope:n}=e,{expanded:o=!1}=e;const s=()=>l(0,o=!o);return r.$$set=a=>{"expanded"in a&&l(0,o=a.expanded),"$$scope"in a&&l(1,n=a.$$scope)},[o,n,t,s]}class Fe extends ce{constructor(e){super(),fe(this,e,Nl,Bl,ue,{expanded:0})}}function ct(r,e,l){const t=r.slice();return t[6]=e[l],t}function ft(r){let e,l,t=r[6].text+"",n,o,s,a,i,c,f,E;a=new Sl({props:{size:16}});function m(){return r[5](r[6])}return{c(){e=T("div"),l=T("span"),n=Z(t),o=G(),s=T("button"),N(a.$$.fragment),i=G(),this.h()},l(h){e=z(h,"DIV",{class:!0});var u=D(e);l=z(u,"SPAN",{class:!0});var $=D(l);n=j($,t),$.forEach(g),o=W(u),s=z(u,"BUTTON",{title:!0,class:!0});var p=D(s);H(a.$$.fragment,p),p.forEach(g),i=W(u),u.forEach(g),this.h()},h(){S(l,"class","shrink"),S(s,"title","Remove sample"),S(s,"class","shrink-0 opacity-50 hover:text-red-400 hover:opacity-100"),S(e,"class","flex w-full justify-between gap-x-2 border-b border-gray-200 p-2 hover:bg-gray-50")},m(h,u){L(h,e,u),b(e,l),b(l,n),b(e,o),b(e,s),O(a,s,null),b(e,i),c=!0,f||(E=Le(s,"click",m),f=!0)},p(h,u){r=h,(!c||u&1)&&t!==(t=r[6].text+"")&&ne(n,t)},i(h){c||(k(a.$$.fragment,h),c=!0)},o(h){V(a.$$.fragment,h),c=!1},d(h){h&&g(e),F(a),f=!1,E()}}}function Hl(r){let e,l,t,n,o,s;function a(m){r[3](m)}let i={labelText:"Add example"};r[1]!==void 0&&(i.value=r[1]),l=new nl({props:i}),Ee.push(()=>Ve(l,"value",a)),l.$on("keydown",r[4]);let c=[...r[0]].reverse(),f=[];for(let m=0;mV(f[m],1,1,()=>{f[m]=null});return{c(){e=T("div"),N(l.$$.fragment),n=G(),o=T("div");for(let m=0;mt=!1)),l.$set(u),h&5){c=[...m[0]].reverse();let $;for($=0;${c.key==="Enter"&&(o("add",n),l(1,n=""))},i=c=>o("remove",c.id);return r.$$set=c=>{"data"in c&&l(0,t=c.data)},[t,n,o,s,a,i]}class ut extends ce{constructor(e){super(),fe(this,e,Ol,Hl,ue,{data:0})}}const Ue={not_good:"text-red-600",ok:"text-yellow-600",good:"text-green-600",very_good:"text-blue-600",great:"text-purple-600"},Qe={not_good:"Not good",ok:"OK",good:"Good",very_good:"Very good",great:"Great"};function Fl(r){let e,l,t,n,o,s=Qe[r[0].overall]+"",a,i,c,f,E,m,h,u=$e(r[0].f1)+"",$,p,d,_,v,w,I=$e(r[0].recall)+"",y,P,q,C,B,A,M=$e(r[0].precision)+"",U,re,ee,R,de,oe,se=$e(r[0].roc_auc)+"",me;return{c(){e=T("table"),l=T("tr"),t=T("td"),n=Z("Overall score"),o=T("td"),a=Z(s),c=G(),f=T("tr"),E=T("td"),m=Z("F1"),h=T("td"),$=Z(u),p=G(),d=T("tr"),_=T("td"),v=Z("Recall"),w=T("td"),y=Z(I),P=G(),q=T("tr"),C=T("td"),B=Z("Precision"),A=T("td"),U=Z(M),re=G(),ee=T("tr"),R=T("td"),de=Z("Area under ROC"),oe=T("td"),me=Z(se),this.h()},l(J){e=z(J,"TABLE",{class:!0});var Y=D(e);l=z(Y,"TR",{});var x=D(l);t=z(x,"TD",{class:!0});var Q=D(t);n=j(Q,"Overall score"),Q.forEach(g),o=z(x,"TD",{class:!0});var K=D(o);a=j(K,s),K.forEach(g),x.forEach(g),c=W(Y),f=z(Y,"TR",{});var he=D(f);E=z(he,"TD",{class:!0});var be=D(E);m=j(be,"F1"),be.forEach(g),h=z(he,"TD",{class:!0});var ve=D(h);$=j(ve,u),ve.forEach(g),he.forEach(g),p=W(Y),d=z(Y,"TR",{});var ge=D(d);_=z(ge,"TD",{class:!0});var pe=D(_);v=j(pe,"Recall"),pe.forEach(g),w=z(ge,"TD",{class:!0});var ze=D(w);y=j(ze,I),ze.forEach(g),ge.forEach(g),P=W(Y),q=z(Y,"TR",{});var ke=D(q);C=z(ke,"TD",{class:!0});var We=D(C);B=j(We,"Precision"),We.forEach(g),A=z(ke,"TD",{class:!0});var Ke=D(A);U=j(Ke,M),Ke.forEach(g),ke.forEach(g),re=W(Y),ee=z(Y,"TR",{});var je=D(ee);R=z(je,"TD",{class:!0});var Je=D(R);de=j(Je,"Area under ROC"),Je.forEach(g),oe=z(je,"TD",{class:!0});var Xe=D(oe);me=j(Xe,se),Xe.forEach(g),je.forEach(g),Y.forEach(g),this.h()},h(){S(t,"class","svelte-zc5pc5"),S(o,"class",i=xe(Ue[r[0].overall])+" svelte-zc5pc5"),S(E,"class","svelte-zc5pc5"),S(h,"class","svelte-zc5pc5"),S(_,"class","svelte-zc5pc5"),S(w,"class","svelte-zc5pc5"),S(C,"class","svelte-zc5pc5"),S(A,"class","svelte-zc5pc5"),S(R,"class","svelte-zc5pc5"),S(oe,"class","svelte-zc5pc5"),S(e,"class","svelte-zc5pc5")},m(J,Y){L(J,e,Y),b(e,l),b(l,t),b(t,n),b(l,o),b(o,a),b(e,c),b(e,f),b(f,E),b(E,m),b(f,h),b(h,$),b(e,p),b(e,d),b(d,_),b(_,v),b(d,w),b(w,y),b(e,P),b(e,q),b(q,C),b(C,B),b(q,A),b(A,U),b(e,re),b(e,ee),b(ee,R),b(R,de),b(ee,oe),b(oe,me)},p(J,[Y]){Y&1&&s!==(s=Qe[J[0].overall]+"")&&ne(a,s),Y&1&&i!==(i=xe(Ue[J[0].overall])+" svelte-zc5pc5")&&S(o,"class",i),Y&1&&u!==(u=$e(J[0].f1)+"")&&ne($,u),Y&1&&I!==(I=$e(J[0].recall)+"")&&ne(y,I),Y&1&&M!==(M=$e(J[0].precision)+"")&&ne(U,M),Y&1&&se!==(se=$e(J[0].roc_auc)+"")&&ne(me,se)},i:X,o:X,d(J){J&&g(e)}}}function Ll(r,e,l){let{metrics:t}=e;return r.$$set=n=>{"metrics"in n&&l(0,t=n.metrics)},[t]}class dt extends ce{constructor(e){super(),fe(this,e,Ll,Fl,ue,{metrics:0})}}function Ul(r){const e=r.slice(),l=!0;return e[7]=l,e}function Ql(r){let e,l;function t(){return r[6](r[7])}return e=new Ye({props:{icon:r[4].isLoading?Ge:lt,class:"w-28 text-3xl",$$slots:{default:[Zl]},$$scope:{ctx:r}}}),e.$on("click",t),{c(){N(e.$$.fragment)},l(n){H(e.$$.fragment,n)},m(n,o){O(e,n,o),l=!0},p(n,o){r=n;const s={};o&16&&(s.icon=r[4].isLoading?Ge:lt),o&256&&(s.$$scope={dirty:o,ctx:r}),e.$set(s)},i(n){l||(k(e.$$.fragment,n),l=!0)},o(n){V(e.$$.fragment,n),l=!1},d(n){F(e,n)}}}function ql(r){let e,l=Qe[r[3].data.metrics.overall]+"",t,n,o,s,a;return{c(){e=T("div"),t=Z(l),this.h()},l(i){e=z(i,"DIV",{class:!0});var c=D(e);t=j(c,l),c.forEach(g),this.h()},h(){S(e,"class",n="concept-score-pill cursor-default text-2xl font-light "+Ue[r[3].data.metrics.overall])},m(i,c){L(i,e,c),b(e,t),s||(a=Nt(o=Ot.call(null,e,{component:dt,props:{metrics:r[3].data.metrics}})),s=!0)},p(i,c){c&8&&l!==(l=Qe[i[3].data.metrics.overall]+"")&&ne(t,l),c&8&&n!==(n="concept-score-pill cursor-default text-2xl font-light "+Ue[i[3].data.metrics.overall])&&S(e,"class",n),o&&el(o.update)&&c&8&&o.update.call(null,{component:dt,props:{metrics:i[3].data.metrics}})},i:X,o:X,d(i){i&&g(e),s=!1,a()}}}function Yl(r){let e,l,t;return l=new Ge({}),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","flex flex-col items-center")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p:X,i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Zl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function jl(r){let e,l,t,n,o,s,a;const i=[Yl,ql,Ql],c=[];function f(m,h){var u,$;return m[3].isFetching?0:($=(u=m[3])==null?void 0:u.data)!=null&&$.metrics?1:2}function E(m,h){return h===2?Ul(m):m}return o=f(r),s=c[o]=i[o](E(r,o)),{c(){e=T("div"),l=T("div"),t=Z(r[1]),n=G(),s.c(),this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);l=z(h,"DIV",{class:!0});var u=D(l);t=j(u,r[1]),u.forEach(g),n=W(h),s.l(h),h.forEach(g),this.h()},h(){S(l,"class","text-gray-500"),S(e,"class","flex w-36 flex-col items-center gap-y-2 rounded-md border border-b-0 border-gray-200 p-4 shadow-md")},m(m,h){L(m,e,h),b(e,l),b(l,t),b(e,n),c[o].m(e,null),a=!0},p(m,[h]){(!a||h&2)&&ne(t,m[1]);let u=o;o=f(m),o===u?c[o].p(E(m,o),h):(te(),V(c[u],1,1,()=>{c[u]=null}),le(),s=c[o],s?s.p(E(m,o),h):(s=c[o]=i[o](E(m,o)),s.c()),k(s,1),s.m(e,null))},i(m){a||(k(s),a=!0)},o(m){V(s),a=!1},d(m){m&&g(e),c[o].d()}}}function Gl(r,e,l){let t,n,o=X,s=()=>(o(),o=ye(t,m=>l(3,n=m)),t),a;r.$$.on_destroy.push(()=>o());let{concept:i}=e,{embedding:c}=e;const f=rl();Ie(r,f,m=>l(4,a=m));const E=m=>a.mutate([i.namespace,i.concept_name,c,m]);return r.$$set=m=>{"concept"in m&&l(0,i=m.concept),"embedding"in m&&l(1,c=m.embedding)},r.$$.update=()=>{r.$$.dirty&3&&s(l(2,t=sl(i.namespace,i.concept_name,c)))},[i,c,t,n,a,f,E]}class Wl extends ce{constructor(e){super(),fe(this,e,Gl,jl,ue,{concept:0,embedding:1})}}function mt(r,e,l){const t=r.slice();return t[21]=e[l],t}function Kl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function _t(r){let e,l;return e=new He({props:{value:r[21].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&512&&(o.value=t[21].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Jl(r){var s;let e,l,t=((s=r[9])==null?void 0:s.data)||[],n=[];for(let a=0;aV(n[a],1,1,()=>{n[a]=null});return{c(){for(let a=0;aVe(f,"selected",d));const v=[xl,Xl],w=[];function I(y,P){var q;return y[7]&&((q=y[2])!=null&&q.isFetching)?0:y[4]!=null&&y[0]!=null?1:-1}return~(u=I(r))&&($=w[u]=v[u](r)),{c(){e=T("div"),l=T("div"),N(t.$$.fragment),n=G(),o=T("div"),s=T("div"),N(a.$$.fragment),i=G(),c=T("div"),N(f.$$.fragment),m=G(),h=T("div"),$&&$.c(),this.h()},l(y){e=z(y,"DIV",{class:!0});var P=D(e);l=z(P,"DIV",{});var q=D(l);H(t.$$.fragment,q),n=W(q),o=z(q,"DIV",{class:!0});var C=D(o);s=z(C,"DIV",{class:!0});var B=D(s);H(a.$$.fragment,B),B.forEach(g),i=W(C),c=z(C,"DIV",{class:!0});var A=D(c);H(f.$$.fragment,A),A.forEach(g),C.forEach(g),q.forEach(g),m=W(P),h=z(P,"DIV",{class:!0});var M=D(h);$&&$.l(M),M.forEach(g),P.forEach(g),this.h()},h(){S(s,"class","pt-4"),S(c,"class","mb-2 w-32"),S(o,"class","flex flex-row justify-between"),S(h,"class","mt-4 border-gray-200"),Pe(h,"border-t",r[0]!=null),S(e,"class","flex flex-col gap-x-8")},m(y,P){L(y,e,P),b(e,l),O(t,l,null),b(l,n),b(l,o),b(o,s),O(a,s,null),b(o,i),b(o,c),O(f,c,null),b(e,m),b(e,h),~u&&w[u].m(h,null),p=!0},p(y,[P]){const q={};P&8&&(q.value=y[3]),t.$set(q);const C={};P&16777216&&(C.$$scope={dirty:P,ctx:y}),a.$set(C);const B={};P&16777728&&(B.$$scope={dirty:P,ctx:y}),!E&&P&2&&(E=!0,B.selected=y[1],De(()=>E=!1)),f.$set(B);let A=u;u=I(y),u===A?~u&&w[u].p(y,P):($&&(te(),V(w[A],1,1,()=>{w[A]=null}),le()),~u?($=w[u],$?$.p(y,P):($=w[u]=v[u](y),$.c()),k($,1),$.m(h,null)):$=null),(!p||P&1)&&Pe(h,"border-t",y[0]!=null)},i(y){p||(k(t.$$.fragment,y),k(a.$$.fragment,y),k(f.$$.fragment,y),k($),p=!0)},o(y){V(t.$$.fragment,y),V(a.$$.fragment,y),V(f.$$.fragment,y),V($),p=!1},d(y){y&&g(e),F(t),F(a),F(f),~u&&w[u].d()}}}function tn(r,e,l){var M;let t,n,o,s,a=X,i=()=>(a(),a=ye(o,U=>l(2,s=U)),o),c,f=X,E=()=>(f(),f=ye(n,U=>l(17,c=U)),n),m,h;r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:u}=e,{example:$}=e;const p=Ft();Ie(r,p,U=>l(9,h=U));const d=Kt();Ie(r,d,U=>l(20,m=U));let _=(M=$.text)==null?void 0:M.trim();tl(()=>{y()});function v(U){l(3,_=U.target.value),l(0,w=void 0)}let w,I=m.embedding;function y(){l(0,w=_)}let P,q,C;const B=()=>y();function A(U){I=U,l(1,I)}return r.$$set=U=>{"concept"in U&&l(14,u=U.concept),"example"in U&&l(15,$=U.example)},r.$$.update=()=>{var U;if(r.$$.dirty&32768&&$.text&&(l(3,_=$.text.trim()),l(0,w=void 0)),r.$$.dirty&16386&&l(16,t={signal_name:"concept_score",concept_name:u.concept_name,namespace:u.namespace,embedding:I}),r.$$.dirty&65536&&E(l(8,n=t.embedding?al({signal:t}):void 0)),r.$$.dirty&16387&&i(l(7,o=I!=null&&w!=null?il(u.namespace,u.concept_name,I,{examples:[{text:w}]}):null)),r.$$.dirty&196614&&(s==null?void 0:s.data)!=null&&I!=null&&((U=c==null?void 0:c.data)==null?void 0:U.fields)!=null){const re=ol(c.data.fields);re.signal=t,l(4,P=cl(s.data[0],re));const ee=vl(re);l(6,C=ee.spanPaths),l(5,q=ee.valuePaths)}},[w,I,s,_,P,q,C,o,n,h,p,d,v,y,u,$,t,c,B,A]}class ln extends ce{constructor(e){super(),fe(this,e,tn,en,ue,{concept:14,example:15})}}function ht(r,e,l){const t=r.slice();return t[20]=e[l],t}function gt(r,e,l){const t=r.slice();return t[23]=e[l],t}function pt(r,e,l){const t=r.slice();return t[1]=e[l],t}function nn(r){let e,l;return e=new Ze({props:{labelText:"Dataset",selected:r[7],$$slots:{default:[an]},$$scope:{ctx:r}}}),e.$on("change",r[11]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&128&&(o.selected=t[7]),n&268435472&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function rn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[4].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.subtitle=t[4].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function sn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function bt(r){let e,l;return e=new He({props:{value:`${r[1].namespace}/${r[1].dataset_name}`}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.value=`${t[1].namespace}/${t[1].dataset_name}`),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function an(r){let e,l,t,n;e=new He({props:{value:"",text:"none"}});let o=r[4].data,s=[];for(let i=0;iV(s[i],1,1,()=>{s[i]=null});return{c(){N(e.$$.fragment),l=G();for(let i=0;iV(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;sVe(e,"selected",n)),{c(){N(e.$$.fragment)},l(s){H(e.$$.fragment,s)},m(s,a){O(e,s,a),t=!0},p(s,a){const i={};a&268435488&&(i.$$scope={dirty:a,ctx:s}),!l&&a&1&&(l=!0,i.selected=s[0],De(()=>l=!1)),e.$set(i)},i(s){t||(k(e.$$.fragment,s),t=!0)},o(s){V(e.$$.fragment,s),t=!1},d(s){F(e,s)}}}function wt(r){let e,l;return e=new He({props:{value:r[20]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&32&&(o.value=t[20]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function dn(r){let e,l,t=r[5],n=[];for(let s=0;sV(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s0?2:-1}~(t=u(r))&&(n=h[t]=m[t](r));const $=[fn,cn,on],p=[];function d(v,w){return v[3].isLoading?0:v[3].isError?1:v[2].length>0?2:-1}~(a=d(r))&&(i=p[a]=$[a](r));let _=r[5].length>0&&$t(r);return{c(){e=T("div"),l=T("div"),n&&n.c(),o=G(),s=T("div"),i&&i.c(),c=G(),f=T("div"),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);n&&n.l(I),I.forEach(g),o=W(w),s=z(w,"DIV",{class:!0});var y=D(s);i&&i.l(y),y.forEach(g),c=W(w),f=z(w,"DIV",{class:!0});var P=D(f);_&&_.l(P),P.forEach(g),w.forEach(g),this.h()},h(){S(l,"class","w-1/3"),S(s,"class","w-1/3"),S(f,"class","w-1/3"),S(e,"class","flex w-full flex-row gap-x-4")},m(v,w){L(v,e,w),b(e,l),~t&&h[t].m(l,null),b(e,o),b(e,s),~a&&p[a].m(s,null),b(e,c),b(e,f),_&&_.m(f,null),E=!0},p(v,[w]){let I=t;t=u(v),t===I?~t&&h[t].p(v,w):(n&&(te(),V(h[I],1,1,()=>{h[I]=null}),le()),~t?(n=h[t],n?n.p(v,w):(n=h[t]=m[t](v),n.c()),k(n,1),n.m(l,null)):n=null);let y=a;a=d(v),a===y?~a&&p[a].p(v,w):(i&&(te(),V(p[y],1,1,()=>{p[y]=null}),le()),~a?(i=p[a],i?i.p(v,w):(i=p[a]=$[a](v),i.c()),k(i,1),i.m(s,null)):i=null),v[5].length>0?_?(_.p(v,w),w&32&&k(_,1)):(_=$t(v),_.c(),k(_,1),_.m(f,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n),k(i),k(_),E=!0)},o(v){V(n),V(i),V(_),E=!1},d(v){v&&g(e),~t&&h[t].d(),~a&&p[a].d(),_&&_.d()}}}function _n(r,e,l){let t,n,o,s,a,i,c,f,E,m=X,h=()=>(m(),m=ye(n,C=>l(3,E=C)),n),u,$;r.$$.on_destroy.push(()=>m());let{dataset:p=void 0}=e,{path:d}=e,{embedding:_=void 0}=e;const v=Kt();Ie(r,v,C=>l(18,$=C));let w;const I=fl();Ie(r,I,C=>l(4,u=C));function y(C){const B=C.target.value;if(B==="")l(1,p=null);else{const[A,M]=B.split("/");l(1,p={namespace:A,name:M})}}function P(C){const B=C.target.value;l(13,d=ml(B))}function q(C){_=C,l(0,_),l(15,c),l(13,d),l(14,w),l(2,i),l(3,E),l(17,a)}return r.$$set=C=>{"dataset"in C&&l(1,p=C.dataset),"path"in C&&l(13,d=C.path),"embedding"in C&&l(0,_=C.embedding)},r.$$.update=()=>{if(r.$$.dirty&262144&&l(16,t=[$.embedding,"gte-small","gte-base","openai","sbert"]),r.$$.dirty&18&&u.data&&u.data.length>0&&p===void 0&&l(1,p={namespace:u.data[0].namespace,name:u.data[0].dataset_name}),r.$$.dirty&2&&h(l(8,n=Ut(p==null?void 0:p.namespace,p==null?void 0:p.name))),r.$$.dirty&2&&l(7,o=p?`${p.namespace}/${p.name}`:""),r.$$.dirty&8&&l(14,w=E.data),r.$$.dirty&16384&&l(17,a=w?Re(w).filter(C=>!ul(C,w)&&C.dtype!=null):[]),r.$$.dirty&131072&&l(2,i=a.filter(C=>Re(C).some(B=>B.signal!=null&&Re(B).some(A=>A.dtype==="embedding")))),r.$$.dirty&8196&&d!=null){const C=Me(d);i.some(A=>Me(A.path)===C)||l(13,d=void 0)}r.$$.dirty&8196&&i.length>0&&d==null&&l(13,d=i[0].path),r.$$.dirty&8192&&l(6,s=d?Me(d):void 0),r.$$.dirty&24576&&l(15,c=d&&w?Re(dl(w,d)).filter(C=>C.signal!=null&&Re(C).some(B=>B.dtype==="embedding")):[]),r.$$.dirty&98304&&l(5,f=c.map(C=>C.signal.signal_name).sort((C,B)=>{let A=t.indexOf(C),M=t.indexOf(B);return A===-1&&(A=t.length),M===-1&&(M=t.length),A-M})),r.$$.dirty&32769&&_!=null&&(c.some(B=>B.path.at(-1)===_)||l(0,_=void 0))},[_,p,i,E,u,f,s,o,n,v,I,y,P,d,w,c,t,a,$,q]}class Xt extends ce{constructor(e){super(),fe(this,e,_n,mn,ue,{dataset:1,path:13,embedding:0})}}function hn(r,e,l,t,n,o){const s={...r};if(e==null||l==null)return s;const a=[...e,...l],i=new Set,c=[];for(const u of a){const $=Be.value(Ne(u,[Oe]),"string");if($==null||i.has($))continue;i.add($);const p=Ne(u,n);if(p==null)continue;const d=Be.value(p,"string");if(d==null)continue;const _=`${t.namespace}/${t.concept_name}`,v=Ne(p,[`${_}/${o}`]);if(v==null)continue;const w=Ne(p,[`${_}/labels`]),I=[];if(w!=null)for(const y of w){const P=Be.value(y,"string_span");P!=null&&I.push(P)}for(const y of v){const P=Be.value(y,"string_span");if(P==null||!I.every(A=>A.start>P.end||A.end$.score-u.score);const E=c[0],m=c.slice().reverse().find(u=>u!=E);c.sort((u,$)=>Math.abs(u.score-.5)-Math.abs($.score-.5));const h=c.find(u=>u!=E&&u!=m);return E!=null&&s.positive==null&&(s.positive=f(E)),h!=null&&s.neutral==null&&(s.neutral=f(h)),m!=null&&s.negative==null&&(s.negative=f(m)),s}function kt(r,e,l){const t=r.slice();return t[21]=e[l],t}function gn(r){const e=r.slice(),l=$n(e[21].score);e[24]=l;const t=wn(e[21].score);return e[25]=t,e}function pn(r){let e,l,t,n,o,s,a,i,c,f=r[21].text+"",E,m,h,u=r[25]+"",$,p,d=$e(r[21].score,2)+"",_,v,w,I,y,P;n=new Gt({});function q(){return r[18](r[21])}a=new Wt({});function C(){return r[19](r[21])}return{c(){e=T("div"),l=T("div"),t=T("button"),N(n.$$.fragment),o=G(),s=T("button"),N(a.$$.fragment),i=G(),c=T("div"),E=Z(f),m=G(),h=T("div"),$=Z(u),p=G(),_=Z(d),v=G(),this.h()},l(B){e=z(B,"DIV",{class:!0});var A=D(e);l=z(A,"DIV",{class:!0});var M=D(l);t=z(M,"BUTTON",{class:!0});var U=D(t);H(n.$$.fragment,U),U.forEach(g),o=W(M),s=z(M,"BUTTON",{class:!0});var re=D(s);H(a.$$.fragment,re),re.forEach(g),M.forEach(g),i=W(A),c=z(A,"DIV",{class:!0});var ee=D(c);E=j(ee,f),ee.forEach(g),m=W(A),h=z(A,"DIV",{class:!0});var R=D(h);$=j(R,u),p=W(R),_=j(R,d),R.forEach(g),v=W(A),A.forEach(g),this.h()},h(){S(t,"class","p-2 hover:bg-gray-200"),Pe(t,"text-blue-500",r[21].label===!0),S(s,"class","p-2 hover:bg-gray-200"),Pe(s,"text-red-500",r[21].label===!1),S(l,"class","mr-2 flex flex-shrink-0 gap-x-1"),S(c,"class","flex-grow"),S(h,"class","w-40 flex-shrink-0 text-right"),S(e,"class",w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`)},m(B,A){L(B,e,A),b(e,l),b(l,t),O(n,t,null),b(l,o),b(l,s),O(a,s,null),b(e,i),b(e,c),b(c,E),b(e,m),b(e,h),b(h,$),b(h,p),b(h,_),b(e,v),I=!0,y||(P=[Le(t,"click",q),Le(s,"click",C)],y=!0)},p(B,A){r=B,(!I||A&2)&&Pe(t,"text-blue-500",r[21].label===!0),(!I||A&2)&&Pe(s,"text-red-500",r[21].label===!1),(!I||A&2)&&f!==(f=r[21].text+"")&&ne(E,f),(!I||A&2)&&u!==(u=r[25]+"")&&ne($,u),(!I||A&2)&&d!==(d=$e(r[21].score,2)+"")&&ne(_,d),(!I||A&2&&w!==(w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`))&&S(e,"class",w)},i(B){I||(k(n.$$.fragment,B),k(a.$$.fragment,B),I=!0)},o(B){V(n.$$.fragment,B),V(a.$$.fragment,B),I=!1},d(B){B&&g(e),F(n),F(a),y=!1,ll(P)}}}function bn(r){let e,l;return e=new Lt({props:{paragraph:!0,lines:2}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Et(r){let e,l,t,n,o;const s=[bn,pn],a=[];function i(f,E){return E&3&&(e=null),e==null&&(e=!!(f[21]==null||f[0].includes(f[21].rowid))),e?0:1}function c(f,E){return E===1?gn(f):f}return l=i(r,-1),t=a[l]=s[l](c(r,l)),{c(){t.c(),n=we()},l(f){t.l(f),n=we()},m(f,E){a[l].m(f,E),L(f,n,E),o=!0},p(f,E){let m=l;l=i(f,E),l===m?a[l].p(c(f,l),E):(te(),V(a[m],1,1,()=>{a[m]=null}),le(),t=a[l],t?t.p(c(f,l),E):(t=a[l]=s[l](c(f,l)),t.c()),k(t,1),t.m(n.parentNode,n))},i(f){o||(k(t),o=!0)},o(f){V(t),o=!1},d(f){a[l].d(f),f&&g(n)}}}function vn(r){let e,l,t=r[1],n=[];for(let s=0;sV(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s(E(),E=ye(a,M=>l(16,f=M)),a),h,u=X,$=()=>(u(),u=ye(n,M=>l(17,h=M)),n);r.$$.on_destroy.push(()=>E()),r.$$.on_destroy.push(()=>u());let{dataset:p}=e,{concept:d}=e,{fieldPath:_}=e,{schema:v}=e,{embedding:w}=e;const I=Yt();Ie(r,I,M=>l(20,c=M));let y={},P={},q=[];function C(M,U){if(M==null)return;const re={text:M.text,label:U},ee=Object.keys(P).find(R=>P[R]===M);l(11,y={...P}),l(0,q=[M.rowid,...q]),c.mutate([d.namespace,d.concept_name,{insert:[re]}],{onSuccess:()=>{l(11,y={...y,[ee]:void 0})},onSettled:()=>{l(0,q=q.filter(R=>R!==M.rowid))}})}const B=M=>C(M,!0),A=M=>C(M,!1);return r.$$set=M=>{"dataset"in M&&l(6,p=M.dataset),"concept"in M&&l(7,d=M.concept),"fieldPath"in M&&l(8,_=M.fieldPath),"schema"in M&&l(9,v=M.schema),"embedding"in M&&l(10,w=M.embedding)},r.$$.update=()=>{var M,U;r.$$.dirty&1408&&l(15,t={path:_,type:"concept",concept_namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&33600&&$(l(3,n=et(p.namespace,p.name,{columns:[Oe,_],limit:Vt,combine_columns:!0,searches:[t]},v))),r.$$.dirty&1152&&l(14,o={signal_name:"concept_score",namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&128&&l(13,s={signal_name:"concept_labels",namespace:d.namespace,concept_name:d.concept_name}),r.$$.dirty&25408&&m(l(2,a=et(p.namespace,p.name,{columns:[Oe,_,{path:_,signal_udf:o},{path:_,signal_udf:s}],limit:Vt,combine_columns:!0,sort_by:[Oe]},v))),r.$$.dirty&200064&&l(12,P=hn(y,h.isFetching||(M=h.data)==null?void 0:M.rows,f.isFetching||(U=f.data)==null?void 0:U.rows,d,_,w)),r.$$.dirty&4096&&l(1,i=[P.positive,P.neutral,P.negative])},[q,i,a,n,I,C,p,d,_,v,w,y,P,s,o,t,f,h,B,A]}class En extends ce{constructor(e){super(),fe(this,e,kn,vn,ue,{dataset:6,concept:7,fieldPath:8,schema:9,embedding:10})}}function Dt(r){let e,l;return e=new Ye({props:{class:"dataset-link top-7 h-8",icon:wl,iconDescription:"Open dataset and apply concept."}}),e.$on("click",r[8]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function It(r){let e,l,t;return l=new En({props:{concept:r[0],dataset:r[1],fieldPath:r[2],schema:r[4],embedding:r[3]}}),{c(){e=T("div"),N(l.$$.fragment)},l(n){e=z(n,"DIV",{});var o=D(e);H(l.$$.fragment,o),o.forEach(g)},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1&&(s.concept=n[0]),o&2&&(s.dataset=n[1]),o&4&&(s.fieldPath=n[2]),o&16&&(s.schema=n[4]),o&8&&(s.embedding=n[3]),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function yt(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"No embeddings",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before using the labeler on this dataset."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Vn(r){let e,l,t,n,o,s,a,i,c,f,E;function m(v){r[10](v)}function h(v){r[11](v)}function u(v){r[12](v)}let $={};r[1]!==void 0&&($.dataset=r[1]),r[2]!==void 0&&($.path=r[2]),r[3]!==void 0&&($.embedding=r[3]),n=new Xt({props:$}),Ee.push(()=>Ve(n,"dataset",m)),Ee.push(()=>Ve(n,"path",h)),Ee.push(()=>Ve(n,"embedding",u));let p=r[5]!=null&&r[3]!=null&&Dt(r),d=r[1]!=null&&r[2]!=null&&r[4]!=null&&r[3]!=null&&It(r),_=r[3]==null&&yt();return{c(){e=T("div"),l=T("div"),t=T("div"),N(n.$$.fragment),i=G(),p&&p.c(),c=G(),d&&d.c(),f=G(),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);t=z(I,"DIV",{class:!0});var y=D(t);H(n.$$.fragment,y),y.forEach(g),i=W(I),p&&p.l(I),I.forEach(g),c=W(w),d&&d.l(w),f=W(w),_&&_.l(w),w.forEach(g),this.h()},h(){S(t,"class","flex-grow"),S(l,"class","flex flex-row gap-x-4"),S(e,"class","flex flex-col gap-y-4")},m(v,w){L(v,e,w),b(e,l),b(l,t),O(n,t,null),b(l,i),p&&p.m(l,null),b(e,c),d&&d.m(e,null),b(e,f),_&&_.m(e,null),E=!0},p(v,[w]){const I={};!o&&w&2&&(o=!0,I.dataset=v[1],De(()=>o=!1)),!s&&w&4&&(s=!0,I.path=v[2],De(()=>s=!1)),!a&&w&8&&(a=!0,I.embedding=v[3],De(()=>a=!1)),n.$set(I),v[5]!=null&&v[3]!=null?p?(p.p(v,w),w&40&&k(p,1)):(p=Dt(v),p.c(),k(p,1),p.m(l,null)):p&&(te(),V(p,1,1,()=>{p=null}),le()),v[1]!=null&&v[2]!=null&&v[4]!=null&&v[3]!=null?d?(d.p(v,w),w&30&&k(d,1)):(d=It(v),d.c(),k(d,1),d.m(e,f)):d&&(te(),V(d,1,1,()=>{d=null}),le()),v[3]==null?_?w&8&&k(_,1):(_=yt(),_.c(),k(_,1),_.m(e,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n.$$.fragment,v),k(p),k(d),k(_),E=!0)},o(v){V(n.$$.fragment,v),V(p),V(d),V(_),E=!1},d(v){v&&g(e),F(n),p&&p.d(),d&&d.d(),_&&_.d()}}}function Dn(r,e,l){let t,n,o,s,a=X,i=()=>(a(),a=ye(o,I=>l(13,s=I)),o),c,f=X,E=()=>(f(),f=ye(t,I=>l(9,c=I)),t);r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:m}=e,h,u,$,p;function d(){n==null||p==null||h==null||o==null||s==null||(o.addSearch({path:[n],type:"concept",concept_namespace:m.namespace,concept_name:m.concept_name,embedding:p}),Ht(jt(h.namespace,h.name,s)))}function _(I){h=I,l(1,h)}function v(I){$=I,l(2,$)}function w(I){p=I,l(3,p)}return r.$$set=I=>{"concept"in I&&l(0,m=I.concept)},r.$$.update=()=>{r.$$.dirty&2&&E(l(7,t=Ut(h==null?void 0:h.namespace,h==null?void 0:h.name))),r.$$.dirty&512&&l(4,u=c.data),r.$$.dirty&4&&l(5,n=$?Me($):void 0),r.$$.dirty&14&&i(l(6,o=h!=null&&$!=null&&p!=null?Zt(h.namespace,h.name):null))},[m,h,$,p,u,n,o,t,d,c,_,v,w]}class In extends ce{constructor(e){super(),fe(this,e,Dn,Vn,ue,{concept:0})}}function St(r,e,l){const t=r.slice();return t[27]=e[l],t}function Ct(r){let e,l,t,n,o;return l=new zl({props:{class:"ml-2"}}),{c(){e=T("div"),N(l.$$.fragment)},l(s){e=z(s,"DIV",{});var a=D(e);H(l.$$.fragment,a),a.forEach(g)},m(s,a){L(s,e,a),O(l,e,null),t=!0,n||(o=Nt(Ot.call(null,e,{text:"Your concepts are only visible to you when logged in with Google."})),n=!0)},i(s){t||(k(l.$$.fragment,s),t=!0)},o(s){V(l.$$.fragment,s),t=!1},d(s){s&&g(e),F(l),n=!1,o()}}}function Tt(r){let e,l=r[0].description+"",t;return{c(){e=T("div"),t=Z(l),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);t=j(o,l),o.forEach(g),this.h()},h(){S(e,"class","text text-base text-gray-600")},m(n,o){L(n,e,o),b(e,t)},p(n,o){o&1&&l!==(l=n[0].description+"")&&ne(t,l)},d(n){n&&g(e)}}}function yn(r){let e,l;return{c(){e=T("div"),l=Z("Try it"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Try it"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Sn(r){let e,l;return e=new ln({props:{example:r[6],concept:r[0],slot:"below"}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.example=t[6]),n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Cn(r){let e,l;return{c(){e=T("div"),l=Z("Apply to a dataset"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Apply to a dataset"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Tn(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"Choose a dataset with a computed embedding",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before you can search by concept."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function zn(r){let e,l,t;return l=new Ye({props:{class:"",iconDescription:"Open dataset and apply concept.",$$slots:{default:[Mn]},$$scope:{ctx:r}}}),l.$on("click",r[20]),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","mt-4")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1073741824&&(s.$$scope={dirty:o,ctx:n}),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Mn(r){let e;return{c(){e=Z("Search by concept")},l(l){e=j(l,"Search by concept")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function An(r){let e,l,t,n,o,s,a,i,c;function f(d){r[17](d)}function E(d){r[18](d)}function m(d){r[19](d)}let h={};r[1]!==void 0&&(h.dataset=r[1]),r[2]!==void 0&&(h.path=r[2]),r[3]!==void 0&&(h.embedding=r[3]),l=new Xt({props:h}),Ee.push(()=>Ve(l,"dataset",f)),Ee.push(()=>Ve(l,"path",E)),Ee.push(()=>Ve(l,"embedding",m));const u=[zn,Tn],$=[];function p(d,_){return d[1]!=null&&d[2]!=null&&d[3]!=null?0:1}return a=p(r),i=$[a]=u[a](r),{c(){e=T("div"),N(l.$$.fragment),s=G(),i.c(),this.h()},l(d){e=z(d,"DIV",{slot:!0});var _=D(e);H(l.$$.fragment,_),s=W(_),i.l(_),_.forEach(g),this.h()},h(){S(e,"slot","below")},m(d,_){L(d,e,_),O(l,e,null),b(e,s),$[a].m(e,null),c=!0},p(d,_){const v={};!t&&_&2&&(t=!0,v.dataset=d[1],De(()=>t=!1)),!n&&_&4&&(n=!0,v.path=d[2],De(()=>n=!1)),!o&&_&8&&(o=!0,v.embedding=d[3],De(()=>o=!1)),l.$set(v);let w=a;a=p(d),a===w?$[a].p(d,_):(te(),V($[w],1,1,()=>{$[w]=null}),le(),i=$[a],i?i.p(d,_):(i=$[a]=u[a](d),i.c()),k(i,1),i.m(e,null))},i(d){c||(k(l.$$.fragment,d),k(i),c=!0)},o(d){V(l.$$.fragment,d),V(i),c=!1},d(d){d&&g(e),F(l),$[a].d()}}}function zt(r){let e,l;return e=new Fe({props:{expanded:!0,$$slots:{below:[Rn],above:[Pn]},$$scope:{ctx:r}}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1073742337&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Pn(r){let e,l;return{c(){e=T("div"),l=Z("Metrics"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Metrics"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Mt(r){let e,l;return e=new Wl({props:{concept:r[0],embedding:r[27].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),n&512&&(o.embedding=t[27].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rn(r){let e,l,t=r[9].data,n=[];for(let s=0;sV(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s{J=null}),le()),Q[0].description?Y?Y.p(Q,K):(Y=Tt(Q),Y.c(),Y.m(l,null)):Y&&(Y.d(1),Y=null);const he={};K&1073741889&&(he.$$scope={dirty:K,ctx:Q}),c.$set(he);const be={};K&1073741838&&(be.$$scope={dirty:K,ctx:Q}),E.$set(be),Q[9].data?x?(x.p(Q,K),K&512&&k(x,1)):(x=zt(Q),x.c(),k(x,1),x.m(e,h)):x&&(te(),V(x,1,1,()=>{x=null}),le());const ve={};K&1073741825&&(ve.$$scope={dirty:K,ctx:Q}),u.$set(ve),(!me||K&16)&&I!==(I=Q[4].length+"")&&ne(y,I);const ge={};K&16&&(ge.data=Q[4]),C.$set(ge),(!me||K&128)&&ee!==(ee=Q[7].length+"")&&ne(R,ee);const pe={};K&128&&(pe.data=Q[7]),se.$set(pe)},i(Q){me||(k(J),k(c.$$.fragment,Q),k(E.$$.fragment,Q),k(x),k(u.$$.fragment,Q),k(v.$$.fragment,Q),k(C.$$.fragment,Q),k(U.$$.fragment,Q),k(se.$$.fragment,Q),me=!0)},o(Q){V(J),V(c.$$.fragment,Q),V(E.$$.fragment,Q),V(x),V(u.$$.fragment,Q),V(v.$$.fragment,Q),V(C.$$.fragment,Q),V(U.$$.fragment,Q),V(se.$$.fragment,Q),me=!1},d(Q){Q&&g(e),J&&J.d(),Y&&Y.d(),F(c),F(E),x&&x.d(),F(u),F(v),F(C),F(U),F(se)}}}function On(r,e,l){let t,n,o,s,a,i,c,f=X,E=()=>(f(),f=ye(a,R=>l(26,c=R)),a),m,h;r.$$.on_destroy.push(()=>f());let{concept:u}=e;const $=_l();Ie(r,$,R=>l(16,m=R));const p=Yt();Ie(r,p,R=>l(25,i=R));const d=Ft();Ie(r,d,R=>l(9,h=R));let _,v,w;function I(){const R=v?Me(v):void 0;R==null||w==null||_==null||a==null||c==null||(a.addSearch({path:[R],type:"concept",concept_namespace:u.namespace,concept_name:u.concept_name,embedding:w}),Ht(jt(_.namespace,_.name,c)))}function y(R){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{remove:[R]}])}function P(R,de){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{insert:[{text:R,label:de}]}])}function q(R){_=R,l(1,_)}function C(R){v=R,l(2,v)}function B(R){w=R,l(3,w)}const A=()=>I(),M=R=>y(R.detail),U=R=>P(R.detail,!0),re=R=>y(R.detail),ee=R=>P(R.detail,!1);return r.$$set=R=>{"concept"in R&&l(0,u=R.concept)},r.$$.update=()=>{var R,de;r.$$.dirty&65536&&l(8,t=(de=(R=m.data)==null?void 0:R.user)==null?void 0:de.id),r.$$.dirty&1&&l(4,n=Object.values(u.data).filter(oe=>oe.label==!0)),r.$$.dirty&1&&l(7,o=Object.values(u.data).filter(oe=>oe.label==!1)),r.$$.dirty&16&&l(6,s=n[Math.floor(Math.random()*n.length)]),r.$$.dirty&14&&E(l(5,a=_!=null&&v!=null&&w!=null?Zt(_.namespace,_.name):null))},[u,_,v,w,n,a,s,o,t,h,$,p,d,I,y,P,m,q,C,B,A,M,U,re,ee]}class Jn extends ce{constructor(e){super(),fe(this,e,On,Hn,ue,{concept:0})}}export{Jn as C,Kn as I,Sl as T,lt as a}; diff --git a/lilac/web/_app/immutable/chunks/navigation.1d886b5b.js b/lilac/web/_app/immutable/chunks/navigation.1d886b5b.js new file mode 100644 index 0000000000000000000000000000000000000000..7accd422189479c469fb440f6789bb28277f9b4d --- /dev/null +++ b/lilac/web/_app/immutable/chunks/navigation.1d886b5b.js @@ -0,0 +1 @@ +import{j as o}from"./singletons.3558a5b2.js";const e=o("goto");export{e as g}; diff --git a/lilac/web/_app/immutable/chunks/singletons.3558a5b2.js b/lilac/web/_app/immutable/chunks/singletons.3558a5b2.js new file mode 100644 index 0000000000000000000000000000000000000000..596b07154256053c46ea53d3aabd990f164c7d62 --- /dev/null +++ b/lilac/web/_app/immutable/chunks/singletons.3558a5b2.js @@ -0,0 +1 @@ +import{w as u}from"./index.2b0dd2f8.js";var p;const k=((p=globalThis.__sveltekit_9d4yk4)==null?void 0:p.base)??"";var h;const m=((h=globalThis.__sveltekit_9d4yk4)==null?void 0:h.assets)??k,w="1692646464438",R="sveltekit:snapshot",T="sveltekit:scroll",I="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1};function S(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function x(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function g(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function O(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=g(e)}}function U(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!o||E(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===location.origin&&e.hasAttribute("download");return{url:n,external:r,target:o,download:l}}function L(e){let t=null,n=null,o=null,r=null,l=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=g(s);function i(v){switch(v){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(a)}}function _(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function l(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:r,subscribe:l}}function y(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const r=await fetch(`${m}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==w;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function E(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}let b;function N(e){b=e.client}function P(e){return(...t)=>b[e](...t)}const V={url:_({}),page:_({}),navigating:u(null),updated:y()};export{I,f as P,T as S,R as a,U as b,L as c,x as d,k as e,O as f,S as g,N as h,E as i,P as j,V as s}; diff --git a/lilac/web/_app/immutable/chunks/stores.8f6d2882.js b/lilac/web/_app/immutable/chunks/stores.8f6d2882.js new file mode 100644 index 0000000000000000000000000000000000000000..486bd3ef533bf5e0ee9148dd4f38d5164cd5df13 --- /dev/null +++ b/lilac/web/_app/immutable/chunks/stores.8f6d2882.js @@ -0,0 +1 @@ +import{s as e}from"./singletons.3558a5b2.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p}; diff --git a/lilac/web/_app/immutable/entry/app.70490562.js b/lilac/web/_app/immutable/entry/app.70490562.js new file mode 100644 index 0000000000000000000000000000000000000000..6adeaf822da25dc0a23a54eb46f8ab79b884b48c --- /dev/null +++ b/lilac/web/_app/immutable/entry/app.70490562.js @@ -0,0 +1 @@ +import{S as C,i as q,s as U,a as j,e as d,c as z,b as E,d as h,f as P,g,h as w,j as W,o as F,k as G,l as H,m as J,n as D,p as m,q as K,r as M,u as Q,v as A,w as I,x as k,y as v,z as O,A as R,B as L}from"../chunks/index.b333a928.js";const X="modulepreload",Y=function(a,e){return new URL(a,e).href},T={},p=function(e,n,i){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(f=>{if(f=Y(f,i),f in T)return;T[f]=!0;const t=f.endsWith(".css"),r=t?'[rel="stylesheet"]':"";if(!!i)for(let l=s.length-1;l>=0;l--){const u=s[l];if(u.href===f&&(!t||u.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${f}"]${r}`))return;const o=document.createElement("link");if(o.rel=t?"stylesheet":X,t||(o.as="script",o.crossOrigin=""),o.href=f,document.head.appendChild(o),t)return new Promise((l,u)=>{o.addEventListener("load",l),o.addEventListener("error",()=>u(new Error(`Unable to preload CSS for ${f}`)))})})).then(()=>e())},ie={};function Z(a){let e,n,i;var s=a[1][0];function f(t){return{props:{data:t[3],form:t[2]}}}return s&&(e=k(s,f(a)),a[12](e)),{c(){e&&v(e.$$.fragment),n=d()},l(t){e&&O(e.$$.fragment,t),n=d()},m(t,r){e&&R(e,t,r),E(t,n,r),i=!0},p(t,r){const _={};if(r&8&&(_.data=t[3]),r&4&&(_.form=t[2]),r&2&&s!==(s=t[1][0])){if(e){A();const o=e;h(o.$$.fragment,1,0,()=>{L(o,1)}),P()}s?(e=k(s,f(t)),t[12](e),v(e.$$.fragment),g(e.$$.fragment,1),R(e,n.parentNode,n)):e=null}else s&&e.$set(_)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){a[12](null),t&&w(n),e&&L(e,t)}}}function $(a){let e,n,i;var s=a[1][0];function f(t){return{props:{data:t[3],$$slots:{default:[x]},$$scope:{ctx:t}}}}return s&&(e=k(s,f(a)),a[11](e)),{c(){e&&v(e.$$.fragment),n=d()},l(t){e&&O(e.$$.fragment,t),n=d()},m(t,r){e&&R(e,t,r),E(t,n,r),i=!0},p(t,r){const _={};if(r&8&&(_.data=t[3]),r&8215&&(_.$$scope={dirty:r,ctx:t}),r&2&&s!==(s=t[1][0])){if(e){A();const o=e;h(o.$$.fragment,1,0,()=>{L(o,1)}),P()}s?(e=k(s,f(t)),t[11](e),v(e.$$.fragment),g(e.$$.fragment,1),R(e,n.parentNode,n)):e=null}else s&&e.$set(_)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){a[11](null),t&&w(n),e&&L(e,t)}}}function x(a){let e,n,i;var s=a[1][1];function f(t){return{props:{data:t[4],form:t[2]}}}return s&&(e=k(s,f(a)),a[10](e)),{c(){e&&v(e.$$.fragment),n=d()},l(t){e&&O(e.$$.fragment,t),n=d()},m(t,r){e&&R(e,t,r),E(t,n,r),i=!0},p(t,r){const _={};if(r&16&&(_.data=t[4]),r&4&&(_.form=t[2]),r&2&&s!==(s=t[1][1])){if(e){A();const o=e;h(o.$$.fragment,1,0,()=>{L(o,1)}),P()}s?(e=k(s,f(t)),t[10](e),v(e.$$.fragment),g(e.$$.fragment,1),R(e,n.parentNode,n)):e=null}else s&&e.$set(_)},i(t){i||(e&&g(e.$$.fragment,t),i=!0)},o(t){e&&h(e.$$.fragment,t),i=!1},d(t){a[10](null),t&&w(n),e&&L(e,t)}}}function V(a){let e,n=a[6]&&y(a);return{c(){e=G("div"),n&&n.c(),this.h()},l(i){e=H(i,"DIV",{id:!0,"aria-live":!0,"aria-atomic":!0,style:!0});var s=J(e);n&&n.l(s),s.forEach(w),this.h()},h(){D(e,"id","svelte-announcer"),D(e,"aria-live","assertive"),D(e,"aria-atomic","true"),m(e,"position","absolute"),m(e,"left","0"),m(e,"top","0"),m(e,"clip","rect(0 0 0 0)"),m(e,"clip-path","inset(50%)"),m(e,"overflow","hidden"),m(e,"white-space","nowrap"),m(e,"width","1px"),m(e,"height","1px")},m(i,s){E(i,e,s),n&&n.m(e,null)},p(i,s){i[6]?n?n.p(i,s):(n=y(i),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},d(i){i&&w(e),n&&n.d()}}}function y(a){let e;return{c(){e=K(a[7])},l(n){e=M(n,a[7])},m(n,i){E(n,e,i)},p(n,i){i&128&&Q(e,n[7])},d(n){n&&w(e)}}}function ee(a){let e,n,i,s,f;const t=[$,Z],r=[];function _(l,u){return l[1][1]?0:1}e=_(a),n=r[e]=t[e](a);let o=a[5]&&V(a);return{c(){n.c(),i=j(),o&&o.c(),s=d()},l(l){n.l(l),i=z(l),o&&o.l(l),s=d()},m(l,u){r[e].m(l,u),E(l,i,u),o&&o.m(l,u),E(l,s,u),f=!0},p(l,[u]){let b=e;e=_(l),e===b?r[e].p(l,u):(A(),h(r[b],1,1,()=>{r[b]=null}),P(),n=r[e],n?n.p(l,u):(n=r[e]=t[e](l),n.c()),g(n,1),n.m(i.parentNode,i)),l[5]?o?o.p(l,u):(o=V(l),o.c(),o.m(s.parentNode,s)):o&&(o.d(1),o=null)},i(l){f||(g(n),f=!0)},o(l){h(n),f=!1},d(l){r[e].d(l),l&&w(i),o&&o.d(l),l&&w(s)}}}function te(a,e,n){let{stores:i}=e,{page:s}=e,{constructors:f}=e,{components:t=[]}=e,{form:r}=e,{data_0:_=null}=e,{data_1:o=null}=e;W(i.page.notify);let l=!1,u=!1,b=null;F(()=>{const c=i.page.subscribe(()=>{l&&(n(6,u=!0),n(7,b=document.title||"untitled page"))});return n(5,l=!0),c});function N(c){I[c?"unshift":"push"](()=>{t[1]=c,n(0,t)})}function S(c){I[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}function B(c){I[c?"unshift":"push"](()=>{t[0]=c,n(0,t)})}return a.$$set=c=>{"stores"in c&&n(8,i=c.stores),"page"in c&&n(9,s=c.page),"constructors"in c&&n(1,f=c.constructors),"components"in c&&n(0,t=c.components),"form"in c&&n(2,r=c.form),"data_0"in c&&n(3,_=c.data_0),"data_1"in c&&n(4,o=c.data_1)},a.$$.update=()=>{a.$$.dirty&768&&i.page.set(s)},[t,f,r,_,o,l,u,b,i,s,N,S,B]}class se extends C{constructor(e){super(),q(this,e,te,ee,U,{stores:8,page:9,constructors:1,components:0,form:2,data_0:3,data_1:4})}}const re=[()=>p(()=>import("../nodes/0.53d835b8.js"),["../nodes/0.53d835b8.js","../chunks/index.b333a928.js","../chunks/ChevronUp.95b74f6d.js","../chunks/Commands.1fffdf33.js","../chunks/index.2b0dd2f8.js","../assets/Commands.319d3f89.css","../chunks/utils.4eeb8687.js","../chunks/stores.8f6d2882.js","../chunks/singletons.3558a5b2.js","../chunks/navigation.1d886b5b.js","../chunks/notificationsStore.e7f2bd3e.js","../chunks/Settings.e24cc1d1.js","../chunks/settingsStore.6e7d5078.js","../chunks/ToastNotification.66c9609a.js","../assets/0.f5aaacd6.css"],import.meta.url),()=>p(()=>import("../nodes/1.75e6c9f2.js"),["../nodes/1.75e6c9f2.js","../chunks/index.b333a928.js","../chunks/stores.8f6d2882.js","../chunks/singletons.3558a5b2.js","../chunks/index.2b0dd2f8.js"],import.meta.url),()=>p(()=>import("../nodes/2.ae0f1e40.js"),["../nodes/2.ae0f1e40.js","../chunks/index.b333a928.js","../chunks/navigation.1d886b5b.js","../chunks/singletons.3558a5b2.js","../chunks/index.2b0dd2f8.js","../chunks/Commands.1fffdf33.js","../assets/Commands.319d3f89.css","../chunks/Page.4b0754ae.js","../assets/Page.61b340b0.css"],import.meta.url),()=>p(()=>import("../nodes/3.3e06c443.js"),["../nodes/3.3e06c443.js","../chunks/index.b333a928.js","../chunks/navigation.1d886b5b.js","../chunks/singletons.3558a5b2.js","../chunks/index.2b0dd2f8.js","../chunks/Page.4b0754ae.js","../chunks/Commands.1fffdf33.js","../assets/Commands.319d3f89.css","../assets/Page.61b340b0.css","../chunks/ConceptView.d774cac2.js","../chunks/utils.4eeb8687.js","../chunks/StringSpanHighlight.d53dc1a7.js","../chunks/notificationsStore.e7f2bd3e.js","../assets/StringSpanHighlight.c928b3d5.css","../chunks/ChevronUp.95b74f6d.js","../chunks/settingsStore.6e7d5078.js","../chunks/ArrowUpRight.e306cdcd.js","../chunks/ToastNotification.66c9609a.js","../assets/ConceptView.91d1847f.css"],import.meta.url),()=>p(()=>import("../nodes/4.3a2ca6a3.js"),["../nodes/4.3a2ca6a3.js","../chunks/index.b333a928.js","../chunks/navigation.1d886b5b.js","../chunks/singletons.3558a5b2.js","../chunks/index.2b0dd2f8.js","../chunks/Page.4b0754ae.js","../chunks/Commands.1fffdf33.js","../assets/Commands.319d3f89.css","../assets/Page.61b340b0.css","../chunks/notificationsStore.e7f2bd3e.js","../chunks/utils.4eeb8687.js","../chunks/ConceptView.d774cac2.js","../chunks/StringSpanHighlight.d53dc1a7.js","../assets/StringSpanHighlight.c928b3d5.css","../chunks/ChevronUp.95b74f6d.js","../chunks/settingsStore.6e7d5078.js","../chunks/ArrowUpRight.e306cdcd.js","../chunks/ToastNotification.66c9609a.js","../assets/ConceptView.91d1847f.css","../chunks/RowItemMetadata.760ed6a3.js","../assets/RowItemMetadata.0f74c501.css","../chunks/ComboBox.5bfb4a00.js","../chunks/Settings.e24cc1d1.js","../assets/4.1e49baa5.css"],import.meta.url),()=>p(()=>import("../nodes/5.3d3a318e.js"),["../nodes/5.3d3a318e.js","../chunks/index.b333a928.js","../chunks/navigation.1d886b5b.js","../chunks/singletons.3558a5b2.js","../chunks/index.2b0dd2f8.js","../chunks/Page.4b0754ae.js","../chunks/Commands.1fffdf33.js","../assets/Commands.319d3f89.css","../assets/Page.61b340b0.css","../chunks/utils.4eeb8687.js","../chunks/ArrowUpRight.e306cdcd.js","../chunks/ToastNotification.66c9609a.js","../assets/5.cd1a9257.css"],import.meta.url),()=>p(()=>import("../nodes/6.4300fff1.js"),["../nodes/6.4300fff1.js","../chunks/index.b333a928.js","../chunks/navigation.1d886b5b.js","../chunks/singletons.3558a5b2.js","../chunks/index.2b0dd2f8.js","../chunks/Commands.1fffdf33.js","../assets/Commands.319d3f89.css","../chunks/Page.4b0754ae.js","../assets/Page.61b340b0.css","../chunks/ComboBox.5bfb4a00.js","../chunks/utils.4eeb8687.js","../assets/6.8302e01e.css"],import.meta.url),()=>p(()=>import("../nodes/7.8c3c9f60.js"),["../nodes/7.8c3c9f60.js","../chunks/index.b333a928.js","../chunks/Page.4b0754ae.js","../chunks/Commands.1fffdf33.js","../chunks/index.2b0dd2f8.js","../assets/Commands.319d3f89.css","../assets/Page.61b340b0.css","../chunks/settingsStore.6e7d5078.js"],import.meta.url),()=>p(()=>import("../nodes/8.19c87ebd.js"),["../nodes/8.19c87ebd.js","../chunks/index.b333a928.js","../chunks/navigation.1d886b5b.js","../chunks/singletons.3558a5b2.js","../chunks/index.2b0dd2f8.js","../chunks/Page.4b0754ae.js","../chunks/Commands.1fffdf33.js","../assets/Commands.319d3f89.css","../assets/Page.61b340b0.css","../chunks/notificationsStore.e7f2bd3e.js","../chunks/utils.4eeb8687.js","../chunks/RowItemMetadata.760ed6a3.js","../chunks/StringSpanHighlight.d53dc1a7.js","../assets/StringSpanHighlight.c928b3d5.css","../assets/RowItemMetadata.0f74c501.css","../assets/8.483966d0.css"],import.meta.url)],oe=[],ae={"/":[2],"/concepts":[3],"/datasets":[4],"/datasets/loading":[5],"/datasets/new":[6],"/settings":[7],"/signals":[8]},le={handleError:({error:a})=>{console.error(a)}};export{ae as dictionary,le as hooks,ie as matchers,re as nodes,se as root,oe as server_loads}; diff --git a/lilac/web/_app/immutable/entry/start.f2a5e826.js b/lilac/web/_app/immutable/entry/start.f2a5e826.js new file mode 100644 index 0000000000000000000000000000000000000000..a156e363350d06f9ee4aca85c06da0dde7903b46 --- /dev/null +++ b/lilac/web/_app/immutable/entry/start.f2a5e826.js @@ -0,0 +1,3 @@ +import{o as De,t as ye}from"../chunks/index.b333a928.js";import{S as He,a as Je,I as V,g as Ce,f as Ve,b as we,c as le,s as M,d as Q,i as _e,e as J,P as qe,h as We}from"../chunks/singletons.3558a5b2.js";function Xe(t,o){return t==="/"||o==="ignore"?t:o==="never"?t.endsWith("/")?t.slice(0,-1):t:o==="always"&&!t.endsWith("/")?t+"/":t}function Ze(t){return t.split("%25").map(decodeURI).join("%25")}function Qe(t){for(const o in t)t[o]=decodeURIComponent(t[o]);return t}const et=["href","pathname","search","searchParams","toString","toJSON"];function tt(t,o){const u=new URL(t);for(const i of et)Object.defineProperty(u,i,{get(){return o(),t[i]},enumerable:!0,configurable:!0});return nt(u),u}function nt(t){Object.defineProperty(t,"hash",{get(){throw new Error("Cannot access event.url.hash. Consider using `$page.url.hash` inside a component instead")}})}const at="/__data.json";function rt(t){return t.replace(/\/$/,"")+at}function Ke(t){try{return JSON.parse(sessionStorage[t])}catch{}}function Fe(t,o){const u=JSON.stringify(o);try{sessionStorage[t]=u}catch{}}function ot(...t){let o=5381;for(const u of t)if(typeof u=="string"){let i=u.length;for(;i;)o=o*33^u.charCodeAt(--i)}else if(ArrayBuffer.isView(u)){const i=new Uint8Array(u.buffer,u.byteOffset,u.byteLength);let d=i.length;for(;d;)o=o*33^i[--d]}else throw new TypeError("value must be a string or TypedArray");return(o>>>0).toString(36)}const fe=window.fetch;window.fetch=(t,o)=>((t instanceof Request?t.method:(o==null?void 0:o.method)||"GET")!=="GET"&&te.delete(Se(t)),fe(t,o));const te=new Map;function it(t,o){const u=Se(t,o),i=document.querySelector(u);if(i!=null&&i.textContent){const{body:d,...f}=JSON.parse(i.textContent),S=i.getAttribute("data-ttl");return S&&te.set(u,{body:d,init:f,ttl:1e3*Number(S)}),Promise.resolve(new Response(d,f))}return fe(t,o)}function st(t,o,u){if(te.size>0){const i=Se(t,u),d=te.get(i);if(d){if(performance.now(){const d=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(i);if(d)return o.push({name:d[1],matcher:d[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const f=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(i);if(f)return o.push({name:f[1],matcher:f[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!i)return;const S=i.split(/\[(.+?)\](?!\])/);return"/"+S.map((b,w)=>{if(w%2){if(b.startsWith("x+"))return be(String.fromCharCode(parseInt(b.slice(2),16)));if(b.startsWith("u+"))return be(String.fromCharCode(...b.slice(2).split("-").map(P=>parseInt(P,16))));const p=ct.exec(b);if(!p)throw new Error(`Invalid param: ${b}. Params and matcher names can only have underscores and alphanumeric characters.`);const[,D,x,k,N]=p;return o.push({name:k,matcher:N,optional:!!D,rest:!!x,chained:x?w===1&&S[0]==="":!1}),x?"(.*?)":D?"([^/]*)?":"([^/]+?)"}return be(b)}).join("")}).join("")}/?$`),params:o}}function ft(t){return!/^\([^)]+\)$/.test(t)}function ut(t){return t.slice(1).split("/").filter(ft)}function dt(t,o,u){const i={},d=t.slice(1);let f=0;for(let S=0;Sw).join("/"),f=0;continue}if(b===void 0){l.rest&&(i[l.name]="");continue}if(!l.matcher||u[l.matcher](b)){i[l.name]=b;const w=o[S+1],p=d[S+1];w&&!w.rest&&w.optional&&p&&l.chained&&(f=0);continue}if(l.optional&&l.chained){f++;continue}return}if(!f)return i}function be(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function pt({nodes:t,server_loads:o,dictionary:u,matchers:i}){const d=new Set(o);return Object.entries(u).map(([l,[b,w,p]])=>{const{pattern:D,params:x}=lt(l),k={id:l,exec:N=>{const P=D.exec(N);if(P)return dt(P,x,i)},errors:[1,...p||[]].map(N=>t[N]),layouts:[0,...w||[]].map(S),leaf:f(b)};return k.errors.length=k.layouts.length=Math.max(k.errors.length,k.layouts.length),k});function f(l){const b=l<0;return b&&(l=~l),[b,t[l]]}function S(l){return l===void 0?l:[d.has(l),t[l]]}}class ee{constructor(o,u){this.status=o,typeof u=="string"?this.body={message:u}:u?this.body=u:this.body={message:`Error: ${o}`}}toString(){return JSON.stringify(this.body)}}class Me{constructor(o,u){this.status=o,this.location=u}}async function ht(t){var o;for(const u in t)if(typeof((o=t[u])==null?void 0:o.then)=="function")return Object.fromEntries(await Promise.all(Object.entries(t).map(async([i,d])=>[i,await d])));return t}const gt=-1,mt=-2,yt=-3,wt=-4,_t=-5,bt=-6;function vt(t,o){if(typeof t=="number")return d(t,!0);if(!Array.isArray(t)||t.length===0)throw new Error("Invalid input");const u=t,i=Array(u.length);function d(f,S=!1){if(f===gt)return;if(f===yt)return NaN;if(f===wt)return 1/0;if(f===_t)return-1/0;if(f===bt)return-0;if(S)throw new Error("Invalid input");if(f in i)return i[f];const l=u[f];if(!l||typeof l!="object")i[f]=l;else if(Array.isArray(l))if(typeof l[0]=="string"){const b=l[0],w=o==null?void 0:o[b];if(w)return i[f]=w(d(l[1]));switch(b){case"Date":i[f]=new Date(l[1]);break;case"Set":const p=new Set;i[f]=p;for(let k=1;ko!=null)}const kt="x-sveltekit-invalidated",K=Ke(He)??{},Z=Ke(Je)??{};function ve(t){K[t]=Q()}function Rt(t,o){var $e;const u=pt(t),i=t.nodes[0],d=t.nodes[1];i(),d();const f=document.documentElement,S=[],l=[];let b=null;const w={before_navigate:[],after_navigate:[]};let p={branch:[],error:null,url:null},D=!1,x=!1,k=!0,N=!1,P=!1,z=!1,B=!1,q,j=($e=history.state)==null?void 0:$e[V];j||(j=Date.now(),history.replaceState({...history.state,[V]:j},"",location.href));const ue=K[j];ue&&(history.scrollRestoration="manual",scrollTo(ue.x,ue.y));let F,ne,ae;async function ke(){ae=ae||Promise.resolve(),await ae,ae=null;const e=new URL(location.href),n=W(e,!0);b=null;const r=ne={},a=n&&await he(n);if(r===ne&&a){if(a.type==="redirect")return re(new URL(a.location,e).href,{},[e.pathname],r);a.props.page!==void 0&&(F=a.props.page),q.$set(a.props)}}function Re(e){l.some(n=>n==null?void 0:n.snapshot)&&(Z[e]=l.map(n=>{var r;return(r=n==null?void 0:n.snapshot)==null?void 0:r.capture()}))}function Ae(e){var n;(n=Z[e])==null||n.forEach((r,a)=>{var s,c;(c=(s=l[a])==null?void 0:s.snapshot)==null||c.restore(r)})}function Ie(){ve(j),Fe(He,K),Re(j),Fe(Je,Z)}async function re(e,{noScroll:n=!1,replaceState:r=!1,keepFocus:a=!1,state:s={},invalidateAll:c=!1},g,m){return typeof e=="string"&&(e=new URL(e,Ce(document))),ce({url:e,scroll:n?Q():null,keepfocus:a,redirect_chain:g,details:{state:s,replaceState:r},nav_token:m,accepted:()=>{c&&(B=!0)},blocked:()=>{},type:"goto"})}async function Le(e){return b={id:e.id,promise:he(e).then(n=>(n.type==="loaded"&&n.state.error&&(b=null),n))},b.promise}async function oe(...e){const r=u.filter(a=>e.some(s=>a.exec(s))).map(a=>Promise.all([...a.layouts,a.leaf].map(s=>s==null?void 0:s[1]())));await Promise.all(r)}function Oe(e){var a;p=e.state;const n=document.querySelector("style[data-sveltekit]");n&&n.remove(),F=e.props.page,q=new t.root({target:o,props:{...e.props,stores:M,components:l},hydrate:!0}),Ae(j);const r={from:null,to:{params:p.params,route:{id:((a=p.route)==null?void 0:a.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter"};w.after_navigate.forEach(s=>s(r)),x=!0}async function Y({url:e,params:n,branch:r,status:a,error:s,route:c,form:g}){let m="never";for(const _ of r)(_==null?void 0:_.slash)!==void 0&&(m=_.slash);e.pathname=Xe(e.pathname,m),e.search=e.search;const v={type:"loaded",state:{url:e,params:n,branch:r,error:s,route:c},props:{constructors:St(r).map(_=>_.node.component)}};g!==void 0&&(v.props.form=g);let y={},R=!F,A=0;for(let _=0;_(m.params.add(U),h[U])}),data:(c==null?void 0:c.data)??null,url:tt(r,()=>{m.url=!0}),async fetch(h,U){let $;h instanceof Request?($=h.url,U={body:h.method==="GET"||h.method==="HEAD"?void 0:await h.blob(),cache:h.cache,credentials:h.credentials,headers:h.headers,integrity:h.integrity,keepalive:h.keepalive,method:h.method,mode:h.mode,redirect:h.redirect,referrer:h.referrer,referrerPolicy:h.referrerPolicy,signal:h.signal,...U}):$=h;const C=new URL($,r);return O(C.href),C.origin===r.origin&&($=C.href.slice(r.origin.length)),x?st($,C.href,U):it($,U)},setHeaders:()=>{},depends:O,parent(){return m.parent=!0,n()}};g=await v.universal.load.call(null,_)??null,g=g?await ht(g):null}return{node:v,loader:e,server:c,universal:(R=v.universal)!=null&&R.load?{type:"data",data:g,uses:m}:null,data:g??(c==null?void 0:c.data)??null,slash:((A=v.universal)==null?void 0:A.trailingSlash)??(c==null?void 0:c.slash)}}function Pe(e,n,r,a,s){if(B)return!0;if(!a)return!1;if(a.parent&&e||a.route&&n||a.url&&r)return!0;for(const c of a.params)if(s[c]!==p.params[c])return!0;for(const c of a.dependencies)if(S.some(g=>g(new URL(c))))return!0;return!1}function pe(e,n){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?n??null:null}async function he({id:e,invalidating:n,url:r,params:a,route:s}){if((b==null?void 0:b.id)===e)return b.promise;const{errors:c,layouts:g,leaf:m}=s,v=[...g,m];c.forEach(E=>E==null?void 0:E().catch(()=>{})),v.forEach(E=>E==null?void 0:E[1]().catch(()=>{}));let y=null;const R=p.url?e!==p.url.pathname+p.url.search:!1,A=p.route?s.id!==p.route.id:!1;let O=!1;const _=v.map((E,L)=>{var H;const I=p.branch[L],T=!!(E!=null&&E[0])&&((I==null?void 0:I.loader)!==E[1]||Pe(O,A,R,(H=I.server)==null?void 0:H.uses,a));return T&&(O=!0),T});if(_.some(Boolean)){try{y=await Be(r,_)}catch(E){return ie({status:E instanceof ee?E.status:500,error:await X(E,{url:r,params:a,route:{id:s.id}}),url:r,route:s})}if(y.type==="redirect")return y}const h=y==null?void 0:y.nodes;let U=!1;const $=v.map(async(E,L)=>{var ge;if(!E)return;const I=p.branch[L],T=h==null?void 0:h[L];if((!T||T.type==="skip")&&E[1]===(I==null?void 0:I.loader)&&!Pe(U,A,R,(ge=I.universal)==null?void 0:ge.uses,a))return I;if(U=!0,(T==null?void 0:T.type)==="error")throw T;return de({loader:E[1],url:r,params:a,route:s,parent:async()=>{var Te;const je={};for(let me=0;me{});const C=[];for(let E=0;EPromise.resolve({}),server_data_node:pe(c)}),v={node:await d(),loader:d,universal:null,server:null,data:null};return await Y({url:r,params:s,branch:[m,v],status:e,error:n,route:null})}function W(e,n){if(_e(e,J))return;const r=se(e);for(const a of u){const s=a.exec(r);if(s)return{id:e.pathname+e.search,invalidating:n,route:a,params:Qe(s),url:e}}}function se(e){return Ze(e.pathname.slice(J.length)||"/")}function xe({url:e,type:n,intent:r,delta:a}){var m,v;let s=!1;const c={from:{params:p.params,route:{id:((m=p.route)==null?void 0:m.id)??null},url:p.url},to:{params:(r==null?void 0:r.params)??null,route:{id:((v=r==null?void 0:r.route)==null?void 0:v.id)??null},url:e},willUnload:!r,type:n};a!==void 0&&(c.delta=a);const g={...c,cancel:()=>{s=!0}};return P||w.before_navigate.forEach(y=>y(g)),s?null:c}async function ce({url:e,scroll:n,keepfocus:r,redirect_chain:a,details:s,type:c,delta:g,nav_token:m={},accepted:v,blocked:y}){var $,C,E;const R=W(e,!1),A=xe({url:e,type:c,delta:g,intent:R});if(!A){y();return}const O=j;v(),P=!0,x&&M.navigating.set(A),ne=m;let _=R&&await he(R);if(!_){if(_e(e,J))return await G(e);_=await Ne(e,{id:null},await X(new Error(`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404)}if(e=(R==null?void 0:R.url)||e,ne!==m)return!1;if(_.type==="redirect")if(a.length>10||a.includes(e.pathname))_=await ie({status:500,error:await X(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}});else return re(new URL(_.location,e).href,{},[...a,e.pathname],m),!1;else(($=_.props.page)==null?void 0:$.status)>=400&&await M.updated.check()&&await G(e);if(S.length=0,B=!1,N=!0,ve(O),Re(O),(C=_.props.page)!=null&&C.url&&_.props.page.url.pathname!==e.pathname&&(e.pathname=(E=_.props.page)==null?void 0:E.url.pathname),s){const L=s.replaceState?0:1;if(s.state[V]=j+=L,history[s.replaceState?"replaceState":"pushState"](s.state,"",e),!s.replaceState){let I=j+1;for(;Z[I]||K[I];)delete Z[I],delete K[I],I+=1}}b=null,x?(p=_.state,_.props.page&&(_.props.page.url=e),q.$set(_.props)):Oe(_);const{activeElement:h}=document;if(await ye(),k){const L=e.hash&&document.getElementById(decodeURIComponent(e.hash.slice(1)));n?scrollTo(n.x,n.y):L?L.scrollIntoView():scrollTo(0,0)}const U=document.activeElement!==h&&document.activeElement!==document.body;!r&&!U&&Ee(),k=!0,_.props.page&&(F=_.props.page),P=!1,c==="popstate"&&Ae(j),w.after_navigate.forEach(L=>L(A)),M.navigating.set(null),N=!1}async function Ne(e,n,r,a){return e.origin===location.origin&&e.pathname===location.pathname&&!D?await ie({status:a,error:r,url:e,route:n}):await G(e)}function G(e){return location.href=e.href,new Promise(()=>{})}function Ye(){let e;f.addEventListener("mousemove",c=>{const g=c.target;clearTimeout(e),e=setTimeout(()=>{a(g,2)},20)});function n(c){a(c.composedPath()[0],1)}f.addEventListener("mousedown",n),f.addEventListener("touchstart",n,{passive:!0});const r=new IntersectionObserver(c=>{for(const g of c)g.isIntersecting&&(oe(se(new URL(g.target.href))),r.unobserve(g.target))},{threshold:0});function a(c,g){const m=Ve(c,f);if(!m)return;const{url:v,external:y,download:R}=we(m,J);if(y||R)return;const A=le(m);if(!A.reload)if(g<=A.preload_data){const O=W(v,!1);O&&Le(O)}else g<=A.preload_code&&oe(se(v))}function s(){r.disconnect();for(const c of f.querySelectorAll("a")){const{url:g,external:m,download:v}=we(c,J);if(m||v)continue;const y=le(c);y.reload||(y.preload_code===qe.viewport&&r.observe(c),y.preload_code===qe.eager&&oe(se(g)))}}w.after_navigate.push(s),s()}function X(e,n){return e instanceof ee?e.body:t.hooks.handleError({error:e,event:n})??{message:n.route.id!=null?"Internal Error":"Not Found"}}return{after_navigate:e=>{De(()=>(w.after_navigate.push(e),()=>{const n=w.after_navigate.indexOf(e);w.after_navigate.splice(n,1)}))},before_navigate:e=>{De(()=>(w.before_navigate.push(e),()=>{const n=w.before_navigate.indexOf(e);w.before_navigate.splice(n,1)}))},disable_scroll_handling:()=>{(N||!x)&&(k=!1)},goto:(e,n={})=>re(e,n,[]),invalidate:e=>{if(typeof e=="function")S.push(e);else{const{href:n}=new URL(e,location.href);S.push(r=>r.href===n)}return ke()},invalidate_all:()=>(B=!0,ke()),preload_data:async e=>{const n=new URL(e,Ce(document)),r=W(n,!1);if(!r)throw new Error(`Attempted to preload a URL that does not belong to this app: ${n}`);await Le(r)},preload_code:oe,apply_action:async e=>{if(e.type==="error"){const n=new URL(location.href),{branch:r,route:a}=p;if(!a)return;const s=await Ue(p.branch.length,r,a.errors);if(s){const c=await Y({url:n,params:p.params,branch:r.slice(0,s.idx).concat(s.node),status:e.status??500,error:e.error,route:a});p=c.state,q.$set(c.props),ye().then(Ee)}}else e.type==="redirect"?re(e.location,{invalidateAll:!0},[]):(q.$set({form:null,page:{...F,form:e.data,status:e.status}}),await ye(),q.$set({form:e.data}),e.type==="success"&&Ee())},_start_router:()=>{var e;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{var a;let r=!1;if(Ie(),!P){const s={from:{params:p.params,route:{id:((a=p.route)==null?void 0:a.id)??null},url:p.url},to:null,willUnload:!0,type:"leave",cancel:()=>r=!0};w.before_navigate.forEach(c=>c(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&Ie()}),(e=navigator.connection)!=null&&e.saveData||Ye(),f.addEventListener("click",n=>{var A;if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=Ve(n.composedPath()[0],f);if(!r)return;const{url:a,external:s,target:c,download:g}=we(r,J);if(!a)return;if(c==="_parent"||c==="_top"){if(window.parent!==window)return}else if(c&&c!=="_self")return;const m=le(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||g)return;if(s||m.reload){xe({url:a,type:"link"})?P=!0:n.preventDefault();return}const[y,R]=a.href.split("#");if(R!==void 0&&y===location.href.split("#")[0]){if(p.url.hash===a.hash){n.preventDefault(),(A=r.ownerDocument.getElementById(R))==null||A.scrollIntoView();return}if(z=!0,ve(j),p.url=a,M.page.set({...F,url:a}),M.page.notify(),!m.replace_state)return;z=!1,n.preventDefault()}ce({url:a,scroll:m.noscroll?Q():null,keepfocus:m.keep_focus??!1,redirect_chain:[],details:{state:{},replaceState:m.replace_state??a.href===location.href},accepted:()=>n.preventDefault(),blocked:()=>n.preventDefault(),type:"link"})}),f.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formMethod)||r.method)!=="get")return;const c=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(_e(c,J))return;const g=n.target,{keep_focus:m,noscroll:v,reload:y,replace_state:R}=le(g);if(y)return;n.preventDefault(),n.stopPropagation();const A=new FormData(g),O=a==null?void 0:a.getAttribute("name");O&&A.append(O,(a==null?void 0:a.getAttribute("value"))??""),c.search=new URLSearchParams(A).toString(),ce({url:c,scroll:v?Q():null,keepfocus:m??!1,redirect_chain:[],details:{state:{},replaceState:R??c.href===location.href},nav_token:{},accepted:()=>{},blocked:()=>{},type:"form"})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[V]){if(n.state[V]===j)return;const a=K[n.state[V]];if(p.url.href.split("#")[0]===location.href.split("#")[0]){K[j]=Q(),j=n.state[V],scrollTo(a.x,a.y);return}const s=n.state[V]-j;await ce({url:new URL(location.href),scroll:a,keepfocus:!1,redirect_chain:[],details:null,accepted:()=>{j=n.state[V]},blocked:()=>{history.go(-s)},type:"popstate",delta:s})}}),addEventListener("hashchange",()=>{z&&(z=!1,history.replaceState({...history.state,[V]:++j},"",location.href))});for(const n of document.querySelectorAll("link"))n.rel==="icon"&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&M.navigating.set(null)})},_hydrate:async({status:e=200,error:n,node_ids:r,params:a,route:s,data:c,form:g})=>{D=!0;const m=new URL(location.href);({params:a={},route:s={id:null}}=W(m,!1)||{});let v;try{const y=r.map(async(O,_)=>{const h=c[_];return h!=null&&h.uses&&(h.uses=Ge(h.uses)),de({loader:t.nodes[O],url:m,params:a,route:s,parent:async()=>{const U={};for(let $=0;$<_;$+=1)Object.assign(U,(await y[$]).data);return U},server_data_node:pe(h)})}),R=await Promise.all(y),A=u.find(({id:O})=>O===s.id);if(A){const O=A.layouts;for(let _=0;_d?"1":"0").join(""));const i=await fe(u.href);if(!i.ok)throw new ee(i.status,await i.json());return new Promise(async d=>{var p;const f=new Map,S=i.body.getReader(),l=new TextDecoder;function b(D){return vt(D,{Promise:x=>new Promise((k,N)=>{f.set(x,{fulfil:k,reject:N})})})}let w="";for(;;){const{done:D,value:x}=await S.read();if(D&&!w)break;for(w+=!x&&w?` +`:l.decode(x);;){const k=w.indexOf(` +`);if(k===-1)break;const N=JSON.parse(w.slice(0,k));if(w=w.slice(k+1),N.type==="redirect")return d(N);if(N.type==="data")(p=N.nodes)==null||p.forEach(P=>{(P==null?void 0:P.type)==="data"&&(P.uses=Ge(P.uses),P.data=b(P.data))}),d(N);else if(N.type==="chunk"){const{id:P,data:z,error:B}=N,q=f.get(P);f.delete(P),B?q.reject(b(B)):q.fulfil(b(z))}}}})}function Ge(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url)}}function Ee(){const t=document.querySelector("[autofocus]");if(t)t.focus();else{const o=document.body,u=o.getAttribute("tabindex");o.tabIndex=-1,o.focus({preventScroll:!0,focusVisible:!1}),u!==null?o.setAttribute("tabindex",u):o.removeAttribute("tabindex");const i=getSelection();if(i&&i.type!=="None"){const d=[];for(let f=0;f{if(i.rangeCount===d.length){for(let f=0;f{const u=localStorage.getItem(t);if(u!=null)try{l(0,n=JSON.parse(u))}catch{l(0,n=u)}else o(),i("save")}),$t(()=>{a!==n&&(o(),i("update",{prevValue:a,value:n})),a=n}),r.$$set=u=>{"key"in u&&l(1,t=u.key),"value"in u&&l(0,n=u.value)},[n,t,s,pt]}class ml extends te{constructor(e){super(),le(this,e,dl,null,se,{key:1,value:0,clearItem:2,clearAll:3})}get clearItem(){return this.$$.ctx[2]}get clearAll(){return pt}}const _l=ml;function hl(r){let e,l,t,n;const s=r[8].default,i=de(s,r,r[7],null);let a=[{role:"table"},r[4]],o={};for(let u=0;ul(6,s=h)),vt("StructuredListWrapper",{selectedValue:d,update:h=>{d.set(h)}});function w(h){J.call(this,r,h)}function F(h){J.call(this,r,h)}function I(h){J.call(this,r,h)}function R(h){J.call(this,r,h)}return r.$$set=h=>{e=W(W({},e),be(h)),l(4,n=ie(e,t)),"selected"in h&&l(5,o=h.selected),"condensed"in h&&l(0,u=h.condensed),"flush"in h&&l(1,f=h.flush),"selection"in h&&l(2,c=h.selection),"$$scope"in h&&l(7,a=h.$$scope)},r.$$.update=()=>{r.$$.dirty&64&&l(5,o=s),r.$$.dirty&64&&m("change",s)},[u,f,c,d,n,o,s,a,i,w,F,I,R]}class pl extends te{constructor(e){super(),le(this,e,gl,hl,se,{selected:5,condensed:0,flush:1,selection:2})}}const bl=pl;function $l(r){let e,l,t,n;const s=r[2].default,i=de(s,r,r[1],null);let a=[{role:"rowgroup"},r[0]],o={};for(let u=0;u{e=W(W({},e),be(c)),l(0,n=ie(e,t)),"$$scope"in c&&l(1,i=c.$$scope)},[n,i,s,a,o,u,f]}class wl extends te{constructor(e){super(),le(this,e,vl,$l,se,{})}}const kl=wl;function Sl(r){let e,l,t,n,s;const i=r[4].default,a=de(i,r,r[3],null);let o=[{role:l=r[0]?"columnheader":"cell"},r[2]],u={};for(let f=0;f{e=W(W({},e),be(d)),l(2,n=ie(e,t)),"head"in d&&l(0,a=d.head),"noWrap"in d&&l(1,o=d.noWrap),"$$scope"in d&&l(3,i=d.$$scope)},[a,o,n,i,s,u,f,c,m]}class Il extends te{constructor(e){super(),le(this,e,El,Sl,se,{head:0,noWrap:1})}}const oe=Il;function Cl(r){let e,l,t,n;const s=r[5].default,i=de(s,r,r[4],null);let a=[{role:"row"},r[3]],o={};for(let u=0;u{i[f]=null}),x(),l=i[e],l?l.p(o,u):(l=i[e]=s[e](o),l.c()),p(l,1),l.m(t.parentNode,t))},i(o){n||(p(l),n=!0)},o(o){b(l),n=!1},d(o){i[e].d(o),o&&_(t)}}}function Tl(r,e,l){const t=["head","label","tabindex"];let n=ie(e,t),{$$slots:s={},$$scope:i}=e,{head:a=!1}=e,{label:o=!1}=e,{tabindex:u="0"}=e;function f($){J.call(this,r,$)}function c($){J.call(this,r,$)}function m($){J.call(this,r,$)}function d($){J.call(this,r,$)}function w($){J.call(this,r,$)}function F($){J.call(this,r,$)}function I($){J.call(this,r,$)}function R($){J.call(this,r,$)}function h($){J.call(this,r,$)}return r.$$set=$=>{e=W(W({},e),be($)),l(3,n=ie(e,t)),"head"in $&&l(0,a=$.head),"label"in $&&l(1,o=$.label),"tabindex"in $&&l(2,u=$.tabindex),"$$scope"in $&&l(4,i=$.$$scope)},[a,o,u,n,i,s,f,c,m,d,w,F,I,R,h]}class Vl extends te{constructor(e){super(),le(this,e,Tl,Dl,se,{head:0,label:1,tabindex:2})}}const Se=Vl,Al=r=>({theme:r&1}),Oe=r=>({theme:r[0]});function qe(r,e,l){const t=r.slice();return t[0]=e[l],t}function Ue(r){let e,l,t;function n(i){r[9](i)}let s={key:r[2]};return r[0]!==void 0&&(s.value=r[0]),e=new _l({props:s}),ut.push(()=>ft(e,"value",n)),{c(){V(e.$$.fragment)},l(i){A(e.$$.fragment,i)},m(i,a){N(e,i,a),t=!0},p(i,a){const o={};a&4&&(o.key=i[2]),!l&&a&1&&(l=!0,o.value=i[0],ct(()=>l=!1)),e.$set(o)},i(i){t||(p(e.$$.fragment,i),t=!0)},o(i){b(e.$$.fragment,i),t=!1},d(i){L(e,i)}}}function Nl(r){let e,l,t;const n=[r[5]];function s(a){r[11](a)}let i={$$slots:{default:[jl]},$$scope:{ctx:r}};for(let a=0;aft(e,"selected",s)),{c(){V(e.$$.fragment)},l(a){A(e.$$.fragment,a)},m(a,o){N(e,a,o),t=!0},p(a,o){const u=o&32?ge(n,[dt(a[5])]):{};o&4128&&(u.$$scope={dirty:o,ctx:a}),!l&&o&1&&(l=!0,u.selected=a[0],ct(()=>l=!1)),e.$set(u)},i(a){t||(p(e.$$.fragment,a),t=!0)},o(a){b(e.$$.fragment,a),t=!1},d(a){L(e,a)}}}function Ll(r){let e,l;const t=[r[4],{toggled:r[0]===r[4].themes[1]}];let n={};for(let s=0;sa[0];for(let a=0;a{i=null}),x());let w=l;l=u(m),l===w?~l&&o[l].p(m,d):(t&&(Z(),b(o[w],1,1,()=>{o[w]=null}),x()),~l?(t=o[l],t?t.p(m,d):(t=o[l]=a[l](m),t.c()),p(t,1),t.m(n.parentNode,n)):t=null),c&&c.p&&(!s||d&4097)&&me(c,f,m,m[12],s?he(f,m[12],d,Al):_e(m[12]),Oe)},i(m){s||(p(i),p(t),p(c,m),s=!0)},o(m){b(i),b(t),b(c,m),s=!1},d(m){i&&i.d(m),m&&_(e),~l&&o[l].d(m),m&&_(n),c&&c.d(m)}}}function Fl(r,e,l){let{$$slots:t={},$$scope:n}=e,{theme:s="white"}=e,{tokens:i={}}=e,{persist:a=!1}=e,{persistKey:o="theme"}=e,{render:u=void 0}=e,{toggle:f={themes:["white","g100"],labelA:"",labelB:"",labelText:"Dark mode",hideLabel:!1}}=e;const c={white:"White",g10:"Gray 10",g80:"Gray 80",g90:"Gray 90",g100:"Gray 100"},m=Object.keys(c);let{select:d={themes:m,labelText:"Themes",hideLabel:!1}}=e;const w=ze();function F(h){s=h,l(0,s)}const I=({detail:h})=>{l(0,s=h.toggled?f.themes[1]:f.themes[0])};function R(h){s=h,l(0,s)}return r.$$set=h=>{"theme"in h&&l(0,s=h.theme),"tokens"in h&&l(7,i=h.tokens),"persist"in h&&l(1,a=h.persist),"persistKey"in h&&l(2,o=h.persistKey),"render"in h&&l(3,u=h.render),"toggle"in h&&l(4,f=h.toggle),"select"in h&&l(5,d=h.select),"$$scope"in h&&l(12,n=h.$$scope)},r.$$.update=()=>{r.$$.dirty&129&&typeof window<"u"&&(Object.entries(i).forEach(([h,$])=>{document.documentElement.style.setProperty(`--cds-${h}`,$)}),s in c?(document.documentElement.setAttribute("theme",s),w("update",{theme:s})):console.warn(`[Theme.svelte] invalid theme "${s}". Value must be one of: ${JSON.stringify(Object.keys(c))}`))},[s,a,o,u,f,d,c,i,t,F,I,R,n]}class Ml extends te{constructor(e){super(),le(this,e,Fl,zl,se,{theme:0,tokens:7,persist:1,persistKey:2,render:3,toggle:4,select:5})}}const Bl=Ml;function Gl(r){let e;return{c(){e=H("message")},l(l){e=P(l,"message")},m(l,t){k(l,e,t)},d(l){l&&_(e)}}}function Ol(r){let e=r[0].message+"",l;return{c(){l=H(e)},l(t){l=P(t,e)},m(t,n){k(t,l,n)},p(t,n){n&1&&e!==(e=t[0].message+"")&&ee(l,e)},d(t){t&&_(l)}}}function ql(r){let e,l,t,n;return e=new oe({props:{$$slots:{default:[Gl]},$$scope:{ctx:r}}}),t=new oe({props:{$$slots:{default:[Ol]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment),l=M(),V(t.$$.fragment)},l(s){A(e.$$.fragment,s),l=B(s),A(t.$$.fragment,s)},m(s,i){N(e,s,i),k(s,l,i),N(t,s,i),n=!0},p(s,i){const a={};i&2&&(a.$$scope={dirty:i,ctx:s}),e.$set(a);const o={};i&3&&(o.$$scope={dirty:i,ctx:s}),t.$set(o)},i(s){n||(p(e.$$.fragment,s),p(t.$$.fragment,s),n=!0)},o(s){b(e.$$.fragment,s),b(t.$$.fragment,s),n=!1},d(s){L(e,s),s&&_(l),L(t,s)}}}function Ul(r){let e;return{c(){e=H("url")},l(l){e=P(l,"url")},m(l,t){k(l,e,t)},d(l){l&&_(e)}}}function Kl(r){let e=r[0].request.method+"",l,t,n=r[0].request.url+"",s;return{c(){l=H(e),t=M(),s=H(n)},l(i){l=P(i,e),t=B(i),s=P(i,n)},m(i,a){k(i,l,a),k(i,t,a),k(i,s,a)},p(i,a){a&1&&e!==(e=i[0].request.method+"")&&ee(l,e),a&1&&n!==(n=i[0].request.url+"")&&ee(s,n)},d(i){i&&_(l),i&&_(t),i&&_(s)}}}function Hl(r){let e,l,t,n;return e=new oe({props:{$$slots:{default:[Ul]},$$scope:{ctx:r}}}),t=new oe({props:{$$slots:{default:[Kl]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment),l=M(),V(t.$$.fragment)},l(s){A(e.$$.fragment,s),l=B(s),A(t.$$.fragment,s)},m(s,i){N(e,s,i),k(s,l,i),N(t,s,i),n=!0},p(s,i){const a={};i&2&&(a.$$scope={dirty:i,ctx:s}),e.$set(a);const o={};i&3&&(o.$$scope={dirty:i,ctx:s}),t.$set(o)},i(s){n||(p(e.$$.fragment,s),p(t.$$.fragment,s),n=!0)},o(s){b(e.$$.fragment,s),b(t.$$.fragment,s),n=!1},d(s){L(e,s),s&&_(l),L(t,s)}}}function Pl(r){let e;return{c(){e=H("status")},l(l){e=P(l,"status")},m(l,t){k(l,e,t)},d(l){l&&_(e)}}}function Rl(r){let e=r[0].status+"",l,t,n=r[0].statusText+"",s;return{c(){l=H(e),t=M(),s=H(n)},l(i){l=P(i,e),t=B(i),s=P(i,n)},m(i,a){k(i,l,a),k(i,t,a),k(i,s,a)},p(i,a){a&1&&e!==(e=i[0].status+"")&&ee(l,e),a&1&&n!==(n=i[0].statusText+"")&&ee(s,n)},d(i){i&&_(l),i&&_(t),i&&_(s)}}}function Jl(r){let e,l,t,n;return e=new oe({props:{$$slots:{default:[Pl]},$$scope:{ctx:r}}}),t=new oe({props:{$$slots:{default:[Rl]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment),l=M(),V(t.$$.fragment)},l(s){A(e.$$.fragment,s),l=B(s),A(t.$$.fragment,s)},m(s,i){N(e,s,i),k(s,l,i),N(t,s,i),n=!0},p(s,i){const a={};i&2&&(a.$$scope={dirty:i,ctx:s}),e.$set(a);const o={};i&3&&(o.$$scope={dirty:i,ctx:s}),t.$set(o)},i(s){n||(p(e.$$.fragment,s),p(t.$$.fragment,s),n=!0)},o(s){b(e.$$.fragment,s),b(t.$$.fragment,s),n=!1},d(s){L(e,s),s&&_(l),L(t,s)}}}function Wl(r){let e;return{c(){e=H("path")},l(l){e=P(l,"path")},m(l,t){k(l,e,t)},d(l){l&&_(e)}}}function Yl(r){let e=JSON.stringify(r[0].request.path,null,2)+"",l;return{c(){l=H(e)},l(t){l=P(t,e)},m(t,n){k(t,l,n)},p(t,n){n&1&&e!==(e=JSON.stringify(t[0].request.path,null,2)+"")&&ee(l,e)},d(t){t&&_(l)}}}function Xl(r){let e,l,t,n;return e=new oe({props:{$$slots:{default:[Wl]},$$scope:{ctx:r}}}),t=new oe({props:{class:"whitespace-pre",$$slots:{default:[Yl]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment),l=M(),V(t.$$.fragment)},l(s){A(e.$$.fragment,s),l=B(s),A(t.$$.fragment,s)},m(s,i){N(e,s,i),k(s,l,i),N(t,s,i),n=!0},p(s,i){const a={};i&2&&(a.$$scope={dirty:i,ctx:s}),e.$set(a);const o={};i&3&&(o.$$scope={dirty:i,ctx:s}),t.$set(o)},i(s){n||(p(e.$$.fragment,s),p(t.$$.fragment,s),n=!0)},o(s){b(e.$$.fragment,s),b(t.$$.fragment,s),n=!1},d(s){L(e,s),s&&_(l),L(t,s)}}}function Ql(r){let e;return{c(){e=H("body")},l(l){e=P(l,"body")},m(l,t){k(l,e,t)},d(l){l&&_(e)}}}function Zl(r){let e=JSON.stringify(r[0].request.body,null,2)+"",l;return{c(){l=H(e)},l(t){l=P(t,e)},m(t,n){k(t,l,n)},p(t,n){n&1&&e!==(e=JSON.stringify(t[0].request.body,null,2)+"")&&ee(l,e)},d(t){t&&_(l)}}}function xl(r){let e,l,t,n;return e=new oe({props:{$$slots:{default:[Ql]},$$scope:{ctx:r}}}),t=new oe({props:{class:"whitespace-pre",$$slots:{default:[Zl]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment),l=M(),V(t.$$.fragment)},l(s){A(e.$$.fragment,s),l=B(s),A(t.$$.fragment,s)},m(s,i){N(e,s,i),k(s,l,i),N(t,s,i),n=!0},p(s,i){const a={};i&2&&(a.$$scope={dirty:i,ctx:s}),e.$set(a);const o={};i&3&&(o.$$scope={dirty:i,ctx:s}),t.$set(o)},i(s){n||(p(e.$$.fragment,s),p(t.$$.fragment,s),n=!0)},o(s){b(e.$$.fragment,s),b(t.$$.fragment,s),n=!1},d(s){L(e,s),s&&_(l),L(t,s)}}}function es(r){let e;return{c(){e=H("details")},l(l){e=P(l,"details")},m(l,t){k(l,e,t)},d(l){l&&_(e)}}}function ts(r){let e=r[0].body.detail+"",l;return{c(){l=H(e)},l(t){l=P(t,e)},m(t,n){k(t,l,n)},p(t,n){n&1&&e!==(e=t[0].body.detail+"")&&ee(l,e)},d(t){t&&_(l)}}}function ls(r){let e,l,t,n;return e=new oe({props:{$$slots:{default:[es]},$$scope:{ctx:r}}}),t=new oe({props:{class:"whitespace-break-spaces",$$slots:{default:[ts]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment),l=M(),V(t.$$.fragment)},l(s){A(e.$$.fragment,s),l=B(s),A(t.$$.fragment,s)},m(s,i){N(e,s,i),k(s,l,i),N(t,s,i),n=!0},p(s,i){const a={};i&2&&(a.$$scope={dirty:i,ctx:s}),e.$set(a);const o={};i&3&&(o.$$scope={dirty:i,ctx:s}),t.$set(o)},i(s){n||(p(e.$$.fragment,s),p(t.$$.fragment,s),n=!0)},o(s){b(e.$$.fragment,s),b(t.$$.fragment,s),n=!1},d(s){L(e,s),s&&_(l),L(t,s)}}}function ss(r){let e,l,t,n,s,i,a,o,u,f,c,m;return e=new Se({props:{$$slots:{default:[ql]},$$scope:{ctx:r}}}),t=new Se({props:{$$slots:{default:[Hl]},$$scope:{ctx:r}}}),s=new Se({props:{$$slots:{default:[Jl]},$$scope:{ctx:r}}}),a=new Se({props:{$$slots:{default:[Xl]},$$scope:{ctx:r}}}),u=new Se({props:{$$slots:{default:[xl]},$$scope:{ctx:r}}}),c=new Se({props:{$$slots:{default:[ls]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment),l=M(),V(t.$$.fragment),n=M(),V(s.$$.fragment),i=M(),V(a.$$.fragment),o=M(),V(u.$$.fragment),f=M(),V(c.$$.fragment)},l(d){A(e.$$.fragment,d),l=B(d),A(t.$$.fragment,d),n=B(d),A(s.$$.fragment,d),i=B(d),A(a.$$.fragment,d),o=B(d),A(u.$$.fragment,d),f=B(d),A(c.$$.fragment,d)},m(d,w){N(e,d,w),k(d,l,w),N(t,d,w),k(d,n,w),N(s,d,w),k(d,i,w),N(a,d,w),k(d,o,w),N(u,d,w),k(d,f,w),N(c,d,w),m=!0},p(d,w){const F={};w&3&&(F.$$scope={dirty:w,ctx:d}),e.$set(F);const I={};w&3&&(I.$$scope={dirty:w,ctx:d}),t.$set(I);const R={};w&3&&(R.$$scope={dirty:w,ctx:d}),s.$set(R);const h={};w&3&&(h.$$scope={dirty:w,ctx:d}),a.$set(h);const $={};w&3&&($.$$scope={dirty:w,ctx:d}),u.$set($);const G={};w&3&&(G.$$scope={dirty:w,ctx:d}),c.$set(G)},i(d){m||(p(e.$$.fragment,d),p(t.$$.fragment,d),p(s.$$.fragment,d),p(a.$$.fragment,d),p(u.$$.fragment,d),p(c.$$.fragment,d),m=!0)},o(d){b(e.$$.fragment,d),b(t.$$.fragment,d),b(s.$$.fragment,d),b(a.$$.fragment,d),b(u.$$.fragment,d),b(c.$$.fragment,d),m=!1},d(d){L(e,d),d&&_(l),L(t,d),d&&_(n),L(s,d),d&&_(i),L(a,d),d&&_(o),L(u,d),d&&_(f),L(c,d)}}}function ns(r){let e,l;return e=new kl({props:{$$slots:{default:[ss]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment)},l(t){A(e.$$.fragment,t)},m(t,n){N(e,t,n),l=!0},p(t,n){const s={};n&3&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){l||(p(e.$$.fragment,t),l=!0)},o(t){b(e.$$.fragment,t),l=!1},d(t){L(e,t)}}}function rs(r){let e,l;return e=new bl({props:{$$slots:{default:[ns]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment)},l(t){A(e.$$.fragment,t)},m(t,n){N(e,t,n),l=!0},p(t,n){const s={};n&3&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){l||(p(e.$$.fragment,t),l=!0)},o(t){b(e.$$.fragment,t),l=!1},d(t){L(e,t)}}}function is(r){let e,l;return e=new Dt({props:{passiveModal:!0,open:!!r[0],modalHeading:r[0].name,$$slots:{default:[rs]},$$scope:{ctx:r}}}),{c(){V(e.$$.fragment)},l(t){A(e.$$.fragment,t)},m(t,n){N(e,t,n),l=!0},p(t,[n]){const s={};n&1&&(s.open=!!t[0]),n&1&&(s.modalHeading=t[0].name),n&3&&(s.$$scope={dirty:n,ctx:t}),e.$set(s)},i(t){l||(p(e.$$.fragment,t),l=!0)},o(t){b(e.$$.fragment,t),l=!1},d(t){L(e,t)}}}function as(r,e,l){let{error:t}=e;return r.$$set=n=>{"error"in n&&l(0,t=n.error)},[t]}class os extends te{constructor(e){super(),le(this,e,as,is,se,{error:0})}}function us(r){let e;const l=r[2].default,t=de(l,r,r[1],null);return{c(){t&&t.c()},l(n){t&&t.l(n)},m(n,s){t&&t.m(n,s),e=!0},p(n,[s]){t&&t.p&&(!e||s&2)&&me(t,l,n,n[1],e?he(l,n[1],s,null):_e(n[1]),null)},i(n){e||(p(t,n),e=!0)},o(n){b(t,n),e=!1},d(n){t&&t.d(n)}}}function fs(r,e,l){let{$$slots:t={},$$scope:n}=e,{client:s=new zt}=e;return Ve(()=>{s.mount()}),Ft(s),St(()=>{s.unmount()}),r.$$set=i=>{"client"in i&&l(0,s=i.client),"$$scope"in i&&l(1,n=i.$$scope)},[s,n,t]}class cs extends te{constructor(e){super(),le(this,e,fs,us,se,{client:0})}}function ds(r,e,l){let t,n,s;const i=Mt();ne(r,i,o=>l(3,n=o));const a=ht();return ne(r,a,o=>l(4,s=o)),r.$$.update=()=>{var o,u;r.$$.dirty&16&&l(2,t=((o=s.data)==null?void 0:o.access.dataset.compute_signals)||((u=s.data)==null?void 0:u.access.create_dataset)),r.$$.dirty&12&&n.isSuccess&&t&&Bt(n.data)},[i,a,t,n,s]}class ms extends te{constructor(e){super(),le(this,e,ds,null,se,{})}}const _s=""+new URL("../assets/logo_50x50.e6d62a62.png",import.meta.url).href;function He(r){let e,l;return{c(){e=$e("title"),l=H(r[1])},l(t){e=ve(t,"title",{});var n=y(e);l=P(n,r[1]),n.forEach(_)},m(t,n){k(t,e,n),C(e,l)},p(t,n){n&2&&ee(l,t[1])},d(t){t&&_(e)}}}function hs(r){let e,l,t,n=r[1]&&He(r),s=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],i={};for(let a=0;a{l(5,e=W(W({},e),be(u))),l(3,i=ie(e,s)),"size"in u&&l(0,a=u.size),"title"in u&&l(1,o=u.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||o),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[a,o,n,i,t]}class bt extends te{constructor(e){super(),le(this,e,gs,hs,se,{size:0,title:1})}}function Pe(r){let e,l;return{c(){e=$e("title"),l=H(r[1])},l(t){e=ve(t,"title",{});var n=y(e);l=P(n,r[1]),n.forEach(_)},m(t,n){k(t,e,n),C(e,l)},p(t,n){n&2&&ee(l,t[1])},d(t){t&&_(e)}}}function ps(r){let e,l,t=r[1]&&Pe(r),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let i=0;i{l(5,e=W(W({},e),be(u))),l(3,i=ie(e,s)),"size"in u&&l(0,a=u.size),"title"in u&&l(1,o=u.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||o),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[a,o,n,i,t]}class $s extends te{constructor(e){super(),le(this,e,bs,ps,se,{size:0,title:1})}}const vs=r=>({}),Re=r=>({});function Je(r,e,l){const t=r.slice();return t[8]=e[l].tag,t[9]=e[l].groups,t}function We(r,e,l){const t=r.slice();return t[12]=e[l].group,t[13]=e[l].items,t}function Ye(r,e,l){const t=r.slice();return t[16]=e[l],t}function ws(r){let e,l;return e=new Tt({}),{c(){V(e.$$.fragment)},l(t){A(e.$$.fragment,t)},m(t,n){N(e,t,n),l=!0},i(t){l||(p(e.$$.fragment,t),l=!0)},o(t){b(e.$$.fragment,t),l=!1},d(t){L(e,t)}}}function ks(r){let e,l;return e=new Vt({}),{c(){V(e.$$.fragment)},l(t){A(e.$$.fragment,t)},m(t,n){N(e,t,n),l=!0},i(t){l||(p(e.$$.fragment,t),l=!0)},o(t){b(e.$$.fragment,t),l=!1},d(t){L(e,t)}}}function Xe(r){let e,l,t,n,s;const i=[Es,Ss],a=[];function o(u,f){return u[2]?0:1}return l=o(r),t=a[l]=i[l](r),{c(){e=j("div"),t.c()},l(u){e=z(u,"DIV",{});var f=y(e);t.l(f),f.forEach(_)},m(u,f){k(u,e,f),a[l].m(e,null),s=!0},p(u,f){let c=l;l=o(u),l===c?a[l].p(u,f):(Z(),b(a[c],1,1,()=>{a[c]=null}),x(),t=a[l],t?t.p(u,f):(t=a[l]=i[l](u),t.c()),p(t,1),t.m(e,null))},i(u){s||(p(t),mt(()=>{s&&(n||(n=Ne(e,Le,{},!0)),n.run(1))}),s=!0)},o(u){b(t),n||(n=Ne(e,Le,{},!1)),n.run(0),s=!1},d(u){u&&_(e),a[l].d(),u&&n&&n.end()}}}function Ss(r){let e,l,t=r[3],n=[];for(let i=0;ib(n[i],1,1,()=>{n[i]=null});return{c(){e=j("div");for(let i=0;i{n=null}),x()),o&8){s=a[9];let u;for(u=0;u{I[v]=null}),x(),o=I[a],o||(o=I[a]=F[a](E),o.c()),p(o,1),o.m(t,null)),E[0]?h?(h.p(E,g),g&1&&p(h,1)):(h=Xe(E),h.c(),p(h,1),h.m(e,f)):h&&(Z(),b(h,1,1,()=>{h=null}),x()),G&&G.p&&(!m||g&128)&&me(G,$,E,E[7],m?he($,E[7],g,vs):_e(E[7]),Re)},i(E){m||(p(o),p(h),p(G,E),m=!0)},o(E){b(o),b(h),b(G,E),m=!1},d(E){E&&_(e),I[a].d(),h&&h.d(),G&&G.d(E),d=!1,w()}}}function ys(r,e,l){let{$$slots:t={},$$scope:n}=e,{title:s}=e,{isFetching:i}=e,{tagGroups:a}=e,{expanded:o=!0}=e;const u=()=>l(0,o=!o),f=c=>Te(c.link);return r.$$set=c=>{"title"in c&&l(1,s=c.title),"isFetching"in c&&l(2,i=c.isFetching),"tagGroups"in c&&l(3,a=c.tagGroups),"expanded"in c&&l(0,o=c.expanded),"$$scope"in c&&l(7,n=c.$$scope)},[o,s,i,a,t,u,f,n]}class je extends te{constructor(e){super(),le(this,e,ys,Cs,se,{title:1,isFetching:2,tagGroups:3,expanded:0})}}function tt(r){let e,l,t,n,s,i;return l=new bt({props:{class:"mr-1"}}),{c(){e=j("button"),V(l.$$.fragment),t=H("Add dataset"),this.h()},l(a){e=z(a,"BUTTON",{class:!0});var o=y(e);A(l.$$.fragment,o),t=P(o,"Add dataset"),o.forEach(_),this.h()},h(){T(e,"class","mr-1 flex w-full flex-row px-1 py-1 text-black hover:bg-gray-200")},m(a,o){k(a,e,o),N(l,e,null),C(e,t),n=!0,s||(i=q(e,"click",r[23]),s=!0)},p:we,i(a){n||(p(l.$$.fragment,a),n=!0)},o(a){b(l.$$.fragment,a),n=!1},d(a){a&&_(e),L(l),s=!1,i()}}}function Ds(r){let e,l,t=r[7]&&tt(r);return{c(){e=j("div"),t&&t.c(),this.h()},l(n){e=z(n,"DIV",{slot:!0,class:!0});var s=y(e);t&&t.l(s),s.forEach(_),this.h()},h(){T(e,"slot","add"),T(e,"class","w-full")},m(n,s){k(n,e,s),t&&t.m(e,null),l=!0},p(n,s){n[7]?t?(t.p(n,s),s&128&&p(t,1)):(t=tt(n),t.c(),p(t,1),t.m(e,null)):t&&(Z(),b(t,1,1,()=>{t=null}),x())},i(n){l||(p(t),l=!0)},o(n){b(t),l=!1},d(n){n&&_(e),t&&t.d()}}}function Ts(r){let e,l,t,n,s,i,a;return t=new bt({props:{class:"mr-1"}}),{c(){e=j("div"),l=j("button"),V(t.$$.fragment),n=H("Add concept"),this.h()},l(o){e=z(o,"DIV",{slot:!0,class:!0});var u=y(e);l=z(u,"BUTTON",{class:!0});var f=y(l);A(t.$$.fragment,f),n=P(f,"Add concept"),f.forEach(_),u.forEach(_),this.h()},h(){T(l,"class","mr-1 flex w-full flex-row px-1 py-1 text-black hover:bg-gray-200"),T(e,"slot","add"),T(e,"class","w-full")},m(o,u){k(o,e,u),C(e,l),N(t,l,null),C(l,n),s=!0,i||(a=q(l,"click",r[24]),i=!0)},p:we,i(o){s||(p(t.$$.fragment,o),s=!0)},o(o){b(t.$$.fragment,o),s=!1},d(o){o&&_(e),L(t),i=!1,a()}}}function Vs(r){let e,l,t,n,s,i,a,o,u,f,c,m,d,w,F,I,R,h,$,G,E,g,v,S,K,X,Y,Ee,ye;return f=new $s({}),m=new je({props:{title:"Datasets",tagGroups:r[6],isFetching:r[2].isFetching,$$slots:{add:[Ds]},$$scope:{ctx:r}}}),w=new je({props:{title:"Concepts",tagGroups:r[5],isFetching:r[1].isFetching,$$slots:{add:[Ts]},$$scope:{ctx:r}}}),I=new je({props:{title:"Signals",tagGroups:r[4],isFetching:r[0].isFetching}}),K=new al({}),{c(){e=j("div"),l=j("div"),t=j("div"),n=j("a"),s=j("img"),a=H(` + Lilac`),o=M(),u=j("button"),V(f.$$.fragment),c=M(),V(m.$$.fragment),d=M(),V(w.$$.fragment),F=M(),V(I.$$.fragment),R=M(),h=j("div"),$=j("button"),G=j("div"),E=j("div"),g=H("Settings"),v=M(),S=j("div"),V(K.$$.fragment),this.h()},l(D){e=z(D,"DIV",{class:!0});var U=y(e);l=z(U,"DIV",{class:!0});var ue=y(l);t=z(ue,"DIV",{class:!0});var re=y(t);n=z(re,"A",{class:!0,href:!0});var fe=y(n);s=z(fe,"IMG",{class:!0,src:!0,alt:!0}),a=P(fe,` + Lilac`),fe.forEach(_),o=B(re),u=z(re,"BUTTON",{class:!0});var Ie=y(u);A(f.$$.fragment,Ie),Ie.forEach(_),re.forEach(_),ue.forEach(_),c=B(U),A(m.$$.fragment,U),d=B(U),A(w.$$.fragment,U),F=B(U),A(I.$$.fragment,U),R=B(U),h=z(U,"DIV",{class:!0});var Q=y(h);$=z(Q,"BUTTON",{class:!0});var pe=y($);G=z(pe,"DIV",{class:!0});var De=y(G);E=z(De,"DIV",{class:!0});var Fe=y(E);g=P(Fe,"Settings"),Fe.forEach(_),v=B(De),S=z(De,"DIV",{});var Me=y(S);A(K.$$.fragment,Me),Me.forEach(_),De.forEach(_),pe.forEach(_),Q.forEach(_),U.forEach(_),this.h()},h(){T(s,"class","logo-img mr-2 rounded opacity-90 svelte-2fy31z"),Et(s.src,i=_s)||T(s,"src",i),T(s,"alt","Logo"),T(n,"class","flex flex-row items-center text-xl normal-case"),T(n,"href","/"),T(u,"class","mr-1 opacity-60 hover:bg-gray-200"),T(t,"class","header flex flex-row items-center justify-between px-1 pl-4"),T(l,"class","w-full border-b border-gray-200"),T(E,"class","text-sm font-medium"),T(G,"class","flex items-center justify-between"),T($,"class",X=Be(`w-full px-4 py-2 text-left ${r[3]?"":"hover:bg-gray-100"}`)+" svelte-2fy31z"),O($,"bg-neutral-200",r[3]),T(h,"class","w-full px-1"),T(e,"class","nav-container flex h-full w-56 flex-col items-center overflow-y-scroll pb-2")},m(D,U){k(D,e,U),C(e,l),C(l,t),C(t,n),C(n,s),C(n,a),C(t,o),C(t,u),N(f,u,null),C(e,c),N(m,e,null),C(e,d),N(w,e,null),C(e,F),N(I,e,null),C(e,R),C(e,h),C(h,$),C($,G),C(G,E),C(E,g),C(G,v),C(G,S),N(K,S,null),Y=!0,Ee||(ye=[It(qt.call(null,u,{text:"Close sidebar"})),q(u,"click",r[22]),q($,"click",r[25])],Ee=!0)},p(D,[U]){const ue={};U&64&&(ue.tagGroups=D[6]),U&4&&(ue.isFetching=D[2].isFetching),U&134217856&&(ue.$$scope={dirty:U,ctx:D}),m.$set(ue);const re={};U&32&&(re.tagGroups=D[5]),U&2&&(re.isFetching=D[1].isFetching),U&134217728&&(re.$$scope={dirty:U,ctx:D}),w.$set(re);const fe={};U&16&&(fe.tagGroups=D[4]),U&1&&(fe.isFetching=D[0].isFetching),I.$set(fe),(!Y||U&8&&X!==(X=Be(`w-full px-4 py-2 text-left ${D[3]?"":"hover:bg-gray-100"}`)+" svelte-2fy31z"))&&T($,"class",X),(!Y||U&8)&&O($,"bg-neutral-200",D[3])},i(D){Y||(p(f.$$.fragment,D),p(m.$$.fragment,D),p(w.$$.fragment,D),p(I.$$.fragment,D),p(K.$$.fragment,D),Y=!0)},o(D){b(f.$$.fragment,D),b(m.$$.fragment,D),b(w.$$.fragment,D),b(I.$$.fragment,D),b(K.$$.fragment,D),Y=!1},d(D){D&&_(e),L(f),L(m),L(w),L(I),L(K),Ee=!1,ke(ye)}}}function As(r,e,l){let t,n,s,i,a,o,u,f,c,m,d,w,F,I;const R=ht();ne(r,R,D=>l(21,F=D));const h=Qt();ne(r,h,D=>l(20,c=D));const $=Ut();ne(r,$,D=>l(8,I=D));const G=Kt();ne(r,G,D=>l(2,w=D));let E=null;const g=Ht();ne(r,g,D=>l(1,d=D));let v=null;const S=Pt();ne(r,S,D=>l(0,m=D));const K=["concept_labels","concept_score","near_dup"],X=()=>_t($,I.open=!1,I),Y=()=>Te("/datasets/new"),Ee=()=>Rt({command:Jt.CreateConcept,onCreate:D=>Te(xt(D.detail.namespace,D.detail.name))}),ye=()=>Te("/settings");return r.$$.update=()=>{var D,U,ue,re,fe,Ie;if(r.$$.dirty&2097152&&l(19,t=(U=(D=F.data)==null?void 0:D.user)==null?void 0:U.id),r.$$.dirty&2097152&&l(18,n=(re=(ue=F.data)==null?void 0:ue.user)==null?void 0:re.given_name),r.$$.dirty&2097152&&l(7,s=(fe=F.data)==null?void 0:fe.access.create_dataset),r.$$.dirty&1048576)if(c.page==="datasets"&&c.identifier!=null){const[Q,pe]=c.identifier.split("/");l(15,E={namespace:Q,datasetName:pe})}else l(15,E=null);if(r.$$.dirty&32772&&l(6,i=sl(E,w.data||[])),r.$$.dirty&1048576)if(c.page==="concepts"&&c.identifier!=null){const[Q,pe]=c.identifier.split("/");l(16,v={namespace:Q,name:pe})}else l(16,v=null);r.$$.dirty&851970&&l(5,a=nl(v,d.data||[],t,n)),r.$$.dirty&1&&l(17,o=(Ie=m.data)==null?void 0:Ie.filter(Q=>!K.includes(Q.name)).sort((Q,pe)=>Q.name.localeCompare(pe.name))),r.$$.dirty&1179648&&l(4,u=[{tag:"",groups:[{group:"lilac",items:(o||[]).map(Q=>({name:Q.name,link:Zt(Q.name),isSelected:c.page==="signals"&&c.identifier===Q.name}))}]}]),r.$$.dirty&1048576&&l(3,f=c.page==="settings")},[m,d,w,f,u,a,i,s,I,R,h,$,G,g,S,E,v,o,n,t,c,F,X,Y,Ee,ye]}class Ns extends te{constructor(e){super(),le(this,e,As,Vs,se,{})}}const{window:lt}=yt;function st(r,e,l){const t=r.slice();return t[20]=e[l],t}function nt(r,e,l){const t=r.slice();return t[23]=e[l],t}function Ls(r){let e,l;return{c(){e=j("script"),l=H(`// Import the functions you need from the SDKs you need + import {initializeApp} from 'https://www.gstatic.com/firebasejs/10.1.0/firebase-app.js'; + import {getAnalytics} from 'https://www.gstatic.com/firebasejs/10.1.0/firebase-analytics.js'; + // TODO: Add SDKs for Firebase products that you want to use + // https://firebase.google.com/docs/web/setup#available-libraries + + // Your web app's Firebase configuration + // For Firebase JS SDK v7.20.0 and later, measurementId is optional + const firebaseConfig = { + apiKey: 'AIzaSyC_1E688jeyJ2wXdCIEPEulG3a4jrzKej8', + authDomain: 'lilac-386213.firebaseapp.com', + projectId: 'lilac-386213', + storageBucket: 'lilac-386213.appspot.com', + messagingSenderId: '279475920249', + appId: '1:279475920249:web:4680f6f21f8baf900c63a8', + measurementId: 'G-LX8JBKFTT3' + }; + + // Initialize Firebase + const app = initializeApp(firebaseConfig); + const analytics = getAnalytics(app);`),this.h()},l(t){e=z(t,"SCRIPT",{type:!0});var n=y(e);l=P(n,`// Import the functions you need from the SDKs you need + import {initializeApp} from 'https://www.gstatic.com/firebasejs/10.1.0/firebase-app.js'; + import {getAnalytics} from 'https://www.gstatic.com/firebasejs/10.1.0/firebase-analytics.js'; + // TODO: Add SDKs for Firebase products that you want to use + // https://firebase.google.com/docs/web/setup#available-libraries + + // Your web app's Firebase configuration + // For Firebase JS SDK v7.20.0 and later, measurementId is optional + const firebaseConfig = { + apiKey: 'AIzaSyC_1E688jeyJ2wXdCIEPEulG3a4jrzKej8', + authDomain: 'lilac-386213.firebaseapp.com', + projectId: 'lilac-386213', + storageBucket: 'lilac-386213.appspot.com', + messagingSenderId: '279475920249', + appId: '1:279475920249:web:4680f6f21f8baf900c63a8', + measurementId: 'G-LX8JBKFTT3' + }; + + // Initialize Firebase + const app = initializeApp(firebaseConfig); + const analytics = getAnalytics(app);`),n.forEach(_),this.h()},h(){T(e,"type","module")},m(t,n){k(t,e,n),C(e,l)},d(t){t&&_(e)}}}function rt(r){let e,l,t,n;return l=new Ns({}),{c(){e=j("div"),V(l.$$.fragment),this.h()},l(s){e=z(s,"DIV",{class:!0});var i=y(e);A(l.$$.fragment,i),i.forEach(_),this.h()},h(){T(e,"class","flex-shrink-0")},m(s,i){k(s,e,i),N(l,e,null),n=!0},i(s){n||(p(l.$$.fragment,s),mt(()=>{n&&(t||(t=Ne(e,Le,{axis:"x"},!0)),t.run(1))}),n=!0)},o(s){b(l.$$.fragment,s),t||(t=Ne(e,Le,{axis:"x"},!1)),t.run(0),n=!1},d(s){s&&_(e),L(l),s&&t&&t.end()}}}function it(r){let e,l;function t(){return r[12](r[23])}return e=new gt({props:{lowContrast:!0,fullWidth:!0,title:r[23].title,subtitle:r[23].subtitle||"",caption:r[23].message,kind:r[23].kind,timeout:5e3}}),e.$on("close",t),{c(){V(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,s){N(e,n,s),l=!0},p(n,s){r=n;const i={};s&2&&(i.title=r[23].title),s&2&&(i.subtitle=r[23].subtitle||""),s&2&&(i.caption=r[23].message),s&2&&(i.kind=r[23].kind),e.$set(i)},i(n){l||(p(e.$$.fragment,n),l=!0)},o(n){b(e.$$.fragment,n),l=!1},d(n){L(e,n)}}}function js(r){let e,l,t,n,s;function i(){return r[13](r[20])}return{c(){e=j("div"),l=j("button"),t=H("Show error"),this.h()},l(a){e=z(a,"DIV",{slot:!0});var o=y(e);l=z(o,"BUTTON",{class:!0});var u=y(l);t=P(u,"Show error"),u.forEach(_),o.forEach(_),this.h()},h(){T(l,"class","underline"),T(e,"slot","caption")},m(a,o){k(a,e,o),C(e,l),C(l,t),n||(s=q(l,"click",i),n=!0)},p(a,o){r=a},d(a){a&&_(e),n=!1,s()}}}function at(r){let e,l;function t(){return r[14](r[20])}return e=new gt({props:{lowContrast:!0,title:r[20].name||"Error",subtitle:r[20].message,$$slots:{caption:[js]},$$scope:{ctx:r}}}),e.$on("close",t),{c(){V(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,s){N(e,n,s),l=!0},p(n,s){r=n;const i={};s&8&&(i.title=r[20].name||"Error"),s&8&&(i.subtitle=r[20].message),s&32777&&(i.$$scope={dirty:s,ctx:r}),e.$set(i)},i(n){l||(p(e.$$.fragment,n),l=!0)},o(n){b(e.$$.fragment,n),l=!1},d(n){L(e,n)}}}function ot(r){let e,l;return e=new os({props:{error:r[0]}}),{c(){V(e.$$.fragment)},l(t){A(e.$$.fragment,t)},m(t,n){N(e,t,n),l=!0},p(t,n){const s={};n&1&&(s.error=t[0]),e.$set(s)},i(t){l||(p(e.$$.fragment,t),l=!0)},o(t){b(e.$$.fragment,t),l=!1},d(t){L(e,t)}}}function zs(r){let e,l,t,n,s,i,a,o,u,f,c,m=r[2].open&&rt();const d=r[9].default,w=de(d,r,r[15],null);let F=r[1],I=[];for(let g=0;gb(I[g],1,1,()=>{I[g]=null});let h=r[3],$=[];for(let g=0;gb($[g],1,1,()=>{$[g]=null});let E=r[0]&&ot(r);return f=new ms({}),{c(){e=j("main"),m&&m.c(),l=M(),t=j("div"),w&&w.c(),n=M(),s=j("div");for(let g=0;g{m=null}),x()),w&&w.p&&(!c||v&32768)&&me(w,d,g,g[15],c?he(d,g[15],v,null):_e(g[15]),null),v&18){F=g[1];let S;for(S=0;S{E=null}),x())},i(g){if(!c){p(m),p(w,g);for(let v=0;vl(7,s=v)),ne(r,Ge,v=>l(3,o=v));let{$$slots:u={},$$scope:f}=e,c;const m={"/":"home","/datasets":"datasets","/datasets/loading":"datasets/loading","/concepts":"concepts","/signals":"signals","/settings":"settings"};let d=tl();el(d);const w=il();ne(r,w,v=>l(8,i=v)),rl(w),Ve(()=>{d.setHash(t,s.url.hash)});function F(v){const S=new URL(v),K=m[S.pathname];d.setHash(K,S.hash)}Ve(()=>{window.parent=window,history.pushState=function(v,S,K){return K instanceof URL&&F(K),History.prototype.pushState.apply(history,arguments)}});const I=ol();ul(I);const R=Xt();ne(r,R,v=>l(2,a=v)),Yt(R);const h=v=>F(v.newURL),$=()=>F(location.href),G=v=>{w.removeNotification(v)},E=v=>l(0,c=v),g=v=>{_t(Ge,o=o.filter(S=>S!==v),o)};return r.$$set=v=>{"$$scope"in v&&l(15,f=v.$$scope)},r.$$.update=()=>{r.$$.dirty&128&&(t=s.route.id!=null?m[s.route.id]:"home"),r.$$.dirty&256&&l(1,n=(i==null?void 0:i.notifications)||[])},[c,n,a,o,w,F,R,s,i,u,h,$,G,E,g,f]}class Xs extends te{constructor(e){super(),le(this,e,Ms,Fs,se,{})}}export{Xs as component,Ys as universal}; diff --git a/lilac/web/_app/immutable/nodes/1.75e6c9f2.js b/lilac/web/_app/immutable/nodes/1.75e6c9f2.js new file mode 100644 index 0000000000000000000000000000000000000000..1597517cc97c2230b5523414152298881b902bd3 --- /dev/null +++ b/lilac/web/_app/immutable/nodes/1.75e6c9f2.js @@ -0,0 +1 @@ +import{S as x,i as S,s as g,k as u,q as h,a as k,l as d,m as v,r as b,h as m,c as y,b as _,a0 as E,u as $,a1 as q,O as C}from"../chunks/index.b333a928.js";import{p as H}from"../chunks/stores.8f6d2882.js";function O(l){var f;let a,t=l[0].status+"",r,o,n,p=((f=l[0].error)==null?void 0:f.message)+"",c;return{c(){a=u("h1"),r=h(t),o=k(),n=u("p"),c=h(p)},l(e){a=d(e,"H1",{});var s=v(a);r=b(s,t),s.forEach(m),o=y(e),n=d(e,"P",{});var i=v(n);c=b(i,p),i.forEach(m)},m(e,s){_(e,a,s),E(a,r),_(e,o,s),_(e,n,s),E(n,c)},p(e,[s]){var i;s&1&&t!==(t=e[0].status+"")&&$(r,t),s&1&&p!==(p=((i=e[0].error)==null?void 0:i.message)+"")&&$(c,p)},i:q,o:q,d(e){e&&m(a),e&&m(o),e&&m(n)}}}function P(l,a,t){let r;return C(l,H,o=>t(0,r=o)),[r]}class z extends x{constructor(a){super(),S(this,a,P,O,g,{})}}export{z as component}; diff --git a/lilac/web/_app/immutable/nodes/2.ae0f1e40.js b/lilac/web/_app/immutable/nodes/2.ae0f1e40.js new file mode 100644 index 0000000000000000000000000000000000000000..0fc8b8f4262c9cdeca2105f97b56b0c5b9f6db8f --- /dev/null +++ b/lilac/web/_app/immutable/nodes/2.ae0f1e40.js @@ -0,0 +1 @@ +import{S as K,i as O,s as R,D as Q,k as b,q as N,a as k,l as I,m as D,r as V,h as u,c as A,n as w,b as G,a0 as o,u as J,I as T,J as U,K as W,g as x,d as C,y as F,z as H,A as P,B as q,O as X,e as L}from"../chunks/index.b333a928.js";import{g as Z}from"../chunks/navigation.1d886b5b.js";import{b as tt,B as et}from"../chunks/Commands.1fffdf33.js";import{P as at}from"../chunks/Page.4b0754ae.js";function st(i){let t,e,a,l,d,n,s,r,f,p,v,E,g;const y=i[4].default,h=Q(y,i,i[3],null);return{c(){t=b("div"),e=b("div"),a=N(i[0]),l=N("."),d=k(),n=b("div"),s=b("div"),r=N(i[1]),f=k(),p=b("div"),v=N(i[2]),E=k(),h&&h.c(),this.h()},l(c){t=I(c,"DIV",{class:!0});var $=D(t);e=I($,"DIV",{class:!0});var m=D(e);a=V(m,i[0]),l=V(m,"."),m.forEach(u),d=A($),n=I($,"DIV",{class:!0});var _=D(n);s=I(_,"DIV",{class:!0});var S=D(s);r=V(S,i[1]),S.forEach(u),f=A(_),p=I(_,"DIV",{});var B=D(p);v=V(B,i[2]),B.forEach(u),E=A(_),h&&h.l(_),_.forEach(u),$.forEach(u),this.h()},h(){w(e,"class","font-bold"),w(s,"class","font-bold"),w(n,"class","flex flex-col gap-y-2"),w(t,"class","flex gap-x-1")},m(c,$){G(c,t,$),o(t,e),o(e,a),o(e,l),o(t,d),o(t,n),o(n,s),o(s,r),o(n,f),o(n,p),o(p,v),o(n,E),h&&h.m(n,null),g=!0},p(c,[$]){(!g||$&1)&&J(a,c[0]),(!g||$&2)&&J(r,c[1]),(!g||$&4)&&J(v,c[2]),h&&h.p&&(!g||$&8)&&T(h,y,c,c[3],g?W(y,c[3],$,null):U(c[3]),null)},i(c){g||(x(h,c),g=!0)},o(c){C(h,c),g=!1},d(c){c&&u(t),h&&h.d(c)}}}function nt(i,t,e){let{$$slots:a={},$$scope:l}=t,{stepNumber:d}=t,{title:n}=t,{description:s}=t;return i.$$set=r=>{"stepNumber"in r&&e(0,d=r.stepNumber),"title"in r&&e(1,n=r.title),"description"in r&&e(2,s=r.description),"$$scope"in r&&e(3,l=r.$$scope)},[d,n,s,l,a]}class Y extends K{constructor(t){super(),O(this,t,nt,st,R,{stepNumber:0,title:1,description:2})}}function rt(i){let t;return{c(){t=N("+ Add dataset")},l(e){t=V(e,"+ Add dataset")},m(e,a){G(e,t,a)},d(e){e&&u(t)}}}function M(i){let t,e,a,l,d,n,s,r,f;return{c(){t=b("div"),e=b("span"),a=N("You do not have authorization to create a dataset."),l=k(),d=b("span"),n=N("For HuggingFace spaces, you can duplicate this space and remove authentication. See "),s=b("a"),r=N("Duplicating the HuggingFace demo"),f=N("."),this.h()},l(p){t=I(p,"DIV",{class:!0});var v=D(t);e=I(v,"SPAN",{class:!0});var E=D(e);a=V(E,"You do not have authorization to create a dataset."),E.forEach(u),l=A(v),d=I(v,"SPAN",{});var g=D(d);n=V(g,"For HuggingFace spaces, you can duplicate this space and remove authentication. See "),s=I(g,"A",{href:!0});var y=D(s);r=V(y,"Duplicating the HuggingFace demo"),y.forEach(u),f=V(g,"."),g.forEach(u),v.forEach(u),this.h()},h(){w(e,"class","mb-2"),w(s,"href","https://lilacml.com/huggingface/huggingface_spaces.html"),w(t,"class","flex flex-col border border-neutral-100 bg-red-100 p-2")},m(p,v){G(p,t,v),o(t,e),o(e,a),o(t,l),o(t,d),o(d,n),o(d,s),o(s,r),o(d,f)},d(p){p&&u(t)}}}function lt(i){let t,e,a,l,d;e=new et({props:{disabled:!i[0],size:"small",$$slots:{default:[rt]},$$scope:{ctx:i}}}),e.$on("click",i[3]);let n=!i[0]&&M();return{c(){t=b("div"),F(e.$$.fragment),a=k(),n&&n.c(),l=L(),this.h()},l(s){t=I(s,"DIV",{class:!0});var r=D(t);H(e.$$.fragment,r),r.forEach(u),a=A(s),n&&n.l(s),l=L(),this.h()},h(){w(t,"class","mt-4")},m(s,r){G(s,t,r),P(e,t,null),G(s,a,r),n&&n.m(s,r),G(s,l,r),d=!0},p(s,r){const f={};r&1&&(f.disabled=!s[0]),r&16&&(f.$$scope={dirty:r,ctx:s}),e.$set(f),s[0]?n&&(n.d(1),n=null):n||(n=M(),n.c(),n.m(l.parentNode,l))},i(s){d||(x(e.$$.fragment,s),d=!0)},o(s){C(e.$$.fragment,s),d=!1},d(s){s&&u(t),q(e),s&&u(a),n&&n.d(s),s&&u(l)}}}function it(i){let t,e,a,l,d,n,s,r,f,p,v,E,g,y,h,c,$;return p=new Y({props:{stepNumber:1,title:"Import your dataset",description:"Click 'Add dataset' to add a new dataset.",$$slots:{default:[lt]},$$scope:{ctx:i}}}),E=new Y({props:{stepNumber:2,title:"Configure and index the dataset",description:"Choose metadata fields to visualize and media fields to index and query."}}),y=new Y({props:{stepNumber:3,title:"Enrich and explore your dataset",description:"Run signals and concepts over the data to produce additional metadata."}}),c=new Y({props:{stepNumber:4,title:"Download the new data",description:"Click the Download button in the top-right corner to get the annotated dataset."}}),{c(){t=b("div"),e=b("div"),a=b("h3"),l=N("Getting started"),d=k(),n=b("div"),s=N("Import, analyze and enrich your dataset"),r=k(),f=b("div"),F(p.$$.fragment),v=k(),F(E.$$.fragment),g=k(),F(y.$$.fragment),h=k(),F(c.$$.fragment),this.h()},l(m){t=I(m,"DIV",{class:!0});var _=D(t);e=I(_,"DIV",{class:!0});var S=D(e);a=I(S,"H3",{});var B=D(a);l=V(B,"Getting started"),B.forEach(u),d=A(S),n=I(S,"DIV",{class:!0});var j=D(n);s=V(j,"Import, analyze and enrich your dataset"),j.forEach(u),S.forEach(u),r=A(_),f=I(_,"DIV",{class:!0});var z=D(f);H(p.$$.fragment,z),v=A(z),H(E.$$.fragment,z),g=A(z),H(y.$$.fragment,z),h=A(z),H(c.$$.fragment,z),z.forEach(u),_.forEach(u),this.h()},h(){w(n,"class","mt-2 text-gray-700"),w(e,"class","text-center"),w(f,"class","flex flex-col gap-y-8 rounded-lg border border-gray-200 p-9"),w(t,"class","flex w-full flex-col items-center gap-y-6 px-8 pt-20")},m(m,_){G(m,t,_),o(t,e),o(e,a),o(a,l),o(e,d),o(e,n),o(n,s),o(t,r),o(t,f),P(p,f,null),o(f,v),P(E,f,null),o(f,g),P(y,f,null),o(f,h),P(c,f,null),$=!0},p(m,[_]){const S={};_&17&&(S.$$scope={dirty:_,ctx:m}),p.$set(S)},i(m){$||(x(p.$$.fragment,m),x(E.$$.fragment,m),x(y.$$.fragment,m),x(c.$$.fragment,m),$=!0)},o(m){C(p.$$.fragment,m),C(E.$$.fragment,m),C(y.$$.fragment,m),C(c.$$.fragment,m),$=!1},d(m){m&&u(t),q(p),q(E),q(y),q(c)}}}function ot(i,t,e){let a,l;const d=tt();X(i,d,s=>e(2,l=s));const n=()=>Z("/datasets/new");return i.$$.update=()=>{var s;i.$$.dirty&4&&e(0,a=(s=l.data)==null?void 0:s.access.create_dataset)},[a,d,l,n]}class dt extends K{constructor(t){super(),O(this,t,ot,it,R,{})}}function ct(i){let t,e;return t=new dt({}),{c(){F(t.$$.fragment)},l(a){H(t.$$.fragment,a)},m(a,l){P(t,a,l),e=!0},i(a){e||(x(t.$$.fragment,a),e=!0)},o(a){C(t.$$.fragment,a),e=!1},d(a){q(t,a)}}}function ft(i){let t,e;return t=new at({props:{$$slots:{default:[ct]},$$scope:{ctx:i}}}),{c(){F(t.$$.fragment)},l(a){H(t.$$.fragment,a)},m(a,l){P(t,a,l),e=!0},p(a,[l]){const d={};l&1&&(d.$$scope={dirty:l,ctx:a}),t.$set(d)},i(a){e||(x(t.$$.fragment,a),e=!0)},o(a){C(t.$$.fragment,a),e=!1},d(a){q(t,a)}}}class ht extends K{constructor(t){super(),O(this,t,null,ft,R,{})}}export{ht as component}; diff --git a/lilac/web/_app/immutable/nodes/3.3e06c443.js b/lilac/web/_app/immutable/nodes/3.3e06c443.js new file mode 100644 index 0000000000000000000000000000000000000000..7784bea1c72f2396a67e2f64e11cf4dde63c4528 --- /dev/null +++ b/lilac/web/_app/immutable/nodes/3.3e06c443.js @@ -0,0 +1 @@ +import{S as ae,i as ce,s as ie,y as P,z as V,A as B,g as _,d as g,B as N,O,k as v,a as X,e as q,l as k,m as C,h as d,c as Y,n as w,b as y,a0 as $,v as U,f as R,G,H as Z,a7 as fe,ab as ue,M as pe,a1 as L,ac as de,q as S,r as I,u as M,ad as me}from"../chunks/index.b333a928.js";import{g as K}from"../chunks/navigation.1d886b5b.js";import{P as _e}from"../chunks/Page.4b0754ae.js";import{f as he,n as $e,d as ge,h as be,p as ve,r as ke,c as Ce,u as we}from"../chunks/Commands.1fffdf33.js";import{T as ye,I as F,C as Ee}from"../chunks/ConceptView.d774cac2.js";import{g as Te,c as Se,d as J}from"../chunks/utils.4eeb8687.js";import{M as Ie}from"../chunks/ChevronUp.95b74f6d.js";function Q(l){let e,n,t,o;const a=[Ve,Pe,De],s=[];function c(r,i){var f,p,b;return(f=r[7])!=null&&f.isLoading?0:(p=r[7])!=null&&p.isError?1:(b=r[7])!=null&&b.isSuccess?2:-1}return~(e=c(l))&&(n=s[e]=a[e](l)),{c(){n&&n.c(),t=q()},l(r){n&&n.l(r),t=q()},m(r,i){~e&&s[e].m(r,i),y(r,t,i),o=!0},p(r,i){let f=e;e=c(r),e===f?~e&&s[e].p(r,i):(n&&(U(),g(s[f],1,1,()=>{s[f]=null}),R()),~e?(n=s[e],n?n.p(r,i):(n=s[e]=a[e](r),n.c()),_(n,1),n.m(t.parentNode,t)):n=null)},i(r){o||(_(n),o=!0)},o(r){g(n),o=!1},d(r){~e&&s[e].d(r),r&&d(t)}}}function De(l){let e,n;return e=new Ee({props:{concept:l[7].data}}),{c(){P(e.$$.fragment)},l(t){V(e.$$.fragment,t)},m(t,o){B(e,t,o),n=!0},p(t,o){const a={};o&128&&(a.concept=t[7].data),e.$set(a)},i(t){n||(_(e.$$.fragment,t),n=!0)},o(t){g(e.$$.fragment,t),n=!1},d(t){N(e,t)}}}function Pe(l){let e,n=l[7].error+"",t;return{c(){e=v("p"),t=S(n)},l(o){e=k(o,"P",{});var a=C(e);t=I(a,n),a.forEach(d)},m(o,a){y(o,e,a),$(e,t)},p(o,a){a&128&&n!==(n=o[7].error+"")&&M(t,n)},i:L,o:L,d(o){o&&d(e)}}}function Ve(l){let e,n;return e=new Ce({}),{c(){P(e.$$.fragment)},l(t){V(e.$$.fragment,t)},m(t,o){B(e,t,o),n=!0},p:L,i(t){n||(_(e.$$.fragment,t),n=!0)},o(t){g(e.$$.fragment,t),n=!1},d(t){N(e,t)}}}function W(l){let e,n;return e=new Ie({props:{danger:!0,open:!0,modalHeading:"Delete concept",primaryButtonText:"Delete",primaryButtonIcon:l[6].isLoading?F:void 0,secondaryButtonText:"Cancel",$$slots:{default:[Be]},$$scope:{ctx:l}}}),e.$on("click:button--secondary",l[17]),e.$on("close",l[18]),e.$on("submit",l[19]),{c(){P(e.$$.fragment)},l(t){V(e.$$.fragment,t)},m(t,o){B(e,t,o),n=!0},p(t,o){const a={};o&64&&(a.primaryButtonIcon=t[6].isLoading?F:void 0),o&1048580&&(a.$$scope={dirty:o,ctx:t}),e.$set(a)},i(t){n||(_(e.$$.fragment,t),n=!0)},o(t){g(e.$$.fragment,t),n=!1},d(t){N(e,t)}}}function Be(l){let e,n,t,o=l[2].namespace+"",a,s,c=l[2].name+"",r,i,f,p,b;return{c(){e=v("p"),n=S("Confirm deleting "),t=v("code"),a=S(o),s=S("/"),r=S(c),i=S(" ?"),f=X(),p=v("p"),b=S("This is a permanent action and cannot be undone."),this.h()},l(u){e=k(u,"P",{class:!0});var m=C(e);n=I(m,"Confirm deleting "),t=k(m,"CODE",{});var D=C(t);a=I(D,o),s=I(D,"/"),r=I(D,c),D.forEach(d),i=I(m," ?"),m.forEach(d),f=Y(u),p=k(u,"P",{class:!0});var E=C(p);b=I(E,"This is a permanent action and cannot be undone."),E.forEach(d),this.h()},h(){w(e,"class","!text-lg"),w(p,"class","mt-2")},m(u,m){y(u,e,m),$(e,n),$(e,t),$(t,a),$(t,s),$(t,r),$(e,i),y(u,f,m),y(u,p,m),$(p,b)},p(u,m){m&4&&o!==(o=u[2].namespace+"")&&M(a,o),m&4&&c!==(c=u[2].name+"")&&M(r,c)},d(u){u&&d(e),u&&d(f),u&&d(p)}}}function Ne(l){let e,n,t,o,a,s=l[0]!=null&&l[1]!=null&&Q(l),c=l[2]&&W(l);return{c(){e=v("div"),n=v("div"),s&&s.c(),t=X(),c&&c.c(),o=q(),this.h()},l(r){e=k(r,"DIV",{class:!0});var i=C(e);n=k(i,"DIV",{class:!0});var f=C(n);s&&s.l(f),f.forEach(d),i.forEach(d),t=Y(r),c&&c.l(r),o=q(),this.h()},h(){w(n,"class","lilac-page flex w-full"),w(e,"class","flex h-full w-full overflow-x-hidden overflow-y-scroll")},m(r,i){y(r,e,i),$(e,n),s&&s.m(n,null),y(r,t,i),c&&c.m(r,i),y(r,o,i),a=!0},p(r,i){r[0]!=null&&r[1]!=null?s?(s.p(r,i),i&3&&_(s,1)):(s=Q(r),s.c(),_(s,1),s.m(n,null)):s&&(U(),g(s,1,1,()=>{s=null}),R()),r[2]?c?(c.p(r,i),i&4&&_(c,1)):(c=W(r),c.c(),_(c,1),c.m(o.parentNode,o)):c&&(U(),g(c,1,1,()=>{c=null}),R())},i(r){a||(_(s),_(c),a=!0)},o(r){g(s),g(c),a=!1},d(r){r&&d(e),s&&s.d(),r&&d(t),c&&c.d(r),r&&d(o)}}}function He(l){let e,n=J(l[0],l[1])+"",t,o,a;return{c(){e=v("a"),t=S(n),this.h()},l(s){e=k(s,"A",{class:!0,href:!0});var c=C(e);t=I(c,n),c.forEach(d),this.h()},h(){w(e,"class","font-semibold text-black"),w(e,"href",l[3])},m(s,c){y(s,e,c),$(e,t),o||(a=Z(e,"click",l[16]),o=!0)},p(s,c){c&3&&n!==(n=J(s[0],s[1])+"")&&M(t,n),c&8&&w(e,"href",s[3])},d(s){s&&d(e),o=!1,a()}}}function qe(l){let e,n,t;return n=new ge({props:{type:"green",$$slots:{default:[He]},$$scope:{ctx:l}}}),{c(){e=v("div"),P(n.$$.fragment),this.h()},l(o){e=k(o,"DIV",{slot:!0});var a=C(e);V(n.$$.fragment,a),a.forEach(d),this.h()},h(){w(e,"slot","header-subtext")},m(o,a){y(o,e,a),B(n,e,null),t=!0},p(o,a){const s={};a&1048587&&(s.$$scope={dirty:a,ctx:o}),n.$set(s)},i(o){t||(_(n.$$.fragment,o),t=!0)},o(o){g(n.$$.fragment,o),t=!1},d(o){o&&d(e),N(n)}}}function Le(l){let e,n,t,o,a,s,c,r,i;return o=new ye({props:{size:16}}),{c(){e=v("div"),n=v("div"),t=v("button"),P(o.$$.fragment),this.h()},l(f){e=k(f,"DIV",{slot:!0});var p=C(e);n=k(p,"DIV",{});var b=C(n);t=k(b,"BUTTON",{title:!0,class:!0});var u=C(t);V(o.$$.fragment,u),u.forEach(d),b.forEach(d),p.forEach(d),this.h()},h(){w(t,"title","Remove concept"),t.disabled=a=!l[4],w(t,"class","p-3 hover:text-red-400 hover:opacity-100"),G(n,"opacity-40",!l[4]),w(e,"slot","header-right")},m(f,p){y(f,e,p),$(e,n),$(n,t),B(o,t,null),c=!0,r||(i=[Z(t,"click",l[15]),fe(s=be.call(null,n,{text:l[4]?"":"User does not have access to delete this concept."}))],r=!0)},p(f,p){(!c||p&16&&a!==(a=!f[4]))&&(t.disabled=a),s&&ue(s.update)&&p&16&&s.update.call(null,{text:f[4]?"":"User does not have access to delete this concept."}),(!c||p&16)&&G(n,"opacity-40",!f[4])},i(f){c||(_(o.$$.fragment,f),c=!0)},o(f){g(o.$$.fragment,f),c=!1},d(f){f&&d(e),N(o),r=!1,pe(i)}}}function Me(l){let e,n;return e=new _e({props:{$$slots:{"header-right":[Le],"header-subtext":[qe],default:[Ne]},$$scope:{ctx:l}}}),{c(){P(e.$$.fragment)},l(t){V(e.$$.fragment,t)},m(t,o){B(e,t,o),n=!0},p(t,[o]){const a={};o&1048799&&(a.$$scope={dirty:o,ctx:t}),e.$set(a)},i(t){n||(_(e.$$.fragment,t),n=!0)},o(t){g(e.$$.fragment,t),n=!1},d(t){N(e,t)}}}function Oe(l,e,n){let t,o,a,s,c,r,i,f,p=L,b=()=>(p(),p=de(t,h=>n(7,f=h)),t);l.$$.on_destroy.push(()=>p());let u,m;const D=Te();O(l,D,h=>n(14,i=h));let E=null;const z=he();O(l,z,h=>n(13,r=h));const A=$e();O(l,A,h=>n(6,c=h));function j(){if(E==null)return;const{namespace:h,name:T}=E;c.mutate([h,T],{onSuccess:()=>{var H;for(const[se,re]of Object.entries(ve)){const le=(H=me(we[se]).selectRowsSchema)==null?void 0:H.data;re.deleteConcept(h,T,le)}n(2,E=null),K("/")}})}const x=()=>n(2,E={namespace:u,name:m}),ee=()=>K(s),te=()=>n(2,E=null),ne=()=>n(2,E=null),oe=()=>j();return l.$$.update=()=>{var h;if(l.$$.dirty&16387&&i.page==="concepts"&&i.identifier!=null){const[T,H]=i.identifier.split("/");(u!=T||m!=H)&&(n(0,u=T),n(1,m=H))}l.$$.dirty&3&&b(n(5,t=u&&m?ke(u,m):void 0)),l.$$.dirty&8195&&n(12,o=(h=r.data)==null?void 0:h.find(T=>T.namespace===u&&T.name===m)),l.$$.dirty&4096&&n(4,a=o==null?void 0:o.acls.write),l.$$.dirty&3&&n(3,s=Se(u,m))},[u,m,E,s,a,t,c,f,D,z,A,j,o,r,i,x,ee,te,ne,oe]}class Fe extends ae{constructor(e){super(),ce(this,e,Oe,Me,ie,{})}}export{Fe as component}; diff --git a/lilac/web/_app/immutable/nodes/4.3a2ca6a3.js b/lilac/web/_app/immutable/nodes/4.3a2ca6a3.js new file mode 100644 index 0000000000000000000000000000000000000000..d4db9c96568e317e44c8f5e4b0e551b61a5326c7 --- /dev/null +++ b/lilac/web/_app/immutable/nodes/4.3a2ca6a3.js @@ -0,0 +1,31 @@ +import{S as $e,i as ke,s as be,E as pe,Z as ve,_ as we,m as $,h as m,n as I,$ as Fe,b as N,a0 as p,L as Oe,a1 as x,N as Ne,Q as Te,q as Z,r as G,u as fe,e as ie,C as _t,o as On,Y as Hn,k as S,l as E,p as st,w as Be,y as B,z as O,A as R,V as qn,g as h,d as v,B as A,R as ct,D as Ln,a as Q,c as J,H as Pe,ae as jn,I as Un,J as Yn,K as Qn,a7 as Ie,ab as Le,O as ge,v as le,f as ne,M as Qe,a4 as ze,ac as Me,a2 as gt,af as Jn,W as _n,X as gn,G as Se,P as Kn,T as Ue,U as Ye,ag as Zn,a8 as ut,a3 as dt,x as et,a6 as ft,ah as Gn}from"../chunks/index.b333a928.js";import{g as pn}from"../chunks/navigation.1d886b5b.js";import{C as Tt,O as Wn,a as nt,P as Xn}from"../chunks/Page.4b0754ae.js";import{d as Xe,v as xn,h as Ve,w as Re,x as ye,y as kt,z as Ee,t as Ge,C as We,A as Je,S as pt,D as St,E as er,r as tr,F as lr,c as je,a as at,G as ot,H as nr,L as rr,I as Ze,J as sr,K as Et,M as ir,N as ar,O as bn,B as vn,P as Ct,R as wn,U as $n,f as or,b as yt,V as fr,W as cr,X as tt,Y as Dt,Z as mt,_ as vt,$ as ur,a0 as dr,a1 as mr,a2 as kn,a3 as wt,a4 as rt,a5 as hr,a6 as Sn,a7 as _r,a8 as gr,a9 as pr,aa as En,ab as yn,ac as Dn,ad as br,ae as vr,af as wr,ag as $r,ah as kr,ai as Sr,aj as Er,ak as yr,al as Dr,am as Ir,an as Vr,ao as Nr,ap as Tr,aq as Cr}from"../chunks/Commands.1fffdf33.js";import{d as It,e as Fr,f as In,h as Vn,i as Mr,j as zr,k as Pr,I as Br,l as Rr,m as Ar,n as Or,o as Nn,s as ht,D as lt,p as Hr,q as qr}from"../chunks/notificationsStore.e7f2bd3e.js";import{w as Lr}from"../chunks/index.2b0dd2f8.js";import{C as jr,a as $t,I as Ft,T as Ur}from"../chunks/ConceptView.d774cac2.js";import{E as Tn,S as Yr,T as Cn}from"../chunks/StringSpanHighlight.d53dc1a7.js";import{M as Vt,C as Qr}from"../chunks/ChevronUp.95b74f6d.js";import{n as Jr,e as Kr,f as Zr,g as Gr,p as Wr,h as Xr,i as xr}from"../chunks/utils.4eeb8687.js";import{R as es,S as ts,T as ls,a as Mt,b as zt}from"../chunks/RowItemMetadata.760ed6a3.js";import{g as Fn}from"../chunks/settingsStore.6e7d5078.js";import{C as ns}from"../chunks/ComboBox.5bfb4a00.js";import{S as rs}from"../chunks/Settings.e24cc1d1.js";function Pt(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function ss(s){let e,l,t=s[1]&&Pt(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class as extends $e{constructor(e){super(),ke(this,e,is,ss,be,{size:0,title:1})}}function Bt(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function os(s){let e,l,t=s[1]&&Bt(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class cs extends $e{constructor(e){super(),ke(this,e,fs,os,be,{size:0,title:1})}}function Rt(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function us(s){let e,l,t=s[1]&&Rt(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class ms extends $e{constructor(e){super(),ke(this,e,ds,us,be,{size:0,title:1})}}function At(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function hs(s){let e,l,t=s[1]&&At(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class gs extends $e{constructor(e){super(),ke(this,e,_s,hs,be,{size:0,title:1})}}function Ot(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function ps(s){let e,l,t,n=s[1]&&Ot(s),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],r={};for(let i=0;i{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class it extends $e{constructor(e){super(),ke(this,e,bs,ps,be,{size:0,title:1})}}function Ht(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function vs(s){let e,l,t=s[1]&&Ht(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class Mn extends $e{constructor(e){super(),ke(this,e,ws,vs,be,{size:0,title:1})}}function qt(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function $s(s){let e,l,t=s[1]&&qt(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class Ss extends $e{constructor(e){super(),ke(this,e,ks,$s,be,{size:0,title:1})}}function Lt(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function Es(s){let e,l,t=s[1]&&Lt(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class zn extends $e{constructor(e){super(),ke(this,e,ys,Es,be,{size:0,title:1})}}function jt(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function Ds(s){let e,l,t=s[1]&&jt(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class Pn extends $e{constructor(e){super(),ke(this,e,Is,Ds,be,{size:0,title:1})}}function Ut(s){let e,l;return{c(){e=ve("title"),l=Z(s[1])},l(t){e=we(t,"title",{});var n=$(e);l=G(n,s[1]),n.forEach(m)},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&2&&fe(l,t[1])},d(t){t&&m(e)}}}function Vs(s){let e,l,t=s[1]&&Ut(s),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:s[0]},{height:s[0]},s[2],s[3]],o={};for(let r=0;r{l(5,e=pe(pe({},e),Te(f))),l(3,r=Ne(e,o)),"size"in f&&l(0,i=f.size),"title"in f&&l(1,a=f.title)},s.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||a),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[i,a,n,r,t]}class Ts extends $e{constructor(e){super(),ke(this,e,Ns,Vs,be,{size:0,title:1})}}function Yt(s){let e;return{c(){e=S("div"),this.h()},l(l){e=E(l,"DIV",{id:!0,style:!0}),$(e).forEach(m),this.h()},h(){I(e,"id","svelte-infinite-scroll"),st(e,"width","0")},m(l,t){N(l,e,t),s[11](e)},p:x,d(l){l&&m(e),s[11](null)}}}function Cs(s){let e,l=!s[1]&&!s[0]&&Yt(s);return{c(){l&&l.c(),e=ie()},l(t){l&&l.l(t),e=ie()},m(t,n){l&&l.m(t,n),N(t,e,n)},p(t,[n]){!t[1]&&!t[0]?l?l.p(t,n):(l=Yt(t),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:x,o:x,d(t){l&&l.d(t),t&&m(e)}}}function Fs(s,e,l){let{threshold:t=0}=e,{horizontal:n=!1}=e,{elementScroll:o=null}=e,{hasMore:r=!0}=e,{reverse:i=!1}=e,{window:a=!1}=e;const f=_t();let c=!1,d,u,_,g;const b=C=>{if(!r)return;const M=C.target;w(M,i,n)<=t?(!c&&r&&(f("loadMore"),l(8,u=M.scrollHeight),l(9,_=M.scrollTop)),l(7,c=!0)):l(7,c=!1)},w=(C,M,L)=>{const T=C.documentElement?C.documentElement:C;return M?L?T.scrollLeft:T.scrollTop:L?T.scrollWidth-T.clientWidth-T.scrollLeft:T.scrollHeight-T.clientHeight-T.scrollTop};On(()=>{a?l(10,g=document):o?l(10,g=o):l(10,g=d.parentNode)}),Hn(()=>{g&&(g.removeEventListener("scroll",b),g.removeEventListener("resize",b))});function y(C){Be[C?"unshift":"push"](()=>{d=C,l(2,d)})}return s.$$set=C=>{"threshold"in C&&l(3,t=C.threshold),"horizontal"in C&&l(4,n=C.horizontal),"elementScroll"in C&&l(0,o=C.elementScroll),"hasMore"in C&&l(5,r=C.hasMore),"reverse"in C&&l(6,i=C.reverse),"window"in C&&l(1,a=C.window)},s.$$.update=()=>{s.$$.dirty&1088&&g&&(i&&l(10,g.scrollTop=g.scrollHeight,g),g.addEventListener("scroll",b),g.addEventListener("resize",b)),s.$$.dirty&1984&&c&&i&&l(10,g.scrollTop=g.scrollHeight-u+_,g)},[o,a,d,t,n,r,i,c,u,_,g,y]}class Ms extends $e{constructor(e){super(),ke(this,e,Fs,Cs,be,{threshold:3,horizontal:4,elementScroll:0,hasMore:5,reverse:6,window:1})}}function zs(s){let e,l,t,n,o,r,i,a;t=new xn({});const f=s[3].default,c=Ln(f,s,s[6],null);return{c(){e=S("div"),l=S("button"),B(t.$$.fragment),n=Q(),o=S("span"),c&&c.c(),this.h()},l(d){e=E(d,"DIV",{class:!0});var u=$(e);l=E(u,"BUTTON",{class:!0});var _=$(l);O(t.$$.fragment,_),_.forEach(m),n=J(u),o=E(u,"SPAN",{class:!0});var g=$(o);c&&c.l(g),g.forEach(m),u.forEach(m),this.h()},h(){I(l,"class","p-0 opacity-50 hover:opacity-100"),I(o,"class","truncate"),I(e,"class","removable-tag flex items-center gap-x-1")},m(d,u){N(d,e,u),p(e,l),R(t,l,null),p(e,n),p(e,o),c&&c.m(o,null),r=!0,i||(a=Pe(l,"click",jn(s[4])),i=!0)},p(d,u){c&&c.p&&(!r||u&64)&&Un(c,f,d,d[6],r?Qn(f,d[6],u,null):Yn(d[6]),null)},i(d){r||(h(t.$$.fragment,d),h(c,d),r=!0)},o(d){v(t.$$.fragment,d),v(c,d),r=!1},d(d){d&&m(e),A(t),c&&c.d(d),i=!1,a()}}}function Ps(s){let e,l;const t=[{type:s[0]},s[2]];let n={$$slots:{default:[zs]},$$scope:{ctx:s}};for(let o=0;oi("remove");function c(d){ct.call(this,s,d)}return s.$$set=d=>{e=pe(pe({},e),Te(d)),l(2,n=Ne(e,t)),"type"in d&&l(0,a=d.type),"$$scope"in d&&l(6,r=d.$$scope)},[a,i,n,o,f,c,r]}class Nt extends $e{constructor(e){super(),ke(this,e,Bs,Ps,be,{type:0})}}function Rs(s){let e,l=(s[2]?"":s[5])+"",t,n,o=s[0][s[1].op]+"",r,i,a;return{c(){e=S("span"),t=Z(l),n=Q(),r=Z(o),i=Q(),a=Z(s[4]),this.h()},l(f){e=E(f,"SPAN",{class:!0});var c=$(e);t=G(c,l),c.forEach(m),n=J(f),r=G(f,o),i=J(f),a=G(f,s[4]),this.h()},h(){I(e,"class","font-mono")},m(f,c){N(f,e,c),p(e,t),N(f,n,c),N(f,r,c),N(f,i,c),N(f,a,c)},p(f,c){c&36&&l!==(l=(f[2]?"":f[5])+"")&&fe(t,l),c&2&&o!==(o=f[0][f[1].op]+"")&&fe(r,o),c&16&&fe(a,f[4])},d(f){f&&m(e),f&&m(n),f&&m(r),f&&m(i),f&&m(a)}}}function As(s){let e,l,t,n,o,r;return l=new Nt({props:{interactive:!0,type:"magenta",$$slots:{default:[Rs]},$$scope:{ctx:s}}}),l.$on("click",s[9]),l.$on("remove",s[10]),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(i){e=E(i,"DIV",{class:!0});var a=$(e);O(l.$$.fragment,a),a.forEach(m),this.h()},h(){I(e,"class","filter-pill items-center")},m(i,a){N(i,e,a),R(l,e,null),n=!0,o||(r=Ie(t=Ve.call(null,e,{text:s[6]})),o=!0)},p(i,[a]){const f={};a&2102&&(f.$$scope={dirty:a,ctx:i}),l.$set(f),t&&Le(t.update)&&a&64&&t.update.call(null,{text:i[6]})},i(i){n||(h(l.$$.fragment,i),n=!0)},o(i){v(l.$$.fragment,i),n=!1},d(i){i&&m(e),A(l),o=!1,r()}}}function Os(s,e,l){let t,n,o,r,i;const a={equals:"=",not_equal:"≠",less:"<",less_equal:"≤",greater:">",greater_equal:"≥",in:"in",exists:"exists"};let{filter:f}=e,{hidePath:c=!1}=e;const d=Re();ge(s,d,g=>l(7,i=g));const u=()=>Ge({command:We.EditFilter,namespace:i.namespace,datasetName:i.datasetName,path:n}),_=()=>d.removeFilter(f);return s.$$set=g=>{"filter"in g&&l(1,f=g.filter),"hidePath"in g&&l(2,c=g.hidePath)},s.$$.update=()=>{s.$$.dirty&2&&l(4,t=ye(f.value||"false")),s.$$.dirty&2&&l(3,n=kt(f.path)),s.$$.dirty&18&&l(6,o=`${Ee(f.path)} ${a[f.op]} ${t}`),s.$$.dirty&8&&l(5,r=n.at(-1))},[a,f,c,n,t,r,o,i,d,u,_]}class Bn extends $e{constructor(e){super(),ke(this,e,Os,As,be,{FILTER_SHORTHANDS:0,filter:1,hidePath:2})}get FILTER_SHORTHANDS(){return this.$$.ctx[0]}}function Qt(s){let e,l=s[0].concept_namespace+"",t,n,o=s[0].concept_name+"",r;return{c(){e=S("div"),t=Z(l),n=Z(" / "),r=Z(o),this.h()},l(i){e=E(i,"DIV",{class:!0});var a=$(e);t=G(a,l),n=G(a," / "),r=G(a,o),a.forEach(m),this.h()},h(){I(e,"class","mb-2 w-full text-center text-xs")},m(i,a){N(i,e,a),p(e,t),p(e,n),p(e,r)},p(i,a){a&1&&l!==(l=i[0].concept_namespace+"")&&fe(t,l),a&1&&o!==(o=i[0].concept_name+"")&&fe(r,o)},d(i){i&&m(e)}}}function Hs(s){let e=Ee(s[0].path)+"",l,t,n=s[0].type+"",o;return{c(){l=Z(e),t=Z(": "),o=Z(n)},l(r){l=G(r,e),t=G(r,": "),o=G(r,n)},m(r,i){N(r,l,i),N(r,t,i),N(r,o,i)},p(r,i){i&1&&e!==(e=Ee(r[0].path)+"")&&fe(l,e),i&1&&n!==(n=r[0].type+"")&&fe(o,n)},d(r){r&&m(l),r&&m(t),r&&m(o)}}}function Jt(s){let e,l,t;return l=new Tn({props:{embedding:s[0].embedding}}),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(n){e=E(n,"DIV",{class:!0});var o=$(e);O(l.$$.fragment,o),o.forEach(m),this.h()},h(){I(e,"class","ml-2")},m(n,o){N(n,e,o),R(l,e,null),t=!0},p(n,o){const r={};o&1&&(r.embedding=n[0].embedding),l.$set(r)},i(n){t||(h(l.$$.fragment,n),t=!0)},o(n){v(l.$$.fragment,n),t=!1},d(n){n&&m(e),A(l)}}}function Kt(s){let e,l;return{c(){e=S("div"),l=Z(s[2]),this.h()},l(t){e=E(t,"DIV",{class:!0});var n=$(e);l=G(n,s[2]),n.forEach(m),this.h()},h(){I(e,"class","mt-2 whitespace-pre-wrap text-left")},m(t,n){N(t,e,n),p(e,l)},p(t,n){n&4&&fe(l,t[2])},d(t){t&&m(e)}}}function qs(s){let e,l,t,n,o,r,i,a,f=s[0].type==="concept"&&Qt(s);n=new Xe({props:{type:s[1],$$slots:{default:[Hs]},$$scope:{ctx:s}}});let c=(s[0].type==="semantic"||s[0].type==="concept")&&Jt(s),d=s[2]&&Kt(s);return{c(){f&&f.c(),e=Q(),l=S("div"),t=S("div"),B(n.$$.fragment),o=Q(),c&&c.c(),r=Q(),d&&d.c(),i=ie(),this.h()},l(u){f&&f.l(u),e=J(u),l=E(u,"DIV",{class:!0});var _=$(l);t=E(_,"DIV",{class:!0});var g=$(t);O(n.$$.fragment,g),g.forEach(m),o=J(_),c&&c.l(_),_.forEach(m),r=J(u),d&&d.l(u),i=ie(),this.h()},h(){I(t,"class","whitespace-nowrap"),I(l,"class","flex items-center justify-items-center")},m(u,_){f&&f.m(u,_),N(u,e,_),N(u,l,_),p(l,t),R(n,t,null),p(l,o),c&&c.m(l,null),N(u,r,_),d&&d.m(u,_),N(u,i,_),a=!0},p(u,[_]){u[0].type==="concept"?f?f.p(u,_):(f=Qt(u),f.c(),f.m(e.parentNode,e)):f&&(f.d(1),f=null);const g={};_&2&&(g.type=u[1]),_&9&&(g.$$scope={dirty:_,ctx:u}),n.$set(g),u[0].type==="semantic"||u[0].type==="concept"?c?(c.p(u,_),_&1&&h(c,1)):(c=Jt(u),c.c(),h(c,1),c.m(l,null)):c&&(le(),v(c,1,1,()=>{c=null}),ne()),u[2]?d?d.p(u,_):(d=Kt(u),d.c(),d.m(i.parentNode,i)):d&&(d.d(1),d=null)},i(u){a||(h(n.$$.fragment,u),h(c),a=!0)},o(u){v(n.$$.fragment,u),v(c),a=!1},d(u){f&&f.d(u),u&&m(e),u&&m(l),A(n),c&&c.d(),u&&m(r),d&&d.d(u),u&&m(i)}}}function Ls(s,e,l){let t,{search:n}=e,{tagType:o="outline"}=e;return s.$$set=r=>{"search"in r&&l(0,n=r.search),"tagType"in r&&l(1,o=r.tagType)},s.$$.update=()=>{s.$$.dirty&1&&l(2,t=n.type==="concept"?"":n.query)},[n,o,t]}class Zt extends $e{constructor(e){super(),ke(this,e,Ls,qs,be,{search:0,tagType:1})}}function js(s){let e,l=Ee(s[0].path)+"",t,n,o,r;return{c(){e=S("span"),t=Z(l),n=Z(' has "'),o=Z(s[2]),r=Z('"'),this.h()},l(i){e=E(i,"SPAN",{class:!0});var a=$(e);t=G(a,l),a.forEach(m),n=G(i,' has "'),o=G(i,s[2]),r=G(i,'"'),this.h()},h(){I(e,"class","font-mono")},m(i,a){N(i,e,a),p(e,t),N(i,n,a),N(i,o,a),N(i,r,a)},p(i,a){a&1&&l!==(l=Ee(i[0].path)+"")&&fe(t,l),a&4&&fe(o,i[2])},d(i){i&&m(e),i&&m(n),i&&m(o),i&&m(r)}}}function Us(s){let e,l,t,n,o,r;return l=new Nt({props:{title:"query",interactive:!0,type:s[1],$$slots:{default:[js]},$$scope:{ctx:s}}}),l.$on("click",s[6]),l.$on("remove",s[7]),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(i){e=E(i,"DIV",{class:!0});var a=$(e);O(l.$$.fragment,a),a.forEach(m),this.h()},h(){I(e,"class","search-pill items-center text-left")},m(i,a){N(i,e,a),R(l,e,null),n=!0,o||(r=Ie(t=Ve.call(null,e,{component:Zt,props:{search:s[0],tagType:s[1]}})),o=!0)},p(i,[a]){const f={};a&2&&(f.type=i[1]),a&517&&(f.$$scope={dirty:a,ctx:i}),l.$set(f),t&&Le(t.update)&&a&3&&t.update.call(null,{component:Zt,props:{search:i[0],tagType:i[1]}})},i(i){n||(h(l.$$.fragment,i),n=!0)},o(i){v(l.$$.fragment,i),n=!1},d(i){i&&m(e),A(l),o=!1,r()}}}function Ys(s,e,l){let t,n,o,{search:r}=e;const i={keyword:"outline",semantic:"teal",concept:"green"},a=Re(),f=Je();ge(s,f,u=>l(3,o=u));function c(u){ct.call(this,s,u)}const d=()=>{var u;return a.removeSearch(r,((u=o.selectRowsSchema)==null?void 0:u.data)||null)};return s.$$set=u=>{"search"in u&&l(0,r=u.search)},s.$$.update=()=>{s.$$.dirty&1&&l(2,t=r.type==="concept"?r.concept_name:r.query),s.$$.dirty&1&&l(1,n=r.type!=null?i[r.type]:"outline")},[r,n,t,o,a,f,c,d]}class Rn extends $e{constructor(e){super(),ke(this,e,Ys,Us,be,{search:0})}}function Gt(s,e,l){const t=s.slice();return t[26]=e[l][0],t[27]=e[l][1],t}function Wt(s,e,l){const t=s.slice();return t[30]=e[l],t}function Xt(s,e,l){const t=s.slice();return t[33]=e[l],t}function xt(s,e,l){const t=s.slice();return t[36]=e[l],t}function el(s,e,l){const t=s.slice();return t[39]=e[l],t}function Qs(s){let e,l,t,n=s[13],o=[];for(let a=0;av(o[a],1,1,()=>{o[a]=null});let i=s[8]!=null&&s[8].length>0&&rl(s);return{c(){e=S("div");for(let a=0;a0?i?(i.p(a,f),f[0]&256&&h(i,1)):(i=rl(a),i.c(),h(i,1),i.m(e,null)):i&&(le(),v(i,1,1,()=>{i=null}),ne())},i(a){if(!t){for(let f=0;fv(c[u],1,1,()=>{c[u]=null});return{c(){e=S("div"),l=S("div"),n=Z(t),o=Q(),r=S("div");for(let u=0;u{t=null}),ne())},i(n){l||(h(t),l=!0)},o(n){v(t),l=!1},d(n){t&&t.d(n),n&&m(e)}}}function rl(s){let e,l,t,n,o,r,i=s[8],a=[];for(let c=0;cv(a[c],1,1,()=>{a[c]=null});return{c(){e=S("div"),l=S("div"),t=Z("Filters"),n=Q(),o=S("div");for(let c=0;cv(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;rv(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;r{r[c]=null}),ne()),~e?(l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),h(l,1),l.m(t.parentNode,t)):l=null)},i(a){n||(h(l),n=!0)},o(a){v(l),n=!1},d(a){~e&&r[e].d(a),a&&m(t)}}}function li(s){let e,l,t,n,o,r,i,a,f,c,d,u,_,g,b,w,y,C,M,L,T,H,V=s[13].length>0&&Qs(s),F=s[0]&&s[1]&&il(s);c=new pt({props:{noLabel:!0,size:"sm",class:"w-80",selected:s[5],$$slots:{default:[Ks]},$$scope:{ctx:s}}}),c.$on("update",s[16]);let D=s[6]!=null&&fl(s);const k=[Ws,Gs,Zs],P=[];function ee(K,z){var j,U,q;return((j=K[4])==null?void 0:j.order)==null?0:((U=K[4])==null?void 0:U.order)==="ASC"?1:((q=K[4])==null?void 0:q.order)==="DESC"?2:-1}~(g=ee(s))&&(b=P[g]=k[g](s));let X=s[2]&&cl(s);return{c(){e=S("div"),V&&V.c(),l=Q(),t=S("div"),n=S("div"),F&&F.c(),o=Q(),r=S("div"),i=S("div"),a=Z("Sort by"),f=Q(),B(c.$$.fragment),d=Q(),D&&D.c(),u=Q(),_=S("button"),b&&b.c(),C=Q(),X&&X.c(),M=ie(),this.h()},l(K){e=E(K,"DIV",{class:!0});var z=$(e);V&&V.l(z),l=J(z),t=E(z,"DIV",{class:!0});var j=$(t);n=E(j,"DIV",{class:!0});var U=$(n);F&&F.l(U),U.forEach(m),o=J(j),r=E(j,"DIV",{class:!0});var q=$(r);i=E(q,"DIV",{class:!0});var Y=$(i);a=G(Y,"Sort by"),Y.forEach(m),f=J(q),O(c.$$.fragment,q),d=J(q),D&&D.l(q),u=J(q),_=E(q,"BUTTON",{});var de=$(_);b&&b.l(de),de.forEach(m),q.forEach(m),j.forEach(m),z.forEach(m),C=J(K),X&&X.l(K),M=ie(),this.h()},h(){I(n,"class","py-1"),I(i,"class","mr-1"),_.disabled=w=s[4]==null,I(r,"class","sort-container flex flex-row items-center gap-x-1"),I(t,"class","flex w-full flex-row items-center justify-between"),I(e,"class","mx-5 my-2 flex flex-col gap-y-2")},m(K,z){var j;N(K,e,z),V&&V.m(e,null),p(e,l),p(e,t),p(t,n),F&&F.m(n,null),p(t,o),p(t,r),p(r,i),p(i,a),p(r,f),R(c,r,null),p(r,d),D&&D.m(r,null),p(r,u),p(r,_),~g&&P[g].m(_,null),N(K,C,z),X&&X.m(K,z),N(K,M,z),L=!0,T||(H=[Ie(y=Ve.call(null,_,{text:((j=s[4])==null?void 0:j.order)==="ASC"?"Sorted ascending. Toggle to switch to descending.":"Sorted descending. Toggle to switch to ascending."})),Pe(_,"click",s[17])],T=!0)},p(K,z){var q;K[13].length>0&&V.p(K,z),K[0]&&K[1]?F?F.p(K,z):(F=il(K),F.c(),F.m(n,null)):F&&(F.d(1),F=null);const j={};z[0]&32&&(j.selected=K[5]),z[0]&128|z[1]&2048&&(j.$$scope={dirty:z,ctx:K}),c.$set(j),K[6]!=null?D?(D.p(K,z),z[0]&64&&h(D,1)):(D=fl(K),D.c(),h(D,1),D.m(r,u)):D&&(le(),v(D,1,1,()=>{D=null}),ne());let U=g;g=ee(K),g!==U&&(b&&(le(),v(P[U],1,1,()=>{P[U]=null}),ne()),~g?(b=P[g],b||(b=P[g]=k[g](K),b.c()),h(b,1),b.m(_,null)):b=null),(!L||z[0]&16&&w!==(w=K[4]==null))&&(_.disabled=w),y&&Le(y.update)&&z[0]&16&&y.update.call(null,{text:((q=K[4])==null?void 0:q.order)==="ASC"?"Sorted ascending. Toggle to switch to descending.":"Sorted descending. Toggle to switch to ascending."}),K[2]?X?(X.p(K,z),z[0]&4&&h(X,1)):(X=cl(K),X.c(),h(X,1),X.m(M.parentNode,M)):X&&(le(),v(X,1,1,()=>{X=null}),ne())},i(K){L||(h(V),h(c.$$.fragment,K),h(D),h(b),h(X),L=!0)},o(K){v(V),v(c.$$.fragment,K),v(D),v(b),v(X),L=!1},d(K){K&&m(e),V&&V.d(),F&&F.d(),A(c),D&&D.d(),~g&&P[g].d(),K&&m(C),X&&X.d(K),K&&m(M),T=!1,Qe(H)}}}function ni(s,e,l){let t,n,o,r,i,a,f,c,d,u,_,g=x,b=()=>(g(),g=Me(t,z=>l(10,_=z)),t);s.$$.on_destroy.push(()=>g());let{totalNumRows:w}=e,{manifest:y}=e,C=Re();ge(s,C,z=>l(22,u=z));let M=Je();ge(s,M,z=>l(21,d=z));let L=null;const T=["keyword","semantic","concept"],H={keyword:"Keyword",semantic:"Semantic",concept:"Concepts"};let V={};function F(z){z.type==="concept"&&l(2,L={namespace:z.concept_namespace,name:z.concept_name})}let D={};const k=z=>{const j=z.detail;j!==i&&C.setSortBy(j===""?null:kt(j))},P=()=>{r!=null&&C.setSortBy(r.path),C.setSortOrder((r==null?void 0:r.order)==="ASC"?"DESC":"ASC")},ee=()=>{C.clearSorts()},X=z=>F(z),K=()=>l(2,L=null);return s.$$set=z=>{"totalNumRows"in z&&l(0,w=z.totalNumRows),"manifest"in z&&l(1,y=z.manifest)},s.$$.update=()=>{var z,j,U,q;if(s.$$.dirty[0]&4&&b(l(9,t=L?tr(L.namespace,L.name):void 0)),s.$$.dirty[0]&4194304&&l(20,n=It(u)),s.$$.dirty[0]&4194304&&l(8,o=u.query.filters),s.$$.dirty[0]&1048584){l(3,V={});for(const Y of n)Y.type&&(Y.type in V||l(3,V[Y.type]=[],V),V[Y.type].push(Y))}if(s.$$.dirty[0]&2097152&&l(4,r=Fr(d)),s.$$.dirty[0]&2097152)for(const Y of((j=(z=d.selectRowsSchema)==null?void 0:z.data)==null?void 0:j.search_results)||[])D[Ee(Y.result_path)]=Y;s.$$.dirty[0]&16&&l(5,i=r!=null&&r.path?Ee(r.path):""),s.$$.dirty[0]&4194304&&l(6,a=u.query.sort_by),s.$$.dirty[0]&2097248&&l(19,f=((q=(U=d.selectRowsSchema)==null?void 0:U.data)==null?void 0:q.schema)!=null?[{path:[""],text:"None",disabled:a==null&&i!==""},...St(d.selectRowsSchema.data.schema).filter(Y=>Y.dtype!="embedding"&&Y.dtype!="string_span").map(Y=>({path:Y.path,text:Ee(Y.path.slice(1)),disabled:!1}))]:[]),s.$$.dirty[0]&524288&&l(7,c=f.reduce((Y,de)=>{const me=de.path[0];return(Y[me]=Y[me]||[]).push(de),Y},{}))},[w,y,L,V,r,i,a,c,o,t,_,C,M,T,H,F,k,P,ee,f,n,d,u,X,K]}class ri extends $e{constructor(e){super(),ke(this,e,ni,li,be,{totalNumRows:0,manifest:1},null,[-1,-1])}}function ul(s,e,l){var r,i,a;const t=s.slice();t[14]=e[l],t[18]=l;const n=t[3].length>1?`[${t[18]}]`:"";t[15]=n;const o=((a=(i=(r=t[7].data)==null?void 0:r.ui)==null?void 0:i.markdown_paths)==null?void 0:a.find(f=>Ze(f,t[0])))!=null;return t[16]=o,t}function dl(s){let e,l,t,n=s[0].join(".")+s[15]+"",o,r,i,a,f,c;return a=new Yr({props:{text:ye(s[14]),row:s[1],markdown:s[16],spanPaths:s[5].spanPaths,valuePaths:s[5].valuePaths,datasetViewStore:s[8],datasetStore:s[2],embeddings:s[6]}}),{c(){e=S("div"),l=S("div"),t=S("div"),o=Z(n),r=Q(),i=S("div"),B(a.$$.fragment),f=Q(),this.h()},l(d){e=E(d,"DIV",{class:!0});var u=$(e);l=E(u,"DIV",{class:!0});var _=$(l);t=E(_,"DIV",{class:!0});var g=$(t);o=G(g,n),g.forEach(m),r=J(_),i=E(_,"DIV",{class:!0});var b=$(i);O(a.$$.fragment,b),b.forEach(m),_.forEach(m),f=J(u),u.forEach(m),this.h()},h(){I(t,"class","sticky top-0 z-10 w-full self-start border-t border-neutral-200 bg-neutral-100 px-2 py-2 pb-2 font-mono font-medium text-neutral-500"),I(i,"class","mx-4 font-normal"),I(l,"class","flex w-full flex-col"),I(e,"class","flex flex-row")},m(d,u){N(d,e,u),p(e,l),p(l,t),p(t,o),p(l,r),p(l,i),R(a,i,null),p(e,f),c=!0},p(d,u){(!c||u&9)&&n!==(n=d[0].join(".")+d[15]+"")&&fe(o,n);const _={};u&8&&(_.text=ye(d[14])),u&2&&(_.row=d[1]),u&129&&(_.markdown=d[16]),u&32&&(_.spanPaths=d[5].spanPaths),u&32&&(_.valuePaths=d[5].valuePaths),u&4&&(_.datasetStore=d[2]),u&64&&(_.embeddings=d[6]),a.$set(_)},i(d){c||(h(a.$$.fragment,d),c=!0)},o(d){v(a.$$.fragment,d),c=!1},d(d){d&&m(e),A(a)}}}function si(s){let e,l,t=s[3],n=[];for(let r=0;rv(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;r(u(),u=Me(i,M=>l(7,d=M)),i);s.$$.on_destroy.push(()=>u());let{path:g}=e,{row:b}=e,{field:w}=e;const y=Re();ge(s,y,M=>l(13,f=M));const C=Je();return ge(s,C,M=>l(2,c=M)),s.$$set=M=>{"path"in M&&l(0,g=M.path),"row"in M&&l(1,b=M.row),"field"in M&&l(10,w=M.field)},s.$$.update=()=>{s.$$.dirty&4&&l(11,t=c.visibleFields||[]),s.$$.dirty&8196&&l(12,n=In(f,c)),s.$$.dirty&4100&&l(6,o=Vn(c,n)),s.$$.dirty&3072&&l(5,r=Mr(w,t)),s.$$.dirty&8192&&_(l(4,i=ot(f.namespace,f.datasetName))),s.$$.dirty&3&&l(3,a=nr(b,g).map(M=>rr.value(M)).filter(Jr))},[g,b,c,a,i,r,o,d,y,C,w,t,n,f]}class ai extends $e{constructor(e){super(),ke(this,e,ii,si,be,{path:0,row:1,field:10})}}function ml(s,e,l){const t=s.slice();return t[8]=e[l],t[10]=l,t}function hl(s){let e,l=[],t=new Map,n,o,r=s[1];const i=a=>Ee(a[8].path);for(let a=0;as[7].call(e))},m(a,f){N(a,e,f);for(let c=0;c0&&hl(s);return i=new es({props:{row:s[0],visibleFields:s[2],selectRowsSchema:s[4]}}),{c(){e=S("div"),l=S("div"),c&&c.c(),t=Q(),n=S("div"),o=S("div"),r=S("div"),B(i.$$.fragment),this.h()},l(d){e=E(d,"DIV",{class:!0});var u=$(e);l=E(u,"DIV",{class:!0});var _=$(l);c&&c.l(_),t=J(_),n=E(_,"DIV",{class:!0});var g=$(n);o=E(g,"DIV",{class:!0});var b=$(o);r=E(b,"DIV",{style:!0,class:!0});var w=$(r);O(i.$$.fragment,w),w.forEach(m),b.forEach(m),g.forEach(m),_.forEach(m),u.forEach(m),this.h()},h(){I(r,"style",a=`max-height: ${Math.max(gl,s[3])}px`),I(r,"class","overflow-y-auto"),I(o,"class","sticky top-0 self-start"),I(n,"class","flex h-full w-1/3 bg-neutral-100"),I(l,"class","flex h-full w-full flex-row"),I(e,"class","rounded border-x border-b border-neutral-200 shadow-md")},m(d,u){N(d,e,u),p(e,l),c&&c.m(l,null),p(l,t),p(l,n),p(n,o),p(o,r),R(i,r,null),f=!0},p(d,[u]){d[1].length>0?c?(c.p(d,u),u&2&&h(c,1)):(c=hl(d),c.c(),h(c,1),c.m(l,t)):c&&(le(),v(c,1,1,()=>{c=null}),ne());const _={};u&1&&(_.row=d[0]),u&4&&(_.visibleFields=d[2]),u&16&&(_.selectRowsSchema=d[4]),i.$set(_),(!f||u&8&&a!==(a=`max-height: ${Math.max(gl,d[3])}px`))&&I(r,"style",a)},i(d){f||(h(c),h(i.$$.fragment,d),f=!0)},o(d){v(c),v(i.$$.fragment,d),f=!1},d(d){d&&m(e),c&&c.d(),A(i)}}}const gl=320;function fi(s,e,l){let t,n,{row:o}=e,{mediaFields:r}=e,{visibleFields:i}=e;const a=Je();ge(s,a,d=>l(6,n=d));let f=0;function c(){f=this.clientHeight,l(3,f)}return s.$$set=d=>{"row"in d&&l(0,o=d.row),"mediaFields"in d&&l(1,r=d.mediaFields),"visibleFields"in d&&l(2,i=d.visibleFields)},s.$$.update=()=>{var d;s.$$.dirty&64&&l(4,t=(d=n.selectRowsSchema)==null?void 0:d.data)},[o,r,i,f,t,a,n,c]}class ci extends $e{constructor(e){super(),ke(this,e,fi,oi,be,{row:0,mediaFields:1,visibleFields:2})}}function pl(s,e,l){const t=s.slice();return t[23]=e[l],t}function ui(s){let e,l;return{c(){e=S("div"),l=Z("No results."),this.h()},l(t){e=E(t,"DIV",{class:!0});var n=$(e);l=G(n,"No results."),n.forEach(m),this.h()},h(){I(e,"class","mx-4 mt-8 w-full text-gray-600")},m(t,n){N(t,e,n),p(e,l)},p:x,i:x,o:x,d(t){t&&m(e)}}}function di(s){let e,l;return{c(){e=S("div"),l=Z("Select fields to display"),this.h()},l(t){e=E(t,"DIV",{class:!0});var n=$(e);l=G(n,"Select fields to display"),n.forEach(m),this.h()},h(){I(e,"class","mt-12 w-full text-center text-gray-600")},m(t,n){N(t,e,n),p(e,l)},p:x,i:x,o:x,d(t){t&&m(e)}}}function mi(s){let e,l;return e=new je({props:{paragraph:!0,lines:3}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function hi(s){var t,n;let e,l;return e=new bn({props:{lowContrast:!0,title:"Could not fetch schema:",subtitle:((t=s[2].error.body)==null?void 0:t.detail)||((n=s[2])==null?void 0:n.error.message)}}),{c(){B(e.$$.fragment)},l(o){O(e.$$.fragment,o)},m(o,r){R(e,o,r),l=!0},p(o,r){var a,f;const i={};r&4&&(i.subtitle=((a=o[2].error.body)==null?void 0:a.detail)||((f=o[2])==null?void 0:f.error.message)),e.$set(i)},i(o){l||(h(e.$$.fragment,o),l=!0)},o(o){v(e.$$.fragment,o),l=!1},d(o){A(e,o)}}}function _i(s){var t;let e,l;return e=new bn({props:{lowContrast:!0,title:"Could not fetch rows:",subtitle:((t=s[4].error.body)==null?void 0:t.detail)||s[4].error.message}}),{c(){B(e.$$.fragment)},l(n){O(e.$$.fragment,n)},m(n,o){R(e,n,o),l=!0},p(n,o){var i;const r={};o&16&&(r.subtitle=((i=n[4].error.body)==null?void 0:i.detail)||n[4].error.message),e.$set(r)},i(n){l||(h(e.$$.fragment,n),l=!0)},o(n){v(e.$$.fragment,n),l=!1},d(n){A(e,n)}}}function bl(s){let e,l,t,n=s[6],o=[];for(let a=0;av(o[a],1,1,()=>{o[a]=null});let i=s[6].length>0&&wl(s);return{c(){e=S("div");for(let a=0;a0?i?(i.p(a,f),f&64&&h(i,1)):(i=wl(a),i.c(),h(i,1),i.m(e,null)):i&&(le(),v(i,1,1,()=>{i=null}),ne())},i(a){if(!t){for(let f=0;f0&&s[13].isSuccess&&s[5]!=null&&bl(s);return{c(){B(e.$$.fragment),l=Q(),n&&n.c(),o=Q(),d&&d.c(),r=ie()},l(u){O(e.$$.fragment,u),l=J(u),n&&n.l(u),o=J(u),d&&d.l(u),r=ie()},m(u,_){R(e,u,_),N(u,l,_),~t&&f[t].m(u,_),N(u,o,_),d&&d.m(u,_),N(u,r,_),i=!0},p(u,[_]){const g={};_&128&&(g.totalNumRows=u[7]),_&4096&&(g.manifest=u[12].data),e.$set(g);let b=t;t=c(u),t===b?~t&&f[t].p(u,_):(n&&(le(),v(f[b],1,1,()=>{f[b]=null}),ne()),~t?(n=f[t],n?n.p(u,_):(n=f[t]=a[t](u),n.c()),h(n,1),n.m(o.parentNode,o)):n=null),u[6]&&u[1].length>0&&u[13].isSuccess&&u[5]!=null?d?(d.p(u,_),_&8290&&h(d,1)):(d=bl(u),d.c(),h(d,1),d.m(r.parentNode,r)):d&&(le(),v(d,1,1,()=>{d=null}),ne())},i(u){i||(h(e.$$.fragment,u),h(n),h(d),i=!0)},o(u){v(e.$$.fragment,u),v(n),v(d),i=!1},d(u){A(e,u),u&&m(l),~t&&f[t].d(u),u&&m(o),d&&d.d(u),u&&m(r)}}}function pi(s,e,l){let t,n,o,r,i,a,f,c,d,u,_,g,b=x,w=()=>(b(),b=Me(r,q=>l(3,g=q)),r),y,C,M=x,L=()=>(M(),M=Me(a,q=>l(4,C=q)),a),T,H,V=x,F=()=>(V(),V=Me(t,q=>l(12,H=q)),t),D,k=x,P=()=>(k(),k=Me(n,q=>l(13,D=q)),n);s.$$.on_destroy.push(()=>b()),s.$$.on_destroy.push(()=>M()),s.$$.on_destroy.push(()=>V()),s.$$.on_destroy.push(()=>k());const ee=Re();ge(s,ee,q=>l(19,T=q));const X=Je();ge(s,X,q=>l(18,y=q));let K=null;const z=Lr(K),j=()=>C==null?void 0:C.fetchNextPage();function U(q){Be[q?"unshift":"push"](()=>{K=q,l(0,K)})}return s.$$.update=()=>{var q,Y,de,me;s.$$.dirty&524288&&F(l(11,t=sr(T.namespace,T.datasetName))),s.$$.dirty&524288&&P(l(10,n=Et(T.namespace,T.datasetName))),s.$$.dirty&524288&&l(17,o=ir(T)),s.$$.dirty&524288&&w(l(9,r=ot(T.namespace,T.datasetName))),s.$$.dirty&262144&&l(2,i=y.selectRowsSchema),s.$$.dirty&655364&&L(l(8,a=ar(T.namespace,T.datasetName,o||{},i!=null&&i.isSuccess?i.data.schema:void 0))),s.$$.dirty&16&&l(7,f=(q=C.data)==null?void 0:q.pages[0].total_num_rows),s.$$.dirty&16&&l(6,c=(Y=C.data)==null?void 0:Y.pages.flatMap(re=>re.rows)),s.$$.dirty&262144&&l(1,d=(y.visibleFields||[]).sort((re,De)=>Ee(re.path)>Ee(De.path)?1:-1)),s.$$.dirty&6&&l(16,u=((de=i==null?void 0:i.data)==null?void 0:de.schema)!=null?zr((me=i==null?void 0:i.data)==null?void 0:me.schema,d):null),s.$$.dirty&65544&&l(5,_=g.data?Pr(u,g.data):[]),s.$$.dirty&1&&z.set(K)},Kn(Br,z),[K,d,i,g,C,_,c,f,a,r,n,t,H,D,ee,X,u,o,y,T,j,U]}class bi extends $e{constructor(e){super(),ke(this,e,pi,gi,be,{})}}function $l(s,e,l){const t=s.slice();return t[45]=e[l],t}function kl(s,e,l){const t=s.slice();return t[48]=e[l],t}function Sl(s){const e=s[5].find(function(...t){return s[37](s[51],...t)});s[52]=e}function vi(s){let e,l,t=s[52].text+"",n,o,r=s[52].description&&El(s);return{c(){e=S("div"),l=S("div"),n=Z(t),o=Q(),r&&r.c(),this.h()},l(i){e=E(i,"DIV",{class:!0});var a=$(e);l=E(a,"DIV",{});var f=$(l);n=G(f,t),f.forEach(m),o=J(a),r&&r.l(a),a.forEach(m),this.h()},h(){I(e,"class","flex justify-between gap-x-4")},m(i,a){N(i,e,a),p(e,l),p(l,n),p(e,o),r&&r.m(e,null)},p(i,a){a[0]&32|a[1]&1048576&&t!==(t=i[52].text+"")&&fe(n,t),i[52].description?r?r.p(i,a):(r=El(i),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},i:x,o:x,d(i){i&&m(e),r&&r.d()}}}function wi(s){let e,l,t,n,o,r,i;return l=new Xe({props:{$$slots:{default:[Ei]},$$scope:{ctx:s}}}),{c(){e=S("div"),B(l.$$.fragment),t=Q(),n=S("div"),o=Z(`Semantic search: + `),r=Z(s[0]),this.h()},l(a){e=E(a,"DIV",{class:!0});var f=$(e);O(l.$$.fragment,f),t=J(f),n=E(f,"DIV",{class:!0});var c=$(n);o=G(c,`Semantic search: + `),r=G(c,s[0]),c.forEach(m),f.forEach(m),this.h()},h(){I(n,"class","ml-2"),I(e,"class","new-keyword flex flex-row items-center justify-items-center")},m(a,f){N(a,e,f),R(l,e,null),p(e,t),p(e,n),p(n,o),p(n,r),i=!0},p(a,f){const c={};f[1]&4194304&&(c.$$scope={dirty:f,ctx:a}),l.$set(c),(!i||f[0]&1)&&fe(r,a[0])},i(a){i||(h(l.$$.fragment,a),i=!0)},o(a){v(l.$$.fragment,a),i=!1},d(a){a&&m(e),A(l)}}}function $i(s){let e,l,t,n,o,r,i;return l=new Xe({props:{$$slots:{default:[yi]},$$scope:{ctx:s}}}),{c(){e=S("div"),B(l.$$.fragment),t=Q(),n=S("div"),o=Z(`Keyword search: + `),r=Z(s[0]),this.h()},l(a){e=E(a,"DIV",{class:!0});var f=$(e);O(l.$$.fragment,f),t=J(f),n=E(f,"DIV",{class:!0});var c=$(n);o=G(c,`Keyword search: + `),r=G(c,s[0]),c.forEach(m),f.forEach(m),this.h()},h(){I(n,"class","ml-2"),I(e,"class","new-keyword flex flex-row items-center justify-items-center")},m(a,f){N(a,e,f),R(l,e,null),p(e,t),p(e,n),p(n,o),p(n,r),i=!0},p(a,f){const c={};f[1]&4194304&&(c.$$scope={dirty:f,ctx:a}),l.$set(c),(!i||f[0]&1)&&fe(r,a[0])},i(a){i||(h(l.$$.fragment,a),i=!0)},o(a){v(l.$$.fragment,a),i=!1},d(a){a&&m(e),A(l)}}}function ki(s){let e,l,t,n,o,r=s[0]!=""?":":"",i,a,f,c;return l=new Xe({props:{$$slots:{default:[Di]},$$scope:{ctx:s}}}),{c(){e=S("div"),B(l.$$.fragment),t=Q(),n=S("div"),o=Z("New concept"),i=Z(r),a=Q(),f=Z(s[0]),this.h()},l(d){e=E(d,"DIV",{class:!0});var u=$(e);O(l.$$.fragment,u),t=J(u),n=E(u,"DIV",{class:!0});var _=$(n);o=G(_,"New concept"),i=G(_,r),a=J(_),f=G(_,s[0]),_.forEach(m),u.forEach(m),this.h()},h(){I(n,"class","ml-2"),I(e,"class","new-concept flex flex-row items-center justify-items-center")},m(d,u){N(d,e,u),R(l,e,null),p(e,t),p(e,n),p(n,o),p(n,i),p(n,a),p(n,f),c=!0},p(d,u){const _={};u[1]&4194304&&(_.$$scope={dirty:u,ctx:d}),l.$set(_),(!c||u[0]&1)&&r!==(r=d[0]!=""?":":"")&&fe(i,r),(!c||u[0]&1)&&fe(f,d[0])},i(d){c||(h(l.$$.fragment,d),c=!0)},o(d){v(l.$$.fragment,d),c=!1},d(d){d&&m(e),A(l)}}}function Si(s){let e;return{c(){e=S("div")},l(l){e=E(l,"DIV",{}),$(e).forEach(m)},m(l,t){N(l,e,t)},p:x,i:x,o:x,d(l){l&&m(e)}}}function El(s){let e,l=s[52].description+"",t;return{c(){e=S("div"),t=Z(l),this.h()},l(n){e=E(n,"DIV",{class:!0});var o=$(e);t=G(o,l),o.forEach(m),this.h()},h(){I(e,"class","truncate text-xs text-gray-500")},m(n,o){N(n,e,o),p(e,t)},p(n,o){o[0]&32|o[1]&1048576&&l!==(l=n[52].description+"")&&fe(t,l)},d(n){n&&m(e)}}}function Ei(s){let e,l;return e=new Mn({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function yi(s){let e,l;return e=new Mn({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Di(s){let e,l;return e=new as({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Ii(s){Sl(s);let e,l,t,n;const o=[Si,ki,$i,wi,vi],r=[];function i(a,f){return a[52]==null?0:a[52].id==="new-concept"?1:a[52].id==="keyword-search"?2:a[52].id==="semantic-search"?3:4}return e=i(s),l=r[e]=o[e](s),{c(){l.c(),t=ie()},l(a){l.l(a),t=ie()},m(a,f){r[e].m(a,f),N(a,t,f),n=!0},p(a,f){Sl(a);let c=e;e=i(a),e===c?r[e].p(a,f):(le(),v(r[c],1,1,()=>{r[c]=null}),ne(),l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),h(l,1),l.m(t.parentNode,t))},i(a){n||(h(l),n=!0)},o(a){v(l),n=!1},d(a){r[e].d(a),a&&m(t)}}}function yl(s){let e,l;return e=new at({props:{value:Ee(s[48]),text:Ee(s[48])}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n[0]&512&&(o.value=Ee(t[48])),n[0]&512&&(o.text=Ee(t[48])),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Vi(s){let e,l,t=s[9],n=[];for(let r=0;rv(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;rv(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;r({51:D}),({item:D})=>[0,D?1048576:0]]},$$scope:{ctx:s}};s[0]!==void 0&&(V.value=s[0]),c=new ns({props:V}),s[38](c),Be.push(()=>Ue(c,"value",H)),c.$on("select",s[20]);let F=Dl(s);return C=new pt({props:{size:"xl",selected:s[1]||"",name:s[1]||"",$$slots:{default:[Ni]},$$scope:{ctx:s}}}),C.$on("change",s[18]),{c(){e=S("div"),l=S("div"),B(t.$$.fragment),n=Q(),o=S("div"),r=S("div"),i=S("div"),a=S("div"),f=S("div"),B(c.$$.fragment),u=Q(),_=S("div"),F.c(),b=Q(),w=S("div"),y=S("div"),B(C.$$.fragment),this.h()},l(D){e=E(D,"DIV",{class:!0});var k=$(e);l=E(k,"DIV",{class:!0});var P=$(l);O(t.$$.fragment,P),P.forEach(m),n=J(k),o=E(k,"DIV",{class:!0});var ee=$(o);r=E(ee,"DIV",{class:!0});var X=$(r);i=E(X,"DIV",{class:!0});var K=$(i);a=E(K,"DIV",{class:!0});var z=$(a);f=E(z,"DIV",{class:!0});var j=$(f);O(c.$$.fragment,j),j.forEach(m),z.forEach(m),K.forEach(m),X.forEach(m),ee.forEach(m),u=J(k),_=E(k,"DIV",{class:!0});var U=$(_);F.l(U),U.forEach(m),b=J(k),w=E(k,"DIV",{class:!0});var q=$(w);y=E(q,"DIV",{class:!0});var Y=$(y);O(C.$$.fragment,Y),Y.forEach(m),q.forEach(m),k.forEach(m),this.h()},h(){I(l,"class","compute-embedding mr-1"),Se(l,"compute-embedding-indexing",s[8]),I(f,"class","flex-grow"),I(a,"class","flex w-full flex-row items-start justify-items-start"),I(i,"class","flex flex-row"),I(r,"class","w-full"),I(o,"class","search-container flex w-full flex-grow flex-row"),I(_,"class","mx-1"),I(y,"class","w-32"),I(w,"class","embedding-select flex flex-row"),I(e,"class","border-1 flex w-full flex-row items-center")},m(D,k){N(D,e,k),p(e,l),R(t,l,null),p(e,n),p(e,o),p(o,r),p(r,i),p(i,a),p(a,f),R(c,f,null),p(e,u),p(e,_),F.m(_,null),p(e,b),p(e,w),p(w,y),R(C,y,null),M=!0,L||(T=[Ie(Ve.call(null,_,{text:"Select the field to search over."})),Ie(Ve.call(null,y,{text:"Select the embedding to use."}))],L=!0)},p(D,k){const P={};k[0]&264&&(P.disabled=D[3]||D[8]),k[0]&264&&(P.icon=D[3]?Tt:D[8]?Ct:$t),t.$set(P),(!M||k[0]&256)&&Se(l,"compute-embedding-indexing",D[8]);const ee={};k[0]&32&&(ee.items=D[5]),k[0]&128&&(ee.placeholder=D[7]),k[0]&33|k[1]&5242880&&(ee.$$scope={dirty:k,ctx:D}),!d&&k[0]&1&&(d=!0,ee.value=D[0],Ye(()=>d=!1)),c.$set(ee),k[0]&512&&be(g,g=D[9])?(le(),v(F,1,1,x),ne(),F=Dl(D),F.c(),h(F,1),F.m(_,null)):F.p(D,k);const X={};k[0]&2&&(X.selected=D[1]||""),k[0]&2&&(X.name=D[1]||""),k[0]&16|k[1]&4194304&&(X.$$scope={dirty:k,ctx:D}),C.$set(X)},i(D){M||(h(t.$$.fragment,D),h(c.$$.fragment,D),h(F),h(C.$$.fragment,D),M=!0)},o(D){v(t.$$.fragment,D),v(c.$$.fragment,D),v(F),v(C.$$.fragment,D),M=!1},d(D){D&&m(e),A(t),s[38](null),A(c),F.d(D),A(C),L=!1,Qe(T)}}}const Ci=(s,e)=>s.text.toLowerCase().includes(e.toLowerCase())||s.id==="new-concept";function Fi(s,e,l){let t,n,o,r,i,a,f,c,d,u,_,g,b,w,y,C,M,L,T,H,V,F,D=x,k=()=>(D(),D=Me(t,ae=>l(34,F=ae)),t),P;s.$$.on_destroy.push(()=>D());const ee=Re();ge(s,ee,ae=>l(33,V=ae));const X=Je();ge(s,X,ae=>l(32,T=ae));const K=Fn();ge(s,K,ae=>l(35,P=ae));const z=wn();ge(s,z,ae=>l(42,C=ae));const j=$n();ge(s,j,ae=>l(4,H=ae));const U=(ae,Ce)=>`${Ee(ae||"")}_${Ce}`;let q={};const Y=or();ge(s,Y,ae=>l(31,L=ae));const de=yt();ge(s,de,ae=>l(30,M=ae));let me=[],re="",De;const ue=ae=>{l(1,f=ae.target.value),ee.setSearchEmbedding(ae.target.value)},se=()=>{f!=null&&(l(22,q[U(r,f)]=!0,q),C.mutate([n,o,{leaf_path:kt(r||[]),signal:{signal_name:f}}]))};let oe;const _e=(ae,Ce)=>{r==null||f==null||(ee.addSearch({path:r,type:"concept",concept_namespace:ae,concept_name:Ce,embedding:f}),oe.clear())},W=ae=>{if(r!=null)if(ae.detail.selectedId==="new-concept"){re===De.id&&l(0,re="");const Ce=re.split("/",2);let qe="",Ae="";Ce.length===2?[qe,Ae]=Ce:[Ae]=Ce,Ge({command:We.CreateConcept,namespace:qe,conceptName:Ae,dataset:{namespace:n,name:o},path:r,onCreate:xe=>_e(xe.detail.namespace,xe.detail.name)}),oe.clear()}else if(ae.detail.selectedId==="keyword-search"){if(re=="")return;ee.addSearch({path:r,type:"keyword",query:re}),oe.clear()}else if(ae.detail.selectedId=="semantic-search"){if(re==""||f==null)return;ee.addSearch({path:r,type:"semantic",query:re,embedding:f}),oe.clear()}else _e(ae.detail.selectedId.namespace,ae.detail.selectedId.name)},te=ae=>{ee.setSearchPath(ae.target.value)},ce=()=>{se()},He=(ae,Ce)=>Ce.id===ae.id;function Ke(ae){Be[ae?"unshift":"push"](()=>{oe=ae,l(6,oe)})}function he(ae){re=ae,l(0,re)}return s.$$.update=()=>{var ae,Ce;s.$$.dirty[1]&4&&k(l(10,t=ot(V.namespace,V.datasetName))),s.$$.dirty[1]&4&&(n=V.namespace),s.$$.dirty[1]&4&&(o=V.datasetName),s.$$.dirty[1]&6&&l(2,r=In(V,T)),s.$$.dirty[0]&4|s.$$.dirty[1]&4&&l(24,i=It(V,r)),s.$$.dirty[1]&2&&l(9,a=(T.visibleFields||[]).filter(qe=>qe.dtype==="string").map(qe=>Ee(qe.path))),s.$$.dirty[0]&20|s.$$.dirty[1]&30&&l(1,f=Rr(P,F.data,V,T,r,(H.data||[]).map(qe=>qe.name))),s.$$.dirty[0]&4|s.$$.dirty[1]&2&&l(29,c=Vn(T,r)),s.$$.dirty[0]&536870914&&l(3,d=c!=null&&!!c.includes(f||"")),s.$$.dirty[0]&4194318&&l(8,u=!d&&q[U(r,f)]),s.$$.dirty[0]&8&&l(7,_=d?"Search by concept or keyword.":'Search by keyword. Click "compute embedding" to search by concept.'),s.$$.dirty[0]&1073741824&&l(28,g=(Ce=(ae=M.data)==null?void 0:ae.user)==null?void 0:Ce.id),s.$$.dirty[0]&268435456|s.$$.dirty[1]&1&&l(25,b=Ar(L.data||[],g)),s.$$.dirty[0]&9&&l(23,De={id:"new-concept",text:re,disabled:!d}),s.$$.dirty[0]&1&&l(27,w={id:"keyword-search",text:re}),s.$$.dirty[0]&9&&l(26,y={id:"semantic-search",text:re,disabled:!d}),s.$$.dirty[0]&1333788683|s.$$.dirty[1]&1&&l(5,me=L!=null&&L.data?[De,...re!=""?[w]:[],...re!=""&&f?[y]:[],...b.flatMap(qe=>qe.concepts.map(Ae=>({id:{namespace:Ae.namespace,name:Ae.name},text:Or(Ae.namespace,Ae.name,M.data),description:Ae.description,disabled:!d||i.some(xe=>xe.type==="concept"&&xe.concept_namespace===Ae.namespace&&xe.concept_name===Ae.name)})))]:[])},[re,f,r,d,H,me,oe,_,u,a,t,ee,X,K,z,j,Y,de,ue,se,W,te,q,De,i,b,y,w,g,c,M,L,T,V,F,P,ce,He,Ke,he]}class Mi extends $e{constructor(e){super(),ke(this,e,Fi,Ti,be,{},null,[-1,-1])}}function zi(s){let e,l;return e=new vn({props:{$$slots:{default:[Bi]},$$scope:{ctx:s}}}),e.$on("click",s[5]),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n&512&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Pi(s){let e,l;return{c(){e=S("span"),l=Z("Invalid query"),this.h()},l(t){e=E(t,"SPAN",{class:!0});var n=$(e);l=G(n,"Invalid query"),n.forEach(m),this.h()},h(){I(e,"class","text-red-500")},m(t,n){N(t,e,n),p(e,l)},p:x,i:x,o:x,d(t){t&&m(e)}}}function Bi(s){let e;return{c(){e=Z("Apply")},l(l){e=G(l,"Apply")},m(l,t){N(l,e,t)},d(l){l&&m(e)}}}function Ri(s){let e,l,t,n,o,r,i,a,f,c,d;const u=[Pi,zi],_=[];function g(b,w){return b[0]?b[3]?1:-1:0}return~(r=g(s))&&(i=_[r]=u[r](s)),{c(){e=S("pre"),l=Z(""),t=Z(s[2]),n=Z(` +`),o=Q(),i&&i.c(),a=ie(),this.h()},l(b){e=E(b,"PRE",{class:!0,contenteditable:!0});var w=$(e);l=G(w,""),t=G(w,s[2]),n=G(w,` +`),w.forEach(m),o=J(b),i&&i.l(b),a=ie(),this.h()},h(){I(e,"class","whitespace-pre bg-gray-50 p-4 font-mono"),I(e,"contenteditable",""),s[1]===void 0&>(()=>s[8].call(e)),Se(e,"outline-red-500",!s[0])},m(b,w){N(b,e,w),p(e,l),p(e,t),p(e,n),s[1]!==void 0&&(e.innerText=s[1]),N(b,o,w),~r&&_[r].m(b,w),N(b,a,w),f=!0,c||(d=Pe(e,"input",s[8]),c=!0)},p(b,[w]){(!f||w&4)&&Zn(t,b[2]),w&2&&b[1]!==e.innerText&&(e.innerText=b[1]),(!f||w&1)&&Se(e,"outline-red-500",!b[0]);let y=r;r=g(b),r===y?~r&&_[r].p(b,w):(i&&(le(),v(_[y],1,1,()=>{_[y]=null}),ne()),~r?(i=_[r],i?i.p(b,w):(i=_[r]=u[r](b),i.c()),h(i,1),i.m(a.parentNode,a)):i=null)},i(b){f||(h(i),f=!0)},o(b){v(i),f=!1},d(b){b&&m(e),b&&m(o),~r&&_[r].d(b),b&&m(a),c=!1,d()}}}function Ai(s,e,l){let t,n,o,r,i;const a=Re();ge(s,a,u=>l(7,i=u));let f=!0;function c(){ut(a,i.query=JSON.parse(o),i)}function d(){o=this.innerText,l(1,o),l(2,n),l(6,t),l(7,i)}return s.$$.update=()=>{if(s.$$.dirty&128&&l(6,t=i.query),s.$$.dirty&64&&l(2,n=t?JSON.stringify(t,null,2):""),s.$$.dirty&4&&l(1,o=n),s.$$.dirty&2)try{JSON.parse(o),l(0,f=!0)}catch{l(0,f=!1)}s.$$.dirty&67&&l(3,r=f&&!fr(JSON.parse(o),t))},[f,o,n,r,a,c,t,i,d]}class Oi extends $e{constructor(e){super(),ke(this,e,Ai,Ri,be,{})}}function Vl(s){let e,l;return e=new Wn({props:{light:!0,flipped:!0,$$slots:{default:[Hi]},$$scope:{ctx:s}}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n&1073742079&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Nl(s){let e,l;return e=new nt({props:{text:"Sort by"}}),e.$on("click",s[20]),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Tl(s){let e,l;return e=new nt({props:{text:"Filter"}}),e.$on("click",s[21]),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Cl(s){let e,l,t,n,o,r;return l=new nt({props:{disabled:!s[7],text:"Compute embedding"}}),l.$on("click",s[22]),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(i){e=E(i,"DIV",{class:!0});var a=$(e);O(l.$$.fragment,a),a.forEach(m),this.h()},h(){I(e,"class","w-full")},m(i,a){N(i,e,a),R(l,e,null),n=!0,o||(r=Ie(t=Ve.call(null,e,{text:s[7]?"":"User does not have access to compute embeddings over this dataset."})),o=!0)},p(i,a){const f={};a&128&&(f.disabled=!i[7]),l.$set(f),t&&Le(t.update)&&a&128&&t.update.call(null,{text:i[7]?"":"User does not have access to compute embeddings over this dataset."})},i(i){n||(h(l.$$.fragment,i),n=!0)},o(i){v(l.$$.fragment,i),n=!1},d(i){i&&m(e),A(l),o=!1,r()}}}function Fl(s){let e,l;return e=new nt({props:{text:"Preview signal"}}),e.$on("click",s[23]),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Ml(s){let e,l,t,n,o,r;return l=new nt({props:{text:"Compute signal",disabled:!s[7]}}),l.$on("click",s[24]),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(i){e=E(i,"DIV",{class:!0});var a=$(e);O(l.$$.fragment,a),a.forEach(m),this.h()},h(){I(e,"class","w-full")},m(i,a){N(i,e,a),R(l,e,null),n=!0,o||(r=Ie(t=Ve.call(null,e,{text:s[7]?"":"User does not have access to compute signals over this dataset."})),o=!0)},p(i,a){const f={};a&128&&(f.disabled=!i[7]),l.$set(f),t&&Le(t.update)&&a&128&&t.update.call(null,{text:i[7]?"":"User does not have access to compute signals over this dataset."})},i(i){n||(h(l.$$.fragment,i),n=!0)},o(i){v(l.$$.fragment,i),n=!1},d(i){i&&m(e),A(l),o=!1,r()}}}function zl(s){let e,l,t,n,o,r;return l=new nt({props:{disabled:!s[6],text:"Delete signal"}}),l.$on("click",s[25]),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(i){e=E(i,"DIV",{class:!0});var a=$(e);O(l.$$.fragment,a),a.forEach(m),this.h()},h(){I(e,"class","w-full")},m(i,a){N(i,e,a),R(l,e,null),n=!0,o||(r=Ie(t=Ve.call(null,e,{text:s[6]?"":"User does not have access to delete signals for this dataset."})),o=!0)},p(i,a){const f={};a&64&&(f.disabled=!i[6]),l.$set(f),t&&Le(t.update)&&a&64&&t.update.call(null,{text:i[6]?"":"User does not have access to delete signals for this dataset."})},i(i){n||(h(l.$$.fragment,i),n=!0)},o(i){v(l.$$.fragment,i),n=!1},d(i){i&&m(e),A(l),o=!1,r()}}}function Hi(s){let e=mt(s[0]),l,t=vt(s[0]),n,o,r,i,a,f,c=e&&Nl(s),d=t&&Tl(s),u=!s[2]&&Cl(s),_=!s[2]&&Fl(s),g=!s[2]&&Ml(s),b=s[1]&&zl(s);return{c(){c&&c.c(),l=Q(),d&&d.c(),n=Q(),u&&u.c(),o=Q(),_&&_.c(),r=Q(),g&&g.c(),i=Q(),b&&b.c(),a=ie()},l(w){c&&c.l(w),l=J(w),d&&d.l(w),n=J(w),u&&u.l(w),o=J(w),_&&_.l(w),r=J(w),g&&g.l(w),i=J(w),b&&b.l(w),a=ie()},m(w,y){c&&c.m(w,y),N(w,l,y),d&&d.m(w,y),N(w,n,y),u&&u.m(w,y),N(w,o,y),_&&_.m(w,y),N(w,r,y),g&&g.m(w,y),N(w,i,y),b&&b.m(w,y),N(w,a,y),f=!0},p(w,y){y&1&&(e=mt(w[0])),e?c?(c.p(w,y),y&1&&h(c,1)):(c=Nl(w),c.c(),h(c,1),c.m(l.parentNode,l)):c&&(le(),v(c,1,1,()=>{c=null}),ne()),y&1&&(t=vt(w[0])),t?d?(d.p(w,y),y&1&&h(d,1)):(d=Tl(w),d.c(),h(d,1),d.m(n.parentNode,n)):d&&(le(),v(d,1,1,()=>{d=null}),ne()),w[2]?u&&(le(),v(u,1,1,()=>{u=null}),ne()):u?(u.p(w,y),y&4&&h(u,1)):(u=Cl(w),u.c(),h(u,1),u.m(o.parentNode,o)),w[2]?_&&(le(),v(_,1,1,()=>{_=null}),ne()):_?(_.p(w,y),y&4&&h(_,1)):(_=Fl(w),_.c(),h(_,1),_.m(r.parentNode,r)),w[2]?g&&(le(),v(g,1,1,()=>{g=null}),ne()):g?(g.p(w,y),y&4&&h(g,1)):(g=Ml(w),g.c(),h(g,1),g.m(i.parentNode,i)),w[1]?b?(b.p(w,y),y&2&&h(b,1)):(b=zl(w),b.c(),h(b,1),b.m(a.parentNode,a)):b&&(le(),v(b,1,1,()=>{b=null}),ne())},i(w){f||(h(c),h(d),h(u),h(_),h(g),h(b),f=!0)},o(w){v(c),v(d),v(u),v(_),v(g),v(b),f=!1},d(w){c&&c.d(w),w&&m(l),d&&d.d(w),w&&m(n),u&&u.d(w),w&&m(o),_&&_.d(w),w&&m(r),g&&g.d(w),w&&m(i),b&&b.d(w),w&&m(a)}}}function qi(s){let e,l,t,n=Ee(s[0].path)+"",o,r,i,a,f;return{c(){e=S("p"),l=Z("Confirm deleting "),t=S("code"),o=Z(n),r=Z(" ?"),i=Q(),a=S("p"),f=Z("This is a permanent action and cannot be undone."),this.h()},l(c){e=E(c,"P",{class:!0});var d=$(e);l=G(d,"Confirm deleting "),t=E(d,"CODE",{});var u=$(t);o=G(u,n),u.forEach(m),r=G(d," ?"),d.forEach(m),i=J(c),a=E(c,"P",{class:!0});var _=$(a);f=G(_,"This is a permanent action and cannot be undone."),_.forEach(m),this.h()},h(){I(e,"class","!text-lg"),I(a,"class","mt-2")},m(c,d){N(c,e,d),p(e,l),p(e,t),p(t,o),p(e,r),N(c,i,d),N(c,a,d),p(a,f)},p(c,d){d&1&&n!==(n=Ee(c[0].path)+"")&&fe(o,n)},d(c){c&&m(e),c&&m(i),c&&m(a)}}}function Li(s){let e,l,t,n,o=s[8]&&Vl(s);function r(a){s[26](a)}let i={danger:!0,modalHeading:"Delete signal",primaryButtonText:"Delete",primaryButtonIcon:s[9].isLoading?Ft:void 0,secondaryButtonText:"Cancel",$$slots:{default:[qi]},$$scope:{ctx:s}};return s[3]!==void 0&&(i.open=s[3]),l=new Vt({props:i}),Be.push(()=>Ue(l,"open",r)),l.$on("click:button--secondary",s[27]),l.$on("open",s[28]),l.$on("close",s[29]),l.$on("submit",s[14]),{c(){o&&o.c(),e=Q(),B(l.$$.fragment)},l(a){o&&o.l(a),e=J(a),O(l.$$.fragment,a)},m(a,f){o&&o.m(a,f),N(a,e,f),R(l,a,f),n=!0},p(a,[f]){a[8]?o?(o.p(a,f),f&256&&h(o,1)):(o=Vl(a),o.c(),h(o,1),o.m(e.parentNode,e)):o&&(le(),v(o,1,1,()=>{o=null}),ne());const c={};f&512&&(c.primaryButtonIcon=a[9].isLoading?Ft:void 0),f&1073741825&&(c.$$scope={dirty:f,ctx:a}),!t&&f&8&&(t=!0,c.open=a[3],Ye(()=>t=!1)),l.$set(c)},i(a){n||(h(o),h(l.$$.fragment,a),n=!0)},o(a){v(o),v(l.$$.fragment,a),n=!1},d(a){o&&o.d(a),a&&m(e),A(l,a)}}}function ji(s,e,l){let t,n,o,r,i,a,f,c,d,u,_,g,{field:b}=e,{schema:w}=e,y=!1;const C=Re();ge(s,C,U=>l(19,g=U));const M=Je();ge(s,M,U=>l(18,_=U));const L=cr();ge(s,L,U=>l(9,d=U));const T=yt();ge(s,T,U=>l(17,u=U));function H(){d.mutate([t,n,{signal_path:b.path}],{onSuccess:()=>{l(3,y=!1),C.deleteSignal(b.path)}})}const V=()=>C.addSortBy(b.path),F=()=>Ge({command:We.EditFilter,namespace:t,datasetName:n,path:b.path}),D=()=>Ge({command:We.ComputeEmbedding,namespace:t,datasetName:n,path:b==null?void 0:b.path}),k=()=>Ge({command:We.PreviewConcept,namespace:t,datasetName:n,path:b==null?void 0:b.path}),P=()=>Ge({command:We.ComputeSignal,namespace:t,datasetName:n,path:b==null?void 0:b.path}),ee=()=>l(3,y=!0);function X(U){y=U,l(3,y)}const K=()=>l(3,y=!1);function z(U){ct.call(this,s,U)}function j(U){ct.call(this,s,U)}return s.$$set=U=>{"field"in U&&l(0,b=U.field),"schema"in U&&l(15,w=U.schema)},s.$$.update=()=>{var U,q,Y;s.$$.dirty&524288&&l(5,t=g.namespace),s.$$.dirty&524288&&l(4,n=g.datasetName),s.$$.dirty&32769&&l(2,o=tt(b,w)),s.$$.dirty&1&&l(1,r=Dt(b)),s.$$.dirty&262145&&l(16,i=Nn(((U=_.selectRowsSchema)==null?void 0:U.data)||null,b.path)),s.$$.dirty&65543&&l(8,a=(mt(b)||vt(b)||!o||r)&&!i),s.$$.dirty&131072&&l(7,f=(q=u.data)==null?void 0:q.access.dataset.compute_signals),s.$$.dirty&131072&&l(6,c=(Y=u.data)==null?void 0:Y.access.dataset.delete_signals)},[b,r,o,y,n,t,c,f,a,d,C,M,L,T,H,w,i,u,_,g,V,F,D,k,P,ee,X,K,z,j]}class Ui extends $e{constructor(e){super(),ke(this,e,ji,Li,be,{field:0,schema:15})}}function Pl(s,e,l){const t=s.slice();t[7]=e[l][0],t[8]=e[l][1];const n=t[2](t[7]);t[9]=n;const o=`${t[8]/t[1]*100}%`;t[10]=o;const r=ye(t[8]);return t[11]=r,t}function Bl(s){let e,l,t=s[9]+"",n,o,r,i,a,f=s[11]+"",c,d,u,_,g;function b(){return s[6](s[7])}return{c(){e=S("button"),l=S("div"),n=Z(t),r=Q(),i=S("div"),a=S("div"),c=Z(f),u=Q(),this.h()},l(w){e=E(w,"BUTTON",{class:!0});var y=$(e);l=E(y,"DIV",{title:!0,class:!0});var C=$(l);n=G(C,t),C.forEach(m),r=J(y),i=E(y,"DIV",{class:!0});var M=$(i);a=E(M,"DIV",{title:!0,class:!0});var L=$(a);c=G(L,f),L.forEach(m),M.forEach(m),u=J(y),y.forEach(m),this.h()},h(){I(l,"title",o=s[9]),I(l,"class","w-48 flex-none truncate px-2"),I(a,"title",d=s[11]),I(a,"class","histogram-bar my-px bg-indigo-200 pl-2 text-xs leading-5"),st(a,"width",s[10]),I(i,"class","w-36 border-l border-gray-300 pl-2"),I(e,"class","flex items-center p-0 text-left text-xs text-black hover:bg-gray-200")},m(w,y){N(w,e,y),p(e,l),p(l,n),p(e,r),p(e,i),p(i,a),p(a,c),p(e,u),_||(g=Pe(e,"click",b),_=!0)},p(w,y){s=w,y&1&&t!==(t=s[9]+"")&&fe(n,t),y&1&&o!==(o=s[9])&&I(l,"title",o),y&1&&f!==(f=s[11]+"")&&fe(c,f),y&1&&d!==(d=s[11])&&I(a,"title",d),y&3&&st(a,"width",s[10])},d(w){w&&m(e),_=!1,g()}}}function Yi(s){let e,l=s[0],t=[];for(let n=0;na("row-click",{value:c});return s.$$set=c=>{"field"in c&&l(4,n=c.field),"counts"in c&&l(0,o=c.counts),"bins"in c&&l(5,r=c.bins)},s.$$.update=()=>{s.$$.dirty&1&&l(1,t=Math.max(...o.map(([c,d])=>d)))},[o,t,i,a,n,r,f]}class Ji extends $e{constructor(e){super(),ke(this,e,Qi,Yi,be,{field:4,counts:0,bins:5})}}function Ki(s){let e,l,t,n,o,r,i,a,f,c,d,u=ye(s[4].total_count)+"",_,g,b,w,y,C,M,L,T,H,V,F,D=ye(s[4].approx_count_distinct)+"",k,P,ee,X,K,z;r=new it({props:{class:"inline"}}),C=new it({props:{class:"inline"}});let j=s[4].avg_text_length&&Rl(s),U=s[4].min_val&&s[4].max_val&&Al(s);return{c(){e=S("table"),l=S("tbody"),t=S("tr"),n=S("td"),o=S("span"),B(r.$$.fragment),i=Q(),a=S("span"),f=Z("Total count"),c=Q(),d=S("td"),_=Z(u),g=Q(),b=S("tr"),w=S("td"),y=S("span"),B(C.$$.fragment),M=Q(),L=S("span"),T=Z("Unique values"),H=Q(),V=S("td"),F=Z("~"),k=Z(D),P=Q(),j&&j.c(),ee=Q(),U&&U.c(),this.h()},l(q){e=E(q,"TABLE",{class:!0});var Y=$(e);l=E(Y,"TBODY",{});var de=$(l);t=E(de,"TR",{});var me=$(t);n=E(me,"TD",{class:!0});var re=$(n);o=E(re,"SPAN",{});var De=$(o);O(r.$$.fragment,De),De.forEach(m),i=J(re),a=E(re,"SPAN",{});var ue=$(a);f=G(ue,"Total count"),ue.forEach(m),re.forEach(m),c=J(me),d=E(me,"TD",{class:!0});var se=$(d);_=G(se,u),se.forEach(m),me.forEach(m),g=J(de),b=E(de,"TR",{});var oe=$(b);w=E(oe,"TD",{class:!0});var _e=$(w);y=E(_e,"SPAN",{});var W=$(y);O(C.$$.fragment,W),W.forEach(m),M=J(_e),L=E(_e,"SPAN",{});var te=$(L);T=G(te,"Unique values"),te.forEach(m),_e.forEach(m),H=J(oe),V=E(oe,"TD",{class:!0});var ce=$(V);F=G(ce,"~"),k=G(ce,D),ce.forEach(m),oe.forEach(m),P=J(de),j&&j.l(de),ee=J(de),U&&U.l(de),de.forEach(m),Y.forEach(m),this.h()},h(){I(n,"class","svelte-1tctrjz"),I(d,"class","svelte-1tctrjz"),I(w,"class","svelte-1tctrjz"),I(V,"class","svelte-1tctrjz"),I(e,"class","stats-table w-full svelte-1tctrjz")},m(q,Y){N(q,e,Y),p(e,l),p(l,t),p(t,n),p(n,o),R(r,o,null),p(n,i),p(n,a),p(a,f),p(t,c),p(t,d),p(d,_),p(l,g),p(l,b),p(b,w),p(w,y),R(C,y,null),p(w,M),p(w,L),p(L,T),p(b,H),p(b,V),p(V,F),p(V,k),p(l,P),j&&j.m(l,null),p(l,ee),U&&U.m(l,null),X=!0,K||(z=[Ie(Ve.call(null,o,{text:"Total number of rows where the value is defined."})),Ie(Ve.call(null,y,{text:"An approximation of the total number of unique values."}))],K=!0)},p(q,Y){(!X||Y&16)&&u!==(u=ye(q[4].total_count)+"")&&fe(_,u),(!X||Y&16)&&D!==(D=ye(q[4].approx_count_distinct)+"")&&fe(k,D),q[4].avg_text_length?j?(j.p(q,Y),Y&16&&h(j,1)):(j=Rl(q),j.c(),h(j,1),j.m(l,ee)):j&&(le(),v(j,1,1,()=>{j=null}),ne()),q[4].min_val&&q[4].max_val?U?(U.p(q,Y),Y&16&&h(U,1)):(U=Al(q),U.c(),h(U,1),U.m(l,null)):U&&(le(),v(U,1,1,()=>{U=null}),ne())},i(q){X||(h(r.$$.fragment,q),h(C.$$.fragment,q),h(j),h(U),X=!0)},o(q){v(r.$$.fragment,q),v(C.$$.fragment,q),v(j),v(U),X=!1},d(q){q&&m(e),A(r),A(C),j&&j.d(),U&&U.d(),K=!1,Qe(z)}}}function Zi(s){let e,l;return e=new je({props:{paragraph:!0,width:"50%"}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Gi(s){let e,l,t=s[2].error.message+"",n;return{c(){e=S("p"),l=Z("Error: "),n=Z(t)},l(o){e=E(o,"P",{});var r=$(e);l=G(r,"Error: "),n=G(r,t),r.forEach(m)},m(o,r){N(o,e,r),p(e,l),p(e,n)},p(o,r){r&4&&t!==(t=o[2].error.message+"")&&fe(n,t)},i:x,o:x,d(o){o&&m(e)}}}function Rl(s){let e,l,t,n,o,r,i,a,f,c=ye(s[4].avg_text_length)+"",d,u,_,g;return n=new it({props:{class:"inline"}}),{c(){e=S("tr"),l=S("td"),t=S("span"),B(n.$$.fragment),o=Q(),r=S("span"),i=Z("Average text length"),a=Q(),f=S("td"),d=Z(c),this.h()},l(b){e=E(b,"TR",{});var w=$(e);l=E(w,"TD",{class:!0});var y=$(l);t=E(y,"SPAN",{});var C=$(t);O(n.$$.fragment,C),C.forEach(m),o=J(y),r=E(y,"SPAN",{});var M=$(r);i=G(M,"Average text length"),M.forEach(m),y.forEach(m),a=J(w),f=E(w,"TD",{class:!0});var L=$(f);d=G(L,c),L.forEach(m),w.forEach(m),this.h()},h(){I(l,"class","svelte-1tctrjz"),I(f,"class","svelte-1tctrjz")},m(b,w){N(b,e,w),p(e,l),p(l,t),R(n,t,null),p(l,o),p(l,r),p(r,i),p(e,a),p(e,f),p(f,d),u=!0,_||(g=Ie(Ve.call(null,t,{text:"The average length of the text in characters."})),_=!0)},p(b,w){(!u||w&16)&&c!==(c=ye(b[4].avg_text_length)+"")&&fe(d,c)},i(b){u||(h(n.$$.fragment,b),u=!0)},o(b){v(n.$$.fragment,b),u=!1},d(b){b&&m(e),A(n),_=!1,g()}}}function Al(s){let e,l,t,n,o,r,i,a,f,c=ye(s[4].min_val)+"",d,u,_=ye(s[4].max_val)+"",g,b,w,y;return n=new it({props:{class:"inline"}}),{c(){e=S("tr"),l=S("td"),t=S("span"),B(n.$$.fragment),o=Q(),r=S("span"),i=Z("Range"),a=Q(),f=S("td"),d=Z(c),u=Z(" .. "),g=Z(_),this.h()},l(C){e=E(C,"TR",{});var M=$(e);l=E(M,"TD",{class:!0});var L=$(l);t=E(L,"SPAN",{});var T=$(t);O(n.$$.fragment,T),T.forEach(m),o=J(L),r=E(L,"SPAN",{});var H=$(r);i=G(H,"Range"),H.forEach(m),L.forEach(m),a=J(M),f=E(M,"TD",{class:!0});var V=$(f);d=G(V,c),u=G(V," .. "),g=G(V,_),V.forEach(m),M.forEach(m),this.h()},h(){I(l,"class","svelte-1tctrjz"),I(f,"class","svelte-1tctrjz")},m(C,M){N(C,e,M),p(e,l),p(l,t),R(n,t,null),p(l,o),p(l,r),p(r,i),p(e,a),p(e,f),p(f,d),p(f,u),p(f,g),b=!0,w||(y=Ie(Ve.call(null,t,{text:"The minimum and maximum value across the dataset"})),w=!0)},p(C,M){(!b||M&16)&&c!==(c=ye(C[4].min_val)+"")&&fe(d,c),(!b||M&16)&&_!==(_=ye(C[4].max_val)+"")&&fe(g,_)},i(C){b||(h(n.$$.fragment,C),b=!0)},o(C){v(n.$$.fragment,C),b=!1},d(C){C&&m(e),A(n),w=!1,y()}}}function Wi(s){let e,l,t;return l=new Ji({props:{counts:s[5],bins:s[3],field:s[0]}}),l.$on("row-click",s[13]),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(n){e=E(n,"DIV",{class:!0});var o=$(e);O(l.$$.fragment,o),o.forEach(m),this.h()},h(){I(e,"class","mt-4")},m(n,o){N(n,e,o),R(l,e,null),t=!0},p(n,o){const r={};o&32&&(r.counts=n[5]),o&8&&(r.bins=n[3]),o&1&&(r.field=n[0]),l.$set(r)},i(n){t||(h(l.$$.fragment,n),t=!0)},o(n){v(l.$$.fragment,n),t=!1},d(n){n&&m(e),A(l)}}}function Xi(s){let e,l;return e=new je({props:{paragraph:!0,width:"50%"}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function xi(s){let e,l,t=s[1].error.message+"",n;return{c(){e=S("p"),l=Z("Error: "),n=Z(t)},l(o){e=E(o,"P",{});var r=$(e);l=G(r,"Error: "),n=G(r,t),r.forEach(m)},m(o,r){N(o,e,r),p(e,l),p(e,n)},p(o,r){r&2&&t!==(t=o[1].error.message+"")&&fe(n,t)},i:x,o:x,d(o){o&&m(e)}}}function ea(s){let e,l,t,n,o,r,i;const a=[Gi,Zi,Ki],f=[];function c(g,b){return g[2].error?0:g[4]==null?1:2}l=c(s),t=f[l]=a[l](s);const d=[xi,Xi,Wi],u=[];function _(g,b){return g[1].error?0:g[5]==null?1:g[5].length>0?2:-1}return~(o=_(s))&&(r=u[o]=d[o](s)),{c(){e=S("div"),t.c(),n=Q(),r&&r.c(),this.h()},l(g){e=E(g,"DIV",{class:!0});var b=$(e);t.l(b),n=J(b),r&&r.l(b),b.forEach(m),this.h()},h(){I(e,"class","p-4")},m(g,b){N(g,e,b),f[l].m(e,null),p(e,n),~o&&u[o].m(e,null),i=!0},p(g,[b]){let w=l;l=c(g),l===w?f[l].p(g,b):(le(),v(f[w],1,1,()=>{f[w]=null}),ne(),t=f[l],t?t.p(g,b):(t=f[l]=a[l](g),t.c()),h(t,1),t.m(e,n));let y=o;o=_(g),o===y?~o&&u[o].p(g,b):(r&&(le(),v(u[y],1,1,()=>{u[y]=null}),ne()),~o?(r=u[o],r?r.p(g,b):(r=u[o]=d[o](g),r.c()),h(r,1),r.m(e,null)):r=null)},i(g){i||(h(t),h(r),i=!0)},o(g){v(t),v(r),i=!1},d(g){g&&m(e),f[l].d(),~o&&u[o].d()}}}function ta(s,e,l){let t,n,o,r,i,a=x,f=()=>(a(),a=Me(n,T=>l(1,i=T)),n),c,d=x,u=()=>(d(),d=Me(t,T=>l(2,c=T)),t),_;s.$$.on_destroy.push(()=>a()),s.$$.on_destroy.push(()=>d());let{field:g}=e;const b=Re();ge(s,b,T=>l(12,_=T));let w,y,C=null;function M(T){if(T==null)return;if(C!=null){const[V,F]=C[T.toString()];if(V!=null){const D={path:g.path,op:"greater_equal",value:V};b.addFilter(D)}if(F!=null){const D={path:g.path,op:"less",value:F};b.addFilter(D)}return}const H={path:g.path,op:"equals",value:T};b.addFilter(H)}const L=T=>M(T.detail.value);return s.$$set=T=>{"field"in T&&l(0,g=T.field)},s.$$.update=()=>{var T;if(s.$$.dirty&4097&&u(l(7,t=ur(_.namespace,_.datasetName,{leaf_path:g.path}))),s.$$.dirty&1&&l(10,w=dr(g.dtype)&&!g.categorical?"value":"count"),s.$$.dirty&1024&&l(11,y=w==="value"?"ASC":"DESC"),s.$$.dirty&7169&&f(l(6,n=mr(_.namespace,_.datasetName,{leaf_path:g.path,filters:_.query.filters,sort_by:w,sort_order:y}))),s.$$.dirty&2&&l(5,o=i.data!=null?i.data.counts:null),s.$$.dirty&4&&l(4,r=c.data!=null?c.data:null),s.$$.dirty&2)if(((T=i.data)==null?void 0:T.bins)!=null){l(3,C={});for(const[H,V,F]of Object.values(i.data.bins))l(3,C[H]=[V,F],C)}else l(3,C=null)},[g,i,c,C,r,o,n,t,b,M,w,y,_,L]}class la extends $e{constructor(e){super(),ke(this,e,ta,ea,be,{field:0})}}function Ol(s,e,l){const t=s.slice();return t[38]=e[l],t}function Hl(s,e,l){const t=s.slice();return t[41]=e[l],t}function ql(s,e,l){const t=s.slice();return t[44]=e[l],t}function Ll(s,e,l){const t=s.slice();return t[47]=e[l],t}function na(s){let e,l="{}",t;return{c(){e=S("span"),t=Z(l),this.h()},l(n){e=E(n,"SPAN",{class:!0});var o=$(e);t=G(o,l),o.forEach(m),this.h()},h(){I(e,"class","font-mono")},m(n,o){N(n,e,o),p(e,t)},p:x,i:x,o:x,d(n){n&&m(e)}}}function ra(s){let e,l,t,n;var o=lt[s[1].repeated_field.dtype];function r(i){return{props:{title:i[1].dtype}}}return o&&(l=et(o,r(s))),{c(){e=S("div"),l&&B(l.$$.fragment),t=Z("[]"),this.h()},l(i){e=E(i,"DIV",{class:!0});var a=$(e);l&&O(l.$$.fragment,a),t=G(a,"[]"),a.forEach(m),this.h()},h(){I(e,"class","flex")},m(i,a){N(i,e,a),l&&R(l,e,null),p(e,t),n=!0},p(i,a){const f={};if(a[0]&2&&(f.title=i[1].dtype),a[0]&2&&o!==(o=lt[i[1].repeated_field.dtype])){if(l){le();const c=l;v(c.$$.fragment,1,0,()=>{A(c,1)}),ne()}o?(l=et(o,r(i)),B(l.$$.fragment),h(l.$$.fragment,1),R(l,e,t)):l=null}else o&&l.$set(f)},i(i){n||(l&&h(l.$$.fragment,i),n=!0)},o(i){l&&v(l.$$.fragment,i),n=!1},d(i){i&&m(e),l&&A(l)}}}function sa(s){let e,l,t;var n=lt[s[1].dtype];function o(r){return{props:{title:r[1].dtype}}}return n&&(e=et(n,o(s))),{c(){e&&B(e.$$.fragment),l=ie()},l(r){e&&O(e.$$.fragment,r),l=ie()},m(r,i){e&&R(e,r,i),N(r,l,i),t=!0},p(r,i){const a={};if(i[0]&2&&(a.title=r[1].dtype),i[0]&2&&n!==(n=lt[r[1].dtype])){if(e){le();const f=e;v(f.$$.fragment,1,0,()=>{A(f,1)}),ne()}n?(e=et(n,o(r)),B(e.$$.fragment),h(e.$$.fragment,1),R(e,l.parentNode,l)):e=null}else n&&e.$set(a)},i(r){t||(e&&h(e.$$.fragment,r),t=!0)},o(r){e&&v(e.$$.fragment,r),t=!1},d(r){r&&m(l),e&&A(e,r)}}}function jl(s){let e,l;return e=new Nt({props:{interactive:!0,type:"green",$$slots:{default:[oa]},$$scope:{ctx:s}}}),e.$on("click",s[32]),e.$on("remove",s[33]),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n[0]&16384|n[1]&524288&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function ia(s){let e,l;return e=new Pn({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function aa(s){let e,l;return e=new zn({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function oa(s){let e,l,t,n,o,r,i,a;const f=[aa,ia],c=[];function d(u,_){return u[14]=="ASC"?0:1}return r=d(s),i=c[r]=f[r](s),{c(){e=S("div"),l=S("div"),t=Z("Sorted"),n=Q(),o=S("span"),i.c(),this.h()},l(u){e=E(u,"DIV",{class:!0});var _=$(e);l=E(_,"DIV",{class:!0});var g=$(l);t=G(g,"Sorted"),g.forEach(m),n=J(_),o=E(_,"SPAN",{});var b=$(o);i.l(b),b.forEach(m),_.forEach(m),this.h()},h(){I(l,"class","mr-1"),I(e,"class","flex flex-row")},m(u,_){N(u,e,_),p(e,l),p(l,t),p(e,n),p(e,o),c[r].m(o,null),a=!0},p(u,_){let g=r;r=d(u),r!==g&&(le(),v(c[g],1,1,()=>{c[g]=null}),ne(),i=c[r],i||(i=c[r]=f[r](u),i.c()),h(i,1),i.m(o,null))},i(u){a||(h(i),a=!0)},o(u){v(i),a=!1},d(u){u&&m(e),c[r].d()}}}function Ul(s){let e,l,t=s[7],n=[];for(let r=0;rv(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;r{n&&(t||(t=dt(e,ht,{},!0)),t.run(1))}),n=!0)},o(o){v(l.$$.fragment,o),o&&(t||(t=dt(e,ht,{},!1)),t.run(0)),n=!1},d(o){o&&m(e),A(l),o&&t&&t.end()}}}function Wl(s){let e,l,t=s[18],n=[];for(let r=0;rv(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;rv(Y[W],1,1,()=>{Y[W]=null});let me=s[16],re=[];for(let W=0;Wv(re[W],1,1,()=>{re[W]=null});let ue=s[4]&&s[21]&&Kl(s),se=s[10]&&Zl(s);T=new Ui({props:{field:s[1],schema:s[0]}});let oe=s[20]&&Gl(s),_e=s[18].length&&Wl(s);return{c(){e=S("div"),l=S("div"),t=S("div"),B(n.$$.fragment),o=Q(),r=S("div"),a.c(),c=Q(),d=S("button"),u=Z(s[19]),g=Q(),j&&j.c(),b=Q(),U&&U.c(),w=Q();for(let W=0;W{K[He]=null}),ne(),a=K[i],a?a.p(W,te):(a=K[i]=X[i](W),a.c()),h(a,1),a.m(r,null)),f&&Le(f.update)&&te[0]&2048&&f.update.call(null,{text:W[11]}),(!k||te[0]&32)&&Se(r,"bg-blue-200",W[5]),(!k||te[0]&524288)&&fe(u,W[19]),(!k||te[0]&1024&&_!==(_=!W[10]))&&(d.disabled=_),(!k||te[0]&1024)&&Se(d,"cursor-default",!W[10]),W[15]?j?(j.p(W,te),te[0]&32768&&h(j,1)):(j=jl(W),j.c(),h(j,1),j.m(l,b)):j&&(le(),v(j,1,1,()=>{j=null}),ne()),W[13]?U?(U.p(W,te),te[0]&8192&&h(U,1)):(U=Ul(W),U.c(),h(U,1),U.m(l,w)):U&&(le(),v(U,1,1,()=>{U=null}),ne()),te[0]&4096){q=W[12];let he;for(he=0;he{ue=null}),ne()),W[10]?se?(se.p(W,te),te[0]&1024&&h(se,1)):(se=Zl(W),se.c(),h(se,1),se.m(l,L)):se&&(le(),v(se,1,1,()=>{se=null}),ne());const Ke={};te[0]&2&&(Ke.field=W[1]),te[0]&1&&(Ke.schema=W[0]),T.$set(Ke),(!k||te[0]&32)&&Se(l,"bg-blue-50",W[5]),(!k||te[0]&16)&&Se(l,"bg-emerald-100",W[4]),(!k||te[0]&32)&&Se(l,"hover:bg-blue-100",W[5]),W[20]?oe?(oe.p(W,te),te[0]&1048576&&h(oe,1)):(oe=Gl(W),oe.c(),h(oe,1),oe.m(e,V)):oe&&(le(),v(oe,1,1,()=>{oe=null}),ne()),W[18].length?_e?(_e.p(W,te),te[0]&262144&&h(_e,1)):(_e=Wl(W),_e.c(),h(_e,1),_e.m(F,null)):_e&&(le(),v(_e,1,1,()=>{_e=null}),ne()),(!k||te[0]&32)&&Se(e,"border-b",!W[5])},i(W){if(!k){h(n.$$.fragment,W),h(a),h(j),h(U);for(let te=0;te{k&&(D||(D=dt(F,ht,{},!0)),D.run(1))}),k=!0}},o(W){v(n.$$.fragment,W),v(a),v(j),v(U),Y=Y.filter(Boolean);for(let te=0;tel(22,D=se));const z=Re();ge(s,z,se=>l(9,V=se));const j=Je();ge(s,j,se=>l(29,F=se));function U(se){return se!=null&&se.repeated_field?U(se.repeated_field):se!=null&&se.fields?[...Object.values(se.fields).filter(oe=>oe.path.at(-1)!==hr)].filter(oe=>{var _e,W,te,ce;return!(oe.dtype==="embedding"||oe.signal!=null&&rt(oe).some(He=>He.dtype==="embedding")||((_e=oe.signal)==null?void 0:_e.signal_name)==="sentences"||((W=oe.signal)==null?void 0:W.signal_name)==="substring_search"||((te=oe.signal)==null?void 0:te.signal_name)==="semantic_similarity"||((ce=oe.signal)==null?void 0:ce.signal_name)==="concept_labels")}):[]}const q=()=>{d?z.removeSelectedColumn(r):z.addSelectedColumn(r)},Y=()=>{H&&(i?z.removeExpandedColumn(r):z.addExpandedColumn(r))},de=()=>g==="ASC"?ut(z,V.query.sort_order="DESC",V):ut(z,V.query.sort_order="ASC",V),me=()=>z.removeSortBy(r),re=()=>P.signal&&y&&ee&&D.mutate([V.namespace,V.datasetName,{leaf_path:ee.path,signal:P.signal}]),De=()=>{var se;return P.signal&&y&&Ge({command:We.EditPreviewConcept,namespace:V.namespace,datasetName:V.datasetName,path:ee==null?void 0:ee.path,signalName:(se=P.signal)==null?void 0:se.signal_name,value:P.signal})},ue=()=>{i?z.removeExpandedColumn(r):z.addExpandedColumn(r)};return s.$$set=se=>{"schema"in se&&l(0,k=se.schema),"field"in se&&l(1,P=se.field),"sourceField"in se&&l(2,ee=se.sourceField),"indent"in se&&l(3,X=se.indent)},s.$$.update=()=>{var se,oe,_e,W;s.$$.dirty[0]&3&&l(5,t=tt(P,k)),s.$$.dirty[0]&2&&l(21,n=Dt(P)),s.$$.dirty[0]&32&&l(8,o=!t),s.$$.dirty[0]&2&&l(6,r=P.path),s.$$.dirty[0]&576&&l(20,i=V.expandedColumns[Ee(r)]||!1),s.$$.dirty[0]&64&&l(28,a=r.at(-1)===wt),s.$$.dirty[0]&268435520&&l(19,f=a?r.at(-2):r.at(-1)),s.$$.dirty[0]&2&&l(18,c=U(P)),s.$$.dirty[0]&536870976&&l(17,d=(se=F.visibleFields)==null?void 0:se.some(te=>Ze(te.path,r))),s.$$.dirty[0]&258&&l(16,u=o?rt(P).filter(te=>te.signal!=null&&rt(te).some(ce=>ce.dtype==="embedding")):[]),s.$$.dirty[0]&576&&l(15,_=(oe=V.query.sort_by)==null?void 0:oe.some(te=>Ze(te,r))),s.$$.dirty[0]&512&&l(14,g=V.query.sort_order),s.$$.dirty[0]&576&&l(7,b=((_e=V.query.filters)==null?void 0:_e.filter(te=>Ze(te.path,r)))||[]),s.$$.dirty[0]&128&&l(13,w=b.length>0),s.$$.dirty[0]&536870976&&l(4,y=Nn(((W=F.selectRowsSchema)==null?void 0:W.data)||null,r)),s.$$.dirty[0]&576&&l(12,C=It(V,r)),s.$$.dirty[0]&32&&l(26,M=t?". Generated by a signal":""),s.$$.dirty[0]&2&&l(27,L=P.dtype??(P.repeated_field&&P.repeated_field.dtype?`${P.repeated_field.dtype}[]`:"object")),s.$$.dirty[0]&201326592&&l(11,T=`${L}${M}`),s.$$.dirty[0]&18&&l(10,H=mt(P)&&!y)},[k,P,ee,X,y,t,r,b,o,V,H,T,C,w,g,_,u,d,c,f,i,n,D,K,z,j,M,L,a,F,q,Y,de,me,re,De,ue]}class An extends $e{constructor(e){super(),ke(this,e,ca,fa,be,{schema:0,field:1,sourceField:2,indent:3},null,[-1,-1])}}function xl(s,e,l){const t=s.slice();return t[3]=e[l],t}function ua(s){let e,l,t,n;return e=new Mt({props:{label:"Schema",class:"w-1/3"}}),t=new Mt({props:{label:"Query",class:"w-1/3"}}),{c(){B(e.$$.fragment),l=Q(),B(t.$$.fragment)},l(o){O(e.$$.fragment,o),l=J(o),O(t.$$.fragment,o)},m(o,r){R(e,o,r),N(o,l,r),R(t,o,r),n=!0},p:x,i(o){n||(h(e.$$.fragment,o),h(t.$$.fragment,o),n=!0)},o(o){v(e.$$.fragment,o),v(t.$$.fragment,o),n=!1},d(o){A(e,o),o&&m(l),A(t,o)}}}function da(s){let e=[],l=new Map,t,n,o=Object.keys(s[0].data.schema.fields);const r=i=>i[3];for(let i=0;i{r[c]=null}),ne()),~e?(l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),h(l,1),l.m(t.parentNode,t)):l=null)},i(a){n||(h(l),n=!0)},o(a){v(l),n=!1},d(a){~e&&r[e].d(a),a&&m(t)}}}function _a(s){let e,l;return e=new Oi({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function ga(s){let e,l,t,n,o;return l=new zt({props:{$$slots:{default:[ha]},$$scope:{ctx:s}}}),n=new zt({props:{$$slots:{default:[_a]},$$scope:{ctx:s}}}),{c(){e=S("div"),B(l.$$.fragment),t=Q(),B(n.$$.fragment),this.h()},l(r){e=E(r,"DIV",{class:!0,slot:!0});var i=$(e);O(l.$$.fragment,i),t=J(i),O(n.$$.fragment,i),i.forEach(m),this.h()},h(){I(e,"class","h-full overflow-y-auto"),I(e,"slot","content")},m(r,i){N(r,e,i),R(l,e,null),p(e,t),R(n,e,null),o=!0},p(r,i){const a={};i&65&&(a.$$scope={dirty:i,ctx:r}),l.$set(a);const f={};i&64&&(f.$$scope={dirty:i,ctx:r}),n.$set(f)},i(r){o||(h(l.$$.fragment,r),h(n.$$.fragment,r),o=!0)},o(r){v(l.$$.fragment,r),v(n.$$.fragment,r),o=!1},d(r){r&&m(e),A(l),A(n)}}}function pa(s){let e,l,t;return l=new ls({props:{class:"overflow-hidden border-b border-gray-200",$$slots:{content:[ga],default:[ua]},$$scope:{ctx:s}}}),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(n){e=E(n,"DIV",{class:!0});var o=$(e);O(l.$$.fragment,o),o.forEach(m),this.h()},h(){I(e,"class","schema flex h-full flex-col pt-4")},m(n,o){N(n,e,o),R(l,e,null),t=!0},p(n,[o]){const r={};o&65&&(r.$$scope={dirty:o,ctx:n}),l.$set(r)},i(n){t||(h(l.$$.fragment,n),t=!0)},o(n){v(l.$$.fragment,n),t=!1},d(n){n&&m(e),A(l)}}}function ba(s,e,l){let t,n;const o=Je();return ge(s,o,r=>l(2,n=r)),s.$$.update=()=>{s.$$.dirty&4&&l(0,t=n.selectRowsSchema)},[t,o,n]}class va extends $e{constructor(e){super(),ke(this,e,ba,pa,be,{})}}function tn(s,e,l){const t=s.slice();return t[5]=e[l],t}function wa(s){let e,l="{}",t;return{c(){e=S("span"),t=Z(l),this.h()},l(n){e=E(n,"SPAN",{class:!0});var o=$(e);t=G(o,l),o.forEach(m),this.h()},h(){I(e,"class","font-mono")},m(n,o){N(n,e,o),p(e,t)},p:x,i:x,o:x,d(n){n&&m(e)}}}function $a(s){let e,l,t;var n=lt[s[5].dtype];function o(r){return{props:{title:r[5].dtype}}}return n&&(e=et(n,o(s))),{c(){e&&B(e.$$.fragment),l=ie()},l(r){e&&O(e.$$.fragment,r),l=ie()},m(r,i){e&&R(e,r,i),N(r,l,i),t=!0},p(r,i){const a={};if(i&2&&(a.title=r[5].dtype),i&2&&n!==(n=lt[r[5].dtype])){if(e){le();const f=e;v(f.$$.fragment,1,0,()=>{A(f,1)}),ne()}n?(e=et(n,o(r)),B(e.$$.fragment),h(e.$$.fragment,1),R(e,l.parentNode,l)):e=null}else n&&e.$set(a)},i(r){t||(e&&h(e.$$.fragment,r),t=!0)},o(r){e&&v(e.$$.fragment,r),t=!1},d(r){r&&m(l),e&&A(e,r)}}}function ln(s){let e;return{c(){e=Z("[]")},l(l){e=G(l,"[]")},m(l,t){N(l,e,t)},d(l){l&&m(e)}}}function nn(s){let e,l,t,n,o,r,i,a,f,c=s[5].path.indexOf(wt)>=0,d,u,_=Ee(s[5].path)+"",g,b,w;function y(...V){return s[3](s[5],...V)}function C(...V){return s[4](s[5],...V)}t=new kn({props:{labelText:"Download",hideLabel:!0,checked:s[0].find(y)!=null}}),t.$on("change",C);const M=[$a,wa],L=[];function T(V,F){return V[5].dtype?0:1}i=T(s),a=L[i]=M[i](s);let H=c&&ln();return{c(){e=S("div"),l=S("div"),B(t.$$.fragment),n=Q(),o=S("div"),r=S("div"),a.c(),f=Q(),H&&H.c(),d=Q(),u=S("div"),g=Z(_),b=Q(),this.h()},l(V){e=E(V,"DIV",{class:!0});var F=$(e);l=E(F,"DIV",{class:!0});var D=$(l);O(t.$$.fragment,D),D.forEach(m),n=J(F),o=E(F,"DIV",{class:!0});var k=$(o);r=E(k,"DIV",{class:!0});var P=$(r);a.l(P),f=J(P),H&&H.l(P),P.forEach(m),k.forEach(m),d=J(F),u=E(F,"DIV",{class:!0});var ee=$(u);g=G(ee,_),ee.forEach(m),b=J(F),F.forEach(m),this.h()},h(){I(l,"class","mr-2"),I(r,"class","inline-flex items-center rounded-md bg-blue-200 p-0.5"),I(o,"class","flex w-10"),I(u,"class","flex-grow"),I(e,"class","flex items-center")},m(V,F){N(V,e,F),p(e,l),R(t,l,null),p(e,n),p(e,o),p(o,r),L[i].m(r,null),p(r,f),H&&H.m(r,null),p(e,d),p(e,u),p(u,g),p(e,b),w=!0},p(V,F){s=V;const D={};F&3&&(D.checked=s[0].find(y)!=null),t.$set(D);let k=i;i=T(s),i===k?L[i].p(s,F):(le(),v(L[k],1,1,()=>{L[k]=null}),ne(),a=L[i],a?a.p(s,F):(a=L[i]=M[i](s),a.c()),h(a,1),a.m(r,f)),F&2&&(c=s[5].path.indexOf(wt)>=0),c?H||(H=ln(),H.c(),H.m(r,null)):H&&(H.d(1),H=null),(!w||F&2)&&_!==(_=Ee(s[5].path)+"")&&fe(g,_)},i(V){w||(h(t.$$.fragment,V),h(a),w=!0)},o(V){v(t.$$.fragment,V),v(a),w=!1},d(V){V&&m(e),A(t),L[i].d(),H&&H.d()}}}function ka(s){let e,l,t=s[1],n=[];for(let r=0;rv(n[r],1,1,()=>{n[r]=null});return{c(){for(let r=0;rd!==a))}const r=(a,f)=>Ze(f.path,a.path),i=(a,f)=>o(a,f);return s.$$set=a=>{"fields"in a&&l(1,t=a.fields),"checkedFields"in a&&l(0,n=a.checkedFields)},[n,t,o,r,i]}class bt extends $e{constructor(e){super(),ke(this,e,Sa,ka,be,{fields:1,checkedFields:0})}}function rn(s,e,l){const t=s.slice();return t[29]=e[l],t}function Ea(s){let e,l,t,n,o,r,i,a,f,c,d,u,_,g,b,w,y,C,M,L,T,H,V,F,D,k,P,ee;function X(z){s[23](z)}let K={invalid:s[8]!=s[9]};return s[8]!==void 0&&(K.value=s[8]),M=new vr({props:K}),Be.push(()=>Ue(M,"value",X)),F=new Ur({}),{c(){e=S("div"),l=S("section"),t=S("div"),n=Z("Delete this dataset"),o=Q(),r=S("div"),i=S("p"),a=Z("This action cannot be undone."),f=Q(),c=S("p"),d=Z(`This will permanently delete the + `),u=S("span"),_=Z(s[9]),g=Z(` dataset and all its files. Please type + `),b=S("span"),w=Z(s[9]),y=Z(" to confirm."),C=Q(),B(M.$$.fragment),T=Q(),H=S("button"),V=Z(`I understand, delete this dataset + `),B(F.$$.fragment),this.h()},l(z){e=E(z,"DIV",{class:!0});var j=$(e);l=E(j,"SECTION",{class:!0});var U=$(l);t=E(U,"DIV",{class:!0});var q=$(t);n=G(q,"Delete this dataset"),q.forEach(m),o=J(U),r=E(U,"DIV",{class:!0});var Y=$(r);i=E(Y,"P",{class:!0});var de=$(i);a=G(de,"This action cannot be undone."),de.forEach(m),f=J(Y),c=E(Y,"P",{});var me=$(c);d=G(me,`This will permanently delete the + `),u=E(me,"SPAN",{class:!0});var re=$(u);_=G(re,s[9]),re.forEach(m),g=G(me,` dataset and all its files. Please type + `),b=E(me,"SPAN",{class:!0});var De=$(b);w=G(De,s[9]),De.forEach(m),y=G(me," to confirm."),me.forEach(m),Y.forEach(m),C=J(U),O(M.$$.fragment,U),T=J(U),H=E(U,"BUTTON",{class:!0});var ue=$(H);V=G(ue,`I understand, delete this dataset + `),O(F.$$.fragment,ue),ue.forEach(m),U.forEach(m),j.forEach(m),this.h()},h(){I(t,"class","text-lg text-gray-700"),I(i,"class","mb-2"),I(u,"class","font-bold"),I(b,"class","font-bold"),I(r,"class","mb-4 text-sm text-gray-500"),I(H,"class","flex cursor-pointer flex-row justify-between p-4 text-left hover:bg-gray-200"),H.disabled=D=s[8]!=s[9],Se(H,"cursor-not-allowed",s[8]!=s[9]),I(l,"class","flex flex-col gap-y-1"),I(e,"class","flex flex-col gap-y-6")},m(z,j){N(z,e,j),p(e,l),p(l,t),p(t,n),p(l,o),p(l,r),p(r,i),p(i,a),p(r,f),p(r,c),p(c,d),p(c,u),p(u,_),p(c,g),p(c,b),p(b,w),p(c,y),p(l,C),R(M,l,null),p(l,T),p(l,H),p(H,V),R(F,H,null),k=!0,P||(ee=Pe(H,"click",s[24]),P=!0)},p(z,j){(!k||j[0]&512)&&fe(_,z[9]),(!k||j[0]&512)&&fe(w,z[9]);const U={};j[0]&768&&(U.invalid=z[8]!=z[9]),!L&&j[0]&256&&(L=!0,U.value=z[8],Ye(()=>L=!1)),M.$set(U),(!k||j[0]&768&&D!==(D=z[8]!=z[9]))&&(H.disabled=D),(!k||j[0]&768)&&Se(H,"cursor-not-allowed",z[8]!=z[9])},i(z){k||(h(M.$$.fragment,z),h(F.$$.fragment,z),k=!0)},o(z){v(M.$$.fragment,z),v(F.$$.fragment,z),k=!1},d(z){z&&m(e),A(M),A(F),P=!1,ee()}}}function ya(s){let e,l,t,n;const o=[Ia,Da],r=[];function i(a,f){return a[6].isFetching?0:1}return e=i(s),l=r[e]=o[e](s),{c(){l.c(),t=ie()},l(a){l.l(a),t=ie()},m(a,f){r[e].m(a,f),N(a,t,f),n=!0},p(a,f){let c=e;e=i(a),e===c?r[e].p(a,f):(le(),v(r[c],1,1,()=>{r[c]=null}),ne(),l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),h(l,1),l.m(t.parentNode,t))},i(a){n||(h(l),n=!0)},o(a){v(l),n=!1},d(a){r[e].d(a),a&&m(t)}}}function Da(s){let e,l,t,n,o,r,i,a,f,c,d,u,_,g,b,w,y,C,M,L,T,H,V,F,D,k=s[3]!=null&&sn(s);const P=[Na,Va],ee=[];function X(z,j){return z[11].isFetching?0:1}C=X(s),M=ee[C]=P[C](s);let K=s[3]!=null&&s[4]!=null&&on(s);return{c(){e=S("div"),l=S("section"),t=S("div"),n=Z("Media fields"),o=Q(),r=S("div"),i=Z("These fields will be presented differently from the rest of the metadata fields."),a=Q(),k&&k.c(),f=Q(),c=S("section"),d=S("div"),u=Z("Preferred embedding"),_=Q(),g=S("div"),b=Z("This embedding will be used by default when indexing and querying the data."),w=Q(),y=S("div"),M.c(),L=Q(),T=S("section"),H=S("div"),V=Z("Render as markdown"),F=Q(),K&&K.c(),this.h()},l(z){e=E(z,"DIV",{class:!0});var j=$(e);l=E(j,"SECTION",{class:!0});var U=$(l);t=E(U,"DIV",{class:!0});var q=$(t);n=G(q,"Media fields"),q.forEach(m),o=J(U),r=E(U,"DIV",{class:!0});var Y=$(r);i=G(Y,"These fields will be presented differently from the rest of the metadata fields."),Y.forEach(m),a=J(U),k&&k.l(U),U.forEach(m),f=J(j),c=E(j,"SECTION",{class:!0});var de=$(c);d=E(de,"DIV",{class:!0});var me=$(d);u=G(me,"Preferred embedding"),me.forEach(m),_=J(de),g=E(de,"DIV",{class:!0});var re=$(g);b=G(re,"This embedding will be used by default when indexing and querying the data."),re.forEach(m),w=J(de),y=E(de,"DIV",{class:!0});var De=$(y);M.l(De),De.forEach(m),de.forEach(m),L=J(j),T=E(j,"SECTION",{class:!0});var ue=$(T);H=E(ue,"DIV",{class:!0});var se=$(H);V=G(se,"Render as markdown"),se.forEach(m),F=J(ue),K&&K.l(ue),ue.forEach(m),j.forEach(m),this.h()},h(){I(t,"class","text-lg text-gray-700"),I(r,"class","text-sm text-gray-500"),I(l,"class","flex flex-col gap-y-1"),I(d,"class","text-lg text-gray-700"),I(g,"class","text-sm text-gray-500"),I(y,"class","w-60"),I(c,"class","flex flex-col gap-y-1"),I(H,"class","text-lg text-gray-700"),I(T,"class","flex flex-col gap-y-1"),I(e,"class","flex flex-col gap-y-6")},m(z,j){N(z,e,j),p(e,l),p(l,t),p(t,n),p(l,o),p(l,r),p(r,i),p(l,a),k&&k.m(l,null),p(e,f),p(e,c),p(c,d),p(d,u),p(c,_),p(c,g),p(g,b),p(c,w),p(c,y),ee[C].m(y,null),p(e,L),p(e,T),p(T,H),p(H,V),p(T,F),K&&K.m(T,null),D=!0},p(z,j){z[3]!=null?k?(k.p(z,j),j[0]&8&&h(k,1)):(k=sn(z),k.c(),h(k,1),k.m(l,null)):k&&(le(),v(k,1,1,()=>{k=null}),ne());let U=C;C=X(z),C===U?ee[C].p(z,j):(le(),v(ee[U],1,1,()=>{ee[U]=null}),ne(),M=ee[C],M?M.p(z,j):(M=ee[C]=P[C](z),M.c()),h(M,1),M.m(y,null)),z[3]!=null&&z[4]!=null?K?(K.p(z,j),j[0]&24&&h(K,1)):(K=on(z),K.c(),h(K,1),K.m(T,null)):K&&(le(),v(K,1,1,()=>{K=null}),ne())},i(z){D||(h(k),h(M),h(K),D=!0)},o(z){v(k),v(M),v(K),D=!1},d(z){z&&m(e),k&&k.d(),ee[C].d(),K&&K.d()}}}function Ia(s){let e,l;return e=new je({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function sn(s){let e,l,t;function n(r){s[21](r)}let o={fields:s[5]};return s[3]!==void 0&&(o.checkedFields=s[3]),e=new bt({props:o}),Be.push(()=>Ue(e,"checkedFields",n)),{c(){B(e.$$.fragment)},l(r){O(e.$$.fragment,r)},m(r,i){R(e,r,i),t=!0},p(r,i){const a={};i[0]&32&&(a.fields=r[5]),!l&&i[0]&8&&(l=!0,a.checkedFields=r[3],Ye(()=>l=!1)),e.$set(a)},i(r){t||(h(e.$$.fragment,r),t=!0)},o(r){v(e.$$.fragment,r),t=!1},d(r){A(e,r)}}}function Va(s){var t;let e,l;return e=new pt({props:{selected:(t=s[6].data)==null?void 0:t.preferred_embedding,$$slots:{default:[Ta]},$$scope:{ctx:s}}}),e.$on("change",s[16]),{c(){B(e.$$.fragment)},l(n){O(e.$$.fragment,n)},m(n,o){R(e,n,o),l=!0},p(n,o){var i;const r={};o[0]&64&&(r.selected=(i=n[6].data)==null?void 0:i.preferred_embedding),o[0]&2048|o[1]&2&&(r.$$scope={dirty:o,ctx:n}),e.$set(r)},i(n){l||(h(e.$$.fragment,n),l=!0)},o(n){v(e.$$.fragment,n),l=!1},d(n){A(e,n)}}}function Na(s){let e,l;return e=new wr({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function an(s){let e,l;return e=new at({props:{value:s[29].name}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n[0]&2048&&(o.value=t[29].name),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Ta(s){let e,l,t,n;e=new at({props:{value:void 0,text:"None"}});let o=s[11].data||[],r=[];for(let a=0;av(r[a],1,1,()=>{r[a]=null});return{c(){B(e.$$.fragment),l=Q();for(let a=0;aUe(e,"checkedFields",n)),{c(){B(e.$$.fragment)},l(r){O(e.$$.fragment,r)},m(r,i){R(e,r,i),t=!0},p(r,i){const a={};i[0]&8&&(a.fields=r[3]),!l&&i[0]&16&&(l=!0,a.checkedFields=r[4],Ye(()=>l=!1)),e.$set(a)},i(r){t||(h(e.$$.fragment,r),t=!0)},o(r){v(e.$$.fragment,r),t=!1},d(r){A(e,r)}}}function Ca(s){let e,l,t,n,o,r,i,a;t=new br({props:{items:[{title:"Fields",value:"fields"},{title:"Administration",value:"administration"}],item:s[7]}}),t.$on("select",s[20]);const f=[ya,Ea],c=[];function d(u,_){return u[7]==="fields"?0:u[7]==="administration"?1:-1}return~(r=d(s))&&(i=c[r]=f[r](s)),{c(){e=S("div"),l=S("div"),B(t.$$.fragment),n=Q(),o=S("div"),i&&i.c(),this.h()},l(u){e=E(u,"DIV",{class:!0});var _=$(e);l=E(_,"DIV",{class:!0});var g=$(l);O(t.$$.fragment,g),g.forEach(m),n=J(_),o=E(_,"DIV",{class:!0});var b=$(o);i&&i.l(b),b.forEach(m),_.forEach(m),this.h()},h(){I(l,"class","-ml-4 mr-4 w-96 grow-0"),I(o,"class","flex w-full flex-col gap-y-6 rounded border border-gray-300 bg-white p-4"),I(e,"class","flex flex-row")},m(u,_){N(u,e,_),p(e,l),R(t,l,null),p(e,n),p(e,o),~r&&c[r].m(o,null),a=!0},p(u,_){const g={};_[0]&128&&(g.item=u[7]),t.$set(g);let b=r;r=d(u),r===b?~r&&c[r].p(u,_):(i&&(le(),v(c[b],1,1,()=>{c[b]=null}),ne()),~r?(i=c[r],i?i.p(u,_):(i=c[r]=f[r](u),i.c()),h(i,1),i.m(o,null)):i=null)},i(u){a||(h(t.$$.fragment,u),h(i),a=!0)},o(u){v(t.$$.fragment,u),v(i),a=!1},d(u){u&&m(e),A(t),~r&&c[r].d()}}}function Fa(s){let e,l,t,n,o,r;return e=new En({props:{label:"Changes",title:"Dataset settings"}}),t=new yn({props:{hasForm:!0,$$slots:{default:[Ca]},$$scope:{ctx:s}}}),o=new Dn({props:{primaryButtonText:"Save",secondaryButtonText:"Cancel"}}),o.$on("click:button--secondary",close),{c(){B(e.$$.fragment),l=Q(),B(t.$$.fragment),n=Q(),B(o.$$.fragment)},l(i){O(e.$$.fragment,i),l=J(i),O(t.$$.fragment,i),n=J(i),O(o.$$.fragment,i)},m(i,a){R(e,i,a),N(i,l,a),R(t,i,a),N(i,n,a),R(o,i,a),r=!0},p(i,a){const f={};a[0]&7166|a[1]&2&&(f.$$scope={dirty:a,ctx:i}),t.$set(f)},i(i){r||(h(e.$$.fragment,i),h(t.$$.fragment,i),h(o.$$.fragment,i),r=!0)},o(i){v(e.$$.fragment,i),v(t.$$.fragment,i),v(o.$$.fragment,i),r=!1},d(i){A(e,i),i&&m(l),A(t,i),i&&m(n),A(o,i)}}}function Ma(s){let e,l;return e=new Sn({props:{open:s[0],$$slots:{default:[Fa]},$$scope:{ctx:s}}}),e.$on("submit",s[17]),e.$on("close",s[25]),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n[0]&1&&(o.open=t[0]),n[0]&7166|n[1]&2&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function za(s,e,l){let t,n,o,r,i,a=x,f=()=>(a(),a=Me(t,q=>l(6,i=q)),t),c,d,u;s.$$.on_destroy.push(()=>a());let{namespace:_}=e,{name:g}=e,{open:b=!1}=e,{schema:w}=e;const y=Fn();ge(s,y,q=>l(28,c=q));const C=$n();ge(s,C,q=>l(11,d=q));const M=_r();ge(s,M,q=>l(27,r=q));let L="fields",T=null,H=null,V=c.embedding;function F(q){V=q.target.value,V===""&&(V=void 0)}function D(){if(T==null)return;const q={ui:{media_paths:T.map(Y=>Y.path),markdown_paths:H==null?void 0:H.map(Y=>Y.path)},preferred_embedding:V};r.mutate([_,g,q],{onSuccess:()=>{l(0,b=!1)}})}let k="";const P=gr();ge(s,P,q=>l(12,u=q));const ee=q=>l(7,L=q.detail);function X(q){T=q,l(3,T),l(6,i),l(5,o),l(19,w)}function K(q){H=q,l(4,H),l(6,i),l(5,o),l(19,w)}function z(q){k=q,l(8,k)}const j=()=>u.mutate([_,g],{onSuccess:()=>pn("/")}),U=()=>l(0,b=!1);return s.$$set=q=>{"namespace"in q&&l(1,_=q.namespace),"name"in q&&l(2,g=q.name),"open"in q&&l(0,b=q.open),"schema"in q&&l(19,w=q.schema)},s.$$.update=()=>{var q,Y,de,me;if(s.$$.dirty[0]&6&&f(l(10,t=ot(_,g))),s.$$.dirty[0]&6&&l(9,n=Kr(_,g)),s.$$.dirty[0]&524288&&l(5,o=St(w).filter(re=>re.dtype==="string"&&!Ze(re.path,[pr])&&!tt(re,w))),s.$$.dirty[0]&104&&T==null){const re=(Y=(q=i.data)==null?void 0:q.ui)==null?void 0:Y.media_paths;re!=null&&l(3,T=o.filter(De=>re.some(ue=>Ze(De.path,ue))))}if(s.$$.dirty[0]&112&&H==null){const re=(me=(de=i.data)==null?void 0:de.ui)==null?void 0:me.markdown_paths;re!=null&&l(4,H=o.filter(De=>re.some(ue=>Ze(De.path,ue))))}},[b,_,g,T,H,o,i,L,k,n,t,d,u,y,C,M,F,D,P,w,ee,X,K,z,j,U]}class Pa extends $e{constructor(e){super(),ke(this,e,za,Ma,be,{namespace:1,name:2,open:0,schema:19},null,[-1,-1])}}function Ba(s){let e,l,t;function n(r){s[13](r)}let o={fields:s[6]};return s[1]!==void 0&&(o.checkedFields=s[1]),e=new bt({props:o}),Be.push(()=>Ue(e,"checkedFields",n)),{c(){B(e.$$.fragment)},l(r){O(e.$$.fragment,r)},m(r,i){R(e,r,i),t=!0},p(r,i){const a={};i&64&&(a.fields=r[6]),!l&&i&2&&(l=!0,a.checkedFields=r[1],Ye(()=>l=!1)),e.$set(a)},i(r){t||(h(e.$$.fragment,r),t=!0)},o(r){v(e.$$.fragment,r),t=!1},d(r){A(e,r)}}}function Ra(s){let e,l;return e=new je({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function fn(s){let e,l,t,n,o,r,i;const a=[Oa,Aa],f=[];function c(d,u){return d[5]==null?0:1}return o=c(s),r=f[o]=a[o](s),{c(){e=S("section"),l=S("h4"),t=Z("Select enriched fields"),n=Q(),r.c(),this.h()},l(d){e=E(d,"SECTION",{});var u=$(e);l=E(u,"H4",{class:!0});var _=$(l);t=G(_,"Select enriched fields"),_.forEach(m),n=J(u),r.l(u),u.forEach(m),this.h()},h(){I(l,"class","svelte-1ge817j")},m(d,u){N(d,e,u),p(e,l),p(l,t),p(e,n),f[o].m(e,null),i=!0},p(d,u){let _=o;o=c(d),o===_?f[o].p(d,u):(le(),v(f[_],1,1,()=>{f[_]=null}),ne(),r=f[o],r?r.p(d,u):(r=f[o]=a[o](d),r.c()),h(r,1),r.m(e,null))},i(d){i||(h(r),i=!0)},o(d){v(r),i=!1},d(d){d&&m(e),f[o].d()}}}function Aa(s){let e,l,t;function n(r){s[14](r)}let o={fields:s[5]};return s[2]!==void 0&&(o.checkedFields=s[2]),e=new bt({props:o}),Be.push(()=>Ue(e,"checkedFields",n)),{c(){B(e.$$.fragment)},l(r){O(e.$$.fragment,r)},m(r,i){R(e,r,i),t=!0},p(r,i){const a={};i&32&&(a.fields=r[5]),!l&&i&4&&(l=!0,a.checkedFields=r[2],Ye(()=>l=!1)),e.$set(a)},i(r){t||(h(e.$$.fragment,r),t=!0)},o(r){v(e.$$.fragment,r),t=!1},d(r){A(e,r)}}}function Oa(s){let e,l;return e=new je({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function cn(s){let e,l;return{c(){e=S("p"),l=Z("No fields selected. Please select at least one field to download."),this.h()},l(t){e=E(t,"P",{class:!0});var n=$(e);l=G(n,"No fields selected. Please select at least one field to download."),n.forEach(m),this.h()},h(){I(e,"class","text-gray-600")},m(t,n){N(t,e,n),p(e,l)},d(t){t&&m(e)}}}function Ha(s){let e,l;return e=new Cn({props:{value:JSON.stringify(s[7].data,null,2),readonly:!0,rows:30,placeholder:"3 rows of data for previewing the response",class:"mb-2 font-mono"}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n&128&&(o.value=JSON.stringify(t[7].data,null,2)),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function qa(s){let e,l;return e=new je({props:{paragraph:!0}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function La(s){let e,l,t,n,o,r,i,a,f,c,d,u,_,g,b,w,y;const C=[Ra,Ba],M=[];function L(k,P){return k[6]==null?0:1}o=L(s),r=M[o]=C[o](s);let T=(s[5]==null||s[5].length>0)&&fn(s),H=s[3].length===0&&cn();const V=[qa,Ha],F=[];function D(k,P){return k[7]&&k[7].isFetching?0:k[4]&&k[7]?1:-1}return~(b=D(s))&&(w=F[b]=V[b](s)),{c(){e=S("section"),l=S("h4"),t=Z("Select source fields"),n=Q(),r.c(),i=Q(),T&&T.c(),a=Q(),f=S("section"),c=S("h4"),d=Z("Download preview"),u=Q(),H&&H.c(),_=Q(),g=S("div"),w&&w.c(),this.h()},l(k){e=E(k,"SECTION",{});var P=$(e);l=E(P,"H4",{class:!0});var ee=$(l);t=G(ee,"Select source fields"),ee.forEach(m),n=J(P),r.l(P),P.forEach(m),i=J(k),T&&T.l(k),a=J(k),f=E(k,"SECTION",{});var X=$(f);c=E(X,"H4",{class:!0});var K=$(c);d=G(K,"Download preview"),K.forEach(m),u=J(X),H&&H.l(X),_=J(X),g=E(X,"DIV",{class:!0});var z=$(g);w&&w.l(z),z.forEach(m),X.forEach(m),this.h()},h(){I(l,"class","svelte-1ge817j"),I(c,"class","svelte-1ge817j"),I(g,"class","preview svelte-1ge817j")},m(k,P){N(k,e,P),p(e,l),p(l,t),p(e,n),M[o].m(e,null),N(k,i,P),T&&T.m(k,P),N(k,a,P),N(k,f,P),p(f,c),p(c,d),p(f,u),H&&H.m(f,null),p(f,_),p(f,g),~b&&F[b].m(g,null),y=!0},p(k,P){let ee=o;o=L(k),o===ee?M[o].p(k,P):(le(),v(M[ee],1,1,()=>{M[ee]=null}),ne(),r=M[o],r?r.p(k,P):(r=M[o]=C[o](k),r.c()),h(r,1),r.m(e,null)),k[5]==null||k[5].length>0?T?(T.p(k,P),P&32&&h(T,1)):(T=fn(k),T.c(),h(T,1),T.m(a.parentNode,a)):T&&(le(),v(T,1,1,()=>{T=null}),ne()),k[3].length===0?H||(H=cn(),H.c(),H.m(f,_)):H&&(H.d(1),H=null);let X=b;b=D(k),b===X?~b&&F[b].p(k,P):(w&&(le(),v(F[X],1,1,()=>{F[X]=null}),ne()),~b?(w=F[b],w?w.p(k,P):(w=F[b]=V[b](k),w.c()),h(w,1),w.m(g,null)):w=null)},i(k){y||(h(r),h(T),h(w),y=!0)},o(k){v(r),v(T),v(w),y=!1},d(k){k&&m(e),M[o].d(),k&&m(i),T&&T.d(k),k&&m(a),k&&m(f),H&&H.d(),~b&&F[b].d()}}}function ja(s){let e,l,t,n,o,r;return e=new En({props:{title:"Download data"}}),t=new yn({props:{hasForm:!0,$$slots:{default:[La]},$$scope:{ctx:s}}}),o=new Dn({props:{primaryButtonText:"Download",primaryButtonDisabled:s[3].length===0,secondaryButtonText:"Cancel"}}),o.$on("click:button--secondary",s[10]),{c(){B(e.$$.fragment),l=Q(),B(t.$$.fragment),n=Q(),B(o.$$.fragment)},l(i){O(e.$$.fragment,i),l=J(i),O(t.$$.fragment,i),n=J(i),O(o.$$.fragment,i)},m(i,a){R(e,i,a),N(i,l,a),R(t,i,a),N(i,n,a),R(o,i,a),r=!0},p(i,a){const f={};a&262398&&(f.$$scope={dirty:a,ctx:i}),t.$set(f);const c={};a&8&&(c.primaryButtonDisabled=i[3].length===0),o.$set(c)},i(i){r||(h(e.$$.fragment,i),h(t.$$.fragment,i),h(o.$$.fragment,i),r=!0)},o(i){v(e.$$.fragment,i),v(t.$$.fragment,i),v(o.$$.fragment,i),r=!1},d(i){A(e,i),i&&m(l),A(t,i),i&&m(n),A(o,i)}}}function Ua(s){let e,l;return e=new Sn({props:{size:"lg",open:s[0],$$slots:{default:[ja]},$$scope:{ctx:s}}}),e.$on("submit",s[9]),e.$on("close",s[15]),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,[n]){const o={};n&1&&(o.open=t[0]),n&262398&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Ya(s,e,l){let t,n,o,r,i,a,f=x,c=()=>(f(),f=Me(r,V=>l(7,a=V)),r);s.$$.on_destroy.push(()=>f());let{open:d=!1}=e,{schema:u}=e;const _=_t(),g=Re();ge(s,g,V=>l(12,i=V));let b=[],w=[];function y(V){if(V==null)return{sourceFields:null,enrichedFields:null};const D=St(V).filter(P=>["embedding"].indexOf(P.dtype)===-1).filter(P=>!tt(P,V)),k=rt(V).filter(P=>Dt(P)).filter(P=>!rt(P).some(ee=>ee.dtype==="embedding"));return{sourceFields:D,enrichedFields:k}}async function C(){const V=i.namespace,F=i.datasetName,D={combine_columns:!1,columns:o.map(ee=>ee.path)},k=`/api/v1/datasets/${V}/${F}/select_rows_download?url_safe_options=${encodeURIComponent(JSON.stringify(D))}`,P=document.createElement("a");P.download=`${V}_${F}.json`,P.href=k,document.body.appendChild(P),P.click(),P.remove()}function M(){l(0,d=!1),_("close")}function L(V){b=V,l(1,b)}function T(V){w=V,l(2,w)}const H=()=>l(0,d=!1);return s.$$set=V=>{"open"in V&&l(0,d=V.open),"schema"in V&&l(11,u=V.schema)},s.$$.update=()=>{s.$$.dirty&2048&&l(6,{sourceFields:t,enrichedFields:n}=y(u),t,(l(5,n),l(11,u))),s.$$.dirty&6&&l(3,o=[...b,...w]),s.$$.dirty&4104&&c(l(4,r=o.length>0?$r(i.namespace,i.datasetName,{columns:o.map(V=>V.path),limit:3,combine_columns:!1}):null))},[d,b,w,o,r,n,t,a,g,C,M,u,i,L,T,H]}class Qa extends $e{constructor(e){super(),ke(this,e,Ya,Ua,be,{open:0,schema:11})}}function Ja(s){let e,l;return e=new ms({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Ka(s){let e,l;return e=new cs({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function un(s){let e,l,t,n,o,r;function i(d){s[23](d)}let a={schema:s[12].data,namespace:s[0],name:s[1]};s[4]!==void 0&&(a.open=s[4]),e=new Pa({props:a}),Be.push(()=>Ue(e,"open",i));function f(d){s[24](d)}let c={schema:s[12].data};return s[5]!==void 0&&(c.open=s[5]),n=new Qa({props:c}),Be.push(()=>Ue(n,"open",f)),{c(){B(e.$$.fragment),t=Q(),B(n.$$.fragment)},l(d){O(e.$$.fragment,d),t=J(d),O(n.$$.fragment,d)},m(d,u){R(e,d,u),N(d,t,u),R(n,d,u),r=!0},p(d,u){const _={};u&4096&&(_.schema=d[12].data),u&1&&(_.namespace=d[0]),u&2&&(_.name=d[1]),!l&&u&16&&(l=!0,_.open=d[4],Ye(()=>l=!1)),e.$set(_);const g={};u&4096&&(g.schema=d[12].data),!o&&u&32&&(o=!0,g.open=d[5],Ye(()=>o=!1)),n.$set(g)},i(d){r||(h(e.$$.fragment,d),h(n.$$.fragment,d),r=!0)},o(d){v(e.$$.fragment,d),v(n.$$.fragment,d),r=!1},d(d){A(e,d),d&&m(t),A(n,d)}}}function dn(s){let e,l;return e=new Vt({props:{open:!0,modalHeading:"Dataset config",primaryButtonText:"Ok",secondaryButtonText:"Cancel",$$slots:{default:[Wa]},$$scope:{ctx:s}}}),e.$on("click:button--secondary",s[25]),e.$on("close",s[26]),e.$on("submit",s[27]),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n&268443648&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Za(s){let e,l;return e=new Cn({props:{value:`${s[13].data}`,readonly:!0,rows:15,placeholder:"3 rows of data for previewing the response",class:"mb-2 font-mono"}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n&8192&&(o.value=`${t[13].data}`),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Ga(s){let e,l;return e=new je({}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p:x,i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function Wa(s){let e,l,t,n,o,r,i,a,f,c;const d=[Ga,Za],u=[];function _(g,b){var w,y;return(w=g[13])!=null&&w.isFetching?0:(y=g[13])!=null&&y.data?1:-1}return~(i=_(s))&&(a=u[i]=d[i](s)),{c(){e=S("div"),l=Z(`This dataset configuration represents the transformations that created the dataset, + including signals, embeddings, and user settings. This can be used with lilac.load to + generate the dataset with the same view as presented.`),t=Q(),n=S("div"),o=Z("config.yml"),r=Q(),a&&a.c(),f=ie(),this.h()},l(g){e=E(g,"DIV",{class:!0});var b=$(e);l=G(b,`This dataset configuration represents the transformations that created the dataset, + including signals, embeddings, and user settings. This can be used with lilac.load to + generate the dataset with the same view as presented.`),b.forEach(m),t=J(g),n=E(g,"DIV",{class:!0});var w=$(n);o=G(w,"config.yml"),w.forEach(m),r=J(g),a&&a.l(g),f=ie(),this.h()},h(){I(e,"class","mb-4 text-sm"),I(n,"class","font-mono text-xs")},m(g,b){N(g,e,b),p(e,l),N(g,t,b),N(g,n,b),p(n,o),N(g,r,b),~i&&u[i].m(g,b),N(g,f,b),c=!0},p(g,b){let w=i;i=_(g),i===w?~i&&u[i].p(g,b):(a&&(le(),v(u[w],1,1,()=>{u[w]=null}),ne()),~i?(a=u[i],a?a.p(g,b):(a=u[i]=d[i](g),a.c()),h(a,1),a.m(f.parentNode,f)):a=null)},i(g){c||(h(a),c=!0)},o(g){v(a),c=!1},d(g){g&&m(e),g&&m(t),g&&m(n),g&&m(r),~i&&u[i].d(g),g&&m(f)}}}function Xa(s){let e,l,t,n,o,r,i,a,f,c,d,u,_,g,b,w,y,C,M;t=new va({});const L=[Ka,Ja],T=[];function H(D,k){return D[11]?1:0}r=H(s),i=T[r]=L[r](s),_=new bi({});let V=s[12].data&&un(s),F=s[2]&&dn(s);return{c(){e=S("div"),l=S("div"),B(t.$$.fragment),n=Q(),o=S("div"),i.c(),d=Q(),u=S("div"),B(_.$$.fragment),g=Q(),V&&V.c(),b=Q(),F&&F.c(),w=ie(),this.h()},l(D){e=E(D,"DIV",{class:!0});var k=$(e);l=E(k,"DIV",{class:!0});var P=$(l);O(t.$$.fragment,P),n=J(P),o=E(P,"DIV",{class:!0});var ee=$(o);i.l(ee),ee.forEach(m),P.forEach(m),d=J(k),u=E(k,"DIV",{class:!0});var X=$(u);O(_.$$.fragment,X),X.forEach(m),k.forEach(m),g=J(D),V&&V.l(D),b=J(D),F&&F.l(D),w=ie(),this.h()},h(){I(o,"class",a=ft(`absolute right-0 top-1/2 flex + h-8 w-4 cursor-pointer items-center justify-center + rounded border + border-neutral-200 bg-neutral-100 + opacity-60 hover:bg-neutral-200 + hover:opacity-100 + ${s[11]?" translate-x-full":" translate-x-1/2"}`)+" svelte-1xlsh2v"),I(l,"class",c=ft(`schema-container relative h-full ${s[11]?"w-0":"w-1/3"} border-r border-gray-200`)+" svelte-1xlsh2v"),I(u,"class","h-full w-2/3 flex-grow"),I(e,"class","flex h-full w-full")},m(D,k){N(D,e,k),p(e,l),R(t,l,null),p(l,n),p(l,o),T[r].m(o,null),p(e,d),p(e,u),R(_,u,null),N(D,g,k),V&&V.m(D,k),N(D,b,k),F&&F.m(D,k),N(D,w,k),y=!0,C||(M=[Ie(f=Ve.call(null,o,{text:s[11]?"Show Schema":"Hide Schema"})),Pe(o,"click",s[15]),Pe(o,"keypress",s[15])],C=!0)},p(D,k){let P=r;r=H(D),r!==P&&(le(),v(T[P],1,1,()=>{T[P]=null}),ne(),i=T[r],i||(i=T[r]=L[r](D),i.c()),h(i,1),i.m(o,null)),(!y||k&2048&&a!==(a=ft(`absolute right-0 top-1/2 flex + h-8 w-4 cursor-pointer items-center justify-center + rounded border + border-neutral-200 bg-neutral-100 + opacity-60 hover:bg-neutral-200 + hover:opacity-100 + ${D[11]?" translate-x-full":" translate-x-1/2"}`)+" svelte-1xlsh2v"))&&I(o,"class",a),f&&Le(f.update)&&k&2048&&f.update.call(null,{text:D[11]?"Show Schema":"Hide Schema"}),(!y||k&2048&&c!==(c=ft(`schema-container relative h-full ${D[11]?"w-0":"w-1/3"} border-r border-gray-200`)+" svelte-1xlsh2v"))&&I(l,"class",c),D[12].data?V?(V.p(D,k),k&4096&&h(V,1)):(V=un(D),V.c(),h(V,1),V.m(b.parentNode,b)):V&&(le(),v(V,1,1,()=>{V=null}),ne()),D[2]?F?(F.p(D,k),k&4&&h(F,1)):(F=dn(D),F.c(),h(F,1),F.m(w.parentNode,w)):F&&(le(),v(F,1,1,()=>{F=null}),ne())},i(D){y||(h(t.$$.fragment,D),h(i),h(_.$$.fragment,D),h(V),h(F),y=!0)},o(D){v(t.$$.fragment,D),v(i),v(_.$$.fragment,D),v(V),v(F),y=!1},d(D){D&&m(e),A(t),T[r].d(),A(_),D&&m(g),V&&V.d(D),D&&m(b),F&&F.d(D),D&&m(w),C=!1,Qe(M)}}}function xa(s){let e,l,t=s[3].namespace+"",n,o,r=s[3].datasetName+"",i,a,f;return{c(){e=S("div"),l=S("a"),n=Z(t),o=Z("/"),i=Z(r),this.h()},l(c){e=E(c,"DIV",{class:!0});var d=$(e);l=E(d,"A",{class:!0,href:!0});var u=$(l);n=G(u,t),o=G(u,"/"),i=G(u,r),u.forEach(m),d.forEach(m),this.h()},h(){I(l,"class","font-semibold text-black"),I(l,"href",s[8]),I(e,"class","dataset-name svelte-1xlsh2v")},m(c,d){N(c,e,d),p(e,l),p(l,n),p(l,o),p(l,i),a||(f=Pe(l,"click",s[21]),a=!0)},p(c,d){d&8&&t!==(t=c[3].namespace+"")&&fe(n,t),d&8&&r!==(r=c[3].datasetName+"")&&fe(i,r),d&256&&I(l,"href",c[8])},d(c){c&&m(e),a=!1,f()}}}function eo(s){let e,l,t,n,o,r,i,a;return l=new Xe({props:{type:"outline",$$slots:{default:[xa]},$$scope:{ctx:s}}}),o=new it({}),{c(){e=S("div"),B(l.$$.fragment),t=Q(),n=S("button"),B(o.$$.fragment),this.h()},l(f){e=E(f,"DIV",{slot:!0,class:!0});var c=$(e);O(l.$$.fragment,c),t=J(c),n=E(c,"BUTTON",{});var d=$(n);O(o.$$.fragment,d),d.forEach(m),c.forEach(m),this.h()},h(){I(e,"slot","header-subtext"),I(e,"class","flex flex-row items-center")},m(f,c){N(f,e,c),R(l,e,null),p(e,t),p(e,n),R(o,n,null),r=!0,i||(a=[Pe(n,"click",s[22]),Ie(Ve.call(null,n,{text:"Dataset information"}))],i=!0)},p(f,c){const d={};c&268435720&&(d.$$scope={dirty:c,ctx:f}),l.$set(d)},i(f){r||(h(l.$$.fragment,f),h(o.$$.fragment,f),r=!0)},o(f){v(l.$$.fragment,f),v(o.$$.fragment,f),r=!1},d(f){f&&m(e),A(l),A(o),i=!1,Qe(a)}}}function to(s){let e,l,t;return l=new Mi({}),{c(){e=S("div"),B(l.$$.fragment),this.h()},l(n){e=E(n,"DIV",{slot:!0,class:!0});var o=$(e);O(l.$$.fragment,o),o.forEach(m),this.h()},h(){I(e,"slot","header-center"),I(e,"class","flex w-full items-center")},m(n,o){N(n,e,o),R(l,e,null),t=!0},p:x,i(n){t||(h(l.$$.fragment,n),t=!0)},o(n){v(l.$$.fragment,n),t=!1},d(n){n&&m(e),A(l)}}}function mn(s){let e,l,t,n;return{c(){e=S("div"),l=Z("Copied!"),this.h()},l(o){e=E(o,"DIV",{class:!0});var r=$(e);l=G(r,"Copied!"),r.forEach(m),this.h()},h(){I(e,"class","absolute right-12 z-50 mt-2 rounded border border-neutral-300 bg-neutral-50 px-4 py-1 text-xs")},m(o,r){N(o,e,r),p(e,l),n=!0},i(o){n||(t&&t.end(1),n=!0)},o(o){t=Gn(e,Hr,{}),n=!1},d(o){o&&m(e),o&&t&&t.end()}}}function lo(s){let e,l,t,n,o,r,i,a,f,c,d,u,_,g,b,w,y,C,M,L=s[6]&&mn();return i=new Ss({}),c=new gs({}),g=new rs({}),{c(){e=S("div"),l=S("div"),t=S("div"),n=S("div"),L&&L.c(),o=Q(),r=S("button"),B(i.$$.fragment),a=Q(),f=S("button"),B(c.$$.fragment),d=Q(),u=S("div"),_=S("button"),B(g.$$.fragment),this.h()},l(T){e=E(T,"DIV",{slot:!0});var H=$(e);l=E(H,"DIV",{class:!0});var V=$(l);t=E(V,"DIV",{class:!0});var F=$(t);n=E(F,"DIV",{class:!0});var D=$(n);L&&L.l(D),o=J(D),r=E(D,"BUTTON",{});var k=$(r);O(i.$$.fragment,k),k.forEach(m),D.forEach(m),a=J(F),f=E(F,"BUTTON",{});var P=$(f);O(c.$$.fragment,P),P.forEach(m),d=J(F),u=E(F,"DIV",{class:!0});var ee=$(u);_=E(ee,"BUTTON",{});var X=$(_);O(g.$$.fragment,X),X.forEach(m),ee.forEach(m),F.forEach(m),V.forEach(m),H.forEach(m),this.h()},h(){I(n,"class","relative"),_.disabled=b=!s[9],I(u,"class","mr-2"),Se(u,"opacity-40",!s[9]),I(t,"class","flex"),I(l,"class","flex h-full flex-col"),I(e,"slot","header-right")},m(T,H){N(T,e,H),p(e,l),p(l,t),p(t,n),L&&L.m(n,null),p(n,o),p(n,r),R(i,r,null),p(t,a),p(t,f),R(c,f,null),p(t,d),p(t,u),p(u,_),R(g,_,null),y=!0,C||(M=[Ie(Ve.call(null,r,{text:"Copy the URL"})),Pe(r,"click",s[18]),Ie(Ve.call(null,f,{text:"Download data"})),Pe(f,"click",s[19]),Ie(Ve.call(null,_,{text:"Dataset settings"})),Pe(_,"click",s[20]),Ie(w=Ve.call(null,u,{text:s[9]?"":"User does not have access to update settings of this dataset."}))],C=!0)},p(T,H){T[6]?L?H&64&&h(L,1):(L=mn(),L.c(),h(L,1),L.m(n,o)):L&&(le(),v(L,1,1,()=>{L=null}),ne()),(!y||H&512&&b!==(b=!T[9]))&&(_.disabled=b),w&&Le(w.update)&&H&512&&w.update.call(null,{text:T[9]?"":"User does not have access to update settings of this dataset."}),(!y||H&512)&&Se(u,"opacity-40",!T[9])},i(T){y||(h(L),h(i.$$.fragment,T),h(c.$$.fragment,T),h(g.$$.fragment,T),y=!0)},o(T){v(L),v(i.$$.fragment,T),v(c.$$.fragment,T),v(g.$$.fragment,T),y=!1},d(T){T&&m(e),L&&L.d(),A(i),A(c),A(g),C=!1,Qe(M)}}}function no(s){let e,l;return e=new Xn({props:{$$slots:{"header-right":[lo],"header-center":[to],"header-subtext":[eo],default:[Xa]},$$scope:{ctx:s}}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,[n]){const o={};n&268450687&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function ro(s,e,l){let t,n,o,r,i,a,f,c,d=x,u=()=>(d(),d=Me(n,Y=>l(12,c=Y)),n),_,g=x,b=()=>(g(),g=Me(i,Y=>l(13,_=Y)),i);s.$$.on_destroy.push(()=>d()),s.$$.on_destroy.push(()=>g());let{namespace:w}=e,{datasetName:y}=e;const C=Re();ge(s,C,Y=>l(3,f=Y));function M(){ut(C,f.schemaCollapsed=!f.schemaCollapsed,f)}let L=!1,T=!1;const H=yt();ge(s,H,Y=>l(17,a=Y));let V=!1,F=!1;const D=()=>navigator.clipboard.writeText(location.href).then(()=>{l(6,V=!0),setTimeout(()=>l(6,V=!1),2e3)},()=>{throw Error("Error copying link to clipboard.")}),k=()=>l(5,T=!0),P=()=>l(4,L=!0),ee=()=>pn(r),X=()=>l(2,F=!0);function K(Y){L=Y,l(4,L)}function z(Y){T=Y,l(5,T)}const j=()=>l(2,F=!1),U=()=>l(2,F=!1),q=()=>l(2,F=!1);return s.$$set=Y=>{"namespace"in Y&&l(0,w=Y.namespace),"datasetName"in Y&&l(1,y=Y.datasetName)},s.$$.update=()=>{var Y;s.$$.dirty&8&&l(11,t=f.schemaCollapsed),s.$$.dirty&8&&u(l(10,n=Et(f.namespace,f.datasetName))),s.$$.dirty&131072&&l(9,o=(Y=a.data)==null?void 0:Y.access.dataset.update_settings),s.$$.dirty&3&&l(8,r=Zr(w,y)),s.$$.dirty&7&&b(l(7,i=F?kr(w,y,"yaml"):null))},[w,y,F,f,L,T,V,i,r,o,n,t,c,_,C,M,H,a,D,k,P,ee,X,K,z,j,U,q]}class so extends $e{constructor(e){super(),ke(this,e,ro,no,be,{namespace:0,datasetName:1})}}function io(s){let e;return{c(){e=Z("Page not found! Please specify a dataset.")},l(l){e=G(l,"Page not found! Please specify a dataset.")},m(l,t){N(l,e,t)},p:x,i:x,o:x,d(l){l&&m(e)}}}function ao(s){let e=s[2],l,t,n=hn(s);return{c(){n.c(),l=ie()},l(o){n.l(o),l=ie()},m(o,r){n.m(o,r),N(o,l,r),t=!0},p(o,r){r&4&&be(e,e=o[2])?(le(),v(n,1,1,x),ne(),n=hn(o),n.c(),h(n,1),n.m(l.parentNode,l)):n.p(o,r)},i(o){t||(h(n),t=!0)},o(o){v(n),t=!1},d(o){o&&m(l),n.d(o)}}}function hn(s){let e,l;return e=new so({props:{namespace:s[0],datasetName:s[1]}}),{c(){B(e.$$.fragment)},l(t){O(e.$$.fragment,t)},m(t,n){R(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.namespace=t[0]),n&2&&(o.datasetName=t[1]),e.$set(o)},i(t){l||(h(e.$$.fragment,t),l=!0)},o(t){v(e.$$.fragment,t),l=!1},d(t){A(e,t)}}}function oo(s){let e,l,t,n;const o=[ao,io],r=[];function i(a,f){return a[2]&&a[0]&&a[1]?0:1}return e=i(s),l=r[e]=o[e](s),{c(){l.c(),t=ie()},l(a){l.l(a),t=ie()},m(a,f){r[e].m(a,f),N(a,t,f),n=!0},p(a,[f]){let c=e;e=i(a),e===c?r[e].p(a,f):(le(),v(r[c],1,1,()=>{r[c]=null}),ne(),l=r[e],l?l.p(a,f):(l=r[e]=o[e](a),l.c()),h(l,1),l.m(t.parentNode,t))},i(a){n||(h(l),n=!0)},o(a){v(l),n=!1},d(a){r[e].d(a),a&&m(t)}}}function fo(s,e,l){let t,n,o,r,i,a,f,c,d=x,u=()=>(d(),d=Me(f,X=>l(10,c=X)),f),_,g=x,b=()=>(g(),g=Me(t,X=>l(11,_=X)),t),w,y=x,C=()=>(y(),y=Me(a,X=>l(12,w=X)),a),M,L=x,T=()=>(L(),L=Me(r,X=>l(13,M=X)),r),H,V=x,F=()=>(V(),V=Me(o,X=>l(14,H=X)),o),D;s.$$.on_destroy.push(()=>d()),s.$$.on_destroy.push(()=>g()),s.$$.on_destroy.push(()=>y()),s.$$.on_destroy.push(()=>L()),s.$$.on_destroy.push(()=>V());let k,P;const ee=Gr();return ge(s,ee,X=>l(15,D=X)),s.$$.update=()=>{var X,K;if(s.$$.dirty&32771&&D.page==="datasets")if(D.identifier==""||D.identifier==null)l(0,k=void 0),l(1,P=void 0);else{const[z,j]=D.identifier.split("/");(k!=z||P!=j)&&(l(0,k=z),l(1,P=j))}if(s.$$.dirty&3&&b(l(2,t=k&&P?yr(k,P):null)),s.$$.dirty&7&&t!=null){const z=Cr(k,P);Wr("datasets",`${k}/${P}`,t,ee,j=>xr(j,z),j=>Xr(j,z))}if(s.$$.dirty&4&&t!=null&&Sr(t),s.$$.dirty&3&&l(8,n=k&&P?Dr(k,P):null),s.$$.dirty&256&&n!=null&&Er(n),s.$$.dirty&3&&F(l(6,o=k&&P?ot(k,P):null)),s.$$.dirty&16640&&n&&H!=null&&H.data&&n.setSettings(H.data),s.$$.dirty&3&&T(l(5,r=k&&P?Et(k,P):null)),s.$$.dirty&8448&&n&&M!=null&&M.data&&n.setSchema(M.data),s.$$.dirty&8192&&l(9,i=M!=null&&M.data?Ir("string",M.data):null),s.$$.dirty&515&&C(l(4,a=k&&P&&i?Vr(k,P,i.map(z=>z.path)):null)),s.$$.dirty&4352&&n&&w!=null&&w.data&&!w.isFetching&&n.setStats(w.data),s.$$.dirty&2051&&u(l(3,f=k&&P&&_?Nr(k,P,Tr(_)):null)),s.$$.dirty&1280&&n&&c!=null&&c.data&&n.setSelectRowsSchema(c),s.$$.dirty&3328&&n&&_&&(X=c==null?void 0:c.data)!=null&&X.schema){const z=qr(_.selectedColumns||{},((K=c.data)==null?void 0:K.schema)||null);n.setVisibleFields(z)}},[k,P,t,f,a,r,o,ee,n,i,c,_,w,M,H,D]}class yo extends $e{constructor(e){super(),ke(this,e,fo,oo,be,{})}}export{yo as component}; diff --git a/lilac/web/_app/immutable/nodes/5.3d3a318e.js b/lilac/web/_app/immutable/nodes/5.3d3a318e.js new file mode 100644 index 0000000000000000000000000000000000000000..ad27472bf924c811b8aa236da262be86fa19b6bb --- /dev/null +++ b/lilac/web/_app/immutable/nodes/5.3d3a318e.js @@ -0,0 +1 @@ +import{S as R,i as j,s as F,y as T,z as E,A as S,g as _,d as k,B,O as A,k as q,a as O,l as H,m as I,c as V,h as a,n as y,b as p,a0 as G,v as D,f as P,e as L,q as d,r as $,u as w}from"../chunks/index.b333a928.js";import{g as J}from"../chunks/navigation.1d886b5b.js";import{P as K,b as Q}from"../chunks/Page.4b0754ae.js";import{q as X,B as Y}from"../chunks/Commands.1fffdf33.js";import{g as Z,f as x}from"../chunks/utils.4eeb8687.js";import{A as ee}from"../chunks/ArrowUpRight.e306cdcd.js";import{T as M}from"../chunks/ToastNotification.66c9609a.js";function U(o){let l,r;return l=new M({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"Unknown task",caption:"This could be from a stale link, or a new server instance."}}),{c(){T(l.$$.fragment)},l(s){E(l.$$.fragment,s)},m(s,t){S(l,s,t),r=!0},i(s){r||(_(l.$$.fragment,s),r=!0)},o(s){k(l.$$.fragment,s),r=!1},d(s){B(l,s)}}}function z(o){let l,r,s,t,e,i,n;function h(f,m){if(f[0].status=="pending")return se;if(f[0].status==="completed")return le;if(f[0].status==="error")return te}let b=h(o),c=b&&b(o),u=o[0].status!="error"&&W(o);const C=[ie,re],g=[];function v(f,m){return f[0].status=="completed"?0:f[0].status==="error"?1:-1}return~(t=v(o))&&(e=g[t]=C[t](o)),{c(){l=q("h3"),c&&c.c(),r=O(),u&&u.c(),s=O(),e&&e.c(),i=L()},l(f){l=H(f,"H3",{});var m=I(l);c&&c.l(m),m.forEach(a),r=V(f),u&&u.l(f),s=V(f),e&&e.l(f),i=L()},m(f,m){p(f,l,m),c&&c.m(l,null),p(f,r,m),u&&u.m(f,m),p(f,s,m),~t&&g[t].m(f,m),p(f,i,m),n=!0},p(f,m){b===(b=h(f))&&c?c.p(f,m):(c&&c.d(1),c=b&&b(f),c&&(c.c(),c.m(l,null))),f[0].status!="error"?u?(u.p(f,m),m&1&&_(u,1)):(u=W(f),u.c(),_(u,1),u.m(s.parentNode,s)):u&&(D(),k(u,1,1,()=>{u=null}),P());let N=t;t=v(f),t===N?~t&&g[t].p(f,m):(e&&(D(),k(g[N],1,1,()=>{g[N]=null}),P()),~t?(e=g[t],e?e.p(f,m):(e=g[t]=C[t](f),e.c()),_(e,1),e.m(i.parentNode,i)):e=null)},i(f){n||(_(u),_(e),n=!0)},o(f){k(u),k(e),n=!1},d(f){f&&a(l),c&&c.d(),f&&a(r),u&&u.d(f),f&&a(s),~t&&g[t].d(f),f&&a(i)}}}function te(o){let l,r,s,t;return{c(){l=d("Error loading "),r=d(o[2]),s=d("/"),t=d(o[3])},l(e){l=$(e,"Error loading "),r=$(e,o[2]),s=$(e,"/"),t=$(e,o[3])},m(e,i){p(e,l,i),p(e,r,i),p(e,s,i),p(e,t,i)},p(e,i){i&4&&w(r,e[2]),i&8&&w(t,e[3])},d(e){e&&a(l),e&&a(r),e&&a(s),e&&a(t)}}}function le(o){let l,r,s,t;return{c(){l=d("Done loading "),r=d(o[2]),s=d("/"),t=d(o[3])},l(e){l=$(e,"Done loading "),r=$(e,o[2]),s=$(e,"/"),t=$(e,o[3])},m(e,i){p(e,l,i),p(e,r,i),p(e,s,i),p(e,t,i)},p(e,i){i&4&&w(r,e[2]),i&8&&w(t,e[3])},d(e){e&&a(l),e&&a(r),e&&a(s),e&&a(t)}}}function se(o){let l,r,s,t,e;return{c(){l=d("Loading "),r=d(o[2]),s=d("/"),t=d(o[3]),e=d("...")},l(i){l=$(i,"Loading "),r=$(i,o[2]),s=$(i,"/"),t=$(i,o[3]),e=$(i,"...")},m(i,n){p(i,l,n),p(i,r,n),p(i,s,n),p(i,t,n),p(i,e,n)},p(i,n){n&4&&w(r,i[2]),n&8&&w(t,i[3])},d(i){i&&a(l),i&&a(r),i&&a(s),i&&a(t),i&&a(e)}}}function W(o){let l,r,s;return r=new Q({props:{labelText:o[0].message||"",helperText:o[0].status!="completed"?o[0].details:"",value:o[0].status==="completed"?1:o[4],max:1,status:o[7][o[0].status]}}),{c(){l=q("div"),T(r.$$.fragment),this.h()},l(t){l=H(t,"DIV",{class:!0});var e=I(l);E(r.$$.fragment,e),e.forEach(a),this.h()},h(){y(l,"class","mt-6")},m(t,e){p(t,l,e),S(r,l,null),s=!0},p(t,e){const i={};e&1&&(i.labelText=t[0].message||""),e&1&&(i.helperText=t[0].status!="completed"?t[0].details:""),e&17&&(i.value=t[0].status==="completed"?1:t[4]),e&1&&(i.status=t[7][t[0].status]),r.$set(i)},i(t){s||(_(r.$$.fragment,t),s=!0)},o(t){k(r.$$.fragment,t),s=!1},d(t){t&&a(l),B(r)}}}function re(o){let l,r;return l=new M({props:{hideCloseButton:!0,kind:"error",fullWidth:!0,lowContrast:!0,title:"Error loading dataset",caption:o[0].error}}),{c(){T(l.$$.fragment)},l(s){E(l.$$.fragment,s)},m(s,t){S(l,s,t),r=!0},p(s,t){const e={};t&1&&(e.caption=s[0].error),l.$set(e)},i(s){r||(_(l.$$.fragment,s),r=!0)},o(s){k(l.$$.fragment,s),r=!1},d(s){B(l,s)}}}function ie(o){let l,r,s;return r=new Y({props:{size:"xl",icon:ee,iconDescription:"Open dataset",$$slots:{default:[oe]},$$scope:{ctx:o}}}),r.$on("click",o[10]),{c(){l=q("div"),T(r.$$.fragment),this.h()},l(t){l=H(t,"DIV",{class:!0});var e=I(l);E(r.$$.fragment,e),e.forEach(a),this.h()},h(){y(l,"class","dataset-link mt-8")},m(t,e){p(t,l,e),S(r,l,null),s=!0},p(t,e){const i={};e&2048&&(i.$$scope={dirty:e,ctx:t}),r.$set(i)},i(t){s||(_(r.$$.fragment,t),s=!0)},o(t){k(r.$$.fragment,t),s=!1},d(t){t&&a(l),B(r)}}}function oe(o){let l;return{c(){l=d("Open dataset")},l(r){l=$(r,"Open dataset")},m(r,s){p(r,l,s)},d(r){r&&a(l)}}}function fe(o){let l,r,s,t=o[1].isSuccess&&o[0]==null&&U(),e=o[0]&&z(o);return{c(){l=q("div"),t&&t.c(),r=O(),e&&e.c(),this.h()},l(i){l=H(i,"DIV",{class:!0});var n=I(l);t&&t.l(n),r=V(n),e&&e.l(n),n.forEach(a),this.h()},h(){y(l,"class","w-full p-8")},m(i,n){p(i,l,n),t&&t.m(l,null),G(l,r),e&&e.m(l,null),s=!0},p(i,n){i[1].isSuccess&&i[0]==null?t?n&3&&_(t,1):(t=U(),t.c(),_(t,1),t.m(l,r)):t&&(D(),k(t,1,1,()=>{t=null}),P()),i[0]?e?(e.p(i,n),n&1&&_(e,1)):(e=z(i),e.c(),_(e,1),e.m(l,null)):e&&(D(),k(e,1,1,()=>{e=null}),P())},i(i){s||(_(t),_(e),s=!0)},o(i){k(t),k(e),s=!1},d(i){i&&a(l),t&&t.d(),e&&e.d()}}}function ne(o){let l,r;return l=new K({props:{$$slots:{default:[fe]},$$scope:{ctx:o}}}),{c(){T(l.$$.fragment)},l(s){E(l.$$.fragment,s)},m(s,t){S(l,s,t),r=!0},p(s,[t]){const e={};t&2079&&(e.$$scope={dirty:t,ctx:s}),l.$set(e)},i(s){r||(_(l.$$.fragment,s),r=!0)},o(s){k(l.$$.fragment,s),r=!1},d(s){B(l,s)}}}function ae(o,l,r){let s,t,e,i,n,h,b;const c=Z();A(o,c,v=>r(9,i=v));const u=X();A(o,u,v=>r(1,e=v));const C={pending:"active",completed:"finished",error:"error"},g=()=>J(x(n,h));return o.$$.update=()=>{o.$$.dirty&512&&i.page==="datasets/loading"&&i.identifier!=null&&r(2,[n,h,b]=i.identifier.split("/"),n,(r(3,h),r(9,i)),(r(8,b),r(9,i))),o.$$.dirty&258&&r(0,s=b!=null&&e.data!=null?e.data.tasks[b]:null),o.$$.dirty&1&&r(4,t=(s==null?void 0:s.step_progress)==null?void 0:s.step_progress)},[s,e,n,h,t,c,u,C,b,i,g]}class ke extends R{constructor(l){super(),j(this,l,ae,ne,F,{})}}export{ke as component}; diff --git a/lilac/web/_app/immutable/nodes/6.4300fff1.js b/lilac/web/_app/immutable/nodes/6.4300fff1.js new file mode 100644 index 0000000000000000000000000000000000000000..ec2e86013a9a087bf0e5f663a6777859fa9ffe05 --- /dev/null +++ b/lilac/web/_app/immutable/nodes/6.4300fff1.js @@ -0,0 +1 @@ +import{S as te,i as le,s as x,E as j,k as D,a as z,l as P,m as V,c as O,h as p,n as H,G as E,F as W,b as N,a0 as S,H as q,g as k,v as $,d as T,f as ee,L as oe,M as ue,N as X,ai as Le,aj as Oe,O as re,Q as fe,D as ce,I as de,J as _e,K as me,R as L,w as Z,q as U,r as Y,u as he,a1 as R,C as Je,P as Ke,o as Ue,a8 as ve,ak as Ye,e as w,ac as ae,T as ne,y as Q,z as B,A,U as ie,B as C,a4 as We}from"../chunks/index.b333a928.js";import{g as Xe}from"../chunks/navigation.1d886b5b.js";import{aF as Qe,ae as se,aG as Ze,aH as we,b as xe,aI as $e,B as et,O as Be,c as tt,aJ as lt}from"../chunks/Commands.1fffdf33.js";import{P as nt}from"../chunks/Page.4b0754ae.js";import{C as Ae}from"../chunks/ComboBox.5bfb4a00.js";import{e as it}from"../chunks/utils.4eeb8687.js";import{w as Ce}from"../chunks/index.2b0dd2f8.js";const at=l=>({}),pe=l=>({});function ke(l){let e,t;const n=l[16].labelText,i=ce(n,l,l[15],pe),r=i||rt(l);return{c(){e=D("span"),r&&r.c(),this.h()},l(a){e=P(a,"SPAN",{});var o=V(e);r&&r.l(o),o.forEach(p),this.h()},h(){E(e,"bx--visually-hidden",l[7])},m(a,o){N(a,e,o),r&&r.m(e,null),t=!0},p(a,o){i?i.p&&(!t||o&32768)&&de(i,n,a,a[15],t?me(n,a[15],o,at):_e(a[15]),pe):r&&r.p&&(!t||o&64)&&r.p(a,t?o:-1),(!t||o&128)&&E(e,"bx--visually-hidden",a[7])},i(a){t||(k(r,a),t=!0)},o(a){T(r,a),t=!1},d(a){a&&p(e),r&&r.d(a)}}}function rt(l){let e;return{c(){e=U(l[6])},l(t){e=Y(t,l[6])},m(t,n){N(t,e,n)},p(t,n){n&64&&he(e,t[6])},d(t){t&&p(e)}}}function st(l){let e,t,n,i,r,a,o,s,u,d=(l[6]||l[13].labelText)&&ke(l),b=[l[12]],c={};for(let _=0;_{d=null}),ee()),(!o||g&256)&&H(i,"for",_[8]),W(e,c=oe(b,[g&4096&&_[12]])),E(e,"bx--radio-button-wrapper",!0),E(e,"bx--radio-button-wrapper--label-left",_[5]==="left")},i(_){o||(k(d),o=!0)},o(_){T(d),o=!1},d(_){_&&p(e),l[18](null),d&&d.d(),s=!1,ue(u)}}}function ot(l,e,t){const n=["value","checked","disabled","required","labelPosition","labelText","hideLabel","id","name","ref"];let i=X(e,n),r,{$$slots:a={},$$scope:o}=e;const s=Le(a);let{value:u=""}=e,{checked:d=!1}=e,{disabled:b=!1}=e,{required:c=!1}=e,{labelPosition:_="right"}=e,{labelText:g=""}=e,{hideLabel:f=!1}=e,{id:h="ccs-"+Math.random().toString(36)}=e,{name:v=""}=e,{ref:y=null}=e;const G=Oe("RadioButtonGroup"),J=G?G.selectedValue:Ce(d?u:void 0);re(l,J,I=>t(14,r=I)),G&&G.add({id:h,checked:d,disabled:b,value:u});function M(I){L.call(this,l,I)}function m(I){Z[I?"unshift":"push"](()=>{y=I,t(1,y)})}const K=()=>{G&&G.update(u)};return l.$$set=I=>{e=j(j({},e),fe(I)),t(12,i=X(e,n)),"value"in I&&t(2,u=I.value),"checked"in I&&t(0,d=I.checked),"disabled"in I&&t(3,b=I.disabled),"required"in I&&t(4,c=I.required),"labelPosition"in I&&t(5,_=I.labelPosition),"labelText"in I&&t(6,g=I.labelText),"hideLabel"in I&&t(7,f=I.hideLabel),"id"in I&&t(8,h=I.id),"name"in I&&t(9,v=I.name),"ref"in I&&t(1,y=I.ref),"$$scope"in I&&t(15,o=I.$$scope)},l.$$.update=()=>{l.$$.dirty&16388&&t(0,d=r===u)},[d,y,u,b,c,_,g,f,h,v,G,J,i,s,r,o,a,M,m,K]}class ut extends te{constructor(e){super(),le(this,e,ot,st,x,{value:2,checked:0,disabled:3,required:4,labelPosition:5,labelText:6,hideLabel:7,id:8,name:9,ref:1})}}const ft=ut;function ct(l){let e,t,n,i;const r=l[3].default,a=ce(r,l,l[2],null);let o=[l[1]],s={};for(let u=0;u{o=f,t(0,o)})}return l.$$set=f=>{e=j(j({},e),fe(f)),t(1,i=X(e,n)),"ref"in f&&t(0,o=f.ref),"$$scope"in f&&t(2,a=f.$$scope)},[o,i,a,r,s,u,d,b,c,_,g]}class _t extends te{constructor(e){super(),le(this,e,dt,ct,x,{ref:0})}}const mt=_t;function Te(l){let e,t,n;return{c(){e=D("legend"),t=U(l[4]),this.h()},l(i){e=P(i,"LEGEND",{id:!0});var r=V(e);t=Y(r,l[4]),r.forEach(p),this.h()},h(){H(e,"id",n=l[5]||l[6]["aria-labelledby"]),E(e,"bx--label",!0)},m(i,r){N(i,e,r),S(e,t)},p(i,r){r&16&&he(t,i[4]),r&96&&n!==(n=i[5]||i[6]["aria-labelledby"])&&H(e,"id",n)},d(i){i&&p(e)}}}function Ee(l){let e,t;return{c(){e=D("div"),t=U(l[3]),this.h()},l(n){e=P(n,"DIV",{});var i=V(e);t=Y(i,l[3]),i.forEach(p),this.h()},h(){E(e,"bx--form__requirement",!0)},m(n,i){N(n,e,i),S(e,t)},p(n,i){i&8&&he(t,n[3])},d(n){n&&p(e)}}}function ht(l){let e,t,n,i,r,a,o,s,u=l[4]&&Te(l);const d=l[8].default,b=ce(d,l,l[7],null);let c=l[2]&&Ee(l),_=[{"data-invalid":i=l[1]||void 0},{"aria-labelledby":r=l[6]["aria-labelledby"]||l[5]},l[6]],g={};for(let f=0;f<_.length;f+=1)g=j(g,_[f]);return{c(){e=D("fieldset"),u&&u.c(),t=z(),b&&b.c(),n=z(),c&&c.c(),this.h()},l(f){e=P(f,"FIELDSET",{"data-invalid":!0,"aria-labelledby":!0});var h=V(e);u&&u.l(h),t=O(h),b&&b.l(h),n=O(h),c&&c.l(h),h.forEach(p),this.h()},h(){W(e,g),E(e,"bx--fieldset",!0),E(e,"bx--fieldset--no-margin",l[0])},m(f,h){N(f,e,h),u&&u.m(e,null),S(e,t),b&&b.m(e,null),S(e,n),c&&c.m(e,null),a=!0,o||(s=[q(e,"click",l[9]),q(e,"mouseover",l[10]),q(e,"mouseenter",l[11]),q(e,"mouseleave",l[12])],o=!0)},p(f,[h]){f[4]?u?u.p(f,h):(u=Te(f),u.c(),u.m(e,t)):u&&(u.d(1),u=null),b&&b.p&&(!a||h&128)&&de(b,d,f,f[7],a?me(d,f[7],h,null):_e(f[7]),null),f[2]?c?c.p(f,h):(c=Ee(f),c.c(),c.m(e,null)):c&&(c.d(1),c=null),W(e,g=oe(_,[(!a||h&2&&i!==(i=f[1]||void 0))&&{"data-invalid":i},(!a||h&96&&r!==(r=f[6]["aria-labelledby"]||f[5]))&&{"aria-labelledby":r},h&64&&f[6]])),E(e,"bx--fieldset",!0),E(e,"bx--fieldset--no-margin",f[0])},i(f){a||(k(b,f),a=!0)},o(f){T(b,f),a=!1},d(f){f&&p(e),u&&u.d(),b&&b.d(f),c&&c.d(),o=!1,ue(s)}}}function gt(l,e,t){const n=["noMargin","invalid","message","messageText","legendText","legendId"];let i=X(e,n),{$$slots:r={},$$scope:a}=e,{noMargin:o=!1}=e,{invalid:s=!1}=e,{message:u=!1}=e,{messageText:d=""}=e,{legendText:b=""}=e,{legendId:c=""}=e;function _(v){L.call(this,l,v)}function g(v){L.call(this,l,v)}function f(v){L.call(this,l,v)}function h(v){L.call(this,l,v)}return l.$$set=v=>{e=j(j({},e),fe(v)),t(6,i=X(e,n)),"noMargin"in v&&t(0,o=v.noMargin),"invalid"in v&&t(1,s=v.invalid),"message"in v&&t(2,u=v.message),"messageText"in v&&t(3,d=v.messageText),"legendText"in v&&t(4,b=v.legendText),"legendId"in v&&t(5,c=v.legendId),"$$scope"in v&&t(7,a=v.$$scope)},[o,s,u,d,b,c,i,a,r,_,g,f,h]}class bt extends te{constructor(e){super(),le(this,e,gt,ht,x,{noMargin:0,invalid:1,message:2,messageText:3,legendText:4,legendId:5})}}const Se=bt;function vt(l){let e,t,n,i,r,a,o=[l[0]],s={};for(let u=0;u{e=j(j({},e),fe(u)),t(0,i=X(e,n))},[i,r,a,o,s]}class kt extends te{constructor(e){super(),le(this,e,pt,vt,x,{})}}const Tt=kt,Et=l=>({}),Ie=l=>({});function ye(l){let e,t;const n=l[11].legendText,i=ce(n,l,l[10],Ie),r=i||St(l);return{c(){e=D("legend"),r&&r.c(),this.h()},l(a){e=P(a,"LEGEND",{});var o=V(e);r&&r.l(o),o.forEach(p),this.h()},h(){E(e,"bx--label",!0),E(e,"bx--visually-hidden",l[2])},m(a,o){N(a,e,o),r&&r.m(e,null),t=!0},p(a,o){i?i.p&&(!t||o&1024)&&de(i,n,a,a[10],t?me(n,a[10],o,Et):_e(a[10]),Ie):r&&r.p&&(!t||o&2)&&r.p(a,t?o:-1),(!t||o&4)&&E(e,"bx--visually-hidden",a[2])},i(a){t||(k(r,a),t=!0)},o(a){T(r,a),t=!1},d(a){a&&p(e),r&&r.d(a)}}}function St(l){let e;return{c(){e=U(l[1])},l(t){e=Y(t,l[1])},m(t,n){N(t,e,n)},p(t,n){n&2&&he(e,t[1])},d(t){t&&p(e)}}}function It(l){let e,t,n,i,r,a,o=(l[1]||l[8].legendText)&&ye(l);const s=l[11].default,u=ce(s,l,l[10],null);let d=[{id:l[5]},l[7]],b={};for(let c=0;c{o=null}),ee()),u&&u.p&&(!i||_&1024)&&de(u,s,c,c[10],i?me(s,c[10],_,null):_e(c[10]),null),(!i||_&1)&&(t.disabled=c[0]),(!i||_&16)&&E(t,"bx--radio-button-group--vertical",c[4]==="vertical"),(!i||_&8)&&E(t,"bx--radio-button-group--label-left",c[3]==="left"),(!i||_&8)&&E(t,"bx--radio-button-group--label-right",c[3]==="right"),W(e,b=oe(d,[(!i||_&32)&&{id:c[5]},_&128&&c[7]])),E(e,"bx--form-item",!0)},i(c){i||(k(o),k(u,c),i=!0)},o(c){T(o),T(u,c),i=!1},d(c){c&&p(e),o&&o.d(),u&&u.d(c),r=!1,ue(a)}}}function yt(l,e,t){const n=["selected","disabled","legendText","hideLegend","labelPosition","orientation","id"];let i=X(e,n),r,{$$slots:a={},$$scope:o}=e;const s=Le(a);let{selected:u=void 0}=e,{disabled:d=!1}=e,{legendText:b=""}=e,{hideLegend:c=!1}=e,{labelPosition:_="right"}=e,{orientation:g="horizontal"}=e,{id:f=void 0}=e;const h=Je(),v=Ce(u);re(l,v,m=>t(16,r=m)),Ke("RadioButtonGroup",{selectedValue:v,add:({checked:m,value:K})=>{m&&v.set(K)},update:m=>{t(9,u=m)}}),Ue(()=>{ve(v,r=u,r)}),Ye(()=>{ve(v,r=u,r)}),v.subscribe(m=>{t(9,u=m),h("change",m)});function y(m){L.call(this,l,m)}function G(m){L.call(this,l,m)}function J(m){L.call(this,l,m)}function M(m){L.call(this,l,m)}return l.$$set=m=>{e=j(j({},e),fe(m)),t(7,i=X(e,n)),"selected"in m&&t(9,u=m.selected),"disabled"in m&&t(0,d=m.disabled),"legendText"in m&&t(1,b=m.legendText),"hideLegend"in m&&t(2,c=m.hideLegend),"labelPosition"in m&&t(3,_=m.labelPosition),"orientation"in m&&t(4,g=m.orientation),"id"in m&&t(5,f=m.id),"$$scope"in m&&t(10,o=m.$$scope)},[d,b,c,_,g,f,v,i,s,u,o,a,y,G,J,M]}class Dt extends te{constructor(e){super(),le(this,e,yt,It,x,{selected:9,disabled:0,legendText:1,hideLegend:2,labelPosition:3,orientation:4,id:5})}}const Pt=Dt,Ge="huggingface",ge=l=>Qe({queryFn:()=>fetch(`https://datasets-server.huggingface.co/is-valid?dataset=${l}`).then(e=>e.status===200),queryKey:[Ge,"isValid",l]}),He=(l,e)=>Qe({queryFn:()=>fetch(`https://datasets-server.huggingface.co/splits?dataset=${l}&config=${e||""}`).then(t=>t.json()),queryKey:[Ge,"getSplits",l,e],select:t=>t.splits});function Vt(l){let e,t,n;function i(a){l[14](a)}let r={invalid:l[1],invalidText:l[2],labelText:"Config",placeholder:"(optional)"};return l[0]!==void 0&&(r.value=l[0]),e=new se({props:r}),Z.push(()=>ne(e,"value",i)),{c(){Q(e.$$.fragment)},l(a){B(e.$$.fragment,a)},m(a,o){A(e,a,o),n=!0},p(a,o){const s={};o&2&&(s.invalid=a[1]),o&4&&(s.invalidText=a[2]),!t&&o&1&&(t=!0,s.value=a[0],ie(()=>t=!1)),e.$set(s)},i(a){n||(k(e.$$.fragment,a),n=!0)},o(a){T(e.$$.fragment,a),n=!1},d(a){C(e,a)}}}function Nt(l){let e,t;return e=new Ae({props:{value:l[0]||"",invalid:l[1],invalidText:l[2],warn:!l[3],warnText:"Dataset doesn't exist",titleText:"Config",placeholder:"(optional)",items:l[4]}}),e.$on("select",l[12]),e.$on("clear",l[13]),{c(){Q(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,i){A(e,n,i),t=!0},p(n,i){const r={};i&1&&(r.value=n[0]||""),i&2&&(r.invalid=n[1]),i&4&&(r.invalidText=n[2]),i&8&&(r.warn=!n[3]),i&16&&(r.items=n[4]),e.$set(r)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){C(e,n)}}}function Ft(l){let e,t,n,i;const r=[Nt,Vt],a=[];function o(s,u){return s[4]&&s[3]?0:1}return e=o(l),t=a[e]=r[e](l),{c(){t.c(),n=w()},l(s){t.l(s),n=w()},m(s,u){a[e].m(s,u),N(s,n,u),i=!0},p(s,[u]){let d=e;e=o(s),e===d?a[e].p(s,u):($(),T(a[d],1,1,()=>{a[d]=null}),ee(),t=a[e],t?t.p(s,u):(t=a[e]=r[e](s),t.c()),k(t,1),t.m(n.parentNode,n))},i(s){i||(k(t),i=!0)},o(s){T(t),i=!1},d(s){a[e].d(s),s&&p(n)}}}function qt(l,e,t){let n,i,r,a,o,s,u,d=R,b=()=>(d(),d=ae(a,m=>t(10,u=m)),a),c,_=R,g=()=>(_(),_=ae(i,m=>t(11,c=m)),i);l.$$.on_destroy.push(()=>d()),l.$$.on_destroy.push(()=>_());let{value:f}=e,{invalid:h}=e,{invalidText:v}=e,{rootValue:y}=e;const G=m=>{var K;return t(0,f=(K=m.detail.selectedItem)==null?void 0:K.id)},J=()=>t(0,f=void 0);function M(m){f=m,t(0,f)}return l.$$set=m=>{"value"in m&&t(0,f=m.value),"invalid"in m&&t(1,h=m.invalid),"invalidText"in m&&t(2,v=m.invalidText),"rootValue"in m&&t(7,y=m.rootValue)},l.$$.update=()=>{l.$$.dirty&128&&t(9,n=y.dataset_name),l.$$.dirty&512&&g(t(6,i=ge(n))),l.$$.dirty&2048&&t(3,r=c.data===!0),l.$$.dirty&520&&b(t(5,a=r?He(n):void 0)),l.$$.dirty&1024&&t(8,o=u!=null&&u.data?new Set(u.data.map(m=>m.config)):void 0),l.$$.dirty&256&&t(4,s=o?[...o].map(m=>({id:m,text:m})):void 0)},[f,h,v,r,s,a,i,y,o,n,u,c,G,J,M]}class De extends te{constructor(e){super(),le(this,e,qt,Ft,x,{value:0,invalid:1,invalidText:2,rootValue:7})}}function Lt(l){let e,t,n;function i(a){l[6](a)}let r={invalid:l[1],invalidText:l[2],warn:!l[3],warnText:"Dataset doesn't exist"};return l[0]!==void 0&&(r.value=l[0]),e=new se({props:r}),Z.push(()=>ne(e,"value",i)),{c(){Q(e.$$.fragment)},l(a){B(e.$$.fragment,a)},m(a,o){A(e,a,o),n=!0},p(a,[o]){const s={};o&2&&(s.invalid=a[1]),o&4&&(s.invalidText=a[2]),o&8&&(s.warn=!a[3]),!t&&o&1&&(t=!0,s.value=a[0],ie(()=>t=!1)),e.$set(s)},i(a){n||(k(e.$$.fragment,a),n=!0)},o(a){T(e.$$.fragment,a),n=!1},d(a){C(e,a)}}}function Qt(l,e,t){let n,i,r,a=R,o=()=>(a(),a=ae(n,c=>t(5,r=c)),n);l.$$.on_destroy.push(()=>a());let{value:s}=e,{invalid:u}=e,{invalidText:d}=e;function b(c){s=c,t(0,s)}return l.$$set=c=>{"value"in c&&t(0,s=c.value),"invalid"in c&&t(1,u=c.invalid),"invalidText"in c&&t(2,d=c.invalidText)},l.$$.update=()=>{l.$$.dirty&1&&o(t(4,n=ge(s))),l.$$.dirty&32&&t(3,i=r.data===!0)},[s,u,d,i,n,r,b]}class Pe extends te{constructor(e){super(),le(this,e,Qt,Lt,x,{value:0,invalid:1,invalidText:2})}}function Bt(l){let e,t,n;function i(a){l[14](a)}let r={invalid:l[1],invalidText:l[2],labelText:"Split",placeholder:"(optional)"};return l[0]!==void 0&&(r.value=l[0]),e=new se({props:r}),Z.push(()=>ne(e,"value",i)),{c(){Q(e.$$.fragment)},l(a){B(e.$$.fragment,a)},m(a,o){A(e,a,o),n=!0},p(a,o){const s={};o&2&&(s.invalid=a[1]),o&4&&(s.invalidText=a[2]),!t&&o&1&&(t=!0,s.value=a[0],ie(()=>t=!1)),e.$set(s)},i(a){n||(k(e.$$.fragment,a),n=!0)},o(a){T(e.$$.fragment,a),n=!1},d(a){C(e,a)}}}function At(l){let e,t;return e=new Ae({props:{invalid:l[1],invalidText:l[2],warn:!l[3],warnText:"Dataset doesn't exist",titleText:"Split",placeholder:"(optional)",items:l[4]}}),e.$on("select",l[12]),e.$on("clear",l[13]),{c(){Q(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,i){A(e,n,i),t=!0},p(n,i){const r={};i&2&&(r.invalid=n[1]),i&4&&(r.invalidText=n[2]),i&8&&(r.warn=!n[3]),i&16&&(r.items=n[4]),e.$set(r)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){C(e,n)}}}function Ct(l){let e,t,n,i;const r=[At,Bt],a=[];function o(s,u){return s[4]&&s[3]?0:1}return e=o(l),t=a[e]=r[e](l),{c(){t.c(),n=w()},l(s){t.l(s),n=w()},m(s,u){a[e].m(s,u),N(s,n,u),i=!0},p(s,[u]){let d=e;e=o(s),e===d?a[e].p(s,u):($(),T(a[d],1,1,()=>{a[d]=null}),ee(),t=a[e],t?t.p(s,u):(t=a[e]=r[e](s),t.c()),k(t,1),t.m(n.parentNode,n))},i(s){i||(k(t),i=!0)},o(s){T(t),i=!1},d(s){a[e].d(s),s&&p(n)}}}function Gt(l,e,t){let n,i,r,a,o,s,u,d=R,b=()=>(d(),d=ae(o,m=>t(10,u=m)),o),c,_=R,g=()=>(_(),_=ae(r,m=>t(11,c=m)),r);l.$$.on_destroy.push(()=>d()),l.$$.on_destroy.push(()=>_());let{value:f}=e,{invalid:h}=e,{invalidText:v}=e,{rootValue:y}=e;const G=m=>t(0,f=m.detail.selectedId.split("/")[1]),J=()=>t(0,f=void 0);function M(m){f=m,t(0,f)}return l.$$set=m=>{"value"in m&&t(0,f=m.value),"invalid"in m&&t(1,h=m.invalid),"invalidText"in m&&t(2,v=m.invalidText),"rootValue"in m&&t(7,y=m.rootValue)},l.$$.update=()=>{var m;l.$$.dirty&128&&t(9,n=y.dataset_name),l.$$.dirty&128&&t(8,i=y.config_name),l.$$.dirty&512&&g(t(6,r=ge(n))),l.$$.dirty&2048&&t(3,a=c.data===!0),l.$$.dirty&776&&b(t(5,o=a?He(n,i):void 0)),l.$$.dirty&1024&&t(4,s=(m=u==null?void 0:u.data)==null?void 0:m.map(K=>({id:`${K.config}/${K.split}`,text:`${K.config}/${K.split}`})))},[f,h,v,a,s,o,r,y,i,n,u,c,G,J,M]}class Ve extends te{constructor(e){super(),le(this,e,Gt,Ct,x,{value:0,invalid:1,invalidText:2,rootValue:7})}}function Ht(l){const e=l.slice(),t=e[11].data;return e[23]=t,e}function Ne(l,e,t){const n=l.slice();return n[24]=e[t],n}function jt(l){let e,t,n,i,r,a,o,s,u;return{c(){e=D("div"),t=D("span"),n=U("You do not have authorization to create a dataset."),i=z(),r=D("span"),a=U("For HuggingFace spaces, you can duplicate this space and remove authentication. See "),o=D("a"),s=U("Duplicating the HuggingFace demo"),u=U("."),this.h()},l(d){e=P(d,"DIV",{class:!0});var b=V(e);t=P(b,"SPAN",{class:!0});var c=V(t);n=Y(c,"You do not have authorization to create a dataset."),c.forEach(p),i=O(b),r=P(b,"SPAN",{});var _=V(r);a=Y(_,"For HuggingFace spaces, you can duplicate this space and remove authentication. See "),o=P(_,"A",{href:!0});var g=V(o);s=Y(g,"Duplicating the HuggingFace demo"),g.forEach(p),u=Y(_,"."),_.forEach(p),b.forEach(p),this.h()},h(){H(t,"class","mb-2"),H(o,"href","https://lilacml.com/huggingface/huggingface_spaces.html"),H(e,"class","mt-4 flex flex-col border border-neutral-100 bg-red-100 p-2")},m(d,b){N(d,e,b),S(e,t),S(t,n),S(e,i),S(e,r),S(r,a),S(r,o),S(o,s),S(r,u)},p:R,i:R,o:R,d(d){d&&p(e)}}}function Mt(l){let e,t;return e=new mt({props:{class:"py-8",$$slots:{default:[wt]},$$scope:{ctx:l}}}),{c(){Q(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,i){A(e,n,i),t=!0},p(n,i){const r={};i&134221055&&(r.$$scope={dirty:i,ctx:n}),e.$set(r)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){C(e,n)}}}function Rt(l){let e,t,n,i,r,a,o,s,u,d;function b(f){l[17](f)}let c={labelText:"namespace",invalid:l[5]!=null,invalidText:l[5]};l[0]!==void 0&&(c.value=l[0]),t=new se({props:c}),Z.push(()=>ne(t,"value",b));function _(f){l[18](f)}let g={labelText:"name",invalid:l[6]!=null,invalidText:l[6]};return l[1]!==void 0&&(g.value=l[1]),s=new se({props:g}),Z.push(()=>ne(s,"value",_)),{c(){e=D("div"),Q(t.$$.fragment),i=z(),r=D("span"),a=U("/"),o=z(),Q(s.$$.fragment),this.h()},l(f){e=P(f,"DIV",{class:!0});var h=V(e);B(t.$$.fragment,h),i=O(h),r=P(h,"SPAN",{class:!0});var v=V(r);a=Y(v,"/"),v.forEach(p),o=O(h),B(s.$$.fragment,h),h.forEach(p),this.h()},h(){H(r,"class","mx-4 mt-6 text-lg"),H(e,"class","flex flex-row content-start")},m(f,h){N(f,e,h),A(t,e,null),S(e,i),S(e,r),S(r,a),S(e,o),A(s,e,null),d=!0},p(f,h){const v={};h&32&&(v.invalid=f[5]!=null),h&32&&(v.invalidText=f[5]),!n&&h&1&&(n=!0,v.value=f[0],ie(()=>n=!1)),t.$set(v);const y={};h&64&&(y.invalid=f[6]!=null),h&64&&(y.invalidText=f[6]),!u&&h&2&&(u=!0,y.value=f[1],ie(()=>u=!1)),s.$set(y)},i(f){d||(k(t.$$.fragment,f),k(s.$$.fragment,f),d=!0)},o(f){T(t.$$.fragment,f),T(s.$$.fragment,f),d=!1},d(f){f&&p(e),C(t),C(s)}}}function zt(l){let e,t;return e=new Be({props:{kind:"error",title:"Error",subtitle:l[3].error.message,hideCloseButton:!0}}),{c(){Q(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,i){A(e,n,i),t=!0},p(n,i){const r={};i&8&&(r.subtitle=n[3].error.message),e.$set(r)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){C(e,n)}}}function Ot(l){let e,t,n,i;function r(o){l[19](o)}let a={$$slots:{default:[Kt]},$$scope:{ctx:l}};return l[2]!==void 0&&(a.selected=l[2]),t=new Pt({props:a}),Z.push(()=>ne(t,"selected",r)),{c(){e=D("div"),Q(t.$$.fragment)},l(o){e=P(o,"DIV",{});var s=V(e);B(t.$$.fragment,s),s.forEach(p)},m(o,s){N(o,e,s),A(t,e,null),i=!0},p(o,s){const u={};s&134218752&&(u.$$scope={dirty:s,ctx:o}),!n&&s&4&&(n=!0,u.selected=o[2],ie(()=>n=!1)),t.$set(u)},i(o){i||(k(t.$$.fragment,o),i=!0)},o(o){T(t.$$.fragment,o),i=!1},d(o){o&&p(e),C(t)}}}function Jt(l){let e,t;return e=new Tt({}),{c(){Q(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,i){A(e,n,i),t=!0},p:R,i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){C(e,n)}}}function Fe(l){let e,t;return e=new ft({props:{labelText:l[24],value:l[24]}}),{c(){Q(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,i){A(e,n,i),t=!0},p(n,i){const r={};i&1024&&(r.labelText=n[24]),i&1024&&(r.value=n[24]),e.$set(r)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){C(e,n)}}}function Kt(l){let e,t,n=l[10],i=[];for(let a=0;aT(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;ane(e,"value",r)),Z.push(()=>ne(e,"validationErrors",a)),{c(){Q(e.$$.fragment)},l(s){B(e.$$.fragment,s)},m(s,u){A(e,s,u),i=!0},p(s,u){const d={};u&2048&&(d.schema=s[23]),u&4&&(d.customComponents=s[2]==="huggingface"?{"/dataset_name":Pe,"/split":Ve,"/config_name":De}:{}),!t&&u&128&&(t=!0,d.value=s[7],ie(()=>t=!1)),!n&&u&16&&(n=!0,d.validationErrors=s[4],ie(()=>n=!1)),e.$set(d)},i(s){i||(k(e.$$.fragment,s),i=!0)},o(s){T(e.$$.fragment,s),i=!1},d(s){C(e,s)}}}function Xt(l){let e,t,n,i,r,a,o;const s=[Jt,Ot,zt],u=[];function d(f,h){return f[3].isFetching?0:f[10]!=null?1:f[3].isError?2:-1}~(e=d(l))&&(t=u[e]=s[e](l));const b=[Wt,Yt,Ut],c=[];function _(f,h){return f[11].isSuccess?0:f[11].isError?1:f[11].isLoading?2:-1}function g(f,h){return h===0?Ht(f):f}return~(i=_(l))&&(r=c[i]=b[i](g(l,i))),{c(){t&&t.c(),n=z(),r&&r.c(),a=w()},l(f){t&&t.l(f),n=O(f),r&&r.l(f),a=w()},m(f,h){~e&&u[e].m(f,h),N(f,n,h),~i&&c[i].m(f,h),N(f,a,h),o=!0},p(f,h){let v=e;e=d(f),e===v?~e&&u[e].p(f,h):(t&&($(),T(u[v],1,1,()=>{u[v]=null}),ee()),~e?(t=u[e],t?t.p(f,h):(t=u[e]=s[e](f),t.c()),k(t,1),t.m(n.parentNode,n)):t=null);let y=i;i=_(f),i===y?~i&&c[i].p(g(f,i),h):(r&&($(),T(c[y],1,1,()=>{c[y]=null}),ee()),~i?(r=c[i],r?r.p(g(f,i),h):(r=c[i]=b[i](g(f,i)),r.c()),k(r,1),r.m(a.parentNode,a)):r=null)},i(f){o||(k(t),k(r),o=!0)},o(f){T(t),T(r),o=!1},d(f){~e&&u[e].d(f),f&&p(n),~i&&c[i].d(f),f&&p(a)}}}function Zt(l){let e;return{c(){e=U("Add")},l(t){e=Y(t,"Add")},m(t,n){N(t,e,n)},d(t){t&&p(e)}}}function wt(l){var o;let e,t,n,i,r,a;return e=new Se({props:{legendText:"Name",$$slots:{default:[Rt]},$$scope:{ctx:l}}}),n=new Se({props:{legendText:"Data Loader",$$slots:{default:[Xt]},$$scope:{ctx:l}}}),r=new et({props:{disabled:((o=l[4])==null?void 0:o.length)>0||l[6]!=null||l[5]!=null,$$slots:{default:[Zt]},$$scope:{ctx:l}}}),r.$on("click",l[15]),{c(){Q(e.$$.fragment),t=z(),Q(n.$$.fragment),i=z(),Q(r.$$.fragment)},l(s){B(e.$$.fragment,s),t=O(s),B(n.$$.fragment,s),i=O(s),B(r.$$.fragment,s)},m(s,u){A(e,s,u),N(s,t,u),A(n,s,u),N(s,i,u),A(r,s,u),a=!0},p(s,u){var _;const d={};u&134217827&&(d.$$scope={dirty:u,ctx:s}),e.$set(d);const b={};u&134220956&&(b.$$scope={dirty:u,ctx:s}),n.$set(b);const c={};u&112&&(c.disabled=((_=s[4])==null?void 0:_.length)>0||s[6]!=null||s[5]!=null),u&134217728&&(c.$$scope={dirty:u,ctx:s}),r.$set(c)},i(s){a||(k(e.$$.fragment,s),k(n.$$.fragment,s),k(r.$$.fragment,s),a=!0)},o(s){T(e.$$.fragment,s),T(n.$$.fragment,s),T(r.$$.fragment,s),a=!1},d(s){C(e,s),s&&p(t),C(n,s),s&&p(i),C(r,s)}}}function xt(l){let e,t,n,i,r,a,o,s;const u=[Mt,jt],d=[];function b(c,_){return c[9]?0:1}return a=b(l),o=d[a]=u[a](l),{c(){e=D("div"),t=D("div"),n=D("h2"),i=U("Add dataset"),r=z(),o.c(),this.h()},l(c){e=P(c,"DIV",{class:!0});var _=V(e);t=P(_,"DIV",{class:!0});var g=V(t);n=P(g,"H2",{});var f=V(n);i=Y(f,"Add dataset"),f.forEach(p),r=O(g),o.l(g),g.forEach(p),_.forEach(p),this.h()},h(){H(t,"class","new-form mx-auto flex h-full max-w-xl flex-col"),H(e,"class","flex h-full w-full gap-y-4 overflow-y-scroll p-4")},m(c,_){N(c,e,_),S(e,t),S(t,n),S(n,i),S(t,r),d[a].m(t,null),s=!0},p(c,_){let g=a;a=b(c),a===g?d[a].p(c,_):($(),T(d[g],1,1,()=>{d[g]=null}),ee(),o=d[a],o?o.p(c,_):(o=d[a]=u[a](c),o.c()),k(o,1),o.m(t,null))},i(c){s||(k(o),s=!0)},o(c){T(o),s=!1},d(c){c&&p(e),d[a].d()}}}function $t(l){let e,t;return e=new nt({props:{$$slots:{default:[xt]},$$scope:{ctx:l}}}),{c(){Q(e.$$.fragment)},l(n){B(e.$$.fragment,n)},m(n,i){A(e,n,i),t=!0},p(n,[i]){const r={};i&134221567&&(r.$$scope={dirty:i,ctx:n}),e.$set(r)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){C(e,n)}}}function el(l,e,t){let n,i,r,a,o,s,u,d=R,b=()=>(d(),d=ae(r,F=>t(11,u=F)),r);l.$$.on_destroy.push(()=>d());const c=Ze();re(l,c,F=>t(3,s=F));const _=we();re(l,_,F=>t(22,a=F));const g=xe();re(l,g,F=>t(16,o=F));let f="local",h="",v="huggingface",y=[],G,J,M={};function m(){y.length||a.mutate([v,{namespace:f,dataset_name:h,config:M}],{onSuccess:F=>{Xe(`/datasets/loading#${it(f,h)}/${F.task_id}`)}})}function K(F){f=F,t(0,f)}function I(F){h=F,t(1,h)}function je(F){v=F,t(2,v)}function Me(F){M=F,t(7,M),t(2,v)}function Re(F){y=F,t(4,y)}return l.$$.update=()=>{var F,be;l.$$.dirty&8&&t(10,n=(F=s.data)==null?void 0:F.sources.filter(ze=>ze!=="pandas")),l.$$.dirty&65536&&t(9,i=(be=o.data)==null?void 0:be.access.create_dataset),l.$$.dirty&1&&(f==null||f==""?t(5,G="Enter a namespace"):f.includes("/")?t(5,G='Namespace cannot contain "/"'):t(5,G=void 0)),l.$$.dirty&2&&(h==null||h==""?t(6,J="Enter a name"):h.includes("/")?t(6,J='Name cannot contain "/"'):t(6,J=void 0)),l.$$.dirty&4&&b(t(8,r=$e(v))),l.$$.dirty&4&&t(7,M.source_name=v,M)},[f,h,v,s,y,G,J,M,r,i,n,u,c,_,g,m,o,K,I,je,Me,Re]}class ol extends te{constructor(e){super(),le(this,e,el,$t,x,{})}}export{ol as component}; diff --git a/lilac/web/_app/immutable/nodes/8.19c87ebd.js b/lilac/web/_app/immutable/nodes/8.19c87ebd.js new file mode 100644 index 0000000000000000000000000000000000000000..bc5f9a9f37e7a3bb984788af50ff43777c153c97 --- /dev/null +++ b/lilac/web/_app/immutable/nodes/8.19c87ebd.js @@ -0,0 +1 @@ +import{S as ke,i as we,s as re,k as V,q as Y,a as J,y as P,l as D,m as j,r as Z,h as d,c as z,z as y,n as F,G as ae,b as N,a0 as b,A as C,u as le,g as u,v as Q,d as _,f as K,B as T,o as Ie,w as ie,T as oe,U as fe,a1 as U,ac as ue,O as ce,e as me,H as Ve}from"../chunks/index.b333a928.js";import{g as De}from"../chunks/navigation.1d886b5b.js";import{P as je}from"../chunks/Page.4b0754ae.js";import{B as Pe,aN as ye,at as Ce,aO as Te,aJ as Fe,aP as Oe,aQ as He,aR as Ne,av as Re,aw as qe,D as Ae,aS as Je,c as se,i as ze,d as Be}from"../chunks/Commands.1fffdf33.js";import{i as Me}from"../chunks/notificationsStore.e7f2bd3e.js";import{T as Ue,a as _e,b as pe,R as Ge}from"../chunks/RowItemMetadata.760ed6a3.js";import{T as Se,S as Le}from"../chunks/StringSpanHighlight.d53dc1a7.js";import{g as Qe,s as Ke}from"../chunks/utils.4eeb8687.js";function de(s){let t,n,e;return n=new Te({props:{source:s[0].json_schema.description}}),{c(){t=V("div"),P(n.$$.fragment),this.h()},l(r){t=D(r,"DIV",{class:!0});var l=j(t);y(n.$$.fragment,l),l.forEach(d),this.h()},h(){F(t,"class","text text-base text-gray-600")},m(r,l){N(r,t,l),C(n,t,null),e=!0},p(r,l){const a={};l&1&&(a.source=r[0].json_schema.description),n.$set(a)},i(r){e||(u(n.$$.fragment,r),e=!0)},o(r){_(n.$$.fragment,r),e=!1},d(r){r&&d(t),T(n)}}}function We(s){let t;return{c(){t=Y("Compute")},l(n){t=Z(n,"Compute")},m(n,e){N(n,t,e)},d(n){n&&d(t)}}}function Xe(s){let t,n;return t=new Ue({props:{$$slots:{content:[tt],default:[Ze]},$$scope:{ctx:s}}}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p(e,r){const l={};r&8389594&&(l.$$scope={dirty:r,ctx:e}),t.$set(l)},i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function Ye(s){let t,n;return t=new se({}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p:U,i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function Ze(s){let t,n,e,r;return t=new _e({props:{label:"Preview"}}),e=new _e({props:{label:"Raw response"}}),{c(){P(t.$$.fragment),n=J(),P(e.$$.fragment)},l(l){y(t.$$.fragment,l),n=z(l),y(e.$$.fragment,l)},m(l,a){C(t,l,a),N(l,n,a),C(e,l,a),r=!0},p:U,i(l){r||(u(t.$$.fragment,l),u(e.$$.fragment,l),r=!0)},o(l){_(t.$$.fragment,l),_(e.$$.fragment,l),r=!1},d(l){T(t,l),l&&d(n),T(e,l)}}}function ge(s){let t,n;return t=new Le({props:{text:s[1],row:s[6],spanPaths:s[3],valuePaths:s[7],embeddings:[]}}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p(e,r){const l={};r&2&&(l.text=e[1]),r&64&&(l.row=e[6]),r&8&&(l.spanPaths=e[3]),r&128&&(l.valuePaths=e[7]),t.$set(l)},i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function $e(s){let t,n;return t=new Ge({props:{row:s[6],visibleFields:s[8]}}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p(e,r){const l={};r&64&&(l.row=e[6]),r&256&&(l.visibleFields=e[8]),t.$set(l)},i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function he(s){let t,n,e;return{c(){t=V("div"),n=V("div"),e=Y(s[9]),this.h()},l(r){t=D(r,"DIV",{class:!0});var l=j(t);n=D(l,"DIV",{class:!0});var a=j(n);e=Z(a,s[9]),a.forEach(d),l.forEach(d),this.h()},h(){F(n,"class","text text-base"),F(t,"class","flex flex-row items-center")},m(r,l){N(r,t,l),b(t,n),b(n,e)},p(r,l){l&512&&le(e,r[9])},d(r){r&&d(t)}}}function xe(s){let t,n,e,r,l=s[7].length>0&&ge(s),a=s[8].length>0&&$e(s),f=s[9]!=null&&he(s);return{c(){t=V("div"),l&&l.c(),n=J(),a&&a.c(),e=J(),f&&f.c(),this.h()},l(o){t=D(o,"DIV",{class:!0});var i=j(t);l&&l.l(i),n=z(i),a&&a.l(i),e=z(i),f&&f.l(i),i.forEach(d),this.h()},h(){F(t,"class","mt-2")},m(o,i){N(o,t,i),l&&l.m(t,null),b(t,n),a&&a.m(t,null),b(t,e),f&&f.m(t,null),r=!0},p(o,i){o[7].length>0?l?(l.p(o,i),i&128&&u(l,1)):(l=ge(o),l.c(),u(l,1),l.m(t,n)):l&&(Q(),_(l,1,1,()=>{l=null}),K()),o[8].length>0?a?(a.p(o,i),i&256&&u(a,1)):(a=$e(o),a.c(),u(a,1),a.m(t,e)):a&&(Q(),_(a,1,1,()=>{a=null}),K()),o[9]!=null?f?f.p(o,i):(f=he(o),f.c(),f.m(t,null)):f&&(f.d(1),f=null)},i(o){r||(u(l),u(a),r=!0)},o(o){_(l),_(a),r=!1},d(o){o&&d(t),l&&l.d(),a&&a.d(),f&&f.d()}}}function et(s){let t,n;return t=new Se({props:{value:JSON.stringify(s[4].data.items[0],null,2),readonly:!0,rows:10,class:"mb-2 font-mono"}}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p(e,r){const l={};r&16&&(l.value=JSON.stringify(e[4].data.items[0],null,2)),t.$set(l)},i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function tt(s){let t,n,e,r;return t=new pe({props:{$$slots:{default:[xe]},$$scope:{ctx:s}}}),e=new pe({props:{$$slots:{default:[et]},$$scope:{ctx:s}}}),{c(){P(t.$$.fragment),n=J(),P(e.$$.fragment)},l(l){y(t.$$.fragment,l),n=z(l),y(e.$$.fragment,l)},m(l,a){C(t,l,a),N(l,n,a),C(e,l,a),r=!0},p(l,a){const f={};a&8389578&&(f.$$scope={dirty:a,ctx:l}),t.$set(f);const o={};a&8388624&&(o.$$scope={dirty:a,ctx:l}),e.$set(o)},i(l){r||(u(t.$$.fragment,l),u(e.$$.fragment,l),r=!0)},o(l){_(t.$$.fragment,l),_(e.$$.fragment,l),r=!1},d(l){T(t,l),l&&d(n),T(e,l)}}}function ve(s){var H;let t,n,e,r,l,a,f,o;function i(c){s[21](c)}function g(c){s[22](c)}let m={schema:s[0].json_schema,showDescription:!1,hiddenProperties:["/signal_name"],customComponents:s[16][(H=s[0])==null?void 0:H.name]};return s[2]!==void 0&&(m.value=s[2]),s[10]!==void 0&&(m.validationErrors=s[10]),l=new Fe({props:m}),ie.push(()=>oe(l,"value",i)),ie.push(()=>oe(l,"validationErrors",g)),{c(){t=V("div"),n=V("h4"),e=Y("Signal options"),r=J(),P(l.$$.fragment)},l(c){t=D(c,"DIV",{});var $=j(t);n=D($,"H4",{});var k=j(n);e=Z(k,"Signal options"),k.forEach(d),r=z($),y(l.$$.fragment,$),$.forEach(d)},m(c,$){N(c,t,$),b(t,n),b(n,e),b(t,r),C(l,t,null),o=!0},p(c,$){var G;const k={};$&1&&(k.schema=c[0].json_schema),$&1&&(k.customComponents=c[16][(G=c[0])==null?void 0:G.name]),!a&&$&4&&(a=!0,k.value=c[2],fe(()=>a=!1)),!f&&$&1024&&(f=!0,k.validationErrors=c[10],fe(()=>f=!1)),l.$set(k)},i(c){o||(u(l.$$.fragment,c),o=!0)},o(c){_(l.$$.fragment,c),o=!1},d(c){c&&d(t),T(l)}}}function nt(s){let t,n,e,r=s[0].json_schema.title+"",l,a,f,o,i,g,m,H,c,$,k,G,O,S,I,W,B,v=s[0].json_schema.description&&de(s);m=new Se({props:{value:s[5],cols:50,placeholder:"Paste text to try the signal.",rows:6,class:"mb-2"}}),m.$on("input",s[14]),k=new Pe({props:{$$slots:{default:[We]},$$scope:{ctx:s}}}),k.$on("click",s[20]);const x=[Ye,Xe],R=[];function X(p,E){var q,h;return(q=p[4])!=null&&q.isFetching?0:p[6]!=null&&p[1]!=null&&((h=p[4])==null?void 0:h.data)!=null?1:-1}~(S=X(s))&&(I=R[S]=x[S](s));let w=s[11]&&ve(s);return{c(){t=V("div"),n=V("div"),e=V("div"),l=Y(r),a=J(),v&&v.c(),f=J(),o=V("div"),i=V("div"),g=V("div"),P(m.$$.fragment),H=J(),c=V("div"),$=V("div"),P(k.$$.fragment),G=J(),O=V("div"),I&&I.c(),W=J(),w&&w.c(),this.h()},l(p){t=D(p,"DIV",{class:!0});var E=j(t);n=D(E,"DIV",{});var q=j(n);e=D(q,"DIV",{class:!0});var h=j(e);l=Z(h,r),h.forEach(d),a=z(q),v&&v.l(q),q.forEach(d),f=z(E),o=D(E,"DIV",{class:!0});var M=j(o);i=D(M,"DIV",{class:!0});var A=j(i);g=D(A,"DIV",{});var L=j(g);y(m.$$.fragment,L),H=z(L),c=D(L,"DIV",{class:!0});var ee=j(c);$=D(ee,"DIV",{class:!0});var te=j($);y(k.$$.fragment,te),te.forEach(d),ee.forEach(d),L.forEach(d),G=z(A),O=D(A,"DIV",{class:!0});var ne=j(O);I&&I.l(ne),ne.forEach(d),W=z(A),w&&w.l(A),A.forEach(d),M.forEach(d),E.forEach(d),this.h()},h(){F(e,"class","mb-4 flex flex-row items-center text-2xl font-semibold"),F($,"class","pt-4"),F(c,"class","flex flex-row justify-between"),F(O,"class","mb-8 mt-4 border-gray-200 pt-4"),ae(O,"border-t",s[1]!=null),F(i,"class","flex w-full flex-col gap-x-8"),F(o,"class","w-full"),F(t,"class","flex h-full w-full flex-col gap-y-8 px-10")},m(p,E){N(p,t,E),b(t,n),b(n,e),b(e,l),b(n,a),v&&v.m(n,null),b(t,f),b(t,o),b(o,i),b(i,g),C(m,g,null),b(g,H),b(g,c),b(c,$),C(k,$,null),b(i,G),b(i,O),~S&&R[S].m(O,null),b(i,W),w&&w.m(i,null),B=!0},p(p,[E]){(!B||E&1)&&r!==(r=p[0].json_schema.title+"")&&le(l,r),p[0].json_schema.description?v?(v.p(p,E),E&1&&u(v,1)):(v=de(p),v.c(),u(v,1),v.m(n,null)):v&&(Q(),_(v,1,1,()=>{v=null}),K());const q={};E&32&&(q.value=p[5]),m.$set(q);const h={};E&8388608&&(h.$$scope={dirty:E,ctx:p}),k.$set(h);let M=S;S=X(p),S===M?~S&&R[S].p(p,E):(I&&(Q(),_(R[M],1,1,()=>{R[M]=null}),K()),~S?(I=R[S],I?I.p(p,E):(I=R[S]=x[S](p),I.c()),u(I,1),I.m(O,null)):I=null),(!B||E&2)&&ae(O,"border-t",p[1]!=null),p[11]?w?(w.p(p,E),E&2048&&u(w,1)):(w=ve(p),w.c(),u(w,1),w.m(i,null)):w&&(Q(),_(w,1,1,()=>{w=null}),K())},i(p){B||(u(v),u(m.$$.fragment,p),u(k.$$.fragment,p),u(I),u(w),B=!0)},o(p){_(v),_(m.$$.fragment,p),_(k.$$.fragment,p),_(I),_(w),B=!1},d(p){p&&d(t),v&&v.d(),T(m),T(k),~S&&R[S].d(),w&&w.d()}}}function lt(s,t,n){let e,r,l,a,f,o=U,i=()=>(o(),o=ue(l,h=>n(19,f=h)),l),g,m=U,H=()=>(m(),m=ue(r,h=>n(4,g=h)),r);s.$$.on_destroy.push(()=>o()),s.$$.on_destroy.push(()=>m());let{signalInfo:c}=t,{text:$=void 0}=t,k=($==null?void 0:$.trim())||"";Ie(()=>{$!=null&&I()});function G(h){n(5,k=h.target.value),n(1,O=void 0)}let O,S={};function I(){n(1,O=k)}let W,B,v,x,R,X=[];const w={concept_score:{"/namespace":Oe,"/concept_name":He,"/embedding":Ne}},p=()=>I();function E(h){S=h,n(2,S)}function q(h){X=h,n(10,X)}return s.$$set=h=>{"signalInfo"in h&&n(0,c=h.signalInfo),"text"in h&&n(17,$=h.text)},s.$$.update=()=>{var h,M;if(s.$$.dirty&131072&&$!=null&&(n(5,k=$.trim()),n(1,O=void 0)),s.$$.dirty&5&&n(18,e={...S,signal_name:c.name}),s.$$.dirty&262146&&H(n(13,r=O!=null?ye({signal:e,inputs:[O]}):null)),s.$$.dirty&262144&&i(n(12,l=Ce({signal:e}))),s.$$.dirty&524312&&(g==null?void 0:g.data)!=null&&((h=f.data)==null?void 0:h.fields)!=null){n(9,R=null);const A=g.data.items[0],L=Re(f.data.fields);n(6,W=qe(A,L));const ee=Me(L);n(3,v=ee.spanPaths),n(7,B=ee.valuePaths);const te=Ae(L);n(8,x=te.filter(ne=>!v.some(Ee=>Je(ne.path,Ee)))),te.length===0&&n(9,R=A)}s.$$.dirty&1&&n(11,a=Object.keys(((M=c==null?void 0:c.json_schema)==null?void 0:M.properties)||{}).filter(A=>A!="signal_name").length>0)},[c,O,S,v,g,k,W,B,x,R,X,a,l,r,G,I,w,$,e,f,p,E,q]}class rt extends ke{constructor(t){super(),we(this,t,lt,nt,re,{signalInfo:0,text:17})}}function st(s){let t=s[3],n,e,r=be(s);return{c(){r.c(),n=me()},l(l){r.l(l),n=me()},m(l,a){r.m(l,a),N(l,n,a),e=!0},p(l,a){a&8&&re(t,t=l[3])?(Q(),_(r,1,1,U),K(),r=be(l),r.c(),u(r,1),r.m(n.parentNode,n)):r.p(l,a)},i(l){e||(u(r),e=!0)},o(l){_(r),e=!1},d(l){l&&d(n),r.d(l)}}}function at(s){let t,n=s[1].error+"",e;return{c(){t=V("p"),e=Y(n)},l(r){t=D(r,"P",{});var l=j(t);e=Z(l,n),l.forEach(d)},m(r,l){N(r,t,l),b(t,e)},p(r,l){l&2&&n!==(n=r[1].error+"")&&le(e,n)},i:U,o:U,d(r){r&&d(t)}}}function it(s){let t,n;return t=new se({}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p:U,i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function be(s){let t,n;return t=new rt({props:{signalInfo:s[3]}}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p(e,r){const l={};r&8&&(l.signalInfo=e[3]),t.$set(l)},i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function ot(s){let t,n,e,r,l;const a=[it,at,st],f=[];function o(i,g){var m,H,c;return(m=i[1])!=null&&m.isFetching?0:(H=i[1])!=null&&H.isError?1:(c=i[1])!=null&&c.isSuccess&&i[3]?2:-1}return~(e=o(s))&&(r=f[e]=a[e](s)),{c(){t=V("div"),n=V("div"),r&&r.c(),this.h()},l(i){t=D(i,"DIV",{class:!0});var g=j(t);n=D(g,"DIV",{class:!0});var m=j(n);r&&r.l(m),m.forEach(d),g.forEach(d),this.h()},h(){F(n,"class","lilac-page flex w-full"),F(t,"class","flex h-full w-full overflow-x-hidden overflow-y-scroll")},m(i,g){N(i,t,g),b(t,n),~e&&f[e].m(n,null),l=!0},p(i,g){let m=e;e=o(i),e===m?~e&&f[e].p(i,g):(r&&(Q(),_(f[m],1,1,()=>{f[m]=null}),K()),~e?(r=f[e],r?r.p(i,g):(r=f[e]=a[e](i),r.c()),u(r,1),r.m(n,null)):r=null)},i(i){l||(u(r),l=!0)},o(i){_(r),l=!1},d(i){i&&d(t),~e&&f[e].d()}}}function ft(s){let t,n;return t=new Be({props:{type:"blue",$$slots:{default:[ct]},$$scope:{ctx:s}}}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p(e,r){const l={};r&261&&(l.$$scope={dirty:r,ctx:e}),t.$set(l)},i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function ut(s){let t,n;return t=new se({}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p:U,i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function ct(s){let t,n,e,r;return{c(){t=V("a"),n=Y(s[0]),this.h()},l(l){t=D(l,"A",{class:!0,href:!0});var a=j(t);n=Z(a,s[0]),a.forEach(d),this.h()},h(){F(t,"class","font-semibold text-black"),F(t,"href",s[2])},m(l,a){N(l,t,a),b(t,n),e||(r=Ve(t,"click",s[7]),e=!0)},p(l,a){a&1&&le(n,l[0]),a&4&&F(t,"href",l[2])},d(l){l&&d(t),e=!1,r()}}}function mt(s){let t,n,e,r;const l=[ut,ft],a=[];function f(o,i){return o[1].isFetching?0:1}return n=f(s),e=a[n]=l[n](s),{c(){t=V("div"),e.c(),this.h()},l(o){t=D(o,"DIV",{slot:!0});var i=j(t);e.l(i),i.forEach(d),this.h()},h(){F(t,"slot","header-subtext")},m(o,i){N(o,t,i),a[n].m(t,null),r=!0},p(o,i){let g=n;n=f(o),n===g?a[n].p(o,i):(Q(),_(a[g],1,1,()=>{a[g]=null}),K(),e=a[n],e?e.p(o,i):(e=a[n]=l[n](o),e.c()),u(e,1),e.m(t,null))},i(o){r||(u(e),r=!0)},o(o){_(e),r=!1},d(o){o&&d(t),a[n].d()}}}function _t(s){let t,n;return t=new je({props:{$$slots:{"header-subtext":[mt],default:[ot]},$$scope:{ctx:s}}}),{c(){P(t.$$.fragment)},l(e){y(t.$$.fragment,e)},m(e,r){C(t,e,r),n=!0},p(e,[r]){const l={};r&271&&(l.$$scope={dirty:r,ctx:e}),t.$set(l)},i(e){n||(u(t.$$.fragment,e),n=!0)},o(e){_(t.$$.fragment,e),n=!1},d(e){T(t,e)}}}function pt(s,t,n){let e,r,l,a,f;const o=Qe();ce(s,o,m=>n(6,a=m));const i=ze();ce(s,i,m=>n(1,l=m));const g=()=>De(r);return s.$$.update=()=>{var m;s.$$.dirty&65&&a.page==="signals"&&a.identifier!=null&&f!=a.identifier&&n(0,f=a.identifier),s.$$.dirty&3&&n(3,e=(m=l.data)==null?void 0:m.find(H=>H.name===f)),s.$$.dirty&1&&n(2,r=f!=null?Ke(f):"")},[f,l,r,e,o,i,a,g]}class St extends ke{constructor(t){super(),we(this,t,pt,_t,re,{})}}export{St as component}; diff --git a/lilac/web/_app/version.json b/lilac/web/_app/version.json index 9a4e04c00b6b77c7845209172fc8ae64b1442688..29dd1c39767d54602746b51e8365ed7ec13b1e32 100644 --- a/lilac/web/_app/version.json +++ b/lilac/web/_app/version.json @@ -1 +1 @@ -{"version":"1692644237667"} \ No newline at end of file +{"version":"1692646464438"} \ No newline at end of file diff --git a/lilac/web/concepts.html b/lilac/web/concepts.html index 070a81c90258b9b8bcf0cbee89413e2938346753..f3a91d20b7991fe5ec109d7e571d868abaabf83e 100644 --- a/lilac/web/concepts.html +++ b/lilac/web/concepts.html @@ -5,17 +5,17 @@ - + - + - +