diff --git a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Burp Suite Professional Crack Linux HOT.md b/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Burp Suite Professional Crack Linux HOT.md deleted file mode 100644 index 58bc9706e68bfa94305d3e0111512a658866077d..0000000000000000000000000000000000000000 --- a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Burp Suite Professional Crack Linux HOT.md +++ /dev/null @@ -1,107 +0,0 @@ - -

Burp Suite Professional Crack Linux: What You Need to Know

-

If you are a web security tester, you might have heard of Burp Suite Professional, a powerful tool that helps you find and exploit vulnerabilities in web applications. But what if you want to use Burp Suite Professional without paying for it? Is there a way to crack it on Linux and use it for free? In this article, we will answer these questions and more. We will explain what Burp Suite Professional is, what Burp Suite Professional crack linux is, what are the risks of using it, and what are the alternatives to it. By the end of this article, you will have a better understanding of Burp Suite Professional crack linux and why you should avoid it.

-

Burp suite professional crack linux


Download 🗸 https://byltly.com/2uKw83



-

What is Burp Suite Professional?

-

Burp Suite Professional is a web security testing tool developed by PortSwigger, a company that specializes in web security research and software development. Burp Suite Professional is designed to help web security testers perform various tasks such as:

- -

Burp Suite Professional is widely used by web security testers around the world because of its features, usability, reliability, and support. It is considered one of the best web security testing tools in the market.

-

Why use Burp Suite Professional?

-

There are many reasons why you might want to use Burp Suite Professional for your web security testing projects. Some of them are:

- -

How much does Burp Suite Professional cost?

-

Burp Suite Professional is not a free tool. It requires a license to use it legally and fully. The license can be purchased from PortSwigger's website for either an individual or an enterprise user. The license can be either annual or perpetual. The annual license costs $399 per user per year, while the perpetual license costs $999 per user for the first year and $299 per user for each subsequent year. The license includes all updates and support for the duration of the license period. PortSwigger also offers discounts for academic institutions, non-profit organizations, and bulk purchases.

-

What is Burp Suite Professional crack linux?

-

Burp Suite Professional crack linux is an illegal way of using Burp Suite Professional without paying for it. It involves downloading a cracked version of Burp Suite Professional or using a loader or a keygen to bypass the license verification process. Burp Suite Professional crack linux is usually available on various websites or forums that offer pirated software or hacking tools. Some examples of these websites or forums are:

-

- -

Burp Suite Professional crack linux is often advertised as a free or cheap alternative to buying Burp Suite Professional from PortSwigger's website. However, using Burp Suite Professional crack linux is not only illegal but also risky.

-

How does Burp Suite Professional crack linux work?

-

Burp Suite Professional crack linux works by modifying or replacing some of the files or components of Burp Suite Professional that are responsible for checking the license validity. There are two main methods of cracking Burp Suite Professional on Linux:

- -

Both methods of cracking Burp Suite Professional on Linux are based on reverse engineering or exploiting the vulnerabilities of Burp Suite Professional's license verification mechanism. However, these methods are not reliable or secure, as they can be easily detected or blocked by PortSwigger or by the antivirus software on the user's system.

-

Where can you find Burp Suite Professional crack linux?

-

As mentioned earlier, Burp Suite Professional crack linux can be found on various websites or forums that offer pirated software or hacking tools. However, finding a working and safe version of Burp Suite Professional crack linux is not easy, as most of the links or files are either broken, outdated, infected, or fake. Moreover, these websites or forums are often full of ads, pop-ups, redirects, and other annoying or malicious elements that can harm the user's system or browser. Therefore, it is not advisable to visit or download anything from these websites or forums.

-

What are the risks of using Burp Suite Professional crack linux?

-

Using Burp Suite Professional crack linux is not worth the trouble, as it comes with many risks and consequences that can outweigh any perceived benefits. Some of the risks of using Burp Suite Professional crack linux are:

-

Legal risks

-

Using Burp Suite Professional crack linux is illegal, as it violates the terms of service and intellectual property rights of PortSwigger, the developer of Burp Suite Professional. PortSwigger has the right to take legal action against anyone who uses Burp Suite Professional crack linux for web security testing or any other purpose. PortSwigger can also revoke or blacklist the license keys that are generated by the keygens or used by the loaders. This means that users who use Burp Suite Professional crack linux can face lawsuits, fines, penalties, or even jail time for their actions.

-

Security risks

-

Using Burp Suite Professional crack linux is risky, as it exposes users to malware infections, data breaches, identity theft, and other cyberattacks. The cracked versions of Burp Suite Professional or the loaders or keygens that are used to crack it can contain viruses, trojans, worms, ransomware, spyware, adware, rootkits, backdoors, or other malicious code that can compromise the user's system or network. These malware can steal, delete, encrypt, modify, or leak the user's personal or professional data, such as passwords, credit card numbers, bank accounts, emails, files, documents, photos, videos, etc. They can also hijack the user's browser, webcam, microphone , or keyboard, and perform malicious actions on the user's behalf, such as sending spam, making fraudulent transactions, accessing restricted websites, etc. They can also damage or disable the user's system or network, and prevent the user from accessing or recovering their data.

-

Ethical risks

-

Using Burp Suite Professional crack linux is unethical, as it undermines the professionalism and credibility of web security testers and harms the web security community. Web security testers are expected to follow certain ethical principles and standards when performing their work, such as respecting the privacy and property of others, obtaining proper authorization and consent, reporting and disclosing vulnerabilities responsibly, and using legitimate and authorized tools and methods. Using Burp Suite Professional crack linux violates these ethical principles and standards, as it shows a lack of respect and integrity towards PortSwigger, the developer of Burp Suite Professional, and towards the web application owners and users, who trust web security testers to protect their web applications from cyber threats. Using Burp Suite Professional crack linux also harms the web security community, as it creates a negative image and reputation for web security testers, and reduces the trust and cooperation between them and the web application owners and developers.

-

What are the alternatives to Burp Suite Professional crack linux?

-

Using Burp Suite Professional crack linux is not the only way to perform web security testing. There are some legitimate and safe alternatives to Burp Suite Professional crack linux that can provide similar or better results without the risks and consequences. Some of these alternatives are:

-

Burp Suite Community Edition

-

Burp Suite Community Edition is a free version of Burp Suite that has limited features but still useful for web security testing. Burp Suite Community Edition allows users to perform basic tasks such as spidering, intercepting, scanning, and exploiting web applications. However, it does not have some of the advanced features of Burp Suite Professional, such as intruder, repeater, sequencer, comparer, decoder, extensions, macros, scripts, APIs, etc. Burp Suite Community Edition also has some limitations in terms of functionality and performance, such as a lower scanning speed, a smaller number of concurrent requests, a shorter session duration, etc. Burp Suite Community Edition can be downloaded from PortSwigger's website for free without any license or registration required.

-

Other web security testing tools

-

There are many other web security testing tools that can compete with or complement Burp Suite Professional in terms of features, pricing, and performance. Some of these tools are:

- - - - - - - - - - - - - - - - - - - - - - - - - - -
ToolFeaturesPricing
ZAP (Zed Attack Proxy)A free and open source web security testing tool that has similar features to Burp Suite Professional, such as spidering, intercepting, scanning, exploiting, and automating web applications. It also has some unique features, such as active and passive scanning modes, dynamic SSL certificates, AJAX spider, etc.Free
NetsparkerA commercial web security testing tool that has similar features to Burp Suite Professional, such as spidering, intercepting, scanning, exploiting, and automating web applications. It also has some unique features, such as proof-based scanning, vulnerability management, compliance reporting, etc.$1,950 per user per year for the standard edition, $4,950 per user per year for the enterprise edition.
AcunetixA commercial web security testing tool that has similar features to Burp Suite Professional, such as spidering, intercepting, scanning, exploiting, and automating web applications. It also has some unique features, such as interactive application security testing (IAST), network security scanning, malware detection, etc.$4,495 per user per year for the standard edition, $5,995 per user per year for the enterprise edition.
OWASP Web Testing Environment (WTE)A free and open source collection of web security testing tools that can be used together with Burp Suite Professional or separately. Some of the tools included in WTE are Nmap, Nikto, SQLmap, Metasploit, etc.Free
-

These are just some examples of the many web security testing tools that are available in the market. Users can choose the best tool for their needs and preferences based on their own research and comparison.

-

Official trial or subscription of Burp Suite Professional

-

The best alternative to Burp Suite Professional crack linux is to use the official trial or subscription of Burp Suite Professional from PortSwigger's website. This way, users can enjoy the full functionality and support of Burp Suite Professional without any legal, security, or ethical risks. PortSwigger offers a 30-day free trial of Burp Suite Professional for users who want to test its features and performance before buying it. Users can also buy an annual or perpetual license of Burp Suite Professional from PortSwigger's website with various payment options and discounts. Users who buy Burp Suite Professional from PortSwigger's website can also access the latest updates and support from PortSwigger's team and community.

-

Conclusion

-

Burp Suite Professional is a web security testing tool that helps users find and exploit vulnerabilities in web applications. However, using Burp Suite Professional crack linux is not a good idea, as it is illegal, risky, and unethical. Users who use Burp Suite Professional crack linux can face legal action from PortSwigger, malware infections from the cracked versions or loaders or keygens, and loss of professionalism and credibility in the web security community. Therefore, users should avoid using Burp Suite Professional crack linux and use one of the alternatives instead. Users can use Burp Suite Community Edition for free with limited features, other web security testing tools with similar or better features and pricing, or the official trial or subscription of Burp Suite Professional with full functionality and support. By doing so, users can perform web security testing legally and safely with Burp Suite Professional.

-

FAQs

-

Here are some frequently asked questions about Burp Suite Professional crack linux and its alternatives:

-
    -
  1. Is Burp Suite Professional crack linux safe?
  2. -

    No, Burp Suite Professional crack linux is not safe. It can contain malware that can infect your system or network, steal or leak your data, hijack your browser or devices, or damage or disable your system or network. It can also be detected or blocked by PortSwigger or by the antivirus software on your system.

    -
  3. Is Burp Suite Professional crack linux legal?
  4. -

    No, Burp Suite Professional crack linux is illegal. It violates the terms of service and intellectual property rights of PortSwigger, the developer of Burp Suite Professional. PortSwigger has the right to take legal action against anyone who uses Burp Suite Professional crack linux for web security testing or any other purpose. PortSwigger can also revoke or blacklist the license keys that are generated by the keygens or used by the loaders.

    -
  5. Is Burp Suite Professional crack linux ethical?
  6. -

    No, Burp Suite Professional crack linux is unethical. It undermines the professionalism and credibility of web security testers and harms the web security community. Web security testers are expected to follow certain ethical principles and standards when performing their work, such as respecting the privacy and property of others, obtaining proper authorization and consent, reporting and disclosing vulnerabilities responsibly, and using legitimate and authorized tools and methods. Using Burp Suite Professional crack linux violates these ethical principles and standards, as it shows a lack of respect and integrity towards PortSwigger, the developer of Burp Suite Professional, and towards the web application owners and users, who trust web security testers to protect their web applications from cyber threats. Using Burp Suite Professional crack linux also harms the web security community, as it creates a negative image and reputation for web security testers, and reduces the trust and cooperation between them and the web application owners and developers.

    -
  7. What is the difference between Burp Suite Professional and Burp Suite Community Edition?
  8. -

    Burp Suite Professional and Burp Suite Community Edition are two versions of Burp Suite, a web security testing tool developed by PortSwigger. Burp Suite Professional is a paid version that has a comprehensive set of features that cover all aspects of web security testing from reconnaissance to exploitation. Burp Suite Community Edition is a free version that has limited features but still useful for web security testing. Burp Suite Community Edition allows users to perform basic tasks such as spidering, intercepting, scanning, and exploiting web applications. However, it does not have some of the advanced features of Burp Suite Professional, such as intruder, repeater, sequencer, comparer, decoder, extensions, macros, scripts, APIs, etc. Burp Suite Community Edition also has some limitations in terms of functionality and performance, such as a lower scanning speed, a smaller number of concurrent requests, a shorter session duration, etc.

    -
  9. How can I get a free trial or a discount for Burp Suite Professional?
  10. -

    You can get a free trial or a discount for Burp Suite Professional from PortSwigger's website. PortSwigger offers a 30-day free trial of Burp Suite Professional for users who want to test its features and performance before buying it. You can sign up for the free trial on PortSwigger's website with your email address and download the latest version of Burp Suite Professional. You can also buy an annual or perpetual license of Burp Suite Professional from PortSwigger's website with various payment options and discounts. PortSwigger offers discounts for academic institutions, non-profit organizations, and bulk purchases. You can contact PortSwigger's sales team to request a quote or a discount code.

    -

    b2dd77e56b
    -
    -
    \ No newline at end of file diff --git a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/HDTracks Downloader Not Working? Try These Simple Solutions.md b/spaces/1acneusushi/gradio-2dmoleculeeditor/data/HDTracks Downloader Not Working? Try These Simple Solutions.md deleted file mode 100644 index 3dfb0cae161bdabd9595ac31757ab32dfefddc27..0000000000000000000000000000000000000000 --- a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/HDTracks Downloader Not Working? Try These Simple Solutions.md +++ /dev/null @@ -1,27 +0,0 @@ - -

    How to Fix HDTracks Downloader Not Working

    -

    If you are a music lover who enjoys high-resolution audio downloads from HDTracks, you may have encountered some issues with their download manager. Some users have reported that the download manager does not work, fails to parse the link, or stops midway through the download. This can be frustrating and disappointing, especially when you have paid for the music and want to enjoy it as soon as possible.

    -

    hdtracks downloader not working


    DOWNLOADhttps://byltly.com/2uKvBa



    -

    Fortunately, there are some possible solutions to fix HDTracks downloader not working. In this article, we will share some tips and tricks that may help you resolve the problem and get your music downloaded smoothly.

    -

    Check the Link

    -

    As this error is usually a result of the downloader not being able to parse the link provided, you should check the link to confirm it's accessible. Please access the link with a working browser to ensure it is working before proceeding with your attempt. If parsing error persists, please try the following:

    - -

    Restart the Downloader

    -

    Sometimes, the downloader may encounter a glitch or a network interruption that causes it to stop working. In this case, you can try restarting the downloader and resuming the download. Here are the steps:

    -
      -
    1. Exit the downloader program. You can delete the failed download files, but it will work even if you don't.
    2. -
    3. Restart the downloader from your applications or start folder. It will only download the failed tracks.
    4. -
    5. If the download still fails, try deleting the entire album folder and starting over.
    6. -
    -

    Update the Downloader

    -

    Another possible reason for HDTracks downloader not working is that you are using an outdated version of the downloader. HDTracks may release new versions of their downloader to fix bugs, improve performance, or add features. Therefore, you should always check if there is a newer version available and update your downloader accordingly. You can find the latest version of HDTracks downloader here.

    -

    -

    Contact HDTracks Support

    -

    If none of the above solutions work for you, you may need to contact HDTracks support team for further assistance. They are usually responsive and helpful, and they can provide you with alternative download methods or refund options if necessary. You can contact them via email at info@hdtracks.com or via phone at 1-888-HDTRACKS (1-888-438-7225).

    -

    We hope this article has helped you fix HDTracks downloader not working and enjoy your high-resolution music downloads. If you have any other questions or suggestions, please feel free to leave a comment below.

    ddb901b051
    -
    -
    \ No newline at end of file diff --git a/spaces/1gistliPinn/ChatGPT4/Examples/Archaeological Laboratory Methods An Introduction Downloadzip.md b/spaces/1gistliPinn/ChatGPT4/Examples/Archaeological Laboratory Methods An Introduction Downloadzip.md deleted file mode 100644 index a192707421bb0f8940dbb8757cd35ce536ce6f5e..0000000000000000000000000000000000000000 --- a/spaces/1gistliPinn/ChatGPT4/Examples/Archaeological Laboratory Methods An Introduction Downloadzip.md +++ /dev/null @@ -1,7 +0,0 @@ -
    -

    archaeology as a discipline studies the interactions between humans and the physical environment. how do we make sense of our surroundings and our worlds? archaeology is the study of that interaction. this course introduces the nature of the archaeology discipline and the major tools of archaeological data analysis and interpretation.

    -

    in this course we will study the archaeological processes of ceramics, stone tools, and other materials that comprise the archaeological record. we will examine the archaeological materials in the context of their archaeological context. for example, we will study both the physical characteristics of the archaeological materials and the methods archaeologists use to date them. we will examine the archaeology of the human body, and how the physical remains of the body (bones, teeth, fingernails, etc.) can be used to reconstruct the life of the individual that they belonged to.

    -

    Archaeological Laboratory Methods An Introduction Downloadzip


    DOWNLOADhttps://imgfil.com/2uxZcy



    -

    this course will introduce students to the scientific method, which underlies all scientific inquiry, and is one of the critical skills for all students to learn in a science, technology, engineering, and math (stem) course. we will cover the purpose of the scientific method, introduce the scientific method in its historical and current forms, and explore its relationship to the various disciplines (biology, geology, physics, archaeology, etc.). then, we will examine the scientific method through a series of activities. first, students will examine the purpose of the scientific method. second, students will design experiments, which they will conduct and analyze. we will also examine the methods of observation, correlation, and experimentation. finally, students will examine how the scientific method relates to other fields of study, including anthropology and archaeology.

    899543212b
    -
    -
    \ No newline at end of file diff --git a/spaces/1gistliPinn/ChatGPT4/Examples/Dharam Sankat Mein Hd 1080p Blu-ray Fixed Download Torrent.md b/spaces/1gistliPinn/ChatGPT4/Examples/Dharam Sankat Mein Hd 1080p Blu-ray Fixed Download Torrent.md deleted file mode 100644 index 095765d79320cd453ec0b425cc44c44d91dfb90a..0000000000000000000000000000000000000000 --- a/spaces/1gistliPinn/ChatGPT4/Examples/Dharam Sankat Mein Hd 1080p Blu-ray Fixed Download Torrent.md +++ /dev/null @@ -1,6 +0,0 @@ -

    Dharam Sankat Mein Hd 1080p Blu-ray Download Torrent


    Download >> https://imgfil.com/2uxYzi



    -
    -Dharam Sankat Mein Man 2 Full Movie In Hindi Hd 1080p . ... NH-8 ... Torrent Download free BluRay 720p HD, Free Full Movie Tera Intezaar . 1fdad05405
    -
    -
    -

    diff --git a/spaces/1phancelerku/anime-remove-background/Experience the Thrill of Tongits Offline - The No.1 Free Card Game in the Philippines.md b/spaces/1phancelerku/anime-remove-background/Experience the Thrill of Tongits Offline - The No.1 Free Card Game in the Philippines.md deleted file mode 100644 index d79d19b4d6a413fa2c44adf9ba980d150c740a65..0000000000000000000000000000000000000000 --- a/spaces/1phancelerku/anime-remove-background/Experience the Thrill of Tongits Offline - The No.1 Free Card Game in the Philippines.md +++ /dev/null @@ -1,106 +0,0 @@ -
    -

    Tongits Go Offline Download: How to Play the Popular Filipino Card Game Anytime, Anywhere

    -

    Tongits Go is a popular free card game in the Philippines that has more than 50 million Filipino players online. It is a rummy-type game that is similar to Gin Rummy, Tonk, and Mahjong. The objective of the game is to be the first to play all of your cards or to have the lowest score by forming sets and runs of cards. You can also lay off cards on other players' melds or call "Tongit" or "Draw" to end the game.

    -

    Tongits Go is not only a fun and exciting game, but also a social and cultural phenomenon in the Philippines. It is a way for Filipinos to connect with their friends, family, and fellow countrymen, as well as to showcase their skills and strategies. Tongits Go also offers various local games, such as Sabong, Mahjong, Pusoy, Slots, Color Game, and more, that cater to different tastes and preferences.

    -

    tongits go offline download


    Download File https://jinyurl.com/2uNNah



    -

    But what if you want to play Tongits Go without an internet connection? What if you want to enjoy the game without ads or in-app purchases? What if you want to practice your skills or have fun with artificial intelligence opponents? Well, there is a solution for that: Tongits Go offline mode. In this article, we will show you how to download Tongits Go offline mode, how to play it, and what are the benefits of playing it. Let's get started!

    -

    How to Download Tongits Go Offline Mode

    -

    Downloading Tongits Go offline mode is easy and simple. Just follow these steps:

    -
      -
    1. Go to the official website of Tongits Go ([11](https://tongitsgo.com)) or the app store (Google Play Store for Android devices or App Store for iOS devices) and download the game. You can also scan the QR code on the website or click on this link ([10](https://play.google.com/store/apps/details?id=com.tongitsgo.play)) for Android devices or this link ([9](https://apps.apple.com/ph/app/tongits-go/id1443568670)) for iOS devices.
    2. -
    3. Install the game and open it. You will see a welcome screen with two options: online mode and offline mode. Choose the offline mode option.
    4. -
    5. Start playing! You can choose from different game modes, such as Gold Table, Family Table, Ranking Game, or Tournament. You can also customize your avatar, table, theme, and settings.
    6. -
    -

    How to Play Tongits Go Offline Mode

    -

    Playing Tongits Go offline mode is similar to playing online mode, except that you don't need an internet connection and you don't have ads or in-app purchases. Here are some of the basic rules and features of Tongits Go offline mode:

    - -

    Tongits Go offline mode also offers different game modes and features that you can enjoy, such as:

    - -

    The Benefits of Playing Tongits Go Offline Mode

    -

    Playing Tongits Go offline mode has many benefits that you can enjoy, such as:

    - -

    Conclusion

    -

    Tongits Go is a popular Filipino card game that you can play online or offline. Offline mode allows you to play without an internet connection, without ads or in-app purchases, and with artificial intelligence opponents. You can also choose from different game modes, such as Gold Table, Family Table, Ranking Game, or Tournament. You can download Tongits Go offline mode from the official website or app store and start playing right away. Tongits Go offline mode is a great way to have fun, practice your skills, and connect with your culture. Download it now and enjoy!

    -

    tongits go offline download apk
    -tongits go offline download for pc
    -tongits go offline download ios
    -tongits go offline download free
    -tongits go offline download latest version
    -tongits go offline download app store
    -tongits go offline download google play
    -tongits go offline download mac
    -tongits go offline download windows 10
    -tongits go offline download laptop
    -tongits go offline download mod apk
    -tongits go offline download no internet
    -tongits go offline download without wifi
    -tongits go offline download update
    -tongits go offline download 2023
    -tongits go offline download hack
    -tongits go offline download cheat
    -tongits go offline download unlimited gold
    -tongits go offline download review
    -tongits go offline download rating
    -tongits go offline download game play
    -tongits go offline download tutorial
    -tongits go offline download tips and tricks
    -tongits go offline download rules and regulations
    -tongits go offline download how to play
    -tongits go offline download best strategy
    -tongits go offline download leaderboard
    -tongits go offline download jackpot
    -tongits go offline download hitpot
    -tongits go offline download table collection
    -tongits go offline download themes and tables
    -tongits go offline download rummy game
    -tongits go offline download filipino card game
    -tongits go offline download pinoy card game
    -tongits go offline download tung it game
    -tongits go offline download tonk game
    -tongits go offline download mahjong game
    -tongits go offline download poker game
    -tongits go offline download fun card game
    -tongits go offline download simulated card game
    -tongits go offline vs online mode
    -tongits go online vs. other players
    -tongits go online vs. computer
    -tongits go online vs. friends
    -tongits go online vs. real money
    -tongits go online vs. free gold
    -tongue its online vs. other card games

    -

    FAQs

    -

    Here are some frequently asked questions about Tongits Go offline mode:

    -
      -
    1. What are the minimum requirements to play Tongits Go offline mode?
    2. -

      To play Tongits Go offline mode, you need to have a device that runs on Android 4.4 or higher or iOS 9.0 or higher. You also need to have at least 100 MB of free storage space on your device.

      -
    3. How can I get free gold and rewards in Tongits Go offline mode?
    4. -

      You can get free gold and rewards in Tongits Go offline mode by playing games, completing tasks, logging in daily, inviting friends, watching videos, or joining events. You can also get free gold and rewards by playing online mode and syncing your account.

      -
    5. How can I play with my friends and family in Tongits Go offline mode?
    6. -

      You can play with your friends and family in Tongits Go offline mode by creating a Family Table and inviting them to join. You can also play with them online by adding them as friends and joining their tables.

      -
    7. How can I contact the developers of Tongits Go if I have any issues or feedback?
    8. -

      You can contact the developers of Tongits Go by sending an email to [8](mailto:support@tongitsgo.com) or by visiting their Facebook page ([7](https://www.facebook.com/TongitsGoOfficial)). You can also leave a review or rating on the app store or website.

      -
    9. What are some other popular card games in the Philippines that I can play offline?
    10. -

      Some other popular card games in the Philippines that you can play offline are Pusoy, Pusoy Dos, Lucky 9, Blackjack, Poker, and Baccarat. You can also play these games online on Tongits Go or other platforms.

      -

    401be4b1e0
    -
    -
    \ No newline at end of file diff --git a/spaces/1phancelerku/anime-remove-background/FR Legends APK 0.3.3.1 The Ultimate Drift Racing Game for Android - Customize Your Car and Compete Online.md b/spaces/1phancelerku/anime-remove-background/FR Legends APK 0.3.3.1 The Ultimate Drift Racing Game for Android - Customize Your Car and Compete Online.md deleted file mode 100644 index 8fd900e0ac1f6ee08745fdda061be11d00f0f775..0000000000000000000000000000000000000000 --- a/spaces/1phancelerku/anime-remove-background/FR Legends APK 0.3.3.1 The Ultimate Drift Racing Game for Android - Customize Your Car and Compete Online.md +++ /dev/null @@ -1,161 +0,0 @@ -
    - - - - - - - - -Red - -

    También debe asegurarse de que tiene Half-Life instalado en su PC, ya que Counter Strike 1.3 es un mod para Half-Life y requiere que se ejecute. Puedes comprar Half-Life en Steam u otras plataformas online, o usar tu propio CD-ROM si tienes uno.

    -

    Las fuentes y pasos de la descarga de Counter Strike 1.3

    - - -

    Después de haber descargado Counter Strike 1.3, puede iniciar el juego desde su escritorio o menú de inicio, y disfrutar jugando con sus amigos u otros jugadores en línea.

    -

    Conclusión

    -

    Resumen y recomendaciones

    -

    Counter Strike 1.3 es un clásico juego de FPS que puedes descargar y jugar en tu PC. Es un juego multijugador que enfrenta a dos equipos de Terroristas y Antiterroristas entre sí en varios mapas y modos. Es un juego que tiene muchas características y beneficios, como un juego divertido y adictivo, mejora de habilidades, satisfacción por la nostalgia y fácil instalación. También es un juego que tiene algunos desafíos y desventajas, tales como gráficos anticuados, errores y fallas, curva de aprendizaje empinada, y actualizaciones constantes.

    - -

    Preguntas frecuentes

    -

    Aquí están algunas de las preguntas más frecuentes sobre Counter Strike 1.3:

    -
      -
    1. ¿Está libre Counter Strike 1.3?
      Sí, Counter Strike 1.3 es gratis para descargar y jugar, siempre y cuando tengas Half-Life instalado en tu PC.
    2. -¿Es seguro el Counter Strike 1.3?
      Sí, Counter Strike 1.3 es seguro para descargar y jugar, siempre y cuando utilice fuentes y sitios web de confianza, como Steam, CS-Download o FilePlanet. -¿Sigue siendo popular Counter Strike 1.3?
      Sí, Counter Strike 1.3 sigue siendo popular entre muchos jugadores que aman esta versión clásica del juego. Puede encontrar muchos servidores y comunidades que albergan Counter Strike 1.3 partidos y torneos en línea. -
    3. ¿Cómo puedo mejorar mis habilidades en Counter Strike 1.3?
      Puedes mejorar tus habilidades en Counter Strike 1.3 practicando regularmente, aprendiendo de otros jugadores, viendo tutoriales y guías en línea, y uniéndote a clanes o equipos que pueden ayudarte a mejorar.
    4. -
    5. ¿Cuáles son algunos de los mejores mapas en Counter Strike 1.3?
      Some of the best maps in Counter Strike 1.3 are de_dust2, cs_italy, cs_office, de_train, de_inferno, cs_assault, de_aztec, cs_militia, de_nuke, and cs_siege.
    6. -

    64aa2da5cf
    -
    -
    \ No newline at end of file diff --git a/spaces/BongoCaat/ArtGenerator/app.py b/spaces/BongoCaat/ArtGenerator/app.py deleted file mode 100644 index 5c45a61fa46afc90132e7847add9ae98176fe3f0..0000000000000000000000000000000000000000 --- a/spaces/BongoCaat/ArtGenerator/app.py +++ /dev/null @@ -1,611 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "id": "view-in-github", - "colab_type": "text" - }, - "source": [ - "\"Open" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "620o1BxdNbgq" - }, - "source": [ - "# **Stable Diffusion 2.1**\n", - "Gradio app for [Stable Diffusion 2](https://huggingface.co/stabilityai/stable-diffusion-2) by [Stability AI](https://stability.ai/) (v2-1_768-ema-pruned.ckpt).\n", - "It uses [Hugging Face](https://huggingface.co/) Diffusers🧨 implementation.\n", - "\n", - "Currently supported pipelines are `text-to-image`, `image-to-image`, `inpainting`, `4x upscaling` and `depth-to-image`.\n", - "\n", - "
    \n", - "\n", - "Colab by [anzorq](https://twitter.com/hahahahohohe). If you like it, please consider supporting me:\n", - "\n", - "[\"Buy](https://www.buymeacoffee.com/anzorq)\n", - "
    \n", - "[![GitHub Repo stars](https://img.shields.io/github/stars/qunash/stable-diffusion-2-gui?style=social)](https://github.com/qunash/stable-diffusion-2-gui)\n", - "\n", - "![visitors](https://visitor-badge.glitch.me/badge?page_id=anzorq.sd-2-colab-header)" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "KQI4RX20DW_8" - }, - "source": [ - "# Install dependencies (~1.5 mins)" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "id": "78HoqRAB-cES", - "cellView": "form" - }, - "outputs": [], - "source": [ - "!pip install --upgrade git+https://github.com/huggingface/diffusers.git\n", - "# !pip install diffusers\n", - "!pip install --upgrade git+https://github.com/huggingface/transformers/\n", - "# !pip install transformers\n", - "!pip install accelerate==0.12.0\n", - "!pip install scipy\n", - "!pip install ftfy\n", - "!pip install gradio -q\n", - "\n", - "#@markdown ### ⬅️ Run this cell\n", - "#@markdown ---\n", - "#@markdown ### Install **xformers**?\n", - "#@markdown This will take an additional ~3.5 mins.
    But images will generate 25-40% faster.\n", - "install_xformers = False #@param {type:\"boolean\"}\n", - "\n", - "if install_xformers:\n", - " import os\n", - " from subprocess import getoutput\n", - "\n", - " os.system(\"pip install --extra-index-url https://download.pytorch.org/whl/cu113 torch torchvision==0.13.1+cu113\")\n", - " os.system(\"pip install triton==2.0.0.dev20220701\")\n", - " gpu_info = getoutput('nvidia-smi')\n", - " if(\"A10G\" in gpu_info):\n", - " os.system(f\"pip install -q https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.15/xformers-0.0.15.dev0+4c06c79.d20221205-cp38-cp38-linux_x86_64.whl\")\n", - " elif(\"T4\" in gpu_info):\n", - " os.system(f\"pip install -q https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.15/xformers-0.0.15.dev0+1515f77.d20221130-cp38-cp38-linux_x86_64.whl\")\n", - "\n", - "\n", - "# ### install xformers\n", - "# from IPython.utils import capture\n", - "# from subprocess import getoutput\n", - "# from re import search\n", - "\n", - "# with capture.capture_output() as cap:\n", - " \n", - "# smi_out = getoutput('nvidia-smi')\n", - "# supported = search('(T4|P100|V100|A100|K80)', smi_out)\n", - "\n", - "# if not supported:\n", - "# while True:\n", - "# print(\"\\x1b[1;31mThe current GPU is not supported, try starting a new session.\\x1b[0m\")\n", - "# else:\n", - "# supported = supported.group(0)\n", - "\n", - "# !pip install -q https://github.com/TheLastBen/fast-stable-diffusion/raw/main/precompiled/{supported}/xformers-0.0.13.dev0-py3-none-any.whl\n", - "# !pip install -q https://github.com/ShivamShrirao/xformers-wheels/releases/download/4c06c79/xformers-0.0.15.dev0+4c06c79.d20221201-cp38-cp38-linux_x86_64.whl" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "OOPHNsFYDbc0" - }, - "source": [ - "# Run the app" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": { - "cellView": "form", - "id": "gId0-asCBVwL" - }, - "outputs": [], - "source": [ - "#@title ⬇️🖼️\n", - "from diffusers import StableDiffusionPipeline, StableDiffusionImg2ImgPipeline, StableDiffusionUpscalePipeline, DiffusionPipeline, StableDiffusionDepth2ImgPipeline, DPMSolverMultistepScheduler\n", - "import gradio as gr\n", - "import torch\n", - "from PIL import Image\n", - "import random\n", - "\n", - "state = None\n", - "current_steps = 25\n", - "attn_slicing_enabled = True\n", - "mem_eff_attn_enabled = install_xformers\n", - "\n", - "# model_id = 'stabilityai/stable-diffusion-2'\n", - "model_id = 'stabilityai/stable-diffusion-2-1'\n", - "\n", - "scheduler = DPMSolverMultistepScheduler.from_pretrained(model_id, subfolder=\"scheduler\")\n", - "\n", - "pipe = StableDiffusionPipeline.from_pretrained(\n", - " model_id,\n", - " revision=\"fp16\" if torch.cuda.is_available() else \"fp32\",\n", - " torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,\n", - " scheduler=scheduler\n", - " ).to(\"cuda\")\n", - "pipe.enable_attention_slicing()\n", - "if mem_eff_attn_enabled:\n", - " pipe.enable_xformers_memory_efficient_attention()\n", - "\n", - "pipe_i2i = None\n", - "pipe_upscale = None\n", - "pipe_inpaint = None\n", - "pipe_depth2img = None\n", - "\n", - "\n", - "modes = {\n", - " 'txt2img': 'Text to Image',\n", - " 'img2img': 'Image to Image',\n", - " 'inpaint': 'Inpainting',\n", - " 'upscale4x': 'Upscale 4x',\n", - " 'depth2img': 'Depth to Image'\n", - "}\n", - "current_mode = modes['txt2img']\n", - "\n", - "def error_str(error, title=\"Error\"):\n", - " return f\"\"\"#### {title}\n", - " {error}\"\"\" if error else \"\"\n", - "\n", - "def update_state(new_state):\n", - " global state\n", - " state = new_state\n", - "\n", - "def update_state_info(old_state):\n", - " if state and state != old_state:\n", - " return gr.update(value=state)\n", - "\n", - "def set_mem_optimizations(pipe):\n", - " if attn_slicing_enabled:\n", - " pipe.enable_attention_slicing()\n", - " else:\n", - " pipe.disable_attention_slicing()\n", - " \n", - " if mem_eff_attn_enabled:\n", - " pipe.enable_xformers_memory_efficient_attention()\n", - " else:\n", - " pipe.disable_xformers_memory_efficient_attention()\n", - "\n", - "def get_i2i_pipe(scheduler):\n", - " \n", - " update_state(\"Loading image to image model...\")\n", - "\n", - " pipe = StableDiffusionImg2ImgPipeline.from_pretrained(\n", - " model_id,\n", - " revision=\"fp16\" if torch.cuda.is_available() else \"fp32\",\n", - " torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,\n", - " scheduler=scheduler\n", - " )\n", - " set_mem_optimizations(pipe)\n", - " pipe.to(\"cuda\")\n", - " return pipe\n", - "\n", - "def get_inpaint_pipe():\n", - " \n", - " update_state(\"Loading inpainting model...\")\n", - "\n", - " pipe = DiffusionPipeline.from_pretrained(\n", - " \"stabilityai/stable-diffusion-2-inpainting\",\n", - " revision=\"fp16\" if torch.cuda.is_available() else \"fp32\",\n", - " torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,\n", - " # scheduler=scheduler # TODO currently setting scheduler here messes up the end result. A bug in Diffusers🧨\n", - " ).to(\"cuda\")\n", - " pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)\n", - " pipe.enable_attention_slicing()\n", - " pipe.enable_xformers_memory_efficient_attention()\n", - " return pipe\n", - "\n", - "def get_upscale_pipe(scheduler):\n", - " \n", - " update_state(\"Loading upscale model...\")\n", - "\n", - " pipe = StableDiffusionUpscalePipeline.from_pretrained(\n", - " \"stabilityai/stable-diffusion-x4-upscaler\",\n", - " revision=\"fp16\" if torch.cuda.is_available() else \"fp32\",\n", - " torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,\n", - " # scheduler=scheduler\n", - " )\n", - " # pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)\n", - " set_mem_optimizations(pipe)\n", - " pipe.to(\"cuda\")\n", - " return pipe\n", - " \n", - "def get_depth2img_pipe():\n", - " \n", - " update_state(\"Loading depth to image model...\")\n", - "\n", - " pipe = StableDiffusionDepth2ImgPipeline.from_pretrained(\n", - " \"stabilityai/stable-diffusion-2-depth\",\n", - " revision=\"fp16\" if torch.cuda.is_available() else \"fp32\",\n", - " torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,\n", - " # scheduler=scheduler\n", - " )\n", - " pipe.scheduler = DPMSolverMultistepScheduler.from_config(pipe.scheduler.config)\n", - " set_mem_optimizations(pipe)\n", - " pipe.to(\"cuda\")\n", - " return pipe\n", - "\n", - "def switch_attention_slicing(attn_slicing):\n", - " global attn_slicing_enabled\n", - " attn_slicing_enabled = attn_slicing\n", - "\n", - "def switch_mem_eff_attn(mem_eff_attn):\n", - " global mem_eff_attn_enabled\n", - " mem_eff_attn_enabled = mem_eff_attn\n", - "\n", - "def pipe_callback(step: int, timestep: int, latents: torch.FloatTensor):\n", - " update_state(f\"{step}/{current_steps} steps\")#\\nTime left, sec: {timestep/100:.0f}\")\n", - "\n", - "def inference(inf_mode, prompt, n_images, guidance, steps, width=768, height=768, seed=0, img=None, strength=0.5, neg_prompt=\"\"):\n", - "\n", - " update_state(\" \")\n", - "\n", - " global current_mode\n", - " if inf_mode != current_mode:\n", - " pipe.to(\"cuda\" if inf_mode == modes['txt2img'] else \"cpu\")\n", - "\n", - " if pipe_i2i is not None:\n", - " pipe_i2i.to(\"cuda\" if inf_mode == modes['img2img'] else \"cpu\")\n", - "\n", - " if pipe_inpaint is not None:\n", - " pipe_inpaint.to(\"cuda\" if inf_mode == modes['inpaint'] else \"cpu\")\n", - "\n", - " if pipe_upscale is not None:\n", - " pipe_upscale.to(\"cuda\" if inf_mode == modes['upscale4x'] else \"cpu\")\n", - " \n", - " if pipe_depth2img is not None:\n", - " pipe_depth2img.to(\"cuda\" if inf_mode == modes['depth2img'] else \"cpu\")\n", - "\n", - " current_mode = inf_mode\n", - " \n", - " if seed == 0:\n", - " seed = random.randint(0, 2147483647)\n", - "\n", - " generator = torch.Generator('cuda').manual_seed(seed)\n", - " prompt = prompt\n", - "\n", - " try:\n", - " \n", - " if inf_mode == modes['txt2img']:\n", - " return txt_to_img(prompt, n_images, neg_prompt, guidance, steps, width, height, generator, seed), gr.update(visible=False, value=None)\n", - " \n", - " elif inf_mode == modes['img2img']:\n", - " if img is None:\n", - " return None, gr.update(visible=True, value=error_str(\"Image is required for Image to Image mode\"))\n", - "\n", - " return img_to_img(prompt, n_images, neg_prompt, img, strength, guidance, steps, width, height, generator, seed), gr.update(visible=False, value=None)\n", - " \n", - " elif inf_mode == modes['inpaint']:\n", - " if img is None:\n", - " return None, gr.update(visible=True, value=error_str(\"Image is required for Inpainting mode\"))\n", - "\n", - " return inpaint(prompt, n_images, neg_prompt, img, guidance, steps, width, height, generator, seed), gr.update(visible=False, value=None)\n", - "\n", - " elif inf_mode == modes['upscale4x']:\n", - " if img is None:\n", - " return None, gr.update(visible=True, value=error_str(\"Image is required for Upscale mode\"))\n", - "\n", - " return upscale(prompt, n_images, neg_prompt, img, guidance, steps, generator), gr.update(visible=False, value=None)\n", - "\n", - " elif inf_mode == modes['depth2img']:\n", - " if img is None:\n", - " return None, gr.update(visible=True, value=error_str(\"Image is required for Depth to Image mode\"))\n", - "\n", - " return depth2img(prompt, n_images, neg_prompt, img, guidance, steps, generator, seed), gr.update(visible=False, value=None)\n", - "\n", - " except Exception as e:\n", - " return None, gr.update(visible=True, value=error_str(e))\n", - "\n", - "def txt_to_img(prompt, n_images, neg_prompt, guidance, steps, width, height, generator, seed):\n", - "\n", - " result = pipe(\n", - " prompt,\n", - " num_images_per_prompt = n_images,\n", - " negative_prompt = neg_prompt,\n", - " num_inference_steps = int(steps),\n", - " guidance_scale = guidance,\n", - " width = width,\n", - " height = height,\n", - " generator = generator,\n", - " callback=pipe_callback).images\n", - "\n", - " update_state(f\"Done. Seed: {seed}\")\n", - "\n", - " return result\n", - "\n", - "def img_to_img(prompt, n_images, neg_prompt, img, strength, guidance, steps, width, height, generator, seed):\n", - "\n", - " global pipe_i2i\n", - " if pipe_i2i is None:\n", - " pipe_i2i = get_i2i_pipe(scheduler)\n", - "\n", - " img = img['image']\n", - " ratio = min(height / img.height, width / img.width)\n", - " img = img.resize((int(img.width * ratio), int(img.height * ratio)), Image.LANCZOS)\n", - " result = pipe_i2i(\n", - " prompt,\n", - " num_images_per_prompt = n_images,\n", - " negative_prompt = neg_prompt,\n", - " image = img,\n", - " num_inference_steps = int(steps),\n", - " strength = strength,\n", - " guidance_scale = guidance,\n", - " # width = width,\n", - " # height = height,\n", - " generator = generator,\n", - " callback=pipe_callback).images\n", - "\n", - " update_state(f\"Done. Seed: {seed}\")\n", - " \n", - " return result\n", - "\n", - "# TODO Currently supports only 512x512 images\n", - "def inpaint(prompt, n_images, neg_prompt, img, guidance, steps, width, height, generator, seed):\n", - "\n", - " global pipe_inpaint\n", - " if pipe_inpaint is None:\n", - " pipe_inpaint = get_inpaint_pipe()\n", - "\n", - " inp_img = img['image']\n", - " mask = img['mask']\n", - " inp_img = square_padding(inp_img)\n", - " mask = square_padding(mask)\n", - "\n", - " # # ratio = min(height / inp_img.height, width / inp_img.width)\n", - " # ratio = min(512 / inp_img.height, 512 / inp_img.width)\n", - " # inp_img = inp_img.resize((int(inp_img.width * ratio), int(inp_img.height * ratio)), Image.LANCZOS)\n", - " # mask = mask.resize((int(mask.width * ratio), int(mask.height * ratio)), Image.LANCZOS)\n", - "\n", - " inp_img = inp_img.resize((512, 512))\n", - " mask = mask.resize((512, 512))\n", - "\n", - " result = pipe_inpaint(\n", - " prompt,\n", - " image = inp_img,\n", - " mask_image = mask,\n", - " num_images_per_prompt = n_images,\n", - " negative_prompt = neg_prompt,\n", - " num_inference_steps = int(steps),\n", - " guidance_scale = guidance,\n", - " # width = width,\n", - " # height = height,\n", - " generator = generator,\n", - " callback=pipe_callback).images\n", - " \n", - " update_state(f\"Done. Seed: {seed}\")\n", - "\n", - " return result\n", - "\n", - "def depth2img(prompt, n_images, neg_prompt, img, guidance, steps, generator, seed):\n", - "\n", - " global pipe_depth2img\n", - " if pipe_depth2img is None:\n", - " pipe_depth2img = get_depth2img_pipe()\n", - "\n", - " img = img['image']\n", - " result = pipe_depth2img(\n", - " prompt,\n", - " num_images_per_prompt = n_images,\n", - " negative_prompt = neg_prompt,\n", - " image = img,\n", - " num_inference_steps = int(steps),\n", - " guidance_scale = guidance,\n", - " # width = width,\n", - " # height = height,\n", - " generator = generator,\n", - " callback=pipe_callback).images\n", - "\n", - " update_state(f\"Done. Seed: {seed}\")\n", - " \n", - " return result\n", - "\n", - "def square_padding(img):\n", - " width, height = img.size\n", - " if width == height:\n", - " return img\n", - " new_size = max(width, height)\n", - " new_img = Image.new('RGB', (new_size, new_size), (0, 0, 0, 255))\n", - " new_img.paste(img, ((new_size - width) // 2, (new_size - height) // 2))\n", - " return new_img\n", - "\n", - "def upscale(prompt, n_images, neg_prompt, img, guidance, steps, generator):\n", - "\n", - " global pipe_upscale\n", - " if pipe_upscale is None:\n", - " pipe_upscale = get_upscale_pipe(scheduler)\n", - "\n", - " img = img['image']\n", - " return upscale_tiling(prompt, neg_prompt, img, guidance, steps, generator)\n", - "\n", - " # result = pipe_upscale(\n", - " # prompt,\n", - " # image = img,\n", - " # num_inference_steps = int(steps),\n", - " # guidance_scale = guidance,\n", - " # negative_prompt = neg_prompt,\n", - " # num_images_per_prompt = n_images,\n", - " # generator = generator).images[0]\n", - "\n", - " # return result\n", - "\n", - "def upscale_tiling(prompt, neg_prompt, img, guidance, steps, generator):\n", - "\n", - " width, height = img.size\n", - "\n", - " # calculate the padding needed to make the image dimensions a multiple of 128\n", - " padding_x = 128 - (width % 128) if width % 128 != 0 else 0\n", - " padding_y = 128 - (height % 128) if height % 128 != 0 else 0\n", - "\n", - " # create a white image of the right size to be used as padding\n", - " padding_img = Image.new('RGB', (padding_x, padding_y), color=(255, 255, 255, 0))\n", - "\n", - " # paste the padding image onto the original image to add the padding\n", - " img.paste(padding_img, (width, height))\n", - "\n", - " # update the image dimensions to include the padding\n", - " width += padding_x\n", - " height += padding_y\n", - "\n", - " if width > 128 or height > 128:\n", - "\n", - " num_tiles_x = int(width / 128)\n", - " num_tiles_y = int(height / 128)\n", - "\n", - " upscaled_img = Image.new('RGB', (img.size[0] * 4, img.size[1] * 4))\n", - " for x in range(num_tiles_x):\n", - " for y in range(num_tiles_y):\n", - " update_state(f\"Upscaling tile {x * num_tiles_y + y + 1}/{num_tiles_x * num_tiles_y}\")\n", - " tile = img.crop((x * 128, y * 128, (x + 1) * 128, (y + 1) * 128))\n", - "\n", - " upscaled_tile = pipe_upscale(\n", - " prompt=\"\",\n", - " image=tile,\n", - " num_inference_steps=steps,\n", - " guidance_scale=guidance,\n", - " # negative_prompt = neg_prompt,\n", - " generator=generator,\n", - " ).images[0]\n", - "\n", - " upscaled_img.paste(upscaled_tile, (x * upscaled_tile.size[0], y * upscaled_tile.size[1]))\n", - "\n", - " return [upscaled_img]\n", - " else:\n", - " return pipe_upscale(\n", - " prompt=prompt,\n", - " image=img,\n", - " num_inference_steps=steps,\n", - " guidance_scale=guidance,\n", - " negative_prompt = neg_prompt,\n", - " generator=generator,\n", - " ).images\n", - "\n", - "\n", - "\n", - "def on_mode_change(mode):\n", - " return gr.update(visible = mode in (modes['img2img'], modes['inpaint'], modes['upscale4x'], modes['depth2img'])), \\\n", - " gr.update(visible = mode == modes['inpaint']), \\\n", - " gr.update(visible = mode == modes['upscale4x']), \\\n", - " gr.update(visible = mode == modes['img2img'])\n", - "\n", - "def on_steps_change(steps):\n", - " global current_steps\n", - " current_steps = steps\n", - "\n", - "css = \"\"\".main-div div{display:inline-flex;align-items:center;gap:.8rem;font-size:1.75rem}.main-div div h1{font-weight:900;margin-bottom:7px}.main-div p{margin-bottom:10px;font-size:94%}a{text-decoration:underline}.tabs{margin-top:0;margin-bottom:0}#gallery{min-height:20rem}\n", - "\"\"\"\n", - "with gr.Blocks(css=css) as demo:\n", - " gr.HTML(\n", - " f\"\"\"\n", - "
    \n", - "
    \n", - "

    Stable Diffusion 2.1

    \n", - "

    \n", - "

    Model used: v2-1_768-ema-pruned.ckpt

    \n", - " Running on {\"GPU 🔥\" if torch.cuda.is_available() else \"CPU 🥶\"}\n", - "
    \n", - " \"\"\"\n", - " )\n", - " with gr.Row():\n", - " \n", - " with gr.Column(scale=70):\n", - " with gr.Group():\n", - " with gr.Row():\n", - " prompt = gr.Textbox(label=\"Prompt\", show_label=False, max_lines=2,placeholder=f\"Enter prompt\").style(container=False)\n", - " generate = gr.Button(value=\"Generate\").style(rounded=(False, True, True, False))\n", - "\n", - " gallery = gr.Gallery(label=\"Generated images\", show_label=False).style(grid=[2], height=\"auto\")\n", - " state_info = gr.Textbox(label=\"State\", show_label=False, max_lines=2).style(container=False)\n", - " error_output = gr.Markdown(visible=False)\n", - "\n", - " with gr.Column(scale=30):\n", - " inf_mode = gr.Radio(label=\"Inference Mode\", choices=list(modes.values()), value=modes['txt2img'])\n", - " \n", - " with gr.Group(visible=False) as i2i_options:\n", - " image = gr.Image(label=\"Image\", height=128, type=\"pil\", tool='sketch')\n", - " inpaint_info = gr.Markdown(\"Inpainting resizes and pads images to 512x512\", visible=False)\n", - " upscale_info = gr.Markdown(\"\"\"Best for small images (128x128 or smaller).
    \n", - " Bigger images will be sliced into 128x128 tiles which will be upscaled individually.
    \n", - " This is done to avoid running out of GPU memory.\"\"\", visible=False)\n", - " strength = gr.Slider(label=\"Transformation strength\", minimum=0, maximum=1, step=0.01, value=0.5)\n", - "\n", - " with gr.Group():\n", - " neg_prompt = gr.Textbox(label=\"Negative prompt\", placeholder=\"What to exclude from the image\")\n", - "\n", - " n_images = gr.Slider(label=\"Number of images\", value=1, minimum=1, maximum=4, step=1)\n", - " with gr.Row():\n", - " guidance = gr.Slider(label=\"Guidance scale\", value=7.5, maximum=15)\n", - " steps = gr.Slider(label=\"Steps\", value=current_steps, minimum=2, maximum=100, step=1)\n", - "\n", - " with gr.Row():\n", - " width = gr.Slider(label=\"Width\", value=768, minimum=64, maximum=1024, step=8)\n", - " height = gr.Slider(label=\"Height\", value=768, minimum=64, maximum=1024, step=8)\n", - "\n", - " seed = gr.Slider(0, 2147483647, label='Seed (0 = random)', value=0, step=1)\n", - " with gr.Accordion(\"Memory optimization\"):\n", - " attn_slicing = gr.Checkbox(label=\"Attention slicing (a bit slower, but uses less memory)\", value=attn_slicing_enabled)\n", - " # mem_eff_attn = gr.Checkbox(label=\"Memory efficient attention (xformers)\", value=mem_eff_attn_enabled)\n", - "\n", - " inf_mode.change(on_mode_change, inputs=[inf_mode], outputs=[i2i_options, inpaint_info, upscale_info, strength], queue=False)\n", - " steps.change(on_steps_change, inputs=[steps], outputs=[], queue=False)\n", - " attn_slicing.change(lambda x: switch_attention_slicing(x), inputs=[attn_slicing], queue=False)\n", - " # mem_eff_attn.change(lambda x: switch_mem_eff_attn(x), inputs=[mem_eff_attn], queue=False)\n", - "\n", - " inputs = [inf_mode, prompt, n_images, guidance, steps, width, height, seed, image, strength, neg_prompt]\n", - " outputs = [gallery, error_output]\n", - " prompt.submit(inference, inputs=inputs, outputs=outputs)\n", - " generate.click(inference, inputs=inputs, outputs=outputs)\n", - "\n", - " demo.load(update_state_info, inputs=state_info, outputs=state_info, every=0.5, show_progress=False)\n", - "\n", - " gr.HTML(\"\"\"\n", - "
    \n", - "
    \n", - "

    Space by: \"Twitter


    \n", - "

    Enjoying this app? Please consider supporting me

    \n", - " \"Buy

    \n", - " \"GitHub\n", - "

    \"visitors\"

    \n", - "
    \n", - " \"\"\")\n", - "\n", - "demo.queue()\n", - "demo.launch(debug=True, share=True, height=768)\n" - ] - } - ], - "metadata": { - "accelerator": "GPU", - "colab": { - "private_outputs": True, - "provenance": [], - "toc_visible": True, - "include_colab_link": False - }, - "gpuClass": "standard", - "kernelspec": { - "display_name": "Python 3", - "name": "python3" - }, - "language_info": { - "name": "python" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} \ No newline at end of file diff --git a/spaces/BradAllgood/fastai_chapter2_new/README.md b/spaces/BradAllgood/fastai_chapter2_new/README.md deleted file mode 100644 index 7f61f0765b222f04f1be2db3cd28f2860b14a147..0000000000000000000000000000000000000000 --- a/spaces/BradAllgood/fastai_chapter2_new/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Fastai Chapter2 New -emoji: 🦀 -colorFrom: purple -colorTo: blue -sdk: gradio -sdk_version: 3.29.0 -app_file: app.py -pinned: false -license: apache-2.0 ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated.h b/spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated.h deleted file mode 100644 index 47b85dcd58a52c2d176f5b65384e25e186dec9bf..0000000000000000000000000000000000000000 --- a/spaces/CVPR/Dual-Key_Backdoor_Attacks/datagen/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated.h +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -#pragma once -#include - -namespace detectron2 { - -at::Tensor box_iou_rotated_cpu( - const at::Tensor& boxes1, - const at::Tensor& boxes2); - -#ifdef WITH_CUDA -at::Tensor box_iou_rotated_cuda( - const at::Tensor& boxes1, - const at::Tensor& boxes2); -#endif - -// Interface for Python -// inline is needed to prevent multiple function definitions when this header is -// included by different cpps -inline at::Tensor box_iou_rotated( - const at::Tensor& boxes1, - const at::Tensor& boxes2) { - assert(boxes1.device().is_cuda() == boxes2.device().is_cuda()); - if (boxes1.device().is_cuda()) { -#ifdef WITH_CUDA - return box_iou_rotated_cuda(boxes1, boxes2); -#else - AT_ERROR("Not compiled with GPU support"); -#endif - } - - return box_iou_rotated_cpu(boxes1, boxes2); -} - -} // namespace detectron2 diff --git a/spaces/CVPR/LIVE/thrust/thrust/cmake/thrust-config.cmake b/spaces/CVPR/LIVE/thrust/thrust/cmake/thrust-config.cmake deleted file mode 100644 index 467579d1d0b8e273b562ff7f6eb01fc31c901d10..0000000000000000000000000000000000000000 --- a/spaces/CVPR/LIVE/thrust/thrust/cmake/thrust-config.cmake +++ /dev/null @@ -1,652 +0,0 @@ -# -# find_package(Thrust) config file. -# -# Provided by NVIDIA under the same license as the associated Thrust library. -# -# Reply-To: Allison Vacanti -# -# ***************************************************************************** -# ** The following is a short reference to using Thrust from CMake. ** -# ** For more details, see the README.md in the same directory as this file. ** -# ***************************************************************************** -# -# # General Usage: -# find_package(Thrust REQUIRED CONFIG) -# thrust_create_target(Thrust [options]) -# target_link_libraries(some_project_lib Thrust) -# -# # Create default target with: HOST=CPP DEVICE=CUDA -# thrust_create_target(TargetName) -# -# # Create target with: HOST=CPP DEVICE=TBB -# thrust_create_target(TargetName DEVICE TBB) -# -# # Create target with: HOST=TBB DEVICE=OMP -# thrust_create_target(TargetName HOST TBB DEVICE OMP) -# -# # Create CMake cache options THRUST_[HOST|DEVICE]_SYSTEM and configure a -# # target from them. This allows these systems to be changed by developers at -# # configure time, per build. -# thrust_create_target(TargetName FROM_OPTIONS -# [HOST_OPTION ] # Optionally rename the host system option -# [DEVICE_OPTION ] # Optionally rename the device system option -# [HOST_OPTION_DOC ] # Optionally change the cache label -# [DEVICE_OPTION_DOC ] # Optionally change the cache label -# [HOST ] # Optionally change the default backend -# [DEVICE ] # Optionally change the default backend -# [ADVANCED] # Optionally mark options as advanced -# ) -# -# # Use a custom TBB, CUB, and/or OMP -# # (Note that once set, these cannot be changed. This includes COMPONENT -# # preloading and lazy lookups in thrust_create_target) -# find_package(Thrust REQUIRED) -# thrust_set_CUB_target(MyCUBTarget) # MyXXXTarget contains an existing -# thrust_set_TBB_target(MyTBBTarget) # interface to XXX for Thrust to use. -# thrust_set_OMP_target(MyOMPTarget) -# thrust_create_target(ThrustWithMyCUB DEVICE CUDA) -# thrust_create_target(ThrustWithMyTBB DEVICE TBB) -# thrust_create_target(ThrustWithMyOMP DEVICE OMP) -# -# # Create target with HOST=CPP DEVICE=CUDA and some advanced flags set -# thrust_create_target(TargetName -# IGNORE_DEPRECATED_CPP_DIALECT # Silence build warnings about deprecated compilers and C++ standards -# IGNORE_DEPRECATED_CPP_11 # Only silence deprecation warnings for C++11 -# IGNORE_DEPRECATED_COMPILER # Only silence deprecation warnings for old compilers -# IGNORE_CUB_VERSION # Skip configure-time and compile-time CUB version checks -# ) -# -# # Test if a particular system has been loaded. ${var_name} is set to TRUE or -# # FALSE to indicate if "system" is found. -# thrust_is_system_found( ) -# thrust_is_cuda_system_found() -# thrust_is_tbb_system_found() -# thrust_is_omp_system_found() -# thrust_is_cpp_system_found() -# -# # Define / update THRUST_${system}_FOUND flags in current scope -# thrust_update_system_found_flags() -# -# # View verbose log with target and dependency information: -# $ cmake . --log-level=VERBOSE (CMake 3.15.7 and above) -# -# # Print debugging output to status channel: -# thrust_debug_internal_targets() -# thrust_debug_target(TargetName "${THRUST_VERSION}") - -cmake_minimum_required(VERSION 3.15) - -################################################################################ -# User variables and APIs. Users can rely on these: -# - -# Advertise system options: -set(THRUST_HOST_SYSTEM_OPTIONS - CPP OMP TBB - CACHE INTERNAL "Valid Thrust host systems." -) -set(THRUST_DEVICE_SYSTEM_OPTIONS - CUDA CPP OMP TBB - CACHE INTERNAL "Valid Thrust device systems" -) - -# Workaround cmake issue #20670 https://gitlab.kitware.com/cmake/cmake/-/issues/20670 -set(THRUST_VERSION ${${CMAKE_FIND_PACKAGE_NAME}_VERSION} CACHE INTERNAL "") -set(THRUST_VERSION_MAJOR ${${CMAKE_FIND_PACKAGE_NAME}_VERSION_MAJOR} CACHE INTERNAL "") -set(THRUST_VERSION_MINOR ${${CMAKE_FIND_PACKAGE_NAME}_VERSION_MINOR} CACHE INTERNAL "") -set(THRUST_VERSION_PATCH ${${CMAKE_FIND_PACKAGE_NAME}_VERSION_PATCH} CACHE INTERNAL "") -set(THRUST_VERSION_TWEAK ${${CMAKE_FIND_PACKAGE_NAME}_VERSION_TWEAK} CACHE INTERNAL "") -set(THRUST_VERSION_COUNT ${${CMAKE_FIND_PACKAGE_NAME}_VERSION_COUNT} CACHE INTERNAL "") - -function(thrust_create_target target_name) - thrust_debug("Assembling target ${target_name}. Options: ${ARGN}" internal) - set(options - ADVANCED - FROM_OPTIONS - IGNORE_CUB_VERSION_CHECK - IGNORE_DEPRECATED_COMPILER - IGNORE_DEPRECATED_CPP_11 - IGNORE_DEPRECATED_CPP_DIALECT - ) - set(keys - DEVICE - DEVICE_OPTION - DEVICE_OPTION_DOC - HOST - HOST_OPTION - HOST_OPTION_DOC - ) - cmake_parse_arguments(TCT "${options}" "${keys}" "" ${ARGN}) - if (TCT_UNPARSED_ARGUMENTS) - message(AUTHOR_WARNING - "Unrecognized arguments passed to thrust_create_target: " - ${TCT_UNPARSED_ARGUMENTS} - ) - endif() - - # Check that the main Thrust internal target is available - # (functions have global scope, targets have directory scope, so this - # might happen) - if (NOT TARGET Thrust::Thrust) - message(AUTHOR_WARNING - "The `thrust_create_target` function was called outside the scope of the " - "thrust targets. Call find_package again to recreate targets." - ) - endif() - - _thrust_set_if_undefined(TCT_HOST CPP) - _thrust_set_if_undefined(TCT_DEVICE CUDA) - _thrust_set_if_undefined(TCT_HOST_OPTION THRUST_HOST_SYSTEM) - _thrust_set_if_undefined(TCT_DEVICE_OPTION THRUST_DEVICE_SYSTEM) - _thrust_set_if_undefined(TCT_HOST_OPTION_DOC "Thrust host system.") - _thrust_set_if_undefined(TCT_DEVICE_OPTION_DOC "Thrust device system.") - - if (NOT TCT_HOST IN_LIST THRUST_HOST_SYSTEM_OPTIONS) - message(FATAL_ERROR - "Requested HOST=${TCT_HOST}; must be one of ${THRUST_HOST_SYSTEM_OPTIONS}") - endif() - - if (NOT TCT_DEVICE IN_LIST THRUST_DEVICE_SYSTEM_OPTIONS) - message(FATAL_ERROR - "Requested DEVICE=${TCT_DEVICE}; must be one of ${THRUST_DEVICE_SYSTEM_OPTIONS}") - endif() - - if (TCT_FROM_OPTIONS) - _thrust_create_cache_options( - ${TCT_HOST} ${TCT_DEVICE} - ${TCT_HOST_OPTION} ${TCT_DEVICE_OPTION} - ${TCT_HOST_OPTION_DOC} ${TCT_DEVICE_OPTION_DOC} - ${TCT_ADVANCED} - ) - set(TCT_HOST ${${TCT_HOST_OPTION}}) - set(TCT_DEVICE ${${TCT_DEVICE_OPTION}}) - thrust_debug("Current option settings:" internal) - thrust_debug(" - ${TCT_HOST_OPTION}=${TCT_HOST}" internal) - thrust_debug(" - ${TCT_DEVICE_OPTION}=${TCT_DEVICE}" internal) - endif() - - _thrust_find_backend(${TCT_HOST} REQUIRED) - _thrust_find_backend(${TCT_DEVICE} REQUIRED) - - # We can just create an INTERFACE IMPORTED target here instead of going - # through _thrust_declare_interface_alias as long as we aren't hanging any - # Thrust/CUB include paths on ${target_name}. - add_library(${target_name} INTERFACE IMPORTED) - target_link_libraries(${target_name} - INTERFACE - Thrust::${TCT_HOST}::Host - Thrust::${TCT_DEVICE}::Device - ) - - # This would be nice to enforce, but breaks when using old cmake + new - # compiler, since cmake doesn't know what features the new compiler version - # supports. - # Leaving this here as a reminder not to add it back. Just let the - # compile-time checks in thrust/detail/config/cpp_dialect.h handle it. - # - # if (NOT TCT_IGNORE_DEPRECATED_CPP_DIALECT) - # if (TCT_IGNORE_DEPRECATED_CPP_11) - # target_compile_features(${target_name} INTERFACE cxx_std_11) - # else() - # target_compile_features(${target_name} INTERFACE cxx_std_14) - # endif() - # endif() - - if (TCT_IGNORE_DEPRECATED_CPP_DIALECT) - target_compile_definitions(${target_name} INTERFACE "THRUST_IGNORE_DEPRECATED_CPP_DIALECT") - endif() - - if (TCT_IGNORE_DEPRECATED_CPP_11) - target_compile_definitions(${target_name} INTERFACE "THRUST_IGNORE_DEPRECATED_CPP_11") - endif() - - if (TCT_IGNORE_DEPRECATED_COMPILER) - target_compile_definitions(${target_name} INTERFACE "THRUST_IGNORE_DEPRECATED_COMPILER") - endif() - - if (TCT_IGNORE_CUB_VERSION_CHECK) - target_compile_definitions(${target_name} INTERFACE "THRUST_IGNORE_CUB_VERSION_CHECK") - else() - if (("${TCT_HOST}" STREQUAL "CUDA" OR "${TCT_DEVICE}" STREQUAL "CUDA") AND - (NOT THRUST_VERSION VERSION_EQUAL THRUST_CUB_VERSION)) - message(FATAL_ERROR - "The version of CUB found by CMake is not compatible with this release of Thrust. " - "CUB is now included in the CUDA Toolkit, so you no longer need to use your own checkout of CUB. " - "Pass IGNORE_CUB_VERSION_CHECK to thrust_create_target to ignore. " - "(CUB ${THRUST_CUB_VERSION}, Thrust ${THRUST_VERSION})." - ) - endif() - endif() - - thrust_debug_target(${target_name} "Thrust ${THRUST_VERSION}" internal) -endfunction() - -function(thrust_is_system_found system var_name) - if (TARGET Thrust::${system}) - set(${var_name} TRUE PARENT_SCOPE) - else() - set(${var_name} FALSE PARENT_SCOPE) - endif() -endfunction() - -function(thrust_is_cpp_system_found var_name) - thrust_is_system_found(CPP ${var_name}) - set(${var_name} ${${var_name}} PARENT_SCOPE) -endfunction() - -function(thrust_is_cuda_system_found var_name) - thrust_is_system_found(CUDA ${var_name}) - set(${var_name} ${${var_name}} PARENT_SCOPE) -endfunction() - -function(thrust_is_tbb_system_found var_name) - thrust_is_system_found(TBB ${var_name}) - set(${var_name} ${${var_name}} PARENT_SCOPE) -endfunction() - -function(thrust_is_omp_system_found var_name) - thrust_is_system_found(OMP ${var_name}) - set(${var_name} ${${var_name}} PARENT_SCOPE) -endfunction() - -# Since components are loaded lazily, this will refresh the -# THRUST_${component}_FOUND flags in the current scope. -# Alternatively, check system states individually using the -# thrust_is_system_found functions. -macro(thrust_update_system_found_flags) - set(THRUST_FOUND TRUE) - thrust_is_system_found(CPP THRUST_CPP_FOUND) - thrust_is_system_found(CUDA THRUST_CUDA_FOUND) - thrust_is_system_found(TBB THRUST_TBB_FOUND) - thrust_is_system_found(OMP THRUST_OMP_FOUND) -endmacro() - -function(thrust_debug msg) - # Use the VERBOSE channel when called internally - # Run `cmake . --log-level=VERBOSE` to view. - if ("${ARGN}" STREQUAL "internal") - # If CMake is too old to know about the VERBOSE channel, just be silent. - # Users reproduce much the same output on the STATUS channel by using: - # thrust_create_target(Thrust [...]) - # thrust_debug_internal_targets() - # thrust_debug_target(Thrust) - if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.15.7") - set(channel VERBOSE) - else() - return() - endif() - else() - set(channel STATUS) - endif() - - message(${channel} "Thrust: ${msg}") -endfunction() - -# Print details of the specified target. -function(thrust_debug_target target_name version) - if (NOT TARGET ${target_name}) - return() - endif() - - set(is_internal "${ARGN}") - - if (version) - set(version "(${version})") - endif() - - thrust_debug("TargetInfo: ${target_name}: ${version}" ${is_internal}) - - function(_thrust_print_prop_if_set target_name prop) - get_target_property(value ${target_name} ${prop}) - if (value) - thrust_debug("TargetInfo: ${target_name} > ${prop}: ${value}" ${is_internal}) - endif() - endfunction() - - function(_thrust_print_imported_prop_if_set target_name prop) - get_target_property(imported ${target_name} IMPORTED) - get_target_property(type ${target_name} TYPE) - if (imported AND NOT ${type} STREQUAL "INTERFACE_LIBRARY") - _thrust_print_prop_if_set(${target_name} ${prop}) - endif() - endfunction() - - _thrust_print_prop_if_set(${target_name} ALIASED_TARGET) - _thrust_print_prop_if_set(${target_name} IMPORTED) - _thrust_print_prop_if_set(${target_name} INTERFACE_COMPILE_DEFINITIONS) - _thrust_print_prop_if_set(${target_name} INTERFACE_COMPILE_FEATURES) - _thrust_print_prop_if_set(${target_name} INTERFACE_COMPILE_OPTIONS) - _thrust_print_prop_if_set(${target_name} INTERFACE_INCLUDE_DIRECTORIES) - _thrust_print_prop_if_set(${target_name} INTERFACE_LINK_DEPENDS) - _thrust_print_prop_if_set(${target_name} INTERFACE_LINK_DIRECTORIES) - _thrust_print_prop_if_set(${target_name} INTERFACE_LINK_LIBRARIES) - _thrust_print_prop_if_set(${target_name} INTERFACE_LINK_OPTIONS) - _thrust_print_prop_if_set(${target_name} INTERFACE_SYSTEM_INCLUDE_DIRECTORIES) - _thrust_print_prop_if_set(${target_name} INTERFACE_THRUST_HOST) - _thrust_print_prop_if_set(${target_name} INTERFACE_THRUST_DEVICE) - _thrust_print_imported_prop_if_set(${target_name} IMPORTED_LOCATION) - _thrust_print_imported_prop_if_set(${target_name} IMPORTED_LOCATION_DEBUG) - _thrust_print_imported_prop_if_set(${target_name} IMPORTED_LOCATION_RELEASE) -endfunction() - -function(thrust_debug_internal_targets) - function(_thrust_debug_backend_targets backend version) - thrust_debug_target(Thrust::${backend} "${version}") - thrust_debug_target(Thrust::${backend}::Host "${version}") - thrust_debug_target(Thrust::${backend}::Device "${version}") - endfunction() - - thrust_debug_target(Thrust::Thrust "${THRUST_VERSION}") - - _thrust_debug_backend_targets(CPP "Thrust ${THRUST_VERSION}") - - _thrust_debug_backend_targets(CUDA "CUB ${THRUST_CUB_VERSION}") - thrust_debug_target(CUB::CUB "${THRUST_CUB_VERSION}") - - _thrust_debug_backend_targets(TBB "${THRUST_TBB_VERSION}") - thrust_debug_target(TBB:tbb "${THRUST_TBB_VERSION}") - - _thrust_debug_backend_targets(OMP "${THRUST_OMP_VERSION}") - thrust_debug_target(OpenMP::OpenMP_CXX "${THRUST_OMP_VERSION}") -endfunction() - -################################################################################ -# Internal utilities. Subject to change. -# - -function(_thrust_set_if_undefined var) - if (NOT DEFINED ${var}) - set(${var} ${ARGN} PARENT_SCOPE) - endif() -endfunction() - -function(_thrust_declare_interface_alias alias_name ugly_name) - # 1) Only IMPORTED and ALIAS targets can be placed in a namespace. - # 2) When an IMPORTED library is linked to another target, its include - # directories are treated as SYSTEM includes. - # 3) nvcc will automatically check the CUDA Toolkit include path *before* the - # system includes. This means that the Toolkit Thrust will *always* be used - # during compilation, and the include paths of an IMPORTED Thrust::Thrust - # target will never have any effect. - # 4) This behavior can be fixed by setting the property NO_SYSTEM_FROM_IMPORTED - # on EVERY target that links to Thrust::Thrust. This would be a burden and a - # footgun for our users. Forgetting this would silently pull in the wrong thrust! - # 5) A workaround is to make a non-IMPORTED library outside of the namespace, - # configure it, and then ALIAS it into the namespace (or ALIAS and then - # configure, that seems to work too). - add_library(${ugly_name} INTERFACE) - add_library(${alias_name} ALIAS ${ugly_name}) -endfunction() - -# Create cache options for selecting the user/device systems with ccmake/cmake-gui. -function(_thrust_create_cache_options host device host_option device_option host_doc device_doc advanced) - thrust_debug("Creating system cache options: (advanced=${advanced})" internal) - thrust_debug(" - Host Option=${host_option} Default=${host} Doc='${host_doc}'" internal) - thrust_debug(" - Device Option=${device_option} Default=${device} Doc='${device_doc}'" internal) - set(${host_option} ${host} CACHE STRING "${host_doc}") - set_property(CACHE ${host_option} PROPERTY STRINGS ${THRUST_HOST_SYSTEM_OPTIONS}) - set(${device_option} ${device} CACHE STRING "${device_doc}") - set_property(CACHE ${device_option} PROPERTY STRINGS ${THRUST_DEVICE_SYSTEM_OPTIONS}) - if (advanced) - mark_as_advanced(${host_option} ${device_option}) - endif() -endfunction() - -# Create Thrust::${backend}::Host and Thrust::${backend}::Device targets. -# Assumes that `Thrust::${backend}` and `_Thrust_${backend}` have been created -# by _thrust_declare_interface_alias and configured to bring in system -# dependency interfaces (including Thrust::Thrust). -function(_thrust_setup_system backend) - set(backend_target_alias "Thrust::${backend}") - - if (backend IN_LIST THRUST_HOST_SYSTEM_OPTIONS) - set(host_target "_Thrust_${backend}_Host") - set(host_target_alias "Thrust::${backend}::Host") - if (NOT TARGET ${host_target_alias}) - _thrust_declare_interface_alias(${host_target_alias} ${host_target}) - target_compile_definitions(${host_target} INTERFACE - "THRUST_HOST_SYSTEM=THRUST_HOST_SYSTEM_${backend}") - target_link_libraries(${host_target} INTERFACE ${backend_target_alias}) - set_property(TARGET ${host_target} PROPERTY INTERFACE_THRUST_HOST ${backend}) - set_property(TARGET ${host_target} APPEND PROPERTY COMPATIBLE_INTERFACE_STRING THRUST_HOST) - thrust_debug_target(${host_target_alias} "" internal) - endif() - endif() - - if (backend IN_LIST THRUST_DEVICE_SYSTEM_OPTIONS) - set(device_target "_Thrust_${backend}_Device") - set(device_target_alias "Thrust::${backend}::Device") - if (NOT TARGET ${device_target_alias}) - _thrust_declare_interface_alias(${device_target_alias} ${device_target}) - target_compile_definitions(${device_target} INTERFACE - "THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_${backend}") - target_link_libraries(${device_target} INTERFACE ${backend_target_alias}) - set_property(TARGET ${device_target} PROPERTY INTERFACE_THRUST_DEVICE ${backend}) - set_property(TARGET ${device_target} APPEND PROPERTY COMPATIBLE_INTERFACE_STRING THRUST_DEVICE) - thrust_debug_target(${device_target_alias} "" internal) - endif() - endif() -endfunction() - -# Use the provided cub_target for the CUDA backend. If Thrust::CUDA already -# exists, this call has no effect. -function(thrust_set_CUB_target cub_target) - if (NOT TARGET Thrust::CUDA) - thrust_debug("Setting CUB target to ${cub_target}" internal) - # Workaround cmake issue #20670 https://gitlab.kitware.com/cmake/cmake/-/issues/20670 - set(THRUST_CUB_VERSION ${CUB_VERSION} CACHE INTERNAL "CUB version used by Thrust") - _thrust_declare_interface_alias(Thrust::CUDA _Thrust_CUDA) - target_link_libraries(_Thrust_CUDA INTERFACE Thrust::Thrust ${cub_target}) - thrust_debug_target(${cub_target} "${THRUST_CUB_VERSION}" internal) - thrust_debug_target(Thrust::CUDA "CUB ${THRUST_CUB_VERSION}" internal) - _thrust_setup_system(CUDA) - endif() -endfunction() - -# Use the provided tbb_target for the TBB backend. If Thrust::TBB already -# exists, this call has no effect. -function(thrust_set_TBB_target tbb_target) - if (NOT TARGET Thrust::TBB) - thrust_debug("Setting TBB target to ${tbb_target}" internal) - # Workaround cmake issue #20670 https://gitlab.kitware.com/cmake/cmake/-/issues/20670 - set(THRUST_TBB_VERSION ${TBB_VERSION} CACHE INTERNAL "TBB version used by Thrust") - _thrust_declare_interface_alias(Thrust::TBB _Thrust_TBB) - target_link_libraries(_Thrust_TBB INTERFACE Thrust::Thrust ${tbb_target}) - thrust_debug_target(${tbb_target} "${THRUST_TBB_VERSION}" internal) - thrust_debug_target(Thrust::TBB "${THRUST_TBB_VERSION}" internal) - _thrust_setup_system(TBB) - endif() -endfunction() - -# Use the provided omp_target for the OMP backend. If Thrust::OMP already -# exists, this call has no effect. -function(thrust_set_OMP_target omp_target) - if (NOT TARGET Thrust::OMP) - thrust_debug("Setting OMP target to ${omp_target}" internal) - # Workaround cmake issue #20670 https://gitlab.kitware.com/cmake/cmake/-/issues/20670 - set(THRUST_OMP_VERSION ${OpenMP_CXX_VERSION} CACHE INTERNAL "OpenMP version used by Thrust") - _thrust_declare_interface_alias(Thrust::OMP _Thrust_OMP) - target_link_libraries(_Thrust_OMP INTERFACE Thrust::Thrust ${omp_target}) - thrust_debug_target(${omp_target} "${THRUST_OMP_VERSION}" internal) - thrust_debug_target(Thrust::OMP "${THRUST_OMP_VERSION}" internal) - _thrust_setup_system(OMP) - endif() -endfunction() - -function(_thrust_find_CPP required) - if (NOT TARGET Thrust::CPP) - thrust_debug("Generating CPP targets." internal) - _thrust_declare_interface_alias(Thrust::CPP _Thrust_CPP) - target_link_libraries(_Thrust_CPP INTERFACE Thrust::Thrust) - thrust_debug_target(Thrust::CPP "Thrust ${THRUST_VERSION}" internal) - _thrust_setup_system(CPP) - endif() -endfunction() - -# This must be a macro instead of a function to ensure that backends passed to -# find_package(Thrust COMPONENTS [...]) have their full configuration loaded -# into the current scope. This provides at least some remedy for CMake issue -# #20670 -- otherwise variables like CUB_VERSION, etc won't be in the caller's -# scope. -macro(_thrust_find_CUDA required) - if (NOT TARGET Thrust::CUDA) - thrust_debug("Searching for CUB ${required}" internal) - find_package(CUB CONFIG - ${_THRUST_QUIET_FLAG} - ${required} - NO_DEFAULT_PATH # Only check the explicit HINTS below: - HINTS - "${_THRUST_INCLUDE_DIR}/dependencies/cub" # Source layout - "${_THRUST_INCLUDE_DIR}" # Install layout - ) - - if (TARGET CUB::CUB) - thrust_set_CUB_target(CUB::CUB) - else() - thrust_debug("CUB not found!" internal) - endif() - endif() -endmacro() - -# This must be a macro instead of a function to ensure that backends passed to -# find_package(Thrust COMPONENTS [...]) have their full configuration loaded -# into the current scope. This provides at least some remedy for CMake issue -# #20670 -- otherwise variables like TBB_VERSION, etc won't be in the caller's -# scope. -macro(_thrust_find_TBB required) - if(NOT TARGET Thrust::TBB) - thrust_debug("Searching for TBB ${required}" internal) - # Swap in a temporary module path to make sure we use our FindTBB.cmake - set(_THRUST_STASH_MODULE_PATH "${CMAKE_MODULE_PATH}") - set(CMAKE_MODULE_PATH "${_THRUST_CMAKE_DIR}") - - # Push policy CMP0074 to silence warnings about TBB_ROOT being set. This - # var is used unconventionally in this FindTBB.cmake module. - # Someday we'll have a suitable TBB cmake configuration and can avoid this. - cmake_policy(PUSH) - cmake_policy(SET CMP0074 OLD) - set(THRUST_TBB_ROOT "" CACHE PATH "Path to the root of the TBB installation.") - if (TBB_ROOT AND NOT THRUST_TBB_ROOT) - message( - "Warning: TBB_ROOT is set. " - "Thrust uses THRUST_TBB_ROOT to avoid issues with CMake Policy CMP0074. " - "Please set this variable instead when using Thrust with TBB." - ) - endif() - set(TBB_ROOT "${THRUST_TBB_ROOT}") - set(_THRUST_STASH_TBB_ROOT "${TBB_ROOT}") - - find_package(TBB - ${_THRUST_QUIET_FLAG} - ${required} - ) - - cmake_policy(POP) - set(TBB_ROOT "${_THRUST_STASH_TBB_ROOT}") - set(CMAKE_MODULE_PATH "${_THRUST_STASH_MODULE_PATH}") - - if (TARGET TBB::tbb) - thrust_set_TBB_target(TBB::tbb) - else() - thrust_debug("TBB not found!" internal) - endif() - endif() -endmacro() - -# Wrap the OpenMP flags for CUDA targets -function(thrust_fixup_omp_target omp_target) - get_target_property(opts ${omp_target} INTERFACE_COMPILE_OPTIONS) - if (opts MATCHES "\\$<\\$:([^>]*)>") - target_compile_options(${omp_target} INTERFACE - $<$,$>:-Xcompiler=${CMAKE_MATCH_1}> - ) - endif() -endfunction() - -# This must be a macro instead of a function to ensure that backends passed to -# find_package(Thrust COMPONENTS [...]) have their full configuration loaded -# into the current scope. This provides at least some remedy for CMake issue -# #20670 -- otherwise variables like OpenMP_CXX_VERSION, etc won't be in the caller's -# scope. -macro(_thrust_find_OMP required) - if (NOT TARGET Thrust::OMP) - thrust_debug("Searching for OMP ${required}" internal) - find_package(OpenMP - ${_THRUST_QUIET_FLAG} - ${_THRUST_REQUIRED_FLAG_OMP} - COMPONENTS CXX - ) - - if (TARGET OpenMP::OpenMP_CXX) - thrust_fixup_omp_target(OpenMP::OpenMP_CXX) - thrust_set_OMP_target(OpenMP::OpenMP_CXX) - else() - thrust_debug("OpenMP::OpenMP_CXX not found!" internal) - endif() - endif() -endmacro() - -# This must be a macro instead of a function to ensure that backends passed to -# find_package(Thrust COMPONENTS [...]) have their full configuration loaded -# into the current scope. This provides at least some remedy for CMake issue -# #20670 -- otherwise variables like CUB_VERSION, etc won't be in the caller's -# scope. -macro(_thrust_find_backend backend required) - # Unfortunately, _thrust_find_${backend}(req) is not valid CMake syntax. Hence - # why this function exists. - if ("${backend}" STREQUAL "CPP") - _thrust_find_CPP("${required}") - elseif ("${backend}" STREQUAL "CUDA") - _thrust_find_CUDA("${required}") - elseif ("${backend}" STREQUAL "TBB") - _thrust_find_TBB("${required}") - elseif ("${backend}" STREQUAL "OMP") - _thrust_find_OMP("${required}") - else() - message(FATAL_ERROR "_thrust_find_backend: Invalid system: ${backend}") - endif() -endmacro() - -################################################################################ -# Initialization. Executed inside find_package(Thrust) call. -# - -if (${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) - set(_THRUST_QUIET ON CACHE INTERNAL "Quiet mode enabled for Thrust find_package calls.") - set(_THRUST_QUIET_FLAG "QUIET" CACHE INTERNAL "") -else() - unset(_THRUST_QUIET CACHE) - unset(_THRUST_QUIET_FLAG CACHE) -endif() - -set(_THRUST_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "Location of thrust-config.cmake") - -# Internal target that actually holds the Thrust interface. Used by all other Thrust targets. -if (NOT TARGET Thrust::Thrust) - _thrust_declare_interface_alias(Thrust::Thrust _Thrust_Thrust) - # Strip out the 'thrust/cmake/' from '[thrust_include_path]/thrust/cmake/': - get_filename_component(_THRUST_INCLUDE_DIR "../.." ABSOLUTE BASE_DIR "${_THRUST_CMAKE_DIR}") - set(_THRUST_INCLUDE_DIR "${_THRUST_INCLUDE_DIR}" - CACHE INTERNAL "Location of thrust headers." - ) - target_include_directories(_Thrust_Thrust INTERFACE "${_THRUST_INCLUDE_DIR}") - thrust_debug_target(Thrust::Thrust "${THRUST_VERSION}" internal) -endif() - -# Handle find_package COMPONENT requests: -foreach(component ${${CMAKE_FIND_PACKAGE_NAME}_FIND_COMPONENTS}) - if (NOT component IN_LIST THRUST_HOST_SYSTEM_OPTIONS AND - NOT component IN_LIST THRUST_DEVICE_SYSTEM_OPTIONS) - message(FATAL_ERROR "Invalid component requested: '${component}'") - endif() - - unset(req) - if (${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED_${component}) - set(req "REQUIRED") - endif() - - thrust_debug("Preloading COMPONENT '${component}' ${req}" internal) - _thrust_find_backend(${component} "${req}") -endforeach() - -thrust_update_system_found_flags() diff --git a/spaces/CVPR/LIVE/thrust/thrust/mr/pool.h b/spaces/CVPR/LIVE/thrust/thrust/mr/pool.h deleted file mode 100644 index 322e4312f0ec25e3e0d7f4e7db384b55c2de13ef..0000000000000000000000000000000000000000 --- a/spaces/CVPR/LIVE/thrust/thrust/mr/pool.h +++ /dev/null @@ -1,505 +0,0 @@ -/* - * Copyright 2018 NVIDIA Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/*! \file pool.h - * \brief A caching and pooling memory resource adaptor which uses a single upstream resource for memory allocation, - * and embeds bookkeeping information in allocated blocks. - */ - -#pragma once - -#include - -#include - -#include -#include -#include - -#include - -namespace thrust -{ -namespace mr -{ - -/** \addtogroup memory_resources Memory Resources - * \ingroup memory_management_classes - * \{ - */ - -/*! A memory resource adaptor allowing for pooling and caching allocations from \p Upstream, using memory allocated - * from it for both blocks then allocated to the user and for internal bookkeeping of the cached memory. - * - * On a typical memory resource, calls to \p allocate and \p deallocate actually allocate and deallocate memory. Pooling - * memory resources only allocate and deallocate memory from an external resource (the upstream memory resource) when - * there's no suitable memory currently cached; otherwise, they use memory they have acquired beforehand, to make - * memory allocation faster and more efficient. - * - * The non-disjoint version of the pool resource uses a single upstream memory resource. Every allocation is larger than - * strictly necessary to fulfill the end-user's request, because it needs to account for the memory overhead of tracking - * the memory blocks and chunks inside those same memory regions. Nevertheless, this version should be more memory-efficient - * than the \p disjoint_unsynchronized_pool_resource, because it doesn't need to allocate additional blocks of memory - * from a separate resource, which in turn would necessitate the bookkeeping overhead in the upstream resource. - * - * This version requires that memory allocated from Upstream is accessible from device. It supports smart references, - * meaning that the non-managed CUDA resource, returning a device-tagged pointer, will work, but will be much less - * efficient than the disjoint version, which wouldn't need to touch device memory at all, and therefore wouldn't need - * to transfer it back and forth between the host and the device whenever an allocation or a deallocation happens. - * - * \tparam Upstream the type of memory resources that will be used for allocating memory blocks - */ -template -class unsynchronized_pool_resource THRUST_FINAL - : public memory_resource, - private validator -{ -public: - /*! Get the default options for a pool. These are meant to be a sensible set of values for many use cases, - * and as such, may be tuned in the future. This function is exposed so that creating a set of options that are - * just a slight departure from the defaults is easy. - */ - static pool_options get_default_options() - { - pool_options ret; - - ret.min_blocks_per_chunk = 16; - ret.min_bytes_per_chunk = 1024; - ret.max_blocks_per_chunk = static_cast(1) << 20; - ret.max_bytes_per_chunk = static_cast(1) << 30; - - ret.smallest_block_size = THRUST_MR_DEFAULT_ALIGNMENT; - ret.largest_block_size = static_cast(1) << 20; - - ret.alignment = THRUST_MR_DEFAULT_ALIGNMENT; - - ret.cache_oversized = true; - - ret.cached_size_cutoff_factor = 16; - ret.cached_alignment_cutoff_factor = 16; - - return ret; - } - - /*! Constructor. - * - * \param upstream the upstream memory resource for allocations - * \param options pool options to use - */ - unsynchronized_pool_resource(Upstream * upstream, pool_options options = get_default_options()) - : m_upstream(upstream), - m_options(options), - m_smallest_block_log2(detail::log2_ri(m_options.smallest_block_size)), - m_pools(upstream), - m_allocated(), - m_oversized(), - m_cached_oversized() - { - assert(m_options.validate()); - - pool p = { block_descriptor_ptr(), 0 }; - m_pools.resize(detail::log2_ri(m_options.largest_block_size) - m_smallest_block_log2 + 1, p); - } - - // TODO: C++11: use delegating constructors - - /*! Constructor. The upstream resource is obtained by calling \p get_global_resource. - * - * \param options pool options to use - */ - unsynchronized_pool_resource(pool_options options = get_default_options()) - : m_upstream(get_global_resource()), - m_options(options), - m_smallest_block_log2(detail::log2_ri(m_options.smallest_block_size)), - m_pools(get_global_resource()), - m_allocated(), - m_oversized(), - m_cached_oversized() - { - assert(m_options.validate()); - - pool p = { block_descriptor_ptr(), 0 }; - m_pools.resize(detail::log2_ri(m_options.largest_block_size) - m_smallest_block_log2 + 1, p); - } - - /*! Destructor. Releases all held memory to upstream. - */ - ~unsynchronized_pool_resource() - { - release(); - } - -private: - typedef typename Upstream::pointer void_ptr; - typedef typename thrust::detail::pointer_traits::template rebind::other char_ptr; - - struct block_descriptor; - struct chunk_descriptor; - struct oversized_block_descriptor; - - typedef typename thrust::detail::pointer_traits::template rebind::other block_descriptor_ptr; - typedef typename thrust::detail::pointer_traits::template rebind::other chunk_descriptor_ptr; - typedef typename thrust::detail::pointer_traits::template rebind::other oversized_block_descriptor_ptr; - - struct block_descriptor - { - block_descriptor_ptr next; - }; - - struct chunk_descriptor - { - std::size_t size; - chunk_descriptor_ptr next; - }; - - // this was originally a forward list, but I made it a doubly linked list - // because that way deallocation when not caching is faster and doesn't require - // traversal of a linked list (it's still a forward list for the cached list, - // because allocation from that list already traverses) - // - // TODO: investigate whether it's better to have this be a doubly-linked list - // with fast do_deallocate when !m_options.cache_oversized, or to have this be - // a forward list and require traversal in do_deallocate - // - // I assume that it is better this way, but the additional pointer could - // potentially hurt? these are supposed to be oversized and/or overaligned, - // so they are kinda memory intensive already - struct oversized_block_descriptor - { - std::size_t size; - std::size_t alignment; - oversized_block_descriptor_ptr prev; - oversized_block_descriptor_ptr next; - oversized_block_descriptor_ptr next_cached; - }; - - struct pool - { - block_descriptor_ptr free_list; - std::size_t previous_allocated_count; - }; - - typedef thrust::host_vector< - pool, - allocator - > pool_vector; - - Upstream * m_upstream; - - pool_options m_options; - std::size_t m_smallest_block_log2; - - pool_vector m_pools; - chunk_descriptor_ptr m_allocated; - oversized_block_descriptor_ptr m_oversized; - oversized_block_descriptor_ptr m_cached_oversized; - -public: - /*! Releases all held memory to upstream. - */ - void release() - { - // reset the buckets - for (std::size_t i = 0; i < m_pools.size(); ++i) - { - thrust::raw_reference_cast(m_pools[i]).free_list = block_descriptor_ptr(); - thrust::raw_reference_cast(m_pools[i]).previous_allocated_count = 0; - } - - // deallocate memory allocated for the buckets - while (detail::pointer_traits::get(m_allocated)) - { - chunk_descriptor_ptr alloc = m_allocated; - m_allocated = thrust::raw_reference_cast(*m_allocated).next; - - void_ptr p = static_cast( - static_cast( - static_cast(alloc) - ) - thrust::raw_reference_cast(*alloc).size - ); - m_upstream->do_deallocate(p, thrust::raw_reference_cast(*alloc).size + sizeof(chunk_descriptor), m_options.alignment); - } - - // deallocate cached oversized/overaligned memory - while (detail::pointer_traits::get(m_oversized)) - { - oversized_block_descriptor_ptr alloc = m_oversized; - m_oversized = thrust::raw_reference_cast(*m_oversized).next; - - void_ptr p = static_cast( - static_cast( - static_cast(alloc) - ) - thrust::raw_reference_cast(*alloc).size - ); - m_upstream->do_deallocate(p, thrust::raw_reference_cast(*alloc).size + sizeof(oversized_block_descriptor), thrust::raw_reference_cast(*alloc).alignment); - } - - m_cached_oversized = oversized_block_descriptor_ptr(); - } - - THRUST_NODISCARD virtual void_ptr do_allocate(std::size_t bytes, std::size_t alignment = THRUST_MR_DEFAULT_ALIGNMENT) THRUST_OVERRIDE - { - bytes = (std::max)(bytes, m_options.smallest_block_size); - assert(detail::is_power_of_2(alignment)); - - // an oversized and/or overaligned allocation requested; needs to be allocated separately - if (bytes > m_options.largest_block_size || alignment > m_options.alignment) - { - if (m_options.cache_oversized) - { - oversized_block_descriptor_ptr ptr = m_cached_oversized; - oversized_block_descriptor_ptr * previous = &m_cached_oversized; - while (detail::pointer_traits::get(ptr)) - { - oversized_block_descriptor desc = *ptr; - bool is_good = desc.size >= bytes && desc.alignment >= alignment; - - // if the size is bigger than the requested size by a factor - // bigger than or equal to the specified cutoff for size, - // allocate a new block - if (is_good) - { - std::size_t size_factor = desc.size / bytes; - if (size_factor >= m_options.cached_size_cutoff_factor) - { - is_good = false; - } - } - - // if the alignment is bigger than the requested one by a factor - // bigger than or equal to the specified cutoff for alignment, - // allocate a new block - if (is_good) - { - std::size_t alignment_factor = desc.alignment / alignment; - if (alignment_factor >= m_options.cached_alignment_cutoff_factor) - { - is_good = false; - } - } - - if (is_good) - { - if (previous != &m_cached_oversized) - { - oversized_block_descriptor previous_desc = **previous; - previous_desc.next_cached = desc.next_cached; - **previous = previous_desc; - } - else - { - m_cached_oversized = desc.next_cached; - } - - desc.next_cached = oversized_block_descriptor_ptr(); - *ptr = desc; - - return static_cast( - static_cast( - static_cast(ptr) - ) - desc.size - ); - } - - previous = &thrust::raw_reference_cast(*ptr).next_cached; - ptr = *previous; - } - } - - // no fitting cached block found; allocate a new one that's just up to the specs - void_ptr allocated = m_upstream->do_allocate(bytes + sizeof(oversized_block_descriptor), alignment); - oversized_block_descriptor_ptr block = static_cast( - static_cast( - static_cast(allocated) + bytes - ) - ); - - oversized_block_descriptor desc; - desc.size = bytes; - desc.alignment = alignment; - desc.prev = oversized_block_descriptor_ptr(); - desc.next = m_oversized; - desc.next_cached = oversized_block_descriptor_ptr(); - *block = desc; - m_oversized = block; - - if (detail::pointer_traits::get(desc.next)) - { - oversized_block_descriptor next = *desc.next; - next.prev = block; - *desc.next = next; - } - - return allocated; - } - - // the request is NOT for oversized and/or overaligned memory - // allocate a block from an appropriate bucket - std::size_t bytes_log2 = thrust::detail::log2_ri(bytes); - std::size_t bucket_idx = bytes_log2 - m_smallest_block_log2; - pool & bucket = thrust::raw_reference_cast(m_pools[bucket_idx]); - - bytes = static_cast(1) << bytes_log2; - - // if the free list of the bucket has no elements, allocate a new chunk - // and split it into blocks pushed to the free list - if (!detail::pointer_traits::get(bucket.free_list)) - { - std::size_t n = bucket.previous_allocated_count; - if (n == 0) - { - n = m_options.min_blocks_per_chunk; - if (n < (m_options.min_bytes_per_chunk >> bytes_log2)) - { - n = m_options.min_bytes_per_chunk >> bytes_log2; - } - } - else - { - n = n * 3 / 2; - if (n > (m_options.max_bytes_per_chunk >> bytes_log2)) - { - n = m_options.max_bytes_per_chunk >> bytes_log2; - } - if (n > m_options.max_blocks_per_chunk) - { - n = m_options.max_blocks_per_chunk; - } - } - - std::size_t descriptor_size = (std::max)(sizeof(block_descriptor), m_options.alignment); - std::size_t block_size = bytes + descriptor_size; - block_size += m_options.alignment - block_size % m_options.alignment; - std::size_t chunk_size = block_size * n; - - void_ptr allocated = m_upstream->do_allocate(chunk_size + sizeof(chunk_descriptor), m_options.alignment); - chunk_descriptor_ptr chunk = static_cast( - static_cast( - static_cast(allocated) + chunk_size - ) - ); - - chunk_descriptor desc; - desc.size = chunk_size; - desc.next = m_allocated; - *chunk = desc; - m_allocated = chunk; - - for (std::size_t i = 0; i < n; ++i) - { - block_descriptor_ptr block = static_cast( - static_cast( - static_cast(allocated) + block_size * i + bytes - ) - ); - - block_descriptor desc; - desc.next = bucket.free_list; - *block = desc; - bucket.free_list = block; - } - } - - // allocate a block from the front of the bucket's free list - block_descriptor_ptr block = bucket.free_list; - bucket.free_list = thrust::raw_reference_cast(*block).next; - return static_cast( - static_cast( - static_cast(block) - ) - bytes - ); - } - - virtual void do_deallocate(void_ptr p, std::size_t n, std::size_t alignment = THRUST_MR_DEFAULT_ALIGNMENT) THRUST_OVERRIDE - { - n = (std::max)(n, m_options.smallest_block_size); - assert(detail::is_power_of_2(alignment)); - - // verify that the pointer is at least as aligned as claimed - assert(reinterpret_cast(detail::pointer_traits::get(p)) % alignment == 0); - - // the deallocated block is oversized and/or overaligned - if (n > m_options.largest_block_size || alignment > m_options.alignment) - { - oversized_block_descriptor_ptr block = static_cast( - static_cast( - static_cast(p) + n - ) - ); - - oversized_block_descriptor desc = *block; - - if (m_options.cache_oversized) - { - desc.next_cached = m_cached_oversized; - *block = desc; - m_cached_oversized = block; - - return; - } - - if (!detail::pointer_traits::get(desc.prev)) - { - assert(m_oversized == block); - m_oversized = desc.next; - } - else - { - oversized_block_descriptor prev = *desc.prev; - assert(prev.next == block); - prev.next = desc.next; - *desc.prev = prev; - } - - if (detail::pointer_traits::get(desc.next)) - { - oversized_block_descriptor next = *desc.next; - assert(next.prev == block); - next.prev = desc.prev; - *desc.next = next; - } - - m_upstream->do_deallocate(p, desc.size + sizeof(oversized_block_descriptor), desc.alignment); - - return; - } - - // push the block to the front of the appropriate bucket's free list - std::size_t n_log2 = thrust::detail::log2_ri(n); - std::size_t bucket_idx = n_log2 - m_smallest_block_log2; - pool & bucket = thrust::raw_reference_cast(m_pools[bucket_idx]); - - n = static_cast(1) << n_log2; - - block_descriptor_ptr block = static_cast( - static_cast( - static_cast(p) + n - ) - ); - - block_descriptor desc; - desc.next = bucket.free_list; - *block = desc; - bucket.free_list = block; - } -}; - -/*! \} - */ - -} // end mr -} // end thrust - diff --git a/spaces/CVPR/WALT/mmdet/datasets/__init__.py b/spaces/CVPR/WALT/mmdet/datasets/__init__.py deleted file mode 100644 index 9b18b30a258c32283cbfc03ba01781a19fd993c1..0000000000000000000000000000000000000000 --- a/spaces/CVPR/WALT/mmdet/datasets/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset -from .cityscapes import CityscapesDataset -from .coco import CocoDataset -from .custom import CustomDataset -from .dataset_wrappers import (ClassBalancedDataset, ConcatDataset, - RepeatDataset) -from .deepfashion import DeepFashionDataset -from .lvis import LVISDataset, LVISV1Dataset, LVISV05Dataset -from .samplers import DistributedGroupSampler, DistributedSampler, GroupSampler -from .utils import (NumClassCheckHook, get_loading_pipeline, - replace_ImageToTensor) -from .voc import VOCDataset -from .wider_face import WIDERFaceDataset -from .xml_style import XMLDataset - -__all__ = [ - 'CustomDataset', 'XMLDataset', 'CocoDataset', 'DeepFashionDataset', - 'VOCDataset', 'CityscapesDataset', 'LVISDataset', 'LVISV05Dataset', - 'LVISV1Dataset', 'GroupSampler', 'DistributedGroupSampler', - 'DistributedSampler', 'build_dataloader', 'ConcatDataset', 'RepeatDataset', - 'ClassBalancedDataset', 'WIDERFaceDataset', 'DATASETS', 'PIPELINES', - 'build_dataset', 'replace_ImageToTensor', 'get_loading_pipeline', - 'NumClassCheckHook' -] diff --git a/spaces/CVPR/WALT/mmdet/models/roi_heads/mask_heads/__init__.py b/spaces/CVPR/WALT/mmdet/models/roi_heads/mask_heads/__init__.py deleted file mode 100644 index 9c8a76a76f275287006a5e9bbb52b9de962b627c..0000000000000000000000000000000000000000 --- a/spaces/CVPR/WALT/mmdet/models/roi_heads/mask_heads/__init__.py +++ /dev/null @@ -1,18 +0,0 @@ -from .coarse_mask_head import CoarseMaskHead -from .fcn_mask_head import FCNMaskHead -from .fcn_occmask_head import FCNOccMaskHead -from .feature_relay_head import FeatureRelayHead -from .fused_semantic_head import FusedSemanticHead -from .global_context_head import GlobalContextHead -from .grid_head import GridHead -from .htc_mask_head import HTCMaskHead -from .mask_point_head import MaskPointHead -from .maskiou_head import MaskIoUHead -from .scnet_mask_head import SCNetMaskHead -from .scnet_semantic_head import SCNetSemanticHead - -__all__ = [ - 'FCNMaskHead', 'FCNOccMaskHead', 'HTCMaskHead', 'FusedSemanticHead', 'GridHead', - 'MaskIoUHead', 'CoarseMaskHead', 'MaskPointHead', 'SCNetMaskHead', - 'SCNetSemanticHead', 'GlobalContextHead', 'FeatureRelayHead' -] diff --git a/spaces/CVPR/drawings-to-human/static/_app/immutable/chunks/index-bcf2726a.js b/spaces/CVPR/drawings-to-human/static/_app/immutable/chunks/index-bcf2726a.js deleted file mode 100644 index 2d47b275bdcb23c7324444798fdc9687822aeb28..0000000000000000000000000000000000000000 --- a/spaces/CVPR/drawings-to-human/static/_app/immutable/chunks/index-bcf2726a.js +++ /dev/null @@ -1 +0,0 @@ -function N(){}function H(t,n){for(const e in n)t[e]=n[e];return t}function B(t){return t()}function M(){return Object.create(null)}function p(t){t.forEach(B)}function I(t){return typeof t=="function"}function lt(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}let g;function ot(t,n){return g||(g=document.createElement("a")),g.href=n,t===g.href}function W(t){return Object.keys(t).length===0}function G(t,...n){if(t==null)return N;const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function st(t,n,e){t.$$.on_destroy.push(G(n,e))}function at(t,n,e,i){if(t){const c=L(t,n,e,i);return t[0](c)}}function L(t,n,e,i){return t[1]&&i?H(e.ctx.slice(),t[1](i(n))):e.ctx}function ft(t,n,e,i){if(t[2]&&i){const c=t[2](i(e));if(n.dirty===void 0)return c;if(typeof c=="object"){const s=[],u=Math.max(n.dirty.length,c.length);for(let l=0;l32){const n=[],e=t.ctx.length/32;for(let i=0;i>1);e(c)<=i?t=c+1:n=c}return t}function R(t){if(t.hydrate_init)return;t.hydrate_init=!0;let n=t.childNodes;if(t.nodeName==="HEAD"){const r=[];for(let o=0;o0&&n[e[c]].claim_order<=o?c+1:Q(1,c,y=>n[e[y]].claim_order,o))-1;i[r]=e[f]+1;const a=f+1;e[a]=r,c=Math.max(a,c)}const s=[],u=[];let l=n.length-1;for(let r=e[c]+1;r!=0;r=i[r-1]){for(s.push(n[r-1]);l>=r;l--)u.push(n[l]);l--}for(;l>=0;l--)u.push(n[l]);s.reverse(),u.sort((r,o)=>r.claim_order-o.claim_order);for(let r=0,o=0;r=s[o].claim_order;)o++;const f=ot.removeEventListener(n,e,i)}function xt(t){return function(n){return n.preventDefault(),t.call(this,n)}}function $t(t,n,e){e==null?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function wt(t){return t===""?null:+t}function Z(t){return Array.from(t.childNodes)}function tt(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function O(t,n,e,i,c=!1){tt(t);const s=(()=>{for(let u=t.claim_info.last_index;u=0;u--){const l=t[u];if(n(l)){const r=e(l);return r===void 0?t.splice(u,1):t[u]=r,c?r===void 0&&t.claim_info.last_index--:t.claim_info.last_index=u,l}}return i()})();return s.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,s}function P(t,n,e,i){return O(t,c=>c.nodeName===n,c=>{const s=[];for(let u=0;uc.removeAttribute(u))},()=>i(n))}function vt(t,n,e){return P(t,n,e,X)}function Et(t,n,e){return P(t,n,e,Y)}function nt(t,n){return O(t,e=>e.nodeType===3,e=>{const i=""+n;if(e.data.startsWith(i)){if(e.data.length!==i.length)return e.splitText(i.length)}else e.data=i},()=>j(n),!0)}function kt(t){return nt(t," ")}function Nt(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function jt(t,n){t.value=n==null?"":n}function St(t,n,e,i){e===null?t.style.removeProperty(n):t.style.setProperty(n,e,i?"important":"")}let m;function h(t){m=t}function S(){if(!m)throw new Error("Function called outside component initialization");return m}function At(t){S().$$.on_mount.push(t)}function Ct(t){S().$$.after_update.push(t)}function Mt(t,n){return S().$$.context.set(t,n),n}const d=[],T=[],x=[],q=[],D=Promise.resolve();let E=!1;function z(){E||(E=!0,D.then(F))}function Tt(){return z(),D}function k(t){x.push(t)}const v=new Set;let b=0;function F(){const t=m;do{for(;b{$.delete(t),i&&(e&&t.d(1),i())}),t.o(n)}}function Ot(t,n){const e={},i={},c={$$scope:1};let s=t.length;for(;s--;){const u=t[s],l=n[s];if(l){for(const r in u)r in l||(i[r]=1);for(const r in l)c[r]||(e[r]=l[r],c[r]=1);t[s]=l}else for(const r in u)c[r]=1}for(const u in i)u in e||(e[u]=void 0);return e}function Pt(t){return typeof t=="object"&&t!==null?t:{}}function Dt(t){t&&t.c()}function zt(t,n){t&&t.l(n)}function rt(t,n,e,i){const{fragment:c,on_mount:s,on_destroy:u,after_update:l}=t.$$;c&&c.m(n,e),i||k(()=>{const r=s.map(B).filter(I);u?u.push(...r):p(r),t.$$.on_mount=[]}),l.forEach(k)}function ct(t,n){const e=t.$$;e.fragment!==null&&(p(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}function ut(t,n){t.$$.dirty[0]===-1&&(d.push(t),z(),t.$$.dirty.fill(0)),t.$$.dirty[n/31|0]|=1<{const C=A.length?A[0]:y;return o.ctx&&c(o.ctx[a],o.ctx[a]=C)&&(!o.skip_bound&&o.bound[a]&&o.bound[a](C),f&&ut(t,a)),y}):[],o.update(),f=!0,p(o.before_update),o.fragment=i?i(o.ctx):!1,n.target){if(n.hydrate){J();const a=Z(n.target);o.fragment&&o.fragment.l(a),a.forEach(V)}else o.fragment&&o.fragment.c();n.intro&&it(t.$$.fragment),rt(t,n.target,n.anchor,n.customElement),K(),F()}h(r)}class Ht{$destroy(){ct(this,1),this.$destroy=N}$on(n,e){const i=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return i.push(e),()=>{const c=i.indexOf(e);c!==-1&&i.splice(c,1)}}$set(n){this.$$set&&!W(n)&&(this.$$.skip_bound=!0,this.$$set(n),this.$$.skip_bound=!1)}}export{Pt as A,ct as B,H as C,Tt as D,N as E,at as F,_t as G,dt as H,ft as I,U as J,ot as K,bt as L,pt as M,st as N,ht as O,Y as P,Et as Q,jt as R,Ht as S,xt as T,p as U,wt as V,T as W,Z as a,$t as b,vt as c,V as d,X as e,St as f,mt as g,nt as h,Ft as i,Nt as j,yt as k,gt as l,kt as m,qt as n,Lt as o,Bt as p,it as q,Mt as r,lt as s,j as t,Ct as u,At as v,Dt as w,zt as x,rt as y,Ot as z}; diff --git a/spaces/CVPR/monoscene_lite/helpers.py b/spaces/CVPR/monoscene_lite/helpers.py deleted file mode 100644 index 332c837e19404c0fd96fc7905423404d3a415bae..0000000000000000000000000000000000000000 --- a/spaces/CVPR/monoscene_lite/helpers.py +++ /dev/null @@ -1,336 +0,0 @@ -import numpy as np -import torch -import fusion -import pandas as pd -import plotly.express as px -import plotly.graph_objects as go - -def read_calib(calib_path): - """ - Modify from https://github.com/utiasSTARS/pykitti/blob/d3e1bb81676e831886726cc5ed79ce1f049aef2c/pykitti/utils.py#L68 - :param calib_path: Path to a calibration text file. - :return: dict with calibration matrices. - """ - calib_all = {} - with open(calib_path, "r") as f: - for line in f.readlines(): - if line == "\n": - break - key, value = line.split(":", 1) - calib_all[key] = np.array([float(x) for x in value.split()]) - - # reshape matrices - calib_out = {} - # 3x4 projection matrix for left camera - calib_out["P2"] = calib_all["P2"].reshape(3, 4) - calib_out["Tr"] = np.identity(4) # 4x4 matrix - calib_out["Tr"][:3, :4] = calib_all["Tr"].reshape(3, 4) - return calib_out - - -def vox2pix(cam_E, cam_k, - vox_origin, voxel_size, - img_W, img_H, - scene_size): - """ - compute the 2D projection of voxels centroids - - Parameters: - ---------- - cam_E: 4x4 - =camera pose in case of NYUv2 dataset - =Transformation from camera to lidar coordinate in case of SemKITTI - cam_k: 3x3 - camera intrinsics - vox_origin: (3,) - world(NYU)/lidar(SemKITTI) cooridnates of the voxel at index (0, 0, 0) - img_W: int - image width - img_H: int - image height - scene_size: (3,) - scene size in meter: (51.2, 51.2, 6.4) for SemKITTI and (4.8, 4.8, 2.88) for NYUv2 - - Returns - ------- - projected_pix: (N, 2) - Projected 2D positions of voxels - fov_mask: (N,) - Voxels mask indice voxels inside image's FOV - pix_z: (N,) - Voxels'distance to the sensor in meter - """ - # Compute the x, y, z bounding of the scene in meter - vol_bnds = np.zeros((3,2)) - vol_bnds[:,0] = vox_origin - vol_bnds[:,1] = vox_origin + np.array(scene_size) - - # Compute the voxels centroids in lidar cooridnates - vol_dim = np.ceil((vol_bnds[:,1]- vol_bnds[:,0])/ voxel_size).copy(order='C').astype(int) - xv, yv, zv = np.meshgrid( - range(vol_dim[0]), - range(vol_dim[1]), - range(vol_dim[2]), - indexing='ij' - ) - vox_coords = np.concatenate([ - xv.reshape(1,-1), - yv.reshape(1,-1), - zv.reshape(1,-1) - ], axis=0).astype(int).T - - # Project voxels'centroid from lidar coordinates to camera coordinates - cam_pts = fusion.TSDFVolume.vox2world(vox_origin, vox_coords, voxel_size) - cam_pts = fusion.rigid_transform(cam_pts, cam_E) - - # Project camera coordinates to pixel positions - projected_pix = fusion.TSDFVolume.cam2pix(cam_pts, cam_k) - pix_x, pix_y = projected_pix[:, 0], projected_pix[:, 1] - - # Eliminate pixels outside view frustum - pix_z = cam_pts[:, 2] - fov_mask = np.logical_and(pix_x >= 0, - np.logical_and(pix_x < img_W, - np.logical_and(pix_y >= 0, - np.logical_and(pix_y < img_H, - pix_z > 0)))) - - - return torch.from_numpy(projected_pix), torch.from_numpy(fov_mask), torch.from_numpy(pix_z) - - - -def get_grid_coords(dims, resolution): - """ - :param dims: the dimensions of the grid [x, y, z] (i.e. [256, 256, 32]) - :return coords_grid: is the center coords of voxels in the grid - """ - - g_xx = np.arange(0, dims[0] + 1) - g_yy = np.arange(0, dims[1] + 1) - sensor_pose = 10 - g_zz = np.arange(0, dims[2] + 1) - - # Obtaining the grid with coords... - xx, yy, zz = np.meshgrid(g_xx[:-1], g_yy[:-1], g_zz[:-1]) - coords_grid = np.array([xx.flatten(), yy.flatten(), zz.flatten()]).T - coords_grid = coords_grid.astype(np.float) - - coords_grid = (coords_grid * resolution) + resolution / 2 - - temp = np.copy(coords_grid) - temp[:, 0] = coords_grid[:, 1] - temp[:, 1] = coords_grid[:, 0] - coords_grid = np.copy(temp) - - return coords_grid - -def get_projections(img_W, img_H): - scale_3ds = [2, 4] - data = {} - for scale_3d in scale_3ds: - scene_size = (51.2, 51.2, 6.4) - vox_origin = np.array([0, -25.6, -2]) - voxel_size = 0.2 - - calib = read_calib("calib.txt") - cam_k = calib["P2"][:3, :3] - T_velo_2_cam = calib["Tr"] - - # compute the 3D-2D mapping - projected_pix, fov_mask, pix_z = vox2pix( - T_velo_2_cam, - cam_k, - vox_origin, - voxel_size * scale_3d, - img_W, - img_H, - scene_size, - ) - - data["projected_pix_{}".format(scale_3d)] = projected_pix - data["pix_z_{}".format(scale_3d)] = pix_z - data["fov_mask_{}".format(scale_3d)] = fov_mask - return data - - -def majority_pooling(grid, k_size=2): - result = np.zeros( - (grid.shape[0] // k_size, grid.shape[1] // k_size, grid.shape[2] // k_size) - ) - for xx in range(0, int(np.floor(grid.shape[0] / k_size))): - for yy in range(0, int(np.floor(grid.shape[1] / k_size))): - for zz in range(0, int(np.floor(grid.shape[2] / k_size))): - - sub_m = grid[ - (xx * k_size) : (xx * k_size) + k_size, - (yy * k_size) : (yy * k_size) + k_size, - (zz * k_size) : (zz * k_size) + k_size, - ] - unique, counts = np.unique(sub_m, return_counts=True) - if True in ((unique != 0) & (unique != 255)): - # Remove counts with 0 and 255 - counts = counts[((unique != 0) & (unique != 255))] - unique = unique[((unique != 0) & (unique != 255))] - else: - if True in (unique == 0): - counts = counts[(unique != 255)] - unique = unique[(unique != 255)] - value = unique[np.argmax(counts)] - result[xx, yy, zz] = value - return result - - -def draw( - voxels, - # T_velo_2_cam, - # vox_origin, - fov_mask, - # img_size, - # f, - voxel_size=0.4, - # d=7, # 7m - determine the size of the mesh representing the camera -): - - fov_mask = fov_mask.reshape(-1) - # Compute the voxels coordinates - grid_coords = get_grid_coords( - [voxels.shape[0], voxels.shape[1], voxels.shape[2]], voxel_size - ) - - - # Attach the predicted class to every voxel - grid_coords = np.vstack([grid_coords.T, voxels.reshape(-1)]).T - - # Get the voxels inside FOV - fov_grid_coords = grid_coords[fov_mask, :] - - # Get the voxels outside FOV - outfov_grid_coords = grid_coords[~fov_mask, :] - - # Remove empty and unknown voxels - fov_voxels = fov_grid_coords[ - (fov_grid_coords[:, 3] > 0) & (fov_grid_coords[:, 3] < 255), : - ] - # print(np.unique(fov_voxels[:, 3], return_counts=True)) - outfov_voxels = outfov_grid_coords[ - (outfov_grid_coords[:, 3] > 0) & (outfov_grid_coords[:, 3] < 255), : - ] - - # figure = mlab.figure(size=(1400, 1400), bgcolor=(1, 1, 1)) - colors = np.array( - [ - [0,0,0], - [100, 150, 245], - [100, 230, 245], - [30, 60, 150], - [80, 30, 180], - [100, 80, 250], - [255, 30, 30], - [255, 40, 200], - [150, 30, 90], - [255, 0, 255], - [255, 150, 255], - [75, 0, 75], - [175, 0, 75], - [255, 200, 0], - [255, 120, 50], - [0, 175, 0], - [135, 60, 0], - [150, 240, 80], - [255, 240, 150], - [255, 0, 0], - ] - ).astype(np.uint8) - - pts_colors = [f'rgb({colors[int(i)][0]}, {colors[int(i)][1]}, {colors[int(i)][2]})' for i in fov_voxels[:, 3]] - out_fov_colors = [f'rgb({colors[int(i)][0]//3*2}, {colors[int(i)][1]//3*2}, {colors[int(i)][2]//3*2})' for i in outfov_voxels[:, 3]] - pts_colors = pts_colors + out_fov_colors - - fov_voxels = np.concatenate([fov_voxels, outfov_voxels], axis=0) - x = fov_voxels[:, 0].flatten() - y = fov_voxels[:, 1].flatten() - z = fov_voxels[:, 2].flatten() - # label = fov_voxels[:, 3].flatten() - fig = go.Figure(data=[go.Scatter3d(x=x, y=y, z=z,mode='markers', - marker=dict( - size=2, - color=pts_colors, # set color to an array/list of desired values - # colorscale='Viridis', # choose a colorscale - opacity=1.0, - symbol='square' - ))]) - fig.update_layout( - scene = dict( - aspectmode='data', - xaxis = dict( - backgroundcolor="rgb(255, 255, 255)", - gridcolor="black", - showbackground=True, - zerolinecolor="black", - nticks=4, - visible=False, - range=[-1,55],), - yaxis = dict( - backgroundcolor="rgb(255, 255, 255)", - gridcolor="black", - showbackground=True, - zerolinecolor="black", - visible=False, - nticks=4, range=[-1,55],), - zaxis = dict( - backgroundcolor="rgb(255, 255, 255)", - gridcolor="black", - showbackground=True, - zerolinecolor="black", - visible=False, - nticks=4, range=[-1,7],), - bgcolor="black", - ), - - ) - - # fig = px.scatter_3d( - # fov_voxels, - # x=fov_voxels[:, 0], y="y", z="z", color="label") - # Draw occupied inside FOV voxels - # plt_plot_fov = mlab.points3d( - # fov_voxels[:, 0], - # fov_voxels[:, 1], - # fov_voxels[:, 2], - # fov_voxels[:, 3], - # colormap="viridis", - # scale_factor=voxel_size - 0.05 * voxel_size, - # mode="cube", - # opacity=1.0, - # vmin=1, - # vmax=19, - # ) - - # # Draw occupied outside FOV voxels - # plt_plot_outfov = mlab.points3d( - # outfov_voxels[:, 0], - # outfov_voxels[:, 1], - # outfov_voxels[:, 2], - # outfov_voxels[:, 3], - # colormap="viridis", - # scale_factor=voxel_size - 0.05 * voxel_size, - # mode="cube", - # opacity=1.0, - # vmin=1, - # vmax=19, - # ) - - - - # plt_plot_fov.glyph.scale_mode = "scale_by_vector" - # plt_plot_outfov.glyph.scale_mode = "scale_by_vector" - - # plt_plot_fov.module_manager.scalar_lut_manager.lut.table = colors - - # outfov_colors = colors - # outfov_colors[:, :3] = outfov_colors[:, :3] // 3 * 2 - # plt_plot_outfov.module_manager.scalar_lut_manager.lut.table = outfov_colors - - # mlab.show() - return fig \ No newline at end of file diff --git a/spaces/CVPR/regionclip-demo/detectron2/checkpoint/catalog.py b/spaces/CVPR/regionclip-demo/detectron2/checkpoint/catalog.py deleted file mode 100644 index 9a85736754a0de4550df96c22f38fc515bd02d71..0000000000000000000000000000000000000000 --- a/spaces/CVPR/regionclip-demo/detectron2/checkpoint/catalog.py +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -import logging - -from detectron2.utils.file_io import PathHandler, PathManager - - -class ModelCatalog(object): - """ - Store mappings from names to third-party models. - """ - - S3_C2_DETECTRON_PREFIX = "https://dl.fbaipublicfiles.com/detectron" - - # MSRA models have STRIDE_IN_1X1=True. False otherwise. - # NOTE: all BN models here have fused BN into an affine layer. - # As a result, you should only load them to a model with "FrozenBN". - # Loading them to a model with regular BN or SyncBN is wrong. - # Even when loaded to FrozenBN, it is still different from affine by an epsilon, - # which should be negligible for training. - # NOTE: all models here uses PIXEL_STD=[1,1,1] - # NOTE: Most of the BN models here are no longer used. We use the - # re-converted pre-trained models under detectron2 model zoo instead. - C2_IMAGENET_MODELS = { - "MSRA/R-50": "ImageNetPretrained/MSRA/R-50.pkl", - "MSRA/R-101": "ImageNetPretrained/MSRA/R-101.pkl", - "FAIR/R-50-GN": "ImageNetPretrained/47261647/R-50-GN.pkl", - "FAIR/R-101-GN": "ImageNetPretrained/47592356/R-101-GN.pkl", - "FAIR/X-101-32x8d": "ImageNetPretrained/20171220/X-101-32x8d.pkl", - "FAIR/X-101-64x4d": "ImageNetPretrained/FBResNeXt/X-101-64x4d.pkl", - "FAIR/X-152-32x8d-IN5k": "ImageNetPretrained/25093814/X-152-32x8d-IN5k.pkl", - } - - C2_DETECTRON_PATH_FORMAT = ( - "{prefix}/{url}/output/train/{dataset}/{type}/model_final.pkl" # noqa B950 - ) - - C2_DATASET_COCO = "coco_2014_train%3Acoco_2014_valminusminival" - C2_DATASET_COCO_KEYPOINTS = "keypoints_coco_2014_train%3Akeypoints_coco_2014_valminusminival" - - # format: {model_name} -> part of the url - C2_DETECTRON_MODELS = { - "35857197/e2e_faster_rcnn_R-50-C4_1x": "35857197/12_2017_baselines/e2e_faster_rcnn_R-50-C4_1x.yaml.01_33_49.iAX0mXvW", # noqa B950 - "35857345/e2e_faster_rcnn_R-50-FPN_1x": "35857345/12_2017_baselines/e2e_faster_rcnn_R-50-FPN_1x.yaml.01_36_30.cUF7QR7I", # noqa B950 - "35857890/e2e_faster_rcnn_R-101-FPN_1x": "35857890/12_2017_baselines/e2e_faster_rcnn_R-101-FPN_1x.yaml.01_38_50.sNxI7sX7", # noqa B950 - "36761737/e2e_faster_rcnn_X-101-32x8d-FPN_1x": "36761737/12_2017_baselines/e2e_faster_rcnn_X-101-32x8d-FPN_1x.yaml.06_31_39.5MIHi1fZ", # noqa B950 - "35858791/e2e_mask_rcnn_R-50-C4_1x": "35858791/12_2017_baselines/e2e_mask_rcnn_R-50-C4_1x.yaml.01_45_57.ZgkA7hPB", # noqa B950 - "35858933/e2e_mask_rcnn_R-50-FPN_1x": "35858933/12_2017_baselines/e2e_mask_rcnn_R-50-FPN_1x.yaml.01_48_14.DzEQe4wC", # noqa B950 - "35861795/e2e_mask_rcnn_R-101-FPN_1x": "35861795/12_2017_baselines/e2e_mask_rcnn_R-101-FPN_1x.yaml.02_31_37.KqyEK4tT", # noqa B950 - "36761843/e2e_mask_rcnn_X-101-32x8d-FPN_1x": "36761843/12_2017_baselines/e2e_mask_rcnn_X-101-32x8d-FPN_1x.yaml.06_35_59.RZotkLKI", # noqa B950 - "48616381/e2e_mask_rcnn_R-50-FPN_2x_gn": "GN/48616381/04_2018_gn_baselines/e2e_mask_rcnn_R-50-FPN_2x_gn_0416.13_23_38.bTlTI97Q", # noqa B950 - "37697547/e2e_keypoint_rcnn_R-50-FPN_1x": "37697547/12_2017_baselines/e2e_keypoint_rcnn_R-50-FPN_1x.yaml.08_42_54.kdzV35ao", # noqa B950 - "35998355/rpn_R-50-C4_1x": "35998355/12_2017_baselines/rpn_R-50-C4_1x.yaml.08_00_43.njH5oD9L", # noqa B950 - "35998814/rpn_R-50-FPN_1x": "35998814/12_2017_baselines/rpn_R-50-FPN_1x.yaml.08_06_03.Axg0r179", # noqa B950 - "36225147/fast_R-50-FPN_1x": "36225147/12_2017_baselines/fast_rcnn_R-50-FPN_1x.yaml.08_39_09.L3obSdQ2", # noqa B950 - } - - @staticmethod - def get(name): - if name.startswith("Caffe2Detectron/COCO"): - return ModelCatalog._get_c2_detectron_baseline(name) - if name.startswith("ImageNetPretrained/"): - return ModelCatalog._get_c2_imagenet_pretrained(name) - raise RuntimeError("model not present in the catalog: {}".format(name)) - - @staticmethod - def _get_c2_imagenet_pretrained(name): - prefix = ModelCatalog.S3_C2_DETECTRON_PREFIX - name = name[len("ImageNetPretrained/") :] - name = ModelCatalog.C2_IMAGENET_MODELS[name] - url = "/".join([prefix, name]) - return url - - @staticmethod - def _get_c2_detectron_baseline(name): - name = name[len("Caffe2Detectron/COCO/") :] - url = ModelCatalog.C2_DETECTRON_MODELS[name] - if "keypoint_rcnn" in name: - dataset = ModelCatalog.C2_DATASET_COCO_KEYPOINTS - else: - dataset = ModelCatalog.C2_DATASET_COCO - - if "35998355/rpn_R-50-C4_1x" in name: - # this one model is somehow different from others .. - type = "rpn" - else: - type = "generalized_rcnn" - - # Detectron C2 models are stored in the structure defined in `C2_DETECTRON_PATH_FORMAT`. - url = ModelCatalog.C2_DETECTRON_PATH_FORMAT.format( - prefix=ModelCatalog.S3_C2_DETECTRON_PREFIX, url=url, type=type, dataset=dataset - ) - return url - - -class ModelCatalogHandler(PathHandler): - """ - Resolve URL like catalog://. - """ - - PREFIX = "catalog://" - - def _get_supported_prefixes(self): - return [self.PREFIX] - - def _get_local_path(self, path, **kwargs): - logger = logging.getLogger(__name__) - catalog_path = ModelCatalog.get(path[len(self.PREFIX) :]) - logger.info("Catalog entry {} points to {}".format(path, catalog_path)) - return PathManager.get_local_path(catalog_path, **kwargs) - - def _open(self, path, mode="r", **kwargs): - return PathManager.open(self._get_local_path(path), mode, **kwargs) - - -PathManager.register_handler(ModelCatalogHandler()) diff --git a/spaces/Cam-Brazy/BearTest/app.py b/spaces/Cam-Brazy/BearTest/app.py deleted file mode 100644 index 7e09844c443b734531bc271c130fd7dedbae97c2..0000000000000000000000000000000000000000 --- a/spaces/Cam-Brazy/BearTest/app.py +++ /dev/null @@ -1,20 +0,0 @@ -import gradio as gr -from fastai.vision.all import * - -__all__ = ["learn", "classify_image", "categories", "image", "label", "examples", "intf"] - -learn = load_learner('export.pkl') - -categories = ('Black', 'Grizzly', 'Teddy') - -def classify_image(inp): - pred,idx,probs = learn.predict(inp) - return dict(zip(categories, map(float, probs))) - - -image = gr.inputs.Image(shape=(192, 192)) -label = gr.outputs.Label() -examples = ["grizzly.jpg", "teddy.jpg"] - -iface = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples) -iface.launch(inline=False) diff --git a/spaces/Chaitanya01/InvestingPlatform/alerts.py b/spaces/Chaitanya01/InvestingPlatform/alerts.py deleted file mode 100644 index ed4b5ef00f075b1176e3da60888dae65430ebbc8..0000000000000000000000000000000000000000 --- a/spaces/Chaitanya01/InvestingPlatform/alerts.py +++ /dev/null @@ -1,85 +0,0 @@ -from distutils.command.sdist import sdist -from numpy import tri -import pandas as pd -import json, requests -import slack, time -from datetime import datetime -# from bs4 import BeautifulSoup -from config import * -def get_yahoo_finance_quote(symbol): - # Get the symbol quote from yahoo finance, we are using Beautiful Soup for scraping - URL = f"https://finance.yahoo.com/quote/{symbol}" - headers = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36'} - page = requests.get(URL, headers = headers) - soup = BeautifulSoup(page.text, "html.parser") - price = soup.find('div',{'class':'D(ib) Mend(20px)'}).find_all('fin-streamer')[0].text - return float(price.replace(",","")) -def get_cnbc_data(symbol): - ticker = symbol.replace(" ","") - if ticker == "NASDAQ": - ticker = "NDX" - elif ticker == "NIFTY50": - ticker = ".NSEI" - # Get the symbol quote from yahoo finance, we are using Beautiful Soup for scraping - df = pd.DataFrame(requests.get(f"https://ts-api.cnbc.com/harmony/app/charts/1Y.json?symbol={ticker}").json()["barData"]["priceBars"]) - # df_1D = pd.DataFrame(requests.get(f"https://ts-api.cnbc.com/harmony/app/charts/1D.json?symbol={ticker}").json()["barData"]["priceBars"]) - df["datetime"] = pd.to_datetime(df['tradeTimeinMills'],unit='ms') - df["close"] = df["close"].astype(float) - # df_1D["close"] = df_1D["close"].astype(float) - df.set_index("datetime",inplace = True) - dma200 = (df["close"].rolling(200).mean()).iloc[-1] - close = (df["close"].iloc[-1]) - return dma200, close - -client = slack.WebClient(token = SLACK_TOKEN) - -while True: - df = pd.read_csv('watchlist.csv') - df.set_index("Symbol",inplace = True) - # df_crypto = pd.DataFrame(json.loads(requests.get("https://ftx.com/api/markets").text)["result"]) - # df_crypto = df_crypto[df_crypto["quoteCurrency"].isin(["USD","USDT"])] - # df_crypto.set_index("name",inplace = True) - - if len(df)>0: - req_df_price = df[df["status"] == "Pending"] - req_df_dma = df[df["dma_status"] == "Pending"] - for symbol in req_df_price.index: - if symbol in ["SPX","US 2Y","US 5Y","US 10Y","US 30Y","HYG","LQD","NASDAQ","VIX","NIFTY50"]: - dma200, ltp= get_cnbc_data(symbol) - # else: - # ltp = df_crypto.loc[symbol]["last"] - trigger_level = req_df_price.loc[symbol]["Trigger"] - triggered = 0 - - if req_df_price.loc[symbol]["view_type"] == "Above": - if trigger_level<=ltp: - triggered = 1 - elif req_df_price.loc[symbol]["view_type"] == "Below": - if trigger_level>=ltp: - triggered = 1 - - if triggered == 1: - df.at[symbol,"status"] = "Triggered" - client.chat_postMessage(channel = f"#{df.loc[symbol]['alert_type'].lower()}_signal", - text = f"{datetime.now().strftime('%Y-%m-%d %H:%M:%S')} {symbol} is {df.loc[symbol]['view_type']} {trigger_level} at {ltp}") - for symbol in req_df_dma.index: - dma_check = req_df_dma.loc[symbol]["dma200"] - if dma_check == False: - continue - triggered_dma200 = 0 - dma200, ltp= get_cnbc_data(symbol) - print(dma200) - if req_df_dma.loc[symbol]["dma200_view_type"] == "Above": - if dma200<=ltp: - triggered_dma200 = 1 - elif req_df_dma.loc[symbol]["dma200_view_type"] == "Below": - if dma200>=ltp: - triggered_dma200 = 1 - - if triggered_dma200 == 1: - df.at[symbol,"dma_status"] = "Triggered" - client.chat_postMessage(channel = f"#{df.loc[symbol]['alert_type'].lower()}_signal", - text = f"{datetime.now().strftime('%Y-%m-%d %H:%M:%S')} {symbol} is {df.loc[symbol]['dma200_view_type']} DMA200 at {ltp}") - df.to_csv("watchlist.csv") - # Recheck again after 60 minutes - time.sleep(60*60) \ No newline at end of file diff --git a/spaces/ChandraMohanNayal/AutoGPT/run_continuous.bat b/spaces/ChandraMohanNayal/AutoGPT/run_continuous.bat deleted file mode 100644 index 812aa01c1c5506c452665610c0e9e83a17c426f2..0000000000000000000000000000000000000000 --- a/spaces/ChandraMohanNayal/AutoGPT/run_continuous.bat +++ /dev/null @@ -1,3 +0,0 @@ -@echo off -set argument=--continuous -call run.bat %argument% diff --git a/spaces/ChillyFaze/runwayml-stable-diffusion-v1-5/README.md b/spaces/ChillyFaze/runwayml-stable-diffusion-v1-5/README.md deleted file mode 100644 index a7b31fa0ad1c091d37961ae68f2bb4e0a2f6b0e5..0000000000000000000000000000000000000000 --- a/spaces/ChillyFaze/runwayml-stable-diffusion-v1-5/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Runwayml Stable Diffusion V1 5 -emoji: 🌖 -colorFrom: red -colorTo: purple -sdk: gradio -sdk_version: 3.20.1 -app_file: app.py -pinned: false -license: openrail ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/ClearLove443/Robby-chatbot/modules/history.py b/spaces/ClearLove443/Robby-chatbot/modules/history.py deleted file mode 100644 index 1ee0583dfbffd322eb7a0d0dfbb65048488e1718..0000000000000000000000000000000000000000 --- a/spaces/ClearLove443/Robby-chatbot/modules/history.py +++ /dev/null @@ -1,58 +0,0 @@ -import os -import streamlit as st -from streamlit_chat import message - -class ChatHistory: - - def __init__(self): - self.history = st.session_state.get("history", []) - st.session_state["history"] = self.history - - def default_greeting(self): - return "Hey Robby ! 👋" - - def default_prompt(self, topic): - return f"Hello ! Ask me anything about {topic} 🤗" - - def initialize_user_history(self): - st.session_state["user"] = [self.default_greeting()] - - def initialize_assistant_history(self, uploaded_file): - st.session_state["assistant"] = [self.default_prompt(uploaded_file.name)] - - def initialize(self, uploaded_file): - if "assistant" not in st.session_state: - self.initialize_assistant_history(uploaded_file) - if "user" not in st.session_state: - self.initialize_user_history() - - def reset(self, uploaded_file): - st.session_state["history"] = [] - - self.initialize_user_history() - self.initialize_assistant_history(uploaded_file) - st.session_state["reset_chat"] = False - - def append(self, mode, message): - st.session_state[mode].append(message) - - def generate_messages(self, container): - if st.session_state["assistant"]: - with container: - for i in range(len(st.session_state["assistant"])): - message( - st.session_state["user"][i], - is_user=True, - key=f"history_{i}_user", - avatar_style="big-smile", - ) - message(st.session_state["assistant"][i], key=str(i), avatar_style="thumbs") - - def load(self): - if os.path.exists(self.history_file): - with open(self.history_file, "r") as f: - self.history = f.read().splitlines() - - def save(self): - with open(self.history_file, "w") as f: - f.write("\n".join(self.history)) diff --git a/spaces/Cletrason/Cletrason-toad-mario-movie/app_text_to_video.py b/spaces/Cletrason/Cletrason-toad-mario-movie/app_text_to_video.py deleted file mode 100644 index b592201171989117d8c3cc1ef2c4522b0c30363f..0000000000000000000000000000000000000000 --- a/spaces/Cletrason/Cletrason-toad-mario-movie/app_text_to_video.py +++ /dev/null @@ -1,97 +0,0 @@ -import gradio as gr -from model import Model -import os -from hf_utils import get_model_list - -on_huggingspace = os.environ.get("SPACE_AUTHOR_NAME") == "PAIR" - -examples = [ - ["an astronaut waving the arm on the moon"], - ["a sloth surfing on a wakeboard"], - ["an astronaut walking on a street"], - ["a cute cat walking on grass"], - ["a horse is galloping on a street"], - ["an astronaut is skiing down the hill"], - ["a gorilla walking alone down the street"], - ["a gorilla dancing on times square"], - ["A panda dancing dancing like crazy on Times Square"], -] - - -def create_demo(model: Model): - - with gr.Blocks() as demo: - with gr.Row(): - gr.Markdown('## Text2Video-Zero: Video Generation') - with gr.Row(): - gr.HTML( - """ -
    -

    - Description: Simply input any textual prompt to generate videos right away and unleash your creativity and imagination! You can also select from the examples below. For performance purposes, our current preview release allows to generate up to 16 frames, which can be configured in the Advanced Options. -

    -
    - """) - - with gr.Row(): - with gr.Column(): - model_name = gr.Dropdown( - label="Model", - choices=get_model_list(), - value="dreamlike-art/dreamlike-photoreal-2.0", - ) - prompt = gr.Textbox(label='Prompt') - run_button = gr.Button(label='Run') - with gr.Accordion('Advanced options', open=False): - watermark = gr.Radio(["Picsart AI Research", "Text2Video-Zero", - "None"], label="Watermark", value='Picsart AI Research') - - if on_huggingspace: - video_length = gr.Slider( - label="Video length", minimum=8, maximum=16, step=1) - else: - video_length = gr.Number( - label="Video length", value=8, precision=0) - chunk_size = gr.Slider( - label="Chunk size", minimum=2, maximum=16, value=12 if on_huggingspace else 8, step=1, visible=not on_huggingspace) - - motion_field_strength_x = gr.Slider( - label='Global Translation $\delta_{x}$', minimum=-20, maximum=20, value=12, step=1) - motion_field_strength_y = gr.Slider( - label='Global Translation $\delta_{y}$', minimum=-20, maximum=20, value=12, step=1) - - t0 = gr.Slider(label="Timestep t0", minimum=0, - maximum=49, value=44, step=1) - t1 = gr.Slider(label="Timestep t1", minimum=0, - maximum=49, value=47, step=1) - - n_prompt = gr.Textbox( - label="Optional Negative Prompt", value='') - with gr.Column(): - result = gr.Video(label="Generated Video") - - inputs = [ - prompt, - model_name, - motion_field_strength_x, - motion_field_strength_y, - t0, - t1, - n_prompt, - chunk_size, - video_length, - watermark, - ] - - gr.Examples(examples=examples, - inputs=inputs, - outputs=result, - fn=model.process_text2video, - run_on_click=False, - cache_examples=on_huggingspace, - ) - - run_button.click(fn=model.process_text2video, - inputs=inputs, - outputs=result,) - return demo diff --git a/spaces/CofAI/chat/g4f/Provider/Providers/helpers/theb.py b/spaces/CofAI/chat/g4f/Provider/Providers/helpers/theb.py deleted file mode 100644 index 71cfd23ff34768092e4dbe3ff6b719a946dceebb..0000000000000000000000000000000000000000 --- a/spaces/CofAI/chat/g4f/Provider/Providers/helpers/theb.py +++ /dev/null @@ -1,48 +0,0 @@ -import json -import sys -from re import findall -from curl_cffi import requests - -config = json.loads(sys.argv[1]) -prompt = config['messages'][-1]['content'] - -headers = { - 'authority': 'chatbot.theb.ai', - 'accept': 'application/json, text/plain, */*', - 'accept-language': 'en,fr-FR;q=0.9,fr;q=0.8,es-ES;q=0.7,es;q=0.6,en-US;q=0.5,am;q=0.4,de;q=0.3', - 'content-type': 'application/json', - 'origin': 'https://chatbot.theb.ai', - 'referer': 'https://chatbot.theb.ai/', - 'sec-ch-ua': '"Google Chrome";v="113", "Chromium";v="113", "Not-A.Brand";v="24"', - 'sec-ch-ua-mobile': '?0', - 'sec-ch-ua-platform': '"macOS"', - 'sec-fetch-dest': 'empty', - 'sec-fetch-mode': 'cors', - 'sec-fetch-site': 'same-origin', - 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36', -} - -json_data = { - 'prompt': prompt, - 'options': {} -} - -def format(chunk): - try: - completion_chunk = findall(r'content":"(.*)"},"fin', chunk.decode())[0] - print(completion_chunk, flush=True, end='') - - except Exception as e: - print(f'[ERROR] an error occured, retrying... | [[{chunk.decode()}]]', flush=True) - return - -while True: - try: - response = requests.post('https://chatbot.theb.ai/api/chat-process', - headers=headers, json=json_data, content_callback=format, impersonate='chrome110') - - exit(0) - - except Exception as e: - print('[ERROR] an error occured, retrying... |', e, flush=True) - continue \ No newline at end of file diff --git a/spaces/Cong723/gpt-academic-public/docs/WithFastapi.md b/spaces/Cong723/gpt-academic-public/docs/WithFastapi.md deleted file mode 100644 index 188b52716485f15e528772c6454ee7839ced4406..0000000000000000000000000000000000000000 --- a/spaces/Cong723/gpt-academic-public/docs/WithFastapi.md +++ /dev/null @@ -1,43 +0,0 @@ -# Running with fastapi - -We currently support fastapi in order to solve sub-path deploy issue. - -1. change CUSTOM_PATH setting in `config.py` - -``` sh -nano config.py -``` - -2. Edit main.py - -```diff - auto_opentab_delay() - - demo.queue(concurrency_count=CONCURRENT_COUNT).launch(server_name="0.0.0.0", server_port=PORT, auth=AUTHENTICATION, favicon_path="docs/logo.png") - + demo.queue(concurrency_count=CONCURRENT_COUNT) - - - # 如果需要在二级路径下运行 - - # CUSTOM_PATH, = get_conf('CUSTOM_PATH') - - # if CUSTOM_PATH != "/": - - # from toolbox import run_gradio_in_subpath - - # run_gradio_in_subpath(demo, auth=AUTHENTICATION, port=PORT, custom_path=CUSTOM_PATH) - - # else: - - # demo.launch(server_name="0.0.0.0", server_port=PORT, auth=AUTHENTICATION, favicon_path="docs/logo.png") - - + 如果需要在二级路径下运行 - + CUSTOM_PATH, = get_conf('CUSTOM_PATH') - + if CUSTOM_PATH != "/": - + from toolbox import run_gradio_in_subpath - + run_gradio_in_subpath(demo, auth=AUTHENTICATION, port=PORT, custom_path=CUSTOM_PATH) - + else: - + demo.launch(server_name="0.0.0.0", server_port=PORT, auth=AUTHENTICATION, favicon_path="docs/logo.png") - -if __name__ == "__main__": - main() -``` - - -3. Go! - -``` sh -python main.py -``` diff --git a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fastapi/requests.py b/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fastapi/requests.py deleted file mode 100644 index d16552c0a9535e1c0bd7f701987301681832eba5..0000000000000000000000000000000000000000 --- a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/fastapi/requests.py +++ /dev/null @@ -1,2 +0,0 @@ -from starlette.requests import HTTPConnection as HTTPConnection # noqa: F401 -from starlette.requests import Request as Request # noqa: F401 diff --git a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-10c5655a.js b/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-10c5655a.js deleted file mode 100644 index 83a87c2d9e76c02d19bf8b84abf4d6f598f3215b..0000000000000000000000000000000000000000 --- a/spaces/DQChoi/gpt-demo/venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-10c5655a.js +++ /dev/null @@ -1,2 +0,0 @@ -import{S as U,e as G,s as H,N as S,k as R,O as K,K as o,p as B,M as C,o as T,ap as E,Q as k,aw as N,z,v as A,A as M,x as D,a1 as W,B as X,am as Y,P as Z,R as y,E as p,ae as x,h as O,j as P,q as $,r as ee,t as Q,F}from"./index-1d65707a.js";/* empty css */import{B as le}from"./Button-f155035a.js";import{B as ne}from"./BlockTitle-dee077e8.js";import"./Info-7c6961ef.js";function ie(e){let n;return{c(){n=Z(e[5])},m(i,a){B(i,n,a)},p(i,a){a&32&&y(n,i[5])},d(i){i&&M(n)}}}function ae(e){let n,i,a,m,_,s,c,f,d,r,g;return m=new ne({props:{show_label:e[7],info:e[6],$$slots:{default:[ie]},$$scope:{ctx:e}}}),{c(){n=S("div"),i=S("div"),a=S("label"),R(m.$$.fragment),_=K(),s=S("input"),c=K(),f=S("input"),o(a,"for",e[8]),o(s,"data-testid","number-input"),o(s,"type","number"),o(s,"min",e[1]),o(s,"max",e[2]),o(s,"step",e[3]),s.disabled=e[4],o(s,"class","svelte-1cl284s"),o(i,"class","head svelte-1cl284s"),o(n,"class","wrap svelte-1cl284s"),o(f,"type","range"),o(f,"id",e[8]),o(f,"name","cowbell"),o(f,"min",e[1]),o(f,"max",e[2]),o(f,"step",e[3]),f.disabled=e[4],o(f,"class","svelte-1cl284s")},m(l,u){B(l,n,u),C(n,i),C(i,a),T(m,a,null),C(i,_),C(i,s),E(s,e[0]),B(l,c,u),B(l,f,u),E(f,e[0]),d=!0,r||(g=[k(s,"input",e[12]),k(s,"blur",e[10]),k(s,"pointerup",e[9]),k(f,"change",e[13]),k(f,"input",e[13]),k(f,"pointerup",e[9])],r=!0)},p(l,[u]){const v={};u&128&&(v.show_label=l[7]),u&64&&(v.info=l[6]),u&65568&&(v.$$scope={dirty:u,ctx:l}),m.$set(v),(!d||u&2)&&o(s,"min",l[1]),(!d||u&4)&&o(s,"max",l[2]),(!d||u&8)&&o(s,"step",l[3]),(!d||u&16)&&(s.disabled=l[4]),u&1&&N(s.value)!==l[0]&&E(s,l[0]),(!d||u&2)&&o(f,"min",l[1]),(!d||u&4)&&o(f,"max",l[2]),(!d||u&8)&&o(f,"step",l[3]),(!d||u&16)&&(f.disabled=l[4]),u&1&&E(f,l[0])},i(l){d||(z(m.$$.fragment,l),d=!0)},o(l){A(m.$$.fragment,l),d=!1},d(l){l&&(M(n),M(c),M(f)),D(m),r=!1,W(g)}}}let te=0;function ue(e,n,i){let{value:a=0}=n,{value_is_output:m=!1}=n,{minimum:_=0}=n,{maximum:s=100}=n,{step:c=1}=n,{disabled:f=!1}=n,{label:d}=n,{info:r=void 0}=n,{show_label:g}=n;const l=`range_id_${te++}`,u=X();function v(){u("change",a),m||u("input")}Y(()=>{i(11,m=!1)});function h(b){u("release",a)}const j=()=>{u("release",a),i(0,a=Math.min(Math.max(a,_),s))};function q(){a=N(this.value),i(0,a)}function w(){a=N(this.value),i(0,a)}return e.$$set=b=>{"value"in b&&i(0,a=b.value),"value_is_output"in b&&i(11,m=b.value_is_output),"minimum"in b&&i(1,_=b.minimum),"maximum"in b&&i(2,s=b.maximum),"step"in b&&i(3,c=b.step),"disabled"in b&&i(4,f=b.disabled),"label"in b&&i(5,d=b.label),"info"in b&&i(6,r=b.info),"show_label"in b&&i(7,g=b.show_label)},e.$$.update=()=>{e.$$.dirty&1&&v()},[a,_,s,c,f,d,r,g,l,h,j,m,q,w]}class se extends U{constructor(n){super(),G(this,n,ue,ae,H,{value:0,value_is_output:11,minimum:1,maximum:2,step:3,disabled:4,label:5,info:6,show_label:7})}}function me(e){let n,i,a,m,_,s;const c=[e[15]];let f={};for(let l=0;lP(a,"value",d)),O.push(()=>P(a,"value_is_output",r)),a.$on("input",e[18]),a.$on("change",e[19]),a.$on("release",e[20]),{c(){R(n.$$.fragment),i=K(),R(a.$$.fragment)},m(l,u){T(n,l,u),B(l,i,u),T(a,l,u),s=!0},p(l,u){const v=u&32768?$(c,[ee(l[15])]):{};n.$set(v);const h={};u&32&&(h.label=l[5]),u&64&&(h.info=l[6]),u&16384&&(h.show_label=l[14]),u&1024&&(h.minimum=l[10]),u&2048&&(h.maximum=l[11]),u&4096&&(h.step=l[12]),u&8192&&(h.disabled=l[13]==="static"),!m&&u&1&&(m=!0,h.value=l[0],Q(()=>m=!1)),!_&&u&2&&(_=!0,h.value_is_output=l[1],Q(()=>_=!1)),a.$set(h)},i(l){s||(z(n.$$.fragment,l),z(a.$$.fragment,l),s=!0)},o(l){A(n.$$.fragment,l),A(a.$$.fragment,l),s=!1},d(l){l&&M(i),D(n,l),D(a,l)}}}function fe(e){let n,i;return n=new le({props:{visible:e[4],elem_id:e[2],elem_classes:e[3],container:e[7],scale:e[8],min_width:e[9],$$slots:{default:[me]},$$scope:{ctx:e}}}),{c(){R(n.$$.fragment)},m(a,m){T(n,a,m),i=!0},p(a,[m]){const _={};m&16&&(_.visible=a[4]),m&4&&(_.elem_id=a[2]),m&8&&(_.elem_classes=a[3]),m&128&&(_.container=a[7]),m&256&&(_.scale=a[8]),m&512&&(_.min_width=a[9]),m&2161763&&(_.$$scope={dirty:m,ctx:a}),n.$set(_)},i(a){i||(z(n.$$.fragment,a),i=!0)},o(a){A(n.$$.fragment,a),i=!1},d(a){D(n,a)}}}function _e(e,n,i){let{elem_id:a=""}=n,{elem_classes:m=[]}=n,{visible:_=!0}=n,{value:s=0}=n,{label:c="Slider"}=n,{info:f=void 0}=n,{container:d=!0}=n,{scale:r=null}=n,{min_width:g=void 0}=n,{minimum:l}=n,{maximum:u}=n,{step:v}=n,{mode:h}=n,{show_label:j}=n,{loading_status:q}=n,{value_is_output:w=!1}=n;function b(t){s=t,i(0,s)}function I(t){w=t,i(1,w)}function J(t){F.call(this,e,t)}function L(t){F.call(this,e,t)}function V(t){F.call(this,e,t)}return e.$$set=t=>{"elem_id"in t&&i(2,a=t.elem_id),"elem_classes"in t&&i(3,m=t.elem_classes),"visible"in t&&i(4,_=t.visible),"value"in t&&i(0,s=t.value),"label"in t&&i(5,c=t.label),"info"in t&&i(6,f=t.info),"container"in t&&i(7,d=t.container),"scale"in t&&i(8,r=t.scale),"min_width"in t&&i(9,g=t.min_width),"minimum"in t&&i(10,l=t.minimum),"maximum"in t&&i(11,u=t.maximum),"step"in t&&i(12,v=t.step),"mode"in t&&i(13,h=t.mode),"show_label"in t&&i(14,j=t.show_label),"loading_status"in t&&i(15,q=t.loading_status),"value_is_output"in t&&i(1,w=t.value_is_output)},[s,w,a,m,_,c,f,d,r,g,l,u,v,h,j,q,b,I,J,L,V]}class oe extends U{constructor(n){super(),G(this,n,_e,fe,H,{elem_id:2,elem_classes:3,visible:4,value:0,label:5,info:6,container:7,scale:8,min_width:9,minimum:10,maximum:11,step:12,mode:13,show_label:14,loading_status:15,value_is_output:1})}}const re=oe,ve=["static","dynamic"],we=e=>({type:{payload:"number"},description:{payload:"selected value"},example_data:e.value??e.minimum});export{re as Component,we as document,ve as modes}; -//# sourceMappingURL=index-10c5655a.js.map diff --git a/spaces/Dagfinn1962/stablediffusion-articlera/main.css b/spaces/Dagfinn1962/stablediffusion-articlera/main.css deleted file mode 100644 index 285a682553c850e5d5b6c68d11b93f1bcfdb9ae1..0000000000000000000000000000000000000000 --- a/spaces/Dagfinn1962/stablediffusion-articlera/main.css +++ /dev/null @@ -1,58 +0,0 @@ - - -body { - background-color: #6262d1; - width: 100%; - color: #FFFFFF; -} - -h3 { - color: #FFFFFF; - text-align: center; - font-family: verdana; - font-size: 24px; - border: 1px solid #FFFFFF; - border-radius: 10px; -} - -p { - font-family: verdana; - font-size: 14px; -} - -label { - font-family: verdana; - color: #000000; - font-weight: 700; - font-size: 14px; - -} - -gr.Textbox { - font-family: verdana; - background-color: #6262d1; - color: #000000; - font-weight: 700; - font-size: 14px; - border-radius: 6px; -} - -gr.Botton { - font-family: verdana; - background-color: #6262d1; - color: #FFFFFF; - font-weight: 700; - font-size: 14px; - - border-radius: 6px; -} - -a a:active a.hover - { - font-family: verdana; - color: #572430; - text-decoration: none; - font-weight: 700; - font-size: 14px; - -} \ No newline at end of file diff --git a/spaces/DaleChen/AutoGPT/tests/smoke_test.py b/spaces/DaleChen/AutoGPT/tests/smoke_test.py deleted file mode 100644 index 1b9d643fc21f3703384a2bb4f2bd1d725f4dd418..0000000000000000000000000000000000000000 --- a/spaces/DaleChen/AutoGPT/tests/smoke_test.py +++ /dev/null @@ -1,59 +0,0 @@ -"""Smoke test for the autogpt package.""" -import os -import subprocess -import sys - -import pytest - -from autogpt.commands.file_operations import delete_file, read_file - - -@pytest.mark.integration_test -def test_write_file() -> None: - """ - Test case to check if the write_file command can successfully write 'Hello World' to a file - named 'hello_world.txt'. - - Read the current ai_settings.yaml file and store its content. - """ - env_vars = {"MEMORY_BACKEND": "no_memory", "TEMPERATURE": "0"} - ai_settings = None - if os.path.exists("ai_settings.yaml"): - with open("ai_settings.yaml", "r") as f: - ai_settings = f.read() - os.remove("ai_settings.yaml") - - try: - if os.path.exists("hello_world.txt"): - # Clean up any existing 'hello_world.txt' file before testing. - delete_file("hello_world.txt") - # Prepare input data for the test. - input_data = """write_file-GPT -an AI designed to use the write_file command to write 'Hello World' into a file named "hello_world.txt" and then use the task_complete command to complete the task. -Use the write_file command to write 'Hello World' into a file named "hello_world.txt". -Use the task_complete command to complete the task. -Do not use any other commands. - -y -5 -EOF""" - command = f"{sys.executable} -m autogpt" - - # Execute the script with the input data. - process = subprocess.Popen( - command, - stdin=subprocess.PIPE, - shell=True, - env={**os.environ, **env_vars}, - ) - process.communicate(input_data.encode()) - - # Read the content of the 'hello_world.txt' file created during the test. - content = read_file("hello_world.txt") - finally: - if ai_settings: - # Restore the original ai_settings.yaml file. - with open("ai_settings.yaml", "w") as f: - f.write(ai_settings) - - # Check if the content of the 'hello_world.txt' file is equal to 'Hello World'. - assert content == "Hello World", f"Expected 'Hello World', got {content}" diff --git a/spaces/Datasculptor/3D-Room-Layout-Estimation_LGT-Net/dataset/zind_dataset.py b/spaces/Datasculptor/3D-Room-Layout-Estimation_LGT-Net/dataset/zind_dataset.py deleted file mode 100644 index 20258763fcfa6bc130e33a3889d5e88018d4708e..0000000000000000000000000000000000000000 --- a/spaces/Datasculptor/3D-Room-Layout-Estimation_LGT-Net/dataset/zind_dataset.py +++ /dev/null @@ -1,138 +0,0 @@ -""" -@Date: 2021/09/22 -@description: -""" -import os -import json -import math -import numpy as np - -from dataset.communal.read import read_image, read_label, read_zind -from dataset.communal.base_dataset import BaseDataset -from utils.logger import get_logger -from preprocessing.filter import filter_center, filter_boundary, filter_self_intersection -from utils.boundary import calc_rotation - - -class ZindDataset(BaseDataset): - def __init__(self, root_dir, mode, shape=None, max_wall_num=0, aug=None, camera_height=1.6, logger=None, - split_list=None, patch_num=256, keys=None, for_test_index=None, - is_simple=True, is_ceiling_flat=False, vp_align=False): - # if keys is None: - # keys = ['image', 'depth', 'ratio', 'id', 'corners', 'corner_heat_map', 'object'] - super().__init__(mode, shape, max_wall_num, aug, camera_height, patch_num, keys) - if logger is None: - logger = get_logger() - self.root_dir = root_dir - self.vp_align = vp_align - - data_dir = os.path.join(root_dir) - img_dir = os.path.join(root_dir, 'image') - - pano_list = read_zind(partition_path=os.path.join(data_dir, f"zind_partition.json"), - simplicity_path=os.path.join(data_dir, f"room_shape_simplicity_labels.json"), - data_dir=data_dir, mode=mode, is_simple=is_simple, is_ceiling_flat=is_ceiling_flat) - - if for_test_index is not None: - pano_list = pano_list[:for_test_index] - if split_list: - pano_list = [pano for pano in pano_list if pano['id'] in split_list] - self.data = [] - invalid_num = 0 - for pano in pano_list: - if not os.path.exists(pano['img_path']): - logger.warning(f"{pano['img_path']} not exists") - invalid_num += 1 - continue - - if not filter_center(pano['corners']): - # logger.warning(f"{pano['id']} camera center not in layout") - # invalid_num += 1 - continue - - if self.max_wall_num >= 10: - if len(pano['corners']) < self.max_wall_num: - invalid_num += 1 - continue - elif self.max_wall_num != 0 and len(pano['corners']) != self.max_wall_num: - invalid_num += 1 - continue - - if not filter_boundary(pano['corners']): - logger.warning(f"{pano['id']} boundary cross") - invalid_num += 1 - continue - - if not filter_self_intersection(pano['corners']): - logger.warning(f"{pano['id']} self_intersection") - invalid_num += 1 - continue - - self.data.append(pano) - - logger.info( - f"Build dataset mode: {self.mode} max_wall_num: {self.max_wall_num} valid: {len(self.data)} invalid: {invalid_num}") - - def __getitem__(self, idx): - pano = self.data[idx] - rgb_path = pano['img_path'] - label = pano - image = read_image(rgb_path, self.shape) - - if self.vp_align: - # Equivalent to vanishing point alignment step - rotation = calc_rotation(corners=label['corners']) - shift = math.modf(rotation / (2 * np.pi) + 1)[0] - image = np.roll(image, round(shift * self.shape[1]), axis=1) - label['corners'][:, 0] = np.modf(label['corners'][:, 0] + shift)[0] - - output = self.process_data(label, image, self.patch_num) - return output - - -if __name__ == "__main__": - import numpy as np - from PIL import Image - - from tqdm import tqdm - from visualization.boundary import draw_boundaries, draw_object - from visualization.floorplan import draw_floorplan - from utils.boundary import depth2boundaries, calc_rotation - from utils.conversion import uv2xyz - from models.other.init_env import init_env - - init_env(123) - - modes = ['val'] - for i in range(1): - for mode in modes: - print(mode) - mp3d_dataset = ZindDataset(root_dir='../src/dataset/zind', mode=mode, aug={ - 'STRETCH': False, - 'ROTATE': False, - 'FLIP': False, - 'GAMMA': False - }) - # continue - # save_dir = f'../src/dataset/zind/visualization/{mode}' - # if not os.path.isdir(save_dir): - # os.makedirs(save_dir) - - bar = tqdm(mp3d_dataset, ncols=100) - for data in bar: - # if data['id'] != '1079_pano_18': - # continue - bar.set_description(f"Processing {data['id']}") - boundary_list = depth2boundaries(data['ratio'], data['depth'], step=None) - - pano_img = draw_boundaries(data['image'].transpose(1, 2, 0), boundary_list=boundary_list, show=True) - # Image.fromarray((pano_img * 255).astype(np.uint8)).save( - # os.path.join(save_dir, f"{data['id']}_boundary.png")) - # draw_object(pano_img, heat_maps=data['object_heat_map'], depth=data['depth'], - # size=data['object_size'], show=True) - # pass - # - floorplan = draw_floorplan(uv2xyz(boundary_list[0])[..., ::2], show=True, - marker_color=None, center_color=0.2) - # Image.fromarray((floorplan.squeeze() * 255).astype(np.uint8)).save( - # os.path.join(save_dir, f"{data['id']}_floorplan.png")) diff --git a/spaces/Datasculptor/DescriptionGPT/detic/data/datasets/lvis_22k_categories.py b/spaces/Datasculptor/DescriptionGPT/detic/data/datasets/lvis_22k_categories.py deleted file mode 100644 index 9525f0873d68d84dd691979c32eaadd7860f59fe..0000000000000000000000000000000000000000 --- a/spaces/Datasculptor/DescriptionGPT/detic/data/datasets/lvis_22k_categories.py +++ /dev/null @@ -1 +0,0 @@ -CATEGORIES = [{'name': 'aerosol_can', 'id': 1, 'frequency': 'c', 'synset': 'aerosol.n.02'}, {'name': 'air_conditioner', 'id': 2, 'frequency': 'f', 'synset': 'air_conditioner.n.01'}, {'name': 'airplane', 'id': 3, 'frequency': 'f', 'synset': 'airplane.n.01'}, {'name': 'alarm_clock', 'id': 4, 'frequency': 'f', 'synset': 'alarm_clock.n.01'}, {'name': 'alcohol', 'id': 5, 'frequency': 'c', 'synset': 'alcohol.n.01'}, {'name': 'alligator', 'id': 6, 'frequency': 'c', 'synset': 'alligator.n.02'}, {'name': 'almond', 'id': 7, 'frequency': 'c', 'synset': 'almond.n.02'}, {'name': 'ambulance', 'id': 8, 'frequency': 'c', 'synset': 'ambulance.n.01'}, {'name': 'amplifier', 'id': 9, 'frequency': 'c', 'synset': 'amplifier.n.01'}, {'name': 'anklet', 'id': 10, 'frequency': 'c', 'synset': 'anklet.n.03'}, {'name': 'antenna', 'id': 11, 'frequency': 'f', 'synset': 'antenna.n.01'}, {'name': 'apple', 'id': 12, 'frequency': 'f', 'synset': 'apple.n.01'}, {'name': 'applesauce', 'id': 13, 'frequency': 'r', 'synset': 'applesauce.n.01'}, {'name': 'apricot', 'id': 14, 'frequency': 'r', 'synset': 'apricot.n.02'}, {'name': 'apron', 'id': 15, 'frequency': 'f', 'synset': 'apron.n.01'}, {'name': 'aquarium', 'id': 16, 'frequency': 'c', 'synset': 'aquarium.n.01'}, {'name': 'arctic_(type_of_shoe)', 'id': 17, 'frequency': 'r', 'synset': 'arctic.n.02'}, {'name': 'armband', 'id': 18, 'frequency': 'c', 'synset': 'armband.n.02'}, {'name': 'armchair', 'id': 19, 'frequency': 'f', 'synset': 'armchair.n.01'}, {'name': 'armoire', 'id': 20, 'frequency': 'r', 'synset': 'armoire.n.01'}, {'name': 'armor', 'id': 21, 'frequency': 'r', 'synset': 'armor.n.01'}, {'name': 'artichoke', 'id': 22, 'frequency': 'c', 'synset': 'artichoke.n.02'}, {'name': 'trash_can', 'id': 23, 'frequency': 'f', 'synset': 'ashcan.n.01'}, {'name': 'ashtray', 'id': 24, 'frequency': 'c', 'synset': 'ashtray.n.01'}, {'name': 'asparagus', 'id': 25, 'frequency': 'c', 'synset': 'asparagus.n.02'}, {'name': 'atomizer', 'id': 26, 'frequency': 'c', 'synset': 'atomizer.n.01'}, {'name': 'avocado', 'id': 27, 'frequency': 'f', 'synset': 'avocado.n.01'}, {'name': 'award', 'id': 28, 'frequency': 'c', 'synset': 'award.n.02'}, {'name': 'awning', 'id': 29, 'frequency': 'f', 'synset': 'awning.n.01'}, {'name': 'ax', 'id': 30, 'frequency': 'r', 'synset': 'ax.n.01'}, {'name': 'baboon', 'id': 31, 'frequency': 'r', 'synset': 'baboon.n.01'}, {'name': 'baby_buggy', 'id': 32, 'frequency': 'f', 'synset': 'baby_buggy.n.01'}, {'name': 'basketball_backboard', 'id': 33, 'frequency': 'c', 'synset': 'backboard.n.01'}, {'name': 'backpack', 'id': 34, 'frequency': 'f', 'synset': 'backpack.n.01'}, {'name': 'handbag', 'id': 35, 'frequency': 'f', 'synset': 'bag.n.04'}, {'name': 'suitcase', 'id': 36, 'frequency': 'f', 'synset': 'bag.n.06'}, {'name': 'bagel', 'id': 37, 'frequency': 'c', 'synset': 'bagel.n.01'}, {'name': 'bagpipe', 'id': 38, 'frequency': 'r', 'synset': 'bagpipe.n.01'}, {'name': 'baguet', 'id': 39, 'frequency': 'r', 'synset': 'baguet.n.01'}, {'name': 'bait', 'id': 40, 'frequency': 'r', 'synset': 'bait.n.02'}, {'name': 'ball', 'id': 41, 'frequency': 'f', 'synset': 'ball.n.06'}, {'name': 'ballet_skirt', 'id': 42, 'frequency': 'r', 'synset': 'ballet_skirt.n.01'}, {'name': 'balloon', 'id': 43, 'frequency': 'f', 'synset': 'balloon.n.01'}, {'name': 'bamboo', 'id': 44, 'frequency': 'c', 'synset': 'bamboo.n.02'}, {'name': 'banana', 'id': 45, 'frequency': 'f', 'synset': 'banana.n.02'}, {'name': 'Band_Aid', 'id': 46, 'frequency': 'c', 'synset': 'band_aid.n.01'}, {'name': 'bandage', 'id': 47, 'frequency': 'c', 'synset': 'bandage.n.01'}, {'name': 'bandanna', 'id': 48, 'frequency': 'f', 'synset': 'bandanna.n.01'}, {'name': 'banjo', 'id': 49, 'frequency': 'r', 'synset': 'banjo.n.01'}, {'name': 'banner', 'id': 50, 'frequency': 'f', 'synset': 'banner.n.01'}, {'name': 'barbell', 'id': 51, 'frequency': 'r', 'synset': 'barbell.n.01'}, {'name': 'barge', 'id': 52, 'frequency': 'r', 'synset': 'barge.n.01'}, {'name': 'barrel', 'id': 53, 'frequency': 'f', 'synset': 'barrel.n.02'}, {'name': 'barrette', 'id': 54, 'frequency': 'c', 'synset': 'barrette.n.01'}, {'name': 'barrow', 'id': 55, 'frequency': 'c', 'synset': 'barrow.n.03'}, {'name': 'baseball_base', 'id': 56, 'frequency': 'f', 'synset': 'base.n.03'}, {'name': 'baseball', 'id': 57, 'frequency': 'f', 'synset': 'baseball.n.02'}, {'name': 'baseball_bat', 'id': 58, 'frequency': 'f', 'synset': 'baseball_bat.n.01'}, {'name': 'baseball_cap', 'id': 59, 'frequency': 'f', 'synset': 'baseball_cap.n.01'}, {'name': 'baseball_glove', 'id': 60, 'frequency': 'f', 'synset': 'baseball_glove.n.01'}, {'name': 'basket', 'id': 61, 'frequency': 'f', 'synset': 'basket.n.01'}, {'name': 'basketball', 'id': 62, 'frequency': 'c', 'synset': 'basketball.n.02'}, {'name': 'bass_horn', 'id': 63, 'frequency': 'r', 'synset': 'bass_horn.n.01'}, {'name': 'bat_(animal)', 'id': 64, 'frequency': 'c', 'synset': 'bat.n.01'}, {'name': 'bath_mat', 'id': 65, 'frequency': 'f', 'synset': 'bath_mat.n.01'}, {'name': 'bath_towel', 'id': 66, 'frequency': 'f', 'synset': 'bath_towel.n.01'}, {'name': 'bathrobe', 'id': 67, 'frequency': 'c', 'synset': 'bathrobe.n.01'}, {'name': 'bathtub', 'id': 68, 'frequency': 'f', 'synset': 'bathtub.n.01'}, {'name': 'batter_(food)', 'id': 69, 'frequency': 'r', 'synset': 'batter.n.02'}, {'name': 'battery', 'id': 70, 'frequency': 'c', 'synset': 'battery.n.02'}, {'name': 'beachball', 'id': 71, 'frequency': 'r', 'synset': 'beach_ball.n.01'}, {'name': 'bead', 'id': 72, 'frequency': 'c', 'synset': 'bead.n.01'}, {'name': 'bean_curd', 'id': 73, 'frequency': 'c', 'synset': 'bean_curd.n.01'}, {'name': 'beanbag', 'id': 74, 'frequency': 'c', 'synset': 'beanbag.n.01'}, {'name': 'beanie', 'id': 75, 'frequency': 'f', 'synset': 'beanie.n.01'}, {'name': 'bear', 'id': 76, 'frequency': 'f', 'synset': 'bear.n.01'}, {'name': 'bed', 'id': 77, 'frequency': 'f', 'synset': 'bed.n.01'}, {'name': 'bedpan', 'id': 78, 'frequency': 'r', 'synset': 'bedpan.n.01'}, {'name': 'bedspread', 'id': 79, 'frequency': 'f', 'synset': 'bedspread.n.01'}, {'name': 'cow', 'id': 80, 'frequency': 'f', 'synset': 'beef.n.01'}, {'name': 'beef_(food)', 'id': 81, 'frequency': 'f', 'synset': 'beef.n.02'}, {'name': 'beeper', 'id': 82, 'frequency': 'r', 'synset': 'beeper.n.01'}, {'name': 'beer_bottle', 'id': 83, 'frequency': 'f', 'synset': 'beer_bottle.n.01'}, {'name': 'beer_can', 'id': 84, 'frequency': 'c', 'synset': 'beer_can.n.01'}, {'name': 'beetle', 'id': 85, 'frequency': 'r', 'synset': 'beetle.n.01'}, {'name': 'bell', 'id': 86, 'frequency': 'f', 'synset': 'bell.n.01'}, {'name': 'bell_pepper', 'id': 87, 'frequency': 'f', 'synset': 'bell_pepper.n.02'}, {'name': 'belt', 'id': 88, 'frequency': 'f', 'synset': 'belt.n.02'}, {'name': 'belt_buckle', 'id': 89, 'frequency': 'f', 'synset': 'belt_buckle.n.01'}, {'name': 'bench', 'id': 90, 'frequency': 'f', 'synset': 'bench.n.01'}, {'name': 'beret', 'id': 91, 'frequency': 'c', 'synset': 'beret.n.01'}, {'name': 'bib', 'id': 92, 'frequency': 'c', 'synset': 'bib.n.02'}, {'name': 'Bible', 'id': 93, 'frequency': 'r', 'synset': 'bible.n.01'}, {'name': 'bicycle', 'id': 94, 'frequency': 'f', 'synset': 'bicycle.n.01'}, {'name': 'visor', 'id': 95, 'frequency': 'f', 'synset': 'bill.n.09'}, {'name': 'billboard', 'id': 96, 'frequency': 'f', 'synset': 'billboard.n.01'}, {'name': 'binder', 'id': 97, 'frequency': 'c', 'synset': 'binder.n.03'}, {'name': 'binoculars', 'id': 98, 'frequency': 'c', 'synset': 'binoculars.n.01'}, {'name': 'bird', 'id': 99, 'frequency': 'f', 'synset': 'bird.n.01'}, {'name': 'birdfeeder', 'id': 100, 'frequency': 'c', 'synset': 'bird_feeder.n.01'}, {'name': 'birdbath', 'id': 101, 'frequency': 'c', 'synset': 'birdbath.n.01'}, {'name': 'birdcage', 'id': 102, 'frequency': 'c', 'synset': 'birdcage.n.01'}, {'name': 'birdhouse', 'id': 103, 'frequency': 'c', 'synset': 'birdhouse.n.01'}, {'name': 'birthday_cake', 'id': 104, 'frequency': 'f', 'synset': 'birthday_cake.n.01'}, {'name': 'birthday_card', 'id': 105, 'frequency': 'r', 'synset': 'birthday_card.n.01'}, {'name': 'pirate_flag', 'id': 106, 'frequency': 'r', 'synset': 'black_flag.n.01'}, {'name': 'black_sheep', 'id': 107, 'frequency': 'c', 'synset': 'black_sheep.n.02'}, {'name': 'blackberry', 'id': 108, 'frequency': 'c', 'synset': 'blackberry.n.01'}, {'name': 'blackboard', 'id': 109, 'frequency': 'f', 'synset': 'blackboard.n.01'}, {'name': 'blanket', 'id': 110, 'frequency': 'f', 'synset': 'blanket.n.01'}, {'name': 'blazer', 'id': 111, 'frequency': 'c', 'synset': 'blazer.n.01'}, {'name': 'blender', 'id': 112, 'frequency': 'f', 'synset': 'blender.n.01'}, {'name': 'blimp', 'id': 113, 'frequency': 'r', 'synset': 'blimp.n.02'}, {'name': 'blinker', 'id': 114, 'frequency': 'f', 'synset': 'blinker.n.01'}, {'name': 'blouse', 'id': 115, 'frequency': 'f', 'synset': 'blouse.n.01'}, {'name': 'blueberry', 'id': 116, 'frequency': 'f', 'synset': 'blueberry.n.02'}, {'name': 'gameboard', 'id': 117, 'frequency': 'r', 'synset': 'board.n.09'}, {'name': 'boat', 'id': 118, 'frequency': 'f', 'synset': 'boat.n.01'}, {'name': 'bob', 'id': 119, 'frequency': 'r', 'synset': 'bob.n.05'}, {'name': 'bobbin', 'id': 120, 'frequency': 'c', 'synset': 'bobbin.n.01'}, {'name': 'bobby_pin', 'id': 121, 'frequency': 'c', 'synset': 'bobby_pin.n.01'}, {'name': 'boiled_egg', 'id': 122, 'frequency': 'c', 'synset': 'boiled_egg.n.01'}, {'name': 'bolo_tie', 'id': 123, 'frequency': 'r', 'synset': 'bolo_tie.n.01'}, {'name': 'deadbolt', 'id': 124, 'frequency': 'c', 'synset': 'bolt.n.03'}, {'name': 'bolt', 'id': 125, 'frequency': 'f', 'synset': 'bolt.n.06'}, {'name': 'bonnet', 'id': 126, 'frequency': 'r', 'synset': 'bonnet.n.01'}, {'name': 'book', 'id': 127, 'frequency': 'f', 'synset': 'book.n.01'}, {'name': 'bookcase', 'id': 128, 'frequency': 'c', 'synset': 'bookcase.n.01'}, {'name': 'booklet', 'id': 129, 'frequency': 'c', 'synset': 'booklet.n.01'}, {'name': 'bookmark', 'id': 130, 'frequency': 'r', 'synset': 'bookmark.n.01'}, {'name': 'boom_microphone', 'id': 131, 'frequency': 'r', 'synset': 'boom.n.04'}, {'name': 'boot', 'id': 132, 'frequency': 'f', 'synset': 'boot.n.01'}, {'name': 'bottle', 'id': 133, 'frequency': 'f', 'synset': 'bottle.n.01'}, {'name': 'bottle_opener', 'id': 134, 'frequency': 'c', 'synset': 'bottle_opener.n.01'}, {'name': 'bouquet', 'id': 135, 'frequency': 'c', 'synset': 'bouquet.n.01'}, {'name': 'bow_(weapon)', 'id': 136, 'frequency': 'r', 'synset': 'bow.n.04'}, {'name': 'bow_(decorative_ribbons)', 'id': 137, 'frequency': 'f', 'synset': 'bow.n.08'}, {'name': 'bow-tie', 'id': 138, 'frequency': 'f', 'synset': 'bow_tie.n.01'}, {'name': 'bowl', 'id': 139, 'frequency': 'f', 'synset': 'bowl.n.03'}, {'name': 'pipe_bowl', 'id': 140, 'frequency': 'r', 'synset': 'bowl.n.08'}, {'name': 'bowler_hat', 'id': 141, 'frequency': 'c', 'synset': 'bowler_hat.n.01'}, {'name': 'bowling_ball', 'id': 142, 'frequency': 'r', 'synset': 'bowling_ball.n.01'}, {'name': 'box', 'id': 143, 'frequency': 'f', 'synset': 'box.n.01'}, {'name': 'boxing_glove', 'id': 144, 'frequency': 'r', 'synset': 'boxing_glove.n.01'}, {'name': 'suspenders', 'id': 145, 'frequency': 'c', 'synset': 'brace.n.06'}, {'name': 'bracelet', 'id': 146, 'frequency': 'f', 'synset': 'bracelet.n.02'}, {'name': 'brass_plaque', 'id': 147, 'frequency': 'r', 'synset': 'brass.n.07'}, {'name': 'brassiere', 'id': 148, 'frequency': 'c', 'synset': 'brassiere.n.01'}, {'name': 'bread-bin', 'id': 149, 'frequency': 'c', 'synset': 'bread-bin.n.01'}, {'name': 'bread', 'id': 150, 'frequency': 'f', 'synset': 'bread.n.01'}, {'name': 'breechcloth', 'id': 151, 'frequency': 'r', 'synset': 'breechcloth.n.01'}, {'name': 'bridal_gown', 'id': 152, 'frequency': 'f', 'synset': 'bridal_gown.n.01'}, {'name': 'briefcase', 'id': 153, 'frequency': 'c', 'synset': 'briefcase.n.01'}, {'name': 'broccoli', 'id': 154, 'frequency': 'f', 'synset': 'broccoli.n.01'}, {'name': 'broach', 'id': 155, 'frequency': 'r', 'synset': 'brooch.n.01'}, {'name': 'broom', 'id': 156, 'frequency': 'c', 'synset': 'broom.n.01'}, {'name': 'brownie', 'id': 157, 'frequency': 'c', 'synset': 'brownie.n.03'}, {'name': 'brussels_sprouts', 'id': 158, 'frequency': 'c', 'synset': 'brussels_sprouts.n.01'}, {'name': 'bubble_gum', 'id': 159, 'frequency': 'r', 'synset': 'bubble_gum.n.01'}, {'name': 'bucket', 'id': 160, 'frequency': 'f', 'synset': 'bucket.n.01'}, {'name': 'horse_buggy', 'id': 161, 'frequency': 'r', 'synset': 'buggy.n.01'}, {'name': 'bull', 'id': 162, 'frequency': 'c', 'synset': 'bull.n.11'}, {'name': 'bulldog', 'id': 163, 'frequency': 'c', 'synset': 'bulldog.n.01'}, {'name': 'bulldozer', 'id': 164, 'frequency': 'r', 'synset': 'bulldozer.n.01'}, {'name': 'bullet_train', 'id': 165, 'frequency': 'c', 'synset': 'bullet_train.n.01'}, {'name': 'bulletin_board', 'id': 166, 'frequency': 'c', 'synset': 'bulletin_board.n.02'}, {'name': 'bulletproof_vest', 'id': 167, 'frequency': 'r', 'synset': 'bulletproof_vest.n.01'}, {'name': 'bullhorn', 'id': 168, 'frequency': 'c', 'synset': 'bullhorn.n.01'}, {'name': 'bun', 'id': 169, 'frequency': 'f', 'synset': 'bun.n.01'}, {'name': 'bunk_bed', 'id': 170, 'frequency': 'c', 'synset': 'bunk_bed.n.01'}, {'name': 'buoy', 'id': 171, 'frequency': 'f', 'synset': 'buoy.n.01'}, {'name': 'burrito', 'id': 172, 'frequency': 'r', 'synset': 'burrito.n.01'}, {'name': 'bus_(vehicle)', 'id': 173, 'frequency': 'f', 'synset': 'bus.n.01'}, {'name': 'business_card', 'id': 174, 'frequency': 'c', 'synset': 'business_card.n.01'}, {'name': 'butter', 'id': 175, 'frequency': 'f', 'synset': 'butter.n.01'}, {'name': 'butterfly', 'id': 176, 'frequency': 'c', 'synset': 'butterfly.n.01'}, {'name': 'button', 'id': 177, 'frequency': 'f', 'synset': 'button.n.01'}, {'name': 'cab_(taxi)', 'id': 178, 'frequency': 'f', 'synset': 'cab.n.03'}, {'name': 'cabana', 'id': 179, 'frequency': 'r', 'synset': 'cabana.n.01'}, {'name': 'cabin_car', 'id': 180, 'frequency': 'c', 'synset': 'cabin_car.n.01'}, {'name': 'cabinet', 'id': 181, 'frequency': 'f', 'synset': 'cabinet.n.01'}, {'name': 'locker', 'id': 182, 'frequency': 'r', 'synset': 'cabinet.n.03'}, {'name': 'cake', 'id': 183, 'frequency': 'f', 'synset': 'cake.n.03'}, {'name': 'calculator', 'id': 184, 'frequency': 'c', 'synset': 'calculator.n.02'}, {'name': 'calendar', 'id': 185, 'frequency': 'f', 'synset': 'calendar.n.02'}, {'name': 'calf', 'id': 186, 'frequency': 'c', 'synset': 'calf.n.01'}, {'name': 'camcorder', 'id': 187, 'frequency': 'c', 'synset': 'camcorder.n.01'}, {'name': 'camel', 'id': 188, 'frequency': 'c', 'synset': 'camel.n.01'}, {'name': 'camera', 'id': 189, 'frequency': 'f', 'synset': 'camera.n.01'}, {'name': 'camera_lens', 'id': 190, 'frequency': 'c', 'synset': 'camera_lens.n.01'}, {'name': 'camper_(vehicle)', 'id': 191, 'frequency': 'c', 'synset': 'camper.n.02'}, {'name': 'can', 'id': 192, 'frequency': 'f', 'synset': 'can.n.01'}, {'name': 'can_opener', 'id': 193, 'frequency': 'c', 'synset': 'can_opener.n.01'}, {'name': 'candle', 'id': 194, 'frequency': 'f', 'synset': 'candle.n.01'}, {'name': 'candle_holder', 'id': 195, 'frequency': 'f', 'synset': 'candlestick.n.01'}, {'name': 'candy_bar', 'id': 196, 'frequency': 'r', 'synset': 'candy_bar.n.01'}, {'name': 'candy_cane', 'id': 197, 'frequency': 'c', 'synset': 'candy_cane.n.01'}, {'name': 'walking_cane', 'id': 198, 'frequency': 'c', 'synset': 'cane.n.01'}, {'name': 'canister', 'id': 199, 'frequency': 'c', 'synset': 'canister.n.02'}, {'name': 'canoe', 'id': 200, 'frequency': 'c', 'synset': 'canoe.n.01'}, {'name': 'cantaloup', 'id': 201, 'frequency': 'c', 'synset': 'cantaloup.n.02'}, {'name': 'canteen', 'id': 202, 'frequency': 'r', 'synset': 'canteen.n.01'}, {'name': 'cap_(headwear)', 'id': 203, 'frequency': 'f', 'synset': 'cap.n.01'}, {'name': 'bottle_cap', 'id': 204, 'frequency': 'f', 'synset': 'cap.n.02'}, {'name': 'cape', 'id': 205, 'frequency': 'c', 'synset': 'cape.n.02'}, {'name': 'cappuccino', 'id': 206, 'frequency': 'c', 'synset': 'cappuccino.n.01'}, {'name': 'car_(automobile)', 'id': 207, 'frequency': 'f', 'synset': 'car.n.01'}, {'name': 'railcar_(part_of_a_train)', 'id': 208, 'frequency': 'f', 'synset': 'car.n.02'}, {'name': 'elevator_car', 'id': 209, 'frequency': 'r', 'synset': 'car.n.04'}, {'name': 'car_battery', 'id': 210, 'frequency': 'r', 'synset': 'car_battery.n.01'}, {'name': 'identity_card', 'id': 211, 'frequency': 'c', 'synset': 'card.n.02'}, {'name': 'card', 'id': 212, 'frequency': 'c', 'synset': 'card.n.03'}, {'name': 'cardigan', 'id': 213, 'frequency': 'c', 'synset': 'cardigan.n.01'}, {'name': 'cargo_ship', 'id': 214, 'frequency': 'r', 'synset': 'cargo_ship.n.01'}, {'name': 'carnation', 'id': 215, 'frequency': 'r', 'synset': 'carnation.n.01'}, {'name': 'horse_carriage', 'id': 216, 'frequency': 'c', 'synset': 'carriage.n.02'}, {'name': 'carrot', 'id': 217, 'frequency': 'f', 'synset': 'carrot.n.01'}, {'name': 'tote_bag', 'id': 218, 'frequency': 'f', 'synset': 'carryall.n.01'}, {'name': 'cart', 'id': 219, 'frequency': 'c', 'synset': 'cart.n.01'}, {'name': 'carton', 'id': 220, 'frequency': 'c', 'synset': 'carton.n.02'}, {'name': 'cash_register', 'id': 221, 'frequency': 'c', 'synset': 'cash_register.n.01'}, {'name': 'casserole', 'id': 222, 'frequency': 'r', 'synset': 'casserole.n.01'}, {'name': 'cassette', 'id': 223, 'frequency': 'r', 'synset': 'cassette.n.01'}, {'name': 'cast', 'id': 224, 'frequency': 'c', 'synset': 'cast.n.05'}, {'name': 'cat', 'id': 225, 'frequency': 'f', 'synset': 'cat.n.01'}, {'name': 'cauliflower', 'id': 226, 'frequency': 'f', 'synset': 'cauliflower.n.02'}, {'name': 'cayenne_(spice)', 'id': 227, 'frequency': 'c', 'synset': 'cayenne.n.02'}, {'name': 'CD_player', 'id': 228, 'frequency': 'c', 'synset': 'cd_player.n.01'}, {'name': 'celery', 'id': 229, 'frequency': 'f', 'synset': 'celery.n.01'}, {'name': 'cellular_telephone', 'id': 230, 'frequency': 'f', 'synset': 'cellular_telephone.n.01'}, {'name': 'chain_mail', 'id': 231, 'frequency': 'r', 'synset': 'chain_mail.n.01'}, {'name': 'chair', 'id': 232, 'frequency': 'f', 'synset': 'chair.n.01'}, {'name': 'chaise_longue', 'id': 233, 'frequency': 'r', 'synset': 'chaise_longue.n.01'}, {'name': 'chalice', 'id': 234, 'frequency': 'r', 'synset': 'chalice.n.01'}, {'name': 'chandelier', 'id': 235, 'frequency': 'f', 'synset': 'chandelier.n.01'}, {'name': 'chap', 'id': 236, 'frequency': 'r', 'synset': 'chap.n.04'}, {'name': 'checkbook', 'id': 237, 'frequency': 'r', 'synset': 'checkbook.n.01'}, {'name': 'checkerboard', 'id': 238, 'frequency': 'r', 'synset': 'checkerboard.n.01'}, {'name': 'cherry', 'id': 239, 'frequency': 'c', 'synset': 'cherry.n.03'}, {'name': 'chessboard', 'id': 240, 'frequency': 'r', 'synset': 'chessboard.n.01'}, {'name': 'chicken_(animal)', 'id': 241, 'frequency': 'c', 'synset': 'chicken.n.02'}, {'name': 'chickpea', 'id': 242, 'frequency': 'c', 'synset': 'chickpea.n.01'}, {'name': 'chili_(vegetable)', 'id': 243, 'frequency': 'c', 'synset': 'chili.n.02'}, {'name': 'chime', 'id': 244, 'frequency': 'r', 'synset': 'chime.n.01'}, {'name': 'chinaware', 'id': 245, 'frequency': 'r', 'synset': 'chinaware.n.01'}, {'name': 'crisp_(potato_chip)', 'id': 246, 'frequency': 'c', 'synset': 'chip.n.04'}, {'name': 'poker_chip', 'id': 247, 'frequency': 'r', 'synset': 'chip.n.06'}, {'name': 'chocolate_bar', 'id': 248, 'frequency': 'c', 'synset': 'chocolate_bar.n.01'}, {'name': 'chocolate_cake', 'id': 249, 'frequency': 'c', 'synset': 'chocolate_cake.n.01'}, {'name': 'chocolate_milk', 'id': 250, 'frequency': 'r', 'synset': 'chocolate_milk.n.01'}, {'name': 'chocolate_mousse', 'id': 251, 'frequency': 'r', 'synset': 'chocolate_mousse.n.01'}, {'name': 'choker', 'id': 252, 'frequency': 'f', 'synset': 'choker.n.03'}, {'name': 'chopping_board', 'id': 253, 'frequency': 'f', 'synset': 'chopping_board.n.01'}, {'name': 'chopstick', 'id': 254, 'frequency': 'f', 'synset': 'chopstick.n.01'}, {'name': 'Christmas_tree', 'id': 255, 'frequency': 'f', 'synset': 'christmas_tree.n.05'}, {'name': 'slide', 'id': 256, 'frequency': 'c', 'synset': 'chute.n.02'}, {'name': 'cider', 'id': 257, 'frequency': 'r', 'synset': 'cider.n.01'}, {'name': 'cigar_box', 'id': 258, 'frequency': 'r', 'synset': 'cigar_box.n.01'}, {'name': 'cigarette', 'id': 259, 'frequency': 'f', 'synset': 'cigarette.n.01'}, {'name': 'cigarette_case', 'id': 260, 'frequency': 'c', 'synset': 'cigarette_case.n.01'}, {'name': 'cistern', 'id': 261, 'frequency': 'f', 'synset': 'cistern.n.02'}, {'name': 'clarinet', 'id': 262, 'frequency': 'r', 'synset': 'clarinet.n.01'}, {'name': 'clasp', 'id': 263, 'frequency': 'c', 'synset': 'clasp.n.01'}, {'name': 'cleansing_agent', 'id': 264, 'frequency': 'c', 'synset': 'cleansing_agent.n.01'}, {'name': 'cleat_(for_securing_rope)', 'id': 265, 'frequency': 'r', 'synset': 'cleat.n.02'}, {'name': 'clementine', 'id': 266, 'frequency': 'r', 'synset': 'clementine.n.01'}, {'name': 'clip', 'id': 267, 'frequency': 'c', 'synset': 'clip.n.03'}, {'name': 'clipboard', 'id': 268, 'frequency': 'c', 'synset': 'clipboard.n.01'}, {'name': 'clippers_(for_plants)', 'id': 269, 'frequency': 'r', 'synset': 'clipper.n.03'}, {'name': 'cloak', 'id': 270, 'frequency': 'r', 'synset': 'cloak.n.02'}, {'name': 'clock', 'id': 271, 'frequency': 'f', 'synset': 'clock.n.01'}, {'name': 'clock_tower', 'id': 272, 'frequency': 'f', 'synset': 'clock_tower.n.01'}, {'name': 'clothes_hamper', 'id': 273, 'frequency': 'c', 'synset': 'clothes_hamper.n.01'}, {'name': 'clothespin', 'id': 274, 'frequency': 'c', 'synset': 'clothespin.n.01'}, {'name': 'clutch_bag', 'id': 275, 'frequency': 'r', 'synset': 'clutch_bag.n.01'}, {'name': 'coaster', 'id': 276, 'frequency': 'f', 'synset': 'coaster.n.03'}, {'name': 'coat', 'id': 277, 'frequency': 'f', 'synset': 'coat.n.01'}, {'name': 'coat_hanger', 'id': 278, 'frequency': 'c', 'synset': 'coat_hanger.n.01'}, {'name': 'coatrack', 'id': 279, 'frequency': 'c', 'synset': 'coatrack.n.01'}, {'name': 'cock', 'id': 280, 'frequency': 'c', 'synset': 'cock.n.04'}, {'name': 'cockroach', 'id': 281, 'frequency': 'r', 'synset': 'cockroach.n.01'}, {'name': 'cocoa_(beverage)', 'id': 282, 'frequency': 'r', 'synset': 'cocoa.n.01'}, {'name': 'coconut', 'id': 283, 'frequency': 'c', 'synset': 'coconut.n.02'}, {'name': 'coffee_maker', 'id': 284, 'frequency': 'f', 'synset': 'coffee_maker.n.01'}, {'name': 'coffee_table', 'id': 285, 'frequency': 'f', 'synset': 'coffee_table.n.01'}, {'name': 'coffeepot', 'id': 286, 'frequency': 'c', 'synset': 'coffeepot.n.01'}, {'name': 'coil', 'id': 287, 'frequency': 'r', 'synset': 'coil.n.05'}, {'name': 'coin', 'id': 288, 'frequency': 'c', 'synset': 'coin.n.01'}, {'name': 'colander', 'id': 289, 'frequency': 'c', 'synset': 'colander.n.01'}, {'name': 'coleslaw', 'id': 290, 'frequency': 'c', 'synset': 'coleslaw.n.01'}, {'name': 'coloring_material', 'id': 291, 'frequency': 'r', 'synset': 'coloring_material.n.01'}, {'name': 'combination_lock', 'id': 292, 'frequency': 'r', 'synset': 'combination_lock.n.01'}, {'name': 'pacifier', 'id': 293, 'frequency': 'c', 'synset': 'comforter.n.04'}, {'name': 'comic_book', 'id': 294, 'frequency': 'r', 'synset': 'comic_book.n.01'}, {'name': 'compass', 'id': 295, 'frequency': 'r', 'synset': 'compass.n.01'}, {'name': 'computer_keyboard', 'id': 296, 'frequency': 'f', 'synset': 'computer_keyboard.n.01'}, {'name': 'condiment', 'id': 297, 'frequency': 'f', 'synset': 'condiment.n.01'}, {'name': 'cone', 'id': 298, 'frequency': 'f', 'synset': 'cone.n.01'}, {'name': 'control', 'id': 299, 'frequency': 'f', 'synset': 'control.n.09'}, {'name': 'convertible_(automobile)', 'id': 300, 'frequency': 'r', 'synset': 'convertible.n.01'}, {'name': 'sofa_bed', 'id': 301, 'frequency': 'r', 'synset': 'convertible.n.03'}, {'name': 'cooker', 'id': 302, 'frequency': 'r', 'synset': 'cooker.n.01'}, {'name': 'cookie', 'id': 303, 'frequency': 'f', 'synset': 'cookie.n.01'}, {'name': 'cooking_utensil', 'id': 304, 'frequency': 'r', 'synset': 'cooking_utensil.n.01'}, {'name': 'cooler_(for_food)', 'id': 305, 'frequency': 'f', 'synset': 'cooler.n.01'}, {'name': 'cork_(bottle_plug)', 'id': 306, 'frequency': 'f', 'synset': 'cork.n.04'}, {'name': 'corkboard', 'id': 307, 'frequency': 'r', 'synset': 'corkboard.n.01'}, {'name': 'corkscrew', 'id': 308, 'frequency': 'c', 'synset': 'corkscrew.n.01'}, {'name': 'edible_corn', 'id': 309, 'frequency': 'f', 'synset': 'corn.n.03'}, {'name': 'cornbread', 'id': 310, 'frequency': 'r', 'synset': 'cornbread.n.01'}, {'name': 'cornet', 'id': 311, 'frequency': 'c', 'synset': 'cornet.n.01'}, {'name': 'cornice', 'id': 312, 'frequency': 'c', 'synset': 'cornice.n.01'}, {'name': 'cornmeal', 'id': 313, 'frequency': 'r', 'synset': 'cornmeal.n.01'}, {'name': 'corset', 'id': 314, 'frequency': 'c', 'synset': 'corset.n.01'}, {'name': 'costume', 'id': 315, 'frequency': 'c', 'synset': 'costume.n.04'}, {'name': 'cougar', 'id': 316, 'frequency': 'r', 'synset': 'cougar.n.01'}, {'name': 'coverall', 'id': 317, 'frequency': 'r', 'synset': 'coverall.n.01'}, {'name': 'cowbell', 'id': 318, 'frequency': 'c', 'synset': 'cowbell.n.01'}, {'name': 'cowboy_hat', 'id': 319, 'frequency': 'f', 'synset': 'cowboy_hat.n.01'}, {'name': 'crab_(animal)', 'id': 320, 'frequency': 'c', 'synset': 'crab.n.01'}, {'name': 'crabmeat', 'id': 321, 'frequency': 'r', 'synset': 'crab.n.05'}, {'name': 'cracker', 'id': 322, 'frequency': 'c', 'synset': 'cracker.n.01'}, {'name': 'crape', 'id': 323, 'frequency': 'r', 'synset': 'crape.n.01'}, {'name': 'crate', 'id': 324, 'frequency': 'f', 'synset': 'crate.n.01'}, {'name': 'crayon', 'id': 325, 'frequency': 'c', 'synset': 'crayon.n.01'}, {'name': 'cream_pitcher', 'id': 326, 'frequency': 'r', 'synset': 'cream_pitcher.n.01'}, {'name': 'crescent_roll', 'id': 327, 'frequency': 'c', 'synset': 'crescent_roll.n.01'}, {'name': 'crib', 'id': 328, 'frequency': 'c', 'synset': 'crib.n.01'}, {'name': 'crock_pot', 'id': 329, 'frequency': 'c', 'synset': 'crock.n.03'}, {'name': 'crossbar', 'id': 330, 'frequency': 'f', 'synset': 'crossbar.n.01'}, {'name': 'crouton', 'id': 331, 'frequency': 'r', 'synset': 'crouton.n.01'}, {'name': 'crow', 'id': 332, 'frequency': 'c', 'synset': 'crow.n.01'}, {'name': 'crowbar', 'id': 333, 'frequency': 'r', 'synset': 'crowbar.n.01'}, {'name': 'crown', 'id': 334, 'frequency': 'c', 'synset': 'crown.n.04'}, {'name': 'crucifix', 'id': 335, 'frequency': 'c', 'synset': 'crucifix.n.01'}, {'name': 'cruise_ship', 'id': 336, 'frequency': 'c', 'synset': 'cruise_ship.n.01'}, {'name': 'police_cruiser', 'id': 337, 'frequency': 'c', 'synset': 'cruiser.n.01'}, {'name': 'crumb', 'id': 338, 'frequency': 'f', 'synset': 'crumb.n.03'}, {'name': 'crutch', 'id': 339, 'frequency': 'c', 'synset': 'crutch.n.01'}, {'name': 'cub_(animal)', 'id': 340, 'frequency': 'c', 'synset': 'cub.n.03'}, {'name': 'cube', 'id': 341, 'frequency': 'c', 'synset': 'cube.n.05'}, {'name': 'cucumber', 'id': 342, 'frequency': 'f', 'synset': 'cucumber.n.02'}, {'name': 'cufflink', 'id': 343, 'frequency': 'c', 'synset': 'cufflink.n.01'}, {'name': 'cup', 'id': 344, 'frequency': 'f', 'synset': 'cup.n.01'}, {'name': 'trophy_cup', 'id': 345, 'frequency': 'c', 'synset': 'cup.n.08'}, {'name': 'cupboard', 'id': 346, 'frequency': 'f', 'synset': 'cupboard.n.01'}, {'name': 'cupcake', 'id': 347, 'frequency': 'f', 'synset': 'cupcake.n.01'}, {'name': 'hair_curler', 'id': 348, 'frequency': 'r', 'synset': 'curler.n.01'}, {'name': 'curling_iron', 'id': 349, 'frequency': 'r', 'synset': 'curling_iron.n.01'}, {'name': 'curtain', 'id': 350, 'frequency': 'f', 'synset': 'curtain.n.01'}, {'name': 'cushion', 'id': 351, 'frequency': 'f', 'synset': 'cushion.n.03'}, {'name': 'cylinder', 'id': 352, 'frequency': 'r', 'synset': 'cylinder.n.04'}, {'name': 'cymbal', 'id': 353, 'frequency': 'r', 'synset': 'cymbal.n.01'}, {'name': 'dagger', 'id': 354, 'frequency': 'r', 'synset': 'dagger.n.01'}, {'name': 'dalmatian', 'id': 355, 'frequency': 'r', 'synset': 'dalmatian.n.02'}, {'name': 'dartboard', 'id': 356, 'frequency': 'c', 'synset': 'dartboard.n.01'}, {'name': 'date_(fruit)', 'id': 357, 'frequency': 'r', 'synset': 'date.n.08'}, {'name': 'deck_chair', 'id': 358, 'frequency': 'f', 'synset': 'deck_chair.n.01'}, {'name': 'deer', 'id': 359, 'frequency': 'c', 'synset': 'deer.n.01'}, {'name': 'dental_floss', 'id': 360, 'frequency': 'c', 'synset': 'dental_floss.n.01'}, {'name': 'desk', 'id': 361, 'frequency': 'f', 'synset': 'desk.n.01'}, {'name': 'detergent', 'id': 362, 'frequency': 'r', 'synset': 'detergent.n.01'}, {'name': 'diaper', 'id': 363, 'frequency': 'c', 'synset': 'diaper.n.01'}, {'name': 'diary', 'id': 364, 'frequency': 'r', 'synset': 'diary.n.01'}, {'name': 'die', 'id': 365, 'frequency': 'r', 'synset': 'die.n.01'}, {'name': 'dinghy', 'id': 366, 'frequency': 'r', 'synset': 'dinghy.n.01'}, {'name': 'dining_table', 'id': 367, 'frequency': 'f', 'synset': 'dining_table.n.01'}, {'name': 'tux', 'id': 368, 'frequency': 'r', 'synset': 'dinner_jacket.n.01'}, {'name': 'dish', 'id': 369, 'frequency': 'f', 'synset': 'dish.n.01'}, {'name': 'dish_antenna', 'id': 370, 'frequency': 'c', 'synset': 'dish.n.05'}, {'name': 'dishrag', 'id': 371, 'frequency': 'c', 'synset': 'dishrag.n.01'}, {'name': 'dishtowel', 'id': 372, 'frequency': 'f', 'synset': 'dishtowel.n.01'}, {'name': 'dishwasher', 'id': 373, 'frequency': 'f', 'synset': 'dishwasher.n.01'}, {'name': 'dishwasher_detergent', 'id': 374, 'frequency': 'r', 'synset': 'dishwasher_detergent.n.01'}, {'name': 'dispenser', 'id': 375, 'frequency': 'f', 'synset': 'dispenser.n.01'}, {'name': 'diving_board', 'id': 376, 'frequency': 'r', 'synset': 'diving_board.n.01'}, {'name': 'Dixie_cup', 'id': 377, 'frequency': 'f', 'synset': 'dixie_cup.n.01'}, {'name': 'dog', 'id': 378, 'frequency': 'f', 'synset': 'dog.n.01'}, {'name': 'dog_collar', 'id': 379, 'frequency': 'f', 'synset': 'dog_collar.n.01'}, {'name': 'doll', 'id': 380, 'frequency': 'f', 'synset': 'doll.n.01'}, {'name': 'dollar', 'id': 381, 'frequency': 'r', 'synset': 'dollar.n.02'}, {'name': 'dollhouse', 'id': 382, 'frequency': 'r', 'synset': 'dollhouse.n.01'}, {'name': 'dolphin', 'id': 383, 'frequency': 'c', 'synset': 'dolphin.n.02'}, {'name': 'domestic_ass', 'id': 384, 'frequency': 'c', 'synset': 'domestic_ass.n.01'}, {'name': 'doorknob', 'id': 385, 'frequency': 'f', 'synset': 'doorknob.n.01'}, {'name': 'doormat', 'id': 386, 'frequency': 'c', 'synset': 'doormat.n.02'}, {'name': 'doughnut', 'id': 387, 'frequency': 'f', 'synset': 'doughnut.n.02'}, {'name': 'dove', 'id': 388, 'frequency': 'r', 'synset': 'dove.n.01'}, {'name': 'dragonfly', 'id': 389, 'frequency': 'r', 'synset': 'dragonfly.n.01'}, {'name': 'drawer', 'id': 390, 'frequency': 'f', 'synset': 'drawer.n.01'}, {'name': 'underdrawers', 'id': 391, 'frequency': 'c', 'synset': 'drawers.n.01'}, {'name': 'dress', 'id': 392, 'frequency': 'f', 'synset': 'dress.n.01'}, {'name': 'dress_hat', 'id': 393, 'frequency': 'c', 'synset': 'dress_hat.n.01'}, {'name': 'dress_suit', 'id': 394, 'frequency': 'f', 'synset': 'dress_suit.n.01'}, {'name': 'dresser', 'id': 395, 'frequency': 'f', 'synset': 'dresser.n.05'}, {'name': 'drill', 'id': 396, 'frequency': 'c', 'synset': 'drill.n.01'}, {'name': 'drone', 'id': 397, 'frequency': 'r', 'synset': 'drone.n.04'}, {'name': 'dropper', 'id': 398, 'frequency': 'r', 'synset': 'dropper.n.01'}, {'name': 'drum_(musical_instrument)', 'id': 399, 'frequency': 'c', 'synset': 'drum.n.01'}, {'name': 'drumstick', 'id': 400, 'frequency': 'r', 'synset': 'drumstick.n.02'}, {'name': 'duck', 'id': 401, 'frequency': 'f', 'synset': 'duck.n.01'}, {'name': 'duckling', 'id': 402, 'frequency': 'c', 'synset': 'duckling.n.02'}, {'name': 'duct_tape', 'id': 403, 'frequency': 'c', 'synset': 'duct_tape.n.01'}, {'name': 'duffel_bag', 'id': 404, 'frequency': 'f', 'synset': 'duffel_bag.n.01'}, {'name': 'dumbbell', 'id': 405, 'frequency': 'r', 'synset': 'dumbbell.n.01'}, {'name': 'dumpster', 'id': 406, 'frequency': 'c', 'synset': 'dumpster.n.01'}, {'name': 'dustpan', 'id': 407, 'frequency': 'r', 'synset': 'dustpan.n.02'}, {'name': 'eagle', 'id': 408, 'frequency': 'c', 'synset': 'eagle.n.01'}, {'name': 'earphone', 'id': 409, 'frequency': 'f', 'synset': 'earphone.n.01'}, {'name': 'earplug', 'id': 410, 'frequency': 'r', 'synset': 'earplug.n.01'}, {'name': 'earring', 'id': 411, 'frequency': 'f', 'synset': 'earring.n.01'}, {'name': 'easel', 'id': 412, 'frequency': 'c', 'synset': 'easel.n.01'}, {'name': 'eclair', 'id': 413, 'frequency': 'r', 'synset': 'eclair.n.01'}, {'name': 'eel', 'id': 414, 'frequency': 'r', 'synset': 'eel.n.01'}, {'name': 'egg', 'id': 415, 'frequency': 'f', 'synset': 'egg.n.02'}, {'name': 'egg_roll', 'id': 416, 'frequency': 'r', 'synset': 'egg_roll.n.01'}, {'name': 'egg_yolk', 'id': 417, 'frequency': 'c', 'synset': 'egg_yolk.n.01'}, {'name': 'eggbeater', 'id': 418, 'frequency': 'c', 'synset': 'eggbeater.n.02'}, {'name': 'eggplant', 'id': 419, 'frequency': 'c', 'synset': 'eggplant.n.01'}, {'name': 'electric_chair', 'id': 420, 'frequency': 'r', 'synset': 'electric_chair.n.01'}, {'name': 'refrigerator', 'id': 421, 'frequency': 'f', 'synset': 'electric_refrigerator.n.01'}, {'name': 'elephant', 'id': 422, 'frequency': 'f', 'synset': 'elephant.n.01'}, {'name': 'elk', 'id': 423, 'frequency': 'c', 'synset': 'elk.n.01'}, {'name': 'envelope', 'id': 424, 'frequency': 'c', 'synset': 'envelope.n.01'}, {'name': 'eraser', 'id': 425, 'frequency': 'c', 'synset': 'eraser.n.01'}, {'name': 'escargot', 'id': 426, 'frequency': 'r', 'synset': 'escargot.n.01'}, {'name': 'eyepatch', 'id': 427, 'frequency': 'r', 'synset': 'eyepatch.n.01'}, {'name': 'falcon', 'id': 428, 'frequency': 'r', 'synset': 'falcon.n.01'}, {'name': 'fan', 'id': 429, 'frequency': 'f', 'synset': 'fan.n.01'}, {'name': 'faucet', 'id': 430, 'frequency': 'f', 'synset': 'faucet.n.01'}, {'name': 'fedora', 'id': 431, 'frequency': 'r', 'synset': 'fedora.n.01'}, {'name': 'ferret', 'id': 432, 'frequency': 'r', 'synset': 'ferret.n.02'}, {'name': 'Ferris_wheel', 'id': 433, 'frequency': 'c', 'synset': 'ferris_wheel.n.01'}, {'name': 'ferry', 'id': 434, 'frequency': 'c', 'synset': 'ferry.n.01'}, {'name': 'fig_(fruit)', 'id': 435, 'frequency': 'r', 'synset': 'fig.n.04'}, {'name': 'fighter_jet', 'id': 436, 'frequency': 'c', 'synset': 'fighter.n.02'}, {'name': 'figurine', 'id': 437, 'frequency': 'f', 'synset': 'figurine.n.01'}, {'name': 'file_cabinet', 'id': 438, 'frequency': 'c', 'synset': 'file.n.03'}, {'name': 'file_(tool)', 'id': 439, 'frequency': 'r', 'synset': 'file.n.04'}, {'name': 'fire_alarm', 'id': 440, 'frequency': 'f', 'synset': 'fire_alarm.n.02'}, {'name': 'fire_engine', 'id': 441, 'frequency': 'f', 'synset': 'fire_engine.n.01'}, {'name': 'fire_extinguisher', 'id': 442, 'frequency': 'f', 'synset': 'fire_extinguisher.n.01'}, {'name': 'fire_hose', 'id': 443, 'frequency': 'c', 'synset': 'fire_hose.n.01'}, {'name': 'fireplace', 'id': 444, 'frequency': 'f', 'synset': 'fireplace.n.01'}, {'name': 'fireplug', 'id': 445, 'frequency': 'f', 'synset': 'fireplug.n.01'}, {'name': 'first-aid_kit', 'id': 446, 'frequency': 'r', 'synset': 'first-aid_kit.n.01'}, {'name': 'fish', 'id': 447, 'frequency': 'f', 'synset': 'fish.n.01'}, {'name': 'fish_(food)', 'id': 448, 'frequency': 'c', 'synset': 'fish.n.02'}, {'name': 'fishbowl', 'id': 449, 'frequency': 'r', 'synset': 'fishbowl.n.02'}, {'name': 'fishing_rod', 'id': 450, 'frequency': 'c', 'synset': 'fishing_rod.n.01'}, {'name': 'flag', 'id': 451, 'frequency': 'f', 'synset': 'flag.n.01'}, {'name': 'flagpole', 'id': 452, 'frequency': 'f', 'synset': 'flagpole.n.02'}, {'name': 'flamingo', 'id': 453, 'frequency': 'c', 'synset': 'flamingo.n.01'}, {'name': 'flannel', 'id': 454, 'frequency': 'c', 'synset': 'flannel.n.01'}, {'name': 'flap', 'id': 455, 'frequency': 'c', 'synset': 'flap.n.01'}, {'name': 'flash', 'id': 456, 'frequency': 'r', 'synset': 'flash.n.10'}, {'name': 'flashlight', 'id': 457, 'frequency': 'c', 'synset': 'flashlight.n.01'}, {'name': 'fleece', 'id': 458, 'frequency': 'r', 'synset': 'fleece.n.03'}, {'name': 'flip-flop_(sandal)', 'id': 459, 'frequency': 'f', 'synset': 'flip-flop.n.02'}, {'name': 'flipper_(footwear)', 'id': 460, 'frequency': 'c', 'synset': 'flipper.n.01'}, {'name': 'flower_arrangement', 'id': 461, 'frequency': 'f', 'synset': 'flower_arrangement.n.01'}, {'name': 'flute_glass', 'id': 462, 'frequency': 'c', 'synset': 'flute.n.02'}, {'name': 'foal', 'id': 463, 'frequency': 'c', 'synset': 'foal.n.01'}, {'name': 'folding_chair', 'id': 464, 'frequency': 'c', 'synset': 'folding_chair.n.01'}, {'name': 'food_processor', 'id': 465, 'frequency': 'c', 'synset': 'food_processor.n.01'}, {'name': 'football_(American)', 'id': 466, 'frequency': 'c', 'synset': 'football.n.02'}, {'name': 'football_helmet', 'id': 467, 'frequency': 'r', 'synset': 'football_helmet.n.01'}, {'name': 'footstool', 'id': 468, 'frequency': 'c', 'synset': 'footstool.n.01'}, {'name': 'fork', 'id': 469, 'frequency': 'f', 'synset': 'fork.n.01'}, {'name': 'forklift', 'id': 470, 'frequency': 'c', 'synset': 'forklift.n.01'}, {'name': 'freight_car', 'id': 471, 'frequency': 'c', 'synset': 'freight_car.n.01'}, {'name': 'French_toast', 'id': 472, 'frequency': 'c', 'synset': 'french_toast.n.01'}, {'name': 'freshener', 'id': 473, 'frequency': 'c', 'synset': 'freshener.n.01'}, {'name': 'frisbee', 'id': 474, 'frequency': 'f', 'synset': 'frisbee.n.01'}, {'name': 'frog', 'id': 475, 'frequency': 'c', 'synset': 'frog.n.01'}, {'name': 'fruit_juice', 'id': 476, 'frequency': 'c', 'synset': 'fruit_juice.n.01'}, {'name': 'frying_pan', 'id': 477, 'frequency': 'f', 'synset': 'frying_pan.n.01'}, {'name': 'fudge', 'id': 478, 'frequency': 'r', 'synset': 'fudge.n.01'}, {'name': 'funnel', 'id': 479, 'frequency': 'r', 'synset': 'funnel.n.02'}, {'name': 'futon', 'id': 480, 'frequency': 'r', 'synset': 'futon.n.01'}, {'name': 'gag', 'id': 481, 'frequency': 'r', 'synset': 'gag.n.02'}, {'name': 'garbage', 'id': 482, 'frequency': 'r', 'synset': 'garbage.n.03'}, {'name': 'garbage_truck', 'id': 483, 'frequency': 'c', 'synset': 'garbage_truck.n.01'}, {'name': 'garden_hose', 'id': 484, 'frequency': 'c', 'synset': 'garden_hose.n.01'}, {'name': 'gargle', 'id': 485, 'frequency': 'c', 'synset': 'gargle.n.01'}, {'name': 'gargoyle', 'id': 486, 'frequency': 'r', 'synset': 'gargoyle.n.02'}, {'name': 'garlic', 'id': 487, 'frequency': 'c', 'synset': 'garlic.n.02'}, {'name': 'gasmask', 'id': 488, 'frequency': 'r', 'synset': 'gasmask.n.01'}, {'name': 'gazelle', 'id': 489, 'frequency': 'c', 'synset': 'gazelle.n.01'}, {'name': 'gelatin', 'id': 490, 'frequency': 'c', 'synset': 'gelatin.n.02'}, {'name': 'gemstone', 'id': 491, 'frequency': 'r', 'synset': 'gem.n.02'}, {'name': 'generator', 'id': 492, 'frequency': 'r', 'synset': 'generator.n.02'}, {'name': 'giant_panda', 'id': 493, 'frequency': 'c', 'synset': 'giant_panda.n.01'}, {'name': 'gift_wrap', 'id': 494, 'frequency': 'c', 'synset': 'gift_wrap.n.01'}, {'name': 'ginger', 'id': 495, 'frequency': 'c', 'synset': 'ginger.n.03'}, {'name': 'giraffe', 'id': 496, 'frequency': 'f', 'synset': 'giraffe.n.01'}, {'name': 'cincture', 'id': 497, 'frequency': 'c', 'synset': 'girdle.n.02'}, {'name': 'glass_(drink_container)', 'id': 498, 'frequency': 'f', 'synset': 'glass.n.02'}, {'name': 'globe', 'id': 499, 'frequency': 'c', 'synset': 'globe.n.03'}, {'name': 'glove', 'id': 500, 'frequency': 'f', 'synset': 'glove.n.02'}, {'name': 'goat', 'id': 501, 'frequency': 'c', 'synset': 'goat.n.01'}, {'name': 'goggles', 'id': 502, 'frequency': 'f', 'synset': 'goggles.n.01'}, {'name': 'goldfish', 'id': 503, 'frequency': 'r', 'synset': 'goldfish.n.01'}, {'name': 'golf_club', 'id': 504, 'frequency': 'c', 'synset': 'golf_club.n.02'}, {'name': 'golfcart', 'id': 505, 'frequency': 'c', 'synset': 'golfcart.n.01'}, {'name': 'gondola_(boat)', 'id': 506, 'frequency': 'r', 'synset': 'gondola.n.02'}, {'name': 'goose', 'id': 507, 'frequency': 'c', 'synset': 'goose.n.01'}, {'name': 'gorilla', 'id': 508, 'frequency': 'r', 'synset': 'gorilla.n.01'}, {'name': 'gourd', 'id': 509, 'frequency': 'r', 'synset': 'gourd.n.02'}, {'name': 'grape', 'id': 510, 'frequency': 'f', 'synset': 'grape.n.01'}, {'name': 'grater', 'id': 511, 'frequency': 'c', 'synset': 'grater.n.01'}, {'name': 'gravestone', 'id': 512, 'frequency': 'c', 'synset': 'gravestone.n.01'}, {'name': 'gravy_boat', 'id': 513, 'frequency': 'r', 'synset': 'gravy_boat.n.01'}, {'name': 'green_bean', 'id': 514, 'frequency': 'f', 'synset': 'green_bean.n.02'}, {'name': 'green_onion', 'id': 515, 'frequency': 'f', 'synset': 'green_onion.n.01'}, {'name': 'griddle', 'id': 516, 'frequency': 'r', 'synset': 'griddle.n.01'}, {'name': 'grill', 'id': 517, 'frequency': 'f', 'synset': 'grill.n.02'}, {'name': 'grits', 'id': 518, 'frequency': 'r', 'synset': 'grits.n.01'}, {'name': 'grizzly', 'id': 519, 'frequency': 'c', 'synset': 'grizzly.n.01'}, {'name': 'grocery_bag', 'id': 520, 'frequency': 'c', 'synset': 'grocery_bag.n.01'}, {'name': 'guitar', 'id': 521, 'frequency': 'f', 'synset': 'guitar.n.01'}, {'name': 'gull', 'id': 522, 'frequency': 'c', 'synset': 'gull.n.02'}, {'name': 'gun', 'id': 523, 'frequency': 'c', 'synset': 'gun.n.01'}, {'name': 'hairbrush', 'id': 524, 'frequency': 'f', 'synset': 'hairbrush.n.01'}, {'name': 'hairnet', 'id': 525, 'frequency': 'c', 'synset': 'hairnet.n.01'}, {'name': 'hairpin', 'id': 526, 'frequency': 'c', 'synset': 'hairpin.n.01'}, {'name': 'halter_top', 'id': 527, 'frequency': 'r', 'synset': 'halter.n.03'}, {'name': 'ham', 'id': 528, 'frequency': 'f', 'synset': 'ham.n.01'}, {'name': 'hamburger', 'id': 529, 'frequency': 'c', 'synset': 'hamburger.n.01'}, {'name': 'hammer', 'id': 530, 'frequency': 'c', 'synset': 'hammer.n.02'}, {'name': 'hammock', 'id': 531, 'frequency': 'c', 'synset': 'hammock.n.02'}, {'name': 'hamper', 'id': 532, 'frequency': 'r', 'synset': 'hamper.n.02'}, {'name': 'hamster', 'id': 533, 'frequency': 'c', 'synset': 'hamster.n.01'}, {'name': 'hair_dryer', 'id': 534, 'frequency': 'f', 'synset': 'hand_blower.n.01'}, {'name': 'hand_glass', 'id': 535, 'frequency': 'r', 'synset': 'hand_glass.n.01'}, {'name': 'hand_towel', 'id': 536, 'frequency': 'f', 'synset': 'hand_towel.n.01'}, {'name': 'handcart', 'id': 537, 'frequency': 'c', 'synset': 'handcart.n.01'}, {'name': 'handcuff', 'id': 538, 'frequency': 'r', 'synset': 'handcuff.n.01'}, {'name': 'handkerchief', 'id': 539, 'frequency': 'c', 'synset': 'handkerchief.n.01'}, {'name': 'handle', 'id': 540, 'frequency': 'f', 'synset': 'handle.n.01'}, {'name': 'handsaw', 'id': 541, 'frequency': 'r', 'synset': 'handsaw.n.01'}, {'name': 'hardback_book', 'id': 542, 'frequency': 'r', 'synset': 'hardback.n.01'}, {'name': 'harmonium', 'id': 543, 'frequency': 'r', 'synset': 'harmonium.n.01'}, {'name': 'hat', 'id': 544, 'frequency': 'f', 'synset': 'hat.n.01'}, {'name': 'hatbox', 'id': 545, 'frequency': 'r', 'synset': 'hatbox.n.01'}, {'name': 'veil', 'id': 546, 'frequency': 'c', 'synset': 'head_covering.n.01'}, {'name': 'headband', 'id': 547, 'frequency': 'f', 'synset': 'headband.n.01'}, {'name': 'headboard', 'id': 548, 'frequency': 'f', 'synset': 'headboard.n.01'}, {'name': 'headlight', 'id': 549, 'frequency': 'f', 'synset': 'headlight.n.01'}, {'name': 'headscarf', 'id': 550, 'frequency': 'c', 'synset': 'headscarf.n.01'}, {'name': 'headset', 'id': 551, 'frequency': 'r', 'synset': 'headset.n.01'}, {'name': 'headstall_(for_horses)', 'id': 552, 'frequency': 'c', 'synset': 'headstall.n.01'}, {'name': 'heart', 'id': 553, 'frequency': 'c', 'synset': 'heart.n.02'}, {'name': 'heater', 'id': 554, 'frequency': 'c', 'synset': 'heater.n.01'}, {'name': 'helicopter', 'id': 555, 'frequency': 'c', 'synset': 'helicopter.n.01'}, {'name': 'helmet', 'id': 556, 'frequency': 'f', 'synset': 'helmet.n.02'}, {'name': 'heron', 'id': 557, 'frequency': 'r', 'synset': 'heron.n.02'}, {'name': 'highchair', 'id': 558, 'frequency': 'c', 'synset': 'highchair.n.01'}, {'name': 'hinge', 'id': 559, 'frequency': 'f', 'synset': 'hinge.n.01'}, {'name': 'hippopotamus', 'id': 560, 'frequency': 'r', 'synset': 'hippopotamus.n.01'}, {'name': 'hockey_stick', 'id': 561, 'frequency': 'r', 'synset': 'hockey_stick.n.01'}, {'name': 'hog', 'id': 562, 'frequency': 'c', 'synset': 'hog.n.03'}, {'name': 'home_plate_(baseball)', 'id': 563, 'frequency': 'f', 'synset': 'home_plate.n.01'}, {'name': 'honey', 'id': 564, 'frequency': 'c', 'synset': 'honey.n.01'}, {'name': 'fume_hood', 'id': 565, 'frequency': 'f', 'synset': 'hood.n.06'}, {'name': 'hook', 'id': 566, 'frequency': 'f', 'synset': 'hook.n.05'}, {'name': 'hookah', 'id': 567, 'frequency': 'r', 'synset': 'hookah.n.01'}, {'name': 'hornet', 'id': 568, 'frequency': 'r', 'synset': 'hornet.n.01'}, {'name': 'horse', 'id': 569, 'frequency': 'f', 'synset': 'horse.n.01'}, {'name': 'hose', 'id': 570, 'frequency': 'f', 'synset': 'hose.n.03'}, {'name': 'hot-air_balloon', 'id': 571, 'frequency': 'r', 'synset': 'hot-air_balloon.n.01'}, {'name': 'hotplate', 'id': 572, 'frequency': 'r', 'synset': 'hot_plate.n.01'}, {'name': 'hot_sauce', 'id': 573, 'frequency': 'c', 'synset': 'hot_sauce.n.01'}, {'name': 'hourglass', 'id': 574, 'frequency': 'r', 'synset': 'hourglass.n.01'}, {'name': 'houseboat', 'id': 575, 'frequency': 'r', 'synset': 'houseboat.n.01'}, {'name': 'hummingbird', 'id': 576, 'frequency': 'c', 'synset': 'hummingbird.n.01'}, {'name': 'hummus', 'id': 577, 'frequency': 'r', 'synset': 'hummus.n.01'}, {'name': 'polar_bear', 'id': 578, 'frequency': 'f', 'synset': 'ice_bear.n.01'}, {'name': 'icecream', 'id': 579, 'frequency': 'c', 'synset': 'ice_cream.n.01'}, {'name': 'popsicle', 'id': 580, 'frequency': 'r', 'synset': 'ice_lolly.n.01'}, {'name': 'ice_maker', 'id': 581, 'frequency': 'c', 'synset': 'ice_maker.n.01'}, {'name': 'ice_pack', 'id': 582, 'frequency': 'r', 'synset': 'ice_pack.n.01'}, {'name': 'ice_skate', 'id': 583, 'frequency': 'r', 'synset': 'ice_skate.n.01'}, {'name': 'igniter', 'id': 584, 'frequency': 'c', 'synset': 'igniter.n.01'}, {'name': 'inhaler', 'id': 585, 'frequency': 'r', 'synset': 'inhaler.n.01'}, {'name': 'iPod', 'id': 586, 'frequency': 'f', 'synset': 'ipod.n.01'}, {'name': 'iron_(for_clothing)', 'id': 587, 'frequency': 'c', 'synset': 'iron.n.04'}, {'name': 'ironing_board', 'id': 588, 'frequency': 'c', 'synset': 'ironing_board.n.01'}, {'name': 'jacket', 'id': 589, 'frequency': 'f', 'synset': 'jacket.n.01'}, {'name': 'jam', 'id': 590, 'frequency': 'c', 'synset': 'jam.n.01'}, {'name': 'jar', 'id': 591, 'frequency': 'f', 'synset': 'jar.n.01'}, {'name': 'jean', 'id': 592, 'frequency': 'f', 'synset': 'jean.n.01'}, {'name': 'jeep', 'id': 593, 'frequency': 'c', 'synset': 'jeep.n.01'}, {'name': 'jelly_bean', 'id': 594, 'frequency': 'r', 'synset': 'jelly_bean.n.01'}, {'name': 'jersey', 'id': 595, 'frequency': 'f', 'synset': 'jersey.n.03'}, {'name': 'jet_plane', 'id': 596, 'frequency': 'c', 'synset': 'jet.n.01'}, {'name': 'jewel', 'id': 597, 'frequency': 'r', 'synset': 'jewel.n.01'}, {'name': 'jewelry', 'id': 598, 'frequency': 'c', 'synset': 'jewelry.n.01'}, {'name': 'joystick', 'id': 599, 'frequency': 'r', 'synset': 'joystick.n.02'}, {'name': 'jumpsuit', 'id': 600, 'frequency': 'c', 'synset': 'jump_suit.n.01'}, {'name': 'kayak', 'id': 601, 'frequency': 'c', 'synset': 'kayak.n.01'}, {'name': 'keg', 'id': 602, 'frequency': 'r', 'synset': 'keg.n.02'}, {'name': 'kennel', 'id': 603, 'frequency': 'r', 'synset': 'kennel.n.01'}, {'name': 'kettle', 'id': 604, 'frequency': 'c', 'synset': 'kettle.n.01'}, {'name': 'key', 'id': 605, 'frequency': 'f', 'synset': 'key.n.01'}, {'name': 'keycard', 'id': 606, 'frequency': 'r', 'synset': 'keycard.n.01'}, {'name': 'kilt', 'id': 607, 'frequency': 'c', 'synset': 'kilt.n.01'}, {'name': 'kimono', 'id': 608, 'frequency': 'c', 'synset': 'kimono.n.01'}, {'name': 'kitchen_sink', 'id': 609, 'frequency': 'f', 'synset': 'kitchen_sink.n.01'}, {'name': 'kitchen_table', 'id': 610, 'frequency': 'r', 'synset': 'kitchen_table.n.01'}, {'name': 'kite', 'id': 611, 'frequency': 'f', 'synset': 'kite.n.03'}, {'name': 'kitten', 'id': 612, 'frequency': 'c', 'synset': 'kitten.n.01'}, {'name': 'kiwi_fruit', 'id': 613, 'frequency': 'c', 'synset': 'kiwi.n.03'}, {'name': 'knee_pad', 'id': 614, 'frequency': 'f', 'synset': 'knee_pad.n.01'}, {'name': 'knife', 'id': 615, 'frequency': 'f', 'synset': 'knife.n.01'}, {'name': 'knitting_needle', 'id': 616, 'frequency': 'r', 'synset': 'knitting_needle.n.01'}, {'name': 'knob', 'id': 617, 'frequency': 'f', 'synset': 'knob.n.02'}, {'name': 'knocker_(on_a_door)', 'id': 618, 'frequency': 'r', 'synset': 'knocker.n.05'}, {'name': 'koala', 'id': 619, 'frequency': 'r', 'synset': 'koala.n.01'}, {'name': 'lab_coat', 'id': 620, 'frequency': 'r', 'synset': 'lab_coat.n.01'}, {'name': 'ladder', 'id': 621, 'frequency': 'f', 'synset': 'ladder.n.01'}, {'name': 'ladle', 'id': 622, 'frequency': 'c', 'synset': 'ladle.n.01'}, {'name': 'ladybug', 'id': 623, 'frequency': 'c', 'synset': 'ladybug.n.01'}, {'name': 'lamb_(animal)', 'id': 624, 'frequency': 'f', 'synset': 'lamb.n.01'}, {'name': 'lamb-chop', 'id': 625, 'frequency': 'r', 'synset': 'lamb_chop.n.01'}, {'name': 'lamp', 'id': 626, 'frequency': 'f', 'synset': 'lamp.n.02'}, {'name': 'lamppost', 'id': 627, 'frequency': 'f', 'synset': 'lamppost.n.01'}, {'name': 'lampshade', 'id': 628, 'frequency': 'f', 'synset': 'lampshade.n.01'}, {'name': 'lantern', 'id': 629, 'frequency': 'c', 'synset': 'lantern.n.01'}, {'name': 'lanyard', 'id': 630, 'frequency': 'f', 'synset': 'lanyard.n.02'}, {'name': 'laptop_computer', 'id': 631, 'frequency': 'f', 'synset': 'laptop.n.01'}, {'name': 'lasagna', 'id': 632, 'frequency': 'r', 'synset': 'lasagna.n.01'}, {'name': 'latch', 'id': 633, 'frequency': 'f', 'synset': 'latch.n.02'}, {'name': 'lawn_mower', 'id': 634, 'frequency': 'r', 'synset': 'lawn_mower.n.01'}, {'name': 'leather', 'id': 635, 'frequency': 'r', 'synset': 'leather.n.01'}, {'name': 'legging_(clothing)', 'id': 636, 'frequency': 'c', 'synset': 'legging.n.01'}, {'name': 'Lego', 'id': 637, 'frequency': 'c', 'synset': 'lego.n.01'}, {'name': 'legume', 'id': 638, 'frequency': 'r', 'synset': 'legume.n.02'}, {'name': 'lemon', 'id': 639, 'frequency': 'f', 'synset': 'lemon.n.01'}, {'name': 'lemonade', 'id': 640, 'frequency': 'r', 'synset': 'lemonade.n.01'}, {'name': 'lettuce', 'id': 641, 'frequency': 'f', 'synset': 'lettuce.n.02'}, {'name': 'license_plate', 'id': 642, 'frequency': 'f', 'synset': 'license_plate.n.01'}, {'name': 'life_buoy', 'id': 643, 'frequency': 'f', 'synset': 'life_buoy.n.01'}, {'name': 'life_jacket', 'id': 644, 'frequency': 'f', 'synset': 'life_jacket.n.01'}, {'name': 'lightbulb', 'id': 645, 'frequency': 'f', 'synset': 'light_bulb.n.01'}, {'name': 'lightning_rod', 'id': 646, 'frequency': 'r', 'synset': 'lightning_rod.n.02'}, {'name': 'lime', 'id': 647, 'frequency': 'f', 'synset': 'lime.n.06'}, {'name': 'limousine', 'id': 648, 'frequency': 'r', 'synset': 'limousine.n.01'}, {'name': 'lion', 'id': 649, 'frequency': 'c', 'synset': 'lion.n.01'}, {'name': 'lip_balm', 'id': 650, 'frequency': 'c', 'synset': 'lip_balm.n.01'}, {'name': 'liquor', 'id': 651, 'frequency': 'r', 'synset': 'liquor.n.01'}, {'name': 'lizard', 'id': 652, 'frequency': 'c', 'synset': 'lizard.n.01'}, {'name': 'log', 'id': 653, 'frequency': 'f', 'synset': 'log.n.01'}, {'name': 'lollipop', 'id': 654, 'frequency': 'c', 'synset': 'lollipop.n.02'}, {'name': 'speaker_(stero_equipment)', 'id': 655, 'frequency': 'f', 'synset': 'loudspeaker.n.01'}, {'name': 'loveseat', 'id': 656, 'frequency': 'c', 'synset': 'love_seat.n.01'}, {'name': 'machine_gun', 'id': 657, 'frequency': 'r', 'synset': 'machine_gun.n.01'}, {'name': 'magazine', 'id': 658, 'frequency': 'f', 'synset': 'magazine.n.02'}, {'name': 'magnet', 'id': 659, 'frequency': 'f', 'synset': 'magnet.n.01'}, {'name': 'mail_slot', 'id': 660, 'frequency': 'c', 'synset': 'mail_slot.n.01'}, {'name': 'mailbox_(at_home)', 'id': 661, 'frequency': 'f', 'synset': 'mailbox.n.01'}, {'name': 'mallard', 'id': 662, 'frequency': 'r', 'synset': 'mallard.n.01'}, {'name': 'mallet', 'id': 663, 'frequency': 'r', 'synset': 'mallet.n.01'}, {'name': 'mammoth', 'id': 664, 'frequency': 'r', 'synset': 'mammoth.n.01'}, {'name': 'manatee', 'id': 665, 'frequency': 'r', 'synset': 'manatee.n.01'}, {'name': 'mandarin_orange', 'id': 666, 'frequency': 'c', 'synset': 'mandarin.n.05'}, {'name': 'manger', 'id': 667, 'frequency': 'c', 'synset': 'manger.n.01'}, {'name': 'manhole', 'id': 668, 'frequency': 'f', 'synset': 'manhole.n.01'}, {'name': 'map', 'id': 669, 'frequency': 'f', 'synset': 'map.n.01'}, {'name': 'marker', 'id': 670, 'frequency': 'f', 'synset': 'marker.n.03'}, {'name': 'martini', 'id': 671, 'frequency': 'r', 'synset': 'martini.n.01'}, {'name': 'mascot', 'id': 672, 'frequency': 'r', 'synset': 'mascot.n.01'}, {'name': 'mashed_potato', 'id': 673, 'frequency': 'c', 'synset': 'mashed_potato.n.01'}, {'name': 'masher', 'id': 674, 'frequency': 'r', 'synset': 'masher.n.02'}, {'name': 'mask', 'id': 675, 'frequency': 'f', 'synset': 'mask.n.04'}, {'name': 'mast', 'id': 676, 'frequency': 'f', 'synset': 'mast.n.01'}, {'name': 'mat_(gym_equipment)', 'id': 677, 'frequency': 'c', 'synset': 'mat.n.03'}, {'name': 'matchbox', 'id': 678, 'frequency': 'r', 'synset': 'matchbox.n.01'}, {'name': 'mattress', 'id': 679, 'frequency': 'f', 'synset': 'mattress.n.01'}, {'name': 'measuring_cup', 'id': 680, 'frequency': 'c', 'synset': 'measuring_cup.n.01'}, {'name': 'measuring_stick', 'id': 681, 'frequency': 'c', 'synset': 'measuring_stick.n.01'}, {'name': 'meatball', 'id': 682, 'frequency': 'c', 'synset': 'meatball.n.01'}, {'name': 'medicine', 'id': 683, 'frequency': 'c', 'synset': 'medicine.n.02'}, {'name': 'melon', 'id': 684, 'frequency': 'c', 'synset': 'melon.n.01'}, {'name': 'microphone', 'id': 685, 'frequency': 'f', 'synset': 'microphone.n.01'}, {'name': 'microscope', 'id': 686, 'frequency': 'r', 'synset': 'microscope.n.01'}, {'name': 'microwave_oven', 'id': 687, 'frequency': 'f', 'synset': 'microwave.n.02'}, {'name': 'milestone', 'id': 688, 'frequency': 'r', 'synset': 'milestone.n.01'}, {'name': 'milk', 'id': 689, 'frequency': 'f', 'synset': 'milk.n.01'}, {'name': 'milk_can', 'id': 690, 'frequency': 'r', 'synset': 'milk_can.n.01'}, {'name': 'milkshake', 'id': 691, 'frequency': 'r', 'synset': 'milkshake.n.01'}, {'name': 'minivan', 'id': 692, 'frequency': 'f', 'synset': 'minivan.n.01'}, {'name': 'mint_candy', 'id': 693, 'frequency': 'r', 'synset': 'mint.n.05'}, {'name': 'mirror', 'id': 694, 'frequency': 'f', 'synset': 'mirror.n.01'}, {'name': 'mitten', 'id': 695, 'frequency': 'c', 'synset': 'mitten.n.01'}, {'name': 'mixer_(kitchen_tool)', 'id': 696, 'frequency': 'c', 'synset': 'mixer.n.04'}, {'name': 'money', 'id': 697, 'frequency': 'c', 'synset': 'money.n.03'}, {'name': 'monitor_(computer_equipment) computer_monitor', 'id': 698, 'frequency': 'f', 'synset': 'monitor.n.04'}, {'name': 'monkey', 'id': 699, 'frequency': 'c', 'synset': 'monkey.n.01'}, {'name': 'motor', 'id': 700, 'frequency': 'f', 'synset': 'motor.n.01'}, {'name': 'motor_scooter', 'id': 701, 'frequency': 'f', 'synset': 'motor_scooter.n.01'}, {'name': 'motor_vehicle', 'id': 702, 'frequency': 'r', 'synset': 'motor_vehicle.n.01'}, {'name': 'motorcycle', 'id': 703, 'frequency': 'f', 'synset': 'motorcycle.n.01'}, {'name': 'mound_(baseball)', 'id': 704, 'frequency': 'f', 'synset': 'mound.n.01'}, {'name': 'mouse_(computer_equipment)', 'id': 705, 'frequency': 'f', 'synset': 'mouse.n.04'}, {'name': 'mousepad', 'id': 706, 'frequency': 'f', 'synset': 'mousepad.n.01'}, {'name': 'muffin', 'id': 707, 'frequency': 'c', 'synset': 'muffin.n.01'}, {'name': 'mug', 'id': 708, 'frequency': 'f', 'synset': 'mug.n.04'}, {'name': 'mushroom', 'id': 709, 'frequency': 'f', 'synset': 'mushroom.n.02'}, {'name': 'music_stool', 'id': 710, 'frequency': 'r', 'synset': 'music_stool.n.01'}, {'name': 'musical_instrument', 'id': 711, 'frequency': 'c', 'synset': 'musical_instrument.n.01'}, {'name': 'nailfile', 'id': 712, 'frequency': 'r', 'synset': 'nailfile.n.01'}, {'name': 'napkin', 'id': 713, 'frequency': 'f', 'synset': 'napkin.n.01'}, {'name': 'neckerchief', 'id': 714, 'frequency': 'r', 'synset': 'neckerchief.n.01'}, {'name': 'necklace', 'id': 715, 'frequency': 'f', 'synset': 'necklace.n.01'}, {'name': 'necktie', 'id': 716, 'frequency': 'f', 'synset': 'necktie.n.01'}, {'name': 'needle', 'id': 717, 'frequency': 'c', 'synset': 'needle.n.03'}, {'name': 'nest', 'id': 718, 'frequency': 'c', 'synset': 'nest.n.01'}, {'name': 'newspaper', 'id': 719, 'frequency': 'f', 'synset': 'newspaper.n.01'}, {'name': 'newsstand', 'id': 720, 'frequency': 'c', 'synset': 'newsstand.n.01'}, {'name': 'nightshirt', 'id': 721, 'frequency': 'c', 'synset': 'nightwear.n.01'}, {'name': 'nosebag_(for_animals)', 'id': 722, 'frequency': 'r', 'synset': 'nosebag.n.01'}, {'name': 'noseband_(for_animals)', 'id': 723, 'frequency': 'c', 'synset': 'noseband.n.01'}, {'name': 'notebook', 'id': 724, 'frequency': 'f', 'synset': 'notebook.n.01'}, {'name': 'notepad', 'id': 725, 'frequency': 'c', 'synset': 'notepad.n.01'}, {'name': 'nut', 'id': 726, 'frequency': 'f', 'synset': 'nut.n.03'}, {'name': 'nutcracker', 'id': 727, 'frequency': 'r', 'synset': 'nutcracker.n.01'}, {'name': 'oar', 'id': 728, 'frequency': 'f', 'synset': 'oar.n.01'}, {'name': 'octopus_(food)', 'id': 729, 'frequency': 'r', 'synset': 'octopus.n.01'}, {'name': 'octopus_(animal)', 'id': 730, 'frequency': 'r', 'synset': 'octopus.n.02'}, {'name': 'oil_lamp', 'id': 731, 'frequency': 'c', 'synset': 'oil_lamp.n.01'}, {'name': 'olive_oil', 'id': 732, 'frequency': 'c', 'synset': 'olive_oil.n.01'}, {'name': 'omelet', 'id': 733, 'frequency': 'r', 'synset': 'omelet.n.01'}, {'name': 'onion', 'id': 734, 'frequency': 'f', 'synset': 'onion.n.01'}, {'name': 'orange_(fruit)', 'id': 735, 'frequency': 'f', 'synset': 'orange.n.01'}, {'name': 'orange_juice', 'id': 736, 'frequency': 'c', 'synset': 'orange_juice.n.01'}, {'name': 'ostrich', 'id': 737, 'frequency': 'c', 'synset': 'ostrich.n.02'}, {'name': 'ottoman', 'id': 738, 'frequency': 'f', 'synset': 'ottoman.n.03'}, {'name': 'oven', 'id': 739, 'frequency': 'f', 'synset': 'oven.n.01'}, {'name': 'overalls_(clothing)', 'id': 740, 'frequency': 'c', 'synset': 'overall.n.01'}, {'name': 'owl', 'id': 741, 'frequency': 'c', 'synset': 'owl.n.01'}, {'name': 'packet', 'id': 742, 'frequency': 'c', 'synset': 'packet.n.03'}, {'name': 'inkpad', 'id': 743, 'frequency': 'r', 'synset': 'pad.n.03'}, {'name': 'pad', 'id': 744, 'frequency': 'c', 'synset': 'pad.n.04'}, {'name': 'paddle', 'id': 745, 'frequency': 'f', 'synset': 'paddle.n.04'}, {'name': 'padlock', 'id': 746, 'frequency': 'c', 'synset': 'padlock.n.01'}, {'name': 'paintbrush', 'id': 747, 'frequency': 'c', 'synset': 'paintbrush.n.01'}, {'name': 'painting', 'id': 748, 'frequency': 'f', 'synset': 'painting.n.01'}, {'name': 'pajamas', 'id': 749, 'frequency': 'f', 'synset': 'pajama.n.02'}, {'name': 'palette', 'id': 750, 'frequency': 'c', 'synset': 'palette.n.02'}, {'name': 'pan_(for_cooking)', 'id': 751, 'frequency': 'f', 'synset': 'pan.n.01'}, {'name': 'pan_(metal_container)', 'id': 752, 'frequency': 'r', 'synset': 'pan.n.03'}, {'name': 'pancake', 'id': 753, 'frequency': 'c', 'synset': 'pancake.n.01'}, {'name': 'pantyhose', 'id': 754, 'frequency': 'r', 'synset': 'pantyhose.n.01'}, {'name': 'papaya', 'id': 755, 'frequency': 'r', 'synset': 'papaya.n.02'}, {'name': 'paper_plate', 'id': 756, 'frequency': 'f', 'synset': 'paper_plate.n.01'}, {'name': 'paper_towel', 'id': 757, 'frequency': 'f', 'synset': 'paper_towel.n.01'}, {'name': 'paperback_book', 'id': 758, 'frequency': 'r', 'synset': 'paperback_book.n.01'}, {'name': 'paperweight', 'id': 759, 'frequency': 'r', 'synset': 'paperweight.n.01'}, {'name': 'parachute', 'id': 760, 'frequency': 'c', 'synset': 'parachute.n.01'}, {'name': 'parakeet', 'id': 761, 'frequency': 'c', 'synset': 'parakeet.n.01'}, {'name': 'parasail_(sports)', 'id': 762, 'frequency': 'c', 'synset': 'parasail.n.01'}, {'name': 'parasol', 'id': 763, 'frequency': 'c', 'synset': 'parasol.n.01'}, {'name': 'parchment', 'id': 764, 'frequency': 'r', 'synset': 'parchment.n.01'}, {'name': 'parka', 'id': 765, 'frequency': 'c', 'synset': 'parka.n.01'}, {'name': 'parking_meter', 'id': 766, 'frequency': 'f', 'synset': 'parking_meter.n.01'}, {'name': 'parrot', 'id': 767, 'frequency': 'c', 'synset': 'parrot.n.01'}, {'name': 'passenger_car_(part_of_a_train)', 'id': 768, 'frequency': 'c', 'synset': 'passenger_car.n.01'}, {'name': 'passenger_ship', 'id': 769, 'frequency': 'r', 'synset': 'passenger_ship.n.01'}, {'name': 'passport', 'id': 770, 'frequency': 'c', 'synset': 'passport.n.02'}, {'name': 'pastry', 'id': 771, 'frequency': 'f', 'synset': 'pastry.n.02'}, {'name': 'patty_(food)', 'id': 772, 'frequency': 'r', 'synset': 'patty.n.01'}, {'name': 'pea_(food)', 'id': 773, 'frequency': 'c', 'synset': 'pea.n.01'}, {'name': 'peach', 'id': 774, 'frequency': 'c', 'synset': 'peach.n.03'}, {'name': 'peanut_butter', 'id': 775, 'frequency': 'c', 'synset': 'peanut_butter.n.01'}, {'name': 'pear', 'id': 776, 'frequency': 'f', 'synset': 'pear.n.01'}, {'name': 'peeler_(tool_for_fruit_and_vegetables)', 'id': 777, 'frequency': 'c', 'synset': 'peeler.n.03'}, {'name': 'wooden_leg', 'id': 778, 'frequency': 'r', 'synset': 'peg.n.04'}, {'name': 'pegboard', 'id': 779, 'frequency': 'r', 'synset': 'pegboard.n.01'}, {'name': 'pelican', 'id': 780, 'frequency': 'c', 'synset': 'pelican.n.01'}, {'name': 'pen', 'id': 781, 'frequency': 'f', 'synset': 'pen.n.01'}, {'name': 'pencil', 'id': 782, 'frequency': 'f', 'synset': 'pencil.n.01'}, {'name': 'pencil_box', 'id': 783, 'frequency': 'r', 'synset': 'pencil_box.n.01'}, {'name': 'pencil_sharpener', 'id': 784, 'frequency': 'r', 'synset': 'pencil_sharpener.n.01'}, {'name': 'pendulum', 'id': 785, 'frequency': 'r', 'synset': 'pendulum.n.01'}, {'name': 'penguin', 'id': 786, 'frequency': 'c', 'synset': 'penguin.n.01'}, {'name': 'pennant', 'id': 787, 'frequency': 'r', 'synset': 'pennant.n.02'}, {'name': 'penny_(coin)', 'id': 788, 'frequency': 'r', 'synset': 'penny.n.02'}, {'name': 'pepper', 'id': 789, 'frequency': 'f', 'synset': 'pepper.n.03'}, {'name': 'pepper_mill', 'id': 790, 'frequency': 'c', 'synset': 'pepper_mill.n.01'}, {'name': 'perfume', 'id': 791, 'frequency': 'c', 'synset': 'perfume.n.02'}, {'name': 'persimmon', 'id': 792, 'frequency': 'r', 'synset': 'persimmon.n.02'}, {'name': 'person', 'id': 793, 'frequency': 'f', 'synset': 'person.n.01'}, {'name': 'pet', 'id': 794, 'frequency': 'c', 'synset': 'pet.n.01'}, {'name': 'pew_(church_bench)', 'id': 795, 'frequency': 'c', 'synset': 'pew.n.01'}, {'name': 'phonebook', 'id': 796, 'frequency': 'r', 'synset': 'phonebook.n.01'}, {'name': 'phonograph_record', 'id': 797, 'frequency': 'c', 'synset': 'phonograph_record.n.01'}, {'name': 'piano', 'id': 798, 'frequency': 'f', 'synset': 'piano.n.01'}, {'name': 'pickle', 'id': 799, 'frequency': 'f', 'synset': 'pickle.n.01'}, {'name': 'pickup_truck', 'id': 800, 'frequency': 'f', 'synset': 'pickup.n.01'}, {'name': 'pie', 'id': 801, 'frequency': 'c', 'synset': 'pie.n.01'}, {'name': 'pigeon', 'id': 802, 'frequency': 'c', 'synset': 'pigeon.n.01'}, {'name': 'piggy_bank', 'id': 803, 'frequency': 'r', 'synset': 'piggy_bank.n.01'}, {'name': 'pillow', 'id': 804, 'frequency': 'f', 'synset': 'pillow.n.01'}, {'name': 'pin_(non_jewelry)', 'id': 805, 'frequency': 'r', 'synset': 'pin.n.09'}, {'name': 'pineapple', 'id': 806, 'frequency': 'f', 'synset': 'pineapple.n.02'}, {'name': 'pinecone', 'id': 807, 'frequency': 'c', 'synset': 'pinecone.n.01'}, {'name': 'ping-pong_ball', 'id': 808, 'frequency': 'r', 'synset': 'ping-pong_ball.n.01'}, {'name': 'pinwheel', 'id': 809, 'frequency': 'r', 'synset': 'pinwheel.n.03'}, {'name': 'tobacco_pipe', 'id': 810, 'frequency': 'r', 'synset': 'pipe.n.01'}, {'name': 'pipe', 'id': 811, 'frequency': 'f', 'synset': 'pipe.n.02'}, {'name': 'pistol', 'id': 812, 'frequency': 'r', 'synset': 'pistol.n.01'}, {'name': 'pita_(bread)', 'id': 813, 'frequency': 'c', 'synset': 'pita.n.01'}, {'name': 'pitcher_(vessel_for_liquid)', 'id': 814, 'frequency': 'f', 'synset': 'pitcher.n.02'}, {'name': 'pitchfork', 'id': 815, 'frequency': 'r', 'synset': 'pitchfork.n.01'}, {'name': 'pizza', 'id': 816, 'frequency': 'f', 'synset': 'pizza.n.01'}, {'name': 'place_mat', 'id': 817, 'frequency': 'f', 'synset': 'place_mat.n.01'}, {'name': 'plate', 'id': 818, 'frequency': 'f', 'synset': 'plate.n.04'}, {'name': 'platter', 'id': 819, 'frequency': 'c', 'synset': 'platter.n.01'}, {'name': 'playpen', 'id': 820, 'frequency': 'r', 'synset': 'playpen.n.01'}, {'name': 'pliers', 'id': 821, 'frequency': 'c', 'synset': 'pliers.n.01'}, {'name': 'plow_(farm_equipment)', 'id': 822, 'frequency': 'r', 'synset': 'plow.n.01'}, {'name': 'plume', 'id': 823, 'frequency': 'r', 'synset': 'plume.n.02'}, {'name': 'pocket_watch', 'id': 824, 'frequency': 'r', 'synset': 'pocket_watch.n.01'}, {'name': 'pocketknife', 'id': 825, 'frequency': 'c', 'synset': 'pocketknife.n.01'}, {'name': 'poker_(fire_stirring_tool)', 'id': 826, 'frequency': 'c', 'synset': 'poker.n.01'}, {'name': 'pole', 'id': 827, 'frequency': 'f', 'synset': 'pole.n.01'}, {'name': 'polo_shirt', 'id': 828, 'frequency': 'f', 'synset': 'polo_shirt.n.01'}, {'name': 'poncho', 'id': 829, 'frequency': 'r', 'synset': 'poncho.n.01'}, {'name': 'pony', 'id': 830, 'frequency': 'c', 'synset': 'pony.n.05'}, {'name': 'pool_table', 'id': 831, 'frequency': 'r', 'synset': 'pool_table.n.01'}, {'name': 'pop_(soda)', 'id': 832, 'frequency': 'f', 'synset': 'pop.n.02'}, {'name': 'postbox_(public)', 'id': 833, 'frequency': 'c', 'synset': 'postbox.n.01'}, {'name': 'postcard', 'id': 834, 'frequency': 'c', 'synset': 'postcard.n.01'}, {'name': 'poster', 'id': 835, 'frequency': 'f', 'synset': 'poster.n.01'}, {'name': 'pot', 'id': 836, 'frequency': 'f', 'synset': 'pot.n.01'}, {'name': 'flowerpot', 'id': 837, 'frequency': 'f', 'synset': 'pot.n.04'}, {'name': 'potato', 'id': 838, 'frequency': 'f', 'synset': 'potato.n.01'}, {'name': 'potholder', 'id': 839, 'frequency': 'c', 'synset': 'potholder.n.01'}, {'name': 'pottery', 'id': 840, 'frequency': 'c', 'synset': 'pottery.n.01'}, {'name': 'pouch', 'id': 841, 'frequency': 'c', 'synset': 'pouch.n.01'}, {'name': 'power_shovel', 'id': 842, 'frequency': 'c', 'synset': 'power_shovel.n.01'}, {'name': 'prawn', 'id': 843, 'frequency': 'c', 'synset': 'prawn.n.01'}, {'name': 'pretzel', 'id': 844, 'frequency': 'c', 'synset': 'pretzel.n.01'}, {'name': 'printer', 'id': 845, 'frequency': 'f', 'synset': 'printer.n.03'}, {'name': 'projectile_(weapon)', 'id': 846, 'frequency': 'c', 'synset': 'projectile.n.01'}, {'name': 'projector', 'id': 847, 'frequency': 'c', 'synset': 'projector.n.02'}, {'name': 'propeller', 'id': 848, 'frequency': 'f', 'synset': 'propeller.n.01'}, {'name': 'prune', 'id': 849, 'frequency': 'r', 'synset': 'prune.n.01'}, {'name': 'pudding', 'id': 850, 'frequency': 'r', 'synset': 'pudding.n.01'}, {'name': 'puffer_(fish)', 'id': 851, 'frequency': 'r', 'synset': 'puffer.n.02'}, {'name': 'puffin', 'id': 852, 'frequency': 'r', 'synset': 'puffin.n.01'}, {'name': 'pug-dog', 'id': 853, 'frequency': 'r', 'synset': 'pug.n.01'}, {'name': 'pumpkin', 'id': 854, 'frequency': 'c', 'synset': 'pumpkin.n.02'}, {'name': 'puncher', 'id': 855, 'frequency': 'r', 'synset': 'punch.n.03'}, {'name': 'puppet', 'id': 856, 'frequency': 'r', 'synset': 'puppet.n.01'}, {'name': 'puppy', 'id': 857, 'frequency': 'c', 'synset': 'puppy.n.01'}, {'name': 'quesadilla', 'id': 858, 'frequency': 'r', 'synset': 'quesadilla.n.01'}, {'name': 'quiche', 'id': 859, 'frequency': 'r', 'synset': 'quiche.n.02'}, {'name': 'quilt', 'id': 860, 'frequency': 'f', 'synset': 'quilt.n.01'}, {'name': 'rabbit', 'id': 861, 'frequency': 'c', 'synset': 'rabbit.n.01'}, {'name': 'race_car', 'id': 862, 'frequency': 'r', 'synset': 'racer.n.02'}, {'name': 'racket', 'id': 863, 'frequency': 'c', 'synset': 'racket.n.04'}, {'name': 'radar', 'id': 864, 'frequency': 'r', 'synset': 'radar.n.01'}, {'name': 'radiator', 'id': 865, 'frequency': 'f', 'synset': 'radiator.n.03'}, {'name': 'radio_receiver', 'id': 866, 'frequency': 'c', 'synset': 'radio_receiver.n.01'}, {'name': 'radish', 'id': 867, 'frequency': 'c', 'synset': 'radish.n.03'}, {'name': 'raft', 'id': 868, 'frequency': 'c', 'synset': 'raft.n.01'}, {'name': 'rag_doll', 'id': 869, 'frequency': 'r', 'synset': 'rag_doll.n.01'}, {'name': 'raincoat', 'id': 870, 'frequency': 'c', 'synset': 'raincoat.n.01'}, {'name': 'ram_(animal)', 'id': 871, 'frequency': 'c', 'synset': 'ram.n.05'}, {'name': 'raspberry', 'id': 872, 'frequency': 'c', 'synset': 'raspberry.n.02'}, {'name': 'rat', 'id': 873, 'frequency': 'r', 'synset': 'rat.n.01'}, {'name': 'razorblade', 'id': 874, 'frequency': 'c', 'synset': 'razorblade.n.01'}, {'name': 'reamer_(juicer)', 'id': 875, 'frequency': 'c', 'synset': 'reamer.n.01'}, {'name': 'rearview_mirror', 'id': 876, 'frequency': 'f', 'synset': 'rearview_mirror.n.01'}, {'name': 'receipt', 'id': 877, 'frequency': 'c', 'synset': 'receipt.n.02'}, {'name': 'recliner', 'id': 878, 'frequency': 'c', 'synset': 'recliner.n.01'}, {'name': 'record_player', 'id': 879, 'frequency': 'c', 'synset': 'record_player.n.01'}, {'name': 'reflector', 'id': 880, 'frequency': 'f', 'synset': 'reflector.n.01'}, {'name': 'remote_control', 'id': 881, 'frequency': 'f', 'synset': 'remote_control.n.01'}, {'name': 'rhinoceros', 'id': 882, 'frequency': 'c', 'synset': 'rhinoceros.n.01'}, {'name': 'rib_(food)', 'id': 883, 'frequency': 'r', 'synset': 'rib.n.03'}, {'name': 'rifle', 'id': 884, 'frequency': 'c', 'synset': 'rifle.n.01'}, {'name': 'ring', 'id': 885, 'frequency': 'f', 'synset': 'ring.n.08'}, {'name': 'river_boat', 'id': 886, 'frequency': 'r', 'synset': 'river_boat.n.01'}, {'name': 'road_map', 'id': 887, 'frequency': 'r', 'synset': 'road_map.n.02'}, {'name': 'robe', 'id': 888, 'frequency': 'c', 'synset': 'robe.n.01'}, {'name': 'rocking_chair', 'id': 889, 'frequency': 'c', 'synset': 'rocking_chair.n.01'}, {'name': 'rodent', 'id': 890, 'frequency': 'r', 'synset': 'rodent.n.01'}, {'name': 'roller_skate', 'id': 891, 'frequency': 'r', 'synset': 'roller_skate.n.01'}, {'name': 'Rollerblade', 'id': 892, 'frequency': 'r', 'synset': 'rollerblade.n.01'}, {'name': 'rolling_pin', 'id': 893, 'frequency': 'c', 'synset': 'rolling_pin.n.01'}, {'name': 'root_beer', 'id': 894, 'frequency': 'r', 'synset': 'root_beer.n.01'}, {'name': 'router_(computer_equipment)', 'id': 895, 'frequency': 'c', 'synset': 'router.n.02'}, {'name': 'rubber_band', 'id': 896, 'frequency': 'f', 'synset': 'rubber_band.n.01'}, {'name': 'runner_(carpet)', 'id': 897, 'frequency': 'c', 'synset': 'runner.n.08'}, {'name': 'plastic_bag', 'id': 898, 'frequency': 'f', 'synset': 'sack.n.01'}, {'name': 'saddle_(on_an_animal)', 'id': 899, 'frequency': 'f', 'synset': 'saddle.n.01'}, {'name': 'saddle_blanket', 'id': 900, 'frequency': 'f', 'synset': 'saddle_blanket.n.01'}, {'name': 'saddlebag', 'id': 901, 'frequency': 'c', 'synset': 'saddlebag.n.01'}, {'name': 'safety_pin', 'id': 902, 'frequency': 'r', 'synset': 'safety_pin.n.01'}, {'name': 'sail', 'id': 903, 'frequency': 'f', 'synset': 'sail.n.01'}, {'name': 'salad', 'id': 904, 'frequency': 'f', 'synset': 'salad.n.01'}, {'name': 'salad_plate', 'id': 905, 'frequency': 'r', 'synset': 'salad_plate.n.01'}, {'name': 'salami', 'id': 906, 'frequency': 'c', 'synset': 'salami.n.01'}, {'name': 'salmon_(fish)', 'id': 907, 'frequency': 'c', 'synset': 'salmon.n.01'}, {'name': 'salmon_(food)', 'id': 908, 'frequency': 'r', 'synset': 'salmon.n.03'}, {'name': 'salsa', 'id': 909, 'frequency': 'c', 'synset': 'salsa.n.01'}, {'name': 'saltshaker', 'id': 910, 'frequency': 'f', 'synset': 'saltshaker.n.01'}, {'name': 'sandal_(type_of_shoe)', 'id': 911, 'frequency': 'f', 'synset': 'sandal.n.01'}, {'name': 'sandwich', 'id': 912, 'frequency': 'f', 'synset': 'sandwich.n.01'}, {'name': 'satchel', 'id': 913, 'frequency': 'r', 'synset': 'satchel.n.01'}, {'name': 'saucepan', 'id': 914, 'frequency': 'r', 'synset': 'saucepan.n.01'}, {'name': 'saucer', 'id': 915, 'frequency': 'f', 'synset': 'saucer.n.02'}, {'name': 'sausage', 'id': 916, 'frequency': 'f', 'synset': 'sausage.n.01'}, {'name': 'sawhorse', 'id': 917, 'frequency': 'r', 'synset': 'sawhorse.n.01'}, {'name': 'saxophone', 'id': 918, 'frequency': 'r', 'synset': 'sax.n.02'}, {'name': 'scale_(measuring_instrument)', 'id': 919, 'frequency': 'f', 'synset': 'scale.n.07'}, {'name': 'scarecrow', 'id': 920, 'frequency': 'r', 'synset': 'scarecrow.n.01'}, {'name': 'scarf', 'id': 921, 'frequency': 'f', 'synset': 'scarf.n.01'}, {'name': 'school_bus', 'id': 922, 'frequency': 'c', 'synset': 'school_bus.n.01'}, {'name': 'scissors', 'id': 923, 'frequency': 'f', 'synset': 'scissors.n.01'}, {'name': 'scoreboard', 'id': 924, 'frequency': 'f', 'synset': 'scoreboard.n.01'}, {'name': 'scraper', 'id': 925, 'frequency': 'r', 'synset': 'scraper.n.01'}, {'name': 'screwdriver', 'id': 926, 'frequency': 'c', 'synset': 'screwdriver.n.01'}, {'name': 'scrubbing_brush', 'id': 927, 'frequency': 'f', 'synset': 'scrub_brush.n.01'}, {'name': 'sculpture', 'id': 928, 'frequency': 'c', 'synset': 'sculpture.n.01'}, {'name': 'seabird', 'id': 929, 'frequency': 'c', 'synset': 'seabird.n.01'}, {'name': 'seahorse', 'id': 930, 'frequency': 'c', 'synset': 'seahorse.n.02'}, {'name': 'seaplane', 'id': 931, 'frequency': 'r', 'synset': 'seaplane.n.01'}, {'name': 'seashell', 'id': 932, 'frequency': 'c', 'synset': 'seashell.n.01'}, {'name': 'sewing_machine', 'id': 933, 'frequency': 'c', 'synset': 'sewing_machine.n.01'}, {'name': 'shaker', 'id': 934, 'frequency': 'c', 'synset': 'shaker.n.03'}, {'name': 'shampoo', 'id': 935, 'frequency': 'c', 'synset': 'shampoo.n.01'}, {'name': 'shark', 'id': 936, 'frequency': 'c', 'synset': 'shark.n.01'}, {'name': 'sharpener', 'id': 937, 'frequency': 'r', 'synset': 'sharpener.n.01'}, {'name': 'Sharpie', 'id': 938, 'frequency': 'r', 'synset': 'sharpie.n.03'}, {'name': 'shaver_(electric)', 'id': 939, 'frequency': 'r', 'synset': 'shaver.n.03'}, {'name': 'shaving_cream', 'id': 940, 'frequency': 'c', 'synset': 'shaving_cream.n.01'}, {'name': 'shawl', 'id': 941, 'frequency': 'r', 'synset': 'shawl.n.01'}, {'name': 'shears', 'id': 942, 'frequency': 'r', 'synset': 'shears.n.01'}, {'name': 'sheep', 'id': 943, 'frequency': 'f', 'synset': 'sheep.n.01'}, {'name': 'shepherd_dog', 'id': 944, 'frequency': 'r', 'synset': 'shepherd_dog.n.01'}, {'name': 'sherbert', 'id': 945, 'frequency': 'r', 'synset': 'sherbert.n.01'}, {'name': 'shield', 'id': 946, 'frequency': 'c', 'synset': 'shield.n.02'}, {'name': 'shirt', 'id': 947, 'frequency': 'f', 'synset': 'shirt.n.01'}, {'name': 'shoe', 'id': 948, 'frequency': 'f', 'synset': 'shoe.n.01'}, {'name': 'shopping_bag', 'id': 949, 'frequency': 'f', 'synset': 'shopping_bag.n.01'}, {'name': 'shopping_cart', 'id': 950, 'frequency': 'c', 'synset': 'shopping_cart.n.01'}, {'name': 'short_pants', 'id': 951, 'frequency': 'f', 'synset': 'short_pants.n.01'}, {'name': 'shot_glass', 'id': 952, 'frequency': 'r', 'synset': 'shot_glass.n.01'}, {'name': 'shoulder_bag', 'id': 953, 'frequency': 'f', 'synset': 'shoulder_bag.n.01'}, {'name': 'shovel', 'id': 954, 'frequency': 'c', 'synset': 'shovel.n.01'}, {'name': 'shower_head', 'id': 955, 'frequency': 'f', 'synset': 'shower.n.01'}, {'name': 'shower_cap', 'id': 956, 'frequency': 'r', 'synset': 'shower_cap.n.01'}, {'name': 'shower_curtain', 'id': 957, 'frequency': 'f', 'synset': 'shower_curtain.n.01'}, {'name': 'shredder_(for_paper)', 'id': 958, 'frequency': 'r', 'synset': 'shredder.n.01'}, {'name': 'signboard', 'id': 959, 'frequency': 'f', 'synset': 'signboard.n.01'}, {'name': 'silo', 'id': 960, 'frequency': 'c', 'synset': 'silo.n.01'}, {'name': 'sink', 'id': 961, 'frequency': 'f', 'synset': 'sink.n.01'}, {'name': 'skateboard', 'id': 962, 'frequency': 'f', 'synset': 'skateboard.n.01'}, {'name': 'skewer', 'id': 963, 'frequency': 'c', 'synset': 'skewer.n.01'}, {'name': 'ski', 'id': 964, 'frequency': 'f', 'synset': 'ski.n.01'}, {'name': 'ski_boot', 'id': 965, 'frequency': 'f', 'synset': 'ski_boot.n.01'}, {'name': 'ski_parka', 'id': 966, 'frequency': 'f', 'synset': 'ski_parka.n.01'}, {'name': 'ski_pole', 'id': 967, 'frequency': 'f', 'synset': 'ski_pole.n.01'}, {'name': 'skirt', 'id': 968, 'frequency': 'f', 'synset': 'skirt.n.02'}, {'name': 'skullcap', 'id': 969, 'frequency': 'r', 'synset': 'skullcap.n.01'}, {'name': 'sled', 'id': 970, 'frequency': 'c', 'synset': 'sled.n.01'}, {'name': 'sleeping_bag', 'id': 971, 'frequency': 'c', 'synset': 'sleeping_bag.n.01'}, {'name': 'sling_(bandage)', 'id': 972, 'frequency': 'r', 'synset': 'sling.n.05'}, {'name': 'slipper_(footwear)', 'id': 973, 'frequency': 'c', 'synset': 'slipper.n.01'}, {'name': 'smoothie', 'id': 974, 'frequency': 'r', 'synset': 'smoothie.n.02'}, {'name': 'snake', 'id': 975, 'frequency': 'r', 'synset': 'snake.n.01'}, {'name': 'snowboard', 'id': 976, 'frequency': 'f', 'synset': 'snowboard.n.01'}, {'name': 'snowman', 'id': 977, 'frequency': 'c', 'synset': 'snowman.n.01'}, {'name': 'snowmobile', 'id': 978, 'frequency': 'c', 'synset': 'snowmobile.n.01'}, {'name': 'soap', 'id': 979, 'frequency': 'f', 'synset': 'soap.n.01'}, {'name': 'soccer_ball', 'id': 980, 'frequency': 'f', 'synset': 'soccer_ball.n.01'}, {'name': 'sock', 'id': 981, 'frequency': 'f', 'synset': 'sock.n.01'}, {'name': 'sofa', 'id': 982, 'frequency': 'f', 'synset': 'sofa.n.01'}, {'name': 'softball', 'id': 983, 'frequency': 'r', 'synset': 'softball.n.01'}, {'name': 'solar_array', 'id': 984, 'frequency': 'c', 'synset': 'solar_array.n.01'}, {'name': 'sombrero', 'id': 985, 'frequency': 'r', 'synset': 'sombrero.n.02'}, {'name': 'soup', 'id': 986, 'frequency': 'f', 'synset': 'soup.n.01'}, {'name': 'soup_bowl', 'id': 987, 'frequency': 'r', 'synset': 'soup_bowl.n.01'}, {'name': 'soupspoon', 'id': 988, 'frequency': 'c', 'synset': 'soupspoon.n.01'}, {'name': 'sour_cream', 'id': 989, 'frequency': 'c', 'synset': 'sour_cream.n.01'}, {'name': 'soya_milk', 'id': 990, 'frequency': 'r', 'synset': 'soya_milk.n.01'}, {'name': 'space_shuttle', 'id': 991, 'frequency': 'r', 'synset': 'space_shuttle.n.01'}, {'name': 'sparkler_(fireworks)', 'id': 992, 'frequency': 'r', 'synset': 'sparkler.n.02'}, {'name': 'spatula', 'id': 993, 'frequency': 'f', 'synset': 'spatula.n.02'}, {'name': 'spear', 'id': 994, 'frequency': 'r', 'synset': 'spear.n.01'}, {'name': 'spectacles', 'id': 995, 'frequency': 'f', 'synset': 'spectacles.n.01'}, {'name': 'spice_rack', 'id': 996, 'frequency': 'c', 'synset': 'spice_rack.n.01'}, {'name': 'spider', 'id': 997, 'frequency': 'c', 'synset': 'spider.n.01'}, {'name': 'crawfish', 'id': 998, 'frequency': 'r', 'synset': 'spiny_lobster.n.02'}, {'name': 'sponge', 'id': 999, 'frequency': 'c', 'synset': 'sponge.n.01'}, {'name': 'spoon', 'id': 1000, 'frequency': 'f', 'synset': 'spoon.n.01'}, {'name': 'sportswear', 'id': 1001, 'frequency': 'c', 'synset': 'sportswear.n.01'}, {'name': 'spotlight', 'id': 1002, 'frequency': 'c', 'synset': 'spotlight.n.02'}, {'name': 'squid_(food)', 'id': 1003, 'frequency': 'r', 'synset': 'squid.n.01'}, {'name': 'squirrel', 'id': 1004, 'frequency': 'c', 'synset': 'squirrel.n.01'}, {'name': 'stagecoach', 'id': 1005, 'frequency': 'r', 'synset': 'stagecoach.n.01'}, {'name': 'stapler_(stapling_machine)', 'id': 1006, 'frequency': 'c', 'synset': 'stapler.n.01'}, {'name': 'starfish', 'id': 1007, 'frequency': 'c', 'synset': 'starfish.n.01'}, {'name': 'statue_(sculpture)', 'id': 1008, 'frequency': 'f', 'synset': 'statue.n.01'}, {'name': 'steak_(food)', 'id': 1009, 'frequency': 'c', 'synset': 'steak.n.01'}, {'name': 'steak_knife', 'id': 1010, 'frequency': 'r', 'synset': 'steak_knife.n.01'}, {'name': 'steering_wheel', 'id': 1011, 'frequency': 'f', 'synset': 'steering_wheel.n.01'}, {'name': 'stepladder', 'id': 1012, 'frequency': 'r', 'synset': 'step_ladder.n.01'}, {'name': 'step_stool', 'id': 1013, 'frequency': 'c', 'synset': 'step_stool.n.01'}, {'name': 'stereo_(sound_system)', 'id': 1014, 'frequency': 'c', 'synset': 'stereo.n.01'}, {'name': 'stew', 'id': 1015, 'frequency': 'r', 'synset': 'stew.n.02'}, {'name': 'stirrer', 'id': 1016, 'frequency': 'r', 'synset': 'stirrer.n.02'}, {'name': 'stirrup', 'id': 1017, 'frequency': 'f', 'synset': 'stirrup.n.01'}, {'name': 'stool', 'id': 1018, 'frequency': 'f', 'synset': 'stool.n.01'}, {'name': 'stop_sign', 'id': 1019, 'frequency': 'f', 'synset': 'stop_sign.n.01'}, {'name': 'brake_light', 'id': 1020, 'frequency': 'f', 'synset': 'stoplight.n.01'}, {'name': 'stove', 'id': 1021, 'frequency': 'f', 'synset': 'stove.n.01'}, {'name': 'strainer', 'id': 1022, 'frequency': 'c', 'synset': 'strainer.n.01'}, {'name': 'strap', 'id': 1023, 'frequency': 'f', 'synset': 'strap.n.01'}, {'name': 'straw_(for_drinking)', 'id': 1024, 'frequency': 'f', 'synset': 'straw.n.04'}, {'name': 'strawberry', 'id': 1025, 'frequency': 'f', 'synset': 'strawberry.n.01'}, {'name': 'street_sign', 'id': 1026, 'frequency': 'f', 'synset': 'street_sign.n.01'}, {'name': 'streetlight', 'id': 1027, 'frequency': 'f', 'synset': 'streetlight.n.01'}, {'name': 'string_cheese', 'id': 1028, 'frequency': 'r', 'synset': 'string_cheese.n.01'}, {'name': 'stylus', 'id': 1029, 'frequency': 'r', 'synset': 'stylus.n.02'}, {'name': 'subwoofer', 'id': 1030, 'frequency': 'r', 'synset': 'subwoofer.n.01'}, {'name': 'sugar_bowl', 'id': 1031, 'frequency': 'r', 'synset': 'sugar_bowl.n.01'}, {'name': 'sugarcane_(plant)', 'id': 1032, 'frequency': 'r', 'synset': 'sugarcane.n.01'}, {'name': 'suit_(clothing)', 'id': 1033, 'frequency': 'f', 'synset': 'suit.n.01'}, {'name': 'sunflower', 'id': 1034, 'frequency': 'c', 'synset': 'sunflower.n.01'}, {'name': 'sunglasses', 'id': 1035, 'frequency': 'f', 'synset': 'sunglasses.n.01'}, {'name': 'sunhat', 'id': 1036, 'frequency': 'c', 'synset': 'sunhat.n.01'}, {'name': 'surfboard', 'id': 1037, 'frequency': 'f', 'synset': 'surfboard.n.01'}, {'name': 'sushi', 'id': 1038, 'frequency': 'c', 'synset': 'sushi.n.01'}, {'name': 'mop', 'id': 1039, 'frequency': 'c', 'synset': 'swab.n.02'}, {'name': 'sweat_pants', 'id': 1040, 'frequency': 'c', 'synset': 'sweat_pants.n.01'}, {'name': 'sweatband', 'id': 1041, 'frequency': 'c', 'synset': 'sweatband.n.02'}, {'name': 'sweater', 'id': 1042, 'frequency': 'f', 'synset': 'sweater.n.01'}, {'name': 'sweatshirt', 'id': 1043, 'frequency': 'f', 'synset': 'sweatshirt.n.01'}, {'name': 'sweet_potato', 'id': 1044, 'frequency': 'c', 'synset': 'sweet_potato.n.02'}, {'name': 'swimsuit', 'id': 1045, 'frequency': 'f', 'synset': 'swimsuit.n.01'}, {'name': 'sword', 'id': 1046, 'frequency': 'c', 'synset': 'sword.n.01'}, {'name': 'syringe', 'id': 1047, 'frequency': 'r', 'synset': 'syringe.n.01'}, {'name': 'Tabasco_sauce', 'id': 1048, 'frequency': 'r', 'synset': 'tabasco.n.02'}, {'name': 'table-tennis_table', 'id': 1049, 'frequency': 'r', 'synset': 'table-tennis_table.n.01'}, {'name': 'table', 'id': 1050, 'frequency': 'f', 'synset': 'table.n.02'}, {'name': 'table_lamp', 'id': 1051, 'frequency': 'c', 'synset': 'table_lamp.n.01'}, {'name': 'tablecloth', 'id': 1052, 'frequency': 'f', 'synset': 'tablecloth.n.01'}, {'name': 'tachometer', 'id': 1053, 'frequency': 'r', 'synset': 'tachometer.n.01'}, {'name': 'taco', 'id': 1054, 'frequency': 'r', 'synset': 'taco.n.02'}, {'name': 'tag', 'id': 1055, 'frequency': 'f', 'synset': 'tag.n.02'}, {'name': 'taillight', 'id': 1056, 'frequency': 'f', 'synset': 'taillight.n.01'}, {'name': 'tambourine', 'id': 1057, 'frequency': 'r', 'synset': 'tambourine.n.01'}, {'name': 'army_tank', 'id': 1058, 'frequency': 'r', 'synset': 'tank.n.01'}, {'name': 'tank_(storage_vessel)', 'id': 1059, 'frequency': 'f', 'synset': 'tank.n.02'}, {'name': 'tank_top_(clothing)', 'id': 1060, 'frequency': 'f', 'synset': 'tank_top.n.01'}, {'name': 'tape_(sticky_cloth_or_paper)', 'id': 1061, 'frequency': 'f', 'synset': 'tape.n.01'}, {'name': 'tape_measure', 'id': 1062, 'frequency': 'c', 'synset': 'tape.n.04'}, {'name': 'tapestry', 'id': 1063, 'frequency': 'c', 'synset': 'tapestry.n.02'}, {'name': 'tarp', 'id': 1064, 'frequency': 'f', 'synset': 'tarpaulin.n.01'}, {'name': 'tartan', 'id': 1065, 'frequency': 'c', 'synset': 'tartan.n.01'}, {'name': 'tassel', 'id': 1066, 'frequency': 'c', 'synset': 'tassel.n.01'}, {'name': 'tea_bag', 'id': 1067, 'frequency': 'c', 'synset': 'tea_bag.n.01'}, {'name': 'teacup', 'id': 1068, 'frequency': 'c', 'synset': 'teacup.n.02'}, {'name': 'teakettle', 'id': 1069, 'frequency': 'c', 'synset': 'teakettle.n.01'}, {'name': 'teapot', 'id': 1070, 'frequency': 'f', 'synset': 'teapot.n.01'}, {'name': 'teddy_bear', 'id': 1071, 'frequency': 'f', 'synset': 'teddy.n.01'}, {'name': 'telephone', 'id': 1072, 'frequency': 'f', 'synset': 'telephone.n.01'}, {'name': 'telephone_booth', 'id': 1073, 'frequency': 'c', 'synset': 'telephone_booth.n.01'}, {'name': 'telephone_pole', 'id': 1074, 'frequency': 'f', 'synset': 'telephone_pole.n.01'}, {'name': 'telephoto_lens', 'id': 1075, 'frequency': 'r', 'synset': 'telephoto_lens.n.01'}, {'name': 'television_camera', 'id': 1076, 'frequency': 'c', 'synset': 'television_camera.n.01'}, {'name': 'television_set', 'id': 1077, 'frequency': 'f', 'synset': 'television_receiver.n.01'}, {'name': 'tennis_ball', 'id': 1078, 'frequency': 'f', 'synset': 'tennis_ball.n.01'}, {'name': 'tennis_racket', 'id': 1079, 'frequency': 'f', 'synset': 'tennis_racket.n.01'}, {'name': 'tequila', 'id': 1080, 'frequency': 'r', 'synset': 'tequila.n.01'}, {'name': 'thermometer', 'id': 1081, 'frequency': 'c', 'synset': 'thermometer.n.01'}, {'name': 'thermos_bottle', 'id': 1082, 'frequency': 'c', 'synset': 'thermos.n.01'}, {'name': 'thermostat', 'id': 1083, 'frequency': 'f', 'synset': 'thermostat.n.01'}, {'name': 'thimble', 'id': 1084, 'frequency': 'r', 'synset': 'thimble.n.02'}, {'name': 'thread', 'id': 1085, 'frequency': 'c', 'synset': 'thread.n.01'}, {'name': 'thumbtack', 'id': 1086, 'frequency': 'c', 'synset': 'thumbtack.n.01'}, {'name': 'tiara', 'id': 1087, 'frequency': 'c', 'synset': 'tiara.n.01'}, {'name': 'tiger', 'id': 1088, 'frequency': 'c', 'synset': 'tiger.n.02'}, {'name': 'tights_(clothing)', 'id': 1089, 'frequency': 'c', 'synset': 'tights.n.01'}, {'name': 'timer', 'id': 1090, 'frequency': 'c', 'synset': 'timer.n.01'}, {'name': 'tinfoil', 'id': 1091, 'frequency': 'f', 'synset': 'tinfoil.n.01'}, {'name': 'tinsel', 'id': 1092, 'frequency': 'c', 'synset': 'tinsel.n.01'}, {'name': 'tissue_paper', 'id': 1093, 'frequency': 'f', 'synset': 'tissue.n.02'}, {'name': 'toast_(food)', 'id': 1094, 'frequency': 'c', 'synset': 'toast.n.01'}, {'name': 'toaster', 'id': 1095, 'frequency': 'f', 'synset': 'toaster.n.02'}, {'name': 'toaster_oven', 'id': 1096, 'frequency': 'f', 'synset': 'toaster_oven.n.01'}, {'name': 'toilet', 'id': 1097, 'frequency': 'f', 'synset': 'toilet.n.02'}, {'name': 'toilet_tissue', 'id': 1098, 'frequency': 'f', 'synset': 'toilet_tissue.n.01'}, {'name': 'tomato', 'id': 1099, 'frequency': 'f', 'synset': 'tomato.n.01'}, {'name': 'tongs', 'id': 1100, 'frequency': 'f', 'synset': 'tongs.n.01'}, {'name': 'toolbox', 'id': 1101, 'frequency': 'c', 'synset': 'toolbox.n.01'}, {'name': 'toothbrush', 'id': 1102, 'frequency': 'f', 'synset': 'toothbrush.n.01'}, {'name': 'toothpaste', 'id': 1103, 'frequency': 'f', 'synset': 'toothpaste.n.01'}, {'name': 'toothpick', 'id': 1104, 'frequency': 'f', 'synset': 'toothpick.n.01'}, {'name': 'cover', 'id': 1105, 'frequency': 'f', 'synset': 'top.n.09'}, {'name': 'tortilla', 'id': 1106, 'frequency': 'c', 'synset': 'tortilla.n.01'}, {'name': 'tow_truck', 'id': 1107, 'frequency': 'c', 'synset': 'tow_truck.n.01'}, {'name': 'towel', 'id': 1108, 'frequency': 'f', 'synset': 'towel.n.01'}, {'name': 'towel_rack', 'id': 1109, 'frequency': 'f', 'synset': 'towel_rack.n.01'}, {'name': 'toy', 'id': 1110, 'frequency': 'f', 'synset': 'toy.n.03'}, {'name': 'tractor_(farm_equipment)', 'id': 1111, 'frequency': 'c', 'synset': 'tractor.n.01'}, {'name': 'traffic_light', 'id': 1112, 'frequency': 'f', 'synset': 'traffic_light.n.01'}, {'name': 'dirt_bike', 'id': 1113, 'frequency': 'c', 'synset': 'trail_bike.n.01'}, {'name': 'trailer_truck', 'id': 1114, 'frequency': 'f', 'synset': 'trailer_truck.n.01'}, {'name': 'train_(railroad_vehicle)', 'id': 1115, 'frequency': 'f', 'synset': 'train.n.01'}, {'name': 'trampoline', 'id': 1116, 'frequency': 'r', 'synset': 'trampoline.n.01'}, {'name': 'tray', 'id': 1117, 'frequency': 'f', 'synset': 'tray.n.01'}, {'name': 'trench_coat', 'id': 1118, 'frequency': 'r', 'synset': 'trench_coat.n.01'}, {'name': 'triangle_(musical_instrument)', 'id': 1119, 'frequency': 'r', 'synset': 'triangle.n.05'}, {'name': 'tricycle', 'id': 1120, 'frequency': 'c', 'synset': 'tricycle.n.01'}, {'name': 'tripod', 'id': 1121, 'frequency': 'f', 'synset': 'tripod.n.01'}, {'name': 'trousers', 'id': 1122, 'frequency': 'f', 'synset': 'trouser.n.01'}, {'name': 'truck', 'id': 1123, 'frequency': 'f', 'synset': 'truck.n.01'}, {'name': 'truffle_(chocolate)', 'id': 1124, 'frequency': 'r', 'synset': 'truffle.n.03'}, {'name': 'trunk', 'id': 1125, 'frequency': 'c', 'synset': 'trunk.n.02'}, {'name': 'vat', 'id': 1126, 'frequency': 'r', 'synset': 'tub.n.02'}, {'name': 'turban', 'id': 1127, 'frequency': 'c', 'synset': 'turban.n.01'}, {'name': 'turkey_(food)', 'id': 1128, 'frequency': 'c', 'synset': 'turkey.n.04'}, {'name': 'turnip', 'id': 1129, 'frequency': 'r', 'synset': 'turnip.n.01'}, {'name': 'turtle', 'id': 1130, 'frequency': 'c', 'synset': 'turtle.n.02'}, {'name': 'turtleneck_(clothing)', 'id': 1131, 'frequency': 'c', 'synset': 'turtleneck.n.01'}, {'name': 'typewriter', 'id': 1132, 'frequency': 'c', 'synset': 'typewriter.n.01'}, {'name': 'umbrella', 'id': 1133, 'frequency': 'f', 'synset': 'umbrella.n.01'}, {'name': 'underwear', 'id': 1134, 'frequency': 'f', 'synset': 'underwear.n.01'}, {'name': 'unicycle', 'id': 1135, 'frequency': 'r', 'synset': 'unicycle.n.01'}, {'name': 'urinal', 'id': 1136, 'frequency': 'f', 'synset': 'urinal.n.01'}, {'name': 'urn', 'id': 1137, 'frequency': 'c', 'synset': 'urn.n.01'}, {'name': 'vacuum_cleaner', 'id': 1138, 'frequency': 'c', 'synset': 'vacuum.n.04'}, {'name': 'vase', 'id': 1139, 'frequency': 'f', 'synset': 'vase.n.01'}, {'name': 'vending_machine', 'id': 1140, 'frequency': 'c', 'synset': 'vending_machine.n.01'}, {'name': 'vent', 'id': 1141, 'frequency': 'f', 'synset': 'vent.n.01'}, {'name': 'vest', 'id': 1142, 'frequency': 'f', 'synset': 'vest.n.01'}, {'name': 'videotape', 'id': 1143, 'frequency': 'c', 'synset': 'videotape.n.01'}, {'name': 'vinegar', 'id': 1144, 'frequency': 'r', 'synset': 'vinegar.n.01'}, {'name': 'violin', 'id': 1145, 'frequency': 'r', 'synset': 'violin.n.01'}, {'name': 'vodka', 'id': 1146, 'frequency': 'r', 'synset': 'vodka.n.01'}, {'name': 'volleyball', 'id': 1147, 'frequency': 'c', 'synset': 'volleyball.n.02'}, {'name': 'vulture', 'id': 1148, 'frequency': 'r', 'synset': 'vulture.n.01'}, {'name': 'waffle', 'id': 1149, 'frequency': 'c', 'synset': 'waffle.n.01'}, {'name': 'waffle_iron', 'id': 1150, 'frequency': 'r', 'synset': 'waffle_iron.n.01'}, {'name': 'wagon', 'id': 1151, 'frequency': 'c', 'synset': 'wagon.n.01'}, {'name': 'wagon_wheel', 'id': 1152, 'frequency': 'c', 'synset': 'wagon_wheel.n.01'}, {'name': 'walking_stick', 'id': 1153, 'frequency': 'c', 'synset': 'walking_stick.n.01'}, {'name': 'wall_clock', 'id': 1154, 'frequency': 'c', 'synset': 'wall_clock.n.01'}, {'name': 'wall_socket', 'id': 1155, 'frequency': 'f', 'synset': 'wall_socket.n.01'}, {'name': 'wallet', 'id': 1156, 'frequency': 'f', 'synset': 'wallet.n.01'}, {'name': 'walrus', 'id': 1157, 'frequency': 'r', 'synset': 'walrus.n.01'}, {'name': 'wardrobe', 'id': 1158, 'frequency': 'r', 'synset': 'wardrobe.n.01'}, {'name': 'washbasin', 'id': 1159, 'frequency': 'r', 'synset': 'washbasin.n.01'}, {'name': 'automatic_washer', 'id': 1160, 'frequency': 'c', 'synset': 'washer.n.03'}, {'name': 'watch', 'id': 1161, 'frequency': 'f', 'synset': 'watch.n.01'}, {'name': 'water_bottle', 'id': 1162, 'frequency': 'f', 'synset': 'water_bottle.n.01'}, {'name': 'water_cooler', 'id': 1163, 'frequency': 'c', 'synset': 'water_cooler.n.01'}, {'name': 'water_faucet', 'id': 1164, 'frequency': 'c', 'synset': 'water_faucet.n.01'}, {'name': 'water_heater', 'id': 1165, 'frequency': 'r', 'synset': 'water_heater.n.01'}, {'name': 'water_jug', 'id': 1166, 'frequency': 'c', 'synset': 'water_jug.n.01'}, {'name': 'water_gun', 'id': 1167, 'frequency': 'r', 'synset': 'water_pistol.n.01'}, {'name': 'water_scooter', 'id': 1168, 'frequency': 'c', 'synset': 'water_scooter.n.01'}, {'name': 'water_ski', 'id': 1169, 'frequency': 'c', 'synset': 'water_ski.n.01'}, {'name': 'water_tower', 'id': 1170, 'frequency': 'c', 'synset': 'water_tower.n.01'}, {'name': 'watering_can', 'id': 1171, 'frequency': 'c', 'synset': 'watering_can.n.01'}, {'name': 'watermelon', 'id': 1172, 'frequency': 'f', 'synset': 'watermelon.n.02'}, {'name': 'weathervane', 'id': 1173, 'frequency': 'f', 'synset': 'weathervane.n.01'}, {'name': 'webcam', 'id': 1174, 'frequency': 'c', 'synset': 'webcam.n.01'}, {'name': 'wedding_cake', 'id': 1175, 'frequency': 'c', 'synset': 'wedding_cake.n.01'}, {'name': 'wedding_ring', 'id': 1176, 'frequency': 'c', 'synset': 'wedding_ring.n.01'}, {'name': 'wet_suit', 'id': 1177, 'frequency': 'f', 'synset': 'wet_suit.n.01'}, {'name': 'wheel', 'id': 1178, 'frequency': 'f', 'synset': 'wheel.n.01'}, {'name': 'wheelchair', 'id': 1179, 'frequency': 'c', 'synset': 'wheelchair.n.01'}, {'name': 'whipped_cream', 'id': 1180, 'frequency': 'c', 'synset': 'whipped_cream.n.01'}, {'name': 'whistle', 'id': 1181, 'frequency': 'c', 'synset': 'whistle.n.03'}, {'name': 'wig', 'id': 1182, 'frequency': 'c', 'synset': 'wig.n.01'}, {'name': 'wind_chime', 'id': 1183, 'frequency': 'c', 'synset': 'wind_chime.n.01'}, {'name': 'windmill', 'id': 1184, 'frequency': 'c', 'synset': 'windmill.n.01'}, {'name': 'window_box_(for_plants)', 'id': 1185, 'frequency': 'c', 'synset': 'window_box.n.01'}, {'name': 'windshield_wiper', 'id': 1186, 'frequency': 'f', 'synset': 'windshield_wiper.n.01'}, {'name': 'windsock', 'id': 1187, 'frequency': 'c', 'synset': 'windsock.n.01'}, {'name': 'wine_bottle', 'id': 1188, 'frequency': 'f', 'synset': 'wine_bottle.n.01'}, {'name': 'wine_bucket', 'id': 1189, 'frequency': 'c', 'synset': 'wine_bucket.n.01'}, {'name': 'wineglass', 'id': 1190, 'frequency': 'f', 'synset': 'wineglass.n.01'}, {'name': 'blinder_(for_horses)', 'id': 1191, 'frequency': 'f', 'synset': 'winker.n.02'}, {'name': 'wok', 'id': 1192, 'frequency': 'c', 'synset': 'wok.n.01'}, {'name': 'wolf', 'id': 1193, 'frequency': 'r', 'synset': 'wolf.n.01'}, {'name': 'wooden_spoon', 'id': 1194, 'frequency': 'c', 'synset': 'wooden_spoon.n.02'}, {'name': 'wreath', 'id': 1195, 'frequency': 'c', 'synset': 'wreath.n.01'}, {'name': 'wrench', 'id': 1196, 'frequency': 'c', 'synset': 'wrench.n.03'}, {'name': 'wristband', 'id': 1197, 'frequency': 'f', 'synset': 'wristband.n.01'}, {'name': 'wristlet', 'id': 1198, 'frequency': 'f', 'synset': 'wristlet.n.01'}, {'name': 'yacht', 'id': 1199, 'frequency': 'c', 'synset': 'yacht.n.01'}, {'name': 'yogurt', 'id': 1200, 'frequency': 'c', 'synset': 'yogurt.n.01'}, {'name': 'yoke_(animal_equipment)', 'id': 1201, 'frequency': 'c', 'synset': 'yoke.n.07'}, {'name': 'zebra', 'id': 1202, 'frequency': 'f', 'synset': 'zebra.n.01'}, {'name': 'zucchini', 'id': 1203, 'frequency': 'c', 'synset': 'zucchini.n.02'}, {'id': 1204, 'synset': 'organism.n.01', 'name': 'organism'}, {'id': 1205, 'synset': 'benthos.n.02', 'name': 'benthos'}, {'id': 1206, 'synset': 'heterotroph.n.01', 'name': 'heterotroph'}, {'id': 1207, 'synset': 'cell.n.02', 'name': 'cell'}, {'id': 1208, 'synset': 'animal.n.01', 'name': 'animal'}, {'id': 1209, 'synset': 'plant.n.02', 'name': 'plant'}, {'id': 1210, 'synset': 'food.n.01', 'name': 'food'}, {'id': 1211, 'synset': 'artifact.n.01', 'name': 'artifact'}, {'id': 1212, 'synset': 'hop.n.01', 'name': 'hop'}, {'id': 1213, 'synset': 'check-in.n.01', 'name': 'check-in'}, {'id': 1214, 'synset': 'dressage.n.01', 'name': 'dressage'}, {'id': 1215, 'synset': 'curvet.n.01', 'name': 'curvet'}, {'id': 1216, 'synset': 'piaffe.n.01', 'name': 'piaffe'}, {'id': 1217, 'synset': 'funambulism.n.01', 'name': 'funambulism'}, {'id': 1218, 'synset': 'rock_climbing.n.01', 'name': 'rock_climbing'}, {'id': 1219, 'synset': 'contact_sport.n.01', 'name': 'contact_sport'}, {'id': 1220, 'synset': 'outdoor_sport.n.01', 'name': 'outdoor_sport'}, {'id': 1221, 'synset': 'gymnastics.n.01', 'name': 'gymnastics'}, {'id': 1222, 'synset': 'acrobatics.n.01', 'name': 'acrobatics'}, {'id': 1223, 'synset': 'track_and_field.n.01', 'name': 'track_and_field'}, {'id': 1224, 'synset': 'track.n.11', 'name': 'track'}, {'id': 1225, 'synset': 'jumping.n.01', 'name': 'jumping'}, {'id': 1226, 'synset': 'broad_jump.n.02', 'name': 'broad_jump'}, {'id': 1227, 'synset': 'high_jump.n.02', 'name': 'high_jump'}, {'id': 1228, 'synset': 'fosbury_flop.n.01', 'name': 'Fosbury_flop'}, {'id': 1229, 'synset': 'skiing.n.01', 'name': 'skiing'}, {'id': 1230, 'synset': 'cross-country_skiing.n.01', 'name': 'cross-country_skiing'}, {'id': 1231, 'synset': 'ski_jumping.n.01', 'name': 'ski_jumping'}, {'id': 1232, 'synset': 'water_sport.n.01', 'name': 'water_sport'}, {'id': 1233, 'synset': 'swimming.n.01', 'name': 'swimming'}, {'id': 1234, 'synset': 'bathe.n.01', 'name': 'bathe'}, {'id': 1235, 'synset': 'dip.n.08', 'name': 'dip'}, {'id': 1236, 'synset': 'dive.n.02', 'name': 'dive'}, {'id': 1237, 'synset': 'floating.n.01', 'name': 'floating'}, {'id': 1238, 'synset': "dead-man's_float.n.01", 'name': "dead-man's_float"}, {'id': 1239, 'synset': 'belly_flop.n.01', 'name': 'belly_flop'}, {'id': 1240, 'synset': 'cliff_diving.n.01', 'name': 'cliff_diving'}, {'id': 1241, 'synset': 'flip.n.05', 'name': 'flip'}, {'id': 1242, 'synset': 'gainer.n.03', 'name': 'gainer'}, {'id': 1243, 'synset': 'half_gainer.n.01', 'name': 'half_gainer'}, {'id': 1244, 'synset': 'jackknife.n.02', 'name': 'jackknife'}, {'id': 1245, 'synset': 'swan_dive.n.01', 'name': 'swan_dive'}, {'id': 1246, 'synset': 'skin_diving.n.01', 'name': 'skin_diving'}, {'id': 1247, 'synset': 'scuba_diving.n.01', 'name': 'scuba_diving'}, {'id': 1248, 'synset': 'snorkeling.n.01', 'name': 'snorkeling'}, {'id': 1249, 'synset': 'surfing.n.01', 'name': 'surfing'}, {'id': 1250, 'synset': 'water-skiing.n.01', 'name': 'water-skiing'}, {'id': 1251, 'synset': 'rowing.n.01', 'name': 'rowing'}, {'id': 1252, 'synset': 'sculling.n.01', 'name': 'sculling'}, {'id': 1253, 'synset': 'boxing.n.01', 'name': 'boxing'}, {'id': 1254, 'synset': 'professional_boxing.n.01', 'name': 'professional_boxing'}, {'id': 1255, 'synset': 'in-fighting.n.02', 'name': 'in-fighting'}, {'id': 1256, 'synset': 'fight.n.05', 'name': 'fight'}, {'id': 1257, 'synset': 'rope-a-dope.n.01', 'name': 'rope-a-dope'}, {'id': 1258, 'synset': 'spar.n.03', 'name': 'spar'}, {'id': 1259, 'synset': 'archery.n.01', 'name': 'archery'}, {'id': 1260, 'synset': 'sledding.n.01', 'name': 'sledding'}, {'id': 1261, 'synset': 'tobogganing.n.01', 'name': 'tobogganing'}, {'id': 1262, 'synset': 'luging.n.01', 'name': 'luging'}, {'id': 1263, 'synset': 'bobsledding.n.01', 'name': 'bobsledding'}, {'id': 1264, 'synset': 'wrestling.n.02', 'name': 'wrestling'}, {'id': 1265, 'synset': 'greco-roman_wrestling.n.01', 'name': 'Greco-Roman_wrestling'}, {'id': 1266, 'synset': 'professional_wrestling.n.01', 'name': 'professional_wrestling'}, {'id': 1267, 'synset': 'sumo.n.01', 'name': 'sumo'}, {'id': 1268, 'synset': 'skating.n.01', 'name': 'skating'}, {'id': 1269, 'synset': 'ice_skating.n.01', 'name': 'ice_skating'}, {'id': 1270, 'synset': 'figure_skating.n.01', 'name': 'figure_skating'}, {'id': 1271, 'synset': 'rollerblading.n.01', 'name': 'rollerblading'}, {'id': 1272, 'synset': 'roller_skating.n.01', 'name': 'roller_skating'}, {'id': 1273, 'synset': 'skateboarding.n.01', 'name': 'skateboarding'}, {'id': 1274, 'synset': 'speed_skating.n.01', 'name': 'speed_skating'}, {'id': 1275, 'synset': 'racing.n.01', 'name': 'racing'}, {'id': 1276, 'synset': 'auto_racing.n.01', 'name': 'auto_racing'}, {'id': 1277, 'synset': 'boat_racing.n.01', 'name': 'boat_racing'}, {'id': 1278, 'synset': 'hydroplane_racing.n.01', 'name': 'hydroplane_racing'}, {'id': 1279, 'synset': 'camel_racing.n.01', 'name': 'camel_racing'}, {'id': 1280, 'synset': 'greyhound_racing.n.01', 'name': 'greyhound_racing'}, {'id': 1281, 'synset': 'horse_racing.n.01', 'name': 'horse_racing'}, {'id': 1282, 'synset': 'riding.n.01', 'name': 'riding'}, {'id': 1283, 'synset': 'equestrian_sport.n.01', 'name': 'equestrian_sport'}, {'id': 1284, 'synset': 'pony-trekking.n.01', 'name': 'pony-trekking'}, {'id': 1285, 'synset': 'showjumping.n.01', 'name': 'showjumping'}, {'id': 1286, 'synset': 'cross-country_riding.n.01', 'name': 'cross-country_riding'}, {'id': 1287, 'synset': 'cycling.n.01', 'name': 'cycling'}, {'id': 1288, 'synset': 'bicycling.n.01', 'name': 'bicycling'}, {'id': 1289, 'synset': 'motorcycling.n.01', 'name': 'motorcycling'}, {'id': 1290, 'synset': 'dune_cycling.n.01', 'name': 'dune_cycling'}, {'id': 1291, 'synset': 'blood_sport.n.01', 'name': 'blood_sport'}, {'id': 1292, 'synset': 'bullfighting.n.01', 'name': 'bullfighting'}, {'id': 1293, 'synset': 'cockfighting.n.01', 'name': 'cockfighting'}, {'id': 1294, 'synset': 'hunt.n.08', 'name': 'hunt'}, {'id': 1295, 'synset': 'battue.n.01', 'name': 'battue'}, {'id': 1296, 'synset': 'beagling.n.01', 'name': 'beagling'}, {'id': 1297, 'synset': 'coursing.n.01', 'name': 'coursing'}, {'id': 1298, 'synset': 'deer_hunting.n.01', 'name': 'deer_hunting'}, {'id': 1299, 'synset': 'ducking.n.01', 'name': 'ducking'}, {'id': 1300, 'synset': 'fox_hunting.n.01', 'name': 'fox_hunting'}, {'id': 1301, 'synset': 'pigsticking.n.01', 'name': 'pigsticking'}, {'id': 1302, 'synset': 'fishing.n.01', 'name': 'fishing'}, {'id': 1303, 'synset': 'angling.n.01', 'name': 'angling'}, {'id': 1304, 'synset': 'fly-fishing.n.01', 'name': 'fly-fishing'}, {'id': 1305, 'synset': 'troll.n.04', 'name': 'troll'}, {'id': 1306, 'synset': 'casting.n.03', 'name': 'casting'}, {'id': 1307, 'synset': 'bait_casting.n.01', 'name': 'bait_casting'}, {'id': 1308, 'synset': 'fly_casting.n.01', 'name': 'fly_casting'}, {'id': 1309, 'synset': 'overcast.n.04', 'name': 'overcast'}, {'id': 1310, 'synset': 'surf_casting.n.01', 'name': 'surf_casting'}, {'id': 1311, 'synset': 'day_game.n.01', 'name': 'day_game'}, {'id': 1312, 'synset': 'athletic_game.n.01', 'name': 'athletic_game'}, {'id': 1313, 'synset': 'ice_hockey.n.01', 'name': 'ice_hockey'}, {'id': 1314, 'synset': 'tetherball.n.01', 'name': 'tetherball'}, {'id': 1315, 'synset': 'water_polo.n.01', 'name': 'water_polo'}, {'id': 1316, 'synset': 'outdoor_game.n.01', 'name': 'outdoor_game'}, {'id': 1317, 'synset': 'golf.n.01', 'name': 'golf'}, {'id': 1318, 'synset': 'professional_golf.n.01', 'name': 'professional_golf'}, {'id': 1319, 'synset': 'round_of_golf.n.01', 'name': 'round_of_golf'}, {'id': 1320, 'synset': 'medal_play.n.01', 'name': 'medal_play'}, {'id': 1321, 'synset': 'match_play.n.01', 'name': 'match_play'}, {'id': 1322, 'synset': 'miniature_golf.n.01', 'name': 'miniature_golf'}, {'id': 1323, 'synset': 'croquet.n.01', 'name': 'croquet'}, {'id': 1324, 'synset': 'quoits.n.01', 'name': 'quoits'}, {'id': 1325, 'synset': 'shuffleboard.n.01', 'name': 'shuffleboard'}, {'id': 1326, 'synset': 'field_game.n.01', 'name': 'field_game'}, {'id': 1327, 'synset': 'field_hockey.n.01', 'name': 'field_hockey'}, {'id': 1328, 'synset': 'shinny.n.01', 'name': 'shinny'}, {'id': 1329, 'synset': 'football.n.01', 'name': 'football'}, {'id': 1330, 'synset': 'american_football.n.01', 'name': 'American_football'}, {'id': 1331, 'synset': 'professional_football.n.01', 'name': 'professional_football'}, {'id': 1332, 'synset': 'touch_football.n.01', 'name': 'touch_football'}, {'id': 1333, 'synset': 'hurling.n.01', 'name': 'hurling'}, {'id': 1334, 'synset': 'rugby.n.01', 'name': 'rugby'}, {'id': 1335, 'synset': 'ball_game.n.01', 'name': 'ball_game'}, {'id': 1336, 'synset': 'baseball.n.01', 'name': 'baseball'}, {'id': 1337, 'synset': 'ball.n.11', 'name': 'ball'}, {'id': 1338, 'synset': 'professional_baseball.n.01', 'name': 'professional_baseball'}, {'id': 1339, 'synset': 'hardball.n.02', 'name': 'hardball'}, {'id': 1340, 'synset': 'perfect_game.n.01', 'name': 'perfect_game'}, {'id': 1341, 'synset': 'no-hit_game.n.01', 'name': 'no-hit_game'}, {'id': 1342, 'synset': 'one-hitter.n.01', 'name': 'one-hitter'}, {'id': 1343, 'synset': 'two-hitter.n.01', 'name': 'two-hitter'}, {'id': 1344, 'synset': 'three-hitter.n.01', 'name': 'three-hitter'}, {'id': 1345, 'synset': 'four-hitter.n.01', 'name': 'four-hitter'}, {'id': 1346, 'synset': 'five-hitter.n.01', 'name': 'five-hitter'}, {'id': 1347, 'synset': 'softball.n.02', 'name': 'softball'}, {'id': 1348, 'synset': 'rounders.n.01', 'name': 'rounders'}, {'id': 1349, 'synset': 'stickball.n.01', 'name': 'stickball'}, {'id': 1350, 'synset': 'cricket.n.02', 'name': 'cricket'}, {'id': 1351, 'synset': 'lacrosse.n.01', 'name': 'lacrosse'}, {'id': 1352, 'synset': 'polo.n.02', 'name': 'polo'}, {'id': 1353, 'synset': 'pushball.n.01', 'name': 'pushball'}, {'id': 1354, 'synset': 'soccer.n.01', 'name': 'soccer'}, {'id': 1355, 'synset': 'court_game.n.01', 'name': 'court_game'}, {'id': 1356, 'synset': 'handball.n.02', 'name': 'handball'}, {'id': 1357, 'synset': 'racquetball.n.02', 'name': 'racquetball'}, {'id': 1358, 'synset': 'fives.n.01', 'name': 'fives'}, {'id': 1359, 'synset': 'squash.n.03', 'name': 'squash'}, {'id': 1360, 'synset': 'volleyball.n.01', 'name': 'volleyball'}, {'id': 1361, 'synset': 'jai_alai.n.01', 'name': 'jai_alai'}, {'id': 1362, 'synset': 'badminton.n.01', 'name': 'badminton'}, {'id': 1363, 'synset': 'battledore.n.02', 'name': 'battledore'}, {'id': 1364, 'synset': 'basketball.n.01', 'name': 'basketball'}, {'id': 1365, 'synset': 'professional_basketball.n.01', 'name': 'professional_basketball'}, {'id': 1366, 'synset': 'deck_tennis.n.01', 'name': 'deck_tennis'}, {'id': 1367, 'synset': 'netball.n.01', 'name': 'netball'}, {'id': 1368, 'synset': 'tennis.n.01', 'name': 'tennis'}, {'id': 1369, 'synset': 'professional_tennis.n.01', 'name': 'professional_tennis'}, {'id': 1370, 'synset': 'singles.n.02', 'name': 'singles'}, {'id': 1371, 'synset': 'singles.n.01', 'name': 'singles'}, {'id': 1372, 'synset': 'doubles.n.02', 'name': 'doubles'}, {'id': 1373, 'synset': 'doubles.n.01', 'name': 'doubles'}, {'id': 1374, 'synset': 'royal_tennis.n.01', 'name': 'royal_tennis'}, {'id': 1375, 'synset': 'pallone.n.01', 'name': 'pallone'}, {'id': 1376, 'synset': 'sport.n.01', 'name': 'sport'}, {'id': 1377, 'synset': 'clasp.n.02', 'name': 'clasp'}, {'id': 1378, 'synset': 'judo.n.01', 'name': 'judo'}, {'id': 1379, 'synset': 'team_sport.n.01', 'name': 'team_sport'}, {'id': 1380, 'synset': 'last_supper.n.01', 'name': 'Last_Supper'}, {'id': 1381, 'synset': 'seder.n.01', 'name': 'Seder'}, {'id': 1382, 'synset': 'camping.n.01', 'name': 'camping'}, {'id': 1383, 'synset': 'pest.n.04', 'name': 'pest'}, {'id': 1384, 'synset': 'critter.n.01', 'name': 'critter'}, {'id': 1385, 'synset': 'creepy-crawly.n.01', 'name': 'creepy-crawly'}, {'id': 1386, 'synset': 'darter.n.02', 'name': 'darter'}, {'id': 1387, 'synset': 'peeper.n.03', 'name': 'peeper'}, {'id': 1388, 'synset': 'homeotherm.n.01', 'name': 'homeotherm'}, {'id': 1389, 'synset': 'poikilotherm.n.01', 'name': 'poikilotherm'}, {'id': 1390, 'synset': 'range_animal.n.01', 'name': 'range_animal'}, {'id': 1391, 'synset': 'scavenger.n.03', 'name': 'scavenger'}, {'id': 1392, 'synset': 'bottom-feeder.n.02', 'name': 'bottom-feeder'}, {'id': 1393, 'synset': 'bottom-feeder.n.01', 'name': 'bottom-feeder'}, {'id': 1394, 'synset': 'work_animal.n.01', 'name': 'work_animal'}, {'id': 1395, 'synset': 'beast_of_burden.n.01', 'name': 'beast_of_burden'}, {'id': 1396, 'synset': 'draft_animal.n.01', 'name': 'draft_animal'}, {'id': 1397, 'synset': 'pack_animal.n.01', 'name': 'pack_animal'}, {'id': 1398, 'synset': 'domestic_animal.n.01', 'name': 'domestic_animal'}, {'id': 1399, 'synset': 'feeder.n.01', 'name': 'feeder'}, {'id': 1400, 'synset': 'feeder.n.06', 'name': 'feeder'}, {'id': 1401, 'synset': 'stocker.n.01', 'name': 'stocker'}, {'id': 1402, 'synset': 'hatchling.n.01', 'name': 'hatchling'}, {'id': 1403, 'synset': 'head.n.02', 'name': 'head'}, {'id': 1404, 'synset': 'migrator.n.02', 'name': 'migrator'}, {'id': 1405, 'synset': 'molter.n.01', 'name': 'molter'}, {'id': 1406, 'synset': 'stayer.n.01', 'name': 'stayer'}, {'id': 1407, 'synset': 'stunt.n.02', 'name': 'stunt'}, {'id': 1408, 'synset': 'marine_animal.n.01', 'name': 'marine_animal'}, {'id': 1409, 'synset': 'by-catch.n.01', 'name': 'by-catch'}, {'id': 1410, 'synset': 'female.n.01', 'name': 'female'}, {'id': 1411, 'synset': 'hen.n.04', 'name': 'hen'}, {'id': 1412, 'synset': 'male.n.01', 'name': 'male'}, {'id': 1413, 'synset': 'adult.n.02', 'name': 'adult'}, {'id': 1414, 'synset': 'young.n.01', 'name': 'young'}, {'id': 1415, 'synset': 'orphan.n.04', 'name': 'orphan'}, {'id': 1416, 'synset': 'young_mammal.n.01', 'name': 'young_mammal'}, {'id': 1417, 'synset': 'baby.n.06', 'name': 'baby'}, {'id': 1418, 'synset': 'pup.n.01', 'name': 'pup'}, {'id': 1419, 'synset': 'wolf_pup.n.01', 'name': 'wolf_pup'}, {'id': 1420, 'synset': 'lion_cub.n.01', 'name': 'lion_cub'}, {'id': 1421, 'synset': 'bear_cub.n.01', 'name': 'bear_cub'}, {'id': 1422, 'synset': 'tiger_cub.n.01', 'name': 'tiger_cub'}, {'id': 1423, 'synset': 'kit.n.03', 'name': 'kit'}, {'id': 1424, 'synset': 'suckling.n.03', 'name': 'suckling'}, {'id': 1425, 'synset': 'sire.n.03', 'name': 'sire'}, {'id': 1426, 'synset': 'dam.n.03', 'name': 'dam'}, {'id': 1427, 'synset': 'thoroughbred.n.03', 'name': 'thoroughbred'}, {'id': 1428, 'synset': 'giant.n.01', 'name': 'giant'}, {'id': 1429, 'synset': 'mutant.n.02', 'name': 'mutant'}, {'id': 1430, 'synset': 'carnivore.n.02', 'name': 'carnivore'}, {'id': 1431, 'synset': 'herbivore.n.01', 'name': 'herbivore'}, {'id': 1432, 'synset': 'insectivore.n.02', 'name': 'insectivore'}, {'id': 1433, 'synset': 'acrodont.n.01', 'name': 'acrodont'}, {'id': 1434, 'synset': 'pleurodont.n.01', 'name': 'pleurodont'}, {'id': 1435, 'synset': 'microorganism.n.01', 'name': 'microorganism'}, {'id': 1436, 'synset': 'monohybrid.n.01', 'name': 'monohybrid'}, {'id': 1437, 'synset': 'arbovirus.n.01', 'name': 'arbovirus'}, {'id': 1438, 'synset': 'adenovirus.n.01', 'name': 'adenovirus'}, {'id': 1439, 'synset': 'arenavirus.n.01', 'name': 'arenavirus'}, {'id': 1440, 'synset': 'marburg_virus.n.01', 'name': 'Marburg_virus'}, {'id': 1441, 'synset': 'arenaviridae.n.01', 'name': 'Arenaviridae'}, {'id': 1442, 'synset': 'vesiculovirus.n.01', 'name': 'vesiculovirus'}, {'id': 1443, 'synset': 'reoviridae.n.01', 'name': 'Reoviridae'}, {'id': 1444, 'synset': 'variola_major.n.02', 'name': 'variola_major'}, {'id': 1445, 'synset': 'viroid.n.01', 'name': 'viroid'}, {'id': 1446, 'synset': 'coliphage.n.01', 'name': 'coliphage'}, {'id': 1447, 'synset': 'paramyxovirus.n.01', 'name': 'paramyxovirus'}, {'id': 1448, 'synset': 'poliovirus.n.01', 'name': 'poliovirus'}, {'id': 1449, 'synset': 'herpes.n.02', 'name': 'herpes'}, {'id': 1450, 'synset': 'herpes_simplex_1.n.01', 'name': 'herpes_simplex_1'}, {'id': 1451, 'synset': 'herpes_zoster.n.02', 'name': 'herpes_zoster'}, {'id': 1452, 'synset': 'herpes_varicella_zoster.n.01', 'name': 'herpes_varicella_zoster'}, {'id': 1453, 'synset': 'cytomegalovirus.n.01', 'name': 'cytomegalovirus'}, {'id': 1454, 'synset': 'varicella_zoster_virus.n.01', 'name': 'varicella_zoster_virus'}, {'id': 1455, 'synset': 'polyoma.n.01', 'name': 'polyoma'}, {'id': 1456, 'synset': 'lyssavirus.n.01', 'name': 'lyssavirus'}, {'id': 1457, 'synset': 'reovirus.n.01', 'name': 'reovirus'}, {'id': 1458, 'synset': 'rotavirus.n.01', 'name': 'rotavirus'}, {'id': 1459, 'synset': 'moneran.n.01', 'name': 'moneran'}, {'id': 1460, 'synset': 'archaebacteria.n.01', 'name': 'archaebacteria'}, {'id': 1461, 'synset': 'bacteroid.n.01', 'name': 'bacteroid'}, {'id': 1462, 'synset': 'bacillus_anthracis.n.01', 'name': 'Bacillus_anthracis'}, {'id': 1463, 'synset': 'yersinia_pestis.n.01', 'name': 'Yersinia_pestis'}, {'id': 1464, 'synset': 'brucella.n.01', 'name': 'Brucella'}, {'id': 1465, 'synset': 'spirillum.n.02', 'name': 'spirillum'}, {'id': 1466, 'synset': 'botulinus.n.01', 'name': 'botulinus'}, {'id': 1467, 'synset': 'clostridium_perfringens.n.01', 'name': 'clostridium_perfringens'}, {'id': 1468, 'synset': 'cyanobacteria.n.01', 'name': 'cyanobacteria'}, {'id': 1469, 'synset': 'trichodesmium.n.01', 'name': 'trichodesmium'}, {'id': 1470, 'synset': 'nitric_bacteria.n.01', 'name': 'nitric_bacteria'}, {'id': 1471, 'synset': 'spirillum.n.01', 'name': 'spirillum'}, {'id': 1472, 'synset': 'francisella.n.01', 'name': 'Francisella'}, {'id': 1473, 'synset': 'gonococcus.n.01', 'name': 'gonococcus'}, {'id': 1474, 'synset': 'corynebacterium_diphtheriae.n.01', 'name': 'Corynebacterium_diphtheriae'}, {'id': 1475, 'synset': 'enteric_bacteria.n.01', 'name': 'enteric_bacteria'}, {'id': 1476, 'synset': 'klebsiella.n.01', 'name': 'klebsiella'}, {'id': 1477, 'synset': 'salmonella_typhimurium.n.01', 'name': 'Salmonella_typhimurium'}, {'id': 1478, 'synset': 'typhoid_bacillus.n.01', 'name': 'typhoid_bacillus'}, {'id': 1479, 'synset': 'nitrate_bacterium.n.01', 'name': 'nitrate_bacterium'}, {'id': 1480, 'synset': 'nitrite_bacterium.n.01', 'name': 'nitrite_bacterium'}, {'id': 1481, 'synset': 'actinomycete.n.01', 'name': 'actinomycete'}, {'id': 1482, 'synset': 'streptomyces.n.01', 'name': 'streptomyces'}, {'id': 1483, 'synset': 'streptomyces_erythreus.n.01', 'name': 'Streptomyces_erythreus'}, {'id': 1484, 'synset': 'streptomyces_griseus.n.01', 'name': 'Streptomyces_griseus'}, {'id': 1485, 'synset': 'tubercle_bacillus.n.01', 'name': 'tubercle_bacillus'}, {'id': 1486, 'synset': 'pus-forming_bacteria.n.01', 'name': 'pus-forming_bacteria'}, {'id': 1487, 'synset': 'streptobacillus.n.01', 'name': 'streptobacillus'}, {'id': 1488, 'synset': 'myxobacteria.n.01', 'name': 'myxobacteria'}, {'id': 1489, 'synset': 'staphylococcus.n.01', 'name': 'staphylococcus'}, {'id': 1490, 'synset': 'diplococcus.n.01', 'name': 'diplococcus'}, {'id': 1491, 'synset': 'pneumococcus.n.01', 'name': 'pneumococcus'}, {'id': 1492, 'synset': 'streptococcus.n.01', 'name': 'streptococcus'}, {'id': 1493, 'synset': 'spirochete.n.01', 'name': 'spirochete'}, {'id': 1494, 'synset': 'planktonic_algae.n.01', 'name': 'planktonic_algae'}, {'id': 1495, 'synset': 'zooplankton.n.01', 'name': 'zooplankton'}, {'id': 1496, 'synset': 'parasite.n.01', 'name': 'parasite'}, {'id': 1497, 'synset': 'endoparasite.n.01', 'name': 'endoparasite'}, {'id': 1498, 'synset': 'ectoparasite.n.01', 'name': 'ectoparasite'}, {'id': 1499, 'synset': 'pathogen.n.01', 'name': 'pathogen'}, {'id': 1500, 'synset': 'commensal.n.01', 'name': 'commensal'}, {'id': 1501, 'synset': 'myrmecophile.n.01', 'name': 'myrmecophile'}, {'id': 1502, 'synset': 'protoctist.n.01', 'name': 'protoctist'}, {'id': 1503, 'synset': 'protozoan.n.01', 'name': 'protozoan'}, {'id': 1504, 'synset': 'sarcodinian.n.01', 'name': 'sarcodinian'}, {'id': 1505, 'synset': 'heliozoan.n.01', 'name': 'heliozoan'}, {'id': 1506, 'synset': 'endameba.n.01', 'name': 'endameba'}, {'id': 1507, 'synset': 'ameba.n.01', 'name': 'ameba'}, {'id': 1508, 'synset': 'globigerina.n.01', 'name': 'globigerina'}, {'id': 1509, 'synset': 'testacean.n.01', 'name': 'testacean'}, {'id': 1510, 'synset': 'arcella.n.01', 'name': 'arcella'}, {'id': 1511, 'synset': 'difflugia.n.01', 'name': 'difflugia'}, {'id': 1512, 'synset': 'ciliate.n.01', 'name': 'ciliate'}, {'id': 1513, 'synset': 'paramecium.n.01', 'name': 'paramecium'}, {'id': 1514, 'synset': 'stentor.n.03', 'name': 'stentor'}, {'id': 1515, 'synset': 'alga.n.01', 'name': 'alga'}, {'id': 1516, 'synset': 'arame.n.01', 'name': 'arame'}, {'id': 1517, 'synset': 'seagrass.n.01', 'name': 'seagrass'}, {'id': 1518, 'synset': 'golden_algae.n.01', 'name': 'golden_algae'}, {'id': 1519, 'synset': 'yellow-green_algae.n.01', 'name': 'yellow-green_algae'}, {'id': 1520, 'synset': 'brown_algae.n.01', 'name': 'brown_algae'}, {'id': 1521, 'synset': 'kelp.n.01', 'name': 'kelp'}, {'id': 1522, 'synset': 'fucoid.n.02', 'name': 'fucoid'}, {'id': 1523, 'synset': 'fucoid.n.01', 'name': 'fucoid'}, {'id': 1524, 'synset': 'fucus.n.01', 'name': 'fucus'}, {'id': 1525, 'synset': 'bladderwrack.n.01', 'name': 'bladderwrack'}, {'id': 1526, 'synset': 'green_algae.n.01', 'name': 'green_algae'}, {'id': 1527, 'synset': 'pond_scum.n.01', 'name': 'pond_scum'}, {'id': 1528, 'synset': 'chlorella.n.01', 'name': 'chlorella'}, {'id': 1529, 'synset': 'stonewort.n.01', 'name': 'stonewort'}, {'id': 1530, 'synset': 'desmid.n.01', 'name': 'desmid'}, {'id': 1531, 'synset': 'sea_moss.n.02', 'name': 'sea_moss'}, {'id': 1532, 'synset': 'eukaryote.n.01', 'name': 'eukaryote'}, {'id': 1533, 'synset': 'prokaryote.n.01', 'name': 'prokaryote'}, {'id': 1534, 'synset': 'zooid.n.01', 'name': 'zooid'}, {'id': 1535, 'synset': 'leishmania.n.01', 'name': 'Leishmania'}, {'id': 1536, 'synset': 'zoomastigote.n.01', 'name': 'zoomastigote'}, {'id': 1537, 'synset': 'polymastigote.n.01', 'name': 'polymastigote'}, {'id': 1538, 'synset': 'costia.n.01', 'name': 'costia'}, {'id': 1539, 'synset': 'giardia.n.01', 'name': 'giardia'}, {'id': 1540, 'synset': 'cryptomonad.n.01', 'name': 'cryptomonad'}, {'id': 1541, 'synset': 'sporozoan.n.01', 'name': 'sporozoan'}, {'id': 1542, 'synset': 'sporozoite.n.01', 'name': 'sporozoite'}, {'id': 1543, 'synset': 'trophozoite.n.01', 'name': 'trophozoite'}, {'id': 1544, 'synset': 'merozoite.n.01', 'name': 'merozoite'}, {'id': 1545, 'synset': 'coccidium.n.01', 'name': 'coccidium'}, {'id': 1546, 'synset': 'gregarine.n.01', 'name': 'gregarine'}, {'id': 1547, 'synset': 'plasmodium.n.02', 'name': 'plasmodium'}, {'id': 1548, 'synset': 'leucocytozoan.n.01', 'name': 'leucocytozoan'}, {'id': 1549, 'synset': 'microsporidian.n.01', 'name': 'microsporidian'}, {'id': 1550, 'synset': 'ostariophysi.n.01', 'name': 'Ostariophysi'}, {'id': 1551, 'synset': 'cypriniform_fish.n.01', 'name': 'cypriniform_fish'}, {'id': 1552, 'synset': 'loach.n.01', 'name': 'loach'}, {'id': 1553, 'synset': 'cyprinid.n.01', 'name': 'cyprinid'}, {'id': 1554, 'synset': 'carp.n.02', 'name': 'carp'}, {'id': 1555, 'synset': 'domestic_carp.n.01', 'name': 'domestic_carp'}, {'id': 1556, 'synset': 'leather_carp.n.01', 'name': 'leather_carp'}, {'id': 1557, 'synset': 'mirror_carp.n.01', 'name': 'mirror_carp'}, {'id': 1558, 'synset': 'european_bream.n.01', 'name': 'European_bream'}, {'id': 1559, 'synset': 'tench.n.01', 'name': 'tench'}, {'id': 1560, 'synset': 'dace.n.01', 'name': 'dace'}, {'id': 1561, 'synset': 'chub.n.01', 'name': 'chub'}, {'id': 1562, 'synset': 'shiner.n.04', 'name': 'shiner'}, {'id': 1563, 'synset': 'common_shiner.n.01', 'name': 'common_shiner'}, {'id': 1564, 'synset': 'roach.n.05', 'name': 'roach'}, {'id': 1565, 'synset': 'rudd.n.01', 'name': 'rudd'}, {'id': 1566, 'synset': 'minnow.n.01', 'name': 'minnow'}, {'id': 1567, 'synset': 'gudgeon.n.02', 'name': 'gudgeon'}, {'id': 1568, 'synset': 'crucian_carp.n.01', 'name': 'crucian_carp'}, {'id': 1569, 'synset': 'electric_eel.n.01', 'name': 'electric_eel'}, {'id': 1570, 'synset': 'catostomid.n.01', 'name': 'catostomid'}, {'id': 1571, 'synset': 'buffalo_fish.n.01', 'name': 'buffalo_fish'}, {'id': 1572, 'synset': 'black_buffalo.n.01', 'name': 'black_buffalo'}, {'id': 1573, 'synset': 'hog_sucker.n.01', 'name': 'hog_sucker'}, {'id': 1574, 'synset': 'redhorse.n.01', 'name': 'redhorse'}, {'id': 1575, 'synset': 'cyprinodont.n.01', 'name': 'cyprinodont'}, {'id': 1576, 'synset': 'killifish.n.01', 'name': 'killifish'}, {'id': 1577, 'synset': 'mummichog.n.01', 'name': 'mummichog'}, {'id': 1578, 'synset': 'striped_killifish.n.01', 'name': 'striped_killifish'}, {'id': 1579, 'synset': 'rivulus.n.01', 'name': 'rivulus'}, {'id': 1580, 'synset': 'flagfish.n.01', 'name': 'flagfish'}, {'id': 1581, 'synset': 'swordtail.n.01', 'name': 'swordtail'}, {'id': 1582, 'synset': 'guppy.n.01', 'name': 'guppy'}, {'id': 1583, 'synset': 'topminnow.n.01', 'name': 'topminnow'}, {'id': 1584, 'synset': 'mosquitofish.n.01', 'name': 'mosquitofish'}, {'id': 1585, 'synset': 'platy.n.01', 'name': 'platy'}, {'id': 1586, 'synset': 'mollie.n.01', 'name': 'mollie'}, {'id': 1587, 'synset': 'squirrelfish.n.02', 'name': 'squirrelfish'}, {'id': 1588, 'synset': 'reef_squirrelfish.n.01', 'name': 'reef_squirrelfish'}, {'id': 1589, 'synset': 'deepwater_squirrelfish.n.01', 'name': 'deepwater_squirrelfish'}, {'id': 1590, 'synset': 'holocentrus_ascensionis.n.01', 'name': 'Holocentrus_ascensionis'}, {'id': 1591, 'synset': 'soldierfish.n.01', 'name': 'soldierfish'}, {'id': 1592, 'synset': 'anomalops.n.01', 'name': 'anomalops'}, {'id': 1593, 'synset': 'flashlight_fish.n.01', 'name': 'flashlight_fish'}, {'id': 1594, 'synset': 'john_dory.n.01', 'name': 'John_Dory'}, {'id': 1595, 'synset': 'boarfish.n.02', 'name': 'boarfish'}, {'id': 1596, 'synset': 'boarfish.n.01', 'name': 'boarfish'}, {'id': 1597, 'synset': 'cornetfish.n.01', 'name': 'cornetfish'}, {'id': 1598, 'synset': 'stickleback.n.01', 'name': 'stickleback'}, {'id': 1599, 'synset': 'three-spined_stickleback.n.01', 'name': 'three-spined_stickleback'}, {'id': 1600, 'synset': 'ten-spined_stickleback.n.01', 'name': 'ten-spined_stickleback'}, {'id': 1601, 'synset': 'pipefish.n.01', 'name': 'pipefish'}, {'id': 1602, 'synset': 'dwarf_pipefish.n.01', 'name': 'dwarf_pipefish'}, {'id': 1603, 'synset': 'deepwater_pipefish.n.01', 'name': 'deepwater_pipefish'}, {'id': 1604, 'synset': 'snipefish.n.01', 'name': 'snipefish'}, {'id': 1605, 'synset': 'shrimpfish.n.01', 'name': 'shrimpfish'}, {'id': 1606, 'synset': 'trumpetfish.n.01', 'name': 'trumpetfish'}, {'id': 1607, 'synset': 'pellicle.n.01', 'name': 'pellicle'}, {'id': 1608, 'synset': 'embryo.n.02', 'name': 'embryo'}, {'id': 1609, 'synset': 'fetus.n.01', 'name': 'fetus'}, {'id': 1610, 'synset': 'abortus.n.01', 'name': 'abortus'}, {'id': 1611, 'synset': 'spawn.n.01', 'name': 'spawn'}, {'id': 1612, 'synset': 'blastula.n.01', 'name': 'blastula'}, {'id': 1613, 'synset': 'blastocyst.n.01', 'name': 'blastocyst'}, {'id': 1614, 'synset': 'gastrula.n.01', 'name': 'gastrula'}, {'id': 1615, 'synset': 'morula.n.01', 'name': 'morula'}, {'id': 1616, 'synset': 'yolk.n.02', 'name': 'yolk'}, {'id': 1617, 'synset': 'chordate.n.01', 'name': 'chordate'}, {'id': 1618, 'synset': 'cephalochordate.n.01', 'name': 'cephalochordate'}, {'id': 1619, 'synset': 'lancelet.n.01', 'name': 'lancelet'}, {'id': 1620, 'synset': 'tunicate.n.01', 'name': 'tunicate'}, {'id': 1621, 'synset': 'ascidian.n.01', 'name': 'ascidian'}, {'id': 1622, 'synset': 'sea_squirt.n.01', 'name': 'sea_squirt'}, {'id': 1623, 'synset': 'salp.n.01', 'name': 'salp'}, {'id': 1624, 'synset': 'doliolum.n.01', 'name': 'doliolum'}, {'id': 1625, 'synset': 'larvacean.n.01', 'name': 'larvacean'}, {'id': 1626, 'synset': 'appendicularia.n.01', 'name': 'appendicularia'}, {'id': 1627, 'synset': 'ascidian_tadpole.n.01', 'name': 'ascidian_tadpole'}, {'id': 1628, 'synset': 'vertebrate.n.01', 'name': 'vertebrate'}, {'id': 1629, 'synset': 'amniota.n.01', 'name': 'Amniota'}, {'id': 1630, 'synset': 'amniote.n.01', 'name': 'amniote'}, {'id': 1631, 'synset': 'aquatic_vertebrate.n.01', 'name': 'aquatic_vertebrate'}, {'id': 1632, 'synset': 'jawless_vertebrate.n.01', 'name': 'jawless_vertebrate'}, {'id': 1633, 'synset': 'ostracoderm.n.01', 'name': 'ostracoderm'}, {'id': 1634, 'synset': 'heterostracan.n.01', 'name': 'heterostracan'}, {'id': 1635, 'synset': 'anaspid.n.01', 'name': 'anaspid'}, {'id': 1636, 'synset': 'conodont.n.02', 'name': 'conodont'}, {'id': 1637, 'synset': 'cyclostome.n.01', 'name': 'cyclostome'}, {'id': 1638, 'synset': 'lamprey.n.01', 'name': 'lamprey'}, {'id': 1639, 'synset': 'sea_lamprey.n.01', 'name': 'sea_lamprey'}, {'id': 1640, 'synset': 'hagfish.n.01', 'name': 'hagfish'}, {'id': 1641, 'synset': 'myxine_glutinosa.n.01', 'name': 'Myxine_glutinosa'}, {'id': 1642, 'synset': 'eptatretus.n.01', 'name': 'eptatretus'}, {'id': 1643, 'synset': 'gnathostome.n.01', 'name': 'gnathostome'}, {'id': 1644, 'synset': 'placoderm.n.01', 'name': 'placoderm'}, {'id': 1645, 'synset': 'cartilaginous_fish.n.01', 'name': 'cartilaginous_fish'}, {'id': 1646, 'synset': 'holocephalan.n.01', 'name': 'holocephalan'}, {'id': 1647, 'synset': 'chimaera.n.03', 'name': 'chimaera'}, {'id': 1648, 'synset': 'rabbitfish.n.01', 'name': 'rabbitfish'}, {'id': 1649, 'synset': 'elasmobranch.n.01', 'name': 'elasmobranch'}, {'id': 1650, 'synset': 'cow_shark.n.01', 'name': 'cow_shark'}, {'id': 1651, 'synset': 'mackerel_shark.n.01', 'name': 'mackerel_shark'}, {'id': 1652, 'synset': 'porbeagle.n.01', 'name': 'porbeagle'}, {'id': 1653, 'synset': 'mako.n.01', 'name': 'mako'}, {'id': 1654, 'synset': 'shortfin_mako.n.01', 'name': 'shortfin_mako'}, {'id': 1655, 'synset': 'longfin_mako.n.01', 'name': 'longfin_mako'}, {'id': 1656, 'synset': 'bonito_shark.n.01', 'name': 'bonito_shark'}, {'id': 1657, 'synset': 'great_white_shark.n.01', 'name': 'great_white_shark'}, {'id': 1658, 'synset': 'basking_shark.n.01', 'name': 'basking_shark'}, {'id': 1659, 'synset': 'thresher.n.02', 'name': 'thresher'}, {'id': 1660, 'synset': 'carpet_shark.n.01', 'name': 'carpet_shark'}, {'id': 1661, 'synset': 'nurse_shark.n.01', 'name': 'nurse_shark'}, {'id': 1662, 'synset': 'sand_tiger.n.01', 'name': 'sand_tiger'}, {'id': 1663, 'synset': 'whale_shark.n.01', 'name': 'whale_shark'}, {'id': 1664, 'synset': 'requiem_shark.n.01', 'name': 'requiem_shark'}, {'id': 1665, 'synset': 'bull_shark.n.01', 'name': 'bull_shark'}, {'id': 1666, 'synset': 'sandbar_shark.n.02', 'name': 'sandbar_shark'}, {'id': 1667, 'synset': 'blacktip_shark.n.01', 'name': 'blacktip_shark'}, {'id': 1668, 'synset': 'whitetip_shark.n.02', 'name': 'whitetip_shark'}, {'id': 1669, 'synset': 'dusky_shark.n.01', 'name': 'dusky_shark'}, {'id': 1670, 'synset': 'lemon_shark.n.01', 'name': 'lemon_shark'}, {'id': 1671, 'synset': 'blue_shark.n.01', 'name': 'blue_shark'}, {'id': 1672, 'synset': 'tiger_shark.n.01', 'name': 'tiger_shark'}, {'id': 1673, 'synset': 'soupfin_shark.n.01', 'name': 'soupfin_shark'}, {'id': 1674, 'synset': 'dogfish.n.02', 'name': 'dogfish'}, {'id': 1675, 'synset': 'smooth_dogfish.n.01', 'name': 'smooth_dogfish'}, {'id': 1676, 'synset': 'smoothhound.n.01', 'name': 'smoothhound'}, {'id': 1677, 'synset': 'american_smooth_dogfish.n.01', 'name': 'American_smooth_dogfish'}, {'id': 1678, 'synset': 'florida_smoothhound.n.01', 'name': 'Florida_smoothhound'}, {'id': 1679, 'synset': 'whitetip_shark.n.01', 'name': 'whitetip_shark'}, {'id': 1680, 'synset': 'spiny_dogfish.n.01', 'name': 'spiny_dogfish'}, {'id': 1681, 'synset': 'atlantic_spiny_dogfish.n.01', 'name': 'Atlantic_spiny_dogfish'}, {'id': 1682, 'synset': 'pacific_spiny_dogfish.n.01', 'name': 'Pacific_spiny_dogfish'}, {'id': 1683, 'synset': 'hammerhead.n.03', 'name': 'hammerhead'}, {'id': 1684, 'synset': 'smooth_hammerhead.n.01', 'name': 'smooth_hammerhead'}, {'id': 1685, 'synset': 'smalleye_hammerhead.n.01', 'name': 'smalleye_hammerhead'}, {'id': 1686, 'synset': 'shovelhead.n.01', 'name': 'shovelhead'}, {'id': 1687, 'synset': 'angel_shark.n.01', 'name': 'angel_shark'}, {'id': 1688, 'synset': 'ray.n.07', 'name': 'ray'}, {'id': 1689, 'synset': 'electric_ray.n.01', 'name': 'electric_ray'}, {'id': 1690, 'synset': 'sawfish.n.01', 'name': 'sawfish'}, {'id': 1691, 'synset': 'smalltooth_sawfish.n.01', 'name': 'smalltooth_sawfish'}, {'id': 1692, 'synset': 'guitarfish.n.01', 'name': 'guitarfish'}, {'id': 1693, 'synset': 'stingray.n.01', 'name': 'stingray'}, {'id': 1694, 'synset': 'roughtail_stingray.n.01', 'name': 'roughtail_stingray'}, {'id': 1695, 'synset': 'butterfly_ray.n.01', 'name': 'butterfly_ray'}, {'id': 1696, 'synset': 'eagle_ray.n.01', 'name': 'eagle_ray'}, {'id': 1697, 'synset': 'spotted_eagle_ray.n.01', 'name': 'spotted_eagle_ray'}, {'id': 1698, 'synset': 'cownose_ray.n.01', 'name': 'cownose_ray'}, {'id': 1699, 'synset': 'manta.n.02', 'name': 'manta'}, {'id': 1700, 'synset': 'atlantic_manta.n.01', 'name': 'Atlantic_manta'}, {'id': 1701, 'synset': 'devil_ray.n.01', 'name': 'devil_ray'}, {'id': 1702, 'synset': 'skate.n.02', 'name': 'skate'}, {'id': 1703, 'synset': 'grey_skate.n.01', 'name': 'grey_skate'}, {'id': 1704, 'synset': 'little_skate.n.01', 'name': 'little_skate'}, {'id': 1705, 'synset': 'thorny_skate.n.01', 'name': 'thorny_skate'}, {'id': 1706, 'synset': 'barndoor_skate.n.01', 'name': 'barndoor_skate'}, {'id': 1707, 'synset': 'dickeybird.n.01', 'name': 'dickeybird'}, {'id': 1708, 'synset': 'fledgling.n.02', 'name': 'fledgling'}, {'id': 1709, 'synset': 'nestling.n.01', 'name': 'nestling'}, {'id': 1710, 'synset': 'cock.n.05', 'name': 'cock'}, {'id': 1711, 'synset': 'gamecock.n.01', 'name': 'gamecock'}, {'id': 1712, 'synset': 'hen.n.02', 'name': 'hen'}, {'id': 1713, 'synset': 'nester.n.02', 'name': 'nester'}, {'id': 1714, 'synset': 'night_bird.n.01', 'name': 'night_bird'}, {'id': 1715, 'synset': 'night_raven.n.02', 'name': 'night_raven'}, {'id': 1716, 'synset': 'bird_of_passage.n.02', 'name': 'bird_of_passage'}, {'id': 1717, 'synset': 'archaeopteryx.n.01', 'name': 'archaeopteryx'}, {'id': 1718, 'synset': 'archaeornis.n.01', 'name': 'archaeornis'}, {'id': 1719, 'synset': 'ratite.n.01', 'name': 'ratite'}, {'id': 1720, 'synset': 'carinate.n.01', 'name': 'carinate'}, {'id': 1721, 'synset': 'cassowary.n.01', 'name': 'cassowary'}, {'id': 1722, 'synset': 'emu.n.02', 'name': 'emu'}, {'id': 1723, 'synset': 'kiwi.n.04', 'name': 'kiwi'}, {'id': 1724, 'synset': 'rhea.n.03', 'name': 'rhea'}, {'id': 1725, 'synset': 'rhea.n.02', 'name': 'rhea'}, {'id': 1726, 'synset': 'elephant_bird.n.01', 'name': 'elephant_bird'}, {'id': 1727, 'synset': 'moa.n.01', 'name': 'moa'}, {'id': 1728, 'synset': 'passerine.n.01', 'name': 'passerine'}, {'id': 1729, 'synset': 'nonpasserine_bird.n.01', 'name': 'nonpasserine_bird'}, {'id': 1730, 'synset': 'oscine.n.01', 'name': 'oscine'}, {'id': 1731, 'synset': 'songbird.n.01', 'name': 'songbird'}, {'id': 1732, 'synset': 'honey_eater.n.01', 'name': 'honey_eater'}, {'id': 1733, 'synset': 'accentor.n.01', 'name': 'accentor'}, {'id': 1734, 'synset': 'hedge_sparrow.n.01', 'name': 'hedge_sparrow'}, {'id': 1735, 'synset': 'lark.n.03', 'name': 'lark'}, {'id': 1736, 'synset': 'skylark.n.01', 'name': 'skylark'}, {'id': 1737, 'synset': 'wagtail.n.01', 'name': 'wagtail'}, {'id': 1738, 'synset': 'pipit.n.01', 'name': 'pipit'}, {'id': 1739, 'synset': 'meadow_pipit.n.01', 'name': 'meadow_pipit'}, {'id': 1740, 'synset': 'finch.n.01', 'name': 'finch'}, {'id': 1741, 'synset': 'chaffinch.n.01', 'name': 'chaffinch'}, {'id': 1742, 'synset': 'brambling.n.01', 'name': 'brambling'}, {'id': 1743, 'synset': 'goldfinch.n.02', 'name': 'goldfinch'}, {'id': 1744, 'synset': 'linnet.n.02', 'name': 'linnet'}, {'id': 1745, 'synset': 'siskin.n.01', 'name': 'siskin'}, {'id': 1746, 'synset': 'red_siskin.n.01', 'name': 'red_siskin'}, {'id': 1747, 'synset': 'redpoll.n.02', 'name': 'redpoll'}, {'id': 1748, 'synset': 'redpoll.n.01', 'name': 'redpoll'}, {'id': 1749, 'synset': 'new_world_goldfinch.n.01', 'name': 'New_World_goldfinch'}, {'id': 1750, 'synset': 'pine_siskin.n.01', 'name': 'pine_siskin'}, {'id': 1751, 'synset': 'house_finch.n.01', 'name': 'house_finch'}, {'id': 1752, 'synset': 'purple_finch.n.01', 'name': 'purple_finch'}, {'id': 1753, 'synset': 'canary.n.04', 'name': 'canary'}, {'id': 1754, 'synset': 'common_canary.n.01', 'name': 'common_canary'}, {'id': 1755, 'synset': 'serin.n.01', 'name': 'serin'}, {'id': 1756, 'synset': 'crossbill.n.01', 'name': 'crossbill'}, {'id': 1757, 'synset': 'bullfinch.n.02', 'name': 'bullfinch'}, {'id': 1758, 'synset': 'junco.n.01', 'name': 'junco'}, {'id': 1759, 'synset': 'dark-eyed_junco.n.01', 'name': 'dark-eyed_junco'}, {'id': 1760, 'synset': 'new_world_sparrow.n.01', 'name': 'New_World_sparrow'}, {'id': 1761, 'synset': 'vesper_sparrow.n.01', 'name': 'vesper_sparrow'}, {'id': 1762, 'synset': 'white-throated_sparrow.n.01', 'name': 'white-throated_sparrow'}, {'id': 1763, 'synset': 'white-crowned_sparrow.n.01', 'name': 'white-crowned_sparrow'}, {'id': 1764, 'synset': 'chipping_sparrow.n.01', 'name': 'chipping_sparrow'}, {'id': 1765, 'synset': 'field_sparrow.n.01', 'name': 'field_sparrow'}, {'id': 1766, 'synset': 'tree_sparrow.n.02', 'name': 'tree_sparrow'}, {'id': 1767, 'synset': 'song_sparrow.n.01', 'name': 'song_sparrow'}, {'id': 1768, 'synset': 'swamp_sparrow.n.01', 'name': 'swamp_sparrow'}, {'id': 1769, 'synset': 'bunting.n.02', 'name': 'bunting'}, {'id': 1770, 'synset': 'indigo_bunting.n.01', 'name': 'indigo_bunting'}, {'id': 1771, 'synset': 'ortolan.n.01', 'name': 'ortolan'}, {'id': 1772, 'synset': 'reed_bunting.n.01', 'name': 'reed_bunting'}, {'id': 1773, 'synset': 'yellowhammer.n.02', 'name': 'yellowhammer'}, {'id': 1774, 'synset': 'yellow-breasted_bunting.n.01', 'name': 'yellow-breasted_bunting'}, {'id': 1775, 'synset': 'snow_bunting.n.01', 'name': 'snow_bunting'}, {'id': 1776, 'synset': 'honeycreeper.n.02', 'name': 'honeycreeper'}, {'id': 1777, 'synset': 'banana_quit.n.01', 'name': 'banana_quit'}, {'id': 1778, 'synset': 'sparrow.n.01', 'name': 'sparrow'}, {'id': 1779, 'synset': 'english_sparrow.n.01', 'name': 'English_sparrow'}, {'id': 1780, 'synset': 'tree_sparrow.n.01', 'name': 'tree_sparrow'}, {'id': 1781, 'synset': 'grosbeak.n.01', 'name': 'grosbeak'}, {'id': 1782, 'synset': 'evening_grosbeak.n.01', 'name': 'evening_grosbeak'}, {'id': 1783, 'synset': 'hawfinch.n.01', 'name': 'hawfinch'}, {'id': 1784, 'synset': 'pine_grosbeak.n.01', 'name': 'pine_grosbeak'}, {'id': 1785, 'synset': 'cardinal.n.04', 'name': 'cardinal'}, {'id': 1786, 'synset': 'pyrrhuloxia.n.01', 'name': 'pyrrhuloxia'}, {'id': 1787, 'synset': 'towhee.n.01', 'name': 'towhee'}, {'id': 1788, 'synset': 'chewink.n.01', 'name': 'chewink'}, {'id': 1789, 'synset': 'green-tailed_towhee.n.01', 'name': 'green-tailed_towhee'}, {'id': 1790, 'synset': 'weaver.n.02', 'name': 'weaver'}, {'id': 1791, 'synset': 'baya.n.01', 'name': 'baya'}, {'id': 1792, 'synset': 'whydah.n.01', 'name': 'whydah'}, {'id': 1793, 'synset': 'java_sparrow.n.01', 'name': 'Java_sparrow'}, {'id': 1794, 'synset': 'avadavat.n.01', 'name': 'avadavat'}, {'id': 1795, 'synset': 'grassfinch.n.01', 'name': 'grassfinch'}, {'id': 1796, 'synset': 'zebra_finch.n.01', 'name': 'zebra_finch'}, {'id': 1797, 'synset': 'honeycreeper.n.01', 'name': 'honeycreeper'}, {'id': 1798, 'synset': 'lyrebird.n.01', 'name': 'lyrebird'}, {'id': 1799, 'synset': 'scrubbird.n.01', 'name': 'scrubbird'}, {'id': 1800, 'synset': 'broadbill.n.04', 'name': 'broadbill'}, {'id': 1801, 'synset': 'tyrannid.n.01', 'name': 'tyrannid'}, {'id': 1802, 'synset': 'new_world_flycatcher.n.01', 'name': 'New_World_flycatcher'}, {'id': 1803, 'synset': 'kingbird.n.01', 'name': 'kingbird'}, {'id': 1804, 'synset': 'arkansas_kingbird.n.01', 'name': 'Arkansas_kingbird'}, {'id': 1805, 'synset': "cassin's_kingbird.n.01", 'name': "Cassin's_kingbird"}, {'id': 1806, 'synset': 'eastern_kingbird.n.01', 'name': 'eastern_kingbird'}, {'id': 1807, 'synset': 'grey_kingbird.n.01', 'name': 'grey_kingbird'}, {'id': 1808, 'synset': 'pewee.n.01', 'name': 'pewee'}, {'id': 1809, 'synset': 'western_wood_pewee.n.01', 'name': 'western_wood_pewee'}, {'id': 1810, 'synset': 'phoebe.n.03', 'name': 'phoebe'}, {'id': 1811, 'synset': 'vermillion_flycatcher.n.01', 'name': 'vermillion_flycatcher'}, {'id': 1812, 'synset': 'cotinga.n.01', 'name': 'cotinga'}, {'id': 1813, 'synset': 'cock_of_the_rock.n.02', 'name': 'cock_of_the_rock'}, {'id': 1814, 'synset': 'cock_of_the_rock.n.01', 'name': 'cock_of_the_rock'}, {'id': 1815, 'synset': 'manakin.n.03', 'name': 'manakin'}, {'id': 1816, 'synset': 'bellbird.n.01', 'name': 'bellbird'}, {'id': 1817, 'synset': 'umbrella_bird.n.01', 'name': 'umbrella_bird'}, {'id': 1818, 'synset': 'ovenbird.n.02', 'name': 'ovenbird'}, {'id': 1819, 'synset': 'antbird.n.01', 'name': 'antbird'}, {'id': 1820, 'synset': 'ant_thrush.n.01', 'name': 'ant_thrush'}, {'id': 1821, 'synset': 'ant_shrike.n.01', 'name': 'ant_shrike'}, {'id': 1822, 'synset': 'spotted_antbird.n.01', 'name': 'spotted_antbird'}, {'id': 1823, 'synset': 'woodhewer.n.01', 'name': 'woodhewer'}, {'id': 1824, 'synset': 'pitta.n.01', 'name': 'pitta'}, {'id': 1825, 'synset': 'scissortail.n.01', 'name': 'scissortail'}, {'id': 1826, 'synset': 'old_world_flycatcher.n.01', 'name': 'Old_World_flycatcher'}, {'id': 1827, 'synset': 'spotted_flycatcher.n.01', 'name': 'spotted_flycatcher'}, {'id': 1828, 'synset': 'thickhead.n.01', 'name': 'thickhead'}, {'id': 1829, 'synset': 'thrush.n.03', 'name': 'thrush'}, {'id': 1830, 'synset': 'missel_thrush.n.01', 'name': 'missel_thrush'}, {'id': 1831, 'synset': 'song_thrush.n.01', 'name': 'song_thrush'}, {'id': 1832, 'synset': 'fieldfare.n.01', 'name': 'fieldfare'}, {'id': 1833, 'synset': 'redwing.n.02', 'name': 'redwing'}, {'id': 1834, 'synset': 'blackbird.n.02', 'name': 'blackbird'}, {'id': 1835, 'synset': 'ring_ouzel.n.01', 'name': 'ring_ouzel'}, {'id': 1836, 'synset': 'robin.n.02', 'name': 'robin'}, {'id': 1837, 'synset': 'clay-colored_robin.n.01', 'name': 'clay-colored_robin'}, {'id': 1838, 'synset': 'hermit_thrush.n.01', 'name': 'hermit_thrush'}, {'id': 1839, 'synset': 'veery.n.01', 'name': 'veery'}, {'id': 1840, 'synset': 'wood_thrush.n.01', 'name': 'wood_thrush'}, {'id': 1841, 'synset': 'nightingale.n.01', 'name': 'nightingale'}, {'id': 1842, 'synset': 'thrush_nightingale.n.01', 'name': 'thrush_nightingale'}, {'id': 1843, 'synset': 'bulbul.n.01', 'name': 'bulbul'}, {'id': 1844, 'synset': 'old_world_chat.n.01', 'name': 'Old_World_chat'}, {'id': 1845, 'synset': 'stonechat.n.01', 'name': 'stonechat'}, {'id': 1846, 'synset': 'whinchat.n.01', 'name': 'whinchat'}, {'id': 1847, 'synset': 'solitaire.n.03', 'name': 'solitaire'}, {'id': 1848, 'synset': 'redstart.n.02', 'name': 'redstart'}, {'id': 1849, 'synset': 'wheatear.n.01', 'name': 'wheatear'}, {'id': 1850, 'synset': 'bluebird.n.02', 'name': 'bluebird'}, {'id': 1851, 'synset': 'robin.n.01', 'name': 'robin'}, {'id': 1852, 'synset': 'bluethroat.n.01', 'name': 'bluethroat'}, {'id': 1853, 'synset': 'warbler.n.02', 'name': 'warbler'}, {'id': 1854, 'synset': 'gnatcatcher.n.01', 'name': 'gnatcatcher'}, {'id': 1855, 'synset': 'kinglet.n.01', 'name': 'kinglet'}, {'id': 1856, 'synset': 'goldcrest.n.01', 'name': 'goldcrest'}, {'id': 1857, 'synset': 'gold-crowned_kinglet.n.01', 'name': 'gold-crowned_kinglet'}, {'id': 1858, 'synset': 'ruby-crowned_kinglet.n.01', 'name': 'ruby-crowned_kinglet'}, {'id': 1859, 'synset': 'old_world_warbler.n.01', 'name': 'Old_World_warbler'}, {'id': 1860, 'synset': 'blackcap.n.04', 'name': 'blackcap'}, {'id': 1861, 'synset': 'greater_whitethroat.n.01', 'name': 'greater_whitethroat'}, {'id': 1862, 'synset': 'lesser_whitethroat.n.01', 'name': 'lesser_whitethroat'}, {'id': 1863, 'synset': 'wood_warbler.n.02', 'name': 'wood_warbler'}, {'id': 1864, 'synset': 'sedge_warbler.n.01', 'name': 'sedge_warbler'}, {'id': 1865, 'synset': 'wren_warbler.n.01', 'name': 'wren_warbler'}, {'id': 1866, 'synset': 'tailorbird.n.01', 'name': 'tailorbird'}, {'id': 1867, 'synset': 'babbler.n.02', 'name': 'babbler'}, {'id': 1868, 'synset': 'new_world_warbler.n.01', 'name': 'New_World_warbler'}, {'id': 1869, 'synset': 'parula_warbler.n.01', 'name': 'parula_warbler'}, {'id': 1870, 'synset': "wilson's_warbler.n.01", 'name': "Wilson's_warbler"}, {'id': 1871, 'synset': 'flycatching_warbler.n.01', 'name': 'flycatching_warbler'}, {'id': 1872, 'synset': 'american_redstart.n.01', 'name': 'American_redstart'}, {'id': 1873, 'synset': 'cape_may_warbler.n.01', 'name': 'Cape_May_warbler'}, {'id': 1874, 'synset': 'yellow_warbler.n.01', 'name': 'yellow_warbler'}, {'id': 1875, 'synset': 'blackburn.n.01', 'name': 'Blackburn'}, {'id': 1876, 'synset': "audubon's_warbler.n.01", 'name': "Audubon's_warbler"}, {'id': 1877, 'synset': 'myrtle_warbler.n.01', 'name': 'myrtle_warbler'}, {'id': 1878, 'synset': 'blackpoll.n.01', 'name': 'blackpoll'}, {'id': 1879, 'synset': 'new_world_chat.n.01', 'name': 'New_World_chat'}, {'id': 1880, 'synset': 'yellow-breasted_chat.n.01', 'name': 'yellow-breasted_chat'}, {'id': 1881, 'synset': 'ovenbird.n.01', 'name': 'ovenbird'}, {'id': 1882, 'synset': 'water_thrush.n.01', 'name': 'water_thrush'}, {'id': 1883, 'synset': 'yellowthroat.n.01', 'name': 'yellowthroat'}, {'id': 1884, 'synset': 'common_yellowthroat.n.01', 'name': 'common_yellowthroat'}, {'id': 1885, 'synset': 'riflebird.n.01', 'name': 'riflebird'}, {'id': 1886, 'synset': 'new_world_oriole.n.01', 'name': 'New_World_oriole'}, {'id': 1887, 'synset': 'northern_oriole.n.01', 'name': 'northern_oriole'}, {'id': 1888, 'synset': 'baltimore_oriole.n.01', 'name': 'Baltimore_oriole'}, {'id': 1889, 'synset': "bullock's_oriole.n.01", 'name': "Bullock's_oriole"}, {'id': 1890, 'synset': 'orchard_oriole.n.01', 'name': 'orchard_oriole'}, {'id': 1891, 'synset': 'meadowlark.n.01', 'name': 'meadowlark'}, {'id': 1892, 'synset': 'eastern_meadowlark.n.01', 'name': 'eastern_meadowlark'}, {'id': 1893, 'synset': 'western_meadowlark.n.01', 'name': 'western_meadowlark'}, {'id': 1894, 'synset': 'cacique.n.01', 'name': 'cacique'}, {'id': 1895, 'synset': 'bobolink.n.01', 'name': 'bobolink'}, {'id': 1896, 'synset': 'new_world_blackbird.n.01', 'name': 'New_World_blackbird'}, {'id': 1897, 'synset': 'grackle.n.02', 'name': 'grackle'}, {'id': 1898, 'synset': 'purple_grackle.n.01', 'name': 'purple_grackle'}, {'id': 1899, 'synset': 'rusty_blackbird.n.01', 'name': 'rusty_blackbird'}, {'id': 1900, 'synset': 'cowbird.n.01', 'name': 'cowbird'}, {'id': 1901, 'synset': 'red-winged_blackbird.n.01', 'name': 'red-winged_blackbird'}, {'id': 1902, 'synset': 'old_world_oriole.n.01', 'name': 'Old_World_oriole'}, {'id': 1903, 'synset': 'golden_oriole.n.01', 'name': 'golden_oriole'}, {'id': 1904, 'synset': 'fig-bird.n.01', 'name': 'fig-bird'}, {'id': 1905, 'synset': 'starling.n.01', 'name': 'starling'}, {'id': 1906, 'synset': 'common_starling.n.01', 'name': 'common_starling'}, {'id': 1907, 'synset': 'rose-colored_starling.n.01', 'name': 'rose-colored_starling'}, {'id': 1908, 'synset': 'myna.n.01', 'name': 'myna'}, {'id': 1909, 'synset': 'crested_myna.n.01', 'name': 'crested_myna'}, {'id': 1910, 'synset': 'hill_myna.n.01', 'name': 'hill_myna'}, {'id': 1911, 'synset': 'corvine_bird.n.01', 'name': 'corvine_bird'}, {'id': 1912, 'synset': 'american_crow.n.01', 'name': 'American_crow'}, {'id': 1913, 'synset': 'raven.n.01', 'name': 'raven'}, {'id': 1914, 'synset': 'rook.n.02', 'name': 'rook'}, {'id': 1915, 'synset': 'jackdaw.n.01', 'name': 'jackdaw'}, {'id': 1916, 'synset': 'chough.n.01', 'name': 'chough'}, {'id': 1917, 'synset': 'jay.n.02', 'name': 'jay'}, {'id': 1918, 'synset': 'old_world_jay.n.01', 'name': 'Old_World_jay'}, {'id': 1919, 'synset': 'common_european_jay.n.01', 'name': 'common_European_jay'}, {'id': 1920, 'synset': 'new_world_jay.n.01', 'name': 'New_World_jay'}, {'id': 1921, 'synset': 'blue_jay.n.01', 'name': 'blue_jay'}, {'id': 1922, 'synset': 'canada_jay.n.01', 'name': 'Canada_jay'}, {'id': 1923, 'synset': 'rocky_mountain_jay.n.01', 'name': 'Rocky_Mountain_jay'}, {'id': 1924, 'synset': 'nutcracker.n.03', 'name': 'nutcracker'}, {'id': 1925, 'synset': 'common_nutcracker.n.01', 'name': 'common_nutcracker'}, {'id': 1926, 'synset': "clark's_nutcracker.n.01", 'name': "Clark's_nutcracker"}, {'id': 1927, 'synset': 'magpie.n.01', 'name': 'magpie'}, {'id': 1928, 'synset': 'european_magpie.n.01', 'name': 'European_magpie'}, {'id': 1929, 'synset': 'american_magpie.n.01', 'name': 'American_magpie'}, {'id': 1930, 'synset': 'australian_magpie.n.01', 'name': 'Australian_magpie'}, {'id': 1931, 'synset': 'butcherbird.n.02', 'name': 'butcherbird'}, {'id': 1932, 'synset': 'currawong.n.01', 'name': 'currawong'}, {'id': 1933, 'synset': 'piping_crow.n.01', 'name': 'piping_crow'}, {'id': 1934, 'synset': 'wren.n.02', 'name': 'wren'}, {'id': 1935, 'synset': 'winter_wren.n.01', 'name': 'winter_wren'}, {'id': 1936, 'synset': 'house_wren.n.01', 'name': 'house_wren'}, {'id': 1937, 'synset': 'marsh_wren.n.01', 'name': 'marsh_wren'}, {'id': 1938, 'synset': 'long-billed_marsh_wren.n.01', 'name': 'long-billed_marsh_wren'}, {'id': 1939, 'synset': 'sedge_wren.n.01', 'name': 'sedge_wren'}, {'id': 1940, 'synset': 'rock_wren.n.02', 'name': 'rock_wren'}, {'id': 1941, 'synset': 'carolina_wren.n.01', 'name': 'Carolina_wren'}, {'id': 1942, 'synset': 'cactus_wren.n.01', 'name': 'cactus_wren'}, {'id': 1943, 'synset': 'mockingbird.n.01', 'name': 'mockingbird'}, {'id': 1944, 'synset': 'blue_mockingbird.n.01', 'name': 'blue_mockingbird'}, {'id': 1945, 'synset': 'catbird.n.02', 'name': 'catbird'}, {'id': 1946, 'synset': 'thrasher.n.02', 'name': 'thrasher'}, {'id': 1947, 'synset': 'brown_thrasher.n.01', 'name': 'brown_thrasher'}, {'id': 1948, 'synset': 'new_zealand_wren.n.01', 'name': 'New_Zealand_wren'}, {'id': 1949, 'synset': 'rock_wren.n.01', 'name': 'rock_wren'}, {'id': 1950, 'synset': 'rifleman_bird.n.01', 'name': 'rifleman_bird'}, {'id': 1951, 'synset': 'creeper.n.03', 'name': 'creeper'}, {'id': 1952, 'synset': 'brown_creeper.n.01', 'name': 'brown_creeper'}, {'id': 1953, 'synset': 'european_creeper.n.01', 'name': 'European_creeper'}, {'id': 1954, 'synset': 'wall_creeper.n.01', 'name': 'wall_creeper'}, {'id': 1955, 'synset': 'european_nuthatch.n.01', 'name': 'European_nuthatch'}, {'id': 1956, 'synset': 'red-breasted_nuthatch.n.01', 'name': 'red-breasted_nuthatch'}, {'id': 1957, 'synset': 'white-breasted_nuthatch.n.01', 'name': 'white-breasted_nuthatch'}, {'id': 1958, 'synset': 'titmouse.n.01', 'name': 'titmouse'}, {'id': 1959, 'synset': 'chickadee.n.01', 'name': 'chickadee'}, {'id': 1960, 'synset': 'black-capped_chickadee.n.01', 'name': 'black-capped_chickadee'}, {'id': 1961, 'synset': 'tufted_titmouse.n.01', 'name': 'tufted_titmouse'}, {'id': 1962, 'synset': 'carolina_chickadee.n.01', 'name': 'Carolina_chickadee'}, {'id': 1963, 'synset': 'blue_tit.n.01', 'name': 'blue_tit'}, {'id': 1964, 'synset': 'bushtit.n.01', 'name': 'bushtit'}, {'id': 1965, 'synset': 'wren-tit.n.01', 'name': 'wren-tit'}, {'id': 1966, 'synset': 'verdin.n.01', 'name': 'verdin'}, {'id': 1967, 'synset': 'fairy_bluebird.n.01', 'name': 'fairy_bluebird'}, {'id': 1968, 'synset': 'swallow.n.03', 'name': 'swallow'}, {'id': 1969, 'synset': 'barn_swallow.n.01', 'name': 'barn_swallow'}, {'id': 1970, 'synset': 'cliff_swallow.n.01', 'name': 'cliff_swallow'}, {'id': 1971, 'synset': 'tree_swallow.n.02', 'name': 'tree_swallow'}, {'id': 1972, 'synset': 'white-bellied_swallow.n.01', 'name': 'white-bellied_swallow'}, {'id': 1973, 'synset': 'martin.n.05', 'name': 'martin'}, {'id': 1974, 'synset': 'house_martin.n.01', 'name': 'house_martin'}, {'id': 1975, 'synset': 'bank_martin.n.01', 'name': 'bank_martin'}, {'id': 1976, 'synset': 'purple_martin.n.01', 'name': 'purple_martin'}, {'id': 1977, 'synset': 'wood_swallow.n.01', 'name': 'wood_swallow'}, {'id': 1978, 'synset': 'tanager.n.01', 'name': 'tanager'}, {'id': 1979, 'synset': 'scarlet_tanager.n.01', 'name': 'scarlet_tanager'}, {'id': 1980, 'synset': 'western_tanager.n.01', 'name': 'western_tanager'}, {'id': 1981, 'synset': 'summer_tanager.n.01', 'name': 'summer_tanager'}, {'id': 1982, 'synset': 'hepatic_tanager.n.01', 'name': 'hepatic_tanager'}, {'id': 1983, 'synset': 'shrike.n.01', 'name': 'shrike'}, {'id': 1984, 'synset': 'butcherbird.n.01', 'name': 'butcherbird'}, {'id': 1985, 'synset': 'european_shrike.n.01', 'name': 'European_shrike'}, {'id': 1986, 'synset': 'northern_shrike.n.01', 'name': 'northern_shrike'}, {'id': 1987, 'synset': 'white-rumped_shrike.n.01', 'name': 'white-rumped_shrike'}, {'id': 1988, 'synset': 'loggerhead_shrike.n.01', 'name': 'loggerhead_shrike'}, {'id': 1989, 'synset': 'migrant_shrike.n.01', 'name': 'migrant_shrike'}, {'id': 1990, 'synset': 'bush_shrike.n.01', 'name': 'bush_shrike'}, {'id': 1991, 'synset': 'black-fronted_bush_shrike.n.01', 'name': 'black-fronted_bush_shrike'}, {'id': 1992, 'synset': 'bowerbird.n.01', 'name': 'bowerbird'}, {'id': 1993, 'synset': 'satin_bowerbird.n.01', 'name': 'satin_bowerbird'}, {'id': 1994, 'synset': 'great_bowerbird.n.01', 'name': 'great_bowerbird'}, {'id': 1995, 'synset': 'water_ouzel.n.01', 'name': 'water_ouzel'}, {'id': 1996, 'synset': 'european_water_ouzel.n.01', 'name': 'European_water_ouzel'}, {'id': 1997, 'synset': 'american_water_ouzel.n.01', 'name': 'American_water_ouzel'}, {'id': 1998, 'synset': 'vireo.n.01', 'name': 'vireo'}, {'id': 1999, 'synset': 'red-eyed_vireo.n.01', 'name': 'red-eyed_vireo'}, {'id': 2000, 'synset': 'solitary_vireo.n.01', 'name': 'solitary_vireo'}, {'id': 2001, 'synset': 'blue-headed_vireo.n.01', 'name': 'blue-headed_vireo'}, {'id': 2002, 'synset': 'waxwing.n.01', 'name': 'waxwing'}, {'id': 2003, 'synset': 'cedar_waxwing.n.01', 'name': 'cedar_waxwing'}, {'id': 2004, 'synset': 'bohemian_waxwing.n.01', 'name': 'Bohemian_waxwing'}, {'id': 2005, 'synset': 'bird_of_prey.n.01', 'name': 'bird_of_prey'}, {'id': 2006, 'synset': 'accipitriformes.n.01', 'name': 'Accipitriformes'}, {'id': 2007, 'synset': 'hawk.n.01', 'name': 'hawk'}, {'id': 2008, 'synset': 'eyas.n.01', 'name': 'eyas'}, {'id': 2009, 'synset': 'tiercel.n.01', 'name': 'tiercel'}, {'id': 2010, 'synset': 'goshawk.n.01', 'name': 'goshawk'}, {'id': 2011, 'synset': 'sparrow_hawk.n.02', 'name': 'sparrow_hawk'}, {'id': 2012, 'synset': "cooper's_hawk.n.01", 'name': "Cooper's_hawk"}, {'id': 2013, 'synset': 'chicken_hawk.n.01', 'name': 'chicken_hawk'}, {'id': 2014, 'synset': 'buteonine.n.01', 'name': 'buteonine'}, {'id': 2015, 'synset': 'redtail.n.01', 'name': 'redtail'}, {'id': 2016, 'synset': 'rough-legged_hawk.n.01', 'name': 'rough-legged_hawk'}, {'id': 2017, 'synset': 'red-shouldered_hawk.n.01', 'name': 'red-shouldered_hawk'}, {'id': 2018, 'synset': 'buzzard.n.02', 'name': 'buzzard'}, {'id': 2019, 'synset': 'honey_buzzard.n.01', 'name': 'honey_buzzard'}, {'id': 2020, 'synset': 'kite.n.04', 'name': 'kite'}, {'id': 2021, 'synset': 'black_kite.n.01', 'name': 'black_kite'}, {'id': 2022, 'synset': 'swallow-tailed_kite.n.01', 'name': 'swallow-tailed_kite'}, {'id': 2023, 'synset': 'white-tailed_kite.n.01', 'name': 'white-tailed_kite'}, {'id': 2024, 'synset': 'harrier.n.03', 'name': 'harrier'}, {'id': 2025, 'synset': 'marsh_harrier.n.01', 'name': 'marsh_harrier'}, {'id': 2026, 'synset': "montagu's_harrier.n.01", 'name': "Montagu's_harrier"}, {'id': 2027, 'synset': 'marsh_hawk.n.01', 'name': 'marsh_hawk'}, {'id': 2028, 'synset': 'harrier_eagle.n.01', 'name': 'harrier_eagle'}, {'id': 2029, 'synset': 'peregrine.n.01', 'name': 'peregrine'}, {'id': 2030, 'synset': 'falcon-gentle.n.01', 'name': 'falcon-gentle'}, {'id': 2031, 'synset': 'gyrfalcon.n.01', 'name': 'gyrfalcon'}, {'id': 2032, 'synset': 'kestrel.n.02', 'name': 'kestrel'}, {'id': 2033, 'synset': 'sparrow_hawk.n.01', 'name': 'sparrow_hawk'}, {'id': 2034, 'synset': 'pigeon_hawk.n.01', 'name': 'pigeon_hawk'}, {'id': 2035, 'synset': 'hobby.n.03', 'name': 'hobby'}, {'id': 2036, 'synset': 'caracara.n.01', 'name': 'caracara'}, {'id': 2037, 'synset': "audubon's_caracara.n.01", 'name': "Audubon's_caracara"}, {'id': 2038, 'synset': 'carancha.n.01', 'name': 'carancha'}, {'id': 2039, 'synset': 'young_bird.n.01', 'name': 'young_bird'}, {'id': 2040, 'synset': 'eaglet.n.01', 'name': 'eaglet'}, {'id': 2041, 'synset': 'harpy.n.04', 'name': 'harpy'}, {'id': 2042, 'synset': 'golden_eagle.n.01', 'name': 'golden_eagle'}, {'id': 2043, 'synset': 'tawny_eagle.n.01', 'name': 'tawny_eagle'}, {'id': 2044, 'synset': 'bald_eagle.n.01', 'name': 'bald_eagle'}, {'id': 2045, 'synset': 'sea_eagle.n.02', 'name': 'sea_eagle'}, {'id': 2046, 'synset': 'kamchatkan_sea_eagle.n.01', 'name': 'Kamchatkan_sea_eagle'}, {'id': 2047, 'synset': 'ern.n.01', 'name': 'ern'}, {'id': 2048, 'synset': 'fishing_eagle.n.01', 'name': 'fishing_eagle'}, {'id': 2049, 'synset': 'osprey.n.01', 'name': 'osprey'}, {'id': 2050, 'synset': 'aegypiidae.n.01', 'name': 'Aegypiidae'}, {'id': 2051, 'synset': 'old_world_vulture.n.01', 'name': 'Old_World_vulture'}, {'id': 2052, 'synset': 'griffon_vulture.n.01', 'name': 'griffon_vulture'}, {'id': 2053, 'synset': 'bearded_vulture.n.01', 'name': 'bearded_vulture'}, {'id': 2054, 'synset': 'egyptian_vulture.n.01', 'name': 'Egyptian_vulture'}, {'id': 2055, 'synset': 'black_vulture.n.02', 'name': 'black_vulture'}, {'id': 2056, 'synset': 'secretary_bird.n.01', 'name': 'secretary_bird'}, {'id': 2057, 'synset': 'new_world_vulture.n.01', 'name': 'New_World_vulture'}, {'id': 2058, 'synset': 'buzzard.n.01', 'name': 'buzzard'}, {'id': 2059, 'synset': 'condor.n.01', 'name': 'condor'}, {'id': 2060, 'synset': 'andean_condor.n.01', 'name': 'Andean_condor'}, {'id': 2061, 'synset': 'california_condor.n.01', 'name': 'California_condor'}, {'id': 2062, 'synset': 'black_vulture.n.01', 'name': 'black_vulture'}, {'id': 2063, 'synset': 'king_vulture.n.01', 'name': 'king_vulture'}, {'id': 2064, 'synset': 'owlet.n.01', 'name': 'owlet'}, {'id': 2065, 'synset': 'little_owl.n.01', 'name': 'little_owl'}, {'id': 2066, 'synset': 'horned_owl.n.01', 'name': 'horned_owl'}, {'id': 2067, 'synset': 'great_horned_owl.n.01', 'name': 'great_horned_owl'}, {'id': 2068, 'synset': 'great_grey_owl.n.01', 'name': 'great_grey_owl'}, {'id': 2069, 'synset': 'tawny_owl.n.01', 'name': 'tawny_owl'}, {'id': 2070, 'synset': 'barred_owl.n.01', 'name': 'barred_owl'}, {'id': 2071, 'synset': 'screech_owl.n.02', 'name': 'screech_owl'}, {'id': 2072, 'synset': 'screech_owl.n.01', 'name': 'screech_owl'}, {'id': 2073, 'synset': 'scops_owl.n.01', 'name': 'scops_owl'}, {'id': 2074, 'synset': 'spotted_owl.n.01', 'name': 'spotted_owl'}, {'id': 2075, 'synset': 'old_world_scops_owl.n.01', 'name': 'Old_World_scops_owl'}, {'id': 2076, 'synset': 'oriental_scops_owl.n.01', 'name': 'Oriental_scops_owl'}, {'id': 2077, 'synset': 'hoot_owl.n.01', 'name': 'hoot_owl'}, {'id': 2078, 'synset': 'hawk_owl.n.01', 'name': 'hawk_owl'}, {'id': 2079, 'synset': 'long-eared_owl.n.01', 'name': 'long-eared_owl'}, {'id': 2080, 'synset': 'laughing_owl.n.01', 'name': 'laughing_owl'}, {'id': 2081, 'synset': 'barn_owl.n.01', 'name': 'barn_owl'}, {'id': 2082, 'synset': 'amphibian.n.03', 'name': 'amphibian'}, {'id': 2083, 'synset': 'ichyostega.n.01', 'name': 'Ichyostega'}, {'id': 2084, 'synset': 'urodele.n.01', 'name': 'urodele'}, {'id': 2085, 'synset': 'salamander.n.01', 'name': 'salamander'}, {'id': 2086, 'synset': 'european_fire_salamander.n.01', 'name': 'European_fire_salamander'}, {'id': 2087, 'synset': 'spotted_salamander.n.02', 'name': 'spotted_salamander'}, {'id': 2088, 'synset': 'alpine_salamander.n.01', 'name': 'alpine_salamander'}, {'id': 2089, 'synset': 'newt.n.01', 'name': 'newt'}, {'id': 2090, 'synset': 'common_newt.n.01', 'name': 'common_newt'}, {'id': 2091, 'synset': 'red_eft.n.01', 'name': 'red_eft'}, {'id': 2092, 'synset': 'pacific_newt.n.01', 'name': 'Pacific_newt'}, {'id': 2093, 'synset': 'rough-skinned_newt.n.01', 'name': 'rough-skinned_newt'}, {'id': 2094, 'synset': 'california_newt.n.01', 'name': 'California_newt'}, {'id': 2095, 'synset': 'eft.n.01', 'name': 'eft'}, {'id': 2096, 'synset': 'ambystomid.n.01', 'name': 'ambystomid'}, {'id': 2097, 'synset': 'mole_salamander.n.01', 'name': 'mole_salamander'}, {'id': 2098, 'synset': 'spotted_salamander.n.01', 'name': 'spotted_salamander'}, {'id': 2099, 'synset': 'tiger_salamander.n.01', 'name': 'tiger_salamander'}, {'id': 2100, 'synset': 'axolotl.n.01', 'name': 'axolotl'}, {'id': 2101, 'synset': 'waterdog.n.01', 'name': 'waterdog'}, {'id': 2102, 'synset': 'hellbender.n.01', 'name': 'hellbender'}, {'id': 2103, 'synset': 'giant_salamander.n.01', 'name': 'giant_salamander'}, {'id': 2104, 'synset': 'olm.n.01', 'name': 'olm'}, {'id': 2105, 'synset': 'mud_puppy.n.01', 'name': 'mud_puppy'}, {'id': 2106, 'synset': 'dicamptodon.n.01', 'name': 'dicamptodon'}, {'id': 2107, 'synset': 'pacific_giant_salamander.n.01', 'name': 'Pacific_giant_salamander'}, {'id': 2108, 'synset': 'olympic_salamander.n.01', 'name': 'olympic_salamander'}, {'id': 2109, 'synset': 'lungless_salamander.n.01', 'name': 'lungless_salamander'}, {'id': 2110, 'synset': 'eastern_red-backed_salamander.n.01', 'name': 'eastern_red-backed_salamander'}, {'id': 2111, 'synset': 'western_red-backed_salamander.n.01', 'name': 'western_red-backed_salamander'}, {'id': 2112, 'synset': 'dusky_salamander.n.01', 'name': 'dusky_salamander'}, {'id': 2113, 'synset': 'climbing_salamander.n.01', 'name': 'climbing_salamander'}, {'id': 2114, 'synset': 'arboreal_salamander.n.01', 'name': 'arboreal_salamander'}, {'id': 2115, 'synset': 'slender_salamander.n.01', 'name': 'slender_salamander'}, {'id': 2116, 'synset': 'web-toed_salamander.n.01', 'name': 'web-toed_salamander'}, {'id': 2117, 'synset': 'shasta_salamander.n.01', 'name': 'Shasta_salamander'}, {'id': 2118, 'synset': 'limestone_salamander.n.01', 'name': 'limestone_salamander'}, {'id': 2119, 'synset': 'amphiuma.n.01', 'name': 'amphiuma'}, {'id': 2120, 'synset': 'siren.n.05', 'name': 'siren'}, {'id': 2121, 'synset': 'true_frog.n.01', 'name': 'true_frog'}, {'id': 2122, 'synset': 'wood-frog.n.01', 'name': 'wood-frog'}, {'id': 2123, 'synset': 'leopard_frog.n.01', 'name': 'leopard_frog'}, {'id': 2124, 'synset': 'bullfrog.n.01', 'name': 'bullfrog'}, {'id': 2125, 'synset': 'green_frog.n.01', 'name': 'green_frog'}, {'id': 2126, 'synset': 'cascades_frog.n.01', 'name': 'cascades_frog'}, {'id': 2127, 'synset': 'goliath_frog.n.01', 'name': 'goliath_frog'}, {'id': 2128, 'synset': 'pickerel_frog.n.01', 'name': 'pickerel_frog'}, {'id': 2129, 'synset': 'tarahumara_frog.n.01', 'name': 'tarahumara_frog'}, {'id': 2130, 'synset': 'grass_frog.n.01', 'name': 'grass_frog'}, {'id': 2131, 'synset': 'leptodactylid_frog.n.01', 'name': 'leptodactylid_frog'}, {'id': 2132, 'synset': 'robber_frog.n.02', 'name': 'robber_frog'}, {'id': 2133, 'synset': 'barking_frog.n.01', 'name': 'barking_frog'}, {'id': 2134, 'synset': 'crapaud.n.01', 'name': 'crapaud'}, {'id': 2135, 'synset': 'tree_frog.n.02', 'name': 'tree_frog'}, {'id': 2136, 'synset': 'tailed_frog.n.01', 'name': 'tailed_frog'}, {'id': 2137, 'synset': 'liopelma_hamiltoni.n.01', 'name': 'Liopelma_hamiltoni'}, {'id': 2138, 'synset': 'true_toad.n.01', 'name': 'true_toad'}, {'id': 2139, 'synset': 'bufo.n.01', 'name': 'bufo'}, {'id': 2140, 'synset': 'agua.n.01', 'name': 'agua'}, {'id': 2141, 'synset': 'european_toad.n.01', 'name': 'European_toad'}, {'id': 2142, 'synset': 'natterjack.n.01', 'name': 'natterjack'}, {'id': 2143, 'synset': 'american_toad.n.01', 'name': 'American_toad'}, {'id': 2144, 'synset': 'eurasian_green_toad.n.01', 'name': 'Eurasian_green_toad'}, {'id': 2145, 'synset': 'american_green_toad.n.01', 'name': 'American_green_toad'}, {'id': 2146, 'synset': 'yosemite_toad.n.01', 'name': 'Yosemite_toad'}, {'id': 2147, 'synset': 'texas_toad.n.01', 'name': 'Texas_toad'}, {'id': 2148, 'synset': 'southwestern_toad.n.01', 'name': 'southwestern_toad'}, {'id': 2149, 'synset': 'western_toad.n.01', 'name': 'western_toad'}, {'id': 2150, 'synset': 'obstetrical_toad.n.01', 'name': 'obstetrical_toad'}, {'id': 2151, 'synset': 'midwife_toad.n.01', 'name': 'midwife_toad'}, {'id': 2152, 'synset': 'fire-bellied_toad.n.01', 'name': 'fire-bellied_toad'}, {'id': 2153, 'synset': 'spadefoot.n.01', 'name': 'spadefoot'}, {'id': 2154, 'synset': 'western_spadefoot.n.01', 'name': 'western_spadefoot'}, {'id': 2155, 'synset': 'southern_spadefoot.n.01', 'name': 'southern_spadefoot'}, {'id': 2156, 'synset': 'plains_spadefoot.n.01', 'name': 'plains_spadefoot'}, {'id': 2157, 'synset': 'tree_toad.n.01', 'name': 'tree_toad'}, {'id': 2158, 'synset': 'spring_peeper.n.01', 'name': 'spring_peeper'}, {'id': 2159, 'synset': 'pacific_tree_toad.n.01', 'name': 'Pacific_tree_toad'}, {'id': 2160, 'synset': 'canyon_treefrog.n.01', 'name': 'canyon_treefrog'}, {'id': 2161, 'synset': 'chameleon_tree_frog.n.01', 'name': 'chameleon_tree_frog'}, {'id': 2162, 'synset': 'cricket_frog.n.01', 'name': 'cricket_frog'}, {'id': 2163, 'synset': 'northern_cricket_frog.n.01', 'name': 'northern_cricket_frog'}, {'id': 2164, 'synset': 'eastern_cricket_frog.n.01', 'name': 'eastern_cricket_frog'}, {'id': 2165, 'synset': 'chorus_frog.n.01', 'name': 'chorus_frog'}, {'id': 2166, 'synset': 'lowland_burrowing_treefrog.n.01', 'name': 'lowland_burrowing_treefrog'}, {'id': 2167, 'synset': 'western_narrow-mouthed_toad.n.01', 'name': 'western_narrow-mouthed_toad'}, {'id': 2168, 'synset': 'eastern_narrow-mouthed_toad.n.01', 'name': 'eastern_narrow-mouthed_toad'}, {'id': 2169, 'synset': 'sheep_frog.n.01', 'name': 'sheep_frog'}, {'id': 2170, 'synset': 'tongueless_frog.n.01', 'name': 'tongueless_frog'}, {'id': 2171, 'synset': 'surinam_toad.n.01', 'name': 'Surinam_toad'}, {'id': 2172, 'synset': 'african_clawed_frog.n.01', 'name': 'African_clawed_frog'}, {'id': 2173, 'synset': 'south_american_poison_toad.n.01', 'name': 'South_American_poison_toad'}, {'id': 2174, 'synset': 'caecilian.n.01', 'name': 'caecilian'}, {'id': 2175, 'synset': 'reptile.n.01', 'name': 'reptile'}, {'id': 2176, 'synset': 'anapsid.n.01', 'name': 'anapsid'}, {'id': 2177, 'synset': 'diapsid.n.01', 'name': 'diapsid'}, {'id': 2178, 'synset': 'diapsida.n.01', 'name': 'Diapsida'}, {'id': 2179, 'synset': 'chelonian.n.01', 'name': 'chelonian'}, {'id': 2180, 'synset': 'sea_turtle.n.01', 'name': 'sea_turtle'}, {'id': 2181, 'synset': 'green_turtle.n.01', 'name': 'green_turtle'}, {'id': 2182, 'synset': 'loggerhead.n.02', 'name': 'loggerhead'}, {'id': 2183, 'synset': 'ridley.n.01', 'name': 'ridley'}, {'id': 2184, 'synset': 'atlantic_ridley.n.01', 'name': 'Atlantic_ridley'}, {'id': 2185, 'synset': 'pacific_ridley.n.01', 'name': 'Pacific_ridley'}, {'id': 2186, 'synset': 'hawksbill_turtle.n.01', 'name': 'hawksbill_turtle'}, {'id': 2187, 'synset': 'leatherback_turtle.n.01', 'name': 'leatherback_turtle'}, {'id': 2188, 'synset': 'snapping_turtle.n.01', 'name': 'snapping_turtle'}, {'id': 2189, 'synset': 'common_snapping_turtle.n.01', 'name': 'common_snapping_turtle'}, {'id': 2190, 'synset': 'alligator_snapping_turtle.n.01', 'name': 'alligator_snapping_turtle'}, {'id': 2191, 'synset': 'mud_turtle.n.01', 'name': 'mud_turtle'}, {'id': 2192, 'synset': 'musk_turtle.n.01', 'name': 'musk_turtle'}, {'id': 2193, 'synset': 'terrapin.n.01', 'name': 'terrapin'}, {'id': 2194, 'synset': 'diamondback_terrapin.n.01', 'name': 'diamondback_terrapin'}, {'id': 2195, 'synset': 'red-bellied_terrapin.n.01', 'name': 'red-bellied_terrapin'}, {'id': 2196, 'synset': 'slider.n.03', 'name': 'slider'}, {'id': 2197, 'synset': 'cooter.n.01', 'name': 'cooter'}, {'id': 2198, 'synset': 'box_turtle.n.01', 'name': 'box_turtle'}, {'id': 2199, 'synset': 'western_box_turtle.n.01', 'name': 'Western_box_turtle'}, {'id': 2200, 'synset': 'painted_turtle.n.01', 'name': 'painted_turtle'}, {'id': 2201, 'synset': 'tortoise.n.01', 'name': 'tortoise'}, {'id': 2202, 'synset': 'european_tortoise.n.01', 'name': 'European_tortoise'}, {'id': 2203, 'synset': 'giant_tortoise.n.01', 'name': 'giant_tortoise'}, {'id': 2204, 'synset': 'gopher_tortoise.n.01', 'name': 'gopher_tortoise'}, {'id': 2205, 'synset': 'desert_tortoise.n.01', 'name': 'desert_tortoise'}, {'id': 2206, 'synset': 'texas_tortoise.n.01', 'name': 'Texas_tortoise'}, {'id': 2207, 'synset': 'soft-shelled_turtle.n.01', 'name': 'soft-shelled_turtle'}, {'id': 2208, 'synset': 'spiny_softshell.n.01', 'name': 'spiny_softshell'}, {'id': 2209, 'synset': 'smooth_softshell.n.01', 'name': 'smooth_softshell'}, {'id': 2210, 'synset': 'tuatara.n.01', 'name': 'tuatara'}, {'id': 2211, 'synset': 'saurian.n.01', 'name': 'saurian'}, {'id': 2212, 'synset': 'gecko.n.01', 'name': 'gecko'}, {'id': 2213, 'synset': 'flying_gecko.n.01', 'name': 'flying_gecko'}, {'id': 2214, 'synset': 'banded_gecko.n.01', 'name': 'banded_gecko'}, {'id': 2215, 'synset': 'iguanid.n.01', 'name': 'iguanid'}, {'id': 2216, 'synset': 'common_iguana.n.01', 'name': 'common_iguana'}, {'id': 2217, 'synset': 'marine_iguana.n.01', 'name': 'marine_iguana'}, {'id': 2218, 'synset': 'desert_iguana.n.01', 'name': 'desert_iguana'}, {'id': 2219, 'synset': 'chuckwalla.n.01', 'name': 'chuckwalla'}, {'id': 2220, 'synset': 'zebra-tailed_lizard.n.01', 'name': 'zebra-tailed_lizard'}, {'id': 2221, 'synset': 'fringe-toed_lizard.n.01', 'name': 'fringe-toed_lizard'}, {'id': 2222, 'synset': 'earless_lizard.n.01', 'name': 'earless_lizard'}, {'id': 2223, 'synset': 'collared_lizard.n.01', 'name': 'collared_lizard'}, {'id': 2224, 'synset': 'leopard_lizard.n.01', 'name': 'leopard_lizard'}, {'id': 2225, 'synset': 'spiny_lizard.n.02', 'name': 'spiny_lizard'}, {'id': 2226, 'synset': 'fence_lizard.n.01', 'name': 'fence_lizard'}, {'id': 2227, 'synset': 'western_fence_lizard.n.01', 'name': 'western_fence_lizard'}, {'id': 2228, 'synset': 'eastern_fence_lizard.n.01', 'name': 'eastern_fence_lizard'}, {'id': 2229, 'synset': 'sagebrush_lizard.n.01', 'name': 'sagebrush_lizard'}, {'id': 2230, 'synset': 'side-blotched_lizard.n.01', 'name': 'side-blotched_lizard'}, {'id': 2231, 'synset': 'tree_lizard.n.01', 'name': 'tree_lizard'}, {'id': 2232, 'synset': 'horned_lizard.n.01', 'name': 'horned_lizard'}, {'id': 2233, 'synset': 'texas_horned_lizard.n.01', 'name': 'Texas_horned_lizard'}, {'id': 2234, 'synset': 'basilisk.n.03', 'name': 'basilisk'}, {'id': 2235, 'synset': 'american_chameleon.n.01', 'name': 'American_chameleon'}, {'id': 2236, 'synset': 'worm_lizard.n.01', 'name': 'worm_lizard'}, {'id': 2237, 'synset': 'night_lizard.n.01', 'name': 'night_lizard'}, {'id': 2238, 'synset': 'skink.n.01', 'name': 'skink'}, {'id': 2239, 'synset': 'western_skink.n.01', 'name': 'western_skink'}, {'id': 2240, 'synset': 'mountain_skink.n.01', 'name': 'mountain_skink'}, {'id': 2241, 'synset': 'teiid_lizard.n.01', 'name': 'teiid_lizard'}, {'id': 2242, 'synset': 'whiptail.n.01', 'name': 'whiptail'}, {'id': 2243, 'synset': 'racerunner.n.01', 'name': 'racerunner'}, {'id': 2244, 'synset': 'plateau_striped_whiptail.n.01', 'name': 'plateau_striped_whiptail'}, {'id': 2245, 'synset': 'chihuahuan_spotted_whiptail.n.01', 'name': 'Chihuahuan_spotted_whiptail'}, {'id': 2246, 'synset': 'western_whiptail.n.01', 'name': 'western_whiptail'}, {'id': 2247, 'synset': 'checkered_whiptail.n.01', 'name': 'checkered_whiptail'}, {'id': 2248, 'synset': 'teju.n.01', 'name': 'teju'}, {'id': 2249, 'synset': 'caiman_lizard.n.01', 'name': 'caiman_lizard'}, {'id': 2250, 'synset': 'agamid.n.01', 'name': 'agamid'}, {'id': 2251, 'synset': 'agama.n.01', 'name': 'agama'}, {'id': 2252, 'synset': 'frilled_lizard.n.01', 'name': 'frilled_lizard'}, {'id': 2253, 'synset': 'moloch.n.03', 'name': 'moloch'}, {'id': 2254, 'synset': 'mountain_devil.n.02', 'name': 'mountain_devil'}, {'id': 2255, 'synset': 'anguid_lizard.n.01', 'name': 'anguid_lizard'}, {'id': 2256, 'synset': 'alligator_lizard.n.01', 'name': 'alligator_lizard'}, {'id': 2257, 'synset': 'blindworm.n.01', 'name': 'blindworm'}, {'id': 2258, 'synset': 'glass_lizard.n.01', 'name': 'glass_lizard'}, {'id': 2259, 'synset': 'legless_lizard.n.01', 'name': 'legless_lizard'}, {'id': 2260, 'synset': 'lanthanotus_borneensis.n.01', 'name': 'Lanthanotus_borneensis'}, {'id': 2261, 'synset': 'venomous_lizard.n.01', 'name': 'venomous_lizard'}, {'id': 2262, 'synset': 'gila_monster.n.01', 'name': 'Gila_monster'}, {'id': 2263, 'synset': 'beaded_lizard.n.01', 'name': 'beaded_lizard'}, {'id': 2264, 'synset': 'lacertid_lizard.n.01', 'name': 'lacertid_lizard'}, {'id': 2265, 'synset': 'sand_lizard.n.01', 'name': 'sand_lizard'}, {'id': 2266, 'synset': 'green_lizard.n.01', 'name': 'green_lizard'}, {'id': 2267, 'synset': 'chameleon.n.03', 'name': 'chameleon'}, {'id': 2268, 'synset': 'african_chameleon.n.01', 'name': 'African_chameleon'}, {'id': 2269, 'synset': 'horned_chameleon.n.01', 'name': 'horned_chameleon'}, {'id': 2270, 'synset': 'monitor.n.07', 'name': 'monitor'}, {'id': 2271, 'synset': 'african_monitor.n.01', 'name': 'African_monitor'}, {'id': 2272, 'synset': 'komodo_dragon.n.01', 'name': 'Komodo_dragon'}, {'id': 2273, 'synset': 'crocodilian_reptile.n.01', 'name': 'crocodilian_reptile'}, {'id': 2274, 'synset': 'crocodile.n.01', 'name': 'crocodile'}, {'id': 2275, 'synset': 'african_crocodile.n.01', 'name': 'African_crocodile'}, {'id': 2276, 'synset': 'asian_crocodile.n.01', 'name': 'Asian_crocodile'}, {'id': 2277, 'synset': "morlett's_crocodile.n.01", 'name': "Morlett's_crocodile"}, {'id': 2278, 'synset': 'false_gavial.n.01', 'name': 'false_gavial'}, {'id': 2279, 'synset': 'american_alligator.n.01', 'name': 'American_alligator'}, {'id': 2280, 'synset': 'chinese_alligator.n.01', 'name': 'Chinese_alligator'}, {'id': 2281, 'synset': 'caiman.n.01', 'name': 'caiman'}, {'id': 2282, 'synset': 'spectacled_caiman.n.01', 'name': 'spectacled_caiman'}, {'id': 2283, 'synset': 'gavial.n.01', 'name': 'gavial'}, {'id': 2284, 'synset': 'armored_dinosaur.n.01', 'name': 'armored_dinosaur'}, {'id': 2285, 'synset': 'stegosaur.n.01', 'name': 'stegosaur'}, {'id': 2286, 'synset': 'ankylosaur.n.01', 'name': 'ankylosaur'}, {'id': 2287, 'synset': 'edmontonia.n.01', 'name': 'Edmontonia'}, {'id': 2288, 'synset': 'bone-headed_dinosaur.n.01', 'name': 'bone-headed_dinosaur'}, {'id': 2289, 'synset': 'pachycephalosaur.n.01', 'name': 'pachycephalosaur'}, {'id': 2290, 'synset': 'ceratopsian.n.01', 'name': 'ceratopsian'}, {'id': 2291, 'synset': 'protoceratops.n.01', 'name': 'protoceratops'}, {'id': 2292, 'synset': 'triceratops.n.01', 'name': 'triceratops'}, {'id': 2293, 'synset': 'styracosaur.n.01', 'name': 'styracosaur'}, {'id': 2294, 'synset': 'psittacosaur.n.01', 'name': 'psittacosaur'}, {'id': 2295, 'synset': 'ornithopod.n.01', 'name': 'ornithopod'}, {'id': 2296, 'synset': 'hadrosaur.n.01', 'name': 'hadrosaur'}, {'id': 2297, 'synset': 'trachodon.n.01', 'name': 'trachodon'}, {'id': 2298, 'synset': 'saurischian.n.01', 'name': 'saurischian'}, {'id': 2299, 'synset': 'sauropod.n.01', 'name': 'sauropod'}, {'id': 2300, 'synset': 'apatosaur.n.01', 'name': 'apatosaur'}, {'id': 2301, 'synset': 'barosaur.n.01', 'name': 'barosaur'}, {'id': 2302, 'synset': 'diplodocus.n.01', 'name': 'diplodocus'}, {'id': 2303, 'synset': 'argentinosaur.n.01', 'name': 'argentinosaur'}, {'id': 2304, 'synset': 'theropod.n.01', 'name': 'theropod'}, {'id': 2305, 'synset': 'ceratosaur.n.01', 'name': 'ceratosaur'}, {'id': 2306, 'synset': 'coelophysis.n.01', 'name': 'coelophysis'}, {'id': 2307, 'synset': 'tyrannosaur.n.01', 'name': 'tyrannosaur'}, {'id': 2308, 'synset': 'allosaur.n.01', 'name': 'allosaur'}, {'id': 2309, 'synset': 'ornithomimid.n.01', 'name': 'ornithomimid'}, {'id': 2310, 'synset': 'maniraptor.n.01', 'name': 'maniraptor'}, {'id': 2311, 'synset': 'oviraptorid.n.01', 'name': 'oviraptorid'}, {'id': 2312, 'synset': 'velociraptor.n.01', 'name': 'velociraptor'}, {'id': 2313, 'synset': 'deinonychus.n.01', 'name': 'deinonychus'}, {'id': 2314, 'synset': 'utahraptor.n.01', 'name': 'utahraptor'}, {'id': 2315, 'synset': 'synapsid.n.01', 'name': 'synapsid'}, {'id': 2316, 'synset': 'dicynodont.n.01', 'name': 'dicynodont'}, {'id': 2317, 'synset': 'pelycosaur.n.01', 'name': 'pelycosaur'}, {'id': 2318, 'synset': 'dimetrodon.n.01', 'name': 'dimetrodon'}, {'id': 2319, 'synset': 'pterosaur.n.01', 'name': 'pterosaur'}, {'id': 2320, 'synset': 'pterodactyl.n.01', 'name': 'pterodactyl'}, {'id': 2321, 'synset': 'ichthyosaur.n.01', 'name': 'ichthyosaur'}, {'id': 2322, 'synset': 'ichthyosaurus.n.01', 'name': 'ichthyosaurus'}, {'id': 2323, 'synset': 'stenopterygius.n.01', 'name': 'stenopterygius'}, {'id': 2324, 'synset': 'plesiosaur.n.01', 'name': 'plesiosaur'}, {'id': 2325, 'synset': 'nothosaur.n.01', 'name': 'nothosaur'}, {'id': 2326, 'synset': 'colubrid_snake.n.01', 'name': 'colubrid_snake'}, {'id': 2327, 'synset': 'hoop_snake.n.01', 'name': 'hoop_snake'}, {'id': 2328, 'synset': 'thunder_snake.n.01', 'name': 'thunder_snake'}, {'id': 2329, 'synset': 'ringneck_snake.n.01', 'name': 'ringneck_snake'}, {'id': 2330, 'synset': 'hognose_snake.n.01', 'name': 'hognose_snake'}, {'id': 2331, 'synset': 'leaf-nosed_snake.n.01', 'name': 'leaf-nosed_snake'}, {'id': 2332, 'synset': 'green_snake.n.02', 'name': 'green_snake'}, {'id': 2333, 'synset': 'smooth_green_snake.n.01', 'name': 'smooth_green_snake'}, {'id': 2334, 'synset': 'rough_green_snake.n.01', 'name': 'rough_green_snake'}, {'id': 2335, 'synset': 'green_snake.n.01', 'name': 'green_snake'}, {'id': 2336, 'synset': 'racer.n.04', 'name': 'racer'}, {'id': 2337, 'synset': 'blacksnake.n.02', 'name': 'blacksnake'}, {'id': 2338, 'synset': 'blue_racer.n.01', 'name': 'blue_racer'}, {'id': 2339, 'synset': 'horseshoe_whipsnake.n.01', 'name': 'horseshoe_whipsnake'}, {'id': 2340, 'synset': 'whip-snake.n.01', 'name': 'whip-snake'}, {'id': 2341, 'synset': 'coachwhip.n.02', 'name': 'coachwhip'}, {'id': 2342, 'synset': 'california_whipsnake.n.01', 'name': 'California_whipsnake'}, {'id': 2343, 'synset': 'sonoran_whipsnake.n.01', 'name': 'Sonoran_whipsnake'}, {'id': 2344, 'synset': 'rat_snake.n.01', 'name': 'rat_snake'}, {'id': 2345, 'synset': 'corn_snake.n.01', 'name': 'corn_snake'}, {'id': 2346, 'synset': 'black_rat_snake.n.01', 'name': 'black_rat_snake'}, {'id': 2347, 'synset': 'chicken_snake.n.01', 'name': 'chicken_snake'}, {'id': 2348, 'synset': 'indian_rat_snake.n.01', 'name': 'Indian_rat_snake'}, {'id': 2349, 'synset': 'glossy_snake.n.01', 'name': 'glossy_snake'}, {'id': 2350, 'synset': 'bull_snake.n.01', 'name': 'bull_snake'}, {'id': 2351, 'synset': 'gopher_snake.n.02', 'name': 'gopher_snake'}, {'id': 2352, 'synset': 'pine_snake.n.01', 'name': 'pine_snake'}, {'id': 2353, 'synset': 'king_snake.n.01', 'name': 'king_snake'}, {'id': 2354, 'synset': 'common_kingsnake.n.01', 'name': 'common_kingsnake'}, {'id': 2355, 'synset': 'milk_snake.n.01', 'name': 'milk_snake'}, {'id': 2356, 'synset': 'garter_snake.n.01', 'name': 'garter_snake'}, {'id': 2357, 'synset': 'common_garter_snake.n.01', 'name': 'common_garter_snake'}, {'id': 2358, 'synset': 'ribbon_snake.n.01', 'name': 'ribbon_snake'}, {'id': 2359, 'synset': 'western_ribbon_snake.n.01', 'name': 'Western_ribbon_snake'}, {'id': 2360, 'synset': 'lined_snake.n.01', 'name': 'lined_snake'}, {'id': 2361, 'synset': 'ground_snake.n.01', 'name': 'ground_snake'}, {'id': 2362, 'synset': 'eastern_ground_snake.n.01', 'name': 'eastern_ground_snake'}, {'id': 2363, 'synset': 'water_snake.n.01', 'name': 'water_snake'}, {'id': 2364, 'synset': 'common_water_snake.n.01', 'name': 'common_water_snake'}, {'id': 2365, 'synset': 'water_moccasin.n.02', 'name': 'water_moccasin'}, {'id': 2366, 'synset': 'grass_snake.n.01', 'name': 'grass_snake'}, {'id': 2367, 'synset': 'viperine_grass_snake.n.01', 'name': 'viperine_grass_snake'}, {'id': 2368, 'synset': 'red-bellied_snake.n.01', 'name': 'red-bellied_snake'}, {'id': 2369, 'synset': 'sand_snake.n.01', 'name': 'sand_snake'}, {'id': 2370, 'synset': 'banded_sand_snake.n.01', 'name': 'banded_sand_snake'}, {'id': 2371, 'synset': 'black-headed_snake.n.01', 'name': 'black-headed_snake'}, {'id': 2372, 'synset': 'vine_snake.n.01', 'name': 'vine_snake'}, {'id': 2373, 'synset': 'lyre_snake.n.01', 'name': 'lyre_snake'}, {'id': 2374, 'synset': 'sonoran_lyre_snake.n.01', 'name': 'Sonoran_lyre_snake'}, {'id': 2375, 'synset': 'night_snake.n.01', 'name': 'night_snake'}, {'id': 2376, 'synset': 'blind_snake.n.01', 'name': 'blind_snake'}, {'id': 2377, 'synset': 'western_blind_snake.n.01', 'name': 'western_blind_snake'}, {'id': 2378, 'synset': 'indigo_snake.n.01', 'name': 'indigo_snake'}, {'id': 2379, 'synset': 'eastern_indigo_snake.n.01', 'name': 'eastern_indigo_snake'}, {'id': 2380, 'synset': 'constrictor.n.01', 'name': 'constrictor'}, {'id': 2381, 'synset': 'boa.n.02', 'name': 'boa'}, {'id': 2382, 'synset': 'boa_constrictor.n.01', 'name': 'boa_constrictor'}, {'id': 2383, 'synset': 'rubber_boa.n.01', 'name': 'rubber_boa'}, {'id': 2384, 'synset': 'rosy_boa.n.01', 'name': 'rosy_boa'}, {'id': 2385, 'synset': 'anaconda.n.01', 'name': 'anaconda'}, {'id': 2386, 'synset': 'python.n.01', 'name': 'python'}, {'id': 2387, 'synset': 'carpet_snake.n.01', 'name': 'carpet_snake'}, {'id': 2388, 'synset': 'reticulated_python.n.01', 'name': 'reticulated_python'}, {'id': 2389, 'synset': 'indian_python.n.01', 'name': 'Indian_python'}, {'id': 2390, 'synset': 'rock_python.n.01', 'name': 'rock_python'}, {'id': 2391, 'synset': 'amethystine_python.n.01', 'name': 'amethystine_python'}, {'id': 2392, 'synset': 'elapid.n.01', 'name': 'elapid'}, {'id': 2393, 'synset': 'coral_snake.n.02', 'name': 'coral_snake'}, {'id': 2394, 'synset': 'eastern_coral_snake.n.01', 'name': 'eastern_coral_snake'}, {'id': 2395, 'synset': 'western_coral_snake.n.01', 'name': 'western_coral_snake'}, {'id': 2396, 'synset': 'coral_snake.n.01', 'name': 'coral_snake'}, {'id': 2397, 'synset': 'african_coral_snake.n.01', 'name': 'African_coral_snake'}, {'id': 2398, 'synset': 'australian_coral_snake.n.01', 'name': 'Australian_coral_snake'}, {'id': 2399, 'synset': 'copperhead.n.02', 'name': 'copperhead'}, {'id': 2400, 'synset': 'cobra.n.01', 'name': 'cobra'}, {'id': 2401, 'synset': 'indian_cobra.n.01', 'name': 'Indian_cobra'}, {'id': 2402, 'synset': 'asp.n.02', 'name': 'asp'}, {'id': 2403, 'synset': 'black-necked_cobra.n.01', 'name': 'black-necked_cobra'}, {'id': 2404, 'synset': 'hamadryad.n.02', 'name': 'hamadryad'}, {'id': 2405, 'synset': 'ringhals.n.01', 'name': 'ringhals'}, {'id': 2406, 'synset': 'mamba.n.01', 'name': 'mamba'}, {'id': 2407, 'synset': 'black_mamba.n.01', 'name': 'black_mamba'}, {'id': 2408, 'synset': 'green_mamba.n.01', 'name': 'green_mamba'}, {'id': 2409, 'synset': 'death_adder.n.01', 'name': 'death_adder'}, {'id': 2410, 'synset': 'tiger_snake.n.01', 'name': 'tiger_snake'}, {'id': 2411, 'synset': 'australian_blacksnake.n.01', 'name': 'Australian_blacksnake'}, {'id': 2412, 'synset': 'krait.n.01', 'name': 'krait'}, {'id': 2413, 'synset': 'banded_krait.n.01', 'name': 'banded_krait'}, {'id': 2414, 'synset': 'taipan.n.01', 'name': 'taipan'}, {'id': 2415, 'synset': 'sea_snake.n.01', 'name': 'sea_snake'}, {'id': 2416, 'synset': 'viper.n.01', 'name': 'viper'}, {'id': 2417, 'synset': 'adder.n.03', 'name': 'adder'}, {'id': 2418, 'synset': 'asp.n.01', 'name': 'asp'}, {'id': 2419, 'synset': 'puff_adder.n.01', 'name': 'puff_adder'}, {'id': 2420, 'synset': 'gaboon_viper.n.01', 'name': 'gaboon_viper'}, {'id': 2421, 'synset': 'horned_viper.n.01', 'name': 'horned_viper'}, {'id': 2422, 'synset': 'pit_viper.n.01', 'name': 'pit_viper'}, {'id': 2423, 'synset': 'copperhead.n.01', 'name': 'copperhead'}, {'id': 2424, 'synset': 'water_moccasin.n.01', 'name': 'water_moccasin'}, {'id': 2425, 'synset': 'rattlesnake.n.01', 'name': 'rattlesnake'}, {'id': 2426, 'synset': 'diamondback.n.01', 'name': 'diamondback'}, {'id': 2427, 'synset': 'timber_rattlesnake.n.01', 'name': 'timber_rattlesnake'}, {'id': 2428, 'synset': 'canebrake_rattlesnake.n.01', 'name': 'canebrake_rattlesnake'}, {'id': 2429, 'synset': 'prairie_rattlesnake.n.01', 'name': 'prairie_rattlesnake'}, {'id': 2430, 'synset': 'sidewinder.n.01', 'name': 'sidewinder'}, {'id': 2431, 'synset': 'western_diamondback.n.01', 'name': 'Western_diamondback'}, {'id': 2432, 'synset': 'rock_rattlesnake.n.01', 'name': 'rock_rattlesnake'}, {'id': 2433, 'synset': 'tiger_rattlesnake.n.01', 'name': 'tiger_rattlesnake'}, {'id': 2434, 'synset': 'mojave_rattlesnake.n.01', 'name': 'Mojave_rattlesnake'}, {'id': 2435, 'synset': 'speckled_rattlesnake.n.01', 'name': 'speckled_rattlesnake'}, {'id': 2436, 'synset': 'massasauga.n.02', 'name': 'massasauga'}, {'id': 2437, 'synset': 'ground_rattler.n.01', 'name': 'ground_rattler'}, {'id': 2438, 'synset': 'fer-de-lance.n.01', 'name': 'fer-de-lance'}, {'id': 2439, 'synset': 'carcase.n.01', 'name': 'carcase'}, {'id': 2440, 'synset': 'carrion.n.01', 'name': 'carrion'}, {'id': 2441, 'synset': 'arthropod.n.01', 'name': 'arthropod'}, {'id': 2442, 'synset': 'trilobite.n.01', 'name': 'trilobite'}, {'id': 2443, 'synset': 'arachnid.n.01', 'name': 'arachnid'}, {'id': 2444, 'synset': 'harvestman.n.01', 'name': 'harvestman'}, {'id': 2445, 'synset': 'scorpion.n.03', 'name': 'scorpion'}, {'id': 2446, 'synset': 'false_scorpion.n.01', 'name': 'false_scorpion'}, {'id': 2447, 'synset': 'book_scorpion.n.01', 'name': 'book_scorpion'}, {'id': 2448, 'synset': 'whip-scorpion.n.01', 'name': 'whip-scorpion'}, {'id': 2449, 'synset': 'vinegarroon.n.01', 'name': 'vinegarroon'}, {'id': 2450, 'synset': 'orb-weaving_spider.n.01', 'name': 'orb-weaving_spider'}, {'id': 2451, 'synset': 'black_and_gold_garden_spider.n.01', 'name': 'black_and_gold_garden_spider'}, {'id': 2452, 'synset': 'barn_spider.n.01', 'name': 'barn_spider'}, {'id': 2453, 'synset': 'garden_spider.n.01', 'name': 'garden_spider'}, {'id': 2454, 'synset': 'comb-footed_spider.n.01', 'name': 'comb-footed_spider'}, {'id': 2455, 'synset': 'black_widow.n.01', 'name': 'black_widow'}, {'id': 2456, 'synset': 'tarantula.n.02', 'name': 'tarantula'}, {'id': 2457, 'synset': 'wolf_spider.n.01', 'name': 'wolf_spider'}, {'id': 2458, 'synset': 'european_wolf_spider.n.01', 'name': 'European_wolf_spider'}, {'id': 2459, 'synset': 'trap-door_spider.n.01', 'name': 'trap-door_spider'}, {'id': 2460, 'synset': 'acarine.n.01', 'name': 'acarine'}, {'id': 2461, 'synset': 'tick.n.02', 'name': 'tick'}, {'id': 2462, 'synset': 'hard_tick.n.01', 'name': 'hard_tick'}, {'id': 2463, 'synset': 'ixodes_dammini.n.01', 'name': 'Ixodes_dammini'}, {'id': 2464, 'synset': 'ixodes_neotomae.n.01', 'name': 'Ixodes_neotomae'}, {'id': 2465, 'synset': 'ixodes_pacificus.n.01', 'name': 'Ixodes_pacificus'}, {'id': 2466, 'synset': 'ixodes_scapularis.n.01', 'name': 'Ixodes_scapularis'}, {'id': 2467, 'synset': 'sheep-tick.n.02', 'name': 'sheep-tick'}, {'id': 2468, 'synset': 'ixodes_persulcatus.n.01', 'name': 'Ixodes_persulcatus'}, {'id': 2469, 'synset': 'ixodes_dentatus.n.01', 'name': 'Ixodes_dentatus'}, {'id': 2470, 'synset': 'ixodes_spinipalpis.n.01', 'name': 'Ixodes_spinipalpis'}, {'id': 2471, 'synset': 'wood_tick.n.01', 'name': 'wood_tick'}, {'id': 2472, 'synset': 'soft_tick.n.01', 'name': 'soft_tick'}, {'id': 2473, 'synset': 'mite.n.02', 'name': 'mite'}, {'id': 2474, 'synset': 'web-spinning_mite.n.01', 'name': 'web-spinning_mite'}, {'id': 2475, 'synset': 'acarid.n.01', 'name': 'acarid'}, {'id': 2476, 'synset': 'trombidiid.n.01', 'name': 'trombidiid'}, {'id': 2477, 'synset': 'trombiculid.n.01', 'name': 'trombiculid'}, {'id': 2478, 'synset': 'harvest_mite.n.01', 'name': 'harvest_mite'}, {'id': 2479, 'synset': 'acarus.n.01', 'name': 'acarus'}, {'id': 2480, 'synset': 'itch_mite.n.01', 'name': 'itch_mite'}, {'id': 2481, 'synset': 'rust_mite.n.01', 'name': 'rust_mite'}, {'id': 2482, 'synset': 'spider_mite.n.01', 'name': 'spider_mite'}, {'id': 2483, 'synset': 'red_spider.n.01', 'name': 'red_spider'}, {'id': 2484, 'synset': 'myriapod.n.01', 'name': 'myriapod'}, {'id': 2485, 'synset': 'garden_centipede.n.01', 'name': 'garden_centipede'}, {'id': 2486, 'synset': 'tardigrade.n.01', 'name': 'tardigrade'}, {'id': 2487, 'synset': 'centipede.n.01', 'name': 'centipede'}, {'id': 2488, 'synset': 'house_centipede.n.01', 'name': 'house_centipede'}, {'id': 2489, 'synset': 'millipede.n.01', 'name': 'millipede'}, {'id': 2490, 'synset': 'sea_spider.n.01', 'name': 'sea_spider'}, {'id': 2491, 'synset': 'merostomata.n.01', 'name': 'Merostomata'}, {'id': 2492, 'synset': 'horseshoe_crab.n.01', 'name': 'horseshoe_crab'}, {'id': 2493, 'synset': 'asian_horseshoe_crab.n.01', 'name': 'Asian_horseshoe_crab'}, {'id': 2494, 'synset': 'eurypterid.n.01', 'name': 'eurypterid'}, {'id': 2495, 'synset': 'tongue_worm.n.01', 'name': 'tongue_worm'}, {'id': 2496, 'synset': 'gallinaceous_bird.n.01', 'name': 'gallinaceous_bird'}, {'id': 2497, 'synset': 'domestic_fowl.n.01', 'name': 'domestic_fowl'}, {'id': 2498, 'synset': 'dorking.n.01', 'name': 'Dorking'}, {'id': 2499, 'synset': 'plymouth_rock.n.02', 'name': 'Plymouth_Rock'}, {'id': 2500, 'synset': 'cornish.n.02', 'name': 'Cornish'}, {'id': 2501, 'synset': 'rock_cornish.n.01', 'name': 'Rock_Cornish'}, {'id': 2502, 'synset': 'game_fowl.n.01', 'name': 'game_fowl'}, {'id': 2503, 'synset': 'cochin.n.01', 'name': 'cochin'}, {'id': 2504, 'synset': 'jungle_fowl.n.01', 'name': 'jungle_fowl'}, {'id': 2505, 'synset': 'jungle_cock.n.01', 'name': 'jungle_cock'}, {'id': 2506, 'synset': 'jungle_hen.n.01', 'name': 'jungle_hen'}, {'id': 2507, 'synset': 'red_jungle_fowl.n.01', 'name': 'red_jungle_fowl'}, {'id': 2508, 'synset': 'bantam.n.01', 'name': 'bantam'}, {'id': 2509, 'synset': 'chick.n.01', 'name': 'chick'}, {'id': 2510, 'synset': 'cockerel.n.01', 'name': 'cockerel'}, {'id': 2511, 'synset': 'capon.n.02', 'name': 'capon'}, {'id': 2512, 'synset': 'hen.n.01', 'name': 'hen'}, {'id': 2513, 'synset': 'cackler.n.01', 'name': 'cackler'}, {'id': 2514, 'synset': 'brood_hen.n.01', 'name': 'brood_hen'}, {'id': 2515, 'synset': 'mother_hen.n.02', 'name': 'mother_hen'}, {'id': 2516, 'synset': 'layer.n.04', 'name': 'layer'}, {'id': 2517, 'synset': 'pullet.n.02', 'name': 'pullet'}, {'id': 2518, 'synset': 'spring_chicken.n.02', 'name': 'spring_chicken'}, {'id': 2519, 'synset': 'rhode_island_red.n.01', 'name': 'Rhode_Island_red'}, {'id': 2520, 'synset': 'dominique.n.01', 'name': 'Dominique'}, {'id': 2521, 'synset': 'orpington.n.01', 'name': 'Orpington'}, {'id': 2522, 'synset': 'turkey.n.01', 'name': 'turkey'}, {'id': 2523, 'synset': 'turkey_cock.n.01', 'name': 'turkey_cock'}, {'id': 2524, 'synset': 'ocellated_turkey.n.01', 'name': 'ocellated_turkey'}, {'id': 2525, 'synset': 'grouse.n.02', 'name': 'grouse'}, {'id': 2526, 'synset': 'black_grouse.n.01', 'name': 'black_grouse'}, {'id': 2527, 'synset': 'european_black_grouse.n.01', 'name': 'European_black_grouse'}, {'id': 2528, 'synset': 'asian_black_grouse.n.01', 'name': 'Asian_black_grouse'}, {'id': 2529, 'synset': 'blackcock.n.01', 'name': 'blackcock'}, {'id': 2530, 'synset': 'greyhen.n.01', 'name': 'greyhen'}, {'id': 2531, 'synset': 'ptarmigan.n.01', 'name': 'ptarmigan'}, {'id': 2532, 'synset': 'red_grouse.n.01', 'name': 'red_grouse'}, {'id': 2533, 'synset': 'moorhen.n.02', 'name': 'moorhen'}, {'id': 2534, 'synset': 'capercaillie.n.01', 'name': 'capercaillie'}, {'id': 2535, 'synset': 'spruce_grouse.n.01', 'name': 'spruce_grouse'}, {'id': 2536, 'synset': 'sage_grouse.n.01', 'name': 'sage_grouse'}, {'id': 2537, 'synset': 'ruffed_grouse.n.01', 'name': 'ruffed_grouse'}, {'id': 2538, 'synset': 'sharp-tailed_grouse.n.01', 'name': 'sharp-tailed_grouse'}, {'id': 2539, 'synset': 'prairie_chicken.n.01', 'name': 'prairie_chicken'}, {'id': 2540, 'synset': 'greater_prairie_chicken.n.01', 'name': 'greater_prairie_chicken'}, {'id': 2541, 'synset': 'lesser_prairie_chicken.n.01', 'name': 'lesser_prairie_chicken'}, {'id': 2542, 'synset': 'heath_hen.n.01', 'name': 'heath_hen'}, {'id': 2543, 'synset': 'guan.n.01', 'name': 'guan'}, {'id': 2544, 'synset': 'curassow.n.01', 'name': 'curassow'}, {'id': 2545, 'synset': 'piping_guan.n.01', 'name': 'piping_guan'}, {'id': 2546, 'synset': 'chachalaca.n.01', 'name': 'chachalaca'}, {'id': 2547, 'synset': 'texas_chachalaca.n.01', 'name': 'Texas_chachalaca'}, {'id': 2548, 'synset': 'megapode.n.01', 'name': 'megapode'}, {'id': 2549, 'synset': 'mallee_fowl.n.01', 'name': 'mallee_fowl'}, {'id': 2550, 'synset': 'mallee_hen.n.01', 'name': 'mallee_hen'}, {'id': 2551, 'synset': 'brush_turkey.n.01', 'name': 'brush_turkey'}, {'id': 2552, 'synset': 'maleo.n.01', 'name': 'maleo'}, {'id': 2553, 'synset': 'phasianid.n.01', 'name': 'phasianid'}, {'id': 2554, 'synset': 'pheasant.n.01', 'name': 'pheasant'}, {'id': 2555, 'synset': 'ring-necked_pheasant.n.01', 'name': 'ring-necked_pheasant'}, {'id': 2556, 'synset': 'afropavo.n.01', 'name': 'afropavo'}, {'id': 2557, 'synset': 'argus.n.02', 'name': 'argus'}, {'id': 2558, 'synset': 'golden_pheasant.n.01', 'name': 'golden_pheasant'}, {'id': 2559, 'synset': 'bobwhite.n.01', 'name': 'bobwhite'}, {'id': 2560, 'synset': 'northern_bobwhite.n.01', 'name': 'northern_bobwhite'}, {'id': 2561, 'synset': 'old_world_quail.n.01', 'name': 'Old_World_quail'}, {'id': 2562, 'synset': 'migratory_quail.n.01', 'name': 'migratory_quail'}, {'id': 2563, 'synset': 'monal.n.01', 'name': 'monal'}, {'id': 2564, 'synset': 'peafowl.n.01', 'name': 'peafowl'}, {'id': 2565, 'synset': 'peachick.n.01', 'name': 'peachick'}, {'id': 2566, 'synset': 'peacock.n.02', 'name': 'peacock'}, {'id': 2567, 'synset': 'peahen.n.01', 'name': 'peahen'}, {'id': 2568, 'synset': 'blue_peafowl.n.01', 'name': 'blue_peafowl'}, {'id': 2569, 'synset': 'green_peafowl.n.01', 'name': 'green_peafowl'}, {'id': 2570, 'synset': 'quail.n.02', 'name': 'quail'}, {'id': 2571, 'synset': 'california_quail.n.01', 'name': 'California_quail'}, {'id': 2572, 'synset': 'tragopan.n.01', 'name': 'tragopan'}, {'id': 2573, 'synset': 'partridge.n.03', 'name': 'partridge'}, {'id': 2574, 'synset': 'hungarian_partridge.n.01', 'name': 'Hungarian_partridge'}, {'id': 2575, 'synset': 'red-legged_partridge.n.01', 'name': 'red-legged_partridge'}, {'id': 2576, 'synset': 'greek_partridge.n.01', 'name': 'Greek_partridge'}, {'id': 2577, 'synset': 'mountain_quail.n.01', 'name': 'mountain_quail'}, {'id': 2578, 'synset': 'guinea_fowl.n.01', 'name': 'guinea_fowl'}, {'id': 2579, 'synset': 'guinea_hen.n.02', 'name': 'guinea_hen'}, {'id': 2580, 'synset': 'hoatzin.n.01', 'name': 'hoatzin'}, {'id': 2581, 'synset': 'tinamou.n.01', 'name': 'tinamou'}, {'id': 2582, 'synset': 'columbiform_bird.n.01', 'name': 'columbiform_bird'}, {'id': 2583, 'synset': 'dodo.n.02', 'name': 'dodo'}, {'id': 2584, 'synset': 'pouter_pigeon.n.01', 'name': 'pouter_pigeon'}, {'id': 2585, 'synset': 'rock_dove.n.01', 'name': 'rock_dove'}, {'id': 2586, 'synset': 'band-tailed_pigeon.n.01', 'name': 'band-tailed_pigeon'}, {'id': 2587, 'synset': 'wood_pigeon.n.01', 'name': 'wood_pigeon'}, {'id': 2588, 'synset': 'turtledove.n.02', 'name': 'turtledove'}, {'id': 2589, 'synset': 'streptopelia_turtur.n.01', 'name': 'Streptopelia_turtur'}, {'id': 2590, 'synset': 'ringdove.n.01', 'name': 'ringdove'}, {'id': 2591, 'synset': 'australian_turtledove.n.01', 'name': 'Australian_turtledove'}, {'id': 2592, 'synset': 'mourning_dove.n.01', 'name': 'mourning_dove'}, {'id': 2593, 'synset': 'domestic_pigeon.n.01', 'name': 'domestic_pigeon'}, {'id': 2594, 'synset': 'squab.n.03', 'name': 'squab'}, {'id': 2595, 'synset': 'fairy_swallow.n.01', 'name': 'fairy_swallow'}, {'id': 2596, 'synset': 'roller.n.07', 'name': 'roller'}, {'id': 2597, 'synset': 'homing_pigeon.n.01', 'name': 'homing_pigeon'}, {'id': 2598, 'synset': 'carrier_pigeon.n.01', 'name': 'carrier_pigeon'}, {'id': 2599, 'synset': 'passenger_pigeon.n.01', 'name': 'passenger_pigeon'}, {'id': 2600, 'synset': 'sandgrouse.n.01', 'name': 'sandgrouse'}, {'id': 2601, 'synset': 'painted_sandgrouse.n.01', 'name': 'painted_sandgrouse'}, {'id': 2602, 'synset': 'pin-tailed_sandgrouse.n.01', 'name': 'pin-tailed_sandgrouse'}, {'id': 2603, 'synset': "pallas's_sandgrouse.n.01", 'name': "pallas's_sandgrouse"}, {'id': 2604, 'synset': 'popinjay.n.02', 'name': 'popinjay'}, {'id': 2605, 'synset': 'poll.n.04', 'name': 'poll'}, {'id': 2606, 'synset': 'african_grey.n.01', 'name': 'African_grey'}, {'id': 2607, 'synset': 'amazon.n.04', 'name': 'amazon'}, {'id': 2608, 'synset': 'macaw.n.01', 'name': 'macaw'}, {'id': 2609, 'synset': 'kea.n.01', 'name': 'kea'}, {'id': 2610, 'synset': 'cockatoo.n.01', 'name': 'cockatoo'}, {'id': 2611, 'synset': 'sulphur-crested_cockatoo.n.01', 'name': 'sulphur-crested_cockatoo'}, {'id': 2612, 'synset': 'pink_cockatoo.n.01', 'name': 'pink_cockatoo'}, {'id': 2613, 'synset': 'cockateel.n.01', 'name': 'cockateel'}, {'id': 2614, 'synset': 'lovebird.n.02', 'name': 'lovebird'}, {'id': 2615, 'synset': 'lory.n.01', 'name': 'lory'}, {'id': 2616, 'synset': 'lorikeet.n.01', 'name': 'lorikeet'}, {'id': 2617, 'synset': 'varied_lorikeet.n.01', 'name': 'varied_Lorikeet'}, {'id': 2618, 'synset': 'rainbow_lorikeet.n.01', 'name': 'rainbow_lorikeet'}, {'id': 2619, 'synset': 'carolina_parakeet.n.01', 'name': 'Carolina_parakeet'}, {'id': 2620, 'synset': 'budgerigar.n.01', 'name': 'budgerigar'}, {'id': 2621, 'synset': 'ring-necked_parakeet.n.01', 'name': 'ring-necked_parakeet'}, {'id': 2622, 'synset': 'cuculiform_bird.n.01', 'name': 'cuculiform_bird'}, {'id': 2623, 'synset': 'cuckoo.n.02', 'name': 'cuckoo'}, {'id': 2624, 'synset': 'european_cuckoo.n.01', 'name': 'European_cuckoo'}, {'id': 2625, 'synset': 'black-billed_cuckoo.n.01', 'name': 'black-billed_cuckoo'}, {'id': 2626, 'synset': 'roadrunner.n.01', 'name': 'roadrunner'}, {'id': 2627, 'synset': 'ani.n.01', 'name': 'ani'}, {'id': 2628, 'synset': 'coucal.n.01', 'name': 'coucal'}, {'id': 2629, 'synset': 'crow_pheasant.n.01', 'name': 'crow_pheasant'}, {'id': 2630, 'synset': 'touraco.n.01', 'name': 'touraco'}, {'id': 2631, 'synset': 'coraciiform_bird.n.01', 'name': 'coraciiform_bird'}, {'id': 2632, 'synset': 'roller.n.06', 'name': 'roller'}, {'id': 2633, 'synset': 'european_roller.n.01', 'name': 'European_roller'}, {'id': 2634, 'synset': 'ground_roller.n.01', 'name': 'ground_roller'}, {'id': 2635, 'synset': 'kingfisher.n.01', 'name': 'kingfisher'}, {'id': 2636, 'synset': 'eurasian_kingfisher.n.01', 'name': 'Eurasian_kingfisher'}, {'id': 2637, 'synset': 'belted_kingfisher.n.01', 'name': 'belted_kingfisher'}, {'id': 2638, 'synset': 'kookaburra.n.01', 'name': 'kookaburra'}, {'id': 2639, 'synset': 'bee_eater.n.01', 'name': 'bee_eater'}, {'id': 2640, 'synset': 'hornbill.n.01', 'name': 'hornbill'}, {'id': 2641, 'synset': 'hoopoe.n.01', 'name': 'hoopoe'}, {'id': 2642, 'synset': 'euopean_hoopoe.n.01', 'name': 'Euopean_hoopoe'}, {'id': 2643, 'synset': 'wood_hoopoe.n.01', 'name': 'wood_hoopoe'}, {'id': 2644, 'synset': 'motmot.n.01', 'name': 'motmot'}, {'id': 2645, 'synset': 'tody.n.01', 'name': 'tody'}, {'id': 2646, 'synset': 'apodiform_bird.n.01', 'name': 'apodiform_bird'}, {'id': 2647, 'synset': 'swift.n.03', 'name': 'swift'}, {'id': 2648, 'synset': 'european_swift.n.01', 'name': 'European_swift'}, {'id': 2649, 'synset': 'chimney_swift.n.01', 'name': 'chimney_swift'}, {'id': 2650, 'synset': 'swiftlet.n.01', 'name': 'swiftlet'}, {'id': 2651, 'synset': 'tree_swift.n.01', 'name': 'tree_swift'}, {'id': 2652, 'synset': 'archilochus_colubris.n.01', 'name': 'Archilochus_colubris'}, {'id': 2653, 'synset': 'thornbill.n.01', 'name': 'thornbill'}, {'id': 2654, 'synset': 'goatsucker.n.01', 'name': 'goatsucker'}, {'id': 2655, 'synset': 'european_goatsucker.n.01', 'name': 'European_goatsucker'}, {'id': 2656, 'synset': "chuck-will's-widow.n.01", 'name': "chuck-will's-widow"}, {'id': 2657, 'synset': 'whippoorwill.n.01', 'name': 'whippoorwill'}, {'id': 2658, 'synset': 'poorwill.n.01', 'name': 'poorwill'}, {'id': 2659, 'synset': 'frogmouth.n.01', 'name': 'frogmouth'}, {'id': 2660, 'synset': 'oilbird.n.01', 'name': 'oilbird'}, {'id': 2661, 'synset': 'piciform_bird.n.01', 'name': 'piciform_bird'}, {'id': 2662, 'synset': 'woodpecker.n.01', 'name': 'woodpecker'}, {'id': 2663, 'synset': 'green_woodpecker.n.01', 'name': 'green_woodpecker'}, {'id': 2664, 'synset': 'downy_woodpecker.n.01', 'name': 'downy_woodpecker'}, {'id': 2665, 'synset': 'flicker.n.02', 'name': 'flicker'}, {'id': 2666, 'synset': 'yellow-shafted_flicker.n.01', 'name': 'yellow-shafted_flicker'}, {'id': 2667, 'synset': 'gilded_flicker.n.01', 'name': 'gilded_flicker'}, {'id': 2668, 'synset': 'red-shafted_flicker.n.01', 'name': 'red-shafted_flicker'}, {'id': 2669, 'synset': 'ivorybill.n.01', 'name': 'ivorybill'}, {'id': 2670, 'synset': 'redheaded_woodpecker.n.01', 'name': 'redheaded_woodpecker'}, {'id': 2671, 'synset': 'sapsucker.n.01', 'name': 'sapsucker'}, {'id': 2672, 'synset': 'yellow-bellied_sapsucker.n.01', 'name': 'yellow-bellied_sapsucker'}, {'id': 2673, 'synset': 'red-breasted_sapsucker.n.01', 'name': 'red-breasted_sapsucker'}, {'id': 2674, 'synset': 'wryneck.n.02', 'name': 'wryneck'}, {'id': 2675, 'synset': 'piculet.n.01', 'name': 'piculet'}, {'id': 2676, 'synset': 'barbet.n.01', 'name': 'barbet'}, {'id': 2677, 'synset': 'puffbird.n.01', 'name': 'puffbird'}, {'id': 2678, 'synset': 'honey_guide.n.01', 'name': 'honey_guide'}, {'id': 2679, 'synset': 'jacamar.n.01', 'name': 'jacamar'}, {'id': 2680, 'synset': 'toucan.n.01', 'name': 'toucan'}, {'id': 2681, 'synset': 'toucanet.n.01', 'name': 'toucanet'}, {'id': 2682, 'synset': 'trogon.n.01', 'name': 'trogon'}, {'id': 2683, 'synset': 'quetzal.n.02', 'name': 'quetzal'}, {'id': 2684, 'synset': 'resplendent_quetzel.n.01', 'name': 'resplendent_quetzel'}, {'id': 2685, 'synset': 'aquatic_bird.n.01', 'name': 'aquatic_bird'}, {'id': 2686, 'synset': 'waterfowl.n.01', 'name': 'waterfowl'}, {'id': 2687, 'synset': 'anseriform_bird.n.01', 'name': 'anseriform_bird'}, {'id': 2688, 'synset': 'drake.n.02', 'name': 'drake'}, {'id': 2689, 'synset': 'quack-quack.n.01', 'name': 'quack-quack'}, {'id': 2690, 'synset': 'diving_duck.n.01', 'name': 'diving_duck'}, {'id': 2691, 'synset': 'dabbling_duck.n.01', 'name': 'dabbling_duck'}, {'id': 2692, 'synset': 'black_duck.n.01', 'name': 'black_duck'}, {'id': 2693, 'synset': 'teal.n.02', 'name': 'teal'}, {'id': 2694, 'synset': 'greenwing.n.01', 'name': 'greenwing'}, {'id': 2695, 'synset': 'bluewing.n.01', 'name': 'bluewing'}, {'id': 2696, 'synset': 'garganey.n.01', 'name': 'garganey'}, {'id': 2697, 'synset': 'widgeon.n.01', 'name': 'widgeon'}, {'id': 2698, 'synset': 'american_widgeon.n.01', 'name': 'American_widgeon'}, {'id': 2699, 'synset': 'shoveler.n.02', 'name': 'shoveler'}, {'id': 2700, 'synset': 'pintail.n.01', 'name': 'pintail'}, {'id': 2701, 'synset': 'sheldrake.n.02', 'name': 'sheldrake'}, {'id': 2702, 'synset': 'shelduck.n.01', 'name': 'shelduck'}, {'id': 2703, 'synset': 'ruddy_duck.n.01', 'name': 'ruddy_duck'}, {'id': 2704, 'synset': 'bufflehead.n.01', 'name': 'bufflehead'}, {'id': 2705, 'synset': 'goldeneye.n.02', 'name': 'goldeneye'}, {'id': 2706, 'synset': "barrow's_goldeneye.n.01", 'name': "Barrow's_goldeneye"}, {'id': 2707, 'synset': 'canvasback.n.01', 'name': 'canvasback'}, {'id': 2708, 'synset': 'pochard.n.01', 'name': 'pochard'}, {'id': 2709, 'synset': 'redhead.n.02', 'name': 'redhead'}, {'id': 2710, 'synset': 'scaup.n.01', 'name': 'scaup'}, {'id': 2711, 'synset': 'greater_scaup.n.01', 'name': 'greater_scaup'}, {'id': 2712, 'synset': 'lesser_scaup.n.01', 'name': 'lesser_scaup'}, {'id': 2713, 'synset': 'wild_duck.n.01', 'name': 'wild_duck'}, {'id': 2714, 'synset': 'wood_duck.n.01', 'name': 'wood_duck'}, {'id': 2715, 'synset': 'wood_drake.n.01', 'name': 'wood_drake'}, {'id': 2716, 'synset': 'mandarin_duck.n.01', 'name': 'mandarin_duck'}, {'id': 2717, 'synset': 'muscovy_duck.n.01', 'name': 'muscovy_duck'}, {'id': 2718, 'synset': 'sea_duck.n.01', 'name': 'sea_duck'}, {'id': 2719, 'synset': 'eider.n.01', 'name': 'eider'}, {'id': 2720, 'synset': 'scoter.n.01', 'name': 'scoter'}, {'id': 2721, 'synset': 'common_scoter.n.01', 'name': 'common_scoter'}, {'id': 2722, 'synset': 'old_squaw.n.01', 'name': 'old_squaw'}, {'id': 2723, 'synset': 'merganser.n.01', 'name': 'merganser'}, {'id': 2724, 'synset': 'goosander.n.01', 'name': 'goosander'}, {'id': 2725, 'synset': 'american_merganser.n.01', 'name': 'American_merganser'}, {'id': 2726, 'synset': 'red-breasted_merganser.n.01', 'name': 'red-breasted_merganser'}, {'id': 2727, 'synset': 'smew.n.01', 'name': 'smew'}, {'id': 2728, 'synset': 'hooded_merganser.n.01', 'name': 'hooded_merganser'}, {'id': 2729, 'synset': 'gosling.n.01', 'name': 'gosling'}, {'id': 2730, 'synset': 'gander.n.01', 'name': 'gander'}, {'id': 2731, 'synset': 'chinese_goose.n.01', 'name': 'Chinese_goose'}, {'id': 2732, 'synset': 'greylag.n.01', 'name': 'greylag'}, {'id': 2733, 'synset': 'blue_goose.n.01', 'name': 'blue_goose'}, {'id': 2734, 'synset': 'snow_goose.n.01', 'name': 'snow_goose'}, {'id': 2735, 'synset': 'brant.n.01', 'name': 'brant'}, {'id': 2736, 'synset': 'common_brant_goose.n.01', 'name': 'common_brant_goose'}, {'id': 2737, 'synset': 'honker.n.03', 'name': 'honker'}, {'id': 2738, 'synset': 'barnacle_goose.n.01', 'name': 'barnacle_goose'}, {'id': 2739, 'synset': 'coscoroba.n.01', 'name': 'coscoroba'}, {'id': 2740, 'synset': 'swan.n.01', 'name': 'swan'}, {'id': 2741, 'synset': 'cob.n.04', 'name': 'cob'}, {'id': 2742, 'synset': 'pen.n.05', 'name': 'pen'}, {'id': 2743, 'synset': 'cygnet.n.01', 'name': 'cygnet'}, {'id': 2744, 'synset': 'mute_swan.n.01', 'name': 'mute_swan'}, {'id': 2745, 'synset': 'whooper.n.02', 'name': 'whooper'}, {'id': 2746, 'synset': 'tundra_swan.n.01', 'name': 'tundra_swan'}, {'id': 2747, 'synset': 'whistling_swan.n.01', 'name': 'whistling_swan'}, {'id': 2748, 'synset': "bewick's_swan.n.01", 'name': "Bewick's_swan"}, {'id': 2749, 'synset': 'trumpeter.n.04', 'name': 'trumpeter'}, {'id': 2750, 'synset': 'black_swan.n.01', 'name': 'black_swan'}, {'id': 2751, 'synset': 'screamer.n.03', 'name': 'screamer'}, {'id': 2752, 'synset': 'horned_screamer.n.01', 'name': 'horned_screamer'}, {'id': 2753, 'synset': 'crested_screamer.n.01', 'name': 'crested_screamer'}, {'id': 2754, 'synset': 'chaja.n.01', 'name': 'chaja'}, {'id': 2755, 'synset': 'mammal.n.01', 'name': 'mammal'}, {'id': 2756, 'synset': 'female_mammal.n.01', 'name': 'female_mammal'}, {'id': 2757, 'synset': 'tusker.n.01', 'name': 'tusker'}, {'id': 2758, 'synset': 'prototherian.n.01', 'name': 'prototherian'}, {'id': 2759, 'synset': 'monotreme.n.01', 'name': 'monotreme'}, {'id': 2760, 'synset': 'echidna.n.02', 'name': 'echidna'}, {'id': 2761, 'synset': 'echidna.n.01', 'name': 'echidna'}, {'id': 2762, 'synset': 'platypus.n.01', 'name': 'platypus'}, {'id': 2763, 'synset': 'marsupial.n.01', 'name': 'marsupial'}, {'id': 2764, 'synset': 'opossum.n.02', 'name': 'opossum'}, {'id': 2765, 'synset': 'common_opossum.n.01', 'name': 'common_opossum'}, {'id': 2766, 'synset': 'crab-eating_opossum.n.01', 'name': 'crab-eating_opossum'}, {'id': 2767, 'synset': 'opossum_rat.n.01', 'name': 'opossum_rat'}, {'id': 2768, 'synset': 'bandicoot.n.01', 'name': 'bandicoot'}, {'id': 2769, 'synset': 'rabbit-eared_bandicoot.n.01', 'name': 'rabbit-eared_bandicoot'}, {'id': 2770, 'synset': 'kangaroo.n.01', 'name': 'kangaroo'}, {'id': 2771, 'synset': 'giant_kangaroo.n.01', 'name': 'giant_kangaroo'}, {'id': 2772, 'synset': 'wallaby.n.01', 'name': 'wallaby'}, {'id': 2773, 'synset': 'common_wallaby.n.01', 'name': 'common_wallaby'}, {'id': 2774, 'synset': 'hare_wallaby.n.01', 'name': 'hare_wallaby'}, {'id': 2775, 'synset': 'nail-tailed_wallaby.n.01', 'name': 'nail-tailed_wallaby'}, {'id': 2776, 'synset': 'rock_wallaby.n.01', 'name': 'rock_wallaby'}, {'id': 2777, 'synset': 'pademelon.n.01', 'name': 'pademelon'}, {'id': 2778, 'synset': 'tree_wallaby.n.01', 'name': 'tree_wallaby'}, {'id': 2779, 'synset': 'musk_kangaroo.n.01', 'name': 'musk_kangaroo'}, {'id': 2780, 'synset': 'rat_kangaroo.n.01', 'name': 'rat_kangaroo'}, {'id': 2781, 'synset': 'potoroo.n.01', 'name': 'potoroo'}, {'id': 2782, 'synset': 'bettong.n.01', 'name': 'bettong'}, {'id': 2783, 'synset': 'jerboa_kangaroo.n.01', 'name': 'jerboa_kangaroo'}, {'id': 2784, 'synset': 'phalanger.n.01', 'name': 'phalanger'}, {'id': 2785, 'synset': 'cuscus.n.01', 'name': 'cuscus'}, {'id': 2786, 'synset': 'brush-tailed_phalanger.n.01', 'name': 'brush-tailed_phalanger'}, {'id': 2787, 'synset': 'flying_phalanger.n.01', 'name': 'flying_phalanger'}, {'id': 2788, 'synset': 'wombat.n.01', 'name': 'wombat'}, {'id': 2789, 'synset': 'dasyurid_marsupial.n.01', 'name': 'dasyurid_marsupial'}, {'id': 2790, 'synset': 'dasyure.n.01', 'name': 'dasyure'}, {'id': 2791, 'synset': 'eastern_dasyure.n.01', 'name': 'eastern_dasyure'}, {'id': 2792, 'synset': 'native_cat.n.01', 'name': 'native_cat'}, {'id': 2793, 'synset': 'thylacine.n.01', 'name': 'thylacine'}, {'id': 2794, 'synset': 'tasmanian_devil.n.01', 'name': 'Tasmanian_devil'}, {'id': 2795, 'synset': 'pouched_mouse.n.01', 'name': 'pouched_mouse'}, {'id': 2796, 'synset': 'numbat.n.01', 'name': 'numbat'}, {'id': 2797, 'synset': 'pouched_mole.n.01', 'name': 'pouched_mole'}, {'id': 2798, 'synset': 'placental.n.01', 'name': 'placental'}, {'id': 2799, 'synset': 'livestock.n.01', 'name': 'livestock'}, {'id': 2800, 'synset': 'cow.n.02', 'name': 'cow'}, {'id': 2801, 'synset': 'calf.n.04', 'name': 'calf'}, {'id': 2802, 'synset': 'yearling.n.03', 'name': 'yearling'}, {'id': 2803, 'synset': 'buck.n.05', 'name': 'buck'}, {'id': 2804, 'synset': 'doe.n.02', 'name': 'doe'}, {'id': 2805, 'synset': 'insectivore.n.01', 'name': 'insectivore'}, {'id': 2806, 'synset': 'mole.n.06', 'name': 'mole'}, {'id': 2807, 'synset': 'starnose_mole.n.01', 'name': 'starnose_mole'}, {'id': 2808, 'synset': "brewer's_mole.n.01", 'name': "brewer's_mole"}, {'id': 2809, 'synset': 'golden_mole.n.01', 'name': 'golden_mole'}, {'id': 2810, 'synset': 'shrew_mole.n.01', 'name': 'shrew_mole'}, {'id': 2811, 'synset': 'asiatic_shrew_mole.n.01', 'name': 'Asiatic_shrew_mole'}, {'id': 2812, 'synset': 'american_shrew_mole.n.01', 'name': 'American_shrew_mole'}, {'id': 2813, 'synset': 'shrew.n.02', 'name': 'shrew'}, {'id': 2814, 'synset': 'common_shrew.n.01', 'name': 'common_shrew'}, {'id': 2815, 'synset': 'masked_shrew.n.01', 'name': 'masked_shrew'}, {'id': 2816, 'synset': 'short-tailed_shrew.n.01', 'name': 'short-tailed_shrew'}, {'id': 2817, 'synset': 'water_shrew.n.01', 'name': 'water_shrew'}, {'id': 2818, 'synset': 'american_water_shrew.n.01', 'name': 'American_water_shrew'}, {'id': 2819, 'synset': 'european_water_shrew.n.01', 'name': 'European_water_shrew'}, {'id': 2820, 'synset': 'mediterranean_water_shrew.n.01', 'name': 'Mediterranean_water_shrew'}, {'id': 2821, 'synset': 'least_shrew.n.01', 'name': 'least_shrew'}, {'id': 2822, 'synset': 'hedgehog.n.02', 'name': 'hedgehog'}, {'id': 2823, 'synset': 'tenrec.n.01', 'name': 'tenrec'}, {'id': 2824, 'synset': 'tailless_tenrec.n.01', 'name': 'tailless_tenrec'}, {'id': 2825, 'synset': 'otter_shrew.n.01', 'name': 'otter_shrew'}, {'id': 2826, 'synset': 'eiderdown.n.02', 'name': 'eiderdown'}, {'id': 2827, 'synset': 'aftershaft.n.01', 'name': 'aftershaft'}, {'id': 2828, 'synset': 'sickle_feather.n.01', 'name': 'sickle_feather'}, {'id': 2829, 'synset': 'contour_feather.n.01', 'name': 'contour_feather'}, {'id': 2830, 'synset': 'bastard_wing.n.01', 'name': 'bastard_wing'}, {'id': 2831, 'synset': 'saddle_hackle.n.01', 'name': 'saddle_hackle'}, {'id': 2832, 'synset': 'encolure.n.01', 'name': 'encolure'}, {'id': 2833, 'synset': 'hair.n.06', 'name': 'hair'}, {'id': 2834, 'synset': 'squama.n.01', 'name': 'squama'}, {'id': 2835, 'synset': 'scute.n.01', 'name': 'scute'}, {'id': 2836, 'synset': 'sclerite.n.01', 'name': 'sclerite'}, {'id': 2837, 'synset': 'plastron.n.05', 'name': 'plastron'}, {'id': 2838, 'synset': 'scallop_shell.n.01', 'name': 'scallop_shell'}, {'id': 2839, 'synset': 'oyster_shell.n.01', 'name': 'oyster_shell'}, {'id': 2840, 'synset': 'theca.n.02', 'name': 'theca'}, {'id': 2841, 'synset': 'invertebrate.n.01', 'name': 'invertebrate'}, {'id': 2842, 'synset': 'sponge.n.04', 'name': 'sponge'}, {'id': 2843, 'synset': 'choanocyte.n.01', 'name': 'choanocyte'}, {'id': 2844, 'synset': 'glass_sponge.n.01', 'name': 'glass_sponge'}, {'id': 2845, 'synset': "venus's_flower_basket.n.01", 'name': "Venus's_flower_basket"}, {'id': 2846, 'synset': 'metazoan.n.01', 'name': 'metazoan'}, {'id': 2847, 'synset': 'coelenterate.n.01', 'name': 'coelenterate'}, {'id': 2848, 'synset': 'planula.n.01', 'name': 'planula'}, {'id': 2849, 'synset': 'polyp.n.02', 'name': 'polyp'}, {'id': 2850, 'synset': 'medusa.n.02', 'name': 'medusa'}, {'id': 2851, 'synset': 'jellyfish.n.02', 'name': 'jellyfish'}, {'id': 2852, 'synset': 'scyphozoan.n.01', 'name': 'scyphozoan'}, {'id': 2853, 'synset': 'chrysaora_quinquecirrha.n.01', 'name': 'Chrysaora_quinquecirrha'}, {'id': 2854, 'synset': 'hydrozoan.n.01', 'name': 'hydrozoan'}, {'id': 2855, 'synset': 'hydra.n.04', 'name': 'hydra'}, {'id': 2856, 'synset': 'siphonophore.n.01', 'name': 'siphonophore'}, {'id': 2857, 'synset': 'nanomia.n.01', 'name': 'nanomia'}, {'id': 2858, 'synset': 'portuguese_man-of-war.n.01', 'name': 'Portuguese_man-of-war'}, {'id': 2859, 'synset': 'praya.n.01', 'name': 'praya'}, {'id': 2860, 'synset': 'apolemia.n.01', 'name': 'apolemia'}, {'id': 2861, 'synset': 'anthozoan.n.01', 'name': 'anthozoan'}, {'id': 2862, 'synset': 'sea_anemone.n.01', 'name': 'sea_anemone'}, {'id': 2863, 'synset': 'actinia.n.02', 'name': 'actinia'}, {'id': 2864, 'synset': 'sea_pen.n.01', 'name': 'sea_pen'}, {'id': 2865, 'synset': 'coral.n.04', 'name': 'coral'}, {'id': 2866, 'synset': 'gorgonian.n.01', 'name': 'gorgonian'}, {'id': 2867, 'synset': 'sea_feather.n.01', 'name': 'sea_feather'}, {'id': 2868, 'synset': 'sea_fan.n.01', 'name': 'sea_fan'}, {'id': 2869, 'synset': 'red_coral.n.02', 'name': 'red_coral'}, {'id': 2870, 'synset': 'stony_coral.n.01', 'name': 'stony_coral'}, {'id': 2871, 'synset': 'brain_coral.n.01', 'name': 'brain_coral'}, {'id': 2872, 'synset': 'staghorn_coral.n.01', 'name': 'staghorn_coral'}, {'id': 2873, 'synset': 'mushroom_coral.n.01', 'name': 'mushroom_coral'}, {'id': 2874, 'synset': 'ctenophore.n.01', 'name': 'ctenophore'}, {'id': 2875, 'synset': 'beroe.n.01', 'name': 'beroe'}, {'id': 2876, 'synset': 'platyctenean.n.01', 'name': 'platyctenean'}, {'id': 2877, 'synset': 'sea_gooseberry.n.01', 'name': 'sea_gooseberry'}, {'id': 2878, 'synset': "venus's_girdle.n.01", 'name': "Venus's_girdle"}, {'id': 2879, 'synset': 'worm.n.01', 'name': 'worm'}, {'id': 2880, 'synset': 'helminth.n.01', 'name': 'helminth'}, {'id': 2881, 'synset': 'woodworm.n.01', 'name': 'woodworm'}, {'id': 2882, 'synset': 'woodborer.n.01', 'name': 'woodborer'}, {'id': 2883, 'synset': 'acanthocephalan.n.01', 'name': 'acanthocephalan'}, {'id': 2884, 'synset': 'arrowworm.n.01', 'name': 'arrowworm'}, {'id': 2885, 'synset': 'bladder_worm.n.01', 'name': 'bladder_worm'}, {'id': 2886, 'synset': 'flatworm.n.01', 'name': 'flatworm'}, {'id': 2887, 'synset': 'planarian.n.01', 'name': 'planarian'}, {'id': 2888, 'synset': 'fluke.n.05', 'name': 'fluke'}, {'id': 2889, 'synset': 'cercaria.n.01', 'name': 'cercaria'}, {'id': 2890, 'synset': 'liver_fluke.n.01', 'name': 'liver_fluke'}, {'id': 2891, 'synset': 'fasciolopsis_buski.n.01', 'name': 'Fasciolopsis_buski'}, {'id': 2892, 'synset': 'schistosome.n.01', 'name': 'schistosome'}, {'id': 2893, 'synset': 'tapeworm.n.01', 'name': 'tapeworm'}, {'id': 2894, 'synset': 'echinococcus.n.01', 'name': 'echinococcus'}, {'id': 2895, 'synset': 'taenia.n.02', 'name': 'taenia'}, {'id': 2896, 'synset': 'ribbon_worm.n.01', 'name': 'ribbon_worm'}, {'id': 2897, 'synset': 'beard_worm.n.01', 'name': 'beard_worm'}, {'id': 2898, 'synset': 'rotifer.n.01', 'name': 'rotifer'}, {'id': 2899, 'synset': 'nematode.n.01', 'name': 'nematode'}, {'id': 2900, 'synset': 'common_roundworm.n.01', 'name': 'common_roundworm'}, {'id': 2901, 'synset': 'chicken_roundworm.n.01', 'name': 'chicken_roundworm'}, {'id': 2902, 'synset': 'pinworm.n.01', 'name': 'pinworm'}, {'id': 2903, 'synset': 'eelworm.n.01', 'name': 'eelworm'}, {'id': 2904, 'synset': 'vinegar_eel.n.01', 'name': 'vinegar_eel'}, {'id': 2905, 'synset': 'trichina.n.01', 'name': 'trichina'}, {'id': 2906, 'synset': 'hookworm.n.01', 'name': 'hookworm'}, {'id': 2907, 'synset': 'filaria.n.02', 'name': 'filaria'}, {'id': 2908, 'synset': 'guinea_worm.n.02', 'name': 'Guinea_worm'}, {'id': 2909, 'synset': 'annelid.n.01', 'name': 'annelid'}, {'id': 2910, 'synset': 'archiannelid.n.01', 'name': 'archiannelid'}, {'id': 2911, 'synset': 'oligochaete.n.01', 'name': 'oligochaete'}, {'id': 2912, 'synset': 'earthworm.n.01', 'name': 'earthworm'}, {'id': 2913, 'synset': 'polychaete.n.01', 'name': 'polychaete'}, {'id': 2914, 'synset': 'lugworm.n.01', 'name': 'lugworm'}, {'id': 2915, 'synset': 'sea_mouse.n.01', 'name': 'sea_mouse'}, {'id': 2916, 'synset': 'bloodworm.n.01', 'name': 'bloodworm'}, {'id': 2917, 'synset': 'leech.n.01', 'name': 'leech'}, {'id': 2918, 'synset': 'medicinal_leech.n.01', 'name': 'medicinal_leech'}, {'id': 2919, 'synset': 'horseleech.n.01', 'name': 'horseleech'}, {'id': 2920, 'synset': 'mollusk.n.01', 'name': 'mollusk'}, {'id': 2921, 'synset': 'scaphopod.n.01', 'name': 'scaphopod'}, {'id': 2922, 'synset': 'tooth_shell.n.01', 'name': 'tooth_shell'}, {'id': 2923, 'synset': 'gastropod.n.01', 'name': 'gastropod'}, {'id': 2924, 'synset': 'abalone.n.01', 'name': 'abalone'}, {'id': 2925, 'synset': 'ormer.n.01', 'name': 'ormer'}, {'id': 2926, 'synset': 'scorpion_shell.n.01', 'name': 'scorpion_shell'}, {'id': 2927, 'synset': 'conch.n.01', 'name': 'conch'}, {'id': 2928, 'synset': 'giant_conch.n.01', 'name': 'giant_conch'}, {'id': 2929, 'synset': 'snail.n.01', 'name': 'snail'}, {'id': 2930, 'synset': 'edible_snail.n.01', 'name': 'edible_snail'}, {'id': 2931, 'synset': 'garden_snail.n.01', 'name': 'garden_snail'}, {'id': 2932, 'synset': 'brown_snail.n.01', 'name': 'brown_snail'}, {'id': 2933, 'synset': 'helix_hortensis.n.01', 'name': 'Helix_hortensis'}, {'id': 2934, 'synset': 'slug.n.07', 'name': 'slug'}, {'id': 2935, 'synset': 'seasnail.n.02', 'name': 'seasnail'}, {'id': 2936, 'synset': 'neritid.n.01', 'name': 'neritid'}, {'id': 2937, 'synset': 'nerita.n.01', 'name': 'nerita'}, {'id': 2938, 'synset': 'bleeding_tooth.n.01', 'name': 'bleeding_tooth'}, {'id': 2939, 'synset': 'neritina.n.01', 'name': 'neritina'}, {'id': 2940, 'synset': 'whelk.n.02', 'name': 'whelk'}, {'id': 2941, 'synset': 'moon_shell.n.01', 'name': 'moon_shell'}, {'id': 2942, 'synset': 'periwinkle.n.04', 'name': 'periwinkle'}, {'id': 2943, 'synset': 'limpet.n.02', 'name': 'limpet'}, {'id': 2944, 'synset': 'common_limpet.n.01', 'name': 'common_limpet'}, {'id': 2945, 'synset': 'keyhole_limpet.n.01', 'name': 'keyhole_limpet'}, {'id': 2946, 'synset': 'river_limpet.n.01', 'name': 'river_limpet'}, {'id': 2947, 'synset': 'sea_slug.n.01', 'name': 'sea_slug'}, {'id': 2948, 'synset': 'sea_hare.n.01', 'name': 'sea_hare'}, {'id': 2949, 'synset': 'hermissenda_crassicornis.n.01', 'name': 'Hermissenda_crassicornis'}, {'id': 2950, 'synset': 'bubble_shell.n.01', 'name': 'bubble_shell'}, {'id': 2951, 'synset': 'physa.n.01', 'name': 'physa'}, {'id': 2952, 'synset': 'cowrie.n.01', 'name': 'cowrie'}, {'id': 2953, 'synset': 'money_cowrie.n.01', 'name': 'money_cowrie'}, {'id': 2954, 'synset': 'tiger_cowrie.n.01', 'name': 'tiger_cowrie'}, {'id': 2955, 'synset': 'solenogaster.n.01', 'name': 'solenogaster'}, {'id': 2956, 'synset': 'chiton.n.02', 'name': 'chiton'}, {'id': 2957, 'synset': 'bivalve.n.01', 'name': 'bivalve'}, {'id': 2958, 'synset': 'spat.n.03', 'name': 'spat'}, {'id': 2959, 'synset': 'clam.n.01', 'name': 'clam'}, {'id': 2960, 'synset': 'soft-shell_clam.n.02', 'name': 'soft-shell_clam'}, {'id': 2961, 'synset': 'quahog.n.02', 'name': 'quahog'}, {'id': 2962, 'synset': 'littleneck.n.02', 'name': 'littleneck'}, {'id': 2963, 'synset': 'cherrystone.n.02', 'name': 'cherrystone'}, {'id': 2964, 'synset': 'geoduck.n.01', 'name': 'geoduck'}, {'id': 2965, 'synset': 'razor_clam.n.01', 'name': 'razor_clam'}, {'id': 2966, 'synset': 'giant_clam.n.01', 'name': 'giant_clam'}, {'id': 2967, 'synset': 'cockle.n.02', 'name': 'cockle'}, {'id': 2968, 'synset': 'edible_cockle.n.01', 'name': 'edible_cockle'}, {'id': 2969, 'synset': 'oyster.n.01', 'name': 'oyster'}, {'id': 2970, 'synset': 'japanese_oyster.n.01', 'name': 'Japanese_oyster'}, {'id': 2971, 'synset': 'virginia_oyster.n.01', 'name': 'Virginia_oyster'}, {'id': 2972, 'synset': 'pearl_oyster.n.01', 'name': 'pearl_oyster'}, {'id': 2973, 'synset': 'saddle_oyster.n.01', 'name': 'saddle_oyster'}, {'id': 2974, 'synset': 'window_oyster.n.01', 'name': 'window_oyster'}, {'id': 2975, 'synset': 'ark_shell.n.01', 'name': 'ark_shell'}, {'id': 2976, 'synset': 'blood_clam.n.01', 'name': 'blood_clam'}, {'id': 2977, 'synset': 'mussel.n.02', 'name': 'mussel'}, {'id': 2978, 'synset': 'marine_mussel.n.01', 'name': 'marine_mussel'}, {'id': 2979, 'synset': 'edible_mussel.n.01', 'name': 'edible_mussel'}, {'id': 2980, 'synset': 'freshwater_mussel.n.01', 'name': 'freshwater_mussel'}, {'id': 2981, 'synset': 'pearly-shelled_mussel.n.01', 'name': 'pearly-shelled_mussel'}, {'id': 2982, 'synset': 'thin-shelled_mussel.n.01', 'name': 'thin-shelled_mussel'}, {'id': 2983, 'synset': 'zebra_mussel.n.01', 'name': 'zebra_mussel'}, {'id': 2984, 'synset': 'scallop.n.04', 'name': 'scallop'}, {'id': 2985, 'synset': 'bay_scallop.n.02', 'name': 'bay_scallop'}, {'id': 2986, 'synset': 'sea_scallop.n.02', 'name': 'sea_scallop'}, {'id': 2987, 'synset': 'shipworm.n.01', 'name': 'shipworm'}, {'id': 2988, 'synset': 'teredo.n.01', 'name': 'teredo'}, {'id': 2989, 'synset': 'piddock.n.01', 'name': 'piddock'}, {'id': 2990, 'synset': 'cephalopod.n.01', 'name': 'cephalopod'}, {'id': 2991, 'synset': 'chambered_nautilus.n.01', 'name': 'chambered_nautilus'}, {'id': 2992, 'synset': 'octopod.n.01', 'name': 'octopod'}, {'id': 2993, 'synset': 'paper_nautilus.n.01', 'name': 'paper_nautilus'}, {'id': 2994, 'synset': 'decapod.n.02', 'name': 'decapod'}, {'id': 2995, 'synset': 'squid.n.02', 'name': 'squid'}, {'id': 2996, 'synset': 'loligo.n.01', 'name': 'loligo'}, {'id': 2997, 'synset': 'ommastrephes.n.01', 'name': 'ommastrephes'}, {'id': 2998, 'synset': 'architeuthis.n.01', 'name': 'architeuthis'}, {'id': 2999, 'synset': 'cuttlefish.n.01', 'name': 'cuttlefish'}, {'id': 3000, 'synset': 'spirula.n.01', 'name': 'spirula'}, {'id': 3001, 'synset': 'crustacean.n.01', 'name': 'crustacean'}, {'id': 3002, 'synset': 'malacostracan_crustacean.n.01', 'name': 'malacostracan_crustacean'}, {'id': 3003, 'synset': 'decapod_crustacean.n.01', 'name': 'decapod_crustacean'}, {'id': 3004, 'synset': 'brachyuran.n.01', 'name': 'brachyuran'}, {'id': 3005, 'synset': 'stone_crab.n.02', 'name': 'stone_crab'}, {'id': 3006, 'synset': 'hard-shell_crab.n.01', 'name': 'hard-shell_crab'}, {'id': 3007, 'synset': 'soft-shell_crab.n.02', 'name': 'soft-shell_crab'}, {'id': 3008, 'synset': 'dungeness_crab.n.02', 'name': 'Dungeness_crab'}, {'id': 3009, 'synset': 'rock_crab.n.01', 'name': 'rock_crab'}, {'id': 3010, 'synset': 'jonah_crab.n.01', 'name': 'Jonah_crab'}, {'id': 3011, 'synset': 'swimming_crab.n.01', 'name': 'swimming_crab'}, {'id': 3012, 'synset': 'english_lady_crab.n.01', 'name': 'English_lady_crab'}, {'id': 3013, 'synset': 'american_lady_crab.n.01', 'name': 'American_lady_crab'}, {'id': 3014, 'synset': 'blue_crab.n.02', 'name': 'blue_crab'}, {'id': 3015, 'synset': 'fiddler_crab.n.01', 'name': 'fiddler_crab'}, {'id': 3016, 'synset': 'pea_crab.n.01', 'name': 'pea_crab'}, {'id': 3017, 'synset': 'king_crab.n.03', 'name': 'king_crab'}, {'id': 3018, 'synset': 'spider_crab.n.01', 'name': 'spider_crab'}, {'id': 3019, 'synset': 'european_spider_crab.n.01', 'name': 'European_spider_crab'}, {'id': 3020, 'synset': 'giant_crab.n.01', 'name': 'giant_crab'}, {'id': 3021, 'synset': 'lobster.n.02', 'name': 'lobster'}, {'id': 3022, 'synset': 'true_lobster.n.01', 'name': 'true_lobster'}, {'id': 3023, 'synset': 'american_lobster.n.02', 'name': 'American_lobster'}, {'id': 3024, 'synset': 'european_lobster.n.02', 'name': 'European_lobster'}, {'id': 3025, 'synset': 'cape_lobster.n.01', 'name': 'Cape_lobster'}, {'id': 3026, 'synset': 'norway_lobster.n.01', 'name': 'Norway_lobster'}, {'id': 3027, 'synset': 'crayfish.n.03', 'name': 'crayfish'}, {'id': 3028, 'synset': 'old_world_crayfish.n.01', 'name': 'Old_World_crayfish'}, {'id': 3029, 'synset': 'american_crayfish.n.01', 'name': 'American_crayfish'}, {'id': 3030, 'synset': 'hermit_crab.n.01', 'name': 'hermit_crab'}, {'id': 3031, 'synset': 'shrimp.n.03', 'name': 'shrimp'}, {'id': 3032, 'synset': 'snapping_shrimp.n.01', 'name': 'snapping_shrimp'}, {'id': 3033, 'synset': 'prawn.n.02', 'name': 'prawn'}, {'id': 3034, 'synset': 'long-clawed_prawn.n.01', 'name': 'long-clawed_prawn'}, {'id': 3035, 'synset': 'tropical_prawn.n.01', 'name': 'tropical_prawn'}, {'id': 3036, 'synset': 'krill.n.01', 'name': 'krill'}, {'id': 3037, 'synset': 'euphausia_pacifica.n.01', 'name': 'Euphausia_pacifica'}, {'id': 3038, 'synset': 'opossum_shrimp.n.01', 'name': 'opossum_shrimp'}, {'id': 3039, 'synset': 'stomatopod.n.01', 'name': 'stomatopod'}, {'id': 3040, 'synset': 'mantis_shrimp.n.01', 'name': 'mantis_shrimp'}, {'id': 3041, 'synset': 'squilla.n.01', 'name': 'squilla'}, {'id': 3042, 'synset': 'isopod.n.01', 'name': 'isopod'}, {'id': 3043, 'synset': 'woodlouse.n.01', 'name': 'woodlouse'}, {'id': 3044, 'synset': 'pill_bug.n.01', 'name': 'pill_bug'}, {'id': 3045, 'synset': 'sow_bug.n.01', 'name': 'sow_bug'}, {'id': 3046, 'synset': 'sea_louse.n.01', 'name': 'sea_louse'}, {'id': 3047, 'synset': 'amphipod.n.01', 'name': 'amphipod'}, {'id': 3048, 'synset': 'skeleton_shrimp.n.01', 'name': 'skeleton_shrimp'}, {'id': 3049, 'synset': 'whale_louse.n.01', 'name': 'whale_louse'}, {'id': 3050, 'synset': 'daphnia.n.01', 'name': 'daphnia'}, {'id': 3051, 'synset': 'fairy_shrimp.n.01', 'name': 'fairy_shrimp'}, {'id': 3052, 'synset': 'brine_shrimp.n.01', 'name': 'brine_shrimp'}, {'id': 3053, 'synset': 'tadpole_shrimp.n.01', 'name': 'tadpole_shrimp'}, {'id': 3054, 'synset': 'copepod.n.01', 'name': 'copepod'}, {'id': 3055, 'synset': 'cyclops.n.02', 'name': 'cyclops'}, {'id': 3056, 'synset': 'seed_shrimp.n.01', 'name': 'seed_shrimp'}, {'id': 3057, 'synset': 'barnacle.n.01', 'name': 'barnacle'}, {'id': 3058, 'synset': 'acorn_barnacle.n.01', 'name': 'acorn_barnacle'}, {'id': 3059, 'synset': 'goose_barnacle.n.01', 'name': 'goose_barnacle'}, {'id': 3060, 'synset': 'onychophoran.n.01', 'name': 'onychophoran'}, {'id': 3061, 'synset': 'wading_bird.n.01', 'name': 'wading_bird'}, {'id': 3062, 'synset': 'stork.n.01', 'name': 'stork'}, {'id': 3063, 'synset': 'white_stork.n.01', 'name': 'white_stork'}, {'id': 3064, 'synset': 'black_stork.n.01', 'name': 'black_stork'}, {'id': 3065, 'synset': 'adjutant_bird.n.01', 'name': 'adjutant_bird'}, {'id': 3066, 'synset': 'marabou.n.01', 'name': 'marabou'}, {'id': 3067, 'synset': 'openbill.n.01', 'name': 'openbill'}, {'id': 3068, 'synset': 'jabiru.n.03', 'name': 'jabiru'}, {'id': 3069, 'synset': 'saddlebill.n.01', 'name': 'saddlebill'}, {'id': 3070, 'synset': 'policeman_bird.n.01', 'name': 'policeman_bird'}, {'id': 3071, 'synset': 'wood_ibis.n.02', 'name': 'wood_ibis'}, {'id': 3072, 'synset': 'shoebill.n.01', 'name': 'shoebill'}, {'id': 3073, 'synset': 'ibis.n.01', 'name': 'ibis'}, {'id': 3074, 'synset': 'wood_ibis.n.01', 'name': 'wood_ibis'}, {'id': 3075, 'synset': 'sacred_ibis.n.01', 'name': 'sacred_ibis'}, {'id': 3076, 'synset': 'spoonbill.n.01', 'name': 'spoonbill'}, {'id': 3077, 'synset': 'common_spoonbill.n.01', 'name': 'common_spoonbill'}, {'id': 3078, 'synset': 'roseate_spoonbill.n.01', 'name': 'roseate_spoonbill'}, {'id': 3079, 'synset': 'great_blue_heron.n.01', 'name': 'great_blue_heron'}, {'id': 3080, 'synset': 'great_white_heron.n.03', 'name': 'great_white_heron'}, {'id': 3081, 'synset': 'egret.n.01', 'name': 'egret'}, {'id': 3082, 'synset': 'little_blue_heron.n.01', 'name': 'little_blue_heron'}, {'id': 3083, 'synset': 'snowy_egret.n.01', 'name': 'snowy_egret'}, {'id': 3084, 'synset': 'little_egret.n.01', 'name': 'little_egret'}, {'id': 3085, 'synset': 'great_white_heron.n.02', 'name': 'great_white_heron'}, {'id': 3086, 'synset': 'american_egret.n.01', 'name': 'American_egret'}, {'id': 3087, 'synset': 'cattle_egret.n.01', 'name': 'cattle_egret'}, {'id': 3088, 'synset': 'night_heron.n.01', 'name': 'night_heron'}, {'id': 3089, 'synset': 'black-crowned_night_heron.n.01', 'name': 'black-crowned_night_heron'}, {'id': 3090, 'synset': 'yellow-crowned_night_heron.n.01', 'name': 'yellow-crowned_night_heron'}, {'id': 3091, 'synset': 'boatbill.n.01', 'name': 'boatbill'}, {'id': 3092, 'synset': 'bittern.n.01', 'name': 'bittern'}, {'id': 3093, 'synset': 'american_bittern.n.01', 'name': 'American_bittern'}, {'id': 3094, 'synset': 'european_bittern.n.01', 'name': 'European_bittern'}, {'id': 3095, 'synset': 'least_bittern.n.01', 'name': 'least_bittern'}, {'id': 3096, 'synset': 'crane.n.05', 'name': 'crane'}, {'id': 3097, 'synset': 'whooping_crane.n.01', 'name': 'whooping_crane'}, {'id': 3098, 'synset': 'courlan.n.01', 'name': 'courlan'}, {'id': 3099, 'synset': 'limpkin.n.01', 'name': 'limpkin'}, {'id': 3100, 'synset': 'crested_cariama.n.01', 'name': 'crested_cariama'}, {'id': 3101, 'synset': 'chunga.n.01', 'name': 'chunga'}, {'id': 3102, 'synset': 'rail.n.05', 'name': 'rail'}, {'id': 3103, 'synset': 'weka.n.01', 'name': 'weka'}, {'id': 3104, 'synset': 'crake.n.01', 'name': 'crake'}, {'id': 3105, 'synset': 'corncrake.n.01', 'name': 'corncrake'}, {'id': 3106, 'synset': 'spotted_crake.n.01', 'name': 'spotted_crake'}, {'id': 3107, 'synset': 'gallinule.n.01', 'name': 'gallinule'}, {'id': 3108, 'synset': 'florida_gallinule.n.01', 'name': 'Florida_gallinule'}, {'id': 3109, 'synset': 'moorhen.n.01', 'name': 'moorhen'}, {'id': 3110, 'synset': 'purple_gallinule.n.01', 'name': 'purple_gallinule'}, {'id': 3111, 'synset': 'european_gallinule.n.01', 'name': 'European_gallinule'}, {'id': 3112, 'synset': 'american_gallinule.n.01', 'name': 'American_gallinule'}, {'id': 3113, 'synset': 'notornis.n.01', 'name': 'notornis'}, {'id': 3114, 'synset': 'coot.n.01', 'name': 'coot'}, {'id': 3115, 'synset': 'american_coot.n.01', 'name': 'American_coot'}, {'id': 3116, 'synset': 'old_world_coot.n.01', 'name': 'Old_World_coot'}, {'id': 3117, 'synset': 'bustard.n.01', 'name': 'bustard'}, {'id': 3118, 'synset': 'great_bustard.n.01', 'name': 'great_bustard'}, {'id': 3119, 'synset': 'plain_turkey.n.01', 'name': 'plain_turkey'}, {'id': 3120, 'synset': 'button_quail.n.01', 'name': 'button_quail'}, {'id': 3121, 'synset': 'striped_button_quail.n.01', 'name': 'striped_button_quail'}, {'id': 3122, 'synset': 'plain_wanderer.n.01', 'name': 'plain_wanderer'}, {'id': 3123, 'synset': 'trumpeter.n.03', 'name': 'trumpeter'}, {'id': 3124, 'synset': 'brazilian_trumpeter.n.01', 'name': 'Brazilian_trumpeter'}, {'id': 3125, 'synset': 'shorebird.n.01', 'name': 'shorebird'}, {'id': 3126, 'synset': 'plover.n.01', 'name': 'plover'}, {'id': 3127, 'synset': 'piping_plover.n.01', 'name': 'piping_plover'}, {'id': 3128, 'synset': 'killdeer.n.01', 'name': 'killdeer'}, {'id': 3129, 'synset': 'dotterel.n.01', 'name': 'dotterel'}, {'id': 3130, 'synset': 'golden_plover.n.01', 'name': 'golden_plover'}, {'id': 3131, 'synset': 'lapwing.n.01', 'name': 'lapwing'}, {'id': 3132, 'synset': 'turnstone.n.01', 'name': 'turnstone'}, {'id': 3133, 'synset': 'ruddy_turnstone.n.01', 'name': 'ruddy_turnstone'}, {'id': 3134, 'synset': 'black_turnstone.n.01', 'name': 'black_turnstone'}, {'id': 3135, 'synset': 'sandpiper.n.01', 'name': 'sandpiper'}, {'id': 3136, 'synset': 'surfbird.n.01', 'name': 'surfbird'}, {'id': 3137, 'synset': 'european_sandpiper.n.01', 'name': 'European_sandpiper'}, {'id': 3138, 'synset': 'spotted_sandpiper.n.01', 'name': 'spotted_sandpiper'}, {'id': 3139, 'synset': 'least_sandpiper.n.01', 'name': 'least_sandpiper'}, {'id': 3140, 'synset': 'red-backed_sandpiper.n.01', 'name': 'red-backed_sandpiper'}, {'id': 3141, 'synset': 'greenshank.n.01', 'name': 'greenshank'}, {'id': 3142, 'synset': 'redshank.n.01', 'name': 'redshank'}, {'id': 3143, 'synset': 'yellowlegs.n.01', 'name': 'yellowlegs'}, {'id': 3144, 'synset': 'greater_yellowlegs.n.01', 'name': 'greater_yellowlegs'}, {'id': 3145, 'synset': 'lesser_yellowlegs.n.01', 'name': 'lesser_yellowlegs'}, {'id': 3146, 'synset': 'pectoral_sandpiper.n.01', 'name': 'pectoral_sandpiper'}, {'id': 3147, 'synset': 'knot.n.07', 'name': 'knot'}, {'id': 3148, 'synset': 'curlew_sandpiper.n.01', 'name': 'curlew_sandpiper'}, {'id': 3149, 'synset': 'sanderling.n.01', 'name': 'sanderling'}, {'id': 3150, 'synset': 'upland_sandpiper.n.01', 'name': 'upland_sandpiper'}, {'id': 3151, 'synset': 'ruff.n.03', 'name': 'ruff'}, {'id': 3152, 'synset': 'reeve.n.01', 'name': 'reeve'}, {'id': 3153, 'synset': 'tattler.n.02', 'name': 'tattler'}, {'id': 3154, 'synset': 'polynesian_tattler.n.01', 'name': 'Polynesian_tattler'}, {'id': 3155, 'synset': 'willet.n.01', 'name': 'willet'}, {'id': 3156, 'synset': 'woodcock.n.01', 'name': 'woodcock'}, {'id': 3157, 'synset': 'eurasian_woodcock.n.01', 'name': 'Eurasian_woodcock'}, {'id': 3158, 'synset': 'american_woodcock.n.01', 'name': 'American_woodcock'}, {'id': 3159, 'synset': 'snipe.n.01', 'name': 'snipe'}, {'id': 3160, 'synset': 'whole_snipe.n.01', 'name': 'whole_snipe'}, {'id': 3161, 'synset': "wilson's_snipe.n.01", 'name': "Wilson's_snipe"}, {'id': 3162, 'synset': 'great_snipe.n.01', 'name': 'great_snipe'}, {'id': 3163, 'synset': 'jacksnipe.n.01', 'name': 'jacksnipe'}, {'id': 3164, 'synset': 'dowitcher.n.01', 'name': 'dowitcher'}, {'id': 3165, 'synset': 'greyback.n.02', 'name': 'greyback'}, {'id': 3166, 'synset': 'red-breasted_snipe.n.01', 'name': 'red-breasted_snipe'}, {'id': 3167, 'synset': 'curlew.n.01', 'name': 'curlew'}, {'id': 3168, 'synset': 'european_curlew.n.01', 'name': 'European_curlew'}, {'id': 3169, 'synset': 'eskimo_curlew.n.01', 'name': 'Eskimo_curlew'}, {'id': 3170, 'synset': 'godwit.n.01', 'name': 'godwit'}, {'id': 3171, 'synset': 'hudsonian_godwit.n.01', 'name': 'Hudsonian_godwit'}, {'id': 3172, 'synset': 'stilt.n.04', 'name': 'stilt'}, {'id': 3173, 'synset': 'black-necked_stilt.n.01', 'name': 'black-necked_stilt'}, {'id': 3174, 'synset': 'black-winged_stilt.n.01', 'name': 'black-winged_stilt'}, {'id': 3175, 'synset': 'white-headed_stilt.n.01', 'name': 'white-headed_stilt'}, {'id': 3176, 'synset': 'kaki.n.02', 'name': 'kaki'}, {'id': 3177, 'synset': 'stilt.n.03', 'name': 'stilt'}, {'id': 3178, 'synset': 'banded_stilt.n.01', 'name': 'banded_stilt'}, {'id': 3179, 'synset': 'avocet.n.01', 'name': 'avocet'}, {'id': 3180, 'synset': 'oystercatcher.n.01', 'name': 'oystercatcher'}, {'id': 3181, 'synset': 'phalarope.n.01', 'name': 'phalarope'}, {'id': 3182, 'synset': 'red_phalarope.n.01', 'name': 'red_phalarope'}, {'id': 3183, 'synset': 'northern_phalarope.n.01', 'name': 'northern_phalarope'}, {'id': 3184, 'synset': "wilson's_phalarope.n.01", 'name': "Wilson's_phalarope"}, {'id': 3185, 'synset': 'pratincole.n.01', 'name': 'pratincole'}, {'id': 3186, 'synset': 'courser.n.04', 'name': 'courser'}, {'id': 3187, 'synset': 'cream-colored_courser.n.01', 'name': 'cream-colored_courser'}, {'id': 3188, 'synset': 'crocodile_bird.n.01', 'name': 'crocodile_bird'}, {'id': 3189, 'synset': 'stone_curlew.n.01', 'name': 'stone_curlew'}, {'id': 3190, 'synset': 'coastal_diving_bird.n.01', 'name': 'coastal_diving_bird'}, {'id': 3191, 'synset': 'larid.n.01', 'name': 'larid'}, {'id': 3192, 'synset': 'mew.n.02', 'name': 'mew'}, {'id': 3193, 'synset': 'black-backed_gull.n.01', 'name': 'black-backed_gull'}, {'id': 3194, 'synset': 'herring_gull.n.01', 'name': 'herring_gull'}, {'id': 3195, 'synset': 'laughing_gull.n.01', 'name': 'laughing_gull'}, {'id': 3196, 'synset': 'ivory_gull.n.01', 'name': 'ivory_gull'}, {'id': 3197, 'synset': 'kittiwake.n.01', 'name': 'kittiwake'}, {'id': 3198, 'synset': 'tern.n.01', 'name': 'tern'}, {'id': 3199, 'synset': 'sea_swallow.n.01', 'name': 'sea_swallow'}, {'id': 3200, 'synset': 'skimmer.n.04', 'name': 'skimmer'}, {'id': 3201, 'synset': 'jaeger.n.01', 'name': 'jaeger'}, {'id': 3202, 'synset': 'parasitic_jaeger.n.01', 'name': 'parasitic_jaeger'}, {'id': 3203, 'synset': 'skua.n.01', 'name': 'skua'}, {'id': 3204, 'synset': 'great_skua.n.01', 'name': 'great_skua'}, {'id': 3205, 'synset': 'auk.n.01', 'name': 'auk'}, {'id': 3206, 'synset': 'auklet.n.01', 'name': 'auklet'}, {'id': 3207, 'synset': 'razorbill.n.01', 'name': 'razorbill'}, {'id': 3208, 'synset': 'little_auk.n.01', 'name': 'little_auk'}, {'id': 3209, 'synset': 'guillemot.n.01', 'name': 'guillemot'}, {'id': 3210, 'synset': 'black_guillemot.n.01', 'name': 'black_guillemot'}, {'id': 3211, 'synset': 'pigeon_guillemot.n.01', 'name': 'pigeon_guillemot'}, {'id': 3212, 'synset': 'murre.n.01', 'name': 'murre'}, {'id': 3213, 'synset': 'common_murre.n.01', 'name': 'common_murre'}, {'id': 3214, 'synset': 'thick-billed_murre.n.01', 'name': 'thick-billed_murre'}, {'id': 3215, 'synset': 'atlantic_puffin.n.01', 'name': 'Atlantic_puffin'}, {'id': 3216, 'synset': 'horned_puffin.n.01', 'name': 'horned_puffin'}, {'id': 3217, 'synset': 'tufted_puffin.n.01', 'name': 'tufted_puffin'}, {'id': 3218, 'synset': 'gaviiform_seabird.n.01', 'name': 'gaviiform_seabird'}, {'id': 3219, 'synset': 'loon.n.02', 'name': 'loon'}, {'id': 3220, 'synset': 'podicipitiform_seabird.n.01', 'name': 'podicipitiform_seabird'}, {'id': 3221, 'synset': 'grebe.n.01', 'name': 'grebe'}, {'id': 3222, 'synset': 'great_crested_grebe.n.01', 'name': 'great_crested_grebe'}, {'id': 3223, 'synset': 'red-necked_grebe.n.01', 'name': 'red-necked_grebe'}, {'id': 3224, 'synset': 'black-necked_grebe.n.01', 'name': 'black-necked_grebe'}, {'id': 3225, 'synset': 'dabchick.n.01', 'name': 'dabchick'}, {'id': 3226, 'synset': 'pied-billed_grebe.n.01', 'name': 'pied-billed_grebe'}, {'id': 3227, 'synset': 'pelecaniform_seabird.n.01', 'name': 'pelecaniform_seabird'}, {'id': 3228, 'synset': 'white_pelican.n.01', 'name': 'white_pelican'}, {'id': 3229, 'synset': 'old_world_white_pelican.n.01', 'name': 'Old_world_white_pelican'}, {'id': 3230, 'synset': 'frigate_bird.n.01', 'name': 'frigate_bird'}, {'id': 3231, 'synset': 'gannet.n.01', 'name': 'gannet'}, {'id': 3232, 'synset': 'solan.n.01', 'name': 'solan'}, {'id': 3233, 'synset': 'booby.n.02', 'name': 'booby'}, {'id': 3234, 'synset': 'cormorant.n.01', 'name': 'cormorant'}, {'id': 3235, 'synset': 'snakebird.n.01', 'name': 'snakebird'}, {'id': 3236, 'synset': 'water_turkey.n.01', 'name': 'water_turkey'}, {'id': 3237, 'synset': 'tropic_bird.n.01', 'name': 'tropic_bird'}, {'id': 3238, 'synset': 'sphenisciform_seabird.n.01', 'name': 'sphenisciform_seabird'}, {'id': 3239, 'synset': 'adelie.n.01', 'name': 'Adelie'}, {'id': 3240, 'synset': 'king_penguin.n.01', 'name': 'king_penguin'}, {'id': 3241, 'synset': 'emperor_penguin.n.01', 'name': 'emperor_penguin'}, {'id': 3242, 'synset': 'jackass_penguin.n.01', 'name': 'jackass_penguin'}, {'id': 3243, 'synset': 'rock_hopper.n.01', 'name': 'rock_hopper'}, {'id': 3244, 'synset': 'pelagic_bird.n.01', 'name': 'pelagic_bird'}, {'id': 3245, 'synset': 'procellariiform_seabird.n.01', 'name': 'procellariiform_seabird'}, {'id': 3246, 'synset': 'albatross.n.02', 'name': 'albatross'}, {'id': 3247, 'synset': 'wandering_albatross.n.01', 'name': 'wandering_albatross'}, {'id': 3248, 'synset': 'black-footed_albatross.n.01', 'name': 'black-footed_albatross'}, {'id': 3249, 'synset': 'petrel.n.01', 'name': 'petrel'}, {'id': 3250, 'synset': 'white-chinned_petrel.n.01', 'name': 'white-chinned_petrel'}, {'id': 3251, 'synset': 'giant_petrel.n.01', 'name': 'giant_petrel'}, {'id': 3252, 'synset': 'fulmar.n.01', 'name': 'fulmar'}, {'id': 3253, 'synset': 'shearwater.n.01', 'name': 'shearwater'}, {'id': 3254, 'synset': 'manx_shearwater.n.01', 'name': 'Manx_shearwater'}, {'id': 3255, 'synset': 'storm_petrel.n.01', 'name': 'storm_petrel'}, {'id': 3256, 'synset': 'stormy_petrel.n.01', 'name': 'stormy_petrel'}, {'id': 3257, 'synset': "mother_carey's_chicken.n.01", 'name': "Mother_Carey's_chicken"}, {'id': 3258, 'synset': 'diving_petrel.n.01', 'name': 'diving_petrel'}, {'id': 3259, 'synset': 'aquatic_mammal.n.01', 'name': 'aquatic_mammal'}, {'id': 3260, 'synset': 'cetacean.n.01', 'name': 'cetacean'}, {'id': 3261, 'synset': 'whale.n.02', 'name': 'whale'}, {'id': 3262, 'synset': 'baleen_whale.n.01', 'name': 'baleen_whale'}, {'id': 3263, 'synset': 'right_whale.n.01', 'name': 'right_whale'}, {'id': 3264, 'synset': 'bowhead.n.01', 'name': 'bowhead'}, {'id': 3265, 'synset': 'rorqual.n.01', 'name': 'rorqual'}, {'id': 3266, 'synset': 'blue_whale.n.01', 'name': 'blue_whale'}, {'id': 3267, 'synset': 'finback.n.01', 'name': 'finback'}, {'id': 3268, 'synset': 'sei_whale.n.01', 'name': 'sei_whale'}, {'id': 3269, 'synset': 'lesser_rorqual.n.01', 'name': 'lesser_rorqual'}, {'id': 3270, 'synset': 'humpback.n.03', 'name': 'humpback'}, {'id': 3271, 'synset': 'grey_whale.n.01', 'name': 'grey_whale'}, {'id': 3272, 'synset': 'toothed_whale.n.01', 'name': 'toothed_whale'}, {'id': 3273, 'synset': 'sperm_whale.n.01', 'name': 'sperm_whale'}, {'id': 3274, 'synset': 'pygmy_sperm_whale.n.01', 'name': 'pygmy_sperm_whale'}, {'id': 3275, 'synset': 'dwarf_sperm_whale.n.01', 'name': 'dwarf_sperm_whale'}, {'id': 3276, 'synset': 'beaked_whale.n.01', 'name': 'beaked_whale'}, {'id': 3277, 'synset': 'bottle-nosed_whale.n.01', 'name': 'bottle-nosed_whale'}, {'id': 3278, 'synset': 'common_dolphin.n.01', 'name': 'common_dolphin'}, {'id': 3279, 'synset': 'bottlenose_dolphin.n.01', 'name': 'bottlenose_dolphin'}, {'id': 3280, 'synset': 'atlantic_bottlenose_dolphin.n.01', 'name': 'Atlantic_bottlenose_dolphin'}, {'id': 3281, 'synset': 'pacific_bottlenose_dolphin.n.01', 'name': 'Pacific_bottlenose_dolphin'}, {'id': 3282, 'synset': 'porpoise.n.01', 'name': 'porpoise'}, {'id': 3283, 'synset': 'harbor_porpoise.n.01', 'name': 'harbor_porpoise'}, {'id': 3284, 'synset': 'vaquita.n.01', 'name': 'vaquita'}, {'id': 3285, 'synset': 'grampus.n.02', 'name': 'grampus'}, {'id': 3286, 'synset': 'killer_whale.n.01', 'name': 'killer_whale'}, {'id': 3287, 'synset': 'pilot_whale.n.01', 'name': 'pilot_whale'}, {'id': 3288, 'synset': 'river_dolphin.n.01', 'name': 'river_dolphin'}, {'id': 3289, 'synset': 'narwhal.n.01', 'name': 'narwhal'}, {'id': 3290, 'synset': 'white_whale.n.01', 'name': 'white_whale'}, {'id': 3291, 'synset': 'sea_cow.n.01', 'name': 'sea_cow'}, {'id': 3292, 'synset': 'dugong.n.01', 'name': 'dugong'}, {'id': 3293, 'synset': "steller's_sea_cow.n.01", 'name': "Steller's_sea_cow"}, {'id': 3294, 'synset': 'carnivore.n.01', 'name': 'carnivore'}, {'id': 3295, 'synset': 'omnivore.n.02', 'name': 'omnivore'}, {'id': 3296, 'synset': 'pinniped_mammal.n.01', 'name': 'pinniped_mammal'}, {'id': 3297, 'synset': 'seal.n.09', 'name': 'seal'}, {'id': 3298, 'synset': 'crabeater_seal.n.01', 'name': 'crabeater_seal'}, {'id': 3299, 'synset': 'eared_seal.n.01', 'name': 'eared_seal'}, {'id': 3300, 'synset': 'fur_seal.n.02', 'name': 'fur_seal'}, {'id': 3301, 'synset': 'guadalupe_fur_seal.n.01', 'name': 'guadalupe_fur_seal'}, {'id': 3302, 'synset': 'fur_seal.n.01', 'name': 'fur_seal'}, {'id': 3303, 'synset': 'alaska_fur_seal.n.01', 'name': 'Alaska_fur_seal'}, {'id': 3304, 'synset': 'sea_lion.n.01', 'name': 'sea_lion'}, {'id': 3305, 'synset': 'south_american_sea_lion.n.01', 'name': 'South_American_sea_lion'}, {'id': 3306, 'synset': 'california_sea_lion.n.01', 'name': 'California_sea_lion'}, {'id': 3307, 'synset': 'australian_sea_lion.n.01', 'name': 'Australian_sea_lion'}, {'id': 3308, 'synset': 'steller_sea_lion.n.01', 'name': 'Steller_sea_lion'}, {'id': 3309, 'synset': 'earless_seal.n.01', 'name': 'earless_seal'}, {'id': 3310, 'synset': 'harbor_seal.n.01', 'name': 'harbor_seal'}, {'id': 3311, 'synset': 'harp_seal.n.01', 'name': 'harp_seal'}, {'id': 3312, 'synset': 'elephant_seal.n.01', 'name': 'elephant_seal'}, {'id': 3313, 'synset': 'bearded_seal.n.01', 'name': 'bearded_seal'}, {'id': 3314, 'synset': 'hooded_seal.n.01', 'name': 'hooded_seal'}, {'id': 3315, 'synset': 'atlantic_walrus.n.01', 'name': 'Atlantic_walrus'}, {'id': 3316, 'synset': 'pacific_walrus.n.01', 'name': 'Pacific_walrus'}, {'id': 3317, 'synset': 'fissipedia.n.01', 'name': 'Fissipedia'}, {'id': 3318, 'synset': 'fissiped_mammal.n.01', 'name': 'fissiped_mammal'}, {'id': 3319, 'synset': 'aardvark.n.01', 'name': 'aardvark'}, {'id': 3320, 'synset': 'canine.n.02', 'name': 'canine'}, {'id': 3321, 'synset': 'bitch.n.04', 'name': 'bitch'}, {'id': 3322, 'synset': 'brood_bitch.n.01', 'name': 'brood_bitch'}, {'id': 3323, 'synset': 'pooch.n.01', 'name': 'pooch'}, {'id': 3324, 'synset': 'cur.n.01', 'name': 'cur'}, {'id': 3325, 'synset': 'feist.n.01', 'name': 'feist'}, {'id': 3326, 'synset': 'pariah_dog.n.01', 'name': 'pariah_dog'}, {'id': 3327, 'synset': 'lapdog.n.01', 'name': 'lapdog'}, {'id': 3328, 'synset': 'toy_dog.n.01', 'name': 'toy_dog'}, {'id': 3329, 'synset': 'chihuahua.n.03', 'name': 'Chihuahua'}, {'id': 3330, 'synset': 'japanese_spaniel.n.01', 'name': 'Japanese_spaniel'}, {'id': 3331, 'synset': 'maltese_dog.n.01', 'name': 'Maltese_dog'}, {'id': 3332, 'synset': 'pekinese.n.01', 'name': 'Pekinese'}, {'id': 3333, 'synset': 'shih-tzu.n.01', 'name': 'Shih-Tzu'}, {'id': 3334, 'synset': 'toy_spaniel.n.01', 'name': 'toy_spaniel'}, {'id': 3335, 'synset': 'english_toy_spaniel.n.01', 'name': 'English_toy_spaniel'}, {'id': 3336, 'synset': 'blenheim_spaniel.n.01', 'name': 'Blenheim_spaniel'}, {'id': 3337, 'synset': 'king_charles_spaniel.n.01', 'name': 'King_Charles_spaniel'}, {'id': 3338, 'synset': 'papillon.n.01', 'name': 'papillon'}, {'id': 3339, 'synset': 'toy_terrier.n.01', 'name': 'toy_terrier'}, {'id': 3340, 'synset': 'hunting_dog.n.01', 'name': 'hunting_dog'}, {'id': 3341, 'synset': 'courser.n.03', 'name': 'courser'}, {'id': 3342, 'synset': 'rhodesian_ridgeback.n.01', 'name': 'Rhodesian_ridgeback'}, {'id': 3343, 'synset': 'hound.n.01', 'name': 'hound'}, {'id': 3344, 'synset': 'afghan_hound.n.01', 'name': 'Afghan_hound'}, {'id': 3345, 'synset': 'basset.n.01', 'name': 'basset'}, {'id': 3346, 'synset': 'beagle.n.01', 'name': 'beagle'}, {'id': 3347, 'synset': 'bloodhound.n.01', 'name': 'bloodhound'}, {'id': 3348, 'synset': 'bluetick.n.01', 'name': 'bluetick'}, {'id': 3349, 'synset': 'boarhound.n.01', 'name': 'boarhound'}, {'id': 3350, 'synset': 'coonhound.n.01', 'name': 'coonhound'}, {'id': 3351, 'synset': 'coondog.n.01', 'name': 'coondog'}, {'id': 3352, 'synset': 'black-and-tan_coonhound.n.01', 'name': 'black-and-tan_coonhound'}, {'id': 3353, 'synset': 'dachshund.n.01', 'name': 'dachshund'}, {'id': 3354, 'synset': 'sausage_dog.n.01', 'name': 'sausage_dog'}, {'id': 3355, 'synset': 'foxhound.n.01', 'name': 'foxhound'}, {'id': 3356, 'synset': 'american_foxhound.n.01', 'name': 'American_foxhound'}, {'id': 3357, 'synset': 'walker_hound.n.01', 'name': 'Walker_hound'}, {'id': 3358, 'synset': 'english_foxhound.n.01', 'name': 'English_foxhound'}, {'id': 3359, 'synset': 'harrier.n.02', 'name': 'harrier'}, {'id': 3360, 'synset': 'plott_hound.n.01', 'name': 'Plott_hound'}, {'id': 3361, 'synset': 'redbone.n.01', 'name': 'redbone'}, {'id': 3362, 'synset': 'wolfhound.n.01', 'name': 'wolfhound'}, {'id': 3363, 'synset': 'borzoi.n.01', 'name': 'borzoi'}, {'id': 3364, 'synset': 'irish_wolfhound.n.01', 'name': 'Irish_wolfhound'}, {'id': 3365, 'synset': 'greyhound.n.01', 'name': 'greyhound'}, {'id': 3366, 'synset': 'italian_greyhound.n.01', 'name': 'Italian_greyhound'}, {'id': 3367, 'synset': 'whippet.n.01', 'name': 'whippet'}, {'id': 3368, 'synset': 'ibizan_hound.n.01', 'name': 'Ibizan_hound'}, {'id': 3369, 'synset': 'norwegian_elkhound.n.01', 'name': 'Norwegian_elkhound'}, {'id': 3370, 'synset': 'otterhound.n.01', 'name': 'otterhound'}, {'id': 3371, 'synset': 'saluki.n.01', 'name': 'Saluki'}, {'id': 3372, 'synset': 'scottish_deerhound.n.01', 'name': 'Scottish_deerhound'}, {'id': 3373, 'synset': 'staghound.n.01', 'name': 'staghound'}, {'id': 3374, 'synset': 'weimaraner.n.01', 'name': 'Weimaraner'}, {'id': 3375, 'synset': 'terrier.n.01', 'name': 'terrier'}, {'id': 3376, 'synset': 'bullterrier.n.01', 'name': 'bullterrier'}, {'id': 3377, 'synset': 'staffordshire_bullterrier.n.01', 'name': 'Staffordshire_bullterrier'}, {'id': 3378, 'synset': 'american_staffordshire_terrier.n.01', 'name': 'American_Staffordshire_terrier'}, {'id': 3379, 'synset': 'bedlington_terrier.n.01', 'name': 'Bedlington_terrier'}, {'id': 3380, 'synset': 'border_terrier.n.01', 'name': 'Border_terrier'}, {'id': 3381, 'synset': 'kerry_blue_terrier.n.01', 'name': 'Kerry_blue_terrier'}, {'id': 3382, 'synset': 'irish_terrier.n.01', 'name': 'Irish_terrier'}, {'id': 3383, 'synset': 'norfolk_terrier.n.01', 'name': 'Norfolk_terrier'}, {'id': 3384, 'synset': 'norwich_terrier.n.01', 'name': 'Norwich_terrier'}, {'id': 3385, 'synset': 'yorkshire_terrier.n.01', 'name': 'Yorkshire_terrier'}, {'id': 3386, 'synset': 'rat_terrier.n.01', 'name': 'rat_terrier'}, {'id': 3387, 'synset': 'manchester_terrier.n.01', 'name': 'Manchester_terrier'}, {'id': 3388, 'synset': 'toy_manchester.n.01', 'name': 'toy_Manchester'}, {'id': 3389, 'synset': 'fox_terrier.n.01', 'name': 'fox_terrier'}, {'id': 3390, 'synset': 'smooth-haired_fox_terrier.n.01', 'name': 'smooth-haired_fox_terrier'}, {'id': 3391, 'synset': 'wire-haired_fox_terrier.n.01', 'name': 'wire-haired_fox_terrier'}, {'id': 3392, 'synset': 'wirehair.n.01', 'name': 'wirehair'}, {'id': 3393, 'synset': 'lakeland_terrier.n.01', 'name': 'Lakeland_terrier'}, {'id': 3394, 'synset': 'welsh_terrier.n.01', 'name': 'Welsh_terrier'}, {'id': 3395, 'synset': 'sealyham_terrier.n.01', 'name': 'Sealyham_terrier'}, {'id': 3396, 'synset': 'airedale.n.01', 'name': 'Airedale'}, {'id': 3397, 'synset': 'cairn.n.02', 'name': 'cairn'}, {'id': 3398, 'synset': 'australian_terrier.n.01', 'name': 'Australian_terrier'}, {'id': 3399, 'synset': 'dandie_dinmont.n.01', 'name': 'Dandie_Dinmont'}, {'id': 3400, 'synset': 'boston_bull.n.01', 'name': 'Boston_bull'}, {'id': 3401, 'synset': 'schnauzer.n.01', 'name': 'schnauzer'}, {'id': 3402, 'synset': 'miniature_schnauzer.n.01', 'name': 'miniature_schnauzer'}, {'id': 3403, 'synset': 'giant_schnauzer.n.01', 'name': 'giant_schnauzer'}, {'id': 3404, 'synset': 'standard_schnauzer.n.01', 'name': 'standard_schnauzer'}, {'id': 3405, 'synset': 'scotch_terrier.n.01', 'name': 'Scotch_terrier'}, {'id': 3406, 'synset': 'tibetan_terrier.n.01', 'name': 'Tibetan_terrier'}, {'id': 3407, 'synset': 'silky_terrier.n.01', 'name': 'silky_terrier'}, {'id': 3408, 'synset': 'skye_terrier.n.01', 'name': 'Skye_terrier'}, {'id': 3409, 'synset': 'clydesdale_terrier.n.01', 'name': 'Clydesdale_terrier'}, {'id': 3410, 'synset': 'soft-coated_wheaten_terrier.n.01', 'name': 'soft-coated_wheaten_terrier'}, {'id': 3411, 'synset': 'west_highland_white_terrier.n.01', 'name': 'West_Highland_white_terrier'}, {'id': 3412, 'synset': 'lhasa.n.02', 'name': 'Lhasa'}, {'id': 3413, 'synset': 'sporting_dog.n.01', 'name': 'sporting_dog'}, {'id': 3414, 'synset': 'bird_dog.n.01', 'name': 'bird_dog'}, {'id': 3415, 'synset': 'water_dog.n.02', 'name': 'water_dog'}, {'id': 3416, 'synset': 'retriever.n.01', 'name': 'retriever'}, {'id': 3417, 'synset': 'flat-coated_retriever.n.01', 'name': 'flat-coated_retriever'}, {'id': 3418, 'synset': 'curly-coated_retriever.n.01', 'name': 'curly-coated_retriever'}, {'id': 3419, 'synset': 'golden_retriever.n.01', 'name': 'golden_retriever'}, {'id': 3420, 'synset': 'labrador_retriever.n.01', 'name': 'Labrador_retriever'}, {'id': 3421, 'synset': 'chesapeake_bay_retriever.n.01', 'name': 'Chesapeake_Bay_retriever'}, {'id': 3422, 'synset': 'pointer.n.04', 'name': 'pointer'}, {'id': 3423, 'synset': 'german_short-haired_pointer.n.01', 'name': 'German_short-haired_pointer'}, {'id': 3424, 'synset': 'setter.n.02', 'name': 'setter'}, {'id': 3425, 'synset': 'vizsla.n.01', 'name': 'vizsla'}, {'id': 3426, 'synset': 'english_setter.n.01', 'name': 'English_setter'}, {'id': 3427, 'synset': 'irish_setter.n.01', 'name': 'Irish_setter'}, {'id': 3428, 'synset': 'gordon_setter.n.01', 'name': 'Gordon_setter'}, {'id': 3429, 'synset': 'spaniel.n.01', 'name': 'spaniel'}, {'id': 3430, 'synset': 'brittany_spaniel.n.01', 'name': 'Brittany_spaniel'}, {'id': 3431, 'synset': 'clumber.n.01', 'name': 'clumber'}, {'id': 3432, 'synset': 'field_spaniel.n.01', 'name': 'field_spaniel'}, {'id': 3433, 'synset': 'springer_spaniel.n.01', 'name': 'springer_spaniel'}, {'id': 3434, 'synset': 'english_springer.n.01', 'name': 'English_springer'}, {'id': 3435, 'synset': 'welsh_springer_spaniel.n.01', 'name': 'Welsh_springer_spaniel'}, {'id': 3436, 'synset': 'cocker_spaniel.n.01', 'name': 'cocker_spaniel'}, {'id': 3437, 'synset': 'sussex_spaniel.n.01', 'name': 'Sussex_spaniel'}, {'id': 3438, 'synset': 'water_spaniel.n.01', 'name': 'water_spaniel'}, {'id': 3439, 'synset': 'american_water_spaniel.n.01', 'name': 'American_water_spaniel'}, {'id': 3440, 'synset': 'irish_water_spaniel.n.01', 'name': 'Irish_water_spaniel'}, {'id': 3441, 'synset': 'griffon.n.03', 'name': 'griffon'}, {'id': 3442, 'synset': 'working_dog.n.01', 'name': 'working_dog'}, {'id': 3443, 'synset': 'watchdog.n.02', 'name': 'watchdog'}, {'id': 3444, 'synset': 'kuvasz.n.01', 'name': 'kuvasz'}, {'id': 3445, 'synset': 'attack_dog.n.01', 'name': 'attack_dog'}, {'id': 3446, 'synset': 'housedog.n.01', 'name': 'housedog'}, {'id': 3447, 'synset': 'schipperke.n.01', 'name': 'schipperke'}, {'id': 3448, 'synset': 'belgian_sheepdog.n.01', 'name': 'Belgian_sheepdog'}, {'id': 3449, 'synset': 'groenendael.n.01', 'name': 'groenendael'}, {'id': 3450, 'synset': 'malinois.n.01', 'name': 'malinois'}, {'id': 3451, 'synset': 'briard.n.01', 'name': 'briard'}, {'id': 3452, 'synset': 'kelpie.n.02', 'name': 'kelpie'}, {'id': 3453, 'synset': 'komondor.n.01', 'name': 'komondor'}, {'id': 3454, 'synset': 'old_english_sheepdog.n.01', 'name': 'Old_English_sheepdog'}, {'id': 3455, 'synset': 'shetland_sheepdog.n.01', 'name': 'Shetland_sheepdog'}, {'id': 3456, 'synset': 'collie.n.01', 'name': 'collie'}, {'id': 3457, 'synset': 'border_collie.n.01', 'name': 'Border_collie'}, {'id': 3458, 'synset': 'bouvier_des_flandres.n.01', 'name': 'Bouvier_des_Flandres'}, {'id': 3459, 'synset': 'rottweiler.n.01', 'name': 'Rottweiler'}, {'id': 3460, 'synset': 'german_shepherd.n.01', 'name': 'German_shepherd'}, {'id': 3461, 'synset': 'police_dog.n.01', 'name': 'police_dog'}, {'id': 3462, 'synset': 'pinscher.n.01', 'name': 'pinscher'}, {'id': 3463, 'synset': 'doberman.n.01', 'name': 'Doberman'}, {'id': 3464, 'synset': 'miniature_pinscher.n.01', 'name': 'miniature_pinscher'}, {'id': 3465, 'synset': 'sennenhunde.n.01', 'name': 'Sennenhunde'}, {'id': 3466, 'synset': 'greater_swiss_mountain_dog.n.01', 'name': 'Greater_Swiss_Mountain_dog'}, {'id': 3467, 'synset': 'bernese_mountain_dog.n.01', 'name': 'Bernese_mountain_dog'}, {'id': 3468, 'synset': 'appenzeller.n.01', 'name': 'Appenzeller'}, {'id': 3469, 'synset': 'entlebucher.n.01', 'name': 'EntleBucher'}, {'id': 3470, 'synset': 'boxer.n.04', 'name': 'boxer'}, {'id': 3471, 'synset': 'mastiff.n.01', 'name': 'mastiff'}, {'id': 3472, 'synset': 'bull_mastiff.n.01', 'name': 'bull_mastiff'}, {'id': 3473, 'synset': 'tibetan_mastiff.n.01', 'name': 'Tibetan_mastiff'}, {'id': 3474, 'synset': 'french_bulldog.n.01', 'name': 'French_bulldog'}, {'id': 3475, 'synset': 'great_dane.n.01', 'name': 'Great_Dane'}, {'id': 3476, 'synset': 'guide_dog.n.01', 'name': 'guide_dog'}, {'id': 3477, 'synset': 'seeing_eye_dog.n.01', 'name': 'Seeing_Eye_dog'}, {'id': 3478, 'synset': 'hearing_dog.n.01', 'name': 'hearing_dog'}, {'id': 3479, 'synset': 'saint_bernard.n.01', 'name': 'Saint_Bernard'}, {'id': 3480, 'synset': 'seizure-alert_dog.n.01', 'name': 'seizure-alert_dog'}, {'id': 3481, 'synset': 'sled_dog.n.01', 'name': 'sled_dog'}, {'id': 3482, 'synset': 'eskimo_dog.n.01', 'name': 'Eskimo_dog'}, {'id': 3483, 'synset': 'malamute.n.01', 'name': 'malamute'}, {'id': 3484, 'synset': 'siberian_husky.n.01', 'name': 'Siberian_husky'}, {'id': 3485, 'synset': 'liver-spotted_dalmatian.n.01', 'name': 'liver-spotted_dalmatian'}, {'id': 3486, 'synset': 'affenpinscher.n.01', 'name': 'affenpinscher'}, {'id': 3487, 'synset': 'basenji.n.01', 'name': 'basenji'}, {'id': 3488, 'synset': 'leonberg.n.01', 'name': 'Leonberg'}, {'id': 3489, 'synset': 'newfoundland.n.01', 'name': 'Newfoundland'}, {'id': 3490, 'synset': 'great_pyrenees.n.01', 'name': 'Great_Pyrenees'}, {'id': 3491, 'synset': 'spitz.n.01', 'name': 'spitz'}, {'id': 3492, 'synset': 'samoyed.n.03', 'name': 'Samoyed'}, {'id': 3493, 'synset': 'pomeranian.n.01', 'name': 'Pomeranian'}, {'id': 3494, 'synset': 'chow.n.03', 'name': 'chow'}, {'id': 3495, 'synset': 'keeshond.n.01', 'name': 'keeshond'}, {'id': 3496, 'synset': 'griffon.n.02', 'name': 'griffon'}, {'id': 3497, 'synset': 'brabancon_griffon.n.01', 'name': 'Brabancon_griffon'}, {'id': 3498, 'synset': 'corgi.n.01', 'name': 'corgi'}, {'id': 3499, 'synset': 'pembroke.n.01', 'name': 'Pembroke'}, {'id': 3500, 'synset': 'cardigan.n.02', 'name': 'Cardigan'}, {'id': 3501, 'synset': 'poodle.n.01', 'name': 'poodle'}, {'id': 3502, 'synset': 'toy_poodle.n.01', 'name': 'toy_poodle'}, {'id': 3503, 'synset': 'miniature_poodle.n.01', 'name': 'miniature_poodle'}, {'id': 3504, 'synset': 'standard_poodle.n.01', 'name': 'standard_poodle'}, {'id': 3505, 'synset': 'large_poodle.n.01', 'name': 'large_poodle'}, {'id': 3506, 'synset': 'mexican_hairless.n.01', 'name': 'Mexican_hairless'}, {'id': 3507, 'synset': 'timber_wolf.n.01', 'name': 'timber_wolf'}, {'id': 3508, 'synset': 'white_wolf.n.01', 'name': 'white_wolf'}, {'id': 3509, 'synset': 'red_wolf.n.01', 'name': 'red_wolf'}, {'id': 3510, 'synset': 'coyote.n.01', 'name': 'coyote'}, {'id': 3511, 'synset': 'coydog.n.01', 'name': 'coydog'}, {'id': 3512, 'synset': 'jackal.n.01', 'name': 'jackal'}, {'id': 3513, 'synset': 'wild_dog.n.01', 'name': 'wild_dog'}, {'id': 3514, 'synset': 'dingo.n.01', 'name': 'dingo'}, {'id': 3515, 'synset': 'dhole.n.01', 'name': 'dhole'}, {'id': 3516, 'synset': 'crab-eating_dog.n.01', 'name': 'crab-eating_dog'}, {'id': 3517, 'synset': 'raccoon_dog.n.01', 'name': 'raccoon_dog'}, {'id': 3518, 'synset': 'african_hunting_dog.n.01', 'name': 'African_hunting_dog'}, {'id': 3519, 'synset': 'hyena.n.01', 'name': 'hyena'}, {'id': 3520, 'synset': 'striped_hyena.n.01', 'name': 'striped_hyena'}, {'id': 3521, 'synset': 'brown_hyena.n.01', 'name': 'brown_hyena'}, {'id': 3522, 'synset': 'spotted_hyena.n.01', 'name': 'spotted_hyena'}, {'id': 3523, 'synset': 'aardwolf.n.01', 'name': 'aardwolf'}, {'id': 3524, 'synset': 'fox.n.01', 'name': 'fox'}, {'id': 3525, 'synset': 'vixen.n.02', 'name': 'vixen'}, {'id': 3526, 'synset': 'reynard.n.01', 'name': 'Reynard'}, {'id': 3527, 'synset': 'red_fox.n.03', 'name': 'red_fox'}, {'id': 3528, 'synset': 'black_fox.n.01', 'name': 'black_fox'}, {'id': 3529, 'synset': 'silver_fox.n.01', 'name': 'silver_fox'}, {'id': 3530, 'synset': 'red_fox.n.02', 'name': 'red_fox'}, {'id': 3531, 'synset': 'kit_fox.n.02', 'name': 'kit_fox'}, {'id': 3532, 'synset': 'kit_fox.n.01', 'name': 'kit_fox'}, {'id': 3533, 'synset': 'arctic_fox.n.01', 'name': 'Arctic_fox'}, {'id': 3534, 'synset': 'blue_fox.n.01', 'name': 'blue_fox'}, {'id': 3535, 'synset': 'grey_fox.n.01', 'name': 'grey_fox'}, {'id': 3536, 'synset': 'feline.n.01', 'name': 'feline'}, {'id': 3537, 'synset': 'domestic_cat.n.01', 'name': 'domestic_cat'}, {'id': 3538, 'synset': 'kitty.n.04', 'name': 'kitty'}, {'id': 3539, 'synset': 'mouser.n.01', 'name': 'mouser'}, {'id': 3540, 'synset': 'alley_cat.n.01', 'name': 'alley_cat'}, {'id': 3541, 'synset': 'stray.n.01', 'name': 'stray'}, {'id': 3542, 'synset': 'tom.n.02', 'name': 'tom'}, {'id': 3543, 'synset': 'gib.n.02', 'name': 'gib'}, {'id': 3544, 'synset': 'tabby.n.02', 'name': 'tabby'}, {'id': 3545, 'synset': 'tabby.n.01', 'name': 'tabby'}, {'id': 3546, 'synset': 'tiger_cat.n.02', 'name': 'tiger_cat'}, {'id': 3547, 'synset': 'tortoiseshell.n.03', 'name': 'tortoiseshell'}, {'id': 3548, 'synset': 'persian_cat.n.01', 'name': 'Persian_cat'}, {'id': 3549, 'synset': 'angora.n.04', 'name': 'Angora'}, {'id': 3550, 'synset': 'siamese_cat.n.01', 'name': 'Siamese_cat'}, {'id': 3551, 'synset': 'blue_point_siamese.n.01', 'name': 'blue_point_Siamese'}, {'id': 3552, 'synset': 'burmese_cat.n.01', 'name': 'Burmese_cat'}, {'id': 3553, 'synset': 'egyptian_cat.n.01', 'name': 'Egyptian_cat'}, {'id': 3554, 'synset': 'maltese.n.03', 'name': 'Maltese'}, {'id': 3555, 'synset': 'abyssinian.n.01', 'name': 'Abyssinian'}, {'id': 3556, 'synset': 'manx.n.02', 'name': 'Manx'}, {'id': 3557, 'synset': 'wildcat.n.03', 'name': 'wildcat'}, {'id': 3558, 'synset': 'sand_cat.n.01', 'name': 'sand_cat'}, {'id': 3559, 'synset': 'european_wildcat.n.01', 'name': 'European_wildcat'}, {'id': 3560, 'synset': 'ocelot.n.01', 'name': 'ocelot'}, {'id': 3561, 'synset': 'jaguarundi.n.01', 'name': 'jaguarundi'}, {'id': 3562, 'synset': 'kaffir_cat.n.01', 'name': 'kaffir_cat'}, {'id': 3563, 'synset': 'jungle_cat.n.01', 'name': 'jungle_cat'}, {'id': 3564, 'synset': 'serval.n.01', 'name': 'serval'}, {'id': 3565, 'synset': 'leopard_cat.n.01', 'name': 'leopard_cat'}, {'id': 3566, 'synset': 'margay.n.01', 'name': 'margay'}, {'id': 3567, 'synset': 'manul.n.01', 'name': 'manul'}, {'id': 3568, 'synset': 'lynx.n.02', 'name': 'lynx'}, {'id': 3569, 'synset': 'common_lynx.n.01', 'name': 'common_lynx'}, {'id': 3570, 'synset': 'canada_lynx.n.01', 'name': 'Canada_lynx'}, {'id': 3571, 'synset': 'bobcat.n.01', 'name': 'bobcat'}, {'id': 3572, 'synset': 'spotted_lynx.n.01', 'name': 'spotted_lynx'}, {'id': 3573, 'synset': 'caracal.n.01', 'name': 'caracal'}, {'id': 3574, 'synset': 'big_cat.n.01', 'name': 'big_cat'}, {'id': 3575, 'synset': 'leopard.n.02', 'name': 'leopard'}, {'id': 3576, 'synset': 'leopardess.n.01', 'name': 'leopardess'}, {'id': 3577, 'synset': 'panther.n.02', 'name': 'panther'}, {'id': 3578, 'synset': 'snow_leopard.n.01', 'name': 'snow_leopard'}, {'id': 3579, 'synset': 'jaguar.n.01', 'name': 'jaguar'}, {'id': 3580, 'synset': 'lioness.n.01', 'name': 'lioness'}, {'id': 3581, 'synset': 'lionet.n.01', 'name': 'lionet'}, {'id': 3582, 'synset': 'bengal_tiger.n.01', 'name': 'Bengal_tiger'}, {'id': 3583, 'synset': 'tigress.n.01', 'name': 'tigress'}, {'id': 3584, 'synset': 'liger.n.01', 'name': 'liger'}, {'id': 3585, 'synset': 'tiglon.n.01', 'name': 'tiglon'}, {'id': 3586, 'synset': 'cheetah.n.01', 'name': 'cheetah'}, {'id': 3587, 'synset': 'saber-toothed_tiger.n.01', 'name': 'saber-toothed_tiger'}, {'id': 3588, 'synset': 'smiledon_californicus.n.01', 'name': 'Smiledon_californicus'}, {'id': 3589, 'synset': 'brown_bear.n.01', 'name': 'brown_bear'}, {'id': 3590, 'synset': 'bruin.n.01', 'name': 'bruin'}, {'id': 3591, 'synset': 'syrian_bear.n.01', 'name': 'Syrian_bear'}, {'id': 3592, 'synset': 'alaskan_brown_bear.n.01', 'name': 'Alaskan_brown_bear'}, {'id': 3593, 'synset': 'american_black_bear.n.01', 'name': 'American_black_bear'}, {'id': 3594, 'synset': 'cinnamon_bear.n.01', 'name': 'cinnamon_bear'}, {'id': 3595, 'synset': 'asiatic_black_bear.n.01', 'name': 'Asiatic_black_bear'}, {'id': 3596, 'synset': 'sloth_bear.n.01', 'name': 'sloth_bear'}, {'id': 3597, 'synset': 'viverrine.n.01', 'name': 'viverrine'}, {'id': 3598, 'synset': 'civet.n.01', 'name': 'civet'}, {'id': 3599, 'synset': 'large_civet.n.01', 'name': 'large_civet'}, {'id': 3600, 'synset': 'small_civet.n.01', 'name': 'small_civet'}, {'id': 3601, 'synset': 'binturong.n.01', 'name': 'binturong'}, {'id': 3602, 'synset': 'cryptoprocta.n.01', 'name': 'Cryptoprocta'}, {'id': 3603, 'synset': 'fossa.n.03', 'name': 'fossa'}, {'id': 3604, 'synset': 'fanaloka.n.01', 'name': 'fanaloka'}, {'id': 3605, 'synset': 'genet.n.03', 'name': 'genet'}, {'id': 3606, 'synset': 'banded_palm_civet.n.01', 'name': 'banded_palm_civet'}, {'id': 3607, 'synset': 'mongoose.n.01', 'name': 'mongoose'}, {'id': 3608, 'synset': 'indian_mongoose.n.01', 'name': 'Indian_mongoose'}, {'id': 3609, 'synset': 'ichneumon.n.01', 'name': 'ichneumon'}, {'id': 3610, 'synset': 'palm_cat.n.01', 'name': 'palm_cat'}, {'id': 3611, 'synset': 'meerkat.n.01', 'name': 'meerkat'}, {'id': 3612, 'synset': 'slender-tailed_meerkat.n.01', 'name': 'slender-tailed_meerkat'}, {'id': 3613, 'synset': 'suricate.n.01', 'name': 'suricate'}, {'id': 3614, 'synset': 'fruit_bat.n.01', 'name': 'fruit_bat'}, {'id': 3615, 'synset': 'flying_fox.n.01', 'name': 'flying_fox'}, {'id': 3616, 'synset': 'pteropus_capestratus.n.01', 'name': 'Pteropus_capestratus'}, {'id': 3617, 'synset': 'pteropus_hypomelanus.n.01', 'name': 'Pteropus_hypomelanus'}, {'id': 3618, 'synset': 'harpy.n.03', 'name': 'harpy'}, {'id': 3619, 'synset': 'cynopterus_sphinx.n.01', 'name': 'Cynopterus_sphinx'}, {'id': 3620, 'synset': 'carnivorous_bat.n.01', 'name': 'carnivorous_bat'}, {'id': 3621, 'synset': 'mouse-eared_bat.n.01', 'name': 'mouse-eared_bat'}, {'id': 3622, 'synset': 'leafnose_bat.n.01', 'name': 'leafnose_bat'}, {'id': 3623, 'synset': 'macrotus.n.01', 'name': 'macrotus'}, {'id': 3624, 'synset': 'spearnose_bat.n.01', 'name': 'spearnose_bat'}, {'id': 3625, 'synset': 'phyllostomus_hastatus.n.01', 'name': 'Phyllostomus_hastatus'}, {'id': 3626, 'synset': 'hognose_bat.n.01', 'name': 'hognose_bat'}, {'id': 3627, 'synset': 'horseshoe_bat.n.02', 'name': 'horseshoe_bat'}, {'id': 3628, 'synset': 'horseshoe_bat.n.01', 'name': 'horseshoe_bat'}, {'id': 3629, 'synset': 'orange_bat.n.01', 'name': 'orange_bat'}, {'id': 3630, 'synset': 'false_vampire.n.01', 'name': 'false_vampire'}, {'id': 3631, 'synset': 'big-eared_bat.n.01', 'name': 'big-eared_bat'}, {'id': 3632, 'synset': 'vespertilian_bat.n.01', 'name': 'vespertilian_bat'}, {'id': 3633, 'synset': 'frosted_bat.n.01', 'name': 'frosted_bat'}, {'id': 3634, 'synset': 'red_bat.n.01', 'name': 'red_bat'}, {'id': 3635, 'synset': 'brown_bat.n.01', 'name': 'brown_bat'}, {'id': 3636, 'synset': 'little_brown_bat.n.01', 'name': 'little_brown_bat'}, {'id': 3637, 'synset': 'cave_myotis.n.01', 'name': 'cave_myotis'}, {'id': 3638, 'synset': 'big_brown_bat.n.01', 'name': 'big_brown_bat'}, {'id': 3639, 'synset': 'serotine.n.01', 'name': 'serotine'}, {'id': 3640, 'synset': 'pallid_bat.n.01', 'name': 'pallid_bat'}, {'id': 3641, 'synset': 'pipistrelle.n.01', 'name': 'pipistrelle'}, {'id': 3642, 'synset': 'eastern_pipistrel.n.01', 'name': 'eastern_pipistrel'}, {'id': 3643, 'synset': 'jackass_bat.n.01', 'name': 'jackass_bat'}, {'id': 3644, 'synset': 'long-eared_bat.n.01', 'name': 'long-eared_bat'}, {'id': 3645, 'synset': 'western_big-eared_bat.n.01', 'name': 'western_big-eared_bat'}, {'id': 3646, 'synset': 'freetail.n.01', 'name': 'freetail'}, {'id': 3647, 'synset': 'guano_bat.n.01', 'name': 'guano_bat'}, {'id': 3648, 'synset': 'pocketed_bat.n.01', 'name': 'pocketed_bat'}, {'id': 3649, 'synset': 'mastiff_bat.n.01', 'name': 'mastiff_bat'}, {'id': 3650, 'synset': 'vampire_bat.n.01', 'name': 'vampire_bat'}, {'id': 3651, 'synset': 'desmodus_rotundus.n.01', 'name': 'Desmodus_rotundus'}, {'id': 3652, 'synset': 'hairy-legged_vampire_bat.n.01', 'name': 'hairy-legged_vampire_bat'}, {'id': 3653, 'synset': 'predator.n.02', 'name': 'predator'}, {'id': 3654, 'synset': 'prey.n.02', 'name': 'prey'}, {'id': 3655, 'synset': 'game.n.04', 'name': 'game'}, {'id': 3656, 'synset': 'big_game.n.01', 'name': 'big_game'}, {'id': 3657, 'synset': 'game_bird.n.01', 'name': 'game_bird'}, {'id': 3658, 'synset': 'fossorial_mammal.n.01', 'name': 'fossorial_mammal'}, {'id': 3659, 'synset': 'tetrapod.n.01', 'name': 'tetrapod'}, {'id': 3660, 'synset': 'quadruped.n.01', 'name': 'quadruped'}, {'id': 3661, 'synset': 'hexapod.n.01', 'name': 'hexapod'}, {'id': 3662, 'synset': 'biped.n.01', 'name': 'biped'}, {'id': 3663, 'synset': 'insect.n.01', 'name': 'insect'}, {'id': 3664, 'synset': 'social_insect.n.01', 'name': 'social_insect'}, {'id': 3665, 'synset': 'holometabola.n.01', 'name': 'holometabola'}, {'id': 3666, 'synset': 'defoliator.n.01', 'name': 'defoliator'}, {'id': 3667, 'synset': 'pollinator.n.01', 'name': 'pollinator'}, {'id': 3668, 'synset': 'gallfly.n.03', 'name': 'gallfly'}, {'id': 3669, 'synset': 'scorpion_fly.n.01', 'name': 'scorpion_fly'}, {'id': 3670, 'synset': 'hanging_fly.n.01', 'name': 'hanging_fly'}, {'id': 3671, 'synset': 'collembolan.n.01', 'name': 'collembolan'}, {'id': 3672, 'synset': 'tiger_beetle.n.01', 'name': 'tiger_beetle'}, {'id': 3673, 'synset': 'two-spotted_ladybug.n.01', 'name': 'two-spotted_ladybug'}, {'id': 3674, 'synset': 'mexican_bean_beetle.n.01', 'name': 'Mexican_bean_beetle'}, {'id': 3675, 'synset': 'hippodamia_convergens.n.01', 'name': 'Hippodamia_convergens'}, {'id': 3676, 'synset': 'vedalia.n.01', 'name': 'vedalia'}, {'id': 3677, 'synset': 'ground_beetle.n.01', 'name': 'ground_beetle'}, {'id': 3678, 'synset': 'bombardier_beetle.n.01', 'name': 'bombardier_beetle'}, {'id': 3679, 'synset': 'calosoma.n.01', 'name': 'calosoma'}, {'id': 3680, 'synset': 'searcher.n.03', 'name': 'searcher'}, {'id': 3681, 'synset': 'firefly.n.02', 'name': 'firefly'}, {'id': 3682, 'synset': 'glowworm.n.01', 'name': 'glowworm'}, {'id': 3683, 'synset': 'long-horned_beetle.n.01', 'name': 'long-horned_beetle'}, {'id': 3684, 'synset': 'sawyer.n.02', 'name': 'sawyer'}, {'id': 3685, 'synset': 'pine_sawyer.n.01', 'name': 'pine_sawyer'}, {'id': 3686, 'synset': 'leaf_beetle.n.01', 'name': 'leaf_beetle'}, {'id': 3687, 'synset': 'flea_beetle.n.01', 'name': 'flea_beetle'}, {'id': 3688, 'synset': 'colorado_potato_beetle.n.01', 'name': 'Colorado_potato_beetle'}, {'id': 3689, 'synset': 'carpet_beetle.n.01', 'name': 'carpet_beetle'}, {'id': 3690, 'synset': 'buffalo_carpet_beetle.n.01', 'name': 'buffalo_carpet_beetle'}, {'id': 3691, 'synset': 'black_carpet_beetle.n.01', 'name': 'black_carpet_beetle'}, {'id': 3692, 'synset': 'clerid_beetle.n.01', 'name': 'clerid_beetle'}, {'id': 3693, 'synset': 'bee_beetle.n.01', 'name': 'bee_beetle'}, {'id': 3694, 'synset': 'lamellicorn_beetle.n.01', 'name': 'lamellicorn_beetle'}, {'id': 3695, 'synset': 'scarabaeid_beetle.n.01', 'name': 'scarabaeid_beetle'}, {'id': 3696, 'synset': 'dung_beetle.n.01', 'name': 'dung_beetle'}, {'id': 3697, 'synset': 'scarab.n.01', 'name': 'scarab'}, {'id': 3698, 'synset': 'tumblebug.n.01', 'name': 'tumblebug'}, {'id': 3699, 'synset': 'dorbeetle.n.01', 'name': 'dorbeetle'}, {'id': 3700, 'synset': 'june_beetle.n.01', 'name': 'June_beetle'}, {'id': 3701, 'synset': 'green_june_beetle.n.01', 'name': 'green_June_beetle'}, {'id': 3702, 'synset': 'japanese_beetle.n.01', 'name': 'Japanese_beetle'}, {'id': 3703, 'synset': 'oriental_beetle.n.01', 'name': 'Oriental_beetle'}, {'id': 3704, 'synset': 'rhinoceros_beetle.n.01', 'name': 'rhinoceros_beetle'}, {'id': 3705, 'synset': 'melolonthid_beetle.n.01', 'name': 'melolonthid_beetle'}, {'id': 3706, 'synset': 'cockchafer.n.01', 'name': 'cockchafer'}, {'id': 3707, 'synset': 'rose_chafer.n.02', 'name': 'rose_chafer'}, {'id': 3708, 'synset': 'rose_chafer.n.01', 'name': 'rose_chafer'}, {'id': 3709, 'synset': 'stag_beetle.n.01', 'name': 'stag_beetle'}, {'id': 3710, 'synset': 'elaterid_beetle.n.01', 'name': 'elaterid_beetle'}, {'id': 3711, 'synset': 'click_beetle.n.01', 'name': 'click_beetle'}, {'id': 3712, 'synset': 'firefly.n.01', 'name': 'firefly'}, {'id': 3713, 'synset': 'wireworm.n.01', 'name': 'wireworm'}, {'id': 3714, 'synset': 'water_beetle.n.01', 'name': 'water_beetle'}, {'id': 3715, 'synset': 'whirligig_beetle.n.01', 'name': 'whirligig_beetle'}, {'id': 3716, 'synset': 'deathwatch_beetle.n.01', 'name': 'deathwatch_beetle'}, {'id': 3717, 'synset': 'weevil.n.01', 'name': 'weevil'}, {'id': 3718, 'synset': 'snout_beetle.n.01', 'name': 'snout_beetle'}, {'id': 3719, 'synset': 'boll_weevil.n.01', 'name': 'boll_weevil'}, {'id': 3720, 'synset': 'blister_beetle.n.01', 'name': 'blister_beetle'}, {'id': 3721, 'synset': 'oil_beetle.n.01', 'name': 'oil_beetle'}, {'id': 3722, 'synset': 'spanish_fly.n.01', 'name': 'Spanish_fly'}, {'id': 3723, 'synset': 'dutch-elm_beetle.n.01', 'name': 'Dutch-elm_beetle'}, {'id': 3724, 'synset': 'bark_beetle.n.01', 'name': 'bark_beetle'}, {'id': 3725, 'synset': 'spruce_bark_beetle.n.01', 'name': 'spruce_bark_beetle'}, {'id': 3726, 'synset': 'rove_beetle.n.01', 'name': 'rove_beetle'}, {'id': 3727, 'synset': 'darkling_beetle.n.01', 'name': 'darkling_beetle'}, {'id': 3728, 'synset': 'mealworm.n.01', 'name': 'mealworm'}, {'id': 3729, 'synset': 'flour_beetle.n.01', 'name': 'flour_beetle'}, {'id': 3730, 'synset': 'seed_beetle.n.01', 'name': 'seed_beetle'}, {'id': 3731, 'synset': 'pea_weevil.n.01', 'name': 'pea_weevil'}, {'id': 3732, 'synset': 'bean_weevil.n.01', 'name': 'bean_weevil'}, {'id': 3733, 'synset': 'rice_weevil.n.01', 'name': 'rice_weevil'}, {'id': 3734, 'synset': 'asian_longhorned_beetle.n.01', 'name': 'Asian_longhorned_beetle'}, {'id': 3735, 'synset': 'web_spinner.n.01', 'name': 'web_spinner'}, {'id': 3736, 'synset': 'louse.n.01', 'name': 'louse'}, {'id': 3737, 'synset': 'common_louse.n.01', 'name': 'common_louse'}, {'id': 3738, 'synset': 'head_louse.n.01', 'name': 'head_louse'}, {'id': 3739, 'synset': 'body_louse.n.01', 'name': 'body_louse'}, {'id': 3740, 'synset': 'crab_louse.n.01', 'name': 'crab_louse'}, {'id': 3741, 'synset': 'bird_louse.n.01', 'name': 'bird_louse'}, {'id': 3742, 'synset': 'flea.n.01', 'name': 'flea'}, {'id': 3743, 'synset': 'pulex_irritans.n.01', 'name': 'Pulex_irritans'}, {'id': 3744, 'synset': 'dog_flea.n.01', 'name': 'dog_flea'}, {'id': 3745, 'synset': 'cat_flea.n.01', 'name': 'cat_flea'}, {'id': 3746, 'synset': 'chigoe.n.01', 'name': 'chigoe'}, {'id': 3747, 'synset': 'sticktight.n.02', 'name': 'sticktight'}, {'id': 3748, 'synset': 'dipterous_insect.n.01', 'name': 'dipterous_insect'}, {'id': 3749, 'synset': 'gall_midge.n.01', 'name': 'gall_midge'}, {'id': 3750, 'synset': 'hessian_fly.n.01', 'name': 'Hessian_fly'}, {'id': 3751, 'synset': 'fly.n.01', 'name': 'fly'}, {'id': 3752, 'synset': 'housefly.n.01', 'name': 'housefly'}, {'id': 3753, 'synset': 'tsetse_fly.n.01', 'name': 'tsetse_fly'}, {'id': 3754, 'synset': 'blowfly.n.01', 'name': 'blowfly'}, {'id': 3755, 'synset': 'bluebottle.n.02', 'name': 'bluebottle'}, {'id': 3756, 'synset': 'greenbottle.n.01', 'name': 'greenbottle'}, {'id': 3757, 'synset': 'flesh_fly.n.01', 'name': 'flesh_fly'}, {'id': 3758, 'synset': 'tachina_fly.n.01', 'name': 'tachina_fly'}, {'id': 3759, 'synset': 'gadfly.n.02', 'name': 'gadfly'}, {'id': 3760, 'synset': 'botfly.n.01', 'name': 'botfly'}, {'id': 3761, 'synset': 'human_botfly.n.01', 'name': 'human_botfly'}, {'id': 3762, 'synset': 'sheep_botfly.n.01', 'name': 'sheep_botfly'}, {'id': 3763, 'synset': 'warble_fly.n.01', 'name': 'warble_fly'}, {'id': 3764, 'synset': 'horsefly.n.02', 'name': 'horsefly'}, {'id': 3765, 'synset': 'bee_fly.n.01', 'name': 'bee_fly'}, {'id': 3766, 'synset': 'robber_fly.n.01', 'name': 'robber_fly'}, {'id': 3767, 'synset': 'fruit_fly.n.01', 'name': 'fruit_fly'}, {'id': 3768, 'synset': 'apple_maggot.n.01', 'name': 'apple_maggot'}, {'id': 3769, 'synset': 'mediterranean_fruit_fly.n.01', 'name': 'Mediterranean_fruit_fly'}, {'id': 3770, 'synset': 'drosophila.n.01', 'name': 'drosophila'}, {'id': 3771, 'synset': 'vinegar_fly.n.01', 'name': 'vinegar_fly'}, {'id': 3772, 'synset': 'leaf_miner.n.01', 'name': 'leaf_miner'}, {'id': 3773, 'synset': 'louse_fly.n.01', 'name': 'louse_fly'}, {'id': 3774, 'synset': 'horse_tick.n.01', 'name': 'horse_tick'}, {'id': 3775, 'synset': 'sheep_ked.n.01', 'name': 'sheep_ked'}, {'id': 3776, 'synset': 'horn_fly.n.01', 'name': 'horn_fly'}, {'id': 3777, 'synset': 'mosquito.n.01', 'name': 'mosquito'}, {'id': 3778, 'synset': 'wiggler.n.02', 'name': 'wiggler'}, {'id': 3779, 'synset': 'gnat.n.02', 'name': 'gnat'}, {'id': 3780, 'synset': 'yellow-fever_mosquito.n.01', 'name': 'yellow-fever_mosquito'}, {'id': 3781, 'synset': 'asian_tiger_mosquito.n.01', 'name': 'Asian_tiger_mosquito'}, {'id': 3782, 'synset': 'anopheline.n.01', 'name': 'anopheline'}, {'id': 3783, 'synset': 'malarial_mosquito.n.01', 'name': 'malarial_mosquito'}, {'id': 3784, 'synset': 'common_mosquito.n.01', 'name': 'common_mosquito'}, {'id': 3785, 'synset': 'culex_quinquefasciatus.n.01', 'name': 'Culex_quinquefasciatus'}, {'id': 3786, 'synset': 'gnat.n.01', 'name': 'gnat'}, {'id': 3787, 'synset': 'punkie.n.01', 'name': 'punkie'}, {'id': 3788, 'synset': 'midge.n.01', 'name': 'midge'}, {'id': 3789, 'synset': 'fungus_gnat.n.02', 'name': 'fungus_gnat'}, {'id': 3790, 'synset': 'psychodid.n.01', 'name': 'psychodid'}, {'id': 3791, 'synset': 'sand_fly.n.01', 'name': 'sand_fly'}, {'id': 3792, 'synset': 'fungus_gnat.n.01', 'name': 'fungus_gnat'}, {'id': 3793, 'synset': 'armyworm.n.03', 'name': 'armyworm'}, {'id': 3794, 'synset': 'crane_fly.n.01', 'name': 'crane_fly'}, {'id': 3795, 'synset': 'blackfly.n.02', 'name': 'blackfly'}, {'id': 3796, 'synset': 'hymenopterous_insect.n.01', 'name': 'hymenopterous_insect'}, {'id': 3797, 'synset': 'bee.n.01', 'name': 'bee'}, {'id': 3798, 'synset': 'drone.n.01', 'name': 'drone'}, {'id': 3799, 'synset': 'queen_bee.n.01', 'name': 'queen_bee'}, {'id': 3800, 'synset': 'worker.n.03', 'name': 'worker'}, {'id': 3801, 'synset': 'soldier.n.02', 'name': 'soldier'}, {'id': 3802, 'synset': 'worker_bee.n.01', 'name': 'worker_bee'}, {'id': 3803, 'synset': 'honeybee.n.01', 'name': 'honeybee'}, {'id': 3804, 'synset': 'africanized_bee.n.01', 'name': 'Africanized_bee'}, {'id': 3805, 'synset': 'black_bee.n.01', 'name': 'black_bee'}, {'id': 3806, 'synset': 'carniolan_bee.n.01', 'name': 'Carniolan_bee'}, {'id': 3807, 'synset': 'italian_bee.n.01', 'name': 'Italian_bee'}, {'id': 3808, 'synset': 'carpenter_bee.n.01', 'name': 'carpenter_bee'}, {'id': 3809, 'synset': 'bumblebee.n.01', 'name': 'bumblebee'}, {'id': 3810, 'synset': 'cuckoo-bumblebee.n.01', 'name': 'cuckoo-bumblebee'}, {'id': 3811, 'synset': 'andrena.n.01', 'name': 'andrena'}, {'id': 3812, 'synset': 'nomia_melanderi.n.01', 'name': 'Nomia_melanderi'}, {'id': 3813, 'synset': 'leaf-cutting_bee.n.01', 'name': 'leaf-cutting_bee'}, {'id': 3814, 'synset': 'mason_bee.n.01', 'name': 'mason_bee'}, {'id': 3815, 'synset': 'potter_bee.n.01', 'name': 'potter_bee'}, {'id': 3816, 'synset': 'wasp.n.02', 'name': 'wasp'}, {'id': 3817, 'synset': 'vespid.n.01', 'name': 'vespid'}, {'id': 3818, 'synset': 'paper_wasp.n.01', 'name': 'paper_wasp'}, {'id': 3819, 'synset': 'giant_hornet.n.01', 'name': 'giant_hornet'}, {'id': 3820, 'synset': 'common_wasp.n.01', 'name': 'common_wasp'}, {'id': 3821, 'synset': 'bald-faced_hornet.n.01', 'name': 'bald-faced_hornet'}, {'id': 3822, 'synset': 'yellow_jacket.n.02', 'name': 'yellow_jacket'}, {'id': 3823, 'synset': 'polistes_annularis.n.01', 'name': 'Polistes_annularis'}, {'id': 3824, 'synset': 'mason_wasp.n.02', 'name': 'mason_wasp'}, {'id': 3825, 'synset': 'potter_wasp.n.01', 'name': 'potter_wasp'}, {'id': 3826, 'synset': 'mutillidae.n.01', 'name': 'Mutillidae'}, {'id': 3827, 'synset': 'velvet_ant.n.01', 'name': 'velvet_ant'}, {'id': 3828, 'synset': 'sphecoid_wasp.n.01', 'name': 'sphecoid_wasp'}, {'id': 3829, 'synset': 'mason_wasp.n.01', 'name': 'mason_wasp'}, {'id': 3830, 'synset': 'digger_wasp.n.01', 'name': 'digger_wasp'}, {'id': 3831, 'synset': 'cicada_killer.n.01', 'name': 'cicada_killer'}, {'id': 3832, 'synset': 'mud_dauber.n.01', 'name': 'mud_dauber'}, {'id': 3833, 'synset': 'gall_wasp.n.01', 'name': 'gall_wasp'}, {'id': 3834, 'synset': 'chalcid_fly.n.01', 'name': 'chalcid_fly'}, {'id': 3835, 'synset': 'strawworm.n.02', 'name': 'strawworm'}, {'id': 3836, 'synset': 'chalcis_fly.n.01', 'name': 'chalcis_fly'}, {'id': 3837, 'synset': 'ichneumon_fly.n.01', 'name': 'ichneumon_fly'}, {'id': 3838, 'synset': 'sawfly.n.01', 'name': 'sawfly'}, {'id': 3839, 'synset': 'birch_leaf_miner.n.01', 'name': 'birch_leaf_miner'}, {'id': 3840, 'synset': 'ant.n.01', 'name': 'ant'}, {'id': 3841, 'synset': 'pharaoh_ant.n.01', 'name': 'pharaoh_ant'}, {'id': 3842, 'synset': 'little_black_ant.n.01', 'name': 'little_black_ant'}, {'id': 3843, 'synset': 'army_ant.n.01', 'name': 'army_ant'}, {'id': 3844, 'synset': 'carpenter_ant.n.01', 'name': 'carpenter_ant'}, {'id': 3845, 'synset': 'fire_ant.n.01', 'name': 'fire_ant'}, {'id': 3846, 'synset': 'wood_ant.n.01', 'name': 'wood_ant'}, {'id': 3847, 'synset': 'slave_ant.n.01', 'name': 'slave_ant'}, {'id': 3848, 'synset': 'formica_fusca.n.01', 'name': 'Formica_fusca'}, {'id': 3849, 'synset': 'slave-making_ant.n.01', 'name': 'slave-making_ant'}, {'id': 3850, 'synset': 'sanguinary_ant.n.01', 'name': 'sanguinary_ant'}, {'id': 3851, 'synset': 'bulldog_ant.n.01', 'name': 'bulldog_ant'}, {'id': 3852, 'synset': 'amazon_ant.n.01', 'name': 'Amazon_ant'}, {'id': 3853, 'synset': 'termite.n.01', 'name': 'termite'}, {'id': 3854, 'synset': 'dry-wood_termite.n.01', 'name': 'dry-wood_termite'}, {'id': 3855, 'synset': 'reticulitermes_lucifugus.n.01', 'name': 'Reticulitermes_lucifugus'}, {'id': 3856, 'synset': 'mastotermes_darwiniensis.n.01', 'name': 'Mastotermes_darwiniensis'}, {'id': 3857, 'synset': 'mastotermes_electrodominicus.n.01', 'name': 'Mastotermes_electrodominicus'}, {'id': 3858, 'synset': 'powder-post_termite.n.01', 'name': 'powder-post_termite'}, {'id': 3859, 'synset': 'orthopterous_insect.n.01', 'name': 'orthopterous_insect'}, {'id': 3860, 'synset': 'grasshopper.n.01', 'name': 'grasshopper'}, {'id': 3861, 'synset': 'short-horned_grasshopper.n.01', 'name': 'short-horned_grasshopper'}, {'id': 3862, 'synset': 'locust.n.01', 'name': 'locust'}, {'id': 3863, 'synset': 'migratory_locust.n.01', 'name': 'migratory_locust'}, {'id': 3864, 'synset': 'migratory_grasshopper.n.01', 'name': 'migratory_grasshopper'}, {'id': 3865, 'synset': 'long-horned_grasshopper.n.01', 'name': 'long-horned_grasshopper'}, {'id': 3866, 'synset': 'katydid.n.01', 'name': 'katydid'}, {'id': 3867, 'synset': 'mormon_cricket.n.01', 'name': 'mormon_cricket'}, {'id': 3868, 'synset': 'sand_cricket.n.01', 'name': 'sand_cricket'}, {'id': 3869, 'synset': 'cricket.n.01', 'name': 'cricket'}, {'id': 3870, 'synset': 'mole_cricket.n.01', 'name': 'mole_cricket'}, {'id': 3871, 'synset': 'european_house_cricket.n.01', 'name': 'European_house_cricket'}, {'id': 3872, 'synset': 'field_cricket.n.01', 'name': 'field_cricket'}, {'id': 3873, 'synset': 'tree_cricket.n.01', 'name': 'tree_cricket'}, {'id': 3874, 'synset': 'snowy_tree_cricket.n.01', 'name': 'snowy_tree_cricket'}, {'id': 3875, 'synset': 'phasmid.n.01', 'name': 'phasmid'}, {'id': 3876, 'synset': 'walking_stick.n.02', 'name': 'walking_stick'}, {'id': 3877, 'synset': 'diapheromera.n.01', 'name': 'diapheromera'}, {'id': 3878, 'synset': 'walking_leaf.n.02', 'name': 'walking_leaf'}, {'id': 3879, 'synset': 'oriental_cockroach.n.01', 'name': 'oriental_cockroach'}, {'id': 3880, 'synset': 'american_cockroach.n.01', 'name': 'American_cockroach'}, {'id': 3881, 'synset': 'australian_cockroach.n.01', 'name': 'Australian_cockroach'}, {'id': 3882, 'synset': 'german_cockroach.n.01', 'name': 'German_cockroach'}, {'id': 3883, 'synset': 'giant_cockroach.n.01', 'name': 'giant_cockroach'}, {'id': 3884, 'synset': 'mantis.n.01', 'name': 'mantis'}, {'id': 3885, 'synset': 'praying_mantis.n.01', 'name': 'praying_mantis'}, {'id': 3886, 'synset': 'bug.n.01', 'name': 'bug'}, {'id': 3887, 'synset': 'hemipterous_insect.n.01', 'name': 'hemipterous_insect'}, {'id': 3888, 'synset': 'leaf_bug.n.01', 'name': 'leaf_bug'}, {'id': 3889, 'synset': 'mirid_bug.n.01', 'name': 'mirid_bug'}, {'id': 3890, 'synset': 'four-lined_plant_bug.n.01', 'name': 'four-lined_plant_bug'}, {'id': 3891, 'synset': 'lygus_bug.n.01', 'name': 'lygus_bug'}, {'id': 3892, 'synset': 'tarnished_plant_bug.n.01', 'name': 'tarnished_plant_bug'}, {'id': 3893, 'synset': 'lace_bug.n.01', 'name': 'lace_bug'}, {'id': 3894, 'synset': 'lygaeid.n.01', 'name': 'lygaeid'}, {'id': 3895, 'synset': 'chinch_bug.n.01', 'name': 'chinch_bug'}, {'id': 3896, 'synset': 'coreid_bug.n.01', 'name': 'coreid_bug'}, {'id': 3897, 'synset': 'squash_bug.n.01', 'name': 'squash_bug'}, {'id': 3898, 'synset': 'leaf-footed_bug.n.01', 'name': 'leaf-footed_bug'}, {'id': 3899, 'synset': 'bedbug.n.01', 'name': 'bedbug'}, {'id': 3900, 'synset': 'backswimmer.n.01', 'name': 'backswimmer'}, {'id': 3901, 'synset': 'true_bug.n.01', 'name': 'true_bug'}, {'id': 3902, 'synset': 'heteropterous_insect.n.01', 'name': 'heteropterous_insect'}, {'id': 3903, 'synset': 'water_bug.n.01', 'name': 'water_bug'}, {'id': 3904, 'synset': 'giant_water_bug.n.01', 'name': 'giant_water_bug'}, {'id': 3905, 'synset': 'water_scorpion.n.01', 'name': 'water_scorpion'}, {'id': 3906, 'synset': 'water_boatman.n.01', 'name': 'water_boatman'}, {'id': 3907, 'synset': 'water_strider.n.01', 'name': 'water_strider'}, {'id': 3908, 'synset': 'common_pond-skater.n.01', 'name': 'common_pond-skater'}, {'id': 3909, 'synset': 'assassin_bug.n.01', 'name': 'assassin_bug'}, {'id': 3910, 'synset': 'conenose.n.01', 'name': 'conenose'}, {'id': 3911, 'synset': 'wheel_bug.n.01', 'name': 'wheel_bug'}, {'id': 3912, 'synset': 'firebug.n.02', 'name': 'firebug'}, {'id': 3913, 'synset': 'cotton_stainer.n.01', 'name': 'cotton_stainer'}, {'id': 3914, 'synset': 'homopterous_insect.n.01', 'name': 'homopterous_insect'}, {'id': 3915, 'synset': 'whitefly.n.01', 'name': 'whitefly'}, {'id': 3916, 'synset': 'citrus_whitefly.n.01', 'name': 'citrus_whitefly'}, {'id': 3917, 'synset': 'greenhouse_whitefly.n.01', 'name': 'greenhouse_whitefly'}, {'id': 3918, 'synset': 'sweet-potato_whitefly.n.01', 'name': 'sweet-potato_whitefly'}, {'id': 3919, 'synset': 'superbug.n.02', 'name': 'superbug'}, {'id': 3920, 'synset': 'cotton_strain.n.01', 'name': 'cotton_strain'}, {'id': 3921, 'synset': 'coccid_insect.n.01', 'name': 'coccid_insect'}, {'id': 3922, 'synset': 'scale_insect.n.01', 'name': 'scale_insect'}, {'id': 3923, 'synset': 'soft_scale.n.01', 'name': 'soft_scale'}, {'id': 3924, 'synset': 'brown_soft_scale.n.01', 'name': 'brown_soft_scale'}, {'id': 3925, 'synset': 'armored_scale.n.01', 'name': 'armored_scale'}, {'id': 3926, 'synset': 'san_jose_scale.n.01', 'name': 'San_Jose_scale'}, {'id': 3927, 'synset': 'cochineal_insect.n.01', 'name': 'cochineal_insect'}, {'id': 3928, 'synset': 'mealybug.n.01', 'name': 'mealybug'}, {'id': 3929, 'synset': 'citrophilous_mealybug.n.01', 'name': 'citrophilous_mealybug'}, {'id': 3930, 'synset': 'comstock_mealybug.n.01', 'name': 'Comstock_mealybug'}, {'id': 3931, 'synset': 'citrus_mealybug.n.01', 'name': 'citrus_mealybug'}, {'id': 3932, 'synset': 'plant_louse.n.01', 'name': 'plant_louse'}, {'id': 3933, 'synset': 'aphid.n.01', 'name': 'aphid'}, {'id': 3934, 'synset': 'apple_aphid.n.01', 'name': 'apple_aphid'}, {'id': 3935, 'synset': 'blackfly.n.01', 'name': 'blackfly'}, {'id': 3936, 'synset': 'greenfly.n.01', 'name': 'greenfly'}, {'id': 3937, 'synset': 'green_peach_aphid.n.01', 'name': 'green_peach_aphid'}, {'id': 3938, 'synset': 'ant_cow.n.01', 'name': 'ant_cow'}, {'id': 3939, 'synset': 'woolly_aphid.n.01', 'name': 'woolly_aphid'}, {'id': 3940, 'synset': 'woolly_apple_aphid.n.01', 'name': 'woolly_apple_aphid'}, {'id': 3941, 'synset': 'woolly_alder_aphid.n.01', 'name': 'woolly_alder_aphid'}, {'id': 3942, 'synset': 'adelgid.n.01', 'name': 'adelgid'}, {'id': 3943, 'synset': 'balsam_woolly_aphid.n.01', 'name': 'balsam_woolly_aphid'}, {'id': 3944, 'synset': 'spruce_gall_aphid.n.01', 'name': 'spruce_gall_aphid'}, {'id': 3945, 'synset': 'woolly_adelgid.n.01', 'name': 'woolly_adelgid'}, {'id': 3946, 'synset': 'jumping_plant_louse.n.01', 'name': 'jumping_plant_louse'}, {'id': 3947, 'synset': 'cicada.n.01', 'name': 'cicada'}, {'id': 3948, 'synset': 'dog-day_cicada.n.01', 'name': 'dog-day_cicada'}, {'id': 3949, 'synset': 'seventeen-year_locust.n.01', 'name': 'seventeen-year_locust'}, {'id': 3950, 'synset': 'spittle_insect.n.01', 'name': 'spittle_insect'}, {'id': 3951, 'synset': 'froghopper.n.01', 'name': 'froghopper'}, {'id': 3952, 'synset': 'meadow_spittlebug.n.01', 'name': 'meadow_spittlebug'}, {'id': 3953, 'synset': 'pine_spittlebug.n.01', 'name': 'pine_spittlebug'}, {'id': 3954, 'synset': 'saratoga_spittlebug.n.01', 'name': 'Saratoga_spittlebug'}, {'id': 3955, 'synset': 'leafhopper.n.01', 'name': 'leafhopper'}, {'id': 3956, 'synset': 'plant_hopper.n.01', 'name': 'plant_hopper'}, {'id': 3957, 'synset': 'treehopper.n.01', 'name': 'treehopper'}, {'id': 3958, 'synset': 'lantern_fly.n.01', 'name': 'lantern_fly'}, {'id': 3959, 'synset': 'psocopterous_insect.n.01', 'name': 'psocopterous_insect'}, {'id': 3960, 'synset': 'psocid.n.01', 'name': 'psocid'}, {'id': 3961, 'synset': 'bark-louse.n.01', 'name': 'bark-louse'}, {'id': 3962, 'synset': 'booklouse.n.01', 'name': 'booklouse'}, {'id': 3963, 'synset': 'common_booklouse.n.01', 'name': 'common_booklouse'}, {'id': 3964, 'synset': 'ephemerid.n.01', 'name': 'ephemerid'}, {'id': 3965, 'synset': 'mayfly.n.01', 'name': 'mayfly'}, {'id': 3966, 'synset': 'stonefly.n.01', 'name': 'stonefly'}, {'id': 3967, 'synset': 'neuropteron.n.01', 'name': 'neuropteron'}, {'id': 3968, 'synset': 'ant_lion.n.02', 'name': 'ant_lion'}, {'id': 3969, 'synset': 'doodlebug.n.03', 'name': 'doodlebug'}, {'id': 3970, 'synset': 'lacewing.n.01', 'name': 'lacewing'}, {'id': 3971, 'synset': 'aphid_lion.n.01', 'name': 'aphid_lion'}, {'id': 3972, 'synset': 'green_lacewing.n.01', 'name': 'green_lacewing'}, {'id': 3973, 'synset': 'brown_lacewing.n.01', 'name': 'brown_lacewing'}, {'id': 3974, 'synset': 'dobson.n.02', 'name': 'dobson'}, {'id': 3975, 'synset': 'hellgrammiate.n.01', 'name': 'hellgrammiate'}, {'id': 3976, 'synset': 'fish_fly.n.01', 'name': 'fish_fly'}, {'id': 3977, 'synset': 'alderfly.n.01', 'name': 'alderfly'}, {'id': 3978, 'synset': 'snakefly.n.01', 'name': 'snakefly'}, {'id': 3979, 'synset': 'mantispid.n.01', 'name': 'mantispid'}, {'id': 3980, 'synset': 'odonate.n.01', 'name': 'odonate'}, {'id': 3981, 'synset': 'damselfly.n.01', 'name': 'damselfly'}, {'id': 3982, 'synset': 'trichopterous_insect.n.01', 'name': 'trichopterous_insect'}, {'id': 3983, 'synset': 'caddis_fly.n.01', 'name': 'caddis_fly'}, {'id': 3984, 'synset': 'caseworm.n.01', 'name': 'caseworm'}, {'id': 3985, 'synset': 'caddisworm.n.01', 'name': 'caddisworm'}, {'id': 3986, 'synset': 'thysanuran_insect.n.01', 'name': 'thysanuran_insect'}, {'id': 3987, 'synset': 'bristletail.n.01', 'name': 'bristletail'}, {'id': 3988, 'synset': 'silverfish.n.01', 'name': 'silverfish'}, {'id': 3989, 'synset': 'firebrat.n.01', 'name': 'firebrat'}, {'id': 3990, 'synset': 'jumping_bristletail.n.01', 'name': 'jumping_bristletail'}, {'id': 3991, 'synset': 'thysanopter.n.01', 'name': 'thysanopter'}, {'id': 3992, 'synset': 'thrips.n.01', 'name': 'thrips'}, {'id': 3993, 'synset': 'tobacco_thrips.n.01', 'name': 'tobacco_thrips'}, {'id': 3994, 'synset': 'onion_thrips.n.01', 'name': 'onion_thrips'}, {'id': 3995, 'synset': 'earwig.n.01', 'name': 'earwig'}, {'id': 3996, 'synset': 'common_european_earwig.n.01', 'name': 'common_European_earwig'}, {'id': 3997, 'synset': 'lepidopterous_insect.n.01', 'name': 'lepidopterous_insect'}, {'id': 3998, 'synset': 'nymphalid.n.01', 'name': 'nymphalid'}, {'id': 3999, 'synset': 'mourning_cloak.n.01', 'name': 'mourning_cloak'}, {'id': 4000, 'synset': 'tortoiseshell.n.02', 'name': 'tortoiseshell'}, {'id': 4001, 'synset': 'painted_beauty.n.01', 'name': 'painted_beauty'}, {'id': 4002, 'synset': 'admiral.n.02', 'name': 'admiral'}, {'id': 4003, 'synset': 'red_admiral.n.01', 'name': 'red_admiral'}, {'id': 4004, 'synset': 'white_admiral.n.02', 'name': 'white_admiral'}, {'id': 4005, 'synset': 'banded_purple.n.01', 'name': 'banded_purple'}, {'id': 4006, 'synset': 'red-spotted_purple.n.01', 'name': 'red-spotted_purple'}, {'id': 4007, 'synset': 'viceroy.n.02', 'name': 'viceroy'}, {'id': 4008, 'synset': 'anglewing.n.01', 'name': 'anglewing'}, {'id': 4009, 'synset': 'ringlet.n.04', 'name': 'ringlet'}, {'id': 4010, 'synset': 'comma.n.02', 'name': 'comma'}, {'id': 4011, 'synset': 'fritillary.n.02', 'name': 'fritillary'}, {'id': 4012, 'synset': 'silverspot.n.01', 'name': 'silverspot'}, {'id': 4013, 'synset': 'emperor_butterfly.n.01', 'name': 'emperor_butterfly'}, {'id': 4014, 'synset': 'purple_emperor.n.01', 'name': 'purple_emperor'}, {'id': 4015, 'synset': 'peacock.n.01', 'name': 'peacock'}, {'id': 4016, 'synset': 'danaid.n.01', 'name': 'danaid'}, {'id': 4017, 'synset': 'monarch.n.02', 'name': 'monarch'}, {'id': 4018, 'synset': 'pierid.n.01', 'name': 'pierid'}, {'id': 4019, 'synset': 'cabbage_butterfly.n.01', 'name': 'cabbage_butterfly'}, {'id': 4020, 'synset': 'small_white.n.01', 'name': 'small_white'}, {'id': 4021, 'synset': 'large_white.n.01', 'name': 'large_white'}, {'id': 4022, 'synset': 'southern_cabbage_butterfly.n.01', 'name': 'southern_cabbage_butterfly'}, {'id': 4023, 'synset': 'sulphur_butterfly.n.01', 'name': 'sulphur_butterfly'}, {'id': 4024, 'synset': 'lycaenid.n.01', 'name': 'lycaenid'}, {'id': 4025, 'synset': 'blue.n.07', 'name': 'blue'}, {'id': 4026, 'synset': 'copper.n.05', 'name': 'copper'}, {'id': 4027, 'synset': 'american_copper.n.01', 'name': 'American_copper'}, {'id': 4028, 'synset': 'hairstreak.n.01', 'name': 'hairstreak'}, {'id': 4029, 'synset': 'strymon_melinus.n.01', 'name': 'Strymon_melinus'}, {'id': 4030, 'synset': 'moth.n.01', 'name': 'moth'}, {'id': 4031, 'synset': 'moth_miller.n.01', 'name': 'moth_miller'}, {'id': 4032, 'synset': 'tortricid.n.01', 'name': 'tortricid'}, {'id': 4033, 'synset': 'leaf_roller.n.01', 'name': 'leaf_roller'}, {'id': 4034, 'synset': 'tea_tortrix.n.01', 'name': 'tea_tortrix'}, {'id': 4035, 'synset': 'orange_tortrix.n.01', 'name': 'orange_tortrix'}, {'id': 4036, 'synset': 'codling_moth.n.01', 'name': 'codling_moth'}, {'id': 4037, 'synset': 'lymantriid.n.01', 'name': 'lymantriid'}, {'id': 4038, 'synset': 'tussock_caterpillar.n.01', 'name': 'tussock_caterpillar'}, {'id': 4039, 'synset': 'gypsy_moth.n.01', 'name': 'gypsy_moth'}, {'id': 4040, 'synset': 'browntail.n.01', 'name': 'browntail'}, {'id': 4041, 'synset': 'gold-tail_moth.n.01', 'name': 'gold-tail_moth'}, {'id': 4042, 'synset': 'geometrid.n.01', 'name': 'geometrid'}, {'id': 4043, 'synset': 'paleacrita_vernata.n.01', 'name': 'Paleacrita_vernata'}, {'id': 4044, 'synset': 'alsophila_pometaria.n.01', 'name': 'Alsophila_pometaria'}, {'id': 4045, 'synset': 'cankerworm.n.01', 'name': 'cankerworm'}, {'id': 4046, 'synset': 'spring_cankerworm.n.01', 'name': 'spring_cankerworm'}, {'id': 4047, 'synset': 'fall_cankerworm.n.01', 'name': 'fall_cankerworm'}, {'id': 4048, 'synset': 'measuring_worm.n.01', 'name': 'measuring_worm'}, {'id': 4049, 'synset': 'pyralid.n.01', 'name': 'pyralid'}, {'id': 4050, 'synset': 'bee_moth.n.01', 'name': 'bee_moth'}, {'id': 4051, 'synset': 'corn_borer.n.02', 'name': 'corn_borer'}, {'id': 4052, 'synset': 'mediterranean_flour_moth.n.01', 'name': 'Mediterranean_flour_moth'}, {'id': 4053, 'synset': 'tobacco_moth.n.01', 'name': 'tobacco_moth'}, {'id': 4054, 'synset': 'almond_moth.n.01', 'name': 'almond_moth'}, {'id': 4055, 'synset': 'raisin_moth.n.01', 'name': 'raisin_moth'}, {'id': 4056, 'synset': 'tineoid.n.01', 'name': 'tineoid'}, {'id': 4057, 'synset': 'tineid.n.01', 'name': 'tineid'}, {'id': 4058, 'synset': 'clothes_moth.n.01', 'name': 'clothes_moth'}, {'id': 4059, 'synset': 'casemaking_clothes_moth.n.01', 'name': 'casemaking_clothes_moth'}, {'id': 4060, 'synset': 'webbing_clothes_moth.n.01', 'name': 'webbing_clothes_moth'}, {'id': 4061, 'synset': 'carpet_moth.n.01', 'name': 'carpet_moth'}, {'id': 4062, 'synset': 'gelechiid.n.01', 'name': 'gelechiid'}, {'id': 4063, 'synset': 'grain_moth.n.01', 'name': 'grain_moth'}, {'id': 4064, 'synset': 'angoumois_moth.n.01', 'name': 'angoumois_moth'}, {'id': 4065, 'synset': 'potato_moth.n.01', 'name': 'potato_moth'}, {'id': 4066, 'synset': 'potato_tuberworm.n.01', 'name': 'potato_tuberworm'}, {'id': 4067, 'synset': 'noctuid_moth.n.01', 'name': 'noctuid_moth'}, {'id': 4068, 'synset': 'cutworm.n.01', 'name': 'cutworm'}, {'id': 4069, 'synset': 'underwing.n.01', 'name': 'underwing'}, {'id': 4070, 'synset': 'red_underwing.n.01', 'name': 'red_underwing'}, {'id': 4071, 'synset': 'antler_moth.n.01', 'name': 'antler_moth'}, {'id': 4072, 'synset': 'heliothis_moth.n.01', 'name': 'heliothis_moth'}, {'id': 4073, 'synset': 'army_cutworm.n.01', 'name': 'army_cutworm'}, {'id': 4074, 'synset': 'armyworm.n.02', 'name': 'armyworm'}, {'id': 4075, 'synset': 'armyworm.n.01', 'name': 'armyworm'}, {'id': 4076, 'synset': 'spodoptera_exigua.n.02', 'name': 'Spodoptera_exigua'}, {'id': 4077, 'synset': 'beet_armyworm.n.01', 'name': 'beet_armyworm'}, {'id': 4078, 'synset': 'spodoptera_frugiperda.n.02', 'name': 'Spodoptera_frugiperda'}, {'id': 4079, 'synset': 'fall_armyworm.n.01', 'name': 'fall_armyworm'}, {'id': 4080, 'synset': 'hawkmoth.n.01', 'name': 'hawkmoth'}, {'id': 4081, 'synset': 'manduca_sexta.n.02', 'name': 'Manduca_sexta'}, {'id': 4082, 'synset': 'tobacco_hornworm.n.01', 'name': 'tobacco_hornworm'}, {'id': 4083, 'synset': 'manduca_quinquemaculata.n.02', 'name': 'Manduca_quinquemaculata'}, {'id': 4084, 'synset': 'tomato_hornworm.n.01', 'name': 'tomato_hornworm'}, {'id': 4085, 'synset': "death's-head_moth.n.01", 'name': "death's-head_moth"}, {'id': 4086, 'synset': 'bombycid.n.01', 'name': 'bombycid'}, {'id': 4087, 'synset': 'domestic_silkworm_moth.n.01', 'name': 'domestic_silkworm_moth'}, {'id': 4088, 'synset': 'silkworm.n.01', 'name': 'silkworm'}, {'id': 4089, 'synset': 'saturniid.n.01', 'name': 'saturniid'}, {'id': 4090, 'synset': 'emperor.n.03', 'name': 'emperor'}, {'id': 4091, 'synset': 'imperial_moth.n.01', 'name': 'imperial_moth'}, {'id': 4092, 'synset': 'giant_silkworm_moth.n.01', 'name': 'giant_silkworm_moth'}, {'id': 4093, 'synset': 'silkworm.n.02', 'name': 'silkworm'}, {'id': 4094, 'synset': 'luna_moth.n.01', 'name': 'luna_moth'}, {'id': 4095, 'synset': 'cecropia.n.02', 'name': 'cecropia'}, {'id': 4096, 'synset': 'cynthia_moth.n.01', 'name': 'cynthia_moth'}, {'id': 4097, 'synset': 'ailanthus_silkworm.n.01', 'name': 'ailanthus_silkworm'}, {'id': 4098, 'synset': 'io_moth.n.01', 'name': 'io_moth'}, {'id': 4099, 'synset': 'polyphemus_moth.n.01', 'name': 'polyphemus_moth'}, {'id': 4100, 'synset': 'pernyi_moth.n.01', 'name': 'pernyi_moth'}, {'id': 4101, 'synset': 'tussah.n.01', 'name': 'tussah'}, {'id': 4102, 'synset': 'atlas_moth.n.01', 'name': 'atlas_moth'}, {'id': 4103, 'synset': 'arctiid.n.01', 'name': 'arctiid'}, {'id': 4104, 'synset': 'tiger_moth.n.01', 'name': 'tiger_moth'}, {'id': 4105, 'synset': 'cinnabar.n.02', 'name': 'cinnabar'}, {'id': 4106, 'synset': 'lasiocampid.n.01', 'name': 'lasiocampid'}, {'id': 4107, 'synset': 'eggar.n.01', 'name': 'eggar'}, {'id': 4108, 'synset': 'tent-caterpillar_moth.n.02', 'name': 'tent-caterpillar_moth'}, {'id': 4109, 'synset': 'tent_caterpillar.n.01', 'name': 'tent_caterpillar'}, {'id': 4110, 'synset': 'tent-caterpillar_moth.n.01', 'name': 'tent-caterpillar_moth'}, {'id': 4111, 'synset': 'forest_tent_caterpillar.n.01', 'name': 'forest_tent_caterpillar'}, {'id': 4112, 'synset': 'lappet.n.03', 'name': 'lappet'}, {'id': 4113, 'synset': 'lappet_caterpillar.n.01', 'name': 'lappet_caterpillar'}, {'id': 4114, 'synset': 'webworm.n.01', 'name': 'webworm'}, {'id': 4115, 'synset': 'webworm_moth.n.01', 'name': 'webworm_moth'}, {'id': 4116, 'synset': 'hyphantria_cunea.n.02', 'name': 'Hyphantria_cunea'}, {'id': 4117, 'synset': 'fall_webworm.n.01', 'name': 'fall_webworm'}, {'id': 4118, 'synset': 'garden_webworm.n.01', 'name': 'garden_webworm'}, {'id': 4119, 'synset': 'instar.n.01', 'name': 'instar'}, {'id': 4120, 'synset': 'caterpillar.n.01', 'name': 'caterpillar'}, {'id': 4121, 'synset': 'corn_borer.n.01', 'name': 'corn_borer'}, {'id': 4122, 'synset': 'bollworm.n.01', 'name': 'bollworm'}, {'id': 4123, 'synset': 'pink_bollworm.n.01', 'name': 'pink_bollworm'}, {'id': 4124, 'synset': 'corn_earworm.n.01', 'name': 'corn_earworm'}, {'id': 4125, 'synset': 'cabbageworm.n.01', 'name': 'cabbageworm'}, {'id': 4126, 'synset': 'woolly_bear.n.01', 'name': 'woolly_bear'}, {'id': 4127, 'synset': 'woolly_bear_moth.n.01', 'name': 'woolly_bear_moth'}, {'id': 4128, 'synset': 'larva.n.01', 'name': 'larva'}, {'id': 4129, 'synset': 'nymph.n.02', 'name': 'nymph'}, {'id': 4130, 'synset': 'leptocephalus.n.01', 'name': 'leptocephalus'}, {'id': 4131, 'synset': 'grub.n.02', 'name': 'grub'}, {'id': 4132, 'synset': 'maggot.n.01', 'name': 'maggot'}, {'id': 4133, 'synset': 'leatherjacket.n.03', 'name': 'leatherjacket'}, {'id': 4134, 'synset': 'pupa.n.01', 'name': 'pupa'}, {'id': 4135, 'synset': 'chrysalis.n.01', 'name': 'chrysalis'}, {'id': 4136, 'synset': 'imago.n.02', 'name': 'imago'}, {'id': 4137, 'synset': 'queen.n.01', 'name': 'queen'}, {'id': 4138, 'synset': 'phoronid.n.01', 'name': 'phoronid'}, {'id': 4139, 'synset': 'bryozoan.n.01', 'name': 'bryozoan'}, {'id': 4140, 'synset': 'brachiopod.n.01', 'name': 'brachiopod'}, {'id': 4141, 'synset': 'peanut_worm.n.01', 'name': 'peanut_worm'}, {'id': 4142, 'synset': 'echinoderm.n.01', 'name': 'echinoderm'}, {'id': 4143, 'synset': 'brittle_star.n.01', 'name': 'brittle_star'}, {'id': 4144, 'synset': 'basket_star.n.01', 'name': 'basket_star'}, {'id': 4145, 'synset': 'astrophyton_muricatum.n.01', 'name': 'Astrophyton_muricatum'}, {'id': 4146, 'synset': 'sea_urchin.n.01', 'name': 'sea_urchin'}, {'id': 4147, 'synset': 'edible_sea_urchin.n.01', 'name': 'edible_sea_urchin'}, {'id': 4148, 'synset': 'sand_dollar.n.01', 'name': 'sand_dollar'}, {'id': 4149, 'synset': 'heart_urchin.n.01', 'name': 'heart_urchin'}, {'id': 4150, 'synset': 'crinoid.n.01', 'name': 'crinoid'}, {'id': 4151, 'synset': 'sea_lily.n.01', 'name': 'sea_lily'}, {'id': 4152, 'synset': 'feather_star.n.01', 'name': 'feather_star'}, {'id': 4153, 'synset': 'sea_cucumber.n.01', 'name': 'sea_cucumber'}, {'id': 4154, 'synset': 'trepang.n.01', 'name': 'trepang'}, {'id': 4155, 'synset': 'duplicidentata.n.01', 'name': 'Duplicidentata'}, {'id': 4156, 'synset': 'lagomorph.n.01', 'name': 'lagomorph'}, {'id': 4157, 'synset': 'leporid.n.01', 'name': 'leporid'}, {'id': 4158, 'synset': 'rabbit_ears.n.02', 'name': 'rabbit_ears'}, {'id': 4159, 'synset': 'lapin.n.02', 'name': 'lapin'}, {'id': 4160, 'synset': 'bunny.n.02', 'name': 'bunny'}, {'id': 4161, 'synset': 'european_rabbit.n.01', 'name': 'European_rabbit'}, {'id': 4162, 'synset': 'wood_rabbit.n.01', 'name': 'wood_rabbit'}, {'id': 4163, 'synset': 'eastern_cottontail.n.01', 'name': 'eastern_cottontail'}, {'id': 4164, 'synset': 'swamp_rabbit.n.02', 'name': 'swamp_rabbit'}, {'id': 4165, 'synset': 'marsh_hare.n.01', 'name': 'marsh_hare'}, {'id': 4166, 'synset': 'hare.n.01', 'name': 'hare'}, {'id': 4167, 'synset': 'leveret.n.01', 'name': 'leveret'}, {'id': 4168, 'synset': 'european_hare.n.01', 'name': 'European_hare'}, {'id': 4169, 'synset': 'jackrabbit.n.01', 'name': 'jackrabbit'}, {'id': 4170, 'synset': 'white-tailed_jackrabbit.n.01', 'name': 'white-tailed_jackrabbit'}, {'id': 4171, 'synset': 'blacktail_jackrabbit.n.01', 'name': 'blacktail_jackrabbit'}, {'id': 4172, 'synset': 'polar_hare.n.01', 'name': 'polar_hare'}, {'id': 4173, 'synset': 'snowshoe_hare.n.01', 'name': 'snowshoe_hare'}, {'id': 4174, 'synset': 'belgian_hare.n.01', 'name': 'Belgian_hare'}, {'id': 4175, 'synset': 'angora.n.03', 'name': 'Angora'}, {'id': 4176, 'synset': 'pika.n.01', 'name': 'pika'}, {'id': 4177, 'synset': 'little_chief_hare.n.01', 'name': 'little_chief_hare'}, {'id': 4178, 'synset': 'collared_pika.n.01', 'name': 'collared_pika'}, {'id': 4179, 'synset': 'mouse.n.01', 'name': 'mouse'}, {'id': 4180, 'synset': 'pocket_rat.n.01', 'name': 'pocket_rat'}, {'id': 4181, 'synset': 'murine.n.01', 'name': 'murine'}, {'id': 4182, 'synset': 'house_mouse.n.01', 'name': 'house_mouse'}, {'id': 4183, 'synset': 'harvest_mouse.n.02', 'name': 'harvest_mouse'}, {'id': 4184, 'synset': 'field_mouse.n.02', 'name': 'field_mouse'}, {'id': 4185, 'synset': 'nude_mouse.n.01', 'name': 'nude_mouse'}, {'id': 4186, 'synset': 'european_wood_mouse.n.01', 'name': 'European_wood_mouse'}, {'id': 4187, 'synset': 'brown_rat.n.01', 'name': 'brown_rat'}, {'id': 4188, 'synset': 'wharf_rat.n.02', 'name': 'wharf_rat'}, {'id': 4189, 'synset': 'sewer_rat.n.01', 'name': 'sewer_rat'}, {'id': 4190, 'synset': 'black_rat.n.01', 'name': 'black_rat'}, {'id': 4191, 'synset': 'bandicoot_rat.n.01', 'name': 'bandicoot_rat'}, {'id': 4192, 'synset': 'jerboa_rat.n.01', 'name': 'jerboa_rat'}, {'id': 4193, 'synset': 'kangaroo_mouse.n.02', 'name': 'kangaroo_mouse'}, {'id': 4194, 'synset': 'water_rat.n.03', 'name': 'water_rat'}, {'id': 4195, 'synset': 'beaver_rat.n.01', 'name': 'beaver_rat'}, {'id': 4196, 'synset': 'new_world_mouse.n.01', 'name': 'New_World_mouse'}, {'id': 4197, 'synset': 'american_harvest_mouse.n.01', 'name': 'American_harvest_mouse'}, {'id': 4198, 'synset': 'wood_mouse.n.01', 'name': 'wood_mouse'}, {'id': 4199, 'synset': 'white-footed_mouse.n.01', 'name': 'white-footed_mouse'}, {'id': 4200, 'synset': 'deer_mouse.n.01', 'name': 'deer_mouse'}, {'id': 4201, 'synset': 'cactus_mouse.n.01', 'name': 'cactus_mouse'}, {'id': 4202, 'synset': 'cotton_mouse.n.01', 'name': 'cotton_mouse'}, {'id': 4203, 'synset': 'pygmy_mouse.n.01', 'name': 'pygmy_mouse'}, {'id': 4204, 'synset': 'grasshopper_mouse.n.01', 'name': 'grasshopper_mouse'}, {'id': 4205, 'synset': 'muskrat.n.02', 'name': 'muskrat'}, {'id': 4206, 'synset': 'round-tailed_muskrat.n.01', 'name': 'round-tailed_muskrat'}, {'id': 4207, 'synset': 'cotton_rat.n.01', 'name': 'cotton_rat'}, {'id': 4208, 'synset': 'wood_rat.n.01', 'name': 'wood_rat'}, {'id': 4209, 'synset': 'dusky-footed_wood_rat.n.01', 'name': 'dusky-footed_wood_rat'}, {'id': 4210, 'synset': 'vole.n.01', 'name': 'vole'}, {'id': 4211, 'synset': 'packrat.n.02', 'name': 'packrat'}, {'id': 4212, 'synset': 'dusky-footed_woodrat.n.01', 'name': 'dusky-footed_woodrat'}, {'id': 4213, 'synset': 'eastern_woodrat.n.01', 'name': 'eastern_woodrat'}, {'id': 4214, 'synset': 'rice_rat.n.01', 'name': 'rice_rat'}, {'id': 4215, 'synset': 'pine_vole.n.01', 'name': 'pine_vole'}, {'id': 4216, 'synset': 'meadow_vole.n.01', 'name': 'meadow_vole'}, {'id': 4217, 'synset': 'water_vole.n.02', 'name': 'water_vole'}, {'id': 4218, 'synset': 'prairie_vole.n.01', 'name': 'prairie_vole'}, {'id': 4219, 'synset': 'water_vole.n.01', 'name': 'water_vole'}, {'id': 4220, 'synset': 'red-backed_mouse.n.01', 'name': 'red-backed_mouse'}, {'id': 4221, 'synset': 'phenacomys.n.01', 'name': 'phenacomys'}, {'id': 4222, 'synset': 'eurasian_hamster.n.01', 'name': 'Eurasian_hamster'}, {'id': 4223, 'synset': 'golden_hamster.n.01', 'name': 'golden_hamster'}, {'id': 4224, 'synset': 'gerbil.n.01', 'name': 'gerbil'}, {'id': 4225, 'synset': 'jird.n.01', 'name': 'jird'}, {'id': 4226, 'synset': 'tamarisk_gerbil.n.01', 'name': 'tamarisk_gerbil'}, {'id': 4227, 'synset': 'sand_rat.n.02', 'name': 'sand_rat'}, {'id': 4228, 'synset': 'lemming.n.01', 'name': 'lemming'}, {'id': 4229, 'synset': 'european_lemming.n.01', 'name': 'European_lemming'}, {'id': 4230, 'synset': 'brown_lemming.n.01', 'name': 'brown_lemming'}, {'id': 4231, 'synset': 'grey_lemming.n.01', 'name': 'grey_lemming'}, {'id': 4232, 'synset': 'pied_lemming.n.01', 'name': 'pied_lemming'}, {'id': 4233, 'synset': 'hudson_bay_collared_lemming.n.01', 'name': 'Hudson_bay_collared_lemming'}, {'id': 4234, 'synset': 'southern_bog_lemming.n.01', 'name': 'southern_bog_lemming'}, {'id': 4235, 'synset': 'northern_bog_lemming.n.01', 'name': 'northern_bog_lemming'}, {'id': 4236, 'synset': 'porcupine.n.01', 'name': 'porcupine'}, {'id': 4237, 'synset': 'old_world_porcupine.n.01', 'name': 'Old_World_porcupine'}, {'id': 4238, 'synset': 'brush-tailed_porcupine.n.01', 'name': 'brush-tailed_porcupine'}, {'id': 4239, 'synset': 'long-tailed_porcupine.n.01', 'name': 'long-tailed_porcupine'}, {'id': 4240, 'synset': 'new_world_porcupine.n.01', 'name': 'New_World_porcupine'}, {'id': 4241, 'synset': 'canada_porcupine.n.01', 'name': 'Canada_porcupine'}, {'id': 4242, 'synset': 'pocket_mouse.n.01', 'name': 'pocket_mouse'}, {'id': 4243, 'synset': 'silky_pocket_mouse.n.01', 'name': 'silky_pocket_mouse'}, {'id': 4244, 'synset': 'plains_pocket_mouse.n.01', 'name': 'plains_pocket_mouse'}, {'id': 4245, 'synset': 'hispid_pocket_mouse.n.01', 'name': 'hispid_pocket_mouse'}, {'id': 4246, 'synset': 'mexican_pocket_mouse.n.01', 'name': 'Mexican_pocket_mouse'}, {'id': 4247, 'synset': 'kangaroo_rat.n.01', 'name': 'kangaroo_rat'}, {'id': 4248, 'synset': 'ord_kangaroo_rat.n.01', 'name': 'Ord_kangaroo_rat'}, {'id': 4249, 'synset': 'kangaroo_mouse.n.01', 'name': 'kangaroo_mouse'}, {'id': 4250, 'synset': 'jumping_mouse.n.01', 'name': 'jumping_mouse'}, {'id': 4251, 'synset': 'meadow_jumping_mouse.n.01', 'name': 'meadow_jumping_mouse'}, {'id': 4252, 'synset': 'jerboa.n.01', 'name': 'jerboa'}, {'id': 4253, 'synset': 'typical_jerboa.n.01', 'name': 'typical_jerboa'}, {'id': 4254, 'synset': 'jaculus_jaculus.n.01', 'name': 'Jaculus_jaculus'}, {'id': 4255, 'synset': 'dormouse.n.01', 'name': 'dormouse'}, {'id': 4256, 'synset': 'loir.n.01', 'name': 'loir'}, {'id': 4257, 'synset': 'hazel_mouse.n.01', 'name': 'hazel_mouse'}, {'id': 4258, 'synset': 'lerot.n.01', 'name': 'lerot'}, {'id': 4259, 'synset': 'gopher.n.04', 'name': 'gopher'}, {'id': 4260, 'synset': 'plains_pocket_gopher.n.01', 'name': 'plains_pocket_gopher'}, {'id': 4261, 'synset': 'southeastern_pocket_gopher.n.01', 'name': 'southeastern_pocket_gopher'}, {'id': 4262, 'synset': 'valley_pocket_gopher.n.01', 'name': 'valley_pocket_gopher'}, {'id': 4263, 'synset': 'northern_pocket_gopher.n.01', 'name': 'northern_pocket_gopher'}, {'id': 4264, 'synset': 'tree_squirrel.n.01', 'name': 'tree_squirrel'}, {'id': 4265, 'synset': 'eastern_grey_squirrel.n.01', 'name': 'eastern_grey_squirrel'}, {'id': 4266, 'synset': 'western_grey_squirrel.n.01', 'name': 'western_grey_squirrel'}, {'id': 4267, 'synset': 'fox_squirrel.n.01', 'name': 'fox_squirrel'}, {'id': 4268, 'synset': 'black_squirrel.n.01', 'name': 'black_squirrel'}, {'id': 4269, 'synset': 'red_squirrel.n.02', 'name': 'red_squirrel'}, {'id': 4270, 'synset': 'american_red_squirrel.n.01', 'name': 'American_red_squirrel'}, {'id': 4271, 'synset': 'chickeree.n.01', 'name': 'chickeree'}, {'id': 4272, 'synset': 'antelope_squirrel.n.01', 'name': 'antelope_squirrel'}, {'id': 4273, 'synset': 'ground_squirrel.n.02', 'name': 'ground_squirrel'}, {'id': 4274, 'synset': 'mantled_ground_squirrel.n.01', 'name': 'mantled_ground_squirrel'}, {'id': 4275, 'synset': 'suslik.n.01', 'name': 'suslik'}, {'id': 4276, 'synset': 'flickertail.n.01', 'name': 'flickertail'}, {'id': 4277, 'synset': 'rock_squirrel.n.01', 'name': 'rock_squirrel'}, {'id': 4278, 'synset': 'arctic_ground_squirrel.n.01', 'name': 'Arctic_ground_squirrel'}, {'id': 4279, 'synset': 'prairie_dog.n.01', 'name': 'prairie_dog'}, {'id': 4280, 'synset': 'blacktail_prairie_dog.n.01', 'name': 'blacktail_prairie_dog'}, {'id': 4281, 'synset': 'whitetail_prairie_dog.n.01', 'name': 'whitetail_prairie_dog'}, {'id': 4282, 'synset': 'eastern_chipmunk.n.01', 'name': 'eastern_chipmunk'}, {'id': 4283, 'synset': 'chipmunk.n.01', 'name': 'chipmunk'}, {'id': 4284, 'synset': 'baronduki.n.01', 'name': 'baronduki'}, {'id': 4285, 'synset': 'american_flying_squirrel.n.01', 'name': 'American_flying_squirrel'}, {'id': 4286, 'synset': 'southern_flying_squirrel.n.01', 'name': 'southern_flying_squirrel'}, {'id': 4287, 'synset': 'northern_flying_squirrel.n.01', 'name': 'northern_flying_squirrel'}, {'id': 4288, 'synset': 'marmot.n.01', 'name': 'marmot'}, {'id': 4289, 'synset': 'groundhog.n.01', 'name': 'groundhog'}, {'id': 4290, 'synset': 'hoary_marmot.n.01', 'name': 'hoary_marmot'}, {'id': 4291, 'synset': 'yellowbelly_marmot.n.01', 'name': 'yellowbelly_marmot'}, {'id': 4292, 'synset': 'asiatic_flying_squirrel.n.01', 'name': 'Asiatic_flying_squirrel'}, {'id': 4293, 'synset': 'beaver.n.07', 'name': 'beaver'}, {'id': 4294, 'synset': 'old_world_beaver.n.01', 'name': 'Old_World_beaver'}, {'id': 4295, 'synset': 'new_world_beaver.n.01', 'name': 'New_World_beaver'}, {'id': 4296, 'synset': 'mountain_beaver.n.01', 'name': 'mountain_beaver'}, {'id': 4297, 'synset': 'cavy.n.01', 'name': 'cavy'}, {'id': 4298, 'synset': 'guinea_pig.n.02', 'name': 'guinea_pig'}, {'id': 4299, 'synset': 'aperea.n.01', 'name': 'aperea'}, {'id': 4300, 'synset': 'mara.n.02', 'name': 'mara'}, {'id': 4301, 'synset': 'capybara.n.01', 'name': 'capybara'}, {'id': 4302, 'synset': 'agouti.n.01', 'name': 'agouti'}, {'id': 4303, 'synset': 'paca.n.01', 'name': 'paca'}, {'id': 4304, 'synset': 'mountain_paca.n.01', 'name': 'mountain_paca'}, {'id': 4305, 'synset': 'coypu.n.01', 'name': 'coypu'}, {'id': 4306, 'synset': 'chinchilla.n.03', 'name': 'chinchilla'}, {'id': 4307, 'synset': 'mountain_chinchilla.n.01', 'name': 'mountain_chinchilla'}, {'id': 4308, 'synset': 'viscacha.n.01', 'name': 'viscacha'}, {'id': 4309, 'synset': 'abrocome.n.01', 'name': 'abrocome'}, {'id': 4310, 'synset': 'mole_rat.n.02', 'name': 'mole_rat'}, {'id': 4311, 'synset': 'mole_rat.n.01', 'name': 'mole_rat'}, {'id': 4312, 'synset': 'sand_rat.n.01', 'name': 'sand_rat'}, {'id': 4313, 'synset': 'naked_mole_rat.n.01', 'name': 'naked_mole_rat'}, {'id': 4314, 'synset': 'queen.n.09', 'name': 'queen'}, {'id': 4315, 'synset': 'damaraland_mole_rat.n.01', 'name': 'Damaraland_mole_rat'}, {'id': 4316, 'synset': 'ungulata.n.01', 'name': 'Ungulata'}, {'id': 4317, 'synset': 'ungulate.n.01', 'name': 'ungulate'}, {'id': 4318, 'synset': 'unguiculate.n.01', 'name': 'unguiculate'}, {'id': 4319, 'synset': 'dinoceras.n.01', 'name': 'dinoceras'}, {'id': 4320, 'synset': 'hyrax.n.01', 'name': 'hyrax'}, {'id': 4321, 'synset': 'rock_hyrax.n.01', 'name': 'rock_hyrax'}, {'id': 4322, 'synset': 'odd-toed_ungulate.n.01', 'name': 'odd-toed_ungulate'}, {'id': 4323, 'synset': 'equine.n.01', 'name': 'equine'}, {'id': 4324, 'synset': 'roan.n.02', 'name': 'roan'}, {'id': 4325, 'synset': 'stablemate.n.01', 'name': 'stablemate'}, {'id': 4326, 'synset': 'gee-gee.n.01', 'name': 'gee-gee'}, {'id': 4327, 'synset': 'eohippus.n.01', 'name': 'eohippus'}, {'id': 4328, 'synset': 'filly.n.01', 'name': 'filly'}, {'id': 4329, 'synset': 'colt.n.01', 'name': 'colt'}, {'id': 4330, 'synset': 'male_horse.n.01', 'name': 'male_horse'}, {'id': 4331, 'synset': 'ridgeling.n.01', 'name': 'ridgeling'}, {'id': 4332, 'synset': 'stallion.n.01', 'name': 'stallion'}, {'id': 4333, 'synset': 'stud.n.04', 'name': 'stud'}, {'id': 4334, 'synset': 'gelding.n.01', 'name': 'gelding'}, {'id': 4335, 'synset': 'mare.n.01', 'name': 'mare'}, {'id': 4336, 'synset': 'broodmare.n.01', 'name': 'broodmare'}, {'id': 4337, 'synset': 'saddle_horse.n.01', 'name': 'saddle_horse'}, {'id': 4338, 'synset': 'remount.n.01', 'name': 'remount'}, {'id': 4339, 'synset': 'palfrey.n.01', 'name': 'palfrey'}, {'id': 4340, 'synset': 'warhorse.n.03', 'name': 'warhorse'}, {'id': 4341, 'synset': 'cavalry_horse.n.01', 'name': 'cavalry_horse'}, {'id': 4342, 'synset': 'charger.n.01', 'name': 'charger'}, {'id': 4343, 'synset': 'steed.n.01', 'name': 'steed'}, {'id': 4344, 'synset': 'prancer.n.01', 'name': 'prancer'}, {'id': 4345, 'synset': 'hack.n.08', 'name': 'hack'}, {'id': 4346, 'synset': 'cow_pony.n.01', 'name': 'cow_pony'}, {'id': 4347, 'synset': 'quarter_horse.n.01', 'name': 'quarter_horse'}, {'id': 4348, 'synset': 'morgan.n.06', 'name': 'Morgan'}, {'id': 4349, 'synset': 'tennessee_walker.n.01', 'name': 'Tennessee_walker'}, {'id': 4350, 'synset': 'american_saddle_horse.n.01', 'name': 'American_saddle_horse'}, {'id': 4351, 'synset': 'appaloosa.n.01', 'name': 'Appaloosa'}, {'id': 4352, 'synset': 'arabian.n.02', 'name': 'Arabian'}, {'id': 4353, 'synset': 'lippizan.n.01', 'name': 'Lippizan'}, {'id': 4354, 'synset': 'pony.n.01', 'name': 'pony'}, {'id': 4355, 'synset': 'polo_pony.n.01', 'name': 'polo_pony'}, {'id': 4356, 'synset': 'mustang.n.01', 'name': 'mustang'}, {'id': 4357, 'synset': 'bronco.n.01', 'name': 'bronco'}, {'id': 4358, 'synset': 'bucking_bronco.n.01', 'name': 'bucking_bronco'}, {'id': 4359, 'synset': 'buckskin.n.01', 'name': 'buckskin'}, {'id': 4360, 'synset': 'crowbait.n.01', 'name': 'crowbait'}, {'id': 4361, 'synset': 'dun.n.01', 'name': 'dun'}, {'id': 4362, 'synset': 'grey.n.07', 'name': 'grey'}, {'id': 4363, 'synset': 'wild_horse.n.01', 'name': 'wild_horse'}, {'id': 4364, 'synset': 'tarpan.n.01', 'name': 'tarpan'}, {'id': 4365, 'synset': "przewalski's_horse.n.01", 'name': "Przewalski's_horse"}, {'id': 4366, 'synset': 'cayuse.n.01', 'name': 'cayuse'}, {'id': 4367, 'synset': 'hack.n.07', 'name': 'hack'}, {'id': 4368, 'synset': 'hack.n.06', 'name': 'hack'}, {'id': 4369, 'synset': 'plow_horse.n.01', 'name': 'plow_horse'}, {'id': 4370, 'synset': 'shetland_pony.n.01', 'name': 'Shetland_pony'}, {'id': 4371, 'synset': 'welsh_pony.n.01', 'name': 'Welsh_pony'}, {'id': 4372, 'synset': 'exmoor.n.02', 'name': 'Exmoor'}, {'id': 4373, 'synset': 'racehorse.n.01', 'name': 'racehorse'}, {'id': 4374, 'synset': 'thoroughbred.n.02', 'name': 'thoroughbred'}, {'id': 4375, 'synset': 'steeplechaser.n.01', 'name': 'steeplechaser'}, {'id': 4376, 'synset': 'racer.n.03', 'name': 'racer'}, {'id': 4377, 'synset': 'finisher.n.06', 'name': 'finisher'}, {'id': 4378, 'synset': 'pony.n.02', 'name': 'pony'}, {'id': 4379, 'synset': 'yearling.n.02', 'name': 'yearling'}, {'id': 4380, 'synset': 'dark_horse.n.02', 'name': 'dark_horse'}, {'id': 4381, 'synset': 'mudder.n.01', 'name': 'mudder'}, {'id': 4382, 'synset': 'nonstarter.n.02', 'name': 'nonstarter'}, {'id': 4383, 'synset': 'stalking-horse.n.04', 'name': 'stalking-horse'}, {'id': 4384, 'synset': 'harness_horse.n.01', 'name': 'harness_horse'}, {'id': 4385, 'synset': 'cob.n.02', 'name': 'cob'}, {'id': 4386, 'synset': 'hackney.n.02', 'name': 'hackney'}, {'id': 4387, 'synset': 'workhorse.n.02', 'name': 'workhorse'}, {'id': 4388, 'synset': 'draft_horse.n.01', 'name': 'draft_horse'}, {'id': 4389, 'synset': 'packhorse.n.01', 'name': 'packhorse'}, {'id': 4390, 'synset': 'carthorse.n.01', 'name': 'carthorse'}, {'id': 4391, 'synset': 'clydesdale.n.01', 'name': 'Clydesdale'}, {'id': 4392, 'synset': 'percheron.n.01', 'name': 'Percheron'}, {'id': 4393, 'synset': 'farm_horse.n.01', 'name': 'farm_horse'}, {'id': 4394, 'synset': 'shire.n.02', 'name': 'shire'}, {'id': 4395, 'synset': 'pole_horse.n.02', 'name': 'pole_horse'}, {'id': 4396, 'synset': 'post_horse.n.01', 'name': 'post_horse'}, {'id': 4397, 'synset': 'coach_horse.n.01', 'name': 'coach_horse'}, {'id': 4398, 'synset': 'pacer.n.02', 'name': 'pacer'}, {'id': 4399, 'synset': 'pacer.n.01', 'name': 'pacer'}, {'id': 4400, 'synset': 'trotting_horse.n.01', 'name': 'trotting_horse'}, {'id': 4401, 'synset': 'pole_horse.n.01', 'name': 'pole_horse'}, {'id': 4402, 'synset': 'stepper.n.03', 'name': 'stepper'}, {'id': 4403, 'synset': 'chestnut.n.06', 'name': 'chestnut'}, {'id': 4404, 'synset': 'liver_chestnut.n.01', 'name': 'liver_chestnut'}, {'id': 4405, 'synset': 'bay.n.07', 'name': 'bay'}, {'id': 4406, 'synset': 'sorrel.n.05', 'name': 'sorrel'}, {'id': 4407, 'synset': 'palomino.n.01', 'name': 'palomino'}, {'id': 4408, 'synset': 'pinto.n.01', 'name': 'pinto'}, {'id': 4409, 'synset': 'ass.n.03', 'name': 'ass'}, {'id': 4410, 'synset': 'burro.n.01', 'name': 'burro'}, {'id': 4411, 'synset': 'moke.n.01', 'name': 'moke'}, {'id': 4412, 'synset': 'jack.n.12', 'name': 'jack'}, {'id': 4413, 'synset': 'jennet.n.01', 'name': 'jennet'}, {'id': 4414, 'synset': 'mule.n.01', 'name': 'mule'}, {'id': 4415, 'synset': 'hinny.n.01', 'name': 'hinny'}, {'id': 4416, 'synset': 'wild_ass.n.01', 'name': 'wild_ass'}, {'id': 4417, 'synset': 'african_wild_ass.n.01', 'name': 'African_wild_ass'}, {'id': 4418, 'synset': 'kiang.n.01', 'name': 'kiang'}, {'id': 4419, 'synset': 'onager.n.02', 'name': 'onager'}, {'id': 4420, 'synset': 'chigetai.n.01', 'name': 'chigetai'}, {'id': 4421, 'synset': 'common_zebra.n.01', 'name': 'common_zebra'}, {'id': 4422, 'synset': 'mountain_zebra.n.01', 'name': 'mountain_zebra'}, {'id': 4423, 'synset': "grevy's_zebra.n.01", 'name': "grevy's_zebra"}, {'id': 4424, 'synset': 'quagga.n.01', 'name': 'quagga'}, {'id': 4425, 'synset': 'indian_rhinoceros.n.01', 'name': 'Indian_rhinoceros'}, {'id': 4426, 'synset': 'woolly_rhinoceros.n.01', 'name': 'woolly_rhinoceros'}, {'id': 4427, 'synset': 'white_rhinoceros.n.01', 'name': 'white_rhinoceros'}, {'id': 4428, 'synset': 'black_rhinoceros.n.01', 'name': 'black_rhinoceros'}, {'id': 4429, 'synset': 'tapir.n.01', 'name': 'tapir'}, {'id': 4430, 'synset': 'new_world_tapir.n.01', 'name': 'New_World_tapir'}, {'id': 4431, 'synset': 'malayan_tapir.n.01', 'name': 'Malayan_tapir'}, {'id': 4432, 'synset': 'even-toed_ungulate.n.01', 'name': 'even-toed_ungulate'}, {'id': 4433, 'synset': 'swine.n.01', 'name': 'swine'}, {'id': 4434, 'synset': 'piglet.n.01', 'name': 'piglet'}, {'id': 4435, 'synset': 'sucking_pig.n.01', 'name': 'sucking_pig'}, {'id': 4436, 'synset': 'porker.n.01', 'name': 'porker'}, {'id': 4437, 'synset': 'boar.n.02', 'name': 'boar'}, {'id': 4438, 'synset': 'sow.n.01', 'name': 'sow'}, {'id': 4439, 'synset': 'razorback.n.01', 'name': 'razorback'}, {'id': 4440, 'synset': 'wild_boar.n.01', 'name': 'wild_boar'}, {'id': 4441, 'synset': 'babirusa.n.01', 'name': 'babirusa'}, {'id': 4442, 'synset': 'warthog.n.01', 'name': 'warthog'}, {'id': 4443, 'synset': 'peccary.n.01', 'name': 'peccary'}, {'id': 4444, 'synset': 'collared_peccary.n.01', 'name': 'collared_peccary'}, {'id': 4445, 'synset': 'white-lipped_peccary.n.01', 'name': 'white-lipped_peccary'}, {'id': 4446, 'synset': 'ruminant.n.01', 'name': 'ruminant'}, {'id': 4447, 'synset': 'bovid.n.01', 'name': 'bovid'}, {'id': 4448, 'synset': 'bovine.n.01', 'name': 'bovine'}, {'id': 4449, 'synset': 'ox.n.02', 'name': 'ox'}, {'id': 4450, 'synset': 'cattle.n.01', 'name': 'cattle'}, {'id': 4451, 'synset': 'ox.n.01', 'name': 'ox'}, {'id': 4452, 'synset': 'stirk.n.01', 'name': 'stirk'}, {'id': 4453, 'synset': 'bullock.n.02', 'name': 'bullock'}, {'id': 4454, 'synset': 'bull.n.01', 'name': 'bull'}, {'id': 4455, 'synset': 'cow.n.01', 'name': 'cow'}, {'id': 4456, 'synset': 'heifer.n.01', 'name': 'heifer'}, {'id': 4457, 'synset': 'bullock.n.01', 'name': 'bullock'}, {'id': 4458, 'synset': 'dogie.n.01', 'name': 'dogie'}, {'id': 4459, 'synset': 'maverick.n.02', 'name': 'maverick'}, {'id': 4460, 'synset': 'longhorn.n.01', 'name': 'longhorn'}, {'id': 4461, 'synset': 'brahman.n.04', 'name': 'Brahman'}, {'id': 4462, 'synset': 'zebu.n.01', 'name': 'zebu'}, {'id': 4463, 'synset': 'aurochs.n.02', 'name': 'aurochs'}, {'id': 4464, 'synset': 'yak.n.02', 'name': 'yak'}, {'id': 4465, 'synset': 'banteng.n.01', 'name': 'banteng'}, {'id': 4466, 'synset': 'welsh.n.03', 'name': 'Welsh'}, {'id': 4467, 'synset': 'red_poll.n.01', 'name': 'red_poll'}, {'id': 4468, 'synset': 'santa_gertrudis.n.01', 'name': 'Santa_Gertrudis'}, {'id': 4469, 'synset': 'aberdeen_angus.n.01', 'name': 'Aberdeen_Angus'}, {'id': 4470, 'synset': 'africander.n.01', 'name': 'Africander'}, {'id': 4471, 'synset': 'dairy_cattle.n.01', 'name': 'dairy_cattle'}, {'id': 4472, 'synset': 'ayrshire.n.01', 'name': 'Ayrshire'}, {'id': 4473, 'synset': 'brown_swiss.n.01', 'name': 'Brown_Swiss'}, {'id': 4474, 'synset': 'charolais.n.01', 'name': 'Charolais'}, {'id': 4475, 'synset': 'jersey.n.05', 'name': 'Jersey'}, {'id': 4476, 'synset': 'devon.n.02', 'name': 'Devon'}, {'id': 4477, 'synset': 'grade.n.09', 'name': 'grade'}, {'id': 4478, 'synset': 'durham.n.02', 'name': 'Durham'}, {'id': 4479, 'synset': 'milking_shorthorn.n.01', 'name': 'milking_shorthorn'}, {'id': 4480, 'synset': 'galloway.n.02', 'name': 'Galloway'}, {'id': 4481, 'synset': 'friesian.n.01', 'name': 'Friesian'}, {'id': 4482, 'synset': 'guernsey.n.02', 'name': 'Guernsey'}, {'id': 4483, 'synset': 'hereford.n.01', 'name': 'Hereford'}, {'id': 4484, 'synset': 'cattalo.n.01', 'name': 'cattalo'}, {'id': 4485, 'synset': 'old_world_buffalo.n.01', 'name': 'Old_World_buffalo'}, {'id': 4486, 'synset': 'water_buffalo.n.01', 'name': 'water_buffalo'}, {'id': 4487, 'synset': 'indian_buffalo.n.01', 'name': 'Indian_buffalo'}, {'id': 4488, 'synset': 'carabao.n.01', 'name': 'carabao'}, {'id': 4489, 'synset': 'anoa.n.01', 'name': 'anoa'}, {'id': 4490, 'synset': 'tamarau.n.01', 'name': 'tamarau'}, {'id': 4491, 'synset': 'cape_buffalo.n.01', 'name': 'Cape_buffalo'}, {'id': 4492, 'synset': 'asian_wild_ox.n.01', 'name': 'Asian_wild_ox'}, {'id': 4493, 'synset': 'gaur.n.01', 'name': 'gaur'}, {'id': 4494, 'synset': 'gayal.n.01', 'name': 'gayal'}, {'id': 4495, 'synset': 'bison.n.01', 'name': 'bison'}, {'id': 4496, 'synset': 'american_bison.n.01', 'name': 'American_bison'}, {'id': 4497, 'synset': 'wisent.n.01', 'name': 'wisent'}, {'id': 4498, 'synset': 'musk_ox.n.01', 'name': 'musk_ox'}, {'id': 4499, 'synset': 'ewe.n.03', 'name': 'ewe'}, {'id': 4500, 'synset': 'wether.n.01', 'name': 'wether'}, {'id': 4501, 'synset': 'lambkin.n.01', 'name': 'lambkin'}, {'id': 4502, 'synset': 'baa-lamb.n.01', 'name': 'baa-lamb'}, {'id': 4503, 'synset': 'hog.n.02', 'name': 'hog'}, {'id': 4504, 'synset': 'teg.n.01', 'name': 'teg'}, {'id': 4505, 'synset': 'persian_lamb.n.02', 'name': 'Persian_lamb'}, {'id': 4506, 'synset': 'domestic_sheep.n.01', 'name': 'domestic_sheep'}, {'id': 4507, 'synset': 'cotswold.n.01', 'name': 'Cotswold'}, {'id': 4508, 'synset': 'hampshire.n.02', 'name': 'Hampshire'}, {'id': 4509, 'synset': 'lincoln.n.03', 'name': 'Lincoln'}, {'id': 4510, 'synset': 'exmoor.n.01', 'name': 'Exmoor'}, {'id': 4511, 'synset': 'cheviot.n.01', 'name': 'Cheviot'}, {'id': 4512, 'synset': 'broadtail.n.02', 'name': 'broadtail'}, {'id': 4513, 'synset': 'longwool.n.01', 'name': 'longwool'}, {'id': 4514, 'synset': 'merino.n.01', 'name': 'merino'}, {'id': 4515, 'synset': 'rambouillet.n.01', 'name': 'Rambouillet'}, {'id': 4516, 'synset': 'wild_sheep.n.01', 'name': 'wild_sheep'}, {'id': 4517, 'synset': 'argali.n.01', 'name': 'argali'}, {'id': 4518, 'synset': 'marco_polo_sheep.n.01', 'name': 'Marco_Polo_sheep'}, {'id': 4519, 'synset': 'urial.n.01', 'name': 'urial'}, {'id': 4520, 'synset': 'dall_sheep.n.01', 'name': 'Dall_sheep'}, {'id': 4521, 'synset': 'mountain_sheep.n.01', 'name': 'mountain_sheep'}, {'id': 4522, 'synset': 'bighorn.n.02', 'name': 'bighorn'}, {'id': 4523, 'synset': 'mouflon.n.01', 'name': 'mouflon'}, {'id': 4524, 'synset': 'aoudad.n.01', 'name': 'aoudad'}, {'id': 4525, 'synset': 'kid.n.05', 'name': 'kid'}, {'id': 4526, 'synset': 'billy.n.02', 'name': 'billy'}, {'id': 4527, 'synset': 'nanny.n.02', 'name': 'nanny'}, {'id': 4528, 'synset': 'domestic_goat.n.01', 'name': 'domestic_goat'}, {'id': 4529, 'synset': 'cashmere_goat.n.01', 'name': 'Cashmere_goat'}, {'id': 4530, 'synset': 'angora.n.02', 'name': 'Angora'}, {'id': 4531, 'synset': 'wild_goat.n.01', 'name': 'wild_goat'}, {'id': 4532, 'synset': 'bezoar_goat.n.01', 'name': 'bezoar_goat'}, {'id': 4533, 'synset': 'markhor.n.01', 'name': 'markhor'}, {'id': 4534, 'synset': 'ibex.n.01', 'name': 'ibex'}, {'id': 4535, 'synset': 'goat_antelope.n.01', 'name': 'goat_antelope'}, {'id': 4536, 'synset': 'mountain_goat.n.01', 'name': 'mountain_goat'}, {'id': 4537, 'synset': 'goral.n.01', 'name': 'goral'}, {'id': 4538, 'synset': 'serow.n.01', 'name': 'serow'}, {'id': 4539, 'synset': 'chamois.n.02', 'name': 'chamois'}, {'id': 4540, 'synset': 'takin.n.01', 'name': 'takin'}, {'id': 4541, 'synset': 'antelope.n.01', 'name': 'antelope'}, {'id': 4542, 'synset': 'blackbuck.n.01', 'name': 'blackbuck'}, {'id': 4543, 'synset': 'gerenuk.n.01', 'name': 'gerenuk'}, {'id': 4544, 'synset': 'addax.n.01', 'name': 'addax'}, {'id': 4545, 'synset': 'gnu.n.01', 'name': 'gnu'}, {'id': 4546, 'synset': 'dik-dik.n.01', 'name': 'dik-dik'}, {'id': 4547, 'synset': 'hartebeest.n.01', 'name': 'hartebeest'}, {'id': 4548, 'synset': 'sassaby.n.01', 'name': 'sassaby'}, {'id': 4549, 'synset': 'impala.n.01', 'name': 'impala'}, {'id': 4550, 'synset': "thomson's_gazelle.n.01", 'name': "Thomson's_gazelle"}, {'id': 4551, 'synset': 'gazella_subgutturosa.n.01', 'name': 'Gazella_subgutturosa'}, {'id': 4552, 'synset': 'springbok.n.01', 'name': 'springbok'}, {'id': 4553, 'synset': 'bongo.n.02', 'name': 'bongo'}, {'id': 4554, 'synset': 'kudu.n.01', 'name': 'kudu'}, {'id': 4555, 'synset': 'greater_kudu.n.01', 'name': 'greater_kudu'}, {'id': 4556, 'synset': 'lesser_kudu.n.01', 'name': 'lesser_kudu'}, {'id': 4557, 'synset': 'harnessed_antelope.n.01', 'name': 'harnessed_antelope'}, {'id': 4558, 'synset': 'nyala.n.02', 'name': 'nyala'}, {'id': 4559, 'synset': 'mountain_nyala.n.01', 'name': 'mountain_nyala'}, {'id': 4560, 'synset': 'bushbuck.n.01', 'name': 'bushbuck'}, {'id': 4561, 'synset': 'nilgai.n.01', 'name': 'nilgai'}, {'id': 4562, 'synset': 'sable_antelope.n.01', 'name': 'sable_antelope'}, {'id': 4563, 'synset': 'saiga.n.01', 'name': 'saiga'}, {'id': 4564, 'synset': 'steenbok.n.01', 'name': 'steenbok'}, {'id': 4565, 'synset': 'eland.n.01', 'name': 'eland'}, {'id': 4566, 'synset': 'common_eland.n.01', 'name': 'common_eland'}, {'id': 4567, 'synset': 'giant_eland.n.01', 'name': 'giant_eland'}, {'id': 4568, 'synset': 'kob.n.01', 'name': 'kob'}, {'id': 4569, 'synset': 'lechwe.n.01', 'name': 'lechwe'}, {'id': 4570, 'synset': 'waterbuck.n.01', 'name': 'waterbuck'}, {'id': 4571, 'synset': 'puku.n.01', 'name': 'puku'}, {'id': 4572, 'synset': 'oryx.n.01', 'name': 'oryx'}, {'id': 4573, 'synset': 'gemsbok.n.01', 'name': 'gemsbok'}, {'id': 4574, 'synset': 'forest_goat.n.01', 'name': 'forest_goat'}, {'id': 4575, 'synset': 'pronghorn.n.01', 'name': 'pronghorn'}, {'id': 4576, 'synset': 'stag.n.02', 'name': 'stag'}, {'id': 4577, 'synset': 'royal.n.02', 'name': 'royal'}, {'id': 4578, 'synset': 'pricket.n.02', 'name': 'pricket'}, {'id': 4579, 'synset': 'fawn.n.02', 'name': 'fawn'}, {'id': 4580, 'synset': 'red_deer.n.01', 'name': 'red_deer'}, {'id': 4581, 'synset': 'hart.n.03', 'name': 'hart'}, {'id': 4582, 'synset': 'hind.n.02', 'name': 'hind'}, {'id': 4583, 'synset': 'brocket.n.02', 'name': 'brocket'}, {'id': 4584, 'synset': 'sambar.n.01', 'name': 'sambar'}, {'id': 4585, 'synset': 'wapiti.n.01', 'name': 'wapiti'}, {'id': 4586, 'synset': 'japanese_deer.n.01', 'name': 'Japanese_deer'}, {'id': 4587, 'synset': 'virginia_deer.n.01', 'name': 'Virginia_deer'}, {'id': 4588, 'synset': 'mule_deer.n.01', 'name': 'mule_deer'}, {'id': 4589, 'synset': 'black-tailed_deer.n.01', 'name': 'black-tailed_deer'}, {'id': 4590, 'synset': 'fallow_deer.n.01', 'name': 'fallow_deer'}, {'id': 4591, 'synset': 'roe_deer.n.01', 'name': 'roe_deer'}, {'id': 4592, 'synset': 'roebuck.n.01', 'name': 'roebuck'}, {'id': 4593, 'synset': 'caribou.n.01', 'name': 'caribou'}, {'id': 4594, 'synset': 'woodland_caribou.n.01', 'name': 'woodland_caribou'}, {'id': 4595, 'synset': 'barren_ground_caribou.n.01', 'name': 'barren_ground_caribou'}, {'id': 4596, 'synset': 'brocket.n.01', 'name': 'brocket'}, {'id': 4597, 'synset': 'muntjac.n.01', 'name': 'muntjac'}, {'id': 4598, 'synset': 'musk_deer.n.01', 'name': 'musk_deer'}, {'id': 4599, 'synset': "pere_david's_deer.n.01", 'name': "pere_david's_deer"}, {'id': 4600, 'synset': 'chevrotain.n.01', 'name': 'chevrotain'}, {'id': 4601, 'synset': 'kanchil.n.01', 'name': 'kanchil'}, {'id': 4602, 'synset': 'napu.n.01', 'name': 'napu'}, {'id': 4603, 'synset': 'water_chevrotain.n.01', 'name': 'water_chevrotain'}, {'id': 4604, 'synset': 'arabian_camel.n.01', 'name': 'Arabian_camel'}, {'id': 4605, 'synset': 'bactrian_camel.n.01', 'name': 'Bactrian_camel'}, {'id': 4606, 'synset': 'llama.n.01', 'name': 'llama'}, {'id': 4607, 'synset': 'domestic_llama.n.01', 'name': 'domestic_llama'}, {'id': 4608, 'synset': 'guanaco.n.01', 'name': 'guanaco'}, {'id': 4609, 'synset': 'alpaca.n.03', 'name': 'alpaca'}, {'id': 4610, 'synset': 'vicuna.n.03', 'name': 'vicuna'}, {'id': 4611, 'synset': 'okapi.n.01', 'name': 'okapi'}, {'id': 4612, 'synset': 'musteline_mammal.n.01', 'name': 'musteline_mammal'}, {'id': 4613, 'synset': 'weasel.n.02', 'name': 'weasel'}, {'id': 4614, 'synset': 'ermine.n.02', 'name': 'ermine'}, {'id': 4615, 'synset': 'stoat.n.01', 'name': 'stoat'}, {'id': 4616, 'synset': 'new_world_least_weasel.n.01', 'name': 'New_World_least_weasel'}, {'id': 4617, 'synset': 'old_world_least_weasel.n.01', 'name': 'Old_World_least_weasel'}, {'id': 4618, 'synset': 'longtail_weasel.n.01', 'name': 'longtail_weasel'}, {'id': 4619, 'synset': 'mink.n.03', 'name': 'mink'}, {'id': 4620, 'synset': 'american_mink.n.01', 'name': 'American_mink'}, {'id': 4621, 'synset': 'polecat.n.02', 'name': 'polecat'}, {'id': 4622, 'synset': 'black-footed_ferret.n.01', 'name': 'black-footed_ferret'}, {'id': 4623, 'synset': 'muishond.n.01', 'name': 'muishond'}, {'id': 4624, 'synset': 'snake_muishond.n.01', 'name': 'snake_muishond'}, {'id': 4625, 'synset': 'striped_muishond.n.01', 'name': 'striped_muishond'}, {'id': 4626, 'synset': 'otter.n.02', 'name': 'otter'}, {'id': 4627, 'synset': 'river_otter.n.01', 'name': 'river_otter'}, {'id': 4628, 'synset': 'eurasian_otter.n.01', 'name': 'Eurasian_otter'}, {'id': 4629, 'synset': 'sea_otter.n.01', 'name': 'sea_otter'}, {'id': 4630, 'synset': 'skunk.n.04', 'name': 'skunk'}, {'id': 4631, 'synset': 'striped_skunk.n.01', 'name': 'striped_skunk'}, {'id': 4632, 'synset': 'hooded_skunk.n.01', 'name': 'hooded_skunk'}, {'id': 4633, 'synset': 'hog-nosed_skunk.n.01', 'name': 'hog-nosed_skunk'}, {'id': 4634, 'synset': 'spotted_skunk.n.01', 'name': 'spotted_skunk'}, {'id': 4635, 'synset': 'badger.n.02', 'name': 'badger'}, {'id': 4636, 'synset': 'american_badger.n.01', 'name': 'American_badger'}, {'id': 4637, 'synset': 'eurasian_badger.n.01', 'name': 'Eurasian_badger'}, {'id': 4638, 'synset': 'ratel.n.01', 'name': 'ratel'}, {'id': 4639, 'synset': 'ferret_badger.n.01', 'name': 'ferret_badger'}, {'id': 4640, 'synset': 'hog_badger.n.01', 'name': 'hog_badger'}, {'id': 4641, 'synset': 'wolverine.n.03', 'name': 'wolverine'}, {'id': 4642, 'synset': 'glutton.n.02', 'name': 'glutton'}, {'id': 4643, 'synset': 'grison.n.01', 'name': 'grison'}, {'id': 4644, 'synset': 'marten.n.01', 'name': 'marten'}, {'id': 4645, 'synset': 'pine_marten.n.01', 'name': 'pine_marten'}, {'id': 4646, 'synset': 'sable.n.05', 'name': 'sable'}, {'id': 4647, 'synset': 'american_marten.n.01', 'name': 'American_marten'}, {'id': 4648, 'synset': 'stone_marten.n.01', 'name': 'stone_marten'}, {'id': 4649, 'synset': 'fisher.n.02', 'name': 'fisher'}, {'id': 4650, 'synset': 'yellow-throated_marten.n.01', 'name': 'yellow-throated_marten'}, {'id': 4651, 'synset': 'tayra.n.01', 'name': 'tayra'}, {'id': 4652, 'synset': 'fictional_animal.n.01', 'name': 'fictional_animal'}, {'id': 4653, 'synset': 'pachyderm.n.01', 'name': 'pachyderm'}, {'id': 4654, 'synset': 'edentate.n.01', 'name': 'edentate'}, {'id': 4655, 'synset': 'armadillo.n.01', 'name': 'armadillo'}, {'id': 4656, 'synset': 'peba.n.01', 'name': 'peba'}, {'id': 4657, 'synset': 'apar.n.01', 'name': 'apar'}, {'id': 4658, 'synset': 'tatouay.n.01', 'name': 'tatouay'}, {'id': 4659, 'synset': 'peludo.n.01', 'name': 'peludo'}, {'id': 4660, 'synset': 'giant_armadillo.n.01', 'name': 'giant_armadillo'}, {'id': 4661, 'synset': 'pichiciago.n.01', 'name': 'pichiciago'}, {'id': 4662, 'synset': 'sloth.n.02', 'name': 'sloth'}, {'id': 4663, 'synset': 'three-toed_sloth.n.01', 'name': 'three-toed_sloth'}, {'id': 4664, 'synset': 'two-toed_sloth.n.02', 'name': 'two-toed_sloth'}, {'id': 4665, 'synset': 'two-toed_sloth.n.01', 'name': 'two-toed_sloth'}, {'id': 4666, 'synset': 'megatherian.n.01', 'name': 'megatherian'}, {'id': 4667, 'synset': 'mylodontid.n.01', 'name': 'mylodontid'}, {'id': 4668, 'synset': 'anteater.n.02', 'name': 'anteater'}, {'id': 4669, 'synset': 'ant_bear.n.01', 'name': 'ant_bear'}, {'id': 4670, 'synset': 'silky_anteater.n.01', 'name': 'silky_anteater'}, {'id': 4671, 'synset': 'tamandua.n.01', 'name': 'tamandua'}, {'id': 4672, 'synset': 'pangolin.n.01', 'name': 'pangolin'}, {'id': 4673, 'synset': 'coronet.n.02', 'name': 'coronet'}, {'id': 4674, 'synset': 'scapular.n.01', 'name': 'scapular'}, {'id': 4675, 'synset': 'tadpole.n.01', 'name': 'tadpole'}, {'id': 4676, 'synset': 'primate.n.02', 'name': 'primate'}, {'id': 4677, 'synset': 'simian.n.01', 'name': 'simian'}, {'id': 4678, 'synset': 'ape.n.01', 'name': 'ape'}, {'id': 4679, 'synset': 'anthropoid.n.02', 'name': 'anthropoid'}, {'id': 4680, 'synset': 'anthropoid_ape.n.01', 'name': 'anthropoid_ape'}, {'id': 4681, 'synset': 'hominoid.n.01', 'name': 'hominoid'}, {'id': 4682, 'synset': 'hominid.n.01', 'name': 'hominid'}, {'id': 4683, 'synset': 'homo.n.02', 'name': 'homo'}, {'id': 4684, 'synset': 'world.n.08', 'name': 'world'}, {'id': 4685, 'synset': 'homo_erectus.n.01', 'name': 'Homo_erectus'}, {'id': 4686, 'synset': 'pithecanthropus.n.01', 'name': 'Pithecanthropus'}, {'id': 4687, 'synset': 'java_man.n.01', 'name': 'Java_man'}, {'id': 4688, 'synset': 'peking_man.n.01', 'name': 'Peking_man'}, {'id': 4689, 'synset': 'sinanthropus.n.01', 'name': 'Sinanthropus'}, {'id': 4690, 'synset': 'homo_soloensis.n.01', 'name': 'Homo_soloensis'}, {'id': 4691, 'synset': 'javanthropus.n.01', 'name': 'Javanthropus'}, {'id': 4692, 'synset': 'homo_habilis.n.01', 'name': 'Homo_habilis'}, {'id': 4693, 'synset': 'homo_sapiens.n.01', 'name': 'Homo_sapiens'}, {'id': 4694, 'synset': 'neandertal_man.n.01', 'name': 'Neandertal_man'}, {'id': 4695, 'synset': 'cro-magnon.n.01', 'name': 'Cro-magnon'}, {'id': 4696, 'synset': 'homo_sapiens_sapiens.n.01', 'name': 'Homo_sapiens_sapiens'}, {'id': 4697, 'synset': 'australopithecine.n.01', 'name': 'australopithecine'}, {'id': 4698, 'synset': 'australopithecus_afarensis.n.01', 'name': 'Australopithecus_afarensis'}, {'id': 4699, 'synset': 'australopithecus_africanus.n.01', 'name': 'Australopithecus_africanus'}, {'id': 4700, 'synset': 'australopithecus_boisei.n.01', 'name': 'Australopithecus_boisei'}, {'id': 4701, 'synset': 'zinjanthropus.n.01', 'name': 'Zinjanthropus'}, {'id': 4702, 'synset': 'australopithecus_robustus.n.01', 'name': 'Australopithecus_robustus'}, {'id': 4703, 'synset': 'paranthropus.n.01', 'name': 'Paranthropus'}, {'id': 4704, 'synset': 'sivapithecus.n.01', 'name': 'Sivapithecus'}, {'id': 4705, 'synset': 'rudapithecus.n.01', 'name': 'rudapithecus'}, {'id': 4706, 'synset': 'proconsul.n.03', 'name': 'proconsul'}, {'id': 4707, 'synset': 'aegyptopithecus.n.01', 'name': 'Aegyptopithecus'}, {'id': 4708, 'synset': 'great_ape.n.01', 'name': 'great_ape'}, {'id': 4709, 'synset': 'orangutan.n.01', 'name': 'orangutan'}, {'id': 4710, 'synset': 'western_lowland_gorilla.n.01', 'name': 'western_lowland_gorilla'}, {'id': 4711, 'synset': 'eastern_lowland_gorilla.n.01', 'name': 'eastern_lowland_gorilla'}, {'id': 4712, 'synset': 'mountain_gorilla.n.01', 'name': 'mountain_gorilla'}, {'id': 4713, 'synset': 'silverback.n.01', 'name': 'silverback'}, {'id': 4714, 'synset': 'chimpanzee.n.01', 'name': 'chimpanzee'}, {'id': 4715, 'synset': 'western_chimpanzee.n.01', 'name': 'western_chimpanzee'}, {'id': 4716, 'synset': 'eastern_chimpanzee.n.01', 'name': 'eastern_chimpanzee'}, {'id': 4717, 'synset': 'central_chimpanzee.n.01', 'name': 'central_chimpanzee'}, {'id': 4718, 'synset': 'pygmy_chimpanzee.n.01', 'name': 'pygmy_chimpanzee'}, {'id': 4719, 'synset': 'lesser_ape.n.01', 'name': 'lesser_ape'}, {'id': 4720, 'synset': 'gibbon.n.02', 'name': 'gibbon'}, {'id': 4721, 'synset': 'siamang.n.01', 'name': 'siamang'}, {'id': 4722, 'synset': 'old_world_monkey.n.01', 'name': 'Old_World_monkey'}, {'id': 4723, 'synset': 'guenon.n.01', 'name': 'guenon'}, {'id': 4724, 'synset': 'talapoin.n.01', 'name': 'talapoin'}, {'id': 4725, 'synset': 'grivet.n.01', 'name': 'grivet'}, {'id': 4726, 'synset': 'vervet.n.01', 'name': 'vervet'}, {'id': 4727, 'synset': 'green_monkey.n.01', 'name': 'green_monkey'}, {'id': 4728, 'synset': 'mangabey.n.01', 'name': 'mangabey'}, {'id': 4729, 'synset': 'patas.n.01', 'name': 'patas'}, {'id': 4730, 'synset': 'chacma.n.01', 'name': 'chacma'}, {'id': 4731, 'synset': 'mandrill.n.01', 'name': 'mandrill'}, {'id': 4732, 'synset': 'drill.n.02', 'name': 'drill'}, {'id': 4733, 'synset': 'macaque.n.01', 'name': 'macaque'}, {'id': 4734, 'synset': 'rhesus.n.01', 'name': 'rhesus'}, {'id': 4735, 'synset': 'bonnet_macaque.n.01', 'name': 'bonnet_macaque'}, {'id': 4736, 'synset': 'barbary_ape.n.01', 'name': 'Barbary_ape'}, {'id': 4737, 'synset': 'crab-eating_macaque.n.01', 'name': 'crab-eating_macaque'}, {'id': 4738, 'synset': 'langur.n.01', 'name': 'langur'}, {'id': 4739, 'synset': 'entellus.n.01', 'name': 'entellus'}, {'id': 4740, 'synset': 'colobus.n.01', 'name': 'colobus'}, {'id': 4741, 'synset': 'guereza.n.01', 'name': 'guereza'}, {'id': 4742, 'synset': 'proboscis_monkey.n.01', 'name': 'proboscis_monkey'}, {'id': 4743, 'synset': 'new_world_monkey.n.01', 'name': 'New_World_monkey'}, {'id': 4744, 'synset': 'marmoset.n.01', 'name': 'marmoset'}, {'id': 4745, 'synset': 'true_marmoset.n.01', 'name': 'true_marmoset'}, {'id': 4746, 'synset': 'pygmy_marmoset.n.01', 'name': 'pygmy_marmoset'}, {'id': 4747, 'synset': 'tamarin.n.01', 'name': 'tamarin'}, {'id': 4748, 'synset': 'silky_tamarin.n.01', 'name': 'silky_tamarin'}, {'id': 4749, 'synset': 'pinche.n.01', 'name': 'pinche'}, {'id': 4750, 'synset': 'capuchin.n.02', 'name': 'capuchin'}, {'id': 4751, 'synset': 'douroucouli.n.01', 'name': 'douroucouli'}, {'id': 4752, 'synset': 'howler_monkey.n.01', 'name': 'howler_monkey'}, {'id': 4753, 'synset': 'saki.n.03', 'name': 'saki'}, {'id': 4754, 'synset': 'uakari.n.01', 'name': 'uakari'}, {'id': 4755, 'synset': 'titi.n.03', 'name': 'titi'}, {'id': 4756, 'synset': 'spider_monkey.n.01', 'name': 'spider_monkey'}, {'id': 4757, 'synset': 'squirrel_monkey.n.01', 'name': 'squirrel_monkey'}, {'id': 4758, 'synset': 'woolly_monkey.n.01', 'name': 'woolly_monkey'}, {'id': 4759, 'synset': 'tree_shrew.n.01', 'name': 'tree_shrew'}, {'id': 4760, 'synset': 'prosimian.n.01', 'name': 'prosimian'}, {'id': 4761, 'synset': 'lemur.n.01', 'name': 'lemur'}, {'id': 4762, 'synset': 'madagascar_cat.n.01', 'name': 'Madagascar_cat'}, {'id': 4763, 'synset': 'aye-aye.n.01', 'name': 'aye-aye'}, {'id': 4764, 'synset': 'slender_loris.n.01', 'name': 'slender_loris'}, {'id': 4765, 'synset': 'slow_loris.n.01', 'name': 'slow_loris'}, {'id': 4766, 'synset': 'potto.n.02', 'name': 'potto'}, {'id': 4767, 'synset': 'angwantibo.n.01', 'name': 'angwantibo'}, {'id': 4768, 'synset': 'galago.n.01', 'name': 'galago'}, {'id': 4769, 'synset': 'indri.n.01', 'name': 'indri'}, {'id': 4770, 'synset': 'woolly_indris.n.01', 'name': 'woolly_indris'}, {'id': 4771, 'synset': 'tarsier.n.01', 'name': 'tarsier'}, {'id': 4772, 'synset': 'tarsius_syrichta.n.01', 'name': 'Tarsius_syrichta'}, {'id': 4773, 'synset': 'tarsius_glis.n.01', 'name': 'Tarsius_glis'}, {'id': 4774, 'synset': 'flying_lemur.n.01', 'name': 'flying_lemur'}, {'id': 4775, 'synset': 'cynocephalus_variegatus.n.01', 'name': 'Cynocephalus_variegatus'}, {'id': 4776, 'synset': 'proboscidean.n.01', 'name': 'proboscidean'}, {'id': 4777, 'synset': 'rogue_elephant.n.01', 'name': 'rogue_elephant'}, {'id': 4778, 'synset': 'indian_elephant.n.01', 'name': 'Indian_elephant'}, {'id': 4779, 'synset': 'african_elephant.n.01', 'name': 'African_elephant'}, {'id': 4780, 'synset': 'woolly_mammoth.n.01', 'name': 'woolly_mammoth'}, {'id': 4781, 'synset': 'columbian_mammoth.n.01', 'name': 'columbian_mammoth'}, {'id': 4782, 'synset': 'imperial_mammoth.n.01', 'name': 'imperial_mammoth'}, {'id': 4783, 'synset': 'mastodon.n.01', 'name': 'mastodon'}, {'id': 4784, 'synset': 'plantigrade_mammal.n.01', 'name': 'plantigrade_mammal'}, {'id': 4785, 'synset': 'digitigrade_mammal.n.01', 'name': 'digitigrade_mammal'}, {'id': 4786, 'synset': 'procyonid.n.01', 'name': 'procyonid'}, {'id': 4787, 'synset': 'raccoon.n.02', 'name': 'raccoon'}, {'id': 4788, 'synset': 'common_raccoon.n.01', 'name': 'common_raccoon'}, {'id': 4789, 'synset': 'crab-eating_raccoon.n.01', 'name': 'crab-eating_raccoon'}, {'id': 4790, 'synset': 'bassarisk.n.01', 'name': 'bassarisk'}, {'id': 4791, 'synset': 'kinkajou.n.01', 'name': 'kinkajou'}, {'id': 4792, 'synset': 'coati.n.01', 'name': 'coati'}, {'id': 4793, 'synset': 'lesser_panda.n.01', 'name': 'lesser_panda'}, {'id': 4794, 'synset': 'twitterer.n.01', 'name': 'twitterer'}, {'id': 4795, 'synset': 'fingerling.n.01', 'name': 'fingerling'}, {'id': 4796, 'synset': 'game_fish.n.01', 'name': 'game_fish'}, {'id': 4797, 'synset': 'food_fish.n.01', 'name': 'food_fish'}, {'id': 4798, 'synset': 'rough_fish.n.01', 'name': 'rough_fish'}, {'id': 4799, 'synset': 'groundfish.n.01', 'name': 'groundfish'}, {'id': 4800, 'synset': 'young_fish.n.01', 'name': 'young_fish'}, {'id': 4801, 'synset': 'parr.n.03', 'name': 'parr'}, {'id': 4802, 'synset': 'mouthbreeder.n.01', 'name': 'mouthbreeder'}, {'id': 4803, 'synset': 'spawner.n.01', 'name': 'spawner'}, {'id': 4804, 'synset': 'barracouta.n.01', 'name': 'barracouta'}, {'id': 4805, 'synset': 'crossopterygian.n.01', 'name': 'crossopterygian'}, {'id': 4806, 'synset': 'coelacanth.n.01', 'name': 'coelacanth'}, {'id': 4807, 'synset': 'lungfish.n.01', 'name': 'lungfish'}, {'id': 4808, 'synset': 'ceratodus.n.01', 'name': 'ceratodus'}, {'id': 4809, 'synset': 'catfish.n.03', 'name': 'catfish'}, {'id': 4810, 'synset': 'silurid.n.01', 'name': 'silurid'}, {'id': 4811, 'synset': 'european_catfish.n.01', 'name': 'European_catfish'}, {'id': 4812, 'synset': 'electric_catfish.n.01', 'name': 'electric_catfish'}, {'id': 4813, 'synset': 'bullhead.n.02', 'name': 'bullhead'}, {'id': 4814, 'synset': 'horned_pout.n.01', 'name': 'horned_pout'}, {'id': 4815, 'synset': 'brown_bullhead.n.01', 'name': 'brown_bullhead'}, {'id': 4816, 'synset': 'channel_catfish.n.01', 'name': 'channel_catfish'}, {'id': 4817, 'synset': 'blue_catfish.n.01', 'name': 'blue_catfish'}, {'id': 4818, 'synset': 'flathead_catfish.n.01', 'name': 'flathead_catfish'}, {'id': 4819, 'synset': 'armored_catfish.n.01', 'name': 'armored_catfish'}, {'id': 4820, 'synset': 'sea_catfish.n.01', 'name': 'sea_catfish'}, {'id': 4821, 'synset': 'gadoid.n.01', 'name': 'gadoid'}, {'id': 4822, 'synset': 'cod.n.03', 'name': 'cod'}, {'id': 4823, 'synset': 'codling.n.01', 'name': 'codling'}, {'id': 4824, 'synset': 'atlantic_cod.n.01', 'name': 'Atlantic_cod'}, {'id': 4825, 'synset': 'pacific_cod.n.01', 'name': 'Pacific_cod'}, {'id': 4826, 'synset': 'whiting.n.06', 'name': 'whiting'}, {'id': 4827, 'synset': 'burbot.n.01', 'name': 'burbot'}, {'id': 4828, 'synset': 'haddock.n.02', 'name': 'haddock'}, {'id': 4829, 'synset': 'pollack.n.03', 'name': 'pollack'}, {'id': 4830, 'synset': 'hake.n.02', 'name': 'hake'}, {'id': 4831, 'synset': 'silver_hake.n.01', 'name': 'silver_hake'}, {'id': 4832, 'synset': 'ling.n.04', 'name': 'ling'}, {'id': 4833, 'synset': 'cusk.n.02', 'name': 'cusk'}, {'id': 4834, 'synset': 'grenadier.n.02', 'name': 'grenadier'}, {'id': 4835, 'synset': 'eel.n.02', 'name': 'eel'}, {'id': 4836, 'synset': 'elver.n.02', 'name': 'elver'}, {'id': 4837, 'synset': 'common_eel.n.01', 'name': 'common_eel'}, {'id': 4838, 'synset': 'tuna.n.04', 'name': 'tuna'}, {'id': 4839, 'synset': 'moray.n.01', 'name': 'moray'}, {'id': 4840, 'synset': 'conger.n.01', 'name': 'conger'}, {'id': 4841, 'synset': 'teleost_fish.n.01', 'name': 'teleost_fish'}, {'id': 4842, 'synset': 'beaked_salmon.n.01', 'name': 'beaked_salmon'}, {'id': 4843, 'synset': 'clupeid_fish.n.01', 'name': 'clupeid_fish'}, {'id': 4844, 'synset': 'whitebait.n.02', 'name': 'whitebait'}, {'id': 4845, 'synset': 'brit.n.02', 'name': 'brit'}, {'id': 4846, 'synset': 'shad.n.02', 'name': 'shad'}, {'id': 4847, 'synset': 'common_american_shad.n.01', 'name': 'common_American_shad'}, {'id': 4848, 'synset': 'river_shad.n.01', 'name': 'river_shad'}, {'id': 4849, 'synset': 'allice_shad.n.01', 'name': 'allice_shad'}, {'id': 4850, 'synset': 'alewife.n.02', 'name': 'alewife'}, {'id': 4851, 'synset': 'menhaden.n.01', 'name': 'menhaden'}, {'id': 4852, 'synset': 'herring.n.02', 'name': 'herring'}, {'id': 4853, 'synset': 'atlantic_herring.n.01', 'name': 'Atlantic_herring'}, {'id': 4854, 'synset': 'pacific_herring.n.01', 'name': 'Pacific_herring'}, {'id': 4855, 'synset': 'sardine.n.02', 'name': 'sardine'}, {'id': 4856, 'synset': 'sild.n.01', 'name': 'sild'}, {'id': 4857, 'synset': 'brisling.n.02', 'name': 'brisling'}, {'id': 4858, 'synset': 'pilchard.n.02', 'name': 'pilchard'}, {'id': 4859, 'synset': 'pacific_sardine.n.01', 'name': 'Pacific_sardine'}, {'id': 4860, 'synset': 'anchovy.n.02', 'name': 'anchovy'}, {'id': 4861, 'synset': 'mediterranean_anchovy.n.01', 'name': 'mediterranean_anchovy'}, {'id': 4862, 'synset': 'salmonid.n.01', 'name': 'salmonid'}, {'id': 4863, 'synset': 'parr.n.02', 'name': 'parr'}, {'id': 4864, 'synset': 'blackfish.n.02', 'name': 'blackfish'}, {'id': 4865, 'synset': 'redfish.n.03', 'name': 'redfish'}, {'id': 4866, 'synset': 'atlantic_salmon.n.02', 'name': 'Atlantic_salmon'}, {'id': 4867, 'synset': 'landlocked_salmon.n.01', 'name': 'landlocked_salmon'}, {'id': 4868, 'synset': 'sockeye.n.02', 'name': 'sockeye'}, {'id': 4869, 'synset': 'chinook.n.05', 'name': 'chinook'}, {'id': 4870, 'synset': 'coho.n.02', 'name': 'coho'}, {'id': 4871, 'synset': 'trout.n.02', 'name': 'trout'}, {'id': 4872, 'synset': 'brown_trout.n.01', 'name': 'brown_trout'}, {'id': 4873, 'synset': 'rainbow_trout.n.02', 'name': 'rainbow_trout'}, {'id': 4874, 'synset': 'sea_trout.n.03', 'name': 'sea_trout'}, {'id': 4875, 'synset': 'lake_trout.n.02', 'name': 'lake_trout'}, {'id': 4876, 'synset': 'brook_trout.n.02', 'name': 'brook_trout'}, {'id': 4877, 'synset': 'char.n.03', 'name': 'char'}, {'id': 4878, 'synset': 'arctic_char.n.01', 'name': 'Arctic_char'}, {'id': 4879, 'synset': 'whitefish.n.03', 'name': 'whitefish'}, {'id': 4880, 'synset': 'lake_whitefish.n.01', 'name': 'lake_whitefish'}, {'id': 4881, 'synset': 'cisco.n.02', 'name': 'cisco'}, {'id': 4882, 'synset': 'round_whitefish.n.01', 'name': 'round_whitefish'}, {'id': 4883, 'synset': 'smelt.n.02', 'name': 'smelt'}, {'id': 4884, 'synset': 'sparling.n.02', 'name': 'sparling'}, {'id': 4885, 'synset': 'capelin.n.01', 'name': 'capelin'}, {'id': 4886, 'synset': 'tarpon.n.01', 'name': 'tarpon'}, {'id': 4887, 'synset': 'ladyfish.n.01', 'name': 'ladyfish'}, {'id': 4888, 'synset': 'bonefish.n.01', 'name': 'bonefish'}, {'id': 4889, 'synset': 'argentine.n.01', 'name': 'argentine'}, {'id': 4890, 'synset': 'lanternfish.n.01', 'name': 'lanternfish'}, {'id': 4891, 'synset': 'lizardfish.n.01', 'name': 'lizardfish'}, {'id': 4892, 'synset': 'lancetfish.n.01', 'name': 'lancetfish'}, {'id': 4893, 'synset': 'opah.n.01', 'name': 'opah'}, {'id': 4894, 'synset': 'new_world_opah.n.01', 'name': 'New_World_opah'}, {'id': 4895, 'synset': 'ribbonfish.n.02', 'name': 'ribbonfish'}, {'id': 4896, 'synset': 'dealfish.n.01', 'name': 'dealfish'}, {'id': 4897, 'synset': 'oarfish.n.01', 'name': 'oarfish'}, {'id': 4898, 'synset': 'batfish.n.01', 'name': 'batfish'}, {'id': 4899, 'synset': 'goosefish.n.01', 'name': 'goosefish'}, {'id': 4900, 'synset': 'toadfish.n.01', 'name': 'toadfish'}, {'id': 4901, 'synset': 'oyster_fish.n.01', 'name': 'oyster_fish'}, {'id': 4902, 'synset': 'frogfish.n.01', 'name': 'frogfish'}, {'id': 4903, 'synset': 'sargassum_fish.n.01', 'name': 'sargassum_fish'}, {'id': 4904, 'synset': 'needlefish.n.01', 'name': 'needlefish'}, {'id': 4905, 'synset': 'timucu.n.01', 'name': 'timucu'}, {'id': 4906, 'synset': 'flying_fish.n.01', 'name': 'flying_fish'}, {'id': 4907, 'synset': 'monoplane_flying_fish.n.01', 'name': 'monoplane_flying_fish'}, {'id': 4908, 'synset': 'halfbeak.n.01', 'name': 'halfbeak'}, {'id': 4909, 'synset': 'saury.n.01', 'name': 'saury'}, {'id': 4910, 'synset': 'spiny-finned_fish.n.01', 'name': 'spiny-finned_fish'}, {'id': 4911, 'synset': 'lingcod.n.02', 'name': 'lingcod'}, {'id': 4912, 'synset': 'percoid_fish.n.01', 'name': 'percoid_fish'}, {'id': 4913, 'synset': 'perch.n.07', 'name': 'perch'}, {'id': 4914, 'synset': 'climbing_perch.n.01', 'name': 'climbing_perch'}, {'id': 4915, 'synset': 'perch.n.06', 'name': 'perch'}, {'id': 4916, 'synset': 'yellow_perch.n.01', 'name': 'yellow_perch'}, {'id': 4917, 'synset': 'european_perch.n.01', 'name': 'European_perch'}, {'id': 4918, 'synset': 'pike-perch.n.01', 'name': 'pike-perch'}, {'id': 4919, 'synset': 'walleye.n.02', 'name': 'walleye'}, {'id': 4920, 'synset': 'blue_pike.n.01', 'name': 'blue_pike'}, {'id': 4921, 'synset': 'snail_darter.n.01', 'name': 'snail_darter'}, {'id': 4922, 'synset': 'cusk-eel.n.01', 'name': 'cusk-eel'}, {'id': 4923, 'synset': 'brotula.n.01', 'name': 'brotula'}, {'id': 4924, 'synset': 'pearlfish.n.01', 'name': 'pearlfish'}, {'id': 4925, 'synset': 'robalo.n.01', 'name': 'robalo'}, {'id': 4926, 'synset': 'snook.n.01', 'name': 'snook'}, {'id': 4927, 'synset': 'pike.n.05', 'name': 'pike'}, {'id': 4928, 'synset': 'northern_pike.n.01', 'name': 'northern_pike'}, {'id': 4929, 'synset': 'muskellunge.n.02', 'name': 'muskellunge'}, {'id': 4930, 'synset': 'pickerel.n.02', 'name': 'pickerel'}, {'id': 4931, 'synset': 'chain_pickerel.n.01', 'name': 'chain_pickerel'}, {'id': 4932, 'synset': 'redfin_pickerel.n.01', 'name': 'redfin_pickerel'}, {'id': 4933, 'synset': 'sunfish.n.03', 'name': 'sunfish'}, {'id': 4934, 'synset': 'crappie.n.02', 'name': 'crappie'}, {'id': 4935, 'synset': 'black_crappie.n.01', 'name': 'black_crappie'}, {'id': 4936, 'synset': 'white_crappie.n.01', 'name': 'white_crappie'}, {'id': 4937, 'synset': 'freshwater_bream.n.02', 'name': 'freshwater_bream'}, {'id': 4938, 'synset': 'pumpkinseed.n.01', 'name': 'pumpkinseed'}, {'id': 4939, 'synset': 'bluegill.n.01', 'name': 'bluegill'}, {'id': 4940, 'synset': 'spotted_sunfish.n.01', 'name': 'spotted_sunfish'}, {'id': 4941, 'synset': 'freshwater_bass.n.02', 'name': 'freshwater_bass'}, {'id': 4942, 'synset': 'rock_bass.n.02', 'name': 'rock_bass'}, {'id': 4943, 'synset': 'black_bass.n.02', 'name': 'black_bass'}, {'id': 4944, 'synset': 'kentucky_black_bass.n.01', 'name': 'Kentucky_black_bass'}, {'id': 4945, 'synset': 'smallmouth.n.01', 'name': 'smallmouth'}, {'id': 4946, 'synset': 'largemouth.n.01', 'name': 'largemouth'}, {'id': 4947, 'synset': 'bass.n.08', 'name': 'bass'}, {'id': 4948, 'synset': 'serranid_fish.n.01', 'name': 'serranid_fish'}, {'id': 4949, 'synset': 'white_perch.n.01', 'name': 'white_perch'}, {'id': 4950, 'synset': 'yellow_bass.n.01', 'name': 'yellow_bass'}, {'id': 4951, 'synset': 'blackmouth_bass.n.01', 'name': 'blackmouth_bass'}, {'id': 4952, 'synset': 'rock_sea_bass.n.01', 'name': 'rock_sea_bass'}, {'id': 4953, 'synset': 'striped_bass.n.02', 'name': 'striped_bass'}, {'id': 4954, 'synset': 'stone_bass.n.01', 'name': 'stone_bass'}, {'id': 4955, 'synset': 'grouper.n.02', 'name': 'grouper'}, {'id': 4956, 'synset': 'hind.n.01', 'name': 'hind'}, {'id': 4957, 'synset': 'rock_hind.n.01', 'name': 'rock_hind'}, {'id': 4958, 'synset': 'creole-fish.n.01', 'name': 'creole-fish'}, {'id': 4959, 'synset': 'jewfish.n.02', 'name': 'jewfish'}, {'id': 4960, 'synset': 'soapfish.n.01', 'name': 'soapfish'}, {'id': 4961, 'synset': 'surfperch.n.01', 'name': 'surfperch'}, {'id': 4962, 'synset': 'rainbow_seaperch.n.01', 'name': 'rainbow_seaperch'}, {'id': 4963, 'synset': 'bigeye.n.01', 'name': 'bigeye'}, {'id': 4964, 'synset': 'catalufa.n.01', 'name': 'catalufa'}, {'id': 4965, 'synset': 'cardinalfish.n.01', 'name': 'cardinalfish'}, {'id': 4966, 'synset': 'flame_fish.n.01', 'name': 'flame_fish'}, {'id': 4967, 'synset': 'tilefish.n.02', 'name': 'tilefish'}, {'id': 4968, 'synset': 'bluefish.n.01', 'name': 'bluefish'}, {'id': 4969, 'synset': 'cobia.n.01', 'name': 'cobia'}, {'id': 4970, 'synset': 'remora.n.01', 'name': 'remora'}, {'id': 4971, 'synset': 'sharksucker.n.01', 'name': 'sharksucker'}, {'id': 4972, 'synset': 'whale_sucker.n.01', 'name': 'whale_sucker'}, {'id': 4973, 'synset': 'carangid_fish.n.01', 'name': 'carangid_fish'}, {'id': 4974, 'synset': 'jack.n.11', 'name': 'jack'}, {'id': 4975, 'synset': 'crevalle_jack.n.01', 'name': 'crevalle_jack'}, {'id': 4976, 'synset': 'yellow_jack.n.03', 'name': 'yellow_jack'}, {'id': 4977, 'synset': 'runner.n.10', 'name': 'runner'}, {'id': 4978, 'synset': 'rainbow_runner.n.01', 'name': 'rainbow_runner'}, {'id': 4979, 'synset': 'leatherjacket.n.02', 'name': 'leatherjacket'}, {'id': 4980, 'synset': 'threadfish.n.01', 'name': 'threadfish'}, {'id': 4981, 'synset': 'moonfish.n.01', 'name': 'moonfish'}, {'id': 4982, 'synset': 'lookdown.n.01', 'name': 'lookdown'}, {'id': 4983, 'synset': 'amberjack.n.01', 'name': 'amberjack'}, {'id': 4984, 'synset': 'yellowtail.n.02', 'name': 'yellowtail'}, {'id': 4985, 'synset': 'kingfish.n.05', 'name': 'kingfish'}, {'id': 4986, 'synset': 'pompano.n.02', 'name': 'pompano'}, {'id': 4987, 'synset': 'florida_pompano.n.01', 'name': 'Florida_pompano'}, {'id': 4988, 'synset': 'permit.n.03', 'name': 'permit'}, {'id': 4989, 'synset': 'scad.n.01', 'name': 'scad'}, {'id': 4990, 'synset': 'horse_mackerel.n.03', 'name': 'horse_mackerel'}, {'id': 4991, 'synset': 'horse_mackerel.n.02', 'name': 'horse_mackerel'}, {'id': 4992, 'synset': 'bigeye_scad.n.01', 'name': 'bigeye_scad'}, {'id': 4993, 'synset': 'mackerel_scad.n.01', 'name': 'mackerel_scad'}, {'id': 4994, 'synset': 'round_scad.n.01', 'name': 'round_scad'}, {'id': 4995, 'synset': 'dolphinfish.n.02', 'name': 'dolphinfish'}, {'id': 4996, 'synset': 'coryphaena_hippurus.n.01', 'name': 'Coryphaena_hippurus'}, {'id': 4997, 'synset': 'coryphaena_equisetis.n.01', 'name': 'Coryphaena_equisetis'}, {'id': 4998, 'synset': 'pomfret.n.01', 'name': 'pomfret'}, {'id': 4999, 'synset': 'characin.n.01', 'name': 'characin'}, {'id': 5000, 'synset': 'tetra.n.01', 'name': 'tetra'}, {'id': 5001, 'synset': 'cardinal_tetra.n.01', 'name': 'cardinal_tetra'}, {'id': 5002, 'synset': 'piranha.n.02', 'name': 'piranha'}, {'id': 5003, 'synset': 'cichlid.n.01', 'name': 'cichlid'}, {'id': 5004, 'synset': 'bolti.n.01', 'name': 'bolti'}, {'id': 5005, 'synset': 'snapper.n.05', 'name': 'snapper'}, {'id': 5006, 'synset': 'red_snapper.n.02', 'name': 'red_snapper'}, {'id': 5007, 'synset': 'grey_snapper.n.01', 'name': 'grey_snapper'}, {'id': 5008, 'synset': 'mutton_snapper.n.01', 'name': 'mutton_snapper'}, {'id': 5009, 'synset': 'schoolmaster.n.03', 'name': 'schoolmaster'}, {'id': 5010, 'synset': 'yellowtail.n.01', 'name': 'yellowtail'}, {'id': 5011, 'synset': 'grunt.n.03', 'name': 'grunt'}, {'id': 5012, 'synset': 'margate.n.01', 'name': 'margate'}, {'id': 5013, 'synset': 'spanish_grunt.n.01', 'name': 'Spanish_grunt'}, {'id': 5014, 'synset': 'tomtate.n.01', 'name': 'tomtate'}, {'id': 5015, 'synset': 'cottonwick.n.01', 'name': 'cottonwick'}, {'id': 5016, 'synset': "sailor's-choice.n.02", 'name': "sailor's-choice"}, {'id': 5017, 'synset': 'porkfish.n.01', 'name': 'porkfish'}, {'id': 5018, 'synset': 'pompon.n.02', 'name': 'pompon'}, {'id': 5019, 'synset': 'pigfish.n.02', 'name': 'pigfish'}, {'id': 5020, 'synset': 'sparid.n.01', 'name': 'sparid'}, {'id': 5021, 'synset': 'sea_bream.n.02', 'name': 'sea_bream'}, {'id': 5022, 'synset': 'porgy.n.02', 'name': 'porgy'}, {'id': 5023, 'synset': 'red_porgy.n.01', 'name': 'red_porgy'}, {'id': 5024, 'synset': 'european_sea_bream.n.01', 'name': 'European_sea_bream'}, {'id': 5025, 'synset': 'atlantic_sea_bream.n.01', 'name': 'Atlantic_sea_bream'}, {'id': 5026, 'synset': 'sheepshead.n.01', 'name': 'sheepshead'}, {'id': 5027, 'synset': 'pinfish.n.01', 'name': 'pinfish'}, {'id': 5028, 'synset': 'sheepshead_porgy.n.01', 'name': 'sheepshead_porgy'}, {'id': 5029, 'synset': 'snapper.n.04', 'name': 'snapper'}, {'id': 5030, 'synset': 'black_bream.n.01', 'name': 'black_bream'}, {'id': 5031, 'synset': 'scup.n.04', 'name': 'scup'}, {'id': 5032, 'synset': 'scup.n.03', 'name': 'scup'}, {'id': 5033, 'synset': 'sciaenid_fish.n.01', 'name': 'sciaenid_fish'}, {'id': 5034, 'synset': 'striped_drum.n.01', 'name': 'striped_drum'}, {'id': 5035, 'synset': 'jackknife-fish.n.01', 'name': 'jackknife-fish'}, {'id': 5036, 'synset': 'silver_perch.n.01', 'name': 'silver_perch'}, {'id': 5037, 'synset': 'red_drum.n.01', 'name': 'red_drum'}, {'id': 5038, 'synset': 'mulloway.n.01', 'name': 'mulloway'}, {'id': 5039, 'synset': 'maigre.n.01', 'name': 'maigre'}, {'id': 5040, 'synset': 'croaker.n.02', 'name': 'croaker'}, {'id': 5041, 'synset': 'atlantic_croaker.n.01', 'name': 'Atlantic_croaker'}, {'id': 5042, 'synset': 'yellowfin_croaker.n.01', 'name': 'yellowfin_croaker'}, {'id': 5043, 'synset': 'whiting.n.04', 'name': 'whiting'}, {'id': 5044, 'synset': 'kingfish.n.04', 'name': 'kingfish'}, {'id': 5045, 'synset': 'king_whiting.n.01', 'name': 'king_whiting'}, {'id': 5046, 'synset': 'northern_whiting.n.01', 'name': 'northern_whiting'}, {'id': 5047, 'synset': 'corbina.n.01', 'name': 'corbina'}, {'id': 5048, 'synset': 'white_croaker.n.02', 'name': 'white_croaker'}, {'id': 5049, 'synset': 'white_croaker.n.01', 'name': 'white_croaker'}, {'id': 5050, 'synset': 'sea_trout.n.02', 'name': 'sea_trout'}, {'id': 5051, 'synset': 'weakfish.n.02', 'name': 'weakfish'}, {'id': 5052, 'synset': 'spotted_weakfish.n.01', 'name': 'spotted_weakfish'}, {'id': 5053, 'synset': 'mullet.n.03', 'name': 'mullet'}, {'id': 5054, 'synset': 'goatfish.n.01', 'name': 'goatfish'}, {'id': 5055, 'synset': 'red_goatfish.n.01', 'name': 'red_goatfish'}, {'id': 5056, 'synset': 'yellow_goatfish.n.01', 'name': 'yellow_goatfish'}, {'id': 5057, 'synset': 'mullet.n.02', 'name': 'mullet'}, {'id': 5058, 'synset': 'striped_mullet.n.01', 'name': 'striped_mullet'}, {'id': 5059, 'synset': 'white_mullet.n.01', 'name': 'white_mullet'}, {'id': 5060, 'synset': 'liza.n.01', 'name': 'liza'}, {'id': 5061, 'synset': 'silversides.n.01', 'name': 'silversides'}, {'id': 5062, 'synset': 'jacksmelt.n.01', 'name': 'jacksmelt'}, {'id': 5063, 'synset': 'barracuda.n.01', 'name': 'barracuda'}, {'id': 5064, 'synset': 'great_barracuda.n.01', 'name': 'great_barracuda'}, {'id': 5065, 'synset': 'sweeper.n.03', 'name': 'sweeper'}, {'id': 5066, 'synset': 'sea_chub.n.01', 'name': 'sea_chub'}, {'id': 5067, 'synset': 'bermuda_chub.n.01', 'name': 'Bermuda_chub'}, {'id': 5068, 'synset': 'spadefish.n.01', 'name': 'spadefish'}, {'id': 5069, 'synset': 'butterfly_fish.n.01', 'name': 'butterfly_fish'}, {'id': 5070, 'synset': 'chaetodon.n.01', 'name': 'chaetodon'}, {'id': 5071, 'synset': 'angelfish.n.01', 'name': 'angelfish'}, {'id': 5072, 'synset': 'rock_beauty.n.01', 'name': 'rock_beauty'}, {'id': 5073, 'synset': 'damselfish.n.01', 'name': 'damselfish'}, {'id': 5074, 'synset': 'beaugregory.n.01', 'name': 'beaugregory'}, {'id': 5075, 'synset': 'anemone_fish.n.01', 'name': 'anemone_fish'}, {'id': 5076, 'synset': 'clown_anemone_fish.n.01', 'name': 'clown_anemone_fish'}, {'id': 5077, 'synset': 'sergeant_major.n.02', 'name': 'sergeant_major'}, {'id': 5078, 'synset': 'wrasse.n.01', 'name': 'wrasse'}, {'id': 5079, 'synset': 'pigfish.n.01', 'name': 'pigfish'}, {'id': 5080, 'synset': 'hogfish.n.01', 'name': 'hogfish'}, {'id': 5081, 'synset': 'slippery_dick.n.01', 'name': 'slippery_dick'}, {'id': 5082, 'synset': 'puddingwife.n.01', 'name': 'puddingwife'}, {'id': 5083, 'synset': 'bluehead.n.01', 'name': 'bluehead'}, {'id': 5084, 'synset': 'pearly_razorfish.n.01', 'name': 'pearly_razorfish'}, {'id': 5085, 'synset': 'tautog.n.01', 'name': 'tautog'}, {'id': 5086, 'synset': 'cunner.n.01', 'name': 'cunner'}, {'id': 5087, 'synset': 'parrotfish.n.01', 'name': 'parrotfish'}, {'id': 5088, 'synset': 'threadfin.n.01', 'name': 'threadfin'}, {'id': 5089, 'synset': 'jawfish.n.01', 'name': 'jawfish'}, {'id': 5090, 'synset': 'stargazer.n.03', 'name': 'stargazer'}, {'id': 5091, 'synset': 'sand_stargazer.n.01', 'name': 'sand_stargazer'}, {'id': 5092, 'synset': 'blenny.n.01', 'name': 'blenny'}, {'id': 5093, 'synset': 'shanny.n.01', 'name': 'shanny'}, {'id': 5094, 'synset': 'molly_miller.n.01', 'name': 'Molly_Miller'}, {'id': 5095, 'synset': 'clinid.n.01', 'name': 'clinid'}, {'id': 5096, 'synset': 'pikeblenny.n.01', 'name': 'pikeblenny'}, {'id': 5097, 'synset': 'bluethroat_pikeblenny.n.01', 'name': 'bluethroat_pikeblenny'}, {'id': 5098, 'synset': 'gunnel.n.02', 'name': 'gunnel'}, {'id': 5099, 'synset': 'rock_gunnel.n.01', 'name': 'rock_gunnel'}, {'id': 5100, 'synset': 'eelblenny.n.01', 'name': 'eelblenny'}, {'id': 5101, 'synset': 'wrymouth.n.01', 'name': 'wrymouth'}, {'id': 5102, 'synset': 'wolffish.n.01', 'name': 'wolffish'}, {'id': 5103, 'synset': 'viviparous_eelpout.n.01', 'name': 'viviparous_eelpout'}, {'id': 5104, 'synset': 'ocean_pout.n.01', 'name': 'ocean_pout'}, {'id': 5105, 'synset': 'sand_lance.n.01', 'name': 'sand_lance'}, {'id': 5106, 'synset': 'dragonet.n.01', 'name': 'dragonet'}, {'id': 5107, 'synset': 'goby.n.01', 'name': 'goby'}, {'id': 5108, 'synset': 'mudskipper.n.01', 'name': 'mudskipper'}, {'id': 5109, 'synset': 'sleeper.n.08', 'name': 'sleeper'}, {'id': 5110, 'synset': 'flathead.n.02', 'name': 'flathead'}, {'id': 5111, 'synset': 'archerfish.n.01', 'name': 'archerfish'}, {'id': 5112, 'synset': 'surgeonfish.n.01', 'name': 'surgeonfish'}, {'id': 5113, 'synset': 'gempylid.n.01', 'name': 'gempylid'}, {'id': 5114, 'synset': 'snake_mackerel.n.01', 'name': 'snake_mackerel'}, {'id': 5115, 'synset': 'escolar.n.01', 'name': 'escolar'}, {'id': 5116, 'synset': 'oilfish.n.01', 'name': 'oilfish'}, {'id': 5117, 'synset': 'cutlassfish.n.01', 'name': 'cutlassfish'}, {'id': 5118, 'synset': 'scombroid.n.01', 'name': 'scombroid'}, {'id': 5119, 'synset': 'mackerel.n.02', 'name': 'mackerel'}, {'id': 5120, 'synset': 'common_mackerel.n.01', 'name': 'common_mackerel'}, {'id': 5121, 'synset': 'spanish_mackerel.n.03', 'name': 'Spanish_mackerel'}, {'id': 5122, 'synset': 'chub_mackerel.n.01', 'name': 'chub_mackerel'}, {'id': 5123, 'synset': 'wahoo.n.03', 'name': 'wahoo'}, {'id': 5124, 'synset': 'spanish_mackerel.n.02', 'name': 'Spanish_mackerel'}, {'id': 5125, 'synset': 'king_mackerel.n.01', 'name': 'king_mackerel'}, {'id': 5126, 'synset': 'scomberomorus_maculatus.n.01', 'name': 'Scomberomorus_maculatus'}, {'id': 5127, 'synset': 'cero.n.01', 'name': 'cero'}, {'id': 5128, 'synset': 'sierra.n.02', 'name': 'sierra'}, {'id': 5129, 'synset': 'tuna.n.03', 'name': 'tuna'}, {'id': 5130, 'synset': 'albacore.n.02', 'name': 'albacore'}, {'id': 5131, 'synset': 'bluefin.n.02', 'name': 'bluefin'}, {'id': 5132, 'synset': 'yellowfin.n.01', 'name': 'yellowfin'}, {'id': 5133, 'synset': 'bonito.n.03', 'name': 'bonito'}, {'id': 5134, 'synset': 'skipjack.n.02', 'name': 'skipjack'}, {'id': 5135, 'synset': 'chile_bonito.n.01', 'name': 'Chile_bonito'}, {'id': 5136, 'synset': 'skipjack.n.01', 'name': 'skipjack'}, {'id': 5137, 'synset': 'bonito.n.02', 'name': 'bonito'}, {'id': 5138, 'synset': 'swordfish.n.02', 'name': 'swordfish'}, {'id': 5139, 'synset': 'sailfish.n.02', 'name': 'sailfish'}, {'id': 5140, 'synset': 'atlantic_sailfish.n.01', 'name': 'Atlantic_sailfish'}, {'id': 5141, 'synset': 'billfish.n.02', 'name': 'billfish'}, {'id': 5142, 'synset': 'marlin.n.01', 'name': 'marlin'}, {'id': 5143, 'synset': 'blue_marlin.n.01', 'name': 'blue_marlin'}, {'id': 5144, 'synset': 'black_marlin.n.01', 'name': 'black_marlin'}, {'id': 5145, 'synset': 'striped_marlin.n.01', 'name': 'striped_marlin'}, {'id': 5146, 'synset': 'white_marlin.n.01', 'name': 'white_marlin'}, {'id': 5147, 'synset': 'spearfish.n.01', 'name': 'spearfish'}, {'id': 5148, 'synset': 'louvar.n.01', 'name': 'louvar'}, {'id': 5149, 'synset': 'dollarfish.n.01', 'name': 'dollarfish'}, {'id': 5150, 'synset': 'palometa.n.01', 'name': 'palometa'}, {'id': 5151, 'synset': 'harvestfish.n.01', 'name': 'harvestfish'}, {'id': 5152, 'synset': 'driftfish.n.01', 'name': 'driftfish'}, {'id': 5153, 'synset': 'barrelfish.n.01', 'name': 'barrelfish'}, {'id': 5154, 'synset': 'clingfish.n.01', 'name': 'clingfish'}, {'id': 5155, 'synset': 'tripletail.n.01', 'name': 'tripletail'}, {'id': 5156, 'synset': 'atlantic_tripletail.n.01', 'name': 'Atlantic_tripletail'}, {'id': 5157, 'synset': 'pacific_tripletail.n.01', 'name': 'Pacific_tripletail'}, {'id': 5158, 'synset': 'mojarra.n.01', 'name': 'mojarra'}, {'id': 5159, 'synset': 'yellowfin_mojarra.n.01', 'name': 'yellowfin_mojarra'}, {'id': 5160, 'synset': 'silver_jenny.n.01', 'name': 'silver_jenny'}, {'id': 5161, 'synset': 'whiting.n.03', 'name': 'whiting'}, {'id': 5162, 'synset': 'ganoid.n.01', 'name': 'ganoid'}, {'id': 5163, 'synset': 'bowfin.n.01', 'name': 'bowfin'}, {'id': 5164, 'synset': 'paddlefish.n.01', 'name': 'paddlefish'}, {'id': 5165, 'synset': 'chinese_paddlefish.n.01', 'name': 'Chinese_paddlefish'}, {'id': 5166, 'synset': 'sturgeon.n.01', 'name': 'sturgeon'}, {'id': 5167, 'synset': 'pacific_sturgeon.n.01', 'name': 'Pacific_sturgeon'}, {'id': 5168, 'synset': 'beluga.n.01', 'name': 'beluga'}, {'id': 5169, 'synset': 'gar.n.01', 'name': 'gar'}, {'id': 5170, 'synset': 'scorpaenoid.n.01', 'name': 'scorpaenoid'}, {'id': 5171, 'synset': 'scorpaenid.n.01', 'name': 'scorpaenid'}, {'id': 5172, 'synset': 'scorpionfish.n.01', 'name': 'scorpionfish'}, {'id': 5173, 'synset': 'plumed_scorpionfish.n.01', 'name': 'plumed_scorpionfish'}, {'id': 5174, 'synset': 'lionfish.n.01', 'name': 'lionfish'}, {'id': 5175, 'synset': 'stonefish.n.01', 'name': 'stonefish'}, {'id': 5176, 'synset': 'rockfish.n.02', 'name': 'rockfish'}, {'id': 5177, 'synset': 'copper_rockfish.n.01', 'name': 'copper_rockfish'}, {'id': 5178, 'synset': 'vermillion_rockfish.n.01', 'name': 'vermillion_rockfish'}, {'id': 5179, 'synset': 'red_rockfish.n.02', 'name': 'red_rockfish'}, {'id': 5180, 'synset': 'rosefish.n.02', 'name': 'rosefish'}, {'id': 5181, 'synset': 'bullhead.n.01', 'name': 'bullhead'}, {'id': 5182, 'synset': "miller's-thumb.n.01", 'name': "miller's-thumb"}, {'id': 5183, 'synset': 'sea_raven.n.01', 'name': 'sea_raven'}, {'id': 5184, 'synset': 'lumpfish.n.01', 'name': 'lumpfish'}, {'id': 5185, 'synset': 'lumpsucker.n.01', 'name': 'lumpsucker'}, {'id': 5186, 'synset': 'pogge.n.01', 'name': 'pogge'}, {'id': 5187, 'synset': 'greenling.n.01', 'name': 'greenling'}, {'id': 5188, 'synset': 'kelp_greenling.n.01', 'name': 'kelp_greenling'}, {'id': 5189, 'synset': 'painted_greenling.n.01', 'name': 'painted_greenling'}, {'id': 5190, 'synset': 'flathead.n.01', 'name': 'flathead'}, {'id': 5191, 'synset': 'gurnard.n.01', 'name': 'gurnard'}, {'id': 5192, 'synset': 'tub_gurnard.n.01', 'name': 'tub_gurnard'}, {'id': 5193, 'synset': 'sea_robin.n.01', 'name': 'sea_robin'}, {'id': 5194, 'synset': 'northern_sea_robin.n.01', 'name': 'northern_sea_robin'}, {'id': 5195, 'synset': 'flying_gurnard.n.01', 'name': 'flying_gurnard'}, {'id': 5196, 'synset': 'plectognath.n.01', 'name': 'plectognath'}, {'id': 5197, 'synset': 'triggerfish.n.01', 'name': 'triggerfish'}, {'id': 5198, 'synset': 'queen_triggerfish.n.01', 'name': 'queen_triggerfish'}, {'id': 5199, 'synset': 'filefish.n.01', 'name': 'filefish'}, {'id': 5200, 'synset': 'leatherjacket.n.01', 'name': 'leatherjacket'}, {'id': 5201, 'synset': 'boxfish.n.01', 'name': 'boxfish'}, {'id': 5202, 'synset': 'cowfish.n.01', 'name': 'cowfish'}, {'id': 5203, 'synset': 'spiny_puffer.n.01', 'name': 'spiny_puffer'}, {'id': 5204, 'synset': 'porcupinefish.n.01', 'name': 'porcupinefish'}, {'id': 5205, 'synset': 'balloonfish.n.01', 'name': 'balloonfish'}, {'id': 5206, 'synset': 'burrfish.n.01', 'name': 'burrfish'}, {'id': 5207, 'synset': 'ocean_sunfish.n.01', 'name': 'ocean_sunfish'}, {'id': 5208, 'synset': 'sharptail_mola.n.01', 'name': 'sharptail_mola'}, {'id': 5209, 'synset': 'flatfish.n.02', 'name': 'flatfish'}, {'id': 5210, 'synset': 'flounder.n.02', 'name': 'flounder'}, {'id': 5211, 'synset': 'righteye_flounder.n.01', 'name': 'righteye_flounder'}, {'id': 5212, 'synset': 'plaice.n.02', 'name': 'plaice'}, {'id': 5213, 'synset': 'european_flatfish.n.01', 'name': 'European_flatfish'}, {'id': 5214, 'synset': 'yellowtail_flounder.n.02', 'name': 'yellowtail_flounder'}, {'id': 5215, 'synset': 'winter_flounder.n.02', 'name': 'winter_flounder'}, {'id': 5216, 'synset': 'lemon_sole.n.05', 'name': 'lemon_sole'}, {'id': 5217, 'synset': 'american_plaice.n.01', 'name': 'American_plaice'}, {'id': 5218, 'synset': 'halibut.n.02', 'name': 'halibut'}, {'id': 5219, 'synset': 'atlantic_halibut.n.01', 'name': 'Atlantic_halibut'}, {'id': 5220, 'synset': 'pacific_halibut.n.01', 'name': 'Pacific_halibut'}, {'id': 5221, 'synset': 'lefteye_flounder.n.01', 'name': 'lefteye_flounder'}, {'id': 5222, 'synset': 'southern_flounder.n.01', 'name': 'southern_flounder'}, {'id': 5223, 'synset': 'summer_flounder.n.01', 'name': 'summer_flounder'}, {'id': 5224, 'synset': 'whiff.n.02', 'name': 'whiff'}, {'id': 5225, 'synset': 'horned_whiff.n.01', 'name': 'horned_whiff'}, {'id': 5226, 'synset': 'sand_dab.n.02', 'name': 'sand_dab'}, {'id': 5227, 'synset': 'windowpane.n.02', 'name': 'windowpane'}, {'id': 5228, 'synset': 'brill.n.01', 'name': 'brill'}, {'id': 5229, 'synset': 'turbot.n.02', 'name': 'turbot'}, {'id': 5230, 'synset': 'tonguefish.n.01', 'name': 'tonguefish'}, {'id': 5231, 'synset': 'sole.n.04', 'name': 'sole'}, {'id': 5232, 'synset': 'european_sole.n.01', 'name': 'European_sole'}, {'id': 5233, 'synset': 'english_sole.n.02', 'name': 'English_sole'}, {'id': 5234, 'synset': 'hogchoker.n.01', 'name': 'hogchoker'}, {'id': 5235, 'synset': 'aba.n.02', 'name': 'aba'}, {'id': 5236, 'synset': 'abacus.n.02', 'name': 'abacus'}, {'id': 5237, 'synset': 'abandoned_ship.n.01', 'name': 'abandoned_ship'}, {'id': 5238, 'synset': 'a_battery.n.01', 'name': 'A_battery'}, {'id': 5239, 'synset': 'abattoir.n.01', 'name': 'abattoir'}, {'id': 5240, 'synset': 'abaya.n.01', 'name': 'abaya'}, {'id': 5241, 'synset': 'abbe_condenser.n.01', 'name': 'Abbe_condenser'}, {'id': 5242, 'synset': 'abbey.n.03', 'name': 'abbey'}, {'id': 5243, 'synset': 'abbey.n.02', 'name': 'abbey'}, {'id': 5244, 'synset': 'abbey.n.01', 'name': 'abbey'}, {'id': 5245, 'synset': 'abney_level.n.01', 'name': 'Abney_level'}, {'id': 5246, 'synset': 'abrader.n.01', 'name': 'abrader'}, {'id': 5247, 'synset': 'abrading_stone.n.01', 'name': 'abrading_stone'}, {'id': 5248, 'synset': 'abutment.n.02', 'name': 'abutment'}, {'id': 5249, 'synset': 'abutment_arch.n.01', 'name': 'abutment_arch'}, {'id': 5250, 'synset': 'academic_costume.n.01', 'name': 'academic_costume'}, {'id': 5251, 'synset': 'academic_gown.n.01', 'name': 'academic_gown'}, {'id': 5252, 'synset': 'accelerator.n.02', 'name': 'accelerator'}, {'id': 5253, 'synset': 'accelerator.n.04', 'name': 'accelerator'}, {'id': 5254, 'synset': 'accelerator.n.01', 'name': 'accelerator'}, {'id': 5255, 'synset': 'accelerometer.n.01', 'name': 'accelerometer'}, {'id': 5256, 'synset': 'accessory.n.01', 'name': 'accessory'}, {'id': 5257, 'synset': 'accommodating_lens_implant.n.01', 'name': 'accommodating_lens_implant'}, {'id': 5258, 'synset': 'accommodation.n.04', 'name': 'accommodation'}, {'id': 5259, 'synset': 'accordion.n.01', 'name': 'accordion'}, {'id': 5260, 'synset': 'acetate_disk.n.01', 'name': 'acetate_disk'}, {'id': 5261, 'synset': 'acetate_rayon.n.01', 'name': 'acetate_rayon'}, {'id': 5262, 'synset': 'achromatic_lens.n.01', 'name': 'achromatic_lens'}, {'id': 5263, 'synset': 'acoustic_delay_line.n.01', 'name': 'acoustic_delay_line'}, {'id': 5264, 'synset': 'acoustic_device.n.01', 'name': 'acoustic_device'}, {'id': 5265, 'synset': 'acoustic_guitar.n.01', 'name': 'acoustic_guitar'}, {'id': 5266, 'synset': 'acoustic_modem.n.01', 'name': 'acoustic_modem'}, {'id': 5267, 'synset': 'acropolis.n.01', 'name': 'acropolis'}, {'id': 5268, 'synset': 'acrylic.n.04', 'name': 'acrylic'}, {'id': 5269, 'synset': 'acrylic.n.03', 'name': 'acrylic'}, {'id': 5270, 'synset': 'actinometer.n.01', 'name': 'actinometer'}, {'id': 5271, 'synset': 'action.n.07', 'name': 'action'}, {'id': 5272, 'synset': 'active_matrix_screen.n.01', 'name': 'active_matrix_screen'}, {'id': 5273, 'synset': 'actuator.n.01', 'name': 'actuator'}, {'id': 5274, 'synset': 'adapter.n.02', 'name': 'adapter'}, {'id': 5275, 'synset': 'adder.n.02', 'name': 'adder'}, {'id': 5276, 'synset': 'adding_machine.n.01', 'name': 'adding_machine'}, {'id': 5277, 'synset': 'addressing_machine.n.01', 'name': 'addressing_machine'}, {'id': 5278, 'synset': 'adhesive_bandage.n.01', 'name': 'adhesive_bandage'}, {'id': 5279, 'synset': 'adit.n.01', 'name': 'adit'}, {'id': 5280, 'synset': 'adjoining_room.n.01', 'name': 'adjoining_room'}, {'id': 5281, 'synset': 'adjustable_wrench.n.01', 'name': 'adjustable_wrench'}, {'id': 5282, 'synset': 'adobe.n.02', 'name': 'adobe'}, {'id': 5283, 'synset': 'adz.n.01', 'name': 'adz'}, {'id': 5284, 'synset': 'aeolian_harp.n.01', 'name': 'aeolian_harp'}, {'id': 5285, 'synset': 'aerator.n.01', 'name': 'aerator'}, {'id': 5286, 'synset': 'aerial_torpedo.n.01', 'name': 'aerial_torpedo'}, {'id': 5287, 'synset': 'aertex.n.01', 'name': 'Aertex'}, {'id': 5288, 'synset': 'afghan.n.01', 'name': 'afghan'}, {'id': 5289, 'synset': 'afro-wig.n.01', 'name': 'Afro-wig'}, {'id': 5290, 'synset': 'afterburner.n.01', 'name': 'afterburner'}, {'id': 5291, 'synset': 'after-shave.n.01', 'name': 'after-shave'}, {'id': 5292, 'synset': 'agateware.n.01', 'name': 'agateware'}, {'id': 5293, 'synset': 'agglomerator.n.01', 'name': 'agglomerator'}, {'id': 5294, 'synset': 'aglet.n.02', 'name': 'aglet'}, {'id': 5295, 'synset': 'aglet.n.01', 'name': 'aglet'}, {'id': 5296, 'synset': 'agora.n.03', 'name': 'agora'}, {'id': 5297, 'synset': 'aigrette.n.01', 'name': 'aigrette'}, {'id': 5298, 'synset': 'aileron.n.01', 'name': 'aileron'}, {'id': 5299, 'synset': 'air_bag.n.01', 'name': 'air_bag'}, {'id': 5300, 'synset': 'airbrake.n.02', 'name': 'airbrake'}, {'id': 5301, 'synset': 'airbrush.n.01', 'name': 'airbrush'}, {'id': 5302, 'synset': 'airbus.n.01', 'name': 'airbus'}, {'id': 5303, 'synset': 'air_compressor.n.01', 'name': 'air_compressor'}, {'id': 5304, 'synset': 'aircraft.n.01', 'name': 'aircraft'}, {'id': 5305, 'synset': 'aircraft_carrier.n.01', 'name': 'aircraft_carrier'}, {'id': 5306, 'synset': 'aircraft_engine.n.01', 'name': 'aircraft_engine'}, {'id': 5307, 'synset': 'air_cushion.n.02', 'name': 'air_cushion'}, {'id': 5308, 'synset': 'airdock.n.01', 'name': 'airdock'}, {'id': 5309, 'synset': 'airfield.n.01', 'name': 'airfield'}, {'id': 5310, 'synset': 'air_filter.n.01', 'name': 'air_filter'}, {'id': 5311, 'synset': 'airfoil.n.01', 'name': 'airfoil'}, {'id': 5312, 'synset': 'airframe.n.01', 'name': 'airframe'}, {'id': 5313, 'synset': 'air_gun.n.01', 'name': 'air_gun'}, {'id': 5314, 'synset': 'air_hammer.n.01', 'name': 'air_hammer'}, {'id': 5315, 'synset': 'air_horn.n.01', 'name': 'air_horn'}, {'id': 5316, 'synset': 'airing_cupboard.n.01', 'name': 'airing_cupboard'}, {'id': 5317, 'synset': 'airliner.n.01', 'name': 'airliner'}, {'id': 5318, 'synset': 'airmailer.n.01', 'name': 'airmailer'}, {'id': 5319, 'synset': 'airplane_propeller.n.01', 'name': 'airplane_propeller'}, {'id': 5320, 'synset': 'airport.n.01', 'name': 'airport'}, {'id': 5321, 'synset': 'air_pump.n.01', 'name': 'air_pump'}, {'id': 5322, 'synset': 'air_search_radar.n.01', 'name': 'air_search_radar'}, {'id': 5323, 'synset': 'airship.n.01', 'name': 'airship'}, {'id': 5324, 'synset': 'air_terminal.n.01', 'name': 'air_terminal'}, {'id': 5325, 'synset': 'air-to-air_missile.n.01', 'name': 'air-to-air_missile'}, {'id': 5326, 'synset': 'air-to-ground_missile.n.01', 'name': 'air-to-ground_missile'}, {'id': 5327, 'synset': 'aisle.n.03', 'name': 'aisle'}, {'id': 5328, 'synset': "aladdin's_lamp.n.01", 'name': "Aladdin's_lamp"}, {'id': 5329, 'synset': 'alarm.n.02', 'name': 'alarm'}, {'id': 5330, 'synset': 'alb.n.01', 'name': 'alb'}, {'id': 5331, 'synset': 'alcazar.n.01', 'name': 'alcazar'}, {'id': 5332, 'synset': 'alcohol_thermometer.n.01', 'name': 'alcohol_thermometer'}, {'id': 5333, 'synset': 'alehouse.n.01', 'name': 'alehouse'}, {'id': 5334, 'synset': 'alembic.n.01', 'name': 'alembic'}, {'id': 5335, 'synset': 'algometer.n.01', 'name': 'algometer'}, {'id': 5336, 'synset': 'alidade.n.02', 'name': 'alidade'}, {'id': 5337, 'synset': 'alidade.n.01', 'name': 'alidade'}, {'id': 5338, 'synset': 'a-line.n.01', 'name': 'A-line'}, {'id': 5339, 'synset': 'allen_screw.n.01', 'name': 'Allen_screw'}, {'id': 5340, 'synset': 'allen_wrench.n.01', 'name': 'Allen_wrench'}, {'id': 5341, 'synset': 'alligator_wrench.n.01', 'name': 'alligator_wrench'}, {'id': 5342, 'synset': 'alms_dish.n.01', 'name': 'alms_dish'}, {'id': 5343, 'synset': 'alpaca.n.02', 'name': 'alpaca'}, {'id': 5344, 'synset': 'alpenstock.n.01', 'name': 'alpenstock'}, {'id': 5345, 'synset': 'altar.n.02', 'name': 'altar'}, {'id': 5346, 'synset': 'altar.n.01', 'name': 'altar'}, {'id': 5347, 'synset': 'altarpiece.n.01', 'name': 'altarpiece'}, {'id': 5348, 'synset': 'altazimuth.n.01', 'name': 'altazimuth'}, {'id': 5349, 'synset': 'alternator.n.01', 'name': 'alternator'}, {'id': 5350, 'synset': 'altimeter.n.01', 'name': 'altimeter'}, {'id': 5351, 'synset': 'amati.n.02', 'name': 'Amati'}, {'id': 5352, 'synset': 'amen_corner.n.01', 'name': 'amen_corner'}, {'id': 5353, 'synset': 'american_organ.n.01', 'name': 'American_organ'}, {'id': 5354, 'synset': 'ammeter.n.01', 'name': 'ammeter'}, {'id': 5355, 'synset': 'ammonia_clock.n.01', 'name': 'ammonia_clock'}, {'id': 5356, 'synset': 'ammunition.n.01', 'name': 'ammunition'}, {'id': 5357, 'synset': 'amphibian.n.02', 'name': 'amphibian'}, {'id': 5358, 'synset': 'amphibian.n.01', 'name': 'amphibian'}, {'id': 5359, 'synset': 'amphitheater.n.02', 'name': 'amphitheater'}, {'id': 5360, 'synset': 'amphitheater.n.01', 'name': 'amphitheater'}, {'id': 5361, 'synset': 'amphora.n.01', 'name': 'amphora'}, {'id': 5362, 'synset': 'ampulla.n.02', 'name': 'ampulla'}, {'id': 5363, 'synset': 'amusement_arcade.n.01', 'name': 'amusement_arcade'}, {'id': 5364, 'synset': 'analog_clock.n.01', 'name': 'analog_clock'}, {'id': 5365, 'synset': 'analog_computer.n.01', 'name': 'analog_computer'}, {'id': 5366, 'synset': 'analog_watch.n.01', 'name': 'analog_watch'}, {'id': 5367, 'synset': 'analytical_balance.n.01', 'name': 'analytical_balance'}, {'id': 5368, 'synset': 'analyzer.n.01', 'name': 'analyzer'}, {'id': 5369, 'synset': 'anamorphosis.n.02', 'name': 'anamorphosis'}, {'id': 5370, 'synset': 'anastigmat.n.01', 'name': 'anastigmat'}, {'id': 5371, 'synset': 'anchor.n.01', 'name': 'anchor'}, {'id': 5372, 'synset': 'anchor_chain.n.01', 'name': 'anchor_chain'}, {'id': 5373, 'synset': 'anchor_light.n.01', 'name': 'anchor_light'}, {'id': 5374, 'synset': 'and_circuit.n.01', 'name': 'AND_circuit'}, {'id': 5375, 'synset': 'andiron.n.01', 'name': 'andiron'}, {'id': 5376, 'synset': 'android.n.01', 'name': 'android'}, {'id': 5377, 'synset': 'anechoic_chamber.n.01', 'name': 'anechoic_chamber'}, {'id': 5378, 'synset': 'anemometer.n.01', 'name': 'anemometer'}, {'id': 5379, 'synset': 'aneroid_barometer.n.01', 'name': 'aneroid_barometer'}, {'id': 5380, 'synset': 'angiocardiogram.n.01', 'name': 'angiocardiogram'}, {'id': 5381, 'synset': 'angioscope.n.01', 'name': 'angioscope'}, {'id': 5382, 'synset': 'angle_bracket.n.02', 'name': 'angle_bracket'}, {'id': 5383, 'synset': 'angledozer.n.01', 'name': 'angledozer'}, {'id': 5384, 'synset': 'ankle_brace.n.01', 'name': 'ankle_brace'}, {'id': 5385, 'synset': 'anklet.n.02', 'name': 'anklet'}, {'id': 5386, 'synset': 'anklet.n.01', 'name': 'anklet'}, {'id': 5387, 'synset': 'ankus.n.01', 'name': 'ankus'}, {'id': 5388, 'synset': 'anode.n.01', 'name': 'anode'}, {'id': 5389, 'synset': 'anode.n.02', 'name': 'anode'}, {'id': 5390, 'synset': 'answering_machine.n.01', 'name': 'answering_machine'}, {'id': 5391, 'synset': 'anteroom.n.01', 'name': 'anteroom'}, {'id': 5392, 'synset': 'antiaircraft.n.01', 'name': 'antiaircraft'}, {'id': 5393, 'synset': 'antiballistic_missile.n.01', 'name': 'antiballistic_missile'}, {'id': 5394, 'synset': 'antifouling_paint.n.01', 'name': 'antifouling_paint'}, {'id': 5395, 'synset': 'anti-g_suit.n.01', 'name': 'anti-G_suit'}, {'id': 5396, 'synset': 'antimacassar.n.01', 'name': 'antimacassar'}, {'id': 5397, 'synset': 'antiperspirant.n.01', 'name': 'antiperspirant'}, {'id': 5398, 'synset': 'anti-submarine_rocket.n.01', 'name': 'anti-submarine_rocket'}, {'id': 5399, 'synset': 'anvil.n.01', 'name': 'anvil'}, {'id': 5400, 'synset': 'ao_dai.n.01', 'name': 'ao_dai'}, {'id': 5401, 'synset': 'apadana.n.01', 'name': 'apadana'}, {'id': 5402, 'synset': 'apartment.n.01', 'name': 'apartment'}, {'id': 5403, 'synset': 'apartment_building.n.01', 'name': 'apartment_building'}, {'id': 5404, 'synset': 'aperture.n.03', 'name': 'aperture'}, {'id': 5405, 'synset': 'aperture.n.01', 'name': 'aperture'}, {'id': 5406, 'synset': 'apiary.n.01', 'name': 'apiary'}, {'id': 5407, 'synset': 'apparatus.n.01', 'name': 'apparatus'}, {'id': 5408, 'synset': 'apparel.n.01', 'name': 'apparel'}, {'id': 5409, 'synset': 'applecart.n.02', 'name': 'applecart'}, {'id': 5410, 'synset': 'appliance.n.02', 'name': 'appliance'}, {'id': 5411, 'synset': 'appliance.n.01', 'name': 'appliance'}, {'id': 5412, 'synset': 'applicator.n.01', 'name': 'applicator'}, {'id': 5413, 'synset': 'appointment.n.03', 'name': 'appointment'}, {'id': 5414, 'synset': 'apron_string.n.01', 'name': 'apron_string'}, {'id': 5415, 'synset': 'apse.n.01', 'name': 'apse'}, {'id': 5416, 'synset': 'aqualung.n.01', 'name': 'aqualung'}, {'id': 5417, 'synset': 'aquaplane.n.01', 'name': 'aquaplane'}, {'id': 5418, 'synset': 'arabesque.n.02', 'name': 'arabesque'}, {'id': 5419, 'synset': 'arbor.n.03', 'name': 'arbor'}, {'id': 5420, 'synset': 'arcade.n.02', 'name': 'arcade'}, {'id': 5421, 'synset': 'arch.n.04', 'name': 'arch'}, {'id': 5422, 'synset': 'architecture.n.01', 'name': 'architecture'}, {'id': 5423, 'synset': 'architrave.n.02', 'name': 'architrave'}, {'id': 5424, 'synset': 'arch_support.n.01', 'name': 'arch_support'}, {'id': 5425, 'synset': 'arc_lamp.n.01', 'name': 'arc_lamp'}, {'id': 5426, 'synset': 'area.n.05', 'name': 'area'}, {'id': 5427, 'synset': 'areaway.n.01', 'name': 'areaway'}, {'id': 5428, 'synset': 'argyle.n.03', 'name': 'argyle'}, {'id': 5429, 'synset': 'ark.n.02', 'name': 'ark'}, {'id': 5430, 'synset': 'arm.n.04', 'name': 'arm'}, {'id': 5431, 'synset': 'armament.n.01', 'name': 'armament'}, {'id': 5432, 'synset': 'armature.n.01', 'name': 'armature'}, {'id': 5433, 'synset': 'armet.n.01', 'name': 'armet'}, {'id': 5434, 'synset': 'arm_guard.n.01', 'name': 'arm_guard'}, {'id': 5435, 'synset': 'armhole.n.01', 'name': 'armhole'}, {'id': 5436, 'synset': 'armilla.n.02', 'name': 'armilla'}, {'id': 5437, 'synset': 'armlet.n.01', 'name': 'armlet'}, {'id': 5438, 'synset': 'armored_car.n.02', 'name': 'armored_car'}, {'id': 5439, 'synset': 'armored_car.n.01', 'name': 'armored_car'}, {'id': 5440, 'synset': 'armored_personnel_carrier.n.01', 'name': 'armored_personnel_carrier'}, {'id': 5441, 'synset': 'armored_vehicle.n.01', 'name': 'armored_vehicle'}, {'id': 5442, 'synset': 'armor_plate.n.01', 'name': 'armor_plate'}, {'id': 5443, 'synset': 'armory.n.04', 'name': 'armory'}, {'id': 5444, 'synset': 'armrest.n.01', 'name': 'armrest'}, {'id': 5445, 'synset': 'arquebus.n.01', 'name': 'arquebus'}, {'id': 5446, 'synset': 'array.n.04', 'name': 'array'}, {'id': 5447, 'synset': 'array.n.03', 'name': 'array'}, {'id': 5448, 'synset': 'arrester.n.01', 'name': 'arrester'}, {'id': 5449, 'synset': 'arrow.n.02', 'name': 'arrow'}, {'id': 5450, 'synset': 'arsenal.n.01', 'name': 'arsenal'}, {'id': 5451, 'synset': 'arterial_road.n.01', 'name': 'arterial_road'}, {'id': 5452, 'synset': 'arthrogram.n.01', 'name': 'arthrogram'}, {'id': 5453, 'synset': 'arthroscope.n.01', 'name': 'arthroscope'}, {'id': 5454, 'synset': 'artificial_heart.n.01', 'name': 'artificial_heart'}, {'id': 5455, 'synset': 'artificial_horizon.n.01', 'name': 'artificial_horizon'}, {'id': 5456, 'synset': 'artificial_joint.n.01', 'name': 'artificial_joint'}, {'id': 5457, 'synset': 'artificial_kidney.n.01', 'name': 'artificial_kidney'}, {'id': 5458, 'synset': 'artificial_skin.n.01', 'name': 'artificial_skin'}, {'id': 5459, 'synset': 'artillery.n.01', 'name': 'artillery'}, {'id': 5460, 'synset': 'artillery_shell.n.01', 'name': 'artillery_shell'}, {'id': 5461, 'synset': "artist's_loft.n.01", 'name': "artist's_loft"}, {'id': 5462, 'synset': 'art_school.n.01', 'name': 'art_school'}, {'id': 5463, 'synset': 'ascot.n.01', 'name': 'ascot'}, {'id': 5464, 'synset': 'ash-pan.n.01', 'name': 'ash-pan'}, {'id': 5465, 'synset': 'aspergill.n.01', 'name': 'aspergill'}, {'id': 5466, 'synset': 'aspersorium.n.01', 'name': 'aspersorium'}, {'id': 5467, 'synset': 'aspirator.n.01', 'name': 'aspirator'}, {'id': 5468, 'synset': 'aspirin_powder.n.01', 'name': 'aspirin_powder'}, {'id': 5469, 'synset': 'assault_gun.n.02', 'name': 'assault_gun'}, {'id': 5470, 'synset': 'assault_rifle.n.01', 'name': 'assault_rifle'}, {'id': 5471, 'synset': 'assegai.n.01', 'name': 'assegai'}, {'id': 5472, 'synset': 'assembly.n.01', 'name': 'assembly'}, {'id': 5473, 'synset': 'assembly.n.05', 'name': 'assembly'}, {'id': 5474, 'synset': 'assembly_hall.n.01', 'name': 'assembly_hall'}, {'id': 5475, 'synset': 'assembly_plant.n.01', 'name': 'assembly_plant'}, {'id': 5476, 'synset': 'astatic_coils.n.01', 'name': 'astatic_coils'}, {'id': 5477, 'synset': 'astatic_galvanometer.n.01', 'name': 'astatic_galvanometer'}, {'id': 5478, 'synset': 'astrodome.n.01', 'name': 'astrodome'}, {'id': 5479, 'synset': 'astrolabe.n.01', 'name': 'astrolabe'}, {'id': 5480, 'synset': 'astronomical_telescope.n.01', 'name': 'astronomical_telescope'}, {'id': 5481, 'synset': 'astronomy_satellite.n.01', 'name': 'astronomy_satellite'}, {'id': 5482, 'synset': 'athenaeum.n.02', 'name': 'athenaeum'}, {'id': 5483, 'synset': 'athletic_sock.n.01', 'name': 'athletic_sock'}, {'id': 5484, 'synset': 'athletic_supporter.n.01', 'name': 'athletic_supporter'}, {'id': 5485, 'synset': 'atlas.n.04', 'name': 'atlas'}, {'id': 5486, 'synset': 'atmometer.n.01', 'name': 'atmometer'}, {'id': 5487, 'synset': 'atom_bomb.n.01', 'name': 'atom_bomb'}, {'id': 5488, 'synset': 'atomic_clock.n.01', 'name': 'atomic_clock'}, {'id': 5489, 'synset': 'atomic_pile.n.01', 'name': 'atomic_pile'}, {'id': 5490, 'synset': 'atrium.n.02', 'name': 'atrium'}, {'id': 5491, 'synset': 'attache_case.n.01', 'name': 'attache_case'}, {'id': 5492, 'synset': 'attachment.n.04', 'name': 'attachment'}, {'id': 5493, 'synset': 'attack_submarine.n.01', 'name': 'attack_submarine'}, {'id': 5494, 'synset': 'attenuator.n.01', 'name': 'attenuator'}, {'id': 5495, 'synset': 'attic.n.04', 'name': 'attic'}, {'id': 5496, 'synset': 'attic_fan.n.01', 'name': 'attic_fan'}, {'id': 5497, 'synset': 'attire.n.01', 'name': 'attire'}, {'id': 5498, 'synset': 'audio_amplifier.n.01', 'name': 'audio_amplifier'}, {'id': 5499, 'synset': 'audiocassette.n.01', 'name': 'audiocassette'}, {'id': 5500, 'synset': 'audio_cd.n.01', 'name': 'audio_CD'}, {'id': 5501, 'synset': 'audiometer.n.01', 'name': 'audiometer'}, {'id': 5502, 'synset': 'audio_system.n.01', 'name': 'audio_system'}, {'id': 5503, 'synset': 'audiotape.n.02', 'name': 'audiotape'}, {'id': 5504, 'synset': 'audiotape.n.01', 'name': 'audiotape'}, {'id': 5505, 'synset': 'audiovisual.n.01', 'name': 'audiovisual'}, {'id': 5506, 'synset': 'auditorium.n.01', 'name': 'auditorium'}, {'id': 5507, 'synset': 'auger.n.02', 'name': 'auger'}, {'id': 5508, 'synset': 'autobahn.n.01', 'name': 'autobahn'}, {'id': 5509, 'synset': 'autoclave.n.01', 'name': 'autoclave'}, {'id': 5510, 'synset': 'autofocus.n.01', 'name': 'autofocus'}, {'id': 5511, 'synset': 'autogiro.n.01', 'name': 'autogiro'}, {'id': 5512, 'synset': 'autoinjector.n.01', 'name': 'autoinjector'}, {'id': 5513, 'synset': 'autoloader.n.01', 'name': 'autoloader'}, {'id': 5514, 'synset': 'automat.n.02', 'name': 'automat'}, {'id': 5515, 'synset': 'automat.n.01', 'name': 'automat'}, {'id': 5516, 'synset': 'automatic_choke.n.01', 'name': 'automatic_choke'}, {'id': 5517, 'synset': 'automatic_firearm.n.01', 'name': 'automatic_firearm'}, {'id': 5518, 'synset': 'automatic_pistol.n.01', 'name': 'automatic_pistol'}, {'id': 5519, 'synset': 'automatic_rifle.n.01', 'name': 'automatic_rifle'}, {'id': 5520, 'synset': 'automatic_transmission.n.01', 'name': 'automatic_transmission'}, {'id': 5521, 'synset': 'automation.n.03', 'name': 'automation'}, {'id': 5522, 'synset': 'automaton.n.02', 'name': 'automaton'}, {'id': 5523, 'synset': 'automobile_engine.n.01', 'name': 'automobile_engine'}, {'id': 5524, 'synset': 'automobile_factory.n.01', 'name': 'automobile_factory'}, {'id': 5525, 'synset': 'automobile_horn.n.01', 'name': 'automobile_horn'}, {'id': 5526, 'synset': 'autopilot.n.02', 'name': 'autopilot'}, {'id': 5527, 'synset': 'autoradiograph.n.01', 'name': 'autoradiograph'}, {'id': 5528, 'synset': 'autostrada.n.01', 'name': 'autostrada'}, {'id': 5529, 'synset': 'auxiliary_boiler.n.01', 'name': 'auxiliary_boiler'}, {'id': 5530, 'synset': 'auxiliary_engine.n.01', 'name': 'auxiliary_engine'}, {'id': 5531, 'synset': 'auxiliary_pump.n.01', 'name': 'auxiliary_pump'}, {'id': 5532, 'synset': 'auxiliary_research_submarine.n.01', 'name': 'auxiliary_research_submarine'}, {'id': 5533, 'synset': 'auxiliary_storage.n.01', 'name': 'auxiliary_storage'}, {'id': 5534, 'synset': 'aviary.n.01', 'name': 'aviary'}, {'id': 5535, 'synset': 'awl.n.01', 'name': 'awl'}, {'id': 5536, 'synset': 'ax_handle.n.01', 'name': 'ax_handle'}, {'id': 5537, 'synset': 'ax_head.n.01', 'name': 'ax_head'}, {'id': 5538, 'synset': 'axis.n.06', 'name': 'axis'}, {'id': 5539, 'synset': 'axle.n.01', 'name': 'axle'}, {'id': 5540, 'synset': 'axle_bar.n.01', 'name': 'axle_bar'}, {'id': 5541, 'synset': 'axletree.n.01', 'name': 'axletree'}, {'id': 5542, 'synset': 'babushka.n.01', 'name': 'babushka'}, {'id': 5543, 'synset': 'baby_bed.n.01', 'name': 'baby_bed'}, {'id': 5544, 'synset': 'baby_grand.n.01', 'name': 'baby_grand'}, {'id': 5545, 'synset': 'baby_powder.n.01', 'name': 'baby_powder'}, {'id': 5546, 'synset': 'baby_shoe.n.01', 'name': 'baby_shoe'}, {'id': 5547, 'synset': 'back.n.08', 'name': 'back'}, {'id': 5548, 'synset': 'back.n.07', 'name': 'back'}, {'id': 5549, 'synset': 'backbench.n.01', 'name': 'backbench'}, {'id': 5550, 'synset': 'backboard.n.02', 'name': 'backboard'}, {'id': 5551, 'synset': 'backbone.n.05', 'name': 'backbone'}, {'id': 5552, 'synset': 'back_brace.n.01', 'name': 'back_brace'}, {'id': 5553, 'synset': 'backgammon_board.n.01', 'name': 'backgammon_board'}, {'id': 5554, 'synset': 'background.n.07', 'name': 'background'}, {'id': 5555, 'synset': 'backhoe.n.01', 'name': 'backhoe'}, {'id': 5556, 'synset': 'backlighting.n.01', 'name': 'backlighting'}, {'id': 5557, 'synset': 'backpacking_tent.n.01', 'name': 'backpacking_tent'}, {'id': 5558, 'synset': 'backplate.n.01', 'name': 'backplate'}, {'id': 5559, 'synset': 'back_porch.n.01', 'name': 'back_porch'}, {'id': 5560, 'synset': 'backsaw.n.01', 'name': 'backsaw'}, {'id': 5561, 'synset': 'backscratcher.n.02', 'name': 'backscratcher'}, {'id': 5562, 'synset': 'backseat.n.02', 'name': 'backseat'}, {'id': 5563, 'synset': 'backspace_key.n.01', 'name': 'backspace_key'}, {'id': 5564, 'synset': 'backstairs.n.01', 'name': 'backstairs'}, {'id': 5565, 'synset': 'backstay.n.01', 'name': 'backstay'}, {'id': 5566, 'synset': 'backstop.n.02', 'name': 'backstop'}, {'id': 5567, 'synset': 'backsword.n.02', 'name': 'backsword'}, {'id': 5568, 'synset': 'backup_system.n.01', 'name': 'backup_system'}, {'id': 5569, 'synset': 'badminton_court.n.01', 'name': 'badminton_court'}, {'id': 5570, 'synset': 'badminton_equipment.n.01', 'name': 'badminton_equipment'}, {'id': 5571, 'synset': 'badminton_racket.n.01', 'name': 'badminton_racket'}, {'id': 5572, 'synset': 'bag.n.01', 'name': 'bag'}, {'id': 5573, 'synset': 'baggage.n.01', 'name': 'baggage'}, {'id': 5574, 'synset': 'baggage.n.03', 'name': 'baggage'}, {'id': 5575, 'synset': 'baggage_car.n.01', 'name': 'baggage_car'}, {'id': 5576, 'synset': 'baggage_claim.n.01', 'name': 'baggage_claim'}, {'id': 5577, 'synset': 'bailey.n.04', 'name': 'bailey'}, {'id': 5578, 'synset': 'bailey.n.03', 'name': 'bailey'}, {'id': 5579, 'synset': 'bailey_bridge.n.01', 'name': 'Bailey_bridge'}, {'id': 5580, 'synset': 'bain-marie.n.01', 'name': 'bain-marie'}, {'id': 5581, 'synset': 'baize.n.01', 'name': 'baize'}, {'id': 5582, 'synset': 'bakery.n.01', 'name': 'bakery'}, {'id': 5583, 'synset': 'balaclava.n.01', 'name': 'balaclava'}, {'id': 5584, 'synset': 'balalaika.n.01', 'name': 'balalaika'}, {'id': 5585, 'synset': 'balance.n.12', 'name': 'balance'}, {'id': 5586, 'synset': 'balance_beam.n.01', 'name': 'balance_beam'}, {'id': 5587, 'synset': 'balance_wheel.n.01', 'name': 'balance_wheel'}, {'id': 5588, 'synset': 'balbriggan.n.01', 'name': 'balbriggan'}, {'id': 5589, 'synset': 'balcony.n.02', 'name': 'balcony'}, {'id': 5590, 'synset': 'balcony.n.01', 'name': 'balcony'}, {'id': 5591, 'synset': 'baldachin.n.01', 'name': 'baldachin'}, {'id': 5592, 'synset': 'baldric.n.01', 'name': 'baldric'}, {'id': 5593, 'synset': 'bale.n.01', 'name': 'bale'}, {'id': 5594, 'synset': 'baling_wire.n.01', 'name': 'baling_wire'}, {'id': 5595, 'synset': 'ball.n.01', 'name': 'ball'}, {'id': 5596, 'synset': 'ball_and_chain.n.01', 'name': 'ball_and_chain'}, {'id': 5597, 'synset': 'ball-and-socket_joint.n.02', 'name': 'ball-and-socket_joint'}, {'id': 5598, 'synset': 'ballast.n.05', 'name': 'ballast'}, {'id': 5599, 'synset': 'ball_bearing.n.01', 'name': 'ball_bearing'}, {'id': 5600, 'synset': 'ball_cartridge.n.01', 'name': 'ball_cartridge'}, {'id': 5601, 'synset': 'ballcock.n.01', 'name': 'ballcock'}, {'id': 5602, 'synset': 'balldress.n.01', 'name': 'balldress'}, {'id': 5603, 'synset': 'ball_gown.n.01', 'name': 'ball_gown'}, {'id': 5604, 'synset': 'ballistic_galvanometer.n.01', 'name': 'ballistic_galvanometer'}, {'id': 5605, 'synset': 'ballistic_missile.n.01', 'name': 'ballistic_missile'}, {'id': 5606, 'synset': 'ballistic_pendulum.n.01', 'name': 'ballistic_pendulum'}, {'id': 5607, 'synset': 'ballistocardiograph.n.01', 'name': 'ballistocardiograph'}, {'id': 5608, 'synset': 'balloon_bomb.n.01', 'name': 'balloon_bomb'}, {'id': 5609, 'synset': 'balloon_sail.n.01', 'name': 'balloon_sail'}, {'id': 5610, 'synset': 'ballot_box.n.01', 'name': 'ballot_box'}, {'id': 5611, 'synset': 'ballpark.n.01', 'name': 'ballpark'}, {'id': 5612, 'synset': 'ball-peen_hammer.n.01', 'name': 'ball-peen_hammer'}, {'id': 5613, 'synset': 'ballpoint.n.01', 'name': 'ballpoint'}, {'id': 5614, 'synset': 'ballroom.n.01', 'name': 'ballroom'}, {'id': 5615, 'synset': 'ball_valve.n.01', 'name': 'ball_valve'}, {'id': 5616, 'synset': 'balsa_raft.n.01', 'name': 'balsa_raft'}, {'id': 5617, 'synset': 'baluster.n.01', 'name': 'baluster'}, {'id': 5618, 'synset': 'banana_boat.n.01', 'name': 'banana_boat'}, {'id': 5619, 'synset': 'band.n.13', 'name': 'band'}, {'id': 5620, 'synset': 'bandbox.n.01', 'name': 'bandbox'}, {'id': 5621, 'synset': 'banderilla.n.01', 'name': 'banderilla'}, {'id': 5622, 'synset': 'bandoleer.n.01', 'name': 'bandoleer'}, {'id': 5623, 'synset': 'bandoneon.n.01', 'name': 'bandoneon'}, {'id': 5624, 'synset': 'bandsaw.n.01', 'name': 'bandsaw'}, {'id': 5625, 'synset': 'bandwagon.n.02', 'name': 'bandwagon'}, {'id': 5626, 'synset': 'bangalore_torpedo.n.01', 'name': 'bangalore_torpedo'}, {'id': 5627, 'synset': 'bangle.n.02', 'name': 'bangle'}, {'id': 5628, 'synset': 'bannister.n.02', 'name': 'bannister'}, {'id': 5629, 'synset': 'banquette.n.01', 'name': 'banquette'}, {'id': 5630, 'synset': 'banyan.n.02', 'name': 'banyan'}, {'id': 5631, 'synset': 'baptismal_font.n.01', 'name': 'baptismal_font'}, {'id': 5632, 'synset': 'bar.n.03', 'name': 'bar'}, {'id': 5633, 'synset': 'bar.n.02', 'name': 'bar'}, {'id': 5634, 'synset': 'barbecue.n.03', 'name': 'barbecue'}, {'id': 5635, 'synset': 'barbed_wire.n.01', 'name': 'barbed_wire'}, {'id': 5636, 'synset': 'barber_chair.n.01', 'name': 'barber_chair'}, {'id': 5637, 'synset': 'barbershop.n.01', 'name': 'barbershop'}, {'id': 5638, 'synset': 'barbette_carriage.n.01', 'name': 'barbette_carriage'}, {'id': 5639, 'synset': 'barbican.n.01', 'name': 'barbican'}, {'id': 5640, 'synset': 'bar_bit.n.01', 'name': 'bar_bit'}, {'id': 5641, 'synset': 'bareboat.n.01', 'name': 'bareboat'}, {'id': 5642, 'synset': 'barge_pole.n.01', 'name': 'barge_pole'}, {'id': 5643, 'synset': 'baritone.n.03', 'name': 'baritone'}, {'id': 5644, 'synset': 'bark.n.03', 'name': 'bark'}, {'id': 5645, 'synset': 'bar_magnet.n.01', 'name': 'bar_magnet'}, {'id': 5646, 'synset': 'bar_mask.n.01', 'name': 'bar_mask'}, {'id': 5647, 'synset': 'barn.n.01', 'name': 'barn'}, {'id': 5648, 'synset': 'barndoor.n.01', 'name': 'barndoor'}, {'id': 5649, 'synset': 'barn_door.n.01', 'name': 'barn_door'}, {'id': 5650, 'synset': 'barnyard.n.01', 'name': 'barnyard'}, {'id': 5651, 'synset': 'barograph.n.01', 'name': 'barograph'}, {'id': 5652, 'synset': 'barometer.n.01', 'name': 'barometer'}, {'id': 5653, 'synset': 'barong.n.01', 'name': 'barong'}, {'id': 5654, 'synset': 'barouche.n.01', 'name': 'barouche'}, {'id': 5655, 'synset': 'bar_printer.n.01', 'name': 'bar_printer'}, {'id': 5656, 'synset': 'barrack.n.01', 'name': 'barrack'}, {'id': 5657, 'synset': 'barrage_balloon.n.01', 'name': 'barrage_balloon'}, {'id': 5658, 'synset': 'barrel.n.01', 'name': 'barrel'}, {'id': 5659, 'synset': 'barrelhouse.n.01', 'name': 'barrelhouse'}, {'id': 5660, 'synset': 'barrel_knot.n.01', 'name': 'barrel_knot'}, {'id': 5661, 'synset': 'barrel_organ.n.01', 'name': 'barrel_organ'}, {'id': 5662, 'synset': 'barrel_vault.n.01', 'name': 'barrel_vault'}, {'id': 5663, 'synset': 'barricade.n.02', 'name': 'barricade'}, {'id': 5664, 'synset': 'barrier.n.01', 'name': 'barrier'}, {'id': 5665, 'synset': 'barroom.n.01', 'name': 'barroom'}, {'id': 5666, 'synset': 'bascule.n.01', 'name': 'bascule'}, {'id': 5667, 'synset': 'base.n.08', 'name': 'base'}, {'id': 5668, 'synset': 'baseball_equipment.n.01', 'name': 'baseball_equipment'}, {'id': 5669, 'synset': 'basement.n.01', 'name': 'basement'}, {'id': 5670, 'synset': 'basement.n.02', 'name': 'basement'}, {'id': 5671, 'synset': 'basic_point_defense_missile_system.n.01', 'name': 'basic_point_defense_missile_system'}, {'id': 5672, 'synset': 'basilica.n.02', 'name': 'basilica'}, {'id': 5673, 'synset': 'basilica.n.01', 'name': 'basilica'}, {'id': 5674, 'synset': 'basilisk.n.02', 'name': 'basilisk'}, {'id': 5675, 'synset': 'basin.n.01', 'name': 'basin'}, {'id': 5676, 'synset': 'basinet.n.01', 'name': 'basinet'}, {'id': 5677, 'synset': 'basket.n.03', 'name': 'basket'}, {'id': 5678, 'synset': 'basketball_court.n.01', 'name': 'basketball_court'}, {'id': 5679, 'synset': 'basketball_equipment.n.01', 'name': 'basketball_equipment'}, {'id': 5680, 'synset': 'basket_weave.n.01', 'name': 'basket_weave'}, {'id': 5681, 'synset': 'bass.n.07', 'name': 'bass'}, {'id': 5682, 'synset': 'bass_clarinet.n.01', 'name': 'bass_clarinet'}, {'id': 5683, 'synset': 'bass_drum.n.01', 'name': 'bass_drum'}, {'id': 5684, 'synset': 'basset_horn.n.01', 'name': 'basset_horn'}, {'id': 5685, 'synset': 'bass_fiddle.n.01', 'name': 'bass_fiddle'}, {'id': 5686, 'synset': 'bass_guitar.n.01', 'name': 'bass_guitar'}, {'id': 5687, 'synset': 'bassinet.n.01', 'name': 'bassinet'}, {'id': 5688, 'synset': 'bassinet.n.02', 'name': 'bassinet'}, {'id': 5689, 'synset': 'bassoon.n.01', 'name': 'bassoon'}, {'id': 5690, 'synset': 'baster.n.03', 'name': 'baster'}, {'id': 5691, 'synset': 'bastinado.n.01', 'name': 'bastinado'}, {'id': 5692, 'synset': 'bastion.n.03', 'name': 'bastion'}, {'id': 5693, 'synset': 'bastion.n.02', 'name': 'bastion'}, {'id': 5694, 'synset': 'bat.n.05', 'name': 'bat'}, {'id': 5695, 'synset': 'bath.n.01', 'name': 'bath'}, {'id': 5696, 'synset': 'bath_chair.n.01', 'name': 'bath_chair'}, {'id': 5697, 'synset': 'bathhouse.n.02', 'name': 'bathhouse'}, {'id': 5698, 'synset': 'bathhouse.n.01', 'name': 'bathhouse'}, {'id': 5699, 'synset': 'bathing_cap.n.01', 'name': 'bathing_cap'}, {'id': 5700, 'synset': 'bath_oil.n.01', 'name': 'bath_oil'}, {'id': 5701, 'synset': 'bathroom.n.01', 'name': 'bathroom'}, {'id': 5702, 'synset': 'bath_salts.n.01', 'name': 'bath_salts'}, {'id': 5703, 'synset': 'bathyscaphe.n.01', 'name': 'bathyscaphe'}, {'id': 5704, 'synset': 'bathysphere.n.01', 'name': 'bathysphere'}, {'id': 5705, 'synset': 'batik.n.01', 'name': 'batik'}, {'id': 5706, 'synset': 'batiste.n.01', 'name': 'batiste'}, {'id': 5707, 'synset': 'baton.n.01', 'name': 'baton'}, {'id': 5708, 'synset': 'baton.n.05', 'name': 'baton'}, {'id': 5709, 'synset': 'baton.n.04', 'name': 'baton'}, {'id': 5710, 'synset': 'baton.n.03', 'name': 'baton'}, {'id': 5711, 'synset': 'battering_ram.n.01', 'name': 'battering_ram'}, {'id': 5712, 'synset': "batter's_box.n.01", 'name': "batter's_box"}, {'id': 5713, 'synset': 'battery.n.05', 'name': 'battery'}, {'id': 5714, 'synset': 'batting_cage.n.01', 'name': 'batting_cage'}, {'id': 5715, 'synset': 'batting_glove.n.01', 'name': 'batting_glove'}, {'id': 5716, 'synset': 'batting_helmet.n.01', 'name': 'batting_helmet'}, {'id': 5717, 'synset': 'battle-ax.n.01', 'name': 'battle-ax'}, {'id': 5718, 'synset': 'battle_cruiser.n.01', 'name': 'battle_cruiser'}, {'id': 5719, 'synset': 'battle_dress.n.01', 'name': 'battle_dress'}, {'id': 5720, 'synset': 'battlement.n.01', 'name': 'battlement'}, {'id': 5721, 'synset': 'battleship.n.01', 'name': 'battleship'}, {'id': 5722, 'synset': 'battle_sight.n.01', 'name': 'battle_sight'}, {'id': 5723, 'synset': 'bay.n.05', 'name': 'bay'}, {'id': 5724, 'synset': 'bay.n.04', 'name': 'bay'}, {'id': 5725, 'synset': 'bayonet.n.01', 'name': 'bayonet'}, {'id': 5726, 'synset': 'bay_rum.n.01', 'name': 'bay_rum'}, {'id': 5727, 'synset': 'bay_window.n.02', 'name': 'bay_window'}, {'id': 5728, 'synset': 'bazaar.n.01', 'name': 'bazaar'}, {'id': 5729, 'synset': 'bazaar.n.02', 'name': 'bazaar'}, {'id': 5730, 'synset': 'bazooka.n.01', 'name': 'bazooka'}, {'id': 5731, 'synset': 'b_battery.n.01', 'name': 'B_battery'}, {'id': 5732, 'synset': 'bb_gun.n.01', 'name': 'BB_gun'}, {'id': 5733, 'synset': 'beach_house.n.01', 'name': 'beach_house'}, {'id': 5734, 'synset': 'beach_towel.n.01', 'name': 'beach_towel'}, {'id': 5735, 'synset': 'beach_wagon.n.01', 'name': 'beach_wagon'}, {'id': 5736, 'synset': 'beachwear.n.01', 'name': 'beachwear'}, {'id': 5737, 'synset': 'beacon.n.03', 'name': 'beacon'}, {'id': 5738, 'synset': 'beading_plane.n.01', 'name': 'beading_plane'}, {'id': 5739, 'synset': 'beaker.n.02', 'name': 'beaker'}, {'id': 5740, 'synset': 'beaker.n.01', 'name': 'beaker'}, {'id': 5741, 'synset': 'beam.n.02', 'name': 'beam'}, {'id': 5742, 'synset': 'beam_balance.n.01', 'name': 'beam_balance'}, {'id': 5743, 'synset': 'bearing.n.06', 'name': 'bearing'}, {'id': 5744, 'synset': 'bearing_rein.n.01', 'name': 'bearing_rein'}, {'id': 5745, 'synset': 'bearing_wall.n.01', 'name': 'bearing_wall'}, {'id': 5746, 'synset': 'bearskin.n.02', 'name': 'bearskin'}, {'id': 5747, 'synset': 'beater.n.02', 'name': 'beater'}, {'id': 5748, 'synset': 'beating-reed_instrument.n.01', 'name': 'beating-reed_instrument'}, {'id': 5749, 'synset': 'beaver.n.06', 'name': 'beaver'}, {'id': 5750, 'synset': 'beaver.n.05', 'name': 'beaver'}, {'id': 5751, 'synset': 'beckman_thermometer.n.01', 'name': 'Beckman_thermometer'}, {'id': 5752, 'synset': 'bed.n.08', 'name': 'bed'}, {'id': 5753, 'synset': 'bed_and_breakfast.n.01', 'name': 'bed_and_breakfast'}, {'id': 5754, 'synset': 'bedclothes.n.01', 'name': 'bedclothes'}, {'id': 5755, 'synset': 'bedford_cord.n.01', 'name': 'Bedford_cord'}, {'id': 5756, 'synset': 'bed_jacket.n.01', 'name': 'bed_jacket'}, {'id': 5757, 'synset': 'bedpost.n.01', 'name': 'bedpost'}, {'id': 5758, 'synset': 'bedroll.n.01', 'name': 'bedroll'}, {'id': 5759, 'synset': 'bedroom.n.01', 'name': 'bedroom'}, {'id': 5760, 'synset': 'bedroom_furniture.n.01', 'name': 'bedroom_furniture'}, {'id': 5761, 'synset': 'bedsitting_room.n.01', 'name': 'bedsitting_room'}, {'id': 5762, 'synset': 'bedspring.n.01', 'name': 'bedspring'}, {'id': 5763, 'synset': 'bedstead.n.01', 'name': 'bedstead'}, {'id': 5764, 'synset': 'beefcake.n.01', 'name': 'beefcake'}, {'id': 5765, 'synset': 'beehive.n.04', 'name': 'beehive'}, {'id': 5766, 'synset': 'beer_barrel.n.01', 'name': 'beer_barrel'}, {'id': 5767, 'synset': 'beer_garden.n.01', 'name': 'beer_garden'}, {'id': 5768, 'synset': 'beer_glass.n.01', 'name': 'beer_glass'}, {'id': 5769, 'synset': 'beer_hall.n.01', 'name': 'beer_hall'}, {'id': 5770, 'synset': 'beer_mat.n.01', 'name': 'beer_mat'}, {'id': 5771, 'synset': 'beer_mug.n.01', 'name': 'beer_mug'}, {'id': 5772, 'synset': 'belaying_pin.n.01', 'name': 'belaying_pin'}, {'id': 5773, 'synset': 'belfry.n.02', 'name': 'belfry'}, {'id': 5774, 'synset': 'bell_arch.n.01', 'name': 'bell_arch'}, {'id': 5775, 'synset': 'bellarmine.n.02', 'name': 'bellarmine'}, {'id': 5776, 'synset': 'bellbottom_trousers.n.01', 'name': 'bellbottom_trousers'}, {'id': 5777, 'synset': 'bell_cote.n.01', 'name': 'bell_cote'}, {'id': 5778, 'synset': 'bell_foundry.n.01', 'name': 'bell_foundry'}, {'id': 5779, 'synset': 'bell_gable.n.01', 'name': 'bell_gable'}, {'id': 5780, 'synset': 'bell_jar.n.01', 'name': 'bell_jar'}, {'id': 5781, 'synset': 'bellows.n.01', 'name': 'bellows'}, {'id': 5782, 'synset': 'bellpull.n.01', 'name': 'bellpull'}, {'id': 5783, 'synset': 'bell_push.n.01', 'name': 'bell_push'}, {'id': 5784, 'synset': 'bell_seat.n.01', 'name': 'bell_seat'}, {'id': 5785, 'synset': 'bell_tent.n.01', 'name': 'bell_tent'}, {'id': 5786, 'synset': 'bell_tower.n.01', 'name': 'bell_tower'}, {'id': 5787, 'synset': 'bellyband.n.01', 'name': 'bellyband'}, {'id': 5788, 'synset': 'belt.n.06', 'name': 'belt'}, {'id': 5789, 'synset': 'belting.n.01', 'name': 'belting'}, {'id': 5790, 'synset': 'bench_clamp.n.01', 'name': 'bench_clamp'}, {'id': 5791, 'synset': 'bench_hook.n.01', 'name': 'bench_hook'}, {'id': 5792, 'synset': 'bench_lathe.n.01', 'name': 'bench_lathe'}, {'id': 5793, 'synset': 'bench_press.n.02', 'name': 'bench_press'}, {'id': 5794, 'synset': 'bender.n.01', 'name': 'bender'}, {'id': 5795, 'synset': 'berlin.n.03', 'name': 'berlin'}, {'id': 5796, 'synset': 'bermuda_shorts.n.01', 'name': 'Bermuda_shorts'}, {'id': 5797, 'synset': 'berth.n.03', 'name': 'berth'}, {'id': 5798, 'synset': 'besom.n.01', 'name': 'besom'}, {'id': 5799, 'synset': 'bessemer_converter.n.01', 'name': 'Bessemer_converter'}, {'id': 5800, 'synset': 'bethel.n.01', 'name': 'bethel'}, {'id': 5801, 'synset': 'betting_shop.n.01', 'name': 'betting_shop'}, {'id': 5802, 'synset': 'bevatron.n.01', 'name': 'bevatron'}, {'id': 5803, 'synset': 'bevel.n.02', 'name': 'bevel'}, {'id': 5804, 'synset': 'bevel_gear.n.01', 'name': 'bevel_gear'}, {'id': 5805, 'synset': 'b-flat_clarinet.n.01', 'name': 'B-flat_clarinet'}, {'id': 5806, 'synset': 'bib.n.01', 'name': 'bib'}, {'id': 5807, 'synset': 'bib-and-tucker.n.01', 'name': 'bib-and-tucker'}, {'id': 5808, 'synset': 'bicorn.n.01', 'name': 'bicorn'}, {'id': 5809, 'synset': 'bicycle-built-for-two.n.01', 'name': 'bicycle-built-for-two'}, {'id': 5810, 'synset': 'bicycle_chain.n.01', 'name': 'bicycle_chain'}, {'id': 5811, 'synset': 'bicycle_clip.n.01', 'name': 'bicycle_clip'}, {'id': 5812, 'synset': 'bicycle_pump.n.01', 'name': 'bicycle_pump'}, {'id': 5813, 'synset': 'bicycle_rack.n.01', 'name': 'bicycle_rack'}, {'id': 5814, 'synset': 'bicycle_seat.n.01', 'name': 'bicycle_seat'}, {'id': 5815, 'synset': 'bicycle_wheel.n.01', 'name': 'bicycle_wheel'}, {'id': 5816, 'synset': 'bidet.n.01', 'name': 'bidet'}, {'id': 5817, 'synset': 'bier.n.02', 'name': 'bier'}, {'id': 5818, 'synset': 'bier.n.01', 'name': 'bier'}, {'id': 5819, 'synset': 'bi-fold_door.n.01', 'name': 'bi-fold_door'}, {'id': 5820, 'synset': 'bifocals.n.01', 'name': 'bifocals'}, {'id': 5821, 'synset': 'big_blue.n.01', 'name': 'Big_Blue'}, {'id': 5822, 'synset': 'big_board.n.02', 'name': 'big_board'}, {'id': 5823, 'synset': 'bight.n.04', 'name': 'bight'}, {'id': 5824, 'synset': 'bikini.n.02', 'name': 'bikini'}, {'id': 5825, 'synset': 'bikini_pants.n.01', 'name': 'bikini_pants'}, {'id': 5826, 'synset': 'bilge.n.02', 'name': 'bilge'}, {'id': 5827, 'synset': 'bilge_keel.n.01', 'name': 'bilge_keel'}, {'id': 5828, 'synset': 'bilge_pump.n.01', 'name': 'bilge_pump'}, {'id': 5829, 'synset': 'bilge_well.n.01', 'name': 'bilge_well'}, {'id': 5830, 'synset': 'bill.n.08', 'name': 'bill'}, {'id': 5831, 'synset': 'billiard_ball.n.01', 'name': 'billiard_ball'}, {'id': 5832, 'synset': 'billiard_room.n.01', 'name': 'billiard_room'}, {'id': 5833, 'synset': 'bin.n.01', 'name': 'bin'}, {'id': 5834, 'synset': 'binder.n.04', 'name': 'binder'}, {'id': 5835, 'synset': 'bindery.n.01', 'name': 'bindery'}, {'id': 5836, 'synset': 'binding.n.05', 'name': 'binding'}, {'id': 5837, 'synset': 'bin_liner.n.01', 'name': 'bin_liner'}, {'id': 5838, 'synset': 'binnacle.n.01', 'name': 'binnacle'}, {'id': 5839, 'synset': 'binocular_microscope.n.01', 'name': 'binocular_microscope'}, {'id': 5840, 'synset': 'biochip.n.01', 'name': 'biochip'}, {'id': 5841, 'synset': 'biohazard_suit.n.01', 'name': 'biohazard_suit'}, {'id': 5842, 'synset': 'bioscope.n.02', 'name': 'bioscope'}, {'id': 5843, 'synset': 'biplane.n.01', 'name': 'biplane'}, {'id': 5844, 'synset': 'birch.n.03', 'name': 'birch'}, {'id': 5845, 'synset': 'birchbark_canoe.n.01', 'name': 'birchbark_canoe'}, {'id': 5846, 'synset': 'birdcall.n.02', 'name': 'birdcall'}, {'id': 5847, 'synset': 'bird_shot.n.01', 'name': 'bird_shot'}, {'id': 5848, 'synset': 'biretta.n.01', 'name': 'biretta'}, {'id': 5849, 'synset': 'bishop.n.03', 'name': 'bishop'}, {'id': 5850, 'synset': 'bistro.n.01', 'name': 'bistro'}, {'id': 5851, 'synset': 'bit.n.11', 'name': 'bit'}, {'id': 5852, 'synset': 'bit.n.05', 'name': 'bit'}, {'id': 5853, 'synset': 'bite_plate.n.01', 'name': 'bite_plate'}, {'id': 5854, 'synset': 'bitewing.n.01', 'name': 'bitewing'}, {'id': 5855, 'synset': 'bitumastic.n.01', 'name': 'bitumastic'}, {'id': 5856, 'synset': 'black.n.07', 'name': 'black'}, {'id': 5857, 'synset': 'black.n.06', 'name': 'black'}, {'id': 5858, 'synset': 'blackboard_eraser.n.01', 'name': 'blackboard_eraser'}, {'id': 5859, 'synset': 'black_box.n.01', 'name': 'black_box'}, {'id': 5860, 'synset': 'blackface.n.01', 'name': 'blackface'}, {'id': 5861, 'synset': 'blackjack.n.02', 'name': 'blackjack'}, {'id': 5862, 'synset': 'black_tie.n.02', 'name': 'black_tie'}, {'id': 5863, 'synset': 'blackwash.n.03', 'name': 'blackwash'}, {'id': 5864, 'synset': 'bladder.n.02', 'name': 'bladder'}, {'id': 5865, 'synset': 'blade.n.09', 'name': 'blade'}, {'id': 5866, 'synset': 'blade.n.08', 'name': 'blade'}, {'id': 5867, 'synset': 'blade.n.07', 'name': 'blade'}, {'id': 5868, 'synset': 'blank.n.04', 'name': 'blank'}, {'id': 5869, 'synset': 'blast_furnace.n.01', 'name': 'blast_furnace'}, {'id': 5870, 'synset': 'blasting_cap.n.01', 'name': 'blasting_cap'}, {'id': 5871, 'synset': 'blind.n.03', 'name': 'blind'}, {'id': 5872, 'synset': 'blind_curve.n.01', 'name': 'blind_curve'}, {'id': 5873, 'synset': 'blindfold.n.01', 'name': 'blindfold'}, {'id': 5874, 'synset': 'bling.n.01', 'name': 'bling'}, {'id': 5875, 'synset': 'blister_pack.n.01', 'name': 'blister_pack'}, {'id': 5876, 'synset': 'block.n.05', 'name': 'block'}, {'id': 5877, 'synset': 'blockade.n.02', 'name': 'blockade'}, {'id': 5878, 'synset': 'blockade-runner.n.01', 'name': 'blockade-runner'}, {'id': 5879, 'synset': 'block_and_tackle.n.01', 'name': 'block_and_tackle'}, {'id': 5880, 'synset': 'blockbuster.n.01', 'name': 'blockbuster'}, {'id': 5881, 'synset': 'blockhouse.n.01', 'name': 'blockhouse'}, {'id': 5882, 'synset': 'block_plane.n.01', 'name': 'block_plane'}, {'id': 5883, 'synset': 'bloodmobile.n.01', 'name': 'bloodmobile'}, {'id': 5884, 'synset': 'bloomers.n.01', 'name': 'bloomers'}, {'id': 5885, 'synset': 'blower.n.01', 'name': 'blower'}, {'id': 5886, 'synset': 'blowtorch.n.01', 'name': 'blowtorch'}, {'id': 5887, 'synset': 'blucher.n.02', 'name': 'blucher'}, {'id': 5888, 'synset': 'bludgeon.n.01', 'name': 'bludgeon'}, {'id': 5889, 'synset': 'blue.n.02', 'name': 'blue'}, {'id': 5890, 'synset': 'blue_chip.n.02', 'name': 'blue_chip'}, {'id': 5891, 'synset': 'blunderbuss.n.01', 'name': 'blunderbuss'}, {'id': 5892, 'synset': 'blunt_file.n.01', 'name': 'blunt_file'}, {'id': 5893, 'synset': 'boarding.n.02', 'name': 'boarding'}, {'id': 5894, 'synset': 'boarding_house.n.01', 'name': 'boarding_house'}, {'id': 5895, 'synset': 'boardroom.n.01', 'name': 'boardroom'}, {'id': 5896, 'synset': 'boards.n.02', 'name': 'boards'}, {'id': 5897, 'synset': 'boater.n.01', 'name': 'boater'}, {'id': 5898, 'synset': 'boat_hook.n.01', 'name': 'boat_hook'}, {'id': 5899, 'synset': 'boathouse.n.01', 'name': 'boathouse'}, {'id': 5900, 'synset': "boatswain's_chair.n.01", 'name': "boatswain's_chair"}, {'id': 5901, 'synset': 'boat_train.n.01', 'name': 'boat_train'}, {'id': 5902, 'synset': 'boatyard.n.01', 'name': 'boatyard'}, {'id': 5903, 'synset': 'bobsled.n.02', 'name': 'bobsled'}, {'id': 5904, 'synset': 'bobsled.n.01', 'name': 'bobsled'}, {'id': 5905, 'synset': 'bocce_ball.n.01', 'name': 'bocce_ball'}, {'id': 5906, 'synset': 'bodega.n.01', 'name': 'bodega'}, {'id': 5907, 'synset': 'bodice.n.01', 'name': 'bodice'}, {'id': 5908, 'synset': 'bodkin.n.04', 'name': 'bodkin'}, {'id': 5909, 'synset': 'bodkin.n.03', 'name': 'bodkin'}, {'id': 5910, 'synset': 'bodkin.n.02', 'name': 'bodkin'}, {'id': 5911, 'synset': 'body.n.11', 'name': 'body'}, {'id': 5912, 'synset': 'body_armor.n.01', 'name': 'body_armor'}, {'id': 5913, 'synset': 'body_lotion.n.01', 'name': 'body_lotion'}, {'id': 5914, 'synset': 'body_stocking.n.01', 'name': 'body_stocking'}, {'id': 5915, 'synset': 'body_plethysmograph.n.01', 'name': 'body_plethysmograph'}, {'id': 5916, 'synset': 'body_pad.n.01', 'name': 'body_pad'}, {'id': 5917, 'synset': 'bodywork.n.01', 'name': 'bodywork'}, {'id': 5918, 'synset': 'bofors_gun.n.01', 'name': 'Bofors_gun'}, {'id': 5919, 'synset': 'bogy.n.01', 'name': 'bogy'}, {'id': 5920, 'synset': 'boiler.n.01', 'name': 'boiler'}, {'id': 5921, 'synset': 'boiling_water_reactor.n.01', 'name': 'boiling_water_reactor'}, {'id': 5922, 'synset': 'bolero.n.02', 'name': 'bolero'}, {'id': 5923, 'synset': 'bollard.n.01', 'name': 'bollard'}, {'id': 5924, 'synset': 'bolo.n.02', 'name': 'bolo'}, {'id': 5925, 'synset': 'bolt.n.02', 'name': 'bolt'}, {'id': 5926, 'synset': 'bolt_cutter.n.01', 'name': 'bolt_cutter'}, {'id': 5927, 'synset': 'bomb.n.01', 'name': 'bomb'}, {'id': 5928, 'synset': 'bombazine.n.01', 'name': 'bombazine'}, {'id': 5929, 'synset': 'bomb_calorimeter.n.01', 'name': 'bomb_calorimeter'}, {'id': 5930, 'synset': 'bomber.n.01', 'name': 'bomber'}, {'id': 5931, 'synset': 'bomber_jacket.n.01', 'name': 'bomber_jacket'}, {'id': 5932, 'synset': 'bomblet.n.01', 'name': 'bomblet'}, {'id': 5933, 'synset': 'bomb_rack.n.01', 'name': 'bomb_rack'}, {'id': 5934, 'synset': 'bombshell.n.03', 'name': 'bombshell'}, {'id': 5935, 'synset': 'bomb_shelter.n.01', 'name': 'bomb_shelter'}, {'id': 5936, 'synset': 'bone-ash_cup.n.01', 'name': 'bone-ash_cup'}, {'id': 5937, 'synset': 'bone_china.n.01', 'name': 'bone_china'}, {'id': 5938, 'synset': 'bones.n.01', 'name': 'bones'}, {'id': 5939, 'synset': 'boneshaker.n.01', 'name': 'boneshaker'}, {'id': 5940, 'synset': 'bongo.n.01', 'name': 'bongo'}, {'id': 5941, 'synset': 'book.n.11', 'name': 'book'}, {'id': 5942, 'synset': 'book_bag.n.01', 'name': 'book_bag'}, {'id': 5943, 'synset': 'bookbindery.n.01', 'name': 'bookbindery'}, {'id': 5944, 'synset': 'bookend.n.01', 'name': 'bookend'}, {'id': 5945, 'synset': 'bookmobile.n.01', 'name': 'bookmobile'}, {'id': 5946, 'synset': 'bookshelf.n.01', 'name': 'bookshelf'}, {'id': 5947, 'synset': 'bookshop.n.01', 'name': 'bookshop'}, {'id': 5948, 'synset': 'boom.n.05', 'name': 'boom'}, {'id': 5949, 'synset': 'boomerang.n.01', 'name': 'boomerang'}, {'id': 5950, 'synset': 'booster.n.05', 'name': 'booster'}, {'id': 5951, 'synset': 'booster.n.04', 'name': 'booster'}, {'id': 5952, 'synset': 'boot.n.04', 'name': 'boot'}, {'id': 5953, 'synset': 'boot_camp.n.01', 'name': 'boot_camp'}, {'id': 5954, 'synset': 'bootee.n.01', 'name': 'bootee'}, {'id': 5955, 'synset': 'booth.n.02', 'name': 'booth'}, {'id': 5956, 'synset': 'booth.n.04', 'name': 'booth'}, {'id': 5957, 'synset': 'booth.n.01', 'name': 'booth'}, {'id': 5958, 'synset': 'boothose.n.01', 'name': 'boothose'}, {'id': 5959, 'synset': 'bootjack.n.01', 'name': 'bootjack'}, {'id': 5960, 'synset': 'bootlace.n.01', 'name': 'bootlace'}, {'id': 5961, 'synset': 'bootleg.n.02', 'name': 'bootleg'}, {'id': 5962, 'synset': 'bootstrap.n.01', 'name': 'bootstrap'}, {'id': 5963, 'synset': 'bore_bit.n.01', 'name': 'bore_bit'}, {'id': 5964, 'synset': 'boron_chamber.n.01', 'name': 'boron_chamber'}, {'id': 5965, 'synset': 'borstal.n.01', 'name': 'borstal'}, {'id': 5966, 'synset': 'bosom.n.03', 'name': 'bosom'}, {'id': 5967, 'synset': 'boston_rocker.n.01', 'name': 'Boston_rocker'}, {'id': 5968, 'synset': 'bota.n.01', 'name': 'bota'}, {'id': 5969, 'synset': 'bottle.n.03', 'name': 'bottle'}, {'id': 5970, 'synset': 'bottle_bank.n.01', 'name': 'bottle_bank'}, {'id': 5971, 'synset': 'bottlebrush.n.01', 'name': 'bottlebrush'}, {'id': 5972, 'synset': 'bottlecap.n.01', 'name': 'bottlecap'}, {'id': 5973, 'synset': 'bottling_plant.n.01', 'name': 'bottling_plant'}, {'id': 5974, 'synset': 'bottom.n.07', 'name': 'bottom'}, {'id': 5975, 'synset': 'boucle.n.01', 'name': 'boucle'}, {'id': 5976, 'synset': 'boudoir.n.01', 'name': 'boudoir'}, {'id': 5977, 'synset': 'boulle.n.01', 'name': 'boulle'}, {'id': 5978, 'synset': 'bouncing_betty.n.01', 'name': 'bouncing_betty'}, {'id': 5979, 'synset': 'boutique.n.01', 'name': 'boutique'}, {'id': 5980, 'synset': 'boutonniere.n.01', 'name': 'boutonniere'}, {'id': 5981, 'synset': 'bow.n.02', 'name': 'bow'}, {'id': 5982, 'synset': 'bow.n.01', 'name': 'bow'}, {'id': 5983, 'synset': 'bow_and_arrow.n.01', 'name': 'bow_and_arrow'}, {'id': 5984, 'synset': 'bowed_stringed_instrument.n.01', 'name': 'bowed_stringed_instrument'}, {'id': 5985, 'synset': 'bowie_knife.n.01', 'name': 'Bowie_knife'}, {'id': 5986, 'synset': 'bowl.n.01', 'name': 'bowl'}, {'id': 5987, 'synset': 'bowl.n.07', 'name': 'bowl'}, {'id': 5988, 'synset': 'bowline.n.01', 'name': 'bowline'}, {'id': 5989, 'synset': 'bowling_alley.n.01', 'name': 'bowling_alley'}, {'id': 5990, 'synset': 'bowling_equipment.n.01', 'name': 'bowling_equipment'}, {'id': 5991, 'synset': 'bowling_pin.n.01', 'name': 'bowling_pin'}, {'id': 5992, 'synset': 'bowling_shoe.n.01', 'name': 'bowling_shoe'}, {'id': 5993, 'synset': 'bowsprit.n.01', 'name': 'bowsprit'}, {'id': 5994, 'synset': 'bowstring.n.01', 'name': 'bowstring'}, {'id': 5995, 'synset': 'box.n.02', 'name': 'box'}, {'id': 5996, 'synset': 'box.n.08', 'name': 'box'}, {'id': 5997, 'synset': 'box_beam.n.01', 'name': 'box_beam'}, {'id': 5998, 'synset': 'box_camera.n.01', 'name': 'box_camera'}, {'id': 5999, 'synset': 'boxcar.n.01', 'name': 'boxcar'}, {'id': 6000, 'synset': 'box_coat.n.01', 'name': 'box_coat'}, {'id': 6001, 'synset': 'boxing_equipment.n.01', 'name': 'boxing_equipment'}, {'id': 6002, 'synset': 'box_office.n.02', 'name': 'box_office'}, {'id': 6003, 'synset': 'box_spring.n.01', 'name': 'box_spring'}, {'id': 6004, 'synset': 'box_wrench.n.01', 'name': 'box_wrench'}, {'id': 6005, 'synset': 'brace.n.09', 'name': 'brace'}, {'id': 6006, 'synset': 'brace.n.07', 'name': 'brace'}, {'id': 6007, 'synset': 'brace.n.01', 'name': 'brace'}, {'id': 6008, 'synset': 'brace_and_bit.n.01', 'name': 'brace_and_bit'}, {'id': 6009, 'synset': 'bracer.n.01', 'name': 'bracer'}, {'id': 6010, 'synset': 'brace_wrench.n.01', 'name': 'brace_wrench'}, {'id': 6011, 'synset': 'bracket.n.04', 'name': 'bracket'}, {'id': 6012, 'synset': 'bradawl.n.01', 'name': 'bradawl'}, {'id': 6013, 'synset': 'brake.n.01', 'name': 'brake'}, {'id': 6014, 'synset': 'brake.n.05', 'name': 'brake'}, {'id': 6015, 'synset': 'brake_band.n.01', 'name': 'brake_band'}, {'id': 6016, 'synset': 'brake_cylinder.n.01', 'name': 'brake_cylinder'}, {'id': 6017, 'synset': 'brake_disk.n.01', 'name': 'brake_disk'}, {'id': 6018, 'synset': 'brake_drum.n.01', 'name': 'brake_drum'}, {'id': 6019, 'synset': 'brake_lining.n.01', 'name': 'brake_lining'}, {'id': 6020, 'synset': 'brake_pad.n.01', 'name': 'brake_pad'}, {'id': 6021, 'synset': 'brake_pedal.n.01', 'name': 'brake_pedal'}, {'id': 6022, 'synset': 'brake_shoe.n.01', 'name': 'brake_shoe'}, {'id': 6023, 'synset': 'brake_system.n.01', 'name': 'brake_system'}, {'id': 6024, 'synset': 'brass.n.02', 'name': 'brass'}, {'id': 6025, 'synset': 'brass.n.05', 'name': 'brass'}, {'id': 6026, 'synset': 'brassard.n.01', 'name': 'brassard'}, {'id': 6027, 'synset': 'brasserie.n.01', 'name': 'brasserie'}, {'id': 6028, 'synset': 'brassie.n.01', 'name': 'brassie'}, {'id': 6029, 'synset': 'brass_knucks.n.01', 'name': 'brass_knucks'}, {'id': 6030, 'synset': 'brattice.n.01', 'name': 'brattice'}, {'id': 6031, 'synset': 'brazier.n.01', 'name': 'brazier'}, {'id': 6032, 'synset': 'breadbasket.n.03', 'name': 'breadbasket'}, {'id': 6033, 'synset': 'bread_knife.n.01', 'name': 'bread_knife'}, {'id': 6034, 'synset': 'breakable.n.01', 'name': 'breakable'}, {'id': 6035, 'synset': 'breakfast_area.n.01', 'name': 'breakfast_area'}, {'id': 6036, 'synset': 'breakfast_table.n.01', 'name': 'breakfast_table'}, {'id': 6037, 'synset': 'breakwater.n.01', 'name': 'breakwater'}, {'id': 6038, 'synset': 'breast_drill.n.01', 'name': 'breast_drill'}, {'id': 6039, 'synset': 'breast_implant.n.01', 'name': 'breast_implant'}, {'id': 6040, 'synset': 'breastplate.n.01', 'name': 'breastplate'}, {'id': 6041, 'synset': 'breast_pocket.n.01', 'name': 'breast_pocket'}, {'id': 6042, 'synset': 'breathalyzer.n.01', 'name': 'breathalyzer'}, {'id': 6043, 'synset': 'breechblock.n.01', 'name': 'breechblock'}, {'id': 6044, 'synset': 'breeches.n.01', 'name': 'breeches'}, {'id': 6045, 'synset': 'breeches_buoy.n.01', 'name': 'breeches_buoy'}, {'id': 6046, 'synset': 'breechloader.n.01', 'name': 'breechloader'}, {'id': 6047, 'synset': 'breeder_reactor.n.01', 'name': 'breeder_reactor'}, {'id': 6048, 'synset': 'bren.n.01', 'name': 'Bren'}, {'id': 6049, 'synset': 'brewpub.n.01', 'name': 'brewpub'}, {'id': 6050, 'synset': 'brick.n.01', 'name': 'brick'}, {'id': 6051, 'synset': 'brickkiln.n.01', 'name': 'brickkiln'}, {'id': 6052, 'synset': "bricklayer's_hammer.n.01", 'name': "bricklayer's_hammer"}, {'id': 6053, 'synset': 'brick_trowel.n.01', 'name': 'brick_trowel'}, {'id': 6054, 'synset': 'brickwork.n.01', 'name': 'brickwork'}, {'id': 6055, 'synset': 'bridge.n.01', 'name': 'bridge'}, {'id': 6056, 'synset': 'bridge.n.08', 'name': 'bridge'}, {'id': 6057, 'synset': 'bridle.n.01', 'name': 'bridle'}, {'id': 6058, 'synset': 'bridle_path.n.01', 'name': 'bridle_path'}, {'id': 6059, 'synset': 'bridoon.n.01', 'name': 'bridoon'}, {'id': 6060, 'synset': 'briefcase_bomb.n.01', 'name': 'briefcase_bomb'}, {'id': 6061, 'synset': 'briefcase_computer.n.01', 'name': 'briefcase_computer'}, {'id': 6062, 'synset': 'briefs.n.01', 'name': 'briefs'}, {'id': 6063, 'synset': 'brig.n.02', 'name': 'brig'}, {'id': 6064, 'synset': 'brig.n.01', 'name': 'brig'}, {'id': 6065, 'synset': 'brigandine.n.01', 'name': 'brigandine'}, {'id': 6066, 'synset': 'brigantine.n.01', 'name': 'brigantine'}, {'id': 6067, 'synset': 'brilliantine.n.01', 'name': 'brilliantine'}, {'id': 6068, 'synset': 'brilliant_pebble.n.01', 'name': 'brilliant_pebble'}, {'id': 6069, 'synset': 'brim.n.02', 'name': 'brim'}, {'id': 6070, 'synset': 'bristle_brush.n.01', 'name': 'bristle_brush'}, {'id': 6071, 'synset': 'britches.n.01', 'name': 'britches'}, {'id': 6072, 'synset': 'broad_arrow.n.03', 'name': 'broad_arrow'}, {'id': 6073, 'synset': 'broadax.n.01', 'name': 'broadax'}, {'id': 6074, 'synset': 'brochette.n.01', 'name': 'brochette'}, {'id': 6075, 'synset': 'broadcaster.n.02', 'name': 'broadcaster'}, {'id': 6076, 'synset': 'broadcloth.n.02', 'name': 'broadcloth'}, {'id': 6077, 'synset': 'broadcloth.n.01', 'name': 'broadcloth'}, {'id': 6078, 'synset': 'broad_hatchet.n.01', 'name': 'broad_hatchet'}, {'id': 6079, 'synset': 'broadloom.n.01', 'name': 'broadloom'}, {'id': 6080, 'synset': 'broadside.n.03', 'name': 'broadside'}, {'id': 6081, 'synset': 'broadsword.n.01', 'name': 'broadsword'}, {'id': 6082, 'synset': 'brocade.n.01', 'name': 'brocade'}, {'id': 6083, 'synset': 'brogan.n.01', 'name': 'brogan'}, {'id': 6084, 'synset': 'broiler.n.01', 'name': 'broiler'}, {'id': 6085, 'synset': 'broken_arch.n.01', 'name': 'broken_arch'}, {'id': 6086, 'synset': 'bronchoscope.n.01', 'name': 'bronchoscope'}, {'id': 6087, 'synset': 'broom_closet.n.01', 'name': 'broom_closet'}, {'id': 6088, 'synset': 'broomstick.n.01', 'name': 'broomstick'}, {'id': 6089, 'synset': 'brougham.n.01', 'name': 'brougham'}, {'id': 6090, 'synset': 'browning_automatic_rifle.n.01', 'name': 'Browning_automatic_rifle'}, {'id': 6091, 'synset': 'browning_machine_gun.n.01', 'name': 'Browning_machine_gun'}, {'id': 6092, 'synset': 'brownstone.n.02', 'name': 'brownstone'}, {'id': 6093, 'synset': 'brunch_coat.n.01', 'name': 'brunch_coat'}, {'id': 6094, 'synset': 'brush.n.02', 'name': 'brush'}, {'id': 6095, 'synset': 'brussels_carpet.n.01', 'name': 'Brussels_carpet'}, {'id': 6096, 'synset': 'brussels_lace.n.01', 'name': 'Brussels_lace'}, {'id': 6097, 'synset': 'bubble.n.04', 'name': 'bubble'}, {'id': 6098, 'synset': 'bubble_chamber.n.01', 'name': 'bubble_chamber'}, {'id': 6099, 'synset': 'bubble_jet_printer.n.01', 'name': 'bubble_jet_printer'}, {'id': 6100, 'synset': 'buckboard.n.01', 'name': 'buckboard'}, {'id': 6101, 'synset': 'bucket_seat.n.01', 'name': 'bucket_seat'}, {'id': 6102, 'synset': 'bucket_shop.n.02', 'name': 'bucket_shop'}, {'id': 6103, 'synset': 'buckle.n.01', 'name': 'buckle'}, {'id': 6104, 'synset': 'buckram.n.01', 'name': 'buckram'}, {'id': 6105, 'synset': 'bucksaw.n.01', 'name': 'bucksaw'}, {'id': 6106, 'synset': 'buckskins.n.01', 'name': 'buckskins'}, {'id': 6107, 'synset': 'buff.n.05', 'name': 'buff'}, {'id': 6108, 'synset': 'buffer.n.05', 'name': 'buffer'}, {'id': 6109, 'synset': 'buffer.n.04', 'name': 'buffer'}, {'id': 6110, 'synset': 'buffet.n.01', 'name': 'buffet'}, {'id': 6111, 'synset': 'buffing_wheel.n.01', 'name': 'buffing_wheel'}, {'id': 6112, 'synset': 'bugle.n.01', 'name': 'bugle'}, {'id': 6113, 'synset': 'building.n.01', 'name': 'building'}, {'id': 6114, 'synset': 'building_complex.n.01', 'name': 'building_complex'}, {'id': 6115, 'synset': 'bulldog_clip.n.01', 'name': 'bulldog_clip'}, {'id': 6116, 'synset': 'bulldog_wrench.n.01', 'name': 'bulldog_wrench'}, {'id': 6117, 'synset': 'bullet.n.01', 'name': 'bullet'}, {'id': 6118, 'synset': 'bullion.n.02', 'name': 'bullion'}, {'id': 6119, 'synset': 'bullnose.n.01', 'name': 'bullnose'}, {'id': 6120, 'synset': 'bullpen.n.02', 'name': 'bullpen'}, {'id': 6121, 'synset': 'bullpen.n.01', 'name': 'bullpen'}, {'id': 6122, 'synset': 'bullring.n.01', 'name': 'bullring'}, {'id': 6123, 'synset': 'bulwark.n.02', 'name': 'bulwark'}, {'id': 6124, 'synset': 'bumboat.n.01', 'name': 'bumboat'}, {'id': 6125, 'synset': 'bumper.n.02', 'name': 'bumper'}, {'id': 6126, 'synset': 'bumper.n.01', 'name': 'bumper'}, {'id': 6127, 'synset': 'bumper_car.n.01', 'name': 'bumper_car'}, {'id': 6128, 'synset': 'bumper_guard.n.01', 'name': 'bumper_guard'}, {'id': 6129, 'synset': 'bumper_jack.n.01', 'name': 'bumper_jack'}, {'id': 6130, 'synset': 'bundle.n.02', 'name': 'bundle'}, {'id': 6131, 'synset': 'bung.n.01', 'name': 'bung'}, {'id': 6132, 'synset': 'bungalow.n.01', 'name': 'bungalow'}, {'id': 6133, 'synset': 'bungee.n.01', 'name': 'bungee'}, {'id': 6134, 'synset': 'bunghole.n.02', 'name': 'bunghole'}, {'id': 6135, 'synset': 'bunk.n.03', 'name': 'bunk'}, {'id': 6136, 'synset': 'bunk.n.01', 'name': 'bunk'}, {'id': 6137, 'synset': 'bunker.n.01', 'name': 'bunker'}, {'id': 6138, 'synset': 'bunker.n.03', 'name': 'bunker'}, {'id': 6139, 'synset': 'bunker.n.02', 'name': 'bunker'}, {'id': 6140, 'synset': 'bunsen_burner.n.01', 'name': 'bunsen_burner'}, {'id': 6141, 'synset': 'bunting.n.01', 'name': 'bunting'}, {'id': 6142, 'synset': 'bur.n.02', 'name': 'bur'}, {'id': 6143, 'synset': 'burberry.n.01', 'name': 'Burberry'}, {'id': 6144, 'synset': 'burette.n.01', 'name': 'burette'}, {'id': 6145, 'synset': 'burglar_alarm.n.02', 'name': 'burglar_alarm'}, {'id': 6146, 'synset': 'burial_chamber.n.01', 'name': 'burial_chamber'}, {'id': 6147, 'synset': 'burial_garment.n.01', 'name': 'burial_garment'}, {'id': 6148, 'synset': 'burial_mound.n.01', 'name': 'burial_mound'}, {'id': 6149, 'synset': 'burin.n.01', 'name': 'burin'}, {'id': 6150, 'synset': 'burqa.n.01', 'name': 'burqa'}, {'id': 6151, 'synset': 'burlap.n.01', 'name': 'burlap'}, {'id': 6152, 'synset': 'burn_bag.n.01', 'name': 'burn_bag'}, {'id': 6153, 'synset': 'burner.n.01', 'name': 'burner'}, {'id': 6154, 'synset': 'burnous.n.01', 'name': 'burnous'}, {'id': 6155, 'synset': 'burp_gun.n.01', 'name': 'burp_gun'}, {'id': 6156, 'synset': 'burr.n.04', 'name': 'burr'}, {'id': 6157, 'synset': 'bushel_basket.n.01', 'name': 'bushel_basket'}, {'id': 6158, 'synset': 'bushing.n.02', 'name': 'bushing'}, {'id': 6159, 'synset': 'bush_jacket.n.01', 'name': 'bush_jacket'}, {'id': 6160, 'synset': 'business_suit.n.01', 'name': 'business_suit'}, {'id': 6161, 'synset': 'buskin.n.01', 'name': 'buskin'}, {'id': 6162, 'synset': 'bustier.n.01', 'name': 'bustier'}, {'id': 6163, 'synset': 'bustle.n.02', 'name': 'bustle'}, {'id': 6164, 'synset': 'butcher_knife.n.01', 'name': 'butcher_knife'}, {'id': 6165, 'synset': 'butcher_shop.n.01', 'name': 'butcher_shop'}, {'id': 6166, 'synset': 'butter_dish.n.01', 'name': 'butter_dish'}, {'id': 6167, 'synset': 'butterfly_valve.n.01', 'name': 'butterfly_valve'}, {'id': 6168, 'synset': 'butter_knife.n.01', 'name': 'butter_knife'}, {'id': 6169, 'synset': 'butt_hinge.n.01', 'name': 'butt_hinge'}, {'id': 6170, 'synset': 'butt_joint.n.01', 'name': 'butt_joint'}, {'id': 6171, 'synset': 'buttonhook.n.01', 'name': 'buttonhook'}, {'id': 6172, 'synset': 'buttress.n.01', 'name': 'buttress'}, {'id': 6173, 'synset': 'butt_shaft.n.01', 'name': 'butt_shaft'}, {'id': 6174, 'synset': 'butt_weld.n.01', 'name': 'butt_weld'}, {'id': 6175, 'synset': 'buzz_bomb.n.01', 'name': 'buzz_bomb'}, {'id': 6176, 'synset': 'buzzer.n.02', 'name': 'buzzer'}, {'id': 6177, 'synset': 'bvd.n.01', 'name': 'BVD'}, {'id': 6178, 'synset': 'bypass_condenser.n.01', 'name': 'bypass_condenser'}, {'id': 6179, 'synset': 'byway.n.01', 'name': 'byway'}, {'id': 6180, 'synset': 'cab.n.02', 'name': 'cab'}, {'id': 6181, 'synset': 'cab.n.01', 'name': 'cab'}, {'id': 6182, 'synset': 'cabaret.n.01', 'name': 'cabaret'}, {'id': 6183, 'synset': 'caber.n.01', 'name': 'caber'}, {'id': 6184, 'synset': 'cabin.n.03', 'name': 'cabin'}, {'id': 6185, 'synset': 'cabin.n.02', 'name': 'cabin'}, {'id': 6186, 'synset': 'cabin_class.n.01', 'name': 'cabin_class'}, {'id': 6187, 'synset': 'cabin_cruiser.n.01', 'name': 'cabin_cruiser'}, {'id': 6188, 'synset': 'cabinet.n.04', 'name': 'cabinet'}, {'id': 6189, 'synset': 'cabinetwork.n.01', 'name': 'cabinetwork'}, {'id': 6190, 'synset': 'cabin_liner.n.01', 'name': 'cabin_liner'}, {'id': 6191, 'synset': 'cable.n.06', 'name': 'cable'}, {'id': 6192, 'synset': 'cable.n.02', 'name': 'cable'}, {'id': 6193, 'synset': 'cable_car.n.01', 'name': 'cable_car'}, {'id': 6194, 'synset': 'cache.n.03', 'name': 'cache'}, {'id': 6195, 'synset': 'caddy.n.01', 'name': 'caddy'}, {'id': 6196, 'synset': 'caesium_clock.n.01', 'name': 'caesium_clock'}, {'id': 6197, 'synset': 'cafe.n.01', 'name': 'cafe'}, {'id': 6198, 'synset': 'cafeteria.n.01', 'name': 'cafeteria'}, {'id': 6199, 'synset': 'cafeteria_tray.n.01', 'name': 'cafeteria_tray'}, {'id': 6200, 'synset': 'caff.n.01', 'name': 'caff'}, {'id': 6201, 'synset': 'caftan.n.02', 'name': 'caftan'}, {'id': 6202, 'synset': 'caftan.n.01', 'name': 'caftan'}, {'id': 6203, 'synset': 'cage.n.01', 'name': 'cage'}, {'id': 6204, 'synset': 'cage.n.04', 'name': 'cage'}, {'id': 6205, 'synset': 'cagoule.n.01', 'name': 'cagoule'}, {'id': 6206, 'synset': 'caisson.n.02', 'name': 'caisson'}, {'id': 6207, 'synset': 'calash.n.02', 'name': 'calash'}, {'id': 6208, 'synset': 'calceus.n.01', 'name': 'calceus'}, {'id': 6209, 'synset': 'calcimine.n.01', 'name': 'calcimine'}, {'id': 6210, 'synset': 'caldron.n.01', 'name': 'caldron'}, {'id': 6211, 'synset': 'calico.n.01', 'name': 'calico'}, {'id': 6212, 'synset': 'caliper.n.01', 'name': 'caliper'}, {'id': 6213, 'synset': 'call-board.n.01', 'name': 'call-board'}, {'id': 6214, 'synset': 'call_center.n.01', 'name': 'call_center'}, {'id': 6215, 'synset': 'caller_id.n.01', 'name': 'caller_ID'}, {'id': 6216, 'synset': 'calliope.n.02', 'name': 'calliope'}, {'id': 6217, 'synset': 'calorimeter.n.01', 'name': 'calorimeter'}, {'id': 6218, 'synset': 'calpac.n.01', 'name': 'calpac'}, {'id': 6219, 'synset': 'camail.n.01', 'name': 'camail'}, {'id': 6220, 'synset': 'camber_arch.n.01', 'name': 'camber_arch'}, {'id': 6221, 'synset': 'cambric.n.01', 'name': 'cambric'}, {'id': 6222, 'synset': "camel's_hair.n.01", 'name': "camel's_hair"}, {'id': 6223, 'synset': 'camera_lucida.n.01', 'name': 'camera_lucida'}, {'id': 6224, 'synset': 'camera_obscura.n.01', 'name': 'camera_obscura'}, {'id': 6225, 'synset': 'camera_tripod.n.01', 'name': 'camera_tripod'}, {'id': 6226, 'synset': 'camise.n.01', 'name': 'camise'}, {'id': 6227, 'synset': 'camisole.n.02', 'name': 'camisole'}, {'id': 6228, 'synset': 'camisole.n.01', 'name': 'camisole'}, {'id': 6229, 'synset': 'camlet.n.02', 'name': 'camlet'}, {'id': 6230, 'synset': 'camouflage.n.03', 'name': 'camouflage'}, {'id': 6231, 'synset': 'camouflage.n.02', 'name': 'camouflage'}, {'id': 6232, 'synset': 'camp.n.01', 'name': 'camp'}, {'id': 6233, 'synset': 'camp.n.03', 'name': 'camp'}, {'id': 6234, 'synset': 'camp.n.07', 'name': 'camp'}, {'id': 6235, 'synset': 'campaign_hat.n.01', 'name': 'campaign_hat'}, {'id': 6236, 'synset': 'campanile.n.01', 'name': 'campanile'}, {'id': 6237, 'synset': 'camp_chair.n.01', 'name': 'camp_chair'}, {'id': 6238, 'synset': 'camper_trailer.n.01', 'name': 'camper_trailer'}, {'id': 6239, 'synset': 'campstool.n.01', 'name': 'campstool'}, {'id': 6240, 'synset': 'camshaft.n.01', 'name': 'camshaft'}, {'id': 6241, 'synset': 'canal.n.03', 'name': 'canal'}, {'id': 6242, 'synset': 'canal_boat.n.01', 'name': 'canal_boat'}, {'id': 6243, 'synset': 'candelabrum.n.01', 'name': 'candelabrum'}, {'id': 6244, 'synset': 'candid_camera.n.01', 'name': 'candid_camera'}, {'id': 6245, 'synset': 'candlepin.n.01', 'name': 'candlepin'}, {'id': 6246, 'synset': 'candlesnuffer.n.01', 'name': 'candlesnuffer'}, {'id': 6247, 'synset': 'candlewick.n.02', 'name': 'candlewick'}, {'id': 6248, 'synset': 'candy_thermometer.n.01', 'name': 'candy_thermometer'}, {'id': 6249, 'synset': 'cane.n.03', 'name': 'cane'}, {'id': 6250, 'synset': 'cangue.n.01', 'name': 'cangue'}, {'id': 6251, 'synset': 'cannery.n.01', 'name': 'cannery'}, {'id': 6252, 'synset': 'cannikin.n.02', 'name': 'cannikin'}, {'id': 6253, 'synset': 'cannikin.n.01', 'name': 'cannikin'}, {'id': 6254, 'synset': 'cannon.n.01', 'name': 'cannon'}, {'id': 6255, 'synset': 'cannon.n.04', 'name': 'cannon'}, {'id': 6256, 'synset': 'cannon.n.03', 'name': 'cannon'}, {'id': 6257, 'synset': 'cannon.n.02', 'name': 'cannon'}, {'id': 6258, 'synset': 'cannonball.n.01', 'name': 'cannonball'}, {'id': 6259, 'synset': 'canopic_jar.n.01', 'name': 'canopic_jar'}, {'id': 6260, 'synset': 'canopy.n.03', 'name': 'canopy'}, {'id': 6261, 'synset': 'canopy.n.02', 'name': 'canopy'}, {'id': 6262, 'synset': 'canopy.n.01', 'name': 'canopy'}, {'id': 6263, 'synset': 'canteen.n.05', 'name': 'canteen'}, {'id': 6264, 'synset': 'canteen.n.04', 'name': 'canteen'}, {'id': 6265, 'synset': 'canteen.n.03', 'name': 'canteen'}, {'id': 6266, 'synset': 'canteen.n.02', 'name': 'canteen'}, {'id': 6267, 'synset': 'cant_hook.n.01', 'name': 'cant_hook'}, {'id': 6268, 'synset': 'cantilever.n.01', 'name': 'cantilever'}, {'id': 6269, 'synset': 'cantilever_bridge.n.01', 'name': 'cantilever_bridge'}, {'id': 6270, 'synset': 'cantle.n.01', 'name': 'cantle'}, {'id': 6271, 'synset': 'canton_crepe.n.01', 'name': 'Canton_crepe'}, {'id': 6272, 'synset': 'canvas.n.01', 'name': 'canvas'}, {'id': 6273, 'synset': 'canvas.n.06', 'name': 'canvas'}, {'id': 6274, 'synset': 'canvas_tent.n.01', 'name': 'canvas_tent'}, {'id': 6275, 'synset': 'cap.n.04', 'name': 'cap'}, {'id': 6276, 'synset': 'capacitor.n.01', 'name': 'capacitor'}, {'id': 6277, 'synset': 'caparison.n.01', 'name': 'caparison'}, {'id': 6278, 'synset': 'capital_ship.n.01', 'name': 'capital_ship'}, {'id': 6279, 'synset': 'capitol.n.01', 'name': 'capitol'}, {'id': 6280, 'synset': 'cap_opener.n.01', 'name': 'cap_opener'}, {'id': 6281, 'synset': 'capote.n.02', 'name': 'capote'}, {'id': 6282, 'synset': 'capote.n.01', 'name': 'capote'}, {'id': 6283, 'synset': 'cap_screw.n.01', 'name': 'cap_screw'}, {'id': 6284, 'synset': 'capstan.n.01', 'name': 'capstan'}, {'id': 6285, 'synset': 'capstone.n.02', 'name': 'capstone'}, {'id': 6286, 'synset': 'capsule.n.01', 'name': 'capsule'}, {'id': 6287, 'synset': "captain's_chair.n.01", 'name': "captain's_chair"}, {'id': 6288, 'synset': 'carabiner.n.01', 'name': 'carabiner'}, {'id': 6289, 'synset': 'carafe.n.01', 'name': 'carafe'}, {'id': 6290, 'synset': 'caravansary.n.01', 'name': 'caravansary'}, {'id': 6291, 'synset': 'carbine.n.01', 'name': 'carbine'}, {'id': 6292, 'synset': 'car_bomb.n.01', 'name': 'car_bomb'}, {'id': 6293, 'synset': 'carbon_arc_lamp.n.01', 'name': 'carbon_arc_lamp'}, {'id': 6294, 'synset': 'carboy.n.01', 'name': 'carboy'}, {'id': 6295, 'synset': 'carburetor.n.01', 'name': 'carburetor'}, {'id': 6296, 'synset': 'car_carrier.n.01', 'name': 'car_carrier'}, {'id': 6297, 'synset': 'cardcase.n.01', 'name': 'cardcase'}, {'id': 6298, 'synset': 'cardiac_monitor.n.01', 'name': 'cardiac_monitor'}, {'id': 6299, 'synset': 'card_index.n.01', 'name': 'card_index'}, {'id': 6300, 'synset': 'cardiograph.n.01', 'name': 'cardiograph'}, {'id': 6301, 'synset': 'cardioid_microphone.n.01', 'name': 'cardioid_microphone'}, {'id': 6302, 'synset': 'car_door.n.01', 'name': 'car_door'}, {'id': 6303, 'synset': 'cardroom.n.01', 'name': 'cardroom'}, {'id': 6304, 'synset': 'card_table.n.02', 'name': 'card_table'}, {'id': 6305, 'synset': 'card_table.n.01', 'name': 'card_table'}, {'id': 6306, 'synset': 'car-ferry.n.01', 'name': 'car-ferry'}, {'id': 6307, 'synset': 'cargo_area.n.01', 'name': 'cargo_area'}, {'id': 6308, 'synset': 'cargo_container.n.01', 'name': 'cargo_container'}, {'id': 6309, 'synset': 'cargo_door.n.01', 'name': 'cargo_door'}, {'id': 6310, 'synset': 'cargo_hatch.n.01', 'name': 'cargo_hatch'}, {'id': 6311, 'synset': 'cargo_helicopter.n.01', 'name': 'cargo_helicopter'}, {'id': 6312, 'synset': 'cargo_liner.n.01', 'name': 'cargo_liner'}, {'id': 6313, 'synset': 'carillon.n.01', 'name': 'carillon'}, {'id': 6314, 'synset': 'car_mirror.n.01', 'name': 'car_mirror'}, {'id': 6315, 'synset': 'caroche.n.01', 'name': 'caroche'}, {'id': 6316, 'synset': 'carousel.n.02', 'name': 'carousel'}, {'id': 6317, 'synset': "carpenter's_hammer.n.01", 'name': "carpenter's_hammer"}, {'id': 6318, 'synset': "carpenter's_kit.n.01", 'name': "carpenter's_kit"}, {'id': 6319, 'synset': "carpenter's_level.n.01", 'name': "carpenter's_level"}, {'id': 6320, 'synset': "carpenter's_mallet.n.01", 'name': "carpenter's_mallet"}, {'id': 6321, 'synset': "carpenter's_rule.n.01", 'name': "carpenter's_rule"}, {'id': 6322, 'synset': "carpenter's_square.n.01", 'name': "carpenter's_square"}, {'id': 6323, 'synset': 'carpetbag.n.01', 'name': 'carpetbag'}, {'id': 6324, 'synset': 'carpet_beater.n.01', 'name': 'carpet_beater'}, {'id': 6325, 'synset': 'carpet_loom.n.01', 'name': 'carpet_loom'}, {'id': 6326, 'synset': 'carpet_pad.n.01', 'name': 'carpet_pad'}, {'id': 6327, 'synset': 'carpet_sweeper.n.01', 'name': 'carpet_sweeper'}, {'id': 6328, 'synset': 'carpet_tack.n.01', 'name': 'carpet_tack'}, {'id': 6329, 'synset': 'carport.n.01', 'name': 'carport'}, {'id': 6330, 'synset': 'carrack.n.01', 'name': 'carrack'}, {'id': 6331, 'synset': 'carrel.n.02', 'name': 'carrel'}, {'id': 6332, 'synset': 'carriage.n.04', 'name': 'carriage'}, {'id': 6333, 'synset': 'carriage_bolt.n.01', 'name': 'carriage_bolt'}, {'id': 6334, 'synset': 'carriageway.n.01', 'name': 'carriageway'}, {'id': 6335, 'synset': 'carriage_wrench.n.01', 'name': 'carriage_wrench'}, {'id': 6336, 'synset': 'carrick_bend.n.01', 'name': 'carrick_bend'}, {'id': 6337, 'synset': 'carrier.n.10', 'name': 'carrier'}, {'id': 6338, 'synset': 'carrycot.n.01', 'name': 'carrycot'}, {'id': 6339, 'synset': 'car_seat.n.01', 'name': 'car_seat'}, {'id': 6340, 'synset': 'car_tire.n.01', 'name': 'car_tire'}, {'id': 6341, 'synset': 'cartouche.n.01', 'name': 'cartouche'}, {'id': 6342, 'synset': 'car_train.n.01', 'name': 'car_train'}, {'id': 6343, 'synset': 'cartridge.n.01', 'name': 'cartridge'}, {'id': 6344, 'synset': 'cartridge.n.04', 'name': 'cartridge'}, {'id': 6345, 'synset': 'cartridge_belt.n.01', 'name': 'cartridge_belt'}, {'id': 6346, 'synset': 'cartridge_extractor.n.01', 'name': 'cartridge_extractor'}, {'id': 6347, 'synset': 'cartridge_fuse.n.01', 'name': 'cartridge_fuse'}, {'id': 6348, 'synset': 'cartridge_holder.n.01', 'name': 'cartridge_holder'}, {'id': 6349, 'synset': 'cartwheel.n.01', 'name': 'cartwheel'}, {'id': 6350, 'synset': 'carving_fork.n.01', 'name': 'carving_fork'}, {'id': 6351, 'synset': 'carving_knife.n.01', 'name': 'carving_knife'}, {'id': 6352, 'synset': 'car_wheel.n.01', 'name': 'car_wheel'}, {'id': 6353, 'synset': 'caryatid.n.01', 'name': 'caryatid'}, {'id': 6354, 'synset': 'cascade_liquefier.n.01', 'name': 'cascade_liquefier'}, {'id': 6355, 'synset': 'cascade_transformer.n.01', 'name': 'cascade_transformer'}, {'id': 6356, 'synset': 'case.n.05', 'name': 'case'}, {'id': 6357, 'synset': 'case.n.20', 'name': 'case'}, {'id': 6358, 'synset': 'case.n.18', 'name': 'case'}, {'id': 6359, 'synset': 'casein_paint.n.01', 'name': 'casein_paint'}, {'id': 6360, 'synset': 'case_knife.n.02', 'name': 'case_knife'}, {'id': 6361, 'synset': 'case_knife.n.01', 'name': 'case_knife'}, {'id': 6362, 'synset': 'casement.n.01', 'name': 'casement'}, {'id': 6363, 'synset': 'casement_window.n.01', 'name': 'casement_window'}, {'id': 6364, 'synset': 'casern.n.01', 'name': 'casern'}, {'id': 6365, 'synset': 'case_shot.n.01', 'name': 'case_shot'}, {'id': 6366, 'synset': 'cash_bar.n.01', 'name': 'cash_bar'}, {'id': 6367, 'synset': 'cashbox.n.01', 'name': 'cashbox'}, {'id': 6368, 'synset': 'cash_machine.n.01', 'name': 'cash_machine'}, {'id': 6369, 'synset': 'cashmere.n.01', 'name': 'cashmere'}, {'id': 6370, 'synset': 'casing.n.03', 'name': 'casing'}, {'id': 6371, 'synset': 'casino.n.01', 'name': 'casino'}, {'id': 6372, 'synset': 'casket.n.02', 'name': 'casket'}, {'id': 6373, 'synset': 'casque.n.01', 'name': 'casque'}, {'id': 6374, 'synset': 'casquet.n.01', 'name': 'casquet'}, {'id': 6375, 'synset': 'cassegrainian_telescope.n.01', 'name': 'Cassegrainian_telescope'}, {'id': 6376, 'synset': 'casserole.n.02', 'name': 'casserole'}, {'id': 6377, 'synset': 'cassette_deck.n.01', 'name': 'cassette_deck'}, {'id': 6378, 'synset': 'cassette_player.n.01', 'name': 'cassette_player'}, {'id': 6379, 'synset': 'cassette_recorder.n.01', 'name': 'cassette_recorder'}, {'id': 6380, 'synset': 'cassette_tape.n.01', 'name': 'cassette_tape'}, {'id': 6381, 'synset': 'cassock.n.01', 'name': 'cassock'}, {'id': 6382, 'synset': 'caster.n.03', 'name': 'caster'}, {'id': 6383, 'synset': 'caster.n.02', 'name': 'caster'}, {'id': 6384, 'synset': 'castle.n.02', 'name': 'castle'}, {'id': 6385, 'synset': 'castle.n.03', 'name': 'castle'}, {'id': 6386, 'synset': 'catacomb.n.01', 'name': 'catacomb'}, {'id': 6387, 'synset': 'catafalque.n.01', 'name': 'catafalque'}, {'id': 6388, 'synset': 'catalytic_converter.n.01', 'name': 'catalytic_converter'}, {'id': 6389, 'synset': 'catalytic_cracker.n.01', 'name': 'catalytic_cracker'}, {'id': 6390, 'synset': 'catamaran.n.01', 'name': 'catamaran'}, {'id': 6391, 'synset': 'catapult.n.03', 'name': 'catapult'}, {'id': 6392, 'synset': 'catapult.n.02', 'name': 'catapult'}, {'id': 6393, 'synset': 'catboat.n.01', 'name': 'catboat'}, {'id': 6394, 'synset': 'cat_box.n.01', 'name': 'cat_box'}, {'id': 6395, 'synset': 'catch.n.07', 'name': 'catch'}, {'id': 6396, 'synset': 'catchall.n.01', 'name': 'catchall'}, {'id': 6397, 'synset': "catcher's_mask.n.01", 'name': "catcher's_mask"}, {'id': 6398, 'synset': 'catchment.n.01', 'name': 'catchment'}, {'id': 6399, 'synset': 'caterpillar.n.02', 'name': 'Caterpillar'}, {'id': 6400, 'synset': 'cathedra.n.01', 'name': 'cathedra'}, {'id': 6401, 'synset': 'cathedral.n.01', 'name': 'cathedral'}, {'id': 6402, 'synset': 'cathedral.n.02', 'name': 'cathedral'}, {'id': 6403, 'synset': 'catheter.n.01', 'name': 'catheter'}, {'id': 6404, 'synset': 'cathode.n.01', 'name': 'cathode'}, {'id': 6405, 'synset': 'cathode-ray_tube.n.01', 'name': 'cathode-ray_tube'}, {'id': 6406, 'synset': "cat-o'-nine-tails.n.01", 'name': "cat-o'-nine-tails"}, {'id': 6407, 'synset': "cat's-paw.n.02", 'name': "cat's-paw"}, {'id': 6408, 'synset': 'catsup_bottle.n.01', 'name': 'catsup_bottle'}, {'id': 6409, 'synset': 'cattle_car.n.01', 'name': 'cattle_car'}, {'id': 6410, 'synset': 'cattle_guard.n.01', 'name': 'cattle_guard'}, {'id': 6411, 'synset': 'cattleship.n.01', 'name': 'cattleship'}, {'id': 6412, 'synset': 'cautery.n.01', 'name': 'cautery'}, {'id': 6413, 'synset': 'cavalier_hat.n.01', 'name': 'cavalier_hat'}, {'id': 6414, 'synset': 'cavalry_sword.n.01', 'name': 'cavalry_sword'}, {'id': 6415, 'synset': 'cavetto.n.01', 'name': 'cavetto'}, {'id': 6416, 'synset': 'cavity_wall.n.01', 'name': 'cavity_wall'}, {'id': 6417, 'synset': 'c_battery.n.01', 'name': 'C_battery'}, {'id': 6418, 'synset': 'c-clamp.n.01', 'name': 'C-clamp'}, {'id': 6419, 'synset': 'cd_drive.n.01', 'name': 'CD_drive'}, {'id': 6420, 'synset': 'cd-r.n.01', 'name': 'CD-R'}, {'id': 6421, 'synset': 'cd-rom.n.01', 'name': 'CD-ROM'}, {'id': 6422, 'synset': 'cd-rom_drive.n.01', 'name': 'CD-ROM_drive'}, {'id': 6423, 'synset': 'cedar_chest.n.01', 'name': 'cedar_chest'}, {'id': 6424, 'synset': 'ceiling.n.01', 'name': 'ceiling'}, {'id': 6425, 'synset': 'celesta.n.01', 'name': 'celesta'}, {'id': 6426, 'synset': 'cell.n.03', 'name': 'cell'}, {'id': 6427, 'synset': 'cell.n.07', 'name': 'cell'}, {'id': 6428, 'synset': 'cellar.n.03', 'name': 'cellar'}, {'id': 6429, 'synset': 'cellblock.n.01', 'name': 'cellblock'}, {'id': 6430, 'synset': 'cello.n.01', 'name': 'cello'}, {'id': 6431, 'synset': 'cellophane.n.01', 'name': 'cellophane'}, {'id': 6432, 'synset': 'cellulose_tape.n.01', 'name': 'cellulose_tape'}, {'id': 6433, 'synset': 'cenotaph.n.01', 'name': 'cenotaph'}, {'id': 6434, 'synset': 'censer.n.01', 'name': 'censer'}, {'id': 6435, 'synset': 'center.n.03', 'name': 'center'}, {'id': 6436, 'synset': 'center_punch.n.01', 'name': 'center_punch'}, {'id': 6437, 'synset': 'centigrade_thermometer.n.01', 'name': 'Centigrade_thermometer'}, {'id': 6438, 'synset': 'central_processing_unit.n.01', 'name': 'central_processing_unit'}, {'id': 6439, 'synset': 'centrifugal_pump.n.01', 'name': 'centrifugal_pump'}, {'id': 6440, 'synset': 'centrifuge.n.01', 'name': 'centrifuge'}, {'id': 6441, 'synset': 'ceramic.n.01', 'name': 'ceramic'}, {'id': 6442, 'synset': 'ceramic_ware.n.01', 'name': 'ceramic_ware'}, {'id': 6443, 'synset': 'cereal_bowl.n.01', 'name': 'cereal_bowl'}, {'id': 6444, 'synset': 'cereal_box.n.01', 'name': 'cereal_box'}, {'id': 6445, 'synset': 'cerecloth.n.01', 'name': 'cerecloth'}, {'id': 6446, 'synset': 'cesspool.n.01', 'name': 'cesspool'}, {'id': 6447, 'synset': 'chachka.n.02', 'name': 'chachka'}, {'id': 6448, 'synset': 'chador.n.01', 'name': 'chador'}, {'id': 6449, 'synset': 'chafing_dish.n.01', 'name': 'chafing_dish'}, {'id': 6450, 'synset': 'chain.n.03', 'name': 'chain'}, {'id': 6451, 'synset': 'chain.n.05', 'name': 'chain'}, {'id': 6452, 'synset': 'chainlink_fence.n.01', 'name': 'chainlink_fence'}, {'id': 6453, 'synset': 'chain_printer.n.01', 'name': 'chain_printer'}, {'id': 6454, 'synset': 'chain_saw.n.01', 'name': 'chain_saw'}, {'id': 6455, 'synset': 'chain_store.n.01', 'name': 'chain_store'}, {'id': 6456, 'synset': 'chain_tongs.n.01', 'name': 'chain_tongs'}, {'id': 6457, 'synset': 'chain_wrench.n.01', 'name': 'chain_wrench'}, {'id': 6458, 'synset': 'chair.n.05', 'name': 'chair'}, {'id': 6459, 'synset': 'chair_of_state.n.01', 'name': 'chair_of_state'}, {'id': 6460, 'synset': 'chairlift.n.01', 'name': 'chairlift'}, {'id': 6461, 'synset': 'chaise.n.02', 'name': 'chaise'}, {'id': 6462, 'synset': 'chalet.n.01', 'name': 'chalet'}, {'id': 6463, 'synset': 'chalk.n.04', 'name': 'chalk'}, {'id': 6464, 'synset': 'challis.n.01', 'name': 'challis'}, {'id': 6465, 'synset': 'chamberpot.n.01', 'name': 'chamberpot'}, {'id': 6466, 'synset': 'chambray.n.01', 'name': 'chambray'}, {'id': 6467, 'synset': 'chamfer_bit.n.01', 'name': 'chamfer_bit'}, {'id': 6468, 'synset': 'chamfer_plane.n.01', 'name': 'chamfer_plane'}, {'id': 6469, 'synset': 'chamois_cloth.n.01', 'name': 'chamois_cloth'}, {'id': 6470, 'synset': 'chancel.n.01', 'name': 'chancel'}, {'id': 6471, 'synset': 'chancellery.n.01', 'name': 'chancellery'}, {'id': 6472, 'synset': 'chancery.n.02', 'name': 'chancery'}, {'id': 6473, 'synset': 'chandlery.n.01', 'name': 'chandlery'}, {'id': 6474, 'synset': 'chanfron.n.01', 'name': 'chanfron'}, {'id': 6475, 'synset': 'chanter.n.01', 'name': 'chanter'}, {'id': 6476, 'synset': 'chantry.n.02', 'name': 'chantry'}, {'id': 6477, 'synset': 'chapel.n.01', 'name': 'chapel'}, {'id': 6478, 'synset': 'chapterhouse.n.02', 'name': 'chapterhouse'}, {'id': 6479, 'synset': 'chapterhouse.n.01', 'name': 'chapterhouse'}, {'id': 6480, 'synset': 'character_printer.n.01', 'name': 'character_printer'}, {'id': 6481, 'synset': 'charcuterie.n.01', 'name': 'charcuterie'}, {'id': 6482, 'synset': 'charge-exchange_accelerator.n.01', 'name': 'charge-exchange_accelerator'}, {'id': 6483, 'synset': 'charger.n.02', 'name': 'charger'}, {'id': 6484, 'synset': 'chariot.n.01', 'name': 'chariot'}, {'id': 6485, 'synset': 'chariot.n.02', 'name': 'chariot'}, {'id': 6486, 'synset': 'charnel_house.n.01', 'name': 'charnel_house'}, {'id': 6487, 'synset': 'chassis.n.03', 'name': 'chassis'}, {'id': 6488, 'synset': 'chassis.n.02', 'name': 'chassis'}, {'id': 6489, 'synset': 'chasuble.n.01', 'name': 'chasuble'}, {'id': 6490, 'synset': 'chateau.n.01', 'name': 'chateau'}, {'id': 6491, 'synset': 'chatelaine.n.02', 'name': 'chatelaine'}, {'id': 6492, 'synset': 'checker.n.03', 'name': 'checker'}, {'id': 6493, 'synset': 'checkout.n.03', 'name': 'checkout'}, {'id': 6494, 'synset': 'cheekpiece.n.01', 'name': 'cheekpiece'}, {'id': 6495, 'synset': 'cheeseboard.n.01', 'name': 'cheeseboard'}, {'id': 6496, 'synset': 'cheesecloth.n.01', 'name': 'cheesecloth'}, {'id': 6497, 'synset': 'cheese_cutter.n.01', 'name': 'cheese_cutter'}, {'id': 6498, 'synset': 'cheese_press.n.01', 'name': 'cheese_press'}, {'id': 6499, 'synset': 'chemical_bomb.n.01', 'name': 'chemical_bomb'}, {'id': 6500, 'synset': 'chemical_plant.n.01', 'name': 'chemical_plant'}, {'id': 6501, 'synset': 'chemical_reactor.n.01', 'name': 'chemical_reactor'}, {'id': 6502, 'synset': 'chemise.n.02', 'name': 'chemise'}, {'id': 6503, 'synset': 'chemise.n.01', 'name': 'chemise'}, {'id': 6504, 'synset': 'chenille.n.02', 'name': 'chenille'}, {'id': 6505, 'synset': 'chessman.n.01', 'name': 'chessman'}, {'id': 6506, 'synset': 'chest.n.02', 'name': 'chest'}, {'id': 6507, 'synset': 'chesterfield.n.02', 'name': 'chesterfield'}, {'id': 6508, 'synset': 'chest_of_drawers.n.01', 'name': 'chest_of_drawers'}, {'id': 6509, 'synset': 'chest_protector.n.01', 'name': 'chest_protector'}, {'id': 6510, 'synset': 'cheval-de-frise.n.01', 'name': 'cheval-de-frise'}, {'id': 6511, 'synset': 'cheval_glass.n.01', 'name': 'cheval_glass'}, {'id': 6512, 'synset': 'chicane.n.02', 'name': 'chicane'}, {'id': 6513, 'synset': 'chicken_coop.n.01', 'name': 'chicken_coop'}, {'id': 6514, 'synset': 'chicken_wire.n.01', 'name': 'chicken_wire'}, {'id': 6515, 'synset': 'chicken_yard.n.01', 'name': 'chicken_yard'}, {'id': 6516, 'synset': 'chiffon.n.01', 'name': 'chiffon'}, {'id': 6517, 'synset': 'chiffonier.n.01', 'name': 'chiffonier'}, {'id': 6518, 'synset': "child's_room.n.01", 'name': "child's_room"}, {'id': 6519, 'synset': 'chimney_breast.n.01', 'name': 'chimney_breast'}, {'id': 6520, 'synset': 'chimney_corner.n.01', 'name': 'chimney_corner'}, {'id': 6521, 'synset': 'china.n.02', 'name': 'china'}, {'id': 6522, 'synset': 'china_cabinet.n.01', 'name': 'china_cabinet'}, {'id': 6523, 'synset': 'chinchilla.n.02', 'name': 'chinchilla'}, {'id': 6524, 'synset': 'chinese_lantern.n.01', 'name': 'Chinese_lantern'}, {'id': 6525, 'synset': 'chinese_puzzle.n.01', 'name': 'Chinese_puzzle'}, {'id': 6526, 'synset': 'chinning_bar.n.01', 'name': 'chinning_bar'}, {'id': 6527, 'synset': 'chino.n.02', 'name': 'chino'}, {'id': 6528, 'synset': 'chino.n.01', 'name': 'chino'}, {'id': 6529, 'synset': 'chin_rest.n.01', 'name': 'chin_rest'}, {'id': 6530, 'synset': 'chin_strap.n.01', 'name': 'chin_strap'}, {'id': 6531, 'synset': 'chintz.n.01', 'name': 'chintz'}, {'id': 6532, 'synset': 'chip.n.07', 'name': 'chip'}, {'id': 6533, 'synset': 'chisel.n.01', 'name': 'chisel'}, {'id': 6534, 'synset': 'chlamys.n.02', 'name': 'chlamys'}, {'id': 6535, 'synset': 'choir.n.03', 'name': 'choir'}, {'id': 6536, 'synset': 'choir_loft.n.01', 'name': 'choir_loft'}, {'id': 6537, 'synset': 'choke.n.02', 'name': 'choke'}, {'id': 6538, 'synset': 'choke.n.01', 'name': 'choke'}, {'id': 6539, 'synset': 'chokey.n.01', 'name': 'chokey'}, {'id': 6540, 'synset': 'choo-choo.n.01', 'name': 'choo-choo'}, {'id': 6541, 'synset': 'chopine.n.01', 'name': 'chopine'}, {'id': 6542, 'synset': 'chordophone.n.01', 'name': 'chordophone'}, {'id': 6543, 'synset': 'christmas_stocking.n.01', 'name': 'Christmas_stocking'}, {'id': 6544, 'synset': 'chronograph.n.01', 'name': 'chronograph'}, {'id': 6545, 'synset': 'chronometer.n.01', 'name': 'chronometer'}, {'id': 6546, 'synset': 'chronoscope.n.01', 'name': 'chronoscope'}, {'id': 6547, 'synset': 'chuck.n.03', 'name': 'chuck'}, {'id': 6548, 'synset': 'chuck_wagon.n.01', 'name': 'chuck_wagon'}, {'id': 6549, 'synset': 'chukka.n.02', 'name': 'chukka'}, {'id': 6550, 'synset': 'church.n.02', 'name': 'church'}, {'id': 6551, 'synset': 'church_bell.n.01', 'name': 'church_bell'}, {'id': 6552, 'synset': 'church_hat.n.01', 'name': 'church_hat'}, {'id': 6553, 'synset': 'church_key.n.01', 'name': 'church_key'}, {'id': 6554, 'synset': 'church_tower.n.01', 'name': 'church_tower'}, {'id': 6555, 'synset': 'churidars.n.01', 'name': 'churidars'}, {'id': 6556, 'synset': 'churn.n.01', 'name': 'churn'}, {'id': 6557, 'synset': 'ciderpress.n.01', 'name': 'ciderpress'}, {'id': 6558, 'synset': 'cigar_band.n.01', 'name': 'cigar_band'}, {'id': 6559, 'synset': 'cigar_cutter.n.01', 'name': 'cigar_cutter'}, {'id': 6560, 'synset': 'cigarette_butt.n.01', 'name': 'cigarette_butt'}, {'id': 6561, 'synset': 'cigarette_holder.n.01', 'name': 'cigarette_holder'}, {'id': 6562, 'synset': 'cigar_lighter.n.01', 'name': 'cigar_lighter'}, {'id': 6563, 'synset': 'cinch.n.02', 'name': 'cinch'}, {'id': 6564, 'synset': 'cinema.n.02', 'name': 'cinema'}, {'id': 6565, 'synset': 'cinquefoil.n.02', 'name': 'cinquefoil'}, {'id': 6566, 'synset': 'circle.n.08', 'name': 'circle'}, {'id': 6567, 'synset': 'circlet.n.02', 'name': 'circlet'}, {'id': 6568, 'synset': 'circuit.n.01', 'name': 'circuit'}, {'id': 6569, 'synset': 'circuit_board.n.01', 'name': 'circuit_board'}, {'id': 6570, 'synset': 'circuit_breaker.n.01', 'name': 'circuit_breaker'}, {'id': 6571, 'synset': 'circuitry.n.01', 'name': 'circuitry'}, {'id': 6572, 'synset': 'circular_plane.n.01', 'name': 'circular_plane'}, {'id': 6573, 'synset': 'circular_saw.n.01', 'name': 'circular_saw'}, {'id': 6574, 'synset': 'circus_tent.n.01', 'name': 'circus_tent'}, {'id': 6575, 'synset': 'cistern.n.03', 'name': 'cistern'}, {'id': 6576, 'synset': 'cittern.n.01', 'name': 'cittern'}, {'id': 6577, 'synset': 'city_hall.n.01', 'name': 'city_hall'}, {'id': 6578, 'synset': 'cityscape.n.02', 'name': 'cityscape'}, {'id': 6579, 'synset': 'city_university.n.01', 'name': 'city_university'}, {'id': 6580, 'synset': 'civies.n.01', 'name': 'civies'}, {'id': 6581, 'synset': 'civilian_clothing.n.01', 'name': 'civilian_clothing'}, {'id': 6582, 'synset': 'clack_valve.n.01', 'name': 'clack_valve'}, {'id': 6583, 'synset': 'clamp.n.01', 'name': 'clamp'}, {'id': 6584, 'synset': 'clamshell.n.02', 'name': 'clamshell'}, {'id': 6585, 'synset': 'clapper.n.03', 'name': 'clapper'}, {'id': 6586, 'synset': 'clapperboard.n.01', 'name': 'clapperboard'}, {'id': 6587, 'synset': 'clarence.n.01', 'name': 'clarence'}, {'id': 6588, 'synset': 'clark_cell.n.01', 'name': 'Clark_cell'}, {'id': 6589, 'synset': 'clasp_knife.n.01', 'name': 'clasp_knife'}, {'id': 6590, 'synset': 'classroom.n.01', 'name': 'classroom'}, {'id': 6591, 'synset': 'clavichord.n.01', 'name': 'clavichord'}, {'id': 6592, 'synset': 'clavier.n.02', 'name': 'clavier'}, {'id': 6593, 'synset': 'clay_pigeon.n.01', 'name': 'clay_pigeon'}, {'id': 6594, 'synset': 'claymore_mine.n.01', 'name': 'claymore_mine'}, {'id': 6595, 'synset': 'claymore.n.01', 'name': 'claymore'}, {'id': 6596, 'synset': 'cleaners.n.01', 'name': 'cleaners'}, {'id': 6597, 'synset': 'cleaning_implement.n.01', 'name': 'cleaning_implement'}, {'id': 6598, 'synset': 'cleaning_pad.n.01', 'name': 'cleaning_pad'}, {'id': 6599, 'synset': 'clean_room.n.01', 'name': 'clean_room'}, {'id': 6600, 'synset': 'clearway.n.01', 'name': 'clearway'}, {'id': 6601, 'synset': 'cleat.n.01', 'name': 'cleat'}, {'id': 6602, 'synset': 'cleats.n.01', 'name': 'cleats'}, {'id': 6603, 'synset': 'cleaver.n.01', 'name': 'cleaver'}, {'id': 6604, 'synset': 'clerestory.n.01', 'name': 'clerestory'}, {'id': 6605, 'synset': 'clevis.n.01', 'name': 'clevis'}, {'id': 6606, 'synset': 'clews.n.01', 'name': 'clews'}, {'id': 6607, 'synset': 'cliff_dwelling.n.01', 'name': 'cliff_dwelling'}, {'id': 6608, 'synset': 'climbing_frame.n.01', 'name': 'climbing_frame'}, {'id': 6609, 'synset': 'clinch.n.03', 'name': 'clinch'}, {'id': 6610, 'synset': 'clinch.n.02', 'name': 'clinch'}, {'id': 6611, 'synset': 'clincher.n.03', 'name': 'clincher'}, {'id': 6612, 'synset': 'clinic.n.03', 'name': 'clinic'}, {'id': 6613, 'synset': 'clinical_thermometer.n.01', 'name': 'clinical_thermometer'}, {'id': 6614, 'synset': 'clinker.n.02', 'name': 'clinker'}, {'id': 6615, 'synset': 'clinometer.n.01', 'name': 'clinometer'}, {'id': 6616, 'synset': 'clip_lead.n.01', 'name': 'clip_lead'}, {'id': 6617, 'synset': 'clip-on.n.01', 'name': 'clip-on'}, {'id': 6618, 'synset': 'clipper.n.04', 'name': 'clipper'}, {'id': 6619, 'synset': 'clipper.n.02', 'name': 'clipper'}, {'id': 6620, 'synset': 'cloak.n.01', 'name': 'cloak'}, {'id': 6621, 'synset': 'cloakroom.n.02', 'name': 'cloakroom'}, {'id': 6622, 'synset': 'cloche.n.02', 'name': 'cloche'}, {'id': 6623, 'synset': 'cloche.n.01', 'name': 'cloche'}, {'id': 6624, 'synset': 'clock_pendulum.n.01', 'name': 'clock_pendulum'}, {'id': 6625, 'synset': 'clock_radio.n.01', 'name': 'clock_radio'}, {'id': 6626, 'synset': 'clockwork.n.01', 'name': 'clockwork'}, {'id': 6627, 'synset': 'clog.n.01', 'name': 'clog'}, {'id': 6628, 'synset': 'cloisonne.n.01', 'name': 'cloisonne'}, {'id': 6629, 'synset': 'cloister.n.02', 'name': 'cloister'}, {'id': 6630, 'synset': 'closed_circuit.n.01', 'name': 'closed_circuit'}, {'id': 6631, 'synset': 'closed-circuit_television.n.01', 'name': 'closed-circuit_television'}, {'id': 6632, 'synset': 'closed_loop.n.01', 'name': 'closed_loop'}, {'id': 6633, 'synset': 'closet.n.04', 'name': 'closet'}, {'id': 6634, 'synset': 'closeup_lens.n.01', 'name': 'closeup_lens'}, {'id': 6635, 'synset': 'cloth_cap.n.01', 'name': 'cloth_cap'}, {'id': 6636, 'synset': 'cloth_covering.n.01', 'name': 'cloth_covering'}, {'id': 6637, 'synset': 'clothesbrush.n.01', 'name': 'clothesbrush'}, {'id': 6638, 'synset': 'clothes_closet.n.01', 'name': 'clothes_closet'}, {'id': 6639, 'synset': 'clothes_dryer.n.01', 'name': 'clothes_dryer'}, {'id': 6640, 'synset': 'clotheshorse.n.01', 'name': 'clotheshorse'}, {'id': 6641, 'synset': 'clothes_tree.n.01', 'name': 'clothes_tree'}, {'id': 6642, 'synset': 'clothing.n.01', 'name': 'clothing'}, {'id': 6643, 'synset': 'clothing_store.n.01', 'name': 'clothing_store'}, {'id': 6644, 'synset': 'clout_nail.n.01', 'name': 'clout_nail'}, {'id': 6645, 'synset': 'clove_hitch.n.01', 'name': 'clove_hitch'}, {'id': 6646, 'synset': 'club_car.n.01', 'name': 'club_car'}, {'id': 6647, 'synset': 'clubroom.n.01', 'name': 'clubroom'}, {'id': 6648, 'synset': 'cluster_bomb.n.01', 'name': 'cluster_bomb'}, {'id': 6649, 'synset': 'clutch.n.07', 'name': 'clutch'}, {'id': 6650, 'synset': 'clutch.n.06', 'name': 'clutch'}, {'id': 6651, 'synset': 'coach.n.04', 'name': 'coach'}, {'id': 6652, 'synset': 'coach_house.n.01', 'name': 'coach_house'}, {'id': 6653, 'synset': 'coal_car.n.01', 'name': 'coal_car'}, {'id': 6654, 'synset': 'coal_chute.n.01', 'name': 'coal_chute'}, {'id': 6655, 'synset': 'coal_house.n.01', 'name': 'coal_house'}, {'id': 6656, 'synset': 'coal_shovel.n.01', 'name': 'coal_shovel'}, {'id': 6657, 'synset': 'coaming.n.01', 'name': 'coaming'}, {'id': 6658, 'synset': 'coaster_brake.n.01', 'name': 'coaster_brake'}, {'id': 6659, 'synset': 'coat_button.n.01', 'name': 'coat_button'}, {'id': 6660, 'synset': 'coat_closet.n.01', 'name': 'coat_closet'}, {'id': 6661, 'synset': 'coatdress.n.01', 'name': 'coatdress'}, {'id': 6662, 'synset': 'coatee.n.01', 'name': 'coatee'}, {'id': 6663, 'synset': 'coating.n.01', 'name': 'coating'}, {'id': 6664, 'synset': 'coating.n.03', 'name': 'coating'}, {'id': 6665, 'synset': 'coat_of_paint.n.01', 'name': 'coat_of_paint'}, {'id': 6666, 'synset': 'coattail.n.01', 'name': 'coattail'}, {'id': 6667, 'synset': 'coaxial_cable.n.01', 'name': 'coaxial_cable'}, {'id': 6668, 'synset': 'cobweb.n.03', 'name': 'cobweb'}, {'id': 6669, 'synset': 'cobweb.n.01', 'name': 'cobweb'}, {'id': 6670, 'synset': 'cockcroft_and_walton_accelerator.n.01', 'name': 'Cockcroft_and_Walton_accelerator'}, {'id': 6671, 'synset': 'cocked_hat.n.01', 'name': 'cocked_hat'}, {'id': 6672, 'synset': 'cockhorse.n.01', 'name': 'cockhorse'}, {'id': 6673, 'synset': 'cockleshell.n.01', 'name': 'cockleshell'}, {'id': 6674, 'synset': 'cockpit.n.01', 'name': 'cockpit'}, {'id': 6675, 'synset': 'cockpit.n.03', 'name': 'cockpit'}, {'id': 6676, 'synset': 'cockpit.n.02', 'name': 'cockpit'}, {'id': 6677, 'synset': 'cockscomb.n.03', 'name': 'cockscomb'}, {'id': 6678, 'synset': 'cocktail_dress.n.01', 'name': 'cocktail_dress'}, {'id': 6679, 'synset': 'cocktail_lounge.n.01', 'name': 'cocktail_lounge'}, {'id': 6680, 'synset': 'cocktail_shaker.n.01', 'name': 'cocktail_shaker'}, {'id': 6681, 'synset': 'cocotte.n.02', 'name': 'cocotte'}, {'id': 6682, 'synset': 'codpiece.n.01', 'name': 'codpiece'}, {'id': 6683, 'synset': 'coelostat.n.01', 'name': 'coelostat'}, {'id': 6684, 'synset': 'coffee_can.n.01', 'name': 'coffee_can'}, {'id': 6685, 'synset': 'coffee_cup.n.01', 'name': 'coffee_cup'}, {'id': 6686, 'synset': 'coffee_filter.n.01', 'name': 'coffee_filter'}, {'id': 6687, 'synset': 'coffee_mill.n.01', 'name': 'coffee_mill'}, {'id': 6688, 'synset': 'coffee_mug.n.01', 'name': 'coffee_mug'}, {'id': 6689, 'synset': 'coffee_stall.n.01', 'name': 'coffee_stall'}, {'id': 6690, 'synset': 'coffee_urn.n.01', 'name': 'coffee_urn'}, {'id': 6691, 'synset': 'coffer.n.02', 'name': 'coffer'}, {'id': 6692, 'synset': 'coffey_still.n.01', 'name': 'Coffey_still'}, {'id': 6693, 'synset': 'coffin.n.01', 'name': 'coffin'}, {'id': 6694, 'synset': 'cog.n.02', 'name': 'cog'}, {'id': 6695, 'synset': 'coif.n.02', 'name': 'coif'}, {'id': 6696, 'synset': 'coil.n.01', 'name': 'coil'}, {'id': 6697, 'synset': 'coil.n.06', 'name': 'coil'}, {'id': 6698, 'synset': 'coil.n.03', 'name': 'coil'}, {'id': 6699, 'synset': 'coil_spring.n.01', 'name': 'coil_spring'}, {'id': 6700, 'synset': 'coin_box.n.01', 'name': 'coin_box'}, {'id': 6701, 'synset': 'cold_cathode.n.01', 'name': 'cold_cathode'}, {'id': 6702, 'synset': 'cold_chisel.n.01', 'name': 'cold_chisel'}, {'id': 6703, 'synset': 'cold_cream.n.01', 'name': 'cold_cream'}, {'id': 6704, 'synset': 'cold_frame.n.01', 'name': 'cold_frame'}, {'id': 6705, 'synset': 'collar.n.01', 'name': 'collar'}, {'id': 6706, 'synset': 'collar.n.03', 'name': 'collar'}, {'id': 6707, 'synset': 'college.n.03', 'name': 'college'}, {'id': 6708, 'synset': 'collet.n.02', 'name': 'collet'}, {'id': 6709, 'synset': 'collider.n.01', 'name': 'collider'}, {'id': 6710, 'synset': 'colliery.n.01', 'name': 'colliery'}, {'id': 6711, 'synset': 'collimator.n.02', 'name': 'collimator'}, {'id': 6712, 'synset': 'collimator.n.01', 'name': 'collimator'}, {'id': 6713, 'synset': 'cologne.n.02', 'name': 'cologne'}, {'id': 6714, 'synset': 'colonnade.n.01', 'name': 'colonnade'}, {'id': 6715, 'synset': 'colonoscope.n.01', 'name': 'colonoscope'}, {'id': 6716, 'synset': 'colorimeter.n.01', 'name': 'colorimeter'}, {'id': 6717, 'synset': 'colors.n.02', 'name': 'colors'}, {'id': 6718, 'synset': 'color_television.n.01', 'name': 'color_television'}, {'id': 6719, 'synset': 'color_tube.n.01', 'name': 'color_tube'}, {'id': 6720, 'synset': 'color_wash.n.01', 'name': 'color_wash'}, {'id': 6721, 'synset': 'colt.n.02', 'name': 'Colt'}, {'id': 6722, 'synset': 'colter.n.01', 'name': 'colter'}, {'id': 6723, 'synset': 'columbarium.n.03', 'name': 'columbarium'}, {'id': 6724, 'synset': 'columbarium.n.02', 'name': 'columbarium'}, {'id': 6725, 'synset': 'column.n.07', 'name': 'column'}, {'id': 6726, 'synset': 'column.n.06', 'name': 'column'}, {'id': 6727, 'synset': 'comb.n.01', 'name': 'comb'}, {'id': 6728, 'synset': 'comb.n.03', 'name': 'comb'}, {'id': 6729, 'synset': 'comber.n.03', 'name': 'comber'}, {'id': 6730, 'synset': 'combination_plane.n.01', 'name': 'combination_plane'}, {'id': 6731, 'synset': 'combine.n.01', 'name': 'combine'}, {'id': 6732, 'synset': 'command_module.n.01', 'name': 'command_module'}, {'id': 6733, 'synset': 'commissary.n.01', 'name': 'commissary'}, {'id': 6734, 'synset': 'commissary.n.02', 'name': 'commissary'}, {'id': 6735, 'synset': 'commodity.n.01', 'name': 'commodity'}, {'id': 6736, 'synset': 'common_ax.n.01', 'name': 'common_ax'}, {'id': 6737, 'synset': 'common_room.n.01', 'name': 'common_room'}, {'id': 6738, 'synset': 'communications_satellite.n.01', 'name': 'communications_satellite'}, {'id': 6739, 'synset': 'communication_system.n.01', 'name': 'communication_system'}, {'id': 6740, 'synset': 'community_center.n.01', 'name': 'community_center'}, {'id': 6741, 'synset': 'commutator.n.01', 'name': 'commutator'}, {'id': 6742, 'synset': 'commuter.n.01', 'name': 'commuter'}, {'id': 6743, 'synset': 'compact.n.01', 'name': 'compact'}, {'id': 6744, 'synset': 'compact.n.03', 'name': 'compact'}, {'id': 6745, 'synset': 'compact_disk.n.01', 'name': 'compact_disk'}, {'id': 6746, 'synset': 'compact-disk_burner.n.01', 'name': 'compact-disk_burner'}, {'id': 6747, 'synset': 'companionway.n.01', 'name': 'companionway'}, {'id': 6748, 'synset': 'compartment.n.02', 'name': 'compartment'}, {'id': 6749, 'synset': 'compartment.n.01', 'name': 'compartment'}, {'id': 6750, 'synset': 'compass.n.04', 'name': 'compass'}, {'id': 6751, 'synset': 'compass_card.n.01', 'name': 'compass_card'}, {'id': 6752, 'synset': 'compass_saw.n.01', 'name': 'compass_saw'}, {'id': 6753, 'synset': 'compound.n.03', 'name': 'compound'}, {'id': 6754, 'synset': 'compound_lens.n.01', 'name': 'compound_lens'}, {'id': 6755, 'synset': 'compound_lever.n.01', 'name': 'compound_lever'}, {'id': 6756, 'synset': 'compound_microscope.n.01', 'name': 'compound_microscope'}, {'id': 6757, 'synset': 'compress.n.01', 'name': 'compress'}, {'id': 6758, 'synset': 'compression_bandage.n.01', 'name': 'compression_bandage'}, {'id': 6759, 'synset': 'compressor.n.01', 'name': 'compressor'}, {'id': 6760, 'synset': 'computer.n.01', 'name': 'computer'}, {'id': 6761, 'synset': 'computer_circuit.n.01', 'name': 'computer_circuit'}, {'id': 6762, 'synset': 'computerized_axial_tomography_scanner.n.01', 'name': 'computerized_axial_tomography_scanner'}, {'id': 6763, 'synset': 'computer_monitor.n.01', 'name': 'computer_monitor'}, {'id': 6764, 'synset': 'computer_network.n.01', 'name': 'computer_network'}, {'id': 6765, 'synset': 'computer_screen.n.01', 'name': 'computer_screen'}, {'id': 6766, 'synset': 'computer_store.n.01', 'name': 'computer_store'}, {'id': 6767, 'synset': 'computer_system.n.01', 'name': 'computer_system'}, {'id': 6768, 'synset': 'concentration_camp.n.01', 'name': 'concentration_camp'}, {'id': 6769, 'synset': 'concert_grand.n.01', 'name': 'concert_grand'}, {'id': 6770, 'synset': 'concert_hall.n.01', 'name': 'concert_hall'}, {'id': 6771, 'synset': 'concertina.n.02', 'name': 'concertina'}, {'id': 6772, 'synset': 'concertina.n.01', 'name': 'concertina'}, {'id': 6773, 'synset': 'concrete_mixer.n.01', 'name': 'concrete_mixer'}, {'id': 6774, 'synset': 'condensation_pump.n.01', 'name': 'condensation_pump'}, {'id': 6775, 'synset': 'condenser.n.04', 'name': 'condenser'}, {'id': 6776, 'synset': 'condenser.n.03', 'name': 'condenser'}, {'id': 6777, 'synset': 'condenser.n.02', 'name': 'condenser'}, {'id': 6778, 'synset': 'condenser_microphone.n.01', 'name': 'condenser_microphone'}, {'id': 6779, 'synset': 'condominium.n.02', 'name': 'condominium'}, {'id': 6780, 'synset': 'condominium.n.01', 'name': 'condominium'}, {'id': 6781, 'synset': 'conductor.n.04', 'name': 'conductor'}, {'id': 6782, 'synset': 'cone_clutch.n.01', 'name': 'cone_clutch'}, {'id': 6783, 'synset': 'confectionery.n.02', 'name': 'confectionery'}, {'id': 6784, 'synset': 'conference_center.n.01', 'name': 'conference_center'}, {'id': 6785, 'synset': 'conference_room.n.01', 'name': 'conference_room'}, {'id': 6786, 'synset': 'conference_table.n.01', 'name': 'conference_table'}, {'id': 6787, 'synset': 'confessional.n.01', 'name': 'confessional'}, {'id': 6788, 'synset': 'conformal_projection.n.01', 'name': 'conformal_projection'}, {'id': 6789, 'synset': 'congress_boot.n.01', 'name': 'congress_boot'}, {'id': 6790, 'synset': 'conic_projection.n.01', 'name': 'conic_projection'}, {'id': 6791, 'synset': 'connecting_rod.n.01', 'name': 'connecting_rod'}, {'id': 6792, 'synset': 'connecting_room.n.01', 'name': 'connecting_room'}, {'id': 6793, 'synset': 'connection.n.03', 'name': 'connection'}, {'id': 6794, 'synset': 'conning_tower.n.02', 'name': 'conning_tower'}, {'id': 6795, 'synset': 'conning_tower.n.01', 'name': 'conning_tower'}, {'id': 6796, 'synset': 'conservatory.n.03', 'name': 'conservatory'}, {'id': 6797, 'synset': 'conservatory.n.02', 'name': 'conservatory'}, {'id': 6798, 'synset': 'console.n.03', 'name': 'console'}, {'id': 6799, 'synset': 'console.n.02', 'name': 'console'}, {'id': 6800, 'synset': 'console_table.n.01', 'name': 'console_table'}, {'id': 6801, 'synset': 'consulate.n.01', 'name': 'consulate'}, {'id': 6802, 'synset': 'contact.n.07', 'name': 'contact'}, {'id': 6803, 'synset': 'contact.n.09', 'name': 'contact'}, {'id': 6804, 'synset': 'container.n.01', 'name': 'container'}, {'id': 6805, 'synset': 'container_ship.n.01', 'name': 'container_ship'}, {'id': 6806, 'synset': 'containment.n.02', 'name': 'containment'}, {'id': 6807, 'synset': 'contrabassoon.n.01', 'name': 'contrabassoon'}, {'id': 6808, 'synset': 'control_center.n.01', 'name': 'control_center'}, {'id': 6809, 'synset': 'control_circuit.n.01', 'name': 'control_circuit'}, {'id': 6810, 'synset': 'control_key.n.01', 'name': 'control_key'}, {'id': 6811, 'synset': 'control_panel.n.01', 'name': 'control_panel'}, {'id': 6812, 'synset': 'control_rod.n.01', 'name': 'control_rod'}, {'id': 6813, 'synset': 'control_room.n.01', 'name': 'control_room'}, {'id': 6814, 'synset': 'control_system.n.01', 'name': 'control_system'}, {'id': 6815, 'synset': 'control_tower.n.01', 'name': 'control_tower'}, {'id': 6816, 'synset': 'convector.n.01', 'name': 'convector'}, {'id': 6817, 'synset': 'convenience_store.n.01', 'name': 'convenience_store'}, {'id': 6818, 'synset': 'convent.n.01', 'name': 'convent'}, {'id': 6819, 'synset': 'conventicle.n.02', 'name': 'conventicle'}, {'id': 6820, 'synset': 'converging_lens.n.01', 'name': 'converging_lens'}, {'id': 6821, 'synset': 'converter.n.01', 'name': 'converter'}, {'id': 6822, 'synset': 'conveyance.n.03', 'name': 'conveyance'}, {'id': 6823, 'synset': 'conveyer_belt.n.01', 'name': 'conveyer_belt'}, {'id': 6824, 'synset': 'cookfire.n.01', 'name': 'cookfire'}, {'id': 6825, 'synset': 'cookhouse.n.02', 'name': 'cookhouse'}, {'id': 6826, 'synset': 'cookie_cutter.n.01', 'name': 'cookie_cutter'}, {'id': 6827, 'synset': 'cookie_jar.n.01', 'name': 'cookie_jar'}, {'id': 6828, 'synset': 'cookie_sheet.n.01', 'name': 'cookie_sheet'}, {'id': 6829, 'synset': 'cookstove.n.01', 'name': 'cookstove'}, {'id': 6830, 'synset': 'coolant_system.n.01', 'name': 'coolant_system'}, {'id': 6831, 'synset': 'cooling_system.n.02', 'name': 'cooling_system'}, {'id': 6832, 'synset': 'cooling_system.n.01', 'name': 'cooling_system'}, {'id': 6833, 'synset': 'cooling_tower.n.01', 'name': 'cooling_tower'}, {'id': 6834, 'synset': 'coonskin_cap.n.01', 'name': 'coonskin_cap'}, {'id': 6835, 'synset': 'cope.n.02', 'name': 'cope'}, {'id': 6836, 'synset': 'coping_saw.n.01', 'name': 'coping_saw'}, {'id': 6837, 'synset': 'copperware.n.01', 'name': 'copperware'}, {'id': 6838, 'synset': 'copyholder.n.01', 'name': 'copyholder'}, {'id': 6839, 'synset': 'coquille.n.02', 'name': 'coquille'}, {'id': 6840, 'synset': 'coracle.n.01', 'name': 'coracle'}, {'id': 6841, 'synset': 'corbel.n.01', 'name': 'corbel'}, {'id': 6842, 'synset': 'corbel_arch.n.01', 'name': 'corbel_arch'}, {'id': 6843, 'synset': 'corbel_step.n.01', 'name': 'corbel_step'}, {'id': 6844, 'synset': 'corbie_gable.n.01', 'name': 'corbie_gable'}, {'id': 6845, 'synset': 'cord.n.04', 'name': 'cord'}, {'id': 6846, 'synset': 'cord.n.03', 'name': 'cord'}, {'id': 6847, 'synset': 'cordage.n.02', 'name': 'cordage'}, {'id': 6848, 'synset': 'cords.n.01', 'name': 'cords'}, {'id': 6849, 'synset': 'core.n.10', 'name': 'core'}, {'id': 6850, 'synset': 'core_bit.n.01', 'name': 'core_bit'}, {'id': 6851, 'synset': 'core_drill.n.01', 'name': 'core_drill'}, {'id': 6852, 'synset': 'corer.n.01', 'name': 'corer'}, {'id': 6853, 'synset': 'corker.n.02', 'name': 'corker'}, {'id': 6854, 'synset': 'corncrib.n.01', 'name': 'corncrib'}, {'id': 6855, 'synset': 'corner.n.11', 'name': 'corner'}, {'id': 6856, 'synset': 'corner.n.03', 'name': 'corner'}, {'id': 6857, 'synset': 'corner_post.n.01', 'name': 'corner_post'}, {'id': 6858, 'synset': 'cornice.n.03', 'name': 'cornice'}, {'id': 6859, 'synset': 'cornice.n.02', 'name': 'cornice'}, {'id': 6860, 'synset': 'correctional_institution.n.01', 'name': 'correctional_institution'}, {'id': 6861, 'synset': 'corrugated_fastener.n.01', 'name': 'corrugated_fastener'}, {'id': 6862, 'synset': 'corselet.n.01', 'name': 'corselet'}, {'id': 6863, 'synset': 'cosmetic.n.01', 'name': 'cosmetic'}, {'id': 6864, 'synset': 'cosmotron.n.01', 'name': 'cosmotron'}, {'id': 6865, 'synset': 'costume.n.01', 'name': 'costume'}, {'id': 6866, 'synset': 'costume.n.02', 'name': 'costume'}, {'id': 6867, 'synset': 'costume.n.03', 'name': 'costume'}, {'id': 6868, 'synset': 'cosy.n.01', 'name': 'cosy'}, {'id': 6869, 'synset': 'cot.n.03', 'name': 'cot'}, {'id': 6870, 'synset': 'cottage_tent.n.01', 'name': 'cottage_tent'}, {'id': 6871, 'synset': 'cotter.n.03', 'name': 'cotter'}, {'id': 6872, 'synset': 'cotter_pin.n.01', 'name': 'cotter_pin'}, {'id': 6873, 'synset': 'cotton.n.02', 'name': 'cotton'}, {'id': 6874, 'synset': 'cotton_flannel.n.01', 'name': 'cotton_flannel'}, {'id': 6875, 'synset': 'cotton_mill.n.01', 'name': 'cotton_mill'}, {'id': 6876, 'synset': 'couch.n.03', 'name': 'couch'}, {'id': 6877, 'synset': 'couch.n.02', 'name': 'couch'}, {'id': 6878, 'synset': 'couchette.n.01', 'name': 'couchette'}, {'id': 6879, 'synset': 'coude_telescope.n.01', 'name': 'coude_telescope'}, {'id': 6880, 'synset': 'counter.n.01', 'name': 'counter'}, {'id': 6881, 'synset': 'counter.n.03', 'name': 'counter'}, {'id': 6882, 'synset': 'counter.n.02', 'name': 'counter'}, {'id': 6883, 'synset': 'counterbore.n.01', 'name': 'counterbore'}, {'id': 6884, 'synset': 'counter_tube.n.01', 'name': 'counter_tube'}, {'id': 6885, 'synset': 'country_house.n.01', 'name': 'country_house'}, {'id': 6886, 'synset': 'country_store.n.01', 'name': 'country_store'}, {'id': 6887, 'synset': 'coupe.n.01', 'name': 'coupe'}, {'id': 6888, 'synset': 'coupling.n.02', 'name': 'coupling'}, {'id': 6889, 'synset': 'court.n.10', 'name': 'court'}, {'id': 6890, 'synset': 'court.n.04', 'name': 'court'}, {'id': 6891, 'synset': 'court.n.02', 'name': 'court'}, {'id': 6892, 'synset': 'court.n.09', 'name': 'court'}, {'id': 6893, 'synset': 'courtelle.n.01', 'name': 'Courtelle'}, {'id': 6894, 'synset': 'courthouse.n.02', 'name': 'courthouse'}, {'id': 6895, 'synset': 'courthouse.n.01', 'name': 'courthouse'}, {'id': 6896, 'synset': 'covered_bridge.n.01', 'name': 'covered_bridge'}, {'id': 6897, 'synset': 'covered_couch.n.01', 'name': 'covered_couch'}, {'id': 6898, 'synset': 'covered_wagon.n.01', 'name': 'covered_wagon'}, {'id': 6899, 'synset': 'covering.n.02', 'name': 'covering'}, {'id': 6900, 'synset': 'coverlet.n.01', 'name': 'coverlet'}, {'id': 6901, 'synset': 'cover_plate.n.01', 'name': 'cover_plate'}, {'id': 6902, 'synset': 'cowbarn.n.01', 'name': 'cowbarn'}, {'id': 6903, 'synset': 'cowboy_boot.n.01', 'name': 'cowboy_boot'}, {'id': 6904, 'synset': 'cowhide.n.03', 'name': 'cowhide'}, {'id': 6905, 'synset': 'cowl.n.02', 'name': 'cowl'}, {'id': 6906, 'synset': 'cow_pen.n.01', 'name': 'cow_pen'}, {'id': 6907, 'synset': 'cpu_board.n.01', 'name': 'CPU_board'}, {'id': 6908, 'synset': 'crackle.n.02', 'name': 'crackle'}, {'id': 6909, 'synset': 'cradle.n.01', 'name': 'cradle'}, {'id': 6910, 'synset': 'craft.n.02', 'name': 'craft'}, {'id': 6911, 'synset': 'cramp.n.03', 'name': 'cramp'}, {'id': 6912, 'synset': 'crampon.n.02', 'name': 'crampon'}, {'id': 6913, 'synset': 'crampon.n.01', 'name': 'crampon'}, {'id': 6914, 'synset': 'crane.n.04', 'name': 'crane'}, {'id': 6915, 'synset': 'craniometer.n.01', 'name': 'craniometer'}, {'id': 6916, 'synset': 'crank.n.04', 'name': 'crank'}, {'id': 6917, 'synset': 'crankcase.n.01', 'name': 'crankcase'}, {'id': 6918, 'synset': 'crankshaft.n.01', 'name': 'crankshaft'}, {'id': 6919, 'synset': 'crash_barrier.n.01', 'name': 'crash_barrier'}, {'id': 6920, 'synset': 'crash_helmet.n.01', 'name': 'crash_helmet'}, {'id': 6921, 'synset': 'cravat.n.01', 'name': 'cravat'}, {'id': 6922, 'synset': 'crazy_quilt.n.01', 'name': 'crazy_quilt'}, {'id': 6923, 'synset': 'cream.n.03', 'name': 'cream'}, {'id': 6924, 'synset': 'creche.n.01', 'name': 'creche'}, {'id': 6925, 'synset': 'creche.n.02', 'name': 'creche'}, {'id': 6926, 'synset': 'credenza.n.01', 'name': 'credenza'}, {'id': 6927, 'synset': 'creel.n.01', 'name': 'creel'}, {'id': 6928, 'synset': 'crematory.n.02', 'name': 'crematory'}, {'id': 6929, 'synset': 'crematory.n.01', 'name': 'crematory'}, {'id': 6930, 'synset': 'crepe.n.03', 'name': 'crepe'}, {'id': 6931, 'synset': 'crepe_de_chine.n.01', 'name': 'crepe_de_Chine'}, {'id': 6932, 'synset': 'crescent_wrench.n.01', 'name': 'crescent_wrench'}, {'id': 6933, 'synset': 'cretonne.n.01', 'name': 'cretonne'}, {'id': 6934, 'synset': 'crib.n.03', 'name': 'crib'}, {'id': 6935, 'synset': 'cricket_ball.n.01', 'name': 'cricket_ball'}, {'id': 6936, 'synset': 'cricket_bat.n.01', 'name': 'cricket_bat'}, {'id': 6937, 'synset': 'cricket_equipment.n.01', 'name': 'cricket_equipment'}, {'id': 6938, 'synset': 'cringle.n.01', 'name': 'cringle'}, {'id': 6939, 'synset': 'crinoline.n.03', 'name': 'crinoline'}, {'id': 6940, 'synset': 'crinoline.n.02', 'name': 'crinoline'}, {'id': 6941, 'synset': 'crochet_needle.n.01', 'name': 'crochet_needle'}, {'id': 6942, 'synset': 'crock_pot.n.01', 'name': 'Crock_Pot'}, {'id': 6943, 'synset': 'crook.n.03', 'name': 'crook'}, {'id': 6944, 'synset': 'crookes_radiometer.n.01', 'name': 'Crookes_radiometer'}, {'id': 6945, 'synset': 'crookes_tube.n.01', 'name': 'Crookes_tube'}, {'id': 6946, 'synset': 'croquet_ball.n.01', 'name': 'croquet_ball'}, {'id': 6947, 'synset': 'croquet_equipment.n.01', 'name': 'croquet_equipment'}, {'id': 6948, 'synset': 'croquet_mallet.n.01', 'name': 'croquet_mallet'}, {'id': 6949, 'synset': 'cross.n.01', 'name': 'cross'}, {'id': 6950, 'synset': 'crossbar.n.03', 'name': 'crossbar'}, {'id': 6951, 'synset': 'crossbar.n.02', 'name': 'crossbar'}, {'id': 6952, 'synset': 'crossbench.n.01', 'name': 'crossbench'}, {'id': 6953, 'synset': 'cross_bit.n.01', 'name': 'cross_bit'}, {'id': 6954, 'synset': 'crossbow.n.01', 'name': 'crossbow'}, {'id': 6955, 'synset': 'crosscut_saw.n.01', 'name': 'crosscut_saw'}, {'id': 6956, 'synset': 'crossjack.n.01', 'name': 'crossjack'}, {'id': 6957, 'synset': 'crosspiece.n.02', 'name': 'crosspiece'}, {'id': 6958, 'synset': 'crotchet.n.04', 'name': 'crotchet'}, {'id': 6959, 'synset': "croupier's_rake.n.01", 'name': "croupier's_rake"}, {'id': 6960, 'synset': 'crown.n.11', 'name': 'crown'}, {'id': 6961, 'synset': 'crown_jewels.n.01', 'name': 'crown_jewels'}, {'id': 6962, 'synset': 'crown_lens.n.01', 'name': 'crown_lens'}, {'id': 6963, 'synset': "crow's_nest.n.01", 'name': "crow's_nest"}, {'id': 6964, 'synset': 'crucible.n.01', 'name': 'crucible'}, {'id': 6965, 'synset': 'cruet.n.01', 'name': 'cruet'}, {'id': 6966, 'synset': 'cruet-stand.n.01', 'name': 'cruet-stand'}, {'id': 6967, 'synset': 'cruise_control.n.01', 'name': 'cruise_control'}, {'id': 6968, 'synset': 'cruise_missile.n.01', 'name': 'cruise_missile'}, {'id': 6969, 'synset': 'cruiser.n.02', 'name': 'cruiser'}, {'id': 6970, 'synset': 'crupper.n.01', 'name': 'crupper'}, {'id': 6971, 'synset': 'cruse.n.01', 'name': 'cruse'}, {'id': 6972, 'synset': 'crusher.n.01', 'name': 'crusher'}, {'id': 6973, 'synset': 'cryometer.n.01', 'name': 'cryometer'}, {'id': 6974, 'synset': 'cryoscope.n.01', 'name': 'cryoscope'}, {'id': 6975, 'synset': 'cryostat.n.01', 'name': 'cryostat'}, {'id': 6976, 'synset': 'crypt.n.01', 'name': 'crypt'}, {'id': 6977, 'synset': 'crystal.n.06', 'name': 'crystal'}, {'id': 6978, 'synset': 'crystal_detector.n.01', 'name': 'crystal_detector'}, {'id': 6979, 'synset': 'crystal_microphone.n.01', 'name': 'crystal_microphone'}, {'id': 6980, 'synset': 'crystal_oscillator.n.01', 'name': 'crystal_oscillator'}, {'id': 6981, 'synset': 'crystal_set.n.01', 'name': 'crystal_set'}, {'id': 6982, 'synset': 'cubitiere.n.01', 'name': 'cubitiere'}, {'id': 6983, 'synset': 'cucking_stool.n.01', 'name': 'cucking_stool'}, {'id': 6984, 'synset': 'cuckoo_clock.n.01', 'name': 'cuckoo_clock'}, {'id': 6985, 'synset': 'cuddy.n.01', 'name': 'cuddy'}, {'id': 6986, 'synset': 'cudgel.n.01', 'name': 'cudgel'}, {'id': 6987, 'synset': 'cue.n.04', 'name': 'cue'}, {'id': 6988, 'synset': 'cue_ball.n.01', 'name': 'cue_ball'}, {'id': 6989, 'synset': 'cuff.n.01', 'name': 'cuff'}, {'id': 6990, 'synset': 'cuirass.n.01', 'name': 'cuirass'}, {'id': 6991, 'synset': 'cuisse.n.01', 'name': 'cuisse'}, {'id': 6992, 'synset': 'cul.n.01', 'name': 'cul'}, {'id': 6993, 'synset': 'culdoscope.n.01', 'name': 'culdoscope'}, {'id': 6994, 'synset': 'cullis.n.01', 'name': 'cullis'}, {'id': 6995, 'synset': 'culotte.n.01', 'name': 'culotte'}, {'id': 6996, 'synset': 'cultivator.n.02', 'name': 'cultivator'}, {'id': 6997, 'synset': 'culverin.n.02', 'name': 'culverin'}, {'id': 6998, 'synset': 'culverin.n.01', 'name': 'culverin'}, {'id': 6999, 'synset': 'culvert.n.01', 'name': 'culvert'}, {'id': 7000, 'synset': 'cup_hook.n.01', 'name': 'cup_hook'}, {'id': 7001, 'synset': 'cupola.n.02', 'name': 'cupola'}, {'id': 7002, 'synset': 'cupola.n.01', 'name': 'cupola'}, {'id': 7003, 'synset': 'curb.n.02', 'name': 'curb'}, {'id': 7004, 'synset': 'curb_roof.n.01', 'name': 'curb_roof'}, {'id': 7005, 'synset': 'curbstone.n.01', 'name': 'curbstone'}, {'id': 7006, 'synset': 'curette.n.01', 'name': 'curette'}, {'id': 7007, 'synset': 'currycomb.n.01', 'name': 'currycomb'}, {'id': 7008, 'synset': 'cursor.n.01', 'name': 'cursor'}, {'id': 7009, 'synset': 'customhouse.n.01', 'name': 'customhouse'}, {'id': 7010, 'synset': 'cutaway.n.01', 'name': 'cutaway'}, {'id': 7011, 'synset': 'cutlas.n.01', 'name': 'cutlas'}, {'id': 7012, 'synset': 'cutoff.n.03', 'name': 'cutoff'}, {'id': 7013, 'synset': 'cutout.n.01', 'name': 'cutout'}, {'id': 7014, 'synset': 'cutter.n.06', 'name': 'cutter'}, {'id': 7015, 'synset': 'cutter.n.05', 'name': 'cutter'}, {'id': 7016, 'synset': 'cutting_implement.n.01', 'name': 'cutting_implement'}, {'id': 7017, 'synset': 'cutting_room.n.01', 'name': 'cutting_room'}, {'id': 7018, 'synset': 'cutty_stool.n.01', 'name': 'cutty_stool'}, {'id': 7019, 'synset': 'cutwork.n.01', 'name': 'cutwork'}, {'id': 7020, 'synset': 'cybercafe.n.01', 'name': 'cybercafe'}, {'id': 7021, 'synset': 'cyclopean_masonry.n.01', 'name': 'cyclopean_masonry'}, {'id': 7022, 'synset': 'cyclostyle.n.01', 'name': 'cyclostyle'}, {'id': 7023, 'synset': 'cyclotron.n.01', 'name': 'cyclotron'}, {'id': 7024, 'synset': 'cylinder.n.03', 'name': 'cylinder'}, {'id': 7025, 'synset': 'cylinder_lock.n.01', 'name': 'cylinder_lock'}, {'id': 7026, 'synset': 'dacha.n.01', 'name': 'dacha'}, {'id': 7027, 'synset': 'dacron.n.01', 'name': 'Dacron'}, {'id': 7028, 'synset': 'dado.n.02', 'name': 'dado'}, {'id': 7029, 'synset': 'dado_plane.n.01', 'name': 'dado_plane'}, {'id': 7030, 'synset': 'dairy.n.01', 'name': 'dairy'}, {'id': 7031, 'synset': 'dais.n.01', 'name': 'dais'}, {'id': 7032, 'synset': 'daisy_print_wheel.n.01', 'name': 'daisy_print_wheel'}, {'id': 7033, 'synset': 'daisywheel_printer.n.01', 'name': 'daisywheel_printer'}, {'id': 7034, 'synset': 'dam.n.01', 'name': 'dam'}, {'id': 7035, 'synset': 'damask.n.02', 'name': 'damask'}, {'id': 7036, 'synset': 'dampener.n.01', 'name': 'dampener'}, {'id': 7037, 'synset': 'damper.n.02', 'name': 'damper'}, {'id': 7038, 'synset': 'damper_block.n.01', 'name': 'damper_block'}, {'id': 7039, 'synset': 'dark_lantern.n.01', 'name': 'dark_lantern'}, {'id': 7040, 'synset': 'darkroom.n.01', 'name': 'darkroom'}, {'id': 7041, 'synset': 'darning_needle.n.01', 'name': 'darning_needle'}, {'id': 7042, 'synset': 'dart.n.02', 'name': 'dart'}, {'id': 7043, 'synset': 'dart.n.01', 'name': 'dart'}, {'id': 7044, 'synset': 'dashboard.n.02', 'name': 'dashboard'}, {'id': 7045, 'synset': 'dashiki.n.01', 'name': 'dashiki'}, {'id': 7046, 'synset': 'dash-pot.n.01', 'name': 'dash-pot'}, {'id': 7047, 'synset': 'data_converter.n.01', 'name': 'data_converter'}, {'id': 7048, 'synset': 'data_input_device.n.01', 'name': 'data_input_device'}, {'id': 7049, 'synset': 'data_multiplexer.n.01', 'name': 'data_multiplexer'}, {'id': 7050, 'synset': 'data_system.n.01', 'name': 'data_system'}, {'id': 7051, 'synset': 'davenport.n.03', 'name': 'davenport'}, {'id': 7052, 'synset': 'davenport.n.02', 'name': 'davenport'}, {'id': 7053, 'synset': 'davit.n.01', 'name': 'davit'}, {'id': 7054, 'synset': 'daybed.n.01', 'name': 'daybed'}, {'id': 7055, 'synset': 'daybook.n.02', 'name': 'daybook'}, {'id': 7056, 'synset': 'day_nursery.n.01', 'name': 'day_nursery'}, {'id': 7057, 'synset': 'day_school.n.03', 'name': 'day_school'}, {'id': 7058, 'synset': 'dead_axle.n.01', 'name': 'dead_axle'}, {'id': 7059, 'synset': 'deadeye.n.02', 'name': 'deadeye'}, {'id': 7060, 'synset': 'deadhead.n.02', 'name': 'deadhead'}, {'id': 7061, 'synset': 'deanery.n.01', 'name': 'deanery'}, {'id': 7062, 'synset': 'deathbed.n.02', 'name': 'deathbed'}, {'id': 7063, 'synset': 'death_camp.n.01', 'name': 'death_camp'}, {'id': 7064, 'synset': 'death_house.n.01', 'name': 'death_house'}, {'id': 7065, 'synset': 'death_knell.n.02', 'name': 'death_knell'}, {'id': 7066, 'synset': 'death_seat.n.01', 'name': 'death_seat'}, {'id': 7067, 'synset': 'deck.n.02', 'name': 'deck'}, {'id': 7068, 'synset': 'deck.n.04', 'name': 'deck'}, {'id': 7069, 'synset': 'deck-house.n.01', 'name': 'deck-house'}, {'id': 7070, 'synset': 'deckle.n.02', 'name': 'deckle'}, {'id': 7071, 'synset': 'deckle_edge.n.01', 'name': 'deckle_edge'}, {'id': 7072, 'synset': 'declinometer.n.01', 'name': 'declinometer'}, {'id': 7073, 'synset': 'decoder.n.02', 'name': 'decoder'}, {'id': 7074, 'synset': 'decolletage.n.01', 'name': 'decolletage'}, {'id': 7075, 'synset': 'decoupage.n.01', 'name': 'decoupage'}, {'id': 7076, 'synset': 'dedicated_file_server.n.01', 'name': 'dedicated_file_server'}, {'id': 7077, 'synset': 'deep-freeze.n.01', 'name': 'deep-freeze'}, {'id': 7078, 'synset': 'deerstalker.n.01', 'name': 'deerstalker'}, {'id': 7079, 'synset': 'defense_system.n.01', 'name': 'defense_system'}, {'id': 7080, 'synset': 'defensive_structure.n.01', 'name': 'defensive_structure'}, {'id': 7081, 'synset': 'defibrillator.n.01', 'name': 'defibrillator'}, {'id': 7082, 'synset': 'defilade.n.01', 'name': 'defilade'}, {'id': 7083, 'synset': 'deflector.n.01', 'name': 'deflector'}, {'id': 7084, 'synset': 'delayed_action.n.01', 'name': 'delayed_action'}, {'id': 7085, 'synset': 'delay_line.n.01', 'name': 'delay_line'}, {'id': 7086, 'synset': 'delft.n.01', 'name': 'delft'}, {'id': 7087, 'synset': 'delicatessen.n.02', 'name': 'delicatessen'}, {'id': 7088, 'synset': 'delivery_truck.n.01', 'name': 'delivery_truck'}, {'id': 7089, 'synset': 'delta_wing.n.01', 'name': 'delta_wing'}, {'id': 7090, 'synset': 'demijohn.n.01', 'name': 'demijohn'}, {'id': 7091, 'synset': 'demitasse.n.02', 'name': 'demitasse'}, {'id': 7092, 'synset': 'den.n.04', 'name': 'den'}, {'id': 7093, 'synset': 'denim.n.02', 'name': 'denim'}, {'id': 7094, 'synset': 'densimeter.n.01', 'name': 'densimeter'}, {'id': 7095, 'synset': 'densitometer.n.01', 'name': 'densitometer'}, {'id': 7096, 'synset': 'dental_appliance.n.01', 'name': 'dental_appliance'}, {'id': 7097, 'synset': 'dental_implant.n.01', 'name': 'dental_implant'}, {'id': 7098, 'synset': "dentist's_drill.n.01", 'name': "dentist's_drill"}, {'id': 7099, 'synset': 'denture.n.01', 'name': 'denture'}, {'id': 7100, 'synset': 'deodorant.n.01', 'name': 'deodorant'}, {'id': 7101, 'synset': 'department_store.n.01', 'name': 'department_store'}, {'id': 7102, 'synset': 'departure_lounge.n.01', 'name': 'departure_lounge'}, {'id': 7103, 'synset': 'depilatory.n.02', 'name': 'depilatory'}, {'id': 7104, 'synset': 'depressor.n.03', 'name': 'depressor'}, {'id': 7105, 'synset': 'depth_finder.n.01', 'name': 'depth_finder'}, {'id': 7106, 'synset': 'depth_gauge.n.01', 'name': 'depth_gauge'}, {'id': 7107, 'synset': 'derrick.n.02', 'name': 'derrick'}, {'id': 7108, 'synset': 'derrick.n.01', 'name': 'derrick'}, {'id': 7109, 'synset': 'derringer.n.01', 'name': 'derringer'}, {'id': 7110, 'synset': 'desk_phone.n.01', 'name': 'desk_phone'}, {'id': 7111, 'synset': 'desktop_computer.n.01', 'name': 'desktop_computer'}, {'id': 7112, 'synset': 'dessert_spoon.n.01', 'name': 'dessert_spoon'}, {'id': 7113, 'synset': 'destroyer.n.01', 'name': 'destroyer'}, {'id': 7114, 'synset': 'destroyer_escort.n.01', 'name': 'destroyer_escort'}, {'id': 7115, 'synset': 'detached_house.n.01', 'name': 'detached_house'}, {'id': 7116, 'synset': 'detector.n.01', 'name': 'detector'}, {'id': 7117, 'synset': 'detector.n.03', 'name': 'detector'}, {'id': 7118, 'synset': 'detention_home.n.01', 'name': 'detention_home'}, {'id': 7119, 'synset': 'detonating_fuse.n.01', 'name': 'detonating_fuse'}, {'id': 7120, 'synset': 'detonator.n.01', 'name': 'detonator'}, {'id': 7121, 'synset': 'developer.n.02', 'name': 'developer'}, {'id': 7122, 'synset': 'device.n.01', 'name': 'device'}, {'id': 7123, 'synset': 'dewar_flask.n.01', 'name': 'Dewar_flask'}, {'id': 7124, 'synset': 'dhoti.n.01', 'name': 'dhoti'}, {'id': 7125, 'synset': 'dhow.n.01', 'name': 'dhow'}, {'id': 7126, 'synset': 'dial.n.04', 'name': 'dial'}, {'id': 7127, 'synset': 'dial.n.03', 'name': 'dial'}, {'id': 7128, 'synset': 'dial.n.02', 'name': 'dial'}, {'id': 7129, 'synset': 'dialog_box.n.01', 'name': 'dialog_box'}, {'id': 7130, 'synset': 'dial_telephone.n.01', 'name': 'dial_telephone'}, {'id': 7131, 'synset': 'dialyzer.n.01', 'name': 'dialyzer'}, {'id': 7132, 'synset': 'diamante.n.02', 'name': 'diamante'}, {'id': 7133, 'synset': 'diaper.n.02', 'name': 'diaper'}, {'id': 7134, 'synset': 'diaphone.n.01', 'name': 'diaphone'}, {'id': 7135, 'synset': 'diaphragm.n.01', 'name': 'diaphragm'}, {'id': 7136, 'synset': 'diaphragm.n.04', 'name': 'diaphragm'}, {'id': 7137, 'synset': 'diathermy_machine.n.01', 'name': 'diathermy_machine'}, {'id': 7138, 'synset': 'dibble.n.01', 'name': 'dibble'}, {'id': 7139, 'synset': 'dice_cup.n.01', 'name': 'dice_cup'}, {'id': 7140, 'synset': 'dicer.n.01', 'name': 'dicer'}, {'id': 7141, 'synset': 'dickey.n.02', 'name': 'dickey'}, {'id': 7142, 'synset': 'dickey.n.01', 'name': 'dickey'}, {'id': 7143, 'synset': 'dictaphone.n.01', 'name': 'Dictaphone'}, {'id': 7144, 'synset': 'die.n.03', 'name': 'die'}, {'id': 7145, 'synset': 'diesel.n.02', 'name': 'diesel'}, {'id': 7146, 'synset': 'diesel-electric_locomotive.n.01', 'name': 'diesel-electric_locomotive'}, {'id': 7147, 'synset': 'diesel-hydraulic_locomotive.n.01', 'name': 'diesel-hydraulic_locomotive'}, {'id': 7148, 'synset': 'diesel_locomotive.n.01', 'name': 'diesel_locomotive'}, {'id': 7149, 'synset': 'diestock.n.01', 'name': 'diestock'}, {'id': 7150, 'synset': 'differential_analyzer.n.01', 'name': 'differential_analyzer'}, {'id': 7151, 'synset': 'differential_gear.n.01', 'name': 'differential_gear'}, {'id': 7152, 'synset': 'diffuser.n.02', 'name': 'diffuser'}, {'id': 7153, 'synset': 'diffuser.n.01', 'name': 'diffuser'}, {'id': 7154, 'synset': 'digester.n.01', 'name': 'digester'}, {'id': 7155, 'synset': 'diggings.n.02', 'name': 'diggings'}, {'id': 7156, 'synset': 'digital-analog_converter.n.01', 'name': 'digital-analog_converter'}, {'id': 7157, 'synset': 'digital_audiotape.n.01', 'name': 'digital_audiotape'}, {'id': 7158, 'synset': 'digital_camera.n.01', 'name': 'digital_camera'}, {'id': 7159, 'synset': 'digital_clock.n.01', 'name': 'digital_clock'}, {'id': 7160, 'synset': 'digital_computer.n.01', 'name': 'digital_computer'}, {'id': 7161, 'synset': 'digital_display.n.01', 'name': 'digital_display'}, {'id': 7162, 'synset': 'digital_subscriber_line.n.01', 'name': 'digital_subscriber_line'}, {'id': 7163, 'synset': 'digital_voltmeter.n.01', 'name': 'digital_voltmeter'}, {'id': 7164, 'synset': 'digital_watch.n.01', 'name': 'digital_watch'}, {'id': 7165, 'synset': 'digitizer.n.01', 'name': 'digitizer'}, {'id': 7166, 'synset': 'dilator.n.03', 'name': 'dilator'}, {'id': 7167, 'synset': 'dildo.n.01', 'name': 'dildo'}, {'id': 7168, 'synset': 'dimity.n.01', 'name': 'dimity'}, {'id': 7169, 'synset': 'dimmer.n.01', 'name': 'dimmer'}, {'id': 7170, 'synset': 'diner.n.03', 'name': 'diner'}, {'id': 7171, 'synset': 'dinette.n.01', 'name': 'dinette'}, {'id': 7172, 'synset': 'dining_area.n.01', 'name': 'dining_area'}, {'id': 7173, 'synset': 'dining_car.n.01', 'name': 'dining_car'}, {'id': 7174, 'synset': 'dining-hall.n.01', 'name': 'dining-hall'}, {'id': 7175, 'synset': 'dining_room.n.01', 'name': 'dining_room'}, {'id': 7176, 'synset': 'dining-room_furniture.n.01', 'name': 'dining-room_furniture'}, {'id': 7177, 'synset': 'dining-room_table.n.01', 'name': 'dining-room_table'}, {'id': 7178, 'synset': 'dinner_bell.n.01', 'name': 'dinner_bell'}, {'id': 7179, 'synset': 'dinner_dress.n.01', 'name': 'dinner_dress'}, {'id': 7180, 'synset': 'dinner_napkin.n.01', 'name': 'dinner_napkin'}, {'id': 7181, 'synset': 'dinner_pail.n.01', 'name': 'dinner_pail'}, {'id': 7182, 'synset': 'dinner_table.n.01', 'name': 'dinner_table'}, {'id': 7183, 'synset': 'dinner_theater.n.01', 'name': 'dinner_theater'}, {'id': 7184, 'synset': 'diode.n.02', 'name': 'diode'}, {'id': 7185, 'synset': 'diode.n.01', 'name': 'diode'}, {'id': 7186, 'synset': 'dip.n.07', 'name': 'dip'}, {'id': 7187, 'synset': 'diplomatic_building.n.01', 'name': 'diplomatic_building'}, {'id': 7188, 'synset': 'dipole.n.02', 'name': 'dipole'}, {'id': 7189, 'synset': 'dipper.n.01', 'name': 'dipper'}, {'id': 7190, 'synset': 'dipstick.n.01', 'name': 'dipstick'}, {'id': 7191, 'synset': 'dip_switch.n.01', 'name': 'DIP_switch'}, {'id': 7192, 'synset': 'directional_antenna.n.01', 'name': 'directional_antenna'}, {'id': 7193, 'synset': 'directional_microphone.n.01', 'name': 'directional_microphone'}, {'id': 7194, 'synset': 'direction_finder.n.01', 'name': 'direction_finder'}, {'id': 7195, 'synset': 'dirk.n.01', 'name': 'dirk'}, {'id': 7196, 'synset': 'dirndl.n.02', 'name': 'dirndl'}, {'id': 7197, 'synset': 'dirndl.n.01', 'name': 'dirndl'}, {'id': 7198, 'synset': 'dirty_bomb.n.01', 'name': 'dirty_bomb'}, {'id': 7199, 'synset': 'discharge_lamp.n.01', 'name': 'discharge_lamp'}, {'id': 7200, 'synset': 'discharge_pipe.n.01', 'name': 'discharge_pipe'}, {'id': 7201, 'synset': 'disco.n.02', 'name': 'disco'}, {'id': 7202, 'synset': 'discount_house.n.01', 'name': 'discount_house'}, {'id': 7203, 'synset': 'discus.n.02', 'name': 'discus'}, {'id': 7204, 'synset': 'disguise.n.02', 'name': 'disguise'}, {'id': 7205, 'synset': 'dishpan.n.01', 'name': 'dishpan'}, {'id': 7206, 'synset': 'dish_rack.n.01', 'name': 'dish_rack'}, {'id': 7207, 'synset': 'disk.n.02', 'name': 'disk'}, {'id': 7208, 'synset': 'disk_brake.n.01', 'name': 'disk_brake'}, {'id': 7209, 'synset': 'disk_clutch.n.01', 'name': 'disk_clutch'}, {'id': 7210, 'synset': 'disk_controller.n.01', 'name': 'disk_controller'}, {'id': 7211, 'synset': 'disk_drive.n.01', 'name': 'disk_drive'}, {'id': 7212, 'synset': 'diskette.n.01', 'name': 'diskette'}, {'id': 7213, 'synset': 'disk_harrow.n.01', 'name': 'disk_harrow'}, {'id': 7214, 'synset': 'dispatch_case.n.01', 'name': 'dispatch_case'}, {'id': 7215, 'synset': 'dispensary.n.01', 'name': 'dispensary'}, {'id': 7216, 'synset': 'display.n.06', 'name': 'display'}, {'id': 7217, 'synset': 'display_adapter.n.01', 'name': 'display_adapter'}, {'id': 7218, 'synset': 'display_panel.n.01', 'name': 'display_panel'}, {'id': 7219, 'synset': 'display_window.n.01', 'name': 'display_window'}, {'id': 7220, 'synset': 'disposal.n.04', 'name': 'disposal'}, {'id': 7221, 'synset': 'disrupting_explosive.n.01', 'name': 'disrupting_explosive'}, {'id': 7222, 'synset': 'distaff.n.02', 'name': 'distaff'}, {'id': 7223, 'synset': 'distillery.n.01', 'name': 'distillery'}, {'id': 7224, 'synset': 'distributor.n.04', 'name': 'distributor'}, {'id': 7225, 'synset': 'distributor_cam.n.01', 'name': 'distributor_cam'}, {'id': 7226, 'synset': 'distributor_cap.n.01', 'name': 'distributor_cap'}, {'id': 7227, 'synset': 'distributor_housing.n.01', 'name': 'distributor_housing'}, {'id': 7228, 'synset': 'distributor_point.n.01', 'name': 'distributor_point'}, {'id': 7229, 'synset': 'ditch.n.01', 'name': 'ditch'}, {'id': 7230, 'synset': 'ditch_spade.n.01', 'name': 'ditch_spade'}, {'id': 7231, 'synset': 'ditty_bag.n.01', 'name': 'ditty_bag'}, {'id': 7232, 'synset': 'divan.n.01', 'name': 'divan'}, {'id': 7233, 'synset': 'divan.n.04', 'name': 'divan'}, {'id': 7234, 'synset': 'dive_bomber.n.01', 'name': 'dive_bomber'}, {'id': 7235, 'synset': 'diverging_lens.n.01', 'name': 'diverging_lens'}, {'id': 7236, 'synset': 'divided_highway.n.01', 'name': 'divided_highway'}, {'id': 7237, 'synset': 'divider.n.04', 'name': 'divider'}, {'id': 7238, 'synset': 'diving_bell.n.01', 'name': 'diving_bell'}, {'id': 7239, 'synset': 'divining_rod.n.01', 'name': 'divining_rod'}, {'id': 7240, 'synset': 'diving_suit.n.01', 'name': 'diving_suit'}, {'id': 7241, 'synset': 'dixie.n.02', 'name': 'dixie'}, {'id': 7242, 'synset': 'dock.n.05', 'name': 'dock'}, {'id': 7243, 'synset': 'doeskin.n.02', 'name': 'doeskin'}, {'id': 7244, 'synset': 'dogcart.n.01', 'name': 'dogcart'}, {'id': 7245, 'synset': 'doggie_bag.n.01', 'name': 'doggie_bag'}, {'id': 7246, 'synset': 'dogsled.n.01', 'name': 'dogsled'}, {'id': 7247, 'synset': 'dog_wrench.n.01', 'name': 'dog_wrench'}, {'id': 7248, 'synset': 'doily.n.01', 'name': 'doily'}, {'id': 7249, 'synset': 'dolly.n.02', 'name': 'dolly'}, {'id': 7250, 'synset': 'dolman.n.02', 'name': 'dolman'}, {'id': 7251, 'synset': 'dolman.n.01', 'name': 'dolman'}, {'id': 7252, 'synset': 'dolman_sleeve.n.01', 'name': 'dolman_sleeve'}, {'id': 7253, 'synset': 'dolmen.n.01', 'name': 'dolmen'}, {'id': 7254, 'synset': 'dome.n.04', 'name': 'dome'}, {'id': 7255, 'synset': 'dome.n.03', 'name': 'dome'}, {'id': 7256, 'synset': 'domino.n.03', 'name': 'domino'}, {'id': 7257, 'synset': 'dongle.n.01', 'name': 'dongle'}, {'id': 7258, 'synset': 'donkey_jacket.n.01', 'name': 'donkey_jacket'}, {'id': 7259, 'synset': 'door.n.01', 'name': 'door'}, {'id': 7260, 'synset': 'door.n.05', 'name': 'door'}, {'id': 7261, 'synset': 'door.n.04', 'name': 'door'}, {'id': 7262, 'synset': 'doorbell.n.01', 'name': 'doorbell'}, {'id': 7263, 'synset': 'doorframe.n.01', 'name': 'doorframe'}, {'id': 7264, 'synset': 'doorjamb.n.01', 'name': 'doorjamb'}, {'id': 7265, 'synset': 'doorlock.n.01', 'name': 'doorlock'}, {'id': 7266, 'synset': 'doornail.n.01', 'name': 'doornail'}, {'id': 7267, 'synset': 'doorplate.n.01', 'name': 'doorplate'}, {'id': 7268, 'synset': 'doorsill.n.01', 'name': 'doorsill'}, {'id': 7269, 'synset': 'doorstop.n.01', 'name': 'doorstop'}, {'id': 7270, 'synset': 'doppler_radar.n.01', 'name': 'Doppler_radar'}, {'id': 7271, 'synset': 'dormer.n.01', 'name': 'dormer'}, {'id': 7272, 'synset': 'dormer_window.n.01', 'name': 'dormer_window'}, {'id': 7273, 'synset': 'dormitory.n.01', 'name': 'dormitory'}, {'id': 7274, 'synset': 'dormitory.n.02', 'name': 'dormitory'}, {'id': 7275, 'synset': 'dosemeter.n.01', 'name': 'dosemeter'}, {'id': 7276, 'synset': 'dossal.n.01', 'name': 'dossal'}, {'id': 7277, 'synset': 'dot_matrix_printer.n.01', 'name': 'dot_matrix_printer'}, {'id': 7278, 'synset': 'double_bed.n.01', 'name': 'double_bed'}, {'id': 7279, 'synset': 'double-bitted_ax.n.01', 'name': 'double-bitted_ax'}, {'id': 7280, 'synset': 'double_boiler.n.01', 'name': 'double_boiler'}, {'id': 7281, 'synset': 'double-breasted_jacket.n.01', 'name': 'double-breasted_jacket'}, {'id': 7282, 'synset': 'double-breasted_suit.n.01', 'name': 'double-breasted_suit'}, {'id': 7283, 'synset': 'double_door.n.01', 'name': 'double_door'}, {'id': 7284, 'synset': 'double_glazing.n.01', 'name': 'double_glazing'}, {'id': 7285, 'synset': 'double-hung_window.n.01', 'name': 'double-hung_window'}, {'id': 7286, 'synset': 'double_knit.n.01', 'name': 'double_knit'}, {'id': 7287, 'synset': 'doubler.n.01', 'name': 'doubler'}, {'id': 7288, 'synset': 'double_reed.n.02', 'name': 'double_reed'}, {'id': 7289, 'synset': 'double-reed_instrument.n.01', 'name': 'double-reed_instrument'}, {'id': 7290, 'synset': 'doublet.n.01', 'name': 'doublet'}, {'id': 7291, 'synset': 'doubletree.n.01', 'name': 'doubletree'}, {'id': 7292, 'synset': 'douche.n.01', 'name': 'douche'}, {'id': 7293, 'synset': 'dovecote.n.01', 'name': 'dovecote'}, {'id': 7294, 'synset': "dover's_powder.n.01", 'name': "Dover's_powder"}, {'id': 7295, 'synset': 'dovetail.n.01', 'name': 'dovetail'}, {'id': 7296, 'synset': 'dovetail_plane.n.01', 'name': 'dovetail_plane'}, {'id': 7297, 'synset': 'dowel.n.01', 'name': 'dowel'}, {'id': 7298, 'synset': 'downstage.n.01', 'name': 'downstage'}, {'id': 7299, 'synset': 'drafting_instrument.n.01', 'name': 'drafting_instrument'}, {'id': 7300, 'synset': 'drafting_table.n.01', 'name': 'drafting_table'}, {'id': 7301, 'synset': 'dragunov.n.01', 'name': 'Dragunov'}, {'id': 7302, 'synset': 'drainage_ditch.n.01', 'name': 'drainage_ditch'}, {'id': 7303, 'synset': 'drainage_system.n.01', 'name': 'drainage_system'}, {'id': 7304, 'synset': 'drain_basket.n.01', 'name': 'drain_basket'}, {'id': 7305, 'synset': 'drainplug.n.01', 'name': 'drainplug'}, {'id': 7306, 'synset': 'drape.n.03', 'name': 'drape'}, {'id': 7307, 'synset': 'drapery.n.02', 'name': 'drapery'}, {'id': 7308, 'synset': 'drawbar.n.01', 'name': 'drawbar'}, {'id': 7309, 'synset': 'drawbridge.n.01', 'name': 'drawbridge'}, {'id': 7310, 'synset': 'drawing_chalk.n.01', 'name': 'drawing_chalk'}, {'id': 7311, 'synset': 'drawing_room.n.01', 'name': 'drawing_room'}, {'id': 7312, 'synset': 'drawing_room.n.02', 'name': 'drawing_room'}, {'id': 7313, 'synset': 'drawknife.n.01', 'name': 'drawknife'}, {'id': 7314, 'synset': 'drawstring_bag.n.01', 'name': 'drawstring_bag'}, {'id': 7315, 'synset': 'dray.n.01', 'name': 'dray'}, {'id': 7316, 'synset': 'dreadnought.n.01', 'name': 'dreadnought'}, {'id': 7317, 'synset': 'dredge.n.01', 'name': 'dredge'}, {'id': 7318, 'synset': 'dredger.n.01', 'name': 'dredger'}, {'id': 7319, 'synset': 'dredging_bucket.n.01', 'name': 'dredging_bucket'}, {'id': 7320, 'synset': 'dress_blues.n.01', 'name': 'dress_blues'}, {'id': 7321, 'synset': 'dressing.n.04', 'name': 'dressing'}, {'id': 7322, 'synset': 'dressing_case.n.01', 'name': 'dressing_case'}, {'id': 7323, 'synset': 'dressing_gown.n.01', 'name': 'dressing_gown'}, {'id': 7324, 'synset': 'dressing_room.n.01', 'name': 'dressing_room'}, {'id': 7325, 'synset': 'dressing_sack.n.01', 'name': 'dressing_sack'}, {'id': 7326, 'synset': 'dressing_table.n.01', 'name': 'dressing_table'}, {'id': 7327, 'synset': 'dress_rack.n.01', 'name': 'dress_rack'}, {'id': 7328, 'synset': 'dress_shirt.n.01', 'name': 'dress_shirt'}, {'id': 7329, 'synset': 'dress_uniform.n.01', 'name': 'dress_uniform'}, {'id': 7330, 'synset': 'drift_net.n.01', 'name': 'drift_net'}, {'id': 7331, 'synset': 'electric_drill.n.01', 'name': 'electric_drill'}, {'id': 7332, 'synset': 'drilling_platform.n.01', 'name': 'drilling_platform'}, {'id': 7333, 'synset': 'drill_press.n.01', 'name': 'drill_press'}, {'id': 7334, 'synset': 'drill_rig.n.01', 'name': 'drill_rig'}, {'id': 7335, 'synset': 'drinking_fountain.n.01', 'name': 'drinking_fountain'}, {'id': 7336, 'synset': 'drinking_vessel.n.01', 'name': 'drinking_vessel'}, {'id': 7337, 'synset': 'drip_loop.n.01', 'name': 'drip_loop'}, {'id': 7338, 'synset': 'drip_mat.n.01', 'name': 'drip_mat'}, {'id': 7339, 'synset': 'drip_pan.n.02', 'name': 'drip_pan'}, {'id': 7340, 'synset': 'dripping_pan.n.01', 'name': 'dripping_pan'}, {'id': 7341, 'synset': 'drip_pot.n.01', 'name': 'drip_pot'}, {'id': 7342, 'synset': 'drive.n.02', 'name': 'drive'}, {'id': 7343, 'synset': 'drive.n.10', 'name': 'drive'}, {'id': 7344, 'synset': 'drive_line.n.01', 'name': 'drive_line'}, {'id': 7345, 'synset': 'driver.n.05', 'name': 'driver'}, {'id': 7346, 'synset': 'driveshaft.n.01', 'name': 'driveshaft'}, {'id': 7347, 'synset': 'driveway.n.01', 'name': 'driveway'}, {'id': 7348, 'synset': 'driving_iron.n.01', 'name': 'driving_iron'}, {'id': 7349, 'synset': 'driving_wheel.n.01', 'name': 'driving_wheel'}, {'id': 7350, 'synset': 'drogue.n.04', 'name': 'drogue'}, {'id': 7351, 'synset': 'drogue_parachute.n.01', 'name': 'drogue_parachute'}, {'id': 7352, 'synset': 'drone.n.05', 'name': 'drone'}, {'id': 7353, 'synset': 'drop_arch.n.01', 'name': 'drop_arch'}, {'id': 7354, 'synset': 'drop_cloth.n.02', 'name': 'drop_cloth'}, {'id': 7355, 'synset': 'drop_curtain.n.01', 'name': 'drop_curtain'}, {'id': 7356, 'synset': 'drop_forge.n.01', 'name': 'drop_forge'}, {'id': 7357, 'synset': 'drop-leaf_table.n.01', 'name': 'drop-leaf_table'}, {'id': 7358, 'synset': 'droshky.n.01', 'name': 'droshky'}, {'id': 7359, 'synset': 'drove.n.03', 'name': 'drove'}, {'id': 7360, 'synset': 'drugget.n.01', 'name': 'drugget'}, {'id': 7361, 'synset': 'drugstore.n.01', 'name': 'drugstore'}, {'id': 7362, 'synset': 'drum.n.04', 'name': 'drum'}, {'id': 7363, 'synset': 'drum_brake.n.01', 'name': 'drum_brake'}, {'id': 7364, 'synset': 'drumhead.n.01', 'name': 'drumhead'}, {'id': 7365, 'synset': 'drum_printer.n.01', 'name': 'drum_printer'}, {'id': 7366, 'synset': 'drum_sander.n.01', 'name': 'drum_sander'}, {'id': 7367, 'synset': 'dry_battery.n.01', 'name': 'dry_battery'}, {'id': 7368, 'synset': 'dry-bulb_thermometer.n.01', 'name': 'dry-bulb_thermometer'}, {'id': 7369, 'synset': 'dry_cell.n.01', 'name': 'dry_cell'}, {'id': 7370, 'synset': 'dry_dock.n.01', 'name': 'dry_dock'}, {'id': 7371, 'synset': 'dryer.n.01', 'name': 'dryer'}, {'id': 7372, 'synset': 'dry_fly.n.01', 'name': 'dry_fly'}, {'id': 7373, 'synset': 'dry_kiln.n.01', 'name': 'dry_kiln'}, {'id': 7374, 'synset': 'dry_masonry.n.01', 'name': 'dry_masonry'}, {'id': 7375, 'synset': 'dry_point.n.02', 'name': 'dry_point'}, {'id': 7376, 'synset': 'dry_wall.n.02', 'name': 'dry_wall'}, {'id': 7377, 'synset': 'dual_scan_display.n.01', 'name': 'dual_scan_display'}, {'id': 7378, 'synset': 'duck.n.04', 'name': 'duck'}, {'id': 7379, 'synset': 'duckboard.n.01', 'name': 'duckboard'}, {'id': 7380, 'synset': 'duckpin.n.01', 'name': 'duckpin'}, {'id': 7381, 'synset': 'dudeen.n.01', 'name': 'dudeen'}, {'id': 7382, 'synset': 'duffel.n.02', 'name': 'duffel'}, {'id': 7383, 'synset': 'duffel_coat.n.01', 'name': 'duffel_coat'}, {'id': 7384, 'synset': 'dugout.n.01', 'name': 'dugout'}, {'id': 7385, 'synset': 'dugout_canoe.n.01', 'name': 'dugout_canoe'}, {'id': 7386, 'synset': 'dulciana.n.01', 'name': 'dulciana'}, {'id': 7387, 'synset': 'dulcimer.n.02', 'name': 'dulcimer'}, {'id': 7388, 'synset': 'dulcimer.n.01', 'name': 'dulcimer'}, {'id': 7389, 'synset': 'dumb_bomb.n.01', 'name': 'dumb_bomb'}, {'id': 7390, 'synset': 'dumbwaiter.n.01', 'name': 'dumbwaiter'}, {'id': 7391, 'synset': 'dumdum.n.01', 'name': 'dumdum'}, {'id': 7392, 'synset': 'dumpcart.n.01', 'name': 'dumpcart'}, {'id': 7393, 'synset': 'dump_truck.n.01', 'name': 'dump_truck'}, {'id': 7394, 'synset': 'dumpy_level.n.01', 'name': 'Dumpy_level'}, {'id': 7395, 'synset': 'dunce_cap.n.01', 'name': 'dunce_cap'}, {'id': 7396, 'synset': 'dune_buggy.n.01', 'name': 'dune_buggy'}, {'id': 7397, 'synset': 'dungeon.n.02', 'name': 'dungeon'}, {'id': 7398, 'synset': 'duplex_apartment.n.01', 'name': 'duplex_apartment'}, {'id': 7399, 'synset': 'duplex_house.n.01', 'name': 'duplex_house'}, {'id': 7400, 'synset': 'duplicator.n.01', 'name': 'duplicator'}, {'id': 7401, 'synset': 'dust_bag.n.01', 'name': 'dust_bag'}, {'id': 7402, 'synset': 'dustcloth.n.01', 'name': 'dustcloth'}, {'id': 7403, 'synset': 'dust_cover.n.03', 'name': 'dust_cover'}, {'id': 7404, 'synset': 'dust_cover.n.02', 'name': 'dust_cover'}, {'id': 7405, 'synset': 'dustmop.n.01', 'name': 'dustmop'}, {'id': 7406, 'synset': 'dutch_oven.n.01', 'name': 'Dutch_oven'}, {'id': 7407, 'synset': 'dutch_oven.n.02', 'name': 'Dutch_oven'}, {'id': 7408, 'synset': 'dwelling.n.01', 'name': 'dwelling'}, {'id': 7409, 'synset': 'dye-works.n.01', 'name': 'dye-works'}, {'id': 7410, 'synset': 'dynamo.n.01', 'name': 'dynamo'}, {'id': 7411, 'synset': 'dynamometer.n.01', 'name': 'dynamometer'}, {'id': 7412, 'synset': 'eames_chair.n.01', 'name': 'Eames_chair'}, {'id': 7413, 'synset': 'earflap.n.01', 'name': 'earflap'}, {'id': 7414, 'synset': 'early_warning_radar.n.01', 'name': 'early_warning_radar'}, {'id': 7415, 'synset': 'early_warning_system.n.01', 'name': 'early_warning_system'}, {'id': 7416, 'synset': 'earmuff.n.01', 'name': 'earmuff'}, {'id': 7417, 'synset': 'earplug.n.02', 'name': 'earplug'}, {'id': 7418, 'synset': 'earthenware.n.01', 'name': 'earthenware'}, {'id': 7419, 'synset': 'earthwork.n.01', 'name': 'earthwork'}, {'id': 7420, 'synset': 'easy_chair.n.01', 'name': 'easy_chair'}, {'id': 7421, 'synset': 'eaves.n.01', 'name': 'eaves'}, {'id': 7422, 'synset': 'ecclesiastical_attire.n.01', 'name': 'ecclesiastical_attire'}, {'id': 7423, 'synset': 'echinus.n.01', 'name': 'echinus'}, {'id': 7424, 'synset': 'echocardiograph.n.01', 'name': 'echocardiograph'}, {'id': 7425, 'synset': 'edger.n.02', 'name': 'edger'}, {'id': 7426, 'synset': 'edge_tool.n.01', 'name': 'edge_tool'}, {'id': 7427, 'synset': 'efficiency_apartment.n.01', 'name': 'efficiency_apartment'}, {'id': 7428, 'synset': 'egg-and-dart.n.01', 'name': 'egg-and-dart'}, {'id': 7429, 'synset': 'egg_timer.n.01', 'name': 'egg_timer'}, {'id': 7430, 'synset': 'eiderdown.n.01', 'name': 'eiderdown'}, {'id': 7431, 'synset': 'eight_ball.n.01', 'name': 'eight_ball'}, {'id': 7432, 'synset': 'ejection_seat.n.01', 'name': 'ejection_seat'}, {'id': 7433, 'synset': 'elastic.n.02', 'name': 'elastic'}, {'id': 7434, 'synset': 'elastic_bandage.n.01', 'name': 'elastic_bandage'}, {'id': 7435, 'synset': 'elastoplast.n.01', 'name': 'Elastoplast'}, {'id': 7436, 'synset': 'elbow.n.04', 'name': 'elbow'}, {'id': 7437, 'synset': 'elbow_pad.n.01', 'name': 'elbow_pad'}, {'id': 7438, 'synset': 'electric.n.01', 'name': 'electric'}, {'id': 7439, 'synset': 'electrical_cable.n.01', 'name': 'electrical_cable'}, {'id': 7440, 'synset': 'electrical_contact.n.01', 'name': 'electrical_contact'}, {'id': 7441, 'synset': 'electrical_converter.n.01', 'name': 'electrical_converter'}, {'id': 7442, 'synset': 'electrical_device.n.01', 'name': 'electrical_device'}, {'id': 7443, 'synset': 'electrical_system.n.02', 'name': 'electrical_system'}, {'id': 7444, 'synset': 'electric_bell.n.01', 'name': 'electric_bell'}, {'id': 7445, 'synset': 'electric_blanket.n.01', 'name': 'electric_blanket'}, {'id': 7446, 'synset': 'electric_clock.n.01', 'name': 'electric_clock'}, {'id': 7447, 'synset': 'electric-discharge_lamp.n.01', 'name': 'electric-discharge_lamp'}, {'id': 7448, 'synset': 'electric_fan.n.01', 'name': 'electric_fan'}, {'id': 7449, 'synset': 'electric_frying_pan.n.01', 'name': 'electric_frying_pan'}, {'id': 7450, 'synset': 'electric_furnace.n.01', 'name': 'electric_furnace'}, {'id': 7451, 'synset': 'electric_guitar.n.01', 'name': 'electric_guitar'}, {'id': 7452, 'synset': 'electric_hammer.n.01', 'name': 'electric_hammer'}, {'id': 7453, 'synset': 'electric_heater.n.01', 'name': 'electric_heater'}, {'id': 7454, 'synset': 'electric_lamp.n.01', 'name': 'electric_lamp'}, {'id': 7455, 'synset': 'electric_locomotive.n.01', 'name': 'electric_locomotive'}, {'id': 7456, 'synset': 'electric_meter.n.01', 'name': 'electric_meter'}, {'id': 7457, 'synset': 'electric_mixer.n.01', 'name': 'electric_mixer'}, {'id': 7458, 'synset': 'electric_motor.n.01', 'name': 'electric_motor'}, {'id': 7459, 'synset': 'electric_organ.n.01', 'name': 'electric_organ'}, {'id': 7460, 'synset': 'electric_range.n.01', 'name': 'electric_range'}, {'id': 7461, 'synset': 'electric_toothbrush.n.01', 'name': 'electric_toothbrush'}, {'id': 7462, 'synset': 'electric_typewriter.n.01', 'name': 'electric_typewriter'}, {'id': 7463, 'synset': 'electro-acoustic_transducer.n.01', 'name': 'electro-acoustic_transducer'}, {'id': 7464, 'synset': 'electrode.n.01', 'name': 'electrode'}, {'id': 7465, 'synset': 'electrodynamometer.n.01', 'name': 'electrodynamometer'}, {'id': 7466, 'synset': 'electroencephalograph.n.01', 'name': 'electroencephalograph'}, {'id': 7467, 'synset': 'electrograph.n.01', 'name': 'electrograph'}, {'id': 7468, 'synset': 'electrolytic.n.01', 'name': 'electrolytic'}, {'id': 7469, 'synset': 'electrolytic_cell.n.01', 'name': 'electrolytic_cell'}, {'id': 7470, 'synset': 'electromagnet.n.01', 'name': 'electromagnet'}, {'id': 7471, 'synset': 'electrometer.n.01', 'name': 'electrometer'}, {'id': 7472, 'synset': 'electromyograph.n.01', 'name': 'electromyograph'}, {'id': 7473, 'synset': 'electron_accelerator.n.01', 'name': 'electron_accelerator'}, {'id': 7474, 'synset': 'electron_gun.n.01', 'name': 'electron_gun'}, {'id': 7475, 'synset': 'electronic_balance.n.01', 'name': 'electronic_balance'}, {'id': 7476, 'synset': 'electronic_converter.n.01', 'name': 'electronic_converter'}, {'id': 7477, 'synset': 'electronic_device.n.01', 'name': 'electronic_device'}, {'id': 7478, 'synset': 'electronic_equipment.n.01', 'name': 'electronic_equipment'}, {'id': 7479, 'synset': 'electronic_fetal_monitor.n.01', 'name': 'electronic_fetal_monitor'}, {'id': 7480, 'synset': 'electronic_instrument.n.01', 'name': 'electronic_instrument'}, {'id': 7481, 'synset': 'electronic_voltmeter.n.01', 'name': 'electronic_voltmeter'}, {'id': 7482, 'synset': 'electron_microscope.n.01', 'name': 'electron_microscope'}, {'id': 7483, 'synset': 'electron_multiplier.n.01', 'name': 'electron_multiplier'}, {'id': 7484, 'synset': 'electrophorus.n.01', 'name': 'electrophorus'}, {'id': 7485, 'synset': 'electroscope.n.01', 'name': 'electroscope'}, {'id': 7486, 'synset': 'electrostatic_generator.n.01', 'name': 'electrostatic_generator'}, {'id': 7487, 'synset': 'electrostatic_printer.n.01', 'name': 'electrostatic_printer'}, {'id': 7488, 'synset': 'elevator.n.01', 'name': 'elevator'}, {'id': 7489, 'synset': 'elevator.n.02', 'name': 'elevator'}, {'id': 7490, 'synset': 'elevator_shaft.n.01', 'name': 'elevator_shaft'}, {'id': 7491, 'synset': 'embankment.n.01', 'name': 'embankment'}, {'id': 7492, 'synset': 'embassy.n.01', 'name': 'embassy'}, {'id': 7493, 'synset': 'embellishment.n.02', 'name': 'embellishment'}, {'id': 7494, 'synset': 'emergency_room.n.01', 'name': 'emergency_room'}, {'id': 7495, 'synset': 'emesis_basin.n.01', 'name': 'emesis_basin'}, {'id': 7496, 'synset': 'emitter.n.01', 'name': 'emitter'}, {'id': 7497, 'synset': 'empty.n.01', 'name': 'empty'}, {'id': 7498, 'synset': 'emulsion.n.02', 'name': 'emulsion'}, {'id': 7499, 'synset': 'enamel.n.04', 'name': 'enamel'}, {'id': 7500, 'synset': 'enamel.n.03', 'name': 'enamel'}, {'id': 7501, 'synset': 'enamelware.n.01', 'name': 'enamelware'}, {'id': 7502, 'synset': 'encaustic.n.01', 'name': 'encaustic'}, {'id': 7503, 'synset': 'encephalogram.n.02', 'name': 'encephalogram'}, {'id': 7504, 'synset': 'enclosure.n.01', 'name': 'enclosure'}, {'id': 7505, 'synset': 'endoscope.n.01', 'name': 'endoscope'}, {'id': 7506, 'synset': 'energizer.n.02', 'name': 'energizer'}, {'id': 7507, 'synset': 'engine.n.01', 'name': 'engine'}, {'id': 7508, 'synset': 'engine.n.04', 'name': 'engine'}, {'id': 7509, 'synset': 'engineering.n.03', 'name': 'engineering'}, {'id': 7510, 'synset': 'enginery.n.01', 'name': 'enginery'}, {'id': 7511, 'synset': 'english_horn.n.01', 'name': 'English_horn'}, {'id': 7512, 'synset': 'english_saddle.n.01', 'name': 'English_saddle'}, {'id': 7513, 'synset': 'enlarger.n.01', 'name': 'enlarger'}, {'id': 7514, 'synset': 'ensemble.n.05', 'name': 'ensemble'}, {'id': 7515, 'synset': 'ensign.n.03', 'name': 'ensign'}, {'id': 7516, 'synset': 'entablature.n.01', 'name': 'entablature'}, {'id': 7517, 'synset': 'entertainment_center.n.01', 'name': 'entertainment_center'}, {'id': 7518, 'synset': 'entrenching_tool.n.01', 'name': 'entrenching_tool'}, {'id': 7519, 'synset': 'entrenchment.n.01', 'name': 'entrenchment'}, {'id': 7520, 'synset': 'envelope.n.02', 'name': 'envelope'}, {'id': 7521, 'synset': 'envelope.n.06', 'name': 'envelope'}, {'id': 7522, 'synset': 'eolith.n.01', 'name': 'eolith'}, {'id': 7523, 'synset': 'epauliere.n.01', 'name': 'epauliere'}, {'id': 7524, 'synset': 'epee.n.01', 'name': 'epee'}, {'id': 7525, 'synset': 'epergne.n.01', 'name': 'epergne'}, {'id': 7526, 'synset': 'epicyclic_train.n.01', 'name': 'epicyclic_train'}, {'id': 7527, 'synset': 'epidiascope.n.01', 'name': 'epidiascope'}, {'id': 7528, 'synset': 'epilating_wax.n.01', 'name': 'epilating_wax'}, {'id': 7529, 'synset': 'equalizer.n.01', 'name': 'equalizer'}, {'id': 7530, 'synset': 'equatorial.n.01', 'name': 'equatorial'}, {'id': 7531, 'synset': 'equipment.n.01', 'name': 'equipment'}, {'id': 7532, 'synset': 'erasable_programmable_read-only_memory.n.01', 'name': 'erasable_programmable_read-only_memory'}, {'id': 7533, 'synset': 'erecting_prism.n.01', 'name': 'erecting_prism'}, {'id': 7534, 'synset': 'erection.n.02', 'name': 'erection'}, {'id': 7535, 'synset': 'erlenmeyer_flask.n.01', 'name': 'Erlenmeyer_flask'}, {'id': 7536, 'synset': 'escape_hatch.n.01', 'name': 'escape_hatch'}, {'id': 7537, 'synset': 'escapement.n.01', 'name': 'escapement'}, {'id': 7538, 'synset': 'escape_wheel.n.01', 'name': 'escape_wheel'}, {'id': 7539, 'synset': 'escarpment.n.02', 'name': 'escarpment'}, {'id': 7540, 'synset': 'escutcheon.n.03', 'name': 'escutcheon'}, {'id': 7541, 'synset': 'esophagoscope.n.01', 'name': 'esophagoscope'}, {'id': 7542, 'synset': 'espadrille.n.01', 'name': 'espadrille'}, {'id': 7543, 'synset': 'espalier.n.01', 'name': 'espalier'}, {'id': 7544, 'synset': 'espresso_maker.n.01', 'name': 'espresso_maker'}, {'id': 7545, 'synset': 'espresso_shop.n.01', 'name': 'espresso_shop'}, {'id': 7546, 'synset': 'establishment.n.04', 'name': 'establishment'}, {'id': 7547, 'synset': 'estaminet.n.01', 'name': 'estaminet'}, {'id': 7548, 'synset': 'estradiol_patch.n.01', 'name': 'estradiol_patch'}, {'id': 7549, 'synset': 'etagere.n.01', 'name': 'etagere'}, {'id': 7550, 'synset': 'etamine.n.01', 'name': 'etamine'}, {'id': 7551, 'synset': 'etching.n.02', 'name': 'etching'}, {'id': 7552, 'synset': 'ethernet.n.01', 'name': 'ethernet'}, {'id': 7553, 'synset': 'ethernet_cable.n.01', 'name': 'ethernet_cable'}, {'id': 7554, 'synset': 'eton_jacket.n.01', 'name': 'Eton_jacket'}, {'id': 7555, 'synset': 'etui.n.01', 'name': 'etui'}, {'id': 7556, 'synset': 'eudiometer.n.01', 'name': 'eudiometer'}, {'id': 7557, 'synset': 'euphonium.n.01', 'name': 'euphonium'}, {'id': 7558, 'synset': 'evaporative_cooler.n.01', 'name': 'evaporative_cooler'}, {'id': 7559, 'synset': 'evening_bag.n.01', 'name': 'evening_bag'}, {'id': 7560, 'synset': 'exercise_bike.n.01', 'name': 'exercise_bike'}, {'id': 7561, 'synset': 'exercise_device.n.01', 'name': 'exercise_device'}, {'id': 7562, 'synset': 'exhaust.n.02', 'name': 'exhaust'}, {'id': 7563, 'synset': 'exhaust_fan.n.01', 'name': 'exhaust_fan'}, {'id': 7564, 'synset': 'exhaust_valve.n.01', 'name': 'exhaust_valve'}, {'id': 7565, 'synset': 'exhibition_hall.n.01', 'name': 'exhibition_hall'}, {'id': 7566, 'synset': 'exocet.n.01', 'name': 'Exocet'}, {'id': 7567, 'synset': 'expansion_bit.n.01', 'name': 'expansion_bit'}, {'id': 7568, 'synset': 'expansion_bolt.n.01', 'name': 'expansion_bolt'}, {'id': 7569, 'synset': 'explosive_detection_system.n.01', 'name': 'explosive_detection_system'}, {'id': 7570, 'synset': 'explosive_device.n.01', 'name': 'explosive_device'}, {'id': 7571, 'synset': 'explosive_trace_detection.n.01', 'name': 'explosive_trace_detection'}, {'id': 7572, 'synset': 'express.n.02', 'name': 'express'}, {'id': 7573, 'synset': 'extension.n.10', 'name': 'extension'}, {'id': 7574, 'synset': 'extension_cord.n.01', 'name': 'extension_cord'}, {'id': 7575, 'synset': 'external-combustion_engine.n.01', 'name': 'external-combustion_engine'}, {'id': 7576, 'synset': 'external_drive.n.01', 'name': 'external_drive'}, {'id': 7577, 'synset': 'extractor.n.01', 'name': 'extractor'}, {'id': 7578, 'synset': 'eyebrow_pencil.n.01', 'name': 'eyebrow_pencil'}, {'id': 7579, 'synset': 'eyecup.n.01', 'name': 'eyecup'}, {'id': 7580, 'synset': 'eyeliner.n.01', 'name': 'eyeliner'}, {'id': 7581, 'synset': 'eyepiece.n.01', 'name': 'eyepiece'}, {'id': 7582, 'synset': 'eyeshadow.n.01', 'name': 'eyeshadow'}, {'id': 7583, 'synset': 'fabric.n.01', 'name': 'fabric'}, {'id': 7584, 'synset': 'facade.n.01', 'name': 'facade'}, {'id': 7585, 'synset': 'face_guard.n.01', 'name': 'face_guard'}, {'id': 7586, 'synset': 'face_mask.n.01', 'name': 'face_mask'}, {'id': 7587, 'synset': 'faceplate.n.01', 'name': 'faceplate'}, {'id': 7588, 'synset': 'face_powder.n.01', 'name': 'face_powder'}, {'id': 7589, 'synset': 'face_veil.n.01', 'name': 'face_veil'}, {'id': 7590, 'synset': 'facing.n.03', 'name': 'facing'}, {'id': 7591, 'synset': 'facing.n.01', 'name': 'facing'}, {'id': 7592, 'synset': 'facing.n.02', 'name': 'facing'}, {'id': 7593, 'synset': 'facsimile.n.02', 'name': 'facsimile'}, {'id': 7594, 'synset': 'factory.n.01', 'name': 'factory'}, {'id': 7595, 'synset': 'factory_ship.n.01', 'name': 'factory_ship'}, {'id': 7596, 'synset': 'fagot.n.02', 'name': 'fagot'}, {'id': 7597, 'synset': 'fagot_stitch.n.01', 'name': 'fagot_stitch'}, {'id': 7598, 'synset': 'fahrenheit_thermometer.n.01', 'name': 'Fahrenheit_thermometer'}, {'id': 7599, 'synset': 'faience.n.01', 'name': 'faience'}, {'id': 7600, 'synset': 'faille.n.01', 'name': 'faille'}, {'id': 7601, 'synset': 'fairlead.n.01', 'name': 'fairlead'}, {'id': 7602, 'synset': 'fairy_light.n.01', 'name': 'fairy_light'}, {'id': 7603, 'synset': 'falchion.n.01', 'name': 'falchion'}, {'id': 7604, 'synset': 'fallboard.n.01', 'name': 'fallboard'}, {'id': 7605, 'synset': 'fallout_shelter.n.01', 'name': 'fallout_shelter'}, {'id': 7606, 'synset': 'false_face.n.01', 'name': 'false_face'}, {'id': 7607, 'synset': 'false_teeth.n.01', 'name': 'false_teeth'}, {'id': 7608, 'synset': 'family_room.n.01', 'name': 'family_room'}, {'id': 7609, 'synset': 'fan_belt.n.01', 'name': 'fan_belt'}, {'id': 7610, 'synset': 'fan_blade.n.01', 'name': 'fan_blade'}, {'id': 7611, 'synset': 'fancy_dress.n.01', 'name': 'fancy_dress'}, {'id': 7612, 'synset': 'fanion.n.01', 'name': 'fanion'}, {'id': 7613, 'synset': 'fanlight.n.03', 'name': 'fanlight'}, {'id': 7614, 'synset': 'fanjet.n.02', 'name': 'fanjet'}, {'id': 7615, 'synset': 'fanjet.n.01', 'name': 'fanjet'}, {'id': 7616, 'synset': 'fanny_pack.n.01', 'name': 'fanny_pack'}, {'id': 7617, 'synset': 'fan_tracery.n.01', 'name': 'fan_tracery'}, {'id': 7618, 'synset': 'fan_vaulting.n.01', 'name': 'fan_vaulting'}, {'id': 7619, 'synset': 'farm_building.n.01', 'name': 'farm_building'}, {'id': 7620, 'synset': "farmer's_market.n.01", 'name': "farmer's_market"}, {'id': 7621, 'synset': 'farmhouse.n.01', 'name': 'farmhouse'}, {'id': 7622, 'synset': 'farm_machine.n.01', 'name': 'farm_machine'}, {'id': 7623, 'synset': 'farmplace.n.01', 'name': 'farmplace'}, {'id': 7624, 'synset': 'farmyard.n.01', 'name': 'farmyard'}, {'id': 7625, 'synset': 'farthingale.n.01', 'name': 'farthingale'}, {'id': 7626, 'synset': 'fastener.n.02', 'name': 'fastener'}, {'id': 7627, 'synset': 'fast_reactor.n.01', 'name': 'fast_reactor'}, {'id': 7628, 'synset': 'fat_farm.n.01', 'name': 'fat_farm'}, {'id': 7629, 'synset': 'fatigues.n.01', 'name': 'fatigues'}, {'id': 7630, 'synset': 'fauld.n.01', 'name': 'fauld'}, {'id': 7631, 'synset': 'fauteuil.n.01', 'name': 'fauteuil'}, {'id': 7632, 'synset': 'feather_boa.n.01', 'name': 'feather_boa'}, {'id': 7633, 'synset': 'featheredge.n.01', 'name': 'featheredge'}, {'id': 7634, 'synset': 'feedback_circuit.n.01', 'name': 'feedback_circuit'}, {'id': 7635, 'synset': 'feedlot.n.01', 'name': 'feedlot'}, {'id': 7636, 'synset': 'fell.n.02', 'name': 'fell'}, {'id': 7637, 'synset': 'felloe.n.01', 'name': 'felloe'}, {'id': 7638, 'synset': 'felt.n.01', 'name': 'felt'}, {'id': 7639, 'synset': 'felt-tip_pen.n.01', 'name': 'felt-tip_pen'}, {'id': 7640, 'synset': 'felucca.n.01', 'name': 'felucca'}, {'id': 7641, 'synset': 'fence.n.01', 'name': 'fence'}, {'id': 7642, 'synset': 'fencing_mask.n.01', 'name': 'fencing_mask'}, {'id': 7643, 'synset': 'fencing_sword.n.01', 'name': 'fencing_sword'}, {'id': 7644, 'synset': 'fender.n.01', 'name': 'fender'}, {'id': 7645, 'synset': 'fender.n.02', 'name': 'fender'}, {'id': 7646, 'synset': 'ferrule.n.01', 'name': 'ferrule'}, {'id': 7647, 'synset': 'ferule.n.01', 'name': 'ferule'}, {'id': 7648, 'synset': 'festoon.n.01', 'name': 'festoon'}, {'id': 7649, 'synset': 'fetoscope.n.01', 'name': 'fetoscope'}, {'id': 7650, 'synset': 'fetter.n.01', 'name': 'fetter'}, {'id': 7651, 'synset': 'fez.n.02', 'name': 'fez'}, {'id': 7652, 'synset': 'fiber.n.05', 'name': 'fiber'}, {'id': 7653, 'synset': 'fiber_optic_cable.n.01', 'name': 'fiber_optic_cable'}, {'id': 7654, 'synset': 'fiberscope.n.01', 'name': 'fiberscope'}, {'id': 7655, 'synset': 'fichu.n.01', 'name': 'fichu'}, {'id': 7656, 'synset': 'fiddlestick.n.01', 'name': 'fiddlestick'}, {'id': 7657, 'synset': 'field_artillery.n.01', 'name': 'field_artillery'}, {'id': 7658, 'synset': 'field_coil.n.01', 'name': 'field_coil'}, {'id': 7659, 'synset': 'field-effect_transistor.n.01', 'name': 'field-effect_transistor'}, {'id': 7660, 'synset': 'field-emission_microscope.n.01', 'name': 'field-emission_microscope'}, {'id': 7661, 'synset': 'field_glass.n.01', 'name': 'field_glass'}, {'id': 7662, 'synset': 'field_hockey_ball.n.01', 'name': 'field_hockey_ball'}, {'id': 7663, 'synset': 'field_hospital.n.01', 'name': 'field_hospital'}, {'id': 7664, 'synset': 'field_house.n.01', 'name': 'field_house'}, {'id': 7665, 'synset': 'field_lens.n.01', 'name': 'field_lens'}, {'id': 7666, 'synset': 'field_magnet.n.01', 'name': 'field_magnet'}, {'id': 7667, 'synset': 'field-sequential_color_television.n.01', 'name': 'field-sequential_color_television'}, {'id': 7668, 'synset': 'field_tent.n.01', 'name': 'field_tent'}, {'id': 7669, 'synset': 'fieldwork.n.01', 'name': 'fieldwork'}, {'id': 7670, 'synset': 'fife.n.01', 'name': 'fife'}, {'id': 7671, 'synset': 'fifth_wheel.n.02', 'name': 'fifth_wheel'}, {'id': 7672, 'synset': 'fighting_chair.n.01', 'name': 'fighting_chair'}, {'id': 7673, 'synset': 'fig_leaf.n.02', 'name': 'fig_leaf'}, {'id': 7674, 'synset': 'figure_eight.n.01', 'name': 'figure_eight'}, {'id': 7675, 'synset': 'figure_loom.n.01', 'name': 'figure_loom'}, {'id': 7676, 'synset': 'figure_skate.n.01', 'name': 'figure_skate'}, {'id': 7677, 'synset': 'filament.n.04', 'name': 'filament'}, {'id': 7678, 'synset': 'filature.n.01', 'name': 'filature'}, {'id': 7679, 'synset': 'file_folder.n.01', 'name': 'file_folder'}, {'id': 7680, 'synset': 'file_server.n.01', 'name': 'file_server'}, {'id': 7681, 'synset': 'filigree.n.01', 'name': 'filigree'}, {'id': 7682, 'synset': 'filling.n.05', 'name': 'filling'}, {'id': 7683, 'synset': 'film.n.03', 'name': 'film'}, {'id': 7684, 'synset': 'film.n.05', 'name': 'film'}, {'id': 7685, 'synset': 'film_advance.n.01', 'name': 'film_advance'}, {'id': 7686, 'synset': 'filter.n.01', 'name': 'filter'}, {'id': 7687, 'synset': 'filter.n.02', 'name': 'filter'}, {'id': 7688, 'synset': 'finder.n.03', 'name': 'finder'}, {'id': 7689, 'synset': 'finery.n.01', 'name': 'finery'}, {'id': 7690, 'synset': 'fine-tooth_comb.n.01', 'name': 'fine-tooth_comb'}, {'id': 7691, 'synset': 'finger.n.03', 'name': 'finger'}, {'id': 7692, 'synset': 'fingerboard.n.03', 'name': 'fingerboard'}, {'id': 7693, 'synset': 'finger_bowl.n.01', 'name': 'finger_bowl'}, {'id': 7694, 'synset': 'finger_paint.n.01', 'name': 'finger_paint'}, {'id': 7695, 'synset': 'finger-painting.n.01', 'name': 'finger-painting'}, {'id': 7696, 'synset': 'finger_plate.n.01', 'name': 'finger_plate'}, {'id': 7697, 'synset': 'fingerstall.n.01', 'name': 'fingerstall'}, {'id': 7698, 'synset': 'finish_coat.n.02', 'name': 'finish_coat'}, {'id': 7699, 'synset': 'finish_coat.n.01', 'name': 'finish_coat'}, {'id': 7700, 'synset': 'finisher.n.05', 'name': 'finisher'}, {'id': 7701, 'synset': 'fin_keel.n.01', 'name': 'fin_keel'}, {'id': 7702, 'synset': 'fipple.n.01', 'name': 'fipple'}, {'id': 7703, 'synset': 'fipple_flute.n.01', 'name': 'fipple_flute'}, {'id': 7704, 'synset': 'fire.n.04', 'name': 'fire'}, {'id': 7705, 'synset': 'firearm.n.01', 'name': 'firearm'}, {'id': 7706, 'synset': 'fire_bell.n.01', 'name': 'fire_bell'}, {'id': 7707, 'synset': 'fireboat.n.01', 'name': 'fireboat'}, {'id': 7708, 'synset': 'firebox.n.01', 'name': 'firebox'}, {'id': 7709, 'synset': 'firebrick.n.01', 'name': 'firebrick'}, {'id': 7710, 'synset': 'fire_control_radar.n.01', 'name': 'fire_control_radar'}, {'id': 7711, 'synset': 'fire_control_system.n.01', 'name': 'fire_control_system'}, {'id': 7712, 'synset': 'fire_iron.n.01', 'name': 'fire_iron'}, {'id': 7713, 'synset': "fireman's_ax.n.01", 'name': "fireman's_ax"}, {'id': 7714, 'synset': 'fire_screen.n.01', 'name': 'fire_screen'}, {'id': 7715, 'synset': 'fire_tongs.n.01', 'name': 'fire_tongs'}, {'id': 7716, 'synset': 'fire_tower.n.01', 'name': 'fire_tower'}, {'id': 7717, 'synset': 'firewall.n.02', 'name': 'firewall'}, {'id': 7718, 'synset': 'firing_chamber.n.01', 'name': 'firing_chamber'}, {'id': 7719, 'synset': 'firing_pin.n.01', 'name': 'firing_pin'}, {'id': 7720, 'synset': 'firkin.n.02', 'name': 'firkin'}, {'id': 7721, 'synset': 'firmer_chisel.n.01', 'name': 'firmer_chisel'}, {'id': 7722, 'synset': 'first-aid_station.n.01', 'name': 'first-aid_station'}, {'id': 7723, 'synset': 'first_base.n.01', 'name': 'first_base'}, {'id': 7724, 'synset': 'first_class.n.03', 'name': 'first_class'}, {'id': 7725, 'synset': "fisherman's_bend.n.01", 'name': "fisherman's_bend"}, {'id': 7726, 'synset': "fisherman's_knot.n.01", 'name': "fisherman's_knot"}, {'id': 7727, 'synset': "fisherman's_lure.n.01", 'name': "fisherman's_lure"}, {'id': 7728, 'synset': 'fishhook.n.01', 'name': 'fishhook'}, {'id': 7729, 'synset': 'fishing_boat.n.01', 'name': 'fishing_boat'}, {'id': 7730, 'synset': 'fishing_gear.n.01', 'name': 'fishing_gear'}, {'id': 7731, 'synset': 'fish_joint.n.01', 'name': 'fish_joint'}, {'id': 7732, 'synset': 'fish_knife.n.01', 'name': 'fish_knife'}, {'id': 7733, 'synset': 'fishnet.n.01', 'name': 'fishnet'}, {'id': 7734, 'synset': 'fish_slice.n.01', 'name': 'fish_slice'}, {'id': 7735, 'synset': 'fitment.n.01', 'name': 'fitment'}, {'id': 7736, 'synset': 'fixative.n.02', 'name': 'fixative'}, {'id': 7737, 'synset': 'fixer-upper.n.01', 'name': 'fixer-upper'}, {'id': 7738, 'synset': 'flageolet.n.02', 'name': 'flageolet'}, {'id': 7739, 'synset': 'flagon.n.01', 'name': 'flagon'}, {'id': 7740, 'synset': 'flagship.n.02', 'name': 'flagship'}, {'id': 7741, 'synset': 'flail.n.01', 'name': 'flail'}, {'id': 7742, 'synset': 'flambeau.n.01', 'name': 'flambeau'}, {'id': 7743, 'synset': 'flamethrower.n.01', 'name': 'flamethrower'}, {'id': 7744, 'synset': 'flange.n.01', 'name': 'flange'}, {'id': 7745, 'synset': 'flannel.n.03', 'name': 'flannel'}, {'id': 7746, 'synset': 'flannelette.n.01', 'name': 'flannelette'}, {'id': 7747, 'synset': 'flap.n.05', 'name': 'flap'}, {'id': 7748, 'synset': 'flash.n.09', 'name': 'flash'}, {'id': 7749, 'synset': 'flash_camera.n.01', 'name': 'flash_camera'}, {'id': 7750, 'synset': 'flasher.n.02', 'name': 'flasher'}, {'id': 7751, 'synset': 'flashlight_battery.n.01', 'name': 'flashlight_battery'}, {'id': 7752, 'synset': 'flash_memory.n.01', 'name': 'flash_memory'}, {'id': 7753, 'synset': 'flask.n.01', 'name': 'flask'}, {'id': 7754, 'synset': 'flat_arch.n.01', 'name': 'flat_arch'}, {'id': 7755, 'synset': 'flatbed.n.02', 'name': 'flatbed'}, {'id': 7756, 'synset': 'flatbed_press.n.01', 'name': 'flatbed_press'}, {'id': 7757, 'synset': 'flat_bench.n.01', 'name': 'flat_bench'}, {'id': 7758, 'synset': 'flatcar.n.01', 'name': 'flatcar'}, {'id': 7759, 'synset': 'flat_file.n.01', 'name': 'flat_file'}, {'id': 7760, 'synset': 'flatlet.n.01', 'name': 'flatlet'}, {'id': 7761, 'synset': 'flat_panel_display.n.01', 'name': 'flat_panel_display'}, {'id': 7762, 'synset': 'flats.n.01', 'name': 'flats'}, {'id': 7763, 'synset': 'flat_tip_screwdriver.n.01', 'name': 'flat_tip_screwdriver'}, {'id': 7764, 'synset': 'fleet_ballistic_missile_submarine.n.01', 'name': 'fleet_ballistic_missile_submarine'}, {'id': 7765, 'synset': 'fleur-de-lis.n.02', 'name': 'fleur-de-lis'}, {'id': 7766, 'synset': 'flight_simulator.n.01', 'name': 'flight_simulator'}, {'id': 7767, 'synset': 'flintlock.n.02', 'name': 'flintlock'}, {'id': 7768, 'synset': 'flintlock.n.01', 'name': 'flintlock'}, {'id': 7769, 'synset': 'float.n.05', 'name': 'float'}, {'id': 7770, 'synset': 'floating_dock.n.01', 'name': 'floating_dock'}, {'id': 7771, 'synset': 'floatplane.n.01', 'name': 'floatplane'}, {'id': 7772, 'synset': 'flood.n.03', 'name': 'flood'}, {'id': 7773, 'synset': 'floor.n.01', 'name': 'floor'}, {'id': 7774, 'synset': 'floor.n.02', 'name': 'floor'}, {'id': 7775, 'synset': 'floor.n.09', 'name': 'floor'}, {'id': 7776, 'synset': 'floorboard.n.02', 'name': 'floorboard'}, {'id': 7777, 'synset': 'floor_cover.n.01', 'name': 'floor_cover'}, {'id': 7778, 'synset': 'floor_joist.n.01', 'name': 'floor_joist'}, {'id': 7779, 'synset': 'floor_lamp.n.01', 'name': 'floor_lamp'}, {'id': 7780, 'synset': 'flophouse.n.01', 'name': 'flophouse'}, {'id': 7781, 'synset': 'florist.n.02', 'name': 'florist'}, {'id': 7782, 'synset': 'floss.n.01', 'name': 'floss'}, {'id': 7783, 'synset': 'flotsam.n.01', 'name': 'flotsam'}, {'id': 7784, 'synset': 'flour_bin.n.01', 'name': 'flour_bin'}, {'id': 7785, 'synset': 'flour_mill.n.01', 'name': 'flour_mill'}, {'id': 7786, 'synset': 'flowerbed.n.01', 'name': 'flowerbed'}, {'id': 7787, 'synset': 'flugelhorn.n.01', 'name': 'flugelhorn'}, {'id': 7788, 'synset': 'fluid_drive.n.01', 'name': 'fluid_drive'}, {'id': 7789, 'synset': 'fluid_flywheel.n.01', 'name': 'fluid_flywheel'}, {'id': 7790, 'synset': 'flume.n.02', 'name': 'flume'}, {'id': 7791, 'synset': 'fluorescent_lamp.n.01', 'name': 'fluorescent_lamp'}, {'id': 7792, 'synset': 'fluoroscope.n.01', 'name': 'fluoroscope'}, {'id': 7793, 'synset': 'flush_toilet.n.01', 'name': 'flush_toilet'}, {'id': 7794, 'synset': 'flute.n.01', 'name': 'flute'}, {'id': 7795, 'synset': 'flux_applicator.n.01', 'name': 'flux_applicator'}, {'id': 7796, 'synset': 'fluxmeter.n.01', 'name': 'fluxmeter'}, {'id': 7797, 'synset': 'fly.n.05', 'name': 'fly'}, {'id': 7798, 'synset': 'flying_boat.n.01', 'name': 'flying_boat'}, {'id': 7799, 'synset': 'flying_buttress.n.01', 'name': 'flying_buttress'}, {'id': 7800, 'synset': 'flying_carpet.n.01', 'name': 'flying_carpet'}, {'id': 7801, 'synset': 'flying_jib.n.01', 'name': 'flying_jib'}, {'id': 7802, 'synset': 'fly_rod.n.01', 'name': 'fly_rod'}, {'id': 7803, 'synset': 'fly_tent.n.01', 'name': 'fly_tent'}, {'id': 7804, 'synset': 'flytrap.n.01', 'name': 'flytrap'}, {'id': 7805, 'synset': 'flywheel.n.01', 'name': 'flywheel'}, {'id': 7806, 'synset': 'fob.n.03', 'name': 'fob'}, {'id': 7807, 'synset': 'foghorn.n.02', 'name': 'foghorn'}, {'id': 7808, 'synset': 'foglamp.n.01', 'name': 'foglamp'}, {'id': 7809, 'synset': 'foil.n.05', 'name': 'foil'}, {'id': 7810, 'synset': 'fold.n.06', 'name': 'fold'}, {'id': 7811, 'synset': 'folder.n.02', 'name': 'folder'}, {'id': 7812, 'synset': 'folding_door.n.01', 'name': 'folding_door'}, {'id': 7813, 'synset': 'folding_saw.n.01', 'name': 'folding_saw'}, {'id': 7814, 'synset': 'food_court.n.01', 'name': 'food_court'}, {'id': 7815, 'synset': 'food_hamper.n.01', 'name': 'food_hamper'}, {'id': 7816, 'synset': 'foot.n.11', 'name': 'foot'}, {'id': 7817, 'synset': 'footage.n.01', 'name': 'footage'}, {'id': 7818, 'synset': 'football_stadium.n.01', 'name': 'football_stadium'}, {'id': 7819, 'synset': 'footbath.n.01', 'name': 'footbath'}, {'id': 7820, 'synset': 'foot_brake.n.01', 'name': 'foot_brake'}, {'id': 7821, 'synset': 'footbridge.n.01', 'name': 'footbridge'}, {'id': 7822, 'synset': 'foothold.n.02', 'name': 'foothold'}, {'id': 7823, 'synset': 'footlocker.n.01', 'name': 'footlocker'}, {'id': 7824, 'synset': 'foot_rule.n.01', 'name': 'foot_rule'}, {'id': 7825, 'synset': 'footwear.n.02', 'name': 'footwear'}, {'id': 7826, 'synset': 'footwear.n.01', 'name': 'footwear'}, {'id': 7827, 'synset': 'forceps.n.01', 'name': 'forceps'}, {'id': 7828, 'synset': 'force_pump.n.01', 'name': 'force_pump'}, {'id': 7829, 'synset': 'fore-and-after.n.01', 'name': 'fore-and-after'}, {'id': 7830, 'synset': 'fore-and-aft_sail.n.01', 'name': 'fore-and-aft_sail'}, {'id': 7831, 'synset': 'forecastle.n.01', 'name': 'forecastle'}, {'id': 7832, 'synset': 'forecourt.n.01', 'name': 'forecourt'}, {'id': 7833, 'synset': 'foredeck.n.01', 'name': 'foredeck'}, {'id': 7834, 'synset': 'fore_edge.n.01', 'name': 'fore_edge'}, {'id': 7835, 'synset': 'foreground.n.02', 'name': 'foreground'}, {'id': 7836, 'synset': 'foremast.n.01', 'name': 'foremast'}, {'id': 7837, 'synset': 'fore_plane.n.01', 'name': 'fore_plane'}, {'id': 7838, 'synset': 'foresail.n.01', 'name': 'foresail'}, {'id': 7839, 'synset': 'forestay.n.01', 'name': 'forestay'}, {'id': 7840, 'synset': 'foretop.n.01', 'name': 'foretop'}, {'id': 7841, 'synset': 'fore-topmast.n.01', 'name': 'fore-topmast'}, {'id': 7842, 'synset': 'fore-topsail.n.01', 'name': 'fore-topsail'}, {'id': 7843, 'synset': 'forge.n.01', 'name': 'forge'}, {'id': 7844, 'synset': 'fork.n.04', 'name': 'fork'}, {'id': 7845, 'synset': 'formalwear.n.01', 'name': 'formalwear'}, {'id': 7846, 'synset': 'formica.n.01', 'name': 'Formica'}, {'id': 7847, 'synset': 'fortification.n.01', 'name': 'fortification'}, {'id': 7848, 'synset': 'fortress.n.01', 'name': 'fortress'}, {'id': 7849, 'synset': 'forty-five.n.01', 'name': 'forty-five'}, {'id': 7850, 'synset': 'foucault_pendulum.n.01', 'name': 'Foucault_pendulum'}, {'id': 7851, 'synset': 'foulard.n.01', 'name': 'foulard'}, {'id': 7852, 'synset': 'foul-weather_gear.n.01', 'name': 'foul-weather_gear'}, {'id': 7853, 'synset': 'foundation_garment.n.01', 'name': 'foundation_garment'}, {'id': 7854, 'synset': 'foundry.n.01', 'name': 'foundry'}, {'id': 7855, 'synset': 'fountain.n.01', 'name': 'fountain'}, {'id': 7856, 'synset': 'fountain_pen.n.01', 'name': 'fountain_pen'}, {'id': 7857, 'synset': 'four-in-hand.n.01', 'name': 'four-in-hand'}, {'id': 7858, 'synset': 'four-poster.n.01', 'name': 'four-poster'}, {'id': 7859, 'synset': 'four-pounder.n.01', 'name': 'four-pounder'}, {'id': 7860, 'synset': 'four-stroke_engine.n.01', 'name': 'four-stroke_engine'}, {'id': 7861, 'synset': 'four-wheel_drive.n.02', 'name': 'four-wheel_drive'}, {'id': 7862, 'synset': 'four-wheel_drive.n.01', 'name': 'four-wheel_drive'}, {'id': 7863, 'synset': 'four-wheeler.n.01', 'name': 'four-wheeler'}, {'id': 7864, 'synset': 'fowling_piece.n.01', 'name': 'fowling_piece'}, {'id': 7865, 'synset': 'foxhole.n.01', 'name': 'foxhole'}, {'id': 7866, 'synset': 'fragmentation_bomb.n.01', 'name': 'fragmentation_bomb'}, {'id': 7867, 'synset': 'frail.n.02', 'name': 'frail'}, {'id': 7868, 'synset': 'fraise.n.02', 'name': 'fraise'}, {'id': 7869, 'synset': 'frame.n.10', 'name': 'frame'}, {'id': 7870, 'synset': 'frame.n.01', 'name': 'frame'}, {'id': 7871, 'synset': 'frame_buffer.n.01', 'name': 'frame_buffer'}, {'id': 7872, 'synset': 'framework.n.03', 'name': 'framework'}, {'id': 7873, 'synset': 'francis_turbine.n.01', 'name': 'Francis_turbine'}, {'id': 7874, 'synset': 'franking_machine.n.01', 'name': 'franking_machine'}, {'id': 7875, 'synset': 'free_house.n.01', 'name': 'free_house'}, {'id': 7876, 'synset': 'free-reed.n.01', 'name': 'free-reed'}, {'id': 7877, 'synset': 'free-reed_instrument.n.01', 'name': 'free-reed_instrument'}, {'id': 7878, 'synset': 'freewheel.n.01', 'name': 'freewheel'}, {'id': 7879, 'synset': 'freight_elevator.n.01', 'name': 'freight_elevator'}, {'id': 7880, 'synset': 'freight_liner.n.01', 'name': 'freight_liner'}, {'id': 7881, 'synset': 'freight_train.n.01', 'name': 'freight_train'}, {'id': 7882, 'synset': 'french_door.n.01', 'name': 'French_door'}, {'id': 7883, 'synset': 'french_horn.n.01', 'name': 'French_horn'}, {'id': 7884, 'synset': 'french_polish.n.02', 'name': 'French_polish'}, {'id': 7885, 'synset': 'french_roof.n.01', 'name': 'French_roof'}, {'id': 7886, 'synset': 'french_window.n.01', 'name': 'French_window'}, {'id': 7887, 'synset': 'fresnel_lens.n.01', 'name': 'Fresnel_lens'}, {'id': 7888, 'synset': 'fret.n.04', 'name': 'fret'}, {'id': 7889, 'synset': 'friary.n.01', 'name': 'friary'}, {'id': 7890, 'synset': 'friction_clutch.n.01', 'name': 'friction_clutch'}, {'id': 7891, 'synset': 'frieze.n.02', 'name': 'frieze'}, {'id': 7892, 'synset': 'frieze.n.01', 'name': 'frieze'}, {'id': 7893, 'synset': 'frigate.n.02', 'name': 'frigate'}, {'id': 7894, 'synset': 'frigate.n.01', 'name': 'frigate'}, {'id': 7895, 'synset': 'frill.n.03', 'name': 'frill'}, {'id': 7896, 'synset': 'frock.n.01', 'name': 'frock'}, {'id': 7897, 'synset': 'frock_coat.n.01', 'name': 'frock_coat'}, {'id': 7898, 'synset': 'frontlet.n.01', 'name': 'frontlet'}, {'id': 7899, 'synset': 'front_porch.n.01', 'name': 'front_porch'}, {'id': 7900, 'synset': 'front_projector.n.01', 'name': 'front_projector'}, {'id': 7901, 'synset': 'fruit_machine.n.01', 'name': 'fruit_machine'}, {'id': 7902, 'synset': 'fuel_filter.n.01', 'name': 'fuel_filter'}, {'id': 7903, 'synset': 'fuel_gauge.n.01', 'name': 'fuel_gauge'}, {'id': 7904, 'synset': 'fuel_injection.n.01', 'name': 'fuel_injection'}, {'id': 7905, 'synset': 'fuel_system.n.01', 'name': 'fuel_system'}, {'id': 7906, 'synset': 'full-dress_uniform.n.01', 'name': 'full-dress_uniform'}, {'id': 7907, 'synset': 'full_metal_jacket.n.01', 'name': 'full_metal_jacket'}, {'id': 7908, 'synset': 'full_skirt.n.01', 'name': 'full_skirt'}, {'id': 7909, 'synset': 'fumigator.n.02', 'name': 'fumigator'}, {'id': 7910, 'synset': 'funeral_home.n.01', 'name': 'funeral_home'}, {'id': 7911, 'synset': 'funny_wagon.n.01', 'name': 'funny_wagon'}, {'id': 7912, 'synset': 'fur.n.03', 'name': 'fur'}, {'id': 7913, 'synset': 'fur_coat.n.01', 'name': 'fur_coat'}, {'id': 7914, 'synset': 'fur_hat.n.01', 'name': 'fur_hat'}, {'id': 7915, 'synset': 'furnace.n.01', 'name': 'furnace'}, {'id': 7916, 'synset': 'furnace_lining.n.01', 'name': 'furnace_lining'}, {'id': 7917, 'synset': 'furnace_room.n.01', 'name': 'furnace_room'}, {'id': 7918, 'synset': 'furnishing.n.02', 'name': 'furnishing'}, {'id': 7919, 'synset': 'furnishing.n.01', 'name': 'furnishing'}, {'id': 7920, 'synset': 'furniture.n.01', 'name': 'furniture'}, {'id': 7921, 'synset': 'fur-piece.n.01', 'name': 'fur-piece'}, {'id': 7922, 'synset': 'furrow.n.01', 'name': 'furrow'}, {'id': 7923, 'synset': 'fuse.n.01', 'name': 'fuse'}, {'id': 7924, 'synset': 'fusee_drive.n.01', 'name': 'fusee_drive'}, {'id': 7925, 'synset': 'fuselage.n.01', 'name': 'fuselage'}, {'id': 7926, 'synset': 'fusil.n.01', 'name': 'fusil'}, {'id': 7927, 'synset': 'fustian.n.02', 'name': 'fustian'}, {'id': 7928, 'synset': 'gabardine.n.01', 'name': 'gabardine'}, {'id': 7929, 'synset': 'gable.n.01', 'name': 'gable'}, {'id': 7930, 'synset': 'gable_roof.n.01', 'name': 'gable_roof'}, {'id': 7931, 'synset': 'gadgetry.n.01', 'name': 'gadgetry'}, {'id': 7932, 'synset': 'gaff.n.03', 'name': 'gaff'}, {'id': 7933, 'synset': 'gaff.n.02', 'name': 'gaff'}, {'id': 7934, 'synset': 'gaff.n.01', 'name': 'gaff'}, {'id': 7935, 'synset': 'gaffsail.n.01', 'name': 'gaffsail'}, {'id': 7936, 'synset': 'gaff_topsail.n.01', 'name': 'gaff_topsail'}, {'id': 7937, 'synset': 'gaiter.n.03', 'name': 'gaiter'}, {'id': 7938, 'synset': 'gaiter.n.02', 'name': 'gaiter'}, {'id': 7939, 'synset': 'galilean_telescope.n.01', 'name': 'Galilean_telescope'}, {'id': 7940, 'synset': 'galleon.n.01', 'name': 'galleon'}, {'id': 7941, 'synset': 'gallery.n.04', 'name': 'gallery'}, {'id': 7942, 'synset': 'gallery.n.03', 'name': 'gallery'}, {'id': 7943, 'synset': 'galley.n.04', 'name': 'galley'}, {'id': 7944, 'synset': 'galley.n.03', 'name': 'galley'}, {'id': 7945, 'synset': 'galley.n.02', 'name': 'galley'}, {'id': 7946, 'synset': 'gallows.n.01', 'name': 'gallows'}, {'id': 7947, 'synset': 'gallows_tree.n.01', 'name': 'gallows_tree'}, {'id': 7948, 'synset': 'galvanometer.n.01', 'name': 'galvanometer'}, {'id': 7949, 'synset': 'gambling_house.n.01', 'name': 'gambling_house'}, {'id': 7950, 'synset': 'gambrel.n.01', 'name': 'gambrel'}, {'id': 7951, 'synset': 'game.n.09', 'name': 'game'}, {'id': 7952, 'synset': 'gamebag.n.01', 'name': 'gamebag'}, {'id': 7953, 'synset': 'game_equipment.n.01', 'name': 'game_equipment'}, {'id': 7954, 'synset': 'gaming_table.n.01', 'name': 'gaming_table'}, {'id': 7955, 'synset': 'gamp.n.01', 'name': 'gamp'}, {'id': 7956, 'synset': 'gangplank.n.01', 'name': 'gangplank'}, {'id': 7957, 'synset': 'gangsaw.n.01', 'name': 'gangsaw'}, {'id': 7958, 'synset': 'gangway.n.01', 'name': 'gangway'}, {'id': 7959, 'synset': 'gantlet.n.04', 'name': 'gantlet'}, {'id': 7960, 'synset': 'gantry.n.01', 'name': 'gantry'}, {'id': 7961, 'synset': 'garage.n.01', 'name': 'garage'}, {'id': 7962, 'synset': 'garage.n.02', 'name': 'garage'}, {'id': 7963, 'synset': 'garand_rifle.n.01', 'name': 'Garand_rifle'}, {'id': 7964, 'synset': 'garboard.n.01', 'name': 'garboard'}, {'id': 7965, 'synset': 'garden.n.01', 'name': 'garden'}, {'id': 7966, 'synset': 'garden.n.03', 'name': 'garden'}, {'id': 7967, 'synset': 'garden_rake.n.01', 'name': 'garden_rake'}, {'id': 7968, 'synset': 'garden_spade.n.01', 'name': 'garden_spade'}, {'id': 7969, 'synset': 'garden_tool.n.01', 'name': 'garden_tool'}, {'id': 7970, 'synset': 'garden_trowel.n.01', 'name': 'garden_trowel'}, {'id': 7971, 'synset': 'gargoyle.n.01', 'name': 'gargoyle'}, {'id': 7972, 'synset': 'garibaldi.n.02', 'name': 'garibaldi'}, {'id': 7973, 'synset': 'garlic_press.n.01', 'name': 'garlic_press'}, {'id': 7974, 'synset': 'garment.n.01', 'name': 'garment'}, {'id': 7975, 'synset': 'garment_bag.n.01', 'name': 'garment_bag'}, {'id': 7976, 'synset': 'garrison_cap.n.01', 'name': 'garrison_cap'}, {'id': 7977, 'synset': 'garrote.n.01', 'name': 'garrote'}, {'id': 7978, 'synset': 'garter.n.01', 'name': 'garter'}, {'id': 7979, 'synset': 'garter_belt.n.01', 'name': 'garter_belt'}, {'id': 7980, 'synset': 'garter_stitch.n.01', 'name': 'garter_stitch'}, {'id': 7981, 'synset': 'gas_guzzler.n.01', 'name': 'gas_guzzler'}, {'id': 7982, 'synset': 'gas_shell.n.01', 'name': 'gas_shell'}, {'id': 7983, 'synset': 'gas_bracket.n.01', 'name': 'gas_bracket'}, {'id': 7984, 'synset': 'gas_burner.n.01', 'name': 'gas_burner'}, {'id': 7985, 'synset': 'gas-cooled_reactor.n.01', 'name': 'gas-cooled_reactor'}, {'id': 7986, 'synset': 'gas-discharge_tube.n.01', 'name': 'gas-discharge_tube'}, {'id': 7987, 'synset': 'gas_engine.n.01', 'name': 'gas_engine'}, {'id': 7988, 'synset': 'gas_fixture.n.01', 'name': 'gas_fixture'}, {'id': 7989, 'synset': 'gas_furnace.n.01', 'name': 'gas_furnace'}, {'id': 7990, 'synset': 'gas_gun.n.01', 'name': 'gas_gun'}, {'id': 7991, 'synset': 'gas_heater.n.01', 'name': 'gas_heater'}, {'id': 7992, 'synset': 'gas_holder.n.01', 'name': 'gas_holder'}, {'id': 7993, 'synset': 'gasket.n.01', 'name': 'gasket'}, {'id': 7994, 'synset': 'gas_lamp.n.01', 'name': 'gas_lamp'}, {'id': 7995, 'synset': 'gas_maser.n.01', 'name': 'gas_maser'}, {'id': 7996, 'synset': 'gas_meter.n.01', 'name': 'gas_meter'}, {'id': 7997, 'synset': 'gasoline_engine.n.01', 'name': 'gasoline_engine'}, {'id': 7998, 'synset': 'gasoline_gauge.n.01', 'name': 'gasoline_gauge'}, {'id': 7999, 'synset': 'gas_oven.n.02', 'name': 'gas_oven'}, {'id': 8000, 'synset': 'gas_oven.n.01', 'name': 'gas_oven'}, {'id': 8001, 'synset': 'gas_pump.n.01', 'name': 'gas_pump'}, {'id': 8002, 'synset': 'gas_range.n.01', 'name': 'gas_range'}, {'id': 8003, 'synset': 'gas_ring.n.01', 'name': 'gas_ring'}, {'id': 8004, 'synset': 'gas_tank.n.01', 'name': 'gas_tank'}, {'id': 8005, 'synset': 'gas_thermometer.n.01', 'name': 'gas_thermometer'}, {'id': 8006, 'synset': 'gastroscope.n.01', 'name': 'gastroscope'}, {'id': 8007, 'synset': 'gas_turbine.n.01', 'name': 'gas_turbine'}, {'id': 8008, 'synset': 'gas-turbine_ship.n.01', 'name': 'gas-turbine_ship'}, {'id': 8009, 'synset': 'gat.n.01', 'name': 'gat'}, {'id': 8010, 'synset': 'gate.n.01', 'name': 'gate'}, {'id': 8011, 'synset': 'gatehouse.n.01', 'name': 'gatehouse'}, {'id': 8012, 'synset': 'gateleg_table.n.01', 'name': 'gateleg_table'}, {'id': 8013, 'synset': 'gatepost.n.01', 'name': 'gatepost'}, {'id': 8014, 'synset': 'gathered_skirt.n.01', 'name': 'gathered_skirt'}, {'id': 8015, 'synset': 'gatling_gun.n.01', 'name': 'Gatling_gun'}, {'id': 8016, 'synset': 'gauge.n.01', 'name': 'gauge'}, {'id': 8017, 'synset': 'gauntlet.n.03', 'name': 'gauntlet'}, {'id': 8018, 'synset': 'gauntlet.n.02', 'name': 'gauntlet'}, {'id': 8019, 'synset': 'gauze.n.02', 'name': 'gauze'}, {'id': 8020, 'synset': 'gauze.n.01', 'name': 'gauze'}, {'id': 8021, 'synset': 'gavel.n.01', 'name': 'gavel'}, {'id': 8022, 'synset': 'gazebo.n.01', 'name': 'gazebo'}, {'id': 8023, 'synset': 'gear.n.01', 'name': 'gear'}, {'id': 8024, 'synset': 'gear.n.04', 'name': 'gear'}, {'id': 8025, 'synset': 'gear.n.03', 'name': 'gear'}, {'id': 8026, 'synset': 'gearbox.n.01', 'name': 'gearbox'}, {'id': 8027, 'synset': 'gearing.n.01', 'name': 'gearing'}, {'id': 8028, 'synset': 'gearset.n.01', 'name': 'gearset'}, {'id': 8029, 'synset': 'gearshift.n.01', 'name': 'gearshift'}, {'id': 8030, 'synset': 'geiger_counter.n.01', 'name': 'Geiger_counter'}, {'id': 8031, 'synset': 'geiger_tube.n.01', 'name': 'Geiger_tube'}, {'id': 8032, 'synset': 'gene_chip.n.01', 'name': 'gene_chip'}, {'id': 8033, 'synset': 'general-purpose_bomb.n.01', 'name': 'general-purpose_bomb'}, {'id': 8034, 'synset': 'generator.n.01', 'name': 'generator'}, {'id': 8035, 'synset': 'generator.n.04', 'name': 'generator'}, {'id': 8036, 'synset': 'geneva_gown.n.01', 'name': 'Geneva_gown'}, {'id': 8037, 'synset': 'geodesic_dome.n.01', 'name': 'geodesic_dome'}, {'id': 8038, 'synset': 'georgette.n.01', 'name': 'georgette'}, {'id': 8039, 'synset': 'gharry.n.01', 'name': 'gharry'}, {'id': 8040, 'synset': 'ghat.n.01', 'name': 'ghat'}, {'id': 8041, 'synset': 'ghetto_blaster.n.01', 'name': 'ghetto_blaster'}, {'id': 8042, 'synset': 'gift_shop.n.01', 'name': 'gift_shop'}, {'id': 8043, 'synset': 'gift_wrapping.n.01', 'name': 'gift_wrapping'}, {'id': 8044, 'synset': 'gig.n.05', 'name': 'gig'}, {'id': 8045, 'synset': 'gig.n.04', 'name': 'gig'}, {'id': 8046, 'synset': 'gig.n.01', 'name': 'gig'}, {'id': 8047, 'synset': 'gig.n.03', 'name': 'gig'}, {'id': 8048, 'synset': 'gildhall.n.01', 'name': 'gildhall'}, {'id': 8049, 'synset': 'gill_net.n.01', 'name': 'gill_net'}, {'id': 8050, 'synset': 'gilt.n.01', 'name': 'gilt'}, {'id': 8051, 'synset': 'gimbal.n.01', 'name': 'gimbal'}, {'id': 8052, 'synset': 'gingham.n.01', 'name': 'gingham'}, {'id': 8053, 'synset': 'girandole.n.01', 'name': 'girandole'}, {'id': 8054, 'synset': 'girder.n.01', 'name': 'girder'}, {'id': 8055, 'synset': 'glass.n.07', 'name': 'glass'}, {'id': 8056, 'synset': 'glass_cutter.n.03', 'name': 'glass_cutter'}, {'id': 8057, 'synset': 'glasses_case.n.01', 'name': 'glasses_case'}, {'id': 8058, 'synset': 'glebe_house.n.01', 'name': 'glebe_house'}, {'id': 8059, 'synset': 'glengarry.n.01', 'name': 'Glengarry'}, {'id': 8060, 'synset': 'glider.n.01', 'name': 'glider'}, {'id': 8061, 'synset': 'global_positioning_system.n.01', 'name': 'Global_Positioning_System'}, {'id': 8062, 'synset': 'glockenspiel.n.01', 'name': 'glockenspiel'}, {'id': 8063, 'synset': 'glory_hole.n.01', 'name': 'glory_hole'}, {'id': 8064, 'synset': 'glove_compartment.n.01', 'name': 'glove_compartment'}, {'id': 8065, 'synset': 'glow_lamp.n.01', 'name': 'glow_lamp'}, {'id': 8066, 'synset': 'glow_tube.n.01', 'name': 'glow_tube'}, {'id': 8067, 'synset': 'glyptic_art.n.01', 'name': 'glyptic_art'}, {'id': 8068, 'synset': 'glyptics.n.01', 'name': 'glyptics'}, {'id': 8069, 'synset': 'gnomon.n.01', 'name': 'gnomon'}, {'id': 8070, 'synset': 'goal.n.03', 'name': 'goal'}, {'id': 8071, 'synset': 'goalmouth.n.01', 'name': 'goalmouth'}, {'id': 8072, 'synset': 'goalpost.n.01', 'name': 'goalpost'}, {'id': 8073, 'synset': 'goblet.n.01', 'name': 'goblet'}, {'id': 8074, 'synset': 'godown.n.01', 'name': 'godown'}, {'id': 8075, 'synset': 'go-kart.n.01', 'name': 'go-kart'}, {'id': 8076, 'synset': 'gold_plate.n.02', 'name': 'gold_plate'}, {'id': 8077, 'synset': 'golf_bag.n.01', 'name': 'golf_bag'}, {'id': 8078, 'synset': 'golf_ball.n.01', 'name': 'golf_ball'}, {'id': 8079, 'synset': 'golf-club_head.n.01', 'name': 'golf-club_head'}, {'id': 8080, 'synset': 'golf_equipment.n.01', 'name': 'golf_equipment'}, {'id': 8081, 'synset': 'golf_glove.n.01', 'name': 'golf_glove'}, {'id': 8082, 'synset': 'golliwog.n.01', 'name': 'golliwog'}, {'id': 8083, 'synset': 'gong.n.01', 'name': 'gong'}, {'id': 8084, 'synset': 'goniometer.n.01', 'name': 'goniometer'}, {'id': 8085, 'synset': 'gordian_knot.n.02', 'name': 'Gordian_knot'}, {'id': 8086, 'synset': 'gorget.n.01', 'name': 'gorget'}, {'id': 8087, 'synset': 'gossamer.n.01', 'name': 'gossamer'}, {'id': 8088, 'synset': 'gothic_arch.n.01', 'name': 'Gothic_arch'}, {'id': 8089, 'synset': 'gouache.n.01', 'name': 'gouache'}, {'id': 8090, 'synset': 'gouge.n.02', 'name': 'gouge'}, {'id': 8091, 'synset': 'gourd.n.01', 'name': 'gourd'}, {'id': 8092, 'synset': 'government_building.n.01', 'name': 'government_building'}, {'id': 8093, 'synset': 'government_office.n.01', 'name': 'government_office'}, {'id': 8094, 'synset': 'gown.n.01', 'name': 'gown'}, {'id': 8095, 'synset': 'gown.n.05', 'name': 'gown'}, {'id': 8096, 'synset': 'gown.n.04', 'name': 'gown'}, {'id': 8097, 'synset': 'grab.n.01', 'name': 'grab'}, {'id': 8098, 'synset': 'grab_bag.n.02', 'name': 'grab_bag'}, {'id': 8099, 'synset': 'grab_bar.n.01', 'name': 'grab_bar'}, {'id': 8100, 'synset': 'grace_cup.n.01', 'name': 'grace_cup'}, {'id': 8101, 'synset': 'grade_separation.n.01', 'name': 'grade_separation'}, {'id': 8102, 'synset': 'graduated_cylinder.n.01', 'name': 'graduated_cylinder'}, {'id': 8103, 'synset': 'graffito.n.01', 'name': 'graffito'}, {'id': 8104, 'synset': 'gramophone.n.01', 'name': 'gramophone'}, {'id': 8105, 'synset': 'granary.n.01', 'name': 'granary'}, {'id': 8106, 'synset': 'grandfather_clock.n.01', 'name': 'grandfather_clock'}, {'id': 8107, 'synset': 'grand_piano.n.01', 'name': 'grand_piano'}, {'id': 8108, 'synset': 'graniteware.n.01', 'name': 'graniteware'}, {'id': 8109, 'synset': 'granny_knot.n.01', 'name': 'granny_knot'}, {'id': 8110, 'synset': 'grape_arbor.n.01', 'name': 'grape_arbor'}, {'id': 8111, 'synset': 'grapnel.n.02', 'name': 'grapnel'}, {'id': 8112, 'synset': 'grapnel.n.01', 'name': 'grapnel'}, {'id': 8113, 'synset': 'grass_skirt.n.01', 'name': 'grass_skirt'}, {'id': 8114, 'synset': 'grate.n.01', 'name': 'grate'}, {'id': 8115, 'synset': 'grate.n.03', 'name': 'grate'}, {'id': 8116, 'synset': 'graver.n.01', 'name': 'graver'}, {'id': 8117, 'synset': 'gravimeter.n.02', 'name': 'gravimeter'}, {'id': 8118, 'synset': 'gravure.n.03', 'name': 'gravure'}, {'id': 8119, 'synset': 'grey.n.06', 'name': 'grey'}, {'id': 8120, 'synset': 'grease-gun.n.01', 'name': 'grease-gun'}, {'id': 8121, 'synset': 'greasepaint.n.01', 'name': 'greasepaint'}, {'id': 8122, 'synset': 'greasy_spoon.n.01', 'name': 'greasy_spoon'}, {'id': 8123, 'synset': 'greatcoat.n.01', 'name': 'greatcoat'}, {'id': 8124, 'synset': 'great_hall.n.01', 'name': 'great_hall'}, {'id': 8125, 'synset': 'greave.n.01', 'name': 'greave'}, {'id': 8126, 'synset': 'greengrocery.n.02', 'name': 'greengrocery'}, {'id': 8127, 'synset': 'greenhouse.n.01', 'name': 'greenhouse'}, {'id': 8128, 'synset': 'grenade.n.01', 'name': 'grenade'}, {'id': 8129, 'synset': 'grid.n.05', 'name': 'grid'}, {'id': 8130, 'synset': 'grille.n.02', 'name': 'grille'}, {'id': 8131, 'synset': 'grillroom.n.01', 'name': 'grillroom'}, {'id': 8132, 'synset': 'grinder.n.04', 'name': 'grinder'}, {'id': 8133, 'synset': 'grinding_wheel.n.01', 'name': 'grinding_wheel'}, {'id': 8134, 'synset': 'grindstone.n.01', 'name': 'grindstone'}, {'id': 8135, 'synset': 'gripsack.n.01', 'name': 'gripsack'}, {'id': 8136, 'synset': 'gristmill.n.01', 'name': 'gristmill'}, {'id': 8137, 'synset': 'grocery_store.n.01', 'name': 'grocery_store'}, {'id': 8138, 'synset': 'grogram.n.01', 'name': 'grogram'}, {'id': 8139, 'synset': 'groined_vault.n.01', 'name': 'groined_vault'}, {'id': 8140, 'synset': 'groover.n.01', 'name': 'groover'}, {'id': 8141, 'synset': 'grosgrain.n.01', 'name': 'grosgrain'}, {'id': 8142, 'synset': 'gros_point.n.01', 'name': 'gros_point'}, {'id': 8143, 'synset': 'ground.n.09', 'name': 'ground'}, {'id': 8144, 'synset': 'ground_bait.n.01', 'name': 'ground_bait'}, {'id': 8145, 'synset': 'ground_control.n.01', 'name': 'ground_control'}, {'id': 8146, 'synset': 'ground_floor.n.01', 'name': 'ground_floor'}, {'id': 8147, 'synset': 'groundsheet.n.01', 'name': 'groundsheet'}, {'id': 8148, 'synset': 'g-string.n.01', 'name': 'G-string'}, {'id': 8149, 'synset': 'guard.n.03', 'name': 'guard'}, {'id': 8150, 'synset': 'guard_boat.n.01', 'name': 'guard_boat'}, {'id': 8151, 'synset': 'guardroom.n.02', 'name': 'guardroom'}, {'id': 8152, 'synset': 'guardroom.n.01', 'name': 'guardroom'}, {'id': 8153, 'synset': 'guard_ship.n.01', 'name': 'guard_ship'}, {'id': 8154, 'synset': "guard's_van.n.01", 'name': "guard's_van"}, {'id': 8155, 'synset': 'gueridon.n.01', 'name': 'gueridon'}, {'id': 8156, 'synset': 'guarnerius.n.03', 'name': 'Guarnerius'}, {'id': 8157, 'synset': 'guesthouse.n.01', 'name': 'guesthouse'}, {'id': 8158, 'synset': 'guestroom.n.01', 'name': 'guestroom'}, {'id': 8159, 'synset': 'guidance_system.n.01', 'name': 'guidance_system'}, {'id': 8160, 'synset': 'guided_missile.n.01', 'name': 'guided_missile'}, {'id': 8161, 'synset': 'guided_missile_cruiser.n.01', 'name': 'guided_missile_cruiser'}, {'id': 8162, 'synset': 'guided_missile_frigate.n.01', 'name': 'guided_missile_frigate'}, {'id': 8163, 'synset': 'guildhall.n.01', 'name': 'guildhall'}, {'id': 8164, 'synset': 'guilloche.n.01', 'name': 'guilloche'}, {'id': 8165, 'synset': 'guillotine.n.02', 'name': 'guillotine'}, {'id': 8166, 'synset': 'guimpe.n.02', 'name': 'guimpe'}, {'id': 8167, 'synset': 'guimpe.n.01', 'name': 'guimpe'}, {'id': 8168, 'synset': 'guitar_pick.n.01', 'name': 'guitar_pick'}, {'id': 8169, 'synset': 'gulag.n.01', 'name': 'gulag'}, {'id': 8170, 'synset': 'gunboat.n.01', 'name': 'gunboat'}, {'id': 8171, 'synset': 'gun_carriage.n.01', 'name': 'gun_carriage'}, {'id': 8172, 'synset': 'gun_case.n.01', 'name': 'gun_case'}, {'id': 8173, 'synset': 'gun_emplacement.n.01', 'name': 'gun_emplacement'}, {'id': 8174, 'synset': 'gun_enclosure.n.01', 'name': 'gun_enclosure'}, {'id': 8175, 'synset': 'gunlock.n.01', 'name': 'gunlock'}, {'id': 8176, 'synset': 'gunnery.n.01', 'name': 'gunnery'}, {'id': 8177, 'synset': 'gunnysack.n.01', 'name': 'gunnysack'}, {'id': 8178, 'synset': 'gun_pendulum.n.01', 'name': 'gun_pendulum'}, {'id': 8179, 'synset': 'gun_room.n.01', 'name': 'gun_room'}, {'id': 8180, 'synset': 'gunsight.n.01', 'name': 'gunsight'}, {'id': 8181, 'synset': 'gun_trigger.n.01', 'name': 'gun_trigger'}, {'id': 8182, 'synset': 'gurney.n.01', 'name': 'gurney'}, {'id': 8183, 'synset': 'gusher.n.01', 'name': 'gusher'}, {'id': 8184, 'synset': 'gusset.n.03', 'name': 'gusset'}, {'id': 8185, 'synset': 'gusset.n.02', 'name': 'gusset'}, {'id': 8186, 'synset': 'guy.n.03', 'name': 'guy'}, {'id': 8187, 'synset': 'gymnastic_apparatus.n.01', 'name': 'gymnastic_apparatus'}, {'id': 8188, 'synset': 'gym_shoe.n.01', 'name': 'gym_shoe'}, {'id': 8189, 'synset': 'gym_suit.n.01', 'name': 'gym_suit'}, {'id': 8190, 'synset': 'gymslip.n.01', 'name': 'gymslip'}, {'id': 8191, 'synset': 'gypsy_cab.n.01', 'name': 'gypsy_cab'}, {'id': 8192, 'synset': 'gyrocompass.n.01', 'name': 'gyrocompass'}, {'id': 8193, 'synset': 'gyroscope.n.01', 'name': 'gyroscope'}, {'id': 8194, 'synset': 'gyrostabilizer.n.01', 'name': 'gyrostabilizer'}, {'id': 8195, 'synset': 'habergeon.n.01', 'name': 'habergeon'}, {'id': 8196, 'synset': 'habit.n.03', 'name': 'habit'}, {'id': 8197, 'synset': 'habit.n.05', 'name': 'habit'}, {'id': 8198, 'synset': 'hacienda.n.02', 'name': 'hacienda'}, {'id': 8199, 'synset': 'hacksaw.n.01', 'name': 'hacksaw'}, {'id': 8200, 'synset': 'haft.n.01', 'name': 'haft'}, {'id': 8201, 'synset': 'haircloth.n.01', 'name': 'haircloth'}, {'id': 8202, 'synset': 'hairdressing.n.01', 'name': 'hairdressing'}, {'id': 8203, 'synset': 'hairpiece.n.01', 'name': 'hairpiece'}, {'id': 8204, 'synset': 'hair_shirt.n.01', 'name': 'hair_shirt'}, {'id': 8205, 'synset': 'hair_slide.n.01', 'name': 'hair_slide'}, {'id': 8206, 'synset': 'hair_spray.n.01', 'name': 'hair_spray'}, {'id': 8207, 'synset': 'hairspring.n.01', 'name': 'hairspring'}, {'id': 8208, 'synset': 'hair_trigger.n.01', 'name': 'hair_trigger'}, {'id': 8209, 'synset': 'halberd.n.01', 'name': 'halberd'}, {'id': 8210, 'synset': 'half_binding.n.01', 'name': 'half_binding'}, {'id': 8211, 'synset': 'half_hatchet.n.01', 'name': 'half_hatchet'}, {'id': 8212, 'synset': 'half_hitch.n.01', 'name': 'half_hitch'}, {'id': 8213, 'synset': 'half_track.n.01', 'name': 'half_track'}, {'id': 8214, 'synset': 'hall.n.13', 'name': 'hall'}, {'id': 8215, 'synset': 'hall.n.03', 'name': 'hall'}, {'id': 8216, 'synset': 'hall.n.12', 'name': 'hall'}, {'id': 8217, 'synset': 'hall_of_fame.n.01', 'name': 'Hall_of_Fame'}, {'id': 8218, 'synset': 'hall_of_residence.n.01', 'name': 'hall_of_residence'}, {'id': 8219, 'synset': 'hallstand.n.01', 'name': 'hallstand'}, {'id': 8220, 'synset': 'halter.n.01', 'name': 'halter'}, {'id': 8221, 'synset': 'hame.n.01', 'name': 'hame'}, {'id': 8222, 'synset': 'hammer.n.07', 'name': 'hammer'}, {'id': 8223, 'synset': 'hammer.n.05', 'name': 'hammer'}, {'id': 8224, 'synset': 'hammerhead.n.02', 'name': 'hammerhead'}, {'id': 8225, 'synset': 'hand.n.08', 'name': 'hand'}, {'id': 8226, 'synset': 'handball.n.01', 'name': 'handball'}, {'id': 8227, 'synset': 'handbarrow.n.01', 'name': 'handbarrow'}, {'id': 8228, 'synset': 'handbell.n.01', 'name': 'handbell'}, {'id': 8229, 'synset': 'handbow.n.01', 'name': 'handbow'}, {'id': 8230, 'synset': 'hand_brake.n.01', 'name': 'hand_brake'}, {'id': 8231, 'synset': 'hand_calculator.n.01', 'name': 'hand_calculator'}, {'id': 8232, 'synset': 'handcar.n.01', 'name': 'handcar'}, {'id': 8233, 'synset': 'hand_cream.n.01', 'name': 'hand_cream'}, {'id': 8234, 'synset': 'hand_drill.n.01', 'name': 'hand_drill'}, {'id': 8235, 'synset': 'hand_glass.n.02', 'name': 'hand_glass'}, {'id': 8236, 'synset': 'hand_grenade.n.01', 'name': 'hand_grenade'}, {'id': 8237, 'synset': 'hand-held_computer.n.01', 'name': 'hand-held_computer'}, {'id': 8238, 'synset': 'handhold.n.01', 'name': 'handhold'}, {'id': 8239, 'synset': 'handlebar.n.01', 'name': 'handlebar'}, {'id': 8240, 'synset': 'handloom.n.01', 'name': 'handloom'}, {'id': 8241, 'synset': 'hand_lotion.n.01', 'name': 'hand_lotion'}, {'id': 8242, 'synset': 'hand_luggage.n.01', 'name': 'hand_luggage'}, {'id': 8243, 'synset': 'hand-me-down.n.01', 'name': 'hand-me-down'}, {'id': 8244, 'synset': 'hand_mower.n.01', 'name': 'hand_mower'}, {'id': 8245, 'synset': 'hand_pump.n.01', 'name': 'hand_pump'}, {'id': 8246, 'synset': 'handrest.n.01', 'name': 'handrest'}, {'id': 8247, 'synset': 'handset.n.01', 'name': 'handset'}, {'id': 8248, 'synset': 'hand_shovel.n.01', 'name': 'hand_shovel'}, {'id': 8249, 'synset': 'handspike.n.01', 'name': 'handspike'}, {'id': 8250, 'synset': 'handstamp.n.01', 'name': 'handstamp'}, {'id': 8251, 'synset': 'hand_throttle.n.01', 'name': 'hand_throttle'}, {'id': 8252, 'synset': 'hand_tool.n.01', 'name': 'hand_tool'}, {'id': 8253, 'synset': 'hand_truck.n.01', 'name': 'hand_truck'}, {'id': 8254, 'synset': 'handwear.n.01', 'name': 'handwear'}, {'id': 8255, 'synset': 'handwheel.n.02', 'name': 'handwheel'}, {'id': 8256, 'synset': 'handwheel.n.01', 'name': 'handwheel'}, {'id': 8257, 'synset': 'hangar_queen.n.01', 'name': 'hangar_queen'}, {'id': 8258, 'synset': 'hanger.n.02', 'name': 'hanger'}, {'id': 8259, 'synset': 'hang_glider.n.02', 'name': 'hang_glider'}, {'id': 8260, 'synset': "hangman's_rope.n.01", 'name': "hangman's_rope"}, {'id': 8261, 'synset': 'hank.n.01', 'name': 'hank'}, {'id': 8262, 'synset': 'hansom.n.01', 'name': 'hansom'}, {'id': 8263, 'synset': 'harbor.n.02', 'name': 'harbor'}, {'id': 8264, 'synset': 'hard_disc.n.01', 'name': 'hard_disc'}, {'id': 8265, 'synset': 'hard_hat.n.02', 'name': 'hard_hat'}, {'id': 8266, 'synset': 'hardtop.n.01', 'name': 'hardtop'}, {'id': 8267, 'synset': 'hardware.n.02', 'name': 'hardware'}, {'id': 8268, 'synset': 'hardware_store.n.01', 'name': 'hardware_store'}, {'id': 8269, 'synset': 'harmonica.n.01', 'name': 'harmonica'}, {'id': 8270, 'synset': 'harness.n.02', 'name': 'harness'}, {'id': 8271, 'synset': 'harness.n.01', 'name': 'harness'}, {'id': 8272, 'synset': 'harp.n.01', 'name': 'harp'}, {'id': 8273, 'synset': 'harp.n.02', 'name': 'harp'}, {'id': 8274, 'synset': 'harpoon.n.01', 'name': 'harpoon'}, {'id': 8275, 'synset': 'harpoon_gun.n.01', 'name': 'harpoon_gun'}, {'id': 8276, 'synset': 'harpoon_log.n.01', 'name': 'harpoon_log'}, {'id': 8277, 'synset': 'harpsichord.n.01', 'name': 'harpsichord'}, {'id': 8278, 'synset': 'harris_tweed.n.01', 'name': 'Harris_Tweed'}, {'id': 8279, 'synset': 'harrow.n.01', 'name': 'harrow'}, {'id': 8280, 'synset': 'harvester.n.02', 'name': 'harvester'}, {'id': 8281, 'synset': 'hash_house.n.01', 'name': 'hash_house'}, {'id': 8282, 'synset': 'hasp.n.01', 'name': 'hasp'}, {'id': 8283, 'synset': 'hatch.n.03', 'name': 'hatch'}, {'id': 8284, 'synset': 'hatchback.n.02', 'name': 'hatchback'}, {'id': 8285, 'synset': 'hatchback.n.01', 'name': 'hatchback'}, {'id': 8286, 'synset': 'hatchel.n.01', 'name': 'hatchel'}, {'id': 8287, 'synset': 'hatchet.n.02', 'name': 'hatchet'}, {'id': 8288, 'synset': 'hatpin.n.01', 'name': 'hatpin'}, {'id': 8289, 'synset': 'hauberk.n.01', 'name': 'hauberk'}, {'id': 8290, 'synset': 'hawaiian_guitar.n.01', 'name': 'Hawaiian_guitar'}, {'id': 8291, 'synset': 'hawse.n.01', 'name': 'hawse'}, {'id': 8292, 'synset': 'hawser.n.01', 'name': 'hawser'}, {'id': 8293, 'synset': 'hawser_bend.n.01', 'name': 'hawser_bend'}, {'id': 8294, 'synset': 'hay_bale.n.01', 'name': 'hay_bale'}, {'id': 8295, 'synset': 'hayfork.n.01', 'name': 'hayfork'}, {'id': 8296, 'synset': 'hayloft.n.01', 'name': 'hayloft'}, {'id': 8297, 'synset': 'haymaker.n.01', 'name': 'haymaker'}, {'id': 8298, 'synset': 'hayrack.n.02', 'name': 'hayrack'}, {'id': 8299, 'synset': 'hayrack.n.01', 'name': 'hayrack'}, {'id': 8300, 'synset': 'hazard.n.03', 'name': 'hazard'}, {'id': 8301, 'synset': 'head.n.31', 'name': 'head'}, {'id': 8302, 'synset': 'head.n.30', 'name': 'head'}, {'id': 8303, 'synset': 'head.n.29', 'name': 'head'}, {'id': 8304, 'synset': 'headdress.n.01', 'name': 'headdress'}, {'id': 8305, 'synset': 'header.n.05', 'name': 'header'}, {'id': 8306, 'synset': 'header.n.04', 'name': 'header'}, {'id': 8307, 'synset': 'header.n.03', 'name': 'header'}, {'id': 8308, 'synset': 'header.n.02', 'name': 'header'}, {'id': 8309, 'synset': 'headfast.n.01', 'name': 'headfast'}, {'id': 8310, 'synset': 'head_gasket.n.01', 'name': 'head_gasket'}, {'id': 8311, 'synset': 'head_gate.n.02', 'name': 'head_gate'}, {'id': 8312, 'synset': 'headgear.n.03', 'name': 'headgear'}, {'id': 8313, 'synset': 'headpiece.n.02', 'name': 'headpiece'}, {'id': 8314, 'synset': 'headpin.n.01', 'name': 'headpin'}, {'id': 8315, 'synset': 'headquarters.n.01', 'name': 'headquarters'}, {'id': 8316, 'synset': 'headrace.n.01', 'name': 'headrace'}, {'id': 8317, 'synset': 'headrest.n.02', 'name': 'headrest'}, {'id': 8318, 'synset': 'headsail.n.01', 'name': 'headsail'}, {'id': 8319, 'synset': 'head_shop.n.01', 'name': 'head_shop'}, {'id': 8320, 'synset': 'headstock.n.01', 'name': 'headstock'}, {'id': 8321, 'synset': 'health_spa.n.01', 'name': 'health_spa'}, {'id': 8322, 'synset': 'hearing_aid.n.02', 'name': 'hearing_aid'}, {'id': 8323, 'synset': 'hearing_aid.n.01', 'name': 'hearing_aid'}, {'id': 8324, 'synset': 'hearse.n.01', 'name': 'hearse'}, {'id': 8325, 'synset': 'hearth.n.02', 'name': 'hearth'}, {'id': 8326, 'synset': 'hearthrug.n.01', 'name': 'hearthrug'}, {'id': 8327, 'synset': 'heart-lung_machine.n.01', 'name': 'heart-lung_machine'}, {'id': 8328, 'synset': 'heat_engine.n.01', 'name': 'heat_engine'}, {'id': 8329, 'synset': 'heat_exchanger.n.01', 'name': 'heat_exchanger'}, {'id': 8330, 'synset': 'heating_pad.n.01', 'name': 'heating_pad'}, {'id': 8331, 'synset': 'heat_lamp.n.01', 'name': 'heat_lamp'}, {'id': 8332, 'synset': 'heat_pump.n.01', 'name': 'heat_pump'}, {'id': 8333, 'synset': 'heat-seeking_missile.n.01', 'name': 'heat-seeking_missile'}, {'id': 8334, 'synset': 'heat_shield.n.01', 'name': 'heat_shield'}, {'id': 8335, 'synset': 'heat_sink.n.01', 'name': 'heat_sink'}, {'id': 8336, 'synset': 'heaume.n.01', 'name': 'heaume'}, {'id': 8337, 'synset': 'heaver.n.01', 'name': 'heaver'}, {'id': 8338, 'synset': 'heavier-than-air_craft.n.01', 'name': 'heavier-than-air_craft'}, {'id': 8339, 'synset': 'heckelphone.n.01', 'name': 'heckelphone'}, {'id': 8340, 'synset': 'hectograph.n.01', 'name': 'hectograph'}, {'id': 8341, 'synset': 'hedge.n.01', 'name': 'hedge'}, {'id': 8342, 'synset': 'hedge_trimmer.n.01', 'name': 'hedge_trimmer'}, {'id': 8343, 'synset': 'helicon.n.01', 'name': 'helicon'}, {'id': 8344, 'synset': 'heliograph.n.01', 'name': 'heliograph'}, {'id': 8345, 'synset': 'heliometer.n.01', 'name': 'heliometer'}, {'id': 8346, 'synset': 'helm.n.01', 'name': 'helm'}, {'id': 8347, 'synset': 'helmet.n.01', 'name': 'helmet'}, {'id': 8348, 'synset': 'hematocrit.n.02', 'name': 'hematocrit'}, {'id': 8349, 'synset': 'hemming-stitch.n.01', 'name': 'hemming-stitch'}, {'id': 8350, 'synset': 'hemostat.n.01', 'name': 'hemostat'}, {'id': 8351, 'synset': 'hemstitch.n.01', 'name': 'hemstitch'}, {'id': 8352, 'synset': 'henroost.n.01', 'name': 'henroost'}, {'id': 8353, 'synset': 'heraldry.n.02', 'name': 'heraldry'}, {'id': 8354, 'synset': 'hermitage.n.01', 'name': 'hermitage'}, {'id': 8355, 'synset': 'herringbone.n.01', 'name': 'herringbone'}, {'id': 8356, 'synset': 'herringbone.n.02', 'name': 'herringbone'}, {'id': 8357, 'synset': 'herschelian_telescope.n.01', 'name': 'Herschelian_telescope'}, {'id': 8358, 'synset': 'hessian_boot.n.01', 'name': 'Hessian_boot'}, {'id': 8359, 'synset': 'heterodyne_receiver.n.01', 'name': 'heterodyne_receiver'}, {'id': 8360, 'synset': 'hibachi.n.01', 'name': 'hibachi'}, {'id': 8361, 'synset': 'hideaway.n.02', 'name': 'hideaway'}, {'id': 8362, 'synset': 'hi-fi.n.01', 'name': 'hi-fi'}, {'id': 8363, 'synset': 'high_altar.n.01', 'name': 'high_altar'}, {'id': 8364, 'synset': 'high-angle_gun.n.01', 'name': 'high-angle_gun'}, {'id': 8365, 'synset': 'highball_glass.n.01', 'name': 'highball_glass'}, {'id': 8366, 'synset': 'highboard.n.01', 'name': 'highboard'}, {'id': 8367, 'synset': 'highboy.n.01', 'name': 'highboy'}, {'id': 8368, 'synset': 'high_gear.n.01', 'name': 'high_gear'}, {'id': 8369, 'synset': 'high-hat_cymbal.n.01', 'name': 'high-hat_cymbal'}, {'id': 8370, 'synset': 'highlighter.n.02', 'name': 'highlighter'}, {'id': 8371, 'synset': 'highlighter.n.01', 'name': 'highlighter'}, {'id': 8372, 'synset': 'high-pass_filter.n.01', 'name': 'high-pass_filter'}, {'id': 8373, 'synset': 'high-rise.n.01', 'name': 'high-rise'}, {'id': 8374, 'synset': 'high_table.n.01', 'name': 'high_table'}, {'id': 8375, 'synset': 'high-warp_loom.n.01', 'name': 'high-warp_loom'}, {'id': 8376, 'synset': 'hijab.n.01', 'name': 'hijab'}, {'id': 8377, 'synset': 'hinging_post.n.01', 'name': 'hinging_post'}, {'id': 8378, 'synset': 'hip_boot.n.01', 'name': 'hip_boot'}, {'id': 8379, 'synset': 'hipflask.n.01', 'name': 'hipflask'}, {'id': 8380, 'synset': 'hip_pad.n.01', 'name': 'hip_pad'}, {'id': 8381, 'synset': 'hip_pocket.n.01', 'name': 'hip_pocket'}, {'id': 8382, 'synset': 'hippodrome.n.01', 'name': 'hippodrome'}, {'id': 8383, 'synset': 'hip_roof.n.01', 'name': 'hip_roof'}, {'id': 8384, 'synset': 'hitch.n.05', 'name': 'hitch'}, {'id': 8385, 'synset': 'hitch.n.04', 'name': 'hitch'}, {'id': 8386, 'synset': 'hitching_post.n.01', 'name': 'hitching_post'}, {'id': 8387, 'synset': 'hitchrack.n.01', 'name': 'hitchrack'}, {'id': 8388, 'synset': 'hob.n.03', 'name': 'hob'}, {'id': 8389, 'synset': 'hobble_skirt.n.01', 'name': 'hobble_skirt'}, {'id': 8390, 'synset': 'hockey_skate.n.01', 'name': 'hockey_skate'}, {'id': 8391, 'synset': 'hod.n.01', 'name': 'hod'}, {'id': 8392, 'synset': 'hodoscope.n.01', 'name': 'hodoscope'}, {'id': 8393, 'synset': 'hoe.n.01', 'name': 'hoe'}, {'id': 8394, 'synset': 'hoe_handle.n.01', 'name': 'hoe_handle'}, {'id': 8395, 'synset': 'hogshead.n.02', 'name': 'hogshead'}, {'id': 8396, 'synset': 'hoist.n.01', 'name': 'hoist'}, {'id': 8397, 'synset': 'hold.n.07', 'name': 'hold'}, {'id': 8398, 'synset': 'holder.n.01', 'name': 'holder'}, {'id': 8399, 'synset': 'holding_cell.n.01', 'name': 'holding_cell'}, {'id': 8400, 'synset': 'holding_device.n.01', 'name': 'holding_device'}, {'id': 8401, 'synset': 'holding_pen.n.01', 'name': 'holding_pen'}, {'id': 8402, 'synset': 'hollowware.n.01', 'name': 'hollowware'}, {'id': 8403, 'synset': 'holster.n.01', 'name': 'holster'}, {'id': 8404, 'synset': 'holster.n.02', 'name': 'holster'}, {'id': 8405, 'synset': 'holy_of_holies.n.02', 'name': 'holy_of_holies'}, {'id': 8406, 'synset': 'home.n.09', 'name': 'home'}, {'id': 8407, 'synset': 'home_appliance.n.01', 'name': 'home_appliance'}, {'id': 8408, 'synset': 'home_computer.n.01', 'name': 'home_computer'}, {'id': 8409, 'synset': 'home_room.n.01', 'name': 'home_room'}, {'id': 8410, 'synset': 'homespun.n.01', 'name': 'homespun'}, {'id': 8411, 'synset': 'homestead.n.03', 'name': 'homestead'}, {'id': 8412, 'synset': 'home_theater.n.01', 'name': 'home_theater'}, {'id': 8413, 'synset': 'homing_torpedo.n.01', 'name': 'homing_torpedo'}, {'id': 8414, 'synset': 'hone.n.01', 'name': 'hone'}, {'id': 8415, 'synset': 'honeycomb.n.02', 'name': 'honeycomb'}, {'id': 8416, 'synset': 'hood.n.09', 'name': 'hood'}, {'id': 8417, 'synset': 'hood.n.08', 'name': 'hood'}, {'id': 8418, 'synset': 'hood.n.07', 'name': 'hood'}, {'id': 8419, 'synset': 'hood.n.05', 'name': 'hood'}, {'id': 8420, 'synset': 'hood_latch.n.01', 'name': 'hood_latch'}, {'id': 8421, 'synset': 'hook.n.04', 'name': 'hook'}, {'id': 8422, 'synset': 'hook.n.01', 'name': 'hook'}, {'id': 8423, 'synset': 'hook_and_eye.n.01', 'name': 'hook_and_eye'}, {'id': 8424, 'synset': 'hookup.n.02', 'name': 'hookup'}, {'id': 8425, 'synset': 'hookup.n.01', 'name': 'hookup'}, {'id': 8426, 'synset': 'hook_wrench.n.01', 'name': 'hook_wrench'}, {'id': 8427, 'synset': 'hoopskirt.n.01', 'name': 'hoopskirt'}, {'id': 8428, 'synset': 'hoosegow.n.01', 'name': 'hoosegow'}, {'id': 8429, 'synset': 'hoover.n.04', 'name': 'Hoover'}, {'id': 8430, 'synset': 'hope_chest.n.01', 'name': 'hope_chest'}, {'id': 8431, 'synset': 'hopper.n.01', 'name': 'hopper'}, {'id': 8432, 'synset': 'hopsacking.n.01', 'name': 'hopsacking'}, {'id': 8433, 'synset': 'horizontal_bar.n.01', 'name': 'horizontal_bar'}, {'id': 8434, 'synset': 'horizontal_stabilizer.n.01', 'name': 'horizontal_stabilizer'}, {'id': 8435, 'synset': 'horizontal_tail.n.01', 'name': 'horizontal_tail'}, {'id': 8436, 'synset': 'horn.n.09', 'name': 'horn'}, {'id': 8437, 'synset': 'horn.n.01', 'name': 'horn'}, {'id': 8438, 'synset': 'horn.n.08', 'name': 'horn'}, {'id': 8439, 'synset': 'horn_button.n.01', 'name': 'horn_button'}, {'id': 8440, 'synset': 'hornpipe.n.03', 'name': 'hornpipe'}, {'id': 8441, 'synset': 'horse.n.02', 'name': 'horse'}, {'id': 8442, 'synset': 'horsebox.n.01', 'name': 'horsebox'}, {'id': 8443, 'synset': 'horsecar.n.01', 'name': 'horsecar'}, {'id': 8444, 'synset': 'horse_cart.n.01', 'name': 'horse_cart'}, {'id': 8445, 'synset': 'horsecloth.n.01', 'name': 'horsecloth'}, {'id': 8446, 'synset': 'horse-drawn_vehicle.n.01', 'name': 'horse-drawn_vehicle'}, {'id': 8447, 'synset': 'horsehair.n.02', 'name': 'horsehair'}, {'id': 8448, 'synset': 'horsehair_wig.n.01', 'name': 'horsehair_wig'}, {'id': 8449, 'synset': 'horseless_carriage.n.01', 'name': 'horseless_carriage'}, {'id': 8450, 'synset': 'horse_pistol.n.01', 'name': 'horse_pistol'}, {'id': 8451, 'synset': 'horseshoe.n.02', 'name': 'horseshoe'}, {'id': 8452, 'synset': 'horseshoe.n.01', 'name': 'horseshoe'}, {'id': 8453, 'synset': 'horse-trail.n.01', 'name': 'horse-trail'}, {'id': 8454, 'synset': 'horsewhip.n.01', 'name': 'horsewhip'}, {'id': 8455, 'synset': 'hose.n.02', 'name': 'hose'}, {'id': 8456, 'synset': 'hosiery.n.01', 'name': 'hosiery'}, {'id': 8457, 'synset': 'hospice.n.01', 'name': 'hospice'}, {'id': 8458, 'synset': 'hospital.n.01', 'name': 'hospital'}, {'id': 8459, 'synset': 'hospital_bed.n.01', 'name': 'hospital_bed'}, {'id': 8460, 'synset': 'hospital_room.n.01', 'name': 'hospital_room'}, {'id': 8461, 'synset': 'hospital_ship.n.01', 'name': 'hospital_ship'}, {'id': 8462, 'synset': 'hospital_train.n.01', 'name': 'hospital_train'}, {'id': 8463, 'synset': 'hostel.n.02', 'name': 'hostel'}, {'id': 8464, 'synset': 'hostel.n.01', 'name': 'hostel'}, {'id': 8465, 'synset': 'hotel.n.01', 'name': 'hotel'}, {'id': 8466, 'synset': 'hotel-casino.n.02', 'name': 'hotel-casino'}, {'id': 8467, 'synset': 'hotel-casino.n.01', 'name': 'hotel-casino'}, {'id': 8468, 'synset': 'hotel_room.n.01', 'name': 'hotel_room'}, {'id': 8469, 'synset': 'hot_line.n.01', 'name': 'hot_line'}, {'id': 8470, 'synset': 'hot_pants.n.02', 'name': 'hot_pants'}, {'id': 8471, 'synset': 'hot_rod.n.01', 'name': 'hot_rod'}, {'id': 8472, 'synset': 'hot_spot.n.03', 'name': 'hot_spot'}, {'id': 8473, 'synset': 'hot_tub.n.01', 'name': 'hot_tub'}, {'id': 8474, 'synset': 'hot-water_bottle.n.01', 'name': 'hot-water_bottle'}, {'id': 8475, 'synset': 'houndstooth_check.n.01', 'name': 'houndstooth_check'}, {'id': 8476, 'synset': 'hour_hand.n.01', 'name': 'hour_hand'}, {'id': 8477, 'synset': 'house.n.01', 'name': 'house'}, {'id': 8478, 'synset': 'house.n.12', 'name': 'house'}, {'id': 8479, 'synset': 'houselights.n.01', 'name': 'houselights'}, {'id': 8480, 'synset': 'house_of_cards.n.02', 'name': 'house_of_cards'}, {'id': 8481, 'synset': 'house_of_correction.n.01', 'name': 'house_of_correction'}, {'id': 8482, 'synset': 'house_paint.n.01', 'name': 'house_paint'}, {'id': 8483, 'synset': 'housetop.n.01', 'name': 'housetop'}, {'id': 8484, 'synset': 'housing.n.01', 'name': 'housing'}, {'id': 8485, 'synset': 'hovel.n.01', 'name': 'hovel'}, {'id': 8486, 'synset': 'hovercraft.n.01', 'name': 'hovercraft'}, {'id': 8487, 'synset': 'howdah.n.01', 'name': 'howdah'}, {'id': 8488, 'synset': 'huarache.n.01', 'name': 'huarache'}, {'id': 8489, 'synset': 'hub-and-spoke.n.01', 'name': 'hub-and-spoke'}, {'id': 8490, 'synset': 'hubcap.n.01', 'name': 'hubcap'}, {'id': 8491, 'synset': 'huck.n.01', 'name': 'huck'}, {'id': 8492, 'synset': 'hug-me-tight.n.01', 'name': 'hug-me-tight'}, {'id': 8493, 'synset': 'hula-hoop.n.01', 'name': 'hula-hoop'}, {'id': 8494, 'synset': 'hulk.n.02', 'name': 'hulk'}, {'id': 8495, 'synset': 'hull.n.06', 'name': 'hull'}, {'id': 8496, 'synset': 'humeral_veil.n.01', 'name': 'humeral_veil'}, {'id': 8497, 'synset': 'humvee.n.01', 'name': 'Humvee'}, {'id': 8498, 'synset': 'hunter.n.04', 'name': 'hunter'}, {'id': 8499, 'synset': 'hunting_knife.n.01', 'name': 'hunting_knife'}, {'id': 8500, 'synset': 'hurdle.n.01', 'name': 'hurdle'}, {'id': 8501, 'synset': 'hurricane_deck.n.01', 'name': 'hurricane_deck'}, {'id': 8502, 'synset': 'hurricane_lamp.n.01', 'name': 'hurricane_lamp'}, {'id': 8503, 'synset': 'hut.n.01', 'name': 'hut'}, {'id': 8504, 'synset': 'hutch.n.01', 'name': 'hutch'}, {'id': 8505, 'synset': 'hutment.n.01', 'name': 'hutment'}, {'id': 8506, 'synset': 'hydraulic_brake.n.01', 'name': 'hydraulic_brake'}, {'id': 8507, 'synset': 'hydraulic_press.n.01', 'name': 'hydraulic_press'}, {'id': 8508, 'synset': 'hydraulic_pump.n.01', 'name': 'hydraulic_pump'}, {'id': 8509, 'synset': 'hydraulic_system.n.01', 'name': 'hydraulic_system'}, {'id': 8510, 'synset': 'hydraulic_transmission.n.01', 'name': 'hydraulic_transmission'}, {'id': 8511, 'synset': 'hydroelectric_turbine.n.01', 'name': 'hydroelectric_turbine'}, {'id': 8512, 'synset': 'hydrofoil.n.02', 'name': 'hydrofoil'}, {'id': 8513, 'synset': 'hydrofoil.n.01', 'name': 'hydrofoil'}, {'id': 8514, 'synset': 'hydrogen_bomb.n.01', 'name': 'hydrogen_bomb'}, {'id': 8515, 'synset': 'hydrometer.n.01', 'name': 'hydrometer'}, {'id': 8516, 'synset': 'hygrodeik.n.01', 'name': 'hygrodeik'}, {'id': 8517, 'synset': 'hygrometer.n.01', 'name': 'hygrometer'}, {'id': 8518, 'synset': 'hygroscope.n.01', 'name': 'hygroscope'}, {'id': 8519, 'synset': 'hyperbaric_chamber.n.01', 'name': 'hyperbaric_chamber'}, {'id': 8520, 'synset': 'hypercoaster.n.01', 'name': 'hypercoaster'}, {'id': 8521, 'synset': 'hypermarket.n.01', 'name': 'hypermarket'}, {'id': 8522, 'synset': 'hypodermic_needle.n.01', 'name': 'hypodermic_needle'}, {'id': 8523, 'synset': 'hypodermic_syringe.n.01', 'name': 'hypodermic_syringe'}, {'id': 8524, 'synset': 'hypsometer.n.01', 'name': 'hypsometer'}, {'id': 8525, 'synset': 'hysterosalpingogram.n.01', 'name': 'hysterosalpingogram'}, {'id': 8526, 'synset': 'i-beam.n.01', 'name': 'I-beam'}, {'id': 8527, 'synset': 'ice_ax.n.01', 'name': 'ice_ax'}, {'id': 8528, 'synset': 'iceboat.n.02', 'name': 'iceboat'}, {'id': 8529, 'synset': 'icebreaker.n.01', 'name': 'icebreaker'}, {'id': 8530, 'synset': 'iced-tea_spoon.n.01', 'name': 'iced-tea_spoon'}, {'id': 8531, 'synset': 'ice_hockey_rink.n.01', 'name': 'ice_hockey_rink'}, {'id': 8532, 'synset': 'ice_machine.n.01', 'name': 'ice_machine'}, {'id': 8533, 'synset': 'icepick.n.01', 'name': 'icepick'}, {'id': 8534, 'synset': 'ice_rink.n.01', 'name': 'ice_rink'}, {'id': 8535, 'synset': 'ice_tongs.n.01', 'name': 'ice_tongs'}, {'id': 8536, 'synset': 'icetray.n.01', 'name': 'icetray'}, {'id': 8537, 'synset': 'iconoscope.n.01', 'name': 'iconoscope'}, {'id': 8538, 'synset': 'identikit.n.01', 'name': 'Identikit'}, {'id': 8539, 'synset': 'idle_pulley.n.01', 'name': 'idle_pulley'}, {'id': 8540, 'synset': 'igloo.n.01', 'name': 'igloo'}, {'id': 8541, 'synset': 'ignition_coil.n.01', 'name': 'ignition_coil'}, {'id': 8542, 'synset': 'ignition_key.n.01', 'name': 'ignition_key'}, {'id': 8543, 'synset': 'ignition_switch.n.01', 'name': 'ignition_switch'}, {'id': 8544, 'synset': 'imaret.n.01', 'name': 'imaret'}, {'id': 8545, 'synset': 'immovable_bandage.n.01', 'name': 'immovable_bandage'}, {'id': 8546, 'synset': 'impact_printer.n.01', 'name': 'impact_printer'}, {'id': 8547, 'synset': 'impeller.n.01', 'name': 'impeller'}, {'id': 8548, 'synset': 'implant.n.01', 'name': 'implant'}, {'id': 8549, 'synset': 'implement.n.01', 'name': 'implement'}, {'id': 8550, 'synset': 'impression.n.07', 'name': 'impression'}, {'id': 8551, 'synset': 'imprint.n.05', 'name': 'imprint'}, {'id': 8552, 'synset': 'improvised_explosive_device.n.01', 'name': 'improvised_explosive_device'}, {'id': 8553, 'synset': 'impulse_turbine.n.01', 'name': 'impulse_turbine'}, {'id': 8554, 'synset': 'in-basket.n.01', 'name': 'in-basket'}, {'id': 8555, 'synset': 'incendiary_bomb.n.01', 'name': 'incendiary_bomb'}, {'id': 8556, 'synset': 'incinerator.n.01', 'name': 'incinerator'}, {'id': 8557, 'synset': 'inclined_plane.n.01', 'name': 'inclined_plane'}, {'id': 8558, 'synset': 'inclinometer.n.02', 'name': 'inclinometer'}, {'id': 8559, 'synset': 'inclinometer.n.01', 'name': 'inclinometer'}, {'id': 8560, 'synset': 'incrustation.n.03', 'name': 'incrustation'}, {'id': 8561, 'synset': 'incubator.n.01', 'name': 'incubator'}, {'id': 8562, 'synset': 'index_register.n.01', 'name': 'index_register'}, {'id': 8563, 'synset': 'indiaman.n.01', 'name': 'Indiaman'}, {'id': 8564, 'synset': 'indian_club.n.01', 'name': 'Indian_club'}, {'id': 8565, 'synset': 'indicator.n.03', 'name': 'indicator'}, {'id': 8566, 'synset': 'induction_coil.n.01', 'name': 'induction_coil'}, {'id': 8567, 'synset': 'inductor.n.01', 'name': 'inductor'}, {'id': 8568, 'synset': 'industrial_watercourse.n.01', 'name': 'industrial_watercourse'}, {'id': 8569, 'synset': 'inertial_guidance_system.n.01', 'name': 'inertial_guidance_system'}, {'id': 8570, 'synset': 'inflater.n.01', 'name': 'inflater'}, {'id': 8571, 'synset': 'injector.n.01', 'name': 'injector'}, {'id': 8572, 'synset': 'ink_bottle.n.01', 'name': 'ink_bottle'}, {'id': 8573, 'synset': 'ink_eraser.n.01', 'name': 'ink_eraser'}, {'id': 8574, 'synset': 'ink-jet_printer.n.01', 'name': 'ink-jet_printer'}, {'id': 8575, 'synset': 'inkle.n.01', 'name': 'inkle'}, {'id': 8576, 'synset': 'inkstand.n.02', 'name': 'inkstand'}, {'id': 8577, 'synset': 'inkwell.n.01', 'name': 'inkwell'}, {'id': 8578, 'synset': 'inlay.n.01', 'name': 'inlay'}, {'id': 8579, 'synset': 'inside_caliper.n.01', 'name': 'inside_caliper'}, {'id': 8580, 'synset': 'insole.n.01', 'name': 'insole'}, {'id': 8581, 'synset': 'instep.n.02', 'name': 'instep'}, {'id': 8582, 'synset': 'instillator.n.01', 'name': 'instillator'}, {'id': 8583, 'synset': 'institution.n.02', 'name': 'institution'}, {'id': 8584, 'synset': 'instrument.n.01', 'name': 'instrument'}, {'id': 8585, 'synset': 'instrument_of_punishment.n.01', 'name': 'instrument_of_punishment'}, {'id': 8586, 'synset': 'instrument_of_torture.n.01', 'name': 'instrument_of_torture'}, {'id': 8587, 'synset': 'intaglio.n.02', 'name': 'intaglio'}, {'id': 8588, 'synset': 'intake_valve.n.01', 'name': 'intake_valve'}, {'id': 8589, 'synset': 'integrated_circuit.n.01', 'name': 'integrated_circuit'}, {'id': 8590, 'synset': 'integrator.n.01', 'name': 'integrator'}, {'id': 8591, 'synset': 'intelnet.n.01', 'name': 'Intelnet'}, {'id': 8592, 'synset': 'interceptor.n.01', 'name': 'interceptor'}, {'id': 8593, 'synset': 'interchange.n.01', 'name': 'interchange'}, {'id': 8594, 'synset': 'intercommunication_system.n.01', 'name': 'intercommunication_system'}, {'id': 8595, 'synset': 'intercontinental_ballistic_missile.n.01', 'name': 'intercontinental_ballistic_missile'}, {'id': 8596, 'synset': 'interface.n.04', 'name': 'interface'}, {'id': 8597, 'synset': 'interferometer.n.01', 'name': 'interferometer'}, {'id': 8598, 'synset': 'interior_door.n.01', 'name': 'interior_door'}, {'id': 8599, 'synset': 'internal-combustion_engine.n.01', 'name': 'internal-combustion_engine'}, {'id': 8600, 'synset': 'internal_drive.n.01', 'name': 'internal_drive'}, {'id': 8601, 'synset': 'internet.n.01', 'name': 'internet'}, {'id': 8602, 'synset': 'interphone.n.01', 'name': 'interphone'}, {'id': 8603, 'synset': 'interrupter.n.01', 'name': 'interrupter'}, {'id': 8604, 'synset': 'intersection.n.02', 'name': 'intersection'}, {'id': 8605, 'synset': 'interstice.n.02', 'name': 'interstice'}, {'id': 8606, 'synset': 'intraocular_lens.n.01', 'name': 'intraocular_lens'}, {'id': 8607, 'synset': 'intravenous_pyelogram.n.01', 'name': 'intravenous_pyelogram'}, {'id': 8608, 'synset': 'inverter.n.01', 'name': 'inverter'}, {'id': 8609, 'synset': 'ion_engine.n.01', 'name': 'ion_engine'}, {'id': 8610, 'synset': 'ionization_chamber.n.01', 'name': 'ionization_chamber'}, {'id': 8611, 'synset': 'video_ipod.n.01', 'name': 'video_iPod'}, {'id': 8612, 'synset': 'iron.n.02', 'name': 'iron'}, {'id': 8613, 'synset': 'iron.n.03', 'name': 'iron'}, {'id': 8614, 'synset': 'irons.n.01', 'name': 'irons'}, {'id': 8615, 'synset': 'ironclad.n.01', 'name': 'ironclad'}, {'id': 8616, 'synset': 'iron_foundry.n.01', 'name': 'iron_foundry'}, {'id': 8617, 'synset': 'iron_horse.n.01', 'name': 'iron_horse'}, {'id': 8618, 'synset': 'ironing.n.01', 'name': 'ironing'}, {'id': 8619, 'synset': 'iron_lung.n.01', 'name': 'iron_lung'}, {'id': 8620, 'synset': 'ironmongery.n.01', 'name': 'ironmongery'}, {'id': 8621, 'synset': 'ironworks.n.01', 'name': 'ironworks'}, {'id': 8622, 'synset': 'irrigation_ditch.n.01', 'name': 'irrigation_ditch'}, {'id': 8623, 'synset': 'izar.n.01', 'name': 'izar'}, {'id': 8624, 'synset': 'jabot.n.01', 'name': 'jabot'}, {'id': 8625, 'synset': 'jack.n.10', 'name': 'jack'}, {'id': 8626, 'synset': 'jack.n.07', 'name': 'jack'}, {'id': 8627, 'synset': 'jack.n.06', 'name': 'jack'}, {'id': 8628, 'synset': 'jack.n.05', 'name': 'jack'}, {'id': 8629, 'synset': 'jacket.n.02', 'name': 'jacket'}, {'id': 8630, 'synset': 'jacket.n.05', 'name': 'jacket'}, {'id': 8631, 'synset': 'jack-in-the-box.n.01', 'name': 'jack-in-the-box'}, {'id': 8632, 'synset': "jack-o'-lantern.n.02", 'name': "jack-o'-lantern"}, {'id': 8633, 'synset': 'jack_plane.n.01', 'name': 'jack_plane'}, {'id': 8634, 'synset': "jacob's_ladder.n.02", 'name': "Jacob's_ladder"}, {'id': 8635, 'synset': 'jaconet.n.01', 'name': 'jaconet'}, {'id': 8636, 'synset': 'jacquard_loom.n.01', 'name': 'Jacquard_loom'}, {'id': 8637, 'synset': 'jacquard.n.02', 'name': 'jacquard'}, {'id': 8638, 'synset': 'jag.n.03', 'name': 'jag'}, {'id': 8639, 'synset': 'jail.n.01', 'name': 'jail'}, {'id': 8640, 'synset': 'jalousie.n.02', 'name': 'jalousie'}, {'id': 8641, 'synset': 'jamb.n.01', 'name': 'jamb'}, {'id': 8642, 'synset': 'jammer.n.01', 'name': 'jammer'}, {'id': 8643, 'synset': 'jampot.n.01', 'name': 'jampot'}, {'id': 8644, 'synset': 'japan.n.04', 'name': 'japan'}, {'id': 8645, 'synset': 'jarvik_heart.n.01', 'name': 'Jarvik_heart'}, {'id': 8646, 'synset': 'jaunting_car.n.01', 'name': 'jaunting_car'}, {'id': 8647, 'synset': 'javelin.n.02', 'name': 'javelin'}, {'id': 8648, 'synset': 'jaw.n.03', 'name': 'jaw'}, {'id': 8649, 'synset': 'jaws_of_life.n.01', 'name': 'Jaws_of_Life'}, {'id': 8650, 'synset': 'jellaba.n.01', 'name': 'jellaba'}, {'id': 8651, 'synset': 'jerkin.n.01', 'name': 'jerkin'}, {'id': 8652, 'synset': 'jeroboam.n.02', 'name': 'jeroboam'}, {'id': 8653, 'synset': 'jersey.n.04', 'name': 'jersey'}, {'id': 8654, 'synset': 'jet_bridge.n.01', 'name': 'jet_bridge'}, {'id': 8655, 'synset': 'jet_engine.n.01', 'name': 'jet_engine'}, {'id': 8656, 'synset': 'jetliner.n.01', 'name': 'jetliner'}, {'id': 8657, 'synset': "jeweler's_glass.n.01", 'name': "jeweler's_glass"}, {'id': 8658, 'synset': 'jewelled_headdress.n.01', 'name': 'jewelled_headdress'}, {'id': 8659, 'synset': "jew's_harp.n.01", 'name': "jew's_harp"}, {'id': 8660, 'synset': 'jib.n.01', 'name': 'jib'}, {'id': 8661, 'synset': 'jibboom.n.01', 'name': 'jibboom'}, {'id': 8662, 'synset': 'jig.n.03', 'name': 'jig'}, {'id': 8663, 'synset': 'jig.n.02', 'name': 'jig'}, {'id': 8664, 'synset': 'jiggermast.n.01', 'name': 'jiggermast'}, {'id': 8665, 'synset': 'jigsaw.n.02', 'name': 'jigsaw'}, {'id': 8666, 'synset': 'jigsaw_puzzle.n.01', 'name': 'jigsaw_puzzle'}, {'id': 8667, 'synset': 'jinrikisha.n.01', 'name': 'jinrikisha'}, {'id': 8668, 'synset': 'jobcentre.n.01', 'name': 'jobcentre'}, {'id': 8669, 'synset': 'jodhpurs.n.01', 'name': 'jodhpurs'}, {'id': 8670, 'synset': 'jodhpur.n.01', 'name': 'jodhpur'}, {'id': 8671, 'synset': 'joinery.n.01', 'name': 'joinery'}, {'id': 8672, 'synset': 'joint.n.05', 'name': 'joint'}, {'id': 8673, 'synset': 'joint_direct_attack_munition.n.01', 'name': 'Joint_Direct_Attack_Munition'}, {'id': 8674, 'synset': 'jointer.n.01', 'name': 'jointer'}, {'id': 8675, 'synset': 'joist.n.01', 'name': 'joist'}, {'id': 8676, 'synset': 'jolly_boat.n.01', 'name': 'jolly_boat'}, {'id': 8677, 'synset': 'jorum.n.01', 'name': 'jorum'}, {'id': 8678, 'synset': 'joss_house.n.01', 'name': 'joss_house'}, {'id': 8679, 'synset': 'journal_bearing.n.01', 'name': 'journal_bearing'}, {'id': 8680, 'synset': 'journal_box.n.01', 'name': 'journal_box'}, {'id': 8681, 'synset': 'jungle_gym.n.01', 'name': 'jungle_gym'}, {'id': 8682, 'synset': 'junk.n.02', 'name': 'junk'}, {'id': 8683, 'synset': 'jug.n.01', 'name': 'jug'}, {'id': 8684, 'synset': 'jukebox.n.01', 'name': 'jukebox'}, {'id': 8685, 'synset': 'jumbojet.n.01', 'name': 'jumbojet'}, {'id': 8686, 'synset': 'jumper.n.07', 'name': 'jumper'}, {'id': 8687, 'synset': 'jumper.n.06', 'name': 'jumper'}, {'id': 8688, 'synset': 'jumper.n.05', 'name': 'jumper'}, {'id': 8689, 'synset': 'jumper.n.04', 'name': 'jumper'}, {'id': 8690, 'synset': 'jumper_cable.n.01', 'name': 'jumper_cable'}, {'id': 8691, 'synset': 'jump_seat.n.01', 'name': 'jump_seat'}, {'id': 8692, 'synset': 'jump_suit.n.02', 'name': 'jump_suit'}, {'id': 8693, 'synset': 'junction.n.01', 'name': 'junction'}, {'id': 8694, 'synset': 'junction.n.04', 'name': 'junction'}, {'id': 8695, 'synset': 'junction_barrier.n.01', 'name': 'junction_barrier'}, {'id': 8696, 'synset': 'junk_shop.n.01', 'name': 'junk_shop'}, {'id': 8697, 'synset': 'jury_box.n.01', 'name': 'jury_box'}, {'id': 8698, 'synset': 'jury_mast.n.01', 'name': 'jury_mast'}, {'id': 8699, 'synset': 'kachina.n.03', 'name': 'kachina'}, {'id': 8700, 'synset': 'kaffiyeh.n.01', 'name': 'kaffiyeh'}, {'id': 8701, 'synset': 'kalansuwa.n.01', 'name': 'kalansuwa'}, {'id': 8702, 'synset': 'kalashnikov.n.01', 'name': 'Kalashnikov'}, {'id': 8703, 'synset': 'kameez.n.01', 'name': 'kameez'}, {'id': 8704, 'synset': 'kanzu.n.01', 'name': 'kanzu'}, {'id': 8705, 'synset': 'katharometer.n.01', 'name': 'katharometer'}, {'id': 8706, 'synset': 'kazoo.n.01', 'name': 'kazoo'}, {'id': 8707, 'synset': 'keel.n.03', 'name': 'keel'}, {'id': 8708, 'synset': 'keelboat.n.01', 'name': 'keelboat'}, {'id': 8709, 'synset': 'keelson.n.01', 'name': 'keelson'}, {'id': 8710, 'synset': 'keep.n.02', 'name': 'keep'}, {'id': 8711, 'synset': 'kepi.n.01', 'name': 'kepi'}, {'id': 8712, 'synset': 'keratoscope.n.01', 'name': 'keratoscope'}, {'id': 8713, 'synset': 'kerchief.n.01', 'name': 'kerchief'}, {'id': 8714, 'synset': 'ketch.n.01', 'name': 'ketch'}, {'id': 8715, 'synset': 'kettle.n.04', 'name': 'kettle'}, {'id': 8716, 'synset': 'key.n.15', 'name': 'key'}, {'id': 8717, 'synset': 'keyboard.n.01', 'name': 'keyboard'}, {'id': 8718, 'synset': 'keyboard_buffer.n.01', 'name': 'keyboard_buffer'}, {'id': 8719, 'synset': 'keyboard_instrument.n.01', 'name': 'keyboard_instrument'}, {'id': 8720, 'synset': 'keyhole.n.01', 'name': 'keyhole'}, {'id': 8721, 'synset': 'keyhole_saw.n.01', 'name': 'keyhole_saw'}, {'id': 8722, 'synset': 'khadi.n.01', 'name': 'khadi'}, {'id': 8723, 'synset': 'khaki.n.01', 'name': 'khaki'}, {'id': 8724, 'synset': 'khakis.n.01', 'name': 'khakis'}, {'id': 8725, 'synset': 'khimar.n.01', 'name': 'khimar'}, {'id': 8726, 'synset': 'khukuri.n.01', 'name': 'khukuri'}, {'id': 8727, 'synset': 'kick_pleat.n.01', 'name': 'kick_pleat'}, {'id': 8728, 'synset': 'kicksorter.n.01', 'name': 'kicksorter'}, {'id': 8729, 'synset': 'kickstand.n.01', 'name': 'kickstand'}, {'id': 8730, 'synset': 'kick_starter.n.01', 'name': 'kick_starter'}, {'id': 8731, 'synset': 'kid_glove.n.01', 'name': 'kid_glove'}, {'id': 8732, 'synset': 'kiln.n.01', 'name': 'kiln'}, {'id': 8733, 'synset': 'kinescope.n.01', 'name': 'kinescope'}, {'id': 8734, 'synset': 'kinetoscope.n.01', 'name': 'Kinetoscope'}, {'id': 8735, 'synset': 'king.n.10', 'name': 'king'}, {'id': 8736, 'synset': 'king.n.08', 'name': 'king'}, {'id': 8737, 'synset': 'kingbolt.n.01', 'name': 'kingbolt'}, {'id': 8738, 'synset': 'king_post.n.01', 'name': 'king_post'}, {'id': 8739, 'synset': "kipp's_apparatus.n.01", 'name': "Kipp's_apparatus"}, {'id': 8740, 'synset': 'kirk.n.01', 'name': 'kirk'}, {'id': 8741, 'synset': 'kirpan.n.01', 'name': 'kirpan'}, {'id': 8742, 'synset': 'kirtle.n.02', 'name': 'kirtle'}, {'id': 8743, 'synset': 'kirtle.n.01', 'name': 'kirtle'}, {'id': 8744, 'synset': 'kit.n.02', 'name': 'kit'}, {'id': 8745, 'synset': 'kit.n.01', 'name': 'kit'}, {'id': 8746, 'synset': 'kitbag.n.01', 'name': 'kitbag'}, {'id': 8747, 'synset': 'kitchen.n.01', 'name': 'kitchen'}, {'id': 8748, 'synset': 'kitchen_appliance.n.01', 'name': 'kitchen_appliance'}, {'id': 8749, 'synset': 'kitchenette.n.01', 'name': 'kitchenette'}, {'id': 8750, 'synset': 'kitchen_utensil.n.01', 'name': 'kitchen_utensil'}, {'id': 8751, 'synset': 'kitchenware.n.01', 'name': 'kitchenware'}, {'id': 8752, 'synset': 'kite_balloon.n.01', 'name': 'kite_balloon'}, {'id': 8753, 'synset': 'klaxon.n.01', 'name': 'klaxon'}, {'id': 8754, 'synset': 'klieg_light.n.01', 'name': 'klieg_light'}, {'id': 8755, 'synset': 'klystron.n.01', 'name': 'klystron'}, {'id': 8756, 'synset': 'knee_brace.n.01', 'name': 'knee_brace'}, {'id': 8757, 'synset': 'knee-high.n.01', 'name': 'knee-high'}, {'id': 8758, 'synset': 'knee_piece.n.01', 'name': 'knee_piece'}, {'id': 8759, 'synset': 'knife.n.02', 'name': 'knife'}, {'id': 8760, 'synset': 'knife_blade.n.01', 'name': 'knife_blade'}, {'id': 8761, 'synset': 'knight.n.02', 'name': 'knight'}, {'id': 8762, 'synset': 'knit.n.01', 'name': 'knit'}, {'id': 8763, 'synset': 'knitting_machine.n.01', 'name': 'knitting_machine'}, {'id': 8764, 'synset': 'knitwear.n.01', 'name': 'knitwear'}, {'id': 8765, 'synset': 'knob.n.01', 'name': 'knob'}, {'id': 8766, 'synset': 'knob.n.04', 'name': 'knob'}, {'id': 8767, 'synset': 'knobble.n.01', 'name': 'knobble'}, {'id': 8768, 'synset': 'knobkerrie.n.01', 'name': 'knobkerrie'}, {'id': 8769, 'synset': 'knot.n.02', 'name': 'knot'}, {'id': 8770, 'synset': 'knuckle_joint.n.02', 'name': 'knuckle_joint'}, {'id': 8771, 'synset': 'kohl.n.01', 'name': 'kohl'}, {'id': 8772, 'synset': 'koto.n.01', 'name': 'koto'}, {'id': 8773, 'synset': 'kraal.n.02', 'name': 'kraal'}, {'id': 8774, 'synset': 'kremlin.n.02', 'name': 'kremlin'}, {'id': 8775, 'synset': 'kris.n.01', 'name': 'kris'}, {'id': 8776, 'synset': 'krummhorn.n.01', 'name': 'krummhorn'}, {'id': 8777, 'synset': "kundt's_tube.n.01", 'name': "Kundt's_tube"}, {'id': 8778, 'synset': 'kurdistan.n.02', 'name': 'Kurdistan'}, {'id': 8779, 'synset': 'kurta.n.01', 'name': 'kurta'}, {'id': 8780, 'synset': 'kylix.n.01', 'name': 'kylix'}, {'id': 8781, 'synset': 'kymograph.n.01', 'name': 'kymograph'}, {'id': 8782, 'synset': 'lab_bench.n.01', 'name': 'lab_bench'}, {'id': 8783, 'synset': 'lace.n.02', 'name': 'lace'}, {'id': 8784, 'synset': 'lacquer.n.02', 'name': 'lacquer'}, {'id': 8785, 'synset': 'lacquerware.n.01', 'name': 'lacquerware'}, {'id': 8786, 'synset': 'lacrosse_ball.n.01', 'name': 'lacrosse_ball'}, {'id': 8787, 'synset': 'ladder-back.n.02', 'name': 'ladder-back'}, {'id': 8788, 'synset': 'ladder-back.n.01', 'name': 'ladder-back'}, {'id': 8789, 'synset': 'ladder_truck.n.01', 'name': 'ladder_truck'}, {'id': 8790, 'synset': "ladies'_room.n.01", 'name': "ladies'_room"}, {'id': 8791, 'synset': 'lady_chapel.n.01', 'name': 'lady_chapel'}, {'id': 8792, 'synset': 'lagerphone.n.01', 'name': 'lagerphone'}, {'id': 8793, 'synset': 'lag_screw.n.01', 'name': 'lag_screw'}, {'id': 8794, 'synset': 'lake_dwelling.n.01', 'name': 'lake_dwelling'}, {'id': 8795, 'synset': 'lally.n.01', 'name': 'lally'}, {'id': 8796, 'synset': 'lamasery.n.01', 'name': 'lamasery'}, {'id': 8797, 'synset': 'lambrequin.n.02', 'name': 'lambrequin'}, {'id': 8798, 'synset': 'lame.n.02', 'name': 'lame'}, {'id': 8799, 'synset': 'laminar_flow_clean_room.n.01', 'name': 'laminar_flow_clean_room'}, {'id': 8800, 'synset': 'laminate.n.01', 'name': 'laminate'}, {'id': 8801, 'synset': 'lamination.n.01', 'name': 'lamination'}, {'id': 8802, 'synset': 'lamp.n.01', 'name': 'lamp'}, {'id': 8803, 'synset': 'lamp_house.n.01', 'name': 'lamp_house'}, {'id': 8804, 'synset': 'lanai.n.02', 'name': 'lanai'}, {'id': 8805, 'synset': 'lancet_arch.n.01', 'name': 'lancet_arch'}, {'id': 8806, 'synset': 'lancet_window.n.01', 'name': 'lancet_window'}, {'id': 8807, 'synset': 'landau.n.02', 'name': 'landau'}, {'id': 8808, 'synset': 'lander.n.02', 'name': 'lander'}, {'id': 8809, 'synset': 'landing_craft.n.01', 'name': 'landing_craft'}, {'id': 8810, 'synset': 'landing_flap.n.01', 'name': 'landing_flap'}, {'id': 8811, 'synset': 'landing_gear.n.01', 'name': 'landing_gear'}, {'id': 8812, 'synset': 'landing_net.n.01', 'name': 'landing_net'}, {'id': 8813, 'synset': 'landing_skid.n.01', 'name': 'landing_skid'}, {'id': 8814, 'synset': 'land_line.n.01', 'name': 'land_line'}, {'id': 8815, 'synset': 'land_mine.n.01', 'name': 'land_mine'}, {'id': 8816, 'synset': 'land_office.n.01', 'name': 'land_office'}, {'id': 8817, 'synset': 'lanolin.n.02', 'name': 'lanolin'}, {'id': 8818, 'synset': 'lanyard.n.01', 'name': 'lanyard'}, {'id': 8819, 'synset': 'lap.n.03', 'name': 'lap'}, {'id': 8820, 'synset': 'laparoscope.n.01', 'name': 'laparoscope'}, {'id': 8821, 'synset': 'lapboard.n.01', 'name': 'lapboard'}, {'id': 8822, 'synset': 'lapel.n.01', 'name': 'lapel'}, {'id': 8823, 'synset': 'lap_joint.n.01', 'name': 'lap_joint'}, {'id': 8824, 'synset': 'laryngoscope.n.01', 'name': 'laryngoscope'}, {'id': 8825, 'synset': 'laser.n.01', 'name': 'laser'}, {'id': 8826, 'synset': 'laser-guided_bomb.n.01', 'name': 'laser-guided_bomb'}, {'id': 8827, 'synset': 'laser_printer.n.01', 'name': 'laser_printer'}, {'id': 8828, 'synset': 'lash.n.02', 'name': 'lash'}, {'id': 8829, 'synset': 'lashing.n.02', 'name': 'lashing'}, {'id': 8830, 'synset': 'lasso.n.02', 'name': 'lasso'}, {'id': 8831, 'synset': 'latch.n.01', 'name': 'latch'}, {'id': 8832, 'synset': 'latchet.n.01', 'name': 'latchet'}, {'id': 8833, 'synset': 'latchkey.n.01', 'name': 'latchkey'}, {'id': 8834, 'synset': 'lateen.n.01', 'name': 'lateen'}, {'id': 8835, 'synset': 'latex_paint.n.01', 'name': 'latex_paint'}, {'id': 8836, 'synset': 'lath.n.01', 'name': 'lath'}, {'id': 8837, 'synset': 'lathe.n.01', 'name': 'lathe'}, {'id': 8838, 'synset': 'latrine.n.01', 'name': 'latrine'}, {'id': 8839, 'synset': 'lattice.n.03', 'name': 'lattice'}, {'id': 8840, 'synset': 'launch.n.01', 'name': 'launch'}, {'id': 8841, 'synset': 'launcher.n.01', 'name': 'launcher'}, {'id': 8842, 'synset': 'laundry.n.01', 'name': 'laundry'}, {'id': 8843, 'synset': 'laundry_cart.n.01', 'name': 'laundry_cart'}, {'id': 8844, 'synset': 'laundry_truck.n.01', 'name': 'laundry_truck'}, {'id': 8845, 'synset': 'lavalava.n.01', 'name': 'lavalava'}, {'id': 8846, 'synset': 'lavaliere.n.01', 'name': 'lavaliere'}, {'id': 8847, 'synset': 'laver.n.02', 'name': 'laver'}, {'id': 8848, 'synset': 'lawn_chair.n.01', 'name': 'lawn_chair'}, {'id': 8849, 'synset': 'lawn_furniture.n.01', 'name': 'lawn_furniture'}, {'id': 8850, 'synset': 'layette.n.01', 'name': 'layette'}, {'id': 8851, 'synset': 'lead-acid_battery.n.01', 'name': 'lead-acid_battery'}, {'id': 8852, 'synset': 'lead-in.n.02', 'name': 'lead-in'}, {'id': 8853, 'synset': 'leading_rein.n.01', 'name': 'leading_rein'}, {'id': 8854, 'synset': 'lead_pencil.n.01', 'name': 'lead_pencil'}, {'id': 8855, 'synset': 'leaf_spring.n.01', 'name': 'leaf_spring'}, {'id': 8856, 'synset': 'lean-to.n.01', 'name': 'lean-to'}, {'id': 8857, 'synset': 'lean-to_tent.n.01', 'name': 'lean-to_tent'}, {'id': 8858, 'synset': 'leash.n.01', 'name': 'leash'}, {'id': 8859, 'synset': 'leatherette.n.01', 'name': 'leatherette'}, {'id': 8860, 'synset': 'leather_strip.n.01', 'name': 'leather_strip'}, {'id': 8861, 'synset': 'leclanche_cell.n.01', 'name': 'Leclanche_cell'}, {'id': 8862, 'synset': 'lectern.n.01', 'name': 'lectern'}, {'id': 8863, 'synset': 'lecture_room.n.01', 'name': 'lecture_room'}, {'id': 8864, 'synset': 'lederhosen.n.01', 'name': 'lederhosen'}, {'id': 8865, 'synset': 'ledger_board.n.01', 'name': 'ledger_board'}, {'id': 8866, 'synset': 'leg.n.07', 'name': 'leg'}, {'id': 8867, 'synset': 'leg.n.03', 'name': 'leg'}, {'id': 8868, 'synset': 'leiden_jar.n.01', 'name': 'Leiden_jar'}, {'id': 8869, 'synset': 'leisure_wear.n.01', 'name': 'leisure_wear'}, {'id': 8870, 'synset': 'lens.n.01', 'name': 'lens'}, {'id': 8871, 'synset': 'lens.n.05', 'name': 'lens'}, {'id': 8872, 'synset': 'lens_cap.n.01', 'name': 'lens_cap'}, {'id': 8873, 'synset': 'lens_implant.n.01', 'name': 'lens_implant'}, {'id': 8874, 'synset': 'leotard.n.01', 'name': 'leotard'}, {'id': 8875, 'synset': 'letter_case.n.01', 'name': 'letter_case'}, {'id': 8876, 'synset': 'letter_opener.n.01', 'name': 'letter_opener'}, {'id': 8877, 'synset': 'levee.n.03', 'name': 'levee'}, {'id': 8878, 'synset': 'level.n.05', 'name': 'level'}, {'id': 8879, 'synset': 'lever.n.01', 'name': 'lever'}, {'id': 8880, 'synset': 'lever.n.03', 'name': 'lever'}, {'id': 8881, 'synset': 'lever.n.02', 'name': 'lever'}, {'id': 8882, 'synset': 'lever_lock.n.01', 'name': 'lever_lock'}, {'id': 8883, 'synset': "levi's.n.01", 'name': "Levi's"}, {'id': 8884, 'synset': 'liberty_ship.n.01', 'name': 'Liberty_ship'}, {'id': 8885, 'synset': 'library.n.01', 'name': 'library'}, {'id': 8886, 'synset': 'library.n.05', 'name': 'library'}, {'id': 8887, 'synset': 'lid.n.02', 'name': 'lid'}, {'id': 8888, 'synset': 'liebig_condenser.n.01', 'name': 'Liebig_condenser'}, {'id': 8889, 'synset': 'lie_detector.n.01', 'name': 'lie_detector'}, {'id': 8890, 'synset': 'lifeboat.n.01', 'name': 'lifeboat'}, {'id': 8891, 'synset': 'life_office.n.01', 'name': 'life_office'}, {'id': 8892, 'synset': 'life_preserver.n.01', 'name': 'life_preserver'}, {'id': 8893, 'synset': 'life-support_system.n.02', 'name': 'life-support_system'}, {'id': 8894, 'synset': 'life-support_system.n.01', 'name': 'life-support_system'}, {'id': 8895, 'synset': 'lifting_device.n.01', 'name': 'lifting_device'}, {'id': 8896, 'synset': 'lift_pump.n.01', 'name': 'lift_pump'}, {'id': 8897, 'synset': 'ligament.n.02', 'name': 'ligament'}, {'id': 8898, 'synset': 'ligature.n.03', 'name': 'ligature'}, {'id': 8899, 'synset': 'light.n.02', 'name': 'light'}, {'id': 8900, 'synset': 'light_arm.n.01', 'name': 'light_arm'}, {'id': 8901, 'synset': 'light_circuit.n.01', 'name': 'light_circuit'}, {'id': 8902, 'synset': 'light-emitting_diode.n.01', 'name': 'light-emitting_diode'}, {'id': 8903, 'synset': 'lighter.n.02', 'name': 'lighter'}, {'id': 8904, 'synset': 'lighter-than-air_craft.n.01', 'name': 'lighter-than-air_craft'}, {'id': 8905, 'synset': 'light_filter.n.01', 'name': 'light_filter'}, {'id': 8906, 'synset': 'lighting.n.02', 'name': 'lighting'}, {'id': 8907, 'synset': 'light_machine_gun.n.01', 'name': 'light_machine_gun'}, {'id': 8908, 'synset': 'light_meter.n.01', 'name': 'light_meter'}, {'id': 8909, 'synset': 'light_microscope.n.01', 'name': 'light_microscope'}, {'id': 8910, 'synset': 'light_pen.n.01', 'name': 'light_pen'}, {'id': 8911, 'synset': 'lightship.n.01', 'name': 'lightship'}, {'id': 8912, 'synset': 'lilo.n.01', 'name': 'Lilo'}, {'id': 8913, 'synset': 'limber.n.01', 'name': 'limber'}, {'id': 8914, 'synset': 'limekiln.n.01', 'name': 'limekiln'}, {'id': 8915, 'synset': 'limiter.n.01', 'name': 'limiter'}, {'id': 8916, 'synset': 'linear_accelerator.n.01', 'name': 'linear_accelerator'}, {'id': 8917, 'synset': 'linen.n.01', 'name': 'linen'}, {'id': 8918, 'synset': 'line_printer.n.01', 'name': 'line_printer'}, {'id': 8919, 'synset': 'liner.n.04', 'name': 'liner'}, {'id': 8920, 'synset': 'liner.n.03', 'name': 'liner'}, {'id': 8921, 'synset': 'lingerie.n.01', 'name': 'lingerie'}, {'id': 8922, 'synset': 'lining.n.01', 'name': 'lining'}, {'id': 8923, 'synset': 'link.n.09', 'name': 'link'}, {'id': 8924, 'synset': 'linkage.n.03', 'name': 'linkage'}, {'id': 8925, 'synset': 'link_trainer.n.01', 'name': 'Link_trainer'}, {'id': 8926, 'synset': 'linocut.n.02', 'name': 'linocut'}, {'id': 8927, 'synset': 'linoleum_knife.n.01', 'name': 'linoleum_knife'}, {'id': 8928, 'synset': 'linotype.n.01', 'name': 'Linotype'}, {'id': 8929, 'synset': 'linsey-woolsey.n.01', 'name': 'linsey-woolsey'}, {'id': 8930, 'synset': 'linstock.n.01', 'name': 'linstock'}, {'id': 8931, 'synset': 'lion-jaw_forceps.n.01', 'name': 'lion-jaw_forceps'}, {'id': 8932, 'synset': 'lip-gloss.n.01', 'name': 'lip-gloss'}, {'id': 8933, 'synset': 'lipstick.n.01', 'name': 'lipstick'}, {'id': 8934, 'synset': 'liqueur_glass.n.01', 'name': 'liqueur_glass'}, {'id': 8935, 'synset': 'liquid_crystal_display.n.01', 'name': 'liquid_crystal_display'}, {'id': 8936, 'synset': 'liquid_metal_reactor.n.01', 'name': 'liquid_metal_reactor'}, {'id': 8937, 'synset': 'lisle.n.01', 'name': 'lisle'}, {'id': 8938, 'synset': 'lister.n.03', 'name': 'lister'}, {'id': 8939, 'synset': 'litterbin.n.01', 'name': 'litterbin'}, {'id': 8940, 'synset': 'little_theater.n.01', 'name': 'little_theater'}, {'id': 8941, 'synset': 'live_axle.n.01', 'name': 'live_axle'}, {'id': 8942, 'synset': 'living_quarters.n.01', 'name': 'living_quarters'}, {'id': 8943, 'synset': 'living_room.n.01', 'name': 'living_room'}, {'id': 8944, 'synset': 'load.n.09', 'name': 'load'}, {'id': 8945, 'synset': 'loafer.n.02', 'name': 'Loafer'}, {'id': 8946, 'synset': 'loaner.n.02', 'name': 'loaner'}, {'id': 8947, 'synset': 'lobe.n.04', 'name': 'lobe'}, {'id': 8948, 'synset': 'lobster_pot.n.01', 'name': 'lobster_pot'}, {'id': 8949, 'synset': 'local.n.01', 'name': 'local'}, {'id': 8950, 'synset': 'local_area_network.n.01', 'name': 'local_area_network'}, {'id': 8951, 'synset': 'local_oscillator.n.01', 'name': 'local_oscillator'}, {'id': 8952, 'synset': 'lochaber_ax.n.01', 'name': 'Lochaber_ax'}, {'id': 8953, 'synset': 'lock.n.01', 'name': 'lock'}, {'id': 8954, 'synset': 'lock.n.05', 'name': 'lock'}, {'id': 8955, 'synset': 'lock.n.04', 'name': 'lock'}, {'id': 8956, 'synset': 'lock.n.03', 'name': 'lock'}, {'id': 8957, 'synset': 'lockage.n.02', 'name': 'lockage'}, {'id': 8958, 'synset': 'locker.n.02', 'name': 'locker'}, {'id': 8959, 'synset': 'locker_room.n.01', 'name': 'locker_room'}, {'id': 8960, 'synset': 'locket.n.01', 'name': 'locket'}, {'id': 8961, 'synset': 'lock-gate.n.01', 'name': 'lock-gate'}, {'id': 8962, 'synset': 'locking_pliers.n.01', 'name': 'locking_pliers'}, {'id': 8963, 'synset': 'lockring.n.01', 'name': 'lockring'}, {'id': 8964, 'synset': 'lockstitch.n.01', 'name': 'lockstitch'}, {'id': 8965, 'synset': 'lockup.n.01', 'name': 'lockup'}, {'id': 8966, 'synset': 'locomotive.n.01', 'name': 'locomotive'}, {'id': 8967, 'synset': 'lodge.n.05', 'name': 'lodge'}, {'id': 8968, 'synset': 'lodge.n.04', 'name': 'lodge'}, {'id': 8969, 'synset': 'lodge.n.03', 'name': 'lodge'}, {'id': 8970, 'synset': 'lodging_house.n.01', 'name': 'lodging_house'}, {'id': 8971, 'synset': 'loft.n.02', 'name': 'loft'}, {'id': 8972, 'synset': 'loft.n.04', 'name': 'loft'}, {'id': 8973, 'synset': 'loft.n.01', 'name': 'loft'}, {'id': 8974, 'synset': 'log_cabin.n.01', 'name': 'log_cabin'}, {'id': 8975, 'synset': 'loggia.n.01', 'name': 'loggia'}, {'id': 8976, 'synset': 'longbow.n.01', 'name': 'longbow'}, {'id': 8977, 'synset': 'long_iron.n.01', 'name': 'long_iron'}, {'id': 8978, 'synset': 'long_johns.n.01', 'name': 'long_johns'}, {'id': 8979, 'synset': 'long_sleeve.n.01', 'name': 'long_sleeve'}, {'id': 8980, 'synset': 'long_tom.n.01', 'name': 'long_tom'}, {'id': 8981, 'synset': 'long_trousers.n.01', 'name': 'long_trousers'}, {'id': 8982, 'synset': 'long_underwear.n.01', 'name': 'long_underwear'}, {'id': 8983, 'synset': 'looking_glass.n.01', 'name': 'looking_glass'}, {'id': 8984, 'synset': 'lookout.n.03', 'name': 'lookout'}, {'id': 8985, 'synset': 'loom.n.01', 'name': 'loom'}, {'id': 8986, 'synset': 'loop_knot.n.01', 'name': 'loop_knot'}, {'id': 8987, 'synset': 'lorgnette.n.01', 'name': 'lorgnette'}, {'id': 8988, 'synset': 'lorraine_cross.n.01', 'name': 'Lorraine_cross'}, {'id': 8989, 'synset': 'lorry.n.02', 'name': 'lorry'}, {'id': 8990, 'synset': 'lota.n.01', 'name': 'lota'}, {'id': 8991, 'synset': 'lotion.n.01', 'name': 'lotion'}, {'id': 8992, 'synset': 'lounge.n.02', 'name': 'lounge'}, {'id': 8993, 'synset': 'lounger.n.03', 'name': 'lounger'}, {'id': 8994, 'synset': 'lounging_jacket.n.01', 'name': 'lounging_jacket'}, {'id': 8995, 'synset': 'lounging_pajama.n.01', 'name': 'lounging_pajama'}, {'id': 8996, 'synset': 'loungewear.n.01', 'name': 'loungewear'}, {'id': 8997, 'synset': 'loupe.n.01', 'name': 'loupe'}, {'id': 8998, 'synset': 'louvered_window.n.01', 'name': 'louvered_window'}, {'id': 8999, 'synset': 'love_knot.n.01', 'name': 'love_knot'}, {'id': 9000, 'synset': 'loving_cup.n.01', 'name': 'loving_cup'}, {'id': 9001, 'synset': 'lowboy.n.01', 'name': 'lowboy'}, {'id': 9002, 'synset': 'low-pass_filter.n.01', 'name': 'low-pass_filter'}, {'id': 9003, 'synset': 'low-warp-loom.n.01', 'name': 'low-warp-loom'}, {'id': 9004, 'synset': 'lp.n.01', 'name': 'LP'}, {'id': 9005, 'synset': 'l-plate.n.01', 'name': 'L-plate'}, {'id': 9006, 'synset': "lubber's_hole.n.01", 'name': "lubber's_hole"}, {'id': 9007, 'synset': 'lubricating_system.n.01', 'name': 'lubricating_system'}, {'id': 9008, 'synset': 'luff.n.01', 'name': 'luff'}, {'id': 9009, 'synset': 'lug.n.03', 'name': 'lug'}, {'id': 9010, 'synset': 'luge.n.01', 'name': 'luge'}, {'id': 9011, 'synset': 'luger.n.01', 'name': 'Luger'}, {'id': 9012, 'synset': 'luggage_carrier.n.01', 'name': 'luggage_carrier'}, {'id': 9013, 'synset': 'luggage_compartment.n.01', 'name': 'luggage_compartment'}, {'id': 9014, 'synset': 'luggage_rack.n.01', 'name': 'luggage_rack'}, {'id': 9015, 'synset': 'lugger.n.01', 'name': 'lugger'}, {'id': 9016, 'synset': 'lugsail.n.01', 'name': 'lugsail'}, {'id': 9017, 'synset': 'lug_wrench.n.01', 'name': 'lug_wrench'}, {'id': 9018, 'synset': 'lumberjack.n.02', 'name': 'lumberjack'}, {'id': 9019, 'synset': 'lumbermill.n.01', 'name': 'lumbermill'}, {'id': 9020, 'synset': 'lunar_excursion_module.n.01', 'name': 'lunar_excursion_module'}, {'id': 9021, 'synset': 'lunchroom.n.01', 'name': 'lunchroom'}, {'id': 9022, 'synset': 'lunette.n.01', 'name': 'lunette'}, {'id': 9023, 'synset': 'lungi.n.01', 'name': 'lungi'}, {'id': 9024, 'synset': 'lunula.n.02', 'name': 'lunula'}, {'id': 9025, 'synset': 'lusterware.n.01', 'name': 'lusterware'}, {'id': 9026, 'synset': 'lute.n.02', 'name': 'lute'}, {'id': 9027, 'synset': 'luxury_liner.n.01', 'name': 'luxury_liner'}, {'id': 9028, 'synset': 'lyceum.n.02', 'name': 'lyceum'}, {'id': 9029, 'synset': 'lychgate.n.01', 'name': 'lychgate'}, {'id': 9030, 'synset': 'lyre.n.01', 'name': 'lyre'}, {'id': 9031, 'synset': 'machete.n.01', 'name': 'machete'}, {'id': 9032, 'synset': 'machicolation.n.01', 'name': 'machicolation'}, {'id': 9033, 'synset': 'machine.n.01', 'name': 'machine'}, {'id': 9034, 'synset': 'machine.n.04', 'name': 'machine'}, {'id': 9035, 'synset': 'machine_bolt.n.01', 'name': 'machine_bolt'}, {'id': 9036, 'synset': 'machinery.n.01', 'name': 'machinery'}, {'id': 9037, 'synset': 'machine_screw.n.01', 'name': 'machine_screw'}, {'id': 9038, 'synset': 'machine_tool.n.01', 'name': 'machine_tool'}, {'id': 9039, 'synset': "machinist's_vise.n.01", 'name': "machinist's_vise"}, {'id': 9040, 'synset': 'machmeter.n.01', 'name': 'machmeter'}, {'id': 9041, 'synset': 'mackinaw.n.04', 'name': 'mackinaw'}, {'id': 9042, 'synset': 'mackinaw.n.03', 'name': 'mackinaw'}, {'id': 9043, 'synset': 'mackinaw.n.01', 'name': 'mackinaw'}, {'id': 9044, 'synset': 'mackintosh.n.01', 'name': 'mackintosh'}, {'id': 9045, 'synset': 'macrame.n.01', 'name': 'macrame'}, {'id': 9046, 'synset': 'madras.n.03', 'name': 'madras'}, {'id': 9047, 'synset': 'mae_west.n.02', 'name': 'Mae_West'}, {'id': 9048, 'synset': 'magazine_rack.n.01', 'name': 'magazine_rack'}, {'id': 9049, 'synset': 'magic_lantern.n.01', 'name': 'magic_lantern'}, {'id': 9050, 'synset': 'magnetic_bottle.n.01', 'name': 'magnetic_bottle'}, {'id': 9051, 'synset': 'magnetic_compass.n.01', 'name': 'magnetic_compass'}, {'id': 9052, 'synset': 'magnetic_core_memory.n.01', 'name': 'magnetic_core_memory'}, {'id': 9053, 'synset': 'magnetic_disk.n.01', 'name': 'magnetic_disk'}, {'id': 9054, 'synset': 'magnetic_head.n.01', 'name': 'magnetic_head'}, {'id': 9055, 'synset': 'magnetic_mine.n.01', 'name': 'magnetic_mine'}, {'id': 9056, 'synset': 'magnetic_needle.n.01', 'name': 'magnetic_needle'}, {'id': 9057, 'synset': 'magnetic_recorder.n.01', 'name': 'magnetic_recorder'}, {'id': 9058, 'synset': 'magnetic_stripe.n.01', 'name': 'magnetic_stripe'}, {'id': 9059, 'synset': 'magnetic_tape.n.01', 'name': 'magnetic_tape'}, {'id': 9060, 'synset': 'magneto.n.01', 'name': 'magneto'}, {'id': 9061, 'synset': 'magnetometer.n.01', 'name': 'magnetometer'}, {'id': 9062, 'synset': 'magnetron.n.01', 'name': 'magnetron'}, {'id': 9063, 'synset': 'magnifier.n.01', 'name': 'magnifier'}, {'id': 9064, 'synset': 'magnum.n.01', 'name': 'magnum'}, {'id': 9065, 'synset': 'magnus_hitch.n.01', 'name': 'magnus_hitch'}, {'id': 9066, 'synset': 'mail.n.03', 'name': 'mail'}, {'id': 9067, 'synset': 'mailbag.n.02', 'name': 'mailbag'}, {'id': 9068, 'synset': 'mailbag.n.01', 'name': 'mailbag'}, {'id': 9069, 'synset': 'mailboat.n.01', 'name': 'mailboat'}, {'id': 9070, 'synset': 'mail_car.n.01', 'name': 'mail_car'}, {'id': 9071, 'synset': 'maildrop.n.01', 'name': 'maildrop'}, {'id': 9072, 'synset': 'mailer.n.04', 'name': 'mailer'}, {'id': 9073, 'synset': 'maillot.n.02', 'name': 'maillot'}, {'id': 9074, 'synset': 'maillot.n.01', 'name': 'maillot'}, {'id': 9075, 'synset': 'mailsorter.n.01', 'name': 'mailsorter'}, {'id': 9076, 'synset': 'mail_train.n.01', 'name': 'mail_train'}, {'id': 9077, 'synset': 'mainframe.n.01', 'name': 'mainframe'}, {'id': 9078, 'synset': 'mainmast.n.01', 'name': 'mainmast'}, {'id': 9079, 'synset': 'main_rotor.n.01', 'name': 'main_rotor'}, {'id': 9080, 'synset': 'mainsail.n.01', 'name': 'mainsail'}, {'id': 9081, 'synset': 'mainspring.n.01', 'name': 'mainspring'}, {'id': 9082, 'synset': 'main-topmast.n.01', 'name': 'main-topmast'}, {'id': 9083, 'synset': 'main-topsail.n.01', 'name': 'main-topsail'}, {'id': 9084, 'synset': 'main_yard.n.01', 'name': 'main_yard'}, {'id': 9085, 'synset': 'maisonette.n.02', 'name': 'maisonette'}, {'id': 9086, 'synset': 'majolica.n.01', 'name': 'majolica'}, {'id': 9087, 'synset': 'makeup.n.01', 'name': 'makeup'}, {'id': 9088, 'synset': 'maksutov_telescope.n.01', 'name': 'Maksutov_telescope'}, {'id': 9089, 'synset': 'malacca.n.02', 'name': 'malacca'}, {'id': 9090, 'synset': 'mallet.n.03', 'name': 'mallet'}, {'id': 9091, 'synset': 'mallet.n.02', 'name': 'mallet'}, {'id': 9092, 'synset': 'mammogram.n.01', 'name': 'mammogram'}, {'id': 9093, 'synset': 'mandola.n.01', 'name': 'mandola'}, {'id': 9094, 'synset': 'mandolin.n.01', 'name': 'mandolin'}, {'id': 9095, 'synset': 'mangle.n.01', 'name': 'mangle'}, {'id': 9096, 'synset': 'manhole_cover.n.01', 'name': 'manhole_cover'}, {'id': 9097, 'synset': 'man-of-war.n.01', 'name': 'man-of-war'}, {'id': 9098, 'synset': 'manometer.n.01', 'name': 'manometer'}, {'id': 9099, 'synset': 'manor.n.01', 'name': 'manor'}, {'id': 9100, 'synset': 'manor_hall.n.01', 'name': 'manor_hall'}, {'id': 9101, 'synset': 'manpad.n.01', 'name': 'MANPAD'}, {'id': 9102, 'synset': 'mansard.n.01', 'name': 'mansard'}, {'id': 9103, 'synset': 'manse.n.02', 'name': 'manse'}, {'id': 9104, 'synset': 'mansion.n.02', 'name': 'mansion'}, {'id': 9105, 'synset': 'mantel.n.01', 'name': 'mantel'}, {'id': 9106, 'synset': 'mantelet.n.02', 'name': 'mantelet'}, {'id': 9107, 'synset': 'mantilla.n.01', 'name': 'mantilla'}, {'id': 9108, 'synset': 'mao_jacket.n.01', 'name': 'Mao_jacket'}, {'id': 9109, 'synset': 'maquiladora.n.01', 'name': 'maquiladora'}, {'id': 9110, 'synset': 'maraca.n.01', 'name': 'maraca'}, {'id': 9111, 'synset': 'marble.n.02', 'name': 'marble'}, {'id': 9112, 'synset': 'marching_order.n.01', 'name': 'marching_order'}, {'id': 9113, 'synset': 'marimba.n.01', 'name': 'marimba'}, {'id': 9114, 'synset': 'marina.n.01', 'name': 'marina'}, {'id': 9115, 'synset': 'marketplace.n.02', 'name': 'marketplace'}, {'id': 9116, 'synset': 'marlinespike.n.01', 'name': 'marlinespike'}, {'id': 9117, 'synset': 'marocain.n.01', 'name': 'marocain'}, {'id': 9118, 'synset': 'marquee.n.02', 'name': 'marquee'}, {'id': 9119, 'synset': 'marquetry.n.01', 'name': 'marquetry'}, {'id': 9120, 'synset': 'marriage_bed.n.01', 'name': 'marriage_bed'}, {'id': 9121, 'synset': 'martello_tower.n.01', 'name': 'martello_tower'}, {'id': 9122, 'synset': 'martingale.n.01', 'name': 'martingale'}, {'id': 9123, 'synset': 'mascara.n.01', 'name': 'mascara'}, {'id': 9124, 'synset': 'maser.n.01', 'name': 'maser'}, {'id': 9125, 'synset': 'mashie.n.01', 'name': 'mashie'}, {'id': 9126, 'synset': 'mashie_niblick.n.01', 'name': 'mashie_niblick'}, {'id': 9127, 'synset': 'masjid.n.01', 'name': 'masjid'}, {'id': 9128, 'synset': 'mask.n.01', 'name': 'mask'}, {'id': 9129, 'synset': 'masonite.n.01', 'name': 'Masonite'}, {'id': 9130, 'synset': 'mason_jar.n.01', 'name': 'Mason_jar'}, {'id': 9131, 'synset': 'masonry.n.01', 'name': 'masonry'}, {'id': 9132, 'synset': "mason's_level.n.01", 'name': "mason's_level"}, {'id': 9133, 'synset': 'massage_parlor.n.02', 'name': 'massage_parlor'}, {'id': 9134, 'synset': 'massage_parlor.n.01', 'name': 'massage_parlor'}, {'id': 9135, 'synset': 'mass_spectrograph.n.01', 'name': 'mass_spectrograph'}, {'id': 9136, 'synset': 'mass_spectrometer.n.01', 'name': 'mass_spectrometer'}, {'id': 9137, 'synset': 'mast.n.04', 'name': 'mast'}, {'id': 9138, 'synset': 'mastaba.n.01', 'name': 'mastaba'}, {'id': 9139, 'synset': 'master_bedroom.n.01', 'name': 'master_bedroom'}, {'id': 9140, 'synset': 'masterpiece.n.01', 'name': 'masterpiece'}, {'id': 9141, 'synset': 'mat.n.01', 'name': 'mat'}, {'id': 9142, 'synset': 'match.n.01', 'name': 'match'}, {'id': 9143, 'synset': 'match.n.03', 'name': 'match'}, {'id': 9144, 'synset': 'matchboard.n.01', 'name': 'matchboard'}, {'id': 9145, 'synset': 'matchbook.n.01', 'name': 'matchbook'}, {'id': 9146, 'synset': 'matchlock.n.01', 'name': 'matchlock'}, {'id': 9147, 'synset': 'match_plane.n.01', 'name': 'match_plane'}, {'id': 9148, 'synset': 'matchstick.n.01', 'name': 'matchstick'}, {'id': 9149, 'synset': 'material.n.04', 'name': 'material'}, {'id': 9150, 'synset': 'materiel.n.01', 'name': 'materiel'}, {'id': 9151, 'synset': 'maternity_hospital.n.01', 'name': 'maternity_hospital'}, {'id': 9152, 'synset': 'maternity_ward.n.01', 'name': 'maternity_ward'}, {'id': 9153, 'synset': 'matrix.n.06', 'name': 'matrix'}, {'id': 9154, 'synset': 'matthew_walker.n.01', 'name': 'Matthew_Walker'}, {'id': 9155, 'synset': 'matting.n.01', 'name': 'matting'}, {'id': 9156, 'synset': 'mattock.n.01', 'name': 'mattock'}, {'id': 9157, 'synset': 'mattress_cover.n.01', 'name': 'mattress_cover'}, {'id': 9158, 'synset': 'maul.n.01', 'name': 'maul'}, {'id': 9159, 'synset': 'maulstick.n.01', 'name': 'maulstick'}, {'id': 9160, 'synset': 'mauser.n.02', 'name': 'Mauser'}, {'id': 9161, 'synset': 'mausoleum.n.01', 'name': 'mausoleum'}, {'id': 9162, 'synset': 'maxi.n.01', 'name': 'maxi'}, {'id': 9163, 'synset': 'maxim_gun.n.01', 'name': 'Maxim_gun'}, {'id': 9164, 'synset': 'maximum_and_minimum_thermometer.n.01', 'name': 'maximum_and_minimum_thermometer'}, {'id': 9165, 'synset': 'maypole.n.01', 'name': 'maypole'}, {'id': 9166, 'synset': 'maze.n.01', 'name': 'maze'}, {'id': 9167, 'synset': 'mazer.n.01', 'name': 'mazer'}, {'id': 9168, 'synset': 'means.n.02', 'name': 'means'}, {'id': 9169, 'synset': 'measure.n.09', 'name': 'measure'}, {'id': 9170, 'synset': 'measuring_instrument.n.01', 'name': 'measuring_instrument'}, {'id': 9171, 'synset': 'meat_counter.n.01', 'name': 'meat_counter'}, {'id': 9172, 'synset': 'meat_grinder.n.01', 'name': 'meat_grinder'}, {'id': 9173, 'synset': 'meat_hook.n.01', 'name': 'meat_hook'}, {'id': 9174, 'synset': 'meat_house.n.02', 'name': 'meat_house'}, {'id': 9175, 'synset': 'meat_safe.n.01', 'name': 'meat_safe'}, {'id': 9176, 'synset': 'meat_thermometer.n.01', 'name': 'meat_thermometer'}, {'id': 9177, 'synset': 'mechanical_device.n.01', 'name': 'mechanical_device'}, {'id': 9178, 'synset': 'mechanical_piano.n.01', 'name': 'mechanical_piano'}, {'id': 9179, 'synset': 'mechanical_system.n.01', 'name': 'mechanical_system'}, {'id': 9180, 'synset': 'mechanism.n.05', 'name': 'mechanism'}, {'id': 9181, 'synset': 'medical_building.n.01', 'name': 'medical_building'}, {'id': 9182, 'synset': 'medical_instrument.n.01', 'name': 'medical_instrument'}, {'id': 9183, 'synset': 'medicine_ball.n.01', 'name': 'medicine_ball'}, {'id': 9184, 'synset': 'medicine_chest.n.01', 'name': 'medicine_chest'}, {'id': 9185, 'synset': 'medline.n.01', 'name': 'MEDLINE'}, {'id': 9186, 'synset': 'megalith.n.01', 'name': 'megalith'}, {'id': 9187, 'synset': 'megaphone.n.01', 'name': 'megaphone'}, {'id': 9188, 'synset': 'memorial.n.03', 'name': 'memorial'}, {'id': 9189, 'synset': 'memory.n.04', 'name': 'memory'}, {'id': 9190, 'synset': 'memory_chip.n.01', 'name': 'memory_chip'}, {'id': 9191, 'synset': 'memory_device.n.01', 'name': 'memory_device'}, {'id': 9192, 'synset': 'menagerie.n.02', 'name': 'menagerie'}, {'id': 9193, 'synset': 'mending.n.01', 'name': 'mending'}, {'id': 9194, 'synset': 'menhir.n.01', 'name': 'menhir'}, {'id': 9195, 'synset': 'menorah.n.02', 'name': 'menorah'}, {'id': 9196, 'synset': 'menorah.n.01', 'name': 'Menorah'}, {'id': 9197, 'synset': "man's_clothing.n.01", 'name': "man's_clothing"}, {'id': 9198, 'synset': "men's_room.n.01", 'name': "men's_room"}, {'id': 9199, 'synset': 'mercantile_establishment.n.01', 'name': 'mercantile_establishment'}, {'id': 9200, 'synset': 'mercury_barometer.n.01', 'name': 'mercury_barometer'}, {'id': 9201, 'synset': 'mercury_cell.n.01', 'name': 'mercury_cell'}, {'id': 9202, 'synset': 'mercury_thermometer.n.01', 'name': 'mercury_thermometer'}, {'id': 9203, 'synset': 'mercury-vapor_lamp.n.01', 'name': 'mercury-vapor_lamp'}, {'id': 9204, 'synset': 'mercy_seat.n.02', 'name': 'mercy_seat'}, {'id': 9205, 'synset': 'merlon.n.01', 'name': 'merlon'}, {'id': 9206, 'synset': 'mess.n.05', 'name': 'mess'}, {'id': 9207, 'synset': 'mess_jacket.n.01', 'name': 'mess_jacket'}, {'id': 9208, 'synset': 'mess_kit.n.01', 'name': 'mess_kit'}, {'id': 9209, 'synset': 'messuage.n.01', 'name': 'messuage'}, {'id': 9210, 'synset': 'metal_detector.n.01', 'name': 'metal_detector'}, {'id': 9211, 'synset': 'metallic.n.01', 'name': 'metallic'}, {'id': 9212, 'synset': 'metal_screw.n.01', 'name': 'metal_screw'}, {'id': 9213, 'synset': 'metal_wood.n.01', 'name': 'metal_wood'}, {'id': 9214, 'synset': 'meteorological_balloon.n.01', 'name': 'meteorological_balloon'}, {'id': 9215, 'synset': 'meter.n.02', 'name': 'meter'}, {'id': 9216, 'synset': 'meterstick.n.01', 'name': 'meterstick'}, {'id': 9217, 'synset': 'metronome.n.01', 'name': 'metronome'}, {'id': 9218, 'synset': 'mezzanine.n.02', 'name': 'mezzanine'}, {'id': 9219, 'synset': 'mezzanine.n.01', 'name': 'mezzanine'}, {'id': 9220, 'synset': 'microbalance.n.01', 'name': 'microbalance'}, {'id': 9221, 'synset': 'microbrewery.n.01', 'name': 'microbrewery'}, {'id': 9222, 'synset': 'microfiche.n.01', 'name': 'microfiche'}, {'id': 9223, 'synset': 'microfilm.n.01', 'name': 'microfilm'}, {'id': 9224, 'synset': 'micrometer.n.02', 'name': 'micrometer'}, {'id': 9225, 'synset': 'microprocessor.n.01', 'name': 'microprocessor'}, {'id': 9226, 'synset': 'microtome.n.01', 'name': 'microtome'}, {'id': 9227, 'synset': 'microwave_diathermy_machine.n.01', 'name': 'microwave_diathermy_machine'}, {'id': 9228, 'synset': 'microwave_linear_accelerator.n.01', 'name': 'microwave_linear_accelerator'}, {'id': 9229, 'synset': 'middy.n.01', 'name': 'middy'}, {'id': 9230, 'synset': 'midiron.n.01', 'name': 'midiron'}, {'id': 9231, 'synset': 'mihrab.n.02', 'name': 'mihrab'}, {'id': 9232, 'synset': 'mihrab.n.01', 'name': 'mihrab'}, {'id': 9233, 'synset': 'military_hospital.n.01', 'name': 'military_hospital'}, {'id': 9234, 'synset': 'military_quarters.n.01', 'name': 'military_quarters'}, {'id': 9235, 'synset': 'military_uniform.n.01', 'name': 'military_uniform'}, {'id': 9236, 'synset': 'military_vehicle.n.01', 'name': 'military_vehicle'}, {'id': 9237, 'synset': 'milk_bar.n.01', 'name': 'milk_bar'}, {'id': 9238, 'synset': 'milk_float.n.01', 'name': 'milk_float'}, {'id': 9239, 'synset': 'milking_machine.n.01', 'name': 'milking_machine'}, {'id': 9240, 'synset': 'milking_stool.n.01', 'name': 'milking_stool'}, {'id': 9241, 'synset': 'milk_wagon.n.01', 'name': 'milk_wagon'}, {'id': 9242, 'synset': 'mill.n.04', 'name': 'mill'}, {'id': 9243, 'synset': 'milldam.n.01', 'name': 'milldam'}, {'id': 9244, 'synset': 'miller.n.05', 'name': 'miller'}, {'id': 9245, 'synset': 'milliammeter.n.01', 'name': 'milliammeter'}, {'id': 9246, 'synset': 'millinery.n.02', 'name': 'millinery'}, {'id': 9247, 'synset': 'millinery.n.01', 'name': 'millinery'}, {'id': 9248, 'synset': 'milling.n.01', 'name': 'milling'}, {'id': 9249, 'synset': 'millivoltmeter.n.01', 'name': 'millivoltmeter'}, {'id': 9250, 'synset': 'millstone.n.03', 'name': 'millstone'}, {'id': 9251, 'synset': 'millstone.n.02', 'name': 'millstone'}, {'id': 9252, 'synset': 'millwheel.n.01', 'name': 'millwheel'}, {'id': 9253, 'synset': 'mimeograph.n.01', 'name': 'mimeograph'}, {'id': 9254, 'synset': 'minaret.n.01', 'name': 'minaret'}, {'id': 9255, 'synset': 'mincer.n.01', 'name': 'mincer'}, {'id': 9256, 'synset': 'mine.n.02', 'name': 'mine'}, {'id': 9257, 'synset': 'mine_detector.n.01', 'name': 'mine_detector'}, {'id': 9258, 'synset': 'minelayer.n.01', 'name': 'minelayer'}, {'id': 9259, 'synset': 'mineshaft.n.01', 'name': 'mineshaft'}, {'id': 9260, 'synset': 'minibar.n.01', 'name': 'minibar'}, {'id': 9261, 'synset': 'minibike.n.01', 'name': 'minibike'}, {'id': 9262, 'synset': 'minibus.n.01', 'name': 'minibus'}, {'id': 9263, 'synset': 'minicar.n.01', 'name': 'minicar'}, {'id': 9264, 'synset': 'minicomputer.n.01', 'name': 'minicomputer'}, {'id': 9265, 'synset': 'ministry.n.02', 'name': 'ministry'}, {'id': 9266, 'synset': 'miniskirt.n.01', 'name': 'miniskirt'}, {'id': 9267, 'synset': 'minisub.n.01', 'name': 'minisub'}, {'id': 9268, 'synset': 'miniver.n.01', 'name': 'miniver'}, {'id': 9269, 'synset': 'mink.n.02', 'name': 'mink'}, {'id': 9270, 'synset': 'minster.n.01', 'name': 'minster'}, {'id': 9271, 'synset': 'mint.n.06', 'name': 'mint'}, {'id': 9272, 'synset': 'minute_hand.n.01', 'name': 'minute_hand'}, {'id': 9273, 'synset': 'minuteman.n.02', 'name': 'Minuteman'}, {'id': 9274, 'synset': 'missile.n.01', 'name': 'missile'}, {'id': 9275, 'synset': 'missile_defense_system.n.01', 'name': 'missile_defense_system'}, {'id': 9276, 'synset': 'miter_box.n.01', 'name': 'miter_box'}, {'id': 9277, 'synset': 'miter_joint.n.01', 'name': 'miter_joint'}, {'id': 9278, 'synset': 'mixer.n.03', 'name': 'mixer'}, {'id': 9279, 'synset': 'mixing_bowl.n.01', 'name': 'mixing_bowl'}, {'id': 9280, 'synset': 'mixing_faucet.n.01', 'name': 'mixing_faucet'}, {'id': 9281, 'synset': 'mizzen.n.02', 'name': 'mizzen'}, {'id': 9282, 'synset': 'mizzenmast.n.01', 'name': 'mizzenmast'}, {'id': 9283, 'synset': 'mobcap.n.01', 'name': 'mobcap'}, {'id': 9284, 'synset': 'mobile_home.n.01', 'name': 'mobile_home'}, {'id': 9285, 'synset': 'moccasin.n.01', 'name': 'moccasin'}, {'id': 9286, 'synset': 'mock-up.n.01', 'name': 'mock-up'}, {'id': 9287, 'synset': 'mod_con.n.01', 'name': 'mod_con'}, {'id': 9288, 'synset': 'model_t.n.01', 'name': 'Model_T'}, {'id': 9289, 'synset': 'modem.n.01', 'name': 'modem'}, {'id': 9290, 'synset': 'modillion.n.01', 'name': 'modillion'}, {'id': 9291, 'synset': 'module.n.03', 'name': 'module'}, {'id': 9292, 'synset': 'module.n.02', 'name': 'module'}, {'id': 9293, 'synset': 'mohair.n.01', 'name': 'mohair'}, {'id': 9294, 'synset': 'moire.n.01', 'name': 'moire'}, {'id': 9295, 'synset': 'mold.n.02', 'name': 'mold'}, {'id': 9296, 'synset': 'moldboard.n.01', 'name': 'moldboard'}, {'id': 9297, 'synset': 'moldboard_plow.n.01', 'name': 'moldboard_plow'}, {'id': 9298, 'synset': 'moleskin.n.01', 'name': 'moleskin'}, {'id': 9299, 'synset': 'molotov_cocktail.n.01', 'name': 'Molotov_cocktail'}, {'id': 9300, 'synset': 'monastery.n.01', 'name': 'monastery'}, {'id': 9301, 'synset': 'monastic_habit.n.01', 'name': 'monastic_habit'}, {'id': 9302, 'synset': 'moneybag.n.01', 'name': 'moneybag'}, {'id': 9303, 'synset': 'money_belt.n.01', 'name': 'money_belt'}, {'id': 9304, 'synset': 'monitor.n.06', 'name': 'monitor'}, {'id': 9305, 'synset': 'monitor.n.05', 'name': 'monitor'}, {'id': 9306, 'synset': 'monkey-wrench.n.01', 'name': 'monkey-wrench'}, {'id': 9307, 'synset': "monk's_cloth.n.01", 'name': "monk's_cloth"}, {'id': 9308, 'synset': 'monochrome.n.01', 'name': 'monochrome'}, {'id': 9309, 'synset': 'monocle.n.01', 'name': 'monocle'}, {'id': 9310, 'synset': 'monofocal_lens_implant.n.01', 'name': 'monofocal_lens_implant'}, {'id': 9311, 'synset': 'monoplane.n.01', 'name': 'monoplane'}, {'id': 9312, 'synset': 'monotype.n.02', 'name': 'monotype'}, {'id': 9313, 'synset': 'monstrance.n.02', 'name': 'monstrance'}, {'id': 9314, 'synset': 'mooring_tower.n.01', 'name': 'mooring_tower'}, {'id': 9315, 'synset': 'moorish_arch.n.01', 'name': 'Moorish_arch'}, {'id': 9316, 'synset': 'moped.n.01', 'name': 'moped'}, {'id': 9317, 'synset': 'mop_handle.n.01', 'name': 'mop_handle'}, {'id': 9318, 'synset': 'moquette.n.01', 'name': 'moquette'}, {'id': 9319, 'synset': 'morgue.n.01', 'name': 'morgue'}, {'id': 9320, 'synset': 'morion.n.01', 'name': 'morion'}, {'id': 9321, 'synset': 'morning_dress.n.02', 'name': 'morning_dress'}, {'id': 9322, 'synset': 'morning_dress.n.01', 'name': 'morning_dress'}, {'id': 9323, 'synset': 'morning_room.n.01', 'name': 'morning_room'}, {'id': 9324, 'synset': 'morris_chair.n.01', 'name': 'Morris_chair'}, {'id': 9325, 'synset': 'mortar.n.01', 'name': 'mortar'}, {'id': 9326, 'synset': 'mortar.n.03', 'name': 'mortar'}, {'id': 9327, 'synset': 'mortarboard.n.02', 'name': 'mortarboard'}, {'id': 9328, 'synset': 'mortise_joint.n.02', 'name': 'mortise_joint'}, {'id': 9329, 'synset': 'mosaic.n.05', 'name': 'mosaic'}, {'id': 9330, 'synset': 'mosque.n.01', 'name': 'mosque'}, {'id': 9331, 'synset': 'mosquito_net.n.01', 'name': 'mosquito_net'}, {'id': 9332, 'synset': 'motel.n.01', 'name': 'motel'}, {'id': 9333, 'synset': 'motel_room.n.01', 'name': 'motel_room'}, {'id': 9334, 'synset': 'mother_hubbard.n.01', 'name': 'Mother_Hubbard'}, {'id': 9335, 'synset': 'motion-picture_camera.n.01', 'name': 'motion-picture_camera'}, {'id': 9336, 'synset': 'motion-picture_film.n.01', 'name': 'motion-picture_film'}, {'id': 9337, 'synset': 'motley.n.03', 'name': 'motley'}, {'id': 9338, 'synset': 'motley.n.02', 'name': 'motley'}, {'id': 9339, 'synset': 'motorboat.n.01', 'name': 'motorboat'}, {'id': 9340, 'synset': 'motor_hotel.n.01', 'name': 'motor_hotel'}, {'id': 9341, 'synset': 'motorized_wheelchair.n.01', 'name': 'motorized_wheelchair'}, {'id': 9342, 'synset': 'mound.n.04', 'name': 'mound'}, {'id': 9343, 'synset': 'mount.n.04', 'name': 'mount'}, {'id': 9344, 'synset': 'mountain_bike.n.01', 'name': 'mountain_bike'}, {'id': 9345, 'synset': 'mountain_tent.n.01', 'name': 'mountain_tent'}, {'id': 9346, 'synset': 'mouse_button.n.01', 'name': 'mouse_button'}, {'id': 9347, 'synset': 'mousetrap.n.01', 'name': 'mousetrap'}, {'id': 9348, 'synset': 'mousse.n.03', 'name': 'mousse'}, {'id': 9349, 'synset': 'mouthpiece.n.06', 'name': 'mouthpiece'}, {'id': 9350, 'synset': 'mouthpiece.n.02', 'name': 'mouthpiece'}, {'id': 9351, 'synset': 'mouthpiece.n.04', 'name': 'mouthpiece'}, {'id': 9352, 'synset': 'movement.n.10', 'name': 'movement'}, {'id': 9353, 'synset': 'movie_projector.n.01', 'name': 'movie_projector'}, {'id': 9354, 'synset': 'moving-coil_galvanometer.n.01', 'name': 'moving-coil_galvanometer'}, {'id': 9355, 'synset': 'moving_van.n.01', 'name': 'moving_van'}, {'id': 9356, 'synset': 'mud_brick.n.01', 'name': 'mud_brick'}, {'id': 9357, 'synset': 'mudguard.n.01', 'name': 'mudguard'}, {'id': 9358, 'synset': 'mudhif.n.01', 'name': 'mudhif'}, {'id': 9359, 'synset': 'muff.n.01', 'name': 'muff'}, {'id': 9360, 'synset': 'muffle.n.01', 'name': 'muffle'}, {'id': 9361, 'synset': 'muffler.n.02', 'name': 'muffler'}, {'id': 9362, 'synset': 'mufti.n.02', 'name': 'mufti'}, {'id': 9363, 'synset': 'mulch.n.01', 'name': 'mulch'}, {'id': 9364, 'synset': 'mule.n.02', 'name': 'mule'}, {'id': 9365, 'synset': 'multichannel_recorder.n.01', 'name': 'multichannel_recorder'}, {'id': 9366, 'synset': 'multiengine_airplane.n.01', 'name': 'multiengine_airplane'}, {'id': 9367, 'synset': 'multiplex.n.02', 'name': 'multiplex'}, {'id': 9368, 'synset': 'multiplexer.n.01', 'name': 'multiplexer'}, {'id': 9369, 'synset': 'multiprocessor.n.01', 'name': 'multiprocessor'}, {'id': 9370, 'synset': 'multistage_rocket.n.01', 'name': 'multistage_rocket'}, {'id': 9371, 'synset': 'munition.n.02', 'name': 'munition'}, {'id': 9372, 'synset': 'murphy_bed.n.01', 'name': 'Murphy_bed'}, {'id': 9373, 'synset': 'musette.n.01', 'name': 'musette'}, {'id': 9374, 'synset': 'musette_pipe.n.01', 'name': 'musette_pipe'}, {'id': 9375, 'synset': 'museum.n.01', 'name': 'museum'}, {'id': 9376, 'synset': 'mushroom_anchor.n.01', 'name': 'mushroom_anchor'}, {'id': 9377, 'synset': 'music_box.n.01', 'name': 'music_box'}, {'id': 9378, 'synset': 'music_hall.n.01', 'name': 'music_hall'}, {'id': 9379, 'synset': 'music_school.n.02', 'name': 'music_school'}, {'id': 9380, 'synset': 'music_stand.n.01', 'name': 'music_stand'}, {'id': 9381, 'synset': 'musket.n.01', 'name': 'musket'}, {'id': 9382, 'synset': 'musket_ball.n.01', 'name': 'musket_ball'}, {'id': 9383, 'synset': 'muslin.n.01', 'name': 'muslin'}, {'id': 9384, 'synset': 'mustache_cup.n.01', 'name': 'mustache_cup'}, {'id': 9385, 'synset': 'mustard_plaster.n.01', 'name': 'mustard_plaster'}, {'id': 9386, 'synset': 'mute.n.02', 'name': 'mute'}, {'id': 9387, 'synset': 'muzzle_loader.n.01', 'name': 'muzzle_loader'}, {'id': 9388, 'synset': 'muzzle.n.03', 'name': 'muzzle'}, {'id': 9389, 'synset': 'myelogram.n.01', 'name': 'myelogram'}, {'id': 9390, 'synset': 'nacelle.n.01', 'name': 'nacelle'}, {'id': 9391, 'synset': 'nail.n.02', 'name': 'nail'}, {'id': 9392, 'synset': 'nailbrush.n.01', 'name': 'nailbrush'}, {'id': 9393, 'synset': 'nailhead.n.02', 'name': 'nailhead'}, {'id': 9394, 'synset': 'nailhead.n.01', 'name': 'nailhead'}, {'id': 9395, 'synset': 'nail_polish.n.01', 'name': 'nail_polish'}, {'id': 9396, 'synset': 'nainsook.n.01', 'name': 'nainsook'}, {'id': 9397, 'synset': "napier's_bones.n.01", 'name': "Napier's_bones"}, {'id': 9398, 'synset': 'nard.n.01', 'name': 'nard'}, {'id': 9399, 'synset': 'narrowbody_aircraft.n.01', 'name': 'narrowbody_aircraft'}, {'id': 9400, 'synset': 'narrow_wale.n.01', 'name': 'narrow_wale'}, {'id': 9401, 'synset': 'narthex.n.02', 'name': 'narthex'}, {'id': 9402, 'synset': 'narthex.n.01', 'name': 'narthex'}, {'id': 9403, 'synset': 'nasotracheal_tube.n.01', 'name': 'nasotracheal_tube'}, {'id': 9404, 'synset': 'national_monument.n.01', 'name': 'national_monument'}, {'id': 9405, 'synset': 'nautilus.n.01', 'name': 'nautilus'}, {'id': 9406, 'synset': 'navigational_system.n.01', 'name': 'navigational_system'}, {'id': 9407, 'synset': 'naval_equipment.n.01', 'name': 'naval_equipment'}, {'id': 9408, 'synset': 'naval_gun.n.01', 'name': 'naval_gun'}, {'id': 9409, 'synset': 'naval_missile.n.01', 'name': 'naval_missile'}, {'id': 9410, 'synset': 'naval_radar.n.01', 'name': 'naval_radar'}, {'id': 9411, 'synset': 'naval_tactical_data_system.n.01', 'name': 'naval_tactical_data_system'}, {'id': 9412, 'synset': 'naval_weaponry.n.01', 'name': 'naval_weaponry'}, {'id': 9413, 'synset': 'nave.n.01', 'name': 'nave'}, {'id': 9414, 'synset': 'navigational_instrument.n.01', 'name': 'navigational_instrument'}, {'id': 9415, 'synset': 'nebuchadnezzar.n.02', 'name': 'nebuchadnezzar'}, {'id': 9416, 'synset': 'neckband.n.01', 'name': 'neckband'}, {'id': 9417, 'synset': 'neck_brace.n.01', 'name': 'neck_brace'}, {'id': 9418, 'synset': 'neckcloth.n.01', 'name': 'neckcloth'}, {'id': 9419, 'synset': 'necklet.n.01', 'name': 'necklet'}, {'id': 9420, 'synset': 'neckline.n.01', 'name': 'neckline'}, {'id': 9421, 'synset': 'neckpiece.n.01', 'name': 'neckpiece'}, {'id': 9422, 'synset': 'neckwear.n.01', 'name': 'neckwear'}, {'id': 9423, 'synset': 'needle.n.02', 'name': 'needle'}, {'id': 9424, 'synset': 'needlenose_pliers.n.01', 'name': 'needlenose_pliers'}, {'id': 9425, 'synset': 'needlework.n.01', 'name': 'needlework'}, {'id': 9426, 'synset': 'negative.n.02', 'name': 'negative'}, {'id': 9427, 'synset': 'negative_magnetic_pole.n.01', 'name': 'negative_magnetic_pole'}, {'id': 9428, 'synset': 'negative_pole.n.01', 'name': 'negative_pole'}, {'id': 9429, 'synset': 'negligee.n.01', 'name': 'negligee'}, {'id': 9430, 'synset': 'neolith.n.01', 'name': 'neolith'}, {'id': 9431, 'synset': 'neon_lamp.n.01', 'name': 'neon_lamp'}, {'id': 9432, 'synset': 'nephoscope.n.01', 'name': 'nephoscope'}, {'id': 9433, 'synset': 'nest.n.05', 'name': 'nest'}, {'id': 9434, 'synset': 'nest_egg.n.02', 'name': 'nest_egg'}, {'id': 9435, 'synset': 'net.n.06', 'name': 'net'}, {'id': 9436, 'synset': 'net.n.02', 'name': 'net'}, {'id': 9437, 'synset': 'net.n.05', 'name': 'net'}, {'id': 9438, 'synset': 'net.n.04', 'name': 'net'}, {'id': 9439, 'synset': 'network.n.05', 'name': 'network'}, {'id': 9440, 'synset': 'network.n.04', 'name': 'network'}, {'id': 9441, 'synset': 'neutron_bomb.n.01', 'name': 'neutron_bomb'}, {'id': 9442, 'synset': 'newel.n.02', 'name': 'newel'}, {'id': 9443, 'synset': 'newel_post.n.01', 'name': 'newel_post'}, {'id': 9444, 'synset': 'newspaper.n.03', 'name': 'newspaper'}, {'id': 9445, 'synset': 'newsroom.n.03', 'name': 'newsroom'}, {'id': 9446, 'synset': 'newsroom.n.02', 'name': 'newsroom'}, {'id': 9447, 'synset': 'newtonian_telescope.n.01', 'name': 'Newtonian_telescope'}, {'id': 9448, 'synset': 'nib.n.01', 'name': 'nib'}, {'id': 9449, 'synset': 'niblick.n.01', 'name': 'niblick'}, {'id': 9450, 'synset': 'nicad.n.01', 'name': 'nicad'}, {'id': 9451, 'synset': 'nickel-iron_battery.n.01', 'name': 'nickel-iron_battery'}, {'id': 9452, 'synset': 'nicol_prism.n.01', 'name': 'Nicol_prism'}, {'id': 9453, 'synset': 'night_bell.n.01', 'name': 'night_bell'}, {'id': 9454, 'synset': 'nightcap.n.02', 'name': 'nightcap'}, {'id': 9455, 'synset': 'nightgown.n.01', 'name': 'nightgown'}, {'id': 9456, 'synset': 'night_latch.n.01', 'name': 'night_latch'}, {'id': 9457, 'synset': 'night-light.n.01', 'name': 'night-light'}, {'id': 9458, 'synset': 'nightshirt.n.01', 'name': 'nightshirt'}, {'id': 9459, 'synset': 'ninepin.n.01', 'name': 'ninepin'}, {'id': 9460, 'synset': 'ninepin_ball.n.01', 'name': 'ninepin_ball'}, {'id': 9461, 'synset': 'ninon.n.01', 'name': 'ninon'}, {'id': 9462, 'synset': 'nipple.n.02', 'name': 'nipple'}, {'id': 9463, 'synset': 'nipple_shield.n.01', 'name': 'nipple_shield'}, {'id': 9464, 'synset': 'niqab.n.01', 'name': 'niqab'}, {'id': 9465, 'synset': 'nissen_hut.n.01', 'name': 'Nissen_hut'}, {'id': 9466, 'synset': 'nogging.n.01', 'name': 'nogging'}, {'id': 9467, 'synset': 'noisemaker.n.01', 'name': 'noisemaker'}, {'id': 9468, 'synset': 'nonsmoker.n.02', 'name': 'nonsmoker'}, {'id': 9469, 'synset': 'non-volatile_storage.n.01', 'name': 'non-volatile_storage'}, {'id': 9470, 'synset': 'norfolk_jacket.n.01', 'name': 'Norfolk_jacket'}, {'id': 9471, 'synset': 'noria.n.01', 'name': 'noria'}, {'id': 9472, 'synset': 'nose_flute.n.01', 'name': 'nose_flute'}, {'id': 9473, 'synset': 'nosewheel.n.01', 'name': 'nosewheel'}, {'id': 9474, 'synset': 'notebook.n.02', 'name': 'notebook'}, {'id': 9475, 'synset': 'nuclear-powered_ship.n.01', 'name': 'nuclear-powered_ship'}, {'id': 9476, 'synset': 'nuclear_reactor.n.01', 'name': 'nuclear_reactor'}, {'id': 9477, 'synset': 'nuclear_rocket.n.01', 'name': 'nuclear_rocket'}, {'id': 9478, 'synset': 'nuclear_weapon.n.01', 'name': 'nuclear_weapon'}, {'id': 9479, 'synset': 'nude.n.01', 'name': 'nude'}, {'id': 9480, 'synset': 'numdah.n.01', 'name': 'numdah'}, {'id': 9481, 'synset': "nun's_habit.n.01", 'name': "nun's_habit"}, {'id': 9482, 'synset': 'nursery.n.01', 'name': 'nursery'}, {'id': 9483, 'synset': 'nut_and_bolt.n.01', 'name': 'nut_and_bolt'}, {'id': 9484, 'synset': 'nylon.n.02', 'name': 'nylon'}, {'id': 9485, 'synset': 'nylons.n.01', 'name': 'nylons'}, {'id': 9486, 'synset': 'oast.n.01', 'name': 'oast'}, {'id': 9487, 'synset': 'oast_house.n.01', 'name': 'oast_house'}, {'id': 9488, 'synset': 'obelisk.n.01', 'name': 'obelisk'}, {'id': 9489, 'synset': 'object_ball.n.01', 'name': 'object_ball'}, {'id': 9490, 'synset': 'objective.n.02', 'name': 'objective'}, {'id': 9491, 'synset': 'oblique_bandage.n.01', 'name': 'oblique_bandage'}, {'id': 9492, 'synset': 'oboe.n.01', 'name': 'oboe'}, {'id': 9493, 'synset': 'oboe_da_caccia.n.01', 'name': 'oboe_da_caccia'}, {'id': 9494, 'synset': "oboe_d'amore.n.01", 'name': "oboe_d'amore"}, {'id': 9495, 'synset': 'observation_dome.n.01', 'name': 'observation_dome'}, {'id': 9496, 'synset': 'observatory.n.01', 'name': 'observatory'}, {'id': 9497, 'synset': 'obstacle.n.02', 'name': 'obstacle'}, {'id': 9498, 'synset': 'obturator.n.01', 'name': 'obturator'}, {'id': 9499, 'synset': 'ocarina.n.01', 'name': 'ocarina'}, {'id': 9500, 'synset': 'octant.n.01', 'name': 'octant'}, {'id': 9501, 'synset': 'odd-leg_caliper.n.01', 'name': 'odd-leg_caliper'}, {'id': 9502, 'synset': 'odometer.n.01', 'name': 'odometer'}, {'id': 9503, 'synset': 'oeil_de_boeuf.n.01', 'name': 'oeil_de_boeuf'}, {'id': 9504, 'synset': 'office.n.01', 'name': 'office'}, {'id': 9505, 'synset': 'office_building.n.01', 'name': 'office_building'}, {'id': 9506, 'synset': 'office_furniture.n.01', 'name': 'office_furniture'}, {'id': 9507, 'synset': "officer's_mess.n.01", 'name': "officer's_mess"}, {'id': 9508, 'synset': 'off-line_equipment.n.01', 'name': 'off-line_equipment'}, {'id': 9509, 'synset': 'ogee.n.01', 'name': 'ogee'}, {'id': 9510, 'synset': 'ogee_arch.n.01', 'name': 'ogee_arch'}, {'id': 9511, 'synset': 'ohmmeter.n.01', 'name': 'ohmmeter'}, {'id': 9512, 'synset': 'oil.n.02', 'name': 'oil'}, {'id': 9513, 'synset': 'oilcan.n.01', 'name': 'oilcan'}, {'id': 9514, 'synset': 'oilcloth.n.01', 'name': 'oilcloth'}, {'id': 9515, 'synset': 'oil_filter.n.01', 'name': 'oil_filter'}, {'id': 9516, 'synset': 'oil_heater.n.01', 'name': 'oil_heater'}, {'id': 9517, 'synset': 'oil_paint.n.01', 'name': 'oil_paint'}, {'id': 9518, 'synset': 'oil_pump.n.01', 'name': 'oil_pump'}, {'id': 9519, 'synset': 'oil_refinery.n.01', 'name': 'oil_refinery'}, {'id': 9520, 'synset': 'oilskin.n.01', 'name': 'oilskin'}, {'id': 9521, 'synset': 'oil_slick.n.01', 'name': 'oil_slick'}, {'id': 9522, 'synset': 'oilstone.n.01', 'name': 'oilstone'}, {'id': 9523, 'synset': 'oil_tanker.n.01', 'name': 'oil_tanker'}, {'id': 9524, 'synset': 'old_school_tie.n.01', 'name': 'old_school_tie'}, {'id': 9525, 'synset': 'olive_drab.n.03', 'name': 'olive_drab'}, {'id': 9526, 'synset': 'olive_drab.n.02', 'name': 'olive_drab'}, {'id': 9527, 'synset': 'olympian_zeus.n.01', 'name': 'Olympian_Zeus'}, {'id': 9528, 'synset': 'omelet_pan.n.01', 'name': 'omelet_pan'}, {'id': 9529, 'synset': 'omnidirectional_antenna.n.01', 'name': 'omnidirectional_antenna'}, {'id': 9530, 'synset': 'omnirange.n.01', 'name': 'omnirange'}, {'id': 9531, 'synset': 'onion_dome.n.01', 'name': 'onion_dome'}, {'id': 9532, 'synset': 'open-air_market.n.01', 'name': 'open-air_market'}, {'id': 9533, 'synset': 'open_circuit.n.01', 'name': 'open_circuit'}, {'id': 9534, 'synset': 'open-end_wrench.n.01', 'name': 'open-end_wrench'}, {'id': 9535, 'synset': 'opener.n.03', 'name': 'opener'}, {'id': 9536, 'synset': 'open-hearth_furnace.n.01', 'name': 'open-hearth_furnace'}, {'id': 9537, 'synset': 'openside_plane.n.01', 'name': 'openside_plane'}, {'id': 9538, 'synset': 'open_sight.n.01', 'name': 'open_sight'}, {'id': 9539, 'synset': 'openwork.n.01', 'name': 'openwork'}, {'id': 9540, 'synset': 'opera.n.03', 'name': 'opera'}, {'id': 9541, 'synset': 'opera_cloak.n.01', 'name': 'opera_cloak'}, {'id': 9542, 'synset': 'operating_microscope.n.01', 'name': 'operating_microscope'}, {'id': 9543, 'synset': 'operating_room.n.01', 'name': 'operating_room'}, {'id': 9544, 'synset': 'operating_table.n.01', 'name': 'operating_table'}, {'id': 9545, 'synset': 'ophthalmoscope.n.01', 'name': 'ophthalmoscope'}, {'id': 9546, 'synset': 'optical_device.n.01', 'name': 'optical_device'}, {'id': 9547, 'synset': 'optical_disk.n.01', 'name': 'optical_disk'}, {'id': 9548, 'synset': 'optical_instrument.n.01', 'name': 'optical_instrument'}, {'id': 9549, 'synset': 'optical_pyrometer.n.01', 'name': 'optical_pyrometer'}, {'id': 9550, 'synset': 'optical_telescope.n.01', 'name': 'optical_telescope'}, {'id': 9551, 'synset': 'orchestra_pit.n.01', 'name': 'orchestra_pit'}, {'id': 9552, 'synset': 'ordinary.n.04', 'name': 'ordinary'}, {'id': 9553, 'synset': 'organ.n.05', 'name': 'organ'}, {'id': 9554, 'synset': 'organdy.n.01', 'name': 'organdy'}, {'id': 9555, 'synset': 'organic_light-emitting_diode.n.01', 'name': 'organic_light-emitting_diode'}, {'id': 9556, 'synset': 'organ_loft.n.01', 'name': 'organ_loft'}, {'id': 9557, 'synset': 'organ_pipe.n.01', 'name': 'organ_pipe'}, {'id': 9558, 'synset': 'organza.n.01', 'name': 'organza'}, {'id': 9559, 'synset': 'oriel.n.01', 'name': 'oriel'}, {'id': 9560, 'synset': 'oriflamme.n.02', 'name': 'oriflamme'}, {'id': 9561, 'synset': 'o_ring.n.01', 'name': 'O_ring'}, {'id': 9562, 'synset': 'orlon.n.01', 'name': 'Orlon'}, {'id': 9563, 'synset': 'orlop_deck.n.01', 'name': 'orlop_deck'}, {'id': 9564, 'synset': 'orphanage.n.02', 'name': 'orphanage'}, {'id': 9565, 'synset': 'orphrey.n.01', 'name': 'orphrey'}, {'id': 9566, 'synset': 'orrery.n.01', 'name': 'orrery'}, {'id': 9567, 'synset': 'orthicon.n.01', 'name': 'orthicon'}, {'id': 9568, 'synset': 'orthochromatic_film.n.01', 'name': 'orthochromatic_film'}, {'id': 9569, 'synset': 'orthopter.n.01', 'name': 'orthopter'}, {'id': 9570, 'synset': 'orthoscope.n.01', 'name': 'orthoscope'}, {'id': 9571, 'synset': 'oscillograph.n.01', 'name': 'oscillograph'}, {'id': 9572, 'synset': 'oscilloscope.n.01', 'name': 'oscilloscope'}, {'id': 9573, 'synset': 'ossuary.n.01', 'name': 'ossuary'}, {'id': 9574, 'synset': 'otoscope.n.01', 'name': 'otoscope'}, {'id': 9575, 'synset': 'oubliette.n.01', 'name': 'oubliette'}, {'id': 9576, 'synset': 'out-basket.n.01', 'name': 'out-basket'}, {'id': 9577, 'synset': 'outboard_motor.n.01', 'name': 'outboard_motor'}, {'id': 9578, 'synset': 'outboard_motorboat.n.01', 'name': 'outboard_motorboat'}, {'id': 9579, 'synset': 'outbuilding.n.01', 'name': 'outbuilding'}, {'id': 9580, 'synset': 'outerwear.n.01', 'name': 'outerwear'}, {'id': 9581, 'synset': 'outfall.n.01', 'name': 'outfall'}, {'id': 9582, 'synset': 'outfit.n.02', 'name': 'outfit'}, {'id': 9583, 'synset': 'outfitter.n.02', 'name': 'outfitter'}, {'id': 9584, 'synset': 'outhouse.n.01', 'name': 'outhouse'}, {'id': 9585, 'synset': 'output_device.n.01', 'name': 'output_device'}, {'id': 9586, 'synset': 'outrigger.n.01', 'name': 'outrigger'}, {'id': 9587, 'synset': 'outrigger_canoe.n.01', 'name': 'outrigger_canoe'}, {'id': 9588, 'synset': 'outside_caliper.n.01', 'name': 'outside_caliper'}, {'id': 9589, 'synset': 'outside_mirror.n.01', 'name': 'outside_mirror'}, {'id': 9590, 'synset': 'outwork.n.01', 'name': 'outwork'}, {'id': 9591, 'synset': 'oven_thermometer.n.01', 'name': 'oven_thermometer'}, {'id': 9592, 'synset': 'overall.n.02', 'name': 'overall'}, {'id': 9593, 'synset': 'overcoat.n.02', 'name': 'overcoat'}, {'id': 9594, 'synset': 'overdrive.n.02', 'name': 'overdrive'}, {'id': 9595, 'synset': 'overgarment.n.01', 'name': 'overgarment'}, {'id': 9596, 'synset': 'overhand_knot.n.01', 'name': 'overhand_knot'}, {'id': 9597, 'synset': 'overhang.n.01', 'name': 'overhang'}, {'id': 9598, 'synset': 'overhead_projector.n.01', 'name': 'overhead_projector'}, {'id': 9599, 'synset': 'overmantel.n.01', 'name': 'overmantel'}, {'id': 9600, 'synset': 'overnighter.n.02', 'name': 'overnighter'}, {'id': 9601, 'synset': 'overpass.n.01', 'name': 'overpass'}, {'id': 9602, 'synset': 'override.n.01', 'name': 'override'}, {'id': 9603, 'synset': 'overshoe.n.01', 'name': 'overshoe'}, {'id': 9604, 'synset': 'overskirt.n.01', 'name': 'overskirt'}, {'id': 9605, 'synset': 'oxbow.n.03', 'name': 'oxbow'}, {'id': 9606, 'synset': 'oxbridge.n.01', 'name': 'Oxbridge'}, {'id': 9607, 'synset': 'oxcart.n.01', 'name': 'oxcart'}, {'id': 9608, 'synset': 'oxeye.n.03', 'name': 'oxeye'}, {'id': 9609, 'synset': 'oxford.n.04', 'name': 'oxford'}, {'id': 9610, 'synset': 'oximeter.n.01', 'name': 'oximeter'}, {'id': 9611, 'synset': 'oxyacetylene_torch.n.01', 'name': 'oxyacetylene_torch'}, {'id': 9612, 'synset': 'oxygen_mask.n.01', 'name': 'oxygen_mask'}, {'id': 9613, 'synset': 'oyster_bar.n.01', 'name': 'oyster_bar'}, {'id': 9614, 'synset': 'oyster_bed.n.01', 'name': 'oyster_bed'}, {'id': 9615, 'synset': 'pace_car.n.01', 'name': 'pace_car'}, {'id': 9616, 'synset': 'pacemaker.n.03', 'name': 'pacemaker'}, {'id': 9617, 'synset': 'pack.n.03', 'name': 'pack'}, {'id': 9618, 'synset': 'pack.n.09', 'name': 'pack'}, {'id': 9619, 'synset': 'pack.n.07', 'name': 'pack'}, {'id': 9620, 'synset': 'package.n.02', 'name': 'package'}, {'id': 9621, 'synset': 'package_store.n.01', 'name': 'package_store'}, {'id': 9622, 'synset': 'packaging.n.03', 'name': 'packaging'}, {'id': 9623, 'synset': 'packing_box.n.02', 'name': 'packing_box'}, {'id': 9624, 'synset': 'packinghouse.n.02', 'name': 'packinghouse'}, {'id': 9625, 'synset': 'packinghouse.n.01', 'name': 'packinghouse'}, {'id': 9626, 'synset': 'packing_needle.n.01', 'name': 'packing_needle'}, {'id': 9627, 'synset': 'packsaddle.n.01', 'name': 'packsaddle'}, {'id': 9628, 'synset': 'paddle.n.02', 'name': 'paddle'}, {'id': 9629, 'synset': 'paddle.n.01', 'name': 'paddle'}, {'id': 9630, 'synset': 'paddle_box.n.01', 'name': 'paddle_box'}, {'id': 9631, 'synset': 'paddle_steamer.n.01', 'name': 'paddle_steamer'}, {'id': 9632, 'synset': 'paddlewheel.n.01', 'name': 'paddlewheel'}, {'id': 9633, 'synset': 'paddock.n.01', 'name': 'paddock'}, {'id': 9634, 'synset': 'page_printer.n.01', 'name': 'page_printer'}, {'id': 9635, 'synset': 'paint.n.01', 'name': 'paint'}, {'id': 9636, 'synset': 'paintball.n.01', 'name': 'paintball'}, {'id': 9637, 'synset': 'paintball_gun.n.01', 'name': 'paintball_gun'}, {'id': 9638, 'synset': 'paintbox.n.01', 'name': 'paintbox'}, {'id': 9639, 'synset': 'paisley.n.01', 'name': 'paisley'}, {'id': 9640, 'synset': 'pajama.n.01', 'name': 'pajama'}, {'id': 9641, 'synset': 'palace.n.04', 'name': 'palace'}, {'id': 9642, 'synset': 'palace.n.01', 'name': 'palace'}, {'id': 9643, 'synset': 'palace.n.03', 'name': 'palace'}, {'id': 9644, 'synset': 'palanquin.n.01', 'name': 'palanquin'}, {'id': 9645, 'synset': 'paleolith.n.01', 'name': 'paleolith'}, {'id': 9646, 'synset': 'palestra.n.01', 'name': 'palestra'}, {'id': 9647, 'synset': 'palette_knife.n.01', 'name': 'palette_knife'}, {'id': 9648, 'synset': 'palisade.n.01', 'name': 'palisade'}, {'id': 9649, 'synset': 'pallet.n.03', 'name': 'pallet'}, {'id': 9650, 'synset': 'pallette.n.01', 'name': 'pallette'}, {'id': 9651, 'synset': 'pallium.n.04', 'name': 'pallium'}, {'id': 9652, 'synset': 'pallium.n.03', 'name': 'pallium'}, {'id': 9653, 'synset': 'pancake_turner.n.01', 'name': 'pancake_turner'}, {'id': 9654, 'synset': 'panchromatic_film.n.01', 'name': 'panchromatic_film'}, {'id': 9655, 'synset': 'panda_car.n.01', 'name': 'panda_car'}, {'id': 9656, 'synset': 'paneling.n.01', 'name': 'paneling'}, {'id': 9657, 'synset': 'panhandle.n.02', 'name': 'panhandle'}, {'id': 9658, 'synset': 'panic_button.n.01', 'name': 'panic_button'}, {'id': 9659, 'synset': 'pannier.n.02', 'name': 'pannier'}, {'id': 9660, 'synset': 'pannier.n.01', 'name': 'pannier'}, {'id': 9661, 'synset': 'pannikin.n.01', 'name': 'pannikin'}, {'id': 9662, 'synset': 'panopticon.n.02', 'name': 'panopticon'}, {'id': 9663, 'synset': 'panopticon.n.01', 'name': 'panopticon'}, {'id': 9664, 'synset': 'panpipe.n.01', 'name': 'panpipe'}, {'id': 9665, 'synset': 'pantaloon.n.03', 'name': 'pantaloon'}, {'id': 9666, 'synset': 'pantechnicon.n.01', 'name': 'pantechnicon'}, {'id': 9667, 'synset': 'pantheon.n.03', 'name': 'pantheon'}, {'id': 9668, 'synset': 'pantheon.n.02', 'name': 'pantheon'}, {'id': 9669, 'synset': 'pantie.n.01', 'name': 'pantie'}, {'id': 9670, 'synset': 'panting.n.02', 'name': 'panting'}, {'id': 9671, 'synset': 'pant_leg.n.01', 'name': 'pant_leg'}, {'id': 9672, 'synset': 'pantograph.n.01', 'name': 'pantograph'}, {'id': 9673, 'synset': 'pantry.n.01', 'name': 'pantry'}, {'id': 9674, 'synset': 'pants_suit.n.01', 'name': 'pants_suit'}, {'id': 9675, 'synset': 'panty_girdle.n.01', 'name': 'panty_girdle'}, {'id': 9676, 'synset': 'panzer.n.01', 'name': 'panzer'}, {'id': 9677, 'synset': 'paper_chain.n.01', 'name': 'paper_chain'}, {'id': 9678, 'synset': 'paper_clip.n.01', 'name': 'paper_clip'}, {'id': 9679, 'synset': 'paper_cutter.n.01', 'name': 'paper_cutter'}, {'id': 9680, 'synset': 'paper_fastener.n.01', 'name': 'paper_fastener'}, {'id': 9681, 'synset': 'paper_feed.n.01', 'name': 'paper_feed'}, {'id': 9682, 'synset': 'paper_mill.n.01', 'name': 'paper_mill'}, {'id': 9683, 'synset': 'parabolic_mirror.n.01', 'name': 'parabolic_mirror'}, {'id': 9684, 'synset': 'parabolic_reflector.n.01', 'name': 'parabolic_reflector'}, {'id': 9685, 'synset': 'parallel_bars.n.01', 'name': 'parallel_bars'}, {'id': 9686, 'synset': 'parallel_circuit.n.01', 'name': 'parallel_circuit'}, {'id': 9687, 'synset': 'parallel_interface.n.01', 'name': 'parallel_interface'}, {'id': 9688, 'synset': 'parang.n.01', 'name': 'parang'}, {'id': 9689, 'synset': 'parapet.n.02', 'name': 'parapet'}, {'id': 9690, 'synset': 'parapet.n.01', 'name': 'parapet'}, {'id': 9691, 'synset': 'parer.n.02', 'name': 'parer'}, {'id': 9692, 'synset': 'parfait_glass.n.01', 'name': 'parfait_glass'}, {'id': 9693, 'synset': 'pargeting.n.02', 'name': 'pargeting'}, {'id': 9694, 'synset': 'pari-mutuel_machine.n.01', 'name': 'pari-mutuel_machine'}, {'id': 9695, 'synset': 'park_bench.n.01', 'name': 'park_bench'}, {'id': 9696, 'synset': 'parlor.n.01', 'name': 'parlor'}, {'id': 9697, 'synset': 'parquet.n.01', 'name': 'parquet'}, {'id': 9698, 'synset': 'parquetry.n.01', 'name': 'parquetry'}, {'id': 9699, 'synset': 'parsonage.n.01', 'name': 'parsonage'}, {'id': 9700, 'synset': 'parsons_table.n.01', 'name': 'Parsons_table'}, {'id': 9701, 'synset': 'partial_denture.n.01', 'name': 'partial_denture'}, {'id': 9702, 'synset': 'particle_detector.n.01', 'name': 'particle_detector'}, {'id': 9703, 'synset': 'partition.n.01', 'name': 'partition'}, {'id': 9704, 'synset': 'parts_bin.n.01', 'name': 'parts_bin'}, {'id': 9705, 'synset': 'party_line.n.02', 'name': 'party_line'}, {'id': 9706, 'synset': 'party_wall.n.01', 'name': 'party_wall'}, {'id': 9707, 'synset': 'parvis.n.01', 'name': 'parvis'}, {'id': 9708, 'synset': 'passenger_train.n.01', 'name': 'passenger_train'}, {'id': 9709, 'synset': 'passenger_van.n.01', 'name': 'passenger_van'}, {'id': 9710, 'synset': 'passe-partout.n.02', 'name': 'passe-partout'}, {'id': 9711, 'synset': 'passive_matrix_display.n.01', 'name': 'passive_matrix_display'}, {'id': 9712, 'synset': 'passkey.n.01', 'name': 'passkey'}, {'id': 9713, 'synset': 'pass-through.n.01', 'name': 'pass-through'}, {'id': 9714, 'synset': 'pastry_cart.n.01', 'name': 'pastry_cart'}, {'id': 9715, 'synset': 'patch.n.03', 'name': 'patch'}, {'id': 9716, 'synset': 'patchcord.n.01', 'name': 'patchcord'}, {'id': 9717, 'synset': 'patchouli.n.02', 'name': 'patchouli'}, {'id': 9718, 'synset': 'patch_pocket.n.01', 'name': 'patch_pocket'}, {'id': 9719, 'synset': 'patchwork.n.02', 'name': 'patchwork'}, {'id': 9720, 'synset': 'patent_log.n.01', 'name': 'patent_log'}, {'id': 9721, 'synset': 'paternoster.n.02', 'name': 'paternoster'}, {'id': 9722, 'synset': 'patina.n.01', 'name': 'patina'}, {'id': 9723, 'synset': 'patio.n.01', 'name': 'patio'}, {'id': 9724, 'synset': 'patisserie.n.01', 'name': 'patisserie'}, {'id': 9725, 'synset': 'patka.n.01', 'name': 'patka'}, {'id': 9726, 'synset': 'patrol_boat.n.01', 'name': 'patrol_boat'}, {'id': 9727, 'synset': 'patty-pan.n.01', 'name': 'patty-pan'}, {'id': 9728, 'synset': 'pave.n.01', 'name': 'pave'}, {'id': 9729, 'synset': 'pavilion.n.01', 'name': 'pavilion'}, {'id': 9730, 'synset': 'pavior.n.01', 'name': 'pavior'}, {'id': 9731, 'synset': 'pavis.n.01', 'name': 'pavis'}, {'id': 9732, 'synset': 'pawn.n.03', 'name': 'pawn'}, {'id': 9733, 'synset': "pawnbroker's_shop.n.01", 'name': "pawnbroker's_shop"}, {'id': 9734, 'synset': 'pay-phone.n.01', 'name': 'pay-phone'}, {'id': 9735, 'synset': 'pc_board.n.01', 'name': 'PC_board'}, {'id': 9736, 'synset': 'peach_orchard.n.01', 'name': 'peach_orchard'}, {'id': 9737, 'synset': 'pea_jacket.n.01', 'name': 'pea_jacket'}, {'id': 9738, 'synset': 'peavey.n.01', 'name': 'peavey'}, {'id': 9739, 'synset': 'pectoral.n.02', 'name': 'pectoral'}, {'id': 9740, 'synset': 'pedal.n.02', 'name': 'pedal'}, {'id': 9741, 'synset': 'pedal_pusher.n.01', 'name': 'pedal_pusher'}, {'id': 9742, 'synset': 'pedestal.n.03', 'name': 'pedestal'}, {'id': 9743, 'synset': 'pedestal_table.n.01', 'name': 'pedestal_table'}, {'id': 9744, 'synset': 'pedestrian_crossing.n.01', 'name': 'pedestrian_crossing'}, {'id': 9745, 'synset': 'pedicab.n.01', 'name': 'pedicab'}, {'id': 9746, 'synset': 'pediment.n.01', 'name': 'pediment'}, {'id': 9747, 'synset': 'pedometer.n.01', 'name': 'pedometer'}, {'id': 9748, 'synset': 'peep_sight.n.01', 'name': 'peep_sight'}, {'id': 9749, 'synset': 'peg.n.01', 'name': 'peg'}, {'id': 9750, 'synset': 'peg.n.06', 'name': 'peg'}, {'id': 9751, 'synset': 'peg.n.05', 'name': 'peg'}, {'id': 9752, 'synset': 'pelham.n.01', 'name': 'Pelham'}, {'id': 9753, 'synset': 'pelican_crossing.n.01', 'name': 'pelican_crossing'}, {'id': 9754, 'synset': 'pelisse.n.01', 'name': 'pelisse'}, {'id': 9755, 'synset': 'pelvimeter.n.01', 'name': 'pelvimeter'}, {'id': 9756, 'synset': 'penal_colony.n.01', 'name': 'penal_colony'}, {'id': 9757, 'synset': 'penal_institution.n.01', 'name': 'penal_institution'}, {'id': 9758, 'synset': 'penalty_box.n.01', 'name': 'penalty_box'}, {'id': 9759, 'synset': 'pen-and-ink.n.01', 'name': 'pen-and-ink'}, {'id': 9760, 'synset': 'pencil.n.04', 'name': 'pencil'}, {'id': 9761, 'synset': 'pendant_earring.n.01', 'name': 'pendant_earring'}, {'id': 9762, 'synset': 'pendulum_clock.n.01', 'name': 'pendulum_clock'}, {'id': 9763, 'synset': 'pendulum_watch.n.01', 'name': 'pendulum_watch'}, {'id': 9764, 'synset': 'penetration_bomb.n.01', 'name': 'penetration_bomb'}, {'id': 9765, 'synset': 'penile_implant.n.01', 'name': 'penile_implant'}, {'id': 9766, 'synset': 'penitentiary.n.01', 'name': 'penitentiary'}, {'id': 9767, 'synset': 'penknife.n.01', 'name': 'penknife'}, {'id': 9768, 'synset': 'penlight.n.01', 'name': 'penlight'}, {'id': 9769, 'synset': 'pennant.n.03', 'name': 'pennant'}, {'id': 9770, 'synset': 'pennywhistle.n.01', 'name': 'pennywhistle'}, {'id': 9771, 'synset': 'penthouse.n.01', 'name': 'penthouse'}, {'id': 9772, 'synset': 'pentode.n.01', 'name': 'pentode'}, {'id': 9773, 'synset': 'peplos.n.01', 'name': 'peplos'}, {'id': 9774, 'synset': 'peplum.n.01', 'name': 'peplum'}, {'id': 9775, 'synset': 'pepper_shaker.n.01', 'name': 'pepper_shaker'}, {'id': 9776, 'synset': 'pepper_spray.n.01', 'name': 'pepper_spray'}, {'id': 9777, 'synset': 'percale.n.01', 'name': 'percale'}, {'id': 9778, 'synset': 'percolator.n.01', 'name': 'percolator'}, {'id': 9779, 'synset': 'percussion_cap.n.01', 'name': 'percussion_cap'}, {'id': 9780, 'synset': 'percussion_instrument.n.01', 'name': 'percussion_instrument'}, {'id': 9781, 'synset': 'perforation.n.01', 'name': 'perforation'}, {'id': 9782, 'synset': 'perfumery.n.03', 'name': 'perfumery'}, {'id': 9783, 'synset': 'perfumery.n.02', 'name': 'perfumery'}, {'id': 9784, 'synset': 'perfumery.n.01', 'name': 'perfumery'}, {'id': 9785, 'synset': 'peripheral.n.01', 'name': 'peripheral'}, {'id': 9786, 'synset': 'periscope.n.01', 'name': 'periscope'}, {'id': 9787, 'synset': 'peristyle.n.01', 'name': 'peristyle'}, {'id': 9788, 'synset': 'periwig.n.01', 'name': 'periwig'}, {'id': 9789, 'synset': 'permanent_press.n.01', 'name': 'permanent_press'}, {'id': 9790, 'synset': 'perpetual_motion_machine.n.01', 'name': 'perpetual_motion_machine'}, {'id': 9791, 'synset': 'personal_computer.n.01', 'name': 'personal_computer'}, {'id': 9792, 'synset': 'personal_digital_assistant.n.01', 'name': 'personal_digital_assistant'}, {'id': 9793, 'synset': 'personnel_carrier.n.01', 'name': 'personnel_carrier'}, {'id': 9794, 'synset': 'pestle.n.03', 'name': 'pestle'}, {'id': 9795, 'synset': 'pestle.n.02', 'name': 'pestle'}, {'id': 9796, 'synset': 'petcock.n.01', 'name': 'petcock'}, {'id': 9797, 'synset': 'petri_dish.n.01', 'name': 'Petri_dish'}, {'id': 9798, 'synset': 'petrolatum_gauze.n.01', 'name': 'petrolatum_gauze'}, {'id': 9799, 'synset': 'pet_shop.n.01', 'name': 'pet_shop'}, {'id': 9800, 'synset': 'petticoat.n.01', 'name': 'petticoat'}, {'id': 9801, 'synset': 'phial.n.01', 'name': 'phial'}, {'id': 9802, 'synset': 'phillips_screw.n.01', 'name': 'Phillips_screw'}, {'id': 9803, 'synset': 'phillips_screwdriver.n.01', 'name': 'Phillips_screwdriver'}, {'id': 9804, 'synset': 'phonograph_needle.n.01', 'name': 'phonograph_needle'}, {'id': 9805, 'synset': 'photocathode.n.01', 'name': 'photocathode'}, {'id': 9806, 'synset': 'photocoagulator.n.01', 'name': 'photocoagulator'}, {'id': 9807, 'synset': 'photocopier.n.01', 'name': 'photocopier'}, {'id': 9808, 'synset': 'photographic_equipment.n.01', 'name': 'photographic_equipment'}, {'id': 9809, 'synset': 'photographic_paper.n.01', 'name': 'photographic_paper'}, {'id': 9810, 'synset': 'photometer.n.01', 'name': 'photometer'}, {'id': 9811, 'synset': 'photomicrograph.n.01', 'name': 'photomicrograph'}, {'id': 9812, 'synset': 'photostat.n.02', 'name': 'Photostat'}, {'id': 9813, 'synset': 'photostat.n.01', 'name': 'photostat'}, {'id': 9814, 'synset': 'physical_pendulum.n.01', 'name': 'physical_pendulum'}, {'id': 9815, 'synset': 'piano_action.n.01', 'name': 'piano_action'}, {'id': 9816, 'synset': 'piano_keyboard.n.01', 'name': 'piano_keyboard'}, {'id': 9817, 'synset': 'piano_wire.n.01', 'name': 'piano_wire'}, {'id': 9818, 'synset': 'piccolo.n.01', 'name': 'piccolo'}, {'id': 9819, 'synset': 'pick.n.07', 'name': 'pick'}, {'id': 9820, 'synset': 'pick.n.06', 'name': 'pick'}, {'id': 9821, 'synset': 'pick.n.05', 'name': 'pick'}, {'id': 9822, 'synset': 'pickelhaube.n.01', 'name': 'pickelhaube'}, {'id': 9823, 'synset': 'picket_boat.n.01', 'name': 'picket_boat'}, {'id': 9824, 'synset': 'picket_fence.n.01', 'name': 'picket_fence'}, {'id': 9825, 'synset': 'picket_ship.n.01', 'name': 'picket_ship'}, {'id': 9826, 'synset': 'pickle_barrel.n.01', 'name': 'pickle_barrel'}, {'id': 9827, 'synset': 'picture_frame.n.01', 'name': 'picture_frame'}, {'id': 9828, 'synset': 'picture_hat.n.01', 'name': 'picture_hat'}, {'id': 9829, 'synset': 'picture_rail.n.01', 'name': 'picture_rail'}, {'id': 9830, 'synset': 'picture_window.n.01', 'name': 'picture_window'}, {'id': 9831, 'synset': 'piece_of_cloth.n.01', 'name': 'piece_of_cloth'}, {'id': 9832, 'synset': 'pied-a-terre.n.01', 'name': 'pied-a-terre'}, {'id': 9833, 'synset': 'pier.n.03', 'name': 'pier'}, {'id': 9834, 'synset': 'pier.n.02', 'name': 'pier'}, {'id': 9835, 'synset': 'pier_arch.n.01', 'name': 'pier_arch'}, {'id': 9836, 'synset': 'pier_glass.n.01', 'name': 'pier_glass'}, {'id': 9837, 'synset': 'pier_table.n.01', 'name': 'pier_table'}, {'id': 9838, 'synset': 'pieta.n.01', 'name': 'pieta'}, {'id': 9839, 'synset': 'piezometer.n.01', 'name': 'piezometer'}, {'id': 9840, 'synset': 'pig_bed.n.01', 'name': 'pig_bed'}, {'id': 9841, 'synset': 'piggery.n.01', 'name': 'piggery'}, {'id': 9842, 'synset': 'pilaster.n.01', 'name': 'pilaster'}, {'id': 9843, 'synset': 'pile.n.06', 'name': 'pile'}, {'id': 9844, 'synset': 'pile_driver.n.01', 'name': 'pile_driver'}, {'id': 9845, 'synset': 'pill_bottle.n.01', 'name': 'pill_bottle'}, {'id': 9846, 'synset': 'pillbox.n.01', 'name': 'pillbox'}, {'id': 9847, 'synset': 'pillion.n.01', 'name': 'pillion'}, {'id': 9848, 'synset': 'pillory.n.01', 'name': 'pillory'}, {'id': 9849, 'synset': 'pillow_block.n.01', 'name': 'pillow_block'}, {'id': 9850, 'synset': 'pillow_lace.n.01', 'name': 'pillow_lace'}, {'id': 9851, 'synset': 'pillow_sham.n.01', 'name': 'pillow_sham'}, {'id': 9852, 'synset': 'pilot_bit.n.01', 'name': 'pilot_bit'}, {'id': 9853, 'synset': 'pilot_boat.n.01', 'name': 'pilot_boat'}, {'id': 9854, 'synset': 'pilot_burner.n.01', 'name': 'pilot_burner'}, {'id': 9855, 'synset': 'pilot_cloth.n.01', 'name': 'pilot_cloth'}, {'id': 9856, 'synset': 'pilot_engine.n.01', 'name': 'pilot_engine'}, {'id': 9857, 'synset': 'pilothouse.n.01', 'name': 'pilothouse'}, {'id': 9858, 'synset': 'pilot_light.n.02', 'name': 'pilot_light'}, {'id': 9859, 'synset': 'pin.n.08', 'name': 'pin'}, {'id': 9860, 'synset': 'pin.n.07', 'name': 'pin'}, {'id': 9861, 'synset': 'pinata.n.01', 'name': 'pinata'}, {'id': 9862, 'synset': 'pinball_machine.n.01', 'name': 'pinball_machine'}, {'id': 9863, 'synset': 'pince-nez.n.01', 'name': 'pince-nez'}, {'id': 9864, 'synset': 'pincer.n.01', 'name': 'pincer'}, {'id': 9865, 'synset': 'pinch_bar.n.01', 'name': 'pinch_bar'}, {'id': 9866, 'synset': 'pincurl_clip.n.01', 'name': 'pincurl_clip'}, {'id': 9867, 'synset': 'pinfold.n.01', 'name': 'pinfold'}, {'id': 9868, 'synset': 'pinhead.n.02', 'name': 'pinhead'}, {'id': 9869, 'synset': 'pinion.n.01', 'name': 'pinion'}, {'id': 9870, 'synset': 'pinnacle.n.01', 'name': 'pinnacle'}, {'id': 9871, 'synset': 'pinprick.n.02', 'name': 'pinprick'}, {'id': 9872, 'synset': 'pinstripe.n.03', 'name': 'pinstripe'}, {'id': 9873, 'synset': 'pinstripe.n.02', 'name': 'pinstripe'}, {'id': 9874, 'synset': 'pinstripe.n.01', 'name': 'pinstripe'}, {'id': 9875, 'synset': 'pintle.n.01', 'name': 'pintle'}, {'id': 9876, 'synset': 'pinwheel.n.02', 'name': 'pinwheel'}, {'id': 9877, 'synset': 'tabor_pipe.n.01', 'name': 'tabor_pipe'}, {'id': 9878, 'synset': 'pipe.n.04', 'name': 'pipe'}, {'id': 9879, 'synset': 'pipe_bomb.n.01', 'name': 'pipe_bomb'}, {'id': 9880, 'synset': 'pipe_cleaner.n.01', 'name': 'pipe_cleaner'}, {'id': 9881, 'synset': 'pipe_cutter.n.01', 'name': 'pipe_cutter'}, {'id': 9882, 'synset': 'pipefitting.n.01', 'name': 'pipefitting'}, {'id': 9883, 'synset': 'pipet.n.01', 'name': 'pipet'}, {'id': 9884, 'synset': 'pipe_vise.n.01', 'name': 'pipe_vise'}, {'id': 9885, 'synset': 'pipe_wrench.n.01', 'name': 'pipe_wrench'}, {'id': 9886, 'synset': 'pique.n.01', 'name': 'pique'}, {'id': 9887, 'synset': 'pirate.n.03', 'name': 'pirate'}, {'id': 9888, 'synset': 'piste.n.02', 'name': 'piste'}, {'id': 9889, 'synset': 'pistol_grip.n.01', 'name': 'pistol_grip'}, {'id': 9890, 'synset': 'piston.n.02', 'name': 'piston'}, {'id': 9891, 'synset': 'piston_ring.n.01', 'name': 'piston_ring'}, {'id': 9892, 'synset': 'piston_rod.n.01', 'name': 'piston_rod'}, {'id': 9893, 'synset': 'pit.n.07', 'name': 'pit'}, {'id': 9894, 'synset': 'pitching_wedge.n.01', 'name': 'pitching_wedge'}, {'id': 9895, 'synset': 'pitch_pipe.n.01', 'name': 'pitch_pipe'}, {'id': 9896, 'synset': 'pith_hat.n.01', 'name': 'pith_hat'}, {'id': 9897, 'synset': 'piton.n.01', 'name': 'piton'}, {'id': 9898, 'synset': 'pitot-static_tube.n.01', 'name': 'Pitot-static_tube'}, {'id': 9899, 'synset': 'pitot_tube.n.01', 'name': 'Pitot_tube'}, {'id': 9900, 'synset': 'pitsaw.n.01', 'name': 'pitsaw'}, {'id': 9901, 'synset': 'pivot.n.02', 'name': 'pivot'}, {'id': 9902, 'synset': 'pivoting_window.n.01', 'name': 'pivoting_window'}, {'id': 9903, 'synset': 'pizzeria.n.01', 'name': 'pizzeria'}, {'id': 9904, 'synset': 'place_of_business.n.01', 'name': 'place_of_business'}, {'id': 9905, 'synset': 'place_of_worship.n.01', 'name': 'place_of_worship'}, {'id': 9906, 'synset': 'placket.n.01', 'name': 'placket'}, {'id': 9907, 'synset': 'planchet.n.01', 'name': 'planchet'}, {'id': 9908, 'synset': 'plane.n.05', 'name': 'plane'}, {'id': 9909, 'synset': 'plane.n.04', 'name': 'plane'}, {'id': 9910, 'synset': 'plane_seat.n.01', 'name': 'plane_seat'}, {'id': 9911, 'synset': 'planetarium.n.03', 'name': 'planetarium'}, {'id': 9912, 'synset': 'planetarium.n.02', 'name': 'planetarium'}, {'id': 9913, 'synset': 'planetarium.n.01', 'name': 'planetarium'}, {'id': 9914, 'synset': 'planetary_gear.n.01', 'name': 'planetary_gear'}, {'id': 9915, 'synset': 'plank-bed.n.01', 'name': 'plank-bed'}, {'id': 9916, 'synset': 'planking.n.02', 'name': 'planking'}, {'id': 9917, 'synset': 'planner.n.02', 'name': 'planner'}, {'id': 9918, 'synset': 'plant.n.01', 'name': 'plant'}, {'id': 9919, 'synset': 'planter.n.03', 'name': 'planter'}, {'id': 9920, 'synset': 'plaster.n.05', 'name': 'plaster'}, {'id': 9921, 'synset': 'plasterboard.n.01', 'name': 'plasterboard'}, {'id': 9922, 'synset': 'plastering_trowel.n.01', 'name': 'plastering_trowel'}, {'id': 9923, 'synset': 'plastic_bag.n.01', 'name': 'plastic_bag'}, {'id': 9924, 'synset': 'plastic_bomb.n.01', 'name': 'plastic_bomb'}, {'id': 9925, 'synset': 'plastic_laminate.n.01', 'name': 'plastic_laminate'}, {'id': 9926, 'synset': 'plastic_wrap.n.01', 'name': 'plastic_wrap'}, {'id': 9927, 'synset': 'plastron.n.03', 'name': 'plastron'}, {'id': 9928, 'synset': 'plastron.n.02', 'name': 'plastron'}, {'id': 9929, 'synset': 'plastron.n.01', 'name': 'plastron'}, {'id': 9930, 'synset': 'plate.n.14', 'name': 'plate'}, {'id': 9931, 'synset': 'plate.n.13', 'name': 'plate'}, {'id': 9932, 'synset': 'plate.n.12', 'name': 'plate'}, {'id': 9933, 'synset': 'platen.n.03', 'name': 'platen'}, {'id': 9934, 'synset': 'platen.n.01', 'name': 'platen'}, {'id': 9935, 'synset': 'plate_rack.n.01', 'name': 'plate_rack'}, {'id': 9936, 'synset': 'plate_rail.n.01', 'name': 'plate_rail'}, {'id': 9937, 'synset': 'platform.n.01', 'name': 'platform'}, {'id': 9938, 'synset': 'platform.n.04', 'name': 'platform'}, {'id': 9939, 'synset': 'platform.n.03', 'name': 'platform'}, {'id': 9940, 'synset': 'platform_bed.n.01', 'name': 'platform_bed'}, {'id': 9941, 'synset': 'platform_rocker.n.01', 'name': 'platform_rocker'}, {'id': 9942, 'synset': 'plating.n.01', 'name': 'plating'}, {'id': 9943, 'synset': 'playback.n.02', 'name': 'playback'}, {'id': 9944, 'synset': 'playbox.n.01', 'name': 'playbox'}, {'id': 9945, 'synset': 'playground.n.02', 'name': 'playground'}, {'id': 9946, 'synset': 'playsuit.n.01', 'name': 'playsuit'}, {'id': 9947, 'synset': 'plaza.n.02', 'name': 'plaza'}, {'id': 9948, 'synset': 'pleat.n.01', 'name': 'pleat'}, {'id': 9949, 'synset': 'plenum.n.02', 'name': 'plenum'}, {'id': 9950, 'synset': 'plethysmograph.n.01', 'name': 'plethysmograph'}, {'id': 9951, 'synset': 'pleximeter.n.01', 'name': 'pleximeter'}, {'id': 9952, 'synset': 'plexor.n.01', 'name': 'plexor'}, {'id': 9953, 'synset': 'plimsoll.n.02', 'name': 'plimsoll'}, {'id': 9954, 'synset': 'plotter.n.04', 'name': 'plotter'}, {'id': 9955, 'synset': 'plug.n.01', 'name': 'plug'}, {'id': 9956, 'synset': 'plug.n.05', 'name': 'plug'}, {'id': 9957, 'synset': 'plug_fuse.n.01', 'name': 'plug_fuse'}, {'id': 9958, 'synset': 'plughole.n.01', 'name': 'plughole'}, {'id': 9959, 'synset': 'plumb_bob.n.01', 'name': 'plumb_bob'}, {'id': 9960, 'synset': 'plumb_level.n.01', 'name': 'plumb_level'}, {'id': 9961, 'synset': 'plunger.n.03', 'name': 'plunger'}, {'id': 9962, 'synset': 'plus_fours.n.01', 'name': 'plus_fours'}, {'id': 9963, 'synset': 'plush.n.01', 'name': 'plush'}, {'id': 9964, 'synset': 'plywood.n.01', 'name': 'plywood'}, {'id': 9965, 'synset': 'pneumatic_drill.n.01', 'name': 'pneumatic_drill'}, {'id': 9966, 'synset': 'p-n_junction.n.01', 'name': 'p-n_junction'}, {'id': 9967, 'synset': 'p-n-p_transistor.n.01', 'name': 'p-n-p_transistor'}, {'id': 9968, 'synset': 'poacher.n.02', 'name': 'poacher'}, {'id': 9969, 'synset': 'pocket.n.01', 'name': 'pocket'}, {'id': 9970, 'synset': 'pocket_battleship.n.01', 'name': 'pocket_battleship'}, {'id': 9971, 'synset': 'pocketcomb.n.01', 'name': 'pocketcomb'}, {'id': 9972, 'synset': 'pocket_flap.n.01', 'name': 'pocket_flap'}, {'id': 9973, 'synset': 'pocket-handkerchief.n.01', 'name': 'pocket-handkerchief'}, {'id': 9974, 'synset': 'pod.n.04', 'name': 'pod'}, {'id': 9975, 'synset': 'pogo_stick.n.01', 'name': 'pogo_stick'}, {'id': 9976, 'synset': 'point-and-shoot_camera.n.01', 'name': 'point-and-shoot_camera'}, {'id': 9977, 'synset': 'pointed_arch.n.01', 'name': 'pointed_arch'}, {'id': 9978, 'synset': 'pointing_trowel.n.01', 'name': 'pointing_trowel'}, {'id': 9979, 'synset': 'point_lace.n.01', 'name': 'point_lace'}, {'id': 9980, 'synset': 'polarimeter.n.01', 'name': 'polarimeter'}, {'id': 9981, 'synset': 'polaroid.n.01', 'name': 'Polaroid'}, {'id': 9982, 'synset': 'polaroid_camera.n.01', 'name': 'Polaroid_camera'}, {'id': 9983, 'synset': 'pole.n.09', 'name': 'pole'}, {'id': 9984, 'synset': 'poleax.n.02', 'name': 'poleax'}, {'id': 9985, 'synset': 'poleax.n.01', 'name': 'poleax'}, {'id': 9986, 'synset': 'police_boat.n.01', 'name': 'police_boat'}, {'id': 9987, 'synset': 'police_van.n.01', 'name': 'police_van'}, {'id': 9988, 'synset': 'polling_booth.n.01', 'name': 'polling_booth'}, {'id': 9989, 'synset': 'polo_ball.n.01', 'name': 'polo_ball'}, {'id': 9990, 'synset': 'polo_mallet.n.01', 'name': 'polo_mallet'}, {'id': 9991, 'synset': 'polonaise.n.01', 'name': 'polonaise'}, {'id': 9992, 'synset': 'polyester.n.03', 'name': 'polyester'}, {'id': 9993, 'synset': 'polygraph.n.01', 'name': 'polygraph'}, {'id': 9994, 'synset': 'pomade.n.01', 'name': 'pomade'}, {'id': 9995, 'synset': 'pommel_horse.n.01', 'name': 'pommel_horse'}, {'id': 9996, 'synset': 'pongee.n.01', 'name': 'pongee'}, {'id': 9997, 'synset': 'poniard.n.01', 'name': 'poniard'}, {'id': 9998, 'synset': 'pontifical.n.01', 'name': 'pontifical'}, {'id': 9999, 'synset': 'pontoon.n.01', 'name': 'pontoon'}, {'id': 10000, 'synset': 'pontoon_bridge.n.01', 'name': 'pontoon_bridge'}, {'id': 10001, 'synset': 'pony_cart.n.01', 'name': 'pony_cart'}, {'id': 10002, 'synset': 'pool_ball.n.01', 'name': 'pool_ball'}, {'id': 10003, 'synset': 'poolroom.n.01', 'name': 'poolroom'}, {'id': 10004, 'synset': 'poop_deck.n.01', 'name': 'poop_deck'}, {'id': 10005, 'synset': 'poor_box.n.01', 'name': 'poor_box'}, {'id': 10006, 'synset': 'poorhouse.n.01', 'name': 'poorhouse'}, {'id': 10007, 'synset': 'pop_bottle.n.01', 'name': 'pop_bottle'}, {'id': 10008, 'synset': 'popgun.n.01', 'name': 'popgun'}, {'id': 10009, 'synset': 'poplin.n.01', 'name': 'poplin'}, {'id': 10010, 'synset': 'popper.n.03', 'name': 'popper'}, {'id': 10011, 'synset': 'poppet.n.01', 'name': 'poppet'}, {'id': 10012, 'synset': 'pop_tent.n.01', 'name': 'pop_tent'}, {'id': 10013, 'synset': 'porcelain.n.01', 'name': 'porcelain'}, {'id': 10014, 'synset': 'porch.n.01', 'name': 'porch'}, {'id': 10015, 'synset': 'porkpie.n.01', 'name': 'porkpie'}, {'id': 10016, 'synset': 'porringer.n.01', 'name': 'porringer'}, {'id': 10017, 'synset': 'portable.n.01', 'name': 'portable'}, {'id': 10018, 'synset': 'portable_computer.n.01', 'name': 'portable_computer'}, {'id': 10019, 'synset': 'portable_circular_saw.n.01', 'name': 'portable_circular_saw'}, {'id': 10020, 'synset': 'portcullis.n.01', 'name': 'portcullis'}, {'id': 10021, 'synset': 'porte-cochere.n.02', 'name': 'porte-cochere'}, {'id': 10022, 'synset': 'porte-cochere.n.01', 'name': 'porte-cochere'}, {'id': 10023, 'synset': 'portfolio.n.01', 'name': 'portfolio'}, {'id': 10024, 'synset': 'porthole.n.01', 'name': 'porthole'}, {'id': 10025, 'synset': 'portico.n.01', 'name': 'portico'}, {'id': 10026, 'synset': 'portiere.n.01', 'name': 'portiere'}, {'id': 10027, 'synset': 'portmanteau.n.02', 'name': 'portmanteau'}, {'id': 10028, 'synset': 'portrait_camera.n.01', 'name': 'portrait_camera'}, {'id': 10029, 'synset': 'portrait_lens.n.01', 'name': 'portrait_lens'}, {'id': 10030, 'synset': 'positive_pole.n.02', 'name': 'positive_pole'}, {'id': 10031, 'synset': 'positive_pole.n.01', 'name': 'positive_pole'}, {'id': 10032, 'synset': 'positron_emission_tomography_scanner.n.01', 'name': 'positron_emission_tomography_scanner'}, {'id': 10033, 'synset': 'post.n.04', 'name': 'post'}, {'id': 10034, 'synset': 'postage_meter.n.01', 'name': 'postage_meter'}, {'id': 10035, 'synset': 'post_and_lintel.n.01', 'name': 'post_and_lintel'}, {'id': 10036, 'synset': 'post_chaise.n.01', 'name': 'post_chaise'}, {'id': 10037, 'synset': 'postern.n.01', 'name': 'postern'}, {'id': 10038, 'synset': 'post_exchange.n.01', 'name': 'post_exchange'}, {'id': 10039, 'synset': 'posthole_digger.n.01', 'name': 'posthole_digger'}, {'id': 10040, 'synset': 'post_horn.n.01', 'name': 'post_horn'}, {'id': 10041, 'synset': 'posthouse.n.01', 'name': 'posthouse'}, {'id': 10042, 'synset': 'potbelly.n.02', 'name': 'potbelly'}, {'id': 10043, 'synset': 'potemkin_village.n.01', 'name': 'Potemkin_village'}, {'id': 10044, 'synset': 'potential_divider.n.01', 'name': 'potential_divider'}, {'id': 10045, 'synset': 'potentiometer.n.02', 'name': 'potentiometer'}, {'id': 10046, 'synset': 'potentiometer.n.01', 'name': 'potentiometer'}, {'id': 10047, 'synset': 'potpourri.n.03', 'name': 'potpourri'}, {'id': 10048, 'synset': 'potsherd.n.01', 'name': 'potsherd'}, {'id': 10049, 'synset': "potter's_wheel.n.01", 'name': "potter's_wheel"}, {'id': 10050, 'synset': 'pottle.n.01', 'name': 'pottle'}, {'id': 10051, 'synset': 'potty_seat.n.01', 'name': 'potty_seat'}, {'id': 10052, 'synset': 'poultice.n.01', 'name': 'poultice'}, {'id': 10053, 'synset': 'pound.n.13', 'name': 'pound'}, {'id': 10054, 'synset': 'pound_net.n.01', 'name': 'pound_net'}, {'id': 10055, 'synset': 'powder.n.03', 'name': 'powder'}, {'id': 10056, 'synset': 'powder_and_shot.n.01', 'name': 'powder_and_shot'}, {'id': 10057, 'synset': 'powdered_mustard.n.01', 'name': 'powdered_mustard'}, {'id': 10058, 'synset': 'powder_horn.n.01', 'name': 'powder_horn'}, {'id': 10059, 'synset': 'powder_keg.n.02', 'name': 'powder_keg'}, {'id': 10060, 'synset': 'power_brake.n.01', 'name': 'power_brake'}, {'id': 10061, 'synset': 'power_cord.n.01', 'name': 'power_cord'}, {'id': 10062, 'synset': 'power_drill.n.01', 'name': 'power_drill'}, {'id': 10063, 'synset': 'power_line.n.01', 'name': 'power_line'}, {'id': 10064, 'synset': 'power_loom.n.01', 'name': 'power_loom'}, {'id': 10065, 'synset': 'power_mower.n.01', 'name': 'power_mower'}, {'id': 10066, 'synset': 'power_pack.n.01', 'name': 'power_pack'}, {'id': 10067, 'synset': 'power_saw.n.01', 'name': 'power_saw'}, {'id': 10068, 'synset': 'power_steering.n.01', 'name': 'power_steering'}, {'id': 10069, 'synset': 'power_takeoff.n.01', 'name': 'power_takeoff'}, {'id': 10070, 'synset': 'power_tool.n.01', 'name': 'power_tool'}, {'id': 10071, 'synset': 'praetorium.n.01', 'name': 'praetorium'}, {'id': 10072, 'synset': 'prayer_rug.n.01', 'name': 'prayer_rug'}, {'id': 10073, 'synset': 'prayer_shawl.n.01', 'name': 'prayer_shawl'}, {'id': 10074, 'synset': 'precipitator.n.01', 'name': 'precipitator'}, {'id': 10075, 'synset': 'prefab.n.01', 'name': 'prefab'}, {'id': 10076, 'synset': 'presbytery.n.01', 'name': 'presbytery'}, {'id': 10077, 'synset': 'presence_chamber.n.01', 'name': 'presence_chamber'}, {'id': 10078, 'synset': 'press.n.07', 'name': 'press'}, {'id': 10079, 'synset': 'press.n.03', 'name': 'press'}, {'id': 10080, 'synset': 'press.n.06', 'name': 'press'}, {'id': 10081, 'synset': 'press_box.n.01', 'name': 'press_box'}, {'id': 10082, 'synset': 'press_gallery.n.01', 'name': 'press_gallery'}, {'id': 10083, 'synset': 'press_of_sail.n.01', 'name': 'press_of_sail'}, {'id': 10084, 'synset': 'pressure_cabin.n.01', 'name': 'pressure_cabin'}, {'id': 10085, 'synset': 'pressure_cooker.n.01', 'name': 'pressure_cooker'}, {'id': 10086, 'synset': 'pressure_dome.n.01', 'name': 'pressure_dome'}, {'id': 10087, 'synset': 'pressure_gauge.n.01', 'name': 'pressure_gauge'}, {'id': 10088, 'synset': 'pressurized_water_reactor.n.01', 'name': 'pressurized_water_reactor'}, {'id': 10089, 'synset': 'pressure_suit.n.01', 'name': 'pressure_suit'}, {'id': 10090, 'synset': 'pricket.n.01', 'name': 'pricket'}, {'id': 10091, 'synset': 'prie-dieu.n.01', 'name': 'prie-dieu'}, {'id': 10092, 'synset': 'primary_coil.n.01', 'name': 'primary_coil'}, {'id': 10093, 'synset': 'primus_stove.n.01', 'name': 'Primus_stove'}, {'id': 10094, 'synset': 'prince_albert.n.02', 'name': 'Prince_Albert'}, {'id': 10095, 'synset': 'print.n.06', 'name': 'print'}, {'id': 10096, 'synset': 'print_buffer.n.01', 'name': 'print_buffer'}, {'id': 10097, 'synset': 'printed_circuit.n.01', 'name': 'printed_circuit'}, {'id': 10098, 'synset': 'printer.n.02', 'name': 'printer'}, {'id': 10099, 'synset': 'printer_cable.n.01', 'name': 'printer_cable'}, {'id': 10100, 'synset': 'priory.n.01', 'name': 'priory'}, {'id': 10101, 'synset': 'prison.n.01', 'name': 'prison'}, {'id': 10102, 'synset': 'prison_camp.n.01', 'name': 'prison_camp'}, {'id': 10103, 'synset': 'privateer.n.02', 'name': 'privateer'}, {'id': 10104, 'synset': 'private_line.n.01', 'name': 'private_line'}, {'id': 10105, 'synset': 'privet_hedge.n.01', 'name': 'privet_hedge'}, {'id': 10106, 'synset': 'probe.n.02', 'name': 'probe'}, {'id': 10107, 'synset': 'proctoscope.n.01', 'name': 'proctoscope'}, {'id': 10108, 'synset': 'prod.n.02', 'name': 'prod'}, {'id': 10109, 'synset': 'production_line.n.01', 'name': 'production_line'}, {'id': 10110, 'synset': 'projector.n.01', 'name': 'projector'}, {'id': 10111, 'synset': 'prolonge.n.01', 'name': 'prolonge'}, {'id': 10112, 'synset': 'prolonge_knot.n.01', 'name': 'prolonge_knot'}, {'id': 10113, 'synset': 'prompter.n.02', 'name': 'prompter'}, {'id': 10114, 'synset': 'prong.n.01', 'name': 'prong'}, {'id': 10115, 'synset': 'propeller_plane.n.01', 'name': 'propeller_plane'}, {'id': 10116, 'synset': 'propjet.n.01', 'name': 'propjet'}, {'id': 10117, 'synset': 'proportional_counter_tube.n.01', 'name': 'proportional_counter_tube'}, {'id': 10118, 'synset': 'propulsion_system.n.01', 'name': 'propulsion_system'}, {'id': 10119, 'synset': 'proscenium.n.02', 'name': 'proscenium'}, {'id': 10120, 'synset': 'proscenium_arch.n.01', 'name': 'proscenium_arch'}, {'id': 10121, 'synset': 'prosthesis.n.01', 'name': 'prosthesis'}, {'id': 10122, 'synset': 'protective_covering.n.01', 'name': 'protective_covering'}, {'id': 10123, 'synset': 'protective_garment.n.01', 'name': 'protective_garment'}, {'id': 10124, 'synset': 'proton_accelerator.n.01', 'name': 'proton_accelerator'}, {'id': 10125, 'synset': 'protractor.n.01', 'name': 'protractor'}, {'id': 10126, 'synset': 'pruner.n.02', 'name': 'pruner'}, {'id': 10127, 'synset': 'pruning_knife.n.01', 'name': 'pruning_knife'}, {'id': 10128, 'synset': 'pruning_saw.n.01', 'name': 'pruning_saw'}, {'id': 10129, 'synset': 'pruning_shears.n.01', 'name': 'pruning_shears'}, {'id': 10130, 'synset': 'psaltery.n.01', 'name': 'psaltery'}, {'id': 10131, 'synset': 'psychrometer.n.01', 'name': 'psychrometer'}, {'id': 10132, 'synset': 'pt_boat.n.01', 'name': 'PT_boat'}, {'id': 10133, 'synset': 'public_address_system.n.01', 'name': 'public_address_system'}, {'id': 10134, 'synset': 'public_house.n.01', 'name': 'public_house'}, {'id': 10135, 'synset': 'public_toilet.n.01', 'name': 'public_toilet'}, {'id': 10136, 'synset': 'public_transport.n.01', 'name': 'public_transport'}, {'id': 10137, 'synset': 'public_works.n.01', 'name': 'public_works'}, {'id': 10138, 'synset': 'puck.n.02', 'name': 'puck'}, {'id': 10139, 'synset': 'pull.n.04', 'name': 'pull'}, {'id': 10140, 'synset': 'pullback.n.01', 'name': 'pullback'}, {'id': 10141, 'synset': 'pull_chain.n.01', 'name': 'pull_chain'}, {'id': 10142, 'synset': 'pulley.n.01', 'name': 'pulley'}, {'id': 10143, 'synset': 'pull-off.n.01', 'name': 'pull-off'}, {'id': 10144, 'synset': 'pullman.n.01', 'name': 'Pullman'}, {'id': 10145, 'synset': 'pullover.n.01', 'name': 'pullover'}, {'id': 10146, 'synset': 'pull-through.n.01', 'name': 'pull-through'}, {'id': 10147, 'synset': 'pulse_counter.n.01', 'name': 'pulse_counter'}, {'id': 10148, 'synset': 'pulse_generator.n.01', 'name': 'pulse_generator'}, {'id': 10149, 'synset': 'pulse_timing_circuit.n.01', 'name': 'pulse_timing_circuit'}, {'id': 10150, 'synset': 'pump.n.01', 'name': 'pump'}, {'id': 10151, 'synset': 'pump.n.03', 'name': 'pump'}, {'id': 10152, 'synset': 'pump_action.n.01', 'name': 'pump_action'}, {'id': 10153, 'synset': 'pump_house.n.01', 'name': 'pump_house'}, {'id': 10154, 'synset': 'pump_room.n.01', 'name': 'pump_room'}, {'id': 10155, 'synset': 'pump-type_pliers.n.01', 'name': 'pump-type_pliers'}, {'id': 10156, 'synset': 'pump_well.n.01', 'name': 'pump_well'}, {'id': 10157, 'synset': 'punchboard.n.01', 'name': 'punchboard'}, {'id': 10158, 'synset': 'punch_bowl.n.01', 'name': 'punch_bowl'}, {'id': 10159, 'synset': 'punching_bag.n.02', 'name': 'punching_bag'}, {'id': 10160, 'synset': 'punch_pliers.n.01', 'name': 'punch_pliers'}, {'id': 10161, 'synset': 'punch_press.n.01', 'name': 'punch_press'}, {'id': 10162, 'synset': 'punnet.n.01', 'name': 'punnet'}, {'id': 10163, 'synset': 'punt.n.02', 'name': 'punt'}, {'id': 10164, 'synset': 'pup_tent.n.01', 'name': 'pup_tent'}, {'id': 10165, 'synset': 'purdah.n.03', 'name': 'purdah'}, {'id': 10166, 'synset': 'purifier.n.01', 'name': 'purifier'}, {'id': 10167, 'synset': 'purl.n.02', 'name': 'purl'}, {'id': 10168, 'synset': 'purse.n.03', 'name': 'purse'}, {'id': 10169, 'synset': 'push-bike.n.01', 'name': 'push-bike'}, {'id': 10170, 'synset': 'push_broom.n.01', 'name': 'push_broom'}, {'id': 10171, 'synset': 'push_button.n.01', 'name': 'push_button'}, {'id': 10172, 'synset': 'push-button_radio.n.01', 'name': 'push-button_radio'}, {'id': 10173, 'synset': 'pusher.n.04', 'name': 'pusher'}, {'id': 10174, 'synset': 'put-put.n.01', 'name': 'put-put'}, {'id': 10175, 'synset': 'puttee.n.01', 'name': 'puttee'}, {'id': 10176, 'synset': 'putter.n.02', 'name': 'putter'}, {'id': 10177, 'synset': 'putty_knife.n.01', 'name': 'putty_knife'}, {'id': 10178, 'synset': 'puzzle.n.02', 'name': 'puzzle'}, {'id': 10179, 'synset': 'pylon.n.02', 'name': 'pylon'}, {'id': 10180, 'synset': 'pylon.n.01', 'name': 'pylon'}, {'id': 10181, 'synset': 'pyramidal_tent.n.01', 'name': 'pyramidal_tent'}, {'id': 10182, 'synset': 'pyrograph.n.01', 'name': 'pyrograph'}, {'id': 10183, 'synset': 'pyrometer.n.01', 'name': 'pyrometer'}, {'id': 10184, 'synset': 'pyrometric_cone.n.01', 'name': 'pyrometric_cone'}, {'id': 10185, 'synset': 'pyrostat.n.01', 'name': 'pyrostat'}, {'id': 10186, 'synset': 'pyx.n.02', 'name': 'pyx'}, {'id': 10187, 'synset': 'pyx.n.01', 'name': 'pyx'}, {'id': 10188, 'synset': 'pyxis.n.03', 'name': 'pyxis'}, {'id': 10189, 'synset': 'quad.n.04', 'name': 'quad'}, {'id': 10190, 'synset': 'quadrant.n.04', 'name': 'quadrant'}, {'id': 10191, 'synset': 'quadraphony.n.01', 'name': 'quadraphony'}, {'id': 10192, 'synset': 'quartering.n.02', 'name': 'quartering'}, {'id': 10193, 'synset': 'quarterstaff.n.01', 'name': 'quarterstaff'}, {'id': 10194, 'synset': 'quartz_battery.n.01', 'name': 'quartz_battery'}, {'id': 10195, 'synset': 'quartz_lamp.n.01', 'name': 'quartz_lamp'}, {'id': 10196, 'synset': 'queen.n.08', 'name': 'queen'}, {'id': 10197, 'synset': 'queen.n.07', 'name': 'queen'}, {'id': 10198, 'synset': 'queen_post.n.01', 'name': 'queen_post'}, {'id': 10199, 'synset': 'quern.n.01', 'name': 'quern'}, {'id': 10200, 'synset': 'quill.n.01', 'name': 'quill'}, {'id': 10201, 'synset': 'quilted_bedspread.n.01', 'name': 'quilted_bedspread'}, {'id': 10202, 'synset': 'quilting.n.02', 'name': 'quilting'}, {'id': 10203, 'synset': 'quipu.n.01', 'name': 'quipu'}, {'id': 10204, 'synset': 'quirk_molding.n.01', 'name': 'quirk_molding'}, {'id': 10205, 'synset': 'quirt.n.01', 'name': 'quirt'}, {'id': 10206, 'synset': 'quiver.n.03', 'name': 'quiver'}, {'id': 10207, 'synset': 'quoin.n.02', 'name': 'quoin'}, {'id': 10208, 'synset': 'quoit.n.01', 'name': 'quoit'}, {'id': 10209, 'synset': 'qwerty_keyboard.n.01', 'name': 'QWERTY_keyboard'}, {'id': 10210, 'synset': 'rabbet.n.01', 'name': 'rabbet'}, {'id': 10211, 'synset': 'rabbet_joint.n.01', 'name': 'rabbet_joint'}, {'id': 10212, 'synset': 'rabbit_ears.n.01', 'name': 'rabbit_ears'}, {'id': 10213, 'synset': 'rabbit_hutch.n.01', 'name': 'rabbit_hutch'}, {'id': 10214, 'synset': 'raceabout.n.01', 'name': 'raceabout'}, {'id': 10215, 'synset': 'raceway.n.01', 'name': 'raceway'}, {'id': 10216, 'synset': 'racing_boat.n.01', 'name': 'racing_boat'}, {'id': 10217, 'synset': 'racing_gig.n.01', 'name': 'racing_gig'}, {'id': 10218, 'synset': 'racing_skiff.n.01', 'name': 'racing_skiff'}, {'id': 10219, 'synset': 'rack.n.05', 'name': 'rack'}, {'id': 10220, 'synset': 'rack.n.01', 'name': 'rack'}, {'id': 10221, 'synset': 'rack.n.04', 'name': 'rack'}, {'id': 10222, 'synset': 'rack_and_pinion.n.01', 'name': 'rack_and_pinion'}, {'id': 10223, 'synset': 'racquetball.n.01', 'name': 'racquetball'}, {'id': 10224, 'synset': 'radial.n.01', 'name': 'radial'}, {'id': 10225, 'synset': 'radial_engine.n.01', 'name': 'radial_engine'}, {'id': 10226, 'synset': 'radiation_pyrometer.n.01', 'name': 'radiation_pyrometer'}, {'id': 10227, 'synset': 'radiator.n.02', 'name': 'radiator'}, {'id': 10228, 'synset': 'radiator_cap.n.01', 'name': 'radiator_cap'}, {'id': 10229, 'synset': 'radiator_hose.n.01', 'name': 'radiator_hose'}, {'id': 10230, 'synset': 'radio.n.03', 'name': 'radio'}, {'id': 10231, 'synset': 'radio_antenna.n.01', 'name': 'radio_antenna'}, {'id': 10232, 'synset': 'radio_chassis.n.01', 'name': 'radio_chassis'}, {'id': 10233, 'synset': 'radio_compass.n.01', 'name': 'radio_compass'}, {'id': 10234, 'synset': 'radiogram.n.02', 'name': 'radiogram'}, {'id': 10235, 'synset': 'radio_interferometer.n.01', 'name': 'radio_interferometer'}, {'id': 10236, 'synset': 'radio_link.n.01', 'name': 'radio_link'}, {'id': 10237, 'synset': 'radiometer.n.01', 'name': 'radiometer'}, {'id': 10238, 'synset': 'radiomicrometer.n.01', 'name': 'radiomicrometer'}, {'id': 10239, 'synset': 'radio-phonograph.n.01', 'name': 'radio-phonograph'}, {'id': 10240, 'synset': 'radiotelegraph.n.02', 'name': 'radiotelegraph'}, {'id': 10241, 'synset': 'radiotelephone.n.02', 'name': 'radiotelephone'}, {'id': 10242, 'synset': 'radio_telescope.n.01', 'name': 'radio_telescope'}, {'id': 10243, 'synset': 'radiotherapy_equipment.n.01', 'name': 'radiotherapy_equipment'}, {'id': 10244, 'synset': 'radio_transmitter.n.01', 'name': 'radio_transmitter'}, {'id': 10245, 'synset': 'radome.n.01', 'name': 'radome'}, {'id': 10246, 'synset': 'rafter.n.01', 'name': 'rafter'}, {'id': 10247, 'synset': 'raft_foundation.n.01', 'name': 'raft_foundation'}, {'id': 10248, 'synset': 'rag.n.01', 'name': 'rag'}, {'id': 10249, 'synset': 'ragbag.n.02', 'name': 'ragbag'}, {'id': 10250, 'synset': 'raglan.n.01', 'name': 'raglan'}, {'id': 10251, 'synset': 'raglan_sleeve.n.01', 'name': 'raglan_sleeve'}, {'id': 10252, 'synset': 'rail.n.04', 'name': 'rail'}, {'id': 10253, 'synset': 'rail_fence.n.01', 'name': 'rail_fence'}, {'id': 10254, 'synset': 'railhead.n.01', 'name': 'railhead'}, {'id': 10255, 'synset': 'railing.n.01', 'name': 'railing'}, {'id': 10256, 'synset': 'railing.n.02', 'name': 'railing'}, {'id': 10257, 'synset': 'railroad_bed.n.01', 'name': 'railroad_bed'}, {'id': 10258, 'synset': 'railroad_tunnel.n.01', 'name': 'railroad_tunnel'}, {'id': 10259, 'synset': 'rain_barrel.n.01', 'name': 'rain_barrel'}, {'id': 10260, 'synset': 'rain_gauge.n.01', 'name': 'rain_gauge'}, {'id': 10261, 'synset': 'rain_stick.n.01', 'name': 'rain_stick'}, {'id': 10262, 'synset': 'rake.n.03', 'name': 'rake'}, {'id': 10263, 'synset': 'rake_handle.n.01', 'name': 'rake_handle'}, {'id': 10264, 'synset': 'ram_disk.n.01', 'name': 'RAM_disk'}, {'id': 10265, 'synset': 'ramekin.n.02', 'name': 'ramekin'}, {'id': 10266, 'synset': 'ramjet.n.01', 'name': 'ramjet'}, {'id': 10267, 'synset': 'rammer.n.01', 'name': 'rammer'}, {'id': 10268, 'synset': 'ramp.n.01', 'name': 'ramp'}, {'id': 10269, 'synset': 'rampant_arch.n.01', 'name': 'rampant_arch'}, {'id': 10270, 'synset': 'rampart.n.01', 'name': 'rampart'}, {'id': 10271, 'synset': 'ramrod.n.01', 'name': 'ramrod'}, {'id': 10272, 'synset': 'ramrod.n.03', 'name': 'ramrod'}, {'id': 10273, 'synset': 'ranch.n.01', 'name': 'ranch'}, {'id': 10274, 'synset': 'ranch_house.n.01', 'name': 'ranch_house'}, {'id': 10275, 'synset': 'random-access_memory.n.01', 'name': 'random-access_memory'}, {'id': 10276, 'synset': 'rangefinder.n.01', 'name': 'rangefinder'}, {'id': 10277, 'synset': 'range_hood.n.01', 'name': 'range_hood'}, {'id': 10278, 'synset': 'range_pole.n.01', 'name': 'range_pole'}, {'id': 10279, 'synset': 'rapier.n.01', 'name': 'rapier'}, {'id': 10280, 'synset': 'rariora.n.01', 'name': 'rariora'}, {'id': 10281, 'synset': 'rasp.n.02', 'name': 'rasp'}, {'id': 10282, 'synset': 'ratchet.n.01', 'name': 'ratchet'}, {'id': 10283, 'synset': 'ratchet_wheel.n.01', 'name': 'ratchet_wheel'}, {'id': 10284, 'synset': 'rathskeller.n.01', 'name': 'rathskeller'}, {'id': 10285, 'synset': 'ratline.n.01', 'name': 'ratline'}, {'id': 10286, 'synset': 'rat-tail_file.n.01', 'name': 'rat-tail_file'}, {'id': 10287, 'synset': 'rattan.n.03', 'name': 'rattan'}, {'id': 10288, 'synset': 'rattrap.n.03', 'name': 'rattrap'}, {'id': 10289, 'synset': 'rayon.n.01', 'name': 'rayon'}, {'id': 10290, 'synset': 'razor.n.01', 'name': 'razor'}, {'id': 10291, 'synset': 'reaction-propulsion_engine.n.01', 'name': 'reaction-propulsion_engine'}, {'id': 10292, 'synset': 'reaction_turbine.n.01', 'name': 'reaction_turbine'}, {'id': 10293, 'synset': 'reactor.n.01', 'name': 'reactor'}, {'id': 10294, 'synset': 'reading_lamp.n.01', 'name': 'reading_lamp'}, {'id': 10295, 'synset': 'reading_room.n.01', 'name': 'reading_room'}, {'id': 10296, 'synset': 'read-only_memory.n.01', 'name': 'read-only_memory'}, {'id': 10297, 'synset': 'read-only_memory_chip.n.01', 'name': 'read-only_memory_chip'}, {'id': 10298, 'synset': 'readout.n.03', 'name': 'readout'}, {'id': 10299, 'synset': 'read/write_head.n.01', 'name': 'read/write_head'}, {'id': 10300, 'synset': 'ready-to-wear.n.01', 'name': 'ready-to-wear'}, {'id': 10301, 'synset': 'real_storage.n.01', 'name': 'real_storage'}, {'id': 10302, 'synset': 'reamer.n.02', 'name': 'reamer'}, {'id': 10303, 'synset': 'reaumur_thermometer.n.01', 'name': 'Reaumur_thermometer'}, {'id': 10304, 'synset': 'rebozo.n.01', 'name': 'rebozo'}, {'id': 10305, 'synset': 'receiver.n.01', 'name': 'receiver'}, {'id': 10306, 'synset': 'receptacle.n.01', 'name': 'receptacle'}, {'id': 10307, 'synset': 'reception_desk.n.01', 'name': 'reception_desk'}, {'id': 10308, 'synset': 'reception_room.n.01', 'name': 'reception_room'}, {'id': 10309, 'synset': 'recess.n.04', 'name': 'recess'}, {'id': 10310, 'synset': 'reciprocating_engine.n.01', 'name': 'reciprocating_engine'}, {'id': 10311, 'synset': 'reconnaissance_plane.n.01', 'name': 'reconnaissance_plane'}, {'id': 10312, 'synset': 'reconnaissance_vehicle.n.01', 'name': 'reconnaissance_vehicle'}, {'id': 10313, 'synset': 'record_changer.n.01', 'name': 'record_changer'}, {'id': 10314, 'synset': 'recorder.n.01', 'name': 'recorder'}, {'id': 10315, 'synset': 'recording.n.03', 'name': 'recording'}, {'id': 10316, 'synset': 'recording_system.n.01', 'name': 'recording_system'}, {'id': 10317, 'synset': 'record_sleeve.n.01', 'name': 'record_sleeve'}, {'id': 10318, 'synset': 'recovery_room.n.01', 'name': 'recovery_room'}, {'id': 10319, 'synset': 'recreational_vehicle.n.01', 'name': 'recreational_vehicle'}, {'id': 10320, 'synset': 'recreation_room.n.01', 'name': 'recreation_room'}, {'id': 10321, 'synset': 'recycling_bin.n.01', 'name': 'recycling_bin'}, {'id': 10322, 'synset': 'recycling_plant.n.01', 'name': 'recycling_plant'}, {'id': 10323, 'synset': 'redbrick_university.n.01', 'name': 'redbrick_university'}, {'id': 10324, 'synset': 'red_carpet.n.01', 'name': 'red_carpet'}, {'id': 10325, 'synset': 'redoubt.n.02', 'name': 'redoubt'}, {'id': 10326, 'synset': 'redoubt.n.01', 'name': 'redoubt'}, {'id': 10327, 'synset': 'reduction_gear.n.01', 'name': 'reduction_gear'}, {'id': 10328, 'synset': 'reed_pipe.n.01', 'name': 'reed_pipe'}, {'id': 10329, 'synset': 'reed_stop.n.01', 'name': 'reed_stop'}, {'id': 10330, 'synset': 'reef_knot.n.01', 'name': 'reef_knot'}, {'id': 10331, 'synset': 'reel.n.03', 'name': 'reel'}, {'id': 10332, 'synset': 'reel.n.01', 'name': 'reel'}, {'id': 10333, 'synset': 'refectory.n.01', 'name': 'refectory'}, {'id': 10334, 'synset': 'refectory_table.n.01', 'name': 'refectory_table'}, {'id': 10335, 'synset': 'refinery.n.01', 'name': 'refinery'}, {'id': 10336, 'synset': 'reflecting_telescope.n.01', 'name': 'reflecting_telescope'}, {'id': 10337, 'synset': 'reflectometer.n.01', 'name': 'reflectometer'}, {'id': 10338, 'synset': 'reflex_camera.n.01', 'name': 'reflex_camera'}, {'id': 10339, 'synset': 'reflux_condenser.n.01', 'name': 'reflux_condenser'}, {'id': 10340, 'synset': 'reformatory.n.01', 'name': 'reformatory'}, {'id': 10341, 'synset': 'reformer.n.02', 'name': 'reformer'}, {'id': 10342, 'synset': 'refracting_telescope.n.01', 'name': 'refracting_telescope'}, {'id': 10343, 'synset': 'refractometer.n.01', 'name': 'refractometer'}, {'id': 10344, 'synset': 'refrigeration_system.n.01', 'name': 'refrigeration_system'}, {'id': 10345, 'synset': 'refrigerator.n.01', 'name': 'refrigerator'}, {'id': 10346, 'synset': 'refrigerator_car.n.01', 'name': 'refrigerator_car'}, {'id': 10347, 'synset': 'refuge.n.03', 'name': 'refuge'}, {'id': 10348, 'synset': 'regalia.n.01', 'name': 'regalia'}, {'id': 10349, 'synset': 'regimentals.n.01', 'name': 'regimentals'}, {'id': 10350, 'synset': 'regulator.n.01', 'name': 'regulator'}, {'id': 10351, 'synset': 'rein.n.01', 'name': 'rein'}, {'id': 10352, 'synset': 'relay.n.05', 'name': 'relay'}, {'id': 10353, 'synset': 'release.n.08', 'name': 'release'}, {'id': 10354, 'synset': 'religious_residence.n.01', 'name': 'religious_residence'}, {'id': 10355, 'synset': 'reliquary.n.01', 'name': 'reliquary'}, {'id': 10356, 'synset': 'remote_terminal.n.01', 'name': 'remote_terminal'}, {'id': 10357, 'synset': 'removable_disk.n.01', 'name': 'removable_disk'}, {'id': 10358, 'synset': 'rendering.n.05', 'name': 'rendering'}, {'id': 10359, 'synset': 'rep.n.02', 'name': 'rep'}, {'id': 10360, 'synset': 'repair_shop.n.01', 'name': 'repair_shop'}, {'id': 10361, 'synset': 'repeater.n.04', 'name': 'repeater'}, {'id': 10362, 'synset': 'repeating_firearm.n.01', 'name': 'repeating_firearm'}, {'id': 10363, 'synset': 'repository.n.03', 'name': 'repository'}, {'id': 10364, 'synset': 'reproducer.n.01', 'name': 'reproducer'}, {'id': 10365, 'synset': 'rerebrace.n.01', 'name': 'rerebrace'}, {'id': 10366, 'synset': 'rescue_equipment.n.01', 'name': 'rescue_equipment'}, {'id': 10367, 'synset': 'research_center.n.01', 'name': 'research_center'}, {'id': 10368, 'synset': 'reseau.n.02', 'name': 'reseau'}, {'id': 10369, 'synset': 'reservoir.n.03', 'name': 'reservoir'}, {'id': 10370, 'synset': 'reset.n.01', 'name': 'reset'}, {'id': 10371, 'synset': 'reset_button.n.01', 'name': 'reset_button'}, {'id': 10372, 'synset': 'residence.n.02', 'name': 'residence'}, {'id': 10373, 'synset': 'resistance_pyrometer.n.01', 'name': 'resistance_pyrometer'}, {'id': 10374, 'synset': 'resistor.n.01', 'name': 'resistor'}, {'id': 10375, 'synset': 'resonator.n.03', 'name': 'resonator'}, {'id': 10376, 'synset': 'resonator.n.01', 'name': 'resonator'}, {'id': 10377, 'synset': 'resort_hotel.n.02', 'name': 'resort_hotel'}, {'id': 10378, 'synset': 'respirator.n.01', 'name': 'respirator'}, {'id': 10379, 'synset': 'restaurant.n.01', 'name': 'restaurant'}, {'id': 10380, 'synset': 'rest_house.n.01', 'name': 'rest_house'}, {'id': 10381, 'synset': 'restraint.n.06', 'name': 'restraint'}, {'id': 10382, 'synset': 'resuscitator.n.01', 'name': 'resuscitator'}, {'id': 10383, 'synset': 'retainer.n.03', 'name': 'retainer'}, {'id': 10384, 'synset': 'retaining_wall.n.01', 'name': 'retaining_wall'}, {'id': 10385, 'synset': 'reticle.n.01', 'name': 'reticle'}, {'id': 10386, 'synset': 'reticulation.n.02', 'name': 'reticulation'}, {'id': 10387, 'synset': 'reticule.n.01', 'name': 'reticule'}, {'id': 10388, 'synset': 'retort.n.02', 'name': 'retort'}, {'id': 10389, 'synset': 'retractor.n.01', 'name': 'retractor'}, {'id': 10390, 'synset': 'return_key.n.01', 'name': 'return_key'}, {'id': 10391, 'synset': 'reverberatory_furnace.n.01', 'name': 'reverberatory_furnace'}, {'id': 10392, 'synset': 'revers.n.01', 'name': 'revers'}, {'id': 10393, 'synset': 'reverse.n.02', 'name': 'reverse'}, {'id': 10394, 'synset': 'reversible.n.01', 'name': 'reversible'}, {'id': 10395, 'synset': 'revetment.n.02', 'name': 'revetment'}, {'id': 10396, 'synset': 'revetment.n.01', 'name': 'revetment'}, {'id': 10397, 'synset': 'revolver.n.01', 'name': 'revolver'}, {'id': 10398, 'synset': 'revolving_door.n.02', 'name': 'revolving_door'}, {'id': 10399, 'synset': 'rheometer.n.01', 'name': 'rheometer'}, {'id': 10400, 'synset': 'rheostat.n.01', 'name': 'rheostat'}, {'id': 10401, 'synset': 'rhinoscope.n.01', 'name': 'rhinoscope'}, {'id': 10402, 'synset': 'rib.n.01', 'name': 'rib'}, {'id': 10403, 'synset': 'riband.n.01', 'name': 'riband'}, {'id': 10404, 'synset': 'ribbed_vault.n.01', 'name': 'ribbed_vault'}, {'id': 10405, 'synset': 'ribbing.n.01', 'name': 'ribbing'}, {'id': 10406, 'synset': 'ribbon_development.n.01', 'name': 'ribbon_development'}, {'id': 10407, 'synset': 'rib_joint_pliers.n.01', 'name': 'rib_joint_pliers'}, {'id': 10408, 'synset': 'ricer.n.01', 'name': 'ricer'}, {'id': 10409, 'synset': 'riddle.n.02', 'name': 'riddle'}, {'id': 10410, 'synset': 'ride.n.02', 'name': 'ride'}, {'id': 10411, 'synset': 'ridge.n.06', 'name': 'ridge'}, {'id': 10412, 'synset': 'ridge_rope.n.01', 'name': 'ridge_rope'}, {'id': 10413, 'synset': 'riding_boot.n.01', 'name': 'riding_boot'}, {'id': 10414, 'synset': 'riding_crop.n.01', 'name': 'riding_crop'}, {'id': 10415, 'synset': 'riding_mower.n.01', 'name': 'riding_mower'}, {'id': 10416, 'synset': 'rifle_ball.n.01', 'name': 'rifle_ball'}, {'id': 10417, 'synset': 'rifle_grenade.n.01', 'name': 'rifle_grenade'}, {'id': 10418, 'synset': 'rig.n.01', 'name': 'rig'}, {'id': 10419, 'synset': 'rigger.n.02', 'name': 'rigger'}, {'id': 10420, 'synset': 'rigger.n.04', 'name': 'rigger'}, {'id': 10421, 'synset': 'rigging.n.01', 'name': 'rigging'}, {'id': 10422, 'synset': 'rigout.n.01', 'name': 'rigout'}, {'id': 10423, 'synset': 'ringlet.n.03', 'name': 'ringlet'}, {'id': 10424, 'synset': 'rings.n.01', 'name': 'rings'}, {'id': 10425, 'synset': 'rink.n.01', 'name': 'rink'}, {'id': 10426, 'synset': 'riot_gun.n.01', 'name': 'riot_gun'}, {'id': 10427, 'synset': 'ripcord.n.02', 'name': 'ripcord'}, {'id': 10428, 'synset': 'ripcord.n.01', 'name': 'ripcord'}, {'id': 10429, 'synset': 'ripping_bar.n.01', 'name': 'ripping_bar'}, {'id': 10430, 'synset': 'ripping_chisel.n.01', 'name': 'ripping_chisel'}, {'id': 10431, 'synset': 'ripsaw.n.01', 'name': 'ripsaw'}, {'id': 10432, 'synset': 'riser.n.03', 'name': 'riser'}, {'id': 10433, 'synset': 'riser.n.02', 'name': 'riser'}, {'id': 10434, 'synset': 'ritz.n.03', 'name': 'Ritz'}, {'id': 10435, 'synset': 'rivet.n.02', 'name': 'rivet'}, {'id': 10436, 'synset': 'riveting_machine.n.01', 'name': 'riveting_machine'}, {'id': 10437, 'synset': 'roach_clip.n.01', 'name': 'roach_clip'}, {'id': 10438, 'synset': 'road.n.01', 'name': 'road'}, {'id': 10439, 'synset': 'roadbed.n.01', 'name': 'roadbed'}, {'id': 10440, 'synset': 'roadblock.n.02', 'name': 'roadblock'}, {'id': 10441, 'synset': 'roadhouse.n.01', 'name': 'roadhouse'}, {'id': 10442, 'synset': 'roadster.n.01', 'name': 'roadster'}, {'id': 10443, 'synset': 'roadway.n.01', 'name': 'roadway'}, {'id': 10444, 'synset': 'roaster.n.04', 'name': 'roaster'}, {'id': 10445, 'synset': 'robotics_equipment.n.01', 'name': 'robotics_equipment'}, {'id': 10446, 'synset': 'rochon_prism.n.01', 'name': 'Rochon_prism'}, {'id': 10447, 'synset': 'rock_bit.n.01', 'name': 'rock_bit'}, {'id': 10448, 'synset': 'rocker.n.07', 'name': 'rocker'}, {'id': 10449, 'synset': 'rocker.n.05', 'name': 'rocker'}, {'id': 10450, 'synset': 'rocker_arm.n.01', 'name': 'rocker_arm'}, {'id': 10451, 'synset': 'rocket.n.02', 'name': 'rocket'}, {'id': 10452, 'synset': 'rocket.n.01', 'name': 'rocket'}, {'id': 10453, 'synset': 'rod.n.01', 'name': 'rod'}, {'id': 10454, 'synset': 'rodeo.n.02', 'name': 'rodeo'}, {'id': 10455, 'synset': 'roll.n.04', 'name': 'roll'}, {'id': 10456, 'synset': 'roller.n.04', 'name': 'roller'}, {'id': 10457, 'synset': 'roller.n.03', 'name': 'roller'}, {'id': 10458, 'synset': 'roller_bandage.n.01', 'name': 'roller_bandage'}, {'id': 10459, 'synset': 'in-line_skate.n.01', 'name': 'in-line_skate'}, {'id': 10460, 'synset': 'roller_blind.n.01', 'name': 'roller_blind'}, {'id': 10461, 'synset': 'roller_coaster.n.02', 'name': 'roller_coaster'}, {'id': 10462, 'synset': 'roller_towel.n.01', 'name': 'roller_towel'}, {'id': 10463, 'synset': 'roll_film.n.01', 'name': 'roll_film'}, {'id': 10464, 'synset': 'rolling_hitch.n.01', 'name': 'rolling_hitch'}, {'id': 10465, 'synset': 'rolling_mill.n.01', 'name': 'rolling_mill'}, {'id': 10466, 'synset': 'rolling_stock.n.01', 'name': 'rolling_stock'}, {'id': 10467, 'synset': 'roll-on.n.02', 'name': 'roll-on'}, {'id': 10468, 'synset': 'roll-on.n.01', 'name': 'roll-on'}, {'id': 10469, 'synset': 'roll-on_roll-off.n.01', 'name': 'roll-on_roll-off'}, {'id': 10470, 'synset': 'rolodex.n.01', 'name': 'Rolodex'}, {'id': 10471, 'synset': 'roman_arch.n.01', 'name': 'Roman_arch'}, {'id': 10472, 'synset': 'roman_building.n.01', 'name': 'Roman_building'}, {'id': 10473, 'synset': 'romper.n.02', 'name': 'romper'}, {'id': 10474, 'synset': 'rood_screen.n.01', 'name': 'rood_screen'}, {'id': 10475, 'synset': 'roof.n.01', 'name': 'roof'}, {'id': 10476, 'synset': 'roof.n.02', 'name': 'roof'}, {'id': 10477, 'synset': 'roofing.n.01', 'name': 'roofing'}, {'id': 10478, 'synset': 'room.n.01', 'name': 'room'}, {'id': 10479, 'synset': 'roomette.n.01', 'name': 'roomette'}, {'id': 10480, 'synset': 'room_light.n.01', 'name': 'room_light'}, {'id': 10481, 'synset': 'roost.n.01', 'name': 'roost'}, {'id': 10482, 'synset': 'rope.n.01', 'name': 'rope'}, {'id': 10483, 'synset': 'rope_bridge.n.01', 'name': 'rope_bridge'}, {'id': 10484, 'synset': 'rope_tow.n.01', 'name': 'rope_tow'}, {'id': 10485, 'synset': 'rose_water.n.01', 'name': 'rose_water'}, {'id': 10486, 'synset': 'rose_window.n.01', 'name': 'rose_window'}, {'id': 10487, 'synset': 'rosin_bag.n.01', 'name': 'rosin_bag'}, {'id': 10488, 'synset': 'rotary_actuator.n.01', 'name': 'rotary_actuator'}, {'id': 10489, 'synset': 'rotary_engine.n.01', 'name': 'rotary_engine'}, {'id': 10490, 'synset': 'rotary_press.n.01', 'name': 'rotary_press'}, {'id': 10491, 'synset': 'rotating_mechanism.n.01', 'name': 'rotating_mechanism'}, {'id': 10492, 'synset': 'rotating_shaft.n.01', 'name': 'rotating_shaft'}, {'id': 10493, 'synset': 'rotisserie.n.02', 'name': 'rotisserie'}, {'id': 10494, 'synset': 'rotisserie.n.01', 'name': 'rotisserie'}, {'id': 10495, 'synset': 'rotor.n.03', 'name': 'rotor'}, {'id': 10496, 'synset': 'rotor.n.01', 'name': 'rotor'}, {'id': 10497, 'synset': 'rotor.n.02', 'name': 'rotor'}, {'id': 10498, 'synset': 'rotor_blade.n.01', 'name': 'rotor_blade'}, {'id': 10499, 'synset': 'rotor_head.n.01', 'name': 'rotor_head'}, {'id': 10500, 'synset': 'rotunda.n.02', 'name': 'rotunda'}, {'id': 10501, 'synset': 'rotunda.n.01', 'name': 'rotunda'}, {'id': 10502, 'synset': 'rouge.n.01', 'name': 'rouge'}, {'id': 10503, 'synset': 'roughcast.n.02', 'name': 'roughcast'}, {'id': 10504, 'synset': 'rouleau.n.02', 'name': 'rouleau'}, {'id': 10505, 'synset': 'roulette.n.02', 'name': 'roulette'}, {'id': 10506, 'synset': 'roulette_ball.n.01', 'name': 'roulette_ball'}, {'id': 10507, 'synset': 'roulette_wheel.n.01', 'name': 'roulette_wheel'}, {'id': 10508, 'synset': 'round.n.01', 'name': 'round'}, {'id': 10509, 'synset': 'round_arch.n.01', 'name': 'round_arch'}, {'id': 10510, 'synset': 'round-bottom_flask.n.01', 'name': 'round-bottom_flask'}, {'id': 10511, 'synset': 'roundel.n.02', 'name': 'roundel'}, {'id': 10512, 'synset': 'round_file.n.01', 'name': 'round_file'}, {'id': 10513, 'synset': 'roundhouse.n.01', 'name': 'roundhouse'}, {'id': 10514, 'synset': 'router.n.03', 'name': 'router'}, {'id': 10515, 'synset': 'router_plane.n.01', 'name': 'router_plane'}, {'id': 10516, 'synset': 'rowel.n.01', 'name': 'rowel'}, {'id': 10517, 'synset': 'row_house.n.01', 'name': 'row_house'}, {'id': 10518, 'synset': 'rowing_boat.n.01', 'name': 'rowing_boat'}, {'id': 10519, 'synset': 'rowlock_arch.n.01', 'name': 'rowlock_arch'}, {'id': 10520, 'synset': 'royal.n.01', 'name': 'royal'}, {'id': 10521, 'synset': 'royal_mast.n.01', 'name': 'royal_mast'}, {'id': 10522, 'synset': 'rubber_boot.n.01', 'name': 'rubber_boot'}, {'id': 10523, 'synset': 'rubber_bullet.n.01', 'name': 'rubber_bullet'}, {'id': 10524, 'synset': 'rubber_eraser.n.01', 'name': 'rubber_eraser'}, {'id': 10525, 'synset': 'rudder.n.02', 'name': 'rudder'}, {'id': 10526, 'synset': 'rudder.n.01', 'name': 'rudder'}, {'id': 10527, 'synset': 'rudder_blade.n.01', 'name': 'rudder_blade'}, {'id': 10528, 'synset': 'rug.n.01', 'name': 'rug'}, {'id': 10529, 'synset': 'rugby_ball.n.01', 'name': 'rugby_ball'}, {'id': 10530, 'synset': 'ruin.n.02', 'name': 'ruin'}, {'id': 10531, 'synset': 'rule.n.12', 'name': 'rule'}, {'id': 10532, 'synset': 'rumble.n.02', 'name': 'rumble'}, {'id': 10533, 'synset': 'rumble_seat.n.01', 'name': 'rumble_seat'}, {'id': 10534, 'synset': 'rummer.n.01', 'name': 'rummer'}, {'id': 10535, 'synset': 'rumpus_room.n.01', 'name': 'rumpus_room'}, {'id': 10536, 'synset': 'runcible_spoon.n.01', 'name': 'runcible_spoon'}, {'id': 10537, 'synset': 'rundle.n.01', 'name': 'rundle'}, {'id': 10538, 'synset': 'running_shoe.n.01', 'name': 'running_shoe'}, {'id': 10539, 'synset': 'running_suit.n.01', 'name': 'running_suit'}, {'id': 10540, 'synset': 'runway.n.04', 'name': 'runway'}, {'id': 10541, 'synset': 'rushlight.n.01', 'name': 'rushlight'}, {'id': 10542, 'synset': 'russet.n.01', 'name': 'russet'}, {'id': 10543, 'synset': 'rya.n.01', 'name': 'rya'}, {'id': 10544, 'synset': 'saber.n.01', 'name': 'saber'}, {'id': 10545, 'synset': 'saber_saw.n.01', 'name': 'saber_saw'}, {'id': 10546, 'synset': 'sable.n.04', 'name': 'sable'}, {'id': 10547, 'synset': 'sable.n.01', 'name': 'sable'}, {'id': 10548, 'synset': 'sable_coat.n.01', 'name': 'sable_coat'}, {'id': 10549, 'synset': 'sabot.n.01', 'name': 'sabot'}, {'id': 10550, 'synset': 'sachet.n.01', 'name': 'sachet'}, {'id': 10551, 'synset': 'sack.n.05', 'name': 'sack'}, {'id': 10552, 'synset': 'sackbut.n.01', 'name': 'sackbut'}, {'id': 10553, 'synset': 'sackcloth.n.02', 'name': 'sackcloth'}, {'id': 10554, 'synset': 'sackcloth.n.01', 'name': 'sackcloth'}, {'id': 10555, 'synset': 'sack_coat.n.01', 'name': 'sack_coat'}, {'id': 10556, 'synset': 'sacking.n.01', 'name': 'sacking'}, {'id': 10557, 'synset': 'saddle_oxford.n.01', 'name': 'saddle_oxford'}, {'id': 10558, 'synset': 'saddlery.n.02', 'name': 'saddlery'}, {'id': 10559, 'synset': 'saddle_seat.n.01', 'name': 'saddle_seat'}, {'id': 10560, 'synset': 'saddle_stitch.n.01', 'name': 'saddle_stitch'}, {'id': 10561, 'synset': 'safe.n.01', 'name': 'safe'}, {'id': 10562, 'synset': 'safe.n.02', 'name': 'safe'}, {'id': 10563, 'synset': 'safe-deposit.n.01', 'name': 'safe-deposit'}, {'id': 10564, 'synset': 'safe_house.n.01', 'name': 'safe_house'}, {'id': 10565, 'synset': 'safety_arch.n.01', 'name': 'safety_arch'}, {'id': 10566, 'synset': 'safety_belt.n.01', 'name': 'safety_belt'}, {'id': 10567, 'synset': 'safety_bicycle.n.01', 'name': 'safety_bicycle'}, {'id': 10568, 'synset': 'safety_bolt.n.01', 'name': 'safety_bolt'}, {'id': 10569, 'synset': 'safety_curtain.n.01', 'name': 'safety_curtain'}, {'id': 10570, 'synset': 'safety_fuse.n.01', 'name': 'safety_fuse'}, {'id': 10571, 'synset': 'safety_lamp.n.01', 'name': 'safety_lamp'}, {'id': 10572, 'synset': 'safety_match.n.01', 'name': 'safety_match'}, {'id': 10573, 'synset': 'safety_net.n.02', 'name': 'safety_net'}, {'id': 10574, 'synset': 'safety_rail.n.01', 'name': 'safety_rail'}, {'id': 10575, 'synset': 'safety_razor.n.01', 'name': 'safety_razor'}, {'id': 10576, 'synset': 'safety_valve.n.01', 'name': 'safety_valve'}, {'id': 10577, 'synset': 'sail.n.03', 'name': 'sail'}, {'id': 10578, 'synset': 'sailboat.n.01', 'name': 'sailboat'}, {'id': 10579, 'synset': 'sailcloth.n.01', 'name': 'sailcloth'}, {'id': 10580, 'synset': 'sailing_vessel.n.01', 'name': 'sailing_vessel'}, {'id': 10581, 'synset': 'sailing_warship.n.01', 'name': 'sailing_warship'}, {'id': 10582, 'synset': 'sailor_cap.n.01', 'name': 'sailor_cap'}, {'id': 10583, 'synset': 'sailor_suit.n.01', 'name': 'sailor_suit'}, {'id': 10584, 'synset': 'salad_bar.n.01', 'name': 'salad_bar'}, {'id': 10585, 'synset': 'salad_bowl.n.02', 'name': 'salad_bowl'}, {'id': 10586, 'synset': 'salinometer.n.01', 'name': 'salinometer'}, {'id': 10587, 'synset': 'sallet.n.01', 'name': 'sallet'}, {'id': 10588, 'synset': 'salon.n.03', 'name': 'salon'}, {'id': 10589, 'synset': 'salon.n.01', 'name': 'salon'}, {'id': 10590, 'synset': 'salon.n.02', 'name': 'salon'}, {'id': 10591, 'synset': 'saltbox.n.01', 'name': 'saltbox'}, {'id': 10592, 'synset': 'saltcellar.n.01', 'name': 'saltcellar'}, {'id': 10593, 'synset': 'saltworks.n.01', 'name': 'saltworks'}, {'id': 10594, 'synset': 'salver.n.01', 'name': 'salver'}, {'id': 10595, 'synset': 'salwar.n.01', 'name': 'salwar'}, {'id': 10596, 'synset': 'sam_browne_belt.n.01', 'name': 'Sam_Browne_belt'}, {'id': 10597, 'synset': 'samisen.n.01', 'name': 'samisen'}, {'id': 10598, 'synset': 'samite.n.01', 'name': 'samite'}, {'id': 10599, 'synset': 'samovar.n.01', 'name': 'samovar'}, {'id': 10600, 'synset': 'sampan.n.01', 'name': 'sampan'}, {'id': 10601, 'synset': 'sandbag.n.01', 'name': 'sandbag'}, {'id': 10602, 'synset': 'sandblaster.n.01', 'name': 'sandblaster'}, {'id': 10603, 'synset': 'sandbox.n.01', 'name': 'sandbox'}, {'id': 10604, 'synset': 'sandglass.n.01', 'name': 'sandglass'}, {'id': 10605, 'synset': 'sand_wedge.n.01', 'name': 'sand_wedge'}, {'id': 10606, 'synset': 'sandwich_board.n.01', 'name': 'sandwich_board'}, {'id': 10607, 'synset': 'sanitary_napkin.n.01', 'name': 'sanitary_napkin'}, {'id': 10608, 'synset': 'cling_film.n.01', 'name': 'cling_film'}, {'id': 10609, 'synset': 'sarcenet.n.01', 'name': 'sarcenet'}, {'id': 10610, 'synset': 'sarcophagus.n.01', 'name': 'sarcophagus'}, {'id': 10611, 'synset': 'sari.n.01', 'name': 'sari'}, {'id': 10612, 'synset': 'sarong.n.01', 'name': 'sarong'}, {'id': 10613, 'synset': 'sash.n.01', 'name': 'sash'}, {'id': 10614, 'synset': 'sash_fastener.n.01', 'name': 'sash_fastener'}, {'id': 10615, 'synset': 'sash_window.n.01', 'name': 'sash_window'}, {'id': 10616, 'synset': 'sateen.n.01', 'name': 'sateen'}, {'id': 10617, 'synset': 'satellite.n.01', 'name': 'satellite'}, {'id': 10618, 'synset': 'satellite_receiver.n.01', 'name': 'satellite_receiver'}, {'id': 10619, 'synset': 'satellite_television.n.01', 'name': 'satellite_television'}, {'id': 10620, 'synset': 'satellite_transmitter.n.01', 'name': 'satellite_transmitter'}, {'id': 10621, 'synset': 'satin.n.01', 'name': 'satin'}, {'id': 10622, 'synset': 'saturday_night_special.n.01', 'name': 'Saturday_night_special'}, {'id': 10623, 'synset': 'saucepot.n.01', 'name': 'saucepot'}, {'id': 10624, 'synset': 'sauna.n.01', 'name': 'sauna'}, {'id': 10625, 'synset': 'savings_bank.n.02', 'name': 'savings_bank'}, {'id': 10626, 'synset': 'saw.n.02', 'name': 'saw'}, {'id': 10627, 'synset': 'sawed-off_shotgun.n.01', 'name': 'sawed-off_shotgun'}, {'id': 10628, 'synset': 'sawmill.n.01', 'name': 'sawmill'}, {'id': 10629, 'synset': 'saw_set.n.01', 'name': 'saw_set'}, {'id': 10630, 'synset': 'saxhorn.n.01', 'name': 'saxhorn'}, {'id': 10631, 'synset': 'scabbard.n.01', 'name': 'scabbard'}, {'id': 10632, 'synset': 'scaffolding.n.01', 'name': 'scaffolding'}, {'id': 10633, 'synset': 'scale.n.08', 'name': 'scale'}, {'id': 10634, 'synset': 'scaler.n.01', 'name': 'scaler'}, {'id': 10635, 'synset': 'scaling_ladder.n.01', 'name': 'scaling_ladder'}, {'id': 10636, 'synset': 'scalpel.n.01', 'name': 'scalpel'}, {'id': 10637, 'synset': 'scanner.n.04', 'name': 'scanner'}, {'id': 10638, 'synset': 'scanner.n.03', 'name': 'scanner'}, {'id': 10639, 'synset': 'scanner.n.02', 'name': 'scanner'}, {'id': 10640, 'synset': 'scantling.n.01', 'name': 'scantling'}, {'id': 10641, 'synset': 'scarf_joint.n.01', 'name': 'scarf_joint'}, {'id': 10642, 'synset': 'scatter_rug.n.01', 'name': 'scatter_rug'}, {'id': 10643, 'synset': 'scauper.n.01', 'name': 'scauper'}, {'id': 10644, 'synset': 'schmidt_telescope.n.01', 'name': 'Schmidt_telescope'}, {'id': 10645, 'synset': 'school.n.02', 'name': 'school'}, {'id': 10646, 'synset': 'schoolbag.n.01', 'name': 'schoolbag'}, {'id': 10647, 'synset': 'school_bell.n.01', 'name': 'school_bell'}, {'id': 10648, 'synset': 'school_ship.n.01', 'name': 'school_ship'}, {'id': 10649, 'synset': 'school_system.n.01', 'name': 'school_system'}, {'id': 10650, 'synset': 'schooner.n.02', 'name': 'schooner'}, {'id': 10651, 'synset': 'schooner.n.01', 'name': 'schooner'}, {'id': 10652, 'synset': 'scientific_instrument.n.01', 'name': 'scientific_instrument'}, {'id': 10653, 'synset': 'scimitar.n.01', 'name': 'scimitar'}, {'id': 10654, 'synset': 'scintillation_counter.n.01', 'name': 'scintillation_counter'}, {'id': 10655, 'synset': 'sclerometer.n.01', 'name': 'sclerometer'}, {'id': 10656, 'synset': 'scoinson_arch.n.01', 'name': 'scoinson_arch'}, {'id': 10657, 'synset': 'sconce.n.04', 'name': 'sconce'}, {'id': 10658, 'synset': 'sconce.n.03', 'name': 'sconce'}, {'id': 10659, 'synset': 'scoop.n.06', 'name': 'scoop'}, {'id': 10660, 'synset': 'scooter.n.02', 'name': 'scooter'}, {'id': 10661, 'synset': 'scouring_pad.n.01', 'name': 'scouring_pad'}, {'id': 10662, 'synset': 'scow.n.02', 'name': 'scow'}, {'id': 10663, 'synset': 'scow.n.01', 'name': 'scow'}, {'id': 10664, 'synset': 'scratcher.n.03', 'name': 'scratcher'}, {'id': 10665, 'synset': 'screen.n.05', 'name': 'screen'}, {'id': 10666, 'synset': 'screen.n.04', 'name': 'screen'}, {'id': 10667, 'synset': 'screen.n.09', 'name': 'screen'}, {'id': 10668, 'synset': 'screen.n.03', 'name': 'screen'}, {'id': 10669, 'synset': 'screen_door.n.01', 'name': 'screen_door'}, {'id': 10670, 'synset': 'screening.n.02', 'name': 'screening'}, {'id': 10671, 'synset': 'screw.n.04', 'name': 'screw'}, {'id': 10672, 'synset': 'screw.n.03', 'name': 'screw'}, {'id': 10673, 'synset': 'screw.n.02', 'name': 'screw'}, {'id': 10674, 'synset': 'screw_eye.n.01', 'name': 'screw_eye'}, {'id': 10675, 'synset': 'screw_key.n.01', 'name': 'screw_key'}, {'id': 10676, 'synset': 'screw_thread.n.01', 'name': 'screw_thread'}, {'id': 10677, 'synset': 'screwtop.n.01', 'name': 'screwtop'}, {'id': 10678, 'synset': 'screw_wrench.n.01', 'name': 'screw_wrench'}, {'id': 10679, 'synset': 'scriber.n.01', 'name': 'scriber'}, {'id': 10680, 'synset': 'scrim.n.01', 'name': 'scrim'}, {'id': 10681, 'synset': 'scrimshaw.n.01', 'name': 'scrimshaw'}, {'id': 10682, 'synset': 'scriptorium.n.01', 'name': 'scriptorium'}, {'id': 10683, 'synset': 'scrubber.n.03', 'name': 'scrubber'}, {'id': 10684, 'synset': 'scrub_plane.n.01', 'name': 'scrub_plane'}, {'id': 10685, 'synset': 'scuffer.n.01', 'name': 'scuffer'}, {'id': 10686, 'synset': 'scuffle.n.02', 'name': 'scuffle'}, {'id': 10687, 'synset': 'scull.n.02', 'name': 'scull'}, {'id': 10688, 'synset': 'scull.n.01', 'name': 'scull'}, {'id': 10689, 'synset': 'scullery.n.01', 'name': 'scullery'}, {'id': 10690, 'synset': 'scuttle.n.01', 'name': 'scuttle'}, {'id': 10691, 'synset': 'scyphus.n.01', 'name': 'scyphus'}, {'id': 10692, 'synset': 'scythe.n.01', 'name': 'scythe'}, {'id': 10693, 'synset': 'seabag.n.01', 'name': 'seabag'}, {'id': 10694, 'synset': 'sea_boat.n.01', 'name': 'sea_boat'}, {'id': 10695, 'synset': 'sea_chest.n.01', 'name': 'sea_chest'}, {'id': 10696, 'synset': 'sealing_wax.n.01', 'name': 'sealing_wax'}, {'id': 10697, 'synset': 'sealskin.n.02', 'name': 'sealskin'}, {'id': 10698, 'synset': 'seam.n.01', 'name': 'seam'}, {'id': 10699, 'synset': 'searchlight.n.01', 'name': 'searchlight'}, {'id': 10700, 'synset': 'searing_iron.n.01', 'name': 'searing_iron'}, {'id': 10701, 'synset': 'seat.n.04', 'name': 'seat'}, {'id': 10702, 'synset': 'seat.n.03', 'name': 'seat'}, {'id': 10703, 'synset': 'seat.n.09', 'name': 'seat'}, {'id': 10704, 'synset': 'seat_belt.n.01', 'name': 'seat_belt'}, {'id': 10705, 'synset': 'secateurs.n.01', 'name': 'secateurs'}, {'id': 10706, 'synset': 'secondary_coil.n.01', 'name': 'secondary_coil'}, {'id': 10707, 'synset': 'second_balcony.n.01', 'name': 'second_balcony'}, {'id': 10708, 'synset': 'second_base.n.01', 'name': 'second_base'}, {'id': 10709, 'synset': 'second_hand.n.02', 'name': 'second_hand'}, {'id': 10710, 'synset': 'secretary.n.04', 'name': 'secretary'}, {'id': 10711, 'synset': 'sectional.n.01', 'name': 'sectional'}, {'id': 10712, 'synset': 'security_blanket.n.02', 'name': 'security_blanket'}, {'id': 10713, 'synset': 'security_system.n.02', 'name': 'security_system'}, {'id': 10714, 'synset': 'security_system.n.01', 'name': 'security_system'}, {'id': 10715, 'synset': 'sedan.n.01', 'name': 'sedan'}, {'id': 10716, 'synset': 'sedan.n.02', 'name': 'sedan'}, {'id': 10717, 'synset': 'seeder.n.02', 'name': 'seeder'}, {'id': 10718, 'synset': 'seeker.n.02', 'name': 'seeker'}, {'id': 10719, 'synset': 'seersucker.n.01', 'name': 'seersucker'}, {'id': 10720, 'synset': 'segmental_arch.n.01', 'name': 'segmental_arch'}, {'id': 10721, 'synset': 'segway.n.01', 'name': 'Segway'}, {'id': 10722, 'synset': 'seidel.n.01', 'name': 'seidel'}, {'id': 10723, 'synset': 'seine.n.02', 'name': 'seine'}, {'id': 10724, 'synset': 'seismograph.n.01', 'name': 'seismograph'}, {'id': 10725, 'synset': 'selector.n.02', 'name': 'selector'}, {'id': 10726, 'synset': 'selenium_cell.n.01', 'name': 'selenium_cell'}, {'id': 10727, 'synset': 'self-propelled_vehicle.n.01', 'name': 'self-propelled_vehicle'}, {'id': 10728, 'synset': 'self-registering_thermometer.n.01', 'name': 'self-registering_thermometer'}, {'id': 10729, 'synset': 'self-starter.n.02', 'name': 'self-starter'}, {'id': 10730, 'synset': 'selsyn.n.01', 'name': 'selsyn'}, {'id': 10731, 'synset': 'selvage.n.02', 'name': 'selvage'}, {'id': 10732, 'synset': 'semaphore.n.01', 'name': 'semaphore'}, {'id': 10733, 'synset': 'semiautomatic_firearm.n.01', 'name': 'semiautomatic_firearm'}, {'id': 10734, 'synset': 'semiautomatic_pistol.n.01', 'name': 'semiautomatic_pistol'}, {'id': 10735, 'synset': 'semiconductor_device.n.01', 'name': 'semiconductor_device'}, {'id': 10736, 'synset': 'semi-detached_house.n.01', 'name': 'semi-detached_house'}, {'id': 10737, 'synset': 'semigloss.n.01', 'name': 'semigloss'}, {'id': 10738, 'synset': 'semitrailer.n.01', 'name': 'semitrailer'}, {'id': 10739, 'synset': 'sennit.n.01', 'name': 'sennit'}, {'id': 10740, 'synset': 'sensitometer.n.01', 'name': 'sensitometer'}, {'id': 10741, 'synset': 'sentry_box.n.01', 'name': 'sentry_box'}, {'id': 10742, 'synset': 'separate.n.02', 'name': 'separate'}, {'id': 10743, 'synset': 'septic_tank.n.01', 'name': 'septic_tank'}, {'id': 10744, 'synset': 'sequence.n.03', 'name': 'sequence'}, {'id': 10745, 'synset': 'sequencer.n.01', 'name': 'sequencer'}, {'id': 10746, 'synset': 'serape.n.01', 'name': 'serape'}, {'id': 10747, 'synset': 'serge.n.01', 'name': 'serge'}, {'id': 10748, 'synset': 'serger.n.01', 'name': 'serger'}, {'id': 10749, 'synset': 'serial_port.n.01', 'name': 'serial_port'}, {'id': 10750, 'synset': 'serpent.n.03', 'name': 'serpent'}, {'id': 10751, 'synset': 'serration.n.03', 'name': 'serration'}, {'id': 10752, 'synset': 'server.n.04', 'name': 'server'}, {'id': 10753, 'synset': 'server.n.03', 'name': 'server'}, {'id': 10754, 'synset': 'service_club.n.02', 'name': 'service_club'}, {'id': 10755, 'synset': 'serving_cart.n.01', 'name': 'serving_cart'}, {'id': 10756, 'synset': 'serving_dish.n.01', 'name': 'serving_dish'}, {'id': 10757, 'synset': 'servo.n.01', 'name': 'servo'}, {'id': 10758, 'synset': 'set.n.13', 'name': 'set'}, {'id': 10759, 'synset': 'set_gun.n.01', 'name': 'set_gun'}, {'id': 10760, 'synset': 'setscrew.n.02', 'name': 'setscrew'}, {'id': 10761, 'synset': 'setscrew.n.01', 'name': 'setscrew'}, {'id': 10762, 'synset': 'set_square.n.01', 'name': 'set_square'}, {'id': 10763, 'synset': 'settee.n.02', 'name': 'settee'}, {'id': 10764, 'synset': 'settle.n.01', 'name': 'settle'}, {'id': 10765, 'synset': 'settlement_house.n.01', 'name': 'settlement_house'}, {'id': 10766, 'synset': 'seventy-eight.n.02', 'name': 'seventy-eight'}, {'id': 10767, 'synset': 'seven_wonders_of_the_ancient_world.n.01', 'name': 'Seven_Wonders_of_the_Ancient_World'}, {'id': 10768, 'synset': 'sewage_disposal_plant.n.01', 'name': 'sewage_disposal_plant'}, {'id': 10769, 'synset': 'sewer.n.01', 'name': 'sewer'}, {'id': 10770, 'synset': 'sewing_basket.n.01', 'name': 'sewing_basket'}, {'id': 10771, 'synset': 'sewing_kit.n.01', 'name': 'sewing_kit'}, {'id': 10772, 'synset': 'sewing_needle.n.01', 'name': 'sewing_needle'}, {'id': 10773, 'synset': 'sewing_room.n.01', 'name': 'sewing_room'}, {'id': 10774, 'synset': 'sextant.n.02', 'name': 'sextant'}, {'id': 10775, 'synset': 'sgraffito.n.01', 'name': 'sgraffito'}, {'id': 10776, 'synset': 'shackle.n.01', 'name': 'shackle'}, {'id': 10777, 'synset': 'shackle.n.02', 'name': 'shackle'}, {'id': 10778, 'synset': 'shade.n.03', 'name': 'shade'}, {'id': 10779, 'synset': 'shadow_box.n.01', 'name': 'shadow_box'}, {'id': 10780, 'synset': 'shaft.n.03', 'name': 'shaft'}, {'id': 10781, 'synset': 'shag_rug.n.01', 'name': 'shag_rug'}, {'id': 10782, 'synset': 'shank.n.04', 'name': 'shank'}, {'id': 10783, 'synset': 'shank.n.03', 'name': 'shank'}, {'id': 10784, 'synset': 'shantung.n.01', 'name': 'shantung'}, {'id': 10785, 'synset': 'shaper.n.02', 'name': 'shaper'}, {'id': 10786, 'synset': 'shaping_tool.n.01', 'name': 'shaping_tool'}, {'id': 10787, 'synset': 'sharkskin.n.01', 'name': 'sharkskin'}, {'id': 10788, 'synset': 'shaving_brush.n.01', 'name': 'shaving_brush'}, {'id': 10789, 'synset': 'shaving_foam.n.01', 'name': 'shaving_foam'}, {'id': 10790, 'synset': 'shawm.n.01', 'name': 'shawm'}, {'id': 10791, 'synset': 'sheath.n.01', 'name': 'sheath'}, {'id': 10792, 'synset': 'sheathing.n.01', 'name': 'sheathing'}, {'id': 10793, 'synset': 'shed.n.01', 'name': 'shed'}, {'id': 10794, 'synset': 'sheep_bell.n.01', 'name': 'sheep_bell'}, {'id': 10795, 'synset': 'sheepshank.n.01', 'name': 'sheepshank'}, {'id': 10796, 'synset': 'sheepskin_coat.n.01', 'name': 'sheepskin_coat'}, {'id': 10797, 'synset': 'sheepwalk.n.01', 'name': 'sheepwalk'}, {'id': 10798, 'synset': 'sheet.n.03', 'name': 'sheet'}, {'id': 10799, 'synset': 'sheet_bend.n.01', 'name': 'sheet_bend'}, {'id': 10800, 'synset': 'sheeting.n.01', 'name': 'sheeting'}, {'id': 10801, 'synset': 'sheet_pile.n.01', 'name': 'sheet_pile'}, {'id': 10802, 'synset': 'sheetrock.n.01', 'name': 'Sheetrock'}, {'id': 10803, 'synset': 'shelf.n.01', 'name': 'shelf'}, {'id': 10804, 'synset': 'shelf_bracket.n.01', 'name': 'shelf_bracket'}, {'id': 10805, 'synset': 'shell.n.01', 'name': 'shell'}, {'id': 10806, 'synset': 'shell.n.08', 'name': 'shell'}, {'id': 10807, 'synset': 'shell.n.07', 'name': 'shell'}, {'id': 10808, 'synset': 'shellac.n.02', 'name': 'shellac'}, {'id': 10809, 'synset': 'shelter.n.01', 'name': 'shelter'}, {'id': 10810, 'synset': 'shelter.n.02', 'name': 'shelter'}, {'id': 10811, 'synset': 'shelter.n.05', 'name': 'shelter'}, {'id': 10812, 'synset': 'sheltered_workshop.n.01', 'name': 'sheltered_workshop'}, {'id': 10813, 'synset': 'sheraton.n.01', 'name': 'Sheraton'}, {'id': 10814, 'synset': 'shield.n.01', 'name': 'shield'}, {'id': 10815, 'synset': 'shielding.n.03', 'name': 'shielding'}, {'id': 10816, 'synset': 'shift_key.n.01', 'name': 'shift_key'}, {'id': 10817, 'synset': 'shillelagh.n.01', 'name': 'shillelagh'}, {'id': 10818, 'synset': 'shim.n.01', 'name': 'shim'}, {'id': 10819, 'synset': 'shingle.n.03', 'name': 'shingle'}, {'id': 10820, 'synset': 'shin_guard.n.01', 'name': 'shin_guard'}, {'id': 10821, 'synset': 'ship.n.01', 'name': 'ship'}, {'id': 10822, 'synset': 'shipboard_system.n.01', 'name': 'shipboard_system'}, {'id': 10823, 'synset': 'shipping.n.02', 'name': 'shipping'}, {'id': 10824, 'synset': 'shipping_room.n.01', 'name': 'shipping_room'}, {'id': 10825, 'synset': 'ship-towed_long-range_acoustic_detection_system.n.01', 'name': 'ship-towed_long-range_acoustic_detection_system'}, {'id': 10826, 'synset': 'shipwreck.n.01', 'name': 'shipwreck'}, {'id': 10827, 'synset': 'shirt_button.n.01', 'name': 'shirt_button'}, {'id': 10828, 'synset': 'shirtdress.n.01', 'name': 'shirtdress'}, {'id': 10829, 'synset': 'shirtfront.n.01', 'name': 'shirtfront'}, {'id': 10830, 'synset': 'shirting.n.01', 'name': 'shirting'}, {'id': 10831, 'synset': 'shirtsleeve.n.01', 'name': 'shirtsleeve'}, {'id': 10832, 'synset': 'shirttail.n.02', 'name': 'shirttail'}, {'id': 10833, 'synset': 'shirtwaist.n.01', 'name': 'shirtwaist'}, {'id': 10834, 'synset': 'shiv.n.01', 'name': 'shiv'}, {'id': 10835, 'synset': 'shock_absorber.n.01', 'name': 'shock_absorber'}, {'id': 10836, 'synset': 'shoe.n.02', 'name': 'shoe'}, {'id': 10837, 'synset': 'shoebox.n.02', 'name': 'shoebox'}, {'id': 10838, 'synset': 'shoehorn.n.01', 'name': 'shoehorn'}, {'id': 10839, 'synset': 'shoe_shop.n.01', 'name': 'shoe_shop'}, {'id': 10840, 'synset': 'shoetree.n.01', 'name': 'shoetree'}, {'id': 10841, 'synset': 'shofar.n.01', 'name': 'shofar'}, {'id': 10842, 'synset': 'shoji.n.01', 'name': 'shoji'}, {'id': 10843, 'synset': 'shooting_brake.n.01', 'name': 'shooting_brake'}, {'id': 10844, 'synset': 'shooting_lodge.n.01', 'name': 'shooting_lodge'}, {'id': 10845, 'synset': 'shooting_stick.n.01', 'name': 'shooting_stick'}, {'id': 10846, 'synset': 'shop.n.01', 'name': 'shop'}, {'id': 10847, 'synset': 'shop_bell.n.01', 'name': 'shop_bell'}, {'id': 10848, 'synset': 'shopping_basket.n.01', 'name': 'shopping_basket'}, {'id': 10849, 'synset': 'short_circuit.n.01', 'name': 'short_circuit'}, {'id': 10850, 'synset': 'short_iron.n.01', 'name': 'short_iron'}, {'id': 10851, 'synset': 'short_sleeve.n.01', 'name': 'short_sleeve'}, {'id': 10852, 'synset': 'shortwave_diathermy_machine.n.01', 'name': 'shortwave_diathermy_machine'}, {'id': 10853, 'synset': 'shot.n.12', 'name': 'shot'}, {'id': 10854, 'synset': 'shotgun.n.01', 'name': 'shotgun'}, {'id': 10855, 'synset': 'shotgun_shell.n.01', 'name': 'shotgun_shell'}, {'id': 10856, 'synset': 'shot_tower.n.01', 'name': 'shot_tower'}, {'id': 10857, 'synset': 'shoulder.n.04', 'name': 'shoulder'}, {'id': 10858, 'synset': 'shouldered_arch.n.01', 'name': 'shouldered_arch'}, {'id': 10859, 'synset': 'shoulder_holster.n.01', 'name': 'shoulder_holster'}, {'id': 10860, 'synset': 'shoulder_pad.n.01', 'name': 'shoulder_pad'}, {'id': 10861, 'synset': 'shoulder_patch.n.01', 'name': 'shoulder_patch'}, {'id': 10862, 'synset': 'shovel.n.03', 'name': 'shovel'}, {'id': 10863, 'synset': 'shovel_hat.n.01', 'name': 'shovel_hat'}, {'id': 10864, 'synset': 'showboat.n.01', 'name': 'showboat'}, {'id': 10865, 'synset': 'shower_room.n.01', 'name': 'shower_room'}, {'id': 10866, 'synset': 'shower_stall.n.01', 'name': 'shower_stall'}, {'id': 10867, 'synset': 'showroom.n.01', 'name': 'showroom'}, {'id': 10868, 'synset': 'shrapnel.n.01', 'name': 'shrapnel'}, {'id': 10869, 'synset': 'shrimper.n.01', 'name': 'shrimper'}, {'id': 10870, 'synset': 'shrine.n.01', 'name': 'shrine'}, {'id': 10871, 'synset': 'shrink-wrap.n.01', 'name': 'shrink-wrap'}, {'id': 10872, 'synset': 'shunt.n.03', 'name': 'shunt'}, {'id': 10873, 'synset': 'shunt.n.02', 'name': 'shunt'}, {'id': 10874, 'synset': 'shunter.n.01', 'name': 'shunter'}, {'id': 10875, 'synset': 'shutter.n.02', 'name': 'shutter'}, {'id': 10876, 'synset': 'shutter.n.01', 'name': 'shutter'}, {'id': 10877, 'synset': 'shuttle.n.03', 'name': 'shuttle'}, {'id': 10878, 'synset': 'shuttle.n.02', 'name': 'shuttle'}, {'id': 10879, 'synset': 'shuttle_bus.n.01', 'name': 'shuttle_bus'}, {'id': 10880, 'synset': 'shuttlecock.n.01', 'name': 'shuttlecock'}, {'id': 10881, 'synset': 'shuttle_helicopter.n.01', 'name': 'shuttle_helicopter'}, {'id': 10882, 'synset': 'sibley_tent.n.01', 'name': 'Sibley_tent'}, {'id': 10883, 'synset': 'sickbay.n.01', 'name': 'sickbay'}, {'id': 10884, 'synset': 'sickbed.n.01', 'name': 'sickbed'}, {'id': 10885, 'synset': 'sickle.n.01', 'name': 'sickle'}, {'id': 10886, 'synset': 'sickroom.n.01', 'name': 'sickroom'}, {'id': 10887, 'synset': 'sideboard.n.02', 'name': 'sideboard'}, {'id': 10888, 'synset': 'sidecar.n.02', 'name': 'sidecar'}, {'id': 10889, 'synset': 'side_chapel.n.01', 'name': 'side_chapel'}, {'id': 10890, 'synset': 'sidelight.n.01', 'name': 'sidelight'}, {'id': 10891, 'synset': 'sidesaddle.n.01', 'name': 'sidesaddle'}, {'id': 10892, 'synset': 'sidewalk.n.01', 'name': 'sidewalk'}, {'id': 10893, 'synset': 'sidewall.n.02', 'name': 'sidewall'}, {'id': 10894, 'synset': 'side-wheeler.n.01', 'name': 'side-wheeler'}, {'id': 10895, 'synset': 'sidewinder.n.02', 'name': 'sidewinder'}, {'id': 10896, 'synset': 'sieve.n.01', 'name': 'sieve'}, {'id': 10897, 'synset': 'sifter.n.01', 'name': 'sifter'}, {'id': 10898, 'synset': 'sights.n.01', 'name': 'sights'}, {'id': 10899, 'synset': 'sigmoidoscope.n.01', 'name': 'sigmoidoscope'}, {'id': 10900, 'synset': 'signal_box.n.01', 'name': 'signal_box'}, {'id': 10901, 'synset': 'signaling_device.n.01', 'name': 'signaling_device'}, {'id': 10902, 'synset': 'silencer.n.02', 'name': 'silencer'}, {'id': 10903, 'synset': 'silent_butler.n.01', 'name': 'silent_butler'}, {'id': 10904, 'synset': 'silex.n.02', 'name': 'Silex'}, {'id': 10905, 'synset': 'silk.n.01', 'name': 'silk'}, {'id': 10906, 'synset': 'silks.n.01', 'name': 'silks'}, {'id': 10907, 'synset': 'silver_plate.n.02', 'name': 'silver_plate'}, {'id': 10908, 'synset': 'silverpoint.n.01', 'name': 'silverpoint'}, {'id': 10909, 'synset': 'simple_pendulum.n.01', 'name': 'simple_pendulum'}, {'id': 10910, 'synset': 'simulator.n.01', 'name': 'simulator'}, {'id': 10911, 'synset': 'single_bed.n.01', 'name': 'single_bed'}, {'id': 10912, 'synset': 'single-breasted_jacket.n.01', 'name': 'single-breasted_jacket'}, {'id': 10913, 'synset': 'single-breasted_suit.n.01', 'name': 'single-breasted_suit'}, {'id': 10914, 'synset': 'single_prop.n.01', 'name': 'single_prop'}, {'id': 10915, 'synset': 'single-reed_instrument.n.01', 'name': 'single-reed_instrument'}, {'id': 10916, 'synset': 'single-rotor_helicopter.n.01', 'name': 'single-rotor_helicopter'}, {'id': 10917, 'synset': 'singlestick.n.01', 'name': 'singlestick'}, {'id': 10918, 'synset': 'singlet.n.01', 'name': 'singlet'}, {'id': 10919, 'synset': 'siren.n.04', 'name': 'siren'}, {'id': 10920, 'synset': 'sister_ship.n.01', 'name': 'sister_ship'}, {'id': 10921, 'synset': 'sitar.n.01', 'name': 'sitar'}, {'id': 10922, 'synset': 'sitz_bath.n.01', 'name': 'sitz_bath'}, {'id': 10923, 'synset': 'six-pack.n.01', 'name': 'six-pack'}, {'id': 10924, 'synset': 'skate.n.01', 'name': 'skate'}, {'id': 10925, 'synset': 'skeg.n.01', 'name': 'skeg'}, {'id': 10926, 'synset': 'skein.n.01', 'name': 'skein'}, {'id': 10927, 'synset': 'skeleton.n.04', 'name': 'skeleton'}, {'id': 10928, 'synset': 'skeleton_key.n.01', 'name': 'skeleton_key'}, {'id': 10929, 'synset': 'skep.n.02', 'name': 'skep'}, {'id': 10930, 'synset': 'skep.n.01', 'name': 'skep'}, {'id': 10931, 'synset': 'sketch.n.01', 'name': 'sketch'}, {'id': 10932, 'synset': 'sketcher.n.02', 'name': 'sketcher'}, {'id': 10933, 'synset': 'skew_arch.n.01', 'name': 'skew_arch'}, {'id': 10934, 'synset': 'ski_binding.n.01', 'name': 'ski_binding'}, {'id': 10935, 'synset': 'skibob.n.01', 'name': 'skibob'}, {'id': 10936, 'synset': 'ski_cap.n.01', 'name': 'ski_cap'}, {'id': 10937, 'synset': 'skidder.n.03', 'name': 'skidder'}, {'id': 10938, 'synset': 'skid_lid.n.01', 'name': 'skid_lid'}, {'id': 10939, 'synset': 'skiff.n.01', 'name': 'skiff'}, {'id': 10940, 'synset': 'ski_jump.n.01', 'name': 'ski_jump'}, {'id': 10941, 'synset': 'ski_lodge.n.01', 'name': 'ski_lodge'}, {'id': 10942, 'synset': 'ski_mask.n.01', 'name': 'ski_mask'}, {'id': 10943, 'synset': 'skimmer.n.02', 'name': 'skimmer'}, {'id': 10944, 'synset': 'ski-plane.n.01', 'name': 'ski-plane'}, {'id': 10945, 'synset': 'ski_rack.n.01', 'name': 'ski_rack'}, {'id': 10946, 'synset': 'skirt.n.01', 'name': 'skirt'}, {'id': 10947, 'synset': 'ski_tow.n.01', 'name': 'ski_tow'}, {'id': 10948, 'synset': 'skivvies.n.01', 'name': 'Skivvies'}, {'id': 10949, 'synset': 'skybox.n.01', 'name': 'skybox'}, {'id': 10950, 'synset': 'skyhook.n.02', 'name': 'skyhook'}, {'id': 10951, 'synset': 'skylight.n.01', 'name': 'skylight'}, {'id': 10952, 'synset': 'skysail.n.01', 'name': 'skysail'}, {'id': 10953, 'synset': 'skyscraper.n.01', 'name': 'skyscraper'}, {'id': 10954, 'synset': 'skywalk.n.01', 'name': 'skywalk'}, {'id': 10955, 'synset': 'slacks.n.01', 'name': 'slacks'}, {'id': 10956, 'synset': 'slack_suit.n.01', 'name': 'slack_suit'}, {'id': 10957, 'synset': 'slasher.n.02', 'name': 'slasher'}, {'id': 10958, 'synset': 'slash_pocket.n.01', 'name': 'slash_pocket'}, {'id': 10959, 'synset': 'slat.n.01', 'name': 'slat'}, {'id': 10960, 'synset': 'slate.n.01', 'name': 'slate'}, {'id': 10961, 'synset': 'slate_pencil.n.01', 'name': 'slate_pencil'}, {'id': 10962, 'synset': 'slate_roof.n.01', 'name': 'slate_roof'}, {'id': 10963, 'synset': 'sleeper.n.07', 'name': 'sleeper'}, {'id': 10964, 'synset': 'sleeper.n.06', 'name': 'sleeper'}, {'id': 10965, 'synset': 'sleeping_car.n.01', 'name': 'sleeping_car'}, {'id': 10966, 'synset': 'sleeve.n.01', 'name': 'sleeve'}, {'id': 10967, 'synset': 'sleeve.n.02', 'name': 'sleeve'}, {'id': 10968, 'synset': 'sleigh_bed.n.01', 'name': 'sleigh_bed'}, {'id': 10969, 'synset': 'sleigh_bell.n.01', 'name': 'sleigh_bell'}, {'id': 10970, 'synset': 'slice_bar.n.01', 'name': 'slice_bar'}, {'id': 10971, 'synset': 'slicer.n.03', 'name': 'slicer'}, {'id': 10972, 'synset': 'slicer.n.02', 'name': 'slicer'}, {'id': 10973, 'synset': 'slide.n.04', 'name': 'slide'}, {'id': 10974, 'synset': 'slide_fastener.n.01', 'name': 'slide_fastener'}, {'id': 10975, 'synset': 'slide_projector.n.01', 'name': 'slide_projector'}, {'id': 10976, 'synset': 'slide_rule.n.01', 'name': 'slide_rule'}, {'id': 10977, 'synset': 'slide_valve.n.01', 'name': 'slide_valve'}, {'id': 10978, 'synset': 'sliding_door.n.01', 'name': 'sliding_door'}, {'id': 10979, 'synset': 'sliding_seat.n.01', 'name': 'sliding_seat'}, {'id': 10980, 'synset': 'sliding_window.n.01', 'name': 'sliding_window'}, {'id': 10981, 'synset': 'sling.n.04', 'name': 'sling'}, {'id': 10982, 'synset': 'slingback.n.01', 'name': 'slingback'}, {'id': 10983, 'synset': 'slinger_ring.n.01', 'name': 'slinger_ring'}, {'id': 10984, 'synset': 'slip_clutch.n.01', 'name': 'slip_clutch'}, {'id': 10985, 'synset': 'slipcover.n.01', 'name': 'slipcover'}, {'id': 10986, 'synset': 'slip-joint_pliers.n.01', 'name': 'slip-joint_pliers'}, {'id': 10987, 'synset': 'slipknot.n.01', 'name': 'slipknot'}, {'id': 10988, 'synset': 'slip-on.n.01', 'name': 'slip-on'}, {'id': 10989, 'synset': 'slip_ring.n.01', 'name': 'slip_ring'}, {'id': 10990, 'synset': 'slit_lamp.n.01', 'name': 'slit_lamp'}, {'id': 10991, 'synset': 'slit_trench.n.01', 'name': 'slit_trench'}, {'id': 10992, 'synset': 'sloop.n.01', 'name': 'sloop'}, {'id': 10993, 'synset': 'sloop_of_war.n.01', 'name': 'sloop_of_war'}, {'id': 10994, 'synset': 'slop_basin.n.01', 'name': 'slop_basin'}, {'id': 10995, 'synset': 'slop_pail.n.01', 'name': 'slop_pail'}, {'id': 10996, 'synset': 'slops.n.02', 'name': 'slops'}, {'id': 10997, 'synset': 'slopshop.n.01', 'name': 'slopshop'}, {'id': 10998, 'synset': 'slot.n.07', 'name': 'slot'}, {'id': 10999, 'synset': 'slot_machine.n.01', 'name': 'slot_machine'}, {'id': 11000, 'synset': 'sluice.n.01', 'name': 'sluice'}, {'id': 11001, 'synset': 'smack.n.03', 'name': 'smack'}, {'id': 11002, 'synset': 'small_boat.n.01', 'name': 'small_boat'}, {'id': 11003, 'synset': 'small_computer_system_interface.n.01', 'name': 'small_computer_system_interface'}, {'id': 11004, 'synset': 'small_ship.n.01', 'name': 'small_ship'}, {'id': 11005, 'synset': 'small_stores.n.01', 'name': 'small_stores'}, {'id': 11006, 'synset': 'smart_bomb.n.01', 'name': 'smart_bomb'}, {'id': 11007, 'synset': 'smelling_bottle.n.01', 'name': 'smelling_bottle'}, {'id': 11008, 'synset': 'smocking.n.01', 'name': 'smocking'}, {'id': 11009, 'synset': 'smoke_bomb.n.01', 'name': 'smoke_bomb'}, {'id': 11010, 'synset': 'smokehouse.n.01', 'name': 'smokehouse'}, {'id': 11011, 'synset': 'smoker.n.03', 'name': 'smoker'}, {'id': 11012, 'synset': 'smoke_screen.n.01', 'name': 'smoke_screen'}, {'id': 11013, 'synset': 'smoking_room.n.01', 'name': 'smoking_room'}, {'id': 11014, 'synset': 'smoothbore.n.01', 'name': 'smoothbore'}, {'id': 11015, 'synset': 'smooth_plane.n.01', 'name': 'smooth_plane'}, {'id': 11016, 'synset': 'snack_bar.n.01', 'name': 'snack_bar'}, {'id': 11017, 'synset': 'snaffle.n.01', 'name': 'snaffle'}, {'id': 11018, 'synset': 'snap.n.10', 'name': 'snap'}, {'id': 11019, 'synset': 'snap_brim.n.01', 'name': 'snap_brim'}, {'id': 11020, 'synset': 'snap-brim_hat.n.01', 'name': 'snap-brim_hat'}, {'id': 11021, 'synset': 'snare.n.05', 'name': 'snare'}, {'id': 11022, 'synset': 'snare_drum.n.01', 'name': 'snare_drum'}, {'id': 11023, 'synset': 'snatch_block.n.01', 'name': 'snatch_block'}, {'id': 11024, 'synset': 'snifter.n.01', 'name': 'snifter'}, {'id': 11025, 'synset': 'sniper_rifle.n.01', 'name': 'sniper_rifle'}, {'id': 11026, 'synset': 'snips.n.01', 'name': 'snips'}, {'id': 11027, 'synset': 'sno-cat.n.01', 'name': 'Sno-cat'}, {'id': 11028, 'synset': 'snood.n.01', 'name': 'snood'}, {'id': 11029, 'synset': 'snorkel.n.02', 'name': 'snorkel'}, {'id': 11030, 'synset': 'snorkel.n.01', 'name': 'snorkel'}, {'id': 11031, 'synset': 'snowbank.n.01', 'name': 'snowbank'}, {'id': 11032, 'synset': 'snowplow.n.01', 'name': 'snowplow'}, {'id': 11033, 'synset': 'snowshoe.n.01', 'name': 'snowshoe'}, {'id': 11034, 'synset': 'snowsuit.n.01', 'name': 'snowsuit'}, {'id': 11035, 'synset': 'snow_thrower.n.01', 'name': 'snow_thrower'}, {'id': 11036, 'synset': 'snuffbox.n.01', 'name': 'snuffbox'}, {'id': 11037, 'synset': 'snuffer.n.01', 'name': 'snuffer'}, {'id': 11038, 'synset': 'snuffers.n.01', 'name': 'snuffers'}, {'id': 11039, 'synset': 'soapbox.n.01', 'name': 'soapbox'}, {'id': 11040, 'synset': 'soap_dish.n.01', 'name': 'soap_dish'}, {'id': 11041, 'synset': 'soap_dispenser.n.01', 'name': 'soap_dispenser'}, {'id': 11042, 'synset': 'soap_pad.n.01', 'name': 'soap_pad'}, {'id': 11043, 'synset': 'socket.n.02', 'name': 'socket'}, {'id': 11044, 'synset': 'socket_wrench.n.01', 'name': 'socket_wrench'}, {'id': 11045, 'synset': 'socle.n.01', 'name': 'socle'}, {'id': 11046, 'synset': 'soda_can.n.01', 'name': 'soda_can'}, {'id': 11047, 'synset': 'soda_fountain.n.02', 'name': 'soda_fountain'}, {'id': 11048, 'synset': 'soda_fountain.n.01', 'name': 'soda_fountain'}, {'id': 11049, 'synset': 'sod_house.n.01', 'name': 'sod_house'}, {'id': 11050, 'synset': 'sodium-vapor_lamp.n.01', 'name': 'sodium-vapor_lamp'}, {'id': 11051, 'synset': 'soffit.n.01', 'name': 'soffit'}, {'id': 11052, 'synset': 'soft_pedal.n.01', 'name': 'soft_pedal'}, {'id': 11053, 'synset': 'soil_pipe.n.01', 'name': 'soil_pipe'}, {'id': 11054, 'synset': 'solar_cell.n.01', 'name': 'solar_cell'}, {'id': 11055, 'synset': 'solar_dish.n.01', 'name': 'solar_dish'}, {'id': 11056, 'synset': 'solar_heater.n.01', 'name': 'solar_heater'}, {'id': 11057, 'synset': 'solar_house.n.01', 'name': 'solar_house'}, {'id': 11058, 'synset': 'solar_telescope.n.01', 'name': 'solar_telescope'}, {'id': 11059, 'synset': 'solar_thermal_system.n.01', 'name': 'solar_thermal_system'}, {'id': 11060, 'synset': 'soldering_iron.n.01', 'name': 'soldering_iron'}, {'id': 11061, 'synset': 'solenoid.n.01', 'name': 'solenoid'}, {'id': 11062, 'synset': 'solleret.n.01', 'name': 'solleret'}, {'id': 11063, 'synset': 'sonic_depth_finder.n.01', 'name': 'sonic_depth_finder'}, {'id': 11064, 'synset': 'sonogram.n.01', 'name': 'sonogram'}, {'id': 11065, 'synset': 'sonograph.n.01', 'name': 'sonograph'}, {'id': 11066, 'synset': 'sorter.n.02', 'name': 'sorter'}, {'id': 11067, 'synset': 'souk.n.01', 'name': 'souk'}, {'id': 11068, 'synset': 'sound_bow.n.01', 'name': 'sound_bow'}, {'id': 11069, 'synset': 'soundbox.n.01', 'name': 'soundbox'}, {'id': 11070, 'synset': 'sound_camera.n.01', 'name': 'sound_camera'}, {'id': 11071, 'synset': 'sounder.n.01', 'name': 'sounder'}, {'id': 11072, 'synset': 'sound_film.n.01', 'name': 'sound_film'}, {'id': 11073, 'synset': 'sounding_board.n.02', 'name': 'sounding_board'}, {'id': 11074, 'synset': 'sounding_rocket.n.01', 'name': 'sounding_rocket'}, {'id': 11075, 'synset': 'sound_recording.n.01', 'name': 'sound_recording'}, {'id': 11076, 'synset': 'sound_spectrograph.n.01', 'name': 'sound_spectrograph'}, {'id': 11077, 'synset': 'soup_ladle.n.01', 'name': 'soup_ladle'}, {'id': 11078, 'synset': 'source_of_illumination.n.01', 'name': 'source_of_illumination'}, {'id': 11079, 'synset': 'sourdine.n.02', 'name': 'sourdine'}, {'id': 11080, 'synset': 'soutache.n.01', 'name': 'soutache'}, {'id': 11081, 'synset': 'soutane.n.01', 'name': 'soutane'}, {'id': 11082, 'synset': "sou'wester.n.02", 'name': "sou'wester"}, {'id': 11083, 'synset': 'soybean_future.n.01', 'name': 'soybean_future'}, {'id': 11084, 'synset': 'space_bar.n.01', 'name': 'space_bar'}, {'id': 11085, 'synset': 'space_capsule.n.01', 'name': 'space_capsule'}, {'id': 11086, 'synset': 'spacecraft.n.01', 'name': 'spacecraft'}, {'id': 11087, 'synset': 'space_heater.n.01', 'name': 'space_heater'}, {'id': 11088, 'synset': 'space_helmet.n.01', 'name': 'space_helmet'}, {'id': 11089, 'synset': 'space_rocket.n.01', 'name': 'space_rocket'}, {'id': 11090, 'synset': 'space_station.n.01', 'name': 'space_station'}, {'id': 11091, 'synset': 'spacesuit.n.01', 'name': 'spacesuit'}, {'id': 11092, 'synset': 'spade.n.02', 'name': 'spade'}, {'id': 11093, 'synset': 'spade_bit.n.01', 'name': 'spade_bit'}, {'id': 11094, 'synset': 'spaghetti_junction.n.01', 'name': 'spaghetti_junction'}, {'id': 11095, 'synset': 'spandau.n.01', 'name': 'Spandau'}, {'id': 11096, 'synset': 'spandex.n.01', 'name': 'spandex'}, {'id': 11097, 'synset': 'spandrel.n.01', 'name': 'spandrel'}, {'id': 11098, 'synset': 'spanker.n.02', 'name': 'spanker'}, {'id': 11099, 'synset': 'spar.n.02', 'name': 'spar'}, {'id': 11100, 'synset': 'sparge_pipe.n.01', 'name': 'sparge_pipe'}, {'id': 11101, 'synset': 'spark_arrester.n.02', 'name': 'spark_arrester'}, {'id': 11102, 'synset': 'spark_arrester.n.01', 'name': 'spark_arrester'}, {'id': 11103, 'synset': 'spark_chamber.n.01', 'name': 'spark_chamber'}, {'id': 11104, 'synset': 'spark_coil.n.01', 'name': 'spark_coil'}, {'id': 11105, 'synset': 'spark_gap.n.01', 'name': 'spark_gap'}, {'id': 11106, 'synset': 'spark_lever.n.01', 'name': 'spark_lever'}, {'id': 11107, 'synset': 'spark_plug.n.01', 'name': 'spark_plug'}, {'id': 11108, 'synset': 'sparkplug_wrench.n.01', 'name': 'sparkplug_wrench'}, {'id': 11109, 'synset': 'spark_transmitter.n.01', 'name': 'spark_transmitter'}, {'id': 11110, 'synset': 'spat.n.02', 'name': 'spat'}, {'id': 11111, 'synset': 'spatula.n.01', 'name': 'spatula'}, {'id': 11112, 'synset': 'speakerphone.n.01', 'name': 'speakerphone'}, {'id': 11113, 'synset': 'speaking_trumpet.n.01', 'name': 'speaking_trumpet'}, {'id': 11114, 'synset': 'spear.n.02', 'name': 'spear'}, {'id': 11115, 'synset': 'specialty_store.n.01', 'name': 'specialty_store'}, {'id': 11116, 'synset': 'specimen_bottle.n.01', 'name': 'specimen_bottle'}, {'id': 11117, 'synset': 'spectacle.n.02', 'name': 'spectacle'}, {'id': 11118, 'synset': 'spectator_pump.n.01', 'name': 'spectator_pump'}, {'id': 11119, 'synset': 'spectrograph.n.01', 'name': 'spectrograph'}, {'id': 11120, 'synset': 'spectrophotometer.n.01', 'name': 'spectrophotometer'}, {'id': 11121, 'synset': 'spectroscope.n.01', 'name': 'spectroscope'}, {'id': 11122, 'synset': 'speculum.n.02', 'name': 'speculum'}, {'id': 11123, 'synset': 'speedboat.n.01', 'name': 'speedboat'}, {'id': 11124, 'synset': 'speed_bump.n.01', 'name': 'speed_bump'}, {'id': 11125, 'synset': 'speedometer.n.01', 'name': 'speedometer'}, {'id': 11126, 'synset': 'speed_skate.n.01', 'name': 'speed_skate'}, {'id': 11127, 'synset': 'spherometer.n.01', 'name': 'spherometer'}, {'id': 11128, 'synset': 'sphygmomanometer.n.01', 'name': 'sphygmomanometer'}, {'id': 11129, 'synset': 'spicemill.n.01', 'name': 'spicemill'}, {'id': 11130, 'synset': 'spider.n.03', 'name': 'spider'}, {'id': 11131, 'synset': 'spider_web.n.01', 'name': 'spider_web'}, {'id': 11132, 'synset': 'spike.n.02', 'name': 'spike'}, {'id': 11133, 'synset': 'spike.n.11', 'name': 'spike'}, {'id': 11134, 'synset': 'spindle.n.04', 'name': 'spindle'}, {'id': 11135, 'synset': 'spindle.n.03', 'name': 'spindle'}, {'id': 11136, 'synset': 'spindle.n.02', 'name': 'spindle'}, {'id': 11137, 'synset': 'spin_dryer.n.01', 'name': 'spin_dryer'}, {'id': 11138, 'synset': 'spinet.n.02', 'name': 'spinet'}, {'id': 11139, 'synset': 'spinet.n.01', 'name': 'spinet'}, {'id': 11140, 'synset': 'spinnaker.n.01', 'name': 'spinnaker'}, {'id': 11141, 'synset': 'spinner.n.03', 'name': 'spinner'}, {'id': 11142, 'synset': 'spinning_frame.n.01', 'name': 'spinning_frame'}, {'id': 11143, 'synset': 'spinning_jenny.n.01', 'name': 'spinning_jenny'}, {'id': 11144, 'synset': 'spinning_machine.n.01', 'name': 'spinning_machine'}, {'id': 11145, 'synset': 'spinning_rod.n.01', 'name': 'spinning_rod'}, {'id': 11146, 'synset': 'spinning_wheel.n.01', 'name': 'spinning_wheel'}, {'id': 11147, 'synset': 'spiral_bandage.n.01', 'name': 'spiral_bandage'}, {'id': 11148, 'synset': 'spiral_ratchet_screwdriver.n.01', 'name': 'spiral_ratchet_screwdriver'}, {'id': 11149, 'synset': 'spiral_spring.n.01', 'name': 'spiral_spring'}, {'id': 11150, 'synset': 'spirit_lamp.n.01', 'name': 'spirit_lamp'}, {'id': 11151, 'synset': 'spirit_stove.n.01', 'name': 'spirit_stove'}, {'id': 11152, 'synset': 'spirometer.n.01', 'name': 'spirometer'}, {'id': 11153, 'synset': 'spit.n.03', 'name': 'spit'}, {'id': 11154, 'synset': 'spittoon.n.01', 'name': 'spittoon'}, {'id': 11155, 'synset': 'splashboard.n.02', 'name': 'splashboard'}, {'id': 11156, 'synset': 'splasher.n.01', 'name': 'splasher'}, {'id': 11157, 'synset': 'splice.n.01', 'name': 'splice'}, {'id': 11158, 'synset': 'splicer.n.03', 'name': 'splicer'}, {'id': 11159, 'synset': 'splint.n.02', 'name': 'splint'}, {'id': 11160, 'synset': 'split_rail.n.01', 'name': 'split_rail'}, {'id': 11161, 'synset': 'spode.n.02', 'name': 'Spode'}, {'id': 11162, 'synset': 'spoiler.n.05', 'name': 'spoiler'}, {'id': 11163, 'synset': 'spoiler.n.04', 'name': 'spoiler'}, {'id': 11164, 'synset': 'spoke.n.01', 'name': 'spoke'}, {'id': 11165, 'synset': 'spokeshave.n.01', 'name': 'spokeshave'}, {'id': 11166, 'synset': 'sponge_cloth.n.01', 'name': 'sponge_cloth'}, {'id': 11167, 'synset': 'sponge_mop.n.01', 'name': 'sponge_mop'}, {'id': 11168, 'synset': 'spoon.n.03', 'name': 'spoon'}, {'id': 11169, 'synset': 'spork.n.01', 'name': 'Spork'}, {'id': 11170, 'synset': 'sporran.n.01', 'name': 'sporran'}, {'id': 11171, 'synset': 'sport_kite.n.01', 'name': 'sport_kite'}, {'id': 11172, 'synset': 'sports_car.n.01', 'name': 'sports_car'}, {'id': 11173, 'synset': 'sports_equipment.n.01', 'name': 'sports_equipment'}, {'id': 11174, 'synset': 'sports_implement.n.01', 'name': 'sports_implement'}, {'id': 11175, 'synset': 'sport_utility.n.01', 'name': 'sport_utility'}, {'id': 11176, 'synset': 'spot.n.07', 'name': 'spot'}, {'id': 11177, 'synset': 'spot_weld.n.01', 'name': 'spot_weld'}, {'id': 11178, 'synset': 'spouter.n.02', 'name': 'spouter'}, {'id': 11179, 'synset': 'sprag.n.01', 'name': 'sprag'}, {'id': 11180, 'synset': 'spray_gun.n.01', 'name': 'spray_gun'}, {'id': 11181, 'synset': 'spray_paint.n.01', 'name': 'spray_paint'}, {'id': 11182, 'synset': 'spreader.n.01', 'name': 'spreader'}, {'id': 11183, 'synset': 'sprig.n.02', 'name': 'sprig'}, {'id': 11184, 'synset': 'spring.n.02', 'name': 'spring'}, {'id': 11185, 'synset': 'spring_balance.n.01', 'name': 'spring_balance'}, {'id': 11186, 'synset': 'springboard.n.01', 'name': 'springboard'}, {'id': 11187, 'synset': 'sprinkler.n.01', 'name': 'sprinkler'}, {'id': 11188, 'synset': 'sprinkler_system.n.01', 'name': 'sprinkler_system'}, {'id': 11189, 'synset': 'sprit.n.01', 'name': 'sprit'}, {'id': 11190, 'synset': 'spritsail.n.01', 'name': 'spritsail'}, {'id': 11191, 'synset': 'sprocket.n.02', 'name': 'sprocket'}, {'id': 11192, 'synset': 'sprocket.n.01', 'name': 'sprocket'}, {'id': 11193, 'synset': 'spun_yarn.n.01', 'name': 'spun_yarn'}, {'id': 11194, 'synset': 'spur.n.04', 'name': 'spur'}, {'id': 11195, 'synset': 'spur_gear.n.01', 'name': 'spur_gear'}, {'id': 11196, 'synset': 'sputnik.n.01', 'name': 'sputnik'}, {'id': 11197, 'synset': 'spy_satellite.n.01', 'name': 'spy_satellite'}, {'id': 11198, 'synset': 'squad_room.n.01', 'name': 'squad_room'}, {'id': 11199, 'synset': 'square.n.08', 'name': 'square'}, {'id': 11200, 'synset': 'square_knot.n.01', 'name': 'square_knot'}, {'id': 11201, 'synset': 'square-rigger.n.01', 'name': 'square-rigger'}, {'id': 11202, 'synset': 'square_sail.n.01', 'name': 'square_sail'}, {'id': 11203, 'synset': 'squash_ball.n.01', 'name': 'squash_ball'}, {'id': 11204, 'synset': 'squash_racket.n.01', 'name': 'squash_racket'}, {'id': 11205, 'synset': 'squawk_box.n.01', 'name': 'squawk_box'}, {'id': 11206, 'synset': 'squeegee.n.01', 'name': 'squeegee'}, {'id': 11207, 'synset': 'squeezer.n.01', 'name': 'squeezer'}, {'id': 11208, 'synset': 'squelch_circuit.n.01', 'name': 'squelch_circuit'}, {'id': 11209, 'synset': 'squinch.n.01', 'name': 'squinch'}, {'id': 11210, 'synset': 'stabilizer.n.03', 'name': 'stabilizer'}, {'id': 11211, 'synset': 'stabilizer.n.02', 'name': 'stabilizer'}, {'id': 11212, 'synset': 'stabilizer_bar.n.01', 'name': 'stabilizer_bar'}, {'id': 11213, 'synset': 'stable.n.01', 'name': 'stable'}, {'id': 11214, 'synset': 'stable_gear.n.01', 'name': 'stable_gear'}, {'id': 11215, 'synset': 'stabling.n.01', 'name': 'stabling'}, {'id': 11216, 'synset': 'stacks.n.02', 'name': 'stacks'}, {'id': 11217, 'synset': 'staddle.n.01', 'name': 'staddle'}, {'id': 11218, 'synset': 'stadium.n.01', 'name': 'stadium'}, {'id': 11219, 'synset': 'stage.n.03', 'name': 'stage'}, {'id': 11220, 'synset': 'stained-glass_window.n.01', 'name': 'stained-glass_window'}, {'id': 11221, 'synset': 'stair-carpet.n.01', 'name': 'stair-carpet'}, {'id': 11222, 'synset': 'stair-rod.n.01', 'name': 'stair-rod'}, {'id': 11223, 'synset': 'stairwell.n.01', 'name': 'stairwell'}, {'id': 11224, 'synset': 'stake.n.05', 'name': 'stake'}, {'id': 11225, 'synset': 'stall.n.03', 'name': 'stall'}, {'id': 11226, 'synset': 'stall.n.01', 'name': 'stall'}, {'id': 11227, 'synset': 'stamp.n.08', 'name': 'stamp'}, {'id': 11228, 'synset': 'stamp_mill.n.01', 'name': 'stamp_mill'}, {'id': 11229, 'synset': 'stamping_machine.n.01', 'name': 'stamping_machine'}, {'id': 11230, 'synset': 'stanchion.n.01', 'name': 'stanchion'}, {'id': 11231, 'synset': 'stand.n.04', 'name': 'stand'}, {'id': 11232, 'synset': 'standard.n.05', 'name': 'standard'}, {'id': 11233, 'synset': 'standard_cell.n.01', 'name': 'standard_cell'}, {'id': 11234, 'synset': 'standard_transmission.n.01', 'name': 'standard_transmission'}, {'id': 11235, 'synset': 'standing_press.n.01', 'name': 'standing_press'}, {'id': 11236, 'synset': 'stanhope.n.01', 'name': 'stanhope'}, {'id': 11237, 'synset': 'stanley_steamer.n.01', 'name': 'Stanley_Steamer'}, {'id': 11238, 'synset': 'staple.n.05', 'name': 'staple'}, {'id': 11239, 'synset': 'staple.n.04', 'name': 'staple'}, {'id': 11240, 'synset': 'staple_gun.n.01', 'name': 'staple_gun'}, {'id': 11241, 'synset': 'starship.n.01', 'name': 'starship'}, {'id': 11242, 'synset': 'starter.n.01', 'name': 'starter'}, {'id': 11243, 'synset': 'starting_gate.n.01', 'name': 'starting_gate'}, {'id': 11244, 'synset': 'stassano_furnace.n.01', 'name': 'Stassano_furnace'}, {'id': 11245, 'synset': 'statehouse.n.01', 'name': 'Statehouse'}, {'id': 11246, 'synset': 'stately_home.n.01', 'name': 'stately_home'}, {'id': 11247, 'synset': 'state_prison.n.01', 'name': 'state_prison'}, {'id': 11248, 'synset': 'stateroom.n.01', 'name': 'stateroom'}, {'id': 11249, 'synset': 'static_tube.n.01', 'name': 'static_tube'}, {'id': 11250, 'synset': 'station.n.01', 'name': 'station'}, {'id': 11251, 'synset': 'stator.n.01', 'name': 'stator'}, {'id': 11252, 'synset': 'stay.n.05', 'name': 'stay'}, {'id': 11253, 'synset': 'staysail.n.01', 'name': 'staysail'}, {'id': 11254, 'synset': 'steakhouse.n.01', 'name': 'steakhouse'}, {'id': 11255, 'synset': 'stealth_aircraft.n.01', 'name': 'stealth_aircraft'}, {'id': 11256, 'synset': 'stealth_bomber.n.01', 'name': 'stealth_bomber'}, {'id': 11257, 'synset': 'stealth_fighter.n.01', 'name': 'stealth_fighter'}, {'id': 11258, 'synset': 'steam_bath.n.01', 'name': 'steam_bath'}, {'id': 11259, 'synset': 'steamboat.n.01', 'name': 'steamboat'}, {'id': 11260, 'synset': 'steam_chest.n.01', 'name': 'steam_chest'}, {'id': 11261, 'synset': 'steam_engine.n.01', 'name': 'steam_engine'}, {'id': 11262, 'synset': 'steamer.n.03', 'name': 'steamer'}, {'id': 11263, 'synset': 'steamer.n.02', 'name': 'steamer'}, {'id': 11264, 'synset': 'steam_iron.n.01', 'name': 'steam_iron'}, {'id': 11265, 'synset': 'steam_locomotive.n.01', 'name': 'steam_locomotive'}, {'id': 11266, 'synset': 'steamroller.n.02', 'name': 'steamroller'}, {'id': 11267, 'synset': 'steam_shovel.n.01', 'name': 'steam_shovel'}, {'id': 11268, 'synset': 'steam_turbine.n.01', 'name': 'steam_turbine'}, {'id': 11269, 'synset': 'steam_whistle.n.01', 'name': 'steam_whistle'}, {'id': 11270, 'synset': 'steel.n.03', 'name': 'steel'}, {'id': 11271, 'synset': 'steel_arch_bridge.n.01', 'name': 'steel_arch_bridge'}, {'id': 11272, 'synset': 'steel_drum.n.01', 'name': 'steel_drum'}, {'id': 11273, 'synset': 'steel_mill.n.01', 'name': 'steel_mill'}, {'id': 11274, 'synset': 'steel-wool_pad.n.01', 'name': 'steel-wool_pad'}, {'id': 11275, 'synset': 'steelyard.n.01', 'name': 'steelyard'}, {'id': 11276, 'synset': 'steeple.n.01', 'name': 'steeple'}, {'id': 11277, 'synset': 'steerage.n.01', 'name': 'steerage'}, {'id': 11278, 'synset': 'steering_gear.n.01', 'name': 'steering_gear'}, {'id': 11279, 'synset': 'steering_linkage.n.01', 'name': 'steering_linkage'}, {'id': 11280, 'synset': 'steering_system.n.01', 'name': 'steering_system'}, {'id': 11281, 'synset': 'stele.n.02', 'name': 'stele'}, {'id': 11282, 'synset': 'stem-winder.n.01', 'name': 'stem-winder'}, {'id': 11283, 'synset': 'stencil.n.01', 'name': 'stencil'}, {'id': 11284, 'synset': 'sten_gun.n.01', 'name': 'Sten_gun'}, {'id': 11285, 'synset': 'stenograph.n.02', 'name': 'stenograph'}, {'id': 11286, 'synset': 'step.n.04', 'name': 'step'}, {'id': 11287, 'synset': 'step-down_transformer.n.01', 'name': 'step-down_transformer'}, {'id': 11288, 'synset': 'step-up_transformer.n.01', 'name': 'step-up_transformer'}, {'id': 11289, 'synset': 'stereoscope.n.01', 'name': 'stereoscope'}, {'id': 11290, 'synset': 'stern_chaser.n.01', 'name': 'stern_chaser'}, {'id': 11291, 'synset': 'sternpost.n.01', 'name': 'sternpost'}, {'id': 11292, 'synset': 'sternwheeler.n.01', 'name': 'sternwheeler'}, {'id': 11293, 'synset': 'stethoscope.n.01', 'name': 'stethoscope'}, {'id': 11294, 'synset': 'stewing_pan.n.01', 'name': 'stewing_pan'}, {'id': 11295, 'synset': 'stick.n.01', 'name': 'stick'}, {'id': 11296, 'synset': 'stick.n.07', 'name': 'stick'}, {'id': 11297, 'synset': 'stick.n.03', 'name': 'stick'}, {'id': 11298, 'synset': 'stick.n.06', 'name': 'stick'}, {'id': 11299, 'synset': 'stile.n.01', 'name': 'stile'}, {'id': 11300, 'synset': 'stiletto.n.01', 'name': 'stiletto'}, {'id': 11301, 'synset': 'still.n.03', 'name': 'still'}, {'id': 11302, 'synset': 'stillroom.n.01', 'name': 'stillroom'}, {'id': 11303, 'synset': 'stillson_wrench.n.01', 'name': 'Stillson_wrench'}, {'id': 11304, 'synset': 'stilt.n.02', 'name': 'stilt'}, {'id': 11305, 'synset': 'stinger.n.03', 'name': 'Stinger'}, {'id': 11306, 'synset': 'stink_bomb.n.01', 'name': 'stink_bomb'}, {'id': 11307, 'synset': 'stirrup_pump.n.01', 'name': 'stirrup_pump'}, {'id': 11308, 'synset': 'stob.n.01', 'name': 'stob'}, {'id': 11309, 'synset': 'stock.n.03', 'name': 'stock'}, {'id': 11310, 'synset': 'stockade.n.01', 'name': 'stockade'}, {'id': 11311, 'synset': 'stockcar.n.01', 'name': 'stockcar'}, {'id': 11312, 'synset': 'stock_car.n.02', 'name': 'stock_car'}, {'id': 11313, 'synset': 'stockinet.n.01', 'name': 'stockinet'}, {'id': 11314, 'synset': 'stocking.n.01', 'name': 'stocking'}, {'id': 11315, 'synset': 'stock-in-trade.n.01', 'name': 'stock-in-trade'}, {'id': 11316, 'synset': 'stockpot.n.01', 'name': 'stockpot'}, {'id': 11317, 'synset': 'stockroom.n.01', 'name': 'stockroom'}, {'id': 11318, 'synset': 'stocks.n.03', 'name': 'stocks'}, {'id': 11319, 'synset': 'stock_saddle.n.01', 'name': 'stock_saddle'}, {'id': 11320, 'synset': 'stockyard.n.01', 'name': 'stockyard'}, {'id': 11321, 'synset': 'stole.n.01', 'name': 'stole'}, {'id': 11322, 'synset': 'stomacher.n.01', 'name': 'stomacher'}, {'id': 11323, 'synset': 'stomach_pump.n.01', 'name': 'stomach_pump'}, {'id': 11324, 'synset': 'stone_wall.n.01', 'name': 'stone_wall'}, {'id': 11325, 'synset': 'stoneware.n.01', 'name': 'stoneware'}, {'id': 11326, 'synset': 'stonework.n.01', 'name': 'stonework'}, {'id': 11327, 'synset': 'stoop.n.03', 'name': 'stoop'}, {'id': 11328, 'synset': 'stop_bath.n.01', 'name': 'stop_bath'}, {'id': 11329, 'synset': 'stopcock.n.01', 'name': 'stopcock'}, {'id': 11330, 'synset': 'stopper_knot.n.01', 'name': 'stopper_knot'}, {'id': 11331, 'synset': 'stopwatch.n.01', 'name': 'stopwatch'}, {'id': 11332, 'synset': 'storage_battery.n.01', 'name': 'storage_battery'}, {'id': 11333, 'synset': 'storage_cell.n.01', 'name': 'storage_cell'}, {'id': 11334, 'synset': 'storage_ring.n.01', 'name': 'storage_ring'}, {'id': 11335, 'synset': 'storage_space.n.01', 'name': 'storage_space'}, {'id': 11336, 'synset': 'storeroom.n.01', 'name': 'storeroom'}, {'id': 11337, 'synset': 'storm_cellar.n.01', 'name': 'storm_cellar'}, {'id': 11338, 'synset': 'storm_door.n.01', 'name': 'storm_door'}, {'id': 11339, 'synset': 'storm_window.n.01', 'name': 'storm_window'}, {'id': 11340, 'synset': 'stoup.n.02', 'name': 'stoup'}, {'id': 11341, 'synset': 'stoup.n.01', 'name': 'stoup'}, {'id': 11342, 'synset': 'stove.n.02', 'name': 'stove'}, {'id': 11343, 'synset': 'stove_bolt.n.01', 'name': 'stove_bolt'}, {'id': 11344, 'synset': 'stovepipe.n.01', 'name': 'stovepipe'}, {'id': 11345, 'synset': 'stovepipe_iron.n.01', 'name': 'stovepipe_iron'}, {'id': 11346, 'synset': 'stradavarius.n.01', 'name': 'Stradavarius'}, {'id': 11347, 'synset': 'straight_chair.n.01', 'name': 'straight_chair'}, {'id': 11348, 'synset': 'straightedge.n.01', 'name': 'straightedge'}, {'id': 11349, 'synset': 'straightener.n.01', 'name': 'straightener'}, {'id': 11350, 'synset': 'straight_flute.n.01', 'name': 'straight_flute'}, {'id': 11351, 'synset': 'straight_pin.n.01', 'name': 'straight_pin'}, {'id': 11352, 'synset': 'straight_razor.n.01', 'name': 'straight_razor'}, {'id': 11353, 'synset': 'straitjacket.n.02', 'name': 'straitjacket'}, {'id': 11354, 'synset': 'strap.n.04', 'name': 'strap'}, {'id': 11355, 'synset': 'strap_hinge.n.01', 'name': 'strap_hinge'}, {'id': 11356, 'synset': 'strapless.n.01', 'name': 'strapless'}, {'id': 11357, 'synset': 'streamer_fly.n.01', 'name': 'streamer_fly'}, {'id': 11358, 'synset': 'streamliner.n.01', 'name': 'streamliner'}, {'id': 11359, 'synset': 'street.n.01', 'name': 'street'}, {'id': 11360, 'synset': 'street.n.02', 'name': 'street'}, {'id': 11361, 'synset': 'streetcar.n.01', 'name': 'streetcar'}, {'id': 11362, 'synset': 'street_clothes.n.01', 'name': 'street_clothes'}, {'id': 11363, 'synset': 'stretcher.n.03', 'name': 'stretcher'}, {'id': 11364, 'synset': 'stretcher.n.01', 'name': 'stretcher'}, {'id': 11365, 'synset': 'stretch_pants.n.01', 'name': 'stretch_pants'}, {'id': 11366, 'synset': 'strickle.n.02', 'name': 'strickle'}, {'id': 11367, 'synset': 'strickle.n.01', 'name': 'strickle'}, {'id': 11368, 'synset': 'stringed_instrument.n.01', 'name': 'stringed_instrument'}, {'id': 11369, 'synset': 'stringer.n.04', 'name': 'stringer'}, {'id': 11370, 'synset': 'stringer.n.03', 'name': 'stringer'}, {'id': 11371, 'synset': 'string_tie.n.01', 'name': 'string_tie'}, {'id': 11372, 'synset': 'strip.n.05', 'name': 'strip'}, {'id': 11373, 'synset': 'strip_lighting.n.01', 'name': 'strip_lighting'}, {'id': 11374, 'synset': 'strip_mall.n.01', 'name': 'strip_mall'}, {'id': 11375, 'synset': 'stroboscope.n.01', 'name': 'stroboscope'}, {'id': 11376, 'synset': 'strongbox.n.01', 'name': 'strongbox'}, {'id': 11377, 'synset': 'stronghold.n.01', 'name': 'stronghold'}, {'id': 11378, 'synset': 'strongroom.n.01', 'name': 'strongroom'}, {'id': 11379, 'synset': 'strop.n.01', 'name': 'strop'}, {'id': 11380, 'synset': 'structural_member.n.01', 'name': 'structural_member'}, {'id': 11381, 'synset': 'structure.n.01', 'name': 'structure'}, {'id': 11382, 'synset': 'student_center.n.01', 'name': 'student_center'}, {'id': 11383, 'synset': 'student_lamp.n.01', 'name': 'student_lamp'}, {'id': 11384, 'synset': 'student_union.n.01', 'name': 'student_union'}, {'id': 11385, 'synset': 'stud_finder.n.01', 'name': 'stud_finder'}, {'id': 11386, 'synset': 'studio_apartment.n.01', 'name': 'studio_apartment'}, {'id': 11387, 'synset': 'studio_couch.n.01', 'name': 'studio_couch'}, {'id': 11388, 'synset': 'study.n.05', 'name': 'study'}, {'id': 11389, 'synset': 'study_hall.n.02', 'name': 'study_hall'}, {'id': 11390, 'synset': 'stuffing_nut.n.01', 'name': 'stuffing_nut'}, {'id': 11391, 'synset': 'stump.n.03', 'name': 'stump'}, {'id': 11392, 'synset': 'stun_gun.n.01', 'name': 'stun_gun'}, {'id': 11393, 'synset': 'stupa.n.01', 'name': 'stupa'}, {'id': 11394, 'synset': 'sty.n.02', 'name': 'sty'}, {'id': 11395, 'synset': 'stylus.n.01', 'name': 'stylus'}, {'id': 11396, 'synset': 'sub-assembly.n.01', 'name': 'sub-assembly'}, {'id': 11397, 'synset': 'subcompact.n.01', 'name': 'subcompact'}, {'id': 11398, 'synset': 'submachine_gun.n.01', 'name': 'submachine_gun'}, {'id': 11399, 'synset': 'submarine.n.01', 'name': 'submarine'}, {'id': 11400, 'synset': 'submarine_torpedo.n.01', 'name': 'submarine_torpedo'}, {'id': 11401, 'synset': 'submersible.n.02', 'name': 'submersible'}, {'id': 11402, 'synset': 'submersible.n.01', 'name': 'submersible'}, {'id': 11403, 'synset': 'subtracter.n.02', 'name': 'subtracter'}, {'id': 11404, 'synset': 'subway_token.n.01', 'name': 'subway_token'}, {'id': 11405, 'synset': 'subway_train.n.01', 'name': 'subway_train'}, {'id': 11406, 'synset': 'suction_cup.n.01', 'name': 'suction_cup'}, {'id': 11407, 'synset': 'suction_pump.n.01', 'name': 'suction_pump'}, {'id': 11408, 'synset': 'sudatorium.n.01', 'name': 'sudatorium'}, {'id': 11409, 'synset': 'suede_cloth.n.01', 'name': 'suede_cloth'}, {'id': 11410, 'synset': 'sugar_refinery.n.01', 'name': 'sugar_refinery'}, {'id': 11411, 'synset': 'sugar_spoon.n.01', 'name': 'sugar_spoon'}, {'id': 11412, 'synset': 'suite.n.02', 'name': 'suite'}, {'id': 11413, 'synset': 'suiting.n.01', 'name': 'suiting'}, {'id': 11414, 'synset': 'sulky.n.01', 'name': 'sulky'}, {'id': 11415, 'synset': 'summer_house.n.01', 'name': 'summer_house'}, {'id': 11416, 'synset': 'sumo_ring.n.01', 'name': 'sumo_ring'}, {'id': 11417, 'synset': 'sump.n.01', 'name': 'sump'}, {'id': 11418, 'synset': 'sump_pump.n.01', 'name': 'sump_pump'}, {'id': 11419, 'synset': 'sunbonnet.n.01', 'name': 'sunbonnet'}, {'id': 11420, 'synset': 'sunday_best.n.01', 'name': 'Sunday_best'}, {'id': 11421, 'synset': 'sun_deck.n.01', 'name': 'sun_deck'}, {'id': 11422, 'synset': 'sundial.n.01', 'name': 'sundial'}, {'id': 11423, 'synset': 'sundress.n.01', 'name': 'sundress'}, {'id': 11424, 'synset': 'sundries.n.01', 'name': 'sundries'}, {'id': 11425, 'synset': 'sun_gear.n.01', 'name': 'sun_gear'}, {'id': 11426, 'synset': 'sunglass.n.01', 'name': 'sunglass'}, {'id': 11427, 'synset': 'sunlamp.n.01', 'name': 'sunlamp'}, {'id': 11428, 'synset': 'sun_parlor.n.01', 'name': 'sun_parlor'}, {'id': 11429, 'synset': 'sunroof.n.01', 'name': 'sunroof'}, {'id': 11430, 'synset': 'sunscreen.n.01', 'name': 'sunscreen'}, {'id': 11431, 'synset': 'sunsuit.n.01', 'name': 'sunsuit'}, {'id': 11432, 'synset': 'supercharger.n.01', 'name': 'supercharger'}, {'id': 11433, 'synset': 'supercomputer.n.01', 'name': 'supercomputer'}, {'id': 11434, 'synset': 'superconducting_supercollider.n.01', 'name': 'superconducting_supercollider'}, {'id': 11435, 'synset': 'superhighway.n.02', 'name': 'superhighway'}, {'id': 11436, 'synset': 'supermarket.n.01', 'name': 'supermarket'}, {'id': 11437, 'synset': 'superstructure.n.01', 'name': 'superstructure'}, {'id': 11438, 'synset': 'supertanker.n.01', 'name': 'supertanker'}, {'id': 11439, 'synset': 'supper_club.n.01', 'name': 'supper_club'}, {'id': 11440, 'synset': 'supplejack.n.01', 'name': 'supplejack'}, {'id': 11441, 'synset': 'supply_chamber.n.01', 'name': 'supply_chamber'}, {'id': 11442, 'synset': 'supply_closet.n.01', 'name': 'supply_closet'}, {'id': 11443, 'synset': 'support.n.10', 'name': 'support'}, {'id': 11444, 'synset': 'support.n.07', 'name': 'support'}, {'id': 11445, 'synset': 'support_column.n.01', 'name': 'support_column'}, {'id': 11446, 'synset': 'support_hose.n.01', 'name': 'support_hose'}, {'id': 11447, 'synset': 'supporting_structure.n.01', 'name': 'supporting_structure'}, {'id': 11448, 'synset': 'supporting_tower.n.01', 'name': 'supporting_tower'}, {'id': 11449, 'synset': 'surcoat.n.02', 'name': 'surcoat'}, {'id': 11450, 'synset': 'surface_gauge.n.01', 'name': 'surface_gauge'}, {'id': 11451, 'synset': 'surface_lift.n.01', 'name': 'surface_lift'}, {'id': 11452, 'synset': 'surface_search_radar.n.01', 'name': 'surface_search_radar'}, {'id': 11453, 'synset': 'surface_ship.n.01', 'name': 'surface_ship'}, {'id': 11454, 'synset': 'surface-to-air_missile.n.01', 'name': 'surface-to-air_missile'}, {'id': 11455, 'synset': 'surface-to-air_missile_system.n.01', 'name': 'surface-to-air_missile_system'}, {'id': 11456, 'synset': 'surfboat.n.01', 'name': 'surfboat'}, {'id': 11457, 'synset': 'surcoat.n.01', 'name': 'surcoat'}, {'id': 11458, 'synset': "surgeon's_knot.n.01", 'name': "surgeon's_knot"}, {'id': 11459, 'synset': 'surgery.n.02', 'name': 'surgery'}, {'id': 11460, 'synset': 'surge_suppressor.n.01', 'name': 'surge_suppressor'}, {'id': 11461, 'synset': 'surgical_dressing.n.01', 'name': 'surgical_dressing'}, {'id': 11462, 'synset': 'surgical_instrument.n.01', 'name': 'surgical_instrument'}, {'id': 11463, 'synset': 'surgical_knife.n.01', 'name': 'surgical_knife'}, {'id': 11464, 'synset': 'surplice.n.01', 'name': 'surplice'}, {'id': 11465, 'synset': 'surrey.n.02', 'name': 'surrey'}, {'id': 11466, 'synset': 'surtout.n.01', 'name': 'surtout'}, {'id': 11467, 'synset': 'surveillance_system.n.01', 'name': 'surveillance_system'}, {'id': 11468, 'synset': 'surveying_instrument.n.01', 'name': 'surveying_instrument'}, {'id': 11469, 'synset': "surveyor's_level.n.01", 'name': "surveyor's_level"}, {'id': 11470, 'synset': 'sushi_bar.n.01', 'name': 'sushi_bar'}, {'id': 11471, 'synset': 'suspension.n.05', 'name': 'suspension'}, {'id': 11472, 'synset': 'suspension_bridge.n.01', 'name': 'suspension_bridge'}, {'id': 11473, 'synset': 'suspensory.n.01', 'name': 'suspensory'}, {'id': 11474, 'synset': 'sustaining_pedal.n.01', 'name': 'sustaining_pedal'}, {'id': 11475, 'synset': 'suture.n.02', 'name': 'suture'}, {'id': 11476, 'synset': 'swab.n.01', 'name': 'swab'}, {'id': 11477, 'synset': 'swaddling_clothes.n.01', 'name': 'swaddling_clothes'}, {'id': 11478, 'synset': 'swag.n.03', 'name': 'swag'}, {'id': 11479, 'synset': 'swage_block.n.01', 'name': 'swage_block'}, {'id': 11480, 'synset': 'swagger_stick.n.01', 'name': 'swagger_stick'}, {'id': 11481, 'synset': 'swallow-tailed_coat.n.01', 'name': 'swallow-tailed_coat'}, {'id': 11482, 'synset': 'swamp_buggy.n.01', 'name': 'swamp_buggy'}, {'id': 11483, 'synset': "swan's_down.n.01", 'name': "swan's_down"}, {'id': 11484, 'synset': 'swathe.n.01', 'name': 'swathe'}, {'id': 11485, 'synset': 'swatter.n.01', 'name': 'swatter'}, {'id': 11486, 'synset': 'sweat_bag.n.01', 'name': 'sweat_bag'}, {'id': 11487, 'synset': 'sweatband.n.01', 'name': 'sweatband'}, {'id': 11488, 'synset': 'sweatshop.n.01', 'name': 'sweatshop'}, {'id': 11489, 'synset': 'sweat_suit.n.01', 'name': 'sweat_suit'}, {'id': 11490, 'synset': 'sweep.n.04', 'name': 'sweep'}, {'id': 11491, 'synset': 'sweep_hand.n.01', 'name': 'sweep_hand'}, {'id': 11492, 'synset': 'swimming_trunks.n.01', 'name': 'swimming_trunks'}, {'id': 11493, 'synset': 'swing.n.02', 'name': 'swing'}, {'id': 11494, 'synset': 'swing_door.n.01', 'name': 'swing_door'}, {'id': 11495, 'synset': 'switch.n.01', 'name': 'switch'}, {'id': 11496, 'synset': 'switchblade.n.01', 'name': 'switchblade'}, {'id': 11497, 'synset': 'switch_engine.n.01', 'name': 'switch_engine'}, {'id': 11498, 'synset': 'swivel.n.01', 'name': 'swivel'}, {'id': 11499, 'synset': 'swivel_chair.n.01', 'name': 'swivel_chair'}, {'id': 11500, 'synset': 'swizzle_stick.n.01', 'name': 'swizzle_stick'}, {'id': 11501, 'synset': 'sword_cane.n.01', 'name': 'sword_cane'}, {'id': 11502, 'synset': 's_wrench.n.01', 'name': 'S_wrench'}, {'id': 11503, 'synset': 'synagogue.n.01', 'name': 'synagogue'}, {'id': 11504, 'synset': 'synchrocyclotron.n.01', 'name': 'synchrocyclotron'}, {'id': 11505, 'synset': 'synchroflash.n.01', 'name': 'synchroflash'}, {'id': 11506, 'synset': 'synchromesh.n.01', 'name': 'synchromesh'}, {'id': 11507, 'synset': 'synchronous_converter.n.01', 'name': 'synchronous_converter'}, {'id': 11508, 'synset': 'synchronous_motor.n.01', 'name': 'synchronous_motor'}, {'id': 11509, 'synset': 'synchrotron.n.01', 'name': 'synchrotron'}, {'id': 11510, 'synset': 'synchroscope.n.01', 'name': 'synchroscope'}, {'id': 11511, 'synset': 'synthesizer.n.02', 'name': 'synthesizer'}, {'id': 11512, 'synset': 'system.n.01', 'name': 'system'}, {'id': 11513, 'synset': 'tabard.n.01', 'name': 'tabard'}, {'id': 11514, 'synset': 'tabernacle.n.02', 'name': 'Tabernacle'}, {'id': 11515, 'synset': 'tabi.n.01', 'name': 'tabi'}, {'id': 11516, 'synset': 'tab_key.n.01', 'name': 'tab_key'}, {'id': 11517, 'synset': 'table.n.03', 'name': 'table'}, {'id': 11518, 'synset': 'tablefork.n.01', 'name': 'tablefork'}, {'id': 11519, 'synset': 'table_knife.n.01', 'name': 'table_knife'}, {'id': 11520, 'synset': 'table_saw.n.01', 'name': 'table_saw'}, {'id': 11521, 'synset': 'tablespoon.n.02', 'name': 'tablespoon'}, {'id': 11522, 'synset': 'tablet-armed_chair.n.01', 'name': 'tablet-armed_chair'}, {'id': 11523, 'synset': 'table-tennis_racquet.n.01', 'name': 'table-tennis_racquet'}, {'id': 11524, 'synset': 'tabletop.n.01', 'name': 'tabletop'}, {'id': 11525, 'synset': 'tableware.n.01', 'name': 'tableware'}, {'id': 11526, 'synset': 'tabor.n.01', 'name': 'tabor'}, {'id': 11527, 'synset': 'taboret.n.01', 'name': 'taboret'}, {'id': 11528, 'synset': 'tachistoscope.n.01', 'name': 'tachistoscope'}, {'id': 11529, 'synset': 'tachograph.n.01', 'name': 'tachograph'}, {'id': 11530, 'synset': 'tachymeter.n.01', 'name': 'tachymeter'}, {'id': 11531, 'synset': 'tack.n.02', 'name': 'tack'}, {'id': 11532, 'synset': 'tack_hammer.n.01', 'name': 'tack_hammer'}, {'id': 11533, 'synset': 'taffeta.n.01', 'name': 'taffeta'}, {'id': 11534, 'synset': 'taffrail.n.01', 'name': 'taffrail'}, {'id': 11535, 'synset': 'tailgate.n.01', 'name': 'tailgate'}, {'id': 11536, 'synset': 'tailor-made.n.01', 'name': 'tailor-made'}, {'id': 11537, 'synset': "tailor's_chalk.n.01", 'name': "tailor's_chalk"}, {'id': 11538, 'synset': 'tailpipe.n.01', 'name': 'tailpipe'}, {'id': 11539, 'synset': 'tail_rotor.n.01', 'name': 'tail_rotor'}, {'id': 11540, 'synset': 'tailstock.n.01', 'name': 'tailstock'}, {'id': 11541, 'synset': 'take-up.n.01', 'name': 'take-up'}, {'id': 11542, 'synset': 'talaria.n.01', 'name': 'talaria'}, {'id': 11543, 'synset': 'talcum.n.02', 'name': 'talcum'}, {'id': 11544, 'synset': 'tam.n.01', 'name': 'tam'}, {'id': 11545, 'synset': 'tambour.n.02', 'name': 'tambour'}, {'id': 11546, 'synset': 'tambour.n.01', 'name': 'tambour'}, {'id': 11547, 'synset': 'tammy.n.01', 'name': 'tammy'}, {'id': 11548, 'synset': 'tamp.n.01', 'name': 'tamp'}, {'id': 11549, 'synset': 'tampax.n.01', 'name': 'Tampax'}, {'id': 11550, 'synset': 'tampion.n.01', 'name': 'tampion'}, {'id': 11551, 'synset': 'tampon.n.01', 'name': 'tampon'}, {'id': 11552, 'synset': 'tandoor.n.01', 'name': 'tandoor'}, {'id': 11553, 'synset': 'tangram.n.01', 'name': 'tangram'}, {'id': 11554, 'synset': 'tankard.n.01', 'name': 'tankard'}, {'id': 11555, 'synset': 'tank_car.n.01', 'name': 'tank_car'}, {'id': 11556, 'synset': 'tank_destroyer.n.01', 'name': 'tank_destroyer'}, {'id': 11557, 'synset': 'tank_engine.n.01', 'name': 'tank_engine'}, {'id': 11558, 'synset': 'tanker_plane.n.01', 'name': 'tanker_plane'}, {'id': 11559, 'synset': 'tank_shell.n.01', 'name': 'tank_shell'}, {'id': 11560, 'synset': 'tannoy.n.01', 'name': 'tannoy'}, {'id': 11561, 'synset': 'tap.n.06', 'name': 'tap'}, {'id': 11562, 'synset': 'tapa.n.02', 'name': 'tapa'}, {'id': 11563, 'synset': 'tape.n.02', 'name': 'tape'}, {'id': 11564, 'synset': 'tape_deck.n.01', 'name': 'tape_deck'}, {'id': 11565, 'synset': 'tape_drive.n.01', 'name': 'tape_drive'}, {'id': 11566, 'synset': 'tape_player.n.01', 'name': 'tape_player'}, {'id': 11567, 'synset': 'tape_recorder.n.01', 'name': 'tape_recorder'}, {'id': 11568, 'synset': 'taper_file.n.01', 'name': 'taper_file'}, {'id': 11569, 'synset': 'tappet.n.01', 'name': 'tappet'}, {'id': 11570, 'synset': 'tap_wrench.n.01', 'name': 'tap_wrench'}, {'id': 11571, 'synset': 'tare.n.05', 'name': 'tare'}, {'id': 11572, 'synset': 'target.n.04', 'name': 'target'}, {'id': 11573, 'synset': 'target_acquisition_system.n.01', 'name': 'target_acquisition_system'}, {'id': 11574, 'synset': 'tarmacadam.n.02', 'name': 'tarmacadam'}, {'id': 11575, 'synset': 'tasset.n.01', 'name': 'tasset'}, {'id': 11576, 'synset': 'tattoo.n.02', 'name': 'tattoo'}, {'id': 11577, 'synset': 'tavern.n.01', 'name': 'tavern'}, {'id': 11578, 'synset': 'tawse.n.01', 'name': 'tawse'}, {'id': 11579, 'synset': 'taximeter.n.01', 'name': 'taximeter'}, {'id': 11580, 'synset': 't-bar_lift.n.01', 'name': 'T-bar_lift'}, {'id': 11581, 'synset': 'tea_bag.n.02', 'name': 'tea_bag'}, {'id': 11582, 'synset': 'tea_ball.n.01', 'name': 'tea_ball'}, {'id': 11583, 'synset': 'tea_cart.n.01', 'name': 'tea_cart'}, {'id': 11584, 'synset': 'tea_chest.n.01', 'name': 'tea_chest'}, {'id': 11585, 'synset': 'teaching_aid.n.01', 'name': 'teaching_aid'}, {'id': 11586, 'synset': 'tea_gown.n.01', 'name': 'tea_gown'}, {'id': 11587, 'synset': 'tea_maker.n.01', 'name': 'tea_maker'}, {'id': 11588, 'synset': 'teashop.n.01', 'name': 'teashop'}, {'id': 11589, 'synset': 'teaspoon.n.02', 'name': 'teaspoon'}, {'id': 11590, 'synset': 'tea-strainer.n.01', 'name': 'tea-strainer'}, {'id': 11591, 'synset': 'tea_table.n.01', 'name': 'tea_table'}, {'id': 11592, 'synset': 'tea_tray.n.01', 'name': 'tea_tray'}, {'id': 11593, 'synset': 'tea_urn.n.01', 'name': 'tea_urn'}, {'id': 11594, 'synset': 'tee.n.03', 'name': 'tee'}, {'id': 11595, 'synset': 'tee_hinge.n.01', 'name': 'tee_hinge'}, {'id': 11596, 'synset': 'telecom_hotel.n.01', 'name': 'telecom_hotel'}, {'id': 11597, 'synset': 'telecommunication_system.n.01', 'name': 'telecommunication_system'}, {'id': 11598, 'synset': 'telegraph.n.01', 'name': 'telegraph'}, {'id': 11599, 'synset': 'telegraph_key.n.01', 'name': 'telegraph_key'}, {'id': 11600, 'synset': 'telemeter.n.01', 'name': 'telemeter'}, {'id': 11601, 'synset': 'telephone_bell.n.01', 'name': 'telephone_bell'}, {'id': 11602, 'synset': 'telephone_cord.n.01', 'name': 'telephone_cord'}, {'id': 11603, 'synset': 'telephone_jack.n.01', 'name': 'telephone_jack'}, {'id': 11604, 'synset': 'telephone_line.n.02', 'name': 'telephone_line'}, {'id': 11605, 'synset': 'telephone_plug.n.01', 'name': 'telephone_plug'}, {'id': 11606, 'synset': 'telephone_receiver.n.01', 'name': 'telephone_receiver'}, {'id': 11607, 'synset': 'telephone_system.n.01', 'name': 'telephone_system'}, {'id': 11608, 'synset': 'telephone_wire.n.01', 'name': 'telephone_wire'}, {'id': 11609, 'synset': 'teleprompter.n.01', 'name': 'Teleprompter'}, {'id': 11610, 'synset': 'telescope.n.01', 'name': 'telescope'}, {'id': 11611, 'synset': 'telescopic_sight.n.01', 'name': 'telescopic_sight'}, {'id': 11612, 'synset': 'telethermometer.n.01', 'name': 'telethermometer'}, {'id': 11613, 'synset': 'teletypewriter.n.01', 'name': 'teletypewriter'}, {'id': 11614, 'synset': 'television.n.02', 'name': 'television'}, {'id': 11615, 'synset': 'television_antenna.n.01', 'name': 'television_antenna'}, {'id': 11616, 'synset': 'television_equipment.n.01', 'name': 'television_equipment'}, {'id': 11617, 'synset': 'television_monitor.n.01', 'name': 'television_monitor'}, {'id': 11618, 'synset': 'television_room.n.01', 'name': 'television_room'}, {'id': 11619, 'synset': 'television_transmitter.n.01', 'name': 'television_transmitter'}, {'id': 11620, 'synset': 'telpher.n.01', 'name': 'telpher'}, {'id': 11621, 'synset': 'telpherage.n.01', 'name': 'telpherage'}, {'id': 11622, 'synset': 'tempera.n.01', 'name': 'tempera'}, {'id': 11623, 'synset': 'temple.n.01', 'name': 'temple'}, {'id': 11624, 'synset': 'temple.n.03', 'name': 'temple'}, {'id': 11625, 'synset': 'temporary_hookup.n.01', 'name': 'temporary_hookup'}, {'id': 11626, 'synset': 'tender.n.06', 'name': 'tender'}, {'id': 11627, 'synset': 'tender.n.05', 'name': 'tender'}, {'id': 11628, 'synset': 'tender.n.04', 'name': 'tender'}, {'id': 11629, 'synset': 'tenement.n.01', 'name': 'tenement'}, {'id': 11630, 'synset': 'tennis_camp.n.01', 'name': 'tennis_camp'}, {'id': 11631, 'synset': 'tenon.n.01', 'name': 'tenon'}, {'id': 11632, 'synset': 'tenor_drum.n.01', 'name': 'tenor_drum'}, {'id': 11633, 'synset': 'tenoroon.n.01', 'name': 'tenoroon'}, {'id': 11634, 'synset': 'tenpenny_nail.n.01', 'name': 'tenpenny_nail'}, {'id': 11635, 'synset': 'tenpin.n.01', 'name': 'tenpin'}, {'id': 11636, 'synset': 'tensimeter.n.01', 'name': 'tensimeter'}, {'id': 11637, 'synset': 'tensiometer.n.03', 'name': 'tensiometer'}, {'id': 11638, 'synset': 'tensiometer.n.02', 'name': 'tensiometer'}, {'id': 11639, 'synset': 'tensiometer.n.01', 'name': 'tensiometer'}, {'id': 11640, 'synset': 'tent.n.01', 'name': 'tent'}, {'id': 11641, 'synset': 'tenter.n.01', 'name': 'tenter'}, {'id': 11642, 'synset': 'tenterhook.n.01', 'name': 'tenterhook'}, {'id': 11643, 'synset': 'tent-fly.n.01', 'name': 'tent-fly'}, {'id': 11644, 'synset': 'tent_peg.n.01', 'name': 'tent_peg'}, {'id': 11645, 'synset': 'tepee.n.01', 'name': 'tepee'}, {'id': 11646, 'synset': 'terminal.n.02', 'name': 'terminal'}, {'id': 11647, 'synset': 'terminal.n.04', 'name': 'terminal'}, {'id': 11648, 'synset': 'terraced_house.n.01', 'name': 'terraced_house'}, {'id': 11649, 'synset': 'terra_cotta.n.01', 'name': 'terra_cotta'}, {'id': 11650, 'synset': 'terrarium.n.01', 'name': 'terrarium'}, {'id': 11651, 'synset': 'terra_sigillata.n.01', 'name': 'terra_sigillata'}, {'id': 11652, 'synset': 'terry.n.02', 'name': 'terry'}, {'id': 11653, 'synset': 'tesla_coil.n.01', 'name': 'Tesla_coil'}, {'id': 11654, 'synset': 'tessera.n.01', 'name': 'tessera'}, {'id': 11655, 'synset': 'test_equipment.n.01', 'name': 'test_equipment'}, {'id': 11656, 'synset': 'test_rocket.n.01', 'name': 'test_rocket'}, {'id': 11657, 'synset': 'test_room.n.01', 'name': 'test_room'}, {'id': 11658, 'synset': 'testudo.n.01', 'name': 'testudo'}, {'id': 11659, 'synset': 'tetraskelion.n.01', 'name': 'tetraskelion'}, {'id': 11660, 'synset': 'tetrode.n.01', 'name': 'tetrode'}, {'id': 11661, 'synset': 'textile_machine.n.01', 'name': 'textile_machine'}, {'id': 11662, 'synset': 'textile_mill.n.01', 'name': 'textile_mill'}, {'id': 11663, 'synset': 'thatch.n.04', 'name': 'thatch'}, {'id': 11664, 'synset': 'theater.n.01', 'name': 'theater'}, {'id': 11665, 'synset': 'theater_curtain.n.01', 'name': 'theater_curtain'}, {'id': 11666, 'synset': 'theater_light.n.01', 'name': 'theater_light'}, {'id': 11667, 'synset': 'theodolite.n.01', 'name': 'theodolite'}, {'id': 11668, 'synset': 'theremin.n.01', 'name': 'theremin'}, {'id': 11669, 'synset': 'thermal_printer.n.01', 'name': 'thermal_printer'}, {'id': 11670, 'synset': 'thermal_reactor.n.01', 'name': 'thermal_reactor'}, {'id': 11671, 'synset': 'thermocouple.n.01', 'name': 'thermocouple'}, {'id': 11672, 'synset': 'thermoelectric_thermometer.n.01', 'name': 'thermoelectric_thermometer'}, {'id': 11673, 'synset': 'thermograph.n.02', 'name': 'thermograph'}, {'id': 11674, 'synset': 'thermograph.n.01', 'name': 'thermograph'}, {'id': 11675, 'synset': 'thermohydrometer.n.01', 'name': 'thermohydrometer'}, {'id': 11676, 'synset': 'thermojunction.n.01', 'name': 'thermojunction'}, {'id': 11677, 'synset': 'thermonuclear_reactor.n.01', 'name': 'thermonuclear_reactor'}, {'id': 11678, 'synset': 'thermopile.n.01', 'name': 'thermopile'}, {'id': 11679, 'synset': 'thigh_pad.n.01', 'name': 'thigh_pad'}, {'id': 11680, 'synset': 'thill.n.01', 'name': 'thill'}, {'id': 11681, 'synset': 'thinning_shears.n.01', 'name': 'thinning_shears'}, {'id': 11682, 'synset': 'third_base.n.01', 'name': 'third_base'}, {'id': 11683, 'synset': 'third_gear.n.01', 'name': 'third_gear'}, {'id': 11684, 'synset': 'third_rail.n.01', 'name': 'third_rail'}, {'id': 11685, 'synset': 'thong.n.03', 'name': 'thong'}, {'id': 11686, 'synset': 'thong.n.02', 'name': 'thong'}, {'id': 11687, 'synset': 'three-centered_arch.n.01', 'name': 'three-centered_arch'}, {'id': 11688, 'synset': 'three-decker.n.02', 'name': 'three-decker'}, {'id': 11689, 'synset': 'three-dimensional_radar.n.01', 'name': 'three-dimensional_radar'}, {'id': 11690, 'synset': 'three-piece_suit.n.01', 'name': 'three-piece_suit'}, {'id': 11691, 'synset': 'three-quarter_binding.n.01', 'name': 'three-quarter_binding'}, {'id': 11692, 'synset': 'three-way_switch.n.01', 'name': 'three-way_switch'}, {'id': 11693, 'synset': 'thresher.n.01', 'name': 'thresher'}, {'id': 11694, 'synset': 'threshing_floor.n.01', 'name': 'threshing_floor'}, {'id': 11695, 'synset': 'thriftshop.n.01', 'name': 'thriftshop'}, {'id': 11696, 'synset': 'throat_protector.n.01', 'name': 'throat_protector'}, {'id': 11697, 'synset': 'throne.n.01', 'name': 'throne'}, {'id': 11698, 'synset': 'thrust_bearing.n.01', 'name': 'thrust_bearing'}, {'id': 11699, 'synset': 'thruster.n.02', 'name': 'thruster'}, {'id': 11700, 'synset': 'thumb.n.02', 'name': 'thumb'}, {'id': 11701, 'synset': 'thumbhole.n.02', 'name': 'thumbhole'}, {'id': 11702, 'synset': 'thumbscrew.n.02', 'name': 'thumbscrew'}, {'id': 11703, 'synset': 'thumbstall.n.01', 'name': 'thumbstall'}, {'id': 11704, 'synset': 'thunderer.n.02', 'name': 'thunderer'}, {'id': 11705, 'synset': 'thwart.n.01', 'name': 'thwart'}, {'id': 11706, 'synset': 'ticking.n.02', 'name': 'ticking'}, {'id': 11707, 'synset': 'tickler_coil.n.01', 'name': 'tickler_coil'}, {'id': 11708, 'synset': 'tie.n.04', 'name': 'tie'}, {'id': 11709, 'synset': 'tie.n.08', 'name': 'tie'}, {'id': 11710, 'synset': 'tie_rack.n.01', 'name': 'tie_rack'}, {'id': 11711, 'synset': 'tie_rod.n.01', 'name': 'tie_rod'}, {'id': 11712, 'synset': 'tile.n.01', 'name': 'tile'}, {'id': 11713, 'synset': 'tile_cutter.n.01', 'name': 'tile_cutter'}, {'id': 11714, 'synset': 'tile_roof.n.01', 'name': 'tile_roof'}, {'id': 11715, 'synset': 'tiller.n.03', 'name': 'tiller'}, {'id': 11716, 'synset': 'tilter.n.02', 'name': 'tilter'}, {'id': 11717, 'synset': 'tilt-top_table.n.01', 'name': 'tilt-top_table'}, {'id': 11718, 'synset': 'timber.n.02', 'name': 'timber'}, {'id': 11719, 'synset': 'timber.n.03', 'name': 'timber'}, {'id': 11720, 'synset': 'timber_hitch.n.01', 'name': 'timber_hitch'}, {'id': 11721, 'synset': 'timbrel.n.01', 'name': 'timbrel'}, {'id': 11722, 'synset': 'time_bomb.n.02', 'name': 'time_bomb'}, {'id': 11723, 'synset': 'time_capsule.n.01', 'name': 'time_capsule'}, {'id': 11724, 'synset': 'time_clock.n.01', 'name': 'time_clock'}, {'id': 11725, 'synset': 'time-delay_measuring_instrument.n.01', 'name': 'time-delay_measuring_instrument'}, {'id': 11726, 'synset': 'time-fuse.n.01', 'name': 'time-fuse'}, {'id': 11727, 'synset': 'timepiece.n.01', 'name': 'timepiece'}, {'id': 11728, 'synset': 'timer.n.03', 'name': 'timer'}, {'id': 11729, 'synset': 'time-switch.n.01', 'name': 'time-switch'}, {'id': 11730, 'synset': 'tin.n.02', 'name': 'tin'}, {'id': 11731, 'synset': 'tinderbox.n.02', 'name': 'tinderbox'}, {'id': 11732, 'synset': 'tine.n.01', 'name': 'tine'}, {'id': 11733, 'synset': 'tippet.n.01', 'name': 'tippet'}, {'id': 11734, 'synset': 'tire_chain.n.01', 'name': 'tire_chain'}, {'id': 11735, 'synset': 'tire_iron.n.01', 'name': 'tire_iron'}, {'id': 11736, 'synset': 'titfer.n.01', 'name': 'titfer'}, {'id': 11737, 'synset': 'tithe_barn.n.01', 'name': 'tithe_barn'}, {'id': 11738, 'synset': 'titrator.n.01', 'name': 'titrator'}, {'id': 11739, 'synset': 'toasting_fork.n.01', 'name': 'toasting_fork'}, {'id': 11740, 'synset': 'toastrack.n.01', 'name': 'toastrack'}, {'id': 11741, 'synset': 'tobacco_pouch.n.01', 'name': 'tobacco_pouch'}, {'id': 11742, 'synset': 'tobacco_shop.n.01', 'name': 'tobacco_shop'}, {'id': 11743, 'synset': 'toboggan.n.01', 'name': 'toboggan'}, {'id': 11744, 'synset': 'toby.n.01', 'name': 'toby'}, {'id': 11745, 'synset': 'tocsin.n.02', 'name': 'tocsin'}, {'id': 11746, 'synset': 'toe.n.02', 'name': 'toe'}, {'id': 11747, 'synset': 'toecap.n.01', 'name': 'toecap'}, {'id': 11748, 'synset': 'toehold.n.02', 'name': 'toehold'}, {'id': 11749, 'synset': 'toga.n.01', 'name': 'toga'}, {'id': 11750, 'synset': 'toga_virilis.n.01', 'name': 'toga_virilis'}, {'id': 11751, 'synset': 'toggle.n.03', 'name': 'toggle'}, {'id': 11752, 'synset': 'toggle_bolt.n.01', 'name': 'toggle_bolt'}, {'id': 11753, 'synset': 'toggle_joint.n.01', 'name': 'toggle_joint'}, {'id': 11754, 'synset': 'toggle_switch.n.01', 'name': 'toggle_switch'}, {'id': 11755, 'synset': 'togs.n.01', 'name': 'togs'}, {'id': 11756, 'synset': 'toilet.n.01', 'name': 'toilet'}, {'id': 11757, 'synset': 'toilet_bag.n.01', 'name': 'toilet_bag'}, {'id': 11758, 'synset': 'toilet_bowl.n.01', 'name': 'toilet_bowl'}, {'id': 11759, 'synset': 'toilet_kit.n.01', 'name': 'toilet_kit'}, {'id': 11760, 'synset': 'toilet_powder.n.01', 'name': 'toilet_powder'}, {'id': 11761, 'synset': 'toiletry.n.01', 'name': 'toiletry'}, {'id': 11762, 'synset': 'toilet_seat.n.01', 'name': 'toilet_seat'}, {'id': 11763, 'synset': 'toilet_water.n.01', 'name': 'toilet_water'}, {'id': 11764, 'synset': 'tokamak.n.01', 'name': 'tokamak'}, {'id': 11765, 'synset': 'token.n.03', 'name': 'token'}, {'id': 11766, 'synset': 'tollbooth.n.01', 'name': 'tollbooth'}, {'id': 11767, 'synset': 'toll_bridge.n.01', 'name': 'toll_bridge'}, {'id': 11768, 'synset': 'tollgate.n.01', 'name': 'tollgate'}, {'id': 11769, 'synset': 'toll_line.n.01', 'name': 'toll_line'}, {'id': 11770, 'synset': 'tomahawk.n.01', 'name': 'tomahawk'}, {'id': 11771, 'synset': 'tommy_gun.n.01', 'name': 'Tommy_gun'}, {'id': 11772, 'synset': 'tomograph.n.01', 'name': 'tomograph'}, {'id': 11773, 'synset': 'tone_arm.n.01', 'name': 'tone_arm'}, {'id': 11774, 'synset': 'toner.n.03', 'name': 'toner'}, {'id': 11775, 'synset': 'tongue.n.07', 'name': 'tongue'}, {'id': 11776, 'synset': 'tongue_and_groove_joint.n.01', 'name': 'tongue_and_groove_joint'}, {'id': 11777, 'synset': 'tongue_depressor.n.01', 'name': 'tongue_depressor'}, {'id': 11778, 'synset': 'tonometer.n.01', 'name': 'tonometer'}, {'id': 11779, 'synset': 'tool.n.01', 'name': 'tool'}, {'id': 11780, 'synset': 'tool_bag.n.01', 'name': 'tool_bag'}, {'id': 11781, 'synset': 'toolshed.n.01', 'name': 'toolshed'}, {'id': 11782, 'synset': 'tooth.n.02', 'name': 'tooth'}, {'id': 11783, 'synset': 'tooth.n.05', 'name': 'tooth'}, {'id': 11784, 'synset': 'top.n.10', 'name': 'top'}, {'id': 11785, 'synset': 'topgallant.n.02', 'name': 'topgallant'}, {'id': 11786, 'synset': 'topgallant.n.01', 'name': 'topgallant'}, {'id': 11787, 'synset': 'topiary.n.01', 'name': 'topiary'}, {'id': 11788, 'synset': 'topknot.n.01', 'name': 'topknot'}, {'id': 11789, 'synset': 'topmast.n.01', 'name': 'topmast'}, {'id': 11790, 'synset': 'topper.n.05', 'name': 'topper'}, {'id': 11791, 'synset': 'topsail.n.01', 'name': 'topsail'}, {'id': 11792, 'synset': 'toque.n.01', 'name': 'toque'}, {'id': 11793, 'synset': 'torch.n.01', 'name': 'torch'}, {'id': 11794, 'synset': 'torpedo.n.06', 'name': 'torpedo'}, {'id': 11795, 'synset': 'torpedo.n.05', 'name': 'torpedo'}, {'id': 11796, 'synset': 'torpedo.n.03', 'name': 'torpedo'}, {'id': 11797, 'synset': 'torpedo_boat.n.01', 'name': 'torpedo_boat'}, {'id': 11798, 'synset': 'torpedo-boat_destroyer.n.01', 'name': 'torpedo-boat_destroyer'}, {'id': 11799, 'synset': 'torpedo_tube.n.01', 'name': 'torpedo_tube'}, {'id': 11800, 'synset': 'torque_converter.n.01', 'name': 'torque_converter'}, {'id': 11801, 'synset': 'torque_wrench.n.01', 'name': 'torque_wrench'}, {'id': 11802, 'synset': 'torture_chamber.n.01', 'name': 'torture_chamber'}, {'id': 11803, 'synset': 'totem_pole.n.01', 'name': 'totem_pole'}, {'id': 11804, 'synset': 'touch_screen.n.01', 'name': 'touch_screen'}, {'id': 11805, 'synset': 'toupee.n.01', 'name': 'toupee'}, {'id': 11806, 'synset': 'touring_car.n.01', 'name': 'touring_car'}, {'id': 11807, 'synset': 'tourist_class.n.01', 'name': 'tourist_class'}, {'id': 11808, 'synset': 'toweling.n.01', 'name': 'toweling'}, {'id': 11809, 'synset': 'towel_rail.n.01', 'name': 'towel_rail'}, {'id': 11810, 'synset': 'tower.n.01', 'name': 'tower'}, {'id': 11811, 'synset': 'town_hall.n.01', 'name': 'town_hall'}, {'id': 11812, 'synset': 'towpath.n.01', 'name': 'towpath'}, {'id': 11813, 'synset': 'toy_box.n.01', 'name': 'toy_box'}, {'id': 11814, 'synset': 'toyshop.n.01', 'name': 'toyshop'}, {'id': 11815, 'synset': 'trace_detector.n.01', 'name': 'trace_detector'}, {'id': 11816, 'synset': 'track.n.09', 'name': 'track'}, {'id': 11817, 'synset': 'track.n.08', 'name': 'track'}, {'id': 11818, 'synset': 'trackball.n.01', 'name': 'trackball'}, {'id': 11819, 'synset': 'tracked_vehicle.n.01', 'name': 'tracked_vehicle'}, {'id': 11820, 'synset': 'tract_house.n.01', 'name': 'tract_house'}, {'id': 11821, 'synset': 'tract_housing.n.01', 'name': 'tract_housing'}, {'id': 11822, 'synset': 'traction_engine.n.01', 'name': 'traction_engine'}, {'id': 11823, 'synset': 'tractor.n.02', 'name': 'tractor'}, {'id': 11824, 'synset': 'trailer.n.04', 'name': 'trailer'}, {'id': 11825, 'synset': 'trailer.n.03', 'name': 'trailer'}, {'id': 11826, 'synset': 'trailer_camp.n.01', 'name': 'trailer_camp'}, {'id': 11827, 'synset': 'trailing_edge.n.01', 'name': 'trailing_edge'}, {'id': 11828, 'synset': 'tramline.n.01', 'name': 'tramline'}, {'id': 11829, 'synset': 'trammel.n.02', 'name': 'trammel'}, {'id': 11830, 'synset': 'tramp_steamer.n.01', 'name': 'tramp_steamer'}, {'id': 11831, 'synset': 'tramway.n.01', 'name': 'tramway'}, {'id': 11832, 'synset': 'transdermal_patch.n.01', 'name': 'transdermal_patch'}, {'id': 11833, 'synset': 'transept.n.01', 'name': 'transept'}, {'id': 11834, 'synset': 'transformer.n.01', 'name': 'transformer'}, {'id': 11835, 'synset': 'transistor.n.01', 'name': 'transistor'}, {'id': 11836, 'synset': 'transit_instrument.n.01', 'name': 'transit_instrument'}, {'id': 11837, 'synset': 'transmission.n.05', 'name': 'transmission'}, {'id': 11838, 'synset': 'transmission_shaft.n.01', 'name': 'transmission_shaft'}, {'id': 11839, 'synset': 'transmitter.n.03', 'name': 'transmitter'}, {'id': 11840, 'synset': 'transom.n.02', 'name': 'transom'}, {'id': 11841, 'synset': 'transom.n.01', 'name': 'transom'}, {'id': 11842, 'synset': 'transponder.n.01', 'name': 'transponder'}, {'id': 11843, 'synset': 'transporter.n.02', 'name': 'transporter'}, {'id': 11844, 'synset': 'transporter.n.01', 'name': 'transporter'}, {'id': 11845, 'synset': 'transport_ship.n.01', 'name': 'transport_ship'}, {'id': 11846, 'synset': 'trap.n.01', 'name': 'trap'}, {'id': 11847, 'synset': 'trap_door.n.01', 'name': 'trap_door'}, {'id': 11848, 'synset': 'trapeze.n.01', 'name': 'trapeze'}, {'id': 11849, 'synset': 'trave.n.01', 'name': 'trave'}, {'id': 11850, 'synset': 'travel_iron.n.01', 'name': 'travel_iron'}, {'id': 11851, 'synset': 'trawl.n.02', 'name': 'trawl'}, {'id': 11852, 'synset': 'trawl.n.01', 'name': 'trawl'}, {'id': 11853, 'synset': 'trawler.n.02', 'name': 'trawler'}, {'id': 11854, 'synset': 'tray_cloth.n.01', 'name': 'tray_cloth'}, {'id': 11855, 'synset': 'tread.n.04', 'name': 'tread'}, {'id': 11856, 'synset': 'tread.n.03', 'name': 'tread'}, {'id': 11857, 'synset': 'treadmill.n.02', 'name': 'treadmill'}, {'id': 11858, 'synset': 'treadmill.n.01', 'name': 'treadmill'}, {'id': 11859, 'synset': 'treasure_chest.n.01', 'name': 'treasure_chest'}, {'id': 11860, 'synset': 'treasure_ship.n.01', 'name': 'treasure_ship'}, {'id': 11861, 'synset': 'treenail.n.01', 'name': 'treenail'}, {'id': 11862, 'synset': 'trefoil_arch.n.01', 'name': 'trefoil_arch'}, {'id': 11863, 'synset': 'trellis.n.01', 'name': 'trellis'}, {'id': 11864, 'synset': 'trench.n.01', 'name': 'trench'}, {'id': 11865, 'synset': 'trench_knife.n.01', 'name': 'trench_knife'}, {'id': 11866, 'synset': 'trepan.n.02', 'name': 'trepan'}, {'id': 11867, 'synset': 'trepan.n.01', 'name': 'trepan'}, {'id': 11868, 'synset': 'trestle.n.02', 'name': 'trestle'}, {'id': 11869, 'synset': 'trestle.n.01', 'name': 'trestle'}, {'id': 11870, 'synset': 'trestle_bridge.n.01', 'name': 'trestle_bridge'}, {'id': 11871, 'synset': 'trestle_table.n.01', 'name': 'trestle_table'}, {'id': 11872, 'synset': 'trestlework.n.01', 'name': 'trestlework'}, {'id': 11873, 'synset': 'trews.n.01', 'name': 'trews'}, {'id': 11874, 'synset': 'trial_balloon.n.02', 'name': 'trial_balloon'}, {'id': 11875, 'synset': 'triangle.n.04', 'name': 'triangle'}, {'id': 11876, 'synset': 'triclinium.n.02', 'name': 'triclinium'}, {'id': 11877, 'synset': 'triclinium.n.01', 'name': 'triclinium'}, {'id': 11878, 'synset': 'tricorn.n.01', 'name': 'tricorn'}, {'id': 11879, 'synset': 'tricot.n.01', 'name': 'tricot'}, {'id': 11880, 'synset': 'trident.n.01', 'name': 'trident'}, {'id': 11881, 'synset': 'trigger.n.02', 'name': 'trigger'}, {'id': 11882, 'synset': 'trimaran.n.01', 'name': 'trimaran'}, {'id': 11883, 'synset': 'trimmer.n.02', 'name': 'trimmer'}, {'id': 11884, 'synset': 'trimmer_arch.n.01', 'name': 'trimmer_arch'}, {'id': 11885, 'synset': 'triode.n.01', 'name': 'triode'}, {'id': 11886, 'synset': 'triptych.n.01', 'name': 'triptych'}, {'id': 11887, 'synset': 'trip_wire.n.02', 'name': 'trip_wire'}, {'id': 11888, 'synset': 'trireme.n.01', 'name': 'trireme'}, {'id': 11889, 'synset': 'triskelion.n.01', 'name': 'triskelion'}, {'id': 11890, 'synset': 'triumphal_arch.n.01', 'name': 'triumphal_arch'}, {'id': 11891, 'synset': 'trivet.n.02', 'name': 'trivet'}, {'id': 11892, 'synset': 'trivet.n.01', 'name': 'trivet'}, {'id': 11893, 'synset': 'troika.n.01', 'name': 'troika'}, {'id': 11894, 'synset': 'troll.n.03', 'name': 'troll'}, {'id': 11895, 'synset': 'trolleybus.n.01', 'name': 'trolleybus'}, {'id': 11896, 'synset': 'trombone.n.01', 'name': 'trombone'}, {'id': 11897, 'synset': 'troop_carrier.n.01', 'name': 'troop_carrier'}, {'id': 11898, 'synset': 'troopship.n.01', 'name': 'troopship'}, {'id': 11899, 'synset': 'trophy_case.n.01', 'name': 'trophy_case'}, {'id': 11900, 'synset': 'trough.n.05', 'name': 'trough'}, {'id': 11901, 'synset': 'trouser.n.02', 'name': 'trouser'}, {'id': 11902, 'synset': 'trouser_cuff.n.01', 'name': 'trouser_cuff'}, {'id': 11903, 'synset': 'trouser_press.n.01', 'name': 'trouser_press'}, {'id': 11904, 'synset': 'trousseau.n.01', 'name': 'trousseau'}, {'id': 11905, 'synset': 'trowel.n.01', 'name': 'trowel'}, {'id': 11906, 'synset': 'trumpet_arch.n.01', 'name': 'trumpet_arch'}, {'id': 11907, 'synset': 'truncheon.n.01', 'name': 'truncheon'}, {'id': 11908, 'synset': 'trundle_bed.n.01', 'name': 'trundle_bed'}, {'id': 11909, 'synset': 'trunk_hose.n.01', 'name': 'trunk_hose'}, {'id': 11910, 'synset': 'trunk_lid.n.01', 'name': 'trunk_lid'}, {'id': 11911, 'synset': 'trunk_line.n.02', 'name': 'trunk_line'}, {'id': 11912, 'synset': 'truss.n.02', 'name': 'truss'}, {'id': 11913, 'synset': 'truss_bridge.n.01', 'name': 'truss_bridge'}, {'id': 11914, 'synset': 'try_square.n.01', 'name': 'try_square'}, {'id': 11915, 'synset': 't-square.n.01', 'name': 'T-square'}, {'id': 11916, 'synset': 'tube.n.02', 'name': 'tube'}, {'id': 11917, 'synset': 'tuck_box.n.01', 'name': 'tuck_box'}, {'id': 11918, 'synset': 'tucker.n.04', 'name': 'tucker'}, {'id': 11919, 'synset': 'tucker-bag.n.01', 'name': 'tucker-bag'}, {'id': 11920, 'synset': 'tuck_shop.n.01', 'name': 'tuck_shop'}, {'id': 11921, 'synset': 'tudor_arch.n.01', 'name': 'Tudor_arch'}, {'id': 11922, 'synset': 'tudung.n.01', 'name': 'tudung'}, {'id': 11923, 'synset': 'tugboat.n.01', 'name': 'tugboat'}, {'id': 11924, 'synset': 'tulle.n.01', 'name': 'tulle'}, {'id': 11925, 'synset': 'tumble-dryer.n.01', 'name': 'tumble-dryer'}, {'id': 11926, 'synset': 'tumbler.n.02', 'name': 'tumbler'}, {'id': 11927, 'synset': 'tumbrel.n.01', 'name': 'tumbrel'}, {'id': 11928, 'synset': 'tun.n.01', 'name': 'tun'}, {'id': 11929, 'synset': 'tunic.n.02', 'name': 'tunic'}, {'id': 11930, 'synset': 'tuning_fork.n.01', 'name': 'tuning_fork'}, {'id': 11931, 'synset': 'tupik.n.01', 'name': 'tupik'}, {'id': 11932, 'synset': 'turbine.n.01', 'name': 'turbine'}, {'id': 11933, 'synset': 'turbogenerator.n.01', 'name': 'turbogenerator'}, {'id': 11934, 'synset': 'tureen.n.01', 'name': 'tureen'}, {'id': 11935, 'synset': 'turkish_bath.n.01', 'name': 'Turkish_bath'}, {'id': 11936, 'synset': 'turkish_towel.n.01', 'name': 'Turkish_towel'}, {'id': 11937, 'synset': "turk's_head.n.01", 'name': "Turk's_head"}, {'id': 11938, 'synset': 'turnbuckle.n.01', 'name': 'turnbuckle'}, {'id': 11939, 'synset': 'turner.n.08', 'name': 'turner'}, {'id': 11940, 'synset': 'turnery.n.01', 'name': 'turnery'}, {'id': 11941, 'synset': 'turnpike.n.01', 'name': 'turnpike'}, {'id': 11942, 'synset': 'turnspit.n.01', 'name': 'turnspit'}, {'id': 11943, 'synset': 'turnstile.n.01', 'name': 'turnstile'}, {'id': 11944, 'synset': 'turntable.n.01', 'name': 'turntable'}, {'id': 11945, 'synset': 'turntable.n.02', 'name': 'turntable'}, {'id': 11946, 'synset': 'turret.n.01', 'name': 'turret'}, {'id': 11947, 'synset': 'turret_clock.n.01', 'name': 'turret_clock'}, {'id': 11948, 'synset': 'tweed.n.01', 'name': 'tweed'}, {'id': 11949, 'synset': 'tweeter.n.01', 'name': 'tweeter'}, {'id': 11950, 'synset': 'twenty-two.n.02', 'name': 'twenty-two'}, {'id': 11951, 'synset': 'twenty-two_pistol.n.01', 'name': 'twenty-two_pistol'}, {'id': 11952, 'synset': 'twenty-two_rifle.n.01', 'name': 'twenty-two_rifle'}, {'id': 11953, 'synset': 'twill.n.02', 'name': 'twill'}, {'id': 11954, 'synset': 'twill.n.01', 'name': 'twill'}, {'id': 11955, 'synset': 'twin_bed.n.01', 'name': 'twin_bed'}, {'id': 11956, 'synset': 'twinjet.n.01', 'name': 'twinjet'}, {'id': 11957, 'synset': 'twist_bit.n.01', 'name': 'twist_bit'}, {'id': 11958, 'synset': 'two-by-four.n.01', 'name': 'two-by-four'}, {'id': 11959, 'synset': 'two-man_tent.n.01', 'name': 'two-man_tent'}, {'id': 11960, 'synset': 'two-piece.n.01', 'name': 'two-piece'}, {'id': 11961, 'synset': 'typesetting_machine.n.01', 'name': 'typesetting_machine'}, {'id': 11962, 'synset': 'typewriter_carriage.n.01', 'name': 'typewriter_carriage'}, {'id': 11963, 'synset': 'typewriter_keyboard.n.01', 'name': 'typewriter_keyboard'}, {'id': 11964, 'synset': 'tyrolean.n.02', 'name': 'tyrolean'}, {'id': 11965, 'synset': 'uke.n.01', 'name': 'uke'}, {'id': 11966, 'synset': 'ulster.n.02', 'name': 'ulster'}, {'id': 11967, 'synset': 'ultracentrifuge.n.01', 'name': 'ultracentrifuge'}, {'id': 11968, 'synset': 'ultramicroscope.n.01', 'name': 'ultramicroscope'}, {'id': 11969, 'synset': 'ultrasuede.n.01', 'name': 'Ultrasuede'}, {'id': 11970, 'synset': 'ultraviolet_lamp.n.01', 'name': 'ultraviolet_lamp'}, {'id': 11971, 'synset': 'umbrella_tent.n.01', 'name': 'umbrella_tent'}, {'id': 11972, 'synset': 'undercarriage.n.01', 'name': 'undercarriage'}, {'id': 11973, 'synset': 'undercoat.n.01', 'name': 'undercoat'}, {'id': 11974, 'synset': 'undergarment.n.01', 'name': 'undergarment'}, {'id': 11975, 'synset': 'underpants.n.01', 'name': 'underpants'}, {'id': 11976, 'synset': 'undies.n.01', 'name': 'undies'}, {'id': 11977, 'synset': 'uneven_parallel_bars.n.01', 'name': 'uneven_parallel_bars'}, {'id': 11978, 'synset': 'uniform.n.01', 'name': 'uniform'}, {'id': 11979, 'synset': 'universal_joint.n.01', 'name': 'universal_joint'}, {'id': 11980, 'synset': 'university.n.02', 'name': 'university'}, {'id': 11981, 'synset': 'upholstery.n.01', 'name': 'upholstery'}, {'id': 11982, 'synset': 'upholstery_material.n.01', 'name': 'upholstery_material'}, {'id': 11983, 'synset': 'upholstery_needle.n.01', 'name': 'upholstery_needle'}, {'id': 11984, 'synset': 'uplift.n.02', 'name': 'uplift'}, {'id': 11985, 'synset': 'upper_berth.n.01', 'name': 'upper_berth'}, {'id': 11986, 'synset': 'upright.n.02', 'name': 'upright'}, {'id': 11987, 'synset': 'upset.n.04', 'name': 'upset'}, {'id': 11988, 'synset': 'upstairs.n.01', 'name': 'upstairs'}, {'id': 11989, 'synset': 'urceole.n.01', 'name': 'urceole'}, {'id': 11990, 'synset': 'urn.n.02', 'name': 'urn'}, {'id': 11991, 'synset': 'used-car.n.01', 'name': 'used-car'}, {'id': 11992, 'synset': 'utensil.n.01', 'name': 'utensil'}, {'id': 11993, 'synset': 'uzi.n.01', 'name': 'Uzi'}, {'id': 11994, 'synset': 'vacation_home.n.01', 'name': 'vacation_home'}, {'id': 11995, 'synset': 'vacuum_chamber.n.01', 'name': 'vacuum_chamber'}, {'id': 11996, 'synset': 'vacuum_flask.n.01', 'name': 'vacuum_flask'}, {'id': 11997, 'synset': 'vacuum_gauge.n.01', 'name': 'vacuum_gauge'}, {'id': 11998, 'synset': 'valenciennes.n.02', 'name': 'Valenciennes'}, {'id': 11999, 'synset': 'valise.n.01', 'name': 'valise'}, {'id': 12000, 'synset': 'valve.n.03', 'name': 'valve'}, {'id': 12001, 'synset': 'valve.n.02', 'name': 'valve'}, {'id': 12002, 'synset': 'valve-in-head_engine.n.01', 'name': 'valve-in-head_engine'}, {'id': 12003, 'synset': 'vambrace.n.01', 'name': 'vambrace'}, {'id': 12004, 'synset': 'van.n.05', 'name': 'van'}, {'id': 12005, 'synset': 'van.n.04', 'name': 'van'}, {'id': 12006, 'synset': 'vane.n.02', 'name': 'vane'}, {'id': 12007, 'synset': 'vaporizer.n.01', 'name': 'vaporizer'}, {'id': 12008, 'synset': 'variable-pitch_propeller.n.01', 'name': 'variable-pitch_propeller'}, {'id': 12009, 'synset': 'variometer.n.01', 'name': 'variometer'}, {'id': 12010, 'synset': 'varnish.n.01', 'name': 'varnish'}, {'id': 12011, 'synset': 'vault.n.03', 'name': 'vault'}, {'id': 12012, 'synset': 'vault.n.02', 'name': 'vault'}, {'id': 12013, 'synset': 'vaulting_horse.n.01', 'name': 'vaulting_horse'}, {'id': 12014, 'synset': 'vehicle.n.01', 'name': 'vehicle'}, {'id': 12015, 'synset': 'velcro.n.01', 'name': 'Velcro'}, {'id': 12016, 'synset': 'velocipede.n.01', 'name': 'velocipede'}, {'id': 12017, 'synset': 'velour.n.01', 'name': 'velour'}, {'id': 12018, 'synset': 'velvet.n.01', 'name': 'velvet'}, {'id': 12019, 'synset': 'velveteen.n.01', 'name': 'velveteen'}, {'id': 12020, 'synset': 'veneer.n.01', 'name': 'veneer'}, {'id': 12021, 'synset': 'venetian_blind.n.01', 'name': 'Venetian_blind'}, {'id': 12022, 'synset': 'venn_diagram.n.01', 'name': 'Venn_diagram'}, {'id': 12023, 'synset': 'ventilation.n.02', 'name': 'ventilation'}, {'id': 12024, 'synset': 'ventilation_shaft.n.01', 'name': 'ventilation_shaft'}, {'id': 12025, 'synset': 'ventilator.n.01', 'name': 'ventilator'}, {'id': 12026, 'synset': 'veranda.n.01', 'name': 'veranda'}, {'id': 12027, 'synset': 'verdigris.n.02', 'name': 'verdigris'}, {'id': 12028, 'synset': 'vernier_caliper.n.01', 'name': 'vernier_caliper'}, {'id': 12029, 'synset': 'vernier_scale.n.01', 'name': 'vernier_scale'}, {'id': 12030, 'synset': 'vertical_file.n.01', 'name': 'vertical_file'}, {'id': 12031, 'synset': 'vertical_stabilizer.n.01', 'name': 'vertical_stabilizer'}, {'id': 12032, 'synset': 'vertical_tail.n.01', 'name': 'vertical_tail'}, {'id': 12033, 'synset': 'very_pistol.n.01', 'name': 'Very_pistol'}, {'id': 12034, 'synset': 'vessel.n.02', 'name': 'vessel'}, {'id': 12035, 'synset': 'vessel.n.03', 'name': 'vessel'}, {'id': 12036, 'synset': 'vestiture.n.01', 'name': 'vestiture'}, {'id': 12037, 'synset': 'vestment.n.01', 'name': 'vestment'}, {'id': 12038, 'synset': 'vest_pocket.n.01', 'name': 'vest_pocket'}, {'id': 12039, 'synset': 'vestry.n.02', 'name': 'vestry'}, {'id': 12040, 'synset': 'viaduct.n.01', 'name': 'viaduct'}, {'id': 12041, 'synset': 'vibraphone.n.01', 'name': 'vibraphone'}, {'id': 12042, 'synset': 'vibrator.n.02', 'name': 'vibrator'}, {'id': 12043, 'synset': 'vibrator.n.01', 'name': 'vibrator'}, {'id': 12044, 'synset': 'victrola.n.01', 'name': 'Victrola'}, {'id': 12045, 'synset': 'vicuna.n.02', 'name': 'vicuna'}, {'id': 12046, 'synset': 'videocassette.n.01', 'name': 'videocassette'}, {'id': 12047, 'synset': 'videocassette_recorder.n.01', 'name': 'videocassette_recorder'}, {'id': 12048, 'synset': 'videodisk.n.01', 'name': 'videodisk'}, {'id': 12049, 'synset': 'video_recording.n.01', 'name': 'video_recording'}, {'id': 12050, 'synset': 'videotape.n.02', 'name': 'videotape'}, {'id': 12051, 'synset': 'vigil_light.n.01', 'name': 'vigil_light'}, {'id': 12052, 'synset': 'villa.n.04', 'name': 'villa'}, {'id': 12053, 'synset': 'villa.n.03', 'name': 'villa'}, {'id': 12054, 'synset': 'villa.n.02', 'name': 'villa'}, {'id': 12055, 'synset': 'viol.n.01', 'name': 'viol'}, {'id': 12056, 'synset': 'viola.n.03', 'name': 'viola'}, {'id': 12057, 'synset': 'viola_da_braccio.n.01', 'name': 'viola_da_braccio'}, {'id': 12058, 'synset': 'viola_da_gamba.n.01', 'name': 'viola_da_gamba'}, {'id': 12059, 'synset': "viola_d'amore.n.01", 'name': "viola_d'amore"}, {'id': 12060, 'synset': 'virginal.n.01', 'name': 'virginal'}, {'id': 12061, 'synset': 'viscometer.n.01', 'name': 'viscometer'}, {'id': 12062, 'synset': 'viscose_rayon.n.01', 'name': 'viscose_rayon'}, {'id': 12063, 'synset': 'vise.n.01', 'name': 'vise'}, {'id': 12064, 'synset': 'visor.n.01', 'name': 'visor'}, {'id': 12065, 'synset': 'visual_display_unit.n.01', 'name': 'visual_display_unit'}, {'id': 12066, 'synset': 'vivarium.n.01', 'name': 'vivarium'}, {'id': 12067, 'synset': 'viyella.n.01', 'name': 'Viyella'}, {'id': 12068, 'synset': 'voile.n.01', 'name': 'voile'}, {'id': 12069, 'synset': 'volleyball_net.n.01', 'name': 'volleyball_net'}, {'id': 12070, 'synset': 'voltage_regulator.n.01', 'name': 'voltage_regulator'}, {'id': 12071, 'synset': 'voltaic_cell.n.01', 'name': 'voltaic_cell'}, {'id': 12072, 'synset': 'voltaic_pile.n.01', 'name': 'voltaic_pile'}, {'id': 12073, 'synset': 'voltmeter.n.01', 'name': 'voltmeter'}, {'id': 12074, 'synset': 'vomitory.n.01', 'name': 'vomitory'}, {'id': 12075, 'synset': 'von_neumann_machine.n.01', 'name': 'von_Neumann_machine'}, {'id': 12076, 'synset': 'voting_booth.n.01', 'name': 'voting_booth'}, {'id': 12077, 'synset': 'voting_machine.n.01', 'name': 'voting_machine'}, {'id': 12078, 'synset': 'voussoir.n.01', 'name': 'voussoir'}, {'id': 12079, 'synset': 'vox_angelica.n.01', 'name': 'vox_angelica'}, {'id': 12080, 'synset': 'vox_humana.n.01', 'name': 'vox_humana'}, {'id': 12081, 'synset': 'waders.n.01', 'name': 'waders'}, {'id': 12082, 'synset': 'wading_pool.n.01', 'name': 'wading_pool'}, {'id': 12083, 'synset': 'wagon.n.04', 'name': 'wagon'}, {'id': 12084, 'synset': 'wagon_tire.n.01', 'name': 'wagon_tire'}, {'id': 12085, 'synset': 'wain.n.03', 'name': 'wain'}, {'id': 12086, 'synset': 'wainscot.n.02', 'name': 'wainscot'}, {'id': 12087, 'synset': 'wainscoting.n.01', 'name': 'wainscoting'}, {'id': 12088, 'synset': 'waist_pack.n.01', 'name': 'waist_pack'}, {'id': 12089, 'synset': 'walker.n.06', 'name': 'walker'}, {'id': 12090, 'synset': 'walker.n.05', 'name': 'walker'}, {'id': 12091, 'synset': 'walker.n.04', 'name': 'walker'}, {'id': 12092, 'synset': 'walkie-talkie.n.01', 'name': 'walkie-talkie'}, {'id': 12093, 'synset': 'walk-in.n.04', 'name': 'walk-in'}, {'id': 12094, 'synset': 'walking_shoe.n.01', 'name': 'walking_shoe'}, {'id': 12095, 'synset': 'walkman.n.01', 'name': 'Walkman'}, {'id': 12096, 'synset': 'walk-up_apartment.n.01', 'name': 'walk-up_apartment'}, {'id': 12097, 'synset': 'wall.n.01', 'name': 'wall'}, {'id': 12098, 'synset': 'wall.n.07', 'name': 'wall'}, {'id': 12099, 'synset': 'wall_tent.n.01', 'name': 'wall_tent'}, {'id': 12100, 'synset': 'wall_unit.n.01', 'name': 'wall_unit'}, {'id': 12101, 'synset': 'wand.n.01', 'name': 'wand'}, {'id': 12102, 'synset': 'wankel_engine.n.01', 'name': 'Wankel_engine'}, {'id': 12103, 'synset': 'ward.n.03', 'name': 'ward'}, {'id': 12104, 'synset': 'wardroom.n.01', 'name': 'wardroom'}, {'id': 12105, 'synset': 'warehouse.n.01', 'name': 'warehouse'}, {'id': 12106, 'synset': 'warming_pan.n.01', 'name': 'warming_pan'}, {'id': 12107, 'synset': 'war_paint.n.02', 'name': 'war_paint'}, {'id': 12108, 'synset': 'warplane.n.01', 'name': 'warplane'}, {'id': 12109, 'synset': 'war_room.n.01', 'name': 'war_room'}, {'id': 12110, 'synset': 'warship.n.01', 'name': 'warship'}, {'id': 12111, 'synset': 'wash.n.01', 'name': 'wash'}, {'id': 12112, 'synset': 'wash-and-wear.n.01', 'name': 'wash-and-wear'}, {'id': 12113, 'synset': 'washbasin.n.02', 'name': 'washbasin'}, {'id': 12114, 'synset': 'washboard.n.02', 'name': 'washboard'}, {'id': 12115, 'synset': 'washboard.n.01', 'name': 'washboard'}, {'id': 12116, 'synset': 'washer.n.02', 'name': 'washer'}, {'id': 12117, 'synset': 'washhouse.n.01', 'name': 'washhouse'}, {'id': 12118, 'synset': 'washroom.n.01', 'name': 'washroom'}, {'id': 12119, 'synset': 'washstand.n.01', 'name': 'washstand'}, {'id': 12120, 'synset': 'washtub.n.01', 'name': 'washtub'}, {'id': 12121, 'synset': 'wastepaper_basket.n.01', 'name': 'wastepaper_basket'}, {'id': 12122, 'synset': 'watch_cap.n.01', 'name': 'watch_cap'}, {'id': 12123, 'synset': 'watch_case.n.01', 'name': 'watch_case'}, {'id': 12124, 'synset': 'watch_glass.n.01', 'name': 'watch_glass'}, {'id': 12125, 'synset': 'watchtower.n.01', 'name': 'watchtower'}, {'id': 12126, 'synset': 'water-base_paint.n.01', 'name': 'water-base_paint'}, {'id': 12127, 'synset': 'water_bed.n.01', 'name': 'water_bed'}, {'id': 12128, 'synset': 'water_butt.n.01', 'name': 'water_butt'}, {'id': 12129, 'synset': 'water_cart.n.01', 'name': 'water_cart'}, {'id': 12130, 'synset': 'water_chute.n.01', 'name': 'water_chute'}, {'id': 12131, 'synset': 'water_closet.n.01', 'name': 'water_closet'}, {'id': 12132, 'synset': 'watercolor.n.02', 'name': 'watercolor'}, {'id': 12133, 'synset': 'water-cooled_reactor.n.01', 'name': 'water-cooled_reactor'}, {'id': 12134, 'synset': 'water_filter.n.01', 'name': 'water_filter'}, {'id': 12135, 'synset': 'water_gauge.n.01', 'name': 'water_gauge'}, {'id': 12136, 'synset': 'water_glass.n.02', 'name': 'water_glass'}, {'id': 12137, 'synset': 'water_hazard.n.01', 'name': 'water_hazard'}, {'id': 12138, 'synset': 'watering_cart.n.01', 'name': 'watering_cart'}, {'id': 12139, 'synset': 'water_jacket.n.01', 'name': 'water_jacket'}, {'id': 12140, 'synset': 'water_jump.n.01', 'name': 'water_jump'}, {'id': 12141, 'synset': 'water_level.n.04', 'name': 'water_level'}, {'id': 12142, 'synset': 'water_meter.n.01', 'name': 'water_meter'}, {'id': 12143, 'synset': 'water_mill.n.01', 'name': 'water_mill'}, {'id': 12144, 'synset': 'waterproof.n.01', 'name': 'waterproof'}, {'id': 12145, 'synset': 'waterproofing.n.02', 'name': 'waterproofing'}, {'id': 12146, 'synset': 'water_pump.n.01', 'name': 'water_pump'}, {'id': 12147, 'synset': 'waterspout.n.03', 'name': 'waterspout'}, {'id': 12148, 'synset': 'water_wagon.n.01', 'name': 'water_wagon'}, {'id': 12149, 'synset': 'waterwheel.n.02', 'name': 'waterwheel'}, {'id': 12150, 'synset': 'waterwheel.n.01', 'name': 'waterwheel'}, {'id': 12151, 'synset': 'water_wings.n.01', 'name': 'water_wings'}, {'id': 12152, 'synset': 'waterworks.n.02', 'name': 'waterworks'}, {'id': 12153, 'synset': 'wattmeter.n.01', 'name': 'wattmeter'}, {'id': 12154, 'synset': 'waxwork.n.02', 'name': 'waxwork'}, {'id': 12155, 'synset': 'ways.n.01', 'name': 'ways'}, {'id': 12156, 'synset': 'weapon.n.01', 'name': 'weapon'}, {'id': 12157, 'synset': 'weaponry.n.01', 'name': 'weaponry'}, {'id': 12158, 'synset': 'weapons_carrier.n.01', 'name': 'weapons_carrier'}, {'id': 12159, 'synset': 'weathercock.n.01', 'name': 'weathercock'}, {'id': 12160, 'synset': 'weatherglass.n.01', 'name': 'weatherglass'}, {'id': 12161, 'synset': 'weather_satellite.n.01', 'name': 'weather_satellite'}, {'id': 12162, 'synset': 'weather_ship.n.01', 'name': 'weather_ship'}, {'id': 12163, 'synset': 'web.n.02', 'name': 'web'}, {'id': 12164, 'synset': 'web.n.06', 'name': 'web'}, {'id': 12165, 'synset': 'webbing.n.03', 'name': 'webbing'}, {'id': 12166, 'synset': 'wedge.n.06', 'name': 'wedge'}, {'id': 12167, 'synset': 'wedge.n.05', 'name': 'wedge'}, {'id': 12168, 'synset': 'wedgie.n.01', 'name': 'wedgie'}, {'id': 12169, 'synset': 'wedgwood.n.02', 'name': 'Wedgwood'}, {'id': 12170, 'synset': 'weeder.n.02', 'name': 'weeder'}, {'id': 12171, 'synset': 'weeds.n.01', 'name': 'weeds'}, {'id': 12172, 'synset': 'weekender.n.02', 'name': 'weekender'}, {'id': 12173, 'synset': 'weighbridge.n.01', 'name': 'weighbridge'}, {'id': 12174, 'synset': 'weight.n.02', 'name': 'weight'}, {'id': 12175, 'synset': 'weir.n.01', 'name': 'weir'}, {'id': 12176, 'synset': 'weir.n.02', 'name': 'weir'}, {'id': 12177, 'synset': 'welcome_wagon.n.01', 'name': 'welcome_wagon'}, {'id': 12178, 'synset': 'weld.n.03', 'name': 'weld'}, {'id': 12179, 'synset': "welder's_mask.n.01", 'name': "welder's_mask"}, {'id': 12180, 'synset': 'weldment.n.01', 'name': 'weldment'}, {'id': 12181, 'synset': 'well.n.02', 'name': 'well'}, {'id': 12182, 'synset': 'wellhead.n.02', 'name': 'wellhead'}, {'id': 12183, 'synset': 'welt.n.02', 'name': 'welt'}, {'id': 12184, 'synset': 'weston_cell.n.01', 'name': 'Weston_cell'}, {'id': 12185, 'synset': 'wet_bar.n.01', 'name': 'wet_bar'}, {'id': 12186, 'synset': 'wet-bulb_thermometer.n.01', 'name': 'wet-bulb_thermometer'}, {'id': 12187, 'synset': 'wet_cell.n.01', 'name': 'wet_cell'}, {'id': 12188, 'synset': 'wet_fly.n.01', 'name': 'wet_fly'}, {'id': 12189, 'synset': 'whaleboat.n.01', 'name': 'whaleboat'}, {'id': 12190, 'synset': 'whaler.n.02', 'name': 'whaler'}, {'id': 12191, 'synset': 'whaling_gun.n.01', 'name': 'whaling_gun'}, {'id': 12192, 'synset': 'wheel.n.04', 'name': 'wheel'}, {'id': 12193, 'synset': 'wheel_and_axle.n.01', 'name': 'wheel_and_axle'}, {'id': 12194, 'synset': 'wheeled_vehicle.n.01', 'name': 'wheeled_vehicle'}, {'id': 12195, 'synset': 'wheelwork.n.01', 'name': 'wheelwork'}, {'id': 12196, 'synset': 'wherry.n.02', 'name': 'wherry'}, {'id': 12197, 'synset': 'wherry.n.01', 'name': 'wherry'}, {'id': 12198, 'synset': 'whetstone.n.01', 'name': 'whetstone'}, {'id': 12199, 'synset': 'whiffletree.n.01', 'name': 'whiffletree'}, {'id': 12200, 'synset': 'whip.n.01', 'name': 'whip'}, {'id': 12201, 'synset': 'whipcord.n.02', 'name': 'whipcord'}, {'id': 12202, 'synset': 'whipping_post.n.01', 'name': 'whipping_post'}, {'id': 12203, 'synset': 'whipstitch.n.01', 'name': 'whipstitch'}, {'id': 12204, 'synset': 'whirler.n.02', 'name': 'whirler'}, {'id': 12205, 'synset': 'whisk.n.02', 'name': 'whisk'}, {'id': 12206, 'synset': 'whisk.n.01', 'name': 'whisk'}, {'id': 12207, 'synset': 'whiskey_bottle.n.01', 'name': 'whiskey_bottle'}, {'id': 12208, 'synset': 'whiskey_jug.n.01', 'name': 'whiskey_jug'}, {'id': 12209, 'synset': 'whispering_gallery.n.01', 'name': 'whispering_gallery'}, {'id': 12210, 'synset': 'whistle.n.04', 'name': 'whistle'}, {'id': 12211, 'synset': 'white.n.11', 'name': 'white'}, {'id': 12212, 'synset': 'white_goods.n.01', 'name': 'white_goods'}, {'id': 12213, 'synset': 'whitewash.n.02', 'name': 'whitewash'}, {'id': 12214, 'synset': 'whorehouse.n.01', 'name': 'whorehouse'}, {'id': 12215, 'synset': 'wick.n.02', 'name': 'wick'}, {'id': 12216, 'synset': 'wicker.n.02', 'name': 'wicker'}, {'id': 12217, 'synset': 'wicker_basket.n.01', 'name': 'wicker_basket'}, {'id': 12218, 'synset': 'wicket.n.02', 'name': 'wicket'}, {'id': 12219, 'synset': 'wicket.n.01', 'name': 'wicket'}, {'id': 12220, 'synset': 'wickiup.n.01', 'name': 'wickiup'}, {'id': 12221, 'synset': 'wide-angle_lens.n.01', 'name': 'wide-angle_lens'}, {'id': 12222, 'synset': 'widebody_aircraft.n.01', 'name': 'widebody_aircraft'}, {'id': 12223, 'synset': 'wide_wale.n.01', 'name': 'wide_wale'}, {'id': 12224, 'synset': "widow's_walk.n.01", 'name': "widow's_walk"}, {'id': 12225, 'synset': 'wiffle.n.01', 'name': 'Wiffle'}, {'id': 12226, 'synset': 'wigwam.n.01', 'name': 'wigwam'}, {'id': 12227, 'synset': 'wilton.n.01', 'name': 'Wilton'}, {'id': 12228, 'synset': 'wimple.n.01', 'name': 'wimple'}, {'id': 12229, 'synset': 'wincey.n.01', 'name': 'wincey'}, {'id': 12230, 'synset': 'winceyette.n.01', 'name': 'winceyette'}, {'id': 12231, 'synset': 'winch.n.01', 'name': 'winch'}, {'id': 12232, 'synset': 'winchester.n.02', 'name': 'Winchester'}, {'id': 12233, 'synset': 'windbreak.n.01', 'name': 'windbreak'}, {'id': 12234, 'synset': 'winder.n.02', 'name': 'winder'}, {'id': 12235, 'synset': 'wind_instrument.n.01', 'name': 'wind_instrument'}, {'id': 12236, 'synset': 'windjammer.n.01', 'name': 'windjammer'}, {'id': 12237, 'synset': 'windmill.n.02', 'name': 'windmill'}, {'id': 12238, 'synset': 'window.n.01', 'name': 'window'}, {'id': 12239, 'synset': 'window.n.08', 'name': 'window'}, {'id': 12240, 'synset': 'window_blind.n.01', 'name': 'window_blind'}, {'id': 12241, 'synset': 'window_envelope.n.01', 'name': 'window_envelope'}, {'id': 12242, 'synset': 'window_frame.n.01', 'name': 'window_frame'}, {'id': 12243, 'synset': 'window_screen.n.01', 'name': 'window_screen'}, {'id': 12244, 'synset': 'window_seat.n.01', 'name': 'window_seat'}, {'id': 12245, 'synset': 'window_shade.n.01', 'name': 'window_shade'}, {'id': 12246, 'synset': 'windowsill.n.01', 'name': 'windowsill'}, {'id': 12247, 'synset': 'windshield.n.01', 'name': 'windshield'}, {'id': 12248, 'synset': 'windsor_chair.n.01', 'name': 'Windsor_chair'}, {'id': 12249, 'synset': 'windsor_knot.n.01', 'name': 'Windsor_knot'}, {'id': 12250, 'synset': 'windsor_tie.n.01', 'name': 'Windsor_tie'}, {'id': 12251, 'synset': 'wind_tee.n.01', 'name': 'wind_tee'}, {'id': 12252, 'synset': 'wind_tunnel.n.01', 'name': 'wind_tunnel'}, {'id': 12253, 'synset': 'wind_turbine.n.01', 'name': 'wind_turbine'}, {'id': 12254, 'synset': 'wine_bar.n.01', 'name': 'wine_bar'}, {'id': 12255, 'synset': 'wine_cask.n.01', 'name': 'wine_cask'}, {'id': 12256, 'synset': 'winepress.n.01', 'name': 'winepress'}, {'id': 12257, 'synset': 'winery.n.01', 'name': 'winery'}, {'id': 12258, 'synset': 'wineskin.n.01', 'name': 'wineskin'}, {'id': 12259, 'synset': 'wing.n.02', 'name': 'wing'}, {'id': 12260, 'synset': 'wing_chair.n.01', 'name': 'wing_chair'}, {'id': 12261, 'synset': 'wing_nut.n.02', 'name': 'wing_nut'}, {'id': 12262, 'synset': 'wing_tip.n.02', 'name': 'wing_tip'}, {'id': 12263, 'synset': 'wing_tip.n.01', 'name': 'wing_tip'}, {'id': 12264, 'synset': 'wiper.n.02', 'name': 'wiper'}, {'id': 12265, 'synset': 'wiper_motor.n.01', 'name': 'wiper_motor'}, {'id': 12266, 'synset': 'wire.n.01', 'name': 'wire'}, {'id': 12267, 'synset': 'wire.n.02', 'name': 'wire'}, {'id': 12268, 'synset': 'wire_cloth.n.01', 'name': 'wire_cloth'}, {'id': 12269, 'synset': 'wire_cutter.n.01', 'name': 'wire_cutter'}, {'id': 12270, 'synset': 'wire_gauge.n.01', 'name': 'wire_gauge'}, {'id': 12271, 'synset': 'wireless_local_area_network.n.01', 'name': 'wireless_local_area_network'}, {'id': 12272, 'synset': 'wire_matrix_printer.n.01', 'name': 'wire_matrix_printer'}, {'id': 12273, 'synset': 'wire_recorder.n.01', 'name': 'wire_recorder'}, {'id': 12274, 'synset': 'wire_stripper.n.01', 'name': 'wire_stripper'}, {'id': 12275, 'synset': 'wirework.n.01', 'name': 'wirework'}, {'id': 12276, 'synset': 'wiring.n.01', 'name': 'wiring'}, {'id': 12277, 'synset': 'wishing_cap.n.01', 'name': 'wishing_cap'}, {'id': 12278, 'synset': 'witness_box.n.01', 'name': 'witness_box'}, {'id': 12279, 'synset': "woman's_clothing.n.01", 'name': "woman's_clothing"}, {'id': 12280, 'synset': 'wood.n.08', 'name': 'wood'}, {'id': 12281, 'synset': 'woodcarving.n.01', 'name': 'woodcarving'}, {'id': 12282, 'synset': 'wood_chisel.n.01', 'name': 'wood_chisel'}, {'id': 12283, 'synset': 'woodenware.n.01', 'name': 'woodenware'}, {'id': 12284, 'synset': 'woodscrew.n.01', 'name': 'woodscrew'}, {'id': 12285, 'synset': 'woodshed.n.01', 'name': 'woodshed'}, {'id': 12286, 'synset': 'wood_vise.n.01', 'name': 'wood_vise'}, {'id': 12287, 'synset': 'woodwind.n.01', 'name': 'woodwind'}, {'id': 12288, 'synset': 'woof.n.01', 'name': 'woof'}, {'id': 12289, 'synset': 'woofer.n.01', 'name': 'woofer'}, {'id': 12290, 'synset': 'wool.n.01', 'name': 'wool'}, {'id': 12291, 'synset': 'workbasket.n.01', 'name': 'workbasket'}, {'id': 12292, 'synset': 'workbench.n.01', 'name': 'workbench'}, {'id': 12293, 'synset': 'work-clothing.n.01', 'name': 'work-clothing'}, {'id': 12294, 'synset': 'workhouse.n.02', 'name': 'workhouse'}, {'id': 12295, 'synset': 'workhouse.n.01', 'name': 'workhouse'}, {'id': 12296, 'synset': 'workpiece.n.01', 'name': 'workpiece'}, {'id': 12297, 'synset': 'workroom.n.01', 'name': 'workroom'}, {'id': 12298, 'synset': 'works.n.04', 'name': 'works'}, {'id': 12299, 'synset': 'work-shirt.n.01', 'name': 'work-shirt'}, {'id': 12300, 'synset': 'workstation.n.01', 'name': 'workstation'}, {'id': 12301, 'synset': 'worktable.n.01', 'name': 'worktable'}, {'id': 12302, 'synset': 'workwear.n.01', 'name': 'workwear'}, {'id': 12303, 'synset': 'world_wide_web.n.01', 'name': 'World_Wide_Web'}, {'id': 12304, 'synset': 'worm_fence.n.01', 'name': 'worm_fence'}, {'id': 12305, 'synset': 'worm_gear.n.01', 'name': 'worm_gear'}, {'id': 12306, 'synset': 'worm_wheel.n.01', 'name': 'worm_wheel'}, {'id': 12307, 'synset': 'worsted.n.01', 'name': 'worsted'}, {'id': 12308, 'synset': 'worsted.n.02', 'name': 'worsted'}, {'id': 12309, 'synset': 'wrap.n.01', 'name': 'wrap'}, {'id': 12310, 'synset': 'wraparound.n.01', 'name': 'wraparound'}, {'id': 12311, 'synset': 'wrapping.n.01', 'name': 'wrapping'}, {'id': 12312, 'synset': 'wreck.n.04', 'name': 'wreck'}, {'id': 12313, 'synset': 'wrestling_mat.n.01', 'name': 'wrestling_mat'}, {'id': 12314, 'synset': 'wringer.n.01', 'name': 'wringer'}, {'id': 12315, 'synset': 'wrist_pad.n.01', 'name': 'wrist_pad'}, {'id': 12316, 'synset': 'wrist_pin.n.01', 'name': 'wrist_pin'}, {'id': 12317, 'synset': 'wristwatch.n.01', 'name': 'wristwatch'}, {'id': 12318, 'synset': 'writing_arm.n.01', 'name': 'writing_arm'}, {'id': 12319, 'synset': 'writing_desk.n.02', 'name': 'writing_desk'}, {'id': 12320, 'synset': 'writing_desk.n.01', 'name': 'writing_desk'}, {'id': 12321, 'synset': 'writing_implement.n.01', 'name': 'writing_implement'}, {'id': 12322, 'synset': 'xerographic_printer.n.01', 'name': 'xerographic_printer'}, {'id': 12323, 'synset': 'xerox.n.02', 'name': 'Xerox'}, {'id': 12324, 'synset': 'x-ray_film.n.01', 'name': 'X-ray_film'}, {'id': 12325, 'synset': 'x-ray_machine.n.01', 'name': 'X-ray_machine'}, {'id': 12326, 'synset': 'x-ray_tube.n.01', 'name': 'X-ray_tube'}, {'id': 12327, 'synset': 'yacht_chair.n.01', 'name': 'yacht_chair'}, {'id': 12328, 'synset': 'yagi.n.01', 'name': 'yagi'}, {'id': 12329, 'synset': 'yard.n.09', 'name': 'yard'}, {'id': 12330, 'synset': 'yard.n.08', 'name': 'yard'}, {'id': 12331, 'synset': 'yardarm.n.01', 'name': 'yardarm'}, {'id': 12332, 'synset': 'yard_marker.n.01', 'name': 'yard_marker'}, {'id': 12333, 'synset': 'yardstick.n.02', 'name': 'yardstick'}, {'id': 12334, 'synset': 'yarmulke.n.01', 'name': 'yarmulke'}, {'id': 12335, 'synset': 'yashmak.n.01', 'name': 'yashmak'}, {'id': 12336, 'synset': 'yataghan.n.01', 'name': 'yataghan'}, {'id': 12337, 'synset': 'yawl.n.02', 'name': 'yawl'}, {'id': 12338, 'synset': 'yawl.n.01', 'name': 'yawl'}, {'id': 12339, 'synset': 'yoke.n.01', 'name': 'yoke'}, {'id': 12340, 'synset': 'yoke.n.06', 'name': 'yoke'}, {'id': 12341, 'synset': 'yurt.n.01', 'name': 'yurt'}, {'id': 12342, 'synset': 'zamboni.n.01', 'name': 'Zamboni'}, {'id': 12343, 'synset': 'zero.n.04', 'name': 'zero'}, {'id': 12344, 'synset': 'ziggurat.n.01', 'name': 'ziggurat'}, {'id': 12345, 'synset': 'zill.n.01', 'name': 'zill'}, {'id': 12346, 'synset': 'zip_gun.n.01', 'name': 'zip_gun'}, {'id': 12347, 'synset': 'zither.n.01', 'name': 'zither'}, {'id': 12348, 'synset': 'zoot_suit.n.01', 'name': 'zoot_suit'}, {'id': 12349, 'synset': 'shading.n.01', 'name': 'shading'}, {'id': 12350, 'synset': 'grain.n.10', 'name': 'grain'}, {'id': 12351, 'synset': 'wood_grain.n.01', 'name': 'wood_grain'}, {'id': 12352, 'synset': 'graining.n.01', 'name': 'graining'}, {'id': 12353, 'synset': 'marbleization.n.01', 'name': 'marbleization'}, {'id': 12354, 'synset': 'light.n.07', 'name': 'light'}, {'id': 12355, 'synset': 'aura.n.02', 'name': 'aura'}, {'id': 12356, 'synset': 'sunniness.n.01', 'name': 'sunniness'}, {'id': 12357, 'synset': 'glint.n.02', 'name': 'glint'}, {'id': 12358, 'synset': 'opalescence.n.01', 'name': 'opalescence'}, {'id': 12359, 'synset': 'polish.n.01', 'name': 'polish'}, {'id': 12360, 'synset': 'primary_color_for_pigments.n.01', 'name': 'primary_color_for_pigments'}, {'id': 12361, 'synset': 'primary_color_for_light.n.01', 'name': 'primary_color_for_light'}, {'id': 12362, 'synset': 'colorlessness.n.01', 'name': 'colorlessness'}, {'id': 12363, 'synset': 'mottle.n.01', 'name': 'mottle'}, {'id': 12364, 'synset': 'achromia.n.01', 'name': 'achromia'}, {'id': 12365, 'synset': 'shade.n.02', 'name': 'shade'}, {'id': 12366, 'synset': 'chromatic_color.n.01', 'name': 'chromatic_color'}, {'id': 12367, 'synset': 'black.n.01', 'name': 'black'}, {'id': 12368, 'synset': 'coal_black.n.01', 'name': 'coal_black'}, {'id': 12369, 'synset': 'alabaster.n.03', 'name': 'alabaster'}, {'id': 12370, 'synset': 'bone.n.03', 'name': 'bone'}, {'id': 12371, 'synset': 'gray.n.01', 'name': 'gray'}, {'id': 12372, 'synset': 'ash_grey.n.01', 'name': 'ash_grey'}, {'id': 12373, 'synset': 'charcoal.n.03', 'name': 'charcoal'}, {'id': 12374, 'synset': 'sanguine.n.01', 'name': 'sanguine'}, {'id': 12375, 'synset': 'turkey_red.n.01', 'name': 'Turkey_red'}, {'id': 12376, 'synset': 'crimson.n.01', 'name': 'crimson'}, {'id': 12377, 'synset': 'dark_red.n.01', 'name': 'dark_red'}, {'id': 12378, 'synset': 'claret.n.01', 'name': 'claret'}, {'id': 12379, 'synset': 'fuschia.n.01', 'name': 'fuschia'}, {'id': 12380, 'synset': 'maroon.n.02', 'name': 'maroon'}, {'id': 12381, 'synset': 'orange.n.02', 'name': 'orange'}, {'id': 12382, 'synset': 'reddish_orange.n.01', 'name': 'reddish_orange'}, {'id': 12383, 'synset': 'yellow.n.01', 'name': 'yellow'}, {'id': 12384, 'synset': 'gamboge.n.02', 'name': 'gamboge'}, {'id': 12385, 'synset': 'pale_yellow.n.01', 'name': 'pale_yellow'}, {'id': 12386, 'synset': 'green.n.01', 'name': 'green'}, {'id': 12387, 'synset': 'greenishness.n.01', 'name': 'greenishness'}, {'id': 12388, 'synset': 'sea_green.n.01', 'name': 'sea_green'}, {'id': 12389, 'synset': 'sage_green.n.01', 'name': 'sage_green'}, {'id': 12390, 'synset': 'bottle_green.n.01', 'name': 'bottle_green'}, {'id': 12391, 'synset': 'emerald.n.03', 'name': 'emerald'}, {'id': 12392, 'synset': 'olive_green.n.01', 'name': 'olive_green'}, {'id': 12393, 'synset': 'jade_green.n.01', 'name': 'jade_green'}, {'id': 12394, 'synset': 'blue.n.01', 'name': 'blue'}, {'id': 12395, 'synset': 'azure.n.01', 'name': 'azure'}, {'id': 12396, 'synset': 'steel_blue.n.01', 'name': 'steel_blue'}, {'id': 12397, 'synset': 'greenish_blue.n.01', 'name': 'greenish_blue'}, {'id': 12398, 'synset': 'purplish_blue.n.01', 'name': 'purplish_blue'}, {'id': 12399, 'synset': 'purple.n.01', 'name': 'purple'}, {'id': 12400, 'synset': 'tyrian_purple.n.02', 'name': 'Tyrian_purple'}, {'id': 12401, 'synset': 'indigo.n.03', 'name': 'indigo'}, {'id': 12402, 'synset': 'lavender.n.02', 'name': 'lavender'}, {'id': 12403, 'synset': 'reddish_purple.n.01', 'name': 'reddish_purple'}, {'id': 12404, 'synset': 'pink.n.01', 'name': 'pink'}, {'id': 12405, 'synset': 'carnation.n.02', 'name': 'carnation'}, {'id': 12406, 'synset': 'rose.n.03', 'name': 'rose'}, {'id': 12407, 'synset': 'chestnut.n.04', 'name': 'chestnut'}, {'id': 12408, 'synset': 'chocolate.n.03', 'name': 'chocolate'}, {'id': 12409, 'synset': 'light_brown.n.01', 'name': 'light_brown'}, {'id': 12410, 'synset': 'tan.n.02', 'name': 'tan'}, {'id': 12411, 'synset': 'beige.n.01', 'name': 'beige'}, {'id': 12412, 'synset': 'reddish_brown.n.01', 'name': 'reddish_brown'}, {'id': 12413, 'synset': 'brick_red.n.01', 'name': 'brick_red'}, {'id': 12414, 'synset': 'copper.n.04', 'name': 'copper'}, {'id': 12415, 'synset': 'indian_red.n.03', 'name': 'Indian_red'}, {'id': 12416, 'synset': 'puce.n.01', 'name': 'puce'}, {'id': 12417, 'synset': 'olive.n.05', 'name': 'olive'}, {'id': 12418, 'synset': 'ultramarine.n.02', 'name': 'ultramarine'}, {'id': 12419, 'synset': 'complementary_color.n.01', 'name': 'complementary_color'}, {'id': 12420, 'synset': 'pigmentation.n.02', 'name': 'pigmentation'}, {'id': 12421, 'synset': 'complexion.n.01', 'name': 'complexion'}, {'id': 12422, 'synset': 'ruddiness.n.01', 'name': 'ruddiness'}, {'id': 12423, 'synset': 'nonsolid_color.n.01', 'name': 'nonsolid_color'}, {'id': 12424, 'synset': 'aposematic_coloration.n.01', 'name': 'aposematic_coloration'}, {'id': 12425, 'synset': 'cryptic_coloration.n.01', 'name': 'cryptic_coloration'}, {'id': 12426, 'synset': 'ring.n.01', 'name': 'ring'}, {'id': 12427, 'synset': 'center_of_curvature.n.01', 'name': 'center_of_curvature'}, {'id': 12428, 'synset': 'cadaver.n.01', 'name': 'cadaver'}, {'id': 12429, 'synset': 'mandibular_notch.n.01', 'name': 'mandibular_notch'}, {'id': 12430, 'synset': 'rib.n.05', 'name': 'rib'}, {'id': 12431, 'synset': 'skin.n.01', 'name': 'skin'}, {'id': 12432, 'synset': 'skin_graft.n.01', 'name': 'skin_graft'}, {'id': 12433, 'synset': 'epidermal_cell.n.01', 'name': 'epidermal_cell'}, {'id': 12434, 'synset': 'melanocyte.n.01', 'name': 'melanocyte'}, {'id': 12435, 'synset': 'prickle_cell.n.01', 'name': 'prickle_cell'}, {'id': 12436, 'synset': 'columnar_cell.n.01', 'name': 'columnar_cell'}, {'id': 12437, 'synset': 'spongioblast.n.01', 'name': 'spongioblast'}, {'id': 12438, 'synset': 'squamous_cell.n.01', 'name': 'squamous_cell'}, {'id': 12439, 'synset': 'amyloid_plaque.n.01', 'name': 'amyloid_plaque'}, {'id': 12440, 'synset': 'dental_plaque.n.01', 'name': 'dental_plaque'}, {'id': 12441, 'synset': 'macule.n.01', 'name': 'macule'}, {'id': 12442, 'synset': 'freckle.n.01', 'name': 'freckle'}, {'id': 12443, 'synset': 'bouffant.n.01', 'name': 'bouffant'}, {'id': 12444, 'synset': 'sausage_curl.n.01', 'name': 'sausage_curl'}, {'id': 12445, 'synset': 'forelock.n.01', 'name': 'forelock'}, {'id': 12446, 'synset': 'spit_curl.n.01', 'name': 'spit_curl'}, {'id': 12447, 'synset': 'pigtail.n.01', 'name': 'pigtail'}, {'id': 12448, 'synset': 'pageboy.n.02', 'name': 'pageboy'}, {'id': 12449, 'synset': 'pompadour.n.02', 'name': 'pompadour'}, {'id': 12450, 'synset': 'thatch.n.01', 'name': 'thatch'}, {'id': 12451, 'synset': 'soup-strainer.n.01', 'name': 'soup-strainer'}, {'id': 12452, 'synset': 'mustachio.n.01', 'name': 'mustachio'}, {'id': 12453, 'synset': 'walrus_mustache.n.01', 'name': 'walrus_mustache'}, {'id': 12454, 'synset': 'stubble.n.02', 'name': 'stubble'}, {'id': 12455, 'synset': 'vandyke_beard.n.01', 'name': 'vandyke_beard'}, {'id': 12456, 'synset': 'soul_patch.n.01', 'name': 'soul_patch'}, {'id': 12457, 'synset': 'esophageal_smear.n.01', 'name': 'esophageal_smear'}, {'id': 12458, 'synset': 'paraduodenal_smear.n.01', 'name': 'paraduodenal_smear'}, {'id': 12459, 'synset': 'specimen.n.02', 'name': 'specimen'}, {'id': 12460, 'synset': 'punctum.n.01', 'name': 'punctum'}, {'id': 12461, 'synset': 'glenoid_fossa.n.02', 'name': 'glenoid_fossa'}, {'id': 12462, 'synset': 'diastema.n.01', 'name': 'diastema'}, {'id': 12463, 'synset': 'marrow.n.01', 'name': 'marrow'}, {'id': 12464, 'synset': 'mouth.n.01', 'name': 'mouth'}, {'id': 12465, 'synset': 'canthus.n.01', 'name': 'canthus'}, {'id': 12466, 'synset': 'milk.n.02', 'name': 'milk'}, {'id': 12467, 'synset': "mother's_milk.n.01", 'name': "mother's_milk"}, {'id': 12468, 'synset': 'colostrum.n.01', 'name': 'colostrum'}, {'id': 12469, 'synset': 'vein.n.01', 'name': 'vein'}, {'id': 12470, 'synset': 'ganglion_cell.n.01', 'name': 'ganglion_cell'}, {'id': 12471, 'synset': 'x_chromosome.n.01', 'name': 'X_chromosome'}, {'id': 12472, 'synset': 'embryonic_cell.n.01', 'name': 'embryonic_cell'}, {'id': 12473, 'synset': 'myeloblast.n.01', 'name': 'myeloblast'}, {'id': 12474, 'synset': 'sideroblast.n.01', 'name': 'sideroblast'}, {'id': 12475, 'synset': 'osteocyte.n.01', 'name': 'osteocyte'}, {'id': 12476, 'synset': 'megalocyte.n.01', 'name': 'megalocyte'}, {'id': 12477, 'synset': 'leukocyte.n.01', 'name': 'leukocyte'}, {'id': 12478, 'synset': 'histiocyte.n.01', 'name': 'histiocyte'}, {'id': 12479, 'synset': 'fixed_phagocyte.n.01', 'name': 'fixed_phagocyte'}, {'id': 12480, 'synset': 'lymphocyte.n.01', 'name': 'lymphocyte'}, {'id': 12481, 'synset': 'monoblast.n.01', 'name': 'monoblast'}, {'id': 12482, 'synset': 'neutrophil.n.01', 'name': 'neutrophil'}, {'id': 12483, 'synset': 'microphage.n.01', 'name': 'microphage'}, {'id': 12484, 'synset': 'sickle_cell.n.01', 'name': 'sickle_cell'}, {'id': 12485, 'synset': 'siderocyte.n.01', 'name': 'siderocyte'}, {'id': 12486, 'synset': 'spherocyte.n.01', 'name': 'spherocyte'}, {'id': 12487, 'synset': 'ootid.n.01', 'name': 'ootid'}, {'id': 12488, 'synset': 'oocyte.n.01', 'name': 'oocyte'}, {'id': 12489, 'synset': 'spermatid.n.01', 'name': 'spermatid'}, {'id': 12490, 'synset': 'leydig_cell.n.01', 'name': 'Leydig_cell'}, {'id': 12491, 'synset': 'striated_muscle_cell.n.01', 'name': 'striated_muscle_cell'}, {'id': 12492, 'synset': 'smooth_muscle_cell.n.01', 'name': 'smooth_muscle_cell'}, {'id': 12493, 'synset': "ranvier's_nodes.n.01", 'name': "Ranvier's_nodes"}, {'id': 12494, 'synset': 'neuroglia.n.01', 'name': 'neuroglia'}, {'id': 12495, 'synset': 'astrocyte.n.01', 'name': 'astrocyte'}, {'id': 12496, 'synset': 'protoplasmic_astrocyte.n.01', 'name': 'protoplasmic_astrocyte'}, {'id': 12497, 'synset': 'oligodendrocyte.n.01', 'name': 'oligodendrocyte'}, {'id': 12498, 'synset': 'proprioceptor.n.01', 'name': 'proprioceptor'}, {'id': 12499, 'synset': 'dendrite.n.01', 'name': 'dendrite'}, {'id': 12500, 'synset': 'sensory_fiber.n.01', 'name': 'sensory_fiber'}, {'id': 12501, 'synset': 'subarachnoid_space.n.01', 'name': 'subarachnoid_space'}, {'id': 12502, 'synset': 'cerebral_cortex.n.01', 'name': 'cerebral_cortex'}, {'id': 12503, 'synset': 'renal_cortex.n.01', 'name': 'renal_cortex'}, {'id': 12504, 'synset': 'prepuce.n.02', 'name': 'prepuce'}, {'id': 12505, 'synset': 'head.n.01', 'name': 'head'}, {'id': 12506, 'synset': 'scalp.n.01', 'name': 'scalp'}, {'id': 12507, 'synset': 'frontal_eminence.n.01', 'name': 'frontal_eminence'}, {'id': 12508, 'synset': 'suture.n.01', 'name': 'suture'}, {'id': 12509, 'synset': 'foramen_magnum.n.01', 'name': 'foramen_magnum'}, {'id': 12510, 'synset': 'esophagogastric_junction.n.01', 'name': 'esophagogastric_junction'}, {'id': 12511, 'synset': 'heel.n.02', 'name': 'heel'}, {'id': 12512, 'synset': 'cuticle.n.01', 'name': 'cuticle'}, {'id': 12513, 'synset': 'hangnail.n.01', 'name': 'hangnail'}, {'id': 12514, 'synset': 'exoskeleton.n.01', 'name': 'exoskeleton'}, {'id': 12515, 'synset': 'abdominal_wall.n.01', 'name': 'abdominal_wall'}, {'id': 12516, 'synset': 'lemon.n.04', 'name': 'lemon'}, {'id': 12517, 'synset': 'coordinate_axis.n.01', 'name': 'coordinate_axis'}, {'id': 12518, 'synset': 'landscape.n.04', 'name': 'landscape'}, {'id': 12519, 'synset': 'medium.n.01', 'name': 'medium'}, {'id': 12520, 'synset': 'vehicle.n.02', 'name': 'vehicle'}, {'id': 12521, 'synset': 'paper.n.04', 'name': 'paper'}, {'id': 12522, 'synset': 'channel.n.01', 'name': 'channel'}, {'id': 12523, 'synset': 'film.n.02', 'name': 'film'}, {'id': 12524, 'synset': 'silver_screen.n.01', 'name': 'silver_screen'}, {'id': 12525, 'synset': 'free_press.n.01', 'name': 'free_press'}, {'id': 12526, 'synset': 'press.n.02', 'name': 'press'}, {'id': 12527, 'synset': 'print_media.n.01', 'name': 'print_media'}, {'id': 12528, 'synset': 'storage_medium.n.01', 'name': 'storage_medium'}, {'id': 12529, 'synset': 'magnetic_storage_medium.n.01', 'name': 'magnetic_storage_medium'}, {'id': 12530, 'synset': 'journalism.n.01', 'name': 'journalism'}, {'id': 12531, 'synset': 'fleet_street.n.02', 'name': 'Fleet_Street'}, {'id': 12532, 'synset': 'photojournalism.n.01', 'name': 'photojournalism'}, {'id': 12533, 'synset': 'news_photography.n.01', 'name': 'news_photography'}, {'id': 12534, 'synset': 'rotogravure.n.02', 'name': 'rotogravure'}, {'id': 12535, 'synset': 'daily.n.01', 'name': 'daily'}, {'id': 12536, 'synset': 'gazette.n.01', 'name': 'gazette'}, {'id': 12537, 'synset': 'school_newspaper.n.01', 'name': 'school_newspaper'}, {'id': 12538, 'synset': 'tabloid.n.02', 'name': 'tabloid'}, {'id': 12539, 'synset': 'yellow_journalism.n.01', 'name': 'yellow_journalism'}, {'id': 12540, 'synset': 'telecommunication.n.01', 'name': 'telecommunication'}, {'id': 12541, 'synset': 'telephone.n.02', 'name': 'telephone'}, {'id': 12542, 'synset': 'voice_mail.n.01', 'name': 'voice_mail'}, {'id': 12543, 'synset': 'call.n.01', 'name': 'call'}, {'id': 12544, 'synset': 'call-back.n.01', 'name': 'call-back'}, {'id': 12545, 'synset': 'collect_call.n.01', 'name': 'collect_call'}, {'id': 12546, 'synset': 'call_forwarding.n.01', 'name': 'call_forwarding'}, {'id': 12547, 'synset': 'call-in.n.01', 'name': 'call-in'}, {'id': 12548, 'synset': 'call_waiting.n.01', 'name': 'call_waiting'}, {'id': 12549, 'synset': 'crank_call.n.01', 'name': 'crank_call'}, {'id': 12550, 'synset': 'local_call.n.01', 'name': 'local_call'}, {'id': 12551, 'synset': 'long_distance.n.01', 'name': 'long_distance'}, {'id': 12552, 'synset': 'toll_call.n.01', 'name': 'toll_call'}, {'id': 12553, 'synset': 'wake-up_call.n.02', 'name': 'wake-up_call'}, {'id': 12554, 'synset': 'three-way_calling.n.01', 'name': 'three-way_calling'}, {'id': 12555, 'synset': 'telegraphy.n.01', 'name': 'telegraphy'}, {'id': 12556, 'synset': 'cable.n.01', 'name': 'cable'}, {'id': 12557, 'synset': 'wireless.n.02', 'name': 'wireless'}, {'id': 12558, 'synset': 'radiotelegraph.n.01', 'name': 'radiotelegraph'}, {'id': 12559, 'synset': 'radiotelephone.n.01', 'name': 'radiotelephone'}, {'id': 12560, 'synset': 'broadcasting.n.02', 'name': 'broadcasting'}, {'id': 12561, 'synset': 'rediffusion.n.01', 'name': 'Rediffusion'}, {'id': 12562, 'synset': 'multiplex.n.01', 'name': 'multiplex'}, {'id': 12563, 'synset': 'radio.n.01', 'name': 'radio'}, {'id': 12564, 'synset': 'television.n.01', 'name': 'television'}, {'id': 12565, 'synset': 'cable_television.n.01', 'name': 'cable_television'}, {'id': 12566, 'synset': 'high-definition_television.n.01', 'name': 'high-definition_television'}, {'id': 12567, 'synset': 'reception.n.03', 'name': 'reception'}, {'id': 12568, 'synset': 'signal_detection.n.01', 'name': 'signal_detection'}, {'id': 12569, 'synset': 'hakham.n.01', 'name': 'Hakham'}, {'id': 12570, 'synset': 'web_site.n.01', 'name': 'web_site'}, {'id': 12571, 'synset': 'chat_room.n.01', 'name': 'chat_room'}, {'id': 12572, 'synset': 'portal_site.n.01', 'name': 'portal_site'}, {'id': 12573, 'synset': 'jotter.n.01', 'name': 'jotter'}, {'id': 12574, 'synset': 'breviary.n.01', 'name': 'breviary'}, {'id': 12575, 'synset': 'wordbook.n.01', 'name': 'wordbook'}, {'id': 12576, 'synset': 'desk_dictionary.n.01', 'name': 'desk_dictionary'}, {'id': 12577, 'synset': 'reckoner.n.02', 'name': 'reckoner'}, {'id': 12578, 'synset': 'document.n.01', 'name': 'document'}, {'id': 12579, 'synset': 'album.n.01', 'name': 'album'}, {'id': 12580, 'synset': 'concept_album.n.01', 'name': 'concept_album'}, {'id': 12581, 'synset': 'rock_opera.n.01', 'name': 'rock_opera'}, {'id': 12582, 'synset': 'tribute_album.n.01', 'name': 'tribute_album'}, {'id': 12583, 'synset': 'magazine.n.01', 'name': 'magazine'}, {'id': 12584, 'synset': 'colour_supplement.n.01', 'name': 'colour_supplement'}, {'id': 12585, 'synset': 'news_magazine.n.01', 'name': 'news_magazine'}, {'id': 12586, 'synset': 'pulp.n.04', 'name': 'pulp'}, {'id': 12587, 'synset': 'slick.n.02', 'name': 'slick'}, {'id': 12588, 'synset': 'trade_magazine.n.01', 'name': 'trade_magazine'}, {'id': 12589, 'synset': 'movie.n.01', 'name': 'movie'}, {'id': 12590, 'synset': 'outtake.n.01', 'name': 'outtake'}, {'id': 12591, 'synset': "shoot-'em-up.n.01", 'name': "shoot-'em-up"}, {'id': 12592, 'synset': 'spaghetti_western.n.01', 'name': 'spaghetti_Western'}, {'id': 12593, 'synset': 'encyclical.n.01', 'name': 'encyclical'}, {'id': 12594, 'synset': 'crossword_puzzle.n.01', 'name': 'crossword_puzzle'}, {'id': 12595, 'synset': 'sign.n.02', 'name': 'sign'}, {'id': 12596, 'synset': 'swastika.n.01', 'name': 'swastika'}, {'id': 12597, 'synset': 'concert.n.01', 'name': 'concert'}, {'id': 12598, 'synset': 'artwork.n.01', 'name': 'artwork'}, {'id': 12599, 'synset': 'lobe.n.03', 'name': 'lobe'}, {'id': 12600, 'synset': 'book_jacket.n.01', 'name': 'book_jacket'}, {'id': 12601, 'synset': 'cairn.n.01', 'name': 'cairn'}, {'id': 12602, 'synset': 'three-day_event.n.01', 'name': 'three-day_event'}, {'id': 12603, 'synset': 'comfort_food.n.01', 'name': 'comfort_food'}, {'id': 12604, 'synset': 'comestible.n.01', 'name': 'comestible'}, {'id': 12605, 'synset': 'tuck.n.01', 'name': 'tuck'}, {'id': 12606, 'synset': 'course.n.07', 'name': 'course'}, {'id': 12607, 'synset': 'dainty.n.01', 'name': 'dainty'}, {'id': 12608, 'synset': 'dish.n.02', 'name': 'dish'}, {'id': 12609, 'synset': 'fast_food.n.01', 'name': 'fast_food'}, {'id': 12610, 'synset': 'finger_food.n.01', 'name': 'finger_food'}, {'id': 12611, 'synset': 'ingesta.n.01', 'name': 'ingesta'}, {'id': 12612, 'synset': 'kosher.n.01', 'name': 'kosher'}, {'id': 12613, 'synset': 'fare.n.04', 'name': 'fare'}, {'id': 12614, 'synset': 'diet.n.03', 'name': 'diet'}, {'id': 12615, 'synset': 'diet.n.01', 'name': 'diet'}, {'id': 12616, 'synset': 'dietary.n.01', 'name': 'dietary'}, {'id': 12617, 'synset': 'balanced_diet.n.01', 'name': 'balanced_diet'}, {'id': 12618, 'synset': 'bland_diet.n.01', 'name': 'bland_diet'}, {'id': 12619, 'synset': 'clear_liquid_diet.n.01', 'name': 'clear_liquid_diet'}, {'id': 12620, 'synset': 'diabetic_diet.n.01', 'name': 'diabetic_diet'}, {'id': 12621, 'synset': 'dietary_supplement.n.01', 'name': 'dietary_supplement'}, {'id': 12622, 'synset': 'carbohydrate_loading.n.01', 'name': 'carbohydrate_loading'}, {'id': 12623, 'synset': 'fad_diet.n.01', 'name': 'fad_diet'}, {'id': 12624, 'synset': 'gluten-free_diet.n.01', 'name': 'gluten-free_diet'}, {'id': 12625, 'synset': 'high-protein_diet.n.01', 'name': 'high-protein_diet'}, {'id': 12626, 'synset': 'high-vitamin_diet.n.01', 'name': 'high-vitamin_diet'}, {'id': 12627, 'synset': 'light_diet.n.01', 'name': 'light_diet'}, {'id': 12628, 'synset': 'liquid_diet.n.01', 'name': 'liquid_diet'}, {'id': 12629, 'synset': 'low-calorie_diet.n.01', 'name': 'low-calorie_diet'}, {'id': 12630, 'synset': 'low-fat_diet.n.01', 'name': 'low-fat_diet'}, {'id': 12631, 'synset': 'low-sodium_diet.n.01', 'name': 'low-sodium_diet'}, {'id': 12632, 'synset': 'macrobiotic_diet.n.01', 'name': 'macrobiotic_diet'}, {'id': 12633, 'synset': 'reducing_diet.n.01', 'name': 'reducing_diet'}, {'id': 12634, 'synset': 'soft_diet.n.01', 'name': 'soft_diet'}, {'id': 12635, 'synset': 'vegetarianism.n.01', 'name': 'vegetarianism'}, {'id': 12636, 'synset': 'menu.n.02', 'name': 'menu'}, {'id': 12637, 'synset': 'chow.n.02', 'name': 'chow'}, {'id': 12638, 'synset': 'board.n.04', 'name': 'board'}, {'id': 12639, 'synset': 'mess.n.04', 'name': 'mess'}, {'id': 12640, 'synset': 'ration.n.01', 'name': 'ration'}, {'id': 12641, 'synset': 'field_ration.n.01', 'name': 'field_ration'}, {'id': 12642, 'synset': 'k_ration.n.01', 'name': 'K_ration'}, {'id': 12643, 'synset': 'c-ration.n.01', 'name': 'C-ration'}, {'id': 12644, 'synset': 'foodstuff.n.02', 'name': 'foodstuff'}, {'id': 12645, 'synset': 'starches.n.01', 'name': 'starches'}, {'id': 12646, 'synset': 'breadstuff.n.02', 'name': 'breadstuff'}, {'id': 12647, 'synset': 'coloring.n.01', 'name': 'coloring'}, {'id': 12648, 'synset': 'concentrate.n.02', 'name': 'concentrate'}, {'id': 12649, 'synset': 'tomato_concentrate.n.01', 'name': 'tomato_concentrate'}, {'id': 12650, 'synset': 'meal.n.03', 'name': 'meal'}, {'id': 12651, 'synset': 'kibble.n.01', 'name': 'kibble'}, {'id': 12652, 'synset': 'farina.n.01', 'name': 'farina'}, {'id': 12653, 'synset': 'matzo_meal.n.01', 'name': 'matzo_meal'}, {'id': 12654, 'synset': 'oatmeal.n.02', 'name': 'oatmeal'}, {'id': 12655, 'synset': 'pea_flour.n.01', 'name': 'pea_flour'}, {'id': 12656, 'synset': 'roughage.n.01', 'name': 'roughage'}, {'id': 12657, 'synset': 'bran.n.02', 'name': 'bran'}, {'id': 12658, 'synset': 'flour.n.01', 'name': 'flour'}, {'id': 12659, 'synset': 'plain_flour.n.01', 'name': 'plain_flour'}, {'id': 12660, 'synset': 'wheat_flour.n.01', 'name': 'wheat_flour'}, {'id': 12661, 'synset': 'whole_wheat_flour.n.01', 'name': 'whole_wheat_flour'}, {'id': 12662, 'synset': 'soybean_meal.n.01', 'name': 'soybean_meal'}, {'id': 12663, 'synset': 'semolina.n.01', 'name': 'semolina'}, {'id': 12664, 'synset': 'corn_gluten_feed.n.01', 'name': 'corn_gluten_feed'}, {'id': 12665, 'synset': 'nutriment.n.01', 'name': 'nutriment'}, {'id': 12666, 'synset': 'commissariat.n.01', 'name': 'commissariat'}, {'id': 12667, 'synset': 'larder.n.01', 'name': 'larder'}, {'id': 12668, 'synset': 'frozen_food.n.01', 'name': 'frozen_food'}, {'id': 12669, 'synset': 'canned_food.n.01', 'name': 'canned_food'}, {'id': 12670, 'synset': 'canned_meat.n.01', 'name': 'canned_meat'}, {'id': 12671, 'synset': 'spam.n.01', 'name': 'Spam'}, {'id': 12672, 'synset': 'dehydrated_food.n.01', 'name': 'dehydrated_food'}, {'id': 12673, 'synset': 'square_meal.n.01', 'name': 'square_meal'}, {'id': 12674, 'synset': 'meal.n.01', 'name': 'meal'}, {'id': 12675, 'synset': 'potluck.n.01', 'name': 'potluck'}, {'id': 12676, 'synset': 'refection.n.01', 'name': 'refection'}, {'id': 12677, 'synset': 'refreshment.n.01', 'name': 'refreshment'}, {'id': 12678, 'synset': 'breakfast.n.01', 'name': 'breakfast'}, {'id': 12679, 'synset': 'continental_breakfast.n.01', 'name': 'continental_breakfast'}, {'id': 12680, 'synset': 'brunch.n.01', 'name': 'brunch'}, {'id': 12681, 'synset': 'lunch.n.01', 'name': 'lunch'}, {'id': 12682, 'synset': 'business_lunch.n.01', 'name': 'business_lunch'}, {'id': 12683, 'synset': 'high_tea.n.01', 'name': 'high_tea'}, {'id': 12684, 'synset': 'tea.n.02', 'name': 'tea'}, {'id': 12685, 'synset': 'dinner.n.01', 'name': 'dinner'}, {'id': 12686, 'synset': 'supper.n.01', 'name': 'supper'}, {'id': 12687, 'synset': 'buffet.n.02', 'name': 'buffet'}, {'id': 12688, 'synset': 'picnic.n.03', 'name': 'picnic'}, {'id': 12689, 'synset': 'cookout.n.01', 'name': 'cookout'}, {'id': 12690, 'synset': 'barbecue.n.02', 'name': 'barbecue'}, {'id': 12691, 'synset': 'clambake.n.01', 'name': 'clambake'}, {'id': 12692, 'synset': 'fish_fry.n.01', 'name': 'fish_fry'}, {'id': 12693, 'synset': 'bite.n.04', 'name': 'bite'}, {'id': 12694, 'synset': 'nosh.n.01', 'name': 'nosh'}, {'id': 12695, 'synset': 'nosh-up.n.01', 'name': 'nosh-up'}, {'id': 12696, 'synset': "ploughman's_lunch.n.01", 'name': "ploughman's_lunch"}, {'id': 12697, 'synset': 'coffee_break.n.01', 'name': 'coffee_break'}, {'id': 12698, 'synset': 'banquet.n.02', 'name': 'banquet'}, {'id': 12699, 'synset': 'entree.n.01', 'name': 'entree'}, {'id': 12700, 'synset': 'piece_de_resistance.n.02', 'name': 'piece_de_resistance'}, {'id': 12701, 'synset': 'plate.n.08', 'name': 'plate'}, {'id': 12702, 'synset': 'adobo.n.01', 'name': 'adobo'}, {'id': 12703, 'synset': 'side_dish.n.01', 'name': 'side_dish'}, {'id': 12704, 'synset': 'special.n.02', 'name': 'special'}, {'id': 12705, 'synset': 'chicken_casserole.n.01', 'name': 'chicken_casserole'}, {'id': 12706, 'synset': 'chicken_cacciatore.n.01', 'name': 'chicken_cacciatore'}, {'id': 12707, 'synset': 'antipasto.n.01', 'name': 'antipasto'}, {'id': 12708, 'synset': 'appetizer.n.01', 'name': 'appetizer'}, {'id': 12709, 'synset': 'canape.n.01', 'name': 'canape'}, {'id': 12710, 'synset': 'cocktail.n.02', 'name': 'cocktail'}, {'id': 12711, 'synset': 'fruit_cocktail.n.01', 'name': 'fruit_cocktail'}, {'id': 12712, 'synset': 'crab_cocktail.n.01', 'name': 'crab_cocktail'}, {'id': 12713, 'synset': 'shrimp_cocktail.n.01', 'name': 'shrimp_cocktail'}, {'id': 12714, 'synset': "hors_d'oeuvre.n.01", 'name': "hors_d'oeuvre"}, {'id': 12715, 'synset': 'relish.n.02', 'name': 'relish'}, {'id': 12716, 'synset': 'dip.n.04', 'name': 'dip'}, {'id': 12717, 'synset': 'bean_dip.n.01', 'name': 'bean_dip'}, {'id': 12718, 'synset': 'cheese_dip.n.01', 'name': 'cheese_dip'}, {'id': 12719, 'synset': 'clam_dip.n.01', 'name': 'clam_dip'}, {'id': 12720, 'synset': 'guacamole.n.01', 'name': 'guacamole'}, {'id': 12721, 'synset': 'soup_du_jour.n.01', 'name': 'soup_du_jour'}, {'id': 12722, 'synset': 'alphabet_soup.n.02', 'name': 'alphabet_soup'}, {'id': 12723, 'synset': 'consomme.n.01', 'name': 'consomme'}, {'id': 12724, 'synset': 'madrilene.n.01', 'name': 'madrilene'}, {'id': 12725, 'synset': 'bisque.n.01', 'name': 'bisque'}, {'id': 12726, 'synset': 'borsch.n.01', 'name': 'borsch'}, {'id': 12727, 'synset': 'broth.n.02', 'name': 'broth'}, {'id': 12728, 'synset': 'barley_water.n.01', 'name': 'barley_water'}, {'id': 12729, 'synset': 'bouillon.n.01', 'name': 'bouillon'}, {'id': 12730, 'synset': 'beef_broth.n.01', 'name': 'beef_broth'}, {'id': 12731, 'synset': 'chicken_broth.n.01', 'name': 'chicken_broth'}, {'id': 12732, 'synset': 'broth.n.01', 'name': 'broth'}, {'id': 12733, 'synset': 'stock_cube.n.01', 'name': 'stock_cube'}, {'id': 12734, 'synset': 'chicken_soup.n.01', 'name': 'chicken_soup'}, {'id': 12735, 'synset': 'cock-a-leekie.n.01', 'name': 'cock-a-leekie'}, {'id': 12736, 'synset': 'gazpacho.n.01', 'name': 'gazpacho'}, {'id': 12737, 'synset': 'gumbo.n.04', 'name': 'gumbo'}, {'id': 12738, 'synset': 'julienne.n.02', 'name': 'julienne'}, {'id': 12739, 'synset': 'marmite.n.01', 'name': 'marmite'}, {'id': 12740, 'synset': 'mock_turtle_soup.n.01', 'name': 'mock_turtle_soup'}, {'id': 12741, 'synset': 'mulligatawny.n.01', 'name': 'mulligatawny'}, {'id': 12742, 'synset': 'oxtail_soup.n.01', 'name': 'oxtail_soup'}, {'id': 12743, 'synset': 'pea_soup.n.01', 'name': 'pea_soup'}, {'id': 12744, 'synset': 'pepper_pot.n.01', 'name': 'pepper_pot'}, {'id': 12745, 'synset': 'petite_marmite.n.01', 'name': 'petite_marmite'}, {'id': 12746, 'synset': 'potage.n.01', 'name': 'potage'}, {'id': 12747, 'synset': 'pottage.n.01', 'name': 'pottage'}, {'id': 12748, 'synset': 'turtle_soup.n.01', 'name': 'turtle_soup'}, {'id': 12749, 'synset': 'eggdrop_soup.n.01', 'name': 'eggdrop_soup'}, {'id': 12750, 'synset': 'chowder.n.01', 'name': 'chowder'}, {'id': 12751, 'synset': 'corn_chowder.n.01', 'name': 'corn_chowder'}, {'id': 12752, 'synset': 'clam_chowder.n.01', 'name': 'clam_chowder'}, {'id': 12753, 'synset': 'manhattan_clam_chowder.n.01', 'name': 'Manhattan_clam_chowder'}, {'id': 12754, 'synset': 'new_england_clam_chowder.n.01', 'name': 'New_England_clam_chowder'}, {'id': 12755, 'synset': 'fish_chowder.n.01', 'name': 'fish_chowder'}, {'id': 12756, 'synset': 'won_ton.n.02', 'name': 'won_ton'}, {'id': 12757, 'synset': 'split-pea_soup.n.01', 'name': 'split-pea_soup'}, {'id': 12758, 'synset': 'green_pea_soup.n.01', 'name': 'green_pea_soup'}, {'id': 12759, 'synset': 'lentil_soup.n.01', 'name': 'lentil_soup'}, {'id': 12760, 'synset': 'scotch_broth.n.01', 'name': 'Scotch_broth'}, {'id': 12761, 'synset': 'vichyssoise.n.01', 'name': 'vichyssoise'}, {'id': 12762, 'synset': 'bigos.n.01', 'name': 'bigos'}, {'id': 12763, 'synset': 'brunswick_stew.n.01', 'name': 'Brunswick_stew'}, {'id': 12764, 'synset': 'burgoo.n.03', 'name': 'burgoo'}, {'id': 12765, 'synset': 'burgoo.n.02', 'name': 'burgoo'}, {'id': 12766, 'synset': 'olla_podrida.n.01', 'name': 'olla_podrida'}, {'id': 12767, 'synset': 'mulligan_stew.n.01', 'name': 'mulligan_stew'}, {'id': 12768, 'synset': 'purloo.n.01', 'name': 'purloo'}, {'id': 12769, 'synset': 'goulash.n.01', 'name': 'goulash'}, {'id': 12770, 'synset': 'hotchpotch.n.02', 'name': 'hotchpotch'}, {'id': 12771, 'synset': 'hot_pot.n.01', 'name': 'hot_pot'}, {'id': 12772, 'synset': 'beef_goulash.n.01', 'name': 'beef_goulash'}, {'id': 12773, 'synset': 'pork-and-veal_goulash.n.01', 'name': 'pork-and-veal_goulash'}, {'id': 12774, 'synset': 'porkholt.n.01', 'name': 'porkholt'}, {'id': 12775, 'synset': 'irish_stew.n.01', 'name': 'Irish_stew'}, {'id': 12776, 'synset': 'oyster_stew.n.01', 'name': 'oyster_stew'}, {'id': 12777, 'synset': 'lobster_stew.n.01', 'name': 'lobster_stew'}, {'id': 12778, 'synset': 'lobscouse.n.01', 'name': 'lobscouse'}, {'id': 12779, 'synset': 'fish_stew.n.01', 'name': 'fish_stew'}, {'id': 12780, 'synset': 'bouillabaisse.n.01', 'name': 'bouillabaisse'}, {'id': 12781, 'synset': 'matelote.n.01', 'name': 'matelote'}, {'id': 12782, 'synset': 'paella.n.01', 'name': 'paella'}, {'id': 12783, 'synset': 'fricassee.n.01', 'name': 'fricassee'}, {'id': 12784, 'synset': 'chicken_stew.n.01', 'name': 'chicken_stew'}, {'id': 12785, 'synset': 'turkey_stew.n.01', 'name': 'turkey_stew'}, {'id': 12786, 'synset': 'beef_stew.n.01', 'name': 'beef_stew'}, {'id': 12787, 'synset': 'ragout.n.01', 'name': 'ragout'}, {'id': 12788, 'synset': 'ratatouille.n.01', 'name': 'ratatouille'}, {'id': 12789, 'synset': 'salmi.n.01', 'name': 'salmi'}, {'id': 12790, 'synset': 'pot-au-feu.n.01', 'name': 'pot-au-feu'}, {'id': 12791, 'synset': 'slumgullion.n.01', 'name': 'slumgullion'}, {'id': 12792, 'synset': 'smorgasbord.n.02', 'name': 'smorgasbord'}, {'id': 12793, 'synset': 'viand.n.01', 'name': 'viand'}, {'id': 12794, 'synset': 'ready-mix.n.01', 'name': 'ready-mix'}, {'id': 12795, 'synset': 'brownie_mix.n.01', 'name': 'brownie_mix'}, {'id': 12796, 'synset': 'cake_mix.n.01', 'name': 'cake_mix'}, {'id': 12797, 'synset': 'lemonade_mix.n.01', 'name': 'lemonade_mix'}, {'id': 12798, 'synset': 'self-rising_flour.n.01', 'name': 'self-rising_flour'}, {'id': 12799, 'synset': 'choice_morsel.n.01', 'name': 'choice_morsel'}, {'id': 12800, 'synset': 'savory.n.04', 'name': 'savory'}, {'id': 12801, 'synset': "calf's-foot_jelly.n.01", 'name': "calf's-foot_jelly"}, {'id': 12802, 'synset': 'caramel.n.02', 'name': 'caramel'}, {'id': 12803, 'synset': 'lump_sugar.n.01', 'name': 'lump_sugar'}, {'id': 12804, 'synset': 'cane_sugar.n.02', 'name': 'cane_sugar'}, {'id': 12805, 'synset': 'castor_sugar.n.01', 'name': 'castor_sugar'}, {'id': 12806, 'synset': 'powdered_sugar.n.01', 'name': 'powdered_sugar'}, {'id': 12807, 'synset': 'granulated_sugar.n.01', 'name': 'granulated_sugar'}, {'id': 12808, 'synset': 'icing_sugar.n.01', 'name': 'icing_sugar'}, {'id': 12809, 'synset': 'corn_sugar.n.02', 'name': 'corn_sugar'}, {'id': 12810, 'synset': 'brown_sugar.n.01', 'name': 'brown_sugar'}, {'id': 12811, 'synset': 'demerara.n.05', 'name': 'demerara'}, {'id': 12812, 'synset': 'sweet.n.03', 'name': 'sweet'}, {'id': 12813, 'synset': 'confectionery.n.01', 'name': 'confectionery'}, {'id': 12814, 'synset': 'confiture.n.01', 'name': 'confiture'}, {'id': 12815, 'synset': 'sweetmeat.n.01', 'name': 'sweetmeat'}, {'id': 12816, 'synset': 'candy.n.01', 'name': 'candy'}, {'id': 12817, 'synset': 'carob_bar.n.01', 'name': 'carob_bar'}, {'id': 12818, 'synset': 'hardbake.n.01', 'name': 'hardbake'}, {'id': 12819, 'synset': 'hard_candy.n.01', 'name': 'hard_candy'}, {'id': 12820, 'synset': 'barley-sugar.n.01', 'name': 'barley-sugar'}, {'id': 12821, 'synset': 'brandyball.n.01', 'name': 'brandyball'}, {'id': 12822, 'synset': 'jawbreaker.n.01', 'name': 'jawbreaker'}, {'id': 12823, 'synset': 'lemon_drop.n.01', 'name': 'lemon_drop'}, {'id': 12824, 'synset': 'sourball.n.01', 'name': 'sourball'}, {'id': 12825, 'synset': 'patty.n.03', 'name': 'patty'}, {'id': 12826, 'synset': 'peppermint_patty.n.01', 'name': 'peppermint_patty'}, {'id': 12827, 'synset': 'bonbon.n.01', 'name': 'bonbon'}, {'id': 12828, 'synset': 'brittle.n.01', 'name': 'brittle'}, {'id': 12829, 'synset': 'peanut_brittle.n.01', 'name': 'peanut_brittle'}, {'id': 12830, 'synset': 'chewing_gum.n.01', 'name': 'chewing_gum'}, {'id': 12831, 'synset': 'gum_ball.n.01', 'name': 'gum_ball'}, {'id': 12832, 'synset': 'butterscotch.n.01', 'name': 'butterscotch'}, {'id': 12833, 'synset': 'candied_fruit.n.01', 'name': 'candied_fruit'}, {'id': 12834, 'synset': 'candied_apple.n.01', 'name': 'candied_apple'}, {'id': 12835, 'synset': 'crystallized_ginger.n.01', 'name': 'crystallized_ginger'}, {'id': 12836, 'synset': 'grapefruit_peel.n.01', 'name': 'grapefruit_peel'}, {'id': 12837, 'synset': 'lemon_peel.n.02', 'name': 'lemon_peel'}, {'id': 12838, 'synset': 'orange_peel.n.02', 'name': 'orange_peel'}, {'id': 12839, 'synset': 'candied_citrus_peel.n.01', 'name': 'candied_citrus_peel'}, {'id': 12840, 'synset': 'candy_corn.n.01', 'name': 'candy_corn'}, {'id': 12841, 'synset': 'caramel.n.01', 'name': 'caramel'}, {'id': 12842, 'synset': 'center.n.14', 'name': 'center'}, {'id': 12843, 'synset': 'comfit.n.01', 'name': 'comfit'}, {'id': 12844, 'synset': 'cotton_candy.n.01', 'name': 'cotton_candy'}, {'id': 12845, 'synset': 'dragee.n.02', 'name': 'dragee'}, {'id': 12846, 'synset': 'dragee.n.01', 'name': 'dragee'}, {'id': 12847, 'synset': 'fondant.n.01', 'name': 'fondant'}, {'id': 12848, 'synset': 'chocolate_fudge.n.01', 'name': 'chocolate_fudge'}, {'id': 12849, 'synset': 'divinity.n.03', 'name': 'divinity'}, {'id': 12850, 'synset': 'penuche.n.01', 'name': 'penuche'}, {'id': 12851, 'synset': 'gumdrop.n.01', 'name': 'gumdrop'}, {'id': 12852, 'synset': 'jujube.n.03', 'name': 'jujube'}, {'id': 12853, 'synset': 'honey_crisp.n.01', 'name': 'honey_crisp'}, {'id': 12854, 'synset': 'horehound.n.02', 'name': 'horehound'}, {'id': 12855, 'synset': 'peppermint.n.03', 'name': 'peppermint'}, {'id': 12856, 'synset': 'kiss.n.03', 'name': 'kiss'}, {'id': 12857, 'synset': 'molasses_kiss.n.01', 'name': 'molasses_kiss'}, {'id': 12858, 'synset': 'meringue_kiss.n.01', 'name': 'meringue_kiss'}, {'id': 12859, 'synset': 'chocolate_kiss.n.01', 'name': 'chocolate_kiss'}, {'id': 12860, 'synset': 'licorice.n.02', 'name': 'licorice'}, {'id': 12861, 'synset': 'life_saver.n.01', 'name': 'Life_Saver'}, {'id': 12862, 'synset': 'lozenge.n.01', 'name': 'lozenge'}, {'id': 12863, 'synset': 'cachou.n.01', 'name': 'cachou'}, {'id': 12864, 'synset': 'cough_drop.n.01', 'name': 'cough_drop'}, {'id': 12865, 'synset': 'marshmallow.n.01', 'name': 'marshmallow'}, {'id': 12866, 'synset': 'marzipan.n.01', 'name': 'marzipan'}, {'id': 12867, 'synset': 'nougat.n.01', 'name': 'nougat'}, {'id': 12868, 'synset': 'nougat_bar.n.01', 'name': 'nougat_bar'}, {'id': 12869, 'synset': 'nut_bar.n.01', 'name': 'nut_bar'}, {'id': 12870, 'synset': 'peanut_bar.n.01', 'name': 'peanut_bar'}, {'id': 12871, 'synset': 'popcorn_ball.n.01', 'name': 'popcorn_ball'}, {'id': 12872, 'synset': 'praline.n.01', 'name': 'praline'}, {'id': 12873, 'synset': 'rock_candy.n.02', 'name': 'rock_candy'}, {'id': 12874, 'synset': 'rock_candy.n.01', 'name': 'rock_candy'}, {'id': 12875, 'synset': 'sugar_candy.n.01', 'name': 'sugar_candy'}, {'id': 12876, 'synset': 'sugarplum.n.01', 'name': 'sugarplum'}, {'id': 12877, 'synset': 'taffy.n.01', 'name': 'taffy'}, {'id': 12878, 'synset': 'molasses_taffy.n.01', 'name': 'molasses_taffy'}, {'id': 12879, 'synset': 'turkish_delight.n.01', 'name': 'Turkish_Delight'}, {'id': 12880, 'synset': 'dessert.n.01', 'name': 'dessert'}, {'id': 12881, 'synset': 'ambrosia.n.04', 'name': 'ambrosia'}, {'id': 12882, 'synset': 'ambrosia.n.03', 'name': 'ambrosia'}, {'id': 12883, 'synset': 'baked_alaska.n.01', 'name': 'baked_Alaska'}, {'id': 12884, 'synset': 'blancmange.n.01', 'name': 'blancmange'}, {'id': 12885, 'synset': 'charlotte.n.02', 'name': 'charlotte'}, {'id': 12886, 'synset': 'compote.n.01', 'name': 'compote'}, {'id': 12887, 'synset': 'dumpling.n.02', 'name': 'dumpling'}, {'id': 12888, 'synset': 'flan.n.01', 'name': 'flan'}, {'id': 12889, 'synset': 'frozen_dessert.n.01', 'name': 'frozen_dessert'}, {'id': 12890, 'synset': 'junket.n.01', 'name': 'junket'}, {'id': 12891, 'synset': 'mousse.n.02', 'name': 'mousse'}, {'id': 12892, 'synset': 'mousse.n.01', 'name': 'mousse'}, {'id': 12893, 'synset': 'pavlova.n.02', 'name': 'pavlova'}, {'id': 12894, 'synset': 'peach_melba.n.01', 'name': 'peach_melba'}, {'id': 12895, 'synset': 'whip.n.03', 'name': 'whip'}, {'id': 12896, 'synset': 'prune_whip.n.01', 'name': 'prune_whip'}, {'id': 12897, 'synset': 'pudding.n.03', 'name': 'pudding'}, {'id': 12898, 'synset': 'pudding.n.02', 'name': 'pudding'}, {'id': 12899, 'synset': 'syllabub.n.02', 'name': 'syllabub'}, {'id': 12900, 'synset': 'tiramisu.n.01', 'name': 'tiramisu'}, {'id': 12901, 'synset': 'trifle.n.01', 'name': 'trifle'}, {'id': 12902, 'synset': 'tipsy_cake.n.01', 'name': 'tipsy_cake'}, {'id': 12903, 'synset': 'jello.n.01', 'name': 'jello'}, {'id': 12904, 'synset': 'apple_dumpling.n.01', 'name': 'apple_dumpling'}, {'id': 12905, 'synset': 'ice.n.05', 'name': 'ice'}, {'id': 12906, 'synset': 'water_ice.n.02', 'name': 'water_ice'}, {'id': 12907, 'synset': 'ice-cream_cone.n.01', 'name': 'ice-cream_cone'}, {'id': 12908, 'synset': 'chocolate_ice_cream.n.01', 'name': 'chocolate_ice_cream'}, {'id': 12909, 'synset': 'neapolitan_ice_cream.n.01', 'name': 'Neapolitan_ice_cream'}, {'id': 12910, 'synset': 'peach_ice_cream.n.01', 'name': 'peach_ice_cream'}, {'id': 12911, 'synset': 'strawberry_ice_cream.n.01', 'name': 'strawberry_ice_cream'}, {'id': 12912, 'synset': 'tutti-frutti.n.01', 'name': 'tutti-frutti'}, {'id': 12913, 'synset': 'vanilla_ice_cream.n.01', 'name': 'vanilla_ice_cream'}, {'id': 12914, 'synset': 'ice_milk.n.01', 'name': 'ice_milk'}, {'id': 12915, 'synset': 'frozen_yogurt.n.01', 'name': 'frozen_yogurt'}, {'id': 12916, 'synset': 'snowball.n.03', 'name': 'snowball'}, {'id': 12917, 'synset': 'snowball.n.02', 'name': 'snowball'}, {'id': 12918, 'synset': 'parfait.n.01', 'name': 'parfait'}, {'id': 12919, 'synset': 'ice-cream_sundae.n.01', 'name': 'ice-cream_sundae'}, {'id': 12920, 'synset': 'split.n.07', 'name': 'split'}, {'id': 12921, 'synset': 'banana_split.n.01', 'name': 'banana_split'}, {'id': 12922, 'synset': 'frozen_pudding.n.01', 'name': 'frozen_pudding'}, {'id': 12923, 'synset': 'frozen_custard.n.01', 'name': 'frozen_custard'}, {'id': 12924, 'synset': 'flummery.n.01', 'name': 'flummery'}, {'id': 12925, 'synset': 'fish_mousse.n.01', 'name': 'fish_mousse'}, {'id': 12926, 'synset': 'chicken_mousse.n.01', 'name': 'chicken_mousse'}, {'id': 12927, 'synset': 'plum_pudding.n.01', 'name': 'plum_pudding'}, {'id': 12928, 'synset': 'carrot_pudding.n.01', 'name': 'carrot_pudding'}, {'id': 12929, 'synset': 'corn_pudding.n.01', 'name': 'corn_pudding'}, {'id': 12930, 'synset': 'steamed_pudding.n.01', 'name': 'steamed_pudding'}, {'id': 12931, 'synset': 'duff.n.01', 'name': 'duff'}, {'id': 12932, 'synset': 'vanilla_pudding.n.01', 'name': 'vanilla_pudding'}, {'id': 12933, 'synset': 'chocolate_pudding.n.01', 'name': 'chocolate_pudding'}, {'id': 12934, 'synset': 'brown_betty.n.01', 'name': 'brown_Betty'}, {'id': 12935, 'synset': 'nesselrode.n.01', 'name': 'Nesselrode'}, {'id': 12936, 'synset': 'pease_pudding.n.01', 'name': 'pease_pudding'}, {'id': 12937, 'synset': 'custard.n.01', 'name': 'custard'}, {'id': 12938, 'synset': 'creme_caramel.n.01', 'name': 'creme_caramel'}, {'id': 12939, 'synset': 'creme_anglais.n.01', 'name': 'creme_anglais'}, {'id': 12940, 'synset': 'creme_brulee.n.01', 'name': 'creme_brulee'}, {'id': 12941, 'synset': 'fruit_custard.n.01', 'name': 'fruit_custard'}, {'id': 12942, 'synset': 'tapioca.n.01', 'name': 'tapioca'}, {'id': 12943, 'synset': 'tapioca_pudding.n.01', 'name': 'tapioca_pudding'}, {'id': 12944, 'synset': 'roly-poly.n.02', 'name': 'roly-poly'}, {'id': 12945, 'synset': 'suet_pudding.n.01', 'name': 'suet_pudding'}, {'id': 12946, 'synset': 'bavarian_cream.n.01', 'name': 'Bavarian_cream'}, {'id': 12947, 'synset': 'maraschino.n.02', 'name': 'maraschino'}, {'id': 12948, 'synset': 'nonpareil.n.02', 'name': 'nonpareil'}, {'id': 12949, 'synset': 'zabaglione.n.01', 'name': 'zabaglione'}, {'id': 12950, 'synset': 'garnish.n.01', 'name': 'garnish'}, {'id': 12951, 'synset': 'pastry.n.01', 'name': 'pastry'}, {'id': 12952, 'synset': 'turnover.n.02', 'name': 'turnover'}, {'id': 12953, 'synset': 'apple_turnover.n.01', 'name': 'apple_turnover'}, {'id': 12954, 'synset': 'knish.n.01', 'name': 'knish'}, {'id': 12955, 'synset': 'pirogi.n.01', 'name': 'pirogi'}, {'id': 12956, 'synset': 'samosa.n.01', 'name': 'samosa'}, {'id': 12957, 'synset': 'timbale.n.01', 'name': 'timbale'}, {'id': 12958, 'synset': 'puff_paste.n.01', 'name': 'puff_paste'}, {'id': 12959, 'synset': 'phyllo.n.01', 'name': 'phyllo'}, {'id': 12960, 'synset': 'puff_batter.n.01', 'name': 'puff_batter'}, {'id': 12961, 'synset': 'ice-cream_cake.n.01', 'name': 'ice-cream_cake'}, {'id': 12962, 'synset': 'fish_cake.n.01', 'name': 'fish_cake'}, {'id': 12963, 'synset': 'fish_stick.n.01', 'name': 'fish_stick'}, {'id': 12964, 'synset': 'conserve.n.01', 'name': 'conserve'}, {'id': 12965, 'synset': 'apple_butter.n.01', 'name': 'apple_butter'}, {'id': 12966, 'synset': 'chowchow.n.02', 'name': 'chowchow'}, {'id': 12967, 'synset': 'lemon_curd.n.01', 'name': 'lemon_curd'}, {'id': 12968, 'synset': 'strawberry_jam.n.01', 'name': 'strawberry_jam'}, {'id': 12969, 'synset': 'jelly.n.02', 'name': 'jelly'}, {'id': 12970, 'synset': 'apple_jelly.n.01', 'name': 'apple_jelly'}, {'id': 12971, 'synset': 'crabapple_jelly.n.01', 'name': 'crabapple_jelly'}, {'id': 12972, 'synset': 'grape_jelly.n.01', 'name': 'grape_jelly'}, {'id': 12973, 'synset': 'marmalade.n.01', 'name': 'marmalade'}, {'id': 12974, 'synset': 'orange_marmalade.n.01', 'name': 'orange_marmalade'}, {'id': 12975, 'synset': 'gelatin_dessert.n.01', 'name': 'gelatin_dessert'}, {'id': 12976, 'synset': 'buffalo_wing.n.01', 'name': 'buffalo_wing'}, {'id': 12977, 'synset': 'barbecued_wing.n.01', 'name': 'barbecued_wing'}, {'id': 12978, 'synset': 'mess.n.03', 'name': 'mess'}, {'id': 12979, 'synset': 'mince.n.01', 'name': 'mince'}, {'id': 12980, 'synset': 'puree.n.01', 'name': 'puree'}, {'id': 12981, 'synset': 'barbecue.n.01', 'name': 'barbecue'}, {'id': 12982, 'synset': 'biryani.n.01', 'name': 'biryani'}, {'id': 12983, 'synset': 'escalope_de_veau_orloff.n.01', 'name': 'escalope_de_veau_Orloff'}, {'id': 12984, 'synset': 'saute.n.01', 'name': 'saute'}, {'id': 12985, 'synset': 'veal_parmesan.n.01', 'name': 'veal_parmesan'}, {'id': 12986, 'synset': 'veal_cordon_bleu.n.01', 'name': 'veal_cordon_bleu'}, {'id': 12987, 'synset': 'margarine.n.01', 'name': 'margarine'}, {'id': 12988, 'synset': 'mincemeat.n.01', 'name': 'mincemeat'}, {'id': 12989, 'synset': 'stuffing.n.01', 'name': 'stuffing'}, {'id': 12990, 'synset': 'turkey_stuffing.n.01', 'name': 'turkey_stuffing'}, {'id': 12991, 'synset': 'oyster_stuffing.n.01', 'name': 'oyster_stuffing'}, {'id': 12992, 'synset': 'forcemeat.n.01', 'name': 'forcemeat'}, {'id': 12993, 'synset': 'anadama_bread.n.01', 'name': 'anadama_bread'}, {'id': 12994, 'synset': 'bap.n.01', 'name': 'bap'}, {'id': 12995, 'synset': 'barmbrack.n.01', 'name': 'barmbrack'}, {'id': 12996, 'synset': 'breadstick.n.01', 'name': 'breadstick'}, {'id': 12997, 'synset': 'grissino.n.01', 'name': 'grissino'}, {'id': 12998, 'synset': 'brown_bread.n.02', 'name': 'brown_bread'}, {'id': 12999, 'synset': 'tea_bread.n.01', 'name': 'tea_bread'}, {'id': 13000, 'synset': 'caraway_seed_bread.n.01', 'name': 'caraway_seed_bread'}, {'id': 13001, 'synset': 'challah.n.01', 'name': 'challah'}, {'id': 13002, 'synset': 'cinnamon_bread.n.01', 'name': 'cinnamon_bread'}, {'id': 13003, 'synset': 'cracked-wheat_bread.n.01', 'name': 'cracked-wheat_bread'}, {'id': 13004, 'synset': 'dark_bread.n.01', 'name': 'dark_bread'}, {'id': 13005, 'synset': 'english_muffin.n.01', 'name': 'English_muffin'}, {'id': 13006, 'synset': 'flatbread.n.01', 'name': 'flatbread'}, {'id': 13007, 'synset': 'garlic_bread.n.01', 'name': 'garlic_bread'}, {'id': 13008, 'synset': 'gluten_bread.n.01', 'name': 'gluten_bread'}, {'id': 13009, 'synset': 'graham_bread.n.01', 'name': 'graham_bread'}, {'id': 13010, 'synset': 'host.n.09', 'name': 'Host'}, {'id': 13011, 'synset': 'flatbrod.n.01', 'name': 'flatbrod'}, {'id': 13012, 'synset': 'bannock.n.01', 'name': 'bannock'}, {'id': 13013, 'synset': 'chapatti.n.01', 'name': 'chapatti'}, {'id': 13014, 'synset': 'loaf_of_bread.n.01', 'name': 'loaf_of_bread'}, {'id': 13015, 'synset': 'french_loaf.n.01', 'name': 'French_loaf'}, {'id': 13016, 'synset': 'matzo.n.01', 'name': 'matzo'}, {'id': 13017, 'synset': 'nan.n.04', 'name': 'nan'}, {'id': 13018, 'synset': 'onion_bread.n.01', 'name': 'onion_bread'}, {'id': 13019, 'synset': 'raisin_bread.n.01', 'name': 'raisin_bread'}, {'id': 13020, 'synset': 'quick_bread.n.01', 'name': 'quick_bread'}, {'id': 13021, 'synset': 'banana_bread.n.01', 'name': 'banana_bread'}, {'id': 13022, 'synset': 'date_bread.n.01', 'name': 'date_bread'}, {'id': 13023, 'synset': 'date-nut_bread.n.01', 'name': 'date-nut_bread'}, {'id': 13024, 'synset': 'nut_bread.n.01', 'name': 'nut_bread'}, {'id': 13025, 'synset': 'oatcake.n.01', 'name': 'oatcake'}, {'id': 13026, 'synset': 'irish_soda_bread.n.01', 'name': 'Irish_soda_bread'}, {'id': 13027, 'synset': 'skillet_bread.n.01', 'name': 'skillet_bread'}, {'id': 13028, 'synset': 'rye_bread.n.01', 'name': 'rye_bread'}, {'id': 13029, 'synset': 'black_bread.n.01', 'name': 'black_bread'}, {'id': 13030, 'synset': 'jewish_rye_bread.n.01', 'name': 'Jewish_rye_bread'}, {'id': 13031, 'synset': 'limpa.n.01', 'name': 'limpa'}, {'id': 13032, 'synset': 'swedish_rye_bread.n.01', 'name': 'Swedish_rye_bread'}, {'id': 13033, 'synset': 'salt-rising_bread.n.01', 'name': 'salt-rising_bread'}, {'id': 13034, 'synset': 'simnel.n.01', 'name': 'simnel'}, {'id': 13035, 'synset': 'sour_bread.n.01', 'name': 'sour_bread'}, {'id': 13036, 'synset': 'wafer.n.03', 'name': 'wafer'}, {'id': 13037, 'synset': 'white_bread.n.01', 'name': 'white_bread'}, {'id': 13038, 'synset': 'french_bread.n.01', 'name': 'French_bread'}, {'id': 13039, 'synset': 'italian_bread.n.01', 'name': 'Italian_bread'}, {'id': 13040, 'synset': 'corn_cake.n.01', 'name': 'corn_cake'}, {'id': 13041, 'synset': 'skillet_corn_bread.n.01', 'name': 'skillet_corn_bread'}, {'id': 13042, 'synset': 'ashcake.n.01', 'name': 'ashcake'}, {'id': 13043, 'synset': 'hoecake.n.01', 'name': 'hoecake'}, {'id': 13044, 'synset': 'cornpone.n.01', 'name': 'cornpone'}, {'id': 13045, 'synset': 'corn_dab.n.01', 'name': 'corn_dab'}, {'id': 13046, 'synset': 'hush_puppy.n.01', 'name': 'hush_puppy'}, {'id': 13047, 'synset': 'johnnycake.n.01', 'name': 'johnnycake'}, {'id': 13048, 'synset': 'shawnee_cake.n.01', 'name': 'Shawnee_cake'}, {'id': 13049, 'synset': 'spoon_bread.n.01', 'name': 'spoon_bread'}, {'id': 13050, 'synset': 'cinnamon_toast.n.01', 'name': 'cinnamon_toast'}, {'id': 13051, 'synset': 'orange_toast.n.01', 'name': 'orange_toast'}, {'id': 13052, 'synset': 'melba_toast.n.01', 'name': 'Melba_toast'}, {'id': 13053, 'synset': 'zwieback.n.01', 'name': 'zwieback'}, {'id': 13054, 'synset': 'frankfurter_bun.n.01', 'name': 'frankfurter_bun'}, {'id': 13055, 'synset': 'hamburger_bun.n.01', 'name': 'hamburger_bun'}, {'id': 13056, 'synset': 'bran_muffin.n.01', 'name': 'bran_muffin'}, {'id': 13057, 'synset': 'corn_muffin.n.01', 'name': 'corn_muffin'}, {'id': 13058, 'synset': 'yorkshire_pudding.n.01', 'name': 'Yorkshire_pudding'}, {'id': 13059, 'synset': 'popover.n.01', 'name': 'popover'}, {'id': 13060, 'synset': 'scone.n.01', 'name': 'scone'}, {'id': 13061, 'synset': 'drop_scone.n.01', 'name': 'drop_scone'}, {'id': 13062, 'synset': 'cross_bun.n.01', 'name': 'cross_bun'}, {'id': 13063, 'synset': 'brioche.n.01', 'name': 'brioche'}, {'id': 13064, 'synset': 'hard_roll.n.01', 'name': 'hard_roll'}, {'id': 13065, 'synset': 'soft_roll.n.01', 'name': 'soft_roll'}, {'id': 13066, 'synset': 'kaiser_roll.n.01', 'name': 'kaiser_roll'}, {'id': 13067, 'synset': 'parker_house_roll.n.01', 'name': 'Parker_House_roll'}, {'id': 13068, 'synset': 'clover-leaf_roll.n.01', 'name': 'clover-leaf_roll'}, {'id': 13069, 'synset': 'onion_roll.n.01', 'name': 'onion_roll'}, {'id': 13070, 'synset': 'bialy.n.01', 'name': 'bialy'}, {'id': 13071, 'synset': 'sweet_roll.n.01', 'name': 'sweet_roll'}, {'id': 13072, 'synset': 'bear_claw.n.01', 'name': 'bear_claw'}, {'id': 13073, 'synset': 'cinnamon_roll.n.01', 'name': 'cinnamon_roll'}, {'id': 13074, 'synset': 'honey_bun.n.01', 'name': 'honey_bun'}, {'id': 13075, 'synset': 'pinwheel_roll.n.01', 'name': 'pinwheel_roll'}, {'id': 13076, 'synset': 'danish.n.02', 'name': 'danish'}, {'id': 13077, 'synset': 'onion_bagel.n.01', 'name': 'onion_bagel'}, {'id': 13078, 'synset': 'biscuit.n.01', 'name': 'biscuit'}, {'id': 13079, 'synset': 'rolled_biscuit.n.01', 'name': 'rolled_biscuit'}, {'id': 13080, 'synset': 'baking-powder_biscuit.n.01', 'name': 'baking-powder_biscuit'}, {'id': 13081, 'synset': 'buttermilk_biscuit.n.01', 'name': 'buttermilk_biscuit'}, {'id': 13082, 'synset': 'shortcake.n.01', 'name': 'shortcake'}, {'id': 13083, 'synset': 'hardtack.n.01', 'name': 'hardtack'}, {'id': 13084, 'synset': 'saltine.n.01', 'name': 'saltine'}, {'id': 13085, 'synset': 'soda_cracker.n.01', 'name': 'soda_cracker'}, {'id': 13086, 'synset': 'oyster_cracker.n.01', 'name': 'oyster_cracker'}, {'id': 13087, 'synset': 'water_biscuit.n.01', 'name': 'water_biscuit'}, {'id': 13088, 'synset': 'graham_cracker.n.01', 'name': 'graham_cracker'}, {'id': 13089, 'synset': 'soft_pretzel.n.01', 'name': 'soft_pretzel'}, {'id': 13090, 'synset': 'sandwich_plate.n.01', 'name': 'sandwich_plate'}, {'id': 13091, 'synset': 'butty.n.01', 'name': 'butty'}, {'id': 13092, 'synset': 'ham_sandwich.n.01', 'name': 'ham_sandwich'}, {'id': 13093, 'synset': 'chicken_sandwich.n.01', 'name': 'chicken_sandwich'}, {'id': 13094, 'synset': 'club_sandwich.n.01', 'name': 'club_sandwich'}, {'id': 13095, 'synset': 'open-face_sandwich.n.01', 'name': 'open-face_sandwich'}, {'id': 13096, 'synset': 'cheeseburger.n.01', 'name': 'cheeseburger'}, {'id': 13097, 'synset': 'tunaburger.n.01', 'name': 'tunaburger'}, {'id': 13098, 'synset': 'hotdog.n.02', 'name': 'hotdog'}, {'id': 13099, 'synset': 'sloppy_joe.n.01', 'name': 'Sloppy_Joe'}, {'id': 13100, 'synset': 'bomber.n.03', 'name': 'bomber'}, {'id': 13101, 'synset': 'gyro.n.01', 'name': 'gyro'}, {'id': 13102, 'synset': 'bacon-lettuce-tomato_sandwich.n.01', 'name': 'bacon-lettuce-tomato_sandwich'}, {'id': 13103, 'synset': 'reuben.n.02', 'name': 'Reuben'}, {'id': 13104, 'synset': 'western.n.02', 'name': 'western'}, {'id': 13105, 'synset': 'wrap.n.02', 'name': 'wrap'}, {'id': 13106, 'synset': 'spaghetti.n.01', 'name': 'spaghetti'}, {'id': 13107, 'synset': 'hasty_pudding.n.01', 'name': 'hasty_pudding'}, {'id': 13108, 'synset': 'gruel.n.01', 'name': 'gruel'}, {'id': 13109, 'synset': 'congee.n.01', 'name': 'congee'}, {'id': 13110, 'synset': 'skilly.n.01', 'name': 'skilly'}, {'id': 13111, 'synset': 'edible_fruit.n.01', 'name': 'edible_fruit'}, {'id': 13112, 'synset': 'vegetable.n.01', 'name': 'vegetable'}, {'id': 13113, 'synset': 'julienne.n.01', 'name': 'julienne'}, {'id': 13114, 'synset': 'raw_vegetable.n.01', 'name': 'raw_vegetable'}, {'id': 13115, 'synset': 'crudites.n.01', 'name': 'crudites'}, {'id': 13116, 'synset': 'celery_stick.n.01', 'name': 'celery_stick'}, {'id': 13117, 'synset': 'legume.n.03', 'name': 'legume'}, {'id': 13118, 'synset': 'pulse.n.04', 'name': 'pulse'}, {'id': 13119, 'synset': 'potherb.n.01', 'name': 'potherb'}, {'id': 13120, 'synset': 'greens.n.01', 'name': 'greens'}, {'id': 13121, 'synset': 'chop-suey_greens.n.02', 'name': 'chop-suey_greens'}, {'id': 13122, 'synset': 'solanaceous_vegetable.n.01', 'name': 'solanaceous_vegetable'}, {'id': 13123, 'synset': 'root_vegetable.n.01', 'name': 'root_vegetable'}, {'id': 13124, 'synset': 'baked_potato.n.01', 'name': 'baked_potato'}, {'id': 13125, 'synset': 'french_fries.n.01', 'name': 'french_fries'}, {'id': 13126, 'synset': 'home_fries.n.01', 'name': 'home_fries'}, {'id': 13127, 'synset': 'jacket_potato.n.01', 'name': 'jacket_potato'}, {'id': 13128, 'synset': 'potato_skin.n.01', 'name': 'potato_skin'}, {'id': 13129, 'synset': 'uruguay_potato.n.02', 'name': 'Uruguay_potato'}, {'id': 13130, 'synset': 'yam.n.04', 'name': 'yam'}, {'id': 13131, 'synset': 'yam.n.03', 'name': 'yam'}, {'id': 13132, 'synset': 'snack_food.n.01', 'name': 'snack_food'}, {'id': 13133, 'synset': 'corn_chip.n.01', 'name': 'corn_chip'}, {'id': 13134, 'synset': 'tortilla_chip.n.01', 'name': 'tortilla_chip'}, {'id': 13135, 'synset': 'nacho.n.01', 'name': 'nacho'}, {'id': 13136, 'synset': 'pieplant.n.01', 'name': 'pieplant'}, {'id': 13137, 'synset': 'cruciferous_vegetable.n.01', 'name': 'cruciferous_vegetable'}, {'id': 13138, 'synset': 'mustard.n.03', 'name': 'mustard'}, {'id': 13139, 'synset': 'cabbage.n.01', 'name': 'cabbage'}, {'id': 13140, 'synset': 'kale.n.03', 'name': 'kale'}, {'id': 13141, 'synset': 'collards.n.01', 'name': 'collards'}, {'id': 13142, 'synset': 'chinese_cabbage.n.02', 'name': 'Chinese_cabbage'}, {'id': 13143, 'synset': 'bok_choy.n.02', 'name': 'bok_choy'}, {'id': 13144, 'synset': 'head_cabbage.n.02', 'name': 'head_cabbage'}, {'id': 13145, 'synset': 'red_cabbage.n.02', 'name': 'red_cabbage'}, {'id': 13146, 'synset': 'savoy_cabbage.n.02', 'name': 'savoy_cabbage'}, {'id': 13147, 'synset': 'broccoli.n.02', 'name': 'broccoli'}, {'id': 13148, 'synset': 'broccoli_rabe.n.02', 'name': 'broccoli_rabe'}, {'id': 13149, 'synset': 'squash.n.02', 'name': 'squash'}, {'id': 13150, 'synset': 'summer_squash.n.02', 'name': 'summer_squash'}, {'id': 13151, 'synset': 'yellow_squash.n.02', 'name': 'yellow_squash'}, {'id': 13152, 'synset': 'crookneck.n.01', 'name': 'crookneck'}, {'id': 13153, 'synset': 'marrow.n.04', 'name': 'marrow'}, {'id': 13154, 'synset': 'cocozelle.n.02', 'name': 'cocozelle'}, {'id': 13155, 'synset': 'pattypan_squash.n.02', 'name': 'pattypan_squash'}, {'id': 13156, 'synset': 'spaghetti_squash.n.02', 'name': 'spaghetti_squash'}, {'id': 13157, 'synset': 'winter_squash.n.02', 'name': 'winter_squash'}, {'id': 13158, 'synset': 'acorn_squash.n.02', 'name': 'acorn_squash'}, {'id': 13159, 'synset': 'butternut_squash.n.02', 'name': 'butternut_squash'}, {'id': 13160, 'synset': 'hubbard_squash.n.02', 'name': 'hubbard_squash'}, {'id': 13161, 'synset': 'turban_squash.n.02', 'name': 'turban_squash'}, {'id': 13162, 'synset': 'buttercup_squash.n.02', 'name': 'buttercup_squash'}, {'id': 13163, 'synset': 'cushaw.n.02', 'name': 'cushaw'}, {'id': 13164, 'synset': 'winter_crookneck_squash.n.02', 'name': 'winter_crookneck_squash'}, {'id': 13165, 'synset': 'gherkin.n.02', 'name': 'gherkin'}, {'id': 13166, 'synset': 'artichoke_heart.n.01', 'name': 'artichoke_heart'}, {'id': 13167, 'synset': 'jerusalem_artichoke.n.03', 'name': 'Jerusalem_artichoke'}, {'id': 13168, 'synset': 'bamboo_shoot.n.01', 'name': 'bamboo_shoot'}, {'id': 13169, 'synset': 'sprout.n.02', 'name': 'sprout'}, {'id': 13170, 'synset': 'bean_sprout.n.01', 'name': 'bean_sprout'}, {'id': 13171, 'synset': 'alfalfa_sprout.n.01', 'name': 'alfalfa_sprout'}, {'id': 13172, 'synset': 'beet.n.02', 'name': 'beet'}, {'id': 13173, 'synset': 'beet_green.n.01', 'name': 'beet_green'}, {'id': 13174, 'synset': 'sugar_beet.n.02', 'name': 'sugar_beet'}, {'id': 13175, 'synset': 'mangel-wurzel.n.02', 'name': 'mangel-wurzel'}, {'id': 13176, 'synset': 'chard.n.02', 'name': 'chard'}, {'id': 13177, 'synset': 'pepper.n.04', 'name': 'pepper'}, {'id': 13178, 'synset': 'sweet_pepper.n.02', 'name': 'sweet_pepper'}, {'id': 13179, 'synset': 'green_pepper.n.01', 'name': 'green_pepper'}, {'id': 13180, 'synset': 'globe_pepper.n.01', 'name': 'globe_pepper'}, {'id': 13181, 'synset': 'pimento.n.02', 'name': 'pimento'}, {'id': 13182, 'synset': 'hot_pepper.n.02', 'name': 'hot_pepper'}, {'id': 13183, 'synset': 'jalapeno.n.02', 'name': 'jalapeno'}, {'id': 13184, 'synset': 'chipotle.n.01', 'name': 'chipotle'}, {'id': 13185, 'synset': 'cayenne.n.03', 'name': 'cayenne'}, {'id': 13186, 'synset': 'tabasco.n.03', 'name': 'tabasco'}, {'id': 13187, 'synset': 'onion.n.03', 'name': 'onion'}, {'id': 13188, 'synset': 'bermuda_onion.n.01', 'name': 'Bermuda_onion'}, {'id': 13189, 'synset': 'vidalia_onion.n.01', 'name': 'Vidalia_onion'}, {'id': 13190, 'synset': 'spanish_onion.n.01', 'name': 'Spanish_onion'}, {'id': 13191, 'synset': 'purple_onion.n.01', 'name': 'purple_onion'}, {'id': 13192, 'synset': 'leek.n.02', 'name': 'leek'}, {'id': 13193, 'synset': 'shallot.n.03', 'name': 'shallot'}, {'id': 13194, 'synset': 'salad_green.n.01', 'name': 'salad_green'}, {'id': 13195, 'synset': 'lettuce.n.03', 'name': 'lettuce'}, {'id': 13196, 'synset': 'butterhead_lettuce.n.01', 'name': 'butterhead_lettuce'}, {'id': 13197, 'synset': 'buttercrunch.n.01', 'name': 'buttercrunch'}, {'id': 13198, 'synset': 'bibb_lettuce.n.01', 'name': 'Bibb_lettuce'}, {'id': 13199, 'synset': 'boston_lettuce.n.01', 'name': 'Boston_lettuce'}, {'id': 13200, 'synset': 'crisphead_lettuce.n.01', 'name': 'crisphead_lettuce'}, {'id': 13201, 'synset': 'cos.n.02', 'name': 'cos'}, {'id': 13202, 'synset': 'leaf_lettuce.n.02', 'name': 'leaf_lettuce'}, {'id': 13203, 'synset': 'celtuce.n.02', 'name': 'celtuce'}, {'id': 13204, 'synset': 'bean.n.01', 'name': 'bean'}, {'id': 13205, 'synset': 'goa_bean.n.02', 'name': 'goa_bean'}, {'id': 13206, 'synset': 'lentil.n.01', 'name': 'lentil'}, {'id': 13207, 'synset': 'green_pea.n.01', 'name': 'green_pea'}, {'id': 13208, 'synset': 'marrowfat_pea.n.01', 'name': 'marrowfat_pea'}, {'id': 13209, 'synset': 'snow_pea.n.02', 'name': 'snow_pea'}, {'id': 13210, 'synset': 'sugar_snap_pea.n.02', 'name': 'sugar_snap_pea'}, {'id': 13211, 'synset': 'split-pea.n.01', 'name': 'split-pea'}, {'id': 13212, 'synset': 'chickpea.n.03', 'name': 'chickpea'}, {'id': 13213, 'synset': 'cajan_pea.n.02', 'name': 'cajan_pea'}, {'id': 13214, 'synset': 'field_pea.n.03', 'name': 'field_pea'}, {'id': 13215, 'synset': 'mushy_peas.n.01', 'name': 'mushy_peas'}, {'id': 13216, 'synset': 'black-eyed_pea.n.03', 'name': 'black-eyed_pea'}, {'id': 13217, 'synset': 'common_bean.n.02', 'name': 'common_bean'}, {'id': 13218, 'synset': 'kidney_bean.n.02', 'name': 'kidney_bean'}, {'id': 13219, 'synset': 'navy_bean.n.01', 'name': 'navy_bean'}, {'id': 13220, 'synset': 'pinto_bean.n.01', 'name': 'pinto_bean'}, {'id': 13221, 'synset': 'frijole.n.02', 'name': 'frijole'}, {'id': 13222, 'synset': 'black_bean.n.01', 'name': 'black_bean'}, {'id': 13223, 'synset': 'fresh_bean.n.01', 'name': 'fresh_bean'}, {'id': 13224, 'synset': 'flageolet.n.01', 'name': 'flageolet'}, {'id': 13225, 'synset': 'green_bean.n.01', 'name': 'green_bean'}, {'id': 13226, 'synset': 'snap_bean.n.01', 'name': 'snap_bean'}, {'id': 13227, 'synset': 'string_bean.n.01', 'name': 'string_bean'}, {'id': 13228, 'synset': 'kentucky_wonder.n.01', 'name': 'Kentucky_wonder'}, {'id': 13229, 'synset': 'scarlet_runner.n.03', 'name': 'scarlet_runner'}, {'id': 13230, 'synset': 'haricot_vert.n.01', 'name': 'haricot_vert'}, {'id': 13231, 'synset': 'wax_bean.n.02', 'name': 'wax_bean'}, {'id': 13232, 'synset': 'shell_bean.n.02', 'name': 'shell_bean'}, {'id': 13233, 'synset': 'lima_bean.n.03', 'name': 'lima_bean'}, {'id': 13234, 'synset': 'fordhooks.n.01', 'name': 'Fordhooks'}, {'id': 13235, 'synset': 'sieva_bean.n.02', 'name': 'sieva_bean'}, {'id': 13236, 'synset': 'fava_bean.n.02', 'name': 'fava_bean'}, {'id': 13237, 'synset': 'soy.n.04', 'name': 'soy'}, {'id': 13238, 'synset': 'green_soybean.n.01', 'name': 'green_soybean'}, {'id': 13239, 'synset': 'field_soybean.n.01', 'name': 'field_soybean'}, {'id': 13240, 'synset': 'cardoon.n.02', 'name': 'cardoon'}, {'id': 13241, 'synset': 'carrot.n.03', 'name': 'carrot'}, {'id': 13242, 'synset': 'carrot_stick.n.01', 'name': 'carrot_stick'}, {'id': 13243, 'synset': 'celery.n.02', 'name': 'celery'}, {'id': 13244, 'synset': 'pascal_celery.n.01', 'name': 'pascal_celery'}, {'id': 13245, 'synset': 'celeriac.n.02', 'name': 'celeriac'}, {'id': 13246, 'synset': 'chicory.n.04', 'name': 'chicory'}, {'id': 13247, 'synset': 'radicchio.n.01', 'name': 'radicchio'}, {'id': 13248, 'synset': 'coffee_substitute.n.01', 'name': 'coffee_substitute'}, {'id': 13249, 'synset': 'chicory.n.03', 'name': 'chicory'}, {'id': 13250, 'synset': 'postum.n.01', 'name': 'Postum'}, {'id': 13251, 'synset': 'chicory_escarole.n.01', 'name': 'chicory_escarole'}, {'id': 13252, 'synset': 'belgian_endive.n.01', 'name': 'Belgian_endive'}, {'id': 13253, 'synset': 'sweet_corn.n.02', 'name': 'sweet_corn'}, {'id': 13254, 'synset': 'hominy.n.01', 'name': 'hominy'}, {'id': 13255, 'synset': 'lye_hominy.n.01', 'name': 'lye_hominy'}, {'id': 13256, 'synset': 'pearl_hominy.n.01', 'name': 'pearl_hominy'}, {'id': 13257, 'synset': 'popcorn.n.02', 'name': 'popcorn'}, {'id': 13258, 'synset': 'cress.n.02', 'name': 'cress'}, {'id': 13259, 'synset': 'watercress.n.02', 'name': 'watercress'}, {'id': 13260, 'synset': 'garden_cress.n.01', 'name': 'garden_cress'}, {'id': 13261, 'synset': 'winter_cress.n.02', 'name': 'winter_cress'}, {'id': 13262, 'synset': 'dandelion_green.n.02', 'name': 'dandelion_green'}, {'id': 13263, 'synset': 'gumbo.n.03', 'name': 'gumbo'}, {'id': 13264, 'synset': 'kohlrabi.n.02', 'name': 'kohlrabi'}, {'id': 13265, 'synset': "lamb's-quarter.n.01", 'name': "lamb's-quarter"}, {'id': 13266, 'synset': 'wild_spinach.n.03', 'name': 'wild_spinach'}, {'id': 13267, 'synset': 'beefsteak_tomato.n.01', 'name': 'beefsteak_tomato'}, {'id': 13268, 'synset': 'cherry_tomato.n.02', 'name': 'cherry_tomato'}, {'id': 13269, 'synset': 'plum_tomato.n.02', 'name': 'plum_tomato'}, {'id': 13270, 'synset': 'tomatillo.n.03', 'name': 'tomatillo'}, {'id': 13271, 'synset': 'mushroom.n.05', 'name': 'mushroom'}, {'id': 13272, 'synset': 'stuffed_mushroom.n.01', 'name': 'stuffed_mushroom'}, {'id': 13273, 'synset': 'salsify.n.03', 'name': 'salsify'}, {'id': 13274, 'synset': 'oyster_plant.n.03', 'name': 'oyster_plant'}, {'id': 13275, 'synset': 'scorzonera.n.02', 'name': 'scorzonera'}, {'id': 13276, 'synset': 'parsnip.n.03', 'name': 'parsnip'}, {'id': 13277, 'synset': 'radish.n.01', 'name': 'radish'}, {'id': 13278, 'synset': 'turnip.n.02', 'name': 'turnip'}, {'id': 13279, 'synset': 'white_turnip.n.02', 'name': 'white_turnip'}, {'id': 13280, 'synset': 'rutabaga.n.01', 'name': 'rutabaga'}, {'id': 13281, 'synset': 'turnip_greens.n.01', 'name': 'turnip_greens'}, {'id': 13282, 'synset': 'sorrel.n.04', 'name': 'sorrel'}, {'id': 13283, 'synset': 'french_sorrel.n.02', 'name': 'French_sorrel'}, {'id': 13284, 'synset': 'spinach.n.02', 'name': 'spinach'}, {'id': 13285, 'synset': 'taro.n.03', 'name': 'taro'}, {'id': 13286, 'synset': 'truffle.n.02', 'name': 'truffle'}, {'id': 13287, 'synset': 'edible_nut.n.01', 'name': 'edible_nut'}, {'id': 13288, 'synset': 'bunya_bunya.n.02', 'name': 'bunya_bunya'}, {'id': 13289, 'synset': 'peanut.n.04', 'name': 'peanut'}, {'id': 13290, 'synset': 'freestone.n.01', 'name': 'freestone'}, {'id': 13291, 'synset': 'cling.n.01', 'name': 'cling'}, {'id': 13292, 'synset': 'windfall.n.01', 'name': 'windfall'}, {'id': 13293, 'synset': 'crab_apple.n.03', 'name': 'crab_apple'}, {'id': 13294, 'synset': 'eating_apple.n.01', 'name': 'eating_apple'}, {'id': 13295, 'synset': 'baldwin.n.03', 'name': 'Baldwin'}, {'id': 13296, 'synset': 'cortland.n.01', 'name': 'Cortland'}, {'id': 13297, 'synset': "cox's_orange_pippin.n.01", 'name': "Cox's_Orange_Pippin"}, {'id': 13298, 'synset': 'delicious.n.01', 'name': 'Delicious'}, {'id': 13299, 'synset': 'golden_delicious.n.01', 'name': 'Golden_Delicious'}, {'id': 13300, 'synset': 'red_delicious.n.01', 'name': 'Red_Delicious'}, {'id': 13301, 'synset': 'empire.n.05', 'name': 'Empire'}, {'id': 13302, 'synset': "grimes'_golden.n.01", 'name': "Grimes'_golden"}, {'id': 13303, 'synset': 'jonathan.n.01', 'name': 'Jonathan'}, {'id': 13304, 'synset': 'mcintosh.n.01', 'name': 'McIntosh'}, {'id': 13305, 'synset': 'macoun.n.01', 'name': 'Macoun'}, {'id': 13306, 'synset': 'northern_spy.n.01', 'name': 'Northern_Spy'}, {'id': 13307, 'synset': 'pearmain.n.01', 'name': 'Pearmain'}, {'id': 13308, 'synset': 'pippin.n.01', 'name': 'Pippin'}, {'id': 13309, 'synset': 'prima.n.01', 'name': 'Prima'}, {'id': 13310, 'synset': 'stayman.n.01', 'name': 'Stayman'}, {'id': 13311, 'synset': 'winesap.n.01', 'name': 'Winesap'}, {'id': 13312, 'synset': 'stayman_winesap.n.01', 'name': 'Stayman_Winesap'}, {'id': 13313, 'synset': 'cooking_apple.n.01', 'name': 'cooking_apple'}, {'id': 13314, 'synset': "bramley's_seedling.n.01", 'name': "Bramley's_Seedling"}, {'id': 13315, 'synset': 'granny_smith.n.01', 'name': 'Granny_Smith'}, {'id': 13316, 'synset': "lane's_prince_albert.n.01", 'name': "Lane's_Prince_Albert"}, {'id': 13317, 'synset': 'newtown_wonder.n.01', 'name': 'Newtown_Wonder'}, {'id': 13318, 'synset': 'rome_beauty.n.01', 'name': 'Rome_Beauty'}, {'id': 13319, 'synset': 'berry.n.01', 'name': 'berry'}, {'id': 13320, 'synset': 'bilberry.n.03', 'name': 'bilberry'}, {'id': 13321, 'synset': 'huckleberry.n.03', 'name': 'huckleberry'}, {'id': 13322, 'synset': 'wintergreen.n.03', 'name': 'wintergreen'}, {'id': 13323, 'synset': 'cranberry.n.02', 'name': 'cranberry'}, {'id': 13324, 'synset': 'lingonberry.n.02', 'name': 'lingonberry'}, {'id': 13325, 'synset': 'currant.n.01', 'name': 'currant'}, {'id': 13326, 'synset': 'gooseberry.n.02', 'name': 'gooseberry'}, {'id': 13327, 'synset': 'black_currant.n.02', 'name': 'black_currant'}, {'id': 13328, 'synset': 'red_currant.n.02', 'name': 'red_currant'}, {'id': 13329, 'synset': 'boysenberry.n.02', 'name': 'boysenberry'}, {'id': 13330, 'synset': 'dewberry.n.02', 'name': 'dewberry'}, {'id': 13331, 'synset': 'loganberry.n.02', 'name': 'loganberry'}, {'id': 13332, 'synset': 'saskatoon.n.02', 'name': 'saskatoon'}, {'id': 13333, 'synset': 'sugarberry.n.02', 'name': 'sugarberry'}, {'id': 13334, 'synset': 'acerola.n.02', 'name': 'acerola'}, {'id': 13335, 'synset': 'carambola.n.02', 'name': 'carambola'}, {'id': 13336, 'synset': 'ceriman.n.02', 'name': 'ceriman'}, {'id': 13337, 'synset': 'carissa_plum.n.01', 'name': 'carissa_plum'}, {'id': 13338, 'synset': 'citrus.n.01', 'name': 'citrus'}, {'id': 13339, 'synset': 'temple_orange.n.02', 'name': 'temple_orange'}, {'id': 13340, 'synset': 'clementine.n.02', 'name': 'clementine'}, {'id': 13341, 'synset': 'satsuma.n.02', 'name': 'satsuma'}, {'id': 13342, 'synset': 'tangerine.n.02', 'name': 'tangerine'}, {'id': 13343, 'synset': 'tangelo.n.02', 'name': 'tangelo'}, {'id': 13344, 'synset': 'bitter_orange.n.02', 'name': 'bitter_orange'}, {'id': 13345, 'synset': 'sweet_orange.n.01', 'name': 'sweet_orange'}, {'id': 13346, 'synset': 'jaffa_orange.n.01', 'name': 'Jaffa_orange'}, {'id': 13347, 'synset': 'navel_orange.n.01', 'name': 'navel_orange'}, {'id': 13348, 'synset': 'valencia_orange.n.01', 'name': 'Valencia_orange'}, {'id': 13349, 'synset': 'kumquat.n.02', 'name': 'kumquat'}, {'id': 13350, 'synset': 'key_lime.n.01', 'name': 'key_lime'}, {'id': 13351, 'synset': 'grapefruit.n.02', 'name': 'grapefruit'}, {'id': 13352, 'synset': 'pomelo.n.02', 'name': 'pomelo'}, {'id': 13353, 'synset': 'citrange.n.02', 'name': 'citrange'}, {'id': 13354, 'synset': 'citron.n.01', 'name': 'citron'}, {'id': 13355, 'synset': 'jordan_almond.n.02', 'name': 'Jordan_almond'}, {'id': 13356, 'synset': 'nectarine.n.02', 'name': 'nectarine'}, {'id': 13357, 'synset': 'pitahaya.n.02', 'name': 'pitahaya'}, {'id': 13358, 'synset': 'plum.n.02', 'name': 'plum'}, {'id': 13359, 'synset': 'damson.n.01', 'name': 'damson'}, {'id': 13360, 'synset': 'greengage.n.01', 'name': 'greengage'}, {'id': 13361, 'synset': 'beach_plum.n.02', 'name': 'beach_plum'}, {'id': 13362, 'synset': 'sloe.n.03', 'name': 'sloe'}, {'id': 13363, 'synset': 'victoria_plum.n.01', 'name': 'Victoria_plum'}, {'id': 13364, 'synset': 'dried_fruit.n.01', 'name': 'dried_fruit'}, {'id': 13365, 'synset': 'dried_apricot.n.01', 'name': 'dried_apricot'}, {'id': 13366, 'synset': 'raisin.n.01', 'name': 'raisin'}, {'id': 13367, 'synset': 'seedless_raisin.n.01', 'name': 'seedless_raisin'}, {'id': 13368, 'synset': 'seeded_raisin.n.01', 'name': 'seeded_raisin'}, {'id': 13369, 'synset': 'currant.n.03', 'name': 'currant'}, {'id': 13370, 'synset': 'anchovy_pear.n.02', 'name': 'anchovy_pear'}, {'id': 13371, 'synset': 'passion_fruit.n.01', 'name': 'passion_fruit'}, {'id': 13372, 'synset': 'granadilla.n.04', 'name': 'granadilla'}, {'id': 13373, 'synset': 'sweet_calabash.n.02', 'name': 'sweet_calabash'}, {'id': 13374, 'synset': 'bell_apple.n.01', 'name': 'bell_apple'}, {'id': 13375, 'synset': 'breadfruit.n.02', 'name': 'breadfruit'}, {'id': 13376, 'synset': 'jackfruit.n.02', 'name': 'jackfruit'}, {'id': 13377, 'synset': 'cacao_bean.n.01', 'name': 'cacao_bean'}, {'id': 13378, 'synset': 'cocoa.n.02', 'name': 'cocoa'}, {'id': 13379, 'synset': 'canistel.n.02', 'name': 'canistel'}, {'id': 13380, 'synset': 'melon_ball.n.01', 'name': 'melon_ball'}, {'id': 13381, 'synset': 'muskmelon.n.02', 'name': 'muskmelon'}, {'id': 13382, 'synset': 'winter_melon.n.02', 'name': 'winter_melon'}, {'id': 13383, 'synset': 'honeydew.n.01', 'name': 'honeydew'}, {'id': 13384, 'synset': 'persian_melon.n.02', 'name': 'Persian_melon'}, {'id': 13385, 'synset': 'net_melon.n.02', 'name': 'net_melon'}, {'id': 13386, 'synset': 'casaba.n.01', 'name': 'casaba'}, {'id': 13387, 'synset': 'sweet_cherry.n.02', 'name': 'sweet_cherry'}, {'id': 13388, 'synset': 'bing_cherry.n.01', 'name': 'bing_cherry'}, {'id': 13389, 'synset': 'heart_cherry.n.02', 'name': 'heart_cherry'}, {'id': 13390, 'synset': 'blackheart.n.02', 'name': 'blackheart'}, {'id': 13391, 'synset': 'capulin.n.02', 'name': 'capulin'}, {'id': 13392, 'synset': 'sour_cherry.n.03', 'name': 'sour_cherry'}, {'id': 13393, 'synset': 'amarelle.n.02', 'name': 'amarelle'}, {'id': 13394, 'synset': 'morello.n.02', 'name': 'morello'}, {'id': 13395, 'synset': 'cocoa_plum.n.02', 'name': 'cocoa_plum'}, {'id': 13396, 'synset': 'gherkin.n.01', 'name': 'gherkin'}, {'id': 13397, 'synset': 'fox_grape.n.02', 'name': 'fox_grape'}, {'id': 13398, 'synset': 'concord_grape.n.01', 'name': 'Concord_grape'}, {'id': 13399, 'synset': 'catawba.n.02', 'name': 'Catawba'}, {'id': 13400, 'synset': 'muscadine.n.02', 'name': 'muscadine'}, {'id': 13401, 'synset': 'scuppernong.n.01', 'name': 'scuppernong'}, {'id': 13402, 'synset': 'slipskin_grape.n.01', 'name': 'slipskin_grape'}, {'id': 13403, 'synset': 'vinifera_grape.n.02', 'name': 'vinifera_grape'}, {'id': 13404, 'synset': 'emperor.n.02', 'name': 'emperor'}, {'id': 13405, 'synset': 'muscat.n.04', 'name': 'muscat'}, {'id': 13406, 'synset': 'ribier.n.01', 'name': 'ribier'}, {'id': 13407, 'synset': 'sultana.n.01', 'name': 'sultana'}, {'id': 13408, 'synset': 'tokay.n.02', 'name': 'Tokay'}, {'id': 13409, 'synset': 'flame_tokay.n.01', 'name': 'flame_tokay'}, {'id': 13410, 'synset': 'thompson_seedless.n.01', 'name': 'Thompson_Seedless'}, {'id': 13411, 'synset': 'custard_apple.n.02', 'name': 'custard_apple'}, {'id': 13412, 'synset': 'cherimoya.n.02', 'name': 'cherimoya'}, {'id': 13413, 'synset': 'soursop.n.02', 'name': 'soursop'}, {'id': 13414, 'synset': 'sweetsop.n.02', 'name': 'sweetsop'}, {'id': 13415, 'synset': 'ilama.n.02', 'name': 'ilama'}, {'id': 13416, 'synset': 'pond_apple.n.02', 'name': 'pond_apple'}, {'id': 13417, 'synset': 'papaw.n.02', 'name': 'papaw'}, {'id': 13418, 'synset': 'kai_apple.n.01', 'name': 'kai_apple'}, {'id': 13419, 'synset': 'ketembilla.n.02', 'name': 'ketembilla'}, {'id': 13420, 'synset': 'ackee.n.01', 'name': 'ackee'}, {'id': 13421, 'synset': 'durian.n.02', 'name': 'durian'}, {'id': 13422, 'synset': 'feijoa.n.02', 'name': 'feijoa'}, {'id': 13423, 'synset': 'genip.n.02', 'name': 'genip'}, {'id': 13424, 'synset': 'genipap.n.01', 'name': 'genipap'}, {'id': 13425, 'synset': 'loquat.n.02', 'name': 'loquat'}, {'id': 13426, 'synset': 'mangosteen.n.02', 'name': 'mangosteen'}, {'id': 13427, 'synset': 'mango.n.02', 'name': 'mango'}, {'id': 13428, 'synset': 'sapodilla.n.02', 'name': 'sapodilla'}, {'id': 13429, 'synset': 'sapote.n.02', 'name': 'sapote'}, {'id': 13430, 'synset': 'tamarind.n.02', 'name': 'tamarind'}, {'id': 13431, 'synset': 'elderberry.n.02', 'name': 'elderberry'}, {'id': 13432, 'synset': 'guava.n.03', 'name': 'guava'}, {'id': 13433, 'synset': 'mombin.n.02', 'name': 'mombin'}, {'id': 13434, 'synset': 'hog_plum.n.04', 'name': 'hog_plum'}, {'id': 13435, 'synset': 'hog_plum.n.03', 'name': 'hog_plum'}, {'id': 13436, 'synset': 'jaboticaba.n.02', 'name': 'jaboticaba'}, {'id': 13437, 'synset': 'jujube.n.02', 'name': 'jujube'}, {'id': 13438, 'synset': 'litchi.n.02', 'name': 'litchi'}, {'id': 13439, 'synset': 'longanberry.n.02', 'name': 'longanberry'}, {'id': 13440, 'synset': 'mamey.n.02', 'name': 'mamey'}, {'id': 13441, 'synset': 'marang.n.02', 'name': 'marang'}, {'id': 13442, 'synset': 'medlar.n.04', 'name': 'medlar'}, {'id': 13443, 'synset': 'medlar.n.03', 'name': 'medlar'}, {'id': 13444, 'synset': 'mulberry.n.02', 'name': 'mulberry'}, {'id': 13445, 'synset': 'olive.n.04', 'name': 'olive'}, {'id': 13446, 'synset': 'black_olive.n.01', 'name': 'black_olive'}, {'id': 13447, 'synset': 'green_olive.n.01', 'name': 'green_olive'}, {'id': 13448, 'synset': 'bosc.n.01', 'name': 'bosc'}, {'id': 13449, 'synset': 'anjou.n.02', 'name': 'anjou'}, {'id': 13450, 'synset': 'bartlett.n.03', 'name': 'bartlett'}, {'id': 13451, 'synset': 'seckel.n.01', 'name': 'seckel'}, {'id': 13452, 'synset': 'plantain.n.03', 'name': 'plantain'}, {'id': 13453, 'synset': 'plumcot.n.02', 'name': 'plumcot'}, {'id': 13454, 'synset': 'pomegranate.n.02', 'name': 'pomegranate'}, {'id': 13455, 'synset': 'prickly_pear.n.02', 'name': 'prickly_pear'}, {'id': 13456, 'synset': 'barbados_gooseberry.n.02', 'name': 'Barbados_gooseberry'}, {'id': 13457, 'synset': 'quandong.n.04', 'name': 'quandong'}, {'id': 13458, 'synset': 'quandong_nut.n.01', 'name': 'quandong_nut'}, {'id': 13459, 'synset': 'quince.n.02', 'name': 'quince'}, {'id': 13460, 'synset': 'rambutan.n.02', 'name': 'rambutan'}, {'id': 13461, 'synset': 'pulasan.n.02', 'name': 'pulasan'}, {'id': 13462, 'synset': 'rose_apple.n.02', 'name': 'rose_apple'}, {'id': 13463, 'synset': 'sorb.n.01', 'name': 'sorb'}, {'id': 13464, 'synset': 'sour_gourd.n.02', 'name': 'sour_gourd'}, {'id': 13465, 'synset': 'edible_seed.n.01', 'name': 'edible_seed'}, {'id': 13466, 'synset': 'pumpkin_seed.n.01', 'name': 'pumpkin_seed'}, {'id': 13467, 'synset': 'betel_nut.n.01', 'name': 'betel_nut'}, {'id': 13468, 'synset': 'beechnut.n.01', 'name': 'beechnut'}, {'id': 13469, 'synset': 'walnut.n.01', 'name': 'walnut'}, {'id': 13470, 'synset': 'black_walnut.n.02', 'name': 'black_walnut'}, {'id': 13471, 'synset': 'english_walnut.n.02', 'name': 'English_walnut'}, {'id': 13472, 'synset': 'brazil_nut.n.02', 'name': 'brazil_nut'}, {'id': 13473, 'synset': 'butternut.n.02', 'name': 'butternut'}, {'id': 13474, 'synset': 'souari_nut.n.02', 'name': 'souari_nut'}, {'id': 13475, 'synset': 'cashew.n.02', 'name': 'cashew'}, {'id': 13476, 'synset': 'chestnut.n.03', 'name': 'chestnut'}, {'id': 13477, 'synset': 'chincapin.n.01', 'name': 'chincapin'}, {'id': 13478, 'synset': 'hazelnut.n.02', 'name': 'hazelnut'}, {'id': 13479, 'synset': 'coconut_milk.n.02', 'name': 'coconut_milk'}, {'id': 13480, 'synset': 'grugru_nut.n.01', 'name': 'grugru_nut'}, {'id': 13481, 'synset': 'hickory_nut.n.01', 'name': 'hickory_nut'}, {'id': 13482, 'synset': 'cola_extract.n.01', 'name': 'cola_extract'}, {'id': 13483, 'synset': 'macadamia_nut.n.02', 'name': 'macadamia_nut'}, {'id': 13484, 'synset': 'pecan.n.03', 'name': 'pecan'}, {'id': 13485, 'synset': 'pine_nut.n.01', 'name': 'pine_nut'}, {'id': 13486, 'synset': 'pistachio.n.02', 'name': 'pistachio'}, {'id': 13487, 'synset': 'sunflower_seed.n.01', 'name': 'sunflower_seed'}, {'id': 13488, 'synset': 'anchovy_paste.n.01', 'name': 'anchovy_paste'}, {'id': 13489, 'synset': 'rollmops.n.01', 'name': 'rollmops'}, {'id': 13490, 'synset': 'feed.n.01', 'name': 'feed'}, {'id': 13491, 'synset': 'cattle_cake.n.01', 'name': 'cattle_cake'}, {'id': 13492, 'synset': 'creep_feed.n.01', 'name': 'creep_feed'}, {'id': 13493, 'synset': 'fodder.n.02', 'name': 'fodder'}, {'id': 13494, 'synset': 'feed_grain.n.01', 'name': 'feed_grain'}, {'id': 13495, 'synset': 'eatage.n.01', 'name': 'eatage'}, {'id': 13496, 'synset': 'silage.n.01', 'name': 'silage'}, {'id': 13497, 'synset': 'oil_cake.n.01', 'name': 'oil_cake'}, {'id': 13498, 'synset': 'oil_meal.n.01', 'name': 'oil_meal'}, {'id': 13499, 'synset': 'alfalfa.n.02', 'name': 'alfalfa'}, {'id': 13500, 'synset': 'broad_bean.n.03', 'name': 'broad_bean'}, {'id': 13501, 'synset': 'hay.n.01', 'name': 'hay'}, {'id': 13502, 'synset': 'timothy.n.03', 'name': 'timothy'}, {'id': 13503, 'synset': 'stover.n.01', 'name': 'stover'}, {'id': 13504, 'synset': 'grain.n.02', 'name': 'grain'}, {'id': 13505, 'synset': 'grist.n.01', 'name': 'grist'}, {'id': 13506, 'synset': 'groats.n.01', 'name': 'groats'}, {'id': 13507, 'synset': 'millet.n.03', 'name': 'millet'}, {'id': 13508, 'synset': 'barley.n.01', 'name': 'barley'}, {'id': 13509, 'synset': 'pearl_barley.n.01', 'name': 'pearl_barley'}, {'id': 13510, 'synset': 'buckwheat.n.02', 'name': 'buckwheat'}, {'id': 13511, 'synset': 'bulgur.n.01', 'name': 'bulgur'}, {'id': 13512, 'synset': 'wheat.n.02', 'name': 'wheat'}, {'id': 13513, 'synset': 'cracked_wheat.n.01', 'name': 'cracked_wheat'}, {'id': 13514, 'synset': 'stodge.n.01', 'name': 'stodge'}, {'id': 13515, 'synset': 'wheat_germ.n.01', 'name': 'wheat_germ'}, {'id': 13516, 'synset': 'oat.n.02', 'name': 'oat'}, {'id': 13517, 'synset': 'rice.n.01', 'name': 'rice'}, {'id': 13518, 'synset': 'brown_rice.n.01', 'name': 'brown_rice'}, {'id': 13519, 'synset': 'white_rice.n.01', 'name': 'white_rice'}, {'id': 13520, 'synset': 'wild_rice.n.02', 'name': 'wild_rice'}, {'id': 13521, 'synset': 'paddy.n.03', 'name': 'paddy'}, {'id': 13522, 'synset': 'slop.n.01', 'name': 'slop'}, {'id': 13523, 'synset': 'mash.n.02', 'name': 'mash'}, {'id': 13524, 'synset': 'chicken_feed.n.01', 'name': 'chicken_feed'}, {'id': 13525, 'synset': 'cud.n.01', 'name': 'cud'}, {'id': 13526, 'synset': 'bird_feed.n.01', 'name': 'bird_feed'}, {'id': 13527, 'synset': 'petfood.n.01', 'name': 'petfood'}, {'id': 13528, 'synset': 'dog_food.n.01', 'name': 'dog_food'}, {'id': 13529, 'synset': 'cat_food.n.01', 'name': 'cat_food'}, {'id': 13530, 'synset': 'canary_seed.n.01', 'name': 'canary_seed'}, {'id': 13531, 'synset': 'tossed_salad.n.01', 'name': 'tossed_salad'}, {'id': 13532, 'synset': 'green_salad.n.01', 'name': 'green_salad'}, {'id': 13533, 'synset': 'caesar_salad.n.01', 'name': 'Caesar_salad'}, {'id': 13534, 'synset': 'salmagundi.n.02', 'name': 'salmagundi'}, {'id': 13535, 'synset': 'salad_nicoise.n.01', 'name': 'salad_nicoise'}, {'id': 13536, 'synset': 'combination_salad.n.01', 'name': 'combination_salad'}, {'id': 13537, 'synset': "chef's_salad.n.01", 'name': "chef's_salad"}, {'id': 13538, 'synset': 'potato_salad.n.01', 'name': 'potato_salad'}, {'id': 13539, 'synset': 'pasta_salad.n.01', 'name': 'pasta_salad'}, {'id': 13540, 'synset': 'macaroni_salad.n.01', 'name': 'macaroni_salad'}, {'id': 13541, 'synset': 'fruit_salad.n.01', 'name': 'fruit_salad'}, {'id': 13542, 'synset': 'waldorf_salad.n.01', 'name': 'Waldorf_salad'}, {'id': 13543, 'synset': 'crab_louis.n.01', 'name': 'crab_Louis'}, {'id': 13544, 'synset': 'herring_salad.n.01', 'name': 'herring_salad'}, {'id': 13545, 'synset': 'tuna_fish_salad.n.01', 'name': 'tuna_fish_salad'}, {'id': 13546, 'synset': 'chicken_salad.n.01', 'name': 'chicken_salad'}, {'id': 13547, 'synset': 'aspic.n.01', 'name': 'aspic'}, {'id': 13548, 'synset': 'molded_salad.n.01', 'name': 'molded_salad'}, {'id': 13549, 'synset': 'tabbouleh.n.01', 'name': 'tabbouleh'}, {'id': 13550, 'synset': 'ingredient.n.03', 'name': 'ingredient'}, {'id': 13551, 'synset': 'flavorer.n.01', 'name': 'flavorer'}, {'id': 13552, 'synset': 'bouillon_cube.n.01', 'name': 'bouillon_cube'}, {'id': 13553, 'synset': 'herb.n.02', 'name': 'herb'}, {'id': 13554, 'synset': 'fines_herbes.n.01', 'name': 'fines_herbes'}, {'id': 13555, 'synset': 'spice.n.02', 'name': 'spice'}, {'id': 13556, 'synset': 'spearmint_oil.n.01', 'name': 'spearmint_oil'}, {'id': 13557, 'synset': 'lemon_oil.n.01', 'name': 'lemon_oil'}, {'id': 13558, 'synset': 'wintergreen_oil.n.01', 'name': 'wintergreen_oil'}, {'id': 13559, 'synset': 'salt.n.02', 'name': 'salt'}, {'id': 13560, 'synset': 'celery_salt.n.01', 'name': 'celery_salt'}, {'id': 13561, 'synset': 'onion_salt.n.01', 'name': 'onion_salt'}, {'id': 13562, 'synset': 'seasoned_salt.n.01', 'name': 'seasoned_salt'}, {'id': 13563, 'synset': 'sour_salt.n.01', 'name': 'sour_salt'}, {'id': 13564, 'synset': 'five_spice_powder.n.01', 'name': 'five_spice_powder'}, {'id': 13565, 'synset': 'allspice.n.03', 'name': 'allspice'}, {'id': 13566, 'synset': 'cinnamon.n.03', 'name': 'cinnamon'}, {'id': 13567, 'synset': 'stick_cinnamon.n.01', 'name': 'stick_cinnamon'}, {'id': 13568, 'synset': 'clove.n.04', 'name': 'clove'}, {'id': 13569, 'synset': 'cumin.n.02', 'name': 'cumin'}, {'id': 13570, 'synset': 'fennel.n.04', 'name': 'fennel'}, {'id': 13571, 'synset': 'ginger.n.02', 'name': 'ginger'}, {'id': 13572, 'synset': 'mace.n.03', 'name': 'mace'}, {'id': 13573, 'synset': 'nutmeg.n.02', 'name': 'nutmeg'}, {'id': 13574, 'synset': 'black_pepper.n.02', 'name': 'black_pepper'}, {'id': 13575, 'synset': 'white_pepper.n.02', 'name': 'white_pepper'}, {'id': 13576, 'synset': 'sassafras.n.02', 'name': 'sassafras'}, {'id': 13577, 'synset': 'basil.n.03', 'name': 'basil'}, {'id': 13578, 'synset': 'bay_leaf.n.01', 'name': 'bay_leaf'}, {'id': 13579, 'synset': 'borage.n.02', 'name': 'borage'}, {'id': 13580, 'synset': 'hyssop.n.02', 'name': 'hyssop'}, {'id': 13581, 'synset': 'caraway.n.02', 'name': 'caraway'}, {'id': 13582, 'synset': 'chervil.n.02', 'name': 'chervil'}, {'id': 13583, 'synset': 'chives.n.02', 'name': 'chives'}, {'id': 13584, 'synset': 'comfrey.n.02', 'name': 'comfrey'}, {'id': 13585, 'synset': 'coriander.n.03', 'name': 'coriander'}, {'id': 13586, 'synset': 'coriander.n.02', 'name': 'coriander'}, {'id': 13587, 'synset': 'costmary.n.02', 'name': 'costmary'}, {'id': 13588, 'synset': 'fennel.n.03', 'name': 'fennel'}, {'id': 13589, 'synset': 'fennel.n.02', 'name': 'fennel'}, {'id': 13590, 'synset': 'fennel_seed.n.01', 'name': 'fennel_seed'}, {'id': 13591, 'synset': 'fenugreek.n.02', 'name': 'fenugreek'}, {'id': 13592, 'synset': 'clove.n.03', 'name': 'clove'}, {'id': 13593, 'synset': 'garlic_chive.n.02', 'name': 'garlic_chive'}, {'id': 13594, 'synset': 'lemon_balm.n.02', 'name': 'lemon_balm'}, {'id': 13595, 'synset': 'lovage.n.02', 'name': 'lovage'}, {'id': 13596, 'synset': 'marjoram.n.02', 'name': 'marjoram'}, {'id': 13597, 'synset': 'mint.n.04', 'name': 'mint'}, {'id': 13598, 'synset': 'mustard_seed.n.01', 'name': 'mustard_seed'}, {'id': 13599, 'synset': 'mustard.n.02', 'name': 'mustard'}, {'id': 13600, 'synset': 'chinese_mustard.n.02', 'name': 'Chinese_mustard'}, {'id': 13601, 'synset': 'nasturtium.n.03', 'name': 'nasturtium'}, {'id': 13602, 'synset': 'parsley.n.02', 'name': 'parsley'}, {'id': 13603, 'synset': 'salad_burnet.n.02', 'name': 'salad_burnet'}, {'id': 13604, 'synset': 'rosemary.n.02', 'name': 'rosemary'}, {'id': 13605, 'synset': 'rue.n.02', 'name': 'rue'}, {'id': 13606, 'synset': 'sage.n.02', 'name': 'sage'}, {'id': 13607, 'synset': 'clary_sage.n.02', 'name': 'clary_sage'}, {'id': 13608, 'synset': 'savory.n.03', 'name': 'savory'}, {'id': 13609, 'synset': 'summer_savory.n.02', 'name': 'summer_savory'}, {'id': 13610, 'synset': 'winter_savory.n.02', 'name': 'winter_savory'}, {'id': 13611, 'synset': 'sweet_woodruff.n.02', 'name': 'sweet_woodruff'}, {'id': 13612, 'synset': 'sweet_cicely.n.03', 'name': 'sweet_cicely'}, {'id': 13613, 'synset': 'tarragon.n.02', 'name': 'tarragon'}, {'id': 13614, 'synset': 'thyme.n.02', 'name': 'thyme'}, {'id': 13615, 'synset': 'turmeric.n.02', 'name': 'turmeric'}, {'id': 13616, 'synset': 'caper.n.02', 'name': 'caper'}, {'id': 13617, 'synset': 'catsup.n.01', 'name': 'catsup'}, {'id': 13618, 'synset': 'cardamom.n.02', 'name': 'cardamom'}, {'id': 13619, 'synset': 'chili_powder.n.01', 'name': 'chili_powder'}, {'id': 13620, 'synset': 'chili_sauce.n.01', 'name': 'chili_sauce'}, {'id': 13621, 'synset': 'chutney.n.01', 'name': 'chutney'}, {'id': 13622, 'synset': 'steak_sauce.n.01', 'name': 'steak_sauce'}, {'id': 13623, 'synset': 'taco_sauce.n.01', 'name': 'taco_sauce'}, {'id': 13624, 'synset': 'mint_sauce.n.01', 'name': 'mint_sauce'}, {'id': 13625, 'synset': 'cranberry_sauce.n.01', 'name': 'cranberry_sauce'}, {'id': 13626, 'synset': 'curry_powder.n.01', 'name': 'curry_powder'}, {'id': 13627, 'synset': 'curry.n.01', 'name': 'curry'}, {'id': 13628, 'synset': 'lamb_curry.n.01', 'name': 'lamb_curry'}, {'id': 13629, 'synset': 'duck_sauce.n.01', 'name': 'duck_sauce'}, {'id': 13630, 'synset': 'horseradish.n.03', 'name': 'horseradish'}, {'id': 13631, 'synset': 'marinade.n.01', 'name': 'marinade'}, {'id': 13632, 'synset': 'paprika.n.02', 'name': 'paprika'}, {'id': 13633, 'synset': 'spanish_paprika.n.01', 'name': 'Spanish_paprika'}, {'id': 13634, 'synset': 'dill_pickle.n.01', 'name': 'dill_pickle'}, {'id': 13635, 'synset': 'bread_and_butter_pickle.n.01', 'name': 'bread_and_butter_pickle'}, {'id': 13636, 'synset': 'pickle_relish.n.01', 'name': 'pickle_relish'}, {'id': 13637, 'synset': 'piccalilli.n.01', 'name': 'piccalilli'}, {'id': 13638, 'synset': 'sweet_pickle.n.01', 'name': 'sweet_pickle'}, {'id': 13639, 'synset': 'soy_sauce.n.01', 'name': 'soy_sauce'}, {'id': 13640, 'synset': 'tomato_paste.n.01', 'name': 'tomato_paste'}, {'id': 13641, 'synset': 'angelica.n.03', 'name': 'angelica'}, {'id': 13642, 'synset': 'angelica.n.02', 'name': 'angelica'}, {'id': 13643, 'synset': 'almond_extract.n.01', 'name': 'almond_extract'}, {'id': 13644, 'synset': 'anise.n.02', 'name': 'anise'}, {'id': 13645, 'synset': 'chinese_anise.n.02', 'name': 'Chinese_anise'}, {'id': 13646, 'synset': 'juniper_berries.n.01', 'name': 'juniper_berries'}, {'id': 13647, 'synset': 'saffron.n.02', 'name': 'saffron'}, {'id': 13648, 'synset': 'sesame_seed.n.01', 'name': 'sesame_seed'}, {'id': 13649, 'synset': 'caraway_seed.n.01', 'name': 'caraway_seed'}, {'id': 13650, 'synset': 'poppy_seed.n.01', 'name': 'poppy_seed'}, {'id': 13651, 'synset': 'dill.n.02', 'name': 'dill'}, {'id': 13652, 'synset': 'dill_seed.n.01', 'name': 'dill_seed'}, {'id': 13653, 'synset': 'celery_seed.n.01', 'name': 'celery_seed'}, {'id': 13654, 'synset': 'lemon_extract.n.01', 'name': 'lemon_extract'}, {'id': 13655, 'synset': 'monosodium_glutamate.n.01', 'name': 'monosodium_glutamate'}, {'id': 13656, 'synset': 'vanilla_bean.n.01', 'name': 'vanilla_bean'}, {'id': 13657, 'synset': 'cider_vinegar.n.01', 'name': 'cider_vinegar'}, {'id': 13658, 'synset': 'wine_vinegar.n.01', 'name': 'wine_vinegar'}, {'id': 13659, 'synset': 'sauce.n.01', 'name': 'sauce'}, {'id': 13660, 'synset': 'anchovy_sauce.n.01', 'name': 'anchovy_sauce'}, {'id': 13661, 'synset': 'hard_sauce.n.01', 'name': 'hard_sauce'}, {'id': 13662, 'synset': 'horseradish_sauce.n.01', 'name': 'horseradish_sauce'}, {'id': 13663, 'synset': 'bolognese_pasta_sauce.n.01', 'name': 'bolognese_pasta_sauce'}, {'id': 13664, 'synset': 'carbonara.n.01', 'name': 'carbonara'}, {'id': 13665, 'synset': 'tomato_sauce.n.01', 'name': 'tomato_sauce'}, {'id': 13666, 'synset': 'tartare_sauce.n.01', 'name': 'tartare_sauce'}, {'id': 13667, 'synset': 'wine_sauce.n.01', 'name': 'wine_sauce'}, {'id': 13668, 'synset': 'marchand_de_vin.n.01', 'name': 'marchand_de_vin'}, {'id': 13669, 'synset': 'bread_sauce.n.01', 'name': 'bread_sauce'}, {'id': 13670, 'synset': 'plum_sauce.n.01', 'name': 'plum_sauce'}, {'id': 13671, 'synset': 'peach_sauce.n.01', 'name': 'peach_sauce'}, {'id': 13672, 'synset': 'apricot_sauce.n.01', 'name': 'apricot_sauce'}, {'id': 13673, 'synset': 'pesto.n.01', 'name': 'pesto'}, {'id': 13674, 'synset': 'ravigote.n.01', 'name': 'ravigote'}, {'id': 13675, 'synset': 'remoulade_sauce.n.01', 'name': 'remoulade_sauce'}, {'id': 13676, 'synset': 'dressing.n.01', 'name': 'dressing'}, {'id': 13677, 'synset': 'sauce_louis.n.01', 'name': 'sauce_Louis'}, {'id': 13678, 'synset': 'bleu_cheese_dressing.n.01', 'name': 'bleu_cheese_dressing'}, {'id': 13679, 'synset': 'blue_cheese_dressing.n.01', 'name': 'blue_cheese_dressing'}, {'id': 13680, 'synset': 'french_dressing.n.01', 'name': 'French_dressing'}, {'id': 13681, 'synset': 'lorenzo_dressing.n.01', 'name': 'Lorenzo_dressing'}, {'id': 13682, 'synset': 'anchovy_dressing.n.01', 'name': 'anchovy_dressing'}, {'id': 13683, 'synset': 'italian_dressing.n.01', 'name': 'Italian_dressing'}, {'id': 13684, 'synset': 'half-and-half_dressing.n.01', 'name': 'half-and-half_dressing'}, {'id': 13685, 'synset': 'mayonnaise.n.01', 'name': 'mayonnaise'}, {'id': 13686, 'synset': 'green_mayonnaise.n.01', 'name': 'green_mayonnaise'}, {'id': 13687, 'synset': 'aioli.n.01', 'name': 'aioli'}, {'id': 13688, 'synset': 'russian_dressing.n.01', 'name': 'Russian_dressing'}, {'id': 13689, 'synset': 'salad_cream.n.01', 'name': 'salad_cream'}, {'id': 13690, 'synset': 'thousand_island_dressing.n.01', 'name': 'Thousand_Island_dressing'}, {'id': 13691, 'synset': 'barbecue_sauce.n.01', 'name': 'barbecue_sauce'}, {'id': 13692, 'synset': 'hollandaise.n.01', 'name': 'hollandaise'}, {'id': 13693, 'synset': 'bearnaise.n.01', 'name': 'bearnaise'}, {'id': 13694, 'synset': 'bercy.n.01', 'name': 'Bercy'}, {'id': 13695, 'synset': 'bordelaise.n.01', 'name': 'bordelaise'}, {'id': 13696, 'synset': 'bourguignon.n.01', 'name': 'bourguignon'}, {'id': 13697, 'synset': 'brown_sauce.n.02', 'name': 'brown_sauce'}, {'id': 13698, 'synset': 'espagnole.n.01', 'name': 'Espagnole'}, {'id': 13699, 'synset': 'chinese_brown_sauce.n.01', 'name': 'Chinese_brown_sauce'}, {'id': 13700, 'synset': 'blanc.n.01', 'name': 'blanc'}, {'id': 13701, 'synset': 'cheese_sauce.n.01', 'name': 'cheese_sauce'}, {'id': 13702, 'synset': 'chocolate_sauce.n.01', 'name': 'chocolate_sauce'}, {'id': 13703, 'synset': 'hot-fudge_sauce.n.01', 'name': 'hot-fudge_sauce'}, {'id': 13704, 'synset': 'cocktail_sauce.n.01', 'name': 'cocktail_sauce'}, {'id': 13705, 'synset': 'colbert.n.01', 'name': 'Colbert'}, {'id': 13706, 'synset': 'white_sauce.n.01', 'name': 'white_sauce'}, {'id': 13707, 'synset': 'cream_sauce.n.01', 'name': 'cream_sauce'}, {'id': 13708, 'synset': 'mornay_sauce.n.01', 'name': 'Mornay_sauce'}, {'id': 13709, 'synset': 'demiglace.n.01', 'name': 'demiglace'}, {'id': 13710, 'synset': 'gravy.n.02', 'name': 'gravy'}, {'id': 13711, 'synset': 'gravy.n.01', 'name': 'gravy'}, {'id': 13712, 'synset': 'spaghetti_sauce.n.01', 'name': 'spaghetti_sauce'}, {'id': 13713, 'synset': 'marinara.n.01', 'name': 'marinara'}, {'id': 13714, 'synset': 'mole.n.03', 'name': 'mole'}, {'id': 13715, 'synset': "hunter's_sauce.n.01", 'name': "hunter's_sauce"}, {'id': 13716, 'synset': 'mushroom_sauce.n.01', 'name': 'mushroom_sauce'}, {'id': 13717, 'synset': 'mustard_sauce.n.01', 'name': 'mustard_sauce'}, {'id': 13718, 'synset': 'nantua.n.01', 'name': 'Nantua'}, {'id': 13719, 'synset': 'hungarian_sauce.n.01', 'name': 'Hungarian_sauce'}, {'id': 13720, 'synset': 'pepper_sauce.n.01', 'name': 'pepper_sauce'}, {'id': 13721, 'synset': 'roux.n.01', 'name': 'roux'}, {'id': 13722, 'synset': 'smitane.n.01', 'name': 'Smitane'}, {'id': 13723, 'synset': 'soubise.n.01', 'name': 'Soubise'}, {'id': 13724, 'synset': 'lyonnaise_sauce.n.01', 'name': 'Lyonnaise_sauce'}, {'id': 13725, 'synset': 'veloute.n.01', 'name': 'veloute'}, {'id': 13726, 'synset': 'allemande.n.01', 'name': 'allemande'}, {'id': 13727, 'synset': 'caper_sauce.n.01', 'name': 'caper_sauce'}, {'id': 13728, 'synset': 'poulette.n.01', 'name': 'poulette'}, {'id': 13729, 'synset': 'curry_sauce.n.01', 'name': 'curry_sauce'}, {'id': 13730, 'synset': 'worcester_sauce.n.01', 'name': 'Worcester_sauce'}, {'id': 13731, 'synset': 'coconut_milk.n.01', 'name': 'coconut_milk'}, {'id': 13732, 'synset': 'egg_white.n.01', 'name': 'egg_white'}, {'id': 13733, 'synset': 'hard-boiled_egg.n.01', 'name': 'hard-boiled_egg'}, {'id': 13734, 'synset': 'easter_egg.n.02', 'name': 'Easter_egg'}, {'id': 13735, 'synset': 'easter_egg.n.01', 'name': 'Easter_egg'}, {'id': 13736, 'synset': 'chocolate_egg.n.01', 'name': 'chocolate_egg'}, {'id': 13737, 'synset': 'candy_egg.n.01', 'name': 'candy_egg'}, {'id': 13738, 'synset': 'poached_egg.n.01', 'name': 'poached_egg'}, {'id': 13739, 'synset': 'scrambled_eggs.n.01', 'name': 'scrambled_eggs'}, {'id': 13740, 'synset': 'deviled_egg.n.01', 'name': 'deviled_egg'}, {'id': 13741, 'synset': 'shirred_egg.n.01', 'name': 'shirred_egg'}, {'id': 13742, 'synset': 'firm_omelet.n.01', 'name': 'firm_omelet'}, {'id': 13743, 'synset': 'french_omelet.n.01', 'name': 'French_omelet'}, {'id': 13744, 'synset': 'fluffy_omelet.n.01', 'name': 'fluffy_omelet'}, {'id': 13745, 'synset': 'western_omelet.n.01', 'name': 'western_omelet'}, {'id': 13746, 'synset': 'souffle.n.01', 'name': 'souffle'}, {'id': 13747, 'synset': 'fried_egg.n.01', 'name': 'fried_egg'}, {'id': 13748, 'synset': 'dairy_product.n.01', 'name': 'dairy_product'}, {'id': 13749, 'synset': 'milk.n.04', 'name': 'milk'}, {'id': 13750, 'synset': 'sour_milk.n.01', 'name': 'sour_milk'}, {'id': 13751, 'synset': 'formula.n.06', 'name': 'formula'}, {'id': 13752, 'synset': 'pasteurized_milk.n.01', 'name': 'pasteurized_milk'}, {'id': 13753, 'synset': "cows'_milk.n.01", 'name': "cows'_milk"}, {'id': 13754, 'synset': "yak's_milk.n.01", 'name': "yak's_milk"}, {'id': 13755, 'synset': "goats'_milk.n.01", 'name': "goats'_milk"}, {'id': 13756, 'synset': 'acidophilus_milk.n.01', 'name': 'acidophilus_milk'}, {'id': 13757, 'synset': 'raw_milk.n.01', 'name': 'raw_milk'}, {'id': 13758, 'synset': 'scalded_milk.n.01', 'name': 'scalded_milk'}, {'id': 13759, 'synset': 'homogenized_milk.n.01', 'name': 'homogenized_milk'}, {'id': 13760, 'synset': 'certified_milk.n.01', 'name': 'certified_milk'}, {'id': 13761, 'synset': 'powdered_milk.n.01', 'name': 'powdered_milk'}, {'id': 13762, 'synset': 'nonfat_dry_milk.n.01', 'name': 'nonfat_dry_milk'}, {'id': 13763, 'synset': 'evaporated_milk.n.01', 'name': 'evaporated_milk'}, {'id': 13764, 'synset': 'condensed_milk.n.01', 'name': 'condensed_milk'}, {'id': 13765, 'synset': 'skim_milk.n.01', 'name': 'skim_milk'}, {'id': 13766, 'synset': 'semi-skimmed_milk.n.01', 'name': 'semi-skimmed_milk'}, {'id': 13767, 'synset': 'whole_milk.n.01', 'name': 'whole_milk'}, {'id': 13768, 'synset': 'low-fat_milk.n.01', 'name': 'low-fat_milk'}, {'id': 13769, 'synset': 'buttermilk.n.01', 'name': 'buttermilk'}, {'id': 13770, 'synset': 'cream.n.02', 'name': 'cream'}, {'id': 13771, 'synset': 'clotted_cream.n.01', 'name': 'clotted_cream'}, {'id': 13772, 'synset': 'double_creme.n.01', 'name': 'double_creme'}, {'id': 13773, 'synset': 'half-and-half.n.01', 'name': 'half-and-half'}, {'id': 13774, 'synset': 'heavy_cream.n.01', 'name': 'heavy_cream'}, {'id': 13775, 'synset': 'light_cream.n.01', 'name': 'light_cream'}, {'id': 13776, 'synset': 'whipping_cream.n.01', 'name': 'whipping_cream'}, {'id': 13777, 'synset': 'clarified_butter.n.01', 'name': 'clarified_butter'}, {'id': 13778, 'synset': 'ghee.n.01', 'name': 'ghee'}, {'id': 13779, 'synset': 'brown_butter.n.01', 'name': 'brown_butter'}, {'id': 13780, 'synset': 'meuniere_butter.n.01', 'name': 'Meuniere_butter'}, {'id': 13781, 'synset': 'blueberry_yogurt.n.01', 'name': 'blueberry_yogurt'}, {'id': 13782, 'synset': 'raita.n.01', 'name': 'raita'}, {'id': 13783, 'synset': 'whey.n.02', 'name': 'whey'}, {'id': 13784, 'synset': 'curd.n.02', 'name': 'curd'}, {'id': 13785, 'synset': 'curd.n.01', 'name': 'curd'}, {'id': 13786, 'synset': 'clabber.n.01', 'name': 'clabber'}, {'id': 13787, 'synset': 'cheese.n.01', 'name': 'cheese'}, {'id': 13788, 'synset': 'paring.n.02', 'name': 'paring'}, {'id': 13789, 'synset': 'cream_cheese.n.01', 'name': 'cream_cheese'}, {'id': 13790, 'synset': 'double_cream.n.01', 'name': 'double_cream'}, {'id': 13791, 'synset': 'mascarpone.n.01', 'name': 'mascarpone'}, {'id': 13792, 'synset': 'triple_cream.n.01', 'name': 'triple_cream'}, {'id': 13793, 'synset': 'cottage_cheese.n.01', 'name': 'cottage_cheese'}, {'id': 13794, 'synset': 'process_cheese.n.01', 'name': 'process_cheese'}, {'id': 13795, 'synset': 'bleu.n.01', 'name': 'bleu'}, {'id': 13796, 'synset': 'stilton.n.01', 'name': 'Stilton'}, {'id': 13797, 'synset': 'roquefort.n.01', 'name': 'Roquefort'}, {'id': 13798, 'synset': 'gorgonzola.n.01', 'name': 'gorgonzola'}, {'id': 13799, 'synset': 'danish_blue.n.01', 'name': 'Danish_blue'}, {'id': 13800, 'synset': 'bavarian_blue.n.01', 'name': 'Bavarian_blue'}, {'id': 13801, 'synset': 'brie.n.01', 'name': 'Brie'}, {'id': 13802, 'synset': 'brick_cheese.n.01', 'name': 'brick_cheese'}, {'id': 13803, 'synset': 'camembert.n.01', 'name': 'Camembert'}, {'id': 13804, 'synset': 'cheddar.n.02', 'name': 'cheddar'}, {'id': 13805, 'synset': 'rat_cheese.n.01', 'name': 'rat_cheese'}, {'id': 13806, 'synset': 'cheshire_cheese.n.01', 'name': 'Cheshire_cheese'}, {'id': 13807, 'synset': 'double_gloucester.n.01', 'name': 'double_Gloucester'}, {'id': 13808, 'synset': 'edam.n.01', 'name': 'Edam'}, {'id': 13809, 'synset': 'goat_cheese.n.01', 'name': 'goat_cheese'}, {'id': 13810, 'synset': 'gouda.n.01', 'name': 'Gouda'}, {'id': 13811, 'synset': 'grated_cheese.n.01', 'name': 'grated_cheese'}, {'id': 13812, 'synset': 'hand_cheese.n.01', 'name': 'hand_cheese'}, {'id': 13813, 'synset': 'liederkranz.n.01', 'name': 'Liederkranz'}, {'id': 13814, 'synset': 'limburger.n.01', 'name': 'Limburger'}, {'id': 13815, 'synset': 'mozzarella.n.01', 'name': 'mozzarella'}, {'id': 13816, 'synset': 'muenster.n.01', 'name': 'Muenster'}, {'id': 13817, 'synset': 'parmesan.n.01', 'name': 'Parmesan'}, {'id': 13818, 'synset': 'quark_cheese.n.01', 'name': 'quark_cheese'}, {'id': 13819, 'synset': 'ricotta.n.01', 'name': 'ricotta'}, {'id': 13820, 'synset': 'swiss_cheese.n.01', 'name': 'Swiss_cheese'}, {'id': 13821, 'synset': 'emmenthal.n.01', 'name': 'Emmenthal'}, {'id': 13822, 'synset': 'gruyere.n.01', 'name': 'Gruyere'}, {'id': 13823, 'synset': 'sapsago.n.01', 'name': 'sapsago'}, {'id': 13824, 'synset': 'velveeta.n.01', 'name': 'Velveeta'}, {'id': 13825, 'synset': 'nut_butter.n.01', 'name': 'nut_butter'}, {'id': 13826, 'synset': 'marshmallow_fluff.n.01', 'name': 'marshmallow_fluff'}, {'id': 13827, 'synset': 'onion_butter.n.01', 'name': 'onion_butter'}, {'id': 13828, 'synset': 'pimento_butter.n.01', 'name': 'pimento_butter'}, {'id': 13829, 'synset': 'shrimp_butter.n.01', 'name': 'shrimp_butter'}, {'id': 13830, 'synset': 'lobster_butter.n.01', 'name': 'lobster_butter'}, {'id': 13831, 'synset': 'yak_butter.n.01', 'name': 'yak_butter'}, {'id': 13832, 'synset': 'spread.n.05', 'name': 'spread'}, {'id': 13833, 'synset': 'cheese_spread.n.01', 'name': 'cheese_spread'}, {'id': 13834, 'synset': 'anchovy_butter.n.01', 'name': 'anchovy_butter'}, {'id': 13835, 'synset': 'fishpaste.n.01', 'name': 'fishpaste'}, {'id': 13836, 'synset': 'garlic_butter.n.01', 'name': 'garlic_butter'}, {'id': 13837, 'synset': 'miso.n.01', 'name': 'miso'}, {'id': 13838, 'synset': 'wasabi.n.02', 'name': 'wasabi'}, {'id': 13839, 'synset': 'snail_butter.n.01', 'name': 'snail_butter'}, {'id': 13840, 'synset': 'pate.n.01', 'name': 'pate'}, {'id': 13841, 'synset': 'duck_pate.n.01', 'name': 'duck_pate'}, {'id': 13842, 'synset': 'foie_gras.n.01', 'name': 'foie_gras'}, {'id': 13843, 'synset': 'tapenade.n.01', 'name': 'tapenade'}, {'id': 13844, 'synset': 'tahini.n.01', 'name': 'tahini'}, {'id': 13845, 'synset': 'sweetening.n.01', 'name': 'sweetening'}, {'id': 13846, 'synset': 'aspartame.n.01', 'name': 'aspartame'}, {'id': 13847, 'synset': 'saccharin.n.01', 'name': 'saccharin'}, {'id': 13848, 'synset': 'sugar.n.01', 'name': 'sugar'}, {'id': 13849, 'synset': 'syrup.n.01', 'name': 'syrup'}, {'id': 13850, 'synset': 'sugar_syrup.n.01', 'name': 'sugar_syrup'}, {'id': 13851, 'synset': 'molasses.n.01', 'name': 'molasses'}, {'id': 13852, 'synset': 'sorghum.n.03', 'name': 'sorghum'}, {'id': 13853, 'synset': 'treacle.n.01', 'name': 'treacle'}, {'id': 13854, 'synset': 'grenadine.n.01', 'name': 'grenadine'}, {'id': 13855, 'synset': 'maple_syrup.n.01', 'name': 'maple_syrup'}, {'id': 13856, 'synset': 'corn_syrup.n.01', 'name': 'corn_syrup'}, {'id': 13857, 'synset': 'miraculous_food.n.01', 'name': 'miraculous_food'}, {'id': 13858, 'synset': 'dough.n.01', 'name': 'dough'}, {'id': 13859, 'synset': 'bread_dough.n.01', 'name': 'bread_dough'}, {'id': 13860, 'synset': 'pancake_batter.n.01', 'name': 'pancake_batter'}, {'id': 13861, 'synset': 'fritter_batter.n.01', 'name': 'fritter_batter'}, {'id': 13862, 'synset': 'coq_au_vin.n.01', 'name': 'coq_au_vin'}, {'id': 13863, 'synset': 'chicken_provencale.n.01', 'name': 'chicken_provencale'}, {'id': 13864, 'synset': 'chicken_and_rice.n.01', 'name': 'chicken_and_rice'}, {'id': 13865, 'synset': 'moo_goo_gai_pan.n.01', 'name': 'moo_goo_gai_pan'}, {'id': 13866, 'synset': 'arroz_con_pollo.n.01', 'name': 'arroz_con_pollo'}, {'id': 13867, 'synset': 'bacon_and_eggs.n.02', 'name': 'bacon_and_eggs'}, {'id': 13868, 'synset': 'barbecued_spareribs.n.01', 'name': 'barbecued_spareribs'}, {'id': 13869, 'synset': 'beef_bourguignonne.n.01', 'name': 'beef_Bourguignonne'}, {'id': 13870, 'synset': 'beef_wellington.n.01', 'name': 'beef_Wellington'}, {'id': 13871, 'synset': 'bitok.n.01', 'name': 'bitok'}, {'id': 13872, 'synset': 'boiled_dinner.n.01', 'name': 'boiled_dinner'}, {'id': 13873, 'synset': 'boston_baked_beans.n.01', 'name': 'Boston_baked_beans'}, {'id': 13874, 'synset': 'bubble_and_squeak.n.01', 'name': 'bubble_and_squeak'}, {'id': 13875, 'synset': 'pasta.n.01', 'name': 'pasta'}, {'id': 13876, 'synset': 'cannelloni.n.01', 'name': 'cannelloni'}, {'id': 13877, 'synset': 'carbonnade_flamande.n.01', 'name': 'carbonnade_flamande'}, {'id': 13878, 'synset': 'cheese_souffle.n.01', 'name': 'cheese_souffle'}, {'id': 13879, 'synset': 'chicken_marengo.n.01', 'name': 'chicken_Marengo'}, {'id': 13880, 'synset': 'chicken_cordon_bleu.n.01', 'name': 'chicken_cordon_bleu'}, {'id': 13881, 'synset': 'maryland_chicken.n.01', 'name': 'Maryland_chicken'}, {'id': 13882, 'synset': 'chicken_paprika.n.01', 'name': 'chicken_paprika'}, {'id': 13883, 'synset': 'chicken_tetrazzini.n.01', 'name': 'chicken_Tetrazzini'}, {'id': 13884, 'synset': 'tetrazzini.n.01', 'name': 'Tetrazzini'}, {'id': 13885, 'synset': 'chicken_kiev.n.01', 'name': 'chicken_Kiev'}, {'id': 13886, 'synset': 'chili.n.01', 'name': 'chili'}, {'id': 13887, 'synset': 'chili_dog.n.01', 'name': 'chili_dog'}, {'id': 13888, 'synset': 'chop_suey.n.01', 'name': 'chop_suey'}, {'id': 13889, 'synset': 'chow_mein.n.01', 'name': 'chow_mein'}, {'id': 13890, 'synset': 'codfish_ball.n.01', 'name': 'codfish_ball'}, {'id': 13891, 'synset': 'coquille.n.01', 'name': 'coquille'}, {'id': 13892, 'synset': 'coquilles_saint-jacques.n.01', 'name': 'coquilles_Saint-Jacques'}, {'id': 13893, 'synset': 'croquette.n.01', 'name': 'croquette'}, {'id': 13894, 'synset': 'cottage_pie.n.01', 'name': 'cottage_pie'}, {'id': 13895, 'synset': 'rissole.n.01', 'name': 'rissole'}, {'id': 13896, 'synset': 'dolmas.n.01', 'name': 'dolmas'}, {'id': 13897, 'synset': 'egg_foo_yong.n.01', 'name': 'egg_foo_yong'}, {'id': 13898, 'synset': 'eggs_benedict.n.01', 'name': 'eggs_Benedict'}, {'id': 13899, 'synset': 'enchilada.n.01', 'name': 'enchilada'}, {'id': 13900, 'synset': 'falafel.n.01', 'name': 'falafel'}, {'id': 13901, 'synset': 'fish_and_chips.n.01', 'name': 'fish_and_chips'}, {'id': 13902, 'synset': 'fondue.n.02', 'name': 'fondue'}, {'id': 13903, 'synset': 'cheese_fondue.n.01', 'name': 'cheese_fondue'}, {'id': 13904, 'synset': 'chocolate_fondue.n.01', 'name': 'chocolate_fondue'}, {'id': 13905, 'synset': 'fondue.n.01', 'name': 'fondue'}, {'id': 13906, 'synset': 'beef_fondue.n.01', 'name': 'beef_fondue'}, {'id': 13907, 'synset': 'fried_rice.n.01', 'name': 'fried_rice'}, {'id': 13908, 'synset': 'frittata.n.01', 'name': 'frittata'}, {'id': 13909, 'synset': 'frog_legs.n.01', 'name': 'frog_legs'}, {'id': 13910, 'synset': 'galantine.n.01', 'name': 'galantine'}, {'id': 13911, 'synset': 'gefilte_fish.n.01', 'name': 'gefilte_fish'}, {'id': 13912, 'synset': 'haggis.n.01', 'name': 'haggis'}, {'id': 13913, 'synset': 'ham_and_eggs.n.01', 'name': 'ham_and_eggs'}, {'id': 13914, 'synset': 'hash.n.01', 'name': 'hash'}, {'id': 13915, 'synset': 'corned_beef_hash.n.01', 'name': 'corned_beef_hash'}, {'id': 13916, 'synset': 'jambalaya.n.01', 'name': 'jambalaya'}, {'id': 13917, 'synset': 'kabob.n.01', 'name': 'kabob'}, {'id': 13918, 'synset': 'kedgeree.n.01', 'name': 'kedgeree'}, {'id': 13919, 'synset': 'souvlaki.n.01', 'name': 'souvlaki'}, {'id': 13920, 'synset': 'seafood_newburg.n.01', 'name': 'seafood_Newburg'}, {'id': 13921, 'synset': 'lobster_newburg.n.01', 'name': 'lobster_Newburg'}, {'id': 13922, 'synset': 'shrimp_newburg.n.01', 'name': 'shrimp_Newburg'}, {'id': 13923, 'synset': 'newburg_sauce.n.01', 'name': 'Newburg_sauce'}, {'id': 13924, 'synset': 'lobster_thermidor.n.01', 'name': 'lobster_thermidor'}, {'id': 13925, 'synset': 'lutefisk.n.01', 'name': 'lutefisk'}, {'id': 13926, 'synset': 'macaroni_and_cheese.n.01', 'name': 'macaroni_and_cheese'}, {'id': 13927, 'synset': 'macedoine.n.01', 'name': 'macedoine'}, {'id': 13928, 'synset': 'porcupine_ball.n.01', 'name': 'porcupine_ball'}, {'id': 13929, 'synset': 'swedish_meatball.n.01', 'name': 'Swedish_meatball'}, {'id': 13930, 'synset': 'meat_loaf.n.01', 'name': 'meat_loaf'}, {'id': 13931, 'synset': 'moussaka.n.01', 'name': 'moussaka'}, {'id': 13932, 'synset': 'osso_buco.n.01', 'name': 'osso_buco'}, {'id': 13933, 'synset': 'marrow.n.03', 'name': 'marrow'}, {'id': 13934, 'synset': 'pheasant_under_glass.n.01', 'name': 'pheasant_under_glass'}, {'id': 13935, 'synset': 'pigs_in_blankets.n.01', 'name': 'pigs_in_blankets'}, {'id': 13936, 'synset': 'pilaf.n.01', 'name': 'pilaf'}, {'id': 13937, 'synset': 'bulgur_pilaf.n.01', 'name': 'bulgur_pilaf'}, {'id': 13938, 'synset': 'sausage_pizza.n.01', 'name': 'sausage_pizza'}, {'id': 13939, 'synset': 'pepperoni_pizza.n.01', 'name': 'pepperoni_pizza'}, {'id': 13940, 'synset': 'cheese_pizza.n.01', 'name': 'cheese_pizza'}, {'id': 13941, 'synset': 'anchovy_pizza.n.01', 'name': 'anchovy_pizza'}, {'id': 13942, 'synset': 'sicilian_pizza.n.01', 'name': 'Sicilian_pizza'}, {'id': 13943, 'synset': 'poi.n.01', 'name': 'poi'}, {'id': 13944, 'synset': 'pork_and_beans.n.01', 'name': 'pork_and_beans'}, {'id': 13945, 'synset': 'porridge.n.01', 'name': 'porridge'}, {'id': 13946, 'synset': 'oatmeal.n.01', 'name': 'oatmeal'}, {'id': 13947, 'synset': 'loblolly.n.01', 'name': 'loblolly'}, {'id': 13948, 'synset': 'potpie.n.01', 'name': 'potpie'}, {'id': 13949, 'synset': 'rijsttaffel.n.01', 'name': 'rijsttaffel'}, {'id': 13950, 'synset': 'risotto.n.01', 'name': 'risotto'}, {'id': 13951, 'synset': 'roulade.n.01', 'name': 'roulade'}, {'id': 13952, 'synset': 'fish_loaf.n.01', 'name': 'fish_loaf'}, {'id': 13953, 'synset': 'salmon_loaf.n.01', 'name': 'salmon_loaf'}, {'id': 13954, 'synset': 'salisbury_steak.n.01', 'name': 'Salisbury_steak'}, {'id': 13955, 'synset': 'sauerbraten.n.01', 'name': 'sauerbraten'}, {'id': 13956, 'synset': 'sauerkraut.n.01', 'name': 'sauerkraut'}, {'id': 13957, 'synset': 'scallopine.n.01', 'name': 'scallopine'}, {'id': 13958, 'synset': 'veal_scallopini.n.01', 'name': 'veal_scallopini'}, {'id': 13959, 'synset': 'scampi.n.01', 'name': 'scampi'}, {'id': 13960, 'synset': 'scotch_egg.n.01', 'name': 'Scotch_egg'}, {'id': 13961, 'synset': 'scotch_woodcock.n.01', 'name': 'Scotch_woodcock'}, {'id': 13962, 'synset': 'scrapple.n.01', 'name': 'scrapple'}, {'id': 13963, 'synset': 'spaghetti_and_meatballs.n.01', 'name': 'spaghetti_and_meatballs'}, {'id': 13964, 'synset': 'spanish_rice.n.01', 'name': 'Spanish_rice'}, {'id': 13965, 'synset': 'steak_tartare.n.01', 'name': 'steak_tartare'}, {'id': 13966, 'synset': 'pepper_steak.n.02', 'name': 'pepper_steak'}, {'id': 13967, 'synset': 'steak_au_poivre.n.01', 'name': 'steak_au_poivre'}, {'id': 13968, 'synset': 'beef_stroganoff.n.01', 'name': 'beef_Stroganoff'}, {'id': 13969, 'synset': 'stuffed_cabbage.n.01', 'name': 'stuffed_cabbage'}, {'id': 13970, 'synset': 'kishke.n.01', 'name': 'kishke'}, {'id': 13971, 'synset': 'stuffed_peppers.n.01', 'name': 'stuffed_peppers'}, {'id': 13972, 'synset': 'stuffed_tomato.n.02', 'name': 'stuffed_tomato'}, {'id': 13973, 'synset': 'stuffed_tomato.n.01', 'name': 'stuffed_tomato'}, {'id': 13974, 'synset': 'succotash.n.01', 'name': 'succotash'}, {'id': 13975, 'synset': 'sukiyaki.n.01', 'name': 'sukiyaki'}, {'id': 13976, 'synset': 'sashimi.n.01', 'name': 'sashimi'}, {'id': 13977, 'synset': 'swiss_steak.n.01', 'name': 'Swiss_steak'}, {'id': 13978, 'synset': 'tamale.n.02', 'name': 'tamale'}, {'id': 13979, 'synset': 'tamale_pie.n.01', 'name': 'tamale_pie'}, {'id': 13980, 'synset': 'tempura.n.01', 'name': 'tempura'}, {'id': 13981, 'synset': 'teriyaki.n.01', 'name': 'teriyaki'}, {'id': 13982, 'synset': 'terrine.n.01', 'name': 'terrine'}, {'id': 13983, 'synset': 'welsh_rarebit.n.01', 'name': 'Welsh_rarebit'}, {'id': 13984, 'synset': 'schnitzel.n.01', 'name': 'schnitzel'}, {'id': 13985, 'synset': 'chicken_taco.n.01', 'name': 'chicken_taco'}, {'id': 13986, 'synset': 'beef_burrito.n.01', 'name': 'beef_burrito'}, {'id': 13987, 'synset': 'tostada.n.01', 'name': 'tostada'}, {'id': 13988, 'synset': 'bean_tostada.n.01', 'name': 'bean_tostada'}, {'id': 13989, 'synset': 'refried_beans.n.01', 'name': 'refried_beans'}, {'id': 13990, 'synset': 'beverage.n.01', 'name': 'beverage'}, {'id': 13991, 'synset': 'wish-wash.n.01', 'name': 'wish-wash'}, {'id': 13992, 'synset': 'concoction.n.01', 'name': 'concoction'}, {'id': 13993, 'synset': 'mix.n.01', 'name': 'mix'}, {'id': 13994, 'synset': 'filling.n.03', 'name': 'filling'}, {'id': 13995, 'synset': 'lekvar.n.01', 'name': 'lekvar'}, {'id': 13996, 'synset': 'potion.n.01', 'name': 'potion'}, {'id': 13997, 'synset': 'elixir.n.03', 'name': 'elixir'}, {'id': 13998, 'synset': 'elixir_of_life.n.01', 'name': 'elixir_of_life'}, {'id': 13999, 'synset': 'philter.n.01', 'name': 'philter'}, {'id': 14000, 'synset': 'proof_spirit.n.01', 'name': 'proof_spirit'}, {'id': 14001, 'synset': 'home_brew.n.01', 'name': 'home_brew'}, {'id': 14002, 'synset': 'hooch.n.01', 'name': 'hooch'}, {'id': 14003, 'synset': 'kava.n.01', 'name': 'kava'}, {'id': 14004, 'synset': 'aperitif.n.01', 'name': 'aperitif'}, {'id': 14005, 'synset': 'brew.n.01', 'name': 'brew'}, {'id': 14006, 'synset': 'beer.n.01', 'name': 'beer'}, {'id': 14007, 'synset': 'draft_beer.n.01', 'name': 'draft_beer'}, {'id': 14008, 'synset': 'suds.n.02', 'name': 'suds'}, {'id': 14009, 'synset': 'munich_beer.n.01', 'name': 'Munich_beer'}, {'id': 14010, 'synset': 'bock.n.01', 'name': 'bock'}, {'id': 14011, 'synset': 'lager.n.02', 'name': 'lager'}, {'id': 14012, 'synset': 'light_beer.n.01', 'name': 'light_beer'}, {'id': 14013, 'synset': 'oktoberfest.n.01', 'name': 'Oktoberfest'}, {'id': 14014, 'synset': 'pilsner.n.01', 'name': 'Pilsner'}, {'id': 14015, 'synset': 'shebeen.n.01', 'name': 'shebeen'}, {'id': 14016, 'synset': 'weissbier.n.01', 'name': 'Weissbier'}, {'id': 14017, 'synset': 'weizenbock.n.01', 'name': 'Weizenbock'}, {'id': 14018, 'synset': 'malt.n.03', 'name': 'malt'}, {'id': 14019, 'synset': 'wort.n.02', 'name': 'wort'}, {'id': 14020, 'synset': 'malt.n.02', 'name': 'malt'}, {'id': 14021, 'synset': 'ale.n.01', 'name': 'ale'}, {'id': 14022, 'synset': 'bitter.n.01', 'name': 'bitter'}, {'id': 14023, 'synset': 'burton.n.03', 'name': 'Burton'}, {'id': 14024, 'synset': 'pale_ale.n.01', 'name': 'pale_ale'}, {'id': 14025, 'synset': 'porter.n.07', 'name': 'porter'}, {'id': 14026, 'synset': 'stout.n.01', 'name': 'stout'}, {'id': 14027, 'synset': 'guinness.n.02', 'name': 'Guinness'}, {'id': 14028, 'synset': 'kvass.n.01', 'name': 'kvass'}, {'id': 14029, 'synset': 'mead.n.03', 'name': 'mead'}, {'id': 14030, 'synset': 'metheglin.n.01', 'name': 'metheglin'}, {'id': 14031, 'synset': 'hydromel.n.01', 'name': 'hydromel'}, {'id': 14032, 'synset': 'oenomel.n.01', 'name': 'oenomel'}, {'id': 14033, 'synset': 'near_beer.n.01', 'name': 'near_beer'}, {'id': 14034, 'synset': 'ginger_beer.n.01', 'name': 'ginger_beer'}, {'id': 14035, 'synset': 'sake.n.02', 'name': 'sake'}, {'id': 14036, 'synset': 'wine.n.01', 'name': 'wine'}, {'id': 14037, 'synset': 'vintage.n.01', 'name': 'vintage'}, {'id': 14038, 'synset': 'red_wine.n.01', 'name': 'red_wine'}, {'id': 14039, 'synset': 'white_wine.n.01', 'name': 'white_wine'}, {'id': 14040, 'synset': 'blush_wine.n.01', 'name': 'blush_wine'}, {'id': 14041, 'synset': 'altar_wine.n.01', 'name': 'altar_wine'}, {'id': 14042, 'synset': 'sparkling_wine.n.01', 'name': 'sparkling_wine'}, {'id': 14043, 'synset': 'champagne.n.01', 'name': 'champagne'}, {'id': 14044, 'synset': 'cold_duck.n.01', 'name': 'cold_duck'}, {'id': 14045, 'synset': 'burgundy.n.02', 'name': 'Burgundy'}, {'id': 14046, 'synset': 'beaujolais.n.01', 'name': 'Beaujolais'}, {'id': 14047, 'synset': 'medoc.n.01', 'name': 'Medoc'}, {'id': 14048, 'synset': 'canary_wine.n.01', 'name': 'Canary_wine'}, {'id': 14049, 'synset': 'chablis.n.02', 'name': 'Chablis'}, {'id': 14050, 'synset': 'montrachet.n.01', 'name': 'Montrachet'}, {'id': 14051, 'synset': 'chardonnay.n.02', 'name': 'Chardonnay'}, {'id': 14052, 'synset': 'pinot_noir.n.02', 'name': 'Pinot_noir'}, {'id': 14053, 'synset': 'pinot_blanc.n.02', 'name': 'Pinot_blanc'}, {'id': 14054, 'synset': 'bordeaux.n.02', 'name': 'Bordeaux'}, {'id': 14055, 'synset': 'claret.n.02', 'name': 'claret'}, {'id': 14056, 'synset': 'chianti.n.01', 'name': 'Chianti'}, {'id': 14057, 'synset': 'cabernet.n.01', 'name': 'Cabernet'}, {'id': 14058, 'synset': 'merlot.n.02', 'name': 'Merlot'}, {'id': 14059, 'synset': 'sauvignon_blanc.n.02', 'name': 'Sauvignon_blanc'}, {'id': 14060, 'synset': 'california_wine.n.01', 'name': 'California_wine'}, {'id': 14061, 'synset': 'cotes_de_provence.n.01', 'name': 'Cotes_de_Provence'}, {'id': 14062, 'synset': 'dessert_wine.n.01', 'name': 'dessert_wine'}, {'id': 14063, 'synset': 'dubonnet.n.01', 'name': 'Dubonnet'}, {'id': 14064, 'synset': 'jug_wine.n.01', 'name': 'jug_wine'}, {'id': 14065, 'synset': 'macon.n.02', 'name': 'macon'}, {'id': 14066, 'synset': 'moselle.n.01', 'name': 'Moselle'}, {'id': 14067, 'synset': 'muscadet.n.02', 'name': 'Muscadet'}, {'id': 14068, 'synset': 'plonk.n.01', 'name': 'plonk'}, {'id': 14069, 'synset': 'retsina.n.01', 'name': 'retsina'}, {'id': 14070, 'synset': 'rhine_wine.n.01', 'name': 'Rhine_wine'}, {'id': 14071, 'synset': 'riesling.n.02', 'name': 'Riesling'}, {'id': 14072, 'synset': 'liebfraumilch.n.01', 'name': 'liebfraumilch'}, {'id': 14073, 'synset': 'rhone_wine.n.01', 'name': 'Rhone_wine'}, {'id': 14074, 'synset': 'rioja.n.01', 'name': 'Rioja'}, {'id': 14075, 'synset': 'sack.n.04', 'name': 'sack'}, {'id': 14076, 'synset': 'saint_emilion.n.01', 'name': 'Saint_Emilion'}, {'id': 14077, 'synset': 'soave.n.01', 'name': 'Soave'}, {'id': 14078, 'synset': 'zinfandel.n.02', 'name': 'zinfandel'}, {'id': 14079, 'synset': 'sauterne.n.01', 'name': 'Sauterne'}, {'id': 14080, 'synset': 'straw_wine.n.01', 'name': 'straw_wine'}, {'id': 14081, 'synset': 'table_wine.n.01', 'name': 'table_wine'}, {'id': 14082, 'synset': 'tokay.n.01', 'name': 'Tokay'}, {'id': 14083, 'synset': 'vin_ordinaire.n.01', 'name': 'vin_ordinaire'}, {'id': 14084, 'synset': 'vermouth.n.01', 'name': 'vermouth'}, {'id': 14085, 'synset': 'sweet_vermouth.n.01', 'name': 'sweet_vermouth'}, {'id': 14086, 'synset': 'dry_vermouth.n.01', 'name': 'dry_vermouth'}, {'id': 14087, 'synset': 'chenin_blanc.n.02', 'name': 'Chenin_blanc'}, {'id': 14088, 'synset': 'verdicchio.n.02', 'name': 'Verdicchio'}, {'id': 14089, 'synset': 'vouvray.n.01', 'name': 'Vouvray'}, {'id': 14090, 'synset': 'yquem.n.01', 'name': 'Yquem'}, {'id': 14091, 'synset': 'generic.n.01', 'name': 'generic'}, {'id': 14092, 'synset': 'varietal.n.01', 'name': 'varietal'}, {'id': 14093, 'synset': 'fortified_wine.n.01', 'name': 'fortified_wine'}, {'id': 14094, 'synset': 'madeira.n.03', 'name': 'Madeira'}, {'id': 14095, 'synset': 'malmsey.n.01', 'name': 'malmsey'}, {'id': 14096, 'synset': 'port.n.02', 'name': 'port'}, {'id': 14097, 'synset': 'sherry.n.01', 'name': 'sherry'}, {'id': 14098, 'synset': 'marsala.n.01', 'name': 'Marsala'}, {'id': 14099, 'synset': 'muscat.n.03', 'name': 'muscat'}, {'id': 14100, 'synset': 'neutral_spirits.n.01', 'name': 'neutral_spirits'}, {'id': 14101, 'synset': 'aqua_vitae.n.01', 'name': 'aqua_vitae'}, {'id': 14102, 'synset': 'eau_de_vie.n.01', 'name': 'eau_de_vie'}, {'id': 14103, 'synset': 'moonshine.n.02', 'name': 'moonshine'}, {'id': 14104, 'synset': 'bathtub_gin.n.01', 'name': 'bathtub_gin'}, {'id': 14105, 'synset': 'aquavit.n.01', 'name': 'aquavit'}, {'id': 14106, 'synset': 'arrack.n.01', 'name': 'arrack'}, {'id': 14107, 'synset': 'bitters.n.01', 'name': 'bitters'}, {'id': 14108, 'synset': 'brandy.n.01', 'name': 'brandy'}, {'id': 14109, 'synset': 'applejack.n.01', 'name': 'applejack'}, {'id': 14110, 'synset': 'calvados.n.01', 'name': 'Calvados'}, {'id': 14111, 'synset': 'armagnac.n.01', 'name': 'Armagnac'}, {'id': 14112, 'synset': 'cognac.n.01', 'name': 'Cognac'}, {'id': 14113, 'synset': 'grappa.n.01', 'name': 'grappa'}, {'id': 14114, 'synset': 'kirsch.n.01', 'name': 'kirsch'}, {'id': 14115, 'synset': 'slivovitz.n.01', 'name': 'slivovitz'}, {'id': 14116, 'synset': 'gin.n.01', 'name': 'gin'}, {'id': 14117, 'synset': 'sloe_gin.n.01', 'name': 'sloe_gin'}, {'id': 14118, 'synset': 'geneva.n.02', 'name': 'geneva'}, {'id': 14119, 'synset': 'grog.n.01', 'name': 'grog'}, {'id': 14120, 'synset': 'ouzo.n.01', 'name': 'ouzo'}, {'id': 14121, 'synset': 'rum.n.01', 'name': 'rum'}, {'id': 14122, 'synset': 'demerara.n.04', 'name': 'demerara'}, {'id': 14123, 'synset': 'jamaica_rum.n.01', 'name': 'Jamaica_rum'}, {'id': 14124, 'synset': 'schnapps.n.01', 'name': 'schnapps'}, {'id': 14125, 'synset': 'pulque.n.01', 'name': 'pulque'}, {'id': 14126, 'synset': 'mescal.n.02', 'name': 'mescal'}, {'id': 14127, 'synset': 'whiskey.n.01', 'name': 'whiskey'}, {'id': 14128, 'synset': 'blended_whiskey.n.01', 'name': 'blended_whiskey'}, {'id': 14129, 'synset': 'bourbon.n.02', 'name': 'bourbon'}, {'id': 14130, 'synset': 'corn_whiskey.n.01', 'name': 'corn_whiskey'}, {'id': 14131, 'synset': 'firewater.n.01', 'name': 'firewater'}, {'id': 14132, 'synset': 'irish.n.02', 'name': 'Irish'}, {'id': 14133, 'synset': 'poteen.n.01', 'name': 'poteen'}, {'id': 14134, 'synset': 'rye.n.03', 'name': 'rye'}, {'id': 14135, 'synset': 'scotch.n.02', 'name': 'Scotch'}, {'id': 14136, 'synset': 'sour_mash.n.02', 'name': 'sour_mash'}, {'id': 14137, 'synset': 'liqueur.n.01', 'name': 'liqueur'}, {'id': 14138, 'synset': 'absinth.n.01', 'name': 'absinth'}, {'id': 14139, 'synset': 'amaretto.n.01', 'name': 'amaretto'}, {'id': 14140, 'synset': 'anisette.n.01', 'name': 'anisette'}, {'id': 14141, 'synset': 'benedictine.n.02', 'name': 'benedictine'}, {'id': 14142, 'synset': 'chartreuse.n.01', 'name': 'Chartreuse'}, {'id': 14143, 'synset': 'coffee_liqueur.n.01', 'name': 'coffee_liqueur'}, {'id': 14144, 'synset': 'creme_de_cacao.n.01', 'name': 'creme_de_cacao'}, {'id': 14145, 'synset': 'creme_de_menthe.n.01', 'name': 'creme_de_menthe'}, {'id': 14146, 'synset': 'creme_de_fraise.n.01', 'name': 'creme_de_fraise'}, {'id': 14147, 'synset': 'drambuie.n.01', 'name': 'Drambuie'}, {'id': 14148, 'synset': 'galliano.n.01', 'name': 'Galliano'}, {'id': 14149, 'synset': 'orange_liqueur.n.01', 'name': 'orange_liqueur'}, {'id': 14150, 'synset': 'curacao.n.02', 'name': 'curacao'}, {'id': 14151, 'synset': 'triple_sec.n.01', 'name': 'triple_sec'}, {'id': 14152, 'synset': 'grand_marnier.n.01', 'name': 'Grand_Marnier'}, {'id': 14153, 'synset': 'kummel.n.01', 'name': 'kummel'}, {'id': 14154, 'synset': 'maraschino.n.01', 'name': 'maraschino'}, {'id': 14155, 'synset': 'pastis.n.01', 'name': 'pastis'}, {'id': 14156, 'synset': 'pernod.n.01', 'name': 'Pernod'}, {'id': 14157, 'synset': 'pousse-cafe.n.01', 'name': 'pousse-cafe'}, {'id': 14158, 'synset': 'kahlua.n.01', 'name': 'Kahlua'}, {'id': 14159, 'synset': 'ratafia.n.01', 'name': 'ratafia'}, {'id': 14160, 'synset': 'sambuca.n.01', 'name': 'sambuca'}, {'id': 14161, 'synset': 'mixed_drink.n.01', 'name': 'mixed_drink'}, {'id': 14162, 'synset': 'cocktail.n.01', 'name': 'cocktail'}, {'id': 14163, 'synset': 'dom_pedro.n.01', 'name': 'Dom_Pedro'}, {'id': 14164, 'synset': 'highball.n.01', 'name': 'highball'}, {'id': 14165, 'synset': 'mixer.n.02', 'name': 'mixer'}, {'id': 14166, 'synset': 'bishop.n.02', 'name': 'bishop'}, {'id': 14167, 'synset': 'bloody_mary.n.02', 'name': 'Bloody_Mary'}, {'id': 14168, 'synset': 'virgin_mary.n.02', 'name': 'Virgin_Mary'}, {'id': 14169, 'synset': 'bullshot.n.01', 'name': 'bullshot'}, {'id': 14170, 'synset': 'cobbler.n.02', 'name': 'cobbler'}, {'id': 14171, 'synset': 'collins.n.02', 'name': 'collins'}, {'id': 14172, 'synset': 'cooler.n.02', 'name': 'cooler'}, {'id': 14173, 'synset': 'refresher.n.02', 'name': 'refresher'}, {'id': 14174, 'synset': 'daiquiri.n.01', 'name': 'daiquiri'}, {'id': 14175, 'synset': 'strawberry_daiquiri.n.01', 'name': 'strawberry_daiquiri'}, {'id': 14176, 'synset': 'nada_daiquiri.n.01', 'name': 'NADA_daiquiri'}, {'id': 14177, 'synset': 'spritzer.n.01', 'name': 'spritzer'}, {'id': 14178, 'synset': 'flip.n.02', 'name': 'flip'}, {'id': 14179, 'synset': 'gimlet.n.01', 'name': 'gimlet'}, {'id': 14180, 'synset': 'gin_and_tonic.n.01', 'name': 'gin_and_tonic'}, {'id': 14181, 'synset': 'grasshopper.n.02', 'name': 'grasshopper'}, {'id': 14182, 'synset': 'harvey_wallbanger.n.01', 'name': 'Harvey_Wallbanger'}, {'id': 14183, 'synset': 'julep.n.01', 'name': 'julep'}, {'id': 14184, 'synset': 'manhattan.n.02', 'name': 'manhattan'}, {'id': 14185, 'synset': 'rob_roy.n.02', 'name': 'Rob_Roy'}, {'id': 14186, 'synset': 'margarita.n.01', 'name': 'margarita'}, {'id': 14187, 'synset': 'gin_and_it.n.01', 'name': 'gin_and_it'}, {'id': 14188, 'synset': 'vodka_martini.n.01', 'name': 'vodka_martini'}, {'id': 14189, 'synset': 'old_fashioned.n.01', 'name': 'old_fashioned'}, {'id': 14190, 'synset': 'pink_lady.n.01', 'name': 'pink_lady'}, {'id': 14191, 'synset': 'sazerac.n.01', 'name': 'Sazerac'}, {'id': 14192, 'synset': 'screwdriver.n.02', 'name': 'screwdriver'}, {'id': 14193, 'synset': 'sidecar.n.01', 'name': 'sidecar'}, {'id': 14194, 'synset': 'scotch_and_soda.n.01', 'name': 'Scotch_and_soda'}, {'id': 14195, 'synset': 'sling.n.01', 'name': 'sling'}, {'id': 14196, 'synset': 'brandy_sling.n.01', 'name': 'brandy_sling'}, {'id': 14197, 'synset': 'gin_sling.n.01', 'name': 'gin_sling'}, {'id': 14198, 'synset': 'rum_sling.n.01', 'name': 'rum_sling'}, {'id': 14199, 'synset': 'sour.n.01', 'name': 'sour'}, {'id': 14200, 'synset': 'whiskey_sour.n.01', 'name': 'whiskey_sour'}, {'id': 14201, 'synset': 'stinger.n.01', 'name': 'stinger'}, {'id': 14202, 'synset': 'swizzle.n.01', 'name': 'swizzle'}, {'id': 14203, 'synset': 'hot_toddy.n.01', 'name': 'hot_toddy'}, {'id': 14204, 'synset': 'zombie.n.05', 'name': 'zombie'}, {'id': 14205, 'synset': 'fizz.n.01', 'name': 'fizz'}, {'id': 14206, 'synset': 'irish_coffee.n.01', 'name': 'Irish_coffee'}, {'id': 14207, 'synset': 'cafe_au_lait.n.01', 'name': 'cafe_au_lait'}, {'id': 14208, 'synset': 'cafe_noir.n.01', 'name': 'cafe_noir'}, {'id': 14209, 'synset': 'decaffeinated_coffee.n.01', 'name': 'decaffeinated_coffee'}, {'id': 14210, 'synset': 'drip_coffee.n.01', 'name': 'drip_coffee'}, {'id': 14211, 'synset': 'espresso.n.01', 'name': 'espresso'}, {'id': 14212, 'synset': 'caffe_latte.n.01', 'name': 'caffe_latte'}, {'id': 14213, 'synset': 'iced_coffee.n.01', 'name': 'iced_coffee'}, {'id': 14214, 'synset': 'instant_coffee.n.01', 'name': 'instant_coffee'}, {'id': 14215, 'synset': 'mocha.n.03', 'name': 'mocha'}, {'id': 14216, 'synset': 'mocha.n.02', 'name': 'mocha'}, {'id': 14217, 'synset': 'cassareep.n.01', 'name': 'cassareep'}, {'id': 14218, 'synset': 'turkish_coffee.n.01', 'name': 'Turkish_coffee'}, {'id': 14219, 'synset': 'hard_cider.n.01', 'name': 'hard_cider'}, {'id': 14220, 'synset': 'scrumpy.n.01', 'name': 'scrumpy'}, {'id': 14221, 'synset': 'sweet_cider.n.01', 'name': 'sweet_cider'}, {'id': 14222, 'synset': 'mulled_cider.n.01', 'name': 'mulled_cider'}, {'id': 14223, 'synset': 'perry.n.04', 'name': 'perry'}, {'id': 14224, 'synset': 'rotgut.n.01', 'name': 'rotgut'}, {'id': 14225, 'synset': 'slug.n.05', 'name': 'slug'}, {'id': 14226, 'synset': 'criollo.n.02', 'name': 'criollo'}, {'id': 14227, 'synset': 'juice.n.01', 'name': 'juice'}, {'id': 14228, 'synset': 'nectar.n.02', 'name': 'nectar'}, {'id': 14229, 'synset': 'apple_juice.n.01', 'name': 'apple_juice'}, {'id': 14230, 'synset': 'cranberry_juice.n.01', 'name': 'cranberry_juice'}, {'id': 14231, 'synset': 'grape_juice.n.01', 'name': 'grape_juice'}, {'id': 14232, 'synset': 'must.n.02', 'name': 'must'}, {'id': 14233, 'synset': 'grapefruit_juice.n.01', 'name': 'grapefruit_juice'}, {'id': 14234, 'synset': 'frozen_orange_juice.n.01', 'name': 'frozen_orange_juice'}, {'id': 14235, 'synset': 'pineapple_juice.n.01', 'name': 'pineapple_juice'}, {'id': 14236, 'synset': 'lemon_juice.n.01', 'name': 'lemon_juice'}, {'id': 14237, 'synset': 'lime_juice.n.01', 'name': 'lime_juice'}, {'id': 14238, 'synset': 'papaya_juice.n.01', 'name': 'papaya_juice'}, {'id': 14239, 'synset': 'tomato_juice.n.01', 'name': 'tomato_juice'}, {'id': 14240, 'synset': 'carrot_juice.n.01', 'name': 'carrot_juice'}, {'id': 14241, 'synset': 'v-8_juice.n.01', 'name': 'V-8_juice'}, {'id': 14242, 'synset': 'koumiss.n.01', 'name': 'koumiss'}, {'id': 14243, 'synset': 'fruit_drink.n.01', 'name': 'fruit_drink'}, {'id': 14244, 'synset': 'limeade.n.01', 'name': 'limeade'}, {'id': 14245, 'synset': 'orangeade.n.01', 'name': 'orangeade'}, {'id': 14246, 'synset': 'malted_milk.n.02', 'name': 'malted_milk'}, {'id': 14247, 'synset': 'mate.n.09', 'name': 'mate'}, {'id': 14248, 'synset': 'mulled_wine.n.01', 'name': 'mulled_wine'}, {'id': 14249, 'synset': 'negus.n.01', 'name': 'negus'}, {'id': 14250, 'synset': 'soft_drink.n.01', 'name': 'soft_drink'}, {'id': 14251, 'synset': 'birch_beer.n.01', 'name': 'birch_beer'}, {'id': 14252, 'synset': 'bitter_lemon.n.01', 'name': 'bitter_lemon'}, {'id': 14253, 'synset': 'cola.n.02', 'name': 'cola'}, {'id': 14254, 'synset': 'cream_soda.n.01', 'name': 'cream_soda'}, {'id': 14255, 'synset': 'egg_cream.n.01', 'name': 'egg_cream'}, {'id': 14256, 'synset': 'ginger_ale.n.01', 'name': 'ginger_ale'}, {'id': 14257, 'synset': 'orange_soda.n.01', 'name': 'orange_soda'}, {'id': 14258, 'synset': 'phosphate.n.02', 'name': 'phosphate'}, {'id': 14259, 'synset': 'coca_cola.n.01', 'name': 'Coca_Cola'}, {'id': 14260, 'synset': 'pepsi.n.01', 'name': 'Pepsi'}, {'id': 14261, 'synset': 'sarsaparilla.n.02', 'name': 'sarsaparilla'}, {'id': 14262, 'synset': 'tonic.n.01', 'name': 'tonic'}, {'id': 14263, 'synset': 'coffee_bean.n.01', 'name': 'coffee_bean'}, {'id': 14264, 'synset': 'coffee.n.01', 'name': 'coffee'}, {'id': 14265, 'synset': 'cafe_royale.n.01', 'name': 'cafe_royale'}, {'id': 14266, 'synset': 'fruit_punch.n.01', 'name': 'fruit_punch'}, {'id': 14267, 'synset': 'milk_punch.n.01', 'name': 'milk_punch'}, {'id': 14268, 'synset': 'mimosa.n.03', 'name': 'mimosa'}, {'id': 14269, 'synset': 'pina_colada.n.01', 'name': 'pina_colada'}, {'id': 14270, 'synset': 'punch.n.02', 'name': 'punch'}, {'id': 14271, 'synset': 'cup.n.06', 'name': 'cup'}, {'id': 14272, 'synset': 'champagne_cup.n.01', 'name': 'champagne_cup'}, {'id': 14273, 'synset': 'claret_cup.n.01', 'name': 'claret_cup'}, {'id': 14274, 'synset': 'wassail.n.01', 'name': 'wassail'}, {'id': 14275, 'synset': "planter's_punch.n.01", 'name': "planter's_punch"}, {'id': 14276, 'synset': 'white_russian.n.02', 'name': 'White_Russian'}, {'id': 14277, 'synset': 'fish_house_punch.n.01', 'name': 'fish_house_punch'}, {'id': 14278, 'synset': 'may_wine.n.01', 'name': 'May_wine'}, {'id': 14279, 'synset': 'eggnog.n.01', 'name': 'eggnog'}, {'id': 14280, 'synset': 'cassiri.n.01', 'name': 'cassiri'}, {'id': 14281, 'synset': 'spruce_beer.n.01', 'name': 'spruce_beer'}, {'id': 14282, 'synset': 'rickey.n.01', 'name': 'rickey'}, {'id': 14283, 'synset': 'gin_rickey.n.01', 'name': 'gin_rickey'}, {'id': 14284, 'synset': 'tea.n.05', 'name': 'tea'}, {'id': 14285, 'synset': 'tea.n.01', 'name': 'tea'}, {'id': 14286, 'synset': 'tea-like_drink.n.01', 'name': 'tea-like_drink'}, {'id': 14287, 'synset': 'cambric_tea.n.01', 'name': 'cambric_tea'}, {'id': 14288, 'synset': 'cuppa.n.01', 'name': 'cuppa'}, {'id': 14289, 'synset': 'herb_tea.n.01', 'name': 'herb_tea'}, {'id': 14290, 'synset': 'tisane.n.01', 'name': 'tisane'}, {'id': 14291, 'synset': 'camomile_tea.n.01', 'name': 'camomile_tea'}, {'id': 14292, 'synset': 'ice_tea.n.01', 'name': 'ice_tea'}, {'id': 14293, 'synset': 'sun_tea.n.01', 'name': 'sun_tea'}, {'id': 14294, 'synset': 'black_tea.n.01', 'name': 'black_tea'}, {'id': 14295, 'synset': 'congou.n.01', 'name': 'congou'}, {'id': 14296, 'synset': 'darjeeling.n.01', 'name': 'Darjeeling'}, {'id': 14297, 'synset': 'orange_pekoe.n.01', 'name': 'orange_pekoe'}, {'id': 14298, 'synset': 'souchong.n.01', 'name': 'souchong'}, {'id': 14299, 'synset': 'green_tea.n.01', 'name': 'green_tea'}, {'id': 14300, 'synset': 'hyson.n.01', 'name': 'hyson'}, {'id': 14301, 'synset': 'oolong.n.01', 'name': 'oolong'}, {'id': 14302, 'synset': 'water.n.06', 'name': 'water'}, {'id': 14303, 'synset': 'bottled_water.n.01', 'name': 'bottled_water'}, {'id': 14304, 'synset': 'branch_water.n.01', 'name': 'branch_water'}, {'id': 14305, 'synset': 'spring_water.n.02', 'name': 'spring_water'}, {'id': 14306, 'synset': 'sugar_water.n.01', 'name': 'sugar_water'}, {'id': 14307, 'synset': 'drinking_water.n.01', 'name': 'drinking_water'}, {'id': 14308, 'synset': 'ice_water.n.01', 'name': 'ice_water'}, {'id': 14309, 'synset': 'soda_water.n.01', 'name': 'soda_water'}, {'id': 14310, 'synset': 'mineral_water.n.01', 'name': 'mineral_water'}, {'id': 14311, 'synset': 'seltzer.n.01', 'name': 'seltzer'}, {'id': 14312, 'synset': 'vichy_water.n.01', 'name': 'Vichy_water'}, {'id': 14313, 'synset': 'perishable.n.01', 'name': 'perishable'}, {'id': 14314, 'synset': 'couscous.n.01', 'name': 'couscous'}, {'id': 14315, 'synset': 'ramekin.n.01', 'name': 'ramekin'}, {'id': 14316, 'synset': 'multivitamin.n.01', 'name': 'multivitamin'}, {'id': 14317, 'synset': 'vitamin_pill.n.01', 'name': 'vitamin_pill'}, {'id': 14318, 'synset': 'soul_food.n.01', 'name': 'soul_food'}, {'id': 14319, 'synset': 'mold.n.06', 'name': 'mold'}, {'id': 14320, 'synset': 'people.n.01', 'name': 'people'}, {'id': 14321, 'synset': 'collection.n.01', 'name': 'collection'}, {'id': 14322, 'synset': 'book.n.07', 'name': 'book'}, {'id': 14323, 'synset': 'library.n.02', 'name': 'library'}, {'id': 14324, 'synset': 'baseball_club.n.01', 'name': 'baseball_club'}, {'id': 14325, 'synset': 'crowd.n.01', 'name': 'crowd'}, {'id': 14326, 'synset': 'class.n.02', 'name': 'class'}, {'id': 14327, 'synset': 'core.n.01', 'name': 'core'}, {'id': 14328, 'synset': 'concert_band.n.01', 'name': 'concert_band'}, {'id': 14329, 'synset': 'dance.n.02', 'name': 'dance'}, {'id': 14330, 'synset': 'wedding.n.03', 'name': 'wedding'}, {'id': 14331, 'synset': 'chain.n.01', 'name': 'chain'}, {'id': 14332, 'synset': 'power_breakfast.n.01', 'name': 'power_breakfast'}, {'id': 14333, 'synset': 'aerie.n.02', 'name': 'aerie'}, {'id': 14334, 'synset': 'agora.n.02', 'name': 'agora'}, {'id': 14335, 'synset': 'amusement_park.n.01', 'name': 'amusement_park'}, {'id': 14336, 'synset': 'aphelion.n.01', 'name': 'aphelion'}, {'id': 14337, 'synset': 'apron.n.02', 'name': 'apron'}, {'id': 14338, 'synset': 'interplanetary_space.n.01', 'name': 'interplanetary_space'}, {'id': 14339, 'synset': 'interstellar_space.n.01', 'name': 'interstellar_space'}, {'id': 14340, 'synset': 'intergalactic_space.n.01', 'name': 'intergalactic_space'}, {'id': 14341, 'synset': 'bush.n.02', 'name': 'bush'}, {'id': 14342, 'synset': 'semidesert.n.01', 'name': 'semidesert'}, {'id': 14343, 'synset': 'beam-ends.n.01', 'name': 'beam-ends'}, {'id': 14344, 'synset': 'bridgehead.n.02', 'name': 'bridgehead'}, {'id': 14345, 'synset': 'bus_stop.n.01', 'name': 'bus_stop'}, {'id': 14346, 'synset': 'campsite.n.01', 'name': 'campsite'}, {'id': 14347, 'synset': 'detention_basin.n.01', 'name': 'detention_basin'}, {'id': 14348, 'synset': 'cemetery.n.01', 'name': 'cemetery'}, {'id': 14349, 'synset': 'trichion.n.01', 'name': 'trichion'}, {'id': 14350, 'synset': 'city.n.01', 'name': 'city'}, {'id': 14351, 'synset': 'business_district.n.01', 'name': 'business_district'}, {'id': 14352, 'synset': 'outskirts.n.01', 'name': 'outskirts'}, {'id': 14353, 'synset': 'borough.n.01', 'name': 'borough'}, {'id': 14354, 'synset': 'cow_pasture.n.01', 'name': 'cow_pasture'}, {'id': 14355, 'synset': 'crest.n.01', 'name': 'crest'}, {'id': 14356, 'synset': 'eparchy.n.02', 'name': 'eparchy'}, {'id': 14357, 'synset': 'suburb.n.01', 'name': 'suburb'}, {'id': 14358, 'synset': 'stockbroker_belt.n.01', 'name': 'stockbroker_belt'}, {'id': 14359, 'synset': 'crawlspace.n.01', 'name': 'crawlspace'}, {'id': 14360, 'synset': 'sheikdom.n.01', 'name': 'sheikdom'}, {'id': 14361, 'synset': 'residence.n.01', 'name': 'residence'}, {'id': 14362, 'synset': 'domicile.n.01', 'name': 'domicile'}, {'id': 14363, 'synset': 'dude_ranch.n.01', 'name': 'dude_ranch'}, {'id': 14364, 'synset': 'farmland.n.01', 'name': 'farmland'}, {'id': 14365, 'synset': 'midfield.n.01', 'name': 'midfield'}, {'id': 14366, 'synset': 'firebreak.n.01', 'name': 'firebreak'}, {'id': 14367, 'synset': 'flea_market.n.01', 'name': 'flea_market'}, {'id': 14368, 'synset': 'battlefront.n.01', 'name': 'battlefront'}, {'id': 14369, 'synset': 'garbage_heap.n.01', 'name': 'garbage_heap'}, {'id': 14370, 'synset': 'benthos.n.01', 'name': 'benthos'}, {'id': 14371, 'synset': 'goldfield.n.01', 'name': 'goldfield'}, {'id': 14372, 'synset': 'grainfield.n.01', 'name': 'grainfield'}, {'id': 14373, 'synset': 'half-mast.n.01', 'name': 'half-mast'}, {'id': 14374, 'synset': 'hemline.n.01', 'name': 'hemline'}, {'id': 14375, 'synset': 'heronry.n.01', 'name': 'heronry'}, {'id': 14376, 'synset': 'hipline.n.02', 'name': 'hipline'}, {'id': 14377, 'synset': 'hipline.n.01', 'name': 'hipline'}, {'id': 14378, 'synset': 'hole-in-the-wall.n.01', 'name': 'hole-in-the-wall'}, {'id': 14379, 'synset': 'junkyard.n.01', 'name': 'junkyard'}, {'id': 14380, 'synset': 'isoclinic_line.n.01', 'name': 'isoclinic_line'}, {'id': 14381, 'synset': 'littoral.n.01', 'name': 'littoral'}, {'id': 14382, 'synset': 'magnetic_pole.n.01', 'name': 'magnetic_pole'}, {'id': 14383, 'synset': 'grassland.n.01', 'name': 'grassland'}, {'id': 14384, 'synset': 'mecca.n.02', 'name': 'mecca'}, {'id': 14385, 'synset': "observer's_meridian.n.01", 'name': "observer's_meridian"}, {'id': 14386, 'synset': 'prime_meridian.n.01', 'name': 'prime_meridian'}, {'id': 14387, 'synset': 'nombril.n.01', 'name': 'nombril'}, {'id': 14388, 'synset': 'no-parking_zone.n.01', 'name': 'no-parking_zone'}, {'id': 14389, 'synset': 'outdoors.n.01', 'name': 'outdoors'}, {'id': 14390, 'synset': 'fairground.n.01', 'name': 'fairground'}, {'id': 14391, 'synset': 'pasture.n.01', 'name': 'pasture'}, {'id': 14392, 'synset': 'perihelion.n.01', 'name': 'perihelion'}, {'id': 14393, 'synset': 'periselene.n.01', 'name': 'periselene'}, {'id': 14394, 'synset': 'locus_of_infection.n.01', 'name': 'locus_of_infection'}, {'id': 14395, 'synset': 'kasbah.n.01', 'name': 'kasbah'}, {'id': 14396, 'synset': 'waterfront.n.01', 'name': 'waterfront'}, {'id': 14397, 'synset': 'resort.n.01', 'name': 'resort'}, {'id': 14398, 'synset': 'resort_area.n.01', 'name': 'resort_area'}, {'id': 14399, 'synset': 'rough.n.01', 'name': 'rough'}, {'id': 14400, 'synset': 'ashram.n.02', 'name': 'ashram'}, {'id': 14401, 'synset': 'harborage.n.01', 'name': 'harborage'}, {'id': 14402, 'synset': 'scrubland.n.01', 'name': 'scrubland'}, {'id': 14403, 'synset': 'weald.n.01', 'name': 'weald'}, {'id': 14404, 'synset': 'wold.n.01', 'name': 'wold'}, {'id': 14405, 'synset': 'schoolyard.n.01', 'name': 'schoolyard'}, {'id': 14406, 'synset': 'showplace.n.01', 'name': 'showplace'}, {'id': 14407, 'synset': 'bedside.n.01', 'name': 'bedside'}, {'id': 14408, 'synset': 'sideline.n.01', 'name': 'sideline'}, {'id': 14409, 'synset': 'ski_resort.n.01', 'name': 'ski_resort'}, {'id': 14410, 'synset': 'soil_horizon.n.01', 'name': 'soil_horizon'}, {'id': 14411, 'synset': 'geological_horizon.n.01', 'name': 'geological_horizon'}, {'id': 14412, 'synset': 'coal_seam.n.01', 'name': 'coal_seam'}, {'id': 14413, 'synset': 'coalface.n.01', 'name': 'coalface'}, {'id': 14414, 'synset': 'field.n.14', 'name': 'field'}, {'id': 14415, 'synset': 'oilfield.n.01', 'name': 'oilfield'}, {'id': 14416, 'synset': 'temperate_zone.n.01', 'name': 'Temperate_Zone'}, {'id': 14417, 'synset': 'terreplein.n.01', 'name': 'terreplein'}, {'id': 14418, 'synset': 'three-mile_limit.n.01', 'name': 'three-mile_limit'}, {'id': 14419, 'synset': 'desktop.n.01', 'name': 'desktop'}, {'id': 14420, 'synset': 'top.n.01', 'name': 'top'}, {'id': 14421, 'synset': 'kampong.n.01', 'name': 'kampong'}, {'id': 14422, 'synset': 'subtropics.n.01', 'name': 'subtropics'}, {'id': 14423, 'synset': 'barrio.n.02', 'name': 'barrio'}, {'id': 14424, 'synset': 'veld.n.01', 'name': 'veld'}, {'id': 14425, 'synset': 'vertex.n.02', 'name': 'vertex'}, {'id': 14426, 'synset': 'waterline.n.01', 'name': 'waterline'}, {'id': 14427, 'synset': 'high-water_mark.n.01', 'name': 'high-water_mark'}, {'id': 14428, 'synset': 'low-water_mark.n.02', 'name': 'low-water_mark'}, {'id': 14429, 'synset': 'continental_divide.n.01', 'name': 'continental_divide'}, {'id': 14430, 'synset': 'zodiac.n.01', 'name': 'zodiac'}, {'id': 14431, 'synset': 'aegean_island.n.01', 'name': 'Aegean_island'}, {'id': 14432, 'synset': 'sultanate.n.01', 'name': 'sultanate'}, {'id': 14433, 'synset': 'swiss_canton.n.01', 'name': 'Swiss_canton'}, {'id': 14434, 'synset': 'abyssal_zone.n.01', 'name': 'abyssal_zone'}, {'id': 14435, 'synset': 'aerie.n.01', 'name': 'aerie'}, {'id': 14436, 'synset': 'air_bubble.n.01', 'name': 'air_bubble'}, {'id': 14437, 'synset': 'alluvial_flat.n.01', 'name': 'alluvial_flat'}, {'id': 14438, 'synset': 'alp.n.01', 'name': 'alp'}, {'id': 14439, 'synset': 'alpine_glacier.n.01', 'name': 'Alpine_glacier'}, {'id': 14440, 'synset': 'anthill.n.01', 'name': 'anthill'}, {'id': 14441, 'synset': 'aquifer.n.01', 'name': 'aquifer'}, {'id': 14442, 'synset': 'archipelago.n.01', 'name': 'archipelago'}, {'id': 14443, 'synset': 'arete.n.01', 'name': 'arete'}, {'id': 14444, 'synset': 'arroyo.n.01', 'name': 'arroyo'}, {'id': 14445, 'synset': 'ascent.n.01', 'name': 'ascent'}, {'id': 14446, 'synset': 'asterism.n.02', 'name': 'asterism'}, {'id': 14447, 'synset': 'asthenosphere.n.01', 'name': 'asthenosphere'}, {'id': 14448, 'synset': 'atoll.n.01', 'name': 'atoll'}, {'id': 14449, 'synset': 'bank.n.03', 'name': 'bank'}, {'id': 14450, 'synset': 'bank.n.01', 'name': 'bank'}, {'id': 14451, 'synset': 'bar.n.08', 'name': 'bar'}, {'id': 14452, 'synset': 'barbecue_pit.n.01', 'name': 'barbecue_pit'}, {'id': 14453, 'synset': 'barrier_reef.n.01', 'name': 'barrier_reef'}, {'id': 14454, 'synset': 'baryon.n.01', 'name': 'baryon'}, {'id': 14455, 'synset': 'basin.n.03', 'name': 'basin'}, {'id': 14456, 'synset': 'beach.n.01', 'name': 'beach'}, {'id': 14457, 'synset': 'honeycomb.n.01', 'name': 'honeycomb'}, {'id': 14458, 'synset': 'belay.n.01', 'name': 'belay'}, {'id': 14459, 'synset': 'ben.n.01', 'name': 'ben'}, {'id': 14460, 'synset': 'berm.n.01', 'name': 'berm'}, {'id': 14461, 'synset': 'bladder_stone.n.01', 'name': 'bladder_stone'}, {'id': 14462, 'synset': 'bluff.n.01', 'name': 'bluff'}, {'id': 14463, 'synset': 'borrow_pit.n.01', 'name': 'borrow_pit'}, {'id': 14464, 'synset': 'brae.n.01', 'name': 'brae'}, {'id': 14465, 'synset': 'bubble.n.01', 'name': 'bubble'}, {'id': 14466, 'synset': 'burrow.n.01', 'name': 'burrow'}, {'id': 14467, 'synset': 'butte.n.01', 'name': 'butte'}, {'id': 14468, 'synset': 'caldera.n.01', 'name': 'caldera'}, {'id': 14469, 'synset': 'canyon.n.01', 'name': 'canyon'}, {'id': 14470, 'synset': 'canyonside.n.01', 'name': 'canyonside'}, {'id': 14471, 'synset': 'cave.n.01', 'name': 'cave'}, {'id': 14472, 'synset': 'cavern.n.02', 'name': 'cavern'}, {'id': 14473, 'synset': 'chasm.n.01', 'name': 'chasm'}, {'id': 14474, 'synset': 'cirque.n.01', 'name': 'cirque'}, {'id': 14475, 'synset': 'cliff.n.01', 'name': 'cliff'}, {'id': 14476, 'synset': 'cloud.n.02', 'name': 'cloud'}, {'id': 14477, 'synset': 'coast.n.02', 'name': 'coast'}, {'id': 14478, 'synset': 'coastland.n.01', 'name': 'coastland'}, {'id': 14479, 'synset': 'col.n.01', 'name': 'col'}, {'id': 14480, 'synset': 'collector.n.03', 'name': 'collector'}, {'id': 14481, 'synset': 'comet.n.01', 'name': 'comet'}, {'id': 14482, 'synset': 'continental_glacier.n.01', 'name': 'continental_glacier'}, {'id': 14483, 'synset': 'coral_reef.n.01', 'name': 'coral_reef'}, {'id': 14484, 'synset': 'cove.n.02', 'name': 'cove'}, {'id': 14485, 'synset': 'crag.n.01', 'name': 'crag'}, {'id': 14486, 'synset': 'crater.n.03', 'name': 'crater'}, {'id': 14487, 'synset': 'cultivated_land.n.01', 'name': 'cultivated_land'}, {'id': 14488, 'synset': 'dale.n.01', 'name': 'dale'}, {'id': 14489, 'synset': 'defile.n.01', 'name': 'defile'}, {'id': 14490, 'synset': 'delta.n.01', 'name': 'delta'}, {'id': 14491, 'synset': 'descent.n.05', 'name': 'descent'}, {'id': 14492, 'synset': 'diapir.n.01', 'name': 'diapir'}, {'id': 14493, 'synset': 'divot.n.02', 'name': 'divot'}, {'id': 14494, 'synset': 'divot.n.01', 'name': 'divot'}, {'id': 14495, 'synset': 'down.n.04', 'name': 'down'}, {'id': 14496, 'synset': 'downhill.n.01', 'name': 'downhill'}, {'id': 14497, 'synset': 'draw.n.01', 'name': 'draw'}, {'id': 14498, 'synset': 'drey.n.01', 'name': 'drey'}, {'id': 14499, 'synset': 'drumlin.n.01', 'name': 'drumlin'}, {'id': 14500, 'synset': 'dune.n.01', 'name': 'dune'}, {'id': 14501, 'synset': 'escarpment.n.01', 'name': 'escarpment'}, {'id': 14502, 'synset': 'esker.n.01', 'name': 'esker'}, {'id': 14503, 'synset': 'fireball.n.03', 'name': 'fireball'}, {'id': 14504, 'synset': 'flare_star.n.01', 'name': 'flare_star'}, {'id': 14505, 'synset': 'floor.n.04', 'name': 'floor'}, {'id': 14506, 'synset': 'fomite.n.01', 'name': 'fomite'}, {'id': 14507, 'synset': 'foothill.n.01', 'name': 'foothill'}, {'id': 14508, 'synset': 'footwall.n.01', 'name': 'footwall'}, {'id': 14509, 'synset': 'foreland.n.02', 'name': 'foreland'}, {'id': 14510, 'synset': 'foreshore.n.01', 'name': 'foreshore'}, {'id': 14511, 'synset': 'gauge_boson.n.01', 'name': 'gauge_boson'}, {'id': 14512, 'synset': 'geological_formation.n.01', 'name': 'geological_formation'}, {'id': 14513, 'synset': 'geyser.n.01', 'name': 'geyser'}, {'id': 14514, 'synset': 'glacier.n.01', 'name': 'glacier'}, {'id': 14515, 'synset': 'glen.n.01', 'name': 'glen'}, {'id': 14516, 'synset': 'gopher_hole.n.01', 'name': 'gopher_hole'}, {'id': 14517, 'synset': 'gorge.n.01', 'name': 'gorge'}, {'id': 14518, 'synset': 'grotto.n.01', 'name': 'grotto'}, {'id': 14519, 'synset': 'growler.n.02', 'name': 'growler'}, {'id': 14520, 'synset': 'gulch.n.01', 'name': 'gulch'}, {'id': 14521, 'synset': 'gully.n.01', 'name': 'gully'}, {'id': 14522, 'synset': 'hail.n.02', 'name': 'hail'}, {'id': 14523, 'synset': 'highland.n.01', 'name': 'highland'}, {'id': 14524, 'synset': 'hill.n.01', 'name': 'hill'}, {'id': 14525, 'synset': 'hillside.n.01', 'name': 'hillside'}, {'id': 14526, 'synset': 'hole.n.05', 'name': 'hole'}, {'id': 14527, 'synset': 'hollow.n.02', 'name': 'hollow'}, {'id': 14528, 'synset': 'hot_spring.n.01', 'name': 'hot_spring'}, {'id': 14529, 'synset': 'iceberg.n.01', 'name': 'iceberg'}, {'id': 14530, 'synset': 'icecap.n.01', 'name': 'icecap'}, {'id': 14531, 'synset': 'ice_field.n.01', 'name': 'ice_field'}, {'id': 14532, 'synset': 'ice_floe.n.01', 'name': 'ice_floe'}, {'id': 14533, 'synset': 'ice_mass.n.01', 'name': 'ice_mass'}, {'id': 14534, 'synset': 'inclined_fault.n.01', 'name': 'inclined_fault'}, {'id': 14535, 'synset': 'ion.n.01', 'name': 'ion'}, {'id': 14536, 'synset': 'isthmus.n.01', 'name': 'isthmus'}, {'id': 14537, 'synset': 'kidney_stone.n.01', 'name': 'kidney_stone'}, {'id': 14538, 'synset': 'knoll.n.01', 'name': 'knoll'}, {'id': 14539, 'synset': 'kopje.n.01', 'name': 'kopje'}, {'id': 14540, 'synset': 'kuiper_belt.n.01', 'name': 'Kuiper_belt'}, {'id': 14541, 'synset': 'lake_bed.n.01', 'name': 'lake_bed'}, {'id': 14542, 'synset': 'lakefront.n.01', 'name': 'lakefront'}, {'id': 14543, 'synset': 'lakeside.n.01', 'name': 'lakeside'}, {'id': 14544, 'synset': 'landfall.n.01', 'name': 'landfall'}, {'id': 14545, 'synset': 'landfill.n.01', 'name': 'landfill'}, {'id': 14546, 'synset': 'lather.n.04', 'name': 'lather'}, {'id': 14547, 'synset': 'leak.n.01', 'name': 'leak'}, {'id': 14548, 'synset': 'ledge.n.01', 'name': 'ledge'}, {'id': 14549, 'synset': 'lepton.n.02', 'name': 'lepton'}, {'id': 14550, 'synset': 'lithosphere.n.01', 'name': 'lithosphere'}, {'id': 14551, 'synset': 'lowland.n.01', 'name': 'lowland'}, {'id': 14552, 'synset': 'lunar_crater.n.01', 'name': 'lunar_crater'}, {'id': 14553, 'synset': 'maar.n.01', 'name': 'maar'}, {'id': 14554, 'synset': 'massif.n.01', 'name': 'massif'}, {'id': 14555, 'synset': 'meander.n.01', 'name': 'meander'}, {'id': 14556, 'synset': 'mesa.n.01', 'name': 'mesa'}, {'id': 14557, 'synset': 'meteorite.n.01', 'name': 'meteorite'}, {'id': 14558, 'synset': 'microfossil.n.01', 'name': 'microfossil'}, {'id': 14559, 'synset': 'midstream.n.01', 'name': 'midstream'}, {'id': 14560, 'synset': 'molehill.n.01', 'name': 'molehill'}, {'id': 14561, 'synset': 'monocline.n.01', 'name': 'monocline'}, {'id': 14562, 'synset': 'mountain.n.01', 'name': 'mountain'}, {'id': 14563, 'synset': 'mountainside.n.01', 'name': 'mountainside'}, {'id': 14564, 'synset': 'mouth.n.04', 'name': 'mouth'}, {'id': 14565, 'synset': 'mull.n.01', 'name': 'mull'}, {'id': 14566, 'synset': 'natural_depression.n.01', 'name': 'natural_depression'}, {'id': 14567, 'synset': 'natural_elevation.n.01', 'name': 'natural_elevation'}, {'id': 14568, 'synset': 'nullah.n.01', 'name': 'nullah'}, {'id': 14569, 'synset': 'ocean.n.01', 'name': 'ocean'}, {'id': 14570, 'synset': 'ocean_floor.n.01', 'name': 'ocean_floor'}, {'id': 14571, 'synset': 'oceanfront.n.01', 'name': 'oceanfront'}, {'id': 14572, 'synset': 'outcrop.n.01', 'name': 'outcrop'}, {'id': 14573, 'synset': 'oxbow.n.01', 'name': 'oxbow'}, {'id': 14574, 'synset': 'pallasite.n.01', 'name': 'pallasite'}, {'id': 14575, 'synset': 'perforation.n.02', 'name': 'perforation'}, {'id': 14576, 'synset': 'photosphere.n.01', 'name': 'photosphere'}, {'id': 14577, 'synset': 'piedmont.n.02', 'name': 'piedmont'}, {'id': 14578, 'synset': 'piedmont_glacier.n.01', 'name': 'Piedmont_glacier'}, {'id': 14579, 'synset': 'pinetum.n.01', 'name': 'pinetum'}, {'id': 14580, 'synset': 'plage.n.01', 'name': 'plage'}, {'id': 14581, 'synset': 'plain.n.01', 'name': 'plain'}, {'id': 14582, 'synset': 'point.n.11', 'name': 'point'}, {'id': 14583, 'synset': 'polar_glacier.n.01', 'name': 'polar_glacier'}, {'id': 14584, 'synset': 'pothole.n.01', 'name': 'pothole'}, {'id': 14585, 'synset': 'precipice.n.01', 'name': 'precipice'}, {'id': 14586, 'synset': 'promontory.n.01', 'name': 'promontory'}, {'id': 14587, 'synset': 'ptyalith.n.01', 'name': 'ptyalith'}, {'id': 14588, 'synset': 'pulsar.n.01', 'name': 'pulsar'}, {'id': 14589, 'synset': 'quicksand.n.02', 'name': 'quicksand'}, {'id': 14590, 'synset': 'rabbit_burrow.n.01', 'name': 'rabbit_burrow'}, {'id': 14591, 'synset': 'radiator.n.01', 'name': 'radiator'}, {'id': 14592, 'synset': 'rainbow.n.01', 'name': 'rainbow'}, {'id': 14593, 'synset': 'range.n.04', 'name': 'range'}, {'id': 14594, 'synset': 'rangeland.n.01', 'name': 'rangeland'}, {'id': 14595, 'synset': 'ravine.n.01', 'name': 'ravine'}, {'id': 14596, 'synset': 'reef.n.01', 'name': 'reef'}, {'id': 14597, 'synset': 'ridge.n.01', 'name': 'ridge'}, {'id': 14598, 'synset': 'ridge.n.04', 'name': 'ridge'}, {'id': 14599, 'synset': 'rift_valley.n.01', 'name': 'rift_valley'}, {'id': 14600, 'synset': 'riparian_forest.n.01', 'name': 'riparian_forest'}, {'id': 14601, 'synset': 'ripple_mark.n.01', 'name': 'ripple_mark'}, {'id': 14602, 'synset': 'riverbank.n.01', 'name': 'riverbank'}, {'id': 14603, 'synset': 'riverbed.n.01', 'name': 'riverbed'}, {'id': 14604, 'synset': 'rock.n.01', 'name': 'rock'}, {'id': 14605, 'synset': 'roof.n.03', 'name': 'roof'}, {'id': 14606, 'synset': 'saltpan.n.01', 'name': 'saltpan'}, {'id': 14607, 'synset': 'sandbank.n.01', 'name': 'sandbank'}, {'id': 14608, 'synset': 'sandbar.n.01', 'name': 'sandbar'}, {'id': 14609, 'synset': 'sandpit.n.01', 'name': 'sandpit'}, {'id': 14610, 'synset': 'sanitary_landfill.n.01', 'name': 'sanitary_landfill'}, {'id': 14611, 'synset': 'sawpit.n.01', 'name': 'sawpit'}, {'id': 14612, 'synset': 'scablands.n.01', 'name': 'scablands'}, {'id': 14613, 'synset': 'seashore.n.01', 'name': 'seashore'}, {'id': 14614, 'synset': 'seaside.n.01', 'name': 'seaside'}, {'id': 14615, 'synset': 'seif_dune.n.01', 'name': 'seif_dune'}, {'id': 14616, 'synset': 'shell.n.06', 'name': 'shell'}, {'id': 14617, 'synset': 'shiner.n.02', 'name': 'shiner'}, {'id': 14618, 'synset': 'shoal.n.01', 'name': 'shoal'}, {'id': 14619, 'synset': 'shore.n.01', 'name': 'shore'}, {'id': 14620, 'synset': 'shoreline.n.01', 'name': 'shoreline'}, {'id': 14621, 'synset': 'sinkhole.n.01', 'name': 'sinkhole'}, {'id': 14622, 'synset': 'ski_slope.n.01', 'name': 'ski_slope'}, {'id': 14623, 'synset': 'sky.n.01', 'name': 'sky'}, {'id': 14624, 'synset': 'slope.n.01', 'name': 'slope'}, {'id': 14625, 'synset': 'snowcap.n.01', 'name': 'snowcap'}, {'id': 14626, 'synset': 'snowdrift.n.01', 'name': 'snowdrift'}, {'id': 14627, 'synset': 'snowfield.n.01', 'name': 'snowfield'}, {'id': 14628, 'synset': 'soapsuds.n.01', 'name': 'soapsuds'}, {'id': 14629, 'synset': 'spit.n.01', 'name': 'spit'}, {'id': 14630, 'synset': 'spoor.n.01', 'name': 'spoor'}, {'id': 14631, 'synset': 'spume.n.01', 'name': 'spume'}, {'id': 14632, 'synset': 'star.n.03', 'name': 'star'}, {'id': 14633, 'synset': 'steep.n.01', 'name': 'steep'}, {'id': 14634, 'synset': 'steppe.n.01', 'name': 'steppe'}, {'id': 14635, 'synset': 'strand.n.05', 'name': 'strand'}, {'id': 14636, 'synset': 'streambed.n.01', 'name': 'streambed'}, {'id': 14637, 'synset': 'sun.n.01', 'name': 'sun'}, {'id': 14638, 'synset': 'supernova.n.01', 'name': 'supernova'}, {'id': 14639, 'synset': 'swale.n.01', 'name': 'swale'}, {'id': 14640, 'synset': 'swamp.n.01', 'name': 'swamp'}, {'id': 14641, 'synset': 'swell.n.02', 'name': 'swell'}, {'id': 14642, 'synset': 'tableland.n.01', 'name': 'tableland'}, {'id': 14643, 'synset': 'talus.n.01', 'name': 'talus'}, {'id': 14644, 'synset': 'tangle.n.01', 'name': 'tangle'}, {'id': 14645, 'synset': 'tar_pit.n.01', 'name': 'tar_pit'}, {'id': 14646, 'synset': 'terrace.n.02', 'name': 'terrace'}, {'id': 14647, 'synset': 'tidal_basin.n.01', 'name': 'tidal_basin'}, {'id': 14648, 'synset': 'tideland.n.01', 'name': 'tideland'}, {'id': 14649, 'synset': 'tor.n.02', 'name': 'tor'}, {'id': 14650, 'synset': 'tor.n.01', 'name': 'tor'}, {'id': 14651, 'synset': 'trapezium.n.02', 'name': 'Trapezium'}, {'id': 14652, 'synset': 'troposphere.n.01', 'name': 'troposphere'}, {'id': 14653, 'synset': 'tundra.n.01', 'name': 'tundra'}, {'id': 14654, 'synset': 'twinkler.n.01', 'name': 'twinkler'}, {'id': 14655, 'synset': 'uphill.n.01', 'name': 'uphill'}, {'id': 14656, 'synset': 'urolith.n.01', 'name': 'urolith'}, {'id': 14657, 'synset': 'valley.n.01', 'name': 'valley'}, {'id': 14658, 'synset': 'vehicle-borne_transmission.n.01', 'name': 'vehicle-borne_transmission'}, {'id': 14659, 'synset': 'vein.n.04', 'name': 'vein'}, {'id': 14660, 'synset': 'volcanic_crater.n.01', 'name': 'volcanic_crater'}, {'id': 14661, 'synset': 'volcano.n.02', 'name': 'volcano'}, {'id': 14662, 'synset': 'wadi.n.01', 'name': 'wadi'}, {'id': 14663, 'synset': 'wall.n.05', 'name': 'wall'}, {'id': 14664, 'synset': 'warren.n.03', 'name': 'warren'}, {'id': 14665, 'synset': "wasp's_nest.n.01", 'name': "wasp's_nest"}, {'id': 14666, 'synset': 'watercourse.n.01', 'name': 'watercourse'}, {'id': 14667, 'synset': 'waterside.n.01', 'name': 'waterside'}, {'id': 14668, 'synset': 'water_table.n.01', 'name': 'water_table'}, {'id': 14669, 'synset': 'whinstone.n.01', 'name': 'whinstone'}, {'id': 14670, 'synset': 'wormcast.n.02', 'name': 'wormcast'}, {'id': 14671, 'synset': 'xenolith.n.01', 'name': 'xenolith'}, {'id': 14672, 'synset': 'circe.n.01', 'name': 'Circe'}, {'id': 14673, 'synset': 'gryphon.n.01', 'name': 'gryphon'}, {'id': 14674, 'synset': 'spiritual_leader.n.01', 'name': 'spiritual_leader'}, {'id': 14675, 'synset': 'messiah.n.01', 'name': 'messiah'}, {'id': 14676, 'synset': 'rhea_silvia.n.01', 'name': 'Rhea_Silvia'}, {'id': 14677, 'synset': 'number_one.n.01', 'name': 'number_one'}, {'id': 14678, 'synset': 'adventurer.n.01', 'name': 'adventurer'}, {'id': 14679, 'synset': 'anomaly.n.02', 'name': 'anomaly'}, {'id': 14680, 'synset': 'appointee.n.02', 'name': 'appointee'}, {'id': 14681, 'synset': 'argonaut.n.01', 'name': 'argonaut'}, {'id': 14682, 'synset': 'ashkenazi.n.01', 'name': 'Ashkenazi'}, {'id': 14683, 'synset': 'benefactor.n.01', 'name': 'benefactor'}, {'id': 14684, 'synset': 'color-blind_person.n.01', 'name': 'color-blind_person'}, {'id': 14685, 'synset': 'commoner.n.01', 'name': 'commoner'}, {'id': 14686, 'synset': 'conservator.n.02', 'name': 'conservator'}, {'id': 14687, 'synset': 'contrarian.n.01', 'name': 'contrarian'}, {'id': 14688, 'synset': 'contadino.n.01', 'name': 'contadino'}, {'id': 14689, 'synset': 'contestant.n.01', 'name': 'contestant'}, {'id': 14690, 'synset': 'cosigner.n.01', 'name': 'cosigner'}, {'id': 14691, 'synset': 'discussant.n.01', 'name': 'discussant'}, {'id': 14692, 'synset': 'enologist.n.01', 'name': 'enologist'}, {'id': 14693, 'synset': 'entertainer.n.01', 'name': 'entertainer'}, {'id': 14694, 'synset': 'eulogist.n.01', 'name': 'eulogist'}, {'id': 14695, 'synset': 'ex-gambler.n.01', 'name': 'ex-gambler'}, {'id': 14696, 'synset': 'experimenter.n.01', 'name': 'experimenter'}, {'id': 14697, 'synset': 'experimenter.n.02', 'name': 'experimenter'}, {'id': 14698, 'synset': 'exponent.n.02', 'name': 'exponent'}, {'id': 14699, 'synset': 'ex-president.n.01', 'name': 'ex-president'}, {'id': 14700, 'synset': 'face.n.05', 'name': 'face'}, {'id': 14701, 'synset': 'female.n.02', 'name': 'female'}, {'id': 14702, 'synset': 'finisher.n.04', 'name': 'finisher'}, {'id': 14703, 'synset': 'inhabitant.n.01', 'name': 'inhabitant'}, {'id': 14704, 'synset': 'native.n.01', 'name': 'native'}, {'id': 14705, 'synset': 'native.n.02', 'name': 'native'}, {'id': 14706, 'synset': 'juvenile.n.01', 'name': 'juvenile'}, {'id': 14707, 'synset': 'lover.n.01', 'name': 'lover'}, {'id': 14708, 'synset': 'male.n.02', 'name': 'male'}, {'id': 14709, 'synset': 'mediator.n.01', 'name': 'mediator'}, {'id': 14710, 'synset': 'mediatrix.n.01', 'name': 'mediatrix'}, {'id': 14711, 'synset': 'national.n.01', 'name': 'national'}, {'id': 14712, 'synset': 'peer.n.01', 'name': 'peer'}, {'id': 14713, 'synset': 'prize_winner.n.01', 'name': 'prize_winner'}, {'id': 14714, 'synset': 'recipient.n.01', 'name': 'recipient'}, {'id': 14715, 'synset': 'religionist.n.01', 'name': 'religionist'}, {'id': 14716, 'synset': 'sensualist.n.01', 'name': 'sensualist'}, {'id': 14717, 'synset': 'traveler.n.01', 'name': 'traveler'}, {'id': 14718, 'synset': 'unwelcome_person.n.01', 'name': 'unwelcome_person'}, {'id': 14719, 'synset': 'unskilled_person.n.01', 'name': 'unskilled_person'}, {'id': 14720, 'synset': 'worker.n.01', 'name': 'worker'}, {'id': 14721, 'synset': 'wrongdoer.n.01', 'name': 'wrongdoer'}, {'id': 14722, 'synset': 'black_african.n.01', 'name': 'Black_African'}, {'id': 14723, 'synset': 'afrikaner.n.01', 'name': 'Afrikaner'}, {'id': 14724, 'synset': 'aryan.n.01', 'name': 'Aryan'}, {'id': 14725, 'synset': 'black.n.05', 'name': 'Black'}, {'id': 14726, 'synset': 'black_woman.n.01', 'name': 'Black_woman'}, {'id': 14727, 'synset': 'mulatto.n.01', 'name': 'mulatto'}, {'id': 14728, 'synset': 'white.n.01', 'name': 'White'}, {'id': 14729, 'synset': 'circassian.n.01', 'name': 'Circassian'}, {'id': 14730, 'synset': 'semite.n.01', 'name': 'Semite'}, {'id': 14731, 'synset': 'chaldean.n.02', 'name': 'Chaldean'}, {'id': 14732, 'synset': 'elamite.n.01', 'name': 'Elamite'}, {'id': 14733, 'synset': 'white_man.n.01', 'name': 'white_man'}, {'id': 14734, 'synset': 'wasp.n.01', 'name': 'WASP'}, {'id': 14735, 'synset': 'gook.n.02', 'name': 'gook'}, {'id': 14736, 'synset': 'mongol.n.01', 'name': 'Mongol'}, {'id': 14737, 'synset': 'tatar.n.01', 'name': 'Tatar'}, {'id': 14738, 'synset': 'nahuatl.n.01', 'name': 'Nahuatl'}, {'id': 14739, 'synset': 'aztec.n.01', 'name': 'Aztec'}, {'id': 14740, 'synset': 'olmec.n.01', 'name': 'Olmec'}, {'id': 14741, 'synset': 'biloxi.n.01', 'name': 'Biloxi'}, {'id': 14742, 'synset': 'blackfoot.n.01', 'name': 'Blackfoot'}, {'id': 14743, 'synset': 'brule.n.01', 'name': 'Brule'}, {'id': 14744, 'synset': 'caddo.n.01', 'name': 'Caddo'}, {'id': 14745, 'synset': 'cheyenne.n.03', 'name': 'Cheyenne'}, {'id': 14746, 'synset': 'chickasaw.n.01', 'name': 'Chickasaw'}, {'id': 14747, 'synset': 'cocopa.n.01', 'name': 'Cocopa'}, {'id': 14748, 'synset': 'comanche.n.01', 'name': 'Comanche'}, {'id': 14749, 'synset': 'creek.n.02', 'name': 'Creek'}, {'id': 14750, 'synset': 'delaware.n.02', 'name': 'Delaware'}, {'id': 14751, 'synset': 'diegueno.n.01', 'name': 'Diegueno'}, {'id': 14752, 'synset': 'esselen.n.01', 'name': 'Esselen'}, {'id': 14753, 'synset': 'eyeish.n.01', 'name': 'Eyeish'}, {'id': 14754, 'synset': 'havasupai.n.01', 'name': 'Havasupai'}, {'id': 14755, 'synset': 'hunkpapa.n.01', 'name': 'Hunkpapa'}, {'id': 14756, 'synset': 'iowa.n.01', 'name': 'Iowa'}, {'id': 14757, 'synset': 'kalapooia.n.01', 'name': 'Kalapooia'}, {'id': 14758, 'synset': 'kamia.n.01', 'name': 'Kamia'}, {'id': 14759, 'synset': 'kekchi.n.01', 'name': 'Kekchi'}, {'id': 14760, 'synset': 'kichai.n.01', 'name': 'Kichai'}, {'id': 14761, 'synset': 'kickapoo.n.01', 'name': 'Kickapoo'}, {'id': 14762, 'synset': 'kiliwa.n.01', 'name': 'Kiliwa'}, {'id': 14763, 'synset': 'malecite.n.01', 'name': 'Malecite'}, {'id': 14764, 'synset': 'maricopa.n.01', 'name': 'Maricopa'}, {'id': 14765, 'synset': 'mohican.n.01', 'name': 'Mohican'}, {'id': 14766, 'synset': 'muskhogean.n.01', 'name': 'Muskhogean'}, {'id': 14767, 'synset': 'navaho.n.01', 'name': 'Navaho'}, {'id': 14768, 'synset': 'nootka.n.01', 'name': 'Nootka'}, {'id': 14769, 'synset': 'oglala.n.01', 'name': 'Oglala'}, {'id': 14770, 'synset': 'osage.n.01', 'name': 'Osage'}, {'id': 14771, 'synset': 'oneida.n.01', 'name': 'Oneida'}, {'id': 14772, 'synset': 'paiute.n.01', 'name': 'Paiute'}, {'id': 14773, 'synset': 'passamaquody.n.01', 'name': 'Passamaquody'}, {'id': 14774, 'synset': 'penobscot.n.01', 'name': 'Penobscot'}, {'id': 14775, 'synset': 'penutian.n.02', 'name': 'Penutian'}, {'id': 14776, 'synset': 'potawatomi.n.01', 'name': 'Potawatomi'}, {'id': 14777, 'synset': 'powhatan.n.02', 'name': 'Powhatan'}, {'id': 14778, 'synset': 'kachina.n.02', 'name': 'kachina'}, {'id': 14779, 'synset': 'salish.n.02', 'name': 'Salish'}, {'id': 14780, 'synset': 'shahaptian.n.01', 'name': 'Shahaptian'}, {'id': 14781, 'synset': 'shasta.n.01', 'name': 'Shasta'}, {'id': 14782, 'synset': 'shawnee.n.01', 'name': 'Shawnee'}, {'id': 14783, 'synset': 'sihasapa.n.01', 'name': 'Sihasapa'}, {'id': 14784, 'synset': 'teton.n.01', 'name': 'Teton'}, {'id': 14785, 'synset': 'taracahitian.n.01', 'name': 'Taracahitian'}, {'id': 14786, 'synset': 'tarahumara.n.01', 'name': 'Tarahumara'}, {'id': 14787, 'synset': 'tuscarora.n.01', 'name': 'Tuscarora'}, {'id': 14788, 'synset': 'tutelo.n.01', 'name': 'Tutelo'}, {'id': 14789, 'synset': 'yana.n.01', 'name': 'Yana'}, {'id': 14790, 'synset': 'yavapai.n.01', 'name': 'Yavapai'}, {'id': 14791, 'synset': 'yokuts.n.02', 'name': 'Yokuts'}, {'id': 14792, 'synset': 'yuma.n.01', 'name': 'Yuma'}, {'id': 14793, 'synset': 'gadaba.n.01', 'name': 'Gadaba'}, {'id': 14794, 'synset': 'kolam.n.01', 'name': 'Kolam'}, {'id': 14795, 'synset': 'kui.n.01', 'name': 'Kui'}, {'id': 14796, 'synset': 'toda.n.01', 'name': 'Toda'}, {'id': 14797, 'synset': 'tulu.n.01', 'name': 'Tulu'}, {'id': 14798, 'synset': 'gujarati.n.01', 'name': 'Gujarati'}, {'id': 14799, 'synset': 'kashmiri.n.01', 'name': 'Kashmiri'}, {'id': 14800, 'synset': 'punjabi.n.01', 'name': 'Punjabi'}, {'id': 14801, 'synset': 'slav.n.01', 'name': 'Slav'}, {'id': 14802, 'synset': 'anabaptist.n.01', 'name': 'Anabaptist'}, {'id': 14803, 'synset': 'adventist.n.01', 'name': 'Adventist'}, {'id': 14804, 'synset': 'gentile.n.03', 'name': 'gentile'}, {'id': 14805, 'synset': 'gentile.n.02', 'name': 'gentile'}, {'id': 14806, 'synset': 'catholic.n.01', 'name': 'Catholic'}, {'id': 14807, 'synset': 'old_catholic.n.01', 'name': 'Old_Catholic'}, {'id': 14808, 'synset': 'uniat.n.01', 'name': 'Uniat'}, {'id': 14809, 'synset': 'copt.n.02', 'name': 'Copt'}, {'id': 14810, 'synset': 'jewess.n.01', 'name': 'Jewess'}, {'id': 14811, 'synset': 'jihadist.n.01', 'name': 'Jihadist'}, {'id': 14812, 'synset': 'buddhist.n.01', 'name': 'Buddhist'}, {'id': 14813, 'synset': 'zen_buddhist.n.01', 'name': 'Zen_Buddhist'}, {'id': 14814, 'synset': 'mahayanist.n.01', 'name': 'Mahayanist'}, {'id': 14815, 'synset': 'swami.n.01', 'name': 'swami'}, {'id': 14816, 'synset': 'hare_krishna.n.01', 'name': 'Hare_Krishna'}, {'id': 14817, 'synset': 'shintoist.n.01', 'name': 'Shintoist'}, {'id': 14818, 'synset': 'eurafrican.n.01', 'name': 'Eurafrican'}, {'id': 14819, 'synset': 'eurasian.n.01', 'name': 'Eurasian'}, {'id': 14820, 'synset': 'gael.n.01', 'name': 'Gael'}, {'id': 14821, 'synset': 'frank.n.01', 'name': 'Frank'}, {'id': 14822, 'synset': 'afghan.n.02', 'name': 'Afghan'}, {'id': 14823, 'synset': 'albanian.n.01', 'name': 'Albanian'}, {'id': 14824, 'synset': 'algerian.n.01', 'name': 'Algerian'}, {'id': 14825, 'synset': 'altaic.n.01', 'name': 'Altaic'}, {'id': 14826, 'synset': 'andorran.n.01', 'name': 'Andorran'}, {'id': 14827, 'synset': 'angolan.n.01', 'name': 'Angolan'}, {'id': 14828, 'synset': 'anguillan.n.01', 'name': 'Anguillan'}, {'id': 14829, 'synset': 'austrian.n.01', 'name': 'Austrian'}, {'id': 14830, 'synset': 'bahamian.n.01', 'name': 'Bahamian'}, {'id': 14831, 'synset': 'bahraini.n.01', 'name': 'Bahraini'}, {'id': 14832, 'synset': 'basotho.n.01', 'name': 'Basotho'}, {'id': 14833, 'synset': 'herero.n.01', 'name': 'Herero'}, {'id': 14834, 'synset': 'luba.n.01', 'name': 'Luba'}, {'id': 14835, 'synset': 'barbadian.n.01', 'name': 'Barbadian'}, {'id': 14836, 'synset': 'bolivian.n.01', 'name': 'Bolivian'}, {'id': 14837, 'synset': 'bornean.n.01', 'name': 'Bornean'}, {'id': 14838, 'synset': 'carioca.n.01', 'name': 'Carioca'}, {'id': 14839, 'synset': 'tupi.n.01', 'name': 'Tupi'}, {'id': 14840, 'synset': 'bruneian.n.01', 'name': 'Bruneian'}, {'id': 14841, 'synset': 'bulgarian.n.01', 'name': 'Bulgarian'}, {'id': 14842, 'synset': 'byelorussian.n.01', 'name': 'Byelorussian'}, {'id': 14843, 'synset': 'cameroonian.n.01', 'name': 'Cameroonian'}, {'id': 14844, 'synset': 'canadian.n.01', 'name': 'Canadian'}, {'id': 14845, 'synset': 'french_canadian.n.01', 'name': 'French_Canadian'}, {'id': 14846, 'synset': 'central_american.n.01', 'name': 'Central_American'}, {'id': 14847, 'synset': 'chilean.n.01', 'name': 'Chilean'}, {'id': 14848, 'synset': 'congolese.n.01', 'name': 'Congolese'}, {'id': 14849, 'synset': 'cypriot.n.01', 'name': 'Cypriot'}, {'id': 14850, 'synset': 'dane.n.01', 'name': 'Dane'}, {'id': 14851, 'synset': 'djiboutian.n.01', 'name': 'Djiboutian'}, {'id': 14852, 'synset': 'britisher.n.01', 'name': 'Britisher'}, {'id': 14853, 'synset': 'english_person.n.01', 'name': 'English_person'}, {'id': 14854, 'synset': 'englishwoman.n.01', 'name': 'Englishwoman'}, {'id': 14855, 'synset': 'anglo-saxon.n.02', 'name': 'Anglo-Saxon'}, {'id': 14856, 'synset': 'angle.n.03', 'name': 'Angle'}, {'id': 14857, 'synset': 'west_saxon.n.01', 'name': 'West_Saxon'}, {'id': 14858, 'synset': 'lombard.n.01', 'name': 'Lombard'}, {'id': 14859, 'synset': 'limey.n.01', 'name': 'limey'}, {'id': 14860, 'synset': 'cantabrigian.n.01', 'name': 'Cantabrigian'}, {'id': 14861, 'synset': 'cornishman.n.01', 'name': 'Cornishman'}, {'id': 14862, 'synset': 'cornishwoman.n.01', 'name': 'Cornishwoman'}, {'id': 14863, 'synset': 'lancastrian.n.02', 'name': 'Lancastrian'}, {'id': 14864, 'synset': 'lancastrian.n.01', 'name': 'Lancastrian'}, {'id': 14865, 'synset': 'geordie.n.01', 'name': 'Geordie'}, {'id': 14866, 'synset': 'oxonian.n.01', 'name': 'Oxonian'}, {'id': 14867, 'synset': 'ethiopian.n.01', 'name': 'Ethiopian'}, {'id': 14868, 'synset': 'amhara.n.01', 'name': 'Amhara'}, {'id': 14869, 'synset': 'eritrean.n.01', 'name': 'Eritrean'}, {'id': 14870, 'synset': 'finn.n.01', 'name': 'Finn'}, {'id': 14871, 'synset': 'komi.n.01', 'name': 'Komi'}, {'id': 14872, 'synset': 'livonian.n.01', 'name': 'Livonian'}, {'id': 14873, 'synset': 'lithuanian.n.01', 'name': 'Lithuanian'}, {'id': 14874, 'synset': 'selkup.n.01', 'name': 'Selkup'}, {'id': 14875, 'synset': 'parisian.n.01', 'name': 'Parisian'}, {'id': 14876, 'synset': 'parisienne.n.01', 'name': 'Parisienne'}, {'id': 14877, 'synset': 'creole.n.02', 'name': 'Creole'}, {'id': 14878, 'synset': 'creole.n.01', 'name': 'Creole'}, {'id': 14879, 'synset': 'gabonese.n.01', 'name': 'Gabonese'}, {'id': 14880, 'synset': 'greek.n.02', 'name': 'Greek'}, {'id': 14881, 'synset': 'dorian.n.01', 'name': 'Dorian'}, {'id': 14882, 'synset': 'athenian.n.01', 'name': 'Athenian'}, {'id': 14883, 'synset': 'laconian.n.01', 'name': 'Laconian'}, {'id': 14884, 'synset': 'guyanese.n.01', 'name': 'Guyanese'}, {'id': 14885, 'synset': 'haitian.n.01', 'name': 'Haitian'}, {'id': 14886, 'synset': 'malay.n.01', 'name': 'Malay'}, {'id': 14887, 'synset': 'moro.n.01', 'name': 'Moro'}, {'id': 14888, 'synset': 'netherlander.n.01', 'name': 'Netherlander'}, {'id': 14889, 'synset': 'icelander.n.01', 'name': 'Icelander'}, {'id': 14890, 'synset': 'iraqi.n.01', 'name': 'Iraqi'}, {'id': 14891, 'synset': 'irishman.n.01', 'name': 'Irishman'}, {'id': 14892, 'synset': 'irishwoman.n.01', 'name': 'Irishwoman'}, {'id': 14893, 'synset': 'dubliner.n.01', 'name': 'Dubliner'}, {'id': 14894, 'synset': 'italian.n.01', 'name': 'Italian'}, {'id': 14895, 'synset': 'roman.n.01', 'name': 'Roman'}, {'id': 14896, 'synset': 'sabine.n.02', 'name': 'Sabine'}, {'id': 14897, 'synset': 'japanese.n.01', 'name': 'Japanese'}, {'id': 14898, 'synset': 'jordanian.n.01', 'name': 'Jordanian'}, {'id': 14899, 'synset': 'korean.n.01', 'name': 'Korean'}, {'id': 14900, 'synset': 'kenyan.n.01', 'name': 'Kenyan'}, {'id': 14901, 'synset': 'lao.n.01', 'name': 'Lao'}, {'id': 14902, 'synset': 'lapp.n.01', 'name': 'Lapp'}, {'id': 14903, 'synset': 'latin_american.n.01', 'name': 'Latin_American'}, {'id': 14904, 'synset': 'lebanese.n.01', 'name': 'Lebanese'}, {'id': 14905, 'synset': 'levantine.n.01', 'name': 'Levantine'}, {'id': 14906, 'synset': 'liberian.n.01', 'name': 'Liberian'}, {'id': 14907, 'synset': 'luxemburger.n.01', 'name': 'Luxemburger'}, {'id': 14908, 'synset': 'macedonian.n.01', 'name': 'Macedonian'}, {'id': 14909, 'synset': 'sabahan.n.01', 'name': 'Sabahan'}, {'id': 14910, 'synset': 'mexican.n.01', 'name': 'Mexican'}, {'id': 14911, 'synset': 'chicano.n.01', 'name': 'Chicano'}, {'id': 14912, 'synset': 'mexican-american.n.01', 'name': 'Mexican-American'}, {'id': 14913, 'synset': 'namibian.n.01', 'name': 'Namibian'}, {'id': 14914, 'synset': 'nauruan.n.01', 'name': 'Nauruan'}, {'id': 14915, 'synset': 'gurkha.n.02', 'name': 'Gurkha'}, {'id': 14916, 'synset': 'new_zealander.n.01', 'name': 'New_Zealander'}, {'id': 14917, 'synset': 'nicaraguan.n.01', 'name': 'Nicaraguan'}, {'id': 14918, 'synset': 'nigerian.n.01', 'name': 'Nigerian'}, {'id': 14919, 'synset': 'hausa.n.01', 'name': 'Hausa'}, {'id': 14920, 'synset': 'north_american.n.01', 'name': 'North_American'}, {'id': 14921, 'synset': 'nova_scotian.n.01', 'name': 'Nova_Scotian'}, {'id': 14922, 'synset': 'omani.n.01', 'name': 'Omani'}, {'id': 14923, 'synset': 'pakistani.n.01', 'name': 'Pakistani'}, {'id': 14924, 'synset': 'brahui.n.01', 'name': 'Brahui'}, {'id': 14925, 'synset': 'south_american_indian.n.01', 'name': 'South_American_Indian'}, {'id': 14926, 'synset': 'carib.n.01', 'name': 'Carib'}, {'id': 14927, 'synset': 'filipino.n.01', 'name': 'Filipino'}, {'id': 14928, 'synset': 'polynesian.n.01', 'name': 'Polynesian'}, {'id': 14929, 'synset': 'qatari.n.01', 'name': 'Qatari'}, {'id': 14930, 'synset': 'romanian.n.01', 'name': 'Romanian'}, {'id': 14931, 'synset': 'muscovite.n.02', 'name': 'Muscovite'}, {'id': 14932, 'synset': 'georgian.n.02', 'name': 'Georgian'}, {'id': 14933, 'synset': 'sarawakian.n.01', 'name': 'Sarawakian'}, {'id': 14934, 'synset': 'scandinavian.n.01', 'name': 'Scandinavian'}, {'id': 14935, 'synset': 'senegalese.n.01', 'name': 'Senegalese'}, {'id': 14936, 'synset': 'slovene.n.01', 'name': 'Slovene'}, {'id': 14937, 'synset': 'south_african.n.01', 'name': 'South_African'}, {'id': 14938, 'synset': 'south_american.n.01', 'name': 'South_American'}, {'id': 14939, 'synset': 'sudanese.n.01', 'name': 'Sudanese'}, {'id': 14940, 'synset': 'syrian.n.01', 'name': 'Syrian'}, {'id': 14941, 'synset': 'tahitian.n.01', 'name': 'Tahitian'}, {'id': 14942, 'synset': 'tanzanian.n.01', 'name': 'Tanzanian'}, {'id': 14943, 'synset': 'tibetan.n.02', 'name': 'Tibetan'}, {'id': 14944, 'synset': 'togolese.n.01', 'name': 'Togolese'}, {'id': 14945, 'synset': 'tuareg.n.01', 'name': 'Tuareg'}, {'id': 14946, 'synset': 'turki.n.01', 'name': 'Turki'}, {'id': 14947, 'synset': 'chuvash.n.01', 'name': 'Chuvash'}, {'id': 14948, 'synset': 'turkoman.n.01', 'name': 'Turkoman'}, {'id': 14949, 'synset': 'uzbek.n.01', 'name': 'Uzbek'}, {'id': 14950, 'synset': 'ugandan.n.01', 'name': 'Ugandan'}, {'id': 14951, 'synset': 'ukranian.n.01', 'name': 'Ukranian'}, {'id': 14952, 'synset': 'yakut.n.01', 'name': 'Yakut'}, {'id': 14953, 'synset': 'tungus.n.01', 'name': 'Tungus'}, {'id': 14954, 'synset': 'igbo.n.01', 'name': 'Igbo'}, {'id': 14955, 'synset': 'american.n.03', 'name': 'American'}, {'id': 14956, 'synset': 'anglo-american.n.01', 'name': 'Anglo-American'}, {'id': 14957, 'synset': 'alaska_native.n.01', 'name': 'Alaska_Native'}, {'id': 14958, 'synset': 'arkansan.n.01', 'name': 'Arkansan'}, {'id': 14959, 'synset': 'carolinian.n.01', 'name': 'Carolinian'}, {'id': 14960, 'synset': 'coloradan.n.01', 'name': 'Coloradan'}, {'id': 14961, 'synset': 'connecticuter.n.01', 'name': 'Connecticuter'}, {'id': 14962, 'synset': 'delawarean.n.01', 'name': 'Delawarean'}, {'id': 14963, 'synset': 'floridian.n.01', 'name': 'Floridian'}, {'id': 14964, 'synset': 'german_american.n.01', 'name': 'German_American'}, {'id': 14965, 'synset': 'illinoisan.n.01', 'name': 'Illinoisan'}, {'id': 14966, 'synset': 'mainer.n.01', 'name': 'Mainer'}, {'id': 14967, 'synset': 'marylander.n.01', 'name': 'Marylander'}, {'id': 14968, 'synset': 'minnesotan.n.01', 'name': 'Minnesotan'}, {'id': 14969, 'synset': 'nebraskan.n.01', 'name': 'Nebraskan'}, {'id': 14970, 'synset': 'new_hampshirite.n.01', 'name': 'New_Hampshirite'}, {'id': 14971, 'synset': 'new_jerseyan.n.01', 'name': 'New_Jerseyan'}, {'id': 14972, 'synset': 'new_yorker.n.01', 'name': 'New_Yorker'}, {'id': 14973, 'synset': 'north_carolinian.n.01', 'name': 'North_Carolinian'}, {'id': 14974, 'synset': 'oregonian.n.01', 'name': 'Oregonian'}, {'id': 14975, 'synset': 'pennsylvanian.n.02', 'name': 'Pennsylvanian'}, {'id': 14976, 'synset': 'texan.n.01', 'name': 'Texan'}, {'id': 14977, 'synset': 'utahan.n.01', 'name': 'Utahan'}, {'id': 14978, 'synset': 'uruguayan.n.01', 'name': 'Uruguayan'}, {'id': 14979, 'synset': 'vietnamese.n.01', 'name': 'Vietnamese'}, {'id': 14980, 'synset': 'gambian.n.01', 'name': 'Gambian'}, {'id': 14981, 'synset': 'east_german.n.01', 'name': 'East_German'}, {'id': 14982, 'synset': 'berliner.n.01', 'name': 'Berliner'}, {'id': 14983, 'synset': 'prussian.n.01', 'name': 'Prussian'}, {'id': 14984, 'synset': 'ghanian.n.01', 'name': 'Ghanian'}, {'id': 14985, 'synset': 'guinean.n.01', 'name': 'Guinean'}, {'id': 14986, 'synset': 'papuan.n.01', 'name': 'Papuan'}, {'id': 14987, 'synset': 'walloon.n.01', 'name': 'Walloon'}, {'id': 14988, 'synset': 'yemeni.n.01', 'name': 'Yemeni'}, {'id': 14989, 'synset': 'yugoslav.n.01', 'name': 'Yugoslav'}, {'id': 14990, 'synset': 'serbian.n.01', 'name': 'Serbian'}, {'id': 14991, 'synset': 'xhosa.n.01', 'name': 'Xhosa'}, {'id': 14992, 'synset': 'zairese.n.01', 'name': 'Zairese'}, {'id': 14993, 'synset': 'zimbabwean.n.01', 'name': 'Zimbabwean'}, {'id': 14994, 'synset': 'zulu.n.01', 'name': 'Zulu'}, {'id': 14995, 'synset': 'gemini.n.01', 'name': 'Gemini'}, {'id': 14996, 'synset': 'sagittarius.n.01', 'name': 'Sagittarius'}, {'id': 14997, 'synset': 'pisces.n.02', 'name': 'Pisces'}, {'id': 14998, 'synset': 'abbe.n.01', 'name': 'abbe'}, {'id': 14999, 'synset': 'abbess.n.01', 'name': 'abbess'}, {'id': 15000, 'synset': 'abnegator.n.01', 'name': 'abnegator'}, {'id': 15001, 'synset': 'abridger.n.01', 'name': 'abridger'}, {'id': 15002, 'synset': 'abstractor.n.01', 'name': 'abstractor'}, {'id': 15003, 'synset': 'absconder.n.01', 'name': 'absconder'}, {'id': 15004, 'synset': 'absolver.n.01', 'name': 'absolver'}, {'id': 15005, 'synset': 'abecedarian.n.01', 'name': 'abecedarian'}, {'id': 15006, 'synset': 'aberrant.n.01', 'name': 'aberrant'}, {'id': 15007, 'synset': 'abettor.n.01', 'name': 'abettor'}, {'id': 15008, 'synset': 'abhorrer.n.01', 'name': 'abhorrer'}, {'id': 15009, 'synset': 'abomination.n.01', 'name': 'abomination'}, {'id': 15010, 'synset': 'abseiler.n.01', 'name': 'abseiler'}, {'id': 15011, 'synset': 'abstainer.n.01', 'name': 'abstainer'}, {'id': 15012, 'synset': 'academic_administrator.n.01', 'name': 'academic_administrator'}, {'id': 15013, 'synset': 'academician.n.01', 'name': 'academician'}, {'id': 15014, 'synset': 'accessory_before_the_fact.n.01', 'name': 'accessory_before_the_fact'}, {'id': 15015, 'synset': 'companion.n.03', 'name': 'companion'}, {'id': 15016, 'synset': 'accompanist.n.01', 'name': 'accompanist'}, {'id': 15017, 'synset': 'accomplice.n.01', 'name': 'accomplice'}, {'id': 15018, 'synset': 'account_executive.n.01', 'name': 'account_executive'}, {'id': 15019, 'synset': 'accused.n.01', 'name': 'accused'}, {'id': 15020, 'synset': 'accuser.n.01', 'name': 'accuser'}, {'id': 15021, 'synset': 'acid_head.n.01', 'name': 'acid_head'}, {'id': 15022, 'synset': 'acquaintance.n.03', 'name': 'acquaintance'}, {'id': 15023, 'synset': 'acquirer.n.01', 'name': 'acquirer'}, {'id': 15024, 'synset': 'aerialist.n.01', 'name': 'aerialist'}, {'id': 15025, 'synset': 'action_officer.n.01', 'name': 'action_officer'}, {'id': 15026, 'synset': 'active.n.03', 'name': 'active'}, {'id': 15027, 'synset': 'active_citizen.n.01', 'name': 'active_citizen'}, {'id': 15028, 'synset': 'actor.n.01', 'name': 'actor'}, {'id': 15029, 'synset': 'actor.n.02', 'name': 'actor'}, {'id': 15030, 'synset': 'addict.n.01', 'name': 'addict'}, {'id': 15031, 'synset': 'adducer.n.01', 'name': 'adducer'}, {'id': 15032, 'synset': 'adjuster.n.01', 'name': 'adjuster'}, {'id': 15033, 'synset': 'adjutant.n.01', 'name': 'adjutant'}, {'id': 15034, 'synset': 'adjutant_general.n.01', 'name': 'adjutant_general'}, {'id': 15035, 'synset': 'admirer.n.03', 'name': 'admirer'}, {'id': 15036, 'synset': 'adoptee.n.01', 'name': 'adoptee'}, {'id': 15037, 'synset': 'adulterer.n.01', 'name': 'adulterer'}, {'id': 15038, 'synset': 'adulteress.n.01', 'name': 'adulteress'}, {'id': 15039, 'synset': 'advertiser.n.01', 'name': 'advertiser'}, {'id': 15040, 'synset': 'advisee.n.01', 'name': 'advisee'}, {'id': 15041, 'synset': 'advocate.n.01', 'name': 'advocate'}, {'id': 15042, 'synset': 'aeronautical_engineer.n.01', 'name': 'aeronautical_engineer'}, {'id': 15043, 'synset': 'affiliate.n.01', 'name': 'affiliate'}, {'id': 15044, 'synset': 'affluent.n.01', 'name': 'affluent'}, {'id': 15045, 'synset': 'aficionado.n.02', 'name': 'aficionado'}, {'id': 15046, 'synset': 'buck_sergeant.n.01', 'name': 'buck_sergeant'}, {'id': 15047, 'synset': 'agent-in-place.n.01', 'name': 'agent-in-place'}, {'id': 15048, 'synset': 'aggravator.n.01', 'name': 'aggravator'}, {'id': 15049, 'synset': 'agitator.n.01', 'name': 'agitator'}, {'id': 15050, 'synset': 'agnostic.n.02', 'name': 'agnostic'}, {'id': 15051, 'synset': 'agnostic.n.01', 'name': 'agnostic'}, {'id': 15052, 'synset': 'agonist.n.02', 'name': 'agonist'}, {'id': 15053, 'synset': 'agony_aunt.n.01', 'name': 'agony_aunt'}, {'id': 15054, 'synset': 'agriculturist.n.01', 'name': 'agriculturist'}, {'id': 15055, 'synset': 'air_attache.n.01', 'name': 'air_attache'}, {'id': 15056, 'synset': 'air_force_officer.n.01', 'name': 'air_force_officer'}, {'id': 15057, 'synset': 'airhead.n.01', 'name': 'airhead'}, {'id': 15058, 'synset': 'air_traveler.n.01', 'name': 'air_traveler'}, {'id': 15059, 'synset': 'alarmist.n.01', 'name': 'alarmist'}, {'id': 15060, 'synset': 'albino.n.01', 'name': 'albino'}, {'id': 15061, 'synset': 'alcoholic.n.01', 'name': 'alcoholic'}, {'id': 15062, 'synset': 'alderman.n.01', 'name': 'alderman'}, {'id': 15063, 'synset': 'alexic.n.01', 'name': 'alexic'}, {'id': 15064, 'synset': 'alienee.n.01', 'name': 'alienee'}, {'id': 15065, 'synset': 'alienor.n.01', 'name': 'alienor'}, {'id': 15066, 'synset': 'aliterate.n.01', 'name': 'aliterate'}, {'id': 15067, 'synset': 'algebraist.n.01', 'name': 'algebraist'}, {'id': 15068, 'synset': 'allegorizer.n.01', 'name': 'allegorizer'}, {'id': 15069, 'synset': 'alliterator.n.01', 'name': 'alliterator'}, {'id': 15070, 'synset': 'almoner.n.01', 'name': 'almoner'}, {'id': 15071, 'synset': 'alpinist.n.01', 'name': 'alpinist'}, {'id': 15072, 'synset': 'altar_boy.n.01', 'name': 'altar_boy'}, {'id': 15073, 'synset': 'alto.n.01', 'name': 'alto'}, {'id': 15074, 'synset': 'ambassador.n.01', 'name': 'ambassador'}, {'id': 15075, 'synset': 'ambassador.n.02', 'name': 'ambassador'}, {'id': 15076, 'synset': 'ambusher.n.01', 'name': 'ambusher'}, {'id': 15077, 'synset': 'amicus_curiae.n.01', 'name': 'amicus_curiae'}, {'id': 15078, 'synset': 'amoralist.n.01', 'name': 'amoralist'}, {'id': 15079, 'synset': 'amputee.n.01', 'name': 'amputee'}, {'id': 15080, 'synset': 'analogist.n.01', 'name': 'analogist'}, {'id': 15081, 'synset': 'analphabet.n.01', 'name': 'analphabet'}, {'id': 15082, 'synset': 'analyst.n.01', 'name': 'analyst'}, {'id': 15083, 'synset': 'industry_analyst.n.01', 'name': 'industry_analyst'}, {'id': 15084, 'synset': 'market_strategist.n.01', 'name': 'market_strategist'}, {'id': 15085, 'synset': 'anarchist.n.01', 'name': 'anarchist'}, {'id': 15086, 'synset': 'anathema.n.01', 'name': 'anathema'}, {'id': 15087, 'synset': 'ancestor.n.01', 'name': 'ancestor'}, {'id': 15088, 'synset': 'anchor.n.03', 'name': 'anchor'}, {'id': 15089, 'synset': 'ancient.n.02', 'name': 'ancient'}, {'id': 15090, 'synset': 'anecdotist.n.01', 'name': 'anecdotist'}, {'id': 15091, 'synset': 'angler.n.02', 'name': 'angler'}, {'id': 15092, 'synset': 'animator.n.02', 'name': 'animator'}, {'id': 15093, 'synset': 'animist.n.01', 'name': 'animist'}, {'id': 15094, 'synset': 'annotator.n.01', 'name': 'annotator'}, {'id': 15095, 'synset': 'announcer.n.02', 'name': 'announcer'}, {'id': 15096, 'synset': 'announcer.n.01', 'name': 'announcer'}, {'id': 15097, 'synset': 'anti.n.01', 'name': 'anti'}, {'id': 15098, 'synset': 'anti-american.n.01', 'name': 'anti-American'}, {'id': 15099, 'synset': 'anti-semite.n.01', 'name': 'anti-Semite'}, {'id': 15100, 'synset': 'anzac.n.01', 'name': 'Anzac'}, {'id': 15101, 'synset': 'ape-man.n.02', 'name': 'ape-man'}, {'id': 15102, 'synset': 'aphakic.n.01', 'name': 'aphakic'}, {'id': 15103, 'synset': 'appellant.n.01', 'name': 'appellant'}, {'id': 15104, 'synset': 'appointee.n.01', 'name': 'appointee'}, {'id': 15105, 'synset': 'apprehender.n.02', 'name': 'apprehender'}, {'id': 15106, 'synset': 'april_fool.n.01', 'name': 'April_fool'}, {'id': 15107, 'synset': 'aspirant.n.01', 'name': 'aspirant'}, {'id': 15108, 'synset': 'appreciator.n.01', 'name': 'appreciator'}, {'id': 15109, 'synset': 'appropriator.n.01', 'name': 'appropriator'}, {'id': 15110, 'synset': 'arabist.n.01', 'name': 'Arabist'}, {'id': 15111, 'synset': 'archaist.n.01', 'name': 'archaist'}, {'id': 15112, 'synset': 'archbishop.n.01', 'name': 'archbishop'}, {'id': 15113, 'synset': 'archer.n.01', 'name': 'archer'}, {'id': 15114, 'synset': 'architect.n.01', 'name': 'architect'}, {'id': 15115, 'synset': 'archivist.n.01', 'name': 'archivist'}, {'id': 15116, 'synset': 'archpriest.n.01', 'name': 'archpriest'}, {'id': 15117, 'synset': 'aristotelian.n.01', 'name': 'Aristotelian'}, {'id': 15118, 'synset': 'armiger.n.02', 'name': 'armiger'}, {'id': 15119, 'synset': 'army_attache.n.01', 'name': 'army_attache'}, {'id': 15120, 'synset': 'army_engineer.n.01', 'name': 'army_engineer'}, {'id': 15121, 'synset': 'army_officer.n.01', 'name': 'army_officer'}, {'id': 15122, 'synset': 'arranger.n.02', 'name': 'arranger'}, {'id': 15123, 'synset': 'arrival.n.03', 'name': 'arrival'}, {'id': 15124, 'synset': 'arthritic.n.01', 'name': 'arthritic'}, {'id': 15125, 'synset': 'articulator.n.01', 'name': 'articulator'}, {'id': 15126, 'synset': 'artilleryman.n.01', 'name': 'artilleryman'}, {'id': 15127, 'synset': "artist's_model.n.01", 'name': "artist's_model"}, {'id': 15128, 'synset': 'assayer.n.01', 'name': 'assayer'}, {'id': 15129, 'synset': 'assemblyman.n.01', 'name': 'assemblyman'}, {'id': 15130, 'synset': 'assemblywoman.n.01', 'name': 'assemblywoman'}, {'id': 15131, 'synset': 'assenter.n.01', 'name': 'assenter'}, {'id': 15132, 'synset': 'asserter.n.01', 'name': 'asserter'}, {'id': 15133, 'synset': 'assignee.n.01', 'name': 'assignee'}, {'id': 15134, 'synset': 'assistant.n.01', 'name': 'assistant'}, {'id': 15135, 'synset': 'assistant_professor.n.01', 'name': 'assistant_professor'}, {'id': 15136, 'synset': 'associate.n.01', 'name': 'associate'}, {'id': 15137, 'synset': 'associate.n.03', 'name': 'associate'}, {'id': 15138, 'synset': 'associate_professor.n.01', 'name': 'associate_professor'}, {'id': 15139, 'synset': 'astronaut.n.01', 'name': 'astronaut'}, {'id': 15140, 'synset': 'cosmographer.n.01', 'name': 'cosmographer'}, {'id': 15141, 'synset': 'atheist.n.01', 'name': 'atheist'}, {'id': 15142, 'synset': 'athlete.n.01', 'name': 'athlete'}, {'id': 15143, 'synset': 'attendant.n.01', 'name': 'attendant'}, {'id': 15144, 'synset': 'attorney_general.n.01', 'name': 'attorney_general'}, {'id': 15145, 'synset': 'auditor.n.02', 'name': 'auditor'}, {'id': 15146, 'synset': 'augur.n.01', 'name': 'augur'}, {'id': 15147, 'synset': 'aunt.n.01', 'name': 'aunt'}, {'id': 15148, 'synset': 'au_pair_girl.n.01', 'name': 'au_pair_girl'}, {'id': 15149, 'synset': 'authoritarian.n.01', 'name': 'authoritarian'}, {'id': 15150, 'synset': 'authority.n.02', 'name': 'authority'}, {'id': 15151, 'synset': 'authorizer.n.01', 'name': 'authorizer'}, {'id': 15152, 'synset': 'automobile_mechanic.n.01', 'name': 'automobile_mechanic'}, {'id': 15153, 'synset': 'aviator.n.01', 'name': 'aviator'}, {'id': 15154, 'synset': 'aviatrix.n.01', 'name': 'aviatrix'}, {'id': 15155, 'synset': 'ayah.n.01', 'name': 'ayah'}, {'id': 15156, 'synset': 'babu.n.01', 'name': 'babu'}, {'id': 15157, 'synset': 'baby.n.05', 'name': 'baby'}, {'id': 15158, 'synset': 'baby.n.04', 'name': 'baby'}, {'id': 15159, 'synset': 'baby_boomer.n.01', 'name': 'baby_boomer'}, {'id': 15160, 'synset': 'baby_farmer.n.01', 'name': 'baby_farmer'}, {'id': 15161, 'synset': 'back.n.04', 'name': 'back'}, {'id': 15162, 'synset': 'backbencher.n.01', 'name': 'backbencher'}, {'id': 15163, 'synset': 'backpacker.n.01', 'name': 'backpacker'}, {'id': 15164, 'synset': 'backroom_boy.n.01', 'name': 'backroom_boy'}, {'id': 15165, 'synset': 'backscratcher.n.01', 'name': 'backscratcher'}, {'id': 15166, 'synset': 'bad_person.n.01', 'name': 'bad_person'}, {'id': 15167, 'synset': 'baggage.n.02', 'name': 'baggage'}, {'id': 15168, 'synset': 'bag_lady.n.01', 'name': 'bag_lady'}, {'id': 15169, 'synset': 'bailee.n.01', 'name': 'bailee'}, {'id': 15170, 'synset': 'bailiff.n.01', 'name': 'bailiff'}, {'id': 15171, 'synset': 'bailor.n.01', 'name': 'bailor'}, {'id': 15172, 'synset': 'bairn.n.01', 'name': 'bairn'}, {'id': 15173, 'synset': 'baker.n.02', 'name': 'baker'}, {'id': 15174, 'synset': 'balancer.n.01', 'name': 'balancer'}, {'id': 15175, 'synset': 'balker.n.01', 'name': 'balker'}, {'id': 15176, 'synset': 'ball-buster.n.01', 'name': 'ball-buster'}, {'id': 15177, 'synset': 'ball_carrier.n.01', 'name': 'ball_carrier'}, {'id': 15178, 'synset': 'ballet_dancer.n.01', 'name': 'ballet_dancer'}, {'id': 15179, 'synset': 'ballet_master.n.01', 'name': 'ballet_master'}, {'id': 15180, 'synset': 'ballet_mistress.n.01', 'name': 'ballet_mistress'}, {'id': 15181, 'synset': 'balletomane.n.01', 'name': 'balletomane'}, {'id': 15182, 'synset': 'ball_hawk.n.01', 'name': 'ball_hawk'}, {'id': 15183, 'synset': 'balloonist.n.01', 'name': 'balloonist'}, {'id': 15184, 'synset': 'ballplayer.n.01', 'name': 'ballplayer'}, {'id': 15185, 'synset': 'bullfighter.n.01', 'name': 'bullfighter'}, {'id': 15186, 'synset': 'banderillero.n.01', 'name': 'banderillero'}, {'id': 15187, 'synset': 'matador.n.01', 'name': 'matador'}, {'id': 15188, 'synset': 'picador.n.01', 'name': 'picador'}, {'id': 15189, 'synset': 'bandsman.n.01', 'name': 'bandsman'}, {'id': 15190, 'synset': 'banker.n.02', 'name': 'banker'}, {'id': 15191, 'synset': 'bank_robber.n.01', 'name': 'bank_robber'}, {'id': 15192, 'synset': 'bankrupt.n.01', 'name': 'bankrupt'}, {'id': 15193, 'synset': 'bantamweight.n.01', 'name': 'bantamweight'}, {'id': 15194, 'synset': 'barmaid.n.01', 'name': 'barmaid'}, {'id': 15195, 'synset': 'baron.n.03', 'name': 'baron'}, {'id': 15196, 'synset': 'baron.n.02', 'name': 'baron'}, {'id': 15197, 'synset': 'baron.n.01', 'name': 'baron'}, {'id': 15198, 'synset': 'bartender.n.01', 'name': 'bartender'}, {'id': 15199, 'synset': 'baseball_coach.n.01', 'name': 'baseball_coach'}, {'id': 15200, 'synset': 'base_runner.n.01', 'name': 'base_runner'}, {'id': 15201, 'synset': 'basketball_player.n.01', 'name': 'basketball_player'}, {'id': 15202, 'synset': 'basketweaver.n.01', 'name': 'basketweaver'}, {'id': 15203, 'synset': 'basket_maker.n.01', 'name': 'Basket_Maker'}, {'id': 15204, 'synset': 'bass.n.03', 'name': 'bass'}, {'id': 15205, 'synset': 'bastard.n.02', 'name': 'bastard'}, {'id': 15206, 'synset': 'bat_boy.n.01', 'name': 'bat_boy'}, {'id': 15207, 'synset': 'bather.n.02', 'name': 'bather'}, {'id': 15208, 'synset': 'batman.n.01', 'name': 'batman'}, {'id': 15209, 'synset': 'baton_twirler.n.01', 'name': 'baton_twirler'}, {'id': 15210, 'synset': 'bavarian.n.01', 'name': 'Bavarian'}, {'id': 15211, 'synset': 'beadsman.n.01', 'name': 'beadsman'}, {'id': 15212, 'synset': 'beard.n.03', 'name': 'beard'}, {'id': 15213, 'synset': 'beatnik.n.01', 'name': 'beatnik'}, {'id': 15214, 'synset': 'beauty_consultant.n.01', 'name': 'beauty_consultant'}, {'id': 15215, 'synset': 'bedouin.n.01', 'name': 'Bedouin'}, {'id': 15216, 'synset': 'bedwetter.n.01', 'name': 'bedwetter'}, {'id': 15217, 'synset': 'beekeeper.n.01', 'name': 'beekeeper'}, {'id': 15218, 'synset': 'beer_drinker.n.01', 'name': 'beer_drinker'}, {'id': 15219, 'synset': 'beggarman.n.01', 'name': 'beggarman'}, {'id': 15220, 'synset': 'beggarwoman.n.01', 'name': 'beggarwoman'}, {'id': 15221, 'synset': 'beldam.n.02', 'name': 'beldam'}, {'id': 15222, 'synset': 'theist.n.01', 'name': 'theist'}, {'id': 15223, 'synset': 'believer.n.01', 'name': 'believer'}, {'id': 15224, 'synset': 'bell_founder.n.01', 'name': 'bell_founder'}, {'id': 15225, 'synset': 'benedick.n.01', 'name': 'benedick'}, {'id': 15226, 'synset': 'berserker.n.01', 'name': 'berserker'}, {'id': 15227, 'synset': 'besieger.n.01', 'name': 'besieger'}, {'id': 15228, 'synset': 'best.n.02', 'name': 'best'}, {'id': 15229, 'synset': 'betrothed.n.01', 'name': 'betrothed'}, {'id': 15230, 'synset': 'big_brother.n.01', 'name': 'Big_Brother'}, {'id': 15231, 'synset': 'bigot.n.01', 'name': 'bigot'}, {'id': 15232, 'synset': 'big_shot.n.01', 'name': 'big_shot'}, {'id': 15233, 'synset': 'big_sister.n.01', 'name': 'big_sister'}, {'id': 15234, 'synset': 'billiard_player.n.01', 'name': 'billiard_player'}, {'id': 15235, 'synset': 'biochemist.n.01', 'name': 'biochemist'}, {'id': 15236, 'synset': 'biographer.n.01', 'name': 'biographer'}, {'id': 15237, 'synset': 'bird_fancier.n.01', 'name': 'bird_fancier'}, {'id': 15238, 'synset': 'birth.n.05', 'name': 'birth'}, {'id': 15239, 'synset': 'birth-control_campaigner.n.01', 'name': 'birth-control_campaigner'}, {'id': 15240, 'synset': 'bisexual.n.01', 'name': 'bisexual'}, {'id': 15241, 'synset': 'black_belt.n.01', 'name': 'black_belt'}, {'id': 15242, 'synset': 'blackmailer.n.01', 'name': 'blackmailer'}, {'id': 15243, 'synset': 'black_muslim.n.01', 'name': 'Black_Muslim'}, {'id': 15244, 'synset': 'blacksmith.n.01', 'name': 'blacksmith'}, {'id': 15245, 'synset': 'blade.n.02', 'name': 'blade'}, {'id': 15246, 'synset': 'blind_date.n.01', 'name': 'blind_date'}, {'id': 15247, 'synset': 'bluecoat.n.01', 'name': 'bluecoat'}, {'id': 15248, 'synset': 'bluestocking.n.01', 'name': 'bluestocking'}, {'id': 15249, 'synset': 'boatbuilder.n.01', 'name': 'boatbuilder'}, {'id': 15250, 'synset': 'boatman.n.01', 'name': 'boatman'}, {'id': 15251, 'synset': 'boatswain.n.01', 'name': 'boatswain'}, {'id': 15252, 'synset': 'bobby.n.01', 'name': 'bobby'}, {'id': 15253, 'synset': 'bodyguard.n.01', 'name': 'bodyguard'}, {'id': 15254, 'synset': 'boffin.n.01', 'name': 'boffin'}, {'id': 15255, 'synset': 'bolshevik.n.01', 'name': 'Bolshevik'}, {'id': 15256, 'synset': 'bolshevik.n.02', 'name': 'Bolshevik'}, {'id': 15257, 'synset': 'bombshell.n.01', 'name': 'bombshell'}, {'id': 15258, 'synset': 'bondman.n.01', 'name': 'bondman'}, {'id': 15259, 'synset': 'bondwoman.n.02', 'name': 'bondwoman'}, {'id': 15260, 'synset': 'bondwoman.n.01', 'name': 'bondwoman'}, {'id': 15261, 'synset': 'bond_servant.n.01', 'name': 'bond_servant'}, {'id': 15262, 'synset': 'book_agent.n.01', 'name': 'book_agent'}, {'id': 15263, 'synset': 'bookbinder.n.01', 'name': 'bookbinder'}, {'id': 15264, 'synset': 'bookkeeper.n.01', 'name': 'bookkeeper'}, {'id': 15265, 'synset': 'bookmaker.n.01', 'name': 'bookmaker'}, {'id': 15266, 'synset': 'bookworm.n.02', 'name': 'bookworm'}, {'id': 15267, 'synset': 'booster.n.03', 'name': 'booster'}, {'id': 15268, 'synset': 'bootblack.n.01', 'name': 'bootblack'}, {'id': 15269, 'synset': 'bootlegger.n.01', 'name': 'bootlegger'}, {'id': 15270, 'synset': 'bootmaker.n.01', 'name': 'bootmaker'}, {'id': 15271, 'synset': 'borderer.n.01', 'name': 'borderer'}, {'id': 15272, 'synset': 'border_patrolman.n.01', 'name': 'border_patrolman'}, {'id': 15273, 'synset': 'botanist.n.01', 'name': 'botanist'}, {'id': 15274, 'synset': 'bottom_feeder.n.01', 'name': 'bottom_feeder'}, {'id': 15275, 'synset': 'boulevardier.n.01', 'name': 'boulevardier'}, {'id': 15276, 'synset': 'bounty_hunter.n.02', 'name': 'bounty_hunter'}, {'id': 15277, 'synset': 'bounty_hunter.n.01', 'name': 'bounty_hunter'}, {'id': 15278, 'synset': 'bourbon.n.03', 'name': 'Bourbon'}, {'id': 15279, 'synset': 'bowler.n.01', 'name': 'bowler'}, {'id': 15280, 'synset': 'slugger.n.02', 'name': 'slugger'}, {'id': 15281, 'synset': 'cub.n.02', 'name': 'cub'}, {'id': 15282, 'synset': 'boy_scout.n.01', 'name': 'Boy_Scout'}, {'id': 15283, 'synset': 'boy_scout.n.02', 'name': 'boy_scout'}, {'id': 15284, 'synset': 'boy_wonder.n.01', 'name': 'boy_wonder'}, {'id': 15285, 'synset': 'bragger.n.01', 'name': 'bragger'}, {'id': 15286, 'synset': 'brahman.n.02', 'name': 'brahman'}, {'id': 15287, 'synset': 'brawler.n.01', 'name': 'brawler'}, {'id': 15288, 'synset': 'breadwinner.n.01', 'name': 'breadwinner'}, {'id': 15289, 'synset': 'breaststroker.n.01', 'name': 'breaststroker'}, {'id': 15290, 'synset': 'breeder.n.01', 'name': 'breeder'}, {'id': 15291, 'synset': 'brick.n.02', 'name': 'brick'}, {'id': 15292, 'synset': 'bride.n.03', 'name': 'bride'}, {'id': 15293, 'synset': 'bridesmaid.n.01', 'name': 'bridesmaid'}, {'id': 15294, 'synset': 'bridge_agent.n.01', 'name': 'bridge_agent'}, {'id': 15295, 'synset': 'broadcast_journalist.n.01', 'name': 'broadcast_journalist'}, {'id': 15296, 'synset': 'brother.n.05', 'name': 'Brother'}, {'id': 15297, 'synset': 'brother-in-law.n.01', 'name': 'brother-in-law'}, {'id': 15298, 'synset': 'browser.n.01', 'name': 'browser'}, {'id': 15299, 'synset': 'brummie.n.01', 'name': 'Brummie'}, {'id': 15300, 'synset': 'buddy.n.01', 'name': 'buddy'}, {'id': 15301, 'synset': 'bull.n.06', 'name': 'bull'}, {'id': 15302, 'synset': 'bully.n.02', 'name': 'bully'}, {'id': 15303, 'synset': 'bunny.n.01', 'name': 'bunny'}, {'id': 15304, 'synset': 'burglar.n.01', 'name': 'burglar'}, {'id': 15305, 'synset': 'bursar.n.01', 'name': 'bursar'}, {'id': 15306, 'synset': 'busboy.n.01', 'name': 'busboy'}, {'id': 15307, 'synset': 'business_editor.n.01', 'name': 'business_editor'}, {'id': 15308, 'synset': 'business_traveler.n.01', 'name': 'business_traveler'}, {'id': 15309, 'synset': 'buster.n.04', 'name': 'buster'}, {'id': 15310, 'synset': 'busybody.n.01', 'name': 'busybody'}, {'id': 15311, 'synset': 'buttinsky.n.01', 'name': 'buttinsky'}, {'id': 15312, 'synset': 'cabinetmaker.n.01', 'name': 'cabinetmaker'}, {'id': 15313, 'synset': 'caddie.n.01', 'name': 'caddie'}, {'id': 15314, 'synset': 'cadet.n.01', 'name': 'cadet'}, {'id': 15315, 'synset': 'caller.n.04', 'name': 'caller'}, {'id': 15316, 'synset': 'call_girl.n.01', 'name': 'call_girl'}, {'id': 15317, 'synset': 'calligrapher.n.01', 'name': 'calligrapher'}, {'id': 15318, 'synset': 'campaigner.n.01', 'name': 'campaigner'}, {'id': 15319, 'synset': 'camper.n.01', 'name': 'camper'}, {'id': 15320, 'synset': 'camp_follower.n.02', 'name': 'camp_follower'}, {'id': 15321, 'synset': 'candidate.n.02', 'name': 'candidate'}, {'id': 15322, 'synset': 'canonist.n.01', 'name': 'canonist'}, {'id': 15323, 'synset': 'capitalist.n.01', 'name': 'capitalist'}, {'id': 15324, 'synset': 'captain.n.07', 'name': 'captain'}, {'id': 15325, 'synset': 'captain.n.06', 'name': 'captain'}, {'id': 15326, 'synset': 'captain.n.01', 'name': 'captain'}, {'id': 15327, 'synset': 'captain.n.05', 'name': 'captain'}, {'id': 15328, 'synset': 'captive.n.02', 'name': 'captive'}, {'id': 15329, 'synset': 'captive.n.03', 'name': 'captive'}, {'id': 15330, 'synset': 'cardinal.n.01', 'name': 'cardinal'}, {'id': 15331, 'synset': 'cardiologist.n.01', 'name': 'cardiologist'}, {'id': 15332, 'synset': 'card_player.n.01', 'name': 'card_player'}, {'id': 15333, 'synset': 'cardsharp.n.01', 'name': 'cardsharp'}, {'id': 15334, 'synset': 'careerist.n.01', 'name': 'careerist'}, {'id': 15335, 'synset': 'career_man.n.01', 'name': 'career_man'}, {'id': 15336, 'synset': 'caregiver.n.02', 'name': 'caregiver'}, {'id': 15337, 'synset': 'caretaker.n.01', 'name': 'caretaker'}, {'id': 15338, 'synset': 'caretaker.n.02', 'name': 'caretaker'}, {'id': 15339, 'synset': 'caricaturist.n.01', 'name': 'caricaturist'}, {'id': 15340, 'synset': 'carillonneur.n.01', 'name': 'carillonneur'}, {'id': 15341, 'synset': 'caroler.n.01', 'name': 'caroler'}, {'id': 15342, 'synset': 'carpenter.n.01', 'name': 'carpenter'}, {'id': 15343, 'synset': 'carper.n.01', 'name': 'carper'}, {'id': 15344, 'synset': 'cartesian.n.01', 'name': 'Cartesian'}, {'id': 15345, 'synset': 'cashier.n.02', 'name': 'cashier'}, {'id': 15346, 'synset': 'casualty.n.02', 'name': 'casualty'}, {'id': 15347, 'synset': 'casualty.n.01', 'name': 'casualty'}, {'id': 15348, 'synset': 'casuist.n.01', 'name': 'casuist'}, {'id': 15349, 'synset': 'catechist.n.01', 'name': 'catechist'}, {'id': 15350, 'synset': 'catechumen.n.01', 'name': 'catechumen'}, {'id': 15351, 'synset': 'caterer.n.01', 'name': 'caterer'}, {'id': 15352, 'synset': 'catholicos.n.01', 'name': 'Catholicos'}, {'id': 15353, 'synset': 'cat_fancier.n.01', 'name': 'cat_fancier'}, {'id': 15354, 'synset': 'cavalier.n.02', 'name': 'Cavalier'}, {'id': 15355, 'synset': 'cavalryman.n.02', 'name': 'cavalryman'}, {'id': 15356, 'synset': 'caveman.n.01', 'name': 'caveman'}, {'id': 15357, 'synset': 'celebrant.n.02', 'name': 'celebrant'}, {'id': 15358, 'synset': 'celebrant.n.01', 'name': 'celebrant'}, {'id': 15359, 'synset': 'celebrity.n.01', 'name': 'celebrity'}, {'id': 15360, 'synset': 'cellist.n.01', 'name': 'cellist'}, {'id': 15361, 'synset': 'censor.n.02', 'name': 'censor'}, {'id': 15362, 'synset': 'censor.n.01', 'name': 'censor'}, {'id': 15363, 'synset': 'centenarian.n.01', 'name': 'centenarian'}, {'id': 15364, 'synset': 'centrist.n.01', 'name': 'centrist'}, {'id': 15365, 'synset': 'centurion.n.01', 'name': 'centurion'}, {'id': 15366, 'synset': 'certified_public_accountant.n.01', 'name': 'certified_public_accountant'}, {'id': 15367, 'synset': 'chachka.n.01', 'name': 'chachka'}, {'id': 15368, 'synset': 'chambermaid.n.01', 'name': 'chambermaid'}, {'id': 15369, 'synset': 'chameleon.n.01', 'name': 'chameleon'}, {'id': 15370, 'synset': 'champion.n.01', 'name': 'champion'}, {'id': 15371, 'synset': 'chandler.n.02', 'name': 'chandler'}, {'id': 15372, 'synset': 'prison_chaplain.n.01', 'name': 'prison_chaplain'}, {'id': 15373, 'synset': 'charcoal_burner.n.01', 'name': 'charcoal_burner'}, {'id': 15374, 'synset': "charge_d'affaires.n.01", 'name': "charge_d'affaires"}, {'id': 15375, 'synset': 'charioteer.n.01', 'name': 'charioteer'}, {'id': 15376, 'synset': 'charmer.n.02', 'name': 'charmer'}, {'id': 15377, 'synset': 'chartered_accountant.n.01', 'name': 'chartered_accountant'}, {'id': 15378, 'synset': 'chartist.n.02', 'name': 'chartist'}, {'id': 15379, 'synset': 'charwoman.n.01', 'name': 'charwoman'}, {'id': 15380, 'synset': 'male_chauvinist.n.01', 'name': 'male_chauvinist'}, {'id': 15381, 'synset': 'cheapskate.n.01', 'name': 'cheapskate'}, {'id': 15382, 'synset': 'chechen.n.01', 'name': 'Chechen'}, {'id': 15383, 'synset': 'checker.n.02', 'name': 'checker'}, {'id': 15384, 'synset': 'cheerer.n.01', 'name': 'cheerer'}, {'id': 15385, 'synset': 'cheerleader.n.02', 'name': 'cheerleader'}, {'id': 15386, 'synset': 'cheerleader.n.01', 'name': 'cheerleader'}, {'id': 15387, 'synset': 'cheops.n.01', 'name': 'Cheops'}, {'id': 15388, 'synset': 'chess_master.n.01', 'name': 'chess_master'}, {'id': 15389, 'synset': 'chief_executive_officer.n.01', 'name': 'chief_executive_officer'}, {'id': 15390, 'synset': 'chief_of_staff.n.01', 'name': 'chief_of_staff'}, {'id': 15391, 'synset': 'chief_petty_officer.n.01', 'name': 'chief_petty_officer'}, {'id': 15392, 'synset': 'chief_secretary.n.01', 'name': 'Chief_Secretary'}, {'id': 15393, 'synset': 'child.n.01', 'name': 'child'}, {'id': 15394, 'synset': 'child.n.02', 'name': 'child'}, {'id': 15395, 'synset': 'child.n.03', 'name': 'child'}, {'id': 15396, 'synset': 'child_prodigy.n.01', 'name': 'child_prodigy'}, {'id': 15397, 'synset': 'chimneysweeper.n.01', 'name': 'chimneysweeper'}, {'id': 15398, 'synset': 'chiropractor.n.01', 'name': 'chiropractor'}, {'id': 15399, 'synset': 'chit.n.01', 'name': 'chit'}, {'id': 15400, 'synset': 'choker.n.02', 'name': 'choker'}, {'id': 15401, 'synset': 'choragus.n.01', 'name': 'choragus'}, {'id': 15402, 'synset': 'choreographer.n.01', 'name': 'choreographer'}, {'id': 15403, 'synset': 'chorus_girl.n.01', 'name': 'chorus_girl'}, {'id': 15404, 'synset': 'chosen.n.01', 'name': 'chosen'}, {'id': 15405, 'synset': 'cicerone.n.01', 'name': 'cicerone'}, {'id': 15406, 'synset': 'cigar_smoker.n.01', 'name': 'cigar_smoker'}, {'id': 15407, 'synset': 'cipher.n.04', 'name': 'cipher'}, {'id': 15408, 'synset': 'circus_acrobat.n.01', 'name': 'circus_acrobat'}, {'id': 15409, 'synset': 'citizen.n.01', 'name': 'citizen'}, {'id': 15410, 'synset': 'city_editor.n.01', 'name': 'city_editor'}, {'id': 15411, 'synset': 'city_father.n.01', 'name': 'city_father'}, {'id': 15412, 'synset': 'city_man.n.01', 'name': 'city_man'}, {'id': 15413, 'synset': 'city_slicker.n.01', 'name': 'city_slicker'}, {'id': 15414, 'synset': 'civic_leader.n.01', 'name': 'civic_leader'}, {'id': 15415, 'synset': 'civil_rights_leader.n.01', 'name': 'civil_rights_leader'}, {'id': 15416, 'synset': 'cleaner.n.03', 'name': 'cleaner'}, {'id': 15417, 'synset': 'clergyman.n.01', 'name': 'clergyman'}, {'id': 15418, 'synset': 'cleric.n.01', 'name': 'cleric'}, {'id': 15419, 'synset': 'clerk.n.01', 'name': 'clerk'}, {'id': 15420, 'synset': 'clever_dick.n.01', 'name': 'clever_Dick'}, {'id': 15421, 'synset': 'climatologist.n.01', 'name': 'climatologist'}, {'id': 15422, 'synset': 'climber.n.04', 'name': 'climber'}, {'id': 15423, 'synset': 'clinician.n.01', 'name': 'clinician'}, {'id': 15424, 'synset': 'closer.n.02', 'name': 'closer'}, {'id': 15425, 'synset': 'closet_queen.n.01', 'name': 'closet_queen'}, {'id': 15426, 'synset': 'clown.n.02', 'name': 'clown'}, {'id': 15427, 'synset': 'clown.n.01', 'name': 'clown'}, {'id': 15428, 'synset': 'coach.n.02', 'name': 'coach'}, {'id': 15429, 'synset': 'coach.n.01', 'name': 'coach'}, {'id': 15430, 'synset': 'pitching_coach.n.01', 'name': 'pitching_coach'}, {'id': 15431, 'synset': 'coachman.n.01', 'name': 'coachman'}, {'id': 15432, 'synset': 'coal_miner.n.01', 'name': 'coal_miner'}, {'id': 15433, 'synset': 'coastguardsman.n.01', 'name': 'coastguardsman'}, {'id': 15434, 'synset': 'cobber.n.01', 'name': 'cobber'}, {'id': 15435, 'synset': 'cobbler.n.01', 'name': 'cobbler'}, {'id': 15436, 'synset': 'codger.n.01', 'name': 'codger'}, {'id': 15437, 'synset': 'co-beneficiary.n.01', 'name': 'co-beneficiary'}, {'id': 15438, 'synset': 'cog.n.01', 'name': 'cog'}, {'id': 15439, 'synset': 'cognitive_neuroscientist.n.01', 'name': 'cognitive_neuroscientist'}, {'id': 15440, 'synset': 'coiffeur.n.01', 'name': 'coiffeur'}, {'id': 15441, 'synset': 'coiner.n.02', 'name': 'coiner'}, {'id': 15442, 'synset': 'collaborator.n.03', 'name': 'collaborator'}, {'id': 15443, 'synset': 'colleen.n.01', 'name': 'colleen'}, {'id': 15444, 'synset': 'college_student.n.01', 'name': 'college_student'}, {'id': 15445, 'synset': 'collegian.n.01', 'name': 'collegian'}, {'id': 15446, 'synset': 'colonial.n.01', 'name': 'colonial'}, {'id': 15447, 'synset': 'colonialist.n.01', 'name': 'colonialist'}, {'id': 15448, 'synset': 'colonizer.n.01', 'name': 'colonizer'}, {'id': 15449, 'synset': 'coloratura.n.01', 'name': 'coloratura'}, {'id': 15450, 'synset': 'color_guard.n.01', 'name': 'color_guard'}, {'id': 15451, 'synset': 'colossus.n.02', 'name': 'colossus'}, {'id': 15452, 'synset': 'comedian.n.02', 'name': 'comedian'}, {'id': 15453, 'synset': 'comedienne.n.02', 'name': 'comedienne'}, {'id': 15454, 'synset': 'comer.n.01', 'name': 'comer'}, {'id': 15455, 'synset': 'commander.n.03', 'name': 'commander'}, {'id': 15456, 'synset': 'commander_in_chief.n.01', 'name': 'commander_in_chief'}, {'id': 15457, 'synset': 'commanding_officer.n.01', 'name': 'commanding_officer'}, {'id': 15458, 'synset': 'commissar.n.01', 'name': 'commissar'}, {'id': 15459, 'synset': 'commissioned_officer.n.01', 'name': 'commissioned_officer'}, {'id': 15460, 'synset': 'commissioned_military_officer.n.01', 'name': 'commissioned_military_officer'}, {'id': 15461, 'synset': 'commissioner.n.01', 'name': 'commissioner'}, {'id': 15462, 'synset': 'commissioner.n.02', 'name': 'commissioner'}, {'id': 15463, 'synset': 'committee_member.n.01', 'name': 'committee_member'}, {'id': 15464, 'synset': 'committeewoman.n.01', 'name': 'committeewoman'}, {'id': 15465, 'synset': 'commodore.n.01', 'name': 'commodore'}, {'id': 15466, 'synset': 'communicant.n.01', 'name': 'communicant'}, {'id': 15467, 'synset': 'communist.n.02', 'name': 'communist'}, {'id': 15468, 'synset': 'communist.n.01', 'name': 'Communist'}, {'id': 15469, 'synset': 'commuter.n.02', 'name': 'commuter'}, {'id': 15470, 'synset': 'compere.n.01', 'name': 'compere'}, {'id': 15471, 'synset': 'complexifier.n.01', 'name': 'complexifier'}, {'id': 15472, 'synset': 'compulsive.n.01', 'name': 'compulsive'}, {'id': 15473, 'synset': 'computational_linguist.n.01', 'name': 'computational_linguist'}, {'id': 15474, 'synset': 'computer_scientist.n.01', 'name': 'computer_scientist'}, {'id': 15475, 'synset': 'computer_user.n.01', 'name': 'computer_user'}, {'id': 15476, 'synset': 'comrade.n.02', 'name': 'Comrade'}, {'id': 15477, 'synset': 'concert-goer.n.01', 'name': 'concert-goer'}, {'id': 15478, 'synset': 'conciliator.n.01', 'name': 'conciliator'}, {'id': 15479, 'synset': 'conductor.n.03', 'name': 'conductor'}, {'id': 15480, 'synset': 'confectioner.n.01', 'name': 'confectioner'}, {'id': 15481, 'synset': 'confederate.n.01', 'name': 'Confederate'}, {'id': 15482, 'synset': 'confessor.n.01', 'name': 'confessor'}, {'id': 15483, 'synset': 'confidant.n.01', 'name': 'confidant'}, {'id': 15484, 'synset': 'confucian.n.01', 'name': 'Confucian'}, {'id': 15485, 'synset': 'rep.n.01', 'name': 'rep'}, {'id': 15486, 'synset': 'conqueror.n.01', 'name': 'conqueror'}, {'id': 15487, 'synset': 'conservative.n.02', 'name': 'Conservative'}, {'id': 15488, 'synset': 'nonconformist.n.01', 'name': 'Nonconformist'}, {'id': 15489, 'synset': 'anglican.n.01', 'name': 'Anglican'}, {'id': 15490, 'synset': 'consignee.n.01', 'name': 'consignee'}, {'id': 15491, 'synset': 'consigner.n.01', 'name': 'consigner'}, {'id': 15492, 'synset': 'constable.n.01', 'name': 'constable'}, {'id': 15493, 'synset': 'constructivist.n.01', 'name': 'constructivist'}, {'id': 15494, 'synset': 'contractor.n.01', 'name': 'contractor'}, {'id': 15495, 'synset': 'contralto.n.01', 'name': 'contralto'}, {'id': 15496, 'synset': 'contributor.n.02', 'name': 'contributor'}, {'id': 15497, 'synset': 'control_freak.n.01', 'name': 'control_freak'}, {'id': 15498, 'synset': 'convalescent.n.01', 'name': 'convalescent'}, {'id': 15499, 'synset': 'convener.n.01', 'name': 'convener'}, {'id': 15500, 'synset': 'convict.n.01', 'name': 'convict'}, {'id': 15501, 'synset': 'copilot.n.01', 'name': 'copilot'}, {'id': 15502, 'synset': 'copycat.n.01', 'name': 'copycat'}, {'id': 15503, 'synset': 'coreligionist.n.01', 'name': 'coreligionist'}, {'id': 15504, 'synset': 'cornerback.n.01', 'name': 'cornerback'}, {'id': 15505, 'synset': 'corporatist.n.01', 'name': 'corporatist'}, {'id': 15506, 'synset': 'correspondent.n.01', 'name': 'correspondent'}, {'id': 15507, 'synset': 'cosmetician.n.01', 'name': 'cosmetician'}, {'id': 15508, 'synset': 'cosmopolitan.n.01', 'name': 'cosmopolitan'}, {'id': 15509, 'synset': 'cossack.n.01', 'name': 'Cossack'}, {'id': 15510, 'synset': 'cost_accountant.n.01', 'name': 'cost_accountant'}, {'id': 15511, 'synset': 'co-star.n.01', 'name': 'co-star'}, {'id': 15512, 'synset': 'costumier.n.01', 'name': 'costumier'}, {'id': 15513, 'synset': 'cotter.n.02', 'name': 'cotter'}, {'id': 15514, 'synset': 'cotter.n.01', 'name': 'cotter'}, {'id': 15515, 'synset': 'counselor.n.01', 'name': 'counselor'}, {'id': 15516, 'synset': 'counterterrorist.n.01', 'name': 'counterterrorist'}, {'id': 15517, 'synset': 'counterspy.n.01', 'name': 'counterspy'}, {'id': 15518, 'synset': 'countess.n.01', 'name': 'countess'}, {'id': 15519, 'synset': 'compromiser.n.01', 'name': 'compromiser'}, {'id': 15520, 'synset': 'countrywoman.n.01', 'name': 'countrywoman'}, {'id': 15521, 'synset': 'county_agent.n.01', 'name': 'county_agent'}, {'id': 15522, 'synset': 'courtier.n.01', 'name': 'courtier'}, {'id': 15523, 'synset': 'cousin.n.01', 'name': 'cousin'}, {'id': 15524, 'synset': 'cover_girl.n.01', 'name': 'cover_girl'}, {'id': 15525, 'synset': 'cow.n.03', 'name': 'cow'}, {'id': 15526, 'synset': 'craftsman.n.03', 'name': 'craftsman'}, {'id': 15527, 'synset': 'craftsman.n.02', 'name': 'craftsman'}, {'id': 15528, 'synset': 'crapshooter.n.01', 'name': 'crapshooter'}, {'id': 15529, 'synset': 'crazy.n.01', 'name': 'crazy'}, {'id': 15530, 'synset': 'creature.n.02', 'name': 'creature'}, {'id': 15531, 'synset': 'creditor.n.01', 'name': 'creditor'}, {'id': 15532, 'synset': 'creep.n.01', 'name': 'creep'}, {'id': 15533, 'synset': 'criminologist.n.01', 'name': 'criminologist'}, {'id': 15534, 'synset': 'critic.n.02', 'name': 'critic'}, {'id': 15535, 'synset': 'croesus.n.02', 'name': 'Croesus'}, {'id': 15536, 'synset': 'cross-examiner.n.01', 'name': 'cross-examiner'}, {'id': 15537, 'synset': 'crossover_voter.n.01', 'name': 'crossover_voter'}, {'id': 15538, 'synset': 'croupier.n.01', 'name': 'croupier'}, {'id': 15539, 'synset': 'crown_prince.n.01', 'name': 'crown_prince'}, {'id': 15540, 'synset': 'crown_princess.n.01', 'name': 'crown_princess'}, {'id': 15541, 'synset': 'cryptanalyst.n.01', 'name': 'cryptanalyst'}, {'id': 15542, 'synset': 'cub_scout.n.01', 'name': 'Cub_Scout'}, {'id': 15543, 'synset': 'cuckold.n.01', 'name': 'cuckold'}, {'id': 15544, 'synset': 'cultist.n.02', 'name': 'cultist'}, {'id': 15545, 'synset': 'curandera.n.01', 'name': 'curandera'}, {'id': 15546, 'synset': 'curate.n.01', 'name': 'curate'}, {'id': 15547, 'synset': 'curator.n.01', 'name': 'curator'}, {'id': 15548, 'synset': 'customer_agent.n.01', 'name': 'customer_agent'}, {'id': 15549, 'synset': 'cutter.n.02', 'name': 'cutter'}, {'id': 15550, 'synset': 'cyberpunk.n.02', 'name': 'cyberpunk'}, {'id': 15551, 'synset': 'cyborg.n.01', 'name': 'cyborg'}, {'id': 15552, 'synset': 'cymbalist.n.01', 'name': 'cymbalist'}, {'id': 15553, 'synset': 'cynic.n.02', 'name': 'Cynic'}, {'id': 15554, 'synset': 'cytogeneticist.n.01', 'name': 'cytogeneticist'}, {'id': 15555, 'synset': 'cytologist.n.01', 'name': 'cytologist'}, {'id': 15556, 'synset': 'czar.n.02', 'name': 'czar'}, {'id': 15557, 'synset': 'czar.n.01', 'name': 'czar'}, {'id': 15558, 'synset': 'dad.n.01', 'name': 'dad'}, {'id': 15559, 'synset': 'dairyman.n.02', 'name': 'dairyman'}, {'id': 15560, 'synset': 'dalai_lama.n.01', 'name': 'Dalai_Lama'}, {'id': 15561, 'synset': 'dallier.n.01', 'name': 'dallier'}, {'id': 15562, 'synset': 'dancer.n.01', 'name': 'dancer'}, {'id': 15563, 'synset': 'dancer.n.02', 'name': 'dancer'}, {'id': 15564, 'synset': 'clog_dancer.n.01', 'name': 'clog_dancer'}, {'id': 15565, 'synset': 'dancing-master.n.01', 'name': 'dancing-master'}, {'id': 15566, 'synset': 'dark_horse.n.01', 'name': 'dark_horse'}, {'id': 15567, 'synset': 'darling.n.01', 'name': 'darling'}, {'id': 15568, 'synset': 'date.n.02', 'name': 'date'}, {'id': 15569, 'synset': 'daughter.n.01', 'name': 'daughter'}, {'id': 15570, 'synset': 'dawdler.n.01', 'name': 'dawdler'}, {'id': 15571, 'synset': 'day_boarder.n.01', 'name': 'day_boarder'}, {'id': 15572, 'synset': 'day_laborer.n.01', 'name': 'day_laborer'}, {'id': 15573, 'synset': 'deacon.n.01', 'name': 'deacon'}, {'id': 15574, 'synset': 'deaconess.n.01', 'name': 'deaconess'}, {'id': 15575, 'synset': 'deadeye.n.01', 'name': 'deadeye'}, {'id': 15576, 'synset': 'deipnosophist.n.01', 'name': 'deipnosophist'}, {'id': 15577, 'synset': 'dropout.n.02', 'name': 'dropout'}, {'id': 15578, 'synset': 'deadhead.n.01', 'name': 'deadhead'}, {'id': 15579, 'synset': 'deaf_person.n.01', 'name': 'deaf_person'}, {'id': 15580, 'synset': 'debtor.n.01', 'name': 'debtor'}, {'id': 15581, 'synset': 'deckhand.n.01', 'name': 'deckhand'}, {'id': 15582, 'synset': 'defamer.n.01', 'name': 'defamer'}, {'id': 15583, 'synset': 'defense_contractor.n.01', 'name': 'defense_contractor'}, {'id': 15584, 'synset': 'deist.n.01', 'name': 'deist'}, {'id': 15585, 'synset': 'delegate.n.01', 'name': 'delegate'}, {'id': 15586, 'synset': 'deliveryman.n.01', 'name': 'deliveryman'}, {'id': 15587, 'synset': 'demagogue.n.01', 'name': 'demagogue'}, {'id': 15588, 'synset': 'demigod.n.01', 'name': 'demigod'}, {'id': 15589, 'synset': 'demographer.n.01', 'name': 'demographer'}, {'id': 15590, 'synset': 'demonstrator.n.03', 'name': 'demonstrator'}, {'id': 15591, 'synset': 'den_mother.n.02', 'name': 'den_mother'}, {'id': 15592, 'synset': 'department_head.n.01', 'name': 'department_head'}, {'id': 15593, 'synset': 'depositor.n.01', 'name': 'depositor'}, {'id': 15594, 'synset': 'deputy.n.03', 'name': 'deputy'}, {'id': 15595, 'synset': 'dermatologist.n.01', 'name': 'dermatologist'}, {'id': 15596, 'synset': 'descender.n.01', 'name': 'descender'}, {'id': 15597, 'synset': 'designated_hitter.n.01', 'name': 'designated_hitter'}, {'id': 15598, 'synset': 'designer.n.04', 'name': 'designer'}, {'id': 15599, 'synset': 'desk_clerk.n.01', 'name': 'desk_clerk'}, {'id': 15600, 'synset': 'desk_officer.n.01', 'name': 'desk_officer'}, {'id': 15601, 'synset': 'desk_sergeant.n.01', 'name': 'desk_sergeant'}, {'id': 15602, 'synset': 'detainee.n.01', 'name': 'detainee'}, {'id': 15603, 'synset': 'detective.n.01', 'name': 'detective'}, {'id': 15604, 'synset': 'detective.n.02', 'name': 'detective'}, {'id': 15605, 'synset': 'detractor.n.01', 'name': 'detractor'}, {'id': 15606, 'synset': 'developer.n.01', 'name': 'developer'}, {'id': 15607, 'synset': 'deviationist.n.01', 'name': 'deviationist'}, {'id': 15608, 'synset': 'devisee.n.01', 'name': 'devisee'}, {'id': 15609, 'synset': 'devisor.n.01', 'name': 'devisor'}, {'id': 15610, 'synset': 'devourer.n.01', 'name': 'devourer'}, {'id': 15611, 'synset': 'dialectician.n.01', 'name': 'dialectician'}, {'id': 15612, 'synset': 'diarist.n.01', 'name': 'diarist'}, {'id': 15613, 'synset': 'dietician.n.01', 'name': 'dietician'}, {'id': 15614, 'synset': 'diocesan.n.01', 'name': 'diocesan'}, {'id': 15615, 'synset': 'director.n.03', 'name': 'director'}, {'id': 15616, 'synset': 'director.n.02', 'name': 'director'}, {'id': 15617, 'synset': 'dirty_old_man.n.01', 'name': 'dirty_old_man'}, {'id': 15618, 'synset': 'disbeliever.n.01', 'name': 'disbeliever'}, {'id': 15619, 'synset': 'disk_jockey.n.01', 'name': 'disk_jockey'}, {'id': 15620, 'synset': 'dispatcher.n.02', 'name': 'dispatcher'}, {'id': 15621, 'synset': 'distortionist.n.01', 'name': 'distortionist'}, {'id': 15622, 'synset': 'distributor.n.01', 'name': 'distributor'}, {'id': 15623, 'synset': 'district_attorney.n.01', 'name': 'district_attorney'}, {'id': 15624, 'synset': 'district_manager.n.01', 'name': 'district_manager'}, {'id': 15625, 'synset': 'diver.n.02', 'name': 'diver'}, {'id': 15626, 'synset': 'divorcee.n.01', 'name': 'divorcee'}, {'id': 15627, 'synset': 'ex-wife.n.01', 'name': 'ex-wife'}, {'id': 15628, 'synset': 'divorce_lawyer.n.01', 'name': 'divorce_lawyer'}, {'id': 15629, 'synset': 'docent.n.01', 'name': 'docent'}, {'id': 15630, 'synset': 'doctor.n.01', 'name': 'doctor'}, {'id': 15631, 'synset': 'dodo.n.01', 'name': 'dodo'}, {'id': 15632, 'synset': 'doge.n.01', 'name': 'doge'}, {'id': 15633, 'synset': 'dog_in_the_manger.n.01', 'name': 'dog_in_the_manger'}, {'id': 15634, 'synset': 'dogmatist.n.01', 'name': 'dogmatist'}, {'id': 15635, 'synset': 'dolichocephalic.n.01', 'name': 'dolichocephalic'}, {'id': 15636, 'synset': 'domestic_partner.n.01', 'name': 'domestic_partner'}, {'id': 15637, 'synset': 'dominican.n.02', 'name': 'Dominican'}, {'id': 15638, 'synset': 'dominus.n.01', 'name': 'dominus'}, {'id': 15639, 'synset': 'don.n.03', 'name': 'don'}, {'id': 15640, 'synset': 'donatist.n.01', 'name': 'Donatist'}, {'id': 15641, 'synset': 'donna.n.01', 'name': 'donna'}, {'id': 15642, 'synset': 'dosser.n.01', 'name': 'dosser'}, {'id': 15643, 'synset': 'double.n.03', 'name': 'double'}, {'id': 15644, 'synset': 'double-crosser.n.01', 'name': 'double-crosser'}, {'id': 15645, 'synset': 'down-and-out.n.01', 'name': 'down-and-out'}, {'id': 15646, 'synset': 'doyenne.n.01', 'name': 'doyenne'}, {'id': 15647, 'synset': 'draftsman.n.02', 'name': 'draftsman'}, {'id': 15648, 'synset': 'dramatist.n.01', 'name': 'dramatist'}, {'id': 15649, 'synset': 'dreamer.n.01', 'name': 'dreamer'}, {'id': 15650, 'synset': 'dressmaker.n.01', 'name': 'dressmaker'}, {'id': 15651, 'synset': "dressmaker's_model.n.01", 'name': "dressmaker's_model"}, {'id': 15652, 'synset': 'dribbler.n.02', 'name': 'dribbler'}, {'id': 15653, 'synset': 'dribbler.n.01', 'name': 'dribbler'}, {'id': 15654, 'synset': 'drinker.n.02', 'name': 'drinker'}, {'id': 15655, 'synset': 'drinker.n.01', 'name': 'drinker'}, {'id': 15656, 'synset': 'drug_addict.n.01', 'name': 'drug_addict'}, {'id': 15657, 'synset': 'drug_user.n.01', 'name': 'drug_user'}, {'id': 15658, 'synset': 'druid.n.01', 'name': 'Druid'}, {'id': 15659, 'synset': 'drum_majorette.n.02', 'name': 'drum_majorette'}, {'id': 15660, 'synset': 'drummer.n.01', 'name': 'drummer'}, {'id': 15661, 'synset': 'drunk.n.02', 'name': 'drunk'}, {'id': 15662, 'synset': 'drunkard.n.01', 'name': 'drunkard'}, {'id': 15663, 'synset': 'druze.n.01', 'name': 'Druze'}, {'id': 15664, 'synset': 'dry.n.01', 'name': 'dry'}, {'id': 15665, 'synset': 'dry_nurse.n.01', 'name': 'dry_nurse'}, {'id': 15666, 'synset': 'duchess.n.01', 'name': 'duchess'}, {'id': 15667, 'synset': 'duke.n.01', 'name': 'duke'}, {'id': 15668, 'synset': 'duffer.n.01', 'name': 'duffer'}, {'id': 15669, 'synset': 'dunker.n.02', 'name': 'dunker'}, {'id': 15670, 'synset': 'dutch_uncle.n.01', 'name': 'Dutch_uncle'}, {'id': 15671, 'synset': 'dyspeptic.n.01', 'name': 'dyspeptic'}, {'id': 15672, 'synset': 'eager_beaver.n.01', 'name': 'eager_beaver'}, {'id': 15673, 'synset': 'earl.n.01', 'name': 'earl'}, {'id': 15674, 'synset': 'earner.n.01', 'name': 'earner'}, {'id': 15675, 'synset': 'eavesdropper.n.01', 'name': 'eavesdropper'}, {'id': 15676, 'synset': 'eccentric.n.01', 'name': 'eccentric'}, {'id': 15677, 'synset': 'eclectic.n.01', 'name': 'eclectic'}, {'id': 15678, 'synset': 'econometrician.n.01', 'name': 'econometrician'}, {'id': 15679, 'synset': 'economist.n.01', 'name': 'economist'}, {'id': 15680, 'synset': 'ectomorph.n.01', 'name': 'ectomorph'}, {'id': 15681, 'synset': 'editor.n.01', 'name': 'editor'}, {'id': 15682, 'synset': 'egocentric.n.01', 'name': 'egocentric'}, {'id': 15683, 'synset': 'egotist.n.01', 'name': 'egotist'}, {'id': 15684, 'synset': 'ejaculator.n.01', 'name': 'ejaculator'}, {'id': 15685, 'synset': 'elder.n.03', 'name': 'elder'}, {'id': 15686, 'synset': 'elder_statesman.n.01', 'name': 'elder_statesman'}, {'id': 15687, 'synset': 'elected_official.n.01', 'name': 'elected_official'}, {'id': 15688, 'synset': 'electrician.n.01', 'name': 'electrician'}, {'id': 15689, 'synset': 'elegist.n.01', 'name': 'elegist'}, {'id': 15690, 'synset': 'elocutionist.n.01', 'name': 'elocutionist'}, {'id': 15691, 'synset': 'emancipator.n.01', 'name': 'emancipator'}, {'id': 15692, 'synset': 'embryologist.n.01', 'name': 'embryologist'}, {'id': 15693, 'synset': 'emeritus.n.01', 'name': 'emeritus'}, {'id': 15694, 'synset': 'emigrant.n.01', 'name': 'emigrant'}, {'id': 15695, 'synset': 'emissary.n.01', 'name': 'emissary'}, {'id': 15696, 'synset': 'empress.n.01', 'name': 'empress'}, {'id': 15697, 'synset': 'employee.n.01', 'name': 'employee'}, {'id': 15698, 'synset': 'employer.n.01', 'name': 'employer'}, {'id': 15699, 'synset': 'enchantress.n.02', 'name': 'enchantress'}, {'id': 15700, 'synset': 'enchantress.n.01', 'name': 'enchantress'}, {'id': 15701, 'synset': 'encyclopedist.n.01', 'name': 'encyclopedist'}, {'id': 15702, 'synset': 'endomorph.n.01', 'name': 'endomorph'}, {'id': 15703, 'synset': 'enemy.n.02', 'name': 'enemy'}, {'id': 15704, 'synset': 'energizer.n.01', 'name': 'energizer'}, {'id': 15705, 'synset': 'end_man.n.02', 'name': 'end_man'}, {'id': 15706, 'synset': 'end_man.n.01', 'name': 'end_man'}, {'id': 15707, 'synset': 'endorser.n.02', 'name': 'endorser'}, {'id': 15708, 'synset': 'enjoyer.n.01', 'name': 'enjoyer'}, {'id': 15709, 'synset': 'enlisted_woman.n.01', 'name': 'enlisted_woman'}, {'id': 15710, 'synset': 'enophile.n.01', 'name': 'enophile'}, {'id': 15711, 'synset': 'entrant.n.04', 'name': 'entrant'}, {'id': 15712, 'synset': 'entrant.n.03', 'name': 'entrant'}, {'id': 15713, 'synset': 'entrepreneur.n.01', 'name': 'entrepreneur'}, {'id': 15714, 'synset': 'envoy.n.01', 'name': 'envoy'}, {'id': 15715, 'synset': 'enzymologist.n.01', 'name': 'enzymologist'}, {'id': 15716, 'synset': 'eparch.n.01', 'name': 'eparch'}, {'id': 15717, 'synset': 'epidemiologist.n.01', 'name': 'epidemiologist'}, {'id': 15718, 'synset': 'epigone.n.01', 'name': 'epigone'}, {'id': 15719, 'synset': 'epileptic.n.01', 'name': 'epileptic'}, {'id': 15720, 'synset': 'episcopalian.n.01', 'name': 'Episcopalian'}, {'id': 15721, 'synset': 'equerry.n.02', 'name': 'equerry'}, {'id': 15722, 'synset': 'equerry.n.01', 'name': 'equerry'}, {'id': 15723, 'synset': 'erotic.n.01', 'name': 'erotic'}, {'id': 15724, 'synset': 'escapee.n.01', 'name': 'escapee'}, {'id': 15725, 'synset': 'escapist.n.01', 'name': 'escapist'}, {'id': 15726, 'synset': 'eskimo.n.01', 'name': 'Eskimo'}, {'id': 15727, 'synset': 'espionage_agent.n.01', 'name': 'espionage_agent'}, {'id': 15728, 'synset': 'esthetician.n.01', 'name': 'esthetician'}, {'id': 15729, 'synset': 'etcher.n.01', 'name': 'etcher'}, {'id': 15730, 'synset': 'ethnologist.n.01', 'name': 'ethnologist'}, {'id': 15731, 'synset': 'etonian.n.01', 'name': 'Etonian'}, {'id': 15732, 'synset': 'etymologist.n.01', 'name': 'etymologist'}, {'id': 15733, 'synset': 'evangelist.n.01', 'name': 'evangelist'}, {'id': 15734, 'synset': 'evangelist.n.02', 'name': 'Evangelist'}, {'id': 15735, 'synset': 'event_planner.n.01', 'name': 'event_planner'}, {'id': 15736, 'synset': 'examiner.n.02', 'name': 'examiner'}, {'id': 15737, 'synset': 'examiner.n.01', 'name': 'examiner'}, {'id': 15738, 'synset': 'exarch.n.03', 'name': 'exarch'}, {'id': 15739, 'synset': 'executant.n.01', 'name': 'executant'}, {'id': 15740, 'synset': 'executive_secretary.n.01', 'name': 'executive_secretary'}, {'id': 15741, 'synset': 'executive_vice_president.n.01', 'name': 'executive_vice_president'}, {'id': 15742, 'synset': 'executrix.n.01', 'name': 'executrix'}, {'id': 15743, 'synset': 'exegete.n.01', 'name': 'exegete'}, {'id': 15744, 'synset': 'exhibitor.n.01', 'name': 'exhibitor'}, {'id': 15745, 'synset': 'exhibitionist.n.02', 'name': 'exhibitionist'}, {'id': 15746, 'synset': 'exile.n.01', 'name': 'exile'}, {'id': 15747, 'synset': 'existentialist.n.01', 'name': 'existentialist'}, {'id': 15748, 'synset': 'exorcist.n.02', 'name': 'exorcist'}, {'id': 15749, 'synset': 'ex-spouse.n.01', 'name': 'ex-spouse'}, {'id': 15750, 'synset': 'extern.n.01', 'name': 'extern'}, {'id': 15751, 'synset': 'extremist.n.01', 'name': 'extremist'}, {'id': 15752, 'synset': 'extrovert.n.01', 'name': 'extrovert'}, {'id': 15753, 'synset': 'eyewitness.n.01', 'name': 'eyewitness'}, {'id': 15754, 'synset': 'facilitator.n.01', 'name': 'facilitator'}, {'id': 15755, 'synset': 'fairy_godmother.n.01', 'name': 'fairy_godmother'}, {'id': 15756, 'synset': 'falangist.n.01', 'name': 'falangist'}, {'id': 15757, 'synset': 'falconer.n.01', 'name': 'falconer'}, {'id': 15758, 'synset': 'falsifier.n.01', 'name': 'falsifier'}, {'id': 15759, 'synset': 'familiar.n.01', 'name': 'familiar'}, {'id': 15760, 'synset': 'fan.n.03', 'name': 'fan'}, {'id': 15761, 'synset': 'fanatic.n.01', 'name': 'fanatic'}, {'id': 15762, 'synset': 'fancier.n.01', 'name': 'fancier'}, {'id': 15763, 'synset': 'farm_boy.n.01', 'name': 'farm_boy'}, {'id': 15764, 'synset': 'farmer.n.01', 'name': 'farmer'}, {'id': 15765, 'synset': 'farmhand.n.01', 'name': 'farmhand'}, {'id': 15766, 'synset': 'fascist.n.01', 'name': 'fascist'}, {'id': 15767, 'synset': 'fascista.n.01', 'name': 'fascista'}, {'id': 15768, 'synset': 'fatalist.n.01', 'name': 'fatalist'}, {'id': 15769, 'synset': 'father.n.01', 'name': 'father'}, {'id': 15770, 'synset': 'father.n.03', 'name': 'Father'}, {'id': 15771, 'synset': 'father-figure.n.01', 'name': 'father-figure'}, {'id': 15772, 'synset': 'father-in-law.n.01', 'name': 'father-in-law'}, {'id': 15773, 'synset': 'fauntleroy.n.01', 'name': 'Fauntleroy'}, {'id': 15774, 'synset': 'fauve.n.01', 'name': 'Fauve'}, {'id': 15775, 'synset': 'favorite_son.n.01', 'name': 'favorite_son'}, {'id': 15776, 'synset': 'featherweight.n.03', 'name': 'featherweight'}, {'id': 15777, 'synset': 'federalist.n.02', 'name': 'federalist'}, {'id': 15778, 'synset': 'fellow_traveler.n.01', 'name': 'fellow_traveler'}, {'id': 15779, 'synset': 'female_aristocrat.n.01', 'name': 'female_aristocrat'}, {'id': 15780, 'synset': 'female_offspring.n.01', 'name': 'female_offspring'}, {'id': 15781, 'synset': 'female_child.n.01', 'name': 'female_child'}, {'id': 15782, 'synset': 'fence.n.02', 'name': 'fence'}, {'id': 15783, 'synset': 'fiance.n.01', 'name': 'fiance'}, {'id': 15784, 'synset': 'fielder.n.02', 'name': 'fielder'}, {'id': 15785, 'synset': 'field_judge.n.01', 'name': 'field_judge'}, {'id': 15786, 'synset': 'fighter_pilot.n.01', 'name': 'fighter_pilot'}, {'id': 15787, 'synset': 'filer.n.01', 'name': 'filer'}, {'id': 15788, 'synset': 'film_director.n.01', 'name': 'film_director'}, {'id': 15789, 'synset': 'finder.n.01', 'name': 'finder'}, {'id': 15790, 'synset': 'fire_chief.n.01', 'name': 'fire_chief'}, {'id': 15791, 'synset': 'fire-eater.n.03', 'name': 'fire-eater'}, {'id': 15792, 'synset': 'fire-eater.n.02', 'name': 'fire-eater'}, {'id': 15793, 'synset': 'fireman.n.04', 'name': 'fireman'}, {'id': 15794, 'synset': 'fire_marshall.n.01', 'name': 'fire_marshall'}, {'id': 15795, 'synset': 'fire_walker.n.01', 'name': 'fire_walker'}, {'id': 15796, 'synset': 'first_baseman.n.01', 'name': 'first_baseman'}, {'id': 15797, 'synset': 'firstborn.n.01', 'name': 'firstborn'}, {'id': 15798, 'synset': 'first_lady.n.02', 'name': 'first_lady'}, {'id': 15799, 'synset': 'first_lieutenant.n.01', 'name': 'first_lieutenant'}, {'id': 15800, 'synset': 'first_offender.n.01', 'name': 'first_offender'}, {'id': 15801, 'synset': 'first_sergeant.n.01', 'name': 'first_sergeant'}, {'id': 15802, 'synset': 'fishmonger.n.01', 'name': 'fishmonger'}, {'id': 15803, 'synset': 'flagellant.n.02', 'name': 'flagellant'}, {'id': 15804, 'synset': 'flag_officer.n.01', 'name': 'flag_officer'}, {'id': 15805, 'synset': 'flak_catcher.n.01', 'name': 'flak_catcher'}, {'id': 15806, 'synset': 'flanker_back.n.01', 'name': 'flanker_back'}, {'id': 15807, 'synset': 'flapper.n.01', 'name': 'flapper'}, {'id': 15808, 'synset': 'flatmate.n.01', 'name': 'flatmate'}, {'id': 15809, 'synset': 'flatterer.n.01', 'name': 'flatterer'}, {'id': 15810, 'synset': 'flibbertigibbet.n.01', 'name': 'flibbertigibbet'}, {'id': 15811, 'synset': 'flight_surgeon.n.01', 'name': 'flight_surgeon'}, {'id': 15812, 'synset': 'floorwalker.n.01', 'name': 'floorwalker'}, {'id': 15813, 'synset': 'flop.n.02', 'name': 'flop'}, {'id': 15814, 'synset': 'florentine.n.01', 'name': 'Florentine'}, {'id': 15815, 'synset': 'flower_girl.n.02', 'name': 'flower_girl'}, {'id': 15816, 'synset': 'flower_girl.n.01', 'name': 'flower_girl'}, {'id': 15817, 'synset': 'flutist.n.01', 'name': 'flutist'}, {'id': 15818, 'synset': 'fly-by-night.n.01', 'name': 'fly-by-night'}, {'id': 15819, 'synset': 'flyweight.n.02', 'name': 'flyweight'}, {'id': 15820, 'synset': 'flyweight.n.01', 'name': 'flyweight'}, {'id': 15821, 'synset': 'foe.n.02', 'name': 'foe'}, {'id': 15822, 'synset': 'folk_dancer.n.01', 'name': 'folk_dancer'}, {'id': 15823, 'synset': 'folk_poet.n.01', 'name': 'folk_poet'}, {'id': 15824, 'synset': 'follower.n.01', 'name': 'follower'}, {'id': 15825, 'synset': 'football_hero.n.01', 'name': 'football_hero'}, {'id': 15826, 'synset': 'football_player.n.01', 'name': 'football_player'}, {'id': 15827, 'synset': 'footman.n.01', 'name': 'footman'}, {'id': 15828, 'synset': 'forefather.n.01', 'name': 'forefather'}, {'id': 15829, 'synset': 'foremother.n.01', 'name': 'foremother'}, {'id': 15830, 'synset': 'foreign_agent.n.01', 'name': 'foreign_agent'}, {'id': 15831, 'synset': 'foreigner.n.02', 'name': 'foreigner'}, {'id': 15832, 'synset': 'boss.n.03', 'name': 'boss'}, {'id': 15833, 'synset': 'foreman.n.02', 'name': 'foreman'}, {'id': 15834, 'synset': 'forester.n.02', 'name': 'forester'}, {'id': 15835, 'synset': 'forewoman.n.02', 'name': 'forewoman'}, {'id': 15836, 'synset': 'forger.n.02', 'name': 'forger'}, {'id': 15837, 'synset': 'forward.n.01', 'name': 'forward'}, {'id': 15838, 'synset': 'foster-brother.n.01', 'name': 'foster-brother'}, {'id': 15839, 'synset': 'foster-father.n.01', 'name': 'foster-father'}, {'id': 15840, 'synset': 'foster-mother.n.01', 'name': 'foster-mother'}, {'id': 15841, 'synset': 'foster-sister.n.01', 'name': 'foster-sister'}, {'id': 15842, 'synset': 'foster-son.n.01', 'name': 'foster-son'}, {'id': 15843, 'synset': 'founder.n.02', 'name': 'founder'}, {'id': 15844, 'synset': 'foundress.n.01', 'name': 'foundress'}, {'id': 15845, 'synset': 'four-minute_man.n.01', 'name': 'four-minute_man'}, {'id': 15846, 'synset': 'framer.n.02', 'name': 'framer'}, {'id': 15847, 'synset': 'francophobe.n.01', 'name': 'Francophobe'}, {'id': 15848, 'synset': 'freak.n.01', 'name': 'freak'}, {'id': 15849, 'synset': 'free_agent.n.02', 'name': 'free_agent'}, {'id': 15850, 'synset': 'free_agent.n.01', 'name': 'free_agent'}, {'id': 15851, 'synset': 'freedom_rider.n.01', 'name': 'freedom_rider'}, {'id': 15852, 'synset': 'free-liver.n.01', 'name': 'free-liver'}, {'id': 15853, 'synset': 'freeloader.n.01', 'name': 'freeloader'}, {'id': 15854, 'synset': 'free_trader.n.01', 'name': 'free_trader'}, {'id': 15855, 'synset': 'freudian.n.01', 'name': 'Freudian'}, {'id': 15856, 'synset': 'friar.n.01', 'name': 'friar'}, {'id': 15857, 'synset': 'monk.n.01', 'name': 'monk'}, {'id': 15858, 'synset': 'frontierswoman.n.01', 'name': 'frontierswoman'}, {'id': 15859, 'synset': 'front_man.n.01', 'name': 'front_man'}, {'id': 15860, 'synset': 'frotteur.n.01', 'name': 'frotteur'}, {'id': 15861, 'synset': 'fucker.n.02', 'name': 'fucker'}, {'id': 15862, 'synset': 'fucker.n.01', 'name': 'fucker'}, {'id': 15863, 'synset': 'fuddy-duddy.n.01', 'name': 'fuddy-duddy'}, {'id': 15864, 'synset': 'fullback.n.01', 'name': 'fullback'}, {'id': 15865, 'synset': 'funambulist.n.01', 'name': 'funambulist'}, {'id': 15866, 'synset': 'fundamentalist.n.01', 'name': 'fundamentalist'}, {'id': 15867, 'synset': 'fundraiser.n.01', 'name': 'fundraiser'}, {'id': 15868, 'synset': 'futurist.n.01', 'name': 'futurist'}, {'id': 15869, 'synset': 'gadgeteer.n.01', 'name': 'gadgeteer'}, {'id': 15870, 'synset': 'gagman.n.02', 'name': 'gagman'}, {'id': 15871, 'synset': 'gagman.n.01', 'name': 'gagman'}, {'id': 15872, 'synset': 'gainer.n.01', 'name': 'gainer'}, {'id': 15873, 'synset': 'gal.n.03', 'name': 'gal'}, {'id': 15874, 'synset': 'galoot.n.01', 'name': 'galoot'}, {'id': 15875, 'synset': 'gambist.n.01', 'name': 'gambist'}, {'id': 15876, 'synset': 'gambler.n.01', 'name': 'gambler'}, {'id': 15877, 'synset': 'gamine.n.02', 'name': 'gamine'}, {'id': 15878, 'synset': 'garbage_man.n.01', 'name': 'garbage_man'}, {'id': 15879, 'synset': 'gardener.n.02', 'name': 'gardener'}, {'id': 15880, 'synset': 'garment_cutter.n.01', 'name': 'garment_cutter'}, {'id': 15881, 'synset': 'garroter.n.01', 'name': 'garroter'}, {'id': 15882, 'synset': 'gasman.n.01', 'name': 'gasman'}, {'id': 15883, 'synset': 'gastroenterologist.n.01', 'name': 'gastroenterologist'}, {'id': 15884, 'synset': 'gatherer.n.01', 'name': 'gatherer'}, {'id': 15885, 'synset': 'gawker.n.01', 'name': 'gawker'}, {'id': 15886, 'synset': 'gendarme.n.01', 'name': 'gendarme'}, {'id': 15887, 'synset': 'general.n.01', 'name': 'general'}, {'id': 15888, 'synset': 'generator.n.03', 'name': 'generator'}, {'id': 15889, 'synset': 'geneticist.n.01', 'name': 'geneticist'}, {'id': 15890, 'synset': 'genitor.n.01', 'name': 'genitor'}, {'id': 15891, 'synset': 'gent.n.01', 'name': 'gent'}, {'id': 15892, 'synset': 'geologist.n.01', 'name': 'geologist'}, {'id': 15893, 'synset': 'geophysicist.n.01', 'name': 'geophysicist'}, {'id': 15894, 'synset': 'ghostwriter.n.01', 'name': 'ghostwriter'}, {'id': 15895, 'synset': 'gibson_girl.n.01', 'name': 'Gibson_girl'}, {'id': 15896, 'synset': 'girl.n.01', 'name': 'girl'}, {'id': 15897, 'synset': 'girlfriend.n.02', 'name': 'girlfriend'}, {'id': 15898, 'synset': 'girlfriend.n.01', 'name': 'girlfriend'}, {'id': 15899, 'synset': 'girl_wonder.n.01', 'name': 'girl_wonder'}, {'id': 15900, 'synset': 'girondist.n.01', 'name': 'Girondist'}, {'id': 15901, 'synset': 'gitano.n.01', 'name': 'gitano'}, {'id': 15902, 'synset': 'gladiator.n.01', 'name': 'gladiator'}, {'id': 15903, 'synset': 'glassblower.n.01', 'name': 'glassblower'}, {'id': 15904, 'synset': 'gleaner.n.02', 'name': 'gleaner'}, {'id': 15905, 'synset': 'goat_herder.n.01', 'name': 'goat_herder'}, {'id': 15906, 'synset': 'godchild.n.01', 'name': 'godchild'}, {'id': 15907, 'synset': 'godfather.n.01', 'name': 'godfather'}, {'id': 15908, 'synset': 'godparent.n.01', 'name': 'godparent'}, {'id': 15909, 'synset': 'godson.n.01', 'name': 'godson'}, {'id': 15910, 'synset': 'gofer.n.01', 'name': 'gofer'}, {'id': 15911, 'synset': 'goffer.n.01', 'name': 'goffer'}, {'id': 15912, 'synset': 'goldsmith.n.01', 'name': 'goldsmith'}, {'id': 15913, 'synset': 'golfer.n.01', 'name': 'golfer'}, {'id': 15914, 'synset': 'gondolier.n.01', 'name': 'gondolier'}, {'id': 15915, 'synset': 'good_guy.n.01', 'name': 'good_guy'}, {'id': 15916, 'synset': 'good_old_boy.n.01', 'name': 'good_old_boy'}, {'id': 15917, 'synset': 'good_samaritan.n.01', 'name': 'good_Samaritan'}, {'id': 15918, 'synset': 'gossip_columnist.n.01', 'name': 'gossip_columnist'}, {'id': 15919, 'synset': 'gouger.n.01', 'name': 'gouger'}, {'id': 15920, 'synset': 'governor_general.n.01', 'name': 'governor_general'}, {'id': 15921, 'synset': 'grabber.n.01', 'name': 'grabber'}, {'id': 15922, 'synset': 'grader.n.01', 'name': 'grader'}, {'id': 15923, 'synset': 'graduate_nurse.n.01', 'name': 'graduate_nurse'}, {'id': 15924, 'synset': 'grammarian.n.01', 'name': 'grammarian'}, {'id': 15925, 'synset': 'granddaughter.n.01', 'name': 'granddaughter'}, {'id': 15926, 'synset': 'grande_dame.n.01', 'name': 'grande_dame'}, {'id': 15927, 'synset': 'grandfather.n.01', 'name': 'grandfather'}, {'id': 15928, 'synset': 'grand_inquisitor.n.01', 'name': 'Grand_Inquisitor'}, {'id': 15929, 'synset': 'grandma.n.01', 'name': 'grandma'}, {'id': 15930, 'synset': 'grandmaster.n.01', 'name': 'grandmaster'}, {'id': 15931, 'synset': 'grandparent.n.01', 'name': 'grandparent'}, {'id': 15932, 'synset': 'grantee.n.01', 'name': 'grantee'}, {'id': 15933, 'synset': 'granter.n.01', 'name': 'granter'}, {'id': 15934, 'synset': 'grass_widower.n.01', 'name': 'grass_widower'}, {'id': 15935, 'synset': 'great-aunt.n.01', 'name': 'great-aunt'}, {'id': 15936, 'synset': 'great_grandchild.n.01', 'name': 'great_grandchild'}, {'id': 15937, 'synset': 'great_granddaughter.n.01', 'name': 'great_granddaughter'}, {'id': 15938, 'synset': 'great_grandmother.n.01', 'name': 'great_grandmother'}, {'id': 15939, 'synset': 'great_grandparent.n.01', 'name': 'great_grandparent'}, {'id': 15940, 'synset': 'great_grandson.n.01', 'name': 'great_grandson'}, {'id': 15941, 'synset': 'great-nephew.n.01', 'name': 'great-nephew'}, {'id': 15942, 'synset': 'great-niece.n.01', 'name': 'great-niece'}, {'id': 15943, 'synset': 'green_beret.n.01', 'name': 'Green_Beret'}, {'id': 15944, 'synset': 'grenadier.n.01', 'name': 'grenadier'}, {'id': 15945, 'synset': 'greeter.n.01', 'name': 'greeter'}, {'id': 15946, 'synset': 'gringo.n.01', 'name': 'gringo'}, {'id': 15947, 'synset': 'grinner.n.01', 'name': 'grinner'}, {'id': 15948, 'synset': 'grocer.n.01', 'name': 'grocer'}, {'id': 15949, 'synset': 'groom.n.03', 'name': 'groom'}, {'id': 15950, 'synset': 'groom.n.01', 'name': 'groom'}, {'id': 15951, 'synset': 'grouch.n.01', 'name': 'grouch'}, {'id': 15952, 'synset': 'group_captain.n.01', 'name': 'group_captain'}, {'id': 15953, 'synset': 'grunter.n.01', 'name': 'grunter'}, {'id': 15954, 'synset': 'prison_guard.n.01', 'name': 'prison_guard'}, {'id': 15955, 'synset': 'guard.n.01', 'name': 'guard'}, {'id': 15956, 'synset': 'guesser.n.01', 'name': 'guesser'}, {'id': 15957, 'synset': 'guest.n.01', 'name': 'guest'}, {'id': 15958, 'synset': 'guest.n.03', 'name': 'guest'}, {'id': 15959, 'synset': 'guest_of_honor.n.01', 'name': 'guest_of_honor'}, {'id': 15960, 'synset': 'guest_worker.n.01', 'name': 'guest_worker'}, {'id': 15961, 'synset': 'guide.n.02', 'name': 'guide'}, {'id': 15962, 'synset': 'guitarist.n.01', 'name': 'guitarist'}, {'id': 15963, 'synset': 'gunnery_sergeant.n.01', 'name': 'gunnery_sergeant'}, {'id': 15964, 'synset': 'guru.n.01', 'name': 'guru'}, {'id': 15965, 'synset': 'guru.n.03', 'name': 'guru'}, {'id': 15966, 'synset': 'guvnor.n.01', 'name': 'guvnor'}, {'id': 15967, 'synset': 'guy.n.01', 'name': 'guy'}, {'id': 15968, 'synset': 'gymnast.n.01', 'name': 'gymnast'}, {'id': 15969, 'synset': 'gym_rat.n.01', 'name': 'gym_rat'}, {'id': 15970, 'synset': 'gynecologist.n.01', 'name': 'gynecologist'}, {'id': 15971, 'synset': 'gypsy.n.02', 'name': 'Gypsy'}, {'id': 15972, 'synset': 'hack.n.01', 'name': 'hack'}, {'id': 15973, 'synset': 'hacker.n.02', 'name': 'hacker'}, {'id': 15974, 'synset': 'haggler.n.01', 'name': 'haggler'}, {'id': 15975, 'synset': 'hairdresser.n.01', 'name': 'hairdresser'}, {'id': 15976, 'synset': 'hakim.n.02', 'name': 'hakim'}, {'id': 15977, 'synset': 'hakka.n.01', 'name': 'Hakka'}, {'id': 15978, 'synset': 'halberdier.n.01', 'name': 'halberdier'}, {'id': 15979, 'synset': 'halfback.n.01', 'name': 'halfback'}, {'id': 15980, 'synset': 'half_blood.n.01', 'name': 'half_blood'}, {'id': 15981, 'synset': 'hand.n.10', 'name': 'hand'}, {'id': 15982, 'synset': 'animal_trainer.n.01', 'name': 'animal_trainer'}, {'id': 15983, 'synset': 'handyman.n.01', 'name': 'handyman'}, {'id': 15984, 'synset': 'hang_glider.n.01', 'name': 'hang_glider'}, {'id': 15985, 'synset': 'hardliner.n.01', 'name': 'hardliner'}, {'id': 15986, 'synset': 'harlequin.n.01', 'name': 'harlequin'}, {'id': 15987, 'synset': 'harmonizer.n.02', 'name': 'harmonizer'}, {'id': 15988, 'synset': 'hash_head.n.01', 'name': 'hash_head'}, {'id': 15989, 'synset': 'hatchet_man.n.01', 'name': 'hatchet_man'}, {'id': 15990, 'synset': 'hater.n.01', 'name': 'hater'}, {'id': 15991, 'synset': 'hatmaker.n.01', 'name': 'hatmaker'}, {'id': 15992, 'synset': 'headman.n.02', 'name': 'headman'}, {'id': 15993, 'synset': 'headmaster.n.01', 'name': 'headmaster'}, {'id': 15994, 'synset': 'head_nurse.n.01', 'name': 'head_nurse'}, {'id': 15995, 'synset': 'hearer.n.01', 'name': 'hearer'}, {'id': 15996, 'synset': 'heartbreaker.n.01', 'name': 'heartbreaker'}, {'id': 15997, 'synset': 'heathen.n.01', 'name': 'heathen'}, {'id': 15998, 'synset': 'heavyweight.n.02', 'name': 'heavyweight'}, {'id': 15999, 'synset': 'heavy.n.01', 'name': 'heavy'}, {'id': 16000, 'synset': 'heckler.n.01', 'name': 'heckler'}, {'id': 16001, 'synset': 'hedger.n.02', 'name': 'hedger'}, {'id': 16002, 'synset': 'hedger.n.01', 'name': 'hedger'}, {'id': 16003, 'synset': 'hedonist.n.01', 'name': 'hedonist'}, {'id': 16004, 'synset': 'heir.n.01', 'name': 'heir'}, {'id': 16005, 'synset': 'heir_apparent.n.01', 'name': 'heir_apparent'}, {'id': 16006, 'synset': 'heiress.n.01', 'name': 'heiress'}, {'id': 16007, 'synset': 'heir_presumptive.n.01', 'name': 'heir_presumptive'}, {'id': 16008, 'synset': 'hellion.n.01', 'name': 'hellion'}, {'id': 16009, 'synset': 'helmsman.n.01', 'name': 'helmsman'}, {'id': 16010, 'synset': 'hire.n.01', 'name': 'hire'}, {'id': 16011, 'synset': 'hematologist.n.01', 'name': 'hematologist'}, {'id': 16012, 'synset': 'hemiplegic.n.01', 'name': 'hemiplegic'}, {'id': 16013, 'synset': 'herald.n.01', 'name': 'herald'}, {'id': 16014, 'synset': 'herbalist.n.01', 'name': 'herbalist'}, {'id': 16015, 'synset': 'herder.n.02', 'name': 'herder'}, {'id': 16016, 'synset': 'hermaphrodite.n.01', 'name': 'hermaphrodite'}, {'id': 16017, 'synset': 'heroine.n.02', 'name': 'heroine'}, {'id': 16018, 'synset': 'heroin_addict.n.01', 'name': 'heroin_addict'}, {'id': 16019, 'synset': 'hero_worshiper.n.01', 'name': 'hero_worshiper'}, {'id': 16020, 'synset': 'herr.n.01', 'name': 'Herr'}, {'id': 16021, 'synset': 'highbinder.n.01', 'name': 'highbinder'}, {'id': 16022, 'synset': 'highbrow.n.01', 'name': 'highbrow'}, {'id': 16023, 'synset': 'high_commissioner.n.01', 'name': 'high_commissioner'}, {'id': 16024, 'synset': 'highflier.n.01', 'name': 'highflier'}, {'id': 16025, 'synset': 'highlander.n.02', 'name': 'Highlander'}, {'id': 16026, 'synset': 'high-muck-a-muck.n.01', 'name': 'high-muck-a-muck'}, {'id': 16027, 'synset': 'high_priest.n.01', 'name': 'high_priest'}, {'id': 16028, 'synset': 'highjacker.n.01', 'name': 'highjacker'}, {'id': 16029, 'synset': 'hireling.n.01', 'name': 'hireling'}, {'id': 16030, 'synset': 'historian.n.01', 'name': 'historian'}, {'id': 16031, 'synset': 'hitchhiker.n.01', 'name': 'hitchhiker'}, {'id': 16032, 'synset': 'hitter.n.02', 'name': 'hitter'}, {'id': 16033, 'synset': 'hobbyist.n.01', 'name': 'hobbyist'}, {'id': 16034, 'synset': 'holdout.n.01', 'name': 'holdout'}, {'id': 16035, 'synset': 'holdover.n.01', 'name': 'holdover'}, {'id': 16036, 'synset': 'holdup_man.n.01', 'name': 'holdup_man'}, {'id': 16037, 'synset': 'homeboy.n.02', 'name': 'homeboy'}, {'id': 16038, 'synset': 'homeboy.n.01', 'name': 'homeboy'}, {'id': 16039, 'synset': 'home_buyer.n.01', 'name': 'home_buyer'}, {'id': 16040, 'synset': 'homegirl.n.01', 'name': 'homegirl'}, {'id': 16041, 'synset': 'homeless.n.01', 'name': 'homeless'}, {'id': 16042, 'synset': 'homeopath.n.01', 'name': 'homeopath'}, {'id': 16043, 'synset': 'honest_woman.n.01', 'name': 'honest_woman'}, {'id': 16044, 'synset': 'honor_guard.n.01', 'name': 'honor_guard'}, {'id': 16045, 'synset': 'hooker.n.05', 'name': 'hooker'}, {'id': 16046, 'synset': 'hoper.n.01', 'name': 'hoper'}, {'id': 16047, 'synset': 'hornist.n.01', 'name': 'hornist'}, {'id': 16048, 'synset': 'horseman.n.01', 'name': 'horseman'}, {'id': 16049, 'synset': 'horse_trader.n.01', 'name': 'horse_trader'}, {'id': 16050, 'synset': 'horsewoman.n.01', 'name': 'horsewoman'}, {'id': 16051, 'synset': 'horse_wrangler.n.01', 'name': 'horse_wrangler'}, {'id': 16052, 'synset': 'horticulturist.n.01', 'name': 'horticulturist'}, {'id': 16053, 'synset': 'hospital_chaplain.n.01', 'name': 'hospital_chaplain'}, {'id': 16054, 'synset': 'host.n.08', 'name': 'host'}, {'id': 16055, 'synset': 'host.n.01', 'name': 'host'}, {'id': 16056, 'synset': 'hostess.n.01', 'name': 'hostess'}, {'id': 16057, 'synset': 'hotelier.n.01', 'name': 'hotelier'}, {'id': 16058, 'synset': 'housekeeper.n.01', 'name': 'housekeeper'}, {'id': 16059, 'synset': 'housemaster.n.01', 'name': 'housemaster'}, {'id': 16060, 'synset': 'housemate.n.01', 'name': 'housemate'}, {'id': 16061, 'synset': 'house_physician.n.01', 'name': 'house_physician'}, {'id': 16062, 'synset': 'house_sitter.n.01', 'name': 'house_sitter'}, {'id': 16063, 'synset': 'housing_commissioner.n.01', 'name': 'housing_commissioner'}, {'id': 16064, 'synset': 'huckster.n.01', 'name': 'huckster'}, {'id': 16065, 'synset': 'hugger.n.01', 'name': 'hugger'}, {'id': 16066, 'synset': 'humanist.n.02', 'name': 'humanist'}, {'id': 16067, 'synset': 'humanitarian.n.01', 'name': 'humanitarian'}, {'id': 16068, 'synset': 'hunk.n.01', 'name': 'hunk'}, {'id': 16069, 'synset': 'huntress.n.01', 'name': 'huntress'}, {'id': 16070, 'synset': 'ex-husband.n.01', 'name': 'ex-husband'}, {'id': 16071, 'synset': 'hydrologist.n.01', 'name': 'hydrologist'}, {'id': 16072, 'synset': 'hyperope.n.01', 'name': 'hyperope'}, {'id': 16073, 'synset': 'hypertensive.n.01', 'name': 'hypertensive'}, {'id': 16074, 'synset': 'hypnotist.n.01', 'name': 'hypnotist'}, {'id': 16075, 'synset': 'hypocrite.n.01', 'name': 'hypocrite'}, {'id': 16076, 'synset': 'iceman.n.01', 'name': 'iceman'}, {'id': 16077, 'synset': 'iconoclast.n.02', 'name': 'iconoclast'}, {'id': 16078, 'synset': 'ideologist.n.01', 'name': 'ideologist'}, {'id': 16079, 'synset': 'idol.n.02', 'name': 'idol'}, {'id': 16080, 'synset': 'idolizer.n.01', 'name': 'idolizer'}, {'id': 16081, 'synset': 'imam.n.01', 'name': 'imam'}, {'id': 16082, 'synset': 'imperialist.n.01', 'name': 'imperialist'}, {'id': 16083, 'synset': 'important_person.n.01', 'name': 'important_person'}, {'id': 16084, 'synset': 'inamorato.n.01', 'name': 'inamorato'}, {'id': 16085, 'synset': 'incumbent.n.01', 'name': 'incumbent'}, {'id': 16086, 'synset': 'incurable.n.01', 'name': 'incurable'}, {'id': 16087, 'synset': 'inductee.n.01', 'name': 'inductee'}, {'id': 16088, 'synset': 'industrialist.n.01', 'name': 'industrialist'}, {'id': 16089, 'synset': 'infanticide.n.01', 'name': 'infanticide'}, {'id': 16090, 'synset': 'inferior.n.01', 'name': 'inferior'}, {'id': 16091, 'synset': 'infernal.n.01', 'name': 'infernal'}, {'id': 16092, 'synset': 'infielder.n.01', 'name': 'infielder'}, {'id': 16093, 'synset': 'infiltrator.n.02', 'name': 'infiltrator'}, {'id': 16094, 'synset': 'informer.n.01', 'name': 'informer'}, {'id': 16095, 'synset': 'ingenue.n.02', 'name': 'ingenue'}, {'id': 16096, 'synset': 'ingenue.n.01', 'name': 'ingenue'}, {'id': 16097, 'synset': 'polymath.n.01', 'name': 'polymath'}, {'id': 16098, 'synset': 'in-law.n.01', 'name': 'in-law'}, {'id': 16099, 'synset': 'inquiry_agent.n.01', 'name': 'inquiry_agent'}, {'id': 16100, 'synset': 'inspector.n.01', 'name': 'inspector'}, {'id': 16101, 'synset': 'inspector_general.n.01', 'name': 'inspector_general'}, {'id': 16102, 'synset': 'instigator.n.02', 'name': 'instigator'}, {'id': 16103, 'synset': 'insurance_broker.n.01', 'name': 'insurance_broker'}, {'id': 16104, 'synset': 'insurgent.n.01', 'name': 'insurgent'}, {'id': 16105, 'synset': 'intelligence_analyst.n.01', 'name': 'intelligence_analyst'}, {'id': 16106, 'synset': 'interior_designer.n.01', 'name': 'interior_designer'}, {'id': 16107, 'synset': 'interlocutor.n.02', 'name': 'interlocutor'}, {'id': 16108, 'synset': 'interlocutor.n.01', 'name': 'interlocutor'}, {'id': 16109, 'synset': 'international_grandmaster.n.01', 'name': 'International_Grandmaster'}, {'id': 16110, 'synset': 'internationalist.n.02', 'name': 'internationalist'}, {'id': 16111, 'synset': 'internist.n.01', 'name': 'internist'}, {'id': 16112, 'synset': 'interpreter.n.01', 'name': 'interpreter'}, {'id': 16113, 'synset': 'interpreter.n.02', 'name': 'interpreter'}, {'id': 16114, 'synset': 'intervenor.n.01', 'name': 'intervenor'}, {'id': 16115, 'synset': 'introvert.n.01', 'name': 'introvert'}, {'id': 16116, 'synset': 'invader.n.01', 'name': 'invader'}, {'id': 16117, 'synset': 'invalidator.n.01', 'name': 'invalidator'}, {'id': 16118, 'synset': 'investigator.n.02', 'name': 'investigator'}, {'id': 16119, 'synset': 'investor.n.01', 'name': 'investor'}, {'id': 16120, 'synset': 'invigilator.n.01', 'name': 'invigilator'}, {'id': 16121, 'synset': 'irreligionist.n.01', 'name': 'irreligionist'}, {'id': 16122, 'synset': 'ivy_leaguer.n.01', 'name': 'Ivy_Leaguer'}, {'id': 16123, 'synset': 'jack_of_all_trades.n.01', 'name': 'Jack_of_all_trades'}, {'id': 16124, 'synset': 'jacksonian.n.01', 'name': 'Jacksonian'}, {'id': 16125, 'synset': 'jane_doe.n.01', 'name': 'Jane_Doe'}, {'id': 16126, 'synset': 'janissary.n.01', 'name': 'janissary'}, {'id': 16127, 'synset': 'jat.n.01', 'name': 'Jat'}, {'id': 16128, 'synset': 'javanese.n.01', 'name': 'Javanese'}, {'id': 16129, 'synset': 'jekyll_and_hyde.n.01', 'name': 'Jekyll_and_Hyde'}, {'id': 16130, 'synset': 'jester.n.01', 'name': 'jester'}, {'id': 16131, 'synset': 'jesuit.n.01', 'name': 'Jesuit'}, {'id': 16132, 'synset': 'jezebel.n.02', 'name': 'jezebel'}, {'id': 16133, 'synset': 'jilt.n.01', 'name': 'jilt'}, {'id': 16134, 'synset': 'jobber.n.01', 'name': 'jobber'}, {'id': 16135, 'synset': 'job_candidate.n.01', 'name': 'job_candidate'}, {'id': 16136, 'synset': "job's_comforter.n.01", 'name': "Job's_comforter"}, {'id': 16137, 'synset': 'jockey.n.01', 'name': 'jockey'}, {'id': 16138, 'synset': 'john_doe.n.02', 'name': 'John_Doe'}, {'id': 16139, 'synset': 'journalist.n.01', 'name': 'journalist'}, {'id': 16140, 'synset': 'judge.n.01', 'name': 'judge'}, {'id': 16141, 'synset': 'judge_advocate.n.01', 'name': 'judge_advocate'}, {'id': 16142, 'synset': 'juggler.n.01', 'name': 'juggler'}, {'id': 16143, 'synset': 'jungian.n.01', 'name': 'Jungian'}, {'id': 16144, 'synset': 'junior.n.03', 'name': 'junior'}, {'id': 16145, 'synset': 'junior.n.02', 'name': 'junior'}, {'id': 16146, 'synset': 'junior.n.04', 'name': 'Junior'}, {'id': 16147, 'synset': 'junior_lightweight.n.01', 'name': 'junior_lightweight'}, {'id': 16148, 'synset': 'junior_middleweight.n.01', 'name': 'junior_middleweight'}, {'id': 16149, 'synset': 'jurist.n.01', 'name': 'jurist'}, {'id': 16150, 'synset': 'juror.n.01', 'name': 'juror'}, {'id': 16151, 'synset': 'justice_of_the_peace.n.01', 'name': 'justice_of_the_peace'}, {'id': 16152, 'synset': 'justiciar.n.01', 'name': 'justiciar'}, {'id': 16153, 'synset': 'kachina.n.01', 'name': 'kachina'}, {'id': 16154, 'synset': 'keyboardist.n.01', 'name': 'keyboardist'}, {'id': 16155, 'synset': 'khedive.n.01', 'name': 'Khedive'}, {'id': 16156, 'synset': 'kingmaker.n.02', 'name': 'kingmaker'}, {'id': 16157, 'synset': 'king.n.02', 'name': 'king'}, {'id': 16158, 'synset': "king's_counsel.n.01", 'name': "King's_Counsel"}, {'id': 16159, 'synset': 'counsel_to_the_crown.n.01', 'name': 'Counsel_to_the_Crown'}, {'id': 16160, 'synset': 'kin.n.01', 'name': 'kin'}, {'id': 16161, 'synset': 'enate.n.01', 'name': 'enate'}, {'id': 16162, 'synset': 'kink.n.03', 'name': 'kink'}, {'id': 16163, 'synset': 'kinswoman.n.01', 'name': 'kinswoman'}, {'id': 16164, 'synset': 'kisser.n.01', 'name': 'kisser'}, {'id': 16165, 'synset': 'kitchen_help.n.01', 'name': 'kitchen_help'}, {'id': 16166, 'synset': 'kitchen_police.n.01', 'name': 'kitchen_police'}, {'id': 16167, 'synset': 'klansman.n.01', 'name': 'Klansman'}, {'id': 16168, 'synset': 'kleptomaniac.n.01', 'name': 'kleptomaniac'}, {'id': 16169, 'synset': 'kneeler.n.01', 'name': 'kneeler'}, {'id': 16170, 'synset': 'knight.n.01', 'name': 'knight'}, {'id': 16171, 'synset': 'knocker.n.01', 'name': 'knocker'}, {'id': 16172, 'synset': 'knower.n.01', 'name': 'knower'}, {'id': 16173, 'synset': 'know-it-all.n.01', 'name': 'know-it-all'}, {'id': 16174, 'synset': 'kolkhoznik.n.01', 'name': 'kolkhoznik'}, {'id': 16175, 'synset': 'kshatriya.n.01', 'name': 'Kshatriya'}, {'id': 16176, 'synset': 'labor_coach.n.01', 'name': 'labor_coach'}, {'id': 16177, 'synset': 'laborer.n.01', 'name': 'laborer'}, {'id': 16178, 'synset': 'labourite.n.01', 'name': 'Labourite'}, {'id': 16179, 'synset': 'lady.n.01', 'name': 'lady'}, {'id': 16180, 'synset': 'lady-in-waiting.n.01', 'name': 'lady-in-waiting'}, {'id': 16181, 'synset': "lady's_maid.n.01", 'name': "lady's_maid"}, {'id': 16182, 'synset': 'lama.n.01', 'name': 'lama'}, {'id': 16183, 'synset': 'lamb.n.04', 'name': 'lamb'}, {'id': 16184, 'synset': 'lame_duck.n.01', 'name': 'lame_duck'}, {'id': 16185, 'synset': 'lamplighter.n.01', 'name': 'lamplighter'}, {'id': 16186, 'synset': 'land_agent.n.02', 'name': 'land_agent'}, {'id': 16187, 'synset': 'landgrave.n.01', 'name': 'landgrave'}, {'id': 16188, 'synset': 'landlubber.n.02', 'name': 'landlubber'}, {'id': 16189, 'synset': 'landlubber.n.01', 'name': 'landlubber'}, {'id': 16190, 'synset': 'landowner.n.01', 'name': 'landowner'}, {'id': 16191, 'synset': 'landscape_architect.n.01', 'name': 'landscape_architect'}, {'id': 16192, 'synset': 'langlaufer.n.01', 'name': 'langlaufer'}, {'id': 16193, 'synset': 'languisher.n.01', 'name': 'languisher'}, {'id': 16194, 'synset': 'lapidary.n.01', 'name': 'lapidary'}, {'id': 16195, 'synset': 'lass.n.01', 'name': 'lass'}, {'id': 16196, 'synset': 'latin.n.03', 'name': 'Latin'}, {'id': 16197, 'synset': 'latin.n.02', 'name': 'Latin'}, {'id': 16198, 'synset': 'latitudinarian.n.01', 'name': 'latitudinarian'}, {'id': 16199, 'synset': "jehovah's_witness.n.01", 'name': "Jehovah's_Witness"}, {'id': 16200, 'synset': 'law_agent.n.01', 'name': 'law_agent'}, {'id': 16201, 'synset': 'lawgiver.n.01', 'name': 'lawgiver'}, {'id': 16202, 'synset': 'lawman.n.01', 'name': 'lawman'}, {'id': 16203, 'synset': 'law_student.n.01', 'name': 'law_student'}, {'id': 16204, 'synset': 'lawyer.n.01', 'name': 'lawyer'}, {'id': 16205, 'synset': 'lay_reader.n.01', 'name': 'lay_reader'}, {'id': 16206, 'synset': 'lazybones.n.01', 'name': 'lazybones'}, {'id': 16207, 'synset': 'leaker.n.01', 'name': 'leaker'}, {'id': 16208, 'synset': 'leaseholder.n.01', 'name': 'leaseholder'}, {'id': 16209, 'synset': 'lector.n.02', 'name': 'lector'}, {'id': 16210, 'synset': 'lector.n.01', 'name': 'lector'}, {'id': 16211, 'synset': 'lecturer.n.02', 'name': 'lecturer'}, {'id': 16212, 'synset': 'left-hander.n.02', 'name': 'left-hander'}, {'id': 16213, 'synset': 'legal_representative.n.01', 'name': 'legal_representative'}, {'id': 16214, 'synset': 'legate.n.01', 'name': 'legate'}, {'id': 16215, 'synset': 'legatee.n.01', 'name': 'legatee'}, {'id': 16216, 'synset': 'legionnaire.n.02', 'name': 'legionnaire'}, {'id': 16217, 'synset': 'letterman.n.01', 'name': 'letterman'}, {'id': 16218, 'synset': 'liberator.n.01', 'name': 'liberator'}, {'id': 16219, 'synset': 'licenser.n.01', 'name': 'licenser'}, {'id': 16220, 'synset': 'licentiate.n.01', 'name': 'licentiate'}, {'id': 16221, 'synset': 'lieutenant.n.01', 'name': 'lieutenant'}, {'id': 16222, 'synset': 'lieutenant_colonel.n.01', 'name': 'lieutenant_colonel'}, {'id': 16223, 'synset': 'lieutenant_commander.n.01', 'name': 'lieutenant_commander'}, {'id': 16224, 'synset': 'lieutenant_junior_grade.n.01', 'name': 'lieutenant_junior_grade'}, {'id': 16225, 'synset': 'life.n.08', 'name': 'life'}, {'id': 16226, 'synset': 'lifeguard.n.01', 'name': 'lifeguard'}, {'id': 16227, 'synset': 'life_tenant.n.01', 'name': 'life_tenant'}, {'id': 16228, 'synset': 'light_flyweight.n.01', 'name': 'light_flyweight'}, {'id': 16229, 'synset': 'light_heavyweight.n.03', 'name': 'light_heavyweight'}, {'id': 16230, 'synset': 'light_heavyweight.n.01', 'name': 'light_heavyweight'}, {'id': 16231, 'synset': "light-o'-love.n.01", 'name': "light-o'-love"}, {'id': 16232, 'synset': 'lightweight.n.01', 'name': 'lightweight'}, {'id': 16233, 'synset': 'lightweight.n.04', 'name': 'lightweight'}, {'id': 16234, 'synset': 'lightweight.n.03', 'name': 'lightweight'}, {'id': 16235, 'synset': 'lilliputian.n.01', 'name': 'lilliputian'}, {'id': 16236, 'synset': 'limnologist.n.01', 'name': 'limnologist'}, {'id': 16237, 'synset': 'lineman.n.01', 'name': 'lineman'}, {'id': 16238, 'synset': 'line_officer.n.01', 'name': 'line_officer'}, {'id': 16239, 'synset': 'lion-hunter.n.01', 'name': 'lion-hunter'}, {'id': 16240, 'synset': 'lisper.n.01', 'name': 'lisper'}, {'id': 16241, 'synset': 'lister.n.02', 'name': 'lister'}, {'id': 16242, 'synset': 'literary_critic.n.01', 'name': 'literary_critic'}, {'id': 16243, 'synset': 'literate.n.01', 'name': 'literate'}, {'id': 16244, 'synset': 'litigant.n.01', 'name': 'litigant'}, {'id': 16245, 'synset': 'litterer.n.01', 'name': 'litterer'}, {'id': 16246, 'synset': 'little_brother.n.01', 'name': 'little_brother'}, {'id': 16247, 'synset': 'little_sister.n.01', 'name': 'little_sister'}, {'id': 16248, 'synset': 'lobbyist.n.01', 'name': 'lobbyist'}, {'id': 16249, 'synset': 'locksmith.n.01', 'name': 'locksmith'}, {'id': 16250, 'synset': 'locum_tenens.n.01', 'name': 'locum_tenens'}, {'id': 16251, 'synset': 'lord.n.03', 'name': 'Lord'}, {'id': 16252, 'synset': 'loser.n.03', 'name': 'loser'}, {'id': 16253, 'synset': 'loser.n.01', 'name': 'loser'}, {'id': 16254, 'synset': 'failure.n.04', 'name': 'failure'}, {'id': 16255, 'synset': 'lothario.n.01', 'name': 'Lothario'}, {'id': 16256, 'synset': 'loudmouth.n.01', 'name': 'loudmouth'}, {'id': 16257, 'synset': 'lowerclassman.n.01', 'name': 'lowerclassman'}, {'id': 16258, 'synset': 'lowlander.n.01', 'name': 'Lowlander'}, {'id': 16259, 'synset': 'loyalist.n.01', 'name': 'loyalist'}, {'id': 16260, 'synset': 'luddite.n.01', 'name': 'Luddite'}, {'id': 16261, 'synset': 'lumberman.n.01', 'name': 'lumberman'}, {'id': 16262, 'synset': 'lumper.n.02', 'name': 'lumper'}, {'id': 16263, 'synset': 'bedlamite.n.01', 'name': 'bedlamite'}, {'id': 16264, 'synset': 'pyromaniac.n.01', 'name': 'pyromaniac'}, {'id': 16265, 'synset': 'lutist.n.01', 'name': 'lutist'}, {'id': 16266, 'synset': 'lutheran.n.01', 'name': 'Lutheran'}, {'id': 16267, 'synset': 'lyricist.n.01', 'name': 'lyricist'}, {'id': 16268, 'synset': 'macebearer.n.01', 'name': 'macebearer'}, {'id': 16269, 'synset': 'machinist.n.01', 'name': 'machinist'}, {'id': 16270, 'synset': 'madame.n.01', 'name': 'madame'}, {'id': 16271, 'synset': 'maenad.n.01', 'name': 'maenad'}, {'id': 16272, 'synset': 'maestro.n.01', 'name': 'maestro'}, {'id': 16273, 'synset': 'magdalen.n.01', 'name': 'magdalen'}, {'id': 16274, 'synset': 'magician.n.01', 'name': 'magician'}, {'id': 16275, 'synset': 'magus.n.01', 'name': 'magus'}, {'id': 16276, 'synset': 'maharani.n.01', 'name': 'maharani'}, {'id': 16277, 'synset': 'mahatma.n.01', 'name': 'mahatma'}, {'id': 16278, 'synset': 'maid.n.02', 'name': 'maid'}, {'id': 16279, 'synset': 'maid.n.01', 'name': 'maid'}, {'id': 16280, 'synset': 'major.n.01', 'name': 'major'}, {'id': 16281, 'synset': 'major.n.03', 'name': 'major'}, {'id': 16282, 'synset': 'major-domo.n.01', 'name': 'major-domo'}, {'id': 16283, 'synset': 'maker.n.01', 'name': 'maker'}, {'id': 16284, 'synset': 'malahini.n.01', 'name': 'malahini'}, {'id': 16285, 'synset': 'malcontent.n.01', 'name': 'malcontent'}, {'id': 16286, 'synset': 'malik.n.01', 'name': 'malik'}, {'id': 16287, 'synset': 'malingerer.n.01', 'name': 'malingerer'}, {'id': 16288, 'synset': 'malthusian.n.01', 'name': 'Malthusian'}, {'id': 16289, 'synset': 'adonis.n.01', 'name': 'adonis'}, {'id': 16290, 'synset': 'man.n.03', 'name': 'man'}, {'id': 16291, 'synset': 'man.n.05', 'name': 'man'}, {'id': 16292, 'synset': 'manageress.n.01', 'name': 'manageress'}, {'id': 16293, 'synset': 'mandarin.n.03', 'name': 'mandarin'}, {'id': 16294, 'synset': 'maneuverer.n.01', 'name': 'maneuverer'}, {'id': 16295, 'synset': 'maniac.n.02', 'name': 'maniac'}, {'id': 16296, 'synset': 'manichaean.n.01', 'name': 'Manichaean'}, {'id': 16297, 'synset': 'manicurist.n.01', 'name': 'manicurist'}, {'id': 16298, 'synset': 'manipulator.n.02', 'name': 'manipulator'}, {'id': 16299, 'synset': 'man-at-arms.n.01', 'name': 'man-at-arms'}, {'id': 16300, 'synset': 'man_of_action.n.01', 'name': 'man_of_action'}, {'id': 16301, 'synset': 'man_of_letters.n.01', 'name': 'man_of_letters'}, {'id': 16302, 'synset': 'manufacturer.n.02', 'name': 'manufacturer'}, {'id': 16303, 'synset': 'marcher.n.02', 'name': 'marcher'}, {'id': 16304, 'synset': 'marchioness.n.02', 'name': 'marchioness'}, {'id': 16305, 'synset': 'margrave.n.02', 'name': 'margrave'}, {'id': 16306, 'synset': 'margrave.n.01', 'name': 'margrave'}, {'id': 16307, 'synset': 'marine.n.01', 'name': 'Marine'}, {'id': 16308, 'synset': 'marquess.n.02', 'name': 'marquess'}, {'id': 16309, 'synset': 'marquis.n.02', 'name': 'marquis'}, {'id': 16310, 'synset': 'marshal.n.02', 'name': 'marshal'}, {'id': 16311, 'synset': 'martinet.n.01', 'name': 'martinet'}, {'id': 16312, 'synset': 'masochist.n.01', 'name': 'masochist'}, {'id': 16313, 'synset': 'mason.n.04', 'name': 'mason'}, {'id': 16314, 'synset': 'masquerader.n.01', 'name': 'masquerader'}, {'id': 16315, 'synset': 'masseur.n.01', 'name': 'masseur'}, {'id': 16316, 'synset': 'masseuse.n.01', 'name': 'masseuse'}, {'id': 16317, 'synset': 'master.n.04', 'name': 'master'}, {'id': 16318, 'synset': 'master.n.07', 'name': 'master'}, {'id': 16319, 'synset': 'master-at-arms.n.01', 'name': 'master-at-arms'}, {'id': 16320, 'synset': 'master_of_ceremonies.n.01', 'name': 'master_of_ceremonies'}, {'id': 16321, 'synset': 'masturbator.n.01', 'name': 'masturbator'}, {'id': 16322, 'synset': 'matchmaker.n.01', 'name': 'matchmaker'}, {'id': 16323, 'synset': 'mate.n.01', 'name': 'mate'}, {'id': 16324, 'synset': 'mate.n.08', 'name': 'mate'}, {'id': 16325, 'synset': 'mate.n.03', 'name': 'mate'}, {'id': 16326, 'synset': 'mater.n.01', 'name': 'mater'}, {'id': 16327, 'synset': 'material.n.05', 'name': 'material'}, {'id': 16328, 'synset': 'materialist.n.02', 'name': 'materialist'}, {'id': 16329, 'synset': 'matriarch.n.01', 'name': 'matriarch'}, {'id': 16330, 'synset': 'matriarch.n.02', 'name': 'matriarch'}, {'id': 16331, 'synset': 'matriculate.n.01', 'name': 'matriculate'}, {'id': 16332, 'synset': 'matron.n.01', 'name': 'matron'}, {'id': 16333, 'synset': 'mayor.n.01', 'name': 'mayor'}, {'id': 16334, 'synset': 'mayoress.n.01', 'name': 'mayoress'}, {'id': 16335, 'synset': 'mechanical_engineer.n.01', 'name': 'mechanical_engineer'}, {'id': 16336, 'synset': 'medalist.n.02', 'name': 'medalist'}, {'id': 16337, 'synset': 'medical_officer.n.01', 'name': 'medical_officer'}, {'id': 16338, 'synset': 'medical_practitioner.n.01', 'name': 'medical_practitioner'}, {'id': 16339, 'synset': 'medical_scientist.n.01', 'name': 'medical_scientist'}, {'id': 16340, 'synset': 'medium.n.09', 'name': 'medium'}, {'id': 16341, 'synset': 'megalomaniac.n.01', 'name': 'megalomaniac'}, {'id': 16342, 'synset': 'melancholic.n.01', 'name': 'melancholic'}, {'id': 16343, 'synset': 'melkite.n.01', 'name': 'Melkite'}, {'id': 16344, 'synset': 'melter.n.01', 'name': 'melter'}, {'id': 16345, 'synset': 'nonmember.n.01', 'name': 'nonmember'}, {'id': 16346, 'synset': 'board_member.n.01', 'name': 'board_member'}, {'id': 16347, 'synset': 'clansman.n.01', 'name': 'clansman'}, {'id': 16348, 'synset': 'memorizer.n.01', 'name': 'memorizer'}, {'id': 16349, 'synset': 'mendelian.n.01', 'name': 'Mendelian'}, {'id': 16350, 'synset': 'mender.n.01', 'name': 'mender'}, {'id': 16351, 'synset': 'mesoamerican.n.01', 'name': 'Mesoamerican'}, {'id': 16352, 'synset': 'messmate.n.01', 'name': 'messmate'}, {'id': 16353, 'synset': 'mestiza.n.01', 'name': 'mestiza'}, {'id': 16354, 'synset': 'meteorologist.n.01', 'name': 'meteorologist'}, {'id': 16355, 'synset': 'meter_maid.n.01', 'name': 'meter_maid'}, {'id': 16356, 'synset': 'methodist.n.01', 'name': 'Methodist'}, {'id': 16357, 'synset': 'metis.n.01', 'name': 'Metis'}, {'id': 16358, 'synset': 'metropolitan.n.01', 'name': 'metropolitan'}, {'id': 16359, 'synset': 'mezzo-soprano.n.01', 'name': 'mezzo-soprano'}, {'id': 16360, 'synset': 'microeconomist.n.01', 'name': 'microeconomist'}, {'id': 16361, 'synset': 'middle-aged_man.n.01', 'name': 'middle-aged_man'}, {'id': 16362, 'synset': 'middlebrow.n.01', 'name': 'middlebrow'}, {'id': 16363, 'synset': 'middleweight.n.01', 'name': 'middleweight'}, {'id': 16364, 'synset': 'midwife.n.01', 'name': 'midwife'}, {'id': 16365, 'synset': 'mikado.n.01', 'name': 'mikado'}, {'id': 16366, 'synset': 'milanese.n.01', 'name': 'Milanese'}, {'id': 16367, 'synset': 'miler.n.02', 'name': 'miler'}, {'id': 16368, 'synset': 'miles_gloriosus.n.01', 'name': 'miles_gloriosus'}, {'id': 16369, 'synset': 'military_attache.n.01', 'name': 'military_attache'}, {'id': 16370, 'synset': 'military_chaplain.n.01', 'name': 'military_chaplain'}, {'id': 16371, 'synset': 'military_leader.n.01', 'name': 'military_leader'}, {'id': 16372, 'synset': 'military_officer.n.01', 'name': 'military_officer'}, {'id': 16373, 'synset': 'military_policeman.n.01', 'name': 'military_policeman'}, {'id': 16374, 'synset': 'mill_agent.n.01', 'name': 'mill_agent'}, {'id': 16375, 'synset': 'mill-hand.n.01', 'name': 'mill-hand'}, {'id': 16376, 'synset': 'millionairess.n.01', 'name': 'millionairess'}, {'id': 16377, 'synset': 'millwright.n.01', 'name': 'millwright'}, {'id': 16378, 'synset': 'minder.n.01', 'name': 'minder'}, {'id': 16379, 'synset': 'mining_engineer.n.01', 'name': 'mining_engineer'}, {'id': 16380, 'synset': 'minister.n.02', 'name': 'minister'}, {'id': 16381, 'synset': 'ministrant.n.01', 'name': 'ministrant'}, {'id': 16382, 'synset': 'minor_leaguer.n.01', 'name': 'minor_leaguer'}, {'id': 16383, 'synset': 'minuteman.n.01', 'name': 'Minuteman'}, {'id': 16384, 'synset': 'misanthrope.n.01', 'name': 'misanthrope'}, {'id': 16385, 'synset': 'misfit.n.01', 'name': 'misfit'}, {'id': 16386, 'synset': 'mistress.n.03', 'name': 'mistress'}, {'id': 16387, 'synset': 'mistress.n.01', 'name': 'mistress'}, {'id': 16388, 'synset': 'mixed-blood.n.01', 'name': 'mixed-blood'}, {'id': 16389, 'synset': 'model.n.03', 'name': 'model'}, {'id': 16390, 'synset': 'class_act.n.01', 'name': 'class_act'}, {'id': 16391, 'synset': 'modeler.n.01', 'name': 'modeler'}, {'id': 16392, 'synset': 'modifier.n.02', 'name': 'modifier'}, {'id': 16393, 'synset': 'molecular_biologist.n.01', 'name': 'molecular_biologist'}, {'id': 16394, 'synset': 'monegasque.n.01', 'name': 'Monegasque'}, {'id': 16395, 'synset': 'monetarist.n.01', 'name': 'monetarist'}, {'id': 16396, 'synset': 'moneygrubber.n.01', 'name': 'moneygrubber'}, {'id': 16397, 'synset': 'moneymaker.n.01', 'name': 'moneymaker'}, {'id': 16398, 'synset': 'mongoloid.n.01', 'name': 'Mongoloid'}, {'id': 16399, 'synset': 'monolingual.n.01', 'name': 'monolingual'}, {'id': 16400, 'synset': 'monologist.n.01', 'name': 'monologist'}, {'id': 16401, 'synset': 'moonlighter.n.01', 'name': 'moonlighter'}, {'id': 16402, 'synset': 'moralist.n.01', 'name': 'moralist'}, {'id': 16403, 'synset': 'morosoph.n.01', 'name': 'morosoph'}, {'id': 16404, 'synset': 'morris_dancer.n.01', 'name': 'morris_dancer'}, {'id': 16405, 'synset': 'mortal_enemy.n.01', 'name': 'mortal_enemy'}, {'id': 16406, 'synset': 'mortgagee.n.01', 'name': 'mortgagee'}, {'id': 16407, 'synset': 'mortician.n.01', 'name': 'mortician'}, {'id': 16408, 'synset': 'moss-trooper.n.01', 'name': 'moss-trooper'}, {'id': 16409, 'synset': 'mother.n.01', 'name': 'mother'}, {'id': 16410, 'synset': 'mother.n.04', 'name': 'mother'}, {'id': 16411, 'synset': 'mother.n.03', 'name': 'mother'}, {'id': 16412, 'synset': 'mother_figure.n.01', 'name': 'mother_figure'}, {'id': 16413, 'synset': 'mother_hen.n.01', 'name': 'mother_hen'}, {'id': 16414, 'synset': 'mother-in-law.n.01', 'name': 'mother-in-law'}, {'id': 16415, 'synset': "mother's_boy.n.01", 'name': "mother's_boy"}, {'id': 16416, 'synset': "mother's_daughter.n.01", 'name': "mother's_daughter"}, {'id': 16417, 'synset': 'motorcycle_cop.n.01', 'name': 'motorcycle_cop'}, {'id': 16418, 'synset': 'motorcyclist.n.01', 'name': 'motorcyclist'}, {'id': 16419, 'synset': 'mound_builder.n.01', 'name': 'Mound_Builder'}, {'id': 16420, 'synset': 'mountebank.n.01', 'name': 'mountebank'}, {'id': 16421, 'synset': 'mourner.n.01', 'name': 'mourner'}, {'id': 16422, 'synset': 'mouthpiece.n.03', 'name': 'mouthpiece'}, {'id': 16423, 'synset': 'mover.n.03', 'name': 'mover'}, {'id': 16424, 'synset': 'moviegoer.n.01', 'name': 'moviegoer'}, {'id': 16425, 'synset': 'muffin_man.n.01', 'name': 'muffin_man'}, {'id': 16426, 'synset': 'mugwump.n.02', 'name': 'mugwump'}, {'id': 16427, 'synset': 'mullah.n.01', 'name': 'Mullah'}, {'id': 16428, 'synset': 'muncher.n.01', 'name': 'muncher'}, {'id': 16429, 'synset': 'murderess.n.01', 'name': 'murderess'}, {'id': 16430, 'synset': 'murder_suspect.n.01', 'name': 'murder_suspect'}, {'id': 16431, 'synset': 'musher.n.01', 'name': 'musher'}, {'id': 16432, 'synset': 'musician.n.01', 'name': 'musician'}, {'id': 16433, 'synset': 'musicologist.n.01', 'name': 'musicologist'}, {'id': 16434, 'synset': 'music_teacher.n.01', 'name': 'music_teacher'}, {'id': 16435, 'synset': 'musketeer.n.01', 'name': 'musketeer'}, {'id': 16436, 'synset': 'muslimah.n.01', 'name': 'Muslimah'}, {'id': 16437, 'synset': 'mutilator.n.01', 'name': 'mutilator'}, {'id': 16438, 'synset': 'mutineer.n.01', 'name': 'mutineer'}, {'id': 16439, 'synset': 'mute.n.01', 'name': 'mute'}, {'id': 16440, 'synset': 'mutterer.n.01', 'name': 'mutterer'}, {'id': 16441, 'synset': 'muzzler.n.01', 'name': 'muzzler'}, {'id': 16442, 'synset': 'mycenaen.n.01', 'name': 'Mycenaen'}, {'id': 16443, 'synset': 'mycologist.n.01', 'name': 'mycologist'}, {'id': 16444, 'synset': 'myope.n.01', 'name': 'myope'}, {'id': 16445, 'synset': 'myrmidon.n.01', 'name': 'myrmidon'}, {'id': 16446, 'synset': 'mystic.n.01', 'name': 'mystic'}, {'id': 16447, 'synset': 'mythologist.n.01', 'name': 'mythologist'}, {'id': 16448, 'synset': 'naif.n.01', 'name': 'naif'}, {'id': 16449, 'synset': 'nailer.n.01', 'name': 'nailer'}, {'id': 16450, 'synset': 'namby-pamby.n.01', 'name': 'namby-pamby'}, {'id': 16451, 'synset': 'name_dropper.n.01', 'name': 'name_dropper'}, {'id': 16452, 'synset': 'namer.n.01', 'name': 'namer'}, {'id': 16453, 'synset': 'nan.n.01', 'name': 'nan'}, {'id': 16454, 'synset': 'nanny.n.01', 'name': 'nanny'}, {'id': 16455, 'synset': 'narc.n.01', 'name': 'narc'}, {'id': 16456, 'synset': 'narcissist.n.01', 'name': 'narcissist'}, {'id': 16457, 'synset': 'nark.n.01', 'name': 'nark'}, {'id': 16458, 'synset': 'nationalist.n.02', 'name': 'nationalist'}, {'id': 16459, 'synset': 'nautch_girl.n.01', 'name': 'nautch_girl'}, {'id': 16460, 'synset': 'naval_commander.n.01', 'name': 'naval_commander'}, {'id': 16461, 'synset': 'navy_seal.n.01', 'name': 'Navy_SEAL'}, {'id': 16462, 'synset': 'obstructionist.n.01', 'name': 'obstructionist'}, {'id': 16463, 'synset': 'nazarene.n.02', 'name': 'Nazarene'}, {'id': 16464, 'synset': 'nazarene.n.01', 'name': 'Nazarene'}, {'id': 16465, 'synset': 'nazi.n.01', 'name': 'Nazi'}, {'id': 16466, 'synset': 'nebbish.n.01', 'name': 'nebbish'}, {'id': 16467, 'synset': 'necker.n.01', 'name': 'necker'}, {'id': 16468, 'synset': 'neonate.n.01', 'name': 'neonate'}, {'id': 16469, 'synset': 'nephew.n.01', 'name': 'nephew'}, {'id': 16470, 'synset': 'neurobiologist.n.01', 'name': 'neurobiologist'}, {'id': 16471, 'synset': 'neurologist.n.01', 'name': 'neurologist'}, {'id': 16472, 'synset': 'neurosurgeon.n.01', 'name': 'neurosurgeon'}, {'id': 16473, 'synset': 'neutral.n.01', 'name': 'neutral'}, {'id': 16474, 'synset': 'neutralist.n.01', 'name': 'neutralist'}, {'id': 16475, 'synset': 'newcomer.n.01', 'name': 'newcomer'}, {'id': 16476, 'synset': 'newcomer.n.02', 'name': 'newcomer'}, {'id': 16477, 'synset': 'new_dealer.n.01', 'name': 'New_Dealer'}, {'id': 16478, 'synset': 'newspaper_editor.n.01', 'name': 'newspaper_editor'}, {'id': 16479, 'synset': 'newsreader.n.01', 'name': 'newsreader'}, {'id': 16480, 'synset': 'newtonian.n.01', 'name': 'Newtonian'}, {'id': 16481, 'synset': 'niece.n.01', 'name': 'niece'}, {'id': 16482, 'synset': 'niggard.n.01', 'name': 'niggard'}, {'id': 16483, 'synset': 'night_porter.n.01', 'name': 'night_porter'}, {'id': 16484, 'synset': 'night_rider.n.01', 'name': 'night_rider'}, {'id': 16485, 'synset': 'nimby.n.01', 'name': 'NIMBY'}, {'id': 16486, 'synset': 'niqaabi.n.01', 'name': 'niqaabi'}, {'id': 16487, 'synset': 'nitpicker.n.01', 'name': 'nitpicker'}, {'id': 16488, 'synset': 'nobelist.n.01', 'name': 'Nobelist'}, {'id': 16489, 'synset': 'noc.n.01', 'name': 'NOC'}, {'id': 16490, 'synset': 'noncandidate.n.01', 'name': 'noncandidate'}, {'id': 16491, 'synset': 'noncommissioned_officer.n.01', 'name': 'noncommissioned_officer'}, {'id': 16492, 'synset': 'nondescript.n.01', 'name': 'nondescript'}, {'id': 16493, 'synset': 'nondriver.n.01', 'name': 'nondriver'}, {'id': 16494, 'synset': 'nonparticipant.n.01', 'name': 'nonparticipant'}, {'id': 16495, 'synset': 'nonperson.n.01', 'name': 'nonperson'}, {'id': 16496, 'synset': 'nonresident.n.01', 'name': 'nonresident'}, {'id': 16497, 'synset': 'nonsmoker.n.01', 'name': 'nonsmoker'}, {'id': 16498, 'synset': 'northern_baptist.n.01', 'name': 'Northern_Baptist'}, {'id': 16499, 'synset': 'noticer.n.01', 'name': 'noticer'}, {'id': 16500, 'synset': 'novelist.n.01', 'name': 'novelist'}, {'id': 16501, 'synset': 'novitiate.n.02', 'name': 'novitiate'}, {'id': 16502, 'synset': 'nuclear_chemist.n.01', 'name': 'nuclear_chemist'}, {'id': 16503, 'synset': 'nudger.n.01', 'name': 'nudger'}, {'id': 16504, 'synset': 'nullipara.n.01', 'name': 'nullipara'}, {'id': 16505, 'synset': 'number_theorist.n.01', 'name': 'number_theorist'}, {'id': 16506, 'synset': 'nurse.n.01', 'name': 'nurse'}, {'id': 16507, 'synset': 'nursling.n.01', 'name': 'nursling'}, {'id': 16508, 'synset': 'nymph.n.03', 'name': 'nymph'}, {'id': 16509, 'synset': 'nymphet.n.01', 'name': 'nymphet'}, {'id': 16510, 'synset': 'nympholept.n.01', 'name': 'nympholept'}, {'id': 16511, 'synset': 'nymphomaniac.n.01', 'name': 'nymphomaniac'}, {'id': 16512, 'synset': 'oarswoman.n.01', 'name': 'oarswoman'}, {'id': 16513, 'synset': 'oboist.n.01', 'name': 'oboist'}, {'id': 16514, 'synset': 'obscurantist.n.01', 'name': 'obscurantist'}, {'id': 16515, 'synset': 'observer.n.02', 'name': 'observer'}, {'id': 16516, 'synset': 'obstetrician.n.01', 'name': 'obstetrician'}, {'id': 16517, 'synset': 'occupier.n.02', 'name': 'occupier'}, {'id': 16518, 'synset': 'occultist.n.01', 'name': 'occultist'}, {'id': 16519, 'synset': 'wine_lover.n.01', 'name': 'wine_lover'}, {'id': 16520, 'synset': 'offerer.n.01', 'name': 'offerer'}, {'id': 16521, 'synset': 'office-bearer.n.01', 'name': 'office-bearer'}, {'id': 16522, 'synset': 'office_boy.n.01', 'name': 'office_boy'}, {'id': 16523, 'synset': 'officeholder.n.01', 'name': 'officeholder'}, {'id': 16524, 'synset': 'officiant.n.01', 'name': 'officiant'}, {'id': 16525, 'synset': 'federal.n.02', 'name': 'Federal'}, {'id': 16526, 'synset': 'oilman.n.02', 'name': 'oilman'}, {'id': 16527, 'synset': 'oil_tycoon.n.01', 'name': 'oil_tycoon'}, {'id': 16528, 'synset': 'old-age_pensioner.n.01', 'name': 'old-age_pensioner'}, {'id': 16529, 'synset': 'old_boy.n.02', 'name': 'old_boy'}, {'id': 16530, 'synset': 'old_lady.n.01', 'name': 'old_lady'}, {'id': 16531, 'synset': 'old_man.n.03', 'name': 'old_man'}, {'id': 16532, 'synset': 'oldster.n.01', 'name': 'oldster'}, {'id': 16533, 'synset': 'old-timer.n.02', 'name': 'old-timer'}, {'id': 16534, 'synset': 'old_woman.n.01', 'name': 'old_woman'}, {'id': 16535, 'synset': 'oligarch.n.01', 'name': 'oligarch'}, {'id': 16536, 'synset': 'olympian.n.01', 'name': 'Olympian'}, {'id': 16537, 'synset': 'omnivore.n.01', 'name': 'omnivore'}, {'id': 16538, 'synset': 'oncologist.n.01', 'name': 'oncologist'}, {'id': 16539, 'synset': 'onlooker.n.01', 'name': 'onlooker'}, {'id': 16540, 'synset': 'onomancer.n.01', 'name': 'onomancer'}, {'id': 16541, 'synset': 'operator.n.03', 'name': 'operator'}, {'id': 16542, 'synset': 'opportunist.n.01', 'name': 'opportunist'}, {'id': 16543, 'synset': 'optimist.n.01', 'name': 'optimist'}, {'id': 16544, 'synset': 'orangeman.n.01', 'name': 'Orangeman'}, {'id': 16545, 'synset': 'orator.n.01', 'name': 'orator'}, {'id': 16546, 'synset': 'orderly.n.02', 'name': 'orderly'}, {'id': 16547, 'synset': 'orderly.n.01', 'name': 'orderly'}, {'id': 16548, 'synset': 'orderly_sergeant.n.01', 'name': 'orderly_sergeant'}, {'id': 16549, 'synset': 'ordinand.n.01', 'name': 'ordinand'}, {'id': 16550, 'synset': 'ordinary.n.03', 'name': 'ordinary'}, {'id': 16551, 'synset': 'organ-grinder.n.01', 'name': 'organ-grinder'}, {'id': 16552, 'synset': 'organist.n.01', 'name': 'organist'}, {'id': 16553, 'synset': 'organization_man.n.01', 'name': 'organization_man'}, {'id': 16554, 'synset': 'organizer.n.01', 'name': 'organizer'}, {'id': 16555, 'synset': 'organizer.n.02', 'name': 'organizer'}, {'id': 16556, 'synset': 'originator.n.01', 'name': 'originator'}, {'id': 16557, 'synset': 'ornithologist.n.01', 'name': 'ornithologist'}, {'id': 16558, 'synset': 'orphan.n.01', 'name': 'orphan'}, {'id': 16559, 'synset': 'orphan.n.02', 'name': 'orphan'}, {'id': 16560, 'synset': 'osteopath.n.01', 'name': 'osteopath'}, {'id': 16561, 'synset': 'out-and-outer.n.01', 'name': 'out-and-outer'}, {'id': 16562, 'synset': 'outdoorswoman.n.01', 'name': 'outdoorswoman'}, {'id': 16563, 'synset': 'outfielder.n.02', 'name': 'outfielder'}, {'id': 16564, 'synset': 'outfielder.n.01', 'name': 'outfielder'}, {'id': 16565, 'synset': 'right_fielder.n.01', 'name': 'right_fielder'}, {'id': 16566, 'synset': 'right-handed_pitcher.n.01', 'name': 'right-handed_pitcher'}, {'id': 16567, 'synset': 'outlier.n.01', 'name': 'outlier'}, {'id': 16568, 'synset': 'owner-occupier.n.01', 'name': 'owner-occupier'}, {'id': 16569, 'synset': 'oyabun.n.01', 'name': 'oyabun'}, {'id': 16570, 'synset': 'packrat.n.01', 'name': 'packrat'}, {'id': 16571, 'synset': 'padrone.n.02', 'name': 'padrone'}, {'id': 16572, 'synset': 'padrone.n.01', 'name': 'padrone'}, {'id': 16573, 'synset': 'page.n.04', 'name': 'page'}, {'id': 16574, 'synset': 'painter.n.02', 'name': 'painter'}, {'id': 16575, 'synset': 'paleo-american.n.01', 'name': 'Paleo-American'}, {'id': 16576, 'synset': 'paleontologist.n.01', 'name': 'paleontologist'}, {'id': 16577, 'synset': 'pallbearer.n.01', 'name': 'pallbearer'}, {'id': 16578, 'synset': 'palmist.n.01', 'name': 'palmist'}, {'id': 16579, 'synset': 'pamperer.n.01', 'name': 'pamperer'}, {'id': 16580, 'synset': 'panchen_lama.n.01', 'name': 'Panchen_Lama'}, {'id': 16581, 'synset': 'panelist.n.01', 'name': 'panelist'}, {'id': 16582, 'synset': 'panhandler.n.01', 'name': 'panhandler'}, {'id': 16583, 'synset': 'paparazzo.n.01', 'name': 'paparazzo'}, {'id': 16584, 'synset': 'paperboy.n.01', 'name': 'paperboy'}, {'id': 16585, 'synset': 'paperhanger.n.02', 'name': 'paperhanger'}, {'id': 16586, 'synset': 'paperhanger.n.01', 'name': 'paperhanger'}, {'id': 16587, 'synset': 'papoose.n.01', 'name': 'papoose'}, {'id': 16588, 'synset': 'pardoner.n.02', 'name': 'pardoner'}, {'id': 16589, 'synset': 'paretic.n.01', 'name': 'paretic'}, {'id': 16590, 'synset': 'parishioner.n.01', 'name': 'parishioner'}, {'id': 16591, 'synset': 'park_commissioner.n.01', 'name': 'park_commissioner'}, {'id': 16592, 'synset': 'parliamentarian.n.01', 'name': 'Parliamentarian'}, {'id': 16593, 'synset': 'parliamentary_agent.n.01', 'name': 'parliamentary_agent'}, {'id': 16594, 'synset': 'parodist.n.01', 'name': 'parodist'}, {'id': 16595, 'synset': 'parricide.n.01', 'name': 'parricide'}, {'id': 16596, 'synset': 'parrot.n.02', 'name': 'parrot'}, {'id': 16597, 'synset': 'partaker.n.01', 'name': 'partaker'}, {'id': 16598, 'synset': 'part-timer.n.01', 'name': 'part-timer'}, {'id': 16599, 'synset': 'party.n.05', 'name': 'party'}, {'id': 16600, 'synset': 'party_man.n.01', 'name': 'party_man'}, {'id': 16601, 'synset': 'passenger.n.01', 'name': 'passenger'}, {'id': 16602, 'synset': 'passer.n.03', 'name': 'passer'}, {'id': 16603, 'synset': 'paster.n.01', 'name': 'paster'}, {'id': 16604, 'synset': 'pater.n.01', 'name': 'pater'}, {'id': 16605, 'synset': 'patient.n.01', 'name': 'patient'}, {'id': 16606, 'synset': 'patriarch.n.04', 'name': 'patriarch'}, {'id': 16607, 'synset': 'patriarch.n.03', 'name': 'patriarch'}, {'id': 16608, 'synset': 'patriarch.n.02', 'name': 'patriarch'}, {'id': 16609, 'synset': 'patriot.n.01', 'name': 'patriot'}, {'id': 16610, 'synset': 'patron.n.03', 'name': 'patron'}, {'id': 16611, 'synset': 'patternmaker.n.01', 'name': 'patternmaker'}, {'id': 16612, 'synset': 'pawnbroker.n.01', 'name': 'pawnbroker'}, {'id': 16613, 'synset': 'payer.n.01', 'name': 'payer'}, {'id': 16614, 'synset': 'peacekeeper.n.01', 'name': 'peacekeeper'}, {'id': 16615, 'synset': 'peasant.n.02', 'name': 'peasant'}, {'id': 16616, 'synset': 'pedant.n.01', 'name': 'pedant'}, {'id': 16617, 'synset': 'peddler.n.01', 'name': 'peddler'}, {'id': 16618, 'synset': 'pederast.n.01', 'name': 'pederast'}, {'id': 16619, 'synset': 'penologist.n.01', 'name': 'penologist'}, {'id': 16620, 'synset': 'pentathlete.n.01', 'name': 'pentathlete'}, {'id': 16621, 'synset': 'pentecostal.n.01', 'name': 'Pentecostal'}, {'id': 16622, 'synset': 'percussionist.n.01', 'name': 'percussionist'}, {'id': 16623, 'synset': 'periodontist.n.01', 'name': 'periodontist'}, {'id': 16624, 'synset': 'peshmerga.n.01', 'name': 'peshmerga'}, {'id': 16625, 'synset': 'personality.n.02', 'name': 'personality'}, {'id': 16626, 'synset': 'personal_representative.n.01', 'name': 'personal_representative'}, {'id': 16627, 'synset': 'personage.n.01', 'name': 'personage'}, {'id': 16628, 'synset': 'persona_grata.n.01', 'name': 'persona_grata'}, {'id': 16629, 'synset': 'persona_non_grata.n.01', 'name': 'persona_non_grata'}, {'id': 16630, 'synset': 'personification.n.01', 'name': 'personification'}, {'id': 16631, 'synset': 'perspirer.n.01', 'name': 'perspirer'}, {'id': 16632, 'synset': 'pervert.n.01', 'name': 'pervert'}, {'id': 16633, 'synset': 'pessimist.n.01', 'name': 'pessimist'}, {'id': 16634, 'synset': 'pest.n.03', 'name': 'pest'}, {'id': 16635, 'synset': 'peter_pan.n.01', 'name': 'Peter_Pan'}, {'id': 16636, 'synset': 'petitioner.n.01', 'name': 'petitioner'}, {'id': 16637, 'synset': 'petit_juror.n.01', 'name': 'petit_juror'}, {'id': 16638, 'synset': 'pet_sitter.n.01', 'name': 'pet_sitter'}, {'id': 16639, 'synset': 'petter.n.01', 'name': 'petter'}, {'id': 16640, 'synset': 'pharaoh.n.01', 'name': 'Pharaoh'}, {'id': 16641, 'synset': 'pharmacist.n.01', 'name': 'pharmacist'}, {'id': 16642, 'synset': 'philanthropist.n.01', 'name': 'philanthropist'}, {'id': 16643, 'synset': 'philatelist.n.01', 'name': 'philatelist'}, {'id': 16644, 'synset': 'philosopher.n.02', 'name': 'philosopher'}, {'id': 16645, 'synset': 'phonetician.n.01', 'name': 'phonetician'}, {'id': 16646, 'synset': 'phonologist.n.01', 'name': 'phonologist'}, {'id': 16647, 'synset': 'photojournalist.n.01', 'name': 'photojournalist'}, {'id': 16648, 'synset': 'photometrist.n.01', 'name': 'photometrist'}, {'id': 16649, 'synset': 'physical_therapist.n.01', 'name': 'physical_therapist'}, {'id': 16650, 'synset': 'physicist.n.01', 'name': 'physicist'}, {'id': 16651, 'synset': 'piano_maker.n.01', 'name': 'piano_maker'}, {'id': 16652, 'synset': 'picker.n.01', 'name': 'picker'}, {'id': 16653, 'synset': 'picnicker.n.01', 'name': 'picnicker'}, {'id': 16654, 'synset': 'pilgrim.n.01', 'name': 'pilgrim'}, {'id': 16655, 'synset': 'pill.n.03', 'name': 'pill'}, {'id': 16656, 'synset': 'pillar.n.03', 'name': 'pillar'}, {'id': 16657, 'synset': 'pill_head.n.01', 'name': 'pill_head'}, {'id': 16658, 'synset': 'pilot.n.02', 'name': 'pilot'}, {'id': 16659, 'synset': 'piltdown_man.n.01', 'name': 'Piltdown_man'}, {'id': 16660, 'synset': 'pimp.n.01', 'name': 'pimp'}, {'id': 16661, 'synset': 'pipe_smoker.n.01', 'name': 'pipe_smoker'}, {'id': 16662, 'synset': 'pip-squeak.n.01', 'name': 'pip-squeak'}, {'id': 16663, 'synset': 'pisser.n.01', 'name': 'pisser'}, {'id': 16664, 'synset': 'pitcher.n.01', 'name': 'pitcher'}, {'id': 16665, 'synset': 'pitchman.n.01', 'name': 'pitchman'}, {'id': 16666, 'synset': 'placeman.n.01', 'name': 'placeman'}, {'id': 16667, 'synset': 'placer_miner.n.01', 'name': 'placer_miner'}, {'id': 16668, 'synset': 'plagiarist.n.01', 'name': 'plagiarist'}, {'id': 16669, 'synset': 'plainsman.n.01', 'name': 'plainsman'}, {'id': 16670, 'synset': 'planner.n.01', 'name': 'planner'}, {'id': 16671, 'synset': 'planter.n.01', 'name': 'planter'}, {'id': 16672, 'synset': 'plasterer.n.01', 'name': 'plasterer'}, {'id': 16673, 'synset': 'platinum_blond.n.01', 'name': 'platinum_blond'}, {'id': 16674, 'synset': 'platitudinarian.n.01', 'name': 'platitudinarian'}, {'id': 16675, 'synset': 'playboy.n.01', 'name': 'playboy'}, {'id': 16676, 'synset': 'player.n.01', 'name': 'player'}, {'id': 16677, 'synset': 'playmate.n.01', 'name': 'playmate'}, {'id': 16678, 'synset': 'pleaser.n.01', 'name': 'pleaser'}, {'id': 16679, 'synset': 'pledger.n.01', 'name': 'pledger'}, {'id': 16680, 'synset': 'plenipotentiary.n.01', 'name': 'plenipotentiary'}, {'id': 16681, 'synset': 'plier.n.01', 'name': 'plier'}, {'id': 16682, 'synset': 'plodder.n.03', 'name': 'plodder'}, {'id': 16683, 'synset': 'plodder.n.02', 'name': 'plodder'}, {'id': 16684, 'synset': 'plotter.n.02', 'name': 'plotter'}, {'id': 16685, 'synset': 'plumber.n.01', 'name': 'plumber'}, {'id': 16686, 'synset': 'pluralist.n.02', 'name': 'pluralist'}, {'id': 16687, 'synset': 'pluralist.n.01', 'name': 'pluralist'}, {'id': 16688, 'synset': 'poet.n.01', 'name': 'poet'}, {'id': 16689, 'synset': 'pointsman.n.01', 'name': 'pointsman'}, {'id': 16690, 'synset': 'point_woman.n.01', 'name': 'point_woman'}, {'id': 16691, 'synset': 'policyholder.n.01', 'name': 'policyholder'}, {'id': 16692, 'synset': 'political_prisoner.n.01', 'name': 'political_prisoner'}, {'id': 16693, 'synset': 'political_scientist.n.01', 'name': 'political_scientist'}, {'id': 16694, 'synset': 'politician.n.02', 'name': 'politician'}, {'id': 16695, 'synset': 'politician.n.03', 'name': 'politician'}, {'id': 16696, 'synset': 'pollster.n.01', 'name': 'pollster'}, {'id': 16697, 'synset': 'polluter.n.01', 'name': 'polluter'}, {'id': 16698, 'synset': 'pool_player.n.01', 'name': 'pool_player'}, {'id': 16699, 'synset': 'portraitist.n.01', 'name': 'portraitist'}, {'id': 16700, 'synset': 'poseuse.n.01', 'name': 'poseuse'}, {'id': 16701, 'synset': 'positivist.n.01', 'name': 'positivist'}, {'id': 16702, 'synset': 'postdoc.n.02', 'name': 'postdoc'}, {'id': 16703, 'synset': 'poster_girl.n.01', 'name': 'poster_girl'}, {'id': 16704, 'synset': 'postulator.n.02', 'name': 'postulator'}, {'id': 16705, 'synset': 'private_citizen.n.01', 'name': 'private_citizen'}, {'id': 16706, 'synset': 'problem_solver.n.01', 'name': 'problem_solver'}, {'id': 16707, 'synset': 'pro-lifer.n.01', 'name': 'pro-lifer'}, {'id': 16708, 'synset': 'prosthetist.n.01', 'name': 'prosthetist'}, {'id': 16709, 'synset': 'postulant.n.01', 'name': 'postulant'}, {'id': 16710, 'synset': 'potboy.n.01', 'name': 'potboy'}, {'id': 16711, 'synset': 'poultryman.n.01', 'name': 'poultryman'}, {'id': 16712, 'synset': 'power_user.n.01', 'name': 'power_user'}, {'id': 16713, 'synset': 'power_worker.n.01', 'name': 'power_worker'}, {'id': 16714, 'synset': 'practitioner.n.01', 'name': 'practitioner'}, {'id': 16715, 'synset': 'prayer.n.05', 'name': 'prayer'}, {'id': 16716, 'synset': 'preceptor.n.01', 'name': 'preceptor'}, {'id': 16717, 'synset': 'predecessor.n.01', 'name': 'predecessor'}, {'id': 16718, 'synset': 'preemptor.n.02', 'name': 'preemptor'}, {'id': 16719, 'synset': 'preemptor.n.01', 'name': 'preemptor'}, {'id': 16720, 'synset': 'premature_baby.n.01', 'name': 'premature_baby'}, {'id': 16721, 'synset': 'presbyter.n.01', 'name': 'presbyter'}, {'id': 16722, 'synset': 'presenter.n.02', 'name': 'presenter'}, {'id': 16723, 'synset': 'presentist.n.01', 'name': 'presentist'}, {'id': 16724, 'synset': 'preserver.n.03', 'name': 'preserver'}, {'id': 16725, 'synset': 'president.n.03', 'name': 'president'}, {'id': 16726, 'synset': 'president_of_the_united_states.n.01', 'name': 'President_of_the_United_States'}, {'id': 16727, 'synset': 'president.n.05', 'name': 'president'}, {'id': 16728, 'synset': 'press_agent.n.01', 'name': 'press_agent'}, {'id': 16729, 'synset': 'press_photographer.n.01', 'name': 'press_photographer'}, {'id': 16730, 'synset': 'priest.n.01', 'name': 'priest'}, {'id': 16731, 'synset': 'prima_ballerina.n.01', 'name': 'prima_ballerina'}, {'id': 16732, 'synset': 'prima_donna.n.02', 'name': 'prima_donna'}, {'id': 16733, 'synset': 'prima_donna.n.01', 'name': 'prima_donna'}, {'id': 16734, 'synset': 'primigravida.n.01', 'name': 'primigravida'}, {'id': 16735, 'synset': 'primordial_dwarf.n.01', 'name': 'primordial_dwarf'}, {'id': 16736, 'synset': 'prince_charming.n.01', 'name': 'prince_charming'}, {'id': 16737, 'synset': 'prince_consort.n.01', 'name': 'prince_consort'}, {'id': 16738, 'synset': 'princeling.n.01', 'name': 'princeling'}, {'id': 16739, 'synset': 'prince_of_wales.n.01', 'name': 'Prince_of_Wales'}, {'id': 16740, 'synset': 'princess.n.01', 'name': 'princess'}, {'id': 16741, 'synset': 'princess_royal.n.01', 'name': 'princess_royal'}, {'id': 16742, 'synset': 'principal.n.06', 'name': 'principal'}, {'id': 16743, 'synset': 'principal.n.02', 'name': 'principal'}, {'id': 16744, 'synset': 'print_seller.n.01', 'name': 'print_seller'}, {'id': 16745, 'synset': 'prior.n.01', 'name': 'prior'}, {'id': 16746, 'synset': 'private.n.01', 'name': 'private'}, {'id': 16747, 'synset': 'probationer.n.01', 'name': 'probationer'}, {'id': 16748, 'synset': 'processor.n.02', 'name': 'processor'}, {'id': 16749, 'synset': 'process-server.n.01', 'name': 'process-server'}, {'id': 16750, 'synset': 'proconsul.n.02', 'name': 'proconsul'}, {'id': 16751, 'synset': 'proconsul.n.01', 'name': 'proconsul'}, {'id': 16752, 'synset': 'proctologist.n.01', 'name': 'proctologist'}, {'id': 16753, 'synset': 'proctor.n.01', 'name': 'proctor'}, {'id': 16754, 'synset': 'procurator.n.02', 'name': 'procurator'}, {'id': 16755, 'synset': 'procurer.n.02', 'name': 'procurer'}, {'id': 16756, 'synset': 'profit_taker.n.01', 'name': 'profit_taker'}, {'id': 16757, 'synset': 'programmer.n.01', 'name': 'programmer'}, {'id': 16758, 'synset': 'promiser.n.01', 'name': 'promiser'}, {'id': 16759, 'synset': 'promoter.n.01', 'name': 'promoter'}, {'id': 16760, 'synset': 'promulgator.n.01', 'name': 'promulgator'}, {'id': 16761, 'synset': 'propagandist.n.01', 'name': 'propagandist'}, {'id': 16762, 'synset': 'propagator.n.02', 'name': 'propagator'}, {'id': 16763, 'synset': 'property_man.n.01', 'name': 'property_man'}, {'id': 16764, 'synset': 'prophetess.n.01', 'name': 'prophetess'}, {'id': 16765, 'synset': 'prophet.n.02', 'name': 'prophet'}, {'id': 16766, 'synset': 'prosecutor.n.01', 'name': 'prosecutor'}, {'id': 16767, 'synset': 'prospector.n.01', 'name': 'prospector'}, {'id': 16768, 'synset': 'protectionist.n.01', 'name': 'protectionist'}, {'id': 16769, 'synset': 'protegee.n.01', 'name': 'protegee'}, {'id': 16770, 'synset': 'protozoologist.n.01', 'name': 'protozoologist'}, {'id': 16771, 'synset': 'provost_marshal.n.01', 'name': 'provost_marshal'}, {'id': 16772, 'synset': 'pruner.n.01', 'name': 'pruner'}, {'id': 16773, 'synset': 'psalmist.n.01', 'name': 'psalmist'}, {'id': 16774, 'synset': 'psephologist.n.01', 'name': 'psephologist'}, {'id': 16775, 'synset': 'psychiatrist.n.01', 'name': 'psychiatrist'}, {'id': 16776, 'synset': 'psychic.n.01', 'name': 'psychic'}, {'id': 16777, 'synset': 'psycholinguist.n.01', 'name': 'psycholinguist'}, {'id': 16778, 'synset': 'psychophysicist.n.01', 'name': 'psychophysicist'}, {'id': 16779, 'synset': 'publican.n.01', 'name': 'publican'}, {'id': 16780, 'synset': 'pudge.n.01', 'name': 'pudge'}, {'id': 16781, 'synset': 'puerpera.n.01', 'name': 'puerpera'}, {'id': 16782, 'synset': 'punching_bag.n.01', 'name': 'punching_bag'}, {'id': 16783, 'synset': 'punter.n.02', 'name': 'punter'}, {'id': 16784, 'synset': 'punter.n.01', 'name': 'punter'}, {'id': 16785, 'synset': 'puppeteer.n.01', 'name': 'puppeteer'}, {'id': 16786, 'synset': 'puppy.n.02', 'name': 'puppy'}, {'id': 16787, 'synset': 'purchasing_agent.n.01', 'name': 'purchasing_agent'}, {'id': 16788, 'synset': 'puritan.n.02', 'name': 'puritan'}, {'id': 16789, 'synset': 'puritan.n.01', 'name': 'Puritan'}, {'id': 16790, 'synset': 'pursuer.n.02', 'name': 'pursuer'}, {'id': 16791, 'synset': 'pusher.n.03', 'name': 'pusher'}, {'id': 16792, 'synset': 'pusher.n.02', 'name': 'pusher'}, {'id': 16793, 'synset': 'pusher.n.01', 'name': 'pusher'}, {'id': 16794, 'synset': 'putz.n.01', 'name': 'putz'}, {'id': 16795, 'synset': 'pygmy.n.02', 'name': 'Pygmy'}, {'id': 16796, 'synset': 'qadi.n.01', 'name': 'qadi'}, {'id': 16797, 'synset': 'quadriplegic.n.01', 'name': 'quadriplegic'}, {'id': 16798, 'synset': 'quadruplet.n.02', 'name': 'quadruplet'}, {'id': 16799, 'synset': 'quaker.n.02', 'name': 'quaker'}, {'id': 16800, 'synset': 'quarter.n.11', 'name': 'quarter'}, {'id': 16801, 'synset': 'quarterback.n.01', 'name': 'quarterback'}, {'id': 16802, 'synset': 'quartermaster.n.01', 'name': 'quartermaster'}, {'id': 16803, 'synset': 'quartermaster_general.n.01', 'name': 'quartermaster_general'}, {'id': 16804, 'synset': 'quebecois.n.01', 'name': 'Quebecois'}, {'id': 16805, 'synset': 'queen.n.02', 'name': 'queen'}, {'id': 16806, 'synset': 'queen_of_england.n.01', 'name': 'Queen_of_England'}, {'id': 16807, 'synset': 'queen.n.03', 'name': 'queen'}, {'id': 16808, 'synset': 'queen.n.04', 'name': 'queen'}, {'id': 16809, 'synset': 'queen_consort.n.01', 'name': 'queen_consort'}, {'id': 16810, 'synset': 'queen_mother.n.01', 'name': 'queen_mother'}, {'id': 16811, 'synset': "queen's_counsel.n.01", 'name': "Queen's_Counsel"}, {'id': 16812, 'synset': 'question_master.n.01', 'name': 'question_master'}, {'id': 16813, 'synset': 'quick_study.n.01', 'name': 'quick_study'}, {'id': 16814, 'synset': 'quietist.n.01', 'name': 'quietist'}, {'id': 16815, 'synset': 'quitter.n.01', 'name': 'quitter'}, {'id': 16816, 'synset': 'rabbi.n.01', 'name': 'rabbi'}, {'id': 16817, 'synset': 'racist.n.01', 'name': 'racist'}, {'id': 16818, 'synset': 'radiobiologist.n.01', 'name': 'radiobiologist'}, {'id': 16819, 'synset': 'radiologic_technologist.n.01', 'name': 'radiologic_technologist'}, {'id': 16820, 'synset': 'radiologist.n.01', 'name': 'radiologist'}, {'id': 16821, 'synset': 'rainmaker.n.02', 'name': 'rainmaker'}, {'id': 16822, 'synset': 'raiser.n.01', 'name': 'raiser'}, {'id': 16823, 'synset': 'raja.n.01', 'name': 'raja'}, {'id': 16824, 'synset': 'rake.n.01', 'name': 'rake'}, {'id': 16825, 'synset': 'ramrod.n.02', 'name': 'ramrod'}, {'id': 16826, 'synset': 'ranch_hand.n.01', 'name': 'ranch_hand'}, {'id': 16827, 'synset': 'ranker.n.01', 'name': 'ranker'}, {'id': 16828, 'synset': 'ranter.n.01', 'name': 'ranter'}, {'id': 16829, 'synset': 'rape_suspect.n.01', 'name': 'rape_suspect'}, {'id': 16830, 'synset': 'rapper.n.01', 'name': 'rapper'}, {'id': 16831, 'synset': 'rapporteur.n.01', 'name': 'rapporteur'}, {'id': 16832, 'synset': 'rare_bird.n.01', 'name': 'rare_bird'}, {'id': 16833, 'synset': 'ratepayer.n.01', 'name': 'ratepayer'}, {'id': 16834, 'synset': 'raw_recruit.n.01', 'name': 'raw_recruit'}, {'id': 16835, 'synset': 'reader.n.01', 'name': 'reader'}, {'id': 16836, 'synset': 'reading_teacher.n.01', 'name': 'reading_teacher'}, {'id': 16837, 'synset': 'realist.n.01', 'name': 'realist'}, {'id': 16838, 'synset': 'real_estate_broker.n.01', 'name': 'real_estate_broker'}, {'id': 16839, 'synset': 'rear_admiral.n.01', 'name': 'rear_admiral'}, {'id': 16840, 'synset': 'receiver.n.05', 'name': 'receiver'}, {'id': 16841, 'synset': 'reciter.n.01', 'name': 'reciter'}, {'id': 16842, 'synset': 'recruit.n.02', 'name': 'recruit'}, {'id': 16843, 'synset': 'recruit.n.01', 'name': 'recruit'}, {'id': 16844, 'synset': 'recruiter.n.01', 'name': 'recruiter'}, {'id': 16845, 'synset': 'recruiting-sergeant.n.01', 'name': 'recruiting-sergeant'}, {'id': 16846, 'synset': 'redcap.n.01', 'name': 'redcap'}, {'id': 16847, 'synset': 'redhead.n.01', 'name': 'redhead'}, {'id': 16848, 'synset': 'redneck.n.01', 'name': 'redneck'}, {'id': 16849, 'synset': 'reeler.n.02', 'name': 'reeler'}, {'id': 16850, 'synset': 'reenactor.n.01', 'name': 'reenactor'}, {'id': 16851, 'synset': 'referral.n.01', 'name': 'referral'}, {'id': 16852, 'synset': 'referee.n.01', 'name': 'referee'}, {'id': 16853, 'synset': 'refiner.n.01', 'name': 'refiner'}, {'id': 16854, 'synset': 'reform_jew.n.01', 'name': 'Reform_Jew'}, {'id': 16855, 'synset': 'registered_nurse.n.01', 'name': 'registered_nurse'}, {'id': 16856, 'synset': 'registrar.n.01', 'name': 'registrar'}, {'id': 16857, 'synset': 'regius_professor.n.01', 'name': 'Regius_professor'}, {'id': 16858, 'synset': 'reliever.n.02', 'name': 'reliever'}, {'id': 16859, 'synset': 'anchorite.n.01', 'name': 'anchorite'}, {'id': 16860, 'synset': 'religious_leader.n.01', 'name': 'religious_leader'}, {'id': 16861, 'synset': 'remover.n.02', 'name': 'remover'}, {'id': 16862, 'synset': 'renaissance_man.n.01', 'name': 'Renaissance_man'}, {'id': 16863, 'synset': 'renegade.n.01', 'name': 'renegade'}, {'id': 16864, 'synset': 'rentier.n.01', 'name': 'rentier'}, {'id': 16865, 'synset': 'repairman.n.01', 'name': 'repairman'}, {'id': 16866, 'synset': 'reporter.n.01', 'name': 'reporter'}, {'id': 16867, 'synset': 'newswoman.n.01', 'name': 'newswoman'}, {'id': 16868, 'synset': 'representative.n.01', 'name': 'representative'}, {'id': 16869, 'synset': 'reprobate.n.01', 'name': 'reprobate'}, {'id': 16870, 'synset': 'rescuer.n.02', 'name': 'rescuer'}, {'id': 16871, 'synset': 'reservist.n.01', 'name': 'reservist'}, {'id': 16872, 'synset': 'resident_commissioner.n.01', 'name': 'resident_commissioner'}, {'id': 16873, 'synset': 'respecter.n.01', 'name': 'respecter'}, {'id': 16874, 'synset': 'restaurateur.n.01', 'name': 'restaurateur'}, {'id': 16875, 'synset': 'restrainer.n.02', 'name': 'restrainer'}, {'id': 16876, 'synset': 'retailer.n.01', 'name': 'retailer'}, {'id': 16877, 'synset': 'retiree.n.01', 'name': 'retiree'}, {'id': 16878, 'synset': 'returning_officer.n.01', 'name': 'returning_officer'}, {'id': 16879, 'synset': 'revenant.n.01', 'name': 'revenant'}, {'id': 16880, 'synset': 'revisionist.n.01', 'name': 'revisionist'}, {'id': 16881, 'synset': 'revolutionist.n.01', 'name': 'revolutionist'}, {'id': 16882, 'synset': 'rheumatologist.n.01', 'name': 'rheumatologist'}, {'id': 16883, 'synset': 'rhodesian_man.n.01', 'name': 'Rhodesian_man'}, {'id': 16884, 'synset': 'rhymer.n.01', 'name': 'rhymer'}, {'id': 16885, 'synset': 'rich_person.n.01', 'name': 'rich_person'}, {'id': 16886, 'synset': 'rider.n.03', 'name': 'rider'}, {'id': 16887, 'synset': 'riding_master.n.01', 'name': 'riding_master'}, {'id': 16888, 'synset': 'rifleman.n.02', 'name': 'rifleman'}, {'id': 16889, 'synset': 'right-hander.n.02', 'name': 'right-hander'}, {'id': 16890, 'synset': 'right-hand_man.n.01', 'name': 'right-hand_man'}, {'id': 16891, 'synset': 'ringer.n.03', 'name': 'ringer'}, {'id': 16892, 'synset': 'ringleader.n.01', 'name': 'ringleader'}, {'id': 16893, 'synset': 'roadman.n.02', 'name': 'roadman'}, {'id': 16894, 'synset': 'roarer.n.01', 'name': 'roarer'}, {'id': 16895, 'synset': 'rocket_engineer.n.01', 'name': 'rocket_engineer'}, {'id': 16896, 'synset': 'rocket_scientist.n.01', 'name': 'rocket_scientist'}, {'id': 16897, 'synset': 'rock_star.n.01', 'name': 'rock_star'}, {'id': 16898, 'synset': 'romanov.n.01', 'name': 'Romanov'}, {'id': 16899, 'synset': 'romanticist.n.02', 'name': 'romanticist'}, {'id': 16900, 'synset': 'ropemaker.n.01', 'name': 'ropemaker'}, {'id': 16901, 'synset': 'roper.n.02', 'name': 'roper'}, {'id': 16902, 'synset': 'roper.n.01', 'name': 'roper'}, {'id': 16903, 'synset': 'ropewalker.n.01', 'name': 'ropewalker'}, {'id': 16904, 'synset': 'rosebud.n.02', 'name': 'rosebud'}, {'id': 16905, 'synset': 'rosicrucian.n.02', 'name': 'Rosicrucian'}, {'id': 16906, 'synset': 'mountie.n.01', 'name': 'Mountie'}, {'id': 16907, 'synset': 'rough_rider.n.01', 'name': 'Rough_Rider'}, {'id': 16908, 'synset': 'roundhead.n.01', 'name': 'roundhead'}, {'id': 16909, 'synset': 'civil_authority.n.01', 'name': 'civil_authority'}, {'id': 16910, 'synset': 'runner.n.03', 'name': 'runner'}, {'id': 16911, 'synset': 'runner.n.02', 'name': 'runner'}, {'id': 16912, 'synset': 'runner.n.06', 'name': 'runner'}, {'id': 16913, 'synset': 'running_back.n.01', 'name': 'running_back'}, {'id': 16914, 'synset': 'rusher.n.02', 'name': 'rusher'}, {'id': 16915, 'synset': 'rustic.n.01', 'name': 'rustic'}, {'id': 16916, 'synset': 'saboteur.n.01', 'name': 'saboteur'}, {'id': 16917, 'synset': 'sadist.n.01', 'name': 'sadist'}, {'id': 16918, 'synset': 'sailing_master.n.01', 'name': 'sailing_master'}, {'id': 16919, 'synset': 'sailor.n.01', 'name': 'sailor'}, {'id': 16920, 'synset': 'salesgirl.n.01', 'name': 'salesgirl'}, {'id': 16921, 'synset': 'salesman.n.01', 'name': 'salesman'}, {'id': 16922, 'synset': 'salesperson.n.01', 'name': 'salesperson'}, {'id': 16923, 'synset': 'salvager.n.01', 'name': 'salvager'}, {'id': 16924, 'synset': 'sandwichman.n.01', 'name': 'sandwichman'}, {'id': 16925, 'synset': 'sangoma.n.01', 'name': 'sangoma'}, {'id': 16926, 'synset': 'sannup.n.01', 'name': 'sannup'}, {'id': 16927, 'synset': 'sapper.n.02', 'name': 'sapper'}, {'id': 16928, 'synset': 'sassenach.n.01', 'name': 'Sassenach'}, {'id': 16929, 'synset': 'satrap.n.01', 'name': 'satrap'}, {'id': 16930, 'synset': 'saunterer.n.01', 'name': 'saunterer'}, {'id': 16931, 'synset': 'savoyard.n.01', 'name': 'Savoyard'}, {'id': 16932, 'synset': 'sawyer.n.01', 'name': 'sawyer'}, {'id': 16933, 'synset': 'scalper.n.01', 'name': 'scalper'}, {'id': 16934, 'synset': 'scandalmonger.n.01', 'name': 'scandalmonger'}, {'id': 16935, 'synset': 'scapegrace.n.01', 'name': 'scapegrace'}, {'id': 16936, 'synset': 'scene_painter.n.02', 'name': 'scene_painter'}, {'id': 16937, 'synset': 'schemer.n.01', 'name': 'schemer'}, {'id': 16938, 'synset': 'schizophrenic.n.01', 'name': 'schizophrenic'}, {'id': 16939, 'synset': 'schlemiel.n.01', 'name': 'schlemiel'}, {'id': 16940, 'synset': 'schlockmeister.n.01', 'name': 'schlockmeister'}, {'id': 16941, 'synset': 'scholar.n.01', 'name': 'scholar'}, {'id': 16942, 'synset': 'scholiast.n.01', 'name': 'scholiast'}, {'id': 16943, 'synset': 'schoolchild.n.01', 'name': 'schoolchild'}, {'id': 16944, 'synset': 'schoolfriend.n.01', 'name': 'schoolfriend'}, {'id': 16945, 'synset': 'schoolman.n.01', 'name': 'Schoolman'}, {'id': 16946, 'synset': 'schoolmaster.n.02', 'name': 'schoolmaster'}, {'id': 16947, 'synset': 'schoolmate.n.01', 'name': 'schoolmate'}, {'id': 16948, 'synset': 'scientist.n.01', 'name': 'scientist'}, {'id': 16949, 'synset': 'scion.n.01', 'name': 'scion'}, {'id': 16950, 'synset': 'scoffer.n.02', 'name': 'scoffer'}, {'id': 16951, 'synset': 'scofflaw.n.01', 'name': 'scofflaw'}, {'id': 16952, 'synset': 'scorekeeper.n.01', 'name': 'scorekeeper'}, {'id': 16953, 'synset': 'scorer.n.02', 'name': 'scorer'}, {'id': 16954, 'synset': 'scourer.n.02', 'name': 'scourer'}, {'id': 16955, 'synset': 'scout.n.03', 'name': 'scout'}, {'id': 16956, 'synset': 'scoutmaster.n.01', 'name': 'scoutmaster'}, {'id': 16957, 'synset': 'scrambler.n.01', 'name': 'scrambler'}, {'id': 16958, 'synset': 'scratcher.n.02', 'name': 'scratcher'}, {'id': 16959, 'synset': 'screen_actor.n.01', 'name': 'screen_actor'}, {'id': 16960, 'synset': 'scrutineer.n.01', 'name': 'scrutineer'}, {'id': 16961, 'synset': 'scuba_diver.n.01', 'name': 'scuba_diver'}, {'id': 16962, 'synset': 'sculptor.n.01', 'name': 'sculptor'}, {'id': 16963, 'synset': 'sea_scout.n.01', 'name': 'Sea_Scout'}, {'id': 16964, 'synset': 'seasonal_worker.n.01', 'name': 'seasonal_worker'}, {'id': 16965, 'synset': 'seasoner.n.01', 'name': 'seasoner'}, {'id': 16966, 'synset': 'second_baseman.n.01', 'name': 'second_baseman'}, {'id': 16967, 'synset': 'second_cousin.n.01', 'name': 'second_cousin'}, {'id': 16968, 'synset': 'seconder.n.01', 'name': 'seconder'}, {'id': 16969, 'synset': 'second_fiddle.n.01', 'name': 'second_fiddle'}, {'id': 16970, 'synset': 'second-in-command.n.01', 'name': 'second-in-command'}, {'id': 16971, 'synset': 'second_lieutenant.n.01', 'name': 'second_lieutenant'}, {'id': 16972, 'synset': 'second-rater.n.01', 'name': 'second-rater'}, {'id': 16973, 'synset': 'secretary.n.01', 'name': 'secretary'}, {'id': 16974, 'synset': 'secretary_of_agriculture.n.01', 'name': 'Secretary_of_Agriculture'}, {'id': 16975, 'synset': 'secretary_of_health_and_human_services.n.01', 'name': 'Secretary_of_Health_and_Human_Services'}, {'id': 16976, 'synset': 'secretary_of_state.n.01', 'name': 'Secretary_of_State'}, {'id': 16977, 'synset': 'secretary_of_the_interior.n.02', 'name': 'Secretary_of_the_Interior'}, {'id': 16978, 'synset': 'sectarian.n.01', 'name': 'sectarian'}, {'id': 16979, 'synset': 'section_hand.n.01', 'name': 'section_hand'}, {'id': 16980, 'synset': 'secularist.n.01', 'name': 'secularist'}, {'id': 16981, 'synset': 'security_consultant.n.01', 'name': 'security_consultant'}, {'id': 16982, 'synset': 'seeded_player.n.01', 'name': 'seeded_player'}, {'id': 16983, 'synset': 'seeder.n.01', 'name': 'seeder'}, {'id': 16984, 'synset': 'seeker.n.01', 'name': 'seeker'}, {'id': 16985, 'synset': 'segregate.n.01', 'name': 'segregate'}, {'id': 16986, 'synset': 'segregator.n.01', 'name': 'segregator'}, {'id': 16987, 'synset': 'selectman.n.01', 'name': 'selectman'}, {'id': 16988, 'synset': 'selectwoman.n.01', 'name': 'selectwoman'}, {'id': 16989, 'synset': 'selfish_person.n.01', 'name': 'selfish_person'}, {'id': 16990, 'synset': 'self-starter.n.01', 'name': 'self-starter'}, {'id': 16991, 'synset': 'seller.n.01', 'name': 'seller'}, {'id': 16992, 'synset': 'selling_agent.n.01', 'name': 'selling_agent'}, {'id': 16993, 'synset': 'semanticist.n.01', 'name': 'semanticist'}, {'id': 16994, 'synset': 'semifinalist.n.01', 'name': 'semifinalist'}, {'id': 16995, 'synset': 'seminarian.n.01', 'name': 'seminarian'}, {'id': 16996, 'synset': 'senator.n.01', 'name': 'senator'}, {'id': 16997, 'synset': 'sendee.n.01', 'name': 'sendee'}, {'id': 16998, 'synset': 'senior.n.01', 'name': 'senior'}, {'id': 16999, 'synset': 'senior_vice_president.n.01', 'name': 'senior_vice_president'}, {'id': 17000, 'synset': 'separatist.n.01', 'name': 'separatist'}, {'id': 17001, 'synset': 'septuagenarian.n.01', 'name': 'septuagenarian'}, {'id': 17002, 'synset': 'serf.n.01', 'name': 'serf'}, {'id': 17003, 'synset': 'spree_killer.n.01', 'name': 'spree_killer'}, {'id': 17004, 'synset': 'serjeant-at-law.n.01', 'name': 'serjeant-at-law'}, {'id': 17005, 'synset': 'server.n.02', 'name': 'server'}, {'id': 17006, 'synset': 'serviceman.n.01', 'name': 'serviceman'}, {'id': 17007, 'synset': 'settler.n.01', 'name': 'settler'}, {'id': 17008, 'synset': 'settler.n.03', 'name': 'settler'}, {'id': 17009, 'synset': 'sex_symbol.n.01', 'name': 'sex_symbol'}, {'id': 17010, 'synset': 'sexton.n.02', 'name': 'sexton'}, {'id': 17011, 'synset': 'shaheed.n.01', 'name': 'shaheed'}, {'id': 17012, 'synset': 'shakespearian.n.01', 'name': 'Shakespearian'}, {'id': 17013, 'synset': 'shanghaier.n.01', 'name': 'shanghaier'}, {'id': 17014, 'synset': 'sharecropper.n.01', 'name': 'sharecropper'}, {'id': 17015, 'synset': 'shaver.n.01', 'name': 'shaver'}, {'id': 17016, 'synset': 'shavian.n.01', 'name': 'Shavian'}, {'id': 17017, 'synset': 'sheep.n.02', 'name': 'sheep'}, {'id': 17018, 'synset': 'sheik.n.01', 'name': 'sheik'}, {'id': 17019, 'synset': 'shelver.n.01', 'name': 'shelver'}, {'id': 17020, 'synset': 'shepherd.n.01', 'name': 'shepherd'}, {'id': 17021, 'synset': 'ship-breaker.n.01', 'name': 'ship-breaker'}, {'id': 17022, 'synset': 'shipmate.n.01', 'name': 'shipmate'}, {'id': 17023, 'synset': 'shipowner.n.01', 'name': 'shipowner'}, {'id': 17024, 'synset': 'shipping_agent.n.01', 'name': 'shipping_agent'}, {'id': 17025, 'synset': 'shirtmaker.n.01', 'name': 'shirtmaker'}, {'id': 17026, 'synset': 'shogun.n.01', 'name': 'shogun'}, {'id': 17027, 'synset': 'shopaholic.n.01', 'name': 'shopaholic'}, {'id': 17028, 'synset': 'shop_girl.n.01', 'name': 'shop_girl'}, {'id': 17029, 'synset': 'shop_steward.n.01', 'name': 'shop_steward'}, {'id': 17030, 'synset': 'shot_putter.n.01', 'name': 'shot_putter'}, {'id': 17031, 'synset': 'shrew.n.01', 'name': 'shrew'}, {'id': 17032, 'synset': 'shuffler.n.01', 'name': 'shuffler'}, {'id': 17033, 'synset': 'shyster.n.01', 'name': 'shyster'}, {'id': 17034, 'synset': 'sibling.n.01', 'name': 'sibling'}, {'id': 17035, 'synset': 'sick_person.n.01', 'name': 'sick_person'}, {'id': 17036, 'synset': 'sightreader.n.01', 'name': 'sightreader'}, {'id': 17037, 'synset': 'signaler.n.01', 'name': 'signaler'}, {'id': 17038, 'synset': 'signer.n.01', 'name': 'signer'}, {'id': 17039, 'synset': 'signor.n.01', 'name': 'signor'}, {'id': 17040, 'synset': 'signora.n.01', 'name': 'signora'}, {'id': 17041, 'synset': 'signore.n.01', 'name': 'signore'}, {'id': 17042, 'synset': 'signorina.n.01', 'name': 'signorina'}, {'id': 17043, 'synset': 'silent_partner.n.01', 'name': 'silent_partner'}, {'id': 17044, 'synset': 'addle-head.n.01', 'name': 'addle-head'}, {'id': 17045, 'synset': 'simperer.n.01', 'name': 'simperer'}, {'id': 17046, 'synset': 'singer.n.01', 'name': 'singer'}, {'id': 17047, 'synset': 'sinologist.n.01', 'name': 'Sinologist'}, {'id': 17048, 'synset': 'sipper.n.01', 'name': 'sipper'}, {'id': 17049, 'synset': 'sirrah.n.01', 'name': 'sirrah'}, {'id': 17050, 'synset': 'sister.n.02', 'name': 'Sister'}, {'id': 17051, 'synset': 'sister.n.01', 'name': 'sister'}, {'id': 17052, 'synset': 'waverer.n.01', 'name': 'waverer'}, {'id': 17053, 'synset': 'sitar_player.n.01', 'name': 'sitar_player'}, {'id': 17054, 'synset': 'sixth-former.n.01', 'name': 'sixth-former'}, {'id': 17055, 'synset': 'skateboarder.n.01', 'name': 'skateboarder'}, {'id': 17056, 'synset': 'skeptic.n.01', 'name': 'skeptic'}, {'id': 17057, 'synset': 'sketcher.n.01', 'name': 'sketcher'}, {'id': 17058, 'synset': 'skidder.n.02', 'name': 'skidder'}, {'id': 17059, 'synset': 'skier.n.01', 'name': 'skier'}, {'id': 17060, 'synset': 'skinny-dipper.n.01', 'name': 'skinny-dipper'}, {'id': 17061, 'synset': 'skin-diver.n.01', 'name': 'skin-diver'}, {'id': 17062, 'synset': 'skinhead.n.01', 'name': 'skinhead'}, {'id': 17063, 'synset': 'slasher.n.01', 'name': 'slasher'}, {'id': 17064, 'synset': 'slattern.n.02', 'name': 'slattern'}, {'id': 17065, 'synset': 'sleeper.n.01', 'name': 'sleeper'}, {'id': 17066, 'synset': 'sleeper.n.02', 'name': 'sleeper'}, {'id': 17067, 'synset': 'sleeping_beauty.n.02', 'name': 'sleeping_beauty'}, {'id': 17068, 'synset': 'sleuth.n.01', 'name': 'sleuth'}, {'id': 17069, 'synset': 'slob.n.01', 'name': 'slob'}, {'id': 17070, 'synset': 'sloganeer.n.01', 'name': 'sloganeer'}, {'id': 17071, 'synset': 'slopseller.n.01', 'name': 'slopseller'}, {'id': 17072, 'synset': 'smasher.n.02', 'name': 'smasher'}, {'id': 17073, 'synset': 'smirker.n.01', 'name': 'smirker'}, {'id': 17074, 'synset': 'smith.n.10', 'name': 'smith'}, {'id': 17075, 'synset': 'smoothie.n.01', 'name': 'smoothie'}, {'id': 17076, 'synset': 'smuggler.n.01', 'name': 'smuggler'}, {'id': 17077, 'synset': 'sneezer.n.01', 'name': 'sneezer'}, {'id': 17078, 'synset': 'snob.n.01', 'name': 'snob'}, {'id': 17079, 'synset': 'snoop.n.01', 'name': 'snoop'}, {'id': 17080, 'synset': 'snorer.n.01', 'name': 'snorer'}, {'id': 17081, 'synset': 'sob_sister.n.01', 'name': 'sob_sister'}, {'id': 17082, 'synset': 'soccer_player.n.01', 'name': 'soccer_player'}, {'id': 17083, 'synset': 'social_anthropologist.n.01', 'name': 'social_anthropologist'}, {'id': 17084, 'synset': 'social_climber.n.01', 'name': 'social_climber'}, {'id': 17085, 'synset': 'socialist.n.01', 'name': 'socialist'}, {'id': 17086, 'synset': 'socializer.n.01', 'name': 'socializer'}, {'id': 17087, 'synset': 'social_scientist.n.01', 'name': 'social_scientist'}, {'id': 17088, 'synset': 'social_secretary.n.01', 'name': 'social_secretary'}, {'id': 17089, 'synset': 'socinian.n.01', 'name': 'Socinian'}, {'id': 17090, 'synset': 'sociolinguist.n.01', 'name': 'sociolinguist'}, {'id': 17091, 'synset': 'sociologist.n.01', 'name': 'sociologist'}, {'id': 17092, 'synset': 'soda_jerk.n.01', 'name': 'soda_jerk'}, {'id': 17093, 'synset': 'sodalist.n.01', 'name': 'sodalist'}, {'id': 17094, 'synset': 'sodomite.n.01', 'name': 'sodomite'}, {'id': 17095, 'synset': 'soldier.n.01', 'name': 'soldier'}, {'id': 17096, 'synset': 'son.n.01', 'name': 'son'}, {'id': 17097, 'synset': 'songster.n.02', 'name': 'songster'}, {'id': 17098, 'synset': 'songstress.n.01', 'name': 'songstress'}, {'id': 17099, 'synset': 'songwriter.n.01', 'name': 'songwriter'}, {'id': 17100, 'synset': 'sorcerer.n.01', 'name': 'sorcerer'}, {'id': 17101, 'synset': 'sorehead.n.01', 'name': 'sorehead'}, {'id': 17102, 'synset': 'soul_mate.n.01', 'name': 'soul_mate'}, {'id': 17103, 'synset': 'southern_baptist.n.01', 'name': 'Southern_Baptist'}, {'id': 17104, 'synset': 'sovereign.n.01', 'name': 'sovereign'}, {'id': 17105, 'synset': 'spacewalker.n.01', 'name': 'spacewalker'}, {'id': 17106, 'synset': 'spanish_american.n.01', 'name': 'Spanish_American'}, {'id': 17107, 'synset': 'sparring_partner.n.01', 'name': 'sparring_partner'}, {'id': 17108, 'synset': 'spastic.n.01', 'name': 'spastic'}, {'id': 17109, 'synset': 'speaker.n.01', 'name': 'speaker'}, {'id': 17110, 'synset': 'native_speaker.n.01', 'name': 'native_speaker'}, {'id': 17111, 'synset': 'speaker.n.03', 'name': 'Speaker'}, {'id': 17112, 'synset': 'speechwriter.n.01', 'name': 'speechwriter'}, {'id': 17113, 'synset': 'specialist.n.02', 'name': 'specialist'}, {'id': 17114, 'synset': 'specifier.n.01', 'name': 'specifier'}, {'id': 17115, 'synset': 'spectator.n.01', 'name': 'spectator'}, {'id': 17116, 'synset': 'speech_therapist.n.01', 'name': 'speech_therapist'}, {'id': 17117, 'synset': 'speedskater.n.01', 'name': 'speedskater'}, {'id': 17118, 'synset': 'spellbinder.n.01', 'name': 'spellbinder'}, {'id': 17119, 'synset': 'sphinx.n.01', 'name': 'sphinx'}, {'id': 17120, 'synset': 'spinster.n.01', 'name': 'spinster'}, {'id': 17121, 'synset': 'split_end.n.01', 'name': 'split_end'}, {'id': 17122, 'synset': 'sport.n.05', 'name': 'sport'}, {'id': 17123, 'synset': 'sport.n.03', 'name': 'sport'}, {'id': 17124, 'synset': 'sporting_man.n.02', 'name': 'sporting_man'}, {'id': 17125, 'synset': 'sports_announcer.n.01', 'name': 'sports_announcer'}, {'id': 17126, 'synset': 'sports_editor.n.01', 'name': 'sports_editor'}, {'id': 17127, 'synset': 'sprog.n.02', 'name': 'sprog'}, {'id': 17128, 'synset': 'square_dancer.n.01', 'name': 'square_dancer'}, {'id': 17129, 'synset': 'square_shooter.n.01', 'name': 'square_shooter'}, {'id': 17130, 'synset': 'squatter.n.02', 'name': 'squatter'}, {'id': 17131, 'synset': 'squire.n.02', 'name': 'squire'}, {'id': 17132, 'synset': 'squire.n.01', 'name': 'squire'}, {'id': 17133, 'synset': 'staff_member.n.01', 'name': 'staff_member'}, {'id': 17134, 'synset': 'staff_sergeant.n.01', 'name': 'staff_sergeant'}, {'id': 17135, 'synset': 'stage_director.n.01', 'name': 'stage_director'}, {'id': 17136, 'synset': 'stainer.n.01', 'name': 'stainer'}, {'id': 17137, 'synset': 'stakeholder.n.01', 'name': 'stakeholder'}, {'id': 17138, 'synset': 'stalker.n.02', 'name': 'stalker'}, {'id': 17139, 'synset': 'stalking-horse.n.01', 'name': 'stalking-horse'}, {'id': 17140, 'synset': 'stammerer.n.01', 'name': 'stammerer'}, {'id': 17141, 'synset': 'stamper.n.02', 'name': 'stamper'}, {'id': 17142, 'synset': 'standee.n.01', 'name': 'standee'}, {'id': 17143, 'synset': 'stand-in.n.01', 'name': 'stand-in'}, {'id': 17144, 'synset': 'star.n.04', 'name': 'star'}, {'id': 17145, 'synset': 'starlet.n.01', 'name': 'starlet'}, {'id': 17146, 'synset': 'starter.n.03', 'name': 'starter'}, {'id': 17147, 'synset': 'statesman.n.01', 'name': 'statesman'}, {'id': 17148, 'synset': 'state_treasurer.n.01', 'name': 'state_treasurer'}, {'id': 17149, 'synset': 'stationer.n.01', 'name': 'stationer'}, {'id': 17150, 'synset': 'stenographer.n.01', 'name': 'stenographer'}, {'id': 17151, 'synset': 'stentor.n.01', 'name': 'stentor'}, {'id': 17152, 'synset': 'stepbrother.n.01', 'name': 'stepbrother'}, {'id': 17153, 'synset': 'stepmother.n.01', 'name': 'stepmother'}, {'id': 17154, 'synset': 'stepparent.n.01', 'name': 'stepparent'}, {'id': 17155, 'synset': 'stevedore.n.01', 'name': 'stevedore'}, {'id': 17156, 'synset': 'steward.n.01', 'name': 'steward'}, {'id': 17157, 'synset': 'steward.n.03', 'name': 'steward'}, {'id': 17158, 'synset': 'steward.n.02', 'name': 'steward'}, {'id': 17159, 'synset': 'stickler.n.01', 'name': 'stickler'}, {'id': 17160, 'synset': 'stiff.n.01', 'name': 'stiff'}, {'id': 17161, 'synset': 'stifler.n.01', 'name': 'stifler'}, {'id': 17162, 'synset': 'stipendiary.n.01', 'name': 'stipendiary'}, {'id': 17163, 'synset': 'stitcher.n.01', 'name': 'stitcher'}, {'id': 17164, 'synset': 'stockjobber.n.01', 'name': 'stockjobber'}, {'id': 17165, 'synset': 'stock_trader.n.01', 'name': 'stock_trader'}, {'id': 17166, 'synset': 'stockist.n.01', 'name': 'stockist'}, {'id': 17167, 'synset': 'stoker.n.02', 'name': 'stoker'}, {'id': 17168, 'synset': 'stooper.n.02', 'name': 'stooper'}, {'id': 17169, 'synset': 'store_detective.n.01', 'name': 'store_detective'}, {'id': 17170, 'synset': 'strafer.n.01', 'name': 'strafer'}, {'id': 17171, 'synset': 'straight_man.n.01', 'name': 'straight_man'}, {'id': 17172, 'synset': 'stranger.n.01', 'name': 'stranger'}, {'id': 17173, 'synset': 'stranger.n.02', 'name': 'stranger'}, {'id': 17174, 'synset': 'strategist.n.01', 'name': 'strategist'}, {'id': 17175, 'synset': 'straw_boss.n.01', 'name': 'straw_boss'}, {'id': 17176, 'synset': 'streetwalker.n.01', 'name': 'streetwalker'}, {'id': 17177, 'synset': 'stretcher-bearer.n.01', 'name': 'stretcher-bearer'}, {'id': 17178, 'synset': 'struggler.n.01', 'name': 'struggler'}, {'id': 17179, 'synset': 'stud.n.01', 'name': 'stud'}, {'id': 17180, 'synset': 'student.n.01', 'name': 'student'}, {'id': 17181, 'synset': 'stumblebum.n.01', 'name': 'stumblebum'}, {'id': 17182, 'synset': 'stylist.n.01', 'name': 'stylist'}, {'id': 17183, 'synset': 'subaltern.n.01', 'name': 'subaltern'}, {'id': 17184, 'synset': 'subcontractor.n.01', 'name': 'subcontractor'}, {'id': 17185, 'synset': 'subduer.n.01', 'name': 'subduer'}, {'id': 17186, 'synset': 'subject.n.06', 'name': 'subject'}, {'id': 17187, 'synset': 'subordinate.n.01', 'name': 'subordinate'}, {'id': 17188, 'synset': 'substitute.n.02', 'name': 'substitute'}, {'id': 17189, 'synset': 'successor.n.03', 'name': 'successor'}, {'id': 17190, 'synset': 'successor.n.01', 'name': 'successor'}, {'id': 17191, 'synset': 'succorer.n.01', 'name': 'succorer'}, {'id': 17192, 'synset': 'sufi.n.01', 'name': 'Sufi'}, {'id': 17193, 'synset': 'suffragan.n.01', 'name': 'suffragan'}, {'id': 17194, 'synset': 'suffragette.n.01', 'name': 'suffragette'}, {'id': 17195, 'synset': 'sugar_daddy.n.01', 'name': 'sugar_daddy'}, {'id': 17196, 'synset': 'suicide_bomber.n.01', 'name': 'suicide_bomber'}, {'id': 17197, 'synset': 'suitor.n.01', 'name': 'suitor'}, {'id': 17198, 'synset': 'sumo_wrestler.n.01', 'name': 'sumo_wrestler'}, {'id': 17199, 'synset': 'sunbather.n.01', 'name': 'sunbather'}, {'id': 17200, 'synset': 'sundowner.n.01', 'name': 'sundowner'}, {'id': 17201, 'synset': 'super_heavyweight.n.01', 'name': 'super_heavyweight'}, {'id': 17202, 'synset': 'superior.n.01', 'name': 'superior'}, {'id': 17203, 'synset': 'supermom.n.01', 'name': 'supermom'}, {'id': 17204, 'synset': 'supernumerary.n.02', 'name': 'supernumerary'}, {'id': 17205, 'synset': 'supremo.n.01', 'name': 'supremo'}, {'id': 17206, 'synset': 'surgeon.n.01', 'name': 'surgeon'}, {'id': 17207, 'synset': 'surgeon_general.n.02', 'name': 'Surgeon_General'}, {'id': 17208, 'synset': 'surgeon_general.n.01', 'name': 'Surgeon_General'}, {'id': 17209, 'synset': 'surpriser.n.01', 'name': 'surpriser'}, {'id': 17210, 'synset': 'surveyor.n.01', 'name': 'surveyor'}, {'id': 17211, 'synset': 'surveyor.n.02', 'name': 'surveyor'}, {'id': 17212, 'synset': 'survivor.n.01', 'name': 'survivor'}, {'id': 17213, 'synset': 'sutler.n.01', 'name': 'sutler'}, {'id': 17214, 'synset': 'sweeper.n.01', 'name': 'sweeper'}, {'id': 17215, 'synset': 'sweetheart.n.01', 'name': 'sweetheart'}, {'id': 17216, 'synset': 'swinger.n.02', 'name': 'swinger'}, {'id': 17217, 'synset': 'switcher.n.01', 'name': 'switcher'}, {'id': 17218, 'synset': 'swot.n.01', 'name': 'swot'}, {'id': 17219, 'synset': 'sycophant.n.01', 'name': 'sycophant'}, {'id': 17220, 'synset': 'sylph.n.01', 'name': 'sylph'}, {'id': 17221, 'synset': 'sympathizer.n.02', 'name': 'sympathizer'}, {'id': 17222, 'synset': 'symphonist.n.01', 'name': 'symphonist'}, {'id': 17223, 'synset': 'syncopator.n.01', 'name': 'syncopator'}, {'id': 17224, 'synset': 'syndic.n.01', 'name': 'syndic'}, {'id': 17225, 'synset': 'tactician.n.01', 'name': 'tactician'}, {'id': 17226, 'synset': 'tagger.n.02', 'name': 'tagger'}, {'id': 17227, 'synset': 'tailback.n.01', 'name': 'tailback'}, {'id': 17228, 'synset': 'tallyman.n.02', 'name': 'tallyman'}, {'id': 17229, 'synset': 'tallyman.n.01', 'name': 'tallyman'}, {'id': 17230, 'synset': 'tanker.n.02', 'name': 'tanker'}, {'id': 17231, 'synset': 'tapper.n.04', 'name': 'tapper'}, {'id': 17232, 'synset': 'tartuffe.n.01', 'name': 'Tartuffe'}, {'id': 17233, 'synset': 'tarzan.n.01', 'name': 'Tarzan'}, {'id': 17234, 'synset': 'taster.n.01', 'name': 'taster'}, {'id': 17235, 'synset': 'tax_assessor.n.01', 'name': 'tax_assessor'}, {'id': 17236, 'synset': 'taxer.n.01', 'name': 'taxer'}, {'id': 17237, 'synset': 'taxi_dancer.n.01', 'name': 'taxi_dancer'}, {'id': 17238, 'synset': 'taxonomist.n.01', 'name': 'taxonomist'}, {'id': 17239, 'synset': 'teacher.n.01', 'name': 'teacher'}, {'id': 17240, 'synset': 'teaching_fellow.n.01', 'name': 'teaching_fellow'}, {'id': 17241, 'synset': 'tearaway.n.01', 'name': 'tearaway'}, {'id': 17242, 'synset': 'technical_sergeant.n.01', 'name': 'technical_sergeant'}, {'id': 17243, 'synset': 'technician.n.02', 'name': 'technician'}, {'id': 17244, 'synset': 'ted.n.01', 'name': 'Ted'}, {'id': 17245, 'synset': 'teetotaler.n.01', 'name': 'teetotaler'}, {'id': 17246, 'synset': 'television_reporter.n.01', 'name': 'television_reporter'}, {'id': 17247, 'synset': 'temporizer.n.01', 'name': 'temporizer'}, {'id': 17248, 'synset': 'tempter.n.01', 'name': 'tempter'}, {'id': 17249, 'synset': 'term_infant.n.01', 'name': 'term_infant'}, {'id': 17250, 'synset': 'toiler.n.01', 'name': 'toiler'}, {'id': 17251, 'synset': 'tenant.n.01', 'name': 'tenant'}, {'id': 17252, 'synset': 'tenant.n.02', 'name': 'tenant'}, {'id': 17253, 'synset': 'tenderfoot.n.01', 'name': 'tenderfoot'}, {'id': 17254, 'synset': 'tennis_player.n.01', 'name': 'tennis_player'}, {'id': 17255, 'synset': 'tennis_pro.n.01', 'name': 'tennis_pro'}, {'id': 17256, 'synset': 'tenor_saxophonist.n.01', 'name': 'tenor_saxophonist'}, {'id': 17257, 'synset': 'termer.n.01', 'name': 'termer'}, {'id': 17258, 'synset': 'terror.n.02', 'name': 'terror'}, {'id': 17259, 'synset': 'tertigravida.n.01', 'name': 'tertigravida'}, {'id': 17260, 'synset': 'testator.n.01', 'name': 'testator'}, {'id': 17261, 'synset': 'testatrix.n.01', 'name': 'testatrix'}, {'id': 17262, 'synset': 'testee.n.01', 'name': 'testee'}, {'id': 17263, 'synset': 'test-tube_baby.n.01', 'name': 'test-tube_baby'}, {'id': 17264, 'synset': 'texas_ranger.n.01', 'name': 'Texas_Ranger'}, {'id': 17265, 'synset': 'thane.n.02', 'name': 'thane'}, {'id': 17266, 'synset': 'theatrical_producer.n.01', 'name': 'theatrical_producer'}, {'id': 17267, 'synset': 'theologian.n.01', 'name': 'theologian'}, {'id': 17268, 'synset': 'theorist.n.01', 'name': 'theorist'}, {'id': 17269, 'synset': 'theosophist.n.01', 'name': 'theosophist'}, {'id': 17270, 'synset': 'therapist.n.01', 'name': 'therapist'}, {'id': 17271, 'synset': 'thessalonian.n.01', 'name': 'Thessalonian'}, {'id': 17272, 'synset': 'thinker.n.01', 'name': 'thinker'}, {'id': 17273, 'synset': 'thinker.n.02', 'name': 'thinker'}, {'id': 17274, 'synset': 'thrower.n.02', 'name': 'thrower'}, {'id': 17275, 'synset': 'thurifer.n.01', 'name': 'thurifer'}, {'id': 17276, 'synset': 'ticket_collector.n.01', 'name': 'ticket_collector'}, {'id': 17277, 'synset': 'tight_end.n.01', 'name': 'tight_end'}, {'id': 17278, 'synset': 'tiler.n.01', 'name': 'tiler'}, {'id': 17279, 'synset': 'timekeeper.n.01', 'name': 'timekeeper'}, {'id': 17280, 'synset': 'timorese.n.01', 'name': 'Timorese'}, {'id': 17281, 'synset': 'tinkerer.n.01', 'name': 'tinkerer'}, {'id': 17282, 'synset': 'tinsmith.n.01', 'name': 'tinsmith'}, {'id': 17283, 'synset': 'tinter.n.01', 'name': 'tinter'}, {'id': 17284, 'synset': 'tippler.n.01', 'name': 'tippler'}, {'id': 17285, 'synset': 'tipster.n.01', 'name': 'tipster'}, {'id': 17286, 'synset': 't-man.n.01', 'name': 'T-man'}, {'id': 17287, 'synset': 'toastmaster.n.01', 'name': 'toastmaster'}, {'id': 17288, 'synset': 'toast_mistress.n.01', 'name': 'toast_mistress'}, {'id': 17289, 'synset': 'tobogganist.n.01', 'name': 'tobogganist'}, {'id': 17290, 'synset': 'tomboy.n.01', 'name': 'tomboy'}, {'id': 17291, 'synset': 'toolmaker.n.01', 'name': 'toolmaker'}, {'id': 17292, 'synset': 'torchbearer.n.01', 'name': 'torchbearer'}, {'id': 17293, 'synset': 'tory.n.01', 'name': 'Tory'}, {'id': 17294, 'synset': 'tory.n.02', 'name': 'Tory'}, {'id': 17295, 'synset': 'tosser.n.02', 'name': 'tosser'}, {'id': 17296, 'synset': 'tosser.n.01', 'name': 'tosser'}, {'id': 17297, 'synset': 'totalitarian.n.01', 'name': 'totalitarian'}, {'id': 17298, 'synset': 'tourist.n.01', 'name': 'tourist'}, {'id': 17299, 'synset': 'tout.n.02', 'name': 'tout'}, {'id': 17300, 'synset': 'tout.n.01', 'name': 'tout'}, {'id': 17301, 'synset': 'tovarich.n.01', 'name': 'tovarich'}, {'id': 17302, 'synset': 'towhead.n.01', 'name': 'towhead'}, {'id': 17303, 'synset': 'town_clerk.n.01', 'name': 'town_clerk'}, {'id': 17304, 'synset': 'town_crier.n.01', 'name': 'town_crier'}, {'id': 17305, 'synset': 'townsman.n.02', 'name': 'townsman'}, {'id': 17306, 'synset': 'toxicologist.n.01', 'name': 'toxicologist'}, {'id': 17307, 'synset': 'track_star.n.01', 'name': 'track_star'}, {'id': 17308, 'synset': 'trader.n.01', 'name': 'trader'}, {'id': 17309, 'synset': 'trade_unionist.n.01', 'name': 'trade_unionist'}, {'id': 17310, 'synset': 'traditionalist.n.01', 'name': 'traditionalist'}, {'id': 17311, 'synset': 'traffic_cop.n.01', 'name': 'traffic_cop'}, {'id': 17312, 'synset': 'tragedian.n.02', 'name': 'tragedian'}, {'id': 17313, 'synset': 'tragedian.n.01', 'name': 'tragedian'}, {'id': 17314, 'synset': 'tragedienne.n.01', 'name': 'tragedienne'}, {'id': 17315, 'synset': 'trail_boss.n.01', 'name': 'trail_boss'}, {'id': 17316, 'synset': 'trainer.n.01', 'name': 'trainer'}, {'id': 17317, 'synset': 'traitor.n.01', 'name': 'traitor'}, {'id': 17318, 'synset': 'traitress.n.01', 'name': 'traitress'}, {'id': 17319, 'synset': 'transactor.n.01', 'name': 'transactor'}, {'id': 17320, 'synset': 'transcriber.n.03', 'name': 'transcriber'}, {'id': 17321, 'synset': 'transfer.n.02', 'name': 'transfer'}, {'id': 17322, 'synset': 'transferee.n.01', 'name': 'transferee'}, {'id': 17323, 'synset': 'translator.n.01', 'name': 'translator'}, {'id': 17324, 'synset': 'transvestite.n.01', 'name': 'transvestite'}, {'id': 17325, 'synset': 'traveling_salesman.n.01', 'name': 'traveling_salesman'}, {'id': 17326, 'synset': 'traverser.n.01', 'name': 'traverser'}, {'id': 17327, 'synset': 'trawler.n.01', 'name': 'trawler'}, {'id': 17328, 'synset': 'treasury.n.04', 'name': 'Treasury'}, {'id': 17329, 'synset': 'trencher.n.01', 'name': 'trencher'}, {'id': 17330, 'synset': 'trend-setter.n.01', 'name': 'trend-setter'}, {'id': 17331, 'synset': 'tribesman.n.01', 'name': 'tribesman'}, {'id': 17332, 'synset': 'trier.n.02', 'name': 'trier'}, {'id': 17333, 'synset': 'trifler.n.01', 'name': 'trifler'}, {'id': 17334, 'synset': 'trooper.n.02', 'name': 'trooper'}, {'id': 17335, 'synset': 'trooper.n.03', 'name': 'trooper'}, {'id': 17336, 'synset': 'trotskyite.n.01', 'name': 'Trotskyite'}, {'id': 17337, 'synset': 'truant.n.01', 'name': 'truant'}, {'id': 17338, 'synset': 'trumpeter.n.01', 'name': 'trumpeter'}, {'id': 17339, 'synset': 'trusty.n.01', 'name': 'trusty'}, {'id': 17340, 'synset': 'tudor.n.03', 'name': 'Tudor'}, {'id': 17341, 'synset': 'tumbler.n.01', 'name': 'tumbler'}, {'id': 17342, 'synset': 'tutee.n.01', 'name': 'tutee'}, {'id': 17343, 'synset': 'twin.n.01', 'name': 'twin'}, {'id': 17344, 'synset': 'two-timer.n.01', 'name': 'two-timer'}, {'id': 17345, 'synset': 'tyke.n.01', 'name': 'Tyke'}, {'id': 17346, 'synset': 'tympanist.n.01', 'name': 'tympanist'}, {'id': 17347, 'synset': 'typist.n.01', 'name': 'typist'}, {'id': 17348, 'synset': 'tyrant.n.01', 'name': 'tyrant'}, {'id': 17349, 'synset': 'umpire.n.01', 'name': 'umpire'}, {'id': 17350, 'synset': 'understudy.n.01', 'name': 'understudy'}, {'id': 17351, 'synset': 'undesirable.n.01', 'name': 'undesirable'}, {'id': 17352, 'synset': 'unicyclist.n.01', 'name': 'unicyclist'}, {'id': 17353, 'synset': 'unilateralist.n.01', 'name': 'unilateralist'}, {'id': 17354, 'synset': 'unitarian.n.01', 'name': 'Unitarian'}, {'id': 17355, 'synset': 'arminian.n.01', 'name': 'Arminian'}, {'id': 17356, 'synset': 'universal_donor.n.01', 'name': 'universal_donor'}, {'id': 17357, 'synset': 'unix_guru.n.01', 'name': 'UNIX_guru'}, {'id': 17358, 'synset': 'unknown_soldier.n.01', 'name': 'Unknown_Soldier'}, {'id': 17359, 'synset': 'upsetter.n.01', 'name': 'upsetter'}, {'id': 17360, 'synset': 'upstager.n.01', 'name': 'upstager'}, {'id': 17361, 'synset': 'upstart.n.02', 'name': 'upstart'}, {'id': 17362, 'synset': 'upstart.n.01', 'name': 'upstart'}, {'id': 17363, 'synset': 'urchin.n.01', 'name': 'urchin'}, {'id': 17364, 'synset': 'urologist.n.01', 'name': 'urologist'}, {'id': 17365, 'synset': 'usherette.n.01', 'name': 'usherette'}, {'id': 17366, 'synset': 'usher.n.02', 'name': 'usher'}, {'id': 17367, 'synset': 'usurper.n.01', 'name': 'usurper'}, {'id': 17368, 'synset': 'utility_man.n.01', 'name': 'utility_man'}, {'id': 17369, 'synset': 'utilizer.n.01', 'name': 'utilizer'}, {'id': 17370, 'synset': 'utopian.n.01', 'name': 'Utopian'}, {'id': 17371, 'synset': 'uxoricide.n.01', 'name': 'uxoricide'}, {'id': 17372, 'synset': 'vacationer.n.01', 'name': 'vacationer'}, {'id': 17373, 'synset': 'valedictorian.n.01', 'name': 'valedictorian'}, {'id': 17374, 'synset': 'valley_girl.n.01', 'name': 'valley_girl'}, {'id': 17375, 'synset': 'vaulter.n.01', 'name': 'vaulter'}, {'id': 17376, 'synset': 'vegetarian.n.01', 'name': 'vegetarian'}, {'id': 17377, 'synset': 'vegan.n.01', 'name': 'vegan'}, {'id': 17378, 'synset': 'venerator.n.01', 'name': 'venerator'}, {'id': 17379, 'synset': 'venture_capitalist.n.01', 'name': 'venture_capitalist'}, {'id': 17380, 'synset': 'venturer.n.01', 'name': 'venturer'}, {'id': 17381, 'synset': 'vermin.n.01', 'name': 'vermin'}, {'id': 17382, 'synset': 'very_important_person.n.01', 'name': 'very_important_person'}, {'id': 17383, 'synset': 'vibist.n.01', 'name': 'vibist'}, {'id': 17384, 'synset': 'vicar.n.01', 'name': 'vicar'}, {'id': 17385, 'synset': 'vicar.n.03', 'name': 'vicar'}, {'id': 17386, 'synset': 'vicar-general.n.01', 'name': 'vicar-general'}, {'id': 17387, 'synset': 'vice_chancellor.n.01', 'name': 'vice_chancellor'}, {'id': 17388, 'synset': 'vicegerent.n.01', 'name': 'vicegerent'}, {'id': 17389, 'synset': 'vice_president.n.01', 'name': 'vice_president'}, {'id': 17390, 'synset': 'vice-regent.n.01', 'name': 'vice-regent'}, {'id': 17391, 'synset': 'victim.n.02', 'name': 'victim'}, {'id': 17392, 'synset': 'victorian.n.01', 'name': 'Victorian'}, {'id': 17393, 'synset': 'victualer.n.01', 'name': 'victualer'}, {'id': 17394, 'synset': 'vigilante.n.01', 'name': 'vigilante'}, {'id': 17395, 'synset': 'villager.n.01', 'name': 'villager'}, {'id': 17396, 'synset': 'vintager.n.01', 'name': 'vintager'}, {'id': 17397, 'synset': 'vintner.n.01', 'name': 'vintner'}, {'id': 17398, 'synset': 'violator.n.02', 'name': 'violator'}, {'id': 17399, 'synset': 'violator.n.01', 'name': 'violator'}, {'id': 17400, 'synset': 'violist.n.01', 'name': 'violist'}, {'id': 17401, 'synset': 'virago.n.01', 'name': 'virago'}, {'id': 17402, 'synset': 'virologist.n.01', 'name': 'virologist'}, {'id': 17403, 'synset': 'visayan.n.01', 'name': 'Visayan'}, {'id': 17404, 'synset': 'viscountess.n.01', 'name': 'viscountess'}, {'id': 17405, 'synset': 'viscount.n.01', 'name': 'viscount'}, {'id': 17406, 'synset': 'visigoth.n.01', 'name': 'Visigoth'}, {'id': 17407, 'synset': 'visionary.n.01', 'name': 'visionary'}, {'id': 17408, 'synset': 'visiting_fireman.n.01', 'name': 'visiting_fireman'}, {'id': 17409, 'synset': 'visiting_professor.n.01', 'name': 'visiting_professor'}, {'id': 17410, 'synset': 'visualizer.n.01', 'name': 'visualizer'}, {'id': 17411, 'synset': 'vixen.n.01', 'name': 'vixen'}, {'id': 17412, 'synset': 'vizier.n.01', 'name': 'vizier'}, {'id': 17413, 'synset': 'voicer.n.01', 'name': 'voicer'}, {'id': 17414, 'synset': 'volunteer.n.02', 'name': 'volunteer'}, {'id': 17415, 'synset': 'volunteer.n.01', 'name': 'volunteer'}, {'id': 17416, 'synset': 'votary.n.02', 'name': 'votary'}, {'id': 17417, 'synset': 'votary.n.01', 'name': 'votary'}, {'id': 17418, 'synset': 'vouchee.n.01', 'name': 'vouchee'}, {'id': 17419, 'synset': 'vower.n.01', 'name': 'vower'}, {'id': 17420, 'synset': 'voyager.n.01', 'name': 'voyager'}, {'id': 17421, 'synset': 'voyeur.n.01', 'name': 'voyeur'}, {'id': 17422, 'synset': 'vulcanizer.n.01', 'name': 'vulcanizer'}, {'id': 17423, 'synset': 'waffler.n.01', 'name': 'waffler'}, {'id': 17424, 'synset': 'wagnerian.n.01', 'name': 'Wagnerian'}, {'id': 17425, 'synset': 'waif.n.01', 'name': 'waif'}, {'id': 17426, 'synset': 'wailer.n.01', 'name': 'wailer'}, {'id': 17427, 'synset': 'waiter.n.01', 'name': 'waiter'}, {'id': 17428, 'synset': 'waitress.n.01', 'name': 'waitress'}, {'id': 17429, 'synset': 'walking_delegate.n.01', 'name': 'walking_delegate'}, {'id': 17430, 'synset': 'walk-on.n.01', 'name': 'walk-on'}, {'id': 17431, 'synset': 'wallah.n.01', 'name': 'wallah'}, {'id': 17432, 'synset': 'wally.n.01', 'name': 'wally'}, {'id': 17433, 'synset': 'waltzer.n.01', 'name': 'waltzer'}, {'id': 17434, 'synset': 'wanderer.n.01', 'name': 'wanderer'}, {'id': 17435, 'synset': 'wandering_jew.n.01', 'name': 'Wandering_Jew'}, {'id': 17436, 'synset': 'wanton.n.01', 'name': 'wanton'}, {'id': 17437, 'synset': 'warrantee.n.02', 'name': 'warrantee'}, {'id': 17438, 'synset': 'warrantee.n.01', 'name': 'warrantee'}, {'id': 17439, 'synset': 'washer.n.01', 'name': 'washer'}, {'id': 17440, 'synset': 'washerman.n.01', 'name': 'washerman'}, {'id': 17441, 'synset': 'washwoman.n.01', 'name': 'washwoman'}, {'id': 17442, 'synset': 'wassailer.n.01', 'name': 'wassailer'}, {'id': 17443, 'synset': 'wastrel.n.01', 'name': 'wastrel'}, {'id': 17444, 'synset': 'wave.n.09', 'name': 'Wave'}, {'id': 17445, 'synset': 'weatherman.n.01', 'name': 'weatherman'}, {'id': 17446, 'synset': 'weekend_warrior.n.02', 'name': 'weekend_warrior'}, {'id': 17447, 'synset': 'weeder.n.01', 'name': 'weeder'}, {'id': 17448, 'synset': 'welder.n.01', 'name': 'welder'}, {'id': 17449, 'synset': 'welfare_case.n.01', 'name': 'welfare_case'}, {'id': 17450, 'synset': 'westerner.n.01', 'name': 'westerner'}, {'id': 17451, 'synset': 'west-sider.n.01', 'name': 'West-sider'}, {'id': 17452, 'synset': 'wetter.n.02', 'name': 'wetter'}, {'id': 17453, 'synset': 'whaler.n.01', 'name': 'whaler'}, {'id': 17454, 'synset': 'whig.n.02', 'name': 'Whig'}, {'id': 17455, 'synset': 'whiner.n.01', 'name': 'whiner'}, {'id': 17456, 'synset': 'whipper-in.n.01', 'name': 'whipper-in'}, {'id': 17457, 'synset': 'whisperer.n.01', 'name': 'whisperer'}, {'id': 17458, 'synset': 'whiteface.n.02', 'name': 'whiteface'}, {'id': 17459, 'synset': 'carmelite.n.01', 'name': 'Carmelite'}, {'id': 17460, 'synset': 'augustinian.n.01', 'name': 'Augustinian'}, {'id': 17461, 'synset': 'white_hope.n.01', 'name': 'white_hope'}, {'id': 17462, 'synset': 'white_supremacist.n.01', 'name': 'white_supremacist'}, {'id': 17463, 'synset': 'whoremaster.n.02', 'name': 'whoremaster'}, {'id': 17464, 'synset': 'whoremaster.n.01', 'name': 'whoremaster'}, {'id': 17465, 'synset': 'widow.n.01', 'name': 'widow'}, {'id': 17466, 'synset': 'wife.n.01', 'name': 'wife'}, {'id': 17467, 'synset': 'wiggler.n.01', 'name': 'wiggler'}, {'id': 17468, 'synset': 'wimp.n.01', 'name': 'wimp'}, {'id': 17469, 'synset': 'wing_commander.n.01', 'name': 'wing_commander'}, {'id': 17470, 'synset': 'winger.n.01', 'name': 'winger'}, {'id': 17471, 'synset': 'winner.n.02', 'name': 'winner'}, {'id': 17472, 'synset': 'winner.n.01', 'name': 'winner'}, {'id': 17473, 'synset': 'window_dresser.n.01', 'name': 'window_dresser'}, {'id': 17474, 'synset': 'winker.n.01', 'name': 'winker'}, {'id': 17475, 'synset': 'wiper.n.01', 'name': 'wiper'}, {'id': 17476, 'synset': 'wireman.n.01', 'name': 'wireman'}, {'id': 17477, 'synset': 'wise_guy.n.01', 'name': 'wise_guy'}, {'id': 17478, 'synset': 'witch_doctor.n.01', 'name': 'witch_doctor'}, {'id': 17479, 'synset': 'withdrawer.n.05', 'name': 'withdrawer'}, {'id': 17480, 'synset': 'withdrawer.n.01', 'name': 'withdrawer'}, {'id': 17481, 'synset': 'woman.n.01', 'name': 'woman'}, {'id': 17482, 'synset': 'woman.n.02', 'name': 'woman'}, {'id': 17483, 'synset': 'wonder_boy.n.01', 'name': 'wonder_boy'}, {'id': 17484, 'synset': 'wonderer.n.01', 'name': 'wonderer'}, {'id': 17485, 'synset': 'working_girl.n.01', 'name': 'working_girl'}, {'id': 17486, 'synset': 'workman.n.01', 'name': 'workman'}, {'id': 17487, 'synset': 'workmate.n.01', 'name': 'workmate'}, {'id': 17488, 'synset': 'worldling.n.01', 'name': 'worldling'}, {'id': 17489, 'synset': 'worshiper.n.01', 'name': 'worshiper'}, {'id': 17490, 'synset': 'worthy.n.01', 'name': 'worthy'}, {'id': 17491, 'synset': 'wrecker.n.01', 'name': 'wrecker'}, {'id': 17492, 'synset': 'wright.n.07', 'name': 'wright'}, {'id': 17493, 'synset': 'write-in_candidate.n.01', 'name': 'write-in_candidate'}, {'id': 17494, 'synset': 'writer.n.01', 'name': 'writer'}, {'id': 17495, 'synset': 'wykehamist.n.01', 'name': 'Wykehamist'}, {'id': 17496, 'synset': 'yakuza.n.01', 'name': 'yakuza'}, {'id': 17497, 'synset': 'yard_bird.n.01', 'name': 'yard_bird'}, {'id': 17498, 'synset': 'yardie.n.01', 'name': 'yardie'}, {'id': 17499, 'synset': 'yardman.n.01', 'name': 'yardman'}, {'id': 17500, 'synset': 'yardmaster.n.01', 'name': 'yardmaster'}, {'id': 17501, 'synset': 'yenta.n.02', 'name': 'yenta'}, {'id': 17502, 'synset': 'yogi.n.02', 'name': 'yogi'}, {'id': 17503, 'synset': 'young_buck.n.01', 'name': 'young_buck'}, {'id': 17504, 'synset': 'young_turk.n.02', 'name': 'young_Turk'}, {'id': 17505, 'synset': 'young_turk.n.01', 'name': 'Young_Turk'}, {'id': 17506, 'synset': 'zionist.n.01', 'name': 'Zionist'}, {'id': 17507, 'synset': 'zoo_keeper.n.01', 'name': 'zoo_keeper'}, {'id': 17508, 'synset': 'genet.n.01', 'name': 'Genet'}, {'id': 17509, 'synset': 'kennan.n.01', 'name': 'Kennan'}, {'id': 17510, 'synset': 'munro.n.01', 'name': 'Munro'}, {'id': 17511, 'synset': 'popper.n.01', 'name': 'Popper'}, {'id': 17512, 'synset': 'stoker.n.01', 'name': 'Stoker'}, {'id': 17513, 'synset': 'townes.n.01', 'name': 'Townes'}, {'id': 17514, 'synset': 'dust_storm.n.01', 'name': 'dust_storm'}, {'id': 17515, 'synset': 'parhelion.n.01', 'name': 'parhelion'}, {'id': 17516, 'synset': 'snow.n.01', 'name': 'snow'}, {'id': 17517, 'synset': 'facula.n.01', 'name': 'facula'}, {'id': 17518, 'synset': 'wave.n.08', 'name': 'wave'}, {'id': 17519, 'synset': 'microflora.n.01', 'name': 'microflora'}, {'id': 17520, 'synset': 'wilding.n.01', 'name': 'wilding'}, {'id': 17521, 'synset': 'semi-climber.n.01', 'name': 'semi-climber'}, {'id': 17522, 'synset': 'volva.n.01', 'name': 'volva'}, {'id': 17523, 'synset': 'basidiocarp.n.01', 'name': 'basidiocarp'}, {'id': 17524, 'synset': 'domatium.n.01', 'name': 'domatium'}, {'id': 17525, 'synset': 'apomict.n.01', 'name': 'apomict'}, {'id': 17526, 'synset': 'aquatic.n.01', 'name': 'aquatic'}, {'id': 17527, 'synset': 'bryophyte.n.01', 'name': 'bryophyte'}, {'id': 17528, 'synset': 'acrocarp.n.01', 'name': 'acrocarp'}, {'id': 17529, 'synset': 'sphagnum.n.01', 'name': 'sphagnum'}, {'id': 17530, 'synset': 'liverwort.n.01', 'name': 'liverwort'}, {'id': 17531, 'synset': 'hepatica.n.02', 'name': 'hepatica'}, {'id': 17532, 'synset': 'pecopteris.n.01', 'name': 'pecopteris'}, {'id': 17533, 'synset': 'pteridophyte.n.01', 'name': 'pteridophyte'}, {'id': 17534, 'synset': 'fern.n.01', 'name': 'fern'}, {'id': 17535, 'synset': 'fern_ally.n.01', 'name': 'fern_ally'}, {'id': 17536, 'synset': 'spore.n.01', 'name': 'spore'}, {'id': 17537, 'synset': 'carpospore.n.01', 'name': 'carpospore'}, {'id': 17538, 'synset': 'chlamydospore.n.01', 'name': 'chlamydospore'}, {'id': 17539, 'synset': 'conidium.n.01', 'name': 'conidium'}, {'id': 17540, 'synset': 'oospore.n.01', 'name': 'oospore'}, {'id': 17541, 'synset': 'tetraspore.n.01', 'name': 'tetraspore'}, {'id': 17542, 'synset': 'zoospore.n.01', 'name': 'zoospore'}, {'id': 17543, 'synset': 'cryptogam.n.01', 'name': 'cryptogam'}, {'id': 17544, 'synset': 'spermatophyte.n.01', 'name': 'spermatophyte'}, {'id': 17545, 'synset': 'seedling.n.01', 'name': 'seedling'}, {'id': 17546, 'synset': 'annual.n.01', 'name': 'annual'}, {'id': 17547, 'synset': 'biennial.n.01', 'name': 'biennial'}, {'id': 17548, 'synset': 'perennial.n.01', 'name': 'perennial'}, {'id': 17549, 'synset': 'hygrophyte.n.01', 'name': 'hygrophyte'}, {'id': 17550, 'synset': 'gymnosperm.n.01', 'name': 'gymnosperm'}, {'id': 17551, 'synset': 'gnetum.n.01', 'name': 'gnetum'}, {'id': 17552, 'synset': 'catha_edulis.n.01', 'name': 'Catha_edulis'}, {'id': 17553, 'synset': 'ephedra.n.01', 'name': 'ephedra'}, {'id': 17554, 'synset': 'mahuang.n.01', 'name': 'mahuang'}, {'id': 17555, 'synset': 'welwitschia.n.01', 'name': 'welwitschia'}, {'id': 17556, 'synset': 'cycad.n.01', 'name': 'cycad'}, {'id': 17557, 'synset': 'sago_palm.n.02', 'name': 'sago_palm'}, {'id': 17558, 'synset': 'false_sago.n.01', 'name': 'false_sago'}, {'id': 17559, 'synset': 'zamia.n.01', 'name': 'zamia'}, {'id': 17560, 'synset': 'coontie.n.01', 'name': 'coontie'}, {'id': 17561, 'synset': 'ceratozamia.n.01', 'name': 'ceratozamia'}, {'id': 17562, 'synset': 'dioon.n.01', 'name': 'dioon'}, {'id': 17563, 'synset': 'encephalartos.n.01', 'name': 'encephalartos'}, {'id': 17564, 'synset': 'kaffir_bread.n.01', 'name': 'kaffir_bread'}, {'id': 17565, 'synset': 'macrozamia.n.01', 'name': 'macrozamia'}, {'id': 17566, 'synset': 'burrawong.n.01', 'name': 'burrawong'}, {'id': 17567, 'synset': 'pine.n.01', 'name': 'pine'}, {'id': 17568, 'synset': 'pinon.n.01', 'name': 'pinon'}, {'id': 17569, 'synset': 'nut_pine.n.01', 'name': 'nut_pine'}, {'id': 17570, 'synset': 'pinon_pine.n.01', 'name': 'pinon_pine'}, {'id': 17571, 'synset': 'rocky_mountain_pinon.n.01', 'name': 'Rocky_mountain_pinon'}, {'id': 17572, 'synset': 'single-leaf.n.01', 'name': 'single-leaf'}, {'id': 17573, 'synset': 'bishop_pine.n.01', 'name': 'bishop_pine'}, {'id': 17574, 'synset': 'california_single-leaf_pinyon.n.01', 'name': 'California_single-leaf_pinyon'}, {'id': 17575, 'synset': "parry's_pinyon.n.01", 'name': "Parry's_pinyon"}, {'id': 17576, 'synset': 'spruce_pine.n.04', 'name': 'spruce_pine'}, {'id': 17577, 'synset': 'black_pine.n.05', 'name': 'black_pine'}, {'id': 17578, 'synset': 'pitch_pine.n.02', 'name': 'pitch_pine'}, {'id': 17579, 'synset': 'pond_pine.n.01', 'name': 'pond_pine'}, {'id': 17580, 'synset': 'stone_pine.n.01', 'name': 'stone_pine'}, {'id': 17581, 'synset': 'swiss_pine.n.01', 'name': 'Swiss_pine'}, {'id': 17582, 'synset': 'cembra_nut.n.01', 'name': 'cembra_nut'}, {'id': 17583, 'synset': 'swiss_mountain_pine.n.01', 'name': 'Swiss_mountain_pine'}, {'id': 17584, 'synset': 'ancient_pine.n.01', 'name': 'ancient_pine'}, {'id': 17585, 'synset': 'white_pine.n.01', 'name': 'white_pine'}, {'id': 17586, 'synset': 'american_white_pine.n.01', 'name': 'American_white_pine'}, {'id': 17587, 'synset': 'western_white_pine.n.01', 'name': 'western_white_pine'}, {'id': 17588, 'synset': 'southwestern_white_pine.n.01', 'name': 'southwestern_white_pine'}, {'id': 17589, 'synset': 'limber_pine.n.01', 'name': 'limber_pine'}, {'id': 17590, 'synset': 'whitebark_pine.n.01', 'name': 'whitebark_pine'}, {'id': 17591, 'synset': 'yellow_pine.n.01', 'name': 'yellow_pine'}, {'id': 17592, 'synset': 'ponderosa.n.01', 'name': 'ponderosa'}, {'id': 17593, 'synset': 'jeffrey_pine.n.01', 'name': 'Jeffrey_pine'}, {'id': 17594, 'synset': 'shore_pine.n.01', 'name': 'shore_pine'}, {'id': 17595, 'synset': 'sierra_lodgepole_pine.n.01', 'name': 'Sierra_lodgepole_pine'}, {'id': 17596, 'synset': 'loblolly_pine.n.01', 'name': 'loblolly_pine'}, {'id': 17597, 'synset': 'jack_pine.n.01', 'name': 'jack_pine'}, {'id': 17598, 'synset': 'swamp_pine.n.01', 'name': 'swamp_pine'}, {'id': 17599, 'synset': 'longleaf_pine.n.01', 'name': 'longleaf_pine'}, {'id': 17600, 'synset': 'shortleaf_pine.n.01', 'name': 'shortleaf_pine'}, {'id': 17601, 'synset': 'red_pine.n.02', 'name': 'red_pine'}, {'id': 17602, 'synset': 'scotch_pine.n.01', 'name': 'Scotch_pine'}, {'id': 17603, 'synset': 'scrub_pine.n.01', 'name': 'scrub_pine'}, {'id': 17604, 'synset': 'monterey_pine.n.01', 'name': 'Monterey_pine'}, {'id': 17605, 'synset': 'bristlecone_pine.n.01', 'name': 'bristlecone_pine'}, {'id': 17606, 'synset': 'table-mountain_pine.n.01', 'name': 'table-mountain_pine'}, {'id': 17607, 'synset': 'knobcone_pine.n.01', 'name': 'knobcone_pine'}, {'id': 17608, 'synset': 'japanese_red_pine.n.01', 'name': 'Japanese_red_pine'}, {'id': 17609, 'synset': 'japanese_black_pine.n.01', 'name': 'Japanese_black_pine'}, {'id': 17610, 'synset': 'torrey_pine.n.01', 'name': 'Torrey_pine'}, {'id': 17611, 'synset': 'larch.n.02', 'name': 'larch'}, {'id': 17612, 'synset': 'american_larch.n.01', 'name': 'American_larch'}, {'id': 17613, 'synset': 'western_larch.n.01', 'name': 'western_larch'}, {'id': 17614, 'synset': 'subalpine_larch.n.01', 'name': 'subalpine_larch'}, {'id': 17615, 'synset': 'european_larch.n.01', 'name': 'European_larch'}, {'id': 17616, 'synset': 'siberian_larch.n.01', 'name': 'Siberian_larch'}, {'id': 17617, 'synset': 'golden_larch.n.01', 'name': 'golden_larch'}, {'id': 17618, 'synset': 'fir.n.02', 'name': 'fir'}, {'id': 17619, 'synset': 'silver_fir.n.01', 'name': 'silver_fir'}, {'id': 17620, 'synset': 'amabilis_fir.n.01', 'name': 'amabilis_fir'}, {'id': 17621, 'synset': 'european_silver_fir.n.01', 'name': 'European_silver_fir'}, {'id': 17622, 'synset': 'white_fir.n.01', 'name': 'white_fir'}, {'id': 17623, 'synset': 'balsam_fir.n.01', 'name': 'balsam_fir'}, {'id': 17624, 'synset': 'fraser_fir.n.01', 'name': 'Fraser_fir'}, {'id': 17625, 'synset': 'lowland_fir.n.01', 'name': 'lowland_fir'}, {'id': 17626, 'synset': 'alpine_fir.n.01', 'name': 'Alpine_fir'}, {'id': 17627, 'synset': 'santa_lucia_fir.n.01', 'name': 'Santa_Lucia_fir'}, {'id': 17628, 'synset': 'cedar.n.03', 'name': 'cedar'}, {'id': 17629, 'synset': 'cedar_of_lebanon.n.01', 'name': 'cedar_of_Lebanon'}, {'id': 17630, 'synset': 'deodar.n.01', 'name': 'deodar'}, {'id': 17631, 'synset': 'atlas_cedar.n.01', 'name': 'Atlas_cedar'}, {'id': 17632, 'synset': 'spruce.n.02', 'name': 'spruce'}, {'id': 17633, 'synset': 'norway_spruce.n.01', 'name': 'Norway_spruce'}, {'id': 17634, 'synset': 'weeping_spruce.n.01', 'name': 'weeping_spruce'}, {'id': 17635, 'synset': 'engelmann_spruce.n.01', 'name': 'Engelmann_spruce'}, {'id': 17636, 'synset': 'white_spruce.n.01', 'name': 'white_spruce'}, {'id': 17637, 'synset': 'black_spruce.n.01', 'name': 'black_spruce'}, {'id': 17638, 'synset': 'siberian_spruce.n.01', 'name': 'Siberian_spruce'}, {'id': 17639, 'synset': 'sitka_spruce.n.01', 'name': 'Sitka_spruce'}, {'id': 17640, 'synset': 'oriental_spruce.n.01', 'name': 'oriental_spruce'}, {'id': 17641, 'synset': 'colorado_spruce.n.01', 'name': 'Colorado_spruce'}, {'id': 17642, 'synset': 'red_spruce.n.01', 'name': 'red_spruce'}, {'id': 17643, 'synset': 'hemlock.n.04', 'name': 'hemlock'}, {'id': 17644, 'synset': 'eastern_hemlock.n.01', 'name': 'eastern_hemlock'}, {'id': 17645, 'synset': 'carolina_hemlock.n.01', 'name': 'Carolina_hemlock'}, {'id': 17646, 'synset': 'mountain_hemlock.n.01', 'name': 'mountain_hemlock'}, {'id': 17647, 'synset': 'western_hemlock.n.01', 'name': 'western_hemlock'}, {'id': 17648, 'synset': 'douglas_fir.n.02', 'name': 'douglas_fir'}, {'id': 17649, 'synset': 'green_douglas_fir.n.01', 'name': 'green_douglas_fir'}, {'id': 17650, 'synset': 'big-cone_spruce.n.01', 'name': 'big-cone_spruce'}, {'id': 17651, 'synset': 'cathaya.n.01', 'name': 'Cathaya'}, {'id': 17652, 'synset': 'cedar.n.01', 'name': 'cedar'}, {'id': 17653, 'synset': 'cypress.n.02', 'name': 'cypress'}, {'id': 17654, 'synset': 'gowen_cypress.n.01', 'name': 'gowen_cypress'}, {'id': 17655, 'synset': 'pygmy_cypress.n.01', 'name': 'pygmy_cypress'}, {'id': 17656, 'synset': 'santa_cruz_cypress.n.01', 'name': 'Santa_Cruz_cypress'}, {'id': 17657, 'synset': 'arizona_cypress.n.01', 'name': 'Arizona_cypress'}, {'id': 17658, 'synset': 'guadalupe_cypress.n.01', 'name': 'Guadalupe_cypress'}, {'id': 17659, 'synset': 'monterey_cypress.n.01', 'name': 'Monterey_cypress'}, {'id': 17660, 'synset': 'mexican_cypress.n.01', 'name': 'Mexican_cypress'}, {'id': 17661, 'synset': 'italian_cypress.n.01', 'name': 'Italian_cypress'}, {'id': 17662, 'synset': 'king_william_pine.n.01', 'name': 'King_William_pine'}, {'id': 17663, 'synset': 'chilean_cedar.n.01', 'name': 'Chilean_cedar'}, {'id': 17664, 'synset': 'incense_cedar.n.02', 'name': 'incense_cedar'}, {'id': 17665, 'synset': 'southern_white_cedar.n.01', 'name': 'southern_white_cedar'}, {'id': 17666, 'synset': 'oregon_cedar.n.01', 'name': 'Oregon_cedar'}, {'id': 17667, 'synset': 'yellow_cypress.n.01', 'name': 'yellow_cypress'}, {'id': 17668, 'synset': 'japanese_cedar.n.01', 'name': 'Japanese_cedar'}, {'id': 17669, 'synset': 'juniper_berry.n.01', 'name': 'juniper_berry'}, {'id': 17670, 'synset': 'incense_cedar.n.01', 'name': 'incense_cedar'}, {'id': 17671, 'synset': 'kawaka.n.01', 'name': 'kawaka'}, {'id': 17672, 'synset': 'pahautea.n.01', 'name': 'pahautea'}, {'id': 17673, 'synset': 'metasequoia.n.01', 'name': 'metasequoia'}, {'id': 17674, 'synset': 'arborvitae.n.01', 'name': 'arborvitae'}, {'id': 17675, 'synset': 'western_red_cedar.n.01', 'name': 'western_red_cedar'}, {'id': 17676, 'synset': 'american_arborvitae.n.01', 'name': 'American_arborvitae'}, {'id': 17677, 'synset': 'oriental_arborvitae.n.01', 'name': 'Oriental_arborvitae'}, {'id': 17678, 'synset': 'hiba_arborvitae.n.01', 'name': 'hiba_arborvitae'}, {'id': 17679, 'synset': 'keteleeria.n.01', 'name': 'keteleeria'}, {'id': 17680, 'synset': 'wollemi_pine.n.01', 'name': 'Wollemi_pine'}, {'id': 17681, 'synset': 'araucaria.n.01', 'name': 'araucaria'}, {'id': 17682, 'synset': 'monkey_puzzle.n.01', 'name': 'monkey_puzzle'}, {'id': 17683, 'synset': 'norfolk_island_pine.n.01', 'name': 'norfolk_island_pine'}, {'id': 17684, 'synset': 'new_caledonian_pine.n.01', 'name': 'new_caledonian_pine'}, {'id': 17685, 'synset': 'bunya_bunya.n.01', 'name': 'bunya_bunya'}, {'id': 17686, 'synset': 'hoop_pine.n.01', 'name': 'hoop_pine'}, {'id': 17687, 'synset': 'kauri_pine.n.01', 'name': 'kauri_pine'}, {'id': 17688, 'synset': 'kauri.n.02', 'name': 'kauri'}, {'id': 17689, 'synset': 'amboina_pine.n.01', 'name': 'amboina_pine'}, {'id': 17690, 'synset': 'dundathu_pine.n.01', 'name': 'dundathu_pine'}, {'id': 17691, 'synset': 'red_kauri.n.01', 'name': 'red_kauri'}, {'id': 17692, 'synset': 'plum-yew.n.01', 'name': 'plum-yew'}, {'id': 17693, 'synset': 'california_nutmeg.n.01', 'name': 'California_nutmeg'}, {'id': 17694, 'synset': 'stinking_cedar.n.01', 'name': 'stinking_cedar'}, {'id': 17695, 'synset': 'celery_pine.n.01', 'name': 'celery_pine'}, {'id': 17696, 'synset': 'celery_top_pine.n.01', 'name': 'celery_top_pine'}, {'id': 17697, 'synset': 'tanekaha.n.01', 'name': 'tanekaha'}, {'id': 17698, 'synset': 'alpine_celery_pine.n.01', 'name': 'Alpine_celery_pine'}, {'id': 17699, 'synset': 'yellowwood.n.02', 'name': 'yellowwood'}, {'id': 17700, 'synset': 'gymnospermous_yellowwood.n.01', 'name': 'gymnospermous_yellowwood'}, {'id': 17701, 'synset': 'podocarp.n.01', 'name': 'podocarp'}, {'id': 17702, 'synset': 'yacca.n.01', 'name': 'yacca'}, {'id': 17703, 'synset': 'brown_pine.n.01', 'name': 'brown_pine'}, {'id': 17704, 'synset': 'cape_yellowwood.n.01', 'name': 'cape_yellowwood'}, {'id': 17705, 'synset': 'south-african_yellowwood.n.01', 'name': 'South-African_yellowwood'}, {'id': 17706, 'synset': 'alpine_totara.n.01', 'name': 'alpine_totara'}, {'id': 17707, 'synset': 'totara.n.01', 'name': 'totara'}, {'id': 17708, 'synset': 'common_yellowwood.n.01', 'name': 'common_yellowwood'}, {'id': 17709, 'synset': 'kahikatea.n.01', 'name': 'kahikatea'}, {'id': 17710, 'synset': 'rimu.n.01', 'name': 'rimu'}, {'id': 17711, 'synset': 'tarwood.n.02', 'name': 'tarwood'}, {'id': 17712, 'synset': 'common_sickle_pine.n.01', 'name': 'common_sickle_pine'}, {'id': 17713, 'synset': 'yellow-leaf_sickle_pine.n.01', 'name': 'yellow-leaf_sickle_pine'}, {'id': 17714, 'synset': 'tarwood.n.01', 'name': 'tarwood'}, {'id': 17715, 'synset': 'westland_pine.n.01', 'name': 'westland_pine'}, {'id': 17716, 'synset': 'huon_pine.n.01', 'name': 'huon_pine'}, {'id': 17717, 'synset': 'chilean_rimu.n.01', 'name': 'Chilean_rimu'}, {'id': 17718, 'synset': 'mountain_rimu.n.01', 'name': 'mountain_rimu'}, {'id': 17719, 'synset': 'nagi.n.01', 'name': 'nagi'}, {'id': 17720, 'synset': 'miro.n.01', 'name': 'miro'}, {'id': 17721, 'synset': 'matai.n.01', 'name': 'matai'}, {'id': 17722, 'synset': 'plum-fruited_yew.n.01', 'name': 'plum-fruited_yew'}, {'id': 17723, 'synset': 'prince_albert_yew.n.01', 'name': 'Prince_Albert_yew'}, {'id': 17724, 'synset': 'sundacarpus_amara.n.01', 'name': 'Sundacarpus_amara'}, {'id': 17725, 'synset': 'japanese_umbrella_pine.n.01', 'name': 'Japanese_umbrella_pine'}, {'id': 17726, 'synset': 'yew.n.02', 'name': 'yew'}, {'id': 17727, 'synset': 'old_world_yew.n.01', 'name': 'Old_World_yew'}, {'id': 17728, 'synset': 'pacific_yew.n.01', 'name': 'Pacific_yew'}, {'id': 17729, 'synset': 'japanese_yew.n.01', 'name': 'Japanese_yew'}, {'id': 17730, 'synset': 'florida_yew.n.01', 'name': 'Florida_yew'}, {'id': 17731, 'synset': 'new_caledonian_yew.n.01', 'name': 'New_Caledonian_yew'}, {'id': 17732, 'synset': 'white-berry_yew.n.01', 'name': 'white-berry_yew'}, {'id': 17733, 'synset': 'ginkgo.n.01', 'name': 'ginkgo'}, {'id': 17734, 'synset': 'angiosperm.n.01', 'name': 'angiosperm'}, {'id': 17735, 'synset': 'dicot.n.01', 'name': 'dicot'}, {'id': 17736, 'synset': 'monocot.n.01', 'name': 'monocot'}, {'id': 17737, 'synset': 'floret.n.01', 'name': 'floret'}, {'id': 17738, 'synset': 'flower.n.01', 'name': 'flower'}, {'id': 17739, 'synset': 'bloomer.n.01', 'name': 'bloomer'}, {'id': 17740, 'synset': 'wildflower.n.01', 'name': 'wildflower'}, {'id': 17741, 'synset': 'apetalous_flower.n.01', 'name': 'apetalous_flower'}, {'id': 17742, 'synset': 'inflorescence.n.02', 'name': 'inflorescence'}, {'id': 17743, 'synset': 'rosebud.n.01', 'name': 'rosebud'}, {'id': 17744, 'synset': 'gynostegium.n.01', 'name': 'gynostegium'}, {'id': 17745, 'synset': 'pollinium.n.01', 'name': 'pollinium'}, {'id': 17746, 'synset': 'pistil.n.01', 'name': 'pistil'}, {'id': 17747, 'synset': 'gynobase.n.01', 'name': 'gynobase'}, {'id': 17748, 'synset': 'gynophore.n.01', 'name': 'gynophore'}, {'id': 17749, 'synset': 'stylopodium.n.01', 'name': 'stylopodium'}, {'id': 17750, 'synset': 'carpophore.n.01', 'name': 'carpophore'}, {'id': 17751, 'synset': 'cornstalk.n.01', 'name': 'cornstalk'}, {'id': 17752, 'synset': 'petiolule.n.01', 'name': 'petiolule'}, {'id': 17753, 'synset': 'mericarp.n.01', 'name': 'mericarp'}, {'id': 17754, 'synset': 'micropyle.n.01', 'name': 'micropyle'}, {'id': 17755, 'synset': 'germ_tube.n.01', 'name': 'germ_tube'}, {'id': 17756, 'synset': 'pollen_tube.n.01', 'name': 'pollen_tube'}, {'id': 17757, 'synset': 'gemma.n.01', 'name': 'gemma'}, {'id': 17758, 'synset': 'galbulus.n.01', 'name': 'galbulus'}, {'id': 17759, 'synset': 'nectary.n.01', 'name': 'nectary'}, {'id': 17760, 'synset': 'pericarp.n.01', 'name': 'pericarp'}, {'id': 17761, 'synset': 'epicarp.n.01', 'name': 'epicarp'}, {'id': 17762, 'synset': 'mesocarp.n.01', 'name': 'mesocarp'}, {'id': 17763, 'synset': 'pip.n.03', 'name': 'pip'}, {'id': 17764, 'synset': 'silique.n.01', 'name': 'silique'}, {'id': 17765, 'synset': 'cataphyll.n.01', 'name': 'cataphyll'}, {'id': 17766, 'synset': 'perisperm.n.01', 'name': 'perisperm'}, {'id': 17767, 'synset': 'monocarp.n.01', 'name': 'monocarp'}, {'id': 17768, 'synset': 'sporophyte.n.01', 'name': 'sporophyte'}, {'id': 17769, 'synset': 'gametophyte.n.01', 'name': 'gametophyte'}, {'id': 17770, 'synset': 'megasporangium.n.01', 'name': 'megasporangium'}, {'id': 17771, 'synset': 'microspore.n.01', 'name': 'microspore'}, {'id': 17772, 'synset': 'microsporangium.n.01', 'name': 'microsporangium'}, {'id': 17773, 'synset': 'microsporophyll.n.01', 'name': 'microsporophyll'}, {'id': 17774, 'synset': 'archespore.n.01', 'name': 'archespore'}, {'id': 17775, 'synset': 'bonduc_nut.n.01', 'name': 'bonduc_nut'}, {'id': 17776, 'synset': "job's_tears.n.01", 'name': "Job's_tears"}, {'id': 17777, 'synset': 'oilseed.n.01', 'name': 'oilseed'}, {'id': 17778, 'synset': 'castor_bean.n.01', 'name': 'castor_bean'}, {'id': 17779, 'synset': 'cottonseed.n.01', 'name': 'cottonseed'}, {'id': 17780, 'synset': 'candlenut.n.02', 'name': 'candlenut'}, {'id': 17781, 'synset': 'peach_pit.n.01', 'name': 'peach_pit'}, {'id': 17782, 'synset': 'hypanthium.n.01', 'name': 'hypanthium'}, {'id': 17783, 'synset': 'petal.n.01', 'name': 'petal'}, {'id': 17784, 'synset': 'corolla.n.01', 'name': 'corolla'}, {'id': 17785, 'synset': 'lip.n.02', 'name': 'lip'}, {'id': 17786, 'synset': 'perianth.n.01', 'name': 'perianth'}, {'id': 17787, 'synset': 'thistledown.n.01', 'name': 'thistledown'}, {'id': 17788, 'synset': 'custard_apple.n.01', 'name': 'custard_apple'}, {'id': 17789, 'synset': 'cherimoya.n.01', 'name': 'cherimoya'}, {'id': 17790, 'synset': 'ilama.n.01', 'name': 'ilama'}, {'id': 17791, 'synset': 'soursop.n.01', 'name': 'soursop'}, {'id': 17792, 'synset': "bullock's_heart.n.01", 'name': "bullock's_heart"}, {'id': 17793, 'synset': 'sweetsop.n.01', 'name': 'sweetsop'}, {'id': 17794, 'synset': 'pond_apple.n.01', 'name': 'pond_apple'}, {'id': 17795, 'synset': 'pawpaw.n.02', 'name': 'pawpaw'}, {'id': 17796, 'synset': 'ilang-ilang.n.02', 'name': 'ilang-ilang'}, {'id': 17797, 'synset': 'lancewood.n.02', 'name': 'lancewood'}, {'id': 17798, 'synset': 'guinea_pepper.n.02', 'name': 'Guinea_pepper'}, {'id': 17799, 'synset': 'barberry.n.01', 'name': 'barberry'}, {'id': 17800, 'synset': 'american_barberry.n.01', 'name': 'American_barberry'}, {'id': 17801, 'synset': 'common_barberry.n.01', 'name': 'common_barberry'}, {'id': 17802, 'synset': 'japanese_barberry.n.01', 'name': 'Japanese_barberry'}, {'id': 17803, 'synset': 'oregon_grape.n.02', 'name': 'Oregon_grape'}, {'id': 17804, 'synset': 'oregon_grape.n.01', 'name': 'Oregon_grape'}, {'id': 17805, 'synset': 'mayapple.n.01', 'name': 'mayapple'}, {'id': 17806, 'synset': 'may_apple.n.01', 'name': 'May_apple'}, {'id': 17807, 'synset': 'allspice.n.02', 'name': 'allspice'}, {'id': 17808, 'synset': 'carolina_allspice.n.01', 'name': 'Carolina_allspice'}, {'id': 17809, 'synset': 'spicebush.n.02', 'name': 'spicebush'}, {'id': 17810, 'synset': 'katsura_tree.n.01', 'name': 'katsura_tree'}, {'id': 17811, 'synset': 'laurel.n.01', 'name': 'laurel'}, {'id': 17812, 'synset': 'true_laurel.n.01', 'name': 'true_laurel'}, {'id': 17813, 'synset': 'camphor_tree.n.01', 'name': 'camphor_tree'}, {'id': 17814, 'synset': 'cinnamon.n.02', 'name': 'cinnamon'}, {'id': 17815, 'synset': 'cassia.n.03', 'name': 'cassia'}, {'id': 17816, 'synset': 'cassia_bark.n.01', 'name': 'cassia_bark'}, {'id': 17817, 'synset': 'saigon_cinnamon.n.01', 'name': 'Saigon_cinnamon'}, {'id': 17818, 'synset': 'cinnamon_bark.n.01', 'name': 'cinnamon_bark'}, {'id': 17819, 'synset': 'spicebush.n.01', 'name': 'spicebush'}, {'id': 17820, 'synset': 'avocado.n.02', 'name': 'avocado'}, {'id': 17821, 'synset': 'laurel-tree.n.01', 'name': 'laurel-tree'}, {'id': 17822, 'synset': 'sassafras.n.01', 'name': 'sassafras'}, {'id': 17823, 'synset': 'california_laurel.n.01', 'name': 'California_laurel'}, {'id': 17824, 'synset': 'anise_tree.n.01', 'name': 'anise_tree'}, {'id': 17825, 'synset': 'purple_anise.n.01', 'name': 'purple_anise'}, {'id': 17826, 'synset': 'star_anise.n.02', 'name': 'star_anise'}, {'id': 17827, 'synset': 'star_anise.n.01', 'name': 'star_anise'}, {'id': 17828, 'synset': 'magnolia.n.02', 'name': 'magnolia'}, {'id': 17829, 'synset': 'southern_magnolia.n.01', 'name': 'southern_magnolia'}, {'id': 17830, 'synset': 'umbrella_tree.n.02', 'name': 'umbrella_tree'}, {'id': 17831, 'synset': 'earleaved_umbrella_tree.n.01', 'name': 'earleaved_umbrella_tree'}, {'id': 17832, 'synset': 'cucumber_tree.n.01', 'name': 'cucumber_tree'}, {'id': 17833, 'synset': 'large-leaved_magnolia.n.01', 'name': 'large-leaved_magnolia'}, {'id': 17834, 'synset': 'saucer_magnolia.n.01', 'name': 'saucer_magnolia'}, {'id': 17835, 'synset': 'star_magnolia.n.01', 'name': 'star_magnolia'}, {'id': 17836, 'synset': 'sweet_bay.n.01', 'name': 'sweet_bay'}, {'id': 17837, 'synset': 'manglietia.n.01', 'name': 'manglietia'}, {'id': 17838, 'synset': 'tulip_tree.n.01', 'name': 'tulip_tree'}, {'id': 17839, 'synset': 'moonseed.n.01', 'name': 'moonseed'}, {'id': 17840, 'synset': 'common_moonseed.n.01', 'name': 'common_moonseed'}, {'id': 17841, 'synset': 'carolina_moonseed.n.01', 'name': 'Carolina_moonseed'}, {'id': 17842, 'synset': 'nutmeg.n.01', 'name': 'nutmeg'}, {'id': 17843, 'synset': 'water_nymph.n.02', 'name': 'water_nymph'}, {'id': 17844, 'synset': 'european_white_lily.n.01', 'name': 'European_white_lily'}, {'id': 17845, 'synset': 'southern_spatterdock.n.01', 'name': 'southern_spatterdock'}, {'id': 17846, 'synset': 'lotus.n.01', 'name': 'lotus'}, {'id': 17847, 'synset': 'water_chinquapin.n.01', 'name': 'water_chinquapin'}, {'id': 17848, 'synset': 'water-shield.n.02', 'name': 'water-shield'}, {'id': 17849, 'synset': 'water-shield.n.01', 'name': 'water-shield'}, {'id': 17850, 'synset': 'peony.n.01', 'name': 'peony'}, {'id': 17851, 'synset': 'buttercup.n.01', 'name': 'buttercup'}, {'id': 17852, 'synset': 'meadow_buttercup.n.01', 'name': 'meadow_buttercup'}, {'id': 17853, 'synset': 'water_crowfoot.n.01', 'name': 'water_crowfoot'}, {'id': 17854, 'synset': 'lesser_celandine.n.01', 'name': 'lesser_celandine'}, {'id': 17855, 'synset': 'lesser_spearwort.n.01', 'name': 'lesser_spearwort'}, {'id': 17856, 'synset': 'greater_spearwort.n.01', 'name': 'greater_spearwort'}, {'id': 17857, 'synset': 'western_buttercup.n.01', 'name': 'western_buttercup'}, {'id': 17858, 'synset': 'creeping_buttercup.n.01', 'name': 'creeping_buttercup'}, {'id': 17859, 'synset': 'cursed_crowfoot.n.01', 'name': 'cursed_crowfoot'}, {'id': 17860, 'synset': 'aconite.n.01', 'name': 'aconite'}, {'id': 17861, 'synset': 'monkshood.n.01', 'name': 'monkshood'}, {'id': 17862, 'synset': 'wolfsbane.n.01', 'name': 'wolfsbane'}, {'id': 17863, 'synset': 'baneberry.n.02', 'name': 'baneberry'}, {'id': 17864, 'synset': 'baneberry.n.01', 'name': 'baneberry'}, {'id': 17865, 'synset': 'red_baneberry.n.01', 'name': 'red_baneberry'}, {'id': 17866, 'synset': "pheasant's-eye.n.01", 'name': "pheasant's-eye"}, {'id': 17867, 'synset': 'anemone.n.01', 'name': 'anemone'}, {'id': 17868, 'synset': 'alpine_anemone.n.01', 'name': 'Alpine_anemone'}, {'id': 17869, 'synset': 'canada_anemone.n.01', 'name': 'Canada_anemone'}, {'id': 17870, 'synset': 'thimbleweed.n.01', 'name': 'thimbleweed'}, {'id': 17871, 'synset': 'wood_anemone.n.02', 'name': 'wood_anemone'}, {'id': 17872, 'synset': 'wood_anemone.n.01', 'name': 'wood_anemone'}, {'id': 17873, 'synset': 'longheaded_thimbleweed.n.01', 'name': 'longheaded_thimbleweed'}, {'id': 17874, 'synset': 'snowdrop_anemone.n.01', 'name': 'snowdrop_anemone'}, {'id': 17875, 'synset': 'virginia_thimbleweed.n.01', 'name': 'Virginia_thimbleweed'}, {'id': 17876, 'synset': 'rue_anemone.n.01', 'name': 'rue_anemone'}, {'id': 17877, 'synset': 'columbine.n.01', 'name': 'columbine'}, {'id': 17878, 'synset': 'meeting_house.n.01', 'name': 'meeting_house'}, {'id': 17879, 'synset': 'blue_columbine.n.01', 'name': 'blue_columbine'}, {'id': 17880, 'synset': "granny's_bonnets.n.01", 'name': "granny's_bonnets"}, {'id': 17881, 'synset': 'marsh_marigold.n.01', 'name': 'marsh_marigold'}, {'id': 17882, 'synset': 'american_bugbane.n.01', 'name': 'American_bugbane'}, {'id': 17883, 'synset': 'black_cohosh.n.01', 'name': 'black_cohosh'}, {'id': 17884, 'synset': 'fetid_bugbane.n.01', 'name': 'fetid_bugbane'}, {'id': 17885, 'synset': 'clematis.n.01', 'name': 'clematis'}, {'id': 17886, 'synset': 'pine_hyacinth.n.01', 'name': 'pine_hyacinth'}, {'id': 17887, 'synset': 'blue_jasmine.n.01', 'name': 'blue_jasmine'}, {'id': 17888, 'synset': 'golden_clematis.n.01', 'name': 'golden_clematis'}, {'id': 17889, 'synset': 'scarlet_clematis.n.01', 'name': 'scarlet_clematis'}, {'id': 17890, 'synset': 'leather_flower.n.02', 'name': 'leather_flower'}, {'id': 17891, 'synset': 'leather_flower.n.01', 'name': 'leather_flower'}, {'id': 17892, 'synset': "virgin's_bower.n.01", 'name': "virgin's_bower"}, {'id': 17893, 'synset': 'purple_clematis.n.01', 'name': 'purple_clematis'}, {'id': 17894, 'synset': 'goldthread.n.01', 'name': 'goldthread'}, {'id': 17895, 'synset': 'rocket_larkspur.n.01', 'name': 'rocket_larkspur'}, {'id': 17896, 'synset': 'delphinium.n.01', 'name': 'delphinium'}, {'id': 17897, 'synset': 'larkspur.n.01', 'name': 'larkspur'}, {'id': 17898, 'synset': 'winter_aconite.n.01', 'name': 'winter_aconite'}, {'id': 17899, 'synset': 'lenten_rose.n.01', 'name': 'lenten_rose'}, {'id': 17900, 'synset': 'green_hellebore.n.01', 'name': 'green_hellebore'}, {'id': 17901, 'synset': 'hepatica.n.01', 'name': 'hepatica'}, {'id': 17902, 'synset': 'goldenseal.n.01', 'name': 'goldenseal'}, {'id': 17903, 'synset': 'false_rue_anemone.n.01', 'name': 'false_rue_anemone'}, {'id': 17904, 'synset': 'giant_buttercup.n.01', 'name': 'giant_buttercup'}, {'id': 17905, 'synset': 'nigella.n.01', 'name': 'nigella'}, {'id': 17906, 'synset': 'love-in-a-mist.n.03', 'name': 'love-in-a-mist'}, {'id': 17907, 'synset': 'fennel_flower.n.01', 'name': 'fennel_flower'}, {'id': 17908, 'synset': 'black_caraway.n.01', 'name': 'black_caraway'}, {'id': 17909, 'synset': 'pasqueflower.n.01', 'name': 'pasqueflower'}, {'id': 17910, 'synset': 'meadow_rue.n.01', 'name': 'meadow_rue'}, {'id': 17911, 'synset': 'false_bugbane.n.01', 'name': 'false_bugbane'}, {'id': 17912, 'synset': 'globeflower.n.01', 'name': 'globeflower'}, {'id': 17913, 'synset': "winter's_bark.n.02", 'name': "winter's_bark"}, {'id': 17914, 'synset': 'pepper_shrub.n.01', 'name': 'pepper_shrub'}, {'id': 17915, 'synset': 'sweet_gale.n.01', 'name': 'sweet_gale'}, {'id': 17916, 'synset': 'wax_myrtle.n.01', 'name': 'wax_myrtle'}, {'id': 17917, 'synset': 'bay_myrtle.n.01', 'name': 'bay_myrtle'}, {'id': 17918, 'synset': 'bayberry.n.02', 'name': 'bayberry'}, {'id': 17919, 'synset': 'sweet_fern.n.02', 'name': 'sweet_fern'}, {'id': 17920, 'synset': 'corkwood.n.01', 'name': 'corkwood'}, {'id': 17921, 'synset': 'jointed_rush.n.01', 'name': 'jointed_rush'}, {'id': 17922, 'synset': 'toad_rush.n.01', 'name': 'toad_rush'}, {'id': 17923, 'synset': 'slender_rush.n.01', 'name': 'slender_rush'}, {'id': 17924, 'synset': 'zebrawood.n.02', 'name': 'zebrawood'}, {'id': 17925, 'synset': 'connarus_guianensis.n.01', 'name': 'Connarus_guianensis'}, {'id': 17926, 'synset': 'legume.n.01', 'name': 'legume'}, {'id': 17927, 'synset': 'peanut.n.01', 'name': 'peanut'}, {'id': 17928, 'synset': 'granadilla_tree.n.01', 'name': 'granadilla_tree'}, {'id': 17929, 'synset': 'arariba.n.01', 'name': 'arariba'}, {'id': 17930, 'synset': 'tonka_bean.n.01', 'name': 'tonka_bean'}, {'id': 17931, 'synset': 'courbaril.n.01', 'name': 'courbaril'}, {'id': 17932, 'synset': 'melilotus.n.01', 'name': 'melilotus'}, {'id': 17933, 'synset': 'darling_pea.n.01', 'name': 'darling_pea'}, {'id': 17934, 'synset': 'smooth_darling_pea.n.01', 'name': 'smooth_darling_pea'}, {'id': 17935, 'synset': 'clover.n.01', 'name': 'clover'}, {'id': 17936, 'synset': 'alpine_clover.n.01', 'name': 'alpine_clover'}, {'id': 17937, 'synset': 'hop_clover.n.02', 'name': 'hop_clover'}, {'id': 17938, 'synset': 'crimson_clover.n.01', 'name': 'crimson_clover'}, {'id': 17939, 'synset': 'red_clover.n.01', 'name': 'red_clover'}, {'id': 17940, 'synset': 'buffalo_clover.n.02', 'name': 'buffalo_clover'}, {'id': 17941, 'synset': 'white_clover.n.01', 'name': 'white_clover'}, {'id': 17942, 'synset': 'mimosa.n.02', 'name': 'mimosa'}, {'id': 17943, 'synset': 'acacia.n.01', 'name': 'acacia'}, {'id': 17944, 'synset': 'shittah.n.01', 'name': 'shittah'}, {'id': 17945, 'synset': 'wattle.n.03', 'name': 'wattle'}, {'id': 17946, 'synset': 'black_wattle.n.01', 'name': 'black_wattle'}, {'id': 17947, 'synset': 'gidgee.n.01', 'name': 'gidgee'}, {'id': 17948, 'synset': 'catechu.n.02', 'name': 'catechu'}, {'id': 17949, 'synset': 'silver_wattle.n.01', 'name': 'silver_wattle'}, {'id': 17950, 'synset': 'huisache.n.01', 'name': 'huisache'}, {'id': 17951, 'synset': 'lightwood.n.01', 'name': 'lightwood'}, {'id': 17952, 'synset': 'golden_wattle.n.01', 'name': 'golden_wattle'}, {'id': 17953, 'synset': 'fever_tree.n.04', 'name': 'fever_tree'}, {'id': 17954, 'synset': 'coralwood.n.01', 'name': 'coralwood'}, {'id': 17955, 'synset': 'albizzia.n.01', 'name': 'albizzia'}, {'id': 17956, 'synset': 'silk_tree.n.01', 'name': 'silk_tree'}, {'id': 17957, 'synset': 'siris.n.01', 'name': 'siris'}, {'id': 17958, 'synset': 'rain_tree.n.01', 'name': 'rain_tree'}, {'id': 17959, 'synset': 'calliandra.n.01', 'name': 'calliandra'}, {'id': 17960, 'synset': 'conacaste.n.01', 'name': 'conacaste'}, {'id': 17961, 'synset': 'inga.n.01', 'name': 'inga'}, {'id': 17962, 'synset': 'ice-cream_bean.n.01', 'name': 'ice-cream_bean'}, {'id': 17963, 'synset': 'guama.n.01', 'name': 'guama'}, {'id': 17964, 'synset': 'lead_tree.n.01', 'name': 'lead_tree'}, {'id': 17965, 'synset': 'wild_tamarind.n.02', 'name': 'wild_tamarind'}, {'id': 17966, 'synset': 'sabicu.n.02', 'name': 'sabicu'}, {'id': 17967, 'synset': 'nitta_tree.n.01', 'name': 'nitta_tree'}, {'id': 17968, 'synset': 'parkia_javanica.n.01', 'name': 'Parkia_javanica'}, {'id': 17969, 'synset': 'manila_tamarind.n.01', 'name': 'manila_tamarind'}, {'id': 17970, 'synset': "cat's-claw.n.01", 'name': "cat's-claw"}, {'id': 17971, 'synset': 'honey_mesquite.n.01', 'name': 'honey_mesquite'}, {'id': 17972, 'synset': 'algarroba.n.03', 'name': 'algarroba'}, {'id': 17973, 'synset': 'screw_bean.n.02', 'name': 'screw_bean'}, {'id': 17974, 'synset': 'screw_bean.n.01', 'name': 'screw_bean'}, {'id': 17975, 'synset': 'dogbane.n.01', 'name': 'dogbane'}, {'id': 17976, 'synset': 'indian_hemp.n.03', 'name': 'Indian_hemp'}, {'id': 17977, 'synset': "bushman's_poison.n.01", 'name': "bushman's_poison"}, {'id': 17978, 'synset': 'impala_lily.n.01', 'name': 'impala_lily'}, {'id': 17979, 'synset': 'allamanda.n.01', 'name': 'allamanda'}, {'id': 17980, 'synset': 'common_allamanda.n.01', 'name': 'common_allamanda'}, {'id': 17981, 'synset': 'dita.n.01', 'name': 'dita'}, {'id': 17982, 'synset': 'nepal_trumpet_flower.n.01', 'name': 'Nepal_trumpet_flower'}, {'id': 17983, 'synset': 'carissa.n.01', 'name': 'carissa'}, {'id': 17984, 'synset': 'hedge_thorn.n.01', 'name': 'hedge_thorn'}, {'id': 17985, 'synset': 'natal_plum.n.01', 'name': 'natal_plum'}, {'id': 17986, 'synset': 'periwinkle.n.02', 'name': 'periwinkle'}, {'id': 17987, 'synset': 'ivory_tree.n.01', 'name': 'ivory_tree'}, {'id': 17988, 'synset': 'white_dipladenia.n.01', 'name': 'white_dipladenia'}, {'id': 17989, 'synset': 'chilean_jasmine.n.01', 'name': 'Chilean_jasmine'}, {'id': 17990, 'synset': 'oleander.n.01', 'name': 'oleander'}, {'id': 17991, 'synset': 'frangipani.n.01', 'name': 'frangipani'}, {'id': 17992, 'synset': 'west_indian_jasmine.n.01', 'name': 'West_Indian_jasmine'}, {'id': 17993, 'synset': 'rauwolfia.n.02', 'name': 'rauwolfia'}, {'id': 17994, 'synset': 'snakewood.n.01', 'name': 'snakewood'}, {'id': 17995, 'synset': 'strophanthus_kombe.n.01', 'name': 'Strophanthus_kombe'}, {'id': 17996, 'synset': 'yellow_oleander.n.01', 'name': 'yellow_oleander'}, {'id': 17997, 'synset': 'myrtle.n.01', 'name': 'myrtle'}, {'id': 17998, 'synset': 'large_periwinkle.n.01', 'name': 'large_periwinkle'}, {'id': 17999, 'synset': 'arum.n.02', 'name': 'arum'}, {'id': 18000, 'synset': 'cuckoopint.n.01', 'name': 'cuckoopint'}, {'id': 18001, 'synset': 'black_calla.n.01', 'name': 'black_calla'}, {'id': 18002, 'synset': 'calamus.n.02', 'name': 'calamus'}, {'id': 18003, 'synset': 'alocasia.n.01', 'name': 'alocasia'}, {'id': 18004, 'synset': 'giant_taro.n.01', 'name': 'giant_taro'}, {'id': 18005, 'synset': 'amorphophallus.n.01', 'name': 'amorphophallus'}, {'id': 18006, 'synset': 'pungapung.n.01', 'name': 'pungapung'}, {'id': 18007, 'synset': "devil's_tongue.n.01", 'name': "devil's_tongue"}, {'id': 18008, 'synset': 'anthurium.n.01', 'name': 'anthurium'}, {'id': 18009, 'synset': 'flamingo_flower.n.01', 'name': 'flamingo_flower'}, {'id': 18010, 'synset': 'jack-in-the-pulpit.n.01', 'name': 'jack-in-the-pulpit'}, {'id': 18011, 'synset': "friar's-cowl.n.01", 'name': "friar's-cowl"}, {'id': 18012, 'synset': 'caladium.n.01', 'name': 'caladium'}, {'id': 18013, 'synset': 'caladium_bicolor.n.01', 'name': 'Caladium_bicolor'}, {'id': 18014, 'synset': 'wild_calla.n.01', 'name': 'wild_calla'}, {'id': 18015, 'synset': 'taro.n.02', 'name': 'taro'}, {'id': 18016, 'synset': 'taro.n.01', 'name': 'taro'}, {'id': 18017, 'synset': 'cryptocoryne.n.01', 'name': 'cryptocoryne'}, {'id': 18018, 'synset': 'dracontium.n.01', 'name': 'dracontium'}, {'id': 18019, 'synset': 'golden_pothos.n.01', 'name': 'golden_pothos'}, {'id': 18020, 'synset': 'skunk_cabbage.n.02', 'name': 'skunk_cabbage'}, {'id': 18021, 'synset': 'monstera.n.01', 'name': 'monstera'}, {'id': 18022, 'synset': 'ceriman.n.01', 'name': 'ceriman'}, {'id': 18023, 'synset': 'nephthytis.n.01', 'name': 'nephthytis'}, {'id': 18024, 'synset': 'nephthytis_afzelii.n.01', 'name': 'Nephthytis_afzelii'}, {'id': 18025, 'synset': 'arrow_arum.n.01', 'name': 'arrow_arum'}, {'id': 18026, 'synset': 'green_arrow_arum.n.01', 'name': 'green_arrow_arum'}, {'id': 18027, 'synset': 'philodendron.n.01', 'name': 'philodendron'}, {'id': 18028, 'synset': 'pistia.n.01', 'name': 'pistia'}, {'id': 18029, 'synset': 'pothos.n.01', 'name': 'pothos'}, {'id': 18030, 'synset': 'spathiphyllum.n.01', 'name': 'spathiphyllum'}, {'id': 18031, 'synset': 'skunk_cabbage.n.01', 'name': 'skunk_cabbage'}, {'id': 18032, 'synset': 'yautia.n.01', 'name': 'yautia'}, {'id': 18033, 'synset': 'calla_lily.n.01', 'name': 'calla_lily'}, {'id': 18034, 'synset': 'pink_calla.n.01', 'name': 'pink_calla'}, {'id': 18035, 'synset': 'golden_calla.n.01', 'name': 'golden_calla'}, {'id': 18036, 'synset': 'duckweed.n.01', 'name': 'duckweed'}, {'id': 18037, 'synset': 'common_duckweed.n.01', 'name': 'common_duckweed'}, {'id': 18038, 'synset': 'star-duckweed.n.01', 'name': 'star-duckweed'}, {'id': 18039, 'synset': 'great_duckweed.n.01', 'name': 'great_duckweed'}, {'id': 18040, 'synset': 'watermeal.n.01', 'name': 'watermeal'}, {'id': 18041, 'synset': 'common_wolffia.n.01', 'name': 'common_wolffia'}, {'id': 18042, 'synset': 'aralia.n.01', 'name': 'aralia'}, {'id': 18043, 'synset': 'american_angelica_tree.n.01', 'name': 'American_angelica_tree'}, {'id': 18044, 'synset': 'american_spikenard.n.01', 'name': 'American_spikenard'}, {'id': 18045, 'synset': 'bristly_sarsaparilla.n.01', 'name': 'bristly_sarsaparilla'}, {'id': 18046, 'synset': 'japanese_angelica_tree.n.01', 'name': 'Japanese_angelica_tree'}, {'id': 18047, 'synset': 'chinese_angelica.n.01', 'name': 'Chinese_angelica'}, {'id': 18048, 'synset': 'ivy.n.01', 'name': 'ivy'}, {'id': 18049, 'synset': 'puka.n.02', 'name': 'puka'}, {'id': 18050, 'synset': 'ginseng.n.02', 'name': 'ginseng'}, {'id': 18051, 'synset': 'ginseng.n.01', 'name': 'ginseng'}, {'id': 18052, 'synset': 'umbrella_tree.n.01', 'name': 'umbrella_tree'}, {'id': 18053, 'synset': 'birthwort.n.01', 'name': 'birthwort'}, {'id': 18054, 'synset': "dutchman's-pipe.n.01", 'name': "Dutchman's-pipe"}, {'id': 18055, 'synset': 'virginia_snakeroot.n.01', 'name': 'Virginia_snakeroot'}, {'id': 18056, 'synset': 'canada_ginger.n.01', 'name': 'Canada_ginger'}, {'id': 18057, 'synset': 'heartleaf.n.02', 'name': 'heartleaf'}, {'id': 18058, 'synset': 'heartleaf.n.01', 'name': 'heartleaf'}, {'id': 18059, 'synset': 'asarabacca.n.01', 'name': 'asarabacca'}, {'id': 18060, 'synset': 'caryophyllaceous_plant.n.01', 'name': 'caryophyllaceous_plant'}, {'id': 18061, 'synset': 'corn_cockle.n.01', 'name': 'corn_cockle'}, {'id': 18062, 'synset': 'sandwort.n.03', 'name': 'sandwort'}, {'id': 18063, 'synset': 'mountain_sandwort.n.01', 'name': 'mountain_sandwort'}, {'id': 18064, 'synset': 'pine-barren_sandwort.n.01', 'name': 'pine-barren_sandwort'}, {'id': 18065, 'synset': 'seabeach_sandwort.n.01', 'name': 'seabeach_sandwort'}, {'id': 18066, 'synset': 'rock_sandwort.n.01', 'name': 'rock_sandwort'}, {'id': 18067, 'synset': 'thyme-leaved_sandwort.n.01', 'name': 'thyme-leaved_sandwort'}, {'id': 18068, 'synset': 'mouse-ear_chickweed.n.01', 'name': 'mouse-ear_chickweed'}, {'id': 18069, 'synset': 'snow-in-summer.n.02', 'name': 'snow-in-summer'}, {'id': 18070, 'synset': 'alpine_mouse-ear.n.01', 'name': 'Alpine_mouse-ear'}, {'id': 18071, 'synset': 'pink.n.02', 'name': 'pink'}, {'id': 18072, 'synset': 'sweet_william.n.01', 'name': 'sweet_William'}, {'id': 18073, 'synset': 'china_pink.n.01', 'name': 'china_pink'}, {'id': 18074, 'synset': 'japanese_pink.n.01', 'name': 'Japanese_pink'}, {'id': 18075, 'synset': 'maiden_pink.n.01', 'name': 'maiden_pink'}, {'id': 18076, 'synset': 'cheddar_pink.n.01', 'name': 'cheddar_pink'}, {'id': 18077, 'synset': 'button_pink.n.01', 'name': 'button_pink'}, {'id': 18078, 'synset': 'cottage_pink.n.01', 'name': 'cottage_pink'}, {'id': 18079, 'synset': 'fringed_pink.n.02', 'name': 'fringed_pink'}, {'id': 18080, 'synset': 'drypis.n.01', 'name': 'drypis'}, {'id': 18081, 'synset': "baby's_breath.n.01", 'name': "baby's_breath"}, {'id': 18082, 'synset': 'coral_necklace.n.01', 'name': 'coral_necklace'}, {'id': 18083, 'synset': 'lychnis.n.01', 'name': 'lychnis'}, {'id': 18084, 'synset': 'ragged_robin.n.01', 'name': 'ragged_robin'}, {'id': 18085, 'synset': 'scarlet_lychnis.n.01', 'name': 'scarlet_lychnis'}, {'id': 18086, 'synset': 'mullein_pink.n.01', 'name': 'mullein_pink'}, {'id': 18087, 'synset': 'sandwort.n.02', 'name': 'sandwort'}, {'id': 18088, 'synset': 'sandwort.n.01', 'name': 'sandwort'}, {'id': 18089, 'synset': 'soapwort.n.01', 'name': 'soapwort'}, {'id': 18090, 'synset': 'knawel.n.01', 'name': 'knawel'}, {'id': 18091, 'synset': 'silene.n.01', 'name': 'silene'}, {'id': 18092, 'synset': 'moss_campion.n.01', 'name': 'moss_campion'}, {'id': 18093, 'synset': 'wild_pink.n.02', 'name': 'wild_pink'}, {'id': 18094, 'synset': 'red_campion.n.01', 'name': 'red_campion'}, {'id': 18095, 'synset': 'white_campion.n.01', 'name': 'white_campion'}, {'id': 18096, 'synset': 'fire_pink.n.01', 'name': 'fire_pink'}, {'id': 18097, 'synset': 'bladder_campion.n.01', 'name': 'bladder_campion'}, {'id': 18098, 'synset': 'corn_spurry.n.01', 'name': 'corn_spurry'}, {'id': 18099, 'synset': 'sand_spurry.n.01', 'name': 'sand_spurry'}, {'id': 18100, 'synset': 'chickweed.n.01', 'name': 'chickweed'}, {'id': 18101, 'synset': 'common_chickweed.n.01', 'name': 'common_chickweed'}, {'id': 18102, 'synset': 'cowherb.n.01', 'name': 'cowherb'}, {'id': 18103, 'synset': 'hottentot_fig.n.01', 'name': 'Hottentot_fig'}, {'id': 18104, 'synset': 'livingstone_daisy.n.01', 'name': 'livingstone_daisy'}, {'id': 18105, 'synset': 'fig_marigold.n.01', 'name': 'fig_marigold'}, {'id': 18106, 'synset': 'ice_plant.n.01', 'name': 'ice_plant'}, {'id': 18107, 'synset': 'new_zealand_spinach.n.01', 'name': 'New_Zealand_spinach'}, {'id': 18108, 'synset': 'amaranth.n.02', 'name': 'amaranth'}, {'id': 18109, 'synset': 'amaranth.n.01', 'name': 'amaranth'}, {'id': 18110, 'synset': 'tumbleweed.n.04', 'name': 'tumbleweed'}, {'id': 18111, 'synset': "prince's-feather.n.02", 'name': "prince's-feather"}, {'id': 18112, 'synset': 'pigweed.n.02', 'name': 'pigweed'}, {'id': 18113, 'synset': 'thorny_amaranth.n.01', 'name': 'thorny_amaranth'}, {'id': 18114, 'synset': 'alligator_weed.n.01', 'name': 'alligator_weed'}, {'id': 18115, 'synset': 'cockscomb.n.01', 'name': 'cockscomb'}, {'id': 18116, 'synset': 'cottonweed.n.02', 'name': 'cottonweed'}, {'id': 18117, 'synset': 'globe_amaranth.n.01', 'name': 'globe_amaranth'}, {'id': 18118, 'synset': 'bloodleaf.n.01', 'name': 'bloodleaf'}, {'id': 18119, 'synset': 'saltwort.n.02', 'name': 'saltwort'}, {'id': 18120, 'synset': "lamb's-quarters.n.01", 'name': "lamb's-quarters"}, {'id': 18121, 'synset': 'good-king-henry.n.01', 'name': 'good-king-henry'}, {'id': 18122, 'synset': 'jerusalem_oak.n.01', 'name': 'Jerusalem_oak'}, {'id': 18123, 'synset': 'oak-leaved_goosefoot.n.01', 'name': 'oak-leaved_goosefoot'}, {'id': 18124, 'synset': 'sowbane.n.01', 'name': 'sowbane'}, {'id': 18125, 'synset': 'nettle-leaved_goosefoot.n.01', 'name': 'nettle-leaved_goosefoot'}, {'id': 18126, 'synset': 'red_goosefoot.n.01', 'name': 'red_goosefoot'}, {'id': 18127, 'synset': 'stinking_goosefoot.n.01', 'name': 'stinking_goosefoot'}, {'id': 18128, 'synset': 'orach.n.01', 'name': 'orach'}, {'id': 18129, 'synset': 'saltbush.n.01', 'name': 'saltbush'}, {'id': 18130, 'synset': 'garden_orache.n.01', 'name': 'garden_orache'}, {'id': 18131, 'synset': 'desert_holly.n.01', 'name': 'desert_holly'}, {'id': 18132, 'synset': 'quail_bush.n.01', 'name': 'quail_bush'}, {'id': 18133, 'synset': 'beet.n.01', 'name': 'beet'}, {'id': 18134, 'synset': 'beetroot.n.01', 'name': 'beetroot'}, {'id': 18135, 'synset': 'chard.n.01', 'name': 'chard'}, {'id': 18136, 'synset': 'mangel-wurzel.n.01', 'name': 'mangel-wurzel'}, {'id': 18137, 'synset': 'winged_pigweed.n.01', 'name': 'winged_pigweed'}, {'id': 18138, 'synset': 'halogeton.n.01', 'name': 'halogeton'}, {'id': 18139, 'synset': 'glasswort.n.02', 'name': 'glasswort'}, {'id': 18140, 'synset': 'saltwort.n.01', 'name': 'saltwort'}, {'id': 18141, 'synset': 'russian_thistle.n.01', 'name': 'Russian_thistle'}, {'id': 18142, 'synset': 'greasewood.n.01', 'name': 'greasewood'}, {'id': 18143, 'synset': 'scarlet_musk_flower.n.01', 'name': 'scarlet_musk_flower'}, {'id': 18144, 'synset': 'sand_verbena.n.01', 'name': 'sand_verbena'}, {'id': 18145, 'synset': 'sweet_sand_verbena.n.01', 'name': 'sweet_sand_verbena'}, {'id': 18146, 'synset': 'yellow_sand_verbena.n.01', 'name': 'yellow_sand_verbena'}, {'id': 18147, 'synset': 'beach_pancake.n.01', 'name': 'beach_pancake'}, {'id': 18148, 'synset': 'beach_sand_verbena.n.01', 'name': 'beach_sand_verbena'}, {'id': 18149, 'synset': 'desert_sand_verbena.n.01', 'name': 'desert_sand_verbena'}, {'id': 18150, 'synset': "trailing_four_o'clock.n.01", 'name': "trailing_four_o'clock"}, {'id': 18151, 'synset': 'bougainvillea.n.01', 'name': 'bougainvillea'}, {'id': 18152, 'synset': 'umbrellawort.n.01', 'name': 'umbrellawort'}, {'id': 18153, 'synset': "four_o'clock.n.01", 'name': "four_o'clock"}, {'id': 18154, 'synset': "common_four-o'clock.n.01", 'name': "common_four-o'clock"}, {'id': 18155, 'synset': "california_four_o'clock.n.01", 'name': "California_four_o'clock"}, {'id': 18156, 'synset': "sweet_four_o'clock.n.01", 'name': "sweet_four_o'clock"}, {'id': 18157, 'synset': "desert_four_o'clock.n.01", 'name': "desert_four_o'clock"}, {'id': 18158, 'synset': "mountain_four_o'clock.n.01", 'name': "mountain_four_o'clock"}, {'id': 18159, 'synset': 'cockspur.n.02', 'name': 'cockspur'}, {'id': 18160, 'synset': 'rattail_cactus.n.01', 'name': 'rattail_cactus'}, {'id': 18161, 'synset': 'saguaro.n.01', 'name': 'saguaro'}, {'id': 18162, 'synset': 'night-blooming_cereus.n.03', 'name': 'night-blooming_cereus'}, {'id': 18163, 'synset': 'echinocactus.n.01', 'name': 'echinocactus'}, {'id': 18164, 'synset': 'hedgehog_cactus.n.01', 'name': 'hedgehog_cactus'}, {'id': 18165, 'synset': 'golden_barrel_cactus.n.01', 'name': 'golden_barrel_cactus'}, {'id': 18166, 'synset': 'hedgehog_cereus.n.01', 'name': 'hedgehog_cereus'}, {'id': 18167, 'synset': 'rainbow_cactus.n.01', 'name': 'rainbow_cactus'}, {'id': 18168, 'synset': 'epiphyllum.n.01', 'name': 'epiphyllum'}, {'id': 18169, 'synset': 'barrel_cactus.n.01', 'name': 'barrel_cactus'}, {'id': 18170, 'synset': 'night-blooming_cereus.n.02', 'name': 'night-blooming_cereus'}, {'id': 18171, 'synset': 'chichipe.n.01', 'name': 'chichipe'}, {'id': 18172, 'synset': 'mescal.n.01', 'name': 'mescal'}, {'id': 18173, 'synset': 'mescal_button.n.01', 'name': 'mescal_button'}, {'id': 18174, 'synset': 'mammillaria.n.01', 'name': 'mammillaria'}, {'id': 18175, 'synset': 'feather_ball.n.01', 'name': 'feather_ball'}, {'id': 18176, 'synset': 'garambulla.n.01', 'name': 'garambulla'}, {'id': 18177, 'synset': "knowlton's_cactus.n.01", 'name': "Knowlton's_cactus"}, {'id': 18178, 'synset': 'nopal.n.02', 'name': 'nopal'}, {'id': 18179, 'synset': 'prickly_pear.n.01', 'name': 'prickly_pear'}, {'id': 18180, 'synset': 'cholla.n.01', 'name': 'cholla'}, {'id': 18181, 'synset': 'nopal.n.01', 'name': 'nopal'}, {'id': 18182, 'synset': 'tuna.n.01', 'name': 'tuna'}, {'id': 18183, 'synset': 'barbados_gooseberry.n.01', 'name': 'Barbados_gooseberry'}, {'id': 18184, 'synset': 'mistletoe_cactus.n.01', 'name': 'mistletoe_cactus'}, {'id': 18185, 'synset': 'christmas_cactus.n.01', 'name': 'Christmas_cactus'}, {'id': 18186, 'synset': 'night-blooming_cereus.n.01', 'name': 'night-blooming_cereus'}, {'id': 18187, 'synset': 'crab_cactus.n.01', 'name': 'crab_cactus'}, {'id': 18188, 'synset': 'pokeweed.n.01', 'name': 'pokeweed'}, {'id': 18189, 'synset': 'indian_poke.n.02', 'name': 'Indian_poke'}, {'id': 18190, 'synset': 'poke.n.01', 'name': 'poke'}, {'id': 18191, 'synset': 'ombu.n.01', 'name': 'ombu'}, {'id': 18192, 'synset': 'bloodberry.n.01', 'name': 'bloodberry'}, {'id': 18193, 'synset': 'portulaca.n.01', 'name': 'portulaca'}, {'id': 18194, 'synset': 'rose_moss.n.01', 'name': 'rose_moss'}, {'id': 18195, 'synset': 'common_purslane.n.01', 'name': 'common_purslane'}, {'id': 18196, 'synset': 'rock_purslane.n.01', 'name': 'rock_purslane'}, {'id': 18197, 'synset': 'red_maids.n.01', 'name': 'red_maids'}, {'id': 18198, 'synset': 'carolina_spring_beauty.n.01', 'name': 'Carolina_spring_beauty'}, {'id': 18199, 'synset': 'spring_beauty.n.01', 'name': 'spring_beauty'}, {'id': 18200, 'synset': 'virginia_spring_beauty.n.01', 'name': 'Virginia_spring_beauty'}, {'id': 18201, 'synset': 'siskiyou_lewisia.n.01', 'name': 'siskiyou_lewisia'}, {'id': 18202, 'synset': 'bitterroot.n.01', 'name': 'bitterroot'}, {'id': 18203, 'synset': 'broad-leaved_montia.n.01', 'name': 'broad-leaved_montia'}, {'id': 18204, 'synset': 'blinks.n.01', 'name': 'blinks'}, {'id': 18205, 'synset': 'toad_lily.n.01', 'name': 'toad_lily'}, {'id': 18206, 'synset': 'winter_purslane.n.01', 'name': 'winter_purslane'}, {'id': 18207, 'synset': 'flame_flower.n.02', 'name': 'flame_flower'}, {'id': 18208, 'synset': 'pigmy_talinum.n.01', 'name': 'pigmy_talinum'}, {'id': 18209, 'synset': 'jewels-of-opar.n.01', 'name': 'jewels-of-opar'}, {'id': 18210, 'synset': 'caper.n.01', 'name': 'caper'}, {'id': 18211, 'synset': 'native_pomegranate.n.01', 'name': 'native_pomegranate'}, {'id': 18212, 'synset': 'caper_tree.n.02', 'name': 'caper_tree'}, {'id': 18213, 'synset': 'caper_tree.n.01', 'name': 'caper_tree'}, {'id': 18214, 'synset': 'common_caper.n.01', 'name': 'common_caper'}, {'id': 18215, 'synset': 'spiderflower.n.01', 'name': 'spiderflower'}, {'id': 18216, 'synset': 'rocky_mountain_bee_plant.n.01', 'name': 'Rocky_Mountain_bee_plant'}, {'id': 18217, 'synset': 'clammyweed.n.01', 'name': 'clammyweed'}, {'id': 18218, 'synset': 'crucifer.n.01', 'name': 'crucifer'}, {'id': 18219, 'synset': 'cress.n.01', 'name': 'cress'}, {'id': 18220, 'synset': 'watercress.n.01', 'name': 'watercress'}, {'id': 18221, 'synset': 'stonecress.n.01', 'name': 'stonecress'}, {'id': 18222, 'synset': 'garlic_mustard.n.01', 'name': 'garlic_mustard'}, {'id': 18223, 'synset': 'alyssum.n.01', 'name': 'alyssum'}, {'id': 18224, 'synset': 'rose_of_jericho.n.02', 'name': 'rose_of_Jericho'}, {'id': 18225, 'synset': 'arabidopsis_thaliana.n.01', 'name': 'Arabidopsis_thaliana'}, {'id': 18226, 'synset': 'arabidopsis_lyrata.n.01', 'name': 'Arabidopsis_lyrata'}, {'id': 18227, 'synset': 'rock_cress.n.01', 'name': 'rock_cress'}, {'id': 18228, 'synset': 'sicklepod.n.02', 'name': 'sicklepod'}, {'id': 18229, 'synset': 'tower_mustard.n.01', 'name': 'tower_mustard'}, {'id': 18230, 'synset': 'horseradish.n.01', 'name': 'horseradish'}, {'id': 18231, 'synset': 'winter_cress.n.01', 'name': 'winter_cress'}, {'id': 18232, 'synset': 'yellow_rocket.n.01', 'name': 'yellow_rocket'}, {'id': 18233, 'synset': 'hoary_alison.n.01', 'name': 'hoary_alison'}, {'id': 18234, 'synset': 'buckler_mustard.n.01', 'name': 'buckler_mustard'}, {'id': 18235, 'synset': 'wild_cabbage.n.01', 'name': 'wild_cabbage'}, {'id': 18236, 'synset': 'cabbage.n.03', 'name': 'cabbage'}, {'id': 18237, 'synset': 'head_cabbage.n.01', 'name': 'head_cabbage'}, {'id': 18238, 'synset': 'savoy_cabbage.n.01', 'name': 'savoy_cabbage'}, {'id': 18239, 'synset': 'brussels_sprout.n.01', 'name': 'brussels_sprout'}, {'id': 18240, 'synset': 'cauliflower.n.01', 'name': 'cauliflower'}, {'id': 18241, 'synset': 'collard.n.01', 'name': 'collard'}, {'id': 18242, 'synset': 'kohlrabi.n.01', 'name': 'kohlrabi'}, {'id': 18243, 'synset': 'turnip_plant.n.01', 'name': 'turnip_plant'}, {'id': 18244, 'synset': 'rutabaga.n.02', 'name': 'rutabaga'}, {'id': 18245, 'synset': 'broccoli_raab.n.01', 'name': 'broccoli_raab'}, {'id': 18246, 'synset': 'mustard.n.01', 'name': 'mustard'}, {'id': 18247, 'synset': 'chinese_mustard.n.01', 'name': 'chinese_mustard'}, {'id': 18248, 'synset': 'bok_choy.n.01', 'name': 'bok_choy'}, {'id': 18249, 'synset': 'rape.n.01', 'name': 'rape'}, {'id': 18250, 'synset': 'rapeseed.n.01', 'name': 'rapeseed'}, {'id': 18251, 'synset': "shepherd's_purse.n.01", 'name': "shepherd's_purse"}, {'id': 18252, 'synset': "lady's_smock.n.01", 'name': "lady's_smock"}, {'id': 18253, 'synset': 'coral-root_bittercress.n.01', 'name': 'coral-root_bittercress'}, {'id': 18254, 'synset': 'crinkleroot.n.01', 'name': 'crinkleroot'}, {'id': 18255, 'synset': 'american_watercress.n.01', 'name': 'American_watercress'}, {'id': 18256, 'synset': 'spring_cress.n.01', 'name': 'spring_cress'}, {'id': 18257, 'synset': 'purple_cress.n.01', 'name': 'purple_cress'}, {'id': 18258, 'synset': 'wallflower.n.02', 'name': 'wallflower'}, {'id': 18259, 'synset': 'prairie_rocket.n.02', 'name': 'prairie_rocket'}, {'id': 18260, 'synset': 'scurvy_grass.n.01', 'name': 'scurvy_grass'}, {'id': 18261, 'synset': 'sea_kale.n.01', 'name': 'sea_kale'}, {'id': 18262, 'synset': 'tansy_mustard.n.01', 'name': 'tansy_mustard'}, {'id': 18263, 'synset': 'draba.n.01', 'name': 'draba'}, {'id': 18264, 'synset': 'wallflower.n.01', 'name': 'wallflower'}, {'id': 18265, 'synset': 'prairie_rocket.n.01', 'name': 'prairie_rocket'}, {'id': 18266, 'synset': 'siberian_wall_flower.n.01', 'name': 'Siberian_wall_flower'}, {'id': 18267, 'synset': 'western_wall_flower.n.01', 'name': 'western_wall_flower'}, {'id': 18268, 'synset': 'wormseed_mustard.n.01', 'name': 'wormseed_mustard'}, {'id': 18269, 'synset': 'heliophila.n.01', 'name': 'heliophila'}, {'id': 18270, 'synset': 'damask_violet.n.01', 'name': 'damask_violet'}, {'id': 18271, 'synset': 'tansy-leaved_rocket.n.01', 'name': 'tansy-leaved_rocket'}, {'id': 18272, 'synset': 'candytuft.n.01', 'name': 'candytuft'}, {'id': 18273, 'synset': 'woad.n.02', 'name': 'woad'}, {'id': 18274, 'synset': "dyer's_woad.n.01", 'name': "dyer's_woad"}, {'id': 18275, 'synset': 'bladderpod.n.04', 'name': 'bladderpod'}, {'id': 18276, 'synset': 'sweet_alyssum.n.01', 'name': 'sweet_alyssum'}, {'id': 18277, 'synset': 'malcolm_stock.n.01', 'name': 'Malcolm_stock'}, {'id': 18278, 'synset': 'virginian_stock.n.01', 'name': 'Virginian_stock'}, {'id': 18279, 'synset': 'stock.n.12', 'name': 'stock'}, {'id': 18280, 'synset': 'brompton_stock.n.01', 'name': 'brompton_stock'}, {'id': 18281, 'synset': 'bladderpod.n.03', 'name': 'bladderpod'}, {'id': 18282, 'synset': 'chamois_cress.n.01', 'name': 'chamois_cress'}, {'id': 18283, 'synset': 'radish_plant.n.01', 'name': 'radish_plant'}, {'id': 18284, 'synset': 'jointed_charlock.n.01', 'name': 'jointed_charlock'}, {'id': 18285, 'synset': 'radish.n.04', 'name': 'radish'}, {'id': 18286, 'synset': 'radish.n.02', 'name': 'radish'}, {'id': 18287, 'synset': 'marsh_cress.n.01', 'name': 'marsh_cress'}, {'id': 18288, 'synset': 'great_yellowcress.n.01', 'name': 'great_yellowcress'}, {'id': 18289, 'synset': 'schizopetalon.n.01', 'name': 'schizopetalon'}, {'id': 18290, 'synset': 'field_mustard.n.01', 'name': 'field_mustard'}, {'id': 18291, 'synset': 'hedge_mustard.n.01', 'name': 'hedge_mustard'}, {'id': 18292, 'synset': 'desert_plume.n.01', 'name': 'desert_plume'}, {'id': 18293, 'synset': 'pennycress.n.01', 'name': 'pennycress'}, {'id': 18294, 'synset': 'field_pennycress.n.01', 'name': 'field_pennycress'}, {'id': 18295, 'synset': 'fringepod.n.01', 'name': 'fringepod'}, {'id': 18296, 'synset': 'bladderpod.n.02', 'name': 'bladderpod'}, {'id': 18297, 'synset': 'wasabi.n.01', 'name': 'wasabi'}, {'id': 18298, 'synset': 'poppy.n.01', 'name': 'poppy'}, {'id': 18299, 'synset': 'iceland_poppy.n.02', 'name': 'Iceland_poppy'}, {'id': 18300, 'synset': 'western_poppy.n.01', 'name': 'western_poppy'}, {'id': 18301, 'synset': 'prickly_poppy.n.02', 'name': 'prickly_poppy'}, {'id': 18302, 'synset': 'iceland_poppy.n.01', 'name': 'Iceland_poppy'}, {'id': 18303, 'synset': 'oriental_poppy.n.01', 'name': 'oriental_poppy'}, {'id': 18304, 'synset': 'corn_poppy.n.01', 'name': 'corn_poppy'}, {'id': 18305, 'synset': 'opium_poppy.n.01', 'name': 'opium_poppy'}, {'id': 18306, 'synset': 'prickly_poppy.n.01', 'name': 'prickly_poppy'}, {'id': 18307, 'synset': 'mexican_poppy.n.01', 'name': 'Mexican_poppy'}, {'id': 18308, 'synset': 'bocconia.n.02', 'name': 'bocconia'}, {'id': 18309, 'synset': 'celandine.n.02', 'name': 'celandine'}, {'id': 18310, 'synset': 'corydalis.n.01', 'name': 'corydalis'}, {'id': 18311, 'synset': 'climbing_corydalis.n.01', 'name': 'climbing_corydalis'}, {'id': 18312, 'synset': 'california_poppy.n.01', 'name': 'California_poppy'}, {'id': 18313, 'synset': 'horn_poppy.n.01', 'name': 'horn_poppy'}, {'id': 18314, 'synset': 'golden_cup.n.01', 'name': 'golden_cup'}, {'id': 18315, 'synset': 'plume_poppy.n.01', 'name': 'plume_poppy'}, {'id': 18316, 'synset': 'blue_poppy.n.01', 'name': 'blue_poppy'}, {'id': 18317, 'synset': 'welsh_poppy.n.01', 'name': 'Welsh_poppy'}, {'id': 18318, 'synset': 'creamcups.n.01', 'name': 'creamcups'}, {'id': 18319, 'synset': 'matilija_poppy.n.01', 'name': 'matilija_poppy'}, {'id': 18320, 'synset': 'wind_poppy.n.01', 'name': 'wind_poppy'}, {'id': 18321, 'synset': 'celandine_poppy.n.01', 'name': 'celandine_poppy'}, {'id': 18322, 'synset': 'climbing_fumitory.n.01', 'name': 'climbing_fumitory'}, {'id': 18323, 'synset': 'bleeding_heart.n.01', 'name': 'bleeding_heart'}, {'id': 18324, 'synset': "dutchman's_breeches.n.01", 'name': "Dutchman's_breeches"}, {'id': 18325, 'synset': 'squirrel_corn.n.01', 'name': 'squirrel_corn'}, {'id': 18326, 'synset': 'composite.n.02', 'name': 'composite'}, {'id': 18327, 'synset': 'compass_plant.n.02', 'name': 'compass_plant'}, {'id': 18328, 'synset': 'everlasting.n.01', 'name': 'everlasting'}, {'id': 18329, 'synset': 'achillea.n.01', 'name': 'achillea'}, {'id': 18330, 'synset': 'yarrow.n.01', 'name': 'yarrow'}, {'id': 18331, 'synset': 'pink-and-white_everlasting.n.01', 'name': 'pink-and-white_everlasting'}, {'id': 18332, 'synset': 'white_snakeroot.n.01', 'name': 'white_snakeroot'}, {'id': 18333, 'synset': 'ageratum.n.02', 'name': 'ageratum'}, {'id': 18334, 'synset': 'common_ageratum.n.01', 'name': 'common_ageratum'}, {'id': 18335, 'synset': 'sweet_sultan.n.03', 'name': 'sweet_sultan'}, {'id': 18336, 'synset': 'ragweed.n.02', 'name': 'ragweed'}, {'id': 18337, 'synset': 'common_ragweed.n.01', 'name': 'common_ragweed'}, {'id': 18338, 'synset': 'great_ragweed.n.01', 'name': 'great_ragweed'}, {'id': 18339, 'synset': 'western_ragweed.n.01', 'name': 'western_ragweed'}, {'id': 18340, 'synset': 'ammobium.n.01', 'name': 'ammobium'}, {'id': 18341, 'synset': 'winged_everlasting.n.01', 'name': 'winged_everlasting'}, {'id': 18342, 'synset': 'pellitory.n.02', 'name': 'pellitory'}, {'id': 18343, 'synset': 'pearly_everlasting.n.01', 'name': 'pearly_everlasting'}, {'id': 18344, 'synset': 'andryala.n.01', 'name': 'andryala'}, {'id': 18345, 'synset': 'plantain-leaved_pussytoes.n.01', 'name': 'plantain-leaved_pussytoes'}, {'id': 18346, 'synset': 'field_pussytoes.n.01', 'name': 'field_pussytoes'}, {'id': 18347, 'synset': 'solitary_pussytoes.n.01', 'name': 'solitary_pussytoes'}, {'id': 18348, 'synset': 'mountain_everlasting.n.01', 'name': 'mountain_everlasting'}, {'id': 18349, 'synset': 'mayweed.n.01', 'name': 'mayweed'}, {'id': 18350, 'synset': 'yellow_chamomile.n.01', 'name': 'yellow_chamomile'}, {'id': 18351, 'synset': 'corn_chamomile.n.01', 'name': 'corn_chamomile'}, {'id': 18352, 'synset': 'woolly_daisy.n.01', 'name': 'woolly_daisy'}, {'id': 18353, 'synset': 'burdock.n.01', 'name': 'burdock'}, {'id': 18354, 'synset': 'great_burdock.n.01', 'name': 'great_burdock'}, {'id': 18355, 'synset': 'african_daisy.n.03', 'name': 'African_daisy'}, {'id': 18356, 'synset': 'blue-eyed_african_daisy.n.01', 'name': 'blue-eyed_African_daisy'}, {'id': 18357, 'synset': 'marguerite.n.02', 'name': 'marguerite'}, {'id': 18358, 'synset': 'silversword.n.01', 'name': 'silversword'}, {'id': 18359, 'synset': 'arnica.n.02', 'name': 'arnica'}, {'id': 18360, 'synset': 'heartleaf_arnica.n.01', 'name': 'heartleaf_arnica'}, {'id': 18361, 'synset': 'arnica_montana.n.01', 'name': 'Arnica_montana'}, {'id': 18362, 'synset': 'lamb_succory.n.01', 'name': 'lamb_succory'}, {'id': 18363, 'synset': 'artemisia.n.01', 'name': 'artemisia'}, {'id': 18364, 'synset': 'mugwort.n.01', 'name': 'mugwort'}, {'id': 18365, 'synset': 'sweet_wormwood.n.01', 'name': 'sweet_wormwood'}, {'id': 18366, 'synset': 'field_wormwood.n.01', 'name': 'field_wormwood'}, {'id': 18367, 'synset': 'tarragon.n.01', 'name': 'tarragon'}, {'id': 18368, 'synset': 'sand_sage.n.01', 'name': 'sand_sage'}, {'id': 18369, 'synset': 'wormwood_sage.n.01', 'name': 'wormwood_sage'}, {'id': 18370, 'synset': 'western_mugwort.n.01', 'name': 'western_mugwort'}, {'id': 18371, 'synset': 'roman_wormwood.n.01', 'name': 'Roman_wormwood'}, {'id': 18372, 'synset': 'bud_brush.n.01', 'name': 'bud_brush'}, {'id': 18373, 'synset': 'common_mugwort.n.01', 'name': 'common_mugwort'}, {'id': 18374, 'synset': 'aster.n.01', 'name': 'aster'}, {'id': 18375, 'synset': 'wood_aster.n.01', 'name': 'wood_aster'}, {'id': 18376, 'synset': 'whorled_aster.n.01', 'name': 'whorled_aster'}, {'id': 18377, 'synset': 'heath_aster.n.02', 'name': 'heath_aster'}, {'id': 18378, 'synset': 'heart-leaved_aster.n.01', 'name': 'heart-leaved_aster'}, {'id': 18379, 'synset': 'white_wood_aster.n.01', 'name': 'white_wood_aster'}, {'id': 18380, 'synset': 'bushy_aster.n.01', 'name': 'bushy_aster'}, {'id': 18381, 'synset': 'heath_aster.n.01', 'name': 'heath_aster'}, {'id': 18382, 'synset': 'white_prairie_aster.n.01', 'name': 'white_prairie_aster'}, {'id': 18383, 'synset': 'stiff_aster.n.01', 'name': 'stiff_aster'}, {'id': 18384, 'synset': 'goldilocks.n.01', 'name': 'goldilocks'}, {'id': 18385, 'synset': 'large-leaved_aster.n.01', 'name': 'large-leaved_aster'}, {'id': 18386, 'synset': 'new_england_aster.n.01', 'name': 'New_England_aster'}, {'id': 18387, 'synset': 'michaelmas_daisy.n.01', 'name': 'Michaelmas_daisy'}, {'id': 18388, 'synset': 'upland_white_aster.n.01', 'name': 'upland_white_aster'}, {'id': 18389, 'synset': "short's_aster.n.01", 'name': "Short's_aster"}, {'id': 18390, 'synset': 'sea_aster.n.01', 'name': 'sea_aster'}, {'id': 18391, 'synset': 'prairie_aster.n.01', 'name': 'prairie_aster'}, {'id': 18392, 'synset': 'annual_salt-marsh_aster.n.01', 'name': 'annual_salt-marsh_aster'}, {'id': 18393, 'synset': 'aromatic_aster.n.01', 'name': 'aromatic_aster'}, {'id': 18394, 'synset': 'arrow_leaved_aster.n.01', 'name': 'arrow_leaved_aster'}, {'id': 18395, 'synset': 'azure_aster.n.01', 'name': 'azure_aster'}, {'id': 18396, 'synset': 'bog_aster.n.01', 'name': 'bog_aster'}, {'id': 18397, 'synset': 'crooked-stemmed_aster.n.01', 'name': 'crooked-stemmed_aster'}, {'id': 18398, 'synset': 'eastern_silvery_aster.n.01', 'name': 'Eastern_silvery_aster'}, {'id': 18399, 'synset': 'flat-topped_white_aster.n.01', 'name': 'flat-topped_white_aster'}, {'id': 18400, 'synset': 'late_purple_aster.n.01', 'name': 'late_purple_aster'}, {'id': 18401, 'synset': 'panicled_aster.n.01', 'name': 'panicled_aster'}, {'id': 18402, 'synset': 'perennial_salt_marsh_aster.n.01', 'name': 'perennial_salt_marsh_aster'}, {'id': 18403, 'synset': 'purple-stemmed_aster.n.01', 'name': 'purple-stemmed_aster'}, {'id': 18404, 'synset': 'rough-leaved_aster.n.01', 'name': 'rough-leaved_aster'}, {'id': 18405, 'synset': 'rush_aster.n.01', 'name': 'rush_aster'}, {'id': 18406, 'synset': "schreiber's_aster.n.01", 'name': "Schreiber's_aster"}, {'id': 18407, 'synset': 'small_white_aster.n.01', 'name': 'small_white_aster'}, {'id': 18408, 'synset': 'smooth_aster.n.01', 'name': 'smooth_aster'}, {'id': 18409, 'synset': 'southern_aster.n.01', 'name': 'southern_aster'}, {'id': 18410, 'synset': 'starved_aster.n.01', 'name': 'starved_aster'}, {'id': 18411, 'synset': "tradescant's_aster.n.01", 'name': "tradescant's_aster"}, {'id': 18412, 'synset': 'wavy-leaved_aster.n.01', 'name': 'wavy-leaved_aster'}, {'id': 18413, 'synset': 'western_silvery_aster.n.01', 'name': 'Western_silvery_aster'}, {'id': 18414, 'synset': 'willow_aster.n.01', 'name': 'willow_aster'}, {'id': 18415, 'synset': 'ayapana.n.01', 'name': 'ayapana'}, {'id': 18416, 'synset': 'mule_fat.n.01', 'name': 'mule_fat'}, {'id': 18417, 'synset': 'balsamroot.n.01', 'name': 'balsamroot'}, {'id': 18418, 'synset': 'daisy.n.01', 'name': 'daisy'}, {'id': 18419, 'synset': 'common_daisy.n.01', 'name': 'common_daisy'}, {'id': 18420, 'synset': 'bur_marigold.n.01', 'name': 'bur_marigold'}, {'id': 18421, 'synset': 'spanish_needles.n.02', 'name': 'Spanish_needles'}, {'id': 18422, 'synset': 'tickseed_sunflower.n.01', 'name': 'tickseed_sunflower'}, {'id': 18423, 'synset': 'european_beggar-ticks.n.01', 'name': 'European_beggar-ticks'}, {'id': 18424, 'synset': 'slender_knapweed.n.01', 'name': 'slender_knapweed'}, {'id': 18425, 'synset': 'false_chamomile.n.01', 'name': 'false_chamomile'}, {'id': 18426, 'synset': 'swan_river_daisy.n.01', 'name': 'Swan_River_daisy'}, {'id': 18427, 'synset': 'woodland_oxeye.n.01', 'name': 'woodland_oxeye'}, {'id': 18428, 'synset': 'indian_plantain.n.01', 'name': 'Indian_plantain'}, {'id': 18429, 'synset': 'calendula.n.01', 'name': 'calendula'}, {'id': 18430, 'synset': 'common_marigold.n.01', 'name': 'common_marigold'}, {'id': 18431, 'synset': 'china_aster.n.01', 'name': 'China_aster'}, {'id': 18432, 'synset': 'thistle.n.01', 'name': 'thistle'}, {'id': 18433, 'synset': 'welted_thistle.n.01', 'name': 'welted_thistle'}, {'id': 18434, 'synset': 'musk_thistle.n.01', 'name': 'musk_thistle'}, {'id': 18435, 'synset': 'carline_thistle.n.01', 'name': 'carline_thistle'}, {'id': 18436, 'synset': 'stemless_carline_thistle.n.01', 'name': 'stemless_carline_thistle'}, {'id': 18437, 'synset': 'common_carline_thistle.n.01', 'name': 'common_carline_thistle'}, {'id': 18438, 'synset': 'safflower.n.01', 'name': 'safflower'}, {'id': 18439, 'synset': 'safflower_seed.n.01', 'name': 'safflower_seed'}, {'id': 18440, 'synset': 'catananche.n.01', 'name': 'catananche'}, {'id': 18441, 'synset': 'blue_succory.n.01', 'name': 'blue_succory'}, {'id': 18442, 'synset': 'centaury.n.02', 'name': 'centaury'}, {'id': 18443, 'synset': 'dusty_miller.n.03', 'name': 'dusty_miller'}, {'id': 18444, 'synset': 'cornflower.n.02', 'name': 'cornflower'}, {'id': 18445, 'synset': 'star-thistle.n.01', 'name': 'star-thistle'}, {'id': 18446, 'synset': 'knapweed.n.01', 'name': 'knapweed'}, {'id': 18447, 'synset': 'sweet_sultan.n.02', 'name': 'sweet_sultan'}, {'id': 18448, 'synset': 'great_knapweed.n.01', 'name': 'great_knapweed'}, {'id': 18449, 'synset': "barnaby's_thistle.n.01", 'name': "Barnaby's_thistle"}, {'id': 18450, 'synset': 'chamomile.n.01', 'name': 'chamomile'}, {'id': 18451, 'synset': 'chaenactis.n.01', 'name': 'chaenactis'}, {'id': 18452, 'synset': 'chrysanthemum.n.02', 'name': 'chrysanthemum'}, {'id': 18453, 'synset': 'corn_marigold.n.01', 'name': 'corn_marigold'}, {'id': 18454, 'synset': 'crown_daisy.n.01', 'name': 'crown_daisy'}, {'id': 18455, 'synset': 'chop-suey_greens.n.01', 'name': 'chop-suey_greens'}, {'id': 18456, 'synset': 'golden_aster.n.01', 'name': 'golden_aster'}, {'id': 18457, 'synset': 'maryland_golden_aster.n.01', 'name': 'Maryland_golden_aster'}, {'id': 18458, 'synset': 'goldenbush.n.02', 'name': 'goldenbush'}, {'id': 18459, 'synset': 'rabbit_brush.n.01', 'name': 'rabbit_brush'}, {'id': 18460, 'synset': 'chicory.n.02', 'name': 'chicory'}, {'id': 18461, 'synset': 'endive.n.01', 'name': 'endive'}, {'id': 18462, 'synset': 'chicory.n.01', 'name': 'chicory'}, {'id': 18463, 'synset': 'plume_thistle.n.01', 'name': 'plume_thistle'}, {'id': 18464, 'synset': 'canada_thistle.n.01', 'name': 'Canada_thistle'}, {'id': 18465, 'synset': 'field_thistle.n.01', 'name': 'field_thistle'}, {'id': 18466, 'synset': 'woolly_thistle.n.02', 'name': 'woolly_thistle'}, {'id': 18467, 'synset': 'european_woolly_thistle.n.01', 'name': 'European_woolly_thistle'}, {'id': 18468, 'synset': 'melancholy_thistle.n.01', 'name': 'melancholy_thistle'}, {'id': 18469, 'synset': 'brook_thistle.n.01', 'name': 'brook_thistle'}, {'id': 18470, 'synset': 'bull_thistle.n.01', 'name': 'bull_thistle'}, {'id': 18471, 'synset': 'blessed_thistle.n.02', 'name': 'blessed_thistle'}, {'id': 18472, 'synset': 'mistflower.n.01', 'name': 'mistflower'}, {'id': 18473, 'synset': 'horseweed.n.02', 'name': 'horseweed'}, {'id': 18474, 'synset': 'coreopsis.n.01', 'name': 'coreopsis'}, {'id': 18475, 'synset': 'giant_coreopsis.n.01', 'name': 'giant_coreopsis'}, {'id': 18476, 'synset': 'sea_dahlia.n.01', 'name': 'sea_dahlia'}, {'id': 18477, 'synset': 'calliopsis.n.01', 'name': 'calliopsis'}, {'id': 18478, 'synset': 'cosmos.n.02', 'name': 'cosmos'}, {'id': 18479, 'synset': 'brass_buttons.n.01', 'name': 'brass_buttons'}, {'id': 18480, 'synset': 'billy_buttons.n.01', 'name': 'billy_buttons'}, {'id': 18481, 'synset': "hawk's-beard.n.01", 'name': "hawk's-beard"}, {'id': 18482, 'synset': 'artichoke.n.01', 'name': 'artichoke'}, {'id': 18483, 'synset': 'cardoon.n.01', 'name': 'cardoon'}, {'id': 18484, 'synset': 'dahlia.n.01', 'name': 'dahlia'}, {'id': 18485, 'synset': 'german_ivy.n.01', 'name': 'German_ivy'}, {'id': 18486, 'synset': "florist's_chrysanthemum.n.01", 'name': "florist's_chrysanthemum"}, {'id': 18487, 'synset': 'cape_marigold.n.01', 'name': 'cape_marigold'}, {'id': 18488, 'synset': "leopard's-bane.n.01", 'name': "leopard's-bane"}, {'id': 18489, 'synset': 'coneflower.n.03', 'name': 'coneflower'}, {'id': 18490, 'synset': 'globe_thistle.n.01', 'name': 'globe_thistle'}, {'id': 18491, 'synset': "elephant's-foot.n.02", 'name': "elephant's-foot"}, {'id': 18492, 'synset': 'tassel_flower.n.01', 'name': 'tassel_flower'}, {'id': 18493, 'synset': 'brittlebush.n.01', 'name': 'brittlebush'}, {'id': 18494, 'synset': 'sunray.n.02', 'name': 'sunray'}, {'id': 18495, 'synset': 'engelmannia.n.01', 'name': 'engelmannia'}, {'id': 18496, 'synset': 'fireweed.n.02', 'name': 'fireweed'}, {'id': 18497, 'synset': 'fleabane.n.02', 'name': 'fleabane'}, {'id': 18498, 'synset': 'blue_fleabane.n.01', 'name': 'blue_fleabane'}, {'id': 18499, 'synset': 'daisy_fleabane.n.01', 'name': 'daisy_fleabane'}, {'id': 18500, 'synset': 'orange_daisy.n.01', 'name': 'orange_daisy'}, {'id': 18501, 'synset': 'spreading_fleabane.n.01', 'name': 'spreading_fleabane'}, {'id': 18502, 'synset': 'seaside_daisy.n.01', 'name': 'seaside_daisy'}, {'id': 18503, 'synset': 'philadelphia_fleabane.n.01', 'name': 'Philadelphia_fleabane'}, {'id': 18504, 'synset': "robin's_plantain.n.01", 'name': "robin's_plantain"}, {'id': 18505, 'synset': 'showy_daisy.n.01', 'name': 'showy_daisy'}, {'id': 18506, 'synset': 'woolly_sunflower.n.01', 'name': 'woolly_sunflower'}, {'id': 18507, 'synset': 'golden_yarrow.n.01', 'name': 'golden_yarrow'}, {'id': 18508, 'synset': 'dog_fennel.n.01', 'name': 'dog_fennel'}, {'id': 18509, 'synset': 'joe-pye_weed.n.02', 'name': 'Joe-Pye_weed'}, {'id': 18510, 'synset': 'boneset.n.02', 'name': 'boneset'}, {'id': 18511, 'synset': 'joe-pye_weed.n.01', 'name': 'Joe-Pye_weed'}, {'id': 18512, 'synset': 'blue_daisy.n.01', 'name': 'blue_daisy'}, {'id': 18513, 'synset': 'kingfisher_daisy.n.01', 'name': 'kingfisher_daisy'}, {'id': 18514, 'synset': 'cotton_rose.n.02', 'name': 'cotton_rose'}, {'id': 18515, 'synset': 'herba_impia.n.01', 'name': 'herba_impia'}, {'id': 18516, 'synset': 'gaillardia.n.01', 'name': 'gaillardia'}, {'id': 18517, 'synset': 'gazania.n.01', 'name': 'gazania'}, {'id': 18518, 'synset': 'treasure_flower.n.01', 'name': 'treasure_flower'}, {'id': 18519, 'synset': 'african_daisy.n.02', 'name': 'African_daisy'}, {'id': 18520, 'synset': 'barberton_daisy.n.01', 'name': 'Barberton_daisy'}, {'id': 18521, 'synset': 'desert_sunflower.n.01', 'name': 'desert_sunflower'}, {'id': 18522, 'synset': 'cudweed.n.01', 'name': 'cudweed'}, {'id': 18523, 'synset': 'chafeweed.n.01', 'name': 'chafeweed'}, {'id': 18524, 'synset': 'gumweed.n.01', 'name': 'gumweed'}, {'id': 18525, 'synset': 'grindelia_robusta.n.01', 'name': 'Grindelia_robusta'}, {'id': 18526, 'synset': 'curlycup_gumweed.n.01', 'name': 'curlycup_gumweed'}, {'id': 18527, 'synset': 'little-head_snakeweed.n.01', 'name': 'little-head_snakeweed'}, {'id': 18528, 'synset': 'rabbitweed.n.01', 'name': 'rabbitweed'}, {'id': 18529, 'synset': 'broomweed.n.01', 'name': 'broomweed'}, {'id': 18530, 'synset': 'velvet_plant.n.02', 'name': 'velvet_plant'}, {'id': 18531, 'synset': 'goldenbush.n.01', 'name': 'goldenbush'}, {'id': 18532, 'synset': 'camphor_daisy.n.01', 'name': 'camphor_daisy'}, {'id': 18533, 'synset': 'yellow_spiny_daisy.n.01', 'name': 'yellow_spiny_daisy'}, {'id': 18534, 'synset': 'hoary_golden_bush.n.01', 'name': 'hoary_golden_bush'}, {'id': 18535, 'synset': 'sneezeweed.n.01', 'name': 'sneezeweed'}, {'id': 18536, 'synset': 'orange_sneezeweed.n.01', 'name': 'orange_sneezeweed'}, {'id': 18537, 'synset': 'rosilla.n.01', 'name': 'rosilla'}, {'id': 18538, 'synset': 'swamp_sunflower.n.01', 'name': 'swamp_sunflower'}, {'id': 18539, 'synset': 'common_sunflower.n.01', 'name': 'common_sunflower'}, {'id': 18540, 'synset': 'giant_sunflower.n.01', 'name': 'giant_sunflower'}, {'id': 18541, 'synset': 'showy_sunflower.n.01', 'name': 'showy_sunflower'}, {'id': 18542, 'synset': "maximilian's_sunflower.n.01", 'name': "Maximilian's_sunflower"}, {'id': 18543, 'synset': 'prairie_sunflower.n.01', 'name': 'prairie_sunflower'}, {'id': 18544, 'synset': 'jerusalem_artichoke.n.02', 'name': 'Jerusalem_artichoke'}, {'id': 18545, 'synset': 'jerusalem_artichoke.n.01', 'name': 'Jerusalem_artichoke'}, {'id': 18546, 'synset': 'strawflower.n.03', 'name': 'strawflower'}, {'id': 18547, 'synset': 'heliopsis.n.01', 'name': 'heliopsis'}, {'id': 18548, 'synset': 'strawflower.n.02', 'name': 'strawflower'}, {'id': 18549, 'synset': 'hairy_golden_aster.n.01', 'name': 'hairy_golden_aster'}, {'id': 18550, 'synset': 'hawkweed.n.02', 'name': 'hawkweed'}, {'id': 18551, 'synset': 'rattlesnake_weed.n.01', 'name': 'rattlesnake_weed'}, {'id': 18552, 'synset': 'alpine_coltsfoot.n.01', 'name': 'alpine_coltsfoot'}, {'id': 18553, 'synset': 'alpine_gold.n.01', 'name': 'alpine_gold'}, {'id': 18554, 'synset': 'dwarf_hulsea.n.01', 'name': 'dwarf_hulsea'}, {'id': 18555, 'synset': "cat's-ear.n.02", 'name': "cat's-ear"}, {'id': 18556, 'synset': 'inula.n.01', 'name': 'inula'}, {'id': 18557, 'synset': 'marsh_elder.n.01', 'name': 'marsh_elder'}, {'id': 18558, 'synset': 'burweed_marsh_elder.n.01', 'name': 'burweed_marsh_elder'}, {'id': 18559, 'synset': 'krigia.n.01', 'name': 'krigia'}, {'id': 18560, 'synset': 'dwarf_dandelion.n.01', 'name': 'dwarf_dandelion'}, {'id': 18561, 'synset': 'garden_lettuce.n.01', 'name': 'garden_lettuce'}, {'id': 18562, 'synset': 'cos_lettuce.n.01', 'name': 'cos_lettuce'}, {'id': 18563, 'synset': 'leaf_lettuce.n.01', 'name': 'leaf_lettuce'}, {'id': 18564, 'synset': 'celtuce.n.01', 'name': 'celtuce'}, {'id': 18565, 'synset': 'prickly_lettuce.n.01', 'name': 'prickly_lettuce'}, {'id': 18566, 'synset': 'goldfields.n.01', 'name': 'goldfields'}, {'id': 18567, 'synset': 'tidytips.n.01', 'name': 'tidytips'}, {'id': 18568, 'synset': 'hawkbit.n.01', 'name': 'hawkbit'}, {'id': 18569, 'synset': 'fall_dandelion.n.01', 'name': 'fall_dandelion'}, {'id': 18570, 'synset': 'edelweiss.n.01', 'name': 'edelweiss'}, {'id': 18571, 'synset': 'oxeye_daisy.n.02', 'name': 'oxeye_daisy'}, {'id': 18572, 'synset': 'oxeye_daisy.n.01', 'name': 'oxeye_daisy'}, {'id': 18573, 'synset': 'shasta_daisy.n.01', 'name': 'shasta_daisy'}, {'id': 18574, 'synset': 'pyrenees_daisy.n.01', 'name': 'Pyrenees_daisy'}, {'id': 18575, 'synset': 'north_island_edelweiss.n.01', 'name': 'north_island_edelweiss'}, {'id': 18576, 'synset': 'blazing_star.n.02', 'name': 'blazing_star'}, {'id': 18577, 'synset': 'dotted_gayfeather.n.01', 'name': 'dotted_gayfeather'}, {'id': 18578, 'synset': 'dense_blazing_star.n.01', 'name': 'dense_blazing_star'}, {'id': 18579, 'synset': 'texas_star.n.02', 'name': 'Texas_star'}, {'id': 18580, 'synset': 'african_daisy.n.01', 'name': 'African_daisy'}, {'id': 18581, 'synset': 'tahoka_daisy.n.01', 'name': 'tahoka_daisy'}, {'id': 18582, 'synset': 'sticky_aster.n.01', 'name': 'sticky_aster'}, {'id': 18583, 'synset': 'mojave_aster.n.01', 'name': 'Mojave_aster'}, {'id': 18584, 'synset': 'tarweed.n.01', 'name': 'tarweed'}, {'id': 18585, 'synset': 'sweet_false_chamomile.n.01', 'name': 'sweet_false_chamomile'}, {'id': 18586, 'synset': 'pineapple_weed.n.01', 'name': 'pineapple_weed'}, {'id': 18587, 'synset': 'climbing_hempweed.n.01', 'name': 'climbing_hempweed'}, {'id': 18588, 'synset': 'mutisia.n.01', 'name': 'mutisia'}, {'id': 18589, 'synset': 'rattlesnake_root.n.02', 'name': 'rattlesnake_root'}, {'id': 18590, 'synset': 'white_lettuce.n.01', 'name': 'white_lettuce'}, {'id': 18591, 'synset': 'daisybush.n.01', 'name': 'daisybush'}, {'id': 18592, 'synset': 'new_zealand_daisybush.n.01', 'name': 'New_Zealand_daisybush'}, {'id': 18593, 'synset': 'cotton_thistle.n.01', 'name': 'cotton_thistle'}, {'id': 18594, 'synset': 'othonna.n.01', 'name': 'othonna'}, {'id': 18595, 'synset': 'cascade_everlasting.n.01', 'name': 'cascade_everlasting'}, {'id': 18596, 'synset': 'butterweed.n.02', 'name': 'butterweed'}, {'id': 18597, 'synset': 'american_feverfew.n.01', 'name': 'American_feverfew'}, {'id': 18598, 'synset': 'cineraria.n.01', 'name': 'cineraria'}, {'id': 18599, 'synset': "florest's_cineraria.n.01", 'name': "florest's_cineraria"}, {'id': 18600, 'synset': 'butterbur.n.01', 'name': 'butterbur'}, {'id': 18601, 'synset': 'winter_heliotrope.n.01', 'name': 'winter_heliotrope'}, {'id': 18602, 'synset': 'sweet_coltsfoot.n.01', 'name': 'sweet_coltsfoot'}, {'id': 18603, 'synset': 'oxtongue.n.01', 'name': 'oxtongue'}, {'id': 18604, 'synset': 'hawkweed.n.01', 'name': 'hawkweed'}, {'id': 18605, 'synset': 'mouse-ear_hawkweed.n.01', 'name': 'mouse-ear_hawkweed'}, {'id': 18606, 'synset': 'stevia.n.02', 'name': 'stevia'}, {'id': 18607, 'synset': 'rattlesnake_root.n.01', 'name': 'rattlesnake_root'}, {'id': 18608, 'synset': 'fleabane.n.01', 'name': 'fleabane'}, {'id': 18609, 'synset': 'sheep_plant.n.01', 'name': 'sheep_plant'}, {'id': 18610, 'synset': 'coneflower.n.02', 'name': 'coneflower'}, {'id': 18611, 'synset': 'mexican_hat.n.01', 'name': 'Mexican_hat'}, {'id': 18612, 'synset': 'long-head_coneflower.n.01', 'name': 'long-head_coneflower'}, {'id': 18613, 'synset': 'prairie_coneflower.n.01', 'name': 'prairie_coneflower'}, {'id': 18614, 'synset': 'swan_river_everlasting.n.01', 'name': 'Swan_River_everlasting'}, {'id': 18615, 'synset': 'coneflower.n.01', 'name': 'coneflower'}, {'id': 18616, 'synset': 'black-eyed_susan.n.03', 'name': 'black-eyed_Susan'}, {'id': 18617, 'synset': 'cutleaved_coneflower.n.01', 'name': 'cutleaved_coneflower'}, {'id': 18618, 'synset': 'golden_glow.n.01', 'name': 'golden_glow'}, {'id': 18619, 'synset': 'lavender_cotton.n.01', 'name': 'lavender_cotton'}, {'id': 18620, 'synset': 'creeping_zinnia.n.01', 'name': 'creeping_zinnia'}, {'id': 18621, 'synset': 'golden_thistle.n.01', 'name': 'golden_thistle'}, {'id': 18622, 'synset': 'spanish_oyster_plant.n.01', 'name': 'Spanish_oyster_plant'}, {'id': 18623, 'synset': 'nodding_groundsel.n.01', 'name': 'nodding_groundsel'}, {'id': 18624, 'synset': 'dusty_miller.n.02', 'name': 'dusty_miller'}, {'id': 18625, 'synset': 'butterweed.n.01', 'name': 'butterweed'}, {'id': 18626, 'synset': 'ragwort.n.01', 'name': 'ragwort'}, {'id': 18627, 'synset': 'arrowleaf_groundsel.n.01', 'name': 'arrowleaf_groundsel'}, {'id': 18628, 'synset': 'black_salsify.n.01', 'name': 'black_salsify'}, {'id': 18629, 'synset': 'white-topped_aster.n.01', 'name': 'white-topped_aster'}, {'id': 18630, 'synset': 'narrow-leaved_white-topped_aster.n.01', 'name': 'narrow-leaved_white-topped_aster'}, {'id': 18631, 'synset': 'silver_sage.n.01', 'name': 'silver_sage'}, {'id': 18632, 'synset': 'sea_wormwood.n.01', 'name': 'sea_wormwood'}, {'id': 18633, 'synset': 'sawwort.n.01', 'name': 'sawwort'}, {'id': 18634, 'synset': 'rosinweed.n.01', 'name': 'rosinweed'}, {'id': 18635, 'synset': 'milk_thistle.n.02', 'name': 'milk_thistle'}, {'id': 18636, 'synset': 'goldenrod.n.01', 'name': 'goldenrod'}, {'id': 18637, 'synset': 'silverrod.n.01', 'name': 'silverrod'}, {'id': 18638, 'synset': 'meadow_goldenrod.n.01', 'name': 'meadow_goldenrod'}, {'id': 18639, 'synset': 'missouri_goldenrod.n.01', 'name': 'Missouri_goldenrod'}, {'id': 18640, 'synset': 'alpine_goldenrod.n.01', 'name': 'alpine_goldenrod'}, {'id': 18641, 'synset': 'grey_goldenrod.n.01', 'name': 'grey_goldenrod'}, {'id': 18642, 'synset': 'blue_mountain_tea.n.01', 'name': 'Blue_Mountain_tea'}, {'id': 18643, 'synset': "dyer's_weed.n.01", 'name': "dyer's_weed"}, {'id': 18644, 'synset': 'seaside_goldenrod.n.01', 'name': 'seaside_goldenrod'}, {'id': 18645, 'synset': 'narrow_goldenrod.n.01', 'name': 'narrow_goldenrod'}, {'id': 18646, 'synset': "boott's_goldenrod.n.01", 'name': "Boott's_goldenrod"}, {'id': 18647, 'synset': "elliott's_goldenrod.n.01", 'name': "Elliott's_goldenrod"}, {'id': 18648, 'synset': 'ohio_goldenrod.n.01', 'name': 'Ohio_goldenrod'}, {'id': 18649, 'synset': 'rough-stemmed_goldenrod.n.01', 'name': 'rough-stemmed_goldenrod'}, {'id': 18650, 'synset': 'showy_goldenrod.n.01', 'name': 'showy_goldenrod'}, {'id': 18651, 'synset': 'tall_goldenrod.n.01', 'name': 'tall_goldenrod'}, {'id': 18652, 'synset': 'zigzag_goldenrod.n.01', 'name': 'zigzag_goldenrod'}, {'id': 18653, 'synset': 'sow_thistle.n.01', 'name': 'sow_thistle'}, {'id': 18654, 'synset': 'milkweed.n.02', 'name': 'milkweed'}, {'id': 18655, 'synset': 'stevia.n.01', 'name': 'stevia'}, {'id': 18656, 'synset': "stokes'_aster.n.01", 'name': "stokes'_aster"}, {'id': 18657, 'synset': 'marigold.n.01', 'name': 'marigold'}, {'id': 18658, 'synset': 'african_marigold.n.01', 'name': 'African_marigold'}, {'id': 18659, 'synset': 'french_marigold.n.01', 'name': 'French_marigold'}, {'id': 18660, 'synset': 'painted_daisy.n.01', 'name': 'painted_daisy'}, {'id': 18661, 'synset': 'pyrethrum.n.02', 'name': 'pyrethrum'}, {'id': 18662, 'synset': 'northern_dune_tansy.n.01', 'name': 'northern_dune_tansy'}, {'id': 18663, 'synset': 'feverfew.n.01', 'name': 'feverfew'}, {'id': 18664, 'synset': 'dusty_miller.n.01', 'name': 'dusty_miller'}, {'id': 18665, 'synset': 'tansy.n.01', 'name': 'tansy'}, {'id': 18666, 'synset': 'dandelion.n.01', 'name': 'dandelion'}, {'id': 18667, 'synset': 'common_dandelion.n.01', 'name': 'common_dandelion'}, {'id': 18668, 'synset': 'dandelion_green.n.01', 'name': 'dandelion_green'}, {'id': 18669, 'synset': 'russian_dandelion.n.01', 'name': 'Russian_dandelion'}, {'id': 18670, 'synset': 'stemless_hymenoxys.n.01', 'name': 'stemless_hymenoxys'}, {'id': 18671, 'synset': 'mexican_sunflower.n.01', 'name': 'Mexican_sunflower'}, {'id': 18672, 'synset': 'easter_daisy.n.01', 'name': 'Easter_daisy'}, {'id': 18673, 'synset': 'yellow_salsify.n.01', 'name': 'yellow_salsify'}, {'id': 18674, 'synset': 'salsify.n.02', 'name': 'salsify'}, {'id': 18675, 'synset': 'meadow_salsify.n.01', 'name': 'meadow_salsify'}, {'id': 18676, 'synset': 'scentless_camomile.n.01', 'name': 'scentless_camomile'}, {'id': 18677, 'synset': 'turfing_daisy.n.01', 'name': 'turfing_daisy'}, {'id': 18678, 'synset': 'coltsfoot.n.02', 'name': 'coltsfoot'}, {'id': 18679, 'synset': 'ursinia.n.01', 'name': 'ursinia'}, {'id': 18680, 'synset': 'crownbeard.n.01', 'name': 'crownbeard'}, {'id': 18681, 'synset': 'wingstem.n.01', 'name': 'wingstem'}, {'id': 18682, 'synset': 'cowpen_daisy.n.01', 'name': 'cowpen_daisy'}, {'id': 18683, 'synset': 'gravelweed.n.01', 'name': 'gravelweed'}, {'id': 18684, 'synset': 'virginia_crownbeard.n.01', 'name': 'Virginia_crownbeard'}, {'id': 18685, 'synset': 'ironweed.n.01', 'name': 'ironweed'}, {'id': 18686, 'synset': "mule's_ears.n.01", 'name': "mule's_ears"}, {'id': 18687, 'synset': "white-rayed_mule's_ears.n.01", 'name': "white-rayed_mule's_ears"}, {'id': 18688, 'synset': 'cocklebur.n.01', 'name': 'cocklebur'}, {'id': 18689, 'synset': 'xeranthemum.n.01', 'name': 'xeranthemum'}, {'id': 18690, 'synset': 'immortelle.n.01', 'name': 'immortelle'}, {'id': 18691, 'synset': 'zinnia.n.01', 'name': 'zinnia'}, {'id': 18692, 'synset': 'white_zinnia.n.01', 'name': 'white_zinnia'}, {'id': 18693, 'synset': 'little_golden_zinnia.n.01', 'name': 'little_golden_zinnia'}, {'id': 18694, 'synset': 'blazing_star.n.01', 'name': 'blazing_star'}, {'id': 18695, 'synset': 'bartonia.n.01', 'name': 'bartonia'}, {'id': 18696, 'synset': 'achene.n.01', 'name': 'achene'}, {'id': 18697, 'synset': 'samara.n.01', 'name': 'samara'}, {'id': 18698, 'synset': 'campanula.n.01', 'name': 'campanula'}, {'id': 18699, 'synset': 'creeping_bellflower.n.01', 'name': 'creeping_bellflower'}, {'id': 18700, 'synset': 'canterbury_bell.n.02', 'name': 'Canterbury_bell'}, {'id': 18701, 'synset': 'tall_bellflower.n.01', 'name': 'tall_bellflower'}, {'id': 18702, 'synset': 'marsh_bellflower.n.01', 'name': 'marsh_bellflower'}, {'id': 18703, 'synset': 'clustered_bellflower.n.01', 'name': 'clustered_bellflower'}, {'id': 18704, 'synset': 'peach_bells.n.01', 'name': 'peach_bells'}, {'id': 18705, 'synset': 'chimney_plant.n.01', 'name': 'chimney_plant'}, {'id': 18706, 'synset': 'rampion.n.01', 'name': 'rampion'}, {'id': 18707, 'synset': 'tussock_bellflower.n.01', 'name': 'tussock_bellflower'}, {'id': 18708, 'synset': 'orchid.n.01', 'name': 'orchid'}, {'id': 18709, 'synset': 'orchis.n.01', 'name': 'orchis'}, {'id': 18710, 'synset': 'male_orchis.n.01', 'name': 'male_orchis'}, {'id': 18711, 'synset': 'butterfly_orchid.n.05', 'name': 'butterfly_orchid'}, {'id': 18712, 'synset': 'showy_orchis.n.01', 'name': 'showy_orchis'}, {'id': 18713, 'synset': 'aerides.n.01', 'name': 'aerides'}, {'id': 18714, 'synset': 'angrecum.n.01', 'name': 'angrecum'}, {'id': 18715, 'synset': 'jewel_orchid.n.01', 'name': 'jewel_orchid'}, {'id': 18716, 'synset': 'puttyroot.n.01', 'name': 'puttyroot'}, {'id': 18717, 'synset': 'arethusa.n.01', 'name': 'arethusa'}, {'id': 18718, 'synset': 'bog_rose.n.01', 'name': 'bog_rose'}, {'id': 18719, 'synset': 'bletia.n.01', 'name': 'bletia'}, {'id': 18720, 'synset': 'bletilla_striata.n.01', 'name': 'Bletilla_striata'}, {'id': 18721, 'synset': 'brassavola.n.01', 'name': 'brassavola'}, {'id': 18722, 'synset': 'spider_orchid.n.03', 'name': 'spider_orchid'}, {'id': 18723, 'synset': 'spider_orchid.n.02', 'name': 'spider_orchid'}, {'id': 18724, 'synset': 'caladenia.n.01', 'name': 'caladenia'}, {'id': 18725, 'synset': 'calanthe.n.01', 'name': 'calanthe'}, {'id': 18726, 'synset': 'grass_pink.n.01', 'name': 'grass_pink'}, {'id': 18727, 'synset': 'calypso.n.01', 'name': 'calypso'}, {'id': 18728, 'synset': 'cattleya.n.01', 'name': 'cattleya'}, {'id': 18729, 'synset': 'helleborine.n.03', 'name': 'helleborine'}, {'id': 18730, 'synset': 'red_helleborine.n.01', 'name': 'red_helleborine'}, {'id': 18731, 'synset': 'spreading_pogonia.n.01', 'name': 'spreading_pogonia'}, {'id': 18732, 'synset': 'rosebud_orchid.n.01', 'name': 'rosebud_orchid'}, {'id': 18733, 'synset': 'satyr_orchid.n.01', 'name': 'satyr_orchid'}, {'id': 18734, 'synset': 'frog_orchid.n.02', 'name': 'frog_orchid'}, {'id': 18735, 'synset': 'coelogyne.n.01', 'name': 'coelogyne'}, {'id': 18736, 'synset': 'coral_root.n.01', 'name': 'coral_root'}, {'id': 18737, 'synset': 'spotted_coral_root.n.01', 'name': 'spotted_coral_root'}, {'id': 18738, 'synset': 'striped_coral_root.n.01', 'name': 'striped_coral_root'}, {'id': 18739, 'synset': 'early_coral_root.n.01', 'name': 'early_coral_root'}, {'id': 18740, 'synset': 'swan_orchid.n.01', 'name': 'swan_orchid'}, {'id': 18741, 'synset': 'cymbid.n.01', 'name': 'cymbid'}, {'id': 18742, 'synset': 'cypripedia.n.01', 'name': 'cypripedia'}, {'id': 18743, 'synset': "lady's_slipper.n.01", 'name': "lady's_slipper"}, {'id': 18744, 'synset': 'moccasin_flower.n.01', 'name': 'moccasin_flower'}, {'id': 18745, 'synset': "common_lady's-slipper.n.01", 'name': "common_lady's-slipper"}, {'id': 18746, 'synset': "ram's-head.n.01", 'name': "ram's-head"}, {'id': 18747, 'synset': "yellow_lady's_slipper.n.01", 'name': "yellow_lady's_slipper"}, {'id': 18748, 'synset': "large_yellow_lady's_slipper.n.01", 'name': "large_yellow_lady's_slipper"}, {'id': 18749, 'synset': "california_lady's_slipper.n.01", 'name': "California_lady's_slipper"}, {'id': 18750, 'synset': "clustered_lady's_slipper.n.01", 'name': "clustered_lady's_slipper"}, {'id': 18751, 'synset': "mountain_lady's_slipper.n.01", 'name': "mountain_lady's_slipper"}, {'id': 18752, 'synset': 'marsh_orchid.n.01', 'name': 'marsh_orchid'}, {'id': 18753, 'synset': 'common_spotted_orchid.n.01', 'name': 'common_spotted_orchid'}, {'id': 18754, 'synset': 'dendrobium.n.01', 'name': 'dendrobium'}, {'id': 18755, 'synset': 'disa.n.01', 'name': 'disa'}, {'id': 18756, 'synset': 'phantom_orchid.n.01', 'name': 'phantom_orchid'}, {'id': 18757, 'synset': 'tulip_orchid.n.01', 'name': 'tulip_orchid'}, {'id': 18758, 'synset': 'butterfly_orchid.n.04', 'name': 'butterfly_orchid'}, {'id': 18759, 'synset': 'butterfly_orchid.n.03', 'name': 'butterfly_orchid'}, {'id': 18760, 'synset': 'epidendron.n.01', 'name': 'epidendron'}, {'id': 18761, 'synset': 'helleborine.n.02', 'name': 'helleborine'}, {'id': 18762, 'synset': 'epipactis_helleborine.n.01', 'name': 'Epipactis_helleborine'}, {'id': 18763, 'synset': 'stream_orchid.n.01', 'name': 'stream_orchid'}, {'id': 18764, 'synset': 'tongueflower.n.01', 'name': 'tongueflower'}, {'id': 18765, 'synset': 'rattlesnake_plantain.n.01', 'name': 'rattlesnake_plantain'}, {'id': 18766, 'synset': 'fragrant_orchid.n.01', 'name': 'fragrant_orchid'}, {'id': 18767, 'synset': 'short-spurred_fragrant_orchid.n.01', 'name': 'short-spurred_fragrant_orchid'}, {'id': 18768, 'synset': 'fringed_orchis.n.01', 'name': 'fringed_orchis'}, {'id': 18769, 'synset': 'frog_orchid.n.01', 'name': 'frog_orchid'}, {'id': 18770, 'synset': 'rein_orchid.n.01', 'name': 'rein_orchid'}, {'id': 18771, 'synset': 'bog_rein_orchid.n.01', 'name': 'bog_rein_orchid'}, {'id': 18772, 'synset': 'white_fringed_orchis.n.01', 'name': 'white_fringed_orchis'}, {'id': 18773, 'synset': 'elegant_habenaria.n.01', 'name': 'elegant_Habenaria'}, {'id': 18774, 'synset': 'purple-fringed_orchid.n.02', 'name': 'purple-fringed_orchid'}, {'id': 18775, 'synset': 'coastal_rein_orchid.n.01', 'name': 'coastal_rein_orchid'}, {'id': 18776, 'synset': "hooker's_orchid.n.01", 'name': "Hooker's_orchid"}, {'id': 18777, 'synset': 'ragged_orchid.n.01', 'name': 'ragged_orchid'}, {'id': 18778, 'synset': 'prairie_orchid.n.01', 'name': 'prairie_orchid'}, {'id': 18779, 'synset': 'snowy_orchid.n.01', 'name': 'snowy_orchid'}, {'id': 18780, 'synset': 'round-leaved_rein_orchid.n.01', 'name': 'round-leaved_rein_orchid'}, {'id': 18781, 'synset': 'purple_fringeless_orchid.n.01', 'name': 'purple_fringeless_orchid'}, {'id': 18782, 'synset': 'purple-fringed_orchid.n.01', 'name': 'purple-fringed_orchid'}, {'id': 18783, 'synset': 'alaska_rein_orchid.n.01', 'name': 'Alaska_rein_orchid'}, {'id': 18784, 'synset': 'crested_coral_root.n.01', 'name': 'crested_coral_root'}, {'id': 18785, 'synset': 'texas_purple_spike.n.01', 'name': 'Texas_purple_spike'}, {'id': 18786, 'synset': 'lizard_orchid.n.01', 'name': 'lizard_orchid'}, {'id': 18787, 'synset': 'laelia.n.01', 'name': 'laelia'}, {'id': 18788, 'synset': 'liparis.n.01', 'name': 'liparis'}, {'id': 18789, 'synset': 'twayblade.n.02', 'name': 'twayblade'}, {'id': 18790, 'synset': 'fen_orchid.n.01', 'name': 'fen_orchid'}, {'id': 18791, 'synset': 'broad-leaved_twayblade.n.01', 'name': 'broad-leaved_twayblade'}, {'id': 18792, 'synset': 'lesser_twayblade.n.01', 'name': 'lesser_twayblade'}, {'id': 18793, 'synset': 'twayblade.n.01', 'name': 'twayblade'}, {'id': 18794, 'synset': "green_adder's_mouth.n.01", 'name': "green_adder's_mouth"}, {'id': 18795, 'synset': 'masdevallia.n.01', 'name': 'masdevallia'}, {'id': 18796, 'synset': 'maxillaria.n.01', 'name': 'maxillaria'}, {'id': 18797, 'synset': 'pansy_orchid.n.01', 'name': 'pansy_orchid'}, {'id': 18798, 'synset': 'odontoglossum.n.01', 'name': 'odontoglossum'}, {'id': 18799, 'synset': 'oncidium.n.01', 'name': 'oncidium'}, {'id': 18800, 'synset': 'bee_orchid.n.01', 'name': 'bee_orchid'}, {'id': 18801, 'synset': 'fly_orchid.n.02', 'name': 'fly_orchid'}, {'id': 18802, 'synset': 'spider_orchid.n.01', 'name': 'spider_orchid'}, {'id': 18803, 'synset': 'early_spider_orchid.n.01', 'name': 'early_spider_orchid'}, {'id': 18804, 'synset': "venus'_slipper.n.01", 'name': "Venus'_slipper"}, {'id': 18805, 'synset': 'phaius.n.01', 'name': 'phaius'}, {'id': 18806, 'synset': 'moth_orchid.n.01', 'name': 'moth_orchid'}, {'id': 18807, 'synset': 'butterfly_plant.n.01', 'name': 'butterfly_plant'}, {'id': 18808, 'synset': 'rattlesnake_orchid.n.01', 'name': 'rattlesnake_orchid'}, {'id': 18809, 'synset': 'lesser_butterfly_orchid.n.01', 'name': 'lesser_butterfly_orchid'}, {'id': 18810, 'synset': 'greater_butterfly_orchid.n.01', 'name': 'greater_butterfly_orchid'}, {'id': 18811, 'synset': 'prairie_white-fringed_orchid.n.01', 'name': 'prairie_white-fringed_orchid'}, {'id': 18812, 'synset': 'tangle_orchid.n.01', 'name': 'tangle_orchid'}, {'id': 18813, 'synset': 'indian_crocus.n.01', 'name': 'Indian_crocus'}, {'id': 18814, 'synset': 'pleurothallis.n.01', 'name': 'pleurothallis'}, {'id': 18815, 'synset': 'pogonia.n.01', 'name': 'pogonia'}, {'id': 18816, 'synset': 'butterfly_orchid.n.01', 'name': 'butterfly_orchid'}, {'id': 18817, 'synset': 'psychopsis_krameriana.n.01', 'name': 'Psychopsis_krameriana'}, {'id': 18818, 'synset': 'psychopsis_papilio.n.01', 'name': 'Psychopsis_papilio'}, {'id': 18819, 'synset': 'helmet_orchid.n.01', 'name': 'helmet_orchid'}, {'id': 18820, 'synset': 'foxtail_orchid.n.01', 'name': 'foxtail_orchid'}, {'id': 18821, 'synset': 'orange-blossom_orchid.n.01', 'name': 'orange-blossom_orchid'}, {'id': 18822, 'synset': 'sobralia.n.01', 'name': 'sobralia'}, {'id': 18823, 'synset': "ladies'_tresses.n.01", 'name': "ladies'_tresses"}, {'id': 18824, 'synset': 'screw_augur.n.01', 'name': 'screw_augur'}, {'id': 18825, 'synset': "hooded_ladies'_tresses.n.01", 'name': "hooded_ladies'_tresses"}, {'id': 18826, 'synset': "western_ladies'_tresses.n.01", 'name': "western_ladies'_tresses"}, {'id': 18827, 'synset': "european_ladies'_tresses.n.01", 'name': "European_ladies'_tresses"}, {'id': 18828, 'synset': 'stanhopea.n.01', 'name': 'stanhopea'}, {'id': 18829, 'synset': 'stelis.n.01', 'name': 'stelis'}, {'id': 18830, 'synset': 'fly_orchid.n.01', 'name': 'fly_orchid'}, {'id': 18831, 'synset': 'vanda.n.01', 'name': 'vanda'}, {'id': 18832, 'synset': 'blue_orchid.n.01', 'name': 'blue_orchid'}, {'id': 18833, 'synset': 'vanilla.n.01', 'name': 'vanilla'}, {'id': 18834, 'synset': 'vanilla_orchid.n.01', 'name': 'vanilla_orchid'}, {'id': 18835, 'synset': 'yam.n.02', 'name': 'yam'}, {'id': 18836, 'synset': 'yam.n.01', 'name': 'yam'}, {'id': 18837, 'synset': 'white_yam.n.01', 'name': 'white_yam'}, {'id': 18838, 'synset': 'cinnamon_vine.n.01', 'name': 'cinnamon_vine'}, {'id': 18839, 'synset': "elephant's-foot.n.01", 'name': "elephant's-foot"}, {'id': 18840, 'synset': 'wild_yam.n.01', 'name': 'wild_yam'}, {'id': 18841, 'synset': 'cush-cush.n.01', 'name': 'cush-cush'}, {'id': 18842, 'synset': 'black_bryony.n.01', 'name': 'black_bryony'}, {'id': 18843, 'synset': 'primrose.n.01', 'name': 'primrose'}, {'id': 18844, 'synset': 'english_primrose.n.01', 'name': 'English_primrose'}, {'id': 18845, 'synset': 'cowslip.n.01', 'name': 'cowslip'}, {'id': 18846, 'synset': 'oxlip.n.01', 'name': 'oxlip'}, {'id': 18847, 'synset': 'chinese_primrose.n.01', 'name': 'Chinese_primrose'}, {'id': 18848, 'synset': 'polyanthus.n.01', 'name': 'polyanthus'}, {'id': 18849, 'synset': 'pimpernel.n.02', 'name': 'pimpernel'}, {'id': 18850, 'synset': 'scarlet_pimpernel.n.01', 'name': 'scarlet_pimpernel'}, {'id': 18851, 'synset': 'bog_pimpernel.n.01', 'name': 'bog_pimpernel'}, {'id': 18852, 'synset': 'chaffweed.n.01', 'name': 'chaffweed'}, {'id': 18853, 'synset': 'cyclamen.n.01', 'name': 'cyclamen'}, {'id': 18854, 'synset': 'sowbread.n.01', 'name': 'sowbread'}, {'id': 18855, 'synset': 'sea_milkwort.n.01', 'name': 'sea_milkwort'}, {'id': 18856, 'synset': 'featherfoil.n.01', 'name': 'featherfoil'}, {'id': 18857, 'synset': 'water_gillyflower.n.01', 'name': 'water_gillyflower'}, {'id': 18858, 'synset': 'water_violet.n.01', 'name': 'water_violet'}, {'id': 18859, 'synset': 'loosestrife.n.02', 'name': 'loosestrife'}, {'id': 18860, 'synset': 'gooseneck_loosestrife.n.01', 'name': 'gooseneck_loosestrife'}, {'id': 18861, 'synset': 'yellow_pimpernel.n.01', 'name': 'yellow_pimpernel'}, {'id': 18862, 'synset': 'fringed_loosestrife.n.01', 'name': 'fringed_loosestrife'}, {'id': 18863, 'synset': 'moneywort.n.01', 'name': 'moneywort'}, {'id': 18864, 'synset': 'swamp_candles.n.01', 'name': 'swamp_candles'}, {'id': 18865, 'synset': 'whorled_loosestrife.n.01', 'name': 'whorled_loosestrife'}, {'id': 18866, 'synset': 'water_pimpernel.n.01', 'name': 'water_pimpernel'}, {'id': 18867, 'synset': 'brookweed.n.02', 'name': 'brookweed'}, {'id': 18868, 'synset': 'brookweed.n.01', 'name': 'brookweed'}, {'id': 18869, 'synset': 'coralberry.n.02', 'name': 'coralberry'}, {'id': 18870, 'synset': 'marlberry.n.01', 'name': 'marlberry'}, {'id': 18871, 'synset': 'plumbago.n.02', 'name': 'plumbago'}, {'id': 18872, 'synset': 'leadwort.n.01', 'name': 'leadwort'}, {'id': 18873, 'synset': 'thrift.n.01', 'name': 'thrift'}, {'id': 18874, 'synset': 'sea_lavender.n.01', 'name': 'sea_lavender'}, {'id': 18875, 'synset': 'barbasco.n.01', 'name': 'barbasco'}, {'id': 18876, 'synset': 'gramineous_plant.n.01', 'name': 'gramineous_plant'}, {'id': 18877, 'synset': 'grass.n.01', 'name': 'grass'}, {'id': 18878, 'synset': 'midgrass.n.01', 'name': 'midgrass'}, {'id': 18879, 'synset': 'shortgrass.n.01', 'name': 'shortgrass'}, {'id': 18880, 'synset': 'sword_grass.n.01', 'name': 'sword_grass'}, {'id': 18881, 'synset': 'tallgrass.n.01', 'name': 'tallgrass'}, {'id': 18882, 'synset': 'herbage.n.01', 'name': 'herbage'}, {'id': 18883, 'synset': 'goat_grass.n.01', 'name': 'goat_grass'}, {'id': 18884, 'synset': 'wheatgrass.n.01', 'name': 'wheatgrass'}, {'id': 18885, 'synset': 'crested_wheatgrass.n.01', 'name': 'crested_wheatgrass'}, {'id': 18886, 'synset': 'bearded_wheatgrass.n.01', 'name': 'bearded_wheatgrass'}, {'id': 18887, 'synset': 'western_wheatgrass.n.01', 'name': 'western_wheatgrass'}, {'id': 18888, 'synset': 'intermediate_wheatgrass.n.01', 'name': 'intermediate_wheatgrass'}, {'id': 18889, 'synset': 'slender_wheatgrass.n.01', 'name': 'slender_wheatgrass'}, {'id': 18890, 'synset': 'velvet_bent.n.01', 'name': 'velvet_bent'}, {'id': 18891, 'synset': 'cloud_grass.n.01', 'name': 'cloud_grass'}, {'id': 18892, 'synset': 'meadow_foxtail.n.01', 'name': 'meadow_foxtail'}, {'id': 18893, 'synset': 'foxtail.n.01', 'name': 'foxtail'}, {'id': 18894, 'synset': 'broom_grass.n.01', 'name': 'broom_grass'}, {'id': 18895, 'synset': 'broom_sedge.n.01', 'name': 'broom_sedge'}, {'id': 18896, 'synset': 'tall_oat_grass.n.01', 'name': 'tall_oat_grass'}, {'id': 18897, 'synset': 'toetoe.n.02', 'name': 'toetoe'}, {'id': 18898, 'synset': 'oat.n.01', 'name': 'oat'}, {'id': 18899, 'synset': 'cereal_oat.n.01', 'name': 'cereal_oat'}, {'id': 18900, 'synset': 'wild_oat.n.01', 'name': 'wild_oat'}, {'id': 18901, 'synset': 'slender_wild_oat.n.01', 'name': 'slender_wild_oat'}, {'id': 18902, 'synset': 'wild_red_oat.n.01', 'name': 'wild_red_oat'}, {'id': 18903, 'synset': 'brome.n.01', 'name': 'brome'}, {'id': 18904, 'synset': 'chess.n.01', 'name': 'chess'}, {'id': 18905, 'synset': 'field_brome.n.01', 'name': 'field_brome'}, {'id': 18906, 'synset': 'grama.n.01', 'name': 'grama'}, {'id': 18907, 'synset': 'black_grama.n.01', 'name': 'black_grama'}, {'id': 18908, 'synset': 'buffalo_grass.n.02', 'name': 'buffalo_grass'}, {'id': 18909, 'synset': 'reed_grass.n.01', 'name': 'reed_grass'}, {'id': 18910, 'synset': 'feather_reed_grass.n.01', 'name': 'feather_reed_grass'}, {'id': 18911, 'synset': 'australian_reed_grass.n.01', 'name': 'Australian_reed_grass'}, {'id': 18912, 'synset': 'burgrass.n.01', 'name': 'burgrass'}, {'id': 18913, 'synset': 'buffel_grass.n.01', 'name': 'buffel_grass'}, {'id': 18914, 'synset': 'rhodes_grass.n.01', 'name': 'Rhodes_grass'}, {'id': 18915, 'synset': 'pampas_grass.n.01', 'name': 'pampas_grass'}, {'id': 18916, 'synset': 'giant_star_grass.n.01', 'name': 'giant_star_grass'}, {'id': 18917, 'synset': 'orchard_grass.n.01', 'name': 'orchard_grass'}, {'id': 18918, 'synset': 'egyptian_grass.n.01', 'name': 'Egyptian_grass'}, {'id': 18919, 'synset': 'crabgrass.n.01', 'name': 'crabgrass'}, {'id': 18920, 'synset': 'smooth_crabgrass.n.01', 'name': 'smooth_crabgrass'}, {'id': 18921, 'synset': 'large_crabgrass.n.01', 'name': 'large_crabgrass'}, {'id': 18922, 'synset': 'barnyard_grass.n.01', 'name': 'barnyard_grass'}, {'id': 18923, 'synset': 'japanese_millet.n.01', 'name': 'Japanese_millet'}, {'id': 18924, 'synset': 'yardgrass.n.01', 'name': 'yardgrass'}, {'id': 18925, 'synset': 'finger_millet.n.01', 'name': 'finger_millet'}, {'id': 18926, 'synset': 'lyme_grass.n.01', 'name': 'lyme_grass'}, {'id': 18927, 'synset': 'wild_rye.n.01', 'name': 'wild_rye'}, {'id': 18928, 'synset': 'giant_ryegrass.n.01', 'name': 'giant_ryegrass'}, {'id': 18929, 'synset': 'sea_lyme_grass.n.01', 'name': 'sea_lyme_grass'}, {'id': 18930, 'synset': 'canada_wild_rye.n.01', 'name': 'Canada_wild_rye'}, {'id': 18931, 'synset': 'teff.n.01', 'name': 'teff'}, {'id': 18932, 'synset': 'weeping_love_grass.n.01', 'name': 'weeping_love_grass'}, {'id': 18933, 'synset': 'plume_grass.n.01', 'name': 'plume_grass'}, {'id': 18934, 'synset': 'ravenna_grass.n.01', 'name': 'Ravenna_grass'}, {'id': 18935, 'synset': 'fescue.n.01', 'name': 'fescue'}, {'id': 18936, 'synset': 'reed_meadow_grass.n.01', 'name': 'reed_meadow_grass'}, {'id': 18937, 'synset': 'velvet_grass.n.01', 'name': 'velvet_grass'}, {'id': 18938, 'synset': 'creeping_soft_grass.n.01', 'name': 'creeping_soft_grass'}, {'id': 18939, 'synset': 'barleycorn.n.01', 'name': 'barleycorn'}, {'id': 18940, 'synset': 'barley_grass.n.01', 'name': 'barley_grass'}, {'id': 18941, 'synset': 'little_barley.n.01', 'name': 'little_barley'}, {'id': 18942, 'synset': 'rye_grass.n.01', 'name': 'rye_grass'}, {'id': 18943, 'synset': 'perennial_ryegrass.n.01', 'name': 'perennial_ryegrass'}, {'id': 18944, 'synset': 'italian_ryegrass.n.01', 'name': 'Italian_ryegrass'}, {'id': 18945, 'synset': 'darnel.n.01', 'name': 'darnel'}, {'id': 18946, 'synset': 'nimblewill.n.01', 'name': 'nimblewill'}, {'id': 18947, 'synset': 'cultivated_rice.n.01', 'name': 'cultivated_rice'}, {'id': 18948, 'synset': 'ricegrass.n.01', 'name': 'ricegrass'}, {'id': 18949, 'synset': 'smilo.n.01', 'name': 'smilo'}, {'id': 18950, 'synset': 'switch_grass.n.01', 'name': 'switch_grass'}, {'id': 18951, 'synset': 'broomcorn_millet.n.01', 'name': 'broomcorn_millet'}, {'id': 18952, 'synset': 'goose_grass.n.03', 'name': 'goose_grass'}, {'id': 18953, 'synset': 'dallisgrass.n.01', 'name': 'dallisgrass'}, {'id': 18954, 'synset': 'bahia_grass.n.01', 'name': 'Bahia_grass'}, {'id': 18955, 'synset': 'knotgrass.n.01', 'name': 'knotgrass'}, {'id': 18956, 'synset': 'fountain_grass.n.01', 'name': 'fountain_grass'}, {'id': 18957, 'synset': 'reed_canary_grass.n.01', 'name': 'reed_canary_grass'}, {'id': 18958, 'synset': 'canary_grass.n.01', 'name': 'canary_grass'}, {'id': 18959, 'synset': 'timothy.n.01', 'name': 'timothy'}, {'id': 18960, 'synset': 'bluegrass.n.01', 'name': 'bluegrass'}, {'id': 18961, 'synset': 'meadowgrass.n.01', 'name': 'meadowgrass'}, {'id': 18962, 'synset': 'wood_meadowgrass.n.01', 'name': 'wood_meadowgrass'}, {'id': 18963, 'synset': 'noble_cane.n.01', 'name': 'noble_cane'}, {'id': 18964, 'synset': 'munj.n.01', 'name': 'munj'}, {'id': 18965, 'synset': 'broom_beard_grass.n.01', 'name': 'broom_beard_grass'}, {'id': 18966, 'synset': 'bluestem.n.01', 'name': 'bluestem'}, {'id': 18967, 'synset': 'rye.n.02', 'name': 'rye'}, {'id': 18968, 'synset': 'bristlegrass.n.01', 'name': 'bristlegrass'}, {'id': 18969, 'synset': 'giant_foxtail.n.01', 'name': 'giant_foxtail'}, {'id': 18970, 'synset': 'yellow_bristlegrass.n.01', 'name': 'yellow_bristlegrass'}, {'id': 18971, 'synset': 'green_bristlegrass.n.01', 'name': 'green_bristlegrass'}, {'id': 18972, 'synset': 'siberian_millet.n.01', 'name': 'Siberian_millet'}, {'id': 18973, 'synset': 'german_millet.n.01', 'name': 'German_millet'}, {'id': 18974, 'synset': 'millet.n.01', 'name': 'millet'}, {'id': 18975, 'synset': 'rattan.n.02', 'name': 'rattan'}, {'id': 18976, 'synset': 'malacca.n.01', 'name': 'malacca'}, {'id': 18977, 'synset': 'reed.n.01', 'name': 'reed'}, {'id': 18978, 'synset': 'sorghum.n.01', 'name': 'sorghum'}, {'id': 18979, 'synset': 'grain_sorghum.n.01', 'name': 'grain_sorghum'}, {'id': 18980, 'synset': 'durra.n.01', 'name': 'durra'}, {'id': 18981, 'synset': 'feterita.n.01', 'name': 'feterita'}, {'id': 18982, 'synset': 'hegari.n.01', 'name': 'hegari'}, {'id': 18983, 'synset': 'kaoliang.n.01', 'name': 'kaoliang'}, {'id': 18984, 'synset': 'milo.n.01', 'name': 'milo'}, {'id': 18985, 'synset': 'shallu.n.01', 'name': 'shallu'}, {'id': 18986, 'synset': 'broomcorn.n.01', 'name': 'broomcorn'}, {'id': 18987, 'synset': 'cordgrass.n.01', 'name': 'cordgrass'}, {'id': 18988, 'synset': 'salt_reed_grass.n.01', 'name': 'salt_reed_grass'}, {'id': 18989, 'synset': 'prairie_cordgrass.n.01', 'name': 'prairie_cordgrass'}, {'id': 18990, 'synset': 'smut_grass.n.01', 'name': 'smut_grass'}, {'id': 18991, 'synset': 'sand_dropseed.n.01', 'name': 'sand_dropseed'}, {'id': 18992, 'synset': 'rush_grass.n.01', 'name': 'rush_grass'}, {'id': 18993, 'synset': 'st._augustine_grass.n.01', 'name': 'St._Augustine_grass'}, {'id': 18994, 'synset': 'grain.n.08', 'name': 'grain'}, {'id': 18995, 'synset': 'cereal.n.01', 'name': 'cereal'}, {'id': 18996, 'synset': 'wheat.n.01', 'name': 'wheat'}, {'id': 18997, 'synset': 'wheat_berry.n.01', 'name': 'wheat_berry'}, {'id': 18998, 'synset': 'durum.n.01', 'name': 'durum'}, {'id': 18999, 'synset': 'spelt.n.01', 'name': 'spelt'}, {'id': 19000, 'synset': 'emmer.n.01', 'name': 'emmer'}, {'id': 19001, 'synset': 'wild_wheat.n.01', 'name': 'wild_wheat'}, {'id': 19002, 'synset': 'corn.n.01', 'name': 'corn'}, {'id': 19003, 'synset': 'mealie.n.01', 'name': 'mealie'}, {'id': 19004, 'synset': 'corn.n.02', 'name': 'corn'}, {'id': 19005, 'synset': 'dent_corn.n.01', 'name': 'dent_corn'}, {'id': 19006, 'synset': 'flint_corn.n.01', 'name': 'flint_corn'}, {'id': 19007, 'synset': 'popcorn.n.01', 'name': 'popcorn'}, {'id': 19008, 'synset': 'zoysia.n.01', 'name': 'zoysia'}, {'id': 19009, 'synset': 'manila_grass.n.01', 'name': 'Manila_grass'}, {'id': 19010, 'synset': 'korean_lawn_grass.n.01', 'name': 'Korean_lawn_grass'}, {'id': 19011, 'synset': 'common_bamboo.n.01', 'name': 'common_bamboo'}, {'id': 19012, 'synset': 'giant_bamboo.n.01', 'name': 'giant_bamboo'}, {'id': 19013, 'synset': 'umbrella_plant.n.03', 'name': 'umbrella_plant'}, {'id': 19014, 'synset': 'chufa.n.01', 'name': 'chufa'}, {'id': 19015, 'synset': 'galingale.n.01', 'name': 'galingale'}, {'id': 19016, 'synset': 'nutgrass.n.01', 'name': 'nutgrass'}, {'id': 19017, 'synset': 'sand_sedge.n.01', 'name': 'sand_sedge'}, {'id': 19018, 'synset': 'cypress_sedge.n.01', 'name': 'cypress_sedge'}, {'id': 19019, 'synset': 'cotton_grass.n.01', 'name': 'cotton_grass'}, {'id': 19020, 'synset': 'common_cotton_grass.n.01', 'name': 'common_cotton_grass'}, {'id': 19021, 'synset': 'hardstem_bulrush.n.01', 'name': 'hardstem_bulrush'}, {'id': 19022, 'synset': 'wool_grass.n.01', 'name': 'wool_grass'}, {'id': 19023, 'synset': 'spike_rush.n.01', 'name': 'spike_rush'}, {'id': 19024, 'synset': 'water_chestnut.n.02', 'name': 'water_chestnut'}, {'id': 19025, 'synset': 'needle_spike_rush.n.01', 'name': 'needle_spike_rush'}, {'id': 19026, 'synset': 'creeping_spike_rush.n.01', 'name': 'creeping_spike_rush'}, {'id': 19027, 'synset': 'pandanus.n.02', 'name': 'pandanus'}, {'id': 19028, 'synset': 'textile_screw_pine.n.01', 'name': 'textile_screw_pine'}, {'id': 19029, 'synset': 'cattail.n.01', 'name': 'cattail'}, {'id': 19030, 'synset': "cat's-tail.n.01", 'name': "cat's-tail"}, {'id': 19031, 'synset': 'bur_reed.n.01', 'name': 'bur_reed'}, {'id': 19032, 'synset': 'grain.n.07', 'name': 'grain'}, {'id': 19033, 'synset': 'kernel.n.02', 'name': 'kernel'}, {'id': 19034, 'synset': 'rye.n.01', 'name': 'rye'}, {'id': 19035, 'synset': 'gourd.n.03', 'name': 'gourd'}, {'id': 19036, 'synset': 'pumpkin.n.01', 'name': 'pumpkin'}, {'id': 19037, 'synset': 'squash.n.01', 'name': 'squash'}, {'id': 19038, 'synset': 'summer_squash.n.01', 'name': 'summer_squash'}, {'id': 19039, 'synset': 'yellow_squash.n.01', 'name': 'yellow_squash'}, {'id': 19040, 'synset': 'marrow.n.02', 'name': 'marrow'}, {'id': 19041, 'synset': 'zucchini.n.01', 'name': 'zucchini'}, {'id': 19042, 'synset': 'cocozelle.n.01', 'name': 'cocozelle'}, {'id': 19043, 'synset': 'cymling.n.01', 'name': 'cymling'}, {'id': 19044, 'synset': 'spaghetti_squash.n.01', 'name': 'spaghetti_squash'}, {'id': 19045, 'synset': 'winter_squash.n.01', 'name': 'winter_squash'}, {'id': 19046, 'synset': 'acorn_squash.n.01', 'name': 'acorn_squash'}, {'id': 19047, 'synset': 'hubbard_squash.n.01', 'name': 'hubbard_squash'}, {'id': 19048, 'synset': 'turban_squash.n.01', 'name': 'turban_squash'}, {'id': 19049, 'synset': 'buttercup_squash.n.01', 'name': 'buttercup_squash'}, {'id': 19050, 'synset': 'butternut_squash.n.01', 'name': 'butternut_squash'}, {'id': 19051, 'synset': 'winter_crookneck.n.01', 'name': 'winter_crookneck'}, {'id': 19052, 'synset': 'cushaw.n.01', 'name': 'cushaw'}, {'id': 19053, 'synset': 'prairie_gourd.n.02', 'name': 'prairie_gourd'}, {'id': 19054, 'synset': 'prairie_gourd.n.01', 'name': 'prairie_gourd'}, {'id': 19055, 'synset': 'bryony.n.01', 'name': 'bryony'}, {'id': 19056, 'synset': 'white_bryony.n.01', 'name': 'white_bryony'}, {'id': 19057, 'synset': 'sweet_melon.n.01', 'name': 'sweet_melon'}, {'id': 19058, 'synset': 'cantaloupe.n.01', 'name': 'cantaloupe'}, {'id': 19059, 'synset': 'winter_melon.n.01', 'name': 'winter_melon'}, {'id': 19060, 'synset': 'net_melon.n.01', 'name': 'net_melon'}, {'id': 19061, 'synset': 'cucumber.n.01', 'name': 'cucumber'}, {'id': 19062, 'synset': 'squirting_cucumber.n.01', 'name': 'squirting_cucumber'}, {'id': 19063, 'synset': 'bottle_gourd.n.01', 'name': 'bottle_gourd'}, {'id': 19064, 'synset': 'luffa.n.02', 'name': 'luffa'}, {'id': 19065, 'synset': 'loofah.n.02', 'name': 'loofah'}, {'id': 19066, 'synset': 'angled_loofah.n.01', 'name': 'angled_loofah'}, {'id': 19067, 'synset': 'loofa.n.01', 'name': 'loofa'}, {'id': 19068, 'synset': 'balsam_apple.n.01', 'name': 'balsam_apple'}, {'id': 19069, 'synset': 'balsam_pear.n.01', 'name': 'balsam_pear'}, {'id': 19070, 'synset': 'lobelia.n.01', 'name': 'lobelia'}, {'id': 19071, 'synset': 'water_lobelia.n.01', 'name': 'water_lobelia'}, {'id': 19072, 'synset': 'mallow.n.01', 'name': 'mallow'}, {'id': 19073, 'synset': 'musk_mallow.n.02', 'name': 'musk_mallow'}, {'id': 19074, 'synset': 'common_mallow.n.01', 'name': 'common_mallow'}, {'id': 19075, 'synset': 'okra.n.02', 'name': 'okra'}, {'id': 19076, 'synset': 'okra.n.01', 'name': 'okra'}, {'id': 19077, 'synset': 'abelmosk.n.01', 'name': 'abelmosk'}, {'id': 19078, 'synset': 'flowering_maple.n.01', 'name': 'flowering_maple'}, {'id': 19079, 'synset': 'velvetleaf.n.02', 'name': 'velvetleaf'}, {'id': 19080, 'synset': 'hollyhock.n.02', 'name': 'hollyhock'}, {'id': 19081, 'synset': 'rose_mallow.n.02', 'name': 'rose_mallow'}, {'id': 19082, 'synset': 'althea.n.01', 'name': 'althea'}, {'id': 19083, 'synset': 'marsh_mallow.n.01', 'name': 'marsh_mallow'}, {'id': 19084, 'synset': 'poppy_mallow.n.01', 'name': 'poppy_mallow'}, {'id': 19085, 'synset': 'fringed_poppy_mallow.n.01', 'name': 'fringed_poppy_mallow'}, {'id': 19086, 'synset': 'purple_poppy_mallow.n.01', 'name': 'purple_poppy_mallow'}, {'id': 19087, 'synset': 'clustered_poppy_mallow.n.01', 'name': 'clustered_poppy_mallow'}, {'id': 19088, 'synset': 'sea_island_cotton.n.01', 'name': 'sea_island_cotton'}, {'id': 19089, 'synset': 'levant_cotton.n.01', 'name': 'Levant_cotton'}, {'id': 19090, 'synset': 'upland_cotton.n.01', 'name': 'upland_cotton'}, {'id': 19091, 'synset': 'peruvian_cotton.n.01', 'name': 'Peruvian_cotton'}, {'id': 19092, 'synset': 'wild_cotton.n.01', 'name': 'wild_cotton'}, {'id': 19093, 'synset': 'kenaf.n.02', 'name': 'kenaf'}, {'id': 19094, 'synset': 'sorrel_tree.n.02', 'name': 'sorrel_tree'}, {'id': 19095, 'synset': 'rose_mallow.n.01', 'name': 'rose_mallow'}, {'id': 19096, 'synset': 'cotton_rose.n.01', 'name': 'cotton_rose'}, {'id': 19097, 'synset': 'roselle.n.01', 'name': 'roselle'}, {'id': 19098, 'synset': 'mahoe.n.01', 'name': 'mahoe'}, {'id': 19099, 'synset': 'flower-of-an-hour.n.01', 'name': 'flower-of-an-hour'}, {'id': 19100, 'synset': 'lacebark.n.01', 'name': 'lacebark'}, {'id': 19101, 'synset': 'wild_hollyhock.n.02', 'name': 'wild_hollyhock'}, {'id': 19102, 'synset': 'mountain_hollyhock.n.01', 'name': 'mountain_hollyhock'}, {'id': 19103, 'synset': 'seashore_mallow.n.01', 'name': 'seashore_mallow'}, {'id': 19104, 'synset': 'salt_marsh_mallow.n.01', 'name': 'salt_marsh_mallow'}, {'id': 19105, 'synset': 'chaparral_mallow.n.01', 'name': 'chaparral_mallow'}, {'id': 19106, 'synset': 'malope.n.01', 'name': 'malope'}, {'id': 19107, 'synset': 'false_mallow.n.02', 'name': 'false_mallow'}, {'id': 19108, 'synset': 'waxmallow.n.01', 'name': 'waxmallow'}, {'id': 19109, 'synset': 'glade_mallow.n.01', 'name': 'glade_mallow'}, {'id': 19110, 'synset': 'pavonia.n.01', 'name': 'pavonia'}, {'id': 19111, 'synset': 'ribbon_tree.n.01', 'name': 'ribbon_tree'}, {'id': 19112, 'synset': 'bush_hibiscus.n.01', 'name': 'bush_hibiscus'}, {'id': 19113, 'synset': 'virginia_mallow.n.01', 'name': 'Virginia_mallow'}, {'id': 19114, 'synset': 'queensland_hemp.n.01', 'name': 'Queensland_hemp'}, {'id': 19115, 'synset': 'indian_mallow.n.01', 'name': 'Indian_mallow'}, {'id': 19116, 'synset': 'checkerbloom.n.01', 'name': 'checkerbloom'}, {'id': 19117, 'synset': 'globe_mallow.n.01', 'name': 'globe_mallow'}, {'id': 19118, 'synset': 'prairie_mallow.n.01', 'name': 'prairie_mallow'}, {'id': 19119, 'synset': 'tulipwood_tree.n.01', 'name': 'tulipwood_tree'}, {'id': 19120, 'synset': 'portia_tree.n.01', 'name': 'portia_tree'}, {'id': 19121, 'synset': 'red_silk-cotton_tree.n.01', 'name': 'red_silk-cotton_tree'}, {'id': 19122, 'synset': 'cream-of-tartar_tree.n.01', 'name': 'cream-of-tartar_tree'}, {'id': 19123, 'synset': 'baobab.n.01', 'name': 'baobab'}, {'id': 19124, 'synset': 'kapok.n.02', 'name': 'kapok'}, {'id': 19125, 'synset': 'durian.n.01', 'name': 'durian'}, {'id': 19126, 'synset': 'montezuma.n.01', 'name': 'Montezuma'}, {'id': 19127, 'synset': 'shaving-brush_tree.n.01', 'name': 'shaving-brush_tree'}, {'id': 19128, 'synset': 'quandong.n.03', 'name': 'quandong'}, {'id': 19129, 'synset': 'quandong.n.02', 'name': 'quandong'}, {'id': 19130, 'synset': 'makomako.n.01', 'name': 'makomako'}, {'id': 19131, 'synset': 'jamaican_cherry.n.01', 'name': 'Jamaican_cherry'}, {'id': 19132, 'synset': 'breakax.n.01', 'name': 'breakax'}, {'id': 19133, 'synset': 'sterculia.n.01', 'name': 'sterculia'}, {'id': 19134, 'synset': 'panama_tree.n.01', 'name': 'Panama_tree'}, {'id': 19135, 'synset': 'kalumpang.n.01', 'name': 'kalumpang'}, {'id': 19136, 'synset': 'bottle-tree.n.01', 'name': 'bottle-tree'}, {'id': 19137, 'synset': 'flame_tree.n.04', 'name': 'flame_tree'}, {'id': 19138, 'synset': 'flame_tree.n.03', 'name': 'flame_tree'}, {'id': 19139, 'synset': 'kurrajong.n.01', 'name': 'kurrajong'}, {'id': 19140, 'synset': 'queensland_bottletree.n.01', 'name': 'Queensland_bottletree'}, {'id': 19141, 'synset': 'kola.n.01', 'name': 'kola'}, {'id': 19142, 'synset': 'kola_nut.n.01', 'name': 'kola_nut'}, {'id': 19143, 'synset': 'chinese_parasol_tree.n.01', 'name': 'Chinese_parasol_tree'}, {'id': 19144, 'synset': 'flannelbush.n.01', 'name': 'flannelbush'}, {'id': 19145, 'synset': 'screw_tree.n.01', 'name': 'screw_tree'}, {'id': 19146, 'synset': 'nut-leaved_screw_tree.n.01', 'name': 'nut-leaved_screw_tree'}, {'id': 19147, 'synset': 'red_beech.n.02', 'name': 'red_beech'}, {'id': 19148, 'synset': 'looking_glass_tree.n.01', 'name': 'looking_glass_tree'}, {'id': 19149, 'synset': 'looking-glass_plant.n.01', 'name': 'looking-glass_plant'}, {'id': 19150, 'synset': 'honey_bell.n.01', 'name': 'honey_bell'}, {'id': 19151, 'synset': 'mayeng.n.01', 'name': 'mayeng'}, {'id': 19152, 'synset': 'silver_tree.n.02', 'name': 'silver_tree'}, {'id': 19153, 'synset': 'cacao.n.01', 'name': 'cacao'}, {'id': 19154, 'synset': 'obeche.n.02', 'name': 'obeche'}, {'id': 19155, 'synset': 'linden.n.02', 'name': 'linden'}, {'id': 19156, 'synset': 'american_basswood.n.01', 'name': 'American_basswood'}, {'id': 19157, 'synset': 'small-leaved_linden.n.01', 'name': 'small-leaved_linden'}, {'id': 19158, 'synset': 'white_basswood.n.01', 'name': 'white_basswood'}, {'id': 19159, 'synset': 'japanese_linden.n.01', 'name': 'Japanese_linden'}, {'id': 19160, 'synset': 'silver_lime.n.01', 'name': 'silver_lime'}, {'id': 19161, 'synset': 'corchorus.n.01', 'name': 'corchorus'}, {'id': 19162, 'synset': 'african_hemp.n.02', 'name': 'African_hemp'}, {'id': 19163, 'synset': 'herb.n.01', 'name': 'herb'}, {'id': 19164, 'synset': 'protea.n.01', 'name': 'protea'}, {'id': 19165, 'synset': 'honeypot.n.01', 'name': 'honeypot'}, {'id': 19166, 'synset': 'honeyflower.n.02', 'name': 'honeyflower'}, {'id': 19167, 'synset': 'banksia.n.01', 'name': 'banksia'}, {'id': 19168, 'synset': 'honeysuckle.n.02', 'name': 'honeysuckle'}, {'id': 19169, 'synset': 'smoke_bush.n.02', 'name': 'smoke_bush'}, {'id': 19170, 'synset': 'chilean_firebush.n.01', 'name': 'Chilean_firebush'}, {'id': 19171, 'synset': 'chilean_nut.n.01', 'name': 'Chilean_nut'}, {'id': 19172, 'synset': 'grevillea.n.01', 'name': 'grevillea'}, {'id': 19173, 'synset': 'red-flowered_silky_oak.n.01', 'name': 'red-flowered_silky_oak'}, {'id': 19174, 'synset': 'silky_oak.n.01', 'name': 'silky_oak'}, {'id': 19175, 'synset': 'beefwood.n.05', 'name': 'beefwood'}, {'id': 19176, 'synset': 'cushion_flower.n.01', 'name': 'cushion_flower'}, {'id': 19177, 'synset': 'rewa-rewa.n.01', 'name': 'rewa-rewa'}, {'id': 19178, 'synset': 'honeyflower.n.01', 'name': 'honeyflower'}, {'id': 19179, 'synset': 'silver_tree.n.01', 'name': 'silver_tree'}, {'id': 19180, 'synset': 'lomatia.n.01', 'name': 'lomatia'}, {'id': 19181, 'synset': 'macadamia.n.01', 'name': 'macadamia'}, {'id': 19182, 'synset': 'macadamia_integrifolia.n.01', 'name': 'Macadamia_integrifolia'}, {'id': 19183, 'synset': 'macadamia_nut.n.01', 'name': 'macadamia_nut'}, {'id': 19184, 'synset': 'queensland_nut.n.01', 'name': 'Queensland_nut'}, {'id': 19185, 'synset': 'prickly_ash.n.02', 'name': 'prickly_ash'}, {'id': 19186, 'synset': 'geebung.n.01', 'name': 'geebung'}, {'id': 19187, 'synset': 'wheel_tree.n.01', 'name': 'wheel_tree'}, {'id': 19188, 'synset': 'scrub_beefwood.n.01', 'name': 'scrub_beefwood'}, {'id': 19189, 'synset': 'waratah.n.02', 'name': 'waratah'}, {'id': 19190, 'synset': 'waratah.n.01', 'name': 'waratah'}, {'id': 19191, 'synset': 'casuarina.n.01', 'name': 'casuarina'}, {'id': 19192, 'synset': 'she-oak.n.01', 'name': 'she-oak'}, {'id': 19193, 'synset': 'beefwood.n.03', 'name': 'beefwood'}, {'id': 19194, 'synset': 'australian_pine.n.01', 'name': 'Australian_pine'}, {'id': 19195, 'synset': 'heath.n.01', 'name': 'heath'}, {'id': 19196, 'synset': 'tree_heath.n.02', 'name': 'tree_heath'}, {'id': 19197, 'synset': 'briarroot.n.01', 'name': 'briarroot'}, {'id': 19198, 'synset': 'winter_heath.n.01', 'name': 'winter_heath'}, {'id': 19199, 'synset': 'bell_heather.n.02', 'name': 'bell_heather'}, {'id': 19200, 'synset': 'cornish_heath.n.01', 'name': 'Cornish_heath'}, {'id': 19201, 'synset': 'spanish_heath.n.01', 'name': 'Spanish_heath'}, {'id': 19202, 'synset': "prince-of-wales'-heath.n.01", 'name': "Prince-of-Wales'-heath"}, {'id': 19203, 'synset': 'bog_rosemary.n.01', 'name': 'bog_rosemary'}, {'id': 19204, 'synset': 'marsh_andromeda.n.01', 'name': 'marsh_andromeda'}, {'id': 19205, 'synset': 'madrona.n.01', 'name': 'madrona'}, {'id': 19206, 'synset': 'strawberry_tree.n.01', 'name': 'strawberry_tree'}, {'id': 19207, 'synset': 'bearberry.n.03', 'name': 'bearberry'}, {'id': 19208, 'synset': 'alpine_bearberry.n.01', 'name': 'alpine_bearberry'}, {'id': 19209, 'synset': 'heartleaf_manzanita.n.01', 'name': 'heartleaf_manzanita'}, {'id': 19210, 'synset': 'parry_manzanita.n.01', 'name': 'Parry_manzanita'}, {'id': 19211, 'synset': 'spike_heath.n.01', 'name': 'spike_heath'}, {'id': 19212, 'synset': 'bryanthus.n.01', 'name': 'bryanthus'}, {'id': 19213, 'synset': 'leatherleaf.n.02', 'name': 'leatherleaf'}, {'id': 19214, 'synset': 'connemara_heath.n.01', 'name': 'Connemara_heath'}, {'id': 19215, 'synset': 'trailing_arbutus.n.01', 'name': 'trailing_arbutus'}, {'id': 19216, 'synset': 'creeping_snowberry.n.01', 'name': 'creeping_snowberry'}, {'id': 19217, 'synset': 'salal.n.01', 'name': 'salal'}, {'id': 19218, 'synset': 'huckleberry.n.02', 'name': 'huckleberry'}, {'id': 19219, 'synset': 'black_huckleberry.n.01', 'name': 'black_huckleberry'}, {'id': 19220, 'synset': 'dangleberry.n.01', 'name': 'dangleberry'}, {'id': 19221, 'synset': 'box_huckleberry.n.01', 'name': 'box_huckleberry'}, {'id': 19222, 'synset': 'kalmia.n.01', 'name': 'kalmia'}, {'id': 19223, 'synset': 'mountain_laurel.n.01', 'name': 'mountain_laurel'}, {'id': 19224, 'synset': 'swamp_laurel.n.01', 'name': 'swamp_laurel'}, {'id': 19225, 'synset': "trapper's_tea.n.01", 'name': "trapper's_tea"}, {'id': 19226, 'synset': 'wild_rosemary.n.01', 'name': 'wild_rosemary'}, {'id': 19227, 'synset': 'sand_myrtle.n.01', 'name': 'sand_myrtle'}, {'id': 19228, 'synset': 'leucothoe.n.01', 'name': 'leucothoe'}, {'id': 19229, 'synset': 'dog_laurel.n.01', 'name': 'dog_laurel'}, {'id': 19230, 'synset': 'sweet_bells.n.01', 'name': 'sweet_bells'}, {'id': 19231, 'synset': 'alpine_azalea.n.01', 'name': 'alpine_azalea'}, {'id': 19232, 'synset': 'staggerbush.n.01', 'name': 'staggerbush'}, {'id': 19233, 'synset': 'maleberry.n.01', 'name': 'maleberry'}, {'id': 19234, 'synset': 'fetterbush.n.02', 'name': 'fetterbush'}, {'id': 19235, 'synset': 'false_azalea.n.01', 'name': 'false_azalea'}, {'id': 19236, 'synset': 'minniebush.n.01', 'name': 'minniebush'}, {'id': 19237, 'synset': 'sorrel_tree.n.01', 'name': 'sorrel_tree'}, {'id': 19238, 'synset': 'mountain_heath.n.01', 'name': 'mountain_heath'}, {'id': 19239, 'synset': 'purple_heather.n.01', 'name': 'purple_heather'}, {'id': 19240, 'synset': 'fetterbush.n.01', 'name': 'fetterbush'}, {'id': 19241, 'synset': 'rhododendron.n.01', 'name': 'rhododendron'}, {'id': 19242, 'synset': 'coast_rhododendron.n.01', 'name': 'coast_rhododendron'}, {'id': 19243, 'synset': 'rosebay.n.01', 'name': 'rosebay'}, {'id': 19244, 'synset': 'swamp_azalea.n.01', 'name': 'swamp_azalea'}, {'id': 19245, 'synset': 'azalea.n.01', 'name': 'azalea'}, {'id': 19246, 'synset': 'cranberry.n.01', 'name': 'cranberry'}, {'id': 19247, 'synset': 'american_cranberry.n.01', 'name': 'American_cranberry'}, {'id': 19248, 'synset': 'european_cranberry.n.01', 'name': 'European_cranberry'}, {'id': 19249, 'synset': 'blueberry.n.01', 'name': 'blueberry'}, {'id': 19250, 'synset': 'farkleberry.n.01', 'name': 'farkleberry'}, {'id': 19251, 'synset': 'low-bush_blueberry.n.01', 'name': 'low-bush_blueberry'}, {'id': 19252, 'synset': 'rabbiteye_blueberry.n.01', 'name': 'rabbiteye_blueberry'}, {'id': 19253, 'synset': 'dwarf_bilberry.n.01', 'name': 'dwarf_bilberry'}, {'id': 19254, 'synset': 'evergreen_blueberry.n.01', 'name': 'evergreen_blueberry'}, {'id': 19255, 'synset': 'evergreen_huckleberry.n.01', 'name': 'evergreen_huckleberry'}, {'id': 19256, 'synset': 'bilberry.n.02', 'name': 'bilberry'}, {'id': 19257, 'synset': 'bilberry.n.01', 'name': 'bilberry'}, {'id': 19258, 'synset': 'bog_bilberry.n.01', 'name': 'bog_bilberry'}, {'id': 19259, 'synset': 'dryland_blueberry.n.01', 'name': 'dryland_blueberry'}, {'id': 19260, 'synset': 'grouseberry.n.01', 'name': 'grouseberry'}, {'id': 19261, 'synset': 'deerberry.n.01', 'name': 'deerberry'}, {'id': 19262, 'synset': 'cowberry.n.01', 'name': 'cowberry'}, {'id': 19263, 'synset': 'diapensia.n.01', 'name': 'diapensia'}, {'id': 19264, 'synset': 'galax.n.01', 'name': 'galax'}, {'id': 19265, 'synset': 'pyxie.n.01', 'name': 'pyxie'}, {'id': 19266, 'synset': 'shortia.n.01', 'name': 'shortia'}, {'id': 19267, 'synset': 'oconee_bells.n.01', 'name': 'oconee_bells'}, {'id': 19268, 'synset': 'australian_heath.n.01', 'name': 'Australian_heath'}, {'id': 19269, 'synset': 'epacris.n.01', 'name': 'epacris'}, {'id': 19270, 'synset': 'common_heath.n.02', 'name': 'common_heath'}, {'id': 19271, 'synset': 'common_heath.n.01', 'name': 'common_heath'}, {'id': 19272, 'synset': 'port_jackson_heath.n.01', 'name': 'Port_Jackson_heath'}, {'id': 19273, 'synset': 'native_cranberry.n.01', 'name': 'native_cranberry'}, {'id': 19274, 'synset': 'pink_fivecorner.n.01', 'name': 'pink_fivecorner'}, {'id': 19275, 'synset': 'wintergreen.n.01', 'name': 'wintergreen'}, {'id': 19276, 'synset': 'false_wintergreen.n.01', 'name': 'false_wintergreen'}, {'id': 19277, 'synset': 'lesser_wintergreen.n.01', 'name': 'lesser_wintergreen'}, {'id': 19278, 'synset': 'wild_lily_of_the_valley.n.02', 'name': 'wild_lily_of_the_valley'}, {'id': 19279, 'synset': 'wild_lily_of_the_valley.n.01', 'name': 'wild_lily_of_the_valley'}, {'id': 19280, 'synset': 'pipsissewa.n.01', 'name': 'pipsissewa'}, {'id': 19281, 'synset': 'love-in-winter.n.01', 'name': 'love-in-winter'}, {'id': 19282, 'synset': 'one-flowered_wintergreen.n.01', 'name': 'one-flowered_wintergreen'}, {'id': 19283, 'synset': 'indian_pipe.n.01', 'name': 'Indian_pipe'}, {'id': 19284, 'synset': 'pinesap.n.01', 'name': 'pinesap'}, {'id': 19285, 'synset': 'beech.n.01', 'name': 'beech'}, {'id': 19286, 'synset': 'common_beech.n.01', 'name': 'common_beech'}, {'id': 19287, 'synset': 'copper_beech.n.01', 'name': 'copper_beech'}, {'id': 19288, 'synset': 'american_beech.n.01', 'name': 'American_beech'}, {'id': 19289, 'synset': 'weeping_beech.n.01', 'name': 'weeping_beech'}, {'id': 19290, 'synset': 'japanese_beech.n.01', 'name': 'Japanese_beech'}, {'id': 19291, 'synset': 'chestnut.n.02', 'name': 'chestnut'}, {'id': 19292, 'synset': 'american_chestnut.n.01', 'name': 'American_chestnut'}, {'id': 19293, 'synset': 'european_chestnut.n.01', 'name': 'European_chestnut'}, {'id': 19294, 'synset': 'chinese_chestnut.n.01', 'name': 'Chinese_chestnut'}, {'id': 19295, 'synset': 'japanese_chestnut.n.01', 'name': 'Japanese_chestnut'}, {'id': 19296, 'synset': 'allegheny_chinkapin.n.01', 'name': 'Allegheny_chinkapin'}, {'id': 19297, 'synset': 'ozark_chinkapin.n.01', 'name': 'Ozark_chinkapin'}, {'id': 19298, 'synset': 'oak_chestnut.n.01', 'name': 'oak_chestnut'}, {'id': 19299, 'synset': 'giant_chinkapin.n.01', 'name': 'giant_chinkapin'}, {'id': 19300, 'synset': 'dwarf_golden_chinkapin.n.01', 'name': 'dwarf_golden_chinkapin'}, {'id': 19301, 'synset': 'tanbark_oak.n.01', 'name': 'tanbark_oak'}, {'id': 19302, 'synset': 'japanese_oak.n.02', 'name': 'Japanese_oak'}, {'id': 19303, 'synset': 'southern_beech.n.01', 'name': 'southern_beech'}, {'id': 19304, 'synset': 'myrtle_beech.n.01', 'name': 'myrtle_beech'}, {'id': 19305, 'synset': 'coigue.n.01', 'name': 'Coigue'}, {'id': 19306, 'synset': 'new_zealand_beech.n.01', 'name': 'New_Zealand_beech'}, {'id': 19307, 'synset': 'silver_beech.n.01', 'name': 'silver_beech'}, {'id': 19308, 'synset': 'roble_beech.n.01', 'name': 'roble_beech'}, {'id': 19309, 'synset': 'rauli_beech.n.01', 'name': 'rauli_beech'}, {'id': 19310, 'synset': 'black_beech.n.01', 'name': 'black_beech'}, {'id': 19311, 'synset': 'hard_beech.n.01', 'name': 'hard_beech'}, {'id': 19312, 'synset': 'acorn.n.01', 'name': 'acorn'}, {'id': 19313, 'synset': 'cupule.n.01', 'name': 'cupule'}, {'id': 19314, 'synset': 'oak.n.02', 'name': 'oak'}, {'id': 19315, 'synset': 'live_oak.n.01', 'name': 'live_oak'}, {'id': 19316, 'synset': 'coast_live_oak.n.01', 'name': 'coast_live_oak'}, {'id': 19317, 'synset': 'white_oak.n.01', 'name': 'white_oak'}, {'id': 19318, 'synset': 'american_white_oak.n.01', 'name': 'American_white_oak'}, {'id': 19319, 'synset': 'arizona_white_oak.n.01', 'name': 'Arizona_white_oak'}, {'id': 19320, 'synset': 'swamp_white_oak.n.01', 'name': 'swamp_white_oak'}, {'id': 19321, 'synset': 'european_turkey_oak.n.01', 'name': 'European_turkey_oak'}, {'id': 19322, 'synset': 'canyon_oak.n.01', 'name': 'canyon_oak'}, {'id': 19323, 'synset': 'scarlet_oak.n.01', 'name': 'scarlet_oak'}, {'id': 19324, 'synset': 'jack_oak.n.02', 'name': 'jack_oak'}, {'id': 19325, 'synset': 'red_oak.n.01', 'name': 'red_oak'}, {'id': 19326, 'synset': 'southern_red_oak.n.01', 'name': 'southern_red_oak'}, {'id': 19327, 'synset': 'oregon_white_oak.n.01', 'name': 'Oregon_white_oak'}, {'id': 19328, 'synset': 'holm_oak.n.02', 'name': 'holm_oak'}, {'id': 19329, 'synset': 'bear_oak.n.01', 'name': 'bear_oak'}, {'id': 19330, 'synset': 'shingle_oak.n.01', 'name': 'shingle_oak'}, {'id': 19331, 'synset': 'bluejack_oak.n.01', 'name': 'bluejack_oak'}, {'id': 19332, 'synset': 'california_black_oak.n.01', 'name': 'California_black_oak'}, {'id': 19333, 'synset': 'american_turkey_oak.n.01', 'name': 'American_turkey_oak'}, {'id': 19334, 'synset': 'laurel_oak.n.01', 'name': 'laurel_oak'}, {'id': 19335, 'synset': 'california_white_oak.n.01', 'name': 'California_white_oak'}, {'id': 19336, 'synset': 'overcup_oak.n.01', 'name': 'overcup_oak'}, {'id': 19337, 'synset': 'bur_oak.n.01', 'name': 'bur_oak'}, {'id': 19338, 'synset': 'scrub_oak.n.01', 'name': 'scrub_oak'}, {'id': 19339, 'synset': 'blackjack_oak.n.01', 'name': 'blackjack_oak'}, {'id': 19340, 'synset': 'swamp_chestnut_oak.n.01', 'name': 'swamp_chestnut_oak'}, {'id': 19341, 'synset': 'japanese_oak.n.01', 'name': 'Japanese_oak'}, {'id': 19342, 'synset': 'chestnut_oak.n.01', 'name': 'chestnut_oak'}, {'id': 19343, 'synset': 'chinquapin_oak.n.01', 'name': 'chinquapin_oak'}, {'id': 19344, 'synset': 'myrtle_oak.n.01', 'name': 'myrtle_oak'}, {'id': 19345, 'synset': 'water_oak.n.01', 'name': 'water_oak'}, {'id': 19346, 'synset': 'nuttall_oak.n.01', 'name': 'Nuttall_oak'}, {'id': 19347, 'synset': 'durmast.n.01', 'name': 'durmast'}, {'id': 19348, 'synset': 'basket_oak.n.01', 'name': 'basket_oak'}, {'id': 19349, 'synset': 'pin_oak.n.01', 'name': 'pin_oak'}, {'id': 19350, 'synset': 'willow_oak.n.01', 'name': 'willow_oak'}, {'id': 19351, 'synset': 'dwarf_chinkapin_oak.n.01', 'name': 'dwarf_chinkapin_oak'}, {'id': 19352, 'synset': 'common_oak.n.01', 'name': 'common_oak'}, {'id': 19353, 'synset': 'northern_red_oak.n.01', 'name': 'northern_red_oak'}, {'id': 19354, 'synset': 'shumard_oak.n.01', 'name': 'Shumard_oak'}, {'id': 19355, 'synset': 'post_oak.n.01', 'name': 'post_oak'}, {'id': 19356, 'synset': 'cork_oak.n.01', 'name': 'cork_oak'}, {'id': 19357, 'synset': 'spanish_oak.n.01', 'name': 'Spanish_oak'}, {'id': 19358, 'synset': 'huckleberry_oak.n.01', 'name': 'huckleberry_oak'}, {'id': 19359, 'synset': 'chinese_cork_oak.n.01', 'name': 'Chinese_cork_oak'}, {'id': 19360, 'synset': 'black_oak.n.01', 'name': 'black_oak'}, {'id': 19361, 'synset': 'southern_live_oak.n.01', 'name': 'southern_live_oak'}, {'id': 19362, 'synset': 'interior_live_oak.n.01', 'name': 'interior_live_oak'}, {'id': 19363, 'synset': 'mast.n.02', 'name': 'mast'}, {'id': 19364, 'synset': 'birch.n.02', 'name': 'birch'}, {'id': 19365, 'synset': 'yellow_birch.n.01', 'name': 'yellow_birch'}, {'id': 19366, 'synset': 'american_white_birch.n.01', 'name': 'American_white_birch'}, {'id': 19367, 'synset': 'grey_birch.n.01', 'name': 'grey_birch'}, {'id': 19368, 'synset': 'silver_birch.n.01', 'name': 'silver_birch'}, {'id': 19369, 'synset': 'downy_birch.n.01', 'name': 'downy_birch'}, {'id': 19370, 'synset': 'black_birch.n.02', 'name': 'black_birch'}, {'id': 19371, 'synset': 'sweet_birch.n.01', 'name': 'sweet_birch'}, {'id': 19372, 'synset': 'yukon_white_birch.n.01', 'name': 'Yukon_white_birch'}, {'id': 19373, 'synset': 'swamp_birch.n.01', 'name': 'swamp_birch'}, {'id': 19374, 'synset': 'newfoundland_dwarf_birch.n.01', 'name': 'Newfoundland_dwarf_birch'}, {'id': 19375, 'synset': 'alder.n.02', 'name': 'alder'}, {'id': 19376, 'synset': 'common_alder.n.01', 'name': 'common_alder'}, {'id': 19377, 'synset': 'grey_alder.n.01', 'name': 'grey_alder'}, {'id': 19378, 'synset': 'seaside_alder.n.01', 'name': 'seaside_alder'}, {'id': 19379, 'synset': 'white_alder.n.01', 'name': 'white_alder'}, {'id': 19380, 'synset': 'red_alder.n.01', 'name': 'red_alder'}, {'id': 19381, 'synset': 'speckled_alder.n.01', 'name': 'speckled_alder'}, {'id': 19382, 'synset': 'smooth_alder.n.01', 'name': 'smooth_alder'}, {'id': 19383, 'synset': 'green_alder.n.02', 'name': 'green_alder'}, {'id': 19384, 'synset': 'green_alder.n.01', 'name': 'green_alder'}, {'id': 19385, 'synset': 'hornbeam.n.01', 'name': 'hornbeam'}, {'id': 19386, 'synset': 'european_hornbeam.n.01', 'name': 'European_hornbeam'}, {'id': 19387, 'synset': 'american_hornbeam.n.01', 'name': 'American_hornbeam'}, {'id': 19388, 'synset': 'hop_hornbeam.n.01', 'name': 'hop_hornbeam'}, {'id': 19389, 'synset': 'old_world_hop_hornbeam.n.01', 'name': 'Old_World_hop_hornbeam'}, {'id': 19390, 'synset': 'eastern_hop_hornbeam.n.01', 'name': 'Eastern_hop_hornbeam'}, {'id': 19391, 'synset': 'hazelnut.n.01', 'name': 'hazelnut'}, {'id': 19392, 'synset': 'american_hazel.n.01', 'name': 'American_hazel'}, {'id': 19393, 'synset': 'cobnut.n.01', 'name': 'cobnut'}, {'id': 19394, 'synset': 'beaked_hazelnut.n.01', 'name': 'beaked_hazelnut'}, {'id': 19395, 'synset': 'centaury.n.01', 'name': 'centaury'}, {'id': 19396, 'synset': 'rosita.n.01', 'name': 'rosita'}, {'id': 19397, 'synset': 'lesser_centaury.n.01', 'name': 'lesser_centaury'}, {'id': 19398, 'synset': 'seaside_centaury.n.01', 'name': 'seaside_centaury'}, {'id': 19399, 'synset': 'slender_centaury.n.01', 'name': 'slender_centaury'}, {'id': 19400, 'synset': 'prairie_gentian.n.01', 'name': 'prairie_gentian'}, {'id': 19401, 'synset': 'persian_violet.n.01', 'name': 'Persian_violet'}, {'id': 19402, 'synset': 'columbo.n.01', 'name': 'columbo'}, {'id': 19403, 'synset': 'gentian.n.01', 'name': 'gentian'}, {'id': 19404, 'synset': 'gentianella.n.02', 'name': 'gentianella'}, {'id': 19405, 'synset': 'closed_gentian.n.02', 'name': 'closed_gentian'}, {'id': 19406, 'synset': "explorer's_gentian.n.01", 'name': "explorer's_gentian"}, {'id': 19407, 'synset': 'closed_gentian.n.01', 'name': 'closed_gentian'}, {'id': 19408, 'synset': 'great_yellow_gentian.n.01', 'name': 'great_yellow_gentian'}, {'id': 19409, 'synset': 'marsh_gentian.n.01', 'name': 'marsh_gentian'}, {'id': 19410, 'synset': 'soapwort_gentian.n.01', 'name': 'soapwort_gentian'}, {'id': 19411, 'synset': 'striped_gentian.n.01', 'name': 'striped_gentian'}, {'id': 19412, 'synset': 'agueweed.n.01', 'name': 'agueweed'}, {'id': 19413, 'synset': 'felwort.n.01', 'name': 'felwort'}, {'id': 19414, 'synset': 'fringed_gentian.n.01', 'name': 'fringed_gentian'}, {'id': 19415, 'synset': 'gentianopsis_crinita.n.01', 'name': 'Gentianopsis_crinita'}, {'id': 19416, 'synset': 'gentianopsis_detonsa.n.01', 'name': 'Gentianopsis_detonsa'}, {'id': 19417, 'synset': 'gentianopsid_procera.n.01', 'name': 'Gentianopsid_procera'}, {'id': 19418, 'synset': 'gentianopsis_thermalis.n.01', 'name': 'Gentianopsis_thermalis'}, {'id': 19419, 'synset': 'tufted_gentian.n.01', 'name': 'tufted_gentian'}, {'id': 19420, 'synset': 'spurred_gentian.n.01', 'name': 'spurred_gentian'}, {'id': 19421, 'synset': 'sabbatia.n.01', 'name': 'sabbatia'}, {'id': 19422, 'synset': 'toothbrush_tree.n.01', 'name': 'toothbrush_tree'}, {'id': 19423, 'synset': 'olive_tree.n.01', 'name': 'olive_tree'}, {'id': 19424, 'synset': 'olive.n.02', 'name': 'olive'}, {'id': 19425, 'synset': 'olive.n.01', 'name': 'olive'}, {'id': 19426, 'synset': 'black_maire.n.01', 'name': 'black_maire'}, {'id': 19427, 'synset': 'white_maire.n.01', 'name': 'white_maire'}, {'id': 19428, 'synset': 'fringe_tree.n.01', 'name': 'fringe_tree'}, {'id': 19429, 'synset': 'fringe_bush.n.01', 'name': 'fringe_bush'}, {'id': 19430, 'synset': 'forestiera.n.01', 'name': 'forestiera'}, {'id': 19431, 'synset': 'forsythia.n.01', 'name': 'forsythia'}, {'id': 19432, 'synset': 'ash.n.02', 'name': 'ash'}, {'id': 19433, 'synset': 'white_ash.n.02', 'name': 'white_ash'}, {'id': 19434, 'synset': 'swamp_ash.n.01', 'name': 'swamp_ash'}, {'id': 19435, 'synset': 'flowering_ash.n.03', 'name': 'flowering_ash'}, {'id': 19436, 'synset': 'european_ash.n.01', 'name': 'European_ash'}, {'id': 19437, 'synset': 'oregon_ash.n.01', 'name': 'Oregon_ash'}, {'id': 19438, 'synset': 'black_ash.n.01', 'name': 'black_ash'}, {'id': 19439, 'synset': 'manna_ash.n.01', 'name': 'manna_ash'}, {'id': 19440, 'synset': 'red_ash.n.01', 'name': 'red_ash'}, {'id': 19441, 'synset': 'green_ash.n.01', 'name': 'green_ash'}, {'id': 19442, 'synset': 'blue_ash.n.01', 'name': 'blue_ash'}, {'id': 19443, 'synset': 'mountain_ash.n.03', 'name': 'mountain_ash'}, {'id': 19444, 'synset': 'pumpkin_ash.n.01', 'name': 'pumpkin_ash'}, {'id': 19445, 'synset': 'arizona_ash.n.01', 'name': 'Arizona_ash'}, {'id': 19446, 'synset': 'jasmine.n.01', 'name': 'jasmine'}, {'id': 19447, 'synset': 'primrose_jasmine.n.01', 'name': 'primrose_jasmine'}, {'id': 19448, 'synset': 'winter_jasmine.n.01', 'name': 'winter_jasmine'}, {'id': 19449, 'synset': 'common_jasmine.n.01', 'name': 'common_jasmine'}, {'id': 19450, 'synset': 'privet.n.01', 'name': 'privet'}, {'id': 19451, 'synset': 'amur_privet.n.01', 'name': 'Amur_privet'}, {'id': 19452, 'synset': 'japanese_privet.n.01', 'name': 'Japanese_privet'}, {'id': 19453, 'synset': 'ligustrum_obtusifolium.n.01', 'name': 'Ligustrum_obtusifolium'}, {'id': 19454, 'synset': 'common_privet.n.01', 'name': 'common_privet'}, {'id': 19455, 'synset': 'devilwood.n.01', 'name': 'devilwood'}, {'id': 19456, 'synset': 'mock_privet.n.01', 'name': 'mock_privet'}, {'id': 19457, 'synset': 'lilac.n.01', 'name': 'lilac'}, {'id': 19458, 'synset': 'himalayan_lilac.n.01', 'name': 'Himalayan_lilac'}, {'id': 19459, 'synset': 'persian_lilac.n.02', 'name': 'Persian_lilac'}, {'id': 19460, 'synset': 'japanese_tree_lilac.n.01', 'name': 'Japanese_tree_lilac'}, {'id': 19461, 'synset': 'japanese_lilac.n.01', 'name': 'Japanese_lilac'}, {'id': 19462, 'synset': 'common_lilac.n.01', 'name': 'common_lilac'}, {'id': 19463, 'synset': 'bloodwort.n.01', 'name': 'bloodwort'}, {'id': 19464, 'synset': 'kangaroo_paw.n.01', 'name': 'kangaroo_paw'}, {'id': 19465, 'synset': 'virginian_witch_hazel.n.01', 'name': 'Virginian_witch_hazel'}, {'id': 19466, 'synset': 'vernal_witch_hazel.n.01', 'name': 'vernal_witch_hazel'}, {'id': 19467, 'synset': 'winter_hazel.n.01', 'name': 'winter_hazel'}, {'id': 19468, 'synset': 'fothergilla.n.01', 'name': 'fothergilla'}, {'id': 19469, 'synset': 'liquidambar.n.02', 'name': 'liquidambar'}, {'id': 19470, 'synset': 'sweet_gum.n.03', 'name': 'sweet_gum'}, {'id': 19471, 'synset': 'iron_tree.n.01', 'name': 'iron_tree'}, {'id': 19472, 'synset': 'walnut.n.03', 'name': 'walnut'}, {'id': 19473, 'synset': 'california_black_walnut.n.01', 'name': 'California_black_walnut'}, {'id': 19474, 'synset': 'butternut.n.01', 'name': 'butternut'}, {'id': 19475, 'synset': 'black_walnut.n.01', 'name': 'black_walnut'}, {'id': 19476, 'synset': 'english_walnut.n.01', 'name': 'English_walnut'}, {'id': 19477, 'synset': 'hickory.n.02', 'name': 'hickory'}, {'id': 19478, 'synset': 'water_hickory.n.01', 'name': 'water_hickory'}, {'id': 19479, 'synset': 'pignut.n.01', 'name': 'pignut'}, {'id': 19480, 'synset': 'bitternut.n.01', 'name': 'bitternut'}, {'id': 19481, 'synset': 'pecan.n.02', 'name': 'pecan'}, {'id': 19482, 'synset': 'big_shellbark.n.01', 'name': 'big_shellbark'}, {'id': 19483, 'synset': 'nutmeg_hickory.n.01', 'name': 'nutmeg_hickory'}, {'id': 19484, 'synset': 'shagbark.n.01', 'name': 'shagbark'}, {'id': 19485, 'synset': 'mockernut.n.01', 'name': 'mockernut'}, {'id': 19486, 'synset': 'wing_nut.n.01', 'name': 'wing_nut'}, {'id': 19487, 'synset': 'caucasian_walnut.n.01', 'name': 'Caucasian_walnut'}, {'id': 19488, 'synset': 'dhawa.n.01', 'name': 'dhawa'}, {'id': 19489, 'synset': 'combretum.n.01', 'name': 'combretum'}, {'id': 19490, 'synset': 'hiccup_nut.n.01', 'name': 'hiccup_nut'}, {'id': 19491, 'synset': 'bush_willow.n.02', 'name': 'bush_willow'}, {'id': 19492, 'synset': 'bush_willow.n.01', 'name': 'bush_willow'}, {'id': 19493, 'synset': 'button_tree.n.01', 'name': 'button_tree'}, {'id': 19494, 'synset': 'white_mangrove.n.02', 'name': 'white_mangrove'}, {'id': 19495, 'synset': 'oleaster.n.01', 'name': 'oleaster'}, {'id': 19496, 'synset': 'water_milfoil.n.01', 'name': 'water_milfoil'}, {'id': 19497, 'synset': 'anchovy_pear.n.01', 'name': 'anchovy_pear'}, {'id': 19498, 'synset': 'brazil_nut.n.01', 'name': 'brazil_nut'}, {'id': 19499, 'synset': 'loosestrife.n.01', 'name': 'loosestrife'}, {'id': 19500, 'synset': 'purple_loosestrife.n.01', 'name': 'purple_loosestrife'}, {'id': 19501, 'synset': 'grass_poly.n.01', 'name': 'grass_poly'}, {'id': 19502, 'synset': 'crape_myrtle.n.01', 'name': 'crape_myrtle'}, {'id': 19503, 'synset': "queen's_crape_myrtle.n.01", 'name': "Queen's_crape_myrtle"}, {'id': 19504, 'synset': 'myrtaceous_tree.n.01', 'name': 'myrtaceous_tree'}, {'id': 19505, 'synset': 'myrtle.n.02', 'name': 'myrtle'}, {'id': 19506, 'synset': 'common_myrtle.n.01', 'name': 'common_myrtle'}, {'id': 19507, 'synset': 'bayberry.n.01', 'name': 'bayberry'}, {'id': 19508, 'synset': 'allspice.n.01', 'name': 'allspice'}, {'id': 19509, 'synset': 'allspice_tree.n.01', 'name': 'allspice_tree'}, {'id': 19510, 'synset': 'sour_cherry.n.02', 'name': 'sour_cherry'}, {'id': 19511, 'synset': 'nakedwood.n.02', 'name': 'nakedwood'}, {'id': 19512, 'synset': 'surinam_cherry.n.02', 'name': 'Surinam_cherry'}, {'id': 19513, 'synset': 'rose_apple.n.01', 'name': 'rose_apple'}, {'id': 19514, 'synset': 'feijoa.n.01', 'name': 'feijoa'}, {'id': 19515, 'synset': 'jaboticaba.n.01', 'name': 'jaboticaba'}, {'id': 19516, 'synset': 'guava.n.02', 'name': 'guava'}, {'id': 19517, 'synset': 'guava.n.01', 'name': 'guava'}, {'id': 19518, 'synset': 'cattley_guava.n.01', 'name': 'cattley_guava'}, {'id': 19519, 'synset': 'brazilian_guava.n.01', 'name': 'Brazilian_guava'}, {'id': 19520, 'synset': 'gum_tree.n.01', 'name': 'gum_tree'}, {'id': 19521, 'synset': 'eucalyptus.n.02', 'name': 'eucalyptus'}, {'id': 19522, 'synset': 'flooded_gum.n.01', 'name': 'flooded_gum'}, {'id': 19523, 'synset': 'mallee.n.01', 'name': 'mallee'}, {'id': 19524, 'synset': 'stringybark.n.01', 'name': 'stringybark'}, {'id': 19525, 'synset': 'smoothbark.n.01', 'name': 'smoothbark'}, {'id': 19526, 'synset': 'red_gum.n.03', 'name': 'red_gum'}, {'id': 19527, 'synset': 'red_gum.n.02', 'name': 'red_gum'}, {'id': 19528, 'synset': 'river_red_gum.n.01', 'name': 'river_red_gum'}, {'id': 19529, 'synset': 'mountain_swamp_gum.n.01', 'name': 'mountain_swamp_gum'}, {'id': 19530, 'synset': 'snow_gum.n.01', 'name': 'snow_gum'}, {'id': 19531, 'synset': 'alpine_ash.n.01', 'name': 'alpine_ash'}, {'id': 19532, 'synset': 'white_mallee.n.01', 'name': 'white_mallee'}, {'id': 19533, 'synset': 'white_stringybark.n.01', 'name': 'white_stringybark'}, {'id': 19534, 'synset': 'white_mountain_ash.n.01', 'name': 'white_mountain_ash'}, {'id': 19535, 'synset': 'blue_gum.n.01', 'name': 'blue_gum'}, {'id': 19536, 'synset': 'rose_gum.n.01', 'name': 'rose_gum'}, {'id': 19537, 'synset': 'cider_gum.n.01', 'name': 'cider_gum'}, {'id': 19538, 'synset': 'swamp_gum.n.01', 'name': 'swamp_gum'}, {'id': 19539, 'synset': 'spotted_gum.n.01', 'name': 'spotted_gum'}, {'id': 19540, 'synset': 'lemon-scented_gum.n.01', 'name': 'lemon-scented_gum'}, {'id': 19541, 'synset': 'black_mallee.n.01', 'name': 'black_mallee'}, {'id': 19542, 'synset': 'forest_red_gum.n.01', 'name': 'forest_red_gum'}, {'id': 19543, 'synset': 'mountain_ash.n.02', 'name': 'mountain_ash'}, {'id': 19544, 'synset': 'manna_gum.n.01', 'name': 'manna_gum'}, {'id': 19545, 'synset': 'clove.n.02', 'name': 'clove'}, {'id': 19546, 'synset': 'clove.n.01', 'name': 'clove'}, {'id': 19547, 'synset': 'tupelo.n.02', 'name': 'tupelo'}, {'id': 19548, 'synset': 'water_gum.n.01', 'name': 'water_gum'}, {'id': 19549, 'synset': 'sour_gum.n.01', 'name': 'sour_gum'}, {'id': 19550, 'synset': "enchanter's_nightshade.n.01", 'name': "enchanter's_nightshade"}, {'id': 19551, 'synset': 'circaea_lutetiana.n.01', 'name': 'Circaea_lutetiana'}, {'id': 19552, 'synset': 'willowherb.n.01', 'name': 'willowherb'}, {'id': 19553, 'synset': 'fireweed.n.01', 'name': 'fireweed'}, {'id': 19554, 'synset': 'california_fuchsia.n.01', 'name': 'California_fuchsia'}, {'id': 19555, 'synset': 'fuchsia.n.01', 'name': 'fuchsia'}, {'id': 19556, 'synset': "lady's-eardrop.n.01", 'name': "lady's-eardrop"}, {'id': 19557, 'synset': 'evening_primrose.n.01', 'name': 'evening_primrose'}, {'id': 19558, 'synset': 'common_evening_primrose.n.01', 'name': 'common_evening_primrose'}, {'id': 19559, 'synset': 'sundrops.n.01', 'name': 'sundrops'}, {'id': 19560, 'synset': 'missouri_primrose.n.01', 'name': 'Missouri_primrose'}, {'id': 19561, 'synset': 'pomegranate.n.01', 'name': 'pomegranate'}, {'id': 19562, 'synset': 'mangrove.n.01', 'name': 'mangrove'}, {'id': 19563, 'synset': 'daphne.n.01', 'name': 'daphne'}, {'id': 19564, 'synset': 'garland_flower.n.01', 'name': 'garland_flower'}, {'id': 19565, 'synset': 'spurge_laurel.n.01', 'name': 'spurge_laurel'}, {'id': 19566, 'synset': 'mezereon.n.01', 'name': 'mezereon'}, {'id': 19567, 'synset': 'indian_rhododendron.n.01', 'name': 'Indian_rhododendron'}, {'id': 19568, 'synset': 'medinilla_magnifica.n.01', 'name': 'Medinilla_magnifica'}, {'id': 19569, 'synset': 'deer_grass.n.01', 'name': 'deer_grass'}, {'id': 19570, 'synset': 'canna.n.01', 'name': 'canna'}, {'id': 19571, 'synset': 'achira.n.01', 'name': 'achira'}, {'id': 19572, 'synset': 'arrowroot.n.02', 'name': 'arrowroot'}, {'id': 19573, 'synset': 'banana.n.01', 'name': 'banana'}, {'id': 19574, 'synset': 'dwarf_banana.n.01', 'name': 'dwarf_banana'}, {'id': 19575, 'synset': 'japanese_banana.n.01', 'name': 'Japanese_banana'}, {'id': 19576, 'synset': 'plantain.n.02', 'name': 'plantain'}, {'id': 19577, 'synset': 'edible_banana.n.01', 'name': 'edible_banana'}, {'id': 19578, 'synset': 'abaca.n.02', 'name': 'abaca'}, {'id': 19579, 'synset': 'abyssinian_banana.n.01', 'name': 'Abyssinian_banana'}, {'id': 19580, 'synset': 'ginger.n.01', 'name': 'ginger'}, {'id': 19581, 'synset': 'common_ginger.n.01', 'name': 'common_ginger'}, {'id': 19582, 'synset': 'turmeric.n.01', 'name': 'turmeric'}, {'id': 19583, 'synset': 'galangal.n.01', 'name': 'galangal'}, {'id': 19584, 'synset': 'shellflower.n.02', 'name': 'shellflower'}, {'id': 19585, 'synset': 'grains_of_paradise.n.01', 'name': 'grains_of_paradise'}, {'id': 19586, 'synset': 'cardamom.n.01', 'name': 'cardamom'}, {'id': 19587, 'synset': 'begonia.n.01', 'name': 'begonia'}, {'id': 19588, 'synset': 'fibrous-rooted_begonia.n.01', 'name': 'fibrous-rooted_begonia'}, {'id': 19589, 'synset': 'tuberous_begonia.n.01', 'name': 'tuberous_begonia'}, {'id': 19590, 'synset': 'rhizomatous_begonia.n.01', 'name': 'rhizomatous_begonia'}, {'id': 19591, 'synset': 'christmas_begonia.n.01', 'name': 'Christmas_begonia'}, {'id': 19592, 'synset': 'angel-wing_begonia.n.01', 'name': 'angel-wing_begonia'}, {'id': 19593, 'synset': 'beefsteak_begonia.n.01', 'name': 'beefsteak_begonia'}, {'id': 19594, 'synset': 'star_begonia.n.01', 'name': 'star_begonia'}, {'id': 19595, 'synset': 'rex_begonia.n.01', 'name': 'rex_begonia'}, {'id': 19596, 'synset': 'wax_begonia.n.01', 'name': 'wax_begonia'}, {'id': 19597, 'synset': 'socotra_begonia.n.01', 'name': 'Socotra_begonia'}, {'id': 19598, 'synset': 'hybrid_tuberous_begonia.n.01', 'name': 'hybrid_tuberous_begonia'}, {'id': 19599, 'synset': 'dillenia.n.01', 'name': 'dillenia'}, {'id': 19600, 'synset': 'guinea_gold_vine.n.01', 'name': 'guinea_gold_vine'}, {'id': 19601, 'synset': 'poon.n.02', 'name': 'poon'}, {'id': 19602, 'synset': 'calaba.n.01', 'name': 'calaba'}, {'id': 19603, 'synset': 'maria.n.02', 'name': 'Maria'}, {'id': 19604, 'synset': 'laurelwood.n.01', 'name': 'laurelwood'}, {'id': 19605, 'synset': 'alexandrian_laurel.n.01', 'name': 'Alexandrian_laurel'}, {'id': 19606, 'synset': 'clusia.n.01', 'name': 'clusia'}, {'id': 19607, 'synset': 'wild_fig.n.02', 'name': 'wild_fig'}, {'id': 19608, 'synset': 'waxflower.n.02', 'name': 'waxflower'}, {'id': 19609, 'synset': 'pitch_apple.n.01', 'name': 'pitch_apple'}, {'id': 19610, 'synset': 'mangosteen.n.01', 'name': 'mangosteen'}, {'id': 19611, 'synset': 'gamboge_tree.n.01', 'name': 'gamboge_tree'}, {'id': 19612, 'synset': "st_john's_wort.n.01", 'name': "St_John's_wort"}, {'id': 19613, 'synset': "common_st_john's_wort.n.01", 'name': "common_St_John's_wort"}, {'id': 19614, 'synset': "great_st_john's_wort.n.01", 'name': "great_St_John's_wort"}, {'id': 19615, 'synset': "creeping_st_john's_wort.n.01", 'name': "creeping_St_John's_wort"}, {'id': 19616, 'synset': "low_st_andrew's_cross.n.01", 'name': "low_St_Andrew's_cross"}, {'id': 19617, 'synset': 'klammath_weed.n.01', 'name': 'klammath_weed'}, {'id': 19618, 'synset': "shrubby_st_john's_wort.n.01", 'name': "shrubby_St_John's_wort"}, {'id': 19619, 'synset': "st_peter's_wort.n.01", 'name': "St_Peter's_wort"}, {'id': 19620, 'synset': "marsh_st-john's_wort.n.01", 'name': "marsh_St-John's_wort"}, {'id': 19621, 'synset': 'mammee_apple.n.01', 'name': 'mammee_apple'}, {'id': 19622, 'synset': 'rose_chestnut.n.01', 'name': 'rose_chestnut'}, {'id': 19623, 'synset': 'bower_actinidia.n.01', 'name': 'bower_actinidia'}, {'id': 19624, 'synset': 'chinese_gooseberry.n.01', 'name': 'Chinese_gooseberry'}, {'id': 19625, 'synset': 'silvervine.n.01', 'name': 'silvervine'}, {'id': 19626, 'synset': 'wild_cinnamon.n.01', 'name': 'wild_cinnamon'}, {'id': 19627, 'synset': 'papaya.n.01', 'name': 'papaya'}, {'id': 19628, 'synset': 'souari.n.01', 'name': 'souari'}, {'id': 19629, 'synset': 'rockrose.n.02', 'name': 'rockrose'}, {'id': 19630, 'synset': 'white-leaved_rockrose.n.01', 'name': 'white-leaved_rockrose'}, {'id': 19631, 'synset': 'common_gum_cistus.n.01', 'name': 'common_gum_cistus'}, {'id': 19632, 'synset': 'frostweed.n.01', 'name': 'frostweed'}, {'id': 19633, 'synset': 'dipterocarp.n.01', 'name': 'dipterocarp'}, {'id': 19634, 'synset': 'red_lauan.n.02', 'name': 'red_lauan'}, {'id': 19635, 'synset': "governor's_plum.n.01", 'name': "governor's_plum"}, {'id': 19636, 'synset': 'kei_apple.n.01', 'name': 'kei_apple'}, {'id': 19637, 'synset': 'ketembilla.n.01', 'name': 'ketembilla'}, {'id': 19638, 'synset': 'chaulmoogra.n.01', 'name': 'chaulmoogra'}, {'id': 19639, 'synset': 'wild_peach.n.01', 'name': 'wild_peach'}, {'id': 19640, 'synset': 'candlewood.n.01', 'name': 'candlewood'}, {'id': 19641, 'synset': 'boojum_tree.n.01', 'name': 'boojum_tree'}, {'id': 19642, 'synset': "bird's-eye_bush.n.01", 'name': "bird's-eye_bush"}, {'id': 19643, 'synset': 'granadilla.n.03', 'name': 'granadilla'}, {'id': 19644, 'synset': 'granadilla.n.02', 'name': 'granadilla'}, {'id': 19645, 'synset': 'granadilla.n.01', 'name': 'granadilla'}, {'id': 19646, 'synset': 'maypop.n.01', 'name': 'maypop'}, {'id': 19647, 'synset': 'jamaica_honeysuckle.n.01', 'name': 'Jamaica_honeysuckle'}, {'id': 19648, 'synset': 'banana_passion_fruit.n.01', 'name': 'banana_passion_fruit'}, {'id': 19649, 'synset': 'sweet_calabash.n.01', 'name': 'sweet_calabash'}, {'id': 19650, 'synset': 'love-in-a-mist.n.01', 'name': 'love-in-a-mist'}, {'id': 19651, 'synset': 'reseda.n.01', 'name': 'reseda'}, {'id': 19652, 'synset': 'mignonette.n.01', 'name': 'mignonette'}, {'id': 19653, 'synset': "dyer's_rocket.n.01", 'name': "dyer's_rocket"}, {'id': 19654, 'synset': 'false_tamarisk.n.01', 'name': 'false_tamarisk'}, {'id': 19655, 'synset': 'halophyte.n.01', 'name': 'halophyte'}, {'id': 19656, 'synset': 'viola.n.01', 'name': 'viola'}, {'id': 19657, 'synset': 'violet.n.01', 'name': 'violet'}, {'id': 19658, 'synset': 'field_pansy.n.01', 'name': 'field_pansy'}, {'id': 19659, 'synset': 'american_dog_violet.n.01', 'name': 'American_dog_violet'}, {'id': 19660, 'synset': 'dog_violet.n.01', 'name': 'dog_violet'}, {'id': 19661, 'synset': 'horned_violet.n.01', 'name': 'horned_violet'}, {'id': 19662, 'synset': 'two-eyed_violet.n.01', 'name': 'two-eyed_violet'}, {'id': 19663, 'synset': "bird's-foot_violet.n.01", 'name': "bird's-foot_violet"}, {'id': 19664, 'synset': 'downy_yellow_violet.n.01', 'name': 'downy_yellow_violet'}, {'id': 19665, 'synset': 'long-spurred_violet.n.01', 'name': 'long-spurred_violet'}, {'id': 19666, 'synset': 'pale_violet.n.01', 'name': 'pale_violet'}, {'id': 19667, 'synset': 'hedge_violet.n.01', 'name': 'hedge_violet'}, {'id': 19668, 'synset': 'nettle.n.01', 'name': 'nettle'}, {'id': 19669, 'synset': 'stinging_nettle.n.01', 'name': 'stinging_nettle'}, {'id': 19670, 'synset': 'roman_nettle.n.01', 'name': 'Roman_nettle'}, {'id': 19671, 'synset': 'ramie.n.01', 'name': 'ramie'}, {'id': 19672, 'synset': 'wood_nettle.n.01', 'name': 'wood_nettle'}, {'id': 19673, 'synset': 'australian_nettle.n.01', 'name': 'Australian_nettle'}, {'id': 19674, 'synset': 'pellitory-of-the-wall.n.01', 'name': 'pellitory-of-the-wall'}, {'id': 19675, 'synset': 'richweed.n.02', 'name': 'richweed'}, {'id': 19676, 'synset': 'artillery_plant.n.01', 'name': 'artillery_plant'}, {'id': 19677, 'synset': 'friendship_plant.n.01', 'name': 'friendship_plant'}, {'id': 19678, 'synset': 'queensland_grass-cloth_plant.n.01', 'name': 'Queensland_grass-cloth_plant'}, {'id': 19679, 'synset': 'pipturus_albidus.n.01', 'name': 'Pipturus_albidus'}, {'id': 19680, 'synset': 'cannabis.n.01', 'name': 'cannabis'}, {'id': 19681, 'synset': 'indian_hemp.n.01', 'name': 'Indian_hemp'}, {'id': 19682, 'synset': 'mulberry.n.01', 'name': 'mulberry'}, {'id': 19683, 'synset': 'white_mulberry.n.01', 'name': 'white_mulberry'}, {'id': 19684, 'synset': 'black_mulberry.n.01', 'name': 'black_mulberry'}, {'id': 19685, 'synset': 'red_mulberry.n.01', 'name': 'red_mulberry'}, {'id': 19686, 'synset': 'osage_orange.n.01', 'name': 'osage_orange'}, {'id': 19687, 'synset': 'breadfruit.n.01', 'name': 'breadfruit'}, {'id': 19688, 'synset': 'jackfruit.n.01', 'name': 'jackfruit'}, {'id': 19689, 'synset': 'marang.n.01', 'name': 'marang'}, {'id': 19690, 'synset': 'fig_tree.n.01', 'name': 'fig_tree'}, {'id': 19691, 'synset': 'fig.n.02', 'name': 'fig'}, {'id': 19692, 'synset': 'caprifig.n.01', 'name': 'caprifig'}, {'id': 19693, 'synset': 'golden_fig.n.01', 'name': 'golden_fig'}, {'id': 19694, 'synset': 'banyan.n.01', 'name': 'banyan'}, {'id': 19695, 'synset': 'pipal.n.01', 'name': 'pipal'}, {'id': 19696, 'synset': 'india-rubber_tree.n.01', 'name': 'India-rubber_tree'}, {'id': 19697, 'synset': 'mistletoe_fig.n.01', 'name': 'mistletoe_fig'}, {'id': 19698, 'synset': 'port_jackson_fig.n.01', 'name': 'Port_Jackson_fig'}, {'id': 19699, 'synset': 'sycamore.n.04', 'name': 'sycamore'}, {'id': 19700, 'synset': 'paper_mulberry.n.01', 'name': 'paper_mulberry'}, {'id': 19701, 'synset': 'trumpetwood.n.01', 'name': 'trumpetwood'}, {'id': 19702, 'synset': 'elm.n.01', 'name': 'elm'}, {'id': 19703, 'synset': 'winged_elm.n.01', 'name': 'winged_elm'}, {'id': 19704, 'synset': 'american_elm.n.01', 'name': 'American_elm'}, {'id': 19705, 'synset': 'smooth-leaved_elm.n.01', 'name': 'smooth-leaved_elm'}, {'id': 19706, 'synset': 'cedar_elm.n.01', 'name': 'cedar_elm'}, {'id': 19707, 'synset': 'witch_elm.n.01', 'name': 'witch_elm'}, {'id': 19708, 'synset': 'dutch_elm.n.01', 'name': 'Dutch_elm'}, {'id': 19709, 'synset': 'huntingdon_elm.n.01', 'name': 'Huntingdon_elm'}, {'id': 19710, 'synset': 'water_elm.n.01', 'name': 'water_elm'}, {'id': 19711, 'synset': 'chinese_elm.n.02', 'name': 'Chinese_elm'}, {'id': 19712, 'synset': 'english_elm.n.01', 'name': 'English_elm'}, {'id': 19713, 'synset': 'siberian_elm.n.01', 'name': 'Siberian_elm'}, {'id': 19714, 'synset': 'slippery_elm.n.01', 'name': 'slippery_elm'}, {'id': 19715, 'synset': 'jersey_elm.n.01', 'name': 'Jersey_elm'}, {'id': 19716, 'synset': 'september_elm.n.01', 'name': 'September_elm'}, {'id': 19717, 'synset': 'rock_elm.n.01', 'name': 'rock_elm'}, {'id': 19718, 'synset': 'hackberry.n.01', 'name': 'hackberry'}, {'id': 19719, 'synset': 'european_hackberry.n.01', 'name': 'European_hackberry'}, {'id': 19720, 'synset': 'american_hackberry.n.01', 'name': 'American_hackberry'}, {'id': 19721, 'synset': 'sugarberry.n.01', 'name': 'sugarberry'}, {'id': 19722, 'synset': 'iridaceous_plant.n.01', 'name': 'iridaceous_plant'}, {'id': 19723, 'synset': 'bearded_iris.n.01', 'name': 'bearded_iris'}, {'id': 19724, 'synset': 'beardless_iris.n.01', 'name': 'beardless_iris'}, {'id': 19725, 'synset': 'orrisroot.n.01', 'name': 'orrisroot'}, {'id': 19726, 'synset': 'dwarf_iris.n.02', 'name': 'dwarf_iris'}, {'id': 19727, 'synset': 'dutch_iris.n.02', 'name': 'Dutch_iris'}, {'id': 19728, 'synset': 'florentine_iris.n.01', 'name': 'Florentine_iris'}, {'id': 19729, 'synset': 'stinking_iris.n.01', 'name': 'stinking_iris'}, {'id': 19730, 'synset': 'german_iris.n.02', 'name': 'German_iris'}, {'id': 19731, 'synset': 'japanese_iris.n.01', 'name': 'Japanese_iris'}, {'id': 19732, 'synset': 'german_iris.n.01', 'name': 'German_iris'}, {'id': 19733, 'synset': 'dalmatian_iris.n.01', 'name': 'Dalmatian_iris'}, {'id': 19734, 'synset': 'persian_iris.n.01', 'name': 'Persian_iris'}, {'id': 19735, 'synset': 'dutch_iris.n.01', 'name': 'Dutch_iris'}, {'id': 19736, 'synset': 'dwarf_iris.n.01', 'name': 'dwarf_iris'}, {'id': 19737, 'synset': 'spanish_iris.n.01', 'name': 'Spanish_iris'}, {'id': 19738, 'synset': 'blackberry-lily.n.01', 'name': 'blackberry-lily'}, {'id': 19739, 'synset': 'crocus.n.01', 'name': 'crocus'}, {'id': 19740, 'synset': 'saffron.n.01', 'name': 'saffron'}, {'id': 19741, 'synset': 'corn_lily.n.01', 'name': 'corn_lily'}, {'id': 19742, 'synset': 'blue-eyed_grass.n.01', 'name': 'blue-eyed_grass'}, {'id': 19743, 'synset': 'wandflower.n.01', 'name': 'wandflower'}, {'id': 19744, 'synset': 'amaryllis.n.01', 'name': 'amaryllis'}, {'id': 19745, 'synset': 'salsilla.n.02', 'name': 'salsilla'}, {'id': 19746, 'synset': 'salsilla.n.01', 'name': 'salsilla'}, {'id': 19747, 'synset': 'blood_lily.n.01', 'name': 'blood_lily'}, {'id': 19748, 'synset': 'cape_tulip.n.01', 'name': 'Cape_tulip'}, {'id': 19749, 'synset': 'hippeastrum.n.01', 'name': 'hippeastrum'}, {'id': 19750, 'synset': 'narcissus.n.01', 'name': 'narcissus'}, {'id': 19751, 'synset': 'daffodil.n.01', 'name': 'daffodil'}, {'id': 19752, 'synset': 'jonquil.n.01', 'name': 'jonquil'}, {'id': 19753, 'synset': 'jonquil.n.02', 'name': 'jonquil'}, {'id': 19754, 'synset': 'jacobean_lily.n.01', 'name': 'Jacobean_lily'}, {'id': 19755, 'synset': 'liliaceous_plant.n.01', 'name': 'liliaceous_plant'}, {'id': 19756, 'synset': 'mountain_lily.n.01', 'name': 'mountain_lily'}, {'id': 19757, 'synset': 'canada_lily.n.01', 'name': 'Canada_lily'}, {'id': 19758, 'synset': 'tiger_lily.n.02', 'name': 'tiger_lily'}, {'id': 19759, 'synset': 'columbia_tiger_lily.n.01', 'name': 'Columbia_tiger_lily'}, {'id': 19760, 'synset': 'tiger_lily.n.01', 'name': 'tiger_lily'}, {'id': 19761, 'synset': 'easter_lily.n.01', 'name': 'Easter_lily'}, {'id': 19762, 'synset': 'coast_lily.n.01', 'name': 'coast_lily'}, {'id': 19763, 'synset': "turk's-cap.n.02", 'name': "Turk's-cap"}, {'id': 19764, 'synset': 'michigan_lily.n.01', 'name': 'Michigan_lily'}, {'id': 19765, 'synset': 'leopard_lily.n.01', 'name': 'leopard_lily'}, {'id': 19766, 'synset': "turk's-cap.n.01", 'name': "Turk's-cap"}, {'id': 19767, 'synset': 'african_lily.n.01', 'name': 'African_lily'}, {'id': 19768, 'synset': 'colicroot.n.01', 'name': 'colicroot'}, {'id': 19769, 'synset': 'ague_root.n.01', 'name': 'ague_root'}, {'id': 19770, 'synset': 'yellow_colicroot.n.01', 'name': 'yellow_colicroot'}, {'id': 19771, 'synset': 'alliaceous_plant.n.01', 'name': 'alliaceous_plant'}, {'id': 19772, 'synset': "hooker's_onion.n.01", 'name': "Hooker's_onion"}, {'id': 19773, 'synset': 'wild_leek.n.02', 'name': 'wild_leek'}, {'id': 19774, 'synset': 'canada_garlic.n.01', 'name': 'Canada_garlic'}, {'id': 19775, 'synset': 'keeled_garlic.n.01', 'name': 'keeled_garlic'}, {'id': 19776, 'synset': 'shallot.n.02', 'name': 'shallot'}, {'id': 19777, 'synset': 'nodding_onion.n.01', 'name': 'nodding_onion'}, {'id': 19778, 'synset': 'welsh_onion.n.01', 'name': 'Welsh_onion'}, {'id': 19779, 'synset': 'red-skinned_onion.n.01', 'name': 'red-skinned_onion'}, {'id': 19780, 'synset': 'daffodil_garlic.n.01', 'name': 'daffodil_garlic'}, {'id': 19781, 'synset': 'few-flowered_leek.n.01', 'name': 'few-flowered_leek'}, {'id': 19782, 'synset': 'garlic.n.01', 'name': 'garlic'}, {'id': 19783, 'synset': 'sand_leek.n.01', 'name': 'sand_leek'}, {'id': 19784, 'synset': 'chives.n.01', 'name': 'chives'}, {'id': 19785, 'synset': 'crow_garlic.n.01', 'name': 'crow_garlic'}, {'id': 19786, 'synset': 'wild_garlic.n.01', 'name': 'wild_garlic'}, {'id': 19787, 'synset': 'garlic_chive.n.01', 'name': 'garlic_chive'}, {'id': 19788, 'synset': 'round-headed_leek.n.01', 'name': 'round-headed_leek'}, {'id': 19789, 'synset': 'three-cornered_leek.n.01', 'name': 'three-cornered_leek'}, {'id': 19790, 'synset': 'cape_aloe.n.01', 'name': 'cape_aloe'}, {'id': 19791, 'synset': 'kniphofia.n.01', 'name': 'kniphofia'}, {'id': 19792, 'synset': 'poker_plant.n.01', 'name': 'poker_plant'}, {'id': 19793, 'synset': 'red-hot_poker.n.01', 'name': 'red-hot_poker'}, {'id': 19794, 'synset': 'fly_poison.n.01', 'name': 'fly_poison'}, {'id': 19795, 'synset': 'amber_lily.n.01', 'name': 'amber_lily'}, {'id': 19796, 'synset': 'asparagus.n.01', 'name': 'asparagus'}, {'id': 19797, 'synset': 'asparagus_fern.n.01', 'name': 'asparagus_fern'}, {'id': 19798, 'synset': 'smilax.n.02', 'name': 'smilax'}, {'id': 19799, 'synset': 'asphodel.n.01', 'name': 'asphodel'}, {'id': 19800, 'synset': "jacob's_rod.n.01", 'name': "Jacob's_rod"}, {'id': 19801, 'synset': 'aspidistra.n.01', 'name': 'aspidistra'}, {'id': 19802, 'synset': 'coral_drops.n.01', 'name': 'coral_drops'}, {'id': 19803, 'synset': 'christmas_bells.n.01', 'name': 'Christmas_bells'}, {'id': 19804, 'synset': 'climbing_onion.n.01', 'name': 'climbing_onion'}, {'id': 19805, 'synset': 'mariposa.n.01', 'name': 'mariposa'}, {'id': 19806, 'synset': 'globe_lily.n.01', 'name': 'globe_lily'}, {'id': 19807, 'synset': "cat's-ear.n.01", 'name': "cat's-ear"}, {'id': 19808, 'synset': 'white_globe_lily.n.01', 'name': 'white_globe_lily'}, {'id': 19809, 'synset': 'yellow_globe_lily.n.01', 'name': 'yellow_globe_lily'}, {'id': 19810, 'synset': 'rose_globe_lily.n.01', 'name': 'rose_globe_lily'}, {'id': 19811, 'synset': 'star_tulip.n.01', 'name': 'star_tulip'}, {'id': 19812, 'synset': 'desert_mariposa_tulip.n.01', 'name': 'desert_mariposa_tulip'}, {'id': 19813, 'synset': 'yellow_mariposa_tulip.n.01', 'name': 'yellow_mariposa_tulip'}, {'id': 19814, 'synset': 'sagebrush_mariposa_tulip.n.01', 'name': 'sagebrush_mariposa_tulip'}, {'id': 19815, 'synset': 'sego_lily.n.01', 'name': 'sego_lily'}, {'id': 19816, 'synset': 'camas.n.01', 'name': 'camas'}, {'id': 19817, 'synset': 'common_camas.n.01', 'name': 'common_camas'}, {'id': 19818, 'synset': "leichtlin's_camas.n.01", 'name': "Leichtlin's_camas"}, {'id': 19819, 'synset': 'wild_hyacinth.n.02', 'name': 'wild_hyacinth'}, {'id': 19820, 'synset': 'dogtooth_violet.n.01', 'name': 'dogtooth_violet'}, {'id': 19821, 'synset': 'white_dogtooth_violet.n.01', 'name': 'white_dogtooth_violet'}, {'id': 19822, 'synset': "yellow_adder's_tongue.n.01", 'name': "yellow_adder's_tongue"}, {'id': 19823, 'synset': 'european_dogtooth.n.01', 'name': 'European_dogtooth'}, {'id': 19824, 'synset': 'fawn_lily.n.01', 'name': 'fawn_lily'}, {'id': 19825, 'synset': 'glacier_lily.n.01', 'name': 'glacier_lily'}, {'id': 19826, 'synset': 'avalanche_lily.n.01', 'name': 'avalanche_lily'}, {'id': 19827, 'synset': 'fritillary.n.01', 'name': 'fritillary'}, {'id': 19828, 'synset': 'mission_bells.n.02', 'name': 'mission_bells'}, {'id': 19829, 'synset': 'mission_bells.n.01', 'name': 'mission_bells'}, {'id': 19830, 'synset': 'stink_bell.n.01', 'name': 'stink_bell'}, {'id': 19831, 'synset': 'crown_imperial.n.01', 'name': 'crown_imperial'}, {'id': 19832, 'synset': 'white_fritillary.n.01', 'name': 'white_fritillary'}, {'id': 19833, 'synset': "snake's_head_fritillary.n.01", 'name': "snake's_head_fritillary"}, {'id': 19834, 'synset': 'adobe_lily.n.01', 'name': 'adobe_lily'}, {'id': 19835, 'synset': 'scarlet_fritillary.n.01', 'name': 'scarlet_fritillary'}, {'id': 19836, 'synset': 'tulip.n.01', 'name': 'tulip'}, {'id': 19837, 'synset': 'dwarf_tulip.n.01', 'name': 'dwarf_tulip'}, {'id': 19838, 'synset': 'lady_tulip.n.01', 'name': 'lady_tulip'}, {'id': 19839, 'synset': 'tulipa_gesneriana.n.01', 'name': 'Tulipa_gesneriana'}, {'id': 19840, 'synset': 'cottage_tulip.n.01', 'name': 'cottage_tulip'}, {'id': 19841, 'synset': 'darwin_tulip.n.01', 'name': 'Darwin_tulip'}, {'id': 19842, 'synset': 'gloriosa.n.01', 'name': 'gloriosa'}, {'id': 19843, 'synset': 'lemon_lily.n.01', 'name': 'lemon_lily'}, {'id': 19844, 'synset': 'common_hyacinth.n.01', 'name': 'common_hyacinth'}, {'id': 19845, 'synset': 'roman_hyacinth.n.01', 'name': 'Roman_hyacinth'}, {'id': 19846, 'synset': 'summer_hyacinth.n.01', 'name': 'summer_hyacinth'}, {'id': 19847, 'synset': 'star-of-bethlehem.n.01', 'name': 'star-of-Bethlehem'}, {'id': 19848, 'synset': 'bath_asparagus.n.01', 'name': 'bath_asparagus'}, {'id': 19849, 'synset': 'grape_hyacinth.n.01', 'name': 'grape_hyacinth'}, {'id': 19850, 'synset': 'common_grape_hyacinth.n.01', 'name': 'common_grape_hyacinth'}, {'id': 19851, 'synset': 'tassel_hyacinth.n.01', 'name': 'tassel_hyacinth'}, {'id': 19852, 'synset': 'scilla.n.01', 'name': 'scilla'}, {'id': 19853, 'synset': 'spring_squill.n.01', 'name': 'spring_squill'}, {'id': 19854, 'synset': 'false_asphodel.n.01', 'name': 'false_asphodel'}, {'id': 19855, 'synset': 'scotch_asphodel.n.01', 'name': 'Scotch_asphodel'}, {'id': 19856, 'synset': 'sea_squill.n.01', 'name': 'sea_squill'}, {'id': 19857, 'synset': 'squill.n.01', 'name': 'squill'}, {'id': 19858, 'synset': "butcher's_broom.n.01", 'name': "butcher's_broom"}, {'id': 19859, 'synset': 'bog_asphodel.n.01', 'name': 'bog_asphodel'}, {'id': 19860, 'synset': 'european_bog_asphodel.n.01', 'name': 'European_bog_asphodel'}, {'id': 19861, 'synset': 'american_bog_asphodel.n.01', 'name': 'American_bog_asphodel'}, {'id': 19862, 'synset': 'hellebore.n.01', 'name': 'hellebore'}, {'id': 19863, 'synset': 'white_hellebore.n.01', 'name': 'white_hellebore'}, {'id': 19864, 'synset': 'squaw_grass.n.01', 'name': 'squaw_grass'}, {'id': 19865, 'synset': 'death_camas.n.01', 'name': 'death_camas'}, {'id': 19866, 'synset': 'alkali_grass.n.01', 'name': 'alkali_grass'}, {'id': 19867, 'synset': 'white_camas.n.01', 'name': 'white_camas'}, {'id': 19868, 'synset': 'poison_camas.n.01', 'name': 'poison_camas'}, {'id': 19869, 'synset': 'grassy_death_camas.n.01', 'name': 'grassy_death_camas'}, {'id': 19870, 'synset': 'prairie_wake-robin.n.01', 'name': 'prairie_wake-robin'}, {'id': 19871, 'synset': 'dwarf-white_trillium.n.01', 'name': 'dwarf-white_trillium'}, {'id': 19872, 'synset': 'herb_paris.n.01', 'name': 'herb_Paris'}, {'id': 19873, 'synset': 'sarsaparilla.n.01', 'name': 'sarsaparilla'}, {'id': 19874, 'synset': 'bullbrier.n.01', 'name': 'bullbrier'}, {'id': 19875, 'synset': 'rough_bindweed.n.01', 'name': 'rough_bindweed'}, {'id': 19876, 'synset': 'clintonia.n.01', 'name': 'clintonia'}, {'id': 19877, 'synset': 'false_lily_of_the_valley.n.02', 'name': 'false_lily_of_the_valley'}, {'id': 19878, 'synset': 'false_lily_of_the_valley.n.01', 'name': 'false_lily_of_the_valley'}, {'id': 19879, 'synset': "solomon's-seal.n.01", 'name': "Solomon's-seal"}, {'id': 19880, 'synset': "great_solomon's-seal.n.01", 'name': "great_Solomon's-seal"}, {'id': 19881, 'synset': 'bellwort.n.01', 'name': 'bellwort'}, {'id': 19882, 'synset': 'strawflower.n.01', 'name': 'strawflower'}, {'id': 19883, 'synset': 'pia.n.01', 'name': 'pia'}, {'id': 19884, 'synset': 'agave.n.01', 'name': 'agave'}, {'id': 19885, 'synset': 'american_agave.n.01', 'name': 'American_agave'}, {'id': 19886, 'synset': 'sisal.n.02', 'name': 'sisal'}, {'id': 19887, 'synset': 'maguey.n.02', 'name': 'maguey'}, {'id': 19888, 'synset': 'maguey.n.01', 'name': 'maguey'}, {'id': 19889, 'synset': 'agave_tequilana.n.01', 'name': 'Agave_tequilana'}, {'id': 19890, 'synset': 'cabbage_tree.n.03', 'name': 'cabbage_tree'}, {'id': 19891, 'synset': 'dracaena.n.01', 'name': 'dracaena'}, {'id': 19892, 'synset': 'tuberose.n.01', 'name': 'tuberose'}, {'id': 19893, 'synset': 'sansevieria.n.01', 'name': 'sansevieria'}, {'id': 19894, 'synset': 'african_bowstring_hemp.n.01', 'name': 'African_bowstring_hemp'}, {'id': 19895, 'synset': 'ceylon_bowstring_hemp.n.01', 'name': 'Ceylon_bowstring_hemp'}, {'id': 19896, 'synset': "mother-in-law's_tongue.n.01", 'name': "mother-in-law's_tongue"}, {'id': 19897, 'synset': 'spanish_bayonet.n.02', 'name': 'Spanish_bayonet'}, {'id': 19898, 'synset': 'spanish_bayonet.n.01', 'name': 'Spanish_bayonet'}, {'id': 19899, 'synset': 'joshua_tree.n.01', 'name': 'Joshua_tree'}, {'id': 19900, 'synset': 'soapweed.n.01', 'name': 'soapweed'}, {'id': 19901, 'synset': "adam's_needle.n.01", 'name': "Adam's_needle"}, {'id': 19902, 'synset': 'bear_grass.n.02', 'name': 'bear_grass'}, {'id': 19903, 'synset': 'spanish_dagger.n.01', 'name': 'Spanish_dagger'}, {'id': 19904, 'synset': "our_lord's_candle.n.01", 'name': "Our_Lord's_candle"}, {'id': 19905, 'synset': 'water_shamrock.n.01', 'name': 'water_shamrock'}, {'id': 19906, 'synset': 'butterfly_bush.n.01', 'name': 'butterfly_bush'}, {'id': 19907, 'synset': 'yellow_jasmine.n.01', 'name': 'yellow_jasmine'}, {'id': 19908, 'synset': 'flax.n.02', 'name': 'flax'}, {'id': 19909, 'synset': 'calabar_bean.n.01', 'name': 'calabar_bean'}, {'id': 19910, 'synset': 'bonduc.n.02', 'name': 'bonduc'}, {'id': 19911, 'synset': 'divi-divi.n.02', 'name': 'divi-divi'}, {'id': 19912, 'synset': 'mysore_thorn.n.01', 'name': 'Mysore_thorn'}, {'id': 19913, 'synset': 'brazilian_ironwood.n.01', 'name': 'brazilian_ironwood'}, {'id': 19914, 'synset': 'bird_of_paradise.n.01', 'name': 'bird_of_paradise'}, {'id': 19915, 'synset': 'shingle_tree.n.01', 'name': 'shingle_tree'}, {'id': 19916, 'synset': 'mountain_ebony.n.01', 'name': 'mountain_ebony'}, {'id': 19917, 'synset': 'msasa.n.01', 'name': 'msasa'}, {'id': 19918, 'synset': 'cassia.n.01', 'name': 'cassia'}, {'id': 19919, 'synset': 'golden_shower_tree.n.01', 'name': 'golden_shower_tree'}, {'id': 19920, 'synset': 'pink_shower.n.01', 'name': 'pink_shower'}, {'id': 19921, 'synset': 'rainbow_shower.n.01', 'name': 'rainbow_shower'}, {'id': 19922, 'synset': 'horse_cassia.n.01', 'name': 'horse_cassia'}, {'id': 19923, 'synset': 'carob.n.02', 'name': 'carob'}, {'id': 19924, 'synset': 'carob.n.01', 'name': 'carob'}, {'id': 19925, 'synset': 'paloverde.n.01', 'name': 'paloverde'}, {'id': 19926, 'synset': 'royal_poinciana.n.01', 'name': 'royal_poinciana'}, {'id': 19927, 'synset': 'locust_tree.n.01', 'name': 'locust_tree'}, {'id': 19928, 'synset': 'water_locust.n.01', 'name': 'water_locust'}, {'id': 19929, 'synset': 'honey_locust.n.01', 'name': 'honey_locust'}, {'id': 19930, 'synset': 'kentucky_coffee_tree.n.01', 'name': 'Kentucky_coffee_tree'}, {'id': 19931, 'synset': 'logwood.n.02', 'name': 'logwood'}, {'id': 19932, 'synset': 'jerusalem_thorn.n.03', 'name': 'Jerusalem_thorn'}, {'id': 19933, 'synset': 'palo_verde.n.01', 'name': 'palo_verde'}, {'id': 19934, 'synset': 'dalmatian_laburnum.n.01', 'name': 'Dalmatian_laburnum'}, {'id': 19935, 'synset': 'senna.n.01', 'name': 'senna'}, {'id': 19936, 'synset': 'avaram.n.01', 'name': 'avaram'}, {'id': 19937, 'synset': 'alexandria_senna.n.01', 'name': 'Alexandria_senna'}, {'id': 19938, 'synset': 'wild_senna.n.01', 'name': 'wild_senna'}, {'id': 19939, 'synset': 'sicklepod.n.01', 'name': 'sicklepod'}, {'id': 19940, 'synset': 'coffee_senna.n.01', 'name': 'coffee_senna'}, {'id': 19941, 'synset': 'tamarind.n.01', 'name': 'tamarind'}, {'id': 19942, 'synset': 'false_indigo.n.03', 'name': 'false_indigo'}, {'id': 19943, 'synset': 'false_indigo.n.02', 'name': 'false_indigo'}, {'id': 19944, 'synset': 'hog_peanut.n.01', 'name': 'hog_peanut'}, {'id': 19945, 'synset': 'angelim.n.01', 'name': 'angelim'}, {'id': 19946, 'synset': 'cabbage_bark.n.01', 'name': 'cabbage_bark'}, {'id': 19947, 'synset': 'kidney_vetch.n.01', 'name': 'kidney_vetch'}, {'id': 19948, 'synset': 'groundnut.n.01', 'name': 'groundnut'}, {'id': 19949, 'synset': 'rooibos.n.01', 'name': 'rooibos'}, {'id': 19950, 'synset': 'milk_vetch.n.01', 'name': 'milk_vetch'}, {'id': 19951, 'synset': 'alpine_milk_vetch.n.01', 'name': 'alpine_milk_vetch'}, {'id': 19952, 'synset': 'purple_milk_vetch.n.01', 'name': 'purple_milk_vetch'}, {'id': 19953, 'synset': 'camwood.n.01', 'name': 'camwood'}, {'id': 19954, 'synset': 'wild_indigo.n.01', 'name': 'wild_indigo'}, {'id': 19955, 'synset': 'blue_false_indigo.n.01', 'name': 'blue_false_indigo'}, {'id': 19956, 'synset': 'white_false_indigo.n.01', 'name': 'white_false_indigo'}, {'id': 19957, 'synset': 'indigo_broom.n.01', 'name': 'indigo_broom'}, {'id': 19958, 'synset': 'dhak.n.01', 'name': 'dhak'}, {'id': 19959, 'synset': 'pigeon_pea.n.01', 'name': 'pigeon_pea'}, {'id': 19960, 'synset': 'sword_bean.n.01', 'name': 'sword_bean'}, {'id': 19961, 'synset': 'pea_tree.n.01', 'name': 'pea_tree'}, {'id': 19962, 'synset': 'siberian_pea_tree.n.01', 'name': 'Siberian_pea_tree'}, {'id': 19963, 'synset': 'chinese_pea_tree.n.01', 'name': 'Chinese_pea_tree'}, {'id': 19964, 'synset': 'moreton_bay_chestnut.n.01', 'name': 'Moreton_Bay_chestnut'}, {'id': 19965, 'synset': 'butterfly_pea.n.03', 'name': 'butterfly_pea'}, {'id': 19966, 'synset': 'judas_tree.n.01', 'name': 'Judas_tree'}, {'id': 19967, 'synset': 'redbud.n.01', 'name': 'redbud'}, {'id': 19968, 'synset': 'western_redbud.n.01', 'name': 'western_redbud'}, {'id': 19969, 'synset': 'tagasaste.n.01', 'name': 'tagasaste'}, {'id': 19970, 'synset': 'weeping_tree_broom.n.01', 'name': 'weeping_tree_broom'}, {'id': 19971, 'synset': 'flame_pea.n.01', 'name': 'flame_pea'}, {'id': 19972, 'synset': 'chickpea.n.02', 'name': 'chickpea'}, {'id': 19973, 'synset': 'kentucky_yellowwood.n.01', 'name': 'Kentucky_yellowwood'}, {'id': 19974, 'synset': 'glory_pea.n.01', 'name': 'glory_pea'}, {'id': 19975, 'synset': 'desert_pea.n.01', 'name': 'desert_pea'}, {'id': 19976, 'synset': "parrot's_beak.n.01", 'name': "parrot's_beak"}, {'id': 19977, 'synset': 'butterfly_pea.n.02', 'name': 'butterfly_pea'}, {'id': 19978, 'synset': 'blue_pea.n.01', 'name': 'blue_pea'}, {'id': 19979, 'synset': 'telegraph_plant.n.01', 'name': 'telegraph_plant'}, {'id': 19980, 'synset': 'bladder_senna.n.01', 'name': 'bladder_senna'}, {'id': 19981, 'synset': 'axseed.n.01', 'name': 'axseed'}, {'id': 19982, 'synset': 'crotalaria.n.01', 'name': 'crotalaria'}, {'id': 19983, 'synset': 'guar.n.01', 'name': 'guar'}, {'id': 19984, 'synset': 'white_broom.n.01', 'name': 'white_broom'}, {'id': 19985, 'synset': 'common_broom.n.01', 'name': 'common_broom'}, {'id': 19986, 'synset': 'rosewood.n.02', 'name': 'rosewood'}, {'id': 19987, 'synset': 'indian_blackwood.n.01', 'name': 'Indian_blackwood'}, {'id': 19988, 'synset': 'sissoo.n.01', 'name': 'sissoo'}, {'id': 19989, 'synset': 'kingwood.n.02', 'name': 'kingwood'}, {'id': 19990, 'synset': 'brazilian_rosewood.n.01', 'name': 'Brazilian_rosewood'}, {'id': 19991, 'synset': 'cocobolo.n.01', 'name': 'cocobolo'}, {'id': 19992, 'synset': 'blackwood.n.02', 'name': 'blackwood'}, {'id': 19993, 'synset': 'bitter_pea.n.01', 'name': 'bitter_pea'}, {'id': 19994, 'synset': 'derris.n.01', 'name': 'derris'}, {'id': 19995, 'synset': 'derris_root.n.01', 'name': 'derris_root'}, {'id': 19996, 'synset': 'prairie_mimosa.n.01', 'name': 'prairie_mimosa'}, {'id': 19997, 'synset': 'tick_trefoil.n.01', 'name': 'tick_trefoil'}, {'id': 19998, 'synset': 'beggarweed.n.01', 'name': 'beggarweed'}, {'id': 19999, 'synset': 'australian_pea.n.01', 'name': 'Australian_pea'}, {'id': 20000, 'synset': 'coral_tree.n.01', 'name': 'coral_tree'}, {'id': 20001, 'synset': 'kaffir_boom.n.02', 'name': 'kaffir_boom'}, {'id': 20002, 'synset': 'coral_bean_tree.n.01', 'name': 'coral_bean_tree'}, {'id': 20003, 'synset': 'ceibo.n.01', 'name': 'ceibo'}, {'id': 20004, 'synset': 'kaffir_boom.n.01', 'name': 'kaffir_boom'}, {'id': 20005, 'synset': 'indian_coral_tree.n.01', 'name': 'Indian_coral_tree'}, {'id': 20006, 'synset': 'cork_tree.n.02', 'name': 'cork_tree'}, {'id': 20007, 'synset': "goat's_rue.n.02", 'name': "goat's_rue"}, {'id': 20008, 'synset': 'poison_bush.n.01', 'name': 'poison_bush'}, {'id': 20009, 'synset': 'spanish_broom.n.02', 'name': 'Spanish_broom'}, {'id': 20010, 'synset': 'woodwaxen.n.01', 'name': 'woodwaxen'}, {'id': 20011, 'synset': 'chanar.n.01', 'name': 'chanar'}, {'id': 20012, 'synset': 'gliricidia.n.01', 'name': 'gliricidia'}, {'id': 20013, 'synset': 'soy.n.01', 'name': 'soy'}, {'id': 20014, 'synset': 'licorice.n.01', 'name': 'licorice'}, {'id': 20015, 'synset': 'wild_licorice.n.02', 'name': 'wild_licorice'}, {'id': 20016, 'synset': 'licorice_root.n.01', 'name': 'licorice_root'}, {'id': 20017, 'synset': 'western_australia_coral_pea.n.01', 'name': 'Western_Australia_coral_pea'}, {'id': 20018, 'synset': 'sweet_vetch.n.01', 'name': 'sweet_vetch'}, {'id': 20019, 'synset': 'french_honeysuckle.n.02', 'name': 'French_honeysuckle'}, {'id': 20020, 'synset': 'anil.n.02', 'name': 'anil'}, {'id': 20021, 'synset': 'scarlet_runner.n.02', 'name': 'scarlet_runner'}, {'id': 20022, 'synset': 'hyacinth_bean.n.01', 'name': 'hyacinth_bean'}, {'id': 20023, 'synset': 'scotch_laburnum.n.01', 'name': 'Scotch_laburnum'}, {'id': 20024, 'synset': 'vetchling.n.01', 'name': 'vetchling'}, {'id': 20025, 'synset': 'wild_pea.n.01', 'name': 'wild_pea'}, {'id': 20026, 'synset': 'everlasting_pea.n.01', 'name': 'everlasting_pea'}, {'id': 20027, 'synset': 'beach_pea.n.01', 'name': 'beach_pea'}, {'id': 20028, 'synset': 'grass_vetch.n.01', 'name': 'grass_vetch'}, {'id': 20029, 'synset': 'marsh_pea.n.01', 'name': 'marsh_pea'}, {'id': 20030, 'synset': 'common_vetchling.n.01', 'name': 'common_vetchling'}, {'id': 20031, 'synset': 'grass_pea.n.01', 'name': 'grass_pea'}, {'id': 20032, 'synset': 'tangier_pea.n.01', 'name': 'Tangier_pea'}, {'id': 20033, 'synset': 'heath_pea.n.01', 'name': 'heath_pea'}, {'id': 20034, 'synset': 'bicolor_lespediza.n.01', 'name': 'bicolor_lespediza'}, {'id': 20035, 'synset': 'japanese_clover.n.01', 'name': 'japanese_clover'}, {'id': 20036, 'synset': 'korean_lespedeza.n.01', 'name': 'Korean_lespedeza'}, {'id': 20037, 'synset': 'sericea_lespedeza.n.01', 'name': 'sericea_lespedeza'}, {'id': 20038, 'synset': 'lentil.n.03', 'name': 'lentil'}, {'id': 20039, 'synset': 'lentil.n.02', 'name': 'lentil'}, {'id': 20040, 'synset': "prairie_bird's-foot_trefoil.n.01", 'name': "prairie_bird's-foot_trefoil"}, {'id': 20041, 'synset': "bird's_foot_trefoil.n.02", 'name': "bird's_foot_trefoil"}, {'id': 20042, 'synset': 'winged_pea.n.02', 'name': 'winged_pea'}, {'id': 20043, 'synset': 'lupine.n.01', 'name': 'lupine'}, {'id': 20044, 'synset': 'white_lupine.n.01', 'name': 'white_lupine'}, {'id': 20045, 'synset': 'tree_lupine.n.01', 'name': 'tree_lupine'}, {'id': 20046, 'synset': 'wild_lupine.n.01', 'name': 'wild_lupine'}, {'id': 20047, 'synset': 'bluebonnet.n.01', 'name': 'bluebonnet'}, {'id': 20048, 'synset': 'texas_bluebonnet.n.01', 'name': 'Texas_bluebonnet'}, {'id': 20049, 'synset': 'medic.n.01', 'name': 'medic'}, {'id': 20050, 'synset': 'moon_trefoil.n.01', 'name': 'moon_trefoil'}, {'id': 20051, 'synset': 'sickle_alfalfa.n.01', 'name': 'sickle_alfalfa'}, {'id': 20052, 'synset': 'calvary_clover.n.01', 'name': 'Calvary_clover'}, {'id': 20053, 'synset': 'black_medick.n.01', 'name': 'black_medick'}, {'id': 20054, 'synset': 'alfalfa.n.01', 'name': 'alfalfa'}, {'id': 20055, 'synset': 'millettia.n.01', 'name': 'millettia'}, {'id': 20056, 'synset': 'mucuna.n.01', 'name': 'mucuna'}, {'id': 20057, 'synset': 'cowage.n.02', 'name': 'cowage'}, {'id': 20058, 'synset': 'tolu_tree.n.01', 'name': 'tolu_tree'}, {'id': 20059, 'synset': 'peruvian_balsam.n.01', 'name': 'Peruvian_balsam'}, {'id': 20060, 'synset': 'sainfoin.n.01', 'name': 'sainfoin'}, {'id': 20061, 'synset': 'restharrow.n.02', 'name': 'restharrow'}, {'id': 20062, 'synset': 'bead_tree.n.01', 'name': 'bead_tree'}, {'id': 20063, 'synset': 'jumby_bead.n.01', 'name': 'jumby_bead'}, {'id': 20064, 'synset': 'locoweed.n.01', 'name': 'locoweed'}, {'id': 20065, 'synset': 'purple_locoweed.n.01', 'name': 'purple_locoweed'}, {'id': 20066, 'synset': 'tumbleweed.n.01', 'name': 'tumbleweed'}, {'id': 20067, 'synset': 'yam_bean.n.02', 'name': 'yam_bean'}, {'id': 20068, 'synset': 'shamrock_pea.n.01', 'name': 'shamrock_pea'}, {'id': 20069, 'synset': 'pole_bean.n.01', 'name': 'pole_bean'}, {'id': 20070, 'synset': 'kidney_bean.n.01', 'name': 'kidney_bean'}, {'id': 20071, 'synset': 'haricot.n.01', 'name': 'haricot'}, {'id': 20072, 'synset': 'wax_bean.n.01', 'name': 'wax_bean'}, {'id': 20073, 'synset': 'scarlet_runner.n.01', 'name': 'scarlet_runner'}, {'id': 20074, 'synset': 'lima_bean.n.02', 'name': 'lima_bean'}, {'id': 20075, 'synset': 'sieva_bean.n.01', 'name': 'sieva_bean'}, {'id': 20076, 'synset': 'tepary_bean.n.01', 'name': 'tepary_bean'}, {'id': 20077, 'synset': 'chaparral_pea.n.01', 'name': 'chaparral_pea'}, {'id': 20078, 'synset': 'jamaica_dogwood.n.01', 'name': 'Jamaica_dogwood'}, {'id': 20079, 'synset': 'pea.n.02', 'name': 'pea'}, {'id': 20080, 'synset': 'garden_pea.n.01', 'name': 'garden_pea'}, {'id': 20081, 'synset': 'edible-pod_pea.n.01', 'name': 'edible-pod_pea'}, {'id': 20082, 'synset': 'sugar_snap_pea.n.01', 'name': 'sugar_snap_pea'}, {'id': 20083, 'synset': 'field_pea.n.02', 'name': 'field_pea'}, {'id': 20084, 'synset': 'field_pea.n.01', 'name': 'field_pea'}, {'id': 20085, 'synset': 'common_flat_pea.n.01', 'name': 'common_flat_pea'}, {'id': 20086, 'synset': 'quira.n.02', 'name': 'quira'}, {'id': 20087, 'synset': 'roble.n.01', 'name': 'roble'}, {'id': 20088, 'synset': 'panama_redwood_tree.n.01', 'name': 'Panama_redwood_tree'}, {'id': 20089, 'synset': 'indian_beech.n.01', 'name': 'Indian_beech'}, {'id': 20090, 'synset': 'winged_bean.n.01', 'name': 'winged_bean'}, {'id': 20091, 'synset': 'breadroot.n.01', 'name': 'breadroot'}, {'id': 20092, 'synset': 'bloodwood_tree.n.01', 'name': 'bloodwood_tree'}, {'id': 20093, 'synset': 'kino.n.02', 'name': 'kino'}, {'id': 20094, 'synset': 'red_sandalwood.n.02', 'name': 'red_sandalwood'}, {'id': 20095, 'synset': 'kudzu.n.01', 'name': 'kudzu'}, {'id': 20096, 'synset': 'bristly_locust.n.01', 'name': 'bristly_locust'}, {'id': 20097, 'synset': 'black_locust.n.02', 'name': 'black_locust'}, {'id': 20098, 'synset': 'clammy_locust.n.01', 'name': 'clammy_locust'}, {'id': 20099, 'synset': 'carib_wood.n.01', 'name': 'carib_wood'}, {'id': 20100, 'synset': 'colorado_river_hemp.n.01', 'name': 'Colorado_River_hemp'}, {'id': 20101, 'synset': 'scarlet_wisteria_tree.n.01', 'name': 'scarlet_wisteria_tree'}, {'id': 20102, 'synset': 'japanese_pagoda_tree.n.01', 'name': 'Japanese_pagoda_tree'}, {'id': 20103, 'synset': 'mescal_bean.n.01', 'name': 'mescal_bean'}, {'id': 20104, 'synset': 'kowhai.n.01', 'name': 'kowhai'}, {'id': 20105, 'synset': 'jade_vine.n.01', 'name': 'jade_vine'}, {'id': 20106, 'synset': 'hoary_pea.n.01', 'name': 'hoary_pea'}, {'id': 20107, 'synset': 'bastard_indigo.n.01', 'name': 'bastard_indigo'}, {'id': 20108, 'synset': 'catgut.n.01', 'name': 'catgut'}, {'id': 20109, 'synset': 'bush_pea.n.01', 'name': 'bush_pea'}, {'id': 20110, 'synset': 'false_lupine.n.01', 'name': 'false_lupine'}, {'id': 20111, 'synset': 'carolina_lupine.n.01', 'name': 'Carolina_lupine'}, {'id': 20112, 'synset': 'tipu.n.01', 'name': 'tipu'}, {'id': 20113, 'synset': "bird's_foot_trefoil.n.01", 'name': "bird's_foot_trefoil"}, {'id': 20114, 'synset': 'fenugreek.n.01', 'name': 'fenugreek'}, {'id': 20115, 'synset': 'gorse.n.01', 'name': 'gorse'}, {'id': 20116, 'synset': 'vetch.n.01', 'name': 'vetch'}, {'id': 20117, 'synset': 'tufted_vetch.n.01', 'name': 'tufted_vetch'}, {'id': 20118, 'synset': 'broad_bean.n.01', 'name': 'broad_bean'}, {'id': 20119, 'synset': 'bitter_betch.n.01', 'name': 'bitter_betch'}, {'id': 20120, 'synset': 'bush_vetch.n.01', 'name': 'bush_vetch'}, {'id': 20121, 'synset': 'moth_bean.n.01', 'name': 'moth_bean'}, {'id': 20122, 'synset': 'snailflower.n.01', 'name': 'snailflower'}, {'id': 20123, 'synset': 'mung.n.01', 'name': 'mung'}, {'id': 20124, 'synset': 'cowpea.n.02', 'name': 'cowpea'}, {'id': 20125, 'synset': 'cowpea.n.01', 'name': 'cowpea'}, {'id': 20126, 'synset': 'asparagus_bean.n.01', 'name': 'asparagus_bean'}, {'id': 20127, 'synset': 'swamp_oak.n.01', 'name': 'swamp_oak'}, {'id': 20128, 'synset': 'keurboom.n.02', 'name': 'keurboom'}, {'id': 20129, 'synset': 'keurboom.n.01', 'name': 'keurboom'}, {'id': 20130, 'synset': 'japanese_wistaria.n.01', 'name': 'Japanese_wistaria'}, {'id': 20131, 'synset': 'chinese_wistaria.n.01', 'name': 'Chinese_wistaria'}, {'id': 20132, 'synset': 'american_wistaria.n.01', 'name': 'American_wistaria'}, {'id': 20133, 'synset': 'silky_wisteria.n.01', 'name': 'silky_wisteria'}, {'id': 20134, 'synset': 'palm.n.03', 'name': 'palm'}, {'id': 20135, 'synset': 'sago_palm.n.01', 'name': 'sago_palm'}, {'id': 20136, 'synset': 'feather_palm.n.01', 'name': 'feather_palm'}, {'id': 20137, 'synset': 'fan_palm.n.01', 'name': 'fan_palm'}, {'id': 20138, 'synset': 'palmetto.n.01', 'name': 'palmetto'}, {'id': 20139, 'synset': 'coyol.n.01', 'name': 'coyol'}, {'id': 20140, 'synset': 'grugru.n.01', 'name': 'grugru'}, {'id': 20141, 'synset': 'areca.n.01', 'name': 'areca'}, {'id': 20142, 'synset': 'betel_palm.n.01', 'name': 'betel_palm'}, {'id': 20143, 'synset': 'sugar_palm.n.01', 'name': 'sugar_palm'}, {'id': 20144, 'synset': 'piassava_palm.n.01', 'name': 'piassava_palm'}, {'id': 20145, 'synset': 'coquilla_nut.n.01', 'name': 'coquilla_nut'}, {'id': 20146, 'synset': 'palmyra.n.01', 'name': 'palmyra'}, {'id': 20147, 'synset': 'calamus.n.01', 'name': 'calamus'}, {'id': 20148, 'synset': 'rattan.n.01', 'name': 'rattan'}, {'id': 20149, 'synset': 'lawyer_cane.n.01', 'name': 'lawyer_cane'}, {'id': 20150, 'synset': 'fishtail_palm.n.01', 'name': 'fishtail_palm'}, {'id': 20151, 'synset': 'wine_palm.n.01', 'name': 'wine_palm'}, {'id': 20152, 'synset': 'wax_palm.n.03', 'name': 'wax_palm'}, {'id': 20153, 'synset': 'coconut.n.03', 'name': 'coconut'}, {'id': 20154, 'synset': 'carnauba.n.02', 'name': 'carnauba'}, {'id': 20155, 'synset': 'caranday.n.01', 'name': 'caranday'}, {'id': 20156, 'synset': 'corozo.n.01', 'name': 'corozo'}, {'id': 20157, 'synset': 'gebang_palm.n.01', 'name': 'gebang_palm'}, {'id': 20158, 'synset': 'latanier.n.01', 'name': 'latanier'}, {'id': 20159, 'synset': 'talipot.n.01', 'name': 'talipot'}, {'id': 20160, 'synset': 'oil_palm.n.01', 'name': 'oil_palm'}, {'id': 20161, 'synset': 'african_oil_palm.n.01', 'name': 'African_oil_palm'}, {'id': 20162, 'synset': 'american_oil_palm.n.01', 'name': 'American_oil_palm'}, {'id': 20163, 'synset': 'palm_nut.n.01', 'name': 'palm_nut'}, {'id': 20164, 'synset': 'cabbage_palm.n.04', 'name': 'cabbage_palm'}, {'id': 20165, 'synset': 'cabbage_palm.n.03', 'name': 'cabbage_palm'}, {'id': 20166, 'synset': 'true_sago_palm.n.01', 'name': 'true_sago_palm'}, {'id': 20167, 'synset': 'nipa_palm.n.01', 'name': 'nipa_palm'}, {'id': 20168, 'synset': 'babassu.n.01', 'name': 'babassu'}, {'id': 20169, 'synset': 'babassu_nut.n.01', 'name': 'babassu_nut'}, {'id': 20170, 'synset': 'cohune_palm.n.01', 'name': 'cohune_palm'}, {'id': 20171, 'synset': 'cohune_nut.n.01', 'name': 'cohune_nut'}, {'id': 20172, 'synset': 'date_palm.n.01', 'name': 'date_palm'}, {'id': 20173, 'synset': 'ivory_palm.n.01', 'name': 'ivory_palm'}, {'id': 20174, 'synset': 'raffia_palm.n.01', 'name': 'raffia_palm'}, {'id': 20175, 'synset': 'bamboo_palm.n.02', 'name': 'bamboo_palm'}, {'id': 20176, 'synset': 'lady_palm.n.01', 'name': 'lady_palm'}, {'id': 20177, 'synset': 'miniature_fan_palm.n.01', 'name': 'miniature_fan_palm'}, {'id': 20178, 'synset': 'reed_rhapis.n.01', 'name': 'reed_rhapis'}, {'id': 20179, 'synset': 'royal_palm.n.01', 'name': 'royal_palm'}, {'id': 20180, 'synset': 'cabbage_palm.n.02', 'name': 'cabbage_palm'}, {'id': 20181, 'synset': 'cabbage_palmetto.n.01', 'name': 'cabbage_palmetto'}, {'id': 20182, 'synset': 'saw_palmetto.n.01', 'name': 'saw_palmetto'}, {'id': 20183, 'synset': 'thatch_palm.n.01', 'name': 'thatch_palm'}, {'id': 20184, 'synset': 'key_palm.n.01', 'name': 'key_palm'}, {'id': 20185, 'synset': 'english_plantain.n.01', 'name': 'English_plantain'}, {'id': 20186, 'synset': 'broad-leaved_plantain.n.02', 'name': 'broad-leaved_plantain'}, {'id': 20187, 'synset': 'hoary_plantain.n.02', 'name': 'hoary_plantain'}, {'id': 20188, 'synset': 'fleawort.n.01', 'name': 'fleawort'}, {'id': 20189, 'synset': "rugel's_plantain.n.01", 'name': "rugel's_plantain"}, {'id': 20190, 'synset': 'hoary_plantain.n.01', 'name': 'hoary_plantain'}, {'id': 20191, 'synset': 'buckwheat.n.01', 'name': 'buckwheat'}, {'id': 20192, 'synset': "prince's-feather.n.01", 'name': "prince's-feather"}, {'id': 20193, 'synset': 'eriogonum.n.01', 'name': 'eriogonum'}, {'id': 20194, 'synset': 'umbrella_plant.n.02', 'name': 'umbrella_plant'}, {'id': 20195, 'synset': 'wild_buckwheat.n.01', 'name': 'wild_buckwheat'}, {'id': 20196, 'synset': 'rhubarb.n.02', 'name': 'rhubarb'}, {'id': 20197, 'synset': 'himalayan_rhubarb.n.01', 'name': 'Himalayan_rhubarb'}, {'id': 20198, 'synset': 'pie_plant.n.01', 'name': 'pie_plant'}, {'id': 20199, 'synset': 'chinese_rhubarb.n.01', 'name': 'Chinese_rhubarb'}, {'id': 20200, 'synset': 'sour_dock.n.01', 'name': 'sour_dock'}, {'id': 20201, 'synset': 'sheep_sorrel.n.01', 'name': 'sheep_sorrel'}, {'id': 20202, 'synset': 'bitter_dock.n.01', 'name': 'bitter_dock'}, {'id': 20203, 'synset': 'french_sorrel.n.01', 'name': 'French_sorrel'}, {'id': 20204, 'synset': 'yellow-eyed_grass.n.01', 'name': 'yellow-eyed_grass'}, {'id': 20205, 'synset': 'commelina.n.01', 'name': 'commelina'}, {'id': 20206, 'synset': 'spiderwort.n.01', 'name': 'spiderwort'}, {'id': 20207, 'synset': 'pineapple.n.01', 'name': 'pineapple'}, {'id': 20208, 'synset': 'pipewort.n.01', 'name': 'pipewort'}, {'id': 20209, 'synset': 'water_hyacinth.n.01', 'name': 'water_hyacinth'}, {'id': 20210, 'synset': 'water_star_grass.n.01', 'name': 'water_star_grass'}, {'id': 20211, 'synset': 'naiad.n.01', 'name': 'naiad'}, {'id': 20212, 'synset': 'water_plantain.n.01', 'name': 'water_plantain'}, {'id': 20213, 'synset': 'narrow-leaved_water_plantain.n.01', 'name': 'narrow-leaved_water_plantain'}, {'id': 20214, 'synset': 'hydrilla.n.01', 'name': 'hydrilla'}, {'id': 20215, 'synset': 'american_frogbit.n.01', 'name': 'American_frogbit'}, {'id': 20216, 'synset': 'waterweed.n.01', 'name': 'waterweed'}, {'id': 20217, 'synset': 'canadian_pondweed.n.01', 'name': 'Canadian_pondweed'}, {'id': 20218, 'synset': 'tape_grass.n.01', 'name': 'tape_grass'}, {'id': 20219, 'synset': 'pondweed.n.01', 'name': 'pondweed'}, {'id': 20220, 'synset': 'curled_leaf_pondweed.n.01', 'name': 'curled_leaf_pondweed'}, {'id': 20221, 'synset': 'loddon_pondweed.n.01', 'name': 'loddon_pondweed'}, {'id': 20222, 'synset': "frog's_lettuce.n.01", 'name': "frog's_lettuce"}, {'id': 20223, 'synset': 'arrow_grass.n.01', 'name': 'arrow_grass'}, {'id': 20224, 'synset': 'horned_pondweed.n.01', 'name': 'horned_pondweed'}, {'id': 20225, 'synset': 'eelgrass.n.01', 'name': 'eelgrass'}, {'id': 20226, 'synset': 'rose.n.01', 'name': 'rose'}, {'id': 20227, 'synset': 'hip.n.05', 'name': 'hip'}, {'id': 20228, 'synset': 'banksia_rose.n.01', 'name': 'banksia_rose'}, {'id': 20229, 'synset': 'damask_rose.n.01', 'name': 'damask_rose'}, {'id': 20230, 'synset': 'sweetbrier.n.01', 'name': 'sweetbrier'}, {'id': 20231, 'synset': 'cherokee_rose.n.01', 'name': 'Cherokee_rose'}, {'id': 20232, 'synset': 'musk_rose.n.01', 'name': 'musk_rose'}, {'id': 20233, 'synset': 'agrimonia.n.01', 'name': 'agrimonia'}, {'id': 20234, 'synset': 'harvest-lice.n.01', 'name': 'harvest-lice'}, {'id': 20235, 'synset': 'fragrant_agrimony.n.01', 'name': 'fragrant_agrimony'}, {'id': 20236, 'synset': 'alderleaf_juneberry.n.01', 'name': 'alderleaf_Juneberry'}, {'id': 20237, 'synset': 'flowering_quince.n.01', 'name': 'flowering_quince'}, {'id': 20238, 'synset': 'japonica.n.02', 'name': 'japonica'}, {'id': 20239, 'synset': 'coco_plum.n.01', 'name': 'coco_plum'}, {'id': 20240, 'synset': 'cotoneaster.n.01', 'name': 'cotoneaster'}, {'id': 20241, 'synset': 'cotoneaster_dammeri.n.01', 'name': 'Cotoneaster_dammeri'}, {'id': 20242, 'synset': 'cotoneaster_horizontalis.n.01', 'name': 'Cotoneaster_horizontalis'}, {'id': 20243, 'synset': 'parsley_haw.n.01', 'name': 'parsley_haw'}, {'id': 20244, 'synset': 'scarlet_haw.n.01', 'name': 'scarlet_haw'}, {'id': 20245, 'synset': 'blackthorn.n.02', 'name': 'blackthorn'}, {'id': 20246, 'synset': 'cockspur_thorn.n.01', 'name': 'cockspur_thorn'}, {'id': 20247, 'synset': 'mayhaw.n.01', 'name': 'mayhaw'}, {'id': 20248, 'synset': 'red_haw.n.02', 'name': 'red_haw'}, {'id': 20249, 'synset': 'red_haw.n.01', 'name': 'red_haw'}, {'id': 20250, 'synset': 'quince.n.01', 'name': 'quince'}, {'id': 20251, 'synset': 'mountain_avens.n.01', 'name': 'mountain_avens'}, {'id': 20252, 'synset': 'loquat.n.01', 'name': 'loquat'}, {'id': 20253, 'synset': 'beach_strawberry.n.01', 'name': 'beach_strawberry'}, {'id': 20254, 'synset': 'virginia_strawberry.n.01', 'name': 'Virginia_strawberry'}, {'id': 20255, 'synset': 'avens.n.01', 'name': 'avens'}, {'id': 20256, 'synset': 'yellow_avens.n.02', 'name': 'yellow_avens'}, {'id': 20257, 'synset': 'yellow_avens.n.01', 'name': 'yellow_avens'}, {'id': 20258, 'synset': 'prairie_smoke.n.01', 'name': 'prairie_smoke'}, {'id': 20259, 'synset': 'bennet.n.01', 'name': 'bennet'}, {'id': 20260, 'synset': 'toyon.n.01', 'name': 'toyon'}, {'id': 20261, 'synset': 'apple_tree.n.01', 'name': 'apple_tree'}, {'id': 20262, 'synset': 'apple.n.02', 'name': 'apple'}, {'id': 20263, 'synset': 'wild_apple.n.01', 'name': 'wild_apple'}, {'id': 20264, 'synset': 'crab_apple.n.01', 'name': 'crab_apple'}, {'id': 20265, 'synset': 'siberian_crab.n.01', 'name': 'Siberian_crab'}, {'id': 20266, 'synset': 'wild_crab.n.01', 'name': 'wild_crab'}, {'id': 20267, 'synset': 'american_crab_apple.n.01', 'name': 'American_crab_apple'}, {'id': 20268, 'synset': 'oregon_crab_apple.n.01', 'name': 'Oregon_crab_apple'}, {'id': 20269, 'synset': 'southern_crab_apple.n.01', 'name': 'Southern_crab_apple'}, {'id': 20270, 'synset': 'iowa_crab.n.01', 'name': 'Iowa_crab'}, {'id': 20271, 'synset': 'bechtel_crab.n.01', 'name': 'Bechtel_crab'}, {'id': 20272, 'synset': 'medlar.n.02', 'name': 'medlar'}, {'id': 20273, 'synset': 'cinquefoil.n.01', 'name': 'cinquefoil'}, {'id': 20274, 'synset': 'silverweed.n.02', 'name': 'silverweed'}, {'id': 20275, 'synset': 'salad_burnet.n.01', 'name': 'salad_burnet'}, {'id': 20276, 'synset': 'plum.n.01', 'name': 'plum'}, {'id': 20277, 'synset': 'wild_plum.n.01', 'name': 'wild_plum'}, {'id': 20278, 'synset': 'allegheny_plum.n.01', 'name': 'Allegheny_plum'}, {'id': 20279, 'synset': 'american_red_plum.n.01', 'name': 'American_red_plum'}, {'id': 20280, 'synset': 'chickasaw_plum.n.01', 'name': 'chickasaw_plum'}, {'id': 20281, 'synset': 'beach_plum.n.01', 'name': 'beach_plum'}, {'id': 20282, 'synset': 'common_plum.n.01', 'name': 'common_plum'}, {'id': 20283, 'synset': 'bullace.n.01', 'name': 'bullace'}, {'id': 20284, 'synset': 'damson_plum.n.02', 'name': 'damson_plum'}, {'id': 20285, 'synset': 'big-tree_plum.n.01', 'name': 'big-tree_plum'}, {'id': 20286, 'synset': 'canada_plum.n.01', 'name': 'Canada_plum'}, {'id': 20287, 'synset': 'plumcot.n.01', 'name': 'plumcot'}, {'id': 20288, 'synset': 'apricot.n.01', 'name': 'apricot'}, {'id': 20289, 'synset': 'japanese_apricot.n.01', 'name': 'Japanese_apricot'}, {'id': 20290, 'synset': 'common_apricot.n.01', 'name': 'common_apricot'}, {'id': 20291, 'synset': 'purple_apricot.n.01', 'name': 'purple_apricot'}, {'id': 20292, 'synset': 'cherry.n.02', 'name': 'cherry'}, {'id': 20293, 'synset': 'wild_cherry.n.02', 'name': 'wild_cherry'}, {'id': 20294, 'synset': 'wild_cherry.n.01', 'name': 'wild_cherry'}, {'id': 20295, 'synset': 'sweet_cherry.n.01', 'name': 'sweet_cherry'}, {'id': 20296, 'synset': 'heart_cherry.n.01', 'name': 'heart_cherry'}, {'id': 20297, 'synset': 'gean.n.01', 'name': 'gean'}, {'id': 20298, 'synset': 'capulin.n.01', 'name': 'capulin'}, {'id': 20299, 'synset': 'cherry_laurel.n.02', 'name': 'cherry_laurel'}, {'id': 20300, 'synset': 'cherry_plum.n.01', 'name': 'cherry_plum'}, {'id': 20301, 'synset': 'sour_cherry.n.01', 'name': 'sour_cherry'}, {'id': 20302, 'synset': 'amarelle.n.01', 'name': 'amarelle'}, {'id': 20303, 'synset': 'morello.n.01', 'name': 'morello'}, {'id': 20304, 'synset': 'marasca.n.01', 'name': 'marasca'}, {'id': 20305, 'synset': 'almond_tree.n.01', 'name': 'almond_tree'}, {'id': 20306, 'synset': 'almond.n.01', 'name': 'almond'}, {'id': 20307, 'synset': 'bitter_almond.n.01', 'name': 'bitter_almond'}, {'id': 20308, 'synset': 'jordan_almond.n.01', 'name': 'jordan_almond'}, {'id': 20309, 'synset': 'dwarf_flowering_almond.n.01', 'name': 'dwarf_flowering_almond'}, {'id': 20310, 'synset': 'holly-leaved_cherry.n.01', 'name': 'holly-leaved_cherry'}, {'id': 20311, 'synset': 'fuji.n.01', 'name': 'fuji'}, {'id': 20312, 'synset': 'flowering_almond.n.02', 'name': 'flowering_almond'}, {'id': 20313, 'synset': 'cherry_laurel.n.01', 'name': 'cherry_laurel'}, {'id': 20314, 'synset': 'catalina_cherry.n.01', 'name': 'Catalina_cherry'}, {'id': 20315, 'synset': 'bird_cherry.n.01', 'name': 'bird_cherry'}, {'id': 20316, 'synset': 'hagberry_tree.n.01', 'name': 'hagberry_tree'}, {'id': 20317, 'synset': 'hagberry.n.01', 'name': 'hagberry'}, {'id': 20318, 'synset': 'pin_cherry.n.01', 'name': 'pin_cherry'}, {'id': 20319, 'synset': 'peach.n.01', 'name': 'peach'}, {'id': 20320, 'synset': 'nectarine.n.01', 'name': 'nectarine'}, {'id': 20321, 'synset': 'sand_cherry.n.01', 'name': 'sand_cherry'}, {'id': 20322, 'synset': 'japanese_plum.n.01', 'name': 'Japanese_plum'}, {'id': 20323, 'synset': 'black_cherry.n.01', 'name': 'black_cherry'}, {'id': 20324, 'synset': 'flowering_cherry.n.01', 'name': 'flowering_cherry'}, {'id': 20325, 'synset': 'oriental_cherry.n.01', 'name': 'oriental_cherry'}, {'id': 20326, 'synset': 'japanese_flowering_cherry.n.01', 'name': 'Japanese_flowering_cherry'}, {'id': 20327, 'synset': 'sierra_plum.n.01', 'name': 'Sierra_plum'}, {'id': 20328, 'synset': 'rosebud_cherry.n.01', 'name': 'rosebud_cherry'}, {'id': 20329, 'synset': 'russian_almond.n.01', 'name': 'Russian_almond'}, {'id': 20330, 'synset': 'flowering_almond.n.01', 'name': 'flowering_almond'}, {'id': 20331, 'synset': 'chokecherry.n.02', 'name': 'chokecherry'}, {'id': 20332, 'synset': 'chokecherry.n.01', 'name': 'chokecherry'}, {'id': 20333, 'synset': 'western_chokecherry.n.01', 'name': 'western_chokecherry'}, {'id': 20334, 'synset': 'pyracantha.n.01', 'name': 'Pyracantha'}, {'id': 20335, 'synset': 'pear.n.02', 'name': 'pear'}, {'id': 20336, 'synset': 'fruit_tree.n.01', 'name': 'fruit_tree'}, {'id': 20337, 'synset': 'bramble_bush.n.01', 'name': 'bramble_bush'}, {'id': 20338, 'synset': 'lawyerbush.n.01', 'name': 'lawyerbush'}, {'id': 20339, 'synset': 'stone_bramble.n.01', 'name': 'stone_bramble'}, {'id': 20340, 'synset': 'sand_blackberry.n.01', 'name': 'sand_blackberry'}, {'id': 20341, 'synset': 'boysenberry.n.01', 'name': 'boysenberry'}, {'id': 20342, 'synset': 'loganberry.n.01', 'name': 'loganberry'}, {'id': 20343, 'synset': 'american_dewberry.n.02', 'name': 'American_dewberry'}, {'id': 20344, 'synset': 'northern_dewberry.n.01', 'name': 'Northern_dewberry'}, {'id': 20345, 'synset': 'southern_dewberry.n.01', 'name': 'Southern_dewberry'}, {'id': 20346, 'synset': 'swamp_dewberry.n.01', 'name': 'swamp_dewberry'}, {'id': 20347, 'synset': 'european_dewberry.n.01', 'name': 'European_dewberry'}, {'id': 20348, 'synset': 'raspberry.n.01', 'name': 'raspberry'}, {'id': 20349, 'synset': 'wild_raspberry.n.01', 'name': 'wild_raspberry'}, {'id': 20350, 'synset': 'american_raspberry.n.01', 'name': 'American_raspberry'}, {'id': 20351, 'synset': 'black_raspberry.n.01', 'name': 'black_raspberry'}, {'id': 20352, 'synset': 'salmonberry.n.03', 'name': 'salmonberry'}, {'id': 20353, 'synset': 'salmonberry.n.02', 'name': 'salmonberry'}, {'id': 20354, 'synset': 'wineberry.n.01', 'name': 'wineberry'}, {'id': 20355, 'synset': 'mountain_ash.n.01', 'name': 'mountain_ash'}, {'id': 20356, 'synset': 'rowan.n.01', 'name': 'rowan'}, {'id': 20357, 'synset': 'rowanberry.n.01', 'name': 'rowanberry'}, {'id': 20358, 'synset': 'american_mountain_ash.n.01', 'name': 'American_mountain_ash'}, {'id': 20359, 'synset': 'western_mountain_ash.n.01', 'name': 'Western_mountain_ash'}, {'id': 20360, 'synset': 'service_tree.n.01', 'name': 'service_tree'}, {'id': 20361, 'synset': 'wild_service_tree.n.01', 'name': 'wild_service_tree'}, {'id': 20362, 'synset': 'spirea.n.02', 'name': 'spirea'}, {'id': 20363, 'synset': 'bridal_wreath.n.02', 'name': 'bridal_wreath'}, {'id': 20364, 'synset': 'madderwort.n.01', 'name': 'madderwort'}, {'id': 20365, 'synset': 'indian_madder.n.01', 'name': 'Indian_madder'}, {'id': 20366, 'synset': 'madder.n.01', 'name': 'madder'}, {'id': 20367, 'synset': 'woodruff.n.02', 'name': 'woodruff'}, {'id': 20368, 'synset': 'dagame.n.01', 'name': 'dagame'}, {'id': 20369, 'synset': 'blolly.n.01', 'name': 'blolly'}, {'id': 20370, 'synset': 'coffee.n.02', 'name': 'coffee'}, {'id': 20371, 'synset': 'arabian_coffee.n.01', 'name': 'Arabian_coffee'}, {'id': 20372, 'synset': 'liberian_coffee.n.01', 'name': 'Liberian_coffee'}, {'id': 20373, 'synset': 'robusta_coffee.n.01', 'name': 'robusta_coffee'}, {'id': 20374, 'synset': 'cinchona.n.02', 'name': 'cinchona'}, {'id': 20375, 'synset': 'cartagena_bark.n.01', 'name': 'Cartagena_bark'}, {'id': 20376, 'synset': 'calisaya.n.01', 'name': 'calisaya'}, {'id': 20377, 'synset': 'cinchona_tree.n.01', 'name': 'cinchona_tree'}, {'id': 20378, 'synset': 'cinchona.n.01', 'name': 'cinchona'}, {'id': 20379, 'synset': 'bedstraw.n.01', 'name': 'bedstraw'}, {'id': 20380, 'synset': 'sweet_woodruff.n.01', 'name': 'sweet_woodruff'}, {'id': 20381, 'synset': 'northern_bedstraw.n.01', 'name': 'Northern_bedstraw'}, {'id': 20382, 'synset': 'yellow_bedstraw.n.01', 'name': 'yellow_bedstraw'}, {'id': 20383, 'synset': 'wild_licorice.n.01', 'name': 'wild_licorice'}, {'id': 20384, 'synset': 'cleavers.n.01', 'name': 'cleavers'}, {'id': 20385, 'synset': 'wild_madder.n.01', 'name': 'wild_madder'}, {'id': 20386, 'synset': 'cape_jasmine.n.01', 'name': 'cape_jasmine'}, {'id': 20387, 'synset': 'genipa.n.01', 'name': 'genipa'}, {'id': 20388, 'synset': 'genipap_fruit.n.01', 'name': 'genipap_fruit'}, {'id': 20389, 'synset': 'hamelia.n.01', 'name': 'hamelia'}, {'id': 20390, 'synset': 'scarlet_bush.n.01', 'name': 'scarlet_bush'}, {'id': 20391, 'synset': 'lemonwood.n.02', 'name': 'lemonwood'}, {'id': 20392, 'synset': 'negro_peach.n.01', 'name': 'negro_peach'}, {'id': 20393, 'synset': 'wild_medlar.n.01', 'name': 'wild_medlar'}, {'id': 20394, 'synset': 'spanish_tamarind.n.01', 'name': 'Spanish_tamarind'}, {'id': 20395, 'synset': 'abelia.n.01', 'name': 'abelia'}, {'id': 20396, 'synset': 'bush_honeysuckle.n.02', 'name': 'bush_honeysuckle'}, {'id': 20397, 'synset': 'american_twinflower.n.01', 'name': 'American_twinflower'}, {'id': 20398, 'synset': 'honeysuckle.n.01', 'name': 'honeysuckle'}, {'id': 20399, 'synset': 'american_fly_honeysuckle.n.01', 'name': 'American_fly_honeysuckle'}, {'id': 20400, 'synset': 'italian_honeysuckle.n.01', 'name': 'Italian_honeysuckle'}, {'id': 20401, 'synset': 'yellow_honeysuckle.n.01', 'name': 'yellow_honeysuckle'}, {'id': 20402, 'synset': 'hairy_honeysuckle.n.01', 'name': 'hairy_honeysuckle'}, {'id': 20403, 'synset': 'japanese_honeysuckle.n.01', 'name': 'Japanese_honeysuckle'}, {'id': 20404, 'synset': "hall's_honeysuckle.n.01", 'name': "Hall's_honeysuckle"}, {'id': 20405, 'synset': "morrow's_honeysuckle.n.01", 'name': "Morrow's_honeysuckle"}, {'id': 20406, 'synset': 'woodbine.n.02', 'name': 'woodbine'}, {'id': 20407, 'synset': 'trumpet_honeysuckle.n.01', 'name': 'trumpet_honeysuckle'}, {'id': 20408, 'synset': 'european_fly_honeysuckle.n.01', 'name': 'European_fly_honeysuckle'}, {'id': 20409, 'synset': 'swamp_fly_honeysuckle.n.01', 'name': 'swamp_fly_honeysuckle'}, {'id': 20410, 'synset': 'snowberry.n.01', 'name': 'snowberry'}, {'id': 20411, 'synset': 'coralberry.n.01', 'name': 'coralberry'}, {'id': 20412, 'synset': 'blue_elder.n.01', 'name': 'blue_elder'}, {'id': 20413, 'synset': 'dwarf_elder.n.01', 'name': 'dwarf_elder'}, {'id': 20414, 'synset': 'american_red_elder.n.01', 'name': 'American_red_elder'}, {'id': 20415, 'synset': 'european_red_elder.n.01', 'name': 'European_red_elder'}, {'id': 20416, 'synset': 'feverroot.n.01', 'name': 'feverroot'}, {'id': 20417, 'synset': 'cranberry_bush.n.01', 'name': 'cranberry_bush'}, {'id': 20418, 'synset': 'wayfaring_tree.n.01', 'name': 'wayfaring_tree'}, {'id': 20419, 'synset': 'guelder_rose.n.01', 'name': 'guelder_rose'}, {'id': 20420, 'synset': 'arrow_wood.n.01', 'name': 'arrow_wood'}, {'id': 20421, 'synset': 'black_haw.n.02', 'name': 'black_haw'}, {'id': 20422, 'synset': 'weigela.n.01', 'name': 'weigela'}, {'id': 20423, 'synset': 'teasel.n.01', 'name': 'teasel'}, {'id': 20424, 'synset': 'common_teasel.n.01', 'name': 'common_teasel'}, {'id': 20425, 'synset': "fuller's_teasel.n.01", 'name': "fuller's_teasel"}, {'id': 20426, 'synset': 'wild_teasel.n.01', 'name': 'wild_teasel'}, {'id': 20427, 'synset': 'scabious.n.01', 'name': 'scabious'}, {'id': 20428, 'synset': 'sweet_scabious.n.01', 'name': 'sweet_scabious'}, {'id': 20429, 'synset': 'field_scabious.n.01', 'name': 'field_scabious'}, {'id': 20430, 'synset': 'jewelweed.n.01', 'name': 'jewelweed'}, {'id': 20431, 'synset': 'geranium.n.01', 'name': 'geranium'}, {'id': 20432, 'synset': 'cranesbill.n.01', 'name': 'cranesbill'}, {'id': 20433, 'synset': 'wild_geranium.n.01', 'name': 'wild_geranium'}, {'id': 20434, 'synset': 'meadow_cranesbill.n.01', 'name': 'meadow_cranesbill'}, {'id': 20435, 'synset': "richardson's_geranium.n.01", 'name': "Richardson's_geranium"}, {'id': 20436, 'synset': 'herb_robert.n.01', 'name': 'herb_robert'}, {'id': 20437, 'synset': 'sticky_geranium.n.01', 'name': 'sticky_geranium'}, {'id': 20438, 'synset': "dove's_foot_geranium.n.01", 'name': "dove's_foot_geranium"}, {'id': 20439, 'synset': 'rose_geranium.n.01', 'name': 'rose_geranium'}, {'id': 20440, 'synset': 'fish_geranium.n.01', 'name': 'fish_geranium'}, {'id': 20441, 'synset': 'ivy_geranium.n.01', 'name': 'ivy_geranium'}, {'id': 20442, 'synset': 'apple_geranium.n.01', 'name': 'apple_geranium'}, {'id': 20443, 'synset': 'lemon_geranium.n.01', 'name': 'lemon_geranium'}, {'id': 20444, 'synset': 'storksbill.n.01', 'name': 'storksbill'}, {'id': 20445, 'synset': 'musk_clover.n.01', 'name': 'musk_clover'}, {'id': 20446, 'synset': 'incense_tree.n.01', 'name': 'incense_tree'}, {'id': 20447, 'synset': 'elephant_tree.n.01', 'name': 'elephant_tree'}, {'id': 20448, 'synset': 'gumbo-limbo.n.01', 'name': 'gumbo-limbo'}, {'id': 20449, 'synset': 'boswellia_carteri.n.01', 'name': 'Boswellia_carteri'}, {'id': 20450, 'synset': 'salai.n.01', 'name': 'salai'}, {'id': 20451, 'synset': 'balm_of_gilead.n.03', 'name': 'balm_of_gilead'}, {'id': 20452, 'synset': 'myrrh_tree.n.01', 'name': 'myrrh_tree'}, {'id': 20453, 'synset': 'protium_heptaphyllum.n.01', 'name': 'Protium_heptaphyllum'}, {'id': 20454, 'synset': 'protium_guianense.n.01', 'name': 'Protium_guianense'}, {'id': 20455, 'synset': 'water_starwort.n.01', 'name': 'water_starwort'}, {'id': 20456, 'synset': 'barbados_cherry.n.01', 'name': 'barbados_cherry'}, {'id': 20457, 'synset': 'mahogany.n.02', 'name': 'mahogany'}, {'id': 20458, 'synset': 'chinaberry.n.02', 'name': 'chinaberry'}, {'id': 20459, 'synset': 'neem.n.01', 'name': 'neem'}, {'id': 20460, 'synset': 'neem_seed.n.01', 'name': 'neem_seed'}, {'id': 20461, 'synset': 'spanish_cedar.n.01', 'name': 'Spanish_cedar'}, {'id': 20462, 'synset': 'satinwood.n.03', 'name': 'satinwood'}, {'id': 20463, 'synset': 'african_scented_mahogany.n.01', 'name': 'African_scented_mahogany'}, {'id': 20464, 'synset': 'silver_ash.n.01', 'name': 'silver_ash'}, {'id': 20465, 'synset': 'native_beech.n.01', 'name': 'native_beech'}, {'id': 20466, 'synset': 'bunji-bunji.n.01', 'name': 'bunji-bunji'}, {'id': 20467, 'synset': 'african_mahogany.n.01', 'name': 'African_mahogany'}, {'id': 20468, 'synset': 'lanseh_tree.n.01', 'name': 'lanseh_tree'}, {'id': 20469, 'synset': 'true_mahogany.n.01', 'name': 'true_mahogany'}, {'id': 20470, 'synset': 'honduras_mahogany.n.01', 'name': 'Honduras_mahogany'}, {'id': 20471, 'synset': 'philippine_mahogany.n.02', 'name': 'Philippine_mahogany'}, {'id': 20472, 'synset': 'caracolito.n.01', 'name': 'caracolito'}, {'id': 20473, 'synset': 'common_wood_sorrel.n.01', 'name': 'common_wood_sorrel'}, {'id': 20474, 'synset': 'bermuda_buttercup.n.01', 'name': 'Bermuda_buttercup'}, {'id': 20475, 'synset': 'creeping_oxalis.n.01', 'name': 'creeping_oxalis'}, {'id': 20476, 'synset': 'goatsfoot.n.01', 'name': 'goatsfoot'}, {'id': 20477, 'synset': 'violet_wood_sorrel.n.01', 'name': 'violet_wood_sorrel'}, {'id': 20478, 'synset': 'oca.n.01', 'name': 'oca'}, {'id': 20479, 'synset': 'carambola.n.01', 'name': 'carambola'}, {'id': 20480, 'synset': 'bilimbi.n.01', 'name': 'bilimbi'}, {'id': 20481, 'synset': 'milkwort.n.01', 'name': 'milkwort'}, {'id': 20482, 'synset': 'senega.n.02', 'name': 'senega'}, {'id': 20483, 'synset': 'orange_milkwort.n.01', 'name': 'orange_milkwort'}, {'id': 20484, 'synset': 'flowering_wintergreen.n.01', 'name': 'flowering_wintergreen'}, {'id': 20485, 'synset': 'seneca_snakeroot.n.01', 'name': 'Seneca_snakeroot'}, {'id': 20486, 'synset': 'common_milkwort.n.01', 'name': 'common_milkwort'}, {'id': 20487, 'synset': 'rue.n.01', 'name': 'rue'}, {'id': 20488, 'synset': 'citrus.n.02', 'name': 'citrus'}, {'id': 20489, 'synset': 'orange.n.03', 'name': 'orange'}, {'id': 20490, 'synset': 'sour_orange.n.01', 'name': 'sour_orange'}, {'id': 20491, 'synset': 'bergamot.n.01', 'name': 'bergamot'}, {'id': 20492, 'synset': 'pomelo.n.01', 'name': 'pomelo'}, {'id': 20493, 'synset': 'citron.n.02', 'name': 'citron'}, {'id': 20494, 'synset': 'grapefruit.n.01', 'name': 'grapefruit'}, {'id': 20495, 'synset': 'mandarin.n.01', 'name': 'mandarin'}, {'id': 20496, 'synset': 'tangerine.n.01', 'name': 'tangerine'}, {'id': 20497, 'synset': 'satsuma.n.01', 'name': 'satsuma'}, {'id': 20498, 'synset': 'sweet_orange.n.02', 'name': 'sweet_orange'}, {'id': 20499, 'synset': 'temple_orange.n.01', 'name': 'temple_orange'}, {'id': 20500, 'synset': 'tangelo.n.01', 'name': 'tangelo'}, {'id': 20501, 'synset': 'rangpur.n.01', 'name': 'rangpur'}, {'id': 20502, 'synset': 'lemon.n.03', 'name': 'lemon'}, {'id': 20503, 'synset': 'sweet_lemon.n.01', 'name': 'sweet_lemon'}, {'id': 20504, 'synset': 'lime.n.04', 'name': 'lime'}, {'id': 20505, 'synset': 'citrange.n.01', 'name': 'citrange'}, {'id': 20506, 'synset': 'fraxinella.n.01', 'name': 'fraxinella'}, {'id': 20507, 'synset': 'kumquat.n.01', 'name': 'kumquat'}, {'id': 20508, 'synset': 'marumi.n.01', 'name': 'marumi'}, {'id': 20509, 'synset': 'nagami.n.01', 'name': 'nagami'}, {'id': 20510, 'synset': 'cork_tree.n.01', 'name': 'cork_tree'}, {'id': 20511, 'synset': 'trifoliate_orange.n.01', 'name': 'trifoliate_orange'}, {'id': 20512, 'synset': 'prickly_ash.n.01', 'name': 'prickly_ash'}, {'id': 20513, 'synset': 'toothache_tree.n.01', 'name': 'toothache_tree'}, {'id': 20514, 'synset': "hercules'-club.n.01", 'name': "Hercules'-club"}, {'id': 20515, 'synset': 'bitterwood_tree.n.01', 'name': 'bitterwood_tree'}, {'id': 20516, 'synset': 'marupa.n.01', 'name': 'marupa'}, {'id': 20517, 'synset': 'paradise_tree.n.01', 'name': 'paradise_tree'}, {'id': 20518, 'synset': 'ailanthus.n.01', 'name': 'ailanthus'}, {'id': 20519, 'synset': 'tree_of_heaven.n.01', 'name': 'tree_of_heaven'}, {'id': 20520, 'synset': 'wild_mango.n.01', 'name': 'wild_mango'}, {'id': 20521, 'synset': 'pepper_tree.n.02', 'name': 'pepper_tree'}, {'id': 20522, 'synset': 'jamaica_quassia.n.02', 'name': 'Jamaica_quassia'}, {'id': 20523, 'synset': 'quassia.n.02', 'name': 'quassia'}, {'id': 20524, 'synset': 'nasturtium.n.01', 'name': 'nasturtium'}, {'id': 20525, 'synset': 'garden_nasturtium.n.01', 'name': 'garden_nasturtium'}, {'id': 20526, 'synset': 'bush_nasturtium.n.01', 'name': 'bush_nasturtium'}, {'id': 20527, 'synset': 'canarybird_flower.n.01', 'name': 'canarybird_flower'}, {'id': 20528, 'synset': 'bean_caper.n.01', 'name': 'bean_caper'}, {'id': 20529, 'synset': 'palo_santo.n.01', 'name': 'palo_santo'}, {'id': 20530, 'synset': 'lignum_vitae.n.02', 'name': 'lignum_vitae'}, {'id': 20531, 'synset': 'creosote_bush.n.01', 'name': 'creosote_bush'}, {'id': 20532, 'synset': 'caltrop.n.01', 'name': 'caltrop'}, {'id': 20533, 'synset': 'willow.n.01', 'name': 'willow'}, {'id': 20534, 'synset': 'osier.n.02', 'name': 'osier'}, {'id': 20535, 'synset': 'white_willow.n.01', 'name': 'white_willow'}, {'id': 20536, 'synset': 'silver_willow.n.01', 'name': 'silver_willow'}, {'id': 20537, 'synset': 'golden_willow.n.01', 'name': 'golden_willow'}, {'id': 20538, 'synset': 'cricket-bat_willow.n.01', 'name': 'cricket-bat_willow'}, {'id': 20539, 'synset': 'arctic_willow.n.01', 'name': 'arctic_willow'}, {'id': 20540, 'synset': 'weeping_willow.n.01', 'name': 'weeping_willow'}, {'id': 20541, 'synset': 'wisconsin_weeping_willow.n.01', 'name': 'Wisconsin_weeping_willow'}, {'id': 20542, 'synset': 'pussy_willow.n.01', 'name': 'pussy_willow'}, {'id': 20543, 'synset': 'sallow.n.01', 'name': 'sallow'}, {'id': 20544, 'synset': 'goat_willow.n.01', 'name': 'goat_willow'}, {'id': 20545, 'synset': 'peachleaf_willow.n.01', 'name': 'peachleaf_willow'}, {'id': 20546, 'synset': 'almond_willow.n.01', 'name': 'almond_willow'}, {'id': 20547, 'synset': 'hoary_willow.n.01', 'name': 'hoary_willow'}, {'id': 20548, 'synset': 'crack_willow.n.01', 'name': 'crack_willow'}, {'id': 20549, 'synset': 'prairie_willow.n.01', 'name': 'prairie_willow'}, {'id': 20550, 'synset': 'dwarf_willow.n.01', 'name': 'dwarf_willow'}, {'id': 20551, 'synset': 'grey_willow.n.01', 'name': 'grey_willow'}, {'id': 20552, 'synset': 'arroyo_willow.n.01', 'name': 'arroyo_willow'}, {'id': 20553, 'synset': 'shining_willow.n.01', 'name': 'shining_willow'}, {'id': 20554, 'synset': 'swamp_willow.n.01', 'name': 'swamp_willow'}, {'id': 20555, 'synset': 'bay_willow.n.01', 'name': 'bay_willow'}, {'id': 20556, 'synset': 'purple_willow.n.01', 'name': 'purple_willow'}, {'id': 20557, 'synset': 'balsam_willow.n.01', 'name': 'balsam_willow'}, {'id': 20558, 'synset': 'creeping_willow.n.01', 'name': 'creeping_willow'}, {'id': 20559, 'synset': 'sitka_willow.n.01', 'name': 'Sitka_willow'}, {'id': 20560, 'synset': 'dwarf_grey_willow.n.01', 'name': 'dwarf_grey_willow'}, {'id': 20561, 'synset': 'bearberry_willow.n.01', 'name': 'bearberry_willow'}, {'id': 20562, 'synset': 'common_osier.n.01', 'name': 'common_osier'}, {'id': 20563, 'synset': 'poplar.n.02', 'name': 'poplar'}, {'id': 20564, 'synset': 'balsam_poplar.n.01', 'name': 'balsam_poplar'}, {'id': 20565, 'synset': 'white_poplar.n.01', 'name': 'white_poplar'}, {'id': 20566, 'synset': 'grey_poplar.n.01', 'name': 'grey_poplar'}, {'id': 20567, 'synset': 'black_poplar.n.01', 'name': 'black_poplar'}, {'id': 20568, 'synset': 'lombardy_poplar.n.01', 'name': 'Lombardy_poplar'}, {'id': 20569, 'synset': 'cottonwood.n.01', 'name': 'cottonwood'}, {'id': 20570, 'synset': 'eastern_cottonwood.n.01', 'name': 'Eastern_cottonwood'}, {'id': 20571, 'synset': 'black_cottonwood.n.02', 'name': 'black_cottonwood'}, {'id': 20572, 'synset': 'swamp_cottonwood.n.01', 'name': 'swamp_cottonwood'}, {'id': 20573, 'synset': 'aspen.n.01', 'name': 'aspen'}, {'id': 20574, 'synset': 'quaking_aspen.n.01', 'name': 'quaking_aspen'}, {'id': 20575, 'synset': 'american_quaking_aspen.n.01', 'name': 'American_quaking_aspen'}, {'id': 20576, 'synset': 'canadian_aspen.n.01', 'name': 'Canadian_aspen'}, {'id': 20577, 'synset': 'sandalwood_tree.n.01', 'name': 'sandalwood_tree'}, {'id': 20578, 'synset': 'quandong.n.01', 'name': 'quandong'}, {'id': 20579, 'synset': 'rabbitwood.n.01', 'name': 'rabbitwood'}, {'id': 20580, 'synset': 'loranthaceae.n.01', 'name': 'Loranthaceae'}, {'id': 20581, 'synset': 'mistletoe.n.03', 'name': 'mistletoe'}, {'id': 20582, 'synset': 'american_mistletoe.n.02', 'name': 'American_mistletoe'}, {'id': 20583, 'synset': 'mistletoe.n.02', 'name': 'mistletoe'}, {'id': 20584, 'synset': 'american_mistletoe.n.01', 'name': 'American_mistletoe'}, {'id': 20585, 'synset': 'aalii.n.01', 'name': 'aalii'}, {'id': 20586, 'synset': 'soapberry.n.01', 'name': 'soapberry'}, {'id': 20587, 'synset': 'wild_china_tree.n.01', 'name': 'wild_China_tree'}, {'id': 20588, 'synset': 'china_tree.n.01', 'name': 'China_tree'}, {'id': 20589, 'synset': 'akee.n.01', 'name': 'akee'}, {'id': 20590, 'synset': 'soapberry_vine.n.01', 'name': 'soapberry_vine'}, {'id': 20591, 'synset': 'heartseed.n.01', 'name': 'heartseed'}, {'id': 20592, 'synset': 'balloon_vine.n.01', 'name': 'balloon_vine'}, {'id': 20593, 'synset': 'longan.n.01', 'name': 'longan'}, {'id': 20594, 'synset': 'harpullia.n.01', 'name': 'harpullia'}, {'id': 20595, 'synset': 'harpulla.n.01', 'name': 'harpulla'}, {'id': 20596, 'synset': 'moreton_bay_tulipwood.n.01', 'name': 'Moreton_Bay_tulipwood'}, {'id': 20597, 'synset': 'litchi.n.01', 'name': 'litchi'}, {'id': 20598, 'synset': 'spanish_lime.n.01', 'name': 'Spanish_lime'}, {'id': 20599, 'synset': 'rambutan.n.01', 'name': 'rambutan'}, {'id': 20600, 'synset': 'pulasan.n.01', 'name': 'pulasan'}, {'id': 20601, 'synset': 'pachysandra.n.01', 'name': 'pachysandra'}, {'id': 20602, 'synset': 'allegheny_spurge.n.01', 'name': 'Allegheny_spurge'}, {'id': 20603, 'synset': 'bittersweet.n.02', 'name': 'bittersweet'}, {'id': 20604, 'synset': 'spindle_tree.n.01', 'name': 'spindle_tree'}, {'id': 20605, 'synset': 'winged_spindle_tree.n.01', 'name': 'winged_spindle_tree'}, {'id': 20606, 'synset': 'wahoo.n.02', 'name': 'wahoo'}, {'id': 20607, 'synset': 'strawberry_bush.n.01', 'name': 'strawberry_bush'}, {'id': 20608, 'synset': 'evergreen_bittersweet.n.01', 'name': 'evergreen_bittersweet'}, {'id': 20609, 'synset': 'cyrilla.n.01', 'name': 'cyrilla'}, {'id': 20610, 'synset': 'titi.n.01', 'name': 'titi'}, {'id': 20611, 'synset': 'crowberry.n.01', 'name': 'crowberry'}, {'id': 20612, 'synset': 'maple.n.02', 'name': 'maple'}, {'id': 20613, 'synset': 'silver_maple.n.01', 'name': 'silver_maple'}, {'id': 20614, 'synset': 'sugar_maple.n.01', 'name': 'sugar_maple'}, {'id': 20615, 'synset': 'red_maple.n.01', 'name': 'red_maple'}, {'id': 20616, 'synset': 'moosewood.n.01', 'name': 'moosewood'}, {'id': 20617, 'synset': 'oregon_maple.n.01', 'name': 'Oregon_maple'}, {'id': 20618, 'synset': 'dwarf_maple.n.01', 'name': 'dwarf_maple'}, {'id': 20619, 'synset': 'mountain_maple.n.01', 'name': 'mountain_maple'}, {'id': 20620, 'synset': 'vine_maple.n.01', 'name': 'vine_maple'}, {'id': 20621, 'synset': 'hedge_maple.n.01', 'name': 'hedge_maple'}, {'id': 20622, 'synset': 'norway_maple.n.01', 'name': 'Norway_maple'}, {'id': 20623, 'synset': 'sycamore.n.03', 'name': 'sycamore'}, {'id': 20624, 'synset': 'box_elder.n.01', 'name': 'box_elder'}, {'id': 20625, 'synset': 'california_box_elder.n.01', 'name': 'California_box_elder'}, {'id': 20626, 'synset': 'pointed-leaf_maple.n.01', 'name': 'pointed-leaf_maple'}, {'id': 20627, 'synset': 'japanese_maple.n.02', 'name': 'Japanese_maple'}, {'id': 20628, 'synset': 'japanese_maple.n.01', 'name': 'Japanese_maple'}, {'id': 20629, 'synset': 'holly.n.01', 'name': 'holly'}, {'id': 20630, 'synset': 'chinese_holly.n.01', 'name': 'Chinese_holly'}, {'id': 20631, 'synset': 'bearberry.n.02', 'name': 'bearberry'}, {'id': 20632, 'synset': 'inkberry.n.01', 'name': 'inkberry'}, {'id': 20633, 'synset': 'mate.n.07', 'name': 'mate'}, {'id': 20634, 'synset': 'american_holly.n.01', 'name': 'American_holly'}, {'id': 20635, 'synset': 'low_gallberry_holly.n.01', 'name': 'low_gallberry_holly'}, {'id': 20636, 'synset': 'tall_gallberry_holly.n.01', 'name': 'tall_gallberry_holly'}, {'id': 20637, 'synset': 'yaupon_holly.n.01', 'name': 'yaupon_holly'}, {'id': 20638, 'synset': 'deciduous_holly.n.01', 'name': 'deciduous_holly'}, {'id': 20639, 'synset': 'juneberry_holly.n.01', 'name': 'juneberry_holly'}, {'id': 20640, 'synset': 'largeleaf_holly.n.01', 'name': 'largeleaf_holly'}, {'id': 20641, 'synset': 'geogia_holly.n.01', 'name': 'Geogia_holly'}, {'id': 20642, 'synset': 'common_winterberry_holly.n.01', 'name': 'common_winterberry_holly'}, {'id': 20643, 'synset': 'smooth_winterberry_holly.n.01', 'name': 'smooth_winterberry_holly'}, {'id': 20644, 'synset': 'cashew.n.01', 'name': 'cashew'}, {'id': 20645, 'synset': 'goncalo_alves.n.01', 'name': 'goncalo_alves'}, {'id': 20646, 'synset': 'venetian_sumac.n.01', 'name': 'Venetian_sumac'}, {'id': 20647, 'synset': 'laurel_sumac.n.01', 'name': 'laurel_sumac'}, {'id': 20648, 'synset': 'mango.n.01', 'name': 'mango'}, {'id': 20649, 'synset': 'pistachio.n.01', 'name': 'pistachio'}, {'id': 20650, 'synset': 'terebinth.n.01', 'name': 'terebinth'}, {'id': 20651, 'synset': 'mastic.n.03', 'name': 'mastic'}, {'id': 20652, 'synset': 'australian_sumac.n.01', 'name': 'Australian_sumac'}, {'id': 20653, 'synset': 'sumac.n.02', 'name': 'sumac'}, {'id': 20654, 'synset': 'smooth_sumac.n.01', 'name': 'smooth_sumac'}, {'id': 20655, 'synset': 'sugar-bush.n.01', 'name': 'sugar-bush'}, {'id': 20656, 'synset': 'staghorn_sumac.n.01', 'name': 'staghorn_sumac'}, {'id': 20657, 'synset': 'squawbush.n.01', 'name': 'squawbush'}, {'id': 20658, 'synset': 'aroeira_blanca.n.01', 'name': 'aroeira_blanca'}, {'id': 20659, 'synset': 'pepper_tree.n.01', 'name': 'pepper_tree'}, {'id': 20660, 'synset': 'brazilian_pepper_tree.n.01', 'name': 'Brazilian_pepper_tree'}, {'id': 20661, 'synset': 'hog_plum.n.01', 'name': 'hog_plum'}, {'id': 20662, 'synset': 'mombin.n.01', 'name': 'mombin'}, {'id': 20663, 'synset': 'poison_ash.n.01', 'name': 'poison_ash'}, {'id': 20664, 'synset': 'poison_ivy.n.02', 'name': 'poison_ivy'}, {'id': 20665, 'synset': 'western_poison_oak.n.01', 'name': 'western_poison_oak'}, {'id': 20666, 'synset': 'eastern_poison_oak.n.01', 'name': 'eastern_poison_oak'}, {'id': 20667, 'synset': 'varnish_tree.n.02', 'name': 'varnish_tree'}, {'id': 20668, 'synset': 'horse_chestnut.n.01', 'name': 'horse_chestnut'}, {'id': 20669, 'synset': 'buckeye.n.01', 'name': 'buckeye'}, {'id': 20670, 'synset': 'sweet_buckeye.n.01', 'name': 'sweet_buckeye'}, {'id': 20671, 'synset': 'ohio_buckeye.n.01', 'name': 'Ohio_buckeye'}, {'id': 20672, 'synset': 'dwarf_buckeye.n.01', 'name': 'dwarf_buckeye'}, {'id': 20673, 'synset': 'red_buckeye.n.01', 'name': 'red_buckeye'}, {'id': 20674, 'synset': 'particolored_buckeye.n.01', 'name': 'particolored_buckeye'}, {'id': 20675, 'synset': 'ebony.n.03', 'name': 'ebony'}, {'id': 20676, 'synset': 'marblewood.n.02', 'name': 'marblewood'}, {'id': 20677, 'synset': 'marblewood.n.01', 'name': 'marblewood'}, {'id': 20678, 'synset': 'persimmon.n.01', 'name': 'persimmon'}, {'id': 20679, 'synset': 'japanese_persimmon.n.01', 'name': 'Japanese_persimmon'}, {'id': 20680, 'synset': 'american_persimmon.n.01', 'name': 'American_persimmon'}, {'id': 20681, 'synset': 'date_plum.n.01', 'name': 'date_plum'}, {'id': 20682, 'synset': 'buckthorn.n.02', 'name': 'buckthorn'}, {'id': 20683, 'synset': 'southern_buckthorn.n.01', 'name': 'southern_buckthorn'}, {'id': 20684, 'synset': 'false_buckthorn.n.01', 'name': 'false_buckthorn'}, {'id': 20685, 'synset': 'star_apple.n.01', 'name': 'star_apple'}, {'id': 20686, 'synset': 'satinleaf.n.01', 'name': 'satinleaf'}, {'id': 20687, 'synset': 'balata.n.02', 'name': 'balata'}, {'id': 20688, 'synset': 'sapodilla.n.01', 'name': 'sapodilla'}, {'id': 20689, 'synset': 'gutta-percha_tree.n.02', 'name': 'gutta-percha_tree'}, {'id': 20690, 'synset': 'gutta-percha_tree.n.01', 'name': 'gutta-percha_tree'}, {'id': 20691, 'synset': 'canistel.n.01', 'name': 'canistel'}, {'id': 20692, 'synset': 'marmalade_tree.n.01', 'name': 'marmalade_tree'}, {'id': 20693, 'synset': 'sweetleaf.n.01', 'name': 'sweetleaf'}, {'id': 20694, 'synset': 'asiatic_sweetleaf.n.01', 'name': 'Asiatic_sweetleaf'}, {'id': 20695, 'synset': 'styrax.n.01', 'name': 'styrax'}, {'id': 20696, 'synset': 'snowbell.n.01', 'name': 'snowbell'}, {'id': 20697, 'synset': 'japanese_snowbell.n.01', 'name': 'Japanese_snowbell'}, {'id': 20698, 'synset': 'texas_snowbell.n.01', 'name': 'Texas_snowbell'}, {'id': 20699, 'synset': 'silver-bell_tree.n.01', 'name': 'silver-bell_tree'}, {'id': 20700, 'synset': 'carnivorous_plant.n.01', 'name': 'carnivorous_plant'}, {'id': 20701, 'synset': 'pitcher_plant.n.01', 'name': 'pitcher_plant'}, {'id': 20702, 'synset': 'common_pitcher_plant.n.01', 'name': 'common_pitcher_plant'}, {'id': 20703, 'synset': 'hooded_pitcher_plant.n.01', 'name': 'hooded_pitcher_plant'}, {'id': 20704, 'synset': "huntsman's_horn.n.01", 'name': "huntsman's_horn"}, {'id': 20705, 'synset': 'tropical_pitcher_plant.n.01', 'name': 'tropical_pitcher_plant'}, {'id': 20706, 'synset': 'sundew.n.01', 'name': 'sundew'}, {'id': 20707, 'synset': "venus's_flytrap.n.01", 'name': "Venus's_flytrap"}, {'id': 20708, 'synset': 'waterwheel_plant.n.01', 'name': 'waterwheel_plant'}, {'id': 20709, 'synset': 'drosophyllum_lusitanicum.n.01', 'name': 'Drosophyllum_lusitanicum'}, {'id': 20710, 'synset': 'roridula.n.01', 'name': 'roridula'}, {'id': 20711, 'synset': 'australian_pitcher_plant.n.01', 'name': 'Australian_pitcher_plant'}, {'id': 20712, 'synset': 'sedum.n.01', 'name': 'sedum'}, {'id': 20713, 'synset': 'stonecrop.n.01', 'name': 'stonecrop'}, {'id': 20714, 'synset': 'rose-root.n.01', 'name': 'rose-root'}, {'id': 20715, 'synset': 'orpine.n.01', 'name': 'orpine'}, {'id': 20716, 'synset': 'pinwheel.n.01', 'name': 'pinwheel'}, {'id': 20717, 'synset': 'christmas_bush.n.01', 'name': 'Christmas_bush'}, {'id': 20718, 'synset': 'hortensia.n.01', 'name': 'hortensia'}, {'id': 20719, 'synset': 'fall-blooming_hydrangea.n.01', 'name': 'fall-blooming_hydrangea'}, {'id': 20720, 'synset': 'carpenteria.n.01', 'name': 'carpenteria'}, {'id': 20721, 'synset': 'decumary.n.01', 'name': 'decumary'}, {'id': 20722, 'synset': 'deutzia.n.01', 'name': 'deutzia'}, {'id': 20723, 'synset': 'philadelphus.n.01', 'name': 'philadelphus'}, {'id': 20724, 'synset': 'mock_orange.n.01', 'name': 'mock_orange'}, {'id': 20725, 'synset': 'saxifrage.n.01', 'name': 'saxifrage'}, {'id': 20726, 'synset': 'yellow_mountain_saxifrage.n.01', 'name': 'yellow_mountain_saxifrage'}, {'id': 20727, 'synset': 'meadow_saxifrage.n.01', 'name': 'meadow_saxifrage'}, {'id': 20728, 'synset': 'mossy_saxifrage.n.01', 'name': 'mossy_saxifrage'}, {'id': 20729, 'synset': 'western_saxifrage.n.01', 'name': 'western_saxifrage'}, {'id': 20730, 'synset': 'purple_saxifrage.n.01', 'name': 'purple_saxifrage'}, {'id': 20731, 'synset': 'star_saxifrage.n.01', 'name': 'star_saxifrage'}, {'id': 20732, 'synset': 'strawberry_geranium.n.01', 'name': 'strawberry_geranium'}, {'id': 20733, 'synset': 'astilbe.n.01', 'name': 'astilbe'}, {'id': 20734, 'synset': 'false_goatsbeard.n.01', 'name': 'false_goatsbeard'}, {'id': 20735, 'synset': 'dwarf_astilbe.n.01', 'name': 'dwarf_astilbe'}, {'id': 20736, 'synset': 'spirea.n.01', 'name': 'spirea'}, {'id': 20737, 'synset': 'bergenia.n.01', 'name': 'bergenia'}, {'id': 20738, 'synset': 'coast_boykinia.n.01', 'name': 'coast_boykinia'}, {'id': 20739, 'synset': 'golden_saxifrage.n.01', 'name': 'golden_saxifrage'}, {'id': 20740, 'synset': 'umbrella_plant.n.01', 'name': 'umbrella_plant'}, {'id': 20741, 'synset': 'bridal_wreath.n.01', 'name': 'bridal_wreath'}, {'id': 20742, 'synset': 'alumroot.n.01', 'name': 'alumroot'}, {'id': 20743, 'synset': 'coralbells.n.01', 'name': 'coralbells'}, {'id': 20744, 'synset': 'leatherleaf_saxifrage.n.01', 'name': 'leatherleaf_saxifrage'}, {'id': 20745, 'synset': 'woodland_star.n.01', 'name': 'woodland_star'}, {'id': 20746, 'synset': 'prairie_star.n.01', 'name': 'prairie_star'}, {'id': 20747, 'synset': 'miterwort.n.01', 'name': 'miterwort'}, {'id': 20748, 'synset': "five-point_bishop's_cap.n.01", 'name': "five-point_bishop's_cap"}, {'id': 20749, 'synset': 'parnassia.n.01', 'name': 'parnassia'}, {'id': 20750, 'synset': 'bog_star.n.01', 'name': 'bog_star'}, {'id': 20751, 'synset': 'fringed_grass_of_parnassus.n.01', 'name': 'fringed_grass_of_Parnassus'}, {'id': 20752, 'synset': 'false_alumroot.n.01', 'name': 'false_alumroot'}, {'id': 20753, 'synset': 'foamflower.n.01', 'name': 'foamflower'}, {'id': 20754, 'synset': 'false_miterwort.n.01', 'name': 'false_miterwort'}, {'id': 20755, 'synset': 'pickaback_plant.n.01', 'name': 'pickaback_plant'}, {'id': 20756, 'synset': 'currant.n.02', 'name': 'currant'}, {'id': 20757, 'synset': 'black_currant.n.01', 'name': 'black_currant'}, {'id': 20758, 'synset': 'white_currant.n.01', 'name': 'white_currant'}, {'id': 20759, 'synset': 'gooseberry.n.01', 'name': 'gooseberry'}, {'id': 20760, 'synset': 'plane_tree.n.01', 'name': 'plane_tree'}, {'id': 20761, 'synset': 'london_plane.n.01', 'name': 'London_plane'}, {'id': 20762, 'synset': 'american_sycamore.n.01', 'name': 'American_sycamore'}, {'id': 20763, 'synset': 'oriental_plane.n.01', 'name': 'oriental_plane'}, {'id': 20764, 'synset': 'california_sycamore.n.01', 'name': 'California_sycamore'}, {'id': 20765, 'synset': 'arizona_sycamore.n.01', 'name': 'Arizona_sycamore'}, {'id': 20766, 'synset': 'greek_valerian.n.01', 'name': 'Greek_valerian'}, {'id': 20767, 'synset': "northern_jacob's_ladder.n.01", 'name': "northern_Jacob's_ladder"}, {'id': 20768, 'synset': 'skunkweed.n.01', 'name': 'skunkweed'}, {'id': 20769, 'synset': 'phlox.n.01', 'name': 'phlox'}, {'id': 20770, 'synset': 'moss_pink.n.02', 'name': 'moss_pink'}, {'id': 20771, 'synset': 'evening-snow.n.01', 'name': 'evening-snow'}, {'id': 20772, 'synset': 'acanthus.n.01', 'name': 'acanthus'}, {'id': 20773, 'synset': "bear's_breech.n.01", 'name': "bear's_breech"}, {'id': 20774, 'synset': 'caricature_plant.n.01', 'name': 'caricature_plant'}, {'id': 20775, 'synset': 'black-eyed_susan.n.01', 'name': 'black-eyed_Susan'}, {'id': 20776, 'synset': 'catalpa.n.01', 'name': 'catalpa'}, {'id': 20777, 'synset': 'catalpa_bignioides.n.01', 'name': 'Catalpa_bignioides'}, {'id': 20778, 'synset': 'catalpa_speciosa.n.01', 'name': 'Catalpa_speciosa'}, {'id': 20779, 'synset': 'desert_willow.n.01', 'name': 'desert_willow'}, {'id': 20780, 'synset': 'calabash.n.02', 'name': 'calabash'}, {'id': 20781, 'synset': 'calabash.n.01', 'name': 'calabash'}, {'id': 20782, 'synset': 'borage.n.01', 'name': 'borage'}, {'id': 20783, 'synset': 'common_amsinckia.n.01', 'name': 'common_amsinckia'}, {'id': 20784, 'synset': 'anchusa.n.01', 'name': 'anchusa'}, {'id': 20785, 'synset': 'bugloss.n.01', 'name': 'bugloss'}, {'id': 20786, 'synset': 'cape_forget-me-not.n.02', 'name': 'cape_forget-me-not'}, {'id': 20787, 'synset': 'cape_forget-me-not.n.01', 'name': 'cape_forget-me-not'}, {'id': 20788, 'synset': 'spanish_elm.n.02', 'name': 'Spanish_elm'}, {'id': 20789, 'synset': 'princewood.n.01', 'name': 'princewood'}, {'id': 20790, 'synset': 'chinese_forget-me-not.n.01', 'name': 'Chinese_forget-me-not'}, {'id': 20791, 'synset': "hound's-tongue.n.02", 'name': "hound's-tongue"}, {'id': 20792, 'synset': "hound's-tongue.n.01", 'name': "hound's-tongue"}, {'id': 20793, 'synset': 'blueweed.n.01', 'name': 'blueweed'}, {'id': 20794, 'synset': "beggar's_lice.n.01", 'name': "beggar's_lice"}, {'id': 20795, 'synset': 'gromwell.n.01', 'name': 'gromwell'}, {'id': 20796, 'synset': 'puccoon.n.01', 'name': 'puccoon'}, {'id': 20797, 'synset': 'virginia_bluebell.n.01', 'name': 'Virginia_bluebell'}, {'id': 20798, 'synset': 'garden_forget-me-not.n.01', 'name': 'garden_forget-me-not'}, {'id': 20799, 'synset': 'forget-me-not.n.01', 'name': 'forget-me-not'}, {'id': 20800, 'synset': 'false_gromwell.n.01', 'name': 'false_gromwell'}, {'id': 20801, 'synset': 'comfrey.n.01', 'name': 'comfrey'}, {'id': 20802, 'synset': 'common_comfrey.n.01', 'name': 'common_comfrey'}, {'id': 20803, 'synset': 'convolvulus.n.01', 'name': 'convolvulus'}, {'id': 20804, 'synset': 'bindweed.n.01', 'name': 'bindweed'}, {'id': 20805, 'synset': 'field_bindweed.n.01', 'name': 'field_bindweed'}, {'id': 20806, 'synset': 'scammony.n.03', 'name': 'scammony'}, {'id': 20807, 'synset': 'silverweed.n.01', 'name': 'silverweed'}, {'id': 20808, 'synset': 'dodder.n.01', 'name': 'dodder'}, {'id': 20809, 'synset': 'dichondra.n.01', 'name': 'dichondra'}, {'id': 20810, 'synset': 'cypress_vine.n.01', 'name': 'cypress_vine'}, {'id': 20811, 'synset': 'moonflower.n.01', 'name': 'moonflower'}, {'id': 20812, 'synset': 'wild_potato_vine.n.01', 'name': 'wild_potato_vine'}, {'id': 20813, 'synset': 'red_morning-glory.n.01', 'name': 'red_morning-glory'}, {'id': 20814, 'synset': 'man-of-the-earth.n.01', 'name': 'man-of-the-earth'}, {'id': 20815, 'synset': 'scammony.n.01', 'name': 'scammony'}, {'id': 20816, 'synset': 'japanese_morning_glory.n.01', 'name': 'Japanese_morning_glory'}, {'id': 20817, 'synset': 'imperial_japanese_morning_glory.n.01', 'name': 'imperial_Japanese_morning_glory'}, {'id': 20818, 'synset': 'gesneriad.n.01', 'name': 'gesneriad'}, {'id': 20819, 'synset': 'gesneria.n.01', 'name': 'gesneria'}, {'id': 20820, 'synset': 'achimenes.n.01', 'name': 'achimenes'}, {'id': 20821, 'synset': 'aeschynanthus.n.01', 'name': 'aeschynanthus'}, {'id': 20822, 'synset': 'lace-flower_vine.n.01', 'name': 'lace-flower_vine'}, {'id': 20823, 'synset': 'columnea.n.01', 'name': 'columnea'}, {'id': 20824, 'synset': 'episcia.n.01', 'name': 'episcia'}, {'id': 20825, 'synset': 'gloxinia.n.01', 'name': 'gloxinia'}, {'id': 20826, 'synset': 'canterbury_bell.n.01', 'name': 'Canterbury_bell'}, {'id': 20827, 'synset': 'kohleria.n.01', 'name': 'kohleria'}, {'id': 20828, 'synset': 'african_violet.n.01', 'name': 'African_violet'}, {'id': 20829, 'synset': 'streptocarpus.n.01', 'name': 'streptocarpus'}, {'id': 20830, 'synset': 'cape_primrose.n.01', 'name': 'Cape_primrose'}, {'id': 20831, 'synset': 'waterleaf.n.01', 'name': 'waterleaf'}, {'id': 20832, 'synset': 'virginia_waterleaf.n.01', 'name': 'Virginia_waterleaf'}, {'id': 20833, 'synset': 'yellow_bells.n.01', 'name': 'yellow_bells'}, {'id': 20834, 'synset': 'yerba_santa.n.01', 'name': 'yerba_santa'}, {'id': 20835, 'synset': 'nemophila.n.01', 'name': 'nemophila'}, {'id': 20836, 'synset': 'baby_blue-eyes.n.01', 'name': 'baby_blue-eyes'}, {'id': 20837, 'synset': 'five-spot.n.02', 'name': 'five-spot'}, {'id': 20838, 'synset': 'scorpionweed.n.01', 'name': 'scorpionweed'}, {'id': 20839, 'synset': 'california_bluebell.n.02', 'name': 'California_bluebell'}, {'id': 20840, 'synset': 'california_bluebell.n.01', 'name': 'California_bluebell'}, {'id': 20841, 'synset': 'fiddleneck.n.01', 'name': 'fiddleneck'}, {'id': 20842, 'synset': 'fiesta_flower.n.01', 'name': 'fiesta_flower'}, {'id': 20843, 'synset': 'basil_thyme.n.01', 'name': 'basil_thyme'}, {'id': 20844, 'synset': 'giant_hyssop.n.01', 'name': 'giant_hyssop'}, {'id': 20845, 'synset': 'yellow_giant_hyssop.n.01', 'name': 'yellow_giant_hyssop'}, {'id': 20846, 'synset': 'anise_hyssop.n.01', 'name': 'anise_hyssop'}, {'id': 20847, 'synset': 'mexican_hyssop.n.01', 'name': 'Mexican_hyssop'}, {'id': 20848, 'synset': 'bugle.n.02', 'name': 'bugle'}, {'id': 20849, 'synset': 'creeping_bugle.n.01', 'name': 'creeping_bugle'}, {'id': 20850, 'synset': 'erect_bugle.n.01', 'name': 'erect_bugle'}, {'id': 20851, 'synset': 'pyramid_bugle.n.01', 'name': 'pyramid_bugle'}, {'id': 20852, 'synset': 'wood_mint.n.01', 'name': 'wood_mint'}, {'id': 20853, 'synset': 'hairy_wood_mint.n.01', 'name': 'hairy_wood_mint'}, {'id': 20854, 'synset': 'downy_wood_mint.n.01', 'name': 'downy_wood_mint'}, {'id': 20855, 'synset': 'calamint.n.01', 'name': 'calamint'}, {'id': 20856, 'synset': 'common_calamint.n.01', 'name': 'common_calamint'}, {'id': 20857, 'synset': 'large-flowered_calamint.n.01', 'name': 'large-flowered_calamint'}, {'id': 20858, 'synset': 'lesser_calamint.n.01', 'name': 'lesser_calamint'}, {'id': 20859, 'synset': 'wild_basil.n.01', 'name': 'wild_basil'}, {'id': 20860, 'synset': 'horse_balm.n.01', 'name': 'horse_balm'}, {'id': 20861, 'synset': 'coleus.n.01', 'name': 'coleus'}, {'id': 20862, 'synset': 'country_borage.n.01', 'name': 'country_borage'}, {'id': 20863, 'synset': 'painted_nettle.n.01', 'name': 'painted_nettle'}, {'id': 20864, 'synset': 'apalachicola_rosemary.n.01', 'name': 'Apalachicola_rosemary'}, {'id': 20865, 'synset': 'dragonhead.n.01', 'name': 'dragonhead'}, {'id': 20866, 'synset': 'elsholtzia.n.01', 'name': 'elsholtzia'}, {'id': 20867, 'synset': 'hemp_nettle.n.01', 'name': 'hemp_nettle'}, {'id': 20868, 'synset': 'ground_ivy.n.01', 'name': 'ground_ivy'}, {'id': 20869, 'synset': 'pennyroyal.n.02', 'name': 'pennyroyal'}, {'id': 20870, 'synset': 'hyssop.n.01', 'name': 'hyssop'}, {'id': 20871, 'synset': 'dead_nettle.n.02', 'name': 'dead_nettle'}, {'id': 20872, 'synset': 'white_dead_nettle.n.01', 'name': 'white_dead_nettle'}, {'id': 20873, 'synset': 'henbit.n.01', 'name': 'henbit'}, {'id': 20874, 'synset': 'english_lavender.n.01', 'name': 'English_lavender'}, {'id': 20875, 'synset': 'french_lavender.n.02', 'name': 'French_lavender'}, {'id': 20876, 'synset': 'spike_lavender.n.01', 'name': 'spike_lavender'}, {'id': 20877, 'synset': 'dagga.n.01', 'name': 'dagga'}, {'id': 20878, 'synset': "lion's-ear.n.01", 'name': "lion's-ear"}, {'id': 20879, 'synset': 'motherwort.n.01', 'name': 'motherwort'}, {'id': 20880, 'synset': 'pitcher_sage.n.02', 'name': 'pitcher_sage'}, {'id': 20881, 'synset': 'bugleweed.n.01', 'name': 'bugleweed'}, {'id': 20882, 'synset': 'water_horehound.n.01', 'name': 'water_horehound'}, {'id': 20883, 'synset': 'gipsywort.n.01', 'name': 'gipsywort'}, {'id': 20884, 'synset': 'origanum.n.01', 'name': 'origanum'}, {'id': 20885, 'synset': 'oregano.n.01', 'name': 'oregano'}, {'id': 20886, 'synset': 'sweet_marjoram.n.01', 'name': 'sweet_marjoram'}, {'id': 20887, 'synset': 'horehound.n.01', 'name': 'horehound'}, {'id': 20888, 'synset': 'common_horehound.n.01', 'name': 'common_horehound'}, {'id': 20889, 'synset': 'lemon_balm.n.01', 'name': 'lemon_balm'}, {'id': 20890, 'synset': 'corn_mint.n.01', 'name': 'corn_mint'}, {'id': 20891, 'synset': 'water-mint.n.01', 'name': 'water-mint'}, {'id': 20892, 'synset': 'bergamot_mint.n.02', 'name': 'bergamot_mint'}, {'id': 20893, 'synset': 'horsemint.n.03', 'name': 'horsemint'}, {'id': 20894, 'synset': 'peppermint.n.01', 'name': 'peppermint'}, {'id': 20895, 'synset': 'spearmint.n.01', 'name': 'spearmint'}, {'id': 20896, 'synset': 'apple_mint.n.01', 'name': 'apple_mint'}, {'id': 20897, 'synset': 'pennyroyal.n.01', 'name': 'pennyroyal'}, {'id': 20898, 'synset': 'yerba_buena.n.01', 'name': 'yerba_buena'}, {'id': 20899, 'synset': 'molucca_balm.n.01', 'name': 'molucca_balm'}, {'id': 20900, 'synset': 'monarda.n.01', 'name': 'monarda'}, {'id': 20901, 'synset': 'bee_balm.n.02', 'name': 'bee_balm'}, {'id': 20902, 'synset': 'horsemint.n.02', 'name': 'horsemint'}, {'id': 20903, 'synset': 'bee_balm.n.01', 'name': 'bee_balm'}, {'id': 20904, 'synset': 'lemon_mint.n.01', 'name': 'lemon_mint'}, {'id': 20905, 'synset': 'plains_lemon_monarda.n.01', 'name': 'plains_lemon_monarda'}, {'id': 20906, 'synset': 'basil_balm.n.01', 'name': 'basil_balm'}, {'id': 20907, 'synset': 'mustang_mint.n.01', 'name': 'mustang_mint'}, {'id': 20908, 'synset': 'catmint.n.01', 'name': 'catmint'}, {'id': 20909, 'synset': 'basil.n.01', 'name': 'basil'}, {'id': 20910, 'synset': 'beefsteak_plant.n.01', 'name': 'beefsteak_plant'}, {'id': 20911, 'synset': 'phlomis.n.01', 'name': 'phlomis'}, {'id': 20912, 'synset': 'jerusalem_sage.n.01', 'name': 'Jerusalem_sage'}, {'id': 20913, 'synset': 'physostegia.n.01', 'name': 'physostegia'}, {'id': 20914, 'synset': 'plectranthus.n.01', 'name': 'plectranthus'}, {'id': 20915, 'synset': 'patchouli.n.01', 'name': 'patchouli'}, {'id': 20916, 'synset': 'self-heal.n.01', 'name': 'self-heal'}, {'id': 20917, 'synset': 'mountain_mint.n.01', 'name': 'mountain_mint'}, {'id': 20918, 'synset': 'rosemary.n.01', 'name': 'rosemary'}, {'id': 20919, 'synset': 'clary_sage.n.01', 'name': 'clary_sage'}, {'id': 20920, 'synset': 'purple_sage.n.01', 'name': 'purple_sage'}, {'id': 20921, 'synset': 'cancerweed.n.01', 'name': 'cancerweed'}, {'id': 20922, 'synset': 'common_sage.n.01', 'name': 'common_sage'}, {'id': 20923, 'synset': 'meadow_clary.n.01', 'name': 'meadow_clary'}, {'id': 20924, 'synset': 'clary.n.01', 'name': 'clary'}, {'id': 20925, 'synset': 'pitcher_sage.n.01', 'name': 'pitcher_sage'}, {'id': 20926, 'synset': 'mexican_mint.n.01', 'name': 'Mexican_mint'}, {'id': 20927, 'synset': 'wild_sage.n.01', 'name': 'wild_sage'}, {'id': 20928, 'synset': 'savory.n.01', 'name': 'savory'}, {'id': 20929, 'synset': 'summer_savory.n.01', 'name': 'summer_savory'}, {'id': 20930, 'synset': 'winter_savory.n.01', 'name': 'winter_savory'}, {'id': 20931, 'synset': 'skullcap.n.02', 'name': 'skullcap'}, {'id': 20932, 'synset': 'blue_pimpernel.n.01', 'name': 'blue_pimpernel'}, {'id': 20933, 'synset': 'hedge_nettle.n.02', 'name': 'hedge_nettle'}, {'id': 20934, 'synset': 'hedge_nettle.n.01', 'name': 'hedge_nettle'}, {'id': 20935, 'synset': 'germander.n.01', 'name': 'germander'}, {'id': 20936, 'synset': 'american_germander.n.01', 'name': 'American_germander'}, {'id': 20937, 'synset': 'cat_thyme.n.01', 'name': 'cat_thyme'}, {'id': 20938, 'synset': 'wood_sage.n.01', 'name': 'wood_sage'}, {'id': 20939, 'synset': 'thyme.n.01', 'name': 'thyme'}, {'id': 20940, 'synset': 'common_thyme.n.01', 'name': 'common_thyme'}, {'id': 20941, 'synset': 'wild_thyme.n.01', 'name': 'wild_thyme'}, {'id': 20942, 'synset': 'blue_curls.n.01', 'name': 'blue_curls'}, {'id': 20943, 'synset': 'turpentine_camphor_weed.n.01', 'name': 'turpentine_camphor_weed'}, {'id': 20944, 'synset': 'bastard_pennyroyal.n.01', 'name': 'bastard_pennyroyal'}, {'id': 20945, 'synset': 'bladderwort.n.01', 'name': 'bladderwort'}, {'id': 20946, 'synset': 'butterwort.n.01', 'name': 'butterwort'}, {'id': 20947, 'synset': 'genlisea.n.01', 'name': 'genlisea'}, {'id': 20948, 'synset': 'martynia.n.01', 'name': 'martynia'}, {'id': 20949, 'synset': 'common_unicorn_plant.n.01', 'name': 'common_unicorn_plant'}, {'id': 20950, 'synset': "sand_devil's_claw.n.01", 'name': "sand_devil's_claw"}, {'id': 20951, 'synset': 'sweet_unicorn_plant.n.01', 'name': 'sweet_unicorn_plant'}, {'id': 20952, 'synset': 'figwort.n.01', 'name': 'figwort'}, {'id': 20953, 'synset': 'snapdragon.n.01', 'name': 'snapdragon'}, {'id': 20954, 'synset': 'white_snapdragon.n.01', 'name': 'white_snapdragon'}, {'id': 20955, 'synset': 'yellow_twining_snapdragon.n.01', 'name': 'yellow_twining_snapdragon'}, {'id': 20956, 'synset': 'mediterranean_snapdragon.n.01', 'name': 'Mediterranean_snapdragon'}, {'id': 20957, 'synset': 'kitten-tails.n.01', 'name': 'kitten-tails'}, {'id': 20958, 'synset': 'alpine_besseya.n.01', 'name': 'Alpine_besseya'}, {'id': 20959, 'synset': 'false_foxglove.n.02', 'name': 'false_foxglove'}, {'id': 20960, 'synset': 'false_foxglove.n.01', 'name': 'false_foxglove'}, {'id': 20961, 'synset': 'calceolaria.n.01', 'name': 'calceolaria'}, {'id': 20962, 'synset': 'indian_paintbrush.n.02', 'name': 'Indian_paintbrush'}, {'id': 20963, 'synset': 'desert_paintbrush.n.01', 'name': 'desert_paintbrush'}, {'id': 20964, 'synset': 'giant_red_paintbrush.n.01', 'name': 'giant_red_paintbrush'}, {'id': 20965, 'synset': 'great_plains_paintbrush.n.01', 'name': 'great_plains_paintbrush'}, {'id': 20966, 'synset': 'sulfur_paintbrush.n.01', 'name': 'sulfur_paintbrush'}, {'id': 20967, 'synset': 'shellflower.n.01', 'name': 'shellflower'}, {'id': 20968, 'synset': 'maiden_blue-eyed_mary.n.01', 'name': 'maiden_blue-eyed_Mary'}, {'id': 20969, 'synset': 'blue-eyed_mary.n.01', 'name': 'blue-eyed_Mary'}, {'id': 20970, 'synset': 'foxglove.n.01', 'name': 'foxglove'}, {'id': 20971, 'synset': 'common_foxglove.n.01', 'name': 'common_foxglove'}, {'id': 20972, 'synset': 'yellow_foxglove.n.01', 'name': 'yellow_foxglove'}, {'id': 20973, 'synset': 'gerardia.n.01', 'name': 'gerardia'}, {'id': 20974, 'synset': 'blue_toadflax.n.01', 'name': 'blue_toadflax'}, {'id': 20975, 'synset': 'toadflax.n.01', 'name': 'toadflax'}, {'id': 20976, 'synset': 'golden-beard_penstemon.n.01', 'name': 'golden-beard_penstemon'}, {'id': 20977, 'synset': 'scarlet_bugler.n.01', 'name': 'scarlet_bugler'}, {'id': 20978, 'synset': 'red_shrubby_penstemon.n.01', 'name': 'red_shrubby_penstemon'}, {'id': 20979, 'synset': 'platte_river_penstemon.n.01', 'name': 'Platte_River_penstemon'}, {'id': 20980, 'synset': 'hot-rock_penstemon.n.01', 'name': 'hot-rock_penstemon'}, {'id': 20981, 'synset': "jones'_penstemon.n.01", 'name': "Jones'_penstemon"}, {'id': 20982, 'synset': 'shrubby_penstemon.n.01', 'name': 'shrubby_penstemon'}, {'id': 20983, 'synset': 'narrow-leaf_penstemon.n.01', 'name': 'narrow-leaf_penstemon'}, {'id': 20984, 'synset': 'balloon_flower.n.01', 'name': 'balloon_flower'}, {'id': 20985, 'synset': "parry's_penstemon.n.01", 'name': "Parry's_penstemon"}, {'id': 20986, 'synset': 'rock_penstemon.n.01', 'name': 'rock_penstemon'}, {'id': 20987, 'synset': "rydberg's_penstemon.n.01", 'name': "Rydberg's_penstemon"}, {'id': 20988, 'synset': 'cascade_penstemon.n.01', 'name': 'cascade_penstemon'}, {'id': 20989, 'synset': "whipple's_penstemon.n.01", 'name': "Whipple's_penstemon"}, {'id': 20990, 'synset': 'moth_mullein.n.01', 'name': 'moth_mullein'}, {'id': 20991, 'synset': 'white_mullein.n.01', 'name': 'white_mullein'}, {'id': 20992, 'synset': 'purple_mullein.n.01', 'name': 'purple_mullein'}, {'id': 20993, 'synset': 'common_mullein.n.01', 'name': 'common_mullein'}, {'id': 20994, 'synset': 'veronica.n.01', 'name': 'veronica'}, {'id': 20995, 'synset': 'field_speedwell.n.01', 'name': 'field_speedwell'}, {'id': 20996, 'synset': 'brooklime.n.02', 'name': 'brooklime'}, {'id': 20997, 'synset': 'corn_speedwell.n.01', 'name': 'corn_speedwell'}, {'id': 20998, 'synset': 'brooklime.n.01', 'name': 'brooklime'}, {'id': 20999, 'synset': 'germander_speedwell.n.01', 'name': 'germander_speedwell'}, {'id': 21000, 'synset': 'water_speedwell.n.01', 'name': 'water_speedwell'}, {'id': 21001, 'synset': 'common_speedwell.n.01', 'name': 'common_speedwell'}, {'id': 21002, 'synset': 'purslane_speedwell.n.01', 'name': 'purslane_speedwell'}, {'id': 21003, 'synset': 'thyme-leaved_speedwell.n.01', 'name': 'thyme-leaved_speedwell'}, {'id': 21004, 'synset': 'nightshade.n.01', 'name': 'nightshade'}, {'id': 21005, 'synset': 'horse_nettle.n.01', 'name': 'horse_nettle'}, {'id': 21006, 'synset': 'african_holly.n.01', 'name': 'African_holly'}, {'id': 21007, 'synset': 'potato_vine.n.02', 'name': 'potato_vine'}, {'id': 21008, 'synset': 'garden_huckleberry.n.01', 'name': 'garden_huckleberry'}, {'id': 21009, 'synset': 'naranjilla.n.01', 'name': 'naranjilla'}, {'id': 21010, 'synset': 'potato_vine.n.01', 'name': 'potato_vine'}, {'id': 21011, 'synset': 'potato_tree.n.01', 'name': 'potato_tree'}, {'id': 21012, 'synset': 'belladonna.n.01', 'name': 'belladonna'}, {'id': 21013, 'synset': 'bush_violet.n.01', 'name': 'bush_violet'}, {'id': 21014, 'synset': 'lady-of-the-night.n.01', 'name': 'lady-of-the-night'}, {'id': 21015, 'synset': "angel's_trumpet.n.02", 'name': "angel's_trumpet"}, {'id': 21016, 'synset': "angel's_trumpet.n.01", 'name': "angel's_trumpet"}, {'id': 21017, 'synset': "red_angel's_trumpet.n.01", 'name': "red_angel's_trumpet"}, {'id': 21018, 'synset': 'cone_pepper.n.01', 'name': 'cone_pepper'}, {'id': 21019, 'synset': 'bird_pepper.n.01', 'name': 'bird_pepper'}, {'id': 21020, 'synset': 'day_jessamine.n.01', 'name': 'day_jessamine'}, {'id': 21021, 'synset': 'night_jasmine.n.01', 'name': 'night_jasmine'}, {'id': 21022, 'synset': 'tree_tomato.n.01', 'name': 'tree_tomato'}, {'id': 21023, 'synset': 'thorn_apple.n.01', 'name': 'thorn_apple'}, {'id': 21024, 'synset': 'jimsonweed.n.01', 'name': 'jimsonweed'}, {'id': 21025, 'synset': 'pichi.n.01', 'name': 'pichi'}, {'id': 21026, 'synset': 'henbane.n.01', 'name': 'henbane'}, {'id': 21027, 'synset': 'egyptian_henbane.n.01', 'name': 'Egyptian_henbane'}, {'id': 21028, 'synset': 'matrimony_vine.n.01', 'name': 'matrimony_vine'}, {'id': 21029, 'synset': 'common_matrimony_vine.n.01', 'name': 'common_matrimony_vine'}, {'id': 21030, 'synset': 'christmasberry.n.01', 'name': 'Christmasberry'}, {'id': 21031, 'synset': 'plum_tomato.n.01', 'name': 'plum_tomato'}, {'id': 21032, 'synset': 'mandrake.n.02', 'name': 'mandrake'}, {'id': 21033, 'synset': 'mandrake_root.n.01', 'name': 'mandrake_root'}, {'id': 21034, 'synset': 'apple_of_peru.n.01', 'name': 'apple_of_Peru'}, {'id': 21035, 'synset': 'flowering_tobacco.n.01', 'name': 'flowering_tobacco'}, {'id': 21036, 'synset': 'common_tobacco.n.01', 'name': 'common_tobacco'}, {'id': 21037, 'synset': 'wild_tobacco.n.01', 'name': 'wild_tobacco'}, {'id': 21038, 'synset': 'cupflower.n.02', 'name': 'cupflower'}, {'id': 21039, 'synset': 'whitecup.n.01', 'name': 'whitecup'}, {'id': 21040, 'synset': 'petunia.n.01', 'name': 'petunia'}, {'id': 21041, 'synset': 'large_white_petunia.n.01', 'name': 'large_white_petunia'}, {'id': 21042, 'synset': 'violet-flowered_petunia.n.01', 'name': 'violet-flowered_petunia'}, {'id': 21043, 'synset': 'hybrid_petunia.n.01', 'name': 'hybrid_petunia'}, {'id': 21044, 'synset': 'cape_gooseberry.n.01', 'name': 'cape_gooseberry'}, {'id': 21045, 'synset': 'strawberry_tomato.n.01', 'name': 'strawberry_tomato'}, {'id': 21046, 'synset': 'tomatillo.n.02', 'name': 'tomatillo'}, {'id': 21047, 'synset': 'tomatillo.n.01', 'name': 'tomatillo'}, {'id': 21048, 'synset': 'yellow_henbane.n.01', 'name': 'yellow_henbane'}, {'id': 21049, 'synset': "cock's_eggs.n.01", 'name': "cock's_eggs"}, {'id': 21050, 'synset': 'salpiglossis.n.01', 'name': 'salpiglossis'}, {'id': 21051, 'synset': 'painted_tongue.n.01', 'name': 'painted_tongue'}, {'id': 21052, 'synset': 'butterfly_flower.n.01', 'name': 'butterfly_flower'}, {'id': 21053, 'synset': 'scopolia_carniolica.n.01', 'name': 'Scopolia_carniolica'}, {'id': 21054, 'synset': 'chalice_vine.n.01', 'name': 'chalice_vine'}, {'id': 21055, 'synset': 'verbena.n.01', 'name': 'verbena'}, {'id': 21056, 'synset': 'lantana.n.01', 'name': 'lantana'}, {'id': 21057, 'synset': 'black_mangrove.n.02', 'name': 'black_mangrove'}, {'id': 21058, 'synset': 'white_mangrove.n.01', 'name': 'white_mangrove'}, {'id': 21059, 'synset': 'black_mangrove.n.01', 'name': 'black_mangrove'}, {'id': 21060, 'synset': 'teak.n.02', 'name': 'teak'}, {'id': 21061, 'synset': 'spurge.n.01', 'name': 'spurge'}, {'id': 21062, 'synset': 'sun_spurge.n.01', 'name': 'sun_spurge'}, {'id': 21063, 'synset': 'petty_spurge.n.01', 'name': 'petty_spurge'}, {'id': 21064, 'synset': "medusa's_head.n.01", 'name': "medusa's_head"}, {'id': 21065, 'synset': 'wild_spurge.n.01', 'name': 'wild_spurge'}, {'id': 21066, 'synset': 'snow-on-the-mountain.n.01', 'name': 'snow-on-the-mountain'}, {'id': 21067, 'synset': 'cypress_spurge.n.01', 'name': 'cypress_spurge'}, {'id': 21068, 'synset': 'leafy_spurge.n.01', 'name': 'leafy_spurge'}, {'id': 21069, 'synset': 'hairy_spurge.n.01', 'name': 'hairy_spurge'}, {'id': 21070, 'synset': 'poinsettia.n.01', 'name': 'poinsettia'}, {'id': 21071, 'synset': 'japanese_poinsettia.n.01', 'name': 'Japanese_poinsettia'}, {'id': 21072, 'synset': 'fire-on-the-mountain.n.01', 'name': 'fire-on-the-mountain'}, {'id': 21073, 'synset': 'wood_spurge.n.01', 'name': 'wood_spurge'}, {'id': 21074, 'synset': 'dwarf_spurge.n.01', 'name': 'dwarf_spurge'}, {'id': 21075, 'synset': 'scarlet_plume.n.01', 'name': 'scarlet_plume'}, {'id': 21076, 'synset': 'naboom.n.01', 'name': 'naboom'}, {'id': 21077, 'synset': 'crown_of_thorns.n.02', 'name': 'crown_of_thorns'}, {'id': 21078, 'synset': 'toothed_spurge.n.01', 'name': 'toothed_spurge'}, {'id': 21079, 'synset': 'three-seeded_mercury.n.01', 'name': 'three-seeded_mercury'}, {'id': 21080, 'synset': 'croton.n.02', 'name': 'croton'}, {'id': 21081, 'synset': 'cascarilla.n.01', 'name': 'cascarilla'}, {'id': 21082, 'synset': 'cascarilla_bark.n.01', 'name': 'cascarilla_bark'}, {'id': 21083, 'synset': 'castor-oil_plant.n.01', 'name': 'castor-oil_plant'}, {'id': 21084, 'synset': 'spurge_nettle.n.01', 'name': 'spurge_nettle'}, {'id': 21085, 'synset': 'physic_nut.n.01', 'name': 'physic_nut'}, {'id': 21086, 'synset': 'para_rubber_tree.n.01', 'name': 'Para_rubber_tree'}, {'id': 21087, 'synset': 'cassava.n.03', 'name': 'cassava'}, {'id': 21088, 'synset': 'bitter_cassava.n.01', 'name': 'bitter_cassava'}, {'id': 21089, 'synset': 'cassava.n.02', 'name': 'cassava'}, {'id': 21090, 'synset': 'sweet_cassava.n.01', 'name': 'sweet_cassava'}, {'id': 21091, 'synset': 'candlenut.n.01', 'name': 'candlenut'}, {'id': 21092, 'synset': 'tung_tree.n.01', 'name': 'tung_tree'}, {'id': 21093, 'synset': 'slipper_spurge.n.01', 'name': 'slipper_spurge'}, {'id': 21094, 'synset': 'candelilla.n.01', 'name': 'candelilla'}, {'id': 21095, 'synset': 'jewbush.n.01', 'name': 'Jewbush'}, {'id': 21096, 'synset': 'jumping_bean.n.01', 'name': 'jumping_bean'}, {'id': 21097, 'synset': 'camellia.n.01', 'name': 'camellia'}, {'id': 21098, 'synset': 'japonica.n.01', 'name': 'japonica'}, {'id': 21099, 'synset': 'umbellifer.n.01', 'name': 'umbellifer'}, {'id': 21100, 'synset': 'wild_parsley.n.01', 'name': 'wild_parsley'}, {'id': 21101, 'synset': "fool's_parsley.n.01", 'name': "fool's_parsley"}, {'id': 21102, 'synset': 'dill.n.01', 'name': 'dill'}, {'id': 21103, 'synset': 'angelica.n.01', 'name': 'angelica'}, {'id': 21104, 'synset': 'garden_angelica.n.01', 'name': 'garden_angelica'}, {'id': 21105, 'synset': 'wild_angelica.n.01', 'name': 'wild_angelica'}, {'id': 21106, 'synset': 'chervil.n.01', 'name': 'chervil'}, {'id': 21107, 'synset': 'cow_parsley.n.01', 'name': 'cow_parsley'}, {'id': 21108, 'synset': 'wild_celery.n.01', 'name': 'wild_celery'}, {'id': 21109, 'synset': 'astrantia.n.01', 'name': 'astrantia'}, {'id': 21110, 'synset': 'greater_masterwort.n.01', 'name': 'greater_masterwort'}, {'id': 21111, 'synset': 'caraway.n.01', 'name': 'caraway'}, {'id': 21112, 'synset': 'whorled_caraway.n.01', 'name': 'whorled_caraway'}, {'id': 21113, 'synset': 'water_hemlock.n.01', 'name': 'water_hemlock'}, {'id': 21114, 'synset': 'spotted_cowbane.n.01', 'name': 'spotted_cowbane'}, {'id': 21115, 'synset': 'hemlock.n.02', 'name': 'hemlock'}, {'id': 21116, 'synset': 'earthnut.n.02', 'name': 'earthnut'}, {'id': 21117, 'synset': 'cumin.n.01', 'name': 'cumin'}, {'id': 21118, 'synset': 'wild_carrot.n.01', 'name': 'wild_carrot'}, {'id': 21119, 'synset': 'eryngo.n.01', 'name': 'eryngo'}, {'id': 21120, 'synset': 'sea_holly.n.01', 'name': 'sea_holly'}, {'id': 21121, 'synset': 'button_snakeroot.n.02', 'name': 'button_snakeroot'}, {'id': 21122, 'synset': 'rattlesnake_master.n.01', 'name': 'rattlesnake_master'}, {'id': 21123, 'synset': 'fennel.n.01', 'name': 'fennel'}, {'id': 21124, 'synset': 'common_fennel.n.01', 'name': 'common_fennel'}, {'id': 21125, 'synset': 'florence_fennel.n.01', 'name': 'Florence_fennel'}, {'id': 21126, 'synset': 'cow_parsnip.n.01', 'name': 'cow_parsnip'}, {'id': 21127, 'synset': 'lovage.n.01', 'name': 'lovage'}, {'id': 21128, 'synset': 'sweet_cicely.n.01', 'name': 'sweet_cicely'}, {'id': 21129, 'synset': 'water_fennel.n.01', 'name': 'water_fennel'}, {'id': 21130, 'synset': 'parsnip.n.02', 'name': 'parsnip'}, {'id': 21131, 'synset': 'cultivated_parsnip.n.01', 'name': 'cultivated_parsnip'}, {'id': 21132, 'synset': 'wild_parsnip.n.01', 'name': 'wild_parsnip'}, {'id': 21133, 'synset': 'parsley.n.01', 'name': 'parsley'}, {'id': 21134, 'synset': 'italian_parsley.n.01', 'name': 'Italian_parsley'}, {'id': 21135, 'synset': 'hamburg_parsley.n.01', 'name': 'Hamburg_parsley'}, {'id': 21136, 'synset': 'anise.n.01', 'name': 'anise'}, {'id': 21137, 'synset': 'sanicle.n.01', 'name': 'sanicle'}, {'id': 21138, 'synset': 'purple_sanicle.n.01', 'name': 'purple_sanicle'}, {'id': 21139, 'synset': 'european_sanicle.n.01', 'name': 'European_sanicle'}, {'id': 21140, 'synset': 'water_parsnip.n.01', 'name': 'water_parsnip'}, {'id': 21141, 'synset': 'greater_water_parsnip.n.01', 'name': 'greater_water_parsnip'}, {'id': 21142, 'synset': 'skirret.n.01', 'name': 'skirret'}, {'id': 21143, 'synset': 'dogwood.n.01', 'name': 'dogwood'}, {'id': 21144, 'synset': 'common_white_dogwood.n.01', 'name': 'common_white_dogwood'}, {'id': 21145, 'synset': 'red_osier.n.01', 'name': 'red_osier'}, {'id': 21146, 'synset': 'silky_dogwood.n.02', 'name': 'silky_dogwood'}, {'id': 21147, 'synset': 'silky_cornel.n.01', 'name': 'silky_cornel'}, {'id': 21148, 'synset': 'common_european_dogwood.n.01', 'name': 'common_European_dogwood'}, {'id': 21149, 'synset': 'bunchberry.n.01', 'name': 'bunchberry'}, {'id': 21150, 'synset': 'cornelian_cherry.n.01', 'name': 'cornelian_cherry'}, {'id': 21151, 'synset': 'puka.n.01', 'name': 'puka'}, {'id': 21152, 'synset': 'kapuka.n.01', 'name': 'kapuka'}, {'id': 21153, 'synset': 'valerian.n.01', 'name': 'valerian'}, {'id': 21154, 'synset': 'common_valerian.n.01', 'name': 'common_valerian'}, {'id': 21155, 'synset': 'common_corn_salad.n.01', 'name': 'common_corn_salad'}, {'id': 21156, 'synset': 'red_valerian.n.01', 'name': 'red_valerian'}, {'id': 21157, 'synset': 'filmy_fern.n.02', 'name': 'filmy_fern'}, {'id': 21158, 'synset': 'bristle_fern.n.01', 'name': 'bristle_fern'}, {'id': 21159, 'synset': "hare's-foot_bristle_fern.n.01", 'name': "hare's-foot_bristle_fern"}, {'id': 21160, 'synset': 'killarney_fern.n.01', 'name': 'Killarney_fern'}, {'id': 21161, 'synset': 'kidney_fern.n.01', 'name': 'kidney_fern'}, {'id': 21162, 'synset': 'flowering_fern.n.02', 'name': 'flowering_fern'}, {'id': 21163, 'synset': 'royal_fern.n.01', 'name': 'royal_fern'}, {'id': 21164, 'synset': 'interrupted_fern.n.01', 'name': 'interrupted_fern'}, {'id': 21165, 'synset': 'crape_fern.n.01', 'name': 'crape_fern'}, {'id': 21166, 'synset': 'crepe_fern.n.01', 'name': 'crepe_fern'}, {'id': 21167, 'synset': 'curly_grass.n.01', 'name': 'curly_grass'}, {'id': 21168, 'synset': 'pine_fern.n.01', 'name': 'pine_fern'}, {'id': 21169, 'synset': 'climbing_fern.n.01', 'name': 'climbing_fern'}, {'id': 21170, 'synset': 'creeping_fern.n.01', 'name': 'creeping_fern'}, {'id': 21171, 'synset': 'climbing_maidenhair.n.01', 'name': 'climbing_maidenhair'}, {'id': 21172, 'synset': 'scented_fern.n.02', 'name': 'scented_fern'}, {'id': 21173, 'synset': 'clover_fern.n.01', 'name': 'clover_fern'}, {'id': 21174, 'synset': 'nardoo.n.01', 'name': 'nardoo'}, {'id': 21175, 'synset': 'water_clover.n.01', 'name': 'water_clover'}, {'id': 21176, 'synset': 'pillwort.n.01', 'name': 'pillwort'}, {'id': 21177, 'synset': 'regnellidium.n.01', 'name': 'regnellidium'}, {'id': 21178, 'synset': 'floating-moss.n.01', 'name': 'floating-moss'}, {'id': 21179, 'synset': 'mosquito_fern.n.01', 'name': 'mosquito_fern'}, {'id': 21180, 'synset': "adder's_tongue.n.01", 'name': "adder's_tongue"}, {'id': 21181, 'synset': 'ribbon_fern.n.03', 'name': 'ribbon_fern'}, {'id': 21182, 'synset': 'grape_fern.n.01', 'name': 'grape_fern'}, {'id': 21183, 'synset': 'daisyleaf_grape_fern.n.01', 'name': 'daisyleaf_grape_fern'}, {'id': 21184, 'synset': 'leathery_grape_fern.n.01', 'name': 'leathery_grape_fern'}, {'id': 21185, 'synset': 'rattlesnake_fern.n.01', 'name': 'rattlesnake_fern'}, {'id': 21186, 'synset': 'flowering_fern.n.01', 'name': 'flowering_fern'}, {'id': 21187, 'synset': 'powdery_mildew.n.01', 'name': 'powdery_mildew'}, {'id': 21188, 'synset': 'dutch_elm_fungus.n.01', 'name': 'Dutch_elm_fungus'}, {'id': 21189, 'synset': 'ergot.n.02', 'name': 'ergot'}, {'id': 21190, 'synset': 'rye_ergot.n.01', 'name': 'rye_ergot'}, {'id': 21191, 'synset': 'black_root_rot_fungus.n.01', 'name': 'black_root_rot_fungus'}, {'id': 21192, 'synset': "dead-man's-fingers.n.01", 'name': "dead-man's-fingers"}, {'id': 21193, 'synset': 'sclerotinia.n.01', 'name': 'sclerotinia'}, {'id': 21194, 'synset': 'brown_cup.n.01', 'name': 'brown_cup'}, {'id': 21195, 'synset': 'earthball.n.01', 'name': 'earthball'}, {'id': 21196, 'synset': 'scleroderma_citrinum.n.01', 'name': 'Scleroderma_citrinum'}, {'id': 21197, 'synset': 'scleroderma_flavidium.n.01', 'name': 'Scleroderma_flavidium'}, {'id': 21198, 'synset': 'scleroderma_bovista.n.01', 'name': 'Scleroderma_bovista'}, {'id': 21199, 'synset': 'podaxaceae.n.01', 'name': 'Podaxaceae'}, {'id': 21200, 'synset': 'stalked_puffball.n.02', 'name': 'stalked_puffball'}, {'id': 21201, 'synset': 'stalked_puffball.n.01', 'name': 'stalked_puffball'}, {'id': 21202, 'synset': 'false_truffle.n.01', 'name': 'false_truffle'}, {'id': 21203, 'synset': 'rhizopogon_idahoensis.n.01', 'name': 'Rhizopogon_idahoensis'}, {'id': 21204, 'synset': 'truncocolumella_citrina.n.01', 'name': 'Truncocolumella_citrina'}, {'id': 21205, 'synset': 'mucor.n.01', 'name': 'mucor'}, {'id': 21206, 'synset': 'rhizopus.n.01', 'name': 'rhizopus'}, {'id': 21207, 'synset': 'bread_mold.n.01', 'name': 'bread_mold'}, {'id': 21208, 'synset': 'slime_mold.n.01', 'name': 'slime_mold'}, {'id': 21209, 'synset': 'true_slime_mold.n.01', 'name': 'true_slime_mold'}, {'id': 21210, 'synset': 'cellular_slime_mold.n.01', 'name': 'cellular_slime_mold'}, {'id': 21211, 'synset': 'dictostylium.n.01', 'name': 'dictostylium'}, {'id': 21212, 'synset': 'pond-scum_parasite.n.01', 'name': 'pond-scum_parasite'}, {'id': 21213, 'synset': 'potato_wart_fungus.n.01', 'name': 'potato_wart_fungus'}, {'id': 21214, 'synset': 'white_fungus.n.01', 'name': 'white_fungus'}, {'id': 21215, 'synset': 'water_mold.n.01', 'name': 'water_mold'}, {'id': 21216, 'synset': 'downy_mildew.n.01', 'name': 'downy_mildew'}, {'id': 21217, 'synset': 'blue_mold_fungus.n.01', 'name': 'blue_mold_fungus'}, {'id': 21218, 'synset': 'onion_mildew.n.01', 'name': 'onion_mildew'}, {'id': 21219, 'synset': 'tobacco_mildew.n.01', 'name': 'tobacco_mildew'}, {'id': 21220, 'synset': 'white_rust.n.01', 'name': 'white_rust'}, {'id': 21221, 'synset': 'pythium.n.01', 'name': 'pythium'}, {'id': 21222, 'synset': 'damping_off_fungus.n.01', 'name': 'damping_off_fungus'}, {'id': 21223, 'synset': 'phytophthora_citrophthora.n.01', 'name': 'Phytophthora_citrophthora'}, {'id': 21224, 'synset': 'phytophthora_infestans.n.01', 'name': 'Phytophthora_infestans'}, {'id': 21225, 'synset': 'clubroot_fungus.n.01', 'name': 'clubroot_fungus'}, {'id': 21226, 'synset': 'geglossaceae.n.01', 'name': 'Geglossaceae'}, {'id': 21227, 'synset': 'sarcosomataceae.n.01', 'name': 'Sarcosomataceae'}, {'id': 21228, 'synset': 'rufous_rubber_cup.n.01', 'name': 'Rufous_rubber_cup'}, {'id': 21229, 'synset': "devil's_cigar.n.01", 'name': "devil's_cigar"}, {'id': 21230, 'synset': "devil's_urn.n.01", 'name': "devil's_urn"}, {'id': 21231, 'synset': 'truffle.n.01', 'name': 'truffle'}, {'id': 21232, 'synset': 'club_fungus.n.01', 'name': 'club_fungus'}, {'id': 21233, 'synset': 'coral_fungus.n.01', 'name': 'coral_fungus'}, {'id': 21234, 'synset': 'tooth_fungus.n.01', 'name': 'tooth_fungus'}, {'id': 21235, 'synset': 'lichen.n.02', 'name': 'lichen'}, {'id': 21236, 'synset': 'ascolichen.n.01', 'name': 'ascolichen'}, {'id': 21237, 'synset': 'basidiolichen.n.01', 'name': 'basidiolichen'}, {'id': 21238, 'synset': 'lecanora.n.01', 'name': 'lecanora'}, {'id': 21239, 'synset': 'manna_lichen.n.01', 'name': 'manna_lichen'}, {'id': 21240, 'synset': 'archil.n.02', 'name': 'archil'}, {'id': 21241, 'synset': 'roccella.n.01', 'name': 'roccella'}, {'id': 21242, 'synset': 'beard_lichen.n.01', 'name': 'beard_lichen'}, {'id': 21243, 'synset': 'horsehair_lichen.n.01', 'name': 'horsehair_lichen'}, {'id': 21244, 'synset': 'reindeer_moss.n.01', 'name': 'reindeer_moss'}, {'id': 21245, 'synset': 'crottle.n.01', 'name': 'crottle'}, {'id': 21246, 'synset': 'iceland_moss.n.01', 'name': 'Iceland_moss'}, {'id': 21247, 'synset': 'fungus.n.01', 'name': 'fungus'}, {'id': 21248, 'synset': 'promycelium.n.01', 'name': 'promycelium'}, {'id': 21249, 'synset': 'true_fungus.n.01', 'name': 'true_fungus'}, {'id': 21250, 'synset': 'basidiomycete.n.01', 'name': 'basidiomycete'}, {'id': 21251, 'synset': 'mushroom.n.03', 'name': 'mushroom'}, {'id': 21252, 'synset': 'agaric.n.02', 'name': 'agaric'}, {'id': 21253, 'synset': 'mushroom.n.01', 'name': 'mushroom'}, {'id': 21254, 'synset': 'toadstool.n.01', 'name': 'toadstool'}, {'id': 21255, 'synset': 'horse_mushroom.n.01', 'name': 'horse_mushroom'}, {'id': 21256, 'synset': 'meadow_mushroom.n.01', 'name': 'meadow_mushroom'}, {'id': 21257, 'synset': 'shiitake.n.01', 'name': 'shiitake'}, {'id': 21258, 'synset': 'scaly_lentinus.n.01', 'name': 'scaly_lentinus'}, {'id': 21259, 'synset': 'royal_agaric.n.01', 'name': 'royal_agaric'}, {'id': 21260, 'synset': 'false_deathcap.n.01', 'name': 'false_deathcap'}, {'id': 21261, 'synset': 'fly_agaric.n.01', 'name': 'fly_agaric'}, {'id': 21262, 'synset': 'death_cap.n.01', 'name': 'death_cap'}, {'id': 21263, 'synset': 'blushing_mushroom.n.01', 'name': 'blushing_mushroom'}, {'id': 21264, 'synset': 'destroying_angel.n.01', 'name': 'destroying_angel'}, {'id': 21265, 'synset': 'chanterelle.n.01', 'name': 'chanterelle'}, {'id': 21266, 'synset': 'floccose_chanterelle.n.01', 'name': 'floccose_chanterelle'}, {'id': 21267, 'synset': "pig's_ears.n.01", 'name': "pig's_ears"}, {'id': 21268, 'synset': 'cinnabar_chanterelle.n.01', 'name': 'cinnabar_chanterelle'}, {'id': 21269, 'synset': 'jack-o-lantern_fungus.n.01', 'name': 'jack-o-lantern_fungus'}, {'id': 21270, 'synset': 'inky_cap.n.01', 'name': 'inky_cap'}, {'id': 21271, 'synset': 'shaggymane.n.01', 'name': 'shaggymane'}, {'id': 21272, 'synset': 'milkcap.n.01', 'name': 'milkcap'}, {'id': 21273, 'synset': 'fairy-ring_mushroom.n.01', 'name': 'fairy-ring_mushroom'}, {'id': 21274, 'synset': 'fairy_ring.n.01', 'name': 'fairy_ring'}, {'id': 21275, 'synset': 'oyster_mushroom.n.01', 'name': 'oyster_mushroom'}, {'id': 21276, 'synset': 'olive-tree_agaric.n.01', 'name': 'olive-tree_agaric'}, {'id': 21277, 'synset': 'pholiota_astragalina.n.01', 'name': 'Pholiota_astragalina'}, {'id': 21278, 'synset': 'pholiota_aurea.n.01', 'name': 'Pholiota_aurea'}, {'id': 21279, 'synset': 'pholiota_destruens.n.01', 'name': 'Pholiota_destruens'}, {'id': 21280, 'synset': 'pholiota_flammans.n.01', 'name': 'Pholiota_flammans'}, {'id': 21281, 'synset': 'pholiota_flavida.n.01', 'name': 'Pholiota_flavida'}, {'id': 21282, 'synset': 'nameko.n.01', 'name': 'nameko'}, {'id': 21283, 'synset': 'pholiota_squarrosa-adiposa.n.01', 'name': 'Pholiota_squarrosa-adiposa'}, {'id': 21284, 'synset': 'pholiota_squarrosa.n.01', 'name': 'Pholiota_squarrosa'}, {'id': 21285, 'synset': 'pholiota_squarrosoides.n.01', 'name': 'Pholiota_squarrosoides'}, {'id': 21286, 'synset': 'stropharia_ambigua.n.01', 'name': 'Stropharia_ambigua'}, {'id': 21287, 'synset': 'stropharia_hornemannii.n.01', 'name': 'Stropharia_hornemannii'}, {'id': 21288, 'synset': 'stropharia_rugoso-annulata.n.01', 'name': 'Stropharia_rugoso-annulata'}, {'id': 21289, 'synset': 'gill_fungus.n.01', 'name': 'gill_fungus'}, {'id': 21290, 'synset': 'entoloma_lividum.n.01', 'name': 'Entoloma_lividum'}, {'id': 21291, 'synset': 'entoloma_aprile.n.01', 'name': 'Entoloma_aprile'}, {'id': 21292, 'synset': 'chlorophyllum_molybdites.n.01', 'name': 'Chlorophyllum_molybdites'}, {'id': 21293, 'synset': 'lepiota.n.01', 'name': 'lepiota'}, {'id': 21294, 'synset': 'parasol_mushroom.n.01', 'name': 'parasol_mushroom'}, {'id': 21295, 'synset': 'poisonous_parasol.n.01', 'name': 'poisonous_parasol'}, {'id': 21296, 'synset': 'lepiota_naucina.n.01', 'name': 'Lepiota_naucina'}, {'id': 21297, 'synset': 'lepiota_rhacodes.n.01', 'name': 'Lepiota_rhacodes'}, {'id': 21298, 'synset': 'american_parasol.n.01', 'name': 'American_parasol'}, {'id': 21299, 'synset': 'lepiota_rubrotincta.n.01', 'name': 'Lepiota_rubrotincta'}, {'id': 21300, 'synset': 'lepiota_clypeolaria.n.01', 'name': 'Lepiota_clypeolaria'}, {'id': 21301, 'synset': 'onion_stem.n.01', 'name': 'onion_stem'}, {'id': 21302, 'synset': 'pink_disease_fungus.n.01', 'name': 'pink_disease_fungus'}, {'id': 21303, 'synset': 'bottom_rot_fungus.n.01', 'name': 'bottom_rot_fungus'}, {'id': 21304, 'synset': 'potato_fungus.n.01', 'name': 'potato_fungus'}, {'id': 21305, 'synset': 'coffee_fungus.n.01', 'name': 'coffee_fungus'}, {'id': 21306, 'synset': 'blewits.n.01', 'name': 'blewits'}, {'id': 21307, 'synset': 'sandy_mushroom.n.01', 'name': 'sandy_mushroom'}, {'id': 21308, 'synset': 'tricholoma_pessundatum.n.01', 'name': 'Tricholoma_pessundatum'}, {'id': 21309, 'synset': 'tricholoma_sejunctum.n.01', 'name': 'Tricholoma_sejunctum'}, {'id': 21310, 'synset': 'man-on-a-horse.n.01', 'name': 'man-on-a-horse'}, {'id': 21311, 'synset': 'tricholoma_venenata.n.01', 'name': 'Tricholoma_venenata'}, {'id': 21312, 'synset': 'tricholoma_pardinum.n.01', 'name': 'Tricholoma_pardinum'}, {'id': 21313, 'synset': 'tricholoma_vaccinum.n.01', 'name': 'Tricholoma_vaccinum'}, {'id': 21314, 'synset': 'tricholoma_aurantium.n.01', 'name': 'Tricholoma_aurantium'}, {'id': 21315, 'synset': 'volvaria_bombycina.n.01', 'name': 'Volvaria_bombycina'}, {'id': 21316, 'synset': 'pluteus_aurantiorugosus.n.01', 'name': 'Pluteus_aurantiorugosus'}, {'id': 21317, 'synset': 'pluteus_magnus.n.01', 'name': 'Pluteus_magnus'}, {'id': 21318, 'synset': 'deer_mushroom.n.01', 'name': 'deer_mushroom'}, {'id': 21319, 'synset': 'straw_mushroom.n.01', 'name': 'straw_mushroom'}, {'id': 21320, 'synset': 'volvariella_bombycina.n.01', 'name': 'Volvariella_bombycina'}, {'id': 21321, 'synset': 'clitocybe_clavipes.n.01', 'name': 'Clitocybe_clavipes'}, {'id': 21322, 'synset': 'clitocybe_dealbata.n.01', 'name': 'Clitocybe_dealbata'}, {'id': 21323, 'synset': 'clitocybe_inornata.n.01', 'name': 'Clitocybe_inornata'}, {'id': 21324, 'synset': 'clitocybe_robusta.n.01', 'name': 'Clitocybe_robusta'}, {'id': 21325, 'synset': 'clitocybe_irina.n.01', 'name': 'Clitocybe_irina'}, {'id': 21326, 'synset': 'clitocybe_subconnexa.n.01', 'name': 'Clitocybe_subconnexa'}, {'id': 21327, 'synset': 'winter_mushroom.n.01', 'name': 'winter_mushroom'}, {'id': 21328, 'synset': 'mycelium.n.01', 'name': 'mycelium'}, {'id': 21329, 'synset': 'sclerotium.n.02', 'name': 'sclerotium'}, {'id': 21330, 'synset': 'sac_fungus.n.01', 'name': 'sac_fungus'}, {'id': 21331, 'synset': 'ascomycete.n.01', 'name': 'ascomycete'}, {'id': 21332, 'synset': 'clavicipitaceae.n.01', 'name': 'Clavicipitaceae'}, {'id': 21333, 'synset': 'grainy_club.n.01', 'name': 'grainy_club'}, {'id': 21334, 'synset': 'yeast.n.02', 'name': 'yeast'}, {'id': 21335, 'synset': "baker's_yeast.n.01", 'name': "baker's_yeast"}, {'id': 21336, 'synset': "wine-maker's_yeast.n.01", 'name': "wine-maker's_yeast"}, {'id': 21337, 'synset': 'aspergillus_fumigatus.n.01', 'name': 'Aspergillus_fumigatus'}, {'id': 21338, 'synset': 'brown_root_rot_fungus.n.01', 'name': 'brown_root_rot_fungus'}, {'id': 21339, 'synset': 'discomycete.n.01', 'name': 'discomycete'}, {'id': 21340, 'synset': 'leotia_lubrica.n.01', 'name': 'Leotia_lubrica'}, {'id': 21341, 'synset': 'mitrula_elegans.n.01', 'name': 'Mitrula_elegans'}, {'id': 21342, 'synset': 'sarcoscypha_coccinea.n.01', 'name': 'Sarcoscypha_coccinea'}, {'id': 21343, 'synset': 'caloscypha_fulgens.n.01', 'name': 'Caloscypha_fulgens'}, {'id': 21344, 'synset': 'aleuria_aurantia.n.01', 'name': 'Aleuria_aurantia'}, {'id': 21345, 'synset': 'elf_cup.n.01', 'name': 'elf_cup'}, {'id': 21346, 'synset': 'peziza_domicilina.n.01', 'name': 'Peziza_domicilina'}, {'id': 21347, 'synset': 'blood_cup.n.01', 'name': 'blood_cup'}, {'id': 21348, 'synset': 'urnula_craterium.n.01', 'name': 'Urnula_craterium'}, {'id': 21349, 'synset': 'galiella_rufa.n.01', 'name': 'Galiella_rufa'}, {'id': 21350, 'synset': 'jafnea_semitosta.n.01', 'name': 'Jafnea_semitosta'}, {'id': 21351, 'synset': 'morel.n.01', 'name': 'morel'}, {'id': 21352, 'synset': 'common_morel.n.01', 'name': 'common_morel'}, {'id': 21353, 'synset': 'disciotis_venosa.n.01', 'name': 'Disciotis_venosa'}, {'id': 21354, 'synset': 'verpa.n.01', 'name': 'Verpa'}, {'id': 21355, 'synset': 'verpa_bohemica.n.01', 'name': 'Verpa_bohemica'}, {'id': 21356, 'synset': 'verpa_conica.n.01', 'name': 'Verpa_conica'}, {'id': 21357, 'synset': 'black_morel.n.01', 'name': 'black_morel'}, {'id': 21358, 'synset': 'morchella_crassipes.n.01', 'name': 'Morchella_crassipes'}, {'id': 21359, 'synset': 'morchella_semilibera.n.01', 'name': 'Morchella_semilibera'}, {'id': 21360, 'synset': 'wynnea_americana.n.01', 'name': 'Wynnea_americana'}, {'id': 21361, 'synset': 'wynnea_sparassoides.n.01', 'name': 'Wynnea_sparassoides'}, {'id': 21362, 'synset': 'false_morel.n.01', 'name': 'false_morel'}, {'id': 21363, 'synset': 'lorchel.n.01', 'name': 'lorchel'}, {'id': 21364, 'synset': 'helvella.n.01', 'name': 'helvella'}, {'id': 21365, 'synset': 'helvella_crispa.n.01', 'name': 'Helvella_crispa'}, {'id': 21366, 'synset': 'helvella_acetabulum.n.01', 'name': 'Helvella_acetabulum'}, {'id': 21367, 'synset': 'helvella_sulcata.n.01', 'name': 'Helvella_sulcata'}, {'id': 21368, 'synset': 'discina.n.01', 'name': 'discina'}, {'id': 21369, 'synset': 'gyromitra.n.01', 'name': 'gyromitra'}, {'id': 21370, 'synset': 'gyromitra_californica.n.01', 'name': 'Gyromitra_californica'}, {'id': 21371, 'synset': 'gyromitra_sphaerospora.n.01', 'name': 'Gyromitra_sphaerospora'}, {'id': 21372, 'synset': 'gyromitra_esculenta.n.01', 'name': 'Gyromitra_esculenta'}, {'id': 21373, 'synset': 'gyromitra_infula.n.01', 'name': 'Gyromitra_infula'}, {'id': 21374, 'synset': 'gyromitra_fastigiata.n.01', 'name': 'Gyromitra_fastigiata'}, {'id': 21375, 'synset': 'gyromitra_gigas.n.01', 'name': 'Gyromitra_gigas'}, {'id': 21376, 'synset': 'gasteromycete.n.01', 'name': 'gasteromycete'}, {'id': 21377, 'synset': 'stinkhorn.n.01', 'name': 'stinkhorn'}, {'id': 21378, 'synset': 'common_stinkhorn.n.01', 'name': 'common_stinkhorn'}, {'id': 21379, 'synset': 'phallus_ravenelii.n.01', 'name': 'Phallus_ravenelii'}, {'id': 21380, 'synset': 'dog_stinkhorn.n.01', 'name': 'dog_stinkhorn'}, {'id': 21381, 'synset': 'calostoma_lutescens.n.01', 'name': 'Calostoma_lutescens'}, {'id': 21382, 'synset': 'calostoma_cinnabarina.n.01', 'name': 'Calostoma_cinnabarina'}, {'id': 21383, 'synset': 'calostoma_ravenelii.n.01', 'name': 'Calostoma_ravenelii'}, {'id': 21384, 'synset': 'stinky_squid.n.01', 'name': 'stinky_squid'}, {'id': 21385, 'synset': 'puffball.n.01', 'name': 'puffball'}, {'id': 21386, 'synset': 'giant_puffball.n.01', 'name': 'giant_puffball'}, {'id': 21387, 'synset': 'earthstar.n.01', 'name': 'earthstar'}, {'id': 21388, 'synset': 'geastrum_coronatum.n.01', 'name': 'Geastrum_coronatum'}, {'id': 21389, 'synset': 'radiigera_fuscogleba.n.01', 'name': 'Radiigera_fuscogleba'}, {'id': 21390, 'synset': 'astreus_pteridis.n.01', 'name': 'Astreus_pteridis'}, {'id': 21391, 'synset': 'astreus_hygrometricus.n.01', 'name': 'Astreus_hygrometricus'}, {'id': 21392, 'synset': "bird's-nest_fungus.n.01", 'name': "bird's-nest_fungus"}, {'id': 21393, 'synset': 'gastrocybe_lateritia.n.01', 'name': 'Gastrocybe_lateritia'}, {'id': 21394, 'synset': 'macowanites_americanus.n.01', 'name': 'Macowanites_americanus'}, {'id': 21395, 'synset': 'polypore.n.01', 'name': 'polypore'}, {'id': 21396, 'synset': 'bracket_fungus.n.01', 'name': 'bracket_fungus'}, {'id': 21397, 'synset': 'albatrellus_dispansus.n.01', 'name': 'Albatrellus_dispansus'}, {'id': 21398, 'synset': 'albatrellus_ovinus.n.01', 'name': 'Albatrellus_ovinus'}, {'id': 21399, 'synset': 'neolentinus_ponderosus.n.01', 'name': 'Neolentinus_ponderosus'}, {'id': 21400, 'synset': 'oligoporus_leucospongia.n.01', 'name': 'Oligoporus_leucospongia'}, {'id': 21401, 'synset': 'polyporus_tenuiculus.n.01', 'name': 'Polyporus_tenuiculus'}, {'id': 21402, 'synset': 'hen-of-the-woods.n.01', 'name': 'hen-of-the-woods'}, {'id': 21403, 'synset': 'polyporus_squamosus.n.01', 'name': 'Polyporus_squamosus'}, {'id': 21404, 'synset': 'beefsteak_fungus.n.01', 'name': 'beefsteak_fungus'}, {'id': 21405, 'synset': 'agaric.n.01', 'name': 'agaric'}, {'id': 21406, 'synset': 'bolete.n.01', 'name': 'bolete'}, {'id': 21407, 'synset': 'boletus_chrysenteron.n.01', 'name': 'Boletus_chrysenteron'}, {'id': 21408, 'synset': 'boletus_edulis.n.01', 'name': 'Boletus_edulis'}, {'id': 21409, 'synset': "frost's_bolete.n.01", 'name': "Frost's_bolete"}, {'id': 21410, 'synset': 'boletus_luridus.n.01', 'name': 'Boletus_luridus'}, {'id': 21411, 'synset': 'boletus_mirabilis.n.01', 'name': 'Boletus_mirabilis'}, {'id': 21412, 'synset': 'boletus_pallidus.n.01', 'name': 'Boletus_pallidus'}, {'id': 21413, 'synset': 'boletus_pulcherrimus.n.01', 'name': 'Boletus_pulcherrimus'}, {'id': 21414, 'synset': 'boletus_pulverulentus.n.01', 'name': 'Boletus_pulverulentus'}, {'id': 21415, 'synset': 'boletus_roxanae.n.01', 'name': 'Boletus_roxanae'}, {'id': 21416, 'synset': 'boletus_subvelutipes.n.01', 'name': 'Boletus_subvelutipes'}, {'id': 21417, 'synset': 'boletus_variipes.n.01', 'name': 'Boletus_variipes'}, {'id': 21418, 'synset': 'boletus_zelleri.n.01', 'name': 'Boletus_zelleri'}, {'id': 21419, 'synset': 'fuscoboletinus_paluster.n.01', 'name': 'Fuscoboletinus_paluster'}, {'id': 21420, 'synset': 'fuscoboletinus_serotinus.n.01', 'name': 'Fuscoboletinus_serotinus'}, {'id': 21421, 'synset': 'leccinum_fibrillosum.n.01', 'name': 'Leccinum_fibrillosum'}, {'id': 21422, 'synset': 'suillus_albivelatus.n.01', 'name': 'Suillus_albivelatus'}, {'id': 21423, 'synset': 'old-man-of-the-woods.n.01', 'name': 'old-man-of-the-woods'}, {'id': 21424, 'synset': 'boletellus_russellii.n.01', 'name': 'Boletellus_russellii'}, {'id': 21425, 'synset': 'jelly_fungus.n.01', 'name': 'jelly_fungus'}, {'id': 21426, 'synset': 'snow_mushroom.n.01', 'name': 'snow_mushroom'}, {'id': 21427, 'synset': "witches'_butter.n.01", 'name': "witches'_butter"}, {'id': 21428, 'synset': 'tremella_foliacea.n.01', 'name': 'Tremella_foliacea'}, {'id': 21429, 'synset': 'tremella_reticulata.n.01', 'name': 'Tremella_reticulata'}, {'id': 21430, 'synset': "jew's-ear.n.01", 'name': "Jew's-ear"}, {'id': 21431, 'synset': 'rust.n.04', 'name': 'rust'}, {'id': 21432, 'synset': 'aecium.n.01', 'name': 'aecium'}, {'id': 21433, 'synset': 'flax_rust.n.01', 'name': 'flax_rust'}, {'id': 21434, 'synset': 'blister_rust.n.02', 'name': 'blister_rust'}, {'id': 21435, 'synset': 'wheat_rust.n.01', 'name': 'wheat_rust'}, {'id': 21436, 'synset': 'apple_rust.n.01', 'name': 'apple_rust'}, {'id': 21437, 'synset': 'smut.n.03', 'name': 'smut'}, {'id': 21438, 'synset': 'covered_smut.n.01', 'name': 'covered_smut'}, {'id': 21439, 'synset': 'loose_smut.n.02', 'name': 'loose_smut'}, {'id': 21440, 'synset': 'cornsmut.n.01', 'name': 'cornsmut'}, {'id': 21441, 'synset': 'boil_smut.n.01', 'name': 'boil_smut'}, {'id': 21442, 'synset': 'sphacelotheca.n.01', 'name': 'Sphacelotheca'}, {'id': 21443, 'synset': 'head_smut.n.01', 'name': 'head_smut'}, {'id': 21444, 'synset': 'bunt.n.04', 'name': 'bunt'}, {'id': 21445, 'synset': 'bunt.n.03', 'name': 'bunt'}, {'id': 21446, 'synset': 'onion_smut.n.01', 'name': 'onion_smut'}, {'id': 21447, 'synset': 'flag_smut_fungus.n.01', 'name': 'flag_smut_fungus'}, {'id': 21448, 'synset': 'wheat_flag_smut.n.01', 'name': 'wheat_flag_smut'}, {'id': 21449, 'synset': 'felt_fungus.n.01', 'name': 'felt_fungus'}, {'id': 21450, 'synset': 'waxycap.n.01', 'name': 'waxycap'}, {'id': 21451, 'synset': 'hygrocybe_acutoconica.n.01', 'name': 'Hygrocybe_acutoconica'}, {'id': 21452, 'synset': 'hygrophorus_borealis.n.01', 'name': 'Hygrophorus_borealis'}, {'id': 21453, 'synset': 'hygrophorus_caeruleus.n.01', 'name': 'Hygrophorus_caeruleus'}, {'id': 21454, 'synset': 'hygrophorus_inocybiformis.n.01', 'name': 'Hygrophorus_inocybiformis'}, {'id': 21455, 'synset': 'hygrophorus_kauffmanii.n.01', 'name': 'Hygrophorus_kauffmanii'}, {'id': 21456, 'synset': 'hygrophorus_marzuolus.n.01', 'name': 'Hygrophorus_marzuolus'}, {'id': 21457, 'synset': 'hygrophorus_purpurascens.n.01', 'name': 'Hygrophorus_purpurascens'}, {'id': 21458, 'synset': 'hygrophorus_russula.n.01', 'name': 'Hygrophorus_russula'}, {'id': 21459, 'synset': 'hygrophorus_sordidus.n.01', 'name': 'Hygrophorus_sordidus'}, {'id': 21460, 'synset': 'hygrophorus_tennesseensis.n.01', 'name': 'Hygrophorus_tennesseensis'}, {'id': 21461, 'synset': 'hygrophorus_turundus.n.01', 'name': 'Hygrophorus_turundus'}, {'id': 21462, 'synset': 'neohygrophorus_angelesianus.n.01', 'name': 'Neohygrophorus_angelesianus'}, {'id': 21463, 'synset': 'cortinarius_armillatus.n.01', 'name': 'Cortinarius_armillatus'}, {'id': 21464, 'synset': 'cortinarius_atkinsonianus.n.01', 'name': 'Cortinarius_atkinsonianus'}, {'id': 21465, 'synset': 'cortinarius_corrugatus.n.01', 'name': 'Cortinarius_corrugatus'}, {'id': 21466, 'synset': 'cortinarius_gentilis.n.01', 'name': 'Cortinarius_gentilis'}, {'id': 21467, 'synset': 'cortinarius_mutabilis.n.01', 'name': 'Cortinarius_mutabilis'}, {'id': 21468, 'synset': 'cortinarius_semisanguineus.n.01', 'name': 'Cortinarius_semisanguineus'}, {'id': 21469, 'synset': 'cortinarius_subfoetidus.n.01', 'name': 'Cortinarius_subfoetidus'}, {'id': 21470, 'synset': 'cortinarius_violaceus.n.01', 'name': 'Cortinarius_violaceus'}, {'id': 21471, 'synset': 'gymnopilus_spectabilis.n.01', 'name': 'Gymnopilus_spectabilis'}, {'id': 21472, 'synset': 'gymnopilus_validipes.n.01', 'name': 'Gymnopilus_validipes'}, {'id': 21473, 'synset': 'gymnopilus_ventricosus.n.01', 'name': 'Gymnopilus_ventricosus'}, {'id': 21474, 'synset': 'mold.n.05', 'name': 'mold'}, {'id': 21475, 'synset': 'mildew.n.02', 'name': 'mildew'}, {'id': 21476, 'synset': 'verticillium.n.01', 'name': 'verticillium'}, {'id': 21477, 'synset': 'monilia.n.01', 'name': 'monilia'}, {'id': 21478, 'synset': 'candida.n.01', 'name': 'candida'}, {'id': 21479, 'synset': 'candida_albicans.n.01', 'name': 'Candida_albicans'}, {'id': 21480, 'synset': 'blastomycete.n.01', 'name': 'blastomycete'}, {'id': 21481, 'synset': 'yellow_spot_fungus.n.01', 'name': 'yellow_spot_fungus'}, {'id': 21482, 'synset': 'green_smut_fungus.n.01', 'name': 'green_smut_fungus'}, {'id': 21483, 'synset': 'dry_rot.n.02', 'name': 'dry_rot'}, {'id': 21484, 'synset': 'rhizoctinia.n.01', 'name': 'rhizoctinia'}, {'id': 21485, 'synset': 'houseplant.n.01', 'name': 'houseplant'}, {'id': 21486, 'synset': 'bedder.n.01', 'name': 'bedder'}, {'id': 21487, 'synset': 'succulent.n.01', 'name': 'succulent'}, {'id': 21488, 'synset': 'cultivar.n.01', 'name': 'cultivar'}, {'id': 21489, 'synset': 'weed.n.01', 'name': 'weed'}, {'id': 21490, 'synset': 'wort.n.01', 'name': 'wort'}, {'id': 21491, 'synset': 'brier.n.02', 'name': 'brier'}, {'id': 21492, 'synset': 'aril.n.01', 'name': 'aril'}, {'id': 21493, 'synset': 'sporophyll.n.01', 'name': 'sporophyll'}, {'id': 21494, 'synset': 'sporangium.n.01', 'name': 'sporangium'}, {'id': 21495, 'synset': 'sporangiophore.n.01', 'name': 'sporangiophore'}, {'id': 21496, 'synset': 'ascus.n.01', 'name': 'ascus'}, {'id': 21497, 'synset': 'ascospore.n.01', 'name': 'ascospore'}, {'id': 21498, 'synset': 'arthrospore.n.02', 'name': 'arthrospore'}, {'id': 21499, 'synset': 'eusporangium.n.01', 'name': 'eusporangium'}, {'id': 21500, 'synset': 'tetrasporangium.n.01', 'name': 'tetrasporangium'}, {'id': 21501, 'synset': 'gametangium.n.01', 'name': 'gametangium'}, {'id': 21502, 'synset': 'sorus.n.02', 'name': 'sorus'}, {'id': 21503, 'synset': 'sorus.n.01', 'name': 'sorus'}, {'id': 21504, 'synset': 'partial_veil.n.01', 'name': 'partial_veil'}, {'id': 21505, 'synset': 'lignum.n.01', 'name': 'lignum'}, {'id': 21506, 'synset': 'vascular_ray.n.01', 'name': 'vascular_ray'}, {'id': 21507, 'synset': 'phloem.n.01', 'name': 'phloem'}, {'id': 21508, 'synset': 'evergreen.n.01', 'name': 'evergreen'}, {'id': 21509, 'synset': 'deciduous_plant.n.01', 'name': 'deciduous_plant'}, {'id': 21510, 'synset': 'poisonous_plant.n.01', 'name': 'poisonous_plant'}, {'id': 21511, 'synset': 'vine.n.01', 'name': 'vine'}, {'id': 21512, 'synset': 'creeper.n.01', 'name': 'creeper'}, {'id': 21513, 'synset': 'tendril.n.01', 'name': 'tendril'}, {'id': 21514, 'synset': 'root_climber.n.01', 'name': 'root_climber'}, {'id': 21515, 'synset': 'lignosae.n.01', 'name': 'lignosae'}, {'id': 21516, 'synset': 'arborescent_plant.n.01', 'name': 'arborescent_plant'}, {'id': 21517, 'synset': 'snag.n.02', 'name': 'snag'}, {'id': 21518, 'synset': 'tree.n.01', 'name': 'tree'}, {'id': 21519, 'synset': 'timber_tree.n.01', 'name': 'timber_tree'}, {'id': 21520, 'synset': 'treelet.n.01', 'name': 'treelet'}, {'id': 21521, 'synset': 'arbor.n.01', 'name': 'arbor'}, {'id': 21522, 'synset': 'bean_tree.n.01', 'name': 'bean_tree'}, {'id': 21523, 'synset': 'pollard.n.01', 'name': 'pollard'}, {'id': 21524, 'synset': 'sapling.n.01', 'name': 'sapling'}, {'id': 21525, 'synset': 'shade_tree.n.01', 'name': 'shade_tree'}, {'id': 21526, 'synset': 'gymnospermous_tree.n.01', 'name': 'gymnospermous_tree'}, {'id': 21527, 'synset': 'conifer.n.01', 'name': 'conifer'}, {'id': 21528, 'synset': 'angiospermous_tree.n.01', 'name': 'angiospermous_tree'}, {'id': 21529, 'synset': 'nut_tree.n.01', 'name': 'nut_tree'}, {'id': 21530, 'synset': 'spice_tree.n.01', 'name': 'spice_tree'}, {'id': 21531, 'synset': 'fever_tree.n.01', 'name': 'fever_tree'}, {'id': 21532, 'synset': 'stump.n.01', 'name': 'stump'}, {'id': 21533, 'synset': 'bonsai.n.01', 'name': 'bonsai'}, {'id': 21534, 'synset': 'ming_tree.n.02', 'name': 'ming_tree'}, {'id': 21535, 'synset': 'ming_tree.n.01', 'name': 'ming_tree'}, {'id': 21536, 'synset': 'undershrub.n.01', 'name': 'undershrub'}, {'id': 21537, 'synset': 'subshrub.n.01', 'name': 'subshrub'}, {'id': 21538, 'synset': 'bramble.n.01', 'name': 'bramble'}, {'id': 21539, 'synset': 'liana.n.01', 'name': 'liana'}, {'id': 21540, 'synset': 'geophyte.n.01', 'name': 'geophyte'}, {'id': 21541, 'synset': 'desert_plant.n.01', 'name': 'desert_plant'}, {'id': 21542, 'synset': 'mesophyte.n.01', 'name': 'mesophyte'}, {'id': 21543, 'synset': 'marsh_plant.n.01', 'name': 'marsh_plant'}, {'id': 21544, 'synset': 'hemiepiphyte.n.01', 'name': 'hemiepiphyte'}, {'id': 21545, 'synset': 'strangler.n.01', 'name': 'strangler'}, {'id': 21546, 'synset': 'lithophyte.n.01', 'name': 'lithophyte'}, {'id': 21547, 'synset': 'saprobe.n.01', 'name': 'saprobe'}, {'id': 21548, 'synset': 'autophyte.n.01', 'name': 'autophyte'}, {'id': 21549, 'synset': 'root.n.01', 'name': 'root'}, {'id': 21550, 'synset': 'taproot.n.01', 'name': 'taproot'}, {'id': 21551, 'synset': 'prop_root.n.01', 'name': 'prop_root'}, {'id': 21552, 'synset': 'prophyll.n.01', 'name': 'prophyll'}, {'id': 21553, 'synset': 'rootstock.n.02', 'name': 'rootstock'}, {'id': 21554, 'synset': 'quickset.n.01', 'name': 'quickset'}, {'id': 21555, 'synset': 'stolon.n.01', 'name': 'stolon'}, {'id': 21556, 'synset': 'tuberous_plant.n.01', 'name': 'tuberous_plant'}, {'id': 21557, 'synset': 'rhizome.n.01', 'name': 'rhizome'}, {'id': 21558, 'synset': 'rachis.n.01', 'name': 'rachis'}, {'id': 21559, 'synset': 'caudex.n.02', 'name': 'caudex'}, {'id': 21560, 'synset': 'cladode.n.01', 'name': 'cladode'}, {'id': 21561, 'synset': 'receptacle.n.02', 'name': 'receptacle'}, {'id': 21562, 'synset': 'scape.n.01', 'name': 'scape'}, {'id': 21563, 'synset': 'umbel.n.01', 'name': 'umbel'}, {'id': 21564, 'synset': 'petiole.n.01', 'name': 'petiole'}, {'id': 21565, 'synset': 'peduncle.n.02', 'name': 'peduncle'}, {'id': 21566, 'synset': 'pedicel.n.01', 'name': 'pedicel'}, {'id': 21567, 'synset': 'flower_cluster.n.01', 'name': 'flower_cluster'}, {'id': 21568, 'synset': 'raceme.n.01', 'name': 'raceme'}, {'id': 21569, 'synset': 'panicle.n.01', 'name': 'panicle'}, {'id': 21570, 'synset': 'thyrse.n.01', 'name': 'thyrse'}, {'id': 21571, 'synset': 'cyme.n.01', 'name': 'cyme'}, {'id': 21572, 'synset': 'cymule.n.01', 'name': 'cymule'}, {'id': 21573, 'synset': 'glomerule.n.01', 'name': 'glomerule'}, {'id': 21574, 'synset': 'scorpioid_cyme.n.01', 'name': 'scorpioid_cyme'}, {'id': 21575, 'synset': 'ear.n.05', 'name': 'ear'}, {'id': 21576, 'synset': 'spadix.n.01', 'name': 'spadix'}, {'id': 21577, 'synset': 'bulbous_plant.n.01', 'name': 'bulbous_plant'}, {'id': 21578, 'synset': 'bulbil.n.01', 'name': 'bulbil'}, {'id': 21579, 'synset': 'cormous_plant.n.01', 'name': 'cormous_plant'}, {'id': 21580, 'synset': 'fruit.n.01', 'name': 'fruit'}, {'id': 21581, 'synset': 'fruitlet.n.01', 'name': 'fruitlet'}, {'id': 21582, 'synset': 'seed.n.01', 'name': 'seed'}, {'id': 21583, 'synset': 'bean.n.02', 'name': 'bean'}, {'id': 21584, 'synset': 'nut.n.01', 'name': 'nut'}, {'id': 21585, 'synset': 'nutlet.n.01', 'name': 'nutlet'}, {'id': 21586, 'synset': 'kernel.n.01', 'name': 'kernel'}, {'id': 21587, 'synset': 'syconium.n.01', 'name': 'syconium'}, {'id': 21588, 'synset': 'berry.n.02', 'name': 'berry'}, {'id': 21589, 'synset': 'aggregate_fruit.n.01', 'name': 'aggregate_fruit'}, {'id': 21590, 'synset': 'simple_fruit.n.01', 'name': 'simple_fruit'}, {'id': 21591, 'synset': 'acinus.n.01', 'name': 'acinus'}, {'id': 21592, 'synset': 'drupe.n.01', 'name': 'drupe'}, {'id': 21593, 'synset': 'drupelet.n.01', 'name': 'drupelet'}, {'id': 21594, 'synset': 'pome.n.01', 'name': 'pome'}, {'id': 21595, 'synset': 'pod.n.02', 'name': 'pod'}, {'id': 21596, 'synset': 'loment.n.01', 'name': 'loment'}, {'id': 21597, 'synset': 'pyxidium.n.01', 'name': 'pyxidium'}, {'id': 21598, 'synset': 'husk.n.02', 'name': 'husk'}, {'id': 21599, 'synset': 'cornhusk.n.01', 'name': 'cornhusk'}, {'id': 21600, 'synset': 'pod.n.01', 'name': 'pod'}, {'id': 21601, 'synset': 'accessory_fruit.n.01', 'name': 'accessory_fruit'}, {'id': 21602, 'synset': 'buckthorn.n.01', 'name': 'buckthorn'}, {'id': 21603, 'synset': 'buckthorn_berry.n.01', 'name': 'buckthorn_berry'}, {'id': 21604, 'synset': 'cascara_buckthorn.n.01', 'name': 'cascara_buckthorn'}, {'id': 21605, 'synset': 'cascara.n.01', 'name': 'cascara'}, {'id': 21606, 'synset': 'carolina_buckthorn.n.01', 'name': 'Carolina_buckthorn'}, {'id': 21607, 'synset': 'coffeeberry.n.01', 'name': 'coffeeberry'}, {'id': 21608, 'synset': 'redberry.n.01', 'name': 'redberry'}, {'id': 21609, 'synset': 'nakedwood.n.01', 'name': 'nakedwood'}, {'id': 21610, 'synset': 'jujube.n.01', 'name': 'jujube'}, {'id': 21611, 'synset': "christ's-thorn.n.01", 'name': "Christ's-thorn"}, {'id': 21612, 'synset': 'hazel.n.01', 'name': 'hazel'}, {'id': 21613, 'synset': 'fox_grape.n.01', 'name': 'fox_grape'}, {'id': 21614, 'synset': 'muscadine.n.01', 'name': 'muscadine'}, {'id': 21615, 'synset': 'vinifera.n.01', 'name': 'vinifera'}, {'id': 21616, 'synset': 'pinot_blanc.n.01', 'name': 'Pinot_blanc'}, {'id': 21617, 'synset': 'sauvignon_grape.n.01', 'name': 'Sauvignon_grape'}, {'id': 21618, 'synset': 'sauvignon_blanc.n.01', 'name': 'Sauvignon_blanc'}, {'id': 21619, 'synset': 'muscadet.n.01', 'name': 'Muscadet'}, {'id': 21620, 'synset': 'riesling.n.01', 'name': 'Riesling'}, {'id': 21621, 'synset': 'zinfandel.n.01', 'name': 'Zinfandel'}, {'id': 21622, 'synset': 'chenin_blanc.n.01', 'name': 'Chenin_blanc'}, {'id': 21623, 'synset': 'malvasia.n.01', 'name': 'malvasia'}, {'id': 21624, 'synset': 'verdicchio.n.01', 'name': 'Verdicchio'}, {'id': 21625, 'synset': 'boston_ivy.n.01', 'name': 'Boston_ivy'}, {'id': 21626, 'synset': 'virginia_creeper.n.01', 'name': 'Virginia_creeper'}, {'id': 21627, 'synset': 'true_pepper.n.01', 'name': 'true_pepper'}, {'id': 21628, 'synset': 'betel.n.01', 'name': 'betel'}, {'id': 21629, 'synset': 'cubeb.n.01', 'name': 'cubeb'}, {'id': 21630, 'synset': 'schizocarp.n.01', 'name': 'schizocarp'}, {'id': 21631, 'synset': 'peperomia.n.01', 'name': 'peperomia'}, {'id': 21632, 'synset': 'watermelon_begonia.n.01', 'name': 'watermelon_begonia'}, {'id': 21633, 'synset': 'yerba_mansa.n.01', 'name': 'yerba_mansa'}, {'id': 21634, 'synset': 'pinna.n.01', 'name': 'pinna'}, {'id': 21635, 'synset': 'frond.n.01', 'name': 'frond'}, {'id': 21636, 'synset': 'bract.n.01', 'name': 'bract'}, {'id': 21637, 'synset': 'bracteole.n.01', 'name': 'bracteole'}, {'id': 21638, 'synset': 'involucre.n.01', 'name': 'involucre'}, {'id': 21639, 'synset': 'glume.n.01', 'name': 'glume'}, {'id': 21640, 'synset': 'palmate_leaf.n.01', 'name': 'palmate_leaf'}, {'id': 21641, 'synset': 'pinnate_leaf.n.01', 'name': 'pinnate_leaf'}, {'id': 21642, 'synset': 'bijugate_leaf.n.01', 'name': 'bijugate_leaf'}, {'id': 21643, 'synset': 'decompound_leaf.n.01', 'name': 'decompound_leaf'}, {'id': 21644, 'synset': 'acuminate_leaf.n.01', 'name': 'acuminate_leaf'}, {'id': 21645, 'synset': 'deltoid_leaf.n.01', 'name': 'deltoid_leaf'}, {'id': 21646, 'synset': 'ensiform_leaf.n.01', 'name': 'ensiform_leaf'}, {'id': 21647, 'synset': 'linear_leaf.n.01', 'name': 'linear_leaf'}, {'id': 21648, 'synset': 'lyrate_leaf.n.01', 'name': 'lyrate_leaf'}, {'id': 21649, 'synset': 'obtuse_leaf.n.01', 'name': 'obtuse_leaf'}, {'id': 21650, 'synset': 'oblanceolate_leaf.n.01', 'name': 'oblanceolate_leaf'}, {'id': 21651, 'synset': 'pandurate_leaf.n.01', 'name': 'pandurate_leaf'}, {'id': 21652, 'synset': 'reniform_leaf.n.01', 'name': 'reniform_leaf'}, {'id': 21653, 'synset': 'spatulate_leaf.n.01', 'name': 'spatulate_leaf'}, {'id': 21654, 'synset': 'even-pinnate_leaf.n.01', 'name': 'even-pinnate_leaf'}, {'id': 21655, 'synset': 'odd-pinnate_leaf.n.01', 'name': 'odd-pinnate_leaf'}, {'id': 21656, 'synset': 'pedate_leaf.n.01', 'name': 'pedate_leaf'}, {'id': 21657, 'synset': 'crenate_leaf.n.01', 'name': 'crenate_leaf'}, {'id': 21658, 'synset': 'dentate_leaf.n.01', 'name': 'dentate_leaf'}, {'id': 21659, 'synset': 'denticulate_leaf.n.01', 'name': 'denticulate_leaf'}, {'id': 21660, 'synset': 'erose_leaf.n.01', 'name': 'erose_leaf'}, {'id': 21661, 'synset': 'runcinate_leaf.n.01', 'name': 'runcinate_leaf'}, {'id': 21662, 'synset': 'prickly-edged_leaf.n.01', 'name': 'prickly-edged_leaf'}, {'id': 21663, 'synset': 'deadwood.n.01', 'name': 'deadwood'}, {'id': 21664, 'synset': 'haulm.n.01', 'name': 'haulm'}, {'id': 21665, 'synset': 'branchlet.n.01', 'name': 'branchlet'}, {'id': 21666, 'synset': 'osier.n.01', 'name': 'osier'}, {'id': 21667, 'synset': 'giant_scrambling_fern.n.01', 'name': 'giant_scrambling_fern'}, {'id': 21668, 'synset': 'umbrella_fern.n.01', 'name': 'umbrella_fern'}, {'id': 21669, 'synset': 'floating_fern.n.02', 'name': 'floating_fern'}, {'id': 21670, 'synset': 'polypody.n.01', 'name': 'polypody'}, {'id': 21671, 'synset': 'licorice_fern.n.01', 'name': 'licorice_fern'}, {'id': 21672, 'synset': 'grey_polypody.n.01', 'name': 'grey_polypody'}, {'id': 21673, 'synset': 'leatherleaf.n.01', 'name': 'leatherleaf'}, {'id': 21674, 'synset': 'rock_polypody.n.01', 'name': 'rock_polypody'}, {'id': 21675, 'synset': 'common_polypody.n.01', 'name': 'common_polypody'}, {'id': 21676, 'synset': "bear's-paw_fern.n.01", 'name': "bear's-paw_fern"}, {'id': 21677, 'synset': 'strap_fern.n.01', 'name': 'strap_fern'}, {'id': 21678, 'synset': 'florida_strap_fern.n.01', 'name': 'Florida_strap_fern'}, {'id': 21679, 'synset': 'basket_fern.n.02', 'name': 'basket_fern'}, {'id': 21680, 'synset': 'snake_polypody.n.01', 'name': 'snake_polypody'}, {'id': 21681, 'synset': "climbing_bird's_nest_fern.n.01", 'name': "climbing_bird's_nest_fern"}, {'id': 21682, 'synset': 'golden_polypody.n.01', 'name': 'golden_polypody'}, {'id': 21683, 'synset': 'staghorn_fern.n.01', 'name': 'staghorn_fern'}, {'id': 21684, 'synset': 'south_american_staghorn.n.01', 'name': 'South_American_staghorn'}, {'id': 21685, 'synset': 'common_staghorn_fern.n.01', 'name': 'common_staghorn_fern'}, {'id': 21686, 'synset': 'felt_fern.n.01', 'name': 'felt_fern'}, {'id': 21687, 'synset': 'potato_fern.n.02', 'name': 'potato_fern'}, {'id': 21688, 'synset': 'myrmecophyte.n.01', 'name': 'myrmecophyte'}, {'id': 21689, 'synset': 'grass_fern.n.01', 'name': 'grass_fern'}, {'id': 21690, 'synset': 'spleenwort.n.01', 'name': 'spleenwort'}, {'id': 21691, 'synset': 'black_spleenwort.n.01', 'name': 'black_spleenwort'}, {'id': 21692, 'synset': "bird's_nest_fern.n.01", 'name': "bird's_nest_fern"}, {'id': 21693, 'synset': 'ebony_spleenwort.n.01', 'name': 'ebony_spleenwort'}, {'id': 21694, 'synset': 'black-stem_spleenwort.n.01', 'name': 'black-stem_spleenwort'}, {'id': 21695, 'synset': 'walking_fern.n.01', 'name': 'walking_fern'}, {'id': 21696, 'synset': 'green_spleenwort.n.01', 'name': 'green_spleenwort'}, {'id': 21697, 'synset': 'mountain_spleenwort.n.01', 'name': 'mountain_spleenwort'}, {'id': 21698, 'synset': 'lobed_spleenwort.n.01', 'name': 'lobed_spleenwort'}, {'id': 21699, 'synset': 'lanceolate_spleenwort.n.01', 'name': 'lanceolate_spleenwort'}, {'id': 21700, 'synset': "hart's-tongue.n.02", 'name': "hart's-tongue"}, {'id': 21701, 'synset': 'scale_fern.n.01', 'name': 'scale_fern'}, {'id': 21702, 'synset': 'scolopendrium.n.01', 'name': 'scolopendrium'}, {'id': 21703, 'synset': 'deer_fern.n.01', 'name': 'deer_fern'}, {'id': 21704, 'synset': 'doodia.n.01', 'name': 'doodia'}, {'id': 21705, 'synset': 'chain_fern.n.01', 'name': 'chain_fern'}, {'id': 21706, 'synset': 'virginia_chain_fern.n.01', 'name': 'Virginia_chain_fern'}, {'id': 21707, 'synset': 'silver_tree_fern.n.01', 'name': 'silver_tree_fern'}, {'id': 21708, 'synset': 'davallia.n.01', 'name': 'davallia'}, {'id': 21709, 'synset': "hare's-foot_fern.n.01", 'name': "hare's-foot_fern"}, {'id': 21710, 'synset': "canary_island_hare's_foot_fern.n.01", 'name': "Canary_Island_hare's_foot_fern"}, {'id': 21711, 'synset': "squirrel's-foot_fern.n.01", 'name': "squirrel's-foot_fern"}, {'id': 21712, 'synset': 'bracken.n.01', 'name': 'bracken'}, {'id': 21713, 'synset': 'soft_tree_fern.n.01', 'name': 'soft_tree_fern'}, {'id': 21714, 'synset': 'scythian_lamb.n.01', 'name': 'Scythian_lamb'}, {'id': 21715, 'synset': 'false_bracken.n.01', 'name': 'false_bracken'}, {'id': 21716, 'synset': 'thyrsopteris.n.01', 'name': 'thyrsopteris'}, {'id': 21717, 'synset': 'shield_fern.n.01', 'name': 'shield_fern'}, {'id': 21718, 'synset': 'broad_buckler-fern.n.01', 'name': 'broad_buckler-fern'}, {'id': 21719, 'synset': 'fragrant_cliff_fern.n.01', 'name': 'fragrant_cliff_fern'}, {'id': 21720, 'synset': "goldie's_fern.n.01", 'name': "Goldie's_fern"}, {'id': 21721, 'synset': 'wood_fern.n.01', 'name': 'wood_fern'}, {'id': 21722, 'synset': 'male_fern.n.01', 'name': 'male_fern'}, {'id': 21723, 'synset': 'marginal_wood_fern.n.01', 'name': 'marginal_wood_fern'}, {'id': 21724, 'synset': 'mountain_male_fern.n.01', 'name': 'mountain_male_fern'}, {'id': 21725, 'synset': 'lady_fern.n.01', 'name': 'lady_fern'}, {'id': 21726, 'synset': 'alpine_lady_fern.n.01', 'name': 'Alpine_lady_fern'}, {'id': 21727, 'synset': 'silvery_spleenwort.n.02', 'name': 'silvery_spleenwort'}, {'id': 21728, 'synset': 'holly_fern.n.02', 'name': 'holly_fern'}, {'id': 21729, 'synset': 'bladder_fern.n.01', 'name': 'bladder_fern'}, {'id': 21730, 'synset': 'brittle_bladder_fern.n.01', 'name': 'brittle_bladder_fern'}, {'id': 21731, 'synset': 'mountain_bladder_fern.n.01', 'name': 'mountain_bladder_fern'}, {'id': 21732, 'synset': 'bulblet_fern.n.01', 'name': 'bulblet_fern'}, {'id': 21733, 'synset': 'silvery_spleenwort.n.01', 'name': 'silvery_spleenwort'}, {'id': 21734, 'synset': 'oak_fern.n.01', 'name': 'oak_fern'}, {'id': 21735, 'synset': 'limestone_fern.n.01', 'name': 'limestone_fern'}, {'id': 21736, 'synset': 'ostrich_fern.n.01', 'name': 'ostrich_fern'}, {'id': 21737, 'synset': "hart's-tongue.n.01", 'name': "hart's-tongue"}, {'id': 21738, 'synset': 'sensitive_fern.n.01', 'name': 'sensitive_fern'}, {'id': 21739, 'synset': 'christmas_fern.n.01', 'name': 'Christmas_fern'}, {'id': 21740, 'synset': 'holly_fern.n.01', 'name': 'holly_fern'}, {'id': 21741, 'synset': "braun's_holly_fern.n.01", 'name': "Braun's_holly_fern"}, {'id': 21742, 'synset': 'western_holly_fern.n.01', 'name': 'western_holly_fern'}, {'id': 21743, 'synset': 'soft_shield_fern.n.01', 'name': 'soft_shield_fern'}, {'id': 21744, 'synset': 'leather_fern.n.02', 'name': 'leather_fern'}, {'id': 21745, 'synset': 'button_fern.n.02', 'name': 'button_fern'}, {'id': 21746, 'synset': 'indian_button_fern.n.01', 'name': 'Indian_button_fern'}, {'id': 21747, 'synset': 'woodsia.n.01', 'name': 'woodsia'}, {'id': 21748, 'synset': 'rusty_woodsia.n.01', 'name': 'rusty_woodsia'}, {'id': 21749, 'synset': 'alpine_woodsia.n.01', 'name': 'Alpine_woodsia'}, {'id': 21750, 'synset': 'smooth_woodsia.n.01', 'name': 'smooth_woodsia'}, {'id': 21751, 'synset': 'boston_fern.n.01', 'name': 'Boston_fern'}, {'id': 21752, 'synset': 'basket_fern.n.01', 'name': 'basket_fern'}, {'id': 21753, 'synset': 'golden_fern.n.02', 'name': 'golden_fern'}, {'id': 21754, 'synset': 'maidenhair.n.01', 'name': 'maidenhair'}, {'id': 21755, 'synset': 'common_maidenhair.n.01', 'name': 'common_maidenhair'}, {'id': 21756, 'synset': 'american_maidenhair_fern.n.01', 'name': 'American_maidenhair_fern'}, {'id': 21757, 'synset': 'bermuda_maidenhair.n.01', 'name': 'Bermuda_maidenhair'}, {'id': 21758, 'synset': 'brittle_maidenhair.n.01', 'name': 'brittle_maidenhair'}, {'id': 21759, 'synset': 'farley_maidenhair.n.01', 'name': 'Farley_maidenhair'}, {'id': 21760, 'synset': 'annual_fern.n.01', 'name': 'annual_fern'}, {'id': 21761, 'synset': 'lip_fern.n.01', 'name': 'lip_fern'}, {'id': 21762, 'synset': 'smooth_lip_fern.n.01', 'name': 'smooth_lip_fern'}, {'id': 21763, 'synset': 'lace_fern.n.01', 'name': 'lace_fern'}, {'id': 21764, 'synset': 'wooly_lip_fern.n.01', 'name': 'wooly_lip_fern'}, {'id': 21765, 'synset': 'southwestern_lip_fern.n.01', 'name': 'southwestern_lip_fern'}, {'id': 21766, 'synset': 'bamboo_fern.n.01', 'name': 'bamboo_fern'}, {'id': 21767, 'synset': 'american_rock_brake.n.01', 'name': 'American_rock_brake'}, {'id': 21768, 'synset': 'european_parsley_fern.n.01', 'name': 'European_parsley_fern'}, {'id': 21769, 'synset': 'hand_fern.n.01', 'name': 'hand_fern'}, {'id': 21770, 'synset': 'cliff_brake.n.01', 'name': 'cliff_brake'}, {'id': 21771, 'synset': 'coffee_fern.n.01', 'name': 'coffee_fern'}, {'id': 21772, 'synset': 'purple_rock_brake.n.01', 'name': 'purple_rock_brake'}, {'id': 21773, 'synset': "bird's-foot_fern.n.01", 'name': "bird's-foot_fern"}, {'id': 21774, 'synset': 'button_fern.n.01', 'name': 'button_fern'}, {'id': 21775, 'synset': 'silver_fern.n.02', 'name': 'silver_fern'}, {'id': 21776, 'synset': 'golden_fern.n.01', 'name': 'golden_fern'}, {'id': 21777, 'synset': 'gold_fern.n.01', 'name': 'gold_fern'}, {'id': 21778, 'synset': 'pteris_cretica.n.01', 'name': 'Pteris_cretica'}, {'id': 21779, 'synset': 'spider_brake.n.01', 'name': 'spider_brake'}, {'id': 21780, 'synset': 'ribbon_fern.n.01', 'name': 'ribbon_fern'}, {'id': 21781, 'synset': 'potato_fern.n.01', 'name': 'potato_fern'}, {'id': 21782, 'synset': 'angiopteris.n.01', 'name': 'angiopteris'}, {'id': 21783, 'synset': 'skeleton_fork_fern.n.01', 'name': 'skeleton_fork_fern'}, {'id': 21784, 'synset': 'horsetail.n.01', 'name': 'horsetail'}, {'id': 21785, 'synset': 'common_horsetail.n.01', 'name': 'common_horsetail'}, {'id': 21786, 'synset': 'swamp_horsetail.n.01', 'name': 'swamp_horsetail'}, {'id': 21787, 'synset': 'scouring_rush.n.01', 'name': 'scouring_rush'}, {'id': 21788, 'synset': 'marsh_horsetail.n.01', 'name': 'marsh_horsetail'}, {'id': 21789, 'synset': 'wood_horsetail.n.01', 'name': 'wood_horsetail'}, {'id': 21790, 'synset': 'variegated_horsetail.n.01', 'name': 'variegated_horsetail'}, {'id': 21791, 'synset': 'club_moss.n.01', 'name': 'club_moss'}, {'id': 21792, 'synset': 'shining_clubmoss.n.01', 'name': 'shining_clubmoss'}, {'id': 21793, 'synset': 'alpine_clubmoss.n.01', 'name': 'alpine_clubmoss'}, {'id': 21794, 'synset': 'fir_clubmoss.n.01', 'name': 'fir_clubmoss'}, {'id': 21795, 'synset': 'ground_cedar.n.01', 'name': 'ground_cedar'}, {'id': 21796, 'synset': 'ground_fir.n.01', 'name': 'ground_fir'}, {'id': 21797, 'synset': 'foxtail_grass.n.01', 'name': 'foxtail_grass'}, {'id': 21798, 'synset': 'spikemoss.n.01', 'name': 'spikemoss'}, {'id': 21799, 'synset': 'meadow_spikemoss.n.01', 'name': 'meadow_spikemoss'}, {'id': 21800, 'synset': 'desert_selaginella.n.01', 'name': 'desert_selaginella'}, {'id': 21801, 'synset': 'resurrection_plant.n.01', 'name': 'resurrection_plant'}, {'id': 21802, 'synset': 'florida_selaginella.n.01', 'name': 'florida_selaginella'}, {'id': 21803, 'synset': 'quillwort.n.01', 'name': 'quillwort'}, {'id': 21804, 'synset': 'earthtongue.n.01', 'name': 'earthtongue'}, {'id': 21805, 'synset': 'snuffbox_fern.n.01', 'name': 'snuffbox_fern'}, {'id': 21806, 'synset': 'christella.n.01', 'name': 'christella'}, {'id': 21807, 'synset': 'mountain_fern.n.01', 'name': 'mountain_fern'}, {'id': 21808, 'synset': 'new_york_fern.n.01', 'name': 'New_York_fern'}, {'id': 21809, 'synset': 'massachusetts_fern.n.01', 'name': 'Massachusetts_fern'}, {'id': 21810, 'synset': 'beech_fern.n.01', 'name': 'beech_fern'}, {'id': 21811, 'synset': 'broad_beech_fern.n.01', 'name': 'broad_beech_fern'}, {'id': 21812, 'synset': 'long_beech_fern.n.01', 'name': 'long_beech_fern'}, {'id': 21813, 'synset': 'shoestring_fungus.n.01', 'name': 'shoestring_fungus'}, {'id': 21814, 'synset': 'armillaria_caligata.n.01', 'name': 'Armillaria_caligata'}, {'id': 21815, 'synset': 'armillaria_ponderosa.n.01', 'name': 'Armillaria_ponderosa'}, {'id': 21816, 'synset': 'armillaria_zelleri.n.01', 'name': 'Armillaria_zelleri'}, {'id': 21817, 'synset': 'honey_mushroom.n.01', 'name': 'honey_mushroom'}, {'id': 21818, 'synset': 'milkweed.n.01', 'name': 'milkweed'}, {'id': 21819, 'synset': 'white_milkweed.n.01', 'name': 'white_milkweed'}, {'id': 21820, 'synset': 'poke_milkweed.n.01', 'name': 'poke_milkweed'}, {'id': 21821, 'synset': 'swamp_milkweed.n.01', 'name': 'swamp_milkweed'}, {'id': 21822, 'synset': "mead's_milkweed.n.01", 'name': "Mead's_milkweed"}, {'id': 21823, 'synset': 'purple_silkweed.n.01', 'name': 'purple_silkweed'}, {'id': 21824, 'synset': 'showy_milkweed.n.01', 'name': 'showy_milkweed'}, {'id': 21825, 'synset': 'poison_milkweed.n.01', 'name': 'poison_milkweed'}, {'id': 21826, 'synset': 'butterfly_weed.n.01', 'name': 'butterfly_weed'}, {'id': 21827, 'synset': 'whorled_milkweed.n.01', 'name': 'whorled_milkweed'}, {'id': 21828, 'synset': 'cruel_plant.n.01', 'name': 'cruel_plant'}, {'id': 21829, 'synset': 'wax_plant.n.01', 'name': 'wax_plant'}, {'id': 21830, 'synset': 'silk_vine.n.01', 'name': 'silk_vine'}, {'id': 21831, 'synset': 'stapelia.n.01', 'name': 'stapelia'}, {'id': 21832, 'synset': 'stapelias_asterias.n.01', 'name': 'Stapelias_asterias'}, {'id': 21833, 'synset': 'stephanotis.n.01', 'name': 'stephanotis'}, {'id': 21834, 'synset': 'madagascar_jasmine.n.01', 'name': 'Madagascar_jasmine'}, {'id': 21835, 'synset': 'negro_vine.n.01', 'name': 'negro_vine'}, {'id': 21836, 'synset': 'zygospore.n.01', 'name': 'zygospore'}, {'id': 21837, 'synset': 'tree_of_knowledge.n.01', 'name': 'tree_of_knowledge'}, {'id': 21838, 'synset': 'orangery.n.01', 'name': 'orangery'}, {'id': 21839, 'synset': 'pocketbook.n.01', 'name': 'pocketbook'}, {'id': 21840, 'synset': 'shit.n.04', 'name': 'shit'}, {'id': 21841, 'synset': 'cordage.n.01', 'name': 'cordage'}, {'id': 21842, 'synset': 'yard.n.01', 'name': 'yard'}, {'id': 21843, 'synset': 'extremum.n.02', 'name': 'extremum'}, {'id': 21844, 'synset': 'leaf_shape.n.01', 'name': 'leaf_shape'}, {'id': 21845, 'synset': 'equilateral.n.01', 'name': 'equilateral'}, {'id': 21846, 'synset': 'figure.n.06', 'name': 'figure'}, {'id': 21847, 'synset': 'pencil.n.03', 'name': 'pencil'}, {'id': 21848, 'synset': 'plane_figure.n.01', 'name': 'plane_figure'}, {'id': 21849, 'synset': 'solid_figure.n.01', 'name': 'solid_figure'}, {'id': 21850, 'synset': 'line.n.04', 'name': 'line'}, {'id': 21851, 'synset': 'bulb.n.04', 'name': 'bulb'}, {'id': 21852, 'synset': 'convex_shape.n.01', 'name': 'convex_shape'}, {'id': 21853, 'synset': 'concave_shape.n.01', 'name': 'concave_shape'}, {'id': 21854, 'synset': 'cylinder.n.01', 'name': 'cylinder'}, {'id': 21855, 'synset': 'round_shape.n.01', 'name': 'round_shape'}, {'id': 21856, 'synset': 'heart.n.07', 'name': 'heart'}, {'id': 21857, 'synset': 'polygon.n.01', 'name': 'polygon'}, {'id': 21858, 'synset': 'convex_polygon.n.01', 'name': 'convex_polygon'}, {'id': 21859, 'synset': 'concave_polygon.n.01', 'name': 'concave_polygon'}, {'id': 21860, 'synset': 'reentrant_polygon.n.01', 'name': 'reentrant_polygon'}, {'id': 21861, 'synset': 'amorphous_shape.n.01', 'name': 'amorphous_shape'}, {'id': 21862, 'synset': 'closed_curve.n.01', 'name': 'closed_curve'}, {'id': 21863, 'synset': 'simple_closed_curve.n.01', 'name': 'simple_closed_curve'}, {'id': 21864, 'synset': 's-shape.n.01', 'name': 'S-shape'}, {'id': 21865, 'synset': 'wave.n.07', 'name': 'wave'}, {'id': 21866, 'synset': 'extrados.n.01', 'name': 'extrados'}, {'id': 21867, 'synset': 'hook.n.02', 'name': 'hook'}, {'id': 21868, 'synset': 'envelope.n.03', 'name': 'envelope'}, {'id': 21869, 'synset': 'bight.n.02', 'name': 'bight'}, {'id': 21870, 'synset': 'diameter.n.02', 'name': 'diameter'}, {'id': 21871, 'synset': 'cone.n.02', 'name': 'cone'}, {'id': 21872, 'synset': 'funnel.n.01', 'name': 'funnel'}, {'id': 21873, 'synset': 'oblong.n.01', 'name': 'oblong'}, {'id': 21874, 'synset': 'circle.n.01', 'name': 'circle'}, {'id': 21875, 'synset': 'circle.n.03', 'name': 'circle'}, {'id': 21876, 'synset': 'equator.n.02', 'name': 'equator'}, {'id': 21877, 'synset': 'scallop.n.01', 'name': 'scallop'}, {'id': 21878, 'synset': 'ring.n.02', 'name': 'ring'}, {'id': 21879, 'synset': 'loop.n.02', 'name': 'loop'}, {'id': 21880, 'synset': 'bight.n.01', 'name': 'bight'}, {'id': 21881, 'synset': 'helix.n.01', 'name': 'helix'}, {'id': 21882, 'synset': 'element_of_a_cone.n.01', 'name': 'element_of_a_cone'}, {'id': 21883, 'synset': 'element_of_a_cylinder.n.01', 'name': 'element_of_a_cylinder'}, {'id': 21884, 'synset': 'ellipse.n.01', 'name': 'ellipse'}, {'id': 21885, 'synset': 'quadrate.n.02', 'name': 'quadrate'}, {'id': 21886, 'synset': 'triangle.n.01', 'name': 'triangle'}, {'id': 21887, 'synset': 'acute_triangle.n.01', 'name': 'acute_triangle'}, {'id': 21888, 'synset': 'isosceles_triangle.n.01', 'name': 'isosceles_triangle'}, {'id': 21889, 'synset': 'obtuse_triangle.n.01', 'name': 'obtuse_triangle'}, {'id': 21890, 'synset': 'right_triangle.n.01', 'name': 'right_triangle'}, {'id': 21891, 'synset': 'scalene_triangle.n.01', 'name': 'scalene_triangle'}, {'id': 21892, 'synset': 'parallel.n.03', 'name': 'parallel'}, {'id': 21893, 'synset': 'trapezoid.n.01', 'name': 'trapezoid'}, {'id': 21894, 'synset': 'star.n.05', 'name': 'star'}, {'id': 21895, 'synset': 'pentagon.n.03', 'name': 'pentagon'}, {'id': 21896, 'synset': 'hexagon.n.01', 'name': 'hexagon'}, {'id': 21897, 'synset': 'heptagon.n.01', 'name': 'heptagon'}, {'id': 21898, 'synset': 'octagon.n.01', 'name': 'octagon'}, {'id': 21899, 'synset': 'nonagon.n.01', 'name': 'nonagon'}, {'id': 21900, 'synset': 'decagon.n.01', 'name': 'decagon'}, {'id': 21901, 'synset': 'rhombus.n.01', 'name': 'rhombus'}, {'id': 21902, 'synset': 'spherical_polygon.n.01', 'name': 'spherical_polygon'}, {'id': 21903, 'synset': 'spherical_triangle.n.01', 'name': 'spherical_triangle'}, {'id': 21904, 'synset': 'convex_polyhedron.n.01', 'name': 'convex_polyhedron'}, {'id': 21905, 'synset': 'concave_polyhedron.n.01', 'name': 'concave_polyhedron'}, {'id': 21906, 'synset': 'cuboid.n.01', 'name': 'cuboid'}, {'id': 21907, 'synset': 'quadrangular_prism.n.01', 'name': 'quadrangular_prism'}, {'id': 21908, 'synset': 'bell.n.05', 'name': 'bell'}, {'id': 21909, 'synset': 'angular_distance.n.01', 'name': 'angular_distance'}, {'id': 21910, 'synset': 'true_anomaly.n.01', 'name': 'true_anomaly'}, {'id': 21911, 'synset': 'spherical_angle.n.01', 'name': 'spherical_angle'}, {'id': 21912, 'synset': 'angle_of_refraction.n.01', 'name': 'angle_of_refraction'}, {'id': 21913, 'synset': 'acute_angle.n.01', 'name': 'acute_angle'}, {'id': 21914, 'synset': 'groove.n.01', 'name': 'groove'}, {'id': 21915, 'synset': 'rut.n.01', 'name': 'rut'}, {'id': 21916, 'synset': 'bulge.n.01', 'name': 'bulge'}, {'id': 21917, 'synset': 'belly.n.03', 'name': 'belly'}, {'id': 21918, 'synset': 'bow.n.05', 'name': 'bow'}, {'id': 21919, 'synset': 'crescent.n.01', 'name': 'crescent'}, {'id': 21920, 'synset': 'ellipsoid.n.01', 'name': 'ellipsoid'}, {'id': 21921, 'synset': 'hypotenuse.n.01', 'name': 'hypotenuse'}, {'id': 21922, 'synset': 'balance.n.04', 'name': 'balance'}, {'id': 21923, 'synset': 'conformation.n.01', 'name': 'conformation'}, {'id': 21924, 'synset': 'symmetry.n.02', 'name': 'symmetry'}, {'id': 21925, 'synset': 'spheroid.n.01', 'name': 'spheroid'}, {'id': 21926, 'synset': 'spherule.n.01', 'name': 'spherule'}, {'id': 21927, 'synset': 'toroid.n.01', 'name': 'toroid'}, {'id': 21928, 'synset': 'column.n.04', 'name': 'column'}, {'id': 21929, 'synset': 'barrel.n.03', 'name': 'barrel'}, {'id': 21930, 'synset': 'pipe.n.03', 'name': 'pipe'}, {'id': 21931, 'synset': 'pellet.n.01', 'name': 'pellet'}, {'id': 21932, 'synset': 'bolus.n.01', 'name': 'bolus'}, {'id': 21933, 'synset': 'dewdrop.n.01', 'name': 'dewdrop'}, {'id': 21934, 'synset': 'ridge.n.02', 'name': 'ridge'}, {'id': 21935, 'synset': 'rim.n.01', 'name': 'rim'}, {'id': 21936, 'synset': 'taper.n.01', 'name': 'taper'}, {'id': 21937, 'synset': 'boundary.n.02', 'name': 'boundary'}, {'id': 21938, 'synset': 'incisure.n.01', 'name': 'incisure'}, {'id': 21939, 'synset': 'notch.n.01', 'name': 'notch'}, {'id': 21940, 'synset': 'wrinkle.n.01', 'name': 'wrinkle'}, {'id': 21941, 'synset': 'dermatoglyphic.n.01', 'name': 'dermatoglyphic'}, {'id': 21942, 'synset': 'frown_line.n.01', 'name': 'frown_line'}, {'id': 21943, 'synset': 'line_of_life.n.01', 'name': 'line_of_life'}, {'id': 21944, 'synset': 'line_of_heart.n.01', 'name': 'line_of_heart'}, {'id': 21945, 'synset': 'crevice.n.01', 'name': 'crevice'}, {'id': 21946, 'synset': 'cleft.n.01', 'name': 'cleft'}, {'id': 21947, 'synset': 'roulette.n.01', 'name': 'roulette'}, {'id': 21948, 'synset': 'node.n.01', 'name': 'node'}, {'id': 21949, 'synset': 'tree.n.02', 'name': 'tree'}, {'id': 21950, 'synset': 'stemma.n.01', 'name': 'stemma'}, {'id': 21951, 'synset': 'brachium.n.01', 'name': 'brachium'}, {'id': 21952, 'synset': 'fork.n.03', 'name': 'fork'}, {'id': 21953, 'synset': 'block.n.03', 'name': 'block'}, {'id': 21954, 'synset': 'ovoid.n.01', 'name': 'ovoid'}, {'id': 21955, 'synset': 'tetrahedron.n.01', 'name': 'tetrahedron'}, {'id': 21956, 'synset': 'pentahedron.n.01', 'name': 'pentahedron'}, {'id': 21957, 'synset': 'hexahedron.n.01', 'name': 'hexahedron'}, {'id': 21958, 'synset': 'regular_polyhedron.n.01', 'name': 'regular_polyhedron'}, {'id': 21959, 'synset': 'polyhedral_angle.n.01', 'name': 'polyhedral_angle'}, {'id': 21960, 'synset': 'cube.n.01', 'name': 'cube'}, {'id': 21961, 'synset': 'truncated_pyramid.n.01', 'name': 'truncated_pyramid'}, {'id': 21962, 'synset': 'truncated_cone.n.01', 'name': 'truncated_cone'}, {'id': 21963, 'synset': 'tail.n.03', 'name': 'tail'}, {'id': 21964, 'synset': 'tongue.n.03', 'name': 'tongue'}, {'id': 21965, 'synset': 'trapezohedron.n.01', 'name': 'trapezohedron'}, {'id': 21966, 'synset': 'wedge.n.01', 'name': 'wedge'}, {'id': 21967, 'synset': 'keel.n.01', 'name': 'keel'}, {'id': 21968, 'synset': 'place.n.06', 'name': 'place'}, {'id': 21969, 'synset': 'herpes.n.01', 'name': 'herpes'}, {'id': 21970, 'synset': 'chlamydia.n.01', 'name': 'chlamydia'}, {'id': 21971, 'synset': 'wall.n.04', 'name': 'wall'}, {'id': 21972, 'synset': 'micronutrient.n.01', 'name': 'micronutrient'}, {'id': 21973, 'synset': 'chyme.n.01', 'name': 'chyme'}, {'id': 21974, 'synset': 'ragweed_pollen.n.01', 'name': 'ragweed_pollen'}, {'id': 21975, 'synset': 'pina_cloth.n.01', 'name': 'pina_cloth'}, {'id': 21976, 'synset': 'chlorobenzylidenemalononitrile.n.01', 'name': 'chlorobenzylidenemalononitrile'}, {'id': 21977, 'synset': 'carbon.n.01', 'name': 'carbon'}, {'id': 21978, 'synset': 'charcoal.n.01', 'name': 'charcoal'}, {'id': 21979, 'synset': 'rock.n.02', 'name': 'rock'}, {'id': 21980, 'synset': 'gravel.n.01', 'name': 'gravel'}, {'id': 21981, 'synset': 'aflatoxin.n.01', 'name': 'aflatoxin'}, {'id': 21982, 'synset': 'alpha-tocopheral.n.01', 'name': 'alpha-tocopheral'}, {'id': 21983, 'synset': 'leopard.n.01', 'name': 'leopard'}, {'id': 21984, 'synset': 'bricks_and_mortar.n.01', 'name': 'bricks_and_mortar'}, {'id': 21985, 'synset': 'lagging.n.01', 'name': 'lagging'}, {'id': 21986, 'synset': 'hydraulic_cement.n.01', 'name': 'hydraulic_cement'}, {'id': 21987, 'synset': 'choline.n.01', 'name': 'choline'}, {'id': 21988, 'synset': 'concrete.n.01', 'name': 'concrete'}, {'id': 21989, 'synset': 'glass_wool.n.01', 'name': 'glass_wool'}, {'id': 21990, 'synset': 'soil.n.02', 'name': 'soil'}, {'id': 21991, 'synset': 'high_explosive.n.01', 'name': 'high_explosive'}, {'id': 21992, 'synset': 'litter.n.02', 'name': 'litter'}, {'id': 21993, 'synset': 'fish_meal.n.01', 'name': 'fish_meal'}, {'id': 21994, 'synset': 'greek_fire.n.01', 'name': 'Greek_fire'}, {'id': 21995, 'synset': 'culture_medium.n.01', 'name': 'culture_medium'}, {'id': 21996, 'synset': 'agar.n.01', 'name': 'agar'}, {'id': 21997, 'synset': 'blood_agar.n.01', 'name': 'blood_agar'}, {'id': 21998, 'synset': 'hip_tile.n.01', 'name': 'hip_tile'}, {'id': 21999, 'synset': 'hyacinth.n.01', 'name': 'hyacinth'}, {'id': 22000, 'synset': 'hydroxide_ion.n.01', 'name': 'hydroxide_ion'}, {'id': 22001, 'synset': 'ice.n.01', 'name': 'ice'}, {'id': 22002, 'synset': 'inositol.n.01', 'name': 'inositol'}, {'id': 22003, 'synset': 'linoleum.n.01', 'name': 'linoleum'}, {'id': 22004, 'synset': 'lithia_water.n.01', 'name': 'lithia_water'}, {'id': 22005, 'synset': 'lodestone.n.01', 'name': 'lodestone'}, {'id': 22006, 'synset': 'pantothenic_acid.n.01', 'name': 'pantothenic_acid'}, {'id': 22007, 'synset': 'paper.n.01', 'name': 'paper'}, {'id': 22008, 'synset': 'papyrus.n.01', 'name': 'papyrus'}, {'id': 22009, 'synset': 'pantile.n.01', 'name': 'pantile'}, {'id': 22010, 'synset': 'blacktop.n.01', 'name': 'blacktop'}, {'id': 22011, 'synset': 'tarmacadam.n.01', 'name': 'tarmacadam'}, {'id': 22012, 'synset': 'paving.n.01', 'name': 'paving'}, {'id': 22013, 'synset': 'plaster.n.01', 'name': 'plaster'}, {'id': 22014, 'synset': 'poison_gas.n.01', 'name': 'poison_gas'}, {'id': 22015, 'synset': 'ridge_tile.n.01', 'name': 'ridge_tile'}, {'id': 22016, 'synset': 'roughcast.n.01', 'name': 'roughcast'}, {'id': 22017, 'synset': 'sand.n.01', 'name': 'sand'}, {'id': 22018, 'synset': 'spackle.n.01', 'name': 'spackle'}, {'id': 22019, 'synset': 'render.n.01', 'name': 'render'}, {'id': 22020, 'synset': 'wattle_and_daub.n.01', 'name': 'wattle_and_daub'}, {'id': 22021, 'synset': 'stucco.n.01', 'name': 'stucco'}, {'id': 22022, 'synset': 'tear_gas.n.01', 'name': 'tear_gas'}, {'id': 22023, 'synset': 'linseed.n.01', 'name': 'linseed'}, {'id': 22024, 'synset': 'vitamin.n.01', 'name': 'vitamin'}, {'id': 22025, 'synset': 'fat-soluble_vitamin.n.01', 'name': 'fat-soluble_vitamin'}, {'id': 22026, 'synset': 'water-soluble_vitamin.n.01', 'name': 'water-soluble_vitamin'}, {'id': 22027, 'synset': 'vitamin_a.n.01', 'name': 'vitamin_A'}, {'id': 22028, 'synset': 'vitamin_a1.n.01', 'name': 'vitamin_A1'}, {'id': 22029, 'synset': 'vitamin_a2.n.01', 'name': 'vitamin_A2'}, {'id': 22030, 'synset': 'b-complex_vitamin.n.01', 'name': 'B-complex_vitamin'}, {'id': 22031, 'synset': 'vitamin_b1.n.01', 'name': 'vitamin_B1'}, {'id': 22032, 'synset': 'vitamin_b12.n.01', 'name': 'vitamin_B12'}, {'id': 22033, 'synset': 'vitamin_b2.n.01', 'name': 'vitamin_B2'}, {'id': 22034, 'synset': 'vitamin_b6.n.01', 'name': 'vitamin_B6'}, {'id': 22035, 'synset': 'vitamin_bc.n.01', 'name': 'vitamin_Bc'}, {'id': 22036, 'synset': 'niacin.n.01', 'name': 'niacin'}, {'id': 22037, 'synset': 'vitamin_d.n.01', 'name': 'vitamin_D'}, {'id': 22038, 'synset': 'vitamin_e.n.01', 'name': 'vitamin_E'}, {'id': 22039, 'synset': 'biotin.n.01', 'name': 'biotin'}, {'id': 22040, 'synset': 'vitamin_k.n.01', 'name': 'vitamin_K'}, {'id': 22041, 'synset': 'vitamin_k1.n.01', 'name': 'vitamin_K1'}, {'id': 22042, 'synset': 'vitamin_k3.n.01', 'name': 'vitamin_K3'}, {'id': 22043, 'synset': 'vitamin_p.n.01', 'name': 'vitamin_P'}, {'id': 22044, 'synset': 'vitamin_c.n.01', 'name': 'vitamin_C'}, {'id': 22045, 'synset': 'planking.n.01', 'name': 'planking'}, {'id': 22046, 'synset': 'chipboard.n.01', 'name': 'chipboard'}, {'id': 22047, 'synset': 'knothole.n.01', 'name': 'knothole'}] # noqa \ No newline at end of file diff --git a/spaces/Detomo/ai-avatar-frontend/src/App.css b/spaces/Detomo/ai-avatar-frontend/src/App.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/spaces/Dinoking/Guccio-AI-Designer/models/stylegan/stylegan_tf/generate_figures.py b/spaces/Dinoking/Guccio-AI-Designer/models/stylegan/stylegan_tf/generate_figures.py deleted file mode 100644 index 45b68b86146198c701a66fb8ba7a363d901d6951..0000000000000000000000000000000000000000 --- a/spaces/Dinoking/Guccio-AI-Designer/models/stylegan/stylegan_tf/generate_figures.py +++ /dev/null @@ -1,161 +0,0 @@ -# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. -# -# This work is licensed under the Creative Commons Attribution-NonCommercial -# 4.0 International License. To view a copy of this license, visit -# http://creativecommons.org/licenses/by-nc/4.0/ or send a letter to -# Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. - -"""Minimal script for reproducing the figures of the StyleGAN paper using pre-trained generators.""" - -import os -import pickle -import numpy as np -import PIL.Image -import dnnlib -import dnnlib.tflib as tflib -import config - -#---------------------------------------------------------------------------- -# Helpers for loading and using pre-trained generators. - -url_ffhq = 'https://drive.google.com/uc?id=1MEGjdvVpUsu1jB4zrXZN7Y4kBBOzizDQ' # karras2019stylegan-ffhq-1024x1024.pkl -url_celebahq = 'https://drive.google.com/uc?id=1MGqJl28pN4t7SAtSrPdSRJSQJqahkzUf' # karras2019stylegan-celebahq-1024x1024.pkl -url_bedrooms = 'https://drive.google.com/uc?id=1MOSKeGF0FJcivpBI7s63V9YHloUTORiF' # karras2019stylegan-bedrooms-256x256.pkl -url_cars = 'https://drive.google.com/uc?id=1MJ6iCfNtMIRicihwRorsM3b7mmtmK9c3' # karras2019stylegan-cars-512x384.pkl -url_cats = 'https://drive.google.com/uc?id=1MQywl0FNt6lHu8E_EUqnRbviagS7fbiJ' # karras2019stylegan-cats-256x256.pkl - -synthesis_kwargs = dict(output_transform=dict(func=tflib.convert_images_to_uint8, nchw_to_nhwc=True), minibatch_size=8) - -_Gs_cache = dict() - -def load_Gs(url): - if url not in _Gs_cache: - with dnnlib.util.open_url(url, cache_dir=config.cache_dir) as f: - _G, _D, Gs = pickle.load(f) - _Gs_cache[url] = Gs - return _Gs_cache[url] - -#---------------------------------------------------------------------------- -# Figures 2, 3, 10, 11, 12: Multi-resolution grid of uncurated result images. - -def draw_uncurated_result_figure(png, Gs, cx, cy, cw, ch, rows, lods, seed): - print(png) - latents = np.random.RandomState(seed).randn(sum(rows * 2**lod for lod in lods), Gs.input_shape[1]) - images = Gs.run(latents, None, **synthesis_kwargs) # [seed, y, x, rgb] - - canvas = PIL.Image.new('RGB', (sum(cw // 2**lod for lod in lods), ch * rows), 'white') - image_iter = iter(list(images)) - for col, lod in enumerate(lods): - for row in range(rows * 2**lod): - image = PIL.Image.fromarray(next(image_iter), 'RGB') - image = image.crop((cx, cy, cx + cw, cy + ch)) - image = image.resize((cw // 2**lod, ch // 2**lod), PIL.Image.ANTIALIAS) - canvas.paste(image, (sum(cw // 2**lod for lod in lods[:col]), row * ch // 2**lod)) - canvas.save(png) - -#---------------------------------------------------------------------------- -# Figure 3: Style mixing. - -def draw_style_mixing_figure(png, Gs, w, h, src_seeds, dst_seeds, style_ranges): - print(png) - src_latents = np.stack(np.random.RandomState(seed).randn(Gs.input_shape[1]) for seed in src_seeds) - dst_latents = np.stack(np.random.RandomState(seed).randn(Gs.input_shape[1]) for seed in dst_seeds) - src_dlatents = Gs.components.mapping.run(src_latents, None) # [seed, layer, component] - dst_dlatents = Gs.components.mapping.run(dst_latents, None) # [seed, layer, component] - src_images = Gs.components.synthesis.run(src_dlatents, randomize_noise=False, **synthesis_kwargs) - dst_images = Gs.components.synthesis.run(dst_dlatents, randomize_noise=False, **synthesis_kwargs) - - canvas = PIL.Image.new('RGB', (w * (len(src_seeds) + 1), h * (len(dst_seeds) + 1)), 'white') - for col, src_image in enumerate(list(src_images)): - canvas.paste(PIL.Image.fromarray(src_image, 'RGB'), ((col + 1) * w, 0)) - for row, dst_image in enumerate(list(dst_images)): - canvas.paste(PIL.Image.fromarray(dst_image, 'RGB'), (0, (row + 1) * h)) - row_dlatents = np.stack([dst_dlatents[row]] * len(src_seeds)) - row_dlatents[:, style_ranges[row]] = src_dlatents[:, style_ranges[row]] - row_images = Gs.components.synthesis.run(row_dlatents, randomize_noise=False, **synthesis_kwargs) - for col, image in enumerate(list(row_images)): - canvas.paste(PIL.Image.fromarray(image, 'RGB'), ((col + 1) * w, (row + 1) * h)) - canvas.save(png) - -#---------------------------------------------------------------------------- -# Figure 4: Noise detail. - -def draw_noise_detail_figure(png, Gs, w, h, num_samples, seeds): - print(png) - canvas = PIL.Image.new('RGB', (w * 3, h * len(seeds)), 'white') - for row, seed in enumerate(seeds): - latents = np.stack([np.random.RandomState(seed).randn(Gs.input_shape[1])] * num_samples) - images = Gs.run(latents, None, truncation_psi=1, **synthesis_kwargs) - canvas.paste(PIL.Image.fromarray(images[0], 'RGB'), (0, row * h)) - for i in range(4): - crop = PIL.Image.fromarray(images[i + 1], 'RGB') - crop = crop.crop((650, 180, 906, 436)) - crop = crop.resize((w//2, h//2), PIL.Image.NEAREST) - canvas.paste(crop, (w + (i%2) * w//2, row * h + (i//2) * h//2)) - diff = np.std(np.mean(images, axis=3), axis=0) * 4 - diff = np.clip(diff + 0.5, 0, 255).astype(np.uint8) - canvas.paste(PIL.Image.fromarray(diff, 'L'), (w * 2, row * h)) - canvas.save(png) - -#---------------------------------------------------------------------------- -# Figure 5: Noise components. - -def draw_noise_components_figure(png, Gs, w, h, seeds, noise_ranges, flips): - print(png) - Gsc = Gs.clone() - noise_vars = [var for name, var in Gsc.components.synthesis.vars.items() if name.startswith('noise')] - noise_pairs = list(zip(noise_vars, tflib.run(noise_vars))) # [(var, val), ...] - latents = np.stack(np.random.RandomState(seed).randn(Gs.input_shape[1]) for seed in seeds) - all_images = [] - for noise_range in noise_ranges: - tflib.set_vars({var: val * (1 if i in noise_range else 0) for i, (var, val) in enumerate(noise_pairs)}) - range_images = Gsc.run(latents, None, truncation_psi=1, randomize_noise=False, **synthesis_kwargs) - range_images[flips, :, :] = range_images[flips, :, ::-1] - all_images.append(list(range_images)) - - canvas = PIL.Image.new('RGB', (w * 2, h * 2), 'white') - for col, col_images in enumerate(zip(*all_images)): - canvas.paste(PIL.Image.fromarray(col_images[0], 'RGB').crop((0, 0, w//2, h)), (col * w, 0)) - canvas.paste(PIL.Image.fromarray(col_images[1], 'RGB').crop((w//2, 0, w, h)), (col * w + w//2, 0)) - canvas.paste(PIL.Image.fromarray(col_images[2], 'RGB').crop((0, 0, w//2, h)), (col * w, h)) - canvas.paste(PIL.Image.fromarray(col_images[3], 'RGB').crop((w//2, 0, w, h)), (col * w + w//2, h)) - canvas.save(png) - -#---------------------------------------------------------------------------- -# Figure 8: Truncation trick. - -def draw_truncation_trick_figure(png, Gs, w, h, seeds, psis): - print(png) - latents = np.stack(np.random.RandomState(seed).randn(Gs.input_shape[1]) for seed in seeds) - dlatents = Gs.components.mapping.run(latents, None) # [seed, layer, component] - dlatent_avg = Gs.get_var('dlatent_avg') # [component] - - canvas = PIL.Image.new('RGB', (w * len(psis), h * len(seeds)), 'white') - for row, dlatent in enumerate(list(dlatents)): - row_dlatents = (dlatent[np.newaxis] - dlatent_avg) * np.reshape(psis, [-1, 1, 1]) + dlatent_avg - row_images = Gs.components.synthesis.run(row_dlatents, randomize_noise=False, **synthesis_kwargs) - for col, image in enumerate(list(row_images)): - canvas.paste(PIL.Image.fromarray(image, 'RGB'), (col * w, row * h)) - canvas.save(png) - -#---------------------------------------------------------------------------- -# Main program. - -def main(): - tflib.init_tf() - os.makedirs(config.result_dir, exist_ok=True) - draw_uncurated_result_figure(os.path.join(config.result_dir, 'figure02-uncurated-ffhq.png'), load_Gs(url_ffhq), cx=0, cy=0, cw=1024, ch=1024, rows=3, lods=[0,1,2,2,3,3], seed=5) - draw_style_mixing_figure(os.path.join(config.result_dir, 'figure03-style-mixing.png'), load_Gs(url_ffhq), w=1024, h=1024, src_seeds=[639,701,687,615,2268], dst_seeds=[888,829,1898,1733,1614,845], style_ranges=[range(0,4)]*3+[range(4,8)]*2+[range(8,18)]) - draw_noise_detail_figure(os.path.join(config.result_dir, 'figure04-noise-detail.png'), load_Gs(url_ffhq), w=1024, h=1024, num_samples=100, seeds=[1157,1012]) - draw_noise_components_figure(os.path.join(config.result_dir, 'figure05-noise-components.png'), load_Gs(url_ffhq), w=1024, h=1024, seeds=[1967,1555], noise_ranges=[range(0, 18), range(0, 0), range(8, 18), range(0, 8)], flips=[1]) - draw_truncation_trick_figure(os.path.join(config.result_dir, 'figure08-truncation-trick.png'), load_Gs(url_ffhq), w=1024, h=1024, seeds=[91,388], psis=[1, 0.7, 0.5, 0, -0.5, -1]) - draw_uncurated_result_figure(os.path.join(config.result_dir, 'figure10-uncurated-bedrooms.png'), load_Gs(url_bedrooms), cx=0, cy=0, cw=256, ch=256, rows=5, lods=[0,0,1,1,2,2,2], seed=0) - draw_uncurated_result_figure(os.path.join(config.result_dir, 'figure11-uncurated-cars.png'), load_Gs(url_cars), cx=0, cy=64, cw=512, ch=384, rows=4, lods=[0,1,2,2,3,3], seed=2) - draw_uncurated_result_figure(os.path.join(config.result_dir, 'figure12-uncurated-cats.png'), load_Gs(url_cats), cx=0, cy=0, cw=256, ch=256, rows=5, lods=[0,0,1,1,2,2,2], seed=1) - -#---------------------------------------------------------------------------- - -if __name__ == "__main__": - main() - -#---------------------------------------------------------------------------- diff --git a/spaces/DonngHuang/auto-ai/Dockerfile b/spaces/DonngHuang/auto-ai/Dockerfile deleted file mode 100644 index c98f2cdf35aed5fe84637c83af9dcdd2384fd668..0000000000000000000000000000000000000000 --- a/spaces/DonngHuang/auto-ai/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM node:19.1.0-alpine3.16 -# RUN unlink /etc/localtime && ln -s /usr/share/zoneinfo/Etc/GMT-8 /etc/localtime -RUN apk add curl -# && curl ipinfo.io -WORKDIR /app -ADD . /app -RUN mv .env.example .env && chmod -R 777 ".env" -RUN chmod +x "./linux-exec" && \ - chmod +x "./entrypoint.sh" -CMD ["./entrypoint.sh"] \ No newline at end of file diff --git a/spaces/DragGan/DragGan-Inversion/stylegan_human/training/__init__.py b/spaces/DragGan/DragGan-Inversion/stylegan_human/training/__init__.py deleted file mode 100644 index 939e7c6c8f94c4ea1141885c3c3295fe083b06aa..0000000000000000000000000000000000000000 --- a/spaces/DragGan/DragGan-Inversion/stylegan_human/training/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. -# -# NVIDIA CORPORATION and its licensors retain all intellectual property -# and proprietary rights in and to this software, related documentation -# and any modifications thereto. Any use, reproduction, disclosure or -# distribution of this software and related documentation without an express -# license agreement from NVIDIA CORPORATION is strictly prohibited. - -# empty diff --git a/spaces/Emmy101/Emer/Dockerfile b/spaces/Emmy101/Emer/Dockerfile deleted file mode 100644 index 851560c6c43d3d01b47a25e39b1b82460db4b1a1..0000000000000000000000000000000000000000 --- a/spaces/Emmy101/Emer/Dockerfile +++ /dev/null @@ -1 +0,0 @@ -FROM python:3.9 WORKDIR /code COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY . . CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] \ No newline at end of file diff --git a/spaces/Enterprisium/Easy_GUI/lib/infer_pack/transforms.py b/spaces/Enterprisium/Easy_GUI/lib/infer_pack/transforms.py deleted file mode 100644 index a11f799e023864ff7082c1f49c0cc18351a13b47..0000000000000000000000000000000000000000 --- a/spaces/Enterprisium/Easy_GUI/lib/infer_pack/transforms.py +++ /dev/null @@ -1,209 +0,0 @@ -import torch -from torch.nn import functional as F - -import numpy as np - - -DEFAULT_MIN_BIN_WIDTH = 1e-3 -DEFAULT_MIN_BIN_HEIGHT = 1e-3 -DEFAULT_MIN_DERIVATIVE = 1e-3 - - -def piecewise_rational_quadratic_transform( - inputs, - unnormalized_widths, - unnormalized_heights, - unnormalized_derivatives, - inverse=False, - tails=None, - tail_bound=1.0, - min_bin_width=DEFAULT_MIN_BIN_WIDTH, - min_bin_height=DEFAULT_MIN_BIN_HEIGHT, - min_derivative=DEFAULT_MIN_DERIVATIVE, -): - if tails is None: - spline_fn = rational_quadratic_spline - spline_kwargs = {} - else: - spline_fn = unconstrained_rational_quadratic_spline - spline_kwargs = {"tails": tails, "tail_bound": tail_bound} - - outputs, logabsdet = spline_fn( - inputs=inputs, - unnormalized_widths=unnormalized_widths, - unnormalized_heights=unnormalized_heights, - unnormalized_derivatives=unnormalized_derivatives, - inverse=inverse, - min_bin_width=min_bin_width, - min_bin_height=min_bin_height, - min_derivative=min_derivative, - **spline_kwargs - ) - return outputs, logabsdet - - -def searchsorted(bin_locations, inputs, eps=1e-6): - bin_locations[..., -1] += eps - return torch.sum(inputs[..., None] >= bin_locations, dim=-1) - 1 - - -def unconstrained_rational_quadratic_spline( - inputs, - unnormalized_widths, - unnormalized_heights, - unnormalized_derivatives, - inverse=False, - tails="linear", - tail_bound=1.0, - min_bin_width=DEFAULT_MIN_BIN_WIDTH, - min_bin_height=DEFAULT_MIN_BIN_HEIGHT, - min_derivative=DEFAULT_MIN_DERIVATIVE, -): - inside_interval_mask = (inputs >= -tail_bound) & (inputs <= tail_bound) - outside_interval_mask = ~inside_interval_mask - - outputs = torch.zeros_like(inputs) - logabsdet = torch.zeros_like(inputs) - - if tails == "linear": - unnormalized_derivatives = F.pad(unnormalized_derivatives, pad=(1, 1)) - constant = np.log(np.exp(1 - min_derivative) - 1) - unnormalized_derivatives[..., 0] = constant - unnormalized_derivatives[..., -1] = constant - - outputs[outside_interval_mask] = inputs[outside_interval_mask] - logabsdet[outside_interval_mask] = 0 - else: - raise RuntimeError("{} tails are not implemented.".format(tails)) - - ( - outputs[inside_interval_mask], - logabsdet[inside_interval_mask], - ) = rational_quadratic_spline( - inputs=inputs[inside_interval_mask], - unnormalized_widths=unnormalized_widths[inside_interval_mask, :], - unnormalized_heights=unnormalized_heights[inside_interval_mask, :], - unnormalized_derivatives=unnormalized_derivatives[inside_interval_mask, :], - inverse=inverse, - left=-tail_bound, - right=tail_bound, - bottom=-tail_bound, - top=tail_bound, - min_bin_width=min_bin_width, - min_bin_height=min_bin_height, - min_derivative=min_derivative, - ) - - return outputs, logabsdet - - -def rational_quadratic_spline( - inputs, - unnormalized_widths, - unnormalized_heights, - unnormalized_derivatives, - inverse=False, - left=0.0, - right=1.0, - bottom=0.0, - top=1.0, - min_bin_width=DEFAULT_MIN_BIN_WIDTH, - min_bin_height=DEFAULT_MIN_BIN_HEIGHT, - min_derivative=DEFAULT_MIN_DERIVATIVE, -): - if torch.min(inputs) < left or torch.max(inputs) > right: - raise ValueError("Input to a transform is not within its domain") - - num_bins = unnormalized_widths.shape[-1] - - if min_bin_width * num_bins > 1.0: - raise ValueError("Minimal bin width too large for the number of bins") - if min_bin_height * num_bins > 1.0: - raise ValueError("Minimal bin height too large for the number of bins") - - widths = F.softmax(unnormalized_widths, dim=-1) - widths = min_bin_width + (1 - min_bin_width * num_bins) * widths - cumwidths = torch.cumsum(widths, dim=-1) - cumwidths = F.pad(cumwidths, pad=(1, 0), mode="constant", value=0.0) - cumwidths = (right - left) * cumwidths + left - cumwidths[..., 0] = left - cumwidths[..., -1] = right - widths = cumwidths[..., 1:] - cumwidths[..., :-1] - - derivatives = min_derivative + F.softplus(unnormalized_derivatives) - - heights = F.softmax(unnormalized_heights, dim=-1) - heights = min_bin_height + (1 - min_bin_height * num_bins) * heights - cumheights = torch.cumsum(heights, dim=-1) - cumheights = F.pad(cumheights, pad=(1, 0), mode="constant", value=0.0) - cumheights = (top - bottom) * cumheights + bottom - cumheights[..., 0] = bottom - cumheights[..., -1] = top - heights = cumheights[..., 1:] - cumheights[..., :-1] - - if inverse: - bin_idx = searchsorted(cumheights, inputs)[..., None] - else: - bin_idx = searchsorted(cumwidths, inputs)[..., None] - - input_cumwidths = cumwidths.gather(-1, bin_idx)[..., 0] - input_bin_widths = widths.gather(-1, bin_idx)[..., 0] - - input_cumheights = cumheights.gather(-1, bin_idx)[..., 0] - delta = heights / widths - input_delta = delta.gather(-1, bin_idx)[..., 0] - - input_derivatives = derivatives.gather(-1, bin_idx)[..., 0] - input_derivatives_plus_one = derivatives[..., 1:].gather(-1, bin_idx)[..., 0] - - input_heights = heights.gather(-1, bin_idx)[..., 0] - - if inverse: - a = (inputs - input_cumheights) * ( - input_derivatives + input_derivatives_plus_one - 2 * input_delta - ) + input_heights * (input_delta - input_derivatives) - b = input_heights * input_derivatives - (inputs - input_cumheights) * ( - input_derivatives + input_derivatives_plus_one - 2 * input_delta - ) - c = -input_delta * (inputs - input_cumheights) - - discriminant = b.pow(2) - 4 * a * c - assert (discriminant >= 0).all() - - root = (2 * c) / (-b - torch.sqrt(discriminant)) - outputs = root * input_bin_widths + input_cumwidths - - theta_one_minus_theta = root * (1 - root) - denominator = input_delta + ( - (input_derivatives + input_derivatives_plus_one - 2 * input_delta) - * theta_one_minus_theta - ) - derivative_numerator = input_delta.pow(2) * ( - input_derivatives_plus_one * root.pow(2) - + 2 * input_delta * theta_one_minus_theta - + input_derivatives * (1 - root).pow(2) - ) - logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator) - - return outputs, -logabsdet - else: - theta = (inputs - input_cumwidths) / input_bin_widths - theta_one_minus_theta = theta * (1 - theta) - - numerator = input_heights * ( - input_delta * theta.pow(2) + input_derivatives * theta_one_minus_theta - ) - denominator = input_delta + ( - (input_derivatives + input_derivatives_plus_one - 2 * input_delta) - * theta_one_minus_theta - ) - outputs = input_cumheights + numerator / denominator - - derivative_numerator = input_delta.pow(2) * ( - input_derivatives_plus_one * theta.pow(2) - + 2 * input_delta * theta_one_minus_theta - + input_derivatives * (1 - theta).pow(2) - ) - logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator) - - return outputs, logabsdet diff --git a/spaces/Felix123456/bingo/src/pages/api/sydney.ts b/spaces/Felix123456/bingo/src/pages/api/sydney.ts deleted file mode 100644 index 0e7bbf23d77c2e1a6635185a060eeee58b8c8e66..0000000000000000000000000000000000000000 --- a/spaces/Felix123456/bingo/src/pages/api/sydney.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { NextApiRequest, NextApiResponse } from 'next' -import { WebSocket, debug } from '@/lib/isomorphic' -import { BingWebBot } from '@/lib/bots/bing' -import { websocketUtils } from '@/lib/bots/bing/utils' -import { WatchDog, createHeaders } from '@/lib/utils' - - -export default async function handler(req: NextApiRequest, res: NextApiResponse) { - const conversationContext = req.body - const headers = createHeaders(req.cookies) - debug(headers) - res.setHeader('Content-Type', 'text/stream; charset=UTF-8') - - const ws = new WebSocket('wss://sydney.bing.com/sydney/ChatHub', { - headers: { - ...headers, - 'accept-language': 'zh-CN,zh;q=0.9', - 'cache-control': 'no-cache', - 'x-ms-useragent': 'azsdk-js-api-client-factory/1.0.0-beta.1 core-rest-pipeline/1.10.0 OS/Win32', - pragma: 'no-cache', - } - }) - - const closeDog = new WatchDog() - const timeoutDog = new WatchDog() - ws.onmessage = (event) => { - timeoutDog.watch(() => { - ws.send(websocketUtils.packMessage({ type: 6 })) - }, 1500) - closeDog.watch(() => { - ws.close() - }, 10000) - res.write(event.data) - if (/\{"type":([367])\}/.test(String(event.data))) { - const type = parseInt(RegExp.$1, 10) - debug('connection type', type) - if (type === 3) { - ws.close() - } else { - ws.send(websocketUtils.packMessage({ type })) - } - } - } - - ws.onclose = () => { - timeoutDog.reset() - closeDog.reset() - debug('connection close') - res.end() - } - - await new Promise((resolve) => ws.onopen = resolve) - ws.send(websocketUtils.packMessage({ protocol: 'json', version: 1 })) - ws.send(websocketUtils.packMessage({ type: 6 })) - ws.send(websocketUtils.packMessage(BingWebBot.buildChatRequest(conversationContext!))) - req.socket.once('close', () => { - ws.close() - if (!res.closed) { - res.end() - } - }) -} diff --git a/spaces/Fernando22/freegpt-webui/g4f/Provider/Providers/Ails.py b/spaces/Fernando22/freegpt-webui/g4f/Provider/Providers/Ails.py deleted file mode 100644 index 5feec9e987e3cd2590e2a72b623dc4b90e0cf53d..0000000000000000000000000000000000000000 --- a/spaces/Fernando22/freegpt-webui/g4f/Provider/Providers/Ails.py +++ /dev/null @@ -1,87 +0,0 @@ -import os -import time -import json -import uuid -import hashlib -import requests - -from ...typing import sha256, Dict, get_type_hints -from datetime import datetime - -url: str = 'https://ai.ls' -model: str = 'gpt-3.5-turbo' -supports_stream = True -needs_auth = False -working = True - - -class Utils: - def hash(json_data: Dict[str, str]) -> sha256: - - base_string: str = '%s:%s:%s:%s' % ( - json_data['t'], - json_data['m'], - 'WI,2rU#_r:r~aF4aJ36[.Z(/8Rv93Rf', - len(json_data['m']) - ) - - return hashlib.sha256(base_string.encode()).hexdigest() - - def format_timestamp(timestamp: int) -> str: - - e = timestamp - n = e % 10 - r = n + 1 if n % 2 == 0 else n - return str(e - n + r) - - -def _create_completion(model: str, messages: list, temperature: float = 0.6, stream: bool = False, **kwargs): - - headers = { - 'authority': 'api.caipacity.com', - 'accept': '*/*', - 'accept-language': 'en,fr-FR;q=0.9,fr;q=0.8,es-ES;q=0.7,es;q=0.6,en-US;q=0.5,am;q=0.4,de;q=0.3', - 'authorization': 'Bearer free', - 'client-id': str(uuid.uuid4()), - 'client-v': '0.1.249', - 'content-type': 'application/json', - 'origin': 'https://ai.ls', - 'referer': 'https://ai.ls/', - 'sec-ch-ua': '"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"', - 'sec-ch-ua-mobile': '?0', - 'sec-ch-ua-platform': '"Windows"', - 'sec-fetch-dest': 'empty', - 'sec-fetch-mode': 'cors', - 'sec-fetch-site': 'cross-site', - 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36', - } - - timestamp = Utils.format_timestamp(int(time.time() * 1000)) - - sig = { - 'd': datetime.now().strftime('%Y-%m-%d'), - 't': timestamp, - 's': Utils.hash({ - 't': timestamp, - 'm': messages[-1]['content']})} - - json_data = json.dumps(separators=(',', ':'), obj={ - 'model': 'gpt-3.5-turbo', - 'temperature': 0.6, - 'stream': True, - 'messages': messages} | sig) - - response = requests.post('https://api.caipacity.com/v1/chat/completions', - headers=headers, data=json_data, stream=True) - - for token in response.iter_lines(): - if b'content' in token: - completion_chunk = json.loads(token.decode().replace('data: ', '')) - token = completion_chunk['choices'][0]['delta'].get('content') - if token != None: - yield token - - -params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \ - '(%s)' % ', '.join( - [f"{name}: {get_type_hints(_create_completion)[name].__name__}" for name in _create_completion.__code__.co_varnames[:_create_completion.__code__.co_argcount]]) diff --git a/spaces/FrankZxShen/so-vits-svc-models-ba/vdecoder/nsf_hifigan/models.py b/spaces/FrankZxShen/so-vits-svc-models-ba/vdecoder/nsf_hifigan/models.py deleted file mode 100644 index c2c889ec2fbd215702298ba2b7c411c6f5630d80..0000000000000000000000000000000000000000 --- a/spaces/FrankZxShen/so-vits-svc-models-ba/vdecoder/nsf_hifigan/models.py +++ /dev/null @@ -1,439 +0,0 @@ -import os -import json -from .env import AttrDict -import numpy as np -import torch -import torch.nn.functional as F -import torch.nn as nn -from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d -from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm -from .utils import init_weights, get_padding - -LRELU_SLOPE = 0.1 - - -def load_model(model_path, device='cuda'): - h = load_config(model_path) - - generator = Generator(h).to(device) - - cp_dict = torch.load(model_path, map_location=device) - generator.load_state_dict(cp_dict['generator']) - generator.eval() - generator.remove_weight_norm() - del cp_dict - return generator, h - -def load_config(model_path): - config_file = os.path.join(os.path.split(model_path)[0], 'config.json') - with open(config_file) as f: - data = f.read() - - json_config = json.loads(data) - h = AttrDict(json_config) - return h - - -class ResBlock1(torch.nn.Module): - def __init__(self, h, channels, kernel_size=3, dilation=(1, 3, 5)): - super(ResBlock1, self).__init__() - self.h = h - self.convs1 = nn.ModuleList([ - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[0], - padding=get_padding(kernel_size, dilation[0]))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[1], - padding=get_padding(kernel_size, dilation[1]))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[2], - padding=get_padding(kernel_size, dilation[2]))) - ]) - self.convs1.apply(init_weights) - - self.convs2 = nn.ModuleList([ - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1, - padding=get_padding(kernel_size, 1))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1, - padding=get_padding(kernel_size, 1))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1, - padding=get_padding(kernel_size, 1))) - ]) - self.convs2.apply(init_weights) - - def forward(self, x): - for c1, c2 in zip(self.convs1, self.convs2): - xt = F.leaky_relu(x, LRELU_SLOPE) - xt = c1(xt) - xt = F.leaky_relu(xt, LRELU_SLOPE) - xt = c2(xt) - x = xt + x - return x - - def remove_weight_norm(self): - for l in self.convs1: - remove_weight_norm(l) - for l in self.convs2: - remove_weight_norm(l) - - -class ResBlock2(torch.nn.Module): - def __init__(self, h, channels, kernel_size=3, dilation=(1, 3)): - super(ResBlock2, self).__init__() - self.h = h - self.convs = nn.ModuleList([ - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[0], - padding=get_padding(kernel_size, dilation[0]))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[1], - padding=get_padding(kernel_size, dilation[1]))) - ]) - self.convs.apply(init_weights) - - def forward(self, x): - for c in self.convs: - xt = F.leaky_relu(x, LRELU_SLOPE) - xt = c(xt) - x = xt + x - return x - - def remove_weight_norm(self): - for l in self.convs: - remove_weight_norm(l) - - -class SineGen(torch.nn.Module): - """ Definition of sine generator - SineGen(samp_rate, harmonic_num = 0, - sine_amp = 0.1, noise_std = 0.003, - voiced_threshold = 0, - flag_for_pulse=False) - samp_rate: sampling rate in Hz - harmonic_num: number of harmonic overtones (default 0) - sine_amp: amplitude of sine-wavefrom (default 0.1) - noise_std: std of Gaussian noise (default 0.003) - voiced_thoreshold: F0 threshold for U/V classification (default 0) - flag_for_pulse: this SinGen is used inside PulseGen (default False) - Note: when flag_for_pulse is True, the first time step of a voiced - segment is always sin(np.pi) or cos(0) - """ - - def __init__(self, samp_rate, harmonic_num=0, - sine_amp=0.1, noise_std=0.003, - voiced_threshold=0): - super(SineGen, self).__init__() - self.sine_amp = sine_amp - self.noise_std = noise_std - self.harmonic_num = harmonic_num - self.dim = self.harmonic_num + 1 - self.sampling_rate = samp_rate - self.voiced_threshold = voiced_threshold - - def _f02uv(self, f0): - # generate uv signal - uv = torch.ones_like(f0) - uv = uv * (f0 > self.voiced_threshold) - return uv - - @torch.no_grad() - def forward(self, f0, upp): - """ sine_tensor, uv = forward(f0) - input F0: tensor(batchsize=1, length, dim=1) - f0 for unvoiced steps should be 0 - output sine_tensor: tensor(batchsize=1, length, dim) - output uv: tensor(batchsize=1, length, 1) - """ - f0 = f0.unsqueeze(-1) - fn = torch.multiply(f0, torch.arange(1, self.dim + 1, device=f0.device).reshape((1, 1, -1))) - rad_values = (fn / self.sampling_rate) % 1 ###%1意味着n_har的乘积无法后处理优化 - rand_ini = torch.rand(fn.shape[0], fn.shape[2], device=fn.device) - rand_ini[:, 0] = 0 - rad_values[:, 0, :] = rad_values[:, 0, :] + rand_ini - is_half = rad_values.dtype is not torch.float32 - tmp_over_one = torch.cumsum(rad_values.double(), 1) # % 1 #####%1意味着后面的cumsum无法再优化 - if is_half: - tmp_over_one = tmp_over_one.half() - else: - tmp_over_one = tmp_over_one.float() - tmp_over_one *= upp - tmp_over_one = F.interpolate( - tmp_over_one.transpose(2, 1), scale_factor=upp, - mode='linear', align_corners=True - ).transpose(2, 1) - rad_values = F.interpolate(rad_values.transpose(2, 1), scale_factor=upp, mode='nearest').transpose(2, 1) - tmp_over_one %= 1 - tmp_over_one_idx = (tmp_over_one[:, 1:, :] - tmp_over_one[:, :-1, :]) < 0 - cumsum_shift = torch.zeros_like(rad_values) - cumsum_shift[:, 1:, :] = tmp_over_one_idx * -1.0 - rad_values = rad_values.double() - cumsum_shift = cumsum_shift.double() - sine_waves = torch.sin(torch.cumsum(rad_values + cumsum_shift, dim=1) * 2 * np.pi) - if is_half: - sine_waves = sine_waves.half() - else: - sine_waves = sine_waves.float() - sine_waves = sine_waves * self.sine_amp - uv = self._f02uv(f0) - uv = F.interpolate(uv.transpose(2, 1), scale_factor=upp, mode='nearest').transpose(2, 1) - noise_amp = uv * self.noise_std + (1 - uv) * self.sine_amp / 3 - noise = noise_amp * torch.randn_like(sine_waves) - sine_waves = sine_waves * uv + noise - return sine_waves, uv, noise - - -class SourceModuleHnNSF(torch.nn.Module): - """ SourceModule for hn-nsf - SourceModule(sampling_rate, harmonic_num=0, sine_amp=0.1, - add_noise_std=0.003, voiced_threshod=0) - sampling_rate: sampling_rate in Hz - harmonic_num: number of harmonic above F0 (default: 0) - sine_amp: amplitude of sine source signal (default: 0.1) - add_noise_std: std of additive Gaussian noise (default: 0.003) - note that amplitude of noise in unvoiced is decided - by sine_amp - voiced_threshold: threhold to set U/V given F0 (default: 0) - Sine_source, noise_source = SourceModuleHnNSF(F0_sampled) - F0_sampled (batchsize, length, 1) - Sine_source (batchsize, length, 1) - noise_source (batchsize, length 1) - uv (batchsize, length, 1) - """ - - def __init__(self, sampling_rate, harmonic_num=0, sine_amp=0.1, - add_noise_std=0.003, voiced_threshod=0): - super(SourceModuleHnNSF, self).__init__() - - self.sine_amp = sine_amp - self.noise_std = add_noise_std - - # to produce sine waveforms - self.l_sin_gen = SineGen(sampling_rate, harmonic_num, - sine_amp, add_noise_std, voiced_threshod) - - # to merge source harmonics into a single excitation - self.l_linear = torch.nn.Linear(harmonic_num + 1, 1) - self.l_tanh = torch.nn.Tanh() - - def forward(self, x, upp): - sine_wavs, uv, _ = self.l_sin_gen(x, upp) - sine_merge = self.l_tanh(self.l_linear(sine_wavs)) - return sine_merge - - -class Generator(torch.nn.Module): - def __init__(self, h): - super(Generator, self).__init__() - self.h = h - self.num_kernels = len(h.resblock_kernel_sizes) - self.num_upsamples = len(h.upsample_rates) - self.m_source = SourceModuleHnNSF( - sampling_rate=h.sampling_rate, - harmonic_num=8 - ) - self.noise_convs = nn.ModuleList() - self.conv_pre = weight_norm(Conv1d(h.num_mels, h.upsample_initial_channel, 7, 1, padding=3)) - resblock = ResBlock1 if h.resblock == '1' else ResBlock2 - - self.ups = nn.ModuleList() - for i, (u, k) in enumerate(zip(h.upsample_rates, h.upsample_kernel_sizes)): - c_cur = h.upsample_initial_channel // (2 ** (i + 1)) - self.ups.append(weight_norm( - ConvTranspose1d(h.upsample_initial_channel // (2 ** i), h.upsample_initial_channel // (2 ** (i + 1)), - k, u, padding=(k - u) // 2))) - if i + 1 < len(h.upsample_rates): # - stride_f0 = int(np.prod(h.upsample_rates[i + 1:])) - self.noise_convs.append(Conv1d( - 1, c_cur, kernel_size=stride_f0 * 2, stride=stride_f0, padding=stride_f0 // 2)) - else: - self.noise_convs.append(Conv1d(1, c_cur, kernel_size=1)) - self.resblocks = nn.ModuleList() - ch = h.upsample_initial_channel - for i in range(len(self.ups)): - ch //= 2 - for j, (k, d) in enumerate(zip(h.resblock_kernel_sizes, h.resblock_dilation_sizes)): - self.resblocks.append(resblock(h, ch, k, d)) - - self.conv_post = weight_norm(Conv1d(ch, 1, 7, 1, padding=3)) - self.ups.apply(init_weights) - self.conv_post.apply(init_weights) - self.upp = int(np.prod(h.upsample_rates)) - - def forward(self, x, f0): - har_source = self.m_source(f0, self.upp).transpose(1, 2) - x = self.conv_pre(x) - for i in range(self.num_upsamples): - x = F.leaky_relu(x, LRELU_SLOPE) - x = self.ups[i](x) - x_source = self.noise_convs[i](har_source) - x = x + x_source - xs = None - for j in range(self.num_kernels): - if xs is None: - xs = self.resblocks[i * self.num_kernels + j](x) - else: - xs += self.resblocks[i * self.num_kernels + j](x) - x = xs / self.num_kernels - x = F.leaky_relu(x) - x = self.conv_post(x) - x = torch.tanh(x) - - return x - - def remove_weight_norm(self): - print('Removing weight norm...') - for l in self.ups: - remove_weight_norm(l) - for l in self.resblocks: - l.remove_weight_norm() - remove_weight_norm(self.conv_pre) - remove_weight_norm(self.conv_post) - - -class DiscriminatorP(torch.nn.Module): - def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=False): - super(DiscriminatorP, self).__init__() - self.period = period - norm_f = weight_norm if use_spectral_norm == False else spectral_norm - self.convs = nn.ModuleList([ - norm_f(Conv2d(1, 32, (kernel_size, 1), (stride, 1), padding=(get_padding(5, 1), 0))), - norm_f(Conv2d(32, 128, (kernel_size, 1), (stride, 1), padding=(get_padding(5, 1), 0))), - norm_f(Conv2d(128, 512, (kernel_size, 1), (stride, 1), padding=(get_padding(5, 1), 0))), - norm_f(Conv2d(512, 1024, (kernel_size, 1), (stride, 1), padding=(get_padding(5, 1), 0))), - norm_f(Conv2d(1024, 1024, (kernel_size, 1), 1, padding=(2, 0))), - ]) - self.conv_post = norm_f(Conv2d(1024, 1, (3, 1), 1, padding=(1, 0))) - - def forward(self, x): - fmap = [] - - # 1d to 2d - b, c, t = x.shape - if t % self.period != 0: # pad first - n_pad = self.period - (t % self.period) - x = F.pad(x, (0, n_pad), "reflect") - t = t + n_pad - x = x.view(b, c, t // self.period, self.period) - - for l in self.convs: - x = l(x) - x = F.leaky_relu(x, LRELU_SLOPE) - fmap.append(x) - x = self.conv_post(x) - fmap.append(x) - x = torch.flatten(x, 1, -1) - - return x, fmap - - -class MultiPeriodDiscriminator(torch.nn.Module): - def __init__(self, periods=None): - super(MultiPeriodDiscriminator, self).__init__() - self.periods = periods if periods is not None else [2, 3, 5, 7, 11] - self.discriminators = nn.ModuleList() - for period in self.periods: - self.discriminators.append(DiscriminatorP(period)) - - def forward(self, y, y_hat): - y_d_rs = [] - y_d_gs = [] - fmap_rs = [] - fmap_gs = [] - for i, d in enumerate(self.discriminators): - y_d_r, fmap_r = d(y) - y_d_g, fmap_g = d(y_hat) - y_d_rs.append(y_d_r) - fmap_rs.append(fmap_r) - y_d_gs.append(y_d_g) - fmap_gs.append(fmap_g) - - return y_d_rs, y_d_gs, fmap_rs, fmap_gs - - -class DiscriminatorS(torch.nn.Module): - def __init__(self, use_spectral_norm=False): - super(DiscriminatorS, self).__init__() - norm_f = weight_norm if use_spectral_norm == False else spectral_norm - self.convs = nn.ModuleList([ - norm_f(Conv1d(1, 128, 15, 1, padding=7)), - norm_f(Conv1d(128, 128, 41, 2, groups=4, padding=20)), - norm_f(Conv1d(128, 256, 41, 2, groups=16, padding=20)), - norm_f(Conv1d(256, 512, 41, 4, groups=16, padding=20)), - norm_f(Conv1d(512, 1024, 41, 4, groups=16, padding=20)), - norm_f(Conv1d(1024, 1024, 41, 1, groups=16, padding=20)), - norm_f(Conv1d(1024, 1024, 5, 1, padding=2)), - ]) - self.conv_post = norm_f(Conv1d(1024, 1, 3, 1, padding=1)) - - def forward(self, x): - fmap = [] - for l in self.convs: - x = l(x) - x = F.leaky_relu(x, LRELU_SLOPE) - fmap.append(x) - x = self.conv_post(x) - fmap.append(x) - x = torch.flatten(x, 1, -1) - - return x, fmap - - -class MultiScaleDiscriminator(torch.nn.Module): - def __init__(self): - super(MultiScaleDiscriminator, self).__init__() - self.discriminators = nn.ModuleList([ - DiscriminatorS(use_spectral_norm=True), - DiscriminatorS(), - DiscriminatorS(), - ]) - self.meanpools = nn.ModuleList([ - AvgPool1d(4, 2, padding=2), - AvgPool1d(4, 2, padding=2) - ]) - - def forward(self, y, y_hat): - y_d_rs = [] - y_d_gs = [] - fmap_rs = [] - fmap_gs = [] - for i, d in enumerate(self.discriminators): - if i != 0: - y = self.meanpools[i - 1](y) - y_hat = self.meanpools[i - 1](y_hat) - y_d_r, fmap_r = d(y) - y_d_g, fmap_g = d(y_hat) - y_d_rs.append(y_d_r) - fmap_rs.append(fmap_r) - y_d_gs.append(y_d_g) - fmap_gs.append(fmap_g) - - return y_d_rs, y_d_gs, fmap_rs, fmap_gs - - -def feature_loss(fmap_r, fmap_g): - loss = 0 - for dr, dg in zip(fmap_r, fmap_g): - for rl, gl in zip(dr, dg): - loss += torch.mean(torch.abs(rl - gl)) - - return loss * 2 - - -def discriminator_loss(disc_real_outputs, disc_generated_outputs): - loss = 0 - r_losses = [] - g_losses = [] - for dr, dg in zip(disc_real_outputs, disc_generated_outputs): - r_loss = torch.mean((1 - dr) ** 2) - g_loss = torch.mean(dg ** 2) - loss += (r_loss + g_loss) - r_losses.append(r_loss.item()) - g_losses.append(g_loss.item()) - - return loss, r_losses, g_losses - - -def generator_loss(disc_outputs): - loss = 0 - gen_losses = [] - for dg in disc_outputs: - l = torch.mean((1 - dg) ** 2) - gen_losses.append(l) - loss += l - - return loss, gen_losses diff --git a/spaces/Froleptan/stablediffusion-infinity/PyPatchMatch/travis.sh b/spaces/Froleptan/stablediffusion-infinity/PyPatchMatch/travis.sh deleted file mode 100644 index a6ea538775e25b4e9b8c855a38e400c82f9121bf..0000000000000000000000000000000000000000 --- a/spaces/Froleptan/stablediffusion-infinity/PyPatchMatch/travis.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/bash -# -# travis.sh -# Copyright (C) 2020 Jiayuan Mao -# -# Distributed under terms of the MIT license. -# - -make clean && make diff --git a/spaces/GigiWasThere/Text/README.md b/spaces/GigiWasThere/Text/README.md deleted file mode 100644 index 196e8466dc20fbb1750abdc2fc1a65ffe1e2bfad..0000000000000000000000000000000000000000 --- a/spaces/GigiWasThere/Text/README.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Text -emoji: 🦀 -colorFrom: blue -colorTo: pink -sdk: gradio -sdk_version: 3.18.0 -app_file: app.py -pinned: false ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Gradio-Blocks/uniformer_image_detection/configs/faster_rcnn/faster_rcnn_r50_caffe_dc5_mstrain_3x_coco.py b/spaces/Gradio-Blocks/uniformer_image_detection/configs/faster_rcnn/faster_rcnn_r50_caffe_dc5_mstrain_3x_coco.py deleted file mode 100644 index 403747f127e0f7a301771e53e75bf0e83a1736c9..0000000000000000000000000000000000000000 --- a/spaces/Gradio-Blocks/uniformer_image_detection/configs/faster_rcnn/faster_rcnn_r50_caffe_dc5_mstrain_3x_coco.py +++ /dev/null @@ -1,4 +0,0 @@ -_base_ = './faster_rcnn_r50_caffe_dc5_mstrain_1x_coco.py' -# learning policy -lr_config = dict(step=[28, 34]) -runner = dict(type='EpochBasedRunner', max_epochs=36) diff --git a/spaces/Gradio-Blocks/uniformer_image_detection/mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py b/spaces/Gradio-Blocks/uniformer_image_detection/mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py deleted file mode 100644 index 190309fd42a1b76c12c82fc1acf0511494be5ac3..0000000000000000000000000000000000000000 --- a/spaces/Gradio-Blocks/uniformer_image_detection/mmdet/core/bbox/coder/legacy_delta_xywh_bbox_coder.py +++ /dev/null @@ -1,215 +0,0 @@ -import mmcv -import numpy as np -import torch - -from ..builder import BBOX_CODERS -from .base_bbox_coder import BaseBBoxCoder - - -@BBOX_CODERS.register_module() -class LegacyDeltaXYWHBBoxCoder(BaseBBoxCoder): - """Legacy Delta XYWH BBox coder used in MMDet V1.x. - - Following the practice in R-CNN [1]_, this coder encodes bbox (x1, y1, x2, - y2) into delta (dx, dy, dw, dh) and decodes delta (dx, dy, dw, dh) - back to original bbox (x1, y1, x2, y2). - - Note: - The main difference between :class`LegacyDeltaXYWHBBoxCoder` and - :class:`DeltaXYWHBBoxCoder` is whether ``+ 1`` is used during width and - height calculation. We suggest to only use this coder when testing with - MMDet V1.x models. - - References: - .. [1] https://arxiv.org/abs/1311.2524 - - Args: - target_means (Sequence[float]): denormalizing means of target for - delta coordinates - target_stds (Sequence[float]): denormalizing standard deviation of - target for delta coordinates - """ - - def __init__(self, - target_means=(0., 0., 0., 0.), - target_stds=(1., 1., 1., 1.)): - super(BaseBBoxCoder, self).__init__() - self.means = target_means - self.stds = target_stds - - def encode(self, bboxes, gt_bboxes): - """Get box regression transformation deltas that can be used to - transform the ``bboxes`` into the ``gt_bboxes``. - - Args: - bboxes (torch.Tensor): source boxes, e.g., object proposals. - gt_bboxes (torch.Tensor): target of the transformation, e.g., - ground-truth boxes. - - Returns: - torch.Tensor: Box transformation deltas - """ - assert bboxes.size(0) == gt_bboxes.size(0) - assert bboxes.size(-1) == gt_bboxes.size(-1) == 4 - encoded_bboxes = legacy_bbox2delta(bboxes, gt_bboxes, self.means, - self.stds) - return encoded_bboxes - - def decode(self, - bboxes, - pred_bboxes, - max_shape=None, - wh_ratio_clip=16 / 1000): - """Apply transformation `pred_bboxes` to `boxes`. - - Args: - boxes (torch.Tensor): Basic boxes. - pred_bboxes (torch.Tensor): Encoded boxes with shape - max_shape (tuple[int], optional): Maximum shape of boxes. - Defaults to None. - wh_ratio_clip (float, optional): The allowed ratio between - width and height. - - Returns: - torch.Tensor: Decoded boxes. - """ - assert pred_bboxes.size(0) == bboxes.size(0) - decoded_bboxes = legacy_delta2bbox(bboxes, pred_bboxes, self.means, - self.stds, max_shape, wh_ratio_clip) - - return decoded_bboxes - - -@mmcv.jit(coderize=True) -def legacy_bbox2delta(proposals, - gt, - means=(0., 0., 0., 0.), - stds=(1., 1., 1., 1.)): - """Compute deltas of proposals w.r.t. gt in the MMDet V1.x manner. - - We usually compute the deltas of x, y, w, h of proposals w.r.t ground - truth bboxes to get regression target. - This is the inverse function of `delta2bbox()` - - Args: - proposals (Tensor): Boxes to be transformed, shape (N, ..., 4) - gt (Tensor): Gt bboxes to be used as base, shape (N, ..., 4) - means (Sequence[float]): Denormalizing means for delta coordinates - stds (Sequence[float]): Denormalizing standard deviation for delta - coordinates - - Returns: - Tensor: deltas with shape (N, 4), where columns represent dx, dy, - dw, dh. - """ - assert proposals.size() == gt.size() - - proposals = proposals.float() - gt = gt.float() - px = (proposals[..., 0] + proposals[..., 2]) * 0.5 - py = (proposals[..., 1] + proposals[..., 3]) * 0.5 - pw = proposals[..., 2] - proposals[..., 0] + 1.0 - ph = proposals[..., 3] - proposals[..., 1] + 1.0 - - gx = (gt[..., 0] + gt[..., 2]) * 0.5 - gy = (gt[..., 1] + gt[..., 3]) * 0.5 - gw = gt[..., 2] - gt[..., 0] + 1.0 - gh = gt[..., 3] - gt[..., 1] + 1.0 - - dx = (gx - px) / pw - dy = (gy - py) / ph - dw = torch.log(gw / pw) - dh = torch.log(gh / ph) - deltas = torch.stack([dx, dy, dw, dh], dim=-1) - - means = deltas.new_tensor(means).unsqueeze(0) - stds = deltas.new_tensor(stds).unsqueeze(0) - deltas = deltas.sub_(means).div_(stds) - - return deltas - - -@mmcv.jit(coderize=True) -def legacy_delta2bbox(rois, - deltas, - means=(0., 0., 0., 0.), - stds=(1., 1., 1., 1.), - max_shape=None, - wh_ratio_clip=16 / 1000): - """Apply deltas to shift/scale base boxes in the MMDet V1.x manner. - - Typically the rois are anchor or proposed bounding boxes and the deltas are - network outputs used to shift/scale those boxes. - This is the inverse function of `bbox2delta()` - - Args: - rois (Tensor): Boxes to be transformed. Has shape (N, 4) - deltas (Tensor): Encoded offsets with respect to each roi. - Has shape (N, 4 * num_classes). Note N = num_anchors * W * H when - rois is a grid of anchors. Offset encoding follows [1]_. - means (Sequence[float]): Denormalizing means for delta coordinates - stds (Sequence[float]): Denormalizing standard deviation for delta - coordinates - max_shape (tuple[int, int]): Maximum bounds for boxes. specifies (H, W) - wh_ratio_clip (float): Maximum aspect ratio for boxes. - - Returns: - Tensor: Boxes with shape (N, 4), where columns represent - tl_x, tl_y, br_x, br_y. - - References: - .. [1] https://arxiv.org/abs/1311.2524 - - Example: - >>> rois = torch.Tensor([[ 0., 0., 1., 1.], - >>> [ 0., 0., 1., 1.], - >>> [ 0., 0., 1., 1.], - >>> [ 5., 5., 5., 5.]]) - >>> deltas = torch.Tensor([[ 0., 0., 0., 0.], - >>> [ 1., 1., 1., 1.], - >>> [ 0., 0., 2., -1.], - >>> [ 0.7, -1.9, -0.5, 0.3]]) - >>> legacy_delta2bbox(rois, deltas, max_shape=(32, 32)) - tensor([[0.0000, 0.0000, 1.5000, 1.5000], - [0.0000, 0.0000, 5.2183, 5.2183], - [0.0000, 0.1321, 7.8891, 0.8679], - [5.3967, 2.4251, 6.0033, 3.7749]]) - """ - means = deltas.new_tensor(means).repeat(1, deltas.size(1) // 4) - stds = deltas.new_tensor(stds).repeat(1, deltas.size(1) // 4) - denorm_deltas = deltas * stds + means - dx = denorm_deltas[:, 0::4] - dy = denorm_deltas[:, 1::4] - dw = denorm_deltas[:, 2::4] - dh = denorm_deltas[:, 3::4] - max_ratio = np.abs(np.log(wh_ratio_clip)) - dw = dw.clamp(min=-max_ratio, max=max_ratio) - dh = dh.clamp(min=-max_ratio, max=max_ratio) - # Compute center of each roi - px = ((rois[:, 0] + rois[:, 2]) * 0.5).unsqueeze(1).expand_as(dx) - py = ((rois[:, 1] + rois[:, 3]) * 0.5).unsqueeze(1).expand_as(dy) - # Compute width/height of each roi - pw = (rois[:, 2] - rois[:, 0] + 1.0).unsqueeze(1).expand_as(dw) - ph = (rois[:, 3] - rois[:, 1] + 1.0).unsqueeze(1).expand_as(dh) - # Use exp(network energy) to enlarge/shrink each roi - gw = pw * dw.exp() - gh = ph * dh.exp() - # Use network energy to shift the center of each roi - gx = px + pw * dx - gy = py + ph * dy - # Convert center-xy/width/height to top-left, bottom-right - - # The true legacy box coder should +- 0.5 here. - # However, current implementation improves the performance when testing - # the models trained in MMDetection 1.X (~0.5 bbox AP, 0.2 mask AP) - x1 = gx - gw * 0.5 - y1 = gy - gh * 0.5 - x2 = gx + gw * 0.5 - y2 = gy + gh * 0.5 - if max_shape is not None: - x1 = x1.clamp(min=0, max=max_shape[1] - 1) - y1 = y1.clamp(min=0, max=max_shape[0] - 1) - x2 = x2.clamp(min=0, max=max_shape[1] - 1) - y2 = y2.clamp(min=0, max=max_shape[0] - 1) - bboxes = torch.stack([x1, y1, x2, y2], dim=-1).view_as(deltas) - return bboxes diff --git a/spaces/Gradio-Blocks/uniformer_image_segmentation/configs/deeplabv3plus/deeplabv3plus_r101-d8_512x512_20k_voc12aug.py b/spaces/Gradio-Blocks/uniformer_image_segmentation/configs/deeplabv3plus/deeplabv3plus_r101-d8_512x512_20k_voc12aug.py deleted file mode 100644 index ebb1a8eaee16de7443ab3e79e02a37340de511d7..0000000000000000000000000000000000000000 --- a/spaces/Gradio-Blocks/uniformer_image_segmentation/configs/deeplabv3plus/deeplabv3plus_r101-d8_512x512_20k_voc12aug.py +++ /dev/null @@ -1,2 +0,0 @@ -_base_ = './deeplabv3plus_r50-d8_512x512_20k_voc12aug.py' -model = dict(pretrained='open-mmlab://resnet101_v1c', backbone=dict(depth=101)) diff --git a/spaces/HaHaBill/LandShapes-Antarctica/netdissect/__init__.py b/spaces/HaHaBill/LandShapes-Antarctica/netdissect/__init__.py deleted file mode 100644 index 39f0957560ff29b9ff0ee630e78972cd3ef187fb..0000000000000000000000000000000000000000 --- a/spaces/HaHaBill/LandShapes-Antarctica/netdissect/__init__.py +++ /dev/null @@ -1,60 +0,0 @@ -''' -Netdissect package. - -To run dissection: - -1. Load up the convolutional model you wish to dissect, and wrap it - in an InstrumentedModel. Call imodel.retain_layers([layernames,..]) - to analyze a specified set of layers. -2. Load the segmentation dataset using the BrodenDataset class; - use the transform_image argument to normalize images to be - suitable for the model, or the size argument to truncate the dataset. -3. Write a function to recover the original image (with RGB scaled to - [0...1]) given a normalized dataset image; ReverseNormalize in this - package inverts transforms.Normalize for this purpose. -4. Choose a directory in which to write the output, and call - dissect(outdir, model, dataset). - -Example: - - from netdissect import InstrumentedModel, dissect - from netdissect import BrodenDataset, ReverseNormalize - - model = InstrumentedModel(load_my_model()) - model.eval() - model.cuda() - model.retain_layers(['conv1', 'conv2', 'conv3', 'conv4', 'conv5']) - bds = BrodenDataset('dataset/broden1_227', - transform_image=transforms.Compose([ - transforms.ToTensor(), - transforms.Normalize(IMAGE_MEAN, IMAGE_STDEV)]), - size=1000) - dissect('result/dissect', model, bds, - recover_image=ReverseNormalize(IMAGE_MEAN, IMAGE_STDEV), - examples_per_unit=10) -''' - -from .dissection import dissect, ReverseNormalize -from .dissection import ClassifierSegRunner, GeneratorSegRunner -from .dissection import ImageOnlySegRunner -from .broden import BrodenDataset, ScaleSegmentation, scatter_batch -from .segdata import MultiSegmentDataset -from .nethook import InstrumentedModel -from .zdataset import z_dataset_for_model, z_sample_for_model, standard_z_sample -from . import actviz -from . import progress -from . import runningstats -from . import sampler - -__all__ = [ - 'dissect', 'ReverseNormalize', - 'ClassifierSegRunner', 'GeneratorSegRunner', 'ImageOnlySegRunner', - 'BrodenDataset', 'ScaleSegmentation', 'scatter_batch', - 'MultiSegmentDataset', - 'InstrumentedModel', - 'z_dataset_for_model', 'z_sample_for_model', 'standard_z_sample' - 'actviz', - 'progress', - 'runningstats', - 'sampler' -] diff --git a/spaces/HaloMaster/chinesesummary/fengshen/examples/mt5_summary/fastapi_mt5_summary.py b/spaces/HaloMaster/chinesesummary/fengshen/examples/mt5_summary/fastapi_mt5_summary.py deleted file mode 100644 index 44adaf8f5855260c683c0bcfe7986ffccc9f25c4..0000000000000000000000000000000000000000 --- a/spaces/HaloMaster/chinesesummary/fengshen/examples/mt5_summary/fastapi_mt5_summary.py +++ /dev/null @@ -1,93 +0,0 @@ -import os -import sys -import uvicorn -import torch -from fastapi import Body, FastAPI -from transformers import T5Tokenizer, MT5ForConditionalGeneration -import pytorch_lightning as pl -sys.path.append(os.path.abspath(os.path.join( - os.path.dirname(__file__), os.path.pardir))) -os.environ["CUDA_VISIBLE_DEVICES"] = '5' -os.environ["MASTER_ADDR"] = '127.0.0.1' -os.environ["MASTER_PORT"] = '6000' -device = "cuda:0" if torch.cuda.is_available() else "cpu" -print('device') -pretrain_model_path = '/cognitive_comp/ganruyi/hf_models/google/mt5-large' -# pretrain_model_path = 'google/mt5-small' -model_path = '/cognitive_comp/ganruyi/fengshen/mt5_large_summary/ckpt/epoch-0-last.ckpt' -tokenizer = T5Tokenizer.from_pretrained(pretrain_model_path) -print('load tokenizer') - - -class MT5FinetuneSummary(pl.LightningModule): - - def __init__(self): - super().__init__() - self.model = MT5ForConditionalGeneration.from_pretrained(pretrain_model_path) - - -model = MT5FinetuneSummary.load_from_checkpoint(model_path) -print('load checkpoint') -model.to(device) -model.eval() -app = FastAPI() -print('server start') - -# def flask_gen(text: str, level: float = 0.9, n_sample: int = 5, length: int = 32, is_beam_search=False): - - -@app.post('/mt5_summary') -async def flask_gen(text: str = Body('', title='原文', embed=True), - n_sample: int = 5, length: int = 32, is_beam_search=False): - if len(text) > 128: - text = text[:128] - text = 'summary:'+text - print(text) - # inputs = tokenizer(text, return_tensors='pt') - inputs = tokenizer.encode_plus( - text, max_length=128, padding='max_length', truncation=True, return_tensors='pt') - # print(inputs) - if is_beam_search: - generated_ids = model.model.generate( - input_ids=inputs['input_ids'].to(device), - attention_mask=inputs['attention_mask'].to(device), - max_length=length, - num_beams=n_sample, - repetition_penalty=2.5, - length_penalty=1.0, - early_stopping=True, - num_return_sequences=n_sample - ) - else: - generated_ids = model.model.generate( - input_ids=inputs['input_ids'].to(device), - attention_mask=inputs['attention_mask'].to(device), - max_length=length, - do_sample=True, - temperature=1.0, - top_p=1.0, - repetition_penalty=2.5, - # early_stopping=True, - num_return_sequences=n_sample - ) - result = [] - # print(tokenizer.all_special_tokens) - for sample in generated_ids: - preds = [tokenizer.decode(sample, skip_special_tokens=True, - clean_up_tokenization_spaces=True)] - preds = ''.join(preds) - # print(preds) - result.append(preds) - return result - - -if __name__ == '__main__': - uvicorn.run(app, host="0.0.0.0", port=6607, log_level="debug") -# # article = "日前,方舟子发文直指林志颖旗下爱碧丽推销假保健品,引起哗然。调查发现, -# 爱碧丽没有自己的生产加工厂。其胶原蛋白饮品无核心研发,全部代工生产。号称有“逆生长”功效的爱碧丽“梦幻奇迹限量组”售价>高达1080元,实际成本仅为每瓶4元!" -# article = '''在北京冬奥会自由式滑雪女子坡面障碍技巧决赛中,中国选手谷爱凌夺得银牌。祝贺谷爱凌! -# 今天上午,自由式滑雪女子坡面障碍技巧决赛举行。决赛分三轮进行,取选手最佳成绩排名决出奖牌。 -# 第一跳,中国选手谷爱凌获得69.90分。在12位选手中排名第三。完成动作后,谷爱凌又扮了个鬼脸,甚是可爱。 -# 第二轮中,谷爱凌在道具区第三个障碍处失误,落地时摔倒。获得16.98分。网友:摔倒了也没关系,继续加油! -# 在第二跳失误摔倒的情况下,谷爱凌顶住压力,第三跳稳稳发挥,流畅落地!获得86.23分!此轮比赛,共12位选手参赛,谷爱凌第10位出场。网友:看比赛时我比谷爱凌紧张,加油!''' - # flask_gen(article, length=30) diff --git a/spaces/Harveenchadha/Vakyansh-Odia-TTS/ttsv/utils/inference/run_gradio.py b/spaces/Harveenchadha/Vakyansh-Odia-TTS/ttsv/utils/inference/run_gradio.py deleted file mode 100644 index 7d5ccc5e53031c83ea146bc3ac070fd8dedfe9e1..0000000000000000000000000000000000000000 --- a/spaces/Harveenchadha/Vakyansh-Odia-TTS/ttsv/utils/inference/run_gradio.py +++ /dev/null @@ -1,60 +0,0 @@ -import gradio as gr -import argparse -import numpy as np -from argparse import Namespace -from .advanced_tts import load_all_models, run_tts_paragraph - - -def hit_tts(textbox, gender, slider_noise_scale, slider_length_sclae, choice_transliteration, choice_number_conversion, choice_split_sentences): - inputs_to_gradio = {'text' : textbox, - 'gender' : gender, - 'noise_scale': slider_noise_scale, - 'length_scale': slider_length_sclae, - 'transliteration' : 1 if choice_transliteration else 0, - 'number_conversion' : 1 if choice_number_conversion else 0, - 'split_sentences' : 1 if choice_split_sentences else 0 - } - - args = Namespace(**inputs_to_gradio) - args.wav = None - args.lang = lang - args.gender = gender - - if args.text: - sr, audio = run_tts_paragraph(args) - return (sr, audio) - -def build_gradio(args): - global lang - lang = args.lang - load_all_models(args) - textbox = gr.inputs.Textbox(placeholder="Enter Text to run", default="", label="Enter Input Text") - gender = gr.inputs.Radio(choices = ['Female', 'Male'], default='Female', label='Gender') - slider_noise_scale = gr.inputs.Slider(minimum=0, maximum=1.0, step=0.001, default=0.667, label='Noise Scale') - slider_length_sclae = gr.inputs.Slider(minimum=0, maximum=2.0, step=0.1, default=1.0, label='Length Scale') - - choice_transliteration = gr.inputs.Checkbox(default=True, label="Transliteration") - choice_number_conversion = gr.inputs.Checkbox(default=True, label="Number Conversion") - choice_split_sentences = gr.inputs.Checkbox(default=True, label="Split Sentences") - - examples = [['ଭାରତ ମୋର ଦେଶ ଏବଂ ମୁଁ ଜଣେ ଭାରତୀୟ ହୋଇଥିବାରୁ ଗର୍ବିତ |', 'Male', 0.667, 1, 0, 1, 1]] - - op = gr.outputs.Audio(type="numpy", label=None) - - inputs_to_gradio = [textbox, gender, slider_noise_scale, slider_length_sclae, choice_transliteration, choice_number_conversion, choice_split_sentences] - iface = gr.Interface(fn=hit_tts, examples = examples, inputs=inputs_to_gradio, outputs=op, theme='huggingface', title='Vakyansh Odia TTS', article = 'Note: Transliteration models may not work well in some scenarios which can hamper the TTS quality, to evaluate the model in better sense it is advisable to provide input in the required language and switch off transliteration. Contact @harveenchadha on twitter for any issues.') - iface.launch(enable_queue=True) - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument("-a", "--acoustic", required=True, type=str) - parser.add_argument("-v", "--vocoder", required=True, type=str) - parser.add_argument("-d", "--device", type=str, default="cpu") - parser.add_argument("-L", "--lang", type=str, required=True) - - global lang - - args = parser.parse_args() - lang = args.lang - - build_gradio(args) \ No newline at end of file diff --git a/spaces/Harveenchadha/oiTrans/indic_nlp_library/indicnlp/script/phonetic_sim.py b/spaces/Harveenchadha/oiTrans/indic_nlp_library/indicnlp/script/phonetic_sim.py deleted file mode 100644 index 87f56b63dd38c0f8fd5edf9b6ee5131afd332f31..0000000000000000000000000000000000000000 --- a/spaces/Harveenchadha/oiTrans/indic_nlp_library/indicnlp/script/phonetic_sim.py +++ /dev/null @@ -1,59 +0,0 @@ -# -# Copyright (c) 2013-present, Anoop Kunchukuttan -# All rights reserved. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. -# - -from indicnlp import loader -from indicnlp import langinfo -from indicnlp.script.indic_scripts import * -import numpy as np -import gzip -import pandas as pd -import sys - -def equal(v1,v2): - return 0.0 if np.sum( xor_vectors(v1, v2)) > 0 else 1.0 - -def dice(v1,v2): - dotprod=2*float(np.dot( v1, v2.T )) - return dotprod/float(len(v1)+len(v2)) - -def jaccard(v1,v2): - dotprod=float(np.dot( v1, v2.T )) - return dotprod/float(len(v1)+len(v2)-dotprod) - -def cosine(v1,v2): - dotprod=float(np.dot( v1, v2.T )) - norm1=float(np.dot( v1, v1.T )) - norm2=float(np.dot( v2, v2.T )) - return ((dotprod)/(np.sqrt(norm1*norm2)+0.00001)) - -def dotprod(v1,v2): - return float(np.dot( v1, v2.T )) - -def sim1(v1,v2,base=5.0): - return np.power(base,dotprod(v1,v2)) - -def softmax(v1,v2): - return sim1(v1,v2,np.e) - -def create_similarity_matrix(sim_func,slang,tlang,normalize=True): - - dim=langinfo.COORDINATED_RANGE_END_INCLUSIVE-langinfo.COORDINATED_RANGE_START_INCLUSIVE+1 - sim_mat=np.zeros((dim,dim)) - - for offset1 in range(langinfo.COORDINATED_RANGE_START_INCLUSIVE, langinfo.COORDINATED_RANGE_END_INCLUSIVE+1): - v1=get_phonetic_feature_vector(offset_to_char(offset1,slang),slang) - for offset2 in range(langinfo.COORDINATED_RANGE_START_INCLUSIVE, langinfo.COORDINATED_RANGE_END_INCLUSIVE+1): - v2=get_phonetic_feature_vector(offset_to_char(offset2,tlang),tlang) - sim_mat[offset1,offset2]=sim_func(v1,v2) - - if normalize: - sums=np.sum(sim_mat, axis=1) - sim_mat=(sim_mat.transpose()/sums).transpose() - - return sim_mat - diff --git a/spaces/Hasani/Specific_Object_Recognition_in_the_Wild/README.md b/spaces/Hasani/Specific_Object_Recognition_in_the_Wild/README.md deleted file mode 100644 index e80168505e00ba6c92b5a166f7679b2af2f43855..0000000000000000000000000000000000000000 --- a/spaces/Hasani/Specific_Object_Recognition_in_the_Wild/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Specific Object Recognition In The Wild -emoji: ⚡ -colorFrom: red -colorTo: pink -sdk: gradio -sdk_version: 3.42.0 -app_file: app.py -pinned: false -license: openrail ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/HgMenon/Transcribe_V0.2/src/languages.py b/spaces/HgMenon/Transcribe_V0.2/src/languages.py deleted file mode 100644 index fbad66e4d34119d27d12e3dfecbe99b6fdde4db7..0000000000000000000000000000000000000000 --- a/spaces/HgMenon/Transcribe_V0.2/src/languages.py +++ /dev/null @@ -1,147 +0,0 @@ -class Language(): - def __init__(self, code, name): - self.code = code - self.name = name - - def __str__(self): - return "Language(code={}, name={})".format(self.code, self.name) - -LANGUAGES = [ - Language('en', 'English'), - Language('zh', 'Chinese'), - Language('de', 'German'), - Language('es', 'Spanish'), - Language('ru', 'Russian'), - Language('ko', 'Korean'), - Language('fr', 'French'), - Language('ja', 'Japanese'), - Language('pt', 'Portuguese'), - Language('tr', 'Turkish'), - Language('pl', 'Polish'), - Language('ca', 'Catalan'), - Language('nl', 'Dutch'), - Language('ar', 'Arabic'), - Language('sv', 'Swedish'), - Language('it', 'Italian'), - Language('id', 'Indonesian'), - Language('hi', 'Hindi'), - Language('fi', 'Finnish'), - Language('vi', 'Vietnamese'), - Language('he', 'Hebrew'), - Language('uk', 'Ukrainian'), - Language('el', 'Greek'), - Language('ms', 'Malay'), - Language('cs', 'Czech'), - Language('ro', 'Romanian'), - Language('da', 'Danish'), - Language('hu', 'Hungarian'), - Language('ta', 'Tamil'), - Language('no', 'Norwegian'), - Language('th', 'Thai'), - Language('ur', 'Urdu'), - Language('hr', 'Croatian'), - Language('bg', 'Bulgarian'), - Language('lt', 'Lithuanian'), - Language('la', 'Latin'), - Language('mi', 'Maori'), - Language('ml', 'Malayalam'), - Language('cy', 'Welsh'), - Language('sk', 'Slovak'), - Language('te', 'Telugu'), - Language('fa', 'Persian'), - Language('lv', 'Latvian'), - Language('bn', 'Bengali'), - Language('sr', 'Serbian'), - Language('az', 'Azerbaijani'), - Language('sl', 'Slovenian'), - Language('kn', 'Kannada'), - Language('et', 'Estonian'), - Language('mk', 'Macedonian'), - Language('br', 'Breton'), - Language('eu', 'Basque'), - Language('is', 'Icelandic'), - Language('hy', 'Armenian'), - Language('ne', 'Nepali'), - Language('mn', 'Mongolian'), - Language('bs', 'Bosnian'), - Language('kk', 'Kazakh'), - Language('sq', 'Albanian'), - Language('sw', 'Swahili'), - Language('gl', 'Galician'), - Language('mr', 'Marathi'), - Language('pa', 'Punjabi'), - Language('si', 'Sinhala'), - Language('km', 'Khmer'), - Language('sn', 'Shona'), - Language('yo', 'Yoruba'), - Language('so', 'Somali'), - Language('af', 'Afrikaans'), - Language('oc', 'Occitan'), - Language('ka', 'Georgian'), - Language('be', 'Belarusian'), - Language('tg', 'Tajik'), - Language('sd', 'Sindhi'), - Language('gu', 'Gujarati'), - Language('am', 'Amharic'), - Language('yi', 'Yiddish'), - Language('lo', 'Lao'), - Language('uz', 'Uzbek'), - Language('fo', 'Faroese'), - Language('ht', 'Haitian creole'), - Language('ps', 'Pashto'), - Language('tk', 'Turkmen'), - Language('nn', 'Nynorsk'), - Language('mt', 'Maltese'), - Language('sa', 'Sanskrit'), - Language('lb', 'Luxembourgish'), - Language('my', 'Myanmar'), - Language('bo', 'Tibetan'), - Language('tl', 'Tagalog'), - Language('mg', 'Malagasy'), - Language('as', 'Assamese'), - Language('tt', 'Tatar'), - Language('haw', 'Hawaiian'), - Language('ln', 'Lingala'), - Language('ha', 'Hausa'), - Language('ba', 'Bashkir'), - Language('jw', 'Javanese'), - Language('su', 'Sundanese') -] - -_TO_LANGUAGE_CODE = { - **{language.code: language for language in LANGUAGES}, - "burmese": "my", - "valencian": "ca", - "flemish": "nl", - "haitian": "ht", - "letzeburgesch": "lb", - "pushto": "ps", - "panjabi": "pa", - "moldavian": "ro", - "moldovan": "ro", - "sinhalese": "si", - "castilian": "es", -} - -_FROM_LANGUAGE_NAME = { - **{language.name.lower(): language for language in LANGUAGES} -} - -def get_language_from_code(language_code, default=None) -> Language: - """Return the language name from the language code.""" - return _TO_LANGUAGE_CODE.get(language_code, default) - -def get_language_from_name(language, default=None) -> Language: - """Return the language code from the language name.""" - return _FROM_LANGUAGE_NAME.get(language.lower() if language else None, default) - -def get_language_names(): - """Return a list of language names.""" - return [language.name for language in LANGUAGES] - -if __name__ == "__main__": - # Test lookup - print(get_language_from_code('en')) - print(get_language_from_name('English')) - - print(get_language_names()) \ No newline at end of file diff --git a/spaces/HgMenon/Transcribe_V0.2/src/vad.py b/spaces/HgMenon/Transcribe_V0.2/src/vad.py deleted file mode 100644 index e68ee7391e93f539a05d548601f2d87168bb1282..0000000000000000000000000000000000000000 --- a/spaces/HgMenon/Transcribe_V0.2/src/vad.py +++ /dev/null @@ -1,568 +0,0 @@ -from abc import ABC, abstractmethod -from collections import Counter, deque -import time - -from typing import Any, Deque, Iterator, List, Dict - -from pprint import pprint -from src.hooks.progressListener import ProgressListener -from src.hooks.subTaskProgressListener import SubTaskProgressListener -from src.hooks.whisperProgressHook import create_progress_listener_handle -from src.modelCache import GLOBAL_MODEL_CACHE, ModelCache - -from src.segments import merge_timestamps -from src.whisper.abstractWhisperContainer import AbstractWhisperCallback - -# Workaround for https://github.com/tensorflow/tensorflow/issues/48797 -try: - import tensorflow as tf -except ModuleNotFoundError: - # Error handling - pass - -import torch - -import ffmpeg -import numpy as np - -from src.utils import format_timestamp -from enum import Enum - -class NonSpeechStrategy(Enum): - """ - Ignore non-speech frames segments. - """ - SKIP = 1 - """ - Just treat non-speech segments as speech. - """ - CREATE_SEGMENT = 2 - """ - Expand speech segments into subsequent non-speech segments. - """ - EXPAND_SEGMENT = 3 - -# Defaults for Silero -SPEECH_TRESHOLD = 0.3 - -# Minimum size of segments to process -MIN_SEGMENT_DURATION = 1 - -# The maximum time for texts from old segments to be used in the next segment -MAX_PROMPT_WINDOW = 0 # seconds (0 = disabled) -PROMPT_NO_SPEECH_PROB = 0.1 # Do not pass the text from segments with a no speech probability higher than this - -VAD_MAX_PROCESSING_CHUNK = 60 * 60 # 60 minutes of audio - -class TranscriptionConfig(ABC): - def __init__(self, non_speech_strategy: NonSpeechStrategy = NonSpeechStrategy.SKIP, - segment_padding_left: float = None, segment_padding_right = None, max_silent_period: float = None, - max_merge_size: float = None, max_prompt_window: float = None, initial_segment_index = -1): - self.non_speech_strategy = non_speech_strategy - self.segment_padding_left = segment_padding_left - self.segment_padding_right = segment_padding_right - self.max_silent_period = max_silent_period - self.max_merge_size = max_merge_size - self.max_prompt_window = max_prompt_window - self.initial_segment_index = initial_segment_index - -class PeriodicTranscriptionConfig(TranscriptionConfig): - def __init__(self, periodic_duration: float, non_speech_strategy: NonSpeechStrategy = NonSpeechStrategy.SKIP, - segment_padding_left: float = None, segment_padding_right = None, max_silent_period: float = None, - max_merge_size: float = None, max_prompt_window: float = None, initial_segment_index = -1): - super().__init__(non_speech_strategy, segment_padding_left, segment_padding_right, max_silent_period, max_merge_size, max_prompt_window, initial_segment_index) - self.periodic_duration = periodic_duration - -class AbstractTranscription(ABC): - def __init__(self, sampling_rate: int = 16000): - self.sampling_rate = sampling_rate - - def get_audio_segment(self, str, start_time: str = None, duration: str = None): - return load_audio(str, self.sampling_rate, start_time, duration) - - def is_transcribe_timestamps_fast(self): - """ - Determine if get_transcribe_timestamps is fast enough to not need parallelization. - """ - return False - - @abstractmethod - def get_transcribe_timestamps(self, audio: str, config: TranscriptionConfig, start_time: float, end_time: float): - """ - Get the start and end timestamps of the sections that should be transcribed by this VAD method. - - Parameters - ---------- - audio: str - The audio file. - config: TranscriptionConfig - The transcription configuration. - - Returns - ------- - A list of start and end timestamps, in fractional seconds. - """ - return - - def get_merged_timestamps(self, timestamps: List[Dict[str, Any]], config: TranscriptionConfig, total_duration: float): - """ - Get the start and end timestamps of the sections that should be transcribed by this VAD method, - after merging the given segments using the specified configuration. - - Parameters - ---------- - audio: str - The audio file. - config: TranscriptionConfig - The transcription configuration. - - Returns - ------- - A list of start and end timestamps, in fractional seconds. - """ - merged = merge_timestamps(timestamps, config.max_silent_period, config.max_merge_size, - config.segment_padding_left, config.segment_padding_right) - - if config.non_speech_strategy != NonSpeechStrategy.SKIP: - # Expand segments to include the gaps between them - if (config.non_speech_strategy == NonSpeechStrategy.CREATE_SEGMENT): - # When we have a prompt window, we create speech segments betwen each segment if we exceed the merge size - merged = self.fill_gaps(merged, total_duration=total_duration, max_expand_size=config.max_merge_size) - elif config.non_speech_strategy == NonSpeechStrategy.EXPAND_SEGMENT: - # With no prompt window, it is better to just expand the segments (this effectively passes the prompt to the next segment) - merged = self.expand_gaps(merged, total_duration=total_duration) - else: - raise Exception("Unknown non-speech strategy: " + str(config.non_speech_strategy)) - - print("Transcribing non-speech:") - pprint(merged) - return merged - - def transcribe(self, audio: str, whisperCallable: AbstractWhisperCallback, config: TranscriptionConfig, - progressListener: ProgressListener = None): - """ - Transcribe the given audo file. - - Parameters - ---------- - audio: str - The audio file. - whisperCallable: WhisperCallback - A callback object to call to transcribe each segment. - - Returns - ------- - A list of start and end timestamps, in fractional seconds. - """ - - try: - max_audio_duration = self.get_audio_duration(audio, config) - timestamp_segments = self.get_transcribe_timestamps(audio, config, 0, max_audio_duration) - - # Get speech timestamps from full audio file - merged = self.get_merged_timestamps(timestamp_segments, config, max_audio_duration) - - # A deque of transcribed segments that is passed to the next segment as a prompt - prompt_window = deque() - - print("Processing timestamps:") - pprint(merged) - - result = { - 'text': "", - 'segments': [], - 'language': "" - } - languageCounter = Counter() - detected_language = None - - segment_index = config.initial_segment_index - - # Calculate progress - progress_start_offset = merged[0]['start'] if len(merged) > 0 else 0 - progress_total_duration = sum([segment['end'] - segment['start'] for segment in merged]) - - # For each time segment, run whisper - for segment in merged: - segment_index += 1 - segment_start = segment['start'] - segment_end = segment['end'] - segment_expand_amount = segment.get('expand_amount', 0) - segment_gap = segment.get('gap', False) - - segment_duration = segment_end - segment_start - - if segment_duration < MIN_SEGMENT_DURATION: - continue - - # Audio to run on Whisper - segment_audio = self.get_audio_segment(audio, start_time = str(segment_start), duration = str(segment_duration)) - # Previous segments to use as a prompt - segment_prompt = ' '.join([segment['text'] for segment in prompt_window]) if len(prompt_window) > 0 else None - - # Detected language - detected_language = languageCounter.most_common(1)[0][0] if len(languageCounter) > 0 else None - - print("Running whisper from ", format_timestamp(segment_start), " to ", format_timestamp(segment_end), ", duration: ", - segment_duration, "expanded: ", segment_expand_amount, "prompt: ", segment_prompt, "language: ", detected_language) - - perf_start_time = time.perf_counter() - - scaled_progress_listener = SubTaskProgressListener(progressListener, base_task_total=progress_total_duration, - sub_task_start=segment_start - progress_start_offset, sub_task_total=segment_duration) - segment_result = whisperCallable.invoke(segment_audio, segment_index, segment_prompt, detected_language, progress_listener=scaled_progress_listener) - - perf_end_time = time.perf_counter() - print("Whisper took {} seconds".format(perf_end_time - perf_start_time)) - - adjusted_segments = self.adjust_timestamp(segment_result["segments"], adjust_seconds=segment_start, max_source_time=segment_duration) - - # Propagate expand amount to the segments - if (segment_expand_amount > 0): - segment_without_expansion = segment_duration - segment_expand_amount - - for adjusted_segment in adjusted_segments: - adjusted_segment_end = adjusted_segment['end'] - - # Add expand amount if the segment got expanded - if (adjusted_segment_end > segment_without_expansion): - adjusted_segment["expand_amount"] = adjusted_segment_end - segment_without_expansion - - # Append to output - result['text'] += segment_result['text'] - result['segments'].extend(adjusted_segments) - - # Increment detected language - if not segment_gap: - languageCounter[segment_result['language']] += 1 - - # Update prompt window - self.__update_prompt_window(prompt_window, adjusted_segments, segment_end, segment_gap, config) - - if detected_language is not None: - result['language'] = detected_language - finally: - # Notify progress listener that we are done - if progressListener is not None: - progressListener.on_finished() - return result - - def get_audio_duration(self, audio: str, config: TranscriptionConfig): - return get_audio_duration(audio) - - def __update_prompt_window(self, prompt_window: Deque, adjusted_segments: List, segment_end: float, segment_gap: bool, config: TranscriptionConfig): - if (config.max_prompt_window is not None and config.max_prompt_window > 0): - # Add segments to the current prompt window (unless it is a speech gap) - if not segment_gap: - for segment in adjusted_segments: - if segment.get('no_speech_prob', 0) <= PROMPT_NO_SPEECH_PROB: - prompt_window.append(segment) - - while (len(prompt_window) > 0): - first_end_time = prompt_window[0].get('end', 0) - # Time expanded in the segments should be discounted from the prompt window - first_expand_time = prompt_window[0].get('expand_amount', 0) - - if (first_end_time - first_expand_time < segment_end - config.max_prompt_window): - prompt_window.popleft() - else: - break - - def include_gaps(self, segments: Iterator[dict], min_gap_length: float, total_duration: float): - result = [] - last_end_time = 0 - - for segment in segments: - segment_start = float(segment['start']) - segment_end = float(segment['end']) - - if (last_end_time != segment_start): - delta = segment_start - last_end_time - - if (min_gap_length is None or delta >= min_gap_length): - result.append( { 'start': last_end_time, 'end': segment_start, 'gap': True } ) - - last_end_time = segment_end - result.append(segment) - - # Also include total duration if specified - if (total_duration is not None and last_end_time < total_duration): - delta = total_duration - segment_start - - if (min_gap_length is None or delta >= min_gap_length): - result.append( { 'start': last_end_time, 'end': total_duration, 'gap': True } ) - - return result - - # Expand the end time of each segment to the start of the next segment - def expand_gaps(self, segments: List[Dict[str, Any]], total_duration: float): - result = [] - - if len(segments) == 0: - return result - - # Add gap at the beginning if needed - if (segments[0]['start'] > 0): - result.append({ 'start': 0, 'end': segments[0]['start'], 'gap': True } ) - - for i in range(len(segments) - 1): - current_segment = segments[i] - next_segment = segments[i + 1] - - delta = next_segment['start'] - current_segment['end'] - - # Expand if the gap actually exists - if (delta >= 0): - current_segment = current_segment.copy() - current_segment['expand_amount'] = delta - current_segment['end'] = next_segment['start'] - - result.append(current_segment) - - # Add last segment - last_segment = segments[-1] - result.append(last_segment) - - # Also include total duration if specified - if (total_duration is not None): - last_segment = result[-1] - - if (last_segment['end'] < total_duration): - last_segment = last_segment.copy() - last_segment['end'] = total_duration - result[-1] = last_segment - - return result - - def fill_gaps(self, segments: List[Dict[str, Any]], total_duration: float, max_expand_size: float = None): - result = [] - - if len(segments) == 0: - return result - - # Add gap at the beginning if needed - if (segments[0]['start'] > 0): - result.append({ 'start': 0, 'end': segments[0]['start'], 'gap': True } ) - - for i in range(len(segments) - 1): - expanded = False - current_segment = segments[i] - next_segment = segments[i + 1] - - delta = next_segment['start'] - current_segment['end'] - - if (max_expand_size is not None and delta <= max_expand_size): - # Just expand the current segment - current_segment = current_segment.copy() - current_segment['expand_amount'] = delta - current_segment['end'] = next_segment['start'] - expanded = True - - result.append(current_segment) - - # Add a gap to the next segment if needed - if (delta >= 0 and not expanded): - result.append({ 'start': current_segment['end'], 'end': next_segment['start'], 'gap': True } ) - - # Add last segment - last_segment = segments[-1] - result.append(last_segment) - - # Also include total duration if specified - if (total_duration is not None): - last_segment = result[-1] - - delta = total_duration - last_segment['end'] - - if (delta > 0): - if (max_expand_size is not None and delta <= max_expand_size): - # Expand the last segment - last_segment = last_segment.copy() - last_segment['expand_amount'] = delta - last_segment['end'] = total_duration - result[-1] = last_segment - else: - result.append({ 'start': last_segment['end'], 'end': total_duration, 'gap': True } ) - - return result - - def adjust_timestamp(self, segments: Iterator[dict], adjust_seconds: float, max_source_time: float = None): - result = [] - - for segment in segments: - segment_start = float(segment['start']) - segment_end = float(segment['end']) - - # Filter segments? - if (max_source_time is not None): - if (segment_start > max_source_time): - continue - segment_end = min(max_source_time, segment_end) - - new_segment = segment.copy() - - # Add to start and end - new_segment['start'] = segment_start + adjust_seconds - new_segment['end'] = segment_end + adjust_seconds - - # Handle words - if ('words' in new_segment): - for word in new_segment['words']: - # Adjust start and end - word['start'] = word['start'] + adjust_seconds - word['end'] = word['end'] + adjust_seconds - - result.append(new_segment) - return result - - def multiply_timestamps(self, timestamps: List[Dict[str, Any]], factor: float): - result = [] - - for entry in timestamps: - start = entry['start'] - end = entry['end'] - - result.append({ - 'start': start * factor, - 'end': end * factor - }) - return result - - -class VadSileroTranscription(AbstractTranscription): - def __init__(self, sampling_rate: int = 16000, cache: ModelCache = None): - super().__init__(sampling_rate=sampling_rate) - self.model = None - self.cache = cache - self._initialize_model() - - def _initialize_model(self): - if (self.cache is not None): - model_key = "VadSileroTranscription" - self.model, self.get_speech_timestamps = self.cache.get(model_key, self._create_model) - print("Loaded Silerio model from cache.") - else: - self.model, self.get_speech_timestamps = self._create_model() - print("Created Silerio model") - - def _create_model(self): - model, utils = torch.hub.load(repo_or_dir='snakers4/silero-vad', model='silero_vad') - - # Silero does not benefit from multi-threading - torch.set_num_threads(1) # JIT - (get_speech_timestamps, _, _, _, _) = utils - - return model, get_speech_timestamps - - def get_transcribe_timestamps(self, audio: str, config: TranscriptionConfig, start_time: float, end_time: float): - result = [] - - print("Getting timestamps from audio file: {}, start: {}, duration: {}".format(audio, start_time, end_time)) - perf_start_time = time.perf_counter() - - # Divide procesisng of audio into chunks - chunk_start = start_time - - while (chunk_start < end_time): - chunk_duration = min(end_time - chunk_start, VAD_MAX_PROCESSING_CHUNK) - - print("Processing VAD in chunk from {} to {}".format(format_timestamp(chunk_start), format_timestamp(chunk_start + chunk_duration))) - wav = self.get_audio_segment(audio, str(chunk_start), str(chunk_duration)) - - sample_timestamps = self.get_speech_timestamps(wav, self.model, sampling_rate=self.sampling_rate, threshold=SPEECH_TRESHOLD) - seconds_timestamps = self.multiply_timestamps(sample_timestamps, factor=1 / self.sampling_rate) - adjusted = self.adjust_timestamp(seconds_timestamps, adjust_seconds=chunk_start, max_source_time=chunk_start + chunk_duration) - - #pprint(adjusted) - - result.extend(adjusted) - chunk_start += chunk_duration - - perf_end_time = time.perf_counter() - print("VAD processing took {} seconds".format(perf_end_time - perf_start_time)) - - return result - - def __getstate__(self): - # We only need the sampling rate - return { 'sampling_rate': self.sampling_rate } - - def __setstate__(self, state): - self.sampling_rate = state['sampling_rate'] - self.model = None - # Use the global cache - self.cache = GLOBAL_MODEL_CACHE - self._initialize_model() - -# A very simple VAD that just marks every N seconds as speech -class VadPeriodicTranscription(AbstractTranscription): - def __init__(self, sampling_rate: int = 16000): - super().__init__(sampling_rate=sampling_rate) - - def is_transcribe_timestamps_fast(self): - # This is a very fast VAD - no need to parallelize it - return True - - def get_transcribe_timestamps(self, audio: str, config: PeriodicTranscriptionConfig, start_time: float, end_time: float): - result = [] - - # Generate a timestamp every N seconds - start_timestamp = start_time - - while (start_timestamp < end_time): - end_timestamp = min(start_timestamp + config.periodic_duration, end_time) - segment_duration = end_timestamp - start_timestamp - - # Minimum duration is 1 second - if (segment_duration >= 1): - result.append( { 'start': start_timestamp, 'end': end_timestamp } ) - - start_timestamp = end_timestamp - - return result - -def get_audio_duration(file: str): - return float(ffmpeg.probe(file)["format"]["duration"]) - -def load_audio(file: str, sample_rate: int = 16000, - start_time: str = None, duration: str = None): - """ - Open an audio file and read as mono waveform, resampling as necessary - - Parameters - ---------- - file: str - The audio file to open - - sr: int - The sample rate to resample the audio if necessary - - start_time: str - The start time, using the standard FFMPEG time duration syntax, or None to disable. - - duration: str - The duration, using the standard FFMPEG time duration syntax, or None to disable. - - Returns - ------- - A NumPy array containing the audio waveform, in float32 dtype. - """ - try: - inputArgs = {'threads': 0} - - if (start_time is not None): - inputArgs['ss'] = start_time - if (duration is not None): - inputArgs['t'] = duration - - # This launches a subprocess to decode audio while down-mixing and resampling as necessary. - # Requires the ffmpeg CLI and `ffmpeg-python` package to be installed. - out, _ = ( - ffmpeg.input(file, **inputArgs) - .output("-", format="s16le", acodec="pcm_s16le", ac=1, ar=sample_rate) - .run(cmd="ffmpeg", capture_stdout=True, capture_stderr=True) - ) - except ffmpeg.Error as e: - raise RuntimeError(f"Failed to load audio: {e.stderr.decode()}") - - return np.frombuffer(out, np.int16).flatten().astype(np.float32) / 32768.0 \ No newline at end of file diff --git a/spaces/HighCWu/Style2Paints-4.5-Gradio/README.md b/spaces/HighCWu/Style2Paints-4.5-Gradio/README.md deleted file mode 100644 index 1b09bdd5dd8677cec3e7a5ce71b4a0efa114e815..0000000000000000000000000000000000000000 --- a/spaces/HighCWu/Style2Paints-4.5-Gradio/README.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Style2Paints 4.5 Gradio -emoji: 🐨 -colorFrom: indigo -colorTo: yellow -sdk: gradio -sdk_version: 3.27.0 -app_file: app.py -pinned: false -license: apache-2.0 -python_version: 3.8 ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/ICML2022/OFA/fairseq/fairseq/distributed/fully_sharded_data_parallel.py b/spaces/ICML2022/OFA/fairseq/fairseq/distributed/fully_sharded_data_parallel.py deleted file mode 100644 index 8a96bfc76516682ac8e2b7e2c3bc2e6aa3d8ef0c..0000000000000000000000000000000000000000 --- a/spaces/ICML2022/OFA/fairseq/fairseq/distributed/fully_sharded_data_parallel.py +++ /dev/null @@ -1,135 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -import contextlib -from typing import Optional - -import torch -from fairseq.dataclass.configs import DistributedTrainingConfig -from fairseq.distributed import utils as dist_utils - - -try: - from fairscale.nn.data_parallel import FullyShardedDataParallel as FSDP - - has_FSDP = True -except ImportError: - FSDP = torch.nn.Module - has_FSDP = False - - -class FullyShardedDataParallel(FSDP): - """ - A small wrapper around fairscale's FullyShardedDataParallel (FSDP) with some - fairseq-specific checkpoint saving/loading logic. - - Args: - use_sharded_state (bool): if True, then ``state_dict`` will return - ``FSDP.local_state_dict`` and ``load_state_dict`` will call - ``FSDP.load_local_state_dict``. Otherwise, ``state_dict`` will - return the full model weights on data parallel rank 0 (empty on - other ranks) and ``load_state_dict`` will broadcast model weights - from rank 0 to other ranks. - """ - - def __init__(self, *args, use_sharded_state: bool = False, **kwargs): - if not has_FSDP: - raise ImportError( - "Cannot find FullyShardedDataParallel. " - "Please install fairscale with: pip install fairscale" - ) - super().__init__(*args, **kwargs) - self.use_sharded_state = use_sharded_state - - @property - def unwrapped_module(self) -> torch.nn.Module: - if self.flatten_parameters: - return self.module.module - else: - return self.module - - def state_dict(self, destination=None, prefix="", keep_vars=False): - if self.use_sharded_state: - return super().local_state_dict( - destination=destination, prefix=prefix, keep_vars=keep_vars - ) - else: - if self.rank == 0: - return super().state_dict( - destination=destination, prefix=prefix, keep_vars=keep_vars - ) - else: - # We must call state_dict() due to use of communication - # primitives. But we don't use the result. - super().state_dict() - return destination or {} - - def load_state_dict(self, state_dict, strict=True, model_cfg=None): - if self.use_sharded_state: - return super().load_local_state_dict(state_dict, strict=strict) - else: - state_dict = dist_utils.broadcast_object( - state_dict, src_rank=0, group=self.process_group - ) - return super().load_state_dict(state_dict, strict=strict) - - -@contextlib.contextmanager -def fsdp_enable_wrap(cfg: DistributedTrainingConfig): - try: - from fairscale.nn import enable_wrap - except ImportError: - raise ImportError( - "Cannot find FullyShardedDataParallel. " - "Please install fairscale with: pip install fairscale" - ) - if cfg.memory_efficient_fp16: - assert cfg.fp16 # memory_efficient_fp16 should imply fp16 - group = dist_utils.get_data_parallel_group() - if group is None and cfg.distributed_world_size == 1: - from fairscale.utils.testing import DummyProcessGroup - - group = DummyProcessGroup(rank=0, size=1) - fsdp_config = { - "process_group": group, - "reshard_after_forward": not cfg.no_reshard_after_forward, - "mixed_precision": cfg.fp16 and not cfg.memory_efficient_fp16, - "fp32_reduce_scatter": cfg.fp32_reduce_scatter, - "flatten_parameters": True, - "cpu_offload": cfg.cpu_offload, - "compute_dtype": torch.float16 if cfg.fp16 else torch.float32, - "bucket_cap_mb": cfg.bucket_cap_mb, - "state_dict_device": torch.device("cpu"), # reduce GPU mem usage - } - with enable_wrap( - wrapper_cls=FullyShardedDataParallel, - use_sharded_state=cfg.use_sharded_state, - **fsdp_config, - ): - yield - - -def fsdp_wrap(module, min_num_params: Optional[int] = None, **kwargs): - """ - Helper to wrap layers/modules in FSDP. This falls back to a no-op if - fairscale is not available. - - Args: - module (nn.Module): module to (maybe) wrap - min_num_params (int, Optional): minimum number of layer params to wrap - """ - try: - from fairscale.nn import wrap - - if min_num_params is not None: - num_params = sum(p.numel() for p in module.parameters()) - if num_params >= min_num_params: - return wrap(module, **kwargs) - else: - return module - else: - return wrap(module, **kwargs) - except ImportError: - return module diff --git a/spaces/Iceclear/StableSR/StableSR/basicsr/archs/basicvsrpp_arch.py b/spaces/Iceclear/StableSR/StableSR/basicsr/archs/basicvsrpp_arch.py deleted file mode 100644 index 2a9952e4b441de0030d665a3db141774184f332f..0000000000000000000000000000000000000000 --- a/spaces/Iceclear/StableSR/StableSR/basicsr/archs/basicvsrpp_arch.py +++ /dev/null @@ -1,417 +0,0 @@ -import torch -import torch.nn as nn -import torch.nn.functional as F -import torchvision -import warnings - -from basicsr.archs.arch_util import flow_warp -from basicsr.archs.basicvsr_arch import ConvResidualBlocks -from basicsr.archs.spynet_arch import SpyNet -from basicsr.ops.dcn import ModulatedDeformConvPack -from basicsr.utils.registry import ARCH_REGISTRY - - -@ARCH_REGISTRY.register() -class BasicVSRPlusPlus(nn.Module): - """BasicVSR++ network structure. - - Support either x4 upsampling or same size output. Since DCN is used in this - model, it can only be used with CUDA enabled. If CUDA is not enabled, - feature alignment will be skipped. Besides, we adopt the official DCN - implementation and the version of torch need to be higher than 1.9. - - ``Paper: BasicVSR++: Improving Video Super-Resolution with Enhanced Propagation and Alignment`` - - Args: - mid_channels (int, optional): Channel number of the intermediate - features. Default: 64. - num_blocks (int, optional): The number of residual blocks in each - propagation branch. Default: 7. - max_residue_magnitude (int): The maximum magnitude of the offset - residue (Eq. 6 in paper). Default: 10. - is_low_res_input (bool, optional): Whether the input is low-resolution - or not. If False, the output resolution is equal to the input - resolution. Default: True. - spynet_path (str): Path to the pretrained weights of SPyNet. Default: None. - cpu_cache_length (int, optional): When the length of sequence is larger - than this value, the intermediate features are sent to CPU. This - saves GPU memory, but slows down the inference speed. You can - increase this number if you have a GPU with large memory. - Default: 100. - """ - - def __init__(self, - mid_channels=64, - num_blocks=7, - max_residue_magnitude=10, - is_low_res_input=True, - spynet_path=None, - cpu_cache_length=100): - - super().__init__() - self.mid_channels = mid_channels - self.is_low_res_input = is_low_res_input - self.cpu_cache_length = cpu_cache_length - - # optical flow - self.spynet = SpyNet(spynet_path) - - # feature extraction module - if is_low_res_input: - self.feat_extract = ConvResidualBlocks(3, mid_channels, 5) - else: - self.feat_extract = nn.Sequential( - nn.Conv2d(3, mid_channels, 3, 2, 1), nn.LeakyReLU(negative_slope=0.1, inplace=True), - nn.Conv2d(mid_channels, mid_channels, 3, 2, 1), nn.LeakyReLU(negative_slope=0.1, inplace=True), - ConvResidualBlocks(mid_channels, mid_channels, 5)) - - # propagation branches - self.deform_align = nn.ModuleDict() - self.backbone = nn.ModuleDict() - modules = ['backward_1', 'forward_1', 'backward_2', 'forward_2'] - for i, module in enumerate(modules): - if torch.cuda.is_available(): - self.deform_align[module] = SecondOrderDeformableAlignment( - 2 * mid_channels, - mid_channels, - 3, - padding=1, - deformable_groups=16, - max_residue_magnitude=max_residue_magnitude) - self.backbone[module] = ConvResidualBlocks((2 + i) * mid_channels, mid_channels, num_blocks) - - # upsampling module - self.reconstruction = ConvResidualBlocks(5 * mid_channels, mid_channels, 5) - - self.upconv1 = nn.Conv2d(mid_channels, mid_channels * 4, 3, 1, 1, bias=True) - self.upconv2 = nn.Conv2d(mid_channels, 64 * 4, 3, 1, 1, bias=True) - - self.pixel_shuffle = nn.PixelShuffle(2) - - self.conv_hr = nn.Conv2d(64, 64, 3, 1, 1) - self.conv_last = nn.Conv2d(64, 3, 3, 1, 1) - self.img_upsample = nn.Upsample(scale_factor=4, mode='bilinear', align_corners=False) - - # activation function - self.lrelu = nn.LeakyReLU(negative_slope=0.1, inplace=True) - - # check if the sequence is augmented by flipping - self.is_mirror_extended = False - - if len(self.deform_align) > 0: - self.is_with_alignment = True - else: - self.is_with_alignment = False - warnings.warn('Deformable alignment module is not added. ' - 'Probably your CUDA is not configured correctly. DCN can only ' - 'be used with CUDA enabled. Alignment is skipped now.') - - def check_if_mirror_extended(self, lqs): - """Check whether the input is a mirror-extended sequence. - - If mirror-extended, the i-th (i=0, ..., t-1) frame is equal to the (t-1-i)-th frame. - - Args: - lqs (tensor): Input low quality (LQ) sequence with shape (n, t, c, h, w). - """ - - if lqs.size(1) % 2 == 0: - lqs_1, lqs_2 = torch.chunk(lqs, 2, dim=1) - if torch.norm(lqs_1 - lqs_2.flip(1)) == 0: - self.is_mirror_extended = True - - def compute_flow(self, lqs): - """Compute optical flow using SPyNet for feature alignment. - - Note that if the input is an mirror-extended sequence, 'flows_forward' - is not needed, since it is equal to 'flows_backward.flip(1)'. - - Args: - lqs (tensor): Input low quality (LQ) sequence with - shape (n, t, c, h, w). - - Return: - tuple(Tensor): Optical flow. 'flows_forward' corresponds to the flows used for forward-time propagation \ - (current to previous). 'flows_backward' corresponds to the flows used for backward-time \ - propagation (current to next). - """ - - n, t, c, h, w = lqs.size() - lqs_1 = lqs[:, :-1, :, :, :].reshape(-1, c, h, w) - lqs_2 = lqs[:, 1:, :, :, :].reshape(-1, c, h, w) - - flows_backward = self.spynet(lqs_1, lqs_2).view(n, t - 1, 2, h, w) - - if self.is_mirror_extended: # flows_forward = flows_backward.flip(1) - flows_forward = flows_backward.flip(1) - else: - flows_forward = self.spynet(lqs_2, lqs_1).view(n, t - 1, 2, h, w) - - if self.cpu_cache: - flows_backward = flows_backward.cpu() - flows_forward = flows_forward.cpu() - - return flows_forward, flows_backward - - def propagate(self, feats, flows, module_name): - """Propagate the latent features throughout the sequence. - - Args: - feats dict(list[tensor]): Features from previous branches. Each - component is a list of tensors with shape (n, c, h, w). - flows (tensor): Optical flows with shape (n, t - 1, 2, h, w). - module_name (str): The name of the propgation branches. Can either - be 'backward_1', 'forward_1', 'backward_2', 'forward_2'. - - Return: - dict(list[tensor]): A dictionary containing all the propagated \ - features. Each key in the dictionary corresponds to a \ - propagation branch, which is represented by a list of tensors. - """ - - n, t, _, h, w = flows.size() - - frame_idx = range(0, t + 1) - flow_idx = range(-1, t) - mapping_idx = list(range(0, len(feats['spatial']))) - mapping_idx += mapping_idx[::-1] - - if 'backward' in module_name: - frame_idx = frame_idx[::-1] - flow_idx = frame_idx - - feat_prop = flows.new_zeros(n, self.mid_channels, h, w) - for i, idx in enumerate(frame_idx): - feat_current = feats['spatial'][mapping_idx[idx]] - if self.cpu_cache: - feat_current = feat_current.cuda() - feat_prop = feat_prop.cuda() - # second-order deformable alignment - if i > 0 and self.is_with_alignment: - flow_n1 = flows[:, flow_idx[i], :, :, :] - if self.cpu_cache: - flow_n1 = flow_n1.cuda() - - cond_n1 = flow_warp(feat_prop, flow_n1.permute(0, 2, 3, 1)) - - # initialize second-order features - feat_n2 = torch.zeros_like(feat_prop) - flow_n2 = torch.zeros_like(flow_n1) - cond_n2 = torch.zeros_like(cond_n1) - - if i > 1: # second-order features - feat_n2 = feats[module_name][-2] - if self.cpu_cache: - feat_n2 = feat_n2.cuda() - - flow_n2 = flows[:, flow_idx[i - 1], :, :, :] - if self.cpu_cache: - flow_n2 = flow_n2.cuda() - - flow_n2 = flow_n1 + flow_warp(flow_n2, flow_n1.permute(0, 2, 3, 1)) - cond_n2 = flow_warp(feat_n2, flow_n2.permute(0, 2, 3, 1)) - - # flow-guided deformable convolution - cond = torch.cat([cond_n1, feat_current, cond_n2], dim=1) - feat_prop = torch.cat([feat_prop, feat_n2], dim=1) - feat_prop = self.deform_align[module_name](feat_prop, cond, flow_n1, flow_n2) - - # concatenate and residual blocks - feat = [feat_current] + [feats[k][idx] for k in feats if k not in ['spatial', module_name]] + [feat_prop] - if self.cpu_cache: - feat = [f.cuda() for f in feat] - - feat = torch.cat(feat, dim=1) - feat_prop = feat_prop + self.backbone[module_name](feat) - feats[module_name].append(feat_prop) - - if self.cpu_cache: - feats[module_name][-1] = feats[module_name][-1].cpu() - torch.cuda.empty_cache() - - if 'backward' in module_name: - feats[module_name] = feats[module_name][::-1] - - return feats - - def upsample(self, lqs, feats): - """Compute the output image given the features. - - Args: - lqs (tensor): Input low quality (LQ) sequence with - shape (n, t, c, h, w). - feats (dict): The features from the propagation branches. - - Returns: - Tensor: Output HR sequence with shape (n, t, c, 4h, 4w). - """ - - outputs = [] - num_outputs = len(feats['spatial']) - - mapping_idx = list(range(0, num_outputs)) - mapping_idx += mapping_idx[::-1] - - for i in range(0, lqs.size(1)): - hr = [feats[k].pop(0) for k in feats if k != 'spatial'] - hr.insert(0, feats['spatial'][mapping_idx[i]]) - hr = torch.cat(hr, dim=1) - if self.cpu_cache: - hr = hr.cuda() - - hr = self.reconstruction(hr) - hr = self.lrelu(self.pixel_shuffle(self.upconv1(hr))) - hr = self.lrelu(self.pixel_shuffle(self.upconv2(hr))) - hr = self.lrelu(self.conv_hr(hr)) - hr = self.conv_last(hr) - if self.is_low_res_input: - hr += self.img_upsample(lqs[:, i, :, :, :]) - else: - hr += lqs[:, i, :, :, :] - - if self.cpu_cache: - hr = hr.cpu() - torch.cuda.empty_cache() - - outputs.append(hr) - - return torch.stack(outputs, dim=1) - - def forward(self, lqs): - """Forward function for BasicVSR++. - - Args: - lqs (tensor): Input low quality (LQ) sequence with - shape (n, t, c, h, w). - - Returns: - Tensor: Output HR sequence with shape (n, t, c, 4h, 4w). - """ - - n, t, c, h, w = lqs.size() - - # whether to cache the features in CPU - self.cpu_cache = True if t > self.cpu_cache_length else False - - if self.is_low_res_input: - lqs_downsample = lqs.clone() - else: - lqs_downsample = F.interpolate( - lqs.view(-1, c, h, w), scale_factor=0.25, mode='bicubic').view(n, t, c, h // 4, w // 4) - - # check whether the input is an extended sequence - self.check_if_mirror_extended(lqs) - - feats = {} - # compute spatial features - if self.cpu_cache: - feats['spatial'] = [] - for i in range(0, t): - feat = self.feat_extract(lqs[:, i, :, :, :]).cpu() - feats['spatial'].append(feat) - torch.cuda.empty_cache() - else: - feats_ = self.feat_extract(lqs.view(-1, c, h, w)) - h, w = feats_.shape[2:] - feats_ = feats_.view(n, t, -1, h, w) - feats['spatial'] = [feats_[:, i, :, :, :] for i in range(0, t)] - - # compute optical flow using the low-res inputs - assert lqs_downsample.size(3) >= 64 and lqs_downsample.size(4) >= 64, ( - 'The height and width of low-res inputs must be at least 64, ' - f'but got {h} and {w}.') - flows_forward, flows_backward = self.compute_flow(lqs_downsample) - - # feature propgation - for iter_ in [1, 2]: - for direction in ['backward', 'forward']: - module = f'{direction}_{iter_}' - - feats[module] = [] - - if direction == 'backward': - flows = flows_backward - elif flows_forward is not None: - flows = flows_forward - else: - flows = flows_backward.flip(1) - - feats = self.propagate(feats, flows, module) - if self.cpu_cache: - del flows - torch.cuda.empty_cache() - - return self.upsample(lqs, feats) - - -class SecondOrderDeformableAlignment(ModulatedDeformConvPack): - """Second-order deformable alignment module. - - Args: - in_channels (int): Same as nn.Conv2d. - out_channels (int): Same as nn.Conv2d. - kernel_size (int or tuple[int]): Same as nn.Conv2d. - stride (int or tuple[int]): Same as nn.Conv2d. - padding (int or tuple[int]): Same as nn.Conv2d. - dilation (int or tuple[int]): Same as nn.Conv2d. - groups (int): Same as nn.Conv2d. - bias (bool or str): If specified as `auto`, it will be decided by the - norm_cfg. Bias will be set as True if norm_cfg is None, otherwise - False. - max_residue_magnitude (int): The maximum magnitude of the offset - residue (Eq. 6 in paper). Default: 10. - """ - - def __init__(self, *args, **kwargs): - self.max_residue_magnitude = kwargs.pop('max_residue_magnitude', 10) - - super(SecondOrderDeformableAlignment, self).__init__(*args, **kwargs) - - self.conv_offset = nn.Sequential( - nn.Conv2d(3 * self.out_channels + 4, self.out_channels, 3, 1, 1), - nn.LeakyReLU(negative_slope=0.1, inplace=True), - nn.Conv2d(self.out_channels, self.out_channels, 3, 1, 1), - nn.LeakyReLU(negative_slope=0.1, inplace=True), - nn.Conv2d(self.out_channels, self.out_channels, 3, 1, 1), - nn.LeakyReLU(negative_slope=0.1, inplace=True), - nn.Conv2d(self.out_channels, 27 * self.deformable_groups, 3, 1, 1), - ) - - self.init_offset() - - def init_offset(self): - - def _constant_init(module, val, bias=0): - if hasattr(module, 'weight') and module.weight is not None: - nn.init.constant_(module.weight, val) - if hasattr(module, 'bias') and module.bias is not None: - nn.init.constant_(module.bias, bias) - - _constant_init(self.conv_offset[-1], val=0, bias=0) - - def forward(self, x, extra_feat, flow_1, flow_2): - extra_feat = torch.cat([extra_feat, flow_1, flow_2], dim=1) - out = self.conv_offset(extra_feat) - o1, o2, mask = torch.chunk(out, 3, dim=1) - - # offset - offset = self.max_residue_magnitude * torch.tanh(torch.cat((o1, o2), dim=1)) - offset_1, offset_2 = torch.chunk(offset, 2, dim=1) - offset_1 = offset_1 + flow_1.flip(1).repeat(1, offset_1.size(1) // 2, 1, 1) - offset_2 = offset_2 + flow_2.flip(1).repeat(1, offset_2.size(1) // 2, 1, 1) - offset = torch.cat([offset_1, offset_2], dim=1) - - # mask - mask = torch.sigmoid(mask) - - return torchvision.ops.deform_conv2d(x, offset, self.weight, self.bias, self.stride, self.padding, - self.dilation, mask) - - -# if __name__ == '__main__': -# spynet_path = 'experiments/pretrained_models/flownet/spynet_sintel_final-3d2a1287.pth' -# model = BasicVSRPlusPlus(spynet_path=spynet_path).cuda() -# input = torch.rand(1, 2, 3, 64, 64).cuda() -# output = model(input) -# print('===================') -# print(output.shape) diff --git a/spaces/Ikaros521/so-vits-svc-4.0-ikaros2/modules/attentions.py b/spaces/Ikaros521/so-vits-svc-4.0-ikaros2/modules/attentions.py deleted file mode 100644 index f9c11ca4a3acb86bf1abc04d9dcfa82a4ed4061f..0000000000000000000000000000000000000000 --- a/spaces/Ikaros521/so-vits-svc-4.0-ikaros2/modules/attentions.py +++ /dev/null @@ -1,349 +0,0 @@ -import copy -import math -import numpy as np -import torch -from torch import nn -from torch.nn import functional as F - -import modules.commons as commons -import modules.modules as modules -from modules.modules import LayerNorm - - -class FFT(nn.Module): - def __init__(self, hidden_channels, filter_channels, n_heads, n_layers=1, kernel_size=1, p_dropout=0., - proximal_bias=False, proximal_init=True, **kwargs): - super().__init__() - self.hidden_channels = hidden_channels - self.filter_channels = filter_channels - self.n_heads = n_heads - self.n_layers = n_layers - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.proximal_bias = proximal_bias - self.proximal_init = proximal_init - - self.drop = nn.Dropout(p_dropout) - self.self_attn_layers = nn.ModuleList() - self.norm_layers_0 = nn.ModuleList() - self.ffn_layers = nn.ModuleList() - self.norm_layers_1 = nn.ModuleList() - for i in range(self.n_layers): - self.self_attn_layers.append( - MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout, proximal_bias=proximal_bias, - proximal_init=proximal_init)) - self.norm_layers_0.append(LayerNorm(hidden_channels)) - self.ffn_layers.append( - FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout, causal=True)) - self.norm_layers_1.append(LayerNorm(hidden_channels)) - - def forward(self, x, x_mask): - """ - x: decoder input - h: encoder output - """ - self_attn_mask = commons.subsequent_mask(x_mask.size(2)).to(device=x.device, dtype=x.dtype) - x = x * x_mask - for i in range(self.n_layers): - y = self.self_attn_layers[i](x, x, self_attn_mask) - y = self.drop(y) - x = self.norm_layers_0[i](x + y) - - y = self.ffn_layers[i](x, x_mask) - y = self.drop(y) - x = self.norm_layers_1[i](x + y) - x = x * x_mask - return x - - -class Encoder(nn.Module): - def __init__(self, hidden_channels, filter_channels, n_heads, n_layers, kernel_size=1, p_dropout=0., window_size=4, **kwargs): - super().__init__() - self.hidden_channels = hidden_channels - self.filter_channels = filter_channels - self.n_heads = n_heads - self.n_layers = n_layers - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.window_size = window_size - - self.drop = nn.Dropout(p_dropout) - self.attn_layers = nn.ModuleList() - self.norm_layers_1 = nn.ModuleList() - self.ffn_layers = nn.ModuleList() - self.norm_layers_2 = nn.ModuleList() - for i in range(self.n_layers): - self.attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout, window_size=window_size)) - self.norm_layers_1.append(LayerNorm(hidden_channels)) - self.ffn_layers.append(FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout)) - self.norm_layers_2.append(LayerNorm(hidden_channels)) - - def forward(self, x, x_mask): - attn_mask = x_mask.unsqueeze(2) * x_mask.unsqueeze(-1) - x = x * x_mask - for i in range(self.n_layers): - y = self.attn_layers[i](x, x, attn_mask) - y = self.drop(y) - x = self.norm_layers_1[i](x + y) - - y = self.ffn_layers[i](x, x_mask) - y = self.drop(y) - x = self.norm_layers_2[i](x + y) - x = x * x_mask - return x - - -class Decoder(nn.Module): - def __init__(self, hidden_channels, filter_channels, n_heads, n_layers, kernel_size=1, p_dropout=0., proximal_bias=False, proximal_init=True, **kwargs): - super().__init__() - self.hidden_channels = hidden_channels - self.filter_channels = filter_channels - self.n_heads = n_heads - self.n_layers = n_layers - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.proximal_bias = proximal_bias - self.proximal_init = proximal_init - - self.drop = nn.Dropout(p_dropout) - self.self_attn_layers = nn.ModuleList() - self.norm_layers_0 = nn.ModuleList() - self.encdec_attn_layers = nn.ModuleList() - self.norm_layers_1 = nn.ModuleList() - self.ffn_layers = nn.ModuleList() - self.norm_layers_2 = nn.ModuleList() - for i in range(self.n_layers): - self.self_attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout, proximal_bias=proximal_bias, proximal_init=proximal_init)) - self.norm_layers_0.append(LayerNorm(hidden_channels)) - self.encdec_attn_layers.append(MultiHeadAttention(hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout)) - self.norm_layers_1.append(LayerNorm(hidden_channels)) - self.ffn_layers.append(FFN(hidden_channels, hidden_channels, filter_channels, kernel_size, p_dropout=p_dropout, causal=True)) - self.norm_layers_2.append(LayerNorm(hidden_channels)) - - def forward(self, x, x_mask, h, h_mask): - """ - x: decoder input - h: encoder output - """ - self_attn_mask = commons.subsequent_mask(x_mask.size(2)).to(device=x.device, dtype=x.dtype) - encdec_attn_mask = h_mask.unsqueeze(2) * x_mask.unsqueeze(-1) - x = x * x_mask - for i in range(self.n_layers): - y = self.self_attn_layers[i](x, x, self_attn_mask) - y = self.drop(y) - x = self.norm_layers_0[i](x + y) - - y = self.encdec_attn_layers[i](x, h, encdec_attn_mask) - y = self.drop(y) - x = self.norm_layers_1[i](x + y) - - y = self.ffn_layers[i](x, x_mask) - y = self.drop(y) - x = self.norm_layers_2[i](x + y) - x = x * x_mask - return x - - -class MultiHeadAttention(nn.Module): - def __init__(self, channels, out_channels, n_heads, p_dropout=0., window_size=None, heads_share=True, block_length=None, proximal_bias=False, proximal_init=False): - super().__init__() - assert channels % n_heads == 0 - - self.channels = channels - self.out_channels = out_channels - self.n_heads = n_heads - self.p_dropout = p_dropout - self.window_size = window_size - self.heads_share = heads_share - self.block_length = block_length - self.proximal_bias = proximal_bias - self.proximal_init = proximal_init - self.attn = None - - self.k_channels = channels // n_heads - self.conv_q = nn.Conv1d(channels, channels, 1) - self.conv_k = nn.Conv1d(channels, channels, 1) - self.conv_v = nn.Conv1d(channels, channels, 1) - self.conv_o = nn.Conv1d(channels, out_channels, 1) - self.drop = nn.Dropout(p_dropout) - - if window_size is not None: - n_heads_rel = 1 if heads_share else n_heads - rel_stddev = self.k_channels**-0.5 - self.emb_rel_k = nn.Parameter(torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels) * rel_stddev) - self.emb_rel_v = nn.Parameter(torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels) * rel_stddev) - - nn.init.xavier_uniform_(self.conv_q.weight) - nn.init.xavier_uniform_(self.conv_k.weight) - nn.init.xavier_uniform_(self.conv_v.weight) - if proximal_init: - with torch.no_grad(): - self.conv_k.weight.copy_(self.conv_q.weight) - self.conv_k.bias.copy_(self.conv_q.bias) - - def forward(self, x, c, attn_mask=None): - q = self.conv_q(x) - k = self.conv_k(c) - v = self.conv_v(c) - - x, self.attn = self.attention(q, k, v, mask=attn_mask) - - x = self.conv_o(x) - return x - - def attention(self, query, key, value, mask=None): - # reshape [b, d, t] -> [b, n_h, t, d_k] - b, d, t_s, t_t = (*key.size(), query.size(2)) - query = query.view(b, self.n_heads, self.k_channels, t_t).transpose(2, 3) - key = key.view(b, self.n_heads, self.k_channels, t_s).transpose(2, 3) - value = value.view(b, self.n_heads, self.k_channels, t_s).transpose(2, 3) - - scores = torch.matmul(query / math.sqrt(self.k_channels), key.transpose(-2, -1)) - if self.window_size is not None: - assert t_s == t_t, "Relative attention is only available for self-attention." - key_relative_embeddings = self._get_relative_embeddings(self.emb_rel_k, t_s) - rel_logits = self._matmul_with_relative_keys(query /math.sqrt(self.k_channels), key_relative_embeddings) - scores_local = self._relative_position_to_absolute_position(rel_logits) - scores = scores + scores_local - if self.proximal_bias: - assert t_s == t_t, "Proximal bias is only available for self-attention." - scores = scores + self._attention_bias_proximal(t_s).to(device=scores.device, dtype=scores.dtype) - if mask is not None: - scores = scores.masked_fill(mask == 0, -1e4) - if self.block_length is not None: - assert t_s == t_t, "Local attention is only available for self-attention." - block_mask = torch.ones_like(scores).triu(-self.block_length).tril(self.block_length) - scores = scores.masked_fill(block_mask == 0, -1e4) - p_attn = F.softmax(scores, dim=-1) # [b, n_h, t_t, t_s] - p_attn = self.drop(p_attn) - output = torch.matmul(p_attn, value) - if self.window_size is not None: - relative_weights = self._absolute_position_to_relative_position(p_attn) - value_relative_embeddings = self._get_relative_embeddings(self.emb_rel_v, t_s) - output = output + self._matmul_with_relative_values(relative_weights, value_relative_embeddings) - output = output.transpose(2, 3).contiguous().view(b, d, t_t) # [b, n_h, t_t, d_k] -> [b, d, t_t] - return output, p_attn - - def _matmul_with_relative_values(self, x, y): - """ - x: [b, h, l, m] - y: [h or 1, m, d] - ret: [b, h, l, d] - """ - ret = torch.matmul(x, y.unsqueeze(0)) - return ret - - def _matmul_with_relative_keys(self, x, y): - """ - x: [b, h, l, d] - y: [h or 1, m, d] - ret: [b, h, l, m] - """ - ret = torch.matmul(x, y.unsqueeze(0).transpose(-2, -1)) - return ret - - def _get_relative_embeddings(self, relative_embeddings, length): - max_relative_position = 2 * self.window_size + 1 - # Pad first before slice to avoid using cond ops. - pad_length = max(length - (self.window_size + 1), 0) - slice_start_position = max((self.window_size + 1) - length, 0) - slice_end_position = slice_start_position + 2 * length - 1 - if pad_length > 0: - padded_relative_embeddings = F.pad( - relative_embeddings, - commons.convert_pad_shape([[0, 0], [pad_length, pad_length], [0, 0]])) - else: - padded_relative_embeddings = relative_embeddings - used_relative_embeddings = padded_relative_embeddings[:,slice_start_position:slice_end_position] - return used_relative_embeddings - - def _relative_position_to_absolute_position(self, x): - """ - x: [b, h, l, 2*l-1] - ret: [b, h, l, l] - """ - batch, heads, length, _ = x.size() - # Concat columns of pad to shift from relative to absolute indexing. - x = F.pad(x, commons.convert_pad_shape([[0,0],[0,0],[0,0],[0,1]])) - - # Concat extra elements so to add up to shape (len+1, 2*len-1). - x_flat = x.view([batch, heads, length * 2 * length]) - x_flat = F.pad(x_flat, commons.convert_pad_shape([[0,0],[0,0],[0,length-1]])) - - # Reshape and slice out the padded elements. - x_final = x_flat.view([batch, heads, length+1, 2*length-1])[:, :, :length, length-1:] - return x_final - - def _absolute_position_to_relative_position(self, x): - """ - x: [b, h, l, l] - ret: [b, h, l, 2*l-1] - """ - batch, heads, length, _ = x.size() - # padd along column - x = F.pad(x, commons.convert_pad_shape([[0, 0], [0, 0], [0, 0], [0, length-1]])) - x_flat = x.view([batch, heads, length**2 + length*(length -1)]) - # add 0's in the beginning that will skew the elements after reshape - x_flat = F.pad(x_flat, commons.convert_pad_shape([[0, 0], [0, 0], [length, 0]])) - x_final = x_flat.view([batch, heads, length, 2*length])[:,:,:,1:] - return x_final - - def _attention_bias_proximal(self, length): - """Bias for self-attention to encourage attention to close positions. - Args: - length: an integer scalar. - Returns: - a Tensor with shape [1, 1, length, length] - """ - r = torch.arange(length, dtype=torch.float32) - diff = torch.unsqueeze(r, 0) - torch.unsqueeze(r, 1) - return torch.unsqueeze(torch.unsqueeze(-torch.log1p(torch.abs(diff)), 0), 0) - - -class FFN(nn.Module): - def __init__(self, in_channels, out_channels, filter_channels, kernel_size, p_dropout=0., activation=None, causal=False): - super().__init__() - self.in_channels = in_channels - self.out_channels = out_channels - self.filter_channels = filter_channels - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.activation = activation - self.causal = causal - - if causal: - self.padding = self._causal_padding - else: - self.padding = self._same_padding - - self.conv_1 = nn.Conv1d(in_channels, filter_channels, kernel_size) - self.conv_2 = nn.Conv1d(filter_channels, out_channels, kernel_size) - self.drop = nn.Dropout(p_dropout) - - def forward(self, x, x_mask): - x = self.conv_1(self.padding(x * x_mask)) - if self.activation == "gelu": - x = x * torch.sigmoid(1.702 * x) - else: - x = torch.relu(x) - x = self.drop(x) - x = self.conv_2(self.padding(x * x_mask)) - return x * x_mask - - def _causal_padding(self, x): - if self.kernel_size == 1: - return x - pad_l = self.kernel_size - 1 - pad_r = 0 - padding = [[0, 0], [0, 0], [pad_l, pad_r]] - x = F.pad(x, commons.convert_pad_shape(padding)) - return x - - def _same_padding(self, x): - if self.kernel_size == 1: - return x - pad_l = (self.kernel_size - 1) // 2 - pad_r = self.kernel_size // 2 - padding = [[0, 0], [0, 0], [pad_l, pad_r]] - x = F.pad(x, commons.convert_pad_shape(padding)) - return x diff --git a/spaces/Illumotion/Koboldcpp/examples/batched-bench/README.md b/spaces/Illumotion/Koboldcpp/examples/batched-bench/README.md deleted file mode 100644 index 34b343f66d6b95184ef45ddb678765282e19770c..0000000000000000000000000000000000000000 --- a/spaces/Illumotion/Koboldcpp/examples/batched-bench/README.md +++ /dev/null @@ -1,51 +0,0 @@ -# llama.cpp/example/batched-bench - -Benchmark the batched decoding performance of `llama.cpp` - -## Usage - -There are 2 modes of operation: - -- `prompt not shared` - each batch has a separate prompt of size `PP` (i.e. `N_KV = B*(PP + TG)`) -- `prompt is shared` - there is a common prompt of size `PP` used by all batches (i.e. `N_KV = PP + B*TG`) - -```bash -./batched-bench MODEL_PATH [N_KV_MAX] [IS_PP_SHARED] [NGL] [MMQ] - -# LLaMA 7B, F16, N_KV_MAX = 16384 (8GB), prompt not shared -./batched-bench ./models/llama-7b/ggml-model-f16.gguf 16384 0 99 - -# LLaMA 7B, Q8_0, N_KV_MAX = 16384 (8GB), prompt is shared -./batched-bench ./models/llama-7b/ggml-model-q8_0.gguf 16384 1 99 - -# custom set of batches -./batched-bench ./models/llama-7b/ggml-model-q8_0.gguf 2048 0 999 0 128,256,512 128,256 1,2,4,8,16,32 -``` - -## Sample results - -- `PP` - prompt tokens per batch -- `TG` - generated tokens per batch -- `B` - number of batches -- `N_KV` - required KV cache size -- `T_PP` - prompt processing time (i.e. time to first token) -- `S_PP` - prompt processing speed (`(B*PP)/T_PP` or `PP/T_PP`) -- `T_TG` - time to generate all batches -- `S_TG` - text generation speed (`(B*TG)/T_TG`) -- `T` - total time -- `S` - total speed (i.e. all tokens / total time) - -| PP | TG | B | N_KV | T_PP s | S_PP t/s | T_TG s | S_TG t/s | T s | S t/s | -|-------|--------|------|--------|----------|----------|----------|----------|----------|----------| -| 128 | 128 | 1 | 256 | 0.108 | 1186.64 | 3.079 | 41.57 | 3.187 | 80.32 | -| 128 | 128 | 2 | 512 | 0.198 | 1295.19 | 5.029 | 50.90 | 5.227 | 97.95 | -| 128 | 128 | 4 | 1024 | 0.373 | 1373.96 | 6.878 | 74.44 | 7.251 | 141.23 | -| 128 | 128 | 8 | 2048 | 0.751 | 1363.27 | 7.344 | 139.43 | 8.095 | 252.99 | -| 128 | 128 | 16 | 4096 | 1.570 | 1304.68 | 8.455 | 242.23 | 10.024 | 408.60 | -| 128 | 128 | 32 | 8192 | 3.408 | 1201.73 | 8.801 | 465.40 | 12.209 | 670.96 | -| 128 | 256 | 1 | 384 | 0.107 | 1196.70 | 6.329 | 40.45 | 6.436 | 59.67 | -| 128 | 256 | 2 | 768 | 0.194 | 1317.45 | 10.239 | 50.00 | 10.433 | 73.61 | -| 128 | 256 | 4 | 1536 | 0.366 | 1399.03 | 13.960 | 73.35 | 14.326 | 107.22 | -| 128 | 256 | 8 | 3072 | 0.751 | 1363.92 | 15.110 | 135.54 | 15.861 | 193.69 | -| 128 | 256 | 16 | 6144 | 1.569 | 1304.93 | 18.073 | 226.64 | 19.642 | 312.80 | -| 128 | 256 | 32 | 12288 | 3.409 | 1201.35 | 19.223 | 426.15 | 22.633 | 542.93 | diff --git a/spaces/Jamel887/Rvc-tio887/app-2.py b/spaces/Jamel887/Rvc-tio887/app-2.py deleted file mode 100644 index 2ac3c75490ffa9c5724dc745ff51268c6a9327a4..0000000000000000000000000000000000000000 --- a/spaces/Jamel887/Rvc-tio887/app-2.py +++ /dev/null @@ -1,518 +0,0 @@ -import os -import glob -import json -import traceback -import logging -import gradio as gr -import numpy as np -import librosa -import torch -import asyncio -import edge_tts -import yt_dlp -import ffmpeg -import subprocess -import sys -import io -import wave -from datetime import datetime -from fairseq import checkpoint_utils -from lib.infer_pack.models import ( - SynthesizerTrnMs256NSFsid, - SynthesizerTrnMs256NSFsid_nono, - SynthesizerTrnMs768NSFsid, - SynthesizerTrnMs768NSFsid_nono, -) -from vc_infer_pipeline import VC -from config import Config -config = Config() -logging.getLogger("numba").setLevel(logging.WARNING) -limitation = os.getenv("SYSTEM") == "spaces" - -audio_mode = [] -f0method_mode = [] -f0method_info = "" -if limitation is True: - audio_mode = ["Upload audio", "TTS Audio"] - f0method_mode = ["pm", "harvest"] - f0method_info = "PM is fast, Harvest is good but extremely slow. (Default: PM)" -else: - audio_mode = ["Input path", "Upload audio", "Youtube", "TTS Audio"] - f0method_mode = ["pm", "harvest", "crepe"] - f0method_info = "PM is fast, Harvest is good but extremely slow, and Crepe effect is good but requires GPU (Default: PM)" - -def create_vc_fn(model_title, tgt_sr, net_g, vc, if_f0, version, file_index): - def vc_fn( - vc_audio_mode, - vc_input, - vc_upload, - tts_text, - tts_voice, - f0_up_key, - f0_method, - index_rate, - filter_radius, - resample_sr, - rms_mix_rate, - protect, - ): - try: - if vc_audio_mode == "Input path" or "Youtube" and vc_input != "": - audio, sr = librosa.load(vc_input, sr=16000, mono=True) - elif vc_audio_mode == "Upload audio": - if vc_upload is None: - return "You need to upload an audio", None - sampling_rate, audio = vc_upload - duration = audio.shape[0] / sampling_rate - if duration > 20 and limitation: - return "Please upload an audio file that is less than 20 seconds. If you need to generate a longer audio file, please use Colab.", None - audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32) - if len(audio.shape) > 1: - audio = librosa.to_mono(audio.transpose(1, 0)) - if sampling_rate != 16000: - audio = librosa.resample(audio, orig_sr=sampling_rate, target_sr=16000) - elif vc_audio_mode == "TTS Audio": - if len(tts_text) > 100 and limitation: - return "Text is too long", None - if tts_text is None or tts_voice is None: - return "You need to enter text and select a voice", None - asyncio.run(edge_tts.Communicate(tts_text, "-".join(tts_voice.split('-')[:-1])).save("tts.mp3")) - audio, sr = librosa.load("tts.mp3", sr=16000, mono=True) - vc_input = "tts.mp3" - times = [0, 0, 0] - f0_up_key = int(f0_up_key) - audio_opt = vc.pipeline( - hubert_model, - net_g, - 0, - audio, - vc_input, - times, - f0_up_key, - f0_method, - file_index, - # file_big_npy, - index_rate, - if_f0, - filter_radius, - tgt_sr, - resample_sr, - rms_mix_rate, - version, - protect, - f0_file=None, - ) - info = f"[{datetime.now().strftime('%Y-%m-%d %H:%M')}]: npy: {times[0]}, f0: {times[1]}s, infer: {times[2]}s" - print(f"{model_title} | {info}") - return info, (tgt_sr, audio_opt) - except: - info = traceback.format_exc() - print(info) - return info, None - return vc_fn - -def load_model(): - categories = [] - with open("weights/folder_info.json", "r", encoding="utf-8") as f: - folder_info = json.load(f) - for category_name, category_info in folder_info.items(): - if not category_info['enable']: - continue - category_title = category_info['title'] - category_folder = category_info['folder_path'] - description = category_info['description'] - models = [] - with open(f"weights/{category_folder}/model_info.json", "r", encoding="utf-8") as f: - models_info = json.load(f) - for character_name, info in models_info.items(): - if not info['enable']: - continue - model_title = info['title'] - model_name = info['model_path'] - model_author = info.get("author", None) - model_cover = f"weights/{category_folder}/{character_name}/{info['cover']}" - model_index = f"weights/{category_folder}/{character_name}/{info['feature_retrieval_library']}" - cpt = torch.load(f"weights/{category_folder}/{character_name}/{model_name}", map_location="cpu") - tgt_sr = cpt["config"][-1] - cpt["config"][-3] = cpt["weight"]["emb_g.weight"].shape[0] # n_spk - if_f0 = cpt.get("f0", 1) - version = cpt.get("version", "v1") - if version == "v1": - if if_f0 == 1: - net_g = SynthesizerTrnMs256NSFsid(*cpt["config"], is_half=config.is_half) - else: - net_g = SynthesizerTrnMs256NSFsid_nono(*cpt["config"]) - model_version = "V1" - elif version == "v2": - if if_f0 == 1: - net_g = SynthesizerTrnMs768NSFsid(*cpt["config"], is_half=config.is_half) - else: - net_g = SynthesizerTrnMs768NSFsid_nono(*cpt["config"]) - model_version = "V2" - del net_g.enc_q - print(net_g.load_state_dict(cpt["weight"], strict=False)) - net_g.eval().to(config.device) - if config.is_half: - net_g = net_g.half() - else: - net_g = net_g.float() - vc = VC(tgt_sr, config) - print(f"Model loaded: {character_name} / {info['feature_retrieval_library']} | ({model_version})") - models.append((character_name, model_title, model_author, model_cover, model_version, create_vc_fn(model_title, tgt_sr, net_g, vc, if_f0, version, model_index))) - categories.append([category_title, category_folder, description, models]) - return categories - -def cut_vocal_and_inst(url, audio_provider, split_model): - if url != "": - if not os.path.exists("dl_audio"): - os.mkdir("dl_audio") - if audio_provider == "Youtube": - ydl_opts = { - 'noplaylist': True, - 'format': 'bestaudio/best', - 'postprocessors': [{ - 'key': 'FFmpegExtractAudio', - 'preferredcodec': 'wav', - }], - "outtmpl": 'dl_audio/youtube_audio', - } - with yt_dlp.YoutubeDL(ydl_opts) as ydl: - ydl.download([url]) - audio_path = "dl_audio/youtube_audio.wav" - if split_model == "htdemucs": - command = f"demucs --two-stems=vocals {audio_path} -o output" - result = subprocess.run(command.split(), stdout=subprocess.PIPE) - print(result.stdout.decode()) - return "output/htdemucs/youtube_audio/vocals.wav", "output/htdemucs/youtube_audio/no_vocals.wav", audio_path, "output/htdemucs/youtube_audio/vocals.wav" - else: - command = f"demucs --two-stems=vocals -n mdx_extra_q {audio_path} -o output" - result = subprocess.run(command.split(), stdout=subprocess.PIPE) - print(result.stdout.decode()) - return "output/mdx_extra_q/youtube_audio/vocals.wav", "output/mdx_extra_q/youtube_audio/no_vocals.wav", audio_path, "output/mdx_extra_q/youtube_audio/vocals.wav" - else: - raise gr.Error("URL Required!") - return None, None, None, None - -def combine_vocal_and_inst(audio_data, audio_volume, split_model): - if not os.path.exists("output/result"): - os.mkdir("output/result") - vocal_path = "output/result/output.wav" - output_path = "output/result/combine.mp3" - if split_model == "htdemucs": - inst_path = "output/htdemucs/youtube_audio/no_vocals.wav" - else: - inst_path = "output/mdx_extra_q/youtube_audio/no_vocals.wav" - with wave.open(vocal_path, "w") as wave_file: - wave_file.setnchannels(1) - wave_file.setsampwidth(2) - wave_file.setframerate(audio_data[0]) - wave_file.writeframes(audio_data[1].tobytes()) - command = f'ffmpeg -y -i {inst_path} -i {vocal_path} -filter_complex [1:a]volume={audio_volume}dB[v];[0:a][v]amix=inputs=2:duration=longest -b:a 320k -c:a libmp3lame {output_path}' - result = subprocess.run(command.split(), stdout=subprocess.PIPE) - print(result.stdout.decode()) - return output_path - -def load_hubert(): - global hubert_model - models, _, _ = checkpoint_utils.load_model_ensemble_and_task( - ["hubert_base.pt"], - suffix="", - ) - hubert_model = models[0] - hubert_model = hubert_model.to(config.device) - if config.is_half: - hubert_model = hubert_model.half() - else: - hubert_model = hubert_model.float() - hubert_model.eval() - -def change_audio_mode(vc_audio_mode): - if vc_audio_mode == "Input path": - return ( - # Input & Upload - gr.Textbox.update(visible=True), - gr.Checkbox.update(visible=False), - gr.Audio.update(visible=False), - # Youtube - gr.Dropdown.update(visible=False), - gr.Textbox.update(visible=False), - gr.Dropdown.update(visible=False), - gr.Button.update(visible=False), - gr.Audio.update(visible=False), - gr.Audio.update(visible=False), - gr.Audio.update(visible=False), - gr.Slider.update(visible=False), - gr.Audio.update(visible=False), - gr.Button.update(visible=False), - # TTS - gr.Textbox.update(visible=False), - gr.Dropdown.update(visible=False) - ) - elif vc_audio_mode == "Upload audio": - return ( - # Input & Upload - gr.Textbox.update(visible=False), - gr.Checkbox.update(visible=True), - gr.Audio.update(visible=True), - # Youtube - gr.Dropdown.update(visible=False), - gr.Textbox.update(visible=False), - gr.Dropdown.update(visible=False), - gr.Button.update(visible=False), - gr.Audio.update(visible=False), - gr.Audio.update(visible=False), - gr.Audio.update(visible=False), - gr.Slider.update(visible=False), - gr.Audio.update(visible=False), - gr.Button.update(visible=False), - # TTS - gr.Textbox.update(visible=False), - gr.Dropdown.update(visible=False) - ) - elif vc_audio_mode == "Youtube": - return ( - # Input & Upload - gr.Textbox.update(visible=False), - gr.Checkbox.update(visible=False), - gr.Audio.update(visible=False), - # Youtube - gr.Dropdown.update(visible=True), - gr.Textbox.update(visible=True), - gr.Dropdown.update(visible=True), - gr.Button.update(visible=True), - gr.Audio.update(visible=True), - gr.Audio.update(visible=True), - gr.Audio.update(visible=True), - gr.Slider.update(visible=True), - gr.Audio.update(visible=True), - gr.Button.update(visible=True), - # TTS - gr.Textbox.update(visible=False), - gr.Dropdown.update(visible=False) - ) - elif vc_audio_mode == "TTS Audio": - return ( - # Input & Upload - gr.Textbox.update(visible=False), - gr.Checkbox.update(visible=False), - gr.Audio.update(visible=False), - # Youtube - gr.Dropdown.update(visible=False), - gr.Textbox.update(visible=False), - gr.Dropdown.update(visible=False), - gr.Button.update(visible=False), - gr.Audio.update(visible=False), - gr.Audio.update(visible=False), - gr.Audio.update(visible=False), - gr.Slider.update(visible=False), - gr.Audio.update(visible=False), - gr.Button.update(visible=False), - # TTS - gr.Textbox.update(visible=True), - gr.Dropdown.update(visible=True) - ) - else: - return ( - # Input & Upload - gr.Textbox.update(visible=False), - gr.Checkbox.update(visible=True), - gr.Audio.update(visible=True), - # Youtube - gr.Dropdown.update(visible=False), - gr.Textbox.update(visible=False), - gr.Dropdown.update(visible=False), - gr.Button.update(visible=False), - gr.Audio.update(visible=False), - gr.Audio.update(visible=False), - gr.Audio.update(visible=False), - gr.Slider.update(visible=False), - gr.Audio.update(visible=False), - gr.Button.update(visible=False), - # TTS - gr.Textbox.update(visible=False), - gr.Dropdown.update(visible=False) - ) - -def use_microphone(microphone): - if microphone == True: - return gr.Audio.update(source="microphone") - else: - return gr.Audio.update(source="upload") - -if __name__ == '__main__': - load_hubert() - categories = load_model() - tts_voice_list = asyncio.get_event_loop().run_until_complete(edge_tts.list_voices()) - voices = [f"{v['ShortName']}-{v['Gender']}" for v in tts_voice_list] - with gr.Blocks() as app: - gr.Markdown( - "
    \n\n"+ - "# RVC V2 MODELS GENSHIN IMPACT\n\n"+ - "### Recommended to use Google Colab to use other character and feature.\n\n"+ - "#### All of this voice samples are taken from the game Genshin Impact, and all voice credits belong to hoyoverse.\n\n"+ - "[![Colab](https://img.shields.io/badge/Colab-RVC%20Genshin%20Impact-blue?style=for-the-badge&logo=googlecolab)](https://colab.research.google.com/drive/1EGHCk7wluqMX2krZhPI13Vhs21e07kOv)\n\n"+ - "
    \n\n"+ - "[![Repository](https://img.shields.io/badge/Github-Multi%20Model%20RVC%20Inference-blue?style=for-the-badge&logo=github)](https://github.com/ArkanDash/Multi-Model-RVC-Inference)" - ) - for (folder_title, folder, description, models) in categories: - with gr.TabItem(folder_title): - if description: - gr.Markdown(f"###
    {description}") - with gr.Tabs(): - if not models: - gr.Markdown("#
    No Model Loaded.") - gr.Markdown("##
    Please add model or fix your model path.") - continue - for (name, title, author, cover, model_version, vc_fn) in models: - with gr.TabItem(name): - with gr.Row(): - gr.Markdown( - '
    ' - f'
    {title}
    \n'+ - f'
    RVC {model_version} Model
    \n'+ - (f'
    Model author: {author}
    ' if author else "")+ - (f'' if cover else "")+ - '
    ' - ) - with gr.Row(): - with gr.Column(): - vc_audio_mode = gr.Dropdown(label="Input voice", choices=audio_mode, allow_custom_value=False, value="Upload audio") - # Input - vc_input = gr.Textbox(label="Input audio path", visible=False) - # Upload - vc_microphone_mode = gr.Checkbox(label="Use Microphone", value=False, visible=True, interactive=True) - vc_upload = gr.Audio(label="Upload audio file", source="upload", visible=True, interactive=True) - # Youtube - vc_download_audio = gr.Dropdown(label="Provider", choices=["Youtube"], allow_custom_value=False, visible=False, value="Youtube", info="Select provider (Default: Youtube)") - vc_link = gr.Textbox(label="Youtube URL", visible=False, info="Example: https://www.youtube.com/watch?v=Nc0sB1Bmf-A", placeholder="https://www.youtube.com/watch?v=...") - vc_split_model = gr.Dropdown(label="Splitter Model", choices=["htdemucs", "mdx_extra_q"], allow_custom_value=False, visible=False, value="htdemucs", info="Select the splitter model (Default: htdemucs)") - vc_split = gr.Button("Split Audio", variant="primary", visible=False) - vc_vocal_preview = gr.Audio(label="Vocal Preview", visible=False) - vc_inst_preview = gr.Audio(label="Instrumental Preview", visible=False) - vc_audio_preview = gr.Audio(label="Audio Preview", visible=False) - # TTS - tts_text = gr.Textbox(visible=False, label="TTS text", info="Text to speech input") - tts_voice = gr.Dropdown(label="Edge-tts speaker", choices=voices, visible=False, allow_custom_value=False, value="en-US-AnaNeural-Female") - with gr.Column(): - vc_transform0 = gr.Number(label="Transpose", value=0, info='Type "12" to change from male to female voice. Type "-12" to change female to male voice') - f0method0 = gr.Radio( - label="Pitch extraction algorithm", - info=f0method_info, - choices=f0method_mode, - value="pm", - interactive=True - ) - index_rate1 = gr.Slider( - minimum=0, - maximum=1, - label="Retrieval feature ratio", - info="(Default: 0.7)", - value=0.7, - interactive=True, - ) - filter_radius0 = gr.Slider( - minimum=0, - maximum=7, - label="Apply Median Filtering", - info="The value represents the filter radius and can reduce breathiness.", - value=3, - step=1, - interactive=True, - ) - resample_sr0 = gr.Slider( - minimum=0, - maximum=48000, - label="Resample the output audio", - info="Resample the output audio in post-processing to the final sample rate. Set to 0 for no resampling", - value=0, - step=1, - interactive=True, - ) - rms_mix_rate0 = gr.Slider( - minimum=0, - maximum=1, - label="Volume Envelope", - info="Use the volume envelope of the input to replace or mix with the volume envelope of the output. The closer the ratio is to 1, the more the output envelope is used", - value=1, - interactive=True, - ) - protect0 = gr.Slider( - minimum=0, - maximum=0.5, - label="Voice Protection", - info="Protect voiceless consonants and breath sounds to prevent artifacts such as tearing in electronic music. Set to 0.5 to disable. Decrease the value to increase protection, but it may reduce indexing accuracy", - value=0.5, - step=0.01, - interactive=True, - ) - with gr.Column(): - vc_log = gr.Textbox(label="Output Information", interactive=False) - vc_output = gr.Audio(label="Output Audio", interactive=False) - vc_convert = gr.Button("Convert", variant="primary") - vc_volume = gr.Slider( - minimum=0, - maximum=10, - label="Vocal volume", - value=4, - interactive=True, - step=1, - info="Adjust vocal volume (Default: 4}", - visible=False - ) - vc_combined_output = gr.Audio(label="Output Combined Audio", visible=False) - vc_combine = gr.Button("Combine",variant="primary", visible=False) - vc_convert.click( - fn=vc_fn, - inputs=[ - vc_audio_mode, - vc_input, - vc_upload, - tts_text, - tts_voice, - vc_transform0, - f0method0, - index_rate1, - filter_radius0, - resample_sr0, - rms_mix_rate0, - protect0, - ], - outputs=[vc_log ,vc_output] - ) - vc_split.click( - fn=cut_vocal_and_inst, - inputs=[vc_link, vc_download_audio, vc_split_model], - outputs=[vc_vocal_preview, vc_inst_preview, vc_audio_preview, vc_input] - ) - vc_combine.click( - fn=combine_vocal_and_inst, - inputs=[vc_output, vc_volume, vc_split_model], - outputs=[vc_combined_output] - ) - vc_microphone_mode.change( - fn=use_microphone, - inputs=vc_microphone_mode, - outputs=vc_upload - ) - vc_audio_mode.change( - fn=change_audio_mode, - inputs=[vc_audio_mode], - outputs=[ - vc_input, - vc_microphone_mode, - vc_upload, - vc_download_audio, - vc_link, - vc_split_model, - vc_split, - vc_vocal_preview, - vc_inst_preview, - vc_audio_preview, - vc_volume, - vc_combined_output, - vc_combine, - tts_text, - tts_voice - ] - ) - app.queue(concurrency_count=1, max_size=20, api_open=config.api).launch(share=config.colab) \ No newline at end of file diff --git a/spaces/Jialu/T2IAT/README.md b/spaces/Jialu/T2IAT/README.md deleted file mode 100644 index 266a06f9c27fff452b39d3c9343ebf8d734472fb..0000000000000000000000000000000000000000 --- a/spaces/Jialu/T2IAT/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: T2IAT -emoji: 🔥 -colorFrom: blue -colorTo: blue -sdk: gradio -sdk_version: 3.35.2 -app_file: app.py -pinned: false -license: mit ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Jojohickman21/IvyLeague_Logo_Classifier/README.md b/spaces/Jojohickman21/IvyLeague_Logo_Classifier/README.md deleted file mode 100644 index 276ce8938bc238eddfcaa64ceff40c4abd8141a5..0000000000000000000000000000000000000000 --- a/spaces/Jojohickman21/IvyLeague_Logo_Classifier/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: IvyLeague Logo Classifier -emoji: 📚 -colorFrom: purple -colorTo: green -sdk: gradio -sdk_version: 3.18.0 -app_file: app.py -pinned: false -license: apache-2.0 ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/JosephusCheung/ACertainsStrategyTalk/1.html b/spaces/JosephusCheung/ACertainsStrategyTalk/1.html deleted file mode 100644 index d48f9e91cecda6a3cd6d2b2718a9ce309ff99817..0000000000000000000000000000000000000000 --- a/spaces/JosephusCheung/ACertainsStrategyTalk/1.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - -
    - - - - - - - - - - - - - - - -
    -
    - - - - -
    Do You Want to fine-tune a SD model? -Strategy Talk -Certains Certains Certains
    - - - -
    - - diff --git a/spaces/Junity/TokaiTeio-SVC/vdecoder/hifigan/nvSTFT.py b/spaces/Junity/TokaiTeio-SVC/vdecoder/hifigan/nvSTFT.py deleted file mode 100644 index 88597d62a505715091f9ba62d38bf0a85a31b95a..0000000000000000000000000000000000000000 --- a/spaces/Junity/TokaiTeio-SVC/vdecoder/hifigan/nvSTFT.py +++ /dev/null @@ -1,111 +0,0 @@ -import math -import os -os.environ["LRU_CACHE_CAPACITY"] = "3" -import random -import torch -import torch.utils.data -import numpy as np -import librosa -from librosa.util import normalize -from librosa.filters import mel as librosa_mel_fn -from scipy.io.wavfile import read -import soundfile as sf - -def load_wav_to_torch(full_path, target_sr=None, return_empty_on_exception=False): - sampling_rate = None - try: - data, sampling_rate = sf.read(full_path, always_2d=True)# than soundfile. - except Exception as ex: - print(f"'{full_path}' failed to load.\nException:") - print(ex) - if return_empty_on_exception: - return [], sampling_rate or target_sr or 32000 - else: - raise Exception(ex) - - if len(data.shape) > 1: - data = data[:, 0] - assert len(data) > 2# check duration of audio file is > 2 samples (because otherwise the slice operation was on the wrong dimension) - - if np.issubdtype(data.dtype, np.integer): # if audio data is type int - max_mag = -np.iinfo(data.dtype).min # maximum magnitude = min possible value of intXX - else: # if audio data is type fp32 - max_mag = max(np.amax(data), -np.amin(data)) - max_mag = (2**31)+1 if max_mag > (2**15) else ((2**15)+1 if max_mag > 1.01 else 1.0) # data should be either 16-bit INT, 32-bit INT or [-1 to 1] float32 - - data = torch.FloatTensor(data.astype(np.float32))/max_mag - - if (torch.isinf(data) | torch.isnan(data)).any() and return_empty_on_exception:# resample will crash with inf/NaN inputs. return_empty_on_exception will return empty arr instead of except - return [], sampling_rate or target_sr or 32000 - if target_sr is not None and sampling_rate != target_sr: - data = torch.from_numpy(librosa.core.resample(data.numpy(), orig_sr=sampling_rate, target_sr=target_sr)) - sampling_rate = target_sr - - return data, sampling_rate - -def dynamic_range_compression(x, C=1, clip_val=1e-5): - return np.log(np.clip(x, a_min=clip_val, a_max=None) * C) - -def dynamic_range_decompression(x, C=1): - return np.exp(x) / C - -def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): - return torch.log(torch.clamp(x, min=clip_val) * C) - -def dynamic_range_decompression_torch(x, C=1): - return torch.exp(x) / C - -class STFT(): - def __init__(self, sr=22050, n_mels=80, n_fft=1024, win_size=1024, hop_length=256, fmin=20, fmax=11025, clip_val=1e-5): - self.target_sr = sr - - self.n_mels = n_mels - self.n_fft = n_fft - self.win_size = win_size - self.hop_length = hop_length - self.fmin = fmin - self.fmax = fmax - self.clip_val = clip_val - self.mel_basis = {} - self.hann_window = {} - - def get_mel(self, y, center=False): - sampling_rate = self.target_sr - n_mels = self.n_mels - n_fft = self.n_fft - win_size = self.win_size - hop_length = self.hop_length - fmin = self.fmin - fmax = self.fmax - clip_val = self.clip_val - - if torch.min(y) < -1.: - print('min value is ', torch.min(y)) - if torch.max(y) > 1.: - print('max value is ', torch.max(y)) - - if fmax not in self.mel_basis: - mel = librosa_mel_fn(sr=sampling_rate, n_fft=n_fft, n_mels=n_mels, fmin=fmin, fmax=fmax) - self.mel_basis[str(fmax)+'_'+str(y.device)] = torch.from_numpy(mel).float().to(y.device) - self.hann_window[str(y.device)] = torch.hann_window(self.win_size).to(y.device) - - y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_length)/2), int((n_fft-hop_length)/2)), mode='reflect') - y = y.squeeze(1) - - spec = torch.stft(y, n_fft, hop_length=hop_length, win_length=win_size, window=self.hann_window[str(y.device)], - center=center, pad_mode='reflect', normalized=False, onesided=True) - # print(111,spec) - spec = torch.sqrt(spec.pow(2).sum(-1)+(1e-9)) - # print(222,spec) - spec = torch.matmul(self.mel_basis[str(fmax)+'_'+str(y.device)], spec) - # print(333,spec) - spec = dynamic_range_compression_torch(spec, clip_val=clip_val) - # print(444,spec) - return spec - - def __call__(self, audiopath): - audio, sr = load_wav_to_torch(audiopath, target_sr=self.target_sr) - spect = self.get_mel(audio.unsqueeze(0)).squeeze(0) - return spect - -stft = STFT() diff --git a/spaces/KPCGD/bingo/src/components/ui/input.tsx b/spaces/KPCGD/bingo/src/components/ui/input.tsx deleted file mode 100644 index 684a857f3d769b78818fb13de1abaebfb09ca79c..0000000000000000000000000000000000000000 --- a/spaces/KPCGD/bingo/src/components/ui/input.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from 'react' - -import { cn } from '@/lib/utils' - -export interface InputProps - extends React.InputHTMLAttributes {} - -const Input = React.forwardRef( - ({ className, type, ...props }, ref) => { - return ( - - ) - } -) -Input.displayName = 'Input' - -export { Input } diff --git a/spaces/KenjieDec/GPEN/app.py b/spaces/KenjieDec/GPEN/app.py deleted file mode 100644 index 05b9c767554f762b8d19d9c2c4d773b7ec6b5c06..0000000000000000000000000000000000000000 --- a/spaces/KenjieDec/GPEN/app.py +++ /dev/null @@ -1,152 +0,0 @@ -import os - -os.system('wget "https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/RetinaFace-R50.pth?OSSAccessKeyId=LTAI4G6bfnyW4TA4wFUXTYBe&Expires=1961116085&Signature=GlUNW6%2B8FxvxWmE9jKIZYOOciKQ%3D" -O weights/RetinaFace-R50.pth') -os.system('wget "https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/GPEN-BFR-512.pth?OSSAccessKeyId=LTAI4G6bfnyW4TA4wFUXTYBe&Expires=1961116208&Signature=hBgvVvKVSNGeXqT8glG%2Bd2t2OKc%3D" -O weights/GPEN-512.pth') -os.system('wget "https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/GPEN-Colorization-1024.pth?OSSAccessKeyId=LTAI4G6bfnyW4TA4wFUXTYBe&Expires=1961116315&Signature=9tPavW2h%2F1LhIKiXj73sTQoWqcc%3D" -O weights/GPEN-1024-Color.pth ') -os.system('wget "https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/realesrnet_x2.pth?OSSAccessKeyId=LTAI4G6bfnyW4TA4wFUXTYBe&Expires=1962694780&Signature=lI%2FolhA%2FyigiTRvoDIVbtMIyhjI%3D" -O weights/realesrnet_x2.pth ') -os.system('wget "https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/GPEN-Inpainting-1024.pth?OSSAccessKeyId=LTAI4G6bfnyW4TA4wFUXTYBe&Expires=1961116338&Signature=tvYhdLaLgW7UdcUrApXp2jsek8w%3D" -O weights/GPEN-Inpainting-1024.pth ') -jksp= os.environ['GPEN-BFR-2048'] -os.system(f'wget "{jksp}" -O weights/GPEN-BFR-2048.pth') - -import gradio as gr - -''' -@paper: GAN Prior Embedded Network for Blind Face Restoration in the Wild (CVPR2021) -@author: yangxy (yangtao9009@gmail.com) -''' -import os -import cv2 -import glob -import time -import math -import imutils -import argparse -import numpy as np -from PIL import Image, ImageDraw -import __init_paths -from face_enhancement import FaceEnhancement -from face_colorization import FaceColorization -from face_inpainting import FaceInpainting - -def brush_stroke_mask(img, color=(255,255,255)): - min_num_vertex = 8 - max_num_vertex = 28 - mean_angle = 2*math.pi / 5 - angle_range = 2*math.pi / 15 - min_width = 12 - max_width = 80 - def generate_mask(H, W, img=None): - average_radius = math.sqrt(H*H+W*W) / 8 - mask = Image.new('RGB', (W, H), 0) - if img is not None: mask = img #Image.fromarray(img) - - for _ in range(np.random.randint(1, 4)): - num_vertex = np.random.randint(min_num_vertex, max_num_vertex) - angle_min = mean_angle - np.random.uniform(0, angle_range) - angle_max = mean_angle + np.random.uniform(0, angle_range) - angles = [] - vertex = [] - for i in range(num_vertex): - if i % 2 == 0: - angles.append(2*math.pi - np.random.uniform(angle_min, angle_max)) - else: - angles.append(np.random.uniform(angle_min, angle_max)) - - h, w = mask.size - vertex.append((int(np.random.randint(0, w)), int(np.random.randint(0, h)))) - for i in range(num_vertex): - r = np.clip( - np.random.normal(loc=average_radius, scale=average_radius//2), - 0, 2*average_radius) - new_x = np.clip(vertex[-1][0] + r * math.cos(angles[i]), 0, w) - new_y = np.clip(vertex[-1][1] + r * math.sin(angles[i]), 0, h) - vertex.append((int(new_x), int(new_y))) - - draw = ImageDraw.Draw(mask) - width = int(np.random.uniform(min_width, max_width)) - draw.line(vertex, fill=color, width=width) - for v in vertex: - draw.ellipse((v[0] - width//2, - v[1] - width//2, - v[0] + width//2, - v[1] + width//2), - fill=color) - - return mask - - width, height = img.size - mask = generate_mask(height, width, img) - return mask - -def resize(image, width = 1024): - aspect_ratio = float(image.shape[1])/float(image.shape[0]) - height = width/aspect_ratio - image = cv2.resize(image, (int(height),int(width))) - return image - -def inference(file, mode): - - im = cv2.imread(file, cv2.IMREAD_COLOR) - im = cv2.resize(im, (0,0), fx=2, fy=2) - faceenhancer = FaceEnhancement(size=512, model='GPEN-512', channel_multiplier=2, device='cpu', u=False) - img, orig_faces, enhanced_faces = faceenhancer.process(im) - cv2.imwrite(os.path.join("e.png"), img) - - - if mode == "enhance": - return os.path.join("e.png") - elif mode == "colorize": - model = {'name':'GPEN-1024-Color', 'size':1024} - grayf = cv2.imread("e.png", cv2.IMREAD_GRAYSCALE) - grayf = cv2.cvtColor(grayf, cv2.COLOR_GRAY2BGR) # channel: 1->3 - facecolorizer = FaceColorization(size=model['size'], model=model['name'], channel_multiplier=2, device='cpu') - colorf = facecolorizer.process(grayf) - - colorf = cv2.resize(colorf, (grayf.shape[1], grayf.shape[0])) - cv2.imwrite(os.path.join("output.png"), colorf) - return os.path.join("output.png") - elif mode == "inpainting": - im1 = cv2.imread(file, cv2.IMREAD_COLOR) - im2 = resize(im1, width = 1024) - model = {'name':'GPEN-Inpainting-1024', 'size':1024} - faceinpainter = FaceInpainting(size=model['size'], model=model['name'], channel_multiplier=2, device='cpu') - im3 = np.asarray(brush_stroke_mask(Image.fromarray(im2))) - inpaint = faceinpainter.process(im3) - - cv2.imwrite(os.path.join("output.png"), inpaint) - return os.path.join("output.png") - elif mode == "selfie": - model = {'name':'GPEN-BFR-2048', 'size':2048} - im = cv2.resize(im, (0,0), fx=2, fy=2) - faceenhancer = FaceEnhancement(size=model['size'], model=model['name'], channel_multiplier=2, device='cpu') - img, orig_faces, enhanced_faces = faceenhancer.process(im) - cv2.imwrite(os.path.join("output.png"), img) - return os.path.join("output.png") - else: - faceenhancer = FaceEnhancement(size=512, model='GPEN-512', channel_multiplier=2, device='cpu', u=True) - img, orig_faces, enhanced_faces = faceenhancer.process(im) - cv2.imwrite(os.path.join("output.png"), img) - return os.path.join("output.png") - - -title = "GPEN" -description = "Gradio demo for GAN Prior Embedded Network for Blind Face Restoration in the Wild. This version of gradio demo includes face colorization from GPEN. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below." - -article = "

    GAN Prior Embedded Network for Blind Face Restoration in the Wild | Github Repo

    https://huggingface.co/spaces/akhaliq/GPEN

    " - - -gr.Interface( - inference, - [gr.inputs.Image(type="filepath", label="Input"),gr.inputs.Radio(["enhance", "colorize", "inpainting", "selfie", "enhanced+background"], type="value", default="enhance", label="Type")], - gr.outputs.Image(type="filepath", label="Output"), - title=title, - description=description, - article=article, - examples=[ - ['enhance.png', 'enhance'], - ['color.png', 'colorize'], - ['inpainting.png', 'inpainting'], - ['selfie.png', 'selfie'] - ], - enable_queue=True - ).launch() \ No newline at end of file diff --git a/spaces/Kluuking/google-vit-base/README.md b/spaces/Kluuking/google-vit-base/README.md deleted file mode 100644 index b40f288fe390d4618ddf8c3cb339049973c1f851..0000000000000000000000000000000000000000 --- a/spaces/Kluuking/google-vit-base/README.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Google Vit Base -emoji: 👁 -colorFrom: yellow -colorTo: blue -sdk: gradio -sdk_version: 3.18.0 -app_file: app.py -pinned: false ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Lianjd/stock_dashboard/backtrader/stores/oandastore.py b/spaces/Lianjd/stock_dashboard/backtrader/stores/oandastore.py deleted file mode 100644 index a549462f28c0d0faec9ae2ba31d70eabf518b575..0000000000000000000000000000000000000000 --- a/spaces/Lianjd/stock_dashboard/backtrader/stores/oandastore.py +++ /dev/null @@ -1,659 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8; py-indent-offset:4 -*- -############################################################################### -# -# Copyright (C) 2015-2020 Daniel Rodriguez -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################### -from __future__ import (absolute_import, division, print_function, - unicode_literals) - -import collections -from datetime import datetime, timedelta -import time as _time -import json -import threading - -import oandapy -import requests # oandapy depdendency - -import backtrader as bt -from backtrader.metabase import MetaParams -from backtrader.utils.py3 import queue, with_metaclass -from backtrader.utils import AutoDict - - -# Extend the exceptions to support extra cases - -class OandaRequestError(oandapy.OandaError): - def __init__(self): - er = dict(code=599, message='Request Error', description='') - super(self.__class__, self).__init__(er) - - -class OandaStreamError(oandapy.OandaError): - def __init__(self, content=''): - er = dict(code=598, message='Failed Streaming', description=content) - super(self.__class__, self).__init__(er) - - -class OandaTimeFrameError(oandapy.OandaError): - def __init__(self, content): - er = dict(code=597, message='Not supported TimeFrame', description='') - super(self.__class__, self).__init__(er) - - -class OandaNetworkError(oandapy.OandaError): - def __init__(self): - er = dict(code=596, message='Network Error', description='') - super(self.__class__, self).__init__(er) - - -class API(oandapy.API): - def request(self, endpoint, method='GET', params=None): - # Overriden to make something sensible out of a - # request.RequestException rather than simply issuing a print(str(e)) - url = '%s/%s' % (self.api_url, endpoint) - - method = method.lower() - params = params or {} - - func = getattr(self.client, method) - - request_args = {} - if method == 'get': - request_args['params'] = params - else: - request_args['data'] = params - - # Added the try block - try: - response = func(url, **request_args) - except requests.RequestException as e: - return OandaRequestError().error_response - - content = response.content.decode('utf-8') - content = json.loads(content) - - # error message - if response.status_code >= 400: - # changed from raise to return - return oandapy.OandaError(content).error_response - - return content - - -class Streamer(oandapy.Streamer): - def __init__(self, q, headers=None, *args, **kwargs): - # Override to provide headers, which is in the standard API interface - super(Streamer, self).__init__(*args, **kwargs) - - if headers: - self.client.headers.update(headers) - - self.q = q - - def run(self, endpoint, params=None): - # Override to better manage exceptions. - # Kept as much as possible close to the original - self.connected = True - - params = params or {} - - ignore_heartbeat = None - if 'ignore_heartbeat' in params: - ignore_heartbeat = params['ignore_heartbeat'] - - request_args = {} - request_args['params'] = params - - url = '%s/%s' % (self.api_url, endpoint) - - while self.connected: - # Added exception control here - try: - response = self.client.get(url, **request_args) - except requests.RequestException as e: - self.q.put(OandaRequestError().error_response) - break - - if response.status_code != 200: - self.on_error(response.content) - break # added break here - - # Changed chunk_size 90 -> None - try: - for line in response.iter_lines(chunk_size=None): - if not self.connected: - break - - if line: - data = json.loads(line.decode('utf-8')) - if not (ignore_heartbeat and 'heartbeat' in data): - self.on_success(data) - - except: # socket.error has been seen - self.q.put(OandaStreamError().error_response) - break - - def on_success(self, data): - if 'tick' in data: - self.q.put(data['tick']) - elif 'transaction' in data: - self.q.put(data['transaction']) - - def on_error(self, data): - self.disconnect() - self.q.put(OandaStreamError(data).error_response) - - -class MetaSingleton(MetaParams): - '''Metaclass to make a metaclassed class a singleton''' - def __init__(cls, name, bases, dct): - super(MetaSingleton, cls).__init__(name, bases, dct) - cls._singleton = None - - def __call__(cls, *args, **kwargs): - if cls._singleton is None: - cls._singleton = ( - super(MetaSingleton, cls).__call__(*args, **kwargs)) - - return cls._singleton - - -class OandaStore(with_metaclass(MetaSingleton, object)): - '''Singleton class wrapping to control the connections to Oanda. - - Params: - - - ``token`` (default:``None``): API access token - - - ``account`` (default: ``None``): account id - - - ``practice`` (default: ``False``): use the test environment - - - ``account_tmout`` (default: ``10.0``): refresh period for account - value/cash refresh - ''' - - BrokerCls = None # broker class will autoregister - DataCls = None # data class will auto register - - params = ( - ('token', ''), - ('account', ''), - ('practice', False), - ('account_tmout', 10.0), # account balance refresh timeout - ) - - _DTEPOCH = datetime(1970, 1, 1) - _ENVPRACTICE = 'practice' - _ENVLIVE = 'live' - - @classmethod - def getdata(cls, *args, **kwargs): - '''Returns ``DataCls`` with args, kwargs''' - return cls.DataCls(*args, **kwargs) - - @classmethod - def getbroker(cls, *args, **kwargs): - '''Returns broker with *args, **kwargs from registered ``BrokerCls``''' - return cls.BrokerCls(*args, **kwargs) - - def __init__(self): - super(OandaStore, self).__init__() - - self.notifs = collections.deque() # store notifications for cerebro - - self._env = None # reference to cerebro for general notifications - self.broker = None # broker instance - self.datas = list() # datas that have registered over start - - self._orders = collections.OrderedDict() # map order.ref to oid - self._ordersrev = collections.OrderedDict() # map oid to order.ref - self._transpend = collections.defaultdict(collections.deque) - - self._oenv = self._ENVPRACTICE if self.p.practice else self._ENVLIVE - self.oapi = API(environment=self._oenv, - access_token=self.p.token, - headers={'X-Accept-Datetime-Format': 'UNIX'}) - - self._cash = 0.0 - self._value = 0.0 - self._evt_acct = threading.Event() - - def start(self, data=None, broker=None): - # Datas require some processing to kickstart data reception - if data is None and broker is None: - self.cash = None - return - - if data is not None: - self._env = data._env - # For datas simulate a queue with None to kickstart co - self.datas.append(data) - - if self.broker is not None: - self.broker.data_started(data) - - elif broker is not None: - self.broker = broker - self.streaming_events() - self.broker_threads() - - def stop(self): - # signal end of thread - if self.broker is not None: - self.q_ordercreate.put(None) - self.q_orderclose.put(None) - self.q_account.put(None) - - def put_notification(self, msg, *args, **kwargs): - self.notifs.append((msg, args, kwargs)) - - def get_notifications(self): - '''Return the pending "store" notifications''' - self.notifs.append(None) # put a mark / threads could still append - return [x for x in iter(self.notifs.popleft, None)] - - # Oanda supported granularities - _GRANULARITIES = { - (bt.TimeFrame.Seconds, 5): 'S5', - (bt.TimeFrame.Seconds, 10): 'S10', - (bt.TimeFrame.Seconds, 15): 'S15', - (bt.TimeFrame.Seconds, 30): 'S30', - (bt.TimeFrame.Minutes, 1): 'M1', - (bt.TimeFrame.Minutes, 2): 'M3', - (bt.TimeFrame.Minutes, 3): 'M3', - (bt.TimeFrame.Minutes, 4): 'M4', - (bt.TimeFrame.Minutes, 5): 'M5', - (bt.TimeFrame.Minutes, 10): 'M5', - (bt.TimeFrame.Minutes, 15): 'M5', - (bt.TimeFrame.Minutes, 30): 'M5', - (bt.TimeFrame.Minutes, 60): 'H1', - (bt.TimeFrame.Minutes, 120): 'H2', - (bt.TimeFrame.Minutes, 180): 'H3', - (bt.TimeFrame.Minutes, 240): 'H4', - (bt.TimeFrame.Minutes, 360): 'H6', - (bt.TimeFrame.Minutes, 480): 'H8', - (bt.TimeFrame.Days, 1): 'D', - (bt.TimeFrame.Weeks, 1): 'W', - (bt.TimeFrame.Months, 1): 'M', - } - - def get_positions(self): - try: - positions = self.oapi.get_positions(self.p.account) - except (oandapy.OandaError, OandaRequestError,): - return None - - poslist = positions.get('positions', []) - return poslist - - def get_granularity(self, timeframe, compression): - return self._GRANULARITIES.get((timeframe, compression), None) - - def get_instrument(self, dataname): - try: - insts = self.oapi.get_instruments(self.p.account, - instruments=dataname) - except (oandapy.OandaError, OandaRequestError,): - return None - - i = insts.get('instruments', [{}]) - return i[0] or None - - def streaming_events(self, tmout=None): - q = queue.Queue() - kwargs = {'q': q, 'tmout': tmout} - - t = threading.Thread(target=self._t_streaming_listener, kwargs=kwargs) - t.daemon = True - t.start() - - t = threading.Thread(target=self._t_streaming_events, kwargs=kwargs) - t.daemon = True - t.start() - return q - - def _t_streaming_listener(self, q, tmout=None): - while True: - trans = q.get() - self._transaction(trans) - - def _t_streaming_events(self, q, tmout=None): - if tmout is not None: - _time.sleep(tmout) - - streamer = Streamer(q, - environment=self._oenv, - access_token=self.p.token, - headers={'X-Accept-Datetime-Format': 'UNIX'}) - - streamer.events(ignore_heartbeat=False) - - def candles(self, dataname, dtbegin, dtend, timeframe, compression, - candleFormat, includeFirst): - - kwargs = locals().copy() - kwargs.pop('self') - kwargs['q'] = q = queue.Queue() - t = threading.Thread(target=self._t_candles, kwargs=kwargs) - t.daemon = True - t.start() - return q - - def _t_candles(self, dataname, dtbegin, dtend, timeframe, compression, - candleFormat, includeFirst, q): - - granularity = self.get_granularity(timeframe, compression) - if granularity is None: - e = OandaTimeFrameError() - q.put(e.error_response) - return - - dtkwargs = {} - if dtbegin is not None: - dtkwargs['start'] = int((dtbegin - self._DTEPOCH).total_seconds()) - - if dtend is not None: - dtkwargs['end'] = int((dtend - self._DTEPOCH).total_seconds()) - - try: - response = self.oapi.get_history(instrument=dataname, - granularity=granularity, - candleFormat=candleFormat, - **dtkwargs) - - except oandapy.OandaError as e: - q.put(e.error_response) - q.put(None) - return - - for candle in response.get('candles', []): - q.put(candle) - - q.put({}) # end of transmission - - def streaming_prices(self, dataname, tmout=None): - q = queue.Queue() - kwargs = {'q': q, 'dataname': dataname, 'tmout': tmout} - t = threading.Thread(target=self._t_streaming_prices, kwargs=kwargs) - t.daemon = True - t.start() - return q - - def _t_streaming_prices(self, dataname, q, tmout): - if tmout is not None: - _time.sleep(tmout) - - streamer = Streamer(q, environment=self._oenv, - access_token=self.p.token, - headers={'X-Accept-Datetime-Format': 'UNIX'}) - - streamer.rates(self.p.account, instruments=dataname) - - def get_cash(self): - return self._cash - - def get_value(self): - return self._value - - _ORDEREXECS = { - bt.Order.Market: 'market', - bt.Order.Limit: 'limit', - bt.Order.Stop: 'stop', - bt.Order.StopLimit: 'stop', - } - - def broker_threads(self): - self.q_account = queue.Queue() - self.q_account.put(True) # force an immediate update - t = threading.Thread(target=self._t_account) - t.daemon = True - t.start() - - self.q_ordercreate = queue.Queue() - t = threading.Thread(target=self._t_order_create) - t.daemon = True - t.start() - - self.q_orderclose = queue.Queue() - t = threading.Thread(target=self._t_order_cancel) - t.daemon = True - t.start() - - # Wait once for the values to be set - self._evt_acct.wait(self.p.account_tmout) - - def _t_account(self): - while True: - try: - msg = self.q_account.get(timeout=self.p.account_tmout) - if msg is None: - break # end of thread - except queue.Empty: # tmout -> time to refresh - pass - - try: - accinfo = self.oapi.get_account(self.p.account) - except Exception as e: - self.put_notification(e) - continue - - try: - self._cash = accinfo['marginAvail'] - self._value = accinfo['balance'] - except KeyError: - pass - - self._evt_acct.set() - - def order_create(self, order, stopside=None, takeside=None, **kwargs): - okwargs = dict() - okwargs['instrument'] = order.data._dataname - okwargs['units'] = abs(order.created.size) - okwargs['side'] = 'buy' if order.isbuy() else 'sell' - okwargs['type'] = self._ORDEREXECS[order.exectype] - if order.exectype != bt.Order.Market: - okwargs['price'] = order.created.price - if order.valid is None: - # 1 year and datetime.max fail ... 1 month works - valid = datetime.utcnow() + timedelta(days=30) - else: - valid = order.data.num2date(order.valid) - # To timestamp with seconds precision - okwargs['expiry'] = int((valid - self._DTEPOCH).total_seconds()) - - if order.exectype == bt.Order.StopLimit: - okwargs['lowerBound'] = order.created.pricelimit - okwargs['upperBound'] = order.created.pricelimit - - if order.exectype == bt.Order.StopTrail: - okwargs['trailingStop'] = order.trailamount - - if stopside is not None: - okwargs['stopLoss'] = stopside.price - - if takeside is not None: - okwargs['takeProfit'] = takeside.price - - okwargs.update(**kwargs) # anything from the user - - self.q_ordercreate.put((order.ref, okwargs,)) - return order - - _OIDSINGLE = ['orderOpened', 'tradeOpened', 'tradeReduced'] - _OIDMULTIPLE = ['tradesClosed'] - - def _t_order_create(self): - while True: - msg = self.q_ordercreate.get() - if msg is None: - break - - oref, okwargs = msg - try: - o = self.oapi.create_order(self.p.account, **okwargs) - except Exception as e: - self.put_notification(e) - self.broker._reject(oref) - return - - # Ids are delivered in different fields and all must be fetched to - # match them (as executions) to the order generated here - oids = list() - for oidfield in self._OIDSINGLE: - if oidfield in o and 'id' in o[oidfield]: - oids.append(o[oidfield]['id']) - - for oidfield in self._OIDMULTIPLE: - if oidfield in o: - for suboidfield in o[oidfield]: - oids.append(suboidfield['id']) - - if not oids: - self.broker._reject(oref) - return - - self._orders[oref] = oids[0] - self.broker._submit(oref) - if okwargs['type'] == 'market': - self.broker._accept(oref) # taken immediately - - for oid in oids: - self._ordersrev[oid] = oref # maps ids to backtrader order - - # An transaction may have happened and was stored - tpending = self._transpend[oid] - tpending.append(None) # eom marker - while True: - trans = tpending.popleft() - if trans is None: - break - self._process_transaction(oid, trans) - - def order_cancel(self, order): - self.q_orderclose.put(order.ref) - return order - - def _t_order_cancel(self): - while True: - oref = self.q_orderclose.get() - if oref is None: - break - - oid = self._orders.get(oref, None) - if oid is None: - continue # the order is no longer there - try: - o = self.oapi.close_order(self.p.account, oid) - except Exception as e: - continue # not cancelled - FIXME: notify - - self.broker._cancel(oref) - - _X_ORDER_CREATE = ('STOP_ORDER_CREATE', - 'LIMIT_ORDER_CREATE', 'MARKET_IF_TOUCHED_ORDER_CREATE',) - - def _transaction(self, trans): - # Invoked from Streaming Events. May actually receive an event for an - # oid which has not yet been returned after creating an order. Hence - # store if not yet seen, else forward to processer - ttype = trans['type'] - if ttype == 'MARKET_ORDER_CREATE': - try: - oid = trans['tradeReduced']['id'] - except KeyError: - try: - oid = trans['tradeOpened']['id'] - except KeyError: - return # cannot do anything else - - elif ttype in self._X_ORDER_CREATE: - oid = trans['id'] - elif ttype == 'ORDER_FILLED': - oid = trans['orderId'] - - elif ttype == 'ORDER_CANCEL': - oid = trans['orderId'] - - elif ttype == 'TRADE_CLOSE': - oid = trans['id'] - pid = trans['tradeId'] - if pid in self._orders and False: # Know nothing about trade - return # can do nothing - - # Skip above - at the moment do nothing - # Received directly from an event in the WebGUI for example which - # closes an existing position related to order with id -> pid - # COULD BE DONE: Generate a fake counter order to gracefully - # close the existing position - msg = ('Received TRADE_CLOSE for unknown order, possibly generated' - ' over a different client or GUI') - self.put_notification(msg, trans) - return - - else: # Go aways gracefully - try: - oid = trans['id'] - except KeyError: - oid = 'None' - - msg = 'Received {} with oid {}. Unknown situation' - msg = msg.format(ttype, oid) - self.put_notification(msg, trans) - return - - try: - oref = self._ordersrev[oid] - self._process_transaction(oid, trans) - except KeyError: # not yet seen, keep as pending - self._transpend[oid].append(trans) - - _X_ORDER_FILLED = ('MARKET_ORDER_CREATE', - 'ORDER_FILLED', 'TAKE_PROFIT_FILLED', - 'STOP_LOSS_FILLED', 'TRAILING_STOP_FILLED',) - - def _process_transaction(self, oid, trans): - try: - oref = self._ordersrev.pop(oid) - except KeyError: - return - - ttype = trans['type'] - - if ttype in self._X_ORDER_FILLED: - size = trans['units'] - if trans['side'] == 'sell': - size = -size - price = trans['price'] - self.broker._fill(oref, size, price, ttype=ttype) - - elif ttype in self._X_ORDER_CREATE: - self.broker._accept(oref) - self._ordersrev[oid] = oref - - elif ttype in 'ORDER_CANCEL': - reason = trans['reason'] - if reason == 'ORDER_FILLED': - pass # individual execs have done the job - elif reason == 'TIME_IN_FORCE_EXPIRED': - self.broker._expire(oref) - elif reason == 'CLIENT_REQUEST': - self.broker._cancel(oref) - else: # default action ... if nothing else - self.broker._reject(oref) diff --git a/spaces/Liu-LAB/GPT-academic/crazy_functions/test_project/cpp/cppipc/shm.cpp b/spaces/Liu-LAB/GPT-academic/crazy_functions/test_project/cpp/cppipc/shm.cpp deleted file mode 100644 index 593ce3129dc1574dbc8fc8b088cf595df215de93..0000000000000000000000000000000000000000 --- a/spaces/Liu-LAB/GPT-academic/crazy_functions/test_project/cpp/cppipc/shm.cpp +++ /dev/null @@ -1,103 +0,0 @@ - -#include -#include - -#include "libipc/shm.h" - -#include "libipc/utility/pimpl.h" -#include "libipc/memory/resource.h" - -namespace ipc { -namespace shm { - -class handle::handle_ : public pimpl { -public: - shm::id_t id_ = nullptr; - void* m_ = nullptr; - - ipc::string n_; - std::size_t s_ = 0; -}; - -handle::handle() - : p_(p_->make()) { -} - -handle::handle(char const * name, std::size_t size, unsigned mode) - : handle() { - acquire(name, size, mode); -} - -handle::handle(handle&& rhs) - : handle() { - swap(rhs); -} - -handle::~handle() { - release(); - p_->clear(); -} - -void handle::swap(handle& rhs) { - std::swap(p_, rhs.p_); -} - -handle& handle::operator=(handle rhs) { - swap(rhs); - return *this; -} - -bool handle::valid() const noexcept { - return impl(p_)->m_ != nullptr; -} - -std::size_t handle::size() const noexcept { - return impl(p_)->s_; -} - -char const * handle::name() const noexcept { - return impl(p_)->n_.c_str(); -} - -std::int32_t handle::ref() const noexcept { - return shm::get_ref(impl(p_)->id_); -} - -void handle::sub_ref() noexcept { - shm::sub_ref(impl(p_)->id_); -} - -bool handle::acquire(char const * name, std::size_t size, unsigned mode) { - release(); - impl(p_)->id_ = shm::acquire((impl(p_)->n_ = name).c_str(), size, mode); - impl(p_)->m_ = shm::get_mem(impl(p_)->id_, &(impl(p_)->s_)); - return valid(); -} - -std::int32_t handle::release() { - if (impl(p_)->id_ == nullptr) return -1; - return shm::release(detach()); -} - -void* handle::get() const { - return impl(p_)->m_; -} - -void handle::attach(id_t id) { - if (id == nullptr) return; - release(); - impl(p_)->id_ = id; - impl(p_)->m_ = shm::get_mem(impl(p_)->id_, &(impl(p_)->s_)); -} - -id_t handle::detach() { - auto old = impl(p_)->id_; - impl(p_)->id_ = nullptr; - impl(p_)->m_ = nullptr; - impl(p_)->s_ = 0; - impl(p_)->n_.clear(); - return old; -} - -} // namespace shm -} // namespace ipc diff --git a/spaces/Loren/Streamlit_OCR_comparator/configs/_base_/schedules/schedule_sgd_1500e.py b/spaces/Loren/Streamlit_OCR_comparator/configs/_base_/schedules/schedule_sgd_1500e.py deleted file mode 100644 index 3368175eceafdd019087461c51643a08e2e06d95..0000000000000000000000000000000000000000 --- a/spaces/Loren/Streamlit_OCR_comparator/configs/_base_/schedules/schedule_sgd_1500e.py +++ /dev/null @@ -1,8 +0,0 @@ -# optimizer -optimizer = dict(type='SGD', lr=1e-3, momentum=0.90, weight_decay=5e-4) -optimizer_config = dict(grad_clip=None) -# learning policy -lr_config = dict(policy='poly', power=0.9, min_lr=1e-7, by_epoch=True) -# running settings -runner = dict(type='EpochBasedRunner', max_epochs=1500) -checkpoint_config = dict(interval=100) diff --git a/spaces/LuxOAI/ChatGpt-Web/app/store/config.ts b/spaces/LuxOAI/ChatGpt-Web/app/store/config.ts deleted file mode 100644 index 6d81c10072fdd7aeac981655edf53a79ad0222b7..0000000000000000000000000000000000000000 --- a/spaces/LuxOAI/ChatGpt-Web/app/store/config.ts +++ /dev/null @@ -1,206 +0,0 @@ -import { create } from "zustand"; -import { persist } from "zustand/middleware"; -import { StoreKey } from "../constant"; - -export enum SubmitKey { - Enter = "Enter", - CtrlEnter = "Ctrl + Enter", - ShiftEnter = "Shift + Enter", - AltEnter = "Alt + Enter", - MetaEnter = "Meta + Enter", -} - -export enum Theme { - Auto = "auto", - Dark = "dark", - Light = "light", -} - -export const DEFAULT_CONFIG = { - bot: "Lemur" as BotType, - submitKey: SubmitKey.Enter as SubmitKey, - avatar: "1f603", - fontSize: 14, - theme: Theme.Auto as Theme, - tightBorder: false, - sendPreviewBubble: true, - sidebarWidth: 300, - - disablePromptHint: false, - - dontShowMaskSplashScreen: false, // dont show splash screen when create chat - - modelConfig: { - model: "gpt-3.5-turbo" as ModelType, - temperature: 1, - max_tokens: 2000, - presence_penalty: 0, - sendMemory: true, - historyMessageCount: 8, - compressMessageLengthThreshold: 1000, - }, -}; - -export type ChatConfig = typeof DEFAULT_CONFIG; - -export type ChatConfigStore = ChatConfig & { - reset: () => void; - update: (updater: (config: ChatConfig) => void) => void; -}; - -export type ModelConfig = ChatConfig["modelConfig"]; - -const ENABLE_GPT4 = true; - -export const ALL_MODELS = [ - { - name: "gpt-4", - available: ENABLE_GPT4, - }, - { - name: "gpt-4-0314", - available: ENABLE_GPT4, - }, - { - name: "gpt-4-32k", - available: ENABLE_GPT4, - }, - { - name: "gpt-4-32k-0314", - available: ENABLE_GPT4, - }, - { - name: "gpt-3.5-turbo", - available: true, - }, - { - name: "gpt-3.5-turbo-0301", - available: true, - }, - { - name: "qwen-v1", // 通义千问 - available: false, - }, - { - name: "ernie", // 文心一言 - available: false, - }, - { - name: "spark", // 讯飞星火 - available: false, - }, - { - name: "llama", // llama - available: false, - }, - { - name: "chatglm", // chatglm-6b - available: false, - }, -] as const; - -export const ALL_BOT = [ - { - name: "OpenAI", - available: true, - }, - { - name: "OpenAI绘画", - available: true, - }, - { - name: "必应", - available: true, - }, - // { - // name: "必应绘画", - // available: true, - // }, - { - name: "万卷", - available: true, - }, - { - name: "Lemur", - available: true, - }, -]; - -export type BotType = (typeof ALL_BOT)[number]["name"]; -export type ModelType = (typeof ALL_MODELS)[number]["name"]; - -export function limitNumber( - x: number, - min: number, - max: number, - defaultValue: number, -) { - if (typeof x !== "number" || isNaN(x)) { - return defaultValue; - } - - return Math.min(max, Math.max(min, x)); -} - -export function limitModel(name: string) { - return ALL_MODELS.some((m) => m.name === name && m.available) - ? name - : ALL_MODELS[4].name; -} - -export function limitBot(name: string) { - return ALL_BOT.some((m) => m.name === name && m.available) - ? name - : ALL_BOT[4].name; -} - -export const ModalConfigValidator = { - bot(x: string) { - return limitBot(x) as BotType; - }, - model(x: string) { - return limitModel(x) as ModelType; - }, - max_tokens(x: number) { - return limitNumber(x, 0, 32000, 2000); - }, - presence_penalty(x: number) { - return limitNumber(x, -2, 2, 0); - }, - temperature(x: number) { - return limitNumber(x, 0, 1, 1); - }, -}; - -export const useAppConfig = create()( - persist( - (set, get) => ({ - ...DEFAULT_CONFIG, - - reset() { - set(() => ({ ...DEFAULT_CONFIG })); - }, - - update(updater) { - const config = { ...get() }; - updater(config); - set(() => config); - }, - }), - { - name: StoreKey.Config, - version: 2, - migrate(persistedState, version) { - if (version === 2) return persistedState as any; - - const state = persistedState as ChatConfig; - state.modelConfig.sendMemory = true; - state.modelConfig.historyMessageCount = 4; - state.modelConfig.compressMessageLengthThreshold = 1000; - state.dontShowMaskSplashScreen = false; - - return state; - }, - }, - ), -); diff --git a/spaces/Lynx1221/rvc-test1/infer_pack/attentions.py b/spaces/Lynx1221/rvc-test1/infer_pack/attentions.py deleted file mode 100644 index 77cb63ffccf3e33badf22d50862a64ba517b487f..0000000000000000000000000000000000000000 --- a/spaces/Lynx1221/rvc-test1/infer_pack/attentions.py +++ /dev/null @@ -1,417 +0,0 @@ -import copy -import math -import numpy as np -import torch -from torch import nn -from torch.nn import functional as F - -from infer_pack import commons -from infer_pack import modules -from infer_pack.modules import LayerNorm - - -class Encoder(nn.Module): - def __init__( - self, - hidden_channels, - filter_channels, - n_heads, - n_layers, - kernel_size=1, - p_dropout=0.0, - window_size=10, - **kwargs - ): - super().__init__() - self.hidden_channels = hidden_channels - self.filter_channels = filter_channels - self.n_heads = n_heads - self.n_layers = n_layers - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.window_size = window_size - - self.drop = nn.Dropout(p_dropout) - self.attn_layers = nn.ModuleList() - self.norm_layers_1 = nn.ModuleList() - self.ffn_layers = nn.ModuleList() - self.norm_layers_2 = nn.ModuleList() - for i in range(self.n_layers): - self.attn_layers.append( - MultiHeadAttention( - hidden_channels, - hidden_channels, - n_heads, - p_dropout=p_dropout, - window_size=window_size, - ) - ) - self.norm_layers_1.append(LayerNorm(hidden_channels)) - self.ffn_layers.append( - FFN( - hidden_channels, - hidden_channels, - filter_channels, - kernel_size, - p_dropout=p_dropout, - ) - ) - self.norm_layers_2.append(LayerNorm(hidden_channels)) - - def forward(self, x, x_mask): - attn_mask = x_mask.unsqueeze(2) * x_mask.unsqueeze(-1) - x = x * x_mask - for i in range(self.n_layers): - y = self.attn_layers[i](x, x, attn_mask) - y = self.drop(y) - x = self.norm_layers_1[i](x + y) - - y = self.ffn_layers[i](x, x_mask) - y = self.drop(y) - x = self.norm_layers_2[i](x + y) - x = x * x_mask - return x - - -class Decoder(nn.Module): - def __init__( - self, - hidden_channels, - filter_channels, - n_heads, - n_layers, - kernel_size=1, - p_dropout=0.0, - proximal_bias=False, - proximal_init=True, - **kwargs - ): - super().__init__() - self.hidden_channels = hidden_channels - self.filter_channels = filter_channels - self.n_heads = n_heads - self.n_layers = n_layers - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.proximal_bias = proximal_bias - self.proximal_init = proximal_init - - self.drop = nn.Dropout(p_dropout) - self.self_attn_layers = nn.ModuleList() - self.norm_layers_0 = nn.ModuleList() - self.encdec_attn_layers = nn.ModuleList() - self.norm_layers_1 = nn.ModuleList() - self.ffn_layers = nn.ModuleList() - self.norm_layers_2 = nn.ModuleList() - for i in range(self.n_layers): - self.self_attn_layers.append( - MultiHeadAttention( - hidden_channels, - hidden_channels, - n_heads, - p_dropout=p_dropout, - proximal_bias=proximal_bias, - proximal_init=proximal_init, - ) - ) - self.norm_layers_0.append(LayerNorm(hidden_channels)) - self.encdec_attn_layers.append( - MultiHeadAttention( - hidden_channels, hidden_channels, n_heads, p_dropout=p_dropout - ) - ) - self.norm_layers_1.append(LayerNorm(hidden_channels)) - self.ffn_layers.append( - FFN( - hidden_channels, - hidden_channels, - filter_channels, - kernel_size, - p_dropout=p_dropout, - causal=True, - ) - ) - self.norm_layers_2.append(LayerNorm(hidden_channels)) - - def forward(self, x, x_mask, h, h_mask): - """ - x: decoder input - h: encoder output - """ - self_attn_mask = commons.subsequent_mask(x_mask.size(2)).to( - device=x.device, dtype=x.dtype - ) - encdec_attn_mask = h_mask.unsqueeze(2) * x_mask.unsqueeze(-1) - x = x * x_mask - for i in range(self.n_layers): - y = self.self_attn_layers[i](x, x, self_attn_mask) - y = self.drop(y) - x = self.norm_layers_0[i](x + y) - - y = self.encdec_attn_layers[i](x, h, encdec_attn_mask) - y = self.drop(y) - x = self.norm_layers_1[i](x + y) - - y = self.ffn_layers[i](x, x_mask) - y = self.drop(y) - x = self.norm_layers_2[i](x + y) - x = x * x_mask - return x - - -class MultiHeadAttention(nn.Module): - def __init__( - self, - channels, - out_channels, - n_heads, - p_dropout=0.0, - window_size=None, - heads_share=True, - block_length=None, - proximal_bias=False, - proximal_init=False, - ): - super().__init__() - assert channels % n_heads == 0 - - self.channels = channels - self.out_channels = out_channels - self.n_heads = n_heads - self.p_dropout = p_dropout - self.window_size = window_size - self.heads_share = heads_share - self.block_length = block_length - self.proximal_bias = proximal_bias - self.proximal_init = proximal_init - self.attn = None - - self.k_channels = channels // n_heads - self.conv_q = nn.Conv1d(channels, channels, 1) - self.conv_k = nn.Conv1d(channels, channels, 1) - self.conv_v = nn.Conv1d(channels, channels, 1) - self.conv_o = nn.Conv1d(channels, out_channels, 1) - self.drop = nn.Dropout(p_dropout) - - if window_size is not None: - n_heads_rel = 1 if heads_share else n_heads - rel_stddev = self.k_channels**-0.5 - self.emb_rel_k = nn.Parameter( - torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels) - * rel_stddev - ) - self.emb_rel_v = nn.Parameter( - torch.randn(n_heads_rel, window_size * 2 + 1, self.k_channels) - * rel_stddev - ) - - nn.init.xavier_uniform_(self.conv_q.weight) - nn.init.xavier_uniform_(self.conv_k.weight) - nn.init.xavier_uniform_(self.conv_v.weight) - if proximal_init: - with torch.no_grad(): - self.conv_k.weight.copy_(self.conv_q.weight) - self.conv_k.bias.copy_(self.conv_q.bias) - - def forward(self, x, c, attn_mask=None): - q = self.conv_q(x) - k = self.conv_k(c) - v = self.conv_v(c) - - x, self.attn = self.attention(q, k, v, mask=attn_mask) - - x = self.conv_o(x) - return x - - def attention(self, query, key, value, mask=None): - # reshape [b, d, t] -> [b, n_h, t, d_k] - b, d, t_s, t_t = (*key.size(), query.size(2)) - query = query.view(b, self.n_heads, self.k_channels, t_t).transpose(2, 3) - key = key.view(b, self.n_heads, self.k_channels, t_s).transpose(2, 3) - value = value.view(b, self.n_heads, self.k_channels, t_s).transpose(2, 3) - - scores = torch.matmul(query / math.sqrt(self.k_channels), key.transpose(-2, -1)) - if self.window_size is not None: - assert ( - t_s == t_t - ), "Relative attention is only available for self-attention." - key_relative_embeddings = self._get_relative_embeddings(self.emb_rel_k, t_s) - rel_logits = self._matmul_with_relative_keys( - query / math.sqrt(self.k_channels), key_relative_embeddings - ) - scores_local = self._relative_position_to_absolute_position(rel_logits) - scores = scores + scores_local - if self.proximal_bias: - assert t_s == t_t, "Proximal bias is only available for self-attention." - scores = scores + self._attention_bias_proximal(t_s).to( - device=scores.device, dtype=scores.dtype - ) - if mask is not None: - scores = scores.masked_fill(mask == 0, -1e4) - if self.block_length is not None: - assert ( - t_s == t_t - ), "Local attention is only available for self-attention." - block_mask = ( - torch.ones_like(scores) - .triu(-self.block_length) - .tril(self.block_length) - ) - scores = scores.masked_fill(block_mask == 0, -1e4) - p_attn = F.softmax(scores, dim=-1) # [b, n_h, t_t, t_s] - p_attn = self.drop(p_attn) - output = torch.matmul(p_attn, value) - if self.window_size is not None: - relative_weights = self._absolute_position_to_relative_position(p_attn) - value_relative_embeddings = self._get_relative_embeddings( - self.emb_rel_v, t_s - ) - output = output + self._matmul_with_relative_values( - relative_weights, value_relative_embeddings - ) - output = ( - output.transpose(2, 3).contiguous().view(b, d, t_t) - ) # [b, n_h, t_t, d_k] -> [b, d, t_t] - return output, p_attn - - def _matmul_with_relative_values(self, x, y): - """ - x: [b, h, l, m] - y: [h or 1, m, d] - ret: [b, h, l, d] - """ - ret = torch.matmul(x, y.unsqueeze(0)) - return ret - - def _matmul_with_relative_keys(self, x, y): - """ - x: [b, h, l, d] - y: [h or 1, m, d] - ret: [b, h, l, m] - """ - ret = torch.matmul(x, y.unsqueeze(0).transpose(-2, -1)) - return ret - - def _get_relative_embeddings(self, relative_embeddings, length): - max_relative_position = 2 * self.window_size + 1 - # Pad first before slice to avoid using cond ops. - pad_length = max(length - (self.window_size + 1), 0) - slice_start_position = max((self.window_size + 1) - length, 0) - slice_end_position = slice_start_position + 2 * length - 1 - if pad_length > 0: - padded_relative_embeddings = F.pad( - relative_embeddings, - commons.convert_pad_shape([[0, 0], [pad_length, pad_length], [0, 0]]), - ) - else: - padded_relative_embeddings = relative_embeddings - used_relative_embeddings = padded_relative_embeddings[ - :, slice_start_position:slice_end_position - ] - return used_relative_embeddings - - def _relative_position_to_absolute_position(self, x): - """ - x: [b, h, l, 2*l-1] - ret: [b, h, l, l] - """ - batch, heads, length, _ = x.size() - # Concat columns of pad to shift from relative to absolute indexing. - x = F.pad(x, commons.convert_pad_shape([[0, 0], [0, 0], [0, 0], [0, 1]])) - - # Concat extra elements so to add up to shape (len+1, 2*len-1). - x_flat = x.view([batch, heads, length * 2 * length]) - x_flat = F.pad( - x_flat, commons.convert_pad_shape([[0, 0], [0, 0], [0, length - 1]]) - ) - - # Reshape and slice out the padded elements. - x_final = x_flat.view([batch, heads, length + 1, 2 * length - 1])[ - :, :, :length, length - 1 : - ] - return x_final - - def _absolute_position_to_relative_position(self, x): - """ - x: [b, h, l, l] - ret: [b, h, l, 2*l-1] - """ - batch, heads, length, _ = x.size() - # padd along column - x = F.pad( - x, commons.convert_pad_shape([[0, 0], [0, 0], [0, 0], [0, length - 1]]) - ) - x_flat = x.view([batch, heads, length**2 + length * (length - 1)]) - # add 0's in the beginning that will skew the elements after reshape - x_flat = F.pad(x_flat, commons.convert_pad_shape([[0, 0], [0, 0], [length, 0]])) - x_final = x_flat.view([batch, heads, length, 2 * length])[:, :, :, 1:] - return x_final - - def _attention_bias_proximal(self, length): - """Bias for self-attention to encourage attention to close positions. - Args: - length: an integer scalar. - Returns: - a Tensor with shape [1, 1, length, length] - """ - r = torch.arange(length, dtype=torch.float32) - diff = torch.unsqueeze(r, 0) - torch.unsqueeze(r, 1) - return torch.unsqueeze(torch.unsqueeze(-torch.log1p(torch.abs(diff)), 0), 0) - - -class FFN(nn.Module): - def __init__( - self, - in_channels, - out_channels, - filter_channels, - kernel_size, - p_dropout=0.0, - activation=None, - causal=False, - ): - super().__init__() - self.in_channels = in_channels - self.out_channels = out_channels - self.filter_channels = filter_channels - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.activation = activation - self.causal = causal - - if causal: - self.padding = self._causal_padding - else: - self.padding = self._same_padding - - self.conv_1 = nn.Conv1d(in_channels, filter_channels, kernel_size) - self.conv_2 = nn.Conv1d(filter_channels, out_channels, kernel_size) - self.drop = nn.Dropout(p_dropout) - - def forward(self, x, x_mask): - x = self.conv_1(self.padding(x * x_mask)) - if self.activation == "gelu": - x = x * torch.sigmoid(1.702 * x) - else: - x = torch.relu(x) - x = self.drop(x) - x = self.conv_2(self.padding(x * x_mask)) - return x * x_mask - - def _causal_padding(self, x): - if self.kernel_size == 1: - return x - pad_l = self.kernel_size - 1 - pad_r = 0 - padding = [[0, 0], [0, 0], [pad_l, pad_r]] - x = F.pad(x, commons.convert_pad_shape(padding)) - return x - - def _same_padding(self, x): - if self.kernel_size == 1: - return x - pad_l = (self.kernel_size - 1) // 2 - pad_r = self.kernel_size // 2 - padding = [[0, 0], [0, 0], [pad_l, pad_r]] - x = F.pad(x, commons.convert_pad_shape(padding)) - return x diff --git a/spaces/Mahiruoshi/BangDream-Bert-VITS2/utils.py b/spaces/Mahiruoshi/BangDream-Bert-VITS2/utils.py deleted file mode 100644 index 5f98aafadb83a9f341d6d9d3401c6c3101485b4e..0000000000000000000000000000000000000000 --- a/spaces/Mahiruoshi/BangDream-Bert-VITS2/utils.py +++ /dev/null @@ -1,356 +0,0 @@ -import os -import glob -import argparse -import logging -import json -import subprocess -import numpy as np -from scipy.io.wavfile import read -import torch - -MATPLOTLIB_FLAG = False - -logger = logging.getLogger(__name__) - - -def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False): - assert os.path.isfile(checkpoint_path) - checkpoint_dict = torch.load(checkpoint_path, map_location="cpu") - iteration = checkpoint_dict["iteration"] - learning_rate = checkpoint_dict["learning_rate"] - if ( - optimizer is not None - and not skip_optimizer - and checkpoint_dict["optimizer"] is not None - ): - optimizer.load_state_dict(checkpoint_dict["optimizer"]) - elif optimizer is None and not skip_optimizer: - # else: Disable this line if Infer and resume checkpoint,then enable the line upper - new_opt_dict = optimizer.state_dict() - new_opt_dict_params = new_opt_dict["param_groups"][0]["params"] - new_opt_dict["param_groups"] = checkpoint_dict["optimizer"]["param_groups"] - new_opt_dict["param_groups"][0]["params"] = new_opt_dict_params - optimizer.load_state_dict(new_opt_dict) - - saved_state_dict = checkpoint_dict["model"] - if hasattr(model, "module"): - state_dict = model.module.state_dict() - else: - state_dict = model.state_dict() - - new_state_dict = {} - for k, v in state_dict.items(): - try: - # assert "emb_g" not in k - new_state_dict[k] = saved_state_dict[k] - assert saved_state_dict[k].shape == v.shape, ( - saved_state_dict[k].shape, - v.shape, - ) - except: - # For upgrading from the old version - if "ja_bert_proj" in k: - v = torch.zeros_like(v) - logger.warn( - f"Seems you are using the old version of the model, the {k} is automatically set to zero for backward compatibility" - ) - else: - logger.error(f"{k} is not in the checkpoint") - - new_state_dict[k] = v - - if hasattr(model, "module"): - model.module.load_state_dict(new_state_dict, strict=False) - else: - model.load_state_dict(new_state_dict, strict=False) - - logger.info( - "Loaded checkpoint '{}' (iteration {})".format(checkpoint_path, iteration) - ) - - return model, optimizer, learning_rate, iteration - - -def save_checkpoint(model, optimizer, learning_rate, iteration, checkpoint_path): - logger.info( - "Saving model and optimizer state at iteration {} to {}".format( - iteration, checkpoint_path - ) - ) - if hasattr(model, "module"): - state_dict = model.module.state_dict() - else: - state_dict = model.state_dict() - torch.save( - { - "model": state_dict, - "iteration": iteration, - "optimizer": optimizer.state_dict(), - "learning_rate": learning_rate, - }, - checkpoint_path, - ) - - -def summarize( - writer, - global_step, - scalars={}, - histograms={}, - images={}, - audios={}, - audio_sampling_rate=22050, -): - for k, v in scalars.items(): - writer.add_scalar(k, v, global_step) - for k, v in histograms.items(): - writer.add_histogram(k, v, global_step) - for k, v in images.items(): - writer.add_image(k, v, global_step, dataformats="HWC") - for k, v in audios.items(): - writer.add_audio(k, v, global_step, audio_sampling_rate) - - -def latest_checkpoint_path(dir_path, regex="G_*.pth"): - f_list = glob.glob(os.path.join(dir_path, regex)) - f_list.sort(key=lambda f: int("".join(filter(str.isdigit, f)))) - x = f_list[-1] - return x - - -def plot_spectrogram_to_numpy(spectrogram): - global MATPLOTLIB_FLAG - if not MATPLOTLIB_FLAG: - import matplotlib - - matplotlib.use("Agg") - MATPLOTLIB_FLAG = True - mpl_logger = logging.getLogger("matplotlib") - mpl_logger.setLevel(logging.WARNING) - import matplotlib.pylab as plt - import numpy as np - - fig, ax = plt.subplots(figsize=(10, 2)) - im = ax.imshow(spectrogram, aspect="auto", origin="lower", interpolation="none") - plt.colorbar(im, ax=ax) - plt.xlabel("Frames") - plt.ylabel("Channels") - plt.tight_layout() - - fig.canvas.draw() - data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep="") - data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,)) - plt.close() - return data - - -def plot_alignment_to_numpy(alignment, info=None): - global MATPLOTLIB_FLAG - if not MATPLOTLIB_FLAG: - import matplotlib - - matplotlib.use("Agg") - MATPLOTLIB_FLAG = True - mpl_logger = logging.getLogger("matplotlib") - mpl_logger.setLevel(logging.WARNING) - import matplotlib.pylab as plt - import numpy as np - - fig, ax = plt.subplots(figsize=(6, 4)) - im = ax.imshow( - alignment.transpose(), aspect="auto", origin="lower", interpolation="none" - ) - fig.colorbar(im, ax=ax) - xlabel = "Decoder timestep" - if info is not None: - xlabel += "\n\n" + info - plt.xlabel(xlabel) - plt.ylabel("Encoder timestep") - plt.tight_layout() - - fig.canvas.draw() - data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep="") - data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,)) - plt.close() - return data - - -def load_wav_to_torch(full_path): - sampling_rate, data = read(full_path) - return torch.FloatTensor(data.astype(np.float32)), sampling_rate - - -def load_filepaths_and_text(filename, split="|"): - with open(filename, encoding="utf-8") as f: - filepaths_and_text = [line.strip().split(split) for line in f] - return filepaths_and_text - - -def get_hparams(init=True): - parser = argparse.ArgumentParser() - parser.add_argument( - "-c", - "--config", - type=str, - default="./configs/base.json", - help="JSON file for configuration", - ) - parser.add_argument("-m", "--model", type=str, required=True, help="Model name") - - args = parser.parse_args() - model_dir = os.path.join("./logs", args.model) - - if not os.path.exists(model_dir): - os.makedirs(model_dir) - - config_path = args.config - config_save_path = os.path.join(model_dir, "config.json") - if init: - with open(config_path, "r", encoding="utf-8") as f: - data = f.read() - with open(config_save_path, "w", encoding="utf-8") as f: - f.write(data) - else: - with open(config_save_path, "r", vencoding="utf-8") as f: - data = f.read() - config = json.loads(data) - hparams = HParams(**config) - hparams.model_dir = model_dir - return hparams - - -def clean_checkpoints(path_to_models="logs/44k/", n_ckpts_to_keep=2, sort_by_time=True): - """Freeing up space by deleting saved ckpts - - Arguments: - path_to_models -- Path to the model directory - n_ckpts_to_keep -- Number of ckpts to keep, excluding G_0.pth and D_0.pth - sort_by_time -- True -> chronologically delete ckpts - False -> lexicographically delete ckpts - """ - import re - - ckpts_files = [ - f - for f in os.listdir(path_to_models) - if os.path.isfile(os.path.join(path_to_models, f)) - ] - - def name_key(_f): - return int(re.compile("._(\\d+)\\.pth").match(_f).group(1)) - - def time_key(_f): - return os.path.getmtime(os.path.join(path_to_models, _f)) - - sort_key = time_key if sort_by_time else name_key - - def x_sorted(_x): - return sorted( - [f for f in ckpts_files if f.startswith(_x) and not f.endswith("_0.pth")], - key=sort_key, - ) - - to_del = [ - os.path.join(path_to_models, fn) - for fn in (x_sorted("G")[:-n_ckpts_to_keep] + x_sorted("D")[:-n_ckpts_to_keep]) - ] - - def del_info(fn): - return logger.info(f".. Free up space by deleting ckpt {fn}") - - def del_routine(x): - return [os.remove(x), del_info(x)] - - [del_routine(fn) for fn in to_del] - - -def get_hparams_from_dir(model_dir): - config_save_path = os.path.join(model_dir, "config.json") - with open(config_save_path, "r", encoding="utf-8") as f: - data = f.read() - config = json.loads(data) - - hparams = HParams(**config) - hparams.model_dir = model_dir - return hparams - - -def get_hparams_from_file(config_path): - with open(config_path, "r", encoding="utf-8") as f: - data = f.read() - config = json.loads(data) - - hparams = HParams(**config) - return hparams - - -def check_git_hash(model_dir): - source_dir = os.path.dirname(os.path.realpath(__file__)) - if not os.path.exists(os.path.join(source_dir, ".git")): - logger.warn( - "{} is not a git repository, therefore hash value comparison will be ignored.".format( - source_dir - ) - ) - return - - cur_hash = subprocess.getoutput("git rev-parse HEAD") - - path = os.path.join(model_dir, "githash") - if os.path.exists(path): - saved_hash = open(path).read() - if saved_hash != cur_hash: - logger.warn( - "git hash values are different. {}(saved) != {}(current)".format( - saved_hash[:8], cur_hash[:8] - ) - ) - else: - open(path, "w").write(cur_hash) - - -def get_logger(model_dir, filename="train.log"): - global logger - logger = logging.getLogger(os.path.basename(model_dir)) - logger.setLevel(logging.DEBUG) - - formatter = logging.Formatter("%(asctime)s\t%(name)s\t%(levelname)s\t%(message)s") - if not os.path.exists(model_dir): - os.makedirs(model_dir) - h = logging.FileHandler(os.path.join(model_dir, filename)) - h.setLevel(logging.DEBUG) - h.setFormatter(formatter) - logger.addHandler(h) - return logger - - -class HParams: - def __init__(self, **kwargs): - for k, v in kwargs.items(): - if type(v) == dict: - v = HParams(**v) - self[k] = v - - def keys(self): - return self.__dict__.keys() - - def items(self): - return self.__dict__.items() - - def values(self): - return self.__dict__.values() - - def __len__(self): - return len(self.__dict__) - - def __getitem__(self, key): - return getattr(self, key) - - def __setitem__(self, key, value): - return setattr(self, key, value) - - def __contains__(self, key): - return key in self.__dict__ - - def __repr__(self): - return self.__dict__.__repr__() diff --git a/spaces/Make-A-Protagonist/Make-A-Protagonist-inference/Make-A-Protagonist/experts/XMem/inference/interact/fbrs/model/modeling/__init__.py b/spaces/Make-A-Protagonist/Make-A-Protagonist-inference/Make-A-Protagonist/experts/XMem/inference/interact/fbrs/model/modeling/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/spaces/Make-A-Protagonist/Make-A-Protagonist-inference/Make-A-Protagonist/experts/XMem/inference/interact/interaction.py b/spaces/Make-A-Protagonist/Make-A-Protagonist-inference/Make-A-Protagonist/experts/XMem/inference/interact/interaction.py deleted file mode 100644 index 19f83f9d58a00cac079a7ba5c239196378603b64..0000000000000000000000000000000000000000 --- a/spaces/Make-A-Protagonist/Make-A-Protagonist-inference/Make-A-Protagonist/experts/XMem/inference/interact/interaction.py +++ /dev/null @@ -1,252 +0,0 @@ -""" -Contains all the types of interaction related to the GUI -Not related to automatic evaluation in the DAVIS dataset - -You can inherit the Interaction class to create new interaction types -undo is (sometimes partially) supported -""" - - -import torch -import torch.nn.functional as F -import numpy as np -import cv2 -import time -from .interactive_utils import color_map, index_numpy_to_one_hot_torch - - -def aggregate_sbg(prob, keep_bg=False, hard=False): - device = prob.device - k, h, w = prob.shape - ex_prob = torch.zeros((k+1, h, w), device=device) - ex_prob[0] = 0.5 - ex_prob[1:] = prob - ex_prob = torch.clamp(ex_prob, 1e-7, 1-1e-7) - logits = torch.log((ex_prob /(1-ex_prob))) - - if hard: - # Very low temperature o((⊙﹏⊙))o 🥶 - logits *= 1000 - - if keep_bg: - return F.softmax(logits, dim=0) - else: - return F.softmax(logits, dim=0)[1:] - -def aggregate_wbg(prob, keep_bg=False, hard=False): - k, h, w = prob.shape - new_prob = torch.cat([ - torch.prod(1-prob, dim=0, keepdim=True), - prob - ], 0).clamp(1e-7, 1-1e-7) - logits = torch.log((new_prob /(1-new_prob))) - - if hard: - # Very low temperature o((⊙﹏⊙))o 🥶 - logits *= 1000 - - if keep_bg: - return F.softmax(logits, dim=0) - else: - return F.softmax(logits, dim=0)[1:] - -class Interaction: - def __init__(self, image, prev_mask, true_size, controller): - self.image = image - self.prev_mask = prev_mask - self.controller = controller - self.start_time = time.time() - - self.h, self.w = true_size - - self.out_prob = None - self.out_mask = None - - def predict(self): - pass - - -class FreeInteraction(Interaction): - def __init__(self, image, prev_mask, true_size, num_objects): - """ - prev_mask should be index format numpy array - """ - super().__init__(image, prev_mask, true_size, None) - - self.K = num_objects - - self.drawn_map = self.prev_mask.copy() - self.curr_path = [[] for _ in range(self.K + 1)] - - self.size = None - - def set_size(self, size): - self.size = size - - """ - k - object id - vis - a tuple (visualization map, pass through alpha). None if not needed. - """ - def push_point(self, x, y, k, vis=None): - if vis is not None: - vis_map, vis_alpha = vis - selected = self.curr_path[k] - selected.append((x, y)) - if len(selected) >= 2: - cv2.line(self.drawn_map, - (int(round(selected[-2][0])), int(round(selected[-2][1]))), - (int(round(selected[-1][0])), int(round(selected[-1][1]))), - k, thickness=self.size) - - # Plot visualization - if vis is not None: - # Visualization for drawing - if k == 0: - vis_map = cv2.line(vis_map, - (int(round(selected[-2][0])), int(round(selected[-2][1]))), - (int(round(selected[-1][0])), int(round(selected[-1][1]))), - color_map[k], thickness=self.size) - else: - vis_map = cv2.line(vis_map, - (int(round(selected[-2][0])), int(round(selected[-2][1]))), - (int(round(selected[-1][0])), int(round(selected[-1][1]))), - color_map[k], thickness=self.size) - # Visualization on/off boolean filter - vis_alpha = cv2.line(vis_alpha, - (int(round(selected[-2][0])), int(round(selected[-2][1]))), - (int(round(selected[-1][0])), int(round(selected[-1][1]))), - 0.75, thickness=self.size) - - if vis is not None: - return vis_map, vis_alpha - - def end_path(self): - # Complete the drawing - self.curr_path = [[] for _ in range(self.K + 1)] - - def predict(self): - self.out_prob = index_numpy_to_one_hot_torch(self.drawn_map, self.K+1).cuda() - # self.out_prob = torch.from_numpy(self.drawn_map).float().cuda() - # self.out_prob, _ = pad_divide_by(self.out_prob, 16, self.out_prob.shape[-2:]) - # self.out_prob = aggregate_sbg(self.out_prob, keep_bg=True) - return self.out_prob - -class ScribbleInteraction(Interaction): - def __init__(self, image, prev_mask, true_size, controller, num_objects): - """ - prev_mask should be in an indexed form - """ - super().__init__(image, prev_mask, true_size, controller) - - self.K = num_objects - - self.drawn_map = np.empty((self.h, self.w), dtype=np.uint8) - self.drawn_map.fill(255) - # background + k - self.curr_path = [[] for _ in range(self.K + 1)] - self.size = 3 - - """ - k - object id - vis - a tuple (visualization map, pass through alpha). None if not needed. - """ - def push_point(self, x, y, k, vis=None): - if vis is not None: - vis_map, vis_alpha = vis - selected = self.curr_path[k] - selected.append((x, y)) - if len(selected) >= 2: - self.drawn_map = cv2.line(self.drawn_map, - (int(round(selected[-2][0])), int(round(selected[-2][1]))), - (int(round(selected[-1][0])), int(round(selected[-1][1]))), - k, thickness=self.size) - - # Plot visualization - if vis is not None: - # Visualization for drawing - if k == 0: - vis_map = cv2.line(vis_map, - (int(round(selected[-2][0])), int(round(selected[-2][1]))), - (int(round(selected[-1][0])), int(round(selected[-1][1]))), - color_map[k], thickness=self.size) - else: - vis_map = cv2.line(vis_map, - (int(round(selected[-2][0])), int(round(selected[-2][1]))), - (int(round(selected[-1][0])), int(round(selected[-1][1]))), - color_map[k], thickness=self.size) - # Visualization on/off boolean filter - vis_alpha = cv2.line(vis_alpha, - (int(round(selected[-2][0])), int(round(selected[-2][1]))), - (int(round(selected[-1][0])), int(round(selected[-1][1]))), - 0.75, thickness=self.size) - - # Optional vis return - if vis is not None: - return vis_map, vis_alpha - - def end_path(self): - # Complete the drawing - self.curr_path = [[] for _ in range(self.K + 1)] - - def predict(self): - self.out_prob = self.controller.interact(self.image.unsqueeze(0), self.prev_mask, self.drawn_map) - self.out_prob = aggregate_wbg(self.out_prob, keep_bg=True, hard=True) - return self.out_prob - - -class ClickInteraction(Interaction): - def __init__(self, image, prev_mask, true_size, controller, tar_obj): - """ - prev_mask in a prob. form - """ - super().__init__(image, prev_mask, true_size, controller) - self.tar_obj = tar_obj - - # negative/positive for each object - self.pos_clicks = [] - self.neg_clicks = [] - - self.out_prob = self.prev_mask.clone() - - """ - neg - Negative interaction or not - vis - a tuple (visualization map, pass through alpha). None if not needed. - """ - def push_point(self, x, y, neg, vis=None): - # Clicks - if neg: - self.neg_clicks.append((x, y)) - else: - self.pos_clicks.append((x, y)) - - # Do the prediction - self.obj_mask = self.controller.interact(self.image.unsqueeze(0), x, y, not neg) - - # Plot visualization - if vis is not None: - vis_map, vis_alpha = vis - # Visualization for clicks - if neg: - vis_map = cv2.circle(vis_map, - (int(round(x)), int(round(y))), - 2, color_map[0], thickness=-1) - else: - vis_map = cv2.circle(vis_map, - (int(round(x)), int(round(y))), - 2, color_map[self.tar_obj], thickness=-1) - - vis_alpha = cv2.circle(vis_alpha, - (int(round(x)), int(round(y))), - 2, 1, thickness=-1) - - # Optional vis return - return vis_map, vis_alpha - - def predict(self): - self.out_prob = self.prev_mask.clone() - # a small hack to allow the interacting object to overwrite existing masks - # without remembering all the object probabilities - self.out_prob = torch.clamp(self.out_prob, max=0.9) - self.out_prob[self.tar_obj] = self.obj_mask - self.out_prob = aggregate_wbg(self.out_prob[1:], keep_bg=True, hard=True) - return self.out_prob diff --git a/spaces/Makiing/coolb-in-gtest/src/lib/isomorphic/browser.ts b/spaces/Makiing/coolb-in-gtest/src/lib/isomorphic/browser.ts deleted file mode 100644 index de125b1f1786d1618cb1ff47f403d76c6784f4ce..0000000000000000000000000000000000000000 --- a/spaces/Makiing/coolb-in-gtest/src/lib/isomorphic/browser.ts +++ /dev/null @@ -1,11 +0,0 @@ -'use client' - -const debug = console.info.bind(console) - -class WebSocketAlias extends WebSocket { - constructor(address: string | URL, ...args: any) { - super(address) - } -} - -export default { fetch, WebSocket: WebSocketAlias, debug } diff --git a/spaces/MarcCote/ScienceWorld/app.py b/spaces/MarcCote/ScienceWorld/app.py deleted file mode 100644 index 2de72d337cd0dd545a7c2dbf0cd5581c575e508c..0000000000000000000000000000000000000000 --- a/spaces/MarcCote/ScienceWorld/app.py +++ /dev/null @@ -1,96 +0,0 @@ -import streamlit as st -import streamlit.components.v1 as components - -from scienceworld import ScienceWorldEnv - -description = """ -[Project Page](https://sciworld.apps.allenai.org) | [ArXiv Paper](https://arxiv.org/abs/2203.07540) | [Github Repo](https://github.com/allenai/ScienceWorld) -""" -st.title("ScienceWorld Demo") -st.markdown(description) - -# Apply custom CSS. -with open('style.css')as f: - st.markdown(f"", unsafe_allow_html=True) - -env = st.session_state.get("env") -if env is None: - env = ScienceWorldEnv("") - st.session_state["env"] = env - -seed = st.session_state.get("seed") -obs = st.session_state.get("obs") -infos = st.session_state.get("infos") -history = st.session_state.get("history") -if history is None: - history = [] - st.session_state["history"] = history - -def clear_history(): - history.clear() - - -with st.sidebar: - st.title("ScienceWorld Demo") - st.markdown(description) - task = st.selectbox("Task:", env.getTaskNames(), on_change=clear_history) - -if len(history) == 0: - env.load(task, 0, "") - obs, infos = env.reset() - st.session_state["obs"] = obs - st.session_state["infos"] = infos - history.append(("", env.getTaskDescription())) - history.append(("look around", obs)) - -def step(): - act = st.session_state.action - if act: - obs, reward, done, infos = env.step(act) - history.append((act, obs)) - st.session_state["obs"] = obs - st.session_state["infos"] = infos - - if act == "reset": - clear_history() - - -with st.sidebar: - st.warning(env.getTaskDescription()) - st.success(f"Score: {infos['score']}") - - valid_actions = [""] + sorted(infos["valid"]) - if infos['score'] == 100: - valid_actions = ["", "reset"] - - # act = st.selectbox('Action:', options=valid_actions, index=0, on_change=step, key="action") - -for act, obs in history: - if act: - st.write("> " + act) - - if obs: - st.info(obs.replace('\n\t', '\n- ')) - -act = st.selectbox('Action:', options=valid_actions, index=0, on_change=step, key="action") - -st.warning(f"Current score: {infos['score']} out of 100") - -if infos['score'] == 100: - with st.sidebar: - st.balloons() - - st.success("Congratulations! You have completed the task.") - - -# Auto scroll at the bottom of the page. -components.html( -f""" -

    {st.session_state.obs}

    - - -# """, -height=0 -) diff --git a/spaces/Marshalls/testmtd/models/__init__.py b/spaces/Marshalls/testmtd/models/__init__.py deleted file mode 100644 index d119db37faa327a3bd57a60e28ac1e7ec90a507d..0000000000000000000000000000000000000000 --- a/spaces/Marshalls/testmtd/models/__init__.py +++ /dev/null @@ -1,45 +0,0 @@ -print("HIIIIIIOOO") -import importlib -from .base_model import BaseModel -print("HIIIIIIOOO") - -def find_model_using_name(model_name): - # Given the option --model [modelname], - # the file "models/modelname_model.py" - # will be imported. - # task_module = importlib.import_module(task_name) - # model_filename = task_name + ".models." + model_name.lower() + "_model" - model_filename = "models." + model_name.lower() + "_model" - # modellib = importlib.import_module(model_filename, package=task_module) - modellib = importlib.import_module(model_filename) - - # In the file, the class called ModelNameModel() will - # be instantiated. It has to be a subclass of BaseModel, - # and it is case-insensitive. - model = None - target_model_name = model_name.replace('_', '') + 'model' - for name, cls in modellib.__dict__.items(): - if name.lower() == target_model_name.lower() \ - and next(iter(cls.__bases__)).__module__.endswith(BaseModel.__module__): # check that base class is BaseModel - model = cls - - if model is None: - raise NotImplementedError("In %s.py, there should be a subclass of BaseModel with class name that matches %s in lowercase." % (model_filename, target_model_name)) - - return model - - -def get_option_setter(model_name): - model_class = find_model_using_name(model_name) - return model_class.modify_commandline_options - - -def create_model(opt): - instance = create_model_by_name(opt.model, opt) - return instance - -def create_model_by_name(name, opt): - model = find_model_using_name(name) - instance = model(opt) - print("model [%s] was created" % (instance.name())) - return instance diff --git a/spaces/Marshalls/testmtd/models/flowplusplus/__init__.py b/spaces/Marshalls/testmtd/models/flowplusplus/__init__.py deleted file mode 100644 index cc21fd8d0d6301b267c3640a7ca34957cb1d909f..0000000000000000000000000000000000000000 --- a/spaces/Marshalls/testmtd/models/flowplusplus/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from models.flowplusplus.flowplusplus import FlowPlusPlus diff --git a/spaces/MathysL/AutoGPT4/benchmark/__init__.py b/spaces/MathysL/AutoGPT4/benchmark/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/spaces/Matthijs/image2reverb/image2reverb/networks.py b/spaces/Matthijs/image2reverb/image2reverb/networks.py deleted file mode 100644 index d31ae74588b021f2ef201fcb80a79249a79963fc..0000000000000000000000000000000000000000 --- a/spaces/Matthijs/image2reverb/image2reverb/networks.py +++ /dev/null @@ -1,344 +0,0 @@ -import os -import numpy -import torch -import torch.nn as nn -import torchvision.models as models -import torch.utils.model_zoo as model_zoo -from collections import OrderedDict -from .layers import PixelWiseNormLayer, MiniBatchAverageLayer, EqualizedLearningRateLayer, Conv3x3, ConvBlock, upsample - - -class Encoder(nn.Module): - """Load encoder from pre-trained ResNet50 (places365 CNNs) model. Link: http://places2.csail.mit.edu/models_places365/resnet50_places365.pth.tar""" - def __init__(self, model_weights, depth_model, constant_depth=None, device="cuda", train_enc=True): - super().__init__() - self.device = device - self._constant_depth = constant_depth - self.model = models.resnet50(num_classes=365) - - if model_weights: - c = torch.load(model_weights, map_location=self.device) - state_dict = {k.replace("module.", ""): v for k, v in c["state_dict"].items()} - self.model.load_state_dict(state_dict) - - self._has_depth = False - if depth_model: - f = self.model.conv1.weight - self.model.conv1.weight = torch.nn.Parameter(torch.cat((f, torch.randn(64, 1, 7, 7)), 1)) - self.model.to(self.device) - - encoder_path = os.path.join(depth_model, "encoder.pth") - depth_decoder_path = os.path.join(depth_model, "depth.pth") - self.depth_encoder = ResnetEncoder(18, False) - loaded_dict_enc = torch.load(encoder_path, map_location=self.device) - - self.feed_height = loaded_dict_enc["height"] - self.feed_width = loaded_dict_enc["width"] - filtered_dict_enc = {k: v for k, v in loaded_dict_enc.items() if k in self.depth_encoder.state_dict()} - self.depth_encoder.load_state_dict(filtered_dict_enc) - self.depth_encoder.to(self.device) - self.depth_encoder.eval() - - self.depth_decoder = DepthDecoder(num_ch_enc=self.depth_encoder.num_ch_enc, scales=range(4)) - loaded_dict = torch.load(depth_decoder_path, map_location=self.device) - self.depth_decoder.load_state_dict(loaded_dict, strict=False) - self.depth_decoder.to(self.device) - self.depth_decoder.eval() - - self._has_depth = True - - if train_enc: - self.model.train() - - def forward(self, x): - if self._has_depth: - d = torch.full((x.shape[0], 1, x.shape[2], x.shape[3]), self._constant_depth, device=x.device) if self._constant_depth is not None else list(self.depth_decoder(self.depth_encoder(x)).values())[-1] - x = torch.cat((x, d), 1) - return self.model.forward(x).unsqueeze(-1).unsqueeze(-1), x - - -class Generator(nn.Module): - """Build non-progressive variant of GANSynth generator.""" - def __init__(self, latent_size=512, mel_spec=False): # Encoder output should contain 2048 values - super().__init__() - self.latent_size = latent_size - self._mel_spec = mel_spec - self.build_model() - - def forward(self, x): - return self.model(x) - - def build_model(self): - model = [] - # Input block - if self._mel_spec: - model.append(nn.Conv2d(self.latent_size, 256, kernel_size=(4, 2), stride=1, padding=2, bias=False)) - else: - model.append(nn.Conv2d(self.latent_size, 256, kernel_size=8, stride=1, padding=7, bias=False)) # Modified to k=8, p=7 for our image dimensions (i.e. 512x512) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Upsample(scale_factor=2, mode="nearest")) - - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Upsample(scale_factor=2, mode="nearest")) - - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Upsample(scale_factor=2, mode="nearest")) - - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Upsample(scale_factor=2, mode="nearest")) - - model.append(nn.Conv2d(256, 128, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Conv2d(128, 128, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Upsample(scale_factor=2, mode="nearest")) - - model.append(nn.Conv2d(128, 64, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Upsample(scale_factor=2, mode="nearest")) - - model.append(nn.Conv2d(64, 32, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - model.append(nn.Conv2d(32, 32, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(PixelWiseNormLayer()) - - model.append(nn.Conv2d(32, 1, kernel_size=1, stride=1, padding=0, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.Tanh()) - self.model = nn.Sequential(*model) - - -class Discriminator(nn.Module): - def __init__(self, label_size=365, mel_spec=False): - super().__init__() - self._label_size = 365 - self._mel_spec = mel_spec - self.build_model() - - def forward(self, x, l): - d = self.model(x) - if self._mel_spec: - s = list(l.squeeze().shape) - s[-1] = 19 - z = torch.cat((l.squeeze(), torch.zeros(s).type_as(x)), -1).reshape(d.shape[0], -1, 2, 4) - else: - s = list(l.squeeze().shape) - s[-1] = 512 - s[-1] - z = torch.cat((l.squeeze(), torch.zeros(s).type_as(x)), -1).reshape(d.shape[0], -1, 8, 8) - k = torch.cat((d, z), 1) - return self.output(k) - - def build_model(self): - model = [] - model.append(nn.Conv2d(1, 32, kernel_size=1, stride=1, padding=0, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.Conv2d(32, 32, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.Conv2d(32, 32, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.AvgPool2d(kernel_size=2, stride=2, ceil_mode=False, count_include_pad=False)) - - model.append(nn.Conv2d(32, 64, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.AvgPool2d(kernel_size=2, stride=2, ceil_mode=False, count_include_pad=False)) - - model.append(nn.Conv2d(64, 128, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.Conv2d(128, 128, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.AvgPool2d(kernel_size=2, stride=2, ceil_mode=False, count_include_pad=False)) - - model.append(nn.Conv2d(128, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.AvgPool2d(kernel_size=2, stride=2, ceil_mode=False, count_include_pad=False)) - - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.AvgPool2d(kernel_size=2, stride=2, ceil_mode=False, count_include_pad=False)) - - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.AvgPool2d(kernel_size=2, stride=2, ceil_mode=False, count_include_pad=False)) - - model.append(MiniBatchAverageLayer()) - model.append(nn.Conv2d(257, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - model.append(nn.Conv2d(256, 256, kernel_size=3, stride=1, padding=1, bias=False)) - model.append(EqualizedLearningRateLayer(model[-1])) - model.append(nn.LeakyReLU(negative_slope=0.2)) - - output = [] # After the label concatenation - if self._mel_spec: - output.append(nn.Conv2d(304, 256, kernel_size=1, stride=1, padding=0, bias=False)) - else: - output.append(nn.Conv2d(264, 256, kernel_size=1, stride=1, padding=0, bias=False)) - - output.append(nn.Conv2d(256, 1, kernel_size=1, stride=1, padding=0, bias=False)) - - # model.append(nn.Sigmoid()) # Output probability (in [0, 1]) - self.model = nn.Sequential(*model) - self.output = nn.Sequential(*output) - - -class ResnetEncoder(nn.Module): - """Pytorch module for a resnet encoder - """ - def __init__(self, num_layers, pretrained, num_input_images=1): - super(ResnetEncoder, self).__init__() - - self.num_ch_enc = numpy.array([64, 64, 128, 256, 512]) - - resnets = {18: models.resnet18, - 34: models.resnet34, - 50: models.resnet50, - 101: models.resnet101, - 152: models.resnet152} - - if num_layers not in resnets: - raise ValueError("{} is not a valid number of resnet layers".format(num_layers)) - - if num_input_images > 1: - self.encoder = resnet_multiimage_input(num_layers, pretrained, num_input_images) - else: - self.encoder = resnets[num_layers](pretrained) - - if num_layers > 34: - self.num_ch_enc[1:] *= 4 - - def forward(self, input_image): - self.features = [] - x = (input_image - 0.45) / 0.225 - x = self.encoder.conv1(x) - x = self.encoder.bn1(x) - self.features.append(self.encoder.relu(x)) - self.features.append(self.encoder.layer1(self.encoder.maxpool(self.features[-1]))) - self.features.append(self.encoder.layer2(self.features[-1])) - self.features.append(self.encoder.layer3(self.features[-1])) - self.features.append(self.encoder.layer4(self.features[-1])) - - return self.features - - - -class DepthDecoder(nn.Module): - def __init__(self, num_ch_enc, scales=range(4), num_output_channels=1, use_skips=True): - super(DepthDecoder, self).__init__() - - self.num_output_channels = num_output_channels - self.use_skips = use_skips - self.upsample_mode = "nearest" - self.scales = scales - - self.num_ch_enc = num_ch_enc - self.num_ch_dec = numpy.array([16, 32, 64, 128, 256]) - - # decoder - self.convs = OrderedDict() - for i in range(4, -1, -1): - # upconv_0 - num_ch_in = self.num_ch_enc[-1] if i == 4 else self.num_ch_dec[i + 1] - num_ch_out = self.num_ch_dec[i] - # self.convs[("upconv", i, 0)] = ConvBlock(num_ch_in, num_ch_out) - setattr(self, "upconv_{}_0".format(i), ConvBlock(num_ch_in, num_ch_out)) - - # upconv_1 - num_ch_in = self.num_ch_dec[i] - if self.use_skips and i > 0: - num_ch_in += self.num_ch_enc[i - 1] - num_ch_out = self.num_ch_dec[i] - # self.convs[("upconv", i, 1)] = ConvBlock(num_ch_in, num_ch_out) - setattr(self, "upconv_{}_1".format(i), ConvBlock(num_ch_in, num_ch_out)) - - for s in self.scales: - # self.convs[("dispconv", s)] = Conv3x3(self.num_ch_dec[s], self.num_output_channels) - setattr(self, "disp_{}".format(s), Conv3x3(self.num_ch_dec[s], self.num_output_channels)) - - self.decoder = nn.ModuleList( - [x for y in [[getattr(self, "upconv_{}_0".format(i)), getattr(self, "upconv_{}_1".format(i))] for i in range(4, -1, -1)] for x in y] + - [getattr(self, "disp_{}".format(s)) for s in self.scales] - ) - self.sigmoid = nn.Sigmoid() - - def forward(self, input_features): - outputs = {} - - # decoder - x = input_features[-1] - for i in range(4, -1, -1): - # x = self.convs[("upconv", i, 0)](x) - x = getattr(self, "upconv_{}_0".format(i))(x) - x = [upsample(x)] - if self.use_skips and i > 0: - x += [input_features[i - 1]] - x = torch.cat(x, 1) - # x = self.convs[("upconv", i, 1)](x) - x = getattr(self, "upconv_{}_1".format(i))(x) - if i in self.scales: - outputs[("disp", i)] = self.sigmoid(getattr(self, "disp_{}".format(i))(x)) - # setattr(self, "outputs_disp_{}".format(i), self.sigmoid(getattr(self, "disp_{}".format(i))(x))) - - return outputs diff --git a/spaces/Mellow-ai/PhotoAI_Mellow/annotator/canny/__init__.py b/spaces/Mellow-ai/PhotoAI_Mellow/annotator/canny/__init__.py deleted file mode 100644 index cb0da951dc838ec9dec2131007e036113281800b..0000000000000000000000000000000000000000 --- a/spaces/Mellow-ai/PhotoAI_Mellow/annotator/canny/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -import cv2 - - -class CannyDetector: - def __call__(self, img, low_threshold, high_threshold): - return cv2.Canny(img, low_threshold, high_threshold) diff --git a/spaces/Menna2211/TxTimg/Home.py b/spaces/Menna2211/TxTimg/Home.py deleted file mode 100644 index 7e8c87d52c304daee0570935b8bf4e135d3b2abd..0000000000000000000000000000000000000000 --- a/spaces/Menna2211/TxTimg/Home.py +++ /dev/null @@ -1,17 +0,0 @@ -import streamlit as st - -st.set_page_config( - page_title="Home", - page_icon="👋", -) - -st.title("Welcome to My TxTStable! 👋") - -st.markdown( - """ - ### TxTStable using Stable Diffusion: - The application allows users to input a piece of text and generate an image that is related to the input text. - - Hugging Face Model: [stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5) - - Github model: [github](https://github.com) -""" -) diff --git a/spaces/Miam97/Test02/Dockerfile b/spaces/Miam97/Test02/Dockerfile deleted file mode 100644 index 6c01c09373883afcb4ea34ae2d316cd596e1737b..0000000000000000000000000000000000000000 --- a/spaces/Miam97/Test02/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM node:18-bullseye-slim - -RUN apt-get update && \ - -apt-get install -y git - -RUN git clone https://gitgud.io/khanon/oai-reverse-proxy.git /app - -WORKDIR /app - -RUN npm install - -COPY Dockerfile greeting.md* .env* ./ - -RUN npm run build - -EXPOSE 7860 - -ENV NODE_ENV=production - -CMD [ "npm", "start" ] \ No newline at end of file diff --git a/spaces/Mileena/PIFu-Clothed-Human-Digitization/PIFu/lib/model/SurfaceClassifier.py b/spaces/Mileena/PIFu-Clothed-Human-Digitization/PIFu/lib/model/SurfaceClassifier.py deleted file mode 100644 index af5afe4fdd4767f72549df258e5b67dea6ac671d..0000000000000000000000000000000000000000 --- a/spaces/Mileena/PIFu-Clothed-Human-Digitization/PIFu/lib/model/SurfaceClassifier.py +++ /dev/null @@ -1,71 +0,0 @@ -import torch -import torch.nn as nn -import torch.nn.functional as F - - -class SurfaceClassifier(nn.Module): - def __init__(self, filter_channels, num_views=1, no_residual=True, last_op=None): - super(SurfaceClassifier, self).__init__() - - self.filters = [] - self.num_views = num_views - self.no_residual = no_residual - filter_channels = filter_channels - self.last_op = last_op - - if self.no_residual: - for l in range(0, len(filter_channels) - 1): - self.filters.append(nn.Conv1d( - filter_channels[l], - filter_channels[l + 1], - 1)) - self.add_module("conv%d" % l, self.filters[l]) - else: - for l in range(0, len(filter_channels) - 1): - if 0 != l: - self.filters.append( - nn.Conv1d( - filter_channels[l] + filter_channels[0], - filter_channels[l + 1], - 1)) - else: - self.filters.append(nn.Conv1d( - filter_channels[l], - filter_channels[l + 1], - 1)) - - self.add_module("conv%d" % l, self.filters[l]) - - def forward(self, feature): - ''' - - :param feature: list of [BxC_inxHxW] tensors of image features - :param xy: [Bx3xN] tensor of (x,y) coodinates in the image plane - :return: [BxC_outxN] tensor of features extracted at the coordinates - ''' - - y = feature - tmpy = feature - for i, f in enumerate(self.filters): - if self.no_residual: - y = self._modules['conv' + str(i)](y) - else: - y = self._modules['conv' + str(i)]( - y if i == 0 - else torch.cat([y, tmpy], 1) - ) - if i != len(self.filters) - 1: - y = F.leaky_relu(y) - - if self.num_views > 1 and i == len(self.filters) // 2: - y = y.view( - -1, self.num_views, y.shape[1], y.shape[2] - ).mean(dim=1) - tmpy = feature.view( - -1, self.num_views, feature.shape[1], feature.shape[2] - ).mean(dim=1) - - if self.last_op: - y = self.last_op(y) - - return y diff --git a/spaces/Mountchicken/MAERec-Gradio/configs/textrecog/sar/sar_resnet31_sequential-decoder_5e_union14m.py b/spaces/Mountchicken/MAERec-Gradio/configs/textrecog/sar/sar_resnet31_sequential-decoder_5e_union14m.py deleted file mode 100644 index 0739a86dc499e403a287c6b34d65498daa52c598..0000000000000000000000000000000000000000 --- a/spaces/Mountchicken/MAERec-Gradio/configs/textrecog/sar/sar_resnet31_sequential-decoder_5e_union14m.py +++ /dev/null @@ -1,111 +0,0 @@ -_base_ = [ - '../_base_/datasets/union14m_train.py', - '../_base_/datasets/union14m_benchmark.py', - '../_base_/datasets/cute80.py', - '../_base_/datasets/iiit5k.py', - '../_base_/datasets/svt.py', - '../_base_/datasets/svtp.py', - '../_base_/datasets/icdar2013.py', - '../_base_/datasets/icdar2015.py', - '../_base_/default_runtime.py', - '../_base_/schedules/schedule_adam_step_5e.py', - '_base_sar_resnet31_parallel-decoder.py', -] - -_base_.pop('model') -dictionary = dict( - type='Dictionary', - dict_file= # noqa - '{{ fileDirname }}/../../../dicts/english_digits_symbols_space.txt', - with_padding=True, - with_unknown=True, - same_start_end=True, - with_start=True, - with_end=True) - -model = dict( - type='SARNet', - data_preprocessor=dict( - type='TextRecogDataPreprocessor', - mean=[127, 127, 127], - std=[127, 127, 127]), - backbone=dict(type='ResNet31OCR'), - encoder=dict( - type='SAREncoder', - enc_bi_rnn=False, - enc_do_rnn=0.1, - enc_gru=False, - ), - decoder=dict( - type='SequentialSARDecoder', - enc_bi_rnn=False, - dec_bi_rnn=False, - dec_do_rnn=0, - dec_gru=False, - pred_dropout=0.1, - d_k=512, - pred_concat=True, - postprocessor=dict(type='AttentionPostprocessor'), - module_loss=dict( - type='CEModuleLoss', ignore_first_char=True, reduction='mean'), - dictionary=dictionary, - max_seq_len=30)) -# dataset settings -train_list = [ - _base_.union14m_challenging, _base_.union14m_hard, _base_.union14m_medium, - _base_.union14m_normal, _base_.union14m_easy -] -val_list = [ - _base_.cute80_textrecog_test, _base_.iiit5k_textrecog_test, - _base_.svt_textrecog_test, _base_.svtp_textrecog_test, - _base_.icdar2013_textrecog_test, _base_.icdar2015_textrecog_test -] -test_list = [ - _base_.union14m_benchmark_artistic, - _base_.union14m_benchmark_multi_oriented, - _base_.union14m_benchmark_contextless, - _base_.union14m_benchmark_curve, - _base_.union14m_benchmark_incomplete, - _base_.union14m_benchmark_incomplete_ori, - _base_.union14m_benchmark_multi_words, - _base_.union14m_benchmark_salient, - _base_.union14m_benchmark_general, -] - -train_dataset = dict( - type='ConcatDataset', datasets=train_list, pipeline=_base_.train_pipeline) -test_dataset = dict( - type='ConcatDataset', datasets=test_list, pipeline=_base_.test_pipeline) -val_dataset = dict( - type='ConcatDataset', datasets=val_list, pipeline=_base_.test_pipeline) - -train_dataloader = dict( - batch_size=128, - num_workers=24, - persistent_workers=True, - sampler=dict(type='DefaultSampler', shuffle=True), - dataset=train_dataset) - -test_dataloader = dict( - batch_size=128, - num_workers=4, - persistent_workers=True, - drop_last=False, - sampler=dict(type='DefaultSampler', shuffle=False), - dataset=test_dataset) - -val_dataloader = dict( - batch_size=128, - num_workers=4, - persistent_workers=True, - pin_memory=True, - drop_last=False, - sampler=dict(type='DefaultSampler', shuffle=False), - dataset=val_dataset) - -val_evaluator = dict( - dataset_prefixes=['CUTE80', 'IIIT5K', 'SVT', 'SVTP', 'IC13', 'IC15']) -test_evaluator = dict(dataset_prefixes=[ - 'artistic', 'multi-oriented', 'contextless', 'curve', 'incomplete', - 'incomplete-ori', 'multi-words', 'salient', 'general' -]) diff --git a/spaces/Mountchicken/MAERec-Gradio/mmocr/datasets/preparers/gatherers/naf_gatherer.py b/spaces/Mountchicken/MAERec-Gradio/mmocr/datasets/preparers/gatherers/naf_gatherer.py deleted file mode 100644 index 3251bde40ddd01885ee45c4ad21911156a3ecf07..0000000000000000000000000000000000000000 --- a/spaces/Mountchicken/MAERec-Gradio/mmocr/datasets/preparers/gatherers/naf_gatherer.py +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (c) OpenMMLab. All rights reserved. -import json -import os -import os.path as osp -import shutil -from typing import List, Tuple - -from mmocr.registry import DATA_GATHERERS -from .base import BaseGatherer - - -@DATA_GATHERERS.register_module() -class NAFGatherer(BaseGatherer): - """Gather the dataset file from NAF dataset. Specifically for the case that - there is a split file that contains the names of different splits. For - example, - - img_001.jpg train: img_001.jpg - img_002.jpg ---> split_file ---> test: img_002.jpg - img_003.jpg val: img_003.jpg - - Args: - split_file (str, optional): The name of the split file. Defaults to - "data_split.json". - temp_dir (str, optional): The directory of the temporary images. - Defaults to "temp_images". - """ - - def __init__(self, - split_file='data_split.json', - temp_dir: str = 'temp_images', - **kwargs) -> None: - super().__init__(**kwargs) - self.temp_dir = temp_dir - self.split_file = split_file - - def __call__(self) -> Tuple[List[str], List[str]]: - """ - Returns: - tuple(list[str], list[str]): The list of image paths and the list - of annotation paths. - """ - - split_file = osp.join(self.data_root, self.split_file) - with open(split_file, 'r') as f: - split_data = json.load(f) - img_list = list() - ann_list = list() - # Rename the key - split_data['val'] = split_data.pop('valid') - if not osp.exists(self.img_dir): - os.makedirs(self.img_dir) - current_split_data = split_data[self.split] - for groups in current_split_data: - for img_name in current_split_data[groups]: - src_img = osp.join(self.data_root, self.temp_dir, img_name) - dst_img = osp.join(self.img_dir, img_name) - if not osp.exists(src_img): - Warning(f'{src_img} does not exist!') - continue - # move the image to the new path - shutil.move(src_img, dst_img) - ann = osp.join(self.ann_dir, img_name.replace('.jpg', '.json')) - img_list.append(dst_img) - ann_list.append(ann) - return img_list, ann_list diff --git a/spaces/MrVicente/RA-BART/custom_bart/bart_onnx.py b/spaces/MrVicente/RA-BART/custom_bart/bart_onnx.py deleted file mode 100644 index 533f6e962c86ce3049fe121a9c2eb8a4813a28d7..0000000000000000000000000000000000000000 --- a/spaces/MrVicente/RA-BART/custom_bart/bart_onnx.py +++ /dev/null @@ -1,240 +0,0 @@ - -from collections import OrderedDict -from typing import Any, Mapping, Optional - -import torch -from transformers import PreTrainedTokenizer -from transformers.onnx import OnnxConfig, OnnxConfigWithPast, OnnxSeq2SeqConfigWithPast -from transformers.onnx.utils import compute_effective_axis_dimension -from transformers.utils.generic import TensorType -from transformers.utils.import_utils import is_torch_available - -class BartCustumOnnxConfig(OnnxSeq2SeqConfigWithPast): - @property - def inputs(self) -> Mapping[str, Mapping[int, str]]: - if self.task in ["default", "seq2seq-lm"]: - common_inputs = OrderedDict( - [ - ("input_ids", {0: "batch", 1: "encoder_sequence"}), - ("attention_mask", {0: "batch", 1: "encoder_sequence"}), - ("input_commonsense_relations", {0: "batch", 1: "encoder_sequence", 2: "encoder_sequence"}), - ] - ) - - if self.use_past: - common_inputs["decoder_input_ids"] = {0: "batch"} - common_inputs["decoder_attention_mask"] = {0: "batch", 1: "past_decoder_sequence + sequence"} - else: - common_inputs["decoder_input_ids"] = {0: "batch", 1: "decoder_sequence"} - common_inputs["decoder_attention_mask"] = {0: "batch", 1: "decoder_sequence"} - - if self.use_past: - self.fill_with_past_key_values_(common_inputs, direction="inputs") - elif self.task == "causal-lm": - # TODO: figure this case out. - common_inputs = OrderedDict( - [ - ("input_ids", {0: "batch", 1: "encoder_sequence"}), - ("attention_mask", {0: "batch", 1: "encoder_sequence"}), - ] - ) - if self.use_past: - num_encoder_layers, _ = self.num_layers - for i in range(num_encoder_layers): - common_inputs[f"past_key_values.{i}.key"] = {0: "batch", 2: "past_sequence + sequence"} - common_inputs[f"past_key_values.{i}.value"] = {0: "batch", 2: "past_sequence + sequence"} - else: - common_inputs = OrderedDict( - [ - ("input_ids", {0: "batch", 1: "encoder_sequence"}), - ("attention_mask", {0: "batch", 1: "encoder_sequence"}), - ("input_commonsense_relations", {0: "batch", 2: "encoder_sequence", 3: "encoder_sequence"}), - ("decoder_input_ids", {0: "batch", 1: "decoder_sequence"}), - ("decoder_attention_mask", {0: "batch", 1: "decoder_sequence"}), - ] - ) - - return common_inputs - - @property - def outputs(self) -> Mapping[str, Mapping[int, str]]: - if self.task in ["default", "seq2seq-lm"]: - common_outputs = super().outputs - else: - common_outputs = super(OnnxConfigWithPast, self).outputs - if self.use_past: - num_encoder_layers, _ = self.num_layers - for i in range(num_encoder_layers): - common_outputs[f"present.{i}.key"] = {0: "batch", 2: "past_sequence + sequence"} - common_outputs[f"present.{i}.value"] = {0: "batch", 2: "past_sequence + sequence"} - return common_outputs - - def _generate_dummy_inputs_for_default_and_seq2seq_lm( - self, - tokenizer: PreTrainedTokenizer, - batch_size: int = -1, - seq_length: int = -1, - is_pair: bool = False, - framework: Optional[TensorType] = None, - ) -> Mapping[str, Any]: - encoder_inputs = self._generate_dummy_inputs_for_sequence_classification_and_question_answering( - tokenizer, batch_size, seq_length, is_pair, framework - ) - - # Generate decoder inputs - decoder_seq_length = seq_length if not self.use_past else 1 - decoder_inputs = self._generate_dummy_inputs_for_sequence_classification_and_question_answering( - tokenizer, batch_size, decoder_seq_length, is_pair, framework - ) - decoder_inputs = {f"decoder_{name}": tensor for name, tensor in decoder_inputs.items()} - common_inputs = dict(**encoder_inputs, **decoder_inputs) - - if self.use_past: - if not is_torch_available(): - raise ValueError("Cannot generate dummy past_keys inputs without PyTorch installed.") - else: - import torch - batch, encoder_seq_length = common_inputs["input_ids"].shape - decoder_seq_length = common_inputs["decoder_input_ids"].shape[1] - num_encoder_attention_heads, num_decoder_attention_heads = self.num_attention_heads - encoder_shape = ( - batch, - num_encoder_attention_heads, - encoder_seq_length, - self._config.hidden_size // num_encoder_attention_heads, - ) - decoder_past_length = decoder_seq_length + 3 - decoder_shape = ( - batch, - num_decoder_attention_heads, - decoder_past_length, - self._config.hidden_size // num_decoder_attention_heads, - ) - - common_inputs["decoder_attention_mask"] = torch.cat( - [common_inputs["decoder_attention_mask"], torch.ones(batch, decoder_past_length)], dim=1 - ) - - common_inputs["past_key_values"] = [] - # If the number of encoder and decoder layers are present in the model configuration, both are considered - num_encoder_layers, num_decoder_layers = self.num_layers - min_num_layers = min(num_encoder_layers, num_decoder_layers) - max_num_layers = max(num_encoder_layers, num_decoder_layers) - min_num_layers - remaining_side_name = "encoder" if num_encoder_layers > num_decoder_layers else "decoder" - - for _ in range(min_num_layers): - common_inputs["past_key_values"].append( - ( - torch.zeros(decoder_shape), - torch.zeros(decoder_shape), - torch.zeros(encoder_shape), - torch.zeros(encoder_shape), - ) - ) - # TODO: test this. - shape = encoder_shape if remaining_side_name == "encoder" else decoder_shape - for _ in range(min_num_layers, max_num_layers): - common_inputs["past_key_values"].append((torch.zeros(shape), torch.zeros(shape))) - return common_inputs - - def _generate_dummy_inputs_for_causal_lm( - self, - tokenizer: PreTrainedTokenizer, - batch_size: int = -1, - seq_length: int = -1, - is_pair: bool = False, - framework: Optional[TensorType] = None, - ) -> Mapping[str, Any]: - common_inputs = self._generate_dummy_inputs_for_sequence_classification_and_question_answering( - tokenizer, batch_size, seq_length, is_pair, framework - ) - - if self.use_past: - if not is_torch_available(): - raise ValueError("Cannot generate dummy past_keys inputs without PyTorch installed.") - else: - import torch - batch, seqlen = common_inputs["input_ids"].shape - # Not using the same length for past_key_values - past_key_values_length = seqlen + 2 - num_encoder_layers, _ = self.num_layers - num_encoder_attention_heads, _ = self.num_attention_heads - past_shape = ( - batch, - num_encoder_attention_heads, - past_key_values_length, - self._config.hidden_size // num_encoder_attention_heads, - ) - - mask_dtype = common_inputs["attention_mask"].dtype - common_inputs["attention_mask"] = torch.cat( - [common_inputs["attention_mask"], torch.ones(batch, past_key_values_length, dtype=mask_dtype)], dim=1 - ) - common_inputs["past_key_values"] = [ - (torch.zeros(past_shape), torch.zeros(past_shape)) for _ in range(num_encoder_layers) - ] - return common_inputs - - def _generate_dummy_inputs_for_sequence_classification_and_question_answering( - self, - tokenizer: PreTrainedTokenizer, - batch_size: int = -1, - seq_length: int = -1, - is_pair: bool = False, - framework: Optional[TensorType] = None, - ) -> Mapping[str, Any]: - # Copied from OnnxConfig.generate_dummy_inputs - # Did not use super(OnnxConfigWithPast, self).generate_dummy_inputs for code clarity. - # If dynamic axis (-1) we forward with a fixed dimension of 2 samples to avoid optimizations made by ONNX - batch_size = compute_effective_axis_dimension( - batch_size, fixed_dimension=OnnxConfig.default_fixed_batch, num_token_to_add=0 - ) - - # If dynamic axis (-1) we forward with a fixed dimension of 8 tokens to avoid optimizations made by ONNX - token_to_add = tokenizer.num_special_tokens_to_add(is_pair) - seq_length = compute_effective_axis_dimension( - seq_length, fixed_dimension=OnnxConfig.default_fixed_sequence, num_token_to_add=token_to_add - ) - - # Generate dummy inputs according to compute batch and sequence - dummy_input = [" ".join([tokenizer.unk_token]) * seq_length] * batch_size - tmp_seq_length = seq_length + 2 - commonsense_relation= torch.IntTensor([[[0] * tmp_seq_length] * tmp_seq_length]* batch_size) - common_inputs = dict(tokenizer(dummy_input, - return_tensors=framework)) - common_inputs['input_commonsense_relations'] = commonsense_relation - print('here:', common_inputs) - return common_inputs - - def generate_dummy_inputs( - self, - tokenizer: PreTrainedTokenizer, - batch_size: int = -1, - seq_length: int = -1, - is_pair: bool = False, - framework: Optional[TensorType] = None, - ) -> Mapping[str, Any]: - if self.task in ["default", "seq2seq-lm"]: - common_inputs = self._generate_dummy_inputs_for_default_and_seq2seq_lm( - tokenizer, batch_size=batch_size, seq_length=seq_length, is_pair=is_pair, framework=framework - ) - - elif self.task == "causal-lm": - common_inputs = self._generate_dummy_inputs_for_causal_lm( - tokenizer, batch_size=batch_size, seq_length=seq_length, is_pair=is_pair, framework=framework - ) - else: - common_inputs = self._generate_dummy_inputs_for_sequence_classification_and_question_answering( - tokenizer, batch_size=batch_size, seq_length=seq_length, is_pair=is_pair, framework=framework - ) - if 'decoder_input_commonsense_relations' in common_inputs: - del common_inputs['decoder_input_commonsense_relations'] - return common_inputs - - def _flatten_past_key_values_(self, flattened_output, name, idx, t): - if self.task in ["default", "seq2seq-lm"]: - flattened_output = super()._flatten_past_key_values_(flattened_output, name, idx, t) - else: - flattened_output = super(OnnxSeq2SeqConfigWithPast, self)._flatten_past_key_values_( - flattened_output, name, idx, t - ) \ No newline at end of file diff --git a/spaces/MrZak/Learn-Up/app.py b/spaces/MrZak/Learn-Up/app.py deleted file mode 100644 index 3381bce2d274de5d887745325249b5151a3e53d1..0000000000000000000000000000000000000000 --- a/spaces/MrZak/Learn-Up/app.py +++ /dev/null @@ -1,19 +0,0 @@ -import openai -import gradio -openai.api_key = "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" - -messages = [{"role": "system", "content": "You are a teacher."}] - -def CustomChatGPT(user_input): - messages.append({"role": "user", "content": user_input}) - response = openai.ChatCompletion.create( - model = "gpt-3.5-turbo", - messages = messages - ) - ChatGPT_reply = ChatGPT_reply = response['choices'][0]['message']['content'] - messages.append({"role": "assistant", "content": ChatGPT_reply}) - return ChatGPT_reply - -demo = gradio.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text",) - -demo.launch() diff --git a/spaces/NbAiLab/maken-clip-sketch/README.md b/spaces/NbAiLab/maken-clip-sketch/README.md deleted file mode 100644 index f2b22f5d72c2b54db225f08585e25a813e4e83b3..0000000000000000000000000000000000000000 --- a/spaces/NbAiLab/maken-clip-sketch/README.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: Maken Clip Sketch -emoji: ✏️ -colorFrom: red -colorTo: red -sdk: gradio -sdk_version: 3.11.0 -app_file: app.py -pinned: false ---- - -# Configuration - -`title`: _string_ -Display title for the Space - -`emoji`: _string_ -Space emoji (emoji-only character allowed) - -`colorFrom`: _string_ -Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray) - -`colorTo`: _string_ -Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray) - -`sdk`: _string_ -Can be either `gradio` or `streamlit` - -`sdk_version` : _string_ -Only applicable for `streamlit` SDK. -See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions. - -`app_file`: _string_ -Path to your main application file (which contains either `gradio` or `streamlit` Python code). -Path is relative to the root of the repository. - -`pinned`: _boolean_ -Whether the Space stays on top of your list. diff --git a/spaces/Nigomaster/Analizador_CVs/app.py b/spaces/Nigomaster/Analizador_CVs/app.py deleted file mode 100644 index e989930ae6a14ae54c6450705ffa47aca1a740b3..0000000000000000000000000000000000000000 --- a/spaces/Nigomaster/Analizador_CVs/app.py +++ /dev/null @@ -1,174 +0,0 @@ -#Hello! It seems like you want to import the Streamlit library in Python. Streamlit is a powerful open-source framework used for building web applications with interactive data visualizations and machine learning models. To import Streamlit, you'll need to ensure that you have it installed in your Python environment. -#Once you have Streamlit installed, you can import it into your Python script using the import statement, - -import langchain -import streamlit as st -from langchain.document_loaders import PyPDFLoader -from langchain.document_loaders import PyMuPDFLoader -from PyPDF2 import PdfReader -from langchain.prompts import ChatPromptTemplate, HumanMessagePromptTemplate -from langchain.chat_models import ChatOpenAI -import random - - - -from langchain.llms import OpenAI - - - - - -st.set_page_config(page_title="¡Analizador de CVs Inteligente! ") -st.header("¡Sube tu CV y descubre tu potencial laboral!", divider='red') - - - - - - -st.write(""" - - -¡Bienvenido al Analizador de CVs Inteligente! 🤖 - -Para comenzar tu experiencia, sigue estos simples pasos: - -1.- Carga tu CV 📂: Haz clic en el botón "Browse Files" y selecciona el archivo de tu currículum en formato PDF (máximo 2 hojas). El sistema está listo para recibir tu información laboral. - -2.- ¡Analiza tu Trayectoria! 🔍: Una vez que hayas cargado tu CV, presiona el botón " ¡Analiza tu Trayectoria! 🔍". Esto desatará el análisis y revelará las oportunidades que se esconden en tu trayectoria. - -3.- Espera el Análisis: El Analizador de CVs Inteligente procesará tu currículum y, en breve, te presentará una visión de tu potencial laboral. - - - -¡Carga tu CV y comencemos a desbloquear nuevas oportunidades! 🚀💼 - - -""") - - -st.divider() - -col1, col2 = st.columns(2) - -with col1: - cv_file = st.file_uploader("Sube tu CV (máximo 2 MB)", type=["pdf"], key="cv_file", accept_multiple_files=False) - -text = "" - -with col2: - st.write(" ") - st.write(" ") - st.write(" ") - submit = st.button('¡Analiza tu Trayectoria! 🔍') - -if cv_file is not None: - if submit: - - reader = PdfReader(cv_file) - number_of_pages = len(reader.pages) - - - - number_of_pages = len(reader.pages) - page = reader.pages[0] - text = page.extract_text() - - text = text.replace('\n', " ") - text = text.strip() - - - - - - - - - - - - -data_manual = text -human_template = """Eres un experto en reclutamiento y selección. Analiza el curriculum, entrega consejos de mejora, puntos fuertes y debiles y recomienda palabras -claves para reclutadores. En caso de que no sea un curriculum, indicalo pero sin analizarlo. Solo debes analizar los documentos que son CV - -Despídete siempre con el nombre Rodrigo Pasten. Todo en 200 palabras o menos {query}""" -human_template_prompt = HumanMessagePromptTemplate.from_template(human_template) - -chat_prompt = ChatPromptTemplate.from_messages([human_template_prompt]) - -model = ChatOpenAI -request = chat_prompt.format_prompt(query = data_manual).to_messages() -chat = ChatOpenAI() - -saludos= ["¡Tu paciencia es muy valiosa!", -"Agradezco tu paciencia.", -"Gracias por esperar conmigo.", -"Valoro tu paciencia.", -"¡Gracias por ser tan paciente!", -"Tu espera no pasa desapercibida, gracias.", -"Estoy agradecido por tu paciencia.", -"Tu paciencia es una virtud, gracias.", -"Me alegra que seas paciente durante el proceso.", -"Tu paciencia es fundamental para mi trabajo, gracias."] - -if submit: - with st.spinner(f'Analizando... ⏳ Esto puede tomar entre 30 segundos y 1 minuto aproximadamente.\n \n \n{saludos[random.randint(0,9)]}'): - - st.subheader("Análisis:") - result = chat(request) - st.write(result.content) - - - - - -with st.sidebar: - tab1, tab2 = st.tabs(["Contáctame", "Sobre Mi"]) - -with tab1: - st.write("""¡Hola! Estoy en la búsqueda activa de nuevas oportunidades laborales y estoy preparado para ser la pieza clave que impulsará tu equipo. ¿Estás listo para una transformación en tu departamento de Recursos Humanos? ¡Contáctame ahora mismo y descubre cómo puedo aportar un valor diferencial a tu empresa!""") - st.subheader("Echa un vistazo a mi perfil:") - st.link_button("Explora mi CV web", "https://rodrigopasten.github.io/Personal_web/") - st.link_button("Conéctate en Linkedin", "https://www.linkedin.com/in/rodrigopastenc/") - st.link_button("Mi portafolio en Github", "https://github.com/RodrigoPasten") - st.link_button("Mi Blog", "https://nigomaster.pythonanywhere.com/") - - st.subheader("Contáctame por correo electrónico:") - email_address = "Rodrigo.pasten.c@gmail.com" - subject = "Te contacto por tu analizador de CVs" - body = "Hola Rodrigo," - - email_link = f'Enviar correo' - - st.markdown(email_link, unsafe_allow_html=True) - - - -with tab2: - st.header("Sobre Mi") - st.write(""" - ¡Hola!, soy un ingeniero en administración con una sólida experiencia en Recursos Humanos, especializado en el sector minero. Mi amplia trayectoria abarca desde el reclutamiento hasta la gestión de remuneraciones, pasando por la inclusión laboral de personas con discapacidad según la normativa chilena. Mi capacidad para calcular finiquitos y llevar a cabo desvinculaciones cumple con las regulaciones vigentes. - -Mi verdadera pasión radica en la innovación en RR.HH., y creo firmemente en la implementación de tecnologías avanzadas para optimizar procesos. He explorado áreas como People Analytics, Data Science y programación en Python, y poseo habilidades tanto en el desarrollo de aplicaciones frontend como backend. Esto me permite aportar soluciones tecnológicas integrales a diversos desafíos. - -Además, soy competente en herramientas como Power BI, Adobe InDesign y Streamlit, y mi dominio de Microsoft Excel es de nivel experto. - -En mi formación continua, me encuentro en la etapa final de mi carrera de Ingeniería Civil Industrial y persigo dos másteres: uno en Dirección de Personas y otro en Big Data. Estas especializaciones han fortalecido mi conocimiento en la gestión de equipos y el uso estratégico de los datos en la toma de decisiones. - -Mi objetivo es fusionar mi pasión por la tecnología con mi compromiso con el desarrollo humano, creyendo firmemente en que la tecnología puede potenciar el talento y generar un impacto positivo en las organizaciones. - - """) - - - with open("CV interactivo Rodrigo Pasten.pdf", "rb") as file: - btn = st.download_button( - label="Descarga mi CV interactivo", - data=file, - file_name="CV interactivo Rodrigo Pasten.pdf", - mime="pdf" - ) - - - - diff --git a/spaces/Nikhatu/stable-diffusion-webui-cpu-the-best/README.md b/spaces/Nikhatu/stable-diffusion-webui-cpu-the-best/README.md deleted file mode 100644 index 404430459e1b516be671298c7de21de7a039e30d..0000000000000000000000000000000000000000 --- a/spaces/Nikhatu/stable-diffusion-webui-cpu-the-best/README.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -title: Stable Diffusion Webui on Cpu -emoji: 🏃 -colorFrom: pink -colorTo: purple -sdk: gradio -sdk_version: 3.29.0 -app_file: app.py -pinned: false -python_version: 3.10.6 -duplicated_from: IoMa/stable-diffusion-webui-cpu-the-best ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/OFA-Sys/OFA-Image_Caption/fairseq/examples/wav2vec/unsupervised/data/extracted_features_dataset.py b/spaces/OFA-Sys/OFA-Image_Caption/fairseq/examples/wav2vec/unsupervised/data/extracted_features_dataset.py deleted file mode 100644 index d6ee9c4a3602be9db8ddfe67d41ce8a96a98ad1e..0000000000000000000000000000000000000000 --- a/spaces/OFA-Sys/OFA-Image_Caption/fairseq/examples/wav2vec/unsupervised/data/extracted_features_dataset.py +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - - -import logging -import os -import contextlib - -import numpy as np -import torch - -from fairseq.data import FairseqDataset, data_utils - - -logger = logging.getLogger(__name__) - - -class ExtractedFeaturesDataset(FairseqDataset): - def __init__( - self, - path, - split, - min_length=3, - max_length=None, - labels=None, - label_dict=None, - shuffle=True, - sort_by_length=True, - ): - super().__init__() - - self.min_length = min_length - self.max_length = max_length - self.shuffle = shuffle - self.sort_by_length = sort_by_length - self.label_dict = label_dict - - if labels is not None: - assert label_dict is not None - - self.sizes = [] - self.offsets = [] - self.labels = [] - - path = os.path.join(path, split) - data_path = path - self.data = np.load(data_path + ".npy", mmap_mode="r") - - offset = 0 - skipped = 0 - - if not os.path.exists(path + f".{labels}"): - labels = None - - with open(data_path + ".lengths", "r") as len_f, open( - path + f".{labels}", "r" - ) if labels is not None else contextlib.ExitStack() as lbl_f: - for line in len_f: - length = int(line.rstrip()) - lbl = None if labels is None else next(lbl_f).rstrip().split() - if length >= min_length and ( - max_length is None or length <= max_length - ): - self.sizes.append(length) - self.offsets.append(offset) - if lbl is not None: - self.labels.append(lbl) - offset += length - - self.sizes = np.asarray(self.sizes) - self.offsets = np.asarray(self.offsets) - - logger.info(f"loaded {len(self.offsets)}, skipped {skipped} samples") - - def __getitem__(self, index): - offset = self.offsets[index] - end = self.sizes[index] + offset - feats = torch.from_numpy(self.data[offset:end].copy()).float() - - res = {"id": index, "features": feats} - if len(self.labels) > 0: - res["target"] = self.label_dict.encode_line( - self.labels[index], - line_tokenizer=lambda x: x, - append_eos=False, - ) - - return res - - def __len__(self): - return len(self.sizes) - - def collater(self, samples): - if len(samples) == 0: - return {} - - features = [s["features"] for s in samples] - sizes = [len(s) for s in features] - - target_size = max(sizes) - - collated_features = features[0].new_zeros( - len(features), target_size, features[0].size(-1) - ) - padding_mask = torch.BoolTensor(collated_features.shape[:-1]).fill_(False) - for i, (f, size) in enumerate(zip(features, sizes)): - collated_features[i, :size] = f - padding_mask[i, size:] = True - - res = { - "id": torch.LongTensor([s["id"] for s in samples]), - "net_input": {"features": collated_features, "padding_mask": padding_mask}, - } - - if len(self.labels) > 0: - target = data_utils.collate_tokens( - [s["target"] for s in samples], - pad_idx=self.label_dict.pad(), - left_pad=False, - ) - res["target"] = target - return res - - def num_tokens(self, index): - return self.size(index) - - def size(self, index): - return self.sizes[index] - - def ordered_indices(self): - """Return an ordered list of indices. Batches will be constructed based - on this order.""" - if self.shuffle: - order = [np.random.permutation(len(self))] - else: - order = [np.arange(len(self))] - - if self.sort_by_length: - order.append(self.sizes) - return np.lexsort(order)[::-1] - else: - return order[0] diff --git a/spaces/OFA-Sys/OFA-vqa/fairseq/examples/backtranslation/extract_bt_data.py b/spaces/OFA-Sys/OFA-vqa/fairseq/examples/backtranslation/extract_bt_data.py deleted file mode 100644 index e766391e873d0d9a9561d67d5864934b2fad0681..0000000000000000000000000000000000000000 --- a/spaces/OFA-Sys/OFA-vqa/fairseq/examples/backtranslation/extract_bt_data.py +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -import argparse -import fileinput - -from tqdm import tqdm - - -def main(): - parser = argparse.ArgumentParser( - description=( - "Extract back-translations from the stdout of fairseq-generate. " - "If there are multiply hypotheses for a source, we only keep the first one. " - ) - ) - parser.add_argument("--output", required=True, help="output prefix") - parser.add_argument( - "--srclang", required=True, help="source language (extracted from H-* lines)" - ) - parser.add_argument( - "--tgtlang", required=True, help="target language (extracted from S-* lines)" - ) - parser.add_argument("--minlen", type=int, help="min length filter") - parser.add_argument("--maxlen", type=int, help="max length filter") - parser.add_argument("--ratio", type=float, help="ratio filter") - parser.add_argument("files", nargs="*", help="input files") - args = parser.parse_args() - - def validate(src, tgt): - srclen = len(src.split(" ")) if src != "" else 0 - tgtlen = len(tgt.split(" ")) if tgt != "" else 0 - if ( - (args.minlen is not None and (srclen < args.minlen or tgtlen < args.minlen)) - or ( - args.maxlen is not None - and (srclen > args.maxlen or tgtlen > args.maxlen) - ) - or ( - args.ratio is not None - and (max(srclen, tgtlen) / float(min(srclen, tgtlen)) > args.ratio) - ) - ): - return False - return True - - def safe_index(toks, index, default): - try: - return toks[index] - except IndexError: - return default - - with open(args.output + "." + args.srclang, "w") as src_h, open( - args.output + "." + args.tgtlang, "w" - ) as tgt_h: - for line in tqdm(fileinput.input(args.files)): - if line.startswith("S-"): - tgt = safe_index(line.rstrip().split("\t"), 1, "") - elif line.startswith("H-"): - if tgt is not None: - src = safe_index(line.rstrip().split("\t"), 2, "") - if validate(src, tgt): - print(src, file=src_h) - print(tgt, file=tgt_h) - tgt = None - - -if __name__ == "__main__": - main() diff --git a/spaces/OFA-Sys/OFA-vqa/fairseq/examples/layerdrop/README.md b/spaces/OFA-Sys/OFA-vqa/fairseq/examples/layerdrop/README.md deleted file mode 100644 index 4d48ee9615e1458e1e889635dc9938e427a7f64a..0000000000000000000000000000000000000000 --- a/spaces/OFA-Sys/OFA-vqa/fairseq/examples/layerdrop/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Reducing Transformer Depth on Demand with Structured Dropout (Fan et al., 2019) -This page contains information for how to train models with LayerDrop, based on this [paper](https://arxiv.org/abs/1909.11556). - -## Citation: -If you found this technique useful, please cite our paper: -```bibtex -@article{fan2019reducing, - title={Reducing Transformer Depth on Demand with Structured Dropout}, - author={Fan, Angela and Grave, Edouard and Joulin, Armand}, - journal={arXiv preprint arXiv:1909.11556}, - year={2019} -} -``` - -## Pre-trained models - -Model | Description | Download ----|---|--- -`layerdrop_wmt_en_de_12_6` | Transformer + LayerDrop 0.2 trained on WMT16 en-de with 12 encoder and 6 decoder layers | [layerdrop_wmt_en_de_12_6.tar.gz](https://dl.fbaipublicfiles.com/fairseq/models/layerdrop_wmt_en_de_12_6.tar.gz) -`roberta_layerdrop.base` | RoBERTa Base + LayerDrop 0.2 | [roberta_layerdrop.base.tar.gz](https://dl.fbaipublicfiles.com/fairseq/models/roberta_layerdrop.base.qnli.tar.gz) -`roberta_layerdrop.large` | RoBERTa Large + LayerDrop 0.2 | [roberta_layerdrop.large.tar.gz](https://dl.fbaipublicfiles.com/fairseq/models/roberta_layerdrop.large.tar.gz) -`roberta_layerdrop.large.mnli` | `roberta_layerdrop.large` finetuned on [MNLI](http://www.nyu.edu/projects/bowman/multinli) | [roberta_layerdrop.large.mnli.tar.gz](https://dl.fbaipublicfiles.com/fairseq/models/roberta_layerdrop.large.mnli.tar.gz) -`roberta_layerdrop.large.qnli` | `roberta_layerdrop.large` finetuned on [QNLI](https://arxiv.org/abs/1804.07461) | [roberta_layerdrop.large.mnli.tar.gz](https://dl.fbaipublicfiles.com/fairseq/models/roberta_layerdrop.large.qnli.tar.gz) - - -Evaluate performance of these pre-trained models: -```bash -# Example for Machine Translation -fairseq-generate /path/to/bped/wmt/data --path nmt_checkpoint.pt \ - --beam 8 --lenpen 0.4 \ - --batch-size 64 \ - --remove-bpe \ - --gen-subset test > wmt16_gen.txt -bash scripts/compound_split_bleu.sh wmt16_gen.txt -# prints BLEU4 = 30.17 -``` - -```python -# Example for RoBERTa + LayerDrop finetuned on MNLI: -from fairseq.models.roberta import RobertaModel - -roberta_layerdrop = RobertaModel.from_pretrained( - '/path/to/MNLI/model', - checkpoint_file='mnli_checkpoint.pt', - data_name_or_path='/path/to/MNLI/data/MNLI-bin' -) -label_map = {0: 'contradiction', 2: 'neutral', 1: 'entailment'} -ncorrect, nsamples = 0, 0 -roberta_layerdrop.cuda() -roberta_layerdrop.eval() -with open('/path/to/MNLI/data/dev_matched.tsv') as fin: - fin.readline() - for index, line in enumerate(fin): - tokens = line.strip().split('\t') - sent1, sent2, target = tokens[8], tokens[9], tokens[-1] - tokens = roberta_layerdrop.encode(sent1, sent2) - prediction = roberta_layerdrop.predict('sentence_classification_head', tokens).argmax().item() - prediction_label = label_map[prediction] - ncorrect += int(prediction_label == target) - nsamples += 1 -print('| Accuracy: ', float(ncorrect)/float(nsamples)) -# prints | Accuracy: 0.9026999490575649 - - -# Example for RoBERTa + LayerDrop finetuned on QNLI: -roberta = RobertaModel.from_pretrained( - '/path/to/QNLI/model', - checkpoint_file='qnli_checkpoint.pt', - data_name_or_path='/path/to/QNLI/data/QNLI-bin' -) - -label_fn = lambda label: roberta.task.label_dictionary.string( - [label + roberta.task.target_dictionary.nspecial] -) -ncorrect, nsamples = 0, 0 -roberta.cuda() -roberta.eval() -with open('/path/to/QNLI/data/dev.tsv') as fin: - fin.readline() - for index, line in enumerate(fin): - tokens = line.strip().split('\t') - sent1, sent2, target = tokens[1], tokens[2], tokens[3] - tokens = roberta.encode(sent1, sent2) - prediction = roberta.predict('sentence_classification_head', tokens).argmax().item() - prediction_label = label_fn(prediction) - ncorrect += int(prediction_label == target) - nsamples += 1 -print('| Accuracy: ', float(ncorrect)/float(nsamples)) -# prints | Accuracy: 0.9480139117700896 -``` - - -## Example usage - -To train a model with LayerDrop, add the following flags. We recommend 0.2, a value that worked well in our experiments. For Language Models that are decoder-only, you need only the decoder flag. For RoBERTa, an encoder, you need only the encoder flag. The encoder and decoder LayerDrop values can be set differently. -``` ---encoder-layerdrop 0.2 --decoder-layerdrop 0.2 -``` - -To prune a model that has been trained with LayerDrop, add the following flags followed by a comma separated list of which layers you would like to keep. -``` ---encoder-layers-to-keep 0,2,4,6,8,10,12,14 --decoder-layers-to-keep 0,2,4,6,8,10,12,14 -``` -Setting these flags should print a message such as: -``` -| Pruning model to specified layer configuration -``` -You should also see a smaller number of parameters in the model, for example the 16-Layer Transformer Language Model prints: -``` -num. model params: 246933504 -``` -while a model pruned to 8 Layers prints: -``` -num. model params: 146163712 -``` - -If you would like to pick up training with a model that has been pruned, simply adding these flags is sufficient. If you would like to use a script that only does evaluation (no training), you may need to pass an override command. A specific example would be for language modeling: -```bash -fairseq-eval-lm /path/to/wikitext-103 \ - --path /path/to/model/checkpoint.pt \ - --model-overrides "{'decoder_layers_to_keep':'0,2,4,6,8,10,12,14'}" -``` -This model override command overrides the training parameters and updates the model arguments so that the pruned model is run instead of the full model. - -## Reproduce Paper Results - -Looking to reproduce the results in the paper? - -1. For Translation on WMT16 en-de, we followed this setting [here](https://github.com/pytorch/fairseq/blob/main/examples/scaling_nmt/README.md) -2. To train RoBERTa, we followed this setting [here](https://github.com/pytorch/fairseq/tree/main/examples/roberta) -3. To train Language Models on Wikitext-103, we followed this setting [here](https://github.com/pytorch/fairseq/tree/main/examples/language_model) - - -## Tips - -1. If you would like to train large models with better performance, LayerDrop should be set to a smaller value such as 0.1 or 0.2. Too much LayerDrop will mean the model has too much regularization, so may not reach the best performance. Since LayerDrop adds regularization, you may achieve the best performance by slightly reducing the amount of standard dropout (for example, reduce by 0.1). - -2. If you would like to train large models to be pruned and made smaller, LayerDrop should be set to a larger value such as 0.5 if you want to prune very aggressively (such as removing half the network or more). If you would like to prune fewer layers away, LayerDrop can be set to a smaller value such as 0.2. Our experiments were conducted with low values of LayerDrop (such as 0.1 and 0.2), for reference. - -3. When pruning layers at inference time, it is best to spread out the layers remaining so they are evenly spaced throughout the network. For example, if you want to remove 50% of the network, keeping every other layer is good. - - -## FAQ - -1. How did the sharing layers experiment work? In an appendix (https://openreview.net/pdf?id=SylO2yStDr) we added an experiment on Wikitext-103 language modeling that combined LayerDrop with Weight Sharing. We shared chunks of 2 layers such that every other layer had shared weights. For example, if our network has layers 1 through 6, then layer 1 and 2 are shared, layer 3 and 4 are shared, and layer 5 and 6 are shared. - -2. LayerDrop hasn't been helping in my setting? During training time, LayerDrop can help regularize your network. This is most important if your network is already overfitting - if your network is underfitting, it is possible LayerDrop is adding too much regularization. We recommend using smaller values (such as 0.1 or 0.2) and also decreasing the quantity of standard dropout (for example, reduce by 0.1). - -3. Can you train a model without LayerDrop and finetune with LayerDrop (e.g. for BERT)? In our experiments, we did not see great performance. Models such as RoBERTa have trained for a long time in the pre-training setting, so only finetuning with LayerDrop for a few epochs on a downstream task such as MNLI does not achieve the robustness required for successful pruning. - - -## Having an issue or have a question? - -Please open an issue in this repository with the details of your question. Thanks! diff --git a/spaces/OFA-Sys/OFA-vqa/fairseq/fairseq/models/speech_to_text/modules/emformer.py b/spaces/OFA-Sys/OFA-vqa/fairseq/fairseq/models/speech_to_text/modules/emformer.py deleted file mode 100644 index 6ef76bd012ba40b0395fec2ca9ae9e9c136ffe40..0000000000000000000000000000000000000000 --- a/spaces/OFA-Sys/OFA-vqa/fairseq/fairseq/models/speech_to_text/modules/emformer.py +++ /dev/null @@ -1,1837 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) 2017-present, Facebook, Inc. -# All rights reserved. -# -# This source code is licensed under the license found in the LICENSE file in -# the root directory of this source tree. An additional grant of patent rights -# can be found in the PATENTS file in the same directory. - - -import math -import re -from functools import partial -from typing import List, Optional, Tuple - -import torch -import torch.nn as nn -from fairseq.models import ( - FairseqEncoder, -) -from fairseq.models.speech_to_text.utils import ( - NoOp, - lengths_to_padding_mask, - segments_to_sequence, -) -from fairseq.models.speech_to_text.utils import ( - attention_suppression, - layer_norm_backward_hook, -) -from torch import Tensor, device as Device -from torch.quantization.qconfig import ( - default_dynamic_qconfig, - per_channel_dynamic_qconfig, -) - - -class RelativePositionEmbedding(nn.Module): - """ - Implementation according to https://arxiv.org/abs/1803.02155 - """ - - def __init__(self, head_dim, max_position, norm_init=True): - super().__init__() - self.head_dim = head_dim - self.max_position = max_position - self.embeddings = nn.Parameter(torch.Tensor(max_position * 2 + 1, head_dim)) - if norm_init: - nn.init.xavier_normal_(self.embeddings) - else: - nn.init.xavier_uniform_(self.embeddings) - - def forward(self, input: Tensor): - output = nn.functional.embedding(input.long(), self.embeddings) - return output - - -class Fp32LayerNorm(nn.Module): - def __init__( - self, - input_dim, - clamp_grad=True, - max_grad_value=256, - eps=1e-5, - elementwise_affine=True, - ): - super().__init__() - self.torch_module = torch.nn.LayerNorm( - input_dim, eps=eps, elementwise_affine=elementwise_affine - ) - if clamp_grad: - hook = partial(layer_norm_backward_hook, clamp_value=max_grad_value) - self.torch_module.register_backward_hook(hook) - - def forward(self, input): - output = torch.nn.functional.layer_norm( - input.float(), - self.torch_module.normalized_shape, - self.torch_module.weight.float() - if self.torch_module.weight is not None - else None, - self.torch_module.bias.float() - if self.torch_module.bias is not None - else None, - self.torch_module.eps, - ).type_as(input) - return output - - -# ------------------------------------------------------------------------------ -# PositionwiseFF -# ------------------------------------------------------------------------------ - - -class PositionwiseFF(nn.Module): - """ - FFN layer in transformer. - - Args: - input_dim: input embedding dimension - ffn_dim: FFN layer inner dimension - dropout_on_fc1: dropout for first linear layer - dropout_on_fc2: dropout fr second linear layer - activation_fn: activation function used after first linear layer. \ - Only relu or gelu is supported. - - """ - - def __init__( - self, input_dim, ffn_dim, dropout_on_fc1, dropout_on_fc2, activation_fn - ): - super(PositionwiseFF, self).__init__() - - self.input_dim = input_dim - self.ffn_dim = ffn_dim - if activation_fn == "relu": - ac = nn.ReLU() - elif activation_fn == "gelu": - ac = nn.GELU() - else: - raise ValueError("Unsupported activation_fn = ({})".format(activation_fn)) - - # fc1 -> ac -> dropout -> fc2 -> dropout - self.module = nn.Sequential( - nn.Linear(input_dim, ffn_dim), - ac, - nn.Dropout(dropout_on_fc1), - nn.Linear(ffn_dim, input_dim), - nn.Dropout(dropout_on_fc2), - ) - - self.layer_norm = Fp32LayerNorm(input_dim) - - def forward(self, input): - module_out = self.module(self.layer_norm(input)) - output = module_out + input - - return output - - def quantize_(self, params=None): - if params and "per_channel" in params and params["per_channel"]: - qconfig = per_channel_dynamic_qconfig - else: - qconfig = default_dynamic_qconfig - torch.quantization.quantize_dynamic( - self, {torch.nn.Linear: qconfig}, dtype=torch.qint8, inplace=True - ) - return self - - -# ------------------------------------------------------------------------------ -# SummarizationLayer -# ------------------------------------------------------------------------------ - - -class SummarizationLayer(nn.Module): - def __init__(self, method, segment_size, embedding_dim): - super(SummarizationLayer, self).__init__() - self.segment_size = segment_size - self.embedding_dim = embedding_dim - nonlin_match = re.match(r"nonlinear\((?P[a-z]+),(?P[0-9]+)\)", method) - self.method = method - if method == "mean": - self.module = nn.AvgPool1d( - kernel_size=segment_size, - stride=segment_size, - ceil_mode=True, - ) - elif method == "max": - self.module = nn.MaxPool1d( - kernel_size=segment_size, - stride=segment_size, - ceil_mode=True, - ) - elif method == "linear": - self.module = nn.Linear(segment_size, 1) - elif nonlin_match: - nonlin_args = nonlin_match.groupdict() - act_type = nonlin_args["act"] - hid_dim = int(nonlin_args["dim"]) - if act_type == "relu": - act = nn.ReLU() - elif act_type == "gelu": - act = nn.GELU() - else: - raise ValueError("Unsupported activation_fn = ({})".format(act_type)) - self.module = nn.Sequential( - nn.Linear(segment_size, hid_dim), - act, - nn.Linear(hid_dim, 1), - ) - else: - raise ValueError("Unsupported summarization method = ({})".format(method)) - - def forward(self, input): - # T, B, D -> B, D, T - input = input.permute(1, 2, 0) - - if self.method == "mean" or self.method == "max": - output = self.module(input) - output = output.permute(2, 0, 1) - return output - - full_seg_length = input.size(2) // self.segment_size * self.segment_size - if full_seg_length > 0: - # at least one seg is full - B = input.size(0) - D = input.size(1) - input_todo = ( - input[:, :, :full_seg_length] - .contiguous() - .view(B, -1, self.segment_size) - ) - output = self.module(input_todo) - output = output.view(B, D, -1) - else: - output = input.new_zeros(input.size(0), input.size(1), 0) - left = input.size(2) - full_seg_length - if left > 0: - # when last seg is not full, use zeros as last memory placeholder - zeros = input.new_zeros(input.size(0), input.size(1), 1) - output = torch.cat([output, zeros], dim=2) - output = output.permute(2, 0, 1) - return output - - -# ------------------------------------------------------------------------------ -# NoSegAugmentedMemoryMultiheadAttentionBmm -# ------------------------------------------------------------------------------ - - -class NoSegAugmentedMemoryMultiheadAttentionBmm(nn.Module): - """ - Whole utterance augmented memory multihead attention using BMM. - - Different with previous augmented memory multihead attention where - the utterance is chunked into segments. Here we use attention mask - achieve so. The input embedding [right_context, utterance, summary] - is a concatenation of right context, utterance and summary. - - Right context block is the concatenation of all the right context for - each segments. [right_context_0, right_context_1, ..., right_context_n] - For example, if we have utterance = [v0, v1, v2, ...., v20]. segment - size 8, right_context size 4. Then the right context blocks = - [v8, v9, v10, v11, v16, v17, v18, v19, 0, 0, 0, 0], where v8, v9, v10, - and v11 are the right context for first segment. v16, v17, v18 and v19 - are the right context for second segment. 0, 0, 0 and 0 are right context - for the last segment. - - utterance is corresponding to input embedding sequence - - summary is concatenation of average of each segments. [summary_0, - summary_1, ..., ]. - - In augmented memory multihead attention, the query is [right_context, - utterance, summary], key is [memory, right_context, utterance]. Different - with AugmentedMemoryMultiheadAttentionBmm, memory here is passed from - previous attention layer. For the first attention layer, memory is average - of each segment. - - Memory is a concatenation of memory from each segments in previous attention - layer. For example, current layer is i, then memory is [m_0, m_1, ..., m_n]. - Each m_k is the output from seg_k in layer i-1. - - args: - input_dim: input embedding dimension - num_heads: number of heads in multihead self-attention - dropout: attention dropout - std_scale: if std_scale is not None. The weak attention suppression is - turned on. For std_scale = 0.5, all the attention smaller than - mean + 0.5 * std will be suppressed. - scaled_init: whether to use scaled init for linear weight - tanh_on_mem: whether to use tanh on memory output - use_mem: whether to use memory or not. When max_memory_size is 0, then - we don't have memory anymore. - layer_index: current self-attention layer index that is used in depth - initialization - max_relative_position: max relative position used in relative position - embedding - rpe_old_option: To be compatible with previous model. The previous model - was trained with attention += attention + rpe. The correct equation - should be attention = attention + rpe - - """ - - def __init__( - self, - input_dim, - num_heads, - dropout=0.0, - std_scale=None, - scaled_init=False, - tanh_on_mem=False, - use_mem=True, - mini_batches=False, - negative_inf="-inf", - layer_index=-1, - max_relative_position=0, - rpe_old_option=True, - ): - if input_dim % num_heads: - raise ValueError( - "input_dim ({}) must be divisible by num_heads ({})".format( - input_dim, num_heads - ) - ) - - super().__init__() - - embed_dim = input_dim - self.e2h_kv = torch.nn.Linear(input_dim, 2 * input_dim, bias=True) - self.e2h_q = torch.nn.Linear(input_dim, input_dim, bias=True) - self.rpe_old_option = rpe_old_option - if max_relative_position > 0: - self.use_rpe = True - self.rpe_k = RelativePositionEmbedding( - head_dim=input_dim // num_heads, - max_position=max_relative_position, - ) - self.rpe_v = RelativePositionEmbedding( - head_dim=input_dim // num_heads, - max_position=max_relative_position, - ) - else: - self.use_rpe = False - self.rpe_k = None - self.rpe_v = None - if scaled_init: - if layer_index == -1: - gain = 1.0 / math.sqrt(2) - else: - # https://arxiv.org/abs/2005.09684 depthwise initialization - # stablize the training greatly. Use depthwise initialization to - # replace incremental loss. - gain = 1.0 / math.sqrt(layer_index + 1) - torch.nn.init.xavier_uniform_(self.e2h_kv.weight, gain=gain) - torch.nn.init.xavier_uniform_(self.e2h_q.weight, gain=gain) - - self.out_proj = torch.nn.Linear(embed_dim, embed_dim, bias=True) - - self.embed_dim = embed_dim - self.num_heads = num_heads - self.dropout = dropout - - self.head_dim = embed_dim // num_heads - self.scaling = self.head_dim ** -0.5 - - self.std_scale = std_scale - self.use_mem = use_mem - self.mini_batches = mini_batches - self.negative_inf = negative_inf - - if tanh_on_mem: - self.squash_mem = torch.tanh - self.nonlinear_squash_mem = True - else: - self.squash_mem = NoOp() - self.nonlinear_squash_mem = False - - def prepare_qkv( - self, - input: Tensor, - mems: Tensor, - lengths: Tensor, - summary_length: int, - lc_length: int, - ): - # T: right_context length + utterance_length + summary_length - T, B, D = input.shape - mem_length = mems.size(0) - utterance_length = torch.max(lengths) - - right_context_blocks_length = T - utterance_length - summary_length - rc_block = input[:right_context_blocks_length, :, :] - utterance_block = input[right_context_blocks_length : T - summary_length, :, :] - - if B == 1: - padding_mask = None - else: - klengths = lengths + mem_length + right_context_blocks_length + lc_length - padding_mask = lengths_to_padding_mask(lengths=klengths) - - mem_rc_input = torch.cat([mems, rc_block, utterance_block], dim=0) - - # In training lc_length = 0 - key_length = mem_rc_input.size(0) + lc_length - rc_input_sum = input - q = self.e2h_q(rc_input_sum) - kv = self.e2h_kv(mem_rc_input) - k, v = kv.chunk(chunks=2, dim=2) - result_qkv = (q, k, v) - input_shape = (T, B, D) - result_lengths_info = ( - mem_length, - utterance_length, - right_context_blocks_length, - key_length, - ) - if padding_mask is not None: - assert padding_mask.size(0) == B - assert padding_mask.size(1) == key_length - - return result_qkv, input_shape, result_lengths_info, padding_mask - - def prepare_attention_weights( - self, - q: Tensor, - new_k: Tensor, - new_v: Tensor, - input_shape: Tuple[int, int, int], - rpe: Optional[Tensor], - ) -> Tuple[Tensor, Tensor, Tensor]: - T, B, D = input_shape - q = ( - q.contiguous().view(-1, B * self.num_heads, self.head_dim).transpose(0, 1) - * self.scaling - ) - - k = ( - new_k.contiguous() - .view(-1, B * self.num_heads, self.head_dim) - .transpose(0, 1) - ) - - v = ( - new_v.contiguous() - .view(-1, B * self.num_heads, self.head_dim) - .transpose(0, 1) - ) - - attention_weights = torch.bmm(q, k.transpose(1, 2)) - if self.use_rpe and rpe is not None and self.rpe_v is not None: - r_k = self.rpe_k(rpe) - # [q, B*h, d] * [q, k, d] -> [B*h, q, k] - attention_weights_rpe = torch.matmul( - q.transpose(0, 1), r_k.transpose(1, 2) - ).transpose(0, 1) - attention_weights = attention_weights + attention_weights_rpe - attention_weights_float = attention_weights.float() - - return attention_weights, attention_weights_float, v - - def prepare_attention_output( - self, - attention_weights: Tensor, - attention_weights_float: Tensor, - v: Tensor, - input_shape: Tuple[int, int, int], - key_length: int, - padding_mask: Optional[Tensor], - rpe: Optional[Tensor], - ) -> Tensor: - T, B, D = input_shape - if padding_mask is not None: - attention_weights_float = attention_weights_float.view( - B, self.num_heads, T, key_length - ) - attention_weights_float = attention_weights_float.masked_fill( - padding_mask.unsqueeze(1).unsqueeze(2).to(torch.bool), float("-inf") - ) - attention_weights_float = attention_weights_float.view( - B * self.num_heads, T, key_length - ) - - if self.std_scale is not None: - attention_weights_float = attention_suppression( - attention_weights_float, self.std_scale - ) - - attention_weights_float = torch.nn.functional.softmax( - attention_weights_float, dim=-1 - ) - attention_weights = attention_weights_float.type_as(attention_weights) - - attention_probs = torch.nn.functional.dropout( - attention_weights, p=self.dropout, training=self.training - ) - - # [T, key_length, B, n_head]+ [key_length, B, n_head, d_head] - # -> [T, B, n_head, d_head] - attention = torch.bmm(attention_probs, v) - if self.use_rpe and rpe is not None and self.rpe_v is not None: - r_v = self.rpe_v(rpe) - attention_rpe = torch.matmul( - attention_probs.transpose(0, 1), r_v - ).transpose(0, 1) - - if self.rpe_old_option: - attention += attention + attention_rpe - else: - attention = attention + attention_rpe - - assert list(attention.shape) == [B * self.num_heads, T, self.head_dim] - - attention = attention.transpose(0, 1).contiguous().view(T, B, self.embed_dim) - - rc_output_memory = self.out_proj(attention) - return rc_output_memory - - @torch.jit.unused - def forward( - self, - input: Tensor, - lengths: Tensor, - mems: Tensor, - attention_mask: Tensor, - pre_mems: Optional[Tensor] = None, - left_context_key: Optional[Tensor] = None, - left_context_val: Optional[Tensor] = None, - rpe: Optional[Tensor] = None, - ) -> Tuple[Tensor, Tensor, Tensor, Tensor]: - """ - forward function for NoSegAugmentedMemoryMultiheadAttentionBmm in training. - - args: - input: formed in the following way - [right_context_0, right_contex_1, ..., seg_0, seg_1, - ..., summary_0, summary_1,..] - lengths: the length of query which is [seg_0, seg_1, ....] - mems: [mem_0, mem_1, ...]. - attention_mask: attention mask for query = [right_context, query, summary] - key = [mem, right_context, query]. This is only used for traing. - - """ - if self.use_mem: - mem_length = mems.size(0) - summary_length = mem_length + 1 - if pre_mems is not None: - mems = torch.cat([pre_mems, mems], dim=0) - else: - mem_length = 0 - summary_length = 0 - - # In training, lc_length = 0 - if left_context_key is not None: - lc_length = left_context_key.size(0) - else: - lc_length = 0 - results = self.prepare_qkv( - input=input, - mems=mems, - lengths=lengths, - summary_length=summary_length, - lc_length=lc_length, - ) - result_qkv, input_shape, result_lengths_info, padding_mask = results - q, k, v = result_qkv - ( - mem_length, - utterance_length, - right_context_blocks_length, - key_length, - ) = result_lengths_info - - if left_context_key is not None: - # add the cache key and value - new_k = torch.cat( - [ - k[: mem_length + right_context_blocks_length, :, :], - left_context_key, - k[-utterance_length:, :, :], - ], - dim=0, - ) - new_v = torch.cat( - [ - v[: mem_length + right_context_blocks_length, :, :], - left_context_val, - v[-utterance_length:, :, :], - ], - dim=0, - ) - next_k = new_k[mem_length + right_context_blocks_length :, :, :] - next_v = new_v[mem_length + right_context_blocks_length :, :, :] - else: - new_k = k - new_v = v - next_k = None - next_v = None - - attention_weights, attention_weights_float, v = self.prepare_attention_weights( - q=q, - new_k=new_k, - new_v=new_v, - input_shape=input_shape, - rpe=rpe, - ) - - # mask attention - attention_mask = attention_mask.unsqueeze(0) - attention_weights_float = attention_weights_float.masked_fill( - attention_mask, float(self.negative_inf) - ) - - rc_output_memory = self.prepare_attention_output( - attention_weights=attention_weights, - attention_weights_float=attention_weights_float, - v=v, - input_shape=input_shape, - key_length=key_length, - padding_mask=padding_mask, - rpe=rpe, - ) - - if self.use_mem: - # next_m length equals to summary length - 1 - # last memory is ignored - if self.mini_batches: - next_m = rc_output_memory[-summary_length:] - else: - next_m = rc_output_memory[-summary_length:-1] - - next_m = self.squash_mem(next_m) - # rc and output - rc_output = rc_output_memory[:-summary_length] - if not self.nonlinear_squash_mem: - next_m = torch.clamp(next_m, min=-10, max=10) - else: - next_m = mems - rc_output = rc_output_memory - - return rc_output, next_m, next_k, next_v - - @torch.jit.export - def forward_jit( - self, - input: Tensor, - lengths: Tensor, - mems: Tensor, - left_context_key: Tensor, - left_context_val: Tensor, - rpe: Optional[Tensor], - ) -> Tuple[Tensor, Tensor, Tensor, Tensor]: - """ - forward function for NoSegAugmentedMemoryMultiheadAttentionBmm in decoding. - - args: - input: formed in the following way - [right_context_0, right_contex_1, ..., seg_0, seg_1, - ..., summary_0, summary_1,..] - lengths: the length of query which is [seg_0, seg_1, ....] - mems: [mem_0, mem_1, ...]. - left_context_key: left_context for key part. This is only used for online - decoding. In training, this is empty tensor - left_context_val: left_context for value part. This is only used for online - decoding. In training, this is empty tensor - - """ - lc_length = left_context_key.size(0) - - # In decoding, summary_length = 1 or 0 - if self.use_mem: - summary_length = 1 - else: - summary_length = 0 - - results = self.prepare_qkv( - input=input, - mems=mems, - lengths=lengths, - summary_length=summary_length, - lc_length=lc_length, - ) - result_qkv, input_shape, result_lengths_info, padding_mask = results - q, k, v = result_qkv - ( - mem_length, - utterance_length, - right_context_blocks_length, - key_length, - ) = result_lengths_info - - # add the cache key and value - new_k = torch.cat( - [ - k[: mem_length + right_context_blocks_length, :, :], - left_context_key, - k[-utterance_length:, :, :], - ], - dim=0, - ) - new_v = torch.cat( - [ - v[: mem_length + right_context_blocks_length, :, :], - left_context_val, - v[-utterance_length:, :, :], - ], - dim=0, - ) - next_k = new_k[mem_length + right_context_blocks_length :, :, :] - next_v = new_v[mem_length + right_context_blocks_length :, :, :] - - attention_weights, attention_weights_float, v = self.prepare_attention_weights( - q=q, - new_k=new_k, - new_v=new_v, - input_shape=input_shape, - rpe=rpe, - ) - # In online decoding, we don't have attention mask. But we still need - # to disable the attention from summary query to memory - attention_weights_float[:, -1, :mem_length] = float(self.negative_inf) - rc_output_memory = self.prepare_attention_output( - attention_weights=attention_weights, - attention_weights_float=attention_weights_float, - v=v, - input_shape=input_shape, - key_length=key_length, - padding_mask=padding_mask, - rpe=rpe, - ) - - # In decoding, summary length is 1 - if self.use_mem: - next_m = rc_output_memory[-1:] - next_m = self.squash_mem(next_m) - # rc and output - rc_output = rc_output_memory[:-1] - if not self.nonlinear_squash_mem: - next_m = torch.clamp(next_m, min=-10, max=10) - else: - rc_output = rc_output_memory - # empty tensor as input mems - next_m = mems - - return rc_output, next_m, next_k, next_v - - def quantize_(self, params=None): - if params and "per_channel" in params and params["per_channel"]: - qconfig = per_channel_dynamic_qconfig - else: - qconfig = default_dynamic_qconfig - torch.quantization.quantize_dynamic( - self, {torch.nn.Linear: qconfig}, dtype=torch.qint8, inplace=True - ) - return self - - -class NoSegAugmentedMemoryTransformer(nn.Module): - """ - Whole utterance augmented memory transformer. - - This is not pyspeech nn layer. It is used as a module in a master layer where - multiple transformers is used. - """ - - def __init__( - self, - input_dim, - num_heads, - ffn_dim, - dropout_in_attn=0.0, - dropout_on_attn=None, - dropout_on_fc1=None, - dropout_on_fc2=None, - activation_fn="relu", - tanh_on_mem=False, - std_scale=None, - scaled_init=False, - segment_size=128, - use_mem=True, - mini_batches=False, - negative_inf="-inf", - layer_index=-1, - summarization_method="mean", - max_relative_position=0, - rpe_old_option=True, - ): - super(NoSegAugmentedMemoryTransformer, self).__init__() - - self.attention = NoSegAugmentedMemoryMultiheadAttentionBmm( - input_dim=input_dim, - num_heads=num_heads, - dropout=dropout_in_attn, - scaled_init=scaled_init, - tanh_on_mem=tanh_on_mem, - std_scale=std_scale, - use_mem=use_mem, - mini_batches=mini_batches, - negative_inf=negative_inf, - layer_index=layer_index, - max_relative_position=max_relative_position, - ) - self.dropout = nn.Dropout(dropout_on_attn) - self.pos_ff = PositionwiseFF( - input_dim=input_dim, - ffn_dim=ffn_dim, - dropout_on_fc1=dropout_on_fc1, - dropout_on_fc2=dropout_on_fc2, - activation_fn=activation_fn, - ) - self.layer_norm_pre = Fp32LayerNorm(input_dim) - self.layer_norm = Fp32LayerNorm(input_dim) - self.segment_size = segment_size - self.use_mem = use_mem - - self.memory_op = SummarizationLayer( - summarization_method, segment_size, input_dim - ) - - def set_mini_batches(self, mini_batches): - self.attention.mini_batches = mini_batches - - def gen_summary_queries(self, input): - sum_input = self.memory_op(input) - return sum_input - - def pre_attention_ops(self, input, right_context_blocks): - rc_length = right_context_blocks.size(0) - input_length = input.size(0) - - rc_and_input = torch.cat([right_context_blocks, input], dim=0) - residual_input = rc_and_input - rc_and_input = self.layer_norm_pre(rc_and_input) - - query_input = rc_and_input[-input_length:, :, :] - return rc_length, input_length, residual_input, query_input, rc_and_input - - def after_attention_ops(self, attention_output, residual_input): - output = self.dropout(attention_output) - output = output + residual_input - output = self.pos_ff(output) - output = self.layer_norm(output) - return output - - @torch.jit.export - def forward_jit( - self, - input: Tensor, - lengths: Tensor, - mems: Tensor, - left_context_key: Tensor, - left_context_val: Tensor, - right_context_blocks: Tensor, - rpe: Optional[Tensor], - ) -> Tuple[Tensor, Tensor, Tensor, Tensor, Tensor]: - - results = self.pre_attention_ops(input, right_context_blocks) - rc_length, input_length, residual_input, query_input, rc_and_input = results - - # In online decoding, the summary query size is always 1 or 0 - if self.use_mem: - summary_query = self.gen_summary_queries(query_input) - summary_query = summary_query[0:1, :, :] - rc_qu_su = torch.cat([rc_and_input, summary_query], dim=0) - else: - rc_qu_su = rc_and_input - - rc_output, next_m, next_k, next_v = self.attention.forward_jit( - input=rc_qu_su, - lengths=lengths, - mems=mems, - left_context_key=left_context_key, - left_context_val=left_context_val, - rpe=rpe, - ) - rc_output = self.after_attention_ops(rc_output, residual_input) - results = ( - rc_output[-input_length:, :, :], - next_m, - rc_output[0:rc_length, :, :], - next_k, - next_v, - ) - return results - - @torch.jit.unused - def forward( - self, - input, - lengths, - mems, - right_context_blocks, - attention_mask, - pre_mems, - left_context_key, - left_context_val, - rpe, - ): - - results = self.pre_attention_ops(input, right_context_blocks) - rc_length, input_length, residual_input, query_input, rc_and_input = results - if self.use_mem: - summary_query = self.gen_summary_queries(query_input) - rc_qu_su = torch.cat([rc_and_input, summary_query], dim=0) - else: - rc_qu_su = rc_and_input - - rc_output, next_m, next_k, next_v = self.attention( - input=rc_qu_su, - lengths=lengths, - mems=mems, - attention_mask=attention_mask, - pre_mems=pre_mems, - left_context_key=left_context_key, - left_context_val=left_context_val, - rpe=rpe, - ) - - # [TODO] Note memory did not go through pos_ff. What happen if we pass - # memory through the pos_ff as well? - rc_output = self.after_attention_ops(rc_output, residual_input) - results = ( - rc_output[-input_length:, :, :], - next_m, - rc_output[0:rc_length, :, :], - next_k, - next_v, - ) - - return results - - -class NoSegAugmentedMemoryTransformerEncoderLayer(FairseqEncoder): - """ - Whole utterance augmented memory transformer encoder layer. This is a master layer - where we can define multiple augmented memory transformers. There are two reasons - to setup the master layer. - 1. We only need to define once about the attention mask. All the layers in the master - layer share the same mask. - 2. pyspeech nn layer has special input and output format. Defining one master layer is - easier to passing memory between different layes inside the master layer - - args: - input_dim: input embedding dimension - num_heads: number of heads in multihead self-attention - ffn_dim: ffn dimension in FFN layer - num_layers: number of augmented memory transformer layers - dropout_in_attn: dropout used in multi-head self-attention - dropout_on_attn: dropout used for output from te multihead self-attention - dropout_on_fc1: dropout used in FFN layer for the first linear layer - dropout_on_fc2: dropout used in FFN layer for the second linear layer - segment_size: segment size for each segment - context_config: (left_context_size, right_context_size) defines the surround context size - for each segment - max_memory_size: maximum memory size used for each segment - scaled_init: whether use scaled init for weight initialization in attention layer - std_scale: if std_scale is not None. The weak attention suppression is - turned on. For std_scale = 0.5, all the attention smaller than - mean + 0.5 * std will be suppressed. - activation_fn: activation function used in FFN layer. [ReLU, GELU] supported - tanh_on_mem: whether use tanh on memory - mini_batches: use mini-btach training - negative_inf: the negative infinity value used in attention masking. default is "-inf". - For some situation, e.g. LM. it is better to use "-1e8" to avoid nan issue. - summarization_method: method to generate segment summrization embedding - max_relative_position: max relatie position for relative position embedding - rpe_old_option: To be compatible with previous model. The previous model - was trained with attention += attention + rpe. The correct equation - should be attention = attention + rpe - [TODO]: remove the rpe_old_option by the end of 2021 Q1. - - """ - - def __init__( - self, - input_dim, - num_heads, - ffn_dim, - num_layers=1, - dropout_in_attn=0.0, - dropout_on_attn=0.0, - dropout_on_fc1=0.0, - dropout_on_fc2=0.0, - segment_size=128, - context_config=(0, 0), - max_memory_size=0, - scaled_init=True, - std_scale=None, - activation_fn="relu", - tanh_on_mem=False, - mini_batches=False, - negative_inf="-inf", - deep_init=True, - summarization_method="mean", - max_relative_position=0, - rpe_old_option=True, - ): - super().__init__(None) - if input_dim % num_heads: - raise ValueError( - "input_dim ({}) must be divisible by num_heads ({})".format( - input_dim, num_heads - ) - ) - - # we used to support growing memory size. However, it will cause - # cross stream batching failure. Now we need to have exact max memory size - if max_memory_size < 0: - raise ValueError("max_memory_size must be >= 0") - - # Only assign right_context. In decoding, left context will be cached. - # No need to let the online decoder to re-assign the left context - self.left_context, self.right_context = context_config - self.segment_size = segment_size - self.memory_dim = input_dim - self.max_memory_size = max_memory_size - self.mini_batches = mini_batches - if self.max_memory_size != 0: - self.use_mem = True - else: - self.use_mem = False - - self.memory_op = SummarizationLayer( - summarization_method, segment_size, input_dim - ) - - self.layers = torch.nn.ModuleList() - self.num_layers = num_layers - self.max_relative_position = max_relative_position - if self.max_relative_position > 0: - self.use_rpe = True - else: - self.use_rpe = False - for i in range(self.num_layers): - if deep_init: - layer_index = i - else: - layer_index = -1 - - self.layers.append( - NoSegAugmentedMemoryTransformer( - num_heads=num_heads, - input_dim=input_dim, - ffn_dim=ffn_dim, - dropout_in_attn=dropout_in_attn, - dropout_on_attn=dropout_on_attn, - dropout_on_fc1=dropout_on_fc1, - dropout_on_fc2=dropout_on_fc2, - segment_size=segment_size, - std_scale=std_scale, - activation_fn=activation_fn, - tanh_on_mem=tanh_on_mem, - scaled_init=scaled_init, - use_mem=self.use_mem, - mini_batches=mini_batches, - negative_inf=negative_inf, - layer_index=layer_index, - summarization_method=summarization_method, - max_relative_position=max_relative_position, - rpe_old_option=rpe_old_option, - ) - ) - - def set_mini_batches(self, mini_batches): - # handy function only used for unit test - self.mini_batches = mini_batches - for layer in self.layers: - layer.set_mini_batches(mini_batches) - - def _get_relative_position( - self, - input: Tensor, - max_relative_position: int, - left_context_length: int, - past_length: int, - is_decoding: bool, - ): - # For training, we copy the right context to the start of the utterance - # First dimension in distance is corresponding to query. - # [right context, utterance, summary vector] - # Second dimension in distance is corresponding to key. - # [Memory bank, right context, utterance] - # For summary vector in query part, the distance with - # all other position is 2*max_position. For memory bank in key, - # the distance with all other positions is 0. - - T, B, D = input.shape - num_segs = math.ceil((T - self.right_context) / self.segment_size) - - # utterance - u_st = past_length * self.segment_size - u_ed = u_st + T - utterance_ranges = torch.arange(u_st, u_ed - self.right_context) - - # left context. Only in minibatch or decoding - left_context_ranges = torch.arange(u_st - left_context_length, u_st) - - # Right context block - # right context + utterance - right_context_blocks = [] - for i in range(0, num_segs - 1): - st = (i + 1) * self.segment_size + u_st - ed = st + self.right_context - assert ed < u_ed - temp = torch.arange(st, ed) - right_context_blocks.append(temp) - right_context_blocks.append(torch.arange(u_ed - self.right_context, u_ed)) - right_context_ranges = torch.cat(right_context_blocks) - - if self.use_mem: - # Memory bank - # The position for memory -n, .., -1 - if is_decoding: - memory_size = min(past_length, self.max_memory_size) - else: - memory_size = num_segs + past_length - 1 - memory_bank_ranges = torch.arange( - -max_relative_position - 1, -max_relative_position - 1 - memory_size, -1 - ) - - # summary vector - # The position for summary vector as the T+max_relative_position+1. - # After the clamping, the relative position is max_relative_position - summary_pos_st = u_ed + max_relative_position + 1 - summary_vector_ranges = torch.arange( - summary_pos_st, summary_pos_st + num_segs - ) - - key_ranges = torch.cat( - [ - memory_bank_ranges, - right_context_ranges, - left_context_ranges, - utterance_ranges, - ] - ) - - query_ranges = torch.cat( - [right_context_ranges, utterance_ranges, summary_vector_ranges] - ) - else: - key_ranges = torch.cat( - [right_context_ranges, left_context_ranges, utterance_ranges] - ) - - query_ranges = torch.cat([right_context_ranges, utterance_ranges]) - - distance = key_ranges[None, :] - query_ranges[:, None] - distance_clamp = ( - torch.clamp(distance, -max_relative_position, max_relative_position) - + max_relative_position - ) - distance_clamp = distance_clamp.to(input.device).long().detach() - return distance_clamp - - def _get_attention_mask(self, input, past_length=0, left_context_cache=0): - # attention mask for each query contains three parts: - # 1. memory part - # 2. left_context + segment - # 3. right_context_block - # so for each segment and its correspoinding right context block, - # the attention matrix is formed by 9 parts: - # [0, m, 0, 0, right_context, 0, 0, seg, 0] - # [before memory, memory, after memory, before right context, right_context, - # after right context, before seg, seg, after seg] - # - # Query is formed in the way as [right_context_blocks, utterance, summary] - # - # Note: put m and right_context before segment is convenient - # for padding_mask operation. - # Key lengths = m_length + right_context_block_length + lengths - utterance_length, batch_size, _ = input.shape - summary_length = math.ceil(utterance_length / self.segment_size) - num_segs = summary_length - rc_length = self.right_context * num_segs - rc = self.right_context - lc = self.left_context - - # using mini-batches, there is left context cache available for current - # sequence. - lcc = left_context_cache - - # max_memory_size is 0 then we don't have memory and summary - # past_length is the memory carry from previous sequence - if self.use_mem: - mem_length = num_segs - 1 + past_length - else: - mem_length = 0 - rc_mask = [] - query_mask = [] - summary_mask = [] - for j in range(0, num_segs): - ssize = min(self.segment_size, utterance_length - j * self.segment_size) - - rc_size = rc - rc_mat = [] - q_mat = [] - s_mat = [] - m_start = max(j + past_length - self.max_memory_size, 0) - - # max_memory_size is 0, then we don't use memory - if self.use_mem: - # part 0: before memory - rc_mat.append(input.new_zeros(rc_size, m_start)) - q_mat.append(input.new_zeros(ssize, m_start)) - s_mat.append(input.new_zeros(1, m_start)) - - # part 1: memory - col_1 = j + past_length - m_start - rc_mat.append(torch.ones(rc_size, col_1, device=input.device)) - q_mat.append(torch.ones(ssize, col_1, device=input.device)) - # based on D22875746, disable summary query attention - # on memeory is better for long form utterance - s_mat.append(input.new_zeros(1, col_1)) - - # part 2: after memory - col_2 = mem_length - (j + past_length) - rc_mat.append(input.new_zeros(rc_size, col_2)) - q_mat.append(input.new_zeros(ssize, col_2)) - s_mat.append(input.new_zeros(1, col_2)) - - # part 3: before right context - rc_start = j * rc - rc_mat.append(input.new_zeros(rc_size, rc_start)) - q_mat.append(input.new_zeros(ssize, rc_start)) - s_mat.append(input.new_zeros(1, rc_start)) - - # part 4: right context - rc_end = rc_start + rc - col_4 = rc - rc_mat.append(torch.ones(rc_size, col_4, device=input.device)) - q_mat.append(torch.ones(ssize, col_4, device=input.device)) - s_mat.append(torch.ones(1, col_4, device=input.device)) - - # part 5: after right context - col_5 = rc_length - rc_end - rc_mat.append(input.new_zeros(rc_size, col_5)) - q_mat.append(input.new_zeros(ssize, col_5)) - s_mat.append(input.new_zeros(1, col_5)) - - # part 6: before query segment - seg_start = max(j * self.segment_size + lcc - lc, 0) - rc_mat.append(input.new_zeros(rc_size, seg_start)) - q_mat.append(input.new_zeros(ssize, seg_start)) - s_mat.append(input.new_zeros(1, seg_start)) - - # part 7: query segment - # note: right context is put in right context block - # here we only need to consider about left context - seg_end = min((j + 1) * self.segment_size + lcc, utterance_length + lcc) - col_7 = seg_end - seg_start - rc_mat.append(torch.ones(rc_size, col_7, device=input.device)) - q_mat.append(torch.ones(ssize, col_7, device=input.device)) - s_mat.append(torch.ones(1, col_7, device=input.device)) - - # part 8: after query segment - col_8 = utterance_length + lcc - seg_end - rc_mat.append(input.new_zeros(rc_size, col_8)) - q_mat.append(input.new_zeros(ssize, col_8)) - s_mat.append(input.new_zeros(1, col_8)) - - rc_mask.append(torch.cat(rc_mat, dim=1)) - query_mask.append(torch.cat(q_mat, dim=1)) - summary_mask.append(torch.cat(s_mat, dim=1)) - - # no memory, then we don't need summary either - if self.use_mem: - attention_mask = ( - 1 - - torch.cat( - [ - torch.cat(rc_mask, dim=0), - torch.cat(query_mask, dim=0), - torch.cat(summary_mask, dim=0), - ], - dim=0, - ) - ).to(torch.bool) - else: - attention_mask = ( - 1 - - torch.cat( - [torch.cat(rc_mask, dim=0), torch.cat(query_mask, dim=0)], dim=0 - ) - ).to(torch.bool) - - return attention_mask - - @torch.jit.export - def init_state( - self, batch_size: int, device: Optional[Device] = None - ) -> List[Tensor]: - empty_memory = torch.zeros( - self.num_layers, - self.max_memory_size, - batch_size, - self.memory_dim, - device=device, - ) - left_context_key = torch.zeros( - self.num_layers, - self.left_context, - batch_size, - self.memory_dim, - device=device, - ) - left_context_val = torch.zeros( - self.num_layers, - self.left_context, - batch_size, - self.memory_dim, - device=device, - ) - past_length = torch.zeros(1, batch_size, dtype=torch.int32, device=device) - - return [empty_memory, left_context_key, left_context_val, past_length] - - @torch.jit.export - def batch_state(self, states: List[List[Tensor]]) -> List[Tensor]: - if len(states) == 0: - return [] - batched_m = [] - batched_lc_key = [] - batched_lc_val = [] - batched_past_length = [] - for state in states: - if len(state) == 0: - continue - m, lc_key, lc_val, past_length = state - batched_m.append(m) - batched_lc_key.append(lc_key) - batched_lc_val.append(lc_val) - batched_past_length.append(past_length) - - if ( - (len(batched_m) == 0) - or (len(batched_lc_key) == 0) - or (len(batched_lc_val) == 0) - or (len(batched_past_length) == 0) - ): - return [ - torch.tensor([]), - torch.tensor([]), - torch.tensor([]), - torch.tensor([]), - ] - - batched_m = torch.cat(batched_m, dim=2) - batched_lc_key = torch.cat(batched_lc_key, dim=2) - batched_lc_val = torch.cat(batched_lc_val, dim=2) - batched_past_length = torch.cat(batched_past_length, dim=1) - return [batched_m, batched_lc_key, batched_lc_val, batched_past_length] - - @torch.jit.export - def reorder_state(self, state: List[Tensor], indices: Tensor) -> List[Tensor]: - if len(state) == 0: - return [] - m, lc_key, lc_val, past_length = state - indices = indices.to(device=m.device) - reord_m = torch.index_select(m, 2, indices) - reord_lc_key = torch.index_select(lc_key, 2, indices) - reord_lc_val = torch.index_select(lc_val, 2, indices) - reord_past_length = torch.index_select(past_length, 1, indices) - return [reord_m, reord_lc_key, reord_lc_val, reord_past_length] - - @torch.jit.export - def reset_state(self, state: List[Tensor], indices: Tensor) -> List[Tensor]: - m, lc_key, lc_val, past_length = state - m = m.index_fill(dim=2, index=indices, value=0.0) - lc_key = lc_key.index_fill(dim=2, index=indices, value=0.0) - lc_val = lc_val.index_fill(dim=2, index=indices, value=0.0) - past_length = past_length.index_fill(dim=1, index=indices, value=0) - - return [m, lc_key, lc_val, past_length] - - @torch.jit.export - def state_size(self) -> int: - return 4 - - @torch.jit.export - def batch_size_in_state( - self, state: Optional[List[Tensor]], sloppy: bool = True - ) -> Optional[int]: - if state is None: - return None - return state[0].size(2) - - def gen_summary_queries(self, input): - sum_input = self.memory_op(input) - return sum_input - - def _gen_right_context_padded_input(self, input): - # This function deals with input that is already - # padded with right context (e.g. minibatch training) - right_context_blocks = [] - T, B, D = input.shape - num_segs = math.ceil((T - self.right_context) / self.segment_size) - for i in range(0, num_segs - 1): - st = (i + 1) * self.segment_size - ed = st + self.right_context - assert ed < T - temp = input[st:ed, :, :] - right_context_blocks.append(temp) - - # last segment right context is already available - right_context_blocks.append(input[T - self.right_context :, :, :]) - return torch.cat(right_context_blocks, dim=0) - - def _gen_segs_right_context(self, input, lengths): - segments = [] - T, B, D = input.size() - nT = T - self.right_context - - # assume input is right context padded - num_segs = math.ceil(nT / self.segment_size) - # pad zeros to the utterance to make sure each - # segment has the same right context. For the - for i in range(0, num_segs - 1): - st = i * self.segment_size - ed = min(T, st + self.segment_size + self.right_context) - temp = input[st:ed, :, :] - rest_lengths = torch.clamp( - lengths - self.segment_size, min=0, max=nT - (i + 1) * self.segment_size - ) - segments.append((temp, lengths - rest_lengths + self.right_context)) - lengths = rest_lengths - - last_seg = input[st + self.segment_size :, :, :] - segments.append((last_seg, rest_lengths + self.right_context)) - - return segments - - @torch.jit.unused - def forward( - self, input: Tensor, padding_masks: Tensor, state: Optional[List[Tensor]] = None - ) -> Tuple[Tensor, Tensor, List[Tensor], List[Tensor]]: - # Xutai: originally the second argument is lengths. - lengths = (~padding_masks).sum(dim=1).long() - # mini batch training. - if self.mini_batches: - return self.forward_mini_batches(input, lengths, state) - - # regular full sequence training. Note, assume the right context in provided - # in the input. - T, B, D = input.size() - right_context_blocks = self._gen_right_context_padded_input(input) - - # generate the relative positional embedding - if self.use_rpe: - rpe = self._get_relative_position( - input=input, - max_relative_position=self.max_relative_position, - left_context_length=0, - past_length=0, - is_decoding=False, - ) - else: - rpe = None - input = input[: T - self.right_context, :, :] - - attention_mask = self._get_attention_mask(input) - - # firt layer use each segment mean as memory - # ignore the last one seg average - if self.use_mem: - mems = self.gen_summary_queries(input)[:-1, :, :] - else: - mems = torch.zeros(0, input.size(1), input.size(2), device=input.device) - mems = mems.type_as(input) - - output = input - all_outputs = [] - - for layer in self.layers: - output, mems, right_context_blocks, _, _ = layer( - input=output, - lengths=lengths, - attention_mask=attention_mask, - mems=mems, - right_context_blocks=right_context_blocks, - pre_mems=None, - left_context_key=None, - left_context_val=None, - rpe=rpe, - ) - all_outputs.append(output) - return output, padding_masks, [], all_outputs - - def forward_jit_mini_batch_init( - self, - seg: Tensor, - state: Optional[List[Tensor]] = None, - is_decoding: bool = False, - ): - # Prepare state. In whole sequence training, state is ignored. - # For minibatch training, we need to prepare state - if state is None: - state = self.init_state(batch_size=seg.size(1), device=seg.device) - if seg.dtype == torch.half: - state = [state[0].half(), state[1].half(), state[2].half(), state[3]] - - if self.use_mem: - # note input average only on seg, not on right context - # first layer use each segmetn mean as memory. the last - # one segment average is used in state - full_mems = self.gen_summary_queries(seg) - if is_decoding: - mems = full_mems[0:1, :, :] - state_mems = torch.cat([state[0][0], mems], dim=0) - else: - mems = full_mems[:-1, :, :] - state_mems = torch.cat([state[0][0], full_mems], dim=0) - else: - mems = state[0][0] - state_mems = mems - - # track processed segment number or memory number - # the same batch as the same bumber of past length - past_length = state[3][0][0].item() - past_left_context = min(past_length * self.segment_size, self.left_context) - past_length = min(self.max_memory_size, past_length) - - return state, mems, state_mems, past_length, past_left_context - - def state_update_before( - self, layer: int, state: List[Tensor], past_length: int, past_left_context: int - ): - pre_mems = state[0][layer][self.max_memory_size - past_length :, :, :] - lc_key = state[1][layer][self.left_context - past_left_context :, :, :] - lc_val = state[2][layer][self.left_context - past_left_context :, :, :] - return pre_mems, lc_key, lc_val - - def state_update_after( - self, - layer: int, - state: List[Tensor], - mems: Tensor, - next_key: Tensor, - next_val: Tensor, - mems_list: List[Tensor], - lc_key_list: List[Tensor], - lc_val_list: List[Tensor], - ): - # mems is used for next layer - if layer < self.num_layers - 1: - state_mems = torch.cat([state[0][layer + 1], mems], dim=0) - mems_list.append(state_mems[-self.max_memory_size :, :, :]) - - # when mems pass to next sequence, we need the last memory. when mems - # use for the next layer, we can ignore the last memory - mems = mems[:-1, :, :] - - # note state[1][i] and state[2][i] original length equals to self.left_context - new_k = torch.cat([state[1][layer], next_key], dim=0) - new_v = torch.cat([state[2][layer], next_val], dim=0) - lc_key_list.append(new_k[-self.left_context :, :, :]) - lc_val_list.append(new_v[-self.left_context :, :, :]) - return mems_list, lc_key_list, lc_val_list, mems - - def state_update_after_loop( - self, - state: List[Tensor], - mems_list: List[Tensor], - lc_key_list: List[Tensor], - lc_val_list: List[Tensor], - update_length: int, - ): - state[0] = torch.stack(mems_list, dim=0) - state[1] = torch.stack(lc_key_list, dim=0) - state[2] = torch.stack(lc_val_list, dim=0) - state[3] = state[3] + update_length - return state - - @torch.jit.unused - def forward_mini_batches( - self, input: Tensor, lengths: Tensor, state: Optional[List[Tensor]] = None - ) -> Tuple[Tensor, Tensor, List[Tensor], List[Tensor]]: - T, B, D = input.size() - - # input without right context - seg = input[: T - self.right_context, :, :] - - # get right context blocks - right_context_blocks = self._gen_right_context_padded_input(input) - - mems_list = [] - lc_key_list = [] - lc_val_list = [] - results = self.forward_jit_mini_batch_init(seg, state, False) - state, mems, state_mems, past_length, past_left_context = results - - # relative position embedding - if self.use_rpe: - rpe = self._get_relative_position( - input=input, - max_relative_position=self.max_relative_position, - left_context_length=past_left_context, - past_length=past_length, - is_decoding=False, - ) - else: - rpe = None - - # get attention mask based on seg (not include right context) and available - # left context - attention_mask = self._get_attention_mask(seg, past_length, past_left_context) - mems_list.append(state_mems[-self.max_memory_size :, :, :]) - output = seg - i = 0 - all_outputs = [] - for layer in self.layers: - # In order to make cross stream batching work, mem, left context key - # and left context value in the state should always be the same shape. - # We use the past length to track the processed segment number. In this - # way, we take out the essential memory, left context key and left - # context val from the state. After finish the forward for current segment - # we add the new memory, left context key and left context value into the - # staate and trim out the oldest part to keep the shape consistent. - pre_mems, lc_key, lc_val = self.state_update_before( - i, state, past_length, past_left_context - ) - - output, mems, right_context_blocks, next_key, next_val = layer.forward( - input=output, - lengths=lengths, - attention_mask=attention_mask, - mems=mems, - right_context_blocks=right_context_blocks, - pre_mems=pre_mems, - left_context_key=lc_key, - left_context_val=lc_val, - rpe=rpe, - ) - all_outputs.append(output) - mems_list, lc_key_list, lc_val_list, mems = self.state_update_after( - layer=i, - state=state, - mems=mems, - next_key=next_key, - next_val=next_val, - mems_list=mems_list, - lc_key_list=lc_key_list, - lc_val_list=lc_val_list, - ) - - i += 1 - - # update state - update_length = math.ceil((T - self.right_context) / self.segment_size) - state = self.state_update_after_loop( - state=state, - mems_list=mems_list, - lc_key_list=lc_key_list, - lc_val_list=lc_val_list, - update_length=update_length, - ) - - return output, lengths, state, all_outputs - - def forward_jit_test( - self, input: Tensor, lengths: Tensor, state: Optional[List[Tensor]] = None - ) -> Tuple[Tensor, Tensor, List[Tensor]]: - """ - This one simulate sequence encoder forward jit. This is for unit test purpose. - It is not used in training or decoding. Note, extra_right_context is set in - the model. In unit test, input = [utterance, right_context], lengths = - [utterance_length]. - args: - input: input utterance - lengths: utterance input length - state: None here. input is whole utterance - """ - # [TODO] sequence_to_segment has bug in lengths. - seg_src_tokens_lengths = self._gen_segs_right_context(input, lengths) - - seg_enc_tokens_lengths: List[Tuple[Tensor, Tensor]] = [] - state: Optional[List[Tensor]] = None - for seg_src_tokens, seg_src_lengths in seg_src_tokens_lengths: - seg_enc_tokens, seg_enc_lengths, state = self.forward_jit( - input=seg_src_tokens, lengths=seg_src_lengths, state=state - ) - seg_enc_tokens_lengths.append((seg_enc_tokens, seg_enc_lengths)) - - enc_tokens, enc_lengths = segments_to_sequence( - segments=seg_enc_tokens_lengths, time_axis=0 - ) - - state = [] # returns trivial state - - return enc_tokens, enc_lengths, state - - @torch.jit.export - def forward_jit( - self, input: Tensor, lengths: Tensor, state: Optional[List[Tensor]] = None - ) -> Tuple[Tensor, Tensor, List[Tensor]]: - """ - Forward helper for online decoding. - - args: - input: [seg, right_context]. We assume in online we - always padding the right context to the preset right context size. - For the last segment, we may have short segment size, but right - context size is the same as other segments - lengths: utterance input length is the utterance segment length and - right context size - state: [memory, left_context_key, left_context_val]. To improve throughput, - in addition to memory, we also cache key and value for left_context in - multihead self-attention - """ - # In online decoding, input = [segment, right_context] - # Lengths = [segment_length, right_context_length] - # so we need strip right context in output - T, B, D = input.size() - rc_str = T - self.right_context - rc_end = T - right_context_blocks = input[rc_str:rc_end, :, :] - seg = input[:rc_str, :, :] - lengths = torch.clamp(lengths - self.right_context, min=0) - mems_list = [] - lc_key_list = [] - lc_val_list = [] - - results = self.forward_jit_mini_batch_init(seg, state, True) - state, mems, state_mems, past_length, past_left_context = results - - # relative position embedding - if self.use_rpe: - rpe = self._get_relative_position( - input=input, - max_relative_position=self.max_relative_position, - left_context_length=past_left_context, - past_length=past_length, - is_decoding=True, - ) - else: - rpe = None - - # memory for first layer. - mems_list.append(state_mems[-self.max_memory_size :, :, :]) - output = seg - i = 0 - for layer in self.layers: - # In order to make cross stream batching work, mem, left context key - # and left context value in the state should always be the same shape. - # We use the past length to track the processed segment number. In this - # way, we take out the essential memory, left context key and left - # context val from the state. After finish the forward for current segment - # we add the new memory, left context key and left context value into the - # staate and trim out the oldest part to keep the shape consistent. - true_mems, lc_key, lc_val = self.state_update_before( - layer=i, - state=state, - past_length=past_length, - past_left_context=past_left_context, - ) - - output, mems, right_context_blocks, next_key, next_val = layer.forward_jit( - input=output, - lengths=lengths, - mems=true_mems, - right_context_blocks=right_context_blocks, - left_context_key=lc_key, - left_context_val=lc_val, - rpe=rpe, - ) - # mems is used for next layer - mems_list, lc_key_list, lc_val_list, _ = self.state_update_after( - layer=i, - state=state, - mems_list=mems_list, - mems=mems, - next_key=next_key, - next_val=next_val, - lc_key_list=lc_key_list, - lc_val_list=lc_val_list, - ) - i += 1 - - # update state - state = self.state_update_after_loop( - state=state, - mems_list=mems_list, - lc_key_list=lc_key_list, - lc_val_list=lc_val_list, - update_length=1, - ) - - return output, lengths, state - - def quantize_(self, params=None): - if params and "per_channel" in params and params["per_channel"]: - qconfig = per_channel_dynamic_qconfig - else: - qconfig = default_dynamic_qconfig - torch.quantization.quantize_dynamic( - self, {torch.nn.Linear: qconfig}, dtype=torch.qint8, inplace=True - ) - return self - - -# ------------------------------------------------------------------------------ -# Emformer encoder for seq2seq model -# This is a wrapper over the original emformer -# ------------------------------------------------------------------------------ -def emformer_encoder(klass): - class SpeechEncoder(klass): - def __init__(self, args): - super().__init__(args) - stride = SpeechEncoder.conv_layer_stride(args) - trf_left_context = args.segment_left_context // stride - trf_right_context = args.segment_right_context // stride - context_config = [trf_left_context, trf_right_context] - self.transformer_layers = nn.ModuleList( - [ - NoSegAugmentedMemoryTransformerEncoderLayer( - input_dim=args.encoder_embed_dim, - num_heads=args.encoder_attention_heads, - ffn_dim=args.encoder_ffn_embed_dim, - num_layers=args.encoder_layers, - dropout_in_attn=args.dropout, - dropout_on_attn=args.dropout, - dropout_on_fc1=args.dropout, - dropout_on_fc2=args.dropout, - activation_fn=args.activation_fn, - context_config=context_config, - segment_size=args.segment_length, - max_memory_size=args.max_memory_size, - scaled_init=True, # TODO: use constant for now. - tanh_on_mem=args.amtrf_tanh_on_mem, - ) - ] - ) - - def forward(self, src_tokens, src_lengths): - encoder_out = super().forward(src_tokens, src_lengths) - output = encoder_out["encoder_out"][0] - encoder_padding_masks = encoder_out["encoder_padding_mask"][0] - - # This is because that in the original implementation - # the output didn't consider the last segment as right context. - encoder_padding_masks = encoder_padding_masks[:, : output.size(0)] - - return { - "encoder_out": [output], - "encoder_padding_mask": [encoder_padding_masks], - "encoder_embedding": [], - "encoder_states": [], - "src_tokens": [], - "src_lengths": [], - } - - @staticmethod - def conv_layer_stride(args): - # TODO: make it configurable from the args - return 4 - - SpeechEncoder.__name__ = klass.__name__ - return SpeechEncoder diff --git a/spaces/OFA-Sys/OFA-vqa/fairseq/fairseq/optim/adam.py b/spaces/OFA-Sys/OFA-vqa/fairseq/fairseq/optim/adam.py deleted file mode 100644 index d3ae9e64a74774310adcd9968d2eae23368890f9..0000000000000000000000000000000000000000 --- a/spaces/OFA-Sys/OFA-vqa/fairseq/fairseq/optim/adam.py +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -import logging -import math -from collections.abc import Collection -from dataclasses import dataclass, field -from typing import Any, List - -import torch -import torch.distributed as dist -import torch.optim -from fairseq.dataclass import FairseqDataclass -from fairseq.optim import FairseqOptimizer, register_optimizer -from fairseq.optim.fused_adam import get_fused_adam_class -from omegaconf import II, OmegaConf - - -logger = logging.getLogger(__name__) - - -@dataclass -class FairseqAdamConfig(FairseqDataclass): - adam_betas: Any = field( - default=(0.9, 0.999), metadata={"help": "betas for Adam optimizer"} - ) - adam_eps: float = field( - default=1e-8, metadata={"help": "epsilon for Adam optimizer"} - ) - weight_decay: float = field(default=0.0, metadata={"help": "weight decay"}) - use_old_adam: bool = field( - default=False, metadata={"help": "Use fairseq.optim.adam.Adam"} - ) - fp16_adam_stats: bool = field( - default=False, metadata={"help": "use FP16 stats (with automatic scaling)"} - ) - # TODO common vars below in parent - tpu: bool = II("common.tpu") - lr: List[float] = II("optimization.lr") - - -@register_optimizer("adam", dataclass=FairseqAdamConfig) -class FairseqAdam(FairseqOptimizer): - """Adam optimizer for fairseq. - - Important note: this optimizer corresponds to the "AdamW" variant of - Adam in its weight decay behavior. As such, it is most closely - analogous to torch.optim.AdamW from PyTorch. - """ - - def __init__(self, cfg: FairseqAdamConfig, params): - super().__init__(cfg) - fused_adam_cls = get_fused_adam_class() - use_fused_adam = ( - not getattr(cfg, "use_old_adam", False) - and fused_adam_cls is not None - and torch.cuda.is_available() - ) - if getattr(cfg, "tpu", False): - if self.cfg.fp16_adam_stats: - raise NotImplementedError("--fp16-adam-stats is only supported on GPU") - # on TPUs we use the Adam defined here, since it - # automatically casts gradients to FP32 - self._optimizer = Adam(params, **self.optimizer_config) - elif use_fused_adam: - logger.info("using FusedAdam") - self._optimizer = fused_adam_cls( - params, - use_fp16_stats=self.cfg.fp16_adam_stats, - **self.optimizer_config - ) - else: - if self.cfg.fp16_adam_stats: - raise NotImplementedError("--fp16-adam-stats is only supported with FusedAdamV1") - self._optimizer = Adam(params, **self.optimizer_config) - - @property - def optimizer_config(self): - """ - Return a kwarg dictionary that will be used to override optimizer - args stored in checkpoints. This allows us to load a checkpoint and - resume training using a different set of optimizer args, e.g., with a - different learning rate. - """ - return { - "lr": self.cfg.lr[0] - if isinstance(self.cfg.lr, Collection) - else self.cfg.lr, - "betas": eval(self.cfg.adam_betas) - if isinstance(self.cfg.adam_betas, str) - else OmegaConf.to_container(self.cfg.adam_betas), - "eps": self.cfg.adam_eps, - "weight_decay": self.cfg.weight_decay, - } - - def average_params(self): - """Reduce Params is only used during BMUF distributed training.""" - state_dict = self.optimizer.state_dict() - total_gpus = float(dist.get_world_size()) - - for _, value in state_dict["state"].items(): - value["exp_avg"] /= total_gpus - value["exp_avg_sq"] /= total_gpus - dist.all_reduce(value["exp_avg"], op=dist.ReduceOp.SUM) - dist.all_reduce(value["exp_avg_sq"], op=dist.ReduceOp.SUM) - - -class Adam(torch.optim.Optimizer): - r"""Implements Adam algorithm. - - This implementation is modified from torch.optim.Adam based on: - `Fixed Weight Decay Regularization in Adam` - (see https://arxiv.org/abs/1711.05101) - - It has been proposed in `Adam: A Method for Stochastic Optimization`_. - - Args: - params (iterable): iterable of parameters to optimize or dicts defining - parameter groups - lr (float, optional): learning rate (default: 1e-3) - betas (Tuple[float, float], optional): coefficients used for computing - running averages of gradient and its square (default: (0.9, 0.999)) - eps (float, optional): term added to the denominator to improve - numerical stability (default: 1e-8) - weight_decay (float, optional): weight decay (L2 penalty) (default: 0) - amsgrad (boolean, optional): whether to use the AMSGrad variant of this - algorithm from the paper `On the Convergence of Adam and Beyond`_ - - .. _Adam\: A Method for Stochastic Optimization: - https://arxiv.org/abs/1412.6980 - .. _On the Convergence of Adam and Beyond: - https://openreview.net/forum?id=ryQu7f-RZ - """ - - def __init__( - self, - params, - lr=1e-3, - betas=(0.9, 0.999), - eps=1e-8, - weight_decay=0, - amsgrad=False, - ): - defaults = dict( - lr=lr, betas=betas, eps=eps, weight_decay=weight_decay, amsgrad=amsgrad - ) - super(Adam, self).__init__(params, defaults) - - @property - def supports_memory_efficient_fp16(self): - return True - - @property - def supports_flat_params(self): - return True - - def step(self, closure=None): - """Performs a single optimization step. - - Args: - closure (callable, optional): A closure that reevaluates the model - and returns the loss. - """ - loss = None - if closure is not None: - loss = closure() - - for group in self.param_groups: - for p in group["params"]: - if p.grad is None: - continue - grad = p.grad.data - if grad.dtype in {torch.float16, torch.bfloat16}: - grad = grad.float() - if grad.is_sparse: - raise RuntimeError( - "Adam does not support sparse gradients, please consider SparseAdam instead" - ) - amsgrad = group.get("amsgrad", False) - - p_data_fp32 = p.data - if p.data.dtype in {torch.float16, torch.bfloat16}: - p_data_fp32 = p_data_fp32.float() - - state = self.state[p] - - # State initialization - if len(state) == 0: - state["step"] = 0 - # Exponential moving average of gradient values - state["exp_avg"] = torch.zeros_like(p_data_fp32) - # Exponential moving average of squared gradient values - state["exp_avg_sq"] = torch.zeros_like(p_data_fp32) - if amsgrad: - # Maintains max of all exp. moving avg. of sq. grad. values - state["max_exp_avg_sq"] = torch.zeros_like(p_data_fp32) - else: - state["exp_avg"] = state["exp_avg"].to(p_data_fp32) - state["exp_avg_sq"] = state["exp_avg_sq"].to(p_data_fp32) - if amsgrad: - state["max_exp_avg_sq"] = state["max_exp_avg_sq"].to( - p_data_fp32 - ) - - exp_avg, exp_avg_sq = state["exp_avg"], state["exp_avg_sq"] - if amsgrad: - max_exp_avg_sq = state["max_exp_avg_sq"] - beta1, beta2 = group["betas"] - - state["step"] += 1 - - # Decay the first and second moment running average coefficient - exp_avg.mul_(beta1).add_(grad, alpha=1 - beta1) - exp_avg_sq.mul_(beta2).addcmul_(grad, grad, value=1 - beta2) - if amsgrad: - # Maintains the maximum of all 2nd moment running avg. till now - torch.max(max_exp_avg_sq, exp_avg_sq, out=max_exp_avg_sq) - # Use the max. for normalizing running avg. of gradient - denom = max_exp_avg_sq.sqrt().add_(group["eps"]) - else: - denom = exp_avg_sq.sqrt().add_(group["eps"]) - - bias_correction1 = 1 - beta1 ** state["step"] - bias_correction2 = 1 - beta2 ** state["step"] - step_size = group["lr"] * math.sqrt(bias_correction2) / bias_correction1 - - if group["weight_decay"] != 0: - p_data_fp32.add_( - p_data_fp32, alpha=-group["weight_decay"] * group["lr"] - ) - - p_data_fp32.addcdiv_(exp_avg, denom, value=-step_size) - - if p.data.dtype in {torch.float16, torch.bfloat16}: - p.data.copy_(p_data_fp32) - - return loss diff --git a/spaces/OpenGVLab/InternGPT/iGPT/models/grit_src/third_party/CenterNet2/docs/Makefile b/spaces/OpenGVLab/InternGPT/iGPT/models/grit_src/third_party/CenterNet2/docs/Makefile deleted file mode 100644 index 718eddce170fe13b67216baf9d4d25b20e860506..0000000000000000000000000000000000000000 --- a/spaces/OpenGVLab/InternGPT/iGPT/models/grit_src/third_party/CenterNet2/docs/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Minimal makefile for Sphinx documentation -# Copyright (c) Facebook, Inc. and its affiliates. - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/spaces/OpenGVLab/InternGPT/third-party/lama/bin/predict.py b/spaces/OpenGVLab/InternGPT/third-party/lama/bin/predict.py deleted file mode 100644 index 0f704d4043a28b1bc6d80a6862be4830fe4c51ef..0000000000000000000000000000000000000000 --- a/spaces/OpenGVLab/InternGPT/third-party/lama/bin/predict.py +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python3 - -# Example command: -# ./bin/predict.py \ -# model.path= \ -# indir= \ -# outdir= - -import logging -import os -import sys -import traceback - -from saicinpainting.evaluation.utils import move_to_device -from saicinpainting.evaluation.refinement import refine_predict -os.environ['OMP_NUM_THREADS'] = '1' -os.environ['OPENBLAS_NUM_THREADS'] = '1' -os.environ['MKL_NUM_THREADS'] = '1' -os.environ['VECLIB_MAXIMUM_THREADS'] = '1' -os.environ['NUMEXPR_NUM_THREADS'] = '1' - -import cv2 -import hydra -import numpy as np -import torch -import tqdm -import yaml -from omegaconf import OmegaConf -from torch.utils.data._utils.collate import default_collate - -from saicinpainting.training.data.datasets import make_default_val_dataset -from saicinpainting.training.trainers import load_checkpoint -from saicinpainting.utils import register_debug_signal_handlers - -LOGGER = logging.getLogger(__name__) - - -@hydra.main(config_path='../configs/prediction', config_name='default.yaml') -def main(predict_config: OmegaConf): - try: - register_debug_signal_handlers() # kill -10 will result in traceback dumped into log - - device = torch.device(predict_config.device) - - train_config_path = os.path.join(predict_config.model.path, 'config.yaml') - with open(train_config_path, 'r') as f: - train_config = OmegaConf.create(yaml.safe_load(f)) - - train_config.training_model.predict_only = True - train_config.visualizer.kind = 'noop' - - out_ext = predict_config.get('out_ext', '.png') - - checkpoint_path = os.path.join(predict_config.model.path, - 'models', - predict_config.model.checkpoint) - model = load_checkpoint(train_config, checkpoint_path, strict=False, map_location='cpu') - model.freeze() - if not predict_config.get('refine', False): - model.to(device) - - if not predict_config.indir.endswith('/'): - predict_config.indir += '/' - - dataset = make_default_val_dataset(predict_config.indir, **predict_config.dataset) - for img_i in tqdm.trange(len(dataset)): - mask_fname = dataset.mask_filenames[img_i] - cur_out_fname = os.path.join( - predict_config.outdir, - os.path.splitext(mask_fname[len(predict_config.indir):])[0] + out_ext - ) - os.makedirs(os.path.dirname(cur_out_fname), exist_ok=True) - batch = default_collate([dataset[img_i]]) - if predict_config.get('refine', False): - assert 'unpad_to_size' in batch, "Unpadded size is required for the refinement" - # image unpadding is taken care of in the refiner, so that output image - # is same size as the input image - cur_res = refine_predict(batch, model, **predict_config.refiner) - cur_res = cur_res[0].permute(1,2,0).detach().cpu().numpy() - else: - with torch.no_grad(): - batch = move_to_device(batch, device) - batch['mask'] = (batch['mask'] > 0) * 1 - batch = model(batch) - cur_res = batch[predict_config.out_key][0].permute(1, 2, 0).detach().cpu().numpy() - unpad_to_size = batch.get('unpad_to_size', None) - if unpad_to_size is not None: - orig_height, orig_width = unpad_to_size - cur_res = cur_res[:orig_height, :orig_width] - - cur_res = np.clip(cur_res * 255, 0, 255).astype('uint8') - cur_res = cv2.cvtColor(cur_res, cv2.COLOR_RGB2BGR) - cv2.imwrite(cur_out_fname, cur_res) - - except KeyboardInterrupt: - LOGGER.warning('Interrupted by user') - except Exception as ex: - LOGGER.critical(f'Prediction failed due to {ex}:\n{traceback.format_exc()}') - sys.exit(1) - - -if __name__ == '__main__': - main() \ No newline at end of file diff --git a/spaces/OpenGVLab/InternGPT/third-party/lama/bin/split_tar.py b/spaces/OpenGVLab/InternGPT/third-party/lama/bin/split_tar.py deleted file mode 100644 index ac1692addbb4191200c8c871fe356bb80d534c44..0000000000000000000000000000000000000000 --- a/spaces/OpenGVLab/InternGPT/third-party/lama/bin/split_tar.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python3 - - -import tqdm -import webdataset as wds - - -def main(args): - input_dataset = wds.Dataset(args.infile) - output_dataset = wds.ShardWriter(args.outpattern) - for rec in tqdm.tqdm(input_dataset): - output_dataset.write(rec) - - -if __name__ == '__main__': - import argparse - - aparser = argparse.ArgumentParser() - aparser.add_argument('infile', type=str) - aparser.add_argument('outpattern', type=str) - - main(aparser.parse_args()) diff --git a/spaces/OpenGVLab/InternGPT/third-party/lama/saicinpainting/training/losses/adversarial.py b/spaces/OpenGVLab/InternGPT/third-party/lama/saicinpainting/training/losses/adversarial.py deleted file mode 100644 index d6db2967ce5074d94ed3b4c51fc743ff2f7831b1..0000000000000000000000000000000000000000 --- a/spaces/OpenGVLab/InternGPT/third-party/lama/saicinpainting/training/losses/adversarial.py +++ /dev/null @@ -1,177 +0,0 @@ -from typing import Tuple, Dict, Optional - -import torch -import torch.nn as nn -import torch.nn.functional as F - - -class BaseAdversarialLoss: - def pre_generator_step(self, real_batch: torch.Tensor, fake_batch: torch.Tensor, - generator: nn.Module, discriminator: nn.Module): - """ - Prepare for generator step - :param real_batch: Tensor, a batch of real samples - :param fake_batch: Tensor, a batch of samples produced by generator - :param generator: - :param discriminator: - :return: None - """ - - def pre_discriminator_step(self, real_batch: torch.Tensor, fake_batch: torch.Tensor, - generator: nn.Module, discriminator: nn.Module): - """ - Prepare for discriminator step - :param real_batch: Tensor, a batch of real samples - :param fake_batch: Tensor, a batch of samples produced by generator - :param generator: - :param discriminator: - :return: None - """ - - def generator_loss(self, real_batch: torch.Tensor, fake_batch: torch.Tensor, - discr_real_pred: torch.Tensor, discr_fake_pred: torch.Tensor, - mask: Optional[torch.Tensor] = None) \ - -> Tuple[torch.Tensor, Dict[str, torch.Tensor]]: - """ - Calculate generator loss - :param real_batch: Tensor, a batch of real samples - :param fake_batch: Tensor, a batch of samples produced by generator - :param discr_real_pred: Tensor, discriminator output for real_batch - :param discr_fake_pred: Tensor, discriminator output for fake_batch - :param mask: Tensor, actual mask, which was at input of generator when making fake_batch - :return: total generator loss along with some values that might be interesting to log - """ - raise NotImplemented() - - def discriminator_loss(self, real_batch: torch.Tensor, fake_batch: torch.Tensor, - discr_real_pred: torch.Tensor, discr_fake_pred: torch.Tensor, - mask: Optional[torch.Tensor] = None) \ - -> Tuple[torch.Tensor, Dict[str, torch.Tensor]]: - """ - Calculate discriminator loss and call .backward() on it - :param real_batch: Tensor, a batch of real samples - :param fake_batch: Tensor, a batch of samples produced by generator - :param discr_real_pred: Tensor, discriminator output for real_batch - :param discr_fake_pred: Tensor, discriminator output for fake_batch - :param mask: Tensor, actual mask, which was at input of generator when making fake_batch - :return: total discriminator loss along with some values that might be interesting to log - """ - raise NotImplemented() - - def interpolate_mask(self, mask, shape): - assert mask is not None - assert self.allow_scale_mask or shape == mask.shape[-2:] - if shape != mask.shape[-2:] and self.allow_scale_mask: - if self.mask_scale_mode == 'maxpool': - mask = F.adaptive_max_pool2d(mask, shape) - else: - mask = F.interpolate(mask, size=shape, mode=self.mask_scale_mode) - return mask - -def make_r1_gp(discr_real_pred, real_batch): - if torch.is_grad_enabled(): - grad_real = torch.autograd.grad(outputs=discr_real_pred.sum(), inputs=real_batch, create_graph=True)[0] - grad_penalty = (grad_real.view(grad_real.shape[0], -1).norm(2, dim=1) ** 2).mean() - else: - grad_penalty = 0 - real_batch.requires_grad = False - - return grad_penalty - -class NonSaturatingWithR1(BaseAdversarialLoss): - def __init__(self, gp_coef=5, weight=1, mask_as_fake_target=False, allow_scale_mask=False, - mask_scale_mode='nearest', extra_mask_weight_for_gen=0, - use_unmasked_for_gen=True, use_unmasked_for_discr=True): - self.gp_coef = gp_coef - self.weight = weight - # use for discr => use for gen; - # otherwise we teach only the discr to pay attention to very small difference - assert use_unmasked_for_gen or (not use_unmasked_for_discr) - # mask as target => use unmasked for discr: - # if we don't care about unmasked regions at all - # then it doesn't matter if the value of mask_as_fake_target is true or false - assert use_unmasked_for_discr or (not mask_as_fake_target) - self.use_unmasked_for_gen = use_unmasked_for_gen - self.use_unmasked_for_discr = use_unmasked_for_discr - self.mask_as_fake_target = mask_as_fake_target - self.allow_scale_mask = allow_scale_mask - self.mask_scale_mode = mask_scale_mode - self.extra_mask_weight_for_gen = extra_mask_weight_for_gen - - def generator_loss(self, real_batch: torch.Tensor, fake_batch: torch.Tensor, - discr_real_pred: torch.Tensor, discr_fake_pred: torch.Tensor, - mask=None) \ - -> Tuple[torch.Tensor, Dict[str, torch.Tensor]]: - fake_loss = F.softplus(-discr_fake_pred) - if (self.mask_as_fake_target and self.extra_mask_weight_for_gen > 0) or \ - not self.use_unmasked_for_gen: # == if masked region should be treated differently - mask = self.interpolate_mask(mask, discr_fake_pred.shape[-2:]) - if not self.use_unmasked_for_gen: - fake_loss = fake_loss * mask - else: - pixel_weights = 1 + mask * self.extra_mask_weight_for_gen - fake_loss = fake_loss * pixel_weights - - return fake_loss.mean() * self.weight, dict() - - def pre_discriminator_step(self, real_batch: torch.Tensor, fake_batch: torch.Tensor, - generator: nn.Module, discriminator: nn.Module): - real_batch.requires_grad = True - - def discriminator_loss(self, real_batch: torch.Tensor, fake_batch: torch.Tensor, - discr_real_pred: torch.Tensor, discr_fake_pred: torch.Tensor, - mask=None) \ - -> Tuple[torch.Tensor, Dict[str, torch.Tensor]]: - - real_loss = F.softplus(-discr_real_pred) - grad_penalty = make_r1_gp(discr_real_pred, real_batch) * self.gp_coef - fake_loss = F.softplus(discr_fake_pred) - - if not self.use_unmasked_for_discr or self.mask_as_fake_target: - # == if masked region should be treated differently - mask = self.interpolate_mask(mask, discr_fake_pred.shape[-2:]) - # use_unmasked_for_discr=False only makes sense for fakes; - # for reals there is no difference beetween two regions - fake_loss = fake_loss * mask - if self.mask_as_fake_target: - fake_loss = fake_loss + (1 - mask) * F.softplus(-discr_fake_pred) - - sum_discr_loss = real_loss + grad_penalty + fake_loss - metrics = dict(discr_real_out=discr_real_pred.mean(), - discr_fake_out=discr_fake_pred.mean(), - discr_real_gp=grad_penalty) - return sum_discr_loss.mean(), metrics - -class BCELoss(BaseAdversarialLoss): - def __init__(self, weight): - self.weight = weight - self.bce_loss = nn.BCEWithLogitsLoss() - - def generator_loss(self, discr_fake_pred: torch.Tensor) -> Tuple[torch.Tensor, Dict[str, torch.Tensor]]: - real_mask_gt = torch.zeros(discr_fake_pred.shape).to(discr_fake_pred.device) - fake_loss = self.bce_loss(discr_fake_pred, real_mask_gt) * self.weight - return fake_loss, dict() - - def pre_discriminator_step(self, real_batch: torch.Tensor, fake_batch: torch.Tensor, - generator: nn.Module, discriminator: nn.Module): - real_batch.requires_grad = True - - def discriminator_loss(self, - mask: torch.Tensor, - discr_real_pred: torch.Tensor, - discr_fake_pred: torch.Tensor) -> Tuple[torch.Tensor, Dict[str, torch.Tensor]]: - - real_mask_gt = torch.zeros(discr_real_pred.shape).to(discr_real_pred.device) - sum_discr_loss = (self.bce_loss(discr_real_pred, real_mask_gt) + self.bce_loss(discr_fake_pred, mask)) / 2 - metrics = dict(discr_real_out=discr_real_pred.mean(), - discr_fake_out=discr_fake_pred.mean(), - discr_real_gp=0) - return sum_discr_loss, metrics - - -def make_discrim_loss(kind, **kwargs): - if kind == 'r1': - return NonSaturatingWithR1(**kwargs) - elif kind == 'bce': - return BCELoss(**kwargs) - raise ValueError(f'Unknown adversarial loss kind {kind}') diff --git a/spaces/OpenGVLab/InternGPT/third-party/lama/saicinpainting/training/losses/perceptual.py b/spaces/OpenGVLab/InternGPT/third-party/lama/saicinpainting/training/losses/perceptual.py deleted file mode 100644 index 8c055c2b327ce7943682af5c5f9394b9fcbec506..0000000000000000000000000000000000000000 --- a/spaces/OpenGVLab/InternGPT/third-party/lama/saicinpainting/training/losses/perceptual.py +++ /dev/null @@ -1,113 +0,0 @@ -import torch -import torch.nn as nn -import torch.nn.functional as F -import torchvision - -from models.ade20k import ModelBuilder -from saicinpainting.utils import check_and_warn_input_range - - -IMAGENET_MEAN = torch.FloatTensor([0.485, 0.456, 0.406])[None, :, None, None] -IMAGENET_STD = torch.FloatTensor([0.229, 0.224, 0.225])[None, :, None, None] - - -class PerceptualLoss(nn.Module): - def __init__(self, normalize_inputs=True): - super(PerceptualLoss, self).__init__() - - self.normalize_inputs = normalize_inputs - self.mean_ = IMAGENET_MEAN - self.std_ = IMAGENET_STD - - vgg = torchvision.models.vgg19(pretrained=True).features - vgg_avg_pooling = [] - - for weights in vgg.parameters(): - weights.requires_grad = False - - for module in vgg.modules(): - if module.__class__.__name__ == 'Sequential': - continue - elif module.__class__.__name__ == 'MaxPool2d': - vgg_avg_pooling.append(nn.AvgPool2d(kernel_size=2, stride=2, padding=0)) - else: - vgg_avg_pooling.append(module) - - self.vgg = nn.Sequential(*vgg_avg_pooling) - - def do_normalize_inputs(self, x): - return (x - self.mean_.to(x.device)) / self.std_.to(x.device) - - def partial_losses(self, input, target, mask=None): - check_and_warn_input_range(target, 0, 1, 'PerceptualLoss target in partial_losses') - - # we expect input and target to be in [0, 1] range - losses = [] - - if self.normalize_inputs: - features_input = self.do_normalize_inputs(input) - features_target = self.do_normalize_inputs(target) - else: - features_input = input - features_target = target - - for layer in self.vgg[:30]: - - features_input = layer(features_input) - features_target = layer(features_target) - - if layer.__class__.__name__ == 'ReLU': - loss = F.mse_loss(features_input, features_target, reduction='none') - - if mask is not None: - cur_mask = F.interpolate(mask, size=features_input.shape[-2:], - mode='bilinear', align_corners=False) - loss = loss * (1 - cur_mask) - - loss = loss.mean(dim=tuple(range(1, len(loss.shape)))) - losses.append(loss) - - return losses - - def forward(self, input, target, mask=None): - losses = self.partial_losses(input, target, mask=mask) - return torch.stack(losses).sum(dim=0) - - def get_global_features(self, input): - check_and_warn_input_range(input, 0, 1, 'PerceptualLoss input in get_global_features') - - if self.normalize_inputs: - features_input = self.do_normalize_inputs(input) - else: - features_input = input - - features_input = self.vgg(features_input) - return features_input - - -class ResNetPL(nn.Module): - def __init__(self, weight=1, - weights_path=None, arch_encoder='resnet50dilated', segmentation=True): - super().__init__() - self.impl = ModelBuilder.get_encoder(weights_path=weights_path, - arch_encoder=arch_encoder, - arch_decoder='ppm_deepsup', - fc_dim=2048, - segmentation=segmentation) - self.impl.eval() - for w in self.impl.parameters(): - w.requires_grad_(False) - - self.weight = weight - - def forward(self, pred, target): - pred = (pred - IMAGENET_MEAN.to(pred)) / IMAGENET_STD.to(pred) - target = (target - IMAGENET_MEAN.to(target)) / IMAGENET_STD.to(target) - - pred_feats = self.impl(pred, return_feature_maps=True) - target_feats = self.impl(target, return_feature_maps=True) - - result = torch.stack([F.mse_loss(cur_pred, cur_target) - for cur_pred, cur_target - in zip(pred_feats, target_feats)]).sum() * self.weight - return result diff --git a/spaces/OpenMotionLab/MotionGPT/mGPT/data/transforms/joints2rots/config.py b/spaces/OpenMotionLab/MotionGPT/mGPT/data/transforms/joints2rots/config.py deleted file mode 100644 index 9014befa889a0c132a05df36d6aa5a6cad4d9e08..0000000000000000000000000000000000000000 --- a/spaces/OpenMotionLab/MotionGPT/mGPT/data/transforms/joints2rots/config.py +++ /dev/null @@ -1,119 +0,0 @@ -import numpy as np -from mGPT.utils.joints import mmm_joints, smplh2mmm_indexes - -# Map joints Name to SMPL joints idx -JOINT_MAP = { - 'MidHip': 0, - 'LHip': 1, - 'LKnee': 4, - 'LAnkle': 7, - 'LFoot': 10, - 'RHip': 2, - 'RKnee': 5, - 'RAnkle': 8, - 'RFoot': 11, - 'LShoulder': 16, - 'LElbow': 18, - 'LWrist': 20, - 'LHand': 22, - 'RShoulder': 17, - 'RElbow': 19, - 'RWrist': 21, - 'RHand': 23, - 'spine1': 3, - 'spine2': 6, - 'spine3': 9, - 'Neck': 12, - 'Head': 15, - 'LCollar': 13, - 'Rcollar': 14, - 'Nose': 24, - 'REye': 26, - 'LEye': 26, - 'REar': 27, - 'LEar': 28, - 'LHeel': 31, - 'RHeel': 34, - 'OP RShoulder': 17, - 'OP LShoulder': 16, - 'OP RHip': 2, - 'OP LHip': 1, - 'OP Neck': 12, -} - -mmm2smpl_correspondence = { - "root": "MidHip", - "BP": "spine1", - "BT": "spine3", - "BLN": "Neck", - "BUN": "Head", - "LS": "LShoulder", - "LE": "LElbow", - "LW": "LWrist", - "RS": "RShoulder", - "RE": "RElbow", - "RW": "RWrist", - "LH": "LHip", - "LK": "LKnee", - "LA": "LAnkle", - "LMrot": "LHeel", - "LF": "LFoot", - "RH": "RHip", - "RK": "RKnee", - "RA": "RAnkle", - "RMrot": "RHeel", - "RF": "RFoot" -} - -full_smpl_idx = range(24) -key_smpl_idx = [0, 1, 4, 7, 2, 5, 8, 17, 19, 21, 16, 18, 20] - -AMASS_JOINT_MAP = { - 'MidHip': 0, - 'LHip': 1, - 'LKnee': 4, - 'LAnkle': 7, - 'LFoot': 10, - 'RHip': 2, - 'RKnee': 5, - 'RAnkle': 8, - 'RFoot': 11, - 'LShoulder': 16, - 'LElbow': 18, - 'LWrist': 20, - 'RShoulder': 17, - 'RElbow': 19, - 'RWrist': 21, - 'spine1': 3, - 'spine2': 6, - 'spine3': 9, - 'Neck': 12, - 'Head': 15, - 'LCollar': 13, - 'Rcollar': 14, -} -amass_idx = range(22) -amass_smpl_idx = range(22) - -# cal mmm in smpl index -smpl2mmm_correspondence = { - val: key - for key, val in mmm2smpl_correspondence.items() -} -smpl2mmm_indexes = [JOINT_MAP[mmm2smpl_correspondence[x]] for x in mmm_joints] - -# cal mmm joints map -MMM_JOINT_MAP = { - val: JOINT_MAP[val] - for key, val in mmm2smpl_correspondence.items() -} - -# mmm_idx = range(21) -# mmm_smpl_dix = smpl2mmm_indexes -# mmm_smpl_dix = smplh2mmm_indexes -# todo - configable -SMPL_MODEL_DIR = "/apdcephfs/share_1227775/shingxchen/AIMotion/TMOSTData/deps/smpl_models/" -GMM_MODEL_DIR = "/apdcephfs/share_1227775/shingxchen/AIMotion/TMOSTData/deps/smpl_models/" -SMPL_MEAN_FILE = "/apdcephfs/share_1227775/shingxchen/AIMotion/TMOSTData/deps/smpl_models/neutral_smpl_mean_params.h5" -# for collsion -Part_Seg_DIR = "/apdcephfs/share_1227775/shingxchen/AIMotion/TMOSTData/deps/smpl_models/smplx_parts_segm.pkl" diff --git a/spaces/OpenShape/openshape-demo/README.md b/spaces/OpenShape/openshape-demo/README.md deleted file mode 100644 index cfd1614cdbe9be82f33367c50a8a09b52b9695af..0000000000000000000000000000000000000000 --- a/spaces/OpenShape/openshape-demo/README.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -title: OpenShape Demo -emoji: 🌖 -colorFrom: red -colorTo: purple -sdk: streamlit -sdk_version: 1.19.0 -app_file: app.py -pinned: false -license: mit ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference - -Demo of Paper [OpenShape: Scaling Up 3D Shape Representation Towards Open-World Understanding](https://arxiv.org/abs/2305.10764) - -[Paper page on HF](https://huggingface.co/papers/2305.10764) \ No newline at end of file diff --git a/spaces/PAIR/Text2Video-Zero/annotator/uniformer/mmcv/runner/hooks/sampler_seed.py b/spaces/PAIR/Text2Video-Zero/annotator/uniformer/mmcv/runner/hooks/sampler_seed.py deleted file mode 100644 index ee0dc6bdd8df5775857028aaed5444c0f59caf80..0000000000000000000000000000000000000000 --- a/spaces/PAIR/Text2Video-Zero/annotator/uniformer/mmcv/runner/hooks/sampler_seed.py +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (c) OpenMMLab. All rights reserved. -from .hook import HOOKS, Hook - - -@HOOKS.register_module() -class DistSamplerSeedHook(Hook): - """Data-loading sampler for distributed training. - - When distributed training, it is only useful in conjunction with - :obj:`EpochBasedRunner`, while :obj:`IterBasedRunner` achieves the same - purpose with :obj:`IterLoader`. - """ - - def before_epoch(self, runner): - if hasattr(runner.data_loader.sampler, 'set_epoch'): - # in case the data loader uses `SequentialSampler` in Pytorch - runner.data_loader.sampler.set_epoch(runner.epoch) - elif hasattr(runner.data_loader.batch_sampler.sampler, 'set_epoch'): - # batch sampler in pytorch warps the sampler as its attributes. - runner.data_loader.batch_sampler.sampler.set_epoch(runner.epoch) diff --git a/spaces/PROJECTAIGPT/AIAvatarSPEECH/README.md b/spaces/PROJECTAIGPT/AIAvatarSPEECH/README.md deleted file mode 100644 index 6a60f7408a2c8844161961923bbc7564c061660d..0000000000000000000000000000000000000000 --- a/spaces/PROJECTAIGPT/AIAvatarSPEECH/README.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: AIAvatarSPEECH -emoji: 🏢 -colorFrom: indigo -colorTo: yellow -sdk: gradio -sdk_version: 3.39.0 -app_file: app.py -pinned: false ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Pattr/DrumClassification/lilypond-2.24.2/lib/guile/2.2/ccache/rnrs/arithmetic/flonums.go b/spaces/Pattr/DrumClassification/lilypond-2.24.2/lib/guile/2.2/ccache/rnrs/arithmetic/flonums.go deleted file mode 100644 index b0d12746c49bfc960fb1e712f88b138f6aa0adf5..0000000000000000000000000000000000000000 Binary files a/spaces/Pattr/DrumClassification/lilypond-2.24.2/lib/guile/2.2/ccache/rnrs/arithmetic/flonums.go and /dev/null differ diff --git a/spaces/PeepDaSlan9/De-limiter/models/base_models.py b/spaces/PeepDaSlan9/De-limiter/models/base_models.py deleted file mode 100644 index 64b543b49a92e05a4b36177e00e9103fd082d579..0000000000000000000000000000000000000000 --- a/spaces/PeepDaSlan9/De-limiter/models/base_models.py +++ /dev/null @@ -1,239 +0,0 @@ -import torch -import torch.nn as nn -from asteroid.models.base_models import ( - BaseEncoderMaskerDecoder, - _unsqueeze_to_3d, - _shape_reconstructed, -) -from asteroid.utils.torch_utils import pad_x_to_y, jitable_shape -from einops import rearrange - - -class BaseEncoderMaskerDecoderWithConfigs(BaseEncoderMaskerDecoder): - def __init__(self, encoder, masker, decoder, encoder_activation=None, **kwargs): - super().__init__(encoder, masker, decoder, encoder_activation) - self.use_encoder = kwargs.get("use_encoder", True) - self.apply_mask = kwargs.get("apply_mask", True) - self.use_decoder = kwargs.get("use_decoder", True) - - def forward(self, wav): - """ - Enc/Mask/Dec model forward with some additional options. - Some of the models we use, like TFC-TDF-UNet, have no masker. - In UMX or X-UMX, they already use masking in their model implementation. - Since we do not want to manipulate the model codes, we use this wrapper. - - Args: - wav (torch.Tensor): waveform tensor. 1D, 2D or 3D tensor, time last. - - Returns: - torch.Tensor, of shape (batch, n_src, time) or (n_src, time). - """ - # Remember shape to shape reconstruction, cast to Tensor for torchscript - shape = jitable_shape(wav) - # Reshape to (batch, n_mix, time) - wav = _unsqueeze_to_3d(wav) - - # Real forward - if self.use_encoder: - tf_rep = self.forward_encoder(wav) - else: - tf_rep = wav - - est_masks = self.forward_masker(tf_rep) - - if self.apply_mask: - masked_tf_rep = self.apply_masks(tf_rep, est_masks) - else: # model already used masking - masked_tf_rep = est_masks - - if self.use_decoder: - decoded = self.forward_decoder(masked_tf_rep) - reconstructed = pad_x_to_y(decoded, wav) - - return masked_tf_rep, _shape_reconstructed(reconstructed, shape) - - else: # In UMX or X-UMX, decoder is not used - decoded = masked_tf_rep - - return decoded - - -class BaseEncoderMaskerDecoder_mixture_consistency(BaseEncoderMaskerDecoder): - def __init__(self, encoder, masker, decoder, encoder_activation=None): - super().__init__(encoder, masker, decoder, encoder_activation) - - def forward(self, wav): - """Enc/Mask/Dec model forward with mixture consistent output - - References: - [1] : Wisdom, Scott, et al. "Differentiable consistency constraints for improved deep speech enhancement." ICASSP 2019. - [2] : Wisdom, Scott, et al. "Unsupervised sound separation using mixture invariant training." NeurIPS 2020. - - Args: - wav (torch.Tensor): waveform tensor. 1D, 2D or 3D tensor, time last. - - Returns: - torch.Tensor, of shape (batch, n_src, time) or (n_src, time). - """ - # Remember shape to shape reconstruction, cast to Tensor for torchscript - shape = jitable_shape(wav) - # Reshape to (batch, n_mix, time) - wav = _unsqueeze_to_3d(wav) - - # Real forward - tf_rep = self.forward_encoder(wav) - est_masks = self.forward_masker(tf_rep) - masked_tf_rep = self.apply_masks(tf_rep, est_masks) - decoded = self.forward_decoder(masked_tf_rep) - - reconstructed = _shape_reconstructed(pad_x_to_y(decoded, wav), shape) - - reconstructed = reconstructed + 1 / reconstructed.shape[1] * ( - wav - reconstructed.sum(dim=1, keepdim=True) - ) - - return reconstructed - - -class BaseEncoderMaskerDecoderWithConfigsMaskOnOutput(BaseEncoderMaskerDecoder): - def __init__(self, encoder, masker, decoder, encoder_activation=None, **kwargs): - super().__init__(encoder, masker, decoder, encoder_activation) - self.use_encoder = kwargs.get("use_encoder", True) - self.apply_mask = kwargs.get("apply_mask", True) - self.use_decoder = kwargs.get("use_decoder", True) - self.nb_channels = kwargs.get("nb_channels", 2) - self.decoder_activation = kwargs.get("decoder_activation", "sigmoid") - if self.decoder_activation == "sigmoid": - self.act_after_dec = nn.Sigmoid() - elif self.decoder_activation == "relu": - self.act_after_dec = nn.ReLU() - elif self.decoder_activation == "relu6": - self.act_after_dec = nn.ReLU6() - elif self.decoder_activation == "tanh": - self.act_after_dec = nn.Tanh() - elif self.decoder_activation == "none": - self.act_after_dec = nn.Identity() - else: - self.act_after_dec = nn.Sigmoid() - - def forward(self, wav): - """ - For the De-limit task, we will apply the mask on the output of the decoder. - We want decoder to learn the sample-wise ratio of the sources. - - Args: - wav (torch.Tensor): waveform tensor. 1D, 2D or 3D tensor, time last. - - Returns: - torch.Tensor, of shape (batch, n_src, time) or (n_src, time). - """ - # Remember shape to shape reconstruction, cast to Tensor for torchscript - shape = jitable_shape(wav) - # Reshape to (batch, n_mix, time) - wav = _unsqueeze_to_3d(wav) # (batch, n_channels, time) - - # Real forward - if self.use_encoder: - tf_rep = self.forward_encoder(wav) # (batch, n_channels, freq, time) - else: - tf_rep = wav - - if self.nb_channels == 2: - tf_rep = rearrange( - tf_rep, "b c f t -> b (c f) t" - ) # c == 2 when stereo input. - est_masks = self.forward_masker(tf_rep) # (batch, 1, freq, time) - - # we are going to apply the mask on the output of the decoder - if self.use_decoder: - if self.nb_channels == 2: - est_masks = rearrange(est_masks, "b 1 f t -> b f t") - est_masks_decoded = self.forward_decoder(est_masks) - est_masks_decoded = pad_x_to_y(est_masks_decoded, wav) # (batch, 1, time) - est_masks_decoded = self.act_after_dec( - est_masks_decoded - ) # (batch, 1, time) - decoded = wav * est_masks_decoded # (batch, n_channels, time) - - return ( - est_masks_decoded, - decoded, - ) - - else: - decoded = est_masks - - return (decoded,) - - -class BaseEncoderMaskerDecoderWithConfigsMultiChannelAsteroid(BaseEncoderMaskerDecoder): - def __init__(self, encoder, masker, decoder, encoder_activation=None, **kwargs): - super().__init__(encoder, masker, decoder, encoder_activation) - self.use_encoder = kwargs.get("use_encoder", True) - self.apply_mask = kwargs.get("apply_mask", True) - self.use_decoder = kwargs.get("use_decoder", True) - self.nb_channels = kwargs.get("nb_channels", 2) - self.decoder_activation = kwargs.get("decoder_activation", "none") - if self.decoder_activation == "sigmoid": - self.act_after_dec = nn.Sigmoid() - elif self.decoder_activation == "relu": - self.act_after_dec = nn.ReLU() - elif self.decoder_activation == "relu6": - self.act_after_dec = nn.ReLU6() - elif self.decoder_activation == "tanh": - self.act_after_dec = nn.Tanh() - elif self.decoder_activation == "none": - self.act_after_dec = nn.Identity() - else: - self.act_after_dec = nn.Sigmoid() - - def forward(self, wav): - """ - Enc/Mask/Dec model forward with some additional options. - For MultiChannel usage of asteroid-based models. (e.g. ConvTasNet) - - - Args: - wav (torch.Tensor): waveform tensor. 1D, 2D or 3D tensor, time last. - - Returns: - torch.Tensor, of shape (batch, n_src, time) or (n_src, time). - """ - # Remember shape to shape reconstruction, cast to Tensor for torchscript - shape = jitable_shape(wav) - # Reshape to (batch, n_mix, time) - wav = _unsqueeze_to_3d(wav) - - # Real forward - if self.use_encoder: - tf_rep = self.forward_encoder(wav) - else: - tf_rep = wav - - if self.nb_channels == 2: - tf_rep = rearrange( - tf_rep, "b c f t -> b (c f) t" - ) # c == 2 when stereo input. - est_masks = self.forward_masker(tf_rep) - - if self.nb_channels == 2: - tf_rep = rearrange(tf_rep, "b (c f) t -> b c f t", c=self.nb_channels) - - if self.apply_mask: - # Since original asteroid implementation of masking includes unnecessary unsqueeze operation, we will do it manually. - masked_tf_rep = est_masks * tf_rep - else: - masked_tf_rep = est_masks - - if self.use_decoder: - decoded = self.forward_decoder(masked_tf_rep) - reconstructed = pad_x_to_y(decoded, wav) - reconstructed = self.act_after_dec(reconstructed) - - return masked_tf_rep, _shape_reconstructed(reconstructed, shape) - - else: - decoded = masked_tf_rep - - return decoded diff --git a/spaces/Pengyey/bingo-chuchu/src/components/tailwind-indicator.tsx b/spaces/Pengyey/bingo-chuchu/src/components/tailwind-indicator.tsx deleted file mode 100644 index f2a1291213dd67055fcebe67fab574c8441338df..0000000000000000000000000000000000000000 --- a/spaces/Pengyey/bingo-chuchu/src/components/tailwind-indicator.tsx +++ /dev/null @@ -1,14 +0,0 @@ -export function TailwindIndicator() { - if (process.env.NODE_ENV === 'production') return null - - return ( -
    -
    xs
    -
    sm
    -
    md
    -
    lg
    -
    xl
    -
    2xl
    -
    - ) -} diff --git a/spaces/Pinwheel/GLIP-BLIP-Object-Detection-VQA/maskrcnn_benchmark/layers/sigmoid_focal_loss.py b/spaces/Pinwheel/GLIP-BLIP-Object-Detection-VQA/maskrcnn_benchmark/layers/sigmoid_focal_loss.py deleted file mode 100644 index 6492bac67db0a13d516733969ce2bf03189e73b7..0000000000000000000000000000000000000000 --- a/spaces/Pinwheel/GLIP-BLIP-Object-Detection-VQA/maskrcnn_benchmark/layers/sigmoid_focal_loss.py +++ /dev/null @@ -1,197 +0,0 @@ -import torch -from torch import nn -import torch.nn.functional as F -from torch.autograd import Function -from torch.autograd.function import once_differentiable - -from maskrcnn_benchmark import _C - - -# TODO: Use JIT to replace CUDA implementation in the future. -class _SigmoidFocalLoss(Function): - @staticmethod - def forward(ctx, logits, targets, gamma, alpha): - ctx.save_for_backward(logits, targets) - num_classes = logits.shape[1] - ctx.num_classes = num_classes - ctx.gamma = gamma - ctx.alpha = alpha - - losses = _C.sigmoid_focalloss_forward( - logits, targets, num_classes, gamma, alpha - ) - return losses - - @staticmethod - @once_differentiable - def backward(ctx, d_loss): - logits, targets = ctx.saved_tensors - num_classes = ctx.num_classes - gamma = ctx.gamma - alpha = ctx.alpha - d_loss = d_loss.contiguous() - d_logits = _C.sigmoid_focalloss_backward( - logits, targets, d_loss, num_classes, gamma, alpha - ) - return d_logits, None, None, None, None - - -sigmoid_focal_loss_cuda = _SigmoidFocalLoss.apply - - -def sigmoid_focal_loss_cpu(logits, targets, gamma, alpha): - num_classes = logits.shape[1] - dtype = targets.dtype - device = targets.device - class_range = torch.arange(1, num_classes + 1, dtype=dtype, device=device).unsqueeze(0) - - t = targets.unsqueeze(1) - p = torch.sigmoid(logits) - term1 = (1 - p) ** gamma * torch.log(p) - term2 = p ** gamma * torch.log(1 - p) - return -(t == class_range).float() * term1 * alpha - ((t != class_range) * (t >= 0)).float() * term2 * (1 - alpha) - - -class SigmoidFocalLoss(nn.Module): - def __init__(self, gamma, alpha): - super(SigmoidFocalLoss, self).__init__() - self.gamma = gamma - self.alpha = alpha - - def forward(self, logits, targets): - if logits.is_cuda: - loss_func = sigmoid_focal_loss_cuda - else: - loss_func = sigmoid_focal_loss_cpu - - loss = loss_func(logits, targets, self.gamma, self.alpha) - return loss.sum() - - def __repr__(self): - tmpstr = self.__class__.__name__ + "(" - tmpstr += "gamma=" + str(self.gamma) - tmpstr += ", alpha=" + str(self.alpha) - tmpstr += ")" - return tmpstr - - -def token_sigmoid_softmax_focal_loss(pred_logits, targets, alpha, gamma, text_mask=None): - # Another modification is that because we use the cross entropy version, there is no frequent or not frequent class. - # So we temporarily retired the design of alpha. - - assert (targets.dim() == 3) - assert (pred_logits.dim() == 3) # batch x from x to - - # reprocess target to become probability map ready for softmax - targets = targets.float() - target_num = targets.sum(-1) + 1e-8 # numerical stability - targets = targets / target_num.unsqueeze(-1) # T(x) - - if text_mask is not None: - # reserve the last token for non object - assert (text_mask.dim() == 2) - text_mask[:, -1] = 1 - text_mask = (text_mask > 0).unsqueeze(1).repeat(1, pred_logits.size(1), 1) # copy along the image channel - pred_logits = pred_logits.masked_fill(~text_mask, -1000000) # softmax - - out_prob = pred_logits.softmax(-1) - - filled_targets = targets.clone() - filled_targets[filled_targets == 0] = 1.0 - - weight = torch.clamp(targets - out_prob, min=0.001) / filled_targets - weight = torch.pow(weight, gamma) # weight = torch.pow(torch.clamp(target - out_prob, min=0.01), gamma) - - loss_ce = - targets * weight * pred_logits.log_softmax( - -1) # only those positives with positive target_sim will have losses. - return loss_ce - - -def token_sigmoid_binary_focal_loss_v2(pred_logits, targets, alpha, gamma, text_mask=None): - assert (targets.dim() == 3) - assert (pred_logits.dim() == 3) # batch x from x to - - if text_mask is not None: - assert (text_mask.dim() == 2) - - # We convert everything into binary - out_prob = pred_logits.sigmoid() - out_prob_neg_pos = torch.stack([1 - out_prob, out_prob], dim=-1) + 1e-8 # batch x boxes x 256 x 2 - weight = torch.pow(-out_prob_neg_pos + 1.0, gamma) - - focal_zero = - weight[:, :, :, 0] * torch.log(out_prob_neg_pos[:, :, :, 0]) * ( - 1 - alpha) # negative class - focal_one = - weight[:, :, :, 1] * torch.log(out_prob_neg_pos[:, :, :, 1]) * alpha # positive class - focal = torch.stack([focal_zero, focal_one], dim=-1) - loss_ce = torch.gather(focal, index=targets.long().unsqueeze(-1), dim=-1) - return loss_ce - - -def token_sigmoid_binary_focal_loss(pred_logits, targets, alpha, gamma, text_mask=None): - # binary version of focal loss - # copied from https://github.com/facebookresearch/fvcore/blob/master/fvcore/nn/focal_loss.py - """ - Loss used in RetinaNet for dense detection: https://arxiv.org/abs/1708.02002. - Args: - inputs: A float tensor of arbitrary shape. - The predictions for each example. - targets: A float tensor with the same shape as inputs. Stores the binary - classification label for each element in inputs - (0 for the negative class and 1 for the positive class). - alpha: (optional) Weighting factor in range (0,1) to balance - positive vs negative examples. Default = -1 (no weighting). - gamma: Exponent of the modulating factor (1 - p_t) to - balance easy vs hard examples. - Returns: - Loss tensor with the reduction option applied. - """ - assert (targets.dim() == 3) - assert (pred_logits.dim() == 3) # batch x from x to - - bs, n, _ = pred_logits.shape - if text_mask is not None: - assert (text_mask.dim() == 2) - text_mask = (text_mask > 0).unsqueeze(1) - text_mask = text_mask.repeat(1, pred_logits.size(1), 1) # copy along the image channel dimension - pred_logits = torch.masked_select(pred_logits, text_mask) - targets = torch.masked_select(targets, text_mask) - - # print(pred_logits.shape) - # print(targets.shape) - - p = torch.sigmoid(pred_logits) - ce_loss = F.binary_cross_entropy_with_logits(pred_logits, targets, reduction="none") - p_t = p * targets + (1 - p) * (1 - targets) - loss = ce_loss * ((1 - p_t) ** gamma) - - if alpha >= 0: - alpha_t = alpha * targets + (1 - alpha) * (1 - targets) - loss = alpha_t * loss - - return loss - - -class TokenSigmoidFocalLoss(nn.Module): - def __init__(self, alpha, gamma): - super(TokenSigmoidFocalLoss, self).__init__() - self.alpha = alpha - self.gamma = gamma - - def forward(self, logits, targets, text_masks=None, version="binary", **kwargs): - if version == "binary": - loss_func = token_sigmoid_binary_focal_loss - elif version == "softmax": - loss_func = token_sigmoid_softmax_focal_loss - elif version == "binaryv2": - loss_func = token_sigmoid_binary_focal_loss_v2 - else: - raise NotImplementedError - loss = loss_func(logits, targets, self.alpha, self.gamma, text_masks, **kwargs) - return loss.sum() - - def __repr__(self): - tmpstr = self.__class__.__name__ + "(" - tmpstr += "gamma=" + str(self.gamma) - tmpstr += ", alpha=" + str(self.alpha) - tmpstr += ")" - return tmpstr diff --git a/spaces/Pranjal-666/COVID_classify_sequence/corona_train.py b/spaces/Pranjal-666/COVID_classify_sequence/corona_train.py deleted file mode 100644 index 721be8bfc484eddc015f46d78f161e0797d840f4..0000000000000000000000000000000000000000 --- a/spaces/Pranjal-666/COVID_classify_sequence/corona_train.py +++ /dev/null @@ -1,39 +0,0 @@ -import numpy as np -import pandas as pd -from sklearn.feature_extraction.text import CountVectorizer -from sklearn.naive_bayes import MultinomialNB -import pickle - -# function to convert sequence strings into k-mer words, default size = 6 (hexamer words) -kmer_size = 6 -NGram = 4 -#KFold_val = 10 -def getKmers(sequence, size=kmer_size): - return [sequence[x:x+size].lower() for x in range(len(sequence) - size + 1)] - -print('Reading file...') -#covid19df= pd.read_csv('SARS_MERS_COV_train.csv') -covid19df= pd.read_csv('sars_mers_cov_other_train.csv') - -print('Creating token using K_Mer...') -covid19df['words'] = covid19df.apply(lambda x: getKmers(x['SEQ']), axis=1) -covid19df = covid19df.drop('SEQ', axis=1) -covid_texts = list(covid19df['words']) - -print('Converting token to list...') -for item in range(len(covid_texts)): - covid_texts[item] = ' '.join(covid_texts[item]) -y_data = covid19df["CLASS"].values - -print('Performing Count Vectorization...') -cv = CountVectorizer(ngram_range=(NGram,NGram)) -X = cv.fit_transform(covid_texts) -pickle.dump(cv, open('countVectTrain.pkl', 'wb')) - -print('Creating Classifiers...') -NB_classifier = MultinomialNB(alpha=0.1) - -NB_classifier.fit(X, y_data) -# save the model to disk -filename = 'corona_pred.pkl' -pickle.dump(NB_classifier, open(filename, 'wb')) diff --git a/spaces/Pranjal-666/User-Behaviour-Model/README.md b/spaces/Pranjal-666/User-Behaviour-Model/README.md deleted file mode 100644 index db593adcd872f218b4fbed7a2a7de48831badaa0..0000000000000000000000000000000000000000 --- a/spaces/Pranjal-666/User-Behaviour-Model/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: User Behaviour Model -emoji: 🏢 -colorFrom: gray -colorTo: indigo -sdk: gradio -sdk_version: 3.29.0 -app_file: app.py -pinned: false -license: other ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Pranjal12345/Text_to_Speech/tortoise/models/diffusion_decoder.py b/spaces/Pranjal12345/Text_to_Speech/tortoise/models/diffusion_decoder.py deleted file mode 100644 index e969129caa2b6da30e6c364207318e5c270c5405..0000000000000000000000000000000000000000 --- a/spaces/Pranjal12345/Text_to_Speech/tortoise/models/diffusion_decoder.py +++ /dev/null @@ -1,336 +0,0 @@ -import math -import random -from abc import abstractmethod - -import torch -import torch.nn as nn -import torch.nn.functional as F -from torch import autocast - -from tortoise.models.arch_util import normalization, AttentionBlock - - -def is_latent(t): - return t.dtype == torch.float - - -def is_sequence(t): - return t.dtype == torch.long - - -def timestep_embedding(timesteps, dim, max_period=10000): - """ - Create sinusoidal timestep embeddings. - - :param timesteps: a 1-D Tensor of N indices, one per batch element. - These may be fractional. - :param dim: the dimension of the output. - :param max_period: controls the minimum frequency of the embeddings. - :return: an [N x dim] Tensor of positional embeddings. - """ - half = dim // 2 - freqs = torch.exp( - -math.log(max_period) * torch.arange(start=0, end=half, dtype=torch.float32) / half - ).to(device=timesteps.device) - args = timesteps[:, None].float() * freqs[None] - embedding = torch.cat([torch.cos(args), torch.sin(args)], dim=-1) - if dim % 2: - embedding = torch.cat([embedding, torch.zeros_like(embedding[:, :1])], dim=-1) - return embedding - - -class TimestepBlock(nn.Module): - @abstractmethod - def forward(self, x, emb): - """ - Apply the module to `x` given `emb` timestep embeddings. - """ - - -class TimestepEmbedSequential(nn.Sequential, TimestepBlock): - def forward(self, x, emb): - for layer in self: - if isinstance(layer, TimestepBlock): - x = layer(x, emb) - else: - x = layer(x) - return x - - -class ResBlock(TimestepBlock): - def __init__( - self, - channels, - emb_channels, - dropout, - out_channels=None, - dims=2, - kernel_size=3, - efficient_config=True, - use_scale_shift_norm=False, - ): - super().__init__() - self.channels = channels - self.emb_channels = emb_channels - self.dropout = dropout - self.out_channels = out_channels or channels - self.use_scale_shift_norm = use_scale_shift_norm - padding = {1: 0, 3: 1, 5: 2}[kernel_size] - eff_kernel = 1 if efficient_config else 3 - eff_padding = 0 if efficient_config else 1 - - self.in_layers = nn.Sequential( - normalization(channels), - nn.SiLU(), - nn.Conv1d(channels, self.out_channels, eff_kernel, padding=eff_padding), - ) - - self.emb_layers = nn.Sequential( - nn.SiLU(), - nn.Linear( - emb_channels, - 2 * self.out_channels if use_scale_shift_norm else self.out_channels, - ), - ) - self.out_layers = nn.Sequential( - normalization(self.out_channels), - nn.SiLU(), - nn.Dropout(p=dropout), - nn.Conv1d(self.out_channels, self.out_channels, kernel_size, padding=padding), - ) - - if self.out_channels == channels: - self.skip_connection = nn.Identity() - else: - self.skip_connection = nn.Conv1d(channels, self.out_channels, eff_kernel, padding=eff_padding) - - def forward(self, x, emb): - h = self.in_layers(x) - emb_out = self.emb_layers(emb).type(h.dtype) - while len(emb_out.shape) < len(h.shape): - emb_out = emb_out[..., None] - if self.use_scale_shift_norm: - out_norm, out_rest = self.out_layers[0], self.out_layers[1:] - scale, shift = torch.chunk(emb_out, 2, dim=1) - h = out_norm(h) * (1 + scale) + shift - h = out_rest(h) - else: - h = h + emb_out - h = self.out_layers(h) - return self.skip_connection(x) + h - - -class DiffusionLayer(TimestepBlock): - def __init__(self, model_channels, dropout, num_heads): - super().__init__() - self.resblk = ResBlock(model_channels, model_channels, dropout, model_channels, dims=1, use_scale_shift_norm=True) - self.attn = AttentionBlock(model_channels, num_heads, relative_pos_embeddings=True) - - def forward(self, x, time_emb): - y = self.resblk(x, time_emb) - return self.attn(y) - - -class DiffusionTts(nn.Module): - def __init__( - self, - model_channels=512, - num_layers=8, - in_channels=100, - in_latent_channels=512, - in_tokens=8193, - out_channels=200, # mean and variance - dropout=0, - use_fp16=False, - num_heads=16, - # Parameters for regularization. - layer_drop=.1, - unconditioned_percentage=.1, # This implements a mechanism similar to what is used in classifier-free training. - ): - super().__init__() - - self.in_channels = in_channels - self.model_channels = model_channels - self.out_channels = out_channels - self.dropout = dropout - self.num_heads = num_heads - self.unconditioned_percentage = unconditioned_percentage - self.enable_fp16 = use_fp16 - self.layer_drop = layer_drop - - self.inp_block = nn.Conv1d(in_channels, model_channels, 3, 1, 1) - self.time_embed = nn.Sequential( - nn.Linear(model_channels, model_channels), - nn.SiLU(), - nn.Linear(model_channels, model_channels), - ) - - # Either code_converter or latent_converter is used, depending on what type of conditioning data is fed. - # This model is meant to be able to be trained on both for efficiency purposes - it is far less computationally - # complex to generate tokens, while generating latents will normally mean propagating through a deep autoregressive - # transformer network. - self.code_embedding = nn.Embedding(in_tokens, model_channels) - self.code_converter = nn.Sequential( - AttentionBlock(model_channels, num_heads, relative_pos_embeddings=True), - AttentionBlock(model_channels, num_heads, relative_pos_embeddings=True), - AttentionBlock(model_channels, num_heads, relative_pos_embeddings=True), - ) - self.code_norm = normalization(model_channels) - self.latent_conditioner = nn.Sequential( - nn.Conv1d(in_latent_channels, model_channels, 3, padding=1), - AttentionBlock(model_channels, num_heads, relative_pos_embeddings=True), - AttentionBlock(model_channels, num_heads, relative_pos_embeddings=True), - AttentionBlock(model_channels, num_heads, relative_pos_embeddings=True), - AttentionBlock(model_channels, num_heads, relative_pos_embeddings=True), - ) - self.contextual_embedder = nn.Sequential(nn.Conv1d(in_channels,model_channels,3,padding=1,stride=2), - nn.Conv1d(model_channels, model_channels*2,3,padding=1,stride=2), - AttentionBlock(model_channels*2, num_heads, relative_pos_embeddings=True, do_checkpoint=False), - AttentionBlock(model_channels*2, num_heads, relative_pos_embeddings=True, do_checkpoint=False), - AttentionBlock(model_channels*2, num_heads, relative_pos_embeddings=True, do_checkpoint=False), - AttentionBlock(model_channels*2, num_heads, relative_pos_embeddings=True, do_checkpoint=False), - AttentionBlock(model_channels*2, num_heads, relative_pos_embeddings=True, do_checkpoint=False)) - self.unconditioned_embedding = nn.Parameter(torch.randn(1,model_channels,1)) - self.conditioning_timestep_integrator = TimestepEmbedSequential( - DiffusionLayer(model_channels, dropout, num_heads), - DiffusionLayer(model_channels, dropout, num_heads), - DiffusionLayer(model_channels, dropout, num_heads), - ) - - self.integrating_conv = nn.Conv1d(model_channels*2, model_channels, kernel_size=1) - self.mel_head = nn.Conv1d(model_channels, in_channels, kernel_size=3, padding=1) - - self.layers = nn.ModuleList([DiffusionLayer(model_channels, dropout, num_heads) for _ in range(num_layers)] + - [ResBlock(model_channels, model_channels, dropout, dims=1, use_scale_shift_norm=True) for _ in range(3)]) - - self.out = nn.Sequential( - normalization(model_channels), - nn.SiLU(), - nn.Conv1d(model_channels, out_channels, 3, padding=1), - ) - - def get_grad_norm_parameter_groups(self): - groups = { - 'minicoder': list(self.contextual_embedder.parameters()), - 'layers': list(self.layers.parameters()), - 'code_converters': list(self.code_embedding.parameters()) + list(self.code_converter.parameters()) + list(self.latent_conditioner.parameters()) + list(self.latent_conditioner.parameters()), - 'timestep_integrator': list(self.conditioning_timestep_integrator.parameters()) + list(self.integrating_conv.parameters()), - 'time_embed': list(self.time_embed.parameters()), - } - return groups - - def get_conditioning(self, conditioning_input): - speech_conditioning_input = conditioning_input.unsqueeze(1) if len( - conditioning_input.shape) == 3 else conditioning_input - conds = [] - for j in range(speech_conditioning_input.shape[1]): - conds.append(self.contextual_embedder(speech_conditioning_input[:, j])) - conds = torch.cat(conds, dim=-1) - conds = conds.mean(dim=-1) - return conds - - def timestep_independent(self, aligned_conditioning, conditioning_latent, expected_seq_len, return_code_pred): - # Shuffle aligned_latent to BxCxS format - if is_latent(aligned_conditioning): - aligned_conditioning = aligned_conditioning.permute(0, 2, 1) - - cond_scale, cond_shift = torch.chunk(conditioning_latent, 2, dim=1) - if is_latent(aligned_conditioning): - code_emb = self.latent_conditioner(aligned_conditioning) - else: - code_emb = self.code_embedding(aligned_conditioning).permute(0, 2, 1) - code_emb = self.code_converter(code_emb) - code_emb = self.code_norm(code_emb) * (1 + cond_scale.unsqueeze(-1)) + cond_shift.unsqueeze(-1) - - unconditioned_batches = torch.zeros((code_emb.shape[0], 1, 1), device=code_emb.device) - # Mask out the conditioning branch for whole batch elements, implementing something similar to classifier-free guidance. - if self.training and self.unconditioned_percentage > 0: - unconditioned_batches = torch.rand((code_emb.shape[0], 1, 1), - device=code_emb.device) < self.unconditioned_percentage - code_emb = torch.where(unconditioned_batches, self.unconditioned_embedding.repeat(aligned_conditioning.shape[0], 1, 1), - code_emb) - expanded_code_emb = F.interpolate(code_emb, size=expected_seq_len, mode='nearest') - - if not return_code_pred: - return expanded_code_emb - else: - mel_pred = self.mel_head(expanded_code_emb) - # Multiply mel_pred by !unconditioned_branches, which drops the gradient on unconditioned branches. This is because we don't want that gradient being used to train parameters through the codes_embedder as it unbalances contributions to that network from the MSE loss. - mel_pred = mel_pred * unconditioned_batches.logical_not() - return expanded_code_emb, mel_pred - - def forward(self, x, timesteps, aligned_conditioning=None, conditioning_latent=None, precomputed_aligned_embeddings=None, conditioning_free=False, return_code_pred=False): - """ - Apply the model to an input batch. - - :param x: an [N x C x ...] Tensor of inputs. - :param timesteps: a 1-D batch of timesteps. - :param aligned_conditioning: an aligned latent or sequence of tokens providing useful data about the sample to be produced. - :param conditioning_latent: a pre-computed conditioning latent; see get_conditioning(). - :param precomputed_aligned_embeddings: Embeddings returned from self.timestep_independent() - :param conditioning_free: When set, all conditioning inputs (including tokens and conditioning_input) will not be considered. - :return: an [N x C x ...] Tensor of outputs. - """ - assert precomputed_aligned_embeddings is not None or (aligned_conditioning is not None and conditioning_latent is not None) - assert not (return_code_pred and precomputed_aligned_embeddings is not None) # These two are mutually exclusive. - - unused_params = [] - if conditioning_free: - code_emb = self.unconditioned_embedding.repeat(x.shape[0], 1, x.shape[-1]) - unused_params.extend(list(self.code_converter.parameters()) + list(self.code_embedding.parameters())) - unused_params.extend(list(self.latent_conditioner.parameters())) - else: - if precomputed_aligned_embeddings is not None: - code_emb = precomputed_aligned_embeddings - else: - code_emb, mel_pred = self.timestep_independent(aligned_conditioning, conditioning_latent, x.shape[-1], True) - if is_latent(aligned_conditioning): - unused_params.extend(list(self.code_converter.parameters()) + list(self.code_embedding.parameters())) - else: - unused_params.extend(list(self.latent_conditioner.parameters())) - - unused_params.append(self.unconditioned_embedding) - - time_emb = self.time_embed(timestep_embedding(timesteps, self.model_channels)) - code_emb = self.conditioning_timestep_integrator(code_emb, time_emb) - x = self.inp_block(x) - x = torch.cat([x, code_emb], dim=1) - x = self.integrating_conv(x) - for i, lyr in enumerate(self.layers): - # Do layer drop where applicable. Do not drop first and last layers. - if self.training and self.layer_drop > 0 and i != 0 and i != (len(self.layers)-1) and random.random() < self.layer_drop: - unused_params.extend(list(lyr.parameters())) - else: - # First and last blocks will have autocast disabled for improved precision. - if not torch.backends.mps.is_available(): - with autocast(x.device.type, enabled=self.enable_fp16 and i != 0): - x = lyr(x, time_emb) - else: - x = lyr(x, time_emb) - - x = x.float() - out = self.out(x) - - # Involve probabilistic or possibly unused parameters in loss so we don't get DDP errors. - extraneous_addition = 0 - for p in unused_params: - extraneous_addition = extraneous_addition + p.mean() - out = out + extraneous_addition * 0 - - if return_code_pred: - return out, mel_pred - return out - - -if __name__ == '__main__': - clip = torch.randn(2, 100, 400) - aligned_latent = torch.randn(2,388,512) - aligned_sequence = torch.randint(0,8192,(2,100)) - cond = torch.randn(2, 100, 400) - ts = torch.LongTensor([600, 600]) - model = DiffusionTts(512, layer_drop=.3, unconditioned_percentage=.5) - # Test with latent aligned conditioning - #o = model(clip, ts, aligned_latent, cond) - # Test with sequence aligned conditioning - o = model(clip, ts, aligned_sequence, cond) - diff --git a/spaces/Prof-Reza/Audiocraft_Music-Audio_Generation/audiocraft/grids/musicgen/musicgen_clapemb_32khz.py b/spaces/Prof-Reza/Audiocraft_Music-Audio_Generation/audiocraft/grids/musicgen/musicgen_clapemb_32khz.py deleted file mode 100644 index 64ad3f8c77afe1ab5908e407ad14d4879e1b1ad1..0000000000000000000000000000000000000000 --- a/spaces/Prof-Reza/Audiocraft_Music-Audio_Generation/audiocraft/grids/musicgen/musicgen_clapemb_32khz.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -from ._explorers import LMExplorer -from ...environment import AudioCraftEnvironment - - -@LMExplorer -def explorer(launcher): - partitions = AudioCraftEnvironment.get_slurm_partitions(['team', 'global']) - launcher.slurm_(gpus=32, partition=partitions) - launcher.bind_(solver='musicgen/musicgen_base_32khz') - # replace this by the desired music dataset - launcher.bind_(dset='internal/music_400k_32khz') - launcher.bind_(conditioner='clapemb2music') - - fsdp = {'autocast': False, 'fsdp.use': True} - cache_path = {'conditioners.description.clap.cache_path': - '/fsx-audio-craft-llm/jadecopet/experiments/audiocraft/caches/clap_embed_music'} - text_wav_training_opt = {'conditioners.description.clap.text_p': 0.5} - - launcher.bind_(fsdp) - - launcher.slurm_(gpus=32).bind_(label='32gpus') - with launcher.job_array(): - launcher() - launcher(text_wav_training_opt) - launcher(cache_path) - launcher(cache_path, text_wav_training_opt) diff --git a/spaces/Raspberry-ai/main/.env/lib/python3.11/site-packages/setuptools/_distutils/command/clean.py b/spaces/Raspberry-ai/main/.env/lib/python3.11/site-packages/setuptools/_distutils/command/clean.py deleted file mode 100644 index b731b60609621ad822aa989ffa1f711ec2932278..0000000000000000000000000000000000000000 --- a/spaces/Raspberry-ai/main/.env/lib/python3.11/site-packages/setuptools/_distutils/command/clean.py +++ /dev/null @@ -1,76 +0,0 @@ -"""distutils.command.clean - -Implements the Distutils 'clean' command.""" - -# contributed by Bastian Kleineidam , added 2000-03-18 - -import os -from distutils.core import Command -from distutils.dir_util import remove_tree -from distutils import log - - -class clean(Command): - - description = "clean up temporary files from 'build' command" - user_options = [ - ('build-base=', 'b', "base build directory (default: 'build.build-base')"), - ( - 'build-lib=', - None, - "build directory for all modules (default: 'build.build-lib')", - ), - ('build-temp=', 't', "temporary build directory (default: 'build.build-temp')"), - ( - 'build-scripts=', - None, - "build directory for scripts (default: 'build.build-scripts')", - ), - ('bdist-base=', None, "temporary directory for built distributions"), - ('all', 'a', "remove all build output, not just temporary by-products"), - ] - - boolean_options = ['all'] - - def initialize_options(self): - self.build_base = None - self.build_lib = None - self.build_temp = None - self.build_scripts = None - self.bdist_base = None - self.all = None - - def finalize_options(self): - self.set_undefined_options( - 'build', - ('build_base', 'build_base'), - ('build_lib', 'build_lib'), - ('build_scripts', 'build_scripts'), - ('build_temp', 'build_temp'), - ) - self.set_undefined_options('bdist', ('bdist_base', 'bdist_base')) - - def run(self): - # remove the build/temp. directory (unless it's already - # gone) - if os.path.exists(self.build_temp): - remove_tree(self.build_temp, dry_run=self.dry_run) - else: - log.debug("'%s' does not exist -- can't clean it", self.build_temp) - - if self.all: - # remove build directories - for directory in (self.build_lib, self.bdist_base, self.build_scripts): - if os.path.exists(directory): - remove_tree(directory, dry_run=self.dry_run) - else: - log.warn("'%s' does not exist -- can't clean it", directory) - - # just for the heck of it, try to remove the base build directory: - # we might have emptied it right now, but if not we don't care - if not self.dry_run: - try: - os.rmdir(self.build_base) - log.info("removing '%s'", self.build_base) - except OSError: - pass diff --git a/spaces/Realcat/image-matching-webui/third_party/SGMNet/utils/metrics.py b/spaces/Realcat/image-matching-webui/third_party/SGMNet/utils/metrics.py deleted file mode 100644 index 0c4ddf4f0b9c5d045b627dea1c266b863246e1fd..0000000000000000000000000000000000000000 --- a/spaces/Realcat/image-matching-webui/third_party/SGMNet/utils/metrics.py +++ /dev/null @@ -1,63 +0,0 @@ -from .transformations import quaternion_from_matrix -import numpy as np -import os -import sys - - -def evaluate_R_t(R_gt, t_gt, R, t): - t = t.flatten() - t_gt = t_gt.flatten() - - eps = 1e-15 - - q_gt = quaternion_from_matrix(R_gt) - q = quaternion_from_matrix(R) - q = q / (np.linalg.norm(q) + eps) - q_gt = q_gt / (np.linalg.norm(q_gt) + eps) - loss_q = np.maximum(eps, (1.0 - np.sum(q * q_gt) ** 2)) - err_q = np.arccos(1 - 2 * loss_q) - - t = t / (np.linalg.norm(t) + eps) - t_gt = t_gt / (np.linalg.norm(t_gt) + eps) - loss_t = np.maximum(eps, (1.0 - np.sum(t * t_gt) ** 2)) - err_t = np.arccos(np.sqrt(1 - loss_t)) - return np.rad2deg(err_q), np.rad2deg(err_t) - - -def pose_auc(errors, thresholds): - sort_idx = np.argsort(errors) - errors = np.array(errors.copy())[sort_idx] - recall = (np.arange(len(errors)) + 1) / len(errors) - errors = np.r_[0.0, errors] - recall = np.r_[0.0, recall] - aucs = [] - for t in thresholds[1:]: - last_index = np.searchsorted(errors, t) - r = np.r_[recall[:last_index], recall[last_index - 1]] - e = np.r_[errors[:last_index], t] - aucs.append(np.trapz(r, x=e) / t) - return aucs - - -def approx_pose_auc(errors, thresholds): - qt_acc_hist, _ = np.histogram(errors, thresholds) - num_pair = float(len(errors)) - qt_acc_hist = qt_acc_hist.astype(float) / num_pair - qt_acc = np.cumsum(qt_acc_hist) - approx_aucs = [np.mean(qt_acc[:i]) for i in range(1, len(thresholds))] - return approx_aucs - - -def compute_epi_inlier(x1, x2, E, inlier_th): - num_pts1, num_pts2 = x1.shape[0], x2.shape[0] - x1_h = np.concatenate([x1, np.ones([num_pts1, 1])], -1) - x2_h = np.concatenate([x2, np.ones([num_pts2, 1])], -1) - ep_line1 = x1_h @ E.T - ep_line2 = x2_h @ E - norm_factor = ( - 1 / np.sqrt((ep_line1[:, :2] ** 2).sum(1)) - + 1 / np.sqrt((ep_line2[:, :2] ** 2).sum(1)) - ) / 2 - dis = abs((ep_line1 * x2_h).sum(-1)) * norm_factor - inlier_mask = dis < inlier_th - return inlier_mask diff --git a/spaces/Realcat/image-matching-webui/third_party/d2net/lib/exceptions.py b/spaces/Realcat/image-matching-webui/third_party/d2net/lib/exceptions.py deleted file mode 100644 index e0ea28797ee37248afb2585461751925f98123e6..0000000000000000000000000000000000000000 --- a/spaces/Realcat/image-matching-webui/third_party/d2net/lib/exceptions.py +++ /dev/null @@ -1,6 +0,0 @@ -class EmptyTensorError(Exception): - pass - - -class NoGradientError(Exception): - pass diff --git a/spaces/Reha2704/VToonify/vtoonify/model/stylegan/op_gpu/fused_act.py b/spaces/Reha2704/VToonify/vtoonify/model/stylegan/op_gpu/fused_act.py deleted file mode 100644 index 815eca1905b7962a2314f6af3b3ab5daeb74a009..0000000000000000000000000000000000000000 --- a/spaces/Reha2704/VToonify/vtoonify/model/stylegan/op_gpu/fused_act.py +++ /dev/null @@ -1,119 +0,0 @@ -import os - -import torch -from torch import nn -from torch.nn import functional as F -from torch.autograd import Function -from torch.utils.cpp_extension import load - - -module_path = os.path.dirname(__file__) -fused = load( - "fused", - sources=[ - os.path.join(module_path, "fused_bias_act.cpp"), - os.path.join(module_path, "fused_bias_act_kernel.cu"), - ], -) - - -class FusedLeakyReLUFunctionBackward(Function): - @staticmethod - def forward(ctx, grad_output, out, bias, negative_slope, scale): - ctx.save_for_backward(out) - ctx.negative_slope = negative_slope - ctx.scale = scale - - empty = grad_output.new_empty(0) - - grad_input = fused.fused_bias_act( - grad_output.contiguous(), empty, out, 3, 1, negative_slope, scale - ) - - dim = [0] - - if grad_input.ndim > 2: - dim += list(range(2, grad_input.ndim)) - - if bias: - grad_bias = grad_input.sum(dim).detach() - - else: - grad_bias = empty - - return grad_input, grad_bias - - @staticmethod - def backward(ctx, gradgrad_input, gradgrad_bias): - out, = ctx.saved_tensors - gradgrad_out = fused.fused_bias_act( - gradgrad_input.contiguous(), gradgrad_bias, out, 3, 1, ctx.negative_slope, ctx.scale - ) - - return gradgrad_out, None, None, None, None - - -class FusedLeakyReLUFunction(Function): - @staticmethod - def forward(ctx, input, bias, negative_slope, scale): - empty = input.new_empty(0) - - ctx.bias = bias is not None - - if bias is None: - bias = empty - - out = fused.fused_bias_act(input, bias, empty, 3, 0, negative_slope, scale) - ctx.save_for_backward(out) - ctx.negative_slope = negative_slope - ctx.scale = scale - - return out - - @staticmethod - def backward(ctx, grad_output): - out, = ctx.saved_tensors - - grad_input, grad_bias = FusedLeakyReLUFunctionBackward.apply( - grad_output, out, ctx.bias, ctx.negative_slope, ctx.scale - ) - - if not ctx.bias: - grad_bias = None - - return grad_input, grad_bias, None, None - - -class FusedLeakyReLU(nn.Module): - def __init__(self, channel, bias=True, negative_slope=0.2, scale=2 ** 0.5): - super().__init__() - - if bias: - self.bias = nn.Parameter(torch.zeros(channel)) - - else: - self.bias = None - - self.negative_slope = negative_slope - self.scale = scale - - def forward(self, input): - return fused_leaky_relu(input, self.bias, self.negative_slope, self.scale) - - -def fused_leaky_relu(input, bias=None, negative_slope=0.2, scale=2 ** 0.5): - if input.device.type == "cpu": - if bias is not None: - rest_dim = [1] * (input.ndim - bias.ndim - 1) - return ( - F.leaky_relu( - input + bias.view(1, bias.shape[0], *rest_dim), negative_slope=0.2 - ) - * scale - ) - - else: - return F.leaky_relu(input, negative_slope=0.2) * scale - - else: - return FusedLeakyReLUFunction.apply(input.contiguous(), bias, negative_slope, scale) diff --git a/spaces/Riksarkivet/htr_demo/helper/text/overview/changelog_roadmap/roadmap.md b/spaces/Riksarkivet/htr_demo/helper/text/overview/changelog_roadmap/roadmap.md deleted file mode 100644 index ae72432fde4b08456b599757bd1cbe64fcf6383e..0000000000000000000000000000000000000000 --- a/spaces/Riksarkivet/htr_demo/helper/text/overview/changelog_roadmap/roadmap.md +++ /dev/null @@ -1,27 +0,0 @@ -## Roadmap - -Our roadmap is where you can learn about what features we're working on. Have any questions or comments about items on the roadmap? See **Overview** > **FAQ & Discussion** for feedback or collaboration. - -### Working on - -- Release Training and Eval data on HuggingFace - -- Add support for TrOCR models as Text recognition model: - - - Train a TrOCR model specialized on Swedish historical handwritten text. - -- Optimize the backend of the application: - - Package the code - - Add support for batch inference - - Start a collaborative open source project - -### Backlog - -- Initial document classifier - -- Add support for Different segmentation strategies: - - - Table detection - - Different text layouts with multiple columns - -- Add more endpoints for rest api and add a more extensive documentation diff --git a/spaces/Robert001/UniControl-Demo/annotator/uniformer/mmdet_null/models/detectors/kd_one_stage.py b/spaces/Robert001/UniControl-Demo/annotator/uniformer/mmdet_null/models/detectors/kd_one_stage.py deleted file mode 100644 index 671ec19015c87fefd065b84ae887147f90cc892b..0000000000000000000000000000000000000000 --- a/spaces/Robert001/UniControl-Demo/annotator/uniformer/mmdet_null/models/detectors/kd_one_stage.py +++ /dev/null @@ -1,100 +0,0 @@ -import mmcv -import torch -from mmcv.runner import load_checkpoint - -from .. import build_detector -from ..builder import DETECTORS -from .single_stage import SingleStageDetector - - -@DETECTORS.register_module() -class KnowledgeDistillationSingleStageDetector(SingleStageDetector): - r"""Implementation of `Distilling the Knowledge in a Neural Network. - `_. - - Args: - teacher_config (str | dict): Config file path - or the config object of teacher model. - teacher_ckpt (str, optional): Checkpoint path of teacher model. - If left as None, the model will not load any weights. - """ - - def __init__(self, - backbone, - neck, - bbox_head, - teacher_config, - teacher_ckpt=None, - eval_teacher=True, - train_cfg=None, - test_cfg=None, - pretrained=None): - super().__init__(backbone, neck, bbox_head, train_cfg, test_cfg, - pretrained) - self.eval_teacher = eval_teacher - # Build teacher model - if isinstance(teacher_config, str): - teacher_config = mmcv.Config.fromfile(teacher_config) - self.teacher_model = build_detector(teacher_config['model']) - if teacher_ckpt is not None: - load_checkpoint( - self.teacher_model, teacher_ckpt, map_location='cpu') - - def forward_train(self, - img, - img_metas, - gt_bboxes, - gt_labels, - gt_bboxes_ignore=None): - """ - Args: - img (Tensor): Input images of shape (N, C, H, W). - Typically these should be mean centered and std scaled. - img_metas (list[dict]): A List of image info dict where each dict - has: 'img_shape', 'scale_factor', 'flip', and may also contain - 'filename', 'ori_shape', 'pad_shape', and 'img_norm_cfg'. - For details on the values of these keys see - :class:`mmdet.datasets.pipelines.Collect`. - gt_bboxes (list[Tensor]): Each item are the truth boxes for each - image in [tl_x, tl_y, br_x, br_y] format. - gt_labels (list[Tensor]): Class indices corresponding to each box - gt_bboxes_ignore (None | list[Tensor]): Specify which bounding - boxes can be ignored when computing the loss. - Returns: - dict[str, Tensor]: A dictionary of loss components. - """ - x = self.extract_feat(img) - with torch.no_grad(): - teacher_x = self.teacher_model.extract_feat(img) - out_teacher = self.teacher_model.bbox_head(teacher_x) - losses = self.bbox_head.forward_train(x, out_teacher, img_metas, - gt_bboxes, gt_labels, - gt_bboxes_ignore) - return losses - - def cuda(self, device=None): - """Since teacher_model is registered as a plain object, it is necessary - to put the teacher model to cuda when calling cuda function.""" - self.teacher_model.cuda(device=device) - return super().cuda(device=device) - - def train(self, mode=True): - """Set the same train mode for teacher and student model.""" - if self.eval_teacher: - self.teacher_model.train(False) - else: - self.teacher_model.train(mode) - super().train(mode) - - def __setattr__(self, name, value): - """Set attribute, i.e. self.name = value - - This reloading prevent the teacher model from being registered as a - nn.Module. The teacher module is registered as a plain object, so that - the teacher parameters will not show up when calling - ``self.parameters``, ``self.modules``, ``self.children`` methods. - """ - if name == 'teacher_model': - object.__setattr__(self, name, value) - else: - super().__setattr__(name, value) diff --git a/spaces/Saturdays/FER/app.py b/spaces/Saturdays/FER/app.py deleted file mode 100644 index c87a46c0912466af2eb87a28616835e7cd792757..0000000000000000000000000000000000000000 --- a/spaces/Saturdays/FER/app.py +++ /dev/null @@ -1,57 +0,0 @@ -import gradio as gr -import pandas as pd -import numpy as np -import os -from tqdm import tqdm -import tensorflow as tf -from tensorflow import keras -from keras.utils import np_utils -from tensorflow.keras.preprocessing import image -from tensorflow.keras.preprocessing.image import ImageDataGenerator -import matplotlib.pyplot as plt - -new_model = tf.keras.models.load_model('modelo_entrenado.h5') -objects = ('angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral') -y_pos = np.arange(len(objects)) - - -def predict_image(pic): - img = image.load_img(pic, grayscale=True, target_size=(48, 48)) - x = image.img_to_array(img) - - x = np.expand_dims(x, axis = 0) - - x /= 255 - - - custom = new_model.predict(x) - - m=0.000000000000000000001 - a=custom[0] - for i in range(0,len(a)): - if a[i]>m: - m=a[i] - ind=i - - return ('Expression Prediction:',objects[ind]) - -iface = gr.Interface( - predict_image, - [ - - gr.inputs.Image(source="upload",type="filepath", label="Imagen") - ], - - "text", - - - interpretation="default", - title = 'FER - Facial Expression Recognition', - description = 'Probablemente nos daremos cuenta de que muchas veces se miente cuando se tratan las emociones, ¿pero nuestra cara también miente? https://saturdays.ai/2022/03/16/detectando-emociones-mediante-imagenes-con-inteligencia-artificial/ ', - examples=[["28860.png"], ["28790.png"], ["28953.png"], ["30369.png"], ["28722.png"], ["29026.png"], ["28857.png"], ["28795.png"], ["28880.png"], ["28735.png"], ["28757.png"], ["28727.png"], ["28874.png"], ["28723.png"]], - theme = 'grass' - ) - - - -iface.launch() diff --git a/spaces/SerdarHelli/SDF-StyleGan-3D/README.md b/spaces/SerdarHelli/SDF-StyleGan-3D/README.md deleted file mode 100644 index b0fa4963f194b1904478a90c2596809ae36bd400..0000000000000000000000000000000000000000 --- a/spaces/SerdarHelli/SDF-StyleGan-3D/README.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -title: SDF StyleGan 3D -emoji: 📚 -colorFrom: yellow -colorTo: gray -sdk: gradio -sdk_version: 3.12.0 -app_file: app.py -pinned: false -license: mit -tags: -- making-demos ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Shakeb100/GroomingGenie_AI/clipseg/models/clipseg.py b/spaces/Shakeb100/GroomingGenie_AI/clipseg/models/clipseg.py deleted file mode 100644 index a4640b34bbd1ca68a32114471d5585734c4af2fc..0000000000000000000000000000000000000000 --- a/spaces/Shakeb100/GroomingGenie_AI/clipseg/models/clipseg.py +++ /dev/null @@ -1,552 +0,0 @@ -import math -from os.path import basename, dirname, join, isfile -import torch -from torch import nn -from torch.nn import functional as nnf -from torch.nn.modules.activation import ReLU - - -def precompute_clip_vectors(): - - from trails.initialization import init_dataset - lvis = init_dataset('LVIS_OneShot3', split='train', mask='text_label', image_size=224, aug=1, normalize=True, - reduce_factor=None, add_bar=False, negative_prob=0.5) - - all_names = list(lvis.category_names.values()) - - import clip - from models.clip_prompts import imagenet_templates - clip_model = clip.load("ViT-B/32", device='cuda', jit=False)[0] - prompt_vectors = {} - for name in all_names[:100]: - with torch.no_grad(): - conditionals = [t.format(name).replace('_', ' ') for t in imagenet_templates] - text_tokens = clip.tokenize(conditionals).cuda() - cond = clip_model.encode_text(text_tokens).cpu() - - for cond, vec in zip(conditionals, cond): - prompt_vectors[cond] = vec.cpu() - - import pickle - - pickle.dump(prompt_vectors, open('precomputed_prompt_vectors.pickle', 'wb')) - - -def get_prompt_list(prompt): - if prompt == 'plain': - return ['{}'] - elif prompt == 'fixed': - return ['a photo of a {}.'] - elif prompt == 'shuffle': - return ['a photo of a {}.', 'a photograph of a {}.', 'an image of a {}.', '{}.'] - elif prompt == 'shuffle+': - return ['a photo of a {}.', 'a photograph of a {}.', 'an image of a {}.', '{}.', - 'a cropped photo of a {}.', 'a good photo of a {}.', 'a photo of one {}.', - 'a bad photo of a {}.', 'a photo of the {}.'] - elif prompt == 'shuffle_clip': - from models.clip_prompts import imagenet_templates - return imagenet_templates - else: - raise ValueError('Invalid value for prompt') - - -def forward_multihead_attention(x, b, with_aff=False, attn_mask=None): - """ - Simplified version of multihead attention (taken from torch source code but without tons of if clauses). - The mlp and layer norm come from CLIP. - x: input. - b: multihead attention module. - """ - - x_ = b.ln_1(x) - q, k, v = nnf.linear(x_, b.attn.in_proj_weight, b.attn.in_proj_bias).chunk(3, dim=-1) - tgt_len, bsz, embed_dim = q.size() - - head_dim = embed_dim // b.attn.num_heads - scaling = float(head_dim) ** -0.5 - - q = q.contiguous().view(tgt_len, bsz * b.attn.num_heads, b.attn.head_dim).transpose(0, 1) - k = k.contiguous().view(-1, bsz * b.attn.num_heads, b.attn.head_dim).transpose(0, 1) - v = v.contiguous().view(-1, bsz * b.attn.num_heads, b.attn.head_dim).transpose(0, 1) - - q = q * scaling - - attn_output_weights = torch.bmm(q, k.transpose(1, 2)) # n_heads * batch_size, tokens^2, tokens^2 - if attn_mask is not None: - - - attn_mask_type, attn_mask = attn_mask - n_heads = attn_output_weights.size(0) // attn_mask.size(0) - attn_mask = attn_mask.repeat(n_heads, 1) - - if attn_mask_type == 'cls_token': - # the mask only affects similarities compared to the readout-token. - attn_output_weights[:, 0, 1:] = attn_output_weights[:, 0, 1:] * attn_mask[None,...] - # attn_output_weights[:, 0, 0] = 0*attn_output_weights[:, 0, 0] - - if attn_mask_type == 'all': - # print(attn_output_weights.shape, attn_mask[:, None].shape) - attn_output_weights[:, 1:, 1:] = attn_output_weights[:, 1:, 1:] * attn_mask[:, None] - - - attn_output_weights = torch.softmax(attn_output_weights, dim=-1) - - attn_output = torch.bmm(attn_output_weights, v) - attn_output = attn_output.transpose(0, 1).contiguous().view(tgt_len, bsz, embed_dim) - attn_output = b.attn.out_proj(attn_output) - - x = x + attn_output - x = x + b.mlp(b.ln_2(x)) - - if with_aff: - return x, attn_output_weights - else: - return x - - -class CLIPDenseBase(nn.Module): - - def __init__(self, version, reduce_cond, reduce_dim, prompt, n_tokens): - super().__init__() - - import clip - - # prec = torch.FloatTensor - self.clip_model, _ = clip.load(version, device='cpu', jit=False) - self.model = self.clip_model.visual - - # if not None, scale conv weights such that we obtain n_tokens. - self.n_tokens = n_tokens - - for p in self.clip_model.parameters(): - p.requires_grad_(False) - - # conditional - if reduce_cond is not None: - self.reduce_cond = nn.Linear(512, reduce_cond) - for p in self.reduce_cond.parameters(): - p.requires_grad_(False) - else: - self.reduce_cond = None - - self.film_mul = nn.Linear(512 if reduce_cond is None else reduce_cond, reduce_dim) - self.film_add = nn.Linear(512 if reduce_cond is None else reduce_cond, reduce_dim) - - self.reduce = nn.Linear(768, reduce_dim) - - self.prompt_list = get_prompt_list(prompt) - - # precomputed prompts - import pickle - if isfile('precomputed_prompt_vectors.pickle'): - precomp = pickle.load(open('precomputed_prompt_vectors.pickle', 'rb')) - self.precomputed_prompts = {k: torch.from_numpy(v) for k, v in precomp.items()} - else: - self.precomputed_prompts = dict() - - def rescaled_pos_emb(self, new_size): - assert len(new_size) == 2 - - a = self.model.positional_embedding[1:].T.view(1, 768, *self.token_shape) - b = nnf.interpolate(a, new_size, mode='bicubic', align_corners=False).squeeze(0).view(768, new_size[0]*new_size[1]).T - return torch.cat([self.model.positional_embedding[:1], b]) - - def visual_forward(self, x_inp, extract_layers=(), skip=False, mask=None): - - - with torch.no_grad(): - - inp_size = x_inp.shape[2:] - - if self.n_tokens is not None: - stride2 = x_inp.shape[2] // self.n_tokens - conv_weight2 = nnf.interpolate(self.model.conv1.weight, (stride2, stride2), mode='bilinear', align_corners=True) - x = nnf.conv2d(x_inp, conv_weight2, bias=self.model.conv1.bias, stride=stride2, dilation=self.model.conv1.dilation) - else: - x = self.model.conv1(x_inp) # shape = [*, width, grid, grid] - - x = x.reshape(x.shape[0], x.shape[1], -1) # shape = [*, width, grid ** 2] - x = x.permute(0, 2, 1) # shape = [*, grid ** 2, width] - - x = torch.cat([self.model.class_embedding.to(x.dtype) + torch.zeros(x.shape[0], 1, x.shape[-1], dtype=x.dtype, device=x.device), x], dim=1) # shape = [*, grid ** 2 + 1, width] - - standard_n_tokens = 50 if self.model.conv1.kernel_size[0] == 32 else 197 - - if x.shape[1] != standard_n_tokens: - new_shape = int(math.sqrt(x.shape[1]-1)) - x = x + self.rescaled_pos_emb((new_shape, new_shape)).to(x.dtype)[None,:,:] - else: - x = x + self.model.positional_embedding.to(x.dtype) - - x = self.model.ln_pre(x) - - x = x.permute(1, 0, 2) # NLD -> LND - - activations, affinities = [], [] - for i, res_block in enumerate(self.model.transformer.resblocks): - - if mask is not None: - mask_layer, mask_type, mask_tensor = mask - if mask_layer == i or mask_layer == 'all': - # import ipdb; ipdb.set_trace() - size = int(math.sqrt(x.shape[0] - 1)) - - attn_mask = (mask_type, nnf.interpolate(mask_tensor.unsqueeze(1).float(), (size, size)).view(mask_tensor.shape[0], size * size)) - - else: - attn_mask = None - else: - attn_mask = None - - x, aff_per_head = forward_multihead_attention(x, res_block, with_aff=True, attn_mask=attn_mask) - - if i in extract_layers: - affinities += [aff_per_head] - - #if self.n_tokens is not None: - # activations += [nnf.interpolate(x, inp_size, mode='bilinear', align_corners=True)] - #else: - activations += [x] - - if len(extract_layers) > 0 and i == max(extract_layers) and skip: - print('early skip') - break - - x = x.permute(1, 0, 2) # LND -> NLD - x = self.model.ln_post(x[:, 0, :]) - - if self.model.proj is not None: - x = x @ self.model.proj - - return x, activations, affinities - - def sample_prompts(self, words, prompt_list=None): - - prompt_list = prompt_list if prompt_list is not None else self.prompt_list - - prompt_indices = torch.multinomial(torch.ones(len(prompt_list)), len(words), replacement=True) - prompts = [prompt_list[i] for i in prompt_indices] - return [promt.format(w) for promt, w in zip(prompts, words)] - - def get_cond_vec(self, conditional, batch_size): - # compute conditional from a single string - if conditional is not None and type(conditional) == str: - cond = self.compute_conditional(conditional) - cond = cond.repeat(batch_size, 1) - - # compute conditional from string list/tuple - elif conditional is not None and type(conditional) in {list, tuple} and type(conditional[0]) == str: - assert len(conditional) == batch_size - cond = self.compute_conditional(conditional) - - # use conditional directly - elif conditional is not None and type(conditional) == torch.Tensor and conditional.ndim == 2: - cond = conditional - - # compute conditional from image - elif conditional is not None and type(conditional) == torch.Tensor: - with torch.no_grad(): - cond, _, _ = self.visual_forward(conditional) - else: - raise ValueError('invalid conditional') - return cond - - def compute_conditional(self, conditional): - import clip - - dev = next(self.parameters()).device - - if type(conditional) in {list, tuple}: - text_tokens = clip.tokenize(conditional).to(dev) - cond = self.clip_model.encode_text(text_tokens) - else: - if conditional in self.precomputed_prompts: - cond = self.precomputed_prompts[conditional].float().to(dev) - else: - text_tokens = clip.tokenize([conditional]).to(dev) - cond = self.clip_model.encode_text(text_tokens)[0] - - if self.shift_vector is not None: - return cond + self.shift_vector - else: - return cond - - -def clip_load_untrained(version): - assert version == 'ViT-B/16' - from clip.model import CLIP - from clip.clip import _MODELS, _download - model = torch.jit.load(_download(_MODELS['ViT-B/16'])).eval() - state_dict = model.state_dict() - - vision_width = state_dict["visual.conv1.weight"].shape[0] - vision_layers = len([k for k in state_dict.keys() if k.startswith("visual.") and k.endswith(".attn.in_proj_weight")]) - vision_patch_size = state_dict["visual.conv1.weight"].shape[-1] - grid_size = round((state_dict["visual.positional_embedding"].shape[0] - 1) ** 0.5) - image_resolution = vision_patch_size * grid_size - embed_dim = state_dict["text_projection"].shape[1] - context_length = state_dict["positional_embedding"].shape[0] - vocab_size = state_dict["token_embedding.weight"].shape[0] - transformer_width = state_dict["ln_final.weight"].shape[0] - transformer_heads = transformer_width // 64 - transformer_layers = len(set(k.split(".")[2] for k in state_dict if k.startswith(f"transformer.resblocks"))) - - return CLIP(embed_dim, image_resolution, vision_layers, vision_width, vision_patch_size, - context_length, vocab_size, transformer_width, transformer_heads, transformer_layers) - - -class CLIPDensePredT(CLIPDenseBase): - - def __init__(self, version='ViT-B/32', extract_layers=(3, 6, 9), cond_layer=0, reduce_dim=128, n_heads=4, prompt='fixed', - extra_blocks=0, reduce_cond=None, fix_shift=False, - learn_trans_conv_only=False, limit_to_clip_only=False, upsample=False, - add_calibration=False, rev_activations=False, trans_conv=None, n_tokens=None): - - super().__init__(version, reduce_cond, reduce_dim, prompt, n_tokens) - # device = 'cpu' - - self.extract_layers = extract_layers - self.cond_layer = cond_layer - self.limit_to_clip_only = limit_to_clip_only - self.process_cond = None - self.rev_activations = rev_activations - - depth = len(extract_layers) - - if add_calibration: - self.calibration_conds = 1 - - self.upsample_proj = nn.Conv2d(reduce_dim, 1, kernel_size=1) if upsample else None - - self.add_activation1 = True - - self.version = version - - self.token_shape = {'ViT-B/32': (7, 7), 'ViT-B/16': (14, 14)}[version] - - if fix_shift: - # self.shift_vector = nn.Parameter(torch.load(join(dirname(basename(__file__)), 'clip_text_shift_vector.pth')), requires_grad=False) - self.shift_vector = nn.Parameter(torch.load(join(dirname(basename(__file__)), 'shift_text_to_vis.pth')), requires_grad=False) - # self.shift_vector = nn.Parameter(-1*torch.load(join(dirname(basename(__file__)), 'shift2.pth')), requires_grad=False) - else: - self.shift_vector = None - - if trans_conv is None: - trans_conv_ks = {'ViT-B/32': (32, 32), 'ViT-B/16': (16, 16)}[version] - else: - # explicitly define transposed conv kernel size - trans_conv_ks = (trans_conv, trans_conv) - - self.trans_conv = nn.ConvTranspose2d(reduce_dim, 1, trans_conv_ks, stride=trans_conv_ks) - - assert len(self.extract_layers) == depth - - self.reduces = nn.ModuleList([nn.Linear(768, reduce_dim) for _ in range(depth)]) - self.blocks = nn.ModuleList([nn.TransformerEncoderLayer(d_model=reduce_dim, nhead=n_heads) for _ in range(len(self.extract_layers))]) - self.extra_blocks = nn.ModuleList([nn.TransformerEncoderLayer(d_model=reduce_dim, nhead=n_heads) for _ in range(extra_blocks)]) - - # refinement and trans conv - - if learn_trans_conv_only: - for p in self.parameters(): - p.requires_grad_(False) - - for p in self.trans_conv.parameters(): - p.requires_grad_(True) - - self.prompt_list = get_prompt_list(prompt) - - - def forward(self, inp_image, conditional=None, return_features=False, mask=None): - - assert type(return_features) == bool - - inp_image = inp_image.to(self.model.positional_embedding.device) - - if mask is not None: - raise ValueError('mask not supported') - - # x_inp = normalize(inp_image) - x_inp = inp_image - - bs, dev = inp_image.shape[0], x_inp.device - - cond = self.get_cond_vec(conditional, bs) - - visual_q, activations, _ = self.visual_forward(x_inp, extract_layers=[0] + list(self.extract_layers)) - - activation1 = activations[0] - activations = activations[1:] - - _activations = activations[::-1] if not self.rev_activations else activations - - a = None - for i, (activation, block, reduce) in enumerate(zip(_activations, self.blocks, self.reduces)): - - if a is not None: - a = reduce(activation) + a - else: - a = reduce(activation) - - if i == self.cond_layer: - if self.reduce_cond is not None: - cond = self.reduce_cond(cond) - - a = self.film_mul(cond) * a + self.film_add(cond) - - a = block(a) - - for block in self.extra_blocks: - a = a + block(a) - - a = a[1:].permute(1, 2, 0) # rm cls token and -> BS, Feats, Tokens - - size = int(math.sqrt(a.shape[2])) - - a = a.view(bs, a.shape[1], size, size) - - a = self.trans_conv(a) - - if self.n_tokens is not None: - a = nnf.interpolate(a, x_inp.shape[2:], mode='bilinear', align_corners=True) - - if self.upsample_proj is not None: - a = self.upsample_proj(a) - a = nnf.interpolate(a, x_inp.shape[2:], mode='bilinear') - - if return_features: - return a, visual_q, cond, [activation1] + activations - else: - return a, - - - -class CLIPDensePredTMasked(CLIPDensePredT): - - def __init__(self, version='ViT-B/32', extract_layers=(3, 6, 9), cond_layer=0, reduce_dim=128, n_heads=4, - prompt='fixed', extra_blocks=0, reduce_cond=None, fix_shift=False, learn_trans_conv_only=False, - refine=None, limit_to_clip_only=False, upsample=False, add_calibration=False, n_tokens=None): - - super().__init__(version=version, extract_layers=extract_layers, cond_layer=cond_layer, reduce_dim=reduce_dim, - n_heads=n_heads, prompt=prompt, extra_blocks=extra_blocks, reduce_cond=reduce_cond, - fix_shift=fix_shift, learn_trans_conv_only=learn_trans_conv_only, - limit_to_clip_only=limit_to_clip_only, upsample=upsample, add_calibration=add_calibration, - n_tokens=n_tokens) - - def visual_forward_masked(self, img_s, seg_s): - return super().visual_forward(img_s, mask=('all', 'cls_token', seg_s)) - - def forward(self, img_q, cond_or_img_s, seg_s=None, return_features=False): - - if seg_s is None: - cond = cond_or_img_s - else: - img_s = cond_or_img_s - - with torch.no_grad(): - cond, _, _ = self.visual_forward_masked(img_s, seg_s) - - return super().forward(img_q, cond, return_features=return_features) - - - -class CLIPDenseBaseline(CLIPDenseBase): - - def __init__(self, version='ViT-B/32', cond_layer=0, - extract_layer=9, reduce_dim=128, reduce2_dim=None, prompt='fixed', - reduce_cond=None, limit_to_clip_only=False, n_tokens=None): - - super().__init__(version, reduce_cond, reduce_dim, prompt, n_tokens) - device = 'cpu' - - # self.cond_layer = cond_layer - self.extract_layer = extract_layer - self.limit_to_clip_only = limit_to_clip_only - self.shift_vector = None - - self.token_shape = {'ViT-B/32': (7, 7), 'ViT-B/16': (14, 14)}[version] - - assert reduce2_dim is not None - - self.reduce2 = nn.Sequential( - nn.Linear(reduce_dim, reduce2_dim), - nn.ReLU(), - nn.Linear(reduce2_dim, reduce_dim) - ) - - trans_conv_ks = {'ViT-B/32': (32, 32), 'ViT-B/16': (16, 16)}[version] - self.trans_conv = nn.ConvTranspose2d(reduce_dim, 1, trans_conv_ks, stride=trans_conv_ks) - - - def forward(self, inp_image, conditional=None, return_features=False): - - inp_image = inp_image.to(self.model.positional_embedding.device) - - # x_inp = normalize(inp_image) - x_inp = inp_image - - bs, dev = inp_image.shape[0], x_inp.device - - cond = self.get_cond_vec(conditional, bs) - - visual_q, activations, affinities = self.visual_forward(x_inp, extract_layers=[self.extract_layer]) - - a = activations[0] - a = self.reduce(a) - a = self.film_mul(cond) * a + self.film_add(cond) - - if self.reduce2 is not None: - a = self.reduce2(a) - - # the original model would execute a transformer block here - - a = a[1:].permute(1, 2, 0) # rm cls token and -> BS, Feats, Tokens - - size = int(math.sqrt(a.shape[2])) - - a = a.view(bs, a.shape[1], size, size) - a = self.trans_conv(a) - - if return_features: - return a, visual_q, cond, activations - else: - return a, - - -class CLIPSegMultiLabel(nn.Module): - - def __init__(self, model) -> None: - super().__init__() - - from third_party.JoEm.data_loader import get_seen_idx, get_unseen_idx, VOC - - self.pascal_classes = VOC - - from models.clipseg import CLIPDensePredT - from general_utils import load_model - # self.clipseg = load_model('rd64-vit16-neg0.2-phrasecut', strict=False) - self.clipseg = load_model(model, strict=False) - - self.clipseg.eval() - - def forward(self, x): - - bs = x.shape[0] - out = torch.ones(21, bs, 352, 352).to(x.device) * -10 - - for class_id, class_name in enumerate(self.pascal_classes): - - fac = 3 if class_name == 'background' else 1 - - with torch.no_grad(): - pred = torch.sigmoid(self.clipseg(x, class_name)[0][:,0]) * fac - - out[class_id] += pred - - - out = out.permute(1, 0, 2, 3) - - return out - - # construct output tensor - \ No newline at end of file diff --git a/spaces/Shredder/CONBERT-3/predict.py b/spaces/Shredder/CONBERT-3/predict.py deleted file mode 100644 index 8cbcb13a58a7515d7b33e1bc30be53ff92ec5acd..0000000000000000000000000000000000000000 --- a/spaces/Shredder/CONBERT-3/predict.py +++ /dev/null @@ -1,126 +0,0 @@ -import torch -import time -from torch.utils.data import DataLoader, RandomSampler, SequentialSampler -from multiprocessing import cpu_count - -from transformers import ( - AutoConfig, - AutoModelForQuestionAnswering, - AutoTokenizer, - squad_convert_examples_to_features -) - -from transformers.data.processors.squad import SquadResult, SquadV2Processor, SquadExample -from transformers.data.metrics.squad_metrics import compute_predictions_logits - - -def run_prediction(question_texts, context_text, model_path, n_best_size=1): - max_seq_length = 512 - doc_stride = 256 - n_best_size = n_best_size - max_query_length = 64 - max_answer_length = 512 - do_lower_case = False - null_score_diff_threshold = 0.0 - - def to_list(tensor): - return tensor.detach().cpu().tolist() - - config_class, model_class, tokenizer_class = (AutoConfig, AutoModelForQuestionAnswering, AutoTokenizer) - config = config_class.from_pretrained(model_path) - tokenizer = tokenizer_class.from_pretrained(model_path, do_lower_case=True, use_fast=False) - model = model_class.from_pretrained(model_path, config=config) - - device = torch.device("cuda" if torch.cuda.is_available() else "cpu") - model.to(device) - - processor = SquadV2Processor() - examples = [] - - timer = time.time() - for i, question_text in enumerate(question_texts): - - example = SquadExample( - qas_id=str(i), - question_text=question_text, - context_text=context_text, - answer_text=None, - start_position_character=None, - title="Predict", - answers=None, - ) - - examples.append(example) - print(f'Created Squad Examples in {time.time()-timer} seconds') - - print(f'Number of CPUs: {cpu_count()}') - timer = time.time() - features, dataset = squad_convert_examples_to_features( - examples=examples, - tokenizer=tokenizer, - max_seq_length=max_seq_length, - doc_stride=doc_stride, - max_query_length=max_query_length, - is_training=False, - return_dataset="pt", - threads=cpu_count(), - ) - print(f'Converted Examples to Features in {time.time()-timer} seconds') - - eval_sampler = SequentialSampler(dataset) - eval_dataloader = DataLoader(dataset, sampler=eval_sampler, batch_size=10) - - all_results = [] - - timer = time.time() - for batch in eval_dataloader: - model.eval() - batch = tuple(t.to(device) for t in batch) - - with torch.no_grad(): - inputs = { - "input_ids": batch[0], - "attention_mask": batch[1], - "token_type_ids": batch[2], - } - - example_indices = batch[3] - - outputs = model(**inputs) - - for i, example_index in enumerate(example_indices): - eval_feature = features[example_index.item()] - unique_id = int(eval_feature.unique_id) - - output = [to_list(output[i]) for output in outputs.to_tuple()] - - start_logits, end_logits = output - result = SquadResult(unique_id, start_logits, end_logits) - all_results.append(result) - print(f'Model predictions completed in {time.time()-timer} seconds') - - print(all_results) - - output_nbest_file = None - if n_best_size > 1: - output_nbest_file = "nbest.json" - - timer = time.time() - final_predictions = compute_predictions_logits( - all_examples=examples, - all_features=features, - all_results=all_results, - n_best_size=n_best_size, - max_answer_length=max_answer_length, - do_lower_case=do_lower_case, - output_prediction_file=None, - output_nbest_file=output_nbest_file, - output_null_log_odds_file=None, - verbose_logging=False, - version_2_with_negative=True, - null_score_diff_threshold=null_score_diff_threshold, - tokenizer=tokenizer - ) - print(f'Logits converted to predictions in {time.time()-timer} seconds') - - return final_predictions diff --git a/spaces/Sjmin/cosmos/Dockerfile b/spaces/Sjmin/cosmos/Dockerfile deleted file mode 100644 index 4cb0ce42128d9a2ad33a395883f5e5455a38c707..0000000000000000000000000000000000000000 --- a/spaces/Sjmin/cosmos/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM node:18-bullseye-slim -RUN apt-get update && \ - apt-get install -y git -RUN git clone https://gitgud.io/khanon/oai-reverse-proxy.git /app -WORKDIR /app -RUN npm install -COPY Dockerfile greeting.md* .env* ./ -RUN npm run build -EXPOSE 7860 -ENV NODE_ENV=production -CMD [ "npm", "start" ] \ No newline at end of file diff --git a/spaces/SouthCity/ShuruiXu/crazy_functions/test_project/cpp/cppipc/ipc.cpp b/spaces/SouthCity/ShuruiXu/crazy_functions/test_project/cpp/cppipc/ipc.cpp deleted file mode 100644 index c713b852ea5a51fbeb4729b64561da482caaf351..0000000000000000000000000000000000000000 --- a/spaces/SouthCity/ShuruiXu/crazy_functions/test_project/cpp/cppipc/ipc.cpp +++ /dev/null @@ -1,701 +0,0 @@ - -#include -#include -#include -#include // std::pair, std::move, std::forward -#include -#include // aligned_storage_t -#include -#include -#include -#include - -#include "libipc/ipc.h" -#include "libipc/def.h" -#include "libipc/shm.h" -#include "libipc/pool_alloc.h" -#include "libipc/queue.h" -#include "libipc/policy.h" -#include "libipc/rw_lock.h" -#include "libipc/waiter.h" - -#include "libipc/utility/log.h" -#include "libipc/utility/id_pool.h" -#include "libipc/utility/scope_guard.h" -#include "libipc/utility/utility.h" - -#include "libipc/memory/resource.h" -#include "libipc/platform/detail.h" -#include "libipc/circ/elem_array.h" - -namespace { - -using msg_id_t = std::uint32_t; -using acc_t = std::atomic; - -template -struct msg_t; - -template -struct msg_t<0, AlignSize> { - msg_id_t cc_id_; - msg_id_t id_; - std::int32_t remain_; - bool storage_; -}; - -template -struct msg_t : msg_t<0, AlignSize> { - std::aligned_storage_t data_ {}; - - msg_t() = default; - msg_t(msg_id_t cc_id, msg_id_t id, std::int32_t remain, void const * data, std::size_t size) - : msg_t<0, AlignSize> {cc_id, id, remain, (data == nullptr) || (size == 0)} { - if (this->storage_) { - if (data != nullptr) { - // copy storage-id - *reinterpret_cast(&data_) = - *static_cast(data); - } - } - else std::memcpy(&data_, data, size); - } -}; - -template -ipc::buff_t make_cache(T& data, std::size_t size) { - auto ptr = ipc::mem::alloc(size); - std::memcpy(ptr, &data, (ipc::detail::min)(sizeof(data), size)); - return { ptr, size, ipc::mem::free }; -} - -struct cache_t { - std::size_t fill_; - ipc::buff_t buff_; - - cache_t(std::size_t f, ipc::buff_t && b) - : fill_(f), buff_(std::move(b)) - {} - - void append(void const * data, std::size_t size) { - if (fill_ >= buff_.size() || data == nullptr || size == 0) return; - auto new_fill = (ipc::detail::min)(fill_ + size, buff_.size()); - std::memcpy(static_cast(buff_.data()) + fill_, data, new_fill - fill_); - fill_ = new_fill; - } -}; - -auto cc_acc() { - static ipc::shm::handle acc_h("__CA_CONN__", sizeof(acc_t)); - return static_cast(acc_h.get()); -} - -IPC_CONSTEXPR_ std::size_t align_chunk_size(std::size_t size) noexcept { - return (((size - 1) / ipc::large_msg_align) + 1) * ipc::large_msg_align; -} - -IPC_CONSTEXPR_ std::size_t calc_chunk_size(std::size_t size) noexcept { - return ipc::make_align(alignof(std::max_align_t), align_chunk_size( - ipc::make_align(alignof(std::max_align_t), sizeof(std::atomic)) + size)); -} - -struct chunk_t { - std::atomic &conns() noexcept { - return *reinterpret_cast *>(this); - } - - void *data() noexcept { - return reinterpret_cast(this) - + ipc::make_align(alignof(std::max_align_t), sizeof(std::atomic)); - } -}; - -struct chunk_info_t { - ipc::id_pool<> pool_; - ipc::spin_lock lock_; - - IPC_CONSTEXPR_ static std::size_t chunks_mem_size(std::size_t chunk_size) noexcept { - return ipc::id_pool<>::max_count * chunk_size; - } - - ipc::byte_t *chunks_mem() noexcept { - return reinterpret_cast(this + 1); - } - - chunk_t *at(std::size_t chunk_size, ipc::storage_id_t id) noexcept { - if (id < 0) return nullptr; - return reinterpret_cast(chunks_mem() + (chunk_size * id)); - } -}; - -auto& chunk_storages() { - class chunk_handle_t { - ipc::shm::handle handle_; - - public: - chunk_info_t *get_info(std::size_t chunk_size) { - if (!handle_.valid() && - !handle_.acquire( ("__CHUNK_INFO__" + ipc::to_string(chunk_size)).c_str(), - sizeof(chunk_info_t) + chunk_info_t::chunks_mem_size(chunk_size) )) { - ipc::error("[chunk_storages] chunk_shm.id_info_.acquire failed: chunk_size = %zd\n", chunk_size); - return nullptr; - } - auto info = static_cast(handle_.get()); - if (info == nullptr) { - ipc::error("[chunk_storages] chunk_shm.id_info_.get failed: chunk_size = %zd\n", chunk_size); - return nullptr; - } - return info; - } - }; - static ipc::map chunk_hs; - return chunk_hs; -} - -chunk_info_t *chunk_storage_info(std::size_t chunk_size) { - auto &storages = chunk_storages(); - std::decay_t::iterator it; - { - static ipc::rw_lock lock; - IPC_UNUSED_ std::shared_lock guard {lock}; - if ((it = storages.find(chunk_size)) == storages.end()) { - using chunk_handle_t = std::decay_t::value_type::second_type; - guard.unlock(); - IPC_UNUSED_ std::lock_guard guard {lock}; - it = storages.emplace(chunk_size, chunk_handle_t{}).first; - } - } - return it->second.get_info(chunk_size); -} - -std::pair acquire_storage(std::size_t size, ipc::circ::cc_t conns) { - std::size_t chunk_size = calc_chunk_size(size); - auto info = chunk_storage_info(chunk_size); - if (info == nullptr) return {}; - - info->lock_.lock(); - info->pool_.prepare(); - // got an unique id - auto id = info->pool_.acquire(); - info->lock_.unlock(); - - auto chunk = info->at(chunk_size, id); - if (chunk == nullptr) return {}; - chunk->conns().store(conns, std::memory_order_relaxed); - return { id, chunk->data() }; -} - -void *find_storage(ipc::storage_id_t id, std::size_t size) { - if (id < 0) { - ipc::error("[find_storage] id is invalid: id = %ld, size = %zd\n", (long)id, size); - return nullptr; - } - std::size_t chunk_size = calc_chunk_size(size); - auto info = chunk_storage_info(chunk_size); - if (info == nullptr) return nullptr; - return info->at(chunk_size, id)->data(); -} - -void release_storage(ipc::storage_id_t id, std::size_t size) { - if (id < 0) { - ipc::error("[release_storage] id is invalid: id = %ld, size = %zd\n", (long)id, size); - return; - } - std::size_t chunk_size = calc_chunk_size(size); - auto info = chunk_storage_info(chunk_size); - if (info == nullptr) return; - info->lock_.lock(); - info->pool_.release(id); - info->lock_.unlock(); -} - -template -bool sub_rc(ipc::wr, - std::atomic &/*conns*/, ipc::circ::cc_t /*curr_conns*/, ipc::circ::cc_t /*conn_id*/) noexcept { - return true; -} - -template -bool sub_rc(ipc::wr, - std::atomic &conns, ipc::circ::cc_t curr_conns, ipc::circ::cc_t conn_id) noexcept { - auto last_conns = curr_conns & ~conn_id; - for (unsigned k = 0;;) { - auto chunk_conns = conns.load(std::memory_order_acquire); - if (conns.compare_exchange_weak(chunk_conns, chunk_conns & last_conns, std::memory_order_release)) { - return (chunk_conns & last_conns) == 0; - } - ipc::yield(k); - } -} - -template -void recycle_storage(ipc::storage_id_t id, std::size_t size, ipc::circ::cc_t curr_conns, ipc::circ::cc_t conn_id) { - if (id < 0) { - ipc::error("[recycle_storage] id is invalid: id = %ld, size = %zd\n", (long)id, size); - return; - } - std::size_t chunk_size = calc_chunk_size(size); - auto info = chunk_storage_info(chunk_size); - if (info == nullptr) return; - - auto chunk = info->at(chunk_size, id); - if (chunk == nullptr) return; - - if (!sub_rc(Flag{}, chunk->conns(), curr_conns, conn_id)) { - return; - } - info->lock_.lock(); - info->pool_.release(id); - info->lock_.unlock(); -} - -template -bool clear_message(void* p) { - auto msg = static_cast(p); - if (msg->storage_) { - std::int32_t r_size = static_cast(ipc::data_length) + msg->remain_; - if (r_size <= 0) { - ipc::error("[clear_message] invalid msg size: %d\n", (int)r_size); - return true; - } - release_storage( - *reinterpret_cast(&msg->data_), - static_cast(r_size)); - } - return true; -} - -struct conn_info_head { - - ipc::string name_; - msg_id_t cc_id_; // connection-info id - ipc::detail::waiter cc_waiter_, wt_waiter_, rd_waiter_; - ipc::shm::handle acc_h_; - - conn_info_head(char const * name) - : name_ {name} - , cc_id_ {(cc_acc() == nullptr) ? 0 : cc_acc()->fetch_add(1, std::memory_order_relaxed)} - , cc_waiter_{("__CC_CONN__" + name_).c_str()} - , wt_waiter_{("__WT_CONN__" + name_).c_str()} - , rd_waiter_{("__RD_CONN__" + name_).c_str()} - , acc_h_ {("__AC_CONN__" + name_).c_str(), sizeof(acc_t)} { - } - - void quit_waiting() { - cc_waiter_.quit_waiting(); - wt_waiter_.quit_waiting(); - rd_waiter_.quit_waiting(); - } - - auto acc() { - return static_cast(acc_h_.get()); - } - - auto& recv_cache() { - thread_local ipc::unordered_map tls; - return tls; - } -}; - -template -bool wait_for(W& waiter, F&& pred, std::uint64_t tm) { - if (tm == 0) return !pred(); - for (unsigned k = 0; pred();) { - bool ret = true; - ipc::sleep(k, [&k, &ret, &waiter, &pred, tm] { - ret = waiter.wait_if(std::forward(pred), tm); - k = 0; - }); - if (!ret) return false; // timeout or fail - if (k == 0) break; // k has been reset - } - return true; -} - -template -struct queue_generator { - - using queue_t = ipc::queue, Policy>; - - struct conn_info_t : conn_info_head { - queue_t que_; - - conn_info_t(char const * name) - : conn_info_head{name} - , que_{("__QU_CONN__" + - ipc::to_string(DataSize) + "__" + - ipc::to_string(AlignSize) + "__" + name).c_str()} { - } - - void disconnect_receiver() { - bool dis = que_.disconnect(); - this->quit_waiting(); - if (dis) { - this->recv_cache().clear(); - } - } - }; -}; - -template -struct detail_impl { - -using policy_t = Policy; -using flag_t = typename policy_t::flag_t; -using queue_t = typename queue_generator::queue_t; -using conn_info_t = typename queue_generator::conn_info_t; - -constexpr static conn_info_t* info_of(ipc::handle_t h) noexcept { - return static_cast(h); -} - -constexpr static queue_t* queue_of(ipc::handle_t h) noexcept { - return (info_of(h) == nullptr) ? nullptr : &(info_of(h)->que_); -} - -/* API implementations */ - -static void disconnect(ipc::handle_t h) { - auto que = queue_of(h); - if (que == nullptr) { - return; - } - que->shut_sending(); - assert(info_of(h) != nullptr); - info_of(h)->disconnect_receiver(); -} - -static bool reconnect(ipc::handle_t * ph, bool start_to_recv) { - assert(ph != nullptr); - assert(*ph != nullptr); - auto que = queue_of(*ph); - if (que == nullptr) { - return false; - } - if (start_to_recv) { - que->shut_sending(); - if (que->connect()) { // wouldn't connect twice - info_of(*ph)->cc_waiter_.broadcast(); - return true; - } - return false; - } - // start_to_recv == false - if (que->connected()) { - info_of(*ph)->disconnect_receiver(); - } - return que->ready_sending(); -} - -static bool connect(ipc::handle_t * ph, char const * name, bool start_to_recv) { - assert(ph != nullptr); - if (*ph == nullptr) { - *ph = ipc::mem::alloc(name); - } - return reconnect(ph, start_to_recv); -} - -static void destroy(ipc::handle_t h) { - disconnect(h); - ipc::mem::free(info_of(h)); -} - -static std::size_t recv_count(ipc::handle_t h) noexcept { - auto que = queue_of(h); - if (que == nullptr) { - return ipc::invalid_value; - } - return que->conn_count(); -} - -static bool wait_for_recv(ipc::handle_t h, std::size_t r_count, std::uint64_t tm) { - auto que = queue_of(h); - if (que == nullptr) { - return false; - } - return wait_for(info_of(h)->cc_waiter_, [que, r_count] { - return que->conn_count() < r_count; - }, tm); -} - -template -static bool send(F&& gen_push, ipc::handle_t h, void const * data, std::size_t size) { - if (data == nullptr || size == 0) { - ipc::error("fail: send(%p, %zd)\n", data, size); - return false; - } - auto que = queue_of(h); - if (que == nullptr) { - ipc::error("fail: send, queue_of(h) == nullptr\n"); - return false; - } - if (que->elems() == nullptr) { - ipc::error("fail: send, queue_of(h)->elems() == nullptr\n"); - return false; - } - if (!que->ready_sending()) { - ipc::error("fail: send, que->ready_sending() == false\n"); - return false; - } - ipc::circ::cc_t conns = que->elems()->connections(std::memory_order_relaxed); - if (conns == 0) { - ipc::error("fail: send, there is no receiver on this connection.\n"); - return false; - } - // calc a new message id - auto acc = info_of(h)->acc(); - if (acc == nullptr) { - ipc::error("fail: send, info_of(h)->acc() == nullptr\n"); - return false; - } - auto msg_id = acc->fetch_add(1, std::memory_order_relaxed); - auto try_push = std::forward(gen_push)(info_of(h), que, msg_id); - if (size > ipc::large_msg_limit) { - auto dat = acquire_storage(size, conns); - void * buf = dat.second; - if (buf != nullptr) { - std::memcpy(buf, data, size); - return try_push(static_cast(size) - - static_cast(ipc::data_length), &(dat.first), 0); - } - // try using message fragment - //ipc::log("fail: shm::handle for big message. msg_id: %zd, size: %zd\n", msg_id, size); - } - // push message fragment - std::int32_t offset = 0; - for (std::int32_t i = 0; i < static_cast(size / ipc::data_length); ++i, offset += ipc::data_length) { - if (!try_push(static_cast(size) - offset - static_cast(ipc::data_length), - static_cast(data) + offset, ipc::data_length)) { - return false; - } - } - // if remain > 0, this is the last message fragment - std::int32_t remain = static_cast(size) - offset; - if (remain > 0) { - if (!try_push(remain - static_cast(ipc::data_length), - static_cast(data) + offset, - static_cast(remain))) { - return false; - } - } - return true; -} - -static bool send(ipc::handle_t h, void const * data, std::size_t size, std::uint64_t tm) { - return send([tm](auto info, auto que, auto msg_id) { - return [tm, info, que, msg_id](std::int32_t remain, void const * data, std::size_t size) { - if (!wait_for(info->wt_waiter_, [&] { - return !que->push( - [](void*) { return true; }, - info->cc_id_, msg_id, remain, data, size); - }, tm)) { - ipc::log("force_push: msg_id = %zd, remain = %d, size = %zd\n", msg_id, remain, size); - if (!que->force_push( - clear_message, - info->cc_id_, msg_id, remain, data, size)) { - return false; - } - } - info->rd_waiter_.broadcast(); - return true; - }; - }, h, data, size); -} - -static bool try_send(ipc::handle_t h, void const * data, std::size_t size, std::uint64_t tm) { - return send([tm](auto info, auto que, auto msg_id) { - return [tm, info, que, msg_id](std::int32_t remain, void const * data, std::size_t size) { - if (!wait_for(info->wt_waiter_, [&] { - return !que->push( - [](void*) { return true; }, - info->cc_id_, msg_id, remain, data, size); - }, tm)) { - return false; - } - info->rd_waiter_.broadcast(); - return true; - }; - }, h, data, size); -} - -static ipc::buff_t recv(ipc::handle_t h, std::uint64_t tm) { - auto que = queue_of(h); - if (que == nullptr) { - ipc::error("fail: recv, queue_of(h) == nullptr\n"); - return {}; - } - if (!que->connected()) { - // hasn't connected yet, just return. - return {}; - } - auto& rc = info_of(h)->recv_cache(); - for (;;) { - // pop a new message - typename queue_t::value_t msg; - if (!wait_for(info_of(h)->rd_waiter_, [que, &msg] { - return !que->pop(msg); - }, tm)) { - // pop failed, just return. - return {}; - } - info_of(h)->wt_waiter_.broadcast(); - if ((info_of(h)->acc() != nullptr) && (msg.cc_id_ == info_of(h)->cc_id_)) { - continue; // ignore message to self - } - // msg.remain_ may minus & abs(msg.remain_) < data_length - std::int32_t r_size = static_cast(ipc::data_length) + msg.remain_; - if (r_size <= 0) { - ipc::error("fail: recv, r_size = %d\n", (int)r_size); - return {}; - } - std::size_t msg_size = static_cast(r_size); - // large message - if (msg.storage_) { - ipc::storage_id_t buf_id = *reinterpret_cast(&msg.data_); - void* buf = find_storage(buf_id, msg_size); - if (buf != nullptr) { - struct recycle_t { - ipc::storage_id_t storage_id; - ipc::circ::cc_t curr_conns; - ipc::circ::cc_t conn_id; - } *r_info = ipc::mem::alloc(recycle_t{ - buf_id, que->elems()->connections(std::memory_order_relaxed), que->connected_id() - }); - if (r_info == nullptr) { - ipc::log("fail: ipc::mem::alloc.\n"); - return ipc::buff_t{buf, msg_size}; // no recycle - } else { - return ipc::buff_t{buf, msg_size, [](void* p_info, std::size_t size) { - auto r_info = static_cast(p_info); - IPC_UNUSED_ auto finally = ipc::guard([r_info] { - ipc::mem::free(r_info); - }); - recycle_storage(r_info->storage_id, size, r_info->curr_conns, r_info->conn_id); - }, r_info}; - } - } else { - ipc::log("fail: shm::handle for large message. msg_id: %zd, buf_id: %zd, size: %zd\n", msg.id_, buf_id, msg_size); - continue; - } - } - // find cache with msg.id_ - auto cac_it = rc.find(msg.id_); - if (cac_it == rc.end()) { - if (msg_size <= ipc::data_length) { - return make_cache(msg.data_, msg_size); - } - // gc - if (rc.size() > 1024) { - std::vector need_del; - for (auto const & pair : rc) { - auto cmp = std::minmax(msg.id_, pair.first); - if (cmp.second - cmp.first > 8192) { - need_del.push_back(pair.first); - } - } - for (auto id : need_del) rc.erase(id); - } - // cache the first message fragment - rc.emplace(msg.id_, cache_t { ipc::data_length, make_cache(msg.data_, msg_size) }); - } - // has cached before this message - else { - auto& cac = cac_it->second; - // this is the last message fragment - if (msg.remain_ <= 0) { - cac.append(&(msg.data_), msg_size); - // finish this message, erase it from cache - auto buff = std::move(cac.buff_); - rc.erase(cac_it); - return buff; - } - // there are remain datas after this message - cac.append(&(msg.data_), ipc::data_length); - } - } -} - -static ipc::buff_t try_recv(ipc::handle_t h) { - return recv(h, 0); -} - -}; // detail_impl - -template -using policy_t = ipc::policy::choose; - -} // internal-linkage - -namespace ipc { - -template -ipc::handle_t chan_impl::inited() { - ipc::detail::waiter::init(); - return nullptr; -} - -template -bool chan_impl::connect(ipc::handle_t * ph, char const * name, unsigned mode) { - return detail_impl>::connect(ph, name, mode & receiver); -} - -template -bool chan_impl::reconnect(ipc::handle_t * ph, unsigned mode) { - return detail_impl>::reconnect(ph, mode & receiver); -} - -template -void chan_impl::disconnect(ipc::handle_t h) { - detail_impl>::disconnect(h); -} - -template -void chan_impl::destroy(ipc::handle_t h) { - detail_impl>::destroy(h); -} - -template -char const * chan_impl::name(ipc::handle_t h) { - auto info = detail_impl>::info_of(h); - return (info == nullptr) ? nullptr : info->name_.c_str(); -} - -template -std::size_t chan_impl::recv_count(ipc::handle_t h) { - return detail_impl>::recv_count(h); -} - -template -bool chan_impl::wait_for_recv(ipc::handle_t h, std::size_t r_count, std::uint64_t tm) { - return detail_impl>::wait_for_recv(h, r_count, tm); -} - -template -bool chan_impl::send(ipc::handle_t h, void const * data, std::size_t size, std::uint64_t tm) { - return detail_impl>::send(h, data, size, tm); -} - -template -buff_t chan_impl::recv(ipc::handle_t h, std::uint64_t tm) { - return detail_impl>::recv(h, tm); -} - -template -bool chan_impl::try_send(ipc::handle_t h, void const * data, std::size_t size, std::uint64_t tm) { - return detail_impl>::try_send(h, data, size, tm); -} - -template -buff_t chan_impl::try_recv(ipc::handle_t h) { - return detail_impl>::try_recv(h); -} - -template struct chan_impl>; -// template struct chan_impl>; // TBD -// template struct chan_impl>; // TBD -template struct chan_impl>; -template struct chan_impl>; - -} // namespace ipc diff --git a/spaces/SouthCity/ShuruiXu/crazy_functions/test_project/latex/attention/parameter_attention.tex b/spaces/SouthCity/ShuruiXu/crazy_functions/test_project/latex/attention/parameter_attention.tex deleted file mode 100644 index 7bc4fe452dbdbfe44ff72f0cdbd37acd5c786ce6..0000000000000000000000000000000000000000 --- a/spaces/SouthCity/ShuruiXu/crazy_functions/test_project/latex/attention/parameter_attention.tex +++ /dev/null @@ -1,45 +0,0 @@ -\pagebreak -\section*{Two Feed-Forward Layers = Attention over Parameters}\label{sec:parameter_attention} - -In addition to attention layers, our model contains position-wise feed-forward networks (Section \ref{sec:ffn}), which consist of two linear transformations with a ReLU activation in between. In fact, these networks too can be seen as a form of attention. Compare the formula for such a network with the formula for a simple dot-product attention layer (biases and scaling factors omitted): - -\begin{align*} - FFN(x, W_1, W_2) = ReLU(xW_1)W_2 \\ - A(q, K, V) = Softmax(qK^T)V -\end{align*} - -Based on the similarity of these formulae, the two-layer feed-forward network can be seen as a kind of attention, where the keys and values are the rows of the trainable parameter matrices $W_1$ and $W_2$, and where we use ReLU instead of Softmax in the compatibility function. - -%the compatablity function is $compat(q, k_i) = ReLU(q \cdot k_i)$ instead of $Softmax(qK_T)_i$. - -Given this similarity, we experimented with replacing the position-wise feed-forward networks with attention layers similar to the ones we use everywhere else our model. The multi-head-attention-over-parameters sublayer is identical to the multi-head attention described in \ref{sec:multihead}, except that the "keys" and "values" inputs to each attention head are trainable model parameters, as opposed to being linear projections of a previous layer. These parameters are scaled up by a factor of $\sqrt{d_{model}}$ in order to be more similar to activations. - -In our first experiment, we replaced each position-wise feed-forward network with a multi-head-attention-over-parameters sublayer with $h_p=8$ heads, key-dimensionality $d_{pk}=64$, and value-dimensionality $d_{pv}=64$, using $n_p=1536$ key-value pairs for each attention head. The sublayer has a total of $2097152$ parameters, including the parameters in the query projection and the output projection. This matches the number of parameters in the position-wise feed-forward network that we replaced. While the theoretical amount of computation is also the same, in practice, the attention version caused the step times to be about 30\% longer. - -In our second experiment, we used $h_p=8$ heads, and $n_p=512$ key-value pairs for each attention head, again matching the total number of parameters in the base model. - -Results for the first experiment were slightly worse than for the base model, and results for the second experiment were slightly better, see Table~\ref{tab:parameter_attention}. - -\begin{table}[h] -\caption{Replacing the position-wise feed-forward networks with multihead-attention-over-parameters produces similar results to the base model. All metrics are on the English-to-German translation development set, newstest2013.} -\label{tab:parameter_attention} -\begin{center} -\vspace{-2mm} -%\scalebox{1.0}{ -\begin{tabular}{c|cccccc|cccc} -\hline\rule{0pt}{2.0ex} - & \multirow{2}{*}{$\dmodel$} & \multirow{2}{*}{$\dff$} & -\multirow{2}{*}{$h_p$} & \multirow{2}{*}{$d_{pk}$} & \multirow{2}{*}{$d_{pv}$} & - \multirow{2}{*}{$n_p$} & - PPL & BLEU & params & training\\ - & & & & & & & (dev) & (dev) & $\times10^6$ & time \\ -\hline\rule{0pt}{2.0ex} -base & 512 & 2048 & & & & & 4.92 & 25.8 & 65 & 12 hours\\ -\hline\rule{0pt}{2.0ex} -AOP$_1$ & 512 & & 8 & 64 & 64 & 1536 & 4.92& 25.5 & 65 & 16 hours\\ -AOP$_2$ & 512 & & 16 & 64 & 64 & 512 & \textbf{4.86} & \textbf{25.9} & 65 & 16 hours \\ -\hline -\end{tabular} -%} -\end{center} -\end{table} diff --git a/spaces/SuYuanS/AudioCraft_Plus/CHANGELOG.md b/spaces/SuYuanS/AudioCraft_Plus/CHANGELOG.md deleted file mode 100644 index aabf9130b0a67aca9beaac9f2cb1a40237a4468d..0000000000000000000000000000000000000000 --- a/spaces/SuYuanS/AudioCraft_Plus/CHANGELOG.md +++ /dev/null @@ -1,28 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - -## [1.0.0] - 2023-08-02 - -Major revision, added training code for EnCodec, AudioGen, MusicGen, and MultiBandDiffusion. -Added pretrained model for AudioGen and MultiBandDiffusion. - -## [0.0.2] - 2023-08-01 - -Improved demo, fixed top p (thanks @jnordberg). - -Compressor tanh on output to avoid clipping with some style (especially piano). -Now repeating the conditioning periodically if it is too short. - -More options when launching Gradio app locally (thanks @ashleykleynhans). - -Testing out PyTorch 2.0 memory efficient attention. - -Added extended generation (infinite length) by slowly moving the windows. -Note that other implementations exist: https://github.com/camenduru/MusicGen-colab. - -## [0.0.1] - 2023-06-09 - -Initial release, with model evaluation only. diff --git a/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/altair/vegalite/data.py b/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/altair/vegalite/data.py deleted file mode 100644 index 30289160beb260a896f04812d1eb586eb7c306ea..0000000000000000000000000000000000000000 --- a/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/altair/vegalite/data.py +++ /dev/null @@ -1,45 +0,0 @@ -from toolz import curried -from ..utils.core import sanitize_dataframe -from ..utils.data import ( - MaxRowsError, - curry, - limit_rows, - pipe, - sample, - to_csv, - to_json, - to_values, - check_data_type, -) -from ..utils.data import DataTransformerRegistry as _DataTransformerRegistry - - -@curried.curry -def default_data_transformer(data, max_rows=5000): - return curried.pipe(data, limit_rows(max_rows=max_rows), to_values) - - -class DataTransformerRegistry(_DataTransformerRegistry): - def disable_max_rows(self): - """Disable the MaxRowsError.""" - options = self.options - if self.active == "default": - options = options.copy() - options["max_rows"] = None - return self.enable(**options) - - -__all__ = ( - "DataTransformerRegistry", - "MaxRowsError", - "curry", - "sanitize_dataframe", - "default_data_transformer", - "limit_rows", - "pipe", - "sample", - "to_csv", - "to_json", - "to_values", - "check_data_type", -) diff --git a/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/attr/validators.py b/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/attr/validators.py deleted file mode 100644 index 1488554f789526d8d85eb467250a64a64489362d..0000000000000000000000000000000000000000 --- a/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/attr/validators.py +++ /dev/null @@ -1,720 +0,0 @@ -# SPDX-License-Identifier: MIT - -""" -Commonly useful validators. -""" - - -import operator -import re - -from contextlib import contextmanager -from re import Pattern - -from ._config import get_run_validators, set_run_validators -from ._make import _AndValidator, and_, attrib, attrs -from .converters import default_if_none -from .exceptions import NotCallableError - - -__all__ = [ - "and_", - "deep_iterable", - "deep_mapping", - "disabled", - "ge", - "get_disabled", - "gt", - "in_", - "instance_of", - "is_callable", - "le", - "lt", - "matches_re", - "max_len", - "min_len", - "not_", - "optional", - "provides", - "set_disabled", -] - - -def set_disabled(disabled): - """ - Globally disable or enable running validators. - - By default, they are run. - - :param disabled: If ``True``, disable running all validators. - :type disabled: bool - - .. warning:: - - This function is not thread-safe! - - .. versionadded:: 21.3.0 - """ - set_run_validators(not disabled) - - -def get_disabled(): - """ - Return a bool indicating whether validators are currently disabled or not. - - :return: ``True`` if validators are currently disabled. - :rtype: bool - - .. versionadded:: 21.3.0 - """ - return not get_run_validators() - - -@contextmanager -def disabled(): - """ - Context manager that disables running validators within its context. - - .. warning:: - - This context manager is not thread-safe! - - .. versionadded:: 21.3.0 - """ - set_run_validators(False) - try: - yield - finally: - set_run_validators(True) - - -@attrs(repr=False, slots=True, hash=True) -class _InstanceOfValidator: - type = attrib() - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if not isinstance(value, self.type): - raise TypeError( - "'{name}' must be {type!r} (got {value!r} that is a " - "{actual!r}).".format( - name=attr.name, - type=self.type, - actual=value.__class__, - value=value, - ), - attr, - self.type, - value, - ) - - def __repr__(self): - return "".format( - type=self.type - ) - - -def instance_of(type): - """ - A validator that raises a `TypeError` if the initializer is called - with a wrong type for this particular attribute (checks are performed using - `isinstance` therefore it's also valid to pass a tuple of types). - - :param type: The type to check for. - :type type: type or tuple of type - - :raises TypeError: With a human readable error message, the attribute - (of type `attrs.Attribute`), the expected type, and the value it - got. - """ - return _InstanceOfValidator(type) - - -@attrs(repr=False, frozen=True, slots=True) -class _MatchesReValidator: - pattern = attrib() - match_func = attrib() - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if not self.match_func(value): - raise ValueError( - "'{name}' must match regex {pattern!r}" - " ({value!r} doesn't)".format( - name=attr.name, pattern=self.pattern.pattern, value=value - ), - attr, - self.pattern, - value, - ) - - def __repr__(self): - return "".format( - pattern=self.pattern - ) - - -def matches_re(regex, flags=0, func=None): - r""" - A validator that raises `ValueError` if the initializer is called - with a string that doesn't match *regex*. - - :param regex: a regex string or precompiled pattern to match against - :param int flags: flags that will be passed to the underlying re function - (default 0) - :param callable func: which underlying `re` function to call. Valid options - are `re.fullmatch`, `re.search`, and `re.match`; the default ``None`` - means `re.fullmatch`. For performance reasons, the pattern is always - precompiled using `re.compile`. - - .. versionadded:: 19.2.0 - .. versionchanged:: 21.3.0 *regex* can be a pre-compiled pattern. - """ - valid_funcs = (re.fullmatch, None, re.search, re.match) - if func not in valid_funcs: - raise ValueError( - "'func' must be one of {}.".format( - ", ".join( - sorted( - e and e.__name__ or "None" for e in set(valid_funcs) - ) - ) - ) - ) - - if isinstance(regex, Pattern): - if flags: - raise TypeError( - "'flags' can only be used with a string pattern; " - "pass flags to re.compile() instead" - ) - pattern = regex - else: - pattern = re.compile(regex, flags) - - if func is re.match: - match_func = pattern.match - elif func is re.search: - match_func = pattern.search - else: - match_func = pattern.fullmatch - - return _MatchesReValidator(pattern, match_func) - - -@attrs(repr=False, slots=True, hash=True) -class _ProvidesValidator: - interface = attrib() - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if not self.interface.providedBy(value): - raise TypeError( - "'{name}' must provide {interface!r} which {value!r} " - "doesn't.".format( - name=attr.name, interface=self.interface, value=value - ), - attr, - self.interface, - value, - ) - - def __repr__(self): - return "".format( - interface=self.interface - ) - - -def provides(interface): - """ - A validator that raises a `TypeError` if the initializer is called - with an object that does not provide the requested *interface* (checks are - performed using ``interface.providedBy(value)`` (see `zope.interface - `_). - - :param interface: The interface to check for. - :type interface: ``zope.interface.Interface`` - - :raises TypeError: With a human readable error message, the attribute - (of type `attrs.Attribute`), the expected interface, and the - value it got. - - .. deprecated:: 23.1.0 - """ - import warnings - - warnings.warn( - "attrs's zope-interface support is deprecated and will be removed in, " - "or after, April 2024.", - DeprecationWarning, - stacklevel=2, - ) - return _ProvidesValidator(interface) - - -@attrs(repr=False, slots=True, hash=True) -class _OptionalValidator: - validator = attrib() - - def __call__(self, inst, attr, value): - if value is None: - return - - self.validator(inst, attr, value) - - def __repr__(self): - return "".format( - what=repr(self.validator) - ) - - -def optional(validator): - """ - A validator that makes an attribute optional. An optional attribute is one - which can be set to ``None`` in addition to satisfying the requirements of - the sub-validator. - - :param Callable | tuple[Callable] | list[Callable] validator: A validator - (or validators) that is used for non-``None`` values. - - .. versionadded:: 15.1.0 - .. versionchanged:: 17.1.0 *validator* can be a list of validators. - .. versionchanged:: 23.1.0 *validator* can also be a tuple of validators. - """ - if isinstance(validator, (list, tuple)): - return _OptionalValidator(_AndValidator(validator)) - - return _OptionalValidator(validator) - - -@attrs(repr=False, slots=True, hash=True) -class _InValidator: - options = attrib() - - def __call__(self, inst, attr, value): - try: - in_options = value in self.options - except TypeError: # e.g. `1 in "abc"` - in_options = False - - if not in_options: - raise ValueError( - "'{name}' must be in {options!r} (got {value!r})".format( - name=attr.name, options=self.options, value=value - ), - attr, - self.options, - value, - ) - - def __repr__(self): - return "".format( - options=self.options - ) - - -def in_(options): - """ - A validator that raises a `ValueError` if the initializer is called - with a value that does not belong in the options provided. The check is - performed using ``value in options``. - - :param options: Allowed options. - :type options: list, tuple, `enum.Enum`, ... - - :raises ValueError: With a human readable error message, the attribute (of - type `attrs.Attribute`), the expected options, and the value it - got. - - .. versionadded:: 17.1.0 - .. versionchanged:: 22.1.0 - The ValueError was incomplete until now and only contained the human - readable error message. Now it contains all the information that has - been promised since 17.1.0. - """ - return _InValidator(options) - - -@attrs(repr=False, slots=False, hash=True) -class _IsCallableValidator: - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if not callable(value): - message = ( - "'{name}' must be callable " - "(got {value!r} that is a {actual!r})." - ) - raise NotCallableError( - msg=message.format( - name=attr.name, value=value, actual=value.__class__ - ), - value=value, - ) - - def __repr__(self): - return "" - - -def is_callable(): - """ - A validator that raises a `attrs.exceptions.NotCallableError` if the - initializer is called with a value for this particular attribute - that is not callable. - - .. versionadded:: 19.1.0 - - :raises attrs.exceptions.NotCallableError: With a human readable error - message containing the attribute (`attrs.Attribute`) name, - and the value it got. - """ - return _IsCallableValidator() - - -@attrs(repr=False, slots=True, hash=True) -class _DeepIterable: - member_validator = attrib(validator=is_callable()) - iterable_validator = attrib( - default=None, validator=optional(is_callable()) - ) - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if self.iterable_validator is not None: - self.iterable_validator(inst, attr, value) - - for member in value: - self.member_validator(inst, attr, member) - - def __repr__(self): - iterable_identifier = ( - "" - if self.iterable_validator is None - else f" {self.iterable_validator!r}" - ) - return ( - "" - ).format( - iterable_identifier=iterable_identifier, - member=self.member_validator, - ) - - -def deep_iterable(member_validator, iterable_validator=None): - """ - A validator that performs deep validation of an iterable. - - :param member_validator: Validator(s) to apply to iterable members - :param iterable_validator: Validator to apply to iterable itself - (optional) - - .. versionadded:: 19.1.0 - - :raises TypeError: if any sub-validators fail - """ - if isinstance(member_validator, (list, tuple)): - member_validator = and_(*member_validator) - return _DeepIterable(member_validator, iterable_validator) - - -@attrs(repr=False, slots=True, hash=True) -class _DeepMapping: - key_validator = attrib(validator=is_callable()) - value_validator = attrib(validator=is_callable()) - mapping_validator = attrib(default=None, validator=optional(is_callable())) - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if self.mapping_validator is not None: - self.mapping_validator(inst, attr, value) - - for key in value: - self.key_validator(inst, attr, key) - self.value_validator(inst, attr, value[key]) - - def __repr__(self): - return ( - "" - ).format(key=self.key_validator, value=self.value_validator) - - -def deep_mapping(key_validator, value_validator, mapping_validator=None): - """ - A validator that performs deep validation of a dictionary. - - :param key_validator: Validator to apply to dictionary keys - :param value_validator: Validator to apply to dictionary values - :param mapping_validator: Validator to apply to top-level mapping - attribute (optional) - - .. versionadded:: 19.1.0 - - :raises TypeError: if any sub-validators fail - """ - return _DeepMapping(key_validator, value_validator, mapping_validator) - - -@attrs(repr=False, frozen=True, slots=True) -class _NumberValidator: - bound = attrib() - compare_op = attrib() - compare_func = attrib() - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if not self.compare_func(value, self.bound): - raise ValueError( - "'{name}' must be {op} {bound}: {value}".format( - name=attr.name, - op=self.compare_op, - bound=self.bound, - value=value, - ) - ) - - def __repr__(self): - return "".format( - op=self.compare_op, bound=self.bound - ) - - -def lt(val): - """ - A validator that raises `ValueError` if the initializer is called - with a number larger or equal to *val*. - - :param val: Exclusive upper bound for values - - .. versionadded:: 21.3.0 - """ - return _NumberValidator(val, "<", operator.lt) - - -def le(val): - """ - A validator that raises `ValueError` if the initializer is called - with a number greater than *val*. - - :param val: Inclusive upper bound for values - - .. versionadded:: 21.3.0 - """ - return _NumberValidator(val, "<=", operator.le) - - -def ge(val): - """ - A validator that raises `ValueError` if the initializer is called - with a number smaller than *val*. - - :param val: Inclusive lower bound for values - - .. versionadded:: 21.3.0 - """ - return _NumberValidator(val, ">=", operator.ge) - - -def gt(val): - """ - A validator that raises `ValueError` if the initializer is called - with a number smaller or equal to *val*. - - :param val: Exclusive lower bound for values - - .. versionadded:: 21.3.0 - """ - return _NumberValidator(val, ">", operator.gt) - - -@attrs(repr=False, frozen=True, slots=True) -class _MaxLengthValidator: - max_length = attrib() - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if len(value) > self.max_length: - raise ValueError( - "Length of '{name}' must be <= {max}: {len}".format( - name=attr.name, max=self.max_length, len=len(value) - ) - ) - - def __repr__(self): - return f"" - - -def max_len(length): - """ - A validator that raises `ValueError` if the initializer is called - with a string or iterable that is longer than *length*. - - :param int length: Maximum length of the string or iterable - - .. versionadded:: 21.3.0 - """ - return _MaxLengthValidator(length) - - -@attrs(repr=False, frozen=True, slots=True) -class _MinLengthValidator: - min_length = attrib() - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if len(value) < self.min_length: - raise ValueError( - "Length of '{name}' must be => {min}: {len}".format( - name=attr.name, min=self.min_length, len=len(value) - ) - ) - - def __repr__(self): - return f"" - - -def min_len(length): - """ - A validator that raises `ValueError` if the initializer is called - with a string or iterable that is shorter than *length*. - - :param int length: Minimum length of the string or iterable - - .. versionadded:: 22.1.0 - """ - return _MinLengthValidator(length) - - -@attrs(repr=False, slots=True, hash=True) -class _SubclassOfValidator: - type = attrib() - - def __call__(self, inst, attr, value): - """ - We use a callable class to be able to change the ``__repr__``. - """ - if not issubclass(value, self.type): - raise TypeError( - "'{name}' must be a subclass of {type!r} " - "(got {value!r}).".format( - name=attr.name, - type=self.type, - value=value, - ), - attr, - self.type, - value, - ) - - def __repr__(self): - return "".format( - type=self.type - ) - - -def _subclass_of(type): - """ - A validator that raises a `TypeError` if the initializer is called - with a wrong type for this particular attribute (checks are performed using - `issubclass` therefore it's also valid to pass a tuple of types). - - :param type: The type to check for. - :type type: type or tuple of types - - :raises TypeError: With a human readable error message, the attribute - (of type `attrs.Attribute`), the expected type, and the value it - got. - """ - return _SubclassOfValidator(type) - - -@attrs(repr=False, slots=True, hash=True) -class _NotValidator: - validator = attrib() - msg = attrib( - converter=default_if_none( - "not_ validator child '{validator!r}' " - "did not raise a captured error" - ) - ) - exc_types = attrib( - validator=deep_iterable( - member_validator=_subclass_of(Exception), - iterable_validator=instance_of(tuple), - ), - ) - - def __call__(self, inst, attr, value): - try: - self.validator(inst, attr, value) - except self.exc_types: - pass # suppress error to invert validity - else: - raise ValueError( - self.msg.format( - validator=self.validator, - exc_types=self.exc_types, - ), - attr, - self.validator, - value, - self.exc_types, - ) - - def __repr__(self): - return ( - "" - ).format( - what=self.validator, - exc_types=self.exc_types, - ) - - -def not_(validator, *, msg=None, exc_types=(ValueError, TypeError)): - """ - A validator that wraps and logically 'inverts' the validator passed to it. - It will raise a `ValueError` if the provided validator *doesn't* raise a - `ValueError` or `TypeError` (by default), and will suppress the exception - if the provided validator *does*. - - Intended to be used with existing validators to compose logic without - needing to create inverted variants, for example, ``not_(in_(...))``. - - :param validator: A validator to be logically inverted. - :param msg: Message to raise if validator fails. - Formatted with keys ``exc_types`` and ``validator``. - :type msg: str - :param exc_types: Exception type(s) to capture. - Other types raised by child validators will not be intercepted and - pass through. - - :raises ValueError: With a human readable error message, - the attribute (of type `attrs.Attribute`), - the validator that failed to raise an exception, - the value it got, - and the expected exception types. - - .. versionadded:: 22.2.0 - """ - try: - exc_types = tuple(exc_types) - except TypeError: - exc_types = (exc_types,) - return _NotValidator(validator, msg, exc_types) diff --git a/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py b/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py deleted file mode 100644 index ee3527c50d34e274d59127f99778e76db2889a92..0000000000000000000000000000000000000000 --- a/spaces/SungBeom/chatwine-korean/.venv/Lib/site-packages/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_import_class.py +++ /dev/null @@ -1,68 +0,0 @@ -#Note: code gotten from _pydev_imports_tipper. - -import sys - -def _imp(name, log=None): - try: - return __import__(name) - except: - if '.' in name: - sub = name[0:name.rfind('.')] - - if log is not None: - log.add_content('Unable to import', name, 'trying with', sub) - log.add_exception() - - return _imp(sub, log) - else: - s = 'Unable to import module: %s - sys.path: %s' % (str(name), sys.path) - if log is not None: - log.add_content(s) - log.add_exception() - - raise ImportError(s) - - -IS_IPY = False -if sys.platform == 'cli': - IS_IPY = True - _old_imp = _imp - def _imp(name, log=None): - #We must add a reference in clr for .Net - import clr #@UnresolvedImport - initial_name = name - while '.' in name: - try: - clr.AddReference(name) - break #If it worked, that's OK. - except: - name = name[0:name.rfind('.')] - else: - try: - clr.AddReference(name) - except: - pass #That's OK (not dot net module). - - return _old_imp(initial_name, log) - - -def import_name(name, log=None): - mod = _imp(name, log) - - components = name.split('.') - - old_comp = None - for comp in components[1:]: - try: - #this happens in the following case: - #we have mx.DateTime.mxDateTime.mxDateTime.pyd - #but after importing it, mx.DateTime.mxDateTime shadows access to mxDateTime.pyd - mod = getattr(mod, comp) - except AttributeError: - if old_comp != comp: - raise - - old_comp = comp - - return mod - diff --git a/spaces/Superlang/ImageProcessor/annotator/oneformer/detectron2/modeling/test_time_augmentation.py b/spaces/Superlang/ImageProcessor/annotator/oneformer/detectron2/modeling/test_time_augmentation.py deleted file mode 100644 index 625f8ba9a01275df64967c097912538337ec91dc..0000000000000000000000000000000000000000 --- a/spaces/Superlang/ImageProcessor/annotator/oneformer/detectron2/modeling/test_time_augmentation.py +++ /dev/null @@ -1,307 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -import copy -import numpy as np -from contextlib import contextmanager -from itertools import count -from typing import List -import torch -from fvcore.transforms import HFlipTransform, NoOpTransform -from torch import nn -from torch.nn.parallel import DistributedDataParallel - -from annotator.oneformer.detectron2.config import configurable -from annotator.oneformer.detectron2.data.detection_utils import read_image -from annotator.oneformer.detectron2.data.transforms import ( - RandomFlip, - ResizeShortestEdge, - ResizeTransform, - apply_augmentations, -) -from annotator.oneformer.detectron2.structures import Boxes, Instances - -from .meta_arch import GeneralizedRCNN -from .postprocessing import detector_postprocess -from .roi_heads.fast_rcnn import fast_rcnn_inference_single_image - -__all__ = ["DatasetMapperTTA", "GeneralizedRCNNWithTTA"] - - -class DatasetMapperTTA: - """ - Implement test-time augmentation for detection data. - It is a callable which takes a dataset dict from a detection dataset, - and returns a list of dataset dicts where the images - are augmented from the input image by the transformations defined in the config. - This is used for test-time augmentation. - """ - - @configurable - def __init__(self, min_sizes: List[int], max_size: int, flip: bool): - """ - Args: - min_sizes: list of short-edge size to resize the image to - max_size: maximum height or width of resized images - flip: whether to apply flipping augmentation - """ - self.min_sizes = min_sizes - self.max_size = max_size - self.flip = flip - - @classmethod - def from_config(cls, cfg): - return { - "min_sizes": cfg.TEST.AUG.MIN_SIZES, - "max_size": cfg.TEST.AUG.MAX_SIZE, - "flip": cfg.TEST.AUG.FLIP, - } - - def __call__(self, dataset_dict): - """ - Args: - dict: a dict in standard model input format. See tutorials for details. - - Returns: - list[dict]: - a list of dicts, which contain augmented version of the input image. - The total number of dicts is ``len(min_sizes) * (2 if flip else 1)``. - Each dict has field "transforms" which is a TransformList, - containing the transforms that are used to generate this image. - """ - numpy_image = dataset_dict["image"].permute(1, 2, 0).numpy() - shape = numpy_image.shape - orig_shape = (dataset_dict["height"], dataset_dict["width"]) - if shape[:2] != orig_shape: - # It transforms the "original" image in the dataset to the input image - pre_tfm = ResizeTransform(orig_shape[0], orig_shape[1], shape[0], shape[1]) - else: - pre_tfm = NoOpTransform() - - # Create all combinations of augmentations to use - aug_candidates = [] # each element is a list[Augmentation] - for min_size in self.min_sizes: - resize = ResizeShortestEdge(min_size, self.max_size) - aug_candidates.append([resize]) # resize only - if self.flip: - flip = RandomFlip(prob=1.0) - aug_candidates.append([resize, flip]) # resize + flip - - # Apply all the augmentations - ret = [] - for aug in aug_candidates: - new_image, tfms = apply_augmentations(aug, np.copy(numpy_image)) - torch_image = torch.from_numpy(np.ascontiguousarray(new_image.transpose(2, 0, 1))) - - dic = copy.deepcopy(dataset_dict) - dic["transforms"] = pre_tfm + tfms - dic["image"] = torch_image - ret.append(dic) - return ret - - -class GeneralizedRCNNWithTTA(nn.Module): - """ - A GeneralizedRCNN with test-time augmentation enabled. - Its :meth:`__call__` method has the same interface as :meth:`GeneralizedRCNN.forward`. - """ - - def __init__(self, cfg, model, tta_mapper=None, batch_size=3): - """ - Args: - cfg (CfgNode): - model (GeneralizedRCNN): a GeneralizedRCNN to apply TTA on. - tta_mapper (callable): takes a dataset dict and returns a list of - augmented versions of the dataset dict. Defaults to - `DatasetMapperTTA(cfg)`. - batch_size (int): batch the augmented images into this batch size for inference. - """ - super().__init__() - if isinstance(model, DistributedDataParallel): - model = model.module - assert isinstance( - model, GeneralizedRCNN - ), "TTA is only supported on GeneralizedRCNN. Got a model of type {}".format(type(model)) - self.cfg = cfg.clone() - assert not self.cfg.MODEL.KEYPOINT_ON, "TTA for keypoint is not supported yet" - assert ( - not self.cfg.MODEL.LOAD_PROPOSALS - ), "TTA for pre-computed proposals is not supported yet" - - self.model = model - - if tta_mapper is None: - tta_mapper = DatasetMapperTTA(cfg) - self.tta_mapper = tta_mapper - self.batch_size = batch_size - - @contextmanager - def _turn_off_roi_heads(self, attrs): - """ - Open a context where some heads in `model.roi_heads` are temporarily turned off. - Args: - attr (list[str]): the attribute in `model.roi_heads` which can be used - to turn off a specific head, e.g., "mask_on", "keypoint_on". - """ - roi_heads = self.model.roi_heads - old = {} - for attr in attrs: - try: - old[attr] = getattr(roi_heads, attr) - except AttributeError: - # The head may not be implemented in certain ROIHeads - pass - - if len(old.keys()) == 0: - yield - else: - for attr in old.keys(): - setattr(roi_heads, attr, False) - yield - for attr in old.keys(): - setattr(roi_heads, attr, old[attr]) - - def _batch_inference(self, batched_inputs, detected_instances=None): - """ - Execute inference on a list of inputs, - using batch size = self.batch_size, instead of the length of the list. - - Inputs & outputs have the same format as :meth:`GeneralizedRCNN.inference` - """ - if detected_instances is None: - detected_instances = [None] * len(batched_inputs) - - outputs = [] - inputs, instances = [], [] - for idx, input, instance in zip(count(), batched_inputs, detected_instances): - inputs.append(input) - instances.append(instance) - if len(inputs) == self.batch_size or idx == len(batched_inputs) - 1: - outputs.extend( - self.model.inference( - inputs, - instances if instances[0] is not None else None, - do_postprocess=False, - ) - ) - inputs, instances = [], [] - return outputs - - def __call__(self, batched_inputs): - """ - Same input/output format as :meth:`GeneralizedRCNN.forward` - """ - - def _maybe_read_image(dataset_dict): - ret = copy.copy(dataset_dict) - if "image" not in ret: - image = read_image(ret.pop("file_name"), self.model.input_format) - image = torch.from_numpy(np.ascontiguousarray(image.transpose(2, 0, 1))) # CHW - ret["image"] = image - if "height" not in ret and "width" not in ret: - ret["height"] = image.shape[1] - ret["width"] = image.shape[2] - return ret - - return [self._inference_one_image(_maybe_read_image(x)) for x in batched_inputs] - - def _inference_one_image(self, input): - """ - Args: - input (dict): one dataset dict with "image" field being a CHW tensor - - Returns: - dict: one output dict - """ - orig_shape = (input["height"], input["width"]) - augmented_inputs, tfms = self._get_augmented_inputs(input) - # Detect boxes from all augmented versions - with self._turn_off_roi_heads(["mask_on", "keypoint_on"]): - # temporarily disable roi heads - all_boxes, all_scores, all_classes = self._get_augmented_boxes(augmented_inputs, tfms) - # merge all detected boxes to obtain final predictions for boxes - merged_instances = self._merge_detections(all_boxes, all_scores, all_classes, orig_shape) - - if self.cfg.MODEL.MASK_ON: - # Use the detected boxes to obtain masks - augmented_instances = self._rescale_detected_boxes( - augmented_inputs, merged_instances, tfms - ) - # run forward on the detected boxes - outputs = self._batch_inference(augmented_inputs, augmented_instances) - # Delete now useless variables to avoid being out of memory - del augmented_inputs, augmented_instances - # average the predictions - merged_instances.pred_masks = self._reduce_pred_masks(outputs, tfms) - merged_instances = detector_postprocess(merged_instances, *orig_shape) - return {"instances": merged_instances} - else: - return {"instances": merged_instances} - - def _get_augmented_inputs(self, input): - augmented_inputs = self.tta_mapper(input) - tfms = [x.pop("transforms") for x in augmented_inputs] - return augmented_inputs, tfms - - def _get_augmented_boxes(self, augmented_inputs, tfms): - # 1: forward with all augmented images - outputs = self._batch_inference(augmented_inputs) - # 2: union the results - all_boxes = [] - all_scores = [] - all_classes = [] - for output, tfm in zip(outputs, tfms): - # Need to inverse the transforms on boxes, to obtain results on original image - pred_boxes = output.pred_boxes.tensor - original_pred_boxes = tfm.inverse().apply_box(pred_boxes.cpu().numpy()) - all_boxes.append(torch.from_numpy(original_pred_boxes).to(pred_boxes.device)) - - all_scores.extend(output.scores) - all_classes.extend(output.pred_classes) - all_boxes = torch.cat(all_boxes, dim=0) - return all_boxes, all_scores, all_classes - - def _merge_detections(self, all_boxes, all_scores, all_classes, shape_hw): - # select from the union of all results - num_boxes = len(all_boxes) - num_classes = self.cfg.MODEL.ROI_HEADS.NUM_CLASSES - # +1 because fast_rcnn_inference expects background scores as well - all_scores_2d = torch.zeros(num_boxes, num_classes + 1, device=all_boxes.device) - for idx, cls, score in zip(count(), all_classes, all_scores): - all_scores_2d[idx, cls] = score - - merged_instances, _ = fast_rcnn_inference_single_image( - all_boxes, - all_scores_2d, - shape_hw, - 1e-8, - self.cfg.MODEL.ROI_HEADS.NMS_THRESH_TEST, - self.cfg.TEST.DETECTIONS_PER_IMAGE, - ) - - return merged_instances - - def _rescale_detected_boxes(self, augmented_inputs, merged_instances, tfms): - augmented_instances = [] - for input, tfm in zip(augmented_inputs, tfms): - # Transform the target box to the augmented image's coordinate space - pred_boxes = merged_instances.pred_boxes.tensor.cpu().numpy() - pred_boxes = torch.from_numpy(tfm.apply_box(pred_boxes)) - - aug_instances = Instances( - image_size=input["image"].shape[1:3], - pred_boxes=Boxes(pred_boxes), - pred_classes=merged_instances.pred_classes, - scores=merged_instances.scores, - ) - augmented_instances.append(aug_instances) - return augmented_instances - - def _reduce_pred_masks(self, outputs, tfms): - # Should apply inverse transforms on masks. - # We assume only resize & flip are used. pred_masks is a scale-invariant - # representation, so we handle flip specially - for output, tfm in zip(outputs, tfms): - if any(isinstance(t, HFlipTransform) for t in tfm.transforms): - output.pred_masks = output.pred_masks.flip(dims=[3]) - all_pred_masks = torch.stack([o.pred_masks for o in outputs], dim=0) - avg_pred_masks = torch.mean(all_pred_masks, dim=0) - return avg_pred_masks diff --git a/spaces/Superlang/ImageProcessor/annotator/oneformer/detectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py b/spaces/Superlang/ImageProcessor/annotator/oneformer/detectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py deleted file mode 100644 index eecfe2f31e65147aec47704b9e775e82d9f5fa9a..0000000000000000000000000000000000000000 --- a/spaces/Superlang/ImageProcessor/annotator/oneformer/detectron2/tracking/vanilla_hungarian_bbox_iou_tracker.py +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env python3 -# Copyright 2004-present Facebook. All Rights Reserved. - -import numpy as np -from typing import List - -from annotator.oneformer.detectron2.config import CfgNode as CfgNode_ -from annotator.oneformer.detectron2.config import configurable -from annotator.oneformer.detectron2.structures import Instances -from annotator.oneformer.detectron2.structures.boxes import pairwise_iou -from annotator.oneformer.detectron2.tracking.utils import LARGE_COST_VALUE, create_prediction_pairs - -from .base_tracker import TRACKER_HEADS_REGISTRY -from .hungarian_tracker import BaseHungarianTracker - - -@TRACKER_HEADS_REGISTRY.register() -class VanillaHungarianBBoxIOUTracker(BaseHungarianTracker): - """ - Hungarian algo based tracker using bbox iou as metric - """ - - @configurable - def __init__( - self, - *, - video_height: int, - video_width: int, - max_num_instances: int = 200, - max_lost_frame_count: int = 0, - min_box_rel_dim: float = 0.02, - min_instance_period: int = 1, - track_iou_threshold: float = 0.5, - **kwargs, - ): - """ - Args: - video_height: height the video frame - video_width: width of the video frame - max_num_instances: maximum number of id allowed to be tracked - max_lost_frame_count: maximum number of frame an id can lost tracking - exceed this number, an id is considered as lost - forever - min_box_rel_dim: a percentage, smaller than this dimension, a bbox is - removed from tracking - min_instance_period: an instance will be shown after this number of period - since its first showing up in the video - track_iou_threshold: iou threshold, below this number a bbox pair is removed - from tracking - """ - super().__init__( - video_height=video_height, - video_width=video_width, - max_num_instances=max_num_instances, - max_lost_frame_count=max_lost_frame_count, - min_box_rel_dim=min_box_rel_dim, - min_instance_period=min_instance_period, - ) - self._track_iou_threshold = track_iou_threshold - - @classmethod - def from_config(cls, cfg: CfgNode_): - """ - Old style initialization using CfgNode - - Args: - cfg: D2 CfgNode, config file - Return: - dictionary storing arguments for __init__ method - """ - assert "VIDEO_HEIGHT" in cfg.TRACKER_HEADS - assert "VIDEO_WIDTH" in cfg.TRACKER_HEADS - video_height = cfg.TRACKER_HEADS.get("VIDEO_HEIGHT") - video_width = cfg.TRACKER_HEADS.get("VIDEO_WIDTH") - max_num_instances = cfg.TRACKER_HEADS.get("MAX_NUM_INSTANCES", 200) - max_lost_frame_count = cfg.TRACKER_HEADS.get("MAX_LOST_FRAME_COUNT", 0) - min_box_rel_dim = cfg.TRACKER_HEADS.get("MIN_BOX_REL_DIM", 0.02) - min_instance_period = cfg.TRACKER_HEADS.get("MIN_INSTANCE_PERIOD", 1) - track_iou_threshold = cfg.TRACKER_HEADS.get("TRACK_IOU_THRESHOLD", 0.5) - return { - "_target_": "detectron2.tracking.vanilla_hungarian_bbox_iou_tracker.VanillaHungarianBBoxIOUTracker", # noqa - "video_height": video_height, - "video_width": video_width, - "max_num_instances": max_num_instances, - "max_lost_frame_count": max_lost_frame_count, - "min_box_rel_dim": min_box_rel_dim, - "min_instance_period": min_instance_period, - "track_iou_threshold": track_iou_threshold, - } - - def build_cost_matrix(self, instances: Instances, prev_instances: Instances) -> np.ndarray: - """ - Build the cost matrix for assignment problem - (https://en.wikipedia.org/wiki/Assignment_problem) - - Args: - instances: D2 Instances, for current frame predictions - prev_instances: D2 Instances, for previous frame predictions - - Return: - the cost matrix in numpy array - """ - assert instances is not None and prev_instances is not None - # calculate IoU of all bbox pairs - iou_all = pairwise_iou( - boxes1=instances.pred_boxes, - boxes2=self._prev_instances.pred_boxes, - ) - bbox_pairs = create_prediction_pairs( - instances, self._prev_instances, iou_all, threshold=self._track_iou_threshold - ) - # assign large cost value to make sure pair below IoU threshold won't be matched - cost_matrix = np.full((len(instances), len(prev_instances)), LARGE_COST_VALUE) - return self.assign_cost_matrix_values(cost_matrix, bbox_pairs) - - def assign_cost_matrix_values(self, cost_matrix: np.ndarray, bbox_pairs: List) -> np.ndarray: - """ - Based on IoU for each pair of bbox, assign the associated value in cost matrix - - Args: - cost_matrix: np.ndarray, initialized 2D array with target dimensions - bbox_pairs: list of bbox pair, in each pair, iou value is stored - Return: - np.ndarray, cost_matrix with assigned values - """ - for pair in bbox_pairs: - # assign -1 for IoU above threshold pairs, algorithms will minimize cost - cost_matrix[pair["idx"]][pair["prev_idx"]] = -1 - return cost_matrix diff --git a/spaces/TandCAcceptMe/face-swap-docker/mynewshinyroop/Lib/site-packages/pip/_internal/vcs/git.py b/spaces/TandCAcceptMe/face-swap-docker/mynewshinyroop/Lib/site-packages/pip/_internal/vcs/git.py deleted file mode 100644 index 8d1d499376744954308bdf96f80e5b5a39a24195..0000000000000000000000000000000000000000 --- a/spaces/TandCAcceptMe/face-swap-docker/mynewshinyroop/Lib/site-packages/pip/_internal/vcs/git.py +++ /dev/null @@ -1,526 +0,0 @@ -import logging -import os.path -import pathlib -import re -import urllib.parse -import urllib.request -from typing import List, Optional, Tuple - -from pip._internal.exceptions import BadCommand, InstallationError -from pip._internal.utils.misc import HiddenText, display_path, hide_url -from pip._internal.utils.subprocess import make_command -from pip._internal.vcs.versioncontrol import ( - AuthInfo, - RemoteNotFoundError, - RemoteNotValidError, - RevOptions, - VersionControl, - find_path_to_project_root_from_repo_root, - vcs, -) - -urlsplit = urllib.parse.urlsplit -urlunsplit = urllib.parse.urlunsplit - - -logger = logging.getLogger(__name__) - - -GIT_VERSION_REGEX = re.compile( - r"^git version " # Prefix. - r"(\d+)" # Major. - r"\.(\d+)" # Dot, minor. - r"(?:\.(\d+))?" # Optional dot, patch. - r".*$" # Suffix, including any pre- and post-release segments we don't care about. -) - -HASH_REGEX = re.compile("^[a-fA-F0-9]{40}$") - -# SCP (Secure copy protocol) shorthand. e.g. 'git@example.com:foo/bar.git' -SCP_REGEX = re.compile( - r"""^ - # Optional user, e.g. 'git@' - (\w+@)? - # Server, e.g. 'github.com'. - ([^/:]+): - # The server-side path. e.g. 'user/project.git'. Must start with an - # alphanumeric character so as not to be confusable with a Windows paths - # like 'C:/foo/bar' or 'C:\foo\bar'. - (\w[^:]*) - $""", - re.VERBOSE, -) - - -def looks_like_hash(sha: str) -> bool: - return bool(HASH_REGEX.match(sha)) - - -class Git(VersionControl): - name = "git" - dirname = ".git" - repo_name = "clone" - schemes = ( - "git+http", - "git+https", - "git+ssh", - "git+git", - "git+file", - ) - # Prevent the user's environment variables from interfering with pip: - # https://github.com/pypa/pip/issues/1130 - unset_environ = ("GIT_DIR", "GIT_WORK_TREE") - default_arg_rev = "HEAD" - - @staticmethod - def get_base_rev_args(rev: str) -> List[str]: - return [rev] - - def is_immutable_rev_checkout(self, url: str, dest: str) -> bool: - _, rev_options = self.get_url_rev_options(hide_url(url)) - if not rev_options.rev: - return False - if not self.is_commit_id_equal(dest, rev_options.rev): - # the current commit is different from rev, - # which means rev was something else than a commit hash - return False - # return False in the rare case rev is both a commit hash - # and a tag or a branch; we don't want to cache in that case - # because that branch/tag could point to something else in the future - is_tag_or_branch = bool(self.get_revision_sha(dest, rev_options.rev)[0]) - return not is_tag_or_branch - - def get_git_version(self) -> Tuple[int, ...]: - version = self.run_command( - ["version"], - command_desc="git version", - show_stdout=False, - stdout_only=True, - ) - match = GIT_VERSION_REGEX.match(version) - if not match: - logger.warning("Can't parse git version: %s", version) - return () - return tuple(int(c) for c in match.groups()) - - @classmethod - def get_current_branch(cls, location: str) -> Optional[str]: - """ - Return the current branch, or None if HEAD isn't at a branch - (e.g. detached HEAD). - """ - # git-symbolic-ref exits with empty stdout if "HEAD" is a detached - # HEAD rather than a symbolic ref. In addition, the -q causes the - # command to exit with status code 1 instead of 128 in this case - # and to suppress the message to stderr. - args = ["symbolic-ref", "-q", "HEAD"] - output = cls.run_command( - args, - extra_ok_returncodes=(1,), - show_stdout=False, - stdout_only=True, - cwd=location, - ) - ref = output.strip() - - if ref.startswith("refs/heads/"): - return ref[len("refs/heads/") :] - - return None - - @classmethod - def get_revision_sha(cls, dest: str, rev: str) -> Tuple[Optional[str], bool]: - """ - Return (sha_or_none, is_branch), where sha_or_none is a commit hash - if the revision names a remote branch or tag, otherwise None. - - Args: - dest: the repository directory. - rev: the revision name. - """ - # Pass rev to pre-filter the list. - output = cls.run_command( - ["show-ref", rev], - cwd=dest, - show_stdout=False, - stdout_only=True, - on_returncode="ignore", - ) - refs = {} - # NOTE: We do not use splitlines here since that would split on other - # unicode separators, which can be maliciously used to install a - # different revision. - for line in output.strip().split("\n"): - line = line.rstrip("\r") - if not line: - continue - try: - ref_sha, ref_name = line.split(" ", maxsplit=2) - except ValueError: - # Include the offending line to simplify troubleshooting if - # this error ever occurs. - raise ValueError(f"unexpected show-ref line: {line!r}") - - refs[ref_name] = ref_sha - - branch_ref = f"refs/remotes/origin/{rev}" - tag_ref = f"refs/tags/{rev}" - - sha = refs.get(branch_ref) - if sha is not None: - return (sha, True) - - sha = refs.get(tag_ref) - - return (sha, False) - - @classmethod - def _should_fetch(cls, dest: str, rev: str) -> bool: - """ - Return true if rev is a ref or is a commit that we don't have locally. - - Branches and tags are not considered in this method because they are - assumed to be always available locally (which is a normal outcome of - ``git clone`` and ``git fetch --tags``). - """ - if rev.startswith("refs/"): - # Always fetch remote refs. - return True - - if not looks_like_hash(rev): - # Git fetch would fail with abbreviated commits. - return False - - if cls.has_commit(dest, rev): - # Don't fetch if we have the commit locally. - return False - - return True - - @classmethod - def resolve_revision( - cls, dest: str, url: HiddenText, rev_options: RevOptions - ) -> RevOptions: - """ - Resolve a revision to a new RevOptions object with the SHA1 of the - branch, tag, or ref if found. - - Args: - rev_options: a RevOptions object. - """ - rev = rev_options.arg_rev - # The arg_rev property's implementation for Git ensures that the - # rev return value is always non-None. - assert rev is not None - - sha, is_branch = cls.get_revision_sha(dest, rev) - - if sha is not None: - rev_options = rev_options.make_new(sha) - rev_options.branch_name = rev if is_branch else None - - return rev_options - - # Do not show a warning for the common case of something that has - # the form of a Git commit hash. - if not looks_like_hash(rev): - logger.warning( - "Did not find branch or tag '%s', assuming revision or ref.", - rev, - ) - - if not cls._should_fetch(dest, rev): - return rev_options - - # fetch the requested revision - cls.run_command( - make_command("fetch", "-q", url, rev_options.to_args()), - cwd=dest, - ) - # Change the revision to the SHA of the ref we fetched - sha = cls.get_revision(dest, rev="FETCH_HEAD") - rev_options = rev_options.make_new(sha) - - return rev_options - - @classmethod - def is_commit_id_equal(cls, dest: str, name: Optional[str]) -> bool: - """ - Return whether the current commit hash equals the given name. - - Args: - dest: the repository directory. - name: a string name. - """ - if not name: - # Then avoid an unnecessary subprocess call. - return False - - return cls.get_revision(dest) == name - - def fetch_new( - self, dest: str, url: HiddenText, rev_options: RevOptions, verbosity: int - ) -> None: - rev_display = rev_options.to_display() - logger.info("Cloning %s%s to %s", url, rev_display, display_path(dest)) - if verbosity <= 0: - flags: Tuple[str, ...] = ("--quiet",) - elif verbosity == 1: - flags = () - else: - flags = ("--verbose", "--progress") - if self.get_git_version() >= (2, 17): - # Git added support for partial clone in 2.17 - # https://git-scm.com/docs/partial-clone - # Speeds up cloning by functioning without a complete copy of repository - self.run_command( - make_command( - "clone", - "--filter=blob:none", - *flags, - url, - dest, - ) - ) - else: - self.run_command(make_command("clone", *flags, url, dest)) - - if rev_options.rev: - # Then a specific revision was requested. - rev_options = self.resolve_revision(dest, url, rev_options) - branch_name = getattr(rev_options, "branch_name", None) - logger.debug("Rev options %s, branch_name %s", rev_options, branch_name) - if branch_name is None: - # Only do a checkout if the current commit id doesn't match - # the requested revision. - if not self.is_commit_id_equal(dest, rev_options.rev): - cmd_args = make_command( - "checkout", - "-q", - rev_options.to_args(), - ) - self.run_command(cmd_args, cwd=dest) - elif self.get_current_branch(dest) != branch_name: - # Then a specific branch was requested, and that branch - # is not yet checked out. - track_branch = f"origin/{branch_name}" - cmd_args = [ - "checkout", - "-b", - branch_name, - "--track", - track_branch, - ] - self.run_command(cmd_args, cwd=dest) - else: - sha = self.get_revision(dest) - rev_options = rev_options.make_new(sha) - - logger.info("Resolved %s to commit %s", url, rev_options.rev) - - #: repo may contain submodules - self.update_submodules(dest) - - def switch(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None: - self.run_command( - make_command("config", "remote.origin.url", url), - cwd=dest, - ) - cmd_args = make_command("checkout", "-q", rev_options.to_args()) - self.run_command(cmd_args, cwd=dest) - - self.update_submodules(dest) - - def update(self, dest: str, url: HiddenText, rev_options: RevOptions) -> None: - # First fetch changes from the default remote - if self.get_git_version() >= (1, 9): - # fetch tags in addition to everything else - self.run_command(["fetch", "-q", "--tags"], cwd=dest) - else: - self.run_command(["fetch", "-q"], cwd=dest) - # Then reset to wanted revision (maybe even origin/master) - rev_options = self.resolve_revision(dest, url, rev_options) - cmd_args = make_command("reset", "--hard", "-q", rev_options.to_args()) - self.run_command(cmd_args, cwd=dest) - #: update submodules - self.update_submodules(dest) - - @classmethod - def get_remote_url(cls, location: str) -> str: - """ - Return URL of the first remote encountered. - - Raises RemoteNotFoundError if the repository does not have a remote - url configured. - """ - # We need to pass 1 for extra_ok_returncodes since the command - # exits with return code 1 if there are no matching lines. - stdout = cls.run_command( - ["config", "--get-regexp", r"remote\..*\.url"], - extra_ok_returncodes=(1,), - show_stdout=False, - stdout_only=True, - cwd=location, - ) - remotes = stdout.splitlines() - try: - found_remote = remotes[0] - except IndexError: - raise RemoteNotFoundError - - for remote in remotes: - if remote.startswith("remote.origin.url "): - found_remote = remote - break - url = found_remote.split(" ")[1] - return cls._git_remote_to_pip_url(url.strip()) - - @staticmethod - def _git_remote_to_pip_url(url: str) -> str: - """ - Convert a remote url from what git uses to what pip accepts. - - There are 3 legal forms **url** may take: - - 1. A fully qualified url: ssh://git@example.com/foo/bar.git - 2. A local project.git folder: /path/to/bare/repository.git - 3. SCP shorthand for form 1: git@example.com:foo/bar.git - - Form 1 is output as-is. Form 2 must be converted to URI and form 3 must - be converted to form 1. - - See the corresponding test test_git_remote_url_to_pip() for examples of - sample inputs/outputs. - """ - if re.match(r"\w+://", url): - # This is already valid. Pass it though as-is. - return url - if os.path.exists(url): - # A local bare remote (git clone --mirror). - # Needs a file:// prefix. - return pathlib.PurePath(url).as_uri() - scp_match = SCP_REGEX.match(url) - if scp_match: - # Add an ssh:// prefix and replace the ':' with a '/'. - return scp_match.expand(r"ssh://\1\2/\3") - # Otherwise, bail out. - raise RemoteNotValidError(url) - - @classmethod - def has_commit(cls, location: str, rev: str) -> bool: - """ - Check if rev is a commit that is available in the local repository. - """ - try: - cls.run_command( - ["rev-parse", "-q", "--verify", "sha^" + rev], - cwd=location, - log_failed_cmd=False, - ) - except InstallationError: - return False - else: - return True - - @classmethod - def get_revision(cls, location: str, rev: Optional[str] = None) -> str: - if rev is None: - rev = "HEAD" - current_rev = cls.run_command( - ["rev-parse", rev], - show_stdout=False, - stdout_only=True, - cwd=location, - ) - return current_rev.strip() - - @classmethod - def get_subdirectory(cls, location: str) -> Optional[str]: - """ - Return the path to Python project root, relative to the repo root. - Return None if the project root is in the repo root. - """ - # find the repo root - git_dir = cls.run_command( - ["rev-parse", "--git-dir"], - show_stdout=False, - stdout_only=True, - cwd=location, - ).strip() - if not os.path.isabs(git_dir): - git_dir = os.path.join(location, git_dir) - repo_root = os.path.abspath(os.path.join(git_dir, "..")) - return find_path_to_project_root_from_repo_root(location, repo_root) - - @classmethod - def get_url_rev_and_auth(cls, url: str) -> Tuple[str, Optional[str], AuthInfo]: - """ - Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'. - That's required because although they use SSH they sometimes don't - work with a ssh:// scheme (e.g. GitHub). But we need a scheme for - parsing. Hence we remove it again afterwards and return it as a stub. - """ - # Works around an apparent Git bug - # (see https://article.gmane.org/gmane.comp.version-control.git/146500) - scheme, netloc, path, query, fragment = urlsplit(url) - if scheme.endswith("file"): - initial_slashes = path[: -len(path.lstrip("/"))] - newpath = initial_slashes + urllib.request.url2pathname(path).replace( - "\\", "/" - ).lstrip("/") - after_plus = scheme.find("+") + 1 - url = scheme[:after_plus] + urlunsplit( - (scheme[after_plus:], netloc, newpath, query, fragment), - ) - - if "://" not in url: - assert "file:" not in url - url = url.replace("git+", "git+ssh://") - url, rev, user_pass = super().get_url_rev_and_auth(url) - url = url.replace("ssh://", "") - else: - url, rev, user_pass = super().get_url_rev_and_auth(url) - - return url, rev, user_pass - - @classmethod - def update_submodules(cls, location: str) -> None: - if not os.path.exists(os.path.join(location, ".gitmodules")): - return - cls.run_command( - ["submodule", "update", "--init", "--recursive", "-q"], - cwd=location, - ) - - @classmethod - def get_repository_root(cls, location: str) -> Optional[str]: - loc = super().get_repository_root(location) - if loc: - return loc - try: - r = cls.run_command( - ["rev-parse", "--show-toplevel"], - cwd=location, - show_stdout=False, - stdout_only=True, - on_returncode="raise", - log_failed_cmd=False, - ) - except BadCommand: - logger.debug( - "could not determine if %s is under git control " - "because git is not available", - location, - ) - return None - except InstallationError: - return None - return os.path.normpath(r.rstrip("\r\n")) - - @staticmethod - def should_add_vcs_url_prefix(repo_url: str) -> bool: - """In either https or ssh form, requirements must be prefixed with git+.""" - return True - - -vcs.register(Git) diff --git a/spaces/TandCAcceptMe/face-swap-docker/mynewshinyroop/Lib/site-packages/pip/_vendor/rich/progress.py b/spaces/TandCAcceptMe/face-swap-docker/mynewshinyroop/Lib/site-packages/pip/_vendor/rich/progress.py deleted file mode 100644 index 8b0a315f32466ac03a205898394f958f221818a7..0000000000000000000000000000000000000000 --- a/spaces/TandCAcceptMe/face-swap-docker/mynewshinyroop/Lib/site-packages/pip/_vendor/rich/progress.py +++ /dev/null @@ -1,1702 +0,0 @@ -import io -import sys -import typing -import warnings -from abc import ABC, abstractmethod -from collections import deque -from dataclasses import dataclass, field -from datetime import timedelta -from io import RawIOBase, UnsupportedOperation -from math import ceil -from mmap import mmap -from operator import length_hint -from os import PathLike, stat -from threading import Event, RLock, Thread -from types import TracebackType -from typing import ( - Any, - BinaryIO, - Callable, - ContextManager, - Deque, - Dict, - Generic, - Iterable, - List, - NamedTuple, - NewType, - Optional, - Sequence, - TextIO, - Tuple, - Type, - TypeVar, - Union, -) - -if sys.version_info >= (3, 8): - from typing import Literal -else: - from pip._vendor.typing_extensions import Literal # pragma: no cover - -from . import filesize, get_console -from .console import Console, Group, JustifyMethod, RenderableType -from .highlighter import Highlighter -from .jupyter import JupyterMixin -from .live import Live -from .progress_bar import ProgressBar -from .spinner import Spinner -from .style import StyleType -from .table import Column, Table -from .text import Text, TextType - -TaskID = NewType("TaskID", int) - -ProgressType = TypeVar("ProgressType") - -GetTimeCallable = Callable[[], float] - - -_I = typing.TypeVar("_I", TextIO, BinaryIO) - - -class _TrackThread(Thread): - """A thread to periodically update progress.""" - - def __init__(self, progress: "Progress", task_id: "TaskID", update_period: float): - self.progress = progress - self.task_id = task_id - self.update_period = update_period - self.done = Event() - - self.completed = 0 - super().__init__() - - def run(self) -> None: - task_id = self.task_id - advance = self.progress.advance - update_period = self.update_period - last_completed = 0 - wait = self.done.wait - while not wait(update_period): - completed = self.completed - if last_completed != completed: - advance(task_id, completed - last_completed) - last_completed = completed - - self.progress.update(self.task_id, completed=self.completed, refresh=True) - - def __enter__(self) -> "_TrackThread": - self.start() - return self - - def __exit__( - self, - exc_type: Optional[Type[BaseException]], - exc_val: Optional[BaseException], - exc_tb: Optional[TracebackType], - ) -> None: - self.done.set() - self.join() - - -def track( - sequence: Union[Sequence[ProgressType], Iterable[ProgressType]], - description: str = "Working...", - total: Optional[float] = None, - auto_refresh: bool = True, - console: Optional[Console] = None, - transient: bool = False, - get_time: Optional[Callable[[], float]] = None, - refresh_per_second: float = 10, - style: StyleType = "bar.back", - complete_style: StyleType = "bar.complete", - finished_style: StyleType = "bar.finished", - pulse_style: StyleType = "bar.pulse", - update_period: float = 0.1, - disable: bool = False, - show_speed: bool = True, -) -> Iterable[ProgressType]: - """Track progress by iterating over a sequence. - - Args: - sequence (Iterable[ProgressType]): A sequence (must support "len") you wish to iterate over. - description (str, optional): Description of task show next to progress bar. Defaults to "Working". - total: (float, optional): Total number of steps. Default is len(sequence). - auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True. - transient: (bool, optional): Clear the progress on exit. Defaults to False. - console (Console, optional): Console to write to. Default creates internal Console instance. - refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10. - style (StyleType, optional): Style for the bar background. Defaults to "bar.back". - complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete". - finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished". - pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse". - update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1. - disable (bool, optional): Disable display of progress. - show_speed (bool, optional): Show speed if total isn't known. Defaults to True. - Returns: - Iterable[ProgressType]: An iterable of the values in the sequence. - - """ - - columns: List["ProgressColumn"] = ( - [TextColumn("[progress.description]{task.description}")] if description else [] - ) - columns.extend( - ( - BarColumn( - style=style, - complete_style=complete_style, - finished_style=finished_style, - pulse_style=pulse_style, - ), - TaskProgressColumn(show_speed=show_speed), - TimeRemainingColumn(elapsed_when_finished=True), - ) - ) - progress = Progress( - *columns, - auto_refresh=auto_refresh, - console=console, - transient=transient, - get_time=get_time, - refresh_per_second=refresh_per_second or 10, - disable=disable, - ) - - with progress: - yield from progress.track( - sequence, total=total, description=description, update_period=update_period - ) - - -class _Reader(RawIOBase, BinaryIO): - """A reader that tracks progress while it's being read from.""" - - def __init__( - self, - handle: BinaryIO, - progress: "Progress", - task: TaskID, - close_handle: bool = True, - ) -> None: - self.handle = handle - self.progress = progress - self.task = task - self.close_handle = close_handle - self._closed = False - - def __enter__(self) -> "_Reader": - self.handle.__enter__() - return self - - def __exit__( - self, - exc_type: Optional[Type[BaseException]], - exc_val: Optional[BaseException], - exc_tb: Optional[TracebackType], - ) -> None: - self.close() - - def __iter__(self) -> BinaryIO: - return self - - def __next__(self) -> bytes: - line = next(self.handle) - self.progress.advance(self.task, advance=len(line)) - return line - - @property - def closed(self) -> bool: - return self._closed - - def fileno(self) -> int: - return self.handle.fileno() - - def isatty(self) -> bool: - return self.handle.isatty() - - @property - def mode(self) -> str: - return self.handle.mode - - @property - def name(self) -> str: - return self.handle.name - - def readable(self) -> bool: - return self.handle.readable() - - def seekable(self) -> bool: - return self.handle.seekable() - - def writable(self) -> bool: - return False - - def read(self, size: int = -1) -> bytes: - block = self.handle.read(size) - self.progress.advance(self.task, advance=len(block)) - return block - - def readinto(self, b: Union[bytearray, memoryview, mmap]): # type: ignore[no-untyped-def, override] - n = self.handle.readinto(b) # type: ignore[attr-defined] - self.progress.advance(self.task, advance=n) - return n - - def readline(self, size: int = -1) -> bytes: # type: ignore[override] - line = self.handle.readline(size) - self.progress.advance(self.task, advance=len(line)) - return line - - def readlines(self, hint: int = -1) -> List[bytes]: - lines = self.handle.readlines(hint) - self.progress.advance(self.task, advance=sum(map(len, lines))) - return lines - - def close(self) -> None: - if self.close_handle: - self.handle.close() - self._closed = True - - def seek(self, offset: int, whence: int = 0) -> int: - pos = self.handle.seek(offset, whence) - self.progress.update(self.task, completed=pos) - return pos - - def tell(self) -> int: - return self.handle.tell() - - def write(self, s: Any) -> int: - raise UnsupportedOperation("write") - - -class _ReadContext(ContextManager[_I], Generic[_I]): - """A utility class to handle a context for both a reader and a progress.""" - - def __init__(self, progress: "Progress", reader: _I) -> None: - self.progress = progress - self.reader: _I = reader - - def __enter__(self) -> _I: - self.progress.start() - return self.reader.__enter__() - - def __exit__( - self, - exc_type: Optional[Type[BaseException]], - exc_val: Optional[BaseException], - exc_tb: Optional[TracebackType], - ) -> None: - self.progress.stop() - self.reader.__exit__(exc_type, exc_val, exc_tb) - - -def wrap_file( - file: BinaryIO, - total: int, - *, - description: str = "Reading...", - auto_refresh: bool = True, - console: Optional[Console] = None, - transient: bool = False, - get_time: Optional[Callable[[], float]] = None, - refresh_per_second: float = 10, - style: StyleType = "bar.back", - complete_style: StyleType = "bar.complete", - finished_style: StyleType = "bar.finished", - pulse_style: StyleType = "bar.pulse", - disable: bool = False, -) -> ContextManager[BinaryIO]: - """Read bytes from a file while tracking progress. - - Args: - file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode. - total (int): Total number of bytes to read. - description (str, optional): Description of task show next to progress bar. Defaults to "Reading". - auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True. - transient: (bool, optional): Clear the progress on exit. Defaults to False. - console (Console, optional): Console to write to. Default creates internal Console instance. - refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10. - style (StyleType, optional): Style for the bar background. Defaults to "bar.back". - complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete". - finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished". - pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse". - disable (bool, optional): Disable display of progress. - Returns: - ContextManager[BinaryIO]: A context manager yielding a progress reader. - - """ - - columns: List["ProgressColumn"] = ( - [TextColumn("[progress.description]{task.description}")] if description else [] - ) - columns.extend( - ( - BarColumn( - style=style, - complete_style=complete_style, - finished_style=finished_style, - pulse_style=pulse_style, - ), - DownloadColumn(), - TimeRemainingColumn(), - ) - ) - progress = Progress( - *columns, - auto_refresh=auto_refresh, - console=console, - transient=transient, - get_time=get_time, - refresh_per_second=refresh_per_second or 10, - disable=disable, - ) - - reader = progress.wrap_file(file, total=total, description=description) - return _ReadContext(progress, reader) - - -@typing.overload -def open( - file: Union[str, "PathLike[str]", bytes], - mode: Union[Literal["rt"], Literal["r"]], - buffering: int = -1, - encoding: Optional[str] = None, - errors: Optional[str] = None, - newline: Optional[str] = None, - *, - total: Optional[int] = None, - description: str = "Reading...", - auto_refresh: bool = True, - console: Optional[Console] = None, - transient: bool = False, - get_time: Optional[Callable[[], float]] = None, - refresh_per_second: float = 10, - style: StyleType = "bar.back", - complete_style: StyleType = "bar.complete", - finished_style: StyleType = "bar.finished", - pulse_style: StyleType = "bar.pulse", - disable: bool = False, -) -> ContextManager[TextIO]: - pass - - -@typing.overload -def open( - file: Union[str, "PathLike[str]", bytes], - mode: Literal["rb"], - buffering: int = -1, - encoding: Optional[str] = None, - errors: Optional[str] = None, - newline: Optional[str] = None, - *, - total: Optional[int] = None, - description: str = "Reading...", - auto_refresh: bool = True, - console: Optional[Console] = None, - transient: bool = False, - get_time: Optional[Callable[[], float]] = None, - refresh_per_second: float = 10, - style: StyleType = "bar.back", - complete_style: StyleType = "bar.complete", - finished_style: StyleType = "bar.finished", - pulse_style: StyleType = "bar.pulse", - disable: bool = False, -) -> ContextManager[BinaryIO]: - pass - - -def open( - file: Union[str, "PathLike[str]", bytes], - mode: Union[Literal["rb"], Literal["rt"], Literal["r"]] = "r", - buffering: int = -1, - encoding: Optional[str] = None, - errors: Optional[str] = None, - newline: Optional[str] = None, - *, - total: Optional[int] = None, - description: str = "Reading...", - auto_refresh: bool = True, - console: Optional[Console] = None, - transient: bool = False, - get_time: Optional[Callable[[], float]] = None, - refresh_per_second: float = 10, - style: StyleType = "bar.back", - complete_style: StyleType = "bar.complete", - finished_style: StyleType = "bar.finished", - pulse_style: StyleType = "bar.pulse", - disable: bool = False, -) -> Union[ContextManager[BinaryIO], ContextManager[TextIO]]: - """Read bytes from a file while tracking progress. - - Args: - path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode. - mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt". - buffering (int): The buffering strategy to use, see :func:`io.open`. - encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`. - errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`. - newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open` - total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size. - description (str, optional): Description of task show next to progress bar. Defaults to "Reading". - auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True. - transient: (bool, optional): Clear the progress on exit. Defaults to False. - console (Console, optional): Console to write to. Default creates internal Console instance. - refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10. - style (StyleType, optional): Style for the bar background. Defaults to "bar.back". - complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete". - finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished". - pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse". - disable (bool, optional): Disable display of progress. - encoding (str, optional): The encoding to use when reading in text mode. - - Returns: - ContextManager[BinaryIO]: A context manager yielding a progress reader. - - """ - - columns: List["ProgressColumn"] = ( - [TextColumn("[progress.description]{task.description}")] if description else [] - ) - columns.extend( - ( - BarColumn( - style=style, - complete_style=complete_style, - finished_style=finished_style, - pulse_style=pulse_style, - ), - DownloadColumn(), - TimeRemainingColumn(), - ) - ) - progress = Progress( - *columns, - auto_refresh=auto_refresh, - console=console, - transient=transient, - get_time=get_time, - refresh_per_second=refresh_per_second or 10, - disable=disable, - ) - - reader = progress.open( - file, - mode=mode, - buffering=buffering, - encoding=encoding, - errors=errors, - newline=newline, - total=total, - description=description, - ) - return _ReadContext(progress, reader) # type: ignore[return-value, type-var] - - -class ProgressColumn(ABC): - """Base class for a widget to use in progress display.""" - - max_refresh: Optional[float] = None - - def __init__(self, table_column: Optional[Column] = None) -> None: - self._table_column = table_column - self._renderable_cache: Dict[TaskID, Tuple[float, RenderableType]] = {} - self._update_time: Optional[float] = None - - def get_table_column(self) -> Column: - """Get a table column, used to build tasks table.""" - return self._table_column or Column() - - def __call__(self, task: "Task") -> RenderableType: - """Called by the Progress object to return a renderable for the given task. - - Args: - task (Task): An object containing information regarding the task. - - Returns: - RenderableType: Anything renderable (including str). - """ - current_time = task.get_time() - if self.max_refresh is not None and not task.completed: - try: - timestamp, renderable = self._renderable_cache[task.id] - except KeyError: - pass - else: - if timestamp + self.max_refresh > current_time: - return renderable - - renderable = self.render(task) - self._renderable_cache[task.id] = (current_time, renderable) - return renderable - - @abstractmethod - def render(self, task: "Task") -> RenderableType: - """Should return a renderable object.""" - - -class RenderableColumn(ProgressColumn): - """A column to insert an arbitrary column. - - Args: - renderable (RenderableType, optional): Any renderable. Defaults to empty string. - """ - - def __init__( - self, renderable: RenderableType = "", *, table_column: Optional[Column] = None - ): - self.renderable = renderable - super().__init__(table_column=table_column) - - def render(self, task: "Task") -> RenderableType: - return self.renderable - - -class SpinnerColumn(ProgressColumn): - """A column with a 'spinner' animation. - - Args: - spinner_name (str, optional): Name of spinner animation. Defaults to "dots". - style (StyleType, optional): Style of spinner. Defaults to "progress.spinner". - speed (float, optional): Speed factor of spinner. Defaults to 1.0. - finished_text (TextType, optional): Text used when task is finished. Defaults to " ". - """ - - def __init__( - self, - spinner_name: str = "dots", - style: Optional[StyleType] = "progress.spinner", - speed: float = 1.0, - finished_text: TextType = " ", - table_column: Optional[Column] = None, - ): - self.spinner = Spinner(spinner_name, style=style, speed=speed) - self.finished_text = ( - Text.from_markup(finished_text) - if isinstance(finished_text, str) - else finished_text - ) - super().__init__(table_column=table_column) - - def set_spinner( - self, - spinner_name: str, - spinner_style: Optional[StyleType] = "progress.spinner", - speed: float = 1.0, - ) -> None: - """Set a new spinner. - - Args: - spinner_name (str): Spinner name, see python -m rich.spinner. - spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner". - speed (float, optional): Speed factor of spinner. Defaults to 1.0. - """ - self.spinner = Spinner(spinner_name, style=spinner_style, speed=speed) - - def render(self, task: "Task") -> RenderableType: - text = ( - self.finished_text - if task.finished - else self.spinner.render(task.get_time()) - ) - return text - - -class TextColumn(ProgressColumn): - """A column containing text.""" - - def __init__( - self, - text_format: str, - style: StyleType = "none", - justify: JustifyMethod = "left", - markup: bool = True, - highlighter: Optional[Highlighter] = None, - table_column: Optional[Column] = None, - ) -> None: - self.text_format = text_format - self.justify: JustifyMethod = justify - self.style = style - self.markup = markup - self.highlighter = highlighter - super().__init__(table_column=table_column or Column(no_wrap=True)) - - def render(self, task: "Task") -> Text: - _text = self.text_format.format(task=task) - if self.markup: - text = Text.from_markup(_text, style=self.style, justify=self.justify) - else: - text = Text(_text, style=self.style, justify=self.justify) - if self.highlighter: - self.highlighter.highlight(text) - return text - - -class BarColumn(ProgressColumn): - """Renders a visual progress bar. - - Args: - bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40. - style (StyleType, optional): Style for the bar background. Defaults to "bar.back". - complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete". - finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished". - pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse". - """ - - def __init__( - self, - bar_width: Optional[int] = 40, - style: StyleType = "bar.back", - complete_style: StyleType = "bar.complete", - finished_style: StyleType = "bar.finished", - pulse_style: StyleType = "bar.pulse", - table_column: Optional[Column] = None, - ) -> None: - self.bar_width = bar_width - self.style = style - self.complete_style = complete_style - self.finished_style = finished_style - self.pulse_style = pulse_style - super().__init__(table_column=table_column) - - def render(self, task: "Task") -> ProgressBar: - """Gets a progress bar widget for a task.""" - return ProgressBar( - total=max(0, task.total) if task.total is not None else None, - completed=max(0, task.completed), - width=None if self.bar_width is None else max(1, self.bar_width), - pulse=not task.started, - animation_time=task.get_time(), - style=self.style, - complete_style=self.complete_style, - finished_style=self.finished_style, - pulse_style=self.pulse_style, - ) - - -class TimeElapsedColumn(ProgressColumn): - """Renders time elapsed.""" - - def render(self, task: "Task") -> Text: - """Show time elapsed.""" - elapsed = task.finished_time if task.finished else task.elapsed - if elapsed is None: - return Text("-:--:--", style="progress.elapsed") - delta = timedelta(seconds=int(elapsed)) - return Text(str(delta), style="progress.elapsed") - - -class TaskProgressColumn(TextColumn): - """Show task progress as a percentage. - - Args: - text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%". - text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "". - style (StyleType, optional): Style of output. Defaults to "none". - justify (JustifyMethod, optional): Text justification. Defaults to "left". - markup (bool, optional): Enable markup. Defaults to True. - highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None. - table_column (Optional[Column], optional): Table Column to use. Defaults to None. - show_speed (bool, optional): Show speed if total is unknown. Defaults to False. - """ - - def __init__( - self, - text_format: str = "[progress.percentage]{task.percentage:>3.0f}%", - text_format_no_percentage: str = "", - style: StyleType = "none", - justify: JustifyMethod = "left", - markup: bool = True, - highlighter: Optional[Highlighter] = None, - table_column: Optional[Column] = None, - show_speed: bool = False, - ) -> None: - - self.text_format_no_percentage = text_format_no_percentage - self.show_speed = show_speed - super().__init__( - text_format=text_format, - style=style, - justify=justify, - markup=markup, - highlighter=highlighter, - table_column=table_column, - ) - - @classmethod - def render_speed(cls, speed: Optional[float]) -> Text: - """Render the speed in iterations per second. - - Args: - task (Task): A Task object. - - Returns: - Text: Text object containing the task speed. - """ - if speed is None: - return Text("", style="progress.percentage") - unit, suffix = filesize.pick_unit_and_suffix( - int(speed), - ["", "×10³", "×10⁶", "×10⁹", "×10¹²"], - 1000, - ) - data_speed = speed / unit - return Text(f"{data_speed:.1f}{suffix} it/s", style="progress.percentage") - - def render(self, task: "Task") -> Text: - if task.total is None and self.show_speed: - return self.render_speed(task.finished_speed or task.speed) - text_format = ( - self.text_format_no_percentage if task.total is None else self.text_format - ) - _text = text_format.format(task=task) - if self.markup: - text = Text.from_markup(_text, style=self.style, justify=self.justify) - else: - text = Text(_text, style=self.style, justify=self.justify) - if self.highlighter: - self.highlighter.highlight(text) - return text - - -class TimeRemainingColumn(ProgressColumn): - """Renders estimated time remaining. - - Args: - compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False. - elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False. - """ - - # Only refresh twice a second to prevent jitter - max_refresh = 0.5 - - def __init__( - self, - compact: bool = False, - elapsed_when_finished: bool = False, - table_column: Optional[Column] = None, - ): - self.compact = compact - self.elapsed_when_finished = elapsed_when_finished - super().__init__(table_column=table_column) - - def render(self, task: "Task") -> Text: - """Show time remaining.""" - if self.elapsed_when_finished and task.finished: - task_time = task.finished_time - style = "progress.elapsed" - else: - task_time = task.time_remaining - style = "progress.remaining" - - if task.total is None: - return Text("", style=style) - - if task_time is None: - return Text("--:--" if self.compact else "-:--:--", style=style) - - # Based on https://github.com/tqdm/tqdm/blob/master/tqdm/std.py - minutes, seconds = divmod(int(task_time), 60) - hours, minutes = divmod(minutes, 60) - - if self.compact and not hours: - formatted = f"{minutes:02d}:{seconds:02d}" - else: - formatted = f"{hours:d}:{minutes:02d}:{seconds:02d}" - - return Text(formatted, style=style) - - -class FileSizeColumn(ProgressColumn): - """Renders completed filesize.""" - - def render(self, task: "Task") -> Text: - """Show data completed.""" - data_size = filesize.decimal(int(task.completed)) - return Text(data_size, style="progress.filesize") - - -class TotalFileSizeColumn(ProgressColumn): - """Renders total filesize.""" - - def render(self, task: "Task") -> Text: - """Show data completed.""" - data_size = filesize.decimal(int(task.total)) if task.total is not None else "" - return Text(data_size, style="progress.filesize.total") - - -class MofNCompleteColumn(ProgressColumn): - """Renders completed count/total, e.g. ' 10/1000'. - - Best for bounded tasks with int quantities. - - Space pads the completed count so that progress length does not change as task progresses - past powers of 10. - - Args: - separator (str, optional): Text to separate completed and total values. Defaults to "/". - """ - - def __init__(self, separator: str = "/", table_column: Optional[Column] = None): - self.separator = separator - super().__init__(table_column=table_column) - - def render(self, task: "Task") -> Text: - """Show completed/total.""" - completed = int(task.completed) - total = int(task.total) if task.total is not None else "?" - total_width = len(str(total)) - return Text( - f"{completed:{total_width}d}{self.separator}{total}", - style="progress.download", - ) - - -class DownloadColumn(ProgressColumn): - """Renders file size downloaded and total, e.g. '0.5/2.3 GB'. - - Args: - binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False. - """ - - def __init__( - self, binary_units: bool = False, table_column: Optional[Column] = None - ) -> None: - self.binary_units = binary_units - super().__init__(table_column=table_column) - - def render(self, task: "Task") -> Text: - """Calculate common unit for completed and total.""" - completed = int(task.completed) - - unit_and_suffix_calculation_base = ( - int(task.total) if task.total is not None else completed - ) - if self.binary_units: - unit, suffix = filesize.pick_unit_and_suffix( - unit_and_suffix_calculation_base, - ["bytes", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"], - 1024, - ) - else: - unit, suffix = filesize.pick_unit_and_suffix( - unit_and_suffix_calculation_base, - ["bytes", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], - 1000, - ) - precision = 0 if unit == 1 else 1 - - completed_ratio = completed / unit - completed_str = f"{completed_ratio:,.{precision}f}" - - if task.total is not None: - total = int(task.total) - total_ratio = total / unit - total_str = f"{total_ratio:,.{precision}f}" - else: - total_str = "?" - - download_status = f"{completed_str}/{total_str} {suffix}" - download_text = Text(download_status, style="progress.download") - return download_text - - -class TransferSpeedColumn(ProgressColumn): - """Renders human readable transfer speed.""" - - def render(self, task: "Task") -> Text: - """Show data transfer speed.""" - speed = task.finished_speed or task.speed - if speed is None: - return Text("?", style="progress.data.speed") - data_speed = filesize.decimal(int(speed)) - return Text(f"{data_speed}/s", style="progress.data.speed") - - -class ProgressSample(NamedTuple): - """Sample of progress for a given time.""" - - timestamp: float - """Timestamp of sample.""" - completed: float - """Number of steps completed.""" - - -@dataclass -class Task: - """Information regarding a progress task. - - This object should be considered read-only outside of the :class:`~Progress` class. - - """ - - id: TaskID - """Task ID associated with this task (used in Progress methods).""" - - description: str - """str: Description of the task.""" - - total: Optional[float] - """Optional[float]: Total number of steps in this task.""" - - completed: float - """float: Number of steps completed""" - - _get_time: GetTimeCallable - """Callable to get the current time.""" - - finished_time: Optional[float] = None - """float: Time task was finished.""" - - visible: bool = True - """bool: Indicates if this task is visible in the progress display.""" - - fields: Dict[str, Any] = field(default_factory=dict) - """dict: Arbitrary fields passed in via Progress.update.""" - - start_time: Optional[float] = field(default=None, init=False, repr=False) - """Optional[float]: Time this task was started, or None if not started.""" - - stop_time: Optional[float] = field(default=None, init=False, repr=False) - """Optional[float]: Time this task was stopped, or None if not stopped.""" - - finished_speed: Optional[float] = None - """Optional[float]: The last speed for a finished task.""" - - _progress: Deque[ProgressSample] = field( - default_factory=lambda: deque(maxlen=1000), init=False, repr=False - ) - - _lock: RLock = field(repr=False, default_factory=RLock) - """Thread lock.""" - - def get_time(self) -> float: - """float: Get the current time, in seconds.""" - return self._get_time() - - @property - def started(self) -> bool: - """bool: Check if the task as started.""" - return self.start_time is not None - - @property - def remaining(self) -> Optional[float]: - """Optional[float]: Get the number of steps remaining, if a non-None total was set.""" - if self.total is None: - return None - return self.total - self.completed - - @property - def elapsed(self) -> Optional[float]: - """Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started.""" - if self.start_time is None: - return None - if self.stop_time is not None: - return self.stop_time - self.start_time - return self.get_time() - self.start_time - - @property - def finished(self) -> bool: - """Check if the task has finished.""" - return self.finished_time is not None - - @property - def percentage(self) -> float: - """float: Get progress of task as a percentage. If a None total was set, returns 0""" - if not self.total: - return 0.0 - completed = (self.completed / self.total) * 100.0 - completed = min(100.0, max(0.0, completed)) - return completed - - @property - def speed(self) -> Optional[float]: - """Optional[float]: Get the estimated speed in steps per second.""" - if self.start_time is None: - return None - with self._lock: - progress = self._progress - if not progress: - return None - total_time = progress[-1].timestamp - progress[0].timestamp - if total_time == 0: - return None - iter_progress = iter(progress) - next(iter_progress) - total_completed = sum(sample.completed for sample in iter_progress) - speed = total_completed / total_time - return speed - - @property - def time_remaining(self) -> Optional[float]: - """Optional[float]: Get estimated time to completion, or ``None`` if no data.""" - if self.finished: - return 0.0 - speed = self.speed - if not speed: - return None - remaining = self.remaining - if remaining is None: - return None - estimate = ceil(remaining / speed) - return estimate - - def _reset(self) -> None: - """Reset progress.""" - self._progress.clear() - self.finished_time = None - self.finished_speed = None - - -class Progress(JupyterMixin): - """Renders an auto-updating progress bar(s). - - Args: - console (Console, optional): Optional Console instance. Default will an internal Console instance writing to stdout. - auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`. - refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None. - speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30. - transient: (bool, optional): Clear the progress on exit. Defaults to False. - redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True. - redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True. - get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None. - disable (bool, optional): Disable progress display. Defaults to False - expand (bool, optional): Expand tasks table to fit width. Defaults to False. - """ - - def __init__( - self, - *columns: Union[str, ProgressColumn], - console: Optional[Console] = None, - auto_refresh: bool = True, - refresh_per_second: float = 10, - speed_estimate_period: float = 30.0, - transient: bool = False, - redirect_stdout: bool = True, - redirect_stderr: bool = True, - get_time: Optional[GetTimeCallable] = None, - disable: bool = False, - expand: bool = False, - ) -> None: - assert refresh_per_second > 0, "refresh_per_second must be > 0" - self._lock = RLock() - self.columns = columns or self.get_default_columns() - self.speed_estimate_period = speed_estimate_period - - self.disable = disable - self.expand = expand - self._tasks: Dict[TaskID, Task] = {} - self._task_index: TaskID = TaskID(0) - self.live = Live( - console=console or get_console(), - auto_refresh=auto_refresh, - refresh_per_second=refresh_per_second, - transient=transient, - redirect_stdout=redirect_stdout, - redirect_stderr=redirect_stderr, - get_renderable=self.get_renderable, - ) - self.get_time = get_time or self.console.get_time - self.print = self.console.print - self.log = self.console.log - - @classmethod - def get_default_columns(cls) -> Tuple[ProgressColumn, ...]: - """Get the default columns used for a new Progress instance: - - a text column for the description (TextColumn) - - the bar itself (BarColumn) - - a text column showing completion percentage (TextColumn) - - an estimated-time-remaining column (TimeRemainingColumn) - If the Progress instance is created without passing a columns argument, - the default columns defined here will be used. - - You can also create a Progress instance using custom columns before - and/or after the defaults, as in this example: - - progress = Progress( - SpinnerColumn(), - *Progress.default_columns(), - "Elapsed:", - TimeElapsedColumn(), - ) - - This code shows the creation of a Progress display, containing - a spinner to the left, the default columns, and a labeled elapsed - time column. - """ - return ( - TextColumn("[progress.description]{task.description}"), - BarColumn(), - TaskProgressColumn(), - TimeRemainingColumn(), - ) - - @property - def console(self) -> Console: - return self.live.console - - @property - def tasks(self) -> List[Task]: - """Get a list of Task instances.""" - with self._lock: - return list(self._tasks.values()) - - @property - def task_ids(self) -> List[TaskID]: - """A list of task IDs.""" - with self._lock: - return list(self._tasks.keys()) - - @property - def finished(self) -> bool: - """Check if all tasks have been completed.""" - with self._lock: - if not self._tasks: - return True - return all(task.finished for task in self._tasks.values()) - - def start(self) -> None: - """Start the progress display.""" - if not self.disable: - self.live.start(refresh=True) - - def stop(self) -> None: - """Stop the progress display.""" - self.live.stop() - if not self.console.is_interactive: - self.console.print() - - def __enter__(self) -> "Progress": - self.start() - return self - - def __exit__( - self, - exc_type: Optional[Type[BaseException]], - exc_val: Optional[BaseException], - exc_tb: Optional[TracebackType], - ) -> None: - self.stop() - - def track( - self, - sequence: Union[Iterable[ProgressType], Sequence[ProgressType]], - total: Optional[float] = None, - task_id: Optional[TaskID] = None, - description: str = "Working...", - update_period: float = 0.1, - ) -> Iterable[ProgressType]: - """Track progress by iterating over a sequence. - - Args: - sequence (Sequence[ProgressType]): A sequence of values you want to iterate over and track progress. - total: (float, optional): Total number of steps. Default is len(sequence). - task_id: (TaskID): Task to track. Default is new task. - description: (str, optional): Description of task, if new task is created. - update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1. - - Returns: - Iterable[ProgressType]: An iterable of values taken from the provided sequence. - """ - if total is None: - total = float(length_hint(sequence)) or None - - if task_id is None: - task_id = self.add_task(description, total=total) - else: - self.update(task_id, total=total) - - if self.live.auto_refresh: - with _TrackThread(self, task_id, update_period) as track_thread: - for value in sequence: - yield value - track_thread.completed += 1 - else: - advance = self.advance - refresh = self.refresh - for value in sequence: - yield value - advance(task_id, 1) - refresh() - - def wrap_file( - self, - file: BinaryIO, - total: Optional[int] = None, - *, - task_id: Optional[TaskID] = None, - description: str = "Reading...", - ) -> BinaryIO: - """Track progress file reading from a binary file. - - Args: - file (BinaryIO): A file-like object opened in binary mode. - total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given. - task_id (TaskID): Task to track. Default is new task. - description (str, optional): Description of task, if new task is created. - - Returns: - BinaryIO: A readable file-like object in binary mode. - - Raises: - ValueError: When no total value can be extracted from the arguments or the task. - """ - # attempt to recover the total from the task - total_bytes: Optional[float] = None - if total is not None: - total_bytes = total - elif task_id is not None: - with self._lock: - total_bytes = self._tasks[task_id].total - if total_bytes is None: - raise ValueError( - f"unable to get the total number of bytes, please specify 'total'" - ) - - # update total of task or create new task - if task_id is None: - task_id = self.add_task(description, total=total_bytes) - else: - self.update(task_id, total=total_bytes) - - return _Reader(file, self, task_id, close_handle=False) - - @typing.overload - def open( - self, - file: Union[str, "PathLike[str]", bytes], - mode: Literal["rb"], - buffering: int = -1, - encoding: Optional[str] = None, - errors: Optional[str] = None, - newline: Optional[str] = None, - *, - total: Optional[int] = None, - task_id: Optional[TaskID] = None, - description: str = "Reading...", - ) -> BinaryIO: - pass - - @typing.overload - def open( - self, - file: Union[str, "PathLike[str]", bytes], - mode: Union[Literal["r"], Literal["rt"]], - buffering: int = -1, - encoding: Optional[str] = None, - errors: Optional[str] = None, - newline: Optional[str] = None, - *, - total: Optional[int] = None, - task_id: Optional[TaskID] = None, - description: str = "Reading...", - ) -> TextIO: - pass - - def open( - self, - file: Union[str, "PathLike[str]", bytes], - mode: Union[Literal["rb"], Literal["rt"], Literal["r"]] = "r", - buffering: int = -1, - encoding: Optional[str] = None, - errors: Optional[str] = None, - newline: Optional[str] = None, - *, - total: Optional[int] = None, - task_id: Optional[TaskID] = None, - description: str = "Reading...", - ) -> Union[BinaryIO, TextIO]: - """Track progress while reading from a binary file. - - Args: - path (Union[str, PathLike[str]]): The path to the file to read. - mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt". - buffering (int): The buffering strategy to use, see :func:`io.open`. - encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`. - errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`. - newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`. - total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used. - task_id (TaskID): Task to track. Default is new task. - description (str, optional): Description of task, if new task is created. - - Returns: - BinaryIO: A readable file-like object in binary mode. - - Raises: - ValueError: When an invalid mode is given. - """ - # normalize the mode (always rb, rt) - _mode = "".join(sorted(mode, reverse=False)) - if _mode not in ("br", "rt", "r"): - raise ValueError("invalid mode {!r}".format(mode)) - - # patch buffering to provide the same behaviour as the builtin `open` - line_buffering = buffering == 1 - if _mode == "br" and buffering == 1: - warnings.warn( - "line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used", - RuntimeWarning, - ) - buffering = -1 - elif _mode in ("rt", "r"): - if buffering == 0: - raise ValueError("can't have unbuffered text I/O") - elif buffering == 1: - buffering = -1 - - # attempt to get the total with `os.stat` - if total is None: - total = stat(file).st_size - - # update total of task or create new task - if task_id is None: - task_id = self.add_task(description, total=total) - else: - self.update(task_id, total=total) - - # open the file in binary mode, - handle = io.open(file, "rb", buffering=buffering) - reader = _Reader(handle, self, task_id, close_handle=True) - - # wrap the reader in a `TextIOWrapper` if text mode - if mode in ("r", "rt"): - return io.TextIOWrapper( - reader, - encoding=encoding, - errors=errors, - newline=newline, - line_buffering=line_buffering, - ) - - return reader - - def start_task(self, task_id: TaskID) -> None: - """Start a task. - - Starts a task (used when calculating elapsed time). You may need to call this manually, - if you called ``add_task`` with ``start=False``. - - Args: - task_id (TaskID): ID of task. - """ - with self._lock: - task = self._tasks[task_id] - if task.start_time is None: - task.start_time = self.get_time() - - def stop_task(self, task_id: TaskID) -> None: - """Stop a task. - - This will freeze the elapsed time on the task. - - Args: - task_id (TaskID): ID of task. - """ - with self._lock: - task = self._tasks[task_id] - current_time = self.get_time() - if task.start_time is None: - task.start_time = current_time - task.stop_time = current_time - - def update( - self, - task_id: TaskID, - *, - total: Optional[float] = None, - completed: Optional[float] = None, - advance: Optional[float] = None, - description: Optional[str] = None, - visible: Optional[bool] = None, - refresh: bool = False, - **fields: Any, - ) -> None: - """Update information associated with a task. - - Args: - task_id (TaskID): Task id (returned by add_task). - total (float, optional): Updates task.total if not None. - completed (float, optional): Updates task.completed if not None. - advance (float, optional): Add a value to task.completed if not None. - description (str, optional): Change task description if not None. - visible (bool, optional): Set visible flag if not None. - refresh (bool): Force a refresh of progress information. Default is False. - **fields (Any): Additional data fields required for rendering. - """ - with self._lock: - task = self._tasks[task_id] - completed_start = task.completed - - if total is not None and total != task.total: - task.total = total - task._reset() - if advance is not None: - task.completed += advance - if completed is not None: - task.completed = completed - if description is not None: - task.description = description - if visible is not None: - task.visible = visible - task.fields.update(fields) - update_completed = task.completed - completed_start - - current_time = self.get_time() - old_sample_time = current_time - self.speed_estimate_period - _progress = task._progress - - popleft = _progress.popleft - while _progress and _progress[0].timestamp < old_sample_time: - popleft() - if update_completed > 0: - _progress.append(ProgressSample(current_time, update_completed)) - if ( - task.total is not None - and task.completed >= task.total - and task.finished_time is None - ): - task.finished_time = task.elapsed - - if refresh: - self.refresh() - - def reset( - self, - task_id: TaskID, - *, - start: bool = True, - total: Optional[float] = None, - completed: int = 0, - visible: Optional[bool] = None, - description: Optional[str] = None, - **fields: Any, - ) -> None: - """Reset a task so completed is 0 and the clock is reset. - - Args: - task_id (TaskID): ID of task. - start (bool, optional): Start the task after reset. Defaults to True. - total (float, optional): New total steps in task, or None to use current total. Defaults to None. - completed (int, optional): Number of steps completed. Defaults to 0. - visible (bool, optional): Enable display of the task. Defaults to True. - description (str, optional): Change task description if not None. Defaults to None. - **fields (str): Additional data fields required for rendering. - """ - current_time = self.get_time() - with self._lock: - task = self._tasks[task_id] - task._reset() - task.start_time = current_time if start else None - if total is not None: - task.total = total - task.completed = completed - if visible is not None: - task.visible = visible - if fields: - task.fields = fields - if description is not None: - task.description = description - task.finished_time = None - self.refresh() - - def advance(self, task_id: TaskID, advance: float = 1) -> None: - """Advance task by a number of steps. - - Args: - task_id (TaskID): ID of task. - advance (float): Number of steps to advance. Default is 1. - """ - current_time = self.get_time() - with self._lock: - task = self._tasks[task_id] - completed_start = task.completed - task.completed += advance - update_completed = task.completed - completed_start - old_sample_time = current_time - self.speed_estimate_period - _progress = task._progress - - popleft = _progress.popleft - while _progress and _progress[0].timestamp < old_sample_time: - popleft() - while len(_progress) > 1000: - popleft() - _progress.append(ProgressSample(current_time, update_completed)) - if ( - task.total is not None - and task.completed >= task.total - and task.finished_time is None - ): - task.finished_time = task.elapsed - task.finished_speed = task.speed - - def refresh(self) -> None: - """Refresh (render) the progress information.""" - if not self.disable and self.live.is_started: - self.live.refresh() - - def get_renderable(self) -> RenderableType: - """Get a renderable for the progress display.""" - renderable = Group(*self.get_renderables()) - return renderable - - def get_renderables(self) -> Iterable[RenderableType]: - """Get a number of renderables for the progress display.""" - table = self.make_tasks_table(self.tasks) - yield table - - def make_tasks_table(self, tasks: Iterable[Task]) -> Table: - """Get a table to render the Progress display. - - Args: - tasks (Iterable[Task]): An iterable of Task instances, one per row of the table. - - Returns: - Table: A table instance. - """ - table_columns = ( - ( - Column(no_wrap=True) - if isinstance(_column, str) - else _column.get_table_column().copy() - ) - for _column in self.columns - ) - table = Table.grid(*table_columns, padding=(0, 1), expand=self.expand) - - for task in tasks: - if task.visible: - table.add_row( - *( - ( - column.format(task=task) - if isinstance(column, str) - else column(task) - ) - for column in self.columns - ) - ) - return table - - def __rich__(self) -> RenderableType: - """Makes the Progress class itself renderable.""" - with self._lock: - return self.get_renderable() - - def add_task( - self, - description: str, - start: bool = True, - total: Optional[float] = 100.0, - completed: int = 0, - visible: bool = True, - **fields: Any, - ) -> TaskID: - """Add a new 'task' to the Progress display. - - Args: - description (str): A description of the task. - start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False, - you will need to call `start` manually. Defaults to True. - total (float, optional): Number of total steps in the progress if known. - Set to None to render a pulsing animation. Defaults to 100. - completed (int, optional): Number of steps completed so far. Defaults to 0. - visible (bool, optional): Enable display of the task. Defaults to True. - **fields (str): Additional data fields required for rendering. - - Returns: - TaskID: An ID you can use when calling `update`. - """ - with self._lock: - task = Task( - self._task_index, - description, - total, - completed, - visible=visible, - fields=fields, - _get_time=self.get_time, - _lock=self._lock, - ) - self._tasks[self._task_index] = task - if start: - self.start_task(self._task_index) - new_task_index = self._task_index - self._task_index = TaskID(int(self._task_index) + 1) - self.refresh() - return new_task_index - - def remove_task(self, task_id: TaskID) -> None: - """Delete a task if it exists. - - Args: - task_id (TaskID): A task ID. - - """ - with self._lock: - del self._tasks[task_id] - - -if __name__ == "__main__": # pragma: no coverage - - import random - import time - - from .panel import Panel - from .rule import Rule - from .syntax import Syntax - from .table import Table - - syntax = Syntax( - '''def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]: - """Iterate and generate a tuple with a flag for last value.""" - iter_values = iter(values) - try: - previous_value = next(iter_values) - except StopIteration: - return - for value in iter_values: - yield False, previous_value - previous_value = value - yield True, previous_value''', - "python", - line_numbers=True, - ) - - table = Table("foo", "bar", "baz") - table.add_row("1", "2", "3") - - progress_renderables = [ - "Text may be printed while the progress bars are rendering.", - Panel("In fact, [i]any[/i] renderable will work"), - "Such as [magenta]tables[/]...", - table, - "Pretty printed structures...", - {"type": "example", "text": "Pretty printed"}, - "Syntax...", - syntax, - Rule("Give it a try!"), - ] - - from itertools import cycle - - examples = cycle(progress_renderables) - - console = Console(record=True) - - with Progress( - SpinnerColumn(), - *Progress.get_default_columns(), - TimeElapsedColumn(), - console=console, - transient=False, - ) as progress: - - task1 = progress.add_task("[red]Downloading", total=1000) - task2 = progress.add_task("[green]Processing", total=1000) - task3 = progress.add_task("[yellow]Thinking", total=None) - - while not progress.finished: - progress.update(task1, advance=0.5) - progress.update(task2, advance=0.3) - time.sleep(0.01) - if random.randint(0, 100) < 1: - progress.log(next(examples)) diff --git a/spaces/Tayaba171/CALText-TextRecognizer/README.md b/spaces/Tayaba171/CALText-TextRecognizer/README.md deleted file mode 100644 index e9d27309f80cf1225afd52aee235ca0219957b5d..0000000000000000000000000000000000000000 --- a/spaces/Tayaba171/CALText-TextRecognizer/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: CALText TextRecognizer -emoji: 🌍 -colorFrom: green -colorTo: gray -sdk: gradio -sdk_version: 3.43.2 -app_file: app.py -pinned: false -license: creativeml-openrail-m ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/TencentARC/VLog/models/grit_src/third_party/CenterNet2/README.md b/spaces/TencentARC/VLog/models/grit_src/third_party/CenterNet2/README.md deleted file mode 100644 index d3e1d5cf533555e19c6326777f792ac82a560a84..0000000000000000000000000000000000000000 --- a/spaces/TencentARC/VLog/models/grit_src/third_party/CenterNet2/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Probabilistic two-stage detection -Two-stage object detectors that use class-agnostic one-stage detectors as the proposal network. - - -

    - -> [**Probabilistic two-stage detection**](http://arxiv.org/abs/2103.07461), -> Xingyi Zhou, Vladlen Koltun, Philipp Krähenbühl, -> *arXiv technical report ([arXiv 2103.07461](http://arxiv.org/abs/2103.07461))* - -Contact: [zhouxy@cs.utexas.edu](mailto:zhouxy@cs.utexas.edu). Any questions or discussions are welcomed! - -## Abstract - -We develop a probabilistic interpretation of two-stage object detection. We show that this probabilistic interpretation motivates a number of common empirical training practices. It also suggests changes to two-stage detection pipelines. Specifically, the first stage should infer proper object-vs-background likelihoods, which should then inform the overall score of the detector. A standard region proposal network (RPN) cannot infer this likelihood sufficiently well, but many one-stage detectors can. We show how to build a probabilistic two-stage detector from any state-of-the-art one-stage detector. The resulting detectors are faster and more accurate than both their one- and two-stage precursors. Our detector achieves 56.4 mAP on COCO test-dev with single-scale testing, outperforming all published results. Using a lightweight backbone, our detector achieves 49.2 mAP on COCO at 33 fps on a Titan Xp. - -## Summary - -- Two-stage CenterNet: First stage estimates object probabilities, second stage conditionally classifies objects. - -- Resulting detector is faster and more accurate than both traditional two-stage detectors (fewer proposals required), and one-stage detectors (lighter first stage head). - -- Our best model achieves 56.4 mAP on COCO test-dev. - -- This repo also includes a detectron2-based CenterNet implementation with better accuracy (42.5 mAP at 70FPS) and a new FPN version of CenterNet (40.2 mAP with Res50_1x). - -## Main results - -All models are trained with multi-scale training, and tested with a single scale. The FPS is tested on a Titan RTX GPU. -More models and details can be found in the [MODEL_ZOO](projects/CenterNet2/centernet2_docs/MODEL_ZOO.md). - -#### COCO - -| Model | COCO val mAP | FPS | -|-------------------------------------------|---------------|-------| -| CenterNet-S4_DLA_8x | 42.5 | 71 | -| CenterNet2_R50_1x | 42.9 | 24 | -| CenterNet2_X101-DCN_2x | 49.9 | 8 | -| CenterNet2_R2-101-DCN-BiFPN_4x+4x_1560_ST | 56.1 | 5 | -| CenterNet2_DLA-BiFPN-P5_24x_ST | 49.2 | 38 | - - -#### LVIS - -| Model | val mAP box | -| ------------------------- | ----------- | -| CenterNet2_R50_1x | 26.5 | -| CenterNet2_FedLoss_R50_1x | 28.3 | - - -#### Objects365 - -| Model | val mAP | -|-------------------------------------------|----------| -| CenterNet2_R50_1x | 22.6 | - -## Installation - -Our project is developed on [detectron2](https://github.com/facebookresearch/detectron2). Please follow the official detectron2 [installation](https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md). All our code is under `projects/CenterNet2/`. In theory, you should be able to copy-paste `projects/CenterNet2/` to the latest detectron2 release or your own detectron2 repo to run our project. There might be API changes in future detectron2 releases that make it incompatible. - -We use the default detectron2 demo script. To run inference on an image folder using our pre-trained model, run - -~~~ -python projects/CenterNet2/demo/demo.py --config-file projects/CenterNet2/configs/CenterNet2_R50_1x.yaml --input path/to/image/ --opts MODEL.WEIGHTS models/CenterNet2_R50_1x.pth -~~~ - -## Benchmark evaluation and training - -Please check detectron2 [GETTING_STARTED.md](https://github.com/facebookresearch/detectron2/blob/master/GETTING_STARTED.md) for running evaluation and training. Our config files are under `projects/CenterNet2/configs` and the pre-trained models are in the [MODEL_ZOO](projects/CenterNet2/centernet2_docs/MODEL_ZOO.md). - - -## License - -Our code under `projects/CenterNet2/` is under [Apache 2.0 license](projects/CenterNet2/LICENSE). `projects/CenterNet2/centernet/modeling/backbone/bifpn_fcos.py` are from [AdelaiDet](https://github.com/aim-uofa/AdelaiDet), which follows the original [non-commercial license](https://github.com/aim-uofa/AdelaiDet/blob/master/LICENSE). The code from detectron2 follows the original [Apache 2.0 license](LICENSE). - -## Citation - -If you find this project useful for your research, please use the following BibTeX entry. - - @inproceedings{zhou2021probablistic, - title={Probabilistic two-stage detection}, - author={Zhou, Xingyi and Koltun, Vladlen and Kr{\"a}henb{\"u}hl, Philipp}, - booktitle={arXiv preprint arXiv:2103.07461}, - year={2021} - } diff --git a/spaces/Thaweewat/ControlNet-Architecture/ldm/modules/diffusionmodules/model.py b/spaces/Thaweewat/ControlNet-Architecture/ldm/modules/diffusionmodules/model.py deleted file mode 100644 index b089eebbe1676d8249005bb9def002ff5180715b..0000000000000000000000000000000000000000 --- a/spaces/Thaweewat/ControlNet-Architecture/ldm/modules/diffusionmodules/model.py +++ /dev/null @@ -1,852 +0,0 @@ -# pytorch_diffusion + derived encoder decoder -import math -import torch -import torch.nn as nn -import numpy as np -from einops import rearrange -from typing import Optional, Any - -from ldm.modules.attention import MemoryEfficientCrossAttention - -try: - import xformers - import xformers.ops - XFORMERS_IS_AVAILBLE = True -except: - XFORMERS_IS_AVAILBLE = False - print("No module 'xformers'. Proceeding without it.") - - -def get_timestep_embedding(timesteps, embedding_dim): - """ - This matches the implementation in Denoising Diffusion Probabilistic Models: - From Fairseq. - Build sinusoidal embeddings. - This matches the implementation in tensor2tensor, but differs slightly - from the description in Section 3.5 of "Attention Is All You Need". - """ - assert len(timesteps.shape) == 1 - - half_dim = embedding_dim // 2 - emb = math.log(10000) / (half_dim - 1) - emb = torch.exp(torch.arange(half_dim, dtype=torch.float32) * -emb) - emb = emb.to(device=timesteps.device) - emb = timesteps.float()[:, None] * emb[None, :] - emb = torch.cat([torch.sin(emb), torch.cos(emb)], dim=1) - if embedding_dim % 2 == 1: # zero pad - emb = torch.nn.functional.pad(emb, (0,1,0,0)) - return emb - - -def nonlinearity(x): - # swish - return x*torch.sigmoid(x) - - -def Normalize(in_channels, num_groups=32): - return torch.nn.GroupNorm(num_groups=num_groups, num_channels=in_channels, eps=1e-6, affine=True) - - -class Upsample(nn.Module): - def __init__(self, in_channels, with_conv): - super().__init__() - self.with_conv = with_conv - if self.with_conv: - self.conv = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x): - x = torch.nn.functional.interpolate(x, scale_factor=2.0, mode="nearest") - if self.with_conv: - x = self.conv(x) - return x - - -class Downsample(nn.Module): - def __init__(self, in_channels, with_conv): - super().__init__() - self.with_conv = with_conv - if self.with_conv: - # no asymmetric padding in torch conv, must do it ourselves - self.conv = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=3, - stride=2, - padding=0) - - def forward(self, x): - if self.with_conv: - pad = (0,1,0,1) - x = torch.nn.functional.pad(x, pad, mode="constant", value=0) - x = self.conv(x) - else: - x = torch.nn.functional.avg_pool2d(x, kernel_size=2, stride=2) - return x - - -class ResnetBlock(nn.Module): - def __init__(self, *, in_channels, out_channels=None, conv_shortcut=False, - dropout, temb_channels=512): - super().__init__() - self.in_channels = in_channels - out_channels = in_channels if out_channels is None else out_channels - self.out_channels = out_channels - self.use_conv_shortcut = conv_shortcut - - self.norm1 = Normalize(in_channels) - self.conv1 = torch.nn.Conv2d(in_channels, - out_channels, - kernel_size=3, - stride=1, - padding=1) - if temb_channels > 0: - self.temb_proj = torch.nn.Linear(temb_channels, - out_channels) - self.norm2 = Normalize(out_channels) - self.dropout = torch.nn.Dropout(dropout) - self.conv2 = torch.nn.Conv2d(out_channels, - out_channels, - kernel_size=3, - stride=1, - padding=1) - if self.in_channels != self.out_channels: - if self.use_conv_shortcut: - self.conv_shortcut = torch.nn.Conv2d(in_channels, - out_channels, - kernel_size=3, - stride=1, - padding=1) - else: - self.nin_shortcut = torch.nn.Conv2d(in_channels, - out_channels, - kernel_size=1, - stride=1, - padding=0) - - def forward(self, x, temb): - h = x - h = self.norm1(h) - h = nonlinearity(h) - h = self.conv1(h) - - if temb is not None: - h = h + self.temb_proj(nonlinearity(temb))[:,:,None,None] - - h = self.norm2(h) - h = nonlinearity(h) - h = self.dropout(h) - h = self.conv2(h) - - if self.in_channels != self.out_channels: - if self.use_conv_shortcut: - x = self.conv_shortcut(x) - else: - x = self.nin_shortcut(x) - - return x+h - - -class AttnBlock(nn.Module): - def __init__(self, in_channels): - super().__init__() - self.in_channels = in_channels - - self.norm = Normalize(in_channels) - self.q = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.k = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.v = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.proj_out = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - - def forward(self, x): - h_ = x - h_ = self.norm(h_) - q = self.q(h_) - k = self.k(h_) - v = self.v(h_) - - # compute attention - b,c,h,w = q.shape - q = q.reshape(b,c,h*w) - q = q.permute(0,2,1) # b,hw,c - k = k.reshape(b,c,h*w) # b,c,hw - w_ = torch.bmm(q,k) # b,hw,hw w[b,i,j]=sum_c q[b,i,c]k[b,c,j] - w_ = w_ * (int(c)**(-0.5)) - w_ = torch.nn.functional.softmax(w_, dim=2) - - # attend to values - v = v.reshape(b,c,h*w) - w_ = w_.permute(0,2,1) # b,hw,hw (first hw of k, second of q) - h_ = torch.bmm(v,w_) # b, c,hw (hw of q) h_[b,c,j] = sum_i v[b,c,i] w_[b,i,j] - h_ = h_.reshape(b,c,h,w) - - h_ = self.proj_out(h_) - - return x+h_ - -class MemoryEfficientAttnBlock(nn.Module): - """ - Uses xformers efficient implementation, - see https://github.com/MatthieuTPHR/diffusers/blob/d80b531ff8060ec1ea982b65a1b8df70f73aa67c/src/diffusers/models/attention.py#L223 - Note: this is a single-head self-attention operation - """ - # - def __init__(self, in_channels): - super().__init__() - self.in_channels = in_channels - - self.norm = Normalize(in_channels) - self.q = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.k = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.v = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.proj_out = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.attention_op: Optional[Any] = None - - def forward(self, x): - h_ = x - h_ = self.norm(h_) - q = self.q(h_) - k = self.k(h_) - v = self.v(h_) - - # compute attention - B, C, H, W = q.shape - q, k, v = map(lambda x: rearrange(x, 'b c h w -> b (h w) c'), (q, k, v)) - - q, k, v = map( - lambda t: t.unsqueeze(3) - .reshape(B, t.shape[1], 1, C) - .permute(0, 2, 1, 3) - .reshape(B * 1, t.shape[1], C) - .contiguous(), - (q, k, v), - ) - out = xformers.ops.memory_efficient_attention(q, k, v, attn_bias=None, op=self.attention_op) - - out = ( - out.unsqueeze(0) - .reshape(B, 1, out.shape[1], C) - .permute(0, 2, 1, 3) - .reshape(B, out.shape[1], C) - ) - out = rearrange(out, 'b (h w) c -> b c h w', b=B, h=H, w=W, c=C) - out = self.proj_out(out) - return x+out - - -class MemoryEfficientCrossAttentionWrapper(MemoryEfficientCrossAttention): - def forward(self, x, context=None, mask=None): - b, c, h, w = x.shape - x = rearrange(x, 'b c h w -> b (h w) c') - out = super().forward(x, context=context, mask=mask) - out = rearrange(out, 'b (h w) c -> b c h w', h=h, w=w, c=c) - return x + out - - -def make_attn(in_channels, attn_type="vanilla", attn_kwargs=None): - assert attn_type in ["vanilla", "vanilla-xformers", "memory-efficient-cross-attn", "linear", "none"], f'attn_type {attn_type} unknown' - if XFORMERS_IS_AVAILBLE and attn_type == "vanilla": - attn_type = "vanilla-xformers" - print(f"making attention of type '{attn_type}' with {in_channels} in_channels") - if attn_type == "vanilla": - assert attn_kwargs is None - return AttnBlock(in_channels) - elif attn_type == "vanilla-xformers": - print(f"building MemoryEfficientAttnBlock with {in_channels} in_channels...") - return MemoryEfficientAttnBlock(in_channels) - elif type == "memory-efficient-cross-attn": - attn_kwargs["query_dim"] = in_channels - return MemoryEfficientCrossAttentionWrapper(**attn_kwargs) - elif attn_type == "none": - return nn.Identity(in_channels) - else: - raise NotImplementedError() - - -class Model(nn.Module): - def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, - attn_resolutions, dropout=0.0, resamp_with_conv=True, in_channels, - resolution, use_timestep=True, use_linear_attn=False, attn_type="vanilla"): - super().__init__() - if use_linear_attn: attn_type = "linear" - self.ch = ch - self.temb_ch = self.ch*4 - self.num_resolutions = len(ch_mult) - self.num_res_blocks = num_res_blocks - self.resolution = resolution - self.in_channels = in_channels - - self.use_timestep = use_timestep - if self.use_timestep: - # timestep embedding - self.temb = nn.Module() - self.temb.dense = nn.ModuleList([ - torch.nn.Linear(self.ch, - self.temb_ch), - torch.nn.Linear(self.temb_ch, - self.temb_ch), - ]) - - # downsampling - self.conv_in = torch.nn.Conv2d(in_channels, - self.ch, - kernel_size=3, - stride=1, - padding=1) - - curr_res = resolution - in_ch_mult = (1,)+tuple(ch_mult) - self.down = nn.ModuleList() - for i_level in range(self.num_resolutions): - block = nn.ModuleList() - attn = nn.ModuleList() - block_in = ch*in_ch_mult[i_level] - block_out = ch*ch_mult[i_level] - for i_block in range(self.num_res_blocks): - block.append(ResnetBlock(in_channels=block_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - if curr_res in attn_resolutions: - attn.append(make_attn(block_in, attn_type=attn_type)) - down = nn.Module() - down.block = block - down.attn = attn - if i_level != self.num_resolutions-1: - down.downsample = Downsample(block_in, resamp_with_conv) - curr_res = curr_res // 2 - self.down.append(down) - - # middle - self.mid = nn.Module() - self.mid.block_1 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - self.mid.attn_1 = make_attn(block_in, attn_type=attn_type) - self.mid.block_2 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - - # upsampling - self.up = nn.ModuleList() - for i_level in reversed(range(self.num_resolutions)): - block = nn.ModuleList() - attn = nn.ModuleList() - block_out = ch*ch_mult[i_level] - skip_in = ch*ch_mult[i_level] - for i_block in range(self.num_res_blocks+1): - if i_block == self.num_res_blocks: - skip_in = ch*in_ch_mult[i_level] - block.append(ResnetBlock(in_channels=block_in+skip_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - if curr_res in attn_resolutions: - attn.append(make_attn(block_in, attn_type=attn_type)) - up = nn.Module() - up.block = block - up.attn = attn - if i_level != 0: - up.upsample = Upsample(block_in, resamp_with_conv) - curr_res = curr_res * 2 - self.up.insert(0, up) # prepend to get consistent order - - # end - self.norm_out = Normalize(block_in) - self.conv_out = torch.nn.Conv2d(block_in, - out_ch, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x, t=None, context=None): - #assert x.shape[2] == x.shape[3] == self.resolution - if context is not None: - # assume aligned context, cat along channel axis - x = torch.cat((x, context), dim=1) - if self.use_timestep: - # timestep embedding - assert t is not None - temb = get_timestep_embedding(t, self.ch) - temb = self.temb.dense[0](temb) - temb = nonlinearity(temb) - temb = self.temb.dense[1](temb) - else: - temb = None - - # downsampling - hs = [self.conv_in(x)] - for i_level in range(self.num_resolutions): - for i_block in range(self.num_res_blocks): - h = self.down[i_level].block[i_block](hs[-1], temb) - if len(self.down[i_level].attn) > 0: - h = self.down[i_level].attn[i_block](h) - hs.append(h) - if i_level != self.num_resolutions-1: - hs.append(self.down[i_level].downsample(hs[-1])) - - # middle - h = hs[-1] - h = self.mid.block_1(h, temb) - h = self.mid.attn_1(h) - h = self.mid.block_2(h, temb) - - # upsampling - for i_level in reversed(range(self.num_resolutions)): - for i_block in range(self.num_res_blocks+1): - h = self.up[i_level].block[i_block]( - torch.cat([h, hs.pop()], dim=1), temb) - if len(self.up[i_level].attn) > 0: - h = self.up[i_level].attn[i_block](h) - if i_level != 0: - h = self.up[i_level].upsample(h) - - # end - h = self.norm_out(h) - h = nonlinearity(h) - h = self.conv_out(h) - return h - - def get_last_layer(self): - return self.conv_out.weight - - -class Encoder(nn.Module): - def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, - attn_resolutions, dropout=0.0, resamp_with_conv=True, in_channels, - resolution, z_channels, double_z=True, use_linear_attn=False, attn_type="vanilla", - **ignore_kwargs): - super().__init__() - if use_linear_attn: attn_type = "linear" - self.ch = ch - self.temb_ch = 0 - self.num_resolutions = len(ch_mult) - self.num_res_blocks = num_res_blocks - self.resolution = resolution - self.in_channels = in_channels - - # downsampling - self.conv_in = torch.nn.Conv2d(in_channels, - self.ch, - kernel_size=3, - stride=1, - padding=1) - - curr_res = resolution - in_ch_mult = (1,)+tuple(ch_mult) - self.in_ch_mult = in_ch_mult - self.down = nn.ModuleList() - for i_level in range(self.num_resolutions): - block = nn.ModuleList() - attn = nn.ModuleList() - block_in = ch*in_ch_mult[i_level] - block_out = ch*ch_mult[i_level] - for i_block in range(self.num_res_blocks): - block.append(ResnetBlock(in_channels=block_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - if curr_res in attn_resolutions: - attn.append(make_attn(block_in, attn_type=attn_type)) - down = nn.Module() - down.block = block - down.attn = attn - if i_level != self.num_resolutions-1: - down.downsample = Downsample(block_in, resamp_with_conv) - curr_res = curr_res // 2 - self.down.append(down) - - # middle - self.mid = nn.Module() - self.mid.block_1 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - self.mid.attn_1 = make_attn(block_in, attn_type=attn_type) - self.mid.block_2 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - - # end - self.norm_out = Normalize(block_in) - self.conv_out = torch.nn.Conv2d(block_in, - 2*z_channels if double_z else z_channels, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x): - # timestep embedding - temb = None - - # downsampling - hs = [self.conv_in(x)] - for i_level in range(self.num_resolutions): - for i_block in range(self.num_res_blocks): - h = self.down[i_level].block[i_block](hs[-1], temb) - if len(self.down[i_level].attn) > 0: - h = self.down[i_level].attn[i_block](h) - hs.append(h) - if i_level != self.num_resolutions-1: - hs.append(self.down[i_level].downsample(hs[-1])) - - # middle - h = hs[-1] - h = self.mid.block_1(h, temb) - h = self.mid.attn_1(h) - h = self.mid.block_2(h, temb) - - # end - h = self.norm_out(h) - h = nonlinearity(h) - h = self.conv_out(h) - return h - - -class Decoder(nn.Module): - def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, - attn_resolutions, dropout=0.0, resamp_with_conv=True, in_channels, - resolution, z_channels, give_pre_end=False, tanh_out=False, use_linear_attn=False, - attn_type="vanilla", **ignorekwargs): - super().__init__() - if use_linear_attn: attn_type = "linear" - self.ch = ch - self.temb_ch = 0 - self.num_resolutions = len(ch_mult) - self.num_res_blocks = num_res_blocks - self.resolution = resolution - self.in_channels = in_channels - self.give_pre_end = give_pre_end - self.tanh_out = tanh_out - - # compute in_ch_mult, block_in and curr_res at lowest res - in_ch_mult = (1,)+tuple(ch_mult) - block_in = ch*ch_mult[self.num_resolutions-1] - curr_res = resolution // 2**(self.num_resolutions-1) - self.z_shape = (1,z_channels,curr_res,curr_res) - print("Working with z of shape {} = {} dimensions.".format( - self.z_shape, np.prod(self.z_shape))) - - # z to block_in - self.conv_in = torch.nn.Conv2d(z_channels, - block_in, - kernel_size=3, - stride=1, - padding=1) - - # middle - self.mid = nn.Module() - self.mid.block_1 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - self.mid.attn_1 = make_attn(block_in, attn_type=attn_type) - self.mid.block_2 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - - # upsampling - self.up = nn.ModuleList() - for i_level in reversed(range(self.num_resolutions)): - block = nn.ModuleList() - attn = nn.ModuleList() - block_out = ch*ch_mult[i_level] - for i_block in range(self.num_res_blocks+1): - block.append(ResnetBlock(in_channels=block_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - if curr_res in attn_resolutions: - attn.append(make_attn(block_in, attn_type=attn_type)) - up = nn.Module() - up.block = block - up.attn = attn - if i_level != 0: - up.upsample = Upsample(block_in, resamp_with_conv) - curr_res = curr_res * 2 - self.up.insert(0, up) # prepend to get consistent order - - # end - self.norm_out = Normalize(block_in) - self.conv_out = torch.nn.Conv2d(block_in, - out_ch, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, z): - #assert z.shape[1:] == self.z_shape[1:] - self.last_z_shape = z.shape - - # timestep embedding - temb = None - - # z to block_in - h = self.conv_in(z) - - # middle - h = self.mid.block_1(h, temb) - h = self.mid.attn_1(h) - h = self.mid.block_2(h, temb) - - # upsampling - for i_level in reversed(range(self.num_resolutions)): - for i_block in range(self.num_res_blocks+1): - h = self.up[i_level].block[i_block](h, temb) - if len(self.up[i_level].attn) > 0: - h = self.up[i_level].attn[i_block](h) - if i_level != 0: - h = self.up[i_level].upsample(h) - - # end - if self.give_pre_end: - return h - - h = self.norm_out(h) - h = nonlinearity(h) - h = self.conv_out(h) - if self.tanh_out: - h = torch.tanh(h) - return h - - -class SimpleDecoder(nn.Module): - def __init__(self, in_channels, out_channels, *args, **kwargs): - super().__init__() - self.model = nn.ModuleList([nn.Conv2d(in_channels, in_channels, 1), - ResnetBlock(in_channels=in_channels, - out_channels=2 * in_channels, - temb_channels=0, dropout=0.0), - ResnetBlock(in_channels=2 * in_channels, - out_channels=4 * in_channels, - temb_channels=0, dropout=0.0), - ResnetBlock(in_channels=4 * in_channels, - out_channels=2 * in_channels, - temb_channels=0, dropout=0.0), - nn.Conv2d(2*in_channels, in_channels, 1), - Upsample(in_channels, with_conv=True)]) - # end - self.norm_out = Normalize(in_channels) - self.conv_out = torch.nn.Conv2d(in_channels, - out_channels, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x): - for i, layer in enumerate(self.model): - if i in [1,2,3]: - x = layer(x, None) - else: - x = layer(x) - - h = self.norm_out(x) - h = nonlinearity(h) - x = self.conv_out(h) - return x - - -class UpsampleDecoder(nn.Module): - def __init__(self, in_channels, out_channels, ch, num_res_blocks, resolution, - ch_mult=(2,2), dropout=0.0): - super().__init__() - # upsampling - self.temb_ch = 0 - self.num_resolutions = len(ch_mult) - self.num_res_blocks = num_res_blocks - block_in = in_channels - curr_res = resolution // 2 ** (self.num_resolutions - 1) - self.res_blocks = nn.ModuleList() - self.upsample_blocks = nn.ModuleList() - for i_level in range(self.num_resolutions): - res_block = [] - block_out = ch * ch_mult[i_level] - for i_block in range(self.num_res_blocks + 1): - res_block.append(ResnetBlock(in_channels=block_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - self.res_blocks.append(nn.ModuleList(res_block)) - if i_level != self.num_resolutions - 1: - self.upsample_blocks.append(Upsample(block_in, True)) - curr_res = curr_res * 2 - - # end - self.norm_out = Normalize(block_in) - self.conv_out = torch.nn.Conv2d(block_in, - out_channels, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x): - # upsampling - h = x - for k, i_level in enumerate(range(self.num_resolutions)): - for i_block in range(self.num_res_blocks + 1): - h = self.res_blocks[i_level][i_block](h, None) - if i_level != self.num_resolutions - 1: - h = self.upsample_blocks[k](h) - h = self.norm_out(h) - h = nonlinearity(h) - h = self.conv_out(h) - return h - - -class LatentRescaler(nn.Module): - def __init__(self, factor, in_channels, mid_channels, out_channels, depth=2): - super().__init__() - # residual block, interpolate, residual block - self.factor = factor - self.conv_in = nn.Conv2d(in_channels, - mid_channels, - kernel_size=3, - stride=1, - padding=1) - self.res_block1 = nn.ModuleList([ResnetBlock(in_channels=mid_channels, - out_channels=mid_channels, - temb_channels=0, - dropout=0.0) for _ in range(depth)]) - self.attn = AttnBlock(mid_channels) - self.res_block2 = nn.ModuleList([ResnetBlock(in_channels=mid_channels, - out_channels=mid_channels, - temb_channels=0, - dropout=0.0) for _ in range(depth)]) - - self.conv_out = nn.Conv2d(mid_channels, - out_channels, - kernel_size=1, - ) - - def forward(self, x): - x = self.conv_in(x) - for block in self.res_block1: - x = block(x, None) - x = torch.nn.functional.interpolate(x, size=(int(round(x.shape[2]*self.factor)), int(round(x.shape[3]*self.factor)))) - x = self.attn(x) - for block in self.res_block2: - x = block(x, None) - x = self.conv_out(x) - return x - - -class MergedRescaleEncoder(nn.Module): - def __init__(self, in_channels, ch, resolution, out_ch, num_res_blocks, - attn_resolutions, dropout=0.0, resamp_with_conv=True, - ch_mult=(1,2,4,8), rescale_factor=1.0, rescale_module_depth=1): - super().__init__() - intermediate_chn = ch * ch_mult[-1] - self.encoder = Encoder(in_channels=in_channels, num_res_blocks=num_res_blocks, ch=ch, ch_mult=ch_mult, - z_channels=intermediate_chn, double_z=False, resolution=resolution, - attn_resolutions=attn_resolutions, dropout=dropout, resamp_with_conv=resamp_with_conv, - out_ch=None) - self.rescaler = LatentRescaler(factor=rescale_factor, in_channels=intermediate_chn, - mid_channels=intermediate_chn, out_channels=out_ch, depth=rescale_module_depth) - - def forward(self, x): - x = self.encoder(x) - x = self.rescaler(x) - return x - - -class MergedRescaleDecoder(nn.Module): - def __init__(self, z_channels, out_ch, resolution, num_res_blocks, attn_resolutions, ch, ch_mult=(1,2,4,8), - dropout=0.0, resamp_with_conv=True, rescale_factor=1.0, rescale_module_depth=1): - super().__init__() - tmp_chn = z_channels*ch_mult[-1] - self.decoder = Decoder(out_ch=out_ch, z_channels=tmp_chn, attn_resolutions=attn_resolutions, dropout=dropout, - resamp_with_conv=resamp_with_conv, in_channels=None, num_res_blocks=num_res_blocks, - ch_mult=ch_mult, resolution=resolution, ch=ch) - self.rescaler = LatentRescaler(factor=rescale_factor, in_channels=z_channels, mid_channels=tmp_chn, - out_channels=tmp_chn, depth=rescale_module_depth) - - def forward(self, x): - x = self.rescaler(x) - x = self.decoder(x) - return x - - -class Upsampler(nn.Module): - def __init__(self, in_size, out_size, in_channels, out_channels, ch_mult=2): - super().__init__() - assert out_size >= in_size - num_blocks = int(np.log2(out_size//in_size))+1 - factor_up = 1.+ (out_size % in_size) - print(f"Building {self.__class__.__name__} with in_size: {in_size} --> out_size {out_size} and factor {factor_up}") - self.rescaler = LatentRescaler(factor=factor_up, in_channels=in_channels, mid_channels=2*in_channels, - out_channels=in_channels) - self.decoder = Decoder(out_ch=out_channels, resolution=out_size, z_channels=in_channels, num_res_blocks=2, - attn_resolutions=[], in_channels=None, ch=in_channels, - ch_mult=[ch_mult for _ in range(num_blocks)]) - - def forward(self, x): - x = self.rescaler(x) - x = self.decoder(x) - return x - - -class Resize(nn.Module): - def __init__(self, in_channels=None, learned=False, mode="bilinear"): - super().__init__() - self.with_conv = learned - self.mode = mode - if self.with_conv: - print(f"Note: {self.__class__.__name} uses learned downsampling and will ignore the fixed {mode} mode") - raise NotImplementedError() - assert in_channels is not None - # no asymmetric padding in torch conv, must do it ourselves - self.conv = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=4, - stride=2, - padding=1) - - def forward(self, x, scale_factor=1.0): - if scale_factor==1.0: - return x - else: - x = torch.nn.functional.interpolate(x, mode=self.mode, align_corners=False, scale_factor=scale_factor) - return x diff --git a/spaces/Toritto/Genshin-impact-IA-project-v1/vc_infer_pipeline.py b/spaces/Toritto/Genshin-impact-IA-project-v1/vc_infer_pipeline.py deleted file mode 100644 index 82c15f59a8072e1b317fa1d750ccc1b814a6989d..0000000000000000000000000000000000000000 --- a/spaces/Toritto/Genshin-impact-IA-project-v1/vc_infer_pipeline.py +++ /dev/null @@ -1,443 +0,0 @@ -import numpy as np, parselmouth, torch, pdb, sys, os -from time import time as ttime -import torch.nn.functional as F -import scipy.signal as signal -import pyworld, os, traceback, faiss, librosa, torchcrepe -from scipy import signal -from functools import lru_cache - -now_dir = os.getcwd() -sys.path.append(now_dir) - -bh, ah = signal.butter(N=5, Wn=48, btype="high", fs=16000) - -input_audio_path2wav = {} - - -@lru_cache -def cache_harvest_f0(input_audio_path, fs, f0max, f0min, frame_period): - audio = input_audio_path2wav[input_audio_path] - f0, t = pyworld.harvest( - audio, - fs=fs, - f0_ceil=f0max, - f0_floor=f0min, - frame_period=frame_period, - ) - f0 = pyworld.stonemask(audio, f0, t, fs) - return f0 - - -def change_rms(data1, sr1, data2, sr2, rate): # 1是输入音频,2是输出音频,rate是2的占比 - # print(data1.max(),data2.max()) - rms1 = librosa.feature.rms( - y=data1, frame_length=sr1 // 2 * 2, hop_length=sr1 // 2 - ) # 每半秒一个点 - rms2 = librosa.feature.rms(y=data2, frame_length=sr2 // 2 * 2, hop_length=sr2 // 2) - rms1 = torch.from_numpy(rms1) - rms1 = F.interpolate( - rms1.unsqueeze(0), size=data2.shape[0], mode="linear" - ).squeeze() - rms2 = torch.from_numpy(rms2) - rms2 = F.interpolate( - rms2.unsqueeze(0), size=data2.shape[0], mode="linear" - ).squeeze() - rms2 = torch.max(rms2, torch.zeros_like(rms2) + 1e-6) - data2 *= ( - torch.pow(rms1, torch.tensor(1 - rate)) - * torch.pow(rms2, torch.tensor(rate - 1)) - ).numpy() - return data2 - - -class VC(object): - def __init__(self, tgt_sr, config): - self.x_pad, self.x_query, self.x_center, self.x_max, self.is_half = ( - config.x_pad, - config.x_query, - config.x_center, - config.x_max, - config.is_half, - ) - self.sr = 16000 # hubert输入采样率 - self.window = 160 # 每帧点数 - self.t_pad = self.sr * self.x_pad # 每条前后pad时间 - self.t_pad_tgt = tgt_sr * self.x_pad - self.t_pad2 = self.t_pad * 2 - self.t_query = self.sr * self.x_query # 查询切点前后查询时间 - self.t_center = self.sr * self.x_center # 查询切点位置 - self.t_max = self.sr * self.x_max # 免查询时长阈值 - self.device = config.device - - def get_f0( - self, - input_audio_path, - x, - p_len, - f0_up_key, - f0_method, - filter_radius, - inp_f0=None, - ): - global input_audio_path2wav - time_step = self.window / self.sr * 1000 - f0_min = 50 - f0_max = 1100 - f0_mel_min = 1127 * np.log(1 + f0_min / 700) - f0_mel_max = 1127 * np.log(1 + f0_max / 700) - if f0_method == "pm": - f0 = ( - parselmouth.Sound(x, self.sr) - .to_pitch_ac( - time_step=time_step / 1000, - voicing_threshold=0.6, - pitch_floor=f0_min, - pitch_ceiling=f0_max, - ) - .selected_array["frequency"] - ) - pad_size = (p_len - len(f0) + 1) // 2 - if pad_size > 0 or p_len - len(f0) - pad_size > 0: - f0 = np.pad( - f0, [[pad_size, p_len - len(f0) - pad_size]], mode="constant" - ) - elif f0_method == "harvest": - input_audio_path2wav[input_audio_path] = x.astype(np.double) - f0 = cache_harvest_f0(input_audio_path, self.sr, f0_max, f0_min, 10) - if filter_radius > 2: - f0 = signal.medfilt(f0, 3) - elif f0_method == "crepe": - model = "full" - # Pick a batch size that doesn't cause memory errors on your gpu - batch_size = 512 - # Compute pitch using first gpu - audio = torch.tensor(np.copy(x))[None].float() - f0, pd = torchcrepe.predict( - audio, - self.sr, - self.window, - f0_min, - f0_max, - model, - batch_size=batch_size, - device=self.device, - return_periodicity=True, - ) - pd = torchcrepe.filter.median(pd, 3) - f0 = torchcrepe.filter.mean(f0, 3) - f0[pd < 0.1] = 0 - f0 = f0[0].cpu().numpy() - elif f0_method == "rmvpe": - if hasattr(self, "model_rmvpe") == False: - from rmvpe import RMVPE - - print("loading rmvpe model") - self.model_rmvpe = RMVPE( - "rmvpe.pt", is_half=self.is_half, device=self.device - ) - f0 = self.model_rmvpe.infer_from_audio(x, thred=0.03) - f0 *= pow(2, f0_up_key / 12) - # with open("test.txt","w")as f:f.write("\n".join([str(i)for i in f0.tolist()])) - tf0 = self.sr // self.window # 每秒f0点数 - if inp_f0 is not None: - delta_t = np.round( - (inp_f0[:, 0].max() - inp_f0[:, 0].min()) * tf0 + 1 - ).astype("int16") - replace_f0 = np.interp( - list(range(delta_t)), inp_f0[:, 0] * 100, inp_f0[:, 1] - ) - shape = f0[self.x_pad * tf0 : self.x_pad * tf0 + len(replace_f0)].shape[0] - f0[self.x_pad * tf0 : self.x_pad * tf0 + len(replace_f0)] = replace_f0[ - :shape - ] - # with open("test_opt.txt","w")as f:f.write("\n".join([str(i)for i in f0.tolist()])) - f0bak = f0.copy() - f0_mel = 1127 * np.log(1 + f0 / 700) - f0_mel[f0_mel > 0] = (f0_mel[f0_mel > 0] - f0_mel_min) * 254 / ( - f0_mel_max - f0_mel_min - ) + 1 - f0_mel[f0_mel <= 1] = 1 - f0_mel[f0_mel > 255] = 255 - f0_coarse = np.rint(f0_mel).astype(np.int) - return f0_coarse, f0bak # 1-0 - - def vc( - self, - model, - net_g, - sid, - audio0, - pitch, - pitchf, - times, - index, - big_npy, - index_rate, - version, - protect, - ): # ,file_index,file_big_npy - feats = torch.from_numpy(audio0) - if self.is_half: - feats = feats.half() - else: - feats = feats.float() - if feats.dim() == 2: # double channels - feats = feats.mean(-1) - assert feats.dim() == 1, feats.dim() - feats = feats.view(1, -1) - padding_mask = torch.BoolTensor(feats.shape).to(self.device).fill_(False) - - inputs = { - "source": feats.to(self.device), - "padding_mask": padding_mask, - "output_layer": 9 if version == "v1" else 12, - } - t0 = ttime() - with torch.no_grad(): - logits = model.extract_features(**inputs) - feats = model.final_proj(logits[0]) if version == "v1" else logits[0] - if protect < 0.5 and pitch != None and pitchf != None: - feats0 = feats.clone() - if ( - isinstance(index, type(None)) == False - and isinstance(big_npy, type(None)) == False - and index_rate != 0 - ): - npy = feats[0].cpu().numpy() - if self.is_half: - npy = npy.astype("float32") - - # _, I = index.search(npy, 1) - # npy = big_npy[I.squeeze()] - - score, ix = index.search(npy, k=8) - weight = np.square(1 / score) - weight /= weight.sum(axis=1, keepdims=True) - npy = np.sum(big_npy[ix] * np.expand_dims(weight, axis=2), axis=1) - - if self.is_half: - npy = npy.astype("float16") - feats = ( - torch.from_numpy(npy).unsqueeze(0).to(self.device) * index_rate - + (1 - index_rate) * feats - ) - - feats = F.interpolate(feats.permute(0, 2, 1), scale_factor=2).permute(0, 2, 1) - if protect < 0.5 and pitch != None and pitchf != None: - feats0 = F.interpolate(feats0.permute(0, 2, 1), scale_factor=2).permute( - 0, 2, 1 - ) - t1 = ttime() - p_len = audio0.shape[0] // self.window - if feats.shape[1] < p_len: - p_len = feats.shape[1] - if pitch != None and pitchf != None: - pitch = pitch[:, :p_len] - pitchf = pitchf[:, :p_len] - - if protect < 0.5 and pitch != None and pitchf != None: - pitchff = pitchf.clone() - pitchff[pitchf > 0] = 1 - pitchff[pitchf < 1] = protect - pitchff = pitchff.unsqueeze(-1) - feats = feats * pitchff + feats0 * (1 - pitchff) - feats = feats.to(feats0.dtype) - p_len = torch.tensor([p_len], device=self.device).long() - with torch.no_grad(): - if pitch != None and pitchf != None: - audio1 = ( - (net_g.infer(feats, p_len, pitch, pitchf, sid)[0][0, 0]) - .data.cpu() - .float() - .numpy() - ) - else: - audio1 = ( - (net_g.infer(feats, p_len, sid)[0][0, 0]).data.cpu().float().numpy() - ) - del feats, p_len, padding_mask - if torch.cuda.is_available(): - torch.cuda.empty_cache() - t2 = ttime() - times[0] += t1 - t0 - times[2] += t2 - t1 - return audio1 - - def pipeline( - self, - model, - net_g, - sid, - audio, - input_audio_path, - times, - f0_up_key, - f0_method, - file_index, - # file_big_npy, - index_rate, - if_f0, - filter_radius, - tgt_sr, - resample_sr, - rms_mix_rate, - version, - protect, - f0_file=None, - ): - if ( - file_index != "" - # and file_big_npy != "" - # and os.path.exists(file_big_npy) == True - and os.path.exists(file_index) == True - and index_rate != 0 - ): - try: - index = faiss.read_index(file_index) - # big_npy = np.load(file_big_npy) - big_npy = index.reconstruct_n(0, index.ntotal) - except: - traceback.print_exc() - index = big_npy = None - else: - index = big_npy = None - audio = signal.filtfilt(bh, ah, audio) - audio_pad = np.pad(audio, (self.window // 2, self.window // 2), mode="reflect") - opt_ts = [] - if audio_pad.shape[0] > self.t_max: - audio_sum = np.zeros_like(audio) - for i in range(self.window): - audio_sum += audio_pad[i : i - self.window] - for t in range(self.t_center, audio.shape[0], self.t_center): - opt_ts.append( - t - - self.t_query - + np.where( - np.abs(audio_sum[t - self.t_query : t + self.t_query]) - == np.abs(audio_sum[t - self.t_query : t + self.t_query]).min() - )[0][0] - ) - s = 0 - audio_opt = [] - t = None - t1 = ttime() - audio_pad = np.pad(audio, (self.t_pad, self.t_pad), mode="reflect") - p_len = audio_pad.shape[0] // self.window - inp_f0 = None - if hasattr(f0_file, "name") == True: - try: - with open(f0_file.name, "r") as f: - lines = f.read().strip("\n").split("\n") - inp_f0 = [] - for line in lines: - inp_f0.append([float(i) for i in line.split(",")]) - inp_f0 = np.array(inp_f0, dtype="float32") - except: - traceback.print_exc() - sid = torch.tensor(sid, device=self.device).unsqueeze(0).long() - pitch, pitchf = None, None - if if_f0 == 1: - pitch, pitchf = self.get_f0( - input_audio_path, - audio_pad, - p_len, - f0_up_key, - f0_method, - filter_radius, - inp_f0, - ) - pitch = pitch[:p_len] - pitchf = pitchf[:p_len] - if self.device == "mps": - pitchf = pitchf.astype(np.float32) - pitch = torch.tensor(pitch, device=self.device).unsqueeze(0).long() - pitchf = torch.tensor(pitchf, device=self.device).unsqueeze(0).float() - t2 = ttime() - times[1] += t2 - t1 - for t in opt_ts: - t = t // self.window * self.window - if if_f0 == 1: - audio_opt.append( - self.vc( - model, - net_g, - sid, - audio_pad[s : t + self.t_pad2 + self.window], - pitch[:, s // self.window : (t + self.t_pad2) // self.window], - pitchf[:, s // self.window : (t + self.t_pad2) // self.window], - times, - index, - big_npy, - index_rate, - version, - protect, - )[self.t_pad_tgt : -self.t_pad_tgt] - ) - else: - audio_opt.append( - self.vc( - model, - net_g, - sid, - audio_pad[s : t + self.t_pad2 + self.window], - None, - None, - times, - index, - big_npy, - index_rate, - version, - protect, - )[self.t_pad_tgt : -self.t_pad_tgt] - ) - s = t - if if_f0 == 1: - audio_opt.append( - self.vc( - model, - net_g, - sid, - audio_pad[t:], - pitch[:, t // self.window :] if t is not None else pitch, - pitchf[:, t // self.window :] if t is not None else pitchf, - times, - index, - big_npy, - index_rate, - version, - protect, - )[self.t_pad_tgt : -self.t_pad_tgt] - ) - else: - audio_opt.append( - self.vc( - model, - net_g, - sid, - audio_pad[t:], - None, - None, - times, - index, - big_npy, - index_rate, - version, - protect, - )[self.t_pad_tgt : -self.t_pad_tgt] - ) - audio_opt = np.concatenate(audio_opt) - if rms_mix_rate != 1: - audio_opt = change_rms(audio, 16000, audio_opt, tgt_sr, rms_mix_rate) - if resample_sr >= 16000 and tgt_sr != resample_sr: - audio_opt = librosa.resample( - audio_opt, orig_sr=tgt_sr, target_sr=resample_sr - ) - audio_max = np.abs(audio_opt).max() / 0.99 - max_int16 = 32768 - if audio_max > 1: - max_int16 /= audio_max - audio_opt = (audio_opt * max_int16).astype(np.int16) - del pitch, pitchf, sid - if torch.cuda.is_available(): - torch.cuda.empty_cache() - return audio_opt diff --git a/spaces/VISION23/V23ChatBot/README.md b/spaces/VISION23/V23ChatBot/README.md deleted file mode 100644 index ab64b3a1f8b2d6b9a6bab7a14ee339e076b29327..0000000000000000000000000000000000000000 --- a/spaces/VISION23/V23ChatBot/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: V23ChatBot -emoji: 🏢 -colorFrom: gray -colorTo: indigo -sdk: gradio -sdk_version: 3.15.0 -app_file: app.py -pinned: false -license: other ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/VickyKira/NASAGPT/g4f/Provider/Providers/Theb.py b/spaces/VickyKira/NASAGPT/g4f/Provider/Providers/Theb.py deleted file mode 100644 index aa43ebc55d74ffaa722fe008424fce97c622a323..0000000000000000000000000000000000000000 --- a/spaces/VickyKira/NASAGPT/g4f/Provider/Providers/Theb.py +++ /dev/null @@ -1,28 +0,0 @@ -import os -import json -import time -import subprocess - -from ...typing import sha256, Dict, get_type_hints - -url = 'https://theb.ai' -model = ['gpt-3.5-turbo'] -supports_stream = True -needs_auth = False - -def _create_completion(model: str, messages: list, stream: bool, **kwargs): - - path = os.path.dirname(os.path.realpath(__file__)) - config = json.dumps({ - 'messages': messages, - 'model': model}, separators=(',', ':')) - - cmd = ['python3', f'{path}/helpers/theb.py', config] - - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - - for line in iter(p.stdout.readline, b''): - yield line.decode('utf-8') - -params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \ - '(%s)' % ', '.join([f"{name}: {get_type_hints(_create_completion)[name].__name__}" for name in _create_completion.__code__.co_varnames[:_create_completion.__code__.co_argcount]]) \ No newline at end of file diff --git a/spaces/Vision-CAIR/minigpt4/minigpt4/models/mini_gpt4.py b/spaces/Vision-CAIR/minigpt4/minigpt4/models/mini_gpt4.py deleted file mode 100644 index b9f9c269690703a24a258a184e349862cb87ca49..0000000000000000000000000000000000000000 --- a/spaces/Vision-CAIR/minigpt4/minigpt4/models/mini_gpt4.py +++ /dev/null @@ -1,263 +0,0 @@ -""" - Copyright (c) 2023, salesforce.com, inc. - All rights reserved. - SPDX-License-Identifier: BSD-3-Clause - For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause -""" -import logging -import random -import os -import torch -from torch.cuda.amp import autocast as autocast -import torch.nn as nn - -from minigpt4.common.registry import registry -from minigpt4.models.blip2 import Blip2Base, disabled_train -from minigpt4.models.modeling_llama import LlamaForCausalLM -from transformers import LlamaTokenizer - - -@registry.register_model("mini_gpt4") -class MiniGPT4(Blip2Base): - """ - BLIP2 GPT-LLAMA model. - """ - - PRETRAINED_MODEL_CONFIG_DICT = { - "pretrain_vicuna": "configs/models/minigpt4.yaml", - } - - def __init__( - self, - vit_model="eva_clip_g", - q_former_model="https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/blip2_pretrained_flant5xxl.pth", - img_size=224, - drop_path_rate=0, - use_grad_checkpoint=False, - vit_precision="fp16", - freeze_vit=True, - freeze_qformer=True, - num_query_token=32, - llama_model="", - llama_cache_dir='', - prompt_path="", - prompt_template="", - max_txt_len=32, - end_sym='\n', - ): - super().__init__() - - self.tokenizer = self.init_tokenizer() - - print('Loading VIT') - self.visual_encoder, self.ln_vision = self.init_vision_encoder( - vit_model, img_size, drop_path_rate, use_grad_checkpoint, vit_precision - ) - if freeze_vit: - for name, param in self.visual_encoder.named_parameters(): - param.requires_grad = False - self.visual_encoder = self.visual_encoder.eval() - self.visual_encoder.train = disabled_train - for name, param in self.ln_vision.named_parameters(): - param.requires_grad = False - self.ln_vision = self.ln_vision.eval() - self.ln_vision.train = disabled_train - logging.info("freeze vision encoder") - print('Loading VIT Done') - - print('Loading Q-Former') - self.Qformer, self.query_tokens = self.init_Qformer( - num_query_token, self.visual_encoder.num_features - ) - self.Qformer.cls = None - self.Qformer.bert.embeddings.word_embeddings = None - self.Qformer.bert.embeddings.position_embeddings = None - for layer in self.Qformer.bert.encoder.layer: - layer.output = None - layer.intermediate = None - self.load_from_pretrained(url_or_filename=q_former_model) - - if freeze_qformer: - for name, param in self.Qformer.named_parameters(): - param.requires_grad = False - self.Qformer = self.Qformer.eval() - self.Qformer.train = disabled_train - self.query_tokens.requires_grad = False - logging.info("freeze Qformer") - print('Loading Q-Former Done') - - print('Loading LLAMA') - self.llama_tokenizer = LlamaTokenizer.from_pretrained('Vision-CAIR/vicuna-7b', use_fast=False, use_auth_token=True) - self.llama_tokenizer.pad_token = self.llama_tokenizer.eos_token - - if llama_cache_dir: - self.llama_model = LlamaForCausalLM.from_pretrained( - 'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token=True - ) - else: - self.llama_model = LlamaForCausalLM.from_pretrained( - 'Vision-CAIR/vicuna-7b', load_in_8bit=True, torch_dtype=torch.float16, device_map="auto", use_auth_token=True - ) - for name, param in self.llama_model.named_parameters(): - param.requires_grad = False - print('Loading LLAMA Done') - - self.llama_proj = nn.Linear( - self.Qformer.config.hidden_size, self.llama_model.config.hidden_size - ) - self.max_txt_len = max_txt_len - self.end_sym = end_sym - - if prompt_path: - with open(prompt_path, 'r') as f: - raw_prompts = f.read().splitlines() - filted_prompts = [raw_prompt for raw_prompt in raw_prompts if "" in raw_prompt] - self.prompt_list = [prompt_template.format(p) for p in filted_prompts] - print('Load {} training prompts'.format(len(self.prompt_list))) - print('Prompt Example \n{}'.format(random.choice(self.prompt_list))) - else: - self.prompt_list = [] - - def vit_to_cpu(self): - self.ln_vision.to("cpu") - self.ln_vision.float() - self.visual_encoder.to("cpu") - self.visual_encoder.float() - - def encode_img(self, image): - device = image.device - self.vit_to_cpu() - image = image.to("cpu") - with self.maybe_autocast(): - image_embeds = self.ln_vision(self.visual_encoder(image)).to(device) - image_atts = torch.ones(image_embeds.size()[:-1], dtype=torch.long).to(device) - - query_tokens = self.query_tokens.expand(image_embeds.shape[0], -1, -1) - query_output = self.Qformer.bert( - query_embeds=query_tokens, - encoder_hidden_states=image_embeds, - encoder_attention_mask=image_atts, - return_dict=True, - ) - - inputs_llama = self.llama_proj(query_output.last_hidden_state) - atts_llama = torch.ones(inputs_llama.size()[:-1], dtype=torch.long).to(image.device) - return inputs_llama, atts_llama - - def prompt_wrap(self, img_embeds, atts_img, prompt): - if prompt: - batch_size = img_embeds.shape[0] - p_before, p_after = prompt.split('') - p_before_tokens = self.llama_tokenizer( - p_before, return_tensors="pt", add_special_tokens=False).to(img_embeds.device) - p_after_tokens = self.llama_tokenizer( - p_after, return_tensors="pt", add_special_tokens=False).to(img_embeds.device) - p_before_embeds = self.llama_model.model.embed_tokens(p_before_tokens.input_ids).expand(batch_size, -1, -1) - p_after_embeds = self.llama_model.model.embed_tokens(p_after_tokens.input_ids).expand(batch_size, -1, -1) - wrapped_img_embeds = torch.cat([p_before_embeds, img_embeds, p_after_embeds], dim=1) - wrapped_atts_img = atts_img[:, :1].expand(-1, wrapped_img_embeds.shape[1]) - return wrapped_img_embeds, wrapped_atts_img - else: - return img_embeds, atts_img - - def forward(self, samples): - image = samples["image"] - img_embeds, atts_img = self.encode_img(image) - if hasattr(samples, 'question_split'): # VQA dataset - print('VQA Batch') - vqa_prompt = '###Human: ' - img_embeds, atts_img = self.prompt_wrap(img_embeds, atts_img, vqa_prompt) - elif self.prompt_list: - prompt = random.choice(self.prompt_list) - img_embeds, atts_img = self.prompt_wrap(img_embeds, atts_img, prompt) - - self.llama_tokenizer.padding_side = "right" - - text = [t + self.end_sym for t in samples["text_input"]] - - to_regress_tokens = self.llama_tokenizer( - text, - return_tensors="pt", - padding="longest", - truncation=True, - max_length=self.max_txt_len, - add_special_tokens=False - ).to(image.device) - - targets = to_regress_tokens.input_ids.masked_fill( - to_regress_tokens.input_ids == self.llama_tokenizer.pad_token_id, -100 - ) - - empty_targets = ( - torch.ones([atts_img.shape[0], atts_img.shape[1]+1], - dtype=torch.long).to(image.device).fill_(-100) # plus one for bos - ) - targets = torch.cat([empty_targets, targets], dim=1) - - batch_size = img_embeds.shape[0] - bos = torch.ones([batch_size, 1], - dtype=to_regress_tokens.input_ids.dtype, - device=to_regress_tokens.input_ids.device) * self.llama_tokenizer.bos_token_id - bos_embeds = self.llama_model.model.embed_tokens(bos) - atts_bos = atts_img[:, :1] - - to_regress_embeds = self.llama_model.model.embed_tokens(to_regress_tokens.input_ids) - inputs_embeds = torch.cat([bos_embeds, img_embeds, to_regress_embeds], dim=1) - attention_mask = torch.cat([atts_bos, atts_img, to_regress_tokens.attention_mask], dim=1) - - with self.maybe_autocast(): - outputs = self.llama_model( - inputs_embeds=inputs_embeds, - attention_mask=attention_mask, - return_dict=True, - labels=targets, - ) - loss = outputs.loss - - return {"loss": loss} - - @classmethod - def from_config(cls, cfg): - vit_model = cfg.get("vit_model", "eva_clip_g") - q_former_model = cfg.get("q_former_model", "https://storage.googleapis.com/sfr-vision-language-research/LAVIS/models/BLIP2/blip2_pretrained_flant5xxl.pth") - img_size = cfg.get("image_size") - num_query_token = cfg.get("num_query_token") - llama_model = cfg.get("llama_model") - - drop_path_rate = cfg.get("drop_path_rate", 0) - use_grad_checkpoint = cfg.get("use_grad_checkpoint", False) - vit_precision = cfg.get("vit_precision", "fp16") - freeze_vit = cfg.get("freeze_vit", True) - freeze_qformer = cfg.get("freeze_qformer", True) - llama_cache_dir = cfg.get("llama_cache_dir", "") - - prompt_path = cfg.get("prompt_path", "") - prompt_template = cfg.get("prompt_template", "") - max_txt_len = cfg.get("max_txt_len", 32) - end_sym = cfg.get("end_sym", '\n') - - model = cls( - vit_model=vit_model, - q_former_model=q_former_model, - img_size=img_size, - drop_path_rate=drop_path_rate, - use_grad_checkpoint=use_grad_checkpoint, - vit_precision=vit_precision, - freeze_vit=freeze_vit, - freeze_qformer=freeze_qformer, - llama_cache_dir=llama_cache_dir, - num_query_token=num_query_token, - llama_model=llama_model, - prompt_path=prompt_path, - prompt_template=prompt_template, - max_txt_len=max_txt_len, - end_sym=end_sym - ) - - ckpt_path = cfg.get("ckpt", "") # load weights of MiniGPT-4 - if ckpt_path: - print("Load BLIP2-LLM Checkpoint: {}".format(ckpt_path)) - ckpt = torch.load(ckpt_path, map_location="cpu") - msg = model.load_state_dict(ckpt['model'], strict=False) - - return model diff --git a/spaces/Volkopat/SegmentAnythingxGroundingDINO/groundingdino/models/GroundingDINO/backbone/position_encoding.py b/spaces/Volkopat/SegmentAnythingxGroundingDINO/groundingdino/models/GroundingDINO/backbone/position_encoding.py deleted file mode 100644 index eac7e896bbe85a670824bfe8ef487d0535d5bd99..0000000000000000000000000000000000000000 --- a/spaces/Volkopat/SegmentAnythingxGroundingDINO/groundingdino/models/GroundingDINO/backbone/position_encoding.py +++ /dev/null @@ -1,186 +0,0 @@ -# ------------------------------------------------------------------------ -# Grounding DINO -# url: https://github.com/IDEA-Research/GroundingDINO -# Copyright (c) 2023 IDEA. All Rights Reserved. -# Licensed under the Apache License, Version 2.0 [see LICENSE for details] -# ------------------------------------------------------------------------ -# DINO -# Copyright (c) 2022 IDEA. All Rights Reserved. -# Licensed under the Apache License, Version 2.0 [see LICENSE for details] -# ------------------------------------------------------------------------ -# Conditional DETR -# Copyright (c) 2021 Microsoft. All Rights Reserved. -# Licensed under the Apache License, Version 2.0 [see LICENSE for details] -# ------------------------------------------------------------------------ -# Copied from DETR (https://github.com/facebookresearch/detr) -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. -# ------------------------------------------------------------------------ - -""" -Various positional encodings for the transformer. -""" -import math - -import torch -from torch import nn - -from groundingdino.util.misc import NestedTensor - - -class PositionEmbeddingSine(nn.Module): - """ - This is a more standard version of the position embedding, very similar to the one - used by the Attention is all you need paper, generalized to work on images. - """ - - def __init__(self, num_pos_feats=64, temperature=10000, normalize=False, scale=None): - super().__init__() - self.num_pos_feats = num_pos_feats - self.temperature = temperature - self.normalize = normalize - if scale is not None and normalize is False: - raise ValueError("normalize should be True if scale is passed") - if scale is None: - scale = 2 * math.pi - self.scale = scale - - def forward(self, tensor_list: NestedTensor): - x = tensor_list.tensors - mask = tensor_list.mask - assert mask is not None - not_mask = ~mask - y_embed = not_mask.cumsum(1, dtype=torch.float32) - x_embed = not_mask.cumsum(2, dtype=torch.float32) - if self.normalize: - eps = 1e-6 - # if os.environ.get("SHILONG_AMP", None) == '1': - # eps = 1e-4 - # else: - # eps = 1e-6 - y_embed = y_embed / (y_embed[:, -1:, :] + eps) * self.scale - x_embed = x_embed / (x_embed[:, :, -1:] + eps) * self.scale - - dim_t = torch.arange(self.num_pos_feats, dtype=torch.float32, device=x.device) - dim_t = self.temperature ** (2 * (dim_t // 2) / self.num_pos_feats) - - pos_x = x_embed[:, :, :, None] / dim_t - pos_y = y_embed[:, :, :, None] / dim_t - pos_x = torch.stack( - (pos_x[:, :, :, 0::2].sin(), pos_x[:, :, :, 1::2].cos()), dim=4 - ).flatten(3) - pos_y = torch.stack( - (pos_y[:, :, :, 0::2].sin(), pos_y[:, :, :, 1::2].cos()), dim=4 - ).flatten(3) - pos = torch.cat((pos_y, pos_x), dim=3).permute(0, 3, 1, 2) - return pos - - -class PositionEmbeddingSineHW(nn.Module): - """ - This is a more standard version of the position embedding, very similar to the one - used by the Attention is all you need paper, generalized to work on images. - """ - - def __init__( - self, num_pos_feats=64, temperatureH=10000, temperatureW=10000, normalize=False, scale=None - ): - super().__init__() - self.num_pos_feats = num_pos_feats - self.temperatureH = temperatureH - self.temperatureW = temperatureW - self.normalize = normalize - if scale is not None and normalize is False: - raise ValueError("normalize should be True if scale is passed") - if scale is None: - scale = 2 * math.pi - self.scale = scale - - def forward(self, tensor_list: NestedTensor): - x = tensor_list.tensors - mask = tensor_list.mask - assert mask is not None - not_mask = ~mask - y_embed = not_mask.cumsum(1, dtype=torch.float32) - x_embed = not_mask.cumsum(2, dtype=torch.float32) - - # import ipdb; ipdb.set_trace() - - if self.normalize: - eps = 1e-6 - y_embed = y_embed / (y_embed[:, -1:, :] + eps) * self.scale - x_embed = x_embed / (x_embed[:, :, -1:] + eps) * self.scale - - dim_tx = torch.arange(self.num_pos_feats, dtype=torch.float32, device=x.device) - dim_tx = self.temperatureW ** (2 * (torch.div(dim_tx, 2, rounding_mode='floor')) / self.num_pos_feats) - pos_x = x_embed[:, :, :, None] / dim_tx - - dim_ty = torch.arange(self.num_pos_feats, dtype=torch.float32, device=x.device) - dim_ty = self.temperatureH ** (2 * (torch.div(dim_ty, 2, rounding_mode='floor')) / self.num_pos_feats) - pos_y = y_embed[:, :, :, None] / dim_ty - - pos_x = torch.stack( - (pos_x[:, :, :, 0::2].sin(), pos_x[:, :, :, 1::2].cos()), dim=4 - ).flatten(3) - pos_y = torch.stack( - (pos_y[:, :, :, 0::2].sin(), pos_y[:, :, :, 1::2].cos()), dim=4 - ).flatten(3) - pos = torch.cat((pos_y, pos_x), dim=3).permute(0, 3, 1, 2) - - # import ipdb; ipdb.set_trace() - - return pos - - -class PositionEmbeddingLearned(nn.Module): - """ - Absolute pos embedding, learned. - """ - - def __init__(self, num_pos_feats=256): - super().__init__() - self.row_embed = nn.Embedding(50, num_pos_feats) - self.col_embed = nn.Embedding(50, num_pos_feats) - self.reset_parameters() - - def reset_parameters(self): - nn.init.uniform_(self.row_embed.weight) - nn.init.uniform_(self.col_embed.weight) - - def forward(self, tensor_list: NestedTensor): - x = tensor_list.tensors - h, w = x.shape[-2:] - i = torch.arange(w, device=x.device) - j = torch.arange(h, device=x.device) - x_emb = self.col_embed(i) - y_emb = self.row_embed(j) - pos = ( - torch.cat( - [ - x_emb.unsqueeze(0).repeat(h, 1, 1), - y_emb.unsqueeze(1).repeat(1, w, 1), - ], - dim=-1, - ) - .permute(2, 0, 1) - .unsqueeze(0) - .repeat(x.shape[0], 1, 1, 1) - ) - return pos - - -def build_position_encoding(args): - N_steps = args.hidden_dim // 2 - if args.position_embedding in ("v2", "sine"): - # TODO find a better way of exposing other arguments - position_embedding = PositionEmbeddingSineHW( - N_steps, - temperatureH=args.pe_temperatureH, - temperatureW=args.pe_temperatureW, - normalize=True, - ) - elif args.position_embedding in ("v3", "learned"): - position_embedding = PositionEmbeddingLearned(N_steps) - else: - raise ValueError(f"not supported {args.position_embedding}") - - return position_embedding diff --git a/spaces/Wauplin/pynecone-on-spaces-template/default_app/__init__.py b/spaces/Wauplin/pynecone-on-spaces-template/default_app/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/spaces/Widium/Style-Recreation/functions/processing.py b/spaces/Widium/Style-Recreation/functions/processing.py deleted file mode 100644 index c1deff81de3c243cbde86a4018f7b8b46ccacdd6..0000000000000000000000000000000000000000 --- a/spaces/Widium/Style-Recreation/functions/processing.py +++ /dev/null @@ -1,94 +0,0 @@ -# *************************************************************************** # -# # -# processing.py # -# # -# By: Widium # -# Github : https://github.com/widium # -# # -# Created: 2022/11/10 09:10:04 by ebennace # -# Updated: 2023/05/04 11:37:55 by Widium # -# # -# **************************************************************************** ## =============== Import =================== # -import tensorflow as tf -import numpy as np - -from numpy import ndarray -from tensorflow import Tensor -from keras.applications.vgg19 import preprocess_input - -# ======================================== # - -def create_batch_image(img : Tensor): - """ - Create a batch of images with a single image by expanding its dimensions. - - Args: - img: The input image as a tensor. - - Returns: - Tensor: The batched image tensor. - """ - img = tf.expand_dims(tf.constant(img),axis=0) - return (img) - -# ======================================== # - -def remove_batch_dimension(array : ndarray): - """Remove the batch dimension from a NumPy array. - - Args: - array: The input NumPy array with a batch dimension. - - Returns: - np.ndarray: The reshaped array without the batch dimension. - """ - array = np.reshape(array, (array.shape[1], array.shape[2], array.shape[3])) - return (array) - -# ======================================== # - -def preprocessing_img(img : Tensor): - """ - Preprocess an image for input into a VGG network. - - Args: - img: The input image as a tensor. - - Returns: - Tensor: The preprocessed image tensor. - """ - img = inverse_normalize_image(img) - preprocessed_img = preprocess_input(img) - return preprocessed_img - -# ======================================== # - -def Normalize_image(img : Tensor): - """ - Normalize an image by dividing its pixel values by 255. - - Args: - img: The input image as a tensor. - - Returns: - Tensor: The normalized image tensor. - """ - img = img / 255. - return (img) - -# ======================================== # - -def inverse_normalize_image(img : Tensor): - """ - Inverse the normalization of an image by multiplying its pixel values by 255. - - Args: - img: The input image as a tensor. - - Returns: - Tensor: The denormalized image tensor. - """ - img = img * 255 - return (img) - -# ======================================== # \ No newline at end of file diff --git a/spaces/XlalalaX/VITS-Umamusume-voice-synthesizer/text/korean.py b/spaces/XlalalaX/VITS-Umamusume-voice-synthesizer/text/korean.py deleted file mode 100644 index edee07429a450c55e3d8e246997faaa1e0b89cc9..0000000000000000000000000000000000000000 --- a/spaces/XlalalaX/VITS-Umamusume-voice-synthesizer/text/korean.py +++ /dev/null @@ -1,210 +0,0 @@ -import re -from jamo import h2j, j2hcj -import ko_pron - - -# This is a list of Korean classifiers preceded by pure Korean numerals. -_korean_classifiers = '군데 권 개 그루 닢 대 두 마리 모 모금 뭇 발 발짝 방 번 벌 보루 살 수 술 시 쌈 움큼 정 짝 채 척 첩 축 켤레 톨 통' - -# List of (hangul, hangul divided) pairs: -_hangul_divided = [(re.compile('%s' % x[0]), x[1]) for x in [ - ('ㄳ', 'ㄱㅅ'), - ('ㄵ', 'ㄴㅈ'), - ('ㄶ', 'ㄴㅎ'), - ('ㄺ', 'ㄹㄱ'), - ('ㄻ', 'ㄹㅁ'), - ('ㄼ', 'ㄹㅂ'), - ('ㄽ', 'ㄹㅅ'), - ('ㄾ', 'ㄹㅌ'), - ('ㄿ', 'ㄹㅍ'), - ('ㅀ', 'ㄹㅎ'), - ('ㅄ', 'ㅂㅅ'), - ('ㅘ', 'ㅗㅏ'), - ('ㅙ', 'ㅗㅐ'), - ('ㅚ', 'ㅗㅣ'), - ('ㅝ', 'ㅜㅓ'), - ('ㅞ', 'ㅜㅔ'), - ('ㅟ', 'ㅜㅣ'), - ('ㅢ', 'ㅡㅣ'), - ('ㅑ', 'ㅣㅏ'), - ('ㅒ', 'ㅣㅐ'), - ('ㅕ', 'ㅣㅓ'), - ('ㅖ', 'ㅣㅔ'), - ('ㅛ', 'ㅣㅗ'), - ('ㅠ', 'ㅣㅜ') -]] - -# List of (Latin alphabet, hangul) pairs: -_latin_to_hangul = [(re.compile('%s' % x[0], re.IGNORECASE), x[1]) for x in [ - ('a', '에이'), - ('b', '비'), - ('c', '시'), - ('d', '디'), - ('e', '이'), - ('f', '에프'), - ('g', '지'), - ('h', '에이치'), - ('i', '아이'), - ('j', '제이'), - ('k', '케이'), - ('l', '엘'), - ('m', '엠'), - ('n', '엔'), - ('o', '오'), - ('p', '피'), - ('q', '큐'), - ('r', '아르'), - ('s', '에스'), - ('t', '티'), - ('u', '유'), - ('v', '브이'), - ('w', '더블유'), - ('x', '엑스'), - ('y', '와이'), - ('z', '제트') -]] - -# List of (ipa, lazy ipa) pairs: -_ipa_to_lazy_ipa = [(re.compile('%s' % x[0], re.IGNORECASE), x[1]) for x in [ - ('t͡ɕ','ʧ'), - ('d͡ʑ','ʥ'), - ('ɲ','n^'), - ('ɕ','ʃ'), - ('ʷ','w'), - ('ɭ','l`'), - ('ʎ','ɾ'), - ('ɣ','ŋ'), - ('ɰ','ɯ'), - ('ʝ','j'), - ('ʌ','ə'), - ('ɡ','g'), - ('\u031a','#'), - ('\u0348','='), - ('\u031e',''), - ('\u0320',''), - ('\u0339','') -]] - - -def latin_to_hangul(text): - for regex, replacement in _latin_to_hangul: - text = re.sub(regex, replacement, text) - return text - - -def divide_hangul(text): - text = j2hcj(h2j(text)) - for regex, replacement in _hangul_divided: - text = re.sub(regex, replacement, text) - return text - - -def hangul_number(num, sino=True): - '''Reference https://github.com/Kyubyong/g2pK''' - num = re.sub(',', '', num) - - if num == '0': - return '영' - if not sino and num == '20': - return '스무' - - digits = '123456789' - names = '일이삼사오육칠팔구' - digit2name = {d: n for d, n in zip(digits, names)} - - modifiers = '한 두 세 네 다섯 여섯 일곱 여덟 아홉' - decimals = '열 스물 서른 마흔 쉰 예순 일흔 여든 아흔' - digit2mod = {d: mod for d, mod in zip(digits, modifiers.split())} - digit2dec = {d: dec for d, dec in zip(digits, decimals.split())} - - spelledout = [] - for i, digit in enumerate(num): - i = len(num) - i - 1 - if sino: - if i == 0: - name = digit2name.get(digit, '') - elif i == 1: - name = digit2name.get(digit, '') + '십' - name = name.replace('일십', '십') - else: - if i == 0: - name = digit2mod.get(digit, '') - elif i == 1: - name = digit2dec.get(digit, '') - if digit == '0': - if i % 4 == 0: - last_three = spelledout[-min(3, len(spelledout)):] - if ''.join(last_three) == '': - spelledout.append('') - continue - else: - spelledout.append('') - continue - if i == 2: - name = digit2name.get(digit, '') + '백' - name = name.replace('일백', '백') - elif i == 3: - name = digit2name.get(digit, '') + '천' - name = name.replace('일천', '천') - elif i == 4: - name = digit2name.get(digit, '') + '만' - name = name.replace('일만', '만') - elif i == 5: - name = digit2name.get(digit, '') + '십' - name = name.replace('일십', '십') - elif i == 6: - name = digit2name.get(digit, '') + '백' - name = name.replace('일백', '백') - elif i == 7: - name = digit2name.get(digit, '') + '천' - name = name.replace('일천', '천') - elif i == 8: - name = digit2name.get(digit, '') + '억' - elif i == 9: - name = digit2name.get(digit, '') + '십' - elif i == 10: - name = digit2name.get(digit, '') + '백' - elif i == 11: - name = digit2name.get(digit, '') + '천' - elif i == 12: - name = digit2name.get(digit, '') + '조' - elif i == 13: - name = digit2name.get(digit, '') + '십' - elif i == 14: - name = digit2name.get(digit, '') + '백' - elif i == 15: - name = digit2name.get(digit, '') + '천' - spelledout.append(name) - return ''.join(elem for elem in spelledout) - - -def number_to_hangul(text): - '''Reference https://github.com/Kyubyong/g2pK''' - tokens = set(re.findall(r'(\d[\d,]*)([\uac00-\ud71f]+)', text)) - for token in tokens: - num, classifier = token - if classifier[:2] in _korean_classifiers or classifier[0] in _korean_classifiers: - spelledout = hangul_number(num, sino=False) - else: - spelledout = hangul_number(num, sino=True) - text = text.replace(f'{num}{classifier}', f'{spelledout}{classifier}') - # digit by digit for remaining digits - digits = '0123456789' - names = '영일이삼사오육칠팔구' - for d, n in zip(digits, names): - text = text.replace(d, n) - return text - - -def korean_to_lazy_ipa(text): - text = latin_to_hangul(text) - text = number_to_hangul(text) - text=re.sub('[\uac00-\ud7af]+',lambda x:ko_pron.romanise(x.group(0),'ipa').split('] ~ [')[0],text) - for regex, replacement in _ipa_to_lazy_ipa: - text = re.sub(regex, replacement, text) - return text - - -def korean_to_ipa(text): - text = korean_to_lazy_ipa(text) - return text.replace('ʧ','tʃ').replace('ʥ','dʑ') diff --git a/spaces/XzJosh/Ava2-Bert-VITS2/commons.py b/spaces/XzJosh/Ava2-Bert-VITS2/commons.py deleted file mode 100644 index 9ad0444b61cbadaa388619986c2889c707d873ce..0000000000000000000000000000000000000000 --- a/spaces/XzJosh/Ava2-Bert-VITS2/commons.py +++ /dev/null @@ -1,161 +0,0 @@ -import math -import numpy as np -import torch -from torch import nn -from torch.nn import functional as F - - -def init_weights(m, mean=0.0, std=0.01): - classname = m.__class__.__name__ - if classname.find("Conv") != -1: - m.weight.data.normal_(mean, std) - - -def get_padding(kernel_size, dilation=1): - return int((kernel_size*dilation - dilation)/2) - - -def convert_pad_shape(pad_shape): - l = pad_shape[::-1] - pad_shape = [item for sublist in l for item in sublist] - return pad_shape - - -def intersperse(lst, item): - result = [item] * (len(lst) * 2 + 1) - result[1::2] = lst - return result - - -def kl_divergence(m_p, logs_p, m_q, logs_q): - """KL(P||Q)""" - kl = (logs_q - logs_p) - 0.5 - kl += 0.5 * (torch.exp(2. * logs_p) + ((m_p - m_q)**2)) * torch.exp(-2. * logs_q) - return kl - - -def rand_gumbel(shape): - """Sample from the Gumbel distribution, protect from overflows.""" - uniform_samples = torch.rand(shape) * 0.99998 + 0.00001 - return -torch.log(-torch.log(uniform_samples)) - - -def rand_gumbel_like(x): - g = rand_gumbel(x.size()).to(dtype=x.dtype, device=x.device) - return g - - -def slice_segments(x, ids_str, segment_size=4): - ret = torch.zeros_like(x[:, :, :segment_size]) - for i in range(x.size(0)): - idx_str = ids_str[i] - idx_end = idx_str + segment_size - ret[i] = x[i, :, idx_str:idx_end] - return ret - - -def rand_slice_segments(x, x_lengths=None, segment_size=4): - b, d, t = x.size() - if x_lengths is None: - x_lengths = t - ids_str_max = x_lengths - segment_size + 1 - ids_str = (torch.rand([b]).to(device=x.device) * ids_str_max).to(dtype=torch.long) - ret = slice_segments(x, ids_str, segment_size) - return ret, ids_str - - -def get_timing_signal_1d( - length, channels, min_timescale=1.0, max_timescale=1.0e4): - position = torch.arange(length, dtype=torch.float) - num_timescales = channels // 2 - log_timescale_increment = ( - math.log(float(max_timescale) / float(min_timescale)) / - (num_timescales - 1)) - inv_timescales = min_timescale * torch.exp( - torch.arange(num_timescales, dtype=torch.float) * -log_timescale_increment) - scaled_time = position.unsqueeze(0) * inv_timescales.unsqueeze(1) - signal = torch.cat([torch.sin(scaled_time), torch.cos(scaled_time)], 0) - signal = F.pad(signal, [0, 0, 0, channels % 2]) - signal = signal.view(1, channels, length) - return signal - - -def add_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4): - b, channels, length = x.size() - signal = get_timing_signal_1d(length, channels, min_timescale, max_timescale) - return x + signal.to(dtype=x.dtype, device=x.device) - - -def cat_timing_signal_1d(x, min_timescale=1.0, max_timescale=1.0e4, axis=1): - b, channels, length = x.size() - signal = get_timing_signal_1d(length, channels, min_timescale, max_timescale) - return torch.cat([x, signal.to(dtype=x.dtype, device=x.device)], axis) - - -def subsequent_mask(length): - mask = torch.tril(torch.ones(length, length)).unsqueeze(0).unsqueeze(0) - return mask - - -@torch.jit.script -def fused_add_tanh_sigmoid_multiply(input_a, input_b, n_channels): - n_channels_int = n_channels[0] - in_act = input_a + input_b - t_act = torch.tanh(in_act[:, :n_channels_int, :]) - s_act = torch.sigmoid(in_act[:, n_channels_int:, :]) - acts = t_act * s_act - return acts - - -def convert_pad_shape(pad_shape): - l = pad_shape[::-1] - pad_shape = [item for sublist in l for item in sublist] - return pad_shape - - -def shift_1d(x): - x = F.pad(x, convert_pad_shape([[0, 0], [0, 0], [1, 0]]))[:, :, :-1] - return x - - -def sequence_mask(length, max_length=None): - if max_length is None: - max_length = length.max() - x = torch.arange(max_length, dtype=length.dtype, device=length.device) - return x.unsqueeze(0) < length.unsqueeze(1) - - -def generate_path(duration, mask): - """ - duration: [b, 1, t_x] - mask: [b, 1, t_y, t_x] - """ - device = duration.device - - b, _, t_y, t_x = mask.shape - cum_duration = torch.cumsum(duration, -1) - - cum_duration_flat = cum_duration.view(b * t_x) - path = sequence_mask(cum_duration_flat, t_y).to(mask.dtype) - path = path.view(b, t_x, t_y) - path = path - F.pad(path, convert_pad_shape([[0, 0], [1, 0], [0, 0]]))[:, :-1] - path = path.unsqueeze(1).transpose(2,3) * mask - return path - - -def clip_grad_value_(parameters, clip_value, norm_type=2): - if isinstance(parameters, torch.Tensor): - parameters = [parameters] - parameters = list(filter(lambda p: p.grad is not None, parameters)) - norm_type = float(norm_type) - if clip_value is not None: - clip_value = float(clip_value) - - total_norm = 0 - for p in parameters: - param_norm = p.grad.data.norm(norm_type) - total_norm += param_norm.item() ** norm_type - if clip_value is not None: - p.grad.data.clamp_(min=-clip_value, max=clip_value) - total_norm = total_norm ** (1. / norm_type) - return total_norm diff --git a/spaces/XzJosh/Spade-Bert-VITS2/text/cleaner.py b/spaces/XzJosh/Spade-Bert-VITS2/text/cleaner.py deleted file mode 100644 index 64bd5f7296f66c94f3a335666c53706bb5fe5b39..0000000000000000000000000000000000000000 --- a/spaces/XzJosh/Spade-Bert-VITS2/text/cleaner.py +++ /dev/null @@ -1,27 +0,0 @@ -from text import chinese, cleaned_text_to_sequence - - -language_module_map = { - 'ZH': chinese -} - - -def clean_text(text, language): - language_module = language_module_map[language] - norm_text = language_module.text_normalize(text) - phones, tones, word2ph = language_module.g2p(norm_text) - return norm_text, phones, tones, word2ph - -def clean_text_bert(text, language): - language_module = language_module_map[language] - norm_text = language_module.text_normalize(text) - phones, tones, word2ph = language_module.g2p(norm_text) - bert = language_module.get_bert_feature(norm_text, word2ph) - return phones, tones, bert - -def text_to_sequence(text, language): - norm_text, phones, tones, word2ph = clean_text(text, language) - return cleaned_text_to_sequence(phones, tones, language) - -if __name__ == '__main__': - pass diff --git a/spaces/YuAnthony/Audio-Caption/tools/argument_parsing.py b/spaces/YuAnthony/Audio-Caption/tools/argument_parsing.py deleted file mode 100644 index fab3bc4c78a5994b1047f7b5de2c8df18ae38bd3..0000000000000000000000000000000000000000 --- a/spaces/YuAnthony/Audio-Caption/tools/argument_parsing.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from argparse import ArgumentParser - -# __author__ = 'Konstantinos Drossos -- Tampere University' -# __docformat__ = 'reStructuredText' -# __all__ = ['get_argument_parser'] - - -def get_argument_parser(): - """Creates and returns the ArgumentParser for this project. - - :return: The argument parser. - :rtype: argparse.ArgumentParser - """ - arg_parser = ArgumentParser() - the_args = [ - # --------------------------------- - [['--config-file', '-c'], - {'type': str, - 'default': 'main_settings', - 'help': 'The settings file (without extension).'}], - # --------------------------------- - [['--file-dir', '-d'], - {'type': str, - 'default': 'settings', - 'help': 'Directory that holds the settings file (default: `settings`).'}], - # --------------------------------- - [['--file-ext', '-e'], - {'type': str, - 'default': 'yaml', - 'help': 'Extension of the settings file (default: `yaml`).'}], - # --------------------------------- - [['--verbose', '-v'], - {'default': True, - 'action': 'store_true', - 'help': 'Be verbose flag (default True).'}]] - - [arg_parser.add_argument(*i[0], **i[1]) for i in the_args] - - return arg_parser - -# EOF diff --git a/spaces/Yuliang/ECON/lib/common/imutils.py b/spaces/Yuliang/ECON/lib/common/imutils.py deleted file mode 100644 index 287ab057ee20ac6d28ae8f7a83a77f681af040db..0000000000000000000000000000000000000000 --- a/spaces/Yuliang/ECON/lib/common/imutils.py +++ /dev/null @@ -1,364 +0,0 @@ -import os - -os.environ["OPENCV_IO_ENABLE_OPENEXR"] = "1" -import cv2 -import mediapipe as mp -import numpy as np -import torch -import torch.nn.functional as F -from kornia.geometry.transform import get_affine_matrix2d, warp_affine -from PIL import Image -from rembg import remove -from rembg.session_factory import new_session -from torchvision import transforms - -from lib.pymafx.core import constants - - -def transform_to_tensor(res, mean=None, std=None, is_tensor=False): - all_ops = [] - if res is not None: - all_ops.append(transforms.Resize(size=res)) - if not is_tensor: - all_ops.append(transforms.ToTensor()) - if mean is not None and std is not None: - all_ops.append(transforms.Normalize(mean=mean, std=std)) - return transforms.Compose(all_ops) - - -def get_affine_matrix_wh(w1, h1, w2, h2): - - transl = torch.tensor([(w2 - w1) / 2.0, (h2 - h1) / 2.0]).unsqueeze(0) - center = torch.tensor([w1 / 2.0, h1 / 2.0]).unsqueeze(0) - scale = torch.min(torch.tensor([w2 / w1, h2 / h1])).repeat(2).unsqueeze(0) - M = get_affine_matrix2d(transl, center, scale, angle=torch.tensor([0.])) - - return M - - -def get_affine_matrix_box(boxes, w2, h2): - - # boxes [left, top, right, bottom] - width = boxes[:, 2] - boxes[:, 0] #(N,) - height = boxes[:, 3] - boxes[:, 1] #(N,) - center = torch.tensor([(boxes[:, 0] + boxes[:, 2]) / 2.0, - (boxes[:, 1] + boxes[:, 3]) / 2.0]).T #(N,2) - scale = torch.min(torch.tensor([w2 / width, h2 / height]), - dim=0)[0].unsqueeze(1).repeat(1, 2) * 0.9 #(N,2) - transl = torch.cat([w2 / 2.0 - center[:, 0:1], h2 / 2.0 - center[:, 1:2]], dim=1) #(N,2) - M = get_affine_matrix2d(transl, center, scale, angle=torch.tensor([ - 0., - ] * transl.shape[0])) - - return M - - -def load_img(img_file): - - if img_file.endswith("exr"): - img = cv2.imread(img_file, cv2.IMREAD_ANYCOLOR | cv2.IMREAD_ANYDEPTH) - else: - img = cv2.imread(img_file, cv2.IMREAD_UNCHANGED) - - # considering non 8-bit image - if img.dtype != np.uint8: - img = cv2.normalize(img, None, 0, 255, cv2.NORM_MINMAX, dtype=cv2.CV_8U) - - if len(img.shape) == 2: - img = cv2.cvtColor(img, cv2.COLOR_GRAY2BGR) - - if not img_file.endswith("png"): - img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) - else: - img = cv2.cvtColor(img, cv2.COLOR_RGBA2BGR) - - return torch.tensor(img).permute(2, 0, 1).unsqueeze(0).float(), img.shape[:2] - - -def get_keypoints(image): - def collect_xyv(x, body=True): - lmk = x.landmark - all_lmks = [] - for i in range(len(lmk)): - visibility = lmk[i].visibility if body else 1.0 - all_lmks.append(torch.Tensor([lmk[i].x, lmk[i].y, lmk[i].z, visibility])) - return torch.stack(all_lmks).view(-1, 4) - - mp_holistic = mp.solutions.holistic - - with mp_holistic.Holistic( - static_image_mode=True, - model_complexity=2, - ) as holistic: - results = holistic.process(image) - - fake_kps = torch.zeros(33, 4) - - result = {} - result["body"] = collect_xyv(results.pose_landmarks) if results.pose_landmarks else fake_kps - result["lhand"] = collect_xyv( - results.left_hand_landmarks, False - ) if results.left_hand_landmarks else fake_kps - result["rhand"] = collect_xyv( - results.right_hand_landmarks, False - ) if results.right_hand_landmarks else fake_kps - result["face"] = collect_xyv( - results.face_landmarks, False - ) if results.face_landmarks else fake_kps - - return result - - -def get_pymafx(image, landmarks): - - # image [3,512,512] - - item = { - 'img_body': F.interpolate(image.unsqueeze(0), size=224, mode='bicubic', - align_corners=True)[0] - } - - for part in ['lhand', 'rhand', 'face']: - kp2d = landmarks[part] - kp2d_valid = kp2d[kp2d[:, 3] > 0.] - if len(kp2d_valid) > 0: - bbox = [ - min(kp2d_valid[:, 0]), - min(kp2d_valid[:, 1]), - max(kp2d_valid[:, 0]), - max(kp2d_valid[:, 1]) - ] - center_part = [(bbox[2] + bbox[0]) / 2., (bbox[3] + bbox[1]) / 2.] - scale_part = 2. * max(bbox[2] - bbox[0], bbox[3] - bbox[1]) / 2 - - # handle invalid part keypoints - if len(kp2d_valid) < 1 or scale_part < 0.01: - center_part = [0, 0] - scale_part = 0.5 - kp2d[:, 3] = 0 - - center_part = torch.tensor(center_part).float() - - theta_part = torch.zeros(1, 2, 3) - theta_part[:, 0, 0] = scale_part - theta_part[:, 1, 1] = scale_part - theta_part[:, :, -1] = center_part - - grid = F.affine_grid(theta_part, torch.Size([1, 3, 224, 224]), align_corners=False) - img_part = F.grid_sample(image.unsqueeze(0), grid, align_corners=False).squeeze(0).float() - - item[f'img_{part}'] = img_part - - theta_i_inv = torch.zeros_like(theta_part) - theta_i_inv[:, 0, 0] = 1. / theta_part[:, 0, 0] - theta_i_inv[:, 1, 1] = 1. / theta_part[:, 1, 1] - theta_i_inv[:, :, -1] = -theta_part[:, :, -1] / theta_part[:, 0, 0].unsqueeze(-1) - item[f'{part}_theta_inv'] = theta_i_inv[0] - - return item - - -def remove_floats(mask): - - # 1. find all the contours - # 2. fillPoly "True" for the largest one - # 3. fillPoly "False" for its childrens - - new_mask = np.zeros(mask.shape) - cnts, hier = cv2.findContours(mask.astype(np.uint8), cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE) - cnt_index = sorted(range(len(cnts)), key=lambda k: cv2.contourArea(cnts[k]), reverse=True) - body_cnt = cnts[cnt_index[0]] - childs_cnt_idx = np.where(np.array(hier)[0, :, -1] == cnt_index[0])[0] - childs_cnt = [cnts[idx] for idx in childs_cnt_idx] - cv2.fillPoly(new_mask, [body_cnt], 1) - cv2.fillPoly(new_mask, childs_cnt, 0) - - return new_mask - - -def process_image(img_file, hps_type, single, input_res, detector): - - img_raw, (in_height, in_width) = load_img(img_file) - tgt_res = input_res * 2 - M_square = get_affine_matrix_wh(in_width, in_height, tgt_res, tgt_res) - img_square = warp_affine( - img_raw, - M_square[:, :2], (tgt_res, ) * 2, - mode='bilinear', - padding_mode='zeros', - align_corners=True - ) - - # detection for bbox - predictions = detector(img_square / 255.)[0] - - if single: - top_score = predictions["scores"][predictions["labels"] == 1].max() - human_ids = torch.where(predictions["scores"] == top_score)[0] - else: - human_ids = torch.logical_and(predictions["labels"] == 1, - predictions["scores"] > 0.9).nonzero().squeeze(1) - - boxes = predictions["boxes"][human_ids, :].detach().cpu().numpy() - masks = predictions["masks"][human_ids, :, :].permute(0, 2, 3, 1).detach().cpu().numpy() - - M_crop = get_affine_matrix_box(boxes, input_res, input_res) - - img_icon_lst = [] - img_crop_lst = [] - img_hps_lst = [] - img_mask_lst = [] - landmark_lst = [] - hands_visibility_lst = [] - img_pymafx_lst = [] - - uncrop_param = { - "ori_shape": [in_height, in_width], "box_shape": [input_res, input_res], "square_shape": - [tgt_res, tgt_res], "M_square": M_square, "M_crop": M_crop - } - - for idx in range(len(boxes)): - - # mask out the pixels of others - if len(masks) > 1: - mask_detection = (masks[np.arange(len(masks)) != idx]).max(axis=0) - else: - mask_detection = masks[0] * 0. - - img_square_rgba = torch.cat([ - img_square.squeeze(0).permute(1, 2, 0), - torch.tensor(mask_detection < 0.4) * 255 - ], - dim=2) - - img_crop = warp_affine( - img_square_rgba.unsqueeze(0).permute(0, 3, 1, 2), - M_crop[idx:idx + 1, :2], (input_res, ) * 2, - mode='bilinear', - padding_mode='zeros', - align_corners=True - ).squeeze(0).permute(1, 2, 0).numpy().astype(np.uint8) - - # get accurate person segmentation mask - img_rembg = remove(img_crop, post_process_mask=True, session=new_session("u2net")) - img_mask = remove_floats(img_rembg[:, :, [3]]) - - mean_icon = std_icon = (0.5, 0.5, 0.5) - img_np = (img_rembg[..., :3] * img_mask).astype(np.uint8) - img_icon = transform_to_tensor(512, mean_icon, std_icon)( - Image.fromarray(img_np) - ) * torch.tensor(img_mask).permute(2, 0, 1) - img_hps = transform_to_tensor(224, constants.IMG_NORM_MEAN, - constants.IMG_NORM_STD)(Image.fromarray(img_np)) - - landmarks = get_keypoints(img_np) - - # get hands visibility - hands_visibility = [True, True] - if landmarks['lhand'][:, -1].mean() == 0.: - hands_visibility[0] = False - if landmarks['rhand'][:, -1].mean() == 0.: - hands_visibility[1] = False - hands_visibility_lst.append(hands_visibility) - - if hps_type == 'pymafx': - img_pymafx_lst.append( - get_pymafx( - transform_to_tensor(512, constants.IMG_NORM_MEAN, - constants.IMG_NORM_STD)(Image.fromarray(img_np)), landmarks - ) - ) - - img_crop_lst.append(torch.tensor(img_crop).permute(2, 0, 1) / 255.0) - img_icon_lst.append(img_icon) - img_hps_lst.append(img_hps) - img_mask_lst.append(torch.tensor(img_mask[..., 0])) - landmark_lst.append(landmarks['body']) - - # required image tensors / arrays - - # img_icon (tensor): (-1, 1), [3,512,512] - # img_hps (tensor): (-2.11, 2.44), [3,224,224] - - # img_np (array): (0, 255), [512,512,3] - # img_rembg (array): (0, 255), [512,512,4] - # img_mask (array): (0, 1), [512,512,1] - # img_crop (array): (0, 255), [512,512,4] - - return_dict = { - "img_icon": torch.stack(img_icon_lst).float(), #[N, 3, res, res] - "img_crop": torch.stack(img_crop_lst).float(), #[N, 4, res, res] - "img_hps": torch.stack(img_hps_lst).float(), #[N, 3, res, res] - "img_raw": img_raw, #[1, 3, H, W] - "img_mask": torch.stack(img_mask_lst).float(), #[N, res, res] - "uncrop_param": uncrop_param, - "landmark": torch.stack(landmark_lst), #[N, 33, 4] - "hands_visibility": hands_visibility_lst, - } - - img_pymafx = {} - - if len(img_pymafx_lst) > 0: - for idx in range(len(img_pymafx_lst)): - for key in img_pymafx_lst[idx].keys(): - if key not in img_pymafx.keys(): - img_pymafx[key] = [img_pymafx_lst[idx][key]] - else: - img_pymafx[key] += [img_pymafx_lst[idx][key]] - - for key in img_pymafx.keys(): - img_pymafx[key] = torch.stack(img_pymafx[key]).float() - - return_dict.update({"img_pymafx": img_pymafx}) - - return return_dict - - -def blend_rgb_norm(norms, data): - - # norms [N, 3, res, res] - masks = (norms.sum(dim=1) != norms[0, :, 0, 0].sum()).float().unsqueeze(1) - norm_mask = F.interpolate( - torch.cat([norms, masks], dim=1).detach(), - size=data["uncrop_param"]["box_shape"], - mode="bilinear", - align_corners=False - ) - final = data["img_raw"].type_as(norm_mask) - - for idx in range(len(norms)): - - norm_pred = (norm_mask[idx:idx + 1, :3, :, :] + 1.0) * 255.0 / 2.0 - mask_pred = norm_mask[idx:idx + 1, 3:4, :, :].repeat(1, 3, 1, 1) - - norm_ori = unwrap(norm_pred, data["uncrop_param"], idx) - mask_ori = unwrap(mask_pred, data["uncrop_param"], idx) - - final = final * (1.0 - mask_ori) + norm_ori * mask_ori - - return final.detach().cpu() - - -def unwrap(image, uncrop_param, idx): - - device = image.device - - img_square = warp_affine( - image, - torch.inverse(uncrop_param["M_crop"])[idx:idx + 1, :2].to(device), - uncrop_param["square_shape"], - mode='bilinear', - padding_mode='zeros', - align_corners=True - ) - - img_ori = warp_affine( - img_square, - torch.inverse(uncrop_param["M_square"])[:, :2].to(device), - uncrop_param["ori_shape"], - mode='bilinear', - padding_mode='zeros', - align_corners=True - ) - - return img_ori diff --git a/spaces/Zayn/Image_Captioning_Using_Vision_Transformer_and_GPT-2/app.py b/spaces/Zayn/Image_Captioning_Using_Vision_Transformer_and_GPT-2/app.py deleted file mode 100644 index db5e776c1d3d29cad766ccdc7c13b052cc970230..0000000000000000000000000000000000000000 --- a/spaces/Zayn/Image_Captioning_Using_Vision_Transformer_and_GPT-2/app.py +++ /dev/null @@ -1,40 +0,0 @@ -from PIL import Image -from transformers import VisionEncoderDecoderModel, ViTFeatureExtractor, PreTrainedTokenizerFast -import requests - -model = VisionEncoderDecoderModel.from_pretrained("Zayn/vit2distilgpt2") -vit_feature_extractor = ViTFeatureExtractor.from_pretrained("google/vit-base-patch16-224-in21k") -tokenizer = PreTrainedTokenizerFast.from_pretrained("distilgpt2") - -def vit2distilgpt2(img): - pixel_values = vit_feature_extractor(images=img, return_tensors="pt").pixel_values - encoder_outputs = model.generate(pixel_values.to('cpu'),num_beams=5) - generated_sentences = tokenizer.batch_decode(encoder_outputs, skip_special_tokens =True) - - return(generated_sentences[0].split('.')[0]) - -import gradio as gr - -inputs = [ - gr.inputs.Image(type="pil", label = "Original Image") -] - -outputs = [ - gr.outputs.Textbox(label = 'Caption') -] -title = "Image Captioning using Vision Transformer and GPT-2" -description = "Developed by Zayn" -article = "< a href='https://huggingface.co/Zayn/vit2distilgpt2'>Hugging Face AI Community" -examples = [ - ["car.jpg"] -] -gr.Interface( - vit2distilgpt2, - inputs, - outputs, - title = title, - description = description, - article = article, - examples = examples, - theme = "huggingface", -).launch(debug=True,enable_queue=True) \ No newline at end of file diff --git a/spaces/akdeniz27/zero-shot-text-classification-with-multilingual-t5/README.md b/spaces/akdeniz27/zero-shot-text-classification-with-multilingual-t5/README.md deleted file mode 100644 index 0c0555faf6a475576c54bc02983cf1f45b853ee9..0000000000000000000000000000000000000000 --- a/spaces/akdeniz27/zero-shot-text-classification-with-multilingual-t5/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Zero Shot Text Classification With Multilingual T5 -emoji: 🏢 -colorFrom: red -colorTo: gray -sdk: streamlit -sdk_version: 1.10.0 -app_file: app.py -pinned: false -license: mit ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/akhaliq/VQMIVC/ParallelWaveGAN/egs/yesno/voc1/local/data_download.sh b/spaces/akhaliq/VQMIVC/ParallelWaveGAN/egs/yesno/voc1/local/data_download.sh deleted file mode 100644 index 7805faacb54100647a373d11c69ba17ba53ced21..0000000000000000000000000000000000000000 --- a/spaces/akhaliq/VQMIVC/ParallelWaveGAN/egs/yesno/voc1/local/data_download.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# Copyright 2019 Tomoki Hayashi -# MIT License (https://opensource.org/licenses/MIT) - -download_dir=$1 - -# check arguments -if [ $# != 1 ]; then - echo "Usage: $0 " - exit 1 -fi - -set -euo pipefail - -cwd=$(pwd) -if [ ! -e "${download_dir}/LJSpeech-1.1" ]; then - mkdir -p "${download_dir}" - cd "${download_dir}" - wget http://www.openslr.org/resources/1/waves_yesno.tar.gz - tar -xvzf waves_yesno.tar.gz - rm ./waves_yesno/README* - rm waves_yesno.tar.gz - cd "${cwd}" - echo "Successfully downloaded data." -else - echo "Already exists. Skipped." -fi diff --git a/spaces/akhaliq/deeplab2/model/layers/axial_block_groups.py b/spaces/akhaliq/deeplab2/model/layers/axial_block_groups.py deleted file mode 100644 index 594b26381fc99960f6dd5c656b0b63a71a4be6bb..0000000000000000000000000000000000000000 --- a/spaces/akhaliq/deeplab2/model/layers/axial_block_groups.py +++ /dev/null @@ -1,443 +0,0 @@ -# coding=utf-8 -# Copyright 2021 The Deeplab2 Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Implements convolutional and attentional residual block groups.""" - -import math -import tensorflow as tf - -from deeplab2.model import utils -from deeplab2.model.layers import activations -from deeplab2.model.layers import axial_blocks -from deeplab2.model.layers import drop_path -from deeplab2.model.layers import dual_path_transformer -from deeplab2.model.layers import positional_encodings -from deeplab2.model.layers import recompute_grad as recompute_grad_lib - -# We will apply 10x larger learning rates on transformer layers. This global -# variable name will be accessed when we build the optimizers. This keyword is -# reserved and should not be a part of the variable names in a classification -# pretrained backbone. -TRANSFORMER = 'transformer' - - -def _get_current_names(index): - current_name = '_block{}'.format(index + 1) - transformer_current_name = '_block{}_{}'.format(index + 1, TRANSFORMER) - return current_name, transformer_current_name - - -class BlockGroup(tf.keras.layers.Layer): - """Applies a group of residual blocks with dual path transformer layers [1]. - - An optional dual-path transformer layer is inserted after each residual block. - The transformer layer performs memory2pixel attention, pixel2memory attention, - and memory2memory self-attention, while the standard residual block applies - the pixel2pixel axial-attention, global-attention, or spatial convolution. - - Reference: - [1] MaX-DeepLab: End-to-End Panoptic Segmentation with Mask Transformers, - CVPR 2021. https://arxiv.org/abs/2012.00759 - Huiyu Wang, Yukun Zhu, Hartwig Adam, Alan Yuille, Liang-Chieh Chen. - """ - - def __init__(self, - filters, - num_blocks, - name, - original_resnet_stride, - original_resnet_input_stride, - output_stride=16, - backbone_type='resnet_beta', - positional_encoding_type=None, - use_global_beyond_stride=0, - use_axial_beyond_stride=16, - use_transformer_beyond_stride=32, - use_sac_beyond_stride=0, - use_squeeze_and_excite=False, - conv_use_recompute_grad=False, - axial_use_recompute_grad=True, - recompute_within_stride=0, - transformer_use_recompute_grad=False, - transformer_expansion=1, - drop_path_keep_prob=0.8, - drop_path_beyond_stride=16, - drop_path_schedule='constant', - activation='relu', - attention_bottleneck_expansion=2, - axial_layer_config=None, - dual_path_transformer_layer_config=None, - bn_layer=tf.keras.layers.BatchNormalization, - conv_kernel_weight_decay=0.0): - """Initializes a BlockGroup layer. - - Args: - filters: An integer, the base number of channels for this block group. - num_blocks: An integer, the number of blocks for this block group. - name: A string, the name of the block group. - original_resnet_stride: An integer, the original resnet stride for this - block, usually 1 or 2. The stride will be applied if - original_resnet_input_stride is smaller than the desired output_stride. - Otherwise, the stride will not be applied, and atrous convolution will - be used after the first block. - original_resnet_input_stride: An integer, the total input stride in the - original resnet. For example, the total input stride for the last stage - of the original resnet is 16, and the total output stride is 32. This - stride differs from the true stride of the feature in that we might use - atrous convolution to change both the input and output stride to, e.g. - 8, but its original resnet input stride remains the same. In this case, - we also use the original resnet input stride to compute the atrous rate. - output_stride: An integer, the desired output_stride for the ResNet. - backbone_type: A string, the type of the backbone. Supports 'resnet', - 'resnet_beta', and 'wider_resnet'. The 'resnet' refers to the original - resnet with a 7x7 convolutional stem. The 'resnet_beta' means a resnet - but with an inception stem. The 'wider_resnet' is a wider variant of - resnet with extensively used 3x3 convolutions. - positional_encoding_type: A string, type of the positional encoding. - Support '2D', '1D', and None. - use_global_beyond_stride: An integer, the stride beyond which we use - global attention. Set to 0 if no global attention is desired. Defaults - to 0, i.e. we do not use global attention. - use_axial_beyond_stride: An integer, the stride beyond which we use axial - attention. Note that use_global_beyond_stride has a higher priority, - i.e. we use global attention if the stride is also beyond - use_global_beyond_stride. Set to 0 if no axial attention is desired. - Defaults to 16 as in MaX-DeepLab. - use_transformer_beyond_stride: An integer, the stride beyond which we use - a transformer layer. Set to 0 if no transformer is desired. Defaults to - 32 as in MaX-DeepLab-S. - use_sac_beyond_stride: An integer. Use the Switchable Atrous Convolution - (SAC) beyond the specified stride. For example, if - `use_sac_beyond_stride` = 16, SAC will be applied to the network stage - whose output stride >= 16 (i.e., 16 and 32). Set to 0 or -1 to disable - it. Defaults to 0 as SAC is not used in MaX-DeepLab. - use_squeeze_and_excite: A boolean, whether squeeze-and-excite (SE) is - used. Defaults to False as SE is not used in MaX-DeepLab. - conv_use_recompute_grad: A boolean, whether to use the gradient - checkpointing trick for convolutional blocks. This trick reduces - accelerator memory usage, but takes longer to compute gradients. - Defaults to False since convolutional layers are memory efficient. - axial_use_recompute_grad: A boolean, whether to use the gradient - checkpointing trick for axial blocks. This trick reduces accelerator - memory usage, but takes longer to compute gradients. Defaults to True - since it saves memory for axial blocks. - recompute_within_stride: An integer, the stride within which we use the - gradient checkpointing trick. This trick reduces accelerator memory - usage, but takes longer to compute gradients. Defaults to 0 (do not - recompute any layer). - transformer_use_recompute_grad: A boolean, whether to use the gradient - checkpointing trick for dual-path transformer blocks. This trick reduces - accelerator memory usage, but takes longer to compute gradients. - Defaults to False. - transformer_expansion: An integer, the expansion ratio for the transformer - bottleneck. - drop_path_keep_prob: A float, the keep probability for dropping path. - Defaults to 0.8 as in MaX-DeepLab-S. - drop_path_beyond_stride: An integer, the stride beyond which we apply drop - path augmentation. Defaults to 16 as in MaX-DeepLab-S. - drop_path_schedule: A string, the drop path schedule. Currently, we - support 'constant': use the same drop path keep probability for all - stages, and 'linear': linearly decrease the drop path keep probability - from 1.0 at 0-th stage (or STEM) to `drop_path_keep_prob` at last stage. - activation: A string, type of activation function to apply. Support - 'relu', 'swish' (or 'silu'), 'gelu', 'approximated_gelu', and 'elu'. - attention_bottleneck_expansion: An integer, the expansion ratio for - axial attention blocks. - axial_layer_config: A dict, an argument dictionary for the axial layer. - dual_path_transformer_layer_config: A dict, an argument dictionary for the - transformer. - bn_layer: An optional tf.keras.layers.Layer that computes the - normalization (default: tf.keras.layers.BatchNormalization). - conv_kernel_weight_decay: A float, the weight decay for convolution - kernels. - - Raises: - ValueError: If backbone_type is not one of 'resnet', 'resnet_beta', or - 'wider_resnet'. - ValueError: original_resnet_input_stride is not power of 2. - ValueError: output_stride is not power of 2. - """ - if original_resnet_input_stride & (original_resnet_input_stride - 1): - raise ValueError('original_resnet_input_stride is not power of 2.') - if output_stride & (output_stride - 1): - raise ValueError('output_stride is not power of 2.') - - super(BlockGroup, self).__init__(name=name) - self._add_absolute_positional_encoding = None - self._activation_fn = activations.get_activation(activation) - self._num_blocks = num_blocks - self._drop_path_keep_prob = [] - self._recompute_grad = [] - self._transformer_use_recompute_grad = transformer_use_recompute_grad - if dual_path_transformer_layer_config is None: - dual_path_transformer_layer_config = {} - original_resnet_current_stride = original_resnet_input_stride - - use_sac = (original_resnet_input_stride * original_resnet_stride >= - use_sac_beyond_stride > 0) - - recompute_grad = (original_resnet_input_stride * original_resnet_stride <= - recompute_within_stride) - - for index in range(num_blocks): - current_name, transformer_current_name = _get_current_names(index) - - # Compute the current strides. If there is a stride for this block group, - # we do it in the first residual block. - if index == 0 and original_resnet_input_stride < output_stride: - current_strides = original_resnet_stride - else: - current_strides = 1 - - # Compute the current atrous rate. - if original_resnet_current_stride > output_stride: - atrous_rate = original_resnet_current_stride // output_stride - else: - atrous_rate = 1 - - # Compute the atrous rate for the second conv in the first basic block. - if (index == 0 and original_resnet_input_stride * original_resnet_stride > - output_stride): - basic_block_second_conv_atrous_rate = ( - original_resnet_input_stride * original_resnet_stride // - output_stride) - else: - basic_block_second_conv_atrous_rate = atrous_rate - - # Compute the current drop_path_keep_prob. - current_stage = math.log2(original_resnet_current_stride) - 1 - if original_resnet_current_stride >= drop_path_beyond_stride: - current_drop_path_keep_prob = drop_path.get_drop_path_keep_prob( - drop_path_keep_prob, drop_path_schedule, - current_stage=int(round(current_stage)), - num_stages=4) - else: - current_drop_path_keep_prob = 1.0 - - # Compute which block_fn to use for this residual block. - if original_resnet_current_stride >= use_global_beyond_stride > 0: - attention_type = 'global' - recompute_grad = axial_use_recompute_grad or recompute_grad - filters_list = [filters * attention_bottleneck_expansion, - filters, - filters * 4] - elif original_resnet_current_stride >= use_axial_beyond_stride > 0: - attention_type = 'axial' - recompute_grad = axial_use_recompute_grad or recompute_grad - filters_list = [filters * attention_bottleneck_expansion, - filters, - filters * 4] - elif backbone_type == 'resnet' or backbone_type == 'resnet_beta': - attention_type = None - recompute_grad = conv_use_recompute_grad or recompute_grad - filters_list = [filters, - filters, - filters * 4] - elif backbone_type == 'wider_resnet': - if original_resnet_input_stride * original_resnet_stride < 32: - # Wider-ResNet uses conv basic blocks except the last stage. - attention_type = None - recompute_grad = conv_use_recompute_grad or recompute_grad - filters_list = [filters * 4, - filters * 4] - else: - # Wider-ResNet uses an expanded bottleneck block in the last stage. - attention_type = None - recompute_grad = conv_use_recompute_grad or recompute_grad - filters_list = [filters, - filters * 2, - filters * 4] - else: - raise ValueError(backbone_type + ' is not supported.') - - self._drop_path_keep_prob.append(current_drop_path_keep_prob) - # Apply the residual block. - # The inputs to block_fn should be activated features. - block_fn = axial_blocks.AxialBlock( - filters_list, - kernel_size=3, - strides=current_strides, - atrous_rate=atrous_rate, - use_squeeze_and_excite=use_squeeze_and_excite, - use_sac=use_sac, - bn_layer=bn_layer, - activation=activation, - name=current_name[1:], - conv_kernel_weight_decay=conv_kernel_weight_decay, - basic_block_second_conv_atrous_rate=( - basic_block_second_conv_atrous_rate), - attention_type=attention_type, - axial_layer_config=axial_layer_config) - self._recompute_grad.append(recompute_grad) - utils.safe_setattr(self, current_name, block_fn) - - # Modify the original_resnet_stride according to the strides. - if index == 0 and original_resnet_stride > 1: - original_resnet_current_stride *= original_resnet_stride - # Add absolute positional encoding if we will apply global attention - # beyond this stride. - if original_resnet_current_stride == use_global_beyond_stride > 0: - self._add_absolute_positional_encoding = ( - positional_encodings.AddAbsolutePositionalEncoding( - 'add_absolute_positional_encoding', - positional_encoding_type, bn_layer, conv_kernel_weight_decay)) - if original_resnet_current_stride >= use_transformer_beyond_stride > 0: - # Apply a dual-path transformer. - transformer_block_fn = dual_path_transformer.DualPathTransformerLayer( - name=transformer_current_name[1:], - filters=int(128 * transformer_expansion), - activation=activation, - bn_layer=bn_layer, - conv_kernel_weight_decay=conv_kernel_weight_decay, - **dual_path_transformer_layer_config) - utils.safe_setattr(self, transformer_current_name, transformer_block_fn) - else: - utils.safe_setattr(self, transformer_current_name, None) - # Avoid using recompute_grad for the first call that builds the sub-layers. - # Otherwise, recompute_grad will not track newly built model parameters. - self._first_building_call = True - - def call(self, inputs, training=False): - """Performs a forward pass. - - Args: - inputs: two tensors. The first tensor is a pixel_space_input with shape - [batch, height, width, pixel_channels]. The second tensor is - memory_space_input with shape [batch, length, memory_channels]. This - input will be used only if a transformer is used. Otherwise, the input - is returned unmodified. - training: A boolean flag indicating whether training behavior should be - used (default: False). - - Returns: - output: An output [batch, height, width, filters * 4] tensor. - activated_output: An activated output [batch, height, width, filters * 4] - tensor. - memory_space_output: A memory space output [batch, length, - memory_channels] tensor. - """ - # The pixel space inputs are activated features. - activated_features, memory_space_output = inputs - - # Recompute_grad takes only float tensors as inputs. It does not allow - # bools or boolean tensors. For this reason, we cast training to a float - # tensor and cast it back after we go through the recompute_grad wrap. - float_tensor_training = tf.cast(training, tf.float32) - - for index in range(self._num_blocks): - current_name, transformer_current_name = _get_current_names(index) - block_fn_no_recompute = getattr( - self, current_name) - transformer_block_fn_no_recompute = getattr( - self, transformer_current_name) - current_drop_path_keep_prob = self._drop_path_keep_prob[index] - - # Wrap the layer if we want to recompute it in the backward pass. - if (self._recompute_grad[index] and training): - # The seed is not actually used since we do not have any random - # operation in the recomputed function. The purpose of the provided seed - # is to prevent recompute_grad from generating a new seed variable which - # is not compatible with model exporting. - block_fn = recompute_grad_lib.recompute_grad( - block_fn_no_recompute, seed=tf.constant(0, tf.int32)) - else: - block_fn = block_fn_no_recompute - - # The inputs to block_fn should be activated features. - block_fn_inputs = [activated_features, float_tensor_training] - # We have to define drop_path_masks outside the layer call and pass it - # into the layer, because tf.recompute_grad (gradient checkpointing) does - # not allow any randomness within the function call. In addition, - # recompute_grad functions can only take Tensors as inputs, so we do not - # pass the drop_path_random_mask (when it is None) into block_fn. - if current_drop_path_keep_prob < 1.0 and training: - drop_path_random_mask = drop_path.generate_drop_path_random_mask( - activated_features, current_drop_path_keep_prob) - - block_fn_inputs.append(drop_path_random_mask) - - # Build the sub-layers when the block_fn is called for the first time. - # Otherwise, recompute_grad will not track newly built model parameters. - if self._first_building_call: - _ = block_fn_no_recompute(tuple(block_fn_inputs)) - # Apply the residual block. - features, activated_features = block_fn(tuple(block_fn_inputs)) - - if index == 0 and self._add_absolute_positional_encoding is not None: - features = self._add_absolute_positional_encoding(features, - training=training) - activated_features = self._activation_fn(features) - - if transformer_block_fn_no_recompute is not None: - # Reshape pixel space features from 4D to 3D. - _, height, width, channels = features.get_shape().as_list() - features = tf.reshape( - features, [-1, height * width, channels]) - - # Wrap the layer if we want to recompute it in the backward pass. - if (self._transformer_use_recompute_grad and training): - # The seed is not actually used since we do not have any random - # operation in the recomputed function. The purpose of the provided - # seed is to prevent recompute_grad from generating a new seed - # variable which is not compatible with model exporting. - transformer_block_fn = recompute_grad_lib.recompute_grad( - transformer_block_fn_no_recompute, seed=tf.constant(0, tf.int32)) - else: - transformer_block_fn = transformer_block_fn_no_recompute - - transformer_block_fn_input_list = [ - features, memory_space_output, float_tensor_training] - # We have to define drop_path_masks outside the layer call and pass it - # into the layer, because recompute_grad (gradient checkpointing) does - # not allow any randomness within the function call. In addition, - # recompute_grad functions can only take Tensors as inputs, so we do not - # pass the drop_path_masks (when they are None) into - # transformer_block_fn. - if current_drop_path_keep_prob < 1.0 and training: - # Drop path random mask for pixel space attention. - pixel_space_drop_path_mask = drop_path.generate_drop_path_random_mask( - memory_space_output, current_drop_path_keep_prob) - # Drop path random mask for memory space attention. - memory_space_attention_drop_path_mask = ( - drop_path.generate_drop_path_random_mask( - memory_space_output, current_drop_path_keep_prob)) - # Drop path random mask for memory space feed-forward network. - memory_space_feed_forward_network_drop_path_mask = ( - drop_path.generate_drop_path_random_mask( - memory_space_output, current_drop_path_keep_prob)) - transformer_block_fn_input_list += [ - pixel_space_drop_path_mask, - memory_space_attention_drop_path_mask, - memory_space_feed_forward_network_drop_path_mask] - - # Build the sub-layers when the transformer_block_fn is called for the - # first time. Otherwise, recompute_grad will not track newly built model - # parameters. - if self._first_building_call: - _ = transformer_block_fn_no_recompute( - tuple(transformer_block_fn_input_list)) - # Apply a dual-path transformer. - features, activated_features, memory_space_output = ( - transformer_block_fn(tuple(transformer_block_fn_input_list))) - - # Reshape pixel space features back to 4D. - features = tf.reshape(features, [-1, height, width, channels]) - activated_features = tf.reshape(activated_features, - [-1, height, width, channels]) - # Now the first call has finished and the sub-layers have been built. - self._first_building_call = False - # We also return the non-activated output so that the function is compatible - # with a decoder that takes a non-activated tensor as input. - return features, activated_features, memory_space_output diff --git a/spaces/alamin655/Personas/conversant/demo/ui.py b/spaces/alamin655/Personas/conversant/demo/ui.py deleted file mode 100644 index f4cd08df6681032133d65cdf6c31e0ad5aa7e78e..0000000000000000000000000000000000000000 --- a/spaces/alamin655/Personas/conversant/demo/ui.py +++ /dev/null @@ -1,368 +0,0 @@ -# Copyright (c) 2022 Cohere Inc. and its affiliates. -# -# Licensed under the MIT License (the "License"); -# you may not use this file except in compliance with the License. -# -# You may obtain a copy of the License in the LICENSE file at the top -# level of this repository. - - -from collections import defaultdict - -import streamlit as st -from streamlit_ace import st_ace -from streamlit_talk import message as st_message - -from conversant.demo import utils - - -def render_bot_partial_reply(utterance, idx): - """Renders a partial reply message from the bot. - - Args: - utterance (str): The utterance to be rendered. - idx (int): The index of the turn. - """ - st_message( - value=utterance, - animate_from="" - if "prev_partial_chunk" not in st.session_state - else st.session_state.prev_partial_chunk, - use_typewriter=True, - key=f"{idx}_bot", - avatar_style=st.session_state.bot_avatar, - generation_complete=(not st.session_state.partial_reply_in_progress), - ) - - -def draw_chat_history() -> None: - """Renders the chat history in Streamlit. - - The messages are rendered using streamlit-chat, a custom Streamlit component - for a chatbot UI. - Reference: https://github.com/AI-Yash/st-chat - """ - for i, turn in enumerate(st.session_state.bot.chat_history): - - # If there is only one turn, then we should only show the - # bot utterance (but using the typewriter and partial reply effect), - # skipping over the first injected user utterance. - if len(st.session_state.bot.chat_history) == 1: - if "bot" in turn: - render_bot_partial_reply(turn["bot"], i) - - # If we are at the last conversation turn, the bot utterance - # will be rendered as a partial reply with the typewriter effect. - elif i == len(st.session_state.bot.chat_history) - 1: - if "user" in turn: - st_message( - value=turn["user"], - is_user=True, - key=f"{i}_user", - avatar_style=st.session_state.user_avatar, - ) - if "bot" in turn: - render_bot_partial_reply(turn["bot"], i) - - else: - # If there is more than one turn, the first turn should skip over - # the first injected user utterance. - if i != 0 and "user" in turn: - st_message( - value=turn["user"], - is_user=True, - key=f"{i}_user", - avatar_style=st.session_state.user_avatar, - ) - if "bot" in turn: - st_message( - value=turn["bot"], - key=f"{i}_bot", - avatar_style=st.session_state.bot_avatar, - ) - - -def draw_disclaimer() -> None: - """Adds a disclaimer about the personas in this demo.""" - if st.session_state.persona != "parrot": - st.write( - "_Each persona is powered by [Cohere](https://cohere.com)'s large language " - "models, and these examples are meant purely for demonstrative purposes. " - "These personas are works of fiction, are not factually grounded, and " - "should not be taken too seriously!_" - ) - else: - st.write( - "_The Parrot persona does not make use of [Cohere](https://cohere.com)'s " - "large language models. Instead, it repeats back whatever message it " - "receives._" - ) - - -def draw_chatbot_config_form() -> None: - """Adds widgets to edit the chatbot config.""" - config = st.session_state.snapshot_chatbot_config - max_context_examples = st.slider( - label="max_context_examples", - min_value=0, - max_value=20, - value=config["max_context_examples"], - help="The number of interactions to keep as context for the chatbot.", - ) - st.session_state.bot.configure_chatbot( - {"max_context_examples": max_context_examples} - ) - - -def draw_client_config_form() -> None: - """Adds widgets to edit the client config.""" - st.write( - "For more information on these parameters, see " - "https://docs.cohere.ai/generate-reference" - ) - config = st.session_state.snapshot_client_config - model_options = ["", "small", "medium", "large", "xlarge"] - model = st.selectbox( - label="model", - options=model_options, - index=model_options.index(config["model"]) - if config["model"] in model_options - else 0, - help="The size of the Cohere model used to generate with.", - ) - model_id_override = st.text_input( - label="model ID override", - value=model if model else config["model"], - help=( - "The full ID of a custom model. See " - "https://docs.cohere.ai/generate-reference#model-optional for more details." - ), - ) - if model != model_id_override: - st.warning( - "WARNING: This demo does not validate that the model ID used for override " - "is valid.", - ) - max_tokens = st.number_input( - label="max_tokens", - value=config["max_tokens"], - help="The number of tokens to predict per response.", - ) - temperature = st.slider( - label="temperature", - min_value=0.0, - max_value=5.0, - value=config["temperature"], - help=( - "The degree of randomness for the response. Large temperature values may " - "yield overly random results!" - ), - ) - frequency_penalty = st.slider( - label="frequency_penalty", - min_value=0.0, - max_value=1.0, - value=config["frequency_penalty"], - help=( - "Penalty to reduce repetitiveness of generated tokens, weighted by their " - "frequency. Large penalty values may yield strange results!" - ), - ) - presence_penalty = st.slider( - label="presence_penalty", - min_value=0.0, - max_value=1.0, - value=config["presence_penalty"], - help=( - "Penalty to reduce repetitiveness of generated tokens, weighted equally " - "to all present tokens. Large penalty values may yield strange results!" - ), - ) - # This allows the user to add their own stop sequences to a multiselect form - # below. - if "current_stop_sequences" not in st.session_state: - st.session_state.current_stop_sequences = [ - utils.escape_string(stop_seq) for stop_seq in config["stop_sequences"] - ] - new_stop_seq = st.text_input( - label="add new stop sequence", - help="Add a stop sequence to the selection below.", - ) - if ( - new_stop_seq != "" - and new_stop_seq not in st.session_state.current_stop_sequences - ): - st.session_state.current_stop_sequences.append(new_stop_seq) - # Use the list of stop sequences in the session state, including any user added ones - # as the defaults for a multiselect form. - st.multiselect( - label="stop_sequences", - options=st.session_state.current_stop_sequences, - default=st.session_state.current_stop_sequences, - key="selected_stop_sequences", - help=( - "The generated response will be cut off at the first instance of any of " - "these stop sequences." - ), - ) - - st.session_state.bot.configure_client( - { - "model": model_id_override, - "max_tokens": int(max_tokens), - "temperature": temperature, - "frequency_penalty": frequency_penalty, - "presence_penalty": presence_penalty, - "stop_sequences": [ - utils.unescape_string(stop_seq) - for stop_seq in st.session_state.selected_stop_sequences - ], # Stop sequences need to be unescaped e.g. from \\n to \n - } - ) - - -def draw_prompt_form(disabled: bool = False) -> None: - """Adds a form for configuring the prompt through its fields. - - The form is rendered as disabled when we only need to show the non-editable values - of a prompt. This is used when the JSON editor is active. - - Args: - disabled (bool): Whether or not the form should be rendered as disabled. - """ - # Batches elements together as a form with a common submit button. - with st.form("prompt_form"): - # When the form is disabled, each time it is rendered its values need to be - # taken from the current prompt config. Otherwise, its values should be taken - # from the snapshot of the prompt config whenever it is first rendered. - config = ( - defaultdict(str, st.session_state.bot.prompt.to_dict()) - if disabled - else defaultdict(str, st.session_state.snapshot_prompt_config) - ) - # We need to be careful about indexing into the dictionaries here - # because when editing the prompt JSON, keys can end up malformed. - default_preamble = config["preamble"] - default_example_separator = config["example_separator"] - default_user_name = ( - config["headers"]["user"] if "user" in config["headers"] else "" - ) - default_bot_name = ( - config["headers"]["bot"] if "bot" in config["headers"] else "" - ) - # This is where we create the text areas for the form. - preamble = st.text_area( - label="preamble", - disabled=disabled, - value=utils.escape_string( - default_preamble - ), # Display chars like \n in the text area by escaping them to \\n - help=( - "A string that directs the chatbot to behae in certain ways by " - "describing its function and characteristics (i.e. a description of " - "a bot's persona). Accepts escape sequences like \\n." - ), - ) - example_separator = st.text_input( - label="example_separator", - disabled=disabled, - value=utils.escape_string( - default_example_separator - ), # Display chars like \n in the text area by escaping them to \\n - help="A separator for each example. Accepts escape sequences like \\n.", - ) - user_name = st.text_input( - label="user", - disabled=disabled, - value=utils.escape_string( - default_user_name - ), # Display chars like \n in the text area by escaping them to \\n - help="The name of the user. Defaults to 'User'.", - ) - bot_name = st.text_input( - label="bot", - disabled=disabled, - value=utils.escape_string( - default_bot_name - ), # Display chars like \n in the text area by escaping them to \\n - help="The name of the chatbot.", - ) - # Because prompt examples have a more complex structure, it is not very user - # friendly to render them as form input fields. - st.text_input( - label="examples", - placeholder="Please edit examples with the JSON editor.", - disabled=True, - help=( - "A list of examples to illustrate how the chatbot should respond to " - "a user." - ), - ) - # Upon submitting the form, we will save the form values in to the current - # prompt config, then update the bot. Any errors should be saved. - submitted = st.form_submit_button("Update") - if submitted: - try: - # Strings need to be unescaped e.g. from \\n to \n - current_config = st.session_state.bot.prompt.to_dict() - current_config["preamble"] = utils.unescape_string(preamble) - current_config["example_separator"] = utils.unescape_string( - example_separator - ) - current_config["headers"]["user"] = utils.unescape_string(user_name) - current_config["headers"]["bot"] = utils.unescape_string(bot_name) - st.session_state.bot.prompt.update(current_config) - st.session_state.error = "" - except Exception as e: - st.session_state.error = e - - -def draw_prompt_json_editor(max_height: int) -> None: - """Renders an streamlit-ace editor into the app. - - streamlit-ace is a custom Streamlitcomponent for an Ace editor. - Reference: https://github.com/okld/streamlit-ace - - Args: - max_height (int): Desired height of the UI element expressed in pixels. - If set to None, height will auto adjust to editor's content. - None by default. - """ - st.write("**Prompt (JSON):**") - st_ace( - value=f"{st.session_state.bot.prompt.to_json_string()}", - placeholder="Enter a JSON representation of a prompt.", - height=max_height, - language="json", - wrap=True, - auto_update=True, - key="json_editor_input", - theme="monokai", - ) - - -def draw_prompt_view(json: bool = False) -> None: - """Adds a representation of the prompt in JSON or as a string. - - Args: - json (bool): Whether to render the prompt as a JSON object. - """ - if json: - st.write("**Prompt (JSON):**") - st.json(st.session_state.bot.prompt.to_dict()) - else: - st.write( - f"**{st.session_state.bot.prompt.bot_name} responds to you using the " - "prompt below:**" - ) - # If the current JSON string is malformed, show the error to the user to help - # with debugging. - if "error" in st.session_state and st.session_state.error: - st.exception(st.session_state.error) - else: - st.code( - st.session_state.bot.get_current_prompt("{Your message here}"), - language="markdown", - ) - if st.session_state.bot.chat_history: - st.write("_(includes the current chat history)_") diff --git a/spaces/alexray/btc_predictor/venv/lib/python3.10/site-packages/pip/_vendor/idna/package_data.py b/spaces/alexray/btc_predictor/venv/lib/python3.10/site-packages/pip/_vendor/idna/package_data.py deleted file mode 100644 index f5ea87c12bd5bf459bab40a566f4bd3ebd01d9d3..0000000000000000000000000000000000000000 --- a/spaces/alexray/btc_predictor/venv/lib/python3.10/site-packages/pip/_vendor/idna/package_data.py +++ /dev/null @@ -1,2 +0,0 @@ -__version__ = '3.3' - diff --git a/spaces/aliabid94/AutoGPT/autogpt/json_utils/utilities.py b/spaces/aliabid94/AutoGPT/autogpt/json_utils/utilities.py deleted file mode 100644 index eb9bb687750460fed2f4547b67e41f8e8c877a41..0000000000000000000000000000000000000000 --- a/spaces/aliabid94/AutoGPT/autogpt/json_utils/utilities.py +++ /dev/null @@ -1,54 +0,0 @@ -"""Utilities for the json_fixes package.""" -import json -import re - -from jsonschema import Draft7Validator - -from autogpt.config import Config -from autogpt.logs import logger - -CFG = Config() - - -def extract_char_position(error_message: str) -> int: - """Extract the character position from the JSONDecodeError message. - - Args: - error_message (str): The error message from the JSONDecodeError - exception. - - Returns: - int: The character position. - """ - - char_pattern = re.compile(r"\(char (\d+)\)") - if match := char_pattern.search(error_message): - return int(match[1]) - else: - raise ValueError("Character position not found in the error message.") - - -def validate_json(json_object: object, schema_name: object) -> object: - """ - :type schema_name: object - :param schema_name: - :type json_object: object - """ - with open(f"autogpt/json_utils/{schema_name}.json", "r") as f: - schema = json.load(f) - validator = Draft7Validator(schema) - - if errors := sorted(validator.iter_errors(json_object), key=lambda e: e.path): - logger.error("The JSON object is invalid.") - if CFG.debug_mode: - logger.error( - json.dumps(json_object, indent=4) - ) # Replace 'json_object' with the variable containing the JSON data - logger.error("The following issues were found:") - - for error in errors: - logger.error(f"Error: {error.message}") - elif CFG.debug_mode: - print("The JSON object is valid.") - - return json_object diff --git a/spaces/amanmibra/void-demo-aisf/pipelines/train.py b/spaces/amanmibra/void-demo-aisf/pipelines/train.py deleted file mode 100644 index 5af7ab0f615b892db4940c85abb1bc782d0d5e0b..0000000000000000000000000000000000000000 --- a/spaces/amanmibra/void-demo-aisf/pipelines/train.py +++ /dev/null @@ -1,231 +0,0 @@ -import sys -sys.path.append('..') -import time - -# torch -import torch -import torchaudio -from torch import nn -from torch.utils.data import DataLoader - -# modal -from modal import Mount, Secret, Stub, gpu, create_package_mounts - -# internal -from pipelines.images import training_image_pip - -# model -from dataset import VoiceDataset -from cnn import CNNetwork - -# script defaults -BATCH_SIZE = 128 -EPOCHS = 100 -LEARNING_RATE = 0.001 - -TRAIN_FILE="data/aisf/augmented/train" -TEST_FILE="data/aisf/augmented/test" -SAMPLE_RATE=48000 - -stub = Stub( - "void-training", - image=training_image_pip, -) - -@stub.function( - gpu=gpu.A100(memory=20), - mounts=[ - Mount.from_local_file(local_path='dataset.py'), - Mount.from_local_file(local_path='cnn.py'), - ], - timeout=EPOCHS * 200, - secret=Secret.from_name("wandb"), -) -def train( - model, - train_dataloader, - loss_fn, - optimizer, - origin_device="cuda", - epochs=10, - test_dataloader=None, - wandb_enabled=False, - ): - import os - - import time - import torch - import wandb - - print("Begin model training...") - begin = time.time() - - modal_device = origin_device - - # set model to cuda - if torch.cuda.is_available() and modal_device != "cuda": - modal_device = "cuda" - model = model.to(modal_device) - - # metrics - training_acc = [] - training_loss = [] - testing_acc = [] - testing_loss = [] - - if wandb_enabled: - wandb.init(project="void-training") - - for i in range(epochs): - print(f"Epoch {i + 1}/{epochs}") - then = time.time() - - # train model - model, train_epoch_loss, train_epoch_acc = train_epoch.call(model, train_dataloader, loss_fn, optimizer, modal_device) - - # training metrics - training_loss.append(train_epoch_loss/len(train_dataloader)) - training_acc.append(train_epoch_acc/len(train_dataloader)) - if wandb_enabled: - wandb.log({'training_loss': training_loss[i], 'training_acc': training_acc[i]}) - - now = time.time() - print("Training Loss: {:.2f}, Training Accuracy: {:.4f}, Time: {:.2f}s".format(training_loss[i], training_acc[i], now - then)) - - if test_dataloader: - # test model - test_epoch_loss, test_epoch_acc = validate_epoch.call(model, test_dataloader, loss_fn, modal_device) - - # testing metrics - testing_loss.append(test_epoch_loss/len(test_dataloader)) - testing_acc.append(test_epoch_acc/len(test_dataloader)) - - print("Testing Loss: {:.2f}, Testing Accuracy {:.4f}".format(testing_loss[i], testing_acc[i])) - - if wandb_enabled: - wandb.log({'testing_loss': testing_loss[i], 'testing_acc': testing_acc[i]}) - - print ("-------------------------------------------------------- \n") - - end = time.time() - wandb.finish() - print("-------- Finished Training --------") - print("-------- Total Time -- {:.2f}s --------".format(end - begin)) - - return model.to(origin_device) - -@stub.function( - gpu=gpu.A100(memory=20), - mounts=[ - Mount.from_local_file(local_path='dataset.py'), - Mount.from_local_file(local_path='cnn.py'), - ], - timeout=600, -) -def train_epoch(model, train_dataloader, loss_fn, optimizer, device): - import torch - from tqdm import tqdm - - train_loss = 0.0 - train_acc = 0.0 - total = 0.0 - - model.train() - - for wav, target in tqdm(train_dataloader): - wav, target = wav.to(device), target.to(device) - - # calculate loss - output = model(wav) - loss = loss_fn(output, target) - - # backprop and update weights - optimizer.zero_grad() - loss.backward() - optimizer.step() - - # metrics - train_loss += loss.item() - prediction = torch.argmax(output, 1) - train_acc += (prediction == target).sum().item()/len(prediction) - total += 1 - - return model, train_loss, train_acc - -@stub.function( - gpu=gpu.A100(memory=20), - mounts=[ - Mount.from_local_file(local_path='dataset.py'), - Mount.from_local_file(local_path='cnn.py'), - ], -) -def validate_epoch(model, test_dataloader, loss_fn, device): - from tqdm import tqdm - - test_loss = 0.0 - test_acc = 0.0 - total = 0.0 - - model.eval() - - with torch.no_grad(): - for wav, target in tqdm(test_dataloader, "Testing batch..."): - wav, target = wav.to(device), target.to(device) - - output = model(wav) - loss = loss_fn(output, target) - - test_loss += loss.item() - prediciton = torch.argmax(output, 1) - test_acc += (prediciton == target).sum().item()/len(prediciton) - total += 1 - - return test_loss, test_acc - -def save_model(model): - now = time.strftime("%Y%m%d_%H%M%S") - model_filename = f"models/void_{now}.pth" - torch.save(model.state_dict(), model_filename) - print(f"Trained void model saved at {model_filename}") - -def get_device(): - if torch.cuda.is_available(): - device = "cuda" - else: - device = "cpu" - - return device - -@stub.local_entrypoint() -def main(): - print("Initiating model training...") - device = get_device() - - # instantiating our dataset object and create data loader - mel_spectrogram = torchaudio.transforms.MelSpectrogram( - sample_rate=SAMPLE_RATE, - n_fft=2048, - hop_length=512, - n_mels=128 - ) - - # dataset/dataloader - train_dataset = VoiceDataset(TRAIN_FILE, mel_spectrogram, device, time_limit_in_secs=3) - train_dataloader = DataLoader(train_dataset, batch_size=BATCH_SIZE, shuffle=True) - - test_dataset = VoiceDataset(TEST_FILE, mel_spectrogram, device, time_limit_in_secs=3) - test_dataloader = DataLoader(test_dataset, batch_size=BATCH_SIZE, shuffle=True) - - # construct model - model = CNNetwork() - - # init loss function and optimizer - loss_fn = nn.CrossEntropyLoss() - optimizer = torch.optim.Adam(model.parameters(), lr=LEARNING_RATE) - - # train model - model = train.call(model, train_dataloader, loss_fn, optimizer, device, EPOCHS, test_dataloader, True) - - # save model - save_model(model) - \ No newline at end of file diff --git a/spaces/amarchheda/ChordDuplicate/portaudio/src/os/win/pa_win_wdmks_utils.h b/spaces/amarchheda/ChordDuplicate/portaudio/src/os/win/pa_win_wdmks_utils.h deleted file mode 100644 index f524cf7f3c7c0fb23318f0813c9f5345e0e9957c..0000000000000000000000000000000000000000 --- a/spaces/amarchheda/ChordDuplicate/portaudio/src/os/win/pa_win_wdmks_utils.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef PA_WIN_WDMKS_UTILS_H -#define PA_WIN_WDMKS_UTILS_H - -/* - * PortAudio Portable Real-Time Audio Library - * Windows WDM KS utilities - * - * Copyright (c) 1999 - 2007 Ross Bencina, Andrew Baldwin - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files - * (the "Software"), to deal in the Software without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * The text above constitutes the entire PortAudio license; however, - * the PortAudio community also makes the following non-binding requests: - * - * Any person wishing to distribute modifications to the Software is - * requested to send the modifications to the original developer so that - * they can be incorporated into the canonical version. It is also - * requested that these non-binding requests be included along with the - * license above. - */ - -/** @file - @brief Utilities for working with the Windows WDM KS API -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - Query for the maximum number of channels supported by any pin of the - specified device. Returns 0 if the query fails for any reason. - - @param wcharDevicePath A system level PnP interface path, supplied as a WCHAR unicode string. - Declared as void* to avoid introducing a dependency on wchar_t here. - - @param isInput A flag specifying whether to query for input (non-zero) or output (zero) channels. -*/ -int PaWin_WDMKS_QueryFilterMaximumChannelCount( void *wcharDevicePath, int isInput ); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* PA_WIN_WDMKS_UTILS_H */ diff --git a/spaces/anaclaudia13ct/insect_detection/utils/loggers/comet/comet_utils.py b/spaces/anaclaudia13ct/insect_detection/utils/loggers/comet/comet_utils.py deleted file mode 100644 index 3cbd45156b576d09024fd11ea9dce83d4a6e5143..0000000000000000000000000000000000000000 --- a/spaces/anaclaudia13ct/insect_detection/utils/loggers/comet/comet_utils.py +++ /dev/null @@ -1,150 +0,0 @@ -import logging -import os -from urllib.parse import urlparse - -try: - import comet_ml -except (ModuleNotFoundError, ImportError): - comet_ml = None - -import yaml - -logger = logging.getLogger(__name__) - -COMET_PREFIX = "comet://" -COMET_MODEL_NAME = os.getenv("COMET_MODEL_NAME", "yolov5") -COMET_DEFAULT_CHECKPOINT_FILENAME = os.getenv("COMET_DEFAULT_CHECKPOINT_FILENAME", "last.pt") - - -def download_model_checkpoint(opt, experiment): - model_dir = f"{opt.project}/{experiment.name}" - os.makedirs(model_dir, exist_ok=True) - - model_name = COMET_MODEL_NAME - model_asset_list = experiment.get_model_asset_list(model_name) - - if len(model_asset_list) == 0: - logger.error(f"COMET ERROR: No checkpoints found for model name : {model_name}") - return - - model_asset_list = sorted( - model_asset_list, - key=lambda x: x["step"], - reverse=True, - ) - logged_checkpoint_map = {asset["fileName"]: asset["assetId"] for asset in model_asset_list} - - resource_url = urlparse(opt.weights) - checkpoint_filename = resource_url.query - - if checkpoint_filename: - asset_id = logged_checkpoint_map.get(checkpoint_filename) - else: - asset_id = logged_checkpoint_map.get(COMET_DEFAULT_CHECKPOINT_FILENAME) - checkpoint_filename = COMET_DEFAULT_CHECKPOINT_FILENAME - - if asset_id is None: - logger.error(f"COMET ERROR: Checkpoint {checkpoint_filename} not found in the given Experiment") - return - - try: - logger.info(f"COMET INFO: Downloading checkpoint {checkpoint_filename}") - asset_filename = checkpoint_filename - - model_binary = experiment.get_asset(asset_id, return_type="binary", stream=False) - model_download_path = f"{model_dir}/{asset_filename}" - with open(model_download_path, "wb") as f: - f.write(model_binary) - - opt.weights = model_download_path - - except Exception as e: - logger.warning("COMET WARNING: Unable to download checkpoint from Comet") - logger.exception(e) - - -def set_opt_parameters(opt, experiment): - """Update the opts Namespace with parameters - from Comet's ExistingExperiment when resuming a run - - Args: - opt (argparse.Namespace): Namespace of command line options - experiment (comet_ml.APIExperiment): Comet API Experiment object - """ - asset_list = experiment.get_asset_list() - resume_string = opt.resume - - for asset in asset_list: - if asset["fileName"] == "opt.yaml": - asset_id = asset["assetId"] - asset_binary = experiment.get_asset(asset_id, return_type="binary", stream=False) - opt_dict = yaml.safe_load(asset_binary) - for key, value in opt_dict.items(): - setattr(opt, key, value) - opt.resume = resume_string - - # Save hyperparameters to YAML file - # Necessary to pass checks in training script - save_dir = f"{opt.project}/{experiment.name}" - os.makedirs(save_dir, exist_ok=True) - - hyp_yaml_path = f"{save_dir}/hyp.yaml" - with open(hyp_yaml_path, "w") as f: - yaml.dump(opt.hyp, f) - opt.hyp = hyp_yaml_path - - -def check_comet_weights(opt): - """Downloads model weights from Comet and updates the - weights path to point to saved weights location - - Args: - opt (argparse.Namespace): Command Line arguments passed - to YOLOv5 training script - - Returns: - None/bool: Return True if weights are successfully downloaded - else return None - """ - if comet_ml is None: - return - - if isinstance(opt.weights, str): - if opt.weights.startswith(COMET_PREFIX): - api = comet_ml.API() - resource = urlparse(opt.weights) - experiment_path = f"{resource.netloc}{resource.path}" - experiment = api.get(experiment_path) - download_model_checkpoint(opt, experiment) - return True - - return None - - -def check_comet_resume(opt): - """Restores run parameters to its original state based on the model checkpoint - and logged Experiment parameters. - - Args: - opt (argparse.Namespace): Command Line arguments passed - to YOLOv5 training script - - Returns: - None/bool: Return True if the run is restored successfully - else return None - """ - if comet_ml is None: - return - - if isinstance(opt.resume, str): - if opt.resume.startswith(COMET_PREFIX): - api = comet_ml.API() - resource = urlparse(opt.resume) - experiment_path = f"{resource.netloc}{resource.path}" - experiment = api.get(experiment_path) - set_opt_parameters(opt, experiment) - download_model_checkpoint(opt, experiment) - - return True - - return None diff --git a/spaces/aodianyun/panoptic-segment-anything/GroundingDINO/groundingdino/util/box_ops.py b/spaces/aodianyun/panoptic-segment-anything/GroundingDINO/groundingdino/util/box_ops.py deleted file mode 100644 index 781068d294e576954edb4bd07b6e0f30e4e1bcd9..0000000000000000000000000000000000000000 --- a/spaces/aodianyun/panoptic-segment-anything/GroundingDINO/groundingdino/util/box_ops.py +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved -""" -Utilities for bounding box manipulation and GIoU. -""" -import torch -from torchvision.ops.boxes import box_area - - -def box_cxcywh_to_xyxy(x): - x_c, y_c, w, h = x.unbind(-1) - b = [(x_c - 0.5 * w), (y_c - 0.5 * h), (x_c + 0.5 * w), (y_c + 0.5 * h)] - return torch.stack(b, dim=-1) - - -def box_xyxy_to_cxcywh(x): - x0, y0, x1, y1 = x.unbind(-1) - b = [(x0 + x1) / 2, (y0 + y1) / 2, (x1 - x0), (y1 - y0)] - return torch.stack(b, dim=-1) - - -# modified from torchvision to also return the union -def box_iou(boxes1, boxes2): - area1 = box_area(boxes1) - area2 = box_area(boxes2) - - # import ipdb; ipdb.set_trace() - lt = torch.max(boxes1[:, None, :2], boxes2[:, :2]) # [N,M,2] - rb = torch.min(boxes1[:, None, 2:], boxes2[:, 2:]) # [N,M,2] - - wh = (rb - lt).clamp(min=0) # [N,M,2] - inter = wh[:, :, 0] * wh[:, :, 1] # [N,M] - - union = area1[:, None] + area2 - inter - - iou = inter / (union + 1e-6) - return iou, union - - -def generalized_box_iou(boxes1, boxes2): - """ - Generalized IoU from https://giou.stanford.edu/ - - The boxes should be in [x0, y0, x1, y1] format - - Returns a [N, M] pairwise matrix, where N = len(boxes1) - and M = len(boxes2) - """ - # degenerate boxes gives inf / nan results - # so do an early check - assert (boxes1[:, 2:] >= boxes1[:, :2]).all() - assert (boxes2[:, 2:] >= boxes2[:, :2]).all() - # except: - # import ipdb; ipdb.set_trace() - iou, union = box_iou(boxes1, boxes2) - - lt = torch.min(boxes1[:, None, :2], boxes2[:, :2]) - rb = torch.max(boxes1[:, None, 2:], boxes2[:, 2:]) - - wh = (rb - lt).clamp(min=0) # [N,M,2] - area = wh[:, :, 0] * wh[:, :, 1] - - return iou - (area - union) / (area + 1e-6) - - -# modified from torchvision to also return the union -def box_iou_pairwise(boxes1, boxes2): - area1 = box_area(boxes1) - area2 = box_area(boxes2) - - lt = torch.max(boxes1[:, :2], boxes2[:, :2]) # [N,2] - rb = torch.min(boxes1[:, 2:], boxes2[:, 2:]) # [N,2] - - wh = (rb - lt).clamp(min=0) # [N,2] - inter = wh[:, 0] * wh[:, 1] # [N] - - union = area1 + area2 - inter - - iou = inter / union - return iou, union - - -def generalized_box_iou_pairwise(boxes1, boxes2): - """ - Generalized IoU from https://giou.stanford.edu/ - - Input: - - boxes1, boxes2: N,4 - Output: - - giou: N, 4 - """ - # degenerate boxes gives inf / nan results - # so do an early check - assert (boxes1[:, 2:] >= boxes1[:, :2]).all() - assert (boxes2[:, 2:] >= boxes2[:, :2]).all() - assert boxes1.shape == boxes2.shape - iou, union = box_iou_pairwise(boxes1, boxes2) # N, 4 - - lt = torch.min(boxes1[:, :2], boxes2[:, :2]) - rb = torch.max(boxes1[:, 2:], boxes2[:, 2:]) - - wh = (rb - lt).clamp(min=0) # [N,2] - area = wh[:, 0] * wh[:, 1] - - return iou - (area - union) / area - - -def masks_to_boxes(masks): - """Compute the bounding boxes around the provided masks - - The masks should be in format [N, H, W] where N is the number of masks, (H, W) are the spatial dimensions. - - Returns a [N, 4] tensors, with the boxes in xyxy format - """ - if masks.numel() == 0: - return torch.zeros((0, 4), device=masks.device) - - h, w = masks.shape[-2:] - - y = torch.arange(0, h, dtype=torch.float) - x = torch.arange(0, w, dtype=torch.float) - y, x = torch.meshgrid(y, x) - - x_mask = masks * x.unsqueeze(0) - x_max = x_mask.flatten(1).max(-1)[0] - x_min = x_mask.masked_fill(~(masks.bool()), 1e8).flatten(1).min(-1)[0] - - y_mask = masks * y.unsqueeze(0) - y_max = y_mask.flatten(1).max(-1)[0] - y_min = y_mask.masked_fill(~(masks.bool()), 1e8).flatten(1).min(-1)[0] - - return torch.stack([x_min, y_min, x_max, y_max], 1) - - -if __name__ == "__main__": - x = torch.rand(5, 4) - y = torch.rand(3, 4) - iou, union = box_iou(x, y) - import ipdb - - ipdb.set_trace() diff --git a/spaces/artificialguybr/video-dubbing/TTS/TTS/vocoder/README.md b/spaces/artificialguybr/video-dubbing/TTS/TTS/vocoder/README.md deleted file mode 100644 index b9fb17c8f09fa6e8c217087e31fb8c52d96da536..0000000000000000000000000000000000000000 --- a/spaces/artificialguybr/video-dubbing/TTS/TTS/vocoder/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Mozilla TTS Vocoders (Experimental) - -Here there are vocoder model implementations which can be combined with the other TTS models. - -Currently, following models are implemented: - -- Melgan -- MultiBand-Melgan -- ParallelWaveGAN -- GAN-TTS (Discriminator Only) - -It is also very easy to adapt different vocoder models as we provide a flexible and modular (but not too modular) framework. - -## Training a model - -You can see here an example (Soon)[Colab Notebook]() training MelGAN with LJSpeech dataset. - -In order to train a new model, you need to gather all wav files into a folder and give this folder to `data_path` in '''config.json''' - -You need to define other relevant parameters in your ```config.json``` and then start traning with the following command. - -```CUDA_VISIBLE_DEVICES='0' python tts/bin/train_vocoder.py --config_path path/to/config.json``` - -Example config files can be found under `tts/vocoder/configs/` folder. - -You can continue a previous training run by the following command. - -```CUDA_VISIBLE_DEVICES='0' python tts/bin/train_vocoder.py --continue_path path/to/your/model/folder``` - -You can fine-tune a pre-trained model by the following command. - -```CUDA_VISIBLE_DEVICES='0' python tts/bin/train_vocoder.py --restore_path path/to/your/model.pth``` - -Restoring a model starts a new training in a different folder. It only restores model weights with the given checkpoint file. However, continuing a training starts from the same directory where the previous training run left off. - -You can also follow your training runs on Tensorboard as you do with our TTS models. - -## Acknowledgement -Thanks to @kan-bayashi for his [repository](https://github.com/kan-bayashi/ParallelWaveGAN) being the start point of our work. diff --git a/spaces/artificialguybr/video-dubbing/Wav2Lip/color_syncnet_train.py b/spaces/artificialguybr/video-dubbing/Wav2Lip/color_syncnet_train.py deleted file mode 100644 index afa00544386cb9627f0d899476abbc82b37958ed..0000000000000000000000000000000000000000 --- a/spaces/artificialguybr/video-dubbing/Wav2Lip/color_syncnet_train.py +++ /dev/null @@ -1,279 +0,0 @@ -from os.path import dirname, join, basename, isfile -from tqdm import tqdm - -from models import SyncNet_color as SyncNet -import audio - -import torch -from torch import nn -from torch import optim -import torch.backends.cudnn as cudnn -from torch.utils import data as data_utils -import numpy as np - -from glob import glob - -import os, random, cv2, argparse -from hparams import hparams, get_image_list - -parser = argparse.ArgumentParser(description='Code to train the expert lip-sync discriminator') - -parser.add_argument("--data_root", help="Root folder of the preprocessed LRS2 dataset", required=True) - -parser.add_argument('--checkpoint_dir', help='Save checkpoints to this directory', required=True, type=str) -parser.add_argument('--checkpoint_path', help='Resumed from this checkpoint', default=None, type=str) - -args = parser.parse_args() - - -global_step = 0 -global_epoch = 0 -use_cuda = torch.cuda.is_available() -print('use_cuda: {}'.format(use_cuda)) - -syncnet_T = 5 -syncnet_mel_step_size = 16 - -class Dataset(object): - def __init__(self, split): - self.all_videos = get_image_list(args.data_root, split) - - def get_frame_id(self, frame): - return int(basename(frame).split('.')[0]) - - def get_window(self, start_frame): - start_id = self.get_frame_id(start_frame) - vidname = dirname(start_frame) - - window_fnames = [] - for frame_id in range(start_id, start_id + syncnet_T): - frame = join(vidname, '{}.jpg'.format(frame_id)) - if not isfile(frame): - return None - window_fnames.append(frame) - return window_fnames - - def crop_audio_window(self, spec, start_frame): - # num_frames = (T x hop_size * fps) / sample_rate - start_frame_num = self.get_frame_id(start_frame) - start_idx = int(80. * (start_frame_num / float(hparams.fps))) - - end_idx = start_idx + syncnet_mel_step_size - - return spec[start_idx : end_idx, :] - - - def __len__(self): - return len(self.all_videos) - - def __getitem__(self, idx): - while 1: - idx = random.randint(0, len(self.all_videos) - 1) - vidname = self.all_videos[idx] - - img_names = list(glob(join(vidname, '*.jpg'))) - if len(img_names) <= 3 * syncnet_T: - continue - img_name = random.choice(img_names) - wrong_img_name = random.choice(img_names) - while wrong_img_name == img_name: - wrong_img_name = random.choice(img_names) - - if random.choice([True, False]): - y = torch.ones(1).float() - chosen = img_name - else: - y = torch.zeros(1).float() - chosen = wrong_img_name - - window_fnames = self.get_window(chosen) - if window_fnames is None: - continue - - window = [] - all_read = True - for fname in window_fnames: - img = cv2.imread(fname) - if img is None: - all_read = False - break - try: - img = cv2.resize(img, (hparams.img_size, hparams.img_size)) - except Exception as e: - all_read = False - break - - window.append(img) - - if not all_read: continue - - try: - wavpath = join(vidname, "audio.wav") - wav = audio.load_wav(wavpath, hparams.sample_rate) - - orig_mel = audio.melspectrogram(wav).T - except Exception as e: - continue - - mel = self.crop_audio_window(orig_mel.copy(), img_name) - - if (mel.shape[0] != syncnet_mel_step_size): - continue - - # H x W x 3 * T - x = np.concatenate(window, axis=2) / 255. - x = x.transpose(2, 0, 1) - x = x[:, x.shape[1]//2:] - - x = torch.FloatTensor(x) - mel = torch.FloatTensor(mel.T).unsqueeze(0) - - return x, mel, y - -logloss = nn.BCELoss() -def cosine_loss(a, v, y): - d = nn.functional.cosine_similarity(a, v) - loss = logloss(d.unsqueeze(1), y) - - return loss - -def train(device, model, train_data_loader, test_data_loader, optimizer, - checkpoint_dir=None, checkpoint_interval=None, nepochs=None): - - global global_step, global_epoch - resumed_step = global_step - - while global_epoch < nepochs: - running_loss = 0. - prog_bar = tqdm(enumerate(train_data_loader)) - for step, (x, mel, y) in prog_bar: - model.train() - optimizer.zero_grad() - - # Transform data to CUDA device - x = x.to(device) - - mel = mel.to(device) - - a, v = model(mel, x) - y = y.to(device) - - loss = cosine_loss(a, v, y) - loss.backward() - optimizer.step() - - global_step += 1 - cur_session_steps = global_step - resumed_step - running_loss += loss.item() - - if global_step == 1 or global_step % checkpoint_interval == 0: - save_checkpoint( - model, optimizer, global_step, checkpoint_dir, global_epoch) - - if global_step % hparams.syncnet_eval_interval == 0: - with torch.no_grad(): - eval_model(test_data_loader, global_step, device, model, checkpoint_dir) - - prog_bar.set_description('Loss: {}'.format(running_loss / (step + 1))) - - global_epoch += 1 - -def eval_model(test_data_loader, global_step, device, model, checkpoint_dir): - eval_steps = 1400 - print('Evaluating for {} steps'.format(eval_steps)) - losses = [] - while 1: - for step, (x, mel, y) in enumerate(test_data_loader): - - model.eval() - - # Transform data to CUDA device - x = x.to(device) - - mel = mel.to(device) - - a, v = model(mel, x) - y = y.to(device) - - loss = cosine_loss(a, v, y) - losses.append(loss.item()) - - if step > eval_steps: break - - averaged_loss = sum(losses) / len(losses) - print(averaged_loss) - - return - -def save_checkpoint(model, optimizer, step, checkpoint_dir, epoch): - - checkpoint_path = join( - checkpoint_dir, "checkpoint_step{:09d}.pth".format(global_step)) - optimizer_state = optimizer.state_dict() if hparams.save_optimizer_state else None - torch.save({ - "state_dict": model.state_dict(), - "optimizer": optimizer_state, - "global_step": step, - "global_epoch": epoch, - }, checkpoint_path) - print("Saved checkpoint:", checkpoint_path) - -def _load(checkpoint_path): - if use_cuda: - checkpoint = torch.load(checkpoint_path) - else: - checkpoint = torch.load(checkpoint_path, - map_location=lambda storage, loc: storage) - return checkpoint - -def load_checkpoint(path, model, optimizer, reset_optimizer=False): - global global_step - global global_epoch - - print("Load checkpoint from: {}".format(path)) - checkpoint = _load(path) - model.load_state_dict(checkpoint["state_dict"]) - if not reset_optimizer: - optimizer_state = checkpoint["optimizer"] - if optimizer_state is not None: - print("Load optimizer state from {}".format(path)) - optimizer.load_state_dict(checkpoint["optimizer"]) - global_step = checkpoint["global_step"] - global_epoch = checkpoint["global_epoch"] - - return model - -if __name__ == "__main__": - checkpoint_dir = args.checkpoint_dir - checkpoint_path = args.checkpoint_path - - if not os.path.exists(checkpoint_dir): os.mkdir(checkpoint_dir) - - # Dataset and Dataloader setup - train_dataset = Dataset('train') - test_dataset = Dataset('val') - - train_data_loader = data_utils.DataLoader( - train_dataset, batch_size=hparams.syncnet_batch_size, shuffle=True, - num_workers=hparams.num_workers) - - test_data_loader = data_utils.DataLoader( - test_dataset, batch_size=hparams.syncnet_batch_size, - num_workers=8) - - device = torch.device("cuda" if use_cuda else "cpu") - - # Model - model = SyncNet().to(device) - print('total trainable params {}'.format(sum(p.numel() for p in model.parameters() if p.requires_grad))) - - optimizer = optim.Adam([p for p in model.parameters() if p.requires_grad], - lr=hparams.syncnet_lr) - - if checkpoint_path is not None: - load_checkpoint(checkpoint_path, model, optimizer, reset_optimizer=False) - - train(device, model, train_data_loader, test_data_loader, optimizer, - checkpoint_dir=checkpoint_dir, - checkpoint_interval=hparams.syncnet_checkpoint_interval, - nepochs=hparams.nepochs) diff --git a/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/Crypto/Util/number.py b/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/Crypto/Util/number.py deleted file mode 100644 index 279ffe0c6a9d90b592c91b1a74a40252982ec137..0000000000000000000000000000000000000000 --- a/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/Crypto/Util/number.py +++ /dev/null @@ -1,1500 +0,0 @@ -# -# number.py : Number-theoretic functions -# -# Part of the Python Cryptography Toolkit -# -# Written by Andrew M. Kuchling, Barry A. Warsaw, and others -# -# =================================================================== -# The contents of this file are dedicated to the public domain. To -# the extent that dedication to the public domain is not available, -# everyone is granted a worldwide, perpetual, royalty-free, -# non-exclusive license to exercise all rights associated with the -# contents of this file for any purpose whatsoever. -# No rights are reserved. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# =================================================================== -# - -import math -import sys -import struct -from Crypto import Random -from Crypto.Util.py3compat import iter_range - -# Backward compatibility -_fastmath = None - - -def ceil_div(n, d): - """Return ceil(n/d), that is, the smallest integer r such that r*d >= n""" - - if d == 0: - raise ZeroDivisionError() - if (n < 0) or (d < 0): - raise ValueError("Non positive values") - r, q = divmod(n, d) - if (n != 0) and (q != 0): - r += 1 - return r - - -def size (N): - """Returns the size of the number N in bits.""" - - if N < 0: - raise ValueError("Size in bits only avialable for non-negative numbers") - - bits = 0 - while N >> bits: - bits += 1 - return bits - - -def getRandomInteger(N, randfunc=None): - """Return a random number at most N bits long. - - If :data:`randfunc` is omitted, then :meth:`Random.get_random_bytes` is used. - - .. deprecated:: 3.0 - This function is for internal use only and may be renamed or removed in - the future. Use :func:`Crypto.Random.random.getrandbits` instead. - """ - - if randfunc is None: - randfunc = Random.get_random_bytes - - S = randfunc(N>>3) - odd_bits = N % 8 - if odd_bits != 0: - rand_bits = ord(randfunc(1)) >> (8-odd_bits) - S = struct.pack('B', rand_bits) + S - value = bytes_to_long(S) - return value - -def getRandomRange(a, b, randfunc=None): - """Return a random number *n* so that *a <= n < b*. - - If :data:`randfunc` is omitted, then :meth:`Random.get_random_bytes` is used. - - .. deprecated:: 3.0 - This function is for internal use only and may be renamed or removed in - the future. Use :func:`Crypto.Random.random.randrange` instead. - """ - - range_ = b - a - 1 - bits = size(range_) - value = getRandomInteger(bits, randfunc) - while value > range_: - value = getRandomInteger(bits, randfunc) - return a + value - -def getRandomNBitInteger(N, randfunc=None): - """Return a random number with exactly N-bits, - i.e. a random number between 2**(N-1) and (2**N)-1. - - If :data:`randfunc` is omitted, then :meth:`Random.get_random_bytes` is used. - - .. deprecated:: 3.0 - This function is for internal use only and may be renamed or removed in - the future. - """ - - value = getRandomInteger (N-1, randfunc) - value |= 2 ** (N-1) # Ensure high bit is set - assert size(value) >= N - return value - -def GCD(x,y): - """Greatest Common Denominator of :data:`x` and :data:`y`. - """ - - x = abs(x) ; y = abs(y) - while x > 0: - x, y = y % x, x - return y - -def inverse(u, v): - """The inverse of :data:`u` *mod* :data:`v`.""" - - u3, v3 = u, v - u1, v1 = 1, 0 - while v3 > 0: - q = u3 // v3 - u1, v1 = v1, u1 - v1*q - u3, v3 = v3, u3 - v3*q - while u1<0: - u1 = u1 + v - return u1 - -# Given a number of bits to generate and a random generation function, -# find a prime number of the appropriate size. - -def getPrime(N, randfunc=None): - """Return a random N-bit prime number. - - N must be an integer larger than 1. - If randfunc is omitted, then :meth:`Random.get_random_bytes` is used. - """ - if randfunc is None: - randfunc = Random.get_random_bytes - - if N < 2: - raise ValueError("N must be larger than 1") - - while True: - number = getRandomNBitInteger(N, randfunc) | 1 - if isPrime(number, randfunc=randfunc): - break - return number - - -def _rabinMillerTest(n, rounds, randfunc=None): - """_rabinMillerTest(n:long, rounds:int, randfunc:callable):int - Tests if n is prime. - Returns 0 when n is definitely composite. - Returns 1 when n is probably prime. - Returns 2 when n is definitely prime. - - If randfunc is omitted, then Random.new().read is used. - - This function is for internal use only and may be renamed or removed in - the future. - """ - # check special cases (n==2, n even, n < 2) - if n < 3 or (n & 1) == 0: - return n == 2 - # n might be very large so it might be beneficial to precalculate n-1 - n_1 = n - 1 - # determine m and b so that 2**b * m = n - 1 and b maximal - b = 0 - m = n_1 - while (m & 1) == 0: - b += 1 - m >>= 1 - - tested = [] - # we need to do at most n-2 rounds. - for i in iter_range (min (rounds, n-2)): - # randomly choose a < n and make sure it hasn't been tested yet - a = getRandomRange (2, n, randfunc) - while a in tested: - a = getRandomRange (2, n, randfunc) - tested.append (a) - # do the rabin-miller test - z = pow (a, m, n) # (a**m) % n - if z == 1 or z == n_1: - continue - composite = 1 - for r in iter_range(b): - z = (z * z) % n - if z == 1: - return 0 - elif z == n_1: - composite = 0 - break - if composite: - return 0 - return 1 - -def getStrongPrime(N, e=0, false_positive_prob=1e-6, randfunc=None): - r""" - Return a random strong *N*-bit prime number. - In this context, *p* is a strong prime if *p-1* and *p+1* have at - least one large prime factor. - - Args: - N (integer): the exact length of the strong prime. - It must be a multiple of 128 and > 512. - e (integer): if provided, the returned prime (minus 1) - will be coprime to *e* and thus suitable for RSA where - *e* is the public exponent. - false_positive_prob (float): - The statistical probability for the result not to be actually a - prime. It defaults to 10\ :sup:`-6`. - Note that the real probability of a false-positive is far less. This is - just the mathematically provable limit. - randfunc (callable): - A function that takes a parameter *N* and that returns - a random byte string of such length. - If omitted, :func:`Crypto.Random.get_random_bytes` is used. - Return: - The new strong prime. - - .. deprecated:: 3.0 - This function is for internal use only and may be renamed or removed in - the future. - """ - - # This function was implemented following the - # instructions found in the paper: - # "FAST GENERATION OF RANDOM, STRONG RSA PRIMES" - # by Robert D. Silverman - # RSA Laboratories - # May 17, 1997 - # which by the time of writing could be freely downloaded here: - # http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.17.2713&rep=rep1&type=pdf - - if randfunc is None: - randfunc = Random.get_random_bytes - - # Use the accelerator if available - if _fastmath is not None: - return _fastmath.getStrongPrime(long(N), long(e), false_positive_prob, - randfunc) - - if (N < 512) or ((N % 128) != 0): - raise ValueError ("bits must be multiple of 128 and > 512") - - rabin_miller_rounds = int(math.ceil(-math.log(false_positive_prob)/math.log(4))) - - # calculate range for X - # lower_bound = sqrt(2) * 2^{511 + 128*x} - # upper_bound = 2^{512 + 128*x} - 1 - x = (N - 512) >> 7; - # We need to approximate the sqrt(2) in the lower_bound by an integer - # expression because floating point math overflows with these numbers - lower_bound = (14142135623730950489 * (2 ** (511 + 128*x))) // 10000000000000000000 - upper_bound = (1 << (512 + 128*x)) - 1 - # Randomly choose X in calculated range - X = getRandomRange (lower_bound, upper_bound, randfunc) - - # generate p1 and p2 - p = [0, 0] - for i in (0, 1): - # randomly choose 101-bit y - y = getRandomNBitInteger (101, randfunc) - # initialize the field for sieving - field = [0] * 5 * len (sieve_base) - # sieve the field - for prime in sieve_base: - offset = y % prime - for j in iter_range((prime - offset) % prime, len (field), prime): - field[j] = 1 - - # look for suitable p[i] starting at y - result = 0 - for j in range(len(field)): - composite = field[j] - # look for next canidate - if composite: - continue - tmp = y + j - result = _rabinMillerTest (tmp, rabin_miller_rounds) - if result > 0: - p[i] = tmp - break - if result == 0: - raise RuntimeError ("Couln't find prime in field. " - "Developer: Increase field_size") - - # Calculate R - # R = (p2^{-1} mod p1) * p2 - (p1^{-1} mod p2) * p1 - tmp1 = inverse (p[1], p[0]) * p[1] # (p2^-1 mod p1)*p2 - tmp2 = inverse (p[0], p[1]) * p[0] # (p1^-1 mod p2)*p1 - R = tmp1 - tmp2 # (p2^-1 mod p1)*p2 - (p1^-1 mod p2)*p1 - - # search for final prime number starting by Y0 - # Y0 = X + (R - X mod p1p2) - increment = p[0] * p[1] - X = X + (R - (X % increment)) - while 1: - is_possible_prime = 1 - # first check candidate against sieve_base - for prime in sieve_base: - if (X % prime) == 0: - is_possible_prime = 0 - break - # if e is given make sure that e and X-1 are coprime - # this is not necessarily a strong prime criterion but useful when - # creating them for RSA where the p-1 and q-1 should be coprime to - # the public exponent e - if e and is_possible_prime: - if e & 1: - if GCD(e, X-1) != 1: - is_possible_prime = 0 - else: - if GCD(e, (X-1) // 2) != 1: - is_possible_prime = 0 - - # do some Rabin-Miller-Tests - if is_possible_prime: - result = _rabinMillerTest (X, rabin_miller_rounds) - if result > 0: - break - X += increment - # abort when X has more bits than requested - # TODO: maybe we shouldn't abort but rather start over. - if X >= 1 << N: - raise RuntimeError ("Couln't find prime in field. " - "Developer: Increase field_size") - return X - -def isPrime(N, false_positive_prob=1e-6, randfunc=None): - r"""Test if a number *N* is a prime. - - Args: - false_positive_prob (float): - The statistical probability for the result not to be actually a - prime. It defaults to 10\ :sup:`-6`. - Note that the real probability of a false-positive is far less. - This is just the mathematically provable limit. - randfunc (callable): - A function that takes a parameter *N* and that returns - a random byte string of such length. - If omitted, :func:`Crypto.Random.get_random_bytes` is used. - - Return: - `True` is the input is indeed prime. - """ - - if randfunc is None: - randfunc = Random.get_random_bytes - - if _fastmath is not None: - return _fastmath.isPrime(long(N), false_positive_prob, randfunc) - - if N < 3 or N & 1 == 0: - return N == 2 - for p in sieve_base: - if N == p: - return 1 - if N % p == 0: - return 0 - - rounds = int(math.ceil(-math.log(false_positive_prob)/math.log(4))) - return _rabinMillerTest(N, rounds, randfunc) - - -# Improved conversion functions contributed by Barry Warsaw, after -# careful benchmarking - -import struct - -def long_to_bytes(n, blocksize=0): - """Convert a positive integer to a byte string using big endian encoding. - - If :data:`blocksize` is absent or zero, the byte string will - be of minimal length. - - Otherwise, the length of the byte string is guaranteed to be a multiple - of :data:`blocksize`. If necessary, zeroes (``\\x00``) are added at the left. - - .. note:: - In Python 3, if you are sure that :data:`n` can fit into - :data:`blocksize` bytes, you can simply use the native method instead:: - - >>> n.to_bytes(blocksize, 'big') - - For instance:: - - >>> n = 80 - >>> n.to_bytes(2, 'big') - b'\\x00P' - - However, and unlike this ``long_to_bytes()`` function, - an ``OverflowError`` exception is raised if :data:`n` does not fit. - """ - - if n < 0 or blocksize < 0: - raise ValueError("Values must be non-negative") - - result = [] - pack = struct.pack - - # Fill the first block independently from the value of n - bsr = blocksize - while bsr >= 8: - result.insert(0, pack('>Q', n & 0xFFFFFFFFFFFFFFFF)) - n = n >> 64 - bsr -= 8 - - while bsr >= 4: - result.insert(0, pack('>I', n & 0xFFFFFFFF)) - n = n >> 32 - bsr -= 4 - - while bsr > 0: - result.insert(0, pack('>B', n & 0xFF)) - n = n >> 8 - bsr -= 1 - - if n == 0: - if len(result) == 0: - bresult = b'\x00' - else: - bresult = b''.join(result) - else: - # The encoded number exceeds the block size - while n > 0: - result.insert(0, pack('>Q', n & 0xFFFFFFFFFFFFFFFF)) - n = n >> 64 - result[0] = result[0].lstrip(b'\x00') - bresult = b''.join(result) - # bresult has minimum length here - if blocksize > 0: - target_len = ((len(bresult) - 1) // blocksize + 1) * blocksize - bresult = b'\x00' * (target_len - len(bresult)) + bresult - - return bresult - - -def bytes_to_long(s): - """Convert a byte string to a long integer (big endian). - - In Python 3.2+, use the native method instead:: - - >>> int.from_bytes(s, 'big') - - For instance:: - - >>> int.from_bytes(b'\x00P', 'big') - 80 - - This is (essentially) the inverse of :func:`long_to_bytes`. - """ - acc = 0 - - unpack = struct.unpack - - # Up to Python 2.7.4, struct.unpack can't work with bytearrays nor - # memoryviews - if sys.version_info[0:3] < (2, 7, 4): - if isinstance(s, bytearray): - s = bytes(s) - elif isinstance(s, memoryview): - s = s.tobytes() - - length = len(s) - if length % 4: - extra = (4 - length % 4) - s = b'\x00' * extra + s - length = length + extra - for i in range(0, length, 4): - acc = (acc << 32) + unpack('>I', s[i:i+4])[0] - return acc - - -# For backwards compatibility... -import warnings -def long2str(n, blocksize=0): - warnings.warn("long2str() has been replaced by long_to_bytes()") - return long_to_bytes(n, blocksize) -def str2long(s): - warnings.warn("str2long() has been replaced by bytes_to_long()") - return bytes_to_long(s) - - -# The first 10000 primes used for checking primality. -# This should be enough to eliminate most of the odd -# numbers before needing to do a Rabin-Miller test at all. -sieve_base = ( - 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, - 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, - 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, - 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, - 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, - 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, - 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, - 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, - 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, - 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, - 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, - 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, - 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, - 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, - 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, - 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, - 947, 953, 967, 971, 977, 983, 991, 997, 1009, 1013, - 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, - 1087, 1091, 1093, 1097, 1103, 1109, 1117, 1123, 1129, 1151, - 1153, 1163, 1171, 1181, 1187, 1193, 1201, 1213, 1217, 1223, - 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, - 1297, 1301, 1303, 1307, 1319, 1321, 1327, 1361, 1367, 1373, - 1381, 1399, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, - 1453, 1459, 1471, 1481, 1483, 1487, 1489, 1493, 1499, 1511, - 1523, 1531, 1543, 1549, 1553, 1559, 1567, 1571, 1579, 1583, - 1597, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, - 1663, 1667, 1669, 1693, 1697, 1699, 1709, 1721, 1723, 1733, - 1741, 1747, 1753, 1759, 1777, 1783, 1787, 1789, 1801, 1811, - 1823, 1831, 1847, 1861, 1867, 1871, 1873, 1877, 1879, 1889, - 1901, 1907, 1913, 1931, 1933, 1949, 1951, 1973, 1979, 1987, - 1993, 1997, 1999, 2003, 2011, 2017, 2027, 2029, 2039, 2053, - 2063, 2069, 2081, 2083, 2087, 2089, 2099, 2111, 2113, 2129, - 2131, 2137, 2141, 2143, 2153, 2161, 2179, 2203, 2207, 2213, - 2221, 2237, 2239, 2243, 2251, 2267, 2269, 2273, 2281, 2287, - 2293, 2297, 2309, 2311, 2333, 2339, 2341, 2347, 2351, 2357, - 2371, 2377, 2381, 2383, 2389, 2393, 2399, 2411, 2417, 2423, - 2437, 2441, 2447, 2459, 2467, 2473, 2477, 2503, 2521, 2531, - 2539, 2543, 2549, 2551, 2557, 2579, 2591, 2593, 2609, 2617, - 2621, 2633, 2647, 2657, 2659, 2663, 2671, 2677, 2683, 2687, - 2689, 2693, 2699, 2707, 2711, 2713, 2719, 2729, 2731, 2741, - 2749, 2753, 2767, 2777, 2789, 2791, 2797, 2801, 2803, 2819, - 2833, 2837, 2843, 2851, 2857, 2861, 2879, 2887, 2897, 2903, - 2909, 2917, 2927, 2939, 2953, 2957, 2963, 2969, 2971, 2999, - 3001, 3011, 3019, 3023, 3037, 3041, 3049, 3061, 3067, 3079, - 3083, 3089, 3109, 3119, 3121, 3137, 3163, 3167, 3169, 3181, - 3187, 3191, 3203, 3209, 3217, 3221, 3229, 3251, 3253, 3257, - 3259, 3271, 3299, 3301, 3307, 3313, 3319, 3323, 3329, 3331, - 3343, 3347, 3359, 3361, 3371, 3373, 3389, 3391, 3407, 3413, - 3433, 3449, 3457, 3461, 3463, 3467, 3469, 3491, 3499, 3511, - 3517, 3527, 3529, 3533, 3539, 3541, 3547, 3557, 3559, 3571, - 3581, 3583, 3593, 3607, 3613, 3617, 3623, 3631, 3637, 3643, - 3659, 3671, 3673, 3677, 3691, 3697, 3701, 3709, 3719, 3727, - 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, - 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, - 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, - 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, - 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, - 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, - 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, - 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, - 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, - 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, - 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, - 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, - 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, - 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, - 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, - 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, - 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, - 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, - 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, - 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, - 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, - 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, - 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, - 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, - 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, - 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, - 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, - 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, - 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, - 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, - 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, - 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, - 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, - 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, - 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, - 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, - 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, - 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, - 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, - 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, - 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, - 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, - 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, - 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, - 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, - 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, - 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, - 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, - 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, - 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, - 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, - 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, - 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, - 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467, 8501, - 8513, 8521, 8527, 8537, 8539, 8543, 8563, 8573, 8581, 8597, - 8599, 8609, 8623, 8627, 8629, 8641, 8647, 8663, 8669, 8677, - 8681, 8689, 8693, 8699, 8707, 8713, 8719, 8731, 8737, 8741, - 8747, 8753, 8761, 8779, 8783, 8803, 8807, 8819, 8821, 8831, - 8837, 8839, 8849, 8861, 8863, 8867, 8887, 8893, 8923, 8929, - 8933, 8941, 8951, 8963, 8969, 8971, 8999, 9001, 9007, 9011, - 9013, 9029, 9041, 9043, 9049, 9059, 9067, 9091, 9103, 9109, - 9127, 9133, 9137, 9151, 9157, 9161, 9173, 9181, 9187, 9199, - 9203, 9209, 9221, 9227, 9239, 9241, 9257, 9277, 9281, 9283, - 9293, 9311, 9319, 9323, 9337, 9341, 9343, 9349, 9371, 9377, - 9391, 9397, 9403, 9413, 9419, 9421, 9431, 9433, 9437, 9439, - 9461, 9463, 9467, 9473, 9479, 9491, 9497, 9511, 9521, 9533, - 9539, 9547, 9551, 9587, 9601, 9613, 9619, 9623, 9629, 9631, - 9643, 9649, 9661, 9677, 9679, 9689, 9697, 9719, 9721, 9733, - 9739, 9743, 9749, 9767, 9769, 9781, 9787, 9791, 9803, 9811, - 9817, 9829, 9833, 9839, 9851, 9857, 9859, 9871, 9883, 9887, - 9901, 9907, 9923, 9929, 9931, 9941, 9949, 9967, 9973, 10007, - 10009, 10037, 10039, 10061, 10067, 10069, 10079, 10091, 10093, 10099, - 10103, 10111, 10133, 10139, 10141, 10151, 10159, 10163, 10169, 10177, - 10181, 10193, 10211, 10223, 10243, 10247, 10253, 10259, 10267, 10271, - 10273, 10289, 10301, 10303, 10313, 10321, 10331, 10333, 10337, 10343, - 10357, 10369, 10391, 10399, 10427, 10429, 10433, 10453, 10457, 10459, - 10463, 10477, 10487, 10499, 10501, 10513, 10529, 10531, 10559, 10567, - 10589, 10597, 10601, 10607, 10613, 10627, 10631, 10639, 10651, 10657, - 10663, 10667, 10687, 10691, 10709, 10711, 10723, 10729, 10733, 10739, - 10753, 10771, 10781, 10789, 10799, 10831, 10837, 10847, 10853, 10859, - 10861, 10867, 10883, 10889, 10891, 10903, 10909, 10937, 10939, 10949, - 10957, 10973, 10979, 10987, 10993, 11003, 11027, 11047, 11057, 11059, - 11069, 11071, 11083, 11087, 11093, 11113, 11117, 11119, 11131, 11149, - 11159, 11161, 11171, 11173, 11177, 11197, 11213, 11239, 11243, 11251, - 11257, 11261, 11273, 11279, 11287, 11299, 11311, 11317, 11321, 11329, - 11351, 11353, 11369, 11383, 11393, 11399, 11411, 11423, 11437, 11443, - 11447, 11467, 11471, 11483, 11489, 11491, 11497, 11503, 11519, 11527, - 11549, 11551, 11579, 11587, 11593, 11597, 11617, 11621, 11633, 11657, - 11677, 11681, 11689, 11699, 11701, 11717, 11719, 11731, 11743, 11777, - 11779, 11783, 11789, 11801, 11807, 11813, 11821, 11827, 11831, 11833, - 11839, 11863, 11867, 11887, 11897, 11903, 11909, 11923, 11927, 11933, - 11939, 11941, 11953, 11959, 11969, 11971, 11981, 11987, 12007, 12011, - 12037, 12041, 12043, 12049, 12071, 12073, 12097, 12101, 12107, 12109, - 12113, 12119, 12143, 12149, 12157, 12161, 12163, 12197, 12203, 12211, - 12227, 12239, 12241, 12251, 12253, 12263, 12269, 12277, 12281, 12289, - 12301, 12323, 12329, 12343, 12347, 12373, 12377, 12379, 12391, 12401, - 12409, 12413, 12421, 12433, 12437, 12451, 12457, 12473, 12479, 12487, - 12491, 12497, 12503, 12511, 12517, 12527, 12539, 12541, 12547, 12553, - 12569, 12577, 12583, 12589, 12601, 12611, 12613, 12619, 12637, 12641, - 12647, 12653, 12659, 12671, 12689, 12697, 12703, 12713, 12721, 12739, - 12743, 12757, 12763, 12781, 12791, 12799, 12809, 12821, 12823, 12829, - 12841, 12853, 12889, 12893, 12899, 12907, 12911, 12917, 12919, 12923, - 12941, 12953, 12959, 12967, 12973, 12979, 12983, 13001, 13003, 13007, - 13009, 13033, 13037, 13043, 13049, 13063, 13093, 13099, 13103, 13109, - 13121, 13127, 13147, 13151, 13159, 13163, 13171, 13177, 13183, 13187, - 13217, 13219, 13229, 13241, 13249, 13259, 13267, 13291, 13297, 13309, - 13313, 13327, 13331, 13337, 13339, 13367, 13381, 13397, 13399, 13411, - 13417, 13421, 13441, 13451, 13457, 13463, 13469, 13477, 13487, 13499, - 13513, 13523, 13537, 13553, 13567, 13577, 13591, 13597, 13613, 13619, - 13627, 13633, 13649, 13669, 13679, 13681, 13687, 13691, 13693, 13697, - 13709, 13711, 13721, 13723, 13729, 13751, 13757, 13759, 13763, 13781, - 13789, 13799, 13807, 13829, 13831, 13841, 13859, 13873, 13877, 13879, - 13883, 13901, 13903, 13907, 13913, 13921, 13931, 13933, 13963, 13967, - 13997, 13999, 14009, 14011, 14029, 14033, 14051, 14057, 14071, 14081, - 14083, 14087, 14107, 14143, 14149, 14153, 14159, 14173, 14177, 14197, - 14207, 14221, 14243, 14249, 14251, 14281, 14293, 14303, 14321, 14323, - 14327, 14341, 14347, 14369, 14387, 14389, 14401, 14407, 14411, 14419, - 14423, 14431, 14437, 14447, 14449, 14461, 14479, 14489, 14503, 14519, - 14533, 14537, 14543, 14549, 14551, 14557, 14561, 14563, 14591, 14593, - 14621, 14627, 14629, 14633, 14639, 14653, 14657, 14669, 14683, 14699, - 14713, 14717, 14723, 14731, 14737, 14741, 14747, 14753, 14759, 14767, - 14771, 14779, 14783, 14797, 14813, 14821, 14827, 14831, 14843, 14851, - 14867, 14869, 14879, 14887, 14891, 14897, 14923, 14929, 14939, 14947, - 14951, 14957, 14969, 14983, 15013, 15017, 15031, 15053, 15061, 15073, - 15077, 15083, 15091, 15101, 15107, 15121, 15131, 15137, 15139, 15149, - 15161, 15173, 15187, 15193, 15199, 15217, 15227, 15233, 15241, 15259, - 15263, 15269, 15271, 15277, 15287, 15289, 15299, 15307, 15313, 15319, - 15329, 15331, 15349, 15359, 15361, 15373, 15377, 15383, 15391, 15401, - 15413, 15427, 15439, 15443, 15451, 15461, 15467, 15473, 15493, 15497, - 15511, 15527, 15541, 15551, 15559, 15569, 15581, 15583, 15601, 15607, - 15619, 15629, 15641, 15643, 15647, 15649, 15661, 15667, 15671, 15679, - 15683, 15727, 15731, 15733, 15737, 15739, 15749, 15761, 15767, 15773, - 15787, 15791, 15797, 15803, 15809, 15817, 15823, 15859, 15877, 15881, - 15887, 15889, 15901, 15907, 15913, 15919, 15923, 15937, 15959, 15971, - 15973, 15991, 16001, 16007, 16033, 16057, 16061, 16063, 16067, 16069, - 16073, 16087, 16091, 16097, 16103, 16111, 16127, 16139, 16141, 16183, - 16187, 16189, 16193, 16217, 16223, 16229, 16231, 16249, 16253, 16267, - 16273, 16301, 16319, 16333, 16339, 16349, 16361, 16363, 16369, 16381, - 16411, 16417, 16421, 16427, 16433, 16447, 16451, 16453, 16477, 16481, - 16487, 16493, 16519, 16529, 16547, 16553, 16561, 16567, 16573, 16603, - 16607, 16619, 16631, 16633, 16649, 16651, 16657, 16661, 16673, 16691, - 16693, 16699, 16703, 16729, 16741, 16747, 16759, 16763, 16787, 16811, - 16823, 16829, 16831, 16843, 16871, 16879, 16883, 16889, 16901, 16903, - 16921, 16927, 16931, 16937, 16943, 16963, 16979, 16981, 16987, 16993, - 17011, 17021, 17027, 17029, 17033, 17041, 17047, 17053, 17077, 17093, - 17099, 17107, 17117, 17123, 17137, 17159, 17167, 17183, 17189, 17191, - 17203, 17207, 17209, 17231, 17239, 17257, 17291, 17293, 17299, 17317, - 17321, 17327, 17333, 17341, 17351, 17359, 17377, 17383, 17387, 17389, - 17393, 17401, 17417, 17419, 17431, 17443, 17449, 17467, 17471, 17477, - 17483, 17489, 17491, 17497, 17509, 17519, 17539, 17551, 17569, 17573, - 17579, 17581, 17597, 17599, 17609, 17623, 17627, 17657, 17659, 17669, - 17681, 17683, 17707, 17713, 17729, 17737, 17747, 17749, 17761, 17783, - 17789, 17791, 17807, 17827, 17837, 17839, 17851, 17863, 17881, 17891, - 17903, 17909, 17911, 17921, 17923, 17929, 17939, 17957, 17959, 17971, - 17977, 17981, 17987, 17989, 18013, 18041, 18043, 18047, 18049, 18059, - 18061, 18077, 18089, 18097, 18119, 18121, 18127, 18131, 18133, 18143, - 18149, 18169, 18181, 18191, 18199, 18211, 18217, 18223, 18229, 18233, - 18251, 18253, 18257, 18269, 18287, 18289, 18301, 18307, 18311, 18313, - 18329, 18341, 18353, 18367, 18371, 18379, 18397, 18401, 18413, 18427, - 18433, 18439, 18443, 18451, 18457, 18461, 18481, 18493, 18503, 18517, - 18521, 18523, 18539, 18541, 18553, 18583, 18587, 18593, 18617, 18637, - 18661, 18671, 18679, 18691, 18701, 18713, 18719, 18731, 18743, 18749, - 18757, 18773, 18787, 18793, 18797, 18803, 18839, 18859, 18869, 18899, - 18911, 18913, 18917, 18919, 18947, 18959, 18973, 18979, 19001, 19009, - 19013, 19031, 19037, 19051, 19069, 19073, 19079, 19081, 19087, 19121, - 19139, 19141, 19157, 19163, 19181, 19183, 19207, 19211, 19213, 19219, - 19231, 19237, 19249, 19259, 19267, 19273, 19289, 19301, 19309, 19319, - 19333, 19373, 19379, 19381, 19387, 19391, 19403, 19417, 19421, 19423, - 19427, 19429, 19433, 19441, 19447, 19457, 19463, 19469, 19471, 19477, - 19483, 19489, 19501, 19507, 19531, 19541, 19543, 19553, 19559, 19571, - 19577, 19583, 19597, 19603, 19609, 19661, 19681, 19687, 19697, 19699, - 19709, 19717, 19727, 19739, 19751, 19753, 19759, 19763, 19777, 19793, - 19801, 19813, 19819, 19841, 19843, 19853, 19861, 19867, 19889, 19891, - 19913, 19919, 19927, 19937, 19949, 19961, 19963, 19973, 19979, 19991, - 19993, 19997, 20011, 20021, 20023, 20029, 20047, 20051, 20063, 20071, - 20089, 20101, 20107, 20113, 20117, 20123, 20129, 20143, 20147, 20149, - 20161, 20173, 20177, 20183, 20201, 20219, 20231, 20233, 20249, 20261, - 20269, 20287, 20297, 20323, 20327, 20333, 20341, 20347, 20353, 20357, - 20359, 20369, 20389, 20393, 20399, 20407, 20411, 20431, 20441, 20443, - 20477, 20479, 20483, 20507, 20509, 20521, 20533, 20543, 20549, 20551, - 20563, 20593, 20599, 20611, 20627, 20639, 20641, 20663, 20681, 20693, - 20707, 20717, 20719, 20731, 20743, 20747, 20749, 20753, 20759, 20771, - 20773, 20789, 20807, 20809, 20849, 20857, 20873, 20879, 20887, 20897, - 20899, 20903, 20921, 20929, 20939, 20947, 20959, 20963, 20981, 20983, - 21001, 21011, 21013, 21017, 21019, 21023, 21031, 21059, 21061, 21067, - 21089, 21101, 21107, 21121, 21139, 21143, 21149, 21157, 21163, 21169, - 21179, 21187, 21191, 21193, 21211, 21221, 21227, 21247, 21269, 21277, - 21283, 21313, 21317, 21319, 21323, 21341, 21347, 21377, 21379, 21383, - 21391, 21397, 21401, 21407, 21419, 21433, 21467, 21481, 21487, 21491, - 21493, 21499, 21503, 21517, 21521, 21523, 21529, 21557, 21559, 21563, - 21569, 21577, 21587, 21589, 21599, 21601, 21611, 21613, 21617, 21647, - 21649, 21661, 21673, 21683, 21701, 21713, 21727, 21737, 21739, 21751, - 21757, 21767, 21773, 21787, 21799, 21803, 21817, 21821, 21839, 21841, - 21851, 21859, 21863, 21871, 21881, 21893, 21911, 21929, 21937, 21943, - 21961, 21977, 21991, 21997, 22003, 22013, 22027, 22031, 22037, 22039, - 22051, 22063, 22067, 22073, 22079, 22091, 22093, 22109, 22111, 22123, - 22129, 22133, 22147, 22153, 22157, 22159, 22171, 22189, 22193, 22229, - 22247, 22259, 22271, 22273, 22277, 22279, 22283, 22291, 22303, 22307, - 22343, 22349, 22367, 22369, 22381, 22391, 22397, 22409, 22433, 22441, - 22447, 22453, 22469, 22481, 22483, 22501, 22511, 22531, 22541, 22543, - 22549, 22567, 22571, 22573, 22613, 22619, 22621, 22637, 22639, 22643, - 22651, 22669, 22679, 22691, 22697, 22699, 22709, 22717, 22721, 22727, - 22739, 22741, 22751, 22769, 22777, 22783, 22787, 22807, 22811, 22817, - 22853, 22859, 22861, 22871, 22877, 22901, 22907, 22921, 22937, 22943, - 22961, 22963, 22973, 22993, 23003, 23011, 23017, 23021, 23027, 23029, - 23039, 23041, 23053, 23057, 23059, 23063, 23071, 23081, 23087, 23099, - 23117, 23131, 23143, 23159, 23167, 23173, 23189, 23197, 23201, 23203, - 23209, 23227, 23251, 23269, 23279, 23291, 23293, 23297, 23311, 23321, - 23327, 23333, 23339, 23357, 23369, 23371, 23399, 23417, 23431, 23447, - 23459, 23473, 23497, 23509, 23531, 23537, 23539, 23549, 23557, 23561, - 23563, 23567, 23581, 23593, 23599, 23603, 23609, 23623, 23627, 23629, - 23633, 23663, 23669, 23671, 23677, 23687, 23689, 23719, 23741, 23743, - 23747, 23753, 23761, 23767, 23773, 23789, 23801, 23813, 23819, 23827, - 23831, 23833, 23857, 23869, 23873, 23879, 23887, 23893, 23899, 23909, - 23911, 23917, 23929, 23957, 23971, 23977, 23981, 23993, 24001, 24007, - 24019, 24023, 24029, 24043, 24049, 24061, 24071, 24077, 24083, 24091, - 24097, 24103, 24107, 24109, 24113, 24121, 24133, 24137, 24151, 24169, - 24179, 24181, 24197, 24203, 24223, 24229, 24239, 24247, 24251, 24281, - 24317, 24329, 24337, 24359, 24371, 24373, 24379, 24391, 24407, 24413, - 24419, 24421, 24439, 24443, 24469, 24473, 24481, 24499, 24509, 24517, - 24527, 24533, 24547, 24551, 24571, 24593, 24611, 24623, 24631, 24659, - 24671, 24677, 24683, 24691, 24697, 24709, 24733, 24749, 24763, 24767, - 24781, 24793, 24799, 24809, 24821, 24841, 24847, 24851, 24859, 24877, - 24889, 24907, 24917, 24919, 24923, 24943, 24953, 24967, 24971, 24977, - 24979, 24989, 25013, 25031, 25033, 25037, 25057, 25073, 25087, 25097, - 25111, 25117, 25121, 25127, 25147, 25153, 25163, 25169, 25171, 25183, - 25189, 25219, 25229, 25237, 25243, 25247, 25253, 25261, 25301, 25303, - 25307, 25309, 25321, 25339, 25343, 25349, 25357, 25367, 25373, 25391, - 25409, 25411, 25423, 25439, 25447, 25453, 25457, 25463, 25469, 25471, - 25523, 25537, 25541, 25561, 25577, 25579, 25583, 25589, 25601, 25603, - 25609, 25621, 25633, 25639, 25643, 25657, 25667, 25673, 25679, 25693, - 25703, 25717, 25733, 25741, 25747, 25759, 25763, 25771, 25793, 25799, - 25801, 25819, 25841, 25847, 25849, 25867, 25873, 25889, 25903, 25913, - 25919, 25931, 25933, 25939, 25943, 25951, 25969, 25981, 25997, 25999, - 26003, 26017, 26021, 26029, 26041, 26053, 26083, 26099, 26107, 26111, - 26113, 26119, 26141, 26153, 26161, 26171, 26177, 26183, 26189, 26203, - 26209, 26227, 26237, 26249, 26251, 26261, 26263, 26267, 26293, 26297, - 26309, 26317, 26321, 26339, 26347, 26357, 26371, 26387, 26393, 26399, - 26407, 26417, 26423, 26431, 26437, 26449, 26459, 26479, 26489, 26497, - 26501, 26513, 26539, 26557, 26561, 26573, 26591, 26597, 26627, 26633, - 26641, 26647, 26669, 26681, 26683, 26687, 26693, 26699, 26701, 26711, - 26713, 26717, 26723, 26729, 26731, 26737, 26759, 26777, 26783, 26801, - 26813, 26821, 26833, 26839, 26849, 26861, 26863, 26879, 26881, 26891, - 26893, 26903, 26921, 26927, 26947, 26951, 26953, 26959, 26981, 26987, - 26993, 27011, 27017, 27031, 27043, 27059, 27061, 27067, 27073, 27077, - 27091, 27103, 27107, 27109, 27127, 27143, 27179, 27191, 27197, 27211, - 27239, 27241, 27253, 27259, 27271, 27277, 27281, 27283, 27299, 27329, - 27337, 27361, 27367, 27397, 27407, 27409, 27427, 27431, 27437, 27449, - 27457, 27479, 27481, 27487, 27509, 27527, 27529, 27539, 27541, 27551, - 27581, 27583, 27611, 27617, 27631, 27647, 27653, 27673, 27689, 27691, - 27697, 27701, 27733, 27737, 27739, 27743, 27749, 27751, 27763, 27767, - 27773, 27779, 27791, 27793, 27799, 27803, 27809, 27817, 27823, 27827, - 27847, 27851, 27883, 27893, 27901, 27917, 27919, 27941, 27943, 27947, - 27953, 27961, 27967, 27983, 27997, 28001, 28019, 28027, 28031, 28051, - 28057, 28069, 28081, 28087, 28097, 28099, 28109, 28111, 28123, 28151, - 28163, 28181, 28183, 28201, 28211, 28219, 28229, 28277, 28279, 28283, - 28289, 28297, 28307, 28309, 28319, 28349, 28351, 28387, 28393, 28403, - 28409, 28411, 28429, 28433, 28439, 28447, 28463, 28477, 28493, 28499, - 28513, 28517, 28537, 28541, 28547, 28549, 28559, 28571, 28573, 28579, - 28591, 28597, 28603, 28607, 28619, 28621, 28627, 28631, 28643, 28649, - 28657, 28661, 28663, 28669, 28687, 28697, 28703, 28711, 28723, 28729, - 28751, 28753, 28759, 28771, 28789, 28793, 28807, 28813, 28817, 28837, - 28843, 28859, 28867, 28871, 28879, 28901, 28909, 28921, 28927, 28933, - 28949, 28961, 28979, 29009, 29017, 29021, 29023, 29027, 29033, 29059, - 29063, 29077, 29101, 29123, 29129, 29131, 29137, 29147, 29153, 29167, - 29173, 29179, 29191, 29201, 29207, 29209, 29221, 29231, 29243, 29251, - 29269, 29287, 29297, 29303, 29311, 29327, 29333, 29339, 29347, 29363, - 29383, 29387, 29389, 29399, 29401, 29411, 29423, 29429, 29437, 29443, - 29453, 29473, 29483, 29501, 29527, 29531, 29537, 29567, 29569, 29573, - 29581, 29587, 29599, 29611, 29629, 29633, 29641, 29663, 29669, 29671, - 29683, 29717, 29723, 29741, 29753, 29759, 29761, 29789, 29803, 29819, - 29833, 29837, 29851, 29863, 29867, 29873, 29879, 29881, 29917, 29921, - 29927, 29947, 29959, 29983, 29989, 30011, 30013, 30029, 30047, 30059, - 30071, 30089, 30091, 30097, 30103, 30109, 30113, 30119, 30133, 30137, - 30139, 30161, 30169, 30181, 30187, 30197, 30203, 30211, 30223, 30241, - 30253, 30259, 30269, 30271, 30293, 30307, 30313, 30319, 30323, 30341, - 30347, 30367, 30389, 30391, 30403, 30427, 30431, 30449, 30467, 30469, - 30491, 30493, 30497, 30509, 30517, 30529, 30539, 30553, 30557, 30559, - 30577, 30593, 30631, 30637, 30643, 30649, 30661, 30671, 30677, 30689, - 30697, 30703, 30707, 30713, 30727, 30757, 30763, 30773, 30781, 30803, - 30809, 30817, 30829, 30839, 30841, 30851, 30853, 30859, 30869, 30871, - 30881, 30893, 30911, 30931, 30937, 30941, 30949, 30971, 30977, 30983, - 31013, 31019, 31033, 31039, 31051, 31063, 31069, 31079, 31081, 31091, - 31121, 31123, 31139, 31147, 31151, 31153, 31159, 31177, 31181, 31183, - 31189, 31193, 31219, 31223, 31231, 31237, 31247, 31249, 31253, 31259, - 31267, 31271, 31277, 31307, 31319, 31321, 31327, 31333, 31337, 31357, - 31379, 31387, 31391, 31393, 31397, 31469, 31477, 31481, 31489, 31511, - 31513, 31517, 31531, 31541, 31543, 31547, 31567, 31573, 31583, 31601, - 31607, 31627, 31643, 31649, 31657, 31663, 31667, 31687, 31699, 31721, - 31723, 31727, 31729, 31741, 31751, 31769, 31771, 31793, 31799, 31817, - 31847, 31849, 31859, 31873, 31883, 31891, 31907, 31957, 31963, 31973, - 31981, 31991, 32003, 32009, 32027, 32029, 32051, 32057, 32059, 32063, - 32069, 32077, 32083, 32089, 32099, 32117, 32119, 32141, 32143, 32159, - 32173, 32183, 32189, 32191, 32203, 32213, 32233, 32237, 32251, 32257, - 32261, 32297, 32299, 32303, 32309, 32321, 32323, 32327, 32341, 32353, - 32359, 32363, 32369, 32371, 32377, 32381, 32401, 32411, 32413, 32423, - 32429, 32441, 32443, 32467, 32479, 32491, 32497, 32503, 32507, 32531, - 32533, 32537, 32561, 32563, 32569, 32573, 32579, 32587, 32603, 32609, - 32611, 32621, 32633, 32647, 32653, 32687, 32693, 32707, 32713, 32717, - 32719, 32749, 32771, 32779, 32783, 32789, 32797, 32801, 32803, 32831, - 32833, 32839, 32843, 32869, 32887, 32909, 32911, 32917, 32933, 32939, - 32941, 32957, 32969, 32971, 32983, 32987, 32993, 32999, 33013, 33023, - 33029, 33037, 33049, 33053, 33071, 33073, 33083, 33091, 33107, 33113, - 33119, 33149, 33151, 33161, 33179, 33181, 33191, 33199, 33203, 33211, - 33223, 33247, 33287, 33289, 33301, 33311, 33317, 33329, 33331, 33343, - 33347, 33349, 33353, 33359, 33377, 33391, 33403, 33409, 33413, 33427, - 33457, 33461, 33469, 33479, 33487, 33493, 33503, 33521, 33529, 33533, - 33547, 33563, 33569, 33577, 33581, 33587, 33589, 33599, 33601, 33613, - 33617, 33619, 33623, 33629, 33637, 33641, 33647, 33679, 33703, 33713, - 33721, 33739, 33749, 33751, 33757, 33767, 33769, 33773, 33791, 33797, - 33809, 33811, 33827, 33829, 33851, 33857, 33863, 33871, 33889, 33893, - 33911, 33923, 33931, 33937, 33941, 33961, 33967, 33997, 34019, 34031, - 34033, 34039, 34057, 34061, 34123, 34127, 34129, 34141, 34147, 34157, - 34159, 34171, 34183, 34211, 34213, 34217, 34231, 34253, 34259, 34261, - 34267, 34273, 34283, 34297, 34301, 34303, 34313, 34319, 34327, 34337, - 34351, 34361, 34367, 34369, 34381, 34403, 34421, 34429, 34439, 34457, - 34469, 34471, 34483, 34487, 34499, 34501, 34511, 34513, 34519, 34537, - 34543, 34549, 34583, 34589, 34591, 34603, 34607, 34613, 34631, 34649, - 34651, 34667, 34673, 34679, 34687, 34693, 34703, 34721, 34729, 34739, - 34747, 34757, 34759, 34763, 34781, 34807, 34819, 34841, 34843, 34847, - 34849, 34871, 34877, 34883, 34897, 34913, 34919, 34939, 34949, 34961, - 34963, 34981, 35023, 35027, 35051, 35053, 35059, 35069, 35081, 35083, - 35089, 35099, 35107, 35111, 35117, 35129, 35141, 35149, 35153, 35159, - 35171, 35201, 35221, 35227, 35251, 35257, 35267, 35279, 35281, 35291, - 35311, 35317, 35323, 35327, 35339, 35353, 35363, 35381, 35393, 35401, - 35407, 35419, 35423, 35437, 35447, 35449, 35461, 35491, 35507, 35509, - 35521, 35527, 35531, 35533, 35537, 35543, 35569, 35573, 35591, 35593, - 35597, 35603, 35617, 35671, 35677, 35729, 35731, 35747, 35753, 35759, - 35771, 35797, 35801, 35803, 35809, 35831, 35837, 35839, 35851, 35863, - 35869, 35879, 35897, 35899, 35911, 35923, 35933, 35951, 35963, 35969, - 35977, 35983, 35993, 35999, 36007, 36011, 36013, 36017, 36037, 36061, - 36067, 36073, 36083, 36097, 36107, 36109, 36131, 36137, 36151, 36161, - 36187, 36191, 36209, 36217, 36229, 36241, 36251, 36263, 36269, 36277, - 36293, 36299, 36307, 36313, 36319, 36341, 36343, 36353, 36373, 36383, - 36389, 36433, 36451, 36457, 36467, 36469, 36473, 36479, 36493, 36497, - 36523, 36527, 36529, 36541, 36551, 36559, 36563, 36571, 36583, 36587, - 36599, 36607, 36629, 36637, 36643, 36653, 36671, 36677, 36683, 36691, - 36697, 36709, 36713, 36721, 36739, 36749, 36761, 36767, 36779, 36781, - 36787, 36791, 36793, 36809, 36821, 36833, 36847, 36857, 36871, 36877, - 36887, 36899, 36901, 36913, 36919, 36923, 36929, 36931, 36943, 36947, - 36973, 36979, 36997, 37003, 37013, 37019, 37021, 37039, 37049, 37057, - 37061, 37087, 37097, 37117, 37123, 37139, 37159, 37171, 37181, 37189, - 37199, 37201, 37217, 37223, 37243, 37253, 37273, 37277, 37307, 37309, - 37313, 37321, 37337, 37339, 37357, 37361, 37363, 37369, 37379, 37397, - 37409, 37423, 37441, 37447, 37463, 37483, 37489, 37493, 37501, 37507, - 37511, 37517, 37529, 37537, 37547, 37549, 37561, 37567, 37571, 37573, - 37579, 37589, 37591, 37607, 37619, 37633, 37643, 37649, 37657, 37663, - 37691, 37693, 37699, 37717, 37747, 37781, 37783, 37799, 37811, 37813, - 37831, 37847, 37853, 37861, 37871, 37879, 37889, 37897, 37907, 37951, - 37957, 37963, 37967, 37987, 37991, 37993, 37997, 38011, 38039, 38047, - 38053, 38069, 38083, 38113, 38119, 38149, 38153, 38167, 38177, 38183, - 38189, 38197, 38201, 38219, 38231, 38237, 38239, 38261, 38273, 38281, - 38287, 38299, 38303, 38317, 38321, 38327, 38329, 38333, 38351, 38371, - 38377, 38393, 38431, 38447, 38449, 38453, 38459, 38461, 38501, 38543, - 38557, 38561, 38567, 38569, 38593, 38603, 38609, 38611, 38629, 38639, - 38651, 38653, 38669, 38671, 38677, 38693, 38699, 38707, 38711, 38713, - 38723, 38729, 38737, 38747, 38749, 38767, 38783, 38791, 38803, 38821, - 38833, 38839, 38851, 38861, 38867, 38873, 38891, 38903, 38917, 38921, - 38923, 38933, 38953, 38959, 38971, 38977, 38993, 39019, 39023, 39041, - 39043, 39047, 39079, 39089, 39097, 39103, 39107, 39113, 39119, 39133, - 39139, 39157, 39161, 39163, 39181, 39191, 39199, 39209, 39217, 39227, - 39229, 39233, 39239, 39241, 39251, 39293, 39301, 39313, 39317, 39323, - 39341, 39343, 39359, 39367, 39371, 39373, 39383, 39397, 39409, 39419, - 39439, 39443, 39451, 39461, 39499, 39503, 39509, 39511, 39521, 39541, - 39551, 39563, 39569, 39581, 39607, 39619, 39623, 39631, 39659, 39667, - 39671, 39679, 39703, 39709, 39719, 39727, 39733, 39749, 39761, 39769, - 39779, 39791, 39799, 39821, 39827, 39829, 39839, 39841, 39847, 39857, - 39863, 39869, 39877, 39883, 39887, 39901, 39929, 39937, 39953, 39971, - 39979, 39983, 39989, 40009, 40013, 40031, 40037, 40039, 40063, 40087, - 40093, 40099, 40111, 40123, 40127, 40129, 40151, 40153, 40163, 40169, - 40177, 40189, 40193, 40213, 40231, 40237, 40241, 40253, 40277, 40283, - 40289, 40343, 40351, 40357, 40361, 40387, 40423, 40427, 40429, 40433, - 40459, 40471, 40483, 40487, 40493, 40499, 40507, 40519, 40529, 40531, - 40543, 40559, 40577, 40583, 40591, 40597, 40609, 40627, 40637, 40639, - 40693, 40697, 40699, 40709, 40739, 40751, 40759, 40763, 40771, 40787, - 40801, 40813, 40819, 40823, 40829, 40841, 40847, 40849, 40853, 40867, - 40879, 40883, 40897, 40903, 40927, 40933, 40939, 40949, 40961, 40973, - 40993, 41011, 41017, 41023, 41039, 41047, 41051, 41057, 41077, 41081, - 41113, 41117, 41131, 41141, 41143, 41149, 41161, 41177, 41179, 41183, - 41189, 41201, 41203, 41213, 41221, 41227, 41231, 41233, 41243, 41257, - 41263, 41269, 41281, 41299, 41333, 41341, 41351, 41357, 41381, 41387, - 41389, 41399, 41411, 41413, 41443, 41453, 41467, 41479, 41491, 41507, - 41513, 41519, 41521, 41539, 41543, 41549, 41579, 41593, 41597, 41603, - 41609, 41611, 41617, 41621, 41627, 41641, 41647, 41651, 41659, 41669, - 41681, 41687, 41719, 41729, 41737, 41759, 41761, 41771, 41777, 41801, - 41809, 41813, 41843, 41849, 41851, 41863, 41879, 41887, 41893, 41897, - 41903, 41911, 41927, 41941, 41947, 41953, 41957, 41959, 41969, 41981, - 41983, 41999, 42013, 42017, 42019, 42023, 42043, 42061, 42071, 42073, - 42083, 42089, 42101, 42131, 42139, 42157, 42169, 42179, 42181, 42187, - 42193, 42197, 42209, 42221, 42223, 42227, 42239, 42257, 42281, 42283, - 42293, 42299, 42307, 42323, 42331, 42337, 42349, 42359, 42373, 42379, - 42391, 42397, 42403, 42407, 42409, 42433, 42437, 42443, 42451, 42457, - 42461, 42463, 42467, 42473, 42487, 42491, 42499, 42509, 42533, 42557, - 42569, 42571, 42577, 42589, 42611, 42641, 42643, 42649, 42667, 42677, - 42683, 42689, 42697, 42701, 42703, 42709, 42719, 42727, 42737, 42743, - 42751, 42767, 42773, 42787, 42793, 42797, 42821, 42829, 42839, 42841, - 42853, 42859, 42863, 42899, 42901, 42923, 42929, 42937, 42943, 42953, - 42961, 42967, 42979, 42989, 43003, 43013, 43019, 43037, 43049, 43051, - 43063, 43067, 43093, 43103, 43117, 43133, 43151, 43159, 43177, 43189, - 43201, 43207, 43223, 43237, 43261, 43271, 43283, 43291, 43313, 43319, - 43321, 43331, 43391, 43397, 43399, 43403, 43411, 43427, 43441, 43451, - 43457, 43481, 43487, 43499, 43517, 43541, 43543, 43573, 43577, 43579, - 43591, 43597, 43607, 43609, 43613, 43627, 43633, 43649, 43651, 43661, - 43669, 43691, 43711, 43717, 43721, 43753, 43759, 43777, 43781, 43783, - 43787, 43789, 43793, 43801, 43853, 43867, 43889, 43891, 43913, 43933, - 43943, 43951, 43961, 43963, 43969, 43973, 43987, 43991, 43997, 44017, - 44021, 44027, 44029, 44041, 44053, 44059, 44071, 44087, 44089, 44101, - 44111, 44119, 44123, 44129, 44131, 44159, 44171, 44179, 44189, 44201, - 44203, 44207, 44221, 44249, 44257, 44263, 44267, 44269, 44273, 44279, - 44281, 44293, 44351, 44357, 44371, 44381, 44383, 44389, 44417, 44449, - 44453, 44483, 44491, 44497, 44501, 44507, 44519, 44531, 44533, 44537, - 44543, 44549, 44563, 44579, 44587, 44617, 44621, 44623, 44633, 44641, - 44647, 44651, 44657, 44683, 44687, 44699, 44701, 44711, 44729, 44741, - 44753, 44771, 44773, 44777, 44789, 44797, 44809, 44819, 44839, 44843, - 44851, 44867, 44879, 44887, 44893, 44909, 44917, 44927, 44939, 44953, - 44959, 44963, 44971, 44983, 44987, 45007, 45013, 45053, 45061, 45077, - 45083, 45119, 45121, 45127, 45131, 45137, 45139, 45161, 45179, 45181, - 45191, 45197, 45233, 45247, 45259, 45263, 45281, 45289, 45293, 45307, - 45317, 45319, 45329, 45337, 45341, 45343, 45361, 45377, 45389, 45403, - 45413, 45427, 45433, 45439, 45481, 45491, 45497, 45503, 45523, 45533, - 45541, 45553, 45557, 45569, 45587, 45589, 45599, 45613, 45631, 45641, - 45659, 45667, 45673, 45677, 45691, 45697, 45707, 45737, 45751, 45757, - 45763, 45767, 45779, 45817, 45821, 45823, 45827, 45833, 45841, 45853, - 45863, 45869, 45887, 45893, 45943, 45949, 45953, 45959, 45971, 45979, - 45989, 46021, 46027, 46049, 46051, 46061, 46073, 46091, 46093, 46099, - 46103, 46133, 46141, 46147, 46153, 46171, 46181, 46183, 46187, 46199, - 46219, 46229, 46237, 46261, 46271, 46273, 46279, 46301, 46307, 46309, - 46327, 46337, 46349, 46351, 46381, 46399, 46411, 46439, 46441, 46447, - 46451, 46457, 46471, 46477, 46489, 46499, 46507, 46511, 46523, 46549, - 46559, 46567, 46573, 46589, 46591, 46601, 46619, 46633, 46639, 46643, - 46649, 46663, 46679, 46681, 46687, 46691, 46703, 46723, 46727, 46747, - 46751, 46757, 46769, 46771, 46807, 46811, 46817, 46819, 46829, 46831, - 46853, 46861, 46867, 46877, 46889, 46901, 46919, 46933, 46957, 46993, - 46997, 47017, 47041, 47051, 47057, 47059, 47087, 47093, 47111, 47119, - 47123, 47129, 47137, 47143, 47147, 47149, 47161, 47189, 47207, 47221, - 47237, 47251, 47269, 47279, 47287, 47293, 47297, 47303, 47309, 47317, - 47339, 47351, 47353, 47363, 47381, 47387, 47389, 47407, 47417, 47419, - 47431, 47441, 47459, 47491, 47497, 47501, 47507, 47513, 47521, 47527, - 47533, 47543, 47563, 47569, 47581, 47591, 47599, 47609, 47623, 47629, - 47639, 47653, 47657, 47659, 47681, 47699, 47701, 47711, 47713, 47717, - 47737, 47741, 47743, 47777, 47779, 47791, 47797, 47807, 47809, 47819, - 47837, 47843, 47857, 47869, 47881, 47903, 47911, 47917, 47933, 47939, - 47947, 47951, 47963, 47969, 47977, 47981, 48017, 48023, 48029, 48049, - 48073, 48079, 48091, 48109, 48119, 48121, 48131, 48157, 48163, 48179, - 48187, 48193, 48197, 48221, 48239, 48247, 48259, 48271, 48281, 48299, - 48311, 48313, 48337, 48341, 48353, 48371, 48383, 48397, 48407, 48409, - 48413, 48437, 48449, 48463, 48473, 48479, 48481, 48487, 48491, 48497, - 48523, 48527, 48533, 48539, 48541, 48563, 48571, 48589, 48593, 48611, - 48619, 48623, 48647, 48649, 48661, 48673, 48677, 48679, 48731, 48733, - 48751, 48757, 48761, 48767, 48779, 48781, 48787, 48799, 48809, 48817, - 48821, 48823, 48847, 48857, 48859, 48869, 48871, 48883, 48889, 48907, - 48947, 48953, 48973, 48989, 48991, 49003, 49009, 49019, 49031, 49033, - 49037, 49043, 49057, 49069, 49081, 49103, 49109, 49117, 49121, 49123, - 49139, 49157, 49169, 49171, 49177, 49193, 49199, 49201, 49207, 49211, - 49223, 49253, 49261, 49277, 49279, 49297, 49307, 49331, 49333, 49339, - 49363, 49367, 49369, 49391, 49393, 49409, 49411, 49417, 49429, 49433, - 49451, 49459, 49463, 49477, 49481, 49499, 49523, 49529, 49531, 49537, - 49547, 49549, 49559, 49597, 49603, 49613, 49627, 49633, 49639, 49663, - 49667, 49669, 49681, 49697, 49711, 49727, 49739, 49741, 49747, 49757, - 49783, 49787, 49789, 49801, 49807, 49811, 49823, 49831, 49843, 49853, - 49871, 49877, 49891, 49919, 49921, 49927, 49937, 49939, 49943, 49957, - 49991, 49993, 49999, 50021, 50023, 50033, 50047, 50051, 50053, 50069, - 50077, 50087, 50093, 50101, 50111, 50119, 50123, 50129, 50131, 50147, - 50153, 50159, 50177, 50207, 50221, 50227, 50231, 50261, 50263, 50273, - 50287, 50291, 50311, 50321, 50329, 50333, 50341, 50359, 50363, 50377, - 50383, 50387, 50411, 50417, 50423, 50441, 50459, 50461, 50497, 50503, - 50513, 50527, 50539, 50543, 50549, 50551, 50581, 50587, 50591, 50593, - 50599, 50627, 50647, 50651, 50671, 50683, 50707, 50723, 50741, 50753, - 50767, 50773, 50777, 50789, 50821, 50833, 50839, 50849, 50857, 50867, - 50873, 50891, 50893, 50909, 50923, 50929, 50951, 50957, 50969, 50971, - 50989, 50993, 51001, 51031, 51043, 51047, 51059, 51061, 51071, 51109, - 51131, 51133, 51137, 51151, 51157, 51169, 51193, 51197, 51199, 51203, - 51217, 51229, 51239, 51241, 51257, 51263, 51283, 51287, 51307, 51329, - 51341, 51343, 51347, 51349, 51361, 51383, 51407, 51413, 51419, 51421, - 51427, 51431, 51437, 51439, 51449, 51461, 51473, 51479, 51481, 51487, - 51503, 51511, 51517, 51521, 51539, 51551, 51563, 51577, 51581, 51593, - 51599, 51607, 51613, 51631, 51637, 51647, 51659, 51673, 51679, 51683, - 51691, 51713, 51719, 51721, 51749, 51767, 51769, 51787, 51797, 51803, - 51817, 51827, 51829, 51839, 51853, 51859, 51869, 51871, 51893, 51899, - 51907, 51913, 51929, 51941, 51949, 51971, 51973, 51977, 51991, 52009, - 52021, 52027, 52051, 52057, 52067, 52069, 52081, 52103, 52121, 52127, - 52147, 52153, 52163, 52177, 52181, 52183, 52189, 52201, 52223, 52237, - 52249, 52253, 52259, 52267, 52289, 52291, 52301, 52313, 52321, 52361, - 52363, 52369, 52379, 52387, 52391, 52433, 52453, 52457, 52489, 52501, - 52511, 52517, 52529, 52541, 52543, 52553, 52561, 52567, 52571, 52579, - 52583, 52609, 52627, 52631, 52639, 52667, 52673, 52691, 52697, 52709, - 52711, 52721, 52727, 52733, 52747, 52757, 52769, 52783, 52807, 52813, - 52817, 52837, 52859, 52861, 52879, 52883, 52889, 52901, 52903, 52919, - 52937, 52951, 52957, 52963, 52967, 52973, 52981, 52999, 53003, 53017, - 53047, 53051, 53069, 53077, 53087, 53089, 53093, 53101, 53113, 53117, - 53129, 53147, 53149, 53161, 53171, 53173, 53189, 53197, 53201, 53231, - 53233, 53239, 53267, 53269, 53279, 53281, 53299, 53309, 53323, 53327, - 53353, 53359, 53377, 53381, 53401, 53407, 53411, 53419, 53437, 53441, - 53453, 53479, 53503, 53507, 53527, 53549, 53551, 53569, 53591, 53593, - 53597, 53609, 53611, 53617, 53623, 53629, 53633, 53639, 53653, 53657, - 53681, 53693, 53699, 53717, 53719, 53731, 53759, 53773, 53777, 53783, - 53791, 53813, 53819, 53831, 53849, 53857, 53861, 53881, 53887, 53891, - 53897, 53899, 53917, 53923, 53927, 53939, 53951, 53959, 53987, 53993, - 54001, 54011, 54013, 54037, 54049, 54059, 54083, 54091, 54101, 54121, - 54133, 54139, 54151, 54163, 54167, 54181, 54193, 54217, 54251, 54269, - 54277, 54287, 54293, 54311, 54319, 54323, 54331, 54347, 54361, 54367, - 54371, 54377, 54401, 54403, 54409, 54413, 54419, 54421, 54437, 54443, - 54449, 54469, 54493, 54497, 54499, 54503, 54517, 54521, 54539, 54541, - 54547, 54559, 54563, 54577, 54581, 54583, 54601, 54617, 54623, 54629, - 54631, 54647, 54667, 54673, 54679, 54709, 54713, 54721, 54727, 54751, - 54767, 54773, 54779, 54787, 54799, 54829, 54833, 54851, 54869, 54877, - 54881, 54907, 54917, 54919, 54941, 54949, 54959, 54973, 54979, 54983, - 55001, 55009, 55021, 55049, 55051, 55057, 55061, 55073, 55079, 55103, - 55109, 55117, 55127, 55147, 55163, 55171, 55201, 55207, 55213, 55217, - 55219, 55229, 55243, 55249, 55259, 55291, 55313, 55331, 55333, 55337, - 55339, 55343, 55351, 55373, 55381, 55399, 55411, 55439, 55441, 55457, - 55469, 55487, 55501, 55511, 55529, 55541, 55547, 55579, 55589, 55603, - 55609, 55619, 55621, 55631, 55633, 55639, 55661, 55663, 55667, 55673, - 55681, 55691, 55697, 55711, 55717, 55721, 55733, 55763, 55787, 55793, - 55799, 55807, 55813, 55817, 55819, 55823, 55829, 55837, 55843, 55849, - 55871, 55889, 55897, 55901, 55903, 55921, 55927, 55931, 55933, 55949, - 55967, 55987, 55997, 56003, 56009, 56039, 56041, 56053, 56081, 56087, - 56093, 56099, 56101, 56113, 56123, 56131, 56149, 56167, 56171, 56179, - 56197, 56207, 56209, 56237, 56239, 56249, 56263, 56267, 56269, 56299, - 56311, 56333, 56359, 56369, 56377, 56383, 56393, 56401, 56417, 56431, - 56437, 56443, 56453, 56467, 56473, 56477, 56479, 56489, 56501, 56503, - 56509, 56519, 56527, 56531, 56533, 56543, 56569, 56591, 56597, 56599, - 56611, 56629, 56633, 56659, 56663, 56671, 56681, 56687, 56701, 56711, - 56713, 56731, 56737, 56747, 56767, 56773, 56779, 56783, 56807, 56809, - 56813, 56821, 56827, 56843, 56857, 56873, 56891, 56893, 56897, 56909, - 56911, 56921, 56923, 56929, 56941, 56951, 56957, 56963, 56983, 56989, - 56993, 56999, 57037, 57041, 57047, 57059, 57073, 57077, 57089, 57097, - 57107, 57119, 57131, 57139, 57143, 57149, 57163, 57173, 57179, 57191, - 57193, 57203, 57221, 57223, 57241, 57251, 57259, 57269, 57271, 57283, - 57287, 57301, 57329, 57331, 57347, 57349, 57367, 57373, 57383, 57389, - 57397, 57413, 57427, 57457, 57467, 57487, 57493, 57503, 57527, 57529, - 57557, 57559, 57571, 57587, 57593, 57601, 57637, 57641, 57649, 57653, - 57667, 57679, 57689, 57697, 57709, 57713, 57719, 57727, 57731, 57737, - 57751, 57773, 57781, 57787, 57791, 57793, 57803, 57809, 57829, 57839, - 57847, 57853, 57859, 57881, 57899, 57901, 57917, 57923, 57943, 57947, - 57973, 57977, 57991, 58013, 58027, 58031, 58043, 58049, 58057, 58061, - 58067, 58073, 58099, 58109, 58111, 58129, 58147, 58151, 58153, 58169, - 58171, 58189, 58193, 58199, 58207, 58211, 58217, 58229, 58231, 58237, - 58243, 58271, 58309, 58313, 58321, 58337, 58363, 58367, 58369, 58379, - 58391, 58393, 58403, 58411, 58417, 58427, 58439, 58441, 58451, 58453, - 58477, 58481, 58511, 58537, 58543, 58549, 58567, 58573, 58579, 58601, - 58603, 58613, 58631, 58657, 58661, 58679, 58687, 58693, 58699, 58711, - 58727, 58733, 58741, 58757, 58763, 58771, 58787, 58789, 58831, 58889, - 58897, 58901, 58907, 58909, 58913, 58921, 58937, 58943, 58963, 58967, - 58979, 58991, 58997, 59009, 59011, 59021, 59023, 59029, 59051, 59053, - 59063, 59069, 59077, 59083, 59093, 59107, 59113, 59119, 59123, 59141, - 59149, 59159, 59167, 59183, 59197, 59207, 59209, 59219, 59221, 59233, - 59239, 59243, 59263, 59273, 59281, 59333, 59341, 59351, 59357, 59359, - 59369, 59377, 59387, 59393, 59399, 59407, 59417, 59419, 59441, 59443, - 59447, 59453, 59467, 59471, 59473, 59497, 59509, 59513, 59539, 59557, - 59561, 59567, 59581, 59611, 59617, 59621, 59627, 59629, 59651, 59659, - 59663, 59669, 59671, 59693, 59699, 59707, 59723, 59729, 59743, 59747, - 59753, 59771, 59779, 59791, 59797, 59809, 59833, 59863, 59879, 59887, - 59921, 59929, 59951, 59957, 59971, 59981, 59999, 60013, 60017, 60029, - 60037, 60041, 60077, 60083, 60089, 60091, 60101, 60103, 60107, 60127, - 60133, 60139, 60149, 60161, 60167, 60169, 60209, 60217, 60223, 60251, - 60257, 60259, 60271, 60289, 60293, 60317, 60331, 60337, 60343, 60353, - 60373, 60383, 60397, 60413, 60427, 60443, 60449, 60457, 60493, 60497, - 60509, 60521, 60527, 60539, 60589, 60601, 60607, 60611, 60617, 60623, - 60631, 60637, 60647, 60649, 60659, 60661, 60679, 60689, 60703, 60719, - 60727, 60733, 60737, 60757, 60761, 60763, 60773, 60779, 60793, 60811, - 60821, 60859, 60869, 60887, 60889, 60899, 60901, 60913, 60917, 60919, - 60923, 60937, 60943, 60953, 60961, 61001, 61007, 61027, 61031, 61043, - 61051, 61057, 61091, 61099, 61121, 61129, 61141, 61151, 61153, 61169, - 61211, 61223, 61231, 61253, 61261, 61283, 61291, 61297, 61331, 61333, - 61339, 61343, 61357, 61363, 61379, 61381, 61403, 61409, 61417, 61441, - 61463, 61469, 61471, 61483, 61487, 61493, 61507, 61511, 61519, 61543, - 61547, 61553, 61559, 61561, 61583, 61603, 61609, 61613, 61627, 61631, - 61637, 61643, 61651, 61657, 61667, 61673, 61681, 61687, 61703, 61717, - 61723, 61729, 61751, 61757, 61781, 61813, 61819, 61837, 61843, 61861, - 61871, 61879, 61909, 61927, 61933, 61949, 61961, 61967, 61979, 61981, - 61987, 61991, 62003, 62011, 62017, 62039, 62047, 62053, 62057, 62071, - 62081, 62099, 62119, 62129, 62131, 62137, 62141, 62143, 62171, 62189, - 62191, 62201, 62207, 62213, 62219, 62233, 62273, 62297, 62299, 62303, - 62311, 62323, 62327, 62347, 62351, 62383, 62401, 62417, 62423, 62459, - 62467, 62473, 62477, 62483, 62497, 62501, 62507, 62533, 62539, 62549, - 62563, 62581, 62591, 62597, 62603, 62617, 62627, 62633, 62639, 62653, - 62659, 62683, 62687, 62701, 62723, 62731, 62743, 62753, 62761, 62773, - 62791, 62801, 62819, 62827, 62851, 62861, 62869, 62873, 62897, 62903, - 62921, 62927, 62929, 62939, 62969, 62971, 62981, 62983, 62987, 62989, - 63029, 63031, 63059, 63067, 63073, 63079, 63097, 63103, 63113, 63127, - 63131, 63149, 63179, 63197, 63199, 63211, 63241, 63247, 63277, 63281, - 63299, 63311, 63313, 63317, 63331, 63337, 63347, 63353, 63361, 63367, - 63377, 63389, 63391, 63397, 63409, 63419, 63421, 63439, 63443, 63463, - 63467, 63473, 63487, 63493, 63499, 63521, 63527, 63533, 63541, 63559, - 63577, 63587, 63589, 63599, 63601, 63607, 63611, 63617, 63629, 63647, - 63649, 63659, 63667, 63671, 63689, 63691, 63697, 63703, 63709, 63719, - 63727, 63737, 63743, 63761, 63773, 63781, 63793, 63799, 63803, 63809, - 63823, 63839, 63841, 63853, 63857, 63863, 63901, 63907, 63913, 63929, - 63949, 63977, 63997, 64007, 64013, 64019, 64033, 64037, 64063, 64067, - 64081, 64091, 64109, 64123, 64151, 64153, 64157, 64171, 64187, 64189, - 64217, 64223, 64231, 64237, 64271, 64279, 64283, 64301, 64303, 64319, - 64327, 64333, 64373, 64381, 64399, 64403, 64433, 64439, 64451, 64453, - 64483, 64489, 64499, 64513, 64553, 64567, 64577, 64579, 64591, 64601, - 64609, 64613, 64621, 64627, 64633, 64661, 64663, 64667, 64679, 64693, - 64709, 64717, 64747, 64763, 64781, 64783, 64793, 64811, 64817, 64849, - 64853, 64871, 64877, 64879, 64891, 64901, 64919, 64921, 64927, 64937, - 64951, 64969, 64997, 65003, 65011, 65027, 65029, 65033, 65053, 65063, - 65071, 65089, 65099, 65101, 65111, 65119, 65123, 65129, 65141, 65147, - 65167, 65171, 65173, 65179, 65183, 65203, 65213, 65239, 65257, 65267, - 65269, 65287, 65293, 65309, 65323, 65327, 65353, 65357, 65371, 65381, - 65393, 65407, 65413, 65419, 65423, 65437, 65447, 65449, 65479, 65497, - 65519, 65521, 65537, 65539, 65543, 65551, 65557, 65563, 65579, 65581, - 65587, 65599, 65609, 65617, 65629, 65633, 65647, 65651, 65657, 65677, - 65687, 65699, 65701, 65707, 65713, 65717, 65719, 65729, 65731, 65761, - 65777, 65789, 65809, 65827, 65831, 65837, 65839, 65843, 65851, 65867, - 65881, 65899, 65921, 65927, 65929, 65951, 65957, 65963, 65981, 65983, - 65993, 66029, 66037, 66041, 66047, 66067, 66071, 66083, 66089, 66103, - 66107, 66109, 66137, 66161, 66169, 66173, 66179, 66191, 66221, 66239, - 66271, 66293, 66301, 66337, 66343, 66347, 66359, 66361, 66373, 66377, - 66383, 66403, 66413, 66431, 66449, 66457, 66463, 66467, 66491, 66499, - 66509, 66523, 66529, 66533, 66541, 66553, 66569, 66571, 66587, 66593, - 66601, 66617, 66629, 66643, 66653, 66683, 66697, 66701, 66713, 66721, - 66733, 66739, 66749, 66751, 66763, 66791, 66797, 66809, 66821, 66841, - 66851, 66853, 66863, 66877, 66883, 66889, 66919, 66923, 66931, 66943, - 66947, 66949, 66959, 66973, 66977, 67003, 67021, 67033, 67043, 67049, - 67057, 67061, 67073, 67079, 67103, 67121, 67129, 67139, 67141, 67153, - 67157, 67169, 67181, 67187, 67189, 67211, 67213, 67217, 67219, 67231, - 67247, 67261, 67271, 67273, 67289, 67307, 67339, 67343, 67349, 67369, - 67391, 67399, 67409, 67411, 67421, 67427, 67429, 67433, 67447, 67453, - 67477, 67481, 67489, 67493, 67499, 67511, 67523, 67531, 67537, 67547, - 67559, 67567, 67577, 67579, 67589, 67601, 67607, 67619, 67631, 67651, - 67679, 67699, 67709, 67723, 67733, 67741, 67751, 67757, 67759, 67763, - 67777, 67783, 67789, 67801, 67807, 67819, 67829, 67843, 67853, 67867, - 67883, 67891, 67901, 67927, 67931, 67933, 67939, 67943, 67957, 67961, - 67967, 67979, 67987, 67993, 68023, 68041, 68053, 68059, 68071, 68087, - 68099, 68111, 68113, 68141, 68147, 68161, 68171, 68207, 68209, 68213, - 68219, 68227, 68239, 68261, 68279, 68281, 68311, 68329, 68351, 68371, - 68389, 68399, 68437, 68443, 68447, 68449, 68473, 68477, 68483, 68489, - 68491, 68501, 68507, 68521, 68531, 68539, 68543, 68567, 68581, 68597, - 68611, 68633, 68639, 68659, 68669, 68683, 68687, 68699, 68711, 68713, - 68729, 68737, 68743, 68749, 68767, 68771, 68777, 68791, 68813, 68819, - 68821, 68863, 68879, 68881, 68891, 68897, 68899, 68903, 68909, 68917, - 68927, 68947, 68963, 68993, 69001, 69011, 69019, 69029, 69031, 69061, - 69067, 69073, 69109, 69119, 69127, 69143, 69149, 69151, 69163, 69191, - 69193, 69197, 69203, 69221, 69233, 69239, 69247, 69257, 69259, 69263, - 69313, 69317, 69337, 69341, 69371, 69379, 69383, 69389, 69401, 69403, - 69427, 69431, 69439, 69457, 69463, 69467, 69473, 69481, 69491, 69493, - 69497, 69499, 69539, 69557, 69593, 69623, 69653, 69661, 69677, 69691, - 69697, 69709, 69737, 69739, 69761, 69763, 69767, 69779, 69809, 69821, - 69827, 69829, 69833, 69847, 69857, 69859, 69877, 69899, 69911, 69929, - 69931, 69941, 69959, 69991, 69997, 70001, 70003, 70009, 70019, 70039, - 70051, 70061, 70067, 70079, 70099, 70111, 70117, 70121, 70123, 70139, - 70141, 70157, 70163, 70177, 70181, 70183, 70199, 70201, 70207, 70223, - 70229, 70237, 70241, 70249, 70271, 70289, 70297, 70309, 70313, 70321, - 70327, 70351, 70373, 70379, 70381, 70393, 70423, 70429, 70439, 70451, - 70457, 70459, 70481, 70487, 70489, 70501, 70507, 70529, 70537, 70549, - 70571, 70573, 70583, 70589, 70607, 70619, 70621, 70627, 70639, 70657, - 70663, 70667, 70687, 70709, 70717, 70729, 70753, 70769, 70783, 70793, - 70823, 70841, 70843, 70849, 70853, 70867, 70877, 70879, 70891, 70901, - 70913, 70919, 70921, 70937, 70949, 70951, 70957, 70969, 70979, 70981, - 70991, 70997, 70999, 71011, 71023, 71039, 71059, 71069, 71081, 71089, - 71119, 71129, 71143, 71147, 71153, 71161, 71167, 71171, 71191, 71209, - 71233, 71237, 71249, 71257, 71261, 71263, 71287, 71293, 71317, 71327, - 71329, 71333, 71339, 71341, 71347, 71353, 71359, 71363, 71387, 71389, - 71399, 71411, 71413, 71419, 71429, 71437, 71443, 71453, 71471, 71473, - 71479, 71483, 71503, 71527, 71537, 71549, 71551, 71563, 71569, 71593, - 71597, 71633, 71647, 71663, 71671, 71693, 71699, 71707, 71711, 71713, - 71719, 71741, 71761, 71777, 71789, 71807, 71809, 71821, 71837, 71843, - 71849, 71861, 71867, 71879, 71881, 71887, 71899, 71909, 71917, 71933, - 71941, 71947, 71963, 71971, 71983, 71987, 71993, 71999, 72019, 72031, - 72043, 72047, 72053, 72073, 72077, 72089, 72091, 72101, 72103, 72109, - 72139, 72161, 72167, 72169, 72173, 72211, 72221, 72223, 72227, 72229, - 72251, 72253, 72269, 72271, 72277, 72287, 72307, 72313, 72337, 72341, - 72353, 72367, 72379, 72383, 72421, 72431, 72461, 72467, 72469, 72481, - 72493, 72497, 72503, 72533, 72547, 72551, 72559, 72577, 72613, 72617, - 72623, 72643, 72647, 72649, 72661, 72671, 72673, 72679, 72689, 72701, - 72707, 72719, 72727, 72733, 72739, 72763, 72767, 72797, 72817, 72823, - 72859, 72869, 72871, 72883, 72889, 72893, 72901, 72907, 72911, 72923, - 72931, 72937, 72949, 72953, 72959, 72973, 72977, 72997, 73009, 73013, - 73019, 73037, 73039, 73043, 73061, 73063, 73079, 73091, 73121, 73127, - 73133, 73141, 73181, 73189, 73237, 73243, 73259, 73277, 73291, 73303, - 73309, 73327, 73331, 73351, 73361, 73363, 73369, 73379, 73387, 73417, - 73421, 73433, 73453, 73459, 73471, 73477, 73483, 73517, 73523, 73529, - 73547, 73553, 73561, 73571, 73583, 73589, 73597, 73607, 73609, 73613, - 73637, 73643, 73651, 73673, 73679, 73681, 73693, 73699, 73709, 73721, - 73727, 73751, 73757, 73771, 73783, 73819, 73823, 73847, 73849, 73859, - 73867, 73877, 73883, 73897, 73907, 73939, 73943, 73951, 73961, 73973, - 73999, 74017, 74021, 74027, 74047, 74051, 74071, 74077, 74093, 74099, - 74101, 74131, 74143, 74149, 74159, 74161, 74167, 74177, 74189, 74197, - 74201, 74203, 74209, 74219, 74231, 74257, 74279, 74287, 74293, 74297, - 74311, 74317, 74323, 74353, 74357, 74363, 74377, 74381, 74383, 74411, - 74413, 74419, 74441, 74449, 74453, 74471, 74489, 74507, 74509, 74521, - 74527, 74531, 74551, 74561, 74567, 74573, 74587, 74597, 74609, 74611, - 74623, 74653, 74687, 74699, 74707, 74713, 74717, 74719, 74729, 74731, - 74747, 74759, 74761, 74771, 74779, 74797, 74821, 74827, 74831, 74843, - 74857, 74861, 74869, 74873, 74887, 74891, 74897, 74903, 74923, 74929, - 74933, 74941, 74959, 75011, 75013, 75017, 75029, 75037, 75041, 75079, - 75083, 75109, 75133, 75149, 75161, 75167, 75169, 75181, 75193, 75209, - 75211, 75217, 75223, 75227, 75239, 75253, 75269, 75277, 75289, 75307, - 75323, 75329, 75337, 75347, 75353, 75367, 75377, 75389, 75391, 75401, - 75403, 75407, 75431, 75437, 75479, 75503, 75511, 75521, 75527, 75533, - 75539, 75541, 75553, 75557, 75571, 75577, 75583, 75611, 75617, 75619, - 75629, 75641, 75653, 75659, 75679, 75683, 75689, 75703, 75707, 75709, - 75721, 75731, 75743, 75767, 75773, 75781, 75787, 75793, 75797, 75821, - 75833, 75853, 75869, 75883, 75913, 75931, 75937, 75941, 75967, 75979, - 75983, 75989, 75991, 75997, 76001, 76003, 76031, 76039, 76079, 76081, - 76091, 76099, 76103, 76123, 76129, 76147, 76157, 76159, 76163, 76207, - 76213, 76231, 76243, 76249, 76253, 76259, 76261, 76283, 76289, 76303, - 76333, 76343, 76367, 76369, 76379, 76387, 76403, 76421, 76423, 76441, - 76463, 76471, 76481, 76487, 76493, 76507, 76511, 76519, 76537, 76541, - 76543, 76561, 76579, 76597, 76603, 76607, 76631, 76649, 76651, 76667, - 76673, 76679, 76697, 76717, 76733, 76753, 76757, 76771, 76777, 76781, - 76801, 76819, 76829, 76831, 76837, 76847, 76871, 76873, 76883, 76907, - 76913, 76919, 76943, 76949, 76961, 76963, 76991, 77003, 77017, 77023, - 77029, 77041, 77047, 77069, 77081, 77093, 77101, 77137, 77141, 77153, - 77167, 77171, 77191, 77201, 77213, 77237, 77239, 77243, 77249, 77261, - 77263, 77267, 77269, 77279, 77291, 77317, 77323, 77339, 77347, 77351, - 77359, 77369, 77377, 77383, 77417, 77419, 77431, 77447, 77471, 77477, - 77479, 77489, 77491, 77509, 77513, 77521, 77527, 77543, 77549, 77551, - 77557, 77563, 77569, 77573, 77587, 77591, 77611, 77617, 77621, 77641, - 77647, 77659, 77681, 77687, 77689, 77699, 77711, 77713, 77719, 77723, - 77731, 77743, 77747, 77761, 77773, 77783, 77797, 77801, 77813, 77839, - 77849, 77863, 77867, 77893, 77899, 77929, 77933, 77951, 77969, 77977, - 77983, 77999, 78007, 78017, 78031, 78041, 78049, 78059, 78079, 78101, - 78121, 78137, 78139, 78157, 78163, 78167, 78173, 78179, 78191, 78193, - 78203, 78229, 78233, 78241, 78259, 78277, 78283, 78301, 78307, 78311, - 78317, 78341, 78347, 78367, 78401, 78427, 78437, 78439, 78467, 78479, - 78487, 78497, 78509, 78511, 78517, 78539, 78541, 78553, 78569, 78571, - 78577, 78583, 78593, 78607, 78623, 78643, 78649, 78653, 78691, 78697, - 78707, 78713, 78721, 78737, 78779, 78781, 78787, 78791, 78797, 78803, - 78809, 78823, 78839, 78853, 78857, 78877, 78887, 78889, 78893, 78901, - 78919, 78929, 78941, 78977, 78979, 78989, 79031, 79039, 79043, 79063, - 79087, 79103, 79111, 79133, 79139, 79147, 79151, 79153, 79159, 79181, - 79187, 79193, 79201, 79229, 79231, 79241, 79259, 79273, 79279, 79283, - 79301, 79309, 79319, 79333, 79337, 79349, 79357, 79367, 79379, 79393, - 79397, 79399, 79411, 79423, 79427, 79433, 79451, 79481, 79493, 79531, - 79537, 79549, 79559, 79561, 79579, 79589, 79601, 79609, 79613, 79621, - 79627, 79631, 79633, 79657, 79669, 79687, 79691, 79693, 79697, 79699, - 79757, 79769, 79777, 79801, 79811, 79813, 79817, 79823, 79829, 79841, - 79843, 79847, 79861, 79867, 79873, 79889, 79901, 79903, 79907, 79939, - 79943, 79967, 79973, 79979, 79987, 79997, 79999, 80021, 80039, 80051, - 80071, 80077, 80107, 80111, 80141, 80147, 80149, 80153, 80167, 80173, - 80177, 80191, 80207, 80209, 80221, 80231, 80233, 80239, 80251, 80263, - 80273, 80279, 80287, 80309, 80317, 80329, 80341, 80347, 80363, 80369, - 80387, 80407, 80429, 80447, 80449, 80471, 80473, 80489, 80491, 80513, - 80527, 80537, 80557, 80567, 80599, 80603, 80611, 80621, 80627, 80629, - 80651, 80657, 80669, 80671, 80677, 80681, 80683, 80687, 80701, 80713, - 80737, 80747, 80749, 80761, 80777, 80779, 80783, 80789, 80803, 80809, - 80819, 80831, 80833, 80849, 80863, 80897, 80909, 80911, 80917, 80923, - 80929, 80933, 80953, 80963, 80989, 81001, 81013, 81017, 81019, 81023, - 81031, 81041, 81043, 81047, 81049, 81071, 81077, 81083, 81097, 81101, - 81119, 81131, 81157, 81163, 81173, 81181, 81197, 81199, 81203, 81223, - 81233, 81239, 81281, 81283, 81293, 81299, 81307, 81331, 81343, 81349, - 81353, 81359, 81371, 81373, 81401, 81409, 81421, 81439, 81457, 81463, - 81509, 81517, 81527, 81533, 81547, 81551, 81553, 81559, 81563, 81569, - 81611, 81619, 81629, 81637, 81647, 81649, 81667, 81671, 81677, 81689, - 81701, 81703, 81707, 81727, 81737, 81749, 81761, 81769, 81773, 81799, - 81817, 81839, 81847, 81853, 81869, 81883, 81899, 81901, 81919, 81929, - 81931, 81937, 81943, 81953, 81967, 81971, 81973, 82003, 82007, 82009, - 82013, 82021, 82031, 82037, 82039, 82051, 82067, 82073, 82129, 82139, - 82141, 82153, 82163, 82171, 82183, 82189, 82193, 82207, 82217, 82219, - 82223, 82231, 82237, 82241, 82261, 82267, 82279, 82301, 82307, 82339, - 82349, 82351, 82361, 82373, 82387, 82393, 82421, 82457, 82463, 82469, - 82471, 82483, 82487, 82493, 82499, 82507, 82529, 82531, 82549, 82559, - 82561, 82567, 82571, 82591, 82601, 82609, 82613, 82619, 82633, 82651, - 82657, 82699, 82721, 82723, 82727, 82729, 82757, 82759, 82763, 82781, - 82787, 82793, 82799, 82811, 82813, 82837, 82847, 82883, 82889, 82891, - 82903, 82913, 82939, 82963, 82981, 82997, 83003, 83009, 83023, 83047, - 83059, 83063, 83071, 83077, 83089, 83093, 83101, 83117, 83137, 83177, - 83203, 83207, 83219, 83221, 83227, 83231, 83233, 83243, 83257, 83267, - 83269, 83273, 83299, 83311, 83339, 83341, 83357, 83383, 83389, 83399, - 83401, 83407, 83417, 83423, 83431, 83437, 83443, 83449, 83459, 83471, - 83477, 83497, 83537, 83557, 83561, 83563, 83579, 83591, 83597, 83609, - 83617, 83621, 83639, 83641, 83653, 83663, 83689, 83701, 83717, 83719, - 83737, 83761, 83773, 83777, 83791, 83813, 83833, 83843, 83857, 83869, - 83873, 83891, 83903, 83911, 83921, 83933, 83939, 83969, 83983, 83987, - 84011, 84017, 84047, 84053, 84059, 84061, 84067, 84089, 84121, 84127, - 84131, 84137, 84143, 84163, 84179, 84181, 84191, 84199, 84211, 84221, - 84223, 84229, 84239, 84247, 84263, 84299, 84307, 84313, 84317, 84319, - 84347, 84349, 84377, 84389, 84391, 84401, 84407, 84421, 84431, 84437, - 84443, 84449, 84457, 84463, 84467, 84481, 84499, 84503, 84509, 84521, - 84523, 84533, 84551, 84559, 84589, 84629, 84631, 84649, 84653, 84659, - 84673, 84691, 84697, 84701, 84713, 84719, 84731, 84737, 84751, 84761, - 84787, 84793, 84809, 84811, 84827, 84857, 84859, 84869, 84871, 84913, - 84919, 84947, 84961, 84967, 84977, 84979, 84991, 85009, 85021, 85027, - 85037, 85049, 85061, 85081, 85087, 85091, 85093, 85103, 85109, 85121, - 85133, 85147, 85159, 85193, 85199, 85201, 85213, 85223, 85229, 85237, - 85243, 85247, 85259, 85297, 85303, 85313, 85331, 85333, 85361, 85363, - 85369, 85381, 85411, 85427, 85429, 85439, 85447, 85451, 85453, 85469, - 85487, 85513, 85517, 85523, 85531, 85549, 85571, 85577, 85597, 85601, - 85607, 85619, 85621, 85627, 85639, 85643, 85661, 85667, 85669, 85691, - 85703, 85711, 85717, 85733, 85751, 85781, 85793, 85817, 85819, 85829, - 85831, 85837, 85843, 85847, 85853, 85889, 85903, 85909, 85931, 85933, - 85991, 85999, 86011, 86017, 86027, 86029, 86069, 86077, 86083, 86111, - 86113, 86117, 86131, 86137, 86143, 86161, 86171, 86179, 86183, 86197, - 86201, 86209, 86239, 86243, 86249, 86257, 86263, 86269, 86287, 86291, - 86293, 86297, 86311, 86323, 86341, 86351, 86353, 86357, 86369, 86371, - 86381, 86389, 86399, 86413, 86423, 86441, 86453, 86461, 86467, 86477, - 86491, 86501, 86509, 86531, 86533, 86539, 86561, 86573, 86579, 86587, - 86599, 86627, 86629, 86677, 86689, 86693, 86711, 86719, 86729, 86743, - 86753, 86767, 86771, 86783, 86813, 86837, 86843, 86851, 86857, 86861, - 86869, 86923, 86927, 86929, 86939, 86951, 86959, 86969, 86981, 86993, - 87011, 87013, 87037, 87041, 87049, 87071, 87083, 87103, 87107, 87119, - 87121, 87133, 87149, 87151, 87179, 87181, 87187, 87211, 87221, 87223, - 87251, 87253, 87257, 87277, 87281, 87293, 87299, 87313, 87317, 87323, - 87337, 87359, 87383, 87403, 87407, 87421, 87427, 87433, 87443, 87473, - 87481, 87491, 87509, 87511, 87517, 87523, 87539, 87541, 87547, 87553, - 87557, 87559, 87583, 87587, 87589, 87613, 87623, 87629, 87631, 87641, - 87643, 87649, 87671, 87679, 87683, 87691, 87697, 87701, 87719, 87721, - 87739, 87743, 87751, 87767, 87793, 87797, 87803, 87811, 87833, 87853, - 87869, 87877, 87881, 87887, 87911, 87917, 87931, 87943, 87959, 87961, - 87973, 87977, 87991, 88001, 88003, 88007, 88019, 88037, 88069, 88079, - 88093, 88117, 88129, 88169, 88177, 88211, 88223, 88237, 88241, 88259, - 88261, 88289, 88301, 88321, 88327, 88337, 88339, 88379, 88397, 88411, - 88423, 88427, 88463, 88469, 88471, 88493, 88499, 88513, 88523, 88547, - 88589, 88591, 88607, 88609, 88643, 88651, 88657, 88661, 88663, 88667, - 88681, 88721, 88729, 88741, 88747, 88771, 88789, 88793, 88799, 88801, - 88807, 88811, 88813, 88817, 88819, 88843, 88853, 88861, 88867, 88873, - 88883, 88897, 88903, 88919, 88937, 88951, 88969, 88993, 88997, 89003, - 89009, 89017, 89021, 89041, 89051, 89057, 89069, 89071, 89083, 89087, - 89101, 89107, 89113, 89119, 89123, 89137, 89153, 89189, 89203, 89209, - 89213, 89227, 89231, 89237, 89261, 89269, 89273, 89293, 89303, 89317, - 89329, 89363, 89371, 89381, 89387, 89393, 89399, 89413, 89417, 89431, - 89443, 89449, 89459, 89477, 89491, 89501, 89513, 89519, 89521, 89527, - 89533, 89561, 89563, 89567, 89591, 89597, 89599, 89603, 89611, 89627, - 89633, 89653, 89657, 89659, 89669, 89671, 89681, 89689, 89753, 89759, - 89767, 89779, 89783, 89797, 89809, 89819, 89821, 89833, 89839, 89849, - 89867, 89891, 89897, 89899, 89909, 89917, 89923, 89939, 89959, 89963, - 89977, 89983, 89989, 90001, 90007, 90011, 90017, 90019, 90023, 90031, - 90053, 90059, 90067, 90071, 90073, 90089, 90107, 90121, 90127, 90149, - 90163, 90173, 90187, 90191, 90197, 90199, 90203, 90217, 90227, 90239, - 90247, 90263, 90271, 90281, 90289, 90313, 90353, 90359, 90371, 90373, - 90379, 90397, 90401, 90403, 90407, 90437, 90439, 90469, 90473, 90481, - 90499, 90511, 90523, 90527, 90529, 90533, 90547, 90583, 90599, 90617, - 90619, 90631, 90641, 90647, 90659, 90677, 90679, 90697, 90703, 90709, - 90731, 90749, 90787, 90793, 90803, 90821, 90823, 90833, 90841, 90847, - 90863, 90887, 90901, 90907, 90911, 90917, 90931, 90947, 90971, 90977, - 90989, 90997, 91009, 91019, 91033, 91079, 91081, 91097, 91099, 91121, - 91127, 91129, 91139, 91141, 91151, 91153, 91159, 91163, 91183, 91193, - 91199, 91229, 91237, 91243, 91249, 91253, 91283, 91291, 91297, 91303, - 91309, 91331, 91367, 91369, 91373, 91381, 91387, 91393, 91397, 91411, - 91423, 91433, 91453, 91457, 91459, 91463, 91493, 91499, 91513, 91529, - 91541, 91571, 91573, 91577, 91583, 91591, 91621, 91631, 91639, 91673, - 91691, 91703, 91711, 91733, 91753, 91757, 91771, 91781, 91801, 91807, - 91811, 91813, 91823, 91837, 91841, 91867, 91873, 91909, 91921, 91939, - 91943, 91951, 91957, 91961, 91967, 91969, 91997, 92003, 92009, 92033, - 92041, 92051, 92077, 92083, 92107, 92111, 92119, 92143, 92153, 92173, - 92177, 92179, 92189, 92203, 92219, 92221, 92227, 92233, 92237, 92243, - 92251, 92269, 92297, 92311, 92317, 92333, 92347, 92353, 92357, 92363, - 92369, 92377, 92381, 92383, 92387, 92399, 92401, 92413, 92419, 92431, - 92459, 92461, 92467, 92479, 92489, 92503, 92507, 92551, 92557, 92567, - 92569, 92581, 92593, 92623, 92627, 92639, 92641, 92647, 92657, 92669, - 92671, 92681, 92683, 92693, 92699, 92707, 92717, 92723, 92737, 92753, - 92761, 92767, 92779, 92789, 92791, 92801, 92809, 92821, 92831, 92849, - 92857, 92861, 92863, 92867, 92893, 92899, 92921, 92927, 92941, 92951, - 92957, 92959, 92987, 92993, 93001, 93047, 93053, 93059, 93077, 93083, - 93089, 93097, 93103, 93113, 93131, 93133, 93139, 93151, 93169, 93179, - 93187, 93199, 93229, 93239, 93241, 93251, 93253, 93257, 93263, 93281, - 93283, 93287, 93307, 93319, 93323, 93329, 93337, 93371, 93377, 93383, - 93407, 93419, 93427, 93463, 93479, 93481, 93487, 93491, 93493, 93497, - 93503, 93523, 93529, 93553, 93557, 93559, 93563, 93581, 93601, 93607, - 93629, 93637, 93683, 93701, 93703, 93719, 93739, 93761, 93763, 93787, - 93809, 93811, 93827, 93851, 93871, 93887, 93889, 93893, 93901, 93911, - 93913, 93923, 93937, 93941, 93949, 93967, 93971, 93979, 93983, 93997, - 94007, 94009, 94033, 94049, 94057, 94063, 94079, 94099, 94109, 94111, - 94117, 94121, 94151, 94153, 94169, 94201, 94207, 94219, 94229, 94253, - 94261, 94273, 94291, 94307, 94309, 94321, 94327, 94331, 94343, 94349, - 94351, 94379, 94397, 94399, 94421, 94427, 94433, 94439, 94441, 94447, - 94463, 94477, 94483, 94513, 94529, 94531, 94541, 94543, 94547, 94559, - 94561, 94573, 94583, 94597, 94603, 94613, 94621, 94649, 94651, 94687, - 94693, 94709, 94723, 94727, 94747, 94771, 94777, 94781, 94789, 94793, - 94811, 94819, 94823, 94837, 94841, 94847, 94849, 94873, 94889, 94903, - 94907, 94933, 94949, 94951, 94961, 94993, 94999, 95003, 95009, 95021, - 95027, 95063, 95071, 95083, 95087, 95089, 95093, 95101, 95107, 95111, - 95131, 95143, 95153, 95177, 95189, 95191, 95203, 95213, 95219, 95231, - 95233, 95239, 95257, 95261, 95267, 95273, 95279, 95287, 95311, 95317, - 95327, 95339, 95369, 95383, 95393, 95401, 95413, 95419, 95429, 95441, - 95443, 95461, 95467, 95471, 95479, 95483, 95507, 95527, 95531, 95539, - 95549, 95561, 95569, 95581, 95597, 95603, 95617, 95621, 95629, 95633, - 95651, 95701, 95707, 95713, 95717, 95723, 95731, 95737, 95747, 95773, - 95783, 95789, 95791, 95801, 95803, 95813, 95819, 95857, 95869, 95873, - 95881, 95891, 95911, 95917, 95923, 95929, 95947, 95957, 95959, 95971, - 95987, 95989, 96001, 96013, 96017, 96043, 96053, 96059, 96079, 96097, - 96137, 96149, 96157, 96167, 96179, 96181, 96199, 96211, 96221, 96223, - 96233, 96259, 96263, 96269, 96281, 96289, 96293, 96323, 96329, 96331, - 96337, 96353, 96377, 96401, 96419, 96431, 96443, 96451, 96457, 96461, - 96469, 96479, 96487, 96493, 96497, 96517, 96527, 96553, 96557, 96581, - 96587, 96589, 96601, 96643, 96661, 96667, 96671, 96697, 96703, 96731, - 96737, 96739, 96749, 96757, 96763, 96769, 96779, 96787, 96797, 96799, - 96821, 96823, 96827, 96847, 96851, 96857, 96893, 96907, 96911, 96931, - 96953, 96959, 96973, 96979, 96989, 96997, 97001, 97003, 97007, 97021, - 97039, 97073, 97081, 97103, 97117, 97127, 97151, 97157, 97159, 97169, - 97171, 97177, 97187, 97213, 97231, 97241, 97259, 97283, 97301, 97303, - 97327, 97367, 97369, 97373, 97379, 97381, 97387, 97397, 97423, 97429, - 97441, 97453, 97459, 97463, 97499, 97501, 97511, 97523, 97547, 97549, - 97553, 97561, 97571, 97577, 97579, 97583, 97607, 97609, 97613, 97649, - 97651, 97673, 97687, 97711, 97729, 97771, 97777, 97787, 97789, 97813, - 97829, 97841, 97843, 97847, 97849, 97859, 97861, 97871, 97879, 97883, - 97919, 97927, 97931, 97943, 97961, 97967, 97973, 97987, 98009, 98011, - 98017, 98041, 98047, 98057, 98081, 98101, 98123, 98129, 98143, 98179, - 98207, 98213, 98221, 98227, 98251, 98257, 98269, 98297, 98299, 98317, - 98321, 98323, 98327, 98347, 98369, 98377, 98387, 98389, 98407, 98411, - 98419, 98429, 98443, 98453, 98459, 98467, 98473, 98479, 98491, 98507, - 98519, 98533, 98543, 98561, 98563, 98573, 98597, 98621, 98627, 98639, - 98641, 98663, 98669, 98689, 98711, 98713, 98717, 98729, 98731, 98737, - 98773, 98779, 98801, 98807, 98809, 98837, 98849, 98867, 98869, 98873, - 98887, 98893, 98897, 98899, 98909, 98911, 98927, 98929, 98939, 98947, - 98953, 98963, 98981, 98993, 98999, 99013, 99017, 99023, 99041, 99053, - 99079, 99083, 99089, 99103, 99109, 99119, 99131, 99133, 99137, 99139, - 99149, 99173, 99181, 99191, 99223, 99233, 99241, 99251, 99257, 99259, - 99277, 99289, 99317, 99347, 99349, 99367, 99371, 99377, 99391, 99397, - 99401, 99409, 99431, 99439, 99469, 99487, 99497, 99523, 99527, 99529, - 99551, 99559, 99563, 99571, 99577, 99581, 99607, 99611, 99623, 99643, - 99661, 99667, 99679, 99689, 99707, 99709, 99713, 99719, 99721, 99733, - 99761, 99767, 99787, 99793, 99809, 99817, 99823, 99829, 99833, 99839, - 99859, 99871, 99877, 99881, 99901, 99907, 99923, 99929, 99961, 99971, - 99989, 99991, 100003, 100019, 100043, 100049, 100057, 100069, 100103, 100109, -100129, 100151, 100153, 100169, 100183, 100189, 100193, 100207, 100213, 100237, -100267, 100271, 100279, 100291, 100297, 100313, 100333, 100343, 100357, 100361, -100363, 100379, 100391, 100393, 100403, 100411, 100417, 100447, 100459, 100469, -100483, 100493, 100501, 100511, 100517, 100519, 100523, 100537, 100547, 100549, -100559, 100591, 100609, 100613, 100621, 100649, 100669, 100673, 100693, 100699, -100703, 100733, 100741, 100747, 100769, 100787, 100799, 100801, 100811, 100823, -100829, 100847, 100853, 100907, 100913, 100927, 100931, 100937, 100943, 100957, -100981, 100987, 100999, 101009, 101021, 101027, 101051, 101063, 101081, 101089, -101107, 101111, 101113, 101117, 101119, 101141, 101149, 101159, 101161, 101173, -101183, 101197, 101203, 101207, 101209, 101221, 101267, 101273, 101279, 101281, -101287, 101293, 101323, 101333, 101341, 101347, 101359, 101363, 101377, 101383, -101399, 101411, 101419, 101429, 101449, 101467, 101477, 101483, 101489, 101501, -101503, 101513, 101527, 101531, 101533, 101537, 101561, 101573, 101581, 101599, -101603, 101611, 101627, 101641, 101653, 101663, 101681, 101693, 101701, 101719, -101723, 101737, 101741, 101747, 101749, 101771, 101789, 101797, 101807, 101833, -101837, 101839, 101863, 101869, 101873, 101879, 101891, 101917, 101921, 101929, -101939, 101957, 101963, 101977, 101987, 101999, 102001, 102013, 102019, 102023, -102031, 102043, 102059, 102061, 102071, 102077, 102079, 102101, 102103, 102107, -102121, 102139, 102149, 102161, 102181, 102191, 102197, 102199, 102203, 102217, -102229, 102233, 102241, 102251, 102253, 102259, 102293, 102299, 102301, 102317, -102329, 102337, 102359, 102367, 102397, 102407, 102409, 102433, 102437, 102451, -102461, 102481, 102497, 102499, 102503, 102523, 102533, 102539, 102547, 102551, -102559, 102563, 102587, 102593, 102607, 102611, 102643, 102647, 102653, 102667, -102673, 102677, 102679, 102701, 102761, 102763, 102769, 102793, 102797, 102811, -102829, 102841, 102859, 102871, 102877, 102881, 102911, 102913, 102929, 102931, -102953, 102967, 102983, 103001, 103007, 103043, 103049, 103067, 103069, 103079, -103087, 103091, 103093, 103099, 103123, 103141, 103171, 103177, 103183, 103217, -103231, 103237, 103289, 103291, 103307, 103319, 103333, 103349, 103357, 103387, -103391, 103393, 103399, 103409, 103421, 103423, 103451, 103457, 103471, 103483, -103511, 103529, 103549, 103553, 103561, 103567, 103573, 103577, 103583, 103591, -103613, 103619, 103643, 103651, 103657, 103669, 103681, 103687, 103699, 103703, -103723, 103769, 103787, 103801, 103811, 103813, 103837, 103841, 103843, 103867, -103889, 103903, 103913, 103919, 103951, 103963, 103967, 103969, 103979, 103981, -103991, 103993, 103997, 104003, 104009, 104021, 104033, 104047, 104053, 104059, -104087, 104089, 104107, 104113, 104119, 104123, 104147, 104149, 104161, 104173, -104179, 104183, 104207, 104231, 104233, 104239, 104243, 104281, 104287, 104297, -104309, 104311, 104323, 104327, 104347, 104369, 104381, 104383, 104393, 104399, -104417, 104459, 104471, 104473, 104479, 104491, 104513, 104527, 104537, 104543, -104549, 104551, 104561, 104579, 104593, 104597, 104623, 104639, 104651, 104659, -104677, 104681, 104683, 104693, 104701, 104707, 104711, 104717, 104723, 104729, -) diff --git a/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/adodbapi/test/setuptestframework.py b/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/adodbapi/test/setuptestframework.py deleted file mode 100644 index 98029574a3abfabd85a7237780569ef649ce8bf6..0000000000000000000000000000000000000000 --- a/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/adodbapi/test/setuptestframework.py +++ /dev/null @@ -1,134 +0,0 @@ -#!/usr/bin/python2 -# Configure this in order to run the testcases. -"setuptestframework.py v 2.6.0.8" -import os -import sys -import tempfile -import shutil - -try: - OSErrors = (WindowsError, OSError) -except NameError: # not running on Windows - OSErrors = OSError - - -def maketemp(): - temphome = tempfile.gettempdir() - tempdir = os.path.join(temphome, "adodbapi_test") - try: - os.mkdir(tempdir) - except: - pass - return tempdir - - -def _cleanup_function(testfolder, mdb_name): - try: - os.unlink(os.path.join(testfolder, mdb_name)) - except: - pass # mdb database not present - try: - shutil.rmtree(testfolder) - print(" cleaned up folder", testfolder) - except: - pass # test package not present - - -def getcleanupfunction(): - return _cleanup_function - - -def find_ado_path(): - adoName = os.path.normpath(os.getcwd() + "/../../adodbapi.py") - adoPackage = os.path.dirname(adoName) - return adoPackage - - -# make a new package directory for the test copy of ado -def makeadopackage(testfolder): - adoName = os.path.normpath(os.getcwd() + "/../adodbapi.py") - adoPath = os.path.dirname(adoName) - if os.path.exists(adoName): - newpackage = os.path.join(testfolder, "adodbapi") - try: - os.mkdir(newpackage) - except OSErrors: - print( - "*Note: temporary adodbapi package already exists: may be two versions running?" - ) - for f in os.listdir(adoPath): - if f.endswith(".py"): - shutil.copy(os.path.join(adoPath, f), newpackage) - if sys.version_info >= (3, 0): # only when running Py3.n - save = sys.stdout - sys.stdout = None - from lib2to3.main import main # use 2to3 to make test package - - main("lib2to3.fixes", args=["-n", "-w", newpackage]) - sys.stdout = save - return testfolder - else: - raise EnvironmentError("Connot find source of adodbapi to test.") - - -def makemdb(testfolder, mdb_name): - # following setup code borrowed from pywin32 odbc test suite - # kindly contributed by Frank Millman. - import os - - _accessdatasource = os.path.join(testfolder, mdb_name) - if os.path.isfile(_accessdatasource): - print("using JET database=", _accessdatasource) - else: - try: - from win32com.client.gencache import EnsureDispatch - from win32com.client import constants - - win32 = True - except ImportError: # perhaps we are running IronPython - win32 = False # iron Python - try: - from System import Activator, Type - except: - pass - - # Create a brand-new database - what is the story with these? - dbe = None - for suffix in (".36", ".35", ".30"): - try: - if win32: - dbe = EnsureDispatch("DAO.DBEngine" + suffix) - else: - type = Type.GetTypeFromProgID("DAO.DBEngine" + suffix) - dbe = Activator.CreateInstance(type) - break - except: - pass - if dbe: - print(" ...Creating ACCESS db at " + _accessdatasource) - if win32: - workspace = dbe.Workspaces(0) - newdb = workspace.CreateDatabase( - _accessdatasource, constants.dbLangGeneral, constants.dbVersion40 - ) - else: - newdb = dbe.CreateDatabase( - _accessdatasource, ";LANGID=0x0409;CP=1252;COUNTRY=0" - ) - newdb.Close() - else: - print(" ...copying test ACCESS db to " + _accessdatasource) - mdbName = os.path.abspath( - os.path.join(os.path.dirname(__file__), "..", "examples", "test.mdb") - ) - import shutil - - shutil.copy(mdbName, _accessdatasource) - - return _accessdatasource - - -if __name__ == "__main__": - print("Setting up a Jet database for server to use for remote testing...") - temp = maketemp() - makemdb(temp, "server_test.mdb") diff --git a/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/adodbapi/test/test_adodbapi_dbapi20.py b/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/adodbapi/test/test_adodbapi_dbapi20.py deleted file mode 100644 index 12c9e0b377e7c479bca0027ba6bdb883a9466d8e..0000000000000000000000000000000000000000 --- a/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/adodbapi/test/test_adodbapi_dbapi20.py +++ /dev/null @@ -1,200 +0,0 @@ -print("This module depends on the dbapi20 compliance tests created by Stuart Bishop") -print("(see db-sig mailing list history for info)") -import platform -import unittest -import sys - -import dbapi20 -import setuptestframework - -testfolder = setuptestframework.maketemp() -if "--package" in sys.argv: - pth = setuptestframework.makeadopackage(testfolder) - sys.argv.remove("--package") -else: - pth = setuptestframework.find_ado_path() -if pth not in sys.path: - sys.path.insert(1, pth) -# function to clean up the temporary folder -- calling program must run this function before exit. -cleanup = setuptestframework.getcleanupfunction() - -import adodbapi -import adodbapi.is64bit as is64bit - -db = adodbapi - -if "--verbose" in sys.argv: - db.adodbapi.verbose = 3 - -print(adodbapi.version) -print("Tested with dbapi20 %s" % dbapi20.__version__) - -try: - onWindows = bool(sys.getwindowsversion()) # seems to work on all versions of Python -except: - onWindows = False - -node = platform.node() - -conn_kws = {} -host = "testsql.2txt.us,1430" # if None, will use macro to fill in node name -instance = r"%s\SQLEXPRESS" -conn_kws["name"] = "adotest" - -conn_kws["user"] = "adotestuser" # None implies Windows security -conn_kws["password"] = "Sq1234567" -# macro definition for keyword "security" using macro "auto_security" -conn_kws["macro_auto_security"] = "security" - -if host is None: - conn_kws["macro_getnode"] = ["host", instance] -else: - conn_kws["host"] = host - -conn_kws[ - "provider" -] = "Provider=MSOLEDBSQL;DataTypeCompatibility=80;MARS Connection=True;" -connStr = "%(provider)s; %(security)s; Initial Catalog=%(name)s;Data Source=%(host)s" - -if onWindows and node != "z-PC": - pass # default should make a local SQL Server connection -elif node == "xxx": # try Postgres database - _computername = "25.223.161.222" - _databasename = "adotest" - _username = "adotestuser" - _password = "12345678" - _driver = "PostgreSQL Unicode" - _provider = "" - connStr = "%sDriver={%s};Server=%s;Database=%s;uid=%s;pwd=%s;" % ( - _provider, - _driver, - _computername, - _databasename, - _username, - _password, - ) -elif node == "yyy": # ACCESS data base is known to fail some tests. - if is64bit.Python(): - driver = "Microsoft.ACE.OLEDB.12.0" - else: - driver = "Microsoft.Jet.OLEDB.4.0" - testmdb = setuptestframework.makemdb(testfolder) - connStr = r"Provider=%s;Data Source=%s" % (driver, testmdb) -else: # try a remote connection to an SQL server - conn_kws["proxy_host"] = "25.44.77.176" - import adodbapi.remote - - db = adodbapi.remote - -print("Using Connection String like=%s" % connStr) -print("Keywords=%s" % repr(conn_kws)) - - -class test_adodbapi(dbapi20.DatabaseAPI20Test): - driver = db - connect_args = (connStr,) - connect_kw_args = conn_kws - - def __init__(self, arg): - dbapi20.DatabaseAPI20Test.__init__(self, arg) - - def getTestMethodName(self): - return self.id().split(".")[-1] - - def setUp(self): - # Call superclass setUp In case this does something in the - # future - dbapi20.DatabaseAPI20Test.setUp(self) - if self.getTestMethodName() == "test_callproc": - con = self._connect() - engine = con.dbms_name - ## print('Using database Engine=%s' % engine) ## - if engine != "MS Jet": - sql = """ - create procedure templower - @theData varchar(50) - as - select lower(@theData) - """ - else: # Jet - sql = """ - create procedure templower - (theData varchar(50)) - as - select lower(theData); - """ - cur = con.cursor() - try: - cur.execute(sql) - con.commit() - except: - pass - cur.close() - con.close() - self.lower_func = "templower" - - def tearDown(self): - if self.getTestMethodName() == "test_callproc": - con = self._connect() - cur = con.cursor() - try: - cur.execute("drop procedure templower") - except: - pass - con.commit() - dbapi20.DatabaseAPI20Test.tearDown(self) - - def help_nextset_setUp(self, cur): - "Should create a procedure called deleteme" - 'that returns two result sets, first the number of rows in booze then "name from booze"' - sql = """ - create procedure deleteme as - begin - select count(*) from %sbooze - select name from %sbooze - end - """ % ( - self.table_prefix, - self.table_prefix, - ) - cur.execute(sql) - - def help_nextset_tearDown(self, cur): - "If cleaning up is needed after nextSetTest" - try: - cur.execute("drop procedure deleteme") - except: - pass - - def test_nextset(self): - con = self._connect() - try: - cur = con.cursor() - - stmts = [self.ddl1] + self._populate() - for sql in stmts: - cur.execute(sql) - - self.help_nextset_setUp(cur) - - cur.callproc("deleteme") - numberofrows = cur.fetchone() - assert numberofrows[0] == 6 - assert cur.nextset() - names = cur.fetchall() - assert len(names) == len(self.samples) - s = cur.nextset() - assert s == None, "No more return sets, should return None" - finally: - try: - self.help_nextset_tearDown(cur) - finally: - con.close() - - def test_setoutputsize(self): - pass - - -if __name__ == "__main__": - unittest.main() - cleanup(testfolder, None) diff --git a/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/aiohttp/log.py b/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/aiohttp/log.py deleted file mode 100644 index 3cecea2bac185df741bccd0a32a5fef9cfe23299..0000000000000000000000000000000000000000 --- a/spaces/arxify/RVC-beta-v2-0618/runtime/Lib/site-packages/aiohttp/log.py +++ /dev/null @@ -1,8 +0,0 @@ -import logging - -access_logger = logging.getLogger("aiohttp.access") -client_logger = logging.getLogger("aiohttp.client") -internal_logger = logging.getLogger("aiohttp.internal") -server_logger = logging.getLogger("aiohttp.server") -web_logger = logging.getLogger("aiohttp.web") -ws_logger = logging.getLogger("aiohttp.websocket") diff --git a/spaces/aseuteurideu/audio_deepfake_detector/data/generate_dataset_to_tfrecord.py b/spaces/aseuteurideu/audio_deepfake_detector/data/generate_dataset_to_tfrecord.py deleted file mode 100644 index dfe07905cebfa505ac8e0a39bce810fd3d222ed8..0000000000000000000000000000000000000000 --- a/spaces/aseuteurideu/audio_deepfake_detector/data/generate_dataset_to_tfrecord.py +++ /dev/null @@ -1,178 +0,0 @@ -#Code outsourced from https://github.com/deepmind/dmvr/tree/master and later modified. - -"""Python script to generate TFRecords of SequenceExample from raw videos.""" - -import contextlib -import math -import os -import cv2 -from typing import Dict, Optional, Sequence -import moviepy.editor -from absl import app -from absl import flags -import ffmpeg -import numpy as np -import pandas as pd -import tensorflow as tf - -import warnings -warnings.filterwarnings('ignore') - -flags.DEFINE_string("csv_path", "fakeavceleb_1k.csv", "Input csv") -flags.DEFINE_string("output_path", "fakeavceleb_tfrec", "Tfrecords output path.") -flags.DEFINE_string("video_root_path", "./", - "Root directory containing the raw videos.") -flags.DEFINE_integer( - "num_shards", 4, "Number of shards to output, -1 means" - "it will automatically adapt to the sqrt(num_examples).") -flags.DEFINE_bool("decode_audio", False, "Whether or not to decode the audio") -flags.DEFINE_bool("shuffle_csv", False, "Whether or not to shuffle the csv.") -FLAGS = flags.FLAGS - - -_JPEG_HEADER = b"\xff\xd8" - - -@contextlib.contextmanager -def _close_on_exit(writers): - """Call close on all writers on exit.""" - try: - yield writers - finally: - for writer in writers: - writer.close() - - -def add_float_list(key: str, values: Sequence[float], - sequence: tf.train.SequenceExample): - sequence.feature_lists.feature_list[key].feature.add( - ).float_list.value[:] = values - - -def add_bytes_list(key: str, values: Sequence[bytes], - sequence: tf.train.SequenceExample): - sequence.feature_lists.feature_list[key].feature.add().bytes_list.value[:] = values - - -def add_int_list(key: str, values: Sequence[int], - sequence: tf.train.SequenceExample): - sequence.feature_lists.feature_list[key].feature.add().int64_list.value[:] = values - - -def set_context_int_list(key: str, value: Sequence[int], - sequence: tf.train.SequenceExample): - sequence.context.feature[key].int64_list.value[:] = value - - -def set_context_bytes(key: str, value: bytes, - sequence: tf.train.SequenceExample): - sequence.context.feature[key].bytes_list.value[:] = (value,) - -def set_context_bytes_list(key: str, value: Sequence[bytes], - sequence: tf.train.SequenceExample): - sequence.context.feature[key].bytes_list.value[:] = value - - -def set_context_float(key: str, value: float, - sequence: tf.train.SequenceExample): - sequence.context.feature[key].float_list.value[:] = (value,) - - -def set_context_int(key: str, value: int, sequence: tf.train.SequenceExample): - sequence.context.feature[key].int64_list.value[:] = (value,) - - -def extract_frames(video_path, fps = 10, min_resize = 256): - '''Load n number of frames from a video''' - v_cap = cv2.VideoCapture(video_path) - v_len = int(v_cap.get(cv2.CAP_PROP_FRAME_COUNT)) - - if fps is None: - sample = np.arange(0, v_len) - else: - sample = np.linspace(0, v_len - 1, fps).astype(int) - - frames = [] - for j in range(v_len): - success = v_cap.grab() - if j in sample: - success, frame = v_cap.retrieve() - if not success: - continue - - frame = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) - frame = cv2.resize(frame, (min_resize, min_resize)) - frames.append(frame) - - v_cap.release() - frame_np = np.stack(frames) - return frame_np.tobytes() - -def extract_audio(video_path: str, - sampling_rate: int = 16_000): - """Extract raw mono audio float list from video_path with ffmpeg.""" - video = moviepy.editor.VideoFileClip(video_path) - audio = video.audio.to_soundarray() - #Load first channel. - audio = audio[:, 0] - - return np.array(audio) - -#Each of the features can be coerced into a tf.train.Example-compatible type using one of the _bytes_feature, _float_feature and the _int64_feature. -#You can then create a tf.train.Example message from these encoded features. - -def serialize_example(video_path: str, label_name: str, label_map: Optional[Dict[str, int]] = None): - # Initiate the sequence example. - seq_example = tf.train.SequenceExample() - - imgs_encoded = extract_frames(video_path, fps = 10) - - audio = extract_audio(video_path) - - set_context_bytes(f'image/encoded', imgs_encoded, seq_example) - set_context_bytes("video_path", video_path.encode(), seq_example) - set_context_bytes("WAVEFORM/feature/floats", audio.tobytes(), seq_example) - set_context_int("clip/label/index", label_map[label_name], seq_example) - set_context_bytes("clip/label/text", label_name.encode(), seq_example) - return seq_example - - -def main(argv): - del argv - # reads the input csv. - input_csv = pd.read_csv(FLAGS.csv_path) - if FLAGS.num_shards == -1: - num_shards = int(math.sqrt(len(input_csv))) - else: - num_shards = FLAGS.num_shards - # Set up the TFRecordWriters. - basename = os.path.splitext(os.path.basename(FLAGS.csv_path))[0] - shard_names = [ - os.path.join(FLAGS.output_path, f"{basename}-{i:05d}-of-{num_shards:05d}") - for i in range(num_shards) - ] - writers = [tf.io.TFRecordWriter(shard_name) for shard_name in shard_names] - - if "label" in input_csv: - unique_labels = list(set(input_csv["label"].values)) - l_map = {unique_labels[i]: i for i in range(len(unique_labels))} - else: - l_map = None - - if FLAGS.shuffle_csv: - input_csv = input_csv.sample(frac=1) - with _close_on_exit(writers) as writers: - row_count = 0 - for row in input_csv.itertuples(): - index = row[0] - v = row[1] - if os.name == 'posix': - v = v.str.replace('\\', '/') - l = row[2] - row_count += 1 - print("Processing example %d of %d (%d%%) \r" %(row_count, len(input_csv), row_count * 100 / len(input_csv)), end="") - seq_ex = serialize_example(video_path = v, label_name = l,label_map = l_map) - writers[index % len(writers)].write(seq_ex.SerializeToString()) - -if __name__ == "__main__": - app.run(main) diff --git a/spaces/ashercn97/AsherTesting/extensions/multimodal/README.md b/spaces/ashercn97/AsherTesting/extensions/multimodal/README.md deleted file mode 100644 index 10bbc7f5db1afd082674d581221f73851b59aec3..0000000000000000000000000000000000000000 --- a/spaces/ashercn97/AsherTesting/extensions/multimodal/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# Multimodal - -## Description - -Adds support for multimodality (text+images) to text-generation-webui. - -https://user-images.githubusercontent.com/3718215/233817203-69b57e77-0c55-4fd6-b742-3204bb13b8fc.mp4 - -## Usage - -To run this extension, download a LLM that supports multimodality, and then start server.py with the appropriate `--multimodal-pipeline` argument. Examples: - -``` -python server.py --model wojtab_llava-7b-v0-4bit-128g --multimodal-pipeline llava-7b --chat -python3 server.py --model wojtab_llava-13b-v0-4bit-128g --multimodal-pipeline llava-13b --chat -python server.py --model anon8231489123_vicuna-13b-GPTQ-4bit-128g --multimodal-pipeline minigpt4-13b --chat -python server.py --model llama-7b-4bit --multimodal-pipeline minigpt4-7b --chat -``` - -There is built-in support for LLaVA-v0-13B and LLaVA-v0-7b. To install `minigpt4`: - -- clone https://github.com/Wojtab/minigpt-4-pipeline into `extensions/multimodal/pipelines` -- install the requirements.txt - -The same procedure should be used to install other pipelines, which can then be used with `--multimodal-pipeline [pipeline name]`. For additional multimodal pipelines refer to the compatibility section below. - -Do note, that each image takes up a considerable amount of tokens, so adjust `max_new_tokens` to be at most 1700 (recommended value is between 200 to 500), so the images don't get truncated. - -To send an image, just upload it to the extension field below chat, and send a prompt as always. The image will be added to the end of your message. If you wish to modify the placement, include a string `` in your prompt. - -Additionally, there is *Embed all images, not only the last one* checkbox. It modifies the image embeddings, by default (if it's unchecked), all but the most recent images have their embeddings empty, so they are not fed to the network. It seems as if some multimodal networks consider the features in all images at the same time as if they were a single image. Due to this behavior, by default, the extension skips previous images. However, it can lead to sub-par generation on other pipelines. If you want to include all images, just tick this checkbox. - -## Compatibility -As of now, the following multimodal pipelines are supported: -|Pipeline|`--multimodal-pipeline`|Default LLM|LLM info(for the linked model)|Pipeline repository| -|-|-|-|-|-| -|[LLaVA 13B](https://github.com/haotian-liu/LLaVA)|`llava-13b`|[LLaVA 13B](https://huggingface.co/wojtab/llava-13b-v0-4bit-128g)|GPTQ 4-bit quant, old CUDA|built-in| -|[LLaVA 7B](https://github.com/haotian-liu/LLaVA)|`llava-7b`|[LLaVA 7B](https://huggingface.co/wojtab/llava-7b-v0-4bit-128g)|GPTQ 4-bit quant, old CUDA|built-in| -|[MiniGPT-4 7B](https://github.com/Vision-CAIR/MiniGPT-4)|`minigpt4-7b`|[Vicuna v0 7B](https://huggingface.co/TheBloke/vicuna-7B-GPTQ-4bit-128g)|GPTQ 4-bit quant, new format|[Wojtab/minigpt-4-pipeline](https://github.com/Wojtab/minigpt-4-pipeline)| -|[MiniGPT-4 13B](https://github.com/Vision-CAIR/MiniGPT-4)|`minigpt4-13b`|[Vicuna v0 13B](https://huggingface.co/anon8231489123/vicuna-13b-GPTQ-4bit-128g)|GPTQ 4-bit quant, old CUDA|[Wojtab/minigpt-4-pipeline](https://github.com/Wojtab/minigpt-4-pipeline)| -|[InstructBLIP 7B](https://github.com/salesforce/LAVIS/tree/main/projects/instructblip)|`instructblip-7b`|[Vicuna v1.1 7B](https://huggingface.co/TheBloke/vicuna-7B-1.1-GPTQ-4bit-128g)|GPTQ 4-bit quant|[kjerk/instructblip-pipeline](https://github.com/kjerk/instructblip-pipeline)| -|[InstructBLIP 13B](https://github.com/salesforce/LAVIS/tree/main/projects/instructblip)|`instructblip-13b`|[Vicuna v1.1 13B](https://huggingface.co/TheBloke/vicuna-13B-1.1-GPTQ-4bit-128g)|GPTQ 4-bit quant|[kjerk/instructblip-pipeline](https://github.com/kjerk/instructblip-pipeline)| - -Some pipelines could support different LLMs but do note that while it might work, it isn't a supported configuration. - -DO NOT report bugs if you are using a different LLM. - -DO NOT report bugs with pipelines in this repository (unless they are built-in) - -## Extension config -This extension uses the following parameters (from `settings.json`): -|Parameter|Description| -|---------|-----------| -|`multimodal-vision_bits`|Number of bits to load vision models (CLIP/ViT) feature extractor in (most pipelines should support either 32 or 16, default=32)| -|`multimodal-vision_device`|Torch device to run the feature extractor on, for example, `cpu` or `cuda:0`, by default `cuda:0` if available| -|`multimodal-projector_bits`|Number of bits to load feature projector model(s) in (most pipelines should support either 32 or 16, default=32)| -|`multimodal-projector_device`|Torch device to run the feature projector model(s) on, for example `cpu` or `cuda:0`, by default `cuda:0` if available| -|`multimodal-add_all_images_to_prompt`|Default value of "Embed all images, not only the last one" checkbox| - -## Usage through API - -You can run the multimodal inference through API, by inputting the images to prompt. Images are embedded like so: `f''`, where `img_str` is base-64 jpeg data. Note that you will need to launch `server.py` with the arguments `--api --extensions multimodal`. - -Python example: - -```Python -import base64 -import requests - -CONTEXT = "You are LLaVA, a large language and vision assistant trained by UW Madison WAIV Lab. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language. Follow the instructions carefully and explain your answers in detail.### Human: Hi!### Assistant: Hi there! How can I help you today?\n" - -with open('extreme_ironing.jpg', 'rb') as f: - img_str = base64.b64encode(f.read()).decode('utf-8') - prompt = CONTEXT + f'### Human: What is unusual about this image: \n### Assistant: ' - print(requests.post('http://127.0.0.1:5000/api/v1/generate', json={'prompt': prompt, 'stopping_strings': ['\n###']}).json()) -``` -script output: -```Python -{'results': [{'text': "The unusual aspect of this image is that a man is standing on top of a yellow minivan while doing his laundry. He has set up a makeshift clothes line using the car's rooftop as an outdoor drying area. This scene is uncommon because people typically do their laundry indoors, in a dedicated space like a laundromat or a room in their home, rather than on top of a moving vehicle. Additionally, hanging clothes on the car could be potentially hazardous or illegal in some jurisdictions due to the risk of damaging the vehicle or causing accidents on the road.\n##"}]} -``` - -## For pipeline developers/technical description -see [DOCS.md](https://github.com/oobabooga/text-generation-webui/blob/main/extensions/multimodal/DOCS.md) diff --git a/spaces/auto-academic/auto-draft/latex_templates/Default/template.tex b/spaces/auto-academic/auto-draft/latex_templates/Default/template.tex deleted file mode 100644 index 24b9f3cb05f415a1b328cf7db2f0af7dc304d365..0000000000000000000000000000000000000000 --- a/spaces/auto-academic/auto-draft/latex_templates/Default/template.tex +++ /dev/null @@ -1,45 +0,0 @@ -\documentclass{article} % For LaTeX2e -\UseRawInputEncoding -\usepackage{graphicx} -\usepackage{booktabs} -\usepackage{times} -\usepackage{eso-pic} % used by \AddToShipoutPicture -\RequirePackage{fancyhdr} -\RequirePackage{natbib} -\usepackage{fullpage} - -\input{math_commands.tex} -\usepackage{hyperref} -\usepackage{url} -\usepackage{algorithm} -\usepackage{algpseudocode} - -\newlength\tindent -\setlength{\tindent}{\parindent} -\setlength{\parindent}{0pt} -\renewcommand{\indent}{\hspace*{\tindent}} - -\title{TITLE} -\author{GPT-4} - -\newcommand{\fix}{\marginpar{FIX}} -\newcommand{\new}{\marginpar{NEW}} - -\begin{document} -\maketitle -\input{abstract.tex} -\input{introduction.tex} -\input{related works.tex} -\input{backgrounds.tex} -\input{methodology.tex} -\input{experiments.tex} -\input{conclusion.tex} - -\bibliography{ref} -\bibliographystyle{dinat} - -%\appendix -%\section{Appendix} -%You may include other additional sections here. - -\end{document} diff --git a/spaces/awaawawawa/iurf7irfuyytruyyugb/ldmlib/modules/losses/contperceptual.py b/spaces/awaawawawa/iurf7irfuyytruyyugb/ldmlib/modules/losses/contperceptual.py deleted file mode 100644 index 8150b9585b2cf892a088860e9dfc5cd6c9060ff4..0000000000000000000000000000000000000000 --- a/spaces/awaawawawa/iurf7irfuyytruyyugb/ldmlib/modules/losses/contperceptual.py +++ /dev/null @@ -1,110 +0,0 @@ -import torch -import torch.nn as nn - -from taming.modules.losses.vqperceptual import * # TODO: taming dependency yes/no? - - -class LPIPSWithDiscriminator(nn.Module): - def __init__(self, disc_start, logvar_init=0.0, kl_weight=1.0, pixelloss_weight=1.0, - disc_num_layers=3, disc_in_channels=3, disc_factor=1.0, disc_weight=1.0, - perceptual_weight=1.0, use_actnorm=False, disc_conditional=False, - disc_loss="hinge"): - - super().__init__() - assert disc_loss in ["hinge", "vanilla"] - self.kl_weight = kl_weight - self.pixel_weight = pixelloss_weight - self.perceptual_loss = LPIPS().eval() - self.perceptual_weight = perceptual_weight - # output log variance - self.logvar = nn.Parameter(torch.ones(size=()) * logvar_init) - - self.discriminator = NLayerDiscriminator(input_nc=disc_in_channels, - n_layers=disc_num_layers, - use_actnorm=use_actnorm - ).apply(weights_init) - self.discriminator_iter_start = disc_start - self.disc_loss = hinge_d_loss if disc_loss == "hinge" else vanilla_d_loss - self.disc_factor = disc_factor - self.discriminator_weight = disc_weight - self.disc_conditional = disc_conditional - - def calculate_adaptive_weight(self, nll_loss, g_loss, last_layer=None): - if last_layer is not None: - nll_grads = torch.autograd.grad(nll_loss, last_layer, retain_graph=True)[0] - g_grads = torch.autograd.grad(g_loss, last_layer, retain_graph=True)[0] - else: - nll_grads = torch.autograd.grad(nll_loss, self.last_layer[0], retain_graph=True)[0] - g_grads = torch.autograd.grad(g_loss, self.last_layer[0], retain_graph=True)[0] - - d_weight = torch.norm(nll_grads) / (torch.norm(g_grads) + 1e-4) - d_weight = torch.clamp(d_weight, 0.0, 1e4).detach() - d_weight = d_weight * self.discriminator_weight - return d_weight - - def forward(self, inputs, reconstructions, posteriors, optimizer_idx, - global_step, last_layer=None, cond=None, split="train", - weights=None): - rec_loss = torch.abs(inputs.contiguous() - reconstructions.contiguous()) - if self.perceptual_weight > 0: - p_loss = self.perceptual_loss(inputs.contiguous(), reconstructions.contiguous()) - rec_loss = rec_loss + self.perceptual_weight * p_loss - - nll_loss = rec_loss / torch.exp(self.logvar) + self.logvar - weighted_nll_loss = nll_loss - if weights is not None: - weighted_nll_loss = weights*nll_loss - weighted_nll_loss = torch.sum(weighted_nll_loss) / weighted_nll_loss.shape[0] - nll_loss = torch.sum(nll_loss) / nll_loss.shape[0] - kl_loss = posteriors.kl() - kl_loss = torch.sum(kl_loss) / kl_loss.shape[0] - - # now the GAN part - if optimizer_idx == 0: - # generator update - if cond is None: - assert not self.disc_conditional - logits_fake = self.discriminator(reconstructions.contiguous()) - else: - assert self.disc_conditional - logits_fake = self.discriminator(torch.cat((reconstructions.contiguous(), cond), dim=1)) - g_loss = -torch.mean(logits_fake) - - if self.disc_factor > 0.0: - try: - d_weight = self.calculate_adaptive_weight(nll_loss, g_loss, last_layer=last_layer) - except RuntimeError: - assert not self.training - d_weight = torch.tensor(0.0) - else: - d_weight = torch.tensor(0.0) - - disc_factor = adopt_weight(self.disc_factor, global_step, threshold=self.discriminator_iter_start) - loss = weighted_nll_loss + self.kl_weight * kl_loss + d_weight * disc_factor * g_loss - - log = {"{}/total_loss".format(split): loss.clone().detach().mean(), "{}/logvar".format(split): self.logvar.detach(), - "{}/kl_loss".format(split): kl_loss.detach().mean(), "{}/nll_loss".format(split): nll_loss.detach().mean(), - "{}/rec_loss".format(split): rec_loss.detach().mean(), - "{}/d_weight".format(split): d_weight.detach(), - "{}/disc_factor".format(split): torch.tensor(disc_factor), - "{}/g_loss".format(split): g_loss.detach().mean(), - } - return loss, log - - if optimizer_idx == 1: - # second pass for discriminator update - if cond is None: - logits_real = self.discriminator(inputs.contiguous().detach()) - logits_fake = self.discriminator(reconstructions.contiguous().detach()) - else: - logits_real = self.discriminator(torch.cat((inputs.contiguous().detach(), cond), dim=1)) - logits_fake = self.discriminator(torch.cat((reconstructions.contiguous().detach(), cond), dim=1)) - - disc_factor = adopt_weight(self.disc_factor, global_step, threshold=self.discriminator_iter_start) - d_loss = disc_factor * self.disc_loss(logits_real, logits_fake) - - log = {"{}/disc_loss".format(split): d_loss.clone().detach().mean(), - "{}/logits_real".format(split): logits_real.detach().mean(), - "{}/logits_fake".format(split): logits_fake.detach().mean() - } - return d_loss, log diff --git a/spaces/awacke1/GPU-Memory-Detector-HTML5/README.md b/spaces/awacke1/GPU-Memory-Detector-HTML5/README.md deleted file mode 100644 index 4e91d66c8ef5981cba25ea42fbe038e02de14f85..0000000000000000000000000000000000000000 --- a/spaces/awacke1/GPU-Memory-Detector-HTML5/README.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: GPU Memory Detector HTML5 -emoji: 💻GPU -colorFrom: green -colorTo: blue -sdk: static -pinned: false -license: mit ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/awacke1/Generative-AI-Writers-Dashboard/README.md b/spaces/awacke1/Generative-AI-Writers-Dashboard/README.md deleted file mode 100644 index fa294a156c731b6d84b0f4688618ad1af28011d1..0000000000000000000000000000000000000000 --- a/spaces/awacke1/Generative-AI-Writers-Dashboard/README.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: AIMIO-ChatGPT-Letter-Generative-AI -emoji: ⚕️AIMIO👩‍⚕️ -colorFrom: gray -colorTo: red -sdk: static -pinned: false -license: mit ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/awacke1/Health-Condition-Actions-For-Health-and-Savings/backupapp.py b/spaces/awacke1/Health-Condition-Actions-For-Health-and-Savings/backupapp.py deleted file mode 100644 index a6855f83aa50c2b8eebe79a53c05ae137cbef8c5..0000000000000000000000000000000000000000 --- a/spaces/awacke1/Health-Condition-Actions-For-Health-and-Savings/backupapp.py +++ /dev/null @@ -1,63 +0,0 @@ -import streamlit as st -import pandas as pd -import random -import plotly.graph_objects as go -import plotly.express as px - -def health_game(): - # Define the states and conditions of interest - states = ["Minnesota", "Florida", "California"] - top_n = 10 - - # Define the list dictionary of top 10 health conditions descending by cost, with emojis, treatment recommendation and potential savings - health_conditions = [ - {"condition": "💔 Heart disease", "emoji": "💗", "spending": 214.3, "treatment": "Regular checkups with a cardiologist", "savings": "$1000"}, - {"condition": "🤕 Trauma-related disorders", "emoji": "🚑", "spending": 198.6, "treatment": "Counseling and physical therapy", "savings": "$500"}, - {"condition": "🦀 Cancer", "emoji": "🎗️", "spending": 171.0, "treatment": "Early detection and treatment", "savings": "$2000"}, - {"condition": "🧠 Mental disorders", "emoji": "🧘", "spending": 150.8, "treatment": "Therapy and medication", "savings": "$1500"}, - {"condition": "🦴 Osteoarthritis and joint disorders", "emoji": "🏥", "spending": 142.4, "treatment": "Low-impact exercise and physical therapy", "savings": "$800"}, - {"condition": "💉 Diabetes", "emoji": "🩸", "spending": 107.4, "treatment": "Regular checkups and medication", "savings": "$1200"}, - {"condition": "🫁 Chronic obstructive pulmonary disease and asthma", "emoji": "🫀", "spending": 91.0, "treatment": "Inhalers and breathing exercises", "savings": "$600"}, - {"condition": "🩺 Hypertension", "emoji": "💉", "spending": 83.9, "treatment": "Lifestyle changes and medication", "savings": "$900"}, - {"condition": "🔬 Hyperlipidemia", "emoji": "🔬", "spending": 83.9, "treatment": "Lifestyle changes and medication", "savings": "$700"}, - {"condition": "🦴 Back problems", "emoji": "🧍", "spending": 67.0, "treatment": "Physical therapy and exercise", "savings": "$400"} - ] - - # Create a DataFrame from the list dictionary - df_top_conditions = pd.DataFrame(health_conditions) - - # Calculate the total spending - total_spending = round(df_top_conditions["spending"].sum(), 1) - - # Define the roll function - def roll(): - rolls = [random.randint(1, 10) for _ in range(1000)] - frequencies = [rolls.count(i) for i in range(1, 11)] - return frequencies - - # Define the sunburst chart - fig_sunburst = go.Figure(go.Sunburst( - labels=df_top_conditions["emoji"] + " " + df_top_conditions["condition"], - parents=[""] * top_n, - values=df_top_conditions["spending"], - maxdepth=2 - )) - - # Customize the layout of the sunburst chart - - fig_sunburst.update_layout(title=f"Top {top_n} Health Conditions in {', '.join(states)} by Spending (Total: ${total_spending}B)") - - # Display the sunburst chart and variants per condition in the Streamlit app - st.plotly_chart(fig_sunburst) - condition_idx = st.selectbox("Select your current health condition", df_top_conditions.index) - row = df_top_conditions.loc[condition_idx] - - st.write(f"Based on the severity of your {row['condition']}, we recommend {row['treatment']} for early treatment. This could save you up to {row['savings']} in healthcare costs.") - - frequencies = roll() - fig_bar = px.bar(x=[f"Variant {i}" for i in range(1, 11)], y=frequencies[:10], labels={'x': 'Variant', 'y': 'Frequency'}) - fig_bar.update_layout(title=f"Variants of {row['condition']} ({row['emoji']})") - st.plotly_chart(fig_bar) - - -health_game() \ No newline at end of file diff --git a/spaces/awacke1/TopTenAIGeneratedSolutionsAnyoneCouldUse/app.py b/spaces/awacke1/TopTenAIGeneratedSolutionsAnyoneCouldUse/app.py deleted file mode 100644 index 72ef129e83627e5b4655e79a93b55aabb0912d56..0000000000000000000000000000000000000000 --- a/spaces/awacke1/TopTenAIGeneratedSolutionsAnyoneCouldUse/app.py +++ /dev/null @@ -1,68 +0,0 @@ -import streamlit as st -import torch -from transformers import GPT2Tokenizer, GPT2LMHeadModel - -# Load the GPT2 tokenizer and model -tokenizer = GPT2Tokenizer.from_pretrained('gpt2') -model = GPT2LMHeadModel.from_pretrained('gpt2') - -# Set the maximum length of the generated prompt -max_length = 50 - -# Define the prompts -prompts = [ - "Difficulty sleeping: ", - "Time management: ", - "Stress management: ", - "Healthy eating: ", - "Exercise: ", - "Financial planning: ", - "Communication skills: ", - "Career development: ", - "Relationship issues: ", - "Self-improvement: " -] - -# Define the solutions -solutions = [ - "Try keeping a consistent sleep schedule and avoid caffeine before bedtime.", - "Use a planner or time-tracking app to prioritize tasks and stay on schedule.", - "Practice mindfulness techniques such as deep breathing or meditation.", - "Incorporate more fruits and vegetables into your diet and limit processed foods.", - "Aim for at least 30 minutes of moderate physical activity daily.", - "Create a budget and track expenses to avoid overspending.", - "Practice active listening and express yourself clearly and assertively.", - "Set clear goals and seek feedback and professional development opportunities.", - "Practice empathy and active communication with your partner or seek professional counseling.", - "Read self-help books, learn new skills or hobbies, and practice self-reflection." -] - -# Define the function to generate the prompts -def generate_prompt(prompt): - # Generate the prompt text - prompt_text = prompt + tokenizer.eos_token - # Encode the prompt text - encoded_prompt = tokenizer.encode(prompt_text, return_tensors='pt') - # Generate the prompt output - output = model.generate(encoded_prompt, max_length=max_length, num_return_sequences=1, no_repeat_ngram_size=2, early_stopping=True) - # Decode the prompt output - output_text = tokenizer.decode(output[0], skip_special_tokens=True) - # Return the generated prompt - return output_text - -# Define the streamlit app -def app(): - # Set the app title - st.title('Prompt Generator') - # Get the user input - option = st.selectbox('Select a prompt:', prompts) - # Generate the prompt - prompt = generate_prompt(option) - # Display the prompt - st.write('Prompt:', option + prompt) - # Display the solution - st.write('Solution:', solutions[prompts.index(option)]) - -# Run the streamlit app -if __name__ == '__main__': - app() diff --git a/spaces/azusarang/so-vits-svc-models-ba_P/vencoder/hubert/hubert_model.py b/spaces/azusarang/so-vits-svc-models-ba_P/vencoder/hubert/hubert_model.py deleted file mode 100644 index 7fb642d89b07ca60792debab18e3454f52d8f357..0000000000000000000000000000000000000000 --- a/spaces/azusarang/so-vits-svc-models-ba_P/vencoder/hubert/hubert_model.py +++ /dev/null @@ -1,222 +0,0 @@ -import copy -import random -from typing import Optional, Tuple - -import torch -import torch.nn as nn -import torch.nn.functional as t_func -from torch.nn.modules.utils import consume_prefix_in_state_dict_if_present - - -class Hubert(nn.Module): - def __init__(self, num_label_embeddings: int = 100, mask: bool = True): - super().__init__() - self._mask = mask - self.feature_extractor = FeatureExtractor() - self.feature_projection = FeatureProjection() - self.positional_embedding = PositionalConvEmbedding() - self.norm = nn.LayerNorm(768) - self.dropout = nn.Dropout(0.1) - self.encoder = TransformerEncoder( - nn.TransformerEncoderLayer( - 768, 12, 3072, activation="gelu", batch_first=True - ), - 12, - ) - self.proj = nn.Linear(768, 256) - - self.masked_spec_embed = nn.Parameter(torch.FloatTensor(768).uniform_()) - self.label_embedding = nn.Embedding(num_label_embeddings, 256) - - def mask(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: - mask = None - if self.training and self._mask: - mask = _compute_mask((x.size(0), x.size(1)), 0.8, 10, x.device, 2) - x[mask] = self.masked_spec_embed.to(x.dtype) - return x, mask - - def encode( - self, x: torch.Tensor, layer: Optional[int] = None - ) -> Tuple[torch.Tensor, torch.Tensor]: - x = self.feature_extractor(x) - x = self.feature_projection(x.transpose(1, 2)) - x, mask = self.mask(x) - x = x + self.positional_embedding(x) - x = self.dropout(self.norm(x)) - x = self.encoder(x, output_layer=layer) - return x, mask - - def logits(self, x: torch.Tensor) -> torch.Tensor: - logits = torch.cosine_similarity( - x.unsqueeze(2), - self.label_embedding.weight.unsqueeze(0).unsqueeze(0), - dim=-1, - ) - return logits / 0.1 - - def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: - x, mask = self.encode(x) - x = self.proj(x) - logits = self.logits(x) - return logits, mask - - -class HubertSoft(Hubert): - def __init__(self): - super().__init__() - - @torch.inference_mode() - def units(self, wav: torch.Tensor) -> torch.Tensor: - wav = t_func.pad(wav, ((400 - 320) // 2, (400 - 320) // 2)) - x, _ = self.encode(wav) - return self.proj(x) - - -class FeatureExtractor(nn.Module): - def __init__(self): - super().__init__() - self.conv0 = nn.Conv1d(1, 512, 10, 5, bias=False) - self.norm0 = nn.GroupNorm(512, 512) - self.conv1 = nn.Conv1d(512, 512, 3, 2, bias=False) - self.conv2 = nn.Conv1d(512, 512, 3, 2, bias=False) - self.conv3 = nn.Conv1d(512, 512, 3, 2, bias=False) - self.conv4 = nn.Conv1d(512, 512, 3, 2, bias=False) - self.conv5 = nn.Conv1d(512, 512, 2, 2, bias=False) - self.conv6 = nn.Conv1d(512, 512, 2, 2, bias=False) - - def forward(self, x: torch.Tensor) -> torch.Tensor: - x = t_func.gelu(self.norm0(self.conv0(x))) - x = t_func.gelu(self.conv1(x)) - x = t_func.gelu(self.conv2(x)) - x = t_func.gelu(self.conv3(x)) - x = t_func.gelu(self.conv4(x)) - x = t_func.gelu(self.conv5(x)) - x = t_func.gelu(self.conv6(x)) - return x - - -class FeatureProjection(nn.Module): - def __init__(self): - super().__init__() - self.norm = nn.LayerNorm(512) - self.projection = nn.Linear(512, 768) - self.dropout = nn.Dropout(0.1) - - def forward(self, x: torch.Tensor) -> torch.Tensor: - x = self.norm(x) - x = self.projection(x) - x = self.dropout(x) - return x - - -class PositionalConvEmbedding(nn.Module): - def __init__(self): - super().__init__() - self.conv = nn.Conv1d( - 768, - 768, - kernel_size=128, - padding=128 // 2, - groups=16, - ) - self.conv = nn.utils.weight_norm(self.conv, name="weight", dim=2) - - def forward(self, x: torch.Tensor) -> torch.Tensor: - x = self.conv(x.transpose(1, 2)) - x = t_func.gelu(x[:, :, :-1]) - return x.transpose(1, 2) - - -class TransformerEncoder(nn.Module): - def __init__( - self, encoder_layer: nn.TransformerEncoderLayer, num_layers: int - ) -> None: - super(TransformerEncoder, self).__init__() - self.layers = nn.ModuleList( - [copy.deepcopy(encoder_layer) for _ in range(num_layers)] - ) - self.num_layers = num_layers - - def forward( - self, - src: torch.Tensor, - mask: torch.Tensor = None, - src_key_padding_mask: torch.Tensor = None, - output_layer: Optional[int] = None, - ) -> torch.Tensor: - output = src - for layer in self.layers[:output_layer]: - output = layer( - output, src_mask=mask, src_key_padding_mask=src_key_padding_mask - ) - return output - - -def _compute_mask( - shape: Tuple[int, int], - mask_prob: float, - mask_length: int, - device: torch.device, - min_masks: int = 0, -) -> torch.Tensor: - batch_size, sequence_length = shape - - if mask_length < 1: - raise ValueError("`mask_length` has to be bigger than 0.") - - if mask_length > sequence_length: - raise ValueError( - f"`mask_length` has to be smaller than `sequence_length`, but got `mask_length`: {mask_length} and `sequence_length`: {sequence_length}`" - ) - - # compute number of masked spans in batch - num_masked_spans = int(mask_prob * sequence_length / mask_length + random.random()) - num_masked_spans = max(num_masked_spans, min_masks) - - # make sure num masked indices <= sequence_length - if num_masked_spans * mask_length > sequence_length: - num_masked_spans = sequence_length // mask_length - - # SpecAugment mask to fill - mask = torch.zeros((batch_size, sequence_length), device=device, dtype=torch.bool) - - # uniform distribution to sample from, make sure that offset samples are < sequence_length - uniform_dist = torch.ones( - (batch_size, sequence_length - (mask_length - 1)), device=device - ) - - # get random indices to mask - mask_indices = torch.multinomial(uniform_dist, num_masked_spans) - - # expand masked indices to masked spans - mask_indices = ( - mask_indices.unsqueeze(dim=-1) - .expand((batch_size, num_masked_spans, mask_length)) - .reshape(batch_size, num_masked_spans * mask_length) - ) - offsets = ( - torch.arange(mask_length, device=device)[None, None, :] - .expand((batch_size, num_masked_spans, mask_length)) - .reshape(batch_size, num_masked_spans * mask_length) - ) - mask_idxs = mask_indices + offsets - - # scatter indices to mask - mask = mask.scatter(1, mask_idxs, True) - - return mask - - -def hubert_soft( - path: str, -) -> HubertSoft: - r"""HuBERT-Soft from `"A Comparison of Discrete and Soft Speech Units for Improved Voice Conversion"`. - Args: - path (str): path of a pretrained model - """ - hubert = HubertSoft() - checkpoint = torch.load(path) - consume_prefix_in_state_dict_if_present(checkpoint, "module.") - hubert.load_state_dict(checkpoint) - hubert.eval() - return hubert diff --git a/spaces/banana-projects/web3d/node_modules/three/examples/js/controls/OrbitControls.js b/spaces/banana-projects/web3d/node_modules/three/examples/js/controls/OrbitControls.js deleted file mode 100644 index 87841da4fbd10fa5a7daea1e085a815a9e9873b3..0000000000000000000000000000000000000000 --- a/spaces/banana-projects/web3d/node_modules/three/examples/js/controls/OrbitControls.js +++ /dev/null @@ -1,1070 +0,0 @@ -/** - * @author qiao / https://github.com/qiao - * @author mrdoob / http://mrdoob.com - * @author alteredq / http://alteredqualia.com/ - * @author WestLangley / http://github.com/WestLangley - * @author erich666 / http://erichaines.com - */ - -// This set of controls performs orbiting, dollying (zooming), and panning. -// Unlike TrackballControls, it maintains the "up" direction object.up (+Y by default). -// -// Orbit - left mouse / touch: one-finger move -// Zoom - middle mouse, or mousewheel / touch: two-finger spread or squish -// Pan - right mouse, or left mouse + ctrl/meta/shiftKey, or arrow keys / touch: two-finger move - -THREE.OrbitControls = function ( object, domElement ) { - - this.object = object; - - this.domElement = ( domElement !== undefined ) ? domElement : document; - - // Set to false to disable this control - this.enabled = true; - - // "target" sets the location of focus, where the object orbits around - this.target = new THREE.Vector3(); - - // How far you can dolly in and out ( PerspectiveCamera only ) - this.minDistance = 0; - this.maxDistance = Infinity; - - // How far you can zoom in and out ( OrthographicCamera only ) - this.minZoom = 0; - this.maxZoom = Infinity; - - // How far you can orbit vertically, upper and lower limits. - // Range is 0 to Math.PI radians. - this.minPolarAngle = 0; // radians - this.maxPolarAngle = Math.PI; // radians - - // How far you can orbit horizontally, upper and lower limits. - // If set, must be a sub-interval of the interval [ - Math.PI, Math.PI ]. - this.minAzimuthAngle = - Infinity; // radians - this.maxAzimuthAngle = Infinity; // radians - - // Set to true to enable damping (inertia) - // If damping is enabled, you must call controls.update() in your animation loop - this.enableDamping = false; - this.dampingFactor = 0.25; - - // This option actually enables dollying in and out; left as "zoom" for backwards compatibility. - // Set to false to disable zooming - this.enableZoom = true; - this.zoomSpeed = 1.0; - - // Set to false to disable rotating - this.enableRotate = true; - this.rotateSpeed = 1.0; - - // Set to false to disable panning - this.enablePan = true; - this.panSpeed = 1.0; - this.screenSpacePanning = false; // if true, pan in screen-space - this.keyPanSpeed = 7.0; // pixels moved per arrow key push - - // Set to true to automatically rotate around the target - // If auto-rotate is enabled, you must call controls.update() in your animation loop - this.autoRotate = false; - this.autoRotateSpeed = 2.0; // 30 seconds per round when fps is 60 - - // Set to false to disable use of the keys - this.enableKeys = true; - - // The four arrow keys - this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }; - - // Mouse buttons - this.mouseButtons = { LEFT: THREE.MOUSE.LEFT, MIDDLE: THREE.MOUSE.MIDDLE, RIGHT: THREE.MOUSE.RIGHT }; - - // for reset - this.target0 = this.target.clone(); - this.position0 = this.object.position.clone(); - this.zoom0 = this.object.zoom; - - // - // public methods - // - - this.getPolarAngle = function () { - - return spherical.phi; - - }; - - this.getAzimuthalAngle = function () { - - return spherical.theta; - - }; - - this.saveState = function () { - - scope.target0.copy( scope.target ); - scope.position0.copy( scope.object.position ); - scope.zoom0 = scope.object.zoom; - - }; - - this.reset = function () { - - scope.target.copy( scope.target0 ); - scope.object.position.copy( scope.position0 ); - scope.object.zoom = scope.zoom0; - - scope.object.updateProjectionMatrix(); - scope.dispatchEvent( changeEvent ); - - scope.update(); - - state = STATE.NONE; - - }; - - // this method is exposed, but perhaps it would be better if we can make it private... - this.update = function () { - - var offset = new THREE.Vector3(); - - // so camera.up is the orbit axis - var quat = new THREE.Quaternion().setFromUnitVectors( object.up, new THREE.Vector3( 0, 1, 0 ) ); - var quatInverse = quat.clone().inverse(); - - var lastPosition = new THREE.Vector3(); - var lastQuaternion = new THREE.Quaternion(); - - return function update() { - - var position = scope.object.position; - - offset.copy( position ).sub( scope.target ); - - // rotate offset to "y-axis-is-up" space - offset.applyQuaternion( quat ); - - // angle from z-axis around y-axis - spherical.setFromVector3( offset ); - - if ( scope.autoRotate && state === STATE.NONE ) { - - rotateLeft( getAutoRotationAngle() ); - - } - - spherical.theta += sphericalDelta.theta; - spherical.phi += sphericalDelta.phi; - - // restrict theta to be between desired limits - spherical.theta = Math.max( scope.minAzimuthAngle, Math.min( scope.maxAzimuthAngle, spherical.theta ) ); - - // restrict phi to be between desired limits - spherical.phi = Math.max( scope.minPolarAngle, Math.min( scope.maxPolarAngle, spherical.phi ) ); - - spherical.makeSafe(); - - - spherical.radius *= scale; - - // restrict radius to be between desired limits - spherical.radius = Math.max( scope.minDistance, Math.min( scope.maxDistance, spherical.radius ) ); - - // move target to panned location - scope.target.add( panOffset ); - - offset.setFromSpherical( spherical ); - - // rotate offset back to "camera-up-vector-is-up" space - offset.applyQuaternion( quatInverse ); - - position.copy( scope.target ).add( offset ); - - scope.object.lookAt( scope.target ); - - if ( scope.enableDamping === true ) { - - sphericalDelta.theta *= ( 1 - scope.dampingFactor ); - sphericalDelta.phi *= ( 1 - scope.dampingFactor ); - - panOffset.multiplyScalar( 1 - scope.dampingFactor ); - - } else { - - sphericalDelta.set( 0, 0, 0 ); - - panOffset.set( 0, 0, 0 ); - - } - - scale = 1; - - // update condition is: - // min(camera displacement, camera rotation in radians)^2 > EPS - // using small-angle approximation cos(x/2) = 1 - x^2 / 8 - - if ( zoomChanged || - lastPosition.distanceToSquared( scope.object.position ) > EPS || - 8 * ( 1 - lastQuaternion.dot( scope.object.quaternion ) ) > EPS ) { - - scope.dispatchEvent( changeEvent ); - - lastPosition.copy( scope.object.position ); - lastQuaternion.copy( scope.object.quaternion ); - zoomChanged = false; - - return true; - - } - - return false; - - }; - - }(); - - this.dispose = function () { - - scope.domElement.removeEventListener( 'contextmenu', onContextMenu, false ); - scope.domElement.removeEventListener( 'mousedown', onMouseDown, false ); - scope.domElement.removeEventListener( 'wheel', onMouseWheel, false ); - - scope.domElement.removeEventListener( 'touchstart', onTouchStart, false ); - scope.domElement.removeEventListener( 'touchend', onTouchEnd, false ); - scope.domElement.removeEventListener( 'touchmove', onTouchMove, false ); - - document.removeEventListener( 'mousemove', onMouseMove, false ); - document.removeEventListener( 'mouseup', onMouseUp, false ); - - window.removeEventListener( 'keydown', onKeyDown, false ); - - //scope.dispatchEvent( { type: 'dispose' } ); // should this be added here? - - }; - - // - // internals - // - - var scope = this; - - var changeEvent = { type: 'change' }; - var startEvent = { type: 'start' }; - var endEvent = { type: 'end' }; - - var STATE = { NONE: - 1, ROTATE: 0, DOLLY: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_DOLLY_PAN: 4 }; - - var state = STATE.NONE; - - var EPS = 0.000001; - - // current position in spherical coordinates - var spherical = new THREE.Spherical(); - var sphericalDelta = new THREE.Spherical(); - - var scale = 1; - var panOffset = new THREE.Vector3(); - var zoomChanged = false; - - var rotateStart = new THREE.Vector2(); - var rotateEnd = new THREE.Vector2(); - var rotateDelta = new THREE.Vector2(); - - var panStart = new THREE.Vector2(); - var panEnd = new THREE.Vector2(); - var panDelta = new THREE.Vector2(); - - var dollyStart = new THREE.Vector2(); - var dollyEnd = new THREE.Vector2(); - var dollyDelta = new THREE.Vector2(); - - function getAutoRotationAngle() { - - return 2 * Math.PI / 60 / 60 * scope.autoRotateSpeed; - - } - - function getZoomScale() { - - return Math.pow( 0.95, scope.zoomSpeed ); - - } - - function rotateLeft( angle ) { - - sphericalDelta.theta -= angle; - - } - - function rotateUp( angle ) { - - sphericalDelta.phi -= angle; - - } - - var panLeft = function () { - - var v = new THREE.Vector3(); - - return function panLeft( distance, objectMatrix ) { - - v.setFromMatrixColumn( objectMatrix, 0 ); // get X column of objectMatrix - v.multiplyScalar( - distance ); - - panOffset.add( v ); - - }; - - }(); - - var panUp = function () { - - var v = new THREE.Vector3(); - - return function panUp( distance, objectMatrix ) { - - if ( scope.screenSpacePanning === true ) { - - v.setFromMatrixColumn( objectMatrix, 1 ); - - } else { - - v.setFromMatrixColumn( objectMatrix, 0 ); - v.crossVectors( scope.object.up, v ); - - } - - v.multiplyScalar( distance ); - - panOffset.add( v ); - - }; - - }(); - - // deltaX and deltaY are in pixels; right and down are positive - var pan = function () { - - var offset = new THREE.Vector3(); - - return function pan( deltaX, deltaY ) { - - var element = scope.domElement === document ? scope.domElement.body : scope.domElement; - - if ( scope.object.isPerspectiveCamera ) { - - // perspective - var position = scope.object.position; - offset.copy( position ).sub( scope.target ); - var targetDistance = offset.length(); - - // half of the fov is center to top of screen - targetDistance *= Math.tan( ( scope.object.fov / 2 ) * Math.PI / 180.0 ); - - // we use only clientHeight here so aspect ratio does not distort speed - panLeft( 2 * deltaX * targetDistance / element.clientHeight, scope.object.matrix ); - panUp( 2 * deltaY * targetDistance / element.clientHeight, scope.object.matrix ); - - } else if ( scope.object.isOrthographicCamera ) { - - // orthographic - panLeft( deltaX * ( scope.object.right - scope.object.left ) / scope.object.zoom / element.clientWidth, scope.object.matrix ); - panUp( deltaY * ( scope.object.top - scope.object.bottom ) / scope.object.zoom / element.clientHeight, scope.object.matrix ); - - } else { - - // camera neither orthographic nor perspective - console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - pan disabled.' ); - scope.enablePan = false; - - } - - }; - - }(); - - function dollyIn( dollyScale ) { - - if ( scope.object.isPerspectiveCamera ) { - - scale /= dollyScale; - - } else if ( scope.object.isOrthographicCamera ) { - - scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom * dollyScale ) ); - scope.object.updateProjectionMatrix(); - zoomChanged = true; - - } else { - - console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' ); - scope.enableZoom = false; - - } - - } - - function dollyOut( dollyScale ) { - - if ( scope.object.isPerspectiveCamera ) { - - scale *= dollyScale; - - } else if ( scope.object.isOrthographicCamera ) { - - scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom / dollyScale ) ); - scope.object.updateProjectionMatrix(); - zoomChanged = true; - - } else { - - console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' ); - scope.enableZoom = false; - - } - - } - - // - // event callbacks - update the object state - // - - function handleMouseDownRotate( event ) { - - //console.log( 'handleMouseDownRotate' ); - - rotateStart.set( event.clientX, event.clientY ); - - } - - function handleMouseDownDolly( event ) { - - //console.log( 'handleMouseDownDolly' ); - - dollyStart.set( event.clientX, event.clientY ); - - } - - function handleMouseDownPan( event ) { - - //console.log( 'handleMouseDownPan' ); - - panStart.set( event.clientX, event.clientY ); - - } - - function handleMouseMoveRotate( event ) { - - //console.log( 'handleMouseMoveRotate' ); - - rotateEnd.set( event.clientX, event.clientY ); - - rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed ); - - var element = scope.domElement === document ? scope.domElement.body : scope.domElement; - - rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height - - rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight ); - - rotateStart.copy( rotateEnd ); - - scope.update(); - - } - - function handleMouseMoveDolly( event ) { - - //console.log( 'handleMouseMoveDolly' ); - - dollyEnd.set( event.clientX, event.clientY ); - - dollyDelta.subVectors( dollyEnd, dollyStart ); - - if ( dollyDelta.y > 0 ) { - - dollyIn( getZoomScale() ); - - } else if ( dollyDelta.y < 0 ) { - - dollyOut( getZoomScale() ); - - } - - dollyStart.copy( dollyEnd ); - - scope.update(); - - } - - function handleMouseMovePan( event ) { - - //console.log( 'handleMouseMovePan' ); - - panEnd.set( event.clientX, event.clientY ); - - panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed ); - - pan( panDelta.x, panDelta.y ); - - panStart.copy( panEnd ); - - scope.update(); - - } - - function handleMouseUp( event ) { - - // console.log( 'handleMouseUp' ); - - } - - function handleMouseWheel( event ) { - - // console.log( 'handleMouseWheel' ); - - if ( event.deltaY < 0 ) { - - dollyOut( getZoomScale() ); - - } else if ( event.deltaY > 0 ) { - - dollyIn( getZoomScale() ); - - } - - scope.update(); - - } - - function handleKeyDown( event ) { - - // console.log( 'handleKeyDown' ); - - var needsUpdate = false; - - switch ( event.keyCode ) { - - case scope.keys.UP: - pan( 0, scope.keyPanSpeed ); - needsUpdate = true; - break; - - case scope.keys.BOTTOM: - pan( 0, - scope.keyPanSpeed ); - needsUpdate = true; - break; - - case scope.keys.LEFT: - pan( scope.keyPanSpeed, 0 ); - needsUpdate = true; - break; - - case scope.keys.RIGHT: - pan( - scope.keyPanSpeed, 0 ); - needsUpdate = true; - break; - - } - - if ( needsUpdate ) { - - // prevent the browser from scrolling on cursor keys - event.preventDefault(); - - scope.update(); - - } - - - } - - function handleTouchStartRotate( event ) { - - //console.log( 'handleTouchStartRotate' ); - - rotateStart.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); - - } - - function handleTouchStartDollyPan( event ) { - - //console.log( 'handleTouchStartDollyPan' ); - - if ( scope.enableZoom ) { - - var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX; - var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY; - - var distance = Math.sqrt( dx * dx + dy * dy ); - - dollyStart.set( 0, distance ); - - } - - if ( scope.enablePan ) { - - var x = 0.5 * ( event.touches[ 0 ].pageX + event.touches[ 1 ].pageX ); - var y = 0.5 * ( event.touches[ 0 ].pageY + event.touches[ 1 ].pageY ); - - panStart.set( x, y ); - - } - - } - - function handleTouchMoveRotate( event ) { - - //console.log( 'handleTouchMoveRotate' ); - - rotateEnd.set( event.touches[ 0 ].pageX, event.touches[ 0 ].pageY ); - - rotateDelta.subVectors( rotateEnd, rotateStart ).multiplyScalar( scope.rotateSpeed ); - - var element = scope.domElement === document ? scope.domElement.body : scope.domElement; - - rotateLeft( 2 * Math.PI * rotateDelta.x / element.clientHeight ); // yes, height - - rotateUp( 2 * Math.PI * rotateDelta.y / element.clientHeight ); - - rotateStart.copy( rotateEnd ); - - scope.update(); - - } - - function handleTouchMoveDollyPan( event ) { - - //console.log( 'handleTouchMoveDollyPan' ); - - if ( scope.enableZoom ) { - - var dx = event.touches[ 0 ].pageX - event.touches[ 1 ].pageX; - var dy = event.touches[ 0 ].pageY - event.touches[ 1 ].pageY; - - var distance = Math.sqrt( dx * dx + dy * dy ); - - dollyEnd.set( 0, distance ); - - dollyDelta.set( 0, Math.pow( dollyEnd.y / dollyStart.y, scope.zoomSpeed ) ); - - dollyIn( dollyDelta.y ); - - dollyStart.copy( dollyEnd ); - - } - - if ( scope.enablePan ) { - - var x = 0.5 * ( event.touches[ 0 ].pageX + event.touches[ 1 ].pageX ); - var y = 0.5 * ( event.touches[ 0 ].pageY + event.touches[ 1 ].pageY ); - - panEnd.set( x, y ); - - panDelta.subVectors( panEnd, panStart ).multiplyScalar( scope.panSpeed ); - - pan( panDelta.x, panDelta.y ); - - panStart.copy( panEnd ); - - } - - scope.update(); - - } - - function handleTouchEnd( event ) { - - //console.log( 'handleTouchEnd' ); - - } - - // - // event handlers - FSM: listen for events and reset state - // - - function onMouseDown( event ) { - - if ( scope.enabled === false ) return; - - // Prevent the browser from scrolling. - - event.preventDefault(); - - // Manually set the focus since calling preventDefault above - // prevents the browser from setting it automatically. - - scope.domElement.focus ? scope.domElement.focus() : window.focus(); - - switch ( event.button ) { - - case scope.mouseButtons.LEFT: - - if ( event.ctrlKey || event.metaKey || event.shiftKey ) { - - if ( scope.enablePan === false ) return; - - handleMouseDownPan( event ); - - state = STATE.PAN; - - } else { - - if ( scope.enableRotate === false ) return; - - handleMouseDownRotate( event ); - - state = STATE.ROTATE; - - } - - break; - - case scope.mouseButtons.MIDDLE: - - if ( scope.enableZoom === false ) return; - - handleMouseDownDolly( event ); - - state = STATE.DOLLY; - - break; - - case scope.mouseButtons.RIGHT: - - if ( scope.enablePan === false ) return; - - handleMouseDownPan( event ); - - state = STATE.PAN; - - break; - - } - - if ( state !== STATE.NONE ) { - - document.addEventListener( 'mousemove', onMouseMove, false ); - document.addEventListener( 'mouseup', onMouseUp, false ); - - scope.dispatchEvent( startEvent ); - - } - - } - - function onMouseMove( event ) { - - if ( scope.enabled === false ) return; - - event.preventDefault(); - - switch ( state ) { - - case STATE.ROTATE: - - if ( scope.enableRotate === false ) return; - - handleMouseMoveRotate( event ); - - break; - - case STATE.DOLLY: - - if ( scope.enableZoom === false ) return; - - handleMouseMoveDolly( event ); - - break; - - case STATE.PAN: - - if ( scope.enablePan === false ) return; - - handleMouseMovePan( event ); - - break; - - } - - } - - function onMouseUp( event ) { - - if ( scope.enabled === false ) return; - - handleMouseUp( event ); - - document.removeEventListener( 'mousemove', onMouseMove, false ); - document.removeEventListener( 'mouseup', onMouseUp, false ); - - scope.dispatchEvent( endEvent ); - - state = STATE.NONE; - - } - - function onMouseWheel( event ) { - - if ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return; - - event.preventDefault(); - event.stopPropagation(); - - scope.dispatchEvent( startEvent ); - - handleMouseWheel( event ); - - scope.dispatchEvent( endEvent ); - - } - - function onKeyDown( event ) { - - if ( scope.enabled === false || scope.enableKeys === false || scope.enablePan === false ) return; - - handleKeyDown( event ); - - } - - function onTouchStart( event ) { - - if ( scope.enabled === false ) return; - - event.preventDefault(); - - switch ( event.touches.length ) { - - case 1: // one-fingered touch: rotate - - if ( scope.enableRotate === false ) return; - - handleTouchStartRotate( event ); - - state = STATE.TOUCH_ROTATE; - - break; - - case 2: // two-fingered touch: dolly-pan - - if ( scope.enableZoom === false && scope.enablePan === false ) return; - - handleTouchStartDollyPan( event ); - - state = STATE.TOUCH_DOLLY_PAN; - - break; - - default: - - state = STATE.NONE; - - } - - if ( state !== STATE.NONE ) { - - scope.dispatchEvent( startEvent ); - - } - - } - - function onTouchMove( event ) { - - if ( scope.enabled === false ) return; - - event.preventDefault(); - event.stopPropagation(); - - switch ( event.touches.length ) { - - case 1: // one-fingered touch: rotate - - if ( scope.enableRotate === false ) return; - if ( state !== STATE.TOUCH_ROTATE ) return; // is this needed? - - handleTouchMoveRotate( event ); - - break; - - case 2: // two-fingered touch: dolly-pan - - if ( scope.enableZoom === false && scope.enablePan === false ) return; - if ( state !== STATE.TOUCH_DOLLY_PAN ) return; // is this needed? - - handleTouchMoveDollyPan( event ); - - break; - - default: - - state = STATE.NONE; - - } - - } - - function onTouchEnd( event ) { - - if ( scope.enabled === false ) return; - - handleTouchEnd( event ); - - scope.dispatchEvent( endEvent ); - - state = STATE.NONE; - - } - - function onContextMenu( event ) { - - if ( scope.enabled === false ) return; - - event.preventDefault(); - - } - - // - - scope.domElement.addEventListener( 'contextmenu', onContextMenu, false ); - - scope.domElement.addEventListener( 'mousedown', onMouseDown, false ); - scope.domElement.addEventListener( 'wheel', onMouseWheel, false ); - - scope.domElement.addEventListener( 'touchstart', onTouchStart, false ); - scope.domElement.addEventListener( 'touchend', onTouchEnd, false ); - scope.domElement.addEventListener( 'touchmove', onTouchMove, false ); - - window.addEventListener( 'keydown', onKeyDown, false ); - - // force an update at start - - this.update(); - -}; - -THREE.OrbitControls.prototype = Object.create( THREE.EventDispatcher.prototype ); -THREE.OrbitControls.prototype.constructor = THREE.OrbitControls; - -Object.defineProperties( THREE.OrbitControls.prototype, { - - center: { - - get: function () { - - console.warn( 'THREE.OrbitControls: .center has been renamed to .target' ); - return this.target; - - } - - }, - - // backward compatibility - - noZoom: { - - get: function () { - - console.warn( 'THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.' ); - return ! this.enableZoom; - - }, - - set: function ( value ) { - - console.warn( 'THREE.OrbitControls: .noZoom has been deprecated. Use .enableZoom instead.' ); - this.enableZoom = ! value; - - } - - }, - - noRotate: { - - get: function () { - - console.warn( 'THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.' ); - return ! this.enableRotate; - - }, - - set: function ( value ) { - - console.warn( 'THREE.OrbitControls: .noRotate has been deprecated. Use .enableRotate instead.' ); - this.enableRotate = ! value; - - } - - }, - - noPan: { - - get: function () { - - console.warn( 'THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.' ); - return ! this.enablePan; - - }, - - set: function ( value ) { - - console.warn( 'THREE.OrbitControls: .noPan has been deprecated. Use .enablePan instead.' ); - this.enablePan = ! value; - - } - - }, - - noKeys: { - - get: function () { - - console.warn( 'THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.' ); - return ! this.enableKeys; - - }, - - set: function ( value ) { - - console.warn( 'THREE.OrbitControls: .noKeys has been deprecated. Use .enableKeys instead.' ); - this.enableKeys = ! value; - - } - - }, - - staticMoving: { - - get: function () { - - console.warn( 'THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.' ); - return ! this.enableDamping; - - }, - - set: function ( value ) { - - console.warn( 'THREE.OrbitControls: .staticMoving has been deprecated. Use .enableDamping instead.' ); - this.enableDamping = ! value; - - } - - }, - - dynamicDampingFactor: { - - get: function () { - - console.warn( 'THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.' ); - return this.dampingFactor; - - }, - - set: function ( value ) { - - console.warn( 'THREE.OrbitControls: .dynamicDampingFactor has been renamed. Use .dampingFactor instead.' ); - this.dampingFactor = value; - - } - - } - -} ); diff --git a/spaces/banana-projects/web3d/node_modules/three/examples/js/objects/Water.js b/spaces/banana-projects/web3d/node_modules/three/examples/js/objects/Water.js deleted file mode 100644 index 9a298ec95932d635626e288070c1dcfe8295837d..0000000000000000000000000000000000000000 --- a/spaces/banana-projects/web3d/node_modules/three/examples/js/objects/Water.js +++ /dev/null @@ -1,310 +0,0 @@ -/** - * @author jbouny / https://github.com/jbouny - * - * Work based on : - * @author Slayvin / http://slayvin.net : Flat mirror for three.js - * @author Stemkoski / http://www.adelphi.edu/~stemkoski : An implementation of water shader based on the flat mirror - * @author Jonas Wagner / http://29a.ch/ && http://29a.ch/slides/2012/webglwater/ : Water shader explanations in WebGL - */ - -THREE.Water = function ( geometry, options ) { - - THREE.Mesh.call( this, geometry ); - - var scope = this; - - options = options || {}; - - var textureWidth = options.textureWidth !== undefined ? options.textureWidth : 512; - var textureHeight = options.textureHeight !== undefined ? options.textureHeight : 512; - - var clipBias = options.clipBias !== undefined ? options.clipBias : 0.0; - var alpha = options.alpha !== undefined ? options.alpha : 1.0; - var time = options.time !== undefined ? options.time : 0.0; - var normalSampler = options.waterNormals !== undefined ? options.waterNormals : null; - var sunDirection = options.sunDirection !== undefined ? options.sunDirection : new THREE.Vector3( 0.70707, 0.70707, 0.0 ); - var sunColor = new THREE.Color( options.sunColor !== undefined ? options.sunColor : 0xffffff ); - var waterColor = new THREE.Color( options.waterColor !== undefined ? options.waterColor : 0x7F7F7F ); - var eye = options.eye !== undefined ? options.eye : new THREE.Vector3( 0, 0, 0 ); - var distortionScale = options.distortionScale !== undefined ? options.distortionScale : 20.0; - var side = options.side !== undefined ? options.side : THREE.FrontSide; - var fog = options.fog !== undefined ? options.fog : false; - - // - - var mirrorPlane = new THREE.Plane(); - var normal = new THREE.Vector3(); - var mirrorWorldPosition = new THREE.Vector3(); - var cameraWorldPosition = new THREE.Vector3(); - var rotationMatrix = new THREE.Matrix4(); - var lookAtPosition = new THREE.Vector3( 0, 0, - 1 ); - var clipPlane = new THREE.Vector4(); - - var view = new THREE.Vector3(); - var target = new THREE.Vector3(); - var q = new THREE.Vector4(); - - var textureMatrix = new THREE.Matrix4(); - - var mirrorCamera = new THREE.PerspectiveCamera(); - - var parameters = { - minFilter: THREE.LinearFilter, - magFilter: THREE.LinearFilter, - format: THREE.RGBFormat, - stencilBuffer: false - }; - - var renderTarget = new THREE.WebGLRenderTarget( textureWidth, textureHeight, parameters ); - - if ( ! THREE.Math.isPowerOfTwo( textureWidth ) || ! THREE.Math.isPowerOfTwo( textureHeight ) ) { - - renderTarget.texture.generateMipmaps = false; - - } - - var mirrorShader = { - - uniforms: THREE.UniformsUtils.merge( [ - THREE.UniformsLib[ 'fog' ], - THREE.UniformsLib[ 'lights' ], - { - "normalSampler": { value: null }, - "mirrorSampler": { value: null }, - "alpha": { value: 1.0 }, - "time": { value: 0.0 }, - "size": { value: 1.0 }, - "distortionScale": { value: 20.0 }, - "textureMatrix": { value: new THREE.Matrix4() }, - "sunColor": { value: new THREE.Color( 0x7F7F7F ) }, - "sunDirection": { value: new THREE.Vector3( 0.70707, 0.70707, 0 ) }, - "eye": { value: new THREE.Vector3() }, - "waterColor": { value: new THREE.Color( 0x555555 ) } - } - ] ), - - vertexShader: [ - 'uniform mat4 textureMatrix;', - 'uniform float time;', - - 'varying vec4 mirrorCoord;', - 'varying vec4 worldPosition;', - - THREE.ShaderChunk[ 'fog_pars_vertex' ], - THREE.ShaderChunk[ 'shadowmap_pars_vertex' ], - - 'void main() {', - ' mirrorCoord = modelMatrix * vec4( position, 1.0 );', - ' worldPosition = mirrorCoord.xyzw;', - ' mirrorCoord = textureMatrix * mirrorCoord;', - ' vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );', - ' gl_Position = projectionMatrix * mvPosition;', - - THREE.ShaderChunk[ 'fog_vertex' ], - THREE.ShaderChunk[ 'shadowmap_vertex' ], - - '}' - ].join( '\n' ), - - fragmentShader: [ - 'uniform sampler2D mirrorSampler;', - 'uniform float alpha;', - 'uniform float time;', - 'uniform float size;', - 'uniform float distortionScale;', - 'uniform sampler2D normalSampler;', - 'uniform vec3 sunColor;', - 'uniform vec3 sunDirection;', - 'uniform vec3 eye;', - 'uniform vec3 waterColor;', - - 'varying vec4 mirrorCoord;', - 'varying vec4 worldPosition;', - - 'vec4 getNoise( vec2 uv ) {', - ' vec2 uv0 = ( uv / 103.0 ) + vec2(time / 17.0, time / 29.0);', - ' vec2 uv1 = uv / 107.0-vec2( time / -19.0, time / 31.0 );', - ' vec2 uv2 = uv / vec2( 8907.0, 9803.0 ) + vec2( time / 101.0, time / 97.0 );', - ' vec2 uv3 = uv / vec2( 1091.0, 1027.0 ) - vec2( time / 109.0, time / -113.0 );', - ' vec4 noise = texture2D( normalSampler, uv0 ) +', - ' texture2D( normalSampler, uv1 ) +', - ' texture2D( normalSampler, uv2 ) +', - ' texture2D( normalSampler, uv3 );', - ' return noise * 0.5 - 1.0;', - '}', - - 'void sunLight( const vec3 surfaceNormal, const vec3 eyeDirection, float shiny, float spec, float diffuse, inout vec3 diffuseColor, inout vec3 specularColor ) {', - ' vec3 reflection = normalize( reflect( -sunDirection, surfaceNormal ) );', - ' float direction = max( 0.0, dot( eyeDirection, reflection ) );', - ' specularColor += pow( direction, shiny ) * sunColor * spec;', - ' diffuseColor += max( dot( sunDirection, surfaceNormal ), 0.0 ) * sunColor * diffuse;', - '}', - - THREE.ShaderChunk[ 'common' ], - THREE.ShaderChunk[ 'packing' ], - THREE.ShaderChunk[ 'bsdfs' ], - THREE.ShaderChunk[ 'fog_pars_fragment' ], - THREE.ShaderChunk[ 'lights_pars_begin' ], - THREE.ShaderChunk[ 'shadowmap_pars_fragment' ], - THREE.ShaderChunk[ 'shadowmask_pars_fragment' ], - - 'void main() {', - ' vec4 noise = getNoise( worldPosition.xz * size );', - ' vec3 surfaceNormal = normalize( noise.xzy * vec3( 1.5, 1.0, 1.5 ) );', - - ' vec3 diffuseLight = vec3(0.0);', - ' vec3 specularLight = vec3(0.0);', - - ' vec3 worldToEye = eye-worldPosition.xyz;', - ' vec3 eyeDirection = normalize( worldToEye );', - ' sunLight( surfaceNormal, eyeDirection, 100.0, 2.0, 0.5, diffuseLight, specularLight );', - - ' float distance = length(worldToEye);', - - ' vec2 distortion = surfaceNormal.xz * ( 0.001 + 1.0 / distance ) * distortionScale;', - ' vec3 reflectionSample = vec3( texture2D( mirrorSampler, mirrorCoord.xy / mirrorCoord.w + distortion ) );', - - ' float theta = max( dot( eyeDirection, surfaceNormal ), 0.0 );', - ' float rf0 = 0.3;', - ' float reflectance = rf0 + ( 1.0 - rf0 ) * pow( ( 1.0 - theta ), 5.0 );', - ' vec3 scatter = max( 0.0, dot( surfaceNormal, eyeDirection ) ) * waterColor;', - ' vec3 albedo = mix( ( sunColor * diffuseLight * 0.3 + scatter ) * getShadowMask(), ( vec3( 0.1 ) + reflectionSample * 0.9 + reflectionSample * specularLight ), reflectance);', - ' vec3 outgoingLight = albedo;', - ' gl_FragColor = vec4( outgoingLight, alpha );', - - THREE.ShaderChunk[ 'tonemapping_fragment' ], - THREE.ShaderChunk[ 'fog_fragment' ], - - '}' - ].join( '\n' ) - - }; - - var material = new THREE.ShaderMaterial( { - fragmentShader: mirrorShader.fragmentShader, - vertexShader: mirrorShader.vertexShader, - uniforms: THREE.UniformsUtils.clone( mirrorShader.uniforms ), - transparent: true, - lights: true, - side: side, - fog: fog - } ); - - material.uniforms[ "mirrorSampler" ].value = renderTarget.texture; - material.uniforms[ "textureMatrix" ].value = textureMatrix; - material.uniforms[ "alpha" ].value = alpha; - material.uniforms[ "time" ].value = time; - material.uniforms[ "normalSampler" ].value = normalSampler; - material.uniforms[ "sunColor" ].value = sunColor; - material.uniforms[ "waterColor" ].value = waterColor; - material.uniforms[ "sunDirection" ].value = sunDirection; - material.uniforms[ "distortionScale" ].value = distortionScale; - - material.uniforms[ "eye" ].value = eye; - - scope.material = material; - - scope.onBeforeRender = function ( renderer, scene, camera ) { - - mirrorWorldPosition.setFromMatrixPosition( scope.matrixWorld ); - cameraWorldPosition.setFromMatrixPosition( camera.matrixWorld ); - - rotationMatrix.extractRotation( scope.matrixWorld ); - - normal.set( 0, 0, 1 ); - normal.applyMatrix4( rotationMatrix ); - - view.subVectors( mirrorWorldPosition, cameraWorldPosition ); - - // Avoid rendering when mirror is facing away - - if ( view.dot( normal ) > 0 ) return; - - view.reflect( normal ).negate(); - view.add( mirrorWorldPosition ); - - rotationMatrix.extractRotation( camera.matrixWorld ); - - lookAtPosition.set( 0, 0, - 1 ); - lookAtPosition.applyMatrix4( rotationMatrix ); - lookAtPosition.add( cameraWorldPosition ); - - target.subVectors( mirrorWorldPosition, lookAtPosition ); - target.reflect( normal ).negate(); - target.add( mirrorWorldPosition ); - - mirrorCamera.position.copy( view ); - mirrorCamera.up.set( 0, 1, 0 ); - mirrorCamera.up.applyMatrix4( rotationMatrix ); - mirrorCamera.up.reflect( normal ); - mirrorCamera.lookAt( target ); - - mirrorCamera.far = camera.far; // Used in WebGLBackground - - mirrorCamera.updateMatrixWorld(); - mirrorCamera.projectionMatrix.copy( camera.projectionMatrix ); - - // Update the texture matrix - textureMatrix.set( - 0.5, 0.0, 0.0, 0.5, - 0.0, 0.5, 0.0, 0.5, - 0.0, 0.0, 0.5, 0.5, - 0.0, 0.0, 0.0, 1.0 - ); - textureMatrix.multiply( mirrorCamera.projectionMatrix ); - textureMatrix.multiply( mirrorCamera.matrixWorldInverse ); - - // Now update projection matrix with new clip plane, implementing code from: http://www.terathon.com/code/oblique.html - // Paper explaining this technique: http://www.terathon.com/lengyel/Lengyel-Oblique.pdf - mirrorPlane.setFromNormalAndCoplanarPoint( normal, mirrorWorldPosition ); - mirrorPlane.applyMatrix4( mirrorCamera.matrixWorldInverse ); - - clipPlane.set( mirrorPlane.normal.x, mirrorPlane.normal.y, mirrorPlane.normal.z, mirrorPlane.constant ); - - var projectionMatrix = mirrorCamera.projectionMatrix; - - q.x = ( Math.sign( clipPlane.x ) + projectionMatrix.elements[ 8 ] ) / projectionMatrix.elements[ 0 ]; - q.y = ( Math.sign( clipPlane.y ) + projectionMatrix.elements[ 9 ] ) / projectionMatrix.elements[ 5 ]; - q.z = - 1.0; - q.w = ( 1.0 + projectionMatrix.elements[ 10 ] ) / projectionMatrix.elements[ 14 ]; - - // Calculate the scaled plane vector - clipPlane.multiplyScalar( 2.0 / clipPlane.dot( q ) ); - - // Replacing the third row of the projection matrix - projectionMatrix.elements[ 2 ] = clipPlane.x; - projectionMatrix.elements[ 6 ] = clipPlane.y; - projectionMatrix.elements[ 10 ] = clipPlane.z + 1.0 - clipBias; - projectionMatrix.elements[ 14 ] = clipPlane.w; - - eye.setFromMatrixPosition( camera.matrixWorld ); - - // - - var currentRenderTarget = renderer.getRenderTarget(); - - var currentVrEnabled = renderer.vr.enabled; - var currentShadowAutoUpdate = renderer.shadowMap.autoUpdate; - - scope.visible = false; - - renderer.vr.enabled = false; // Avoid camera modification and recursion - renderer.shadowMap.autoUpdate = false; // Avoid re-computing shadows - - renderer.setRenderTarget( renderTarget ); - renderer.clear(); - renderer.render( scene, mirrorCamera ); - - scope.visible = true; - - renderer.vr.enabled = currentVrEnabled; - renderer.shadowMap.autoUpdate = currentShadowAutoUpdate; - - renderer.setRenderTarget( currentRenderTarget ); - - }; - -}; - -THREE.Water.prototype = Object.create( THREE.Mesh.prototype ); -THREE.Water.prototype.constructor = THREE.Water; diff --git a/spaces/banana-projects/web3d/node_modules/three/src/core/InstancedInterleavedBuffer.d.ts b/spaces/banana-projects/web3d/node_modules/three/src/core/InstancedInterleavedBuffer.d.ts deleted file mode 100644 index 4205764ca45d325830e9322183ed4f052c112092..0000000000000000000000000000000000000000 --- a/spaces/banana-projects/web3d/node_modules/three/src/core/InstancedInterleavedBuffer.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { InterleavedBuffer } from './InterleavedBuffer'; - -/** - * @see src/core/InstancedInterleavedBuffer.js - */ -export class InstancedInterleavedBuffer extends InterleavedBuffer { - constructor( - array: ArrayLike, - stride: number, - meshPerAttribute?: number - ); - - meshPerAttribute: number; -} diff --git a/spaces/banana-projects/web3d/node_modules/three/src/core/Uniform.js b/spaces/banana-projects/web3d/node_modules/three/src/core/Uniform.js deleted file mode 100644 index 8c53319d5bd4eaaf0c01b035345753af7fad14ae..0000000000000000000000000000000000000000 --- a/spaces/banana-projects/web3d/node_modules/three/src/core/Uniform.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @author mrdoob / http://mrdoob.com/ - */ - -function Uniform( value ) { - - if ( typeof value === 'string' ) { - - console.warn( 'THREE.Uniform: Type parameter is no longer needed.' ); - value = arguments[ 1 ]; - - } - - this.value = value; - -} - -Uniform.prototype.clone = function () { - - return new Uniform( this.value.clone === undefined ? this.value : this.value.clone() ); - -}; - -export { Uniform }; diff --git a/spaces/beihai/GFPGAN-V1.3-whole-image/.history/app_20220327092527.py b/spaces/beihai/GFPGAN-V1.3-whole-image/.history/app_20220327092527.py deleted file mode 100644 index 7367130a3e5d66605e1f576a08222fde244104be..0000000000000000000000000000000000000000 --- a/spaces/beihai/GFPGAN-V1.3-whole-image/.history/app_20220327092527.py +++ /dev/null @@ -1,63 +0,0 @@ -import os -#os.system("pip install gfpgan") - -#os.system("pip freeze") -#os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth -P .") -import random -import gradio as gr -from PIL import Image -import torch -# torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Abraham_Lincoln_O-77_matte_collodion_print.jpg/1024px-Abraham_Lincoln_O-77_matte_collodion_print.jpg', 'lincoln.jpg') -# torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/5/50/Albert_Einstein_%28Nobel%29.png', 'einstein.png') -# torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/thumb/9/9d/Thomas_Edison2.jpg/1024px-Thomas_Edison2.jpg', 'edison.jpg') -# torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Henry_Ford_1888.jpg/1024px-Henry_Ford_1888.jpg', 'Henry.jpg') -# torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Frida_Kahlo%2C_by_Guillermo_Kahlo.jpg/800px-Frida_Kahlo%2C_by_Guillermo_Kahlo.jpg', 'Frida.jpg') - - -import cv2 -import glob -import numpy as np -from basicsr.utils import imwrite -from gfpgan import GFPGANer - -bg_upsampler = None - - - -# set up GFPGAN restorer -restorer = GFPGANer( - model_path='experiments/pretrained_models/GFPGANv1.3.pth', - upscale=2, - arch='clean', - channel_multiplier=2, - bg_upsampler=bg_upsampler) - - -def inference(img): - input_img = cv2.imread(img, cv2.IMREAD_COLOR) - cropped_faces, restored_faces, restored_img = restorer.enhance( - input_img, has_aligned=False, only_center_face=False, paste_back=True) - - #return Image.fromarray(restored_faces[0][:,:,::-1]) - return Image.fromarray(restored_img[:, :, ::-1]) - -title = "让美好回忆更清晰" -description = "Gradio demo for GFP-GAN: Towards Real-World Blind Face Restoration with Generative Facial Prior. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below. Please click submit only once" -article = "

    | Github Repo

    visitor badge
    " -gr.Interface( - inference, - [gr.inputs.Image(type="filepath", label="Input")], - gr.outputs.Image(type="pil", label="Output"), - title=title, - description=description, - article=article, - examples=[ - ['lincoln.jpg'], - ['einstein.png'], - ['edison.jpg'], - ['Henry.jpg'], - ['Frida.jpg'] - ] - ).launch(enable_queue=True,cache_examples=True,share=True) - - diff --git a/spaces/beihai/PDF-Table-Extractor/.history/app_20220621074625.py b/spaces/beihai/PDF-Table-Extractor/.history/app_20220621074625.py deleted file mode 100644 index a2bf8c4cb07b63488e952ab9effb21da7d7e0c4e..0000000000000000000000000000000000000000 --- a/spaces/beihai/PDF-Table-Extractor/.history/app_20220621074625.py +++ /dev/null @@ -1,31 +0,0 @@ -#-*- coding : utf-8-*- -import base64 -from subprocess import STDOUT -import streamlit as st -import pandas as pd -import camelot as cam # extracting tables from PDFs - -st.title("PDF Table Extractor") - -input_pdf = st.file_uploader(label = "", type = 'pdf') - -page_number = st.text_input("请填写表格所在PDF页码,eg: 3", value = 1) -process_background = st.selectbox("表格线条是否隐藏",('True', 'False')) -if input_pdf is not None: - # byte object into a PDF file - with open("input.pdf", "wb") as f: - base64_pdf = base64.b64encode(input_pdf.read()).decode('utf-8') - f.write(base64.b64decode(base64_pdf)) - f.close() - - # read the pdf and parse it using stream - tables = cam.read_pdf("input.pdf", pages=page_number,process_background=process_background) - result = pd.ExcelWriter('result.xlsx', engine='xlsxwriter') - tables[0].to_excel(result,index=False) - # for i in range(0,len(tables)): - # table = tables[i].df - # sheetname = str(i) - # table.to_excel(result, sheetname,index=False) - - with open('result.xlsx','rb') as f: - st.download_button('提取完成,点击下载!', f,file_name='result.xlsx',mime="application/vnd.ms-excel") \ No newline at end of file diff --git a/spaces/beihai/PDF-Table-Extractor/.history/app_20220621075004.py b/spaces/beihai/PDF-Table-Extractor/.history/app_20220621075004.py deleted file mode 100644 index 8edda8374568a73da90394d986f27448951c4400..0000000000000000000000000000000000000000 --- a/spaces/beihai/PDF-Table-Extractor/.history/app_20220621075004.py +++ /dev/null @@ -1,31 +0,0 @@ -#-*- coding : utf-8-*- -import base64 -from subprocess import STDOUT -import streamlit as st -import pandas as pd -import camelot as cam # extracting tables from PDFs - -st.title("PDF Table Extractor") - -input_pdf = st.file_uploader(label = "", type = 'pdf') - -page_number = st.text_input("请填写表格所在PDF页码,eg: 3", value = 1) -process_background = st.selectbox("表格线条是否隐藏",('True', 'False')) -if input_pdf is not None: - # byte object into a PDF file - with open("input.pdf", "wb") as f: - base64_pdf = base64.b64encode(input_pdf.read()).decode('utf-8') - f.write(base64.b64decode(base64_pdf)) - f.close() - - # read the pdf and parse it using stream - tables = cam.read_pdf("input.pdf", pages=page_number) - result = pd.ExcelWriter('result.xlsx', engine='xlsxwriter') - tables[0].to_excel(result,index=False) - # for i in range(0,len(tables)): - # table = tables[i].df - # sheetname = str(i) - # table.to_excel(result, sheetname,index=False) - - with open('result.xlsx','rb') as f: - st.download_button('提取完成,点击下载!', f,file_name='result.xlsx',mime="application/vnd.ms-excel") \ No newline at end of file diff --git a/spaces/bioriAsaeru/text-to-voice/Analitik Kimya Temelleri Pdf Download VERIFIED.md b/spaces/bioriAsaeru/text-to-voice/Analitik Kimya Temelleri Pdf Download VERIFIED.md deleted file mode 100644 index 136fa5f1ff94a470e1b24555552e13841989b2c7..0000000000000000000000000000000000000000 --- a/spaces/bioriAsaeru/text-to-voice/Analitik Kimya Temelleri Pdf Download VERIFIED.md +++ /dev/null @@ -1,16 +0,0 @@ -
    -

    How to Download Analitik Kimya Temelleri PDF for Free

    -

    Analitik Kimya Temelleri is a book that covers the fundamentals of analytical chemistry, such as measurement, accuracy, precision, error analysis, sampling, separation, spectroscopy, electrochemistry, and more. It is written by Prof. Dr. Sibel A. Özkan and Prof. Dr. Esma Kılıç, who are both experts in the field of analytical chemistry.

    -

    analitik kimya temelleri pdf download


    Download Ziphttps://urloso.com/2uyOaS



    -

    If you are looking for a reliable source to download Analitik Kimya Temelleri PDF for free, you may be disappointed to find out that there is no official website that offers this service. However, there are some alternative ways to get a copy of this book without paying anything.

    -

    One way is to use a file-sharing platform that hosts PDF files of various books, such as Extremo Digital[^1^]. This website allows you to download Analitik Kimya Temelleri PDF for free by clicking on the link and following the instructions. However, you should be careful when using this method, as some file-sharing platforms may contain viruses, malware, or other harmful content that can damage your device or compromise your privacy.

    -

    Another way is to use a document creation tool that can convert web pages into PDF files, such as Microsoft Sway[^2^]. This tool allows you to create a PDF file of any web page by copying and pasting the URL into the input box and clicking on the download button. However, you should be aware that this method may not preserve the original formatting, layout, or quality of the web page.

    -

    A third way is to use a PDF editing tool that can merge multiple PDF files into one, such as IT-SBO[^3^]. This tool allows you to combine several PDF files of Analitik Kimya Temelleri into one by uploading them to the website and clicking on the merge button. However, you should be mindful that this method may not guarantee the completeness, accuracy, or authenticity of the merged PDF file.

    -

    As you can see, there are several ways to download Analitik Kimya Temelleri PDF for free, but none of them are perfect or risk-free. Therefore, we recommend that you purchase a legal copy of this book from a reputable online bookstore or library if you want to enjoy its full benefits and support its authors.

    -

    - -

    Analitik Kimya Temelleri is a comprehensive and accessible book that covers the theoretical and practical aspects of analytical chemistry. It is suitable for students, researchers, and professionals who want to learn more about the principles, methods, and applications of analytical chemistry in various fields, such as environmental, biological, pharmaceutical, industrial, and forensic sciences.

    -

    The book consists of 16 chapters that are organized into four parts. The first part introduces the basic concepts and tools of analytical chemistry, such as measurement, accuracy, precision, error analysis, sampling, statistics, and quality assurance. The second part covers the common techniques and instruments of analytical chemistry, such as gravimetric analysis, titrimetric analysis, chromatography, spectroscopy, electrochemistry, and mass spectrometry. The third part discusses the specific applications and problems of analytical chemistry in different domains, such as water analysis, soil analysis, food analysis, drug analysis, and trace element analysis. The fourth part provides some case studies and examples of analytical chemistry in real-life situations, such as forensic science, clinical chemistry, and environmental monitoring.

    -

    The book is written in a clear and concise language that is easy to understand and follow. It is richly illustrated with figures, tables, graphs, and diagrams that help to explain the concepts and procedures. It also contains numerous exercises, problems, questions, and examples that test the knowledge and skills of the readers. The book is accompanied by a CD-ROM that contains additional materials, such as animations, simulations, videos, and software.

    d5da3c52bf
    -
    -
    \ No newline at end of file diff --git a/spaces/bioriAsaeru/text-to-voice/Apploader For Blackberry 9900 Application Manager Tips and Tricks for Using It Effectively.md b/spaces/bioriAsaeru/text-to-voice/Apploader For Blackberry 9900 Application Manager Tips and Tricks for Using It Effectively.md deleted file mode 100644 index 4426ed3be5fcbef124b5bc9c99a1e87caa3c9ada..0000000000000000000000000000000000000000 --- a/spaces/bioriAsaeru/text-to-voice/Apploader For Blackberry 9900 Application Manager Tips and Tricks for Using It Effectively.md +++ /dev/null @@ -1,6 +0,0 @@ - -

    Rename the file from .jad to .txt and open it using a text editor. Inside it you can find the address (near MIDlet-Jar-URL tag) where the JAR file resides. It will be simply a web URL most of the times but not always. Copy the URL to a web browser in PC and download the JAR file. Then you have to edit the JAD file by opening it with a text editor. Just replace the URL you copied with the name of the app along with extension and save the file with .jad extension. Then copy both files to a folder in the memory card. Access the filemanager in the BB and browse to that folder. Then click the JAD file and click install. It will install that application.

    -

    Apploader For Blackberry 9900 Application Manager


    Download Filehttps://urloso.com/2uyOnU



    -

    If your blackberry device is showing either the white screen of death with the message JVM error/App error 523, 102, 507 or 545 it simply means the BlackBerry smartphone encountered a Java Virtual Machine (JVM) application related problem and is unable to continue running.

    aaccfb2cb3
    -
    -
    \ No newline at end of file diff --git a/spaces/brjathu/HMR2.0/vendor/detectron2/configs/common/data/coco.py b/spaces/brjathu/HMR2.0/vendor/detectron2/configs/common/data/coco.py deleted file mode 100644 index 703c4385c7ddc7eb0759c98d102ab2384d6a9e3e..0000000000000000000000000000000000000000 --- a/spaces/brjathu/HMR2.0/vendor/detectron2/configs/common/data/coco.py +++ /dev/null @@ -1,48 +0,0 @@ -from omegaconf import OmegaConf - -import detectron2.data.transforms as T -from detectron2.config import LazyCall as L -from detectron2.data import ( - DatasetMapper, - build_detection_test_loader, - build_detection_train_loader, - get_detection_dataset_dicts, -) -from detectron2.evaluation import COCOEvaluator - -dataloader = OmegaConf.create() - -dataloader.train = L(build_detection_train_loader)( - dataset=L(get_detection_dataset_dicts)(names="coco_2017_train"), - mapper=L(DatasetMapper)( - is_train=True, - augmentations=[ - L(T.ResizeShortestEdge)( - short_edge_length=(640, 672, 704, 736, 768, 800), - sample_style="choice", - max_size=1333, - ), - L(T.RandomFlip)(horizontal=True), - ], - image_format="BGR", - use_instance_mask=True, - ), - total_batch_size=16, - num_workers=4, -) - -dataloader.test = L(build_detection_test_loader)( - dataset=L(get_detection_dataset_dicts)(names="coco_2017_val", filter_empty=False), - mapper=L(DatasetMapper)( - is_train=False, - augmentations=[ - L(T.ResizeShortestEdge)(short_edge_length=800, max_size=1333), - ], - image_format="${...train.mapper.image_format}", - ), - num_workers=4, -) - -dataloader.evaluator = L(COCOEvaluator)( - dataset_name="${..test.dataset.names}", -) diff --git a/spaces/brjathu/HMR2.0/vendor/detectron2/projects/DensePose/densepose/converters/builtin.py b/spaces/brjathu/HMR2.0/vendor/detectron2/projects/DensePose/densepose/converters/builtin.py deleted file mode 100644 index 3bd48f8f7afc49cf38bf410f01bc673d446f37d7..0000000000000000000000000000000000000000 --- a/spaces/brjathu/HMR2.0/vendor/detectron2/projects/DensePose/densepose/converters/builtin.py +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. - -from ..structures import DensePoseChartPredictorOutput, DensePoseEmbeddingPredictorOutput -from . import ( - HFlipConverter, - ToChartResultConverter, - ToChartResultConverterWithConfidences, - ToMaskConverter, - densepose_chart_predictor_output_hflip, - densepose_chart_predictor_output_to_result, - densepose_chart_predictor_output_to_result_with_confidences, - predictor_output_with_coarse_segm_to_mask, - predictor_output_with_fine_and_coarse_segm_to_mask, -) - -ToMaskConverter.register( - DensePoseChartPredictorOutput, predictor_output_with_fine_and_coarse_segm_to_mask -) -ToMaskConverter.register( - DensePoseEmbeddingPredictorOutput, predictor_output_with_coarse_segm_to_mask -) - -ToChartResultConverter.register( - DensePoseChartPredictorOutput, densepose_chart_predictor_output_to_result -) - -ToChartResultConverterWithConfidences.register( - DensePoseChartPredictorOutput, densepose_chart_predictor_output_to_result_with_confidences -) - -HFlipConverter.register(DensePoseChartPredictorOutput, densepose_chart_predictor_output_hflip) diff --git a/spaces/camilosegura/traductor-multilenguaje/Lib/site-packages/PIL/SunImagePlugin.py b/spaces/camilosegura/traductor-multilenguaje/Lib/site-packages/PIL/SunImagePlugin.py deleted file mode 100644 index 6712583d71cc6f7ded205eb812c7fe5ee77f6ac6..0000000000000000000000000000000000000000 --- a/spaces/camilosegura/traductor-multilenguaje/Lib/site-packages/PIL/SunImagePlugin.py +++ /dev/null @@ -1,139 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# Sun image file handling -# -# History: -# 1995-09-10 fl Created -# 1996-05-28 fl Fixed 32-bit alignment -# 1998-12-29 fl Import ImagePalette module -# 2001-12-18 fl Fixed palette loading (from Jean-Claude Rimbault) -# -# Copyright (c) 1997-2001 by Secret Labs AB -# Copyright (c) 1995-1996 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# - - -from . import Image, ImageFile, ImagePalette -from ._binary import i32be as i32 - - -def _accept(prefix): - return len(prefix) >= 4 and i32(prefix) == 0x59A66A95 - - -## -# Image plugin for Sun raster files. - - -class SunImageFile(ImageFile.ImageFile): - format = "SUN" - format_description = "Sun Raster File" - - def _open(self): - # The Sun Raster file header is 32 bytes in length - # and has the following format: - - # typedef struct _SunRaster - # { - # DWORD MagicNumber; /* Magic (identification) number */ - # DWORD Width; /* Width of image in pixels */ - # DWORD Height; /* Height of image in pixels */ - # DWORD Depth; /* Number of bits per pixel */ - # DWORD Length; /* Size of image data in bytes */ - # DWORD Type; /* Type of raster file */ - # DWORD ColorMapType; /* Type of color map */ - # DWORD ColorMapLength; /* Size of the color map in bytes */ - # } SUNRASTER; - - # HEAD - s = self.fp.read(32) - if not _accept(s): - msg = "not an SUN raster file" - raise SyntaxError(msg) - - offset = 32 - - self._size = i32(s, 4), i32(s, 8) - - depth = i32(s, 12) - # data_length = i32(s, 16) # unreliable, ignore. - file_type = i32(s, 20) - palette_type = i32(s, 24) # 0: None, 1: RGB, 2: Raw/arbitrary - palette_length = i32(s, 28) - - if depth == 1: - self.mode, rawmode = "1", "1;I" - elif depth == 4: - self.mode, rawmode = "L", "L;4" - elif depth == 8: - self.mode = rawmode = "L" - elif depth == 24: - if file_type == 3: - self.mode, rawmode = "RGB", "RGB" - else: - self.mode, rawmode = "RGB", "BGR" - elif depth == 32: - if file_type == 3: - self.mode, rawmode = "RGB", "RGBX" - else: - self.mode, rawmode = "RGB", "BGRX" - else: - msg = "Unsupported Mode/Bit Depth" - raise SyntaxError(msg) - - if palette_length: - if palette_length > 1024: - msg = "Unsupported Color Palette Length" - raise SyntaxError(msg) - - if palette_type != 1: - msg = "Unsupported Palette Type" - raise SyntaxError(msg) - - offset = offset + palette_length - self.palette = ImagePalette.raw("RGB;L", self.fp.read(palette_length)) - if self.mode == "L": - self.mode = "P" - rawmode = rawmode.replace("L", "P") - - # 16 bit boundaries on stride - stride = ((self.size[0] * depth + 15) // 16) * 2 - - # file type: Type is the version (or flavor) of the bitmap - # file. The following values are typically found in the Type - # field: - # 0000h Old - # 0001h Standard - # 0002h Byte-encoded - # 0003h RGB format - # 0004h TIFF format - # 0005h IFF format - # FFFFh Experimental - - # Old and standard are the same, except for the length tag. - # byte-encoded is run-length-encoded - # RGB looks similar to standard, but RGB byte order - # TIFF and IFF mean that they were converted from T/IFF - # Experimental means that it's something else. - # (https://www.fileformat.info/format/sunraster/egff.htm) - - if file_type in (0, 1, 3, 4, 5): - self.tile = [("raw", (0, 0) + self.size, offset, (rawmode, stride))] - elif file_type == 2: - self.tile = [("sun_rle", (0, 0) + self.size, offset, rawmode)] - else: - msg = "Unsupported Sun Raster file type" - raise SyntaxError(msg) - - -# -# registry - - -Image.register_open(SunImageFile.format, SunImageFile, _accept) - -Image.register_extension(SunImageFile.format, ".ras") diff --git a/spaces/candlend/vits-hoshimi/vits/data_utils.py b/spaces/candlend/vits-hoshimi/vits/data_utils.py deleted file mode 100644 index b627d2ac93285bb533fd51f16b6f908dbab61a20..0000000000000000000000000000000000000000 --- a/spaces/candlend/vits-hoshimi/vits/data_utils.py +++ /dev/null @@ -1,392 +0,0 @@ -import time -import os -import random -import numpy as np -import torch -import torch.utils.data - -import commons -from mel_processing import spectrogram_torch -from utils import load_wav_to_torch, load_filepaths_and_text -from text import text_to_sequence, cleaned_text_to_sequence - - -class TextAudioLoader(torch.utils.data.Dataset): - """ - 1) loads audio, text pairs - 2) normalizes text and converts them to sequences of integers - 3) computes spectrograms from audio files. - """ - def __init__(self, audiopaths_and_text, hparams): - self.audiopaths_and_text = load_filepaths_and_text(audiopaths_and_text) - self.text_cleaners = hparams.text_cleaners - self.max_wav_value = hparams.max_wav_value - self.sampling_rate = hparams.sampling_rate - self.filter_length = hparams.filter_length - self.hop_length = hparams.hop_length - self.win_length = hparams.win_length - self.sampling_rate = hparams.sampling_rate - - self.cleaned_text = getattr(hparams, "cleaned_text", False) - - self.add_blank = hparams.add_blank - self.min_text_len = getattr(hparams, "min_text_len", 1) - self.max_text_len = getattr(hparams, "max_text_len", 190) - - random.seed(1234) - random.shuffle(self.audiopaths_and_text) - self._filter() - - - def _filter(self): - """ - Filter text & store spec lengths - """ - # Store spectrogram lengths for Bucketing - # wav_length ~= file_size / (wav_channels * Bytes per dim) = file_size / (1 * 2) - # spec_length = wav_length // hop_length - - audiopaths_and_text_new = [] - lengths = [] - for audiopath, text in self.audiopaths_and_text: - if self.min_text_len <= len(text) and len(text) <= self.max_text_len: - audiopaths_and_text_new.append([audiopath, text]) - lengths.append(os.path.getsize(audiopath) // (2 * self.hop_length)) - self.audiopaths_and_text = audiopaths_and_text_new - self.lengths = lengths - - def get_audio_text_pair(self, audiopath_and_text): - # separate filename and text - audiopath, text = audiopath_and_text[0], audiopath_and_text[1] - text = self.get_text(text) - spec, wav = self.get_audio(audiopath) - return (text, spec, wav) - - def get_audio(self, filename): - audio, sampling_rate = load_wav_to_torch(filename) - if sampling_rate != self.sampling_rate: - raise ValueError("{} SR doesn't match target {} SR".format( - sampling_rate, self.sampling_rate)) - audio_norm = audio / self.max_wav_value - audio_norm = audio_norm.unsqueeze(0) - spec_filename = filename.replace(".wav", ".spec.pt") - if os.path.exists(spec_filename): - spec = torch.load(spec_filename) - else: - spec = spectrogram_torch(audio_norm, self.filter_length, - self.sampling_rate, self.hop_length, self.win_length, - center=False) - spec = torch.squeeze(spec, 0) - torch.save(spec, spec_filename) - return spec, audio_norm - - def get_text(self, text): - if self.cleaned_text: - text_norm = cleaned_text_to_sequence(text) - else: - text_norm = text_to_sequence(text, self.text_cleaners) - if self.add_blank: - text_norm = commons.intersperse(text_norm, 0) - text_norm = torch.LongTensor(text_norm) - return text_norm - - def __getitem__(self, index): - return self.get_audio_text_pair(self.audiopaths_and_text[index]) - - def __len__(self): - return len(self.audiopaths_and_text) - - -class TextAudioCollate(): - """ Zero-pads model inputs and targets - """ - def __init__(self, return_ids=False): - self.return_ids = return_ids - - def __call__(self, batch): - """Collate's training batch from normalized text and aduio - PARAMS - ------ - batch: [text_normalized, spec_normalized, wav_normalized] - """ - # Right zero-pad all one-hot text sequences to max input length - _, ids_sorted_decreasing = torch.sort( - torch.LongTensor([x[1].size(1) for x in batch]), - dim=0, descending=True) - - max_text_len = max([len(x[0]) for x in batch]) - max_spec_len = max([x[1].size(1) for x in batch]) - max_wav_len = max([x[2].size(1) for x in batch]) - - text_lengths = torch.LongTensor(len(batch)) - spec_lengths = torch.LongTensor(len(batch)) - wav_lengths = torch.LongTensor(len(batch)) - - text_padded = torch.LongTensor(len(batch), max_text_len) - spec_padded = torch.FloatTensor(len(batch), batch[0][1].size(0), max_spec_len) - wav_padded = torch.FloatTensor(len(batch), 1, max_wav_len) - text_padded.zero_() - spec_padded.zero_() - wav_padded.zero_() - for i in range(len(ids_sorted_decreasing)): - row = batch[ids_sorted_decreasing[i]] - - text = row[0] - text_padded[i, :text.size(0)] = text - text_lengths[i] = text.size(0) - - spec = row[1] - spec_padded[i, :, :spec.size(1)] = spec - spec_lengths[i] = spec.size(1) - - wav = row[2] - wav_padded[i, :, :wav.size(1)] = wav - wav_lengths[i] = wav.size(1) - - if self.return_ids: - return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths, ids_sorted_decreasing - return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths - - -"""Multi speaker version""" -class TextAudioSpeakerLoader(torch.utils.data.Dataset): - """ - 1) loads audio, speaker_id, text pairs - 2) normalizes text and converts them to sequences of integers - 3) computes spectrograms from audio files. - """ - def __init__(self, audiopaths_sid_text, hparams): - self.audiopaths_sid_text = load_filepaths_and_text(audiopaths_sid_text) - self.text_cleaners = hparams.text_cleaners - self.max_wav_value = hparams.max_wav_value - self.sampling_rate = hparams.sampling_rate - self.filter_length = hparams.filter_length - self.hop_length = hparams.hop_length - self.win_length = hparams.win_length - self.sampling_rate = hparams.sampling_rate - - self.cleaned_text = getattr(hparams, "cleaned_text", False) - - self.add_blank = hparams.add_blank - self.min_text_len = getattr(hparams, "min_text_len", 1) - self.max_text_len = getattr(hparams, "max_text_len", 190) - - random.seed(1234) - random.shuffle(self.audiopaths_sid_text) - self._filter() - - def _filter(self): - """ - Filter text & store spec lengths - """ - # Store spectrogram lengths for Bucketing - # wav_length ~= file_size / (wav_channels * Bytes per dim) = file_size / (1 * 2) - # spec_length = wav_length // hop_length - - audiopaths_sid_text_new = [] - lengths = [] - for audiopath, sid, text in self.audiopaths_sid_text: - if self.min_text_len <= len(text) and len(text) <= self.max_text_len: - audiopaths_sid_text_new.append([audiopath, sid, text]) - lengths.append(os.path.getsize(audiopath) // (2 * self.hop_length)) - self.audiopaths_sid_text = audiopaths_sid_text_new - self.lengths = lengths - - def get_audio_text_speaker_pair(self, audiopath_sid_text): - # separate filename, speaker_id and text - audiopath, sid, text = audiopath_sid_text[0], audiopath_sid_text[1], audiopath_sid_text[2] - text = self.get_text(text) - spec, wav = self.get_audio(audiopath) - sid = self.get_sid(sid) - return (text, spec, wav, sid) - - def get_audio(self, filename): - audio, sampling_rate = load_wav_to_torch(filename) - if sampling_rate != self.sampling_rate: - raise ValueError("{} {} SR doesn't match target {} SR".format( - sampling_rate, self.sampling_rate)) - audio_norm = audio / self.max_wav_value - audio_norm = audio_norm.unsqueeze(0) - spec_filename = filename.replace(".wav", ".spec.pt") - if os.path.exists(spec_filename): - spec = torch.load(spec_filename) - else: - spec = spectrogram_torch(audio_norm, self.filter_length, - self.sampling_rate, self.hop_length, self.win_length, - center=False) - spec = torch.squeeze(spec, 0) - torch.save(spec, spec_filename) - return spec, audio_norm - - def get_text(self, text): - if self.cleaned_text: - text_norm = cleaned_text_to_sequence(text) - else: - text_norm = text_to_sequence(text, self.text_cleaners) - if self.add_blank: - text_norm = commons.intersperse(text_norm, 0) - text_norm = torch.LongTensor(text_norm) - return text_norm - - def get_sid(self, sid): - sid = torch.LongTensor([int(sid)]) - return sid - - def __getitem__(self, index): - return self.get_audio_text_speaker_pair(self.audiopaths_sid_text[index]) - - def __len__(self): - return len(self.audiopaths_sid_text) - - -class TextAudioSpeakerCollate(): - """ Zero-pads model inputs and targets - """ - def __init__(self, return_ids=False): - self.return_ids = return_ids - - def __call__(self, batch): - """Collate's training batch from normalized text, audio and speaker identities - PARAMS - ------ - batch: [text_normalized, spec_normalized, wav_normalized, sid] - """ - # Right zero-pad all one-hot text sequences to max input length - _, ids_sorted_decreasing = torch.sort( - torch.LongTensor([x[1].size(1) for x in batch]), - dim=0, descending=True) - - max_text_len = max([len(x[0]) for x in batch]) - max_spec_len = max([x[1].size(1) for x in batch]) - max_wav_len = max([x[2].size(1) for x in batch]) - - text_lengths = torch.LongTensor(len(batch)) - spec_lengths = torch.LongTensor(len(batch)) - wav_lengths = torch.LongTensor(len(batch)) - sid = torch.LongTensor(len(batch)) - - text_padded = torch.LongTensor(len(batch), max_text_len) - spec_padded = torch.FloatTensor(len(batch), batch[0][1].size(0), max_spec_len) - wav_padded = torch.FloatTensor(len(batch), 1, max_wav_len) - text_padded.zero_() - spec_padded.zero_() - wav_padded.zero_() - for i in range(len(ids_sorted_decreasing)): - row = batch[ids_sorted_decreasing[i]] - - text = row[0] - text_padded[i, :text.size(0)] = text - text_lengths[i] = text.size(0) - - spec = row[1] - spec_padded[i, :, :spec.size(1)] = spec - spec_lengths[i] = spec.size(1) - - wav = row[2] - wav_padded[i, :, :wav.size(1)] = wav - wav_lengths[i] = wav.size(1) - - sid[i] = row[3] - - if self.return_ids: - return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths, sid, ids_sorted_decreasing - return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths, sid - - -class DistributedBucketSampler(torch.utils.data.distributed.DistributedSampler): - """ - Maintain similar input lengths in a batch. - Length groups are specified by boundaries. - Ex) boundaries = [b1, b2, b3] -> any batch is included either {x | b1 < length(x) <=b2} or {x | b2 < length(x) <= b3}. - - It removes samples which are not included in the boundaries. - Ex) boundaries = [b1, b2, b3] -> any x s.t. length(x) <= b1 or length(x) > b3 are discarded. - """ - def __init__(self, dataset, batch_size, boundaries, num_replicas=None, rank=None, shuffle=True): - super().__init__(dataset, num_replicas=num_replicas, rank=rank, shuffle=shuffle) - self.lengths = dataset.lengths - self.batch_size = batch_size - self.boundaries = boundaries - - self.buckets, self.num_samples_per_bucket = self._create_buckets() - self.total_size = sum(self.num_samples_per_bucket) - self.num_samples = self.total_size // self.num_replicas - - def _create_buckets(self): - buckets = [[] for _ in range(len(self.boundaries) - 1)] - for i in range(len(self.lengths)): - length = self.lengths[i] - idx_bucket = self._bisect(length) - if idx_bucket != -1: - buckets[idx_bucket].append(i) - - for i in range(len(buckets) - 1, 0, -1): - if len(buckets[i]) == 0: - buckets.pop(i) - self.boundaries.pop(i+1) - - num_samples_per_bucket = [] - for i in range(len(buckets)): - len_bucket = len(buckets[i]) - total_batch_size = self.num_replicas * self.batch_size - rem = (total_batch_size - (len_bucket % total_batch_size)) % total_batch_size - num_samples_per_bucket.append(len_bucket + rem) - return buckets, num_samples_per_bucket - - def __iter__(self): - # deterministically shuffle based on epoch - g = torch.Generator() - g.manual_seed(self.epoch) - - indices = [] - if self.shuffle: - for bucket in self.buckets: - indices.append(torch.randperm(len(bucket), generator=g).tolist()) - else: - for bucket in self.buckets: - indices.append(list(range(len(bucket)))) - - batches = [] - for i in range(len(self.buckets)): - bucket = self.buckets[i] - len_bucket = len(bucket) - ids_bucket = indices[i] - num_samples_bucket = self.num_samples_per_bucket[i] - - # add extra samples to make it evenly divisible - rem = num_samples_bucket - len_bucket - ids_bucket = ids_bucket + ids_bucket * (rem // len_bucket) + ids_bucket[:(rem % len_bucket)] - - # subsample - ids_bucket = ids_bucket[self.rank::self.num_replicas] - - # batching - for j in range(len(ids_bucket) // self.batch_size): - batch = [bucket[idx] for idx in ids_bucket[j*self.batch_size:(j+1)*self.batch_size]] - batches.append(batch) - - if self.shuffle: - batch_ids = torch.randperm(len(batches), generator=g).tolist() - batches = [batches[i] for i in batch_ids] - self.batches = batches - - assert len(self.batches) * self.batch_size == self.num_samples - return iter(self.batches) - - def _bisect(self, x, lo=0, hi=None): - if hi is None: - hi = len(self.boundaries) - 1 - - if hi > lo: - mid = (hi + lo) // 2 - if self.boundaries[mid] < x and x <= self.boundaries[mid+1]: - return mid - elif x <= self.boundaries[mid]: - return self._bisect(x, lo, mid) - else: - return self._bisect(x, mid + 1, hi) - else: - return -1 - - def __len__(self): - return self.num_samples // self.batch_size diff --git a/spaces/carlosalonso/Detection-video/README.md b/spaces/carlosalonso/Detection-video/README.md deleted file mode 100644 index 00c769bb3cfffd078b5cc0905c270eccb8faa025..0000000000000000000000000000000000000000 --- a/spaces/carlosalonso/Detection-video/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Detection Video -emoji: 🌖 -colorFrom: yellow -colorTo: green -sdk: gradio -sdk_version: 3.13.0 -app_file: app.py -pinned: false ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference - diff --git a/spaces/carlosalonso/Detection-video/carpeta_deteccion/detectron2/config/compat.py b/spaces/carlosalonso/Detection-video/carpeta_deteccion/detectron2/config/compat.py deleted file mode 100644 index 11a08c439bf14defd880e37a938fab8a08e68eeb..0000000000000000000000000000000000000000 --- a/spaces/carlosalonso/Detection-video/carpeta_deteccion/detectron2/config/compat.py +++ /dev/null @@ -1,229 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -""" -Backward compatibility of configs. - -Instructions to bump version: -+ It's not needed to bump version if new keys are added. - It's only needed when backward-incompatible changes happen - (i.e., some existing keys disappear, or the meaning of a key changes) -+ To bump version, do the following: - 1. Increment _C.VERSION in defaults.py - 2. Add a converter in this file. - - Each ConverterVX has a function "upgrade" which in-place upgrades config from X-1 to X, - and a function "downgrade" which in-place downgrades config from X to X-1 - - In each function, VERSION is left unchanged. - - Each converter assumes that its input has the relevant keys - (i.e., the input is not a partial config). - 3. Run the tests (test_config.py) to make sure the upgrade & downgrade - functions are consistent. -""" - -import logging -from typing import List, Optional, Tuple - -from .config import CfgNode as CN -from .defaults import _C - -__all__ = ["upgrade_config", "downgrade_config"] - - -def upgrade_config(cfg: CN, to_version: Optional[int] = None) -> CN: - """ - Upgrade a config from its current version to a newer version. - - Args: - cfg (CfgNode): - to_version (int): defaults to the latest version. - """ - cfg = cfg.clone() - if to_version is None: - to_version = _C.VERSION - - assert cfg.VERSION <= to_version, "Cannot upgrade from v{} to v{}!".format( - cfg.VERSION, to_version - ) - for k in range(cfg.VERSION, to_version): - converter = globals()["ConverterV" + str(k + 1)] - converter.upgrade(cfg) - cfg.VERSION = k + 1 - return cfg - - -def downgrade_config(cfg: CN, to_version: int) -> CN: - """ - Downgrade a config from its current version to an older version. - - Args: - cfg (CfgNode): - to_version (int): - - Note: - A general downgrade of arbitrary configs is not always possible due to the - different functionalities in different versions. - The purpose of downgrade is only to recover the defaults in old versions, - allowing it to load an old partial yaml config. - Therefore, the implementation only needs to fill in the default values - in the old version when a general downgrade is not possible. - """ - cfg = cfg.clone() - assert cfg.VERSION >= to_version, "Cannot downgrade from v{} to v{}!".format( - cfg.VERSION, to_version - ) - for k in range(cfg.VERSION, to_version, -1): - converter = globals()["ConverterV" + str(k)] - converter.downgrade(cfg) - cfg.VERSION = k - 1 - return cfg - - -def guess_version(cfg: CN, filename: str) -> int: - """ - Guess the version of a partial config where the VERSION field is not specified. - Returns the version, or the latest if cannot make a guess. - - This makes it easier for users to migrate. - """ - logger = logging.getLogger(__name__) - - def _has(name: str) -> bool: - cur = cfg - for n in name.split("."): - if n not in cur: - return False - cur = cur[n] - return True - - # Most users' partial configs have "MODEL.WEIGHT", so guess on it - ret = None - if _has("MODEL.WEIGHT") or _has("TEST.AUG_ON"): - ret = 1 - - if ret is not None: - logger.warning("Config '{}' has no VERSION. Assuming it to be v{}.".format(filename, ret)) - else: - ret = _C.VERSION - logger.warning( - "Config '{}' has no VERSION. Assuming it to be compatible with latest v{}.".format( - filename, ret - ) - ) - return ret - - -def _rename(cfg: CN, old: str, new: str) -> None: - old_keys = old.split(".") - new_keys = new.split(".") - - def _set(key_seq: List[str], val: str) -> None: - cur = cfg - for k in key_seq[:-1]: - if k not in cur: - cur[k] = CN() - cur = cur[k] - cur[key_seq[-1]] = val - - def _get(key_seq: List[str]) -> CN: - cur = cfg - for k in key_seq: - cur = cur[k] - return cur - - def _del(key_seq: List[str]) -> None: - cur = cfg - for k in key_seq[:-1]: - cur = cur[k] - del cur[key_seq[-1]] - if len(cur) == 0 and len(key_seq) > 1: - _del(key_seq[:-1]) - - _set(new_keys, _get(old_keys)) - _del(old_keys) - - -class _RenameConverter: - """ - A converter that handles simple rename. - """ - - RENAME: List[Tuple[str, str]] = [] # list of tuples of (old name, new name) - - @classmethod - def upgrade(cls, cfg: CN) -> None: - for old, new in cls.RENAME: - _rename(cfg, old, new) - - @classmethod - def downgrade(cls, cfg: CN) -> None: - for old, new in cls.RENAME[::-1]: - _rename(cfg, new, old) - - -class ConverterV1(_RenameConverter): - RENAME = [("MODEL.RPN_HEAD.NAME", "MODEL.RPN.HEAD_NAME")] - - -class ConverterV2(_RenameConverter): - """ - A large bulk of rename, before public release. - """ - - RENAME = [ - ("MODEL.WEIGHT", "MODEL.WEIGHTS"), - ("MODEL.PANOPTIC_FPN.SEMANTIC_LOSS_SCALE", "MODEL.SEM_SEG_HEAD.LOSS_WEIGHT"), - ("MODEL.PANOPTIC_FPN.RPN_LOSS_SCALE", "MODEL.RPN.LOSS_WEIGHT"), - ("MODEL.PANOPTIC_FPN.INSTANCE_LOSS_SCALE", "MODEL.PANOPTIC_FPN.INSTANCE_LOSS_WEIGHT"), - ("MODEL.PANOPTIC_FPN.COMBINE_ON", "MODEL.PANOPTIC_FPN.COMBINE.ENABLED"), - ( - "MODEL.PANOPTIC_FPN.COMBINE_OVERLAP_THRESHOLD", - "MODEL.PANOPTIC_FPN.COMBINE.OVERLAP_THRESH", - ), - ( - "MODEL.PANOPTIC_FPN.COMBINE_STUFF_AREA_LIMIT", - "MODEL.PANOPTIC_FPN.COMBINE.STUFF_AREA_LIMIT", - ), - ( - "MODEL.PANOPTIC_FPN.COMBINE_INSTANCES_CONFIDENCE_THRESHOLD", - "MODEL.PANOPTIC_FPN.COMBINE.INSTANCES_CONFIDENCE_THRESH", - ), - ("MODEL.ROI_HEADS.SCORE_THRESH", "MODEL.ROI_HEADS.SCORE_THRESH_TEST"), - ("MODEL.ROI_HEADS.NMS", "MODEL.ROI_HEADS.NMS_THRESH_TEST"), - ("MODEL.RETINANET.INFERENCE_SCORE_THRESHOLD", "MODEL.RETINANET.SCORE_THRESH_TEST"), - ("MODEL.RETINANET.INFERENCE_TOPK_CANDIDATES", "MODEL.RETINANET.TOPK_CANDIDATES_TEST"), - ("MODEL.RETINANET.INFERENCE_NMS_THRESHOLD", "MODEL.RETINANET.NMS_THRESH_TEST"), - ("TEST.DETECTIONS_PER_IMG", "TEST.DETECTIONS_PER_IMAGE"), - ("TEST.AUG_ON", "TEST.AUG.ENABLED"), - ("TEST.AUG_MIN_SIZES", "TEST.AUG.MIN_SIZES"), - ("TEST.AUG_MAX_SIZE", "TEST.AUG.MAX_SIZE"), - ("TEST.AUG_FLIP", "TEST.AUG.FLIP"), - ] - - @classmethod - def upgrade(cls, cfg: CN) -> None: - super().upgrade(cfg) - - if cfg.MODEL.META_ARCHITECTURE == "RetinaNet": - _rename( - cfg, "MODEL.RETINANET.ANCHOR_ASPECT_RATIOS", "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS" - ) - _rename(cfg, "MODEL.RETINANET.ANCHOR_SIZES", "MODEL.ANCHOR_GENERATOR.SIZES") - del cfg["MODEL"]["RPN"]["ANCHOR_SIZES"] - del cfg["MODEL"]["RPN"]["ANCHOR_ASPECT_RATIOS"] - else: - _rename(cfg, "MODEL.RPN.ANCHOR_ASPECT_RATIOS", "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS") - _rename(cfg, "MODEL.RPN.ANCHOR_SIZES", "MODEL.ANCHOR_GENERATOR.SIZES") - del cfg["MODEL"]["RETINANET"]["ANCHOR_SIZES"] - del cfg["MODEL"]["RETINANET"]["ANCHOR_ASPECT_RATIOS"] - del cfg["MODEL"]["RETINANET"]["ANCHOR_STRIDES"] - - @classmethod - def downgrade(cls, cfg: CN) -> None: - super().downgrade(cfg) - - _rename(cfg, "MODEL.ANCHOR_GENERATOR.ASPECT_RATIOS", "MODEL.RPN.ANCHOR_ASPECT_RATIOS") - _rename(cfg, "MODEL.ANCHOR_GENERATOR.SIZES", "MODEL.RPN.ANCHOR_SIZES") - cfg.MODEL.RETINANET.ANCHOR_ASPECT_RATIOS = cfg.MODEL.RPN.ANCHOR_ASPECT_RATIOS - cfg.MODEL.RETINANET.ANCHOR_SIZES = cfg.MODEL.RPN.ANCHOR_SIZES - cfg.MODEL.RETINANET.ANCHOR_STRIDES = [] # this is not used anywhere in any version diff --git a/spaces/carlosalonso/Detection-video/carpeta_deteccion/detectron2/data/datasets/README.md b/spaces/carlosalonso/Detection-video/carpeta_deteccion/detectron2/data/datasets/README.md deleted file mode 100644 index 9fb3e4f7afec17137c95c78be6ef06d520ec8032..0000000000000000000000000000000000000000 --- a/spaces/carlosalonso/Detection-video/carpeta_deteccion/detectron2/data/datasets/README.md +++ /dev/null @@ -1,9 +0,0 @@ - - -### Common Datasets - -The dataset implemented here do not need to load the data into the final format. -It should provide the minimal data structure needed to use the dataset, so it can be very efficient. - -For example, for an image dataset, just provide the file names and labels, but don't read the images. -Let the downstream decide how to read. diff --git a/spaces/cchuang2009/CO2/app.py b/spaces/cchuang2009/CO2/app.py deleted file mode 100644 index e23bf84e7ab45e347f50246dde46eccf6d2d6777..0000000000000000000000000000000000000000 --- a/spaces/cchuang2009/CO2/app.py +++ /dev/null @@ -1,60 +0,0 @@ -import streamlit as st -import numpy as np -import pandas as pd -import ast -import pickle - -from pycaret.regression import load_model, predict_model, setup - -MAKE_url= "https://raw.githubusercontent.com/cchuang2009/2022-1/main/Python_IM/2023-2/data/MAKE.csv" -df_group = pd.read_csv(MAKE_url, index_col=0) - -features=list(df_group.columns) - -target = ['CO2EMISSIONS'] - -with open('model_pkl.pkl' , 'rb') as f: - model_cat = pickle.load(f) -#model_cat = load_model('model_pkl') - -st.title('CO2 Emission of Vehicles') -st.markdown("## 汽車二氧化碳排放量") -st.subheader('CO2 Emission of Vehicle') - -num_cols=['ENGINESIZE', - 'CYLINDERS', - 'FUELCONSUMPTION_CITY', - 'FUELCONSUMPTION_HWY', - 'FUELCONSUMPTION_COMB', - 'FUELCONSUMPTION_COMB_MPG'] - -# choose 'MAKE' -makes = list(df_group.index) -make = st.selectbox('MAKE', options=makes, index=0) - -# create selection boxes for categorical columns -# these two kinds features could be integrated by only one, features. -cat_cols=['MAKE','VEHICLECLASS','TRANSMISSION','FUELTYPE'] -cat_values = [make] -for cat_col in cat_cols[1:]: - options = ast.literal_eval(df_group.loc[make, cat_col]) - cat_val = st.selectbox(cat_col, options=options) - cat_values.append(cat_val) - -num_values = [] -for num_col in num_cols: - options = ast.literal_eval(df_group.loc[make, num_col]) - num_val = st.selectbox(num_col, options=options) - num_values.append(num_val) - -final_features = np.array(num_values + cat_values).reshape(1, -1) - -if st.button('Estimate'): - new_data = pd.DataFrame(data=final_features, columns=num_cols + cat_cols) - prediction = predict_model(estimator=model_cat, data=new_data) - #st.balloons() - input_=new_data[['MAKE','ENGINESIZE','CYLINDERS','VEHICLECLASS','TRANSMISSION','FUELTYPE','FUELCONSUMPTION_CITY', - 'FUELCONSUMPTION_HWY','FUELCONSUMPTION_COMB','FUELCONSUMPTION_COMB_MPG']] - st.write(input_.T) - result = int(prediction['prediction_label'][0]) - st.success(f'Estimated CO2 Emission is {result}') diff --git a/spaces/cfwef/gpt/self_analysis.md b/spaces/cfwef/gpt/self_analysis.md deleted file mode 100644 index acfbd3e91b46738af42c4a4859b08570be59d485..0000000000000000000000000000000000000000 --- a/spaces/cfwef/gpt/self_analysis.md +++ /dev/null @@ -1,175 +0,0 @@ -# chatgpt-academic项目自译解报告 -(Author补充:以下分析均由本项目调用ChatGPT一键生成,如果有不准确的地方,全怪GPT😄) - -## [0/18] 程序摘要: functional_crazy.py - -这是一个功能扩展的程序,文件名为 `functional_crazy.py`。代码的主要功能是通过提供一系列函数插件,增强程序的功能,让用户可以通过界面中的按钮,快速调用对应的函数插件实现相应的操作。代码中使用了 `HotReload` 函数插件,可以在不重启程序的情况下更新函数插件的代码,让其生效。同时,通过 `UserVisibleLevel` 变量的设置,可以控制哪些插件会在UI界面显示出来。函数插件列表包括了以下功能:解析项目本身、解析一个Python项目、解析一个C++项目头文件、解析一个C++项目、读取文章并生成摘要、批量生成函数注释、全项目切换成英文、批量总结PDF文档、批量总结PDF文档pdfminer、批量总结Word文档、高阶功能模板函数、以及其他未经充分测试的函数插件。 - -## [1/18] 程序摘要: main.py - -该程序是一个基于Gradio构建的对话生成模型的Web界面示例,包含了以下主要功能: - -1.加载模型并对用户输入进行响应; -2.通过调用外部函数库来获取用户的输入,并在模型生成的过程中进行处理; -3.支持用户上传本地文件,供外部函数库调用; -4.支持停止当前的生成过程; -5.保存用户的历史记录,并将其记录在本地日志文件中,以供后续分析和使用。 - -该程序需要依赖于一些外部库和软件包,如Gradio、torch等。用户需要确保这些依赖项已经安装,并且在运行该程序前对config_private.py配置文件进行相应的修改。 - -## [2/18] 程序摘要: functional.py - -该文件定义了一个名为“functional”的函数,函数的作用是返回一个包含多个字典(键值对)的字典,每个键值对表示一种功能。该字典的键值由功能名称和对应的数据组成。其中的每个字典都包含4个键值对,分别为“Prefix”、“Suffix”、“Color”和“PreProcess”,分别表示前缀、后缀、按钮颜色和预处理函数。如果某些键值对没有给出,那么程序中默认相应的值,如按钮颜色默认为“secondary”等。每个功能描述了不同的学术润色/翻译/其他服务,如“英语学术润色”、“中文学术润色”、“查找语法错误”等。函数还引用了一个名为“clear_line_break”的函数,用于预处理修改前的文本。 - -## [3/18] 程序摘要: show_math.py - -该程序文件名为show_math.py,主要用途是将Markdown和LaTeX混合格式转换成带有MathML的HTML格式。该程序通过递归地处理LaTeX和Markdown混合段落逐一转换成HTML/MathML标记出来,并在LaTeX公式创建中进行错误处理。在程序文件中定义了3个变量,分别是incomplete,convError和convert,其中convert函数是用来执行转换的主要函数。程序使用正则表达式进行LaTeX格式和Markdown段落的分割,从而实现转换。如果在Latex转换过程中发生错误,程序将输出相应的错误信息。 - -## [4/18] 程序摘要: predict.py - -本程序文件的文件名为"./predict.py",主要包含三个函数: - -1. predict:正常对话时使用,具备完备的交互功能,不可多线程; -2. predict_no_ui:高级实验性功能模块调用,不会实时显示在界面上,参数简单,可以多线程并行,方便实现复杂的功能逻辑; -3. predict_no_ui_long_connection:在实验过程中发现调用predict_no_ui处理长文档时,和openai的连接容易断掉,这个函数用stream的方式解决这个问题,同样支持多线程。 - -其中,predict函数用于基础的对话功能,发送至chatGPT,流式获取输出,根据点击的哪个按钮,进行对话预处理等额外操作;predict_no_ui函数用于payload比较大的情况,或者用于实现多线、带嵌套的复杂功能;predict_no_ui_long_connection实现调用predict_no_ui处理长文档时,避免连接断掉的情况,支持多线程。 - -## [5/18] 程序摘要: check_proxy.py - -该程序文件名为check_proxy.py,主要功能是检查代理服务器的可用性并返回代理服务器的地理位置信息或错误提示。具体实现方式如下: - -首先使用requests模块向指定网站(https://ipapi.co/json/)发送GET请求,请求结果以JSON格式返回。如果代理服务器参数(proxies)是有效的且没有指明'https'代理,则用默认字典值'无'替代。 - -然后,程序会解析返回的JSON数据,并根据数据中是否包含国家名字字段来判断代理服务器的地理位置。如果有国家名字字段,则将其打印出来并返回代理服务器的相关信息。如果没有国家名字字段,但有错误信息字段,则返回其他错误提示信息。 - -在程序执行前,程序会先设置环境变量no_proxy,并使用toolbox模块中的get_conf函数从配置文件中读取代理参数。 - -最后,检测程序会输出检查结果并返回对应的结果字符串。 - -## [6/18] 程序摘要: config_private.py - -本程序文件名为`config_private.py`,其功能为配置私有信息以便在主程序中使用。主要功能包括: - -- 配置OpenAI API的密钥和API URL -- 配置是否使用代理,如果使用代理配置代理地址和端口 -- 配置发送请求的超时时间和失败重试次数的限制 -- 配置并行使用线程数和用户名密码 -- 提供检查功能以确保API密钥已经正确设置 - -其中,需要特别注意的是:最后一个检查功能要求在运行之前必须将API密钥正确设置,否则程序会直接退出。 - -## [7/18] 程序摘要: config.py - -该程序文件是一个配置文件,用于配置OpenAI的API参数和优化体验的相关参数,具体包括以下几个步骤: - -1.设置OpenAI的API密钥。 - -2.选择是否使用代理,如果使用则需要设置代理地址和端口等参数。 - -3.设置请求OpenAI后的超时时间、网页的端口、重试次数、选择的OpenAI模型、API的网址等。 - -4.设置并行使用的线程数和用户名密码。 - -该程序文件的作用为在使用OpenAI API时进行相关参数的配置,以保证请求的正确性和速度,并且优化使用体验。 - -## [8/18] 程序摘要: theme.py - -该程序是一个自定义Gradio主题的Python模块。主题文件名为"./theme.py"。程序引入了Gradio模块,并定义了一个名为"adjust_theme()"的函数。该函数根据输入值调整Gradio的默认主题,返回一个包含所需自定义属性的主题对象。主题属性包括颜色、字体、过渡、阴影、按钮边框和渐变等。主题颜色列表包括石板色、灰色、锌色、中性色、石头色、红色、橙色、琥珀色、黄色、酸橙色、绿色、祖母绿、青蓝色、青色、天蓝色、蓝色、靛蓝色、紫罗兰色、紫色、洋红色、粉红色和玫瑰色。如果Gradio版本较旧,则不能自定义字体和颜色。 - -## [9/18] 程序摘要: toolbox.py - -该程序文件包含了一系列函数,用于实现聊天程序所需的各种功能,如预测对话、将对话记录写入文件、将普通文本转换为Markdown格式文本、装饰器函数CatchException和HotReload等。其中一些函数用到了第三方库,如Python-Markdown、mdtex2html、zipfile、tarfile、rarfile和py7zr。除此之外,还有一些辅助函数,如get_conf、clear_line_break和extract_archive等。主要功能包括: - -1. 导入markdown、mdtex2html、threading、functools等模块。 -2. 定义函数predict_no_ui_but_counting_down,用于生成对话。 -3. 定义函数write_results_to_file,用于将对话记录生成Markdown文件。 -4. 定义函数regular_txt_to_markdown,将普通文本转换为Markdown格式的文本。 -5. 定义装饰器函数CatchException,用于捕获函数执行异常并返回生成器。 -6. 定义函数report_execption,用于向chatbot中添加错误信息。 -7. 定义函数text_divide_paragraph,用于将文本按照段落分隔符分割开,生成带有段落标签的HTML代码。 -8. 定义函数markdown_convertion,用于将Markdown格式的文本转换为HTML格式。 -9. 定义函数format_io,用于将输入和输出解析为HTML格式。 -10. 定义函数find_free_port,用于返回当前系统中可用的未使用端口。 -11. 定义函数extract_archive,用于解压归档文件。 -12. 定义函数find_recent_files,用于查找最近创建的文件。 -13. 定义函数on_file_uploaded,用于处理上传文件的操作。 -14. 定义函数on_report_generated,用于处理生成报告文件的操作。 - - -## [10/18] 程序摘要: crazy_functions/生成函数注释.py - -该程序文件是一个Python脚本,文件名为“生成函数注释.py”,位于“./crazy_functions/”目录下。该程序实现了一个批量生成函数注释的功能,可以对指定文件夹下的所有Python和C++源代码文件中的所有函数进行注释,使用Markdown表格输出注释结果。 - -该程序引用了predict.py和toolbox.py两个模块,其中predict.py实现了一个基于GPT模型的文本生成功能,用于生成函数注释,而toolbox.py实现了一些工具函数,包括异常处理函数、文本写入函数等。另外,该程序还定义了两个函数,一个是“生成函数注释”函数,用于处理单个文件的注释生成;另一个是“批量生成函数注释”函数,用于批量处理多个文件的注释生成。 - -## [11/18] 程序摘要: crazy_functions/读文章写摘要.py - -这个程序文件是一个名为“读文章写摘要”的函数。该函数的输入包括文章的文本内容、top_p(生成文本时选择最可能的词语的概率阈值)、temperature(控制生成文本的随机性的因子)、对话历史等参数,以及一个聊天机器人和一个系统提示的文本。该函数的主要工作是解析一组.tex文件,然后生成一段学术性语言的中文和英文摘要。在解析过程中,该函数使用一个名为“toolbox”的模块中的辅助函数和一个名为“predict”的模块中的函数来执行GPT-2模型的推理工作,然后将结果返回给聊天机器人。另外,该程序还包括一个名为“fast_debug”的bool型变量,用于调试和测试。 - -## [12/18] 程序摘要: crazy_functions/代码重写为全英文_多线程.py - -该程序文件实现了一个多线程操作,用于将指定目录下的所有 Python 文件中的中文转化为英文,并将转化后的文件存入另一个目录中。具体实现过程如下: - -1. 集合目标文件路径并清空历史记录。 -2. 循环目标文件,对每个文件启动一个线程进行任务操作。 -3. 各个线程同时开始执行任务函数,并在任务完成后将转化后的文件写入指定目录,最终生成一份任务执行报告。 - -## [13/18] 程序摘要: crazy_functions/高级功能函数模板.py - -该程序文件名为高级功能函数模板.py,它包含了一个名为“高阶功能模板函数”的函数,这个函数可以作为开发新功能函数的模板。该函数引用了predict.py和toolbox.py文件中的函数。在该函数内部,它首先清空了历史记录,然后对于今天和今天以后的四天,它问用户历史中哪些事件发生在这些日期,并列举两条事件并发送相关的图片。在向用户询问问题时,使用了GPT进行响应。由于请求GPT需要一定的时间,所以函数会在重新显示状态之前等待一段时间。在每次与用户的互动中,使用yield关键字生成器函数来输出聊天机器人的当前状态,包括聊天消息、历史记录和状态('正常')。最后,程序调用write_results_to_file函数将聊天的结果写入文件,以供后续的评估和分析。 - -## [14/18] 程序摘要: crazy_functions/总结word文档.py - -该程序文件名为总结word文档.py,主要功能是批量总结Word文档。具体实现过程是解析docx格式和doc格式文件,生成文件内容,然后使用自然语言处理工具对文章内容做中英文概述,最后给出建议。该程序需要依赖python-docx和pywin32,如果没有安装,会给出安装建议。 - -## [15/18] 程序摘要: crazy_functions/批量总结PDF文档pdfminer.py - -该程序文件名为pdfminer.py,位于./crazy_functions/目录下。程序实现了批量读取PDF文件,并使用pdfminer解析PDF文件内容。此外,程序还根据解析得到的文本内容,调用机器学习模型生成对每篇文章的概述,最终生成全文摘要。程序中还对模块依赖进行了导入检查,若缺少依赖,则会提供安装建议。 - -## [16/18] 程序摘要: crazy_functions/解析项目源代码.py - -这个程序文件中包含了几个函数,分别是: - -1. `解析源代码(file_manifest, project_folder, top_p, api_key, temperature, chatbot, history, systemPromptTxt)`:通过输入文件路径列表对程序文件进行逐文件分析,根据分析结果做出整体功能和构架的概括,并生成包括每个文件功能的markdown表格。 -2. `解析项目本身(txt, top_p, api_key, temperature, chatbot, history, systemPromptTxt, WEB_PORT)`:对当前文件夹下的所有Python文件及其子文件夹进行逐文件分析,并生成markdown表格。 -3. `解析一个Python项目(txt, top_p, api_key, temperature, chatbot, history, systemPromptTxt, WEB_PORT)`:对指定路径下的所有Python文件及其子文件夹进行逐文件分析,并生成markdown表格。 -4. `解析一个C项目的头文件(txt, top_p, api_key, temperature, chatbot, history, systemPromptTxt, WEB_PORT)`:对指定路径下的所有头文件进行逐文件分析,并生成markdown表格。 -5. `解析一个C项目(txt, top_p, api_key, temperature, chatbot, history, systemPromptTxt, WEB_PORT)`:对指定路径下的所有.h、.cpp、.c文件及其子文件夹进行逐文件分析,并生成markdown表格。 - -程序中还包含了一些辅助函数和变量,如CatchException装饰器函数,report_execption函数、write_results_to_file函数等。在执行过程中还会调用其他模块中的函数,如toolbox模块的函数和predict模块的函数。 - -## [17/18] 程序摘要: crazy_functions/批量总结PDF文档.py - -这个程序文件是一个名为“批量总结PDF文档”的函数插件。它导入了predict和toolbox模块,并定义了一些函数,包括is_paragraph_break,normalize_text和clean_text。这些函数是对输入文本进行预处理和清洗的功能函数。主要的功能函数是解析PDF,它打开每个PDF文件并将其内容存储在file_content变量中,然后传递给聊天机器人,以产生一句话的概括。在解析PDF文件之后,该函数连接了所有文件的摘要,以产生一段学术语言和英文摘要。最后,函数批量处理目标文件夹中的所有PDF文件,并输出结果。 - -## 根据以上你自己的分析,对程序的整体功能和构架做出概括。然后用一张markdown表格整理每个文件的功能。 - -该程序是一个聊天机器人,使用了OpenAI的GPT语言模型以及一些特殊的辅助功能去处理各种学术写作和科研润色任务。整个程序由一些函数组成,每个函数都代表了不同的学术润色/翻译/其他服务。 - -下面是程序中每个文件的功能列表: - -| 文件名 | 功能 | -|--------|--------| -| functional_crazy.py | 实现高级功能函数模板和其他一些辅助功能函数 | -| main.py | 程序的主要入口,负责程序的启动和UI的展示 | -| functional.py | 定义各种功能按钮的颜色和响应函数 | -| show_math.py | 解析LaTeX文本,将其转换为Markdown格式 | -| predict.py | 基础的对话功能,用于与chatGPT进行交互 | -| check_proxy.py | 检查代理设置的正确性 | -| config_private.py | 配置程序的API密钥和其他私有信息 | -| config.py | 配置OpenAI的API参数和程序的其他属性 | -| theme.py | 设置程序主题样式 | -| toolbox.py | 存放一些辅助函数供程序使用 | -| crazy_functions/生成函数注释.py | 生成Python文件中所有函数的注释 | -| crazy_functions/读文章写摘要.py | 解析文章文本,生成中英文摘要 | -| crazy_functions/代码重写为全英文_多线程.py | 将中文代码内容转化为英文 | -| crazy_functions/高级功能函数模板.py | 实现高级功能函数模板 | -| crazy_functions/总结word文档.py | 解析Word文件,生成文章内容的概要 | -| crazy_functions/批量总结PDF文档pdfminer.py | 解析PDF文件,生成文章内容的概要(使用pdfminer库) | -| crazy_functions/批量总结PDF文档.py | 解析PDF文件,生成文章内容的概要(使用PyMuPDF库) | -| crazy_functions/解析项目源代码.py | 解析C/C++源代码,生成markdown表格 | -| crazy_functions/批量总结PDF文档.py | 对PDF文件进行批量摘要生成 | - -总的来说,该程序提供了一系列的学术润色和翻译的工具,支持对各种类型的文件进行分析和处理。同时也提供了对话式用户界面,便于用户使用和交互。 - diff --git a/spaces/chendl/compositional_test/transformers/examples/research_projects/distillation/README.md b/spaces/chendl/compositional_test/transformers/examples/research_projects/distillation/README.md deleted file mode 100644 index 36b45f79889f0f1e4c0320772c26f3bbf52e00d4..0000000000000000000000000000000000000000 --- a/spaces/chendl/compositional_test/transformers/examples/research_projects/distillation/README.md +++ /dev/null @@ -1,193 +0,0 @@ -# Distil* - -Author: @VictorSanh - -This folder contains the original code used to train Distil* as well as examples showcasing how to use DistilBERT, DistilRoBERTa and DistilGPT2. - -**January 20, 2020 - Bug fixing** We have recently discovered and fixed [a bug](https://github.com/huggingface/transformers/commit/48cbf267c988b56c71a2380f748a3e6092ccaed3) in the evaluation of our `run_*.py` scripts that caused the reported metrics to be over-estimated on average. We have updated all the metrics with the latest runs. - -**December 6, 2019 - Update** We release **DistilmBERT**: 92% of `bert-base-multilingual-cased` on XNLI. The model supports 104 different languages listed [here](https://github.com/google-research/bert/blob/master/multilingual.md#list-of-languages). - -**November 19, 2019 - Update** We release German **DistilBERT**: 98.8% of `bert-base-german-dbmdz-cased` on NER tasks. - -**October 23, 2019 - Update** We release **DistilRoBERTa**: 95% of `RoBERTa-base`'s performance on GLUE, twice as fast as RoBERTa while being 35% smaller. - -**October 3, 2019 - Update** We release our [NeurIPS workshop paper](https://arxiv.org/abs/1910.01108) explaining our approach on **DistilBERT**. It includes updated results and further experiments. We applied the same method to GPT2 and release the weights of **DistilGPT2**. DistilGPT2 is two times faster and 33% smaller than GPT2. **The paper supersedes our [previous blogpost](https://medium.com/huggingface/distilbert-8cf3380435b5) with a different distillation loss and better performances. Please use the paper as a reference when comparing/reporting results on DistilBERT.** - -**September 19, 2019 - Update:** We fixed bugs in the code and released an updated version of the weights trained with a modification of the distillation loss. DistilBERT now reaches 99% of `BERT-base`'s performance on GLUE, and 86.9 F1 score on SQuAD v1.1 dev set (compared to 88.5 for `BERT-base`). We will publish a formal write-up of our approach in the near future! - - -## What is Distil* - -Distil* is a class of compressed models that started with DistilBERT. DistilBERT stands for Distilled-BERT. DistilBERT is a small, fast, cheap and light Transformer model based on Bert architecture. It has 40% less parameters than `bert-base-uncased`, runs 60% faster while preserving 97% of BERT's performances as measured on the GLUE language understanding benchmark. DistilBERT is trained using knowledge distillation, a technique to compress a large model called the teacher into a smaller model called the student. By distillating Bert, we obtain a smaller Transformer model that bears a lot of similarities with the original BERT model while being lighter, smaller and faster to run. DistilBERT is thus an interesting option to put large-scaled trained Transformer model into production. - -We have applied the same method to other Transformer architectures and released the weights: -- GPT2: on the [WikiText-103](https://blog.einstein.ai/the-wikitext-long-term-dependency-language-modeling-dataset/) benchmark, GPT2 reaches a perplexity on the test set of 16.3 compared to 21.1 for **DistilGPT2** (after fine-tuning on the train set). -- RoBERTa: **DistilRoBERTa** reaches 95% of `RoBERTa-base`'s performance on GLUE while being twice faster and 35% smaller. -- German BERT: **German DistilBERT** reaches 99% of `bert-base-german-dbmdz-cased`'s performance on German NER (CoNLL-2003). -- Multilingual BERT: **DistilmBERT** reaches 92% of Multilingual BERT's performance on XNLI while being twice faster and 25% smaller. The model supports 104 languages listed [here](https://github.com/google-research/bert/blob/master/multilingual.md#list-of-languages). - -For more information on DistilBERT, please refer to our [NeurIPS workshop paper](https://arxiv.org/abs/1910.01108). - -Here are the results on the dev sets of GLUE: - -| Model | Macro-score | CoLA | MNLI | MRPC | QNLI | QQP | RTE | SST-2| STS-B| WNLI | -| :---: | :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---: | -| BERT-base-uncased | **79.5** | 56.3 | 84.7 | 88.6 | 91.8 | 89.6 | 69.3 | 92.7 | 89.0 | 53.5 | -| DistilBERT-base-uncased | **77.0** | 51.3 | 82.1 | 87.5 | 89.2 | 88.5 | 59.9 | 91.3 | 86.9 | 56.3 | -| BERT-base-cased | **78.2** | 58.2 | 83.9 | 87.8 | 91.0 | 89.2 | 66.1 | 91.7 | 89.2 | 46.5 | -| DistilBERT-base-cased | **75.9** | 47.2 | 81.5 | 85.6 | 88.2 | 87.8 | 60.6 | 90.4 | 85.5 | 56.3 | -| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | -| RoBERTa-base (reported) | **83.2**/**86.4**2 | 63.6 | 87.6 | 90.2 | 92.8 | 91.9 | 78.7 | 94.8 | 91.2 | 57.73 | -| DistilRoBERTa1 | **79.0**/**82.3**2 | 59.3 | 84.0 | 86.6 | 90.8 | 89.4 | 67.9 | 92.5 | 88.3 | 52.1 | - -1 We did not use the MNLI checkpoint for fine-tuning but directly perform transfer learning on the pre-trained DistilRoBERTa. - -2 Macro-score computed without WNLI. - -3 We compute this score ourselves for completeness. - -Here are the results on the *test* sets for 6 of the languages available in XNLI. The results are computed in the zero shot setting (trained on the English portion and evaluated on the target language portion): - -| Model | English | Spanish | Chinese | German | Arabic | Urdu | -| :---: | :---: | :---: | :---: | :---: | :---: | :---:| -| mBERT base cased (computed) | 82.1 | 74.6 | 69.1 | 72.3 | 66.4 | 58.5 | -| mBERT base uncased (reported)| 81.4 | 74.3 | 63.8 | 70.5 | 62.1 | 58.3 | -| DistilmBERT | 78.2 | 69.1 | 64.0 | 66.3 | 59.1 | 54.7 | - -## Setup - -This part of the library has only be tested with Python3.6+. There are few specific dependencies to install before launching a distillation, you can install them with the command `pip install -r requirements.txt`. - -**Important note:** The training scripts have been updated to support PyTorch v1.2.0 (there are breaking changes compared to v1.1.0). - - -## How to use DistilBERT - -Transformers includes five pre-trained Distil* models, currently only provided for English and German (we are investigating the possibility to train and release a multilingual version of DistilBERT): - -- `distilbert-base-uncased`: DistilBERT English language model pretrained on the same data used to pretrain Bert (concatenation of the Toronto Book Corpus and full English Wikipedia) using distillation with the supervision of the `bert-base-uncased` version of Bert. The model has 6 layers, 768 dimension and 12 heads, totalizing 66M parameters. -- `distilbert-base-uncased-distilled-squad`: A finetuned version of `distilbert-base-uncased` finetuned using (a second step of) knowledge distillation on SQuAD 1.0. This model reaches a F1 score of 86.9 on the dev set (for comparison, Bert `bert-base-uncased` version reaches a 88.5 F1 score). -- `distilbert-base-cased`: DistilBERT English language model pretrained on the same data used to pretrain Bert (concatenation of the Toronto Book Corpus and full English Wikipedia) using distillation with the supervision of the `bert-base-cased` version of Bert. The model has 6 layers, 768 dimension and 12 heads, totalizing 65M parameters. -- `distilbert-base-cased-distilled-squad`: A finetuned version of `distilbert-base-cased` finetuned using (a second step of) knowledge distillation on SQuAD 1.0. This model reaches a F1 score of 87.1 on the dev set (for comparison, Bert `bert-base-cased` version reaches a 88.7 F1 score). -- `distilbert-base-german-cased`: DistilBERT German language model pretrained on 1/2 of the data used to pretrain Bert using distillation with the supervision of the `bert-base-german-dbmdz-cased` version of German DBMDZ Bert. For NER tasks the model reaches a F1 score of 83.49 on the CoNLL-2003 test set (for comparison, `bert-base-german-dbmdz-cased` reaches a 84.52 F1 score), and a F1 score of 85.23 on the GermEval 2014 test set (`bert-base-german-dbmdz-cased` reaches a 86.89 F1 score). -- `distilgpt2`: DistilGPT2 English language model pretrained with the supervision of `gpt2` (the smallest version of GPT2) on [OpenWebTextCorpus](https://skylion007.github.io/OpenWebTextCorpus/), a reproduction of OpenAI's WebText dataset. The model has 6 layers, 768 dimension and 12 heads, totalizing 82M parameters (compared to 124M parameters for GPT2). On average, DistilGPT2 is two times faster than GPT2. -- `distilroberta-base`: DistilRoBERTa English language model pretrained with the supervision of `roberta-base` solely on [OpenWebTextCorpus](https://skylion007.github.io/OpenWebTextCorpus/), a reproduction of OpenAI's WebText dataset (it is ~4 times less training data than the teacher RoBERTa). The model has 6 layers, 768 dimension and 12 heads, totalizing 82M parameters (compared to 125M parameters for RoBERTa-base). On average DistilRoBERTa is twice as fast as Roberta-base. -- `distilbert-base-multilingual-cased`: DistilmBERT multilingual model pretrained with the supervision of `bert-base-multilingual-cased` on the concatenation of Wikipedia in 104 different languages. The model supports the 104 languages listed [here](https://github.com/google-research/bert/blob/master/multilingual.md#list-of-languages). The model has 6 layers, 768 dimension and 12 heads, totalizing 134M parameters (compared to 177M parameters for mBERT-base). On average DistilmBERT is twice as fast as mBERT-base. - -Using DistilBERT is very similar to using BERT. DistilBERT share the same tokenizer as BERT's `bert-base-uncased` even though we provide a link to this tokenizer under the `DistilBertTokenizer` name to have a consistent naming between the library models. - -```python -tokenizer = DistilBertTokenizer.from_pretrained('distilbert-base-cased') -model = DistilBertModel.from_pretrained('distilbert-base-cased') - -input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute")).unsqueeze(0) -outputs = model(input_ids) -last_hidden_states = outputs[0] # The last hidden-state is the first element of the output tuple -``` - -Similarly, using the other Distil* models simply consists in calling the base classes with a different pretrained checkpoint: -- DistilBERT uncased: `model = DistilBertModel.from_pretrained('distilbert-base-uncased')` -- DistilGPT2: `model = GPT2Model.from_pretrained('distilgpt2')` -- DistilRoBERTa: `model = RobertaModel.from_pretrained('distilroberta-base')` -- DistilmBERT: `model = DistilBertModel.from_pretrained('distilbert-base-multilingual-cased')` - - -## How to train Distil* - -In the following, we will explain how you can train DistilBERT. - -### A. Preparing the data - -The weights we release are trained using a concatenation of Toronto Book Corpus and English Wikipedia (same training data as the English version of BERT). - -To avoid processing the data several time, we do it once and for all before the training. From now on, will suppose that you have a text file `dump.txt` which contains one sequence per line (a sequence being composed of one of several coherent sentences). - -First, we will binarize the data, i.e. tokenize the data and convert each token in an index in our model's vocabulary. - -```bash -python scripts/binarized_data.py \ - --file_path data/dump.txt \ - --tokenizer_type bert \ - --tokenizer_name bert-base-uncased \ - --dump_file data/binarized_text -``` - -Our implementation of masked language modeling loss follows [XLM](https://github.com/facebookresearch/XLM)'s one and smooths the probability of masking with a factor that put more emphasis on rare words. Thus we count the occurrences of each tokens in the data: - -```bash -python scripts/token_counts.py \ - --data_file data/binarized_text.bert-base-uncased.pickle \ - --token_counts_dump data/token_counts.bert-base-uncased.pickle \ - --vocab_size 30522 -``` - -### B. Training - -Training with distillation is really simple once you have pre-processed the data: - -```bash -python train.py \ - --student_type distilbert \ - --student_config training_configs/distilbert-base-uncased.json \ - --teacher_type bert \ - --teacher_name bert-base-uncased \ - --alpha_ce 5.0 --alpha_mlm 2.0 --alpha_cos 1.0 --alpha_clm 0.0 --mlm \ - --freeze_pos_embs \ - --dump_path serialization_dir/my_first_training \ - --data_file data/binarized_text.bert-base-uncased.pickle \ - --token_counts data/token_counts.bert-base-uncased.pickle \ - --force # overwrites the `dump_path` if it already exists. -``` - -By default, this will launch a training on a single GPU (even if more are available on the cluster). Other parameters are available in the command line, please look in `train.py` or run `python train.py --help` to list them. - -We highly encourage you to use distributed training for training DistilBERT as the training corpus is quite large. Here's an example that runs a distributed training on a single node having 4 GPUs: - -```bash -export NODE_RANK=0 -export N_NODES=1 - -export N_GPU_NODE=4 -export WORLD_SIZE=4 -export MASTER_PORT= -export MASTER_ADDR= - -pkill -f 'python -u train.py' - -python -m torch.distributed.launch \ - --nproc_per_node=$N_GPU_NODE \ - --nnodes=$N_NODES \ - --node_rank $NODE_RANK \ - --master_addr $MASTER_ADDR \ - --master_port $MASTER_PORT \ - train.py \ - --force \ - --n_gpu $WORLD_SIZE \ - --student_type distilbert \ - --student_config training_configs/distilbert-base-uncased.json \ - --teacher_type bert \ - --teacher_name bert-base-uncased \ - --alpha_ce 0.33 --alpha_mlm 0.33 --alpha_cos 0.33 --alpha_clm 0.0 --mlm \ - --freeze_pos_embs \ - --dump_path serialization_dir/my_first_training \ - --data_file data/binarized_text.bert-base-uncased.pickle \ - --token_counts data/token_counts.bert-base-uncased.pickle -``` - -**Tips:** Starting distilled training with good initialization of the model weights is crucial to reach decent performance. In our experiments, we initialized our model from a few layers of the teacher (Bert) itself! Please refer to `scripts/extract.py` and `scripts/extract_distilbert.py` to create a valid initialization checkpoint and use `--student_pretrained_weights` argument to use this initialization for the distilled training! - -Happy distillation! - -## Citation - -If you find the resource useful, you should cite the following paper: - -``` -@inproceedings{sanh2019distilbert, - title={DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter}, - author={Sanh, Victor and Debut, Lysandre and Chaumond, Julien and Wolf, Thomas}, - booktitle={NeurIPS EMC^2 Workshop}, - year={2019} -} -``` diff --git a/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/aiohttp/web_response.py b/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/aiohttp/web_response.py deleted file mode 100644 index ce07f8153deb29c4cf5856fae0d92ac1170c1441..0000000000000000000000000000000000000000 --- a/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/aiohttp/web_response.py +++ /dev/null @@ -1,825 +0,0 @@ -import asyncio -import collections.abc -import datetime -import enum -import json -import math -import time -import warnings -import zlib -from concurrent.futures import Executor -from http.cookies import Morsel, SimpleCookie -from typing import ( - TYPE_CHECKING, - Any, - Dict, - Iterator, - Mapping, - MutableMapping, - Optional, - Tuple, - Union, - cast, -) - -from multidict import CIMultiDict, istr - -from . import hdrs, payload -from .abc import AbstractStreamWriter -from .helpers import ( - ETAG_ANY, - PY_38, - QUOTED_ETAG_RE, - ETag, - HeadersMixin, - parse_http_date, - rfc822_formatted_time, - sentinel, - validate_etag_value, -) -from .http import RESPONSES, SERVER_SOFTWARE, HttpVersion10, HttpVersion11 -from .payload import Payload -from .typedefs import JSONEncoder, LooseHeaders - -__all__ = ("ContentCoding", "StreamResponse", "Response", "json_response") - - -if TYPE_CHECKING: # pragma: no cover - from .web_request import BaseRequest - - BaseClass = MutableMapping[str, Any] -else: - BaseClass = collections.abc.MutableMapping - - -if not PY_38: - # allow samesite to be used in python < 3.8 - # already permitted in python 3.8, see https://bugs.python.org/issue29613 - Morsel._reserved["samesite"] = "SameSite" # type: ignore[attr-defined] - - -class ContentCoding(enum.Enum): - # The content codings that we have support for. - # - # Additional registered codings are listed at: - # https://www.iana.org/assignments/http-parameters/http-parameters.xhtml#content-coding - deflate = "deflate" - gzip = "gzip" - identity = "identity" - - -############################################################ -# HTTP Response classes -############################################################ - - -class StreamResponse(BaseClass, HeadersMixin): - - _length_check = True - - def __init__( - self, - *, - status: int = 200, - reason: Optional[str] = None, - headers: Optional[LooseHeaders] = None, - ) -> None: - self._body = None - self._keep_alive: Optional[bool] = None - self._chunked = False - self._compression = False - self._compression_force: Optional[ContentCoding] = None - self._cookies: SimpleCookie[str] = SimpleCookie() - - self._req: Optional[BaseRequest] = None - self._payload_writer: Optional[AbstractStreamWriter] = None - self._eof_sent = False - self._body_length = 0 - self._state: Dict[str, Any] = {} - - if headers is not None: - self._headers: CIMultiDict[str] = CIMultiDict(headers) - else: - self._headers = CIMultiDict() - - self.set_status(status, reason) - - @property - def prepared(self) -> bool: - return self._payload_writer is not None - - @property - def task(self) -> "Optional[asyncio.Task[None]]": - if self._req: - return self._req.task - else: - return None - - @property - def status(self) -> int: - return self._status - - @property - def chunked(self) -> bool: - return self._chunked - - @property - def compression(self) -> bool: - return self._compression - - @property - def reason(self) -> str: - return self._reason - - def set_status( - self, - status: int, - reason: Optional[str] = None, - _RESPONSES: Mapping[int, Tuple[str, str]] = RESPONSES, - ) -> None: - assert not self.prepared, ( - "Cannot change the response status code after " "the headers have been sent" - ) - self._status = int(status) - if reason is None: - try: - reason = _RESPONSES[self._status][0] - except Exception: - reason = "" - self._reason = reason - - @property - def keep_alive(self) -> Optional[bool]: - return self._keep_alive - - def force_close(self) -> None: - self._keep_alive = False - - @property - def body_length(self) -> int: - return self._body_length - - @property - def output_length(self) -> int: - warnings.warn("output_length is deprecated", DeprecationWarning) - assert self._payload_writer - return self._payload_writer.buffer_size - - def enable_chunked_encoding(self, chunk_size: Optional[int] = None) -> None: - """Enables automatic chunked transfer encoding.""" - self._chunked = True - - if hdrs.CONTENT_LENGTH in self._headers: - raise RuntimeError( - "You can't enable chunked encoding when " "a content length is set" - ) - if chunk_size is not None: - warnings.warn("Chunk size is deprecated #1615", DeprecationWarning) - - def enable_compression( - self, force: Optional[Union[bool, ContentCoding]] = None - ) -> None: - """Enables response compression encoding.""" - # Backwards compatibility for when force was a bool <0.17. - if type(force) == bool: - force = ContentCoding.deflate if force else ContentCoding.identity - warnings.warn( - "Using boolean for force is deprecated #3318", DeprecationWarning - ) - elif force is not None: - assert isinstance(force, ContentCoding), ( - "force should one of " "None, bool or " "ContentEncoding" - ) - - self._compression = True - self._compression_force = force - - @property - def headers(self) -> "CIMultiDict[str]": - return self._headers - - @property - def cookies(self) -> "SimpleCookie[str]": - return self._cookies - - def set_cookie( - self, - name: str, - value: str, - *, - expires: Optional[str] = None, - domain: Optional[str] = None, - max_age: Optional[Union[int, str]] = None, - path: str = "/", - secure: Optional[bool] = None, - httponly: Optional[bool] = None, - version: Optional[str] = None, - samesite: Optional[str] = None, - ) -> None: - """Set or update response cookie. - - Sets new cookie or updates existent with new value. - Also updates only those params which are not None. - """ - old = self._cookies.get(name) - if old is not None and old.coded_value == "": - # deleted cookie - self._cookies.pop(name, None) - - self._cookies[name] = value - c = self._cookies[name] - - if expires is not None: - c["expires"] = expires - elif c.get("expires") == "Thu, 01 Jan 1970 00:00:00 GMT": - del c["expires"] - - if domain is not None: - c["domain"] = domain - - if max_age is not None: - c["max-age"] = str(max_age) - elif "max-age" in c: - del c["max-age"] - - c["path"] = path - - if secure is not None: - c["secure"] = secure - if httponly is not None: - c["httponly"] = httponly - if version is not None: - c["version"] = version - if samesite is not None: - c["samesite"] = samesite - - def del_cookie( - self, name: str, *, domain: Optional[str] = None, path: str = "/" - ) -> None: - """Delete cookie. - - Creates new empty expired cookie. - """ - # TODO: do we need domain/path here? - self._cookies.pop(name, None) - self.set_cookie( - name, - "", - max_age=0, - expires="Thu, 01 Jan 1970 00:00:00 GMT", - domain=domain, - path=path, - ) - - @property - def content_length(self) -> Optional[int]: - # Just a placeholder for adding setter - return super().content_length - - @content_length.setter - def content_length(self, value: Optional[int]) -> None: - if value is not None: - value = int(value) - if self._chunked: - raise RuntimeError( - "You can't set content length when " "chunked encoding is enable" - ) - self._headers[hdrs.CONTENT_LENGTH] = str(value) - else: - self._headers.pop(hdrs.CONTENT_LENGTH, None) - - @property - def content_type(self) -> str: - # Just a placeholder for adding setter - return super().content_type - - @content_type.setter - def content_type(self, value: str) -> None: - self.content_type # read header values if needed - self._content_type = str(value) - self._generate_content_type_header() - - @property - def charset(self) -> Optional[str]: - # Just a placeholder for adding setter - return super().charset - - @charset.setter - def charset(self, value: Optional[str]) -> None: - ctype = self.content_type # read header values if needed - if ctype == "application/octet-stream": - raise RuntimeError( - "Setting charset for application/octet-stream " - "doesn't make sense, setup content_type first" - ) - assert self._content_dict is not None - if value is None: - self._content_dict.pop("charset", None) - else: - self._content_dict["charset"] = str(value).lower() - self._generate_content_type_header() - - @property - def last_modified(self) -> Optional[datetime.datetime]: - """The value of Last-Modified HTTP header, or None. - - This header is represented as a `datetime` object. - """ - return parse_http_date(self._headers.get(hdrs.LAST_MODIFIED)) - - @last_modified.setter - def last_modified( - self, value: Optional[Union[int, float, datetime.datetime, str]] - ) -> None: - if value is None: - self._headers.pop(hdrs.LAST_MODIFIED, None) - elif isinstance(value, (int, float)): - self._headers[hdrs.LAST_MODIFIED] = time.strftime( - "%a, %d %b %Y %H:%M:%S GMT", time.gmtime(math.ceil(value)) - ) - elif isinstance(value, datetime.datetime): - self._headers[hdrs.LAST_MODIFIED] = time.strftime( - "%a, %d %b %Y %H:%M:%S GMT", value.utctimetuple() - ) - elif isinstance(value, str): - self._headers[hdrs.LAST_MODIFIED] = value - - @property - def etag(self) -> Optional[ETag]: - quoted_value = self._headers.get(hdrs.ETAG) - if not quoted_value: - return None - elif quoted_value == ETAG_ANY: - return ETag(value=ETAG_ANY) - match = QUOTED_ETAG_RE.fullmatch(quoted_value) - if not match: - return None - is_weak, value = match.group(1, 2) - return ETag( - is_weak=bool(is_weak), - value=value, - ) - - @etag.setter - def etag(self, value: Optional[Union[ETag, str]]) -> None: - if value is None: - self._headers.pop(hdrs.ETAG, None) - elif (isinstance(value, str) and value == ETAG_ANY) or ( - isinstance(value, ETag) and value.value == ETAG_ANY - ): - self._headers[hdrs.ETAG] = ETAG_ANY - elif isinstance(value, str): - validate_etag_value(value) - self._headers[hdrs.ETAG] = f'"{value}"' - elif isinstance(value, ETag) and isinstance(value.value, str): - validate_etag_value(value.value) - hdr_value = f'W/"{value.value}"' if value.is_weak else f'"{value.value}"' - self._headers[hdrs.ETAG] = hdr_value - else: - raise ValueError( - f"Unsupported etag type: {type(value)}. " - f"etag must be str, ETag or None" - ) - - def _generate_content_type_header( - self, CONTENT_TYPE: istr = hdrs.CONTENT_TYPE - ) -> None: - assert self._content_dict is not None - assert self._content_type is not None - params = "; ".join(f"{k}={v}" for k, v in self._content_dict.items()) - if params: - ctype = self._content_type + "; " + params - else: - ctype = self._content_type - self._headers[CONTENT_TYPE] = ctype - - async def _do_start_compression(self, coding: ContentCoding) -> None: - if coding != ContentCoding.identity: - assert self._payload_writer is not None - self._headers[hdrs.CONTENT_ENCODING] = coding.value - self._payload_writer.enable_compression(coding.value) - # Compressed payload may have different content length, - # remove the header - self._headers.popall(hdrs.CONTENT_LENGTH, None) - - async def _start_compression(self, request: "BaseRequest") -> None: - if self._compression_force: - await self._do_start_compression(self._compression_force) - else: - accept_encoding = request.headers.get(hdrs.ACCEPT_ENCODING, "").lower() - for coding in ContentCoding: - if coding.value in accept_encoding: - await self._do_start_compression(coding) - return - - async def prepare(self, request: "BaseRequest") -> Optional[AbstractStreamWriter]: - if self._eof_sent: - return None - if self._payload_writer is not None: - return self._payload_writer - - return await self._start(request) - - async def _start(self, request: "BaseRequest") -> AbstractStreamWriter: - self._req = request - writer = self._payload_writer = request._payload_writer - - await self._prepare_headers() - await request._prepare_hook(self) - await self._write_headers() - - return writer - - async def _prepare_headers(self) -> None: - request = self._req - assert request is not None - writer = self._payload_writer - assert writer is not None - keep_alive = self._keep_alive - if keep_alive is None: - keep_alive = request.keep_alive - self._keep_alive = keep_alive - - version = request.version - - headers = self._headers - for cookie in self._cookies.values(): - value = cookie.output(header="")[1:] - headers.add(hdrs.SET_COOKIE, value) - - if self._compression: - await self._start_compression(request) - - if self._chunked: - if version != HttpVersion11: - raise RuntimeError( - "Using chunked encoding is forbidden " - "for HTTP/{0.major}.{0.minor}".format(request.version) - ) - writer.enable_chunking() - headers[hdrs.TRANSFER_ENCODING] = "chunked" - if hdrs.CONTENT_LENGTH in headers: - del headers[hdrs.CONTENT_LENGTH] - elif self._length_check: - writer.length = self.content_length - if writer.length is None: - if version >= HttpVersion11 and self.status != 204: - writer.enable_chunking() - headers[hdrs.TRANSFER_ENCODING] = "chunked" - if hdrs.CONTENT_LENGTH in headers: - del headers[hdrs.CONTENT_LENGTH] - else: - keep_alive = False - # HTTP 1.1: https://tools.ietf.org/html/rfc7230#section-3.3.2 - # HTTP 1.0: https://tools.ietf.org/html/rfc1945#section-10.4 - elif version >= HttpVersion11 and self.status in (100, 101, 102, 103, 204): - del headers[hdrs.CONTENT_LENGTH] - - if self.status not in (204, 304): - headers.setdefault(hdrs.CONTENT_TYPE, "application/octet-stream") - headers.setdefault(hdrs.DATE, rfc822_formatted_time()) - headers.setdefault(hdrs.SERVER, SERVER_SOFTWARE) - - # connection header - if hdrs.CONNECTION not in headers: - if keep_alive: - if version == HttpVersion10: - headers[hdrs.CONNECTION] = "keep-alive" - else: - if version == HttpVersion11: - headers[hdrs.CONNECTION] = "close" - - async def _write_headers(self) -> None: - request = self._req - assert request is not None - writer = self._payload_writer - assert writer is not None - # status line - version = request.version - status_line = "HTTP/{}.{} {} {}".format( - version[0], version[1], self._status, self._reason - ) - await writer.write_headers(status_line, self._headers) - - async def write(self, data: bytes) -> None: - assert isinstance( - data, (bytes, bytearray, memoryview) - ), "data argument must be byte-ish (%r)" % type(data) - - if self._eof_sent: - raise RuntimeError("Cannot call write() after write_eof()") - if self._payload_writer is None: - raise RuntimeError("Cannot call write() before prepare()") - - await self._payload_writer.write(data) - - async def drain(self) -> None: - assert not self._eof_sent, "EOF has already been sent" - assert self._payload_writer is not None, "Response has not been started" - warnings.warn( - "drain method is deprecated, use await resp.write()", - DeprecationWarning, - stacklevel=2, - ) - await self._payload_writer.drain() - - async def write_eof(self, data: bytes = b"") -> None: - assert isinstance( - data, (bytes, bytearray, memoryview) - ), "data argument must be byte-ish (%r)" % type(data) - - if self._eof_sent: - return - - assert self._payload_writer is not None, "Response has not been started" - - await self._payload_writer.write_eof(data) - self._eof_sent = True - self._req = None - self._body_length = self._payload_writer.output_size - self._payload_writer = None - - def __repr__(self) -> str: - if self._eof_sent: - info = "eof" - elif self.prepared: - assert self._req is not None - info = f"{self._req.method} {self._req.path} " - else: - info = "not prepared" - return f"<{self.__class__.__name__} {self.reason} {info}>" - - def __getitem__(self, key: str) -> Any: - return self._state[key] - - def __setitem__(self, key: str, value: Any) -> None: - self._state[key] = value - - def __delitem__(self, key: str) -> None: - del self._state[key] - - def __len__(self) -> int: - return len(self._state) - - def __iter__(self) -> Iterator[str]: - return iter(self._state) - - def __hash__(self) -> int: - return hash(id(self)) - - def __eq__(self, other: object) -> bool: - return self is other - - -class Response(StreamResponse): - def __init__( - self, - *, - body: Any = None, - status: int = 200, - reason: Optional[str] = None, - text: Optional[str] = None, - headers: Optional[LooseHeaders] = None, - content_type: Optional[str] = None, - charset: Optional[str] = None, - zlib_executor_size: Optional[int] = None, - zlib_executor: Optional[Executor] = None, - ) -> None: - if body is not None and text is not None: - raise ValueError("body and text are not allowed together") - - if headers is None: - real_headers: CIMultiDict[str] = CIMultiDict() - elif not isinstance(headers, CIMultiDict): - real_headers = CIMultiDict(headers) - else: - real_headers = headers # = cast('CIMultiDict[str]', headers) - - if content_type is not None and "charset" in content_type: - raise ValueError("charset must not be in content_type " "argument") - - if text is not None: - if hdrs.CONTENT_TYPE in real_headers: - if content_type or charset: - raise ValueError( - "passing both Content-Type header and " - "content_type or charset params " - "is forbidden" - ) - else: - # fast path for filling headers - if not isinstance(text, str): - raise TypeError("text argument must be str (%r)" % type(text)) - if content_type is None: - content_type = "text/plain" - if charset is None: - charset = "utf-8" - real_headers[hdrs.CONTENT_TYPE] = content_type + "; charset=" + charset - body = text.encode(charset) - text = None - else: - if hdrs.CONTENT_TYPE in real_headers: - if content_type is not None or charset is not None: - raise ValueError( - "passing both Content-Type header and " - "content_type or charset params " - "is forbidden" - ) - else: - if content_type is not None: - if charset is not None: - content_type += "; charset=" + charset - real_headers[hdrs.CONTENT_TYPE] = content_type - - super().__init__(status=status, reason=reason, headers=real_headers) - - if text is not None: - self.text = text - else: - self.body = body - - self._compressed_body: Optional[bytes] = None - self._zlib_executor_size = zlib_executor_size - self._zlib_executor = zlib_executor - - @property - def body(self) -> Optional[Union[bytes, Payload]]: - return self._body - - @body.setter - def body( - self, - body: bytes, - CONTENT_TYPE: istr = hdrs.CONTENT_TYPE, - CONTENT_LENGTH: istr = hdrs.CONTENT_LENGTH, - ) -> None: - if body is None: - self._body: Optional[bytes] = None - self._body_payload: bool = False - elif isinstance(body, (bytes, bytearray)): - self._body = body - self._body_payload = False - else: - try: - self._body = body = payload.PAYLOAD_REGISTRY.get(body) - except payload.LookupError: - raise ValueError("Unsupported body type %r" % type(body)) - - self._body_payload = True - - headers = self._headers - - # set content-length header if needed - if not self._chunked and CONTENT_LENGTH not in headers: - size = body.size - if size is not None: - headers[CONTENT_LENGTH] = str(size) - - # set content-type - if CONTENT_TYPE not in headers: - headers[CONTENT_TYPE] = body.content_type - - # copy payload headers - if body.headers: - for (key, value) in body.headers.items(): - if key not in headers: - headers[key] = value - - self._compressed_body = None - - @property - def text(self) -> Optional[str]: - if self._body is None: - return None - return self._body.decode(self.charset or "utf-8") - - @text.setter - def text(self, text: str) -> None: - assert text is None or isinstance( - text, str - ), "text argument must be str (%r)" % type(text) - - if self.content_type == "application/octet-stream": - self.content_type = "text/plain" - if self.charset is None: - self.charset = "utf-8" - - self._body = text.encode(self.charset) - self._body_payload = False - self._compressed_body = None - - @property - def content_length(self) -> Optional[int]: - if self._chunked: - return None - - if hdrs.CONTENT_LENGTH in self._headers: - return super().content_length - - if self._compressed_body is not None: - # Return length of the compressed body - return len(self._compressed_body) - elif self._body_payload: - # A payload without content length, or a compressed payload - return None - elif self._body is not None: - return len(self._body) - else: - return 0 - - @content_length.setter - def content_length(self, value: Optional[int]) -> None: - raise RuntimeError("Content length is set automatically") - - async def write_eof(self, data: bytes = b"") -> None: - if self._eof_sent: - return - if self._compressed_body is None: - body: Optional[Union[bytes, Payload]] = self._body - else: - body = self._compressed_body - assert not data, f"data arg is not supported, got {data!r}" - assert self._req is not None - assert self._payload_writer is not None - if body is not None: - if self._req._method == hdrs.METH_HEAD or self._status in [204, 304]: - await super().write_eof() - elif self._body_payload: - payload = cast(Payload, body) - await payload.write(self._payload_writer) - await super().write_eof() - else: - await super().write_eof(cast(bytes, body)) - else: - await super().write_eof() - - async def _start(self, request: "BaseRequest") -> AbstractStreamWriter: - if not self._chunked and hdrs.CONTENT_LENGTH not in self._headers: - if not self._body_payload: - if self._body is not None: - self._headers[hdrs.CONTENT_LENGTH] = str(len(self._body)) - else: - self._headers[hdrs.CONTENT_LENGTH] = "0" - - return await super()._start(request) - - def _compress_body(self, zlib_mode: int) -> None: - assert zlib_mode > 0 - compressobj = zlib.compressobj(wbits=zlib_mode) - body_in = self._body - assert body_in is not None - self._compressed_body = compressobj.compress(body_in) + compressobj.flush() - - async def _do_start_compression(self, coding: ContentCoding) -> None: - if self._body_payload or self._chunked: - return await super()._do_start_compression(coding) - - if coding != ContentCoding.identity: - # Instead of using _payload_writer.enable_compression, - # compress the whole body - zlib_mode = ( - 16 + zlib.MAX_WBITS if coding == ContentCoding.gzip else zlib.MAX_WBITS - ) - body_in = self._body - assert body_in is not None - if ( - self._zlib_executor_size is not None - and len(body_in) > self._zlib_executor_size - ): - await asyncio.get_event_loop().run_in_executor( - self._zlib_executor, self._compress_body, zlib_mode - ) - else: - self._compress_body(zlib_mode) - - body_out = self._compressed_body - assert body_out is not None - - self._headers[hdrs.CONTENT_ENCODING] = coding.value - self._headers[hdrs.CONTENT_LENGTH] = str(len(body_out)) - - -def json_response( - data: Any = sentinel, - *, - text: Optional[str] = None, - body: Optional[bytes] = None, - status: int = 200, - reason: Optional[str] = None, - headers: Optional[LooseHeaders] = None, - content_type: str = "application/json", - dumps: JSONEncoder = json.dumps, -) -> Response: - if data is not sentinel: - if text or body: - raise ValueError("only one of data, text, or body should be specified") - else: - text = dumps(data) - return Response( - text=text, - body=body, - status=status, - reason=reason, - headers=headers, - content_type=content_type, - ) diff --git a/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/confection/__init__.py b/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/confection/__init__.py deleted file mode 100644 index 9b49ff5d37008c206cd7de730da23898b0ce0f79..0000000000000000000000000000000000000000 --- a/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/confection/__init__.py +++ /dev/null @@ -1,1048 +0,0 @@ -from typing import Union, Dict, Any, Optional, List, Tuple, Callable, Type, Mapping -from typing import Iterable, Sequence, cast -from types import GeneratorType -from dataclasses import dataclass -from configparser import ConfigParser, ExtendedInterpolation, MAX_INTERPOLATION_DEPTH -from configparser import InterpolationMissingOptionError, InterpolationSyntaxError -from configparser import NoSectionError, NoOptionError, InterpolationDepthError -from configparser import ParsingError -from pathlib import Path -from pydantic import BaseModel, create_model, ValidationError, Extra -from pydantic.main import ModelMetaclass -from pydantic.fields import ModelField -import srsly -import catalogue -import inspect -import io -import copy -import re -import warnings - -from .util import Decorator, SimpleFrozenDict, SimpleFrozenList - -# Field used for positional arguments, e.g. [section.*.xyz]. The alias is -# required for the schema (shouldn't clash with user-defined arg names) -ARGS_FIELD = "*" -ARGS_FIELD_ALIAS = "VARIABLE_POSITIONAL_ARGS" -# Aliases for fields that would otherwise shadow pydantic attributes. Can be any -# string, so we're using name + space so it looks the same in error messages etc. -RESERVED_FIELDS = {"validate": "validate\u0020"} -# Internal prefix used to mark section references for custom interpolation -SECTION_PREFIX = "__SECTION__:" -# Values that shouldn't be loaded during interpolation because it'd cause -# even explicit string values to be incorrectly parsed as bools/None etc. -JSON_EXCEPTIONS = ("true", "false", "null") -# Regex to detect whether a value contains a variable -VARIABLE_RE = re.compile(r"\$\{[\w\.:]+\}") - - -class CustomInterpolation(ExtendedInterpolation): - def before_read(self, parser, section, option, value): - # If we're dealing with a quoted string as the interpolation value, - # make sure we load and unquote it so we don't end up with '"value"' - try: - json_value = srsly.json_loads(value) - if isinstance(json_value, str) and json_value not in JSON_EXCEPTIONS: - value = json_value - except ValueError: - if value and value[0] == value[-1] == "'": - warnings.warn( - f"The value [{value}] seems to be single-quoted, but values " - "use JSON formatting, which requires double quotes." - ) - except Exception: - pass - return super().before_read(parser, section, option, value) - - def before_get(self, parser, section, option, value, defaults): - # Mostly copy-pasted from the built-in configparser implementation. - L = [] - self.interpolate(parser, option, L, value, section, defaults, 1) - return "".join(L) - - def interpolate(self, parser, option, accum, rest, section, map, depth): - # Mostly copy-pasted from the built-in configparser implementation. - # We need to overwrite this method so we can add special handling for - # block references :( All values produced here should be strings – - # we need to wait until the whole config is interpreted anyways so - # filling in incomplete values here is pointless. All we need is the - # section reference so we can fetch it later. - rawval = parser.get(section, option, raw=True, fallback=rest) - if depth > MAX_INTERPOLATION_DEPTH: - raise InterpolationDepthError(option, section, rawval) - while rest: - p = rest.find("$") - if p < 0: - accum.append(rest) - return - if p > 0: - accum.append(rest[:p]) - rest = rest[p:] - # p is no longer used - c = rest[1:2] - if c == "$": - accum.append("$") - rest = rest[2:] - elif c == "{": - # We want to treat both ${a:b} and ${a.b} the same - m = self._KEYCRE.match(rest) - if m is None: - err = f"bad interpolation variable reference {rest}" - raise InterpolationSyntaxError(option, section, err) - orig_var = m.group(1) - path = orig_var.replace(":", ".").rsplit(".", 1) - rest = rest[m.end() :] - sect = section - opt = option - try: - if len(path) == 1: - opt = parser.optionxform(path[0]) - if opt in map: - v = map[opt] - else: - # We have block reference, store it as a special key - section_name = parser[parser.optionxform(path[0])]._name - v = self._get_section_name(section_name) - elif len(path) == 2: - sect = path[0] - opt = parser.optionxform(path[1]) - fallback = "__FALLBACK__" - v = parser.get(sect, opt, raw=True, fallback=fallback) - # If a variable doesn't exist, try again and treat the - # reference as a section - if v == fallback: - v = self._get_section_name(parser[f"{sect}.{opt}"]._name) - else: - err = f"More than one ':' found: {rest}" - raise InterpolationSyntaxError(option, section, err) - except (KeyError, NoSectionError, NoOptionError): - raise InterpolationMissingOptionError( - option, section, rawval, orig_var - ) from None - if "$" in v: - new_map = dict(parser.items(sect, raw=True)) - self.interpolate(parser, opt, accum, v, sect, new_map, depth + 1) - else: - accum.append(v) - else: - err = "'$' must be followed by '$' or '{', " "found: %r" % (rest,) - raise InterpolationSyntaxError(option, section, err) - - def _get_section_name(self, name: str) -> str: - """Generate the name of a section. Note that we use a quoted string here - so we can use section references within lists and load the list as - JSON. Since section references can't be used within strings, we don't - need the quoted vs. unquoted distinction like we do for variables. - - Examples (assuming section = {"foo": 1}): - - value: ${section.foo} -> value: 1 - - value: "hello ${section.foo}" -> value: "hello 1" - - value: ${section} -> value: {"foo": 1} - - value: "${section}" -> value: {"foo": 1} - - value: "hello ${section}" -> invalid - """ - return f'"{SECTION_PREFIX}{name}"' - - -def get_configparser(interpolate: bool = True): - config = ConfigParser(interpolation=CustomInterpolation() if interpolate else None) - # Preserve case of keys: https://stackoverflow.com/a/1611877/6400719 - config.optionxform = str # type: ignore - return config - - -class Config(dict): - """This class holds the model and training configuration and can load and - save the TOML-style configuration format from/to a string, file or bytes. - The Config class is a subclass of dict and uses Python's ConfigParser - under the hood. - """ - - is_interpolated: bool - - def __init__( - self, - data: Optional[Union[Dict[str, Any], "ConfigParser", "Config"]] = None, - *, - is_interpolated: Optional[bool] = None, - section_order: Optional[List[str]] = None, - ) -> None: - """Initialize a new Config object with optional data.""" - dict.__init__(self) - if data is None: - data = {} - if not isinstance(data, (dict, Config, ConfigParser)): - raise ValueError( - f"Can't initialize Config with data. Expected dict, Config or " - f"ConfigParser but got: {type(data)}" - ) - # Whether the config has been interpolated. We can use this to check - # whether we need to interpolate again when it's resolved. We assume - # that a config is interpolated by default. - if is_interpolated is not None: - self.is_interpolated = is_interpolated - elif isinstance(data, Config): - self.is_interpolated = data.is_interpolated - else: - self.is_interpolated = True - if section_order is not None: - self.section_order = section_order - elif isinstance(data, Config): - self.section_order = data.section_order - else: - self.section_order = [] - # Update with data - self.update(self._sort(data)) - - def interpolate(self) -> "Config": - """Interpolate a config. Returns a copy of the object.""" - # This is currently the most effective way because we need our custom - # to_str logic to run in order to re-serialize the values so we can - # interpolate them again. ConfigParser.read_dict will just call str() - # on all values, which isn't enough. - return Config().from_str(self.to_str()) - - def interpret_config(self, config: "ConfigParser") -> None: - """Interpret a config, parse nested sections and parse the values - as JSON. Mostly used internally and modifies the config in place. - """ - self._validate_sections(config) - # Sort sections by depth, so that we can iterate breadth-first. This - # allows us to check that we're not expanding an undefined block. - get_depth = lambda item: len(item[0].split(".")) - for section, values in sorted(config.items(), key=get_depth): - if section == "DEFAULT": - # Skip [DEFAULT] section so it doesn't cause validation error - continue - parts = section.split(".") - node = self - for part in parts[:-1]: - if part == "*": - node = node.setdefault(part, {}) - elif part not in node: - err_title = f"Error parsing config section. Perhaps a section name is wrong?" - err = [{"loc": parts, "msg": f"Section '{part}' is not defined"}] - raise ConfigValidationError( - config=self, errors=err, title=err_title - ) - else: - node = node[part] - if not isinstance(node, dict): - # Happens if both value *and* subsection were defined for a key - err = [{"loc": parts, "msg": "found conflicting values"}] - err_cfg = f"{self}\n{({part: dict(values)})}" - raise ConfigValidationError(config=err_cfg, errors=err) - # Set the default section - node = node.setdefault(parts[-1], {}) - if not isinstance(node, dict): - # Happens if both value *and* subsection were defined for a key - err = [{"loc": parts, "msg": "found conflicting values"}] - err_cfg = f"{self}\n{({part: dict(values)})}" - raise ConfigValidationError(config=err_cfg, errors=err) - try: - keys_values = list(values.items()) - except InterpolationMissingOptionError as e: - raise ConfigValidationError(desc=f"{e}") from None - for key, value in keys_values: - config_v = config.get(section, key) - node[key] = self._interpret_value(config_v) - self.replace_section_refs(self) - - def replace_section_refs( - self, config: Union[Dict[str, Any], "Config"], parent: str = "" - ) -> None: - """Replace references to section blocks in the final config.""" - for key, value in config.items(): - key_parent = f"{parent}.{key}".strip(".") - if isinstance(value, dict): - self.replace_section_refs(value, parent=key_parent) - elif isinstance(value, list): - config[key] = [ - self._get_section_ref(v, parent=[parent, key]) for v in value - ] - else: - config[key] = self._get_section_ref(value, parent=[parent, key]) - - def _interpret_value(self, value: Any) -> Any: - """Interpret a single config value.""" - result = try_load_json(value) - # If value is a string and it contains a variable, use original value - # (not interpreted string, which could lead to double quotes: - # ${x.y} -> "${x.y}" -> "'${x.y}'"). Make sure to check it's a string, - # so we're not keeping lists as strings. - # NOTE: This currently can't handle uninterpolated values like [${x.y}]! - if isinstance(result, str) and VARIABLE_RE.search(value): - result = value - return result - - def _get_section_ref(self, value: Any, *, parent: List[str] = []) -> Any: - """Get a single section reference.""" - if isinstance(value, str) and value.startswith(f'"{SECTION_PREFIX}'): - value = try_load_json(value) - if isinstance(value, str) and value.startswith(SECTION_PREFIX): - parts = value.replace(SECTION_PREFIX, "").split(".") - result = self - for item in parts: - try: - result = result[item] - except (KeyError, TypeError): # This should never happen - err_title = "Error parsing reference to config section" - err_msg = f"Section '{'.'.join(parts)}' is not defined" - err = [{"loc": parts, "msg": err_msg}] - raise ConfigValidationError( - config=self, errors=err, title=err_title - ) from None - return result - elif isinstance(value, str) and SECTION_PREFIX in value: - # String value references a section (either a dict or return - # value of promise). We can't allow this, since variables are - # always interpolated *before* configs are resolved. - err_desc = ( - "Can't reference whole sections or return values of function " - "blocks inside a string or list\n\nYou can change your variable to " - "reference a value instead. Keep in mind that it's not " - "possible to interpolate the return value of a registered " - "function, since variables are interpolated when the config " - "is loaded, and registered functions are resolved afterwards." - ) - err = [{"loc": parent, "msg": "uses section variable in string or list"}] - raise ConfigValidationError(errors=err, desc=err_desc) - return value - - def copy(self) -> "Config": - """Deepcopy the config.""" - try: - config = copy.deepcopy(self) - except Exception as e: - raise ValueError(f"Couldn't deep-copy config: {e}") from e - return Config( - config, - is_interpolated=self.is_interpolated, - section_order=self.section_order, - ) - - def merge( - self, updates: Union[Dict[str, Any], "Config"], remove_extra: bool = False - ) -> "Config": - """Deep merge the config with updates, using current as defaults.""" - defaults = self.copy() - updates = Config(updates).copy() - merged = deep_merge_configs(updates, defaults, remove_extra=remove_extra) - return Config( - merged, - is_interpolated=defaults.is_interpolated and updates.is_interpolated, - section_order=defaults.section_order, - ) - - def _sort( - self, data: Union["Config", "ConfigParser", Dict[str, Any]] - ) -> Dict[str, Any]: - """Sort sections using the currently defined sort order. Sort - sections by index on section order, if available, then alphabetic, and - account for subsections, which should always follow their parent. - """ - sort_map = {section: i for i, section in enumerate(self.section_order)} - sort_key = lambda x: ( - sort_map.get(x[0].split(".")[0], len(sort_map)), - _mask_positional_args(x[0]), - ) - return dict(sorted(data.items(), key=sort_key)) - - def _set_overrides(self, config: "ConfigParser", overrides: Dict[str, Any]) -> None: - """Set overrides in the ConfigParser before config is interpreted.""" - err_title = "Error parsing config overrides" - for key, value in overrides.items(): - err_msg = "not a section value that can be overridden" - err = [{"loc": key.split("."), "msg": err_msg}] - if "." not in key: - raise ConfigValidationError(errors=err, title=err_title) - section, option = key.rsplit(".", 1) - # Check for section and accept if option not in config[section] - if section not in config: - raise ConfigValidationError(errors=err, title=err_title) - config.set(section, option, try_dump_json(value, overrides)) - - def _validate_sections(self, config: "ConfigParser") -> None: - # If the config defines top-level properties that are not sections (e.g. - # if config was constructed from dict), those values would be added as - # [DEFAULTS] and included in *every other section*. This is usually not - # what we want and it can lead to very confusing results. - default_section = config.defaults() - if default_section: - err_title = "Found config values without a top-level section" - err_msg = "not part of a section" - err = [{"loc": [k], "msg": err_msg} for k in default_section] - raise ConfigValidationError(errors=err, title=err_title) - - def from_str( - self, text: str, *, interpolate: bool = True, overrides: Dict[str, Any] = {} - ) -> "Config": - """Load the config from a string.""" - config = get_configparser(interpolate=interpolate) - if overrides: - config = get_configparser(interpolate=False) - try: - config.read_string(text) - except ParsingError as e: - desc = f"Make sure the sections and values are formatted correctly.\n\n{e}" - raise ConfigValidationError(desc=desc) from None - config._sections = self._sort(config._sections) - self._set_overrides(config, overrides) - self.clear() - self.interpret_config(config) - if overrides and interpolate: - # do the interpolation. Avoids recursion because the new call from_str call will have overrides as empty - self = self.interpolate() - self.is_interpolated = interpolate - return self - - def to_str(self, *, interpolate: bool = True) -> str: - """Write the config to a string.""" - flattened = get_configparser(interpolate=interpolate) - queue: List[Tuple[tuple, "Config"]] = [(tuple(), self)] - for path, node in queue: - section_name = ".".join(path) - is_kwarg = path and path[-1] != "*" - if is_kwarg and not flattened.has_section(section_name): - # Always create sections for non-'*' sections, not only if - # they have leaf entries, as we don't want to expand - # blocks that are undefined - flattened.add_section(section_name) - for key, value in node.items(): - if hasattr(value, "items"): - # Reference to a function with no arguments, serialize - # inline as a dict and don't create new section - if ( - registry.is_promise(value) - and len(value) == 1 - and is_kwarg - ): - flattened.set(section_name, key, try_dump_json(value, node)) - else: - queue.append((path + (key,), value)) - else: - flattened.set(section_name, key, try_dump_json(value, node)) - # Order so subsection follow parent (not all sections, then all subs etc.) - flattened._sections = self._sort(flattened._sections) - self._validate_sections(flattened) - string_io = io.StringIO() - flattened.write(string_io) - return string_io.getvalue().strip() - - def to_bytes(self, *, interpolate: bool = True) -> bytes: - """Serialize the config to a byte string.""" - return self.to_str(interpolate=interpolate).encode("utf8") - - def from_bytes( - self, - bytes_data: bytes, - *, - interpolate: bool = True, - overrides: Dict[str, Any] = {}, - ) -> "Config": - """Load the config from a byte string.""" - return self.from_str( - bytes_data.decode("utf8"), interpolate=interpolate, overrides=overrides - ) - - def to_disk(self, path: Union[str, Path], *, interpolate: bool = True): - """Serialize the config to a file.""" - path = Path(path) if isinstance(path, str) else path - with path.open("w", encoding="utf8") as file_: - file_.write(self.to_str(interpolate=interpolate)) - - def from_disk( - self, - path: Union[str, Path], - *, - interpolate: bool = True, - overrides: Dict[str, Any] = {}, - ) -> "Config": - """Load config from a file.""" - path = Path(path) if isinstance(path, str) else path - with path.open("r", encoding="utf8") as file_: - text = file_.read() - return self.from_str(text, interpolate=interpolate, overrides=overrides) - - -def _mask_positional_args(name: str) -> List[Optional[str]]: - """Create a section name representation that masks names - of positional arguments to retain their order in sorts.""" - - stable_name = cast(List[Optional[str]], name.split(".")) - - # Remove names of sections that are a positional argument. - for i in range(1, len(stable_name)): - if stable_name[i - 1] == "*": - stable_name[i] = None - - return stable_name - - -def try_load_json(value: str) -> Any: - """Load a JSON string if possible, otherwise default to original value.""" - try: - return srsly.json_loads(value) - except Exception: - return value - - -def try_dump_json(value: Any, data: Union[Dict[str, dict], Config, str] = "") -> str: - """Dump a config value as JSON and output user-friendly error if it fails.""" - # Special case if we have a variable: it's already a string so don't dump - # to preserve ${x:y} vs. "${x:y}" - if isinstance(value, str) and VARIABLE_RE.search(value): - return value - if isinstance(value, str) and value.replace(".", "", 1).isdigit(): - # Work around values that are strings but numbers - value = f'"{value}"' - try: - return srsly.json_dumps(value) - except Exception as e: - err_msg = ( - f"Couldn't serialize config value of type {type(value)}: {e}. Make " - f"sure all values in your config are JSON-serializable. If you want " - f"to include Python objects, use a registered function that returns " - f"the object instead." - ) - raise ConfigValidationError(config=data, desc=err_msg) from e - - -def deep_merge_configs( - config: Union[Dict[str, Any], Config], - defaults: Union[Dict[str, Any], Config], - *, - remove_extra: bool = False, -) -> Union[Dict[str, Any], Config]: - """Deep merge two configs.""" - if remove_extra: - # Filter out values in the original config that are not in defaults - keys = list(config.keys()) - for key in keys: - if key not in defaults: - del config[key] - for key, value in defaults.items(): - if isinstance(value, dict): - node = config.setdefault(key, {}) - if not isinstance(node, dict): - continue - value_promises = [k for k in value if k.startswith("@")] - value_promise = value_promises[0] if value_promises else None - node_promises = [k for k in node if k.startswith("@")] if node else [] - node_promise = node_promises[0] if node_promises else None - # We only update the block from defaults if it refers to the same - # registered function - if ( - value_promise - and node_promise - and ( - value_promise in node - and node[value_promise] != value[value_promise] - ) - ): - continue - if node_promise and ( - node_promise not in value or node[node_promise] != value[node_promise] - ): - continue - defaults = deep_merge_configs(node, value, remove_extra=remove_extra) - elif key not in config: - config[key] = value - return config - - -class ConfigValidationError(ValueError): - def __init__( - self, - *, - config: Optional[Union[Config, Dict[str, Dict[str, Any]], str]] = None, - errors: Union[Sequence[Mapping[str, Any]], Iterable[Dict[str, Any]]] = tuple(), - title: Optional[str] = "Config validation error", - desc: Optional[str] = None, - parent: Optional[str] = None, - show_config: bool = True, - ) -> None: - """Custom error for validating configs. - - config (Union[Config, Dict[str, Dict[str, Any]], str]): The - config the validation error refers to. - errors (Union[Sequence[Mapping[str, Any]], Iterable[Dict[str, Any]]]): - A list of errors as dicts with keys "loc" (list of strings - describing the path of the value), "msg" (validation message - to show) and optional "type" (mostly internals). - Same format as produced by pydantic's validation error (e.errors()). - title (str): The error title. - desc (str): Optional error description, displayed below the title. - parent (str): Optional parent to use as prefix for all error locations. - For example, parent "element" will result in "element -> a -> b". - show_config (bool): Whether to print the whole config with the error. - - ATTRIBUTES: - config (Union[Config, Dict[str, Dict[str, Any]], str]): The config. - errors (Iterable[Dict[str, Any]]): The errors. - error_types (Set[str]): All "type" values defined in the errors, if - available. This is most relevant for the pydantic errors that define - types like "type_error.integer". This attribute makes it easy to - check if a config validation error includes errors of a certain - type, e.g. to log additional information or custom help messages. - title (str): The title. - desc (str): The description. - parent (str): The parent. - show_config (bool): Whether to show the config. - text (str): The formatted error text. - """ - self.config = config - self.errors = errors - self.title = title - self.desc = desc - self.parent = parent - self.show_config = show_config - self.error_types = set() - for error in self.errors: - err_type = error.get("type") - if err_type: - self.error_types.add(err_type) - self.text = self._format() - ValueError.__init__(self, self.text) - - @classmethod - def from_error( - cls, - err: "ConfigValidationError", - title: Optional[str] = None, - desc: Optional[str] = None, - parent: Optional[str] = None, - show_config: Optional[bool] = None, - ) -> "ConfigValidationError": - """Create a new ConfigValidationError based on an existing error, e.g. - to re-raise it with different settings. If no overrides are provided, - the values from the original error are used. - - err (ConfigValidationError): The original error. - title (str): Overwrite error title. - desc (str): Overwrite error description. - parent (str): Overwrite error parent. - show_config (bool): Overwrite whether to show config. - RETURNS (ConfigValidationError): The new error. - """ - return cls( - config=err.config, - errors=err.errors, - title=title if title is not None else err.title, - desc=desc if desc is not None else err.desc, - parent=parent if parent is not None else err.parent, - show_config=show_config if show_config is not None else err.show_config, - ) - - def _format(self) -> str: - """Format the error message.""" - loc_divider = "->" - data = [] - for error in self.errors: - err_loc = f" {loc_divider} ".join([str(p) for p in error.get("loc", [])]) - if self.parent: - err_loc = f"{self.parent} {loc_divider} {err_loc}" - data.append((err_loc, error.get("msg"))) - result = [] - if self.title: - result.append(self.title) - if self.desc: - result.append(self.desc) - if data: - result.append("\n".join([f"{entry[0]}\t{entry[1]}" for entry in data])) - if self.config and self.show_config: - result.append(f"{self.config}") - return "\n\n" + "\n".join(result) - - -def alias_generator(name: str) -> str: - """Generate field aliases in promise schema.""" - # Underscore fields are not allowed in model, so use alias - if name == ARGS_FIELD_ALIAS: - return ARGS_FIELD - # Auto-alias fields that shadow base model attributes - if name in RESERVED_FIELDS: - return RESERVED_FIELDS[name] - return name - - -def copy_model_field(field: ModelField, type_: Any) -> ModelField: - """Copy a model field and assign a new type, e.g. to accept an Any type - even though the original value is typed differently. - """ - return ModelField( - name=field.name, - type_=type_, - class_validators=field.class_validators, - model_config=field.model_config, - default=field.default, - default_factory=field.default_factory, - required=field.required, - ) - - -class EmptySchema(BaseModel): - class Config: - extra = "allow" - arbitrary_types_allowed = True - - -class _PromiseSchemaConfig: - extra = "forbid" - arbitrary_types_allowed = True - alias_generator = alias_generator - - -@dataclass -class Promise: - registry: str - name: str - args: List[str] - kwargs: Dict[str, Any] - - -class registry: - @classmethod - def has(cls, registry_name: str, func_name: str) -> bool: - """Check whether a function is available in a registry.""" - if not hasattr(cls, registry_name): - return False - reg = getattr(cls, registry_name) - return func_name in reg - - @classmethod - def get(cls, registry_name: str, func_name: str) -> Callable: - """Get a registered function from a given registry.""" - if not hasattr(cls, registry_name): - raise ValueError(f"Unknown registry: '{registry_name}'") - reg = getattr(cls, registry_name) - func = reg.get(func_name) - if func is None: - raise ValueError(f"Could not find '{func_name}' in '{registry_name}'") - return func - - @classmethod - def resolve( - cls, - config: Union[Config, Dict[str, Dict[str, Any]]], - *, - schema: Type[BaseModel] = EmptySchema, - overrides: Dict[str, Any] = {}, - validate: bool = True, - ) -> Dict[str, Any]: - resolved, _ = cls._make( - config, schema=schema, overrides=overrides, validate=validate, resolve=True - ) - return resolved - - @classmethod - def fill( - cls, - config: Union[Config, Dict[str, Dict[str, Any]]], - *, - schema: Type[BaseModel] = EmptySchema, - overrides: Dict[str, Any] = {}, - validate: bool = True, - ): - _, filled = cls._make( - config, schema=schema, overrides=overrides, validate=validate, resolve=False - ) - return filled - - @classmethod - def _make( - cls, - config: Union[Config, Dict[str, Dict[str, Any]]], - *, - schema: Type[BaseModel] = EmptySchema, - overrides: Dict[str, Any] = {}, - resolve: bool = True, - validate: bool = True, - ) -> Tuple[Dict[str, Any], Config]: - """Unpack a config dictionary and create two versions of the config: - a resolved version with objects from the registry created recursively, - and a filled version with all references to registry functions left - intact, but filled with all values and defaults based on the type - annotations. If validate=True, the config will be validated against the - type annotations of the registered functions referenced in the config - (if available) and/or the schema (if available). - """ - # Valid: {"optimizer": {"@optimizers": "my_cool_optimizer", "rate": 1.0}} - # Invalid: {"@optimizers": "my_cool_optimizer", "rate": 1.0} - if cls.is_promise(config): - err_msg = "The top-level config object can't be a reference to a registered function." - raise ConfigValidationError(config=config, errors=[{"msg": err_msg}]) - # If a Config was loaded with interpolate=False, we assume it needs to - # be interpolated first, otherwise we take it at face value - is_interpolated = not isinstance(config, Config) or config.is_interpolated - section_order = config.section_order if isinstance(config, Config) else None - orig_config = config - if not is_interpolated: - config = Config(orig_config).interpolate() - filled, _, resolved = cls._fill( - config, schema, validate=validate, overrides=overrides, resolve=resolve - ) - filled = Config(filled, section_order=section_order) - # Check that overrides didn't include invalid properties not in config - if validate: - cls._validate_overrides(filled, overrides) - # Merge the original config back to preserve variables if we started - # with a config that wasn't interpolated. Here, we prefer variables to - # allow auto-filling a non-interpolated config without destroying - # variable references. - if not is_interpolated: - filled = filled.merge( - Config(orig_config, is_interpolated=False), remove_extra=True - ) - return dict(resolved), filled - - @classmethod - def _fill( - cls, - config: Union[Config, Dict[str, Dict[str, Any]]], - schema: Type[BaseModel] = EmptySchema, - *, - validate: bool = True, - resolve: bool = True, - parent: str = "", - overrides: Dict[str, Dict[str, Any]] = {}, - ) -> Tuple[ - Union[Dict[str, Any], Config], Union[Dict[str, Any], Config], Dict[str, Any] - ]: - """Build three representations of the config: - 1. All promises are preserved (just like config user would provide). - 2. Promises are replaced by their return values. This is the validation - copy and will be parsed by pydantic. It lets us include hacks to - work around problems (e.g. handling of generators). - 3. Final copy with promises replaced by their return values. - """ - filled: Dict[str, Any] = {} - validation: Dict[str, Any] = {} - final: Dict[str, Any] = {} - for key, value in config.items(): - # If the field name is reserved, we use its alias for validation - v_key = RESERVED_FIELDS.get(key, key) - key_parent = f"{parent}.{key}".strip(".") - if key_parent in overrides: - value = overrides[key_parent] - config[key] = value - if cls.is_promise(value): - if key in schema.__fields__ and not resolve: - # If we're not resolving the config, make sure that the field - # expecting the promise is typed Any so it doesn't fail - # validation if it doesn't receive the function return value - field = schema.__fields__[key] - schema.__fields__[key] = copy_model_field(field, Any) - promise_schema = cls.make_promise_schema(value, resolve=resolve) - filled[key], validation[v_key], final[key] = cls._fill( - value, - promise_schema, - validate=validate, - resolve=resolve, - parent=key_parent, - overrides=overrides, - ) - reg_name, func_name = cls.get_constructor(final[key]) - args, kwargs = cls.parse_args(final[key]) - if resolve: - # Call the function and populate the field value. We can't - # just create an instance of the type here, since this - # wouldn't work for generics / more complex custom types - getter = cls.get(reg_name, func_name) - # We don't want to try/except this and raise our own error - # here, because we want the traceback if the function fails. - getter_result = getter(*args, **kwargs) - else: - # We're not resolving and calling the function, so replace - # the getter_result with a Promise class - getter_result = Promise( - registry=reg_name, name=func_name, args=args, kwargs=kwargs - ) - validation[v_key] = getter_result - final[key] = getter_result - if isinstance(validation[v_key], GeneratorType): - # If value is a generator we can't validate type without - # consuming it (which doesn't work if it's infinite – see - # schedule for examples). So we skip it. - validation[v_key] = [] - elif hasattr(value, "items"): - field_type = EmptySchema - if key in schema.__fields__: - field = schema.__fields__[key] - field_type = field.type_ - if not isinstance(field.type_, ModelMetaclass): - # If we don't have a pydantic schema and just a type - field_type = EmptySchema - filled[key], validation[v_key], final[key] = cls._fill( - value, - field_type, - validate=validate, - resolve=resolve, - parent=key_parent, - overrides=overrides, - ) - if key == ARGS_FIELD and isinstance(validation[v_key], dict): - # If the value of variable positional args is a dict (e.g. - # created via config blocks), only use its values - validation[v_key] = list(validation[v_key].values()) - final[key] = list(final[key].values()) - else: - filled[key] = value - # Prevent pydantic from consuming generator if part of a union - validation[v_key] = ( - value if not isinstance(value, GeneratorType) else [] - ) - final[key] = value - # Now that we've filled in all of the promises, update with defaults - # from schema, and validate if validation is enabled - exclude = [] - if validate: - try: - result = schema.parse_obj(validation) - except ValidationError as e: - raise ConfigValidationError( - config=config, errors=e.errors(), parent=parent - ) from None - else: - # Same as parse_obj, but without validation - result = schema.construct(**validation) - # If our schema doesn't allow extra values, we need to filter them - # manually because .construct doesn't parse anything - if schema.Config.extra in (Extra.forbid, Extra.ignore): - fields = schema.__fields__.keys() - exclude = [k for k in result.__fields_set__ if k not in fields] - exclude_validation = set([ARGS_FIELD_ALIAS, *RESERVED_FIELDS.keys()]) - validation.update(result.dict(exclude=exclude_validation)) - filled, final = cls._update_from_parsed(validation, filled, final) - if exclude: - filled = {k: v for k, v in filled.items() if k not in exclude} - validation = {k: v for k, v in validation.items() if k not in exclude} - final = {k: v for k, v in final.items() if k not in exclude} - return filled, validation, final - - @classmethod - def _update_from_parsed( - cls, validation: Dict[str, Any], filled: Dict[str, Any], final: Dict[str, Any] - ): - """Update the final result with the parsed config like converted - values recursively. - """ - for key, value in validation.items(): - if key in RESERVED_FIELDS.values(): - continue # skip aliases for reserved fields - if key not in filled: - filled[key] = value - if key not in final: - final[key] = value - if isinstance(value, dict): - filled[key], final[key] = cls._update_from_parsed( - value, filled[key], final[key] - ) - # Update final config with parsed value if they're not equal (in - # value and in type) but not if it's a generator because we had to - # replace that to validate it correctly - elif key == ARGS_FIELD: - continue # don't substitute if list of positional args - # Check numpy first, just in case. Use stringified type so that numpy dependency can be ditched. - elif str(type(value)) == "": - final[key] = value - elif ( - value != final[key] or not isinstance(type(value), type(final[key])) - ) and not isinstance(final[key], GeneratorType): - final[key] = value - return filled, final - - @classmethod - def _validate_overrides(cls, filled: Config, overrides: Dict[str, Any]): - """Validate overrides against a filled config to make sure there are - no references to properties that don't exist and weren't used.""" - error_msg = "Invalid override: config value doesn't exist" - errors = [] - for override_key in overrides.keys(): - if not cls._is_in_config(override_key, filled): - errors.append({"msg": error_msg, "loc": [override_key]}) - if errors: - raise ConfigValidationError(config=filled, errors=errors) - - @classmethod - def _is_in_config(cls, prop: str, config: Union[Dict[str, Any], Config]): - """Check whether a nested config property like "section.subsection.key" - is in a given config.""" - tree = prop.split(".") - obj = dict(config) - while tree: - key = tree.pop(0) - if isinstance(obj, dict) and key in obj: - obj = obj[key] - else: - return False - return True - - @classmethod - def is_promise(cls, obj: Any) -> bool: - """Check whether an object is a "promise", i.e. contains a reference - to a registered function (via a key starting with `"@"`. - """ - if not hasattr(obj, "keys"): - return False - id_keys = [k for k in obj.keys() if k.startswith("@")] - if len(id_keys): - return True - return False - - @classmethod - def get_constructor(cls, obj: Dict[str, Any]) -> Tuple[str, str]: - id_keys = [k for k in obj.keys() if k.startswith("@")] - if len(id_keys) != 1: - err_msg = f"A block can only contain one function registry reference. Got: {id_keys}" - raise ConfigValidationError(config=obj, errors=[{"msg": err_msg}]) - else: - key = id_keys[0] - value = obj[key] - return (key[1:], value) - - @classmethod - def parse_args(cls, obj: Dict[str, Any]) -> Tuple[List[Any], Dict[str, Any]]: - args = [] - kwargs = {} - for key, value in obj.items(): - if not key.startswith("@"): - if key == ARGS_FIELD: - args = value - elif key in RESERVED_FIELDS.values(): - continue - else: - kwargs[key] = value - return args, kwargs - - @classmethod - def make_promise_schema( - cls, obj: Dict[str, Any], *, resolve: bool = True - ) -> Type[BaseModel]: - """Create a schema for a promise dict (referencing a registry function) - by inspecting the function signature. - """ - reg_name, func_name = cls.get_constructor(obj) - if not resolve and not cls.has(reg_name, func_name): - return EmptySchema - func = cls.get(reg_name, func_name) - # Read the argument annotations and defaults from the function signature - id_keys = [k for k in obj.keys() if k.startswith("@")] - sig_args: Dict[str, Any] = {id_keys[0]: (str, ...)} - for param in inspect.signature(func).parameters.values(): - # If no annotation is specified assume it's anything - annotation = param.annotation if param.annotation != param.empty else Any - # If no default value is specified assume that it's required - default = param.default if param.default != param.empty else ... - # Handle spread arguments and use their annotation as Sequence[whatever] - if param.kind == param.VAR_POSITIONAL: - spread_annot = Sequence[annotation] # type: ignore - sig_args[ARGS_FIELD_ALIAS] = (spread_annot, default) - else: - name = RESERVED_FIELDS.get(param.name, param.name) - sig_args[name] = (annotation, default) - sig_args["__config__"] = _PromiseSchemaConfig - return create_model("ArgModel", **sig_args) - - -__all__ = ["Config", "registry", "ConfigValidationError"] diff --git a/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/fastapi/param_functions.py b/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/fastapi/param_functions.py deleted file mode 100644 index a43afaf311798ebde5fb265e1d47d584d807152d..0000000000000000000000000000000000000000 --- a/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/fastapi/param_functions.py +++ /dev/null @@ -1,564 +0,0 @@ -from typing import Any, Callable, Dict, List, Optional, Sequence, Union - -from fastapi import params -from fastapi._compat import Undefined -from typing_extensions import Annotated, deprecated - -_Unset: Any = Undefined - - -def Path( # noqa: N802 - default: Any = ..., - *, - default_factory: Union[Callable[[], Any], None] = _Unset, - alias: Optional[str] = None, - alias_priority: Union[int, None] = _Unset, - # TODO: update when deprecating Pydantic v1, import these types - # validation_alias: str | AliasPath | AliasChoices | None - validation_alias: Union[str, None] = None, - serialization_alias: Union[str, None] = None, - title: Optional[str] = None, - description: Optional[str] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, - pattern: Optional[str] = None, - regex: Annotated[ - Optional[str], - deprecated( - "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead." - ), - ] = None, - discriminator: Union[str, None] = None, - strict: Union[bool, None] = _Unset, - multiple_of: Union[float, None] = _Unset, - allow_inf_nan: Union[bool, None] = _Unset, - max_digits: Union[int, None] = _Unset, - decimal_places: Union[int, None] = _Unset, - examples: Optional[List[Any]] = None, - example: Annotated[ - Optional[Any], - deprecated( - "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " - "although still supported. Use examples instead." - ), - ] = _Unset, - deprecated: Optional[bool] = None, - include_in_schema: bool = True, - json_schema_extra: Union[Dict[str, Any], None] = None, - **extra: Any, -) -> Any: - return params.Path( - default=default, - default_factory=default_factory, - alias=alias, - alias_priority=alias_priority, - validation_alias=validation_alias, - serialization_alias=serialization_alias, - title=title, - description=description, - gt=gt, - ge=ge, - lt=lt, - le=le, - min_length=min_length, - max_length=max_length, - pattern=pattern, - regex=regex, - discriminator=discriminator, - strict=strict, - multiple_of=multiple_of, - allow_inf_nan=allow_inf_nan, - max_digits=max_digits, - decimal_places=decimal_places, - example=example, - examples=examples, - deprecated=deprecated, - include_in_schema=include_in_schema, - json_schema_extra=json_schema_extra, - **extra, - ) - - -def Query( # noqa: N802 - default: Any = Undefined, - *, - default_factory: Union[Callable[[], Any], None] = _Unset, - alias: Optional[str] = None, - alias_priority: Union[int, None] = _Unset, - # TODO: update when deprecating Pydantic v1, import these types - # validation_alias: str | AliasPath | AliasChoices | None - validation_alias: Union[str, None] = None, - serialization_alias: Union[str, None] = None, - title: Optional[str] = None, - description: Optional[str] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, - pattern: Optional[str] = None, - regex: Annotated[ - Optional[str], - deprecated( - "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead." - ), - ] = None, - discriminator: Union[str, None] = None, - strict: Union[bool, None] = _Unset, - multiple_of: Union[float, None] = _Unset, - allow_inf_nan: Union[bool, None] = _Unset, - max_digits: Union[int, None] = _Unset, - decimal_places: Union[int, None] = _Unset, - examples: Optional[List[Any]] = None, - example: Annotated[ - Optional[Any], - deprecated( - "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " - "although still supported. Use examples instead." - ), - ] = _Unset, - deprecated: Optional[bool] = None, - include_in_schema: bool = True, - json_schema_extra: Union[Dict[str, Any], None] = None, - **extra: Any, -) -> Any: - return params.Query( - default=default, - default_factory=default_factory, - alias=alias, - alias_priority=alias_priority, - validation_alias=validation_alias, - serialization_alias=serialization_alias, - title=title, - description=description, - gt=gt, - ge=ge, - lt=lt, - le=le, - min_length=min_length, - max_length=max_length, - pattern=pattern, - regex=regex, - discriminator=discriminator, - strict=strict, - multiple_of=multiple_of, - allow_inf_nan=allow_inf_nan, - max_digits=max_digits, - decimal_places=decimal_places, - example=example, - examples=examples, - deprecated=deprecated, - include_in_schema=include_in_schema, - json_schema_extra=json_schema_extra, - **extra, - ) - - -def Header( # noqa: N802 - default: Any = Undefined, - *, - default_factory: Union[Callable[[], Any], None] = _Unset, - alias: Optional[str] = None, - alias_priority: Union[int, None] = _Unset, - # TODO: update when deprecating Pydantic v1, import these types - # validation_alias: str | AliasPath | AliasChoices | None - validation_alias: Union[str, None] = None, - serialization_alias: Union[str, None] = None, - convert_underscores: bool = True, - title: Optional[str] = None, - description: Optional[str] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, - pattern: Optional[str] = None, - regex: Annotated[ - Optional[str], - deprecated( - "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead." - ), - ] = None, - discriminator: Union[str, None] = None, - strict: Union[bool, None] = _Unset, - multiple_of: Union[float, None] = _Unset, - allow_inf_nan: Union[bool, None] = _Unset, - max_digits: Union[int, None] = _Unset, - decimal_places: Union[int, None] = _Unset, - examples: Optional[List[Any]] = None, - example: Annotated[ - Optional[Any], - deprecated( - "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " - "although still supported. Use examples instead." - ), - ] = _Unset, - deprecated: Optional[bool] = None, - include_in_schema: bool = True, - json_schema_extra: Union[Dict[str, Any], None] = None, - **extra: Any, -) -> Any: - return params.Header( - default=default, - default_factory=default_factory, - alias=alias, - alias_priority=alias_priority, - validation_alias=validation_alias, - serialization_alias=serialization_alias, - convert_underscores=convert_underscores, - title=title, - description=description, - gt=gt, - ge=ge, - lt=lt, - le=le, - min_length=min_length, - max_length=max_length, - pattern=pattern, - regex=regex, - discriminator=discriminator, - strict=strict, - multiple_of=multiple_of, - allow_inf_nan=allow_inf_nan, - max_digits=max_digits, - decimal_places=decimal_places, - example=example, - examples=examples, - deprecated=deprecated, - include_in_schema=include_in_schema, - json_schema_extra=json_schema_extra, - **extra, - ) - - -def Cookie( # noqa: N802 - default: Any = Undefined, - *, - default_factory: Union[Callable[[], Any], None] = _Unset, - alias: Optional[str] = None, - alias_priority: Union[int, None] = _Unset, - # TODO: update when deprecating Pydantic v1, import these types - # validation_alias: str | AliasPath | AliasChoices | None - validation_alias: Union[str, None] = None, - serialization_alias: Union[str, None] = None, - title: Optional[str] = None, - description: Optional[str] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, - pattern: Optional[str] = None, - regex: Annotated[ - Optional[str], - deprecated( - "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead." - ), - ] = None, - discriminator: Union[str, None] = None, - strict: Union[bool, None] = _Unset, - multiple_of: Union[float, None] = _Unset, - allow_inf_nan: Union[bool, None] = _Unset, - max_digits: Union[int, None] = _Unset, - decimal_places: Union[int, None] = _Unset, - examples: Optional[List[Any]] = None, - example: Annotated[ - Optional[Any], - deprecated( - "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " - "although still supported. Use examples instead." - ), - ] = _Unset, - deprecated: Optional[bool] = None, - include_in_schema: bool = True, - json_schema_extra: Union[Dict[str, Any], None] = None, - **extra: Any, -) -> Any: - return params.Cookie( - default=default, - default_factory=default_factory, - alias=alias, - alias_priority=alias_priority, - validation_alias=validation_alias, - serialization_alias=serialization_alias, - title=title, - description=description, - gt=gt, - ge=ge, - lt=lt, - le=le, - min_length=min_length, - max_length=max_length, - pattern=pattern, - regex=regex, - discriminator=discriminator, - strict=strict, - multiple_of=multiple_of, - allow_inf_nan=allow_inf_nan, - max_digits=max_digits, - decimal_places=decimal_places, - example=example, - examples=examples, - deprecated=deprecated, - include_in_schema=include_in_schema, - json_schema_extra=json_schema_extra, - **extra, - ) - - -def Body( # noqa: N802 - default: Any = Undefined, - *, - default_factory: Union[Callable[[], Any], None] = _Unset, - embed: bool = False, - media_type: str = "application/json", - alias: Optional[str] = None, - alias_priority: Union[int, None] = _Unset, - # TODO: update when deprecating Pydantic v1, import these types - # validation_alias: str | AliasPath | AliasChoices | None - validation_alias: Union[str, None] = None, - serialization_alias: Union[str, None] = None, - title: Optional[str] = None, - description: Optional[str] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, - pattern: Optional[str] = None, - regex: Annotated[ - Optional[str], - deprecated( - "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead." - ), - ] = None, - discriminator: Union[str, None] = None, - strict: Union[bool, None] = _Unset, - multiple_of: Union[float, None] = _Unset, - allow_inf_nan: Union[bool, None] = _Unset, - max_digits: Union[int, None] = _Unset, - decimal_places: Union[int, None] = _Unset, - examples: Optional[List[Any]] = None, - example: Annotated[ - Optional[Any], - deprecated( - "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " - "although still supported. Use examples instead." - ), - ] = _Unset, - deprecated: Optional[bool] = None, - include_in_schema: bool = True, - json_schema_extra: Union[Dict[str, Any], None] = None, - **extra: Any, -) -> Any: - return params.Body( - default=default, - default_factory=default_factory, - embed=embed, - media_type=media_type, - alias=alias, - alias_priority=alias_priority, - validation_alias=validation_alias, - serialization_alias=serialization_alias, - title=title, - description=description, - gt=gt, - ge=ge, - lt=lt, - le=le, - min_length=min_length, - max_length=max_length, - pattern=pattern, - regex=regex, - discriminator=discriminator, - strict=strict, - multiple_of=multiple_of, - allow_inf_nan=allow_inf_nan, - max_digits=max_digits, - decimal_places=decimal_places, - example=example, - examples=examples, - deprecated=deprecated, - include_in_schema=include_in_schema, - json_schema_extra=json_schema_extra, - **extra, - ) - - -def Form( # noqa: N802 - default: Any = Undefined, - *, - default_factory: Union[Callable[[], Any], None] = _Unset, - media_type: str = "application/x-www-form-urlencoded", - alias: Optional[str] = None, - alias_priority: Union[int, None] = _Unset, - # TODO: update when deprecating Pydantic v1, import these types - # validation_alias: str | AliasPath | AliasChoices | None - validation_alias: Union[str, None] = None, - serialization_alias: Union[str, None] = None, - title: Optional[str] = None, - description: Optional[str] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, - pattern: Optional[str] = None, - regex: Annotated[ - Optional[str], - deprecated( - "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead." - ), - ] = None, - discriminator: Union[str, None] = None, - strict: Union[bool, None] = _Unset, - multiple_of: Union[float, None] = _Unset, - allow_inf_nan: Union[bool, None] = _Unset, - max_digits: Union[int, None] = _Unset, - decimal_places: Union[int, None] = _Unset, - examples: Optional[List[Any]] = None, - example: Annotated[ - Optional[Any], - deprecated( - "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " - "although still supported. Use examples instead." - ), - ] = _Unset, - deprecated: Optional[bool] = None, - include_in_schema: bool = True, - json_schema_extra: Union[Dict[str, Any], None] = None, - **extra: Any, -) -> Any: - return params.Form( - default=default, - default_factory=default_factory, - media_type=media_type, - alias=alias, - alias_priority=alias_priority, - validation_alias=validation_alias, - serialization_alias=serialization_alias, - title=title, - description=description, - gt=gt, - ge=ge, - lt=lt, - le=le, - min_length=min_length, - max_length=max_length, - pattern=pattern, - regex=regex, - discriminator=discriminator, - strict=strict, - multiple_of=multiple_of, - allow_inf_nan=allow_inf_nan, - max_digits=max_digits, - decimal_places=decimal_places, - example=example, - examples=examples, - deprecated=deprecated, - include_in_schema=include_in_schema, - json_schema_extra=json_schema_extra, - **extra, - ) - - -def File( # noqa: N802 - default: Any = Undefined, - *, - default_factory: Union[Callable[[], Any], None] = _Unset, - media_type: str = "multipart/form-data", - alias: Optional[str] = None, - alias_priority: Union[int, None] = _Unset, - # TODO: update when deprecating Pydantic v1, import these types - # validation_alias: str | AliasPath | AliasChoices | None - validation_alias: Union[str, None] = None, - serialization_alias: Union[str, None] = None, - title: Optional[str] = None, - description: Optional[str] = None, - gt: Optional[float] = None, - ge: Optional[float] = None, - lt: Optional[float] = None, - le: Optional[float] = None, - min_length: Optional[int] = None, - max_length: Optional[int] = None, - pattern: Optional[str] = None, - regex: Annotated[ - Optional[str], - deprecated( - "Deprecated in FastAPI 0.100.0 and Pydantic v2, use `pattern` instead." - ), - ] = None, - discriminator: Union[str, None] = None, - strict: Union[bool, None] = _Unset, - multiple_of: Union[float, None] = _Unset, - allow_inf_nan: Union[bool, None] = _Unset, - max_digits: Union[int, None] = _Unset, - decimal_places: Union[int, None] = _Unset, - examples: Optional[List[Any]] = None, - example: Annotated[ - Optional[Any], - deprecated( - "Deprecated in OpenAPI 3.1.0 that now uses JSON Schema 2020-12, " - "although still supported. Use examples instead." - ), - ] = _Unset, - deprecated: Optional[bool] = None, - include_in_schema: bool = True, - json_schema_extra: Union[Dict[str, Any], None] = None, - **extra: Any, -) -> Any: - return params.File( - default=default, - default_factory=default_factory, - media_type=media_type, - alias=alias, - alias_priority=alias_priority, - validation_alias=validation_alias, - serialization_alias=serialization_alias, - title=title, - description=description, - gt=gt, - ge=ge, - lt=lt, - le=le, - min_length=min_length, - max_length=max_length, - pattern=pattern, - regex=regex, - discriminator=discriminator, - strict=strict, - multiple_of=multiple_of, - allow_inf_nan=allow_inf_nan, - max_digits=max_digits, - decimal_places=decimal_places, - example=example, - examples=examples, - deprecated=deprecated, - include_in_schema=include_in_schema, - json_schema_extra=json_schema_extra, - **extra, - ) - - -def Depends( # noqa: N802 - dependency: Optional[Callable[..., Any]] = None, *, use_cache: bool = True -) -> Any: - return params.Depends(dependency=dependency, use_cache=use_cache) - - -def Security( # noqa: N802 - dependency: Optional[Callable[..., Any]] = None, - *, - scopes: Optional[Sequence[str]] = None, - use_cache: bool = True, -) -> Any: - return params.Security(dependency=dependency, scopes=scopes, use_cache=use_cache) diff --git a/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-4ccfb72c.css b/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-4ccfb72c.css deleted file mode 100644 index a528c508c9856f09311ecdc208c5d65121782769..0000000000000000000000000000000000000000 --- a/spaces/chuan-hd/law-assistant-chatbot/.venv/lib/python3.11/site-packages/gradio/templates/cdn/assets/index-4ccfb72c.css +++ /dev/null @@ -1 +0,0 @@ -.wrap.svelte-1sc8eck{display:flex;flex-direction:column;flex-flow:column;margin:0;padding:0;height:100%}.codemirror-wrapper.svelte-1sc8eck{height:100%;overflow:auto}.cm-editor{height:100%}.cm-selectionBackground{background-color:#b9d2ff30!important}.cm-focused{outline:none!important}button.svelte-qi7jcw{position:relative;cursor:pointer;padding:5px;width:22px;height:22px}.check.svelte-qi7jcw{position:absolute;top:0;right:0;z-index:var(--layer-top);background:var(--background-fill-primary);padding:var(--size-1);width:100%;height:100%;color:var(--body-text-color)}a.svelte-14d303a{position:relative;cursor:pointer;padding:5px;width:22px;height:22px}.copied.svelte-14d303a{color:var(--color-green-500)}.check.svelte-14d303a{position:absolute;top:0;right:0;z-index:var(--layer-top);background:var(--background-fill-primary);padding:var(--size-1);width:100%;height:100%;color:var(--body-text-color)}div.svelte-1yin446{display:flex;position:absolute;top:var(--block-label-margin);right:var(--block-label-margin);align-items:center;z-index:var(--layer-2);transition:.15s;box-shadow:var(--shadow-drop);border:1px solid var(--border-color-primary);border-top:none;border-right:none;border-radius:var(--block-label-right-radius);background:var(--block-label-background-fill);overflow:hidden;color:var(--block-label-text-color);font:var(--font);font-size:var(--button-small-text-size)} diff --git a/spaces/cihyFjudo/fairness-paper-search/Adobe Acrobat 9 Pro Serial Number Crack.md b/spaces/cihyFjudo/fairness-paper-search/Adobe Acrobat 9 Pro Serial Number Crack.md deleted file mode 100644 index a718e3b07ae9e1bdb9a7ddca9611ab15048cfb0b..0000000000000000000000000000000000000000 --- a/spaces/cihyFjudo/fairness-paper-search/Adobe Acrobat 9 Pro Serial Number Crack.md +++ /dev/null @@ -1,5 +0,0 @@ -
    -

    Unless there is further evidence such as a serial number by which the missile can be traced back and the Russians and Ukrainians can demonstrate reliably who had the missile at the time it is unlikely that direct attribution will ever be possible for what is and remains the most serious war crime this century in the European area.

    -

    Adobe Acrobat 9 Pro Serial Number Crack


    Download Zip ::: https://tinurli.com/2uwkv5



    aaccfb2cb3
    -
    -
    \ No newline at end of file diff --git a/spaces/cihyFjudo/fairness-paper-search/Silhouette Studio Designer Edition Crack A Repack Version with Gnuplot Support.md b/spaces/cihyFjudo/fairness-paper-search/Silhouette Studio Designer Edition Crack A Repack Version with Gnuplot Support.md deleted file mode 100644 index ea9ed6187613df8fd2cd0e2ae93356cd259fc70d..0000000000000000000000000000000000000000 --- a/spaces/cihyFjudo/fairness-paper-search/Silhouette Studio Designer Edition Crack A Repack Version with Gnuplot Support.md +++ /dev/null @@ -1,7 +0,0 @@ - -

    Silhouette Studio Designer Edition 4.4.945 crack introduced for the purpose of makes design. After write name or other text in this software you can use cutting functions of this product as well as use different saved design for applying, setting it according to requirements, curve functions and change the shapes functions apply. This is incredible source for all designers who want to perform job better all time.

    -

    silhouette studio designer edition crack


    DOWNLOAD 🗸🗸🗸 https://tinurli.com/2uwj5C



    -

    Silhouette Studio Designer Edition Serial code provides working area for best working tasks. User can use it as a Gnuplot. For the purpose of creating both 2D as well as 3D projects with incredible results it is superb software. With the help of given link and activation complete procedure you can also work on Fortran 95 due to available different graphical functions. Advance version of this product can perform job of silhouette studio with adaptations. User can use this software for business arrangement during card setting. This software is accommodates tabs. With different illustration editing mechanical assemblies and advance creating style like different shapes.

    -

    Silhouette Studio Business Edition Keygen GeneratorSilhouette Studio Business Edition Keygen Generator ===> for the Silhouette Designer Edition profile and the new Silhouette Studio is completely free, so download the and start. free converter key for the silhouette studio The first step in this. Keygen for the Silhouette Designer Mac OS X was developed to be used with applications, not for use with. The Snow White project assistant is a professionally-made tool that enables you to easily add the basic style and a model. If you've bought a movie just to watch it, without post-processing, then the vinyl cutter may not be the best solution for you. For the best outcomes, use between 10 and 200 layers per project.All the materials will be ready to use and the direction element may be found here. It lets you select the page design and use different colour themes for the digital parts and paper. The very best feature of Silhouette Studio is that you are able to design multi-page projects together. On the other hand, you may select other results like silhouette font package.Once you have it, the software gives you the option to make noise files containing information about your project such as your. If you have a version, such as the. away licence key for the Silhouette Studio Designs. The software features a property that is able to reduce the operating memory. This way of adding to the complex ribbon, you can extrude a complex shape or curve in the smooth way. You are likely to wish you'd taken this course earlier. or gt;Sign in best pricing codes for the silhouette product features several other ways to add decorative elements such as borders and frames. The software also has a paint editor that colours the effect of the design. the silouette studio edition key manualUsing Silhouette Studio is a wise and private test licence. In some circumstances of investigation, Silhouette Support may give advice on cultural heritage as a means of aid. free licence key for the business edition of silhouette studio The upgradeable Key Silhouette Studio is not the same as Designer Edition Plus. Customers that need to open and examine as many systems as the programme can handle are the target audience. a3f8a02ae1

    aaccfb2cb3
    -
    -
    \ No newline at end of file diff --git a/spaces/cloudtheboi/Lofi4All/.pythonlibs/lib/python3.10/site-packages/annotated_types/test_cases.py b/spaces/cloudtheboi/Lofi4All/.pythonlibs/lib/python3.10/site-packages/annotated_types/test_cases.py deleted file mode 100644 index ae2c084b875f812aa62e7cbc5eca796104fa5040..0000000000000000000000000000000000000000 --- a/spaces/cloudtheboi/Lofi4All/.pythonlibs/lib/python3.10/site-packages/annotated_types/test_cases.py +++ /dev/null @@ -1,133 +0,0 @@ -import sys -from datetime import date, datetime, timedelta, timezone -from decimal import Decimal -from typing import Any, Dict, Iterable, Iterator, List, NamedTuple, Set, Tuple - -if sys.version_info < (3, 9): - from typing_extensions import Annotated -else: - from typing import Annotated - -import annotated_types as at - - -class Case(NamedTuple): - """ - A test case for `annotated_types`. - """ - - annotation: Any - valid_cases: Iterable[Any] - invalid_cases: Iterable[Any] - - -def cases() -> Iterable[Case]: - # Gt, Ge, Lt, Le - yield Case(Annotated[int, at.Gt(4)], (5, 6, 1000), (4, 0, -1)) - yield Case(Annotated[float, at.Gt(0.5)], (0.6, 0.7, 0.8, 0.9), (0.5, 0.0, -0.1)) - yield Case( - Annotated[datetime, at.Gt(datetime(2000, 1, 1))], - [datetime(2000, 1, 2), datetime(2000, 1, 3)], - [datetime(2000, 1, 1), datetime(1999, 12, 31)], - ) - yield Case( - Annotated[datetime, at.Gt(date(2000, 1, 1))], - [date(2000, 1, 2), date(2000, 1, 3)], - [date(2000, 1, 1), date(1999, 12, 31)], - ) - yield Case( - Annotated[datetime, at.Gt(Decimal('1.123'))], - [Decimal('1.1231'), Decimal('123')], - [Decimal('1.123'), Decimal('0')], - ) - - yield Case(Annotated[int, at.Ge(4)], (4, 5, 6, 1000, 4), (0, -1)) - yield Case(Annotated[float, at.Ge(0.5)], (0.5, 0.6, 0.7, 0.8, 0.9), (0.4, 0.0, -0.1)) - yield Case( - Annotated[datetime, at.Ge(datetime(2000, 1, 1))], - [datetime(2000, 1, 2), datetime(2000, 1, 3)], - [datetime(1998, 1, 1), datetime(1999, 12, 31)], - ) - - yield Case(Annotated[int, at.Lt(4)], (0, -1), (4, 5, 6, 1000, 4)) - yield Case(Annotated[float, at.Lt(0.5)], (0.4, 0.0, -0.1), (0.5, 0.6, 0.7, 0.8, 0.9)) - yield Case( - Annotated[datetime, at.Lt(datetime(2000, 1, 1))], - [datetime(1999, 12, 31), datetime(1999, 12, 31)], - [datetime(2000, 1, 2), datetime(2000, 1, 3)], - ) - - yield Case(Annotated[int, at.Le(4)], (4, 0, -1), (5, 6, 1000)) - yield Case(Annotated[float, at.Le(0.5)], (0.5, 0.0, -0.1), (0.6, 0.7, 0.8, 0.9)) - yield Case( - Annotated[datetime, at.Le(datetime(2000, 1, 1))], - [datetime(2000, 1, 1), datetime(1999, 12, 31)], - [datetime(2000, 1, 2), datetime(2000, 1, 3)], - ) - - # Interval - yield Case(Annotated[int, at.Interval(gt=4)], (5, 6, 1000), (4, 0, -1)) - yield Case(Annotated[int, at.Interval(gt=4, lt=10)], (5, 6), (4, 10, 1000, 0, -1)) - yield Case(Annotated[float, at.Interval(ge=0.5, le=1)], (0.5, 0.9, 1), (0.49, 1.1)) - yield Case( - Annotated[datetime, at.Interval(gt=datetime(2000, 1, 1), le=datetime(2000, 1, 3))], - [datetime(2000, 1, 2), datetime(2000, 1, 3)], - [datetime(2000, 1, 1), datetime(2000, 1, 4)], - ) - - yield Case(Annotated[int, at.MultipleOf(multiple_of=3)], (0, 3, 9), (1, 2, 4)) - yield Case(Annotated[float, at.MultipleOf(multiple_of=0.5)], (0, 0.5, 1, 1.5), (0.4, 1.1)) - - # lengths - - yield Case(Annotated[str, at.MinLen(3)], ('123', '1234', 'x' * 10), ('', '1', '12')) - yield Case(Annotated[str, at.Len(3)], ('123', '1234', 'x' * 10), ('', '1', '12')) - yield Case(Annotated[List[int], at.MinLen(3)], ([1, 2, 3], [1, 2, 3, 4], [1] * 10), ([], [1], [1, 2])) - yield Case(Annotated[List[int], at.Len(3)], ([1, 2, 3], [1, 2, 3, 4], [1] * 10), ([], [1], [1, 2])) - - yield Case(Annotated[str, at.MaxLen(4)], ('', '1234'), ('12345', 'x' * 10)) - yield Case(Annotated[str, at.Len(0, 4)], ('', '1234'), ('12345', 'x' * 10)) - yield Case(Annotated[List[str], at.MaxLen(4)], ([], ['a', 'bcdef'], ['a', 'b', 'c']), (['a'] * 5, ['b'] * 10)) - yield Case(Annotated[List[str], at.Len(0, 4)], ([], ['a', 'bcdef'], ['a', 'b', 'c']), (['a'] * 5, ['b'] * 10)) - - yield Case(Annotated[str, at.Len(3, 5)], ('123', '12345'), ('', '1', '12', '123456', 'x' * 10)) - yield Case(Annotated[str, at.Len(3, 3)], ('123',), ('12', '1234')) - - yield Case(Annotated[Dict[int, int], at.Len(2, 3)], [{1: 1, 2: 2}], [{}, {1: 1}, {1: 1, 2: 2, 3: 3, 4: 4}]) - yield Case(Annotated[Set[int], at.Len(2, 3)], ({1, 2}, {1, 2, 3}), (set(), {1}, {1, 2, 3, 4})) - yield Case(Annotated[Tuple[int, ...], at.Len(2, 3)], ((1, 2), (1, 2, 3)), ((), (1,), (1, 2, 3, 4))) - - # Timezone - - yield Case( - Annotated[datetime, at.Timezone(None)], [datetime(2000, 1, 1)], [datetime(2000, 1, 1, tzinfo=timezone.utc)] - ) - yield Case( - Annotated[datetime, at.Timezone(...)], [datetime(2000, 1, 1, tzinfo=timezone.utc)], [datetime(2000, 1, 1)] - ) - yield Case( - Annotated[datetime, at.Timezone(timezone.utc)], - [datetime(2000, 1, 1, tzinfo=timezone.utc)], - [datetime(2000, 1, 1), datetime(2000, 1, 1, tzinfo=timezone(timedelta(hours=6)))], - ) - yield Case( - Annotated[datetime, at.Timezone('Europe/London')], - [datetime(2000, 1, 1, tzinfo=timezone(timedelta(0), name='Europe/London'))], - [datetime(2000, 1, 1), datetime(2000, 1, 1, tzinfo=timezone(timedelta(hours=6)))], - ) - - # predicate types - - yield Case(at.LowerCase[str], ['abc', 'foobar'], ['', 'A', 'Boom']) - yield Case(at.UpperCase[str], ['ABC', 'DEFO'], ['', 'a', 'abc', 'AbC']) - yield Case(at.IsDigits[str], ['123'], ['', 'ab', 'a1b2']) - yield Case(at.IsAscii[str], ['123', 'foo bar'], ['£100', '😊', 'whatever 👀']) - - yield Case(Annotated[int, at.Predicate(lambda x: x % 2 == 0)], [0, 2, 4], [1, 3, 5]) - - # custom GroupedMetadata - class MyCustomGroupedMetadata(at.GroupedMetadata): - def __iter__(self) -> Iterator[at.Predicate]: - yield at.Predicate(lambda x: float(x).is_integer()) - - yield Case(Annotated[float, MyCustomGroupedMetadata()], [0, 2.0], [0.01, 1.5]) diff --git "a/spaces/codertoro/gpt-academic/crazy_functions/\347\220\206\350\247\243PDF\346\226\207\346\241\243\345\206\205\345\256\271.py" "b/spaces/codertoro/gpt-academic/crazy_functions/\347\220\206\350\247\243PDF\346\226\207\346\241\243\345\206\205\345\256\271.py" deleted file mode 100644 index a9278e82e120d342ed41b2063854c7c132f10e02..0000000000000000000000000000000000000000 --- "a/spaces/codertoro/gpt-academic/crazy_functions/\347\220\206\350\247\243PDF\346\226\207\346\241\243\345\206\205\345\256\271.py" +++ /dev/null @@ -1,186 +0,0 @@ -from toolbox import update_ui -from toolbox import CatchException, report_execption -import re -import unicodedata -from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive -fast_debug = False - -def is_paragraph_break(match): - """ - 根据给定的匹配结果来判断换行符是否表示段落分隔。 - 如果换行符前为句子结束标志(句号,感叹号,问号),且下一个字符为大写字母,则换行符更有可能表示段落分隔。 - 也可以根据之前的内容长度来判断段落是否已经足够长。 - """ - prev_char, next_char = match.groups() - - # 句子结束标志 - sentence_endings = ".!?" - - # 设定一个最小段落长度阈值 - min_paragraph_length = 140 - - if prev_char in sentence_endings and next_char.isupper() and len(match.string[:match.start(1)]) > min_paragraph_length: - return "\n\n" - else: - return " " - -def normalize_text(text): - """ - 通过把连字(ligatures)等文本特殊符号转换为其基本形式来对文本进行归一化处理。 - 例如,将连字 "fi" 转换为 "f" 和 "i"。 - """ - # 对文本进行归一化处理,分解连字 - normalized_text = unicodedata.normalize("NFKD", text) - - # 替换其他特殊字符 - cleaned_text = re.sub(r'[^\x00-\x7F]+', '', normalized_text) - - return cleaned_text - -def clean_text(raw_text): - """ - 对从 PDF 提取出的原始文本进行清洗和格式化处理。 - 1. 对原始文本进行归一化处理。 - 2. 替换跨行的连词,例如 “Espe-\ncially” 转换为 “Especially”。 - 3. 根据 heuristic 规则判断换行符是否是段落分隔,并相应地进行替换。 - """ - # 对文本进行归一化处理 - normalized_text = normalize_text(raw_text) - - # 替换跨行的连词 - text = re.sub(r'(\w+-\n\w+)', lambda m: m.group(1).replace('-\n', ''), normalized_text) - - # 根据前后相邻字符的特点,找到原文本中的换行符 - newlines = re.compile(r'(\S)\n(\S)') - - # 根据 heuristic 规则,用空格或段落分隔符替换原换行符 - final_text = re.sub(newlines, lambda m: m.group(1) + is_paragraph_break(m) + m.group(2), text) - - return final_text.strip() - -def 解析PDF(file_name, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt): - import time, glob, os, fitz - print('begin analysis on:', file_name) - - with fitz.open(file_name) as doc: - file_content = "" - for page in doc: - file_content += page.get_text() - file_content = clean_text(file_content) - # print(file_content) - split_number = 10000 - split_group = (len(file_content)//split_number)+1 - for i in range(0,split_group): - if i==0: - prefix = "接下来请你仔细分析下面的论文,学习里面的内容(专业术语、公式、数学概念).并且注意:由于论文内容较多,将分批次发送,每次发送完之后,你只需要回答“接受完成”" - i_say = prefix + f'文件名是{file_name},文章内容第{i+1}部分是 ```{file_content[i*split_number:(i+1)*split_number]}```' - i_say_show_user = f'文件名是:\n{file_name},\n由于论文内容过长,将分批请求(共{len(file_content)}字符,将分为{split_group}批,每批{split_number}字符)。\n当前发送{i+1}/{split_group}部分' - elif i==split_group-1: - i_say = f'你只需要回答“所有论文接受完成,请进行下一步”。文章内容第{i+1}/{split_group}部分是 ```{file_content[i*split_number:]}```' - i_say_show_user = f'当前发送{i+1}/{split_group}部分' - else: - i_say = f'你只需要回答“接受完成”。文章内容第{i+1}/{split_group}部分是 ```{file_content[i*split_number:(i+1)*split_number]}```' - i_say_show_user = f'当前发送{i+1}/{split_group}部分' - chatbot.append((i_say_show_user, "[Local Message] waiting gpt response.")) - gpt_say = yield from request_gpt_model_in_new_thread_with_ui_alive(i_say, i_say_show_user, llm_kwargs, chatbot, history=[], sys_prompt="") # 带超时倒计时 - while "完成" not in gpt_say: - i_say = f'你只需要回答“接受完成”。文章内容第{i+1}/{split_group}部分是 ```{file_content[i*split_number:(i+1)*split_number]}```' - i_say_show_user = f'出现error,重新发送{i+1}/{split_group}部分' - gpt_say = yield from request_gpt_model_in_new_thread_with_ui_alive(i_say, i_say_show_user, llm_kwargs, chatbot, history=[], sys_prompt="") # 带超时倒计时 - time.sleep(1) - chatbot[-1] = (i_say_show_user, gpt_say) - history.append(i_say_show_user); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - time.sleep(2) - - i_say = f'接下来,请你扮演一名专业的学术教授,利用你的所有知识并且结合这篇文章,回答我的问题。(请牢记:1.直到我说“退出”,你才能结束任务;2.所有问题需要紧密围绕文章内容;3.如果有公式,请使用tex渲染)' - chatbot.append((i_say, "[Local Message] waiting gpt response.")) - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - - # ** gpt request ** - gpt_say = yield from request_gpt_model_in_new_thread_with_ui_alive(i_say, i_say, llm_kwargs, chatbot, history=history, sys_prompt="") # 带超时倒计时 - chatbot[-1] = (i_say, gpt_say) - history.append(i_say); history.append(gpt_say) - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - - -@CatchException -def 理解PDF文档内容(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, web_port): - import glob, os - - # 基本信息:功能、贡献者 - chatbot.append([ - "函数插件功能?", - "理解PDF论文内容,并且将结合上下文内容,进行学术解答。函数插件贡献者: Hanzoe。"]) - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - - import tkinter as tk - from tkinter import filedialog - - root = tk.Tk() - root.withdraw() - txt = filedialog.askopenfilename() - - # 尝试导入依赖,如果缺少依赖,则给出安装建议 - try: - import fitz - except: - report_execption(chatbot, history, - a = f"解析项目: {txt}", - b = f"导入软件依赖失败。使用该模块需要额外依赖,安装方法```pip install --upgrade pymupdf```。") - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - return - - # 清空历史,以免输入溢出 - history = [] - - # 开始正式执行任务 - yield from 解析PDF(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt) - - - -@CatchException -def 理解PDF文档内容标准文件输入(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt, web_port): - import glob, os - - # 基本信息:功能、贡献者 - chatbot.append([ - "函数插件功能?", - "理解PDF论文内容,并且将结合上下文内容,进行学术解答。函数插件贡献者: Hanzoe。"]) - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - - # 尝试导入依赖,如果缺少依赖,则给出安装建议 - try: - import fitz - except: - report_execption(chatbot, history, - a = f"解析项目: {txt}", - b = f"导入软件依赖失败。使用该模块需要额外依赖,安装方法```pip install --upgrade pymupdf```。") - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - return - - # 清空历史,以免输入溢出 - history = [] - - # 检测输入参数,如没有给定输入参数,直接退出 - if os.path.exists(txt): - project_folder = txt - else: - if txt == "": - txt = '空空如也的输入栏' - report_execption(chatbot, history, - a=f"解析项目: {txt}", b=f"找不到本地项目或无权访问: {txt}") - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - return - - # 搜索需要处理的文件清单 - file_manifest = [f for f in glob.glob(f'{project_folder}/**/*.pdf', recursive=True)] - # 如果没找到任何文件 - if len(file_manifest) == 0: - report_execption(chatbot, history, - a=f"解析项目: {txt}", b=f"找不到任何.tex或.pdf文件: {txt}") - yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 - return - txt = file_manifest[0] - # 开始正式执行任务 - yield from 解析PDF(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt) diff --git a/spaces/colakin/video-generater/public/ffmpeg/libavcodec/aarch64/aacpsdsp_init_aarch64.c b/spaces/colakin/video-generater/public/ffmpeg/libavcodec/aarch64/aacpsdsp_init_aarch64.c deleted file mode 100644 index cc9e4d79bda33f23a4dce5555acbdad4461bd65a..0000000000000000000000000000000000000000 --- a/spaces/colakin/video-generater/public/ffmpeg/libavcodec/aarch64/aacpsdsp_init_aarch64.c +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "config.h" - -#include "libavutil/attributes.h" -#include "libavutil/aarch64/cpu.h" -#include "libavcodec/aacpsdsp.h" - -void ff_ps_add_squares_neon(float *dst, const float (*src)[2], int n); -void ff_ps_mul_pair_single_neon(float (*dst)[2], float (*src0)[2], - float *src1, int n); -void ff_ps_hybrid_analysis_neon(float (*out)[2], float (*in)[2], - const float (*filter)[8][2], - ptrdiff_t stride, int n); -void ff_ps_stereo_interpolate_neon(float (*l)[2], float (*r)[2], - float h[2][4], float h_step[2][4], - int len); -void ff_ps_stereo_interpolate_ipdopd_neon(float (*l)[2], float (*r)[2], - float h[2][4], float h_step[2][4], - int len); - -av_cold void ff_psdsp_init_aarch64(PSDSPContext *s) -{ - int cpu_flags = av_get_cpu_flags(); - - if (have_neon(cpu_flags)) { - s->add_squares = ff_ps_add_squares_neon; - s->mul_pair_single = ff_ps_mul_pair_single_neon; - s->hybrid_analysis = ff_ps_hybrid_analysis_neon; - s->stereo_interpolate[0] = ff_ps_stereo_interpolate_neon; - s->stereo_interpolate[1] = ff_ps_stereo_interpolate_ipdopd_neon; - } -} diff --git a/spaces/colakin/video-generater/public/ffmpeg/libavcodec/exif.c b/spaces/colakin/video-generater/public/ffmpeg/libavcodec/exif.c deleted file mode 100644 index 959d114d09ed52bc86955f86aa6410fe37d79c0a..0000000000000000000000000000000000000000 --- a/spaces/colakin/video-generater/public/ffmpeg/libavcodec/exif.c +++ /dev/null @@ -1,273 +0,0 @@ -/* - * EXIF metadata parser - * Copyright (c) 2013 Thilo Borgmann - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * EXIF metadata parser - * @author Thilo Borgmann - */ - -#include "exif.h" -#include "tiff_common.h" - -#define EXIF_TAG_NAME_LENGTH 32 - -struct exif_tag { - char name[EXIF_TAG_NAME_LENGTH]; - uint16_t id; -}; - -static const struct exif_tag tag_list[] = { // JEITA CP-3451 EXIF specification: - {"GPSVersionID", 0x00}, // <- Table 12 GPS Attribute Information - {"GPSLatitudeRef", 0x01}, - {"GPSLatitude", 0x02}, - {"GPSLongitudeRef", 0x03}, - {"GPSLongitude", 0x04}, - {"GPSAltitudeRef", 0x05}, - {"GPSAltitude", 0x06}, - {"GPSTimeStamp", 0x07}, - {"GPSSatellites", 0x08}, - {"GPSStatus", 0x09}, - {"GPSMeasureMode", 0x0A}, - {"GPSDOP", 0x0B}, - {"GPSSpeedRef", 0x0C}, - {"GPSSpeed", 0x0D}, - {"GPSTrackRef", 0x0E}, - {"GPSTrack", 0x0F}, - {"GPSImgDirectionRef", 0x10}, - {"GPSImgDirection", 0x11}, - {"GPSMapDatum", 0x12}, - {"GPSDestLatitudeRef", 0x13}, - {"GPSDestLatitude", 0x14}, - {"GPSDestLongitudeRef", 0x15}, - {"GPSDestLongitude", 0x16}, - {"GPSDestBearingRef", 0x17}, - {"GPSDestBearing", 0x18}, - {"GPSDestDistanceRef", 0x19}, - {"GPSDestDistance", 0x1A}, - {"GPSProcessingMethod", 0x1B}, - {"GPSAreaInformation", 0x1C}, - {"GPSDateStamp", 0x1D}, - {"GPSDifferential", 0x1E}, - {"ImageWidth", 0x100}, // <- Table 3 TIFF Rev. 6.0 Attribute Information Used in Exif - {"ImageLength", 0x101}, - {"BitsPerSample", 0x102}, - {"Compression", 0x103}, - {"PhotometricInterpretation", 0x106}, - {"Orientation", 0x112}, - {"SamplesPerPixel", 0x115}, - {"PlanarConfiguration", 0x11C}, - {"YCbCrSubSampling", 0x212}, - {"YCbCrPositioning", 0x213}, - {"XResolution", 0x11A}, - {"YResolution", 0x11B}, - {"ResolutionUnit", 0x128}, - {"StripOffsets", 0x111}, - {"RowsPerStrip", 0x116}, - {"StripByteCounts", 0x117}, - {"JPEGInterchangeFormat", 0x201}, - {"JPEGInterchangeFormatLength",0x202}, - {"TransferFunction", 0x12D}, - {"WhitePoint", 0x13E}, - {"PrimaryChromaticities", 0x13F}, - {"YCbCrCoefficients", 0x211}, - {"ReferenceBlackWhite", 0x214}, - {"DateTime", 0x132}, - {"ImageDescription", 0x10E}, - {"Make", 0x10F}, - {"Model", 0x110}, - {"Software", 0x131}, - {"Artist", 0x13B}, - {"Copyright", 0x8298}, - {"ExifVersion", 0x9000}, // <- Table 4 Exif IFD Attribute Information (1) - {"FlashpixVersion", 0xA000}, - {"ColorSpace", 0xA001}, - {"ComponentsConfiguration", 0x9101}, - {"CompressedBitsPerPixel", 0x9102}, - {"PixelXDimension", 0xA002}, - {"PixelYDimension", 0xA003}, - {"MakerNote", 0x927C}, - {"UserComment", 0x9286}, - {"RelatedSoundFile", 0xA004}, - {"DateTimeOriginal", 0x9003}, - {"DateTimeDigitized", 0x9004}, - {"SubSecTime", 0x9290}, - {"SubSecTimeOriginal", 0x9291}, - {"SubSecTimeDigitized", 0x9292}, - {"ImageUniqueID", 0xA420}, - {"ExposureTime", 0x829A}, // <- Table 5 Exif IFD Attribute Information (2) - {"FNumber", 0x829D}, - {"ExposureProgram", 0x8822}, - {"SpectralSensitivity", 0x8824}, - {"ISOSpeedRatings", 0x8827}, - {"OECF", 0x8828}, - {"ShutterSpeedValue", 0x9201}, - {"ApertureValue", 0x9202}, - {"BrightnessValue", 0x9203}, - {"ExposureBiasValue", 0x9204}, - {"MaxApertureValue", 0x9205}, - {"SubjectDistance", 0x9206}, - {"MeteringMode", 0x9207}, - {"LightSource", 0x9208}, - {"Flash", 0x9209}, - {"FocalLength", 0x920A}, - {"SubjectArea", 0x9214}, - {"FlashEnergy", 0xA20B}, - {"SpatialFrequencyResponse", 0xA20C}, - {"FocalPlaneXResolution", 0xA20E}, - {"FocalPlaneYResolution", 0xA20F}, - {"FocalPlaneResolutionUnit", 0xA210}, - {"SubjectLocation", 0xA214}, - {"ExposureIndex", 0xA215}, - {"SensingMethod", 0xA217}, - {"FileSource", 0xA300}, - {"SceneType", 0xA301}, - {"CFAPattern", 0xA302}, - {"CustomRendered", 0xA401}, - {"ExposureMode", 0xA402}, - {"WhiteBalance", 0xA403}, - {"DigitalZoomRatio", 0xA404}, - {"FocalLengthIn35mmFilm", 0xA405}, - {"SceneCaptureType", 0xA406}, - {"GainControl", 0xA407}, - {"Contrast", 0xA408}, - {"Saturation", 0xA409}, - {"Sharpness", 0xA40A}, - {"DeviceSettingDescription", 0xA40B}, - {"SubjectDistanceRange", 0xA40C} -// {"InteroperabilityIndex", 0x1}, // <- Table 13 Interoperability IFD Attribute Information -}; - -static const char *exif_get_tag_name(uint16_t id) -{ - int i; - - for (i = 0; i < FF_ARRAY_ELEMS(tag_list); i++) { - if (tag_list[i].id == id) - return tag_list[i].name; - } - - return NULL; -} - - -static int exif_add_metadata(void *logctx, int count, int type, - const char *name, const char *sep, - GetByteContext *gb, int le, - AVDictionary **metadata) -{ - switch(type) { - case 0: - av_log(logctx, AV_LOG_WARNING, - "Invalid TIFF tag type 0 found for %s with size %d\n", - name, count); - return 0; - case TIFF_DOUBLE : return ff_tadd_doubles_metadata(count, name, sep, gb, le, metadata); - case TIFF_SSHORT : return ff_tadd_shorts_metadata(count, name, sep, gb, le, 1, metadata); - case TIFF_SHORT : return ff_tadd_shorts_metadata(count, name, sep, gb, le, 0, metadata); - case TIFF_SBYTE : return ff_tadd_bytes_metadata(count, name, sep, gb, le, 1, metadata); - case TIFF_BYTE : - case TIFF_UNDEFINED: return ff_tadd_bytes_metadata(count, name, sep, gb, le, 0, metadata); - case TIFF_STRING : return ff_tadd_string_metadata(count, name, gb, le, metadata); - case TIFF_SRATIONAL: - case TIFF_RATIONAL : return ff_tadd_rational_metadata(count, name, sep, gb, le, metadata); - case TIFF_SLONG : - case TIFF_LONG : return ff_tadd_long_metadata(count, name, sep, gb, le, metadata); - default: - avpriv_request_sample(logctx, "TIFF tag type (%u)", type); - return 0; - }; -} - - -static int exif_decode_tag(void *logctx, GetByteContext *gbytes, int le, - int depth, AVDictionary **metadata) -{ - int ret, cur_pos; - unsigned id, count; - enum TiffTypes type; - - if (depth > 2) { - return 0; - } - - ff_tread_tag(gbytes, le, &id, &type, &count, &cur_pos); - - if (!bytestream2_tell(gbytes)) { - bytestream2_seek(gbytes, cur_pos, SEEK_SET); - return 0; - } - - // read count values and add it metadata - // store metadata or proceed with next IFD - ret = ff_tis_ifd(id); - if (ret) { - ret = ff_exif_decode_ifd(logctx, gbytes, le, depth + 1, metadata); - } else { - const char *name = exif_get_tag_name(id); - char buf[7]; - - if (!name) { - name = buf; - snprintf(buf, sizeof(buf), "0x%04X", id); - } - - ret = exif_add_metadata(logctx, count, type, name, NULL, - gbytes, le, metadata); - } - - bytestream2_seek(gbytes, cur_pos, SEEK_SET); - - return ret; -} - - -int ff_exif_decode_ifd(void *logctx, GetByteContext *gbytes, - int le, int depth, AVDictionary **metadata) -{ - int i, ret; - int entries; - - entries = ff_tget_short(gbytes, le); - - if (bytestream2_get_bytes_left(gbytes) < entries * 12) { - return AVERROR_INVALIDDATA; - } - - for (i = 0; i < entries; i++) { - if ((ret = exif_decode_tag(logctx, gbytes, le, depth, metadata)) < 0) { - return ret; - } - } - - // return next IDF offset or 0x000000000 or a value < 0 for failure - return ff_tget_long(gbytes, le); -} - -int avpriv_exif_decode_ifd(void *logctx, const uint8_t *buf, int size, - int le, int depth, AVDictionary **metadata) -{ - GetByteContext gb; - - bytestream2_init(&gb, buf, size); - - return ff_exif_decode_ifd(logctx, &gb, le, depth, metadata); -} diff --git a/spaces/colakin/video-generater/public/ffmpeg/libavcodec/ffv1enc.c b/spaces/colakin/video-generater/public/ffmpeg/libavcodec/ffv1enc.c deleted file mode 100644 index fb12776cc299a162238b8b2b0405360b34a07745..0000000000000000000000000000000000000000 --- a/spaces/colakin/video-generater/public/ffmpeg/libavcodec/ffv1enc.c +++ /dev/null @@ -1,1304 +0,0 @@ -/* - * FFV1 encoder - * - * Copyright (c) 2003-2013 Michael Niedermayer - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * FF Video Codec 1 (a lossless codec) encoder - */ - -#include "libavutil/attributes.h" -#include "libavutil/avassert.h" -#include "libavutil/crc.h" -#include "libavutil/opt.h" -#include "libavutil/imgutils.h" -#include "libavutil/pixdesc.h" - -#include "avcodec.h" -#include "encode.h" -#include "codec_internal.h" -#include "put_bits.h" -#include "put_golomb.h" -#include "rangecoder.h" -#include "mathops.h" -#include "ffv1.h" - -static const int8_t quant5_10bit[256] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -}; - -static const int8_t quant5[256] = { - 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -1, -}; - -static const int8_t quant9_10bit[256] = { - 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, - -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, - -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, - -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, - -4, -4, -4, -4, -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -3, - -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, -3, - -3, -3, -3, -3, -3, -3, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - -2, -2, -2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -0, -0, -0, -0, -}; - -static const int8_t quant11[256] = { - 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, - -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -4, -4, - -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, - -4, -4, -4, -4, -4, -3, -3, -3, -3, -3, -3, -3, -2, -2, -2, -1, -}; - -static const uint8_t ver2_state[256] = { - 0, 10, 10, 10, 10, 16, 16, 16, 28, 16, 16, 29, 42, 49, 20, 49, - 59, 25, 26, 26, 27, 31, 33, 33, 33, 34, 34, 37, 67, 38, 39, 39, - 40, 40, 41, 79, 43, 44, 45, 45, 48, 48, 64, 50, 51, 52, 88, 52, - 53, 74, 55, 57, 58, 58, 74, 60, 101, 61, 62, 84, 66, 66, 68, 69, - 87, 82, 71, 97, 73, 73, 82, 75, 111, 77, 94, 78, 87, 81, 83, 97, - 85, 83, 94, 86, 99, 89, 90, 99, 111, 92, 93, 134, 95, 98, 105, 98, - 105, 110, 102, 108, 102, 118, 103, 106, 106, 113, 109, 112, 114, 112, 116, 125, - 115, 116, 117, 117, 126, 119, 125, 121, 121, 123, 145, 124, 126, 131, 127, 129, - 165, 130, 132, 138, 133, 135, 145, 136, 137, 139, 146, 141, 143, 142, 144, 148, - 147, 155, 151, 149, 151, 150, 152, 157, 153, 154, 156, 168, 158, 162, 161, 160, - 172, 163, 169, 164, 166, 184, 167, 170, 177, 174, 171, 173, 182, 176, 180, 178, - 175, 189, 179, 181, 186, 183, 192, 185, 200, 187, 191, 188, 190, 197, 193, 196, - 197, 194, 195, 196, 198, 202, 199, 201, 210, 203, 207, 204, 205, 206, 208, 214, - 209, 211, 221, 212, 213, 215, 224, 216, 217, 218, 219, 220, 222, 228, 223, 225, - 226, 224, 227, 229, 240, 230, 231, 232, 233, 234, 235, 236, 238, 239, 237, 242, - 241, 243, 242, 244, 245, 246, 247, 248, 249, 250, 251, 252, 252, 253, 254, 255, -}; - -static void find_best_state(uint8_t best_state[256][256], - const uint8_t one_state[256]) -{ - int i, j, k, m; - uint32_t l2tab[256]; - - for (i = 1; i < 256; i++) - l2tab[i] = -log2(i / 256.0) * ((1U << 31) / 8); - - for (i = 0; i < 256; i++) { - uint64_t best_len[256]; - - for (j = 0; j < 256; j++) - best_len[j] = UINT64_MAX; - - for (j = FFMAX(i - 10, 1); j < FFMIN(i + 11, 256); j++) { - uint32_t occ[256] = { 0 }; - uint64_t len = 0; - occ[j] = UINT32_MAX; - - if (!one_state[j]) - continue; - - for (k = 0; k < 256; k++) { - uint32_t newocc[256] = { 0 }; - for (m = 1; m < 256; m++) - if (occ[m]) { - len += (occ[m]*(( i *(uint64_t)l2tab[ m] - + (256-i)*(uint64_t)l2tab[256-m])>>8)) >> 8; - } - if (len < best_len[k]) { - best_len[k] = len; - best_state[i][k] = j; - } - for (m = 1; m < 256; m++) - if (occ[m]) { - newocc[ one_state[ m]] += occ[m] * (uint64_t) i >> 8; - newocc[256 - one_state[256 - m]] += occ[m] * (uint64_t)(256 - i) >> 8; - } - memcpy(occ, newocc, sizeof(occ)); - } - } - } -} - -static av_always_inline av_flatten void put_symbol_inline(RangeCoder *c, - uint8_t *state, int v, - int is_signed, - uint64_t rc_stat[256][2], - uint64_t rc_stat2[32][2]) -{ - int i; - -#define put_rac(C, S, B) \ - do { \ - if (rc_stat) { \ - rc_stat[*(S)][B]++; \ - rc_stat2[(S) - state][B]++; \ - } \ - put_rac(C, S, B); \ - } while (0) - - if (v) { - const int a = FFABS(v); - const int e = av_log2(a); - put_rac(c, state + 0, 0); - if (e <= 9) { - for (i = 0; i < e; i++) - put_rac(c, state + 1 + i, 1); // 1..10 - put_rac(c, state + 1 + i, 0); - - for (i = e - 1; i >= 0; i--) - put_rac(c, state + 22 + i, (a >> i) & 1); // 22..31 - - if (is_signed) - put_rac(c, state + 11 + e, v < 0); // 11..21 - } else { - for (i = 0; i < e; i++) - put_rac(c, state + 1 + FFMIN(i, 9), 1); // 1..10 - put_rac(c, state + 1 + 9, 0); - - for (i = e - 1; i >= 0; i--) - put_rac(c, state + 22 + FFMIN(i, 9), (a >> i) & 1); // 22..31 - - if (is_signed) - put_rac(c, state + 11 + 10, v < 0); // 11..21 - } - } else { - put_rac(c, state + 0, 1); - } -#undef put_rac -} - -static av_noinline void put_symbol(RangeCoder *c, uint8_t *state, - int v, int is_signed) -{ - put_symbol_inline(c, state, v, is_signed, NULL, NULL); -} - - -static inline void put_vlc_symbol(PutBitContext *pb, VlcState *const state, - int v, int bits) -{ - int i, k, code; - v = fold(v - state->bias, bits); - - i = state->count; - k = 0; - while (i < state->error_sum) { // FIXME: optimize - k++; - i += i; - } - - av_assert2(k <= 13); - - code = v ^ ((2 * state->drift + state->count) >> 31); - - ff_dlog(NULL, "v:%d/%d bias:%d error:%d drift:%d count:%d k:%d\n", v, code, - state->bias, state->error_sum, state->drift, state->count, k); - set_sr_golomb(pb, code, k, 12, bits); - - update_vlc_state(state, v); -} - -#define TYPE int16_t -#define RENAME(name) name -#include "ffv1enc_template.c" -#undef TYPE -#undef RENAME - -#define TYPE int32_t -#define RENAME(name) name ## 32 -#include "ffv1enc_template.c" - -static int encode_plane(FFV1Context *s, const uint8_t *src, int w, int h, - int stride, int plane_index, int pixel_stride) -{ - int x, y, i, ret; - const int ring_size = s->context_model ? 3 : 2; - int16_t *sample[3]; - s->run_index = 0; - - memset(s->sample_buffer, 0, ring_size * (w + 6) * sizeof(*s->sample_buffer)); - - for (y = 0; y < h; y++) { - for (i = 0; i < ring_size; i++) - sample[i] = s->sample_buffer + (w + 6) * ((h + i - y) % ring_size) + 3; - - sample[0][-1]= sample[1][0 ]; - sample[1][ w]= sample[1][w-1]; - if (s->bits_per_raw_sample <= 8) { - for (x = 0; x < w; x++) - sample[0][x] = src[x * pixel_stride + stride * y]; - if((ret = encode_line(s, w, sample, plane_index, 8)) < 0) - return ret; - } else { - if (s->packed_at_lsb) { - for (x = 0; x < w; x++) { - sample[0][x] = ((uint16_t*)(src + stride*y))[x]; - } - } else { - for (x = 0; x < w; x++) { - sample[0][x] = ((uint16_t*)(src + stride*y))[x] >> (16 - s->bits_per_raw_sample); - } - } - if((ret = encode_line(s, w, sample, plane_index, s->bits_per_raw_sample)) < 0) - return ret; - } - } - return 0; -} - -static void write_quant_table(RangeCoder *c, int16_t *quant_table) -{ - int last = 0; - int i; - uint8_t state[CONTEXT_SIZE]; - memset(state, 128, sizeof(state)); - - for (i = 1; i < 128; i++) - if (quant_table[i] != quant_table[i - 1]) { - put_symbol(c, state, i - last - 1, 0); - last = i; - } - put_symbol(c, state, i - last - 1, 0); -} - -static void write_quant_tables(RangeCoder *c, - int16_t quant_table[MAX_CONTEXT_INPUTS][256]) -{ - int i; - for (i = 0; i < 5; i++) - write_quant_table(c, quant_table[i]); -} - -static int contains_non_128(uint8_t (*initial_state)[CONTEXT_SIZE], - int nb_contexts) -{ - if (!initial_state) - return 0; - for (int i = 0; i < nb_contexts; i++) - for (int j = 0; j < CONTEXT_SIZE; j++) - if (initial_state[i][j] != 128) - return 1; - return 0; -} - -static void write_header(FFV1Context *f) -{ - uint8_t state[CONTEXT_SIZE]; - int i, j; - RangeCoder *const c = &f->slice_context[0]->c; - - memset(state, 128, sizeof(state)); - - if (f->version < 2) { - put_symbol(c, state, f->version, 0); - put_symbol(c, state, f->ac, 0); - if (f->ac == AC_RANGE_CUSTOM_TAB) { - for (i = 1; i < 256; i++) - put_symbol(c, state, - f->state_transition[i] - c->one_state[i], 1); - } - put_symbol(c, state, f->colorspace, 0); //YUV cs type - if (f->version > 0) - put_symbol(c, state, f->bits_per_raw_sample, 0); - put_rac(c, state, f->chroma_planes); - put_symbol(c, state, f->chroma_h_shift, 0); - put_symbol(c, state, f->chroma_v_shift, 0); - put_rac(c, state, f->transparency); - - write_quant_tables(c, f->quant_table); - } else if (f->version < 3) { - put_symbol(c, state, f->slice_count, 0); - for (i = 0; i < f->slice_count; i++) { - FFV1Context *fs = f->slice_context[i]; - put_symbol(c, state, - (fs->slice_x + 1) * f->num_h_slices / f->width, 0); - put_symbol(c, state, - (fs->slice_y + 1) * f->num_v_slices / f->height, 0); - put_symbol(c, state, - (fs->slice_width + 1) * f->num_h_slices / f->width - 1, - 0); - put_symbol(c, state, - (fs->slice_height + 1) * f->num_v_slices / f->height - 1, - 0); - for (j = 0; j < f->plane_count; j++) { - put_symbol(c, state, f->plane[j].quant_table_index, 0); - av_assert0(f->plane[j].quant_table_index == f->context_model); - } - } - } -} - -static int write_extradata(FFV1Context *f) -{ - RangeCoder *const c = &f->c; - uint8_t state[CONTEXT_SIZE]; - int i, j, k; - uint8_t state2[32][CONTEXT_SIZE]; - unsigned v; - - memset(state2, 128, sizeof(state2)); - memset(state, 128, sizeof(state)); - - f->avctx->extradata_size = 10000 + 4 + - (11 * 11 * 5 * 5 * 5 + 11 * 11 * 11) * 32; - f->avctx->extradata = av_malloc(f->avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE); - if (!f->avctx->extradata) - return AVERROR(ENOMEM); - ff_init_range_encoder(c, f->avctx->extradata, f->avctx->extradata_size); - ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8); - - put_symbol(c, state, f->version, 0); - if (f->version > 2) { - if (f->version == 3) { - f->micro_version = 4; - } else if (f->version == 4) - f->micro_version = 2; - put_symbol(c, state, f->micro_version, 0); - } - - put_symbol(c, state, f->ac, 0); - if (f->ac == AC_RANGE_CUSTOM_TAB) - for (i = 1; i < 256; i++) - put_symbol(c, state, f->state_transition[i] - c->one_state[i], 1); - - put_symbol(c, state, f->colorspace, 0); // YUV cs type - put_symbol(c, state, f->bits_per_raw_sample, 0); - put_rac(c, state, f->chroma_planes); - put_symbol(c, state, f->chroma_h_shift, 0); - put_symbol(c, state, f->chroma_v_shift, 0); - put_rac(c, state, f->transparency); - put_symbol(c, state, f->num_h_slices - 1, 0); - put_symbol(c, state, f->num_v_slices - 1, 0); - - put_symbol(c, state, f->quant_table_count, 0); - for (i = 0; i < f->quant_table_count; i++) - write_quant_tables(c, f->quant_tables[i]); - - for (i = 0; i < f->quant_table_count; i++) { - if (contains_non_128(f->initial_states[i], f->context_count[i])) { - put_rac(c, state, 1); - for (j = 0; j < f->context_count[i]; j++) - for (k = 0; k < CONTEXT_SIZE; k++) { - int pred = j ? f->initial_states[i][j - 1][k] : 128; - put_symbol(c, state2[k], - (int8_t)(f->initial_states[i][j][k] - pred), 1); - } - } else { - put_rac(c, state, 0); - } - } - - if (f->version > 2) { - put_symbol(c, state, f->ec, 0); - put_symbol(c, state, f->intra = (f->avctx->gop_size < 2), 0); - } - - f->avctx->extradata_size = ff_rac_terminate(c, 0); - v = av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0, f->avctx->extradata, f->avctx->extradata_size); - AV_WL32(f->avctx->extradata + f->avctx->extradata_size, v); - f->avctx->extradata_size += 4; - - return 0; -} - -static int sort_stt(FFV1Context *s, uint8_t stt[256]) -{ - int i, i2, changed, print = 0; - - do { - changed = 0; - for (i = 12; i < 244; i++) { - for (i2 = i + 1; i2 < 245 && i2 < i + 4; i2++) { - -#define COST(old, new) \ - s->rc_stat[old][0] * -log2((256 - (new)) / 256.0) + \ - s->rc_stat[old][1] * -log2((new) / 256.0) - -#define COST2(old, new) \ - COST(old, new) + COST(256 - (old), 256 - (new)) - - double size0 = COST2(i, i) + COST2(i2, i2); - double sizeX = COST2(i, i2) + COST2(i2, i); - if (size0 - sizeX > size0*(1e-14) && i != 128 && i2 != 128) { - int j; - FFSWAP(int, stt[i], stt[i2]); - FFSWAP(int, s->rc_stat[i][0], s->rc_stat[i2][0]); - FFSWAP(int, s->rc_stat[i][1], s->rc_stat[i2][1]); - if (i != 256 - i2) { - FFSWAP(int, stt[256 - i], stt[256 - i2]); - FFSWAP(int, s->rc_stat[256 - i][0], s->rc_stat[256 - i2][0]); - FFSWAP(int, s->rc_stat[256 - i][1], s->rc_stat[256 - i2][1]); - } - for (j = 1; j < 256; j++) { - if (stt[j] == i) - stt[j] = i2; - else if (stt[j] == i2) - stt[j] = i; - if (i != 256 - i2) { - if (stt[256 - j] == 256 - i) - stt[256 - j] = 256 - i2; - else if (stt[256 - j] == 256 - i2) - stt[256 - j] = 256 - i; - } - } - print = changed = 1; - } - } - } - } while (changed); - return print; -} - -static av_cold int encode_init(AVCodecContext *avctx) -{ - FFV1Context *s = avctx->priv_data; - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); - int i, j, k, m, ret; - - if ((ret = ff_ffv1_common_init(avctx)) < 0) - return ret; - - s->version = 0; - - if ((avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) || - avctx->slices > 1) - s->version = FFMAX(s->version, 2); - - // Unspecified level & slices, we choose version 1.2+ to ensure multithreaded decodability - if (avctx->slices == 0 && avctx->level < 0 && avctx->width * avctx->height > 720*576) - s->version = FFMAX(s->version, 2); - - if (avctx->level <= 0 && s->version == 2) { - s->version = 3; - } - if (avctx->level >= 0 && avctx->level <= 4) { - if (avctx->level < s->version) { - av_log(avctx, AV_LOG_ERROR, "Version %d needed for requested features but %d requested\n", s->version, avctx->level); - return AVERROR(EINVAL); - } - s->version = avctx->level; - } - - if (s->ec < 0) { - s->ec = (s->version >= 3); - } - - // CRC requires version 3+ - if (s->ec) - s->version = FFMAX(s->version, 3); - - if ((s->version == 2 || s->version>3) && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { - av_log(avctx, AV_LOG_ERROR, "Version 2 needed for requested features but version 2 is experimental and not enabled\n"); - return AVERROR_INVALIDDATA; - } - - if (s->ac == 1) // Compatbility with common command line usage - s->ac = AC_RANGE_CUSTOM_TAB; - else if (s->ac == AC_RANGE_DEFAULT_TAB_FORCE) - s->ac = AC_RANGE_DEFAULT_TAB; - - s->plane_count = 3; - switch(avctx->pix_fmt) { - case AV_PIX_FMT_GRAY9: - case AV_PIX_FMT_YUV444P9: - case AV_PIX_FMT_YUV422P9: - case AV_PIX_FMT_YUV420P9: - case AV_PIX_FMT_YUVA444P9: - case AV_PIX_FMT_YUVA422P9: - case AV_PIX_FMT_YUVA420P9: - if (!avctx->bits_per_raw_sample) - s->bits_per_raw_sample = 9; - case AV_PIX_FMT_GRAY10: - case AV_PIX_FMT_YUV444P10: - case AV_PIX_FMT_YUV440P10: - case AV_PIX_FMT_YUV420P10: - case AV_PIX_FMT_YUV422P10: - case AV_PIX_FMT_YUVA444P10: - case AV_PIX_FMT_YUVA422P10: - case AV_PIX_FMT_YUVA420P10: - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) - s->bits_per_raw_sample = 10; - case AV_PIX_FMT_GRAY12: - case AV_PIX_FMT_YUV444P12: - case AV_PIX_FMT_YUV440P12: - case AV_PIX_FMT_YUV420P12: - case AV_PIX_FMT_YUV422P12: - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) - s->bits_per_raw_sample = 12; - case AV_PIX_FMT_YUV444P14: - case AV_PIX_FMT_YUV420P14: - case AV_PIX_FMT_YUV422P14: - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) - s->bits_per_raw_sample = 14; - s->packed_at_lsb = 1; - case AV_PIX_FMT_GRAY16: - case AV_PIX_FMT_YUV444P16: - case AV_PIX_FMT_YUV422P16: - case AV_PIX_FMT_YUV420P16: - case AV_PIX_FMT_YUVA444P16: - case AV_PIX_FMT_YUVA422P16: - case AV_PIX_FMT_YUVA420P16: - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) { - s->bits_per_raw_sample = 16; - } else if (!s->bits_per_raw_sample) { - s->bits_per_raw_sample = avctx->bits_per_raw_sample; - } - if (s->bits_per_raw_sample <= 8) { - av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample invalid\n"); - return AVERROR_INVALIDDATA; - } - s->version = FFMAX(s->version, 1); - case AV_PIX_FMT_GRAY8: - case AV_PIX_FMT_YA8: - case AV_PIX_FMT_YUV444P: - case AV_PIX_FMT_YUV440P: - case AV_PIX_FMT_YUV422P: - case AV_PIX_FMT_YUV420P: - case AV_PIX_FMT_YUV411P: - case AV_PIX_FMT_YUV410P: - case AV_PIX_FMT_YUVA444P: - case AV_PIX_FMT_YUVA422P: - case AV_PIX_FMT_YUVA420P: - s->chroma_planes = desc->nb_components < 3 ? 0 : 1; - s->colorspace = 0; - s->transparency = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA); - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) - s->bits_per_raw_sample = 8; - else if (!s->bits_per_raw_sample) - s->bits_per_raw_sample = 8; - break; - case AV_PIX_FMT_RGB32: - s->colorspace = 1; - s->transparency = 1; - s->chroma_planes = 1; - s->bits_per_raw_sample = 8; - break; - case AV_PIX_FMT_RGBA64: - s->colorspace = 1; - s->transparency = 1; - s->chroma_planes = 1; - s->bits_per_raw_sample = 16; - s->use32bit = 1; - s->version = FFMAX(s->version, 1); - break; - case AV_PIX_FMT_RGB48: - s->colorspace = 1; - s->chroma_planes = 1; - s->bits_per_raw_sample = 16; - s->use32bit = 1; - s->version = FFMAX(s->version, 1); - break; - case AV_PIX_FMT_0RGB32: - s->colorspace = 1; - s->chroma_planes = 1; - s->bits_per_raw_sample = 8; - break; - case AV_PIX_FMT_GBRP9: - if (!avctx->bits_per_raw_sample) - s->bits_per_raw_sample = 9; - case AV_PIX_FMT_GBRP10: - case AV_PIX_FMT_GBRAP10: - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) - s->bits_per_raw_sample = 10; - case AV_PIX_FMT_GBRP12: - case AV_PIX_FMT_GBRAP12: - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) - s->bits_per_raw_sample = 12; - case AV_PIX_FMT_GBRP14: - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) - s->bits_per_raw_sample = 14; - case AV_PIX_FMT_GBRP16: - case AV_PIX_FMT_GBRAP16: - if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) - s->bits_per_raw_sample = 16; - else if (!s->bits_per_raw_sample) - s->bits_per_raw_sample = avctx->bits_per_raw_sample; - s->transparency = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA); - s->colorspace = 1; - s->chroma_planes = 1; - if (s->bits_per_raw_sample >= 16) { - s->use32bit = 1; - } - s->version = FFMAX(s->version, 1); - break; - default: - av_log(avctx, AV_LOG_ERROR, "format not supported\n"); - return AVERROR(ENOSYS); - } - av_assert0(s->bits_per_raw_sample >= 8); - - if (s->bits_per_raw_sample > 8) { - if (s->ac == AC_GOLOMB_RICE) { - av_log(avctx, AV_LOG_INFO, - "bits_per_raw_sample > 8, forcing range coder\n"); - s->ac = AC_RANGE_CUSTOM_TAB; - } - } - - if (s->ac == AC_RANGE_CUSTOM_TAB) { - for (i = 1; i < 256; i++) - s->state_transition[i] = ver2_state[i]; - } else { - RangeCoder c; - ff_build_rac_states(&c, 0.05 * (1LL << 32), 256 - 8); - for (i = 1; i < 256; i++) - s->state_transition[i] = c.one_state[i]; - } - - for (i = 0; i < 256; i++) { - s->quant_table_count = 2; - if (s->bits_per_raw_sample <= 8) { - s->quant_tables[0][0][i]= quant11[i]; - s->quant_tables[0][1][i]= 11*quant11[i]; - s->quant_tables[0][2][i]= 11*11*quant11[i]; - s->quant_tables[1][0][i]= quant11[i]; - s->quant_tables[1][1][i]= 11*quant11[i]; - s->quant_tables[1][2][i]= 11*11*quant5 [i]; - s->quant_tables[1][3][i]= 5*11*11*quant5 [i]; - s->quant_tables[1][4][i]= 5*5*11*11*quant5 [i]; - } else { - s->quant_tables[0][0][i]= quant9_10bit[i]; - s->quant_tables[0][1][i]= 11*quant9_10bit[i]; - s->quant_tables[0][2][i]= 11*11*quant9_10bit[i]; - s->quant_tables[1][0][i]= quant9_10bit[i]; - s->quant_tables[1][1][i]= 11*quant9_10bit[i]; - s->quant_tables[1][2][i]= 11*11*quant5_10bit[i]; - s->quant_tables[1][3][i]= 5*11*11*quant5_10bit[i]; - s->quant_tables[1][4][i]= 5*5*11*11*quant5_10bit[i]; - } - } - s->context_count[0] = (11 * 11 * 11 + 1) / 2; - s->context_count[1] = (11 * 11 * 5 * 5 * 5 + 1) / 2; - memcpy(s->quant_table, s->quant_tables[s->context_model], - sizeof(s->quant_table)); - - for (i = 0; i < s->plane_count; i++) { - PlaneContext *const p = &s->plane[i]; - - memcpy(p->quant_table, s->quant_table, sizeof(p->quant_table)); - p->quant_table_index = s->context_model; - p->context_count = s->context_count[p->quant_table_index]; - } - - if ((ret = ff_ffv1_allocate_initial_states(s)) < 0) - return ret; - - if (!s->transparency) - s->plane_count = 2; - if (!s->chroma_planes && s->version > 3) - s->plane_count--; - - ret = av_pix_fmt_get_chroma_sub_sample (avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift); - if (ret) - return ret; - - s->picture_number = 0; - - if (avctx->flags & (AV_CODEC_FLAG_PASS1 | AV_CODEC_FLAG_PASS2)) { - for (i = 0; i < s->quant_table_count; i++) { - s->rc_stat2[i] = av_mallocz(s->context_count[i] * - sizeof(*s->rc_stat2[i])); - if (!s->rc_stat2[i]) - return AVERROR(ENOMEM); - } - } - if (avctx->stats_in) { - char *p = avctx->stats_in; - uint8_t (*best_state)[256] = av_malloc_array(256, 256); - int gob_count = 0; - char *next; - if (!best_state) - return AVERROR(ENOMEM); - - av_assert0(s->version >= 2); - - for (;;) { - for (j = 0; j < 256; j++) - for (i = 0; i < 2; i++) { - s->rc_stat[j][i] = strtol(p, &next, 0); - if (next == p) { - av_log(avctx, AV_LOG_ERROR, - "2Pass file invalid at %d %d [%s]\n", j, i, p); - av_freep(&best_state); - return AVERROR_INVALIDDATA; - } - p = next; - } - for (i = 0; i < s->quant_table_count; i++) - for (j = 0; j < s->context_count[i]; j++) { - for (k = 0; k < 32; k++) - for (m = 0; m < 2; m++) { - s->rc_stat2[i][j][k][m] = strtol(p, &next, 0); - if (next == p) { - av_log(avctx, AV_LOG_ERROR, - "2Pass file invalid at %d %d %d %d [%s]\n", - i, j, k, m, p); - av_freep(&best_state); - return AVERROR_INVALIDDATA; - } - p = next; - } - } - gob_count = strtol(p, &next, 0); - if (next == p || gob_count <= 0) { - av_log(avctx, AV_LOG_ERROR, "2Pass file invalid\n"); - av_freep(&best_state); - return AVERROR_INVALIDDATA; - } - p = next; - while (*p == '\n' || *p == ' ') - p++; - if (p[0] == 0) - break; - } - if (s->ac == AC_RANGE_CUSTOM_TAB) - sort_stt(s, s->state_transition); - - find_best_state(best_state, s->state_transition); - - for (i = 0; i < s->quant_table_count; i++) { - for (k = 0; k < 32; k++) { - double a=0, b=0; - int jp = 0; - for (j = 0; j < s->context_count[i]; j++) { - double p = 128; - if (s->rc_stat2[i][j][k][0] + s->rc_stat2[i][j][k][1] > 200 && j || a+b > 200) { - if (a+b) - p = 256.0 * b / (a + b); - s->initial_states[i][jp][k] = - best_state[av_clip(round(p), 1, 255)][av_clip_uint8((a + b) / gob_count)]; - for(jp++; jpinitial_states[i][jp][k] = s->initial_states[i][jp-1][k]; - a=b=0; - } - a += s->rc_stat2[i][j][k][0]; - b += s->rc_stat2[i][j][k][1]; - if (a+b) { - p = 256.0 * b / (a + b); - } - s->initial_states[i][j][k] = - best_state[av_clip(round(p), 1, 255)][av_clip_uint8((a + b) / gob_count)]; - } - } - } - av_freep(&best_state); - } - - if (s->version > 1) { - int plane_count = 1 + 2*s->chroma_planes + s->transparency; - int max_h_slices = AV_CEIL_RSHIFT(avctx->width , s->chroma_h_shift); - int max_v_slices = AV_CEIL_RSHIFT(avctx->height, s->chroma_v_shift); - s->num_v_slices = (avctx->width > 352 || avctx->height > 288 || !avctx->slices) ? 2 : 1; - - s->num_v_slices = FFMIN(s->num_v_slices, max_v_slices); - - for (; s->num_v_slices < 32; s->num_v_slices++) { - for (s->num_h_slices = s->num_v_slices; s->num_h_slices < 2*s->num_v_slices; s->num_h_slices++) { - int maxw = (avctx->width + s->num_h_slices - 1) / s->num_h_slices; - int maxh = (avctx->height + s->num_v_slices - 1) / s->num_v_slices; - if (s->num_h_slices > max_h_slices || s->num_v_slices > max_v_slices) - continue; - if (maxw * maxh * (int64_t)(s->bits_per_raw_sample+1) * plane_count > 8<<24) - continue; - if (avctx->slices == s->num_h_slices * s->num_v_slices && avctx->slices <= MAX_SLICES || !avctx->slices) - goto slices_ok; - } - } - av_log(avctx, AV_LOG_ERROR, - "Unsupported number %d of slices requested, please specify a " - "supported number with -slices (ex:4,6,9,12,16, ...)\n", - avctx->slices); - return AVERROR(ENOSYS); -slices_ok: - if ((ret = write_extradata(s)) < 0) - return ret; - } - - if ((ret = ff_ffv1_init_slice_contexts(s)) < 0) - return ret; - s->slice_count = s->max_slice_count; - if ((ret = ff_ffv1_init_slices_state(s)) < 0) - return ret; - -#define STATS_OUT_SIZE 1024 * 1024 * 6 - if (avctx->flags & AV_CODEC_FLAG_PASS1) { - avctx->stats_out = av_mallocz(STATS_OUT_SIZE); - if (!avctx->stats_out) - return AVERROR(ENOMEM); - for (i = 0; i < s->quant_table_count; i++) - for (j = 0; j < s->max_slice_count; j++) { - FFV1Context *sf = s->slice_context[j]; - av_assert0(!sf->rc_stat2[i]); - sf->rc_stat2[i] = av_mallocz(s->context_count[i] * - sizeof(*sf->rc_stat2[i])); - if (!sf->rc_stat2[i]) - return AVERROR(ENOMEM); - } - } - - return 0; -} - -static void encode_slice_header(FFV1Context *f, FFV1Context *fs) -{ - RangeCoder *c = &fs->c; - uint8_t state[CONTEXT_SIZE]; - int j; - memset(state, 128, sizeof(state)); - - put_symbol(c, state, (fs->slice_x +1)*f->num_h_slices / f->width , 0); - put_symbol(c, state, (fs->slice_y +1)*f->num_v_slices / f->height , 0); - put_symbol(c, state, (fs->slice_width +1)*f->num_h_slices / f->width -1, 0); - put_symbol(c, state, (fs->slice_height+1)*f->num_v_slices / f->height-1, 0); - for (j=0; jplane_count; j++) { - put_symbol(c, state, f->plane[j].quant_table_index, 0); - av_assert0(f->plane[j].quant_table_index == f->context_model); - } - if (!f->cur_enc_frame->interlaced_frame) - put_symbol(c, state, 3, 0); - else - put_symbol(c, state, 1 + !f->cur_enc_frame->top_field_first, 0); - put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.num, 0); - put_symbol(c, state, f->cur_enc_frame->sample_aspect_ratio.den, 0); - if (f->version > 3) { - put_rac(c, state, fs->slice_coding_mode == 1); - if (fs->slice_coding_mode == 1) - ff_ffv1_clear_slice_state(f, fs); - put_symbol(c, state, fs->slice_coding_mode, 0); - if (fs->slice_coding_mode != 1) { - put_symbol(c, state, fs->slice_rct_by_coef, 0); - put_symbol(c, state, fs->slice_rct_ry_coef, 0); - } - } -} - -static void choose_rct_params(FFV1Context *fs, const uint8_t *src[3], const int stride[3], int w, int h) -{ -#define NB_Y_COEFF 15 - static const int rct_y_coeff[15][2] = { - {0, 0}, // 4G - {1, 1}, // R + 2G + B - {2, 2}, // 2R + 2B - {0, 2}, // 2G + 2B - {2, 0}, // 2R + 2G - {4, 0}, // 4R - {0, 4}, // 4B - - {0, 3}, // 1G + 3B - {3, 0}, // 3R + 1G - {3, 1}, // 3R + B - {1, 3}, // R + 3B - {1, 2}, // R + G + 2B - {2, 1}, // 2R + G + B - {0, 1}, // 3G + B - {1, 0}, // R + 3G - }; - - int stat[NB_Y_COEFF] = {0}; - int x, y, i, p, best; - int16_t *sample[3]; - int lbd = fs->bits_per_raw_sample <= 8; - - for (y = 0; y < h; y++) { - int lastr=0, lastg=0, lastb=0; - for (p = 0; p < 3; p++) - sample[p] = fs->sample_buffer + p*w; - - for (x = 0; x < w; x++) { - int b, g, r; - int ab, ag, ar; - if (lbd) { - unsigned v = *((const uint32_t*)(src[0] + x*4 + stride[0]*y)); - b = v & 0xFF; - g = (v >> 8) & 0xFF; - r = (v >> 16) & 0xFF; - } else { - b = *((const uint16_t*)(src[0] + x*2 + stride[0]*y)); - g = *((const uint16_t*)(src[1] + x*2 + stride[1]*y)); - r = *((const uint16_t*)(src[2] + x*2 + stride[2]*y)); - } - - ar = r - lastr; - ag = g - lastg; - ab = b - lastb; - if (x && y) { - int bg = ag - sample[0][x]; - int bb = ab - sample[1][x]; - int br = ar - sample[2][x]; - - br -= bg; - bb -= bg; - - for (i = 0; i>2)); - } - - } - sample[0][x] = ag; - sample[1][x] = ab; - sample[2][x] = ar; - - lastr = r; - lastg = g; - lastb = b; - } - } - - best = 0; - for (i=1; islice_rct_by_coef = rct_y_coeff[best][1]; - fs->slice_rct_ry_coef = rct_y_coeff[best][0]; -} - -static int encode_slice(AVCodecContext *c, void *arg) -{ - FFV1Context *fs = *(void **)arg; - FFV1Context *f = fs->avctx->priv_data; - int width = fs->slice_width; - int height = fs->slice_height; - int x = fs->slice_x; - int y = fs->slice_y; - const AVFrame *const p = f->cur_enc_frame; - const int ps = av_pix_fmt_desc_get(c->pix_fmt)->comp[0].step; - int ret; - RangeCoder c_bak = fs->c; - const uint8_t *planes[4] = {p->data[0] + ps*x + y*p->linesize[0], - p->data[1] ? p->data[1] + ps*x + y*p->linesize[1] : NULL, - p->data[2] ? p->data[2] + ps*x + y*p->linesize[2] : NULL, - p->data[3] ? p->data[3] + ps*x + y*p->linesize[3] : NULL}; - - fs->slice_coding_mode = 0; - if (f->version > 3) { - choose_rct_params(fs, planes, p->linesize, width, height); - } else { - fs->slice_rct_by_coef = 1; - fs->slice_rct_ry_coef = 1; - } - -retry: - if (f->key_frame) - ff_ffv1_clear_slice_state(f, fs); - if (f->version > 2) { - encode_slice_header(f, fs); - } - if (fs->ac == AC_GOLOMB_RICE) { - fs->ac_byte_count = f->version > 2 || (!x && !y) ? ff_rac_terminate(&fs->c, f->version > 2) : 0; - init_put_bits(&fs->pb, - fs->c.bytestream_start + fs->ac_byte_count, - fs->c.bytestream_end - fs->c.bytestream_start - fs->ac_byte_count); - } - - if (f->colorspace == 0 && c->pix_fmt != AV_PIX_FMT_YA8) { - const int chroma_width = AV_CEIL_RSHIFT(width, f->chroma_h_shift); - const int chroma_height = AV_CEIL_RSHIFT(height, f->chroma_v_shift); - const int cx = x >> f->chroma_h_shift; - const int cy = y >> f->chroma_v_shift; - - ret = encode_plane(fs, p->data[0] + ps*x + y*p->linesize[0], width, height, p->linesize[0], 0, 1); - - if (f->chroma_planes) { - ret |= encode_plane(fs, p->data[1] + ps*cx+cy*p->linesize[1], chroma_width, chroma_height, p->linesize[1], 1, 1); - ret |= encode_plane(fs, p->data[2] + ps*cx+cy*p->linesize[2], chroma_width, chroma_height, p->linesize[2], 1, 1); - } - if (fs->transparency) - ret |= encode_plane(fs, p->data[3] + ps*x + y*p->linesize[3], width, height, p->linesize[3], 2, 1); - } else if (c->pix_fmt == AV_PIX_FMT_YA8) { - ret = encode_plane(fs, p->data[0] + ps*x + y*p->linesize[0], width, height, p->linesize[0], 0, 2); - ret |= encode_plane(fs, p->data[0] + 1 + ps*x + y*p->linesize[0], width, height, p->linesize[0], 1, 2); - } else if (f->use32bit) { - ret = encode_rgb_frame32(fs, planes, width, height, p->linesize); - } else { - ret = encode_rgb_frame(fs, planes, width, height, p->linesize); - } - - if (ret < 0) { - av_assert0(fs->slice_coding_mode == 0); - if (fs->version < 4 || !fs->ac) { - av_log(c, AV_LOG_ERROR, "Buffer too small\n"); - return ret; - } - av_log(c, AV_LOG_DEBUG, "Coding slice as PCM\n"); - fs->slice_coding_mode = 1; - fs->c = c_bak; - goto retry; - } - - return 0; -} - -static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, - const AVFrame *pict, int *got_packet) -{ - FFV1Context *f = avctx->priv_data; - RangeCoder *const c = &f->slice_context[0]->c; - uint8_t keystate = 128; - uint8_t *buf_p; - int i, ret; - int64_t maxsize = AV_INPUT_BUFFER_MIN_SIZE - + avctx->width*avctx->height*37LL*4; - - if(!pict) { - if (avctx->flags & AV_CODEC_FLAG_PASS1) { - int j, k, m; - char *p = avctx->stats_out; - char *end = p + STATS_OUT_SIZE; - - memset(f->rc_stat, 0, sizeof(f->rc_stat)); - for (i = 0; i < f->quant_table_count; i++) - memset(f->rc_stat2[i], 0, f->context_count[i] * sizeof(*f->rc_stat2[i])); - - av_assert0(f->slice_count == f->max_slice_count); - for (j = 0; j < f->slice_count; j++) { - FFV1Context *fs = f->slice_context[j]; - for (i = 0; i < 256; i++) { - f->rc_stat[i][0] += fs->rc_stat[i][0]; - f->rc_stat[i][1] += fs->rc_stat[i][1]; - } - for (i = 0; i < f->quant_table_count; i++) { - for (k = 0; k < f->context_count[i]; k++) - for (m = 0; m < 32; m++) { - f->rc_stat2[i][k][m][0] += fs->rc_stat2[i][k][m][0]; - f->rc_stat2[i][k][m][1] += fs->rc_stat2[i][k][m][1]; - } - } - } - - for (j = 0; j < 256; j++) { - snprintf(p, end - p, "%" PRIu64 " %" PRIu64 " ", - f->rc_stat[j][0], f->rc_stat[j][1]); - p += strlen(p); - } - snprintf(p, end - p, "\n"); - - for (i = 0; i < f->quant_table_count; i++) { - for (j = 0; j < f->context_count[i]; j++) - for (m = 0; m < 32; m++) { - snprintf(p, end - p, "%" PRIu64 " %" PRIu64 " ", - f->rc_stat2[i][j][m][0], f->rc_stat2[i][j][m][1]); - p += strlen(p); - } - } - snprintf(p, end - p, "%d\n", f->gob_count); - } - return 0; - } - - if (f->version > 3) - maxsize = AV_INPUT_BUFFER_MIN_SIZE + avctx->width*avctx->height*3LL*4; - - if (maxsize > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE - 32) { - av_log(avctx, AV_LOG_WARNING, "Cannot allocate worst case packet size, the encoding could fail\n"); - maxsize = INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE - 32; - } - - if ((ret = ff_alloc_packet(avctx, pkt, maxsize)) < 0) - return ret; - - ff_init_range_encoder(c, pkt->data, pkt->size); - ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8); - - f->cur_enc_frame = pict; - - if (avctx->gop_size == 0 || f->picture_number % avctx->gop_size == 0) { - put_rac(c, &keystate, 1); - f->key_frame = 1; - f->gob_count++; - write_header(f); - } else { - put_rac(c, &keystate, 0); - f->key_frame = 0; - } - - if (f->ac == AC_RANGE_CUSTOM_TAB) { - int i; - for (i = 1; i < 256; i++) { - c->one_state[i] = f->state_transition[i]; - c->zero_state[256 - i] = 256 - c->one_state[i]; - } - } - - for (i = 0; i < f->slice_count; i++) { - FFV1Context *fs = f->slice_context[i]; - uint8_t *start = pkt->data + pkt->size * (int64_t)i / f->slice_count; - int len = pkt->size / f->slice_count; - if (i) { - ff_init_range_encoder(&fs->c, start, len); - } else { - av_assert0(fs->c.bytestream_end >= fs->c.bytestream_start + len); - av_assert0(fs->c.bytestream < fs->c.bytestream_start + len); - fs->c.bytestream_end = fs->c.bytestream_start + len; - } - } - avctx->execute(avctx, encode_slice, &f->slice_context[0], NULL, - f->slice_count, sizeof(void *)); - - buf_p = pkt->data; - for (i = 0; i < f->slice_count; i++) { - FFV1Context *fs = f->slice_context[i]; - int bytes; - - if (fs->ac != AC_GOLOMB_RICE) { - bytes = ff_rac_terminate(&fs->c, 1); - } else { - flush_put_bits(&fs->pb); // FIXME: nicer padding - bytes = fs->ac_byte_count + put_bytes_output(&fs->pb); - } - if (i > 0 || f->version > 2) { - av_assert0(bytes < pkt->size / f->slice_count); - memmove(buf_p, fs->c.bytestream_start, bytes); - av_assert0(bytes < (1 << 24)); - AV_WB24(buf_p + bytes, bytes); - bytes += 3; - } - if (f->ec) { - unsigned v; - buf_p[bytes++] = 0; - v = av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0, buf_p, bytes); - AV_WL32(buf_p + bytes, v); - bytes += 4; - } - buf_p += bytes; - } - - if (avctx->flags & AV_CODEC_FLAG_PASS1) - avctx->stats_out[0] = '\0'; - - f->picture_number++; - pkt->size = buf_p - pkt->data; - pkt->flags |= AV_PKT_FLAG_KEY * f->key_frame; - *got_packet = 1; - - return 0; -} - -#define OFFSET(x) offsetof(FFV1Context, x) -#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM -static const AVOption options[] = { - { "slicecrc", "Protect slices with CRCs", OFFSET(ec), AV_OPT_TYPE_BOOL, { .i64 = -1 }, -1, 1, VE }, - { "coder", "Coder type", OFFSET(ac), AV_OPT_TYPE_INT, - { .i64 = 0 }, -2, 2, VE, "coder" }, - { "rice", "Golomb rice", 0, AV_OPT_TYPE_CONST, - { .i64 = AC_GOLOMB_RICE }, INT_MIN, INT_MAX, VE, "coder" }, - { "range_def", "Range with default table", 0, AV_OPT_TYPE_CONST, - { .i64 = AC_RANGE_DEFAULT_TAB_FORCE }, INT_MIN, INT_MAX, VE, "coder" }, - { "range_tab", "Range with custom table", 0, AV_OPT_TYPE_CONST, - { .i64 = AC_RANGE_CUSTOM_TAB }, INT_MIN, INT_MAX, VE, "coder" }, - { "ac", "Range with custom table (the ac option exists for compatibility and is deprecated)", 0, AV_OPT_TYPE_CONST, - { .i64 = 1 }, INT_MIN, INT_MAX, VE, "coder" }, - { "context", "Context model", OFFSET(context_model), AV_OPT_TYPE_INT, - { .i64 = 0 }, 0, 1, VE }, - - { NULL } -}; - -static const AVClass ffv1_class = { - .class_name = "ffv1 encoder", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, -}; - -const FFCodec ff_ffv1_encoder = { - .p.name = "ffv1", - CODEC_LONG_NAME("FFmpeg video codec #1"), - .p.type = AVMEDIA_TYPE_VIDEO, - .p.id = AV_CODEC_ID_FFV1, - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | - AV_CODEC_CAP_SLICE_THREADS | - AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE, - .priv_data_size = sizeof(FFV1Context), - .init = encode_init, - FF_CODEC_ENCODE_CB(encode_frame), - .close = ff_ffv1_close, - .p.pix_fmts = (const enum AVPixelFormat[]) { - AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUV444P, - AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P, - AV_PIX_FMT_YUV410P, AV_PIX_FMT_0RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_YUV420P16, - AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV444P16, AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV422P9, - AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, - AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, - AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA420P16, - AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA420P10, - AV_PIX_FMT_YUVA444P9, AV_PIX_FMT_YUVA422P9, AV_PIX_FMT_YUVA420P9, - AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, - AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, - AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, - AV_PIX_FMT_YA8, - AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, - AV_PIX_FMT_GBRP16, AV_PIX_FMT_RGB48, - AV_PIX_FMT_GBRAP16, AV_PIX_FMT_RGBA64, - AV_PIX_FMT_GRAY9, - AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV444P14, - AV_PIX_FMT_YUV440P10, AV_PIX_FMT_YUV440P12, - AV_PIX_FMT_NONE - - }, - .p.priv_class = &ffv1_class, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_EOF_FLUSH, -}; diff --git a/spaces/congsaPfin/Manga-OCR/logs/CarX Drift Racing 2 Mod APK Unlimited Money and Free Download for Android.md b/spaces/congsaPfin/Manga-OCR/logs/CarX Drift Racing 2 Mod APK Unlimited Money and Free Download for Android.md deleted file mode 100644 index 9ef4dfc43f9c1d79810940e0856f417f84b68644..0000000000000000000000000000000000000000 --- a/spaces/congsaPfin/Manga-OCR/logs/CarX Drift Racing 2 Mod APK Unlimited Money and Free Download for Android.md +++ /dev/null @@ -1,92 +0,0 @@ -
    -

    Download CarX Drift Racing 2 (MOD Unlimited Money) Free on Android

    -

    If you are a fan of drifting games, you might have heard of CarX Drift Racing 2, one of the most popular and realistic drifting games on mobile devices. But did you know that you can download the mod version of this game for free and enjoy unlimited money and other benefits? In this article, we will show you how to do that and what features you can expect from this amazing game.

    -

    Introduction

    -

    What is CarX Drift Racing 2?

    -

    CarX Drift Racing 2 is a sequel to the successful CarX Drift Racing game, which has over 50 million downloads on Google Play. It is a racing game that focuses on drifting, which is a driving technique where the driver intentionally oversteers the car to make it slide sideways. Drifting requires skill, precision, and practice, and it can be very fun and satisfying to master.

    -

    download carx drift racing 2 (mod unlimited money) free on android


    DOWNLOAD ✺✺✺ https://urlca.com/2uOaUK



    -

    Why download the mod version?

    -

    While CarX Drift Racing 2 is free to play, it also has some in-app purchases and ads that can limit your enjoyment of the game. For example, you need to spend real money to buy coins and gold, which are used to unlock new cars, parts, and tracks. You also need to watch ads to get some rewards or bonuses. These can be annoying and frustrating, especially if you want to experience everything the game has to offer.

    -

    That's why downloading the mod version of CarX Drift Racing 2 is a good idea. The mod version gives you unlimited money, which means you can buy anything you want without spending a dime. You also don't have to watch any ads or deal with any restrictions. You can enjoy the game to the fullest without any hassle.

    -

    carx drift racing 2 mod apk download for android free
    -how to get carx drift racing 2 unlimited money mod on android
    -carx drift racing 2 hack mod apk free download android
    -download carx drift racing 2 mod apk latest version for android
    -carx drift racing 2 mod apk free download no root android
    -carx drift racing 2 mod apk offline free download for android
    -carx drift racing 2 mod apk unlimited gold and money for android
    -carx drift racing 2 mod apk free shopping for android
    -carx drift racing 2 mod apk unlimited coins and cash for android
    -carx drift racing 2 mod apk unlocked all cars for android
    -carx drift racing 2 mod apk unlimited everything for android
    -carx drift racing 2 mod apk free download full version for android
    -carx drift racing 2 mod apk unlimited nitro for android
    -carx drift racing 2 mod apk free download highly compressed for android
    -carx drift racing 2 mod apk unlimited xp and level for android
    -carx drift racing 2 mod apk free download rexdl for android
    -carx drift racing 2 mod apk unlimited fuel and tires for android
    -carx drift racing 2 mod apk free download revdl for android
    -carx drift racing 2 mod apk unlimited customization and tuning for android
    -carx drift racing 2 mod apk free download apkpure for android
    -carx drift racing 2 mod apk unlimited tracks and modes for android
    -carx drift racing 2 mod apk free download happymod for android
    -carx drift racing 2 mod apk unlimited graphics and sound for android
    -carx drift racing 2 mod apk free download an1 for android
    -carx drift racing 2 mod apk unlimited multiplayer and online for android
    -carx drift racing 2 mod apk free download mob.org for android
    -carx drift racing 2 mod apk unlimited cheats and hacks for android
    -carx drift racing 2 mod apk free download uptodown for android
    -carx drift racing 2 mod apk unlimited skins and decals for android
    -carx drift racing 2 mod apk free download apkmody for android
    -carx drift racing 2 mod apk unlimited rewards and achievements for android
    -carx drift racing 2 mod apk free download apkmirror for android
    -carx drift racing 2 mod apk unlimited fun and excitement for android
    -carx drift racing 2 mod apk free download apknite for android
    -carx drift racing 2 mod apk unlimited drifting and racing for android
    -carx drift racing 2 mod apk free download apksmody for android
    -carx drift racing 2 mod apk unlimited features and options for android
    -carx drift racing 2 mod apk free download apkdynasty for android
    -carx drift racing 2 mod apk unlimited gameplay and performance for android
    -carx drift racing 2 mod apk free download apksolo for android
    -carx drift racing 2 mod apk unlimited controls and settings for android
    -carx drift racing 2 mod apk free download apksfull.com for android
    -carx drift racing 2 mod apk unlimited challenges and missions for android
    -carx drift racing 2 mod apk free download apksmod.com for android
    -carx drift racing 2 mod apk unlimited cars and upgrades for android

    -

    Features of CarX Drift Racing 2

    -

    Realistic physics and graphics

    -

    One of the best things about CarX Drift Racing 2 is its realistic physics and graphics. The game uses a sophisticated car physics engine that simulates the behavior of real cars on different surfaces and conditions. You can feel the weight, speed, and traction of your car as you drift around corners and curves. You can also see the smoke, dust, and tire marks that your car leaves behind.

    -

    The game also has stunning graphics that make you feel like you are in a real racing environment. The cars are detailed and realistic, with different models, colors, and designs. The tracks are diverse and beautiful, with different themes, weather, and time of day. The game also has dynamic lighting and shadows that create a realistic atmosphere.

    -

    Multiple game modes and tracks

    -

    CarX Drift Racing 2 has multiple game modes and tracks that will keep you entertained for hours. You can choose from different modes such as Career, Single Player, Multiplayer, Events, XDS Racing, Ghost Mode, and more. Each mode has its own objectives, challenges, and rewards. You can also choose from different tracks such as Tokyo Streets, San Palezzo Hillside, Red Rock Canyon, Milton Drive Speedway, Parking Lot Arena, Airport Terminal Docks, and more. Each track has its own layout, difficulty, and scenery.

    -

    Customize and upgrade your cars

    -

    CarX Drift Racing 2 also lets you customize and upgrade your cars to suit your preferences and style. You can choose from over 80 cars from different brands and categories, such as sports cars, muscle cars, supercars, and more. You can also change the appearance of your cars by applying different paint, vinyl, decals, rims, spoilers, and other parts. You can also upgrade the performance of your cars by tuning the engine, suspension, brakes, tires, and other components. You can make your car faster, more powerful, and more responsive to your commands.

    -

    Compete with other players online

    -

    CarX Drift Racing 2 also allows you to compete with other players online and show off your drifting skills. You can join different online rooms and race against other players from around the world. You can also create your own room and invite your friends to join you. You can chat with other players, send them messages, and add them to your friends list. You can also view the leaderboards and rankings of other players and see how you compare to them.

    -

    How to download and install CarX Drift Racing 2 mod apk on your android device

    -

    If you want to download and install CarX Drift Racing 2 mod apk on your android device, you need to follow these simple steps:

    -

    Step 1: Enable unknown sources

    -

    Before you can install any mod apk file on your android device, you need to enable unknown sources in your settings. This will allow you to install apps that are not from the Google Play Store. To do this, go to your settings, then security, then unknown sources, and turn it on.

    -

    Step 2: Download the mod apk file

    -

    Next, you need to download the mod apk file of CarX Drift Racing 2 from a reliable source. You can use this link to download the latest version of the mod apk file: [Download CarX Drift Racing 2 mod apk]. Make sure you have enough storage space on your device before downloading the file.

    -

    Step 3: Install the mod apk file

    -

    After downloading the mod apk file, you need to install it on your device. To do this, locate the file in your downloads folder or wherever you saved it. Then tap on it and follow the instructions on the screen. It may take a few minutes for the installation to complete.

    -

    Step 4: Launch the game and enjoy

    -

    Once the installation is done, you can launch the game and enjoy it. You will see that you have unlimited money and no ads in the game. You can use the money to buy anything you want and enjoy all the features of the game without any limitations.

    -

    Conclusion

    -

    CarX Drift Racing 2 is a fantastic drifting game that will give you hours of fun and excitement. It has realistic physics and graphics, multiple game modes and tracks, customizable and upgradeable cars, and online multiplayer mode. You can download the mod version of this game for free and enjoy unlimited money and no ads. Just follow the steps above and you will be able to play this amazing game on your android device.

    -

    FAQs

    -

    Here are some frequently asked questions about CarX Drift Racing 2 mod apk:

    -
      -
    • Is CarX Drift Racing 2 mod apk safe to use?
    • -

      Yes, CarX Drift Racing 2 mod apk is safe to use as long as you download it from a trusted source. It does not contain any viruses or malware that can harm your device or compromise your privacy.

      -
    • Do I need to root my device to use CarX Drift Racing 2 mod apk?
    • -

      No, you do not need to root your device to use CarX Drift Racing 2 mod apk. It works fine on both rooted and non-rooted devices.

      -
    • Will I get banned for using CarX Drift Racing 2 mod apk?
    • -

      No, you will not get banned for using CarX Drift Racing 2 mod apk. The mod apk does not interfere with the game's servers or anti-cheat system. However, you should still be careful when playing online and avoid using any cheats or hacks that may give you an unfair advantage over other players.

      -
    • Can I update CarX Drift Racing 2 mod apk?
    • -

      Yes, you can update CarX Drift Racing 2 mod apk whenever there is a new version available. However, you may need to uninstall the previous version first before installing the new one. You may also lose some of your progress or data if you update the game.

      -
    • Can I play CarX Drift Racing 2 mod apk offline?)

      -

      Yes, you can play CarX Drift Racing 2 mod apk offline. However, you will not be able to access some of the online features such as multiplayer mode, events, and leaderboards. You will also need an internet connection to download and install the game.

      401be4b1e0
      -
      -
      \ No newline at end of file diff --git a/spaces/congsaPfin/Manga-OCR/logs/Egg Inc. Latest APK A Unique and Challenging Simulation Game with Dozens of Research Items and Challenges.md b/spaces/congsaPfin/Manga-OCR/logs/Egg Inc. Latest APK A Unique and Challenging Simulation Game with Dozens of Research Items and Challenges.md deleted file mode 100644 index 11fd24b239c7ab3355487d84738fc1c576e264a5..0000000000000000000000000000000000000000 --- a/spaces/congsaPfin/Manga-OCR/logs/Egg Inc. Latest APK A Unique and Challenging Simulation Game with Dozens of Research Items and Challenges.md +++ /dev/null @@ -1,134 +0,0 @@ - -

      Egg Inc Latest APK: Build an Enormous Egg Farm in the Future

      -

      Do you love chickens and eggs? Do you want to create your own egg empire in the near future? If yes, then you should try Egg Inc, a fun and addictive incremental game that will keep you hooked for hours. In this game, you will hatch chickens, build hen houses, hire drivers, commission research, launch space expeditions, and more. You will also discover the secrets of the universe hidden in the chicken egg. Sounds exciting, right? But wait, there's more. You can also download Egg Inc latest APK to enjoy the most updated version of the game with new content and improvements. In this article, we will tell you everything you need to know about Egg Inc latest APK, including what it is, why you should download it, how to download and install it, how to play it, and some tips and tricks to help you succeed.

      -

      What is Egg Inc?

      -

      Egg Inc is a game developed by Auxbrain Inc, a company that specializes in making simulation games. It was released in 2016 and has since gained millions of fans around the world. It is available for both Android and iOS devices, as well as on PC via Steam.

      -

      egg inc latest apk


      DOWNLOAD 🗸🗸🗸 https://urlca.com/2uOadl



      -

      A fun and addictive incremental game

      -

      Egg Inc is an incremental game, also known as a clicker game, at its core. This means that you will start with a simple farm and gradually increase your production and income by tapping on the screen. You will also unlock new features and upgrades as you progress. The game is very easy to play, but also very hard to master. You will need to balance your resources and strategies to optimize your egg farm.

      -

      A simulation game with many elements and features

      -

      Egg Inc is not just a simple clicker game. It also incorporates many elements from simulation games that give it a unique feel and play style. For example, you will have to deal with different types of chickens, hen houses, vehicles, researches, missions, contracts, boosts, drones, trophies, achievements, leaderboards, etc. You will also have to manage your farm's environment, such as the weather, the seasons, the daylight cycle, etc. The game has a lot of depth and variety that will keep you entertained for a long time.

      -

      A game with a futuristic theme and a humorous tone

      -

      Egg Inc is set in the near future, where the secrets of the universe will be unlocked in the chicken egg. You have decided to get in on the gold rush and sell as many eggs as you can. The game has a futuristic theme that is reflected in its graphics, sound effects, music, and story. The game also has a humorous tone that makes it more enjoyable and relaxing. You will encounter funny characters, dialogues, events, and references throughout the game.

      -

      Why download Egg Inc latest APK?

      -

      If you are already a fan of Egg Inc or want to try it for the first time, you might be wondering why you should download Egg Inc latest APK instead of getting it from the official app store. Well, there are several reasons why downloading Egg Inc latest APK is a good idea. Here are some of them:

      -

      To enjoy the latest version with new content and improvements

      -

      By downloading Egg Inc latest APK, you will be able to enjoy the most recent version of the game that has new content and improvements. For example, the latest version of Egg Inc as of June 2023 is 1.22.1, which has the following features:

      -
        -
      • New egg: The Quantum Egg
      • -
      • New farm: The Quantum Farm
      • -
      • New research: Quantum Computing and Quantum Entanglement
      • -
      • New contract: The Quantum Leap
      • -
      • New boost: The Quantum Teleporter
      • -
      • New drone: The Quantum Drone
      • -
      • New trophy: The Quantum Trophy
      • -
      • New achievement: The Quantum Master
      • -
      • Bug fixes and performance improvements
      • -
      -

      By downloading Egg Inc latest APK, you will be able to access all these new features and more. You will also be able to avoid any bugs or glitches that might occur in older versions of the game.

      -

      egg inc latest apk download
      -egg inc latest apk mod
      -egg inc latest apk free
      -egg inc latest apk android
      -egg inc latest apk update
      -egg inc latest apk 2023
      -egg inc latest apk hack
      -egg inc latest apk unlimited money
      -egg inc latest apk xapk
      -egg inc latest apk for pc
      -egg inc latest apk offline
      -egg inc latest apk no ads
      -egg inc latest apk version
      -egg inc latest apk file
      -egg inc latest apk online
      -egg inc latest apk cracked
      -egg inc latest apk premium
      -egg inc latest apk full
      -egg inc latest apk pro
      -egg inc latest apk unlocked
      -egg inc latest apk cheats
      -egg inc latest apk gameplay
      -egg inc latest apk review
      -egg inc latest apk install
      -egg inc latest apk link
      -egg inc latest apk app
      -egg inc latest apk game
      -egg inc latest apk simulator
      -egg inc latest apk clicker
      -egg inc latest apk incremental
      -egg inc latest apk auxbrain
      -egg inc latest apk simulation
      -egg inc latest apk fun
      -egg inc latest apk chicken
      -egg inc latest apk farm
      -egg inc latest apk space
      -egg inc latest apk research
      -egg inc latest apk eggs
      -egg inc latest apk graphics
      -egg inc latest apk challenges
      -egg inc latest apk achievements
      -egg inc latest apk leaderboards
      -egg inc latest apk coop
      -egg inc latest apk contracts
      -egg inc latest apk boosters
      -egg inc latest apk golden eggs
      -egg inc latest apk piggy bank
      -egg inc latest apk prestige

      -

      To access all the features and modes of the game

      -

      Another reason why you should download Egg Inc latest APK is that you will be able to access all the features and modes of the game without any restrictions or limitations. Some of these features and modes are:

      -
        -
      • Pro Permit: A one-time purchase that unlocks several benefits, such as unlimited silos, golden eggs rewards, epic research discounts, etc.
      • -
      • Piggy Bank: A feature that allows you to save golden eggs every time you upgrade something on your farm. You can crack it open for a small fee and get a huge amount of golden eggs.
      • -
      • Silo Permit: A feature that allows you to increase the number of silos on your farm, which store your chickens and eggs when you are offline. You can buy more silos with golden eggs or real money.
      • -
      • Egg of Prophecy: A feature that allows you to increase your earnings multiplier by collecting prophecy eggs from contracts or trophies. You can also buy prophecy eggs with real money.
      • -
      • Egg Delivery: A feature that allows you to send eggs to other players or receive eggs from them. You can also buy egg delivery tokens with real money.
      • -
      • Co-op Contracts: A mode that allows you to join forces with other players and work together to complete a common goal. You can also create your own co-op or join an existing one.
      • -
      • Elite Contracts: A mode that allows you to take on more challenging contracts with higher rewards. You need to have a certain farm value to qualify for elite contracts.
      • -
      -

      By downloading Egg Inc latest APK, you will be able to use all these features and modes without any problems. You will also be able to save money by not having to buy anything with real money.

      To play offline and without ads

      -

      One more reason why you should download Egg Inc latest APK is that you will be able to play the game offline and without ads. This means that you will not need an internet connection to enjoy the game, and you will not be interrupted by annoying ads that pop up on your screen. You will be able to focus on your egg farm and have a smooth and uninterrupted gaming experience.

      -

      How to download and install Egg Inc latest APK?

      -

      Now that you know why you should download Egg Inc latest APK, you might be wondering how to do it. Well, it is not very difficult, but you need to follow some steps carefully. Here are the steps you need to take:

      -

      Find a reliable source for the APK file

      -

      The first step is to find a reliable source for the APK file of Egg Inc latest version. You can search online for websites that offer APK files for various games and apps, but you need to be careful and avoid any malicious or fake sites that might harm your device or steal your data. You can also use the link below to download Egg Inc latest APK from a trusted source:

      -

      Egg Inc Latest APK Download

      -

      Enable unknown sources on your device

      -

      The next step is to enable unknown sources on your device. This is because your device will not allow you to install any app or game that is not from the official app store by default. To enable unknown sources, you need to go to your device's settings, then security, then toggle on the option that says "allow installation of apps from unknown sources". This will allow you to install Egg Inc latest APK on your device.

      -

      Install the APK file and launch the game

      -

      The final step is to install the APK file and launch the game. To do this, you need to locate the APK file on your device, either in your downloads folder or wherever you saved it. Then, tap on it and follow the instructions on the screen to install it. Once the installation is complete, you can launch the game by tapping on its icon on your home screen or app drawer. You can now enjoy Egg Inc latest version with all its features and modes.

      How to play Egg Inc?

      -

      Now that you have downloaded and installed Egg Inc latest APK, you might be wondering how to play the game. Well, the game is very simple and intuitive, but also very challenging and rewarding. Here are the basic steps you need to follow to play the game:

      -

      Hatch chickens and build hen houses

      -

      The first thing you need to do is to hatch chickens and build hen houses. To hatch chickens, you need to tap on the big red button on the bottom right corner of the screen. The more you tap, the more chickens you will hatch. To build hen houses, you need to tap on the shop icon on the bottom left corner of the screen. There, you can buy different types of hen houses that can accommodate more chickens and produce more eggs. You can also upgrade your hen houses to increase their capacity and efficiency.

      -

      Hire drivers and commission research

      -

      The next thing you need to do is to hire drivers and commission research. To hire drivers, you need to tap on the truck icon on the top right corner of the screen. There, you can buy different types of vehicles that can transport your eggs to the market and earn you money. You can also upgrade your vehicles to increase their speed and capacity. To commission research, you need to tap on the research icon on the top left corner of the screen. There, you can buy different types of researches that can improve your farm's performance and unlock new features. You can also upgrade your researches to increase their effects and duration.

      -

      Launch space expeditions and prestige

      -

      The last thing you need to do is to launch space expeditions and prestige. To launch space expeditions, you need to tap on the rocket icon on the top center of the screen. There, you can buy different types of rockets that can send your eggs to outer space and earn you more money and rewards. You can also upgrade your rockets to increase their power and range. To prestige, you need to tap on the prestige icon on the bottom center of the screen. There, you can reset your farm and start over with a higher earnings multiplier and more prophecy eggs. You can also choose a different type of egg that has a higher value and potential.

      -

      Tips and tricks for Egg Inc

      -

      To help you succeed in Egg Inc, here are some tips and tricks that you should keep in mind:

      -

      Upgrade your egg value and farm value

      -

      One of the most important things you should do is to upgrade your egg value and farm value. Your egg value determines how much money you earn from each egg, while your farm value determines how much money your farm is worth. You can upgrade your egg value by buying researches that increase it, such as Egg Laying Rate, Egg Shell Strength, etc. You can upgrade your farm value by buying things that increase it, such as hen houses, vehicles, rockets, etc.

      -

      Use boosts and drones to earn more money

      -

      Another thing you should do is to use boosts and drones to earn more money. Boosts are special items that can enhance your farm's performance for a limited time, such as Money Printer, Soul Beacon, etc. You can buy boosts with golden eggs or real money, or get them for free from daily gifts or contracts. Drones are flying objects that appear randomly on your farm. You can shoot them down by tapping on them, and get rewards such as cash or golden eggs.

      Join co-op contracts and complete missions

      -

      A third thing you should do is to join co-op contracts and complete missions. Co-op contracts are special challenges that require you to work with other players to achieve a common goal, such as producing a certain amount of eggs or reaching a certain farm value. You can join co-op contracts by tapping on the contract icon on the bottom right corner of the screen. There, you can create your own co-op or join an existing one. You can also invite your friends or other players to join your co-op. By completing co-op contracts, you can earn rewards such as cash, golden eggs, boosts, or prophecy eggs. Missions are tasks that require you to do something on your farm, such as hatching a certain number of chickens or buying a certain type of hen house. You can view your missions by tapping on the mission icon on the top right corner of the screen. By completing missions, you can earn rewards such as cash, golden eggs, or trophies.

      -

      Conclusion

      -

      Egg Inc is a fun and addictive game that will make you love chickens and eggs more than ever. It is a game that combines the elements of incremental and simulation games, with a futuristic theme and a humorous tone. It is a game that has a lot of content and features that will keep you entertained for hours. It is also a game that you can download and play for free, with Egg Inc latest APK. By downloading Egg Inc latest APK, you will be able to enjoy the most updated version of the game with new content and improvements. You will also be able to access all the features and modes of the game without any restrictions or limitations. You will also be able to play offline and without ads. So what are you waiting for? Download Egg Inc latest APK now and start building your egg empire in the future.

      -

      FAQs

      -

      Here are some frequently asked questions about Egg Inc latest APK:

      -

      Q: Is Egg Inc latest APK safe to download and install?

      -

      A: Yes, Egg Inc latest APK is safe to download and install, as long as you get it from a reliable source. You can use the link provided in this article to download Egg Inc latest APK from a trusted source.

      -

      Q: Do I need to root my device or use an emulator to play Egg Inc latest APK?

      -

      A: No, you do not need to root your device or use an emulator to play Egg Inc latest APK. You can play it on any Android device that meets the minimum requirements of the game.

      -

      Q: What are the minimum requirements of Egg Inc latest APK?

      -

      A: The minimum requirements of Egg Inc latest APK are:

      -
        -
      • Android version: 4.4 or higher
      • -
      • RAM: 1 GB or higher
      • -
      • Storage space: 100 MB or higher
      • -
      • Internet connection: Not required (but recommended for some features)
      • -
      -

      Q: How can I contact the developer of Egg Inc?

      -

      A: You can contact the developer of Egg Inc by sending an email to support@auxbrain.com or by visiting their website at https://www.auxbrain.com/.

      -

      Q: How can I support the developer of Egg Inc?

      -

      A: You can support the developer of Egg Inc by rating and reviewing the game on the app store, by sharing it with your friends and family, by buying in-app purchases or real money items, or by donating to them via their website.

      401be4b1e0
      -
      -
      \ No newline at end of file diff --git a/spaces/congsaPfin/Manga-OCR/logs/The History and Evolution of the Pajero 3 From Tokyo Motor Show to Dakar Rally.md b/spaces/congsaPfin/Manga-OCR/logs/The History and Evolution of the Pajero 3 From Tokyo Motor Show to Dakar Rally.md deleted file mode 100644 index cd358f6bac0e7d354444bf9b24e18ab6441a6ea1..0000000000000000000000000000000000000000 --- a/spaces/congsaPfin/Manga-OCR/logs/The History and Evolution of the Pajero 3 From Tokyo Motor Show to Dakar Rally.md +++ /dev/null @@ -1,187 +0,0 @@ - -

      Pajero 3: A Full-Size 4x4 with a Legacy of Performance

      -

      If you are looking for a full-size 4x4 that can handle any terrain and challenge, you might want to consider the Pajero 3. This is the third generation of the Mitsubishi Pajero, a legendary off-road vehicle that has been in production since 1981. The Pajero 3 was introduced in 1999 and was discontinued in 2021, after more than two decades of success and innovation. In this article, we will explore what makes the Pajero 3 a great choice for anyone who loves adventure and performance.

      -

      pajero 3


      DOWNLOAD https://urlca.com/2uOcFG



      -

      Introduction

      -

      What is the Pajero 3?

      -

      The Pajero 3 is a full-size 4x4 manufactured and marketed globally by Mitsubishi over four generations. It is also known as the Montero or Shogun in some markets, depending on the local preferences and regulations. The Pajero 3 is a luxury, yet rugged and capable competitor to other full-size 4x4s such as the Land Rover Range Rover or Toyota Land Cruiser. It has a spacious and comfortable interior, a powerful and reliable engine, and a sophisticated and versatile four-wheel-drive system.

      -

      Why is it called Pajero 3?

      -

      The name Pajero comes from Leopardus pajeros, the scientific name for the Pampas cat, a wild feline native to South America. The name was chosen to reflect the agility and strength of the vehicle, as well as its ability to adapt to different environments. The number 3 refers to the third generation of the Pajero lineage, which debuted in 1999 and lasted until 2021. The third generation was also known as V60 or V70, depending on the body style (three-door or five-door).

      -

      What are the main features of the Pajero 3?

      -

      Some of the main features of the Pajero 3 are:

      -
        -
      • A wide range of inline four and V6 engines, with displacements ranging from 2.5 to 3.8 liters, and outputs ranging from 115 to 243 horsepower.
      • -
      • A five-speed manual or automatic transmission, with an INVECS-II system that adapts to the driving style and conditions.
      • -
      • A Super Select four-wheel-drive system that allows switching between two-wheel drive, four-wheel drive high range, four-wheel drive high range with locked center differential, and four-wheel drive low range with locked center differential.
      • -
      • An Active Stability & Traction Control System that monitors wheel speed, steering angle, throttle position, brake pressure, yaw rate, and lateral acceleration, and adjusts engine output and braking force to prevent skidding and loss of control.
      • -
      • A rear differential lock that enhances traction on slippery or uneven surfaces.
      • -
      • A cruise control that maintains a constant speed without using the accelerator pedal.
      • -
      • A keyless entry system that unlocks the doors with a remote transmitter.
      • -
      • A leather seat trim with power adjustment for the driver's seat.
      • -
      • A wood and leather steering wheel with audio and hands-free phone controls.
      • -
      • A wide display audio system with AM/FM radio, CD, MP3, and DVD player, with a 12-speaker Rockford Fosgate premium sound system.
      • -
      • A multi-information display that shows the compass, barometer, altimeter, outside temperature, average fuel consumption, driving range, and maintenance information.
      • -
      • A dual-zone automatic climate control that adjusts the temperature and air flow for the driver and front passenger.
      • -
      • A sunroof that can be tilted or slid open with a switch.
      • -
      • A rear spoiler that improves aerodynamics and adds style.
      • -
      • A roof rack that provides extra storage space for luggage or equipment.
      • -
      • A side step that facilitates entry and exit.
      • -
      • A front skid plate that protects the engine from rocks and debris.
      • -
      • A rear bumper step that helps loading and unloading cargo.
      • -
      • A spare tire carrier that mounts the spare tire on the rear door.
      • -
      -

      History and Development

      -

      How did the Pajero 3 evolve from the previous generations?

      -

      The Pajero 3 was the result of more than 20 years of research and development by Mitsubishi. The first generation of the Pajero was launched in 1981 as a compact 4x4 with a ladder frame chassis and a leaf spring suspension. It was designed to be a versatile and affordable vehicle that could be used for both on-road and off-road driving. The second generation of the Pajero was introduced in 1991 as a mid-size 4x4 with a monocoque body and a coil spring suspension. It was designed to be a more refined and sophisticated vehicle that could compete with other luxury 4x4s in the market. The third generation of the Pajero was unveiled in 1999 as a full-size 4x4 with a hybrid chassis that combined a monocoque body with a ladder frame. It was designed to be a more powerful and advanced vehicle that could offer the best of both worlds: comfort and performance.

      -

      What were the major changes and improvements in the Pajero 3?

      -

      Some of the major changes and improvements in the Pajero 3 were:

      -
        -
      • A larger and more spacious body, with increased dimensions in length, width, height, wheelbase, and ground clearance.
      • -
      • A more aerodynamic and stylish design, with smoother lines, sharper angles, and chrome accents.
      • -
      • A more rigid and durable chassis, with reinforced cross members, side rails, and subframes.
      • -
      • A more responsive and stable suspension, with independent double wishbones in the front and multi-link in the rear.
      • -
      • A more efficient and powerful engine, with variable valve timing, electronic throttle control, direct injection, intercooler, turbocharger, and common rail system.
      • -
      • A more intelligent and adaptable transmission, with adaptive shift control, sport mode, manual mode, sequential shift control, and shift lock system.
      • -
      • A more innovative and versatile four-wheel-drive system, with active center differential, active front differential, active rear differential, active yaw control, active brake control, hill start assist, hill descent control, traction control mode selector, drive mode selector, and super select mode selector.
      • -
      • A more comprehensive and convenient equipment package, with features such as navigation system, rear view camera, parking sensors, blind spot warning, lane change assist, adaptive cruise control, forward collision mitigation, automatic high beam, rain sensing wipers, power tailgate, heated seats, and sunroof.
      • -
      -

      How did the Pajero 3 perform in the Dakar Rally?

      -

      The Pajero 3 was also a successful competitor in the Dakar Rally, one of the most grueling and prestigious off-road races in the world. The Pajero 3 won the Dakar Rally four times in a row, from 2001 to 2004, setting a record for the most consecutive wins by a single vehicle. The Pajero 3 also won the Dakar Rally in 2007, making it the most successful vehicle in the history of the race, with a total of 12 wins. The Pajero 3 proved its durability and performance in the Dakar Rally, facing harsh conditions such as sand dunes, rocky mountains, mud flats, and salt lakes.

      -

      Models and Variants

      -

      What are the different models and variants of the Pajero 3?

      -

      The Pajero 3 was available in different models and variants, depending on the market and the customer's preferences. Some of the main models and variants were:

      -
    -

    FR Legends APK 0.3.3.1: The Ultimate Drifting Game for Android

    -

    If you are a fan of drifting and racing games, you might have heard of FR Legends, one of the most popular and realistic drifting games for mobile devices. FR Legends is a game that lets you experience the thrill of drifting with customizable cars, realistic physics, various game modes, online multiplayer, stunning graphics and sound, and more.

    -

    In this article, we will tell you everything you need to know about FR Legends APK 0.3.3.1, the latest version of this amazing game that you can download and install on your Android device for free.

    -

    fr legends apk 0.3.3.1


    Downloadhttps://jinyurl.com/2uNM2c



    -

    What is FR Legends?

    -

    FR Legends is a game developed by TWIN TURBO TECH CO., LTD, a company based in China that specializes in creating high-quality racing games for mobile platforms.

    -

    FR Legends stands for Front-engine, Rear-wheel drive Legend cars, which are the type of cars that you can drive and customize in this game.

    -

    FR Legends is a game that focuses on drifting, which is a driving technique where the driver intentionally oversteers the car to make it slide sideways while maintaining control and speed.

    -

    Drifting is not only fun and challenging, but also a form of art and expression that requires skill and creativity.

    -

    FR Legends is a game that lets you unleash your inner drifter and show off your style and skills to other players around the world.

    -

    What are the features of FR Legends APK 0.3.3.1?

    -

    Customizable cars

    -

    One of the best features of FR Legends is that you can customize your car to suit your preferences and personality.

    -

    You can choose from a variety of cars that are inspired by real-life models such as Toyota AE86, Nissan S13, BMW E30, Mazda RX

    -7, and more.

    -

    You can also modify your car's engine, suspension, tires, brakes, exhaust, turbo, transmission, and more to improve its performance and handling.

    -

    fr legends apk 0.3.3.1 download
    -fr legends apk 0.3.3.1 mod
    -fr legends apk 0.3.3.1 unlimited money
    -fr legends apk 0.3.3.1 latest version
    -fr legends apk 0.3.3.1 free download
    -fr legends apk 0.3.3.1 android
    -fr legends apk 0.3.3.1 update
    -fr legends apk 0.3.3.1 hack
    -fr legends apk 0.3.3.1 gameplay
    -fr legends apk 0.3.3.1 review
    -fr legends apk 0.3.3.1 offline
    -fr legends apk 0.3.3.1 obb
    -fr legends apk 0.3.3.1 no root
    -fr legends apk 0.3.3.1 cheats
    -fr legends apk 0.3.3.1 features
    -fr legends apk 0.3.3.1 installation
    -fr legends apk 0.3.3.1 requirements
    -fr legends apk 0.3.3.1 tips and tricks
    -fr legends apk 0.3.3.1 best cars
    -fr legends apk 0.3.3.1 customizations
    -fr legends apk 0.3.3.1 graphics settings
    -fr legends apk 0.3.3.1 multiplayer mode
    -fr legends apk 0.3.3.1 new maps
    -fr legends apk 0.3.3.1 sound effects
    -fr legends apk 0.3.3.1 controls
    -fr legends apk 0.3

    -

    Moreover, you can change your car's appearance by changing its color, paint, decals, stickers, body kits, spoilers, wheels, lights, and more to make it look unique and cool.

    -

    Realistic physics

    -

    Another great feature of FR Legends is that it has realistic physics that simulate the behavior of the car and the environment.

    -

    You can feel the weight, speed, traction, inertia, and gravity of your car as you drift and race on different tracks and terrains.

    -

    You can also see the smoke, sparks, dust, and skid marks that your car leaves behind as you slide and burn rubber.

    -

    The game also has dynamic weather and lighting effects that change the atmosphere and visibility of the tracks.

    -

    Various game modes

    -

    FR Legends has various game modes that you can choose from depending on your mood and preference.

    -

    You can play the Career mode, where you can start from the bottom and work your way up to become a legendary drifter. You can compete in different events and challenges that test your skills and earn coins and reputation.

    -

    You can play the Free mode, where you can practice your drifting skills and explore the tracks without any pressure or limitations. You can also customize your car and settings to your liking.

    -

    You can play the Arcade mode, where you can enjoy a casual and fun drifting experience with simple controls and objectives. You can also unlock new cars and tracks as you progress.

    -

    Online multiplayer

    -

    FR Legends also has an online multiplayer feature that lets you connect with other players around the world and challenge them to drift battles.

    -

    You can join or create a room with up to 8 players and choose a track and a game mode to play. You can also chat with other players and make friends or rivals.

    -

    You can compete in two types of drift battles: Tandem and Solo. In Tandem battles, you have to follow or lead another player's car as closely as possible while drifting. In Solo battles, you have to score higher than your opponent by drifting better and faster.

    -

    Stunning graphics and sound

    -

    FR Legends also has stunning graphics and sound that make the game more immersive and realistic.

    -

    The game has 3D graphics that are detailed and smooth. The cars look authentic and have different animations and effects. The tracks look diverse and have different scenery and landmarks. The game also has a dynamic camera that follows your car from different angles.

    -

    The game also has realistic sound effects that match the action on the screen. You can hear the engine roar, the tires screech, the turbo whistle, the exhaust pop, and more. You can also hear the crowd cheer, the announcer commentate, and the music play in the background.

    -

    How to download and install FR Legends APK 0.3.3.1?

    -

    Step 1: Download the APK file from a trusted source

    -

    To download FR Legends APK 0.3.3.1, you need to find a trusted source that provides the latest version of the file. You can use Google or any other search engine to find such sources.

    -

    One of the sources that we recommend is [FR Legends APK 0.3.3.1 Download], which is a website that offers safe and fast downloads of various APK files for Android devices.

    -

    Step 2: Enable unknown sources on your device

    -

    To install FR Legends APK 0.3.3.1, you need to enable unknown sources on your device. This is because FR Legends APK 0.3.3.1 is not available on the Google Play Store, so you need to allow your device to install apps from other sources.

    -

    To enable unknown sources on your device, follow these steps:

    -
      -
    • Go to Settings > Security > Unknown sources
    • -
    • Toggle on the switch or check the box to enable unknown sources
    • -
    • A warning message will appear. Tap OK or Confirm to proceed
    • -
    -

    Step 3: Locate and install the APK file

    -

    To locate and install FR Legends APK 0.3.3.1, follow these steps:

    -
      -
    • Go to your device's file manager or download manager
    • -
    • Find the FR Legends APK 0.3.3.1 file that you downloaded in step
    • 1. Tap on the file to open it
    • -
    • A pop-up message will appear. Tap Install to start the installation process
    • -
    • Wait for the installation to finish. It may take a few seconds or minutes depending on your device and internet speed
    • -
    -

    Step 4: Launch the game and enjoy

    -

    To launch the game and enjoy, follow these steps:

    -
      -
    • Go to your device's app drawer or home screen
    • -
    • Find the FR Legends icon and tap on it to open the game
    • -
    • Grant the necessary permissions and accept the terms and conditions
    • -
    • Choose your language and region
    • -
    • Create your profile and customize your settings
    • -
    • Start playing and drifting with FR Legends APK 0.3.3.1
    • -
    -

    How to play FR Legends APK 0.3.3.1?

    -

    Choose your car and customize it

    -

    To choose your car and customize it, follow these steps:

    -
      -
    • Tap on the Garage icon on the main menu
    • -
    • Swipe left or right to browse through the available cars
    • -
    • Tap on the car that you want to drive and customize
    • -
    • Tap on the Customize icon on the bottom right corner
    • -
    • Swipe left or right to access different categories of customization such as Engine, Suspension, Body, Paint, Decals, etc.
    • -
    • Tap on the category that you want to modify and select the option that you want to apply
    • -
    • You can preview the changes on your car by tapping on the Preview icon on the top right corner
    • -
    • You can also rotate, zoom, and move your car by using your fingers on the screen
    • -
    • When you are satisfied with your customization, tap on the Save icon on the top left corner
    • -
    • You can also buy new cars or parts with coins that you earn by playing the game
    • -
    -

    Select a game mode and a track

    -

    To select a game mode and a track, follow these steps:

    -
      -
    • Tap on the Play icon on the main menu
    • -
    • Swipe left or right to choose between Career mode, Free mode, or Arcade mode
    • -
    • Tap on the mode that you want to play
    • -
    • Swipe left or right to choose between different tracks such as Ebisu, Meihan, Sekia Hills, etc.
    • -
    • Tap on the track that you want to play
    • -
    • You can also change the weather, time of day, and difficulty level by tapping on the icons on the bottom of the screen
    • -
    • When you are ready, tap on the Start icon on the top right corner
    • -
    -

    Control your car with simple gestures

    -

    To control your car with simple gestures, follow these steps:

    -
      -
    • To accelerate, press and hold the gas pedal on the right side of the screen
    • -
    • To brake, press and hold the brake pedal on the left side of the screen
    • -
    • To steer, swipe left or right on the steering wheel on the bottom center of the screen
    • -
    • To drift, swipe up or down on the handbrake lever on the right side of the screen
    • -
    • To change the camera angle, tap on the camera icon on the top left corner of the screen
    • -
    • To pause the game, tap on the pause icon on the top right corner of the screen
    • -
    -

    Earn coins and reputation by drifting and racing

    -

    To earn coins and reputation by drifting and racing, follow these steps:

    -
      -
    • When you are playing a game mode, you will see a score meter on the top center of the screen that shows your current score and combo
    • -
    • You can increase your score and combo by drifting, overtaking, following, or leading other cars
    • -
    • You can also perform tricks such as donuts, 360s, wall taps, etc. to earn extra points
    • -
    • The longer and better you drift, the higher your score and combo will be
    • -
    • However, if you crash, spin out, or stop drifting, your score and combo will reset
    • -
    • At the end of each game mode, you will see a summary screen that shows your total score, coins earned, reputation earned, and rank achieved
    • -
    • You can use coins to buy new cars or parts in the garage
    • -
    • You can use reputation to unlock new tracks and events in the career mode
    • -
    • You can also compare your scores and ranks with other players on the leaderboard
    • -
    -

    Conclusion

    -

    FR Legends APK 0.3.3.1 is a game that lets you experience the thrill of drifting with customizable cars, realistic physics, various game modes, online multiplayer, stunning graphics and sound, and more.

    -

    If you are a fan of drifting and racing games, you should definitely download and install FR Legends APK 0.3.3.1 on your Android device for free.

    -

    You will not regret it as you will have hours of fun and excitement with this amazing game.

    -

    So what are you waiting for? Download FR Legends APK 0.3.3.1 now and start drifting like a legend!

    -

    FAQs

    -

    Q: Is FR Legends APK 0.3.3.1 safe to download and install?

    -

    A: Yes, FR Legends APK 0.3.3.1 is safe to download and install as long as you get it from a trusted source such as [FR Legends APK 0.3.3.1 Download]. However, you should always scan any APK file with an antivirus software before installing it on your device.

    -

    Q: Is FR Legends APK 0.3.3.1 compatible with my device?

    -

    A: FR Legends APK 0.3.3.1 is compatible with most Android devices that have Android 4.1 or higher version installed. However, some devices may have performance issues or bugs due to different hardware specifications or software versions.

    -

    Q: How can I update FR Legends APK 0.3.3.1?

    -

    A: To update FR Legends APK 0.3.3.1, you need to download and install the latest version of the file from a trusted source such as [FR Legends APK 0.3.3.1 Download]. You may also need to uninstall the previous version of the game before installing the new one.

    -

    Q: How can I contact the developer of FR Legends?

    -

    A: You can contact the developer of FR Legends by sending an email to frlegends@twinturbo.co or by visiting their official website at https://www.twinturbo.co/.

    -

    Q: How can I support the development of FR Legends?

    -

    A: You can support the development of FR Legends by rating and reviewing the game on Google Play Store or any other app store that you downloaded it from.

    401be4b1e0
    -
    -
    \ No newline at end of file diff --git a/spaces/1toTree/lora_test/ppdiffusers/download_utils.py b/spaces/1toTree/lora_test/ppdiffusers/download_utils.py deleted file mode 100644 index ff9b23f74dfde5d994dab794a9b3385870546989..0000000000000000000000000000000000000000 --- a/spaces/1toTree/lora_test/ppdiffusers/download_utils.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved. -# Copyright 2022 The HuggingFace Team. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os - -from paddlenlp.utils.downloader import get_path_from_url_with_filelock -from paddlenlp.utils.log import logger - -from .utils import DOWNLOAD_SERVER, PPDIFFUSERS_CACHE - - -def ppdiffusers_bos_download(pretrained_model_name_or_path, filename=None, subfolder=None, cache_dir=None): - if cache_dir is None: - cache_dir = PPDIFFUSERS_CACHE - cache_dir = ( - pretrained_model_name_or_path - if os.path.isdir(pretrained_model_name_or_path) - else os.path.join(cache_dir, pretrained_model_name_or_path) - ) - url = DOWNLOAD_SERVER + "/" + pretrained_model_name_or_path - if subfolder is not None: - url = url + "/" + subfolder - cache_dir = os.path.join(cache_dir, subfolder) - if filename is not None: - url = url + "/" + filename - - file_path = os.path.join(cache_dir, filename) - if os.path.exists(file_path): - logger.info("Already cached %s" % file_path) - else: - file_path = get_path_from_url_with_filelock(url, cache_dir) - return file_path diff --git a/spaces/3bdo7ss/Neutron_Chatbot/app.py b/spaces/3bdo7ss/Neutron_Chatbot/app.py deleted file mode 100644 index f05b4f682f915038474ec48209c075941b45f7d5..0000000000000000000000000000000000000000 --- a/spaces/3bdo7ss/Neutron_Chatbot/app.py +++ /dev/null @@ -1,29 +0,0 @@ -import gradio as gr -from sentence_transformers import SentenceTransformer, util - -ts_model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2') - -def similarity(*data): - question = data[0] - q = data[1::2] - a = data[2::2] - similarities = [] - for i in q: - embedding_1= ts_model.encode(i, convert_to_tensor=True) - embedding_2 = ts_model.encode(question, convert_to_tensor=True) - - similarities.append(float(util.pytorch_cos_sim(embedding_1, embedding_2))) - max_similarity = max(similarities) - max_similarity_index = similarities.index(max_similarity) - - if max_similarity <= 0.5: - return "It seems that, I don't have a specific answer for that Question" - else: - return a[max_similarity_index] - - -gr.Interface( - fn = similarity, - inputs = [gr.Textbox(label = "Main Q"),gr.Textbox(label = "Q1"),gr.Textbox(label = "A1"),gr.Textbox(label = "Q2"),gr.Textbox(label = "A2")], - outputs = "text" -).launch() \ No newline at end of file diff --git a/spaces/801artistry/RVC801/infer/lib/csvutil.py b/spaces/801artistry/RVC801/infer/lib/csvutil.py deleted file mode 100644 index 79f432b6933f181d9194c50581656f2fd6e66c0c..0000000000000000000000000000000000000000 --- a/spaces/801artistry/RVC801/infer/lib/csvutil.py +++ /dev/null @@ -1,41 +0,0 @@ - -import numpy as np - -# import praatio -# import praatio.praat_scripts -import os -import sys - -import random - -import csv - -# praatEXE = join('.',os.path.abspath(os.getcwd()) + r"\Praat.exe") - - -def CSVutil(file, rw, type, *args): - if type == "formanting": - if rw == "r": - with open(file) as fileCSVread: - csv_reader = list(csv.reader(fileCSVread)) - return ( - (csv_reader[0][0], csv_reader[0][1], csv_reader[0][2]) - if csv_reader is not None - else (lambda: exec('raise ValueError("No data")'))() - ) - else: - if args: - doformnt = args[0] - else: - doformnt = False - qfr = args[1] if len(args) > 1 else 1.0 - tmb = args[2] if len(args) > 2 else 1.0 - with open(file, rw, newline="") as fileCSVwrite: - csv_writer = csv.writer(fileCSVwrite, delimiter=",") - csv_writer.writerow([doformnt, qfr, tmb]) - elif type == "stop": - stop = args[0] if args else False - with open(file, rw, newline="") as fileCSVwrite: - csv_writer = csv.writer(fileCSVwrite, delimiter=",") - csv_writer.writerow([stop]) - diff --git a/spaces/801artistry/RVC801/lib/infer_pack/modules/F0Predictor/DioF0Predictor.py b/spaces/801artistry/RVC801/lib/infer_pack/modules/F0Predictor/DioF0Predictor.py deleted file mode 100644 index ee3171bcb7c4a5066560723108b56e055f18be45..0000000000000000000000000000000000000000 --- a/spaces/801artistry/RVC801/lib/infer_pack/modules/F0Predictor/DioF0Predictor.py +++ /dev/null @@ -1,90 +0,0 @@ -from lib.infer_pack.modules.F0Predictor.F0Predictor import F0Predictor -import pyworld -import numpy as np - - -class DioF0Predictor(F0Predictor): - def __init__(self, hop_length=512, f0_min=50, f0_max=1100, sampling_rate=44100): - self.hop_length = hop_length - self.f0_min = f0_min - self.f0_max = f0_max - self.sampling_rate = sampling_rate - - def interpolate_f0(self, f0): - """ - 对F0进行插值处理 - """ - - data = np.reshape(f0, (f0.size, 1)) - - vuv_vector = np.zeros((data.size, 1), dtype=np.float32) - vuv_vector[data > 0.0] = 1.0 - vuv_vector[data <= 0.0] = 0.0 - - ip_data = data - - frame_number = data.size - last_value = 0.0 - for i in range(frame_number): - if data[i] <= 0.0: - j = i + 1 - for j in range(i + 1, frame_number): - if data[j] > 0.0: - break - if j < frame_number - 1: - if last_value > 0.0: - step = (data[j] - data[i - 1]) / float(j - i) - for k in range(i, j): - ip_data[k] = data[i - 1] + step * (k - i + 1) - else: - for k in range(i, j): - ip_data[k] = data[j] - else: - for k in range(i, frame_number): - ip_data[k] = last_value - else: - ip_data[i] = data[i] # 这里可能存在一个没有必要的拷贝 - last_value = data[i] - - return ip_data[:, 0], vuv_vector[:, 0] - - def resize_f0(self, x, target_len): - source = np.array(x) - source[source < 0.001] = np.nan - target = np.interp( - np.arange(0, len(source) * target_len, len(source)) / target_len, - np.arange(0, len(source)), - source, - ) - res = np.nan_to_num(target) - return res - - def compute_f0(self, wav, p_len=None): - if p_len is None: - p_len = wav.shape[0] // self.hop_length - f0, t = pyworld.dio( - wav.astype(np.double), - fs=self.sampling_rate, - f0_floor=self.f0_min, - f0_ceil=self.f0_max, - frame_period=1000 * self.hop_length / self.sampling_rate, - ) - f0 = pyworld.stonemask(wav.astype(np.double), f0, t, self.sampling_rate) - for index, pitch in enumerate(f0): - f0[index] = round(pitch, 1) - return self.interpolate_f0(self.resize_f0(f0, p_len))[0] - - def compute_f0_uv(self, wav, p_len=None): - if p_len is None: - p_len = wav.shape[0] // self.hop_length - f0, t = pyworld.dio( - wav.astype(np.double), - fs=self.sampling_rate, - f0_floor=self.f0_min, - f0_ceil=self.f0_max, - frame_period=1000 * self.hop_length / self.sampling_rate, - ) - f0 = pyworld.stonemask(wav.astype(np.double), f0, t, self.sampling_rate) - for index, pitch in enumerate(f0): - f0[index] = round(pitch, 1) - return self.interpolate_f0(self.resize_f0(f0, p_len)) diff --git a/spaces/801artistry/RVC801/lib/infer_pack/modules/F0Predictor/__init__.py b/spaces/801artistry/RVC801/lib/infer_pack/modules/F0Predictor/__init__.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/spaces/AIConsultant/MusicGen/scripts/templates/base.html b/spaces/AIConsultant/MusicGen/scripts/templates/base.html deleted file mode 100644 index f74668c19ecb83090a8a2d82c026bf417190ec6d..0000000000000000000000000000000000000000 --- a/spaces/AIConsultant/MusicGen/scripts/templates/base.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - {% block head %} - - - AudioCraft — MOS - {% endblock %} - - -
    -

    AudioCraft — MOS

    - {% block content %}{% endblock %} -
    - - diff --git a/spaces/AIFILMS/StyleGANEX/models/mtcnn/mtcnn_pytorch/src/align_trans.py b/spaces/AIFILMS/StyleGANEX/models/mtcnn/mtcnn_pytorch/src/align_trans.py deleted file mode 100644 index ab5f1df002bc19556ae8a75cabf56310084785a9..0000000000000000000000000000000000000000 --- a/spaces/AIFILMS/StyleGANEX/models/mtcnn/mtcnn_pytorch/src/align_trans.py +++ /dev/null @@ -1,304 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on Mon Apr 24 15:43:29 2017 -@author: zhaoy -""" -import numpy as np -import cv2 - -# from scipy.linalg import lstsq -# from scipy.ndimage import geometric_transform # , map_coordinates - -from models.mtcnn.mtcnn_pytorch.src.matlab_cp2tform import get_similarity_transform_for_cv2 - -# reference facial points, a list of coordinates (x,y) -REFERENCE_FACIAL_POINTS = [ - [30.29459953, 51.69630051], - [65.53179932, 51.50139999], - [48.02519989, 71.73660278], - [33.54930115, 92.3655014], - [62.72990036, 92.20410156] -] - -DEFAULT_CROP_SIZE = (96, 112) - - -class FaceWarpException(Exception): - def __str__(self): - return 'In File {}:{}'.format( - __file__, super.__str__(self)) - - -def get_reference_facial_points(output_size=None, - inner_padding_factor=0.0, - outer_padding=(0, 0), - default_square=False): - """ - Function: - ---------- - get reference 5 key points according to crop settings: - 0. Set default crop_size: - if default_square: - crop_size = (112, 112) - else: - crop_size = (96, 112) - 1. Pad the crop_size by inner_padding_factor in each side; - 2. Resize crop_size into (output_size - outer_padding*2), - pad into output_size with outer_padding; - 3. Output reference_5point; - Parameters: - ---------- - @output_size: (w, h) or None - size of aligned face image - @inner_padding_factor: (w_factor, h_factor) - padding factor for inner (w, h) - @outer_padding: (w_pad, h_pad) - each row is a pair of coordinates (x, y) - @default_square: True or False - if True: - default crop_size = (112, 112) - else: - default crop_size = (96, 112); - !!! make sure, if output_size is not None: - (output_size - outer_padding) - = some_scale * (default crop_size * (1.0 + inner_padding_factor)) - Returns: - ---------- - @reference_5point: 5x2 np.array - each row is a pair of transformed coordinates (x, y) - """ - # print('\n===> get_reference_facial_points():') - - # print('---> Params:') - # print(' output_size: ', output_size) - # print(' inner_padding_factor: ', inner_padding_factor) - # print(' outer_padding:', outer_padding) - # print(' default_square: ', default_square) - - tmp_5pts = np.array(REFERENCE_FACIAL_POINTS) - tmp_crop_size = np.array(DEFAULT_CROP_SIZE) - - # 0) make the inner region a square - if default_square: - size_diff = max(tmp_crop_size) - tmp_crop_size - tmp_5pts += size_diff / 2 - tmp_crop_size += size_diff - - # print('---> default:') - # print(' crop_size = ', tmp_crop_size) - # print(' reference_5pts = ', tmp_5pts) - - if (output_size and - output_size[0] == tmp_crop_size[0] and - output_size[1] == tmp_crop_size[1]): - # print('output_size == DEFAULT_CROP_SIZE {}: return default reference points'.format(tmp_crop_size)) - return tmp_5pts - - if (inner_padding_factor == 0 and - outer_padding == (0, 0)): - if output_size is None: - # print('No paddings to do: return default reference points') - return tmp_5pts - else: - raise FaceWarpException( - 'No paddings to do, output_size must be None or {}'.format(tmp_crop_size)) - - # check output size - if not (0 <= inner_padding_factor <= 1.0): - raise FaceWarpException('Not (0 <= inner_padding_factor <= 1.0)') - - if ((inner_padding_factor > 0 or outer_padding[0] > 0 or outer_padding[1] > 0) - and output_size is None): - output_size = tmp_crop_size * \ - (1 + inner_padding_factor * 2).astype(np.int32) - output_size += np.array(outer_padding) - # print(' deduced from paddings, output_size = ', output_size) - - if not (outer_padding[0] < output_size[0] - and outer_padding[1] < output_size[1]): - raise FaceWarpException('Not (outer_padding[0] < output_size[0]' - 'and outer_padding[1] < output_size[1])') - - # 1) pad the inner region according inner_padding_factor - # print('---> STEP1: pad the inner region according inner_padding_factor') - if inner_padding_factor > 0: - size_diff = tmp_crop_size * inner_padding_factor * 2 - tmp_5pts += size_diff / 2 - tmp_crop_size += np.round(size_diff).astype(np.int32) - - # print(' crop_size = ', tmp_crop_size) - # print(' reference_5pts = ', tmp_5pts) - - # 2) resize the padded inner region - # print('---> STEP2: resize the padded inner region') - size_bf_outer_pad = np.array(output_size) - np.array(outer_padding) * 2 - # print(' crop_size = ', tmp_crop_size) - # print(' size_bf_outer_pad = ', size_bf_outer_pad) - - if size_bf_outer_pad[0] * tmp_crop_size[1] != size_bf_outer_pad[1] * tmp_crop_size[0]: - raise FaceWarpException('Must have (output_size - outer_padding)' - '= some_scale * (crop_size * (1.0 + inner_padding_factor)') - - scale_factor = size_bf_outer_pad[0].astype(np.float32) / tmp_crop_size[0] - # print(' resize scale_factor = ', scale_factor) - tmp_5pts = tmp_5pts * scale_factor - # size_diff = tmp_crop_size * (scale_factor - min(scale_factor)) - # tmp_5pts = tmp_5pts + size_diff / 2 - tmp_crop_size = size_bf_outer_pad - # print(' crop_size = ', tmp_crop_size) - # print(' reference_5pts = ', tmp_5pts) - - # 3) add outer_padding to make output_size - reference_5point = tmp_5pts + np.array(outer_padding) - tmp_crop_size = output_size - # print('---> STEP3: add outer_padding to make output_size') - # print(' crop_size = ', tmp_crop_size) - # print(' reference_5pts = ', tmp_5pts) - - # print('===> end get_reference_facial_points\n') - - return reference_5point - - -def get_affine_transform_matrix(src_pts, dst_pts): - """ - Function: - ---------- - get affine transform matrix 'tfm' from src_pts to dst_pts - Parameters: - ---------- - @src_pts: Kx2 np.array - source points matrix, each row is a pair of coordinates (x, y) - @dst_pts: Kx2 np.array - destination points matrix, each row is a pair of coordinates (x, y) - Returns: - ---------- - @tfm: 2x3 np.array - transform matrix from src_pts to dst_pts - """ - - tfm = np.float32([[1, 0, 0], [0, 1, 0]]) - n_pts = src_pts.shape[0] - ones = np.ones((n_pts, 1), src_pts.dtype) - src_pts_ = np.hstack([src_pts, ones]) - dst_pts_ = np.hstack([dst_pts, ones]) - - # #print(('src_pts_:\n' + str(src_pts_)) - # #print(('dst_pts_:\n' + str(dst_pts_)) - - A, res, rank, s = np.linalg.lstsq(src_pts_, dst_pts_) - - # #print(('np.linalg.lstsq return A: \n' + str(A)) - # #print(('np.linalg.lstsq return res: \n' + str(res)) - # #print(('np.linalg.lstsq return rank: \n' + str(rank)) - # #print(('np.linalg.lstsq return s: \n' + str(s)) - - if rank == 3: - tfm = np.float32([ - [A[0, 0], A[1, 0], A[2, 0]], - [A[0, 1], A[1, 1], A[2, 1]] - ]) - elif rank == 2: - tfm = np.float32([ - [A[0, 0], A[1, 0], 0], - [A[0, 1], A[1, 1], 0] - ]) - - return tfm - - -def warp_and_crop_face(src_img, - facial_pts, - reference_pts=None, - crop_size=(96, 112), - align_type='smilarity'): - """ - Function: - ---------- - apply affine transform 'trans' to uv - Parameters: - ---------- - @src_img: 3x3 np.array - input image - @facial_pts: could be - 1)a list of K coordinates (x,y) - or - 2) Kx2 or 2xK np.array - each row or col is a pair of coordinates (x, y) - @reference_pts: could be - 1) a list of K coordinates (x,y) - or - 2) Kx2 or 2xK np.array - each row or col is a pair of coordinates (x, y) - or - 3) None - if None, use default reference facial points - @crop_size: (w, h) - output face image size - @align_type: transform type, could be one of - 1) 'similarity': use similarity transform - 2) 'cv2_affine': use the first 3 points to do affine transform, - by calling cv2.getAffineTransform() - 3) 'affine': use all points to do affine transform - Returns: - ---------- - @face_img: output face image with size (w, h) = @crop_size - """ - - if reference_pts is None: - if crop_size[0] == 96 and crop_size[1] == 112: - reference_pts = REFERENCE_FACIAL_POINTS - else: - default_square = False - inner_padding_factor = 0 - outer_padding = (0, 0) - output_size = crop_size - - reference_pts = get_reference_facial_points(output_size, - inner_padding_factor, - outer_padding, - default_square) - - ref_pts = np.float32(reference_pts) - ref_pts_shp = ref_pts.shape - if max(ref_pts_shp) < 3 or min(ref_pts_shp) != 2: - raise FaceWarpException( - 'reference_pts.shape must be (K,2) or (2,K) and K>2') - - if ref_pts_shp[0] == 2: - ref_pts = ref_pts.T - - src_pts = np.float32(facial_pts) - src_pts_shp = src_pts.shape - if max(src_pts_shp) < 3 or min(src_pts_shp) != 2: - raise FaceWarpException( - 'facial_pts.shape must be (K,2) or (2,K) and K>2') - - if src_pts_shp[0] == 2: - src_pts = src_pts.T - - # #print('--->src_pts:\n', src_pts - # #print('--->ref_pts\n', ref_pts - - if src_pts.shape != ref_pts.shape: - raise FaceWarpException( - 'facial_pts and reference_pts must have the same shape') - - if align_type is 'cv2_affine': - tfm = cv2.getAffineTransform(src_pts[0:3], ref_pts[0:3]) - # #print(('cv2.getAffineTransform() returns tfm=\n' + str(tfm)) - elif align_type is 'affine': - tfm = get_affine_transform_matrix(src_pts, ref_pts) - # #print(('get_affine_transform_matrix() returns tfm=\n' + str(tfm)) - else: - tfm = get_similarity_transform_for_cv2(src_pts, ref_pts) - # #print(('get_similarity_transform_for_cv2() returns tfm=\n' + str(tfm)) - - # #print('--->Transform matrix: ' - # #print(('type(tfm):' + str(type(tfm))) - # #print(('tfm.dtype:' + str(tfm.dtype)) - # #print( tfm - - face_img = cv2.warpAffine(src_img, tfm, (crop_size[0], crop_size[1])) - - return face_img, tfm diff --git a/spaces/AIGC-Audio/Make_An_Audio_inpaint/ldm/modules/diffusionmodules/model.py b/spaces/AIGC-Audio/Make_An_Audio_inpaint/ldm/modules/diffusionmodules/model.py deleted file mode 100644 index 2746d74c16cd9a7a418487599399cdea8dc1bbac..0000000000000000000000000000000000000000 --- a/spaces/AIGC-Audio/Make_An_Audio_inpaint/ldm/modules/diffusionmodules/model.py +++ /dev/null @@ -1,835 +0,0 @@ -# pytorch_diffusion + derived encoder decoder -import math -import torch -import torch.nn as nn -import numpy as np -from einops import rearrange - -from ldm.util import instantiate_from_config -from ldm.modules.attention import LinearAttention - - -def get_timestep_embedding(timesteps, embedding_dim): - """ - This matches the implementation in Denoising Diffusion Probabilistic Models: - From Fairseq. - Build sinusoidal embeddings. - This matches the implementation in tensor2tensor, but differs slightly - from the description in Section 3.5 of "Attention Is All You Need". - """ - assert len(timesteps.shape) == 1 - - half_dim = embedding_dim // 2 - emb = math.log(10000) / (half_dim - 1) - emb = torch.exp(torch.arange(half_dim, dtype=torch.float32) * -emb) - emb = emb.to(device=timesteps.device) - emb = timesteps.float()[:, None] * emb[None, :] - emb = torch.cat([torch.sin(emb), torch.cos(emb)], dim=1) - if embedding_dim % 2 == 1: # zero pad - emb = torch.nn.functional.pad(emb, (0,1,0,0)) - return emb - - -def nonlinearity(x): - # swish - return x*torch.sigmoid(x) - - -def Normalize(in_channels, num_groups=32): - return torch.nn.GroupNorm(num_groups=num_groups, num_channels=in_channels, eps=1e-6, affine=True) - - -class Upsample(nn.Module): - def __init__(self, in_channels, with_conv): - super().__init__() - self.with_conv = with_conv - if self.with_conv: - self.conv = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x): - x = torch.nn.functional.interpolate(x, scale_factor=2.0, mode="nearest") - if self.with_conv: - x = self.conv(x) - return x - - -class Downsample(nn.Module): - def __init__(self, in_channels, with_conv): - super().__init__() - self.with_conv = with_conv - if self.with_conv: - # no asymmetric padding in torch conv, must do it ourselves - self.conv = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=3, - stride=2, - padding=0) - - def forward(self, x): - if self.with_conv: - pad = (0,1,0,1) - x = torch.nn.functional.pad(x, pad, mode="constant", value=0) - x = self.conv(x) - else: - x = torch.nn.functional.avg_pool2d(x, kernel_size=2, stride=2) - return x - - -class ResnetBlock(nn.Module): - def __init__(self, *, in_channels, out_channels=None, conv_shortcut=False, - dropout, temb_channels=512): - super().__init__() - self.in_channels = in_channels - out_channels = in_channels if out_channels is None else out_channels - self.out_channels = out_channels - self.use_conv_shortcut = conv_shortcut - - self.norm1 = Normalize(in_channels) - self.conv1 = torch.nn.Conv2d(in_channels, - out_channels, - kernel_size=3, - stride=1, - padding=1) - if temb_channels > 0: - self.temb_proj = torch.nn.Linear(temb_channels, - out_channels) - self.norm2 = Normalize(out_channels) - self.dropout = torch.nn.Dropout(dropout) - self.conv2 = torch.nn.Conv2d(out_channels, - out_channels, - kernel_size=3, - stride=1, - padding=1) - if self.in_channels != self.out_channels: - if self.use_conv_shortcut: - self.conv_shortcut = torch.nn.Conv2d(in_channels, - out_channels, - kernel_size=3, - stride=1, - padding=1) - else: - self.nin_shortcut = torch.nn.Conv2d(in_channels, - out_channels, - kernel_size=1, - stride=1, - padding=0) - - def forward(self, x, temb): - h = x - h = self.norm1(h) - h = nonlinearity(h) - h = self.conv1(h) - - if temb is not None: - h = h + self.temb_proj(nonlinearity(temb))[:,:,None,None] - - h = self.norm2(h) - h = nonlinearity(h) - h = self.dropout(h) - h = self.conv2(h) - - if self.in_channels != self.out_channels: - if self.use_conv_shortcut: - x = self.conv_shortcut(x) - else: - x = self.nin_shortcut(x) - - return x+h - - -class LinAttnBlock(LinearAttention): - """to match AttnBlock usage""" - def __init__(self, in_channels): - super().__init__(dim=in_channels, heads=1, dim_head=in_channels) - - -class AttnBlock(nn.Module): - def __init__(self, in_channels): - super().__init__() - self.in_channels = in_channels - - self.norm = Normalize(in_channels) - self.q = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.k = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.v = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - self.proj_out = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=1, - stride=1, - padding=0) - - - def forward(self, x): - h_ = x - h_ = self.norm(h_) - q = self.q(h_) - k = self.k(h_) - v = self.v(h_) - - # compute attention - b,c,h,w = q.shape - q = q.reshape(b,c,h*w) - q = q.permute(0,2,1) # b,hw,c - k = k.reshape(b,c,h*w) # b,c,hw - w_ = torch.bmm(q,k) # b,hw,hw w[b,i,j]=sum_c q[b,i,c]k[b,c,j] - w_ = w_ * (int(c)**(-0.5)) - w_ = torch.nn.functional.softmax(w_, dim=2) - - # attend to values - v = v.reshape(b,c,h*w) - w_ = w_.permute(0,2,1) # b,hw,hw (first hw of k, second of q) - h_ = torch.bmm(v,w_) # b, c,hw (hw of q) h_[b,c,j] = sum_i v[b,c,i] w_[b,i,j] - h_ = h_.reshape(b,c,h,w) - - h_ = self.proj_out(h_) - - return x+h_ - - -def make_attn(in_channels, attn_type="vanilla"): - assert attn_type in ["vanilla", "linear", "none"], f'attn_type {attn_type} unknown' - print(f"making attention of type '{attn_type}' with {in_channels} in_channels") - if attn_type == "vanilla": - return AttnBlock(in_channels) - elif attn_type == "none": - return nn.Identity(in_channels) - else: - return LinAttnBlock(in_channels) - - -class Model(nn.Module): - def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, - attn_resolutions, dropout=0.0, resamp_with_conv=True, in_channels, - resolution, use_timestep=True, use_linear_attn=False, attn_type="vanilla"): - super().__init__() - if use_linear_attn: attn_type = "linear" - self.ch = ch - self.temb_ch = self.ch*4 - self.num_resolutions = len(ch_mult) - self.num_res_blocks = num_res_blocks - self.resolution = resolution - self.in_channels = in_channels - - self.use_timestep = use_timestep - if self.use_timestep: - # timestep embedding - self.temb = nn.Module() - self.temb.dense = nn.ModuleList([ - torch.nn.Linear(self.ch, - self.temb_ch), - torch.nn.Linear(self.temb_ch, - self.temb_ch), - ]) - - # downsampling - self.conv_in = torch.nn.Conv2d(in_channels, - self.ch, - kernel_size=3, - stride=1, - padding=1) - - curr_res = resolution - in_ch_mult = (1,)+tuple(ch_mult) - self.down = nn.ModuleList() - for i_level in range(self.num_resolutions): - block = nn.ModuleList() - attn = nn.ModuleList() - block_in = ch*in_ch_mult[i_level] - block_out = ch*ch_mult[i_level] - for i_block in range(self.num_res_blocks): - block.append(ResnetBlock(in_channels=block_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - if curr_res in attn_resolutions: - attn.append(make_attn(block_in, attn_type=attn_type)) - down = nn.Module() - down.block = block - down.attn = attn - if i_level != self.num_resolutions-1: - down.downsample = Downsample(block_in, resamp_with_conv) - curr_res = curr_res // 2 - self.down.append(down) - - # middle - self.mid = nn.Module() - self.mid.block_1 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - self.mid.attn_1 = make_attn(block_in, attn_type=attn_type) - self.mid.block_2 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - - # upsampling - self.up = nn.ModuleList() - for i_level in reversed(range(self.num_resolutions)): - block = nn.ModuleList() - attn = nn.ModuleList() - block_out = ch*ch_mult[i_level] - skip_in = ch*ch_mult[i_level] - for i_block in range(self.num_res_blocks+1): - if i_block == self.num_res_blocks: - skip_in = ch*in_ch_mult[i_level] - block.append(ResnetBlock(in_channels=block_in+skip_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - if curr_res in attn_resolutions: - attn.append(make_attn(block_in, attn_type=attn_type)) - up = nn.Module() - up.block = block - up.attn = attn - if i_level != 0: - up.upsample = Upsample(block_in, resamp_with_conv) - curr_res = curr_res * 2 - self.up.insert(0, up) # prepend to get consistent order - - # end - self.norm_out = Normalize(block_in) - self.conv_out = torch.nn.Conv2d(block_in, - out_ch, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x, t=None, context=None): - #assert x.shape[2] == x.shape[3] == self.resolution - if context is not None: - # assume aligned context, cat along channel axis - x = torch.cat((x, context), dim=1) - if self.use_timestep: - # timestep embedding - assert t is not None - temb = get_timestep_embedding(t, self.ch) - temb = self.temb.dense[0](temb) - temb = nonlinearity(temb) - temb = self.temb.dense[1](temb) - else: - temb = None - - # downsampling - hs = [self.conv_in(x)] - for i_level in range(self.num_resolutions): - for i_block in range(self.num_res_blocks): - h = self.down[i_level].block[i_block](hs[-1], temb) - if len(self.down[i_level].attn) > 0: - h = self.down[i_level].attn[i_block](h) - hs.append(h) - if i_level != self.num_resolutions-1: - hs.append(self.down[i_level].downsample(hs[-1])) - - # middle - h = hs[-1] - h = self.mid.block_1(h, temb) - h = self.mid.attn_1(h) - h = self.mid.block_2(h, temb) - - # upsampling - for i_level in reversed(range(self.num_resolutions)): - for i_block in range(self.num_res_blocks+1): - h = self.up[i_level].block[i_block]( - torch.cat([h, hs.pop()], dim=1), temb) - if len(self.up[i_level].attn) > 0: - h = self.up[i_level].attn[i_block](h) - if i_level != 0: - h = self.up[i_level].upsample(h) - - # end - h = self.norm_out(h) - h = nonlinearity(h) - h = self.conv_out(h) - return h - - def get_last_layer(self): - return self.conv_out.weight - - -class Encoder(nn.Module): - def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, - attn_resolutions, dropout=0.0, resamp_with_conv=True, in_channels, - resolution, z_channels, double_z=True, use_linear_attn=False, attn_type="vanilla", - **ignore_kwargs): - super().__init__() - if use_linear_attn: attn_type = "linear" - self.ch = ch - self.temb_ch = 0 - self.num_resolutions = len(ch_mult) - self.num_res_blocks = num_res_blocks - self.resolution = resolution - self.in_channels = in_channels - - # downsampling - self.conv_in = torch.nn.Conv2d(in_channels, - self.ch, - kernel_size=3, - stride=1, - padding=1) - - curr_res = resolution - in_ch_mult = (1,)+tuple(ch_mult) - self.in_ch_mult = in_ch_mult - self.down = nn.ModuleList() - for i_level in range(self.num_resolutions): - block = nn.ModuleList() - attn = nn.ModuleList() - block_in = ch*in_ch_mult[i_level] - block_out = ch*ch_mult[i_level] - for i_block in range(self.num_res_blocks): - block.append(ResnetBlock(in_channels=block_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - if curr_res in attn_resolutions: - attn.append(make_attn(block_in, attn_type=attn_type))# vanilla attention - down = nn.Module() - down.block = block - down.attn = attn - if i_level != self.num_resolutions-1: - down.downsample = Downsample(block_in, resamp_with_conv) - curr_res = curr_res // 2 - self.down.append(down) - - # middle - self.mid = nn.Module() - self.mid.block_1 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - self.mid.attn_1 = make_attn(block_in, attn_type=attn_type) - self.mid.block_2 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - - # end - self.norm_out = Normalize(block_in)# GroupNorm - self.conv_out = torch.nn.Conv2d(block_in, - 2*z_channels if double_z else z_channels, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x): - # timestep embedding - temb = None - - # downsampling - hs = [self.conv_in(x)] - for i_level in range(self.num_resolutions): - for i_block in range(self.num_res_blocks): - h = self.down[i_level].block[i_block](hs[-1], temb) - if len(self.down[i_level].attn) > 0: - h = self.down[i_level].attn[i_block](h) - hs.append(h) - if i_level != self.num_resolutions-1: - hs.append(self.down[i_level].downsample(hs[-1])) - - # middle - h = hs[-1] - h = self.mid.block_1(h, temb) - h = self.mid.attn_1(h) - h = self.mid.block_2(h, temb) - - # end - h = self.norm_out(h) - h = nonlinearity(h) - h = self.conv_out(h) - return h - - -class Decoder(nn.Module): - def __init__(self, *, ch, out_ch, ch_mult=(1,2,4,8), num_res_blocks, - attn_resolutions, dropout=0.0, resamp_with_conv=True, in_channels, - resolution, z_channels, give_pre_end=False, tanh_out=False, use_linear_attn=False, - attn_type="vanilla", **ignorekwargs): - super().__init__() - if use_linear_attn: attn_type = "linear" - self.ch = ch - self.temb_ch = 0 - self.num_resolutions = len(ch_mult) - self.num_res_blocks = num_res_blocks - self.resolution = resolution - self.in_channels = in_channels - self.give_pre_end = give_pre_end - self.tanh_out = tanh_out - - # compute in_ch_mult, block_in and curr_res at lowest res - in_ch_mult = (1,)+tuple(ch_mult) - block_in = ch*ch_mult[self.num_resolutions-1] - curr_res = resolution // 2**(self.num_resolutions-1) - self.z_shape = (1,z_channels,curr_res,curr_res) - print("Working with z of shape {} = {} dimensions.".format( - self.z_shape, np.prod(self.z_shape))) - - # z to block_in - self.conv_in = torch.nn.Conv2d(z_channels, - block_in, - kernel_size=3, - stride=1, - padding=1) - - # middle - self.mid = nn.Module() - self.mid.block_1 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - self.mid.attn_1 = make_attn(block_in, attn_type=attn_type) - self.mid.block_2 = ResnetBlock(in_channels=block_in, - out_channels=block_in, - temb_channels=self.temb_ch, - dropout=dropout) - - # upsampling - self.up = nn.ModuleList() - for i_level in reversed(range(self.num_resolutions)): - block = nn.ModuleList() - attn = nn.ModuleList() - block_out = ch*ch_mult[i_level] - for i_block in range(self.num_res_blocks+1): - block.append(ResnetBlock(in_channels=block_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - if curr_res in attn_resolutions: - attn.append(make_attn(block_in, attn_type=attn_type)) - up = nn.Module() - up.block = block - up.attn = attn - if i_level != 0: - up.upsample = Upsample(block_in, resamp_with_conv) - curr_res = curr_res * 2 - self.up.insert(0, up) # prepend to get consistent order - - # end - self.norm_out = Normalize(block_in) - self.conv_out = torch.nn.Conv2d(block_in, - out_ch, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, z): - #assert z.shape[1:] == self.z_shape[1:] - self.last_z_shape = z.shape - - # timestep embedding - temb = None - - # z to block_in - h = self.conv_in(z) - - # middle - h = self.mid.block_1(h, temb) - h = self.mid.attn_1(h) - h = self.mid.block_2(h, temb) - - # upsampling - for i_level in reversed(range(self.num_resolutions)): - for i_block in range(self.num_res_blocks+1): - h = self.up[i_level].block[i_block](h, temb) - if len(self.up[i_level].attn) > 0: - h = self.up[i_level].attn[i_block](h) - if i_level != 0: - h = self.up[i_level].upsample(h) - - # end - if self.give_pre_end: - return h - - h = self.norm_out(h) - h = nonlinearity(h) - h = self.conv_out(h) - if self.tanh_out: - h = torch.tanh(h) - return h - - -class SimpleDecoder(nn.Module): - def __init__(self, in_channels, out_channels, *args, **kwargs): - super().__init__() - self.model = nn.ModuleList([nn.Conv2d(in_channels, in_channels, 1), - ResnetBlock(in_channels=in_channels, - out_channels=2 * in_channels, - temb_channels=0, dropout=0.0), - ResnetBlock(in_channels=2 * in_channels, - out_channels=4 * in_channels, - temb_channels=0, dropout=0.0), - ResnetBlock(in_channels=4 * in_channels, - out_channels=2 * in_channels, - temb_channels=0, dropout=0.0), - nn.Conv2d(2*in_channels, in_channels, 1), - Upsample(in_channels, with_conv=True)]) - # end - self.norm_out = Normalize(in_channels) - self.conv_out = torch.nn.Conv2d(in_channels, - out_channels, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x): - for i, layer in enumerate(self.model): - if i in [1,2,3]: - x = layer(x, None) - else: - x = layer(x) - - h = self.norm_out(x) - h = nonlinearity(h) - x = self.conv_out(h) - return x - - -class UpsampleDecoder(nn.Module): - def __init__(self, in_channels, out_channels, ch, num_res_blocks, resolution, - ch_mult=(2,2), dropout=0.0): - super().__init__() - # upsampling - self.temb_ch = 0 - self.num_resolutions = len(ch_mult) - self.num_res_blocks = num_res_blocks - block_in = in_channels - curr_res = resolution // 2 ** (self.num_resolutions - 1) - self.res_blocks = nn.ModuleList() - self.upsample_blocks = nn.ModuleList() - for i_level in range(self.num_resolutions): - res_block = [] - block_out = ch * ch_mult[i_level] - for i_block in range(self.num_res_blocks + 1): - res_block.append(ResnetBlock(in_channels=block_in, - out_channels=block_out, - temb_channels=self.temb_ch, - dropout=dropout)) - block_in = block_out - self.res_blocks.append(nn.ModuleList(res_block)) - if i_level != self.num_resolutions - 1: - self.upsample_blocks.append(Upsample(block_in, True)) - curr_res = curr_res * 2 - - # end - self.norm_out = Normalize(block_in) - self.conv_out = torch.nn.Conv2d(block_in, - out_channels, - kernel_size=3, - stride=1, - padding=1) - - def forward(self, x): - # upsampling - h = x - for k, i_level in enumerate(range(self.num_resolutions)): - for i_block in range(self.num_res_blocks + 1): - h = self.res_blocks[i_level][i_block](h, None) - if i_level != self.num_resolutions - 1: - h = self.upsample_blocks[k](h) - h = self.norm_out(h) - h = nonlinearity(h) - h = self.conv_out(h) - return h - - -class LatentRescaler(nn.Module): - def __init__(self, factor, in_channels, mid_channels, out_channels, depth=2): - super().__init__() - # residual block, interpolate, residual block - self.factor = factor - self.conv_in = nn.Conv2d(in_channels, - mid_channels, - kernel_size=3, - stride=1, - padding=1) - self.res_block1 = nn.ModuleList([ResnetBlock(in_channels=mid_channels, - out_channels=mid_channels, - temb_channels=0, - dropout=0.0) for _ in range(depth)]) - self.attn = AttnBlock(mid_channels) - self.res_block2 = nn.ModuleList([ResnetBlock(in_channels=mid_channels, - out_channels=mid_channels, - temb_channels=0, - dropout=0.0) for _ in range(depth)]) - - self.conv_out = nn.Conv2d(mid_channels, - out_channels, - kernel_size=1, - ) - - def forward(self, x): - x = self.conv_in(x) - for block in self.res_block1: - x = block(x, None) - x = torch.nn.functional.interpolate(x, size=(int(round(x.shape[2]*self.factor)), int(round(x.shape[3]*self.factor)))) - x = self.attn(x) - for block in self.res_block2: - x = block(x, None) - x = self.conv_out(x) - return x - - -class MergedRescaleEncoder(nn.Module): - def __init__(self, in_channels, ch, resolution, out_ch, num_res_blocks, - attn_resolutions, dropout=0.0, resamp_with_conv=True, - ch_mult=(1,2,4,8), rescale_factor=1.0, rescale_module_depth=1): - super().__init__() - intermediate_chn = ch * ch_mult[-1] - self.encoder = Encoder(in_channels=in_channels, num_res_blocks=num_res_blocks, ch=ch, ch_mult=ch_mult, - z_channels=intermediate_chn, double_z=False, resolution=resolution, - attn_resolutions=attn_resolutions, dropout=dropout, resamp_with_conv=resamp_with_conv, - out_ch=None) - self.rescaler = LatentRescaler(factor=rescale_factor, in_channels=intermediate_chn, - mid_channels=intermediate_chn, out_channels=out_ch, depth=rescale_module_depth) - - def forward(self, x): - x = self.encoder(x) - x = self.rescaler(x) - return x - - -class MergedRescaleDecoder(nn.Module): - def __init__(self, z_channels, out_ch, resolution, num_res_blocks, attn_resolutions, ch, ch_mult=(1,2,4,8), - dropout=0.0, resamp_with_conv=True, rescale_factor=1.0, rescale_module_depth=1): - super().__init__() - tmp_chn = z_channels*ch_mult[-1] - self.decoder = Decoder(out_ch=out_ch, z_channels=tmp_chn, attn_resolutions=attn_resolutions, dropout=dropout, - resamp_with_conv=resamp_with_conv, in_channels=None, num_res_blocks=num_res_blocks, - ch_mult=ch_mult, resolution=resolution, ch=ch) - self.rescaler = LatentRescaler(factor=rescale_factor, in_channels=z_channels, mid_channels=tmp_chn, - out_channels=tmp_chn, depth=rescale_module_depth) - - def forward(self, x): - x = self.rescaler(x) - x = self.decoder(x) - return x - - -class Upsampler(nn.Module): - def __init__(self, in_size, out_size, in_channels, out_channels, ch_mult=2): - super().__init__() - assert out_size >= in_size - num_blocks = int(np.log2(out_size//in_size))+1 - factor_up = 1.+ (out_size % in_size) - print(f"Building {self.__class__.__name__} with in_size: {in_size} --> out_size {out_size} and factor {factor_up}") - self.rescaler = LatentRescaler(factor=factor_up, in_channels=in_channels, mid_channels=2*in_channels, - out_channels=in_channels) - self.decoder = Decoder(out_ch=out_channels, resolution=out_size, z_channels=in_channels, num_res_blocks=2, - attn_resolutions=[], in_channels=None, ch=in_channels, - ch_mult=[ch_mult for _ in range(num_blocks)]) - - def forward(self, x): - x = self.rescaler(x) - x = self.decoder(x) - return x - - -class Resize(nn.Module): - def __init__(self, in_channels=None, learned=False, mode="bilinear"): - super().__init__() - self.with_conv = learned - self.mode = mode - if self.with_conv: - print(f"Note: {self.__class__.__name} uses learned downsampling and will ignore the fixed {mode} mode") - raise NotImplementedError() - assert in_channels is not None - # no asymmetric padding in torch conv, must do it ourselves - self.conv = torch.nn.Conv2d(in_channels, - in_channels, - kernel_size=4, - stride=2, - padding=1) - - def forward(self, x, scale_factor=1.0): - if scale_factor==1.0: - return x - else: - x = torch.nn.functional.interpolate(x, mode=self.mode, align_corners=False, scale_factor=scale_factor) - return x - -class FirstStagePostProcessor(nn.Module): - - def __init__(self, ch_mult:list, in_channels, - pretrained_model:nn.Module=None, - reshape=False, - n_channels=None, - dropout=0., - pretrained_config=None): - super().__init__() - if pretrained_config is None: - assert pretrained_model is not None, 'Either "pretrained_model" or "pretrained_config" must not be None' - self.pretrained_model = pretrained_model - else: - assert pretrained_config is not None, 'Either "pretrained_model" or "pretrained_config" must not be None' - self.instantiate_pretrained(pretrained_config) - - self.do_reshape = reshape - - if n_channels is None: - n_channels = self.pretrained_model.encoder.ch - - self.proj_norm = Normalize(in_channels,num_groups=in_channels//2) - self.proj = nn.Conv2d(in_channels,n_channels,kernel_size=3, - stride=1,padding=1) - - blocks = [] - downs = [] - ch_in = n_channels - for m in ch_mult: - blocks.append(ResnetBlock(in_channels=ch_in,out_channels=m*n_channels,dropout=dropout)) - ch_in = m * n_channels - downs.append(Downsample(ch_in, with_conv=False)) - - self.model = nn.ModuleList(blocks) - self.downsampler = nn.ModuleList(downs) - - - def instantiate_pretrained(self, config): - model = instantiate_from_config(config) - self.pretrained_model = model.eval() - # self.pretrained_model.train = False - for param in self.pretrained_model.parameters(): - param.requires_grad = False - - - @torch.no_grad() - def encode_with_pretrained(self,x): - c = self.pretrained_model.encode(x) - if isinstance(c, DiagonalGaussianDistribution): - c = c.mode() - return c - - def forward(self,x): - z_fs = self.encode_with_pretrained(x) - z = self.proj_norm(z_fs) - z = self.proj(z) - z = nonlinearity(z) - - for submodel, downmodel in zip(self.model,self.downsampler): - z = submodel(z,temb=None) - z = downmodel(z) - - if self.do_reshape: - z = rearrange(z,'b c h w -> b (h w) c') - return z - diff --git a/spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_1_ClothesKeyPoint/mmpose_1_x/configs/fashion_2d_keypoint/topdown_heatmap/deepfashion2/td_hm_res50_4xb16-150e_deepfashion2_long_sleeved_dress_256x192.py b/spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_1_ClothesKeyPoint/mmpose_1_x/configs/fashion_2d_keypoint/topdown_heatmap/deepfashion2/td_hm_res50_4xb16-150e_deepfashion2_long_sleeved_dress_256x192.py deleted file mode 100644 index 6d83441720cf20224ab6d2d790285fc204e4dffe..0000000000000000000000000000000000000000 --- a/spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_1_ClothesKeyPoint/mmpose_1_x/configs/fashion_2d_keypoint/topdown_heatmap/deepfashion2/td_hm_res50_4xb16-150e_deepfashion2_long_sleeved_dress_256x192.py +++ /dev/null @@ -1,172 +0,0 @@ -_base_ = [ - '../../../_base_/default_runtime.py', - '../../../_base_/datasets/deepfashion2.py' -] - -default_hooks = dict(checkpoint=dict(save_best='PCK', rule='greater')) - -resume = False # 断点恢复 -load_from = None # 模型权重加载 -train_cfg = dict(by_epoch=True, max_epochs=150, val_interval=10) # 训练轮数,测试间隔 -param_scheduler = [ - dict( # warmup策略 - type='LinearLR', - begin=0, - end=500, - start_factor=0.001, - by_epoch=False), - dict( # scheduler - type='MultiStepLR', - begin=0, - end=150, - milestones=[100, 130], - gamma=0.1, - by_epoch=True) -] -optim_wrapper = dict(optimizer=dict(type='Adam', lr=0.0005)) # 优化器和学习率 -auto_scale_lr = dict(base_batch_size=512) # 根据batch_size自动缩放学习率 - -backend_args = dict(backend='local') # 数据加载后端设置,默认从本地硬盘加载 -dataset_type = 'DeepFashion2Dataset' # 数据集类名 DeepFashionDataset -data_mode = 'topdown' # 算法结构类型,用于指定标注信息加载策略 -data_root = 'data/deepfashion2/' # 数据存放路径 -# 定义数据编解码器,用于生成target和对pred进行解码,同时包含了输入图片和输出heatmap尺寸等信息 -codec = dict( - type='MSRAHeatmap', input_size=(192, 256), heatmap_size=(48, 64), sigma=2) - -train_pipeline = [ - dict(type='LoadImage'), - dict(type='GetBBoxCenterScale'), - dict(type='RandomFlip', direction='horizontal'), - dict( - type='RandomBBoxTransform', - shift_prob=0, - rotate_factor=60, - scale_factor=(0.75, 1.25)), - dict(type='TopdownAffine', input_size=codec['input_size']), - dict(type='GenerateTarget', encoder=codec), - dict(type='PackPoseInputs') -] -val_pipeline = [ # 测试时数据增强 - dict(type='LoadImage', backend_args=backend_args), # 加载图片 - dict(type='GetBBoxCenterScale'), # 根据bbox获取center和scale - dict(type='TopdownAffine', input_size=codec['input_size']), # 根据变换矩阵更新目标数据 - dict(type='PackPoseInputs') # 对target进行打包用于训练 -] -train_dataloader = dict( # 训练数据加载 - batch_size=16, # 批次大小 - num_workers=6, # 数据加载进程数 - persistent_workers=True, # 在不活跃时维持进程不终止,避免反复启动进程的开销 - sampler=dict(type='DefaultSampler', shuffle=True), # 采样策略,打乱数据 - dataset=dict( - type=dataset_type, # 数据集类名 - data_root=data_root, # 数据集路径 - data_mode=data_mode, # 算法类型 - ann_file='train/deepfashion2_long_sleeved_dress.json', # 标注文件路径 - data_prefix=dict(img='train/image/'), # 图像路径 - pipeline=train_pipeline # 数据流水线 - )) -val_dataloader = dict( - batch_size=16, - num_workers=6, - persistent_workers=True, # 在不活跃时维持进程不终止,避免反复启动进程的开销 - drop_last=False, - sampler=dict(type='DefaultSampler', shuffle=False), # 采样策略,不进行打乱 - dataset=dict( - type=dataset_type, # 数据集类名 - data_root=data_root, # 数据集路径 - data_mode=data_mode, # 算法类型 - ann_file='validation/deepfashion2_long_sleeved_dress.json', # 标注文件路径 - data_prefix=dict(img='validation/image/'), # 图像路径 - test_mode=True, # 测试模式开关 - pipeline=val_pipeline # 数据流水线 - )) -test_dataloader = val_dataloader # 默认情况下不区分验证集和测试集,用户根据需要来自行定义 - -channel_cfg = dict( - num_output_channels=294, - dataset_joints=294, - dataset_channel=[ - [ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, - 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, - 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, - 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, - 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, - 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, - 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, - 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, - 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, - 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, - 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, - 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, - 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, - 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, - 285, 286, 287, 288, 289, 290, 291, 292, 293 - ], - ], - inference_channel=[ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, - 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, - 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, - 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, - 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, - 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, - 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, - 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, - 290, 291, 292, 293 - ]) - -model = dict( - type='TopdownPoseEstimator', # 模型结构决定了算法流程 - data_preprocessor=dict( # 数据归一化和通道顺序调整,作为模型的一部分 - type='PoseDataPreprocessor', - mean=[123.675, 116.28, 103.53], - std=[58.395, 57.12, 57.375], - bgr_to_rgb=True), - backbone=dict( - type='ResNet', - depth=50, - init_cfg=dict( - type='Pretrained', # 预训练参数,只加载backbone权重用于迁移学习 - checkpoint='torchvision://resnet50')), - head=dict( # 模型头部 - type='HeatmapHead', - in_channels=2048, - out_channels=channel_cfg['num_output_channels'], - # deconv_out_channels=None, - loss=dict(type='KeypointMSELoss', use_target_weight=True), # 损失函数 - decoder=codec), # 解码器,将heatmap解码成坐标值 - test_cfg=dict( - flip_test=True, # 开启测试时水平翻转集成 - flip_mode='heatmap', # 对heatmap进行翻转 - shift_heatmap=True, # 对翻转后的结果进行平移提高精度 - )) - -val_evaluator = [ - dict(type='PCKAccuracy', thr=0.2), - dict(type='AUC'), - dict(type='EPE'), -] -test_evaluator = val_evaluator # 默认情况下不区分验证集和测试集,用户根据需要来自行定义 - -visualizer = dict( - vis_backends=[dict(type='LocalVisBackend'), - dict(type='WandbVisBackend')]) diff --git a/spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/_base_/models/resnest50.py b/spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/_base_/models/resnest50.py deleted file mode 100644 index 51c90e86f468edccc3de3b0e7cd783548d220db4..0000000000000000000000000000000000000000 --- a/spaces/ATang0729/Forecast4Muses/Model/Model6/Model6_2_ProfileRecogition/mmpretrain/configs/_base_/models/resnest50.py +++ /dev/null @@ -1,24 +0,0 @@ -# model settings -model = dict( - type='ImageClassifier', - backbone=dict( - type='ResNeSt', - depth=50, - num_stages=4, - out_indices=(3, ), - style='pytorch'), - neck=dict(type='GlobalAveragePooling'), - head=dict( - type='LinearClsHead', - num_classes=1000, - in_channels=2048, - loss=dict( - type='LabelSmoothLoss', - label_smooth_val=0.1, - num_classes=1000, - reduction='mean', - loss_weight=1.0), - topk=(1, 5), - cal_acc=False), - train_cfg=dict(augments=dict(type='Mixup', alpha=0.2)), -) diff --git a/spaces/AUST001/True-GPT4/app.py b/spaces/AUST001/True-GPT4/app.py deleted file mode 100644 index e5968d08cdb70fbf3caa1d2593820c9e5032ac3e..0000000000000000000000000000000000000000 --- a/spaces/AUST001/True-GPT4/app.py +++ /dev/null @@ -1,99 +0,0 @@ -from pickle import NONE -import numpy as np -import cv2 -import urllib.request -import openai -import gradio as gr -import random -import poe - -client = None -user_contexts = {} - -def get_assistant_response(user_question, context): - global client - context.append({"role": "user", "content": user_question}) - for chunk in client.send_message("beaver", context): # capybara - pass - # print(chunk["text"]) - assistant_response = chunk["text"] - context.append({"role": "assistant", "content": assistant_response}) - client.send_chat_break("beaver") # capybara - return assistant_response - -def generate_image_url(prompt): - response = openai.Image.create( - prompt=prompt, - n=1, # 生成1张图片 - size="512x512", # 图像大小 - ) - image_url = response["data"][0]["url"] - return image_url - -def greet(user_id, api_key, user_question, clear_history): - global client - if len(api_key)>5: - client = poe.Client(api_key) - global user_contexts - if user_id not in user_contexts: - user_contexts[user_id] = [ - {"role": "system", "content": "你是一个聪明的AI助手。请参考对话记录,回答用户的最后一个问题,无需做多余的解释,更不要强调对话历史的事情"}, - {"role": "user", "content": "你会说中文吗?"}, - {"role": "assistant", "content": "是的,我可以说中文。"} - ] - - context = user_contexts[user_id] - - if clear_history: - context = [ - {"role": "system", "content": "你是一个聪明的AI助手。请参考对话记录,回答用户的最后一个问题,无需做多余的解释,更不要强调对话历史的事情"}, - {"role": "user", "content": "你会说中文吗?"}, - {"role": "assistant", "content": "是的,我可以说中文。"} - ] - user_contexts[user_id] = context - return '清空成功', '保持聊天记录', np.ones((5,5)) - else: - # 如果user提问包含生成图像的特定指令(这里我们使用“生成图片:”作为示例) - if user_question.startswith("生成图片:") or user_question.startswith("生成图片:"): - image_prompt = user_question[5:] # 提取用于生成图片的文本 - image_url = generate_image_url(image_prompt) - resp = urllib.request.urlopen(image_url) - image = np.asarray(bytearray(resp.read()), dtype="uint8") - image = cv2.imdecode(image, cv2.IMREAD_COLOR) - image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) - # return image - return '', '图片已生成', image - get_assistant_response(user_question, context) - prompt = "" - - for item in context[3:]: - prompt += item["role"] + ": " + item["content"] + "\n" - return '', prompt, np.ones((5,5)) - -demo = gr.Interface( - fn=greet, - inputs=[ - gr.Textbox(lines=1, label='请输入用户ID', placeholder='请输入用户ID'), - gr.Textbox(lines=1, label='请输入你的专属密钥', placeholder='请输入你的专属密钥'), - gr.Textbox(lines=15, label='请输入问题', placeholder='请输入您的问题'), - gr.Checkbox(label='清空聊天记录', default=False) - ], - outputs=[ - gr.Textbox(lines=1, label='聊天记录状态', placeholder='等待清空聊天记录'), - gr.Textbox(lines=23, label='AI回答', placeholder='等待AI回答') - ], - title="True GPT4", - description=""" -1.使用说明: -请输入您的问题,AI助手会给出回答。 -支持连续对话,可以记录对话历史。 -重新开始对话勾选清空聊天记录,输出清空成功表示重新开启对话。 -2.特别警告: -为了防止用户数据混乱,请自定义用户ID。 -理论上如果被别人知道自己的ID,那么别人可以查看自己的历史对话,对此你可以选择在对话结束后清除对话记录。 -3.作者的GPT4网页导航网站链接如下:http://aust001.pythonanywhere.com/ -> 专属密钥进群获取 - """ -) - -if __name__ == "__main__": - demo.launch() \ No newline at end of file diff --git a/spaces/Acapellas/vocalinstrumentalremover/README.md b/spaces/Acapellas/vocalinstrumentalremover/README.md deleted file mode 100644 index 7356c6289837664d2f60ce646f599a5afa089980..0000000000000000000000000000000000000000 --- a/spaces/Acapellas/vocalinstrumentalremover/README.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: null -emoji: ⚡ -colorFrom: red -colorTo: gray -sdk: gradio -app_file: app.py -pinned: true -duplicated_from: null -python_version: 3.9.13 ---- - -# Configuration - -`title`: _string_ -Display title for the Space - -`emoji`: _string_ -Space emoji (emoji-only character allowed) - -`colorFrom`: _string_ -Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray) - -`colorTo`: _string_ -Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray) - -`sdk`: _string_ -Can be either `gradio` or `streamlit` - -`sdk_version` : _string_ -Only applicable for `streamlit` SDK. -See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions. - -`app_file`: _string_ -Path to your main application file (which contains either `gradio` or `streamlit` Python code). -Path is relative to the root of the repository. - -`pinned`: _boolean_ -Whether the Space stays on top of your list. \ No newline at end of file diff --git a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/plugins/toggleswitch.js b/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/plugins/toggleswitch.js deleted file mode 100644 index 145a30fed867f658b7aaec0c8fc47d9fb306af97..0000000000000000000000000000000000000000 --- a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/plugins/toggleswitch.js +++ /dev/null @@ -1,2 +0,0 @@ -import ToggleSwitch from './gameobjects/shape/toggleswitch/ToggleSwitch.js'; -export default ToggleSwitch; \ No newline at end of file diff --git a/spaces/Aishwini/myfirstaigen/README.md b/spaces/Aishwini/myfirstaigen/README.md deleted file mode 100644 index 01fbc692191a09ebba73ab28736e80be83eea188..0000000000000000000000000000000000000000 --- a/spaces/Aishwini/myfirstaigen/README.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Myfirstaigen -emoji: ⚡ -colorFrom: indigo -colorTo: purple -sdk: gradio -sdk_version: 3.39.0 -app_file: app.py -pinned: false ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Aki004/herta-so-vits/onnxexport/model_onnx.py b/spaces/Aki004/herta-so-vits/onnxexport/model_onnx.py deleted file mode 100644 index e28bae95ec1e53aa05d06fc784ff86d55f228d60..0000000000000000000000000000000000000000 --- a/spaces/Aki004/herta-so-vits/onnxexport/model_onnx.py +++ /dev/null @@ -1,335 +0,0 @@ -import torch -from torch import nn -from torch.nn import functional as F - -import modules.attentions as attentions -import modules.commons as commons -import modules.modules as modules - -from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d -from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm - -import utils -from modules.commons import init_weights, get_padding -from vdecoder.hifigan.models import Generator -from utils import f0_to_coarse - - -class ResidualCouplingBlock(nn.Module): - def __init__(self, - channels, - hidden_channels, - kernel_size, - dilation_rate, - n_layers, - n_flows=4, - gin_channels=0): - super().__init__() - self.channels = channels - self.hidden_channels = hidden_channels - self.kernel_size = kernel_size - self.dilation_rate = dilation_rate - self.n_layers = n_layers - self.n_flows = n_flows - self.gin_channels = gin_channels - - self.flows = nn.ModuleList() - for i in range(n_flows): - self.flows.append( - modules.ResidualCouplingLayer(channels, hidden_channels, kernel_size, dilation_rate, n_layers, - gin_channels=gin_channels, mean_only=True)) - self.flows.append(modules.Flip()) - - def forward(self, x, x_mask, g=None, reverse=False): - if not reverse: - for flow in self.flows: - x, _ = flow(x, x_mask, g=g, reverse=reverse) - else: - for flow in reversed(self.flows): - x = flow(x, x_mask, g=g, reverse=reverse) - return x - - -class Encoder(nn.Module): - def __init__(self, - in_channels, - out_channels, - hidden_channels, - kernel_size, - dilation_rate, - n_layers, - gin_channels=0): - super().__init__() - self.in_channels = in_channels - self.out_channels = out_channels - self.hidden_channels = hidden_channels - self.kernel_size = kernel_size - self.dilation_rate = dilation_rate - self.n_layers = n_layers - self.gin_channels = gin_channels - - self.pre = nn.Conv1d(in_channels, hidden_channels, 1) - self.enc = modules.WN(hidden_channels, kernel_size, dilation_rate, n_layers, gin_channels=gin_channels) - self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1) - - def forward(self, x, x_lengths, g=None): - # print(x.shape,x_lengths.shape) - x_mask = torch.unsqueeze(commons.sequence_mask(x_lengths, x.size(2)), 1).to(x.dtype) - x = self.pre(x) * x_mask - x = self.enc(x, x_mask, g=g) - stats = self.proj(x) * x_mask - m, logs = torch.split(stats, self.out_channels, dim=1) - z = (m + torch.randn_like(m) * torch.exp(logs)) * x_mask - return z, m, logs, x_mask - - -class TextEncoder(nn.Module): - def __init__(self, - out_channels, - hidden_channels, - kernel_size, - n_layers, - gin_channels=0, - filter_channels=None, - n_heads=None, - p_dropout=None): - super().__init__() - self.out_channels = out_channels - self.hidden_channels = hidden_channels - self.kernel_size = kernel_size - self.n_layers = n_layers - self.gin_channels = gin_channels - self.proj = nn.Conv1d(hidden_channels, out_channels * 2, 1) - self.f0_emb = nn.Embedding(256, hidden_channels) - - self.enc_ = attentions.Encoder( - hidden_channels, - filter_channels, - n_heads, - n_layers, - kernel_size, - p_dropout) - - def forward(self, x, x_mask, f0=None, z=None): - x = x + self.f0_emb(f0).transpose(1, 2) - x = self.enc_(x * x_mask, x_mask) - stats = self.proj(x) * x_mask - m, logs = torch.split(stats, self.out_channels, dim=1) - z = (m + z * torch.exp(logs)) * x_mask - return z, m, logs, x_mask - - -class DiscriminatorP(torch.nn.Module): - def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=False): - super(DiscriminatorP, self).__init__() - self.period = period - self.use_spectral_norm = use_spectral_norm - norm_f = weight_norm if use_spectral_norm == False else spectral_norm - self.convs = nn.ModuleList([ - norm_f(Conv2d(1, 32, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))), - norm_f(Conv2d(32, 128, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))), - norm_f(Conv2d(128, 512, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))), - norm_f(Conv2d(512, 1024, (kernel_size, 1), (stride, 1), padding=(get_padding(kernel_size, 1), 0))), - norm_f(Conv2d(1024, 1024, (kernel_size, 1), 1, padding=(get_padding(kernel_size, 1), 0))), - ]) - self.conv_post = norm_f(Conv2d(1024, 1, (3, 1), 1, padding=(1, 0))) - - def forward(self, x): - fmap = [] - - # 1d to 2d - b, c, t = x.shape - if t % self.period != 0: # pad first - n_pad = self.period - (t % self.period) - x = F.pad(x, (0, n_pad), "reflect") - t = t + n_pad - x = x.view(b, c, t // self.period, self.period) - - for l in self.convs: - x = l(x) - x = F.leaky_relu(x, modules.LRELU_SLOPE) - fmap.append(x) - x = self.conv_post(x) - fmap.append(x) - x = torch.flatten(x, 1, -1) - - return x, fmap - - -class DiscriminatorS(torch.nn.Module): - def __init__(self, use_spectral_norm=False): - super(DiscriminatorS, self).__init__() - norm_f = weight_norm if use_spectral_norm == False else spectral_norm - self.convs = nn.ModuleList([ - norm_f(Conv1d(1, 16, 15, 1, padding=7)), - norm_f(Conv1d(16, 64, 41, 4, groups=4, padding=20)), - norm_f(Conv1d(64, 256, 41, 4, groups=16, padding=20)), - norm_f(Conv1d(256, 1024, 41, 4, groups=64, padding=20)), - norm_f(Conv1d(1024, 1024, 41, 4, groups=256, padding=20)), - norm_f(Conv1d(1024, 1024, 5, 1, padding=2)), - ]) - self.conv_post = norm_f(Conv1d(1024, 1, 3, 1, padding=1)) - - def forward(self, x): - fmap = [] - - for l in self.convs: - x = l(x) - x = F.leaky_relu(x, modules.LRELU_SLOPE) - fmap.append(x) - x = self.conv_post(x) - fmap.append(x) - x = torch.flatten(x, 1, -1) - - return x, fmap - - -class F0Decoder(nn.Module): - def __init__(self, - out_channels, - hidden_channels, - filter_channels, - n_heads, - n_layers, - kernel_size, - p_dropout, - spk_channels=0): - super().__init__() - self.out_channels = out_channels - self.hidden_channels = hidden_channels - self.filter_channels = filter_channels - self.n_heads = n_heads - self.n_layers = n_layers - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.spk_channels = spk_channels - - self.prenet = nn.Conv1d(hidden_channels, hidden_channels, 3, padding=1) - self.decoder = attentions.FFT( - hidden_channels, - filter_channels, - n_heads, - n_layers, - kernel_size, - p_dropout) - self.proj = nn.Conv1d(hidden_channels, out_channels, 1) - self.f0_prenet = nn.Conv1d(1, hidden_channels, 3, padding=1) - self.cond = nn.Conv1d(spk_channels, hidden_channels, 1) - - def forward(self, x, norm_f0, x_mask, spk_emb=None): - x = torch.detach(x) - if spk_emb is not None: - x = x + self.cond(spk_emb) - x += self.f0_prenet(norm_f0) - x = self.prenet(x) * x_mask - x = self.decoder(x * x_mask, x_mask) - x = self.proj(x) * x_mask - return x - - -class SynthesizerTrn(nn.Module): - """ - Synthesizer for Training - """ - - def __init__(self, - spec_channels, - segment_size, - inter_channels, - hidden_channels, - filter_channels, - n_heads, - n_layers, - kernel_size, - p_dropout, - resblock, - resblock_kernel_sizes, - resblock_dilation_sizes, - upsample_rates, - upsample_initial_channel, - upsample_kernel_sizes, - gin_channels, - ssl_dim, - n_speakers, - sampling_rate=44100, - **kwargs): - super().__init__() - self.spec_channels = spec_channels - self.inter_channels = inter_channels - self.hidden_channels = hidden_channels - self.filter_channels = filter_channels - self.n_heads = n_heads - self.n_layers = n_layers - self.kernel_size = kernel_size - self.p_dropout = p_dropout - self.resblock = resblock - self.resblock_kernel_sizes = resblock_kernel_sizes - self.resblock_dilation_sizes = resblock_dilation_sizes - self.upsample_rates = upsample_rates - self.upsample_initial_channel = upsample_initial_channel - self.upsample_kernel_sizes = upsample_kernel_sizes - self.segment_size = segment_size - self.gin_channels = gin_channels - self.ssl_dim = ssl_dim - self.emb_g = nn.Embedding(n_speakers, gin_channels) - - self.pre = nn.Conv1d(ssl_dim, hidden_channels, kernel_size=5, padding=2) - - self.enc_p = TextEncoder( - inter_channels, - hidden_channels, - filter_channels=filter_channels, - n_heads=n_heads, - n_layers=n_layers, - kernel_size=kernel_size, - p_dropout=p_dropout - ) - hps = { - "sampling_rate": sampling_rate, - "inter_channels": inter_channels, - "resblock": resblock, - "resblock_kernel_sizes": resblock_kernel_sizes, - "resblock_dilation_sizes": resblock_dilation_sizes, - "upsample_rates": upsample_rates, - "upsample_initial_channel": upsample_initial_channel, - "upsample_kernel_sizes": upsample_kernel_sizes, - "gin_channels": gin_channels, - } - self.dec = Generator(h=hps) - self.enc_q = Encoder(spec_channels, inter_channels, hidden_channels, 5, 1, 16, gin_channels=gin_channels) - self.flow = ResidualCouplingBlock(inter_channels, hidden_channels, 5, 1, 4, gin_channels=gin_channels) - self.f0_decoder = F0Decoder( - 1, - hidden_channels, - filter_channels, - n_heads, - n_layers, - kernel_size, - p_dropout, - spk_channels=gin_channels - ) - self.emb_uv = nn.Embedding(2, hidden_channels) - self.predict_f0 = False - - def forward(self, c, f0, mel2ph, uv, noise=None, g=None): - - decoder_inp = F.pad(c, [0, 0, 1, 0]) - mel2ph_ = mel2ph.unsqueeze(2).repeat([1, 1, c.shape[-1]]) - c = torch.gather(decoder_inp, 1, mel2ph_).transpose(1, 2) # [B, T, H] - - c_lengths = (torch.ones(c.size(0)) * c.size(-1)).to(c.device) - g = g.unsqueeze(0) - g = self.emb_g(g).transpose(1, 2) - x_mask = torch.unsqueeze(commons.sequence_mask(c_lengths, c.size(2)), 1).to(c.dtype) - x = self.pre(c) * x_mask + self.emb_uv(uv.long()).transpose(1, 2) - - if self.predict_f0: - lf0 = 2595. * torch.log10(1. + f0.unsqueeze(1) / 700.) / 500 - norm_lf0 = utils.normalize_f0(lf0, x_mask, uv, random_scale=False) - pred_lf0 = self.f0_decoder(x, norm_lf0, x_mask, spk_emb=g) - f0 = (700 * (torch.pow(10, pred_lf0 * 500 / 2595) - 1)).squeeze(1) - - z_p, m_p, logs_p, c_mask = self.enc_p(x, x_mask, f0=f0_to_coarse(f0), z=noise) - z = self.flow(z_p, c_mask, g=g, reverse=True) - o = self.dec(z * c_mask, g=g, f0=f0) - return o diff --git a/spaces/Al-Chan/Vits_League_of_Legends_Yuumi_TTS/text/shanghainese.py b/spaces/Al-Chan/Vits_League_of_Legends_Yuumi_TTS/text/shanghainese.py deleted file mode 100644 index cb29c24a08d2e406e8399cf7bc9fe5cb43cb9c61..0000000000000000000000000000000000000000 --- a/spaces/Al-Chan/Vits_League_of_Legends_Yuumi_TTS/text/shanghainese.py +++ /dev/null @@ -1,64 +0,0 @@ -import re -import cn2an -import opencc - - -converter = opencc.OpenCC('zaonhe') - -# List of (Latin alphabet, ipa) pairs: -_latin_to_ipa = [(re.compile('%s' % x[0]), x[1]) for x in [ - ('A', 'ᴇ'), - ('B', 'bi'), - ('C', 'si'), - ('D', 'di'), - ('E', 'i'), - ('F', 'ᴇf'), - ('G', 'dʑi'), - ('H', 'ᴇtɕʰ'), - ('I', 'ᴀi'), - ('J', 'dʑᴇ'), - ('K', 'kʰᴇ'), - ('L', 'ᴇl'), - ('M', 'ᴇm'), - ('N', 'ᴇn'), - ('O', 'o'), - ('P', 'pʰi'), - ('Q', 'kʰiu'), - ('R', 'ᴀl'), - ('S', 'ᴇs'), - ('T', 'tʰi'), - ('U', 'ɦiu'), - ('V', 'vi'), - ('W', 'dᴀbɤliu'), - ('X', 'ᴇks'), - ('Y', 'uᴀi'), - ('Z', 'zᴇ') -]] - - -def _number_to_shanghainese(num): - num = cn2an.an2cn(num).replace('一十','十').replace('二十', '廿').replace('二', '两') - return re.sub(r'((?:^|[^三四五六七八九])十|廿)两', r'\1二', num) - - -def number_to_shanghainese(text): - return re.sub(r'\d+(?:\.?\d+)?', lambda x: _number_to_shanghainese(x.group()), text) - - -def latin_to_ipa(text): - for regex, replacement in _latin_to_ipa: - text = re.sub(regex, replacement, text) - return text - - -def shanghainese_to_ipa(text): - text = number_to_shanghainese(text.upper()) - text = converter.convert(text).replace('-','').replace('$',' ') - text = re.sub(r'[A-Z]', lambda x: latin_to_ipa(x.group())+' ', text) - text = re.sub(r'[、;:]', ',', text) - text = re.sub(r'\s*,\s*', ', ', text) - text = re.sub(r'\s*。\s*', '. ', text) - text = re.sub(r'\s*?\s*', '? ', text) - text = re.sub(r'\s*!\s*', '! ', text) - text = re.sub(r'\s*$', '', text) - return text diff --git a/spaces/Aloento/9Nine-PITS/text/paddle_zh.py b/spaces/Aloento/9Nine-PITS/text/paddle_zh.py deleted file mode 100644 index 6838855b263cb2e3c81b3d69d56949574cd73fbe..0000000000000000000000000000000000000000 --- a/spaces/Aloento/9Nine-PITS/text/paddle_zh.py +++ /dev/null @@ -1,115 +0,0 @@ -from text.frontend.zh_frontend import Frontend - -frontend = Frontend() - -pu_symbols = ['!', '?', '…', ",", "."] -replacements = [ - (u"yu", u"u:"), (u"ü", u"u:"), (u"v", u"u:"), - (u"yi", u"i"), (u"you", u"ㄧㄡ"), (u"y", u"i"), - (u"wu", u"u"), (u"wong", u"ㄨㄥ"), (u"w", u"u"), -] - -table = [ - # special cases - (u"ju", u"ㄐㄩ"), (u"qu", u"ㄑㄩ"), (u"xu", u"ㄒㄩ"), - (u"zhi", u"ㄓ"), (u"chi", u"ㄔ"), (u"shi", u"ㄕ"), (u"ri", u"ㄖ"), - (u"zi", u"ㄗ"), (u"ci", u"ㄘ"), (u"si", u"ㄙ"), - (u"r5", u"ㄦ"), - - # initials - (u"b", u"ㄅ"), (u"p", u"ㄆ"), (u"m", u"ㄇ"), (u"f", u"ㄈ"), - (u"d", u"ㄉ"), (u"t", u"ㄊ"), (u"n", u"ㄋ"), (u"l", u"ㄌ"), - (u"g", u"ㄍ"), (u"k", u"ㄎ"), (u"h", u"ㄏ"), - (u"j", u"ㄐ"), (u"q", u"ㄑ"), (u"x", u"ㄒ"), - (u"zh", u"ㄓ"), (u"ch", u"ㄔ"), (u"sh", u"ㄕ"), (u"r", u"ㄖ"), - (u"z", u"ㄗ"), (u"c", u"ㄘ"), (u"s", u"ㄙ"), - - # finals - (u"i", u"ㄧ"), (u"u", u"ㄨ"), (u"u:", u"ㄩ"), - (u"a", u"ㄚ"), (u"o", u"ㄛ"), (u"e", u"ㄜ"), (u"ê", u"ㄝ"), - (u"ai", u"ㄞ"), (u"ei", u"ㄟ"), (u"ao", u"ㄠ"), (u"ou", u"ㄡ"), - (u"an", u"ㄢ"), (u"en", u"ㄣ"), (u"ang", u"ㄤ"), (u"eng", u"ㄥ"), - (u"er", u"ㄦ"), - (u"ia", u"ㄧㄚ"), (u"io", u"ㄧㄛ"), (u"ie", u"ㄧㄝ"), (u"iai", u"ㄧㄞ"), - (u"iao", u"ㄧㄠ"), (u"iu", u"ㄧㄡ"), (u"ian", u"ㄧㄢ"), - (u"in", u"ㄧㄣ"), (u"iang", u"ㄧㄤ"), (u"ing", u"ㄧㄥ"), - (u"ua", u"ㄨㄚ"), (u"uo", u"ㄨㄛ"), (u"uai", u"ㄨㄞ"), - (u"ui", u"ㄨㄟ"), (u"uan", u"ㄨㄢ"), (u"un", u"ㄨㄣ"), - (u"uang", u"ㄨㄤ"), (u"ong", u"ㄨㄥ"), - (u"u:e", u"ㄩㄝ"), (u"u:an", u"ㄩㄢ"), (u"u:n", u"ㄩㄣ"), (u"iong", u"ㄩㄥ"), - - # tones - (u"1", u"ˉ"), (u"2", u"ˊ"), - (u"3", u"ˇ"), (u"4", u"ˋ"), - (u"5", u"˙"), -] - -table.sort(key=lambda pair: len(pair[0]), reverse=True) -replacements.extend(table) - -zh_dict = [i.strip() for i in open("text/zh_dict.dict").readlines()] -zh_dict = {i.split("\t")[0]: i.split("\t")[1] for i in zh_dict} - -reversed_zh_dict = {} -all_zh_phones = set() -for k, v in zh_dict.items(): - reversed_zh_dict[v] = k - [all_zh_phones.add(i) for i in v.split(" ")] - - -def bopomofo(pinyin): - """ - Convert a pinyin string to Bopomofo - The optional tone info must be given as a number suffix, eg: 'ni3' - """ - - pinyin = pinyin.lower() - for pair in replacements: - pinyin = pinyin.replace(pair[0], pair[1]) - - return pinyin - - -def phones_to_pinyins(phones): - pinyins = '' - accu_ph = [] - for ph in phones: - accu_ph.append(ph) - if ph not in all_zh_phones: - assert len(accu_ph) == 1 - pinyins += ph - accu_ph = [] - elif " ".join(accu_ph) in reversed_zh_dict.keys(): - pinyins += " " + reversed_zh_dict[" ".join(accu_ph)] - accu_ph = [] - if not accu_ph == []: - print(accu_ph) - return pinyins.strip() - - -def pu_symbol_replace(data): - chinaTab = ['!', '?', "…", ",", "。", '、', "..."] - englishTab = ['!', '?', "…", ",", ".", ",", "…"] - for index in range(len(chinaTab)): - if chinaTab[index] in data: - data = data.replace(chinaTab[index], englishTab[index]) - return data - - -def zh_to_bopomofo(text): - phones = zh_to_phonemes(text) - pinyins = phones_to_pinyins(phones) - bopomofos = bopomofo(pinyins) - return bopomofos.replace(" ", "").replace("#", " ") - - -def pinyin_to_bopomofo(pinyin): - bopomofos = bopomofo(pinyin) - return bopomofos.replace(" ", "").replace("#", " ").replace("%", "% ") - - -def zh_to_phonemes(text): - # 替换标点为英文标点 - text = pu_symbol_replace(text) - phones = frontend.get_phonemes(text)[0] - return phones diff --git a/spaces/Alycer/VITS-Umamusume-voice-synthesizer/data_utils.py b/spaces/Alycer/VITS-Umamusume-voice-synthesizer/data_utils.py deleted file mode 100644 index e9246c6c8f2ff3c37a7f8529ea1593c7f80f887e..0000000000000000000000000000000000000000 --- a/spaces/Alycer/VITS-Umamusume-voice-synthesizer/data_utils.py +++ /dev/null @@ -1,393 +0,0 @@ -import time -import os -import random -import numpy as np -import torch -import torch.utils.data - -import commons -from mel_processing import spectrogram_torch -from utils import load_wav_to_torch, load_filepaths_and_text -from text import text_to_sequence, cleaned_text_to_sequence - - -class TextAudioLoader(torch.utils.data.Dataset): - """ - 1) loads audio, text pairs - 2) normalizes text and converts them to sequences of integers - 3) computes spectrograms from audio files. - """ - def __init__(self, audiopaths_and_text, hparams): - self.audiopaths_and_text = load_filepaths_and_text(audiopaths_and_text) - self.text_cleaners = hparams.text_cleaners - self.max_wav_value = hparams.max_wav_value - self.sampling_rate = hparams.sampling_rate - self.filter_length = hparams.filter_length - self.hop_length = hparams.hop_length - self.win_length = hparams.win_length - self.sampling_rate = hparams.sampling_rate - - self.cleaned_text = getattr(hparams, "cleaned_text", False) - - self.add_blank = hparams.add_blank - self.min_text_len = getattr(hparams, "min_text_len", 1) - self.max_text_len = getattr(hparams, "max_text_len", 190) - - random.seed(1234) - random.shuffle(self.audiopaths_and_text) - self._filter() - - - def _filter(self): - """ - Filter text & store spec lengths - """ - # Store spectrogram lengths for Bucketing - # wav_length ~= file_size / (wav_channels * Bytes per dim) = file_size / (1 * 2) - # spec_length = wav_length // hop_length - - audiopaths_and_text_new = [] - lengths = [] - for audiopath, text in self.audiopaths_and_text: - if self.min_text_len <= len(text) and len(text) <= self.max_text_len: - audiopaths_and_text_new.append([audiopath, text]) - lengths.append(os.path.getsize(audiopath) // (2 * self.hop_length)) - self.audiopaths_and_text = audiopaths_and_text_new - self.lengths = lengths - - def get_audio_text_pair(self, audiopath_and_text): - # separate filename and text - audiopath, text = audiopath_and_text[0], audiopath_and_text[1] - text = self.get_text(text) - spec, wav = self.get_audio(audiopath) - return (text, spec, wav) - - def get_audio(self, filename): - audio, sampling_rate = load_wav_to_torch(filename) - if sampling_rate != self.sampling_rate: - raise ValueError("{} {} SR doesn't match target {} SR".format( - sampling_rate, self.sampling_rate)) - audio_norm = audio / self.max_wav_value - audio_norm = audio_norm.unsqueeze(0) - spec_filename = filename.replace(".wav", ".spec.pt") - if os.path.exists(spec_filename): - spec = torch.load(spec_filename) - else: - spec = spectrogram_torch(audio_norm, self.filter_length, - self.sampling_rate, self.hop_length, self.win_length, - center=False) - spec = torch.squeeze(spec, 0) - torch.save(spec, spec_filename) - return spec, audio_norm - - def get_text(self, text): - if self.cleaned_text: - text_norm = cleaned_text_to_sequence(text) - else: - text_norm = text_to_sequence(text, self.text_cleaners) - if self.add_blank: - text_norm = commons.intersperse(text_norm, 0) - text_norm = torch.LongTensor(text_norm) - return text_norm - - def __getitem__(self, index): - return self.get_audio_text_pair(self.audiopaths_and_text[index]) - - def __len__(self): - return len(self.audiopaths_and_text) - - -class TextAudioCollate(): - """ Zero-pads model inputs and targets - """ - def __init__(self, return_ids=False): - self.return_ids = return_ids - - def __call__(self, batch): - """Collate's training batch from normalized text and aduio - PARAMS - ------ - batch: [text_normalized, spec_normalized, wav_normalized] - """ - # Right zero-pad all one-hot text sequences to max input length - _, ids_sorted_decreasing = torch.sort( - torch.LongTensor([x[1].size(1) for x in batch]), - dim=0, descending=True) - - max_text_len = max([len(x[0]) for x in batch]) - max_spec_len = max([x[1].size(1) for x in batch]) - max_wav_len = max([x[2].size(1) for x in batch]) - - text_lengths = torch.LongTensor(len(batch)) - spec_lengths = torch.LongTensor(len(batch)) - wav_lengths = torch.LongTensor(len(batch)) - - text_padded = torch.LongTensor(len(batch), max_text_len) - spec_padded = torch.FloatTensor(len(batch), batch[0][1].size(0), max_spec_len) - wav_padded = torch.FloatTensor(len(batch), 1, max_wav_len) - text_padded.zero_() - spec_padded.zero_() - wav_padded.zero_() - for i in range(len(ids_sorted_decreasing)): - row = batch[ids_sorted_decreasing[i]] - - text = row[0] - text_padded[i, :text.size(0)] = text - text_lengths[i] = text.size(0) - - spec = row[1] - spec_padded[i, :, :spec.size(1)] = spec - spec_lengths[i] = spec.size(1) - - wav = row[2] - wav_padded[i, :, :wav.size(1)] = wav - wav_lengths[i] = wav.size(1) - - if self.return_ids: - return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths, ids_sorted_decreasing - return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths - - -"""Multi speaker version""" -class TextAudioSpeakerLoader(torch.utils.data.Dataset): - """ - 1) loads audio, speaker_id, text pairs - 2) normalizes text and converts them to sequences of integers - 3) computes spectrograms from audio files. - """ - def __init__(self, audiopaths_sid_text, hparams): - self.audiopaths_sid_text = load_filepaths_and_text(audiopaths_sid_text) - self.text_cleaners = hparams.text_cleaners - self.max_wav_value = hparams.max_wav_value - self.sampling_rate = hparams.sampling_rate - self.filter_length = hparams.filter_length - self.hop_length = hparams.hop_length - self.win_length = hparams.win_length - self.sampling_rate = hparams.sampling_rate - - self.cleaned_text = getattr(hparams, "cleaned_text", False) - - self.add_blank = hparams.add_blank - self.min_text_len = getattr(hparams, "min_text_len", 1) - self.max_text_len = getattr(hparams, "max_text_len", 190) - - random.seed(1234) - random.shuffle(self.audiopaths_sid_text) - self._filter() - - def _filter(self): - """ - Filter text & store spec lengths - """ - # Store spectrogram lengths for Bucketing - # wav_length ~= file_size / (wav_channels * Bytes per dim) = file_size / (1 * 2) - # spec_length = wav_length // hop_length - - audiopaths_sid_text_new = [] - lengths = [] - for audiopath, sid, text in self.audiopaths_sid_text: - audiopath = "E:/uma_voice/" + audiopath - if self.min_text_len <= len(text) and len(text) <= self.max_text_len: - audiopaths_sid_text_new.append([audiopath, sid, text]) - lengths.append(os.path.getsize(audiopath) // (2 * self.hop_length)) - self.audiopaths_sid_text = audiopaths_sid_text_new - self.lengths = lengths - - def get_audio_text_speaker_pair(self, audiopath_sid_text): - # separate filename, speaker_id and text - audiopath, sid, text = audiopath_sid_text[0], audiopath_sid_text[1], audiopath_sid_text[2] - text = self.get_text(text) - spec, wav = self.get_audio(audiopath) - sid = self.get_sid(sid) - return (text, spec, wav, sid) - - def get_audio(self, filename): - audio, sampling_rate = load_wav_to_torch(filename) - if sampling_rate != self.sampling_rate: - raise ValueError("{} {} SR doesn't match target {} SR".format( - sampling_rate, self.sampling_rate)) - audio_norm = audio / self.max_wav_value - audio_norm = audio_norm.unsqueeze(0) - spec_filename = filename.replace(".wav", ".spec.pt") - if os.path.exists(spec_filename): - spec = torch.load(spec_filename) - else: - spec = spectrogram_torch(audio_norm, self.filter_length, - self.sampling_rate, self.hop_length, self.win_length, - center=False) - spec = torch.squeeze(spec, 0) - torch.save(spec, spec_filename) - return spec, audio_norm - - def get_text(self, text): - if self.cleaned_text: - text_norm = cleaned_text_to_sequence(text) - else: - text_norm = text_to_sequence(text, self.text_cleaners) - if self.add_blank: - text_norm = commons.intersperse(text_norm, 0) - text_norm = torch.LongTensor(text_norm) - return text_norm - - def get_sid(self, sid): - sid = torch.LongTensor([int(sid)]) - return sid - - def __getitem__(self, index): - return self.get_audio_text_speaker_pair(self.audiopaths_sid_text[index]) - - def __len__(self): - return len(self.audiopaths_sid_text) - - -class TextAudioSpeakerCollate(): - """ Zero-pads model inputs and targets - """ - def __init__(self, return_ids=False): - self.return_ids = return_ids - - def __call__(self, batch): - """Collate's training batch from normalized text, audio and speaker identities - PARAMS - ------ - batch: [text_normalized, spec_normalized, wav_normalized, sid] - """ - # Right zero-pad all one-hot text sequences to max input length - _, ids_sorted_decreasing = torch.sort( - torch.LongTensor([x[1].size(1) for x in batch]), - dim=0, descending=True) - - max_text_len = max([len(x[0]) for x in batch]) - max_spec_len = max([x[1].size(1) for x in batch]) - max_wav_len = max([x[2].size(1) for x in batch]) - - text_lengths = torch.LongTensor(len(batch)) - spec_lengths = torch.LongTensor(len(batch)) - wav_lengths = torch.LongTensor(len(batch)) - sid = torch.LongTensor(len(batch)) - - text_padded = torch.LongTensor(len(batch), max_text_len) - spec_padded = torch.FloatTensor(len(batch), batch[0][1].size(0), max_spec_len) - wav_padded = torch.FloatTensor(len(batch), 1, max_wav_len) - text_padded.zero_() - spec_padded.zero_() - wav_padded.zero_() - for i in range(len(ids_sorted_decreasing)): - row = batch[ids_sorted_decreasing[i]] - - text = row[0] - text_padded[i, :text.size(0)] = text - text_lengths[i] = text.size(0) - - spec = row[1] - spec_padded[i, :, :spec.size(1)] = spec - spec_lengths[i] = spec.size(1) - - wav = row[2] - wav_padded[i, :, :wav.size(1)] = wav - wav_lengths[i] = wav.size(1) - - sid[i] = row[3] - - if self.return_ids: - return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths, sid, ids_sorted_decreasing - return text_padded, text_lengths, spec_padded, spec_lengths, wav_padded, wav_lengths, sid - - -class DistributedBucketSampler(torch.utils.data.distributed.DistributedSampler): - """ - Maintain similar input lengths in a batch. - Length groups are specified by boundaries. - Ex) boundaries = [b1, b2, b3] -> any batch is included either {x | b1 < length(x) <=b2} or {x | b2 < length(x) <= b3}. - - It removes samples which are not included in the boundaries. - Ex) boundaries = [b1, b2, b3] -> any x s.t. length(x) <= b1 or length(x) > b3 are discarded. - """ - def __init__(self, dataset, batch_size, boundaries, num_replicas=None, rank=None, shuffle=True): - super().__init__(dataset, num_replicas=num_replicas, rank=rank, shuffle=shuffle) - self.lengths = dataset.lengths - self.batch_size = batch_size - self.boundaries = boundaries - - self.buckets, self.num_samples_per_bucket = self._create_buckets() - self.total_size = sum(self.num_samples_per_bucket) - self.num_samples = self.total_size // self.num_replicas - - def _create_buckets(self): - buckets = [[] for _ in range(len(self.boundaries) - 1)] - for i in range(len(self.lengths)): - length = self.lengths[i] - idx_bucket = self._bisect(length) - if idx_bucket != -1: - buckets[idx_bucket].append(i) - - for i in range(len(buckets) - 1, 0, -1): - if len(buckets[i]) == 0: - buckets.pop(i) - self.boundaries.pop(i+1) - - num_samples_per_bucket = [] - for i in range(len(buckets)): - len_bucket = len(buckets[i]) - total_batch_size = self.num_replicas * self.batch_size - rem = (total_batch_size - (len_bucket % total_batch_size)) % total_batch_size - num_samples_per_bucket.append(len_bucket + rem) - return buckets, num_samples_per_bucket - - def __iter__(self): - # deterministically shuffle based on epoch - g = torch.Generator() - g.manual_seed(self.epoch) - - indices = [] - if self.shuffle: - for bucket in self.buckets: - indices.append(torch.randperm(len(bucket), generator=g).tolist()) - else: - for bucket in self.buckets: - indices.append(list(range(len(bucket)))) - - batches = [] - for i in range(len(self.buckets)): - bucket = self.buckets[i] - len_bucket = len(bucket) - ids_bucket = indices[i] - num_samples_bucket = self.num_samples_per_bucket[i] - - # add extra samples to make it evenly divisible - rem = num_samples_bucket - len_bucket - ids_bucket = ids_bucket + ids_bucket * (rem // len_bucket) + ids_bucket[:(rem % len_bucket)] - - # subsample - ids_bucket = ids_bucket[self.rank::self.num_replicas] - - # batching - for j in range(len(ids_bucket) // self.batch_size): - batch = [bucket[idx] for idx in ids_bucket[j*self.batch_size:(j+1)*self.batch_size]] - batches.append(batch) - - if self.shuffle: - batch_ids = torch.randperm(len(batches), generator=g).tolist() - batches = [batches[i] for i in batch_ids] - self.batches = batches - - assert len(self.batches) * self.batch_size == self.num_samples - return iter(self.batches) - - def _bisect(self, x, lo=0, hi=None): - if hi is None: - hi = len(self.boundaries) - 1 - - if hi > lo: - mid = (hi + lo) // 2 - if self.boundaries[mid] < x and x <= self.boundaries[mid+1]: - return mid - elif x <= self.boundaries[mid]: - return self._bisect(x, lo, mid) - else: - return self._bisect(x, mid + 1, hi) - else: - return -1 - - def __len__(self): - return self.num_samples // self.batch_size diff --git a/spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py b/spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py deleted file mode 100644 index 83cb37dc1e35caa65fa69fcedb2c9c83c61681f2..0000000000000000000000000000000000000000 --- a/spaces/Androidonnxfork/CivitAi-to-Diffusers/diffusers/src/diffusers/pipelines/consistency_models/pipeline_consistency_models.py +++ /dev/null @@ -1,290 +0,0 @@ -from typing import Callable, List, Optional, Union - -import torch - -from ...models import UNet2DModel -from ...schedulers import CMStochasticIterativeScheduler -from ...utils import ( - is_accelerate_available, - is_accelerate_version, - logging, - randn_tensor, - replace_example_docstring, -) -from ..pipeline_utils import DiffusionPipeline, ImagePipelineOutput - - -logger = logging.get_logger(__name__) # pylint: disable=invalid-name - - -EXAMPLE_DOC_STRING = """ - Examples: - ```py - >>> import torch - - >>> from diffusers import ConsistencyModelPipeline - - >>> device = "cuda" - >>> # Load the cd_imagenet64_l2 checkpoint. - >>> model_id_or_path = "openai/diffusers-cd_imagenet64_l2" - >>> pipe = ConsistencyModelPipeline.from_pretrained(model_id_or_path, torch_dtype=torch.float16) - >>> pipe.to(device) - - >>> # Onestep Sampling - >>> image = pipe(num_inference_steps=1).images[0] - >>> image.save("cd_imagenet64_l2_onestep_sample.png") - - >>> # Onestep sampling, class-conditional image generation - >>> # ImageNet-64 class label 145 corresponds to king penguins - >>> image = pipe(num_inference_steps=1, class_labels=145).images[0] - >>> image.save("cd_imagenet64_l2_onestep_sample_penguin.png") - - >>> # Multistep sampling, class-conditional image generation - >>> # Timesteps can be explicitly specified; the particular timesteps below are from the original Github repo: - >>> # https://github.com/openai/consistency_models/blob/main/scripts/launch.sh#L77 - >>> image = pipe(num_inference_steps=None, timesteps=[22, 0], class_labels=145).images[0] - >>> image.save("cd_imagenet64_l2_multistep_sample_penguin.png") - ``` -""" - - -class ConsistencyModelPipeline(DiffusionPipeline): - r""" - Pipeline for unconditional or class-conditional image generation. - - This model inherits from [`DiffusionPipeline`]. Check the superclass documentation for the generic methods - implemented for all pipelines (downloading, saving, running on a particular device, etc.). - - Args: - unet ([`UNet2DModel`]): - A `UNet2DModel` to denoise the encoded image latents. - scheduler ([`SchedulerMixin`]): - A scheduler to be used in combination with `unet` to denoise the encoded image latents. Currently only - compatible with [`CMStochasticIterativeScheduler`]. - """ - - def __init__(self, unet: UNet2DModel, scheduler: CMStochasticIterativeScheduler) -> None: - super().__init__() - - self.register_modules( - unet=unet, - scheduler=scheduler, - ) - - self.safety_checker = None - - def enable_model_cpu_offload(self, gpu_id=0): - r""" - Offload all models to CPU to reduce memory usage with a low impact on performance. Moves one whole model at a - time to the GPU when its `forward` method is called, and the model remains in GPU until the next model runs. - Memory savings are lower than using `enable_sequential_cpu_offload`, but performance is much better due to the - iterative execution of the `unet`. - """ - if is_accelerate_available() and is_accelerate_version(">=", "0.17.0.dev0"): - from accelerate import cpu_offload_with_hook - else: - raise ImportError("`enable_model_cpu_offload` requires `accelerate v0.17.0` or higher.") - - device = torch.device(f"cuda:{gpu_id}") - - if self.device.type != "cpu": - self.to("cpu", silence_dtype_warnings=True) - torch.cuda.empty_cache() # otherwise we don't see the memory savings (but they probably exist) - - hook = None - for cpu_offloaded_model in [self.unet]: - _, hook = cpu_offload_with_hook(cpu_offloaded_model, device, prev_module_hook=hook) - - if self.safety_checker is not None: - _, hook = cpu_offload_with_hook(self.safety_checker, device, prev_module_hook=hook) - - # We'll offload the last model manually. - self.final_offload_hook = hook - - def prepare_latents(self, batch_size, num_channels, height, width, dtype, device, generator, latents=None): - shape = (batch_size, num_channels, height, width) - if isinstance(generator, list) and len(generator) != batch_size: - raise ValueError( - f"You have passed a list of generators of length {len(generator)}, but requested an effective batch" - f" size of {batch_size}. Make sure the batch size matches the length of the generators." - ) - - if latents is None: - latents = randn_tensor(shape, generator=generator, device=device, dtype=dtype) - else: - latents = latents.to(device=device, dtype=dtype) - - # scale the initial noise by the standard deviation required by the scheduler - latents = latents * self.scheduler.init_noise_sigma - return latents - - # Follows diffusers.VaeImageProcessor.postprocess - def postprocess_image(self, sample: torch.FloatTensor, output_type: str = "pil"): - if output_type not in ["pt", "np", "pil"]: - raise ValueError( - f"output_type={output_type} is not supported. Make sure to choose one of ['pt', 'np', or 'pil']" - ) - - # Equivalent to diffusers.VaeImageProcessor.denormalize - sample = (sample / 2 + 0.5).clamp(0, 1) - if output_type == "pt": - return sample - - # Equivalent to diffusers.VaeImageProcessor.pt_to_numpy - sample = sample.cpu().permute(0, 2, 3, 1).numpy() - if output_type == "np": - return sample - - # Output_type must be 'pil' - sample = self.numpy_to_pil(sample) - return sample - - def prepare_class_labels(self, batch_size, device, class_labels=None): - if self.unet.config.num_class_embeds is not None: - if isinstance(class_labels, list): - class_labels = torch.tensor(class_labels, dtype=torch.int) - elif isinstance(class_labels, int): - assert batch_size == 1, "Batch size must be 1 if classes is an int" - class_labels = torch.tensor([class_labels], dtype=torch.int) - elif class_labels is None: - # Randomly generate batch_size class labels - # TODO: should use generator here? int analogue of randn_tensor is not exposed in ...utils - class_labels = torch.randint(0, self.unet.config.num_class_embeds, size=(batch_size,)) - class_labels = class_labels.to(device) - else: - class_labels = None - return class_labels - - def check_inputs(self, num_inference_steps, timesteps, latents, batch_size, img_size, callback_steps): - if num_inference_steps is None and timesteps is None: - raise ValueError("Exactly one of `num_inference_steps` or `timesteps` must be supplied.") - - if num_inference_steps is not None and timesteps is not None: - logger.warning( - f"Both `num_inference_steps`: {num_inference_steps} and `timesteps`: {timesteps} are supplied;" - " `timesteps` will be used over `num_inference_steps`." - ) - - if latents is not None: - expected_shape = (batch_size, 3, img_size, img_size) - if latents.shape != expected_shape: - raise ValueError(f"The shape of latents is {latents.shape} but is expected to be {expected_shape}.") - - if (callback_steps is None) or ( - callback_steps is not None and (not isinstance(callback_steps, int) or callback_steps <= 0) - ): - raise ValueError( - f"`callback_steps` has to be a positive integer but is {callback_steps} of type" - f" {type(callback_steps)}." - ) - - @torch.no_grad() - @replace_example_docstring(EXAMPLE_DOC_STRING) - def __call__( - self, - batch_size: int = 1, - class_labels: Optional[Union[torch.Tensor, List[int], int]] = None, - num_inference_steps: int = 1, - timesteps: List[int] = None, - generator: Optional[Union[torch.Generator, List[torch.Generator]]] = None, - latents: Optional[torch.FloatTensor] = None, - output_type: Optional[str] = "pil", - return_dict: bool = True, - callback: Optional[Callable[[int, int, torch.FloatTensor], None]] = None, - callback_steps: int = 1, - ): - r""" - Args: - batch_size (`int`, *optional*, defaults to 1): - The number of images to generate. - class_labels (`torch.Tensor` or `List[int]` or `int`, *optional*): - Optional class labels for conditioning class-conditional consistency models. Not used if the model is - not class-conditional. - num_inference_steps (`int`, *optional*, defaults to 1): - The number of denoising steps. More denoising steps usually lead to a higher quality image at the - expense of slower inference. - timesteps (`List[int]`, *optional*): - Custom timesteps to use for the denoising process. If not defined, equal spaced `num_inference_steps` - timesteps are used. Must be in descending order. - generator (`torch.Generator`, *optional*): - A [`torch.Generator`](https://pytorch.org/docs/stable/generated/torch.Generator.html) to make - generation deterministic. - latents (`torch.FloatTensor`, *optional*): - Pre-generated noisy latents sampled from a Gaussian distribution, to be used as inputs for image - generation. Can be used to tweak the same generation with different prompts. If not provided, a latents - tensor is generated by sampling using the supplied random `generator`. - output_type (`str`, *optional*, defaults to `"pil"`): - The output format of the generated image. Choose between `PIL.Image` or `np.array`. - return_dict (`bool`, *optional*, defaults to `True`): - Whether or not to return a [`~pipelines.ImagePipelineOutput`] instead of a plain tuple. - callback (`Callable`, *optional*): - A function that calls every `callback_steps` steps during inference. The function is called with the - following arguments: `callback(step: int, timestep: int, latents: torch.FloatTensor)`. - callback_steps (`int`, *optional*, defaults to 1): - The frequency at which the `callback` function is called. If not specified, the callback is called at - every step. - - Examples: - - Returns: - [`~pipelines.ImagePipelineOutput`] or `tuple`: - If `return_dict` is `True`, [`~pipelines.ImagePipelineOutput`] is returned, otherwise a `tuple` is - returned where the first element is a list with the generated images. - """ - # 0. Prepare call parameters - img_size = self.unet.config.sample_size - device = self._execution_device - - # 1. Check inputs - self.check_inputs(num_inference_steps, timesteps, latents, batch_size, img_size, callback_steps) - - # 2. Prepare image latents - # Sample image latents x_0 ~ N(0, sigma_0^2 * I) - sample = self.prepare_latents( - batch_size=batch_size, - num_channels=self.unet.config.in_channels, - height=img_size, - width=img_size, - dtype=self.unet.dtype, - device=device, - generator=generator, - latents=latents, - ) - - # 3. Handle class_labels for class-conditional models - class_labels = self.prepare_class_labels(batch_size, device, class_labels=class_labels) - - # 4. Prepare timesteps - if timesteps is not None: - self.scheduler.set_timesteps(timesteps=timesteps, device=device) - timesteps = self.scheduler.timesteps - num_inference_steps = len(timesteps) - else: - self.scheduler.set_timesteps(num_inference_steps) - timesteps = self.scheduler.timesteps - - # 5. Denoising loop - # Multistep sampling: implements Algorithm 1 in the paper - with self.progress_bar(total=num_inference_steps) as progress_bar: - for i, t in enumerate(timesteps): - scaled_sample = self.scheduler.scale_model_input(sample, t) - model_output = self.unet(scaled_sample, t, class_labels=class_labels, return_dict=False)[0] - - sample = self.scheduler.step(model_output, t, sample, generator=generator)[0] - - # call the callback, if provided - progress_bar.update() - if callback is not None and i % callback_steps == 0: - callback(i, t, sample) - - # 6. Post-process image sample - image = self.postprocess_image(sample, output_type=output_type) - - # Offload last model to CPU - if hasattr(self, "final_offload_hook") and self.final_offload_hook is not None: - self.final_offload_hook.offload() - - if not return_dict: - return (image,) - - return ImagePipelineOutput(images=image) diff --git a/spaces/Andy1621/uniformer_image_detection/configs/_base_/models/cascade_mask_rcnn_uniformer_fpn.py b/spaces/Andy1621/uniformer_image_detection/configs/_base_/models/cascade_mask_rcnn_uniformer_fpn.py deleted file mode 100644 index 18678e98f24dfa9f6c2c4a753308d6eecd308124..0000000000000000000000000000000000000000 --- a/spaces/Andy1621/uniformer_image_detection/configs/_base_/models/cascade_mask_rcnn_uniformer_fpn.py +++ /dev/null @@ -1,201 +0,0 @@ -# model settings -model = dict( - type='CascadeRCNN', - pretrained=None, - backbone=dict( - type='UniFormer', - embed_dim=[64, 128, 320, 512], - layers=[3, 4, 8, 3], - head_dim=64, - mlp_ratio=4., - qkv_bias=True, - drop_rate=0., - attn_drop_rate=0., - drop_path_rate=0.2), - neck=dict( - type='FPN', - in_channels=[64, 128, 320, 512], - out_channels=256, - num_outs=5), - rpn_head=dict( - type='RPNHead', - in_channels=256, - feat_channels=256, - anchor_generator=dict( - type='AnchorGenerator', - scales=[8], - ratios=[0.5, 1.0, 2.0], - strides=[4, 8, 16, 32, 64]), - bbox_coder=dict( - type='DeltaXYWHBBoxCoder', - target_means=[.0, .0, .0, .0], - target_stds=[1.0, 1.0, 1.0, 1.0]), - loss_cls=dict( - type='CrossEntropyLoss', use_sigmoid=True, loss_weight=1.0), - loss_bbox=dict(type='SmoothL1Loss', beta=1.0 / 9.0, loss_weight=1.0)), - roi_head=dict( - type='CascadeRoIHead', - num_stages=3, - stage_loss_weights=[1, 0.5, 0.25], - bbox_roi_extractor=dict( - type='SingleRoIExtractor', - roi_layer=dict(type='RoIAlign', output_size=7, sampling_ratio=0), - out_channels=256, - featmap_strides=[4, 8, 16, 32]), - bbox_head=[ - dict( - type='Shared2FCBBoxHead', - in_channels=256, - fc_out_channels=1024, - roi_feat_size=7, - num_classes=80, - bbox_coder=dict( - type='DeltaXYWHBBoxCoder', - target_means=[0., 0., 0., 0.], - target_stds=[0.1, 0.1, 0.2, 0.2]), - reg_class_agnostic=True, - loss_cls=dict( - type='CrossEntropyLoss', - use_sigmoid=False, - loss_weight=1.0), - loss_bbox=dict(type='SmoothL1Loss', beta=1.0, - loss_weight=1.0)), - dict( - type='Shared2FCBBoxHead', - in_channels=256, - fc_out_channels=1024, - roi_feat_size=7, - num_classes=80, - bbox_coder=dict( - type='DeltaXYWHBBoxCoder', - target_means=[0., 0., 0., 0.], - target_stds=[0.05, 0.05, 0.1, 0.1]), - reg_class_agnostic=True, - loss_cls=dict( - type='CrossEntropyLoss', - use_sigmoid=False, - loss_weight=1.0), - loss_bbox=dict(type='SmoothL1Loss', beta=1.0, - loss_weight=1.0)), - dict( - type='Shared2FCBBoxHead', - in_channels=256, - fc_out_channels=1024, - roi_feat_size=7, - num_classes=80, - bbox_coder=dict( - type='DeltaXYWHBBoxCoder', - target_means=[0., 0., 0., 0.], - target_stds=[0.033, 0.033, 0.067, 0.067]), - reg_class_agnostic=True, - loss_cls=dict( - type='CrossEntropyLoss', - use_sigmoid=False, - loss_weight=1.0), - loss_bbox=dict(type='SmoothL1Loss', beta=1.0, loss_weight=1.0)) - ], - mask_roi_extractor=dict( - type='SingleRoIExtractor', - roi_layer=dict(type='RoIAlign', output_size=14, sampling_ratio=0), - out_channels=256, - featmap_strides=[4, 8, 16, 32]), - mask_head=dict( - type='FCNMaskHead', - num_convs=4, - in_channels=256, - conv_out_channels=256, - num_classes=80, - loss_mask=dict( - type='CrossEntropyLoss', use_mask=True, loss_weight=1.0))), - # model training and testing settings - train_cfg = dict( - rpn=dict( - assigner=dict( - type='MaxIoUAssigner', - pos_iou_thr=0.7, - neg_iou_thr=0.3, - min_pos_iou=0.3, - match_low_quality=True, - ignore_iof_thr=-1), - sampler=dict( - type='RandomSampler', - num=256, - pos_fraction=0.5, - neg_pos_ub=-1, - add_gt_as_proposals=False), - allowed_border=0, - pos_weight=-1, - debug=False), - rpn_proposal=dict( - nms_across_levels=False, - nms_pre=2000, - nms_post=2000, - max_per_img=2000, - nms=dict(type='nms', iou_threshold=0.7), - min_bbox_size=0), - rcnn=[ - dict( - assigner=dict( - type='MaxIoUAssigner', - pos_iou_thr=0.5, - neg_iou_thr=0.5, - min_pos_iou=0.5, - match_low_quality=False, - ignore_iof_thr=-1), - sampler=dict( - type='RandomSampler', - num=512, - pos_fraction=0.25, - neg_pos_ub=-1, - add_gt_as_proposals=True), - mask_size=28, - pos_weight=-1, - debug=False), - dict( - assigner=dict( - type='MaxIoUAssigner', - pos_iou_thr=0.6, - neg_iou_thr=0.6, - min_pos_iou=0.6, - match_low_quality=False, - ignore_iof_thr=-1), - sampler=dict( - type='RandomSampler', - num=512, - pos_fraction=0.25, - neg_pos_ub=-1, - add_gt_as_proposals=True), - mask_size=28, - pos_weight=-1, - debug=False), - dict( - assigner=dict( - type='MaxIoUAssigner', - pos_iou_thr=0.7, - neg_iou_thr=0.7, - min_pos_iou=0.7, - match_low_quality=False, - ignore_iof_thr=-1), - sampler=dict( - type='RandomSampler', - num=512, - pos_fraction=0.25, - neg_pos_ub=-1, - add_gt_as_proposals=True), - mask_size=28, - pos_weight=-1, - debug=False) - ]), - test_cfg = dict( - rpn=dict( - nms_across_levels=False, - nms_pre=1000, - nms_post=1000, - max_per_img=1000, - nms=dict(type='nms', iou_threshold=0.7), - min_bbox_size=0), - rcnn=dict( - score_thr=0.05, - nms=dict(type='nms', iou_threshold=0.5), - max_per_img=100, - mask_thr_binary=0.5))) diff --git a/spaces/Andy1621/uniformer_image_segmentation/configs/_base_/datasets/chase_db1.py b/spaces/Andy1621/uniformer_image_segmentation/configs/_base_/datasets/chase_db1.py deleted file mode 100644 index 298594ea925f87f22b37094a2ec50e370aec96a0..0000000000000000000000000000000000000000 --- a/spaces/Andy1621/uniformer_image_segmentation/configs/_base_/datasets/chase_db1.py +++ /dev/null @@ -1,59 +0,0 @@ -# dataset settings -dataset_type = 'ChaseDB1Dataset' -data_root = 'data/CHASE_DB1' -img_norm_cfg = dict( - mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True) -img_scale = (960, 999) -crop_size = (128, 128) -train_pipeline = [ - dict(type='LoadImageFromFile'), - dict(type='LoadAnnotations'), - dict(type='Resize', img_scale=img_scale, ratio_range=(0.5, 2.0)), - dict(type='RandomCrop', crop_size=crop_size, cat_max_ratio=0.75), - dict(type='RandomFlip', prob=0.5), - dict(type='PhotoMetricDistortion'), - dict(type='Normalize', **img_norm_cfg), - dict(type='Pad', size=crop_size, pad_val=0, seg_pad_val=255), - dict(type='DefaultFormatBundle'), - dict(type='Collect', keys=['img', 'gt_semantic_seg']) -] -test_pipeline = [ - dict(type='LoadImageFromFile'), - dict( - type='MultiScaleFlipAug', - img_scale=img_scale, - # img_ratios=[0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0], - flip=False, - transforms=[ - dict(type='Resize', keep_ratio=True), - dict(type='RandomFlip'), - dict(type='Normalize', **img_norm_cfg), - dict(type='ImageToTensor', keys=['img']), - dict(type='Collect', keys=['img']) - ]) -] - -data = dict( - samples_per_gpu=4, - workers_per_gpu=4, - train=dict( - type='RepeatDataset', - times=40000, - dataset=dict( - type=dataset_type, - data_root=data_root, - img_dir='images/training', - ann_dir='annotations/training', - pipeline=train_pipeline)), - val=dict( - type=dataset_type, - data_root=data_root, - img_dir='images/validation', - ann_dir='annotations/validation', - pipeline=test_pipeline), - test=dict( - type=dataset_type, - data_root=data_root, - img_dir='images/validation', - ann_dir='annotations/validation', - pipeline=test_pipeline)) diff --git a/spaces/Annotation-AI/segment-similarthings/README.md b/spaces/Annotation-AI/segment-similarthings/README.md deleted file mode 100644 index c5958a1dcab4a3997c268385ca6766c1f112cc7d..0000000000000000000000000000000000000000 --- a/spaces/Annotation-AI/segment-similarthings/README.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Segment Similarthings -emoji: 📈 -colorFrom: yellow -colorTo: indigo -sdk: gradio -sdk_version: 3.32.0 -app_file: app.py -pinned: false ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/rich/table.py b/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/rich/table.py deleted file mode 100644 index 17409f2ee8df322a5ac115d1d0ff0c2d2aa11c4e..0000000000000000000000000000000000000000 --- a/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/rich/table.py +++ /dev/null @@ -1,1002 +0,0 @@ -from dataclasses import dataclass, field, replace -from typing import ( - TYPE_CHECKING, - Dict, - Iterable, - List, - NamedTuple, - Optional, - Sequence, - Tuple, - Union, -) - -from . import box, errors -from ._loop import loop_first_last, loop_last -from ._pick import pick_bool -from ._ratio import ratio_distribute, ratio_reduce -from .align import VerticalAlignMethod -from .jupyter import JupyterMixin -from .measure import Measurement -from .padding import Padding, PaddingDimensions -from .protocol import is_renderable -from .segment import Segment -from .style import Style, StyleType -from .text import Text, TextType - -if TYPE_CHECKING: - from .console import ( - Console, - ConsoleOptions, - JustifyMethod, - OverflowMethod, - RenderableType, - RenderResult, - ) - - -@dataclass -class Column: - """Defines a column within a ~Table. - - Args: - title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None. - caption (Union[str, Text], optional): The table caption rendered below. Defaults to None. - width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None. - min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None. - box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD. - safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True. - padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1). - collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False. - pad_edge (bool, optional): Enable padding of edge cells. Defaults to True. - expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False. - show_header (bool, optional): Show a header row. Defaults to True. - show_footer (bool, optional): Show a footer row. Defaults to False. - show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True. - show_lines (bool, optional): Draw lines between every row. Defaults to False. - leading (bool, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0. - style (Union[str, Style], optional): Default style for the table. Defaults to "none". - row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None. - header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header". - footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer". - border_style (Union[str, Style], optional): Style of the border. Defaults to None. - title_style (Union[str, Style], optional): Style of the title. Defaults to None. - caption_style (Union[str, Style], optional): Style of the caption. Defaults to None. - title_justify (str, optional): Justify method for title. Defaults to "center". - caption_justify (str, optional): Justify method for caption. Defaults to "center". - highlight (bool, optional): Highlight cell contents (if str). Defaults to False. - """ - - header: "RenderableType" = "" - """RenderableType: Renderable for the header (typically a string)""" - - footer: "RenderableType" = "" - """RenderableType: Renderable for the footer (typically a string)""" - - header_style: StyleType = "" - """StyleType: The style of the header.""" - - footer_style: StyleType = "" - """StyleType: The style of the footer.""" - - style: StyleType = "" - """StyleType: The style of the column.""" - - justify: "JustifyMethod" = "left" - """str: How to justify text within the column ("left", "center", "right", or "full")""" - - vertical: "VerticalAlignMethod" = "top" - """str: How to vertically align content ("top", "middle", or "bottom")""" - - overflow: "OverflowMethod" = "ellipsis" - """str: Overflow method.""" - - width: Optional[int] = None - """Optional[int]: Width of the column, or ``None`` (default) to auto calculate width.""" - - min_width: Optional[int] = None - """Optional[int]: Minimum width of column, or ``None`` for no minimum. Defaults to None.""" - - max_width: Optional[int] = None - """Optional[int]: Maximum width of column, or ``None`` for no maximum. Defaults to None.""" - - ratio: Optional[int] = None - """Optional[int]: Ratio to use when calculating column width, or ``None`` (default) to adapt to column contents.""" - - no_wrap: bool = False - """bool: Prevent wrapping of text within the column. Defaults to ``False``.""" - - _index: int = 0 - """Index of column.""" - - _cells: List["RenderableType"] = field(default_factory=list) - - def copy(self) -> "Column": - """Return a copy of this Column.""" - return replace(self, _cells=[]) - - @property - def cells(self) -> Iterable["RenderableType"]: - """Get all cells in the column, not including header.""" - yield from self._cells - - @property - def flexible(self) -> bool: - """Check if this column is flexible.""" - return self.ratio is not None - - -@dataclass -class Row: - """Information regarding a row.""" - - style: Optional[StyleType] = None - """Style to apply to row.""" - - end_section: bool = False - """Indicated end of section, which will force a line beneath the row.""" - - -class _Cell(NamedTuple): - """A single cell in a table.""" - - style: StyleType - """Style to apply to cell.""" - renderable: "RenderableType" - """Cell renderable.""" - vertical: VerticalAlignMethod - """Cell vertical alignment.""" - - -class Table(JupyterMixin): - """A console renderable to draw a table. - - Args: - *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance. - title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None. - caption (Union[str, Text], optional): The table caption rendered below. Defaults to None. - width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None. - min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None. - box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD. - safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True. - padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1). - collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False. - pad_edge (bool, optional): Enable padding of edge cells. Defaults to True. - expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False. - show_header (bool, optional): Show a header row. Defaults to True. - show_footer (bool, optional): Show a footer row. Defaults to False. - show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True. - show_lines (bool, optional): Draw lines between every row. Defaults to False. - leading (bool, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0. - style (Union[str, Style], optional): Default style for the table. Defaults to "none". - row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None. - header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header". - footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer". - border_style (Union[str, Style], optional): Style of the border. Defaults to None. - title_style (Union[str, Style], optional): Style of the title. Defaults to None. - caption_style (Union[str, Style], optional): Style of the caption. Defaults to None. - title_justify (str, optional): Justify method for title. Defaults to "center". - caption_justify (str, optional): Justify method for caption. Defaults to "center". - highlight (bool, optional): Highlight cell contents (if str). Defaults to False. - """ - - columns: List[Column] - rows: List[Row] - - def __init__( - self, - *headers: Union[Column, str], - title: Optional[TextType] = None, - caption: Optional[TextType] = None, - width: Optional[int] = None, - min_width: Optional[int] = None, - box: Optional[box.Box] = box.HEAVY_HEAD, - safe_box: Optional[bool] = None, - padding: PaddingDimensions = (0, 1), - collapse_padding: bool = False, - pad_edge: bool = True, - expand: bool = False, - show_header: bool = True, - show_footer: bool = False, - show_edge: bool = True, - show_lines: bool = False, - leading: int = 0, - style: StyleType = "none", - row_styles: Optional[Iterable[StyleType]] = None, - header_style: Optional[StyleType] = "table.header", - footer_style: Optional[StyleType] = "table.footer", - border_style: Optional[StyleType] = None, - title_style: Optional[StyleType] = None, - caption_style: Optional[StyleType] = None, - title_justify: "JustifyMethod" = "center", - caption_justify: "JustifyMethod" = "center", - highlight: bool = False, - ) -> None: - - self.columns: List[Column] = [] - self.rows: List[Row] = [] - self.title = title - self.caption = caption - self.width = width - self.min_width = min_width - self.box = box - self.safe_box = safe_box - self._padding = Padding.unpack(padding) - self.pad_edge = pad_edge - self._expand = expand - self.show_header = show_header - self.show_footer = show_footer - self.show_edge = show_edge - self.show_lines = show_lines - self.leading = leading - self.collapse_padding = collapse_padding - self.style = style - self.header_style = header_style or "" - self.footer_style = footer_style or "" - self.border_style = border_style - self.title_style = title_style - self.caption_style = caption_style - self.title_justify: "JustifyMethod" = title_justify - self.caption_justify: "JustifyMethod" = caption_justify - self.highlight = highlight - self.row_styles: Sequence[StyleType] = list(row_styles or []) - append_column = self.columns.append - for header in headers: - if isinstance(header, str): - self.add_column(header=header) - else: - header._index = len(self.columns) - append_column(header) - - @classmethod - def grid( - cls, - *headers: Union[Column, str], - padding: PaddingDimensions = 0, - collapse_padding: bool = True, - pad_edge: bool = False, - expand: bool = False, - ) -> "Table": - """Get a table with no lines, headers, or footer. - - Args: - *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance. - padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0. - collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to True. - pad_edge (bool, optional): Enable padding around edges of table. Defaults to False. - expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False. - - Returns: - Table: A table instance. - """ - return cls( - *headers, - box=None, - padding=padding, - collapse_padding=collapse_padding, - show_header=False, - show_footer=False, - show_edge=False, - pad_edge=pad_edge, - expand=expand, - ) - - @property - def expand(self) -> bool: - """Setting a non-None self.width implies expand.""" - return self._expand or self.width is not None - - @expand.setter - def expand(self, expand: bool) -> None: - """Set expand.""" - self._expand = expand - - @property - def _extra_width(self) -> int: - """Get extra width to add to cell content.""" - width = 0 - if self.box and self.show_edge: - width += 2 - if self.box: - width += len(self.columns) - 1 - return width - - @property - def row_count(self) -> int: - """Get the current number of rows.""" - return len(self.rows) - - def get_row_style(self, console: "Console", index: int) -> StyleType: - """Get the current row style.""" - style = Style.null() - if self.row_styles: - style += console.get_style(self.row_styles[index % len(self.row_styles)]) - row_style = self.rows[index].style - if row_style is not None: - style += console.get_style(row_style) - return style - - def __rich_measure__( - self, console: "Console", options: "ConsoleOptions" - ) -> Measurement: - max_width = options.max_width - if self.width is not None: - max_width = self.width - if max_width < 0: - return Measurement(0, 0) - - extra_width = self._extra_width - max_width = sum( - self._calculate_column_widths( - console, options.update_width(max_width - extra_width) - ) - ) - _measure_column = self._measure_column - - measurements = [ - _measure_column(console, options.update_width(max_width), column) - for column in self.columns - ] - minimum_width = ( - sum(measurement.minimum for measurement in measurements) + extra_width - ) - maximum_width = ( - sum(measurement.maximum for measurement in measurements) + extra_width - if (self.width is None) - else self.width - ) - measurement = Measurement(minimum_width, maximum_width) - measurement = measurement.clamp(self.min_width) - return measurement - - @property - def padding(self) -> Tuple[int, int, int, int]: - """Get cell padding.""" - return self._padding - - @padding.setter - def padding(self, padding: PaddingDimensions) -> "Table": - """Set cell padding.""" - self._padding = Padding.unpack(padding) - return self - - def add_column( - self, - header: "RenderableType" = "", - footer: "RenderableType" = "", - *, - header_style: Optional[StyleType] = None, - footer_style: Optional[StyleType] = None, - style: Optional[StyleType] = None, - justify: "JustifyMethod" = "left", - vertical: "VerticalAlignMethod" = "top", - overflow: "OverflowMethod" = "ellipsis", - width: Optional[int] = None, - min_width: Optional[int] = None, - max_width: Optional[int] = None, - ratio: Optional[int] = None, - no_wrap: bool = False, - ) -> None: - """Add a column to the table. - - Args: - header (RenderableType, optional): Text or renderable for the header. - Defaults to "". - footer (RenderableType, optional): Text or renderable for the footer. - Defaults to "". - header_style (Union[str, Style], optional): Style for the header, or None for default. Defaults to None. - footer_style (Union[str, Style], optional): Style for the footer, or None for default. Defaults to None. - style (Union[str, Style], optional): Style for the column cells, or None for default. Defaults to None. - justify (JustifyMethod, optional): Alignment for cells. Defaults to "left". - vertical (VerticalAlignMethod, optional): Vertical alignment, one of "top", "middle", or "bottom". Defaults to "top". - overflow (OverflowMethod): Overflow method: "crop", "fold", "ellipsis". Defaults to "ellipsis". - width (int, optional): Desired width of column in characters, or None to fit to contents. Defaults to None. - min_width (Optional[int], optional): Minimum width of column, or ``None`` for no minimum. Defaults to None. - max_width (Optional[int], optional): Maximum width of column, or ``None`` for no maximum. Defaults to None. - ratio (int, optional): Flexible ratio for the column (requires ``Table.expand`` or ``Table.width``). Defaults to None. - no_wrap (bool, optional): Set to ``True`` to disable wrapping of this column. - """ - - column = Column( - _index=len(self.columns), - header=header, - footer=footer, - header_style=header_style or "", - footer_style=footer_style or "", - style=style or "", - justify=justify, - vertical=vertical, - overflow=overflow, - width=width, - min_width=min_width, - max_width=max_width, - ratio=ratio, - no_wrap=no_wrap, - ) - self.columns.append(column) - - def add_row( - self, - *renderables: Optional["RenderableType"], - style: Optional[StyleType] = None, - end_section: bool = False, - ) -> None: - """Add a row of renderables. - - Args: - *renderables (None or renderable): Each cell in a row must be a renderable object (including str), - or ``None`` for a blank cell. - style (StyleType, optional): An optional style to apply to the entire row. Defaults to None. - end_section (bool, optional): End a section and draw a line. Defaults to False. - - Raises: - errors.NotRenderableError: If you add something that can't be rendered. - """ - - def add_cell(column: Column, renderable: "RenderableType") -> None: - column._cells.append(renderable) - - cell_renderables: List[Optional["RenderableType"]] = list(renderables) - - columns = self.columns - if len(cell_renderables) < len(columns): - cell_renderables = [ - *cell_renderables, - *[None] * (len(columns) - len(cell_renderables)), - ] - for index, renderable in enumerate(cell_renderables): - if index == len(columns): - column = Column(_index=index) - for _ in self.rows: - add_cell(column, Text("")) - self.columns.append(column) - else: - column = columns[index] - if renderable is None: - add_cell(column, "") - elif is_renderable(renderable): - add_cell(column, renderable) - else: - raise errors.NotRenderableError( - f"unable to render {type(renderable).__name__}; a string or other renderable object is required" - ) - self.rows.append(Row(style=style, end_section=end_section)) - - def add_section(self) -> None: - """Add a new section (draw a line after current row).""" - - if self.rows: - self.rows[-1].end_section = True - - def __rich_console__( - self, console: "Console", options: "ConsoleOptions" - ) -> "RenderResult": - - if not self.columns: - yield Segment("\n") - return - - max_width = options.max_width - if self.width is not None: - max_width = self.width - - extra_width = self._extra_width - widths = self._calculate_column_widths( - console, options.update_width(max_width - extra_width) - ) - table_width = sum(widths) + extra_width - - render_options = options.update( - width=table_width, highlight=self.highlight, height=None - ) - - def render_annotation( - text: TextType, style: StyleType, justify: "JustifyMethod" = "center" - ) -> "RenderResult": - render_text = ( - console.render_str(text, style=style, highlight=False) - if isinstance(text, str) - else text - ) - return console.render( - render_text, options=render_options.update(justify=justify) - ) - - if self.title: - yield from render_annotation( - self.title, - style=Style.pick_first(self.title_style, "table.title"), - justify=self.title_justify, - ) - yield from self._render(console, render_options, widths) - if self.caption: - yield from render_annotation( - self.caption, - style=Style.pick_first(self.caption_style, "table.caption"), - justify=self.caption_justify, - ) - - def _calculate_column_widths( - self, console: "Console", options: "ConsoleOptions" - ) -> List[int]: - """Calculate the widths of each column, including padding, not including borders.""" - max_width = options.max_width - columns = self.columns - width_ranges = [ - self._measure_column(console, options, column) for column in columns - ] - widths = [_range.maximum or 1 for _range in width_ranges] - get_padding_width = self._get_padding_width - extra_width = self._extra_width - if self.expand: - ratios = [col.ratio or 0 for col in columns if col.flexible] - if any(ratios): - fixed_widths = [ - 0 if column.flexible else _range.maximum - for _range, column in zip(width_ranges, columns) - ] - flex_minimum = [ - (column.width or 1) + get_padding_width(column._index) - for column in columns - if column.flexible - ] - flexible_width = max_width - sum(fixed_widths) - flex_widths = ratio_distribute(flexible_width, ratios, flex_minimum) - iter_flex_widths = iter(flex_widths) - for index, column in enumerate(columns): - if column.flexible: - widths[index] = fixed_widths[index] + next(iter_flex_widths) - table_width = sum(widths) - - if table_width > max_width: - widths = self._collapse_widths( - widths, - [(column.width is None and not column.no_wrap) for column in columns], - max_width, - ) - table_width = sum(widths) - # last resort, reduce columns evenly - if table_width > max_width: - excess_width = table_width - max_width - widths = ratio_reduce(excess_width, [1] * len(widths), widths, widths) - table_width = sum(widths) - - width_ranges = [ - self._measure_column(console, options.update_width(width), column) - for width, column in zip(widths, columns) - ] - widths = [_range.maximum or 0 for _range in width_ranges] - - if (table_width < max_width and self.expand) or ( - self.min_width is not None and table_width < (self.min_width - extra_width) - ): - _max_width = ( - max_width - if self.min_width is None - else min(self.min_width - extra_width, max_width) - ) - pad_widths = ratio_distribute(_max_width - table_width, widths) - widths = [_width + pad for _width, pad in zip(widths, pad_widths)] - - return widths - - @classmethod - def _collapse_widths( - cls, widths: List[int], wrapable: List[bool], max_width: int - ) -> List[int]: - """Reduce widths so that the total is under max_width. - - Args: - widths (List[int]): List of widths. - wrapable (List[bool]): List of booleans that indicate if a column may shrink. - max_width (int): Maximum width to reduce to. - - Returns: - List[int]: A new list of widths. - """ - total_width = sum(widths) - excess_width = total_width - max_width - if any(wrapable): - while total_width and excess_width > 0: - max_column = max( - width for width, allow_wrap in zip(widths, wrapable) if allow_wrap - ) - second_max_column = max( - width if allow_wrap and width != max_column else 0 - for width, allow_wrap in zip(widths, wrapable) - ) - column_difference = max_column - second_max_column - ratios = [ - (1 if (width == max_column and allow_wrap) else 0) - for width, allow_wrap in zip(widths, wrapable) - ] - if not any(ratios) or not column_difference: - break - max_reduce = [min(excess_width, column_difference)] * len(widths) - widths = ratio_reduce(excess_width, ratios, max_reduce, widths) - - total_width = sum(widths) - excess_width = total_width - max_width - return widths - - def _get_cells( - self, console: "Console", column_index: int, column: Column - ) -> Iterable[_Cell]: - """Get all the cells with padding and optional header.""" - - collapse_padding = self.collapse_padding - pad_edge = self.pad_edge - padding = self.padding - any_padding = any(padding) - - first_column = column_index == 0 - last_column = column_index == len(self.columns) - 1 - - _padding_cache: Dict[Tuple[bool, bool], Tuple[int, int, int, int]] = {} - - def get_padding(first_row: bool, last_row: bool) -> Tuple[int, int, int, int]: - cached = _padding_cache.get((first_row, last_row)) - if cached: - return cached - top, right, bottom, left = padding - - if collapse_padding: - if not first_column: - left = max(0, left - right) - if not last_row: - bottom = max(0, top - bottom) - - if not pad_edge: - if first_column: - left = 0 - if last_column: - right = 0 - if first_row: - top = 0 - if last_row: - bottom = 0 - _padding = (top, right, bottom, left) - _padding_cache[(first_row, last_row)] = _padding - return _padding - - raw_cells: List[Tuple[StyleType, "RenderableType"]] = [] - _append = raw_cells.append - get_style = console.get_style - if self.show_header: - header_style = get_style(self.header_style or "") + get_style( - column.header_style - ) - _append((header_style, column.header)) - cell_style = get_style(column.style or "") - for cell in column.cells: - _append((cell_style, cell)) - if self.show_footer: - footer_style = get_style(self.footer_style or "") + get_style( - column.footer_style - ) - _append((footer_style, column.footer)) - - if any_padding: - _Padding = Padding - for first, last, (style, renderable) in loop_first_last(raw_cells): - yield _Cell( - style, - _Padding(renderable, get_padding(first, last)), - getattr(renderable, "vertical", None) or column.vertical, - ) - else: - for (style, renderable) in raw_cells: - yield _Cell( - style, - renderable, - getattr(renderable, "vertical", None) or column.vertical, - ) - - def _get_padding_width(self, column_index: int) -> int: - """Get extra width from padding.""" - _, pad_right, _, pad_left = self.padding - if self.collapse_padding: - if column_index > 0: - pad_left = max(0, pad_left - pad_right) - return pad_left + pad_right - - def _measure_column( - self, - console: "Console", - options: "ConsoleOptions", - column: Column, - ) -> Measurement: - """Get the minimum and maximum width of the column.""" - - max_width = options.max_width - if max_width < 1: - return Measurement(0, 0) - - padding_width = self._get_padding_width(column._index) - - if column.width is not None: - # Fixed width column - return Measurement( - column.width + padding_width, column.width + padding_width - ).with_maximum(max_width) - # Flexible column, we need to measure contents - min_widths: List[int] = [] - max_widths: List[int] = [] - append_min = min_widths.append - append_max = max_widths.append - get_render_width = Measurement.get - for cell in self._get_cells(console, column._index, column): - _min, _max = get_render_width(console, options, cell.renderable) - append_min(_min) - append_max(_max) - - measurement = Measurement( - max(min_widths) if min_widths else 1, - max(max_widths) if max_widths else max_width, - ).with_maximum(max_width) - measurement = measurement.clamp( - None if column.min_width is None else column.min_width + padding_width, - None if column.max_width is None else column.max_width + padding_width, - ) - return measurement - - def _render( - self, console: "Console", options: "ConsoleOptions", widths: List[int] - ) -> "RenderResult": - table_style = console.get_style(self.style or "") - - border_style = table_style + console.get_style(self.border_style or "") - _column_cells = ( - self._get_cells(console, column_index, column) - for column_index, column in enumerate(self.columns) - ) - row_cells: List[Tuple[_Cell, ...]] = list(zip(*_column_cells)) - _box = ( - self.box.substitute( - options, safe=pick_bool(self.safe_box, console.safe_box) - ) - if self.box - else None - ) - _box = _box.get_plain_headed_box() if _box and not self.show_header else _box - - new_line = Segment.line() - - columns = self.columns - show_header = self.show_header - show_footer = self.show_footer - show_edge = self.show_edge - show_lines = self.show_lines - leading = self.leading - - _Segment = Segment - if _box: - box_segments = [ - ( - _Segment(_box.head_left, border_style), - _Segment(_box.head_right, border_style), - _Segment(_box.head_vertical, border_style), - ), - ( - _Segment(_box.foot_left, border_style), - _Segment(_box.foot_right, border_style), - _Segment(_box.foot_vertical, border_style), - ), - ( - _Segment(_box.mid_left, border_style), - _Segment(_box.mid_right, border_style), - _Segment(_box.mid_vertical, border_style), - ), - ] - if show_edge: - yield _Segment(_box.get_top(widths), border_style) - yield new_line - else: - box_segments = [] - - get_row_style = self.get_row_style - get_style = console.get_style - - for index, (first, last, row_cell) in enumerate(loop_first_last(row_cells)): - header_row = first and show_header - footer_row = last and show_footer - row = ( - self.rows[index - show_header] - if (not header_row and not footer_row) - else None - ) - max_height = 1 - cells: List[List[List[Segment]]] = [] - if header_row or footer_row: - row_style = Style.null() - else: - row_style = get_style( - get_row_style(console, index - 1 if show_header else index) - ) - for width, cell, column in zip(widths, row_cell, columns): - render_options = options.update( - width=width, - justify=column.justify, - no_wrap=column.no_wrap, - overflow=column.overflow, - height=None, - ) - lines = console.render_lines( - cell.renderable, - render_options, - style=get_style(cell.style) + row_style, - ) - max_height = max(max_height, len(lines)) - cells.append(lines) - - row_height = max(len(cell) for cell in cells) - - def align_cell( - cell: List[List[Segment]], - vertical: "VerticalAlignMethod", - width: int, - style: Style, - ) -> List[List[Segment]]: - if header_row: - vertical = "bottom" - elif footer_row: - vertical = "top" - - if vertical == "top": - return _Segment.align_top(cell, width, row_height, style) - elif vertical == "middle": - return _Segment.align_middle(cell, width, row_height, style) - return _Segment.align_bottom(cell, width, row_height, style) - - cells[:] = [ - _Segment.set_shape( - align_cell( - cell, - _cell.vertical, - width, - get_style(_cell.style) + row_style, - ), - width, - max_height, - ) - for width, _cell, cell, column in zip(widths, row_cell, cells, columns) - ] - - if _box: - if last and show_footer: - yield _Segment( - _box.get_row(widths, "foot", edge=show_edge), border_style - ) - yield new_line - left, right, _divider = box_segments[0 if first else (2 if last else 1)] - - # If the column divider is whitespace also style it with the row background - divider = ( - _divider - if _divider.text.strip() - else _Segment( - _divider.text, row_style.background_style + _divider.style - ) - ) - for line_no in range(max_height): - if show_edge: - yield left - for last_cell, rendered_cell in loop_last(cells): - yield from rendered_cell[line_no] - if not last_cell: - yield divider - if show_edge: - yield right - yield new_line - else: - for line_no in range(max_height): - for rendered_cell in cells: - yield from rendered_cell[line_no] - yield new_line - if _box and first and show_header: - yield _Segment( - _box.get_row(widths, "head", edge=show_edge), border_style - ) - yield new_line - end_section = row and row.end_section - if _box and (show_lines or leading or end_section): - if ( - not last - and not (show_footer and index >= len(row_cells) - 2) - and not (show_header and header_row) - ): - if leading: - yield _Segment( - _box.get_row(widths, "mid", edge=show_edge) * leading, - border_style, - ) - else: - yield _Segment( - _box.get_row(widths, "row", edge=show_edge), border_style - ) - yield new_line - - if _box and show_edge: - yield _Segment(_box.get_bottom(widths), border_style) - yield new_line - - -if __name__ == "__main__": # pragma: no cover - from pip._vendor.rich.console import Console - from pip._vendor.rich.highlighter import ReprHighlighter - from pip._vendor.rich.table import Table as Table - - from ._timer import timer - - with timer("Table render"): - table = Table( - title="Star Wars Movies", - caption="Rich example table", - caption_justify="right", - ) - - table.add_column( - "Released", header_style="bright_cyan", style="cyan", no_wrap=True - ) - table.add_column("Title", style="magenta") - table.add_column("Box Office", justify="right", style="green") - - table.add_row( - "Dec 20, 2019", - "Star Wars: The Rise of Skywalker", - "$952,110,690", - ) - table.add_row("May 25, 2018", "Solo: A Star Wars Story", "$393,151,347") - table.add_row( - "Dec 15, 2017", - "Star Wars Ep. V111: The Last Jedi", - "$1,332,539,889", - style="on black", - end_section=True, - ) - table.add_row( - "Dec 16, 2016", - "Rogue One: A Star Wars Story", - "$1,332,439,889", - ) - - def header(text: str) -> None: - console.print() - console.rule(highlight(text)) - console.print() - - console = Console() - highlight = ReprHighlighter() - header("Example Table") - console.print(table, justify="center") - - table.expand = True - header("expand=True") - console.print(table) - - table.width = 50 - header("width=50") - - console.print(table, justify="center") - - table.width = None - table.expand = False - table.row_styles = ["dim", "none"] - header("row_styles=['dim', 'none']") - - console.print(table, justify="center") - - table.width = None - table.expand = False - table.row_styles = ["dim", "none"] - table.leading = 1 - header("leading=1, row_styles=['dim', 'none']") - console.print(table, justify="center") - - table.width = None - table.expand = False - table.row_styles = ["dim", "none"] - table.show_lines = True - table.leading = 0 - header("show_lines=True, row_styles=['dim', 'none']") - console.print(table, justify="center") diff --git a/spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/new_baselines/mask_rcnn_R_101_FPN_200ep_LSJ.py b/spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/new_baselines/mask_rcnn_R_101_FPN_200ep_LSJ.py deleted file mode 100644 index 18e5f0720c568db4ef0c97b59688b5e7866df606..0000000000000000000000000000000000000000 --- a/spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/configs/new_baselines/mask_rcnn_R_101_FPN_200ep_LSJ.py +++ /dev/null @@ -1,14 +0,0 @@ -from .mask_rcnn_R_101_FPN_100ep_LSJ import ( - dataloader, - lr_multiplier, - model, - optimizer, - train, -) - -train.max_iter *= 2 # 100ep -> 200ep - -lr_multiplier.scheduler.milestones = [ - milestone * 2 for milestone in lr_multiplier.scheduler.milestones -] -lr_multiplier.scheduler.num_updates = train.max_iter diff --git a/spaces/BBrother/Pandora/README.md b/spaces/BBrother/Pandora/README.md deleted file mode 100644 index 6281bc037c577f88e9b951d852198560990a730e..0000000000000000000000000000000000000000 --- a/spaces/BBrother/Pandora/README.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Pandora -emoji: 🐢 -colorFrom: green -colorTo: yellow -sdk: docker -pinned: false -app_port: 8018 ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/Benson/text-generation/Examples/Descargar Counter Strike 1.3.md b/spaces/Benson/text-generation/Examples/Descargar Counter Strike 1.3.md deleted file mode 100644 index eb084329115a4450c5305501505653fc482cbf78..0000000000000000000000000000000000000000 --- a/spaces/Benson/text-generation/Examples/Descargar Counter Strike 1.3.md +++ /dev/null @@ -1,81 +0,0 @@ - -

    Descargar Counter Strike 1.3: Un juego clásico de FPS

    -

    Si eres un fan de los juegos de disparos en primera persona (FPS), es posible que hayas oído hablar de Counter Strike, uno de los juegos FPS más populares e influyentes jamás creados. Pero ¿sabías que hay una versión más antigua de Counter Strike que todavía se juega por muchos jugadores de todo el mundo? Se llama Counter Strike 1.3, y es un juego clásico que puedes descargar y disfrutar en tu PC.

    -

    descargar counter strike 1.3


    Downloadhttps://bltlly.com/2v6KHW



    -

    En este artículo, le diremos todo lo que necesita saber sobre Counter Strike 1.3, incluyendo lo que es, por qué debe descargarlo y cómo descargarlo. También responderemos algunas preguntas frecuentes sobre este juego al final del artículo.

    -

    ¿Qué es Counter Strike 1.3?

    -

    Counter Strike 1.3 es un juego multijugador FPS que fue lanzado en 2001 como un mod para Half-Life, otro popular juego de FPS por Valve Corporation. Counter Strike 1.3 es la tercera actualización importante del mod original de Counter Strike, que se lanzó por primera vez en 1999.

    -

    Historia y características de Counter Strike 1.3

    -

    Counter Strike fue creado por dos desarrolladores independientes, Minh Le y Jess Cliffe, que querían hacer un juego FPS realista y basado en equipos que simulara escenarios de guerra modernos. Usaron el motor Half-Life para crear sus propios mapas, armas, personajes y mecánica de juego.

    -

    Counter Strike rápidamente se convirtió en un éxito entre los fans de FPS, especialmente aquellos que disfrutaron de los partidos multijugador en línea. Valve Corporation se dio cuenta del potencial del mod y contrató a Le y Cliffe para trabajar en la versión oficial de Counter Strike, que fue lanzado en 2000.

    -

    -

    Counter Strike 1.3 fue una de las actualizaciones más significativas del juego, ya que introdujo muchas nuevas características y mejoras, como:

    -
      -
    • Nuevos mapas, como de_dust2, cs_italy, cs_office, de_train y de_inferno
    • -
    • Nuevas armas, como el Galil, FAMAS, USP, Glock-18, y el Escudo Táctico
    • - -
    • Nuevos comandos y opciones, tales como comunicación de voz, modo espectador, recarga automática, compra automática y equilibrio de equipo automático
    • -
    • Nuevos gráficos y sonidos, como texturas mejoradas, modelos, animaciones, efectos y música
    • -
    • Nuevo sistema anti-trucos, como Válvula Anti-Cheat (VAC)
    • -
    -

    El modo de juego y modos de Counter Strike 1.3

    -

    El modo de juego de Counter Strike 1.3 se basa en dos equipos opuestos: los terroristas y los antiterroristas. Cada equipo tiene diferentes objetivos dependiendo del mapa y el modo de juego que esté jugando.

    -

    El modo de juego más común es Bomb Defusal, donde los terroristas tienen que colocar una bomba en uno de los dos sitios designados y defenderla hasta que explote, mientras que los antiterroristas tienen que evitar que lo hagan o desactivar la bomba si se planta.

    -

    Otro modo de juego popular es Rescate de rehenes, donde los terroristas tienen que proteger a un grupo de rehenes en su base, mientras que los antiterroristas tienen que rescatarlos y llevarlos a una zona segura.

    -

    Otros modos de juego incluyen Escolta VIP, donde los Antiterroristas tienen que escoltar a un jugador VIP a un punto de extracción mientras que los Terroristas tienen que asesinarlo; Asesinato, donde los Terroristas tienen que matar a un objetivo específico mientras que los Antiterroristas tienen que protegerlo; y Deathmatch, donde los jugadores pueden elegir cualquier arma y reaparecer después de morir, y el equipo con más muertes gana.

    -

    El modo de juego de Counter Strike 1.3 es rápido, táctico y basado en habilidades. Los jugadores tienen que utilizar varias armas, equipos y estrategias para lograr sus objetivos y eliminar a sus enemigos. Los jugadores también tienen que administrar su dinero, salud, armadura y munición, ya que son limitados y afectan su rendimiento.

    - -

    ¿Por qué descargar Counter Strike 1.3?

    -

    Counter Strike 1.3 es un clásico juego de FPS que tiene muchos beneficios y ventajas para los jugadores que aman este género. Estas son algunas de las razones por las que deberías descargar Counter Strike 1.3:

    -

    Los beneficios y ventajas de Counter Strike 1.3

    -
      -
    • Counter Strike 1.3 es un juego divertido y adictivo que puede proporcionar horas de entretenimiento y desafío. Puedes jugar con tus amigos o con otros jugadores online, y disfrutar de la emoción de competir en diferentes escenarios y modos.
    • -
    • Counter Strike 1.3 es un juego que puede mejorar tus habilidades y reflejos. Puede aprender a apuntar, disparar, moverse, comunicarse y cooperar con sus compañeros de equipo, y desarrollar sus habilidades de pensamiento estratégico y resolución de problemas.
    • -
    • Counter Strike 1.3 es un juego que puede satisfacer su nostalgia y curiosidad. Puedes experimentar la versión original de Counter Strike que lo inició todo, y ver cómo evolucionó con los años. También puede compararlo con las versiones más recientes de Counter Strike, como Counter Strike: Source y Counter Strike: Global Offensive.
    • -
    • Counter Strike 1.3 es un juego que es fácil de descargar e instalar. No necesitas un PC potente o una conexión a Internet de alta velocidad para jugar a este juego, ya que tiene bajos requisitos del sistema y tamaño de archivo. También puede encontrar muchas fuentes y guías sobre cómo descargar Counter Strike 1.3 en línea.
    • -
    -

    Los desafíos y desventajas de Counter Strike 1.3

    -

    Sin embargo, Counter Strike 1.3 no es un juego perfecto, y también tiene algunos retos y desventajas que debes tener en cuenta antes de descargarlo. Estos son algunos de los problemas que puede encontrar con Counter Strike 1.3:

    -
      -
    • Counter Strike 1.3 es un juego antiguo que tiene gráficos y sonidos obsoletos. Usted puede encontrar el juego visualmente poco atractivo o aburrido en comparación con los modernos juegos FPS que tienen gráficos y sonidos más realistas e inmersivos.
    • - -
    • Counter Strike 1.3 es un juego que tiene una curva de aprendizaje pronunciada y una comunidad competitiva. Puedes encontrar el juego difícil o frustrante para jugar, especialmente si eres nuevo en el juego o si te enfrentas a jugadores más experimentados o expertos que pueden dominarte fácilmente.
    • -
    • Counter Strike 1.3 es un juego que requiere actualizaciones y mantenimiento constantes. Es posible que tenga que descargar parches o mods para solucionar algunos de los problemas o mejorar algunas de las características del juego, o para mantenerse al día con las últimas versiones o tendencias del juego.
    • -
    -

    Cómo descargar Counter Strike 1.3?

    -

    Si está interesado en descargar Counter Strike 1.3, tendrá que seguir algunos pasos y requisitos para garantizar un proceso de instalación sin problemas y con éxito. Estas son algunas de las cosas que necesitas saber sobre la descarga de Counter Strike 1.3:

    -

    Los requisitos y la compatibilidad de Counter Strike 1.3

    -

    Antes de descargar Counter Strike 1.3, debe asegurarse de que su PC cumple con los requisitos mínimos del sistema para ejecutar el juego. Aquí están las especificaciones que necesita:

    - -
    Sistema operativoWindows XP/Vista/7/8/10
    ProcesadorPentium III 500 MHz o equivalente
    Memoria96 MB de RAM
    Gráficos16 MB tarjeta de vídeo
    Almacenamiento500 MB de espacio disponible
    Tarjeta de sonidoTarjeta de sonido compatible con DirectX
    Conexión a Internet de banda ancha
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ModelVariantDescription
    Pajero GLSBaseThe base variant of the Pajero 3, with standard features such as air conditioning, power windows, power mirrors, power steering, dual airbags, ABS, EBD, and alloy wheels.
    Pajero GLXMid-rangeThe mid-range variant of the Pajero 3, with additional features such as fog lamps, roof rails, side steps, rear spoiler, leather steering wheel, cruise control, CD player, and rear differential lock.
    Pajero ExceedHigh-endThe high-end variant of the Pajero 3, with additional features such as leather seats, wood trim, sunroof, climate control, keyless entry, multi-information display, wide display audio, and active stability and traction control.
    Pajero EvolutionSpecial editionA special edition of the Pajero 3, based on the rally version, with features such as a 3.5-liter V6 engine with 276 horsepower, a five-speed manual transmission, a carbon fiber hood, a front bumper with large air intakes, a rear bumper with a diffuser, a rear wing, and 17-inch alloy wheels.
    Pajero Field MasterPhilippine exclusiveA Philippine exclusive variant of the Pajero 3, with features such as a 2.8-liter turbo diesel engine with 125 horsepower, a four-speed automatic transmission, a chrome grille, a rear wiper, and a third row seat.
    -

    How do they differ in terms of specifications and equipment?

    -

    The different models and variants of the Pajero 3 differ in terms of specifications and equipment in various aspects, such as engine type, displacement, power, torque, transmission type, number of gears, fuel type, fuel consumption, fuel tank capacity, curb weight, gross vehicle weight, towing capacity, dimensions, seating capacity, luggage capacity, wheel size, tire size, brake type, suspension type, steering type, and safety features. For example, the Pajero Evolution has a higher power output, a lower fuel consumption, a lighter weight, and a smaller dimension than the Pajero Exceed. The Pajero Field Master has a lower power output, a higher fuel consumption, a heavier weight, and a larger dimension than the Pajero GLX.

    -

    pajero 3 3.8 v6
    -pajero 3 door for sale
    -pajero 3.2 did engine
    -pajero 3 lift kit
    -pajero 3.5 gdi problems
    -pajero 3 off road
    -pajero 3.0 v6 fuel consumption
    -pajero 3.2 did specs
    -pajero 3.5 gdi fuel pump
    -pajero 3.8 gls review
    -pajero 3 inch exhaust
    -pajero 3.2 did reliability
    -pajero 3.5 gdi engine for sale
    -pajero 3.8 gls gold package
    -pajero 3 snorkel kit
    -pajero 3.2 did turbo upgrade
    -pajero 3.5 gdi tuning
    -pajero 3.8 gls vs exceed
    -pajero 3 roof rack
    -pajero 3.2 did oil capacity
    -pajero 3.5 gdi fuel consumption
    -pajero 3.8 gls vs lwb
    -pajero 3 bull bar
    -pajero 3.2 did injector problems
    -pajero 3.5 gdi spark plugs
    -pajero 3.8 gls vs swb
    -pajero 3 rock sliders
    -pajero 3.2 did glow plug relay location
    -pajero 3.5 gdi ecu reset
    -pajero 3.8 gls vs platinum edition
    -pajero 3 bash plate
    -pajero 3.2 did egr valve cleaning
    -pajero 3.5 gdi idle control valve
    -pajero 3.8 gls vs full option
    -pajero 3 tow bar
    -pajero 3.2 did fuel filter location
    -pajero 3.5 gdi throttle body cleaning
    -pajero 3.8 gls vs leather seats without sunroof
    -pajero 3 winch bumper
    -pajero 3.2 did timing chain replacement
    -pajero 3.5 gdi oxygen sensor
    -pajero 3.8 gls vs super select ii
    -pajero 3 led headlights
    -pajero 3.2 did boost pressure sensor location
    -pajero 3.5 gdi map sensor
    -pajero 3.8 gls vs active stability and traction control system
    -pajero 3 side steps
    -pajero 3.2 did injector pump removal
    -pajero 3.5 gdi fuel rail pressure sensor

    -

    What are the pros and cons of each model and variant?

    -

    The pros and cons of each model and variant of the Pajero 3 depend on the preferences and needs of the customer. Some of the general pros and cons are:

    - -

    Conclusion

    -

    What are the main advantages and disadvantages of the Pajero 3?

    -

    The main advantages of the Pajero 3 are:

    - -

    The main disadvantages of the Pajero 3 are:

    - -

    How does it compare to other full-size 4x4s in the market?

    -

    The Pajero 3 compares favorably to other full-size 4x4s in the market, such as the Land Rover Range Rover or Toyota Land Cruiser. It offers a similar level of luxury, performance, and capability, but at a lower price. It also offers more features and options than some of its competitors, such as the active stability and traction control system or the wide display audio system. However, it also faces some disadvantages compared to other full-size 4x4s in the market, such as the lower fuel efficiency, higher maintenance costs, or lower brand recognition. Ultimately, the choice depends on the customer's preferences and needs.

    -

    Who should buy the Pajero 3 and why?

    -

    The Pajero 3 is a great choice for anyone who loves adventure and performance. It is suitable for people who:

    - -

    Frequently Asked Questions

    -

    Q: What is the difference between Pajero 3 and Montero?

    -

    A: Pajero 3 and Montero are two names for the same vehicle. The name Pajero 3 is used in Japan, Europe, Asia, Africa, and Australia. The name Montero is used in North America, South America, and Spain. The name Shogun is used in the United Kingdom and Ireland.

    -

    Q: How much does the Pajero 3 cost?

    -

    A: The cost of the Pajero 3 varies depending on the model, variant, market, and condition. The average price of a new Pajero 3 in 2021 was around $40,000 USD. The average price of a used Pajero 3 in 2021 was around $15,000 USD.

    -

    Q: How many seats does the Pajero 3 have?

    -

    A: The Pajero 3 has either five or seven seats, depending on the model and variant. The five-seat version has two rows of seats, with a split-folding rear seat that can be folded flat to increase cargo space. The seven-seat version has three rows of seats, with a third row seat that can be folded or removed to increase cargo space.

    -

    Q: How much fuel does the Pajero 3 consume?

    -

    A: The fuel consumption of the Pajero 3 depends on the engine type, transmission type, driving mode, driving style, and driving conditions. The average fuel consumption of the Pajero 3 is around 10 liters per 100 kilometers (23 miles per gallon).

    -

    Q: How safe is the Pajero 3?

    -

    A: The Pajero 3 is a safe vehicle that has various features to protect the driver and passengers from accidents and injuries. Some of these features are dual front airbags, side airbags, curtain airbags, anti-lock braking system (ABS), electronic brake-force distribution (EBD), brake assist system (BAS), active stability and traction control system (ASTC), blind spot warning system (BSW), lane change assist system (LCA), adaptive cruise control system (ACC), forward collision mitigation system (FCM), automatic high beam system (AHB), rain sensing wipers (RSW), and rear view camera (RVC).

    -

    401be4b1e0
    -
    -
    \ No newline at end of file diff --git a/spaces/contluForse/HuggingGPT/assets/Abyss Web Server X2 Serial Key Keygen How to Get the Most Out of Your Web Server.md b/spaces/contluForse/HuggingGPT/assets/Abyss Web Server X2 Serial Key Keygen How to Get the Most Out of Your Web Server.md deleted file mode 100644 index eb2529e9fc2b65797c95dd249a2193cada19d7ea..0000000000000000000000000000000000000000 --- a/spaces/contluForse/HuggingGPT/assets/Abyss Web Server X2 Serial Key Keygen How to Get the Most Out of Your Web Server.md +++ /dev/null @@ -1,18 +0,0 @@ -
    -

    When you type a URL into your web browser, the browser contacts the server and requests the page. The server then sends the page back to the browser, which displays it on your screen. In order for this process to work, web servers must have two key components:

    -

    When a browser contacts the server, it does so using a network protocol like Hypertext Transfer Protocol (or HTTP, which runs on TCP/IP). The server then processes the request and sends the page back to the browser, again using TCP/IP.

    -

    Abyss Web Server X2 Serial Key Keygen |WORK|


    Download File ✦✦✦ https://ssurll.com/2uzwlp



    -

    DNS is a global network of servers that translates domain names (like example.com) into IP addresses (like 192.168.0.100). When you type a URL into your browser, the browser contacts a DNS server and requests the IP address for that domain. The DNS server then responds with the IP address, and the browser can contact the web server using that address.

    -

    Hypertext Transfer Protocol (or HTTP) is the network protocol that browsers use to contact web servers and request pages. When you type a URL into your browser, the browser contacts the server using the Hypertext Transfer Protocol.

    -

    IIS is a good choice for those who need a feature-rich web server option. It's also a good choice for those who are looking for tight integration with other Microsoft products, as IIS is designed to work well with other Microsoft technologies.

    -

    Jetty is used in a wide variety of projects and products, both in development and production. It is loved by developers due to its long history of being easily embedded in devices, tools, frameworks, application servers, and modern cloud services.

    -

    After updating to Catalina, I installed Parallels 15.1 and El Capitan in order to run several older apps. I especially needed to run Abyss web server, Dreamweaver CS6 and Panorama Enterprise 6 for development work for clients - even as most are transitioning to Panorama X.

    -

    When a new service worker is registered using navigator.serviceWorker.register, the JavaScript is downloaded, parsed, and enters the installing state. If the installation succeeds, the service worker will proceed to the installed state. If however, an error occurs during installation, the script will instead be banished to the abyss of the redundant state for all eternity (or until you attempt to register it again by refreshing the page).

    -

    Because the service worker file is checked on each load, you should configure your server to serve it with a short expiration header (i.e., 1 to 10 minutes). If you give it a very long expiration time, the browser will not check it for changes and will not find out about new service worker versions or new files to cache.

    -

    -

    Unless otherwise changed at boot time in the GRUB menu, systemd always starts the default.target. The default.target file is a symbolic link to the true target file. For a desktop workstation, this is typically going to be the graphical.target, which is equivalent to runlevel 5 in SystemV. For a server, the default is more likely to be the multi-user.target, which is like runlevel 3 in SystemV. The emergency.target file is similar to single-user mode. Targets and services are systemd units.

    -

    Many Linux distributions default to installing a GUI desktop interface so that the installed systems can be used as workstations. I always install from a Fedora Live boot USB drive with an Xfce or LXDE desktop. Even when I'm installing a server or other infrastructure type of host (such as the ones I use for routers and firewalls), I use one of these installations that installs a GUI desktop.

    -

    I could install a server without a desktop (and that would be typical for data centers), but that does not meet my needs. It is not that I need the GUI desktop itself, but the LXDE installation includes many of the other tools I use that are not in a default server installation. This means less work for me after the initial installation.

    -

    openvpn [ --askpass [file] ] [ --auth-nocache ] [ --auth-retry type ] [ --auth-user-pass-verify script ] [ --auth-user-pass up ] [ --auth alg ] [ --bcast-buffers n ] [ --ca file ] [ --ccd-exclusive ] [ --cd dir ] [ --cert file ] [ --chroot dir ] [ --cipher alg ] [ --client-cert-not-required ] [ --client-config-dir dir ] [ --client-connect script ] [ --client-disconnect ] [ --client-to-client ] [ --client ] [ --comp-lzo ] [ --comp-noadapt ] [ --config file ] [ --connect-freq n sec ] [ --connect-retry n ] [ --crl-verify crl ] [ --cryptoapicert select-string ] [ --daemon [progname] ] [ --dev-node node ] [ --dev-type device-type ] [ --dev tunX | tapX | null ] [ --dev tunX | tapX ] [ --dh file ] [ --dhcp-option type [parm] ] [ --dhcp-release ] [ --dhcp-renew ] [ --disable-occ ] [ --disable ] [ --down-pre ] [ --down cmd ] [ --duplicate-cn ] [ --echo [parms...] ] [ --engine [engine-name] ] [ --explicit-exit-notify [n] ] [ --fast-io ] [ --float ] [ --fragment max ] [ --genkey ] [ --group group ] [ --hand-window n ] [ --hash-size r v ] [ --help ] [ --http-proxy-option type [parm] ] [ --http-proxy-retry ] [ --http-proxy-timeout n ] [ --http-proxy server port [authfile] [auth-method] ] [ --ifconfig-noexec ] [ --ifconfig-nowarn ] [ --ifconfig-pool-linear ] [ --ifconfig-pool-persist file [seconds] ] [ --ifconfig-pool start-IP end-IP [netmask] ] [ --ifconfig-push local remote-netmask ] [ --ifconfig l rn ] [ --inactive n ] [ --inetd [wait|nowait] [progname] ] [ --ip-win32 method ] [ --ipchange cmd ] [ --iroute network [netmask] ] [ --keepalive n m ] [ --key-method m ] [ --key file ] [ --keysizen ] [ --learn-address cmd ] [ --link-mtu n ] [ --local host ] [ --log-append file ] [ --log file ] [ --suppress-timestamps ] [ --lport port ] [ --management-hold ] [ --management-log-cache n ] [ --management-query-passwords ] [ --management IP port [pw-file] ] [ --max-clients n ] [ --max-routes-per-client n ] [ --mktun ] [ --mlock ] [ --mode m ] [ --mssfix max ] [ --mtu-disc type ] [ --mtu-test ] [ --mute-replay-warnings ] [ --mute n ] [ --nice n ] [ --no-iv ] [ --no-replay ] [ --nobind ] [ --ns-cert-type client|server ] [ --passtos ] [ --pause-exit ] [ --persist-key ] [ --persist-local-ip ] [ --persist-remote-ip ] [ --persist-tun ] [ --ping-exit n ] [ --ping-restart n ] [ --ping-timer-rem ] [ --ping n ] [ --pkcs12 file ] [ --plugin module-pathname init-string ] [ --port port ] [ --proto p ] [ --pull ] [ --push-reset ] [ --push "option" ] [ --rcvbuf size ] [ --redirect-gateway["local"] ["def1"] ] [ --remap-usr1 signal ] [ --remote-random ] [ --remote host [port] ] [ --reneg-bytes n ] [ --reneg-pkts n ] [ --reneg-sec n ] [ --replay-persist file ] [ --replay-window n [t] ] [ --resolv-retry n ] [ --rmtun] [ --route-delay [n] [w] ] [ --route-gateway gw ] [ --route-method m ] [ --route-noexec ] [ --route-up cmd ] [ --route network [netmask] [gateway] [metric] ] [ --rport port ] [ --secret file [direction] ] [ --secret file ] [ --server-bridge gateway netmask pool-start-IP pool-end-IP ] [ --server network netmask ] [ --service exit-event [0|1] ] [ --setenv name value ] [ --shaper n ] [ --show-adapters ] [ --show-ciphers ] [ --show-digests ] [ --show-engines ] [ --show-net-up ] [ --show-net ] [ --show-tls ] [ --show-valid-subnets ] [ --single-session ] [ --sndbuf size ] [ --socks-proxy-retry ] [ --socks-proxy server [port] ] [ --status file [n] ] [ --status-version n] [ --syslog [progname] ] [ --tap-sleep n ] [ --tcp-queue-limit n ] [ --test-crypto ] [ --tls-auth file [direction] ] [ --tls-cipher l ] [ --tls-client ] [ --tls-exit ] [ --tls-remote x509name ] [ --tls-server ] [ --tls-timeout n ] [ --tls-verify cmd ] [ --tmp-dir dir ] [ --tran-window n ] [ --tun-ipv6 ] [ --tun-mtu-extra n ] [ --tun-mtu n ] [ --txqueuelen n ] [ --up-delay ] [ --up-restart ] [ --up cmd ] [ --user user ] [ --username-as-common-name ] [ --verb n ] [ --writepid file ]

    aaccfb2cb3
    -
    -
    \ No newline at end of file diff --git a/spaces/contluForse/HuggingGPT/assets/Download the Nameless Gangster Rules of the Time full movie with Italian audio - torrent magnet link.md b/spaces/contluForse/HuggingGPT/assets/Download the Nameless Gangster Rules of the Time full movie with Italian audio - torrent magnet link.md deleted file mode 100644 index 0beb51eda9e5e9bf296b21e291e868a6722d9b00..0000000000000000000000000000000000000000 --- a/spaces/contluForse/HuggingGPT/assets/Download the Nameless Gangster Rules of the Time full movie with Italian audio - torrent magnet link.md +++ /dev/null @@ -1,6 +0,0 @@ -

    Download the Nameless Gangster: Rules of the Time full movie italian dubbed in torrent


    Download ››››› https://ssurll.com/2uzwcQ



    -
    - aaccfb2cb3
    -
    -
    -

    diff --git a/spaces/coreml-community/ControlNet-v1-1-Annotators-cpu/annotator/leres/__init__.py b/spaces/coreml-community/ControlNet-v1-1-Annotators-cpu/annotator/leres/__init__.py deleted file mode 100644 index 9b11e44a954b68a634326d097bcb54b8876524b4..0000000000000000000000000000000000000000 --- a/spaces/coreml-community/ControlNet-v1-1-Annotators-cpu/annotator/leres/__init__.py +++ /dev/null @@ -1,113 +0,0 @@ -import cv2 -import numpy as np -import torch -import os -from modules import devices, shared -from annotator.annotator_path import models_path -from torchvision.transforms import transforms - -# AdelaiDepth/LeReS imports -from .leres.depthmap import estimateleres, estimateboost -from .leres.multi_depth_model_woauxi import RelDepthModel -from .leres.net_tools import strip_prefix_if_present - -# pix2pix/merge net imports -from .pix2pix.options.test_options import TestOptions -from .pix2pix.models.pix2pix4depth_model import Pix2Pix4DepthModel - -base_model_path = os.path.join(models_path, "leres") -old_modeldir = os.path.dirname(os.path.realpath(__file__)) - -remote_model_path_leres = "https://huggingface.co/lllyasviel/Annotators/resolve/main/res101.pth" -remote_model_path_pix2pix = "https://huggingface.co/lllyasviel/Annotators/resolve/main/latest_net_G.pth" - -model = None -pix2pixmodel = None - -def unload_leres_model(): - global model, pix2pixmodel - if model is not None: - model = model.cpu() - if pix2pixmodel is not None: - pix2pixmodel = pix2pixmodel.unload_network('G') - - -def apply_leres(input_image, thr_a, thr_b, boost=False): - global model, pix2pixmodel - if model is None: - model_path = os.path.join(base_model_path, "res101.pth") - old_model_path = os.path.join(old_modeldir, "res101.pth") - - if os.path.exists(old_model_path): - model_path = old_model_path - elif not os.path.exists(model_path): - from basicsr.utils.download_util import load_file_from_url - load_file_from_url(remote_model_path_leres, model_dir=base_model_path) - - if torch.cuda.is_available(): - checkpoint = torch.load(model_path) - else: - checkpoint = torch.load(model_path, map_location=torch.device('cpu')) - - model = RelDepthModel(backbone='resnext101') - model.load_state_dict(strip_prefix_if_present(checkpoint['depth_model'], "module."), strict=True) - del checkpoint - - if boost and pix2pixmodel is None: - pix2pixmodel_path = os.path.join(base_model_path, "latest_net_G.pth") - if not os.path.exists(pix2pixmodel_path): - from basicsr.utils.download_util import load_file_from_url - load_file_from_url(remote_model_path_pix2pix, model_dir=base_model_path) - - opt = TestOptions().parse() - if not torch.cuda.is_available(): - opt.gpu_ids = [] # cpu mode - pix2pixmodel = Pix2Pix4DepthModel(opt) - pix2pixmodel.save_dir = base_model_path - pix2pixmodel.load_networks('latest') - pix2pixmodel.eval() - - if devices.get_device_for("controlnet").type != 'mps': - model = model.to(devices.get_device_for("controlnet")) - - assert input_image.ndim == 3 - height, width, dim = input_image.shape - - with torch.no_grad(): - - if boost: - depth = estimateboost(input_image, model, 0, pix2pixmodel, max(width, height)) - else: - depth = estimateleres(input_image, model, width, height) - - numbytes=2 - depth_min = depth.min() - depth_max = depth.max() - max_val = (2**(8*numbytes))-1 - - # check output before normalizing and mapping to 16 bit - if depth_max - depth_min > np.finfo("float").eps: - out = max_val * (depth - depth_min) / (depth_max - depth_min) - else: - out = np.zeros(depth.shape) - - # single channel, 16 bit image - depth_image = out.astype("uint16") - - # convert to uint8 - depth_image = cv2.convertScaleAbs(depth_image, alpha=(255.0/65535.0)) - - # remove near - if thr_a != 0: - thr_a = ((thr_a/100)*255) - depth_image = cv2.threshold(depth_image, thr_a, 255, cv2.THRESH_TOZERO)[1] - - # invert image - depth_image = cv2.bitwise_not(depth_image) - - # remove bg - if thr_b != 0: - thr_b = ((thr_b/100)*255) - depth_image = cv2.threshold(depth_image, thr_b, 255, cv2.THRESH_TOZERO)[1] - - return depth_image diff --git a/spaces/coreml-community/ControlNet-v1-1-Annotators-cpu/annotator/mmpkg/mmseg/models/decode_heads/point_head.py b/spaces/coreml-community/ControlNet-v1-1-Annotators-cpu/annotator/mmpkg/mmseg/models/decode_heads/point_head.py deleted file mode 100644 index c6782763e30386d99115977ebe5a4d9291bae8d9..0000000000000000000000000000000000000000 --- a/spaces/coreml-community/ControlNet-v1-1-Annotators-cpu/annotator/mmpkg/mmseg/models/decode_heads/point_head.py +++ /dev/null @@ -1,354 +0,0 @@ -# Modified from https://github.com/facebookresearch/detectron2/tree/master/projects/PointRend/point_head/point_head.py # noqa - -import torch -import torch.nn as nn - -try: - from mmcv.cnn import ConvModule, normal_init - from mmcv.ops import point_sample -except ImportError: - from annotator.mmpkg.mmcv.cnn import ConvModule, normal_init - from annotator.mmpkg.mmcv.ops import point_sample - -from annotator.mmpkg.mmseg.models.builder import HEADS -from annotator.mmpkg.mmseg.ops import resize -from ..losses import accuracy -from .cascade_decode_head import BaseCascadeDecodeHead - - -def calculate_uncertainty(seg_logits): - """Estimate uncertainty based on seg logits. - - For each location of the prediction ``seg_logits`` we estimate - uncertainty as the difference between top first and top second - predicted logits. - - Args: - seg_logits (Tensor): Semantic segmentation logits, - shape (batch_size, num_classes, height, width). - - Returns: - scores (Tensor): T uncertainty scores with the most uncertain - locations having the highest uncertainty score, shape ( - batch_size, 1, height, width) - """ - top2_scores = torch.topk(seg_logits, k=2, dim=1)[0] - return (top2_scores[:, 1] - top2_scores[:, 0]).unsqueeze(1) - - -@HEADS.register_module() -class PointHead(BaseCascadeDecodeHead): - """A mask point head use in PointRend. - - ``PointHead`` use shared multi-layer perceptron (equivalent to - nn.Conv1d) to predict the logit of input points. The fine-grained feature - and coarse feature will be concatenate together for predication. - - Args: - num_fcs (int): Number of fc layers in the head. Default: 3. - in_channels (int): Number of input channels. Default: 256. - fc_channels (int): Number of fc channels. Default: 256. - num_classes (int): Number of classes for logits. Default: 80. - class_agnostic (bool): Whether use class agnostic classification. - If so, the output channels of logits will be 1. Default: False. - coarse_pred_each_layer (bool): Whether concatenate coarse feature with - the output of each fc layer. Default: True. - conv_cfg (dict|None): Dictionary to construct and config conv layer. - Default: dict(type='Conv1d')) - norm_cfg (dict|None): Dictionary to construct and config norm layer. - Default: None. - loss_point (dict): Dictionary to construct and config loss layer of - point head. Default: dict(type='CrossEntropyLoss', use_mask=True, - loss_weight=1.0). - """ - - def __init__(self, - num_fcs=3, - coarse_pred_each_layer=True, - conv_cfg=dict(type='Conv1d'), - norm_cfg=None, - act_cfg=dict(type='ReLU', inplace=False), - **kwargs): - super(PointHead, self).__init__( - input_transform='multiple_select', - conv_cfg=conv_cfg, - norm_cfg=norm_cfg, - act_cfg=act_cfg, - **kwargs) - - self.num_fcs = num_fcs - self.coarse_pred_each_layer = coarse_pred_each_layer - - fc_in_channels = sum(self.in_channels) + self.num_classes - fc_channels = self.channels - self.fcs = nn.ModuleList() - for k in range(num_fcs): - fc = ConvModule( - fc_in_channels, - fc_channels, - kernel_size=1, - stride=1, - padding=0, - conv_cfg=conv_cfg, - norm_cfg=norm_cfg, - act_cfg=act_cfg) - self.fcs.append(fc) - fc_in_channels = fc_channels - fc_in_channels += self.num_classes if self.coarse_pred_each_layer \ - else 0 - self.fc_seg = nn.Conv1d( - fc_in_channels, - self.num_classes, - kernel_size=1, - stride=1, - padding=0) - if self.dropout_ratio > 0: - self.dropout = nn.Dropout(self.dropout_ratio) - delattr(self, 'conv_seg') - - def init_weights(self): - """Initialize weights of classification layer.""" - normal_init(self.fc_seg, std=0.001) - - def cls_seg(self, feat): - """Classify each pixel with fc.""" - if self.dropout is not None: - feat = self.dropout(feat) - output = self.fc_seg(feat) - return output - - def forward(self, fine_grained_point_feats, coarse_point_feats): - x = torch.cat([fine_grained_point_feats, coarse_point_feats], dim=1) - for fc in self.fcs: - x = fc(x) - if self.coarse_pred_each_layer: - x = torch.cat((x, coarse_point_feats), dim=1) - return self.cls_seg(x) - - def _get_fine_grained_point_feats(self, x, points): - """Sample from fine grained features. - - Args: - x (list[Tensor]): Feature pyramid from by neck or backbone. - points (Tensor): Point coordinates, shape (batch_size, - num_points, 2). - - Returns: - fine_grained_feats (Tensor): Sampled fine grained feature, - shape (batch_size, sum(channels of x), num_points). - """ - - fine_grained_feats_list = [ - point_sample(_, points, align_corners=self.align_corners) - for _ in x - ] - if len(fine_grained_feats_list) > 1: - fine_grained_feats = torch.cat(fine_grained_feats_list, dim=1) - else: - fine_grained_feats = fine_grained_feats_list[0] - - return fine_grained_feats - - def _get_coarse_point_feats(self, prev_output, points): - """Sample from fine grained features. - - Args: - prev_output (list[Tensor]): Prediction of previous decode head. - points (Tensor): Point coordinates, shape (batch_size, - num_points, 2). - - Returns: - coarse_feats (Tensor): Sampled coarse feature, shape (batch_size, - num_classes, num_points). - """ - - coarse_feats = point_sample( - prev_output, points, align_corners=self.align_corners) - - return coarse_feats - - def forward_train(self, inputs, prev_output, img_metas, gt_semantic_seg, - train_cfg): - """Forward function for training. - Args: - inputs (list[Tensor]): List of multi-level img features. - prev_output (Tensor): The output of previous decode head. - img_metas (list[dict]): List of image info dict where each dict - has: 'img_shape', 'scale_factor', 'flip', and may also contain - 'filename', 'ori_shape', 'pad_shape', and 'img_norm_cfg'. - For details on the values of these keys see - `mmseg/datasets/pipelines/formatting.py:Collect`. - gt_semantic_seg (Tensor): Semantic segmentation masks - used if the architecture supports semantic segmentation task. - train_cfg (dict): The training config. - - Returns: - dict[str, Tensor]: a dictionary of loss components - """ - x = self._transform_inputs(inputs) - with torch.no_grad(): - points = self.get_points_train( - prev_output, calculate_uncertainty, cfg=train_cfg) - fine_grained_point_feats = self._get_fine_grained_point_feats( - x, points) - coarse_point_feats = self._get_coarse_point_feats(prev_output, points) - point_logits = self.forward(fine_grained_point_feats, - coarse_point_feats) - point_label = point_sample( - gt_semantic_seg.float(), - points, - mode='nearest', - align_corners=self.align_corners) - point_label = point_label.squeeze(1).long() - - losses = self.losses(point_logits, point_label) - - return losses - - def forward_test(self, inputs, prev_output, img_metas, test_cfg): - """Forward function for testing. - - Args: - inputs (list[Tensor]): List of multi-level img features. - prev_output (Tensor): The output of previous decode head. - img_metas (list[dict]): List of image info dict where each dict - has: 'img_shape', 'scale_factor', 'flip', and may also contain - 'filename', 'ori_shape', 'pad_shape', and 'img_norm_cfg'. - For details on the values of these keys see - `mmseg/datasets/pipelines/formatting.py:Collect`. - test_cfg (dict): The testing config. - - Returns: - Tensor: Output segmentation map. - """ - - x = self._transform_inputs(inputs) - refined_seg_logits = prev_output.clone() - for _ in range(test_cfg.subdivision_steps): - refined_seg_logits = resize( - refined_seg_logits, - scale_factor=test_cfg.scale_factor, - mode='bilinear', - align_corners=self.align_corners) - batch_size, channels, height, width = refined_seg_logits.shape - point_indices, points = self.get_points_test( - refined_seg_logits, calculate_uncertainty, cfg=test_cfg) - fine_grained_point_feats = self._get_fine_grained_point_feats( - x, points) - coarse_point_feats = self._get_coarse_point_feats( - prev_output, points) - point_logits = self.forward(fine_grained_point_feats, - coarse_point_feats) - - point_indices = point_indices.unsqueeze(1).expand(-1, channels, -1) - refined_seg_logits = refined_seg_logits.reshape( - batch_size, channels, height * width) - refined_seg_logits = refined_seg_logits.scatter_( - 2, point_indices, point_logits) - refined_seg_logits = refined_seg_logits.view( - batch_size, channels, height, width) - - return refined_seg_logits - - def losses(self, point_logits, point_label): - """Compute segmentation loss.""" - loss = dict() - loss['loss_point'] = self.loss_decode( - point_logits, point_label, ignore_index=self.ignore_index) - loss['acc_point'] = accuracy(point_logits, point_label) - return loss - - def get_points_train(self, seg_logits, uncertainty_func, cfg): - """Sample points for training. - - Sample points in [0, 1] x [0, 1] coordinate space based on their - uncertainty. The uncertainties are calculated for each point using - 'uncertainty_func' function that takes point's logit prediction as - input. - - Args: - seg_logits (Tensor): Semantic segmentation logits, shape ( - batch_size, num_classes, height, width). - uncertainty_func (func): uncertainty calculation function. - cfg (dict): Training config of point head. - - Returns: - point_coords (Tensor): A tensor of shape (batch_size, num_points, - 2) that contains the coordinates of ``num_points`` sampled - points. - """ - num_points = cfg.num_points - oversample_ratio = cfg.oversample_ratio - importance_sample_ratio = cfg.importance_sample_ratio - assert oversample_ratio >= 1 - assert 0 <= importance_sample_ratio <= 1 - batch_size = seg_logits.shape[0] - num_sampled = int(num_points * oversample_ratio) - point_coords = torch.rand( - batch_size, num_sampled, 2, device=seg_logits.device) - point_logits = point_sample(seg_logits, point_coords) - # It is crucial to calculate uncertainty based on the sampled - # prediction value for the points. Calculating uncertainties of the - # coarse predictions first and sampling them for points leads to - # incorrect results. To illustrate this: assume uncertainty func( - # logits)=-abs(logits), a sampled point between two coarse - # predictions with -1 and 1 logits has 0 logits, and therefore 0 - # uncertainty value. However, if we calculate uncertainties for the - # coarse predictions first, both will have -1 uncertainty, - # and sampled point will get -1 uncertainty. - point_uncertainties = uncertainty_func(point_logits) - num_uncertain_points = int(importance_sample_ratio * num_points) - num_random_points = num_points - num_uncertain_points - idx = torch.topk( - point_uncertainties[:, 0, :], k=num_uncertain_points, dim=1)[1] - shift = num_sampled * torch.arange( - batch_size, dtype=torch.long, device=seg_logits.device) - idx += shift[:, None] - point_coords = point_coords.view(-1, 2)[idx.view(-1), :].view( - batch_size, num_uncertain_points, 2) - if num_random_points > 0: - rand_point_coords = torch.rand( - batch_size, num_random_points, 2, device=seg_logits.device) - point_coords = torch.cat((point_coords, rand_point_coords), dim=1) - return point_coords - - def get_points_test(self, seg_logits, uncertainty_func, cfg): - """Sample points for testing. - - Find ``num_points`` most uncertain points from ``uncertainty_map``. - - Args: - seg_logits (Tensor): A tensor of shape (batch_size, num_classes, - height, width) for class-specific or class-agnostic prediction. - uncertainty_func (func): uncertainty calculation function. - cfg (dict): Testing config of point head. - - Returns: - point_indices (Tensor): A tensor of shape (batch_size, num_points) - that contains indices from [0, height x width) of the most - uncertain points. - point_coords (Tensor): A tensor of shape (batch_size, num_points, - 2) that contains [0, 1] x [0, 1] normalized coordinates of the - most uncertain points from the ``height x width`` grid . - """ - - num_points = cfg.subdivision_num_points - uncertainty_map = uncertainty_func(seg_logits) - batch_size, _, height, width = uncertainty_map.shape - h_step = 1.0 / height - w_step = 1.0 / width - - uncertainty_map = uncertainty_map.view(batch_size, height * width) - num_points = min(height * width, num_points) - point_indices = uncertainty_map.topk(num_points, dim=1)[1] - point_coords = torch.zeros( - batch_size, - num_points, - 2, - dtype=torch.float, - device=seg_logits.device) - point_coords[:, :, 0] = w_step / 2.0 + (point_indices % - width).float() * w_step - point_coords[:, :, 1] = h_step / 2.0 + (point_indices // - width).float() * h_step - return point_indices, point_coords diff --git a/spaces/czczycz/QABot/README.md b/spaces/czczycz/QABot/README.md deleted file mode 100644 index 21e956a3e582842b63c22ec0d4436bd357d0b99f..0000000000000000000000000000000000000000 --- a/spaces/czczycz/QABot/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: QABot -emoji: 💻 -colorFrom: yellow -colorTo: blue -sdk: streamlit -sdk_version: 1.21.0 -app_file: app.py -pinned: false -license: openrail ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/dawood/chatbot-guide/README.md b/spaces/dawood/chatbot-guide/README.md deleted file mode 100644 index 931ac9df17136d0de0320f8ee1def31238d5129d..0000000000000000000000000000000000000000 --- a/spaces/dawood/chatbot-guide/README.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: Chatbot Minimal -emoji: 📊 -colorFrom: red -colorTo: indigo -sdk: gradio -sdk_version: 3.16.2 -app_file: app.py -pinned: false -license: apache-2.0 -duplicated_from: abidlabs/chatbot-stylized ---- - -# Configuration - -`title`: _string_ -Display title for the Space - -`emoji`: _string_ -Space emoji (emoji-only character allowed) - -`colorFrom`: _string_ -Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray) - -`colorTo`: _string_ -Color for Thumbnail gradient (red, yellow, green, blue, indigo, purple, pink, gray) - -`sdk`: _string_ -Can be either `gradio`, `streamlit`, or `static` - -`sdk_version` : _string_ -Only applicable for `streamlit` SDK. -See [doc](https://hf.co/docs/hub/spaces) for more info on supported versions. - -`app_file`: _string_ -Path to your main application file (which contains either `gradio` or `streamlit` Python code, or `static` html code). -Path is relative to the root of the repository. - -`models`: _List[string]_ -HF model IDs (like "gpt2" or "deepset/roberta-base-squad2") used in the Space. -Will be parsed automatically from your code if not specified here. - -`datasets`: _List[string]_ -HF dataset IDs (like "common_voice" or "oscar-corpus/OSCAR-2109") used in the Space. -Will be parsed automatically from your code if not specified here. - -`pinned`: _boolean_ -Whether the Space stays on top of your list. diff --git a/spaces/dcarpintero/nlp-summarizer-pegasus/.venv/lib/python3.9/site-packages/gradio/templates/frontend/assets/index-8e74b63c.js b/spaces/dcarpintero/nlp-summarizer-pegasus/.venv/lib/python3.9/site-packages/gradio/templates/frontend/assets/index-8e74b63c.js deleted file mode 100644 index 6d4a8114883d6fd4eb719da812107e04d99a2f64..0000000000000000000000000000000000000000 --- a/spaces/dcarpintero/nlp-summarizer-pegasus/.venv/lib/python3.9/site-packages/gradio/templates/frontend/assets/index-8e74b63c.js +++ /dev/null @@ -1,13264 +0,0 @@ -import{al as $r,S as No,e as wo,s as Fo,F as An,o as dr,P as Ya,G as Pn,h as fi,w as en,r as Ka,u as tn,v as Qa,k as pi,H as Cn,D as xf,am as Rf,m as qr,g as Ti,j as Zr,N as Bo,V as Of,ae as Mf,Q as If,R as Df,C as Fv,a4 as Pf,n as Lf,O as dl,T as fl,a9 as Bv,ab as Uv,ac as Vv,ad as kv,E as Jr}from"./index-39fce9e2.js";import{n as Nf}from"./ModifyUpload.svelte_svelte_type_style_lang-14b768c9.js";import{B as wf}from"./Button-79f6e3bf.js";import{B as pl}from"./BlockLabel-b1428685.js";import{E as Gv}from"./Empty-16d6169a.js";import{F as qa}from"./File-9c296a9c.js";import{I as zv}from"./IconButton-0ac328a0.js";import{D as jv}from"./Download-0afd7f1a.js";import{U as Hv}from"./UploadText-61f66d92.js";import{U as Wv}from"./Upload-78d05dac.js";import{M as Xv}from"./ModifyUpload-02c07c98.js";import{E as wb}from"./Model3d-1cd0dc4b.js";var Ff={exports:{}};(function(Qe,Be){(function(Ae,v){Qe.exports=v()})(typeof self<"u"?self:typeof $r<"u"?$r:$r,function(){return function(Ae){var v={};function f(B){if(v[B])return v[B].exports;var _=v[B]={i:B,l:!1,exports:{}};return Ae[B].call(_.exports,_,_.exports,f),_.l=!0,_.exports}return f.m=Ae,f.c=v,f.d=function(B,_,P){f.o(B,_)||Object.defineProperty(B,_,{enumerable:!0,get:P})},f.r=function(B){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(B,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(B,"__esModule",{value:!0})},f.t=function(B,_){if(1&_&&(B=f(B)),8&_||4&_&&typeof B=="object"&&B&&B.__esModule)return B;var P=Object.create(null);if(f.r(P),Object.defineProperty(P,"default",{enumerable:!0,value:B}),2&_&&typeof B!="string")for(var l in B)f.d(P,l,function(O){return B[O]}.bind(null,l));return P},f.n=function(B){var _=B&&B.__esModule?function(){return B.default}:function(){return B};return f.d(_,"a",_),_},f.o=function(B,_){return Object.prototype.hasOwnProperty.call(B,_)},f.p="",f(f.s=169)}([function(Ae,v,f){f.d(v,"d",function(){return R}),f.d(v,"e",function(){return x}),f.d(v,"f",function(){return m}),f.d(v,"b",function(){return c}),f.d(v,"a",function(){return T}),f.d(v,"c",function(){return S});var B=f(14),_=f(28),P=f(44),l=f(11),O=f(74),R=function(){function g(u,h){u===void 0&&(u=0),h===void 0&&(h=0),this.x=u,this.y=h}return g.prototype.toString=function(){return"{X: "+this.x+" Y: "+this.y+"}"},g.prototype.getClassName=function(){return"Vector2"},g.prototype.getHashCode=function(){var u=0|this.x;return u=397*u^(0|this.y)},g.prototype.toArray=function(u,h){return h===void 0&&(h=0),u[h]=this.x,u[h+1]=this.y,this},g.prototype.fromArray=function(u,h){return h===void 0&&(h=0),g.FromArrayToRef(u,h,this),this},g.prototype.asArray=function(){var u=new Array;return this.toArray(u,0),u},g.prototype.copyFrom=function(u){return this.x=u.x,this.y=u.y,this},g.prototype.copyFromFloats=function(u,h){return this.x=u,this.y=h,this},g.prototype.set=function(u,h){return this.copyFromFloats(u,h)},g.prototype.add=function(u){return new g(this.x+u.x,this.y+u.y)},g.prototype.addToRef=function(u,h){return h.x=this.x+u.x,h.y=this.y+u.y,this},g.prototype.addInPlace=function(u){return this.x+=u.x,this.y+=u.y,this},g.prototype.addVector3=function(u){return new g(this.x+u.x,this.y+u.y)},g.prototype.subtract=function(u){return new g(this.x-u.x,this.y-u.y)},g.prototype.subtractToRef=function(u,h){return h.x=this.x-u.x,h.y=this.y-u.y,this},g.prototype.subtractInPlace=function(u){return this.x-=u.x,this.y-=u.y,this},g.prototype.multiplyInPlace=function(u){return this.x*=u.x,this.y*=u.y,this},g.prototype.multiply=function(u){return new g(this.x*u.x,this.y*u.y)},g.prototype.multiplyToRef=function(u,h){return h.x=this.x*u.x,h.y=this.y*u.y,this},g.prototype.multiplyByFloats=function(u,h){return new g(this.x*u,this.y*h)},g.prototype.divide=function(u){return new g(this.x/u.x,this.y/u.y)},g.prototype.divideToRef=function(u,h){return h.x=this.x/u.x,h.y=this.y/u.y,this},g.prototype.divideInPlace=function(u){return this.divideToRef(u,this)},g.prototype.negate=function(){return new g(-this.x,-this.y)},g.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this},g.prototype.negateToRef=function(u){return u.copyFromFloats(-1*this.x,-1*this.y)},g.prototype.scaleInPlace=function(u){return this.x*=u,this.y*=u,this},g.prototype.scale=function(u){var h=new g(0,0);return this.scaleToRef(u,h),h},g.prototype.scaleToRef=function(u,h){return h.x=this.x*u,h.y=this.y*u,this},g.prototype.scaleAndAddToRef=function(u,h){return h.x+=this.x*u,h.y+=this.y*u,this},g.prototype.equals=function(u){return u&&this.x===u.x&&this.y===u.y},g.prototype.equalsWithEpsilon=function(u,h){return h===void 0&&(h=_.a),u&&B.a.WithinEpsilon(this.x,u.x,h)&&B.a.WithinEpsilon(this.y,u.y,h)},g.prototype.floor=function(){return new g(Math.floor(this.x),Math.floor(this.y))},g.prototype.fract=function(){return new g(this.x-Math.floor(this.x),this.y-Math.floor(this.y))},g.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},g.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y},g.prototype.normalize=function(){var u=this.length();return u===0||(this.x/=u,this.y/=u),this},g.prototype.clone=function(){return new g(this.x,this.y)},g.Zero=function(){return new g(0,0)},g.One=function(){return new g(1,1)},g.FromArray=function(u,h){return h===void 0&&(h=0),new g(u[h],u[h+1])},g.FromArrayToRef=function(u,h,b){b.x=u[h],b.y=u[h+1]},g.CatmullRom=function(u,h,b,E,D){var w=D*D,N=D*w;return new g(.5*(2*h.x+(-u.x+b.x)*D+(2*u.x-5*h.x+4*b.x-E.x)*w+(-u.x+3*h.x-3*b.x+E.x)*N),.5*(2*h.y+(-u.y+b.y)*D+(2*u.y-5*h.y+4*b.y-E.y)*w+(-u.y+3*h.y-3*b.y+E.y)*N))},g.Clamp=function(u,h,b){var E=u.x;E=(E=E>b.x?b.x:E)b.y?b.y:D)h.x?u.x:h.x,u.y>h.y?u.y:h.y)},g.Transform=function(u,h){var b=g.Zero();return g.TransformToRef(u,h,b),b},g.TransformToRef=function(u,h,b){var E=h.m,D=u.x*E[0]+u.y*E[4]+E[12],w=u.x*E[1]+u.y*E[5]+E[13];b.x=D,b.y=w},g.PointInTriangle=function(u,h,b,E){var D=.5*(-b.y*E.x+h.y*(-b.x+E.x)+h.x*(b.y-E.y)+b.x*E.y),w=D<0?-1:1,N=(h.y*E.x-h.x*E.y+(E.y-h.y)*u.x+(h.x-E.x)*u.y)*w,I=(h.x*b.y-h.y*b.x+(h.y-b.y)*u.x+(b.x-h.x)*u.y)*w;return N>0&&I>0&&N+I<2*D*w},g.Distance=function(u,h){return Math.sqrt(g.DistanceSquared(u,h))},g.DistanceSquared=function(u,h){var b=u.x-h.x,E=u.y-h.y;return b*b+E*E},g.Center=function(u,h){var b=u.add(h);return b.scaleInPlace(.5),b},g.DistanceOfPointFromSegment=function(u,h,b){var E=g.DistanceSquared(h,b);if(E===0)return g.Distance(u,h);var D=b.subtract(h),w=Math.max(0,Math.min(1,g.Dot(u.subtract(h),D)/E)),N=h.add(D.multiplyByFloats(w,w));return g.Distance(u,N)},g}(),x=function(){function g(u,h,b){u===void 0&&(u=0),h===void 0&&(h=0),b===void 0&&(b=0),this._isDirty=!0,this._x=u,this._y=h,this._z=b}return Object.defineProperty(g.prototype,"x",{get:function(){return this._x},set:function(u){this._x=u,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"y",{get:function(){return this._y},set:function(u){this._y=u,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"z",{get:function(){return this._z},set:function(u){this._z=u,this._isDirty=!0},enumerable:!1,configurable:!0}),g.prototype.toString=function(){return"{X: "+this._x+" Y:"+this._y+" Z:"+this._z+"}"},g.prototype.getClassName=function(){return"Vector3"},g.prototype.getHashCode=function(){var u=0|this._x;return u=397*(u=397*u^(0|this._y))^(0|this._z)},g.prototype.asArray=function(){var u=[];return this.toArray(u,0),u},g.prototype.toArray=function(u,h){return h===void 0&&(h=0),u[h]=this._x,u[h+1]=this._y,u[h+2]=this._z,this},g.prototype.fromArray=function(u,h){return h===void 0&&(h=0),g.FromArrayToRef(u,h,this),this},g.prototype.toQuaternion=function(){return c.RotationYawPitchRoll(this._y,this._x,this._z)},g.prototype.addInPlace=function(u){return this.addInPlaceFromFloats(u._x,u._y,u._z)},g.prototype.addInPlaceFromFloats=function(u,h,b){return this.x+=u,this.y+=h,this.z+=b,this},g.prototype.add=function(u){return new g(this._x+u._x,this._y+u._y,this._z+u._z)},g.prototype.addToRef=function(u,h){return h.copyFromFloats(this._x+u._x,this._y+u._y,this._z+u._z)},g.prototype.subtractInPlace=function(u){return this.x-=u._x,this.y-=u._y,this.z-=u._z,this},g.prototype.subtract=function(u){return new g(this._x-u._x,this._y-u._y,this._z-u._z)},g.prototype.subtractToRef=function(u,h){return this.subtractFromFloatsToRef(u._x,u._y,u._z,h)},g.prototype.subtractFromFloats=function(u,h,b){return new g(this._x-u,this._y-h,this._z-b)},g.prototype.subtractFromFloatsToRef=function(u,h,b,E){return E.copyFromFloats(this._x-u,this._y-h,this._z-b)},g.prototype.negate=function(){return new g(-this._x,-this._y,-this._z)},g.prototype.negateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},g.prototype.negateToRef=function(u){return u.copyFromFloats(-1*this._x,-1*this._y,-1*this._z)},g.prototype.scaleInPlace=function(u){return this.x*=u,this.y*=u,this.z*=u,this},g.prototype.scale=function(u){return new g(this._x*u,this._y*u,this._z*u)},g.prototype.scaleToRef=function(u,h){return h.copyFromFloats(this._x*u,this._y*u,this._z*u)},g.prototype.scaleAndAddToRef=function(u,h){return h.addInPlaceFromFloats(this._x*u,this._y*u,this._z*u)},g.prototype.projectOnPlane=function(u,h){var b=g.Zero();return this.projectOnPlaneToRef(u,h,b),b},g.prototype.projectOnPlaneToRef=function(u,h,b){var E=u.normal,D=u.d,w=A.Vector3[0];this.subtractToRef(h,w),w.normalize();var N=g.Dot(w,E),I=-(g.Dot(h,E)+D)/N,V=w.scaleInPlace(I);h.addToRef(V,b)},g.prototype.equals=function(u){return u&&this._x===u._x&&this._y===u._y&&this._z===u._z},g.prototype.equalsWithEpsilon=function(u,h){return h===void 0&&(h=_.a),u&&B.a.WithinEpsilon(this._x,u._x,h)&&B.a.WithinEpsilon(this._y,u._y,h)&&B.a.WithinEpsilon(this._z,u._z,h)},g.prototype.equalsToFloats=function(u,h,b){return this._x===u&&this._y===h&&this._z===b},g.prototype.multiplyInPlace=function(u){return this.x*=u._x,this.y*=u._y,this.z*=u._z,this},g.prototype.multiply=function(u){return this.multiplyByFloats(u._x,u._y,u._z)},g.prototype.multiplyToRef=function(u,h){return h.copyFromFloats(this._x*u._x,this._y*u._y,this._z*u._z)},g.prototype.multiplyByFloats=function(u,h,b){return new g(this._x*u,this._y*h,this._z*b)},g.prototype.divide=function(u){return new g(this._x/u._x,this._y/u._y,this._z/u._z)},g.prototype.divideToRef=function(u,h){return h.copyFromFloats(this._x/u._x,this._y/u._y,this._z/u._z)},g.prototype.divideInPlace=function(u){return this.divideToRef(u,this)},g.prototype.minimizeInPlace=function(u){return this.minimizeInPlaceFromFloats(u._x,u._y,u._z)},g.prototype.maximizeInPlace=function(u){return this.maximizeInPlaceFromFloats(u._x,u._y,u._z)},g.prototype.minimizeInPlaceFromFloats=function(u,h,b){return uthis._x&&(this.x=u),h>this._y&&(this.y=h),b>this._z&&(this.z=b),this},g.prototype.isNonUniformWithinEpsilon=function(u){var h=Math.abs(this._x),b=Math.abs(this._y);if(!B.a.WithinEpsilon(h,b,u))return!0;var E=Math.abs(this._z);return!B.a.WithinEpsilon(h,E,u)||!B.a.WithinEpsilon(b,E,u)},Object.defineProperty(g.prototype,"isNonUniform",{get:function(){var u=Math.abs(this._x);return u!==Math.abs(this._y)||u!==Math.abs(this._z)},enumerable:!1,configurable:!0}),g.prototype.floor=function(){return new g(Math.floor(this._x),Math.floor(this._y),Math.floor(this._z))},g.prototype.fract=function(){return new g(this._x-Math.floor(this._x),this._y-Math.floor(this._y),this._z-Math.floor(this._z))},g.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z)},g.prototype.lengthSquared=function(){return this._x*this._x+this._y*this._y+this._z*this._z},g.prototype.normalize=function(){return this.normalizeFromLength(this.length())},g.prototype.reorderInPlace=function(u){var h=this;return(u=u.toLowerCase())==="xyz"||(A.Vector3[0].copyFrom(this),["x","y","z"].forEach(function(b,E){h[b]=A.Vector3[0][u[E]]})),this},g.prototype.rotateByQuaternionToRef=function(u,h){return u.toRotationMatrix(A.Matrix[0]),g.TransformCoordinatesToRef(this,A.Matrix[0],h),h},g.prototype.rotateByQuaternionAroundPointToRef=function(u,h,b){return this.subtractToRef(h,A.Vector3[0]),A.Vector3[0].rotateByQuaternionToRef(u,A.Vector3[0]),h.addToRef(A.Vector3[0],b),b},g.prototype.cross=function(u){return g.Cross(this,u)},g.prototype.normalizeFromLength=function(u){return u===0||u===1?this:this.scaleInPlace(1/u)},g.prototype.normalizeToNew=function(){var u=new g(0,0,0);return this.normalizeToRef(u),u},g.prototype.normalizeToRef=function(u){var h=this.length();return h===0||h===1?u.copyFromFloats(this._x,this._y,this._z):this.scaleToRef(1/h,u)},g.prototype.clone=function(){return new g(this._x,this._y,this._z)},g.prototype.copyFrom=function(u){return this.copyFromFloats(u._x,u._y,u._z)},g.prototype.copyFromFloats=function(u,h,b){return this.x=u,this.y=h,this.z=b,this},g.prototype.set=function(u,h,b){return this.copyFromFloats(u,h,b)},g.prototype.setAll=function(u){return this.x=this.y=this.z=u,this},g.GetClipFactor=function(u,h,b,E){var D=g.Dot(u,b)-E;return D/(D-(g.Dot(h,b)-E))},g.GetAngleBetweenVectors=function(u,h,b){var E=u.normalizeToRef(A.Vector3[1]),D=h.normalizeToRef(A.Vector3[2]),w=g.Dot(E,D),N=A.Vector3[3];return g.CrossToRef(E,D,N),g.Dot(N,b)>0?Math.acos(w):-Math.acos(w)},g.FromArray=function(u,h){return h===void 0&&(h=0),new g(u[h],u[h+1],u[h+2])},g.FromFloatArray=function(u,h){return g.FromArray(u,h)},g.FromArrayToRef=function(u,h,b){b.x=u[h],b.y=u[h+1],b.z=u[h+2]},g.FromFloatArrayToRef=function(u,h,b){return g.FromArrayToRef(u,h,b)},g.FromFloatsToRef=function(u,h,b,E){E.copyFromFloats(u,h,b)},g.Zero=function(){return new g(0,0,0)},g.One=function(){return new g(1,1,1)},g.Up=function(){return new g(0,1,0)},Object.defineProperty(g,"UpReadOnly",{get:function(){return g._UpReadOnly},enumerable:!1,configurable:!0}),Object.defineProperty(g,"ZeroReadOnly",{get:function(){return g._ZeroReadOnly},enumerable:!1,configurable:!0}),g.Down=function(){return new g(0,-1,0)},g.Forward=function(u){return u===void 0&&(u=!1),new g(0,0,u?-1:1)},g.Backward=function(u){return u===void 0&&(u=!1),new g(0,0,u?1:-1)},g.Right=function(){return new g(1,0,0)},g.Left=function(){return new g(-1,0,0)},g.TransformCoordinates=function(u,h){var b=g.Zero();return g.TransformCoordinatesToRef(u,h,b),b},g.TransformCoordinatesToRef=function(u,h,b){g.TransformCoordinatesFromFloatsToRef(u._x,u._y,u._z,h,b)},g.TransformCoordinatesFromFloatsToRef=function(u,h,b,E,D){var w=E.m,N=u*w[0]+h*w[4]+b*w[8]+w[12],I=u*w[1]+h*w[5]+b*w[9]+w[13],V=u*w[2]+h*w[6]+b*w[10]+w[14],X=1/(u*w[3]+h*w[7]+b*w[11]+w[15]);D.x=N*X,D.y=I*X,D.z=V*X},g.TransformNormal=function(u,h){var b=g.Zero();return g.TransformNormalToRef(u,h,b),b},g.TransformNormalToRef=function(u,h,b){this.TransformNormalFromFloatsToRef(u._x,u._y,u._z,h,b)},g.TransformNormalFromFloatsToRef=function(u,h,b,E,D){var w=E.m;D.x=u*w[0]+h*w[4]+b*w[8],D.y=u*w[1]+h*w[5]+b*w[9],D.z=u*w[2]+h*w[6]+b*w[10]},g.CatmullRom=function(u,h,b,E,D){var w=D*D,N=D*w;return new g(.5*(2*h._x+(-u._x+b._x)*D+(2*u._x-5*h._x+4*b._x-E._x)*w+(-u._x+3*h._x-3*b._x+E._x)*N),.5*(2*h._y+(-u._y+b._y)*D+(2*u._y-5*h._y+4*b._y-E._y)*w+(-u._y+3*h._y-3*b._y+E._y)*N),.5*(2*h._z+(-u._z+b._z)*D+(2*u._z-5*h._z+4*b._z-E._z)*w+(-u._z+3*h._z-3*b._z+E._z)*N))},g.Clamp=function(u,h,b){var E=new g;return g.ClampToRef(u,h,b,E),E},g.ClampToRef=function(u,h,b,E){var D=u._x;D=(D=D>b._x?b._x:D)b._y?b._y:w)b._z?b._z:N)this.x&&(this.x=u.x),u.y>this.y&&(this.y=u.y),u.z>this.z&&(this.z=u.z),u.w>this.w&&(this.w=u.w),this},g.prototype.floor=function(){return new g(Math.floor(this.x),Math.floor(this.y),Math.floor(this.z),Math.floor(this.w))},g.prototype.fract=function(){return new g(this.x-Math.floor(this.x),this.y-Math.floor(this.y),this.z-Math.floor(this.z),this.w-Math.floor(this.w))},g.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},g.prototype.lengthSquared=function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},g.prototype.normalize=function(){var u=this.length();return u===0?this:this.scaleInPlace(1/u)},g.prototype.toVector3=function(){return new x(this.x,this.y,this.z)},g.prototype.clone=function(){return new g(this.x,this.y,this.z,this.w)},g.prototype.copyFrom=function(u){return this.x=u.x,this.y=u.y,this.z=u.z,this.w=u.w,this},g.prototype.copyFromFloats=function(u,h,b,E){return this.x=u,this.y=h,this.z=b,this.w=E,this},g.prototype.set=function(u,h,b,E){return this.copyFromFloats(u,h,b,E)},g.prototype.setAll=function(u){return this.x=this.y=this.z=this.w=u,this},g.FromArray=function(u,h){return h||(h=0),new g(u[h],u[h+1],u[h+2],u[h+3])},g.FromArrayToRef=function(u,h,b){b.x=u[h],b.y=u[h+1],b.z=u[h+2],b.w=u[h+3]},g.FromFloatArrayToRef=function(u,h,b){g.FromArrayToRef(u,h,b)},g.FromFloatsToRef=function(u,h,b,E,D){D.x=u,D.y=h,D.z=b,D.w=E},g.Zero=function(){return new g(0,0,0,0)},g.One=function(){return new g(1,1,1,1)},g.Normalize=function(u){var h=g.Zero();return g.NormalizeToRef(u,h),h},g.NormalizeToRef=function(u,h){h.copyFrom(u),h.normalize()},g.Minimize=function(u,h){var b=u.clone();return b.minimizeInPlace(h),b},g.Maximize=function(u,h){var b=u.clone();return b.maximizeInPlace(h),b},g.Distance=function(u,h){return Math.sqrt(g.DistanceSquared(u,h))},g.DistanceSquared=function(u,h){var b=u.x-h.x,E=u.y-h.y,D=u.z-h.z,w=u.w-h.w;return b*b+E*E+D*D+w*w},g.Center=function(u,h){var b=u.add(h);return b.scaleInPlace(.5),b},g.TransformNormal=function(u,h){var b=g.Zero();return g.TransformNormalToRef(u,h,b),b},g.TransformNormalToRef=function(u,h,b){var E=h.m,D=u.x*E[0]+u.y*E[4]+u.z*E[8],w=u.x*E[1]+u.y*E[5]+u.z*E[9],N=u.x*E[2]+u.y*E[6]+u.z*E[10];b.x=D,b.y=w,b.z=N,b.w=u.w},g.TransformNormalFromFloatsToRef=function(u,h,b,E,D,w){var N=D.m;w.x=u*N[0]+h*N[4]+b*N[8],w.y=u*N[1]+h*N[5]+b*N[9],w.z=u*N[2]+h*N[6]+b*N[10],w.w=E},g.FromVector3=function(u,h){return h===void 0&&(h=0),new g(u._x,u._y,u._z,h)},g}(),c=function(){function g(u,h,b,E){u===void 0&&(u=0),h===void 0&&(h=0),b===void 0&&(b=0),E===void 0&&(E=1),this._isDirty=!0,this._x=u,this._y=h,this._z=b,this._w=E}return Object.defineProperty(g.prototype,"x",{get:function(){return this._x},set:function(u){this._x=u,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"y",{get:function(){return this._y},set:function(u){this._y=u,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"z",{get:function(){return this._z},set:function(u){this._z=u,this._isDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"w",{get:function(){return this._w},set:function(u){this._w=u,this._isDirty=!0},enumerable:!1,configurable:!0}),g.prototype.toString=function(){return"{X: "+this._x+" Y:"+this._y+" Z:"+this._z+" W:"+this._w+"}"},g.prototype.getClassName=function(){return"Quaternion"},g.prototype.getHashCode=function(){var u=0|this._x;return u=397*(u=397*(u=397*u^(0|this._y))^(0|this._z))^(0|this._w)},g.prototype.asArray=function(){return[this._x,this._y,this._z,this._w]},g.prototype.equals=function(u){return u&&this._x===u._x&&this._y===u._y&&this._z===u._z&&this._w===u._w},g.prototype.equalsWithEpsilon=function(u,h){return h===void 0&&(h=_.a),u&&B.a.WithinEpsilon(this._x,u._x,h)&&B.a.WithinEpsilon(this._y,u._y,h)&&B.a.WithinEpsilon(this._z,u._z,h)&&B.a.WithinEpsilon(this._w,u._w,h)},g.prototype.clone=function(){return new g(this._x,this._y,this._z,this._w)},g.prototype.copyFrom=function(u){return this.x=u._x,this.y=u._y,this.z=u._z,this.w=u._w,this},g.prototype.copyFromFloats=function(u,h,b,E){return this.x=u,this.y=h,this.z=b,this.w=E,this},g.prototype.set=function(u,h,b,E){return this.copyFromFloats(u,h,b,E)},g.prototype.add=function(u){return new g(this._x+u._x,this._y+u._y,this._z+u._z,this._w+u._w)},g.prototype.addInPlace=function(u){return this._x+=u._x,this._y+=u._y,this._z+=u._z,this._w+=u._w,this},g.prototype.subtract=function(u){return new g(this._x-u._x,this._y-u._y,this._z-u._z,this._w-u._w)},g.prototype.scale=function(u){return new g(this._x*u,this._y*u,this._z*u,this._w*u)},g.prototype.scaleToRef=function(u,h){return h.x=this._x*u,h.y=this._y*u,h.z=this._z*u,h.w=this._w*u,this},g.prototype.scaleInPlace=function(u){return this.x*=u,this.y*=u,this.z*=u,this.w*=u,this},g.prototype.scaleAndAddToRef=function(u,h){return h.x+=this._x*u,h.y+=this._y*u,h.z+=this._z*u,h.w+=this._w*u,this},g.prototype.multiply=function(u){var h=new g(0,0,0,1);return this.multiplyToRef(u,h),h},g.prototype.multiplyToRef=function(u,h){var b=this._x*u._w+this._y*u._z-this._z*u._y+this._w*u._x,E=-this._x*u._z+this._y*u._w+this._z*u._x+this._w*u._y,D=this._x*u._y-this._y*u._x+this._z*u._w+this._w*u._z,w=-this._x*u._x-this._y*u._y-this._z*u._z+this._w*u._w;return h.copyFromFloats(b,E,D,w),this},g.prototype.multiplyInPlace=function(u){return this.multiplyToRef(u,this),this},g.prototype.conjugateToRef=function(u){return u.copyFromFloats(-this._x,-this._y,-this._z,this._w),this},g.prototype.conjugateInPlace=function(){return this.x*=-1,this.y*=-1,this.z*=-1,this},g.prototype.conjugate=function(){return new g(-this._x,-this._y,-this._z,this._w)},g.prototype.length=function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},g.prototype.normalize=function(){var u=this.length();if(u===0)return this;var h=1/u;return this.x*=h,this.y*=h,this.z*=h,this.w*=h,this},g.prototype.toEulerAngles=function(u){var h=x.Zero();return this.toEulerAnglesToRef(h),h},g.prototype.toEulerAnglesToRef=function(u){var h=this._z,b=this._x,E=this._y,D=this._w,w=D*D,N=h*h,I=b*b,V=E*E,X=E*h-b*D;return X<-.4999999?(u.y=2*Math.atan2(E,D),u.x=Math.PI/2,u.z=0):X>.4999999?(u.y=2*Math.atan2(E,D),u.x=-Math.PI/2,u.z=0):(u.z=Math.atan2(2*(b*E+h*D),-N-I+V+w),u.x=Math.asin(-2*(h*E-b*D)),u.y=Math.atan2(2*(h*b+E*D),N-I-V+w)),this},g.prototype.toRotationMatrix=function(u){return T.FromQuaternionToRef(this,u),this},g.prototype.fromRotationMatrix=function(u){return g.FromRotationMatrixToRef(u,this),this},g.FromRotationMatrix=function(u){var h=new g;return g.FromRotationMatrixToRef(u,h),h},g.FromRotationMatrixToRef=function(u,h){var b,E=u.m,D=E[0],w=E[4],N=E[8],I=E[1],V=E[5],X=E[9],j=E[2],ne=E[6],te=E[10],de=D+V+te;de>0?(b=.5/Math.sqrt(de+1),h.w=.25/b,h.x=(ne-X)*b,h.y=(N-j)*b,h.z=(I-w)*b):D>V&&D>te?(b=2*Math.sqrt(1+D-V-te),h.w=(ne-X)/b,h.x=.25*b,h.y=(w+I)/b,h.z=(N+j)/b):V>te?(b=2*Math.sqrt(1+V-D-te),h.w=(N-j)/b,h.x=(w+I)/b,h.y=.25*b,h.z=(X+ne)/b):(b=2*Math.sqrt(1+te-D-V),h.w=(I-w)/b,h.x=(N+j)/b,h.y=(X+ne)/b,h.z=.25*b)},g.Dot=function(u,h){return u._x*h._x+u._y*h._y+u._z*h._z+u._w*h._w},g.AreClose=function(u,h){return g.Dot(u,h)>=0},g.Zero=function(){return new g(0,0,0,0)},g.Inverse=function(u){return new g(-u._x,-u._y,-u._z,u._w)},g.InverseToRef=function(u,h){return h.set(-u._x,-u._y,-u._z,u._w),h},g.Identity=function(){return new g(0,0,0,1)},g.IsIdentity=function(u){return u&&u._x===0&&u._y===0&&u._z===0&&u._w===1},g.RotationAxis=function(u,h){return g.RotationAxisToRef(u,h,new g)},g.RotationAxisToRef=function(u,h,b){var E=Math.sin(h/2);return u.normalize(),b.w=Math.cos(h/2),b.x=u._x*E,b.y=u._y*E,b.z=u._z*E,b},g.FromArray=function(u,h){return h||(h=0),new g(u[h],u[h+1],u[h+2],u[h+3])},g.FromArrayToRef=function(u,h,b){b.x=u[h],b.y=u[h+1],b.z=u[h+2],b.w=u[h+3]},g.FromEulerAngles=function(u,h,b){var E=new g;return g.RotationYawPitchRollToRef(h,u,b,E),E},g.FromEulerAnglesToRef=function(u,h,b,E){return g.RotationYawPitchRollToRef(h,u,b,E),E},g.FromEulerVector=function(u){var h=new g;return g.RotationYawPitchRollToRef(u._y,u._x,u._z,h),h},g.FromEulerVectorToRef=function(u,h){return g.RotationYawPitchRollToRef(u._y,u._x,u._z,h),h},g.RotationYawPitchRoll=function(u,h,b){var E=new g;return g.RotationYawPitchRollToRef(u,h,b,E),E},g.RotationYawPitchRollToRef=function(u,h,b,E){var D=.5*b,w=.5*h,N=.5*u,I=Math.sin(D),V=Math.cos(D),X=Math.sin(w),j=Math.cos(w),ne=Math.sin(N),te=Math.cos(N);E.x=te*X*V+ne*j*I,E.y=ne*j*V-te*X*I,E.z=te*j*I-ne*X*V,E.w=te*j*V+ne*X*I},g.RotationAlphaBetaGamma=function(u,h,b){var E=new g;return g.RotationAlphaBetaGammaToRef(u,h,b,E),E},g.RotationAlphaBetaGammaToRef=function(u,h,b,E){var D=.5*(b+u),w=.5*(b-u),N=.5*h;E.x=Math.cos(w)*Math.sin(N),E.y=Math.sin(w)*Math.sin(N),E.z=Math.sin(D)*Math.cos(N),E.w=Math.cos(D)*Math.cos(N)},g.RotationQuaternionFromAxis=function(u,h,b){var E=new g(0,0,0,0);return g.RotationQuaternionFromAxisToRef(u,h,b,E),E},g.RotationQuaternionFromAxisToRef=function(u,h,b,E){var D=A.Matrix[0];T.FromXYZAxesToRef(u.normalize(),h.normalize(),b.normalize(),D),g.FromRotationMatrixToRef(D,E)},g.Slerp=function(u,h,b){var E=g.Identity();return g.SlerpToRef(u,h,b,E),E},g.SlerpToRef=function(u,h,b,E){var D,w,N=u._x*h._x+u._y*h._y+u._z*h._z+u._w*h._w,I=!1;if(N<0&&(I=!0,N=-N),N>.999999)w=1-b,D=I?-b:b;else{var V=Math.acos(N),X=1/Math.sin(V);w=Math.sin((1-b)*V)*X,D=I?-Math.sin(b*V)*X:Math.sin(b*V)*X}E.x=w*u._x+D*h._x,E.y=w*u._y+D*h._y,E.z=w*u._z+D*h._z,E.w=w*u._w+D*h._w},g.Hermite=function(u,h,b,E,D){var w=D*D,N=D*w,I=2*N-3*w+1,V=-2*N+3*w,X=N-2*w+D,j=N-w;return new g(u._x*I+b._x*V+h._x*X+E._x*j,u._y*I+b._y*V+h._y*X+E._y*j,u._z*I+b._z*V+h._z*X+E._z*j,u._w*I+b._w*V+h._w*X+E._w*j)},g}(),T=function(){function g(){this._isIdentity=!1,this._isIdentityDirty=!0,this._isIdentity3x2=!0,this._isIdentity3x2Dirty=!0,this.updateFlag=-1,O.a.MatrixTrackPrecisionChange&&O.a.MatrixTrackedMatrices.push(this),this._m=new O.a.MatrixCurrentType(16),this._updateIdentityStatus(!1)}return Object.defineProperty(g,"Use64Bits",{get:function(){return O.a.MatrixUse64Bits},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"m",{get:function(){return this._m},enumerable:!1,configurable:!0}),g.prototype._markAsUpdated=function(){this.updateFlag=g._updateFlagSeed++,this._isIdentity=!1,this._isIdentity3x2=!1,this._isIdentityDirty=!0,this._isIdentity3x2Dirty=!0},g.prototype._updateIdentityStatus=function(u,h,b,E){h===void 0&&(h=!1),b===void 0&&(b=!1),E===void 0&&(E=!0),this.updateFlag=g._updateFlagSeed++,this._isIdentity=u,this._isIdentity3x2=u||b,this._isIdentityDirty=!this._isIdentity&&h,this._isIdentity3x2Dirty=!this._isIdentity3x2&&E},g.prototype.isIdentity=function(){if(this._isIdentityDirty){this._isIdentityDirty=!1;var u=this._m;this._isIdentity=u[0]===1&&u[1]===0&&u[2]===0&&u[3]===0&&u[4]===0&&u[5]===1&&u[6]===0&&u[7]===0&&u[8]===0&&u[9]===0&&u[10]===1&&u[11]===0&&u[12]===0&&u[13]===0&&u[14]===0&&u[15]===1}return this._isIdentity},g.prototype.isIdentityAs3x2=function(){return this._isIdentity3x2Dirty&&(this._isIdentity3x2Dirty=!1,this._m[0]!==1||this._m[5]!==1||this._m[15]!==1||this._m[1]!==0||this._m[2]!==0||this._m[3]!==0||this._m[4]!==0||this._m[6]!==0||this._m[7]!==0||this._m[8]!==0||this._m[9]!==0||this._m[10]!==0||this._m[11]!==0||this._m[12]!==0||this._m[13]!==0||this._m[14]!==0?this._isIdentity3x2=!1:this._isIdentity3x2=!0),this._isIdentity3x2},g.prototype.determinant=function(){if(this._isIdentity===!0)return 1;var u=this._m,h=u[0],b=u[1],E=u[2],D=u[3],w=u[4],N=u[5],I=u[6],V=u[7],X=u[8],j=u[9],ne=u[10],te=u[11],de=u[12],pe=u[13],ae=u[14],ee=u[15],K=ne*ee-ae*te,$=j*ee-pe*te,L=j*ae-pe*ne,G=X*ee-de*te,Q=X*ae-ne*de,oe=X*pe-de*j;return h*+(N*K-I*$+V*L)+b*-(w*K-I*G+V*Q)+E*+(w*$-N*G+V*oe)+D*-(w*L-N*Q+I*oe)},g.prototype.toArray=function(){return this._m},g.prototype.asArray=function(){return this._m},g.prototype.invert=function(){return this.invertToRef(this),this},g.prototype.reset=function(){return g.FromValuesToRef(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,this),this._updateIdentityStatus(!1),this},g.prototype.add=function(u){var h=new g;return this.addToRef(u,h),h},g.prototype.addToRef=function(u,h){for(var b=this._m,E=h._m,D=u.m,w=0;w<16;w++)E[w]=b[w]+D[w];return h._markAsUpdated(),this},g.prototype.addToSelf=function(u){for(var h=this._m,b=u.m,E=0;E<16;E++)h[E]+=b[E];return this._markAsUpdated(),this},g.prototype.invertToRef=function(u){if(this._isIdentity===!0)return g.IdentityToRef(u),this;var h=this._m,b=h[0],E=h[1],D=h[2],w=h[3],N=h[4],I=h[5],V=h[6],X=h[7],j=h[8],ne=h[9],te=h[10],de=h[11],pe=h[12],ae=h[13],ee=h[14],K=h[15],$=te*K-ee*de,L=ne*K-ae*de,G=ne*ee-ae*te,Q=j*K-pe*de,oe=j*ee-te*pe,re=j*ae-pe*ne,Y=+(I*$-V*L+X*G),k=-(N*$-V*Q+X*oe),H=+(N*L-I*Q+X*re),Z=-(N*G-I*oe+V*re),W=b*Y+E*k+D*H+w*Z;if(W===0)return u.copyFrom(this),this;var q=1/W,he=V*K-ee*X,ge=I*K-ae*X,me=I*ee-ae*V,_e=N*K-pe*X,be=N*ee-pe*V,Ce=N*ae-pe*I,ye=V*de-te*X,Ue=I*de-ne*X,Ge=I*te-ne*V,Xe=N*de-j*X,He=N*te-j*V,We=N*ne-j*I,Ze=-(E*$-D*L+w*G),ze=+(b*$-D*Q+w*oe),it=-(b*L-E*Q+w*re),et=+(b*G-E*oe+D*re),lt=+(E*he-D*ge+w*me),ct=-(b*he-D*_e+w*be),mt=+(b*ge-E*_e+w*Ce),St=-(b*me-E*be+D*Ce),wt=-(E*ye-D*Ue+w*Ge),It=+(b*ye-D*Xe+w*He),Pt=-(b*Ue-E*Xe+w*We),Ot=+(b*Ge-E*He+D*We);return g.FromValuesToRef(Y*q,Ze*q,lt*q,wt*q,k*q,ze*q,ct*q,It*q,H*q,it*q,mt*q,Pt*q,Z*q,et*q,St*q,Ot*q,u),this},g.prototype.addAtIndex=function(u,h){return this._m[u]+=h,this._markAsUpdated(),this},g.prototype.multiplyAtIndex=function(u,h){return this._m[u]*=h,this._markAsUpdated(),this},g.prototype.setTranslationFromFloats=function(u,h,b){return this._m[12]=u,this._m[13]=h,this._m[14]=b,this._markAsUpdated(),this},g.prototype.addTranslationFromFloats=function(u,h,b){return this._m[12]+=u,this._m[13]+=h,this._m[14]+=b,this._markAsUpdated(),this},g.prototype.setTranslation=function(u){return this.setTranslationFromFloats(u._x,u._y,u._z)},g.prototype.getTranslation=function(){return new x(this._m[12],this._m[13],this._m[14])},g.prototype.getTranslationToRef=function(u){return u.x=this._m[12],u.y=this._m[13],u.z=this._m[14],this},g.prototype.removeRotationAndScaling=function(){var u=this.m;return g.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,u[12],u[13],u[14],u[15],this),this._updateIdentityStatus(u[12]===0&&u[13]===0&&u[14]===0&&u[15]===1),this},g.prototype.multiply=function(u){var h=new g;return this.multiplyToRef(u,h),h},g.prototype.copyFrom=function(u){u.copyToArray(this._m);var h=u;return this._updateIdentityStatus(h._isIdentity,h._isIdentityDirty,h._isIdentity3x2,h._isIdentity3x2Dirty),this},g.prototype.copyToArray=function(u,h){h===void 0&&(h=0);var b=this._m;return u[h]=b[0],u[h+1]=b[1],u[h+2]=b[2],u[h+3]=b[3],u[h+4]=b[4],u[h+5]=b[5],u[h+6]=b[6],u[h+7]=b[7],u[h+8]=b[8],u[h+9]=b[9],u[h+10]=b[10],u[h+11]=b[11],u[h+12]=b[12],u[h+13]=b[13],u[h+14]=b[14],u[h+15]=b[15],this},g.prototype.multiplyToRef=function(u,h){return this._isIdentity?(h.copyFrom(u),this):u._isIdentity?(h.copyFrom(this),this):(this.multiplyToArray(u,h._m,0),h._markAsUpdated(),this)},g.prototype.multiplyToArray=function(u,h,b){var E=this._m,D=u.m,w=E[0],N=E[1],I=E[2],V=E[3],X=E[4],j=E[5],ne=E[6],te=E[7],de=E[8],pe=E[9],ae=E[10],ee=E[11],K=E[12],$=E[13],L=E[14],G=E[15],Q=D[0],oe=D[1],re=D[2],Y=D[3],k=D[4],H=D[5],Z=D[6],W=D[7],q=D[8],he=D[9],ge=D[10],me=D[11],_e=D[12],be=D[13],Ce=D[14],ye=D[15];return h[b]=w*Q+N*k+I*q+V*_e,h[b+1]=w*oe+N*H+I*he+V*be,h[b+2]=w*re+N*Z+I*ge+V*Ce,h[b+3]=w*Y+N*W+I*me+V*ye,h[b+4]=X*Q+j*k+ne*q+te*_e,h[b+5]=X*oe+j*H+ne*he+te*be,h[b+6]=X*re+j*Z+ne*ge+te*Ce,h[b+7]=X*Y+j*W+ne*me+te*ye,h[b+8]=de*Q+pe*k+ae*q+ee*_e,h[b+9]=de*oe+pe*H+ae*he+ee*be,h[b+10]=de*re+pe*Z+ae*ge+ee*Ce,h[b+11]=de*Y+pe*W+ae*me+ee*ye,h[b+12]=K*Q+$*k+L*q+G*_e,h[b+13]=K*oe+$*H+L*he+G*be,h[b+14]=K*re+$*Z+L*ge+G*Ce,h[b+15]=K*Y+$*W+L*me+G*ye,this},g.prototype.equals=function(u){var h=u;if(!h)return!1;if((this._isIdentity||h._isIdentity)&&!this._isIdentityDirty&&!h._isIdentityDirty)return this._isIdentity&&h._isIdentity;var b=this.m,E=h.m;return b[0]===E[0]&&b[1]===E[1]&&b[2]===E[2]&&b[3]===E[3]&&b[4]===E[4]&&b[5]===E[5]&&b[6]===E[6]&&b[7]===E[7]&&b[8]===E[8]&&b[9]===E[9]&&b[10]===E[10]&&b[11]===E[11]&&b[12]===E[12]&&b[13]===E[13]&&b[14]===E[14]&&b[15]===E[15]},g.prototype.clone=function(){var u=new g;return u.copyFrom(this),u},g.prototype.getClassName=function(){return"Matrix"},g.prototype.getHashCode=function(){for(var u=0|this._m[0],h=1;h<16;h++)u=397*u^(0|this._m[h]);return u},g.prototype.decompose=function(u,h,b){if(this._isIdentity)return b&&b.setAll(0),u&&u.setAll(1),h&&h.copyFromFloats(0,0,0,1),!0;var E=this._m;if(b&&b.copyFromFloats(E[12],E[13],E[14]),(u=u||A.Vector3[0]).x=Math.sqrt(E[0]*E[0]+E[1]*E[1]+E[2]*E[2]),u.y=Math.sqrt(E[4]*E[4]+E[5]*E[5]+E[6]*E[6]),u.z=Math.sqrt(E[8]*E[8]+E[9]*E[9]+E[10]*E[10]),this.determinant()<=0&&(u.y*=-1),u._x===0||u._y===0||u._z===0)return h&&h.copyFromFloats(0,0,0,1),!1;if(h){var D=1/u._x,w=1/u._y,N=1/u._z;g.FromValuesToRef(E[0]*D,E[1]*D,E[2]*D,0,E[4]*w,E[5]*w,E[6]*w,0,E[8]*N,E[9]*N,E[10]*N,0,0,0,0,1,A.Matrix[0]),c.FromRotationMatrixToRef(A.Matrix[0],h)}return!0},g.prototype.getRow=function(u){if(u<0||u>3)return null;var h=4*u;return new m(this._m[h+0],this._m[h+1],this._m[h+2],this._m[h+3])},g.prototype.setRow=function(u,h){return this.setRowFromFloats(u,h.x,h.y,h.z,h.w)},g.prototype.transpose=function(){return g.Transpose(this)},g.prototype.transposeToRef=function(u){return g.TransposeToRef(this,u),this},g.prototype.setRowFromFloats=function(u,h,b,E,D){if(u<0||u>3)return this;var w=4*u;return this._m[w+0]=h,this._m[w+1]=b,this._m[w+2]=E,this._m[w+3]=D,this._markAsUpdated(),this},g.prototype.scale=function(u){var h=new g;return this.scaleToRef(u,h),h},g.prototype.scaleToRef=function(u,h){for(var b=0;b<16;b++)h._m[b]=this._m[b]*u;return h._markAsUpdated(),this},g.prototype.scaleAndAddToRef=function(u,h){for(var b=0;b<16;b++)h._m[b]+=this._m[b]*u;return h._markAsUpdated(),this},g.prototype.toNormalMatrix=function(u){var h=A.Matrix[0];this.invertToRef(h),h.transposeToRef(u);var b=u._m;g.FromValuesToRef(b[0],b[1],b[2],0,b[4],b[5],b[6],0,b[8],b[9],b[10],0,0,0,0,1,u)},g.prototype.getRotationMatrix=function(){var u=new g;return this.getRotationMatrixToRef(u),u},g.prototype.getRotationMatrixToRef=function(u){var h=A.Vector3[0];if(!this.decompose(h))return g.IdentityToRef(u),this;var b=this._m,E=1/h._x,D=1/h._y,w=1/h._z;return g.FromValuesToRef(b[0]*E,b[1]*E,b[2]*E,0,b[4]*D,b[5]*D,b[6]*D,0,b[8]*w,b[9]*w,b[10]*w,0,0,0,0,1,u),this},g.prototype.toggleModelMatrixHandInPlace=function(){var u=this._m;u[2]*=-1,u[6]*=-1,u[8]*=-1,u[9]*=-1,u[14]*=-1,this._markAsUpdated()},g.prototype.toggleProjectionMatrixHandInPlace=function(){var u=this._m;u[8]*=-1,u[9]*=-1,u[10]*=-1,u[11]*=-1,this._markAsUpdated()},g.FromArray=function(u,h){h===void 0&&(h=0);var b=new g;return g.FromArrayToRef(u,h,b),b},g.FromArrayToRef=function(u,h,b){for(var E=0;E<16;E++)b._m[E]=u[E+h];b._markAsUpdated()},g.FromFloat32ArrayToRefScaled=function(u,h,b,E){for(var D=0;D<16;D++)E._m[D]=u[D+h]*b;E._markAsUpdated()},Object.defineProperty(g,"IdentityReadOnly",{get:function(){return g._identityReadOnly},enumerable:!1,configurable:!0}),g.FromValuesToRef=function(u,h,b,E,D,w,N,I,V,X,j,ne,te,de,pe,ae,ee){var K=ee._m;K[0]=u,K[1]=h,K[2]=b,K[3]=E,K[4]=D,K[5]=w,K[6]=N,K[7]=I,K[8]=V,K[9]=X,K[10]=j,K[11]=ne,K[12]=te,K[13]=de,K[14]=pe,K[15]=ae,ee._markAsUpdated()},g.FromValues=function(u,h,b,E,D,w,N,I,V,X,j,ne,te,de,pe,ae){var ee=new g,K=ee._m;return K[0]=u,K[1]=h,K[2]=b,K[3]=E,K[4]=D,K[5]=w,K[6]=N,K[7]=I,K[8]=V,K[9]=X,K[10]=j,K[11]=ne,K[12]=te,K[13]=de,K[14]=pe,K[15]=ae,ee._markAsUpdated(),ee},g.Compose=function(u,h,b){var E=new g;return g.ComposeToRef(u,h,b,E),E},g.ComposeToRef=function(u,h,b,E){var D=E._m,w=h._x,N=h._y,I=h._z,V=h._w,X=w+w,j=N+N,ne=I+I,te=w*X,de=w*j,pe=w*ne,ae=N*j,ee=N*ne,K=I*ne,$=V*X,L=V*j,G=V*ne,Q=u._x,oe=u._y,re=u._z;D[0]=(1-(ae+K))*Q,D[1]=(de+G)*Q,D[2]=(pe-L)*Q,D[3]=0,D[4]=(de-G)*oe,D[5]=(1-(te+K))*oe,D[6]=(ee+$)*oe,D[7]=0,D[8]=(pe+L)*re,D[9]=(ee-$)*re,D[10]=(1-(te+ae))*re,D[11]=0,D[12]=b._x,D[13]=b._y,D[14]=b._z,D[15]=1,E._markAsUpdated()},g.Identity=function(){var u=g.FromValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1);return u._updateIdentityStatus(!0),u},g.IdentityToRef=function(u){g.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,u),u._updateIdentityStatus(!0)},g.Zero=function(){var u=g.FromValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);return u._updateIdentityStatus(!1),u},g.RotationX=function(u){var h=new g;return g.RotationXToRef(u,h),h},g.Invert=function(u){var h=new g;return u.invertToRef(h),h},g.RotationXToRef=function(u,h){var b=Math.sin(u),E=Math.cos(u);g.FromValuesToRef(1,0,0,0,0,E,b,0,0,-b,E,0,0,0,0,1,h),h._updateIdentityStatus(E===1&&b===0)},g.RotationY=function(u){var h=new g;return g.RotationYToRef(u,h),h},g.RotationYToRef=function(u,h){var b=Math.sin(u),E=Math.cos(u);g.FromValuesToRef(E,0,-b,0,0,1,0,0,b,0,E,0,0,0,0,1,h),h._updateIdentityStatus(E===1&&b===0)},g.RotationZ=function(u){var h=new g;return g.RotationZToRef(u,h),h},g.RotationZToRef=function(u,h){var b=Math.sin(u),E=Math.cos(u);g.FromValuesToRef(E,b,0,0,-b,E,0,0,0,0,1,0,0,0,0,1,h),h._updateIdentityStatus(E===1&&b===0)},g.RotationAxis=function(u,h){var b=new g;return g.RotationAxisToRef(u,h,b),b},g.RotationAxisToRef=function(u,h,b){var E=Math.sin(-h),D=Math.cos(-h),w=1-D;u.normalize();var N=b._m;N[0]=u._x*u._x*w+D,N[1]=u._x*u._y*w-u._z*E,N[2]=u._x*u._z*w+u._y*E,N[3]=0,N[4]=u._y*u._x*w+u._z*E,N[5]=u._y*u._y*w+D,N[6]=u._y*u._z*w-u._x*E,N[7]=0,N[8]=u._z*u._x*w-u._y*E,N[9]=u._z*u._y*w+u._x*E,N[10]=u._z*u._z*w+D,N[11]=0,N[12]=0,N[13]=0,N[14]=0,N[15]=1,b._markAsUpdated()},g.RotationAlignToRef=function(u,h,b){var E=x.Cross(h,u),D=x.Dot(h,u),w=1/(1+D),N=b._m;N[0]=E._x*E._x*w+D,N[1]=E._y*E._x*w-E._z,N[2]=E._z*E._x*w+E._y,N[3]=0,N[4]=E._x*E._y*w+E._z,N[5]=E._y*E._y*w+D,N[6]=E._z*E._y*w-E._x,N[7]=0,N[8]=E._x*E._z*w-E._y,N[9]=E._y*E._z*w+E._x,N[10]=E._z*E._z*w+D,N[11]=0,N[12]=0,N[13]=0,N[14]=0,N[15]=1,b._markAsUpdated()},g.RotationYawPitchRoll=function(u,h,b){var E=new g;return g.RotationYawPitchRollToRef(u,h,b,E),E},g.RotationYawPitchRollToRef=function(u,h,b,E){c.RotationYawPitchRollToRef(u,h,b,A.Quaternion[0]),A.Quaternion[0].toRotationMatrix(E)},g.Scaling=function(u,h,b){var E=new g;return g.ScalingToRef(u,h,b,E),E},g.ScalingToRef=function(u,h,b,E){g.FromValuesToRef(u,0,0,0,0,h,0,0,0,0,b,0,0,0,0,1,E),E._updateIdentityStatus(u===1&&h===1&&b===1)},g.Translation=function(u,h,b){var E=new g;return g.TranslationToRef(u,h,b,E),E},g.TranslationToRef=function(u,h,b,E){g.FromValuesToRef(1,0,0,0,0,1,0,0,0,0,1,0,u,h,b,1,E),E._updateIdentityStatus(u===0&&h===0&&b===0)},g.Lerp=function(u,h,b){var E=new g;return g.LerpToRef(u,h,b,E),E},g.LerpToRef=function(u,h,b,E){for(var D=E._m,w=u.m,N=h.m,I=0;I<16;I++)D[I]=w[I]*(1-b)+N[I]*b;E._markAsUpdated()},g.DecomposeLerp=function(u,h,b){var E=new g;return g.DecomposeLerpToRef(u,h,b,E),E},g.DecomposeLerpToRef=function(u,h,b,E){var D=A.Vector3[0],w=A.Quaternion[0],N=A.Vector3[1];u.decompose(D,w,N);var I=A.Vector3[2],V=A.Quaternion[1],X=A.Vector3[3];h.decompose(I,V,X);var j=A.Vector3[4];x.LerpToRef(D,I,b,j);var ne=A.Quaternion[2];c.SlerpToRef(w,V,b,ne);var te=A.Vector3[5];x.LerpToRef(N,X,b,te),g.ComposeToRef(j,ne,te,E)},g.LookAtLH=function(u,h,b){var E=new g;return g.LookAtLHToRef(u,h,b,E),E},g.LookAtLHToRef=function(u,h,b,E){var D=A.Vector3[0],w=A.Vector3[1],N=A.Vector3[2];h.subtractToRef(u,N),N.normalize(),x.CrossToRef(b,N,D);var I=D.lengthSquared();I===0?D.x=1:D.normalizeFromLength(Math.sqrt(I)),x.CrossToRef(N,D,w),w.normalize();var V=-x.Dot(D,u),X=-x.Dot(w,u),j=-x.Dot(N,u);g.FromValuesToRef(D._x,w._x,N._x,0,D._y,w._y,N._y,0,D._z,w._z,N._z,0,V,X,j,1,E)},g.LookAtRH=function(u,h,b){var E=new g;return g.LookAtRHToRef(u,h,b,E),E},g.LookAtRHToRef=function(u,h,b,E){var D=A.Vector3[0],w=A.Vector3[1],N=A.Vector3[2];u.subtractToRef(h,N),N.normalize(),x.CrossToRef(b,N,D);var I=D.lengthSquared();I===0?D.x=1:D.normalizeFromLength(Math.sqrt(I)),x.CrossToRef(N,D,w),w.normalize();var V=-x.Dot(D,u),X=-x.Dot(w,u),j=-x.Dot(N,u);g.FromValuesToRef(D._x,w._x,N._x,0,D._y,w._y,N._y,0,D._z,w._z,N._z,0,V,X,j,1,E)},g.OrthoLH=function(u,h,b,E){var D=new g;return g.OrthoLHToRef(u,h,b,E,D),D},g.OrthoLHToRef=function(u,h,b,E,D){var w=2/u,N=2/h,I=2/(E-b),V=-(E+b)/(E-b);g.FromValuesToRef(w,0,0,0,0,N,0,0,0,0,I,0,0,0,V,1,D),D._updateIdentityStatus(w===1&&N===1&&I===1&&V===0)},g.OrthoOffCenterLH=function(u,h,b,E,D,w){var N=new g;return g.OrthoOffCenterLHToRef(u,h,b,E,D,w,N),N},g.OrthoOffCenterLHToRef=function(u,h,b,E,D,w,N){var I=2/(h-u),V=2/(E-b),X=2/(w-D),j=-(w+D)/(w-D),ne=(u+h)/(u-h),te=(E+b)/(b-E);g.FromValuesToRef(I,0,0,0,0,V,0,0,0,0,X,0,ne,te,j,1,N),N._markAsUpdated()},g.OrthoOffCenterRH=function(u,h,b,E,D,w){var N=new g;return g.OrthoOffCenterRHToRef(u,h,b,E,D,w,N),N},g.OrthoOffCenterRHToRef=function(u,h,b,E,D,w,N){g.OrthoOffCenterLHToRef(u,h,b,E,D,w,N),N._m[10]*=-1},g.PerspectiveLH=function(u,h,b,E){var D=new g,w=2*b/u,N=2*b/h,I=(E+b)/(E-b),V=-2*E*b/(E-b);return g.FromValuesToRef(w,0,0,0,0,N,0,0,0,0,I,1,0,0,V,0,D),D._updateIdentityStatus(!1),D},g.PerspectiveFovLH=function(u,h,b,E){var D=new g;return g.PerspectiveFovLHToRef(u,h,b,E,D),D},g.PerspectiveFovLHToRef=function(u,h,b,E,D,w){w===void 0&&(w=!0);var N=b,I=E,V=1/Math.tan(.5*u),X=w?V/h:V,j=w?V:V*h,ne=(I+N)/(I-N),te=-2*I*N/(I-N);g.FromValuesToRef(X,0,0,0,0,j,0,0,0,0,ne,1,0,0,te,0,D),D._updateIdentityStatus(!1)},g.PerspectiveFovReverseLHToRef=function(u,h,b,E,D,w){w===void 0&&(w=!0);var N=1/Math.tan(.5*u),I=w?N/h:N,V=w?N:N*h;g.FromValuesToRef(I,0,0,0,0,V,0,0,0,0,-b,1,0,0,1,0,D),D._updateIdentityStatus(!1)},g.PerspectiveFovRH=function(u,h,b,E){var D=new g;return g.PerspectiveFovRHToRef(u,h,b,E,D),D},g.PerspectiveFovRHToRef=function(u,h,b,E,D,w){w===void 0&&(w=!0);var N=b,I=E,V=1/Math.tan(.5*u),X=w?V/h:V,j=w?V:V*h,ne=-(I+N)/(I-N),te=-2*I*N/(I-N);g.FromValuesToRef(X,0,0,0,0,j,0,0,0,0,ne,-1,0,0,te,0,D),D._updateIdentityStatus(!1)},g.PerspectiveFovReverseRHToRef=function(u,h,b,E,D,w){w===void 0&&(w=!0);var N=1/Math.tan(.5*u),I=w?N/h:N,V=w?N:N*h;g.FromValuesToRef(I,0,0,0,0,V,0,0,0,0,-b,-1,0,0,-1,0,D),D._updateIdentityStatus(!1)},g.PerspectiveFovWebVRToRef=function(u,h,b,E,D){D===void 0&&(D=!1);var w=D?-1:1,N=Math.tan(u.upDegrees*Math.PI/180),I=Math.tan(u.downDegrees*Math.PI/180),V=Math.tan(u.leftDegrees*Math.PI/180),X=Math.tan(u.rightDegrees*Math.PI/180),j=2/(V+X),ne=2/(N+I),te=E._m;te[0]=j,te[1]=te[2]=te[3]=te[4]=0,te[5]=ne,te[6]=te[7]=0,te[8]=(V-X)*j*.5,te[9]=-(N-I)*ne*.5,te[10]=-b/(h-b),te[11]=1*w,te[12]=te[13]=te[15]=0,te[14]=-2*b*h/(b-h),E._markAsUpdated()},g.GetFinalMatrix=function(u,h,b,E,D,w){var N=u.width,I=u.height,V=u.x,X=u.y,j=g.FromValues(N/2,0,0,0,0,-I/2,0,0,0,0,w-D,0,V+N/2,I/2+X,D,1),ne=A.Matrix[0];return h.multiplyToRef(b,ne),ne.multiplyToRef(E,ne),ne.multiply(j)},g.GetAsMatrix2x2=function(u){var h=u.m,b=[h[0],h[1],h[4],h[5]];return O.a.MatrixUse64Bits?b:new Float32Array(b)},g.GetAsMatrix3x3=function(u){var h=u.m,b=[h[0],h[1],h[2],h[4],h[5],h[6],h[8],h[9],h[10]];return O.a.MatrixUse64Bits?b:new Float32Array(b)},g.Transpose=function(u){var h=new g;return g.TransposeToRef(u,h),h},g.TransposeToRef=function(u,h){var b=h._m,E=u.m;b[0]=E[0],b[1]=E[4],b[2]=E[8],b[3]=E[12],b[4]=E[1],b[5]=E[5],b[6]=E[9],b[7]=E[13],b[8]=E[2],b[9]=E[6],b[10]=E[10],b[11]=E[14],b[12]=E[3],b[13]=E[7],b[14]=E[11],b[15]=E[15],h._updateIdentityStatus(u._isIdentity,u._isIdentityDirty)},g.Reflection=function(u){var h=new g;return g.ReflectionToRef(u,h),h},g.ReflectionToRef=function(u,h){u.normalize();var b=u.normal.x,E=u.normal.y,D=u.normal.z,w=-2*b,N=-2*E,I=-2*D;g.FromValuesToRef(w*b+1,N*b,I*b,0,w*E,N*E+1,I*E,0,w*D,N*D,I*D+1,0,w*u.d,N*u.d,I*u.d,1,h)},g.FromXYZAxesToRef=function(u,h,b,E){g.FromValuesToRef(u._x,u._y,u._z,0,h._x,h._y,h._z,0,b._x,b._y,b._z,0,0,0,0,1,E)},g.FromQuaternionToRef=function(u,h){var b=u._x*u._x,E=u._y*u._y,D=u._z*u._z,w=u._x*u._y,N=u._z*u._w,I=u._z*u._x,V=u._y*u._w,X=u._y*u._z,j=u._x*u._w;h._m[0]=1-2*(E+D),h._m[1]=2*(w+N),h._m[2]=2*(I-V),h._m[3]=0,h._m[4]=2*(w-N),h._m[5]=1-2*(D+b),h._m[6]=2*(X+j),h._m[7]=0,h._m[8]=2*(I+V),h._m[9]=2*(X-j),h._m[10]=1-2*(E+b),h._m[11]=0,h._m[12]=0,h._m[13]=0,h._m[14]=0,h._m[15]=1,h._markAsUpdated()},g._updateFlagSeed=0,g._identityReadOnly=g.Identity(),g}(),A=function(){function g(){}return g.Vector3=P.a.BuildArray(6,x.Zero),g.Matrix=P.a.BuildArray(2,T.Identity),g.Quaternion=P.a.BuildArray(3,c.Zero),g}(),S=function(){function g(){}return g.Vector2=P.a.BuildArray(3,R.Zero),g.Vector3=P.a.BuildArray(13,x.Zero),g.Vector4=P.a.BuildArray(3,m.Zero),g.Quaternion=P.a.BuildArray(2,c.Zero),g.Matrix=P.a.BuildArray(8,T.Identity),g}();l.a.RegisteredTypes["BABYLON.Vector2"]=R,l.a.RegisteredTypes["BABYLON.Vector3"]=x,l.a.RegisteredTypes["BABYLON.Vector4"]=m,l.a.RegisteredTypes["BABYLON.Matrix"]=T},function(Ae,v,f){f.d(v,"d",function(){return _}),f.d(v,"a",function(){return P}),f.d(v,"c",function(){return l}),f.d(v,"b",function(){return O}),f.d(v,"e",function(){return R}),f.d(v,"f",function(){return x});/*! ***************************************************************************** - Copyright (c) Microsoft Corporation. - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THIS SOFTWARE. - ***************************************************************************** */var B=function(m,c){return(B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,A){T.__proto__=A}||function(T,A){for(var S in A)Object.prototype.hasOwnProperty.call(A,S)&&(T[S]=A[S])})(m,c)};function _(m,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");function T(){this.constructor=m}B(m,c),m.prototype=c===null?Object.create(c):(T.prototype=c.prototype,new T)}var P=function(){return(P=Object.assign||function(m){for(var c,T=1,A=arguments.length;T=0;h--)(S=m[h])&&(u=(g<3?S(u):g>3?S(c,T,u):S(c,T))||u);return g>3&&u&&Object.defineProperty(c,T,u),u}function O(m,c,T,A){return new(T||(T=Promise))(function(S,g){function u(E){try{b(A.next(E))}catch(D){g(D)}}function h(E){try{b(A.throw(E))}catch(D){g(D)}}function b(E){var D;E.done?S(E.value):(D=E.value,D instanceof T?D:new T(function(w){w(D)})).then(u,h)}b((A=A.apply(m,c||[])).next())})}function R(m,c){var T,A,S,g,u={label:0,sent:function(){if(1&S[0])throw S[1];return S[1]},trys:[],ops:[]};return g={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(g[Symbol.iterator]=function(){return this}),g;function h(b){return function(E){return function(D){if(T)throw new TypeError("Generator is already executing.");for(;u;)try{if(T=1,A&&(S=2&D[0]?A.return:D[0]?A.throw||((S=A.return)&&S.call(A),0):A.next)&&!(S=S.call(A,D[1])).done)return S;switch(A=0,S&&(D=[2&D[0],S.value]),D[0]){case 0:case 1:S=D;break;case 4:return u.label++,{value:D[1],done:!1};case 5:u.label++,A=D[1],D=[0];continue;case 7:D=u.ops.pop(),u.trys.pop();continue;default:if(S=u.trys,!((S=S.length>0&&S[S.length-1])||D[0]!==6&&D[0]!==2)){u=0;continue}if(D[0]===3&&(!S||D[1]>S[0]&&D[1]=2?"WEBGL2":"WEBGL1"};this._loadShader(N,"Vertex","",function(de){w._rawVertexSourceCode=de,w._loadShader(I,"Fragment","Pixel",function(pe){w._rawFragmentSourceCode=pe,O.a.Process(de,te,function(ae){V&&(ae=V("vertex",ae)),te.isFragment=!0,O.a.Process(pe,te,function(ee){V&&(ee=V("fragment",ee)),w._useFinalCode(ae,ee,m)},w._engine)},w._engine)})})}return Object.defineProperty(x.prototype,"onBindObservable",{get:function(){return this._onBindObservable||(this._onBindObservable=new B.c),this._onBindObservable},enumerable:!1,configurable:!0}),x.prototype._useFinalCode=function(m,c,T){if(T){var A=T.vertexElement||T.vertex||T.spectorName||T,S=T.fragmentElement||T.fragment||T.spectorName||T;this._vertexSourceCode="#define SHADER_NAME vertex:"+A+` -`+m,this._fragmentSourceCode="#define SHADER_NAME fragment:"+S+` -`+c}else this._vertexSourceCode=m,this._fragmentSourceCode=c;this._prepareEffect()},Object.defineProperty(x.prototype,"key",{get:function(){return this._key},enumerable:!1,configurable:!0}),x.prototype.isReady=function(){try{return this._isReadyInternal()}catch{return!1}},x.prototype._isReadyInternal=function(){return!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady},x.prototype.getEngine=function(){return this._engine},x.prototype.getPipelineContext=function(){return this._pipelineContext},x.prototype.getAttributesNames=function(){return this._attributesNames},x.prototype.getAttributeLocation=function(m){return this._attributes[m]},x.prototype.getAttributeLocationByName=function(m){return this._attributeLocationByName[m]},x.prototype.getAttributesCount=function(){return this._attributes.length},x.prototype.getUniformIndex=function(m){return this._uniformsNames.indexOf(m)},x.prototype.getUniform=function(m){return this._uniforms[m]},x.prototype.getSamplers=function(){return this._samplerList},x.prototype.getUniformNames=function(){return this._uniformsNames},x.prototype.getUniformBuffersNames=function(){return this._uniformBuffersNamesList},x.prototype.getIndexParameters=function(){return this._indexParameters},x.prototype.getCompilationError=function(){return this._compilationError},x.prototype.allFallbacksProcessed=function(){return this._allFallbacksProcessed},x.prototype.executeWhenCompiled=function(m){var c=this;this.isReady()?m(this):(this.onCompileObservable.add(function(T){m(T)}),this._pipelineContext&&!this._pipelineContext.isAsync||setTimeout(function(){c._checkIsReady(null)},16))},x.prototype._checkIsReady=function(m){var c=this;try{if(this._isReadyInternal())return}catch(T){return void this._processCompilationErrors(T,m)}setTimeout(function(){c._checkIsReady(m)},16)},x.prototype._loadShader=function(m,c,T,A){var S;if(typeof HTMLElement<"u"&&m instanceof HTMLElement)return void A(P.a.GetDOMTextContent(m));m.substr(0,7)!=="source:"?m.substr(0,7)!=="base64:"?x.ShadersStore[m+c+"Shader"]?A(x.ShadersStore[m+c+"Shader"]):T&&x.ShadersStore[m+T+"Shader"]?A(x.ShadersStore[m+T+"Shader"]):(S=m[0]==="."||m[0]==="/"||m.indexOf("http")>-1?m:x.ShadersRepository+m,this._engine._loadFile(S+"."+c.toLowerCase()+".fx",A)):A(window.atob(m.substr(7))):A(m.substr(7))},Object.defineProperty(x.prototype,"vertexSourceCode",{get:function(){return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:this._vertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"fragmentSourceCode",{get:function(){return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:this._fragmentSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rawVertexSourceCode",{get:function(){return this._rawVertexSourceCode},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rawFragmentSourceCode",{get:function(){return this._rawFragmentSourceCode},enumerable:!1,configurable:!0}),x.prototype._rebuildProgram=function(m,c,T,A){var S=this;this._isReady=!1,this._vertexSourceCodeOverride=m,this._fragmentSourceCodeOverride=c,this.onError=function(g,u){A&&A(u)},this.onCompiled=function(){var g=S.getEngine().scenes;if(g)for(var u=0;u=u&&(S="Offending line ["+u+"] in "+(T?"fragment":"vertex")+" code: "+h[u-1])}}return[m,S]},x.prototype._processCompilationErrors=function(m,c){var T,A,S,g,u;c===void 0&&(c=null),this._compilationError=m.message;var h=this._attributesNames,b=this._fallbacks;if(l.a.Error("Unable to compile effect:"),l.a.Error("Uniforms: "+this._uniformsNames.map(function(N){return" "+N})),l.a.Error("Attributes: "+h.map(function(N){return" "+N})),l.a.Error(`Defines:\r -`+this.defines),x.LogShaderCodeOnCompilationError){var E=null,D=null,w=null;!((S=this._pipelineContext)===null||S===void 0)&&S._getVertexShaderCode()&&(w=(T=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1))[0],E=T[1],w&&(l.a.Error("Vertex code:"),l.a.Error(w))),!((g=this._pipelineContext)===null||g===void 0)&&g._getFragmentShaderCode()&&(w=(A=this._getShaderCodeAndErrorLine((u=this._pipelineContext)===null||u===void 0?void 0:u._getFragmentShaderCode(),this._compilationError,!0))[0],D=A[1],w&&(l.a.Error("Fragment code:"),l.a.Error(w))),E&&l.a.Error(E),D&&l.a.Error(D)}l.a.Error("Error: "+this._compilationError),c&&(this._pipelineContext=c,this._isReady=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this)),b?(this._pipelineContext=null,b.hasMoreFallbacks?(this._allFallbacksProcessed=!1,l.a.Error("Trying next fallback."),this.defines=b.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):this._allFallbacksProcessed=!0},Object.defineProperty(x.prototype,"isSupported",{get:function(){return this._compilationError===""},enumerable:!1,configurable:!0}),x.prototype._bindTexture=function(m,c){this._engine._bindTexture(this._samplers[m],c)},x.prototype.setTexture=function(m,c){this._engine.setTexture(this._samplers[m],this._uniforms[m],c)},x.prototype.setDepthStencilTexture=function(m,c){this._engine.setDepthStencilTexture(this._samplers[m],this._uniforms[m],c)},x.prototype.setTextureArray=function(m,c){var T=m+"Ex";if(this._samplerList.indexOf(T+"0")===-1){for(var A=this._samplerList.indexOf(m),S=1;S0},O.prototype.clear=function(){this._observers=new Array,this._onObserverAdded=null},O.prototype.clone=function(){var R=new O;return R._observers=this._observers.slice(0),R},O.prototype.hasSpecificMask=function(R){R===void 0&&(R=-1);for(var x=0,m=this._observers;x0},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"hasThinInstances",{get:function(){var G;return((G=this._thinInstanceDataStorage.instancesCount)!==null&&G!==void 0?G:0)>0},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"morphTargetManager",{get:function(){return this._internalMeshDataInfo._morphTargetManager},set:function(G){this._internalMeshDataInfo._morphTargetManager!==G&&(this._internalMeshDataInfo._morphTargetManager=G,this._syncGeometryWithMorphTargetManager())},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"source",{get:function(){return this._internalMeshDataInfo._source},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"cloneMeshMap",{get:function(){return this._internalMeshDataInfo.meshMap},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"isUnIndexed",{get:function(){return this._unIndexed},set:function(G){this._unIndexed!==G&&(this._unIndexed=G,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"worldMatrixInstancedBuffer",{get:function(){return this._instanceDataStorage.instancesData},enumerable:!1,configurable:!0}),Object.defineProperty(L.prototype,"manualUpdateOfWorldMatrixInstancedBuffer",{get:function(){return this._instanceDataStorage.manualUpdate},set:function(G){this._instanceDataStorage.manualUpdate=G},enumerable:!1,configurable:!0}),L.prototype.instantiateHierarchy=function(G,Q,oe){G===void 0&&(G=null);var re=!(this.getTotalVertices()>0)||Q&&Q.doNotInstantiate?this.clone("Clone of "+(this.name||this.id),G||this.parent,!0):this.createInstance("instance of "+(this.name||this.id));re&&(re.parent=G||this.parent,re.position=this.position.clone(),re.scaling=this.scaling.clone(),this.rotationQuaternion?re.rotationQuaternion=this.rotationQuaternion.clone():re.rotation=this.rotation.clone(),oe&&oe(this,re));for(var Y=0,k=this.getChildTransformNodes(!0);Y0},enumerable:!1,configurable:!0}),L.prototype.getLODLevels=function(){return this._internalMeshDataInfo._LODLevels},L.prototype._sortLODLevels=function(){this._internalMeshDataInfo._LODLevels.sort(function(G,Q){return G.distanceQ.distance?-1:0})},L.prototype.addLODLevel=function(G,Q){if(Q&&Q._masterMesh)return N.a.Warn("You cannot use a mesh as LOD level twice"),this;var oe=new j.a(G,Q);return this._internalMeshDataInfo._LODLevels.push(oe),Q&&(Q._masterMesh=this),this._sortLODLevels(),this},L.prototype.getLODLevelAtDistance=function(G){for(var Q=this._internalMeshDataInfo,oe=0;oeY)return this.onLODLevelSelection&&this.onLODLevelSelection(Y,this,this),this;for(var k=0;k0||this.hasThinInstances);this.computeWorldMatrix();var ge=this.material||q.defaultMaterial;if(ge){if(ge._storeEffectOnSubMeshes)for(var me=0,_e=this.subMeshes;me<_e.length;me++){var be=(He=_e[me]).getMaterial();if(be){if(be._storeEffectOnSubMeshes){if(!be.isReadyForSubMesh(this,He,he))return!1}else if(!be.isReady(this,he))return!1}}else if(!ge.isReady(this,he))return!1}for(var Ce=0,ye=this.lightSources;Ce0){var oe=this.getIndices();if(!oe)return null;var re=oe.length,Y=!1;if(G)Y=!0;else for(var k=0,H=this.subMeshes;kre){Y=!0;break}if(Z.verticesStart+Z.verticesCount>Q){Y=!0;break}}if(!Y)return this.subMeshes[0]}return this.releaseSubMeshes(),new g.a(0,0,Q,0,this.getTotalIndices(),this)},L.prototype.subdivide=function(G){if(!(G<1)){for(var Q=this.getTotalIndices(),oe=Q/G|0,re=0;oe%3!=0;)oe++;this.releaseSubMeshes();for(var Y=0;Y=Q);Y++)g.a.CreateFromIndices(0,re,Y===G-1?Q-re:oe,this),re+=oe;this.synchronizeInstances()}},L.prototype.setVerticesData=function(G,Q,oe,re){if(oe===void 0&&(oe=!1),this._geometry)this._geometry.setVerticesData(G,Q,oe,re);else{var Y=new T.a;Y.set(Q,G);var k=this.getScene();new A.a(A.a.RandomId(),k,Y,oe,this)}return this},L.prototype.removeVerticesData=function(G){this._geometry&&this._geometry.removeVerticesData(G)},L.prototype.markVerticesDataAsUpdatable=function(G,Q){Q===void 0&&(Q=!0);var oe=this.getVertexBuffer(G);oe&&oe.isUpdatable()!==Q&&this.setVerticesData(G,this.getVerticesData(G),Q)},L.prototype.setVerticesBuffer=function(G){return this._geometry||(this._geometry=A.a.CreateGeometryForMesh(this)),this._geometry.setVerticesBuffer(G),this},L.prototype.updateVerticesData=function(G,Q,oe,re){return this._geometry?(re?(this.makeGeometryUnique(),this.updateVerticesData(G,Q,oe,!1)):this._geometry.updateVerticesData(G,Q,oe),this):this},L.prototype.updateMeshPositions=function(G,Q){Q===void 0&&(Q=!0);var oe=this.getVerticesData(c.b.PositionKind);if(!oe)return this;if(G(oe),this.updateVerticesData(c.b.PositionKind,oe,!1,!1),Q){var re=this.getIndices(),Y=this.getVerticesData(c.b.NormalKind);if(!Y)return this;T.a.ComputeNormals(oe,re,Y),this.updateVerticesData(c.b.NormalKind,Y,!1,!1)}return this},L.prototype.makeGeometryUnique=function(){if(!this._geometry)return this;if(this._geometry.meshes.length===1)return this;var G=this._geometry,Q=this._geometry.copy(A.a.RandomId());return G.releaseForMesh(this,!0),Q.applyToMesh(this),this},L.prototype.setIndices=function(G,Q,oe){if(Q===void 0&&(Q=null),oe===void 0&&(oe=!1),this._geometry)this._geometry.setIndices(G,Q,oe);else{var re=new T.a;re.indices=G;var Y=this.getScene();new A.a(A.a.RandomId(),Y,re,oe,this)}return this},L.prototype.updateIndices=function(G,Q,oe){return oe===void 0&&(oe=!1),this._geometry?(this._geometry.updateIndices(G,Q,oe),this):this},L.prototype.toLeftHanded=function(){return this._geometry?(this._geometry.toLeftHanded(),this):this},L.prototype._bind=function(G,Q,oe){if(!this._geometry)return this;var re,Y=this.getScene().getEngine();if(this._unIndexed)re=null;else switch(oe){case h.a.PointFillMode:re=null;break;case h.a.WireFrameFillMode:re=G._getLinesIndexBuffer(this.getIndices(),Y);break;default:case h.a.TriangleFillMode:re=this._geometry.getIndexBuffer()}return this._geometry._bind(Q,re),this},L.prototype._draw=function(G,Q,oe){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;this._internalMeshDataInfo._onBeforeDrawObservable&&this._internalMeshDataInfo._onBeforeDrawObservable.notifyObservers(this);var re=this.getScene().getEngine();return this._unIndexed||Q==h.a.PointFillMode?re.drawArraysType(Q,G.verticesStart,G.verticesCount,oe):Q==h.a.WireFrameFillMode?re.drawElementsType(Q,0,G._linesIndexCount,oe):re.drawElementsType(Q,G.indexStart,G.indexCount,oe),this},L.prototype.registerBeforeRender=function(G){return this.onBeforeRenderObservable.add(G),this},L.prototype.unregisterBeforeRender=function(G){return this.onBeforeRenderObservable.removeCallback(G),this},L.prototype.registerAfterRender=function(G){return this.onAfterRenderObservable.add(G),this},L.prototype.unregisterAfterRender=function(G){return this.onAfterRenderObservable.removeCallback(G),this},L.prototype._getInstancesRenderList=function(G,Q){if(Q===void 0&&(Q=!1),this._instanceDataStorage.isFrozen&&this._instanceDataStorage.previousBatch)return this._instanceDataStorage.previousBatch;var oe=this.getScene(),re=oe._isInIntermediateRendering(),Y=re?this._internalAbstractMeshDataInfo._onlyForInstancesIntermediate:this._internalAbstractMeshDataInfo._onlyForInstances,k=this._instanceDataStorage.batchCache;if(k.mustReturn=!1,k.renderSelf[G]=Q||!Y&&this.isEnabled()&&this.isVisible,k.visibleInstances[G]=null,this._instanceDataStorage.visibleInstances&&!Q){var H=this._instanceDataStorage.visibleInstances,Z=oe.getRenderId(),W=re?H.intermediateDefaultRenderId:H.defaultRenderId;k.visibleInstances[G]=H[Z],!k.visibleInstances[G]&&W&&(k.visibleInstances[G]=H[W])}return k.hardwareInstancedRendering[G]=!Q&&this._instanceDataStorage.hardwareInstancedRendering&&k.visibleInstances[G]!==null&&k.visibleInstances[G]!==void 0,this._instanceDataStorage.previousBatch=k,k},L.prototype._renderWithInstances=function(G,Q,oe,re,Y){var k=oe.visibleInstances[G._id];if(!k)return this;for(var H=this._instanceDataStorage,Z=H.instancesBufferSize,W=H.instancesBuffer,q=16*(k.length+1)*4;H.instancesBufferSizehe&&re++,be!==0&&me++,ge+=be,he=be}if(W[me]++,me>k&&(k=me),ge===0)Y++;else{var Ce=1/ge,ye=0;for(_e=0;_e.001&&H++}}var Ue=this.skeleton.bones.length,Ge=this.getVerticesData(c.b.MatricesIndicesKind),Xe=this.getVerticesData(c.b.MatricesIndicesExtraKind),He=0;for(q=0;q=Ue||We<0)&&He++}return{skinned:!0,valid:Y===0&&H===0&&He===0,report:"Number of Weights = "+oe/4+` -Maximum influences = `+k+` -Missing Weights = `+Y+` -Not Sorted = `+re+` -Not Normalized = `+H+` -WeightCounts = [`+W+`] -Number of bones = `+Ue+` -Bad Bone Indices = `+He}},L.prototype._checkDelayState=function(){var G=this.getScene();return this._geometry?this._geometry.load(G):this.delayLoadState===D.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=D.a.DELAYLOADSTATE_LOADING,this._queueLoad(G)),this},L.prototype._queueLoad=function(G){var Q=this;G._addPendingData(this);var oe=this.delayLoadingFile.indexOf(".babylonbinarymeshdata")!==-1;return P.b.LoadFile(this.delayLoadingFile,function(re){re instanceof ArrayBuffer?Q._delayLoadingFunction(re,Q):Q._delayLoadingFunction(JSON.parse(re),Q),Q.instances.forEach(function(Y){Y.refreshBoundingInfo(),Y._syncSubMeshes()}),Q.delayLoadState=D.a.DELAYLOADSTATE_LOADED,G._removePendingData(Q)},function(){},G.offlineProvider,oe),this},L.prototype.isInFrustum=function(G){return this.delayLoadState!==D.a.DELAYLOADSTATE_LOADING&&!!$.prototype.isInFrustum.call(this,G)&&(this._checkDelayState(),!0)},L.prototype.setMaterialByID=function(G){var Q,oe=this.getScene().materials;for(Q=oe.length-1;Q>-1;Q--)if(oe[Q].id===G)return this.material=oe[Q],this;var re=this.getScene().multiMaterials;for(Q=re.length-1;Q>-1;Q--)if(re[Q].id===G)return this.material=re[Q],this;return this},L.prototype.getAnimatables=function(){var G=new Array;return this.material&&G.push(this.material),this.skeleton&&G.push(this.skeleton),G},L.prototype.bakeTransformIntoVertices=function(G){if(!this.isVerticesDataPresent(c.b.PositionKind))return this;var Q=this.subMeshes.splice(0);this._resetPointsArrayCache();var oe,re=this.getVerticesData(c.b.PositionKind),Y=new Array;for(oe=0;oe1)for(var oe=0,re=Q.meshes.slice(0);oe-1&&(re.morphTargetManager=Q.getMorphTargetManagerById(G.morphTargetManagerId)),G.skeletonId!==void 0&&G.skeletonId!==null&&(re.skeleton=Q.getLastSkeletonByID(G.skeletonId),G.numBoneInfluencers&&(re.numBoneInfluencers=G.numBoneInfluencers)),G.animations){for(var Y=0;Y4,he=q?this.getVerticesData(c.b.MatricesIndicesExtraKind):null,ge=q?this.getVerticesData(c.b.MatricesWeightsExtraKind):null,me=G.getTransformMatrices(this),_e=R.e.Zero(),be=new R.a,Ce=new R.a,ye=0,Ue=0;Ue0&&(R.a.FromFloat32ArrayToRefScaled(me,Math.floor(16*H[ye+W]),Ge,Ce),be.addToSelf(Ce));if(q)for(W=0;W<4;W++)(Ge=ge[ye+W])>0&&(R.a.FromFloat32ArrayToRefScaled(me,Math.floor(16*he[ye+W]),Ge,Ce),be.addToSelf(Ce));R.e.TransformCoordinatesFromFloatsToRef(oe._sourcePositions[Ue],oe._sourcePositions[Ue+1],oe._sourcePositions[Ue+2],be,_e),_e.toArray(Y,Ue),Q&&(R.e.TransformNormalFromFloatsToRef(oe._sourceNormals[Ue],oe._sourceNormals[Ue+1],oe._sourceNormals[Ue+2],be,_e),_e.toArray(k,Ue)),be.reset()}return this.updateVerticesData(c.b.PositionKind,Y),Q&&this.updateVerticesData(c.b.NormalKind,k),this},L.MinMax=function(G){var Q=null,oe=null;return G.forEach(function(re){var Y=re.getBoundingInfo().boundingBox;Q&&oe?(Q.minimizeInPlace(Y.minimumWorld),oe.maximizeInPlace(Y.maximumWorld)):(Q=Y.minimumWorld,oe=Y.maximumWorld)}),Q&&oe?{min:Q,max:oe}:{min:R.e.Zero(),max:R.e.Zero()}},L.Center=function(G){var Q=G instanceof Array?L.MinMax(G):G;return R.e.Center(Q.min,Q.max)},L.MergeMeshes=function(G,Q,oe,re,Y,k){var H;if(Q===void 0&&(Q=!0),!oe){var Z=0;for(H=0;H=65536)return N.a.Warn("Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices"),null}if(k){var W,q,he=null;Y=!1}var ge,me=new Array,_e=new Array,be=null,Ce=new Array,ye=null;for(H=0;H
    ";_._AddLogEntry(O)},_._WarnDisabled=function(P){},_._WarnEnabled=function(P){var l=_._FormatMessage(P);console.warn("BJS - "+l);var O="
    "+l+"

    ";_._AddLogEntry(O)},_._ErrorDisabled=function(P){},_._ErrorEnabled=function(P){_.errorsCount++;var l=_._FormatMessage(P);console.error("BJS - "+l);var O="
    "+l+"

    ";_._AddLogEntry(O)},Object.defineProperty(_,"LogCache",{get:function(){return _._LogCache},enumerable:!1,configurable:!0}),_.ClearLogCache=function(){_._LogCache="",_.errorsCount=0},Object.defineProperty(_,"LogLevels",{set:function(P){(P&_.MessageLogLevel)===_.MessageLogLevel?_.Log=_._LogEnabled:_.Log=_._LogDisabled,(P&_.WarningLogLevel)===_.WarningLogLevel?_.Warn=_._WarnEnabled:_.Warn=_._WarnDisabled,(P&_.ErrorLogLevel)===_.ErrorLogLevel?_.Error=_._ErrorEnabled:_.Error=_._ErrorDisabled},enumerable:!1,configurable:!0}),_.NoneLogLevel=0,_.MessageLogLevel=1,_.WarningLogLevel=2,_.ErrorLogLevel=4,_.AllLogLevel=7,_._LogCache="",_.errorsCount=0,_.Log=_._LogEnabled,_.Warn=_._WarnEnabled,_.Error=_._ErrorEnabled,_}()},function(Ae,v,f){f.d(v,"a",function(){return O}),f.d(v,"b",function(){return R}),f.d(v,"c",function(){return x});var B=f(14),_=f(28),P=f(44),l=f(11),O=function(){function m(c,T,A){c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=0),this.r=c,this.g=T,this.b=A}return m.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"},m.prototype.getClassName=function(){return"Color3"},m.prototype.getHashCode=function(){var c=255*this.r|0;return c=397*(c=397*c^(255*this.g|0))^(255*this.b|0)},m.prototype.toArray=function(c,T){return T===void 0&&(T=0),c[T]=this.r,c[T+1]=this.g,c[T+2]=this.b,this},m.prototype.fromArray=function(c,T){return T===void 0&&(T=0),m.FromArrayToRef(c,T,this),this},m.prototype.toColor4=function(c){return c===void 0&&(c=1),new R(this.r,this.g,this.b,c)},m.prototype.asArray=function(){var c=new Array;return this.toArray(c,0),c},m.prototype.toLuminance=function(){return .3*this.r+.59*this.g+.11*this.b},m.prototype.multiply=function(c){return new m(this.r*c.r,this.g*c.g,this.b*c.b)},m.prototype.multiplyToRef=function(c,T){return T.r=this.r*c.r,T.g=this.g*c.g,T.b=this.b*c.b,this},m.prototype.equals=function(c){return c&&this.r===c.r&&this.g===c.g&&this.b===c.b},m.prototype.equalsFloats=function(c,T,A){return this.r===c&&this.g===T&&this.b===A},m.prototype.scale=function(c){return new m(this.r*c,this.g*c,this.b*c)},m.prototype.scaleToRef=function(c,T){return T.r=this.r*c,T.g=this.g*c,T.b=this.b*c,this},m.prototype.scaleAndAddToRef=function(c,T){return T.r+=this.r*c,T.g+=this.g*c,T.b+=this.b*c,this},m.prototype.clampToRef=function(c,T,A){return c===void 0&&(c=0),T===void 0&&(T=1),A.r=B.a.Clamp(this.r,c,T),A.g=B.a.Clamp(this.g,c,T),A.b=B.a.Clamp(this.b,c,T),this},m.prototype.add=function(c){return new m(this.r+c.r,this.g+c.g,this.b+c.b)},m.prototype.addToRef=function(c,T){return T.r=this.r+c.r,T.g=this.g+c.g,T.b=this.b+c.b,this},m.prototype.subtract=function(c){return new m(this.r-c.r,this.g-c.g,this.b-c.b)},m.prototype.subtractToRef=function(c,T){return T.r=this.r-c.r,T.g=this.g-c.g,T.b=this.b-c.b,this},m.prototype.clone=function(){return new m(this.r,this.g,this.b)},m.prototype.copyFrom=function(c){return this.r=c.r,this.g=c.g,this.b=c.b,this},m.prototype.copyFromFloats=function(c,T,A){return this.r=c,this.g=T,this.b=A,this},m.prototype.set=function(c,T,A){return this.copyFromFloats(c,T,A)},m.prototype.toHexString=function(){var c=255*this.r|0,T=255*this.g|0,A=255*this.b|0;return"#"+B.a.ToHex(c)+B.a.ToHex(T)+B.a.ToHex(A)},m.prototype.toLinearSpace=function(){var c=new m;return this.toLinearSpaceToRef(c),c},m.prototype.toHSV=function(){var c=new m;return this.toHSVToRef(c),c},m.prototype.toHSVToRef=function(c){var T=this.r,A=this.g,S=this.b,g=Math.max(T,A,S),u=Math.min(T,A,S),h=0,b=0,E=g,D=g-u;g!==0&&(b=D/g),g!=u&&(g==T?(h=(A-S)/D,A=0&&u<=1?(b=g,E=h):u>=1&&u<=2?(b=h,E=g):u>=2&&u<=3?(E=g,D=h):u>=3&&u<=4?(E=h,D=g):u>=4&&u<=5?(b=h,D=g):u>=5&&u<=6&&(b=g,D=h);var w=A-g;S.set(b+w,E+w,D+w)},m.FromHexString=function(c){if(c.substring(0,1)!=="#"||c.length!==7)return new m(0,0,0);var T=parseInt(c.substring(1,3),16),A=parseInt(c.substring(3,5),16),S=parseInt(c.substring(5,7),16);return m.FromInts(T,A,S)},m.FromArray=function(c,T){return T===void 0&&(T=0),new m(c[T],c[T+1],c[T+2])},m.FromArrayToRef=function(c,T,A){T===void 0&&(T=0),A.r=c[T],A.g=c[T+1],A.b=c[T+2]},m.FromInts=function(c,T,A){return new m(c/255,T/255,A/255)},m.Lerp=function(c,T,A){var S=new m(0,0,0);return m.LerpToRef(c,T,A,S),S},m.LerpToRef=function(c,T,A,S){S.r=c.r+(T.r-c.r)*A,S.g=c.g+(T.g-c.g)*A,S.b=c.b+(T.b-c.b)*A},m.Red=function(){return new m(1,0,0)},m.Green=function(){return new m(0,1,0)},m.Blue=function(){return new m(0,0,1)},m.Black=function(){return new m(0,0,0)},Object.defineProperty(m,"BlackReadOnly",{get:function(){return m._BlackReadOnly},enumerable:!1,configurable:!0}),m.White=function(){return new m(1,1,1)},m.Purple=function(){return new m(.5,0,.5)},m.Magenta=function(){return new m(1,0,1)},m.Yellow=function(){return new m(1,1,0)},m.Gray=function(){return new m(.5,.5,.5)},m.Teal=function(){return new m(0,1,1)},m.Random=function(){return new m(Math.random(),Math.random(),Math.random())},m._BlackReadOnly=m.Black(),m}(),R=function(){function m(c,T,A,S){c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=0),S===void 0&&(S=1),this.r=c,this.g=T,this.b=A,this.a=S}return m.prototype.addInPlace=function(c){return this.r+=c.r,this.g+=c.g,this.b+=c.b,this.a+=c.a,this},m.prototype.asArray=function(){var c=new Array;return this.toArray(c,0),c},m.prototype.toArray=function(c,T){return T===void 0&&(T=0),c[T]=this.r,c[T+1]=this.g,c[T+2]=this.b,c[T+3]=this.a,this},m.prototype.fromArray=function(c,T){return T===void 0&&(T=0),m.FromArrayToRef(c,T,this),this},m.prototype.equals=function(c){return c&&this.r===c.r&&this.g===c.g&&this.b===c.b&&this.a===c.a},m.prototype.add=function(c){return new m(this.r+c.r,this.g+c.g,this.b+c.b,this.a+c.a)},m.prototype.subtract=function(c){return new m(this.r-c.r,this.g-c.g,this.b-c.b,this.a-c.a)},m.prototype.subtractToRef=function(c,T){return T.r=this.r-c.r,T.g=this.g-c.g,T.b=this.b-c.b,T.a=this.a-c.a,this},m.prototype.scale=function(c){return new m(this.r*c,this.g*c,this.b*c,this.a*c)},m.prototype.scaleToRef=function(c,T){return T.r=this.r*c,T.g=this.g*c,T.b=this.b*c,T.a=this.a*c,this},m.prototype.scaleAndAddToRef=function(c,T){return T.r+=this.r*c,T.g+=this.g*c,T.b+=this.b*c,T.a+=this.a*c,this},m.prototype.clampToRef=function(c,T,A){return c===void 0&&(c=0),T===void 0&&(T=1),A.r=B.a.Clamp(this.r,c,T),A.g=B.a.Clamp(this.g,c,T),A.b=B.a.Clamp(this.b,c,T),A.a=B.a.Clamp(this.a,c,T),this},m.prototype.multiply=function(c){return new m(this.r*c.r,this.g*c.g,this.b*c.b,this.a*c.a)},m.prototype.multiplyToRef=function(c,T){return T.r=this.r*c.r,T.g=this.g*c.g,T.b=this.b*c.b,T.a=this.a*c.a,T},m.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"},m.prototype.getClassName=function(){return"Color4"},m.prototype.getHashCode=function(){var c=255*this.r|0;return c=397*(c=397*(c=397*c^(255*this.g|0))^(255*this.b|0))^(255*this.a|0)},m.prototype.clone=function(){return new m(this.r,this.g,this.b,this.a)},m.prototype.copyFrom=function(c){return this.r=c.r,this.g=c.g,this.b=c.b,this.a=c.a,this},m.prototype.copyFromFloats=function(c,T,A,S){return this.r=c,this.g=T,this.b=A,this.a=S,this},m.prototype.set=function(c,T,A,S){return this.copyFromFloats(c,T,A,S)},m.prototype.toHexString=function(c){c===void 0&&(c=!1);var T=255*this.r|0,A=255*this.g|0,S=255*this.b|0;if(c)return"#"+B.a.ToHex(T)+B.a.ToHex(A)+B.a.ToHex(S);var g=255*this.a|0;return"#"+B.a.ToHex(T)+B.a.ToHex(A)+B.a.ToHex(S)+B.a.ToHex(g)},m.prototype.toLinearSpace=function(){var c=new m;return this.toLinearSpaceToRef(c),c},m.prototype.toLinearSpaceToRef=function(c){return c.r=Math.pow(this.r,_.c),c.g=Math.pow(this.g,_.c),c.b=Math.pow(this.b,_.c),c.a=this.a,this},m.prototype.toGammaSpace=function(){var c=new m;return this.toGammaSpaceToRef(c),c},m.prototype.toGammaSpaceToRef=function(c){return c.r=Math.pow(this.r,_.b),c.g=Math.pow(this.g,_.b),c.b=Math.pow(this.b,_.b),c.a=this.a,this},m.FromHexString=function(c){if(c.substring(0,1)!=="#"||c.length!==9)return new m(0,0,0,0);var T=parseInt(c.substring(1,3),16),A=parseInt(c.substring(3,5),16),S=parseInt(c.substring(5,7),16),g=parseInt(c.substring(7,9),16);return m.FromInts(T,A,S,g)},m.Lerp=function(c,T,A){var S=new m(0,0,0,0);return m.LerpToRef(c,T,A,S),S},m.LerpToRef=function(c,T,A,S){S.r=c.r+(T.r-c.r)*A,S.g=c.g+(T.g-c.g)*A,S.b=c.b+(T.b-c.b)*A,S.a=c.a+(T.a-c.a)*A},m.FromColor3=function(c,T){return T===void 0&&(T=1),new m(c.r,c.g,c.b,T)},m.FromArray=function(c,T){return T===void 0&&(T=0),new m(c[T],c[T+1],c[T+2],c[T+3])},m.FromArrayToRef=function(c,T,A){T===void 0&&(T=0),A.r=c[T],A.g=c[T+1],A.b=c[T+2],A.a=c[T+3]},m.FromInts=function(c,T,A,S){return new m(c/255,T/255,A/255,S/255)},m.CheckColors4=function(c,T){if(c.length===3*T){for(var A=[],S=0;S0?E.name:w+E.name,(S.a.StartsWith(E.url,"data:")||b.UseSerializedUrlIfAny&&E.url)&&(ae=E.url),X=new b(ae,D,!j,E.invertY,void 0,I)}return X},E,D);return V},b.CreateFromBase64String=function(E,D,w,N,I,V,X,j,ne){return V===void 0&&(V=b.TRILINEAR_SAMPLINGMODE),X===void 0&&(X=null),j===void 0&&(j=null),ne===void 0&&(ne=R.a.TEXTUREFORMAT_RGBA),new b("data:"+D,w,N,I,V,X,j,E,!1,ne)},b.LoadFromDataString=function(E,D,w,N,I,V,X,j,ne,te){return N===void 0&&(N=!1),I===void 0&&(I=!1),V===void 0&&(V=!0),X===void 0&&(X=b.TRILINEAR_SAMPLINGMODE),j===void 0&&(j=null),ne===void 0&&(ne=null),te===void 0&&(te=R.a.TEXTUREFORMAT_RGBA),E.substr(0,5)!=="data:"&&(E="data:"+E),new b(E,w,I,V,X,j,ne,D,N,te)},b.SerializeBuffers=!0,b.ForceSerializeBuffers=!1,b._CubeTextureParser=function(E,D,w){throw m.a.WarnImport("CubeTexture")},b._CreateMirror=function(E,D,w,N){throw m.a.WarnImport("MirrorTexture")},b._CreateRenderTargetTexture=function(E,D,w,N){throw m.a.WarnImport("RenderTargetTexture")},b.NEAREST_SAMPLINGMODE=R.a.TEXTURE_NEAREST_SAMPLINGMODE,b.NEAREST_NEAREST_MIPLINEAR=R.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,b.BILINEAR_SAMPLINGMODE=R.a.TEXTURE_BILINEAR_SAMPLINGMODE,b.LINEAR_LINEAR_MIPNEAREST=R.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,b.TRILINEAR_SAMPLINGMODE=R.a.TEXTURE_TRILINEAR_SAMPLINGMODE,b.LINEAR_LINEAR_MIPLINEAR=R.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,b.NEAREST_NEAREST_MIPNEAREST=R.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,b.NEAREST_LINEAR_MIPNEAREST=R.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,b.NEAREST_LINEAR_MIPLINEAR=R.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,b.NEAREST_LINEAR=R.a.TEXTURE_NEAREST_LINEAR,b.NEAREST_NEAREST=R.a.TEXTURE_NEAREST_NEAREST,b.LINEAR_NEAREST_MIPNEAREST=R.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,b.LINEAR_NEAREST_MIPLINEAR=R.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,b.LINEAR_LINEAR=R.a.TEXTURE_LINEAR_LINEAR,b.LINEAR_NEAREST=R.a.TEXTURE_LINEAR_NEAREST,b.EXPLICIT_MODE=R.a.TEXTURE_EXPLICIT_MODE,b.SPHERICAL_MODE=R.a.TEXTURE_SPHERICAL_MODE,b.PLANAR_MODE=R.a.TEXTURE_PLANAR_MODE,b.CUBIC_MODE=R.a.TEXTURE_CUBIC_MODE,b.PROJECTION_MODE=R.a.TEXTURE_PROJECTION_MODE,b.SKYBOX_MODE=R.a.TEXTURE_SKYBOX_MODE,b.INVCUBIC_MODE=R.a.TEXTURE_INVCUBIC_MODE,b.EQUIRECTANGULAR_MODE=R.a.TEXTURE_EQUIRECTANGULAR_MODE,b.FIXED_EQUIRECTANGULAR_MODE=R.a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,b.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=R.a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,b.CLAMP_ADDRESSMODE=R.a.TEXTURE_CLAMP_ADDRESSMODE,b.WRAP_ADDRESSMODE=R.a.TEXTURE_WRAP_ADDRESSMODE,b.MIRROR_ADDRESSMODE=R.a.TEXTURE_MIRROR_ADDRESSMODE,b.UseSerializedUrlIfAny=!1,Object(B.c)([Object(_.c)()],b.prototype,"url",void 0),Object(B.c)([Object(_.c)()],b.prototype,"uOffset",void 0),Object(B.c)([Object(_.c)()],b.prototype,"vOffset",void 0),Object(B.c)([Object(_.c)()],b.prototype,"uScale",void 0),Object(B.c)([Object(_.c)()],b.prototype,"vScale",void 0),Object(B.c)([Object(_.c)()],b.prototype,"uAng",void 0),Object(B.c)([Object(_.c)()],b.prototype,"vAng",void 0),Object(B.c)([Object(_.c)()],b.prototype,"wAng",void 0),Object(B.c)([Object(_.c)()],b.prototype,"uRotationCenter",void 0),Object(B.c)([Object(_.c)()],b.prototype,"vRotationCenter",void 0),Object(B.c)([Object(_.c)()],b.prototype,"wRotationCenter",void 0),Object(B.c)([Object(_.c)()],b.prototype,"homogeneousRotationInUVTransform",void 0),Object(B.c)([Object(_.c)()],b.prototype,"isBlocking",null),b}(O.a);x.a.RegisteredTypes["BABYLON.Texture"]=u,_.a._TextureParser=u.Parse},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){}return _.GetClass=function(P){return this.RegisteredTypes&&this.RegisteredTypes[P]?this.RegisteredTypes[P]:null},_.RegisteredTypes={},_}()},function(Ae,v,f){f.d(v,"b",function(){return u}),f.d(v,"c",function(){return h}),f.d(v,"a",function(){return b});var B=f(6),_=f(38),P=f(8),l=f(41),O=f(57),R=f(21),x=f(49),m=f(22),c=f(56),T=f(145),A=f(104),S=f(122),g=f(120),u=function(){function E(){}return Object.defineProperty(E,"BaseUrl",{get:function(){return c.a.BaseUrl},set:function(D){c.a.BaseUrl=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"DefaultRetryStrategy",{get:function(){return c.a.DefaultRetryStrategy},set:function(D){c.a.DefaultRetryStrategy=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"CorsBehavior",{get:function(){return c.a.CorsBehavior},set:function(D){c.a.CorsBehavior=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"UseFallbackTexture",{get:function(){return m.a.UseFallbackTexture},set:function(D){m.a.UseFallbackTexture=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"RegisteredExternalClasses",{get:function(){return S.a.RegisteredExternalClasses},set:function(D){S.a.RegisteredExternalClasses=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"fallbackTexture",{get:function(){return m.a.FallbackTexture},set:function(D){m.a.FallbackTexture=D},enumerable:!1,configurable:!0}),E.FetchToRef=function(D,w,N,I,V,X){var j=4*((Math.abs(D)*N%N|0)+(Math.abs(w)*I%I|0)*N);X.r=V[j]/255,X.g=V[j+1]/255,X.b=V[j+2]/255,X.a=V[j+3]/255},E.Mix=function(D,w,N){return D*(1-N)+w*N},E.Instantiate=function(D){return S.a.Instantiate(D)},E.Slice=function(D,w,N){return D.slice?D.slice(w,N):Array.prototype.slice.call(D,w,N)},E.SliceToArray=function(D,w,N){return Array.isArray(D)?D.slice(w,N):Array.prototype.slice.call(D,w,N)},E.SetImmediate=function(D){A.a.SetImmediate(D)},E.IsExponentOfTwo=function(D){var w=1;do w*=2;while(w=D)break;if(N(te),V&&V()){j.breakLoop();break}}j.executeNext()},X)},I)},E}();m.a.FallbackTexture="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z",T.a.Apply()},function(Ae,v,f){f.d(v,"a",function(){return S});var B=f(1),_=f(6),P=f(38),l=f(22),O=f(21),R=f(26),x=f(2),m=f(146),c=f(55),T=f(88),A=f(8),S=(f(123),f(129),f(124),function(g){function u(h,b,E,D){D===void 0&&(D=!1);var w=g.call(this,h,b,E,D)||this;if(w.enableOfflineSupport=!1,w.disableManifestCheck=!1,w.scenes=new Array,w.onNewSceneAddedObservable=new _.c,w.postProcesses=new Array,w.isPointerLock=!1,w.onResizeObservable=new _.c,w.onCanvasBlurObservable=new _.c,w.onCanvasFocusObservable=new _.c,w.onCanvasPointerOutObservable=new _.c,w.onBeginFrameObservable=new _.c,w.customAnimationFrameRequester=null,w.onEndFrameObservable=new _.c,w.onBeforeShaderCompilationObservable=new _.c,w.onAfterShaderCompilationObservable=new _.c,w._deterministicLockstep=!1,w._lockstepMaxSteps=4,w._timeStep=1/60,w._fps=60,w._deltaTime=0,w._drawCalls=new c.a,w.canvasTabIndex=1,w.disablePerformanceMonitorInBackground=!1,w._performanceMonitor=new m.a,u.Instances.push(w),!h)return w;if(E=w._creationOptions,h.getContext){var N=h;if(w._onCanvasFocus=function(){w.onCanvasFocusObservable.notifyObservers(w)},w._onCanvasBlur=function(){w.onCanvasBlurObservable.notifyObservers(w)},N.addEventListener("focus",w._onCanvasFocus),N.addEventListener("blur",w._onCanvasBlur),w._onBlur=function(){w.disablePerformanceMonitorInBackground&&w._performanceMonitor.disable(),w._windowIsBackground=!0},w._onFocus=function(){w.disablePerformanceMonitorInBackground&&w._performanceMonitor.enable(),w._windowIsBackground=!1},w._onCanvasPointerOut=function(X){w.onCanvasPointerOutObservable.notifyObservers(X)},N.addEventListener("pointerout",w._onCanvasPointerOut),P.a.IsWindowObjectExist()){var I=w.getHostWindow();I.addEventListener("blur",w._onBlur),I.addEventListener("focus",w._onFocus);var V=document;w._onFullscreenChange=function(){V.fullscreen!==void 0?w.isFullscreen=V.fullscreen:V.mozFullScreen!==void 0?w.isFullscreen=V.mozFullScreen:V.webkitIsFullScreen!==void 0?w.isFullscreen=V.webkitIsFullScreen:V.msIsFullScreen!==void 0&&(w.isFullscreen=V.msIsFullScreen),w.isFullscreen&&w._pointerLockRequested&&N&&u._RequestPointerlock(N)},document.addEventListener("fullscreenchange",w._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",w._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",w._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",w._onFullscreenChange,!1),w._onPointerLockChange=function(){w.isPointerLock=V.mozPointerLockElement===N||V.webkitPointerLockElement===N||V.msPointerLockElement===N||V.pointerLockElement===N},document.addEventListener("pointerlockchange",w._onPointerLockChange,!1),document.addEventListener("mspointerlockchange",w._onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",w._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",w._onPointerLockChange,!1),!u.audioEngine&&E.audioEngine&&u.AudioEngineFactory&&(u.audioEngine=u.AudioEngineFactory(w.getRenderingCanvas()))}w._connectVREvents(),w.enableOfflineSupport=u.OfflineProviderFactory!==void 0,E.doNotHandleTouchAction||w._disableTouchAction(),w._deterministicLockstep=!!E.deterministicLockstep,w._lockstepMaxSteps=E.lockstepMaxSteps||0,w._timeStep=E.timeStep||1/60}return w._prepareVRComponent(),E.autoEnableWebVR&&w.initWebVR(),w}return Object(B.d)(u,g),Object.defineProperty(u,"NpmPackage",{get:function(){return R.a.NpmPackage},enumerable:!1,configurable:!0}),Object.defineProperty(u,"Version",{get:function(){return R.a.Version},enumerable:!1,configurable:!0}),Object.defineProperty(u,"Instances",{get:function(){return l.a.Instances},enumerable:!1,configurable:!0}),Object.defineProperty(u,"LastCreatedEngine",{get:function(){return l.a.LastCreatedEngine},enumerable:!1,configurable:!0}),Object.defineProperty(u,"LastCreatedScene",{get:function(){return l.a.LastCreatedScene},enumerable:!1,configurable:!0}),u.MarkAllMaterialsAsDirty=function(h,b){for(var E=0;E0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this.isVRPresenting()?this._requestVRFrame():this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},u.prototype._renderViews=function(){return!1},u.prototype.switchFullscreen=function(h){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(h)},u.prototype.enterFullscreen=function(h){this.isFullscreen||(this._pointerLockRequested=h,this._renderingCanvas&&u._RequestFullscreen(this._renderingCanvas))},u.prototype.exitFullscreen=function(){this.isFullscreen&&u._ExitFullscreen()},u.prototype.enterPointerlock=function(){this._renderingCanvas&&u._RequestPointerlock(this._renderingCanvas)},u.prototype.exitPointerlock=function(){u._ExitPointerlock()},u.prototype.beginFrame=function(){this._measureFps(),this.onBeginFrameObservable.notifyObservers(this),g.prototype.beginFrame.call(this)},u.prototype.endFrame=function(){g.prototype.endFrame.call(this),this._submitVRFrame(),this.onEndFrameObservable.notifyObservers(this)},u.prototype.resize=function(){this.isVRPresenting()||g.prototype.resize.call(this)},u.prototype.setSize=function(h,b){if(!this._renderingCanvas||!g.prototype.setSize.call(this,h,b))return!1;if(this.scenes){for(var E=0;E1&&w){var I=this.createTransformFeedback();this.bindTransformFeedback(I),this.setTranformFeedbackVaryings(N,w),h.transformFeedback=I}return D.linkProgram(N),this.webGLVersion>1&&w&&this.bindTransformFeedback(null),h.context=D,h.vertexShader=b,h.fragmentShader=E,h.isParallelCompiled||this._finalizePipelineContext(h),N},u.prototype._releaseTexture=function(h){g.prototype._releaseTexture.call(this,h),this.scenes.forEach(function(b){b.postProcesses.forEach(function(E){E._outputTexture==h&&(E._outputTexture=null)}),b.cameras.forEach(function(E){E._postProcesses.forEach(function(D){D&&D._outputTexture==h&&(D._outputTexture=null)})})})},u.prototype._rescaleTexture=function(h,b,E,D,w){var N=this;this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);var I=this.createRenderTargetTexture({width:b.width,height:b.height},{generateMipMaps:!1,type:x.a.TEXTURETYPE_UNSIGNED_INT,samplingMode:x.a.TEXTURE_BILINEAR_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1});!this._rescalePostProcess&&u._RescalePostProcessFactory&&(this._rescalePostProcess=u._RescalePostProcessFactory(this)),this._rescalePostProcess.getEffect().executeWhenCompiled(function(){N._rescalePostProcess.onApply=function(X){X._bindTexture("textureSampler",h)};var V=E;V||(V=N.scenes[N.scenes.length-1]),V.postProcessManager.directRender([N._rescalePostProcess],I,!0),N._bindTextureDirectly(N._gl.TEXTURE_2D,b,!0),N._gl.copyTexImage2D(N._gl.TEXTURE_2D,0,D,0,0,b.width,b.height,0),N.unBindFramebuffer(I),N._releaseTexture(I),w&&w()})},u.prototype.getFps=function(){return this._fps},u.prototype.getDeltaTime=function(){return this._deltaTime},u.prototype._measureFps=function(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0},u.prototype._uploadImageToTexture=function(h,b,E,D){E===void 0&&(E=0),D===void 0&&(D=0);var w=this._gl,N=this._getWebGLTextureType(h.type),I=this._getInternalFormat(h.format),V=this._getRGBABufferInternalSizedFormat(h.type,I),X=h.isCube?w.TEXTURE_CUBE_MAP:w.TEXTURE_2D;this._bindTextureDirectly(X,h,!0),this._unpackFlipY(h.invertY);var j=w.TEXTURE_2D;h.isCube&&(j=w.TEXTURE_CUBE_MAP_POSITIVE_X+E),w.texImage2D(j,D,V,I,N,b),this._bindTextureDirectly(X,null,!0)},u.prototype.updateRenderTargetTextureSampleCount=function(h,b){if(this.webGLVersion<2||!h)return 1;if(h.samples===b)return b;var E=this._gl;if(b=Math.min(b,this.getCaps().maxMSAASamples),h._depthStencilBuffer&&(E.deleteRenderbuffer(h._depthStencilBuffer),h._depthStencilBuffer=null),h._MSAAFramebuffer&&(E.deleteFramebuffer(h._MSAAFramebuffer),h._MSAAFramebuffer=null),h._MSAARenderBuffer&&(E.deleteRenderbuffer(h._MSAARenderBuffer),h._MSAARenderBuffer=null),b>1&&E.renderbufferStorageMultisample){var D=E.createFramebuffer();if(!D)throw new Error("Unable to create multi sampled framebuffer");h._MSAAFramebuffer=D,this._bindUnboundFramebuffer(h._MSAAFramebuffer);var w=E.createRenderbuffer();if(!w)throw new Error("Unable to create multi sampled framebuffer");E.bindRenderbuffer(E.RENDERBUFFER,w),E.renderbufferStorageMultisample(E.RENDERBUFFER,b,this._getRGBAMultiSampleBufferFormat(h.type),h.width,h.height),E.framebufferRenderbuffer(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.RENDERBUFFER,w),h._MSAARenderBuffer=w}else this._bindUnboundFramebuffer(h._framebuffer);return h.samples=b,h._depthStencilBuffer=this._setupFramebufferDepthAttachments(h._generateStencilBuffer,h._generateDepthBuffer,h.width,h.height,b),this._bindUnboundFramebuffer(null),b},u.prototype.updateTextureComparisonFunction=function(h,b){if(this.webGLVersion!==1){var E=this._gl;h.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,h,!0),b===0?(E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_FUNC,x.a.LEQUAL),E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_MODE,E.NONE)):(E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_FUNC,b),E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_MODE,E.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,h,!0),b===0?(E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_FUNC,x.a.LEQUAL),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_MODE,E.NONE)):(E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_FUNC,b),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_MODE,E.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),h._comparisonFunction=b}else A.a.Error("WebGL 1 does not support texture comparison.")},u.prototype.createInstancesBuffer=function(h){var b=this._gl.createBuffer();if(!b)throw new Error("Unable to create instance buffer");var E=new T.a(b);return E.capacity=h,this.bindArrayBuffer(E),this._gl.bufferData(this._gl.ARRAY_BUFFER,h,this._gl.DYNAMIC_DRAW),E},u.prototype.deleteInstancesBuffer=function(h){this._gl.deleteBuffer(h)},u.prototype._clientWaitAsync=function(h,b,E){b===void 0&&(b=0),E===void 0&&(E=10);var D=this._gl;return new Promise(function(w,N){var I=function(){var V=D.clientWaitSync(h,b,0);V!=D.WAIT_FAILED?V!=D.TIMEOUT_EXPIRED?w():setTimeout(I,E):N()};I()})},u.prototype._readPixelsAsync=function(h,b,E,D,w,N,I){if(this._webGLVersion<2)throw new Error("_readPixelsAsync only work on WebGL2+");var V=this._gl,X=V.createBuffer();V.bindBuffer(V.PIXEL_PACK_BUFFER,X),V.bufferData(V.PIXEL_PACK_BUFFER,I.byteLength,V.STREAM_READ),V.readPixels(h,b,E,D,w,N,0),V.bindBuffer(V.PIXEL_PACK_BUFFER,null);var j=V.fenceSync(V.SYNC_GPU_COMMANDS_COMPLETE,0);return j?(V.flush(),this._clientWaitAsync(j,0,10).then(function(){return V.deleteSync(j),V.bindBuffer(V.PIXEL_PACK_BUFFER,X),V.getBufferSubData(V.PIXEL_PACK_BUFFER,0,I),V.bindBuffer(V.PIXEL_PACK_BUFFER,null),V.deleteBuffer(X),I})):null},u.prototype.dispose=function(){for(this.hideLoadingUI(),this.onNewSceneAddedObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(this._rescalePostProcess&&this._rescalePostProcess.dispose();this.scenes.length;)this.scenes[0].dispose();u.Instances.length===1&&u.audioEngine&&u.audioEngine.dispose(),this.disableVR(),P.a.IsWindowObjectExist()&&(window.removeEventListener("blur",this._onBlur),window.removeEventListener("focus",this._onFocus),this._renderingCanvas&&(this._renderingCanvas.removeEventListener("focus",this._onCanvasFocus),this._renderingCanvas.removeEventListener("blur",this._onCanvasBlur),this._renderingCanvas.removeEventListener("pointerout",this._onCanvasPointerOut)),P.a.IsDocumentAvailable()&&(document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange))),g.prototype.dispose.call(this);var h=u.Instances.indexOf(this);h>=0&&u.Instances.splice(h,1),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()},u.prototype._disableTouchAction=function(){this._renderingCanvas&&this._renderingCanvas.setAttribute&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.msTouchAction="none")},u.prototype.displayLoadingUI=function(){if(P.a.IsWindowObjectExist()){var h=this.loadingScreen;h&&h.displayLoadingUI()}},u.prototype.hideLoadingUI=function(){if(P.a.IsWindowObjectExist()){var h=this._loadingScreen;h&&h.hideLoadingUI()}},Object.defineProperty(u.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=u.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(h){this._loadingScreen=h},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"loadingUIText",{set:function(h){this.loadingScreen.loadingUIText=h},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"loadingUIBackgroundColor",{set:function(h){this.loadingScreen.loadingUIBackgroundColor=h},enumerable:!1,configurable:!0}),u._RequestPointerlock=function(h){h.requestPointerLock=h.requestPointerLock||h.msRequestPointerLock||h.mozRequestPointerLock||h.webkitRequestPointerLock,h.requestPointerLock&&h.requestPointerLock()},u._ExitPointerlock=function(){var h=document;document.exitPointerLock=document.exitPointerLock||h.msExitPointerLock||h.mozExitPointerLock||h.webkitExitPointerLock,document.exitPointerLock&&document.exitPointerLock()},u._RequestFullscreen=function(h){var b=h.requestFullscreen||h.msRequestFullscreen||h.webkitRequestFullscreen||h.mozRequestFullScreen;b&&b.call(h)},u._ExitFullscreen=function(){var h=document;document.exitFullscreen?document.exitFullscreen():h.mozCancelFullScreen?h.mozCancelFullScreen():h.webkitCancelFullScreen?h.webkitCancelFullScreen():h.msCancelFullScreen&&h.msCancelFullScreen()},u.ALPHA_DISABLE=x.a.ALPHA_DISABLE,u.ALPHA_ADD=x.a.ALPHA_ADD,u.ALPHA_COMBINE=x.a.ALPHA_COMBINE,u.ALPHA_SUBTRACT=x.a.ALPHA_SUBTRACT,u.ALPHA_MULTIPLY=x.a.ALPHA_MULTIPLY,u.ALPHA_MAXIMIZED=x.a.ALPHA_MAXIMIZED,u.ALPHA_ONEONE=x.a.ALPHA_ONEONE,u.ALPHA_PREMULTIPLIED=x.a.ALPHA_PREMULTIPLIED,u.ALPHA_PREMULTIPLIED_PORTERDUFF=x.a.ALPHA_PREMULTIPLIED_PORTERDUFF,u.ALPHA_INTERPOLATE=x.a.ALPHA_INTERPOLATE,u.ALPHA_SCREENMODE=x.a.ALPHA_SCREENMODE,u.DELAYLOADSTATE_NONE=x.a.DELAYLOADSTATE_NONE,u.DELAYLOADSTATE_LOADED=x.a.DELAYLOADSTATE_LOADED,u.DELAYLOADSTATE_LOADING=x.a.DELAYLOADSTATE_LOADING,u.DELAYLOADSTATE_NOTLOADED=x.a.DELAYLOADSTATE_NOTLOADED,u.NEVER=x.a.NEVER,u.ALWAYS=x.a.ALWAYS,u.LESS=x.a.LESS,u.EQUAL=x.a.EQUAL,u.LEQUAL=x.a.LEQUAL,u.GREATER=x.a.GREATER,u.GEQUAL=x.a.GEQUAL,u.NOTEQUAL=x.a.NOTEQUAL,u.KEEP=x.a.KEEP,u.REPLACE=x.a.REPLACE,u.INCR=x.a.INCR,u.DECR=x.a.DECR,u.INVERT=x.a.INVERT,u.INCR_WRAP=x.a.INCR_WRAP,u.DECR_WRAP=x.a.DECR_WRAP,u.TEXTURE_CLAMP_ADDRESSMODE=x.a.TEXTURE_CLAMP_ADDRESSMODE,u.TEXTURE_WRAP_ADDRESSMODE=x.a.TEXTURE_WRAP_ADDRESSMODE,u.TEXTURE_MIRROR_ADDRESSMODE=x.a.TEXTURE_MIRROR_ADDRESSMODE,u.TEXTUREFORMAT_ALPHA=x.a.TEXTUREFORMAT_ALPHA,u.TEXTUREFORMAT_LUMINANCE=x.a.TEXTUREFORMAT_LUMINANCE,u.TEXTUREFORMAT_LUMINANCE_ALPHA=x.a.TEXTUREFORMAT_LUMINANCE_ALPHA,u.TEXTUREFORMAT_RGB=x.a.TEXTUREFORMAT_RGB,u.TEXTUREFORMAT_RGBA=x.a.TEXTUREFORMAT_RGBA,u.TEXTUREFORMAT_RED=x.a.TEXTUREFORMAT_RED,u.TEXTUREFORMAT_R=x.a.TEXTUREFORMAT_R,u.TEXTUREFORMAT_RG=x.a.TEXTUREFORMAT_RG,u.TEXTUREFORMAT_RED_INTEGER=x.a.TEXTUREFORMAT_RED_INTEGER,u.TEXTUREFORMAT_R_INTEGER=x.a.TEXTUREFORMAT_R_INTEGER,u.TEXTUREFORMAT_RG_INTEGER=x.a.TEXTUREFORMAT_RG_INTEGER,u.TEXTUREFORMAT_RGB_INTEGER=x.a.TEXTUREFORMAT_RGB_INTEGER,u.TEXTUREFORMAT_RGBA_INTEGER=x.a.TEXTUREFORMAT_RGBA_INTEGER,u.TEXTURETYPE_UNSIGNED_BYTE=x.a.TEXTURETYPE_UNSIGNED_BYTE,u.TEXTURETYPE_UNSIGNED_INT=x.a.TEXTURETYPE_UNSIGNED_INT,u.TEXTURETYPE_FLOAT=x.a.TEXTURETYPE_FLOAT,u.TEXTURETYPE_HALF_FLOAT=x.a.TEXTURETYPE_HALF_FLOAT,u.TEXTURETYPE_BYTE=x.a.TEXTURETYPE_BYTE,u.TEXTURETYPE_SHORT=x.a.TEXTURETYPE_SHORT,u.TEXTURETYPE_UNSIGNED_SHORT=x.a.TEXTURETYPE_UNSIGNED_SHORT,u.TEXTURETYPE_INT=x.a.TEXTURETYPE_INT,u.TEXTURETYPE_UNSIGNED_INTEGER=x.a.TEXTURETYPE_UNSIGNED_INTEGER,u.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=x.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,u.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=x.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,u.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=x.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,u.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=x.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,u.TEXTURETYPE_UNSIGNED_INT_24_8=x.a.TEXTURETYPE_UNSIGNED_INT_24_8,u.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=x.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,u.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=x.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,u.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=x.a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,u.TEXTURE_NEAREST_SAMPLINGMODE=x.a.TEXTURE_NEAREST_SAMPLINGMODE,u.TEXTURE_BILINEAR_SAMPLINGMODE=x.a.TEXTURE_BILINEAR_SAMPLINGMODE,u.TEXTURE_TRILINEAR_SAMPLINGMODE=x.a.TEXTURE_TRILINEAR_SAMPLINGMODE,u.TEXTURE_NEAREST_NEAREST_MIPLINEAR=x.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,u.TEXTURE_LINEAR_LINEAR_MIPNEAREST=x.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,u.TEXTURE_LINEAR_LINEAR_MIPLINEAR=x.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,u.TEXTURE_NEAREST_NEAREST_MIPNEAREST=x.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,u.TEXTURE_NEAREST_LINEAR_MIPNEAREST=x.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,u.TEXTURE_NEAREST_LINEAR_MIPLINEAR=x.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,u.TEXTURE_NEAREST_LINEAR=x.a.TEXTURE_NEAREST_LINEAR,u.TEXTURE_NEAREST_NEAREST=x.a.TEXTURE_NEAREST_NEAREST,u.TEXTURE_LINEAR_NEAREST_MIPNEAREST=x.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,u.TEXTURE_LINEAR_NEAREST_MIPLINEAR=x.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,u.TEXTURE_LINEAR_LINEAR=x.a.TEXTURE_LINEAR_LINEAR,u.TEXTURE_LINEAR_NEAREST=x.a.TEXTURE_LINEAR_NEAREST,u.TEXTURE_EXPLICIT_MODE=x.a.TEXTURE_EXPLICIT_MODE,u.TEXTURE_SPHERICAL_MODE=x.a.TEXTURE_SPHERICAL_MODE,u.TEXTURE_PLANAR_MODE=x.a.TEXTURE_PLANAR_MODE,u.TEXTURE_CUBIC_MODE=x.a.TEXTURE_CUBIC_MODE,u.TEXTURE_PROJECTION_MODE=x.a.TEXTURE_PROJECTION_MODE,u.TEXTURE_SKYBOX_MODE=x.a.TEXTURE_SKYBOX_MODE,u.TEXTURE_INVCUBIC_MODE=x.a.TEXTURE_INVCUBIC_MODE,u.TEXTURE_EQUIRECTANGULAR_MODE=x.a.TEXTURE_EQUIRECTANGULAR_MODE,u.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=x.a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,u.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=x.a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,u.SCALEMODE_FLOOR=x.a.SCALEMODE_FLOOR,u.SCALEMODE_NEAREST=x.a.SCALEMODE_NEAREST,u.SCALEMODE_CEILING=x.a.SCALEMODE_CEILING,u._RescalePostProcessFactory=null,u}(R.a))},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){}return _.WithinEpsilon=function(P,l,O){O===void 0&&(O=1401298e-51);var R=P-l;return-O<=R&&R<=O},_.ToHex=function(P){var l=P.toString(16);return P<=15?("0"+l).toUpperCase():l.toUpperCase()},_.Sign=function(P){return(P=+P)==0||isNaN(P)?P:P>0?1:-1},_.Clamp=function(P,l,O){return l===void 0&&(l=0),O===void 0&&(O=1),Math.min(O,Math.max(l,P))},_.Log2=function(P){return Math.log(P)*Math.LOG2E},_.Repeat=function(P,l){return P-Math.floor(P/l)*l},_.Normalize=function(P,l,O){return(P-l)/(O-l)},_.Denormalize=function(P,l,O){return P*(O-l)+l},_.DeltaAngle=function(P,l){var O=_.Repeat(l-P,360);return O>180&&(O-=360),O},_.PingPong=function(P,l){var O=_.Repeat(P,2*l);return l-Math.abs(O-l)},_.SmoothStep=function(P,l,O){var R=_.Clamp(O);return l*(R=-2*R*R*R+3*R*R)+P*(1-R)},_.MoveTowards=function(P,l,O){return Math.abs(l-P)<=O?l:P+_.Sign(l-P)*O},_.MoveTowardsAngle=function(P,l,O){var R=_.DeltaAngle(P,l),x=0;return-O180&&(R-=360),P+R*_.Clamp(O)},_.InverseLerp=function(P,l,O){return P!=l?_.Clamp((O-P)/(l-P)):0},_.Hermite=function(P,l,O,R,x){var m=x*x,c=x*m;return P*(2*c-3*m+1)+O*(-2*c+3*m)+l*(c-2*m+x)+R*(c-m)},_.RandomRange=function(P,l){return P===l?P:Math.random()*(l-P)+P},_.RangeToPercent=function(P,l,O){return(P-l)/(O-l)},_.PercentToRange=function(P,l,O){return(O-l)*P+l},_.NormalizeRadians=function(P){return P-=_.TwoPi*Math.floor((P+Math.PI)/_.TwoPi)},_.TwoPi=2*Math.PI,_}()},function(Ae,v,f){f.d(v,"a",function(){return c});var B=f(8),_=f(20),P=f(22),l=f(4),O=f(48),R=f(2),x=f(9),m=f(119),c=function(){function T(){}return T.BindEyePosition=function(A,S,g){if(g===void 0&&(g="vEyePosition"),S._forcedViewPosition)A.setVector3(g,S._forcedViewPosition);else{var u=S.activeCamera.globalPosition;u||(u=S.activeCamera.devicePosition),A.setVector3(g,S._mirroredCameraPosition?S._mirroredCameraPosition:u)}},T.PrepareDefinesForMergedUV=function(A,S,g){S._needUVs=!0,S[g]=!0,A.getTextureMatrix().isIdentityAs3x2()?(S[g+"DIRECTUV"]=A.coordinatesIndex+1,A.coordinatesIndex===0?S.MAINUV1=!0:S.MAINUV2=!0):S[g+"DIRECTUV"]=0},T.BindTextureMatrix=function(A,S,g){var u=A.getTextureMatrix();S.updateMatrix(g+"Matrix",u)},T.GetFogState=function(A,S){return S.fogEnabled&&A.applyFog&&S.fogMode!==_.a.FOGMODE_NONE},T.PrepareDefinesForMisc=function(A,S,g,u,h,b,E){E._areMiscDirty&&(E.LOGARITHMICDEPTH=g,E.POINTSIZE=u,E.FOG=h&&this.GetFogState(A,S),E.NONUNIFORMSCALING=A.nonUniformScaling,E.ALPHATEST=b)},T.PrepareDefinesForFrameBoundValues=function(A,S,g,u,h,b){h===void 0&&(h=null),b===void 0&&(b=!1);var E,D,w,N,I,V,X=!1;E=h??(A.clipPlane!==void 0&&A.clipPlane!==null),D=h??(A.clipPlane2!==void 0&&A.clipPlane2!==null),w=h??(A.clipPlane3!==void 0&&A.clipPlane3!==null),N=h??(A.clipPlane4!==void 0&&A.clipPlane4!==null),I=h??(A.clipPlane5!==void 0&&A.clipPlane5!==null),V=h??(A.clipPlane6!==void 0&&A.clipPlane6!==null),g.CLIPPLANE!==E&&(g.CLIPPLANE=E,X=!0),g.CLIPPLANE2!==D&&(g.CLIPPLANE2=D,X=!0),g.CLIPPLANE3!==w&&(g.CLIPPLANE3=w,X=!0),g.CLIPPLANE4!==N&&(g.CLIPPLANE4=N,X=!0),g.CLIPPLANE5!==I&&(g.CLIPPLANE5=I,X=!0),g.CLIPPLANE6!==V&&(g.CLIPPLANE6=V,X=!0),g.DEPTHPREPASS!==!S.getColorWrite()&&(g.DEPTHPREPASS=!g.DEPTHPREPASS,X=!0),g.INSTANCES!==u&&(g.INSTANCES=u,X=!0),g.THIN_INSTANCES!==b&&(g.THIN_INSTANCES=b,X=!0),X&&g.markAsUnprocessed()},T.PrepareDefinesForBones=function(A,S){if(A.useBones&&A.computeBonesUsingShaders&&A.skeleton){S.NUM_BONE_INFLUENCERS=A.numBoneInfluencers;var g=S.BONETEXTURE!==void 0;if(A.skeleton.isUsingTextureForMatrices&&g)S.BONETEXTURE=!0;else{S.BonesPerMesh=A.skeleton.bones.length+1,S.BONETEXTURE=!g&&void 0;var u=A.getScene().prePassRenderer;if(u&&u.enabled){var h=u.excludedSkinnedMesh.indexOf(A)===-1;S.BONES_VELOCITY_ENABLED=h}}}else S.NUM_BONE_INFLUENCERS=0,S.BonesPerMesh=0},T.PrepareDefinesForMorphTargets=function(A,S){var g=A.morphTargetManager;g?(S.MORPHTARGETS_UV=g.supportsUVs&&S.UV1,S.MORPHTARGETS_TANGENT=g.supportsTangents&&S.TANGENT,S.MORPHTARGETS_NORMAL=g.supportsNormals&&S.NORMAL,S.MORPHTARGETS=g.numInfluencers>0,S.NUM_MORPH_INFLUENCERS=g.numInfluencers):(S.MORPHTARGETS_UV=!1,S.MORPHTARGETS_TANGENT=!1,S.MORPHTARGETS_NORMAL=!1,S.MORPHTARGETS=!1,S.NUM_MORPH_INFLUENCERS=0)},T.PrepareDefinesForAttributes=function(A,S,g,u,h,b){if(h===void 0&&(h=!1),b===void 0&&(b=!0),!S._areAttributesDirty&&S._needNormals===S._normals&&S._needUVs===S._uvs)return!1;if(S._normals=S._needNormals,S._uvs=S._needUVs,S.NORMAL=S._needNormals&&A.isVerticesDataPresent(l.b.NormalKind),S._needNormals&&A.isVerticesDataPresent(l.b.TangentKind)&&(S.TANGENT=!0),S._needUVs?(S.UV1=A.isVerticesDataPresent(l.b.UVKind),S.UV2=A.isVerticesDataPresent(l.b.UV2Kind)):(S.UV1=!1,S.UV2=!1),g){var E=A.useVertexColors&&A.isVerticesDataPresent(l.b.ColorKind);S.VERTEXCOLOR=E,S.VERTEXALPHA=A.hasVertexAlpha&&E&&b}return u&&this.PrepareDefinesForBones(A,S),h&&this.PrepareDefinesForMorphTargets(A,S),!0},T.PrepareDefinesForMultiview=function(A,S){if(A.activeCamera){var g=S.MULTIVIEW;S.MULTIVIEW=A.activeCamera.outputRenderTarget!==null&&A.activeCamera.outputRenderTarget.getViewCount()>1,S.MULTIVIEW!=g&&S.markAsUnprocessed()}},T.PrepareDefinesForPrePass=function(A,S,g){var u=S.PREPASS;if(S._arePrePassDirty){var h=[{type:R.a.PREPASS_POSITION_TEXTURE_TYPE,define:"PREPASS_POSITION",index:"PREPASS_POSITION_INDEX"},{type:R.a.PREPASS_VELOCITY_TEXTURE_TYPE,define:"PREPASS_VELOCITY",index:"PREPASS_VELOCITY_INDEX"},{type:R.a.PREPASS_REFLECTIVITY_TEXTURE_TYPE,define:"PREPASS_REFLECTIVITY",index:"PREPASS_REFLECTIVITY_INDEX"},{type:R.a.PREPASS_IRRADIANCE_TEXTURE_TYPE,define:"PREPASS_IRRADIANCE",index:"PREPASS_IRRADIANCE_INDEX"},{type:R.a.PREPASS_ALBEDO_TEXTURE_TYPE,define:"PREPASS_ALBEDO",index:"PREPASS_ALBEDO_INDEX"},{type:R.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE,define:"PREPASS_DEPTHNORMAL",index:"PREPASS_DEPTHNORMAL_INDEX"}];if(A.prePassRenderer&&A.prePassRenderer.enabled&&g){S.PREPASS=!0,S.SCENE_MRT_COUNT=A.prePassRenderer.mrtCount;for(var b=0;b0&&(E.shadowEnabled=!0,D.prepareDefines(h,u))}}g.lightmapMode!=O.a.LIGHTMAP_DEFAULT?(E.lightmapMode=!0,h["LIGHTMAPEXCLUDED"+u]=!0,h["LIGHTMAPNOSPECULAR"+u]=g.lightmapMode==O.a.LIGHTMAP_SHADOWSONLY):(h["LIGHTMAPEXCLUDED"+u]=!1,h["LIGHTMAPNOSPECULAR"+u]=!1)},T.PrepareDefinesForLights=function(A,S,g,u,h,b){if(h===void 0&&(h=4),b===void 0&&(b=!1),!g._areLightsDirty)return g._needNormals;var E=0,D={needNormals:!1,needRebuild:!1,lightmapMode:!1,shadowEnabled:!1,specularEnabled:!1};if(A.lightsEnabled&&!b)for(var w=0,N=S.lightSources;w0&&(h=u+b,S.addFallback(h,"LIGHT"+b)),A.SHADOWS||(A["SHADOW"+b]&&S.addFallback(u,"SHADOW"+b),A["SHADOWPCF"+b]&&S.addFallback(u,"SHADOWPCF"+b),A["SHADOWPCSS"+b]&&S.addFallback(u,"SHADOWPCSS"+b),A["SHADOWPOISSON"+b]&&S.addFallback(u,"SHADOWPOISSON"+b),A["SHADOWESM"+b]&&S.addFallback(u,"SHADOWESM"+b),A["SHADOWCLOSEESM"+b]&&S.addFallback(u,"SHADOWCLOSEESM"+b));return h++},T.PrepareAttributesForMorphTargetsInfluencers=function(A,S,g){this._TmpMorphInfluencers.NUM_MORPH_INFLUENCERS=g,this.PrepareAttributesForMorphTargets(A,S,this._TmpMorphInfluencers)},T.PrepareAttributesForMorphTargets=function(A,S,g){var u=g.NUM_MORPH_INFLUENCERS;if(u>0&&P.a.LastCreatedEngine)for(var h=P.a.LastCreatedEngine.getCaps().maxVertexAttribs,b=S.morphTargetManager,E=b&&b.supportsNormals&&g.NORMAL,D=b&&b.supportsTangents&&g.TANGENT,w=b&&b.supportsUVs&&g.UV1,N=0;Nh&&B.a.Error("Cannot add more vertex attributes for mesh "+S.name)},T.PrepareAttributesForBones=function(A,S,g,u){g.NUM_BONE_INFLUENCERS>0&&(u.addCPUSkinningFallback(0,S),A.push(l.b.MatricesIndicesKind),A.push(l.b.MatricesWeightsKind),g.NUM_BONE_INFLUENCERS>4&&(A.push(l.b.MatricesIndicesExtraKind),A.push(l.b.MatricesWeightsExtraKind)))},T.PrepareAttributesForInstances=function(A,S){(S.INSTANCES||S.THIN_INSTANCES)&&this.PushAttributesForInstances(A)},T.PushAttributesForInstances=function(A){A.push("world0"),A.push("world1"),A.push("world2"),A.push("world3")},T.BindLightProperties=function(A,S,g){A.transferToEffect(S,g+"")},T.BindLight=function(A,S,g,u,h,b){b===void 0&&(b=!1),A._bindLight(S,g,u,h,b)},T.BindLights=function(A,S,g,u,h,b){h===void 0&&(h=4),b===void 0&&(b=!1);for(var E=Math.min(S.lightSources.length,h),D=0;D-1){var h=u.getTransformMatrixTexture(A);S.setTexture("boneSampler",h),S.setFloat("boneTextureWidth",4*(u.bones.length+1))}else{var b=u.getTransformMatrices(A);b&&(S.setMatrices("mBones",b),g&&A.getScene().prePassRenderer&&A.getScene().prePassRenderer.getIndex(R.a.PREPASS_VELOCITY_TEXTURE_TYPE)&&(g.previousBones[A.uniqueId]&&S.setMatrices("mPreviousBones",g.previousBones[A.uniqueId]),T._CopyBonesTransformationMatrices(b,g.previousBones[A.uniqueId])))}}},T._CopyBonesTransformationMatrices=function(A,S){return S.set(A),S},T.BindMorphTargetParameters=function(A,S){var g=A.morphTargetManager;A&&g&&S.setFloatArray("morphTargetInfluences",g.influences)},T.BindLogDepth=function(A,S,g){A.LOGARITHMICDEPTH&&S.setFloat("logarithmicDepthConstant",2/(Math.log(g.activeCamera.maxZ+1)/Math.LN2))},T.BindClipPlane=function(A,S){m.a.BindClipPlane(A,S)},T._TmpMorphInfluencers={NUM_MORPH_INFLUENCERS:0},T._tempFogColor=x.a.Black(),T}()},function(Ae,v,f){f.d(v,"a",function(){return R});var B=f(0),_=f(4),P=f(21),l=f(9),O=f(8),R=function(){function x(){}return x.prototype.set=function(m,c){switch(m.length||O.a.Warn("Setting vertex data kind '"+c+"' with an empty array"),c){case _.b.PositionKind:this.positions=m;break;case _.b.NormalKind:this.normals=m;break;case _.b.TangentKind:this.tangents=m;break;case _.b.UVKind:this.uvs=m;break;case _.b.UV2Kind:this.uvs2=m;break;case _.b.UV3Kind:this.uvs3=m;break;case _.b.UV4Kind:this.uvs4=m;break;case _.b.UV5Kind:this.uvs5=m;break;case _.b.UV6Kind:this.uvs6=m;break;case _.b.ColorKind:this.colors=m;break;case _.b.MatricesIndicesKind:this.matricesIndices=m;break;case _.b.MatricesWeightsKind:this.matricesWeights=m;break;case _.b.MatricesIndicesExtraKind:this.matricesIndicesExtra=m;break;case _.b.MatricesWeightsExtraKind:this.matricesWeightsExtra=m}},x.prototype.applyToMesh=function(m,c){return this._applyTo(m,c),this},x.prototype.applyToGeometry=function(m,c){return this._applyTo(m,c),this},x.prototype.updateMesh=function(m){return this._update(m),this},x.prototype.updateGeometry=function(m){return this._update(m),this},x.prototype._applyTo=function(m,c){return c===void 0&&(c=!1),this.positions&&m.setVerticesData(_.b.PositionKind,this.positions,c),this.normals&&m.setVerticesData(_.b.NormalKind,this.normals,c),this.tangents&&m.setVerticesData(_.b.TangentKind,this.tangents,c),this.uvs&&m.setVerticesData(_.b.UVKind,this.uvs,c),this.uvs2&&m.setVerticesData(_.b.UV2Kind,this.uvs2,c),this.uvs3&&m.setVerticesData(_.b.UV3Kind,this.uvs3,c),this.uvs4&&m.setVerticesData(_.b.UV4Kind,this.uvs4,c),this.uvs5&&m.setVerticesData(_.b.UV5Kind,this.uvs5,c),this.uvs6&&m.setVerticesData(_.b.UV6Kind,this.uvs6,c),this.colors&&m.setVerticesData(_.b.ColorKind,this.colors,c),this.matricesIndices&&m.setVerticesData(_.b.MatricesIndicesKind,this.matricesIndices,c),this.matricesWeights&&m.setVerticesData(_.b.MatricesWeightsKind,this.matricesWeights,c),this.matricesIndicesExtra&&m.setVerticesData(_.b.MatricesIndicesExtraKind,this.matricesIndicesExtra,c),this.matricesWeightsExtra&&m.setVerticesData(_.b.MatricesWeightsExtraKind,this.matricesWeightsExtra,c),this.indices?m.setIndices(this.indices,null,c):m.setIndices([],null),this},x.prototype._update=function(m,c,T){return this.positions&&m.updateVerticesData(_.b.PositionKind,this.positions,c,T),this.normals&&m.updateVerticesData(_.b.NormalKind,this.normals,c,T),this.tangents&&m.updateVerticesData(_.b.TangentKind,this.tangents,c,T),this.uvs&&m.updateVerticesData(_.b.UVKind,this.uvs,c,T),this.uvs2&&m.updateVerticesData(_.b.UV2Kind,this.uvs2,c,T),this.uvs3&&m.updateVerticesData(_.b.UV3Kind,this.uvs3,c,T),this.uvs4&&m.updateVerticesData(_.b.UV4Kind,this.uvs4,c,T),this.uvs5&&m.updateVerticesData(_.b.UV5Kind,this.uvs5,c,T),this.uvs6&&m.updateVerticesData(_.b.UV6Kind,this.uvs6,c,T),this.colors&&m.updateVerticesData(_.b.ColorKind,this.colors,c,T),this.matricesIndices&&m.updateVerticesData(_.b.MatricesIndicesKind,this.matricesIndices,c,T),this.matricesWeights&&m.updateVerticesData(_.b.MatricesWeightsKind,this.matricesWeights,c,T),this.matricesIndicesExtra&&m.updateVerticesData(_.b.MatricesIndicesExtraKind,this.matricesIndicesExtra,c,T),this.matricesWeightsExtra&&m.updateVerticesData(_.b.MatricesWeightsExtraKind,this.matricesWeightsExtra,c,T),this.indices&&m.setIndices(this.indices,null),this},x.prototype.transform=function(m){var c,T=m.determinant()<0,A=B.e.Zero();if(this.positions){var S=B.e.Zero();for(c=0;cA.bbSize.y?A.bbSize.x:A.bbSize.y;lt=lt>A.bbSize.z?lt:A.bbSize.z,H=A.subDiv.X*re/A.bbSize.x,Z=A.subDiv.Y*re/A.bbSize.y,W=A.subDiv.Z*re/A.bbSize.z,q=A.subDiv.max*A.subDiv.max,A.facetPartitioning.length=0}for(S=0;Sre.LongPressDelay&&!H._isPointerSwiping()&&(H._startingPointerTime=0,W.processTrigger(I.a.ACTION_OnLongPressTrigger,E.a.CreateNew(_e.pickedMesh,k)))},re.LongPressDelay)}}else for(var q=0,he=Z._pointerDownStage;qre.DragMovementThreshold||Math.abs(this._startingPointerPosition.y-this._pointerY)>re.DragMovementThreshold},re.prototype.simulatePointerUp=function(Y,k,H){var Z=new PointerEvent("pointerup",k),W=new ae;H?W.doubleClick=!0:W.singleClick=!0,this._checkPrePointerObservable(Y,Z,te.a.POINTERUP)||this._processPointerUp(Y,Z,W)},re.prototype._processPointerUp=function(Y,k,H){var Z=this._scene;if(Y&&Y&&Y.pickedMesh){if(this._pickedUpMesh=Y.pickedMesh,this._pickedDownMesh===this._pickedUpMesh&&(Z.onPointerPick&&Z.onPointerPick(k,Y),H.singleClick&&!H.ignore&&Z.onPointerObservable.hasObservers())){var W=te.a.POINTERPICK,q=new te.b(W,k,Y);this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,W)}var he=Y.pickedMesh._getActionManagerForTrigger();if(he&&!H.ignore){he.processTrigger(I.a.ACTION_OnPickUpTrigger,E.a.CreateNew(Y.pickedMesh,k)),!H.hasSwiped&&H.singleClick&&he.processTrigger(I.a.ACTION_OnPickTrigger,E.a.CreateNew(Y.pickedMesh,k));var ge=Y.pickedMesh._getActionManagerForTrigger(I.a.ACTION_OnDoublePickTrigger);H.doubleClick&&ge&&ge.processTrigger(I.a.ACTION_OnDoublePickTrigger,E.a.CreateNew(Y.pickedMesh,k))}}else if(!H.ignore)for(var me=0,_e=Z._pointerUpStage;me<_e.length;me++)Y=_e[me].action(this._unTranslatedPointerX,this._unTranslatedPointerY,Y,k);if(this._pickedDownMesh&&this._pickedDownMesh!==this._pickedUpMesh){var be=this._pickedDownMesh._getActionManagerForTrigger(I.a.ACTION_OnPickOutTrigger);be&&be.processTrigger(I.a.ACTION_OnPickOutTrigger,E.a.CreateNew(this._pickedDownMesh,k))}var Ce=0;Z.onPointerObservable.hasObservers()&&(!H.ignore&&!H.hasSwiped&&(H.singleClick&&Z.onPointerObservable.hasSpecificMask(te.a.POINTERTAP)?Ce=te.a.POINTERTAP:H.doubleClick&&Z.onPointerObservable.hasSpecificMask(te.a.POINTERDOUBLETAP)&&(Ce=te.a.POINTERDOUBLETAP),Ce)&&(q=new te.b(Ce,k,Y),this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,Ce)),H.ignore||(Ce=te.a.POINTERUP,q=new te.b(Ce,k,Y),this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,Ce))),Z.onPointerUp&&!H.ignore&&Z.onPointerUp(k,Y,Ce)},re.prototype.isPointerCaptured=function(Y){return Y===void 0&&(Y=0),this._pointerCaptures[Y]},re.prototype.attachControl=function(Y,k,H,Z){var W=this;Y===void 0&&(Y=!0),k===void 0&&(k=!0),H===void 0&&(H=!0),Z===void 0&&(Z=null);var q=this._scene;if(Z||(Z=q.getEngine().getInputElement()),Z){this._alreadyAttached&&this.detachControl(),this._alreadyAttachedTo=Z;var he=q.getEngine();this._initActionManager=function(be,Ce){if(!W._meshPickProceed){var ye=q.pick(W._unTranslatedPointerX,W._unTranslatedPointerY,q.pointerDownPredicate,!1,q.cameraToUseForPointers);W._currentPickResult=ye,ye&&(be=ye.hit&&ye.pickedMesh?ye.pickedMesh._getActionManagerForTrigger():null),W._meshPickProceed=!0}return be},this._delayedSimpleClick=function(be,Ce,ye){(Date.now()-W._previousStartingPointerTime>re.DoubleClickDelay&&!W._doubleClickOccured||be!==W._previousButtonPressed)&&(W._doubleClickOccured=!1,Ce.singleClick=!0,Ce.ignore=!1,ye(Ce,W._currentPickResult))},this._initClickEvent=function(be,Ce,ye,Ue){var Ge=new ae;W._currentPickResult=null;var Xe=null,He=be.hasSpecificMask(te.a.POINTERPICK)||Ce.hasSpecificMask(te.a.POINTERPICK)||be.hasSpecificMask(te.a.POINTERTAP)||Ce.hasSpecificMask(te.a.POINTERTAP)||be.hasSpecificMask(te.a.POINTERDOUBLETAP)||Ce.hasSpecificMask(te.a.POINTERDOUBLETAP);!He&&de.a&&(Xe=W._initActionManager(Xe,Ge))&&(He=Xe.hasPickTriggers);var We=!1;if(He){var Ze=ye.button;if(Ge.hasSwiped=W._isPointerSwiping(),!Ge.hasSwiped){var ze=!re.ExclusiveDoubleClickMode;ze||(ze=!be.hasSpecificMask(te.a.POINTERDOUBLETAP)&&!Ce.hasSpecificMask(te.a.POINTERDOUBLETAP))&&!de.a.HasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)&&(Xe=W._initActionManager(Xe,Ge))&&(ze=!Xe.hasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)),ze?(Date.now()-W._previousStartingPointerTime>re.DoubleClickDelay||Ze!==W._previousButtonPressed)&&(Ge.singleClick=!0,Ue(Ge,W._currentPickResult),We=!0):(W._previousDelayedSimpleClickTimeout=W._delayedSimpleClickTimeout,W._delayedSimpleClickTimeout=window.setTimeout(W._delayedSimpleClick.bind(W,Ze,Ge,Ue),re.DoubleClickDelay));var it=be.hasSpecificMask(te.a.POINTERDOUBLETAP)||Ce.hasSpecificMask(te.a.POINTERDOUBLETAP);!it&&de.a.HasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)&&(Xe=W._initActionManager(Xe,Ge))&&(it=Xe.hasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)),it&&(Ze===W._previousButtonPressed&&Date.now()-W._previousStartingPointerTime0){for(var k=0,H=this._transientComponents;k0)return!1;for(k=0;k0,q=0,he=this._isReadyForMeshStage;q0){for(var ge=0,me=this.activeCameras;ge0},enumerable:!1,configurable:!0}),Y.prototype.executeWhenReady=function(k){var H=this;this.onReadyObservable.add(k),this._executeWhenReadyTimeoutId===-1&&(this._executeWhenReadyTimeoutId=setTimeout(function(){H._checkIsReady()},150))},Y.prototype.whenReadyAsync=function(){var k=this;return new Promise(function(H){k.executeWhenReady(function(){H()})})},Y.prototype._checkIsReady=function(){var k=this;return this._registerTransientComponents(),this.isReady()?(this.onReadyObservable.notifyObservers(this),this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=-1)):this._isDisposed?(this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=-1)):void(this._executeWhenReadyTimeoutId=setTimeout(function(){k._checkIsReady()},150))},Object.defineProperty(Y.prototype,"animatables",{get:function(){return this._activeAnimatables},enumerable:!1,configurable:!0}),Y.prototype.resetLastAnimationTimeFrame=function(){this._animationTimeLast=P.a.Now},Y.prototype.getViewMatrix=function(){return this._viewMatrix},Y.prototype.getProjectionMatrix=function(){return this._projectionMatrix},Y.prototype.getTransformMatrix=function(){return this._transformMatrix},Y.prototype.setTransformMatrix=function(k,H,Z,W){this._viewUpdateFlag===k.updateFlag&&this._projectionUpdateFlag===H.updateFlag||(this._viewUpdateFlag=k.updateFlag,this._projectionUpdateFlag=H.updateFlag,this._viewMatrix=k,this._projectionMatrix=H,this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._frustumPlanes?L.a.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=L.a.GetPlanes(this._transformMatrix),this._multiviewSceneUbo&&this._multiviewSceneUbo.useUbo?this._updateMultiviewUbo(Z,W):this._sceneUbo.useUbo&&(this._sceneUbo.updateMatrix("viewProjection",this._transformMatrix),this._sceneUbo.updateMatrix("view",this._viewMatrix),this._sceneUbo.update()))},Y.prototype.getSceneUniformBuffer=function(){return this._multiviewSceneUbo?this._multiviewSceneUbo:this._sceneUbo},Y.prototype.getUniqueId=function(){return G.a.UniqueId},Y.prototype.addMesh=function(k,H){var Z=this;H===void 0&&(H=!1),this._blockEntityCollection||(this.meshes.push(k),k._resyncLightSources(),k.parent||k._addToSceneRootNodes(),this.onNewMeshAddedObservable.notifyObservers(k),H&&k.getChildMeshes().forEach(function(W){Z.addMesh(W)}))},Y.prototype.removeMesh=function(k,H){var Z=this;H===void 0&&(H=!1);var W=this.meshes.indexOf(k);return W!==-1&&(this.meshes[W]=this.meshes[this.meshes.length-1],this.meshes.pop(),k.parent||k._removeFromSceneRootNodes()),this.onMeshRemovedObservable.notifyObservers(k),H&&k.getChildMeshes().forEach(function(q){Z.removeMesh(q)}),W},Y.prototype.addTransformNode=function(k){this._blockEntityCollection||(k._indexInSceneTransformNodesArray=this.transformNodes.length,this.transformNodes.push(k),k.parent||k._addToSceneRootNodes(),this.onNewTransformNodeAddedObservable.notifyObservers(k))},Y.prototype.removeTransformNode=function(k){var H=k._indexInSceneTransformNodesArray;if(H!==-1){if(H!==this.transformNodes.length-1){var Z=this.transformNodes[this.transformNodes.length-1];this.transformNodes[H]=Z,Z._indexInSceneTransformNodesArray=H}k._indexInSceneTransformNodesArray=-1,this.transformNodes.pop(),k.parent||k._removeFromSceneRootNodes()}return this.onTransformNodeRemovedObservable.notifyObservers(k),H},Y.prototype.removeSkeleton=function(k){var H=this.skeletons.indexOf(k);return H!==-1&&(this.skeletons.splice(H,1),this.onSkeletonRemovedObservable.notifyObservers(k)),H},Y.prototype.removeMorphTargetManager=function(k){var H=this.morphTargetManagers.indexOf(k);return H!==-1&&this.morphTargetManagers.splice(H,1),H},Y.prototype.removeLight=function(k){var H=this.lights.indexOf(k);if(H!==-1){for(var Z=0,W=this.meshes;Z0?this.activeCamera=this.cameras[0]:this.activeCamera=null),this.onCameraRemovedObservable.notifyObservers(k),H},Y.prototype.removeParticleSystem=function(k){var H=this.particleSystems.indexOf(k);return H!==-1&&this.particleSystems.splice(H,1),H},Y.prototype.removeAnimation=function(k){var H=this.animations.indexOf(k);return H!==-1&&this.animations.splice(H,1),H},Y.prototype.stopAnimation=function(k,H,Z){},Y.prototype.removeAnimationGroup=function(k){var H=this.animationGroups.indexOf(k);return H!==-1&&this.animationGroups.splice(H,1),H},Y.prototype.removeMultiMaterial=function(k){var H=this.multiMaterials.indexOf(k);return H!==-1&&this.multiMaterials.splice(H,1),this.onMultiMaterialRemovedObservable.notifyObservers(k),H},Y.prototype.removeMaterial=function(k){var H=k._indexInSceneMaterialArray;if(H!==-1&&H=0;H--)if(this.materials[H].id===k)return this.materials[H];return null},Y.prototype.getMaterialByName=function(k){for(var H=0;H=0;H--)if(this.meshes[H].id===k)return this.meshes[H];return null},Y.prototype.getLastEntryByID=function(k){var H;for(H=this.meshes.length-1;H>=0;H--)if(this.meshes[H].id===k)return this.meshes[H];for(H=this.transformNodes.length-1;H>=0;H--)if(this.transformNodes[H].id===k)return this.transformNodes[H];for(H=this.cameras.length-1;H>=0;H--)if(this.cameras[H].id===k)return this.cameras[H];for(H=this.lights.length-1;H>=0;H--)if(this.lights[H].id===k)return this.lights[H];return null},Y.prototype.getNodeByID=function(k){var H=this.getMeshByID(k);if(H)return H;var Z=this.getTransformNodeByID(k);if(Z)return Z;var W=this.getLightByID(k);if(W)return W;var q=this.getCameraByID(k);if(q)return q;var he=this.getBoneByID(k);return he||null},Y.prototype.getNodeByName=function(k){var H=this.getMeshByName(k);if(H)return H;var Z=this.getTransformNodeByName(k);if(Z)return Z;var W=this.getLightByName(k);if(W)return W;var q=this.getCameraByName(k);if(q)return q;var he=this.getBoneByName(k);return he||null},Y.prototype.getMeshByName=function(k){for(var H=0;H=0;H--)if(this.skeletons[H].id===k)return this.skeletons[H];return null},Y.prototype.getSkeletonByUniqueId=function(k){for(var H=0;H0&&(me.layerMask&this.activeCamera.layerMask)!=0&&(this._skipFrustumClipping||me.alwaysSelectAsActiveMesh||me.isInFrustum(this._frustumPlanes)))){this._activeMeshes.push(me),this.activeCamera._activeMeshes.push(me),_e!==me&&_e._activate(this._renderId,!1);for(var be=0,Ce=this._preActiveMeshStage;be0)for(var Z=this.getActiveSubMeshCandidates(H),W=Z.length,q=0;q1)this.activeCamera.outputRenderTarget._bindFrameBuffer();else{var k=this.activeCamera.outputRenderTarget.getInternalTexture();k?this.getEngine().bindFramebuffer(k):X.a.Error("Camera contains invalid customDefaultRenderTarget")}else this.getEngine().restoreDefaultFramebuffer()},Y.prototype._renderForCamera=function(k,H){if(!k||!k._skipRendering){var Z=this._engine;if(this._activeCamera=k,!this.activeCamera)throw new Error("Active camera not set");Z.setViewport(this.activeCamera.viewport),this.resetCachedMaterial(),this._renderId++,this.getEngine().getCaps().multiview&&k.outputRenderTarget&&k.outputRenderTarget.getViewCount()>1?this.setTransformMatrix(k._rigCameras[0].getViewMatrix(),k._rigCameras[0].getProjectionMatrix(),k._rigCameras[1].getViewMatrix(),k._rigCameras[1].getProjectionMatrix()):this.updateTransformMatrix(),this.onBeforeCameraRenderObservable.notifyObservers(this.activeCamera),this._evaluateActiveMeshes();for(var W=0;W0&&this._renderTargets.concatWithNoDuplicate(k.customRenderTargets),H&&H.customRenderTargets&&H.customRenderTargets.length>0&&this._renderTargets.concatWithNoDuplicate(H.customRenderTargets);for(var he=0,ge=this._gatherActiveCameraRenderTargetsStage;he0){_.b.StartPerformanceCounter("Render targets",this._renderTargets.length>0);for(var _e=0;_e0),this._renderId++}for(var ye=0,Ue=this._cameraDrawRenderTargetStage;ye1&&this.getEngine().getCaps().multiview)return this._renderForCamera(k),void this.onAfterRenderCameraObservable.notifyObservers(k);if(k._useMultiviewToSingleView)this._renderMultiviewToSingleView(k);else for(var H=0;H-1&&(W.trigger===I.a.ACTION_OnIntersectionExitTrigger&&W._executeCurrent(E.a.CreateNew(H,void 0,he)),H.actionManager.hasSpecificTrigger(I.a.ACTION_OnIntersectionExitTrigger,function(_e){var be=_e instanceof T.a?_e:_e.mesh;return he===be})&&W.trigger!==I.a.ACTION_OnIntersectionExitTrigger||H._intersectionsInProgress.splice(me,1))}}}},Y.prototype._advancePhysicsEngineStep=function(k){},Y.prototype._animate=function(){},Y.prototype.animate=function(){if(this._engine.isDeterministicLockStep()){var k=Math.max(Y.MinDeltaTime,Math.min(this._engine.getDeltaTime(),Y.MaxDeltaTime))+this._timeAccumulator,H=this._engine.getTimeStep(),Z=1e3/H/1e3,W=0,q=this._engine.getLockstepMaxSteps(),he=Math.floor(k/H);for(he=Math.min(he,q);k>0&&W0)for(var q=0;q0),this._intermediateRendering=!0;for(var be=0;be0),this._intermediateRendering=!1,this._renderId++}this.activeCamera=_e,this._activeCamera&&this._activeCamera.cameraRigMode!==A.a.RIG_MODE_CUSTOM&&!this.prePass&&this._bindFrameBuffer(),this.onAfterRenderTargetsRenderObservable.notifyObservers(this);for(var ye=0,Ue=this._beforeClearStage;ye0)for(q=0;q0&&this._engine.clear(null,!1,!0,!0),this._processSubCameras(this.activeCameras[q]);else{if(!this.activeCamera)throw new Error("No camera defined");this._processSubCameras(this.activeCamera)}this._checkIntersections();for(var He=0,We=this._afterRenderStage;He-1&&this._engine.scenes.splice(q,1),this._engine.wipeCaches(!0),this._isDisposed=!0},Object.defineProperty(Y.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Y.prototype.clearCachedVertexData=function(){for(var k=0;k-1?(m.a.Error("You're trying to reuse a post process not defined as reusable."),0):(E==null||E<0?this._postProcesses.push(b):this._postProcesses[E]===null?this._postProcesses[E]=b:this._postProcesses.splice(E,0,b),this._cascadePostProcessesToRigCams(),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._postProcesses.indexOf(b))},h.prototype.detachPostProcess=function(b){var E=this._postProcesses.indexOf(b);E!==-1&&(this._postProcesses[E]=null),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._cascadePostProcessesToRigCams()},h.prototype.getWorldMatrix=function(){return this._isSynchronizedViewMatrix()||this.getViewMatrix(),this._worldMatrix},h.prototype._getViewMatrix=function(){return R.a.Identity()},h.prototype.getViewMatrix=function(b){return!b&&this._isSynchronizedViewMatrix()||(this.updateCache(),this._computedViewMatrix=this._getViewMatrix(),this._currentRenderId=this.getScene().getRenderId(),this._childUpdateId++,this._refreshFrustumPlanes=!0,this._cameraRigParams&&this._cameraRigParams.vrPreViewMatrix&&this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix,this._computedViewMatrix),this.parent&&this.parent.onViewMatrixChangedObservable&&this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent),this.onViewMatrixChangedObservable.notifyObservers(this),this._computedViewMatrix.invertToRef(this._worldMatrix)),this._computedViewMatrix},h.prototype.freezeProjectionMatrix=function(b){this._doNotComputeProjectionMatrix=!0,b!==void 0&&(this._projectionMatrix=b)},h.prototype.unfreezeProjectionMatrix=function(){this._doNotComputeProjectionMatrix=!1},h.prototype.getProjectionMatrix=function(b){var E,D,w,N,I,V,X,j;if(this._doNotComputeProjectionMatrix||!b&&this._isSynchronizedProjectionMatrix())return this._projectionMatrix;this._cache.mode=this.mode,this._cache.minZ=this.minZ,this._cache.maxZ=this.maxZ,this._refreshFrustumPlanes=!0;var ne=this.getEngine(),te=this.getScene();if(this.mode===h.PERSPECTIVE_CAMERA){this._cache.fov=this.fov,this._cache.fovMode=this.fovMode,this._cache.aspectRatio=ne.getAspectRatio(this),this.minZ<=0&&(this.minZ=.1);var de=ne.useReverseDepthBuffer;(te.useRightHandedSystem?de?R.a.PerspectiveFovReverseRHToRef:R.a.PerspectiveFovRHToRef:de?R.a.PerspectiveFovReverseLHToRef:R.a.PerspectiveFovLHToRef)(this.fov,ne.getAspectRatio(this),this.minZ,this.maxZ,this._projectionMatrix,this.fovMode===h.FOVMODE_VERTICAL_FIXED)}else{var pe=ne.getRenderWidth()/2,ae=ne.getRenderHeight()/2;te.useRightHandedSystem?R.a.OrthoOffCenterRHToRef((E=this.orthoLeft)!==null&&E!==void 0?E:-pe,(D=this.orthoRight)!==null&&D!==void 0?D:pe,(w=this.orthoBottom)!==null&&w!==void 0?w:-ae,(N=this.orthoTop)!==null&&N!==void 0?N:ae,this.minZ,this.maxZ,this._projectionMatrix):R.a.OrthoOffCenterLHToRef((I=this.orthoLeft)!==null&&I!==void 0?I:-pe,(V=this.orthoRight)!==null&&V!==void 0?V:pe,(X=this.orthoBottom)!==null&&X!==void 0?X:-ae,(j=this.orthoTop)!==null&&j!==void 0?j:ae,this.minZ,this.maxZ,this._projectionMatrix),this._cache.orthoLeft=this.orthoLeft,this._cache.orthoRight=this.orthoRight,this._cache.orthoBottom=this.orthoBottom,this._cache.orthoTop=this.orthoTop,this._cache.renderWidth=ne.getRenderWidth(),this._cache.renderHeight=ne.getRenderHeight()}return this.onProjectionMatrixChangedObservable.notifyObservers(this),this._projectionMatrix},h.prototype.getTransformationMatrix=function(){return this._computedViewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._transformMatrix},h.prototype._updateFrustumPlanes=function(){this._refreshFrustumPlanes&&(this.getTransformationMatrix(),this._frustumPlanes?S.a.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=S.a.GetPlanes(this._transformMatrix),this._refreshFrustumPlanes=!1)},h.prototype.isInFrustum=function(b,E){if(E===void 0&&(E=!1),this._updateFrustumPlanes(),E&&this.rigCameras.length>0){var D=!1;return this.rigCameras.forEach(function(w){w._updateFrustumPlanes(),D=D||b.isInFrustum(w._frustumPlanes)}),D}return b.isInFrustum(this._frustumPlanes)},h.prototype.isCompletelyInFrustum=function(b){return this._updateFrustumPlanes(),b.isCompletelyInFrustum(this._frustumPlanes)},h.prototype.getForwardRay=function(b,E,D){throw T.a.WarnImport("Ray")},h.prototype.getForwardRayToRef=function(b,E,D,w){throw T.a.WarnImport("Ray")},h.prototype.dispose=function(b,E){for(E===void 0&&(E=!1),this.onViewMatrixChangedObservable.clear(),this.onProjectionMatrixChangedObservable.clear(),this.onAfterCheckInputsObservable.clear(),this.onRestoreStateObservable.clear(),this.inputs&&this.inputs.clear(),this.getScene().stopAnimation(this),this.getScene().removeCamera(this);this._rigCameras.length>0;){var D=this._rigCameras.pop();D&&D.dispose()}if(this._rigPostProcess)this._rigPostProcess.dispose(this),this._rigPostProcess=null,this._postProcesses=[];else if(this.cameraRigMode!==h.RIG_MODE_NONE)this._rigPostProcess=null,this._postProcesses=[];else for(var w=this._postProcesses.length;--w>=0;){var N=this._postProcesses[w];N&&N.dispose(this)}for(w=this.customRenderTargets.length;--w>=0;)this.customRenderTargets[w].dispose();this.customRenderTargets=[],this._activeMeshes.dispose(),u.prototype.dispose.call(this,b,E)},Object.defineProperty(h.prototype,"isLeftCamera",{get:function(){return this._isLeftCamera},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isRightCamera",{get:function(){return this._isRightCamera},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"leftCamera",{get:function(){return this._rigCameras.length<1?null:this._rigCameras[0]},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"rightCamera",{get:function(){return this._rigCameras.length<2?null:this._rigCameras[1]},enumerable:!1,configurable:!0}),h.prototype.getLeftTarget=function(){return this._rigCameras.length<1?null:this._rigCameras[0].getTarget()},h.prototype.getRightTarget=function(){return this._rigCameras.length<2?null:this._rigCameras[1].getTarget()},h.prototype.setCameraRigMode=function(b,E){if(this.cameraRigMode!==b){for(;this._rigCameras.length>0;){var D=this._rigCameras.pop();D&&D.dispose()}if(this.cameraRigMode=b,this._cameraRigParams={},this._cameraRigParams.interaxialDistance=E.interaxialDistance||.0637,this._cameraRigParams.stereoHalfAngle=l.b.ToRadians(this._cameraRigParams.interaxialDistance/.0637),this.cameraRigMode!==h.RIG_MODE_NONE){var w=this.createRigCamera(this.name+"_L",0);w&&(w._isLeftCamera=!0);var N=this.createRigCamera(this.name+"_R",1);N&&(N._isRightCamera=!0),w&&N&&(this._rigCameras.push(w),this._rigCameras.push(N))}switch(this.cameraRigMode){case h.RIG_MODE_STEREOSCOPIC_ANAGLYPH:h._setStereoscopicAnaglyphRigMode(this);break;case h.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case h.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case h.RIG_MODE_STEREOSCOPIC_OVERUNDER:case h.RIG_MODE_STEREOSCOPIC_INTERLACED:h._setStereoscopicRigMode(this);break;case h.RIG_MODE_VR:h._setVRRigMode(this,E);break;case h.RIG_MODE_WEBVR:h._setWebVRRigMode(this,E)}this._cascadePostProcessesToRigCams(),this.update()}},h._setStereoscopicRigMode=function(b){throw"Import Cameras/RigModes/stereoscopicRigMode before using stereoscopic rig mode"},h._setStereoscopicAnaglyphRigMode=function(b){throw"Import Cameras/RigModes/stereoscopicAnaglyphRigMode before using stereoscopic anaglyph rig mode"},h._setVRRigMode=function(b,E){throw"Import Cameras/RigModes/vrRigMode before using VR rig mode"},h._setWebVRRigMode=function(b,E){throw"Import Cameras/RigModes/WebVRRigMode before using Web VR rig mode"},h.prototype._getVRProjectionMatrix=function(){return R.a.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov,this._cameraRigParams.vrMetrics.aspectRatio,this.minZ,this.maxZ,this._cameraRigParams.vrWorkMatrix),this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix,this._projectionMatrix),this._projectionMatrix},h.prototype._updateCameraRotationMatrix=function(){},h.prototype._updateWebVRCameraRotationMatrix=function(){},h.prototype._getWebVRProjectionMatrix=function(){return R.a.Identity()},h.prototype._getWebVRViewMatrix=function(){return R.a.Identity()},h.prototype.setCameraRigParameter=function(b,E){this._cameraRigParams||(this._cameraRigParams={}),this._cameraRigParams[b]=E,b==="interaxialDistance"&&(this._cameraRigParams.stereoHalfAngle=l.b.ToRadians(E/.0637))},h.prototype.createRigCamera=function(b,E){return null},h.prototype._updateRigCameras=function(){for(var b=0;b=1)&&(this.needAlphaBlending()||g.visibility<1||g.hasVertexAlpha)},S.prototype.needAlphaTesting=function(){return!!this._forceAlphaTest},S.prototype._shouldTurnAlphaTestOn=function(g){return!this.needAlphaBlendingForMesh(g)&&this.needAlphaTesting()},S.prototype.getAlphaTestTexture=function(){return null},S.prototype.markDirty=function(){for(var g=0,u=this.getScene().meshes;g1&&be.renderbufferStorageMultisample?be.renderbufferStorageMultisample(be.RENDERBUFFER,he,me,W,q):be.renderbufferStorage(be.RENDERBUFFER,ge,W,q),be.framebufferRenderbuffer(be.FRAMEBUFFER,_e,be.RENDERBUFFER,Ce),be.bindRenderbuffer(be.RENDERBUFFER,null),Ce},this._boundUniforms={};var te=null;if(I){if(X=X||{},E.a.SetMatrixPrecision(!!X.useHighPrecisionMatrix),I.getContext){if(te=I,this._renderingCanvas=te,V!=null&&(X.antialias=V),X.deterministicLockstep===void 0&&(X.deterministicLockstep=!1),X.lockstepMaxSteps===void 0&&(X.lockstepMaxSteps=4),X.timeStep===void 0&&(X.timeStep=1/60),X.preserveDrawingBuffer===void 0&&(X.preserveDrawingBuffer=!1),X.audioEngine===void 0&&(X.audioEngine=!0),X.stencil===void 0&&(X.stencil=!0),X.premultipliedAlpha===!1&&(this.premultipliedAlpha=!1),X.xrCompatible===void 0&&(X.xrCompatible=!0),this._doNotHandleContextLost=!!X.doNotHandleContextLost,navigator&&navigator.userAgent){var de=navigator.userAgent;this.hostInformation.isMobile=de.indexOf("Mobile")!==-1;for(var pe=0,ae=N.ExceptionList;pe0&&parseInt(Q[Q.length-1])>=G)continue}for(var oe=0,re=$;oe1?this._shaderProcessor=new g.a:this._shaderProcessor=new S,this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this._creationOptions=X,console.log("Babylon.js v"+N.Version+" - "+this.description)}}return Object.defineProperty(N,"NpmPackage",{get:function(){return"babylonjs@4.2.2"},enumerable:!1,configurable:!0}),Object.defineProperty(N,"Version",{get:function(){return"4.2.2"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"description",{get:function(){var I="WebGL"+this.webGLVersion;return this._caps.parallelShaderCompile&&(I+=" - Parallel shader compilation"),I},enumerable:!1,configurable:!0}),Object.defineProperty(N,"ShadersRepository",{get:function(){return _.a.ShadersRepository},set:function(I){_.a.ShadersRepository=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"_shouldUseHighPrecisionShader",{get:function(){return!(!this._caps.highPrecisionShaderSupported||!this._highPrecisionShadersAllowed)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(I){this._doNotHandleContextLost=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"framebufferDimensionsObject",{set:function(I){this._framebufferDimensionsObject=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture",{get:function(){return this._emptyTexture||(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture3D",{get:function(){return this._emptyTexture3D||(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture2DArray",{get:function(){return this._emptyTexture2DArray||(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture2DArray},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var I=new Uint8Array(4),V=[I,I,I,I,I,I];this._emptyCubeTexture=this.createRawCubeTexture(V,1,m.a.TEXTUREFORMAT_RGBA,m.a.TEXTURETYPE_UNSIGNED_INT,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!1,configurable:!0}),N.prototype._rebuildInternalTextures=function(){for(var I=0,V=this._internalTexturesCache.slice();I1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile"),standardDerivatives:this._webGLVersion>1||this._gl.getExtension("OES_standard_derivatives")!==null,maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||this._gl.getExtension("OES_element_index_uint")!==null,fragmentDepthSupported:this._webGLVersion>1||this._gl.getExtension("EXT_frag_depth")!==null,highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float"),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1},this._glVersion=this._gl.getParameter(this._gl.VERSION);var I=this._gl.getExtension("WEBGL_debug_renderer_info");if(I!=null&&(this._glRenderer=this._gl.getParameter(I.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(I.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor="Unknown vendor"),this._glRenderer||(this._glRenderer="Unknown renderer"),this._gl.HALF_FLOAT_OES!==36193&&(this._gl.HALF_FLOAT_OES=36193),this._gl.RGBA16F!==34842&&(this._gl.RGBA16F=34842),this._gl.RGBA32F!==34836&&(this._gl.RGBA32F=34836),this._gl.DEPTH24_STENCIL8!==35056&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(this._webGLVersion===1&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._webGLVersion>1&&this._gl.HALF_FLOAT_OES!==5131&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=this._gl.getParameter(this._gl.MAX_SAMPLES);else{var V=this._gl.getExtension("WEBGL_draw_buffers");if(V!==null){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=V.drawBuffersWEBGL.bind(V),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var X=0;X<16;X++)this._gl["COLOR_ATTACHMENT"+X+"_WEBGL"]=V["COLOR_ATTACHMENT"+X+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var j=this._gl.getExtension("WEBGL_depth_texture");j!=null&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=j.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var ne=this._gl.getExtension("OES_vertex_array_object");ne!=null&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=ne.createVertexArrayOES.bind(ne),this._gl.bindVertexArray=ne.bindVertexArrayOES.bind(ne),this._gl.deleteVertexArray=ne.deleteVertexArrayOES.bind(ne))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var te=this._gl.getExtension("ANGLE_instanced_arrays");te!=null?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=te.drawArraysInstancedANGLE.bind(te),this._gl.drawElementsInstanced=te.drawElementsInstancedANGLE.bind(te),this._gl.vertexAttribDivisor=te.vertexAttribDivisorANGLE.bind(te)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){var de=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),pe=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);de&&pe&&(this._caps.highPrecisionShaderSupported=de.precision!==0&&pe.precision!==0)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{var ae=this._gl.getExtension("EXT_blend_minmax");ae!=null&&(this._caps.blendMinMax=!0,this._gl.MAX=ae.MAX_EXT,this._gl.MIN=ae.MIN_EXT)}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var ee=0;ee=0&&this._activeRenderLoops.splice(V,1)}else this._activeRenderLoops=[]},N.prototype._renderLoop=function(){if(!this._contextWasLost){var I=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(I=!1),I){this.beginFrame();for(var V=0;V0?this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},N.prototype.getRenderingCanvas=function(){return this._renderingCanvas},N.prototype.getHostWindow=function(){return A.a.IsWindowObjectExist()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null},N.prototype.getRenderWidth=function(I){return I===void 0&&(I=!1),!I&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth},N.prototype.getRenderHeight=function(I){return I===void 0&&(I=!1),!I&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight},N.prototype._queueNewFrame=function(I,V){return N.QueueNewFrame(I,V)},N.prototype.runRenderLoop=function(I){this._activeRenderLoops.indexOf(I)===-1&&(this._activeRenderLoops.push(I),this._renderingQueueLaunched||(this._renderingQueueLaunched=!0,this._boundRenderFunction=this._renderLoop.bind(this),this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())))},N.prototype.clear=function(I,V,X,j){j===void 0&&(j=!1),this.applyStates();var ne=0;V&&I&&(this._gl.clearColor(I.r,I.g,I.b,I.a!==void 0?I.a:1),ne|=this._gl.COLOR_BUFFER_BIT),X&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GREATER,this._gl.clearDepth(0)):this._gl.clearDepth(1),ne|=this._gl.DEPTH_BUFFER_BIT),j&&(this._gl.clearStencil(0),ne|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(ne)},N.prototype._viewport=function(I,V,X,j){I===this._viewportCached.x&&V===this._viewportCached.y&&X===this._viewportCached.z&&j===this._viewportCached.w||(this._viewportCached.x=I,this._viewportCached.y=V,this._viewportCached.z=X,this._viewportCached.w=j,this._gl.viewport(I,V,X,j))},N.prototype.setViewport=function(I,V,X){var j=V||this.getRenderWidth(),ne=X||this.getRenderHeight(),te=I.x||0,de=I.y||0;this._cachedViewport=I,this._viewport(te*j,de*ne,j*I.width,ne*I.height)},N.prototype.beginFrame=function(){},N.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer()},N.prototype.resize=function(){var I,V;A.a.IsWindowObjectExist()?(I=this._renderingCanvas?this._renderingCanvas.clientWidth||this._renderingCanvas.width:window.innerWidth,V=this._renderingCanvas?this._renderingCanvas.clientHeight||this._renderingCanvas.height:window.innerHeight):(I=this._renderingCanvas?this._renderingCanvas.width:100,V=this._renderingCanvas?this._renderingCanvas.height:100),this.setSize(I/this._hardwareScalingLevel,V/this._hardwareScalingLevel)},N.prototype.setSize=function(I,V){return!!this._renderingCanvas&&(I|=0,V|=0,(this._renderingCanvas.width!==I||this._renderingCanvas.height!==V)&&(this._renderingCanvas.width=I,this._renderingCanvas.height=V,!0))},N.prototype.bindFramebuffer=function(I,V,X,j,ne,te,de){V===void 0&&(V=0),te===void 0&&(te=0),de===void 0&&(de=0),this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=I,this._bindUnboundFramebuffer(I._MSAAFramebuffer?I._MSAAFramebuffer:I._framebuffer);var pe=this._gl;I.is2DArray?pe.framebufferTextureLayer(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,I._webGLTexture,te,de):I.isCube&&pe.framebufferTexture2D(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,pe.TEXTURE_CUBE_MAP_POSITIVE_X+V,I._webGLTexture,te);var ae=I._depthStencilTexture;if(ae){var ee=ae._generateStencilBuffer?pe.DEPTH_STENCIL_ATTACHMENT:pe.DEPTH_ATTACHMENT;I.is2DArray?pe.framebufferTextureLayer(pe.FRAMEBUFFER,ee,ae._webGLTexture,te,de):I.isCube?pe.framebufferTexture2D(pe.FRAMEBUFFER,ee,pe.TEXTURE_CUBE_MAP_POSITIVE_X+V,ae._webGLTexture,te):pe.framebufferTexture2D(pe.FRAMEBUFFER,ee,pe.TEXTURE_2D,ae._webGLTexture,te)}this._cachedViewport&&!ne?this.setViewport(this._cachedViewport,X,j):(X||(X=I.width,te&&(X/=Math.pow(2,te))),j||(j=I.height,te&&(j/=Math.pow(2,te))),this._viewport(0,0,X,j)),this.wipeCaches()},N.prototype._bindUnboundFramebuffer=function(I){this._currentFramebuffer!==I&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,I),this._currentFramebuffer=I)},N.prototype.unBindFramebuffer=function(I,V,X){V===void 0&&(V=!1),this._currentRenderTarget=null;var j=this._gl;if(I._MSAAFramebuffer){if(I._textureArray)return void this.unBindMultiColorAttachmentFramebuffer(I._textureArray,V,X);j.bindFramebuffer(j.READ_FRAMEBUFFER,I._MSAAFramebuffer),j.bindFramebuffer(j.DRAW_FRAMEBUFFER,I._framebuffer),j.blitFramebuffer(0,0,I.width,I.height,0,0,I.width,I.height,j.COLOR_BUFFER_BIT,j.NEAREST)}!I.generateMipMaps||V||I.isCube||(this._bindTextureDirectly(j.TEXTURE_2D,I,!0),j.generateMipmap(j.TEXTURE_2D),this._bindTextureDirectly(j.TEXTURE_2D,null)),X&&(I._MSAAFramebuffer&&this._bindUnboundFramebuffer(I._framebuffer),X()),this._bindUnboundFramebuffer(null)},N.prototype.flushFramebuffer=function(){this._gl.flush()},N.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},N.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},N.prototype.createVertexBuffer=function(I){return this._createVertexBuffer(I,this._gl.STATIC_DRAW)},N.prototype._createVertexBuffer=function(I,V){var X=this._gl.createBuffer();if(!X)throw new Error("Unable to create vertex buffer");var j=new u.a(X);return this.bindArrayBuffer(j),I instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(I),this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.ARRAY_BUFFER,I,this._gl.STATIC_DRAW),this._resetVertexBufferBinding(),j.references=1,j},N.prototype.createDynamicVertexBuffer=function(I){return this._createVertexBuffer(I,this._gl.DYNAMIC_DRAW)},N.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},N.prototype.createIndexBuffer=function(I,V){var X=this._gl.createBuffer(),j=new u.a(X);if(!X)throw new Error("Unable to create index buffer");this.bindIndexBuffer(j);var ne=this._normalizeIndexData(I);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,ne,V?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),j.references=1,j.is32Bits=ne.BYTES_PER_ELEMENT===4,j},N.prototype._normalizeIndexData=function(I){if(I instanceof Uint16Array)return I;if(this._caps.uintIndices){if(I instanceof Uint32Array)return I;for(var V=0;V=65535)return new Uint32Array(I);return new Uint16Array(I)}return new Uint16Array(I)},N.prototype.bindArrayBuffer=function(I){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(I,this._gl.ARRAY_BUFFER)},N.prototype.bindUniformBlock=function(I,V,X){var j=I.program,ne=this._gl.getUniformBlockIndex(j,V);this._gl.uniformBlockBinding(j,ne,X)},N.prototype.bindIndexBuffer=function(I){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(I,this._gl.ELEMENT_ARRAY_BUFFER)},N.prototype.bindBuffer=function(I,V){(this._vaoRecordInProgress||this._currentBoundBuffer[V]!==I)&&(this._gl.bindBuffer(V,I?I.underlyingResource:null),this._currentBoundBuffer[V]=I)},N.prototype.updateArrayBuffer=function(I){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,I)},N.prototype._vertexAttribPointer=function(I,V,X,j,ne,te,de){var pe=this._currentBufferPointers[V];if(pe){var ae=!1;pe.active?(pe.buffer!==I&&(pe.buffer=I,ae=!0),pe.size!==X&&(pe.size=X,ae=!0),pe.type!==j&&(pe.type=j,ae=!0),pe.normalized!==ne&&(pe.normalized=ne,ae=!0),pe.stride!==te&&(pe.stride=te,ae=!0),pe.offset!==de&&(pe.offset=de,ae=!0)):(ae=!0,pe.active=!0,pe.index=V,pe.size=X,pe.type=j,pe.normalized=ne,pe.stride=te,pe.offset=de,pe.buffer=I),(ae||this._vaoRecordInProgress)&&(this.bindArrayBuffer(I),this._gl.vertexAttribPointer(V,X,j,ne,te,de))}},N.prototype._bindIndexBufferWithCache=function(I){I!=null&&this._cachedIndexBuffer!==I&&(this._cachedIndexBuffer=I,this.bindIndexBuffer(I),this._uintIndicesCurrentlySet=I.is32Bits)},N.prototype._bindVertexBuffersAttributes=function(I,V){var X=V.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var j=0;j=0){var te=I[X[j]];if(!te)continue;this._gl.enableVertexAttribArray(ne),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[ne]=!0);var de=te.getBuffer();de&&(this._vertexAttribPointer(de,ne,te.getSize(),te.type,te.normalized,te.byteStride,te.byteOffset),te.getIsInstanced()&&(this._gl.vertexAttribDivisor(ne,te.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(ne),this._currentInstanceBuffers.push(de))))}}},N.prototype.recordVertexArrayObject=function(I,V,X){var j=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(j),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(I,X),this.bindIndexBuffer(V),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),j},N.prototype.bindVertexArrayObject=function(I,V){this._cachedVertexArrayObject!==I&&(this._cachedVertexArrayObject=I,this._gl.bindVertexArray(I),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=V!=null&&V.is32Bits,this._mustWipeVertexAttributes=!0)},N.prototype.bindBuffersDirectly=function(I,V,X,j,ne){if(this._cachedVertexBuffers!==I||this._cachedEffectForVertexBuffers!==ne){this._cachedVertexBuffers=I,this._cachedEffectForVertexBuffers=ne;var te=ne.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var de=0,pe=0;pe=0&&(this._gl.enableVertexAttribArray(ae),this._vertexAttribArraysEnabled[ae]=!0,this._vertexAttribPointer(I,ae,X[pe],this._gl.FLOAT,!1,j,de)),de+=4*X[pe]}}this._bindIndexBufferWithCache(V)},N.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},N.prototype.bindBuffers=function(I,V,X){this._cachedVertexBuffers===I&&this._cachedEffectForVertexBuffers===X||(this._cachedVertexBuffers=I,this._cachedEffectForVertexBuffers=X,this._bindVertexBuffersAttributes(I,X)),this._bindIndexBufferWithCache(V)},N.prototype.unbindInstanceAttributes=function(){for(var I,V=0,X=this._currentInstanceLocations.length;V1?`#version 300 es -#define WEBGL2 -`:"",pe=this._compileShader(V,"vertex",j,de),ae=this._compileShader(X,"fragment",j,de);return this._createShaderProgram(I,pe,ae,ne,te)},N.prototype.createPipelineContext=function(){var I=new h.a;return I.engine=this,this._caps.parallelShaderCompile&&(I.isParallelCompiled=!0),I},N.prototype._createShaderProgram=function(I,V,X,j,ne){var te=j.createProgram();if(I.program=te,!te)throw new Error("Unable to create program");return j.attachShader(te,V),j.attachShader(te,X),j.linkProgram(te),I.context=j,I.vertexShader=V,I.fragmentShader=X,I.isParallelCompiled||this._finalizePipelineContext(I),te},N.prototype._finalizePipelineContext=function(I){var V=I.context,X=I.vertexShader,j=I.fragmentShader,ne=I.program;if(!V.getProgramParameter(ne,V.LINK_STATUS)){var te,de;if(!this._gl.getShaderParameter(X,this._gl.COMPILE_STATUS)&&(te=this._gl.getShaderInfoLog(X)))throw I.vertexCompilationError=te,new Error("VERTEX SHADER "+te);if(!this._gl.getShaderParameter(j,this._gl.COMPILE_STATUS)&&(te=this._gl.getShaderInfoLog(j)))throw I.fragmentCompilationError=te,new Error("FRAGMENT SHADER "+te);if(de=V.getProgramInfoLog(ne))throw I.programLinkError=de,new Error(de)}if(this.validateShaderPrograms&&(V.validateProgram(ne),!V.getProgramParameter(ne,V.VALIDATE_STATUS)&&(de=V.getProgramInfoLog(ne))))throw I.programValidationError=de,new Error(de);V.deleteShader(X),V.deleteShader(j),I.vertexShader=void 0,I.fragmentShader=void 0,I.onCompiled&&(I.onCompiled(),I.onCompiled=void 0)},N.prototype._preparePipelineContext=function(I,V,X,j,ne,te,de){var pe=I;pe.program=j?this.createRawShaderProgram(pe,V,X,void 0,de):this.createShaderProgram(pe,V,X,te,void 0,de),pe.program.__SPECTOR_rebuildProgram=ne},N.prototype._isRenderingStateCompiled=function(I){var V=I;return!!this._gl.getProgramParameter(V.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)&&(this._finalizePipelineContext(V),!0)},N.prototype._executeWhenRenderingStateIsCompiled=function(I,V){var X=I;if(X.isParallelCompiled){var j=X.onCompiled;X.onCompiled=j?function(){j(),V()}:V}else V()},N.prototype.getUniforms=function(I,V){for(var X=new Array,j=I,ne=0;ne-1?I.substring(H).toLowerCase():""),W=null;Z.indexOf("?")>-1&&(Z=Z.split("?")[0]);for(var q=0,he=N._TextureLoaders;qze||ye.height>ze||!G._supportsHardwareTextureRescaling)return G._prepareWorkingCanvas(),!(!G._workingCanvas||!G._workingContext)&&(G._workingCanvas.width=Ue,G._workingCanvas.height=Ge,G._workingContext.drawImage(ye,0,0,ye.width,ye.height,0,0,Ue,Ge),He.texImage2D(He.TEXTURE_2D,0,Ze,Ze,He.UNSIGNED_BYTE,G._workingCanvas),Y.width=Ue,Y.height=Ge,!1);var it=new c.a(G,c.b.Temp);return G._bindTextureDirectly(He.TEXTURE_2D,it,!0),He.texImage2D(He.TEXTURE_2D,0,Ze,Ze,He.UNSIGNED_BYTE,ye),G._rescaleTexture(it,Y,j,Ze,function(){G._releaseTexture(it),G._bindTextureDirectly(He.TEXTURE_2D,Y,!0),Xe()}),!0},ne)};!Q||re?pe&&(pe.decoding||pe.close)?Ce(pe):N._FileToolsLoadImage(I,Ce,_e,j?j.offlineProvider:null,$):typeof pe=="string"||pe instanceof ArrayBuffer||ArrayBuffer.isView(pe)||pe instanceof Blob?N._FileToolsLoadImage(pe,Ce,_e,j?j.offlineProvider:null,$):pe&&Ce(pe)}return Y},N._FileToolsLoadImage=function(I,V,X,j,ne){throw P.a.WarnImport("FileTools")},N.prototype._rescaleTexture=function(I,V,X,j,ne){},N.prototype.createRawTexture=function(I,V,X,j,ne,te,de,pe,ae){throw ae===void 0&&(ae=m.a.TEXTURETYPE_UNSIGNED_INT),P.a.WarnImport("Engine.RawTexture")},N.prototype.createRawCubeTexture=function(I,V,X,j,ne,te,de,pe){throw P.a.WarnImport("Engine.RawTexture")},N.prototype.createRawTexture3D=function(I,V,X,j,ne,te,de,pe,ae,ee){throw ee===void 0&&(ee=m.a.TEXTURETYPE_UNSIGNED_INT),P.a.WarnImport("Engine.RawTexture")},N.prototype.createRawTexture2DArray=function(I,V,X,j,ne,te,de,pe,ae,ee){throw ee===void 0&&(ee=m.a.TEXTURETYPE_UNSIGNED_INT),P.a.WarnImport("Engine.RawTexture")},N.prototype._unpackFlipY=function(I){this._unpackFlipYCached!==I&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,I?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=I))},N.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},N.prototype._getTextureTarget=function(I){return I.isCube?this._gl.TEXTURE_CUBE_MAP:I.is3D?this._gl.TEXTURE_3D:I.is2DArray||I.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D},N.prototype.updateTextureSamplingMode=function(I,V,X){X===void 0&&(X=!1);var j=this._getTextureTarget(V),ne=this._getSamplingParameters(I,V.generateMipMaps||X);this._setTextureParameterInteger(j,this._gl.TEXTURE_MAG_FILTER,ne.mag,V),this._setTextureParameterInteger(j,this._gl.TEXTURE_MIN_FILTER,ne.min),X&&(V.generateMipMaps=!0,this._gl.generateMipmap(j)),this._bindTextureDirectly(j,null),V.samplingMode=I},N.prototype.updateTextureWrappingMode=function(I,V,X,j){X===void 0&&(X=null),j===void 0&&(j=null);var ne=this._getTextureTarget(I);V!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(V),I),I._cachedWrapU=V),X!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(X),I),I._cachedWrapV=X),(I.is2DArray||I.is3D)&&j!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(j),I),I._cachedWrapR=j),this._bindTextureDirectly(ne,null)},N.prototype._setupDepthStencilTexture=function(I,V,X,j,ne){var te=V.width||V,de=V.height||V,pe=V.layers||0;I.baseWidth=te,I.baseHeight=de,I.width=te,I.height=de,I.is2DArray=pe>0,I.depth=pe,I.isReady=!0,I.samples=1,I.generateMipMaps=!1,I._generateDepthBuffer=!0,I._generateStencilBuffer=X,I.samplingMode=j?m.a.TEXTURE_BILINEAR_SAMPLINGMODE:m.a.TEXTURE_NEAREST_SAMPLINGMODE,I.type=m.a.TEXTURETYPE_UNSIGNED_INT,I._comparisonFunction=ne;var ae=this._gl,ee=this._getTextureTarget(I),K=this._getSamplingParameters(I.samplingMode,!1);ae.texParameteri(ee,ae.TEXTURE_MAG_FILTER,K.mag),ae.texParameteri(ee,ae.TEXTURE_MIN_FILTER,K.min),ae.texParameteri(ee,ae.TEXTURE_WRAP_S,ae.CLAMP_TO_EDGE),ae.texParameteri(ee,ae.TEXTURE_WRAP_T,ae.CLAMP_TO_EDGE),ne===0?(ae.texParameteri(ee,ae.TEXTURE_COMPARE_FUNC,m.a.LEQUAL),ae.texParameteri(ee,ae.TEXTURE_COMPARE_MODE,ae.NONE)):(ae.texParameteri(ee,ae.TEXTURE_COMPARE_FUNC,ne),ae.texParameteri(ee,ae.TEXTURE_COMPARE_MODE,ae.COMPARE_REF_TO_TEXTURE))},N.prototype._uploadCompressedDataToTextureDirectly=function(I,V,X,j,ne,te,de){te===void 0&&(te=0),de===void 0&&(de=0);var pe=this._gl,ae=pe.TEXTURE_2D;I.isCube&&(ae=pe.TEXTURE_CUBE_MAP_POSITIVE_X+te),this._gl.compressedTexImage2D(ae,de,V,X,j,0,ne)},N.prototype._uploadDataToTextureDirectly=function(I,V,X,j,ne,te){X===void 0&&(X=0),j===void 0&&(j=0),te===void 0&&(te=!1);var de=this._gl,pe=this._getWebGLTextureType(I.type),ae=this._getInternalFormat(I.format),ee=ne===void 0?this._getRGBABufferInternalSizedFormat(I.type,I.format):this._getInternalFormat(ne);this._unpackFlipY(I.invertY);var K=de.TEXTURE_2D;I.isCube&&(K=de.TEXTURE_CUBE_MAP_POSITIVE_X+X);var $=Math.round(Math.log(I.width)*Math.LOG2E),L=Math.round(Math.log(I.height)*Math.LOG2E),G=te?I.width:Math.pow(2,Math.max($-j,0)),Q=te?I.height:Math.pow(2,Math.max(L-j,0));de.texImage2D(K,j,ee,G,Q,0,ae,pe,V)},N.prototype.updateTextureData=function(I,V,X,j,ne,te,de,pe){de===void 0&&(de=0),pe===void 0&&(pe=0);var ae=this._gl,ee=this._getWebGLTextureType(I.type),K=this._getInternalFormat(I.format);this._unpackFlipY(I.invertY);var $=ae.TEXTURE_2D;I.isCube&&($=ae.TEXTURE_CUBE_MAP_POSITIVE_X+de),ae.texSubImage2D($,pe,X,j,ne,te,K,ee,V)},N.prototype._uploadArrayBufferViewToTexture=function(I,V,X,j){X===void 0&&(X=0),j===void 0&&(j=0);var ne=this._gl,te=I.isCube?ne.TEXTURE_CUBE_MAP:ne.TEXTURE_2D;this._bindTextureDirectly(te,I,!0),this._uploadDataToTextureDirectly(I,V,X,j),this._bindTextureDirectly(te,null,!0)},N.prototype._prepareWebGLTextureContinuation=function(I,V,X,j,ne){var te=this._gl;if(te){var de=this._getSamplingParameters(ne,!X);te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MAG_FILTER,de.mag),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MIN_FILTER,de.min),X||j||te.generateMipmap(te.TEXTURE_2D),this._bindTextureDirectly(te.TEXTURE_2D,null),V&&V._removePendingData(I),I.onLoadedObservable.notifyObservers(I),I.onLoadedObservable.clear()}},N.prototype._prepareWebGLTexture=function(I,V,X,j,ne,te,de,pe,ae){var ee=this;ae===void 0&&(ae=m.a.TEXTURE_TRILINEAR_SAMPLINGMODE);var K=this.getCaps().maxTextureSize,$=Math.min(K,this.needPOTTextures?N.GetExponentOfTwo(X,K):X),L=Math.min(K,this.needPOTTextures?N.GetExponentOfTwo(j,K):j),G=this._gl;G&&(I._webGLTexture?(this._bindTextureDirectly(G.TEXTURE_2D,I,!0),this._unpackFlipY(ne===void 0||!!ne),I.baseWidth=X,I.baseHeight=j,I.width=$,I.height=L,I.isReady=!0,pe($,L,function(){ee._prepareWebGLTextureContinuation(I,V,te,de,ae)})||this._prepareWebGLTextureContinuation(I,V,te,de,ae)):V&&V._removePendingData(I))},N.prototype._setupFramebufferDepthAttachments=function(I,V,X,j,ne){ne===void 0&&(ne=1);var te=this._gl;if(I&&V)return this._getDepthStencilBuffer(X,j,ne,te.DEPTH_STENCIL,te.DEPTH24_STENCIL8,te.DEPTH_STENCIL_ATTACHMENT);if(V){var de=te.DEPTH_COMPONENT16;return this._webGLVersion>1&&(de=te.DEPTH_COMPONENT32F),this._getDepthStencilBuffer(X,j,ne,de,de,te.DEPTH_ATTACHMENT)}return I?this._getDepthStencilBuffer(X,j,ne,te.STENCIL_INDEX8,te.STENCIL_INDEX8,te.STENCIL_ATTACHMENT):null},N.prototype._releaseFramebufferObjects=function(I){var V=this._gl;I._framebuffer&&(V.deleteFramebuffer(I._framebuffer),I._framebuffer=null),I._depthStencilBuffer&&(V.deleteRenderbuffer(I._depthStencilBuffer),I._depthStencilBuffer=null),I._MSAAFramebuffer&&(V.deleteFramebuffer(I._MSAAFramebuffer),I._MSAAFramebuffer=null),I._MSAARenderBuffer&&(V.deleteRenderbuffer(I._MSAARenderBuffer),I._MSAARenderBuffer=null)},N.prototype._releaseTexture=function(I){this._releaseFramebufferObjects(I),this._deleteTexture(I._webGLTexture),this.unbindAllTextures();var V=this._internalTexturesCache.indexOf(I);V!==-1&&this._internalTexturesCache.splice(V,1),I._lodTextureHigh&&I._lodTextureHigh.dispose(),I._lodTextureMid&&I._lodTextureMid.dispose(),I._lodTextureLow&&I._lodTextureLow.dispose(),I._irradianceTexture&&I._irradianceTexture.dispose()},N.prototype._deleteTexture=function(I){this._gl.deleteTexture(I)},N.prototype._setProgram=function(I){this._currentProgram!==I&&(this._gl.useProgram(I),this._currentProgram=I)},N.prototype.bindSamplers=function(I){var V=I.getPipelineContext();this._setProgram(V.program);for(var X=I.getSamplers(),j=0;j-1;return X&&te&&(this._activeChannel=V._associatedChannel),this._boundTexturesCache[this._activeChannel]!==V||j?(this._activateCurrentTexture(),V&&V.isMultiview?this._gl.bindTexture(I,V?V._colorTextureArray:null):this._gl.bindTexture(I,V?V._webGLTexture:null),this._boundTexturesCache[this._activeChannel]=V,V&&(V._associatedChannel=this._activeChannel)):X&&(ne=!0,this._activateCurrentTexture()),te&&!X&&this._bindSamplerUniformToChannel(V._associatedChannel,this._activeChannel),ne},N.prototype._bindTexture=function(I,V){if(I!==void 0){V&&(V._associatedChannel=I),this._activeChannel=I;var X=V?this._getTextureTarget(V):this._gl.TEXTURE_2D;this._bindTextureDirectly(X,V)}},N.prototype.unbindAllTextures=function(){for(var I=0;I1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))},N.prototype.setTexture=function(I,V,X){I!==void 0&&(V&&(this._boundUniforms[I]=V),this._setTexture(I,X))},N.prototype._bindSamplerUniformToChannel=function(I,V){var X=this._boundUniforms[I];X&&X._currentState!==V&&(this._gl.uniform1i(X,V),X._currentState=V)},N.prototype._getTextureWrapMode=function(I){switch(I){case m.a.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case m.a.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case m.a.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},N.prototype._setTexture=function(I,V,X,j){if(X===void 0&&(X=!1),j===void 0&&(j=!1),!V)return this._boundTexturesCache[I]!=null&&(this._activeChannel=I,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(V.video)this._activeChannel=I,V.update();else if(V.delayLoadState===m.a.DELAYLOADSTATE_NOTLOADED)return V.delayLoad(),!1;var ne;ne=j?V.depthStencilTexture:V.isReady()?V.getInternalTexture():V.isCube?this.emptyCubeTexture:V.is3D?this.emptyTexture3D:V.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!X&&ne&&(ne._associatedChannel=I);var te=!0;this._boundTexturesCache[I]===ne&&(X||this._bindSamplerUniformToChannel(ne._associatedChannel,I),te=!1),this._activeChannel=I;var de=this._getTextureTarget(ne);if(te&&this._bindTextureDirectly(de,ne,X),ne&&!ne.isMultiview){if(ne.isCube&&ne._cachedCoordinatesMode!==V.coordinatesMode){ne._cachedCoordinatesMode=V.coordinatesMode;var pe=V.coordinatesMode!==m.a.TEXTURE_CUBIC_MODE&&V.coordinatesMode!==m.a.TEXTURE_SKYBOX_MODE?m.a.TEXTURE_WRAP_ADDRESSMODE:m.a.TEXTURE_CLAMP_ADDRESSMODE;V.wrapU=pe,V.wrapV=pe}ne._cachedWrapU!==V.wrapU&&(ne._cachedWrapU=V.wrapU,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(V.wrapU),ne)),ne._cachedWrapV!==V.wrapV&&(ne._cachedWrapV=V.wrapV,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(V.wrapV),ne)),ne.is3D&&ne._cachedWrapR!==V.wrapR&&(ne._cachedWrapR=V.wrapR,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(V.wrapR),ne)),this._setAnisotropicLevel(de,ne,V.anisotropicFilteringLevel)}return!0},N.prototype.setTextureArray=function(I,V,X){if(I!==void 0&&V){this._textureUnits&&this._textureUnits.length===X.length||(this._textureUnits=new Int32Array(X.length));for(var j=0;j=this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[I]||this.disableAttributeByIndex(I)}},N.prototype.releaseEffects=function(){for(var I in this._compiledEffects){var V=this._compiledEffects[I].getPipelineContext();this._deletePipelineContext(V)}this._compiledEffects={}},N.prototype.dispose=function(){this.stopRenderLoop(),this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.releaseEffects(),this.unbindAllAttributes(),this._boundUniforms=[],A.a.IsWindowObjectExist()&&this._renderingCanvas&&(this._doNotHandleContextLost||(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored))),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._boundRenderFunction=null,_.a.ResetCache();for(var I=0,V=this._activeRequests;I1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(m.a.TEXTURETYPE_FLOAT)},N.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(m.a.TEXTURETYPE_HALF_FLOAT)},N.prototype._canRenderToFramebuffer=function(I){for(var V=this._gl;V.getError()!==V.NO_ERROR;);var X=!0,j=V.createTexture();V.bindTexture(V.TEXTURE_2D,j),V.texImage2D(V.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(I),1,1,0,V.RGBA,this._getWebGLTextureType(I),null),V.texParameteri(V.TEXTURE_2D,V.TEXTURE_MIN_FILTER,V.NEAREST),V.texParameteri(V.TEXTURE_2D,V.TEXTURE_MAG_FILTER,V.NEAREST);var ne=V.createFramebuffer();V.bindFramebuffer(V.FRAMEBUFFER,ne),V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_2D,j,0);var te=V.checkFramebufferStatus(V.FRAMEBUFFER);if((X=(X=X&&te===V.FRAMEBUFFER_COMPLETE)&&V.getError()===V.NO_ERROR)&&(V.clear(V.COLOR_BUFFER_BIT),X=X&&V.getError()===V.NO_ERROR),X){V.bindFramebuffer(V.FRAMEBUFFER,null);var de=V.RGBA,pe=V.UNSIGNED_BYTE,ae=new Uint8Array(4);V.readPixels(0,0,1,1,de,pe,ae),X=X&&V.getError()===V.NO_ERROR}for(V.deleteTexture(j),V.deleteFramebuffer(ne),V.bindFramebuffer(V.FRAMEBUFFER,null);!X&&V.getError()!==V.NO_ERROR;);return X},N.prototype._getWebGLTextureType=function(I){if(this._webGLVersion===1){switch(I){case m.a.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case m.a.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case m.a.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(I){case m.a.TEXTURETYPE_BYTE:return this._gl.BYTE;case m.a.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case m.a.TEXTURETYPE_SHORT:return this._gl.SHORT;case m.a.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case m.a.TEXTURETYPE_INT:return this._gl.INT;case m.a.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case m.a.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case m.a.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case m.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case m.a.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case m.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case m.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case m.a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},N.prototype._getInternalFormat=function(I){var V=this._gl.RGBA;switch(I){case m.a.TEXTUREFORMAT_ALPHA:V=this._gl.ALPHA;break;case m.a.TEXTUREFORMAT_LUMINANCE:V=this._gl.LUMINANCE;break;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:V=this._gl.LUMINANCE_ALPHA;break;case m.a.TEXTUREFORMAT_RED:V=this._gl.RED;break;case m.a.TEXTUREFORMAT_RG:V=this._gl.RG;break;case m.a.TEXTUREFORMAT_RGB:V=this._gl.RGB;break;case m.a.TEXTUREFORMAT_RGBA:V=this._gl.RGBA}if(this._webGLVersion>1)switch(I){case m.a.TEXTUREFORMAT_RED_INTEGER:V=this._gl.RED_INTEGER;break;case m.a.TEXTUREFORMAT_RG_INTEGER:V=this._gl.RG_INTEGER;break;case m.a.TEXTUREFORMAT_RGB_INTEGER:V=this._gl.RGB_INTEGER;break;case m.a.TEXTUREFORMAT_RGBA_INTEGER:V=this._gl.RGBA_INTEGER}return V},N.prototype._getRGBABufferInternalSizedFormat=function(I,V){if(this._webGLVersion===1){if(V!==void 0)switch(V){case m.a.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case m.a.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB}return this._gl.RGBA}switch(I){case m.a.TEXTURETYPE_BYTE:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case m.a.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case m.a.TEXTURETYPE_UNSIGNED_BYTE:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R8;case m.a.TEXTUREFORMAT_RG:return this._gl.RG8;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB8;case m.a.TEXTUREFORMAT_RGBA:return this._gl.RGBA8;case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case m.a.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case m.a.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case m.a.TEXTURETYPE_SHORT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case m.a.TEXTURETYPE_UNSIGNED_SHORT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case m.a.TEXTURETYPE_INT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case m.a.TEXTURETYPE_UNSIGNED_INTEGER:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case m.a.TEXTURETYPE_FLOAT:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R32F;case m.a.TEXTUREFORMAT_RG:return this._gl.RG32F;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case m.a.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case m.a.TEXTURETYPE_HALF_FLOAT:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R16F;case m.a.TEXTUREFORMAT_RG:return this._gl.RG16F;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case m.a.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case m.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case m.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case m.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(V){case m.a.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return this._gl.RGBA8},N.prototype._getRGBAMultiSampleBufferFormat=function(I){return I===m.a.TEXTURETYPE_FLOAT?this._gl.RGBA32F:I===m.a.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},N.prototype._loadFile=function(I,V,X,j,ne,te){var de=this,pe=N._FileToolsLoadFile(I,V,X,j,ne,te);return this._activeRequests.push(pe),pe.onCompleteObservable.add(function(ae){de._activeRequests.splice(de._activeRequests.indexOf(ae),1)}),pe},N._FileToolsLoadFile=function(I,V,X,j,ne,te){throw P.a.WarnImport("FileTools")},N.prototype.readPixels=function(I,V,X,j,ne){ne===void 0&&(ne=!0);var te=ne?4:3,de=ne?this._gl.RGBA:this._gl.RGB,pe=new Uint8Array(j*X*te);return this._gl.readPixels(I,V,X,j,de,this._gl.UNSIGNED_BYTE,pe),pe},Object.defineProperty(N,"IsSupported",{get:function(){return this.isSupported()},enumerable:!1,configurable:!0}),N.isSupported=function(){if(this._HasMajorPerformanceCaveat!==null)return!this._HasMajorPerformanceCaveat;if(this._IsSupported===null)try{var I=b.a.CreateCanvas(1,1),V=I.getContext("webgl")||I.getContext("experimental-webgl");this._IsSupported=V!=null&&!!window.WebGLRenderingContext}catch{this._IsSupported=!1}return this._IsSupported},Object.defineProperty(N,"HasMajorPerformanceCaveat",{get:function(){if(this._HasMajorPerformanceCaveat===null)try{var I=b.a.CreateCanvas(1,1),V=I.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||I.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!V}catch{this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat},enumerable:!1,configurable:!0}),N.CeilingPOT=function(I){return I--,I|=I>>1,I|=I>>2,I|=I>>4,I|=I>>8,I|=I>>16,++I},N.FloorPOT=function(I){return I|=I>>1,I|=I>>2,I|=I>>4,I|=I>>8,(I|=I>>16)-(I>>1)},N.NearestPOT=function(I){var V=N.CeilingPOT(I),X=N.FloorPOT(I);return V-I>I-X?X:V},N.GetExponentOfTwo=function(I,V,X){var j;switch(X===void 0&&(X=m.a.SCALEMODE_NEAREST),X){case m.a.SCALEMODE_FLOOR:j=N.FloorPOT(I);break;case m.a.SCALEMODE_NEAREST:j=N.NearestPOT(I);break;case m.a.SCALEMODE_CEILING:default:j=N.CeilingPOT(I)}return Math.min(j,V)},N.QueueNewFrame=function(I,V){return A.a.IsWindowObjectExist()?(V||(V=window),V.requestPostAnimationFrame?V.requestPostAnimationFrame(I):V.requestAnimationFrame?V.requestAnimationFrame(I):V.msRequestAnimationFrame?V.msRequestAnimationFrame(I):V.webkitRequestAnimationFrame?V.webkitRequestAnimationFrame(I):V.mozRequestAnimationFrame?V.mozRequestAnimationFrame(I):V.oRequestAnimationFrame?V.oRequestAnimationFrame(I):window.setTimeout(I,16)):typeof requestAnimationFrame<"u"?requestAnimationFrame(I):setTimeout(I,16)},N.prototype.getHostDocument=function(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:document},N.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]}],N._TextureLoaders=[],N.CollisionsEpsilon=.001,N._IsSupported=null,N._HasMajorPerformanceCaveat=null,N}()},function(Ae,v,f){f.d(v,"b",function(){return B}),f.d(v,"a",function(){return R});var B,_=f(6),P=f(102),l=f(2),O=f(21);(function(x){x[x.Unknown=0]="Unknown",x[x.Url=1]="Url",x[x.Temp=2]="Temp",x[x.Raw=3]="Raw",x[x.Dynamic=4]="Dynamic",x[x.RenderTarget=5]="RenderTarget",x[x.MultiRenderTarget=6]="MultiRenderTarget",x[x.Cube=7]="Cube",x[x.CubeRaw=8]="CubeRaw",x[x.CubePrefiltered=9]="CubePrefiltered",x[x.Raw3D=10]="Raw3D",x[x.Raw2DArray=11]="Raw2DArray",x[x.Depth=12]="Depth",x[x.CubeRawRGBD=13]="CubeRawRGBD"})(B||(B={}));var R=function(){function x(m,c,T){T===void 0&&(T=!1),this.isReady=!1,this.isCube=!1,this.is3D=!1,this.is2DArray=!1,this.isMultiview=!1,this.url="",this.samplingMode=-1,this.generateMipMaps=!1,this.samples=0,this.type=-1,this.format=-1,this.onLoadedObservable=new _.c,this.width=0,this.height=0,this.depth=0,this.baseWidth=0,this.baseHeight=0,this.baseDepth=0,this.invertY=!1,this._invertVScale=!1,this._associatedChannel=-1,this._source=B.Unknown,this._buffer=null,this._bufferView=null,this._bufferViewArray=null,this._bufferViewArrayArray=null,this._size=0,this._extension="",this._files=null,this._workingCanvas=null,this._workingContext=null,this._framebuffer=null,this._depthStencilBuffer=null,this._MSAAFramebuffer=null,this._MSAARenderBuffer=null,this._attachments=null,this._textureArray=null,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._isDisabled=!1,this._compression=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._comparisonFunction=0,this._sphericalPolynomial=null,this._lodGenerationScale=0,this._lodGenerationOffset=0,this._colorTextureArray=null,this._depthStencilTextureArray=null,this._lodTextureHigh=null,this._lodTextureMid=null,this._lodTextureLow=null,this._isRGBD=!1,this._linearSpecularLOD=!1,this._irradianceTexture=null,this._webGLTexture=null,this._references=1,this._gammaSpace=null,this._engine=m,this._source=c,T||(this._webGLTexture=m._createTexture())}return x.prototype.getEngine=function(){return this._engine},Object.defineProperty(x.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),x.prototype.incrementReferences=function(){this._references++},x.prototype.updateSize=function(m,c,T){T===void 0&&(T=1),this.width=m,this.height=c,this.depth=T,this.baseWidth=m,this.baseHeight=c,this.baseDepth=T,this._size=m*c*T},x.prototype._rebuild=function(){var m,c,T=this;switch(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedAnisotropicFilteringLevel=null,this.source){case B.Temp:return;case B.Url:return void(c=this._engine.createTexture((m=this._originalUrl)!==null&&m!==void 0?m:this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,function(){c._swapAndDie(T),T.isReady=!0},null,this._buffer,void 0,this.format));case B.Raw:return(c=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case B.Raw3D:return(c=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case B.Raw2DArray:return(c=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case B.Dynamic:return(c=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this),void this._engine.updateDynamicTexture(this,this._engine.getRenderingCanvas(),this.invertY,void 0,void 0,!0);case B.RenderTarget:var A=new P.a;if(A.generateDepthBuffer=this._generateDepthBuffer,A.generateMipMaps=this.generateMipMaps,A.generateStencilBuffer=this._generateStencilBuffer,A.samplingMode=this.samplingMode,A.type=this.type,this.isCube)c=this._engine.createRenderTargetCubeTexture(this.width,A);else{var S={width:this.width,height:this.height,layers:this.is2DArray?this.depth:void 0};c=this._engine.createRenderTargetTexture(S,A)}return c._swapAndDie(this),void(this.isReady=!0);case B.Depth:var g={bilinearFiltering:this.samplingMode!==l.a.TEXTURE_BILINEAR_SAMPLINGMODE,comparisonFunction:this._comparisonFunction,generateStencil:this._generateStencilBuffer,isCube:this.isCube},u={width:this.width,height:this.height,layers:this.is2DArray?this.depth:void 0};return(c=this._engine.createDepthStencilTexture(u,g))._swapAndDie(this),void(this.isReady=!0);case B.Cube:return void(c=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,function(){c._swapAndDie(T),T.isReady=!0},null,this.format,this._extension));case B.CubeRaw:return(c=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case B.CubeRawRGBD:return c=this._engine.createRawCubeTexture(null,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression),void x._UpdateRGBDAsync(c,this._bufferViewArrayArray,this._sphericalPolynomial,this._lodGenerationScale,this._lodGenerationOffset).then(function(){c._swapAndDie(T),T.isReady=!0});case B.CubePrefiltered:return void((c=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,function(h){h&&h._swapAndDie(T),T.isReady=!0},null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial)}},x.prototype._swapAndDie=function(m){m._webGLTexture=this._webGLTexture,m._isRGBD=this._isRGBD,this._framebuffer&&(m._framebuffer=this._framebuffer),this._depthStencilBuffer&&(m._depthStencilBuffer=this._depthStencilBuffer),m._depthStencilTexture=this._depthStencilTexture,this._lodTextureHigh&&(m._lodTextureHigh&&m._lodTextureHigh.dispose(),m._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(m._lodTextureMid&&m._lodTextureMid.dispose(),m._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(m._lodTextureLow&&m._lodTextureLow.dispose(),m._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(m._irradianceTexture&&m._irradianceTexture.dispose(),m._irradianceTexture=this._irradianceTexture);var c,T=this._engine.getLoadedTexturesCache();(c=T.indexOf(this))!==-1&&T.splice(c,1),(c=T.indexOf(m))===-1&&T.push(m)},x.prototype.dispose=function(){this._webGLTexture&&(this._references--,this._references===0&&(this._engine._releaseTexture(this),this._webGLTexture=null))},x._UpdateRGBDAsync=function(m,c,T,A,S){throw O.a.WarnImport("environmentTextureTools")},x}()},function(Ae,v,f){f.d(v,"b",function(){return B}),f.d(v,"c",function(){return _}),f.d(v,"a",function(){return P});var B=1/2.2,_=2.2,P=.001},function(Ae,v,f){f.d(v,"a",function(){return x});var B=f(1),_=f(0),P=f(3),l=f(6),O=f(22),R=f(21),x=function(){function m(c,T){T===void 0&&(T=null),this.state="",this.metadata=null,this.reservedDataStore=null,this._doNotSerialize=!1,this._isDisposed=!1,this.animations=new Array,this._ranges={},this.onReady=null,this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._currentRenderId=-1,this._parentUpdateId=-1,this._childUpdateId=-1,this._waitingParentId=null,this._cache={},this._parentNode=null,this._children=null,this._worldMatrix=_.a.Identity(),this._worldMatrixDeterminant=0,this._worldMatrixDeterminantIsDirty=!0,this._sceneRootNodesIndex=-1,this._animationPropertiesOverride=null,this._isNode=!0,this.onDisposeObservable=new l.c,this._onDisposeObserver=null,this._behaviors=new Array,this.name=c,this.id=c,this._scene=T||O.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache()}return m.AddNodeConstructor=function(c,T){this._NodeConstructors[c]=T},m.Construct=function(c,T,A,S){var g=this._NodeConstructors[c];return g?g(T,A,S):null},Object.defineProperty(m.prototype,"doNotSerialize",{get:function(){return!!this._doNotSerialize||!!this._parentNode&&this._parentNode.doNotSerialize},set:function(c){this._doNotSerialize=c},enumerable:!1,configurable:!0}),m.prototype.isDisposed=function(){return this._isDisposed},Object.defineProperty(m.prototype,"parent",{get:function(){return this._parentNode},set:function(c){if(this._parentNode!==c){var T=this._parentNode;if(this._parentNode&&this._parentNode._children!==void 0&&this._parentNode._children!==null){var A=this._parentNode._children.indexOf(this);A!==-1&&this._parentNode._children.splice(A,1),c||this._isDisposed||this._addToSceneRootNodes()}this._parentNode=c,this._parentNode&&(this._parentNode._children!==void 0&&this._parentNode._children!==null||(this._parentNode._children=new Array),this._parentNode._children.push(this),T||this._removeFromSceneRootNodes()),this._syncParentEnabledState()}},enumerable:!1,configurable:!0}),m.prototype._addToSceneRootNodes=function(){this._sceneRootNodesIndex===-1&&(this._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))},m.prototype._removeFromSceneRootNodes=function(){if(this._sceneRootNodesIndex!==-1){var c=this._scene.rootNodes,T=c.length-1;c[this._sceneRootNodesIndex]=c[T],c[this._sceneRootNodesIndex]._sceneRootNodesIndex=this._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._sceneRootNodesIndex=-1}},Object.defineProperty(m.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(c){this._animationPropertiesOverride=c},enumerable:!1,configurable:!0}),m.prototype.getClassName=function(){return"Node"},Object.defineProperty(m.prototype,"onDispose",{set:function(c){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(c)},enumerable:!1,configurable:!0}),m.prototype.getScene=function(){return this._scene},m.prototype.getEngine=function(){return this._scene.getEngine()},m.prototype.addBehavior=function(c,T){var A=this;return T===void 0&&(T=!1),this._behaviors.indexOf(c)!==-1||(c.init(),this._scene.isLoading&&!T?this._scene.onDataLoadedObservable.addOnce(function(){c.attach(A)}):c.attach(this),this._behaviors.push(c)),this},m.prototype.removeBehavior=function(c){var T=this._behaviors.indexOf(c);return T===-1||(this._behaviors[T].detach(),this._behaviors.splice(T,1)),this},Object.defineProperty(m.prototype,"behaviors",{get:function(){return this._behaviors},enumerable:!1,configurable:!0}),m.prototype.getBehaviorByName=function(c){for(var T=0,A=this._behaviors;T -#if defined(BUMP) || !defined(NORMAL) -#extension GL_OES_standard_derivatives : enable -#endif -#include[SCENE_MRT_COUNT] -#define CUSTOM_FRAGMENT_BEGIN -#ifdef LOGARITHMICDEPTH -#extension GL_EXT_frag_depth : enable -#endif - -#define RECIPROCAL_PI2 0.15915494 -uniform vec3 vEyePosition; -uniform vec3 vAmbientColor; - -varying vec3 vPositionW; -#ifdef NORMAL -varying vec3 vNormalW; -#endif -#ifdef VERTEXCOLOR -varying vec4 vColor; -#endif -#ifdef MAINUV1 -varying vec2 vMainUV1; -#endif -#ifdef MAINUV2 -varying vec2 vMainUV2; -#endif - -#include - -#include<__decl__lightFragment>[0..maxSimultaneousLights] -#include -#include - -#ifdef DIFFUSE -#if DIFFUSEDIRECTUV == 1 -#define vDiffuseUV vMainUV1 -#elif DIFFUSEDIRECTUV == 2 -#define vDiffuseUV vMainUV2 -#else -varying vec2 vDiffuseUV; -#endif -uniform sampler2D diffuseSampler; -#endif -#ifdef AMBIENT -#if AMBIENTDIRECTUV == 1 -#define vAmbientUV vMainUV1 -#elif AMBIENTDIRECTUV == 2 -#define vAmbientUV vMainUV2 -#else -varying vec2 vAmbientUV; -#endif -uniform sampler2D ambientSampler; -#endif -#ifdef OPACITY -#if OPACITYDIRECTUV == 1 -#define vOpacityUV vMainUV1 -#elif OPACITYDIRECTUV == 2 -#define vOpacityUV vMainUV2 -#else -varying vec2 vOpacityUV; -#endif -uniform sampler2D opacitySampler; -#endif -#ifdef EMISSIVE -#if EMISSIVEDIRECTUV == 1 -#define vEmissiveUV vMainUV1 -#elif EMISSIVEDIRECTUV == 2 -#define vEmissiveUV vMainUV2 -#else -varying vec2 vEmissiveUV; -#endif -uniform sampler2D emissiveSampler; -#endif -#ifdef LIGHTMAP -#if LIGHTMAPDIRECTUV == 1 -#define vLightmapUV vMainUV1 -#elif LIGHTMAPDIRECTUV == 2 -#define vLightmapUV vMainUV2 -#else -varying vec2 vLightmapUV; -#endif -uniform sampler2D lightmapSampler; -#endif -#ifdef REFRACTION -#ifdef REFRACTIONMAP_3D -uniform samplerCube refractionCubeSampler; -#else -uniform sampler2D refraction2DSampler; -#endif -#endif -#if defined(SPECULAR) && defined(SPECULARTERM) -#if SPECULARDIRECTUV == 1 -#define vSpecularUV vMainUV1 -#elif SPECULARDIRECTUV == 2 -#define vSpecularUV vMainUV2 -#else -varying vec2 vSpecularUV; -#endif -uniform sampler2D specularSampler; -#endif -#ifdef ALPHATEST -uniform float alphaCutOff; -#endif - -#include - -#ifdef REFLECTION -#ifdef REFLECTIONMAP_3D -uniform samplerCube reflectionCubeSampler; -#else -uniform sampler2D reflection2DSampler; -#endif -#ifdef REFLECTIONMAP_SKYBOX -varying vec3 vPositionUVW; -#else -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -varying vec3 vDirectionW; -#endif -#endif -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#define CUSTOM_FRAGMENT_DEFINITIONS -void main(void) { -#define CUSTOM_FRAGMENT_MAIN_BEGIN -#include -vec3 viewDirectionW=normalize(vEyePosition-vPositionW); - -vec4 baseColor=vec4(1.,1.,1.,1.); -vec3 diffuseColor=vDiffuseColor.rgb; - -float alpha=vDiffuseColor.a; - -#ifdef NORMAL -vec3 normalW=normalize(vNormalW); -#else -vec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW))); -#endif -#include -#ifdef TWOSIDEDLIGHTING -normalW=gl_FrontFacing ? normalW : -normalW; -#endif -#ifdef DIFFUSE -baseColor=texture2D(diffuseSampler,vDiffuseUV+uvOffset); -#if defined(ALPHATEST) && !defined(ALPHATEST_AFTERALLALPHACOMPUTATIONS) -if (baseColor.a -#ifdef VERTEXCOLOR -baseColor.rgb*=vColor.rgb; -#endif -#ifdef DETAIL -baseColor.rgb=baseColor.rgb*2.0*mix(0.5,detailColor.r,vDetailInfos.y); -#endif -#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE - -vec3 baseAmbientColor=vec3(1.,1.,1.); -#ifdef AMBIENT -baseAmbientColor=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y; -#endif -#define CUSTOM_FRAGMENT_BEFORE_LIGHTS - -#ifdef SPECULARTERM -float glossiness=vSpecularColor.a; -vec3 specularColor=vSpecularColor.rgb; -#ifdef SPECULAR -vec4 specularMapColor=texture2D(specularSampler,vSpecularUV+uvOffset); -specularColor=specularMapColor.rgb; -#ifdef GLOSSINESS -glossiness=glossiness*specularMapColor.a; -#endif -#endif -#else -float glossiness=0.; -#endif - -vec3 diffuseBase=vec3(0.,0.,0.); -lightingInfo info; -#ifdef SPECULARTERM -vec3 specularBase=vec3(0.,0.,0.); -#endif -float shadow=1.; -#ifdef LIGHTMAP -vec4 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset); -#ifdef RGBDLIGHTMAP -lightmapColor.rgb=fromRGBD(lightmapColor); -#endif -lightmapColor.rgb*=vLightmapInfos.y; -#endif -#include[0..maxSimultaneousLights] - -vec4 refractionColor=vec4(0.,0.,0.,1.); -#ifdef REFRACTION -vec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y)); -#ifdef REFRACTIONMAP_3D -refractionVector.y=refractionVector.y*vRefractionInfos.w; -if (dot(refractionVector,viewDirectionW)<1.0) { -refractionColor=textureCube(refractionCubeSampler,refractionVector); -} -#else -vec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0))); -vec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z; -refractionCoords.y=1.0-refractionCoords.y; -refractionColor=texture2D(refraction2DSampler,refractionCoords); -#endif -#ifdef RGBDREFRACTION -refractionColor.rgb=fromRGBD(refractionColor); -#endif -#ifdef IS_REFRACTION_LINEAR -refractionColor.rgb=toGammaSpace(refractionColor.rgb); -#endif -refractionColor.rgb*=vRefractionInfos.x; -#endif - -vec4 reflectionColor=vec4(0.,0.,0.,1.); -#ifdef REFLECTION -vec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW); -#ifdef REFLECTIONMAP_3D -#ifdef ROUGHNESS -float bias=vReflectionInfos.y; -#ifdef SPECULARTERM -#ifdef SPECULAR -#ifdef GLOSSINESS -bias*=(1.0-specularMapColor.a); -#endif -#endif -#endif -reflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW,bias); -#else -reflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW); -#endif -#else -vec2 coords=vReflectionUVW.xy; -#ifdef REFLECTIONMAP_PROJECTION -coords/=vReflectionUVW.z; -#endif -coords.y=1.0-coords.y; -reflectionColor=texture2D(reflection2DSampler,coords); -#endif -#ifdef RGBDREFLECTION -reflectionColor.rgb=fromRGBD(reflectionColor); -#endif -#ifdef IS_REFLECTION_LINEAR -reflectionColor.rgb=toGammaSpace(reflectionColor.rgb); -#endif -reflectionColor.rgb*=vReflectionInfos.x; -#ifdef REFLECTIONFRESNEL -float reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a); -#ifdef REFLECTIONFRESNELFROMSPECULAR -#ifdef SPECULARTERM -reflectionColor.rgb*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; -#else -reflectionColor.rgb*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; -#endif -#else -reflectionColor.rgb*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; -#endif -#endif -#endif -#ifdef REFRACTIONFRESNEL -float refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a); -refractionColor.rgb*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb; -#endif -#ifdef OPACITY -vec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset); -#ifdef OPACITYRGB -opacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11); -alpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y; -#else -alpha*=opacityMap.a*vOpacityInfos.y; -#endif -#endif -#ifdef VERTEXALPHA -alpha*=vColor.a; -#endif -#ifdef OPACITYFRESNEL -float opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w); -alpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y; -#endif -#ifdef ALPHATEST -#ifdef ALPHATEST_AFTERALLALPHACOMPUTATIONS -if (alpha -#include - - -#ifdef IMAGEPROCESSINGPOSTPROCESS -color.rgb=toLinearSpace(color.rgb); -#else -#ifdef IMAGEPROCESSING -color.rgb=toLinearSpace(color.rgb); -color=applyImageProcessing(color); -#endif -#endif -color.a*=visibility; -#ifdef PREMULTIPLYALPHA - -color.rgb*=color.a; -#endif -#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR -#ifdef PREPASS -gl_FragData[0]=color; -#ifdef PREPASS_POSITION -gl_FragData[PREPASS_POSITION_INDEX]=vec4(vPositionW,1.0); -#endif -#ifdef PREPASS_VELOCITY -vec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5; -vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5; -vec2 velocity=abs(a-b); -velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5; -gl_FragData[PREPASS_VELOCITY_INDEX]=vec4(velocity,0.0,1.0); -#endif -#ifdef PREPASS_IRRADIANCE -gl_FragData[PREPASS_IRRADIANCE_INDEX]=vec4(0.0,0.0,0.0,1.0); -#endif -#ifdef PREPASS_DEPTHNORMAL -gl_FragData[PREPASS_DEPTHNORMAL_INDEX]=vec4(vViewPos.z,(view*vec4(normalW,0.0)).rgb); -#endif -#ifdef PREPASS_ALBEDO -gl_FragData[PREPASS_ALBEDO_INDEX]=vec4(0.0,0.0,0.0,1.0); -#endif -#ifdef PREPASS_REFLECTIVITY -#if defined(SPECULAR) -gl_FragData[PREPASS_REFLECTIVITY_INDEX]=specularMapColor; -#else -gl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(0.0,0.0,0.0,1.0); -#endif -#endif -#endif -#if !defined(PREPASS) || defined(WEBGL2) -gl_FragColor=color; -#endif -} -`;E.a.ShadersStore.defaultPixelShader=N;var I=` -uniform mat4 viewProjection; -uniform mat4 view; -#ifdef DIFFUSE -uniform mat4 diffuseMatrix; -uniform vec2 vDiffuseInfos; -#endif -#ifdef AMBIENT -uniform mat4 ambientMatrix; -uniform vec2 vAmbientInfos; -#endif -#ifdef OPACITY -uniform mat4 opacityMatrix; -uniform vec2 vOpacityInfos; -#endif -#ifdef EMISSIVE -uniform vec2 vEmissiveInfos; -uniform mat4 emissiveMatrix; -#endif -#ifdef LIGHTMAP -uniform vec2 vLightmapInfos; -uniform mat4 lightmapMatrix; -#endif -#if defined(SPECULAR) && defined(SPECULARTERM) -uniform vec2 vSpecularInfos; -uniform mat4 specularMatrix; -#endif -#ifdef BUMP -uniform vec3 vBumpInfos; -uniform mat4 bumpMatrix; -#endif -#ifdef REFLECTION -uniform mat4 reflectionMatrix; -#endif -#ifdef POINTSIZE -uniform float pointSize; -#endif -`;E.a.IncludesShadersStore.defaultVertexDeclaration=I,f(78),f(79),f(163),f(164),f(117),f(137),f(93),f(94),f(100),f(80),f(81),f(165),f(156),f(111),f(157),f(138),E.a.IncludesShadersStore.pointCloudVertex=`#ifdef POINTSIZE -gl_PointSize=pointSize; -#endif`,f(158);var V=`#include<__decl__defaultVertex> - -#define CUSTOM_VERTEX_BEGIN -attribute vec3 position; -#ifdef NORMAL -attribute vec3 normal; -#endif -#ifdef TANGENT -attribute vec4 tangent; -#endif -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#ifdef VERTEXCOLOR -attribute vec4 color; -#endif -#include -#include - -#include -#include -#ifdef MAINUV1 -varying vec2 vMainUV1; -#endif -#ifdef MAINUV2 -varying vec2 vMainUV2; -#endif -#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 -varying vec2 vDiffuseUV; -#endif -#if defined(DETAIL) && DETAILDIRECTUV == 0 -varying vec2 vDetailUV; -#endif -#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 -varying vec2 vAmbientUV; -#endif -#if defined(OPACITY) && OPACITYDIRECTUV == 0 -varying vec2 vOpacityUV; -#endif -#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 -varying vec2 vEmissiveUV; -#endif -#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 -varying vec2 vLightmapUV; -#endif -#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 -varying vec2 vSpecularUV; -#endif -#if defined(BUMP) && BUMPDIRECTUV == 0 -varying vec2 vBumpUV; -#endif - -varying vec3 vPositionW; -#ifdef NORMAL -varying vec3 vNormalW; -#endif -#ifdef VERTEXCOLOR -varying vec4 vColor; -#endif -#include -#include -#include -#include<__decl__lightFragment>[0..maxSimultaneousLights] -#include -#include[0..maxSimultaneousMorphTargets] -#ifdef REFLECTIONMAP_SKYBOX -varying vec3 vPositionUVW; -#endif -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -varying vec3 vDirectionW; -#endif -#include -#define CUSTOM_VERTEX_DEFINITIONS -void main(void) { -#define CUSTOM_VERTEX_MAIN_BEGIN -vec3 positionUpdated=position; -#ifdef NORMAL -vec3 normalUpdated=normal; -#endif -#ifdef TANGENT -vec4 tangentUpdated=tangent; -#endif -#ifdef UV1 -vec2 uvUpdated=uv; -#endif -#include[0..maxSimultaneousMorphTargets] -#ifdef REFLECTIONMAP_SKYBOX -vPositionUVW=positionUpdated; -#endif -#define CUSTOM_VERTEX_UPDATE_POSITION -#define CUSTOM_VERTEX_UPDATE_NORMAL -#include -#if defined(PREPASS) && defined(PREPASS_VELOCITY) && !defined(BONES_VELOCITY_ENABLED) - -vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); -vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); -#endif -#include -vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); -#ifdef NORMAL -mat3 normalWorld=mat3(finalWorld); -#if defined(INSTANCES) && defined(THIN_INSTANCES) -vNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2])); -vNormalW=normalize(normalWorld*vNormalW); -#else -#ifdef NONUNIFORMSCALING -normalWorld=transposeMat3(inverseMat3(normalWorld)); -#endif -vNormalW=normalize(normalWorld*normalUpdated); -#endif -#endif -#define CUSTOM_VERTEX_UPDATE_WORLDPOS -#ifdef MULTIVIEW -if (gl_ViewID_OVR == 0u) { -gl_Position=viewProjection*worldPos; -} else { -gl_Position=viewProjectionR*worldPos; -} -#else -gl_Position=viewProjection*worldPos; -#endif -vPositionW=vec3(worldPos); -#include -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0))); -#endif - -#ifndef UV1 -vec2 uvUpdated=vec2(0.,0.); -#endif -#ifndef UV2 -vec2 uv2=vec2(0.,0.); -#endif -#ifdef MAINUV1 -vMainUV1=uvUpdated; -#endif -#ifdef MAINUV2 -vMainUV2=uv2; -#endif -#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 -if (vDiffuseInfos.x == 0.) -{ -vDiffuseUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(DETAIL) && DETAILDIRECTUV == 0 -if (vDetailInfos.x == 0.) -{ -vDetailUV=vec2(detailMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vDetailUV=vec2(detailMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 -if (vAmbientInfos.x == 0.) -{ -vAmbientUV=vec2(ambientMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(OPACITY) && OPACITYDIRECTUV == 0 -if (vOpacityInfos.x == 0.) -{ -vOpacityUV=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 -if (vEmissiveInfos.x == 0.) -{ -vEmissiveUV=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 -if (vLightmapInfos.x == 0.) -{ -vLightmapUV=vec2(lightmapMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 -if (vSpecularInfos.x == 0.) -{ -vSpecularUV=vec2(specularMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vSpecularUV=vec2(specularMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(BUMP) && BUMPDIRECTUV == 0 -if (vBumpInfos.x == 0.) -{ -vBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#include -#include -#include -#include[0..maxSimultaneousLights] -#ifdef VERTEXCOLOR - -vColor=color; -#endif -#include -#include -#define CUSTOM_VERTEX_MAIN_END -} -`;E.a.ShadersStore.defaultVertexShader=V;var X=f(2),j=f(67),ne=f(92),te={effect:null,subMesh:null},de=function(ae){function ee(){var K=ae.call(this)||this;return K.MAINUV1=!1,K.MAINUV2=!1,K.DIFFUSE=!1,K.DIFFUSEDIRECTUV=0,K.DETAIL=!1,K.DETAILDIRECTUV=0,K.DETAIL_NORMALBLENDMETHOD=0,K.AMBIENT=!1,K.AMBIENTDIRECTUV=0,K.OPACITY=!1,K.OPACITYDIRECTUV=0,K.OPACITYRGB=!1,K.REFLECTION=!1,K.EMISSIVE=!1,K.EMISSIVEDIRECTUV=0,K.SPECULAR=!1,K.SPECULARDIRECTUV=0,K.BUMP=!1,K.BUMPDIRECTUV=0,K.PARALLAX=!1,K.PARALLAXOCCLUSION=!1,K.SPECULAROVERALPHA=!1,K.CLIPPLANE=!1,K.CLIPPLANE2=!1,K.CLIPPLANE3=!1,K.CLIPPLANE4=!1,K.CLIPPLANE5=!1,K.CLIPPLANE6=!1,K.ALPHATEST=!1,K.DEPTHPREPASS=!1,K.ALPHAFROMDIFFUSE=!1,K.POINTSIZE=!1,K.FOG=!1,K.SPECULARTERM=!1,K.DIFFUSEFRESNEL=!1,K.OPACITYFRESNEL=!1,K.REFLECTIONFRESNEL=!1,K.REFRACTIONFRESNEL=!1,K.EMISSIVEFRESNEL=!1,K.FRESNEL=!1,K.NORMAL=!1,K.UV1=!1,K.UV2=!1,K.VERTEXCOLOR=!1,K.VERTEXALPHA=!1,K.NUM_BONE_INFLUENCERS=0,K.BonesPerMesh=0,K.BONETEXTURE=!1,K.BONES_VELOCITY_ENABLED=!1,K.INSTANCES=!1,K.THIN_INSTANCES=!1,K.GLOSSINESS=!1,K.ROUGHNESS=!1,K.EMISSIVEASILLUMINATION=!1,K.LINKEMISSIVEWITHDIFFUSE=!1,K.REFLECTIONFRESNELFROMSPECULAR=!1,K.LIGHTMAP=!1,K.LIGHTMAPDIRECTUV=0,K.OBJECTSPACE_NORMALMAP=!1,K.USELIGHTMAPASSHADOWMAP=!1,K.REFLECTIONMAP_3D=!1,K.REFLECTIONMAP_SPHERICAL=!1,K.REFLECTIONMAP_PLANAR=!1,K.REFLECTIONMAP_CUBIC=!1,K.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,K.REFLECTIONMAP_PROJECTION=!1,K.REFLECTIONMAP_SKYBOX=!1,K.REFLECTIONMAP_EXPLICIT=!1,K.REFLECTIONMAP_EQUIRECTANGULAR=!1,K.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,K.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,K.INVERTCUBICMAP=!1,K.LOGARITHMICDEPTH=!1,K.REFRACTION=!1,K.REFRACTIONMAP_3D=!1,K.REFLECTIONOVERALPHA=!1,K.TWOSIDEDLIGHTING=!1,K.SHADOWFLOAT=!1,K.MORPHTARGETS=!1,K.MORPHTARGETS_NORMAL=!1,K.MORPHTARGETS_TANGENT=!1,K.MORPHTARGETS_UV=!1,K.NUM_MORPH_INFLUENCERS=0,K.NONUNIFORMSCALING=!1,K.PREMULTIPLYALPHA=!1,K.ALPHATEST_AFTERALLALPHACOMPUTATIONS=!1,K.ALPHABLEND=!0,K.PREPASS=!1,K.PREPASS_IRRADIANCE=!1,K.PREPASS_IRRADIANCE_INDEX=-1,K.PREPASS_ALBEDO=!1,K.PREPASS_ALBEDO_INDEX=-1,K.PREPASS_DEPTHNORMAL=!1,K.PREPASS_DEPTHNORMAL_INDEX=-1,K.PREPASS_POSITION=!1,K.PREPASS_POSITION_INDEX=-1,K.PREPASS_VELOCITY=!1,K.PREPASS_VELOCITY_INDEX=-1,K.PREPASS_REFLECTIVITY=!1,K.PREPASS_REFLECTIVITY_INDEX=-1,K.SCENE_MRT_COUNT=0,K.RGBDLIGHTMAP=!1,K.RGBDREFLECTION=!1,K.RGBDREFRACTION=!1,K.IMAGEPROCESSING=!1,K.VIGNETTE=!1,K.VIGNETTEBLENDMODEMULTIPLY=!1,K.VIGNETTEBLENDMODEOPAQUE=!1,K.TONEMAPPING=!1,K.TONEMAPPING_ACES=!1,K.CONTRAST=!1,K.COLORCURVES=!1,K.COLORGRADING=!1,K.COLORGRADING3D=!1,K.SAMPLER3DGREENDEPTH=!1,K.SAMPLER3DBGRMAP=!1,K.IMAGEPROCESSINGPOSTPROCESS=!1,K.MULTIVIEW=!1,K.IS_REFLECTION_LINEAR=!1,K.IS_REFRACTION_LINEAR=!1,K.EXPOSURE=!1,K.rebuild(),K}return Object(B.d)(ee,ae),ee.prototype.setReflectionMode=function(K){for(var $=0,L=["REFLECTIONMAP_CUBIC","REFLECTIONMAP_EXPLICIT","REFLECTIONMAP_PLANAR","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_SKYBOX","REFLECTIONMAP_SPHERICAL","REFLECTIONMAP_EQUIRECTANGULAR","REFLECTIONMAP_EQUIRECTANGULAR_FIXED","REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED"];$0,Q.REFLECTIONOVERALPHA=this._useReflectionOverAlpha,Q.INVERTCUBICMAP=this._reflectionTexture.coordinatesMode===u.a.INVCUBIC_MODE,Q.REFLECTIONMAP_3D=this._reflectionTexture.isCube,Q.RGBDREFLECTION=this._reflectionTexture.isRGBD,this._reflectionTexture.coordinatesMode){case u.a.EXPLICIT_MODE:Q.setReflectionMode("REFLECTIONMAP_EXPLICIT");break;case u.a.PLANAR_MODE:Q.setReflectionMode("REFLECTIONMAP_PLANAR");break;case u.a.PROJECTION_MODE:Q.setReflectionMode("REFLECTIONMAP_PROJECTION");break;case u.a.SKYBOX_MODE:Q.setReflectionMode("REFLECTIONMAP_SKYBOX");break;case u.a.SPHERICAL_MODE:Q.setReflectionMode("REFLECTIONMAP_SPHERICAL");break;case u.a.EQUIRECTANGULAR_MODE:Q.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR");break;case u.a.FIXED_EQUIRECTANGULAR_MODE:Q.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR_FIXED");break;case u.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:Q.setReflectionMode("REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED");break;case u.a.CUBIC_MODE:case u.a.INVCUBIC_MODE:default:Q.setReflectionMode("REFLECTIONMAP_CUBIC")}Q.USE_LOCAL_REFLECTIONMAP_CUBIC=!!this._reflectionTexture.boundingBoxSize}else Q.REFLECTION=!1;if(this._emissiveTexture&&ee.EmissiveTextureEnabled){if(!this._emissiveTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._emissiveTexture,Q,"EMISSIVE")}else Q.EMISSIVE=!1;if(this._lightmapTexture&&ee.LightmapTextureEnabled){if(!this._lightmapTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._lightmapTexture,Q,"LIGHTMAP"),Q.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,Q.RGBDLIGHTMAP=this._lightmapTexture.isRGBD}else Q.LIGHTMAP=!1;if(this._specularTexture&&ee.SpecularTextureEnabled){if(!this._specularTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._specularTexture,Q,"SPECULAR"),Q.GLOSSINESS=this._useGlossinessFromSpecularMapAlpha}else Q.SPECULAR=!1;if(G.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&ee.BumpTextureEnabled){if(!this._bumpTexture.isReady())return!1;g.a.PrepareDefinesForMergedUV(this._bumpTexture,Q,"BUMP"),Q.PARALLAX=this._useParallax,Q.PARALLAXOCCLUSION=this._useParallaxOcclusion,Q.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap}else Q.BUMP=!1;if(this._refractionTexture&&ee.RefractionTextureEnabled){if(!this._refractionTexture.isReadyOrNotBlocking())return!1;Q._needUVs=!0,Q.REFRACTION=!0,Q.REFRACTIONMAP_3D=this._refractionTexture.isCube,Q.RGBDREFRACTION=this._refractionTexture.isRGBD}else Q.REFRACTION=!1;Q.TWOSIDEDLIGHTING=!this._backFaceCulling&&this._twoSidedLighting}else Q.DIFFUSE=!1,Q.AMBIENT=!1,Q.OPACITY=!1,Q.REFLECTION=!1,Q.EMISSIVE=!1,Q.LIGHTMAP=!1,Q.BUMP=!1,Q.REFRACTION=!1;Q.ALPHAFROMDIFFUSE=this._shouldUseAlphaFromDiffuseTexture(),Q.EMISSIVEASILLUMINATION=this._useEmissiveAsIllumination,Q.LINKEMISSIVEWITHDIFFUSE=this._linkEmissiveWithDiffuse,Q.SPECULAROVERALPHA=this._useSpecularOverAlpha,Q.PREMULTIPLYALPHA=this.alphaMode===X.a.ALPHA_PREMULTIPLIED||this.alphaMode===X.a.ALPHA_PREMULTIPLIED_PORTERDUFF,Q.ALPHATEST_AFTERALLALPHACOMPUTATIONS=this.transparencyMode!==null,Q.ALPHABLEND=this.transparencyMode===null||this.needAlphaBlendingForMesh(K)}if(!this.detailMap.isReadyForSubMesh(Q,G))return!1;if(Q._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(Q),Q.IS_REFLECTION_LINEAR=this.reflectionTexture!=null&&!this.reflectionTexture.gammaSpace,Q.IS_REFRACTION_LINEAR=this.refractionTexture!=null&&!this.refractionTexture.gammaSpace}if(Q._areFresnelDirty&&(ee.FresnelEnabled?(this._diffuseFresnelParameters||this._opacityFresnelParameters||this._emissiveFresnelParameters||this._refractionFresnelParameters||this._reflectionFresnelParameters)&&(Q.DIFFUSEFRESNEL=this._diffuseFresnelParameters&&this._diffuseFresnelParameters.isEnabled,Q.OPACITYFRESNEL=this._opacityFresnelParameters&&this._opacityFresnelParameters.isEnabled,Q.REFLECTIONFRESNEL=this._reflectionFresnelParameters&&this._reflectionFresnelParameters.isEnabled,Q.REFLECTIONFRESNELFROMSPECULAR=this._useReflectionFresnelFromSpecular,Q.REFRACTIONFRESNEL=this._refractionFresnelParameters&&this._refractionFresnelParameters.isEnabled,Q.EMISSIVEFRESNEL=this._emissiveFresnelParameters&&this._emissiveFresnelParameters.isEnabled,Q._needNormals=!0,Q.FRESNEL=!0):Q.FRESNEL=!1),g.a.PrepareDefinesForMisc(K,G,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(K)||this._forceAlphaTest,Q),g.a.PrepareDefinesForAttributes(K,Q,!0,!0,!0),g.a.PrepareDefinesForFrameBoundValues(G,oe,Q,L,null,$.getRenderingMesh().hasThinInstances),this.detailMap.prepareDefines(Q,G),Q.isDirty){var re=Q._areLightsDisposed;Q.markAsProcessed();var Y=new j.a;Q.REFLECTION&&Y.addFallback(0,"REFLECTION"),Q.SPECULAR&&Y.addFallback(0,"SPECULAR"),Q.BUMP&&Y.addFallback(0,"BUMP"),Q.PARALLAX&&Y.addFallback(1,"PARALLAX"),Q.PARALLAXOCCLUSION&&Y.addFallback(0,"PARALLAXOCCLUSION"),Q.SPECULAROVERALPHA&&Y.addFallback(0,"SPECULAROVERALPHA"),Q.FOG&&Y.addFallback(1,"FOG"),Q.POINTSIZE&&Y.addFallback(0,"POINTSIZE"),Q.LOGARITHMICDEPTH&&Y.addFallback(0,"LOGARITHMICDEPTH"),g.a.HandleFallbacksForShadows(Q,Y,this._maxSimultaneousLights),Q.SPECULARTERM&&Y.addFallback(0,"SPECULARTERM"),Q.DIFFUSEFRESNEL&&Y.addFallback(1,"DIFFUSEFRESNEL"),Q.OPACITYFRESNEL&&Y.addFallback(2,"OPACITYFRESNEL"),Q.REFLECTIONFRESNEL&&Y.addFallback(3,"REFLECTIONFRESNEL"),Q.EMISSIVEFRESNEL&&Y.addFallback(4,"EMISSIVEFRESNEL"),Q.FRESNEL&&Y.addFallback(4,"FRESNEL"),Q.MULTIVIEW&&Y.addFallback(0,"MULTIVIEW");var k=[x.b.PositionKind];Q.NORMAL&&k.push(x.b.NormalKind),Q.UV1&&k.push(x.b.UVKind),Q.UV2&&k.push(x.b.UV2Kind),Q.VERTEXCOLOR&&k.push(x.b.ColorKind),g.a.PrepareAttributesForBones(k,K,Q,Y),g.a.PrepareAttributesForInstances(k,Q),g.a.PrepareAttributesForMorphTargets(k,K,Q);var H="default",Z=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vDiffuseColor","vSpecularColor","vEmissiveColor","visibility","vFogInfos","vFogColor","pointSize","vDiffuseInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vEmissiveInfos","vSpecularInfos","vBumpInfos","vLightmapInfos","vRefractionInfos","mBones","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","diffuseMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","specularMatrix","bumpMatrix","normalMatrix","lightmapMatrix","refractionMatrix","diffuseLeftColor","diffuseRightColor","opacityParts","reflectionLeftColor","reflectionRightColor","emissiveLeftColor","emissiveRightColor","refractionLeftColor","refractionRightColor","vReflectionPosition","vReflectionSize","logarithmicDepthConstant","vTangentSpaceParams","alphaCutOff","boneTextureWidth"],W=["diffuseSampler","ambientSampler","opacitySampler","reflectionCubeSampler","reflection2DSampler","emissiveSampler","specularSampler","bumpSampler","lightmapSampler","refractionCubeSampler","refraction2DSampler","boneSampler"],q=["Material","Scene"];ne.a.AddUniforms(Z),ne.a.AddSamplers(W),m.a.AddUniforms(Z),m.a.AddSamplers(Z),c.a&&(c.a.PrepareUniforms(Z,Q),c.a.PrepareSamplers(W,Q)),g.a.PrepareUniformsAndSamplersList({uniformsNames:Z,uniformBuffersNames:q,samplers:W,defines:Q,maxSimultaneousLights:this._maxSimultaneousLights});var he={};this.customShaderNameResolve&&(H=this.customShaderNameResolve(H,Z,q,W,Q,k,he));var ge=Q.toString(),me=$.effect,_e=G.getEngine().createEffect(H,{attributes:k,uniformsNames:Z,uniformBuffersNames:q,samplers:W,defines:ge,fallbacks:Y,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:Q.NUM_MORPH_INFLUENCERS},processFinalCode:he.processFinalCode,multiTarget:Q.PREPASS},oe);if(_e)if(this._onEffectCreatedObservable&&(te.effect=_e,te.subMesh=$,this._onEffectCreatedObservable.notifyObservers(te)),this.allowShaderHotSwapping&&me&&!_e.isReady()){if(_e=me,this._rebuildInParallel=!0,Q.markAsUnprocessed(),re)return Q._areLightsDisposed=!0,!1}else this._rebuildInParallel=!1,G.resetCachedMaterial(),$.setEffect(_e,Q),this.buildUniformLayout()}return!(!$.effect||!$.effect.isReady())&&(Q._renderId=G.getRenderId(),$.effect._wasPreviouslyReady=!0,!0)},ee.prototype.buildUniformLayout=function(){var K=this._uniformBuffer;K.addUniform("diffuseLeftColor",4),K.addUniform("diffuseRightColor",4),K.addUniform("opacityParts",4),K.addUniform("reflectionLeftColor",4),K.addUniform("reflectionRightColor",4),K.addUniform("refractionLeftColor",4),K.addUniform("refractionRightColor",4),K.addUniform("emissiveLeftColor",4),K.addUniform("emissiveRightColor",4),K.addUniform("vDiffuseInfos",2),K.addUniform("vAmbientInfos",2),K.addUniform("vOpacityInfos",2),K.addUniform("vReflectionInfos",2),K.addUniform("vReflectionPosition",3),K.addUniform("vReflectionSize",3),K.addUniform("vEmissiveInfos",2),K.addUniform("vLightmapInfos",2),K.addUniform("vSpecularInfos",2),K.addUniform("vBumpInfos",3),K.addUniform("diffuseMatrix",16),K.addUniform("ambientMatrix",16),K.addUniform("opacityMatrix",16),K.addUniform("reflectionMatrix",16),K.addUniform("emissiveMatrix",16),K.addUniform("lightmapMatrix",16),K.addUniform("specularMatrix",16),K.addUniform("bumpMatrix",16),K.addUniform("vTangentSpaceParams",2),K.addUniform("pointSize",1),K.addUniform("refractionMatrix",16),K.addUniform("vRefractionInfos",4),K.addUniform("vSpecularColor",4),K.addUniform("vEmissiveColor",3),K.addUniform("visibility",1),K.addUniform("vDiffuseColor",4),ne.a.PrepareUniformBuffer(K),K.create()},ee.prototype.unbind=function(){if(this._activeEffect){var K=!1;this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&(this._activeEffect.setTexture("reflection2DSampler",null),K=!0),this._refractionTexture&&this._refractionTexture.isRenderTarget&&(this._activeEffect.setTexture("refraction2DSampler",null),K=!0),K&&this._markAllSubMeshesAsTexturesDirty()}ae.prototype.unbind.call(this)},ee.prototype.bindForSubMesh=function(K,$,L){var G=this.getScene(),Q=L._materialDefines;if(Q){var oe=L.effect;if(oe){this._activeEffect=oe,Q.INSTANCES&&!Q.THIN_INSTANCES||this.bindOnlyWorldMatrix(K),this.prePassConfiguration.bindForSubMesh(this._activeEffect,G,$,K,this.isFrozen),Q.OBJECTSPACE_NORMALMAP&&(K.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var re=this._mustRebind(G,oe,$.visibility);g.a.BindBonesParameters($,oe);var Y=this._uniformBuffer;if(re){if(Y.bindToEffect(oe,"Material"),this.bindViewProjection(oe),!Y.useUbo||!this.isFrozen||!Y.isSync){if(ee.FresnelEnabled&&Q.FRESNEL&&(this.diffuseFresnelParameters&&this.diffuseFresnelParameters.isEnabled&&(Y.updateColor4("diffuseLeftColor",this.diffuseFresnelParameters.leftColor,this.diffuseFresnelParameters.power),Y.updateColor4("diffuseRightColor",this.diffuseFresnelParameters.rightColor,this.diffuseFresnelParameters.bias)),this.opacityFresnelParameters&&this.opacityFresnelParameters.isEnabled&&Y.updateColor4("opacityParts",new R.a(this.opacityFresnelParameters.leftColor.toLuminance(),this.opacityFresnelParameters.rightColor.toLuminance(),this.opacityFresnelParameters.bias),this.opacityFresnelParameters.power),this.reflectionFresnelParameters&&this.reflectionFresnelParameters.isEnabled&&(Y.updateColor4("reflectionLeftColor",this.reflectionFresnelParameters.leftColor,this.reflectionFresnelParameters.power),Y.updateColor4("reflectionRightColor",this.reflectionFresnelParameters.rightColor,this.reflectionFresnelParameters.bias)),this.refractionFresnelParameters&&this.refractionFresnelParameters.isEnabled&&(Y.updateColor4("refractionLeftColor",this.refractionFresnelParameters.leftColor,this.refractionFresnelParameters.power),Y.updateColor4("refractionRightColor",this.refractionFresnelParameters.rightColor,this.refractionFresnelParameters.bias)),this.emissiveFresnelParameters&&this.emissiveFresnelParameters.isEnabled&&(Y.updateColor4("emissiveLeftColor",this.emissiveFresnelParameters.leftColor,this.emissiveFresnelParameters.power),Y.updateColor4("emissiveRightColor",this.emissiveFresnelParameters.rightColor,this.emissiveFresnelParameters.bias))),G.texturesEnabled){if(this._diffuseTexture&&ee.DiffuseTextureEnabled&&(Y.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),g.a.BindTextureMatrix(this._diffuseTexture,Y,"diffuse")),this._ambientTexture&&ee.AmbientTextureEnabled&&(Y.updateFloat2("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level),g.a.BindTextureMatrix(this._ambientTexture,Y,"ambient")),this._opacityTexture&&ee.OpacityTextureEnabled&&(Y.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),g.a.BindTextureMatrix(this._opacityTexture,Y,"opacity")),this._hasAlphaChannel()&&oe.setFloat("alphaCutOff",this.alphaCutOff),this._reflectionTexture&&ee.ReflectionTextureEnabled&&(Y.updateFloat2("vReflectionInfos",this._reflectionTexture.level,this.roughness),Y.updateMatrix("reflectionMatrix",this._reflectionTexture.getReflectionTextureMatrix()),this._reflectionTexture.boundingBoxSize)){var k=this._reflectionTexture;Y.updateVector3("vReflectionPosition",k.boundingBoxPosition),Y.updateVector3("vReflectionSize",k.boundingBoxSize)}if(this._emissiveTexture&&ee.EmissiveTextureEnabled&&(Y.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),g.a.BindTextureMatrix(this._emissiveTexture,Y,"emissive")),this._lightmapTexture&&ee.LightmapTextureEnabled&&(Y.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),g.a.BindTextureMatrix(this._lightmapTexture,Y,"lightmap")),this._specularTexture&&ee.SpecularTextureEnabled&&(Y.updateFloat2("vSpecularInfos",this._specularTexture.coordinatesIndex,this._specularTexture.level),g.a.BindTextureMatrix(this._specularTexture,Y,"specular")),this._bumpTexture&&G.getEngine().getCaps().standardDerivatives&&ee.BumpTextureEnabled&&(Y.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,1/this._bumpTexture.level,this.parallaxScaleBias),g.a.BindTextureMatrix(this._bumpTexture,Y,"bump"),G._mirroredCameraPosition?Y.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):Y.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),this._refractionTexture&&ee.RefractionTextureEnabled){var H=1;this._refractionTexture.isCube||(Y.updateMatrix("refractionMatrix",this._refractionTexture.getReflectionTextureMatrix()),this._refractionTexture.depth&&(H=this._refractionTexture.depth)),Y.updateFloat4("vRefractionInfos",this._refractionTexture.level,this.indexOfRefraction,H,this.invertRefractionY?-1:1)}}this.pointsCloud&&Y.updateFloat("pointSize",this.pointSize),Q.SPECULARTERM&&Y.updateColor4("vSpecularColor",this.specularColor,this.specularPower),Y.updateColor3("vEmissiveColor",ee.EmissiveTextureEnabled?this.emissiveColor:R.a.BlackReadOnly),Y.updateColor4("vDiffuseColor",this.diffuseColor,this.alpha)}Y.updateFloat("visibility",$.visibility),G.texturesEnabled&&(this._diffuseTexture&&ee.DiffuseTextureEnabled&&oe.setTexture("diffuseSampler",this._diffuseTexture),this._ambientTexture&&ee.AmbientTextureEnabled&&oe.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&ee.OpacityTextureEnabled&&oe.setTexture("opacitySampler",this._opacityTexture),this._reflectionTexture&&ee.ReflectionTextureEnabled&&(this._reflectionTexture.isCube?oe.setTexture("reflectionCubeSampler",this._reflectionTexture):oe.setTexture("reflection2DSampler",this._reflectionTexture)),this._emissiveTexture&&ee.EmissiveTextureEnabled&&oe.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&ee.LightmapTextureEnabled&&oe.setTexture("lightmapSampler",this._lightmapTexture),this._specularTexture&&ee.SpecularTextureEnabled&&oe.setTexture("specularSampler",this._specularTexture),this._bumpTexture&&G.getEngine().getCaps().standardDerivatives&&ee.BumpTextureEnabled&&oe.setTexture("bumpSampler",this._bumpTexture),this._refractionTexture&&ee.RefractionTextureEnabled)&&(H=1,this._refractionTexture.isCube?oe.setTexture("refractionCubeSampler",this._refractionTexture):oe.setTexture("refraction2DSampler",this._refractionTexture)),this.detailMap.bindForSubMesh(Y,G,this.isFrozen),g.a.BindClipPlane(oe,G),G.ambientColor.multiplyToRef(this.ambientColor,this._globalAmbientColor),g.a.BindEyePosition(oe,G),oe.setColor3("vAmbientColor",this._globalAmbientColor)}!re&&this.isFrozen||(G.lightsEnabled&&!this._disableLighting&&g.a.BindLights(G,$,oe,Q,this._maxSimultaneousLights,this._rebuildInParallel),(G.fogEnabled&&$.applyFog&&G.fogMode!==l.a.FOGMODE_NONE||this._reflectionTexture||this._refractionTexture)&&this.bindView(oe),g.a.BindFogParameters(G,$,oe),Q.NUM_MORPH_INFLUENCERS&&g.a.BindMorphTargetParameters($,oe),this.useLogarithmicDepth&&g.a.BindLogDepth(Q,oe,G),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(this._activeEffect)),Y.update(),this._afterBind($,this._activeEffect)}}},ee.prototype.getAnimatables=function(){var K=[];return this._diffuseTexture&&this._diffuseTexture.animations&&this._diffuseTexture.animations.length>0&&K.push(this._diffuseTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&K.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&K.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&K.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&K.push(this._emissiveTexture),this._specularTexture&&this._specularTexture.animations&&this._specularTexture.animations.length>0&&K.push(this._specularTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&K.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&K.push(this._lightmapTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&K.push(this._refractionTexture),this.detailMap.getAnimatables(K),K},ee.prototype.getActiveTextures=function(){var K=ae.prototype.getActiveTextures.call(this);return this._diffuseTexture&&K.push(this._diffuseTexture),this._ambientTexture&&K.push(this._ambientTexture),this._opacityTexture&&K.push(this._opacityTexture),this._reflectionTexture&&K.push(this._reflectionTexture),this._emissiveTexture&&K.push(this._emissiveTexture),this._specularTexture&&K.push(this._specularTexture),this._bumpTexture&&K.push(this._bumpTexture),this._lightmapTexture&&K.push(this._lightmapTexture),this._refractionTexture&&K.push(this._refractionTexture),this.detailMap.getActiveTextures(K),K},ee.prototype.hasTexture=function(K){return!!ae.prototype.hasTexture.call(this,K)||this._diffuseTexture===K||this._ambientTexture===K||this._opacityTexture===K||this._reflectionTexture===K||this._emissiveTexture===K||this._specularTexture===K||this._bumpTexture===K||this._lightmapTexture===K||this._refractionTexture===K||this.detailMap.hasTexture(K)},ee.prototype.dispose=function(K,$){var L,G,Q,oe,re,Y,k,H,Z;$&&((L=this._diffuseTexture)===null||L===void 0||L.dispose(),(G=this._ambientTexture)===null||G===void 0||G.dispose(),(Q=this._opacityTexture)===null||Q===void 0||Q.dispose(),(oe=this._reflectionTexture)===null||oe===void 0||oe.dispose(),(re=this._emissiveTexture)===null||re===void 0||re.dispose(),(Y=this._specularTexture)===null||Y===void 0||Y.dispose(),(k=this._bumpTexture)===null||k===void 0||k.dispose(),(H=this._lightmapTexture)===null||H===void 0||H.dispose(),(Z=this._refractionTexture)===null||Z===void 0||Z.dispose()),this.detailMap.dispose($),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),ae.prototype.dispose.call(this,K,$)},ee.prototype.clone=function(K){var $=this,L=_.a.Clone(function(){return new ee(K,$.getScene())},this);return L.name=K,L.id=K,L},ee.prototype.serialize=function(){return _.a.Serialize(this)},ee.Parse=function(K,$,L){return _.a.Parse(function(){return new ee(K.name,$)},K,$,L)},Object.defineProperty(ee,"DiffuseTextureEnabled",{get:function(){return b.a.DiffuseTextureEnabled},set:function(K){b.a.DiffuseTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"DetailTextureEnabled",{get:function(){return b.a.DetailTextureEnabled},set:function(K){b.a.DetailTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"AmbientTextureEnabled",{get:function(){return b.a.AmbientTextureEnabled},set:function(K){b.a.AmbientTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"OpacityTextureEnabled",{get:function(){return b.a.OpacityTextureEnabled},set:function(K){b.a.OpacityTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"ReflectionTextureEnabled",{get:function(){return b.a.ReflectionTextureEnabled},set:function(K){b.a.ReflectionTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"EmissiveTextureEnabled",{get:function(){return b.a.EmissiveTextureEnabled},set:function(K){b.a.EmissiveTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"SpecularTextureEnabled",{get:function(){return b.a.SpecularTextureEnabled},set:function(K){b.a.SpecularTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"BumpTextureEnabled",{get:function(){return b.a.BumpTextureEnabled},set:function(K){b.a.BumpTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"LightmapTextureEnabled",{get:function(){return b.a.LightmapTextureEnabled},set:function(K){b.a.LightmapTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"RefractionTextureEnabled",{get:function(){return b.a.RefractionTextureEnabled},set:function(K){b.a.RefractionTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"ColorGradingTextureEnabled",{get:function(){return b.a.ColorGradingTextureEnabled},set:function(K){b.a.ColorGradingTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"FresnelEnabled",{get:function(){return b.a.FresnelEnabled},set:function(K){b.a.FresnelEnabled=K},enumerable:!1,configurable:!0}),Object(B.c)([Object(_.m)("diffuseTexture")],ee.prototype,"_diffuseTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"diffuseTexture",void 0),Object(B.c)([Object(_.m)("ambientTexture")],ee.prototype,"_ambientTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"ambientTexture",void 0),Object(B.c)([Object(_.m)("opacityTexture")],ee.prototype,"_opacityTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"opacityTexture",void 0),Object(B.c)([Object(_.m)("reflectionTexture")],ee.prototype,"_reflectionTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"reflectionTexture",void 0),Object(B.c)([Object(_.m)("emissiveTexture")],ee.prototype,"_emissiveTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"emissiveTexture",void 0),Object(B.c)([Object(_.m)("specularTexture")],ee.prototype,"_specularTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"specularTexture",void 0),Object(B.c)([Object(_.m)("bumpTexture")],ee.prototype,"_bumpTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"bumpTexture",void 0),Object(B.c)([Object(_.m)("lightmapTexture")],ee.prototype,"_lightmapTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"lightmapTexture",void 0),Object(B.c)([Object(_.m)("refractionTexture")],ee.prototype,"_refractionTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"refractionTexture",void 0),Object(B.c)([Object(_.e)("ambient")],ee.prototype,"ambientColor",void 0),Object(B.c)([Object(_.e)("diffuse")],ee.prototype,"diffuseColor",void 0),Object(B.c)([Object(_.e)("specular")],ee.prototype,"specularColor",void 0),Object(B.c)([Object(_.e)("emissive")],ee.prototype,"emissiveColor",void 0),Object(B.c)([Object(_.c)()],ee.prototype,"specularPower",void 0),Object(B.c)([Object(_.c)("useAlphaFromDiffuseTexture")],ee.prototype,"_useAlphaFromDiffuseTexture",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"useAlphaFromDiffuseTexture",void 0),Object(B.c)([Object(_.c)("useEmissiveAsIllumination")],ee.prototype,"_useEmissiveAsIllumination",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useEmissiveAsIllumination",void 0),Object(B.c)([Object(_.c)("linkEmissiveWithDiffuse")],ee.prototype,"_linkEmissiveWithDiffuse",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"linkEmissiveWithDiffuse",void 0),Object(B.c)([Object(_.c)("useSpecularOverAlpha")],ee.prototype,"_useSpecularOverAlpha",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useSpecularOverAlpha",void 0),Object(B.c)([Object(_.c)("useReflectionOverAlpha")],ee.prototype,"_useReflectionOverAlpha",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useReflectionOverAlpha",void 0),Object(B.c)([Object(_.c)("disableLighting")],ee.prototype,"_disableLighting",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsLightsDirty")],ee.prototype,"disableLighting",void 0),Object(B.c)([Object(_.c)("useObjectSpaceNormalMap")],ee.prototype,"_useObjectSpaceNormalMap",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useObjectSpaceNormalMap",void 0),Object(B.c)([Object(_.c)("useParallax")],ee.prototype,"_useParallax",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useParallax",void 0),Object(B.c)([Object(_.c)("useParallaxOcclusion")],ee.prototype,"_useParallaxOcclusion",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useParallaxOcclusion",void 0),Object(B.c)([Object(_.c)()],ee.prototype,"parallaxScaleBias",void 0),Object(B.c)([Object(_.c)("roughness")],ee.prototype,"_roughness",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"roughness",void 0),Object(B.c)([Object(_.c)()],ee.prototype,"indexOfRefraction",void 0),Object(B.c)([Object(_.c)()],ee.prototype,"invertRefractionY",void 0),Object(B.c)([Object(_.c)()],ee.prototype,"alphaCutOff",void 0),Object(B.c)([Object(_.c)("useLightmapAsShadowmap")],ee.prototype,"_useLightmapAsShadowmap",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useLightmapAsShadowmap",void 0),Object(B.c)([Object(_.h)("diffuseFresnelParameters")],ee.prototype,"_diffuseFresnelParameters",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"diffuseFresnelParameters",void 0),Object(B.c)([Object(_.h)("opacityFresnelParameters")],ee.prototype,"_opacityFresnelParameters",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsFresnelAndMiscDirty")],ee.prototype,"opacityFresnelParameters",void 0),Object(B.c)([Object(_.h)("reflectionFresnelParameters")],ee.prototype,"_reflectionFresnelParameters",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"reflectionFresnelParameters",void 0),Object(B.c)([Object(_.h)("refractionFresnelParameters")],ee.prototype,"_refractionFresnelParameters",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"refractionFresnelParameters",void 0),Object(B.c)([Object(_.h)("emissiveFresnelParameters")],ee.prototype,"_emissiveFresnelParameters",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"emissiveFresnelParameters",void 0),Object(B.c)([Object(_.c)("useReflectionFresnelFromSpecular")],ee.prototype,"_useReflectionFresnelFromSpecular",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"useReflectionFresnelFromSpecular",void 0),Object(B.c)([Object(_.c)("useGlossinessFromSpecularMapAlpha")],ee.prototype,"_useGlossinessFromSpecularMapAlpha",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useGlossinessFromSpecularMapAlpha",void 0),Object(B.c)([Object(_.c)("maxSimultaneousLights")],ee.prototype,"_maxSimultaneousLights",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsLightsDirty")],ee.prototype,"maxSimultaneousLights",void 0),Object(B.c)([Object(_.c)("invertNormalMapX")],ee.prototype,"_invertNormalMapX",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"invertNormalMapX",void 0),Object(B.c)([Object(_.c)("invertNormalMapY")],ee.prototype,"_invertNormalMapY",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"invertNormalMapY",void 0),Object(B.c)([Object(_.c)("twoSidedLighting")],ee.prototype,"_twoSidedLighting",void 0),Object(B.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"twoSidedLighting",void 0),Object(B.c)([Object(_.c)()],ee.prototype,"useLogarithmicDepth",null),ee}(S.a);h.a.RegisteredTypes["BABYLON.StandardMaterial"]=pe,l.a.DefaultMaterialFactory=function(ae){return new pe("default material",ae)}},function(Ae,v,f){f.d(v,"a",function(){return I});var B=f(1),_=f(12),P=f(6),l=f(0),O=f(13),R=f(4),x=f(16),m=f(46),c=f(54),T=f(43),A=f(2),S=f(147),g=f(21),u=f(101),h=f(9),b=f(28),E=f(23),D=f(11),w=function(){this.facetNb=0,this.partitioningSubdivisions=10,this.partitioningBBoxRatio=1.01,this.facetDataEnabled=!1,this.facetParameters={},this.bbSize=l.e.Zero(),this.subDiv={max:1,X:1,Y:1,Z:1},this.facetDepthSort=!1,this.facetDepthSortEnabled=!1},N=function(){this._hasVertexAlpha=!1,this._useVertexColors=!0,this._numBoneInfluencers=4,this._applyFog=!0,this._receiveShadows=!1,this._facetData=new w,this._visibility=1,this._skeleton=null,this._layerMask=268435455,this._computeBonesUsingShaders=!0,this._isActive=!1,this._onlyForInstances=!1,this._isActiveIntermediate=!1,this._onlyForInstancesIntermediate=!1,this._actAsRegularMesh=!1,this._currentLOD=null,this._currentLODIsUpToDate=!1},I=function(V){function X(j,ne){ne===void 0&&(ne=null);var te=V.call(this,j,ne,!1)||this;return te._internalAbstractMeshDataInfo=new N,te.cullingStrategy=X.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY,te.onCollideObservable=new P.c,te.onCollisionPositionChangeObservable=new P.c,te.onMaterialChangedObservable=new P.c,te.definedFacingForward=!0,te._occlusionQuery=null,te._renderingGroup=null,te.alphaIndex=Number.MAX_VALUE,te.isVisible=!0,te.isPickable=!0,te.showSubMeshesBoundingBox=!1,te.isBlocker=!1,te.enablePointerMoveEvents=!1,te._renderingGroupId=0,te._material=null,te.outlineColor=h.a.Red(),te.outlineWidth=.02,te.overlayColor=h.a.Red(),te.overlayAlpha=.5,te.useOctreeForRenderingSelection=!0,te.useOctreeForPicking=!0,te.useOctreeForCollisions=!0,te.alwaysSelectAsActiveMesh=!1,te.doNotSyncBoundingInfo=!1,te.actionManager=null,te._meshCollisionData=new S.a,te.ellipsoid=new l.e(.5,1,.5),te.ellipsoidOffset=new l.e(0,0,0),te.edgesWidth=1,te.edgesColor=new h.b(1,0,0,1),te._edgesRenderer=null,te._masterMesh=null,te._boundingInfo=null,te._renderId=0,te._intersectionsInProgress=new Array,te._unIndexed=!1,te._lightSources=new Array,te._waitingData={lods:null,actions:null,freezeWorldMatrix:null},te._bonesTransformMatrices=null,te._transformMatrixTexture=null,te.onRebuildObservable=new P.c,te._onCollisionPositionChange=function(de,pe,ae){ae===void 0&&(ae=null),pe.subtractToRef(te._meshCollisionData._oldPositionForCollisions,te._meshCollisionData._diffPositionForCollisions),te._meshCollisionData._diffPositionForCollisions.length()>O.a.CollisionsEpsilon&&te.position.addInPlace(te._meshCollisionData._diffPositionForCollisions),ae&&te.onCollideObservable.notifyObservers(ae),te.onCollisionPositionChangeObservable.notifyObservers(te.position)},te.getScene().addMesh(te),te._resyncLightSources(),te}return Object(B.d)(X,V),Object.defineProperty(X,"BILLBOARDMODE_NONE",{get:function(){return m.a.BILLBOARDMODE_NONE},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_X",{get:function(){return m.a.BILLBOARDMODE_X},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_Y",{get:function(){return m.a.BILLBOARDMODE_Y},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_Z",{get:function(){return m.a.BILLBOARDMODE_Z},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_ALL",{get:function(){return m.a.BILLBOARDMODE_ALL},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_USE_POSITION",{get:function(){return m.a.BILLBOARDMODE_USE_POSITION},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"facetNb",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetNb},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"partitioningSubdivisions",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions},set:function(j){this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"partitioningBBoxRatio",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio},set:function(j){this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"mustDepthSortFacets",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSort},set:function(j){this._internalAbstractMeshDataInfo._facetData.facetDepthSort=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"facetDepthSortFrom",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom},set:function(j){this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isFacetDataEnabled",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDataEnabled},enumerable:!1,configurable:!0}),X.prototype._updateNonUniformScalingState=function(j){return!!V.prototype._updateNonUniformScalingState.call(this,j)&&(this._markSubMeshesAsMiscDirty(),!0)},Object.defineProperty(X.prototype,"onCollide",{set:function(j){this._meshCollisionData._onCollideObserver&&this.onCollideObservable.remove(this._meshCollisionData._onCollideObserver),this._meshCollisionData._onCollideObserver=this.onCollideObservable.add(j)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"onCollisionPositionChange",{set:function(j){this._meshCollisionData._onCollisionPositionChangeObserver&&this.onCollisionPositionChangeObservable.remove(this._meshCollisionData._onCollisionPositionChangeObserver),this._meshCollisionData._onCollisionPositionChangeObserver=this.onCollisionPositionChangeObservable.add(j)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"visibility",{get:function(){return this._internalAbstractMeshDataInfo._visibility},set:function(j){this._internalAbstractMeshDataInfo._visibility!==j&&(this._internalAbstractMeshDataInfo._visibility=j,this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"renderingGroupId",{get:function(){return this._renderingGroupId},set:function(j){this._renderingGroupId=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"material",{get:function(){return this._material},set:function(j){this._material!==j&&(this._material&&this._material.meshMap&&(this._material.meshMap[this.uniqueId]=void 0),this._material=j,j&&j.meshMap&&(j.meshMap[this.uniqueId]=this),this.onMaterialChangedObservable.hasObservers()&&this.onMaterialChangedObservable.notifyObservers(this),this.subMeshes&&this._unBindEffect())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"receiveShadows",{get:function(){return this._internalAbstractMeshDataInfo._receiveShadows},set:function(j){this._internalAbstractMeshDataInfo._receiveShadows!==j&&(this._internalAbstractMeshDataInfo._receiveShadows=j,this._markSubMeshesAsLightDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"hasVertexAlpha",{get:function(){return this._internalAbstractMeshDataInfo._hasVertexAlpha},set:function(j){this._internalAbstractMeshDataInfo._hasVertexAlpha!==j&&(this._internalAbstractMeshDataInfo._hasVertexAlpha=j,this._markSubMeshesAsAttributesDirty(),this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"useVertexColors",{get:function(){return this._internalAbstractMeshDataInfo._useVertexColors},set:function(j){this._internalAbstractMeshDataInfo._useVertexColors!==j&&(this._internalAbstractMeshDataInfo._useVertexColors=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"computeBonesUsingShaders",{get:function(){return this._internalAbstractMeshDataInfo._computeBonesUsingShaders},set:function(j){this._internalAbstractMeshDataInfo._computeBonesUsingShaders!==j&&(this._internalAbstractMeshDataInfo._computeBonesUsingShaders=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"numBoneInfluencers",{get:function(){return this._internalAbstractMeshDataInfo._numBoneInfluencers},set:function(j){this._internalAbstractMeshDataInfo._numBoneInfluencers!==j&&(this._internalAbstractMeshDataInfo._numBoneInfluencers=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"applyFog",{get:function(){return this._internalAbstractMeshDataInfo._applyFog},set:function(j){this._internalAbstractMeshDataInfo._applyFog!==j&&(this._internalAbstractMeshDataInfo._applyFog=j,this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"layerMask",{get:function(){return this._internalAbstractMeshDataInfo._layerMask},set:function(j){j!==this._internalAbstractMeshDataInfo._layerMask&&(this._internalAbstractMeshDataInfo._layerMask=j,this._resyncLightSources())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionMask",{get:function(){return this._meshCollisionData._collisionMask},set:function(j){this._meshCollisionData._collisionMask=isNaN(j)?-1:j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionResponse",{get:function(){return this._meshCollisionData._collisionResponse},set:function(j){this._meshCollisionData._collisionResponse=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionGroup",{get:function(){return this._meshCollisionData._collisionGroup},set:function(j){this._meshCollisionData._collisionGroup=isNaN(j)?-1:j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"surroundingMeshes",{get:function(){return this._meshCollisionData._surroundingMeshes},set:function(j){this._meshCollisionData._surroundingMeshes=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"lightSources",{get:function(){return this._lightSources},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"_positions",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"skeleton",{get:function(){return this._internalAbstractMeshDataInfo._skeleton},set:function(j){var ne=this._internalAbstractMeshDataInfo._skeleton;ne&&ne.needInitialSkinMatrix&&ne._unregisterMeshWithPoseMatrix(this),j&&j.needInitialSkinMatrix&&j._registerMeshWithPoseMatrix(this),this._internalAbstractMeshDataInfo._skeleton=j,this._internalAbstractMeshDataInfo._skeleton||(this._bonesTransformMatrices=null),this._markSubMeshesAsAttributesDirty()},enumerable:!1,configurable:!0}),X.prototype.getClassName=function(){return"AbstractMesh"},X.prototype.toString=function(j){var ne="Name: "+this.name+", isInstance: "+(this.getClassName()!=="InstancedMesh"?"YES":"NO");ne+=", # of submeshes: "+(this.subMeshes?this.subMeshes.length:0);var te=this._internalAbstractMeshDataInfo._skeleton;return te&&(ne+=", skeleton: "+te.name),j&&(ne+=", billboard mode: "+["NONE","X","Y",null,"Z",null,null,"ALL"][this.billboardMode],ne+=", freeze wrld mat: "+(this._isWorldMatrixFrozen||this._waitingData.freezeWorldMatrix?"YES":"NO")),ne},X.prototype._getEffectiveParent=function(){return this._masterMesh&&this.billboardMode!==m.a.BILLBOARDMODE_NONE?this._masterMesh:V.prototype._getEffectiveParent.call(this)},X.prototype._getActionManagerForTrigger=function(j,ne){if(ne===void 0&&(ne=!0),this.actionManager&&(ne||this.actionManager.isRecursive)){if(!j)return this.actionManager;if(this.actionManager.hasSpecificTrigger(j))return this.actionManager}return this.parent?this.parent._getActionManagerForTrigger(j,!1):null},X.prototype._rebuild=function(){if(this.onRebuildObservable.notifyObservers(this),this._occlusionQuery&&(this._occlusionQuery=null),this.subMeshes)for(var j=0,ne=this.subMeshes;j4,ae=pe?this.getVerticesData(R.b.MatricesIndicesExtraKind):null,ee=pe?this.getVerticesData(R.b.MatricesWeightsExtraKind):null;this.skeleton.prepare();for(var K=this.skeleton.getTransformMatrices(this),$=l.c.Vector3[0],L=l.c.Matrix[0],G=l.c.Matrix[1],Q=0,oe=0;oe0&&(l.a.FromFloat32ArrayToRefScaled(K,Math.floor(16*te[Q+re]),Y,G),L.addToSelf(G));if(pe)for(re=0;re<4;re++)(Y=ee[Q+re])>0&&(l.a.FromFloat32ArrayToRefScaled(K,Math.floor(16*ae[Q+re]),Y,G),L.addToSelf(G));l.e.TransformCoordinatesFromFloatsToRef(ne[oe],ne[oe+1],ne[oe+2],L,$),$.toArray(ne,oe),this._positions&&this._positions[oe/3].copyFrom($)}}}return ne},X.prototype._updateBoundingInfo=function(){var j=this._effectiveMesh;return this._boundingInfo?this._boundingInfo.update(j.worldMatrixFromCache):this._boundingInfo=new T.a(this.absolutePosition,this.absolutePosition,j.worldMatrixFromCache),this._updateSubMeshesBoundingInfo(j.worldMatrixFromCache),this},X.prototype._updateSubMeshesBoundingInfo=function(j){if(!this.subMeshes)return this;for(var ne=this.subMeshes.length,te=0;te1||!de.IsGlobal)&&de.updateBoundingInfo(j)}return this},X.prototype._afterComputeWorldMatrix=function(){this.doNotSyncBoundingInfo||this._updateBoundingInfo()},Object.defineProperty(X.prototype,"_effectiveMesh",{get:function(){return this.skeleton&&this.skeleton.overrideMesh||this},enumerable:!1,configurable:!0}),X.prototype.isInFrustum=function(j){return this._boundingInfo!==null&&this._boundingInfo.isInFrustum(j,this.cullingStrategy)},X.prototype.isCompletelyInFrustum=function(j){return this._boundingInfo!==null&&this._boundingInfo.isCompletelyInFrustum(j)},X.prototype.intersectsMesh=function(j,ne,te){if(ne===void 0&&(ne=!1),!this._boundingInfo||!j._boundingInfo)return!1;if(this._boundingInfo.intersects(j._boundingInfo,ne))return!0;if(te){for(var de=0,pe=this.getChildMeshes();de1&&!ae._checkCollision(j)||this._collideForSubMesh(ae,ne,j)}return this},X.prototype._checkCollision=function(j){if(!this._boundingInfo||!this._boundingInfo._checkCollision(j))return this;var ne=l.c.Matrix[0],te=l.c.Matrix[1];return l.a.ScalingToRef(1/j._radius.x,1/j._radius.y,1/j._radius.z,ne),this.worldMatrixFromCache.multiplyToRef(ne,te),this._processCollisionsForSubMeshes(j,te),this},X.prototype._generatePointsArray=function(){return!1},X.prototype.intersects=function(j,ne,te,de,pe,ae){var ee;de===void 0&&(de=!1),ae===void 0&&(ae=!1);var K=new c.a,$=this.getClassName()==="InstancedLinesMesh"||this.getClassName()==="LinesMesh"?this.intersectionThreshold:0,L=this._boundingInfo;if(!this.subMeshes||!L||!(ae||j.intersectsSphere(L.boundingSphere,$)&&j.intersectsBox(L.boundingBox,$)))return K;if(de)return K.hit=!ae,K.pickedMesh=ae?null:this,K.distance=ae?0:l.e.Distance(j.origin,L.boundingSphere.center),K.subMeshId=0,K;if(!this._generatePointsArray())return K;for(var G=null,Q=this._scene.getIntersectingSubMeshCandidates(this,j),oe=Q.length,re=!1,Y=0;Y1)||H.canIntersects(j)){var Z=H.intersects(j,this._positions,this.getIndices(),ne,te);if(Z&&(ne||!G||Z.distance65535){ae=!0;break}j.depthSortedIndices=ae?new Uint32Array(te):new Uint16Array(te)}if(j.facetDepthSortFunction=function(re,Y){return Y.sqDistance-re.sqDistance},!j.facetDepthSortFrom){var K=this.getScene().activeCamera;j.facetDepthSortFrom=K?K.position:l.e.Zero()}j.depthSortedFacets=[];for(var $=0;$b.a?pe.maximum.x-pe.minimum.x:b.a,j.bbSize.y=pe.maximum.y-pe.minimum.y>b.a?pe.maximum.y-pe.minimum.y:b.a,j.bbSize.z=pe.maximum.z-pe.minimum.z>b.a?pe.maximum.z-pe.minimum.z:b.a;var G=j.bbSize.x>j.bbSize.y?j.bbSize.x:j.bbSize.y;if(G=G>j.bbSize.z?G:j.bbSize.z,j.subDiv.max=j.partitioningSubdivisions,j.subDiv.X=Math.floor(j.subDiv.max*j.bbSize.x/G),j.subDiv.Y=Math.floor(j.subDiv.max*j.bbSize.y/G),j.subDiv.Z=Math.floor(j.subDiv.max*j.bbSize.z/G),j.subDiv.X=j.subDiv.X<1?1:j.subDiv.X,j.subDiv.Y=j.subDiv.Y<1?1:j.subDiv.Y,j.subDiv.Z=j.subDiv.Z<1?1:j.subDiv.Z,j.facetParameters.facetNormals=this.getFacetLocalNormals(),j.facetParameters.facetPositions=this.getFacetLocalPositions(),j.facetParameters.facetPartitioning=this.getFacetLocalPartitioning(),j.facetParameters.bInfo=pe,j.facetParameters.bbSize=j.bbSize,j.facetParameters.subDiv=j.subDiv,j.facetParameters.ratio=this.partitioningBBoxRatio,j.facetParameters.depthSort=j.facetDepthSort,j.facetDepthSort&&j.facetDepthSortEnabled&&(this.computeWorldMatrix(!0),this._worldMatrix.invertToRef(j.invertedMatrix),l.e.TransformCoordinatesToRef(j.facetDepthSortFrom,j.invertedMatrix,j.facetDepthSortOrigin),j.facetParameters.distanceTo=j.facetDepthSortOrigin),j.facetParameters.depthSortedFacets=j.depthSortedFacets,x.a.ComputeNormals(ne,te,de,j.facetParameters),j.facetDepthSort&&j.facetDepthSortEnabled){j.depthSortedFacets.sort(j.facetDepthSortFunction);var Q=j.depthSortedIndices.length/3|0;for($=0;$pe.subDiv.max||ee<0||ee>pe.subDiv.max||K<0||K>pe.subDiv.max?null:pe.facetPartitioning[ae+pe.subDiv.max*ee+pe.subDiv.max*pe.subDiv.max*K]},X.prototype.getClosestFacetAtCoordinates=function(j,ne,te,de,pe,ae){pe===void 0&&(pe=!1),ae===void 0&&(ae=!0);var ee=this.getWorldMatrix(),K=l.c.Matrix[5];ee.invertToRef(K);var $=l.c.Vector3[8];l.e.TransformCoordinatesFromFloatsToRef(j,ne,te,K,$);var L=this.getClosestFacetAtLocalCoordinates($.x,$.y,$.z,de,pe,ae);return de&&l.e.TransformCoordinatesFromFloatsToRef(de.x,de.y,de.z,ee,de),L},X.prototype.getClosestFacetAtLocalCoordinates=function(j,ne,te,de,pe,ae){pe===void 0&&(pe=!1),ae===void 0&&(ae=!0);var ee=null,K=0,$=0,L=0,G=0,Q=0,oe=0,re=0,Y=0,k=this.getFacetLocalPositions(),H=this.getFacetLocalNormals(),Z=this.getFacetsAtLocalCoordinates(j,ne,te);if(!Z)return null;for(var W,q,he,ge=Number.MAX_VALUE,me=ge,_e=0;_e=0||pe&&!ae&&G<=0)&&(G=q.x*he.x+q.y*he.y+q.z*he.z,Q=-(q.x*j+q.y*ne+q.z*te-G)/(q.x*q.x+q.y*q.y+q.z*q.z),(me=(K=(oe=j+q.x*Q)-j)*K+($=(re=ne+q.y*Q)-ne)*$+(L=(Y=te+q.z*Q)-te)*L)100&&(this.soft=!0),this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine?(this.object.rotationQuaternion||(this.object.rotation?this.object.rotationQuaternion=P.b.RotationYawPitchRoll(this.object.rotation.y,this.object.rotation.x,this.object.rotation.z):this.object.rotationQuaternion=new P.b),this._options.mass=S.mass===void 0?0:S.mass,this._options.friction=S.friction===void 0?.2:S.friction,this._options.restitution=S.restitution===void 0?.2:S.restitution,this.soft&&(this._options.mass=this._options.mass>0?this._options.mass:1,this._options.pressure=S.pressure===void 0?200:S.pressure,this._options.stiffness=S.stiffness===void 0?1:S.stiffness,this._options.velocityIterations=S.velocityIterations===void 0?20:S.velocityIterations,this._options.positionIterations=S.positionIterations===void 0?20:S.positionIterations,this._options.fixedPoints=S.fixedPoints===void 0?0:S.fixedPoints,this._options.margin=S.margin===void 0?0:S.margin,this._options.damping=S.damping===void 0?0:S.damping,this._options.path=S.path===void 0?null:S.path,this._options.shape=S.shape===void 0?null:S.shape),this._joints=[],!this.object.parent||this._options.ignoreParent?this._init():this.object.parent.physicsImpostor&&B.a.Warn("You must affect impostors to children before affecting impostor to parent.")):B.a.Error("Physics not enabled. Please use scene.enablePhysics(...) before creating impostors."))):B.a.Error("No object was provided. A physics object is obligatory")}return Object.defineProperty(c.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"mass",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyMass(this):0},set:function(T){this.setMass(T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"friction",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyFriction(this):0},set:function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyFriction(this,T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"restitution",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyRestitution(this):0},set:function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyRestitution(this,T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"pressure",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.setBodyPressure?T.getBodyPressure(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyPressure&&A.setBodyPressure(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"stiffness",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyStiffness?T.getBodyStiffness(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyStiffness&&A.setBodyStiffness(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"velocityIterations",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyVelocityIterations?T.getBodyVelocityIterations(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyVelocityIterations&&A.setBodyVelocityIterations(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"positionIterations",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyPositionIterations?T.getBodyPositionIterations(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyPositionIterations&&A.setBodyPositionIterations(this,T)}},enumerable:!1,configurable:!0}),c.prototype._init=function(){this._physicsEngine&&(this._physicsEngine.removeImpostor(this),this.physicsBody=null,this._parent=this._parent||this._getPhysicsParent(),this._isDisposed||this.parent&&!this._options.ignoreParent||this._physicsEngine.addImpostor(this))},c.prototype._getPhysicsParent=function(){return this.object.parent instanceof l.a?this.object.parent.physicsImpostor:null},c.prototype.isBodyInitRequired=function(){return this._bodyUpdateRequired||!this._physicsBody&&!this._parent},c.prototype.setScalingUpdated=function(){this.forceUpdate()},c.prototype.forceUpdate=function(){this._init(),this.parent&&!this._options.ignoreParent&&this.parent.forceUpdate()},Object.defineProperty(c.prototype,"physicsBody",{get:function(){return this._parent&&!this._options.ignoreParent?this._parent.physicsBody:this._physicsBody},set:function(T){this._physicsBody&&this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this),this._physicsBody=T,this.resetUpdateFlags()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"parent",{get:function(){return!this._options.ignoreParent&&this._parent?this._parent:null},set:function(T){this._parent=T},enumerable:!1,configurable:!0}),c.prototype.resetUpdateFlags=function(){this._bodyUpdateRequired=!1},c.prototype.getObjectExtendSize=function(){if(this.object.getBoundingInfo){var T=this.object.rotationQuaternion,A=this.object.scaling.clone();this.object.rotationQuaternion=c.IDENTITY_QUATERNION;var S=this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0);S&&S.decompose(A,void 0,void 0);var g=this.object.getBoundingInfo().boundingBox.extendSize.scale(2).multiplyInPlace(A);return this.object.rotationQuaternion=T,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0),g}return c.DEFAULT_OBJECT_SIZE},c.prototype.getObjectCenter=function(){return this.object.getBoundingInfo?this.object.getBoundingInfo().boundingBox.centerWorld:this.object.position},c.prototype.getParam=function(T){return this._options[T]},c.prototype.setParam=function(T,A){this._options[T]=A,this._bodyUpdateRequired=!0},c.prototype.setMass=function(T){this.getParam("mass")!==T&&this.setParam("mass",T),this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyMass(this,T)},c.prototype.getLinearVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getLinearVelocity(this):P.e.Zero()},c.prototype.setLinearVelocity=function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setLinearVelocity(this,T)},c.prototype.getAngularVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getAngularVelocity(this):P.e.Zero()},c.prototype.setAngularVelocity=function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setAngularVelocity(this,T)},c.prototype.executeNativeFunction=function(T){this._physicsEngine&&T(this._physicsEngine.getPhysicsPlugin().world,this.physicsBody)},c.prototype.registerBeforePhysicsStep=function(T){this._onBeforePhysicsStepCallbacks.push(T)},c.prototype.unregisterBeforePhysicsStep=function(T){var A=this._onBeforePhysicsStepCallbacks.indexOf(T);A>-1?this._onBeforePhysicsStepCallbacks.splice(A,1):B.a.Warn("Function to remove was not found")},c.prototype.registerAfterPhysicsStep=function(T){this._onAfterPhysicsStepCallbacks.push(T)},c.prototype.unregisterAfterPhysicsStep=function(T){var A=this._onAfterPhysicsStepCallbacks.indexOf(T);A>-1?this._onAfterPhysicsStepCallbacks.splice(A,1):B.a.Warn("Function to remove was not found")},c.prototype.registerOnPhysicsCollide=function(T,A){var S=T instanceof Array?T:[T];this._onPhysicsCollideCallbacks.push({callback:A,otherImpostors:S})},c.prototype.unregisterOnPhysicsCollide=function(T,A){var S=T instanceof Array?T:[T],g=-1;this._onPhysicsCollideCallbacks.some(function(u,h){if(u.callback===A&&u.otherImpostors.length===S.length){var b=u.otherImpostors.every(function(E){return S.indexOf(E)>-1});return b&&(g=h),b}return!1})?this._onPhysicsCollideCallbacks.splice(g,1):B.a.Warn("Function to remove was not found")},c.prototype.getParentsRotation=function(){var T=this.object.parent;for(this._tmpQuat.copyFromFloats(0,0,0,1);T;)T.rotationQuaternion?this._tmpQuat2.copyFrom(T.rotationQuaternion):P.b.RotationYawPitchRollToRef(T.rotation.y,T.rotation.x,T.rotation.z,this._tmpQuat2),this._tmpQuat.multiplyToRef(this._tmpQuat2,this._tmpQuat),T=T.parent;return this._tmpQuat},c.prototype.applyForce=function(T,A){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyForce(this,T,A),this},c.prototype.applyImpulse=function(T,A){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyImpulse(this,T,A),this},c.prototype.createJoint=function(T,A,S){var g=new R.e(A,S);return this.addJoint(T,g),this},c.prototype.addJoint=function(T,A){return this._joints.push({otherImpostor:T,joint:A}),this._physicsEngine&&this._physicsEngine.addJoint(this,T,A),this},c.prototype.addAnchor=function(T,A,S,g,u){if(!this._physicsEngine)return this;var h=this._physicsEngine.getPhysicsPlugin();return h.appendAnchor?(this._physicsEngine&&h.appendAnchor(this,T,A,S,g,u),this):this},c.prototype.addHook=function(T,A,S,g){if(!this._physicsEngine)return this;var u=this._physicsEngine.getPhysicsPlugin();return u.appendAnchor?(this._physicsEngine&&u.appendHook(this,T,A,S,g),this):this},c.prototype.sleep=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().sleepBody(this),this},c.prototype.wakeUp=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().wakeUpBody(this),this},c.prototype.clone=function(T){return T?new c(T,this.type,this._options,this._scene):null},c.prototype.dispose=function(){var T=this;this._physicsEngine&&(this._joints.forEach(function(A){T._physicsEngine&&T._physicsEngine.removeJoint(T,A.otherImpostor,A.joint)}),this._physicsEngine.removeImpostor(this),this.parent&&this.parent.forceUpdate(),this._isDisposed=!0)},c.prototype.setDeltaPosition=function(T){this._deltaPosition.copyFrom(T)},c.prototype.setDeltaRotation=function(T){this._deltaRotation||(this._deltaRotation=new P.b),this._deltaRotation.copyFrom(T),this._deltaRotationConjugated=this._deltaRotation.conjugate()},c.prototype.getBoxSizeToRef=function(T){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().getBoxSizeToRef(this,T),this},c.prototype.getRadius=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getRadius(this):0},c.prototype.syncBoneWithImpostor=function(T,A,S,g,u){var h=c._tmpVecs[0],b=this.object;if(b.rotationQuaternion)if(u){var E=c._tmpQuat;b.rotationQuaternion.multiplyToRef(u,E),T.setRotationQuaternion(E,x.c.WORLD,A)}else T.setRotationQuaternion(b.rotationQuaternion,x.c.WORLD,A);h.x=0,h.y=0,h.z=0,S&&(h.x=S.x,h.y=S.y,h.z=S.z,T.getDirectionToRef(h,A,h),g==null&&(g=S.length()),h.x*=g,h.y*=g,h.z*=g),T.getParent()?(h.addInPlace(b.getAbsolutePosition()),T.setAbsolutePosition(h,A)):(A.setAbsolutePosition(b.getAbsolutePosition()),A.position.x-=h.x,A.position.y-=h.y,A.position.z-=h.z)},c.prototype.syncImpostorWithBone=function(T,A,S,g,u,h){var b=this.object;if(b.rotationQuaternion)if(u){var E=c._tmpQuat;T.getRotationQuaternionToRef(x.c.WORLD,A,E),E.multiplyToRef(u,b.rotationQuaternion)}else T.getRotationQuaternionToRef(x.c.WORLD,A,b.rotationQuaternion);var D=c._tmpVecs[0],w=c._tmpVecs[1];h||((h=c._tmpVecs[2]).x=0,h.y=1,h.z=0),T.getDirectionToRef(h,A,w),T.getAbsolutePositionToRef(A,D),g==null&&S&&(g=S.length()),g!=null&&(D.x+=w.x*g,D.y+=w.y*g,D.z+=w.z*g),b.setAbsolutePosition(D)},c.DEFAULT_OBJECT_SIZE=new P.e(1,1,1),c.IDENTITY_QUATERNION=P.b.Identity(),c._tmpVecs=_.a.BuildArray(3,P.e.Zero),c._tmpQuat=P.b.Identity(),c.NoImpostor=0,c.SphereImpostor=1,c.BoxImpostor=2,c.PlaneImpostor=3,c.MeshImpostor=4,c.CapsuleImpostor=6,c.CylinderImpostor=7,c.ParticleImpostor=8,c.HeightmapImpostor=9,c.ConvexHullImpostor=10,c.CustomImpostor=100,c.RopeImpostor=101,c.ClothImpostor=102,c.SoftbodyImpostor=103,c}()},function(Ae,v,f){f.d(v,"a",function(){return _}),f.d(v,"b",function(){return P});var B=f(1),_=function(){function l(O){this.length=0,this.data=new Array(O),this._id=l._GlobalId++}return l.prototype.push=function(O){this.data[this.length++]=O,this.length>this.data.length&&(this.data.length*=2)},l.prototype.forEach=function(O){for(var R=0;Rthis.data.length&&(this.data.length=2*(this.length+O.length));for(var R=0;R=this.length?-1:R},l.prototype.contains=function(O){return this.indexOf(O)!==-1},l._GlobalId=0,l}(),P=function(l){function O(){var R=l!==null&&l.apply(this,arguments)||this;return R._duplicateId=0,R}return Object(B.d)(O,l),O.prototype.push=function(R){l.prototype.push.call(this,R),R.__smartArrayFlags||(R.__smartArrayFlags={}),R.__smartArrayFlags[this._id]=this._duplicateId},O.prototype.pushNoDuplicate=function(R){return(!R.__smartArrayFlags||R.__smartArrayFlags[this._id]!==this._duplicateId)&&(this.push(R),!0)},O.prototype.reset=function(){l.prototype.reset.call(this),this._duplicateId++},O.prototype.concatWithNoDuplicate=function(R){if(R.length!==0){this.length+R.length>this.data.length&&(this.data.length=2*(this.length+R.length));for(var x=0;x>2,m=(3&l)<<4|(O=g>4,c=(15&O)<<2|(R=g>6,T=63&R,isNaN(O)?c=T=64:isNaN(R)&&(T=64),S+=A.charAt(x)+A.charAt(m)+A.charAt(c)+A.charAt(T);return S},_.PadNumber=function(P,l){for(var O=String(P);O.length0)):!S._pointerCaptures[D.pointerId]&&b.distance>E.distance&&(S.mainSceneTrackerPredicate&&S.mainSceneTrackerPredicate(E.pickedMesh)?(S._notifyObservers(g,E,D),g.skipOnPointerObservable=!0):S._lastPointerEvents[D.pointerId]&&(S.onPointerOutObservable.notifyObservers(D.pointerId),delete S._lastPointerEvents[D.pointerId])),g.type===P.a.POINTERUP&&S._pointerCaptures[D.pointerId]&&(S._pointerCaptures[D.pointerId]=!1))}}}}),this._originalPointerObserver&&T.onPrePointerObservable.makeObserverTopPriority(this._originalPointerObserver)),this.utilityLayerScene.autoClear=!1,this._afterRenderObserver=this.originalScene.onAfterCameraRenderObservable.add(function(g){S.shouldRender&&g==S.getRenderCamera()&&S.render()}),this._sceneDisposeObserver=this.originalScene.onDisposeObservable.add(function(){S.dispose()}),this._updateCamera()}return c.prototype.getRenderCamera=function(T){if(this._renderCamera)return this._renderCamera;var A=void 0;return A=this.originalScene.activeCameras&&this.originalScene.activeCameras.length>1?this.originalScene.activeCameras[this.originalScene.activeCameras.length-1]:this.originalScene.activeCamera,T&&A&&A.isRigCamera?A.rigParent:A},c.prototype.setRenderCamera=function(T){this._renderCamera=T},c.prototype._getSharedGizmoLight=function(){return this._sharedGizmoLight||(this._sharedGizmoLight=new O.a("shared gizmo light",new R.e(0,1,0),this.utilityLayerScene),this._sharedGizmoLight.intensity=2,this._sharedGizmoLight.groundColor=x.a.Gray()),this._sharedGizmoLight},Object.defineProperty(c,"DefaultUtilityLayer",{get:function(){return c._DefaultUtilityLayer==null&&(c._DefaultUtilityLayer=new c(l.a.LastCreatedScene),c._DefaultUtilityLayer.originalScene.onDisposeObservable.addOnce(function(){c._DefaultUtilityLayer=null})),c._DefaultUtilityLayer},enumerable:!1,configurable:!0}),Object.defineProperty(c,"DefaultKeepDepthUtilityLayer",{get:function(){return c._DefaultKeepDepthUtilityLayer==null&&(c._DefaultKeepDepthUtilityLayer=new c(l.a.LastCreatedScene),c._DefaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,c._DefaultKeepDepthUtilityLayer.originalScene.onDisposeObservable.addOnce(function(){c._DefaultKeepDepthUtilityLayer=null})),c._DefaultKeepDepthUtilityLayer},enumerable:!1,configurable:!0}),c.prototype._notifyObservers=function(T,A,S){T.skipOnPointerObservable||(this.utilityLayerScene.onPointerObservable.notifyObservers(new P.b(T.type,T.event,A),T.type),this._lastPointerEvents[S.pointerId]=!0)},c.prototype.render=function(){if(this._updateCamera(),this.utilityLayerScene.activeCamera){var T=this.utilityLayerScene.activeCamera.getScene(),A=this.utilityLayerScene.activeCamera;A._scene=this.utilityLayerScene,A.leftCamera&&(A.leftCamera._scene=this.utilityLayerScene),A.rightCamera&&(A.rightCamera._scene=this.utilityLayerScene),this.utilityLayerScene.render(!1),A._scene=T,A.leftCamera&&(A.leftCamera._scene=T),A.rightCamera&&(A.rightCamera._scene=T)}},c.prototype.dispose=function(){this.onPointerOutObservable.clear(),this._afterRenderObserver&&this.originalScene.onAfterCameraRenderObservable.remove(this._afterRenderObserver),this._sceneDisposeObserver&&this.originalScene.onDisposeObservable.remove(this._sceneDisposeObserver),this._originalPointerObserver&&this.originalScene.onPrePointerObservable.remove(this._originalPointerObserver),this.utilityLayerScene.dispose()},c.prototype._updateCamera=function(){this.utilityLayerScene.cameraToUseForPointers=this.getRenderCamera(),this.utilityLayerScene.activeCamera=this.getRenderCamera()},c._DefaultUtilityLayer=null,c._DefaultKeepDepthUtilityLayer=null,c}()},function(Ae,v,f){f.d(v,"a",function(){return _});var B=f(139),_=function(){function P(){}return P.EnableFor=function(l){l._tags=l._tags||{},l.hasTags=function(){return P.HasTags(l)},l.addTags=function(O){return P.AddTagsTo(l,O)},l.removeTags=function(O){return P.RemoveTagsFrom(l,O)},l.matchesTagsQuery=function(O){return P.MatchesQuery(l,O)}},P.DisableFor=function(l){delete l._tags,delete l.hasTags,delete l.addTags,delete l.removeTags,delete l.matchesTagsQuery},P.HasTags=function(l){if(!l._tags)return!1;var O=l._tags;for(var R in O)if(O.hasOwnProperty(R))return!0;return!1},P.GetTags=function(l,O){if(O===void 0&&(O=!0),!l._tags)return null;if(O){var R=[];for(var x in l._tags)l._tags.hasOwnProperty(x)&&l._tags[x]===!0&&R.push(x);return R.join(" ")}return l._tags},P.AddTagsTo=function(l,O){O&&typeof O=="string"&&O.split(" ").forEach(function(R,x,m){P._AddTagTo(l,R)})},P._AddTagTo=function(l,O){(O=O.trim())!==""&&O!=="true"&&O!=="false"&&(O.match(/[\s]/)||O.match(/^([!]|([|]|[&]){2})/)||(P.EnableFor(l),l._tags[O]=!0))},P.RemoveTagsFrom=function(l,O){if(P.HasTags(l)){var R=O.split(" ");for(var x in R)P._RemoveTagFrom(l,R[x])}},P._RemoveTagFrom=function(l,O){delete l._tags[O]},P.MatchesQuery=function(l,O){return O===void 0||(O===""?P.HasTags(l):B.a.Eval(O,function(R){return P.HasTags(l)&&l._tags[R]}))},P}()},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){}return _.IsWindowObjectExist=function(){return typeof window<"u"},_.IsNavigatorAvailable=function(){return typeof navigator<"u"},_.IsDocumentAvailable=function(){return typeof document<"u"},_.GetDOMTextContent=function(P){for(var l="",O=P.firstChild;O;)O.nodeType===3&&(l+=O.textContent),O=O.nextSibling;return l},_}()},function(Ae,v,f){f.d(v,"a",function(){return x});var B=f(44),_=f(0),P=f(54),l=f(114),O=f(20),R=f(24),x=function(){function m(c,T,A){A===void 0&&(A=Number.MAX_VALUE),this.origin=c,this.direction=T,this.length=A}return m.prototype.intersectsBoxMinMax=function(c,T,A){A===void 0&&(A=0);var S,g,u,h,b=m._TmpVector3[0].copyFromFloats(c.x-A,c.y-A,c.z-A),E=m._TmpVector3[1].copyFromFloats(T.x+A,T.y+A,T.z+A),D=0,w=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.xE.x)return!1}else if(S=1/this.direction.x,g=(b.x-this.origin.x)*S,(u=(E.x-this.origin.x)*S)===-1/0&&(u=1/0),g>u&&(h=g,g=u,u=h),(D=Math.max(g,D))>(w=Math.min(u,w)))return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.yE.y)return!1}else if(S=1/this.direction.y,g=(b.y-this.origin.y)*S,(u=(E.y-this.origin.y)*S)===-1/0&&(u=1/0),g>u&&(h=g,g=u,u=h),(D=Math.max(g,D))>(w=Math.min(u,w)))return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.zE.z)return!1}else if(S=1/this.direction.z,g=(b.z-this.origin.z)*S,(u=(E.z-this.origin.z)*S)===-1/0&&(u=1/0),g>u&&(h=g,g=u,u=h),(D=Math.max(g,D))>(w=Math.min(u,w)))return!1;return!0},m.prototype.intersectsBox=function(c,T){return T===void 0&&(T=0),this.intersectsBoxMinMax(c.minimum,c.maximum,T)},m.prototype.intersectsSphere=function(c,T){T===void 0&&(T=0);var A=c.center.x-this.origin.x,S=c.center.y-this.origin.y,g=c.center.z-this.origin.z,u=A*A+S*S+g*g,h=c.radius+T,b=h*h;if(u<=b)return!0;var E=A*this.direction.x+S*this.direction.y+g*this.direction.z;return!(E<0)&&u-E*E<=b},m.prototype.intersectsTriangle=function(c,T,A){var S=m._TmpVector3[0],g=m._TmpVector3[1],u=m._TmpVector3[2],h=m._TmpVector3[3],b=m._TmpVector3[4];T.subtractToRef(c,S),A.subtractToRef(c,g),_.e.CrossToRef(this.direction,g,u);var E=_.e.Dot(S,u);if(E===0)return null;var D=1/E;this.origin.subtractToRef(c,h);var w=_.e.Dot(h,u)*D;if(w<0||w>1)return null;_.e.CrossToRef(h,S,b);var N=_.e.Dot(this.direction,b)*D;if(N<0||w+N>1)return null;var I=_.e.Dot(g,b)*D;return I>this.length?null:new l.a(1-w-N,w,I)},m.prototype.intersectsPlane=function(c){var T,A=_.e.Dot(c.normal,this.direction);if(Math.abs(A)<999999997475243e-21)return null;var S=_.e.Dot(c.normal,this.origin);return(T=(-c.d-S)/A)<0?T<-999999997475243e-21?null:0:T},m.prototype.intersectsAxis=function(c,T){switch(T===void 0&&(T=0),c){case"y":return(A=(this.origin.y-T)/this.direction.y)>0?null:new _.e(this.origin.x+this.direction.x*-A,T,this.origin.z+this.direction.z*-A);case"x":return(A=(this.origin.x-T)/this.direction.x)>0?null:new _.e(T,this.origin.y+this.direction.y*-A,this.origin.z+this.direction.z*-A);case"z":var A;return(A=(this.origin.z-T)/this.direction.z)>0?null:new _.e(this.origin.x+this.direction.x*-A,this.origin.y+this.direction.y*-A,T);default:return null}},m.prototype.intersectsMesh=function(c,T){var A=_.c.Matrix[0];return c.getWorldMatrix().invertToRef(A),this._tmpRay?m.TransformToRef(this,A,this._tmpRay):this._tmpRay=m.Transform(this,A),c.intersects(this._tmpRay,T)},m.prototype.intersectsMeshes=function(c,T,A){A?A.length=0:A=[];for(var S=0;ST.distance?1:0},m.prototype.intersectionSegment=function(c,T,A){var S=this.origin,g=_.c.Vector3[0],u=_.c.Vector3[1],h=_.c.Vector3[2],b=_.c.Vector3[3];T.subtractToRef(c,g),this.direction.scaleToRef(m.rayl,h),S.addToRef(h,u),c.subtractToRef(S,b);var E,D,w,N,I=_.e.Dot(g,g),V=_.e.Dot(g,h),X=_.e.Dot(h,h),j=_.e.Dot(g,b),ne=_.e.Dot(h,b),te=I*X-V*V,de=te,pe=te;tede&&(D=de,N=ne+V,pe=X)),N<0?(N=0,-j<0?D=0:-j>I?D=de:(D=-j,de=I)):N>pe&&(N=pe,-j+V<0?D=0:-j+V>I?D=de:(D=-j+V,de=I)),E=Math.abs(D)0&&w<=this.length&&K.lengthSquared()=m.distance?null:E:null},O.a.prototype._internalPick=function(m,c,T,A,S){if(!P.a)return null;for(var g=null,u=0;u0&&(m.push(g-1),m.push(g)),g++}var D=new P.a;return D.indices=m,D.positions=c,A&&(D.colors=S),D},P.a.CreateDashedLines=function(x){var m,c,T=x.dashSize||3,A=x.gapSize||1,S=x.dashNb||200,g=x.points,u=new Array,h=new Array,b=B.e.Zero(),E=0,D=0,w=0,N=0,I=0;for(I=0;I0)if(typeof g[0]=="object")for(var h=0;hx.max||x.min>R.max)},T=function(){function A(S,g,u){this._isLocked=!1,this.boundingBox=new l.a(S,g,u),this.boundingSphere=new O.a(S,g,u)}return A.prototype.reConstruct=function(S,g,u){this.boundingBox.reConstruct(S,g,u),this.boundingSphere.reConstruct(S,g,u)},Object.defineProperty(A.prototype,"minimum",{get:function(){return this.boundingBox.minimum},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"maximum",{get:function(){return this.boundingBox.maximum},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isLocked",{get:function(){return this._isLocked},set:function(S){this._isLocked=S},enumerable:!1,configurable:!0}),A.prototype.update=function(S){this._isLocked||(this.boundingBox._update(S),this.boundingSphere._update(S))},A.prototype.centerOn=function(S,g){var u=A.TmpVector3[0].copyFrom(S).subtractInPlace(g),h=A.TmpVector3[1].copyFrom(S).addInPlace(g);return this.boundingBox.reConstruct(u,h,this.boundingBox.getWorldMatrix()),this.boundingSphere.reConstruct(u,h,this.boundingBox.getWorldMatrix()),this},A.prototype.scale=function(S){return this.boundingBox.scale(S),this.boundingSphere.scale(S),this},A.prototype.isInFrustum=function(S,g){return g===void 0&&(g=P.a.MESHES_CULLINGSTRATEGY_STANDARD),!(g!==P.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION&&g!==P.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY||!this.boundingSphere.isCenterInFrustum(S))||!!this.boundingSphere.isInFrustum(S)&&(!(g!==P.a.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY&&g!==P.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY)||this.boundingBox.isInFrustum(S))},Object.defineProperty(A.prototype,"diagonalLength",{get:function(){var S=this.boundingBox;return S.maximumWorld.subtractToRef(S.minimumWorld,A.TmpVector3[0]).length()},enumerable:!1,configurable:!0}),A.prototype.isCompletelyInFrustum=function(S){return this.boundingBox.isCompletelyInFrustum(S)},A.prototype._checkCollision=function(S){return S._canDoCollision(this.boundingSphere.centerWorld,this.boundingSphere.radiusWorld,this.boundingBox.minimumWorld,this.boundingBox.maximumWorld)},A.prototype.intersectsPoint=function(S){return!!this.boundingSphere.centerWorld&&!!this.boundingSphere.intersectsPoint(S)&&!!this.boundingBox.intersectsPoint(S)},A.prototype.intersects=function(S,g){if(!O.a.Intersects(this.boundingSphere,S.boundingSphere)||!l.a.Intersects(this.boundingBox,S.boundingBox))return!1;if(!g)return!0;var u=this.boundingBox,h=S.boundingBox;return!!c(u.directions[0],u,h)&&!!c(u.directions[1],u,h)&&!!c(u.directions[2],u,h)&&!!c(h.directions[0],u,h)&&!!c(h.directions[1],u,h)&&!!c(h.directions[2],u,h)&&!!c(_.e.Cross(u.directions[0],h.directions[0]),u,h)&&!!c(_.e.Cross(u.directions[0],h.directions[1]),u,h)&&!!c(_.e.Cross(u.directions[0],h.directions[2]),u,h)&&!!c(_.e.Cross(u.directions[1],h.directions[0]),u,h)&&!!c(_.e.Cross(u.directions[1],h.directions[1]),u,h)&&!!c(_.e.Cross(u.directions[1],h.directions[2]),u,h)&&!!c(_.e.Cross(u.directions[2],h.directions[0]),u,h)&&!!c(_.e.Cross(u.directions[2],h.directions[1]),u,h)&&!!c(_.e.Cross(u.directions[2],h.directions[2]),u,h)},A.TmpVector3=B.a.BuildArray(2,_.e.Zero),A}()},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){}return _.BuildArray=function(P,l){for(var O=[],R=0;R1)?1:O.arc||1,A=O.slice&&O.slice<=0?1:O.slice||1,S=O.sideOrientation===0?0:O.sideOrientation||P.a.DEFAULTSIDE,g=!!O.dedupTopBottomIndices,u=new B.e(x/2,m/2,c/2),h=2+R,b=2*h,E=[],D=[],w=[],N=[],I=0;I<=h;I++){for(var V=I/h,X=V*Math.PI*A,j=0;j<=b;j++){var ne=j/b,te=ne*Math.PI*2*T,de=B.a.RotationZ(-X),pe=B.a.RotationY(te),ae=B.e.TransformCoordinates(B.e.Up(),de),ee=B.e.TransformCoordinates(ae,pe),K=ee.multiply(u),$=ee.divide(u).normalize();D.push(K.x,K.y,K.z),w.push($.x,$.y,$.z),N.push(ne,V)}if(I>0)for(var L=D.length/3,G=L-2*(b+1);G+b+21&&(E.push(G),E.push(G+1),E.push(G+b+1)),(I0&&this.includedOnlyMeshes.indexOf(A)===-1)&&!(this.excludedMeshes&&this.excludedMeshes.length>0&&this.excludedMeshes.indexOf(A)!==-1)&&(this.includeOnlyWithLayerMask===0||(this.includeOnlyWithLayerMask&A.layerMask)!=0)&&!(this.excludeWithLayerMask!==0&&this.excludeWithLayerMask&A.layerMask)},T.CompareLightsPriority=function(A,S){return A.shadowEnabled!==S.shadowEnabled?(S.shadowEnabled?1:0)-(A.shadowEnabled?1:0):S.renderPriority-A.renderPriority},T.prototype.dispose=function(A,S){S===void 0&&(S=!1),this._shadowGenerator&&(this._shadowGenerator.dispose(),this._shadowGenerator=null),this.getScene().stopAnimation(this);for(var g=0,u=this.getScene().meshes;g0&&(A.excludedMeshesIds=[],this.excludedMeshes.forEach(function(S){A.excludedMeshesIds.push(S.id)})),this.includedOnlyMeshes.length>0&&(A.includedOnlyMeshesIds=[],this.includedOnlyMeshes.forEach(function(S){A.includedOnlyMeshesIds.push(S.id)})),_.a.AppendSerializedAnimations(this,A),A.ranges=this.serializeAnimationRanges(),A},T.GetConstructorFromName=function(A,S,g){var u=O.a.Construct("Light_Type_"+A,S,g);return u||null},T.Parse=function(A,S){var g=T.GetConstructorFromName(A.type,A.name,S);if(!g)return null;var u=_.a.Parse(g,A,S);if(A.excludedMeshesIds&&(u._excludedMeshesIds=A.excludedMeshesIds),A.includedOnlyMeshesIds&&(u._includedOnlyMeshesIds=A.includedOnlyMeshesIds),A.parentId&&(u._waitingParentId=A.parentId),A.falloffType!==void 0&&(u.falloffType=A.falloffType),A.lightmapMode!==void 0&&(u.lightmapMode=A.lightmapMode),A.animations){for(var h=0;h=0&&this._scene.textures.splice(S,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),T.prototype.dispose.call(this)},A.prototype.serialize=function(){if(!this.name)return null;var S=_.a.Serialize(this);return _.a.AppendSerializedAnimations(this,S),S},A.WhenAllReady=function(S,g){var u=S.length;if(u!==0)for(var h=0;h1)?1:m.arc||1,w=m.sideOrientation===0?0:m.sideOrientation||l.a.DEFAULTSIDE,N=m.faceUV||new Array(3),I=m.faceColors,V=2+(1+(D!==1&&b?2:0))*(h?u:1);for(S=0;S1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=l,this._lastSecAccumulated=0,this._lastSecValueCount=0)},P.Enabled=!0,P}()},function(Ae,v,f){f.d(v,"b",function(){return A}),f.d(v,"d",function(){return S}),f.d(v,"c",function(){return g}),f.d(v,"a",function(){return u});var B=f(1),_=f(49),P=f(38),l=f(6),O=f(83),R=f(140),x=function(h){function b(){return h!==null&&h.apply(this,arguments)||this}return Object(B.d)(b,h),b._setPrototypeOf=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},b}(Error),m=f(34),c=f(26),T=f(128),A=function(h){function b(E,D){var w=h.call(this,E)||this;return w.name="LoadFileError",x._setPrototypeOf(w,b.prototype),D instanceof _.a?w.request=D:w.file=D,w}return Object(B.d)(b,h),b}(x),S=function(h){function b(E,D){var w=h.call(this,E)||this;return w.request=D,w.name="RequestFileError",x._setPrototypeOf(w,b.prototype),w}return Object(B.d)(b,h),b}(x),g=function(h){function b(E,D){var w=h.call(this,E)||this;return w.file=D,w.name="ReadFileError",x._setPrototypeOf(w,b.prototype),w}return Object(B.d)(b,h),b}(x),u=function(){function h(){}return h._CleanUrl=function(b){return b=b.replace(/#/gm,"%23")},h.SetCorsBehavior=function(b,E){if((!b||b.indexOf("data:")!==0)&&h.CorsBehavior)if(typeof h.CorsBehavior=="string"||this.CorsBehavior instanceof String)E.crossOrigin=h.CorsBehavior;else{var D=h.CorsBehavior(b);D&&(E.crossOrigin=D)}},h.LoadImage=function(b,E,D,w,N){var I;N===void 0&&(N="");var V=!1;if(b instanceof ArrayBuffer||ArrayBuffer.isView(b)?typeof Blob<"u"?(I=URL.createObjectURL(new Blob([b],{type:N})),V=!0):I="data:"+N+";base64,"+m.a.EncodeArrayBufferToBase64(b):b instanceof Blob?(I=URL.createObjectURL(b),V=!0):(I=h._CleanUrl(b),I=h.PreprocessUrl(b)),typeof Image>"u")return h.LoadFile(I,function(ae){createImageBitmap(new Blob([ae],{type:N})).then(function(ee){E(ee),V&&URL.revokeObjectURL(I)}).catch(function(ee){D&&D("Error while trying to load image: "+b,ee)})},void 0,w||void 0,!0,function(ae,ee){D&&D("Error while trying to load image: "+b,ee)}),null;var X=new Image;h.SetCorsBehavior(I,X);var j=function(){X.removeEventListener("load",j),X.removeEventListener("error",ne),E(X),V&&X.src&&URL.revokeObjectURL(X.src)},ne=function(ae){if(X.removeEventListener("load",j),X.removeEventListener("error",ne),D){var ee=b.toString();D("Error while trying to load image: "+(ee.length<32?ee:ee.slice(0,32)+"..."),ae)}V&&X.src&&URL.revokeObjectURL(X.src)};X.addEventListener("load",j),X.addEventListener("error",ne);var te=function(){X.src=I};if(I.substr(0,5)!=="data:"&&w&&w.enableTexturesOffline)w.open(function(){w&&w.loadImage(I,X)},te);else{if(I.indexOf("file:")!==-1){var de=decodeURIComponent(I.substring(5).toLowerCase());if(O.a.FilesToLoad[de]){try{var pe;try{pe=URL.createObjectURL(O.a.FilesToLoad[de])}catch{pe=URL.createObjectURL(O.a.FilesToLoad[de])}X.src=pe,V=!0}catch{X.src=""}return X}}te()}return X},h.ReadFile=function(b,E,D,w,N){var I=new FileReader,V={onCompleteObservable:new l.c,abort:function(){return I.abort()}};return I.onloadend=function(X){return V.onCompleteObservable.notifyObservers(V)},N&&(I.onerror=function(X){N(new g("Unable to read "+b.name,b))}),I.onload=function(X){E(X.target.result)},D&&(I.onprogress=D),w?I.readAsArrayBuffer(b):I.readAsText(b),V},h.LoadFile=function(b,E,D,w,N,I){if(b.indexOf("file:")!==-1){var V=decodeURIComponent(b.substring(5).toLowerCase());V.indexOf("./")===0&&(V=V.substring(2));var X=O.a.FilesToLoad[V];if(X)return h.ReadFile(X,E,D,N,I?function(j){return I(void 0,new A(j.message,j.file))}:void 0)}return h.RequestFile(b,function(j,ne){E(j,ne?ne.responseURL:void 0)},D,w,N,I?function(j){I(j.request,new A(j.message,j.request))}:void 0)},h.RequestFile=function(b,E,D,w,N,I,V){b=h._CleanUrl(b),b=h.PreprocessUrl(b);var X=h.BaseUrl+b,j=!1,ne={onCompleteObservable:new l.c,abort:function(){return j=!0}},te=function(){var pe=new _.a,ae=null;ne.abort=function(){j=!0,pe.readyState!==(XMLHttpRequest.DONE||4)&&pe.abort(),ae!==null&&(clearTimeout(ae),ae=null)};var ee=function(K){pe.open("GET",X),V&&V(pe),N&&(pe.responseType="arraybuffer"),D&&pe.addEventListener("progress",D);var $=function(){pe.removeEventListener("loadend",$),ne.onCompleteObservable.notifyObservers(ne),ne.onCompleteObservable.clear()};pe.addEventListener("loadend",$);var L=function(){if(!j&&pe.readyState===(XMLHttpRequest.DONE||4)){if(pe.removeEventListener("readystatechange",L),pe.status>=200&&pe.status<300||pe.status===0&&(!P.a.IsWindowObjectExist()||h.IsFileURL()))return void E(N?pe.response:pe.responseText,pe);var G=h.DefaultRetryStrategy;if(G){var Q=G(X,pe,K);if(Q!==-1)return pe.removeEventListener("loadend",$),pe=new _.a,void(ae=setTimeout(function(){return ee(K+1)},Q))}var oe=new S("Error status: "+pe.status+" "+pe.statusText+" - Unable to load "+X,pe);I&&I(oe)}};pe.addEventListener("readystatechange",L),pe.send()};ee(0)};if(w&&w.enableSceneOffline){var de=function(pe){pe&&pe.status>400?I&&I(pe):te()};w.open(function(){w&&w.loadFile(h.BaseUrl+b,function(pe){j||E(pe),ne.onCompleteObservable.notifyObservers(ne)},D?function(pe){j||D(pe)}:void 0,de,N)},de)}else te();return ne},h.IsFileURL=function(){return typeof location<"u"&&location.protocol==="file:"},h.DefaultRetryStrategy=R.a.ExponentialBackoff(),h.BaseUrl="",h.CorsBehavior="anonymous",h.PreprocessUrl=function(b){return b},h}();c.a._FileToolsLoadImage=u.LoadImage.bind(u),c.a._FileToolsLoadFile=u.LoadFile.bind(u),T.a._FileToolsLoadFile=u.LoadFile.bind(u)},function(Ae,v,f){f.d(v,"a",function(){return _});var B=f(38),_=function(){function P(){}return Object.defineProperty(P,"Now",{get:function(){return B.a.IsWindowObjectExist()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!1,configurable:!0}),P}()},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(P,l,O,R){this.x=P,this.y=l,this.width=O,this.height=R}return _.prototype.toGlobal=function(P,l){return new _(this.x*P,this.y*l,this.width*P,this.height*l)},_.prototype.toGlobalToRef=function(P,l,O){return O.x=this.x*P,O.y=this.y*l,O.width=this.width*P,O.height=this.height*l,this},_.prototype.clone=function(){return new _(this.x,this.y,this.width,this.height)},_}()},function(Ae,v,f){var B="helperFunctions",_=`const float PI=3.1415926535897932384626433832795; -const float HALF_MIN=5.96046448e-08; -const float LinearEncodePowerApprox=2.2; -const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox; -const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722); -const float Epsilon=0.0000001; -#define saturate(x) clamp(x,0.0,1.0) -#define absEps(x) abs(x)+Epsilon -#define maxEps(x) max(x,Epsilon) -#define saturateEps(x) clamp(x,Epsilon,1.0) -mat3 transposeMat3(mat3 inMatrix) { -vec3 i0=inMatrix[0]; -vec3 i1=inMatrix[1]; -vec3 i2=inMatrix[2]; -mat3 outMatrix=mat3( -vec3(i0.x,i1.x,i2.x), -vec3(i0.y,i1.y,i2.y), -vec3(i0.z,i1.z,i2.z) -); -return outMatrix; -} - -mat3 inverseMat3(mat3 inMatrix) { -float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2]; -float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2]; -float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2]; -float b01=a22*a11-a12*a21; -float b11=-a22*a10+a12*a20; -float b21=a21*a10-a11*a20; -float det=a00*b01+a01*b11+a02*b21; -return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11), -b11,(a22*a00-a02*a20),(-a12*a00+a02*a10), -b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det; -} -float toLinearSpace(float color) -{ -return pow(color,LinearEncodePowerApprox); -} -vec3 toLinearSpace(vec3 color) -{ -return pow(color,vec3(LinearEncodePowerApprox)); -} -vec4 toLinearSpace(vec4 color) -{ -return vec4(pow(color.rgb,vec3(LinearEncodePowerApprox)),color.a); -} -vec3 toGammaSpace(vec3 color) -{ -return pow(color,vec3(GammaEncodePowerApprox)); -} -vec4 toGammaSpace(vec4 color) -{ -return vec4(pow(color.rgb,vec3(GammaEncodePowerApprox)),color.a); -} -float toGammaSpace(float color) -{ -return pow(color,GammaEncodePowerApprox); -} -float square(float value) -{ -return value*value; -} -float pow5(float value) { -float sq=value*value; -return sq*sq*value; -} -float getLuminance(vec3 color) -{ -return clamp(dot(color,LuminanceEncodeApprox),0.,1.); -} - -float getRand(vec2 seed) { -return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453); -} -float dither(vec2 seed,float varianceAmount) { -float rand=getRand(seed); -float dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand); -return dither; -} - -const float rgbdMaxRange=255.0; -vec4 toRGBD(vec3 color) { -float maxRGB=maxEps(max(color.r,max(color.g,color.b))); -float D=max(rgbdMaxRange/maxRGB,1.); -D=clamp(floor(D)/255.0,0.,1.); - -vec3 rgb=color.rgb*D; - -rgb=toGammaSpace(rgb); -return vec4(rgb,D); -} -vec3 fromRGBD(vec4 rgbd) { - -rgbd.rgb=toLinearSpace(rgbd.rgb); - -return rgbd.rgb/rgbd.a; -} -`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){f.d(v,"a",function(){return _});var B=f(0),_=function(){function P(){}return P._RemoveAndStorePivotPoint=function(l){l&&P._PivotCached===0&&(l.getPivotPointToRef(P._OldPivotPoint),P._PivotPostMultiplyPivotMatrix=l._postMultiplyPivotMatrix,P._OldPivotPoint.equalsToFloats(0,0,0)||(l.setPivotMatrix(B.a.IdentityReadOnly),P._OldPivotPoint.subtractToRef(l.getPivotPoint(),P._PivotTranslation),P._PivotTmpVector.copyFromFloats(1,1,1),P._PivotTmpVector.subtractInPlace(l.scaling),P._PivotTmpVector.multiplyInPlace(P._PivotTranslation),l.position.addInPlace(P._PivotTmpVector))),P._PivotCached++},P._RestorePivotPoint=function(l){l&&!P._OldPivotPoint.equalsToFloats(0,0,0)&&P._PivotCached===1&&(l.setPivotPoint(P._OldPivotPoint),l._postMultiplyPivotMatrix=P._PivotPostMultiplyPivotMatrix,P._PivotTmpVector.copyFromFloats(1,1,1),P._PivotTmpVector.subtractInPlace(l.scaling),P._PivotTmpVector.multiplyInPlace(P._PivotTranslation),l.position.subtractInPlace(P._PivotTmpVector)),this._PivotCached--},P._PivotCached=0,P._OldPivotPoint=new B.e,P._PivotTranslation=new B.e,P._PivotTmpVector=new B.e,P._PivotPostMultiplyPivotMatrix=!1,P}()},function(Ae,v,f){f.d(v,"a",function(){return R});var B=f(4),_=f(114),P=f(43),l=f(2),O=f(101),R=function(){function x(m,c,T,A,S,g,u,h,b){h===void 0&&(h=!0),b===void 0&&(b=!0),this.materialIndex=m,this.verticesStart=c,this.verticesCount=T,this.indexStart=A,this.indexCount=S,this._materialDefines=null,this._materialEffect=null,this._effectOverride=null,this._linesIndexCount=0,this._linesIndexBuffer=null,this._lastColliderWorldVertices=null,this._lastColliderTransformMatrix=null,this._renderId=0,this._alphaIndex=0,this._distanceToCamera=0,this._currentMaterial=null,this._mesh=g,this._renderingMesh=u||g,b&&g.subMeshes.push(this),this._trianglePlanes=[],this._id=g.subMeshes.length-1,h&&(this.refreshBoundingInfo(),g.computeWorldMatrix(!0))}return Object.defineProperty(x.prototype,"materialDefines",{get:function(){return this._materialDefines},set:function(m){this._materialDefines=m},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"effect",{get:function(){var m;return(m=this._effectOverride)!==null&&m!==void 0?m:this._materialEffect},enumerable:!1,configurable:!0}),x.prototype.setEffect=function(m,c){c===void 0&&(c=null),this._materialEffect!==m?(this._materialDefines=c,this._materialEffect=m):m||(this._materialDefines=null)},x.AddToMesh=function(m,c,T,A,S,g,u,h){return h===void 0&&(h=!0),new x(m,c,T,A,S,g,u,h)},Object.defineProperty(x.prototype,"IsGlobal",{get:function(){return this.verticesStart===0&&this.verticesCount===this._mesh.getTotalVertices()},enumerable:!1,configurable:!0}),x.prototype.getBoundingInfo=function(){return this.IsGlobal?this._mesh.getBoundingInfo():this._boundingInfo},x.prototype.setBoundingInfo=function(m){return this._boundingInfo=m,this},x.prototype.getMesh=function(){return this._mesh},x.prototype.getRenderingMesh=function(){return this._renderingMesh},x.prototype.getReplacementMesh=function(){return this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null},x.prototype.getEffectiveMesh=function(){var m=this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null;return m||this._renderingMesh},x.prototype.getMaterial=function(){var m=this._renderingMesh.material;if(m==null)return this._mesh.getScene().defaultMaterial;if(this._IsMultiMaterial(m)){var c=m.getSubMaterial(this.materialIndex);return this._currentMaterial!==c&&(this._currentMaterial=c,this._materialDefines=null),c}return m},x.prototype._IsMultiMaterial=function(m){return m.getSubMaterial!==void 0},x.prototype.refreshBoundingInfo=function(m){if(m===void 0&&(m=null),this._lastColliderWorldVertices=null,this.IsGlobal||!this._renderingMesh||!this._renderingMesh.geometry)return this;if(m||(m=this._renderingMesh.getVerticesData(B.b.PositionKind)),!m)return this._boundingInfo=this._mesh.getBoundingInfo(),this;var c,T=this._renderingMesh.getIndices();if(this.indexStart===0&&this.indexCount===T.length){var A=this._renderingMesh.getBoundingInfo();c={minimum:A.minimum.clone(),maximum:A.maximum.clone()}}else c=Object(O.b)(m,T,this.indexStart,this.indexCount,this._renderingMesh.geometry.boundingBias);return this._boundingInfo?this._boundingInfo.reConstruct(c.minimum,c.maximum):this._boundingInfo=new P.a(c.minimum,c.maximum),this},x.prototype._checkCollision=function(m){return this.getBoundingInfo()._checkCollision(m)},x.prototype.updateBoundingInfo=function(m){var c=this.getBoundingInfo();return c||(this.refreshBoundingInfo(),c=this.getBoundingInfo()),c&&c.update(m),this},x.prototype.isInFrustum=function(m){var c=this.getBoundingInfo();return!!c&&c.isInFrustum(m,this._mesh.cullingStrategy)},x.prototype.isCompletelyInFrustum=function(m){var c=this.getBoundingInfo();return!!c&&c.isCompletelyInFrustum(m)},x.prototype.render=function(m){return this._renderingMesh.render(this,m,this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:void 0),this},x.prototype._getLinesIndexBuffer=function(m,c){if(!this._linesIndexBuffer){for(var T=[],A=this.indexStart;Au&&(u=E)}return new x(m,g,u-g+1,c,T,A,S)},x}()},function(Ae,v,f){f.d(v,"a",function(){return R});var B=f(1),_=f(8),P=f(10),l=f(2),O=(f(126),f(70)),R=function(x){function m(c,T,A,S,g,u,h){A===void 0&&(A=null),g===void 0&&(g=l.a.TEXTURE_TRILINEAR_SAMPLINGMODE),u===void 0&&(u=l.a.TEXTUREFORMAT_RGBA);var b=x.call(this,null,A,!S,h,g,void 0,void 0,void 0,void 0,u)||this;b.name=c,b.wrapU=P.a.CLAMP_ADDRESSMODE,b.wrapV=P.a.CLAMP_ADDRESSMODE,b._generateMipMaps=S;var E=b._getEngine();if(!E)return b;T.getContext?(b._canvas=T,b._texture=E.createDynamicTexture(T.width,T.height,S,g)):(b._canvas=O.a.CreateCanvas(1,1),T.width||T.width===0?b._texture=E.createDynamicTexture(T.width,T.height,S,g):b._texture=E.createDynamicTexture(T,T,S,g));var D=b.getSize();return b._canvas.width=D.width,b._canvas.height=D.height,b._context=b._canvas.getContext("2d"),b}return Object(B.d)(m,x),m.prototype.getClassName=function(){return"DynamicTexture"},Object.defineProperty(m.prototype,"canRescale",{get:function(){return!0},enumerable:!1,configurable:!0}),m.prototype._recreate=function(c){this._canvas.width=c.width,this._canvas.height=c.height,this.releaseInternalTexture(),this._texture=this._getEngine().createDynamicTexture(c.width,c.height,this._generateMipMaps,this.samplingMode)},m.prototype.scale=function(c){var T=this.getSize();T.width*=c,T.height*=c,this._recreate(T)},m.prototype.scaleTo=function(c,T){var A=this.getSize();A.width=c,A.height=T,this._recreate(A)},m.prototype.getContext=function(){return this._context},m.prototype.clear=function(){var c=this.getSize();this._context.fillRect(0,0,c.width,c.height)},m.prototype.update=function(c,T){T===void 0&&(T=!1),this._getEngine().updateDynamicTexture(this._texture,this._canvas,c===void 0||c,T,this._format||void 0)},m.prototype.drawText=function(c,T,A,S,g,u,h,b){b===void 0&&(b=!0);var E=this.getSize();if(u&&(this._context.fillStyle=u,this._context.fillRect(0,0,E.width,E.height)),this._context.font=S,T==null){var D=this._context.measureText(c);T=(E.width-D.width)/2}if(A==null){var w=parseInt(S.replace(/\D/g,""));A=E.height/2+w/3.65}this._context.fillStyle=g||"",this._context.fillText(c,T,A),b&&this.update(h)},m.prototype.clone=function(){var c=this.getScene();if(!c)return this;var T=this.getSize(),A=new m(this.name,T,c,this._generateMipMaps);return A.hasAlpha=this.hasAlpha,A.level=this.level,A.wrapU=this.wrapU,A.wrapV=this.wrapV,A},m.prototype.serialize=function(){var c=this.getScene();c&&!c.isReady()&&_.a.Warn("The scene must be ready before serializing the dynamic texture");var T=x.prototype.serialize.call(this);return this._IsCanvasElement(this._canvas)&&(T.base64String=this._canvas.toDataURL()),T.invertY=this._invertY,T.samplingMode=this.samplingMode,T},m.prototype._IsCanvasElement=function(c){return c.toDataURL!==void 0},m.prototype._rebuild=function(){this.update()},m}(P.a)},function(Ae,v,f){f.d(v,"a",function(){return O});var B=f(0),_=f(9),P=f(7),l=f(16);l.a.CreateBox=function(R){var x,m=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23],c=[0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0],T=[],A=R.width||R.size||1,S=R.height||R.size||1,g=R.depth||R.size||1,u=R.wrap||!1,h=R.topBaseAt===void 0?1:R.topBaseAt,b=R.bottomBaseAt===void 0?0:R.bottomBaseAt,E=[2,0,3,1][h=(h+4)%4],D=[2,0,1,3][b=(b+4)%4],w=[1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1];if(u){m=[2,3,0,2,0,1,4,5,6,4,6,7,9,10,11,9,11,8,12,14,15,12,13,14],w=[-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1];for(var N=[[1,1,1],[-1,1,1],[-1,1,-1],[1,1,-1]],I=[[-1,-1,1],[1,-1,1],[1,-1,-1],[-1,-1,-1]],V=[17,18,19,16],X=[22,23,20,21];E>0;)N.unshift(N.pop()),V.unshift(V.pop()),E--;for(;D>0;)I.unshift(I.pop()),X.unshift(X.pop()),D--;N=N.flat(),I=I.flat(),w=w.concat(N).concat(I),m.push(V[0],V[2],V[3],V[0],V[1],V[2]),m.push(X[0],X[2],X[3],X[0],X[1],X[2])}var j=[A/2,S/2,g/2];x=w.reduce(function(G,Q,oe){return G.concat(Q*j[oe%3])},[]);for(var ne=R.sideOrientation===0?0:R.sideOrientation||l.a.DEFAULTSIDE,te=R.faceUV||new Array(6),de=R.faceColors,pe=[],ae=0;ae<6;ae++)te[ae]===void 0&&(te[ae]=new B.f(0,0,1,1)),de&&de[ae]===void 0&&(de[ae]=new _.b(1,1,1,1));for(var ee=0;ee<6;ee++)if(T.push(te[ee].z,te[ee].w),T.push(te[ee].x,te[ee].w),T.push(te[ee].x,te[ee].y),T.push(te[ee].z,te[ee].y),de)for(var K=0;K<4;K++)pe.push(de[ee].r,de[ee].g,de[ee].b,de[ee].a);l.a._ComputeSides(ne,x,m,c,T,R.frontUVs,R.backUVs);var $=new l.a;if($.indices=m,$.positions=x,$.normals=c,$.uvs=T,de){var L=ne===l.a.DOUBLESIDE?pe.concat(pe):pe;$.colors=L}return $},P.a.CreateBox=function(R,x,m,c,T){m===void 0&&(m=null);var A={size:x,sideOrientation:T,updatable:c};return O.CreateBox(R,A,m)};var O=function(){function R(){}return R.CreateBox=function(x,m,c){c===void 0&&(c=null);var T=new P.a(x,c);return m.sideOrientation=P.a._GetDefaultSideOrientation(m.sideOrientation),T._originalBuilderSideOrientation=m.sideOrientation,l.a.CreateBox(m).applyToMesh(T,m.updatable),T},R}()},function(Ae,v,f){f.d(v,"a",function(){return _});var B=f(0),_=function(){function P(l,O,R,x){this.normal=new B.e(l,O,R),this.d=x}return P.prototype.asArray=function(){return[this.normal.x,this.normal.y,this.normal.z,this.d]},P.prototype.clone=function(){return new P(this.normal.x,this.normal.y,this.normal.z,this.d)},P.prototype.getClassName=function(){return"Plane"},P.prototype.getHashCode=function(){var l=this.normal.getHashCode();return l=397*l^(0|this.d)},P.prototype.normalize=function(){var l=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),O=0;return l!==0&&(O=1/l),this.normal.x*=O,this.normal.y*=O,this.normal.z*=O,this.d*=O,this},P.prototype.transform=function(l){var O=P._TmpMatrix;l.invertToRef(O);var R=O.m,x=this.normal.x,m=this.normal.y,c=this.normal.z,T=this.d;return new P(x*R[0]+m*R[1]+c*R[2]+T*R[3],x*R[4]+m*R[5]+c*R[6]+T*R[7],x*R[8]+m*R[9]+c*R[10]+T*R[11],x*R[12]+m*R[13]+c*R[14]+T*R[15])},P.prototype.dotCoordinate=function(l){return this.normal.x*l.x+this.normal.y*l.y+this.normal.z*l.z+this.d},P.prototype.copyFromPoints=function(l,O,R){var x,m=O.x-l.x,c=O.y-l.y,T=O.z-l.z,A=R.x-l.x,S=R.y-l.y,g=R.z-l.z,u=c*g-T*S,h=T*A-m*g,b=m*S-c*A,E=Math.sqrt(u*u+h*h+b*b);return x=E!==0?1/E:0,this.normal.x=u*x,this.normal.y=h*x,this.normal.z=b*x,this.d=-(this.normal.x*l.x+this.normal.y*l.y+this.normal.z*l.z),this},P.prototype.isFrontFacingTo=function(l,O){return B.e.Dot(this.normal,l)<=O},P.prototype.signedDistanceTo=function(l){return B.e.Dot(l,this.normal)+this.d},P.FromArray=function(l){return new P(l[0],l[1],l[2],l[3])},P.FromPoints=function(l,O,R){var x=new P(0,0,0,0);return x.copyFromPoints(l,O,R),x},P.FromPositionAndNormal=function(l,O){var R=new P(0,0,0,0);return O.normalize(),R.normal=O,R.d=-(O.x*l.x+O.y*l.y+O.z*l.z),R},P.SignedDistanceToPlaneFromPositionAndNormal=function(l,O,R){var x=-(O.x*l.x+O.y*l.y+O.z*l.z);return B.e.Dot(R,O)+x},P._TmpMatrix=B.a.Identity(),P}()},function(Ae,v,f){f.d(v,"a",function(){return m});var B=f(7),_=f(20),P=f(6),l=f(0),O=f(18),R=f(39),x=f(60),m=(f(84),function(){function c(T){this._useAlternatePickedPointAboveMaxDragAngleDragSpeed=-1.1,this.maxDragAngle=0,this._useAlternatePickedPointAboveMaxDragAngle=!1,this.currentDraggingPointerID=-1,this.dragging=!1,this.dragDeltaRatio=.2,this.updateDragPlane=!0,this._debugMode=!1,this._moving=!1,this.onDragObservable=new P.c,this.onDragStartObservable=new P.c,this.onDragEndObservable=new P.c,this.moveAttached=!0,this.enabled=!0,this.startAndReleaseDragOnPointerEvents=!0,this.detachCameraControls=!0,this.useObjectOrientationForDragging=!0,this.validateDrag=function(S){return!0},this._tmpVector=new l.e(0,0,0),this._alternatePickedPoint=new l.e(0,0,0),this._worldDragAxis=new l.e(0,0,0),this._targetPosition=new l.e(0,0,0),this._attachedToElement=!1,this._startDragRay=new R.a(new l.e,new l.e),this._lastPointerRay={},this._dragDelta=new l.e,this._pointA=new l.e(0,0,0),this._pointC=new l.e(0,0,0),this._localAxis=new l.e(0,0,0),this._lookAt=new l.e(0,0,0),this._options=T||{};var A=0;if(this._options.dragAxis&&A++,this._options.dragPlaneNormal&&A++,A>1)throw"Multiple drag modes specified in dragBehavior options. Only one expected"}return Object.defineProperty(c.prototype,"options",{get:function(){return this._options},set:function(T){this._options=T},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"name",{get:function(){return"PointerDrag"},enumerable:!1,configurable:!0}),c.prototype.init=function(){},c.prototype.attach=function(T,A){var S=this;this._scene=T.getScene(),this.attachedNode=T,c._planeScene||(this._debugMode?c._planeScene=this._scene:(c._planeScene=new _.a(this._scene.getEngine(),{virtual:!0}),c._planeScene.detachControl(),this._scene.onDisposeObservable.addOnce(function(){c._planeScene.dispose(),c._planeScene=null}))),this._dragPlane=B.a.CreatePlane("pointerDragPlane",this._debugMode?1:1e4,c._planeScene,!1,B.a.DOUBLESIDE),this.lastDragPosition=new l.e(0,0,0);var g=A||function(u){return S.attachedNode==u||u.isDescendantOf(S.attachedNode)};this._pointerObserver=this._scene.onPointerObservable.add(function(u,h){if(S.enabled){if(u.type==O.a.POINTERDOWN)S.startAndReleaseDragOnPointerEvents&&!S.dragging&&u.pickInfo&&u.pickInfo.hit&&u.pickInfo.pickedMesh&&u.pickInfo.pickedPoint&&u.pickInfo.ray&&g(u.pickInfo.pickedMesh)&&S._startDrag(u.event.pointerId,u.pickInfo.ray,u.pickInfo.pickedPoint);else if(u.type==O.a.POINTERUP)S.startAndReleaseDragOnPointerEvents&&S.currentDraggingPointerID==u.event.pointerId&&S.releaseDrag();else if(u.type==O.a.POINTERMOVE){var b=u.event.pointerId;if(S.currentDraggingPointerID===c._AnyMouseID&&b!==c._AnyMouseID){var E=u.event;(E.pointerType==="mouse"||!S._scene.getEngine().hostInformation.isMobile&&E instanceof MouseEvent)&&(S._lastPointerRay[S.currentDraggingPointerID]&&(S._lastPointerRay[b]=S._lastPointerRay[S.currentDraggingPointerID],delete S._lastPointerRay[S.currentDraggingPointerID]),S.currentDraggingPointerID=b)}S._lastPointerRay[b]||(S._lastPointerRay[b]=new R.a(new l.e,new l.e)),u.pickInfo&&u.pickInfo.ray&&(S._lastPointerRay[b].origin.copyFrom(u.pickInfo.ray.origin),S._lastPointerRay[b].direction.copyFrom(u.pickInfo.ray.direction),S.currentDraggingPointerID==b&&S.dragging&&S._moveDrag(u.pickInfo.ray))}}}),this._beforeRenderObserver=this._scene.onBeforeRenderObservable.add(function(){S._moving&&S.moveAttached&&(x.a._RemoveAndStorePivotPoint(S.attachedNode),S._targetPosition.subtractToRef(S.attachedNode.absolutePosition,S._tmpVector),S._tmpVector.scaleInPlace(S.dragDeltaRatio),S.attachedNode.getAbsolutePosition().addToRef(S._tmpVector,S._tmpVector),S.validateDrag(S._tmpVector)&&S.attachedNode.setAbsolutePosition(S._tmpVector),x.a._RestorePivotPoint(S.attachedNode))})},c.prototype.releaseDrag=function(){if(this.dragging&&(this.dragging=!1,this.onDragEndObservable.notifyObservers({dragPlanePoint:this.lastDragPosition,pointerId:this.currentDraggingPointerID})),this.currentDraggingPointerID=-1,this._moving=!1,this.detachCameraControls&&this._attachedToElement&&this._scene.activeCamera&&!this._scene.activeCamera.leftCamera){if(this._scene.activeCamera.getClassName()==="ArcRotateCamera"){var T=this._scene.activeCamera;T.attachControl(!T.inputs||T.inputs.noPreventDefault,T._useCtrlForPanning,T._panningMouseButton)}else this._scene.activeCamera.attachControl(!this._scene.activeCamera.inputs||this._scene.activeCamera.inputs.noPreventDefault);this._attachedToElement=!1}},c.prototype.startDrag=function(T,A,S){T===void 0&&(T=c._AnyMouseID),this._startDrag(T,A,S);var g=this._lastPointerRay[T];T===c._AnyMouseID&&(g=this._lastPointerRay[Object.keys(this._lastPointerRay)[0]]),g&&this._moveDrag(g)},c.prototype._startDrag=function(T,A,S){if(this._scene.activeCamera&&!this.dragging&&this.attachedNode){x.a._RemoveAndStorePivotPoint(this.attachedNode),A?(this._startDragRay.direction.copyFrom(A.direction),this._startDragRay.origin.copyFrom(A.origin)):(this._startDragRay.origin.copyFrom(this._scene.activeCamera.position),this.attachedNode.getWorldMatrix().getTranslationToRef(this._tmpVector),this._tmpVector.subtractToRef(this._scene.activeCamera.position,this._startDragRay.direction)),this._updateDragPlanePosition(this._startDragRay,S||this._tmpVector);var g=this._pickWithRayOnDragPlane(this._startDragRay);g&&(this.dragging=!0,this.currentDraggingPointerID=T,this.lastDragPosition.copyFrom(g),this.onDragStartObservable.notifyObservers({dragPlanePoint:g,pointerId:this.currentDraggingPointerID}),this._targetPosition.copyFrom(this.attachedNode.absolutePosition),this.detachCameraControls&&this._scene.activeCamera&&this._scene.activeCamera.inputs&&!this._scene.activeCamera.leftCamera&&(this._scene.activeCamera.inputs.attachedToElement?(this._scene.activeCamera.detachControl(),this._attachedToElement=!0):this._attachedToElement=!1)),x.a._RestorePivotPoint(this.attachedNode)}},c.prototype._moveDrag=function(T){this._moving=!0;var A=this._pickWithRayOnDragPlane(T);if(A){this.updateDragPlane&&this._updateDragPlanePosition(T,A);var S=0;this._options.dragAxis?(this.useObjectOrientationForDragging?l.e.TransformCoordinatesToRef(this._options.dragAxis,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._worldDragAxis):this._worldDragAxis.copyFrom(this._options.dragAxis),A.subtractToRef(this.lastDragPosition,this._tmpVector),S=l.e.Dot(this._tmpVector,this._worldDragAxis),this._worldDragAxis.scaleToRef(S,this._dragDelta)):(S=this._dragDelta.length(),A.subtractToRef(this.lastDragPosition,this._dragDelta)),this._targetPosition.addInPlace(this._dragDelta),this.onDragObservable.notifyObservers({dragDistance:S,delta:this._dragDelta,dragPlanePoint:A,dragPlaneNormal:this._dragPlane.forward,pointerId:this.currentDraggingPointerID}),this.lastDragPosition.copyFrom(A)}},c.prototype._pickWithRayOnDragPlane=function(T){var A=this;if(!T)return null;var S=Math.acos(l.e.Dot(this._dragPlane.forward,T.direction));if(S>Math.PI/2&&(S=Math.PI-S),this.maxDragAngle>0&&S>this.maxDragAngle){if(this._useAlternatePickedPointAboveMaxDragAngle){this._tmpVector.copyFrom(T.direction),this.attachedNode.absolutePosition.subtractToRef(T.origin,this._alternatePickedPoint),this._alternatePickedPoint.normalize(),this._alternatePickedPoint.scaleInPlace(this._useAlternatePickedPointAboveMaxDragAngleDragSpeed*l.e.Dot(this._alternatePickedPoint,this._tmpVector)),this._tmpVector.addInPlace(this._alternatePickedPoint);var g=l.e.Dot(this._dragPlane.forward,this._tmpVector);return this._dragPlane.forward.scaleToRef(-g,this._alternatePickedPoint),this._alternatePickedPoint.addInPlace(this._tmpVector),this._alternatePickedPoint.addInPlace(this.attachedNode.absolutePosition),this._alternatePickedPoint}return null}var u=c._planeScene.pickWithRay(T,function(h){return h==A._dragPlane});return u&&u.hit&&u.pickedMesh&&u.pickedPoint?u.pickedPoint:null},c.prototype._updateDragPlanePosition=function(T,A){this._pointA.copyFrom(A),this._options.dragAxis?(this.useObjectOrientationForDragging?l.e.TransformCoordinatesToRef(this._options.dragAxis,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragAxis),T.origin.subtractToRef(this._pointA,this._pointC),this._pointC.normalize(),Math.abs(l.e.Dot(this._localAxis,this._pointC))>.999?Math.abs(l.e.Dot(l.e.UpReadOnly,this._pointC))>.999?this._lookAt.copyFrom(l.e.Right()):this._lookAt.copyFrom(l.e.UpReadOnly):(l.e.CrossToRef(this._localAxis,this._pointC,this._lookAt),l.e.CrossToRef(this._localAxis,this._lookAt,this._lookAt),this._lookAt.normalize()),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._lookAt,this._lookAt),this._dragPlane.lookAt(this._lookAt)):this._options.dragPlaneNormal?(this.useObjectOrientationForDragging?l.e.TransformCoordinatesToRef(this._options.dragPlaneNormal,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragPlaneNormal),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._localAxis,this._lookAt),this._dragPlane.lookAt(this._lookAt)):(this._dragPlane.position.copyFrom(this._pointA),this._dragPlane.lookAt(T.origin)),this._dragPlane.position.copyFrom(this.attachedNode.absolutePosition),this._dragPlane.computeWorldMatrix(!0)},c.prototype.detach=function(){this._pointerObserver&&this._scene.onPointerObservable.remove(this._pointerObserver),this._beforeRenderObserver&&this._scene.onBeforeRenderObservable.remove(this._beforeRenderObserver),this.releaseDrag()},c._AnyMouseID=-2,c}())},function(Ae,v,f){f.d(v,"a",function(){return _}),f.d(v,"b",function(){return P}),f.d(v,"c",function(){return l});var B=f(1),_=function(){function O(){}return O.KEYDOWN=1,O.KEYUP=2,O}(),P=function(O,R){this.type=O,this.event=R},l=function(O){function R(x,m){var c=O.call(this,x,m)||this;return c.type=x,c.event=m,c.skipOnPointerObservable=!1,c}return Object(B.d)(R,O),R}(P)},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}return _.prototype.unBindMesh=function(){this._mesh=null},_.prototype.addFallback=function(P,l){this._defines[P]||(Pthis._maxRank&&(this._maxRank=P),this._defines[P]=new Array),this._defines[P].push(l)},_.prototype.addCPUSkinningFallback=function(P,l){this._mesh=l,Pthis._maxRank&&(this._maxRank=P)},Object.defineProperty(_.prototype,"hasMoreFallbacks",{get:function(){return this._currentRank<=this._maxRank},enumerable:!1,configurable:!0}),_.prototype.reduce=function(P,l){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,P=P.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),l._bonesComputationForcedToCPU=!0;for(var O=this._mesh.getScene(),R=0;R0&&(x.computeBonesUsingShaders=!1)}}else{var T=this._defines[this._currentRank];if(T)for(R=0;R=this.subMaterials.length?this.getScene().defaultMaterial:this.subMaterials[m]},x.prototype.getActiveTextures=function(){var m;return(m=R.prototype.getActiveTextures.call(this)).concat.apply(m,this.subMaterials.map(function(c){return c?c.getActiveTextures():[]}))},x.prototype.hasTexture=function(m){var c;if(R.prototype.hasTexture.call(this,m))return!0;for(var T=0;T=0&&A.multiMaterials.splice(S,1),R.prototype.dispose.call(this,m,c)}},x.ParseMultiMaterial=function(m,c){var T=new x(m.name,c);T.id=m.id,P.a&&P.a.AddTagsTo(T,m.tags);for(var A=0;A"u")return new OffscreenCanvas(P,l);var O=document.createElement("canvas");return O.width=P,O.height=l,O},_}()},function(Ae,v,f){f.d(v,"a",function(){return S});var B=f(0),_=f(9),P=f(16),l=f(4),O=f(61),R=f(69),x=f(43),m=f(2),c=f(12),T=f(37),A=f(101),S=function(){function g(u,h,b,E,D){E===void 0&&(E=!1),D===void 0&&(D=null),this.delayLoadState=m.a.DELAYLOADSTATE_NONE,this._totalVertices=0,this._isDisposed=!1,this._indexBufferIsUpdatable=!1,this._positionsCache=[],this.useBoundingInfoFromGeometry=!1,this.id=u,this.uniqueId=h.getUniqueId(),this._engine=h.getEngine(),this._meshes=[],this._scene=h,this._vertexBuffers={},this._indices=[],this._updatable=E,b?this.setAllVerticesData(b,E):(this._totalVertices=0,this._indices=[]),this._engine.getCaps().vertexArrayObject&&(this._vertexArrayObjects={}),D&&(this.applyToMesh(D),D.computeWorldMatrix(!0))}return Object.defineProperty(g.prototype,"boundingBias",{get:function(){return this._boundingBias},set:function(u){this._boundingBias?this._boundingBias.copyFrom(u):this._boundingBias=u.clone(),this._updateBoundingInfo(!0,null)},enumerable:!1,configurable:!0}),g.CreateGeometryForMesh=function(u){var h=new g(g.RandomId(),u.getScene());return h.applyToMesh(u),h},Object.defineProperty(g.prototype,"meshes",{get:function(){return this._meshes},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"extend",{get:function(){return this._extend},enumerable:!1,configurable:!0}),g.prototype.getScene=function(){return this._scene},g.prototype.getEngine=function(){return this._engine},g.prototype.isReady=function(){return this.delayLoadState===m.a.DELAYLOADSTATE_LOADED||this.delayLoadState===m.a.DELAYLOADSTATE_NONE},Object.defineProperty(g.prototype,"doNotSerialize",{get:function(){for(var u=0;u0&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices)),this._indexBuffer&&(this._indexBuffer.references=h),u._syncGeometryWithMorphTargetManager(),u.synchronizeInstances()},g.prototype.notifyUpdate=function(u){this.onGeometryUpdated&&this.onGeometryUpdated(this,u);for(var h=0,b=this._meshes;h0){for(var h=0;h0){for(h=0;h0){for(h=0;h0){var N=new Float32Array(u,w.positionsAttrDesc.offset,w.positionsAttrDesc.count);h.setVerticesData(l.b.PositionKind,N,!1)}if(w.normalsAttrDesc&&w.normalsAttrDesc.count>0){var I=new Float32Array(u,w.normalsAttrDesc.offset,w.normalsAttrDesc.count);h.setVerticesData(l.b.NormalKind,I,!1)}if(w.tangetsAttrDesc&&w.tangetsAttrDesc.count>0){var V=new Float32Array(u,w.tangetsAttrDesc.offset,w.tangetsAttrDesc.count);h.setVerticesData(l.b.TangentKind,V,!1)}if(w.uvsAttrDesc&&w.uvsAttrDesc.count>0){var X=new Float32Array(u,w.uvsAttrDesc.offset,w.uvsAttrDesc.count);h.setVerticesData(l.b.UVKind,X,!1)}if(w.uvs2AttrDesc&&w.uvs2AttrDesc.count>0){var j=new Float32Array(u,w.uvs2AttrDesc.offset,w.uvs2AttrDesc.count);h.setVerticesData(l.b.UV2Kind,j,!1)}if(w.uvs3AttrDesc&&w.uvs3AttrDesc.count>0){var ne=new Float32Array(u,w.uvs3AttrDesc.offset,w.uvs3AttrDesc.count);h.setVerticesData(l.b.UV3Kind,ne,!1)}if(w.uvs4AttrDesc&&w.uvs4AttrDesc.count>0){var te=new Float32Array(u,w.uvs4AttrDesc.offset,w.uvs4AttrDesc.count);h.setVerticesData(l.b.UV4Kind,te,!1)}if(w.uvs5AttrDesc&&w.uvs5AttrDesc.count>0){var de=new Float32Array(u,w.uvs5AttrDesc.offset,w.uvs5AttrDesc.count);h.setVerticesData(l.b.UV5Kind,de,!1)}if(w.uvs6AttrDesc&&w.uvs6AttrDesc.count>0){var pe=new Float32Array(u,w.uvs6AttrDesc.offset,w.uvs6AttrDesc.count);h.setVerticesData(l.b.UV6Kind,pe,!1)}if(w.colorsAttrDesc&&w.colorsAttrDesc.count>0){var ae=new Float32Array(u,w.colorsAttrDesc.offset,w.colorsAttrDesc.count);h.setVerticesData(l.b.ColorKind,ae,!1,w.colorsAttrDesc.stride)}if(w.matricesIndicesAttrDesc&&w.matricesIndicesAttrDesc.count>0){for(var ee=new Int32Array(u,w.matricesIndicesAttrDesc.offset,w.matricesIndicesAttrDesc.count),K=[],$=0;$>8),K.push((16711680&L)>>16),K.push(L>>24&255)}h.setVerticesData(l.b.MatricesIndicesKind,K,!1)}if(w.matricesIndicesExtraAttrDesc&&w.matricesIndicesExtraAttrDesc.count>0){for(ee=new Int32Array(u,w.matricesIndicesExtraAttrDesc.offset,w.matricesIndicesExtraAttrDesc.count),K=[],$=0;$>8),K.push((16711680&L)>>16),K.push(L>>24&255);h.setVerticesData(l.b.MatricesIndicesExtraKind,K,!1)}if(w.matricesWeightsAttrDesc&&w.matricesWeightsAttrDesc.count>0){var G=new Float32Array(u,w.matricesWeightsAttrDesc.offset,w.matricesWeightsAttrDesc.count);h.setVerticesData(l.b.MatricesWeightsKind,G,!1)}if(w.indicesAttrDesc&&w.indicesAttrDesc.count>0){var Q=new Int32Array(u,w.indicesAttrDesc.offset,w.indicesAttrDesc.count);h.setIndices(Q,null)}if(w.subMeshesAttrDesc&&w.subMeshesAttrDesc.count>0){var oe=new Int32Array(u,w.subMeshesAttrDesc.offset,5*w.subMeshesAttrDesc.count);for(h.subMeshes=[],$=0;$>8),K.push((16711680&W)>>16),K.push(W>>24&255)}h.setVerticesData(l.b.MatricesIndicesKind,K,u.matricesIndices._updatable)}if(u.matricesIndicesExtra)if(u.matricesIndicesExtra._isExpanded)delete u.matricesIndices._isExpanded,h.setVerticesData(l.b.MatricesIndicesExtraKind,u.matricesIndicesExtra,u.matricesIndicesExtra._updatable);else{for(K=[],$=0;$>8),K.push((16711680&W)>>16),K.push(W>>24&255);h.setVerticesData(l.b.MatricesIndicesExtraKind,K,u.matricesIndicesExtra._updatable)}u.matricesWeights&&(g._CleanMatricesWeights(u,h),h.setVerticesData(l.b.MatricesWeightsKind,u.matricesWeights,u.matricesWeights._updatable)),u.matricesWeightsExtra&&h.setVerticesData(l.b.MatricesWeightsExtraKind,u.matricesWeightsExtra,u.matricesWeights._updatable),h.setIndices(u.indices,null)}if(u.subMeshes){h.subMeshes=[];for(var q=0;q-1){var E=h.getScene().getLastSkeletonByID(u.skeletonId);if(E){b=E.bones.length;for(var D=h.getVerticesData(l.b.MatricesIndicesKind),w=h.getVerticesData(l.b.MatricesIndicesExtraKind),N=u.matricesWeights,I=u.matricesWeightsExtra,V=u.numBoneInfluencer,X=N.length,j=0;jV-1)&&(te=V-1),ne>.001){var ae=1/ne;for(de=0;de<4;de++)N[j+de]*=ae;if(I)for(de=0;de<4;de++)I[j+de]*=ae}else te>=4?(I[j+te-4]=1-ne,w[j+te-4]=b):(N[j+te]=1-ne,D[j+te]=b)}h.setVerticesData(l.b.MatricesIndicesKind,D),u.matricesWeightsExtra&&h.setVerticesData(l.b.MatricesIndicesExtraKind,w)}}}},g.Parse=function(u,h,b){if(h.getGeometryByID(u.id))return null;var E=new g(u.id,h,void 0,u.updatable);return T.a&&T.a.AddTagsTo(E,u.tags),u.delayLoadingFile?(E.delayLoadState=m.a.DELAYLOADSTATE_NOTLOADED,E.delayLoadingFile=b+u.delayLoadingFile,E._boundingInfo=new x.a(B.e.FromArray(u.boundingBoxMinimum),B.e.FromArray(u.boundingBoxMaximum)),E._delayInfo=[],u.hasUVs&&E._delayInfo.push(l.b.UVKind),u.hasUVs2&&E._delayInfo.push(l.b.UV2Kind),u.hasUVs3&&E._delayInfo.push(l.b.UV3Kind),u.hasUVs4&&E._delayInfo.push(l.b.UV4Kind),u.hasUVs5&&E._delayInfo.push(l.b.UV5Kind),u.hasUVs6&&E._delayInfo.push(l.b.UV6Kind),u.hasColors&&E._delayInfo.push(l.b.ColorKind),u.hasMatricesIndices&&E._delayInfo.push(l.b.MatricesIndicesKind),u.hasMatricesWeights&&E._delayInfo.push(l.b.MatricesWeightsKind),E._delayLoadingFunction=P.a.ImportVertexData):P.a.ImportVertexData(u,E),h.pushGeometry(E,!0),E},g}()},function(Ae,v,f){f.d(v,"e",function(){return B}),f.d(v,"c",function(){return O}),f.d(v,"a",function(){return R}),f.d(v,"b",function(){return x}),f.d(v,"f",function(){return m}),f.d(v,"g",function(){return c}),f.d(v,"d",function(){return T});var B,_=f(14),P=f(0),l=f(28);(function(A){A[A.CW=0]="CW",A[A.CCW=1]="CCW"})(B||(B={}));var O=function(){function A(){}return A.Interpolate=function(S,g,u,h,b){for(var E=1-3*h+3*g,D=3*h-6*g,w=3*g,N=S,I=0;I<5;I++){var V=N*N;N-=(E*(V*N)+D*V+w*N-S)*(1/(3*E*V+2*D*N+w)),N=Math.min(1,Math.max(0,N))}return 3*Math.pow(1-N,2)*N*u+3*(1-N)*Math.pow(N,2)*b+Math.pow(N,3)},A}(),R=function(){function A(S){this._radians=S,this._radians<0&&(this._radians+=2*Math.PI)}return A.prototype.degrees=function(){return 180*this._radians/Math.PI},A.prototype.radians=function(){return this._radians},A.BetweenTwoPoints=function(S,g){var u=g.subtract(S);return new A(Math.atan2(u.y,u.x))},A.FromRadians=function(S){return new A(S)},A.FromDegrees=function(S){return new A(S*Math.PI/180)},A}(),x=function(A,S,g){this.startPoint=A,this.midPoint=S,this.endPoint=g;var u=Math.pow(S.x,2)+Math.pow(S.y,2),h=(Math.pow(A.x,2)+Math.pow(A.y,2)-u)/2,b=(u-Math.pow(g.x,2)-Math.pow(g.y,2))/2,E=(A.x-S.x)*(S.y-g.y)-(S.x-g.x)*(A.y-S.y);this.centerPoint=new P.d((h*(S.y-g.y)-b*(A.y-S.y))/E,((A.x-S.x)*b-(S.x-g.x)*h)/E),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=R.BetweenTwoPoints(this.centerPoint,this.startPoint);var D=this.startAngle.degrees(),w=R.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),N=R.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();w-D>180&&(w-=360),w-D<-180&&(w+=360),N-w>180&&(N-=360),N-w<-180&&(N+=360),this.orientation=w-D<0?B.CW:B.CCW,this.angle=R.FromDegrees(this.orientation===B.CW?D-N:N-D)},m=function(){function A(S,g){this._points=new Array,this._length=0,this.closed=!1,this._points.push(new P.d(S,g))}return A.prototype.addLineTo=function(S,g){if(this.closed)return this;var u=new P.d(S,g),h=this._points[this._points.length-1];return this._points.push(u),this._length+=u.subtract(h).length(),this},A.prototype.addArcTo=function(S,g,u,h,b){if(b===void 0&&(b=36),this.closed)return this;var E=this._points[this._points.length-1],D=new P.d(S,g),w=new P.d(u,h),N=new x(E,D,w),I=N.angle.radians()/b;N.orientation===B.CW&&(I*=-1);for(var V=N.startAngle.radians()+I,X=0;X1)return P.d.Zero();for(var g=S*this.length(),u=0,h=0;h=u&&g<=w){var N=D.normalize(),I=g-u;return new P.d(E.x+N.x*I,E.y+N.y*I)}u=w}return P.d.Zero()},A.StartingAt=function(S,g){return new A(S,g)},A}(),c=function(){function A(S,g,u,h){g===void 0&&(g=null),h===void 0&&(h=!1),this.path=S,this._curve=new Array,this._distances=new Array,this._tangents=new Array,this._normals=new Array,this._binormals=new Array,this._pointAtData={id:0,point:P.e.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:P.a.Identity()};for(var b=0;bg){var u=S;S=g,g=u}var h=this.getCurve(),b=this.getPointAt(S),E=this.getPreviousPointIndexAt(S),D=this.getPointAt(g),w=this.getPreviousPointIndexAt(g)+1,N=[];return S!==0&&(E++,N.push(b)),N.push.apply(N,h.slice(E,w)),g===1&&S!==1||N.push(D),new A(N,this.getNormalAt(S),this._raw,this._alignTangentsWithPath)},A.prototype.update=function(S,g,u){g===void 0&&(g=null),u===void 0&&(u=!1);for(var h=0;hg+1;)g++,u=this._curve[S].subtract(this._curve[S-g]);return u},A.prototype._normalVector=function(S,g){var u,h,b=S.length();return b===0&&(b=1),g==null?(h=_.a.WithinEpsilon(Math.abs(S.y)/b,1,l.a)?_.a.WithinEpsilon(Math.abs(S.x)/b,1,l.a)?_.a.WithinEpsilon(Math.abs(S.z)/b,1,l.a)?P.e.Zero():new P.e(0,0,1):new P.e(1,0,0):new P.e(0,-1,0),u=P.e.Cross(S,h)):(u=P.e.Cross(S,g),P.e.CrossToRef(u,S,u)),u.normalize(),u},A.prototype._updatePointAtData=function(S,g){if(g===void 0&&(g=!1),this._pointAtData.id===S)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=S;var u=this.getPoints();if(S<=0)return this._setPointAtData(0,0,u[0],0,g);if(S>=1)return this._setPointAtData(1,1,u[u.length-1],u.length-1,g);for(var h,b=u[0],E=0,D=S*this.length(),w=1;wD){var I=(E-D)/N,V=b.subtract(h),X=h.add(V.scaleInPlace(I));return this._setPointAtData(S,1-I,X,w-1,g)}b=h}return this._pointAtData},A.prototype._setPointAtData=function(S,g,u,h,b){return this._pointAtData.point=u,this._pointAtData.position=S,this._pointAtData.subPosition=g,this._pointAtData.previousPointArrayIndex=h,this._pointAtData.interpolateReady=b,b&&this._updateInterpolationMatrix(),this._pointAtData},A.prototype._updateInterpolationMatrix=function(){this._pointAtData.interpolationMatrix=P.a.Identity();var S=this._pointAtData.previousPointArrayIndex;if(S!==this._tangents.length-1){var g=S+1,u=this._tangents[S].clone(),h=this._normals[S].clone(),b=this._binormals[S].clone(),E=this._tangents[g].clone(),D=this._normals[g].clone(),w=this._binormals[g].clone(),N=P.b.RotationQuaternionFromAxis(h,b,u),I=P.b.RotationQuaternionFromAxis(D,w,E);P.b.Slerp(N,I,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}},A}(),T=function(){function A(S){this._length=0,this._points=S,this._length=this._computeLength(S)}return A.CreateQuadraticBezier=function(S,g,u,h){h=h>2?h:3;for(var b=new Array,E=function(w,N,I,V){return(1-w)*(1-w)*N+2*w*(1-w)*I+w*w*V},D=0;D<=h;D++)b.push(new P.e(E(D/h,S.x,g.x,u.x),E(D/h,S.y,g.y,u.y),E(D/h,S.z,g.z,u.z)));return new A(b)},A.CreateCubicBezier=function(S,g,u,h,b){b=b>3?b:4;for(var E=new Array,D=function(N,I,V,X,j){return(1-N)*(1-N)*(1-N)*I+3*N*(1-N)*(1-N)*V+3*N*N*(1-N)*X+N*N*N*j},w=0;w<=b;w++)E.push(new P.e(D(w/b,S.x,g.x,u.x,h.x),D(w/b,S.y,g.y,u.y,h.y),D(w/b,S.z,g.z,u.z,h.z)));return new A(E)},A.CreateHermiteSpline=function(S,g,u,h,b){for(var E=new Array,D=1/b,w=0;w<=b;w++)E.push(P.e.Hermite(S,g,u,h,w*D));return new A(E)},A.CreateCatmullRomSpline=function(S,g,u){var h=new Array,b=1/g,E=0;if(u){for(var D=S.length,w=0;w1&&(this._multiview=!0,X.push("#define MULTIVIEW"),this._options.uniforms.indexOf("viewProjection")!==-1&&this._options.uniforms.push("viewProjectionR")===-1&&this._options.uniforms.push("viewProjectionR"));for(var te=0;te4&&(j.push(l.b.MatricesIndicesExtraKind),j.push(l.b.MatricesWeightsExtraKind));var pe=E.skeleton;de=E.numBoneInfluencers,X.push("#define NUM_BONE_INFLUENCERS "+de),ne.addCPUSkinningFallback(0,E),pe.isUsingTextureForMatrices?(X.push("#define BONETEXTURE"),this._options.uniforms.indexOf("boneTextureWidth")===-1&&this._options.uniforms.push("boneTextureWidth"),this._options.samplers.indexOf("boneSampler")===-1&&this._options.samplers.push("boneSampler")):(X.push("#define BonesPerMesh "+(pe.bones.length+1)),this._options.uniforms.indexOf("mBones")===-1&&this._options.uniforms.push("mBones"))}else X.push("#define NUM_BONE_INFLUENCERS 0");for(var ae in this._textures)if(!this._textures[ae].isReady())return!1;E&&this._shouldTurnAlphaTestOn(E)&&X.push("#define ALPHATEST");var ee=this._shaderPath,K=this._options.uniforms,$=this._options.uniformBuffers,L=this._options.samplers;this.customShaderNameResolve&&(K=K.slice(),$=$.slice(),L=L.slice(),ee=this.customShaderNameResolve(ee,K,$,L,X,j));var G=this._effect,Q=X.join(` -`);return this._cachedDefines!==Q&&(this._cachedDefines=Q,this._effect=V.createEffect(ee,{attributes:j,uniformsNames:K,uniformBuffersNames:$,samplers:L,defines:Q,fallbacks:ne,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousMorphTargets:de}},V),this._onEffectCreatedObservable&&(g.effect=this._effect,this._onEffectCreatedObservable.notifyObservers(g))),(N=!(!((w=this._effect)===null||w===void 0)&&w.isReady()))!==null&&N!==void 0&&!N&&(G!==this._effect&&I.resetCachedMaterial(),this._renderId=I.getRenderId(),this._effect._wasPreviouslyReady=!0,!0)},b.prototype.bindOnlyWorldMatrix=function(E,D){var w=this.getScene(),N=D??this._effect;N&&(this._options.uniforms.indexOf("world")!==-1&&N.setMatrix("world",E),this._options.uniforms.indexOf("worldView")!==-1&&(E.multiplyToRef(w.getViewMatrix(),this._cachedWorldViewMatrix),N.setMatrix("worldView",this._cachedWorldViewMatrix)),this._options.uniforms.indexOf("worldViewProjection")!==-1&&(E.multiplyToRef(w.getTransformMatrix(),this._cachedWorldViewProjectionMatrix),N.setMatrix("worldViewProjection",this._cachedWorldViewProjectionMatrix)))},b.prototype.bindForSubMesh=function(E,D,w){this.bind(E,D,w._effectOverride)},b.prototype.bind=function(E,D,w){this.bindOnlyWorldMatrix(E,w);var N=w??this._effect;if(N&&this.getScene().getCachedMaterial()!==this){var I;for(I in this._options.uniforms.indexOf("view")!==-1&&N.setMatrix("view",this.getScene().getViewMatrix()),this._options.uniforms.indexOf("projection")!==-1&&N.setMatrix("projection",this.getScene().getProjectionMatrix()),this._options.uniforms.indexOf("viewProjection")!==-1&&(N.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._multiview&&N.setMatrix("viewProjectionR",this.getScene()._transformMatrixR)),this.getScene().activeCamera&&this._options.uniforms.indexOf("cameraPosition")!==-1&&N.setVector3("cameraPosition",this.getScene().activeCamera.globalPosition),R.a.BindBonesParameters(D,N),this._textures)N.setTexture(I,this._textures[I]);for(I in this._textureArrays)N.setTextureArray(I,this._textureArrays[I]);for(I in this._ints)N.setInt(I,this._ints[I]);for(I in this._floats)N.setFloat(I,this._floats[I]);for(I in this._floatsArrays)N.setArray(I,this._floatsArrays[I]);for(I in this._colors3)N.setColor3(I,this._colors3[I]);for(I in this._colors3Arrays)N.setArray3(I,this._colors3Arrays[I]);for(I in this._colors4){var V=this._colors4[I];N.setFloat4(I,V.r,V.g,V.b,V.a)}for(I in this._colors4Arrays)N.setArray4(I,this._colors4Arrays[I]);for(I in this._vectors2)N.setVector2(I,this._vectors2[I]);for(I in this._vectors3)N.setVector3(I,this._vectors3[I]);for(I in this._vectors4)N.setVector4(I,this._vectors4[I]);for(I in this._matrices)N.setMatrix(I,this._matrices[I]);for(I in this._matrixArrays)N.setMatrices(I,this._matrixArrays[I]);for(I in this._matrices3x3)N.setMatrix3x3(I,this._matrices3x3[I]);for(I in this._matrices2x2)N.setMatrix2x2(I,this._matrices2x2[I]);for(I in this._vectors2Arrays)N.setArray2(I,this._vectors2Arrays[I]);for(I in this._vectors3Arrays)N.setArray3(I,this._vectors3Arrays[I]);for(I in this._vectors4Arrays)N.setArray4(I,this._vectors4Arrays[I])}var X=this._effect;this._effect=N,this._afterBind(D),this._effect=X},b.prototype._afterBind=function(E){h.prototype._afterBind.call(this,E),this.getScene()._cachedEffect=this._effect},b.prototype.getActiveTextures=function(){var E=h.prototype.getActiveTextures.call(this);for(var D in this._textures)E.push(this._textures[D]);for(var D in this._textureArrays)for(var w=this._textureArrays[D],N=0;NI.snapDistance){var ee=Math.floor(Math.abs(j)/I.snapDistance);j%=I.snapDistance,ae.delta.normalizeToRef(ne),ne.scaleInPlace(I.snapDistance*ee),I.attachedNode.getWorldMatrix().addTranslationFromFloats(ne.x,ne.y,ne.z),I.attachedNode.updateCache(),te.snapDistance=I.snapDistance*ee,I.onSnapObservable.notifyObservers(te)}I._matrixChanged()}}),I.dragBehavior.onDragStartObservable.add(function(){I._dragging=!0}),I.dragBehavior.onDragEndObservable.add(function(){I._dragging=!1});var de=E._getSharedGizmoLight();de.includedOnlyMeshes=de.includedOnlyMeshes.concat(I._rootMesh.getChildMeshes(!1));var pe={gizmoMeshes:V.getChildMeshes(),colliderMeshes:X.getChildMeshes(),material:I._coloredMaterial,hoverMaterial:I._hoverMaterial,disableMaterial:I._disableMaterial,active:!1};return(N=I._parent)===null||N===void 0||N.addToAxisCache(X,pe),I._pointerObserver=E.utilityLayerScene.onPointerObservable.add(function(ae){var ee;if(!I._customMeshSet&&(I._isHovered=pe.colliderMeshes.indexOf((ee=ae?.pickInfo)===null||ee===void 0?void 0:ee.pickedMesh)!=-1,!I._parent)){var K=I._isHovered||I._dragging?I._hoverMaterial:I._coloredMaterial;pe.gizmoMeshes.forEach(function($){$.material=K,$.color&&($.color=K.diffuseColor)})}}),I}return Object(B.d)(u,g),u._CreateArrow=function(h,b,E,D){E===void 0&&(E=1),D===void 0&&(D=!1);var w=new l.a("arrow",h),N=R.a.CreateCylinder("cylinder",{diameterTop:0,height:.075,diameterBottom:.0375*(1+(E-1)/4),tessellation:96},h),I=R.a.CreateCylinder("cylinder",{diameterTop:.005*E,height:.275,diameterBottom:.005*E,tessellation:96},h);return N.parent=w,N.material=b,N.rotation.x=Math.PI/2,N.position.z+=.3,I.parent=w,I.material=b,I.position.z+=.1375,I.rotation.x=Math.PI/2,D&&(I.visibility=0,N.visibility=0),w},u._CreateArrowInstance=function(h,b){for(var E=new l.a("arrow",h),D=0,w=b.getChildMeshes();D0 -#ifdef BONETEXTURE -uniform sampler2D boneSampler; -uniform float boneTextureWidth; -#else -uniform mat4 mBones[BonesPerMesh]; -#ifdef BONES_VELOCITY_ENABLED -uniform mat4 mPreviousBones[BonesPerMesh]; -#endif -#endif -attribute vec4 matricesIndices; -attribute vec4 matricesWeights; -#if NUM_BONE_INFLUENCERS>4 -attribute vec4 matricesIndicesExtra; -attribute vec4 matricesWeightsExtra; -#endif -#ifdef BONETEXTURE -#define inline -mat4 readMatrixFromRawSampler(sampler2D smp,float index) -{ -float offset=index*4.0; -float dx=1.0/boneTextureWidth; -vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),0.)); -vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),0.)); -vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),0.)); -vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),0.)); -return mat4(m0,m1,m2,m3); -} -#endif -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="instancesDeclaration",_=`#ifdef INSTANCES -attribute vec4 world0; -attribute vec4 world1; -attribute vec4 world2; -attribute vec4 world3; -#ifdef THIN_INSTANCES -uniform mat4 world; -#endif -#else -uniform mat4 world; -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="instancesVertex",_=`#ifdef INSTANCES -mat4 finalWorld=mat4(world0,world1,world2,world3); -#ifdef THIN_INSTANCES -finalWorld=world*finalWorld; -#endif -#else -mat4 finalWorld=world; -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B=`#if NUM_BONE_INFLUENCERS>0 -mat4 influence; -#ifdef BONETEXTURE -influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0]; -#if NUM_BONE_INFLUENCERS>1 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1]; -#endif -#if NUM_BONE_INFLUENCERS>2 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2]; -#endif -#if NUM_BONE_INFLUENCERS>3 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3]; -#endif -#if NUM_BONE_INFLUENCERS>4 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0]; -#endif -#if NUM_BONE_INFLUENCERS>5 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1]; -#endif -#if NUM_BONE_INFLUENCERS>6 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2]; -#endif -#if NUM_BONE_INFLUENCERS>7 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3]; -#endif -#else -influence=mBones[int(matricesIndices[0])]*matricesWeights[0]; -#if NUM_BONE_INFLUENCERS>1 -influence+=mBones[int(matricesIndices[1])]*matricesWeights[1]; -#endif -#if NUM_BONE_INFLUENCERS>2 -influence+=mBones[int(matricesIndices[2])]*matricesWeights[2]; -#endif -#if NUM_BONE_INFLUENCERS>3 -influence+=mBones[int(matricesIndices[3])]*matricesWeights[3]; -#endif -#if NUM_BONE_INFLUENCERS>4 -influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; -#endif -#if NUM_BONE_INFLUENCERS>5 -influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; -#endif -#if NUM_BONE_INFLUENCERS>6 -influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; -#endif -#if NUM_BONE_INFLUENCERS>7 -influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; -#endif -#endif -finalWorld=finalWorld*influence; -#endif`;f(5).a.IncludesShadersStore.bonesVertex=B},function(Ae,v,f){f.d(v,"a",function(){return R});var B=f(0),_=f(7),P=f(4),l=f(16),O=f(43);l.a.CreateRibbon=function(x){var m=x.pathArray,c=x.closeArray||!1,T=x.closePath||!1,A=x.invertUV||!1,S=Math.floor(m[0].length/2),g=x.offset||S;g=g>S?S:Math.floor(g);var u,h,b,E,D=x.sideOrientation===0?0:x.sideOrientation||l.a.DEFAULTSIDE,w=x.uvs,N=x.colors,I=[],V=[],X=[],j=[],ne=[],te=[],de=[],pe=[],ae=[],ee=[];if(m.length<2){var K=[],$=[];for(b=0;b0&&(Q=L[E].subtract(L[E-1]).length()+de[h],ne[h].push(Q),de[h]=Q),E++;T&&(E--,I.push(L[0].x,L[0].y,L[0].z),Q=L[E].subtract(L[0]).length()+de[h],ne[h].push(Q),de[h]=Q),ae[h]=G+k,ee[h]=Y,Y+=G+k}var H,Z,W=null,q=null;for(b=0;b=B.a.ACTION_OnPickTrigger&&O<=B.a.ACTION_OnPickUpTrigger)return!0}return!1},enumerable:!1,configurable:!0}),P.HasSpecificTrigger=function(l){for(var O in P.Triggers)if(P.Triggers.hasOwnProperty(O)&&parseInt(O)===l)return!0;return!1},P.Triggers={},P}()},function(Ae,v,f){f.d(v,"a",function(){return R});var B=f(1),_=f(25),P=f(3),l=f(19),O=f(15),R=function(){function x(m){this._texture=null,this.diffuseBlendLevel=1,this.roughnessBlendLevel=1,this.bumpLevel=1,this._normalBlendMethod=_.a.MATERIAL_NORMALBLENDMETHOD_WHITEOUT,this._isEnabled=!1,this.isEnabled=!1,this._internalMarkAllSubMeshesAsTexturesDirty=m}return x.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},x.prototype.isReadyForSubMesh=function(m,c){var T=c.getEngine();return!(m._areTexturesDirty&&c.texturesEnabled&&T.getCaps().standardDerivatives&&this._texture&&l.a.DetailTextureEnabled&&!this._texture.isReady())},x.prototype.prepareDefines=function(m,c){if(this._isEnabled){m.DETAIL_NORMALBLENDMETHOD=this._normalBlendMethod;var T=c.getEngine();m._areTexturesDirty&&(T.getCaps().standardDerivatives&&this._texture&&l.a.DetailTextureEnabled&&this._isEnabled?(O.a.PrepareDefinesForMergedUV(this._texture,m,"DETAIL"),m.DETAIL_NORMALBLENDMETHOD=this._normalBlendMethod):m.DETAIL=!1)}else m.DETAIL=!1},x.prototype.bindForSubMesh=function(m,c,T){this._isEnabled&&(m.useUbo&&T&&m.isSync||this._texture&&l.a.DetailTextureEnabled&&(m.updateFloat4("vDetailInfos",this._texture.coordinatesIndex,this.diffuseBlendLevel,this.bumpLevel,this.roughnessBlendLevel),O.a.BindTextureMatrix(this._texture,m,"detail")),c.texturesEnabled&&this._texture&&l.a.DetailTextureEnabled&&m.setTexture("detailSampler",this._texture))},x.prototype.hasTexture=function(m){return this._texture===m},x.prototype.getActiveTextures=function(m){this._texture&&m.push(this._texture)},x.prototype.getAnimatables=function(m){this._texture&&this._texture.animations&&this._texture.animations.length>0&&m.push(this._texture)},x.prototype.dispose=function(m){var c;m&&((c=this._texture)===null||c===void 0||c.dispose())},x.prototype.getClassName=function(){return"DetailMap"},x.AddUniforms=function(m){m.push("vDetailInfos")},x.AddSamplers=function(m){m.push("detailSampler")},x.PrepareUniformBuffer=function(m){m.addUniform("vDetailInfos",4),m.addUniform("detailMatrix",16)},x.prototype.copyTo=function(m){P.a.Clone(function(){return m},this)},x.prototype.serialize=function(){return P.a.Serialize(this)},x.prototype.parse=function(m,c,T){var A=this;P.a.Parse(function(){return A},m,c,T)},Object(B.c)([Object(P.m)("detailTexture"),Object(P.b)("_markAllSubMeshesAsTexturesDirty")],x.prototype,"texture",void 0),Object(B.c)([Object(P.c)()],x.prototype,"diffuseBlendLevel",void 0),Object(B.c)([Object(P.c)()],x.prototype,"roughnessBlendLevel",void 0),Object(B.c)([Object(P.c)()],x.prototype,"bumpLevel",void 0),Object(B.c)([Object(P.c)(),Object(P.b)("_markAllSubMeshesAsTexturesDirty")],x.prototype,"normalBlendMethod",void 0),Object(B.c)([Object(P.c)(),Object(P.b)("_markAllSubMeshesAsTexturesDirty")],x.prototype,"isEnabled",void 0),x}()},function(Ae,v,f){var B="morphTargetsVertexGlobalDeclaration",_=`#ifdef MORPHTARGETS -uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS]; -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="morphTargetsVertexDeclaration",_=`#ifdef MORPHTARGETS -attribute vec3 position{X}; -#ifdef MORPHTARGETS_NORMAL -attribute vec3 normal{X}; -#endif -#ifdef MORPHTARGETS_TANGENT -attribute vec3 tangent{X}; -#endif -#ifdef MORPHTARGETS_UV -attribute vec2 uv_{X}; -#endif -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){f.d(v,"a",function(){return l});var B=f(25),_=f(4),P=f(2),l=function(){function O(R){this._vertexBuffers={},this._scene=R}return O.prototype._prepareBuffers=function(){if(!this._vertexBuffers[_.b.PositionKind]){var R=[];R.push(1,1),R.push(-1,1),R.push(-1,-1),R.push(1,-1),this._vertexBuffers[_.b.PositionKind]=new _.b(this._scene.getEngine(),R,_.b.PositionKind,!1,!1,2),this._buildIndexBuffer()}},O.prototype._buildIndexBuffer=function(){var R=[];R.push(0),R.push(1),R.push(2),R.push(0),R.push(2),R.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(R)},O.prototype._rebuild=function(){var R=this._vertexBuffers[_.b.PositionKind];R&&(R._rebuild(),this._buildIndexBuffer())},O.prototype._prepareFrame=function(R,x){R===void 0&&(R=null),x===void 0&&(x=null);var m=this._scene.activeCamera;return!!m&&!(!(x=x||m._postProcesses.filter(function(c){return c!=null}))||x.length===0||!this._scene.postProcessesEnabled)&&(x[0].activate(m,R,x!=null),!0)},O.prototype.directRender=function(R,x,m,c,T,A){x===void 0&&(x=null),m===void 0&&(m=!1),c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=!1);for(var S=this._scene.getEngine(),g=0;g3?0:b,E);var ae=P.a.CreateRibbon(x,{pathArray:te,closeArray:u,closePath:h,updatable:w,sideOrientation:N,invertUV:V,frontUVs:X||void 0,backUVs:j||void 0},D);return ae._creationDataStorage.pathArray=te,ae._creationDataStorage.path3D=ne,ae._creationDataStorage.cap=b,ae},R}()},function(Ae,v,f){f.d(v,"b",function(){return c}),f.d(v,"a",function(){return T});var B=f(1),_=f(9),P=f(4),l=f(7),O=f(151),R=f(25),x=f(73),m=f(15),c=(f(166),f(167),function(A){function S(g,u,h,b,E,D,w){u===void 0&&(u=null),h===void 0&&(h=null),b===void 0&&(b=null);var N=A.call(this,g,u,h,b,E)||this;N.useVertexColor=D,N.useVertexAlpha=w,N.color=new _.a(1,1,1),N.alpha=1,b&&(N.color=b.color.clone(),N.alpha=b.alpha,N.useVertexColor=b.useVertexColor,N.useVertexAlpha=b.useVertexAlpha),N.intersectionThreshold=.1;var I={attributes:[P.b.PositionKind,"world0","world1","world2","world3"],uniforms:["vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","world","viewProjection"],needAlphaBlending:!0,defines:[]};return w===!1&&(I.needAlphaBlending=!1),D?(I.defines.push("#define VERTEXCOLOR"),I.attributes.push(P.b.ColorKind)):(I.uniforms.push("color"),N.color4=new _.b),N._colorShader=new x.a("colorShader",N.getScene(),"color",I),N}return Object(B.d)(S,A),S.prototype._addClipPlaneDefine=function(g){var u="#define "+g;this._colorShader.options.defines.indexOf(u)===-1&&this._colorShader.options.defines.push(u)},S.prototype._removeClipPlaneDefine=function(g){var u="#define "+g,h=this._colorShader.options.defines.indexOf(u);h!==-1&&this._colorShader.options.defines.splice(h,1)},S.prototype.isReady=function(){var g=this.getScene();return g.clipPlane?this._addClipPlaneDefine("CLIPPLANE"):this._removeClipPlaneDefine("CLIPPLANE"),g.clipPlane2?this._addClipPlaneDefine("CLIPPLANE2"):this._removeClipPlaneDefine("CLIPPLANE2"),g.clipPlane3?this._addClipPlaneDefine("CLIPPLANE3"):this._removeClipPlaneDefine("CLIPPLANE3"),g.clipPlane4?this._addClipPlaneDefine("CLIPPLANE4"):this._removeClipPlaneDefine("CLIPPLANE4"),g.clipPlane5?this._addClipPlaneDefine("CLIPPLANE5"):this._removeClipPlaneDefine("CLIPPLANE5"),g.clipPlane6?this._addClipPlaneDefine("CLIPPLANE6"):this._removeClipPlaneDefine("CLIPPLANE6"),!!this._colorShader.isReady(this)&&A.prototype.isReady.call(this)},S.prototype.getClassName=function(){return"LinesMesh"},Object.defineProperty(S.prototype,"material",{get:function(){return this._colorShader},set:function(g){},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"checkCollisions",{get:function(){return!1},enumerable:!1,configurable:!0}),S.prototype._bind=function(g,u,h){if(!this._geometry)return this;var b=this._colorShader.getEffect(),E=this.isUnIndexed?null:this._geometry.getIndexBuffer();if(this._geometry._bind(b,E),!this.useVertexColor){var D=this.color,w=D.r,N=D.g,I=D.b;this.color4.set(w,N,I,this.alpha),this._colorShader.setColor4("color",this.color4)}return m.a.BindClipPlane(b,this.getScene()),this},S.prototype._draw=function(g,u,h){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;var b=this.getScene().getEngine();return this._unIndexed?b.drawArraysType(R.a.LineListDrawMode,g.verticesStart,g.verticesCount,h):b.drawElementsType(R.a.LineListDrawMode,g.indexStart,g.indexCount,h),this},S.prototype.dispose=function(g){this._colorShader.dispose(!1,!1,!0),A.prototype.dispose.call(this,g)},S.prototype.clone=function(g,u,h){return u===void 0&&(u=null),new S(g,this.getScene(),u,this,h)},S.prototype.createInstance=function(g){return new T(g,this)},S}(l.a)),T=function(A){function S(g,u){var h=A.call(this,g,u)||this;return h.intersectionThreshold=u.intersectionThreshold,h}return Object(B.d)(S,A),S.prototype.getClassName=function(){return"InstancedLinesMesh"},S}(O.a)},function(Ae,v,f){f.r(v),f.d(v,"AxesViewer",function(){return R}),f.d(v,"BoneAxesViewer",function(){return c}),f.d(v,"DebugLayerTab",function(){return B}),f.d(v,"DebugLayer",function(){return u}),f.d(v,"PhysicsViewer",function(){return V}),f.d(v,"RayHelper",function(){return j}),f.d(v,"SkeletonViewer",function(){return K});var B,_=f(0),P=f(30),l=f(75),O=f(9),R=function(){function $(L,G,Q,oe,re,Y){if(G===void 0&&(G=1),Q===void 0&&(Q=2),this._scaleLinesFactor=4,this._instanced=!1,this.scene=null,this.scaleLines=1,this.scaleLines=G,!oe){var k=new P.a("",L);k.disableLighting=!0,k.emissiveColor=O.a.Red().scale(.5),oe=l.a._CreateArrow(L,k)}if(!re){var H=new P.a("",L);H.disableLighting=!0,H.emissiveColor=O.a.Green().scale(.5),re=l.a._CreateArrow(L,H)}if(!Y){var Z=new P.a("",L);Z.disableLighting=!0,Z.emissiveColor=O.a.Blue().scale(.5),Y=l.a._CreateArrow(L,Z)}this._xAxis=oe,this._xAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._yAxis=re,this._yAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._zAxis=Y,this._zAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),Q!=null&&($._SetRenderingGroupId(this._xAxis,Q),$._SetRenderingGroupId(this._yAxis,Q),$._SetRenderingGroupId(this._zAxis,Q)),this.scene=L,this.update(new _.e,_.e.Right(),_.e.Up(),_.e.Forward())}return Object.defineProperty($.prototype,"xAxis",{get:function(){return this._xAxis},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"yAxis",{get:function(){return this._yAxis},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zAxis",{get:function(){return this._zAxis},enumerable:!1,configurable:!0}),$.prototype.update=function(L,G,Q,oe){this._xAxis.position.copyFrom(L),this._xAxis.setDirection(G),this._xAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._yAxis.position.copyFrom(L),this._yAxis.setDirection(Q),this._yAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._zAxis.position.copyFrom(L),this._zAxis.setDirection(oe),this._zAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor)},$.prototype.createInstance=function(){var L=l.a._CreateArrowInstance(this.scene,this._xAxis),G=l.a._CreateArrowInstance(this.scene,this._yAxis),Q=l.a._CreateArrowInstance(this.scene,this._zAxis),oe=new $(this.scene,this.scaleLines,null,L,G,Q);return oe._instanced=!0,oe},$.prototype.dispose=function(){this._xAxis&&this._xAxis.dispose(!1,!this._instanced),this._yAxis&&this._yAxis.dispose(!1,!this._instanced),this._zAxis&&this._zAxis.dispose(!1,!this._instanced),this.scene=null},$._SetRenderingGroupId=function(L,G){L.getChildMeshes().forEach(function(Q){Q.renderingGroupId=G})},$}(),x=f(1),m=f(23),c=function($){function L(G,Q,oe,re){re===void 0&&(re=1);var Y=$.call(this,G,re)||this;return Y.pos=_.e.Zero(),Y.xaxis=_.e.Zero(),Y.yaxis=_.e.Zero(),Y.zaxis=_.e.Zero(),Y.mesh=oe,Y.bone=Q,Y}return Object(x.d)(L,$),L.prototype.update=function(){if(this.mesh&&this.bone){var G=this.bone;G._markAsDirtyAndCompose(),G.getAbsolutePositionToRef(this.mesh,this.pos),G.getDirectionToRef(m.a.X,this.mesh,this.xaxis),G.getDirectionToRef(m.a.Y,this.mesh,this.yaxis),G.getDirectionToRef(m.a.Z,this.mesh,this.zaxis),$.prototype.update.call(this,this.pos,this.xaxis,this.yaxis,this.zaxis)}},L.prototype.dispose=function(){this.mesh&&(this.mesh=null,this.bone=null,$.prototype.dispose.call(this))},L}(R),T=f(12),A=f(6),S=f(20),g=f(13);Object.defineProperty(S.a.prototype,"debugLayer",{get:function(){return this._debugLayer||(this._debugLayer=new u(this)),this._debugLayer},enumerable:!0,configurable:!0}),function($){$[$.Properties=0]="Properties",$[$.Debug=1]="Debug",$[$.Statistics=2]="Statistics",$[$.Tools=3]="Tools",$[$.Settings=4]="Settings"}(B||(B={}));var u=function(){function $(L){var G=this;this.BJSINSPECTOR=this._getGlobalInspector(),this._scene=L,this._scene.onDisposeObservable.add(function(){G._scene._debugLayer&&G._scene._debugLayer.hide()})}return Object.defineProperty($.prototype,"onPropertyChangedObservable",{get:function(){return this.BJSINSPECTOR&&this.BJSINSPECTOR.Inspector?this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable:(this._onPropertyChangedObservable||(this._onPropertyChangedObservable=new A.c),this._onPropertyChangedObservable)},enumerable:!1,configurable:!0}),$.prototype._createInspector=function(L){if(!this.isVisible()){if(this._onPropertyChangedObservable){for(var G=0,Q=this._onPropertyChangedObservable.observers;G-1&&this._debugMeshMeshes.splice(Y,1),this._numMeshes--,this._numMeshes>0?(this._meshes[oe]=this._meshes[this._numMeshes],this._impostors[oe]=this._impostors[this._numMeshes],this._meshes[this._numMeshes]=null,this._impostors[this._numMeshes]=null):(this._meshes[0]=null,this._impostors[0]=null),G=!0;break}G&&this._numMeshes===0&&this._scene.unregisterBeforeRender(this._renderFunction)}},$.prototype._getDebugMaterial=function(L){return this._debugMaterial||(this._debugMaterial=new P.a("",L),this._debugMaterial.wireframe=!0,this._debugMaterial.emissiveColor=O.a.White(),this._debugMaterial.disableLighting=!0),this._debugMaterial},$.prototype._getDebugBoxMesh=function(L){return this._debugBoxMesh||(this._debugBoxMesh=b.a.CreateBox("physicsBodyBoxViewMesh",{size:1},L),this._debugBoxMesh.rotationQuaternion=_.b.Identity(),this._debugBoxMesh.material=this._getDebugMaterial(L),this._debugBoxMesh.setEnabled(!1)),this._debugBoxMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugSphereMesh=function(L){return this._debugSphereMesh||(this._debugSphereMesh=E.a.CreateSphere("physicsBodySphereViewMesh",{diameter:1},L),this._debugSphereMesh.rotationQuaternion=_.b.Identity(),this._debugSphereMesh.material=this._getDebugMaterial(L),this._debugSphereMesh.setEnabled(!1)),this._debugSphereMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugCylinderMesh=function(L){return this._debugCylinderMesh||(this._debugCylinderMesh=I.a.CreateCylinder("physicsBodyCylinderViewMesh",{diameterTop:1,diameterBottom:1,height:1},L),this._debugCylinderMesh.rotationQuaternion=_.b.Identity(),this._debugCylinderMesh.material=this._getDebugMaterial(L),this._debugCylinderMesh.setEnabled(!1)),this._debugCylinderMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugMeshMesh=function(L,G){var Q=new h.a(L.name,G,null,L);return Q.position=_.e.Zero(),Q.setParent(L),Q.material=this._getDebugMaterial(G),this._debugMeshMeshes.push(Q),Q},$.prototype._getDebugMesh=function(L,G){var Q=this;if(!this._utilityLayer||G&&G.parent&&G.parent.physicsImpostor)return null;var oe=null,re=this._utilityLayer.utilityLayerScene;switch(L.type){case w.a.BoxImpostor:oe=this._getDebugBoxMesh(re),L.getBoxSizeToRef(oe.scaling);break;case w.a.SphereImpostor:oe=this._getDebugSphereMesh(re);var Y=L.getRadius();oe.scaling.x=2*Y,oe.scaling.y=2*Y,oe.scaling.z=2*Y;break;case w.a.MeshImpostor:G&&(oe=this._getDebugMeshMesh(G,re));break;case w.a.NoImpostor:G&&G.getChildMeshes().filter(function(H){return H.physicsImpostor?1:0}).forEach(function(H){Q._getDebugBoxMesh(re).parent=H});break;case w.a.CylinderImpostor:oe=this._getDebugCylinderMesh(re);var k=L.object.getBoundingInfo();oe.scaling.x=k.boundingBox.maximum.x-k.boundingBox.minimum.x,oe.scaling.y=k.boundingBox.maximum.y-k.boundingBox.minimum.y,oe.scaling.z=k.boundingBox.maximum.z-k.boundingBox.minimum.z}return oe},$.prototype.dispose=function(){for(var L=this._numMeshes,G=0;G$.DISPLAY_SPHERE_AND_SPURS&&(ze=$.DISPLAY_LINES),this.displayMode=ze,this.update(),this._bindObs()}return $.CreateBoneWeightShader=function(L,G){var Q,oe,re,Y,k,H,Z=L.skeleton,W=(Q=L.colorBase)!==null&&Q!==void 0?Q:O.a.Black(),q=(oe=L.colorZero)!==null&&oe!==void 0?oe:O.a.Blue(),he=(re=L.colorQuarter)!==null&&re!==void 0?re:O.a.Green(),ge=(Y=L.colorHalf)!==null&&Y!==void 0?Y:O.a.Yellow(),me=(k=L.colorFull)!==null&&k!==void 0?k:O.a.Red(),_e=(H=L.targetBoneIndex)!==null&&H!==void 0?H:0;ae.a.ShadersStore["boneWeights:"+Z.name+"VertexShader"]=`precision highp float; - - attribute vec3 position; - attribute vec2 uv; - - uniform mat4 view; - uniform mat4 projection; - uniform mat4 worldViewProjection; - - #include - #if NUM_BONE_INFLUENCERS == 0 - attribute vec4 matricesIndices; - attribute vec4 matricesWeights; - #endif - - #include - - varying vec3 vColor; - - uniform vec3 colorBase; - uniform vec3 colorZero; - uniform vec3 colorQuarter; - uniform vec3 colorHalf; - uniform vec3 colorFull; - - uniform float targetBoneIndex; - - void main() { - vec3 positionUpdated = position; - - #include - #include - - vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0); - - vec3 color = colorBase; - float totalWeight = 0.; - if(matricesIndices[0] == targetBoneIndex && matricesWeights[0] > 0.){ - totalWeight += matricesWeights[0]; - } - if(matricesIndices[1] == targetBoneIndex && matricesWeights[1] > 0.){ - totalWeight += matricesWeights[1]; - } - if(matricesIndices[2] == targetBoneIndex && matricesWeights[2] > 0.){ - totalWeight += matricesWeights[2]; - } - if(matricesIndices[3] == targetBoneIndex && matricesWeights[3] > 0.){ - totalWeight += matricesWeights[3]; - } - - color = mix(color, colorZero, smoothstep(0., 0.25, totalWeight)); - color = mix(color, colorQuarter, smoothstep(0.25, 0.5, totalWeight)); - color = mix(color, colorHalf, smoothstep(0.5, 0.75, totalWeight)); - color = mix(color, colorFull, smoothstep(0.75, 1.0, totalWeight)); - vColor = color; - - gl_Position = projection * view * worldPos; - }`,ae.a.ShadersStore["boneWeights:"+Z.name+"FragmentShader"]=` - precision highp float; - varying vec3 vPosition; - - varying vec3 vColor; - - void main() { - vec4 color = vec4(vColor, 1.0); - gl_FragColor = color; - } - `;var be=new te.a("boneWeight:"+Z.name,G,{vertex:"boneWeights:"+Z.name,fragment:"boneWeights:"+Z.name},{attributes:["position","normal","matricesIndices","matricesWeights"],uniforms:["world","worldView","worldViewProjection","view","projection","viewProjection","colorBase","colorZero","colorQuarter","colorHalf","colorFull","targetBoneIndex"]});return be.setColor3("colorBase",W),be.setColor3("colorZero",q),be.setColor3("colorQuarter",he),be.setColor3("colorHalf",ge),be.setColor3("colorFull",me),be.setFloat("targetBoneIndex",_e),be.getClassName=function(){return"BoneWeightShader"},be.transparencyMode=ne.a.MATERIAL_OPAQUE,be},$.CreateSkeletonMapShader=function(L,G){var Q,oe=L.skeleton,re=(Q=L.colorMap)!==null&&Q!==void 0?Q:[{color:new O.a(1,.38,.18),location:0},{color:new O.a(.59,.18,1),location:.2},{color:new O.a(.59,1,.18),location:.4},{color:new O.a(1,.87,.17),location:.6},{color:new O.a(1,.17,.42),location:.8},{color:new O.a(.17,.68,1),location:1}],Y=oe.bones.length+1,k=$._CreateBoneMapColorBuffer(Y,re,G),H=new te.a("boneWeights:"+oe.name,G,{vertexSource:`precision highp float; - - attribute vec3 position; - attribute vec2 uv; - - uniform mat4 view; - uniform mat4 projection; - uniform mat4 worldViewProjection; - uniform float colorMap[`+4*oe.bones.length+`]; - - #include - #if NUM_BONE_INFLUENCERS == 0 - attribute vec4 matricesIndices; - attribute vec4 matricesWeights; - #endif - #include - - varying vec3 vColor; - - void main() { - vec3 positionUpdated = position; - - #include - #include - - vec3 color = vec3(0.); - bool first = true; - - for (int i = 0; i < 4; i++) { - int boneIdx = int(matricesIndices[i]); - float boneWgt = matricesWeights[i]; - - vec3 c = vec3(colorMap[boneIdx * 4 + 0], colorMap[boneIdx * 4 + 1], colorMap[boneIdx * 4 + 2]); - - if (boneWgt > 0.) { - if (first) { - first = false; - color = c; - } else { - color = mix(color, c, boneWgt); - } - } - } - - vColor = color; - - vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0); - - gl_Position = projection * view * worldPos; - }`,fragmentSource:` - precision highp float; - varying vec3 vColor; - - void main() { - vec4 color = vec4( vColor, 1.0 ); - gl_FragColor = color; - } - `},{attributes:["position","normal","matricesIndices","matricesWeights"],uniforms:["world","worldView","worldViewProjection","view","projection","viewProjection","colorMap"]});return H.setFloats("colorMap",k),H.getClassName=function(){return"SkeletonMapShader"},H.transparencyMode=ne.a.MATERIAL_OPAQUE,H},$._CreateBoneMapColorBuffer=function(L,G,Q){var oe=new de.a("temp",{width:L,height:1},Q,!1),re=oe.getContext(),Y=re.createLinearGradient(0,0,L,0);G.forEach(function(W){Y.addColorStop(W.location,W.color.toHexString())}),re.fillStyle=Y,re.fillRect(0,0,L,1),oe.update();for(var k=[],H=re.getImageData(0,0,L,1).data,Z=0;Z$.DISPLAY_SPHERE_AND_SPURS&&(L=$.DISPLAY_LINES),this.options.displayMode=L},enumerable:!1,configurable:!0}),$.prototype._bindObs=function(){var L=this;switch(this.displayMode){case $.DISPLAY_LINES:this._obs=this.scene.onBeforeRenderObservable.add(function(){L._displayLinesUpdate()})}},$.prototype.update=function(){switch(this.displayMode){case $.DISPLAY_LINES:this._displayLinesUpdate();break;case $.DISPLAY_SPHERES:this._buildSpheresAndSpurs(!0);break;case $.DISPLAY_SPHERE_AND_SPURS:this._buildSpheresAndSpurs(!1)}this._buildLocalAxes()},Object.defineProperty($.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(L){this.isEnabled!==L&&(this._isEnabled=L,this.debugMesh&&this.debugMesh.setEnabled(L),L&&!this._obs?this._bindObs():!L&&this._obs&&(this.scene.onBeforeRenderObservable.remove(this._obs),this._obs=null))},enumerable:!1,configurable:!0}),$.prototype._getBonePosition=function(L,G,Q,oe,re,Y){oe===void 0&&(oe=0),re===void 0&&(re=0),Y===void 0&&(Y=0);var k=_.c.Matrix[0],H=G.getParent();if(k.copyFrom(G.getLocalMatrix()),oe!==0||re!==0||Y!==0){var Z=_.c.Matrix[1];_.a.IdentityToRef(Z),Z.setTranslationFromFloats(oe,re,Y),Z.multiplyToRef(k,k)}H&&k.multiplyToRef(H.getAbsoluteTransform(),k),k.multiplyToRef(Q,k),L.x=k.m[12],L.y=k.m[13],L.z=k.m[14]},$.prototype._getLinesForBonesWithLength=function(L,G){for(var Q=L.length,oe=this.mesh._effectiveMesh.position,re=0,Y=0;Y=0;Y--){var k=L[Y],H=k.getParent();if(H&&(this._boneIndices.has(k.getIndex())||this.options.useAllBones)){var Z=this._debugLines[Q];Z||(Z=[_.e.Zero(),_.e.Zero()],this._debugLines[Q]=Z),k.getAbsolutePositionToRef(oe,Z[0]),H.getAbsolutePositionToRef(oe,Z[1]),Z[0].subtractInPlace(re),Z[1].subtractInPlace(re),Q++}}},$.prototype._revert=function(L){this.options.pauseAnimations&&(this.scene.animationsEnabled=L,this.utilityLayer.utilityLayerScene.animationsEnabled=L)},$.prototype._getAbsoluteBindPoseToRef=function(L,G){L!==null&&L._index!==-1?(this._getAbsoluteBindPoseToRef(L.getParent(),G),L.getBindPose().multiplyToRef(G,G)):G.copyFrom(_.a.Identity())},$.prototype._buildSpheresAndSpurs=function(L){var G,Q;L===void 0&&(L=!0),this._debugMesh&&(this._debugMesh.dispose(),this._debugMesh=null,this.ready=!1),this._ready=!1;var oe=(G=this.utilityLayer)===null||G===void 0?void 0:G.utilityLayerScene,re=this.skeleton.bones,Y=[],k=[],H=this.scene.animationsEnabled;try{this.options.pauseAnimations&&(this.scene.animationsEnabled=!1,oe.animationsEnabled=!1),this.options.returnToRest&&this.skeleton.returnToRest(),this.autoUpdateBonesMatrices&&this.skeleton.computeAbsoluteTransforms();for(var Z=Number.NEGATIVE_INFINITY,W=this.options.displayOptions||{},q=function(We){var Ze=re[We];if(Ze._index===-1||!he._boneIndices.has(Ze.getIndex())&&!he.options.useAllBones)return"continue";var ze=new _.a;he._getAbsoluteBindPoseToRef(Ze,ze);var it=new _.e;ze.decompose(void 0,void 0,it),Ze.children.forEach(function(It,Pt){var Ot=new _.a;It.getBindPose().multiplyToRef(ze,Ot);var sn=new _.e;Ot.decompose(void 0,void 0,sn);var Zt=_.e.Distance(it,sn);if(Zt>Z&&(Z=Zt),!L){for(var rn=sn.clone().subtract(it.clone()),De=rn.length(),Rn=rn.normalize().scale(De),on=W.midStep||.165,On=W.midStepFactor||.215,Ve=Rn.scale(on),Mn=ee.a.ExtrudeShapeCustom("skeletonViewer",{shape:[new _.e(1,-1,0),new _.e(1,1,0),new _.e(-1,1,0),new _.e(-1,-1,0),new _.e(1,-1,0)],path:[_.e.Zero(),Ve,Rn],scaleFunction:function(Uo){switch(Uo){case 0:case 2:return 0;case 1:return De*On}return 0},sideOrientation:h.a.DEFAULTSIDE,updatable:!1},oe),fr=Mn.getTotalVertices(),Ye=[],xn=[],ti=0;ti9?xn.push(It.getIndex(),0,0,0):xn.push(Ze.getIndex(),0,0,0);Mn.position=it.clone(),Mn.setVerticesData(pe.b.MatricesWeightsKind,Ye,!1),Mn.setVerticesData(pe.b.MatricesIndicesKind,xn,!1),Mn.convertToFlatShadedMesh(),k.push(Mn)}});for(var et=W.sphereBaseSize||.2,lt=E.a.CreateSphere("skeletonViewer",{segments:6,diameter:et,updatable:!0},oe),ct=lt.getTotalVertices(),mt=[],St=[],wt=0;wth-c)&&!(g-bb-T)&&!(u-EE-A)},O.prototype.intersectsSphere=function(R){return O.IntersectsSphere(this.minimumWorld,this.maximumWorld,R.centerWorld,R.radiusWorld)},O.prototype.intersectsMinMax=function(R,x){var m=this.minimumWorld,c=this.maximumWorld,T=m.x,A=m.y,S=m.z,g=c.x,u=c.y,h=c.z,b=R.x,E=R.y,D=R.z,w=x.x,N=x.y,I=x.z;return!(gw)&&!(uN)&&!(hI)},O.Intersects=function(R,x){return R.intersectsMinMax(x.minimumWorld,x.maximumWorld)},O.IntersectsSphere=function(R,x,m,c){var T=O.TmpVector3[0];return _.e.ClampToRef(m,R,x,T),_.e.DistanceSquared(m,T)<=c*c},O.IsCompletelyInFrustum=function(R,x){for(var m=0;m<6;++m)for(var c=x[m],T=0;T<8;++T)if(c.dotCoordinate(R[T])<0)return!1;return!0},O.IsInFrustum=function(R,x){for(var m=0;m<6;++m){for(var c=!0,T=x[m],A=0;A<8;++A)if(T.dotCoordinate(R[A])>=0){c=!1;break}if(c)return!1}return!0},O.TmpVector3=B.a.BuildArray(3,_.e.Zero),O}()},function(Ae,v,f){f.d(v,"a",function(){return _});var B=f(38),_=function(){function P(){}return P.SetImmediate=function(l){B.a.IsWindowObjectExist()&&window.setImmediate?window.setImmediate(l):setTimeout(l,1)},P}()},function(Ae,v,f){f.d(v,"a",function(){return P});var B=f(0),_=f(2),P=function(){function l(){this.previousWorldMatrices={},this.previousBones={}}return l.AddUniforms=function(O){O.push("previousWorld","previousViewProjection")},l.AddSamplers=function(O){},l.prototype.bindForSubMesh=function(O,R,x,m,c){R.prePassRenderer&&R.prePassRenderer.enabled&&R.prePassRenderer.getIndex(_.a.PREPASS_VELOCITY_TEXTURE_TYPE)!==-1&&(this.previousWorldMatrices[x.uniqueId]||(this.previousWorldMatrices[x.uniqueId]=B.a.Identity()),this.previousViewProjection||(this.previousViewProjection=R.getTransformMatrix()),O.setMatrix("previousWorld",this.previousWorldMatrices[x.uniqueId]),O.setMatrix("previousViewProjection",this.previousViewProjection),this.previousWorldMatrices[x.uniqueId]=m.clone(),this.previousViewProjection=R.getTransformMatrix().clone())},l}()},function(Ae,v,f){var B="lightFragmentDeclaration",_=`#ifdef LIGHT{X} -uniform vec4 vLightData{X}; -uniform vec4 vLightDiffuse{X}; -#ifdef SPECULARTERM -uniform vec4 vLightSpecular{X}; -#else -vec4 vLightSpecular{X}=vec4(0.); -#endif -#ifdef SHADOW{X} -#ifdef SHADOWCSM{X} -uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float cascadeBlendFactor{X}; -varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}]; -varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}]; -varying vec4 vPositionFromCamera{X}; -#if defined(SHADOWPCSS{X}) -uniform highp sampler2DArrayShadow shadowSampler{X}; -uniform highp sampler2DArray depthSampler{X}; -uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float penumbraDarkness{X}; -#elif defined(SHADOWPCF{X}) -uniform highp sampler2DArrayShadow shadowSampler{X}; -#else -uniform highp sampler2DArray shadowSampler{X}; -#endif -#ifdef SHADOWCSMDEBUG{X} -const vec3 vCascadeColorsMultiplier{X}[8]=vec3[8] -( -vec3 ( 1.5,0.0,0.0 ), -vec3 ( 0.0,1.5,0.0 ), -vec3 ( 0.0,0.0,5.5 ), -vec3 ( 1.5,0.0,5.5 ), -vec3 ( 1.5,1.5,0.0 ), -vec3 ( 1.0,1.0,1.0 ), -vec3 ( 0.0,1.0,5.5 ), -vec3 ( 0.5,3.5,0.75 ) -); -vec3 shadowDebug{X}; -#endif -#ifdef SHADOWCSMUSESHADOWMAXZ{X} -int index{X}=-1; -#else -int index{X}=SHADOWCSMNUM_CASCADES{X}-1; -#endif -float diff{X}=0.; -#elif defined(SHADOWCUBE{X}) -uniform samplerCube shadowSampler{X}; -#else -varying vec4 vPositionFromLight{X}; -varying float vDepthMetric{X}; -#if defined(SHADOWPCSS{X}) -uniform highp sampler2DShadow shadowSampler{X}; -uniform highp sampler2D depthSampler{X}; -#elif defined(SHADOWPCF{X}) -uniform highp sampler2DShadow shadowSampler{X}; -#else -uniform sampler2D shadowSampler{X}; -#endif -uniform mat4 lightMatrix{X}; -#endif -uniform vec4 shadowsInfo{X}; -uniform vec2 depthValues{X}; -#endif -#ifdef SPOTLIGHT{X} -uniform vec4 vLightDirection{X}; -uniform vec4 vLightFalloff{X}; -#elif defined(POINTLIGHT{X}) -uniform vec4 vLightFalloff{X}; -#elif defined(HEMILIGHT{X}) -uniform vec3 vLightGround{X}; -#endif -#ifdef PROJECTEDLIGHTTEXTURE{X} -uniform mat4 textureProjectionMatrix{X}; -uniform sampler2D projectionLightSampler{X}; -#endif -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="lightUboDeclaration",_=`#ifdef LIGHT{X} -uniform Light{X} -{ -vec4 vLightData; -vec4 vLightDiffuse; -vec4 vLightSpecular; -#ifdef SPOTLIGHT{X} -vec4 vLightDirection; -vec4 vLightFalloff; -#elif defined(POINTLIGHT{X}) -vec4 vLightFalloff; -#elif defined(HEMILIGHT{X}) -vec3 vLightGround; -#endif -vec4 shadowsInfo; -vec2 depthValues; -} light{X}; -#ifdef PROJECTEDLIGHTTEXTURE{X} -uniform mat4 textureProjectionMatrix{X}; -uniform sampler2D projectionLightSampler{X}; -#endif -#ifdef SHADOW{X} -#ifdef SHADOWCSM{X} -uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float cascadeBlendFactor{X}; -varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}]; -varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}]; -varying vec4 vPositionFromCamera{X}; -#if defined(SHADOWPCSS{X}) -uniform highp sampler2DArrayShadow shadowSampler{X}; -uniform highp sampler2DArray depthSampler{X}; -uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float penumbraDarkness{X}; -#elif defined(SHADOWPCF{X}) -uniform highp sampler2DArrayShadow shadowSampler{X}; -#else -uniform highp sampler2DArray shadowSampler{X}; -#endif -#ifdef SHADOWCSMDEBUG{X} -const vec3 vCascadeColorsMultiplier{X}[8]=vec3[8] -( -vec3 ( 1.5,0.0,0.0 ), -vec3 ( 0.0,1.5,0.0 ), -vec3 ( 0.0,0.0,5.5 ), -vec3 ( 1.5,0.0,5.5 ), -vec3 ( 1.5,1.5,0.0 ), -vec3 ( 1.0,1.0,1.0 ), -vec3 ( 0.0,1.0,5.5 ), -vec3 ( 0.5,3.5,0.75 ) -); -vec3 shadowDebug{X}; -#endif -#ifdef SHADOWCSMUSESHADOWMAXZ{X} -int index{X}=-1; -#else -int index{X}=SHADOWCSMNUM_CASCADES{X}-1; -#endif -float diff{X}=0.; -#elif defined(SHADOWCUBE{X}) -uniform samplerCube shadowSampler{X}; -#else -varying vec4 vPositionFromLight{X}; -varying float vDepthMetric{X}; -#if defined(SHADOWPCSS{X}) -uniform highp sampler2DShadow shadowSampler{X}; -uniform highp sampler2D depthSampler{X}; -#elif defined(SHADOWPCF{X}) -uniform highp sampler2DShadow shadowSampler{X}; -#else -uniform sampler2D shadowSampler{X}; -#endif -uniform mat4 lightMatrix{X}; -#endif -#endif -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="imageProcessingDeclaration",_=`#ifdef EXPOSURE -uniform float exposureLinear; -#endif -#ifdef CONTRAST -uniform float contrast; -#endif -#ifdef VIGNETTE -uniform vec2 vInverseScreenSize; -uniform vec4 vignetteSettings1; -uniform vec4 vignetteSettings2; -#endif -#ifdef COLORCURVES -uniform vec4 vCameraColorCurveNegative; -uniform vec4 vCameraColorCurveNeutral; -uniform vec4 vCameraColorCurvePositive; -#endif -#ifdef COLORGRADING -#ifdef COLORGRADING3D -uniform highp sampler3D txColorTransform; -#else -uniform sampler2D txColorTransform; -#endif -uniform vec4 colorTransformSettings; -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="imageProcessingFunctions",_=`#if defined(COLORGRADING) && !defined(COLORGRADING3D) - -#define inline -vec3 sampleTexture3D(sampler2D colorTransform,vec3 color,vec2 sampler3dSetting) -{ -float sliceSize=2.0*sampler3dSetting.x; -#ifdef SAMPLER3DGREENDEPTH -float sliceContinuous=(color.g-sampler3dSetting.x)*sampler3dSetting.y; -#else -float sliceContinuous=(color.b-sampler3dSetting.x)*sampler3dSetting.y; -#endif -float sliceInteger=floor(sliceContinuous); - - -float sliceFraction=sliceContinuous-sliceInteger; -#ifdef SAMPLER3DGREENDEPTH -vec2 sliceUV=color.rb; -#else -vec2 sliceUV=color.rg; -#endif -sliceUV.x*=sliceSize; -sliceUV.x+=sliceInteger*sliceSize; -sliceUV=saturate(sliceUV); -vec4 slice0Color=texture2D(colorTransform,sliceUV); -sliceUV.x+=sliceSize; -sliceUV=saturate(sliceUV); -vec4 slice1Color=texture2D(colorTransform,sliceUV); -vec3 result=mix(slice0Color.rgb,slice1Color.rgb,sliceFraction); -#ifdef SAMPLER3DBGRMAP -color.rgb=result.rgb; -#else -color.rgb=result.bgr; -#endif -return color; -} -#endif -#ifdef TONEMAPPING_ACES - - - - - -const mat3 ACESInputMat=mat3( -vec3(0.59719,0.07600,0.02840), -vec3(0.35458,0.90834,0.13383), -vec3(0.04823,0.01566,0.83777) -); - -const mat3 ACESOutputMat=mat3( -vec3( 1.60475,-0.10208,-0.00327), -vec3(-0.53108,1.10813,-0.07276), -vec3(-0.07367,-0.00605,1.07602) -); -vec3 RRTAndODTFit(vec3 v) -{ -vec3 a=v*(v+0.0245786)-0.000090537; -vec3 b=v*(0.983729*v+0.4329510)+0.238081; -return a/b; -} -vec3 ACESFitted(vec3 color) -{ -color=ACESInputMat*color; - -color=RRTAndODTFit(color); -color=ACESOutputMat*color; - -color=saturate(color); -return color; -} -#endif -vec4 applyImageProcessing(vec4 result) { -#ifdef EXPOSURE -result.rgb*=exposureLinear; -#endif -#ifdef VIGNETTE - -vec2 viewportXY=gl_FragCoord.xy*vInverseScreenSize; -viewportXY=viewportXY*2.0-1.0; -vec3 vignetteXY1=vec3(viewportXY*vignetteSettings1.xy+vignetteSettings1.zw,1.0); -float vignetteTerm=dot(vignetteXY1,vignetteXY1); -float vignette=pow(vignetteTerm,vignetteSettings2.w); - -vec3 vignetteColor=vignetteSettings2.rgb; -#ifdef VIGNETTEBLENDMODEMULTIPLY -vec3 vignetteColorMultiplier=mix(vignetteColor,vec3(1,1,1),vignette); -result.rgb*=vignetteColorMultiplier; -#endif -#ifdef VIGNETTEBLENDMODEOPAQUE -result.rgb=mix(vignetteColor,result.rgb,vignette); -#endif -#endif -#ifdef TONEMAPPING -#ifdef TONEMAPPING_ACES -result.rgb=ACESFitted(result.rgb); -#else -const float tonemappingCalibration=1.590579; -result.rgb=1.0-exp2(-tonemappingCalibration*result.rgb); -#endif -#endif - -result.rgb=toGammaSpace(result.rgb); -result.rgb=saturate(result.rgb); -#ifdef CONTRAST - -vec3 resultHighContrast=result.rgb*result.rgb*(3.0-2.0*result.rgb); -if (contrast<1.0) { - -result.rgb=mix(vec3(0.5,0.5,0.5),result.rgb,contrast); -} else { - -result.rgb=mix(result.rgb,resultHighContrast,contrast-1.0); -} -#endif - -#ifdef COLORGRADING -vec3 colorTransformInput=result.rgb*colorTransformSettings.xxx+colorTransformSettings.yyy; -#ifdef COLORGRADING3D -vec3 colorTransformOutput=texture(txColorTransform,colorTransformInput).rgb; -#else -vec3 colorTransformOutput=sampleTexture3D(txColorTransform,colorTransformInput,colorTransformSettings.yz).rgb; -#endif -result.rgb=mix(result.rgb,colorTransformOutput,colorTransformSettings.www); -#endif -#ifdef COLORCURVES - -float luma=getLuminance(result.rgb); -vec2 curveMix=clamp(vec2(luma*3.0-1.5,luma*-3.0+1.5),vec2(0.0),vec2(1.0)); -vec4 colorCurve=vCameraColorCurveNeutral+curveMix.x*vCameraColorCurvePositive-curveMix.y*vCameraColorCurveNegative; -result.rgb*=colorCurve.rgb; -result.rgb=mix(vec3(luma),result.rgb,colorCurve.a); -#endif -return result; -}`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="clipPlaneFragment",_=`#ifdef CLIPPLANE -if (fClipDistance>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE2 -if (fClipDistance2>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE3 -if (fClipDistance3>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE4 -if (fClipDistance4>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE5 -if (fClipDistance5>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE6 -if (fClipDistance6>0.0) -{ -discard; -} -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="clipPlaneVertex",_=`#ifdef CLIPPLANE -fClipDistance=dot(worldPos,vClipPlane); -#endif -#ifdef CLIPPLANE2 -fClipDistance2=dot(worldPos,vClipPlane2); -#endif -#ifdef CLIPPLANE3 -fClipDistance3=dot(worldPos,vClipPlane3); -#endif -#ifdef CLIPPLANE4 -fClipDistance4=dot(worldPos,vClipPlane4); -#endif -#ifdef CLIPPLANE5 -fClipDistance5=dot(worldPos,vClipPlane5); -#endif -#ifdef CLIPPLANE6 -fClipDistance6=dot(worldPos,vClipPlane6); -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){this._count=0,this._data={}}return _.prototype.copyFrom=function(P){var l=this;this.clear(),P.forEach(function(O,R){return l.add(O,R)})},_.prototype.get=function(P){var l=this._data[P];if(l!==void 0)return l},_.prototype.getOrAddWithFactory=function(P,l){var O=this.get(P);return O!==void 0||(O=l(P))&&this.add(P,O),O},_.prototype.getOrAdd=function(P,l){var O=this.get(P);return O!==void 0?O:(this.add(P,l),l)},_.prototype.contains=function(P){return this._data[P]!==void 0},_.prototype.add=function(P,l){return this._data[P]===void 0&&(this._data[P]=l,++this._count,!0)},_.prototype.set=function(P,l){return this._data[P]!==void 0&&(this._data[P]=l,!0)},_.prototype.getAndRemove=function(P){var l=this.get(P);return l!==void 0?(delete this._data[P],--this._count,l):null},_.prototype.remove=function(P){return!!this.contains(P)&&(delete this._data[P],--this._count,!0)},_.prototype.clear=function(){this._data={},this._count=0},Object.defineProperty(_.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),_.prototype.forEach=function(P){for(var l in this._data)P(l,this._data[l])},_.prototype.first=function(P){for(var l in this._data){var O=P(l,this._data[l]);if(O)return O}return null},_}()},function(Ae,v,f){f.d(v,"a",function(){return P});var B=f(44),_=f(0),P=function(){function l(O,R,x){this.center=_.e.Zero(),this.centerWorld=_.e.Zero(),this.minimum=_.e.Zero(),this.maximum=_.e.Zero(),this.reConstruct(O,R,x)}return l.prototype.reConstruct=function(O,R,x){this.minimum.copyFrom(O),this.maximum.copyFrom(R);var m=_.e.Distance(O,R);R.addToRef(O,this.center).scaleInPlace(.5),this.radius=.5*m,this._update(x||_.a.IdentityReadOnly)},l.prototype.scale=function(O){var R=this.radius*O,x=l.TmpVector3,m=x[0].setAll(R),c=this.center.subtractToRef(m,x[1]),T=this.center.addToRef(m,x[2]);return this.reConstruct(c,T,this._worldMatrix),this},l.prototype.getWorldMatrix=function(){return this._worldMatrix},l.prototype._update=function(O){if(O.isIdentity())this.centerWorld.copyFrom(this.center),this.radiusWorld=this.radius;else{_.e.TransformCoordinatesToRef(this.center,O,this.centerWorld);var R=l.TmpVector3[0];_.e.TransformNormalFromFloatsToRef(1,1,1,O,R),this.radiusWorld=Math.max(Math.abs(R.x),Math.abs(R.y),Math.abs(R.z))*this.radius}},l.prototype.isInFrustum=function(O){for(var R=this.centerWorld,x=this.radiusWorld,m=0;m<6;m++)if(O[m].dotCoordinate(R)<=-x)return!1;return!0},l.prototype.isCenterInFrustum=function(O){for(var R=this.centerWorld,x=0;x<6;x++)if(O[x].dotCoordinate(R)<0)return!1;return!0},l.prototype.intersectsPoint=function(O){var R=_.e.DistanceSquared(this.centerWorld,O);return!(this.radiusWorld*this.radiusWorld=R&&l===0?P instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,l,new Float32Array(P)):this._gl.bufferSubData(this._gl.ARRAY_BUFFER,l,P):P instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,new Float32Array(P).subarray(l,l+O)):(P=P instanceof ArrayBuffer?new Uint8Array(P,l,O):new Uint8Array(P.buffer,P.byteOffset+l,O),this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,P)),this._resetVertexBufferBinding()}},function(Ae,v,f){var B="fogFragmentDeclaration",_=`#ifdef FOG -#define FOGMODE_NONE 0. -#define FOGMODE_EXP 1. -#define FOGMODE_EXP2 2. -#define FOGMODE_LINEAR 3. -#define E 2.71828 -uniform vec4 vFogInfos; -uniform vec3 vFogColor; -varying vec3 vFogDistance; -float CalcFogFactor() -{ -float fogCoeff=1.0; -float fogStart=vFogInfos.y; -float fogEnd=vFogInfos.z; -float fogDensity=vFogInfos.w; -float fogDistance=length(vFogDistance); -if (FOGMODE_LINEAR == vFogInfos.x) -{ -fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart); -} -else if (FOGMODE_EXP == vFogInfos.x) -{ -fogCoeff=1.0/pow(E,fogDistance*fogDensity); -} -else if (FOGMODE_EXP2 == vFogInfos.x) -{ -fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity); -} -return clamp(fogCoeff,0.0,1.0); -} -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B=f(26),_=f(27);B.a.prototype.createDynamicTexture=function(P,l,O,R){var x=new _.a(this,_.b.Dynamic);return x.baseWidth=P,x.baseHeight=l,O&&(P=this.needPOTTextures?B.a.GetExponentOfTwo(P,this._caps.maxTextureSize):P,l=this.needPOTTextures?B.a.GetExponentOfTwo(l,this._caps.maxTextureSize):l),x.width=P,x.height=l,x.isReady=!1,x.generateMipMaps=O,x.samplingMode=R,this.updateTextureSamplingMode(R,x),this._internalTexturesCache.push(x),x},B.a.prototype.updateDynamicTexture=function(P,l,O,R,x,m){if(R===void 0&&(R=!1),m===void 0&&(m=!1),P){var c=this._gl,T=c.TEXTURE_2D,A=this._bindTextureDirectly(T,P,!0,m);this._unpackFlipY(O===void 0?P.invertY:O),R&&c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);var S=this._getWebGLTextureType(P.type),g=this._getInternalFormat(x||P.format),u=this._getRGBABufferInternalSizedFormat(P.type,g);c.texImage2D(T,0,u,g,S,l),P.generateMipMaps&&c.generateMipmap(T),A||this._bindTextureDirectly(T,null),R&&c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),P.isReady=!0}}},function(Ae,v,f){f.r(v),f.d(v,"AbstractScene",function(){return B.a}),f.d(v,"AbstractActionManager",function(){return _.a}),f.d(v,"Action",function(){return x}),f.d(v,"ActionEvent",function(){return m.a}),f.d(v,"ActionManager",function(){return pe}),f.d(v,"Condition",function(){return T}),f.d(v,"ValueCondition",function(){return A}),f.d(v,"PredicateCondition",function(){return S}),f.d(v,"StateCondition",function(){return g}),f.d(v,"SwitchBooleanAction",function(){return b}),f.d(v,"SetStateAction",function(){return E}),f.d(v,"SetValueAction",function(){return D}),f.d(v,"IncrementValueAction",function(){return w}),f.d(v,"PlayAnimationAction",function(){return N}),f.d(v,"StopAnimationAction",function(){return I}),f.d(v,"DoNothingAction",function(){return V}),f.d(v,"CombineAction",function(){return X}),f.d(v,"ExecuteCodeAction",function(){return j}),f.d(v,"SetParentAction",function(){return ne}),f.d(v,"PlaySoundAction",function(){return ae}),f.d(v,"StopSoundAction",function(){return ee}),f.d(v,"InterpolateValueAction",function(){return H}),f.d(v,"Animatable",function(){return Ge}),f.d(v,"_IAnimationState",function(){return Y}),f.d(v,"Animation",function(){return k}),f.d(v,"TargetedAnimation",function(){return Xe}),f.d(v,"AnimationGroup",function(){return He}),f.d(v,"AnimationPropertiesOverride",function(){return We}),f.d(v,"EasingFunction",function(){return ze}),f.d(v,"CircleEase",function(){return it}),f.d(v,"BackEase",function(){return et}),f.d(v,"BounceEase",function(){return lt}),f.d(v,"CubicEase",function(){return ct}),f.d(v,"ElasticEase",function(){return mt}),f.d(v,"ExponentialEase",function(){return St}),f.d(v,"PowerEase",function(){return wt}),f.d(v,"QuadraticEase",function(){return It}),f.d(v,"QuarticEase",function(){return Pt}),f.d(v,"QuinticEase",function(){return Ot}),f.d(v,"SineEase",function(){return sn}),f.d(v,"BezierCurveEase",function(){return Zt}),f.d(v,"RuntimeAnimation",function(){return me}),f.d(v,"AnimationEvent",function(){return rn}),f.d(v,"AnimationKeyInterpolation",function(){return K}),f.d(v,"AnimationRange",function(){return G}),f.d(v,"KeepAssets",function(){return Rn}),f.d(v,"InstantiatedEntries",function(){return on}),f.d(v,"AssetContainer",function(){return On}),f.d(v,"Analyser",function(){return Mn}),f.d(v,"AudioEngine",function(){return fr}),f.d(v,"AudioSceneComponent",function(){return ni}),f.d(v,"Sound",function(){return ti}),f.d(v,"SoundTrack",function(){return Uo}),f.d(v,"WeightedSound",function(){return Vf}),f.d(v,"AutoRotationBehavior",function(){return _l}),f.d(v,"BouncingBehavior",function(){return ml}),f.d(v,"FramingBehavior",function(){return gl}),f.d(v,"AttachToBoxBehavior",function(){return kf}),f.d(v,"FadeInOutBehavior",function(){return Gf}),f.d(v,"MultiPointerScaleBehavior",function(){return zf}),f.d(v,"PointerDragBehavior",function(){return Ei.a}),f.d(v,"SixDofDragBehavior",function(){return vl}),f.d(v,"Bone",function(){return Ue}),f.d(v,"BoneIKController",function(){return jf}),f.d(v,"BoneLookController",function(){return Hf}),f.d(v,"Skeleton",function(){return Vo}),f.d(v,"ArcRotateCameraGamepadInput",function(){return Za}),f.d(v,"ArcRotateCameraKeyboardMoveInput",function(){return Ja}),f.d(v,"ArcRotateCameraMouseWheelInput",function(){return $a}),f.d(v,"ArcRotateCameraPointersInput",function(){return es}),f.d(v,"ArcRotateCameraVRDeviceOrientationInput",function(){return ts}),f.d(v,"FlyCameraKeyboardInput",function(){return ns}),f.d(v,"FlyCameraMouseInput",function(){return is}),f.d(v,"FollowCameraKeyboardMoveInput",function(){return rs}),f.d(v,"FollowCameraMouseWheelInput",function(){return os}),f.d(v,"FollowCameraPointersInput",function(){return as}),f.d(v,"FreeCameraDeviceOrientationInput",function(){return hs}),f.d(v,"FreeCameraGamepadInput",function(){return ds}),f.d(v,"FreeCameraKeyboardMoveInput",function(){return ss}),f.d(v,"FreeCameraMouseInput",function(){return cs}),f.d(v,"FreeCameraMouseWheelInput",function(){return ls}),f.d(v,"FreeCameraTouchInput",function(){return us}),f.d(v,"FreeCameraVirtualJoystickInput",function(){return ps}),f.d(v,"CameraInputTypes",function(){return dn}),f.d(v,"CameraInputsManager",function(){return eo}),f.d(v,"Camera",function(){return gt.a}),f.d(v,"TargetCamera",function(){return Ni}),f.d(v,"FreeCamera",function(){return Yn}),f.d(v,"FreeCameraInputsManager",function(){return to}),f.d(v,"TouchCamera",function(){return _s}),f.d(v,"ArcRotateCamera",function(){return Ji}),f.d(v,"ArcRotateCameraInputsManager",function(){return ko}),f.d(v,"DeviceOrientationCamera",function(){return Go}),f.d(v,"FlyCamera",function(){return Yf}),f.d(v,"FlyCameraInputsManager",function(){return Pl}),f.d(v,"FollowCamera",function(){return xl}),f.d(v,"ArcFollowCamera",function(){return Rl}),f.d(v,"FollowCameraInputsManager",function(){return Cl}),f.d(v,"GamepadCamera",function(){return zo}),f.d(v,"AnaglyphArcRotateCamera",function(){return Nl}),f.d(v,"AnaglyphFreeCamera",function(){return wl}),f.d(v,"AnaglyphGamepadCamera",function(){return Fl}),f.d(v,"AnaglyphUniversalCamera",function(){return Bl}),f.d(v,"StereoscopicArcRotateCamera",function(){return Ul}),f.d(v,"StereoscopicFreeCamera",function(){return Vl}),f.d(v,"StereoscopicGamepadCamera",function(){return kl}),f.d(v,"StereoscopicUniversalCamera",function(){return Gl}),f.d(v,"UniversalCamera",function(){return mr}),f.d(v,"VirtualJoysticksCamera",function(){return zl}),f.d(v,"VRCameraMetrics",function(){return gr}),f.d(v,"VRDeviceOrientationArcRotateCamera",function(){return Xl}),f.d(v,"VRDeviceOrientationFreeCamera",function(){return jo}),f.d(v,"VRDeviceOrientationGamepadCamera",function(){return Yl}),f.d(v,"OnAfterEnteringVRObservableEvent",function(){return ip}),f.d(v,"VRExperienceHelper",function(){return Zl}),f.d(v,"WebVRFreeCamera",function(){return Wo}),f.d(v,"Collider",function(){return Jl}),f.d(v,"DefaultCollisionCoordinator",function(){return $l}),f.d(v,"PickingInfo",function(){return nr.a}),f.d(v,"IntersectionInfo",function(){return rp.a}),f.d(v,"_MeshCollisionData",function(){return op.a}),f.d(v,"BoundingBox",function(){return As.a}),f.d(v,"BoundingInfo",function(){return Vi.a}),f.d(v,"BoundingSphere",function(){return eu.a}),f.d(v,"Octree",function(){return io}),f.d(v,"OctreeBlock",function(){return tu}),f.d(v,"OctreeSceneComponent",function(){return Os}),f.d(v,"Ray",function(){return pn.a}),f.d(v,"AxesViewer",function(){return ir.AxesViewer}),f.d(v,"BoneAxesViewer",function(){return ir.BoneAxesViewer}),f.d(v,"DebugLayerTab",function(){return ir.DebugLayerTab}),f.d(v,"DebugLayer",function(){return ir.DebugLayer}),f.d(v,"PhysicsViewer",function(){return ir.PhysicsViewer}),f.d(v,"RayHelper",function(){return ir.RayHelper}),f.d(v,"SkeletonViewer",function(){return ir.SkeletonViewer}),f.d(v,"DeviceInputSystem",function(){return nu}),f.d(v,"DeviceType",function(){return Kt}),f.d(v,"PointerInput",function(){return Ps}),f.d(v,"DualShockInput",function(){return Cs}),f.d(v,"XboxInput",function(){return xs}),f.d(v,"SwitchInput",function(){return Rs}),f.d(v,"DeviceSource",function(){return iu}),f.d(v,"DeviceSourceManager",function(){return ap}),f.d(v,"Constants",function(){return h.a}),f.d(v,"ThinEngine",function(){return Bt.a}),f.d(v,"Engine",function(){return Ve.a}),f.d(v,"EngineStore",function(){return te.a}),f.d(v,"NullEngineOptions",function(){return ru.b}),f.d(v,"NullEngine",function(){return ru.a}),f.d(v,"_OcclusionDataStorage",function(){return au}),f.d(v,"_forceTransformFeedbackToBundle",function(){return sp}),f.d(v,"EngineView",function(){return cp}),f.d(v,"WebGLPipelineContext",function(){return up.a}),f.d(v,"WebGL2ShaderProcessor",function(){return su.a}),f.d(v,"NativeEngine",function(){return _p}),f.d(v,"ShaderCodeInliner",function(){return Is}),f.d(v,"PerformanceConfigurator",function(){return mp.a}),f.d(v,"KeyboardEventTypes",function(){return Zi.a}),f.d(v,"KeyboardInfo",function(){return Zi.b}),f.d(v,"KeyboardInfoPre",function(){return Zi.c}),f.d(v,"PointerEventTypes",function(){return Tt.a}),f.d(v,"PointerInfoBase",function(){return Tt.c}),f.d(v,"PointerInfoPre",function(){return Tt.d}),f.d(v,"PointerInfo",function(){return Tt.b}),f.d(v,"ClipboardEventTypes",function(){return Qo}),f.d(v,"ClipboardInfo",function(){return gp}),f.d(v,"DaydreamController",function(){return Ls}),f.d(v,"GearVRController",function(){return Ns}),f.d(v,"GenericController",function(){return qo}),f.d(v,"OculusTouchController",function(){return ws}),f.d(v,"PoseEnabledControllerType",function(){return ri}),f.d(v,"PoseEnabledControllerHelper",function(){return wi}),f.d(v,"PoseEnabledController",function(){return _r}),f.d(v,"ViveController",function(){return hu}),f.d(v,"WebVRController",function(){return Bi}),f.d(v,"WindowsMotionController",function(){return Zo}),f.d(v,"XRWindowsMotionController",function(){return bp}),f.d(v,"StickValues",function(){return Wf}),f.d(v,"Gamepad",function(){return fn}),f.d(v,"GenericPad",function(){return El}),f.d(v,"GamepadManager",function(){return Il}),f.d(v,"GamepadSystemSceneComponent",function(){return Dl}),f.d(v,"Xbox360Button",function(){return In}),f.d(v,"Xbox360Dpad",function(){return $i}),f.d(v,"Xbox360Pad",function(){return Ol}),f.d(v,"DualShockButton",function(){return Hn}),f.d(v,"DualShockDpad",function(){return er}),f.d(v,"DualShockPad",function(){return Ml}),f.d(v,"AxisDragGizmo",function(){return Jo.a}),f.d(v,"AxisScaleGizmo",function(){return ao}),f.d(v,"BoundingBoxGizmo",function(){return du}),f.d(v,"Gizmo",function(){return Un.a}),f.d(v,"GizmoManager",function(){return yp}),f.d(v,"PlaneRotationGizmo",function(){return $o}),f.d(v,"PositionGizmo",function(){return pu}),f.d(v,"RotationGizmo",function(){return fu}),f.d(v,"ScaleGizmo",function(){return _u}),f.d(v,"LightGizmo",function(){return Tp}),f.d(v,"CameraGizmo",function(){return Sp}),f.d(v,"PlaneDragGizmo",function(){return ea}),f.d(v,"EnvironmentHelper",function(){return Gs}),f.d(v,"PhotoDome",function(){return wp}),f.d(v,"_forceSceneHelpersToBundle",function(){return C_}),f.d(v,"VideoDome",function(){return x_}),f.d(v,"EngineInstrumentation",function(){return R_}),f.d(v,"SceneInstrumentation",function(){return O_}),f.d(v,"_TimeToken",function(){return ou}),f.d(v,"EffectLayer",function(){return _o}),f.d(v,"EffectLayerSceneComponent",function(){return Du}),f.d(v,"GlowLayer",function(){return la}),f.d(v,"HighlightLayer",function(){return Qs}),f.d(v,"Layer",function(){return B_}),f.d(v,"LayerSceneComponent",function(){return Nu}),f.d(v,"LensFlare",function(){return wu}),f.d(v,"LensFlareSystem",function(){return qs}),f.d(v,"LensFlareSystemSceneComponent",function(){return Fu}),f.d(v,"Light",function(){return Oi.a}),f.d(v,"ShadowLight",function(){return ta}),f.d(v,"ShadowGenerator",function(){return Gn}),f.d(v,"CascadedShadowGenerator",function(){return Zs}),f.d(v,"ShadowGeneratorSceneComponent",function(){return ju}),f.d(v,"DirectionalLight",function(){return Bs}),f.d(v,"HemisphericLight",function(){return Ho.a}),f.d(v,"PointLight",function(){return Js}),f.d(v,"SpotLight",function(){return Us}),f.d(v,"DefaultLoadingScreen",function(){return Hu}),f.d(v,"_BabylonLoaderRegistered",function(){return nm}),f.d(v,"BabylonFileLoaderConfiguration",function(){return pa}),f.d(v,"SceneLoaderAnimationGroupLoadingMode",function(){return xi}),f.d(v,"SceneLoader",function(){return Ut}),f.d(v,"SceneLoaderFlags",function(){return Ri.a}),f.d(v,"BackgroundMaterial",function(){return co}),f.d(v,"ColorCurves",function(){return rm.a}),f.d(v,"EffectFallbacks",function(){return Ar.a}),f.d(v,"Effect",function(){return je.a}),f.d(v,"FresnelParameters",function(){return nh}),f.d(v,"ImageProcessingConfigurationDefines",function(){return yn.b}),f.d(v,"ImageProcessingConfiguration",function(){return yn.a}),f.d(v,"Material",function(){return Ht.a}),f.d(v,"MaterialDefines",function(){return ia.a}),f.d(v,"ThinMaterialHelper",function(){return ih.a}),f.d(v,"MaterialHelper",function(){return tt.a}),f.d(v,"MultiMaterial",function(){return rr.a}),f.d(v,"PBRMaterialDefines",function(){return js}),f.d(v,"PBRBaseMaterial",function(){return mn}),f.d(v,"PBRBaseSimpleMaterial",function(){return ic}),f.d(v,"PBRMaterial",function(){return ho}),f.d(v,"PBRMetallicRoughnessMaterial",function(){return rh}),f.d(v,"PBRSpecularGlossinessMaterial",function(){return oh}),f.d(v,"PushMaterial",function(){return ra.a}),f.d(v,"ShaderMaterial",function(){return _a.a}),f.d(v,"StandardMaterialDefines",function(){return Ft.b}),f.d(v,"StandardMaterial",function(){return Ft.a}),f.d(v,"BaseTexture",function(){return Wn.a}),f.d(v,"ColorGradingTexture",function(){return ah}),f.d(v,"CubeTexture",function(){return ai}),f.d(v,"DynamicTexture",function(){return Si.a}),f.d(v,"EquiRectangularCubeTexture",function(){return sh}),f.d(v,"HDRFiltering",function(){return Ku}),f.d(v,"HDRCubeTexture",function(){return ha}),f.d(v,"HtmlElementTexture",function(){return om}),f.d(v,"InternalTextureSource",function(){return xt.b}),f.d(v,"InternalTexture",function(){return xt.a}),f.d(v,"_DDSTextureLoader",function(){return yu}),f.d(v,"_ENVTextureLoader",function(){return Tu}),f.d(v,"_KTXTextureLoader",function(){return Eu}),f.d(v,"_TGATextureLoader",function(){return ch}),f.d(v,"_BasisTextureLoader",function(){return lh}),f.d(v,"MirrorTexture",function(){return ks}),f.d(v,"MultiRenderTarget",function(){return rc}),f.d(v,"TexturePacker",function(){return cm}),f.d(v,"TexturePackerFrame",function(){return oc}),f.d(v,"CustomProceduralTexture",function(){return um}),f.d(v,"NoiseProceduralTexture",function(){return hh}),f.d(v,"ProceduralTexture",function(){return vo}),f.d(v,"ProceduralTextureSceneComponent",function(){return uh}),f.d(v,"RawCubeTexture",function(){return dm}),f.d(v,"RawTexture",function(){return ii}),f.d(v,"RawTexture2DArray",function(){return fm}),f.d(v,"RawTexture3D",function(){return pm}),f.d(v,"RefractionTexture",function(){return _m}),f.d(v,"RenderTargetTexture",function(){return ln}),f.d(v,"Texture",function(){return we.a}),f.d(v,"VideoTexture",function(){return Iu}),f.d(v,"UniformBuffer",function(){return jl.a}),f.d(v,"MaterialFlags",function(){return ht.a}),f.d(v,"NodeMaterialBlockTargets",function(){return Re}),f.d(v,"NodeMaterialBlockConnectionPointTypes",function(){return le}),f.d(v,"NodeMaterialBlockConnectionPointMode",function(){return bn}),f.d(v,"NodeMaterialSystemValues",function(){return bt}),f.d(v,"NodeMaterialModes",function(){return Ln}),f.d(v,"NodeMaterialConnectionPointCompatibilityStates",function(){return li}),f.d(v,"NodeMaterialConnectionPointDirection",function(){return Tn}),f.d(v,"NodeMaterialConnectionPoint",function(){return ga}),f.d(v,"NodeMaterialBlock",function(){return pt}),f.d(v,"NodeMaterialDefines",function(){return Eo}),f.d(v,"NodeMaterial",function(){return Ea}),f.d(v,"VertexOutputBlock",function(){return bo}),f.d(v,"BonesBlock",function(){return mh}),f.d(v,"InstancesBlock",function(){return gh}),f.d(v,"MorphTargetsBlock",function(){return vh}),f.d(v,"LightInformationBlock",function(){return bh}),f.d(v,"FragmentOutputBlock",function(){return Nr}),f.d(v,"ImageProcessingBlock",function(){return yh}),f.d(v,"PerturbNormalBlock",function(){return Th}),f.d(v,"DiscardBlock",function(){return Eh}),f.d(v,"FrontFacingBlock",function(){return Sh}),f.d(v,"DerivativeBlock",function(){return Ah}),f.d(v,"FragCoordBlock",function(){return Ph}),f.d(v,"ScreenSizeBlock",function(){return Ch}),f.d(v,"FogBlock",function(){return xh}),f.d(v,"LightBlock",function(){return Rh}),f.d(v,"TextureBlock",function(){return Oh}),f.d(v,"ReflectionTextureBlock",function(){return Mh}),f.d(v,"CurrentScreenBlock",function(){return sc}),f.d(v,"InputBlock",function(){return At}),f.d(v,"AnimatedInputBlockTypes",function(){return ji}),f.d(v,"MultiplyBlock",function(){return ba}),f.d(v,"AddBlock",function(){return Ih}),f.d(v,"ScaleBlock",function(){return Dh}),f.d(v,"ClampBlock",function(){return Lh}),f.d(v,"CrossBlock",function(){return Nh}),f.d(v,"DotBlock",function(){return wh}),f.d(v,"TransformBlock",function(){return va}),f.d(v,"RemapBlock",function(){return hc}),f.d(v,"NormalizeBlock",function(){return Fh}),f.d(v,"TrigonometryBlockOperations",function(){return an}),f.d(v,"TrigonometryBlock",function(){return vc}),f.d(v,"ColorMergerBlock",function(){return Bh}),f.d(v,"VectorMergerBlock",function(){return yo}),f.d(v,"ColorSplitterBlock",function(){return gc}),f.d(v,"VectorSplitterBlock",function(){return Uh}),f.d(v,"LerpBlock",function(){return Vh}),f.d(v,"DivideBlock",function(){return kh}),f.d(v,"SubtractBlock",function(){return Gh}),f.d(v,"StepBlock",function(){return zh}),f.d(v,"OneMinusBlock",function(){return Tc}),f.d(v,"ViewDirectionBlock",function(){return Ec}),f.d(v,"FresnelBlock",function(){return jh}),f.d(v,"MaxBlock",function(){return Hh}),f.d(v,"MinBlock",function(){return Wh}),f.d(v,"DistanceBlock",function(){return Xh}),f.d(v,"LengthBlock",function(){return Yh}),f.d(v,"NegateBlock",function(){return Kh}),f.d(v,"PowBlock",function(){return Qh}),f.d(v,"RandomNumberBlock",function(){return qh}),f.d(v,"ArcTan2Block",function(){return Zh}),f.d(v,"SmoothStepBlock",function(){return Jh}),f.d(v,"ReciprocalBlock",function(){return $h}),f.d(v,"ReplaceColorBlock",function(){return ed}),f.d(v,"PosterizeBlock",function(){return td}),f.d(v,"WaveBlockKind",function(){return or}),f.d(v,"WaveBlock",function(){return nd}),f.d(v,"GradientBlockColorStep",function(){return Sa}),f.d(v,"GradientBlock",function(){return id}),f.d(v,"NLerpBlock",function(){return rd}),f.d(v,"WorleyNoise3DBlock",function(){return od}),f.d(v,"SimplexPerlin3DBlock",function(){return ad}),f.d(v,"NormalBlendBlock",function(){return sd}),f.d(v,"Rotate2dBlock",function(){return cd}),f.d(v,"ReflectBlock",function(){return ld}),f.d(v,"RefractBlock",function(){return ud}),f.d(v,"DesaturateBlock",function(){return hd}),f.d(v,"PBRMetallicRoughnessBlock",function(){return dd}),f.d(v,"SheenBlock",function(){return Sc}),f.d(v,"AnisotropyBlock",function(){return Ac}),f.d(v,"ReflectionBlock",function(){return Pc}),f.d(v,"ClearCoatBlock",function(){return Aa}),f.d(v,"RefractionBlock",function(){return Cc}),f.d(v,"SubSurfaceBlock",function(){return Pa}),f.d(v,"ParticleTextureBlock",function(){return cc}),f.d(v,"ParticleRampGradientBlock",function(){return lc}),f.d(v,"ParticleBlendMultiplyBlock",function(){return uc}),f.d(v,"ModBlock",function(){return fd}),f.d(v,"NodeMaterialOptimizer",function(){return ym}),f.d(v,"PropertyTypeForEdition",function(){return Lt}),f.d(v,"editableInPropertyPage",function(){return Vt}),f.d(v,"EffectRenderer",function(){return Xu}),f.d(v,"EffectWrapper",function(){return Yu}),f.d(v,"ShadowDepthWrapper",function(){return Sm}),f.d(v,"Scalar",function(){return $.a}),f.d(v,"extractMinAndMaxIndexed",function(){return pd.b}),f.d(v,"extractMinAndMax",function(){return pd.a}),f.d(v,"Space",function(){return ye.c}),f.d(v,"Axis",function(){return ye.a}),f.d(v,"Coordinate",function(){return ye.b}),f.d(v,"Color3",function(){return O.a}),f.d(v,"Color4",function(){return O.b}),f.d(v,"TmpColors",function(){return O.c}),f.d(v,"ToGammaSpace",function(){return Gt.b}),f.d(v,"ToLinearSpace",function(){return Gt.c}),f.d(v,"Epsilon",function(){return Gt.a}),f.d(v,"Frustum",function(){return Wl.a}),f.d(v,"Orientation",function(){return Ze.e}),f.d(v,"BezierCurve",function(){return Ze.c}),f.d(v,"Angle",function(){return Ze.a}),f.d(v,"Arc2",function(){return Ze.b}),f.d(v,"Path2",function(){return Ze.f}),f.d(v,"Path3D",function(){return Ze.g}),f.d(v,"Curve3",function(){return Ze.d}),f.d(v,"Plane",function(){return br.a}),f.d(v,"Size",function(){return oe.a}),f.d(v,"Vector2",function(){return l.d}),f.d(v,"Vector3",function(){return l.e}),f.d(v,"Vector4",function(){return l.f}),f.d(v,"Quaternion",function(){return l.b}),f.d(v,"Matrix",function(){return l.a}),f.d(v,"TmpVectors",function(){return l.c}),f.d(v,"PositionNormalVertex",function(){return Vs}),f.d(v,"PositionNormalTextureVertex",function(){return Ep}),f.d(v,"Viewport",function(){return Kn.a}),f.d(v,"SphericalHarmonics",function(){return Ms}),f.d(v,"SphericalPolynomial",function(){return oo}),f.d(v,"AbstractMesh",function(){return Dt.a}),f.d(v,"Buffer",function(){return Me.a}),f.d(v,"VertexBuffer",function(){return Me.b}),f.d(v,"DracoCompression",function(){return Pm}),f.d(v,"CSG",function(){return Rm}),f.d(v,"Geometry",function(){return $s.a}),f.d(v,"GroundMesh",function(){return Yo}),f.d(v,"TrailMesh",function(){return Om}),f.d(v,"InstancedMesh",function(){return Mm.a}),f.d(v,"LinesMesh",function(){return Ao.b}),f.d(v,"InstancedLinesMesh",function(){return Ao.a}),f.d(v,"_CreationDataStorage",function(){return De.b}),f.d(v,"_InstancesBatch",function(){return De.c}),f.d(v,"Mesh",function(){return De.a}),f.d(v,"VertexData",function(){return ft.a}),f.d(v,"MeshBuilder",function(){return Lm}),f.d(v,"SimplificationSettings",function(){return Nm}),f.d(v,"SimplificationQueue",function(){return yd}),f.d(v,"SimplificationType",function(){return xo}),f.d(v,"QuadraticErrorSimplification",function(){return Ed}),f.d(v,"SimplicationQueueSceneComponent",function(){return Sd}),f.d(v,"Polygon",function(){return Dm}),f.d(v,"PolygonMeshBuilder",function(){return vd}),f.d(v,"SubMesh",function(){return So.a}),f.d(v,"MeshLODLevel",function(){return Um.a}),f.d(v,"TransformNode",function(){return Sr.a}),f.d(v,"BoxBuilder",function(){return Er.a}),f.d(v,"TiledBoxBuilder",function(){return gd}),f.d(v,"DiscBuilder",function(){return Ca}),f.d(v,"RibbonBuilder",function(){return Po.a}),f.d(v,"SphereBuilder",function(){return Vn.a}),f.d(v,"HemisphereBuilder",function(){return na}),f.d(v,"CylinderBuilder",function(){return mi.a}),f.d(v,"TorusBuilder",function(){return vr}),f.d(v,"TorusKnotBuilder",function(){return Oc}),f.d(v,"LinesBuilder",function(){return un.a}),f.d(v,"PolygonBuilder",function(){return Co}),f.d(v,"ShapeBuilder",function(){return fa.a}),f.d(v,"LatheBuilder",function(){return Ic}),f.d(v,"PlaneBuilder",function(){return Fs.a}),f.d(v,"TiledPlaneBuilder",function(){return bd}),f.d(v,"GroundBuilder",function(){return Ui}),f.d(v,"TubeBuilder",function(){return Dc}),f.d(v,"PolyhedronBuilder",function(){return so}),f.d(v,"IcoSphereBuilder",function(){return Lc}),f.d(v,"DecalBuilder",function(){return Nc}),f.d(v,"CapsuleBuilder",function(){return wc}),f.d(v,"DataBuffer",function(){return cu.a}),f.d(v,"WebGLDataBuffer",function(){return Vm.a}),f.d(v,"MorphTarget",function(){return Qu}),f.d(v,"MorphTargetManager",function(){return da}),f.d(v,"RecastJSPlugin",function(){return km}),f.d(v,"RecastJSCrowd",function(){return Ad}),f.d(v,"Node",function(){return Q.a}),f.d(v,"Database",function(){return Pd}),f.d(v,"BaseParticleSystem",function(){return To}),f.d(v,"BoxParticleEmitter",function(){return wr}),f.d(v,"ConeParticleEmitter",function(){return dc}),f.d(v,"CylinderParticleEmitter",function(){return ya}),f.d(v,"CylinderDirectedParticleEmitter",function(){return fc}),f.d(v,"HemisphericParticleEmitter",function(){return pc}),f.d(v,"PointParticleEmitter",function(){return _c}),f.d(v,"SphereParticleEmitter",function(){return Ta}),f.d(v,"SphereDirectedParticleEmitter",function(){return mc}),f.d(v,"CustomParticleEmitter",function(){return Fr}),f.d(v,"MeshParticleEmitter",function(){return ph}),f.d(v,"GPUParticleSystem",function(){return ar}),f.d(v,"Particle",function(){return xd}),f.d(v,"ParticleHelper",function(){return Km}),f.d(v,"ParticleSystem",function(){return hn}),f.d(v,"ParticleSystemSet",function(){return xa}),f.d(v,"SolidParticle",function(){return Uc}),f.d(v,"ModelShape",function(){return Vc}),f.d(v,"DepthSortedParticle",function(){return Rd}),f.d(v,"SolidParticleVertex",function(){return Od}),f.d(v,"SolidParticleSystem",function(){return Qm}),f.d(v,"CloudPoint",function(){return Md}),f.d(v,"PointsGroup",function(){return Ra}),f.d(v,"PointColor",function(){return En}),f.d(v,"PointsCloudSystem",function(){return qm}),f.d(v,"SubEmitterType",function(){return Br}),f.d(v,"SubEmitter",function(){return Ro}),f.d(v,"PhysicsEngine",function(){return Dr}),f.d(v,"PhysicsEngineSceneComponent",function(){return Id}),f.d(v,"PhysicsHelper",function(){return Zm}),f.d(v,"PhysicsRadialExplosionEventOptions",function(){return Vr}),f.d(v,"PhysicsUpdraftEventOptions",function(){return kc}),f.d(v,"PhysicsVortexEventOptions",function(){return Gc}),f.d(v,"PhysicsRadialImpulseFalloff",function(){return Oo}),f.d(v,"PhysicsUpdraftMode",function(){return Ur}),f.d(v,"PhysicsImpostor",function(){return Ct.a}),f.d(v,"PhysicsJoint",function(){return nn.e}),f.d(v,"DistanceJoint",function(){return nn.a}),f.d(v,"MotorEnabledJoint",function(){return nn.d}),f.d(v,"HingeJoint",function(){return nn.c}),f.d(v,"Hinge2Joint",function(){return nn.b}),f.d(v,"CannonJSPlugin",function(){return nc}),f.d(v,"AmmoJSPlugin",function(){return Zu}),f.d(v,"OimoJSPlugin",function(){return qu}),f.d(v,"AnaglyphPostProcess",function(){return gs}),f.d(v,"BlackAndWhitePostProcess",function(){return Ld}),f.d(v,"BloomEffect",function(){return Hc}),f.d(v,"BloomMergePostProcess",function(){return jc}),f.d(v,"BlurPostProcess",function(){return gn}),f.d(v,"ChromaticAberrationPostProcess",function(){return Wc}),f.d(v,"CircleOfConfusionPostProcess",function(){return Xc}),f.d(v,"ColorCorrectionPostProcess",function(){return Nd}),f.d(v,"ConvolutionPostProcess",function(){return wd}),f.d(v,"DepthOfFieldBlurPostProcess",function(){return Oa}),f.d(v,"DepthOfFieldEffectBlurLevel",function(){return sr}),f.d(v,"DepthOfFieldEffect",function(){return Yc}),f.d(v,"DepthOfFieldMergePostProcessOptions",function(){return lg}),f.d(v,"DepthOfFieldMergePostProcess",function(){return Fd}),f.d(v,"DisplayPassPostProcess",function(){return Bd}),f.d(v,"ExtractHighlightsPostProcess",function(){return zc}),f.d(v,"FilterPostProcess",function(){return Ud}),f.d(v,"FxaaPostProcess",function(){return Mo}),f.d(v,"GrainPostProcess",function(){return Kc}),f.d(v,"HighlightsPostProcess",function(){return mg}),f.d(v,"ImageProcessingPostProcess",function(){return Xo}),f.d(v,"MotionBlurPostProcess",function(){return Qc}),f.d(v,"PassPostProcess",function(){return Fi}),f.d(v,"PassCubePostProcess",function(){return Zf}),f.d(v,"PostProcess",function(){return _t}),f.d(v,"PostProcessManager",function(){return bs.a}),f.d(v,"RefractionPostProcess",function(){return kd}),f.d(v,"DefaultRenderingPipeline",function(){return jd}),f.d(v,"LensRenderingPipeline",function(){return Pg}),f.d(v,"SSAO2RenderingPipeline",function(){return Hd}),f.d(v,"SSAORenderingPipeline",function(){return Mg}),f.d(v,"StandardRenderingPipeline",function(){return Wd}),f.d(v,"PostProcessRenderEffect",function(){return Rt}),f.d(v,"PostProcessRenderPipeline",function(){return kr}),f.d(v,"PostProcessRenderPipelineManager",function(){return Gd}),f.d(v,"PostProcessRenderPipelineManagerSceneComponent",function(){return zd}),f.d(v,"SharpenPostProcess",function(){return qc}),f.d(v,"StereoscopicInterlacePostProcessI",function(){return wg}),f.d(v,"StereoscopicInterlacePostProcess",function(){return Fg}),f.d(v,"TonemappingOperator",function(){return cr}),f.d(v,"TonemapPostProcess",function(){return Ug}),f.d(v,"VolumetricLightScatteringPostProcess",function(){return Xd}),f.d(v,"VRDistortionCorrectionPostProcess",function(){return vs}),f.d(v,"VRMultiviewToSingleviewPostProcess",function(){return ys}),f.d(v,"ScreenSpaceReflectionPostProcess",function(){return Zc}),f.d(v,"ScreenSpaceCurvaturePostProcess",function(){return Yd}),f.d(v,"ReflectionProbe",function(){return Ju}),f.d(v,"BoundingBoxRenderer",function(){return Kd}),f.d(v,"DepthRenderer",function(){return ua}),f.d(v,"DepthRendererSceneComponent",function(){return Qd}),f.d(v,"EdgesRenderer",function(){return Jc}),f.d(v,"LineEdgesRenderer",function(){return qd}),f.d(v,"GeometryBufferRenderer",function(){return ui}),f.d(v,"GeometryBufferRendererSceneComponent",function(){return Vd}),f.d(v,"PrePassRenderer",function(){return $c}),f.d(v,"PrePassRendererSceneComponent",function(){return Zd}),f.d(v,"SubSurfaceSceneComponent",function(){return $d}),f.d(v,"OutlineRenderer",function(){return ef}),f.d(v,"RenderingGroup",function(){return Zg.a}),f.d(v,"RenderingGroupInfo",function(){return no.a}),f.d(v,"RenderingManager",function(){return no.b}),f.d(v,"UtilityLayerRenderer",function(){return Dn.a}),f.d(v,"Scene",function(){return _e.a}),f.d(v,"SceneComponentConstants",function(){return st.a}),f.d(v,"Stage",function(){return st.b}),f.d(v,"Sprite",function(){return tf}),f.d(v,"SpriteManager",function(){return rf}),f.d(v,"SpriteMap",function(){return iv}),f.d(v,"SpritePackedManager",function(){return rv}),f.d(v,"SpriteSceneComponent",function(){return nf}),f.d(v,"AlphaState",function(){return ov.a}),f.d(v,"DepthCullingState",function(){return av.a}),f.d(v,"StencilState",function(){return sv.a}),f.d(v,"AndOrNotEvaluator",function(){return cv.a}),f.d(v,"AssetTaskState",function(){return vi}),f.d(v,"AbstractAssetTask",function(){return bi}),f.d(v,"AssetsProgressEvent",function(){return of}),f.d(v,"ContainerAssetTask",function(){return af}),f.d(v,"MeshAssetTask",function(){return sf}),f.d(v,"TextFileAssetTask",function(){return cf}),f.d(v,"BinaryFileAssetTask",function(){return lf}),f.d(v,"ImageAssetTask",function(){return uf}),f.d(v,"TextureAssetTask",function(){return hf}),f.d(v,"CubeTextureAssetTask",function(){return df}),f.d(v,"HDRCubeTextureAssetTask",function(){return ff}),f.d(v,"EquiRectangularCubeTextureAssetTask",function(){return pf}),f.d(v,"AssetsManager",function(){return lv}),f.d(v,"BasisTranscodeConfiguration",function(){return am}),f.d(v,"BasisTools",function(){return go}),f.d(v,"DDSTools",function(){return Gi}),f.d(v,"expandToProperty",function(){return L.b}),f.d(v,"serialize",function(){return L.c}),f.d(v,"serializeAsTexture",function(){return L.m}),f.d(v,"serializeAsColor3",function(){return L.e}),f.d(v,"serializeAsFresnelParameters",function(){return L.h}),f.d(v,"serializeAsVector2",function(){return L.n}),f.d(v,"serializeAsVector3",function(){return L.o}),f.d(v,"serializeAsMeshReference",function(){return L.k}),f.d(v,"serializeAsColorCurves",function(){return L.g}),f.d(v,"serializeAsColor4",function(){return L.f}),f.d(v,"serializeAsImageProcessingConfiguration",function(){return L.i}),f.d(v,"serializeAsQuaternion",function(){return L.l}),f.d(v,"serializeAsMatrix",function(){return L.j}),f.d(v,"serializeAsCameraReference",function(){return L.d}),f.d(v,"SerializationHelper",function(){return L.a}),f.d(v,"Deferred",function(){return uv}),f.d(v,"EnvironmentTextureTools",function(){return Ci}),f.d(v,"MeshExploder",function(){return hv}),f.d(v,"FilesInput",function(){return dv}),f.d(v,"CubeMapToSphericalPolynomialTools",function(){return Ko}),f.d(v,"HDRTools",function(){return Wu}),f.d(v,"PanoramaToCubeMapTools",function(){return ec}),f.d(v,"KhronosTextureContainer",function(){return ca}),f.d(v,"EventState",function(){return P.a}),f.d(v,"Observer",function(){return P.d}),f.d(v,"MultiObserver",function(){return P.b}),f.d(v,"Observable",function(){return P.c}),f.d(v,"PerformanceMonitor",function(){return _f.a}),f.d(v,"RollingAverage",function(){return _f.b}),f.d(v,"PromisePolyfill",function(){return fv.a}),f.d(v,"SceneOptimization",function(){return yi}),f.d(v,"TextureOptimization",function(){return Ma}),f.d(v,"HardwareScalingOptimization",function(){return tl}),f.d(v,"ShadowsOptimization",function(){return Ia}),f.d(v,"PostProcessesOptimization",function(){return Da}),f.d(v,"LensFlaresOptimization",function(){return La}),f.d(v,"CustomOptimization",function(){return mf}),f.d(v,"ParticlesOptimization",function(){return Na}),f.d(v,"RenderTargetsOptimization",function(){return nl}),f.d(v,"MergeMeshesOptimization",function(){return wa}),f.d(v,"SceneOptimizerOptions",function(){return il}),f.d(v,"SceneOptimizer",function(){return pv}),f.d(v,"SceneSerializer",function(){return ol}),f.d(v,"SmartArray",function(){return _i.a}),f.d(v,"SmartArrayNoDuplicate",function(){return _i.b}),f.d(v,"StringDictionary",function(){return Al.a}),f.d(v,"Tags",function(){return _v.a}),f.d(v,"TextureTools",function(){return mv}),f.d(v,"TGATools",function(){return ma}),f.d(v,"Tools",function(){return Ye.b}),f.d(v,"className",function(){return Ye.c}),f.d(v,"AsyncLoop",function(){return Ye.a}),f.d(v,"VideoRecorder",function(){return gv}),f.d(v,"JoystickAxis",function(){return cn}),f.d(v,"VirtualJoystick",function(){return fs}),f.d(v,"WorkerPool",function(){return Ws}),f.d(v,"Logger",function(){return u.a}),f.d(v,"_TypeStore",function(){return R.a}),f.d(v,"FilesInputStore",function(){return Ds.a}),f.d(v,"DeepCopier",function(){return de.a}),f.d(v,"PivotTools",function(){return jn.a}),f.d(v,"PrecisionDate",function(){return be.a}),f.d(v,"ScreenshotTools",function(){return Io}),f.d(v,"WebRequest",function(){return re.a}),f.d(v,"InspectableType",function(){return el}),f.d(v,"BRDFTextureTools",function(){return oa}),f.d(v,"RGBDTextureTools",function(){return mu}),f.d(v,"ColorGradient",function(){return Fc}),f.d(v,"Color3Gradient",function(){return Cd}),f.d(v,"FactorGradient",function(){return Bc}),f.d(v,"GradientHelper",function(){return Nn}),f.d(v,"PerfCounter",function(){return Xn.a}),f.d(v,"RetryStrategy",function(){return vv.a}),f.d(v,"CanvasGenerator",function(){return Ts.a}),f.d(v,"LoadFileError",function(){return ro.b}),f.d(v,"RequestFileError",function(){return ro.d}),f.d(v,"ReadFileError",function(){return ro.c}),f.d(v,"FileTools",function(){return ro.a}),f.d(v,"StringTools",function(){return Qn.a}),f.d(v,"DataReader",function(){return bv}),f.d(v,"MinMaxReducer",function(){return Vu}),f.d(v,"DepthReducer",function(){return ku}),f.d(v,"DataStorage",function(){return yv}),f.d(v,"SceneRecorder",function(){return Tv}),f.d(v,"KhronosTextureContainer2",function(){return Xs}),f.d(v,"Trajectory",function(){return Ev}),f.d(v,"TrajectoryClassifier",function(){return Sv}),f.d(v,"TimerState",function(){return zi}),f.d(v,"setAndStartTimer",function(){return Ks}),f.d(v,"AdvancedTimer",function(){return A_}),f.d(v,"CopyTools",function(){return Av.a}),f.d(v,"WebXRCamera",function(){return Su}),f.d(v,"WebXREnterExitUIButton",function(){return Ru}),f.d(v,"WebXREnterExitUIOptions",function(){return S_}),f.d(v,"WebXREnterExitUI",function(){return Ou}),f.d(v,"WebXRExperienceHelper",function(){return Au}),f.d(v,"WebXRInput",function(){return xu}),f.d(v,"WebXRInputSource",function(){return Cu}),f.d(v,"WebXRManagedOutputCanvasOptions",function(){return Es}),f.d(v,"WebXRManagedOutputCanvas",function(){return Kl}),f.d(v,"WebXRState",function(){return _n}),f.d(v,"WebXRTrackingState",function(){return tr}),f.d(v,"WebXRSessionManager",function(){return Ss}),f.d(v,"WebXRDefaultExperienceOptions",function(){return P_}),f.d(v,"WebXRDefaultExperience",function(){return Mu}),f.d(v,"WebXRFeatureName",function(){return si}),f.d(v,"WebXRFeaturesManager",function(){return qn}),f.d(v,"WebXRAbstractFeature",function(){return ci}),f.d(v,"WebXRHitTestLegacy",function(){return Ba}),f.d(v,"WebXRAnchorSystem",function(){return Ua}),f.d(v,"WebXRPlaneDetector",function(){return Va}),f.d(v,"WebXRBackgroundRemover",function(){return ka}),f.d(v,"WebXRMotionControllerTeleportation",function(){return po}),f.d(v,"WebXRControllerPointerSelection",function(){return fo}),f.d(v,"IWebXRControllerPhysicsOptions",function(){return xv}),f.d(v,"WebXRControllerPhysics",function(){return Ga}),f.d(v,"WebXRHitTest",function(){return za}),f.d(v,"WebXRFeaturePointSystem",function(){return ja}),f.d(v,"WebXRHand",function(){return yf}),f.d(v,"WebXRHandTracking",function(){return Ha}),f.d(v,"WebXRAbstractMotionController",function(){return Or}),f.d(v,"WebXRControllerComponent",function(){return Rr}),f.d(v,"WebXRGenericTriggerMotionController",function(){return Ys}),f.d(v,"WebXRMicrosoftMixedRealityController",function(){return Tf}),f.d(v,"WebXRMotionControllerManager",function(){return kn}),f.d(v,"WebXROculusTouchMotionController",function(){return sl}),f.d(v,"WebXRHTCViveMotionController",function(){return Ef}),f.d(v,"WebXRProfiledMotionController",function(){return Pu});var B=f(35),_=f(91),P=f(6),l=f(0),O=f(9),R=f(11),x=function(){function r(t,e){this.triggerOptions=t,this.onBeforeExecuteObservable=new P.c,t.parameter?(this.trigger=t.trigger,this._triggerParameter=t.parameter):t.trigger?this.trigger=t.trigger:this.trigger=t,this._nextActiveAction=this,this._condition=e}return r.prototype._prepare=function(){},r.prototype.getTriggerParameter=function(){return this._triggerParameter},r.prototype._executeCurrent=function(t){if(this._nextActiveAction._condition){var e=this._nextActiveAction._condition,n=this._actionManager.getScene().getRenderId();if(e._evaluationId===n){if(!e._currentResult)return}else{if(e._evaluationId=n,!e.isValid())return void(e._currentResult=!1);e._currentResult=!0}}this.onBeforeExecuteObservable.notifyObservers(this),this._nextActiveAction.execute(t),this.skipToNextActiveAction()},r.prototype.execute=function(t){},r.prototype.skipToNextActiveAction=function(){this._nextActiveAction._child?(this._nextActiveAction._child._actionManager||(this._nextActiveAction._child._actionManager=this._actionManager),this._nextActiveAction=this._nextActiveAction._child):this._nextActiveAction=this},r.prototype.then=function(t){return this._child=t,t._actionManager=this._actionManager,t._prepare(),t},r.prototype._getProperty=function(t){return this._actionManager._getProperty(t)},r.prototype._getEffectiveTarget=function(t,e){return this._actionManager._getEffectiveTarget(t,e)},r.prototype.serialize=function(t){},r.prototype._serialize=function(t,e){var n={type:1,children:[],name:t.name,properties:t.properties||[]};if(this._child&&this._child.serialize(n),this._condition){var i=this._condition.serialize();return i.children.push(n),e&&e.children.push(i),i}return e&&e.children.push(n),n},r._SerializeValueAsString=function(t){return typeof t=="number"?t.toString():typeof t=="boolean"?t?"true":"false":t instanceof l.d?t.x+", "+t.y:t instanceof l.e?t.x+", "+t.y+", "+t.z:t instanceof O.a?t.r+", "+t.g+", "+t.b:t instanceof O.b?t.r+", "+t.g+", "+t.b+", "+t.a:t},r._GetTargetProperty=function(t){return{name:"target",targetType:t._isMesh?"MeshProperties":t._isLight?"LightProperties":t._isCamera?"CameraProperties":"SceneProperties",value:t._isScene?"Scene":t.name}},r}();R.a.RegisteredTypes["BABYLON.Action"]=x;var m=f(47),c=f(1),T=function(){function r(t){this._actionManager=t}return r.prototype.isValid=function(){return!0},r.prototype._getProperty=function(t){return this._actionManager._getProperty(t)},r.prototype._getEffectiveTarget=function(t,e){return this._actionManager._getEffectiveTarget(t,e)},r.prototype.serialize=function(){},r.prototype._serialize=function(t){return{type:2,children:[],name:t.name,properties:t.properties}},r}(),A=function(r){function t(e,n,i,o,a){a===void 0&&(a=t.IsEqual);var s=r.call(this,e)||this;return s.propertyPath=i,s.value=o,s.operator=a,s._target=n,s._effectiveTarget=s._getEffectiveTarget(n,s.propertyPath),s._property=s._getProperty(s.propertyPath),s}return Object(c.d)(t,r),Object.defineProperty(t,"IsEqual",{get:function(){return t._IsEqual},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsDifferent",{get:function(){return t._IsDifferent},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsGreater",{get:function(){return t._IsGreater},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsLesser",{get:function(){return t._IsLesser},enumerable:!1,configurable:!0}),t.prototype.isValid=function(){switch(this.operator){case t.IsGreater:return this._effectiveTarget[this._property]>this.value;case t.IsLesser:return this._effectiveTarget[this._property]-1&&this._scene.actionManagers.splice(e,1)},t.prototype.getScene=function(){return this._scene},t.prototype.hasSpecificTriggers=function(e){for(var n=0;n-1)return!0}return!1},t.prototype.hasSpecificTriggers2=function(e,n){for(var i=0;i=t.OnPickTrigger&&n.trigger<=t.OnPointerOutTrigger)return!0}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasPickTriggers",{get:function(){for(var e=0;e=t.OnPickTrigger&&n.trigger<=t.OnPickUpTrigger)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.registerAction=function(e){return e.trigger===t.OnEveryFrameTrigger&&this.getScene().actionManager!==this?(u.a.Warn("OnEveryFrameTrigger can only be used with scene.actionManager"),null):(this.actions.push(e),t.Triggers[e.trigger]?t.Triggers[e.trigger]++:t.Triggers[e.trigger]=1,e._actionManager=this,e._prepare(),e)},t.prototype.unregisterAction=function(e){var n=this.actions.indexOf(e);return n!==-1&&(this.actions.splice(n,1),t.Triggers[e.trigger]-=1,t.Triggers[e.trigger]===0&&delete t.Triggers[e.trigger],e._actionManager=null,!0)},t.prototype.processTrigger=function(e,n){for(var i=0;i0;if(F.type===2?ce.push(o):ce.push(z),ve){for(var Te=new Array,Oe=0;Oe0){var C=y.properties[0].value,M=y.properties[0].targetType===null?C:i.getMeshByName(C);M._meshId&&(M.mesh=i.getMeshByID(M._meshId)),p={trigger:t[y.name],parameter:M}}else p=t[y.name];for(var U=0;U=0?e:0;var s=0,d=a._keys[0],p=a._keys.length-1,y=a._keys[p],C={referenceValue:d.value,referencePosition:l.c.Vector3[0],referenceQuaternion:l.c.Quaternion[0],referenceScaling:l.c.Vector3[1],keyPosition:l.c.Vector3[2],keyQuaternion:l.c.Quaternion[1],keyScaling:l.c.Vector3[3]},M=!1,U=d.frame,F=y.frame;if(n){var z=a.getRange(n);z&&(U=z.from,F=z.to)}var J=d.frame===U,ie=y.frame===F;if(a._keys.length===1){var se=a._getKeyValue(a._keys[0]);C.referenceValue=se.clone?se.clone():se,M=!0}else e<=d.frame?(se=a._getKeyValue(d.value),C.referenceValue=se.clone?se.clone():se,M=!0):e>=y.frame&&(se=a._getKeyValue(y.value),C.referenceValue=se.clone?se.clone():se,M=!0);for(var ce=0;!M||!J||!ie&&ce=ue.frame&&e<=fe.frame){if(se=void 0,e===ue.frame)se=a._getKeyValue(ue.value);else if(e===fe.frame)se=a._getKeyValue(fe.value);else{var ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};se=a._interpolate(e,ve)}C.referenceValue=se.clone?se.clone():se,M=!0}if(!J&&U>=ue.frame&&U<=fe.frame){if(U===ue.frame)s=ce;else if(U===fe.frame)s=ce+1;else{ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};var Te={frame:U,value:(se=a._interpolate(U,ve)).clone?se.clone():se};a._keys.splice(ce+1,0,Te),s=ce+1}J=!0}!ie&&F>=ue.frame&&F<=fe.frame&&(F===ue.frame?p=ce:F===fe.frame?p=ce+1:(ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT},Te={frame:F,value:(se=a._interpolate(F,ve)).clone?se.clone():se},a._keys.splice(ce+1,0,Te),p=ce+1),ie=!0),ce++}for(a.dataType===r.ANIMATIONTYPE_QUATERNION?C.referenceValue.normalize().conjugateInPlace():a.dataType===r.ANIMATIONTYPE_MATRIX&&(C.referenceValue.decompose(C.referenceScaling,C.referenceQuaternion,C.referencePosition),C.referenceQuaternion.normalize().conjugateInPlace()),ce=s;ce<=p;ce++)if(Te=a._keys[ce],!ce||a.dataType===r.ANIMATIONTYPE_FLOAT||Te.value!==d.value)switch(a.dataType){case r.ANIMATIONTYPE_MATRIX:Te.value.decompose(C.keyScaling,C.keyQuaternion,C.keyPosition),C.keyPosition.subtractInPlace(C.referencePosition),C.keyScaling.divideInPlace(C.referenceScaling),C.referenceQuaternion.multiplyToRef(C.keyQuaternion,C.keyQuaternion),l.a.ComposeToRef(C.keyScaling,C.keyQuaternion,C.keyPosition,Te.value);break;case r.ANIMATIONTYPE_QUATERNION:C.referenceValue.multiplyToRef(Te.value,Te.value);break;case r.ANIMATIONTYPE_VECTOR2:case r.ANIMATIONTYPE_VECTOR3:case r.ANIMATIONTYPE_COLOR3:case r.ANIMATIONTYPE_COLOR4:Te.value.subtractToRef(C.referenceValue,Te.value);break;case r.ANIMATIONTYPE_SIZE:Te.value.width-=C.referenceValue.width,Te.value.height-=C.referenceValue.height;break;default:Te.value-=C.referenceValue}return a},r.TransitionTo=function(t,e,n,i,o,a,s,d){if(d===void 0&&(d=null),s<=0)return n[t]=e,d&&d(),null;var p=o*(s/1e3);a.setKeys([{frame:0,value:n[t].clone?n[t].clone():n[t]},{frame:p,value:e}]),n.animations||(n.animations=[]),n.animations.push(a);var y=i.beginAnimation(n,0,p,!1);return y.onAnimationEnd=d,y},Object.defineProperty(r.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var t=0,e=this._runtimeAnimations;t=0;a--)this._keys[a].frame>=i&&this._keys[a].frame<=o&&this._keys.splice(a,1);this._ranges[t]=null}},r.prototype.getRange=function(t){return this._ranges[t]},r.prototype.getKeys=function(){return this._keys},r.prototype.getHighestFrame=function(){for(var t=0,e=0,n=this._keys.length;e0)return e.highLimitValue.clone?e.highLimitValue.clone():e.highLimitValue;var n=this._keys;if(n.length===1)return this._getKeyValue(n[0].value);var i=e.key;if(n[i].frame>=t)for(;i-1>=0&&n[i].frame>=t;)i--;for(var o=i;o=t){e.key=o;var s=n[o],d=this._getKeyValue(s.value);if(s.interpolation===K.STEP)return d;var p=this._getKeyValue(a.value),y=s.outTangent!==void 0&&a.inTangent!==void 0,C=a.frame-s.frame,M=(t-s.frame)/C,U=this.getEasingFunction();switch(U!=null&&(M=U.ease(M)),this.dataType){case r.ANIMATIONTYPE_FLOAT:var F=y?this.floatInterpolateFunctionWithTangents(d,s.outTangent*C,p,a.inTangent*C,M):this.floatInterpolateFunction(d,p,M);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return F;case r.ANIMATIONLOOPMODE_RELATIVE:return e.offsetValue*e.repeatCount+F}break;case r.ANIMATIONTYPE_QUATERNION:var z=y?this.quaternionInterpolateFunctionWithTangents(d,s.outTangent.scale(C),p,a.inTangent.scale(C),M):this.quaternionInterpolateFunction(d,p,M);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return z;case r.ANIMATIONLOOPMODE_RELATIVE:return z.addInPlace(e.offsetValue.scale(e.repeatCount))}return z;case r.ANIMATIONTYPE_VECTOR3:var J=y?this.vector3InterpolateFunctionWithTangents(d,s.outTangent.scale(C),p,a.inTangent.scale(C),M):this.vector3InterpolateFunction(d,p,M);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return J;case r.ANIMATIONLOOPMODE_RELATIVE:return J.add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_VECTOR2:var ie=y?this.vector2InterpolateFunctionWithTangents(d,s.outTangent.scale(C),p,a.inTangent.scale(C),M):this.vector2InterpolateFunction(d,p,M);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return ie;case r.ANIMATIONLOOPMODE_RELATIVE:return ie.add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_SIZE:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(d,p,M);case r.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(d,p,M).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_COLOR3:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(d,p,M);case r.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(d,p,M).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_COLOR4:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.color4InterpolateFunction(d,p,M);case r.ANIMATIONLOOPMODE_RELATIVE:return this.color4InterpolateFunction(d,p,M).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_MATRIX:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:if(r.AllowMatricesInterpolation)return this.matrixInterpolateFunction(d,p,M,e.workValue);case r.ANIMATIONLOOPMODE_RELATIVE:return d}}break}}return this._getKeyValue(n[n.length-1].value)},r.prototype.matrixInterpolateFunction=function(t,e,n,i){return r.AllowMatrixDecomposeForInterpolation?i?(l.a.DecomposeLerpToRef(t,e,n,i),i):l.a.DecomposeLerp(t,e,n):i?(l.a.LerpToRef(t,e,n,i),i):l.a.Lerp(t,e,n)},r.prototype.clone=function(){var t=new r(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,this._keys&&t.setKeys(this._keys),this._ranges)for(var e in t._ranges={},this._ranges){var n=this._ranges[e];n&&(t._ranges[e]=n.clone())}return t},r.prototype.setKeys=function(t){this._keys=t.slice(0)},r.prototype.serialize=function(){var t={};t.name=this.name,t.property=this.targetProperty,t.framePerSecond=this.framePerSecond,t.dataType=this.dataType,t.loopBehavior=this.loopMode,t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed;var e=this.dataType;t.keys=[];for(var n=this.getKeys(),i=0;i=1&&(s=p.values[1]),p.values.length>=2&&(d=p.values[2]);break;case r.ANIMATIONTYPE_QUATERNION:if(e=l.b.FromArray(p.values),p.values.length>=8){var y=l.b.FromArray(p.values.slice(4,8));y.equals(l.b.Zero())||(s=y)}if(p.values.length>=12){var C=l.b.FromArray(p.values.slice(8,12));C.equals(l.b.Zero())||(d=C)}break;case r.ANIMATIONTYPE_MATRIX:e=l.a.FromArray(p.values);break;case r.ANIMATIONTYPE_COLOR3:e=O.a.FromArray(p.values);break;case r.ANIMATIONTYPE_COLOR4:e=O.b.FromArray(p.values);break;case r.ANIMATIONTYPE_VECTOR3:default:e=l.e.FromArray(p.values)}var M={};M.frame=p.frame,M.value=e,s!=null&&(M.inTangent=s),d!=null&&(M.outTangent=d),a.push(M)}if(i.setKeys(a),t.ranges)for(n=0;n0&&C.forEach(function(M){o._events.push(M._clone())}),this._enableBlending=t&&t.animationPropertiesOverride?t.animationPropertiesOverride.enableBlending:this._animation.enableBlending}return Object.defineProperty(r.prototype,"currentFrame",{get:function(){return this._currentFrame},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"weight",{get:function(){return this._weight},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"targetPath",{get:function(){return this._targetPath},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"target",{get:function(){return this._currentActiveTarget},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isAdditive",{get:function(){return this._host&&this._host.isAdditive},enumerable:!1,configurable:!0}),r.prototype._preparePath=function(t,e){e===void 0&&(e=0);var n=this._animation.targetPropertyPath;if(n.length>1){for(var i=t[n[0]],o=1;o-1&&this._animation.runtimeAnimations.splice(t,1)},r.prototype.setValue=function(t,e){if(this._targetIsArray)for(var n=0;ne[e.length-1].frame&&(t=e[e.length-1].frame);var n=this._events;if(n.length)for(var i=0;ithis._maxFrame)&&(e=this._minFrame),(nthis._maxFrame)&&(n=this._maxFrame);var y,C,M=n-e,U=t*(s.framePerSecond*o)/1e3+this._ratioOffset,F=0;if(this._previousDelay=t,this._previousRatio=U,!i&&n>=e&&U>=M)p=!1,F=s._getKeyValue(this._maxValue);else if(!i&&e>=n&&U<=M)p=!1,F=s._getKeyValue(this._minValue);else if(this._animationState.loopMode!==k.ANIMATIONLOOPMODE_CYCLE){var z=n.toString()+e.toString();if(!this._offsetsCache[z]){this._animationState.repeatCount=0,this._animationState.loopMode=k.ANIMATIONLOOPMODE_CYCLE;var J=s._interpolate(e,this._animationState),ie=s._interpolate(n,this._animationState);switch(this._animationState.loopMode=this._getCorrectLoopMode(),s.dataType){case k.ANIMATIONTYPE_FLOAT:this._offsetsCache[z]=ie-J;break;case k.ANIMATIONTYPE_QUATERNION:this._offsetsCache[z]=ie.subtract(J);break;case k.ANIMATIONTYPE_VECTOR3:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_VECTOR2:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_SIZE:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_COLOR3:this._offsetsCache[z]=ie.subtract(J)}this._highLimitsCache[z]=ie}F=this._highLimitsCache[z],y=this._offsetsCache[z]}if(y===void 0)switch(s.dataType){case k.ANIMATIONTYPE_FLOAT:y=0;break;case k.ANIMATIONTYPE_QUATERNION:y=Z;break;case k.ANIMATIONTYPE_VECTOR3:y=W;break;case k.ANIMATIONTYPE_VECTOR2:y=q;break;case k.ANIMATIONTYPE_SIZE:y=he;break;case k.ANIMATIONTYPE_COLOR3:y=ge}if(this._host&&this._host.syncRoot){var se=this._host.syncRoot;C=e+(n-e)*((se.masterFrame-se.fromFrame)/(se.toFrame-se.fromFrame))}else C=p&&M!==0?e+U%M:n;var ce=this._events;if((M>0&&this.currentFrame>C||M<0&&this.currentFrame>0,this._animationState.highLimitValue=F,this._animationState.offsetValue=y;var fe=s._interpolate(C,this._animationState);if(this.setValue(fe,a),ce.length){for(ue=0;ue0&&C>=ce[ue].frame&&ce[ue].frame>=e||M<0&&C<=ce[ue].frame&&ce[ue].frame<=e){var ve=ce[ue];ve.isDone||(ve.onlyOnce&&(ce.splice(ue,1),ue--),ve.isDone=!0,ve.action(C))}}return p||(this._stopped=!0),p},r}(),_e=f(20),be=f(57),Ce=f(44),ye=f(23),Ue=function(r){function t(e,n,i,o,a,s,d){i===void 0&&(i=null),o===void 0&&(o=null),a===void 0&&(a=null),s===void 0&&(s=null),d===void 0&&(d=null);var p=r.call(this,e,n.getScene())||this;return p.name=e,p.children=new Array,p.animations=new Array,p._index=null,p._absoluteTransform=new l.a,p._invertedAbsoluteTransform=new l.a,p._scalingDeterminant=1,p._worldTransform=new l.a,p._needToDecompose=!0,p._needToCompose=!1,p._linkedTransformNode=null,p._waitingTransformNodeId=null,p._skeleton=n,p._localMatrix=o?o.clone():l.a.Identity(),p._restPose=a||p._localMatrix.clone(),p._bindPose=p._localMatrix.clone(),p._baseMatrix=s||p._localMatrix.clone(),p._index=d,n.bones.push(p),p.setParent(i,!1),(s||o)&&p._updateDifferenceMatrix(),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"_matrix",{get:function(){return this._compose(),this._localMatrix},set:function(e){this._localMatrix.copyFrom(e),this._needToDecompose=!0},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"Bone"},t.prototype.getSkeleton=function(){return this._skeleton},t.prototype.getParent=function(){return this._parent},t.prototype.getChildren=function(){return this.children},t.prototype.getIndex=function(){return this._index===null?this.getSkeleton().bones.indexOf(this):this._index},t.prototype.setParent=function(e,n){if(n===void 0&&(n=!0),this._parent!==e){if(this._parent){var i=this._parent.children.indexOf(this);i!==-1&&this._parent.children.splice(i,1)}this._parent=e,this._parent&&this._parent.children.push(this),n&&this._updateDifferenceMatrix(),this.markAsDirty()}},t.prototype.getLocalMatrix=function(){return this._compose(),this._localMatrix},t.prototype.getBaseMatrix=function(){return this._baseMatrix},t.prototype.getRestPose=function(){return this._restPose},t.prototype.setRestPose=function(e){this._restPose.copyFrom(e)},t.prototype.getBindPose=function(){return this._bindPose},t.prototype.setBindPose=function(e){this._bindPose.copyFrom(e)},t.prototype.getWorldMatrix=function(){return this._worldTransform},t.prototype.returnToRest=function(){this._skeleton._numBonesWithLinkedTransformNode>0?this.updateMatrix(this._restPose,!1,!1):this.updateMatrix(this._restPose,!1,!0)},t.prototype.getInvertedAbsoluteTransform=function(){return this._invertedAbsoluteTransform},t.prototype.getAbsoluteTransform=function(){return this._absoluteTransform},t.prototype.linkTransformNode=function(e){this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode--,this._linkedTransformNode=e,this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode++},t.prototype.getTransformNode=function(){return this._linkedTransformNode},Object.defineProperty(t.prototype,"position",{get:function(){return this._decompose(),this._localPosition},set:function(e){this._decompose(),this._localPosition.copyFrom(e),this._markAsDirtyAndCompose()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this.getRotation()},set:function(e){this.setRotation(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationQuaternion",{get:function(){return this._decompose(),this._localRotation},set:function(e){this.setRotationQuaternion(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this.getScale()},set:function(e){this.setScale(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"animationPropertiesOverride",{get:function(){return this._skeleton.animationPropertiesOverride},enumerable:!1,configurable:!0}),t.prototype._decompose=function(){this._needToDecompose&&(this._needToDecompose=!1,this._localScaling||(this._localScaling=l.e.Zero(),this._localRotation=l.b.Zero(),this._localPosition=l.e.Zero()),this._localMatrix.decompose(this._localScaling,this._localRotation,this._localPosition))},t.prototype._compose=function(){this._needToCompose&&(this._localScaling?(this._needToCompose=!1,l.a.ComposeToRef(this._localScaling,this._localRotation,this._localPosition,this._localMatrix)):this._needToCompose=!1)},t.prototype.updateMatrix=function(e,n,i){n===void 0&&(n=!0),i===void 0&&(i=!0),this._baseMatrix.copyFrom(e),n&&this._updateDifferenceMatrix(),i?(this._needToCompose=!1,this._localMatrix.copyFrom(e),this._markAsDirtyAndDecompose()):this.markAsDirty()},t.prototype._updateDifferenceMatrix=function(e,n){if(n===void 0&&(n=!0),e||(e=this._baseMatrix),this._parent?e.multiplyToRef(this._parent._absoluteTransform,this._absoluteTransform):this._absoluteTransform.copyFrom(e),this._absoluteTransform.invertToRef(this._invertedAbsoluteTransform),n)for(var i=0;i-1&&(this._scene._activeAnimatables.splice(e,1),this._scene._activeAnimatables.push(this))}return this},r.prototype.getAnimations=function(){return this._runtimeAnimations},r.prototype.appendAnimations=function(t,e){for(var n=this,i=0;i-1){for(var i=(a=this._runtimeAnimations).length-1;i>=0;i--){var o=a[i];t&&o.animation.name!=t||e&&!e(o.target)||(o.dispose(),a.splice(i,1))}a.length==0&&(this._scene._activeAnimatables.splice(n,1),this._raiseOnAnimationEnd())}}else if((i=this._scene._activeAnimatables.indexOf(this))>-1){this._scene._activeAnimatables.splice(i,1);var a=this._runtimeAnimations;for(i=0;i0)return;this._animationTimeLast=r}this.deltaTime=this.useConstantAnimationDeltaTime?16:(r-this._animationTimeLast)*this.animationTimeScale,this._animationTimeLast=r;var t=this._activeAnimatables;if(t.length!==0){this._animationTime+=this.deltaTime;for(var e=this._animationTime,n=0;ne&&i>0&&(i*=-1),s&&this.stopAnimation(r,void 0,d),a||(a=new Ge(this,r,t,e,n,i,o,void 0,p,y));var C=!d||d(r);if(r.animations&&C&&a.appendAnimations(r,r.animations),r.getAnimatables)for(var M=r.getAnimatables(),U=0;Un&&o>0&&(o*=-1),new Ge(this,r,e,n,i,o,a,t,s,d)},_e.a.prototype.beginDirectHierarchyAnimation=function(r,t,e,n,i,o,a,s,d,p){p===void 0&&(p=!1);var y=r.getDescendants(t),C=[];C.push(this.beginDirectAnimation(r,e,n,i,o,a,s,d,p));for(var M=0,U=y;M0)i.copyFrom(n);else if(r.animations.length===1){if(l.b.SlerpToRef(n,e.currentValue,Math.min(1,r.totalWeight),i),r.totalAdditiveWeight===0)return i}else if(r.animations.length>1){var o=1,a=void 0,s=void 0;if(r.totalWeight<1){var d=1-r.totalWeight;s=[],(a=[]).push(n),s.push(d)}else{if(r.animations.length===2&&(l.b.SlerpToRef(r.animations[0].currentValue,r.animations[1].currentValue,r.animations[1].weight/r.totalWeight,t),r.totalAdditiveWeight===0))return t;a=[],s=[],o=r.totalWeight}for(var p=0;p=p&&a.frame<=y&&(n?(d=a.value.clone(),z?(s=d.getTranslation(),d.setTranslation(s.scaleInPlace(J))):ie&&i?(s=d.getTranslation(),d.setTranslation(s.multiplyInPlace(i))):d=a.value):d=a.value,se.push({frame:a.frame+e,value:d}));return this.animations[0].createRange(t,p+e,y+e),!0};var Xe=function(){function r(){}return r.prototype.getClassName=function(){return"TargetedAnimation"},r.prototype.serialize=function(){var t={};return t.animation=this.animation.serialize(),t.targetId=this.target.id,t},r}(),He=function(){function r(t,e){e===void 0&&(e=null),this.name=t,this._targetedAnimations=new Array,this._animatables=new Array,this._from=Number.MAX_VALUE,this._to=-Number.MAX_VALUE,this._speedRatio=1,this._loopAnimation=!1,this._isAdditive=!1,this.onAnimationEndObservable=new P.c,this.onAnimationLoopObservable=new P.c,this.onAnimationGroupLoopObservable=new P.c,this.onAnimationGroupEndObservable=new P.c,this.onAnimationGroupPauseObservable=new P.c,this.onAnimationGroupPlayObservable=new P.c,this._scene=e||te.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._scene.addAnimationGroup(this)}return Object.defineProperty(r.prototype,"from",{get:function(){return this._from},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"to",{get:function(){return this._to},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isStarted",{get:function(){return this._isStarted},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isPlaying",{get:function(){return this._isStarted&&!this._isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"speedRatio",{get:function(){return this._speedRatio},set:function(t){if(this._speedRatio!==t){this._speedRatio=t;for(var e=0;ei[0].frame&&(this._from=i[0].frame),this._tot){var s={frame:t,value:o.value,inTangent:o.inTangent,outTangent:o.outTangent,interpolation:o.interpolation};i.splice(0,0,s)}a.framei&&this._speedRatio>0&&(this._speedRatio=-e);return this._isStarted=!0,this._isPaused=!1,this.onAnimationGroupPlayObservable.notifyObservers(this),this},r.prototype.pause=function(){if(!this._isStarted)return this;this._isPaused=!0;for(var t=0;t-1&&this._scene.animationGroups.splice(t,1),this.onAnimationEndObservable.clear(),this.onAnimationGroupEndObservable.clear(),this.onAnimationGroupPauseObservable.clear(),this.onAnimationGroupPlayObservable.clear(),this.onAnimationLoopObservable.clear(),this.onAnimationGroupLoopObservable.clear()},r.prototype._checkAnimationGroupEnded=function(t){var e=this._animatables.indexOf(t);e>-1&&this._animatables.splice(e,1),this._animatables.length===0&&(this._isStarted=!1,this.onAnimationGroupEndObservable.notifyObservers(this))},r.prototype.clone=function(t,e){for(var n=new r(t||this.name,this._scene),i=0,o=this._targetedAnimations;i=.5?.5*(1-this.easeInCore(2*(1-t)))+.5:.5*this.easeInCore(2*t)},r.EASINGMODE_EASEIN=0,r.EASINGMODE_EASEOUT=1,r.EASINGMODE_EASEINOUT=2,r}(),it=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e=Math.max(0,Math.min(1,e)),1-Math.sqrt(1-e*e)},t}(ze),et=function(r){function t(e){e===void 0&&(e=1);var n=r.call(this)||this;return n.amplitude=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.amplitude);return Math.pow(e,3)-e*n*Math.sin(3.141592653589793*e)},t}(ze),lt=function(r){function t(e,n){e===void 0&&(e=3),n===void 0&&(n=2);var i=r.call(this)||this;return i.bounces=e,i.bounciness=n,i}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.bounces),i=this.bounciness;i<=1&&(i=1.001);var o=Math.pow(i,n),a=1-i,s=(1-o)/a+.5*o,d=e*s,p=Math.log(-d*(1-i)+1)/Math.log(i),y=Math.floor(p),C=y+1,M=(1-Math.pow(i,y))/(a*s),U=.5*(M+(1-Math.pow(i,C))/(a*s)),F=e-U,z=U-M;return-Math.pow(1/i,n-y)/(z*z)*(F-z)*(F+z)},t}(ze),ct=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e},t}(ze),mt=function(r){function t(e,n){e===void 0&&(e=3),n===void 0&&(n=3);var i=r.call(this)||this;return i.oscillations=e,i.springiness=n,i}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.oscillations),i=Math.max(0,this.springiness);return(i==0?e:(Math.exp(i*e)-1)/(Math.exp(i)-1))*Math.sin((6.283185307179586*n+1.5707963267948966)*e)},t}(ze),St=function(r){function t(e){e===void 0&&(e=2);var n=r.call(this)||this;return n.exponent=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return this.exponent<=0?e:(Math.exp(this.exponent*e)-1)/(Math.exp(this.exponent)-1)},t}(ze),wt=function(r){function t(e){e===void 0&&(e=2);var n=r.call(this)||this;return n.power=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.power);return Math.pow(e,n)},t}(ze),It=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e},t}(ze),Pt=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e*e},t}(ze),Ot=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e*e*e},t}(ze),sn=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return 1-Math.sin(1.5707963267948966*(1-e))},t}(ze),Zt=function(r){function t(e,n,i,o){e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=1),o===void 0&&(o=1);var a=r.call(this)||this;return a.x1=e,a.y1=n,a.x2=i,a.y2=o,a}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return Ze.c.Interpolate(e,this.x1,this.y1,this.x2,this.y2)},t}(ze),rn=function(){function r(t,e,n){this.frame=t,this.action=e,this.onlyOnce=n,this.isDone=!1}return r.prototype._clone=function(){return new r(this.frame,this.action,this.onlyOnce)},r}(),De=f(7),Rn=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t}(B.a),on=function(){this.rootNodes=[],this.skeletons=[],this.animationGroups=[]},On=function(r){function t(e){var n=r.call(this)||this;return n._wasAddedToScene=!1,n.scene=e,n.sounds=[],n.effectLayers=[],n.layers=[],n.lensFlareSystems=[],n.proceduralTextures=[],n.reflectionProbes=[],e.onDisposeObservable.add(function(){n._wasAddedToScene||n.dispose()}),n}return Object(c.d)(t,r),t.prototype.instantiateModelsToScene=function(e,n){var i=this;n===void 0&&(n=!1);var o={},a={},s=new on,d=[],p=[],y={doNotInstantiate:!0},C=function(M,U){if(o[M.uniqueId]=U.uniqueId,a[U.uniqueId]=U,e&&(U.name=e(M.name)),U instanceof De.a){var F=U;if(F.morphTargetManager){var z=M.morphTargetManager;F.morphTargetManager=z.clone();for(var J=0;J-1&&d.animations.splice(J,1)}},y=0,C=s.animations;y0&&(U=!0,this._soundLoaded(e));break;case"String":M.push(e);case"Array":M.length===0&&(M=e);for(var F=0;F0&&(this._htmlAudioElement.currentTime=0)):this._streamingSource.disconnect(),this.isPlaying=!1;else if(Ve.a.audioEngine.audioContext&&this._soundSource){var n=t?Ve.a.audioEngine.audioContext.currentTime+t:Ve.a.audioEngine.audioContext.currentTime;this._soundSource.stop(n),this._soundSource.onended=function(){e.isPlaying=!1},this.isPaused||(this._startOffset=0)}}},r.prototype.pause=function(){this.isPlaying&&(this.isPaused=!0,this._streaming?this._htmlAudioElement?this._htmlAudioElement.pause():this._streamingSource.disconnect():Ve.a.audioEngine.audioContext&&(this.stop(0),this._startOffset+=Ve.a.audioEngine.audioContext.currentTime-this._startTime))},r.prototype.setVolume=function(t,e){Ve.a.audioEngine.canUseWebAudio&&this._soundGain&&(e&&Ve.a.audioEngine.audioContext?(this._soundGain.gain.cancelScheduledValues(Ve.a.audioEngine.audioContext.currentTime),this._soundGain.gain.setValueAtTime(this._soundGain.gain.value,Ve.a.audioEngine.audioContext.currentTime),this._soundGain.gain.linearRampToValueAtTime(t,Ve.a.audioEngine.audioContext.currentTime+e)):this._soundGain.gain.value=t),this._volume=t},r.prototype.setPlaybackRate=function(t){this._playbackRate=t,this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate))},r.prototype.getVolume=function(){return this._volume},r.prototype.attachToMesh=function(t){var e=this;this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null),this._connectedTransformNode=t,this.spatialSound||(this.spatialSound=!0,this._createSpatialParameters(),this.isPlaying&&this.loop&&(this.stop(),this.play(0,this._offset,this._length))),this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode),this._registerFunc=function(n){return e._onRegisterAfterWorldMatrixUpdate(n)},this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc)},r.prototype.detachFromMesh=function(){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null,this._connectedTransformNode=null)},r.prototype._onRegisterAfterWorldMatrixUpdate=function(t){if(this._positionInEmitterSpace)t.worldMatrixFromCache.invertToRef(l.c.Matrix[0]),this.setPosition(l.c.Matrix[0].getTranslation());else if(t.getBoundingInfo){var e=t.getBoundingInfo();this.setPosition(e.boundingSphere.centerWorld)}else this.setPosition(t.absolutePosition);Ve.a.audioEngine.canUseWebAudio&&this._isDirectional&&this.isPlaying&&this._updateDirection()},r.prototype.clone=function(){var t=this;if(this._streaming)return null;var e=function(){t._isReadyToPlay?(i._audioBuffer=t.getAudioBuffer(),i._isReadyToPlay=!0,i.autoplay&&i.play(0,t._offset,t._length)):window.setTimeout(e,300)},n={autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,useCustomAttenuation:this.useCustomAttenuation,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel},i=new r(this.name+"_cloned",new ArrayBuffer(0),this._scene,null,n);return this.useCustomAttenuation&&i.setAttenuationFunction(this._customAttenuationFunction),i.setPosition(this._position),i.setPlaybackRate(this._playbackRate),e(),i},r.prototype.getAudioBuffer=function(){return this._audioBuffer},r.prototype.getSoundSource=function(){return this._soundSource},r.prototype.getSoundGain=function(){return this._soundGain},r.prototype.serialize=function(){var t={name:this.name,url:this.name,autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel,playbackRate:this._playbackRate,panningModel:this._panningModel,soundTrackId:this.soundTrackId,metadata:this.metadata};return this.spatialSound&&(this._connectedTransformNode&&(t.connectedMeshId=this._connectedTransformNode.id),t.position=this._position.asArray(),t.refDistance=this.refDistance,t.distanceModel=this.distanceModel,t.isDirectional=this._isDirectional,t.localDirectionToMesh=this._localDirection.asArray(),t.coneInnerAngle=this._coneInnerAngle,t.coneOuterAngle=this._coneOuterAngle,t.coneOuterGain=this._coneOuterGain),t},r.Parse=function(t,e,n,i){var o,a=t.name;o=t.url?n+t.url:n+a;var s,d={autoplay:t.autoplay,loop:t.loop,volume:t.volume,spatialSound:t.spatialSound,maxDistance:t.maxDistance,rolloffFactor:t.rolloffFactor,refDistance:t.refDistance,distanceModel:t.distanceModel,playbackRate:t.playbackRate};if(i){var p=function(){i._isReadyToPlay?(s._audioBuffer=i.getAudioBuffer(),s._isReadyToPlay=!0,s.autoplay&&s.play(0,s._offset,s._length)):window.setTimeout(p,300)};s=new r(a,new ArrayBuffer(0),e,null,d),p()}else s=new r(a,o,e,function(){e._removePendingData(s)},d),e._addPendingData(s);if(t.position){var y=l.e.FromArray(t.position);s.setPosition(y)}if(t.isDirectional&&(s.setDirectionalCone(t.coneInnerAngle||360,t.coneOuterAngle||360,t.coneOuterGain||0),t.localDirectionToMesh)){var C=l.e.FromArray(t.localDirectionToMesh);s.setLocalDirectionToMesh(C)}if(t.connectedMeshId){var M=e.getMeshByID(t.connectedMeshId);M&&s.attachToMesh(M)}return t.metadata&&(s.metadata=t.metadata),s},r._SceneComponentInitialization=function(t){throw xn.a.WarnImport("AudioSceneComponent")},r}(),Uo=function(){function r(t,e){e===void 0&&(e={}),this.id=-1,this._isInitialized=!1,this._scene=t,this.soundCollection=new Array,this._options=e,!this._options.mainTrack&&this._scene.soundTracks&&(this._scene.soundTracks.push(this),this.id=this._scene.soundTracks.length-1)}return r.prototype._initializeSoundTrackAudioGraph=function(){Ve.a.audioEngine.canUseWebAudio&&Ve.a.audioEngine.audioContext&&(this._outputAudioNode=Ve.a.audioEngine.audioContext.createGain(),this._outputAudioNode.connect(Ve.a.audioEngine.masterGain),this._options&&this._options.volume&&(this._outputAudioNode.gain.value=this._options.volume),this._isInitialized=!0)},r.prototype.dispose=function(){if(Ve.a.audioEngine&&Ve.a.audioEngine.canUseWebAudio){for(this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas();this.soundCollection.length;)this.soundCollection[0].dispose();this._outputAudioNode&&this._outputAudioNode.disconnect(),this._outputAudioNode=null}},r.prototype.addSound=function(t){this._isInitialized||this._initializeSoundTrackAudioGraph(),Ve.a.audioEngine.canUseWebAudio&&this._outputAudioNode&&t.connectToSoundTrackAudioNode(this._outputAudioNode),t.soundTrackId&&(t.soundTrackId===-1?this._scene.mainSoundTrack.removeSound(t):this._scene.soundTracks&&this._scene.soundTracks[t.soundTrackId].removeSound(t)),this.soundCollection.push(t),t.soundTrackId=this.id},r.prototype.removeSound=function(t){var e=this.soundCollection.indexOf(t);e!==-1&&this.soundCollection.splice(e,1)},r.prototype.setVolume=function(t){Ve.a.audioEngine.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.gain.value=t)},r.prototype.switchPanningModelToHRTF=function(){if(Ve.a.audioEngine.canUseWebAudio)for(var t=0;t0?e.activeCameras[0]:e.activeCamera){this._cachedCameraPosition.equals(o.globalPosition)||(this._cachedCameraPosition.copyFrom(o.globalPosition),n.audioContext.listener.setPosition(o.globalPosition.x,o.globalPosition.y,o.globalPosition.z)),o.rigCameras&&o.rigCameras.length>0&&(o=o.rigCameras[0]);var a=l.a.Invert(o.getViewMatrix()),s=l.e.TransformNormal(e.useRightHandedSystem?r._CameraDirectionRH:r._CameraDirectionLH,a);s.normalize(),isNaN(s.x)||isNaN(s.y)||isNaN(s.z)||this._cachedCameraDirection.equals(s)||(this._cachedCameraDirection.copyFrom(s),n.audioContext.listener.setOrientation(s.x,s.y,s.z,0,1,0))}else n.audioContext.listener.setPosition(0,0,0)}var d;for(d=0;d0?1/o:0,p=0;p0},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t;var n=this._attachedCamera.getScene();this._onPrePointerObservableObserver=n.onPrePointerObservable.add(function(i){i.type!==Tt.a.POINTERDOWN?i.type===Tt.a.POINTERUP&&(e._isPointerDown=!1):e._isPointerDown=!0}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){var i=be.a.Now,o=0;e._lastFrameTime!=null&&(o=i-e._lastFrameTime),e._lastFrameTime=i,e._applyUserInteraction();var a=i-e._lastInteractionTime-e._idleRotationWaitTime,s=Math.max(Math.min(a/e._idleRotationSpinupTime,1),0);e._cameraRotationSpeed=e._idleRotationSpeed*s,e._attachedCamera&&(e._attachedCamera.alpha-=e._cameraRotationSpeed*(o/1e3))})},r.prototype.detach=function(){if(this._attachedCamera){var t=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&t.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._attachedCamera=null}},r.prototype._userIsZooming=function(){return!!this._attachedCamera&&this._attachedCamera.inertialRadiusOffset!==0},r.prototype._shouldAnimationStopForInteraction=function(){if(!this._attachedCamera)return!1;var t=!1;return this._lastFrameRadius===this._attachedCamera.radius&&this._attachedCamera.inertialRadiusOffset!==0&&(t=!0),this._lastFrameRadius=this._attachedCamera.radius,this._zoomStopsAnimation?t:this._userIsZooming()},r.prototype._applyUserInteraction=function(){this._userIsMoving()&&!this._shouldAnimationStopForInteraction()&&(this._lastInteractionTime=be.a.Now)},r.prototype._userIsMoving=function(){return!!this._attachedCamera&&(this._attachedCamera.inertialAlphaOffset!==0||this._attachedCamera.inertialBetaOffset!==0||this._attachedCamera.inertialRadiusOffset!==0||this._attachedCamera.inertialPanningX!==0||this._attachedCamera.inertialPanningY!==0||this._isPointerDown)},r}(),ml=function(){function r(){this.transitionDuration=450,this.lowerRadiusTransitionRange=2,this.upperRadiusTransitionRange=-2,this._autoTransitionRange=!1,this._radiusIsAnimating=!1,this._radiusBounceTransition=null,this._animatables=new Array}return Object.defineProperty(r.prototype,"name",{get:function(){return"Bouncing"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"autoTransitionRange",{get:function(){return this._autoTransitionRange},set:function(t){var e=this;if(this._autoTransitionRange!==t){this._autoTransitionRange=t;var n=this._attachedCamera;n&&(t?this._onMeshTargetChangedObserver=n.onMeshTargetChangedObservable.add(function(i){if(i){i.computeWorldMatrix(!0);var o=i.getBoundingInfo().diagonalLength;e.lowerRadiusTransitionRange=.05*o,e.upperRadiusTransitionRange=.05*o}}):this._onMeshTargetChangedObserver&&n.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver))}},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t,this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){e._attachedCamera&&(e._isRadiusAtLimit(e._attachedCamera.lowerRadiusLimit)&&e._applyBoundRadiusAnimation(e.lowerRadiusTransitionRange),e._isRadiusAtLimit(e._attachedCamera.upperRadiusLimit)&&e._applyBoundRadiusAnimation(e.upperRadiusTransitionRange))})},r.prototype.detach=function(){this._attachedCamera&&(this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null)},r.prototype._isRadiusAtLimit=function(t){return!!this._attachedCamera&&this._attachedCamera.radius===t&&!this._radiusIsAnimating},r.prototype._applyBoundRadiusAnimation=function(t){var e=this;if(this._attachedCamera){this._radiusBounceTransition||(r.EasingFunction.setEasingMode(r.EasingMode),this._radiusBounceTransition=k.CreateAnimation("radius",k.ANIMATIONTYPE_FLOAT,60,r.EasingFunction)),this._cachedWheelPrecision=this._attachedCamera.wheelPrecision,this._attachedCamera.wheelPrecision=1/0,this._attachedCamera.inertialRadiusOffset=0,this.stopAllAnimations(),this._radiusIsAnimating=!0;var n=k.TransitionTo("radius",this._attachedCamera.radius+t,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusBounceTransition,this.transitionDuration,function(){return e._clearAnimationLocks()});n&&this._animatables.push(n)}},r.prototype._clearAnimationLocks=function(){this._radiusIsAnimating=!1,this._attachedCamera&&(this._attachedCamera.wheelPrecision=this._cachedWheelPrecision)},r.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0].onAnimationEnd=null,this._animatables[0].stop(),this._animatables.shift()},r.EasingFunction=new et(.3),r.EasingMode=ze.EASINGMODE_EASEOUT,r}(),gl=function(){function r(){this._mode=r.FitFrustumSidesMode,this._radiusScale=1,this._positionScale=.5,this._defaultElevation=.3,this._elevationReturnTime=1500,this._elevationReturnWaitTime=1e3,this._zoomStopsAnimation=!1,this._framingTime=1500,this.autoCorrectCameraLimitsAndSensibility=!0,this._isPointerDown=!1,this._lastInteractionTime=-1/0,this._animatables=new Array,this._betaIsAnimating=!1}return Object.defineProperty(r.prototype,"name",{get:function(){return"Framing"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mode",{get:function(){return this._mode},set:function(t){this._mode=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"radiusScale",{get:function(){return this._radiusScale},set:function(t){this._radiusScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"positionScale",{get:function(){return this._positionScale},set:function(t){this._positionScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"defaultElevation",{get:function(){return this._defaultElevation},set:function(t){this._defaultElevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elevationReturnTime",{get:function(){return this._elevationReturnTime},set:function(t){this._elevationReturnTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elevationReturnWaitTime",{get:function(){return this._elevationReturnWaitTime},set:function(t){this._elevationReturnWaitTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"zoomStopsAnimation",{get:function(){return this._zoomStopsAnimation},set:function(t){this._zoomStopsAnimation=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"framingTime",{get:function(){return this._framingTime},set:function(t){this._framingTime=t},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t;var n=this._attachedCamera.getScene();r.EasingFunction.setEasingMode(r.EasingMode),this._onPrePointerObservableObserver=n.onPrePointerObservable.add(function(i){i.type!==Tt.a.POINTERDOWN?i.type===Tt.a.POINTERUP&&(e._isPointerDown=!1):e._isPointerDown=!0}),this._onMeshTargetChangedObserver=t.onMeshTargetChangedObservable.add(function(i){i&&e.zoomOnMesh(i)}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){e._applyUserInteraction(),e._maintainCameraAboveGround()})},r.prototype.detach=function(){if(this._attachedCamera){var t=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&t.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null}},r.prototype.zoomOnMesh=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null),t.computeWorldMatrix(!0);var i=t.getBoundingInfo().boundingBox;this.zoomOnBoundingInfo(i.minimumWorld,i.maximumWorld,e,n)},r.prototype.zoomOnMeshHierarchy=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null),t.computeWorldMatrix(!0);var i=t.getHierarchyBoundingVectors(!0);this.zoomOnBoundingInfo(i.min,i.max,e,n)},r.prototype.zoomOnMeshesHierarchy=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null);for(var i=new l.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),o=new l.e(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),a=0;ap.upperRadiusLimit?p.upperRadiusLimit:d),d):0},r.prototype._maintainCameraAboveGround=function(){var t=this;if(!(this._elevationReturnTime<0)){var e=be.a.Now-this._lastInteractionTime,n=.5*Math.PI-this._defaultElevation,i=.5*Math.PI;if(this._attachedCamera&&!this._betaIsAnimating&&this._attachedCamera.beta>i&&e>=this._elevationReturnWaitTime){this._betaIsAnimating=!0,this.stopAllAnimations(),this._betaTransition||(this._betaTransition=k.CreateAnimation("beta",k.ANIMATIONTYPE_FLOAT,60,r.EasingFunction));var o=k.TransitionTo("beta",n,this._attachedCamera,this._attachedCamera.getScene(),60,this._betaTransition,this._elevationReturnTime,function(){t._clearAnimationLocks(),t.stopAllAnimations()});o&&this._animatables.push(o)}}},r.prototype._getFrustumSlope=function(){var t=this._attachedCamera;if(!t)return l.d.Zero();var e=t.getScene().getEngine().getAspectRatio(t),n=Math.tan(t.fov/2),i=n*e;return new l.d(i,n)},r.prototype._clearAnimationLocks=function(){this._betaIsAnimating=!1},r.prototype._applyUserInteraction=function(){this.isUserIsMoving&&(this._lastInteractionTime=be.a.Now,this.stopAllAnimations(),this._clearAnimationLocks())},r.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0]&&(this._animatables[0].onAnimationEnd=null,this._animatables[0].stop()),this._animatables.shift()},Object.defineProperty(r.prototype,"isUserIsMoving",{get:function(){return!!this._attachedCamera&&(this._attachedCamera.inertialAlphaOffset!==0||this._attachedCamera.inertialBetaOffset!==0||this._attachedCamera.inertialRadiusOffset!==0||this._attachedCamera.inertialPanningX!==0||this._attachedCamera.inertialPanningY!==0||this._isPointerDown)},enumerable:!1,configurable:!0}),r.EasingFunction=new St,r.EasingMode=ze.EASINGMODE_EASEINOUT,r.IgnoreBoundsSizeMode=0,r.FitFrustumSidesMode=1,r}(),pr=function(r,t,e,n){t===void 0&&(t=new l.e),e===void 0&&(e=0),n===void 0&&(n=!1),this.direction=r,this.rotatedDirection=t,this.diff=e,this.ignore=n},kf=function(){function r(t){this.ui=t,this.name="AttachToBoxBehavior",this.distanceAwayFromFace=.15,this.distanceAwayFromBottomOfFace=.15,this._faceVectors=[new pr(l.e.Up()),new pr(l.e.Down()),new pr(l.e.Left()),new pr(l.e.Right()),new pr(l.e.Forward()),new pr(l.e.Forward().scaleInPlace(-1))],this._tmpMatrix=new l.a,this._tmpVector=new l.e,this._zeroVector=l.e.Zero(),this._lookAtTmpMatrix=new l.a}return r.prototype.init=function(){},r.prototype._closestFace=function(t){var e=this;return this._faceVectors.forEach(function(n){e._target.rotationQuaternion||(e._target.rotationQuaternion=l.b.RotationYawPitchRoll(e._target.rotation.y,e._target.rotation.x,e._target.rotation.z)),e._target.rotationQuaternion.toRotationMatrix(e._tmpMatrix),l.e.TransformCoordinatesToRef(n.direction,e._tmpMatrix,n.rotatedDirection),n.diff=l.e.GetAngleBetweenVectors(n.rotatedDirection,t,l.e.Cross(n.rotatedDirection,t))}),this._faceVectors.reduce(function(n,i){return n.ignore?i:i.ignore||n.diff1)return t._setAllVisibility(t._ownerNode,1),void(t._hoverValue=t.fadeInTime+t.delay);if(t._ownerNode.visibility<0&&(t._setAllVisibility(t._ownerNode,0),t._hoverValue<0))return void(t._hoverValue=0);setTimeout(t._update,t._millisecondsPerFrame)}}}return Object.defineProperty(r.prototype,"name",{get:function(){return"FadeInOut"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){this._ownerNode=t,this._setAllVisibility(this._ownerNode,0)},r.prototype.detach=function(){this._ownerNode=null},r.prototype.fadeIn=function(t){this._hovered=t,this._update()},r.prototype._setAllVisibility=function(t,e){var n=this;t.visibility=e,t.getChildMeshes().forEach(function(i){n._setAllVisibility(i,e)})},r}(),Ei=f(65),zf=function(){function r(){this._startDistance=0,this._initialScale=new l.e(0,0,0),this._targetScale=new l.e(0,0,0),this._sceneRenderObserver=null,this._dragBehaviorA=new Ei.a({}),this._dragBehaviorA.moveAttached=!1,this._dragBehaviorB=new Ei.a({}),this._dragBehaviorB.moveAttached=!1}return Object.defineProperty(r.prototype,"name",{get:function(){return"MultiPointerScale"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype._getCurrentDistance=function(){return this._dragBehaviorA.lastDragPosition.subtract(this._dragBehaviorB.lastDragPosition).length()},r.prototype.attach=function(t){var e=this;this._ownerNode=t,this._dragBehaviorA.onDragStartObservable.add(function(n){e._dragBehaviorA.dragging&&e._dragBehaviorB.dragging&&(e._dragBehaviorA.currentDraggingPointerID==e._dragBehaviorB.currentDraggingPointerID?e._dragBehaviorA.releaseDrag():(e._initialScale.copyFrom(t.scaling),e._startDistance=e._getCurrentDistance()))}),this._dragBehaviorB.onDragStartObservable.add(function(n){e._dragBehaviorA.dragging&&e._dragBehaviorB.dragging&&(e._dragBehaviorA.currentDraggingPointerID==e._dragBehaviorB.currentDraggingPointerID?e._dragBehaviorB.releaseDrag():(e._initialScale.copyFrom(t.scaling),e._startDistance=e._getCurrentDistance()))}),[this._dragBehaviorA,this._dragBehaviorB].forEach(function(n){n.onDragObservable.add(function(){if(e._dragBehaviorA.dragging&&e._dragBehaviorB.dragging){var i=e._getCurrentDistance()/e._startDistance;e._initialScale.scaleToRef(i,e._targetScale)}})}),t.addBehavior(this._dragBehaviorA),t.addBehavior(this._dragBehaviorB),this._sceneRenderObserver=t.getScene().onBeforeRenderObservable.add(function(){if(e._dragBehaviorA.dragging&&e._dragBehaviorB.dragging){var n=e._targetScale.subtract(t.scaling).scaleInPlace(.1);n.length()>.01&&t.scaling.addInPlace(n)}})},r.prototype.detach=function(){var t=this;this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),[this._dragBehaviorA,this._dragBehaviorB].forEach(function(e){e.onDragStartObservable.clear(),e.onDragObservable.clear(),t._ownerNode.removeBehavior(e)})},r}(),Dt=f(31),gt=f(24),jn=f(60),vl=function(){function r(){this._sceneRenderObserver=null,this._targetPosition=new l.e(0,0,0),this._moving=!1,this._startingOrientation=new l.b,this._attachedToElement=!1,this.zDragFactor=3,this.rotateDraggedObject=!0,this.dragging=!1,this.dragDeltaRatio=.2,this.currentDraggingPointerID=-1,this.detachCameraControls=!0,this.onDragStartObservable=new P.c,this.onDragObservable=new P.c,this.onDragEndObservable=new P.c}return Object.defineProperty(r.prototype,"name",{get:function(){return"SixDofDrag"},enumerable:!1,configurable:!0}),r.prototype.init=function(){},Object.defineProperty(r.prototype,"_pointerCamera",{get:function(){return this._scene.cameraToUseForPointers?this._scene.cameraToUseForPointers:this._scene.activeCamera},enumerable:!1,configurable:!0}),r.prototype.attach=function(t){var e=this;this._ownerNode=t,this._scene=this._ownerNode.getScene(),r._virtualScene||(r._virtualScene=new _e.a(this._scene.getEngine(),{virtual:!0}),r._virtualScene.detachControl(),this._scene.getEngine().scenes.pop());var n=null,i=new l.e(0,0,0);this._virtualOriginMesh=new Dt.a("",r._virtualScene),this._virtualOriginMesh.rotationQuaternion=new l.b,this._virtualDragMesh=new Dt.a("",r._virtualScene),this._virtualDragMesh.rotationQuaternion=new l.b,this._pointerObserver=this._scene.onPointerObservable.add(function(a,s){if(a.type==Tt.a.POINTERDOWN){if(!e.dragging&&a.pickInfo&&a.pickInfo.hit&&a.pickInfo.pickedMesh&&a.pickInfo.ray&&(M=a.pickInfo.pickedMesh,e._ownerNode==M||M.isDescendantOf(e._ownerNode))){e._pointerCamera&&e._pointerCamera.cameraRigMode==gt.a.RIG_MODE_NONE&&a.pickInfo.ray.origin.copyFrom(e._pointerCamera.globalPosition),n=e._ownerNode,jn.a._RemoveAndStorePivotPoint(n),i.copyFrom(a.pickInfo.ray.origin),e._virtualOriginMesh.position.copyFrom(a.pickInfo.ray.origin),e._virtualOriginMesh.lookAt(a.pickInfo.ray.origin.add(a.pickInfo.ray.direction)),e._virtualOriginMesh.removeChild(e._virtualDragMesh),n.computeWorldMatrix(),e._virtualDragMesh.position.copyFrom(n.absolutePosition),n.rotationQuaternion||(n.rotationQuaternion=l.b.RotationYawPitchRoll(n.rotation.y,n.rotation.x,n.rotation.z));var d=n.parent;n.setParent(null),e._virtualDragMesh.rotationQuaternion.copyFrom(n.rotationQuaternion),n.setParent(d),e._virtualOriginMesh.addChild(e._virtualDragMesh),e._targetPosition.copyFrom(e._virtualDragMesh.absolutePosition),e.dragging=!0,e.currentDraggingPointerID=a.event.pointerId,e.detachCameraControls&&e._pointerCamera&&!e._pointerCamera.leftCamera&&(e._pointerCamera.inputs.attachedToElement?(e._pointerCamera.detachControl(),e._attachedToElement=!0):e._attachedToElement=!1),jn.a._RestorePivotPoint(n),e.onDragStartObservable.notifyObservers({})}}else if(a.type==Tt.a.POINTERUP||a.type==Tt.a.POINTERDOUBLETAP)e.currentDraggingPointerID==a.event.pointerId&&(e.dragging=!1,e._moving=!1,e.currentDraggingPointerID=-1,n=null,e._virtualOriginMesh.removeChild(e._virtualDragMesh),e.detachCameraControls&&e._attachedToElement&&e._pointerCamera&&!e._pointerCamera.leftCamera&&(e._pointerCamera.attachControl(!0),e._attachedToElement=!1),e.onDragEndObservable.notifyObservers({}));else if(a.type==Tt.a.POINTERMOVE&&e.currentDraggingPointerID==a.event.pointerId&&e.dragging&&a.pickInfo&&a.pickInfo.ray&&n){var p=e.zDragFactor;e._pointerCamera&&e._pointerCamera.cameraRigMode==gt.a.RIG_MODE_NONE&&(a.pickInfo.ray.origin.copyFrom(e._pointerCamera.globalPosition),p=0);var y=a.pickInfo.ray.origin.subtract(i);i.copyFrom(a.pickInfo.ray.origin);var C=-l.e.Dot(y,a.pickInfo.ray.direction);e._virtualOriginMesh.addChild(e._virtualDragMesh),e._virtualDragMesh.position.z-=e._virtualDragMesh.position.z<1?C*e.zDragFactor:C*p*e._virtualDragMesh.position.z,e._virtualDragMesh.position.z<0&&(e._virtualDragMesh.position.z=0),e._virtualOriginMesh.position.copyFrom(a.pickInfo.ray.origin),e._virtualOriginMesh.lookAt(a.pickInfo.ray.origin.add(a.pickInfo.ray.direction)),e._virtualOriginMesh.removeChild(e._virtualDragMesh),e._targetPosition.copyFrom(e._virtualDragMesh.absolutePosition),n.parent&&l.e.TransformCoordinatesToRef(e._targetPosition,l.a.Invert(n.parent.getWorldMatrix()),e._targetPosition),e._moving||e._startingOrientation.copyFrom(e._virtualDragMesh.rotationQuaternion),e._moving=!0}var M});var o=new l.b;this._sceneRenderObserver=t.getScene().onBeforeRenderObservable.add(function(){if(e.dragging&&e._moving&&n){if(jn.a._RemoveAndStorePivotPoint(n),n.position.addInPlace(e._targetPosition.subtract(n.position).scale(e.dragDeltaRatio)),e.rotateDraggedObject){o.copyFrom(e._startingOrientation),o.x=-o.x,o.y=-o.y,o.z=-o.z,e._virtualDragMesh.rotationQuaternion.multiplyToRef(o,o),l.b.RotationYawPitchRollToRef(o.toEulerAngles("xyz").y,0,0,o),o.multiplyToRef(e._startingOrientation,o);var a=n.parent;(!a||a.scaling&&!a.scaling.isNonUniformWithinEpsilon(.001))&&(n.setParent(null),l.b.SlerpToRef(n.rotationQuaternion,o,e.dragDeltaRatio,n.rotationQuaternion),n.setParent(a))}jn.a._RestorePivotPoint(n),e.onDragObservable.notifyObservers()}})},r.prototype.detach=function(){this._scene&&(this.detachCameraControls&&this._attachedToElement&&this._pointerCamera&&!this._pointerCamera.leftCamera&&(this._pointerCamera.attachControl(!0),this._attachedToElement=!1),this._scene.onPointerObservable.remove(this._pointerObserver)),this._ownerNode&&this._ownerNode.getScene().onBeforeRenderObservable.remove(this._sceneRenderObserver),this._virtualOriginMesh&&this._virtualOriginMesh.dispose(),this._virtualDragMesh&&this._virtualDragMesh.dispose(),this.onDragEndObservable.clear(),this.onDragObservable.clear(),this.onDragStartObservable.clear()},r}(),jf=function(){function r(t,e,n){if(this.targetPosition=l.e.Zero(),this.poleTargetPosition=l.e.Zero(),this.poleTargetLocalOffset=l.e.Zero(),this.poleAngle=0,this.slerpAmount=1,this._bone1Quat=l.b.Identity(),this._bone1Mat=l.a.Identity(),this._bone2Ang=Math.PI,this._maxAngle=Math.PI,this._rightHandedSystem=!1,this._bendAxis=l.e.Right(),this._slerping=!1,this._adjustRoll=0,this._bone2=e,this._bone1=e.getParent(),this._bone1){this.mesh=t;var i=e.getPosition();if(e.getAbsoluteTransform().determinant()>0&&(this._rightHandedSystem=!0,this._bendAxis.x=0,this._bendAxis.y=0,this._bendAxis.z=-1,i.x>i.y&&i.x>i.z&&(this._adjustRoll=.5*Math.PI,this._bendAxis.z=1)),this._bone1.length){var o=this._bone1.getScale(),a=this._bone2.getScale();this._bone1Length=this._bone1.length*o.y*this.mesh.scaling.y,this._bone2Length=this._bone2.length*a.y*this.mesh.scaling.y}else if(this._bone1.children[0]){t.computeWorldMatrix(!0);var s=this._bone2.children[0].getAbsolutePosition(t),d=this._bone2.getAbsolutePosition(t),p=this._bone1.getAbsolutePosition(t);this._bone1Length=l.e.Distance(s,d),this._bone2Length=l.e.Distance(d,p)}this._bone1.getRotationMatrixToRef(ye.c.WORLD,t,this._bone1Mat),this.maxAngle=Math.PI,n&&(n.targetMesh&&(this.targetMesh=n.targetMesh,this.targetMesh.computeWorldMatrix(!0)),n.poleTargetMesh?(this.poleTargetMesh=n.poleTargetMesh,this.poleTargetMesh.computeWorldMatrix(!0)):n.poleTargetBone?this.poleTargetBone=n.poleTargetBone:this._bone1.getParent()&&(this.poleTargetBone=this._bone1.getParent()),n.poleTargetLocalOffset&&this.poleTargetLocalOffset.copyFrom(n.poleTargetLocalOffset),n.poleAngle&&(this.poleAngle=n.poleAngle),n.bendAxis&&this._bendAxis.copyFrom(n.bendAxis),n.maxAngle&&(this.maxAngle=n.maxAngle),n.slerpAmount&&(this.slerpAmount=n.slerpAmount))}}return Object.defineProperty(r.prototype,"maxAngle",{get:function(){return this._maxAngle},set:function(t){this._setMaxAngle(t)},enumerable:!1,configurable:!0}),r.prototype._setMaxAngle=function(t){t<0&&(t=0),(t>Math.PI||t==null)&&(t=Math.PI),this._maxAngle=t;var e=this._bone1Length,n=this._bone2Length;this._maxReach=Math.sqrt(e*e+n*n-2*e*n*Math.cos(t))},r.prototype.update=function(){var t=this._bone1;if(t){var e=this.targetPosition,n=this.poleTargetPosition,i=r._tmpMats[0],o=r._tmpMats[1];this.targetMesh&&e.copyFrom(this.targetMesh.getAbsolutePosition()),this.poleTargetBone?this.poleTargetBone.getAbsolutePositionFromLocalToRef(this.poleTargetLocalOffset,this.mesh,n):this.poleTargetMesh&&l.e.TransformCoordinatesToRef(this.poleTargetLocalOffset,this.poleTargetMesh.getWorldMatrix(),n);var a=r._tmpVecs[0],s=r._tmpVecs[1],d=r._tmpVecs[2],p=r._tmpVecs[3],y=r._tmpVecs[4],C=r._tmpQuat;t.getAbsolutePositionToRef(this.mesh,a),n.subtractToRef(a,y),y.x==0&&y.y==0&&y.z==0?y.y=1:y.normalize(),e.subtractToRef(a,p),p.normalize(),l.e.CrossToRef(p,y,s),s.normalize(),l.e.CrossToRef(p,s,d),d.normalize(),l.a.FromXYZAxesToRef(d,p,s,i);var M=this._bone1Length,U=this._bone2Length,F=l.e.Distance(a,e);this._maxReach>0&&(F=Math.min(this._maxReach,F));var z=(U*U+F*F-M*M)/(2*U*F),J=(F*F+M*M-U*U)/(2*F*M);z>1&&(z=1),J>1&&(J=1),z<-1&&(z=-1),J<-1&&(J=-1);var ie=Math.acos(z),se=Math.acos(J),ce=-ie-se;if(this._rightHandedSystem)l.a.RotationYawPitchRollToRef(0,0,this._adjustRoll,o),o.multiplyToRef(i,i),l.a.RotationAxisToRef(this._bendAxis,se,o),o.multiplyToRef(i,i);else{var ue=r._tmpVecs[5];ue.copyFrom(this._bendAxis),ue.x*=-1,l.a.RotationAxisToRef(ue,-se,o),o.multiplyToRef(i,i)}this.poleAngle&&(l.a.RotationAxisToRef(p,this.poleAngle,o),i.multiplyToRef(o,i)),this._bone1&&(this.slerpAmount<1?(this._slerping||l.b.FromRotationMatrixToRef(this._bone1Mat,this._bone1Quat),l.b.FromRotationMatrixToRef(i,C),l.b.SlerpToRef(this._bone1Quat,C,this.slerpAmount,this._bone1Quat),ce=this._bone2Ang*(1-this.slerpAmount)+ce*this.slerpAmount,this._bone1.setRotationQuaternion(this._bone1Quat,ye.c.WORLD,this.mesh),this._slerping=!0):(this._bone1.setRotationMatrix(i,ye.c.WORLD,this.mesh),this._bone1Mat.copyFrom(i),this._slerping=!1)),this._bone2.setAxisAngle(this._bendAxis,ce,ye.c.LOCAL),this._bone2Ang=ce}},r._tmpVecs=[l.e.Zero(),l.e.Zero(),l.e.Zero(),l.e.Zero(),l.e.Zero(),l.e.Zero()],r._tmpQuat=l.b.Identity(),r._tmpMats=[l.a.Identity(),l.a.Identity()],r}(),Hf=function(){function r(t,e,n,i){if(this.upAxis=l.e.Up(),this.upAxisSpace=ye.c.LOCAL,this.adjustYaw=0,this.adjustPitch=0,this.adjustRoll=0,this.slerpAmount=1,this._boneQuat=l.b.Identity(),this._slerping=!1,this._firstFrameSkipped=!1,this._fowardAxis=l.e.Forward(),this.mesh=t,this.bone=e,this.target=n,i&&(i.adjustYaw&&(this.adjustYaw=i.adjustYaw),i.adjustPitch&&(this.adjustPitch=i.adjustPitch),i.adjustRoll&&(this.adjustRoll=i.adjustRoll),i.maxYaw!=null?this.maxYaw=i.maxYaw:this.maxYaw=Math.PI,i.minYaw!=null?this.minYaw=i.minYaw:this.minYaw=-Math.PI,i.maxPitch!=null?this.maxPitch=i.maxPitch:this.maxPitch=Math.PI,i.minPitch!=null?this.minPitch=i.minPitch:this.minPitch=-Math.PI,i.slerpAmount!=null&&(this.slerpAmount=i.slerpAmount),i.upAxis!=null&&(this.upAxis=i.upAxis),i.upAxisSpace!=null&&(this.upAxisSpace=i.upAxisSpace),i.yawAxis!=null||i.pitchAxis!=null)){var o=ye.a.Y,a=ye.a.X;i.yawAxis!=null&&(o=i.yawAxis.clone()).normalize(),i.pitchAxis!=null&&(a=i.pitchAxis.clone()).normalize();var s=l.e.Cross(a,o);this._transformYawPitch=l.a.Identity(),l.a.FromXYZAxesToRef(a,o,s,this._transformYawPitch),this._transformYawPitchInv=this._transformYawPitch.clone(),this._transformYawPitch.invert()}e.getParent()||this.upAxisSpace!=ye.c.BONE||(this.upAxisSpace=ye.c.LOCAL)}return Object.defineProperty(r.prototype,"minYaw",{get:function(){return this._minYaw},set:function(t){this._minYaw=t,this._minYawSin=Math.sin(t),this._minYawCos=Math.cos(t),this._maxYaw!=null&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxYaw",{get:function(){return this._maxYaw},set:function(t){this._maxYaw=t,this._maxYawSin=Math.sin(t),this._maxYawCos=Math.cos(t),this._minYaw!=null&&(this._midYawConstraint=.5*this._getAngleDiff(this._minYaw,this._maxYaw)+this._minYaw,this._yawRange=this._maxYaw-this._minYaw)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"minPitch",{get:function(){return this._minPitch},set:function(t){this._minPitch=t,this._minPitchTan=Math.tan(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxPitch",{get:function(){return this._maxPitch},set:function(t){this._maxPitch=t,this._maxPitchTan=Math.tan(t)},enumerable:!1,configurable:!0}),r.prototype.update=function(){if(this.slerpAmount<1&&!this._firstFrameSkipped)this._firstFrameSkipped=!0;else{var t=this.bone,e=r._tmpVecs[0];t.getAbsolutePositionToRef(this.mesh,e);var n=this.target,i=r._tmpMats[0],o=r._tmpMats[1],a=this.mesh,s=t.getParent(),d=r._tmpVecs[1];d.copyFrom(this.upAxis),this.upAxisSpace==ye.c.BONE&&s?(this._transformYawPitch&&l.e.TransformCoordinatesToRef(d,this._transformYawPitchInv,d),s.getDirectionToRef(d,this.mesh,d)):this.upAxisSpace==ye.c.LOCAL&&(a.getDirectionToRef(d,d),a.scaling.x==1&&a.scaling.y==1&&a.scaling.z==1||d.normalize());var p=!1,y=!1;if(this._maxYaw==Math.PI&&this._minYaw==-Math.PI||(p=!0),this._maxPitch==Math.PI&&this._minPitch==-Math.PI||(y=!0),p||y){var C=r._tmpMats[2],M=r._tmpMats[3];if(this.upAxisSpace==ye.c.BONE&&d.y==1&&s)s.getRotationMatrixToRef(ye.c.WORLD,this.mesh,C);else if(this.upAxisSpace!=ye.c.LOCAL||d.y!=1||s){(F=r._tmpVecs[2]).copyFrom(this._fowardAxis),this._transformYawPitch&&l.e.TransformCoordinatesToRef(F,this._transformYawPitchInv,F),s?s.getDirectionToRef(F,this.mesh,F):a.getDirectionToRef(F,F);var U=l.e.Cross(d,F);U.normalize();var F=l.e.Cross(U,d);l.a.FromXYZAxesToRef(U,d,F,C)}else C.copyFrom(a.getWorldMatrix());C.invertToRef(M);var z=null;if(y){var J=r._tmpVecs[3];n.subtractToRef(e,J),l.e.TransformCoordinatesToRef(J,M,J),z=Math.sqrt(J.x*J.x+J.z*J.z);var ie=Math.atan2(J.y,z),se=ie;ie>this._maxPitch?(J.y=this._maxPitchTan*z,se=this._maxPitch):iethis._maxYaw||ceMath.PI?this._isAngleBetween(ce,this._maxYaw,this._midYawConstraint)?(J.z=this._maxYawCos*z,J.x=this._maxYawSin*z,ue=this._maxYaw):this._isAngleBetween(ce,this._midYawConstraint,this._minYaw)&&(J.z=this._minYawCos*z,J.x=this._minYawSin*z,ue=this._minYaw):ce>this._maxYaw?(J.z=this._maxYawCos*z,J.x=this._maxYawSin*z,ue=this._maxYaw):ceMath.PI){var fe=r._tmpVecs[8];fe.copyFrom(ye.a.Z),this._transformYawPitch&&l.e.TransformCoordinatesToRef(fe,this._transformYawPitchInv,fe);var ve=r._tmpMats[4];this._boneQuat.toRotationMatrix(ve),this.mesh.getWorldMatrix().multiplyToRef(ve,ve),l.e.TransformCoordinatesToRef(fe,ve,fe),l.e.TransformCoordinatesToRef(fe,M,fe);var Te=Math.atan2(fe.x,fe.z);if(this._getAngleBetween(Te,ce)>this._getAngleBetween(Te,this._midYawConstraint)){z==null&&(z=Math.sqrt(J.x*J.x+J.z*J.z));var Oe=this._getAngleBetween(Te,this._maxYaw);this._getAngleBetween(Te,this._minYaw)Math.PI?n-=2*Math.PI:n<-Math.PI&&(n+=2*Math.PI),n},r.prototype._getAngleBetween=function(t,e){var n=0;return(n=(t=(t%=2*Math.PI)<0?t+2*Math.PI:t)<(e=(e%=2*Math.PI)<0?e+2*Math.PI:e)?e-t:t-e)>Math.PI&&(n=2*Math.PI-n),n},r.prototype._isAngleBetween=function(t,e,n){if(t=(t%=2*Math.PI)<0?t+2*Math.PI:t,(e=(e%=2*Math.PI)<0?e+2*Math.PI:e)<(n=(n%=2*Math.PI)<0?n+2*Math.PI:n)){if(t>e&&tn&&t>Oe,Ee=0;Ee<6;Ee++){var Se=Te[Oe][Ee];ve&&(Se=bl(Se,Pe,Pe,i)),U.texImage2D(Ee,Oe,fe,Pe,Pe,0,ue,ce,Se)}M._bindTextureDirectly(U.TEXTURE_CUBE_MAP,null)}else M.updateRawCubeTexture(F,se,n,i,C);F.isReady=!0,t?._removePendingData(F),d&&d()}})(z)},void 0,t?.offlineProvider,!0,function(z,J){t?._removePendingData(F),p&&z&&p(z.status+" "+z.statusText,J)}),F},Bt.a.prototype.createRawTexture2DArray=yl(!1),Bt.a.prototype.createRawTexture3D=yl(!0),Bt.a.prototype.updateRawTexture2DArray=Tl(!1),Bt.a.prototype.updateRawTexture3D=Tl(!0);var ii=function(r){function t(e,n,i,o,a,s,d,p,y){s===void 0&&(s=!0),d===void 0&&(d=!1),p===void 0&&(p=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),y===void 0&&(y=h.a.TEXTURETYPE_UNSIGNED_INT);var C=r.call(this,null,a,!s,d)||this;return C.format=o,C._engine&&(C._texture=C._engine.createRawTexture(e,n,i,o,s,d,p,null,y),C.wrapU=we.a.CLAMP_ADDRESSMODE,C.wrapV=we.a.CLAMP_ADDRESSMODE),C}return Object(c.d)(t,r),t.prototype.update=function(e){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type)},t.CreateLuminanceTexture=function(e,n,i,o,a,s,d){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,h.a.TEXTUREFORMAT_LUMINANCE,o,a,s,d)},t.CreateLuminanceAlphaTexture=function(e,n,i,o,a,s,d){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,h.a.TEXTUREFORMAT_LUMINANCE_ALPHA,o,a,s,d)},t.CreateAlphaTexture=function(e,n,i,o,a,s,d){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),new t(e,n,i,h.a.TEXTUREFORMAT_ALPHA,o,a,s,d)},t.CreateRGBTexture=function(e,n,i,o,a,s,d,p){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),p===void 0&&(p=h.a.TEXTURETYPE_UNSIGNED_INT),new t(e,n,i,h.a.TEXTUREFORMAT_RGB,o,a,s,d,p)},t.CreateRGBATexture=function(e,n,i,o,a,s,d,p){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE),p===void 0&&(p=h.a.TEXTURETYPE_UNSIGNED_INT),new t(e,n,i,h.a.TEXTUREFORMAT_RGBA,o,a,s,d,p)},t.CreateRTexture=function(e,n,i,o,a,s,d,p){return a===void 0&&(a=!0),s===void 0&&(s=!1),d===void 0&&(d=we.a.TRILINEAR_SAMPLINGMODE),p===void 0&&(p=h.a.TEXTURETYPE_FLOAT),new t(e,n,i,h.a.TEXTUREFORMAT_R,o,a,s,d,p)},t}(we.a),Vo=function(){function r(t,e,n){this.name=t,this.id=e,this.bones=new Array,this.needInitialSkinMatrix=!1,this.overrideMesh=null,this._isDirty=!0,this._meshesWithPoseMatrix=new Array,this._identity=l.a.Identity(),this._ranges={},this._lastAbsoluteTransformsUpdateId=-1,this._canUseTextureForBones=!1,this._uniqueId=0,this._numBonesWithLinkedTransformNode=0,this._hasWaitingData=null,this._waitingOverrideMeshId=null,this.doNotSerialize=!1,this._useTextureToStoreBoneMatrices=!0,this._animationPropertiesOverride=null,this.onBeforeComputeObservable=new P.c,this.bones=[],this._scene=n||te.a.LastCreatedScene,this._uniqueId=this._scene.getUniqueId(),this._scene.addSkeleton(this),this._isDirty=!0;var i=this._scene.getEngine().getCaps();this._canUseTextureForBones=i.textureFloat&&i.maxVertexTextureImageUnits>0}return Object.defineProperty(r.prototype,"useTextureToStoreBoneMatrices",{get:function(){return this._useTextureToStoreBoneMatrices},set:function(t){this._useTextureToStoreBoneMatrices=t,this._markAsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(t){this._animationPropertiesOverride=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isUsingTextureForMatrices",{get:function(){return this.useTextureToStoreBoneMatrices&&this._canUseTextureForBones},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),r.prototype.getClassName=function(){return"Skeleton"},r.prototype.getChildren=function(){return this.bones.filter(function(t){return!t.getParent()})},r.prototype.getTransformMatrices=function(t){return this.needInitialSkinMatrix&&t._bonesTransformMatrices?t._bonesTransformMatrices:(this._transformMatrices||this.prepare(),this._transformMatrices)},r.prototype.getTransformMatrixTexture=function(t){return this.needInitialSkinMatrix&&t._transformMatrixTexture?t._transformMatrixTexture:this._transformMatrixTexture},r.prototype.getScene=function(){return this._scene},r.prototype.toString=function(t){var e="Name: "+this.name+", nBones: "+this.bones.length;if(e+=", nAnimationRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),t){e+=", Ranges: {";var n=!0;for(var i in this._ranges)n&&(e+=", ",n=!1),e+=i;e+="}"}return e},r.prototype.getBoneIndexByName=function(t){for(var e=0,n=this.bones.length;e-1&&this._meshesWithPoseMatrix.splice(e,1)},r.prototype._computeTransformMatrices=function(t,e){this.onBeforeComputeObservable.notifyObservers(this);for(var n=0;n0)for(var t=0,e=this.bones;t0&&(s.animation=o.animations[0].serialize()),n.ranges=[],this._ranges){var p=this._ranges[d];if(p){var y={};y.name=d,y.from=p.from,y.to=p.to,n.ranges.push(y)}}}return n},r.Parse=function(t,e){var n,i=new r(t.name,t.id,e);for(t.dimensionsAtRest&&(i.dimensionsAtRest=l.e.FromArray(t.dimensionsAtRest)),i.needInitialSkinMatrix=t.needInitialSkinMatrix,t.overrideMeshId&&(i._hasWaitingData=!0,i._waitingOverrideMeshId=t.overrideMeshId),n=0;n-1&&(s=i.bones[o.parentBoneIndex]);var d=o.rest?l.a.FromArray(o.rest):null,p=new Ue(o.name,i,s,l.a.FromArray(o.matrix),d,null,a);o.id!==void 0&&o.id!==null&&(p.id=o.id),o.length&&(p.length=o.length),o.metadata&&(p.metadata=o.metadata),o.animation&&p.animations.push(k.Parse(o.animation)),o.linkedTransformNodeId!==void 0&&o.linkedTransformNodeId!==null&&(i._hasWaitingData=!0,p._waitingTransformNodeId=o.linkedTransformNodeId)}if(t.ranges)for(n=0;n0&&(t=this._meshesWithPoseMatrix[0].getPoseMatrix()),t},r.prototype.sortBones=function(){for(var t=new Array,e=new Array(this.bones.length),n=0;n=2&&(this._leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]}),this.browserGamepad.axes.length>=4&&(this._rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})}return Object.defineProperty(r.prototype,"isConnected",{get:function(){return this._isConnected},enumerable:!1,configurable:!0}),r.prototype.onleftstickchanged=function(t){this._onleftstickchanged=t},r.prototype.onrightstickchanged=function(t){this._onrightstickchanged=t},Object.defineProperty(r.prototype,"leftStick",{get:function(){return this._leftStick},set:function(t){!this._onleftstickchanged||this._leftStick.x===t.x&&this._leftStick.y===t.y||this._onleftstickchanged(t),this._leftStick=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightStick",{get:function(){return this._rightStick},set:function(t){!this._onrightstickchanged||this._rightStick.x===t.x&&this._rightStick.y===t.y||this._onrightstickchanged(t),this._rightStick=t},enumerable:!1,configurable:!0}),r.prototype.update=function(){this._leftStick&&(this.leftStick={x:this.browserGamepad.axes[this._leftStickAxisX],y:this.browserGamepad.axes[this._leftStickAxisY]},this._invertLeftStickY&&(this.leftStick.y*=-1)),this._rightStick&&(this.rightStick={x:this.browserGamepad.axes[this._rightStickAxisX],y:this.browserGamepad.axes[this._rightStickAxisY]})},r.prototype.dispose=function(){},r.GAMEPAD=0,r.GENERIC=1,r.XBOX=2,r.POSE_ENABLED=3,r.DUALSHOCK=4,r}(),El=function(r){function t(e,n,i){var o=r.call(this,e,n,i)||this;return o.onButtonDownObservable=new P.c,o.onButtonUpObservable=new P.c,o.type=fn.GENERIC,o._buttons=new Array(i.buttons.length),o}return Object(c.d)(t,r),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype._setButtonValue=function(e,n,i){return e!==n&&(e===1&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),e===0&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},t.prototype.update=function(){r.prototype.update.call(this);for(var e=0;e.005&&(t.inertialAlphaOffset+=n)}if(e.y!=0){var i=e.y/this.gamepadRotationSensibility*this._yAxisScale;i!=0&&Math.abs(i)>.005&&(t.inertialBetaOffset+=i)}}var o=this.gamepad.leftStick;if(o&&o.y!=0){var a=o.y/this.gamepadMoveSensibility;a!=0&&Math.abs(a)>.005&&(this.camera.inertialRadiusOffset-=a)}}},r.prototype.getClassName=function(){return"ArcRotateCameraGamepadInput"},r.prototype.getSimpleName=function(){return"gamepad"},Object(c.c)([Object(L.c)()],r.prototype,"gamepadRotationSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"gamepadMoveSensibility",void 0),r}();dn.ArcRotateCameraGamepadInput=Za;var Zi=f(66),Ja=function(){function r(){this.keysUp=[38],this.keysDown=[40],this.keysLeft=[37],this.keysRight=[39],this.keysReset=[220],this.panningSensibility=50,this.zoomingSensibility=25,this.useAltToZoom=!0,this.angularSpeed=.01,this._keys=new Array}return r.prototype.attachControl=function(t){var e=this;t=Ye.b.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){e._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(n){var i,o=n.event;o.metaKey||(n.type===Zi.a.KEYDOWN?(e._ctrlPressed=o.ctrlKey,e._altPressed=o.altKey,(e.keysUp.indexOf(o.keyCode)!==-1||e.keysDown.indexOf(o.keyCode)!==-1||e.keysLeft.indexOf(o.keyCode)!==-1||e.keysRight.indexOf(o.keyCode)!==-1||e.keysReset.indexOf(o.keyCode)!==-1)&&((i=e._keys.indexOf(o.keyCode))===-1&&e._keys.push(o.keyCode),o.preventDefault&&(t||o.preventDefault()))):e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1&&e.keysReset.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))>=0&&e._keys.splice(i,1),o.preventDefault&&(t||o.preventDefault())))}))},r.prototype.detachControl=function(t){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},r.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var t=this.camera,e=0;e0?n/(1+this.wheelDeltaPercentage):n*(1+this.wheelDeltaPercentage)},r.prototype.attachControl=function(t){var e=this;t=Ye.b.BackCompatCameraNoPreventDefault(arguments),this._wheel=function(n,i){if(n.type===Tt.a.POINTERWHEEL){var o=n.event,a=0,s=o,d=0;if(d=s.wheelDelta?s.wheelDelta:60*-(o.deltaY||o.detail),e.wheelDeltaPercentage){if((a=e.computeDeltaFromMouseWheelLegacyEvent(d,e.camera.radius))>0){for(var p=e.camera.radius,y=e.camera.inertialRadiusOffset+a,C=0;C<20&&Math.abs(y)>.001;C++)p-=y,y*=e.camera.inertia;p=$.a.Clamp(p,0,Number.MAX_VALUE),a=e.computeDeltaFromMouseWheelLegacyEvent(d,p)}}else a=d/(40*e.wheelPrecision);a&&(e.camera.inertialRadiusOffset+=a),o.preventDefault&&(t||o.preventDefault())}},this._observer=this.camera.getScene().onPointerObservable.add(this._wheel,Tt.a.POINTERWHEEL)},r.prototype.detachControl=function(t){this._observer&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this._wheel=null)},r.prototype.getClassName=function(){return"ArcRotateCameraMouseWheelInput"},r.prototype.getSimpleName=function(){return"mousewheel"},Object(c.c)([Object(L.c)()],r.prototype,"wheelPrecision",void 0),Object(c.c)([Object(L.c)()],r.prototype,"wheelDeltaPercentage",void 0),r}();dn.ArcRotateCameraMouseWheelInput=$a;var Sl=function(){function r(){this.buttons=[0,1,2]}return r.prototype.attachControl=function(t){var e=this;t=Ye.b.BackCompatCameraNoPreventDefault(arguments);var n=this.camera.getEngine(),i=n.getInputElement(),o=0,a=null;this.pointA=null,this.pointB=null,this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._buttonsPressed=0,this._pointerInput=function(d,p){var y=d.event,C=y.pointerType==="touch";if(!n.isInVRExclusivePointerMode&&(d.type===Tt.a.POINTERMOVE||e.buttons.indexOf(y.button)!==-1)){var M=y.srcElement||y.target;if(e._altKey=y.altKey,e._ctrlKey=y.ctrlKey,e._metaKey=y.metaKey,e._shiftKey=y.shiftKey,e._buttonsPressed=y.buttons,n.isPointerLock){var U=y.movementX||y.mozMovementX||y.webkitMovementX||y.msMovementX||0,F=y.movementY||y.mozMovementY||y.webkitMovementY||y.msMovementY||0;e.onTouch(null,U,F),e.pointA=null,e.pointB=null}else if(d.type===Tt.a.POINTERDOWN&&M){try{M.setPointerCapture(y.pointerId)}catch{}e.pointA===null?e.pointA={x:y.clientX,y:y.clientY,pointerId:y.pointerId,type:y.pointerType}:e.pointB===null&&(e.pointB={x:y.clientX,y:y.clientY,pointerId:y.pointerId,type:y.pointerType}),e.onButtonDown(y),t||(y.preventDefault(),i&&i.focus())}else if(d.type===Tt.a.POINTERDOUBLETAP)e.onDoubleTap(y.pointerType);else if(d.type===Tt.a.POINTERUP&&M){try{M.releasePointerCapture(y.pointerId)}catch{}C||(e.pointB=null),n._badOS?e.pointA=e.pointB=null:e.pointB&&e.pointA&&e.pointA.pointerId==y.pointerId?(e.pointA=e.pointB,e.pointB=null):e.pointA&&e.pointB&&e.pointB.pointerId==y.pointerId?e.pointB=null:e.pointA=e.pointB=null,(o!==0||a)&&(e.onMultiTouch(e.pointA,e.pointB,o,0,a,null),o=0,a=null),e.onButtonUp(y),t||y.preventDefault()}else if(d.type===Tt.a.POINTERMOVE){if(t||y.preventDefault(),e.pointA&&e.pointB===null)U=y.clientX-e.pointA.x,F=y.clientY-e.pointA.y,e.onTouch(e.pointA,U,F),e.pointA.x=y.clientX,e.pointA.y=y.clientY;else if(e.pointA&&e.pointB){var z=e.pointA.pointerId===y.pointerId?e.pointA:e.pointB;z.x=y.clientX,z.y=y.clientY;var J=e.pointA.x-e.pointB.x,ie=e.pointA.y-e.pointB.y,se=J*J+ie*ie,ce={x:(e.pointA.x+e.pointB.x)/2,y:(e.pointA.y+e.pointB.y)/2,pointerId:y.pointerId,type:d.type};e.onMultiTouch(e.pointA,e.pointB,o,se,a,ce),a=ce,o=se}}}},this._observer=this.camera.getScene().onPointerObservable.add(this._pointerInput,Tt.a.POINTERDOWN|Tt.a.POINTERUP|Tt.a.POINTERMOVE),this._onLostFocus=function(){e.pointA=e.pointB=null,o=0,a=null,e.onLostFocus()},i&&i.addEventListener("contextmenu",this.onContextMenu.bind(this),!1);var s=this.camera.getScene().getEngine().getHostWindow();s&&Ye.b.RegisterTopRootEvents(s,[{name:"blur",handler:this._onLostFocus}])},r.prototype.detachControl=function(t){if(this._onLostFocus){var e=this.camera.getScene().getEngine().getHostWindow();e&&Ye.b.UnregisterTopRootEvents(e,[{name:"blur",handler:this._onLostFocus}])}if(this._observer){if(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this.onContextMenu){var n=this.camera.getScene().getEngine().getInputElement();n&&n.removeEventListener("contextmenu",this.onContextMenu)}this._onLostFocus=null}this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._buttonsPressed=0},r.prototype.getClassName=function(){return"BaseCameraPointersInput"},r.prototype.getSimpleName=function(){return"pointers"},r.prototype.onDoubleTap=function(t){},r.prototype.onTouch=function(t,e,n){},r.prototype.onMultiTouch=function(t,e,n,i,o,a){},r.prototype.onContextMenu=function(t){t.preventDefault()},r.prototype.onButtonDown=function(t){},r.prototype.onButtonUp=function(t){},r.prototype.onLostFocus=function(){},Object(c.c)([Object(L.c)()],r.prototype,"buttons",void 0),r}(),es=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.buttons=[0,1,2],e.angularSensibilityX=1e3,e.angularSensibilityY=1e3,e.pinchPrecision=12,e.pinchDeltaPercentage=0,e.useNaturalPinchZoom=!1,e.panningSensibility=1e3,e.multiTouchPanning=!0,e.multiTouchPanAndZoom=!0,e.pinchInwards=!0,e._isPanClick=!1,e._twoFingerActivityCount=0,e._isPinching=!1,e}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"ArcRotateCameraPointersInput"},t.prototype.onTouch=function(e,n,i){this.panningSensibility!==0&&(this._ctrlKey&&this.camera._useCtrlForPanning||this._isPanClick)?(this.camera.inertialPanningX+=-n/this.panningSensibility,this.camera.inertialPanningY+=i/this.panningSensibility):(this.camera.inertialAlphaOffset-=n/this.angularSensibilityX,this.camera.inertialBetaOffset-=i/this.angularSensibilityY)},t.prototype.onDoubleTap=function(e){this.camera.useInputToRestoreState&&this.camera.restoreState()},t.prototype.onMultiTouch=function(e,n,i,o,a,s){if(!(i===0&&a===null||o===0&&s===null)){var d=this.pinchInwards?1:-1;if(this.multiTouchPanAndZoom){if(this.useNaturalPinchZoom?this.camera.radius=this.camera.radius*Math.sqrt(i)/Math.sqrt(o):this.pinchDeltaPercentage?this.camera.inertialRadiusOffset+=.001*(o-i)*this.camera.radius*this.pinchDeltaPercentage:this.camera.inertialRadiusOffset+=(o-i)/(this.pinchPrecision*d*(this.angularSensibilityX+this.angularSensibilityY)/2),this.panningSensibility!==0&&a&&s){var p=s.x-a.x,y=s.y-a.y;this.camera.inertialPanningX+=-p/this.panningSensibility,this.camera.inertialPanningY+=y/this.panningSensibility}}else{this._twoFingerActivityCount++;var C=Math.sqrt(i),M=Math.sqrt(o);this._isPinching||this._twoFingerActivityCount<20&&Math.abs(M-C)>this.camera.pinchToPanMaxDistance?(this.pinchDeltaPercentage?this.camera.inertialRadiusOffset+=.001*(o-i)*this.camera.radius*this.pinchDeltaPercentage:this.camera.inertialRadiusOffset+=(o-i)/(this.pinchPrecision*d*(this.angularSensibilityX+this.angularSensibilityY)/2),this._isPinching=!0):this.panningSensibility!==0&&this.multiTouchPanning&&s&&a&&(p=s.x-a.x,y=s.y-a.y,this.camera.inertialPanningX+=-p/this.panningSensibility,this.camera.inertialPanningY+=y/this.panningSensibility)}}},t.prototype.onButtonDown=function(e){this._isPanClick=e.button===this.camera._panningMouseButton},t.prototype.onButtonUp=function(e){this._twoFingerActivityCount=0,this._isPinching=!1},t.prototype.onLostFocus=function(){this._isPanClick=!1,this._twoFingerActivityCount=0,this._isPinching=!1},Object(c.c)([Object(L.c)()],t.prototype,"buttons",void 0),Object(c.c)([Object(L.c)()],t.prototype,"angularSensibilityX",void 0),Object(c.c)([Object(L.c)()],t.prototype,"angularSensibilityY",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchPrecision",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchDeltaPercentage",void 0),Object(c.c)([Object(L.c)()],t.prototype,"useNaturalPinchZoom",void 0),Object(c.c)([Object(L.c)()],t.prototype,"panningSensibility",void 0),Object(c.c)([Object(L.c)()],t.prototype,"multiTouchPanning",void 0),Object(c.c)([Object(L.c)()],t.prototype,"multiTouchPanAndZoom",void 0),t}(Sl);dn.ArcRotateCameraPointersInput=es;var ko=function(r){function t(e){return r.call(this,e)||this}return Object(c.d)(t,r),t.prototype.addMouseWheel=function(){return this.add(new $a),this},t.prototype.addPointers=function(){return this.add(new es),this},t.prototype.addKeyboard=function(){return this.add(new Ja),this},t}(eo);ko.prototype.addVRDeviceOrientation=function(){return this.add(new ts),this};var ts=function(){function r(){this.alphaCorrection=1,this.gammaCorrection=1,this._alpha=0,this._gamma=0,this._dirty=!1,this._deviceOrientationHandler=this._onOrientationEvent.bind(this)}return r.prototype.attachControl=function(t){var e=this;t=Ye.b.BackCompatCameraNoPreventDefault(arguments),this.camera.attachControl(t);var n=this.camera.getScene().getEngine().getHostWindow();n&&(typeof DeviceOrientationEvent<"u"&&typeof DeviceOrientationEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(function(i){i==="granted"?n.addEventListener("deviceorientation",e._deviceOrientationHandler):Ye.b.Warn("Permission not granted.")}).catch(function(i){Ye.b.Error(i)}):n.addEventListener("deviceorientation",this._deviceOrientationHandler))},r.prototype._onOrientationEvent=function(t){t.alpha!==null&&(this._alpha=(0|+t.alpha)*this.alphaCorrection),t.gamma!==null&&(this._gamma=(0|+t.gamma)*this.gammaCorrection),this._dirty=!0},r.prototype.checkInputs=function(){this._dirty&&(this._dirty=!1,this._gamma<0&&(this._gamma=180+this._gamma),this.camera.alpha=-this._alpha/180*Math.PI%Math.PI*2,this.camera.beta=this._gamma/180*Math.PI)},r.prototype.detachControl=function(t){window.removeEventListener("deviceorientation",this._deviceOrientationHandler)},r.prototype.getClassName=function(){return"ArcRotateCameraVRDeviceOrientationInput"},r.prototype.getSimpleName=function(){return"VRDeviceOrientation"},r}();dn.ArcRotateCameraVRDeviceOrientationInput=ts;var ns=function(){function r(){this.keysForward=[87],this.keysBackward=[83],this.keysUp=[69],this.keysDown=[81],this.keysRight=[68],this.keysLeft=[65],this._keys=new Array}return r.prototype.attachControl=function(t){var e=this;t=Ye.b.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){e._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(n){var i,o=n.event;n.type===Zi.a.KEYDOWN?e.keysForward.indexOf(o.keyCode)===-1&&e.keysBackward.indexOf(o.keyCode)===-1&&e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))===-1&&e._keys.push(o.keyCode),t||o.preventDefault()):e.keysForward.indexOf(o.keyCode)===-1&&e.keysBackward.indexOf(o.keyCode)===-1&&e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))>=0&&e._keys.splice(i,1),t||o.preventDefault())}))},r.prototype.detachControl=function(t){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},r.prototype.getClassName=function(){return"FlyCameraKeyboardInput"},r.prototype._onLostFocus=function(t){this._keys=[]},r.prototype.getSimpleName=function(){return"keyboard"},r.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var t=this.camera,e=0;e=0&&e._keys.splice(i,1),o.preventDefault&&(t||o.preventDefault())))}))},r.prototype.detachControl=function(t){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},r.prototype.checkInputs=function(){var t=this;this._onKeyboardObserver&&this._keys.forEach(function(e){t.keysHeightOffsetIncr.indexOf(e)!==-1&&t._modifierHeightOffset()?t.camera.heightOffset+=t.heightSensibility:t.keysHeightOffsetDecr.indexOf(e)!==-1&&t._modifierHeightOffset()?t.camera.heightOffset-=t.heightSensibility:t.keysRotationOffsetIncr.indexOf(e)!==-1&&t._modifierRotationOffset()?(t.camera.rotationOffset+=t.rotationSensibility,t.camera.rotationOffset%=360):t.keysRotationOffsetDecr.indexOf(e)!==-1&&t._modifierRotationOffset()?(t.camera.rotationOffset-=t.rotationSensibility,t.camera.rotationOffset%=360):t.keysRadiusIncr.indexOf(e)!==-1&&t._modifierRadius()?t.camera.radius+=t.radiusSensibility:t.keysRadiusDecr.indexOf(e)!==-1&&t._modifierRadius()&&(t.camera.radius-=t.radiusSensibility)})},r.prototype.getClassName=function(){return"FollowCameraKeyboardMoveInput"},r.prototype.getSimpleName=function(){return"keyboard"},r.prototype._modifierHeightOffset=function(){return this.keysHeightOffsetModifierAlt===this._altPressed&&this.keysHeightOffsetModifierCtrl===this._ctrlPressed&&this.keysHeightOffsetModifierShift===this._shiftPressed},r.prototype._modifierRotationOffset=function(){return this.keysRotationOffsetModifierAlt===this._altPressed&&this.keysRotationOffsetModifierCtrl===this._ctrlPressed&&this.keysRotationOffsetModifierShift===this._shiftPressed},r.prototype._modifierRadius=function(){return this.keysRadiusModifierAlt===this._altPressed&&this.keysRadiusModifierCtrl===this._ctrlPressed&&this.keysRadiusModifierShift===this._shiftPressed},Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetIncr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetDecr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetModifierAlt",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetModifierCtrl",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysHeightOffsetModifierShift",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetIncr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetDecr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetModifierAlt",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetModifierCtrl",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRotationOffsetModifierShift",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusIncr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusDecr",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusModifierAlt",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusModifierCtrl",void 0),Object(c.c)([Object(L.c)()],r.prototype,"keysRadiusModifierShift",void 0),Object(c.c)([Object(L.c)()],r.prototype,"heightSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"rotationSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"radiusSensibility",void 0),r}();dn.FollowCameraKeyboardMoveInput=rs;var os=function(){function r(){this.axisControlRadius=!0,this.axisControlHeight=!1,this.axisControlRotation=!1,this.wheelPrecision=3,this.wheelDeltaPercentage=0}return r.prototype.attachControl=function(t){var e=this;t=Ye.b.BackCompatCameraNoPreventDefault(arguments),this._wheel=function(n,i){if(n.type===Tt.a.POINTERWHEEL){var o=n.event,a=0,s=Math.max(-1,Math.min(1,o.deltaY||o.wheelDelta||-o.detail));e.wheelDeltaPercentage?(console.assert(e.axisControlRadius+e.axisControlHeight+e.axisControlRotation<=1,"wheelDeltaPercentage only usable when mouse wheel controlls ONE axis. Currently enabled: axisControlRadius: "+e.axisControlRadius+", axisControlHeightOffset: "+e.axisControlHeight+", axisControlRotationOffset: "+e.axisControlRotation),e.axisControlRadius?a=.01*s*e.wheelDeltaPercentage*e.camera.radius:e.axisControlHeight?a=.01*s*e.wheelDeltaPercentage*e.camera.heightOffset:e.axisControlRotation&&(a=.01*s*e.wheelDeltaPercentage*e.camera.rotationOffset)):a=s*e.wheelPrecision,a&&(e.axisControlRadius?e.camera.radius+=a:e.axisControlHeight?e.camera.heightOffset-=a:e.axisControlRotation&&(e.camera.rotationOffset-=a)),o.preventDefault&&(t||o.preventDefault())}},this._observer=this.camera.getScene().onPointerObservable.add(this._wheel,Tt.a.POINTERWHEEL)},r.prototype.detachControl=function(t){this._observer&&(this.camera.getScene().onPointerObservable.remove(this._observer),this._observer=null,this._wheel=null)},r.prototype.getClassName=function(){return"ArcRotateCameraMouseWheelInput"},r.prototype.getSimpleName=function(){return"mousewheel"},Object(c.c)([Object(L.c)()],r.prototype,"axisControlRadius",void 0),Object(c.c)([Object(L.c)()],r.prototype,"axisControlHeight",void 0),Object(c.c)([Object(L.c)()],r.prototype,"axisControlRotation",void 0),Object(c.c)([Object(L.c)()],r.prototype,"wheelPrecision",void 0),Object(c.c)([Object(L.c)()],r.prototype,"wheelDeltaPercentage",void 0),r}();dn.FollowCameraMouseWheelInput=os;var as=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.angularSensibilityX=1,e.angularSensibilityY=1,e.pinchPrecision=1e4,e.pinchDeltaPercentage=0,e.axisXControlRadius=!1,e.axisXControlHeight=!1,e.axisXControlRotation=!0,e.axisYControlRadius=!1,e.axisYControlHeight=!0,e.axisYControlRotation=!1,e.axisPinchControlRadius=!0,e.axisPinchControlHeight=!1,e.axisPinchControlRotation=!1,e.warningEnable=!0,e._warningCounter=0,e}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"FollowCameraPointersInput"},t.prototype.onTouch=function(e,n,i){this._warning(),this.axisXControlRotation?this.camera.rotationOffset+=n/this.angularSensibilityX:this.axisYControlRotation&&(this.camera.rotationOffset+=i/this.angularSensibilityX),this.axisXControlHeight?this.camera.heightOffset+=n/this.angularSensibilityY:this.axisYControlHeight&&(this.camera.heightOffset+=i/this.angularSensibilityY),this.axisXControlRadius?this.camera.radius-=n/this.angularSensibilityY:this.axisYControlRadius&&(this.camera.radius-=i/this.angularSensibilityY)},t.prototype.onMultiTouch=function(e,n,i,o,a,s){if(!(i===0&&a===null||o===0&&s===null)){var d=(o-i)/(this.pinchPrecision*(this.angularSensibilityX+this.angularSensibilityY)/2);this.pinchDeltaPercentage?(d*=.01*this.pinchDeltaPercentage,this.axisPinchControlRotation&&(this.camera.rotationOffset+=d*this.camera.rotationOffset),this.axisPinchControlHeight&&(this.camera.heightOffset+=d*this.camera.heightOffset),this.axisPinchControlRadius&&(this.camera.radius-=d*this.camera.radius)):(this.axisPinchControlRotation&&(this.camera.rotationOffset+=d),this.axisPinchControlHeight&&(this.camera.heightOffset+=d),this.axisPinchControlRadius&&(this.camera.radius-=d))}},t.prototype._warning=function(){if(this.warningEnable&&this._warningCounter++%100==0){var e="It probably only makes sense to control ONE camera property with each pointer axis. Set 'warningEnable = false' if you are sure. Currently enabled: ";console.assert(this.axisXControlRotation+this.axisXControlHeight+this.axisXControlRadius<=1,e+"axisXControlRotation: "+this.axisXControlRotation+", axisXControlHeight: "+this.axisXControlHeight+", axisXControlRadius: "+this.axisXControlRadius),console.assert(this.axisYControlRotation+this.axisYControlHeight+this.axisYControlRadius<=1,e+"axisYControlRotation: "+this.axisYControlRotation+", axisYControlHeight: "+this.axisYControlHeight+", axisYControlRadius: "+this.axisYControlRadius),console.assert(this.axisPinchControlRotation+this.axisPinchControlHeight+this.axisPinchControlRadius<=1,e+"axisPinchControlRotation: "+this.axisPinchControlRotation+", axisPinchControlHeight: "+this.axisPinchControlHeight+", axisPinchControlRadius: "+this.axisPinchControlRadius)}},Object(c.c)([Object(L.c)()],t.prototype,"angularSensibilityX",void 0),Object(c.c)([Object(L.c)()],t.prototype,"angularSensibilityY",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchPrecision",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchDeltaPercentage",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisXControlRadius",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisXControlHeight",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisXControlRotation",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisYControlRadius",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisYControlHeight",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisYControlRotation",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisPinchControlRadius",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisPinchControlHeight",void 0),Object(c.c)([Object(L.c)()],t.prototype,"axisPinchControlRotation",void 0),t}(Sl);dn.FollowCameraPointersInput=as;var ss=function(){function r(){this.keysUp=[38],this.keysUpward=[33],this.keysDown=[40],this.keysDownward=[34],this.keysLeft=[37],this.keysRight=[39],this._keys=new Array}return r.prototype.attachControl=function(t){var e=this;t=Ye.b.BackCompatCameraNoPreventDefault(arguments),this._onCanvasBlurObserver||(this._scene=this.camera.getScene(),this._engine=this._scene.getEngine(),this._onCanvasBlurObserver=this._engine.onCanvasBlurObservable.add(function(){e._keys=[]}),this._onKeyboardObserver=this._scene.onKeyboardObservable.add(function(n){var i,o=n.event;o.metaKey||(n.type===Zi.a.KEYDOWN?e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1&&e.keysUpward.indexOf(o.keyCode)===-1&&e.keysDownward.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))===-1&&e._keys.push(o.keyCode),t||o.preventDefault()):e.keysUp.indexOf(o.keyCode)===-1&&e.keysDown.indexOf(o.keyCode)===-1&&e.keysLeft.indexOf(o.keyCode)===-1&&e.keysRight.indexOf(o.keyCode)===-1&&e.keysUpward.indexOf(o.keyCode)===-1&&e.keysDownward.indexOf(o.keyCode)===-1||((i=e._keys.indexOf(o.keyCode))>=0&&e._keys.splice(i,1),t||o.preventDefault()))}))},r.prototype.detachControl=function(t){this._scene&&(this._onKeyboardObserver&&this._scene.onKeyboardObservable.remove(this._onKeyboardObserver),this._onCanvasBlurObserver&&this._engine.onCanvasBlurObservable.remove(this._onCanvasBlurObserver),this._onKeyboardObserver=null,this._onCanvasBlurObserver=null),this._keys=[]},r.prototype.checkInputs=function(){if(this._onKeyboardObserver)for(var t=this.camera,e=0;e1)t.cameraRotation.x=-this._offsetY/this.touchAngularSensibility;else{var e=t._computeLocalCameraSpeed(),n=new l.e(0,0,e*this._offsetY/this.touchMoveSensibility);l.a.RotationYawPitchRollToRef(t.rotation.y,t.rotation.x,0,t._cameraRotationMatrix),t.cameraDirection.addInPlace(l.e.TransformCoordinates(n,t._cameraRotationMatrix))}}},r.prototype.getClassName=function(){return"FreeCameraTouchInput"},r.prototype.getSimpleName=function(){return"touch"},Object(c.c)([Object(L.c)()],r.prototype,"touchAngularSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"touchMoveSensibility",void 0),r}();dn.FreeCameraTouchInput=us;var to=function(r){function t(e){var n=r.call(this,e)||this;return n._mouseInput=null,n._mouseWheelInput=null,n}return Object(c.d)(t,r),t.prototype.addKeyboard=function(){return this.add(new ss),this},t.prototype.addMouse=function(e){return e===void 0&&(e=!0),this._mouseInput||(this._mouseInput=new cs(e),this.add(this._mouseInput)),this},t.prototype.removeMouse=function(){return this._mouseInput&&this.remove(this._mouseInput),this},t.prototype.addMouseWheel=function(){return this._mouseWheelInput||(this._mouseWheelInput=new ls,this.add(this._mouseWheelInput)),this},t.prototype.removeMouseWheel=function(){return this._mouseWheelInput&&this.remove(this._mouseWheelInput),this},t.prototype.addTouch=function(){return this.add(new us),this},t.prototype.clear=function(){r.prototype.clear.call(this),this._mouseInput=null},t}(eo);to.prototype.addDeviceOrientation=function(){return this._deviceOrientationInput||(this._deviceOrientationInput=new hs,this.add(this._deviceOrientationInput)),this};var hs=function(){function r(){var t=this;this._screenOrientationAngle=0,this._screenQuaternion=new l.b,this._alpha=0,this._beta=0,this._gamma=0,this._onDeviceOrientationChangedObservable=new P.c,this._orientationChanged=function(){t._screenOrientationAngle=window.orientation!==void 0?+window.orientation:window.screen.orientation&&window.screen.orientation.angle?window.screen.orientation.angle:0,t._screenOrientationAngle=-Ye.b.ToRadians(t._screenOrientationAngle/2),t._screenQuaternion.copyFromFloats(0,Math.sin(t._screenOrientationAngle),0,Math.cos(t._screenOrientationAngle))},this._deviceOrientation=function(e){t._alpha=e.alpha!==null?e.alpha:0,t._beta=e.beta!==null?e.beta:0,t._gamma=e.gamma!==null?e.gamma:0,e.alpha!==null&&t._onDeviceOrientationChangedObservable.notifyObservers()},this._constantTranform=new l.b(-Math.sqrt(.5),0,0,Math.sqrt(.5)),this._orientationChanged()}return r.WaitForOrientationChangeAsync=function(t){return new Promise(function(e,n){var i=!1,o=function(){window.removeEventListener("deviceorientation",o),i=!0,e()};t&&setTimeout(function(){i||(window.removeEventListener("deviceorientation",o),n("WaitForOrientationChangeAsync timed out"))},t),typeof DeviceOrientationEvent<"u"&&typeof DeviceOrientationEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(function(a){a=="granted"?window.addEventListener("deviceorientation",o):Ye.b.Warn("Permission not granted.")}).catch(function(a){Ye.b.Error(a)}):window.addEventListener("deviceorientation",o)})},Object.defineProperty(r.prototype,"camera",{get:function(){return this._camera},set:function(t){var e=this;this._camera=t,this._camera==null||this._camera.rotationQuaternion||(this._camera.rotationQuaternion=new l.b),this._camera&&this._camera.onDisposeObservable.add(function(){e._onDeviceOrientationChangedObservable.clear()})},enumerable:!1,configurable:!0}),r.prototype.attachControl=function(){var t=this,e=this.camera.getScene().getEngine().getHostWindow();if(e){var n=function(){e.addEventListener("orientationchange",t._orientationChanged),e.addEventListener("deviceorientation",t._deviceOrientation),t._orientationChanged()};typeof DeviceOrientationEvent<"u"&&typeof DeviceOrientationEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then(function(i){i==="granted"?n():Ye.b.Warn("Permission not granted.")}).catch(function(i){Ye.b.Error(i)}):n()}},r.prototype.detachControl=function(t){window.removeEventListener("orientationchange",this._orientationChanged),window.removeEventListener("deviceorientation",this._deviceOrientation),this._alpha=0},r.prototype.checkInputs=function(){this._alpha&&(l.b.RotationYawPitchRollToRef(Ye.b.ToRadians(this._alpha),Ye.b.ToRadians(this._beta),-Ye.b.ToRadians(this._gamma),this.camera.rotationQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._screenQuaternion),this._camera.rotationQuaternion.multiplyInPlace(this._constantTranform),this._camera.rotationQuaternion.z*=-1,this._camera.rotationQuaternion.w*=-1)},r.prototype.getClassName=function(){return"FreeCameraDeviceOrientationInput"},r.prototype.getSimpleName=function(){return"deviceOrientation"},r}();dn.FreeCameraDeviceOrientationInput=hs;var ds=function(){function r(){this.gamepadAngularSensibility=200,this.gamepadMoveSensibility=40,this._yAxisScale=1,this._cameraTransform=l.a.Identity(),this._deltaTransform=l.e.Zero(),this._vector3=l.e.Zero(),this._vector2=l.d.Zero()}return Object.defineProperty(r.prototype,"invertYAxis",{get:function(){return this._yAxisScale!==1},set:function(t){this._yAxisScale=t?-1:1},enumerable:!1,configurable:!0}),r.prototype.attachControl=function(){var t=this,e=this.camera.getScene().gamepadManager;this._onGamepadConnectedObserver=e.onGamepadConnectedObservable.add(function(n){n.type!==fn.POSE_ENABLED&&(t.gamepad&&n.type!==fn.XBOX||(t.gamepad=n))}),this._onGamepadDisconnectedObserver=e.onGamepadDisconnectedObservable.add(function(n){t.gamepad===n&&(t.gamepad=null)}),this.gamepad=e.getGamepadByType(fn.XBOX),!this.gamepad&&e.gamepads.length&&(this.gamepad=e.gamepads[0])},r.prototype.detachControl=function(t){this.camera.getScene().gamepadManager.onGamepadConnectedObservable.remove(this._onGamepadConnectedObserver),this.camera.getScene().gamepadManager.onGamepadDisconnectedObservable.remove(this._onGamepadDisconnectedObserver),this.gamepad=null},r.prototype.checkInputs=function(){if(this.gamepad&&this.gamepad.leftStick){var t=this.camera,e=this.gamepad.leftStick,n=e.x/this.gamepadMoveSensibility,i=e.y/this.gamepadMoveSensibility;e.x=Math.abs(n)>.005?0+n:0,e.y=Math.abs(i)>.005?0+i:0;var o=this.gamepad.rightStick;if(o){var a=o.x/this.gamepadAngularSensibility,s=o.y/this.gamepadAngularSensibility*this._yAxisScale;o.x=Math.abs(a)>.001?0+a:0,o.y=Math.abs(s)>.001?0+s:0}else o={x:0,y:0};t.rotationQuaternion?t.rotationQuaternion.toRotationMatrix(this._cameraTransform):l.a.RotationYawPitchRollToRef(t.rotation.y,t.rotation.x,0,this._cameraTransform);var d=50*t._computeLocalCameraSpeed();this._vector3.copyFromFloats(e.x*d,0,-e.y*d),l.e.TransformCoordinatesToRef(this._vector3,this._cameraTransform,this._deltaTransform),t.cameraDirection.addInPlace(this._deltaTransform),this._vector2.copyFromFloats(o.y,o.x),t.cameraRotation.addInPlace(this._vector2)}},r.prototype.getClassName=function(){return"FreeCameraGamepadInput"},r.prototype.getSimpleName=function(){return"gamepad"},Object(c.c)([Object(L.c)()],r.prototype,"gamepadAngularSensibility",void 0),Object(c.c)([Object(L.c)()],r.prototype,"gamepadMoveSensibility",void 0),r}();dn.FreeCameraGamepadInput=ds;var cn,Al=f(112);(function(r){r[r.X=0]="X",r[r.Y=1]="Y",r[r.Z=2]="Z"})(cn||(cn={}));var fs=function(){function r(t,e){var n=this,i=Object(c.a)(Object(c.a)({},r._GetDefaultOptions()),e);if(this._leftJoystick=!!t,r._globalJoystickIndex++,this._axisTargetedByLeftAndRight=cn.X,this._axisTargetedByUpAndDown=cn.Y,this.reverseLeftRight=!1,this.reverseUpDown=!1,this._touches=new Al.a,this.deltaPosition=l.e.Zero(),this._joystickSensibility=25,this._inversedSensibility=1/(this._joystickSensibility/1e3),this._onResize=function(a){r.vjCanvasWidth=window.innerWidth,r.vjCanvasHeight=window.innerHeight,r.Canvas&&(r.Canvas.width=r.vjCanvasWidth,r.Canvas.height=r.vjCanvasHeight),r.halfWidth=r.vjCanvasWidth/2},!r.Canvas){window.addEventListener("resize",this._onResize,!1),r.Canvas=document.createElement("canvas"),r.vjCanvasWidth=window.innerWidth,r.vjCanvasHeight=window.innerHeight,r.Canvas.width=window.innerWidth,r.Canvas.height=window.innerHeight,r.Canvas.style.width="100%",r.Canvas.style.height="100%",r.Canvas.style.position="absolute",r.Canvas.style.backgroundColor="transparent",r.Canvas.style.top="0px",r.Canvas.style.left="0px",r.Canvas.style.zIndex="5",r.Canvas.style.msTouchAction="none",r.Canvas.style.touchAction="none",r.Canvas.setAttribute("touch-action","none");var o=r.Canvas.getContext("2d");if(!o)throw new Error("Unable to create canvas for virtual joystick");r.vjCanvasContext=o,r.vjCanvasContext.strokeStyle="#ffffff",r.vjCanvasContext.lineWidth=2,document.body.appendChild(r.Canvas)}r.halfWidth=r.Canvas.width/2,this.pressed=!1,this.limitToContainer=i.limitToContainer,this._joystickColor=i.color,this.containerSize=i.containerSize,this.puckSize=i.puckSize,i.position&&this.setPosition(i.position.x,i.position.y),i.puckImage&&this.setPuckImage(i.puckImage),i.containerImage&&this.setContainerImage(i.containerImage),i.alwaysVisible&&r._alwaysVisibleSticks++,this.alwaysVisible=i.alwaysVisible,this._joystickPointerID=-1,this._joystickPointerPos=new l.d(0,0),this._joystickPreviousPointerPos=new l.d(0,0),this._joystickPointerStartPos=new l.d(0,0),this._deltaJoystickVector=new l.d(0,0),this._onPointerDownHandlerRef=function(a){n._onPointerDown(a)},this._onPointerMoveHandlerRef=function(a){n._onPointerMove(a)},this._onPointerUpHandlerRef=function(a){n._onPointerUp(a)},r.Canvas.addEventListener("pointerdown",this._onPointerDownHandlerRef,!1),r.Canvas.addEventListener("pointermove",this._onPointerMoveHandlerRef,!1),r.Canvas.addEventListener("pointerup",this._onPointerUpHandlerRef,!1),r.Canvas.addEventListener("pointerout",this._onPointerUpHandlerRef,!1),r.Canvas.addEventListener("contextmenu",function(a){a.preventDefault()},!1),requestAnimationFrame(function(){n._drawVirtualJoystick()})}return r._GetDefaultOptions=function(){return{puckSize:40,containerSize:60,color:"cyan",puckImage:void 0,containerImage:void 0,position:void 0,alwaysVisible:!1,limitToContainer:!1}},r.prototype.setJoystickSensibility=function(t){this._joystickSensibility=t,this._inversedSensibility=1/(this._joystickSensibility/1e3)},r.prototype._onPointerDown=function(t){t.preventDefault(),(this._leftJoystick===!0?t.clientXr.halfWidth)&&this._joystickPointerID<0?(this._joystickPointerID=t.pointerId,this._joystickPosition?(this._joystickPointerStartPos=this._joystickPosition.clone(),this._joystickPointerPos=this._joystickPosition.clone(),this._joystickPreviousPointerPos=this._joystickPosition.clone(),this._onPointerMove(t)):(this._joystickPointerStartPos.x=t.clientX,this._joystickPointerStartPos.y=t.clientY,this._joystickPointerPos=this._joystickPointerStartPos.clone(),this._joystickPreviousPointerPos=this._joystickPointerStartPos.clone()),this._deltaJoystickVector.x=0,this._deltaJoystickVector.y=0,this.pressed=!0,this._touches.add(t.pointerId.toString(),t)):r._globalJoystickIndex<2&&this._action&&(this._action(),this._touches.add(t.pointerId.toString(),{x:t.clientX,y:t.clientY,prevX:t.clientX,prevY:t.clientY}))},r.prototype._onPointerMove=function(t){if(this._joystickPointerID==t.pointerId){if(this.limitToContainer){var e=new l.d(t.clientX-this._joystickPointerStartPos.x,t.clientY-this._joystickPointerStartPos.y),n=e.length();n>this.containerSize&&e.scaleInPlace(this.containerSize/n),this._joystickPointerPos.x=this._joystickPointerStartPos.x+e.x,this._joystickPointerPos.y=this._joystickPointerStartPos.y+e.y}else this._joystickPointerPos.x=t.clientX,this._joystickPointerPos.y=t.clientY;this._deltaJoystickVector=this._joystickPointerPos.clone(),this._deltaJoystickVector=this._deltaJoystickVector.subtract(this._joystickPointerStartPos),0=0?this.rotation.y=-Math.atan(n.z/n.x)+Math.PI/2:this.rotation.y=-Math.atan(n.z/n.x)-Math.PI/2,this.rotation.z=0,isNaN(this.rotation.x)&&(this.rotation.x=0),isNaN(this.rotation.y)&&(this.rotation.y=0),isNaN(this.rotation.z)&&(this.rotation.z=0),this.rotationQuaternion&&l.b.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion)},Object.defineProperty(t.prototype,"target",{get:function(){return this.getTarget()},set:function(e){this.setTarget(e)},enumerable:!1,configurable:!0}),t.prototype.getTarget=function(){return this._currentTarget},t.prototype._decideIfNeedsToMove=function(){return Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){if(this.parent)return this.parent.getWorldMatrix().invertToRef(l.c.Matrix[0]),l.e.TransformNormalToRef(this.cameraDirection,l.c.Matrix[0],l.c.Vector3[0]),void this.position.addInPlace(l.c.Vector3[0]);this.position.addInPlace(this.cameraDirection)},t.prototype._checkInputs=function(){var e=this.invertRotation?-this.inverseRotationSpeed:1,n=this._decideIfNeedsToMove(),i=Math.abs(this.cameraRotation.x)>0||Math.abs(this.cameraRotation.y)>0;n&&this._updatePosition(),i&&(this.rotationQuaternion&&this.rotationQuaternion.toEulerAnglesToRef(this.rotation),this.rotation.x+=this.cameraRotation.x*e,this.rotation.y+=this.cameraRotation.y*e,!this.noRotationConstraint&&(this.rotation.x>1.570796&&(this.rotation.x=1.570796),this.rotation.x<-1.570796&&(this.rotation.x=-1.570796)),this.rotationQuaternion&&this.rotation.lengthSquared()&&l.b.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this.rotationQuaternion)),n&&(Math.abs(this.cameraDirection.x)Ve.a.CollisionsEpsilon&&(a.position.addInPlace(a._diffPosition),a.onCollide&&p&&a.onCollide(p))},a.inputs=new to(a),a.inputs.addKeyboard().addMouse(),a}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"angularSensibility",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var n=this.inputs.attached.mouse;n&&(n.angularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUpward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUpward:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysUpward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDownward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDownward:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysDownward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysRight=e)},enumerable:!1,configurable:!0}),t.prototype.attachControl=function(e,n){n=Ye.b.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(n)},t.prototype.detachControl=function(e){this.inputs.detachElement(),this.cameraDirection=new l.e(0,0,0),this.cameraRotation=new l.d(0,0)},Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!1,configurable:!0}),t.prototype._collideWithWorld=function(e){(this.parent?l.e.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);var n=this.getScene().collisionCoordinator;this._collider||(this._collider=n.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var i=e;this.applyGravity&&(i=e.add(this.getScene().gravity)),n.getNewPosition(this._oldPosition,i,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},t.prototype._checkInputs=function(){this._localDirection||(this._localDirection=l.e.Zero(),this._transformedDirection=l.e.Zero()),this.inputs.checkInputs(),r.prototype._checkInputs.call(this)},t.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):r.prototype._updatePosition.call(this)},t.prototype.dispose=function(){this.inputs.clear(),r.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"FreeCamera"},Object(c.c)([Object(L.o)()],t.prototype,"ellipsoid",void 0),Object(c.c)([Object(L.o)()],t.prototype,"ellipsoidOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"checkCollisions",void 0),Object(c.c)([Object(L.c)()],t.prototype,"applyGravity",void 0),t}(Ni);Q.a.AddNodeConstructor("TouchCamera",function(r,t){return function(){return new _s(r,l.e.Zero(),t)}});var _s=function(r){function t(e,n,i){var o=r.call(this,e,n,i)||this;return o.inputs.addTouch(),o._setupInputs(),o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"touchAngularSensibility",{get:function(){var e=this.inputs.attached.touch;return e?e.touchAngularSensibility:0},set:function(e){var n=this.inputs.attached.touch;n&&(n.touchAngularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"touchMoveSensibility",{get:function(){var e=this.inputs.attached.touch;return e?e.touchMoveSensibility:0},set:function(e){var n=this.inputs.attached.touch;n&&(n.touchMoveSensibility=e)},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"TouchCamera"},t.prototype._setupInputs=function(){var e=this.inputs.attached.touch,n=this.inputs.attached.mouse;n?n.touchEnabled=!1:e.allowMouse=!0},t}(Yn);Q.a.AddNodeConstructor("ArcRotateCamera",function(r,t){return function(){return new Ji(r,0,0,1,l.e.Zero(),t)}});var Ji=function(r){function t(e,n,i,o,a,s,d){d===void 0&&(d=!0);var p=r.call(this,e,l.e.Zero(),s,d)||this;return p.inertialAlphaOffset=0,p.inertialBetaOffset=0,p.inertialRadiusOffset=0,p.lowerAlphaLimit=null,p.upperAlphaLimit=null,p.lowerBetaLimit=.01,p.upperBetaLimit=Math.PI-.01,p.lowerRadiusLimit=null,p.upperRadiusLimit=null,p.inertialPanningX=0,p.inertialPanningY=0,p.pinchToPanMaxDistance=20,p.panningDistanceLimit=null,p.panningOriginTarget=l.e.Zero(),p.panningInertia=.9,p.zoomOnFactor=1,p.targetScreenOffset=l.d.Zero(),p.allowUpsideDown=!0,p.useInputToRestoreState=!0,p._viewMatrix=new l.a,p.panningAxis=new l.e(1,1,0),p.onMeshTargetChangedObservable=new P.c,p.checkCollisions=!1,p.collisionRadius=new l.e(.5,.5,.5),p._previousPosition=l.e.Zero(),p._collisionVelocity=l.e.Zero(),p._newPosition=l.e.Zero(),p._computationVector=l.e.Zero(),p._onCollisionPositionChange=function(y,C,M){M===void 0&&(M=null),M?(p.setPosition(C),p.onCollide&&p.onCollide(M)):p._previousPosition.copyFrom(p._position);var U=Math.cos(p.alpha),F=Math.sin(p.alpha),z=Math.cos(p.beta),J=Math.sin(p.beta);J===0&&(J=1e-4);var ie=p._getTargetPosition();p._computationVector.copyFromFloats(p.radius*U*J,p.radius*z,p.radius*F*J),ie.addToRef(p._computationVector,p._newPosition),p._position.copyFrom(p._newPosition);var se=p.upVector;p.allowUpsideDown&&p.beta<0&&(se=(se=se.clone()).negate()),p._computeViewMatrix(p._position,ie,se),p._viewMatrix.addAtIndex(12,p.targetScreenOffset.x),p._viewMatrix.addAtIndex(13,p.targetScreenOffset.y),p._collisionTriggered=!1},p._target=l.e.Zero(),a&&p.setTarget(a),p.alpha=n,p.beta=i,p.radius=o,p.getViewMatrix(),p.inputs=new ko(p),p.inputs.addKeyboard().addMouseWheel().addPointers(),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(e){this.setTarget(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this.setPosition(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"upVector",{get:function(){return this._upVector},set:function(e){this._upToYMatrix||(this._YToUpMatrix=new l.a,this._upToYMatrix=new l.a,this._upVector=l.e.Zero()),e.normalize(),this._upVector.copyFrom(e),this.setMatUp()},enumerable:!1,configurable:!0}),t.prototype.setMatUp=function(){l.a.RotationAlignToRef(l.e.UpReadOnly,this._upVector,this._YToUpMatrix),l.a.RotationAlignToRef(this._upVector,l.e.UpReadOnly,this._upToYMatrix)},Object.defineProperty(t.prototype,"angularSensibilityX",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityX:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.angularSensibilityX=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"angularSensibilityY",{get:function(){var e=this.inputs.attached.pointers;return e?e.angularSensibilityY:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.angularSensibilityY=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pinchPrecision",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchPrecision:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.pinchPrecision=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pinchDeltaPercentage",{get:function(){var e=this.inputs.attached.pointers;return e?e.pinchDeltaPercentage:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.pinchDeltaPercentage=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useNaturalPinchZoom",{get:function(){var e=this.inputs.attached.pointers;return!!e&&e.useNaturalPinchZoom},set:function(e){var n=this.inputs.attached.pointers;n&&(n.useNaturalPinchZoom=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"panningSensibility",{get:function(){var e=this.inputs.attached.pointers;return e?e.panningSensibility:0},set:function(e){var n=this.inputs.attached.pointers;n&&(n.panningSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysRight=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wheelPrecision",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelPrecision:0},set:function(e){var n=this.inputs.attached.mousewheel;n&&(n.wheelPrecision=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wheelDeltaPercentage",{get:function(){var e=this.inputs.attached.mousewheel;return e?e.wheelDeltaPercentage:0},set:function(e){var n=this.inputs.attached.mousewheel;n&&(n.wheelDeltaPercentage=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bouncingBehavior",{get:function(){return this._bouncingBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useBouncingBehavior",{get:function(){return this._bouncingBehavior!=null},set:function(e){e!==this.useBouncingBehavior&&(e?(this._bouncingBehavior=new ml,this.addBehavior(this._bouncingBehavior)):this._bouncingBehavior&&(this.removeBehavior(this._bouncingBehavior),this._bouncingBehavior=null))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"framingBehavior",{get:function(){return this._framingBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useFramingBehavior",{get:function(){return this._framingBehavior!=null},set:function(e){e!==this.useFramingBehavior&&(e?(this._framingBehavior=new gl,this.addBehavior(this._framingBehavior)):this._framingBehavior&&(this.removeBehavior(this._framingBehavior),this._framingBehavior=null))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoRotationBehavior",{get:function(){return this._autoRotationBehavior},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useAutoRotationBehavior",{get:function(){return this._autoRotationBehavior!=null},set:function(e){e!==this.useAutoRotationBehavior&&(e?(this._autoRotationBehavior=new _l,this.addBehavior(this._autoRotationBehavior)):this._autoRotationBehavior&&(this.removeBehavior(this._autoRotationBehavior),this._autoRotationBehavior=null))},enumerable:!1,configurable:!0}),t.prototype._initCache=function(){r.prototype._initCache.call(this),this._cache._target=new l.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.alpha=void 0,this._cache.beta=void 0,this._cache.radius=void 0,this._cache.targetScreenOffset=l.d.Zero()},t.prototype._updateCache=function(e){e||r.prototype._updateCache.call(this),this._cache._target.copyFrom(this._getTargetPosition()),this._cache.alpha=this.alpha,this._cache.beta=this.beta,this._cache.radius=this.radius,this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset)},t.prototype._getTargetPosition=function(){if(this._targetHost&&this._targetHost.getAbsolutePosition){var e=this._targetHost.absolutePosition;this._targetBoundingCenter?e.addToRef(this._targetBoundingCenter,this._target):this._target.copyFrom(e)}var n=this._getLockedTargetPosition();return n||this._target},t.prototype.storeState=function(){return this._storedAlpha=this.alpha,this._storedBeta=this.beta,this._storedRadius=this.radius,this._storedTarget=this._getTargetPosition().clone(),this._storedTargetScreenOffset=this.targetScreenOffset.clone(),r.prototype.storeState.call(this)},t.prototype._restoreStateValues=function(){return!!r.prototype._restoreStateValues.call(this)&&(this.setTarget(this._storedTarget.clone()),this.alpha=this._storedAlpha,this.beta=this._storedBeta,this.radius=this._storedRadius,this.targetScreenOffset=this._storedTargetScreenOffset.clone(),this.inertialAlphaOffset=0,this.inertialBetaOffset=0,this.inertialRadiusOffset=0,this.inertialPanningX=0,this.inertialPanningY=0,!0)},t.prototype._isSynchronizedViewMatrix=function(){return!!r.prototype._isSynchronizedViewMatrix.call(this)&&this._cache._target.equals(this._getTargetPosition())&&this._cache.alpha===this.alpha&&this._cache.beta===this.beta&&this._cache.radius===this.radius&&this._cache.targetScreenOffset.equals(this.targetScreenOffset)},t.prototype.attachControl=function(e,n,i,o){var a=this;i===void 0&&(i=!0),o===void 0&&(o=2),n=Ye.b.BackCompatCameraNoPreventDefault(arguments),this._useCtrlForPanning=i,this._panningMouseButton=o,typeof arguments[0]=="boolean"&&(arguments.length>1&&(this._useCtrlForPanning=arguments[1]),arguments.length>2&&(this._panningMouseButton=arguments[2])),this.inputs.attachElement(n),this._reset=function(){a.inertialAlphaOffset=0,a.inertialBetaOffset=0,a.inertialRadiusOffset=0,a.inertialPanningX=0,a.inertialPanningY=0}},t.prototype.detachControl=function(e){this.inputs.detachElement(),this._reset&&this._reset()},t.prototype._checkInputs=function(){if(!this._collisionTriggered){if(this.inputs.checkInputs(),this.inertialAlphaOffset!==0||this.inertialBetaOffset!==0||this.inertialRadiusOffset!==0){var e=this.inertialAlphaOffset;this.beta<=0&&(e*=-1),this.getScene().useRightHandedSystem&&(e*=-1),this.parent&&this.parent._getWorldMatrixDeterminant()<0&&(e*=-1),this.alpha+=e,this.beta+=this.inertialBetaOffset,this.radius-=this.inertialRadiusOffset,this.inertialAlphaOffset*=this.inertia,this.inertialBetaOffset*=this.inertia,this.inertialRadiusOffset*=this.inertia,Math.abs(this.inertialAlphaOffset)Math.PI&&(this.beta=this.beta-2*Math.PI):this.betathis.upperBetaLimit&&(this.beta=this.upperBetaLimit),this.lowerAlphaLimit!==null&&this.alphathis.upperAlphaLimit&&(this.alpha=this.upperAlphaLimit),this.lowerRadiusLimit!==null&&this.radiusthis.upperRadiusLimit&&(this.radius=this.upperRadiusLimit,this.inertialRadiusOffset=0)},t.prototype.rebuildAnglesAndRadius=function(){this._position.subtractToRef(this._getTargetPosition(),this._computationVector),this._upVector.x===0&&this._upVector.y===1&&this._upVector.z===0||l.e.TransformCoordinatesToRef(this._computationVector,this._upToYMatrix,this._computationVector),this.radius=this._computationVector.length(),this.radius===0&&(this.radius=1e-4);var e=this.alpha;this._computationVector.x===0&&this._computationVector.z===0?this.alpha=Math.PI/2:this.alpha=Math.acos(this._computationVector.x/Math.sqrt(Math.pow(this._computationVector.x,2)+Math.pow(this._computationVector.z,2))),this._computationVector.z<0&&(this.alpha=2*Math.PI-this.alpha);var n=Math.round((e-this.alpha)/(2*Math.PI));this.alpha+=2*n*Math.PI,this.beta=Math.acos(this._computationVector.y/this.radius),this._checkLimits()},t.prototype.setPosition=function(e){this._position.equals(e)||(this._position.copyFrom(e),this.rebuildAnglesAndRadius())},t.prototype.setTarget=function(e,n,i){if(n===void 0&&(n=!1),i===void 0&&(i=!1),e.getBoundingInfo)this._targetBoundingCenter=n?e.getBoundingInfo().boundingBox.centerWorld.clone():null,e.computeWorldMatrix(),this._targetHost=e,this._target=this._getTargetPosition(),this.onMeshTargetChangedObservable.notifyObservers(this._targetHost);else{var o=e,a=this._getTargetPosition();if(a&&!i&&a.equals(o))return;this._targetHost=null,this._target=o,this._targetBoundingCenter=null,this.onMeshTargetChangedObservable.notifyObservers(null)}this.rebuildAnglesAndRadius()},t.prototype._getViewMatrix=function(){var e=Math.cos(this.alpha),n=Math.sin(this.alpha),i=Math.cos(this.beta),o=Math.sin(this.beta);o===0&&(o=1e-4),this.radius===0&&(this.radius=1e-4);var a=this._getTargetPosition();if(this._computationVector.copyFromFloats(this.radius*e*o,this.radius*i,this.radius*n*o),this._upVector.x===0&&this._upVector.y===1&&this._upVector.z===0||l.e.TransformCoordinatesToRef(this._computationVector,this._YToUpMatrix,this._computationVector),a.addToRef(this._computationVector,this._newPosition),this.getScene().collisionsEnabled&&this.checkCollisions){var s=this.getScene().collisionCoordinator;this._collider||(this._collider=s.createCollider()),this._collider._radius=this.collisionRadius,this._newPosition.subtractToRef(this._position,this._collisionVelocity),this._collisionTriggered=!0,s.getNewPosition(this._position,this._collisionVelocity,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)}else{this._position.copyFrom(this._newPosition);var d=this.upVector;this.allowUpsideDown&&o<0&&(d=d.negate()),this._computeViewMatrix(this._position,a,d),this._viewMatrix.addAtIndex(12,this.targetScreenOffset.x),this._viewMatrix.addAtIndex(13,this.targetScreenOffset.y)}return this._currentTarget=a,this._viewMatrix},t.prototype.zoomOn=function(e,n){n===void 0&&(n=!1),e=e||this.getScene().meshes;var i=De.a.MinMax(e),o=l.e.Distance(i.min,i.max);this.radius=o*this.zoomOnFactor,this.focusOn({min:i.min,max:i.max,distance:o},n)},t.prototype.focusOn=function(e,n){var i,o;if(n===void 0&&(n=!1),e.min===void 0){var a=e||this.getScene().meshes;i=De.a.MinMax(a),o=l.e.Distance(i.min,i.max)}else i=e,o=e.distance;this._target=De.a.Center(i),n||(this.maxZ=2*o)},t.prototype.createRigCamera=function(e,n){var i=0;switch(this.cameraRigMode){case gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER:case gt.a.RIG_MODE_STEREOSCOPIC_INTERLACED:case gt.a.RIG_MODE_VR:i=this._cameraRigParams.stereoHalfAngle*(n===0?1:-1);break;case gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:i=this._cameraRigParams.stereoHalfAngle*(n===0?-1:1)}var o=new t(e,this.alpha+i,this.beta,this.radius,this._target,this.getScene());return o._cameraRigParams={},o.isRigCamera=!0,o.rigParent=this,o.upVector=this.upVector,o},t.prototype._updateRigCameras=function(){var e=this._rigCameras[0],n=this._rigCameras[1];switch(e.beta=n.beta=this.beta,this.cameraRigMode){case gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER:case gt.a.RIG_MODE_STEREOSCOPIC_INTERLACED:case gt.a.RIG_MODE_VR:e.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle,n.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle;break;case gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:e.alpha=this.alpha+this._cameraRigParams.stereoHalfAngle,n.alpha=this.alpha-this._cameraRigParams.stereoHalfAngle}r.prototype._updateRigCameras.call(this)},t.prototype.dispose=function(){this.inputs.clear(),r.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"ArcRotateCamera"},Object(c.c)([Object(L.c)()],t.prototype,"alpha",void 0),Object(c.c)([Object(L.c)()],t.prototype,"beta",void 0),Object(c.c)([Object(L.c)()],t.prototype,"radius",void 0),Object(c.c)([Object(L.o)("target")],t.prototype,"_target",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialAlphaOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialBetaOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialRadiusOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerAlphaLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperAlphaLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerBetaLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperBetaLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerRadiusLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperRadiusLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialPanningX",void 0),Object(c.c)([Object(L.c)()],t.prototype,"inertialPanningY",void 0),Object(c.c)([Object(L.c)()],t.prototype,"pinchToPanMaxDistance",void 0),Object(c.c)([Object(L.c)()],t.prototype,"panningDistanceLimit",void 0),Object(c.c)([Object(L.o)()],t.prototype,"panningOriginTarget",void 0),Object(c.c)([Object(L.c)()],t.prototype,"panningInertia",void 0),Object(c.c)([Object(L.c)()],t.prototype,"zoomOnFactor",void 0),Object(c.c)([Object(L.c)()],t.prototype,"targetScreenOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"allowUpsideDown",void 0),Object(c.c)([Object(L.c)()],t.prototype,"useInputToRestoreState",void 0),t}(Ni);Q.a.AddNodeConstructor("DeviceOrientationCamera",function(r,t){return function(){return new Go(r,l.e.Zero(),t)}});var Go=function(r){function t(e,n,i){var o=r.call(this,e,n,i)||this;return o._tmpDragQuaternion=new l.b,o._disablePointerInputWhenUsingDeviceOrientation=!0,o._dragFactor=0,o._quaternionCache=new l.b,o.inputs.addDeviceOrientation(),o.inputs._deviceOrientationInput&&o.inputs._deviceOrientationInput._onDeviceOrientationChangedObservable.addOnce(function(){o._disablePointerInputWhenUsingDeviceOrientation&&o.inputs._mouseInput&&(o.inputs._mouseInput._allowCameraRotation=!1,o.inputs._mouseInput.onPointerMovedObservable.add(function(a){o._dragFactor!=0&&(o._initialQuaternion||(o._initialQuaternion=new l.b),l.b.FromEulerAnglesToRef(0,a.offsetX*o._dragFactor,0,o._tmpDragQuaternion),o._initialQuaternion.multiplyToRef(o._tmpDragQuaternion,o._initialQuaternion))}))}),o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"disablePointerInputWhenUsingDeviceOrientation",{get:function(){return this._disablePointerInputWhenUsingDeviceOrientation},set:function(e){this._disablePointerInputWhenUsingDeviceOrientation=e},enumerable:!1,configurable:!0}),t.prototype.enableHorizontalDragging=function(e){e===void 0&&(e=1/300),this._dragFactor=e},t.prototype.getClassName=function(){return"DeviceOrientationCamera"},t.prototype._checkInputs=function(){r.prototype._checkInputs.call(this),this._quaternionCache.copyFrom(this.rotationQuaternion),this._initialQuaternion&&this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion)},t.prototype.resetToCurrentRotation=function(e){var n=this;e===void 0&&(e=ye.a.Y),this.rotationQuaternion&&(this._initialQuaternion||(this._initialQuaternion=new l.b),this._initialQuaternion.copyFrom(this._quaternionCache||this.rotationQuaternion),["x","y","z"].forEach(function(i){e[i]?n._initialQuaternion[i]*=-1:n._initialQuaternion[i]=0}),this._initialQuaternion.normalize(),this._initialQuaternion.multiplyToRef(this.rotationQuaternion,this.rotationQuaternion))},t}(Yn),Pl=function(r){function t(e){return r.call(this,e)||this}return Object(c.d)(t,r),t.prototype.addKeyboard=function(){return this.add(new ns),this},t.prototype.addMouse=function(e){return e===void 0&&(e=!0),this.add(new is(e)),this},t}(eo),Yf=function(r){function t(e,n,i,o){o===void 0&&(o=!0);var a=r.call(this,e,n,i,o)||this;return a.ellipsoid=new l.e(1,1,1),a.ellipsoidOffset=new l.e(0,0,0),a.checkCollisions=!1,a.applyGravity=!1,a.cameraDirection=l.e.Zero(),a._trackRoll=0,a.rollCorrect=100,a.bankedTurn=!1,a.bankedTurnLimit=Math.PI/2,a.bankedTurnMultiplier=1,a._needMoveForGravity=!1,a._oldPosition=l.e.Zero(),a._diffPosition=l.e.Zero(),a._newPosition=l.e.Zero(),a._collisionMask=-1,a._onCollisionPositionChange=function(s,d,p){p===void 0&&(p=null);var y;y=d,a._newPosition.copyFrom(y),a._newPosition.subtractToRef(a._oldPosition,a._diffPosition),a._diffPosition.length()>Ve.a.CollisionsEpsilon&&(a.position.addInPlace(a._diffPosition),a.onCollide&&p&&a.onCollide(p))},a.inputs=new Pl(a),a.inputs.addKeyboard().addMouse(),a}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"angularSensibility",{get:function(){var e=this.inputs.attached.mouse;return e?e.angularSensibility:0},set:function(e){var n=this.inputs.attached.mouse;n&&(n.angularSensibility=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysForward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysForward:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysForward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysBackward",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysBackward:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysBackward=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysUp",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysUp:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysUp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysDown",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysDown:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysDown=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysLeft",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysLeft:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysLeft=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"keysRight",{get:function(){var e=this.inputs.attached.keyboard;return e?e.keysRight:[]},set:function(e){var n=this.inputs.attached.keyboard;n&&(n.keysRight=e)},enumerable:!1,configurable:!0}),t.prototype.attachControl=function(e,n){n=Ye.b.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(n)},t.prototype.detachControl=function(){this.inputs.detachElement(),this.cameraDirection=new l.e(0,0,0)},Object.defineProperty(t.prototype,"collisionMask",{get:function(){return this._collisionMask},set:function(e){this._collisionMask=isNaN(e)?-1:e},enumerable:!1,configurable:!0}),t.prototype._collideWithWorld=function(e){(this.parent?l.e.TransformCoordinates(this.position,this.parent.getWorldMatrix()):this.position).subtractFromFloatsToRef(0,this.ellipsoid.y,0,this._oldPosition),this._oldPosition.addInPlace(this.ellipsoidOffset);var n=this.getScene().collisionCoordinator;this._collider||(this._collider=n.createCollider()),this._collider._radius=this.ellipsoid,this._collider.collisionMask=this._collisionMask;var i=e;this.applyGravity&&(i=e.add(this.getScene().gravity)),n.getNewPosition(this._oldPosition,i,this._collider,3,null,this._onCollisionPositionChange,this.uniqueId)},t.prototype._checkInputs=function(){this._localDirection||(this._localDirection=l.e.Zero(),this._transformedDirection=l.e.Zero()),this.inputs.checkInputs(),r.prototype._checkInputs.call(this)},t.prototype._decideIfNeedsToMove=function(){return this._needMoveForGravity||Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0},t.prototype._updatePosition=function(){this.checkCollisions&&this.getScene().collisionsEnabled?this._collideWithWorld(this.cameraDirection):r.prototype._updatePosition.call(this)},t.prototype.restoreRoll=function(e){var n=this._trackRoll,i=n-this.rotation.z;Math.abs(i)>=.001&&(this.rotation.z+=i/e,Math.abs(n-this.rotation.z)<=.001&&(this.rotation.z=n))},t.prototype.dispose=function(){this.inputs.clear(),r.prototype.dispose.call(this)},t.prototype.getClassName=function(){return"FlyCamera"},Object(c.c)([Object(L.o)()],t.prototype,"ellipsoid",void 0),Object(c.c)([Object(L.o)()],t.prototype,"ellipsoidOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"checkCollisions",void 0),Object(c.c)([Object(L.c)()],t.prototype,"applyGravity",void 0),t}(Ni),Cl=function(r){function t(e){return r.call(this,e)||this}return Object(c.d)(t,r),t.prototype.addKeyboard=function(){return this.add(new rs),this},t.prototype.addMouseWheel=function(){return this.add(new os),this},t.prototype.addPointers=function(){return this.add(new as),this},t.prototype.addVRDeviceOrientation=function(){return console.warn("DeviceOrientation support not yet implemented for FollowCamera."),this},t}(eo);Q.a.AddNodeConstructor("FollowCamera",function(r,t){return function(){return new xl(r,l.e.Zero(),t)}}),Q.a.AddNodeConstructor("ArcFollowCamera",function(r,t){return function(){return new Rl(r,0,0,1,null,t)}});var ri,xl=function(r){function t(e,n,i,o){o===void 0&&(o=null);var a=r.call(this,e,n,i)||this;return a.radius=12,a.lowerRadiusLimit=null,a.upperRadiusLimit=null,a.rotationOffset=0,a.lowerRotationOffsetLimit=null,a.upperRotationOffsetLimit=null,a.heightOffset=4,a.lowerHeightOffsetLimit=null,a.upperHeightOffsetLimit=null,a.cameraAcceleration=.05,a.maxCameraSpeed=20,a.lockedTarget=o,a.inputs=new Cl(a),a.inputs.addKeyboard().addMouseWheel().addPointers(),a}return Object(c.d)(t,r),t.prototype._follow=function(e){if(e){var n;if(e.rotationQuaternion){var i=new l.a;e.rotationQuaternion.toRotationMatrix(i),n=Math.atan2(i.m[8],i.m[10])}else n=e.rotation.y;var o=Ye.b.ToRadians(this.rotationOffset)+n,a=e.getAbsolutePosition(),s=a.x+Math.sin(o)*this.radius,d=a.z+Math.cos(o)*this.radius,p=s-this.position.x,y=a.y+this.heightOffset-this.position.y,C=d-this.position.z,M=p*this.cameraAcceleration*2,U=y*this.cameraAcceleration,F=C*this.cameraAcceleration*2;(M>this.maxCameraSpeed||M<-this.maxCameraSpeed)&&(M=M<1?-this.maxCameraSpeed:this.maxCameraSpeed),(U>this.maxCameraSpeed||U<-this.maxCameraSpeed)&&(U=U<1?-this.maxCameraSpeed:this.maxCameraSpeed),(F>this.maxCameraSpeed||F<-this.maxCameraSpeed)&&(F=F<1?-this.maxCameraSpeed:this.maxCameraSpeed),this.position=new l.e(this.position.x+M,this.position.y+U,this.position.z+F),this.setTarget(a)}},t.prototype.attachControl=function(e,n){n=Ye.b.BackCompatCameraNoPreventDefault(arguments),this.inputs.attachElement(n),this._reset=function(){}},t.prototype.detachControl=function(e){this.inputs.detachElement(),this._reset&&this._reset()},t.prototype._checkInputs=function(){this.inputs.checkInputs(),this._checkLimits(),r.prototype._checkInputs.call(this),this.lockedTarget&&this._follow(this.lockedTarget)},t.prototype._checkLimits=function(){this.lowerRadiusLimit!==null&&this.radiusthis.upperRadiusLimit&&(this.radius=this.upperRadiusLimit),this.lowerHeightOffsetLimit!==null&&this.heightOffsetthis.upperHeightOffsetLimit&&(this.heightOffset=this.upperHeightOffsetLimit),this.lowerRotationOffsetLimit!==null&&this.rotationOffsetthis.upperRotationOffsetLimit&&(this.rotationOffset=this.upperRotationOffsetLimit)},t.prototype.getClassName=function(){return"FollowCamera"},Object(c.c)([Object(L.c)()],t.prototype,"radius",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerRadiusLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperRadiusLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"rotationOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerRotationOffsetLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperRotationOffsetLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"heightOffset",void 0),Object(c.c)([Object(L.c)()],t.prototype,"lowerHeightOffsetLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"upperHeightOffsetLimit",void 0),Object(c.c)([Object(L.c)()],t.prototype,"cameraAcceleration",void 0),Object(c.c)([Object(L.c)()],t.prototype,"maxCameraSpeed",void 0),Object(c.c)([Object(L.k)("lockedTargetId")],t.prototype,"lockedTarget",void 0),t}(Ni),Rl=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,l.e.Zero(),s)||this;return d.alpha=n,d.beta=i,d.radius=o,d._cartesianCoordinates=l.e.Zero(),d._meshTarget=a,d._follow(),d}return Object(c.d)(t,r),t.prototype._follow=function(){if(this._meshTarget){this._cartesianCoordinates.x=this.radius*Math.cos(this.alpha)*Math.cos(this.beta),this._cartesianCoordinates.y=this.radius*Math.sin(this.beta),this._cartesianCoordinates.z=this.radius*Math.sin(this.alpha)*Math.cos(this.beta);var e=this._meshTarget.getAbsolutePosition();this.position=e.add(this._cartesianCoordinates),this.setTarget(e)}},t.prototype._checkInputs=function(){r.prototype._checkInputs.call(this),this._follow()},t.prototype.getClassName=function(){return"ArcFollowCamera"},t}(Ni),ms=f(38),pn=f(39);(function(r){r[r.VIVE=0]="VIVE",r[r.OCULUS=1]="OCULUS",r[r.WINDOWS=2]="WINDOWS",r[r.GEAR_VR=3]="GEAR_VR",r[r.DAYDREAM=4]="DAYDREAM",r[r.GENERIC=5]="GENERIC"})(ri||(ri={}));var In,$i,wi=function(){function r(){}return r.InitiateController=function(t){for(var e=0,n=this._ControllerFactories;ethis._maxRotationDistFromHeadset){var o=i-(i<0?-this._maxRotationDistFromHeadset:this._maxRotationDistFromHeadset);this._draggedRoomRotation+=o;var a=Math.sin(-o),s=Math.cos(-o);this._calculatedPosition.x=this._calculatedPosition.x*s-this._calculatedPosition.z*a,this._calculatedPosition.z=this._calculatedPosition.x*a+this._calculatedPosition.z*s}}l.e.TransformCoordinatesToRef(this._calculatedPosition,this._deviceToWorld,this.devicePosition),this._deviceToWorld.getRotationMatrixToRef(this._workingMatrix),l.b.FromRotationMatrixToRef(this._workingMatrix,this.deviceRotationQuaternion),this.deviceRotationQuaternion.multiplyInPlace(this._calculatedRotation),this._mesh&&(this._mesh.position.copyFrom(this.devicePosition),this._mesh.rotationQuaternion&&this._mesh.rotationQuaternion.copyFrom(this.deviceRotationQuaternion))}},t.prototype.updateFromDevice=function(e){if(!this.isXR&&e){this.rawPose=e,e.position&&(this._deviceRoomPosition.copyFromFloats(e.position[0],e.position[1],-e.position[2]),this._mesh&&this._mesh.getScene().useRightHandedSystem&&(this._deviceRoomPosition.z*=-1),this._trackPosition&&this._deviceRoomPosition.scaleToRef(this.deviceScaleFactor,this._calculatedPosition),this._calculatedPosition.addInPlace(this.position));var n=this.rawPose;e.orientation&&n.orientation&&n.orientation.length===4&&(this._deviceRoomRotationQuaternion.copyFromFloats(n.orientation[0],n.orientation[1],-n.orientation[2],-n.orientation[3]),this._mesh&&(this._mesh.getScene().useRightHandedSystem?(this._deviceRoomRotationQuaternion.z*=-1,this._deviceRoomRotationQuaternion.w*=-1):this._deviceRoomRotationQuaternion.multiplyToRef(this._leftHandSystemQuaternion,this._deviceRoomRotationQuaternion)),this._deviceRoomRotationQuaternion.multiplyToRef(this.rotationQuaternion,this._calculatedRotation))}},t.prototype.attachToMesh=function(e){if(this._mesh&&(this._mesh.parent=null),this._mesh=e,this._poseControlledCamera&&(this._mesh.parent=this._poseControlledCamera),this._mesh.rotationQuaternion||(this._mesh.rotationQuaternion=new l.b),!this.isXR&&(this._updatePoseAndMesh(),this._pointingPoseNode)){for(var n=[],i=this._pointingPoseNode;i.parent;)n.push(i.parent),i=i.parent;n.reverse().forEach(function(o){o.computeWorldMatrix(!0)})}this._meshAttachedObservable.notifyObservers(e)},t.prototype.attachToPoseControlledCamera=function(e){this._poseControlledCamera=e,this._mesh&&(this._mesh.parent=this._poseControlledCamera)},t.prototype.dispose=function(){this._mesh&&this._mesh.dispose(),this._mesh=null,r.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"mesh",{get:function(){return this._mesh},enumerable:!1,configurable:!0}),t.prototype.getForwardRay=function(e){if(e===void 0&&(e=100),!this.mesh)return new pn.a(l.e.Zero(),new l.e(0,0,1),e);var n=this._pointingPoseNode?this._pointingPoseNode.getWorldMatrix():this.mesh.getWorldMatrix(),i=n.getTranslation(),o=new l.e(0,0,-1),a=l.e.TransformNormal(o,n),s=l.e.Normalize(a);return new pn.a(i,s,e)},t.POINTING_POSE="POINTING_POSE",t}(fn);(function(r){r[r.A=0]="A",r[r.B=1]="B",r[r.X=2]="X",r[r.Y=3]="Y",r[r.LB=4]="LB",r[r.RB=5]="RB",r[r.Back=8]="Back",r[r.Start=9]="Start",r[r.LeftStick=10]="LeftStick",r[r.RightStick=11]="RightStick"})(In||(In={})),function(r){r[r.Up=12]="Up",r[r.Down=13]="Down",r[r.Left=14]="Left",r[r.Right=15]="Right"}($i||($i={}));var Hn,er,Ol=function(r){function t(e,n,i,o){o===void 0&&(o=!1);var a=r.call(this,e,n,i,0,1,2,3)||this;return a._leftTrigger=0,a._rightTrigger=0,a.onButtonDownObservable=new P.c,a.onButtonUpObservable=new P.c,a.onPadDownObservable=new P.c,a.onPadUpObservable=new P.c,a._buttonA=0,a._buttonB=0,a._buttonX=0,a._buttonY=0,a._buttonBack=0,a._buttonStart=0,a._buttonLB=0,a._buttonRB=0,a._buttonLeftStick=0,a._buttonRightStick=0,a._dPadUp=0,a._dPadDown=0,a._dPadLeft=0,a._dPadRight=0,a._isXboxOnePad=!1,a.type=fn.XBOX,a._isXboxOnePad=o,a}return Object(c.d)(t,r),t.prototype.onlefttriggerchanged=function(e){this._onlefttriggerchanged=e},t.prototype.onrighttriggerchanged=function(e){this._onrighttriggerchanged=e},Object.defineProperty(t.prototype,"leftTrigger",{get:function(){return this._leftTrigger},set:function(e){this._onlefttriggerchanged&&this._leftTrigger!==e&&this._onlefttriggerchanged(e),this._leftTrigger=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightTrigger",{get:function(){return this._rightTrigger},set:function(e){this._onrighttriggerchanged&&this._rightTrigger!==e&&this._onrighttriggerchanged(e),this._rightTrigger=e},enumerable:!1,configurable:!0}),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype.ondpaddown=function(e){this._ondpaddown=e},t.prototype.ondpadup=function(e){this._ondpadup=e},t.prototype._setButtonValue=function(e,n,i){return e!==n&&(e===1&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),e===0&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},t.prototype._setDPadValue=function(e,n,i){return e!==n&&(e===1&&(this._ondpaddown&&this._ondpaddown(i),this.onPadDownObservable.notifyObservers(i)),e===0&&(this._ondpadup&&this._ondpadup(i),this.onPadUpObservable.notifyObservers(i))),e},Object.defineProperty(t.prototype,"buttonA",{get:function(){return this._buttonA},set:function(e){this._buttonA=this._setButtonValue(e,this._buttonA,In.A)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonB",{get:function(){return this._buttonB},set:function(e){this._buttonB=this._setButtonValue(e,this._buttonB,In.B)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonX",{get:function(){return this._buttonX},set:function(e){this._buttonX=this._setButtonValue(e,this._buttonX,In.X)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonY",{get:function(){return this._buttonY},set:function(e){this._buttonY=this._setButtonValue(e,this._buttonY,In.Y)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonStart",{get:function(){return this._buttonStart},set:function(e){this._buttonStart=this._setButtonValue(e,this._buttonStart,In.Start)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonBack",{get:function(){return this._buttonBack},set:function(e){this._buttonBack=this._setButtonValue(e,this._buttonBack,In.Back)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLB",{get:function(){return this._buttonLB},set:function(e){this._buttonLB=this._setButtonValue(e,this._buttonLB,In.LB)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRB",{get:function(){return this._buttonRB},set:function(e){this._buttonRB=this._setButtonValue(e,this._buttonRB,In.RB)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLeftStick",{get:function(){return this._buttonLeftStick},set:function(e){this._buttonLeftStick=this._setButtonValue(e,this._buttonLeftStick,In.LeftStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRightStick",{get:function(){return this._buttonRightStick},set:function(e){this._buttonRightStick=this._setButtonValue(e,this._buttonRightStick,In.RightStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadUp",{get:function(){return this._dPadUp},set:function(e){this._dPadUp=this._setDPadValue(e,this._dPadUp,$i.Up)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadDown",{get:function(){return this._dPadDown},set:function(e){this._dPadDown=this._setDPadValue(e,this._dPadDown,$i.Down)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadLeft",{get:function(){return this._dPadLeft},set:function(e){this._dPadLeft=this._setDPadValue(e,this._dPadLeft,$i.Left)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadRight",{get:function(){return this._dPadRight},set:function(e){this._dPadRight=this._setDPadValue(e,this._dPadRight,$i.Right)},enumerable:!1,configurable:!0}),t.prototype.update=function(){r.prototype.update.call(this),this._isXboxOnePad,this.buttonA=this.browserGamepad.buttons[0].value,this.buttonB=this.browserGamepad.buttons[1].value,this.buttonX=this.browserGamepad.buttons[2].value,this.buttonY=this.browserGamepad.buttons[3].value,this.buttonLB=this.browserGamepad.buttons[4].value,this.buttonRB=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.buttons[6].value,this.rightTrigger=this.browserGamepad.buttons[7].value,this.buttonBack=this.browserGamepad.buttons[8].value,this.buttonStart=this.browserGamepad.buttons[9].value,this.buttonLeftStick=this.browserGamepad.buttons[10].value,this.buttonRightStick=this.browserGamepad.buttons[11].value,this.dPadUp=this.browserGamepad.buttons[12].value,this.dPadDown=this.browserGamepad.buttons[13].value,this.dPadLeft=this.browserGamepad.buttons[14].value,this.dPadRight=this.browserGamepad.buttons[15].value},t.prototype.dispose=function(){r.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear(),this.onPadDownObservable.clear(),this.onPadUpObservable.clear()},t}(fn);(function(r){r[r.Cross=0]="Cross",r[r.Circle=1]="Circle",r[r.Square=2]="Square",r[r.Triangle=3]="Triangle",r[r.L1=4]="L1",r[r.R1=5]="R1",r[r.Share=8]="Share",r[r.Options=9]="Options",r[r.LeftStick=10]="LeftStick",r[r.RightStick=11]="RightStick"})(Hn||(Hn={})),function(r){r[r.Up=12]="Up",r[r.Down=13]="Down",r[r.Left=14]="Left",r[r.Right=15]="Right"}(er||(er={}));var Ml=function(r){function t(e,n,i){var o=r.call(this,e.replace("STANDARD GAMEPAD","SONY PLAYSTATION DUALSHOCK"),n,i,0,1,2,3)||this;return o._leftTrigger=0,o._rightTrigger=0,o.onButtonDownObservable=new P.c,o.onButtonUpObservable=new P.c,o.onPadDownObservable=new P.c,o.onPadUpObservable=new P.c,o._buttonCross=0,o._buttonCircle=0,o._buttonSquare=0,o._buttonTriangle=0,o._buttonShare=0,o._buttonOptions=0,o._buttonL1=0,o._buttonR1=0,o._buttonLeftStick=0,o._buttonRightStick=0,o._dPadUp=0,o._dPadDown=0,o._dPadLeft=0,o._dPadRight=0,o.type=fn.DUALSHOCK,o}return Object(c.d)(t,r),t.prototype.onlefttriggerchanged=function(e){this._onlefttriggerchanged=e},t.prototype.onrighttriggerchanged=function(e){this._onrighttriggerchanged=e},Object.defineProperty(t.prototype,"leftTrigger",{get:function(){return this._leftTrigger},set:function(e){this._onlefttriggerchanged&&this._leftTrigger!==e&&this._onlefttriggerchanged(e),this._leftTrigger=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightTrigger",{get:function(){return this._rightTrigger},set:function(e){this._onrighttriggerchanged&&this._rightTrigger!==e&&this._onrighttriggerchanged(e),this._rightTrigger=e},enumerable:!1,configurable:!0}),t.prototype.onbuttondown=function(e){this._onbuttondown=e},t.prototype.onbuttonup=function(e){this._onbuttonup=e},t.prototype.ondpaddown=function(e){this._ondpaddown=e},t.prototype.ondpadup=function(e){this._ondpadup=e},t.prototype._setButtonValue=function(e,n,i){return e!==n&&(e===1&&(this._onbuttondown&&this._onbuttondown(i),this.onButtonDownObservable.notifyObservers(i)),e===0&&(this._onbuttonup&&this._onbuttonup(i),this.onButtonUpObservable.notifyObservers(i))),e},t.prototype._setDPadValue=function(e,n,i){return e!==n&&(e===1&&(this._ondpaddown&&this._ondpaddown(i),this.onPadDownObservable.notifyObservers(i)),e===0&&(this._ondpadup&&this._ondpadup(i),this.onPadUpObservable.notifyObservers(i))),e},Object.defineProperty(t.prototype,"buttonCross",{get:function(){return this._buttonCross},set:function(e){this._buttonCross=this._setButtonValue(e,this._buttonCross,Hn.Cross)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonCircle",{get:function(){return this._buttonCircle},set:function(e){this._buttonCircle=this._setButtonValue(e,this._buttonCircle,Hn.Circle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonSquare",{get:function(){return this._buttonSquare},set:function(e){this._buttonSquare=this._setButtonValue(e,this._buttonSquare,Hn.Square)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonTriangle",{get:function(){return this._buttonTriangle},set:function(e){this._buttonTriangle=this._setButtonValue(e,this._buttonTriangle,Hn.Triangle)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonOptions",{get:function(){return this._buttonOptions},set:function(e){this._buttonOptions=this._setButtonValue(e,this._buttonOptions,Hn.Options)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonShare",{get:function(){return this._buttonShare},set:function(e){this._buttonShare=this._setButtonValue(e,this._buttonShare,Hn.Share)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonL1",{get:function(){return this._buttonL1},set:function(e){this._buttonL1=this._setButtonValue(e,this._buttonL1,Hn.L1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonR1",{get:function(){return this._buttonR1},set:function(e){this._buttonR1=this._setButtonValue(e,this._buttonR1,Hn.R1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonLeftStick",{get:function(){return this._buttonLeftStick},set:function(e){this._buttonLeftStick=this._setButtonValue(e,this._buttonLeftStick,Hn.LeftStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buttonRightStick",{get:function(){return this._buttonRightStick},set:function(e){this._buttonRightStick=this._setButtonValue(e,this._buttonRightStick,Hn.RightStick)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadUp",{get:function(){return this._dPadUp},set:function(e){this._dPadUp=this._setDPadValue(e,this._dPadUp,er.Up)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadDown",{get:function(){return this._dPadDown},set:function(e){this._dPadDown=this._setDPadValue(e,this._dPadDown,er.Down)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadLeft",{get:function(){return this._dPadLeft},set:function(e){this._dPadLeft=this._setDPadValue(e,this._dPadLeft,er.Left)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dPadRight",{get:function(){return this._dPadRight},set:function(e){this._dPadRight=this._setDPadValue(e,this._dPadRight,er.Right)},enumerable:!1,configurable:!0}),t.prototype.update=function(){r.prototype.update.call(this),this.buttonCross=this.browserGamepad.buttons[0].value,this.buttonCircle=this.browserGamepad.buttons[1].value,this.buttonSquare=this.browserGamepad.buttons[2].value,this.buttonTriangle=this.browserGamepad.buttons[3].value,this.buttonL1=this.browserGamepad.buttons[4].value,this.buttonR1=this.browserGamepad.buttons[5].value,this.leftTrigger=this.browserGamepad.buttons[6].value,this.rightTrigger=this.browserGamepad.buttons[7].value,this.buttonShare=this.browserGamepad.buttons[8].value,this.buttonOptions=this.browserGamepad.buttons[9].value,this.buttonLeftStick=this.browserGamepad.buttons[10].value,this.buttonRightStick=this.browserGamepad.buttons[11].value,this.dPadUp=this.browserGamepad.buttons[12].value,this.dPadDown=this.browserGamepad.buttons[13].value,this.dPadLeft=this.browserGamepad.buttons[14].value,this.dPadRight=this.browserGamepad.buttons[15].value},t.prototype.dispose=function(){r.prototype.dispose.call(this),this.onButtonDownObservable.clear(),this.onButtonUpObservable.clear(),this.onPadDownObservable.clear(),this.onPadUpObservable.clear()},t}(fn),Il=function(){function r(t){var e=this;if(this._scene=t,this._babylonGamepads=[],this._oneGamepadConnected=!1,this._isMonitoring=!1,this.onGamepadDisconnectedObservable=new P.c,ms.a.IsWindowObjectExist()?(this._gamepadEventSupported="GamepadEvent"in window,this._gamepadSupport=navigator.getGamepads||navigator.webkitGetGamepads||navigator.msGetGamepads||navigator.webkitGamepads):this._gamepadEventSupported=!1,this.onGamepadConnectedObservable=new P.c(function(i){for(var o in e._babylonGamepads){var a=e._babylonGamepads[o];a&&a._isConnected&&e.onGamepadConnectedObservable.notifyObserver(i,a)}}),this._onGamepadConnectedEvent=function(i){var o,a=i.gamepad;a.index in e._babylonGamepads&&e._babylonGamepads[a.index].isConnected||(e._babylonGamepads[a.index]?((o=e._babylonGamepads[a.index]).browserGamepad=a,o._isConnected=!0):o=e._addNewGamepad(a),e.onGamepadConnectedObservable.notifyObservers(o),e._startMonitoringGamepads())},this._onGamepadDisconnectedEvent=function(i){var o=i.gamepad;for(var a in e._babylonGamepads)if(e._babylonGamepads[a].index===o.index){var s=e._babylonGamepads[a];s._isConnected=!1,e.onGamepadDisconnectedObservable.notifyObservers(s),s.dispose&&s.dispose();break}},this._gamepadSupport)if(this._updateGamepadObjects(),this._babylonGamepads.length&&this._startMonitoringGamepads(),this._gamepadEventSupported){var n=this._scene?this._scene.getEngine().getHostWindow():window;n&&(n.addEventListener("gamepadconnected",this._onGamepadConnectedEvent,!1),n.addEventListener("gamepaddisconnected",this._onGamepadDisconnectedEvent,!1))}else this._startMonitoringGamepads()}return Object.defineProperty(r.prototype,"gamepads",{get:function(){return this._babylonGamepads},enumerable:!1,configurable:!0}),r.prototype.getGamepadByType=function(t){t===void 0&&(t=fn.XBOX);for(var e=0,n=this._babylonGamepads;e1&&(p=a.generateStencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24),o.is2DArray?e.texImage3D(i,0,p,o.width,o.height,n,0,d,s,null):e.texImage2D(i,0,p,o.width,o.height,0,d,s,null),this._bindTextureDirectly(i,null),o};var _t=function(){function r(t,e,n,i,o,a,s,d,p,y,C,M,U,F,z){s===void 0&&(s=h.a.TEXTURE_NEAREST_SAMPLINGMODE),y===void 0&&(y=null),C===void 0&&(C=h.a.TEXTURETYPE_UNSIGNED_INT),M===void 0&&(M="postprocess"),F===void 0&&(F=!1),z===void 0&&(z=h.a.TEXTUREFORMAT_RGBA),this.width=-1,this.height=-1,this.nodeMaterialSource=null,this._outputTexture=null,this.autoClear=!0,this.alphaMode=h.a.ALPHA_DISABLE,this.animations=new Array,this.enablePixelPerfectMode=!1,this.forceFullscreenViewport=!0,this.scaleMode=h.a.SCALEMODE_FLOOR,this.alwaysForcePOT=!1,this._samples=1,this.adaptScaleToCurrentViewport=!1,this._reusable=!1,this._textures=new _i.a(2),this._currentRenderTextureInd=0,this._scaleRatio=new l.d(1,1),this._texelSize=l.d.Zero(),this.onActivateObservable=new P.c,this.onSizeChangedObservable=new P.c,this.onApplyObservable=new P.c,this.onBeforeRenderObservable=new P.c,this.onAfterRenderObservable=new P.c,this.name=t,a!=null?(this._camera=a,this._scene=a.getScene(),a.attachPostProcess(this),this._engine=this._scene.getEngine(),this._scene.postProcesses.push(this),this.uniqueId=this._scene.getUniqueId()):d&&(this._engine=d,this._engine.postProcesses.push(this)),this._options=o,this.renderTargetSamplingMode=s||h.a.TEXTURE_NEAREST_SAMPLINGMODE,this._reusable=p||!1,this._textureType=C,this._textureFormat=z,this._samplers=i||[],this._samplers.push("textureSampler"),this._fragmentUrl=e,this._vertexUrl=M,this._parameters=n||[],this._parameters.push("scale"),this._indexParameters=U,F||this.updateEffect(y)}return Object.defineProperty(r.prototype,"samples",{get:function(){return this._samples},set:function(t){var e=this;this._samples=Math.min(t,this._engine.getCaps().maxMSAASamples),this._textures.forEach(function(n){n.samples!==e._samples&&e._engine.updateRenderTargetTextureSampleCount(n,e._samples)})},enumerable:!1,configurable:!0}),r.prototype.getEffectName=function(){return this._fragmentUrl},Object.defineProperty(r.prototype,"onActivate",{set:function(t){this._onActivateObserver&&this.onActivateObservable.remove(this._onActivateObserver),t&&(this._onActivateObserver=this.onActivateObservable.add(t))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onSizeChanged",{set:function(t){this._onSizeChangedObserver&&this.onSizeChangedObservable.remove(this._onSizeChangedObserver),this._onSizeChangedObserver=this.onSizeChangedObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onApply",{set:function(t){this._onApplyObserver&&this.onApplyObservable.remove(this._onApplyObserver),this._onApplyObserver=this.onApplyObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBeforeRender",{set:function(t){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onAfterRender",{set:function(t){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"inputTexture",{get:function(){return this._textures.data[this._currentRenderTextureInd]},set:function(t){this._forcedOutputTexture=t},enumerable:!1,configurable:!0}),r.prototype.restoreDefaultInputTexture=function(){this._forcedOutputTexture=null},r.prototype.getCamera=function(){return this._camera},Object.defineProperty(r.prototype,"texelSize",{get:function(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.texelSize:(this._forcedOutputTexture&&this._texelSize.copyFromFloats(1/this._forcedOutputTexture.width,1/this._forcedOutputTexture.height),this._texelSize)},enumerable:!1,configurable:!0}),r.prototype.getClassName=function(){return"PostProcess"},r.prototype.getEngine=function(){return this._engine},r.prototype.getEffect=function(){return this._effect},r.prototype.shareOutputWith=function(t){return this._disposeTextures(),this._shareOutputWithPostProcess=t,this},r.prototype.useOwnOutput=function(){this._textures.length==0&&(this._textures=new _i.a(2)),this._shareOutputWithPostProcess=null},r.prototype.updateEffect=function(t,e,n,i,o,a,s,d){t===void 0&&(t=null),e===void 0&&(e=null),n===void 0&&(n=null),this._effect=this._engine.createEffect({vertex:s??this._vertexUrl,fragment:d??this._fragmentUrl},["position"],e||this._parameters,n||this._samplers,t!==null?t:"",void 0,o,a,i||this._indexParameters)},r.prototype.isReusable=function(){return this._reusable},r.prototype.markTextureDirty=function(){this.width=-1},r.prototype.activate=function(t,e,n){var i=this;e===void 0&&(e=null);var o=(t=t||this._camera).getScene(),a=o.getEngine(),s=a.getCaps().maxTextureSize,d=(e?e.width:this._engine.getRenderWidth(!0))*this._options|0,p=(e?e.height:this._engine.getRenderHeight(!0))*this._options|0,y=t.parent;!y||y.leftCamera!=t&&y.rightCamera!=t||(d/=2);var C,M=this._options.width||d,U=this._options.height||p,F=this.renderTargetSamplingMode!==h.a.TEXTURE_NEAREST_LINEAR&&this.renderTargetSamplingMode!==h.a.TEXTURE_NEAREST_NEAREST&&this.renderTargetSamplingMode!==h.a.TEXTURE_LINEAR_LINEAR;if(!this._shareOutputWithPostProcess&&!this._forcedOutputTexture){if(this.adaptScaleToCurrentViewport){var z=a.currentViewport;z&&(M*=z.width,U*=z.height)}if((F||this.alwaysForcePOT)&&(this._options.width||(M=a.needPOTTextures?Ve.a.GetExponentOfTwo(M,s,this.scaleMode):M),this._options.height||(U=a.needPOTTextures?Ve.a.GetExponentOfTwo(U,s,this.scaleMode):U)),this.width!==M||this.height!==U){if(this._textures.length>0){for(var J=0;J0)for(var t=0;t0){var n=this._camera._getFirstPostProcess();n&&n.markTextureDirty()}this.onActivateObservable.clear(),this.onAfterRenderObservable.clear(),this.onApplyObservable.clear(),this.onBeforeRenderObservable.clear(),this.onSizeChangedObservable.clear()}},r.prototype.serialize=function(){var t=L.a.Serialize(this);return t.customType="BABYLON."+this.getClassName(),t.cameraId=this.getCamera().id,t.reusable=this._reusable,t.options=this._options,t.textureType=this._textureType,t},r.Parse=function(t,e,n){var i=R.a.GetClass(t.customType);if(!i||!i._Parse)return null;var o=e.getCameraByID(t.cameraId);return o?i._Parse(t,o,e,n):null},Object(c.c)([Object(L.c)()],r.prototype,"uniqueId",void 0),Object(c.c)([Object(L.c)()],r.prototype,"name",void 0),Object(c.c)([Object(L.c)()],r.prototype,"width",void 0),Object(c.c)([Object(L.c)()],r.prototype,"height",void 0),Object(c.c)([Object(L.c)()],r.prototype,"renderTargetSamplingMode",void 0),Object(c.c)([Object(L.f)()],r.prototype,"clearColor",void 0),Object(c.c)([Object(L.c)()],r.prototype,"autoClear",void 0),Object(c.c)([Object(L.c)()],r.prototype,"alphaMode",void 0),Object(c.c)([Object(L.c)()],r.prototype,"alphaConstants",void 0),Object(c.c)([Object(L.c)()],r.prototype,"enablePixelPerfectMode",void 0),Object(c.c)([Object(L.c)()],r.prototype,"forceFullscreenViewport",void 0),Object(c.c)([Object(L.c)()],r.prototype,"scaleMode",void 0),Object(c.c)([Object(L.c)()],r.prototype,"alwaysForcePOT",void 0),Object(c.c)([Object(L.c)("samples")],r.prototype,"_samples",void 0),Object(c.c)([Object(L.c)()],r.prototype,"adaptScaleToCurrentViewport",void 0),r}();R.a.RegisteredTypes["BABYLON.PostProcess"]=_t;var Qf=` -varying vec2 vUV; -uniform sampler2D textureSampler; -void main(void) -{ -gl_FragColor=texture2D(textureSampler,vUV); -}`;je.a.ShadersStore.passPixelShader=Qf;var qf=` -varying vec2 vUV; -uniform samplerCube textureSampler; -void main(void) -{ -vec2 uv=vUV*2.0-1.0; -#ifdef POSITIVEX -gl_FragColor=textureCube(textureSampler,vec3(1.001,uv.y,uv.x)); -#endif -#ifdef NEGATIVEX -gl_FragColor=textureCube(textureSampler,vec3(-1.001,uv.y,uv.x)); -#endif -#ifdef POSITIVEY -gl_FragColor=textureCube(textureSampler,vec3(uv.y,1.001,uv.x)); -#endif -#ifdef NEGATIVEY -gl_FragColor=textureCube(textureSampler,vec3(uv.y,-1.001,uv.x)); -#endif -#ifdef POSITIVEZ -gl_FragColor=textureCube(textureSampler,vec3(uv,1.001)); -#endif -#ifdef NEGATIVEZ -gl_FragColor=textureCube(textureSampler,vec3(uv,-1.001)); -#endif -}`;je.a.ShadersStore.passCubePixelShader=qf;var Fi=function(r){function t(e,n,i,o,a,s,d,p){return i===void 0&&(i=null),d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1),r.call(this,e,"pass",null,null,n,i,o,a,s,void 0,d,void 0,null,p)||this}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"PassPostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},t}(_t);R.a.RegisteredTypes["BABYLON.PassPostProcess"]=Fi;var Zf=function(r){function t(e,n,i,o,a,s,d,p){i===void 0&&(i=null),d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1);var y=r.call(this,e,"passCube",null,null,n,i,o,a,s,"#define POSITIVEX",d,void 0,null,p)||this;return y._face=0,y}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"face",{get:function(){return this._face},set:function(e){if(!(e<0||e>5))switch(this._face=e,this._face){case 0:this.updateEffect("#define POSITIVEX");break;case 1:this.updateEffect("#define NEGATIVEX");break;case 2:this.updateEffect("#define POSITIVEY");break;case 3:this.updateEffect("#define NEGATIVEY");break;case 4:this.updateEffect("#define POSITIVEZ");break;case 5:this.updateEffect("#define NEGATIVEZ")}},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PassCubePostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},t}(_t);Ve.a._RescalePostProcessFactory=function(r){return new Fi("rescale",1,null,h.a.TEXTURE_BILINEAR_SAMPLINGMODE,r,!1,h.a.TEXTURETYPE_UNSIGNED_INT)};var Jf=` -varying vec2 vUV; -uniform sampler2D textureSampler; -uniform sampler2D leftSampler; -void main(void) -{ -vec4 leftFrag=texture2D(leftSampler,vUV); -leftFrag=vec4(1.0,leftFrag.g,leftFrag.b,1.0); -vec4 rightFrag=texture2D(textureSampler,vUV); -rightFrag=vec4(rightFrag.r,1.0,1.0,1.0); -gl_FragColor=vec4(rightFrag.rgb*leftFrag.rgb,1.0); -}`;je.a.ShadersStore.anaglyphPixelShader=Jf;var gs=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,"anaglyph",null,["leftSampler"],n,i[1],o,a,s)||this;return d._passedProcess=i[0]._rigPostProcess,d.onApplyObservable.add(function(p){p.setTextureFromPostProcess("leftSampler",d._passedProcess)}),d}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphPostProcess"},t}(_t);R.a.RegisteredTypes["BABYLON.AnaglyphPostProcess"]=gs,gt.a._setStereoscopicAnaglyphRigMode=function(r){r._rigCameras[0]._rigPostProcess=new Fi(r.name+"_passthru",1,r._rigCameras[0]),r._rigCameras[1]._rigPostProcess=new gs(r.name+"_anaglyph",1,r._rigCameras)},Q.a.AddNodeConstructor("AnaglyphArcRotateCamera",function(r,t,e){return function(){return new Nl(r,0,0,1,l.e.Zero(),e.interaxial_distance,t)}});var Nl=function(r){function t(e,n,i,o,a,s,d){var p=r.call(this,e,n,i,o,a,d)||this;return p.interaxialDistance=s,p.setCameraRigMode(gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:s}),p}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphArcRotateCamera"},t}(Ji);Q.a.AddNodeConstructor("AnaglyphFreeCamera",function(r,t,e){return function(){return new wl(r,l.e.Zero(),e.interaxial_distance,t)}});var wl=function(r){function t(e,n,i,o){var a=r.call(this,e,n,o)||this;return a.interaxialDistance=i,a.setCameraRigMode(gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),a}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphFreeCamera"},t}(Yn);Q.a.AddNodeConstructor("AnaglyphGamepadCamera",function(r,t,e){return function(){return new Fl(r,l.e.Zero(),e.interaxial_distance,t)}});var Fl=function(r){function t(e,n,i,o){var a=r.call(this,e,n,o)||this;return a.interaxialDistance=i,a.setCameraRigMode(gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),a}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphGamepadCamera"},t}(zo);Q.a.AddNodeConstructor("AnaglyphUniversalCamera",function(r,t,e){return function(){return new Bl(r,l.e.Zero(),e.interaxial_distance,t)}});var Bl=function(r){function t(e,n,i,o){var a=r.call(this,e,n,o)||this;return a.interaxialDistance=i,a.setCameraRigMode(gt.a.RIG_MODE_STEREOSCOPIC_ANAGLYPH,{interaxialDistance:i}),a}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"AnaglyphUniversalCamera"},t}(mr),Kn=f(58);gt.a._setStereoscopicRigMode=function(r){var t=r.cameraRigMode===gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL||r.cameraRigMode===gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED,e=r.cameraRigMode===gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED;r._rigCameras[e?1:0].viewport=new Kn.a(0,0,t?.5:1,t?1:.5),r._rigCameras[e?0:1].viewport=new Kn.a(t?.5:0,t?0:.5,t?.5:1,t?1:.5)},Q.a.AddNodeConstructor("StereoscopicArcRotateCamera",function(r,t,e){return function(){return new Ul(r,0,0,1,l.e.Zero(),e.interaxial_distance,e.isStereoscopicSideBySide,t)}});var Ul=function(r){function t(e,n,i,o,a,s,d,p){var y=r.call(this,e,n,i,o,a,p)||this;return y.interaxialDistance=s,y.isStereoscopicSideBySide=d,y.setCameraRigMode(d?gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:s}),y}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicArcRotateCamera"},t}(Ji);Q.a.AddNodeConstructor("StereoscopicFreeCamera",function(r,t,e){return function(){return new Vl(r,l.e.Zero(),e.interaxial_distance,e.isStereoscopicSideBySide,t)}});var Vl=function(r){function t(e,n,i,o,a){var s=r.call(this,e,n,a)||this;return s.interaxialDistance=i,s.isStereoscopicSideBySide=o,s.setCameraRigMode(o?gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),s}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicFreeCamera"},t}(Yn);Q.a.AddNodeConstructor("StereoscopicGamepadCamera",function(r,t,e){return function(){return new kl(r,l.e.Zero(),e.interaxial_distance,e.isStereoscopicSideBySide,t)}});var kl=function(r){function t(e,n,i,o,a){var s=r.call(this,e,n,a)||this;return s.interaxialDistance=i,s.isStereoscopicSideBySide=o,s.setCameraRigMode(o?gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),s}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicGamepadCamera"},t}(zo);Q.a.AddNodeConstructor("StereoscopicFreeCamera",function(r,t,e){return function(){return new Gl(r,l.e.Zero(),e.interaxial_distance,e.isStereoscopicSideBySide,t)}});var Gl=function(r){function t(e,n,i,o,a){var s=r.call(this,e,n,a)||this;return s.interaxialDistance=i,s.isStereoscopicSideBySide=o,s.setCameraRigMode(o?gt.a.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:gt.a.RIG_MODE_STEREOSCOPIC_OVERUNDER,{interaxialDistance:i}),s}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicUniversalCamera"},t}(mr);Q.a.AddNodeConstructor("VirtualJoysticksCamera",function(r,t){return function(){return new zl(r,l.e.Zero(),t)}});var zl=function(r){function t(e,n,i){var o=r.call(this,e,n,i)||this;return o.inputs.addVirtualJoystick(),o}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"VirtualJoysticksCamera"},t}(Yn),gr=function(){function r(){this.compensateDistortion=!0,this.multiviewEnabled=!1}return Object.defineProperty(r.prototype,"aspectRatio",{get:function(){return this.hResolution/(2*this.vResolution)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"aspectRatioFov",{get:function(){return 2*Math.atan(this.postProcessScaleFactor*this.vScreenSize/(2*this.eyeToScreenDistance))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"leftHMatrix",{get:function(){var t=4*(this.hScreenSize/4-this.lensSeparationDistance/2)/this.hScreenSize;return l.a.Translation(t,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightHMatrix",{get:function(){var t=4*(this.hScreenSize/4-this.lensSeparationDistance/2)/this.hScreenSize;return l.a.Translation(-t,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"leftPreViewMatrix",{get:function(){return l.a.Translation(.5*this.interpupillaryDistance,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightPreViewMatrix",{get:function(){return l.a.Translation(-.5*this.interpupillaryDistance,0,0)},enumerable:!1,configurable:!0}),r.GetDefault=function(){var t=new r;return t.hResolution=1280,t.vResolution=800,t.hScreenSize=.149759993,t.vScreenSize=.0935999975,t.vScreenCenter=.0467999987,t.eyeToScreenDistance=.0410000011,t.lensSeparationDistance=.063500002,t.interpupillaryDistance=.064000003,t.distortionK=[1,.219999999,.239999995,0],t.chromaAbCorrection=[.995999992,-.00400000019,1.01400006,0],t.postProcessScaleFactor=1.714605507808412,t.lensCenterOffset=.151976421,t},r}(),$f=` -varying vec2 vUV; -uniform sampler2D textureSampler; -uniform vec2 LensCenter; -uniform vec2 Scale; -uniform vec2 ScaleIn; -uniform vec4 HmdWarpParam; -vec2 HmdWarp(vec2 in01) { -vec2 theta=(in01-LensCenter)*ScaleIn; -float rSq=theta.x*theta.x+theta.y*theta.y; -vec2 rvector=theta*(HmdWarpParam.x+HmdWarpParam.y*rSq+HmdWarpParam.z*rSq*rSq+HmdWarpParam.w*rSq*rSq*rSq); -return LensCenter+Scale*rvector; -} -void main(void) -{ -vec2 tc=HmdWarp(vUV); -if (tc.x <0.0 || tc.x>1.0 || tc.y<0.0 || tc.y>1.0) -gl_FragColor=vec4(0.0,0.0,0.0,0.0); -else{ -gl_FragColor=texture2D(textureSampler,tc); -} -}`;je.a.ShadersStore.vrDistortionCorrectionPixelShader=$f;var vs=function(r){function t(e,n,i,o){var a=r.call(this,e,"vrDistortionCorrection",["LensCenter","Scale","ScaleIn","HmdWarpParam"],null,o.postProcessScaleFactor,n,we.a.BILINEAR_SAMPLINGMODE)||this;return a._isRightEye=i,a._distortionFactors=o.distortionK,a._postProcessScaleFactor=o.postProcessScaleFactor,a._lensCenterOffset=o.lensCenterOffset,a.adaptScaleToCurrentViewport=!0,a.onSizeChangedObservable.add(function(){a._scaleIn=new l.d(2,2/a.aspectRatio),a._scaleFactor=new l.d(1/a._postProcessScaleFactor*.5,1/a._postProcessScaleFactor*.5*a.aspectRatio),a._lensCenter=new l.d(a._isRightEye?.5-.5*a._lensCenterOffset:.5+.5*a._lensCenterOffset,.5)}),a.onApplyObservable.add(function(s){s.setFloat2("LensCenter",a._lensCenter.x,a._lensCenter.y),s.setFloat2("Scale",a._scaleFactor.x,a._scaleFactor.y),s.setFloat2("ScaleIn",a._scaleIn.x,a._scaleIn.y),s.setFloat4("HmdWarpParam",a._distortionFactors[0],a._distortionFactors[1],a._distortionFactors[2],a._distortionFactors[3])}),a}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"VRDistortionCorrectionPostProcess"},t}(_t),ep=`precision mediump sampler2DArray; -varying vec2 vUV; -uniform sampler2DArray multiviewSampler; -uniform int imageIndex; -void main(void) -{ -gl_FragColor=texture(multiviewSampler,vec3(vUV,imageIndex)); -}`;je.a.ShadersStore.vrMultiviewToSingleviewPixelShader=ep;var jl=f(85),bs=f(95),no=f(96);Bt.a.prototype.createRenderTargetCubeTexture=function(r,t){var e=Object(c.a)({generateMipMaps:!0,generateDepthBuffer:!0,generateStencilBuffer:!1,type:h.a.TEXTURETYPE_UNSIGNED_INT,samplingMode:h.a.TEXTURE_TRILINEAR_SAMPLINGMODE,format:h.a.TEXTUREFORMAT_RGBA},t);e.generateStencilBuffer=e.generateDepthBuffer&&e.generateStencilBuffer,(e.type!==h.a.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(e.type!==h.a.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(e.samplingMode=h.a.TEXTURE_NEAREST_SAMPLINGMODE);var n=this._gl,i=new xt.a(this,xt.b.RenderTarget);this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,i,!0);var o=this._getSamplingParameters(e.samplingMode,e.generateMipMaps);e.type!==h.a.TEXTURETYPE_FLOAT||this._caps.textureFloat||(e.type=h.a.TEXTURETYPE_UNSIGNED_INT,u.a.Warn("Float textures are not supported. Cube render target forced to TEXTURETYPE_UNESIGNED_BYTE type")),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MAG_FILTER,o.mag),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_MIN_FILTER,o.min),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_CUBE_MAP,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);for(var a=0;a<6;a++)n.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+a,0,this._getRGBABufferInternalSizedFormat(e.type,e.format),r,r,0,this._getInternalFormat(e.format),this._getWebGLTextureType(e.type),null);var s=n.createFramebuffer();return this._bindUnboundFramebuffer(s),i._depthStencilBuffer=this._setupFramebufferDepthAttachments(e.generateStencilBuffer,e.generateDepthBuffer,r,r),e.generateMipMaps&&n.generateMipmap(n.TEXTURE_CUBE_MAP),this._bindTextureDirectly(n.TEXTURE_CUBE_MAP,null),this._bindUnboundFramebuffer(null),i._framebuffer=s,i.width=r,i.height=r,i.isReady=!0,i.isCube=!0,i.samples=1,i.generateMipMaps=e.generateMipMaps,i.samplingMode=e.samplingMode,i.type=e.type,i.format=e.format,i._generateDepthBuffer=e.generateDepthBuffer,i._generateStencilBuffer=e.generateStencilBuffer,this._internalTexturesCache.push(i),i};var ln=function(r){function t(e,n,i,o,a,s,d,p,y,C,M,U,F){a===void 0&&(a=!0),s===void 0&&(s=h.a.TEXTURETYPE_UNSIGNED_INT),d===void 0&&(d=!1),p===void 0&&(p=we.a.TRILINEAR_SAMPLINGMODE),y===void 0&&(y=!0),C===void 0&&(C=!1),M===void 0&&(M=!1),U===void 0&&(U=h.a.TEXTUREFORMAT_RGBA),F===void 0&&(F=!1);var z=r.call(this,null,i,!o)||this;return z.renderParticles=!0,z.renderSprites=!1,z.ignoreCameraViewport=!1,z.onBeforeBindObservable=new P.c,z.onAfterUnbindObservable=new P.c,z.onBeforeRenderObservable=new P.c,z.onAfterRenderObservable=new P.c,z.onClearObservable=new P.c,z.onResizeObservable=new P.c,z._currentRefreshId=-1,z._refreshRate=1,z._samples=1,z.boundingBoxPosition=l.e.Zero(),(i=z.getScene())&&(z._coordinatesMode=we.a.PROJECTION_MODE,z.renderList=new Array,z.name=e,z.isRenderTarget=!0,z._initialSizeParameter=n,z._processSizeParameter(n),z._resizeObserver=z.getScene().getEngine().onResizeObservable.add(function(){}),z._generateMipMaps=!!o,z._doNotChangeAspectRatio=a,z._renderingManager=new no.b(i),z._renderingManager._useSceneAutoClearSetup=!0,M||(z._renderTargetOptions={generateMipMaps:o,type:s,format:U,samplingMode:p,generateDepthBuffer:y,generateStencilBuffer:C},p===we.a.NEAREST_SAMPLINGMODE&&(z.wrapU=we.a.CLAMP_ADDRESSMODE,z.wrapV=we.a.CLAMP_ADDRESSMODE),F||(d?(z._texture=i.getEngine().createRenderTargetCubeTexture(z.getRenderSize(),z._renderTargetOptions),z.coordinatesMode=we.a.INVCUBIC_MODE,z._textureMatrix=l.a.Identity()):z._texture=i.getEngine().createRenderTargetTexture(z._size,z._renderTargetOptions)))),z}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"renderList",{get:function(){return this._renderList},set:function(e){this._renderList=e,this._renderList&&this._hookArray(this._renderList)},enumerable:!1,configurable:!0}),t.prototype._hookArray=function(e){var n=this,i=e.push;e.push=function(){for(var a=[],s=0;s0&&(this._postProcesses[0].autoClear=!1))}},t.prototype._shouldRender=function(){return this._currentRefreshId===-1||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1)},t.prototype.getRenderSize=function(){return this.getRenderWidth()},t.prototype.getRenderWidth=function(){return this._size.width?this._size.width:this._size},t.prototype.getRenderHeight=function(){return this._size.width?this._size.height:this._size},t.prototype.getRenderLayers=function(){var e=this._size.layers;return e||0},Object.defineProperty(t.prototype,"canRescale",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.scale=function(e){var n=Math.max(1,this.getRenderSize()*e);this.resize(n)},t.prototype.getReflectionTextureMatrix=function(){return this.isCube?this._textureMatrix:r.prototype.getReflectionTextureMatrix.call(this)},t.prototype.resize=function(e){var n=this.isCube;this.releaseInternalTexture();var i=this.getScene();i&&(this._processSizeParameter(e),this._texture=n?i.getEngine().createRenderTargetCubeTexture(this.getRenderSize(),this._renderTargetOptions):i.getEngine().createRenderTargetTexture(this._size,this._renderTargetOptions),this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this))},t.prototype.render=function(e,n){if(e===void 0&&(e=!1),n===void 0&&(n=!1),p=this.getScene()){var i,o=p.getEngine();if(this.useCameraPostProcesses!==void 0&&(e=this.useCameraPostProcesses),this._waitingRenderList){this.renderList=[];for(var a=0;a1||this.activeCamera&&this.activeCamera!==p.activeCamera)&&p.setTransformMatrix(p.activeCamera.getViewMatrix(),p.activeCamera.getProjectionMatrix(!0)),o.setViewport(p.activeCamera.viewport)),p.resetCachedMaterial()}},t.prototype._bestReflectionRenderTargetDimension=function(e,n){var i=e*n,o=Ve.a.NearestPOT(i+16384/(128+i));return Math.min(Ve.a.FloorPOT(e),o)},t.prototype._prepareRenderingManager=function(e,n,i,o){var a=this.getScene();if(a){this._renderingManager.reset();for(var s=a.getRenderId(),d=0;d=0&&this._renderingManager.dispatchParticles(z)}}},t.prototype._bindFrameBuffer=function(e,n){e===void 0&&(e=0),n===void 0&&(n=0);var i=this.getScene();if(i){var o=i.getEngine();this._texture&&o.bindFramebuffer(this._texture,this.isCube?e:void 0,void 0,void 0,this.ignoreCameraViewport,0,n)}},t.prototype.unbindFrameBuffer=function(e,n){var i=this;this._texture&&e.unBindFramebuffer(this._texture,this.isCube,function(){i.onAfterRenderObservable.notifyObservers(n)})},t.prototype.renderToTarget=function(e,n,i,o,a){o===void 0&&(o=0),a===void 0&&(a=null);var s=this.getScene();if(s){var d=s.getEngine();if(this._texture){this._postProcessManager?this._postProcessManager._prepareFrame(this._texture,this._postProcesses):n&&s.postProcessManager._prepareFrame(this._texture)||this._bindFrameBuffer(e,o),this.is2DArray?this.onBeforeRenderObservable.notifyObservers(o):this.onBeforeRenderObservable.notifyObservers(e);var p=null,y=this.renderList?this.renderList:s.getActiveMeshes().data,C=this.renderList?this.renderList.length:s.getActiveMeshes().length;this.getCustomRenderList&&(p=this.getCustomRenderList(this.is2DArray?o:e,y,C)),p?this._prepareRenderingManager(p,p.length,a,!1):(this._defaultRenderListPrepared||(this._prepareRenderingManager(y,C,a,!this.renderList),this._defaultRenderListPrepared=!0),p=y),this.onClearObservable.hasObservers()?this.onClearObservable.notifyObservers(d):d.clear(this.clearColor||s.clearColor,!0,!0,!0),this._doNotChangeAspectRatio||s.updateTransformMatrix(!0);for(var M=0,U=s._beforeRenderTargetDrawStage;M=0&&e.customRenderTargets.splice(n,1);for(var i=0,o=e.cameras;i=0&&a.customRenderTargets.splice(n,1)}this.depthStencilTexture&&this.getScene().getEngine()._releaseTexture(this.depthStencilTexture),r.prototype.dispose.call(this)}},t.prototype._rebuild=function(){this.refreshRate===t.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=t.REFRESHRATE_RENDER_ONCE),this._postProcessManager&&this._postProcessManager._rebuild()},t.prototype.freeRenderingGroups=function(){this._renderingManager&&this._renderingManager.freeRenderingGroups()},t.prototype.getViewCount=function(){return 1},t.REFRESHRATE_RENDER_ONCE=0,t.REFRESHRATE_RENDER_ONEVERYFRAME=1,t.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2,t}(we.a);we.a._CreateRenderTargetTexture=function(r,t,e,n){return new ln(r,t,e,n)};var Hl=function(r){function t(e,n){n===void 0&&(n=512);var i=r.call(this,"multiview rtt",n,e,!1,!0,xt.b.Unknown,!1,void 0,!1,!1,!0,void 0,!0)||this,o=e.getEngine().createMultiviewRenderTargetTexture(i.getRenderWidth(),i.getRenderHeight());return o.isMultiview=!0,o.format=h.a.TEXTUREFORMAT_RGBA,i._texture=o,i.samples=i._getEngine().getCaps().maxSamples||i.samples,i}return Object(c.d)(t,r),t.prototype._bindFrameBuffer=function(e){this._texture&&this.getScene().getEngine().bindMultiviewFramebuffer(this._texture)},t.prototype.getViewCount=function(){return 2},t}(ln),Wl=f(90);Ve.a.prototype.createMultiviewRenderTargetTexture=function(r,t){var e=this._gl;if(!this.getCaps().multiview)throw"Multiview is not supported";var n=new xt.a(this,xt.b.Unknown,!0);return n.width=r,n.height=t,n._framebuffer=e.createFramebuffer(),n._colorTextureArray=e.createTexture(),e.bindTexture(e.TEXTURE_2D_ARRAY,n._colorTextureArray),e.texStorage3D(e.TEXTURE_2D_ARRAY,1,e.RGBA8,r,t,2),n._depthStencilTextureArray=e.createTexture(),e.bindTexture(e.TEXTURE_2D_ARRAY,n._depthStencilTextureArray),e.texStorage3D(e.TEXTURE_2D_ARRAY,1,e.DEPTH32F_STENCIL8,r,t,2),n.isReady=!0,n},Ve.a.prototype.bindMultiviewFramebuffer=function(r){var t=this._gl,e=this.getCaps().oculusMultiview||this.getCaps().multiview;if(this.bindFramebuffer(r,void 0,void 0,void 0,!0),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,r._framebuffer),!r._colorTextureArray||!r._depthStencilTextureArray)throw"Invalid multiview frame buffer";this.getCaps().oculusMultiview?(e.framebufferTextureMultisampleMultiviewOVR(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,r._colorTextureArray,0,r.samples,0,2),e.framebufferTextureMultisampleMultiviewOVR(t.DRAW_FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,r._depthStencilTextureArray,0,r.samples,0,2)):(e.framebufferTextureMultiviewOVR(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,r._colorTextureArray,0,0,2),e.framebufferTextureMultiviewOVR(t.DRAW_FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,r._depthStencilTextureArray,0,0,2))},gt.a.prototype._useMultiviewToSingleView=!1,gt.a.prototype._multiviewTexture=null,gt.a.prototype._resizeOrCreateMultiviewTexture=function(r,t){this._multiviewTexture?this._multiviewTexture.getRenderWidth()==r&&this._multiviewTexture.getRenderHeight()==t||(this._multiviewTexture.dispose(),this._multiviewTexture=new Hl(this.getScene(),{width:r,height:t})):this._multiviewTexture=new Hl(this.getScene(),{width:r,height:t})},_e.a.prototype._transformMatrixR=l.a.Zero(),_e.a.prototype._multiviewSceneUbo=null,_e.a.prototype._createMultiviewUbo=function(){this._multiviewSceneUbo=new jl.a(this.getEngine(),void 0,!0),this._multiviewSceneUbo.addUniform("viewProjection",16),this._multiviewSceneUbo.addUniform("viewProjectionR",16),this._multiviewSceneUbo.addUniform("view",16)},_e.a.prototype._updateMultiviewUbo=function(r,t){r&&t&&r.multiplyToRef(t,this._transformMatrixR),r&&t&&(r.multiplyToRef(t,l.c.Matrix[0]),Wl.a.GetRightPlaneToRef(l.c.Matrix[0],this._frustumPlanes[3])),this._multiviewSceneUbo&&(this._multiviewSceneUbo.updateMatrix("viewProjection",this.getTransformMatrix()),this._multiviewSceneUbo.updateMatrix("viewProjectionR",this._transformMatrixR),this._multiviewSceneUbo.updateMatrix("view",this._viewMatrix),this._multiviewSceneUbo.update())},_e.a.prototype._renderMultiviewToSingleView=function(r){r._resizeOrCreateMultiviewTexture(r._rigPostProcess&&r._rigPostProcess&&r._rigPostProcess.width>0?r._rigPostProcess.width:this.getEngine().getRenderWidth(!0),r._rigPostProcess&&r._rigPostProcess&&r._rigPostProcess.height>0?r._rigPostProcess.height:this.getEngine().getRenderHeight(!0)),this._multiviewSceneUbo||this._createMultiviewUbo(),r.outputRenderTarget=r._multiviewTexture,this._renderForCamera(r),r.outputRenderTarget=null;for(var t=0;t=2&&e.onControllersAttachedObservable.notifyObservers(e.controllers)}}})},t}(Yn),Bi=function(r){function t(e){var n=r.call(this,e)||this;return n.onTriggerStateChangedObservable=new P.c,n.onMainButtonStateChangedObservable=new P.c,n.onSecondaryButtonStateChangedObservable=new P.c,n.onPadStateChangedObservable=new P.c,n.onPadValuesChangedObservable=new P.c,n.pad={x:0,y:0},n._changes={pressChanged:!1,touchChanged:!1,valueChanged:!1,changed:!1},n._buttons=new Array(e.buttons.length),n.hand=e.hand,n}return Object(c.d)(t,r),t.prototype.onButtonStateChange=function(e){this._onButtonStateChange=e},Object.defineProperty(t.prototype,"defaultModel",{get:function(){return this._defaultModel},enumerable:!1,configurable:!0}),t.prototype.update=function(){r.prototype.update.call(this);for(var e=0;e -#include -#include -void main(void) -{ -vec4 result=texture2D(textureSampler,vUV); -#ifdef IMAGEPROCESSING -#ifndef FROMLINEARSPACE - -result.rgb=toLinearSpace(result.rgb); -#endif -result=applyImageProcessing(result); -#else - -#ifdef FROMLINEARSPACE -result=applyImageProcessing(result); -#endif -#endif -gl_FragColor=result; -}`);je.a.ShadersStore.imageProcessingPixelShader=tp;var Xo=function(r){function t(e,n,i,o,a,s,d,p){i===void 0&&(i=null),d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT);var y=r.call(this,e,"imageProcessing",[],[],n,i,o,a,s,null,d,"postprocess",null,!0)||this;return y._fromLinearSpace=!0,y._defines={IMAGEPROCESSING:!1,VIGNETTE:!1,VIGNETTEBLENDMODEMULTIPLY:!1,VIGNETTEBLENDMODEOPAQUE:!1,TONEMAPPING:!1,TONEMAPPING_ACES:!1,CONTRAST:!1,COLORCURVES:!1,COLORGRADING:!1,COLORGRADING3D:!1,FROMLINEARSPACE:!1,SAMPLER3DGREENDEPTH:!1,SAMPLER3DBGRMAP:!1,IMAGEPROCESSINGPOSTPROCESS:!1,EXPOSURE:!1},p?(p.applyByPostProcess=!0,y._attachImageProcessingConfiguration(p,!0),y.fromLinearSpace=!1):(y._attachImageProcessingConfiguration(null,!0),y.imageProcessingConfiguration.applyByPostProcess=!0),y.onApply=function(C){y.imageProcessingConfiguration.bind(C,y.aspectRatio)},y}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){e.applyByPostProcess=!0,this._attachImageProcessingConfiguration(e)},enumerable:!1,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e,n){var i=this;if(n===void 0&&(n=!1),e!==this._imageProcessingConfiguration){if(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),e)this._imageProcessingConfiguration=e;else{var o=null,a=this.getEngine(),s=this.getCamera();if(s)o=s.getScene();else if(a&&a.scenes){var d=a.scenes;o=d[d.length-1]}else o=te.a.LastCreatedScene;this._imageProcessingConfiguration=o?o.imageProcessingConfiguration:new yn.a}this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){i._updateParameters()})),n||this._updateParameters()}},Object.defineProperty(t.prototype,"isSupported",{get:function(){var e=this.getEffect();return!e||e.isSupported},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorCurves",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorGradingTexture",{get:function(){return this.imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"colorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exposure",{get:function(){return this.imageProcessingConfiguration.exposure},set:function(e){this.imageProcessingConfiguration.exposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toneMappingType",{get:function(){return this._imageProcessingConfiguration.toneMappingType},set:function(e){this._imageProcessingConfiguration.toneMappingType=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"contrast",{get:function(){return this.imageProcessingConfiguration.contrast},set:function(e){this.imageProcessingConfiguration.contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteStretch",{get:function(){return this.imageProcessingConfiguration.vignetteStretch},set:function(e){this.imageProcessingConfiguration.vignetteStretch=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCentreX",{get:function(){return this.imageProcessingConfiguration.vignetteCentreX},set:function(e){this.imageProcessingConfiguration.vignetteCentreX=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCentreY",{get:function(){return this.imageProcessingConfiguration.vignetteCentreY},set:function(e){this.imageProcessingConfiguration.vignetteCentreY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteWeight",{get:function(){return this.imageProcessingConfiguration.vignetteWeight},set:function(e){this.imageProcessingConfiguration.vignetteWeight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteColor",{get:function(){return this.imageProcessingConfiguration.vignetteColor},set:function(e){this.imageProcessingConfiguration.vignetteColor=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteCameraFov",{get:function(){return this.imageProcessingConfiguration.vignetteCameraFov},set:function(e){this.imageProcessingConfiguration.vignetteCameraFov=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteBlendMode",{get:function(){return this.imageProcessingConfiguration.vignetteBlendMode},set:function(e){this.imageProcessingConfiguration.vignetteBlendMode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vignetteEnabled",{get:function(){return this.imageProcessingConfiguration.vignetteEnabled},set:function(e){this.imageProcessingConfiguration.vignetteEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fromLinearSpace",{get:function(){return this._fromLinearSpace},set:function(e){this._fromLinearSpace!==e&&(this._fromLinearSpace=e,this._updateParameters())},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"ImageProcessingPostProcess"},t.prototype._updateParameters=function(){this._defines.FROMLINEARSPACE=this._fromLinearSpace,this.imageProcessingConfiguration.prepareDefines(this._defines,!0);var e="";for(var n in this._defines)this._defines[n]&&(e+="#define "+n+`;\r -`);var i=["textureSampler"],o=["scale"];yn.a&&(yn.a.PrepareSamplers(i,this._defines),yn.a.PrepareUniforms(o,this._defines)),this.updateEffect(e,o,i)},t.prototype.dispose=function(e){r.prototype.dispose.call(this,e),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration&&(this.imageProcessingConfiguration.applyByPostProcess=!1)},Object(c.c)([Object(L.c)()],t.prototype,"_fromLinearSpace",void 0),t}(_t),ft=f(16),Me=f(4);De.a._GroundMeshParser=function(r,t){return Yo.Parse(r,t)};var Yo=function(r){function t(e,n){var i=r.call(this,e,n)||this;return i.generateOctree=!1,i}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"GroundMesh"},Object.defineProperty(t.prototype,"subdivisions",{get:function(){return Math.min(this._subdivisionsX,this._subdivisionsY)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subdivisionsX",{get:function(){return this._subdivisionsX},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"subdivisionsY",{get:function(){return this._subdivisionsY},enumerable:!1,configurable:!0}),t.prototype.optimize=function(e,n){n===void 0&&(n=32),this._subdivisionsX=e,this._subdivisionsY=e,this.subdivide(e),this.createOrUpdateSubmeshesOctree&&this.createOrUpdateSubmeshesOctree(n)},t.prototype.getHeightAtCoordinates=function(e,n){var i=this.getWorldMatrix(),o=l.c.Matrix[5];i.invertToRef(o);var a=l.c.Vector3[8];if(l.e.TransformCoordinatesFromFloatsToRef(e,0,n,o,a),e=a.x,n=a.z,ethis._maxX||nthis._maxZ)return this.position.y;this._heightQuads&&this._heightQuads.length!=0||(this._initHeightQuads(),this._computeHeightQuads());var s=this._getFacetAt(e,n),d=-(s.x*e+s.z*n+s.w)/s.y;return l.e.TransformCoordinatesFromFloatsToRef(0,d,0,i,a),a.y},t.prototype.getNormalAtCoordinates=function(e,n){var i=new l.e(0,1,0);return this.getNormalAtCoordinatesToRef(e,n,i),i},t.prototype.getNormalAtCoordinatesToRef=function(e,n,i){var o=this.getWorldMatrix(),a=l.c.Matrix[5];o.invertToRef(a);var s=l.c.Vector3[8];if(l.e.TransformCoordinatesFromFloatsToRef(e,0,n,a,s),e=s.x,n=s.z,ethis._maxX||nthis._maxZ)return this;this._heightQuads&&this._heightQuads.length!=0||(this._initHeightQuads(),this._computeHeightQuads());var d=this._getFacetAt(e,n);return l.e.TransformNormalFromFloatsToRef(d.x,d.y,d.z,o,i),this},t.prototype.updateCoordinateHeights=function(){return this._heightQuads&&this._heightQuads.length!=0||this._initHeightQuads(),this._computeHeightQuads(),this},t.prototype._getFacetAt=function(e,n){var i=Math.floor((e+this._maxX)*this._subdivisionsX/this._width),o=Math.floor(-(n+this._maxZ)*this._subdivisionsY/this._height+this._subdivisionsY),a=this._heightQuads[o*this._subdivisionsX+i];return nr.maxHeight){p=!0;var y=r.maxHeight;r.maxHeight=r.minHeight,r.minHeight=y}for(t=0;t<=r.subdivisions;t++)for(e=0;e<=r.subdivisions;e++){var C=new l.e(e*r.width/r.subdivisions-r.width/2,0,(r.subdivisions-t)*r.height/r.subdivisions-r.height/2),M=4*(((C.x+r.width/2)/r.width*(r.bufferWidth-1)|0)+((1-(C.z+r.height/2)/r.height)*(r.bufferHeight-1)|0)*r.bufferWidth),U=r.buffer[M]/255,F=r.buffer[M+1]/255,z=r.buffer[M+2]/255,J=r.buffer[M+3]/255;p&&(U=1-U,F=1-F,z=1-z);var ie=U*s.r+F*s.g+z*s.b;C.y=J>=d?r.minHeight+(r.maxHeight-r.minHeight)*ie:r.minHeight-Gt.a,i.push(C.x,C.y,C.z),o.push(0,0,0),a.push(e/r.subdivisions,1-t/r.subdivisions)}for(t=0;t=r.minHeight,Te=i[3*ce+1]>=r.minHeight,Oe=i[3*ue+1]>=r.minHeight;ve&&Te&&Oe&&(n.push(se),n.push(ce),n.push(ue)),i[3*fe+1]>=r.minHeight&&ve&&Oe&&(n.push(fe),n.push(se),n.push(ue))}ft.a.ComputeNormals(i,n,o);var Pe=new ft.a;return Pe.indices=n,Pe.positions=i,Pe.normals=o,Pe.uvs=a,Pe},De.a.CreateGround=function(r,t,e,n,i,o){var a={width:t,height:e,subdivisions:n,updatable:o};return Ui.CreateGround(r,a,i)},De.a.CreateTiledGround=function(r,t,e,n,i,o,a,s,d){var p={xmin:t,zmin:e,xmax:n,zmax:i,subdivisions:o,precision:a,updatable:d};return Ui.CreateTiledGround(r,p,s)},De.a.CreateGroundFromHeightMap=function(r,t,e,n,i,o,a,s,d,p,y){var C={width:e,height:n,subdivisions:i,minHeight:o,maxHeight:a,updatable:d,onReady:p,alphaFilter:y};return Ui.CreateGroundFromHeightMap(r,t,C,s)};var Ui=function(){function r(){}return r.CreateGround=function(t,e,n){var i=new Yo(t,n);return i._setReady(!1),i._subdivisionsX=e.subdivisionsX||e.subdivisions||1,i._subdivisionsY=e.subdivisionsY||e.subdivisions||1,i._width=e.width||1,i._height=e.height||1,i._maxX=i._width/2,i._maxZ=i._height/2,i._minX=-i._maxX,i._minZ=-i._maxZ,ft.a.CreateGround(e).applyToMesh(i,e.updatable),i._setReady(!0),i},r.CreateTiledGround=function(t,e,n){n===void 0&&(n=null);var i=new De.a(t,n);return ft.a.CreateTiledGround(e).applyToMesh(i,e.updatable),i},r.CreateGroundFromHeightMap=function(t,e,n,i){i===void 0&&(i=null);var o=n.width||10,a=n.height||10,s=n.subdivisions||1,d=n.minHeight||0,p=n.maxHeight||1,y=n.colorFilter||new O.a(.3,.59,.11),C=n.alphaFilter||0,M=n.updatable,U=n.onReady;i=i||te.a.LastCreatedScene;var F=new Yo(t,i);return F._subdivisionsX=s,F._subdivisionsY=s,F._width=o,F._height=a,F._maxX=F._width/2,F._maxZ=F._height/2,F._minX=-F._maxX,F._minZ=-F._maxZ,F._setReady(!1),Ye.b.LoadImage(e,function(z){var J=z.width,ie=z.height,se=Ts.a.CreateCanvas(J,ie).getContext("2d");if(!se)throw new Error("Unable to get 2d context for CreateGroundFromHeightMap");if(!i.isDisposed){se.drawImage(z,0,0);var ce=se.getImageData(0,0,J,ie).data;ft.a.CreateGroundFromHeightMap({width:o,height:a,subdivisions:s,minHeight:d,maxHeight:p,colorFilter:y,buffer:ce,bufferWidth:J,bufferHeight:ie,alphaFilter:C}).applyToMesh(F,M),U&&U(F),F._setReady(!0)}},function(){},i.offlineProvider),F},r}();ft.a.CreateTorus=function(r){for(var t=[],e=[],n=[],i=[],o=r.diameter||1,a=r.thickness||.5,s=r.tessellation||16,d=r.sideOrientation===0?0:r.sideOrientation||ft.a.DEFAULTSIDE,p=s+1,y=0;y<=s;y++)for(var C=y/s,M=y*Math.PI*2/s-Math.PI/2,U=l.a.Translation(o/2,0,0).multiply(l.a.RotationY(M)),F=0;F<=s;F++){var z=1-F/s,J=F*Math.PI*2/s+Math.PI,ie=Math.cos(J),se=Math.sin(J),ce=new l.e(ie,se,0),ue=ce.scale(a/2),fe=new l.d(C,z);ue=l.e.TransformCoordinates(ue,U),ce=l.e.TransformNormal(ce,U),e.push(ue.x,ue.y,ue.z),n.push(ce.x,ce.y,ce.z),i.push(fe.x,fe.y);var ve=(y+1)%p,Te=(F+1)%p;t.push(y*p+F),t.push(y*p+Te),t.push(ve*p+F),t.push(y*p+Te),t.push(ve*p+Te),t.push(ve*p+F)}ft.a._ComputeSides(d,e,t,n,i,r.frontUVs,r.backUVs);var Oe=new ft.a;return Oe.indices=t,Oe.positions=e,Oe.normals=n,Oe.uvs=i,Oe},De.a.CreateTorus=function(r,t,e,n,i,o,a){var s={diameter:t,thickness:e,tessellation:n,sideOrientation:a,updatable:o};return vr.CreateTorus(r,s,i)};var _n,tr,vr=function(){function r(){}return r.CreateTorus=function(t,e,n){var i=new De.a(t,n);return e.sideOrientation=De.a._GetDefaultSideOrientation(e.sideOrientation),i._originalBuilderSideOrientation=e.sideOrientation,ft.a.CreateTorus(e).applyToMesh(i,e.updatable),i},r}(),mi=f(53),Es=function(){function r(){}return r.GetDefaults=function(t){var e=new r;return e.canvasOptions={antialias:!0,depth:!0,stencil:!t||t.isStencilEnable,alpha:!0,multiview:!1,framebufferScaleFactor:1},e.newCanvasCssStyle="position:absolute; bottom:0px;right:0px;z-index:10;width:90%;height:100%;background-color: #000000;",e},r}(),Kl=function(){function r(t,e){var n=this;if(e===void 0&&(e=Es.GetDefaults()),this._options=e,this._canvas=null,this.xrLayer=null,this.onXRLayerInitObservable=new P.c,this._engine=t.scene.getEngine(),e.canvasElement)this._setManagedOutputCanvas(e.canvasElement);else{var i=document.createElement("canvas");i.style.cssText=this._options.newCanvasCssStyle||"position:absolute; bottom:0px;right:0px;",this._setManagedOutputCanvas(i)}t.onXRSessionInit.add(function(){n._addCanvas()}),t.onXRSessionEnded.add(function(){n._removeCanvas()})}return r.prototype.dispose=function(){this._removeCanvas(),this._setManagedOutputCanvas(null)},r.prototype.initializeXRLayerAsync=function(t){var e=this,n=function(){var i=new XRWebGLLayer(t,e.canvasContext,e._options.canvasOptions);return e.onXRLayerInitObservable.notifyObservers(i),i};return this.canvasContext.makeXRCompatible?this.canvasContext.makeXRCompatible().then(function(){return e.xrLayer=n(),e.xrLayer}):(this.xrLayer=n(),Promise.resolve(this.xrLayer))},r.prototype._addCanvas=function(){var t=this;this._canvas&&this._canvas!==this._engine.getRenderingCanvas()&&document.body.appendChild(this._canvas),this.xrLayer?this._setCanvasSize(!0):this.onXRLayerInitObservable.addOnce(function(e){t._setCanvasSize(!0,e)})},r.prototype._removeCanvas=function(){this._canvas&&document.body.contains(this._canvas)&&this._canvas!==this._engine.getRenderingCanvas()&&document.body.removeChild(this._canvas),this._setCanvasSize(!1)},r.prototype._setCanvasSize=function(t,e){t===void 0&&(t=!0),e===void 0&&(e=this.xrLayer),this._canvas&&(t?e&&(this._canvas!==this._engine.getRenderingCanvas()?(this._canvas.style.width=e.framebufferWidth+"px",this._canvas.style.height=e.framebufferHeight+"px"):this._engine.setSize(e.framebufferWidth,e.framebufferHeight)):this._originalCanvasSize&&(this._canvas!==this._engine.getRenderingCanvas()?(this._canvas.style.width=this._originalCanvasSize.width+"px",this._canvas.style.height=this._originalCanvasSize.height+"px"):this._engine.setSize(this._originalCanvasSize.width,this._originalCanvasSize.height)))},r.prototype._setManagedOutputCanvas=function(t){this._removeCanvas(),t?(this._originalCanvasSize={width:t.offsetWidth,height:t.offsetHeight},this._canvas=t,this.canvasContext=this._canvas.getContext("webgl2"),this.canvasContext||(this.canvasContext=this._canvas.getContext("webgl"))):(this._canvas=null,this.canvasContext=null)},r}(),Ss=function(){function r(t){this.scene=t,this._sessionEnded=!1,this.baseLayer=null,this.currentTimestamp=-1,this.defaultHeightCompensation=1.7,this.onXRFrameObservable=new P.c,this.onXRReferenceSpaceChanged=new P.c,this.onXRSessionEnded=new P.c,this.onXRSessionInit=new P.c}return Object.defineProperty(r.prototype,"referenceSpace",{get:function(){return this._referenceSpace},set:function(t){this._referenceSpace=t,this.onXRReferenceSpaceChanged.notifyObservers(this._referenceSpace)},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this._sessionEnded||this.exitXRAsync(),this.onXRFrameObservable.clear(),this.onXRSessionEnded.clear(),this.onXRReferenceSpaceChanged.clear(),this.onXRSessionInit.clear()},r.prototype.exitXRAsync=function(){return this.session&&!this._sessionEnded?(this._sessionEnded=!0,this.session.end().catch(function(t){u.a.Warn("Could not end XR session.")})):Promise.resolve()},r.prototype.getRenderTargetTextureForEye=function(t){return this._rttProvider.getRenderTargetForEye(t)},r.prototype.getWebXRRenderTarget=function(t){var e=this.scene.getEngine();return this._xrNavigator.xr.native?this._xrNavigator.xr.getWebXRRenderTarget(e):((t=t||Es.GetDefaults(e)).canvasElement=e.getRenderingCanvas()||void 0,new Kl(this,t))},r.prototype.initializeAsync=function(){return this._xrNavigator=navigator,this._xrNavigator.xr?Promise.resolve():Promise.reject("WebXR not available")},r.prototype.initializeSessionAsync=function(t,e){var n=this;return t===void 0&&(t="immersive-vr"),e===void 0&&(e={}),this._xrNavigator.xr.requestSession(t,e).then(function(i){return n.session=i,n.onXRSessionInit.notifyObservers(i),n._sessionEnded=!1,n.session.addEventListener("end",function(){var o=n.scene.getEngine();n._sessionEnded=!0,n._rttProvider=null,o.framebufferDimensionsObject=null,o.restoreDefaultFramebuffer(),o.customAnimationFrameRequester=null,n.onXRSessionEnded.notifyObservers(null),o._renderLoop()},{once:!0}),n.session})},r.prototype.isSessionSupportedAsync=function(t){return r.IsSessionSupportedAsync(t)},r.prototype.resetReferenceSpace=function(){this.referenceSpace=this.baseReferenceSpace},r.prototype.runXRRenderLoop=function(){var t=this,e=this.scene.getEngine();if(e.customAnimationFrameRequester={requestAnimationFrame:this.session.requestAnimationFrame.bind(this.session),renderFunction:function(i,o){t._sessionEnded||(t.currentFrame=o,t.currentTimestamp=i,o&&(e.framebufferDimensionsObject=t.baseLayer,t.onXRFrameObservable.notifyObservers(o),e._renderLoop(),e.framebufferDimensionsObject=null))}},this._xrNavigator.xr.native)this._rttProvider=this._xrNavigator.xr.getNativeRenderTargetProvider(this.session,this._createRenderTargetTexture.bind(this));else{var n=this._createRenderTargetTexture(this.baseLayer.framebufferWidth,this.baseLayer.framebufferHeight,this.baseLayer.framebuffer);this._rttProvider={getRenderTargetForEye:function(){return n}},e.framebufferDimensionsObject=this.baseLayer}typeof window<"u"&&window.cancelAnimationFrame&&window.cancelAnimationFrame(e._frameHandler),e._renderLoop()},r.prototype.setReferenceSpaceTypeAsync=function(t){var e=this;return t===void 0&&(t="local-floor"),this.session.requestReferenceSpace(t).then(function(n){return n},function(n){return u.a.Error("XR.requestReferenceSpace failed for the following reason: "),u.a.Error(n),u.a.Log('Defaulting to universally-supported "viewer" reference space type.'),e.session.requestReferenceSpace("viewer").then(function(i){var o=new XRRigidTransform({x:0,y:-e.defaultHeightCompensation,z:0});return i.getOffsetReferenceSpace(o)},function(i){throw u.a.Error(i),'XR initialization failed: required "viewer" reference space type not supported.'})}).then(function(n){return e.session.requestReferenceSpace("viewer").then(function(i){return e.viewerReferenceSpace=i,n})}).then(function(n){return e.referenceSpace=e.baseReferenceSpace=n,e.referenceSpace})},r.prototype.updateRenderStateAsync=function(t){return t.baseLayer&&(this.baseLayer=t.baseLayer),this.session.updateRenderState(t)},r.IsSessionSupportedAsync=function(t){if(!navigator.xr)return Promise.resolve(!1);var e=navigator.xr.isSessionSupported||navigator.xr.supportsSession;return e?e.call(navigator.xr,t).then(function(n){var i=n===void 0||n;return Promise.resolve(i)}).catch(function(n){return u.a.Warn(n),Promise.resolve(!1)}):Promise.resolve(!1)},r.prototype._createRenderTargetTexture=function(t,e,n){n===void 0&&(n=null);var i=new xt.a(this.scene.getEngine(),xt.b.Unknown,!0);i.width=t,i.height=e,i._framebuffer=n;var o=new ln("XR renderTargetTexture",{width:t,height:e},this.scene,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0);return o._texture=i,o},r}();(function(r){r[r.ENTERING_XR=0]="ENTERING_XR",r[r.EXITING_XR=1]="EXITING_XR",r[r.IN_XR=2]="IN_XR",r[r.NOT_IN_XR=3]="NOT_IN_XR"})(_n||(_n={})),function(r){r[r.NOT_TRACKING=0]="NOT_TRACKING",r[r.TRACKING_LOST=1]="TRACKING_LOST",r[r.TRACKING=2]="TRACKING"}(tr||(tr={}));var oi,Ql=function(){function r(t,e){if(e===void 0&&(e=null),this.scene=t,this._pointerDownOnMeshAsked=!1,this._isActionableMesh=!1,this._teleportationRequestInitiated=!1,this._teleportationBackRequestInitiated=!1,this._rotationRightAsked=!1,this._rotationLeftAsked=!1,this._dpadPressed=!0,this._activePointer=!1,this._id=r._idCounter++,e)this._gazeTracker=e.clone("gazeTracker");else{this._gazeTracker=De.a.CreateTorus("gazeTracker",.0035,.0025,20,t,!1),this._gazeTracker.bakeCurrentTransformIntoVertices(),this._gazeTracker.isPickable=!1,this._gazeTracker.isVisible=!1;var n=new Ft.a("targetMat",t);n.specularColor=O.a.Black(),n.emissiveColor=new O.a(.7,.7,.7),n.backFaceCulling=!1,this._gazeTracker.material=n}}return r.prototype._getForwardRay=function(t){return new pn.a(l.e.Zero(),new l.e(0,0,t))},r.prototype._selectionPointerDown=function(){this._pointerDownOnMeshAsked=!0,this._currentHit&&this.scene.simulatePointerDown(this._currentHit,{pointerId:this._id})},r.prototype._selectionPointerUp=function(){this._currentHit&&this.scene.simulatePointerUp(this._currentHit,{pointerId:this._id}),this._pointerDownOnMeshAsked=!1},r.prototype._activatePointer=function(){this._activePointer=!0},r.prototype._deactivatePointer=function(){this._activePointer=!1},r.prototype._updatePointerDistance=function(t){},r.prototype.dispose=function(){this._interactionsEnabled=!1,this._teleportationEnabled=!1,this._gazeTracker&&this._gazeTracker.dispose()},r._idCounter=0,r}(),np=function(r){function t(e,n,i){var o=r.call(this,n,i)||this;o.webVRController=e,o._laserPointer=De.a.CreateCylinder("laserPointer",1,.004,2e-4,20,1,n,!1);var a=new Ft.a("laserPointerMat",n);if(a.emissiveColor=new O.a(.7,.7,.7),a.alpha=.6,o._laserPointer.material=a,o._laserPointer.rotation.x=Math.PI/2,o._laserPointer.position.z=-.5,o._laserPointer.isVisible=!1,o._laserPointer.isPickable=!1,!e.mesh){var s=new De.a("preloadControllerMesh",n),d=new De.a(_r.POINTING_POSE,n);d.rotation.x=-.7,s.addChild(d),e.attachToMesh(s)}return o._setLaserPointerParent(e.mesh),o._meshAttachedObserver=e._meshAttachedObservable.add(function(p){o._setLaserPointerParent(p)}),o}return Object(c.d)(t,r),t.prototype._getForwardRay=function(e){return this.webVRController.getForwardRay(e)},t.prototype._activatePointer=function(){r.prototype._activatePointer.call(this),this._laserPointer.isVisible=!0},t.prototype._deactivatePointer=function(){r.prototype._deactivatePointer.call(this),this._laserPointer.isVisible=!1},t.prototype._setLaserPointerColor=function(e){this._laserPointer.material.emissiveColor=e},t.prototype._setLaserPointerLightingDisabled=function(e){this._laserPointer.material.disableLighting=e},t.prototype._setLaserPointerParent=function(e){var n=function(s){s.isPickable=!1,s.getChildMeshes().forEach(function(d){n(d)})};n(e);var i=e.getChildren(void 0,!1),o=e;this.webVRController._pointingPoseNode=null;for(var a=0;a=0){o=i[a],this.webVRController._pointingPoseNode=o;break}this._laserPointer.parent=o},t.prototype._updatePointerDistance=function(e){e===void 0&&(e=100),this._laserPointer.scaling.y=e,this._laserPointer.position.z=-e/2},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._laserPointer.dispose(),this._meshAttachedObserver&&this.webVRController._meshAttachedObservable.remove(this._meshAttachedObserver)},t}(Ql),ql=function(r){function t(e,n){var i=r.call(this,n)||this;return i.getCamera=e,i}return Object(c.d)(t,r),t.prototype._getForwardRay=function(e){var n=this.getCamera();return n?n.getForwardRay(e):new pn.a(l.e.Zero(),l.e.Forward())},t}(Ql),ip=function(){},Zl=function(){function r(t,e){var n=this;if(e===void 0&&(e={}),this.webVROptions=e,this._webVRsupported=!1,this._webVRready=!1,this._webVRrequesting=!1,this._webVRpresenting=!1,this._fullscreenVRpresenting=!1,this.enableGazeEvenWhenNoPointerLock=!1,this.exitVROnDoubleTap=!0,this.onEnteringVRObservable=new P.c,this.onAfterEnteringVRObservable=new P.c,this.onExitingVRObservable=new P.c,this.onControllerMeshLoadedObservable=new P.c,this._useCustomVRButton=!1,this._teleportationRequested=!1,this._teleportActive=!1,this._floorMeshesCollection=[],this._teleportationMode=r.TELEPORTATIONMODE_CONSTANTTIME,this._teleportationTime=122,this._teleportationSpeed=20,this._rotationAllowed=!0,this._teleportBackwardsVector=new l.e(0,-1,-1),this._isDefaultTeleportationTarget=!0,this._teleportationFillColor="#444444",this._teleportationBorderColor="#FFFFFF",this._rotationAngle=0,this._haloCenter=new l.e(0,0,0),this._padSensibilityUp=.65,this._padSensibilityDown=.35,this._leftController=null,this._rightController=null,this._gazeColor=new O.a(.7,.7,.7),this._laserColor=new O.a(.7,.7,.7),this._pickedLaserColor=new O.a(.2,.2,1),this._pickedGazeColor=new O.a(0,0,1),this.onNewMeshSelected=new P.c,this.onMeshSelectedWithController=new P.c,this.onNewMeshPicked=new P.c,this.onBeforeCameraTeleport=new P.c,this.onAfterCameraTeleport=new P.c,this.onSelectedMeshUnselected=new P.c,this.teleportationEnabled=!0,this._teleportationInitialized=!1,this._interactionsEnabled=!1,this._interactionsRequested=!1,this._displayGaze=!0,this._displayLaserPointer=!0,this.updateGazeTrackerScale=!0,this.updateGazeTrackerColor=!0,this.updateControllerLaserColor=!0,this.requestPointerLockOnFullScreen=!0,this.xrTestDone=!1,this._onResize=function(){n.moveButtonToBottomRight(),n._fullscreenVRpresenting&&n._webVRready&&n.exitVR()},this._onFullscreenChange=function(){var o=document;o.fullscreen!==void 0?n._fullscreenVRpresenting=document.fullscreen:o.mozFullScreen!==void 0?n._fullscreenVRpresenting=o.mozFullScreen:o.webkitIsFullScreen!==void 0?n._fullscreenVRpresenting=o.webkitIsFullScreen:o.msIsFullScreen!==void 0?n._fullscreenVRpresenting=o.msIsFullScreen:document.msFullscreenElement!==void 0&&(n._fullscreenVRpresenting=document.msFullscreenElement),!n._fullscreenVRpresenting&&n._inputElement&&(n.exitVR(),!n._useCustomVRButton&&n._btnVR&&(n._btnVR.style.top=n._inputElement.offsetTop+n._inputElement.offsetHeight-70+"px",n._btnVR.style.left=n._inputElement.offsetLeft+n._inputElement.offsetWidth-100+"px",n.updateButtonVisibility()))},this._cachedAngularSensibility={angularSensibilityX:null,angularSensibilityY:null,angularSensibility:null},this.beforeRender=function(){n._leftController&&n._leftController._activePointer&&n._castRayAndSelectObject(n._leftController),n._rightController&&n._rightController._activePointer&&n._castRayAndSelectObject(n._rightController),n._noControllerIsActive&&(n._scene.getEngine().isPointerLock||n.enableGazeEvenWhenNoPointerLock)?n._castRayAndSelectObject(n._cameraGazer):n._cameraGazer._gazeTracker.isVisible=!1},this._onNewGamepadConnected=function(o){if(o.type!==fn.POSE_ENABLED)o.leftStick&&o.onleftstickchanged(function(d){n._teleportationInitialized&&n.teleportationEnabled&&(!n._leftController&&!n._rightController||n._leftController&&!n._leftController._activePointer&&n._rightController&&!n._rightController._activePointer)&&(n._checkTeleportWithRay(d,n._cameraGazer),n._checkTeleportBackwards(d,n._cameraGazer))}),o.rightStick&&o.onrightstickchanged(function(d){n._teleportationInitialized&&n._checkRotate(d,n._cameraGazer)}),o.type===fn.XBOX&&(o.onbuttondown(function(d){n._interactionsEnabled&&d===In.A&&n._cameraGazer._selectionPointerDown()}),o.onbuttonup(function(d){n._interactionsEnabled&&d===In.A&&n._cameraGazer._selectionPointerUp()}));else{var a=o,s=new np(a,n._scene,n._cameraGazer._gazeTracker);a.hand==="right"||n._leftController&&n._leftController.webVRController!=a?n._rightController=s:n._leftController=s,n._tryEnableInteractionOnController(s)}},this._tryEnableInteractionOnController=function(o){n._interactionsRequested&&!o._interactionsEnabled&&n._enableInteractionOnController(o),n._teleportationRequested&&!o._teleportationEnabled&&n._enableTeleportationOnController(o)},this._onNewGamepadDisconnected=function(o){o instanceof Bi&&(o.hand==="left"&&n._leftController!=null&&(n._leftController.dispose(),n._leftController=null),o.hand==="right"&&n._rightController!=null&&(n._rightController.dispose(),n._rightController=null))},this._workingVector=l.e.Zero(),this._workingQuaternion=l.b.Identity(),this._workingMatrix=l.a.Identity(),this._scene=t,this._inputElement=t.getEngine().getInputElement(),"getVRDisplays"in navigator||(e.useXR=!0),e.createFallbackVRDeviceOrientationFreeCamera===void 0&&(e.createFallbackVRDeviceOrientationFreeCamera=!0),e.createDeviceOrientationCamera===void 0&&(e.createDeviceOrientationCamera=!0),e.laserToggle===void 0&&(e.laserToggle=!0),e.defaultHeight===void 0&&(e.defaultHeight=1.7),e.useCustomVRButton&&(this._useCustomVRButton=!0,e.customVRButton&&(this._btnVR=e.customVRButton)),e.rayLength&&(this._rayLength=e.rayLength),this._defaultHeight=e.defaultHeight,e.positionScale&&(this._rayLength*=e.positionScale,this._defaultHeight*=e.positionScale),this._hasEnteredVR=!1,this._scene.activeCamera?this._position=this._scene.activeCamera.position.clone():this._position=new l.e(0,this._defaultHeight,0),e.createDeviceOrientationCamera||!this._scene.activeCamera){if(this._deviceOrientationCamera=new Go("deviceOrientationVRHelper",this._position.clone(),t),this._scene.activeCamera&&(this._deviceOrientationCamera.minZ=this._scene.activeCamera.minZ,this._deviceOrientationCamera.maxZ=this._scene.activeCamera.maxZ,this._scene.activeCamera instanceof Ni&&this._scene.activeCamera.rotation)){var i=this._scene.activeCamera;i.rotationQuaternion?this._deviceOrientationCamera.rotationQuaternion.copyFrom(i.rotationQuaternion):this._deviceOrientationCamera.rotationQuaternion.copyFrom(l.b.RotationYawPitchRoll(i.rotation.y,i.rotation.x,i.rotation.z)),this._deviceOrientationCamera.rotation=i.rotation.clone()}this._scene.activeCamera=this._deviceOrientationCamera,this._inputElement&&this._scene.activeCamera.attachControl()}else this._existingCamera=this._scene.activeCamera;this.webVROptions.useXR&&navigator.xr?Ss.IsSessionSupportedAsync("immersive-vr").then(function(o){o?(u.a.Log("Using WebXR. It is recommended to use the WebXRDefaultExperience directly"),t.createDefaultXRExperienceAsync({floorMeshes:e.floorMeshes||[]}).then(function(a){n.xr=a,n.xrTestDone=!0,n._cameraGazer=new ql(function(){return n.xr.baseExperience.camera},t),n.xr.baseExperience.onStateChangedObservable.add(function(s){switch(s){case _n.ENTERING_XR:n.onEnteringVRObservable.notifyObservers(n),n._interactionsEnabled||n.xr.pointerSelection.detach(),n.xr.pointerSelection.displayLaserPointer=n._displayLaserPointer;break;case _n.EXITING_XR:n.onExitingVRObservable.notifyObservers(n),n._scene.getEngine().resize();break;case _n.IN_XR:n._hasEnteredVR=!0;break;case _n.NOT_IN_XR:n._hasEnteredVR=!1}})})):n.completeVRInit(t,e)}):this.completeVRInit(t,e)}return Object.defineProperty(r.prototype,"onEnteringVR",{get:function(){return this.onEnteringVRObservable},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onExitingVR",{get:function(){return this.onExitingVRObservable},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onControllerMeshLoaded",{get:function(){return this.onControllerMeshLoadedObservable},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"teleportationTarget",{get:function(){return this._teleportationTarget},set:function(t){t&&(t.name="teleportationTarget",this._isDefaultTeleportationTarget=!1,this._teleportationTarget=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"gazeTrackerMesh",{get:function(){return this._cameraGazer._gazeTracker},set:function(t){t&&(this._cameraGazer._gazeTracker&&this._cameraGazer._gazeTracker.dispose(),this._leftController&&this._leftController._gazeTracker&&this._leftController._gazeTracker.dispose(),this._rightController&&this._rightController._gazeTracker&&this._rightController._gazeTracker.dispose(),this._cameraGazer._gazeTracker=t,this._cameraGazer._gazeTracker.bakeCurrentTransformIntoVertices(),this._cameraGazer._gazeTracker.isPickable=!1,this._cameraGazer._gazeTracker.isVisible=!1,this._cameraGazer._gazeTracker.name="gazeTracker",this._leftController&&(this._leftController._gazeTracker=this._cameraGazer._gazeTracker.clone("gazeTracker")),this._rightController&&(this._rightController._gazeTracker=this._cameraGazer._gazeTracker.clone("gazeTracker")))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"leftControllerGazeTrackerMesh",{get:function(){return this._leftController?this._leftController._gazeTracker:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"rightControllerGazeTrackerMesh",{get:function(){return this._rightController?this._rightController._gazeTracker:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"displayGaze",{get:function(){return this._displayGaze},set:function(t){this._displayGaze=t,t||(this._cameraGazer._gazeTracker.isVisible=!1,this._leftController&&(this._leftController._gazeTracker.isVisible=!1),this._rightController&&(this._rightController._gazeTracker.isVisible=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"displayLaserPointer",{get:function(){return this._displayLaserPointer},set:function(t){this._displayLaserPointer=t,t?(this._rightController&&this._rightController._activatePointer(),this._leftController&&this._leftController._activatePointer()):(this._rightController&&(this._rightController._deactivatePointer(),this._rightController._gazeTracker.isVisible=!1),this._leftController&&(this._leftController._deactivatePointer(),this._leftController._gazeTracker.isVisible=!1))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"deviceOrientationCamera",{get:function(){return this._deviceOrientationCamera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentVRCamera",{get:function(){return this._webVRready?this._webVRCamera:this._scene.activeCamera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"webVRCamera",{get:function(){return this._webVRCamera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"vrDeviceOrientationCamera",{get:function(){return this._vrDeviceOrientationCamera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"vrButton",{get:function(){return this._btnVR},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"_teleportationRequestInitiated",{get:function(){return this._cameraGazer._teleportationRequestInitiated||this._leftController!==null&&this._leftController._teleportationRequestInitiated||this._rightController!==null&&this._rightController._teleportationRequestInitiated},enumerable:!1,configurable:!0}),r.prototype.completeVRInit=function(t,e){var n=this;if(this.xrTestDone=!0,e.createFallbackVRDeviceOrientationFreeCamera&&(e.useMultiview&&(e.vrDeviceOrientationCameraMetrics||(e.vrDeviceOrientationCameraMetrics=gr.GetDefault()),e.vrDeviceOrientationCameraMetrics.multiviewEnabled=!0),this._vrDeviceOrientationCamera=new jo("VRDeviceOrientationVRHelper",this._position,this._scene,!0,e.vrDeviceOrientationCameraMetrics),this._vrDeviceOrientationCamera.angularSensibility=Number.MAX_VALUE),this._webVRCamera=new Wo("WebVRHelper",this._position,this._scene,e),this._webVRCamera.useStandingMatrix(),this._cameraGazer=new ql(function(){return n.currentVRCamera},t),!this._useCustomVRButton){this._btnVR=document.createElement("BUTTON"),this._btnVR.className="babylonVRicon",this._btnVR.id="babylonVRiconbtn",this._btnVR.title="Click to switch to VR";var i=".babylonVRicon { position: absolute; right: 20px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url("+(window.SVGSVGElement?"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A":"https://cdn.babylonjs.com/Assets/vrButton.png")+"); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }";i+=".babylonVRicon.vrdisplaypresenting { display: none; }";var o=document.createElement("style");o.appendChild(document.createTextNode(i)),document.getElementsByTagName("head")[0].appendChild(o),this.moveButtonToBottomRight()}this._btnVR&&this._btnVR.addEventListener("click",function(){n.isInVRMode?n._scene.getEngine().disableVR():n.enterVR()});var a=this._scene.getEngine().getHostWindow();a&&(a.addEventListener("resize",this._onResize),document.addEventListener("fullscreenchange",this._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",this._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",this._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",this._onFullscreenChange,!1),document.onmsfullscreenchange=this._onFullscreenChange,e.createFallbackVRDeviceOrientationFreeCamera?this.displayVRButton():this._scene.getEngine().onVRDisplayChangedObservable.add(function(s){s.vrDisplay&&n.displayVRButton()}),this._onKeyDown=function(s){s.keyCode===27&&n.isInVRMode&&n.exitVR()},document.addEventListener("keydown",this._onKeyDown),this._scene.onPrePointerObservable.add(function(){n._hasEnteredVR&&n.exitVROnDoubleTap&&(n.exitVR(),n._fullscreenVRpresenting&&n._scene.getEngine().exitFullscreen())},Tt.a.POINTERDOUBLETAP,!1),this._onVRDisplayChanged=function(s){return n.onVRDisplayChanged(s)},this._onVrDisplayPresentChange=function(){return n.onVrDisplayPresentChange()},this._onVRRequestPresentStart=function(){n._webVRrequesting=!0,n.updateButtonVisibility()},this._onVRRequestPresentComplete=function(){n._webVRrequesting=!1,n.updateButtonVisibility()},t.getEngine().onVRDisplayChangedObservable.add(this._onVRDisplayChanged),t.getEngine().onVRRequestPresentStart.add(this._onVRRequestPresentStart),t.getEngine().onVRRequestPresentComplete.add(this._onVRRequestPresentComplete),a.addEventListener("vrdisplaypresentchange",this._onVrDisplayPresentChange),t.onDisposeObservable.add(function(){n.dispose()}),this._webVRCamera.onControllerMeshLoadedObservable.add(function(s){return n._onDefaultMeshLoaded(s)}),this._scene.gamepadManager.onGamepadConnectedObservable.add(this._onNewGamepadConnected),this._scene.gamepadManager.onGamepadDisconnectedObservable.add(this._onNewGamepadDisconnected),this.updateButtonVisibility(),this._circleEase=new it,this._circleEase.setEasingMode(ze.EASINGMODE_EASEINOUT),this._teleportationEasing=this._circleEase,t.onPointerObservable.add(function(s){n._interactionsEnabled&&t.activeCamera===n.vrDeviceOrientationCamera&&s.event.pointerType==="mouse"&&(s.type===Tt.a.POINTERDOWN?n._cameraGazer._selectionPointerDown():s.type===Tt.a.POINTERUP&&n._cameraGazer._selectionPointerUp())}),this.webVROptions.floorMeshes&&this.enableTeleportation({floorMeshes:this.webVROptions.floorMeshes}))},r.prototype._onDefaultMeshLoaded=function(t){this._leftController&&this._leftController.webVRController==t&&t.mesh&&this._leftController._setLaserPointerParent(t.mesh),this._rightController&&this._rightController.webVRController==t&&t.mesh&&this._rightController._setLaserPointerParent(t.mesh);try{this.onControllerMeshLoadedObservable.notifyObservers(t)}catch(e){u.a.Warn("Error in your custom logic onControllerMeshLoaded: "+e)}},Object.defineProperty(r.prototype,"isInVRMode",{get:function(){return this.xr&&this.webVROptions.useXR&&this.xr.baseExperience.state===_n.IN_XR||this._webVRpresenting||this._fullscreenVRpresenting},enumerable:!1,configurable:!0}),r.prototype.onVrDisplayPresentChange=function(){var t=this._scene.getEngine().getVRDevice();if(t){var e=this._webVRpresenting;this._webVRpresenting=t.isPresenting,e&&!this._webVRpresenting&&this.exitVR()}else u.a.Warn("Detected VRDisplayPresentChange on an unknown VRDisplay. Did you can enterVR on the vrExperienceHelper?");this.updateButtonVisibility()},r.prototype.onVRDisplayChanged=function(t){this._webVRsupported=t.vrSupported,this._webVRready=!!t.vrDisplay,this._webVRpresenting=t.vrDisplay&&t.vrDisplay.isPresenting,this.updateButtonVisibility()},r.prototype.moveButtonToBottomRight=function(){if(this._inputElement&&!this._useCustomVRButton&&this._btnVR){var t=this._inputElement.getBoundingClientRect();this._btnVR.style.top=t.top+t.height-70+"px",this._btnVR.style.left=t.left+t.width-100+"px"}},r.prototype.displayVRButton=function(){this._useCustomVRButton||this._btnVRDisplayed||!this._btnVR||(document.body.appendChild(this._btnVR),this._btnVRDisplayed=!0)},r.prototype.updateButtonVisibility=function(){this._btnVR&&!this._useCustomVRButton&&(this._btnVR.className="babylonVRicon",this.isInVRMode?this._btnVR.className+=" vrdisplaypresenting":(this._webVRready&&(this._btnVR.className+=" vrdisplayready"),this._webVRsupported&&(this._btnVR.className+=" vrdisplaysupported"),this._webVRrequesting&&(this._btnVR.className+=" vrdisplayrequesting")))},r.prototype.enterVR=function(){var t=this;if(this.xr)this.xr.baseExperience.enterXRAsync("immersive-vr","local-floor",this.xr.renderTarget);else{if(this.onEnteringVRObservable)try{this.onEnteringVRObservable.notifyObservers(this)}catch(o){u.a.Warn("Error in your custom logic onEnteringVR: "+o)}if(this._scene.activeCamera){if(this._position=this._scene.activeCamera.position.clone(),this.vrDeviceOrientationCamera&&(this.vrDeviceOrientationCamera.rotation=l.b.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles(),this.vrDeviceOrientationCamera.angularSensibility=2e3),this.webVRCamera){var e=this.webVRCamera.deviceRotationQuaternion.toEulerAngles().y,n=l.b.FromRotationMatrix(this._scene.activeCamera.getWorldMatrix().getRotationMatrix()).toEulerAngles().y-e,i=this.webVRCamera.rotationQuaternion.toEulerAngles().y;this.webVRCamera.rotationQuaternion=l.b.FromEulerAngles(0,i+n,0)}this._existingCamera=this._scene.activeCamera,this._existingCamera.angularSensibilityX&&(this._cachedAngularSensibility.angularSensibilityX=this._existingCamera.angularSensibilityX,this._existingCamera.angularSensibilityX=Number.MAX_VALUE),this._existingCamera.angularSensibilityY&&(this._cachedAngularSensibility.angularSensibilityY=this._existingCamera.angularSensibilityY,this._existingCamera.angularSensibilityY=Number.MAX_VALUE),this._existingCamera.angularSensibility&&(this._cachedAngularSensibility.angularSensibility=this._existingCamera.angularSensibility,this._existingCamera.angularSensibility=Number.MAX_VALUE)}this._webVRrequesting||(this._webVRready?this._webVRpresenting||(this._scene.getEngine().onVRRequestPresentComplete.addOnce(function(o){t.onAfterEnteringVRObservable.notifyObservers({success:o})}),this._webVRCamera.position=this._position,this._scene.activeCamera=this._webVRCamera):this._vrDeviceOrientationCamera&&(this._vrDeviceOrientationCamera.position=this._position,this._scene.activeCamera&&(this._vrDeviceOrientationCamera.minZ=this._scene.activeCamera.minZ),this._scene.activeCamera=this._vrDeviceOrientationCamera,this._scene.getEngine().enterFullscreen(this.requestPointerLockOnFullScreen),this.updateButtonVisibility(),this._vrDeviceOrientationCamera.onViewMatrixChangedObservable.addOnce(function(){t.onAfterEnteringVRObservable.notifyObservers({success:!0})})),this._scene.activeCamera&&this._inputElement&&this._scene.activeCamera.attachControl(),this._interactionsEnabled&&this._scene.registerBeforeRender(this.beforeRender),this._displayLaserPointer&&[this._leftController,this._rightController].forEach(function(o){o&&o._activatePointer()}),this._hasEnteredVR=!0)}},r.prototype.exitVR=function(){if(this.xr)this.xr.baseExperience.exitXRAsync();else if(this._hasEnteredVR){if(this.onExitingVRObservable)try{this.onExitingVRObservable.notifyObservers(this)}catch(e){u.a.Warn("Error in your custom logic onExitingVR: "+e)}this._webVRpresenting&&this._scene.getEngine().disableVR(),this._scene.activeCamera&&(this._position=this._scene.activeCamera.position.clone()),this.vrDeviceOrientationCamera&&(this.vrDeviceOrientationCamera.angularSensibility=Number.MAX_VALUE),this._deviceOrientationCamera?(this._deviceOrientationCamera.position=this._position,this._scene.activeCamera=this._deviceOrientationCamera,this._cachedAngularSensibility.angularSensibilityX&&(this._deviceOrientationCamera.angularSensibilityX=this._cachedAngularSensibility.angularSensibilityX,this._cachedAngularSensibility.angularSensibilityX=null),this._cachedAngularSensibility.angularSensibilityY&&(this._deviceOrientationCamera.angularSensibilityY=this._cachedAngularSensibility.angularSensibilityY,this._cachedAngularSensibility.angularSensibilityY=null),this._cachedAngularSensibility.angularSensibility&&(this._deviceOrientationCamera.angularSensibility=this._cachedAngularSensibility.angularSensibility,this._cachedAngularSensibility.angularSensibility=null)):this._existingCamera&&(this._existingCamera.position=this._position,this._scene.activeCamera=this._existingCamera,this._inputElement&&this._scene.activeCamera.attachControl(),this._cachedAngularSensibility.angularSensibilityX&&(this._existingCamera.angularSensibilityX=this._cachedAngularSensibility.angularSensibilityX,this._cachedAngularSensibility.angularSensibilityX=null),this._cachedAngularSensibility.angularSensibilityY&&(this._existingCamera.angularSensibilityY=this._cachedAngularSensibility.angularSensibilityY,this._cachedAngularSensibility.angularSensibilityY=null),this._cachedAngularSensibility.angularSensibility&&(this._existingCamera.angularSensibility=this._cachedAngularSensibility.angularSensibility,this._cachedAngularSensibility.angularSensibility=null)),this.updateButtonVisibility(),this._interactionsEnabled&&(this._scene.unregisterBeforeRender(this.beforeRender),this._cameraGazer._gazeTracker.isVisible=!1,this._leftController&&(this._leftController._gazeTracker.isVisible=!1),this._rightController&&(this._rightController._gazeTracker.isVisible=!1)),this._scene.getEngine().resize(),[this._leftController,this._rightController].forEach(function(e){e&&e._deactivatePointer()}),this._hasEnteredVR=!1;var t=this._scene.getEngine();t._onVrDisplayPresentChange&&t._onVrDisplayPresentChange()}},Object.defineProperty(r.prototype,"position",{get:function(){return this._position},set:function(t){this._position=t,this._scene.activeCamera&&(this._scene.activeCamera.position=t)},enumerable:!1,configurable:!0}),r.prototype.enableInteractions=function(){var t=this;if(!this._interactionsEnabled){if(this._interactionsRequested=!0,this.xr)return void(this.xr.baseExperience.state===_n.IN_XR&&this.xr.pointerSelection.attach());this._leftController&&this._enableInteractionOnController(this._leftController),this._rightController&&this._enableInteractionOnController(this._rightController),this.raySelectionPredicate=function(e){return e.isVisible&&(e.isPickable||e.name===t._floorMeshName)},this.meshSelectionPredicate=function(){return!0},this._raySelectionPredicate=function(e){return!!(t._isTeleportationFloor(e)||e.name.indexOf("gazeTracker")===-1&&e.name.indexOf("teleportationTarget")===-1&&e.name.indexOf("torusTeleportation")===-1)&&t.raySelectionPredicate(e)},this._interactionsEnabled=!0}},Object.defineProperty(r.prototype,"_noControllerIsActive",{get:function(){return!(this._leftController&&this._leftController._activePointer||this._rightController&&this._rightController._activePointer)},enumerable:!1,configurable:!0}),r.prototype._isTeleportationFloor=function(t){for(var e=0;e-1||this._floorMeshesCollection.push(t))},r.prototype.removeFloorMesh=function(t){if(this._floorMeshesCollection){var e=this._floorMeshesCollection.indexOf(t);e!==-1&&this._floorMeshesCollection.splice(e,1)}},r.prototype.enableTeleportation=function(t){var e=this;if(t===void 0&&(t={}),!this._teleportationInitialized){if(this._teleportationRequested=!0,this.enableInteractions(),this.webVROptions.useXR&&(t.floorMeshes||t.floorMeshName)){var n=t.floorMeshes||[];if(!n.length){var i=this._scene.getMeshByName(t.floorMeshName);i&&n.push(i)}if(this.xr)return n.forEach(function(s){e.xr.teleportation.addFloorMesh(s)}),void(this.xr.teleportation.attached||this.xr.teleportation.attach());if(!this.xrTestDone){var o=function(){e.xrTestDone&&(e._scene.unregisterBeforeRender(o),e.xr?e.xr.teleportation.attached||e.xr.teleportation.attach():e.enableTeleportation(t))};return void this._scene.registerBeforeRender(o)}}t.floorMeshName&&(this._floorMeshName=t.floorMeshName),t.floorMeshes&&(this._floorMeshesCollection=t.floorMeshes),t.teleportationMode&&(this._teleportationMode=t.teleportationMode),t.teleportationTime&&t.teleportationTime>0&&(this._teleportationTime=t.teleportationTime),t.teleportationSpeed&&t.teleportationSpeed>0&&(this._teleportationSpeed=t.teleportationSpeed),t.easingFunction!==void 0&&(this._teleportationEasing=t.easingFunction),this._leftController!=null&&this._enableTeleportationOnController(this._leftController),this._rightController!=null&&this._enableTeleportationOnController(this._rightController);var a=new yn.a;a.vignetteColor=new O.b(0,0,0,0),a.vignetteEnabled=!0,this._postProcessMove=new Xo("postProcessMove",1,this._webVRCamera,void 0,void 0,void 0,void 0,a),this._webVRCamera.detachPostProcess(this._postProcessMove),this._teleportationInitialized=!0,this._isDefaultTeleportationTarget&&(this._createTeleportationCircles(),this._teleportationTarget.scaling.scaleInPlace(this._webVRCamera.deviceScaleFactor))}},r.prototype._enableInteractionOnController=function(t){var e=this;t.webVRController.mesh&&(t._interactionsEnabled=!0,this.isInVRMode&&this._displayLaserPointer&&t._activatePointer(),this.webVROptions.laserToggle&&t.webVRController.onMainButtonStateChangedObservable.add(function(n){e._displayLaserPointer&&n.value===1&&(t._activePointer?t._deactivatePointer():t._activatePointer(),e.displayGaze&&(t._gazeTracker.isVisible=t._activePointer))}),t.webVRController.onTriggerStateChangedObservable.add(function(n){var i=t;e._noControllerIsActive&&(i=e._cameraGazer),i._pointerDownOnMeshAsked?n.valuee._padSensibilityUp&&i._selectionPointerDown()}))},r.prototype._checkTeleportWithRay=function(t,e){this._teleportationRequestInitiated&&!e._teleportationRequestInitiated||(e._teleportationRequestInitiated?Math.sqrt(t.y*t.y+t.x*t.x)-this._padSensibilityDown&&(e._rotationLeftAsked=!1):t.x<-this._padSensibilityUp&&e._dpadPressed&&(e._rotationLeftAsked=!0,this._rotationAllowed&&this._rotateCamera(!1)),e._rotationRightAsked?t.xthis._padSensibilityUp&&e._dpadPressed&&(e._rotationRightAsked=!0,this._rotationAllowed&&this._rotateCamera(!0)))},r.prototype._checkTeleportBackwards=function(t,e){if(!e._teleportationRequestInitiated)if(t.y>this._padSensibilityUp&&e._dpadPressed){if(!e._teleportationBackRequestInitiated){if(!this.currentVRCamera)return;var n=l.b.FromRotationMatrix(this.currentVRCamera.getWorldMatrix().getRotationMatrix()),i=this.currentVRCamera.position;this.currentVRCamera.devicePosition&&this.currentVRCamera.deviceRotationQuaternion&&(n=this.currentVRCamera.deviceRotationQuaternion,i=this.currentVRCamera.devicePosition),n.toEulerAnglesToRef(this._workingVector),this._workingVector.z=0,this._workingVector.x=0,l.b.RotationYawPitchRollToRef(this._workingVector.y,this._workingVector.x,this._workingVector.z,this._workingQuaternion),this._workingQuaternion.toRotationMatrix(this._workingMatrix),l.e.TransformCoordinatesToRef(this._teleportBackwardsVector,this._workingMatrix,this._workingVector);var o=new pn.a(i,this._workingVector),a=this._scene.pickWithRay(o,this._raySelectionPredicate);a&&a.pickedPoint&&a.pickedMesh&&this._isTeleportationFloor(a.pickedMesh)&&a.distance<5&&this.teleportCamera(a.pickedPoint),e._teleportationBackRequestInitiated=!0}}else e._teleportationBackRequestInitiated=!1},r.prototype._enableTeleportationOnController=function(t){var e=this;t.webVRController.mesh&&(t._interactionsEnabled||this._enableInteractionOnController(t),t._interactionsEnabled=!0,t._teleportationEnabled=!0,t.webVRController.controllerType===ri.VIVE&&(t._dpadPressed=!1,t.webVRController.onPadStateChangedObservable.add(function(n){t._dpadPressed=n.pressed,t._dpadPressed||(t._rotationLeftAsked=!1,t._rotationRightAsked=!1,t._teleportationBackRequestInitiated=!1)})),t.webVRController.onPadValuesChangedObservable.add(function(n){e.teleportationEnabled&&(e._checkTeleportBackwards(n,t),e._checkTeleportWithRay(n,t)),e._checkRotate(n,t)}))},r.prototype._createTeleportationCircles=function(){this._teleportationTarget=De.a.CreateGround("teleportationTarget",2,2,2,this._scene),this._teleportationTarget.isPickable=!1;var t=new Si.a("DynamicTexture",512,this._scene,!0);t.hasAlpha=!0;var e=t.getContext();e.beginPath(),e.arc(256,256,200,0,2*Math.PI,!1),e.fillStyle=this._teleportationFillColor,e.fill(),e.lineWidth=10,e.strokeStyle=this._teleportationBorderColor,e.stroke(),e.closePath(),t.update();var n=new Ft.a("TextPlaneMaterial",this._scene);n.diffuseTexture=t,this._teleportationTarget.material=n;var i=De.a.CreateTorus("torusTeleportation",.75,.1,25,this._scene,!1);i.isPickable=!1,i.parent=this._teleportationTarget;var o=new k("animationInnerCircle","position.y",30,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CYCLE),a=[];a.push({frame:0,value:0}),a.push({frame:30,value:.4}),a.push({frame:60,value:0}),o.setKeys(a);var s=new sn;s.setEasingMode(ze.EASINGMODE_EASEINOUT),o.setEasingFunction(s),i.animations=[],i.animations.push(o),this._scene.beginAnimation(i,0,60,!0),this._hideTeleportationTarget()},r.prototype._displayTeleportationTarget=function(){this._teleportActive=!0,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!0,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!0))},r.prototype._hideTeleportationTarget=function(){this._teleportActive=!1,this._teleportationInitialized&&(this._teleportationTarget.isVisible=!1,this._isDefaultTeleportationTarget&&(this._teleportationTarget.getChildren()[0].isVisible=!1))},r.prototype._rotateCamera=function(t){var e=this;if(this.currentVRCamera instanceof Yn){t?this._rotationAngle++:this._rotationAngle--,this.currentVRCamera.animations=[];var n=l.b.FromRotationMatrix(l.a.RotationY(Math.PI/4*this._rotationAngle)),i=new k("animationRotation","rotationQuaternion",90,k.ANIMATIONTYPE_QUATERNION,k.ANIMATIONLOOPMODE_CONSTANT),o=[];o.push({frame:0,value:this.currentVRCamera.rotationQuaternion}),o.push({frame:6,value:n}),i.setKeys(o),i.setEasingFunction(this._circleEase),this.currentVRCamera.animations.push(i),this._postProcessMove.animations=[];var a=new k("animationPP","vignetteWeight",90,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CONSTANT),s=[];s.push({frame:0,value:0}),s.push({frame:3,value:4}),s.push({frame:6,value:0}),a.setKeys(s),a.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(a);var d=new k("animationPP2","vignetteStretch",90,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CONSTANT),p=[];p.push({frame:0,value:0}),p.push({frame:3,value:10}),p.push({frame:6,value:0}),d.setKeys(p),d.setEasingFunction(this._circleEase),this._postProcessMove.animations.push(d),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._postProcessMove.samples=4,this._webVRCamera.attachPostProcess(this._postProcessMove),this._scene.beginAnimation(this._postProcessMove,0,6,!1,1,function(){e._webVRCamera.detachPostProcess(e._postProcessMove)}),this._scene.beginAnimation(this.currentVRCamera,0,6,!1,1)}},r.prototype._moveTeleportationSelectorTo=function(t,e,n){if(t.pickedPoint){e._teleportationRequestInitiated&&(this._displayTeleportationTarget(),this._haloCenter.copyFrom(t.pickedPoint),this._teleportationTarget.position.copyFrom(t.pickedPoint));var i=this._convertNormalToDirectionOfRay(t.getNormal(!0,!1),n);if(i){var o=l.e.Cross(ye.a.Y,i),a=l.e.Cross(i,o);l.e.RotationFromAxisToRef(a,i,o,this._teleportationTarget.rotation)}this._teleportationTarget.position.y+=.1}},r.prototype.teleportCamera=function(t){var e=this;if(this.currentVRCamera instanceof Yn){this.webVRCamera.leftCamera?(this._workingVector.copyFrom(this.webVRCamera.leftCamera.globalPosition),this._workingVector.subtractInPlace(this.webVRCamera.position),t.subtractToRef(this._workingVector,this._workingVector)):this._workingVector.copyFrom(t),this.isInVRMode?this._workingVector.y+=this.webVRCamera.deviceDistanceToRoomGround()*this._webVRCamera.deviceScaleFactor:this._workingVector.y+=this._defaultHeight,this.onBeforeCameraTeleport.notifyObservers(this._workingVector);var n,i;if(this._teleportationMode==r.TELEPORTATIONMODE_CONSTANTSPEED){i=90;var o=l.e.Distance(this.currentVRCamera.position,this._workingVector);n=this._teleportationSpeed/o}else i=Math.round(90*this._teleportationTime/1e3),n=1;this.currentVRCamera.animations=[];var a=new k("animationCameraTeleportation","position",90,k.ANIMATIONTYPE_VECTOR3,k.ANIMATIONLOOPMODE_CONSTANT),s=[{frame:0,value:this.currentVRCamera.position},{frame:i,value:this._workingVector}];a.setKeys(s),a.setEasingFunction(this._teleportationEasing),this.currentVRCamera.animations.push(a),this._postProcessMove.animations=[];var d=Math.round(i/2),p=new k("animationPP","vignetteWeight",90,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CONSTANT),y=[];y.push({frame:0,value:0}),y.push({frame:d,value:8}),y.push({frame:i,value:0}),p.setKeys(y),this._postProcessMove.animations.push(p);var C=new k("animationPP2","vignetteStretch",90,k.ANIMATIONTYPE_FLOAT,k.ANIMATIONLOOPMODE_CONSTANT),M=[];M.push({frame:0,value:0}),M.push({frame:d,value:10}),M.push({frame:i,value:0}),C.setKeys(M),this._postProcessMove.animations.push(C),this._postProcessMove.imageProcessingConfiguration.vignetteWeight=0,this._postProcessMove.imageProcessingConfiguration.vignetteStretch=0,this._webVRCamera.attachPostProcess(this._postProcessMove),this._scene.beginAnimation(this._postProcessMove,0,i,!1,n,function(){e._webVRCamera.detachPostProcess(e._postProcessMove)}),this._scene.beginAnimation(this.currentVRCamera,0,i,!1,n,function(){e.onAfterCameraTeleport.notifyObservers(e._workingVector)}),this._hideTeleportationTarget()}},r.prototype._convertNormalToDirectionOfRay=function(t,e){return t&&Math.acos(l.e.Dot(t,e.direction))s){var d=s;s=a,a=d}return a>0&&a0&&s=0))},r.prototype._canDoCollision=function(t,e,n,i){var o=l.e.Distance(this._basePointWorld,t),a=Math.max(this._radius.x,this._radius.y,this._radius.z);return!(o>this._velocityWorldLength+a+e)&&!!function(s,d,p,y){return!(s.x>p.x+y)&&!(p.x-y>d.x)&&!(s.y>p.y+y)&&!(p.y-y>d.y)&&!(s.z>p.z+y)&&!(p.z-y>d.z)}(n,i,this._basePointWorld,this._velocityWorldLength+a)},r.prototype._testTriangle=function(t,e,n,i,o,a,s){var d,p=!1;e||(e=[]),e[t]||(e[t]=new br.a(0,0,0,0),e[t].copyFromPoints(n,i,o));var y=e[t];if(a||y.isFrontFacingTo(this._normalizedVelocity,0)){var C=y.signedDistanceTo(this._basePoint),M=l.e.Dot(y.normal,this._velocity);if(M==0){if(Math.abs(C)>=1)return;p=!0,d=0}else{var U=(1-C)/M;if((d=(-1-C)/M)>U){var F=U;U=d,d=F}if(d>1||U<0)return;d<0&&(d=0),d>1&&(d=1)}this._collisionPoint.copyFromFloats(0,0,0);var z=!1,J=1;if(p||(this._basePoint.subtractToRef(y.normal,this._planeIntersectionPoint),this._velocity.scaleToRef(d,this._tempVector),this._planeIntersectionPoint.addInPlace(this._tempVector),this._checkPointInTriangle(this._planeIntersectionPoint,n,i,o,y.normal)&&(z=!0,J=d,this._collisionPoint.copyFrom(this._planeIntersectionPoint))),!z){var ie=this._velocity.lengthSquared(),se=ie;this._basePoint.subtractToRef(n,this._tempVector);var ce=2*l.e.Dot(this._velocity,this._tempVector),ue=this._tempVector.lengthSquared()-1,fe=yr(se,ce,ue,J);fe.found&&(J=fe.root,z=!0,this._collisionPoint.copyFrom(n)),this._basePoint.subtractToRef(i,this._tempVector),ce=2*l.e.Dot(this._velocity,this._tempVector),ue=this._tempVector.lengthSquared()-1,(fe=yr(se,ce,ue,J)).found&&(J=fe.root,z=!0,this._collisionPoint.copyFrom(i)),this._basePoint.subtractToRef(o,this._tempVector),ce=2*l.e.Dot(this._velocity,this._tempVector),ue=this._tempVector.lengthSquared()-1,(fe=yr(se,ce,ue,J)).found&&(J=fe.root,z=!0,this._collisionPoint.copyFrom(o)),i.subtractToRef(n,this._edge),n.subtractToRef(this._basePoint,this._baseToVertex);var ve=this._edge.lengthSquared(),Te=l.e.Dot(this._edge,this._velocity),Oe=l.e.Dot(this._edge,this._baseToVertex);if(se=ve*-ie+Te*Te,ce=ve*(2*l.e.Dot(this._velocity,this._baseToVertex))-2*Te*Oe,ue=ve*(1-this._baseToVertex.lengthSquared())+Oe*Oe,(fe=yr(se,ce,ue,J)).found){var Pe=(Te*fe.root-Oe)/ve;Pe>=0&&Pe<=1&&(J=fe.root,z=!0,this._edge.scaleInPlace(Pe),n.addToRef(this._edge,this._collisionPoint))}o.subtractToRef(i,this._edge),i.subtractToRef(this._basePoint,this._baseToVertex),ve=this._edge.lengthSquared(),Te=l.e.Dot(this._edge,this._velocity),Oe=l.e.Dot(this._edge,this._baseToVertex),se=ve*-ie+Te*Te,ce=ve*(2*l.e.Dot(this._velocity,this._baseToVertex))-2*Te*Oe,ue=ve*(1-this._baseToVertex.lengthSquared())+Oe*Oe,(fe=yr(se,ce,ue,J)).found&&(Pe=(Te*fe.root-Oe)/ve)>=0&&Pe<=1&&(J=fe.root,z=!0,this._edge.scaleInPlace(Pe),i.addToRef(this._edge,this._collisionPoint)),n.subtractToRef(o,this._edge),o.subtractToRef(this._basePoint,this._baseToVertex),ve=this._edge.lengthSquared(),Te=l.e.Dot(this._edge,this._velocity),Oe=l.e.Dot(this._edge,this._baseToVertex),se=ve*-ie+Te*Te,ce=ve*(2*l.e.Dot(this._velocity,this._baseToVertex))-2*Te*Oe,ue=ve*(1-this._baseToVertex.lengthSquared())+Oe*Oe,(fe=yr(se,ce,ue,J)).found&&(Pe=(Te*fe.root-Oe)/ve)>=0&&Pe<=1&&(J=fe.root,z=!0,this._edge.scaleInPlace(Pe),o.addToRef(this._edge,this._collisionPoint))}if(z){var Ee=J*this._velocity.length();(!this.collisionFound||Ee=i)o.copyFrom(t);else{var d=a?a.collisionMask:n.collisionMask;n._initialize(t,e,s);for(var p=a&&a.surroundingMeshes||this._scene.meshes,y=0;ythis.capacity&&this._depth-1&&this.entries.splice(n,1)}},r.prototype.addEntries=function(t){for(var e=0;e=i.buttons.length?o[n]=i.axes[n-i.buttons.length].valueOf():o[n]=i.buttons[n].value}},r.prototype._getGamepadDeviceType=function(t){return t.indexOf("054c")!==-1?Kt.DualShock:t.indexOf("Xbox One")!==-1||t.search("Xbox 360")!==-1||t.search("xinput")!==-1?Kt.Xbox:t.indexOf("057e")!==-1?Kt.Switch:Kt.Generic},r._MAX_KEYCODES=255,r._MAX_POINTER_INPUTS=7,r}(),iu=function(){function r(t,e,n){n===void 0&&(n=0),this.deviceType=e,this.deviceSlot=n,this.onInputChangedObservable=new P.c,this._deviceInputSystem=t}return r.prototype.getInput=function(t){return this._deviceInputSystem.pollInput(this.deviceType,this.deviceSlot,t)},r}(),ap=function(){function r(t){var e=this;this.onDeviceConnectedObservable=new P.c(function(i){e.getDevices().forEach(function(o){e.onDeviceConnectedObservable.notifyObserver(i,o)})}),this.onDeviceDisconnectedObservable=new P.c;var n=Object.keys(Kt).length/2;this._devices=new Array(n),this._firstDevice=new Array(n),this._deviceInputSystem=nu.Create(t),this._deviceInputSystem.onDeviceConnected=function(i,o){e._addDevice(i,o),e.onDeviceConnectedObservable.notifyObservers(e.getDeviceSource(i,o))},this._deviceInputSystem.onDeviceDisconnected=function(i,o){var a=e.getDeviceSource(i,o);e._removeDevice(i,o),e.onDeviceDisconnectedObservable.notifyObservers(a)},this._deviceInputSystem.onInputChanged||(this._deviceInputSystem.onInputChanged=function(i,o,a,s,d){var p;(p=e.getDeviceSource(i,o))===null||p===void 0||p.onInputChangedObservable.notifyObservers({inputIndex:a,previousState:s,currentState:d})})}return r.prototype.getDeviceSource=function(t,e){if(e===void 0){if(this._firstDevice[t]===void 0)return null;e=this._firstDevice[t]}return this._devices[t]&&this._devices[t][e]!==void 0?this._devices[t][e]:null},r.prototype.getDeviceSources=function(t){return this._devices[t].filter(function(e){return!!e})},r.prototype.getDevices=function(){var t=new Array;return this._devices.forEach(function(e){t.push.apply(t,e)}),t},r.prototype.dispose=function(){this.onDeviceConnectedObservable.clear(),this.onDeviceDisconnectedObservable.clear(),this._deviceInputSystem.dispose()},r.prototype._addDevice=function(t,e){this._devices[t]||(this._devices[t]=new Array),this._devices[t][e]||(this._devices[t][e]=new iu(this._deviceInputSystem,t,e),this._updateFirstDevices(t))},r.prototype._removeDevice=function(t,e){delete this._devices[t][e],this._updateFirstDevices(t)},r.prototype._updateFirstDevices=function(t){switch(t){case Kt.Keyboard:case Kt.Mouse:this._firstDevice[t]=0;break;case Kt.Touch:case Kt.DualShock:case Kt.Xbox:case Kt.Switch:case Kt.Generic:var e=this._devices[t];delete this._firstDevice[t];for(var n=0;nr.occlusionRetryCount))return!1;r.isOcclusionQueryInProgress=!1,r.occlusionInternalRetryCounter=0,r.isOccluded=r.occlusionType!==Dt.a.OCCLUSION_TYPE_OPTIMISTIC&&r.isOccluded}var n=this.getScene();if(n.getBoundingBoxRenderer){var i=n.getBoundingBoxRenderer();this._occlusionQuery||(this._occlusionQuery=t.createQuery()),t.beginOcclusionQuery(r.occlusionQueryAlgorithmType,this._occlusionQuery),i.renderOcclusionBoundingBox(this),t.endOcclusionQuery(r.occlusionQueryAlgorithmType),this._occlusionDataStorage.isOcclusionQueryInProgress=!0}return r.isOccluded};var sp=!0;Ve.a.prototype.createTransformFeedback=function(){return this._gl.createTransformFeedback()},Ve.a.prototype.deleteTransformFeedback=function(r){this._gl.deleteTransformFeedback(r)},Ve.a.prototype.bindTransformFeedback=function(r){this._gl.bindTransformFeedback(this._gl.TRANSFORM_FEEDBACK,r)},Ve.a.prototype.beginTransformFeedback=function(r){r===void 0&&(r=!0),this._gl.beginTransformFeedback(r?this._gl.POINTS:this._gl.TRIANGLES)},Ve.a.prototype.endTransformFeedback=function(){this._gl.endTransformFeedback()},Ve.a.prototype.setTranformFeedbackVaryings=function(r,t){this._gl.transformFeedbackVaryings(r,t,this._gl.INTERLEAVED_ATTRIBS)},Ve.a.prototype.bindTransformFeedbackBuffer=function(r){this._gl.bindBufferBase(this._gl.TRANSFORM_FEEDBACK_BUFFER,0,r?r.underlyingResource:null)},f(126),Bt.a.prototype.updateVideoTexture=function(r,t,e){if(r&&!r._isDisabled){var n=this._bindTextureDirectly(this._gl.TEXTURE_2D,r,!0);this._unpackFlipY(!e);try{if(this._videoTextureSupported===void 0&&(this._gl.getError(),this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,t),this._gl.getError()!==0?this._videoTextureSupported=!1:this._videoTextureSupported=!0),this._videoTextureSupported)this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,t);else{if(!r._workingCanvas){r._workingCanvas=Ts.a.CreateCanvas(r.width,r.height);var i=r._workingCanvas.getContext("2d");if(!i)throw new Error("Unable to get 2d context");r._workingContext=i,r._workingCanvas.width=r.width,r._workingCanvas.height=r.height}r._workingContext.clearRect(0,0,r.width,r.height),r._workingContext.drawImage(t,0,0,t.videoWidth,t.videoHeight,0,0,r.width,r.height),this._gl.texImage2D(this._gl.TEXTURE_2D,0,this._gl.RGBA,this._gl.RGBA,this._gl.UNSIGNED_BYTE,r._workingCanvas)}r.generateMipMaps&&this._gl.generateMipmap(this._gl.TEXTURE_2D),n||this._bindTextureDirectly(this._gl.TEXTURE_2D,null),r.isReady=!0}catch{r._isDisabled=!0}}},Bt.a.prototype.restoreSingleAttachment=function(){var r=this._gl;this.bindAttachments([r.BACK])},Bt.a.prototype.buildTextureLayout=function(r){for(var t=this._gl,e=[],n=0;n1?"COLOR_ATTACHMENT"+a:"COLOR_ATTACHMENT"+a+"_WEBGL"],n.readBuffer(i[a]),n.drawBuffers(i),n.blitFramebuffer(0,0,s.width,s.height,0,0,s.width,s.height,n.COLOR_BUFFER_BIT,n.NEAREST)}for(a=0;a1?"COLOR_ATTACHMENT"+a:"COLOR_ATTACHMENT"+a+"_WEBGL"];n.drawBuffers(i)}for(a=0;a1?"COLOR_ATTACHMENT"+se:"COLOR_ATTACHMENT"+se+"_WEBGL"];z.push(ve),J.push(Te),C.activeTexture(C["TEXTURE"+se]),C.bindTexture(C.TEXTURE_2D,ve._webGLTexture),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,fe.mag),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,fe.min),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE),C.texImage2D(C.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(ue),U,F,0,C.RGBA,this._getWebGLTextureType(ue),null),C.framebufferTexture2D(C.DRAW_FRAMEBUFFER,Te,C.TEXTURE_2D,ve._webGLTexture,0),e&&this._gl.generateMipmap(this._gl.TEXTURE_2D),this._bindTextureDirectly(C.TEXTURE_2D,null),ve._framebuffer=M,ve._depthStencilBuffer=ie,ve.baseWidth=U,ve.baseHeight=F,ve.width=U,ve.height=F,ve.isReady=!0,ve.samples=1,ve.generateMipMaps=e,ve.samplingMode=ce,ve.type=ue,ve._generateDepthBuffer=n,ve._generateStencilBuffer=i,ve._attachments=J,ve._textureArray=z,this._internalTexturesCache.push(ve)}if(o&&this._caps.depthTextureExtension){var Oe=new xt.a(this,xt.b.MultiRenderTarget);C.activeTexture(C.TEXTURE0),C.bindTexture(C.TEXTURE_2D,Oe._webGLTexture),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE),C.texImage2D(C.TEXTURE_2D,0,this.webGLVersion<2?C.DEPTH_COMPONENT:C.DEPTH_COMPONENT16,U,F,0,C.DEPTH_COMPONENT,C.UNSIGNED_SHORT,null),C.framebufferTexture2D(C.FRAMEBUFFER,C.DEPTH_ATTACHMENT,C.TEXTURE_2D,Oe._webGLTexture,0),Oe._framebuffer=M,Oe.baseWidth=U,Oe.baseHeight=F,Oe.width=U,Oe.height=F,Oe.isReady=!0,Oe.samples=1,Oe.generateMipMaps=e,Oe.samplingMode=C.NEAREST,Oe._generateDepthBuffer=n,Oe._generateStencilBuffer=i,z.push(Oe),this._internalTexturesCache.push(Oe)}return C.drawBuffers(J),this._bindUnboundFramebuffer(null),this.resetTextureCache(),z},Bt.a.prototype.updateMultipleRenderTargetTextureSampleCount=function(r,t){if(this.webGLVersion<2||!r)return 1;if(r[0].samples===t)return t;var e=r[0]._attachments.length;if(e===0)return 1;var n=this._gl;t=Math.min(t,this.getCaps().maxMSAASamples),r[0]._depthStencilBuffer&&(n.deleteRenderbuffer(r[0]._depthStencilBuffer),r[0]._depthStencilBuffer=null),r[0]._MSAAFramebuffer&&(n.deleteFramebuffer(r[0]._MSAAFramebuffer),r[0]._MSAAFramebuffer=null);for(var i=0;i1&&n.renderbufferStorageMultisample){var o=n.createFramebuffer();if(!o)throw new Error("Unable to create multi sampled framebuffer");this._bindUnboundFramebuffer(o);var a=this._setupFramebufferDepthAttachments(r[0]._generateStencilBuffer,r[0]._generateDepthBuffer,r[0].width,r[0].height,t),s=[];for(i=0;i1?"COLOR_ATTACHMENT"+i:"COLOR_ATTACHMENT"+i+"_WEBGL"],y=n.createRenderbuffer();if(!y)throw new Error("Unable to create multi sampled framebuffer");n.bindRenderbuffer(n.RENDERBUFFER,y),n.renderbufferStorageMultisample(n.RENDERBUFFER,t,this._getRGBAMultiSampleBufferFormat(d.type),d.width,d.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,p,n.RENDERBUFFER,y),d._MSAAFramebuffer=o,d._MSAARenderBuffer=y,d.samples=t,d._depthStencilBuffer=a,n.bindRenderbuffer(n.RENDERBUFFER,null),s.push(p)}n.drawBuffers(s)}else this._bindUnboundFramebuffer(r[0]._framebuffer);return this._bindUnboundFramebuffer(null),t};var ro=f(56);Bt.a.prototype._createDepthStencilCubeTexture=function(r,t){var e=new xt.a(this,xt.b.Unknown);if(e.isCube=!0,this.webGLVersion===1)return u.a.Error("Depth cube texture is not supported by WebGL 1."),e;var n=Object(c.a)({bilinearFiltering:!1,comparisonFunction:0,generateStencil:!1},t),i=this._gl;this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,e,!0),this._setupDepthStencilTexture(e,r,n.generateStencil,n.bilinearFiltering,n.comparisonFunction);for(var o=0;o<6;o++)n.generateStencil?i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,i.DEPTH24_STENCIL8,r,r,0,i.DEPTH_STENCIL,i.UNSIGNED_INT_24_8,null):i.texImage2D(i.TEXTURE_CUBE_MAP_POSITIVE_X+o,0,i.DEPTH_COMPONENT24,r,r,0,i.DEPTH_COMPONENT,i.UNSIGNED_INT,null);return this._bindTextureDirectly(i.TEXTURE_CUBE_MAP,null),e},Bt.a.prototype._partialLoadFile=function(r,t,e,n,i){i===void 0&&(i=null),this._loadFile(r,function(o){e[t]=o,e._internalCount++,e._internalCount===6&&n(e)},void 0,void 0,!0,function(o,a){i&&o&&i(o.status+" "+o.statusText,a)})},Bt.a.prototype._cascadeLoadFiles=function(r,t,e,n){n===void 0&&(n=null);var i=[];i._internalCount=0;for(var o=0;o<6;o++)this._partialLoadFile(e[o],o,i,t,n)},Bt.a.prototype._cascadeLoadImgs=function(r,t,e,n,i){n===void 0&&(n=null);var o=[];o._internalCount=0;for(var a=0;a<6;a++)this._partialLoadImg(e[a],a,o,r,t,n,i)},Bt.a.prototype._partialLoadImg=function(r,t,e,n,i,o,a){var s;o===void 0&&(o=null),s=ro.a.LoadImage(r,function(){s&&(e[t]=s,e._internalCount++,n&&n._removePendingData(s)),e._internalCount===6&&i(e)},function(d,p){n&&n._removePendingData(s),o&&o(d,p)},n?n.offlineProvider:null,a),n&&s&&n._addPendingData(s)},Bt.a.prototype._setCubeMapTextureParams=function(r,t){var e=this._gl;e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),r.samplingMode=t?h.a.TEXTURE_TRILINEAR_SAMPLINGMODE:h.a.TEXTURE_LINEAR_LINEAR,this._bindTextureDirectly(e.TEXTURE_CUBE_MAP,null)},Bt.a.prototype.createCubeTexture=function(r,t,e,n,i,o,a,s,d,p,y,C,M){var U=this;i===void 0&&(i=null),o===void 0&&(o=null),s===void 0&&(s=null),d===void 0&&(d=!1),p===void 0&&(p=0),y===void 0&&(y=0),C===void 0&&(C=null);var F=this._gl,z=C||new xt.a(this,xt.b.Cube);z.isCube=!0,z.url=r,z.generateMipMaps=!n,z._lodGenerationScale=p,z._lodGenerationOffset=y,this._doNotHandleContextLost||(z._extension=s,z._files=e);var J=r;this._transformTextureUrl&&!C&&(r=this._transformTextureUrl(r));for(var ie=r.lastIndexOf("."),se=s||(ie>-1?r.substring(ie).toLowerCase():""),ce=null,ue=0,fe=Bt.a._TextureLoaders;ue-1?r.substring(e,r.length):"";return(t>-1?r.substring(0,t):r)+this._textureFormatInUse+n}Object.defineProperty(Ve.a.prototype,"texturesSupported",{get:function(){var r=new Array;return this._caps.astc&&r.push("-astc.ktx"),this._caps.s3tc&&r.push("-dxt.ktx"),this._caps.pvrtc&&r.push("-pvrtc.ktx"),this._caps.etc2&&r.push("-etc2.ktx"),this._caps.etc1&&r.push("-etc1.ktx"),r},enumerable:!0,configurable:!0}),Object.defineProperty(Ve.a.prototype,"textureFormatInUse",{get:function(){return this._textureFormatInUse||null},enumerable:!0,configurable:!0}),Ve.a.prototype.setCompressedTextureExclusions=function(r){this._excludedCompressedTextures=r},Ve.a.prototype.setTextureFormatToUse=function(r){for(var t=this.texturesSupported,e=0,n=t.length;e -void main(void) -{ -gl_FragColor=toRGBD(texture2D(textureSampler,vUV).rgb); -}`;je.a.ShadersStore.rgbdEncodePixelShader=dp;var fp=` -varying vec2 vUV; -uniform sampler2D textureSampler; -#include -void main(void) -{ -gl_FragColor=vec4(fromRGBD(texture2D(textureSampler,vUV)),1.0); -}`;je.a.ShadersStore.rgbdDecodePixelShader=fp;var Ci=function(){function r(){}return r.GetEnvInfo=function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),n=0,i=0;i"u")Ke=createImageBitmap(Ie).then(function(rt){return n._OnImageReadyAsync(rt,o,a,d,Fe,xe,Ee,s,y,p,t)});else{var nt=new Image;nt.src=Fe,Ke=new Promise(function(rt,ut){nt.onload=function(){n._OnImageReadyAsync(nt,o,a,d,Fe,xe,Ee,s,y,p,t).then(function(){return rt()}).catch(function(qe){ut(qe)})},nt.onerror=function(qe){ut(qe)}})}ue.push(Ke)},Le=0;Le<6;Le++)Se(Le)};for(F=0;F=0&&F.push(J.substring(ie+1))}a!=="void"&&F.push("return"),this._functionDescr.push({name:s,type:a,parameters:F,body:M,callIndex:0}),t=C+1;var se=e>0?this._sourceCode.substring(0,e):"",ce=C+1=0},r.prototype._extractBetweenMarkers=function(t,e,n,i){for(var o=i,a=0,s="";o0?this._sourceCode.substring(0,y):"",fe=M+1"u"&&(window.URL={createObjectURL:function(){},revokeObjectURL:function(){}}),typeof Blob>"u"&&(window.Blob=function(){}),e._shaderProcessor=new su.a,e}return Object(c.d)(t,r),t.prototype.getHardwareScalingLevel=function(){return 1},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._boundBuffersVertexArray&&this._native.deleteVertexArray(this._boundBuffersVertexArray),this._native.dispose()},t.prototype._queueNewFrame=function(e,n){return n.requestAnimationFrame&&n!==window?n.requestAnimationFrame(e):this._native.requestAnimationFrame(e),0},t.prototype._bindUnboundFramebuffer=function(e){this._currentFramebuffer!==e&&(this._currentFramebuffer&&this._native.unbindFramebuffer(this._currentFramebuffer),e&&this._native.bindFramebuffer(e),this._currentFramebuffer=e)},t.prototype.getHostDocument=function(){return null},t.prototype.clear=function(e,n,i,o){o===void 0&&(o=!1);var a=0;n&&e&&(this._native.clearColor(e.r,e.g,e.b,e.a!==void 0?e.a:1),a|=this._native.CLEAR_FLAG_COLOR),i&&(this._native.clearDepth(1),a|=this._native.CLEAR_FLAG_DEPTH),o&&(this._native.clearStencil(0),a|=this._native.CLEAR_FLAG_STENCIL),this._native.clear(a)},t.prototype.createIndexBuffer=function(e,n){var i=this._normalizeIndexData(e),o=new lu;if(o.references=1,o.is32Bits=i.BYTES_PER_ELEMENT===4,i.length){if(o.nativeIndexBuffer=this._native.createIndexBuffer(i,n!=null&&n),o.nativeVertexBuffer===this.INVALID_HANDLE)throw new Error("Could not create a native index buffer.")}else o.nativeVertexBuffer=this.INVALID_HANDLE;return o},t.prototype.createVertexBuffer=function(e,n){var i=new lu;if(i.references=1,i.nativeVertexBuffer=this._native.createVertexBuffer(ArrayBuffer.isView(e)?e:new Float32Array(e),n!=null&&n),i.nativeVertexBuffer===this.INVALID_HANDLE)throw new Error("Could not create a native vertex buffer.");return i},t.prototype._recordVertexArrayObject=function(e,n,i,o){i&&this._native.recordIndexBuffer(e,i.nativeIndexBuffer);for(var a=o.getAttributesNames(),s=0;s=0){var p=n[a[s]];if(p){var y=p.getBuffer();y&&this._native.recordVertexBuffer(e,y.nativeVertexBuffer,d,p.byteOffset,p.byteStride,p.getSize(),this._getNativeAttribType(p.type),p.normalized)}}}},t.prototype.bindBuffers=function(e,n,i){this._boundBuffersVertexArray&&this._native.deleteVertexArray(this._boundBuffersVertexArray),this._boundBuffersVertexArray=this._native.createVertexArray(),this._recordVertexArrayObject(this._boundBuffersVertexArray,e,n,i),this._native.bindVertexArray(this._boundBuffersVertexArray)},t.prototype.recordVertexArrayObject=function(e,n,i){var o=this._native.createVertexArray();return this._recordVertexArrayObject(o,e,n,i),o},t.prototype.bindVertexArrayObject=function(e){this._native.bindVertexArray(e)},t.prototype.releaseVertexArrayObject=function(e){this._native.deleteVertexArray(e)},t.prototype.getAttributes=function(e,n){var i=e;return this._native.getAttributes(i.nativeProgram,n)},t.prototype.drawElementsType=function(e,n,i,o){this._drawCalls.addCount(1,!1),this._native.drawIndexed(e,n,i)},t.prototype.drawArraysType=function(e,n,i,o){this._drawCalls.addCount(1,!1),this._native.draw(e,n,i)},t.prototype.createPipelineContext=function(){return new pp},t.prototype._preparePipelineContext=function(e,n,i,o,a,s,d){var p=e;p.nativeProgram=o?this.createRawShaderProgram(e,n,i,void 0,d):this.createShaderProgram(e,n,i,s,void 0,d)},t.prototype._isRenderingStateCompiled=function(e){return!0},t.prototype._executeWhenRenderingStateIsCompiled=function(e,n){n()},t.prototype.createRawShaderProgram=function(e,n,i,o,a){throw new Error("Not Supported")},t.prototype.createShaderProgram=function(e,n,i,o,a,s){this.onBeforeShaderCompilationObservable.notifyObservers(this);var d=new Is(n);d.processCode(),n=d.code;var p=new Is(i);p.processCode(),i=p.code,n=Bt.a._ConcatenateShader(n,o),i=Bt.a._ConcatenateShader(i,o);var y=this._native.createProgram(n,i);return this.onAfterShaderCompilationObservable.notifyObservers(this),y},t.prototype._setProgram=function(e){this._currentProgram!==e&&(this._native.setProgram(e),this._currentProgram=e)},t.prototype._releaseEffect=function(e){},t.prototype._deletePipelineContext=function(e){},t.prototype.getUniforms=function(e,n){var i=e;return this._native.getUniforms(i.nativeProgram,n)},t.prototype.bindUniformBlock=function(e,n,i){throw new Error("Not Implemented")},t.prototype.bindSamplers=function(e){var n=e.getPipelineContext();this._setProgram(n.nativeProgram);for(var i=e.getSamplers(),o=0;o-1?e.substring(ue).toLowerCase():""),ve=null,Te=0,Oe=Ve.a._TextureLoaders;Te-1?e.substring(J).toLowerCase():""))===".env"){if(i&&i.length===6)throw new Error("Multi-file loading not allowed on env files.");this._loadFile(e,function(se){return function(ce){var ue=Ci.GetEnvInfo(ce);if(z.width=ue.width,z.height=ue.width,Ci.UploadEnvSpherical(z,ue),ue.version!==1)throw new Error('Unsupported babylon environment map version "'+ue.version+'"');var fe=ue.specular;if(!fe)throw new Error("Nothing else parsed so far");z._lodGenerationScale=fe.lodGenerationScale;var ve=Ci.CreateImageDataArrayBufferViews(ce,ue);z.format=h.a.TEXTUREFORMAT_RGBA,z.type=h.a.TEXTURETYPE_UNSIGNED_INT,z.generateMipMaps=!0,z.getEngine().updateTextureSamplingMode(we.a.TRILINEAR_SAMPLINGMODE,z),z._isRGBD=!0,z.invertY=!0,F._native.loadCubeTextureWithMips(z._webGLTexture,ve,function(){z.isReady=!0,a&&a()},function(){throw new Error("Could not load a native cube texture.")})}(new Uint8Array(se))},void 0,void 0,!0,function(se,ce){s&&se&&s(se.status+" "+se.statusText,ce)})}else{if(!i||i.length!==6)throw new Error("Cannot load cubemap because 6 files were not defined");var ie=[i[0],i[3],i[1],i[4],i[2],i[5]];Promise.all(ie.map(function(se){return Ye.b.LoadFileAsync(se).then(function(ce){return new Uint8Array(ce)})})).then(function(se){return new Promise(function(ce,ue){F._native.loadCubeTexture(z._webGLTexture,se,!o,ce,ue)})}).then(function(){z.isReady=!0,a&&a()},function(se){s&&s("Failed to load cubemap: "+se.message,se)})}return this._internalTexturesCache.push(z),z},t.prototype.createRenderTargetTexture=function(e,n){var i=new Ll.a;n!==void 0&&typeof n=="object"?(i.generateMipMaps=n.generateMipMaps,i.generateDepthBuffer=n.generateDepthBuffer===void 0||n.generateDepthBuffer,i.generateStencilBuffer=i.generateDepthBuffer&&n.generateStencilBuffer,i.type=n.type===void 0?h.a.TEXTURETYPE_UNSIGNED_INT:n.type,i.samplingMode=n.samplingMode===void 0?h.a.TEXTURE_TRILINEAR_SAMPLINGMODE:n.samplingMode,i.format=n.format===void 0?h.a.TEXTUREFORMAT_RGBA:n.format):(i.generateMipMaps=n,i.generateDepthBuffer=!0,i.generateStencilBuffer=!1,i.type=h.a.TEXTURETYPE_UNSIGNED_INT,i.samplingMode=h.a.TEXTURE_TRILINEAR_SAMPLINGMODE,i.format=h.a.TEXTUREFORMAT_RGBA),(i.type!==h.a.TEXTURETYPE_FLOAT||this._caps.textureFloatLinearFiltering)&&(i.type!==h.a.TEXTURETYPE_HALF_FLOAT||this._caps.textureHalfFloatLinearFiltering)||(i.samplingMode=h.a.TEXTURE_NEAREST_SAMPLINGMODE);var o=new uu(this,xt.b.RenderTarget),a=e.width||e,s=e.height||e;i.type!==h.a.TEXTURETYPE_FLOAT||this._caps.textureFloat||(i.type=h.a.TEXTURETYPE_UNSIGNED_INT,u.a.Warn("Float textures are not supported. Render target forced to TEXTURETYPE_UNSIGNED_BYTE type"));var d=this._native.createFramebuffer(o._webGLTexture,a,s,this._getNativeTextureFormat(i.format,i.type),i.samplingMode,!!i.generateStencilBuffer,i.generateDepthBuffer,!!i.generateMipMaps);return o._framebuffer=d,o.baseWidth=a,o.baseHeight=s,o.width=a,o.height=s,o.isReady=!0,o.samples=1,o.generateMipMaps=!!i.generateMipMaps,o.samplingMode=i.samplingMode,o.type=i.type,o.format=i.format,o._generateDepthBuffer=i.generateDepthBuffer,o._generateStencilBuffer=!!i.generateStencilBuffer,this._internalTexturesCache.push(o),o},t.prototype.updateTextureSamplingMode=function(e,n){if(n._webGLTexture){var i=this._getNativeSamplingMode(e);this._native.setTextureSampling(n._webGLTexture,i)}n.samplingMode=e},t.prototype.bindFramebuffer=function(e,n,i,o,a){if(n)throw new Error("Cuboid frame buffers are not yet supported in NativeEngine.");if(i||o)throw new Error("Required width/height for frame buffers not yet supported in NativeEngine.");e._depthStencilTexture?this._bindUnboundFramebuffer(e._depthStencilTexture._framebuffer):this._bindUnboundFramebuffer(e._framebuffer)},t.prototype.unBindFramebuffer=function(e,n,i){n===void 0&&(n=!1),n&&u.a.Warn("Disabling mipmap generation not yet supported in NativeEngine. Ignoring."),i&&i(),this._bindUnboundFramebuffer(null)},t.prototype.createDynamicVertexBuffer=function(e){return this.createVertexBuffer(e,!0)},t.prototype.updateDynamicIndexBuffer=function(e,n,i){i===void 0&&(i=0);var o=e,a=this._normalizeIndexData(n);o.is32Bits=a.BYTES_PER_ELEMENT===4,this._native.updateDynamicIndexBuffer(o.nativeIndexBuffer,a,i)},t.prototype.updateDynamicVertexBuffer=function(e,n,i,o){var a=e,s=ArrayBuffer.isView(n)?n:new Float32Array(n);this._native.updateDynamicVertexBuffer(a.nativeVertexBuffer,s,i??0,o??s.byteLength)},t.prototype._setTexture=function(e,n,i,o){o===void 0&&(o=!1);var a,s=this._boundUniforms[e];if(!s)return!1;if(!n)return this._boundTexturesCache[e]!=null&&(this._activeChannel=e,this._native.setTexture(s,null)),!1;if(n.video)this._activeChannel=e,n.update();else if(n.delayLoadState===h.a.DELAYLOADSTATE_NOTLOADED)return n.delayLoad(),!1;return a=o?n.depthStencilTexture:n.isReady()?n.getInternalTexture():n.isCube?this.emptyCubeTexture:n.is3D?this.emptyTexture3D:n.is2DArray?this.emptyTexture2DArray:this.emptyTexture,this._activeChannel=e,!(!a||!a._webGLTexture)&&(this._native.setTextureWrapMode(a._webGLTexture,this._getAddressMode(n.wrapU),this._getAddressMode(n.wrapV),this._getAddressMode(n.wrapR)),this._updateAnisotropicLevel(n),this._native.setTexture(s,a._webGLTexture),!0)},t.prototype._updateAnisotropicLevel=function(e){var n=e.getInternalTexture(),i=e.anisotropicFilteringLevel;n&&n._webGLTexture&&n._cachedAnisotropicFilteringLevel!==i&&(this._native.setTextureAnisotropicLevel(n._webGLTexture,i),n._cachedAnisotropicFilteringLevel=i)},t.prototype._getAddressMode=function(e){switch(e){case h.a.TEXTURE_WRAP_ADDRESSMODE:return this._native.ADDRESS_MODE_WRAP;case h.a.TEXTURE_CLAMP_ADDRESSMODE:return this._native.ADDRESS_MODE_CLAMP;case h.a.TEXTURE_MIRROR_ADDRESSMODE:return this._native.ADDRESS_MODE_MIRROR;default:throw new Error("Unexpected wrap mode: "+e+".")}},t.prototype._bindTexture=function(e,n){var i=this._boundUniforms[e];i&&this._native.setTexture(i,n._webGLTexture)},t.prototype._deleteBuffer=function(e){e.nativeIndexBuffer&&(this._native.deleteIndexBuffer(e.nativeIndexBuffer),delete e.nativeIndexBuffer),e.nativeVertexBuffer&&(this._native.deleteVertexBuffer(e.nativeVertexBuffer),delete e.nativeVertexBuffer)},t.prototype.releaseEffects=function(){},t.prototype._uploadCompressedDataToTextureDirectly=function(e,n,i,o,a,s,d){throw new Error("_uploadCompressedDataToTextureDirectly not implemented.")},t.prototype._uploadDataToTextureDirectly=function(e,n,i,o){throw new Error("_uploadDataToTextureDirectly not implemented.")},t.prototype._uploadArrayBufferViewToTexture=function(e,n,i,o){throw new Error("_uploadArrayBufferViewToTexture not implemented.")},t.prototype._uploadImageToTexture=function(e,n,i,o){throw new Error("_uploadArrayBufferViewToTexture not implemented.")},t.prototype._getNativeSamplingMode=function(e){switch(e){case h.a.TEXTURE_NEAREST_NEAREST:return this._native.TEXTURE_NEAREST_NEAREST;case h.a.TEXTURE_LINEAR_LINEAR:return this._native.TEXTURE_LINEAR_LINEAR;case h.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR:return this._native.TEXTURE_LINEAR_LINEAR_MIPLINEAR;case h.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST:return this._native.TEXTURE_NEAREST_NEAREST_MIPNEAREST;case h.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST:return this._native.TEXTURE_NEAREST_LINEAR_MIPNEAREST;case h.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR:return this._native.TEXTURE_NEAREST_LINEAR_MIPLINEAR;case h.a.TEXTURE_NEAREST_LINEAR:return this._native.TEXTURE_NEAREST_LINEAR;case h.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR:return this._native.TEXTURE_NEAREST_NEAREST_MIPLINEAR;case h.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST:return this._native.TEXTURE_LINEAR_NEAREST_MIPNEAREST;case h.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR:return this._native.TEXTURE_LINEAR_NEAREST_MIPLINEAR;case h.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST:return this._native.TEXTURE_LINEAR_LINEAR_MIPNEAREST;case h.a.TEXTURE_LINEAR_NEAREST:return this._native.TEXTURE_LINEAR_NEAREST;default:throw new Error("Unsupported sampling mode: "+e+".")}},t.prototype._getNativeTextureFormat=function(e,n){if(e==h.a.TEXTUREFORMAT_RGBA&&n==h.a.TEXTURETYPE_UNSIGNED_INT)return this._native.TEXTURE_FORMAT_RGBA8;if(e==h.a.TEXTUREFORMAT_RGBA&&n==h.a.TEXTURETYPE_FLOAT)return this._native.TEXTURE_FORMAT_RGBA32F;throw new Error("Unsupported texture format or type: format "+e+", type "+n+".")},t.prototype._getNativeAlphaMode=function(e){switch(e){case h.a.ALPHA_DISABLE:return this._native.ALPHA_DISABLE;case h.a.ALPHA_ADD:return this._native.ALPHA_ADD;case h.a.ALPHA_COMBINE:return this._native.ALPHA_COMBINE;case h.a.ALPHA_SUBTRACT:return this._native.ALPHA_SUBTRACT;case h.a.ALPHA_MULTIPLY:return this._native.ALPHA_MULTIPLY;case h.a.ALPHA_MAXIMIZED:return this._native.ALPHA_MAXIMIZED;case h.a.ALPHA_ONEONE:return this._native.ALPHA_ONEONE;case h.a.ALPHA_PREMULTIPLIED:return this._native.ALPHA_PREMULTIPLIED;case h.a.ALPHA_PREMULTIPLIED_PORTERDUFF:return this._native.ALPHA_PREMULTIPLIED_PORTERDUFF;case h.a.ALPHA_INTERPOLATE:return this._native.ALPHA_INTERPOLATE;case h.a.ALPHA_SCREENMODE:return this._native.ALPHA_SCREENMODE;default:throw new Error("Unsupported alpha mode: "+e+".")}},t.prototype._getNativeAttribType=function(e){switch(e){case Me.b.UNSIGNED_BYTE:return this._native.ATTRIB_TYPE_UINT8;case Me.b.SHORT:return this._native.ATTRIB_TYPE_INT16;case Me.b.FLOAT:return this._native.ATTRIB_TYPE_FLOAT;default:throw new Error("Unsupported attribute type: "+e+".")}},t}(Ve.a),mp=f(74),Qo=function(){function r(){}return r.COPY=1,r.CUT=2,r.PASTE=3,r}(),gp=function(){function r(t,e){this.type=t,this.event=e}return r.GetTypeFromCharacter=function(t){switch(t){case 67:return Qo.COPY;case 86:return Qo.PASTE;case 88:return Qo.CUT;default:return-1}},r}(),Ds=f(83),Ri=f(69);(function(r){r[r.Clean=0]="Clean",r[r.Stop=1]="Stop",r[r.Sync=2]="Sync",r[r.NoSync=3]="NoSync"})(xi||(xi={}));var Ut=function(){function r(){}return Object.defineProperty(r,"ForceFullSceneLoadingForIncremental",{get:function(){return Ri.a.ForceFullSceneLoadingForIncremental},set:function(t){Ri.a.ForceFullSceneLoadingForIncremental=t},enumerable:!1,configurable:!0}),Object.defineProperty(r,"ShowLoadingScreen",{get:function(){return Ri.a.ShowLoadingScreen},set:function(t){Ri.a.ShowLoadingScreen=t},enumerable:!1,configurable:!0}),Object.defineProperty(r,"loggingLevel",{get:function(){return Ri.a.loggingLevel},set:function(t){Ri.a.loggingLevel=t},enumerable:!1,configurable:!0}),Object.defineProperty(r,"CleanBoneMatrixWeights",{get:function(){return Ri.a.CleanBoneMatrixWeights},set:function(t){Ri.a.CleanBoneMatrixWeights=t},enumerable:!1,configurable:!0}),r.GetDefaultPlugin=function(){return r._registeredPlugins[".babylon"]},r._GetPluginForExtension=function(t){var e=r._registeredPlugins[t];return e||(u.a.Warn("Unable to find a plugin to load "+t+" files. Trying to use .babylon default plugin. To load from a specific filetype (eg. gltf) see: https://doc.babylonjs.com/how_to/load_from_any_file_type"),r.GetDefaultPlugin())},r._GetPluginForDirectLoad=function(t){for(var e in r._registeredPlugins){var n=r._registeredPlugins[e].plugin;if(n.canDirectLoad&&n.canDirectLoad(t))return r._registeredPlugins[e]}return r.GetDefaultPlugin()},r._GetPluginForFilename=function(t){var e=t.indexOf("?");e!==-1&&(t=t.substring(0,e));var n=t.lastIndexOf("."),i=t.substring(n,t.length).toLowerCase();return r._GetPluginForExtension(i)},r._GetDirectLoad=function(t){return t.substr(0,5)==="data:"?t.substr(5):null},r._LoadData=function(t,e,n,i,o,a,s){var d,p=r._GetDirectLoad(t.name),y=s?r._GetPluginForExtension(s):p?r._GetPluginForDirectLoad(t.name):r._GetPluginForFilename(t.name);if(!(d=y.plugin.createPlugin!==void 0?y.plugin.createPlugin():y.plugin))throw"The loader plugin corresponding to the file type you are trying to load has not been found. If using es6, please import the plugin you wish to use before.";if(r.OnPluginActivatedObservable.notifyObservers(d),p){if(d.directLoad){var C=d.directLoad(e,p);C.then?C.then(function(Pe){n(d,Pe)}).catch(function(Pe){o("Error in directLoad of _loadData: "+Pe,Pe)}):n(d,C)}else n(d,p);return d}var M=y.isBinary,U=function(Pe,Ee){e.isDisposed?o("Scene has been disposed"):n(d,Pe,Ee)},F=null,z=!1,J=d.onDisposeObservable;J&&J.add(function(){z=!0,F&&(F.abort(),F=null),a()});var ie=function(){if(!z){var Pe=function(Se,Le){U(Se,Le?Le.responseURL:void 0)},Ee=function(Se){o(Se.message,Se)};F=d.requestFile?d.requestFile(e,t.url,Pe,i,M,Ee):e._requestFile(t.url,Pe,i,!0,M,Ee)}},se=t.file||Ds.a.FilesToLoad[t.name.toLowerCase()];if(t.rootUrl.indexOf("file:")===-1||t.rootUrl.indexOf("file:")!==-1&&!se){var ce=e.getEngine(),ue=ce.enableOfflineSupport;if(ue){for(var fe=!1,ve=0,Te=e.disableOfflineSupportExceptionRules;veF.snapDistance?(Fe=Math.floor(Math.abs(Oe)/F.snapDistance),Oe<0&&(Fe*=-1),Oe%=F.snapDistance,Pe.scaleToRef(F.snapDistance*Fe,Pe),Ie=!0):Pe.scaleInPlace(0)),l.a.ScalingToRef(1+Pe.x,1+Pe.y,1+Pe.z,F._tmpMatrix2),F._tmpMatrix2.multiplyToRef(F.attachedNode.getWorldMatrix(),F._tmpMatrix),F._tmpMatrix.decompose(F._tmpVector),Math.abs(F._tmpVector.x)<1e5&&Math.abs(F._tmpVector.y)<1e5&&Math.abs(F._tmpVector.z)<1e5&&F.attachedNode.getWorldMatrix().copyFrom(F._tmpMatrix),Ie&&(Ee.snapDistance=F.snapDistance*Fe,F.onSnapObservable.notifyObservers(Ee)),F._matrixChanged()}}),F.dragBehavior.onDragStartObservable.add(function(){F._dragging=!0}),F.dragBehavior.onDragObservable.add(function(xe){return ve(xe.dragDistance)}),F.dragBehavior.onDragEndObservable.add(Te),(p=(d=(s=o?.uniformScaleGizmo)===null||s===void 0?void 0:s.dragBehavior)===null||d===void 0?void 0:d.onDragObservable)===null||p===void 0||p.add(function(xe){return ve(xe.delta.y)}),(M=(C=(y=o?.uniformScaleGizmo)===null||y===void 0?void 0:y.dragBehavior)===null||C===void 0?void 0:C.onDragEndObservable)===null||M===void 0||M.add(Te);var Se={gizmoMeshes:[J,ie],colliderMeshes:[se.arrowMesh,se.arrowTail],material:F._coloredMaterial,hoverMaterial:F._hoverMaterial,disableMaterial:F._disableMaterial,active:!1};(U=F._parent)===null||U===void 0||U.addToAxisCache(F._gizmoMesh,Se),F._pointerObserver=i.utilityLayerScene.onPointerObservable.add(function(xe){var Ne;if(!F._customMeshSet&&(F._isHovered=Se.colliderMeshes.indexOf((Ne=xe?.pickInfo)===null||Ne===void 0?void 0:Ne.pickedMesh)!=-1,!F._parent)){var Ie=F._isHovered||F._dragging?F._hoverMaterial:F._coloredMaterial;Se.gizmoMeshes.forEach(function(Fe){Fe.material=Ie,Fe.color&&(Fe.color=Ie.diffuseColor)})}});var Le=i._getSharedGizmoLight();return Le.includedOnlyMeshes=Le.includedOnlyMeshes.concat(F._rootMesh.getChildMeshes()),F}return Object(c.d)(t,r),t.prototype._createGizmoMesh=function(e,n,i){i===void 0&&(i=!1);var o=Er.a.CreateBox("yPosMesh",{size:.4*(1+(n-1)/4)},this.gizmoLayer.utilityLayerScene),a=mi.a.CreateCylinder("cylinder",{diameterTop:.005*n,height:.275,diameterBottom:.005*n,tessellation:96},this.gizmoLayer.utilityLayerScene);return o.scaling.scaleInPlace(.1),o.material=this._coloredMaterial,o.rotation.x=Math.PI/2,o.position.z+=.3,a.material=this._coloredMaterial,a.position.z+=.1375,a.rotation.x=Math.PI/2,i&&(o.visibility=0,a.visibility=0),e.addChild(o),e.addChild(a),{arrowMesh:o,arrowTail:a}},t.prototype._attachedNodeChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e,e?this._parent&&(this.attachedMesh=this._parent.attachedMesh,this.attachedNode=this._parent.attachedNode):(this.attachedMesh=null,this.attachedNode=null)},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),this._gizmoMesh&&this._gizmoMesh.dispose(),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach(function(e){e&&e.dispose()}),r.prototype.dispose.call(this)},t.prototype.setCustomMesh=function(e,n){var i=this;n===void 0&&(n=!1),r.prototype.setCustomMesh.call(this,e),n&&(this._rootMesh.getChildMeshes().forEach(function(o){o.material=i._coloredMaterial,o.color&&(o.color=i._coloredMaterial.diffuseColor)}),this._customMeshSet=!1)},t}(Un.a),Vn=f(45),un=f(40),du=function(r){function t(e,n){e===void 0&&(e=O.a.Gray()),n===void 0&&(n=Dn.a.DefaultKeepDepthUtilityLayer);var i=r.call(this,n)||this;i._boundingDimensions=new l.e(1,1,1),i._renderObserver=null,i._pointerObserver=null,i._scaleDragSpeed=.2,i._tmpQuaternion=new l.b,i._tmpVector=new l.e(0,0,0),i._tmpRotationMatrix=new l.a,i.ignoreChildren=!1,i.includeChildPredicate=null,i.rotationSphereSize=.1,i.scaleBoxSize=.1,i.fixedDragMeshScreenSize=!1,i.fixedDragMeshBoundsSize=!1,i.fixedDragMeshScreenSizeDistanceFactor=10,i.onDragStartObservable=new P.c,i.onScaleBoxDragObservable=new P.c,i.onScaleBoxDragEndObservable=new P.c,i.onRotationSphereDragObservable=new P.c,i.onRotationSphereDragEndObservable=new P.c,i.scalePivot=null,i._existingMeshScale=new l.e,i._dragMesh=null,i.pointerDragBehavior=new Ei.a,i.updateScale=!1,i._anchorMesh=new Dt.a("anchor",n.utilityLayerScene),i.coloredMaterial=new Ft.a("",n.utilityLayerScene),i.coloredMaterial.disableLighting=!0,i.hoverColoredMaterial=new Ft.a("",n.utilityLayerScene),i.hoverColoredMaterial.disableLighting=!0,i._lineBoundingBox=new Dt.a("",n.utilityLayerScene),i._lineBoundingBox.rotationQuaternion=new l.b;var o=[];o.push(un.a.CreateLines("lines",{points:[new l.e(0,0,0),new l.e(i._boundingDimensions.x,0,0)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(0,0,0),new l.e(0,i._boundingDimensions.y,0)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(0,0,0),new l.e(0,0,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(i._boundingDimensions.x,0,0),new l.e(i._boundingDimensions.x,i._boundingDimensions.y,0)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(i._boundingDimensions.x,0,0),new l.e(i._boundingDimensions.x,0,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(0,i._boundingDimensions.y,0),new l.e(i._boundingDimensions.x,i._boundingDimensions.y,0)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(0,i._boundingDimensions.y,0),new l.e(0,i._boundingDimensions.y,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(0,0,i._boundingDimensions.z),new l.e(i._boundingDimensions.x,0,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(0,0,i._boundingDimensions.z),new l.e(0,i._boundingDimensions.y,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(i._boundingDimensions.x,i._boundingDimensions.y,i._boundingDimensions.z),new l.e(0,i._boundingDimensions.y,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(i._boundingDimensions.x,i._boundingDimensions.y,i._boundingDimensions.z),new l.e(i._boundingDimensions.x,0,i._boundingDimensions.z)]},n.utilityLayerScene)),o.push(un.a.CreateLines("lines",{points:[new l.e(i._boundingDimensions.x,i._boundingDimensions.y,i._boundingDimensions.z),new l.e(i._boundingDimensions.x,i._boundingDimensions.y,0)]},n.utilityLayerScene)),o.forEach(function(J){J.color=e,J.position.addInPlace(new l.e(-i._boundingDimensions.x/2,-i._boundingDimensions.y/2,-i._boundingDimensions.z/2)),J.isPickable=!1,i._lineBoundingBox.addChild(J)}),i._rootMesh.addChild(i._lineBoundingBox),i.setColor(e),i._rotateSpheresParent=new Dt.a("",n.utilityLayerScene),i._rotateSpheresParent.rotationQuaternion=new l.b;for(var a=function(J){var ie=Vn.a.CreateSphere("",{diameter:1},n.utilityLayerScene);ie.rotationQuaternion=new l.b,ie.material=s.coloredMaterial,(C=new Ei.a({})).moveAttached=!1,C.updateDragPlane=!1,ie.addBehavior(C);var se=new l.e(1,0,0),ce=0;C.onDragStartObservable.add(function(){se.copyFrom(ie.forward),ce=0}),C.onDragObservable.add(function(ue){if(i.onRotationSphereDragObservable.notifyObservers({}),i.attachedMesh){var fe=i.attachedMesh.parent;if(fe&&fe.scaling&&fe.scaling.isNonUniformWithinEpsilon(.001))return void u.a.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling");jn.a._RemoveAndStorePivotPoint(i.attachedMesh);var ve=se,Te=ue.dragPlaneNormal.scale(l.e.Dot(ue.dragPlaneNormal,ve)),Oe=ve.subtract(Te).normalizeToNew(),Pe=l.e.Dot(Oe,ue.delta)<0?Math.abs(ue.delta.length()):-Math.abs(ue.delta.length());Pe=Pe/i._boundingDimensions.length()*i._anchorMesh.scaling.length(),i.attachedMesh.rotationQuaternion||(i.attachedMesh.rotationQuaternion=l.b.RotationYawPitchRoll(i.attachedMesh.rotation.y,i.attachedMesh.rotation.x,i.attachedMesh.rotation.z)),i._anchorMesh.rotationQuaternion||(i._anchorMesh.rotationQuaternion=l.b.RotationYawPitchRoll(i._anchorMesh.rotation.y,i._anchorMesh.rotation.x,i._anchorMesh.rotation.z)),ce+=Pe,Math.abs(ce)<=2*Math.PI&&(J>=8?l.b.RotationYawPitchRollToRef(0,0,Pe,i._tmpQuaternion):J>=4?l.b.RotationYawPitchRollToRef(Pe,0,0,i._tmpQuaternion):l.b.RotationYawPitchRollToRef(0,Pe,0,i._tmpQuaternion),i._anchorMesh.addChild(i.attachedMesh),i._anchorMesh.rotationQuaternion.multiplyToRef(i._tmpQuaternion,i._anchorMesh.rotationQuaternion),i._anchorMesh.removeChild(i.attachedMesh),i.attachedMesh.setParent(fe)),i.updateBoundingBox(),jn.a._RestorePivotPoint(i.attachedMesh)}i._updateDummy()}),C.onDragStartObservable.add(function(){i.onDragStartObservable.notifyObservers({}),i._selectNode(ie)}),C.onDragEndObservable.add(function(){i.onRotationSphereDragEndObservable.notifyObservers({}),i._selectNode(null),i._updateDummy()}),s._rotateSpheresParent.addChild(ie)},s=this,d=0;d<12;d++)a(d);i._rootMesh.addChild(i._rotateSpheresParent),i._scaleBoxesParent=new Dt.a("",n.utilityLayerScene),i._scaleBoxesParent.rotationQuaternion=new l.b;for(var p=0;p<3;p++)for(var y=0;y<3;y++)for(var C,M=function(){var J=(p===1?1:0)+(y===1?1:0)+(F===1?1:0);if(J===1||J===3)return"continue";var ie=Er.a.CreateBox("",{size:1},n.utilityLayerScene);ie.material=U.coloredMaterial,ie.metadata=J===2;var se=new l.e(p-1,y-1,F-1).normalize();(C=new Ei.a({dragAxis:se})).updateDragPlane=!1,C.moveAttached=!1,ie.addBehavior(C),C.onDragObservable.add(function(ce){if(i.onScaleBoxDragObservable.notifyObservers({}),i.attachedMesh){var ue=i.attachedMesh.parent;if(ue&&ue.scaling&&ue.scaling.isNonUniformWithinEpsilon(.001))return void u.a.Warn("BoundingBoxGizmo controls are not supported on child meshes with non-uniform parent scaling");jn.a._RemoveAndStorePivotPoint(i.attachedMesh);var fe=ce.dragDistance/i._boundingDimensions.length()*i._anchorMesh.scaling.length(),ve=new l.e(fe,fe,fe);J===2&&(ve.x*=Math.abs(se.x),ve.y*=Math.abs(se.y),ve.z*=Math.abs(se.z)),ve.scaleInPlace(i._scaleDragSpeed),i.updateBoundingBox(),i.scalePivot?(i.attachedMesh.getWorldMatrix().getRotationMatrixToRef(i._tmpRotationMatrix),i._boundingDimensions.scaleToRef(.5,i._tmpVector),l.e.TransformCoordinatesToRef(i._tmpVector,i._tmpRotationMatrix,i._tmpVector),i._anchorMesh.position.subtractInPlace(i._tmpVector),i._boundingDimensions.multiplyToRef(i.scalePivot,i._tmpVector),l.e.TransformCoordinatesToRef(i._tmpVector,i._tmpRotationMatrix,i._tmpVector),i._anchorMesh.position.addInPlace(i._tmpVector)):(ie.absolutePosition.subtractToRef(i._anchorMesh.position,i._tmpVector),i._anchorMesh.position.subtractInPlace(i._tmpVector)),i._anchorMesh.addChild(i.attachedMesh),i._anchorMesh.scaling.addInPlace(ve),(i._anchorMesh.scaling.x<0||i._anchorMesh.scaling.y<0||i._anchorMesh.scaling.z<0)&&i._anchorMesh.scaling.subtractInPlace(ve),i._anchorMesh.removeChild(i.attachedMesh),i.attachedMesh.setParent(ue),jn.a._RestorePivotPoint(i.attachedMesh)}i._updateDummy()}),C.onDragStartObservable.add(function(){i.onDragStartObservable.notifyObservers({}),i._selectNode(ie)}),C.onDragEndObservable.add(function(){i.onScaleBoxDragEndObservable.notifyObservers({}),i._selectNode(null),i._updateDummy()}),U._scaleBoxesParent.addChild(ie)},U=this,F=0;F<3;F++)M();i._rootMesh.addChild(i._scaleBoxesParent);var z=new Array;return i._pointerObserver=n.utilityLayerScene.onPointerObservable.add(function(J){z[J.event.pointerId]?J.pickInfo&&J.pickInfo.pickedMesh!=z[J.event.pointerId]&&(z[J.event.pointerId].material=i.coloredMaterial,delete z[J.event.pointerId]):i._rotateSpheresParent.getChildMeshes().concat(i._scaleBoxesParent.getChildMeshes()).forEach(function(ie){J.pickInfo&&J.pickInfo.pickedMesh==ie&&(z[J.event.pointerId]=ie,ie.material=i.hoverColoredMaterial)})}),i._renderObserver=i.gizmoLayer.originalScene.onBeforeRenderObservable.add(function(){i.attachedMesh&&!i._existingMeshScale.equals(i.attachedMesh.scaling)?i.updateBoundingBox():(i.fixedDragMeshScreenSize||i.fixedDragMeshBoundsSize)&&(i._updateRotationSpheres(),i._updateScaleBoxes()),i._dragMesh&&i.attachedMesh&&i.pointerDragBehavior.dragging&&(i._lineBoundingBox.position.rotateByQuaternionToRef(i._rootMesh.rotationQuaternion,i._tmpVector),i.attachedMesh.setAbsolutePosition(i._dragMesh.position.add(i._tmpVector.scale(-1))))}),i.updateBoundingBox(),i}return Object(c.d)(t,r),t.prototype.setColor=function(e){this.coloredMaterial.emissiveColor=e,this.hoverColoredMaterial.emissiveColor=e.clone().add(new O.a(.3,.3,.3)),this._lineBoundingBox.getChildren().forEach(function(n){n.color&&(n.color=e)})},t.prototype._attachedNodeChanged=function(e){var n=this;if(e){jn.a._RemoveAndStorePivotPoint(e);var i=e.parent;this._anchorMesh.addChild(e),this._anchorMesh.removeChild(e),e.setParent(i),jn.a._RestorePivotPoint(e),this.updateBoundingBox(),e.getChildMeshes(!1).forEach(function(o){o.markAsDirty("scaling")}),this.gizmoLayer.utilityLayerScene.onAfterRenderObservable.addOnce(function(){n._updateDummy()})}},t.prototype._selectNode=function(e){this._rotateSpheresParent.getChildMeshes().concat(this._scaleBoxesParent.getChildMeshes()).forEach(function(n){n.isVisible=!e||n==e})},t.prototype.updateBoundingBox=function(){if(this.attachedMesh){jn.a._RemoveAndStorePivotPoint(this.attachedMesh);var e=this.attachedMesh.parent;this.attachedMesh.setParent(null);var n=null;this.attachedMesh.skeleton&&(n=this.attachedMesh.skeleton.overrideMesh,this.attachedMesh.skeleton.overrideMesh=null),this._update(),this.attachedMesh.rotationQuaternion||(this.attachedMesh.rotationQuaternion=l.b.RotationYawPitchRoll(this.attachedMesh.rotation.y,this.attachedMesh.rotation.x,this.attachedMesh.rotation.z)),this._anchorMesh.rotationQuaternion||(this._anchorMesh.rotationQuaternion=l.b.RotationYawPitchRoll(this._anchorMesh.rotation.y,this._anchorMesh.rotation.x,this._anchorMesh.rotation.z)),this._anchorMesh.rotationQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpQuaternion.copyFrom(this.attachedMesh.rotationQuaternion),this._tmpVector.copyFrom(this.attachedMesh.position),this.attachedMesh.rotationQuaternion.set(0,0,0,1),this.attachedMesh.position.set(0,0,0);var i=this.attachedMesh.getHierarchyBoundingVectors(!this.ignoreChildren,this.includeChildPredicate);i.max.subtractToRef(i.min,this._boundingDimensions),this._lineBoundingBox.scaling.copyFrom(this._boundingDimensions),this._lineBoundingBox.position.set((i.max.x+i.min.x)/2,(i.max.y+i.min.y)/2,(i.max.z+i.min.z)/2),this._rotateSpheresParent.position.copyFrom(this._lineBoundingBox.position),this._scaleBoxesParent.position.copyFrom(this._lineBoundingBox.position),this._lineBoundingBox.computeWorldMatrix(),this._anchorMesh.position.copyFrom(this._lineBoundingBox.absolutePosition),this.attachedMesh.rotationQuaternion.copyFrom(this._tmpQuaternion),this.attachedMesh.position.copyFrom(this._tmpVector),this.attachedMesh.setParent(e),this.attachedMesh.skeleton&&(this.attachedMesh.skeleton.overrideMesh=n)}this._updateRotationSpheres(),this._updateScaleBoxes(),this.attachedMesh&&(this._existingMeshScale.copyFrom(this.attachedMesh.scaling),jn.a._RestorePivotPoint(this.attachedMesh))},t.prototype._updateRotationSpheres=function(){for(var e=this._rotateSpheresParent.getChildMeshes(),n=0;n<3;n++)for(var i=0;i<2;i++)for(var o=0;o<2;o++){var a=4*n+2*i+o;if(n==0&&(e[a].position.set(this._boundingDimensions.x/2,this._boundingDimensions.y*i,this._boundingDimensions.z*o),e[a].position.addInPlace(new l.e(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[a].lookAt(l.e.Cross(e[a].position.normalizeToNew(),l.e.Right()).normalizeToNew().add(e[a].position))),n==1&&(e[a].position.set(this._boundingDimensions.x*i,this._boundingDimensions.y/2,this._boundingDimensions.z*o),e[a].position.addInPlace(new l.e(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[a].lookAt(l.e.Cross(e[a].position.normalizeToNew(),l.e.Up()).normalizeToNew().add(e[a].position))),n==2&&(e[a].position.set(this._boundingDimensions.x*i,this._boundingDimensions.y*o,this._boundingDimensions.z/2),e[a].position.addInPlace(new l.e(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),e[a].lookAt(l.e.Cross(e[a].position.normalizeToNew(),l.e.Forward()).normalizeToNew().add(e[a].position))),this.fixedDragMeshScreenSize&&this.gizmoLayer.utilityLayerScene.activeCamera){e[a].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var s=this.rotationSphereSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;e[a].scaling.set(s,s,s)}else this.fixedDragMeshBoundsSize?e[a].scaling.set(this.rotationSphereSize*this._boundingDimensions.x,this.rotationSphereSize*this._boundingDimensions.y,this.rotationSphereSize*this._boundingDimensions.z):e[a].scaling.set(this.rotationSphereSize,this.rotationSphereSize,this.rotationSphereSize)}},t.prototype._updateScaleBoxes=function(){for(var e=this._scaleBoxesParent.getChildMeshes(),n=0,i=0;i<3;i++)for(var o=0;o<3;o++)for(var a=0;a<3;a++){var s=(i===1?1:0)+(o===1?1:0)+(a===1?1:0);if(s!==1&&s!==3){if(e[n])if(e[n].position.set(this._boundingDimensions.x*(i/2),this._boundingDimensions.y*(o/2),this._boundingDimensions.z*(a/2)),e[n].position.addInPlace(new l.e(-this._boundingDimensions.x/2,-this._boundingDimensions.y/2,-this._boundingDimensions.z/2)),this.fixedDragMeshScreenSize&&this.gizmoLayer.utilityLayerScene.activeCamera){e[n].absolutePosition.subtractToRef(this.gizmoLayer.utilityLayerScene.activeCamera.position,this._tmpVector);var d=this.scaleBoxSize*this._tmpVector.length()/this.fixedDragMeshScreenSizeDistanceFactor;e[n].scaling.set(d,d,d)}else this.fixedDragMeshBoundsSize?e[n].scaling.set(this.scaleBoxSize*this._boundingDimensions.x,this.scaleBoxSize*this._boundingDimensions.y,this.scaleBoxSize*this._boundingDimensions.z):e[n].scaling.set(this.scaleBoxSize,this.scaleBoxSize,this.scaleBoxSize);n++}}},t.prototype.setEnabledRotationAxis=function(e){this._rotateSpheresParent.getChildMeshes().forEach(function(n,i){i<4?n.setEnabled(e.indexOf("x")!=-1):i<8?n.setEnabled(e.indexOf("y")!=-1):n.setEnabled(e.indexOf("z")!=-1)})},t.prototype.setEnabledScaling=function(e,n){n===void 0&&(n=!1),this._scaleBoxesParent.getChildMeshes().forEach(function(i,o){var a=e;n&&i.metadata===!0&&(a=!1),i.setEnabled(a)})},t.prototype._updateDummy=function(){this._dragMesh&&(this._dragMesh.position.copyFrom(this._lineBoundingBox.getAbsolutePosition()),this._dragMesh.scaling.copyFrom(this._lineBoundingBox.scaling),this._dragMesh.rotationQuaternion.copyFrom(this._rootMesh.rotationQuaternion))},t.prototype.enableDragBehavior=function(){this._dragMesh=De.a.CreateBox("dummy",1,this.gizmoLayer.utilityLayerScene),this._dragMesh.visibility=0,this._dragMesh.rotationQuaternion=new l.b,this.pointerDragBehavior.useObjectOrientationForDragging=!1,this._dragMesh.addBehavior(this.pointerDragBehavior)},t.prototype.dispose=function(){this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.gizmoLayer.originalScene.onBeforeRenderObservable.remove(this._renderObserver),this._lineBoundingBox.dispose(),this._rotateSpheresParent.dispose(),this._scaleBoxesParent.dispose(),this._dragMesh&&this._dragMesh.dispose(),r.prototype.dispose.call(this)},t.MakeNotPickableAndWrapInBoundingBox=function(e){var n=function(d){d.isPickable=!1,d.getChildMeshes().forEach(function(p){n(p)})};n(e),e.rotationQuaternion||(e.rotationQuaternion=l.b.RotationYawPitchRoll(e.rotation.y,e.rotation.x,e.rotation.z));var i=e.position.clone(),o=e.rotationQuaternion.clone();e.rotationQuaternion.set(0,0,0,1),e.position.set(0,0,0);var a=Er.a.CreateBox("box",{size:1},e.getScene()),s=e.getHierarchyBoundingVectors();return s.max.subtractToRef(s.min,a.scaling),a.scaling.y===0&&(a.scaling.y=Gt.a),a.scaling.x===0&&(a.scaling.x=Gt.a),a.scaling.z===0&&(a.scaling.z=Gt.a),a.position.set((s.max.x+s.min.x)/2,(s.max.y+s.min.y)/2,(s.max.z+s.min.z)/2),e.addChild(a),e.rotationQuaternion.copyFrom(o),e.position.copyFrom(i),e.removeChild(a),a.addChild(e),a.visibility=0,a},t.prototype.setCustomMesh=function(e){u.a.Error("Custom meshes are not supported on this gizmo")},t}(Un.a),$o=function(r){function t(e,n,i,o,a,s,d){var p;n===void 0&&(n=O.a.Gray()),i===void 0&&(i=Dn.a.DefaultUtilityLayer),o===void 0&&(o=32),a===void 0&&(a=null),d===void 0&&(d=1);var y=r.call(this,i)||this;y._pointerObserver=null,y.snapDistance=0,y.onSnapObservable=new P.c,y._isEnabled=!0,y._parent=null,y._dragging=!1,y._parent=a,y._coloredMaterial=new Ft.a("",i.utilityLayerScene),y._coloredMaterial.diffuseColor=n,y._coloredMaterial.specularColor=n.subtract(new O.a(.1,.1,.1)),y._hoverMaterial=new Ft.a("",i.utilityLayerScene),y._hoverMaterial.diffuseColor=O.a.Yellow(),y._disableMaterial=new Ft.a("",i.utilityLayerScene),y._disableMaterial.diffuseColor=O.a.Gray(),y._disableMaterial.alpha=.4,y._gizmoMesh=new De.a("",i.utilityLayerScene);var C=y._createGizmoMesh(y._gizmoMesh,d,o),M=C.rotationMesh,U=C.collider,F=[];y._rotationCircle=y.setupRotationCircle(F,y._gizmoMesh),y._gizmoMesh.lookAt(y._rootMesh.position.add(e)),y._rootMesh.addChild(y._gizmoMesh),y._gizmoMesh.scaling.scaleInPlace(1/3),y.dragBehavior=new Ei.a({dragPlaneNormal:e}),y.dragBehavior.moveAttached=!1,y.dragBehavior.maxDragAngle=9*Math.PI/20,y.dragBehavior._useAlternatePickedPointAboveMaxDragAngle=!0,y._rootMesh.addBehavior(y.dragBehavior);var z=0,J=new l.e,ie=new l.e,se=new l.a,ce=new l.e,ue=new l.e;y.dragBehavior.onDragStartObservable.add(function(Se){if(y.attachedNode){J.copyFrom(Se.dragPlanePoint);var Le=new l.e(0,0,1),xe=y._rotationCircle.getDirection(Le);xe.normalize(),y._gizmoMesh.removeChild(y._rotationCircle),J.copyFrom(Se.dragPlanePoint),ie=Se.dragPlanePoint;var Ne=y._rotationCircle.getAbsolutePosition().clone(),Ie=y._rotationCircle.getAbsolutePosition().clone().addInPlace(xe),Fe=Se.dragPlanePoint,Ke=l.e.GetAngleBetweenVectors(Ie.subtract(Ne),Fe.subtract(Ne),y._rotationCircle.up);y._rotationCircle.addRotation(0,Ke,0),y._dragging=!0}}),y.dragBehavior.onDragEndObservable.add(function(){z=0,y.updateRotationCircle(y._rotationCircle,F,z,ie),y._gizmoMesh.addChild(y._rotationCircle),y._dragging=!1});var fe={snapDistance:0},ve=0,Te=new l.a,Oe=new l.b;y.dragBehavior.onDragObservable.add(function(Se){if(y.attachedNode){var Le=new l.e(1,1,1),xe=new l.b(0,0,0,1),Ne=new l.e(0,0,0);y.attachedNode.getWorldMatrix().decompose(Le,xe,Ne);var Ie=Se.dragPlanePoint.subtract(Ne).normalize(),Fe=J.subtract(Ne).normalize(),Ke=l.e.Cross(Ie,Fe),nt=l.e.Dot(Ie,Fe),rt=Math.atan2(Ke.length(),nt);ce.copyFrom(e),ue.copyFrom(e),y.updateGizmoRotationToMatchAttachedMesh&&(xe.toRotationMatrix(se),ue=l.e.TransformCoordinates(ce,se));var ut=!1;if(i.utilityLayerScene.activeCamera){var qe=i.utilityLayerScene.activeCamera.position.subtract(Ne);l.e.Dot(qe,ue)>0&&(ce.scaleInPlace(-1),ue.scaleInPlace(-1),ut=!0)}l.e.Dot(ue,Ke)>0&&(rt=-rt);var at=!1;if(y.snapDistance!=0)if(ve+=rt,Math.abs(ve)>y.snapDistance){var ot=Math.floor(Math.abs(ve)/y.snapDistance);ve<0&&(ot*=-1),ve%=y.snapDistance,rt=y.snapDistance*ot,at=!0}else rt=0;z+=ut?-rt:rt,y.updateRotationCircle(y._rotationCircle,F,z,ie);var Je=Math.sin(rt/2);if(Oe.set(ce.x*Je,ce.y*Je,ce.z*Je,Math.cos(rt/2)),Te.determinant()>0){var dt=new l.e;Oe.toEulerAnglesToRef(dt),l.b.RotationYawPitchRollToRef(dt.y,-dt.x,-dt.z,Oe)}y.updateGizmoRotationToMatchAttachedMesh?xe.multiplyToRef(Oe,xe):Oe.multiplyToRef(xe,xe),y.attachedNode.getWorldMatrix().copyFrom(l.a.Compose(Le,xe,Ne)),J.copyFrom(Se.dragPlanePoint),at&&(fe.snapDistance=rt,y.onSnapObservable.notifyObservers(fe)),y._matrixChanged()}});var Pe=i._getSharedGizmoLight();Pe.includedOnlyMeshes=Pe.includedOnlyMeshes.concat(y._rootMesh.getChildMeshes(!1));var Ee={colliderMeshes:[U],gizmoMeshes:[M],material:y._coloredMaterial,hoverMaterial:y._hoverMaterial,disableMaterial:y._disableMaterial,active:!1};return(p=y._parent)===null||p===void 0||p.addToAxisCache(y._gizmoMesh,Ee),y._pointerObserver=i.utilityLayerScene.onPointerObservable.add(function(Se){var Le;if(!y._customMeshSet&&(y._isHovered=Ee.colliderMeshes.indexOf((Le=Se?.pickInfo)===null||Le===void 0?void 0:Le.pickedMesh)!=-1,!y._parent)){var xe=y._isHovered||y._dragging?y._hoverMaterial:y._coloredMaterial;Ee.gizmoMeshes.forEach(function(Ne){Ne.material=xe,Ne.color&&(Ne.color=xe.diffuseColor)})}}),y}return Object(c.d)(t,r),t.prototype._createGizmoMesh=function(e,n,i){var o=De.a.CreateTorus("ignore",.6,.03*n,i,this.gizmoLayer.utilityLayerScene);o.visibility=0;var a=De.a.CreateTorus("",.6,.005*n,i,this.gizmoLayer.utilityLayerScene);return a.material=this._coloredMaterial,a.rotation.x=Math.PI/2,o.rotation.x=Math.PI/2,e.addChild(a),e.addChild(o),{rotationMesh:a,collider:o}},t.prototype._attachedNodeChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},t.prototype.setupRotationCircle=function(e,n){for(var i=t._CircleConstants.pi2/t._CircleConstants.tessellation,o=-Math.PI/2;o0?p:-1*p,C=n>0?a:-1*a;s[d].set(t._CircleConstants.radius*Math.sin(y)*Math.cos(C),0,t._CircleConstants.radius*Math.cos(y)*Math.cos(C))}else s[d].set(0,0,0);d++}o++}},t.prototype.updateRotationCircle=function(e,n,i,o){this.updateRotationPath(n,i),De.a.CreateRibbon("rotationCircle",n,!1,!1,0,this.gizmoLayer.utilityLayerScene,void 0,void 0,e.geometry?e:void 0)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e,e?this._parent&&(this.attachedMesh=this._parent.attachedMesh):this.attachedMesh=null},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),this._gizmoMesh&&this._gizmoMesh.dispose(),this._rotationCircle&&this._rotationCircle.dispose(),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach(function(e){e&&e.dispose()}),r.prototype.dispose.call(this)},t._CircleConstants={radius:.3,pi2:2*Math.PI,tessellation:70,rotationCircleRange:4},t}(Un.a),fu=function(r){function t(e,n,i,o,a){e===void 0&&(e=Dn.a.DefaultUtilityLayer),n===void 0&&(n=32),i===void 0&&(i=!1),o===void 0&&(o=1);var s=r.call(this,e)||this;return s.onDragStartObservable=new P.c,s.onDragEndObservable=new P.c,s._observables=[],s._gizmoAxisCache=new Map,s.xGizmo=new $o(new l.e(1,0,0),O.a.Red().scale(.5),e,n,s,i,o),s.yGizmo=new $o(new l.e(0,1,0),O.a.Green().scale(.5),e,n,s,i,o),s.zGizmo=new $o(new l.e(0,0,1),O.a.Blue().scale(.5),e,n,s,i,o),[s.xGizmo,s.yGizmo,s.zGizmo].forEach(function(d){d.dragBehavior.onDragStartObservable.add(function(){s.onDragStartObservable.notifyObservers({})}),d.dragBehavior.onDragEndObservable.add(function(){s.onDragEndObservable.notifyObservers({})})}),s.attachedMesh=null,s.attachedNode=null,a?a.addToAxisCache(s._gizmoAxisCache):Un.a.GizmoAxisPointerObserver(e,s._gizmoAxisCache),s}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this._meshAttached},set:function(e){this._meshAttached=e,this._nodeAttached=e,this._checkBillboardTransform(),[this.xGizmo,this.yGizmo,this.zGizmo].forEach(function(n){n.isEnabled?n.attachedMesh=e:n.attachedMesh=null})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachedNode",{get:function(){return this._nodeAttached},set:function(e){this._meshAttached=null,this._nodeAttached=e,this._checkBillboardTransform(),[this.xGizmo,this.yGizmo,this.zGizmo].forEach(function(n){n.isEnabled?n.attachedNode=e:n.attachedNode=null})},enumerable:!1,configurable:!0}),t.prototype._checkBillboardTransform=function(){this._nodeAttached&&this._nodeAttached.billboardMode&&console.log("Rotation Gizmo will not work with transforms in billboard mode.")},Object.defineProperty(t.prototype,"isHovered",{get:function(){var e=!1;return[this.xGizmo,this.yGizmo,this.zGizmo].forEach(function(n){e=e||n.isHovered}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this.xGizmo.updateGizmoRotationToMatchAttachedMesh},set:function(e){this.xGizmo&&(this.xGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.yGizmo.updateGizmoRotationToMatchAttachedMesh=e,this.zGizmo.updateGizmoRotationToMatchAttachedMesh=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this.xGizmo.snapDistance},set:function(e){this.xGizmo&&(this.xGizmo.snapDistance=e,this.yGizmo.snapDistance=e,this.zGizmo.snapDistance=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this.xGizmo.scaleRatio},set:function(e){this.xGizmo&&(this.xGizmo.scaleRatio=e,this.yGizmo.scaleRatio=e,this.zGizmo.scaleRatio=e)},enumerable:!1,configurable:!0}),t.prototype.addToAxisCache=function(e,n){this._gizmoAxisCache.set(e,n)},t.prototype.dispose=function(){var e=this;this.xGizmo.dispose(),this.yGizmo.dispose(),this.zGizmo.dispose(),this.onDragStartObservable.clear(),this.onDragEndObservable.clear(),this._observables.forEach(function(n){e.gizmoLayer.utilityLayerScene.onPointerObservable.remove(n)})},t.prototype.setCustomMesh=function(e){u.a.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo)")},t}(Un.a),Sr=f(46),Fs=f(84),ea=function(r){function t(e,n,i,o){var a;n===void 0&&(n=O.a.Gray()),i===void 0&&(i=Dn.a.DefaultUtilityLayer),o===void 0&&(o=null);var s=r.call(this,i)||this;s._pointerObserver=null,s.snapDistance=0,s.onSnapObservable=new P.c,s._isEnabled=!1,s._parent=null,s._dragging=!1,s._parent=o,s._coloredMaterial=new Ft.a("",i.utilityLayerScene),s._coloredMaterial.diffuseColor=n,s._coloredMaterial.specularColor=n.subtract(new O.a(.1,.1,.1)),s._hoverMaterial=new Ft.a("",i.utilityLayerScene),s._hoverMaterial.diffuseColor=O.a.Yellow(),s._disableMaterial=new Ft.a("",i.utilityLayerScene),s._disableMaterial.diffuseColor=O.a.Gray(),s._disableMaterial.alpha=.4,s._gizmoMesh=t._CreatePlane(i.utilityLayerScene,s._coloredMaterial),s._gizmoMesh.lookAt(s._rootMesh.position.add(e)),s._gizmoMesh.scaling.scaleInPlace(1/3),s._gizmoMesh.parent=s._rootMesh;var d=0,p=new l.e,y={snapDistance:0};s.dragBehavior=new Ei.a({dragPlaneNormal:e}),s.dragBehavior.moveAttached=!1,s._rootMesh.addBehavior(s.dragBehavior),s.dragBehavior.onDragObservable.add(function(U){if(s.attachedNode){if(s.snapDistance==0)s.attachedNode.getWorldMatrix().addTranslationFromFloats(U.delta.x,U.delta.y,U.delta.z);else if(d+=U.dragDistance,Math.abs(d)>s.snapDistance){var F=Math.floor(Math.abs(d)/s.snapDistance);d%=s.snapDistance,U.delta.normalizeToRef(p),p.scaleInPlace(s.snapDistance*F),s.attachedNode.getWorldMatrix().addTranslationFromFloats(p.x,p.y,p.z),y.snapDistance=s.snapDistance*F,s.onSnapObservable.notifyObservers(y)}s._matrixChanged()}}),s.dragBehavior.onDragStartObservable.add(function(){s._dragging=!0}),s.dragBehavior.onDragEndObservable.add(function(){s._dragging=!1});var C=i._getSharedGizmoLight();C.includedOnlyMeshes=C.includedOnlyMeshes.concat(s._rootMesh.getChildMeshes(!1));var M={gizmoMeshes:s._gizmoMesh.getChildMeshes(),colliderMeshes:s._gizmoMesh.getChildMeshes(),material:s._coloredMaterial,hoverMaterial:s._hoverMaterial,disableMaterial:s._disableMaterial,active:!1};return(a=s._parent)===null||a===void 0||a.addToAxisCache(s._gizmoMesh,M),s._pointerObserver=i.utilityLayerScene.onPointerObservable.add(function(U){var F;if(!s._customMeshSet&&(s._isHovered=M.colliderMeshes.indexOf((F=U?.pickInfo)===null||F===void 0?void 0:F.pickedMesh)!=-1,!s._parent)){var z=s._isHovered||s._dragging?s._hoverMaterial:s._coloredMaterial;M.gizmoMeshes.forEach(function(J){J.material=z})}}),s}return Object(c.d)(t,r),t._CreatePlane=function(e,n){var i=new Sr.a("plane",e),o=Fs.a.CreatePlane("dragPlane",{width:.1375,height:.1375,sideOrientation:2},e);return o.material=n,o.parent=i,i},t.prototype._attachedNodeChanged=function(e){this.dragBehavior&&(this.dragBehavior.enabled=!!e)},Object.defineProperty(t.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled=e,e?this._parent&&(this.attachedNode=this._parent.attachedNode):this.attachedNode=null},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.onSnapObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this.dragBehavior.detach(),r.prototype.dispose.call(this),this._gizmoMesh&&this._gizmoMesh.dispose(),[this._coloredMaterial,this._hoverMaterial,this._disableMaterial].forEach(function(e){e&&e.dispose()})},t}(Un.a),pu=function(r){function t(e,n,i){e===void 0&&(e=Dn.a.DefaultUtilityLayer),n===void 0&&(n=1);var o=r.call(this,e)||this;return o._meshAttached=null,o._nodeAttached=null,o._observables=[],o._gizmoAxisCache=new Map,o.onDragStartObservable=new P.c,o.onDragEndObservable=new P.c,o._planarGizmoEnabled=!1,o.xGizmo=new Jo.a(new l.e(1,0,0),O.a.Red().scale(.5),e,o,n),o.yGizmo=new Jo.a(new l.e(0,1,0),O.a.Green().scale(.5),e,o,n),o.zGizmo=new Jo.a(new l.e(0,0,1),O.a.Blue().scale(.5),e,o,n),o.xPlaneGizmo=new ea(new l.e(1,0,0),O.a.Red().scale(.5),o.gizmoLayer,o),o.yPlaneGizmo=new ea(new l.e(0,1,0),O.a.Green().scale(.5),o.gizmoLayer,o),o.zPlaneGizmo=new ea(new l.e(0,0,1),O.a.Blue().scale(.5),o.gizmoLayer,o),[o.xGizmo,o.yGizmo,o.zGizmo,o.xPlaneGizmo,o.yPlaneGizmo,o.zPlaneGizmo].forEach(function(a){a.dragBehavior.onDragStartObservable.add(function(){o.onDragStartObservable.notifyObservers({})}),a.dragBehavior.onDragEndObservable.add(function(){o.onDragEndObservable.notifyObservers({})})}),o.attachedMesh=null,i?i.addToAxisCache(o._gizmoAxisCache):Un.a.GizmoAxisPointerObserver(e,o._gizmoAxisCache),o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"attachedMesh",{get:function(){return this._meshAttached},set:function(e){this._meshAttached=e,this._nodeAttached=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n.isEnabled?n.attachedMesh=e:n.attachedMesh=null})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attachedNode",{get:function(){return this._nodeAttached},set:function(e){this._meshAttached=null,this._nodeAttached=null,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n.isEnabled?n.attachedNode=e:n.attachedNode=null})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isHovered",{get:function(){var e=!1;return[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){e=e||n.isHovered}),e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"planarGizmoEnabled",{get:function(){return this._planarGizmoEnabled},set:function(e){var n=this;this._planarGizmoEnabled=e,[this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(i){i&&(i.isEnabled=e,e&&(i.attachedMesh?i.attachedMesh=n.attachedMesh:i.attachedNode=n.attachedNode))},this)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateGizmoRotationToMatchAttachedMesh",{get:function(){return this._updateGizmoRotationToMatchAttachedMesh},set:function(e){this._updateGizmoRotationToMatchAttachedMesh=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n&&(n.updateGizmoRotationToMatchAttachedMesh=e)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapDistance",{get:function(){return this._snapDistance},set:function(e){this._snapDistance=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n&&(n.snapDistance=e)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleRatio",{get:function(){return this._scaleRatio},set:function(e){this._scaleRatio=e,[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n&&(n.scaleRatio=e)})},enumerable:!1,configurable:!0}),t.prototype.addToAxisCache=function(e,n){this._gizmoAxisCache.set(e,n)},t.prototype.dispose=function(){var e=this;[this.xGizmo,this.yGizmo,this.zGizmo,this.xPlaneGizmo,this.yPlaneGizmo,this.zPlaneGizmo].forEach(function(n){n&&n.dispose()}),this._observables.forEach(function(n){e.gizmoLayer.utilityLayerScene.onPointerObservable.remove(n)}),this.onDragStartObservable.clear(),this.onDragEndObservable.clear()},t.prototype.setCustomMesh=function(e){u.a.Error("Custom meshes are not supported on this gizmo, please set the custom meshes on the gizmos contained within this one (gizmo.xGizmo, gizmo.yGizmo, gizmo.zGizmo,gizmo.xPlaneGizmo, gizmo.yPlaneGizmo, gizmo.zPlaneGizmo)")},t}(Un.a);ft.a.CreatePolyhedron=function(r){var t=[];t[0]={vertex:[[0,0,1.732051],[1.632993,0,-.5773503],[-.8164966,1.414214,-.5773503],[-.8164966,-1.414214,-.5773503]],face:[[0,1,2],[0,2,3],[0,3,1],[1,3,2]]},t[1]={vertex:[[0,0,1.414214],[1.414214,0,0],[0,1.414214,0],[-1.414214,0,0],[0,-1.414214,0],[0,0,-1.414214]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,1],[1,4,5],[1,5,2],[2,5,3],[3,5,4]]},t[2]={vertex:[[0,0,1.070466],[.7136442,0,.7978784],[-.3568221,.618034,.7978784],[-.3568221,-.618034,.7978784],[.7978784,.618034,.3568221],[.7978784,-.618034,.3568221],[-.9341724,.381966,.3568221],[.1362939,1,.3568221],[.1362939,-1,.3568221],[-.9341724,-.381966,.3568221],[.9341724,.381966,-.3568221],[.9341724,-.381966,-.3568221],[-.7978784,.618034,-.3568221],[-.1362939,1,-.3568221],[-.1362939,-1,-.3568221],[-.7978784,-.618034,-.3568221],[.3568221,.618034,-.7978784],[.3568221,-.618034,-.7978784],[-.7136442,0,-.7978784],[0,0,-1.070466]],face:[[0,1,4,7,2],[0,2,6,9,3],[0,3,8,5,1],[1,5,11,10,4],[2,7,13,12,6],[3,9,15,14,8],[4,10,16,13,7],[5,8,14,17,11],[6,12,18,15,9],[10,11,17,19,16],[12,13,16,19,18],[14,15,18,19,17]]},t[3]={vertex:[[0,0,1.175571],[1.051462,0,.5257311],[.3249197,1,.5257311],[-.8506508,.618034,.5257311],[-.8506508,-.618034,.5257311],[.3249197,-1,.5257311],[.8506508,.618034,-.5257311],[.8506508,-.618034,-.5257311],[-.3249197,1,-.5257311],[-1.051462,0,-.5257311],[-.3249197,-1,-.5257311],[0,0,-1.175571]],face:[[0,1,2],[0,2,3],[0,3,4],[0,4,5],[0,5,1],[1,5,7],[1,7,6],[1,6,2],[2,6,8],[2,8,3],[3,8,9],[3,9,4],[4,9,10],[4,10,5],[5,10,7],[6,7,11],[6,11,8],[7,10,11],[8,11,9],[9,11,10]]},t[4]={vertex:[[0,0,1.070722],[.7148135,0,.7971752],[-.104682,.7071068,.7971752],[-.6841528,.2071068,.7971752],[-.104682,-.7071068,.7971752],[.6101315,.7071068,.5236279],[1.04156,.2071068,.1367736],[.6101315,-.7071068,.5236279],[-.3574067,1,.1367736],[-.7888348,-.5,.5236279],[-.9368776,.5,.1367736],[-.3574067,-1,.1367736],[.3574067,1,-.1367736],[.9368776,-.5,-.1367736],[.7888348,.5,-.5236279],[.3574067,-1,-.1367736],[-.6101315,.7071068,-.5236279],[-1.04156,-.2071068,-.1367736],[-.6101315,-.7071068,-.5236279],[.104682,.7071068,-.7971752],[.6841528,-.2071068,-.7971752],[.104682,-.7071068,-.7971752],[-.7148135,0,-.7971752],[0,0,-1.070722]],face:[[0,2,3],[1,6,5],[4,9,11],[7,15,13],[8,16,10],[12,14,19],[17,22,18],[20,21,23],[0,1,5,2],[0,3,9,4],[0,4,7,1],[1,7,13,6],[2,5,12,8],[2,8,10,3],[3,10,17,9],[4,11,15,7],[5,6,14,12],[6,13,20,14],[8,12,19,16],[9,17,18,11],[10,16,22,17],[11,18,21,15],[13,15,21,20],[14,20,23,19],[16,19,23,22],[18,22,23,21]]},t[5]={vertex:[[0,0,1.322876],[1.309307,0,.1889822],[-.9819805,.8660254,.1889822],[.1636634,-1.299038,.1889822],[.3273268,.8660254,-.9449112],[-.8183171,-.4330127,-.9449112]],face:[[0,3,1],[2,4,5],[0,1,4,2],[0,2,5,3],[1,3,5,4]]},t[6]={vertex:[[0,0,1.159953],[1.013464,0,.5642542],[-.3501431,.9510565,.5642542],[-.7715208,-.6571639,.5642542],[.6633206,.9510565,-.03144481],[.8682979,-.6571639,-.3996071],[-1.121664,.2938926,-.03144481],[-.2348831,-1.063314,-.3996071],[.5181548,.2938926,-.9953061],[-.5850262,-.112257,-.9953061]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,9,7],[5,7,9,8],[0,3,7,5,1],[2,4,8,9,6]]},t[7]={vertex:[[0,0,1.118034],[.8944272,0,.6708204],[-.2236068,.8660254,.6708204],[-.7826238,-.4330127,.6708204],[.6708204,.8660254,.2236068],[1.006231,-.4330127,-.2236068],[-1.006231,.4330127,.2236068],[-.6708204,-.8660254,-.2236068],[.7826238,.4330127,-.6708204],[.2236068,-.8660254,-.6708204],[-.8944272,0,-.6708204],[0,0,-1.118034]],face:[[0,1,4,2],[0,2,6,3],[1,5,8,4],[3,6,10,7],[5,9,11,8],[7,10,11,9],[0,3,7,9,5,1],[2,4,8,11,10,6]]},t[8]={vertex:[[-.729665,.670121,.319155],[-.655235,-.29213,-.754096],[-.093922,-.607123,.537818],[.702196,.595691,.485187],[.776626,-.36656,-.588064]],face:[[1,4,2],[0,1,2],[3,0,2],[4,3,2],[4,1,0,3]]},t[9]={vertex:[[-.868849,-.100041,.61257],[-.329458,.976099,.28078],[-.26629,-.013796,-.477654],[-.13392,-1.034115,.229829],[.738834,.707117,-.307018],[.859683,-.535264,-.338508]],face:[[3,0,2],[5,3,2],[4,5,2],[1,4,2],[0,1,2],[0,3,5,4,1]]},t[10]={vertex:[[-.610389,.243975,.531213],[-.187812,-.48795,-.664016],[-.187812,.9759,-.664016],[.187812,-.9759,.664016],[.798201,.243975,.132803]],face:[[1,3,0],[3,4,0],[3,1,4],[0,2,1],[0,4,2],[2,4,1]]},t[11]={vertex:[[-1.028778,.392027,-.048786],[-.640503,-.646161,.621837],[-.125162,-.395663,-.540059],[.004683,.888447,-.651988],[.125161,.395663,.540059],[.632925,-.791376,.433102],[1.031672,.157063,-.354165]],face:[[3,2,0],[2,1,0],[2,5,1],[0,4,3],[0,1,4],[4,1,5],[2,3,6],[3,4,6],[5,2,6],[4,5,6]]},t[12]={vertex:[[-.669867,.334933,-.529576],[-.669867,.334933,.529577],[-.4043,1.212901,0],[-.334933,-.669867,-.529576],[-.334933,-.669867,.529577],[.334933,.669867,-.529576],[.334933,.669867,.529577],[.4043,-1.212901,0],[.669867,-.334933,-.529576],[.669867,-.334933,.529577]],face:[[8,9,7],[6,5,2],[3,8,7],[5,0,2],[4,3,7],[0,1,2],[9,4,7],[1,6,2],[9,8,5,6],[8,3,0,5],[3,4,1,0],[4,9,6,1]]},t[13]={vertex:[[-.931836,.219976,-.264632],[-.636706,.318353,.692816],[-.613483,-.735083,-.264632],[-.326545,.979634,0],[-.318353,-.636706,.692816],[-.159176,.477529,-.856368],[.159176,-.477529,-.856368],[.318353,.636706,.692816],[.326545,-.979634,0],[.613482,.735082,-.264632],[.636706,-.318353,.692816],[.931835,-.219977,-.264632]],face:[[11,10,8],[7,9,3],[6,11,8],[9,5,3],[2,6,8],[5,0,3],[4,2,8],[0,1,3],[10,4,8],[1,7,3],[10,11,9,7],[11,6,5,9],[6,2,0,5],[2,4,1,0],[4,10,7,1]]},t[14]={vertex:[[-.93465,.300459,-.271185],[-.838689,-.260219,-.516017],[-.711319,.717591,.128359],[-.710334,-.156922,.080946],[-.599799,.556003,-.725148],[-.503838,-.004675,-.969981],[-.487004,.26021,.48049],[-.460089,-.750282,-.512622],[-.376468,.973135,-.325605],[-.331735,-.646985,.084342],[-.254001,.831847,.530001],[-.125239,-.494738,-.966586],[.029622,.027949,.730817],[.056536,-.982543,-.262295],[.08085,1.087391,.076037],[.125583,-.532729,.485984],[.262625,.599586,.780328],[.391387,-.726999,-.716259],[.513854,-.868287,.139347],[.597475,.85513,.326364],[.641224,.109523,.783723],[.737185,-.451155,.538891],[.848705,-.612742,-.314616],[.976075,.365067,.32976],[1.072036,-.19561,.084927]],face:[[15,18,21],[12,20,16],[6,10,2],[3,0,1],[9,7,13],[2,8,4,0],[0,4,5,1],[1,5,11,7],[7,11,17,13],[13,17,22,18],[18,22,24,21],[21,24,23,20],[20,23,19,16],[16,19,14,10],[10,14,8,2],[15,9,13,18],[12,15,21,20],[6,12,16,10],[3,6,2,0],[9,3,1,7],[9,15,12,6,3],[22,17,11,5,4,8,14,19,23,24]]};var e,n,i,o,a,s,d=r.type&&(r.type<0||r.type>=t.length)?0:r.type||0,p=r.size,y=r.sizeX||p||1,C=r.sizeY||p||1,M=r.sizeZ||p||1,U=r.custom||t[d],F=U.face.length,z=r.faceUV||new Array(F),J=r.faceColors,ie=r.flat===void 0||r.flat,se=r.sideOrientation===0?0:r.sideOrientation||ft.a.DEFAULTSIDE,ce=new Array,ue=new Array,fe=new Array,ve=new Array,Te=new Array,Oe=0,Pe=0,Ee=new Array,Se=0,Le=0;if(ie)for(Le=0;Le0&&t.forEach(function(n,i){e._gizmoAxisCache.set(i,n)})},r.prototype.dispose=function(){var t=this;for(var e in this._pointerObservers.forEach(function(i){t.scene.onPointerObservable.remove(i)}),this.gizmos){var n=this.gizmos[e];n&&n.dispose()}this._defaultKeepDepthUtilityLayer.dispose(),this._defaultUtilityLayer.dispose(),this.boundingBoxDragBehavior.detach(),this.onAttachedToMeshObservable.clear()},r}(),Oi=f(48),ta=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._needProjectionMatrixCompute=!0,e}return Object(c.d)(t,r),t.prototype._setPosition=function(e){this._position=e},Object.defineProperty(t.prototype,"position",{get:function(){return this._position},set:function(e){this._setPosition(e)},enumerable:!1,configurable:!0}),t.prototype._setDirection=function(e){this._direction=e},Object.defineProperty(t.prototype,"direction",{get:function(){return this._direction},set:function(e){this._setDirection(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowMinZ",{get:function(){return this._shadowMinZ},set:function(e){this._shadowMinZ=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowMaxZ",{get:function(){return this._shadowMaxZ},set:function(e){this._shadowMaxZ=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),t.prototype.computeTransformedInformation=function(){return!(!this.parent||!this.parent.getWorldMatrix)&&(this.transformedPosition||(this.transformedPosition=l.e.Zero()),l.e.TransformCoordinatesToRef(this.position,this.parent.getWorldMatrix(),this.transformedPosition),this.direction&&(this.transformedDirection||(this.transformedDirection=l.e.Zero()),l.e.TransformNormalToRef(this.direction,this.parent.getWorldMatrix(),this.transformedDirection)),!0)},t.prototype.getDepthScale=function(){return 50},t.prototype.getShadowDirection=function(e){return this.transformedDirection?this.transformedDirection:this.direction},t.prototype.getAbsolutePosition=function(){return this.transformedPosition?this.transformedPosition:this.position},t.prototype.setDirectionToTarget=function(e){return this.direction=l.e.Normalize(e.subtract(this.position)),this.direction},t.prototype.getRotation=function(){this.direction.normalize();var e=l.e.Cross(this.direction,ye.a.Y),n=l.e.Cross(e,this.direction);return l.e.RotationFromAxis(e,n,this.direction)},t.prototype.needCube=function(){return!1},t.prototype.needProjectionMatrixCompute=function(){return this._needProjectionMatrixCompute},t.prototype.forceProjectionMatrixCompute=function(){this._needProjectionMatrixCompute=!0},t.prototype._initCache=function(){r.prototype._initCache.call(this),this._cache.position=l.e.Zero()},t.prototype._isSynchronized=function(){return!!this._cache.position.equals(this.position)},t.prototype.computeWorldMatrix=function(e){return!e&&this.isSynchronized()?(this._currentRenderId=this.getScene().getRenderId(),this._worldMatrix):(this._updateCache(),this._cache.position.copyFrom(this.position),this._worldMatrix||(this._worldMatrix=l.a.Identity()),l.a.TranslationToRef(this.position.x,this.position.y,this.position.z,this._worldMatrix),this.parent&&this.parent.getWorldMatrix&&(this._worldMatrix.multiplyToRef(this.parent.getWorldMatrix(),this._worldMatrix),this._markSyncedWithParent()),this._worldMatrixDeterminantIsDirty=!0,this._worldMatrix)},t.prototype.getDepthMinZ=function(e){return this.shadowMinZ!==void 0?this.shadowMinZ:e.minZ},t.prototype.getDepthMaxZ=function(e){return this.shadowMaxZ!==void 0?this.shadowMaxZ:e.maxZ},t.prototype.setShadowProjectionMatrix=function(e,n,i){return this.customProjectionMatrixBuilder?this.customProjectionMatrixBuilder(n,i,e):this._setDefaultShadowProjectionMatrix(e,n,i),this},Object(c.c)([Object(L.o)()],t.prototype,"position",null),Object(c.c)([Object(L.o)()],t.prototype,"direction",null),Object(c.c)([Object(L.c)()],t.prototype,"shadowMinZ",null),Object(c.c)([Object(L.c)()],t.prototype,"shadowMaxZ",null),t}(Oi.a);Q.a.AddNodeConstructor("Light_Type_1",function(r,t){return function(){return new Bs(r,l.e.Zero(),t)}});var Bs=function(r){function t(e,n,i){var o=r.call(this,e,i)||this;return o._shadowFrustumSize=0,o._shadowOrthoScale=.1,o.autoUpdateExtends=!0,o.autoCalcShadowZBounds=!1,o._orthoLeft=Number.MAX_VALUE,o._orthoRight=Number.MIN_VALUE,o._orthoTop=Number.MIN_VALUE,o._orthoBottom=Number.MAX_VALUE,o.position=n.scale(-1),o.direction=n,o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"shadowFrustumSize",{get:function(){return this._shadowFrustumSize},set:function(e){this._shadowFrustumSize=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowOrthoScale",{get:function(){return this._shadowOrthoScale},set:function(e){this._shadowOrthoScale=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"DirectionalLight"},t.prototype.getTypeID=function(){return Oi.a.LIGHTTYPEID_DIRECTIONALLIGHT},t.prototype._setDefaultShadowProjectionMatrix=function(e,n,i){this.shadowFrustumSize>0?this._setDefaultFixedFrustumShadowProjectionMatrix(e):this._setDefaultAutoExtendShadowProjectionMatrix(e,n,i)},t.prototype._setDefaultFixedFrustumShadowProjectionMatrix=function(e){var n=this.getScene().activeCamera;n&&l.a.OrthoLHToRef(this.shadowFrustumSize,this.shadowFrustumSize,this.shadowMinZ!==void 0?this.shadowMinZ:n.minZ,this.shadowMaxZ!==void 0?this.shadowMaxZ:n.maxZ,e)},t.prototype._setDefaultAutoExtendShadowProjectionMatrix=function(e,n,i){var o=this.getScene().activeCamera;if(o){if(this.autoUpdateExtends||this._orthoLeft===Number.MAX_VALUE){var a=l.e.Zero();this._orthoLeft=Number.MAX_VALUE,this._orthoRight=Number.MIN_VALUE,this._orthoTop=Number.MIN_VALUE,this._orthoBottom=Number.MAX_VALUE;for(var s=Number.MAX_VALUE,d=Number.MIN_VALUE,p=0;pthis._orthoRight&&(this._orthoRight=a.x),a.y>this._orthoTop&&(this._orthoTop=a.y),this.autoCalcShadowZBounds&&(a.zd&&(d=a.z))}this.autoCalcShadowZBounds&&(this._shadowMinZ=s,this._shadowMaxZ=d)}var U=this._orthoRight-this._orthoLeft,F=this._orthoTop-this._orthoBottom;l.a.OrthoOffCenterLHToRef(this._orthoLeft-U*this.shadowOrthoScale,this._orthoRight+U*this.shadowOrthoScale,this._orthoBottom-F*this.shadowOrthoScale,this._orthoTop+F*this.shadowOrthoScale,this.shadowMinZ!==void 0?this.shadowMinZ:o.minZ,this.shadowMaxZ!==void 0?this.shadowMaxZ:o.maxZ,e)}},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype.transferToEffect=function(e,n){return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z,1,n),this):(this._uniformBuffer.updateFloat4("vLightData",this.direction.x,this.direction.y,this.direction.z,1,n),this)},t.prototype.transferToNodeMaterialEffect=function(e,n){return this.computeTransformedInformation()?(e.setFloat3(n,this.transformedDirection.x,this.transformedDirection.y,this.transformedDirection.z),this):(e.setFloat3(n,this.direction.x,this.direction.y,this.direction.z),this)},t.prototype.getDepthMinZ=function(e){return 1},t.prototype.getDepthMaxZ=function(e){return 1},t.prototype.prepareLightSpecificDefines=function(e,n){e["DIRLIGHT"+n]=!0},Object(c.c)([Object(L.c)()],t.prototype,"shadowFrustumSize",null),Object(c.c)([Object(L.c)()],t.prototype,"shadowOrthoScale",null),Object(c.c)([Object(L.c)()],t.prototype,"autoUpdateExtends",void 0),Object(c.c)([Object(L.c)()],t.prototype,"autoCalcShadowZBounds",void 0),t}(ta);De.a.CreateHemisphere=function(r,t,e,n){var i={segments:t,diameter:e};return na.CreateHemisphere(r,i,n)};var na=function(){function r(){}return r.CreateHemisphere=function(t,e,n){e.diameter||(e.diameter=1),e.segments||(e.segments=16);var i=Vn.a.CreateSphere("",{slice:.5,diameter:e.diameter,segments:e.segments},n),o=De.a.CreateDisc("",e.diameter/2,3*e.segments+(4-e.segments),n);o.rotation.x=-Math.PI/2,o.parent=i;var a=De.a.MergeMeshes([o,i],!0);return a.name=t,a},r}();Q.a.AddNodeConstructor("Light_Type_2",function(r,t){return function(){return new Us(r,l.e.Zero(),l.e.Zero(),0,0,t)}});var Us=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,s)||this;return d._innerAngle=0,d._projectionTextureMatrix=l.a.Zero(),d._projectionTextureLightNear=1e-6,d._projectionTextureLightFar=1e3,d._projectionTextureUpDirection=l.e.Up(),d._projectionTextureViewLightDirty=!0,d._projectionTextureProjectionLightDirty=!0,d._projectionTextureDirty=!0,d._projectionTextureViewTargetVector=l.e.Zero(),d._projectionTextureViewLightMatrix=l.a.Zero(),d._projectionTextureProjectionLightMatrix=l.a.Zero(),d._projectionTextureScalingMatrix=l.a.FromValues(.5,0,0,0,0,.5,0,0,0,0,.5,0,.5,.5,.5,1),d.position=n,d.direction=i,d.angle=o,d.exponent=a,d}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"angle",{get:function(){return this._angle},set:function(e){this._angle=e,this._cosHalfAngle=Math.cos(.5*e),this._projectionTextureProjectionLightDirty=!0,this.forceProjectionMatrixCompute(),this._computeAngleValues()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"innerAngle",{get:function(){return this._innerAngle},set:function(e){this._innerAngle=e,this._computeAngleValues()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shadowAngleScale",{get:function(){return this._shadowAngleScale},set:function(e){this._shadowAngleScale=e,this.forceProjectionMatrixCompute()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureMatrix",{get:function(){return this._projectionTextureMatrix},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureLightNear",{get:function(){return this._projectionTextureLightNear},set:function(e){this._projectionTextureLightNear=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureLightFar",{get:function(){return this._projectionTextureLightFar},set:function(e){this._projectionTextureLightFar=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTextureUpDirection",{get:function(){return this._projectionTextureUpDirection},set:function(e){this._projectionTextureUpDirection=e,this._projectionTextureProjectionLightDirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"projectionTexture",{get:function(){return this._projectionTexture},set:function(e){var n=this;this._projectionTexture!==e&&(this._projectionTexture=e,this._projectionTextureDirty=!0,this._projectionTexture&&!this._projectionTexture.isReady()&&(t._IsProceduralTexture(this._projectionTexture)?this._projectionTexture.getEffect().executeWhenCompiled(function(){n._markMeshesAsLightDirty()}):t._IsTexture(this._projectionTexture)&&this._projectionTexture.onLoadObservable.addOnce(function(){n._markMeshesAsLightDirty()})))},enumerable:!1,configurable:!0}),t._IsProceduralTexture=function(e){return e.onGeneratedObservable!==void 0},t._IsTexture=function(e){return e.onLoadObservable!==void 0},t.prototype.getClassName=function(){return"SpotLight"},t.prototype.getTypeID=function(){return Oi.a.LIGHTTYPEID_SPOTLIGHT},t.prototype._setDirection=function(e){r.prototype._setDirection.call(this,e),this._projectionTextureViewLightDirty=!0},t.prototype._setPosition=function(e){r.prototype._setPosition.call(this,e),this._projectionTextureViewLightDirty=!0},t.prototype._setDefaultShadowProjectionMatrix=function(e,n,i){var o=this.getScene().activeCamera;if(o){this._shadowAngleScale=this._shadowAngleScale||1;var a=this._shadowAngleScale*this._angle;l.a.PerspectiveFovLHToRef(a,1,this.getDepthMinZ(o),this.getDepthMaxZ(o),e)}},t.prototype._computeProjectionTextureViewLightMatrix=function(){this._projectionTextureViewLightDirty=!1,this._projectionTextureDirty=!0,this.position.addToRef(this.direction,this._projectionTextureViewTargetVector),l.a.LookAtLHToRef(this.position,this._projectionTextureViewTargetVector,this._projectionTextureUpDirection,this._projectionTextureViewLightMatrix)},t.prototype._computeProjectionTextureProjectionLightMatrix=function(){this._projectionTextureProjectionLightDirty=!1,this._projectionTextureDirty=!0;var e=this.projectionTextureLightFar,n=this.projectionTextureLightNear,i=e/(e-n),o=-i*n,a=1/Math.tan(this._angle/2);l.a.FromValuesToRef(a/1,0,0,0,0,a,0,0,0,0,i,1,0,0,o,0,this._projectionTextureProjectionLightMatrix)},t.prototype._computeProjectionTextureMatrix=function(){if(this._projectionTextureDirty=!1,this._projectionTextureViewLightMatrix.multiplyToRef(this._projectionTextureProjectionLightMatrix,this._projectionTextureMatrix),this._projectionTexture instanceof we.a){var e=this._projectionTexture.uScale/2,n=this._projectionTexture.vScale/2;l.a.FromValuesToRef(e,0,0,0,0,n,0,0,0,0,.5,0,.5,.5,.5,1,this._projectionTextureScalingMatrix)}this._projectionTextureMatrix.multiplyToRef(this._projectionTextureScalingMatrix,this._projectionTextureMatrix)},t.prototype._buildUniformLayout=function(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("vLightDirection",3),this._uniformBuffer.addUniform("vLightFalloff",4),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()},t.prototype._computeAngleValues=function(){this._lightAngleScale=1/Math.max(.001,Math.cos(.5*this._innerAngle)-this._cosHalfAngle),this._lightAngleOffset=-this._cosHalfAngle*this._lightAngleScale},t.prototype.transferTexturesToEffect=function(e,n){return this.projectionTexture&&this.projectionTexture.isReady()&&(this._projectionTextureViewLightDirty&&this._computeProjectionTextureViewLightMatrix(),this._projectionTextureProjectionLightDirty&&this._computeProjectionTextureProjectionLightMatrix(),this._projectionTextureDirty&&this._computeProjectionTextureMatrix(),e.setMatrix("textureProjectionMatrix"+n,this._projectionTextureMatrix),e.setTexture("projectionLightSampler"+n,this.projectionTexture)),this},t.prototype.transferToEffect=function(e,n){var i;return this.computeTransformedInformation()?(this._uniformBuffer.updateFloat4("vLightData",this.transformedPosition.x,this.transformedPosition.y,this.transformedPosition.z,this.exponent,n),i=l.e.Normalize(this.transformedDirection)):(this._uniformBuffer.updateFloat4("vLightData",this.position.x,this.position.y,this.position.z,this.exponent,n),i=l.e.Normalize(this.direction)),this._uniformBuffer.updateFloat4("vLightDirection",i.x,i.y,i.z,this._cosHalfAngle,n),this._uniformBuffer.updateFloat4("vLightFalloff",this.range,this._inverseSquaredRange,this._lightAngleScale,this._lightAngleOffset,n),this},t.prototype.transferToNodeMaterialEffect=function(e,n){var i;return i=this.computeTransformedInformation()?l.e.Normalize(this.transformedDirection):l.e.Normalize(this.direction),this.getScene().useRightHandedSystem?e.setFloat3(n,-i.x,-i.y,-i.z):e.setFloat3(n,i.x,i.y,i.z),this},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._projectionTexture&&this._projectionTexture.dispose()},t.prototype.prepareLightSpecificDefines=function(e,n){e["SPOTLIGHT"+n]=!0,e["PROJECTEDLIGHTTEXTURE"+n]=!(!this.projectionTexture||!this.projectionTexture.isReady())},Object(c.c)([Object(L.c)()],t.prototype,"angle",null),Object(c.c)([Object(L.c)()],t.prototype,"innerAngle",null),Object(c.c)([Object(L.c)()],t.prototype,"shadowAngleScale",null),Object(c.c)([Object(L.c)()],t.prototype,"exponent",void 0),Object(c.c)([Object(L.c)()],t.prototype,"projectionTextureLightNear",null),Object(c.c)([Object(L.c)()],t.prototype,"projectionTextureLightFar",null),Object(c.c)([Object(L.c)()],t.prototype,"projectionTextureUpDirection",null),Object(c.c)([Object(L.m)("projectedLightTexture")],t.prototype,"_projectionTexture",void 0),t}(ta),Tp=function(r){function t(e){e===void 0&&(e=Dn.a.DefaultUtilityLayer);var n=r.call(this,e)||this;return n._cachedPosition=new l.e,n._cachedForward=new l.e(0,0,1),n._pointerObserver=null,n.onClickedObservable=new P.c,n._light=null,n.attachedMesh=new Dt.a("",n.gizmoLayer.utilityLayerScene),n._attachedMeshParent=new Sr.a("parent",n.gizmoLayer.utilityLayerScene),n.attachedMesh.parent=n._attachedMeshParent,n._material=new Ft.a("light",n.gizmoLayer.utilityLayerScene),n._material.diffuseColor=new O.a(.5,.5,.5),n._material.specularColor=new O.a(.1,.1,.1),n._pointerObserver=e.utilityLayerScene.onPointerObservable.add(function(i){n._light&&(n._isHovered=!(!i.pickInfo||n._rootMesh.getChildMeshes().indexOf(i.pickInfo.pickedMesh)==-1),n._isHovered&&i.event.button===0&&n.onClickedObservable.notifyObservers(n._light))},Tt.a.POINTERDOWN),n}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"light",{get:function(){return this._light},set:function(e){var n=this;if(this._light=e,e){this._lightMesh&&this._lightMesh.dispose(),e instanceof Ho.a?this._lightMesh=t._CreateHemisphericLightMesh(this.gizmoLayer.utilityLayerScene):this._lightMesh=e instanceof Bs?t._CreateDirectionalLightMesh(this.gizmoLayer.utilityLayerScene):e instanceof Us?t._CreateSpotLightMesh(this.gizmoLayer.utilityLayerScene):t._CreatePointLightMesh(this.gizmoLayer.utilityLayerScene),this._lightMesh.getChildMeshes(!1).forEach(function(o){o.material=n._material}),this._lightMesh.parent=this._rootMesh;var i=this.gizmoLayer._getSharedGizmoLight();i.includedOnlyMeshes=i.includedOnlyMeshes.concat(this._lightMesh.getChildMeshes(!1)),this._lightMesh.rotationQuaternion=new l.b,this.attachedMesh.reservedDataStore||(this.attachedMesh.reservedDataStore={}),this.attachedMesh.reservedDataStore.lightGizmo=this,e.parent&&this._attachedMeshParent.freezeWorldMatrix(e.parent.getWorldMatrix()),e.position&&(this.attachedMesh.position.copyFrom(e.position),this.attachedMesh.computeWorldMatrix(!0),this._cachedPosition.copyFrom(this.attachedMesh.position)),e.direction&&(this.attachedMesh.setDirection(e.direction),this.attachedMesh.computeWorldMatrix(!0),this._cachedForward.copyFrom(this.attachedMesh.forward)),this._update()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},enumerable:!1,configurable:!0}),t.prototype._update=function(){r.prototype._update.call(this),this._light&&(this._light.parent&&this._attachedMeshParent.freezeWorldMatrix(this._light.parent.getWorldMatrix()),this._light.position&&(this.attachedMesh.position.equals(this._cachedPosition)?(this.attachedMesh.position.copyFrom(this._light.position),this.attachedMesh.computeWorldMatrix(!0),this._cachedPosition.copyFrom(this.attachedMesh.position)):(this._light.position.copyFrom(this.attachedMesh.position),this._cachedPosition.copyFrom(this.attachedMesh.position))),this._light.direction&&(l.e.DistanceSquared(this.attachedMesh.forward,this._cachedForward)>1e-4?(this._light.direction.copyFrom(this.attachedMesh.forward),this._cachedForward.copyFrom(this.attachedMesh.forward)):l.e.DistanceSquared(this.attachedMesh.forward,this._light.direction)>1e-4&&(this.attachedMesh.setDirection(this._light.direction),this.attachedMesh.computeWorldMatrix(!0),this._cachedForward.copyFrom(this.attachedMesh.forward))))},t.prototype.dispose=function(){this.onClickedObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this._material.dispose(),r.prototype.dispose.call(this),this._attachedMeshParent.dispose()},t._CreateHemisphericLightMesh=function(e){var n=new De.a("hemisphereLight",e),i=na.CreateHemisphere(n.name,{segments:10,diameter:1},e);i.position.z=-.15,i.rotation.x=Math.PI/2,i.parent=n;var o=this._CreateLightLines(3,e);return o.parent=n,o.position.z,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreatePointLightMesh=function(e){var n=new De.a("pointLight",e),i=Vn.a.CreateSphere(n.name,{segments:10,diameter:1},e);return i.rotation.x=Math.PI/2,i.parent=n,this._CreateLightLines(5,e).parent=n,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreateSpotLightMesh=function(e){var n=new De.a("spotLight",e);Vn.a.CreateSphere(n.name,{segments:10,diameter:1},e).parent=n;var i=na.CreateHemisphere(n.name,{segments:10,diameter:2},e);return i.parent=n,i.rotation.x=-Math.PI/2,this._CreateLightLines(2,e).parent=n,n.scaling.scaleInPlace(t._Scale),n.rotation.x=Math.PI/2,n},t._CreateDirectionalLightMesh=function(e){var n=new De.a("directionalLight",e),i=new De.a(n.name,e);i.parent=n,Vn.a.CreateSphere(n.name,{diameter:1.2,segments:10},e).parent=i;var o=De.a.CreateCylinder(n.name,6,.3,.3,6,1,e);o.parent=i,(a=o.clone(n.name)).scaling.y=.5,a.position.x+=1.25,(s=o.clone(n.name)).scaling.y=.5,s.position.x+=-1.25;var a,s,d=De.a.CreateCylinder(n.name,1,0,.6,6,1,e);return d.position.y+=3,d.parent=i,(a=d.clone(n.name)).position.y=1.5,a.position.x+=1.25,(s=d.clone(n.name)).position.y=1.5,s.position.x+=-1.25,i.scaling.scaleInPlace(t._Scale),i.rotation.z=Math.PI/2,i.rotation.y=Math.PI/2,n},t._Scale=.007,t._CreateLightLines=function(e,n){var i=new De.a("root",n);i.rotation.x=Math.PI/2;var o=new De.a("linePivot",n);o.parent=i;var a=De.a.CreateCylinder("line",2,.2,.3,6,1,n);if(a.position.y=a.scaling.y/2+1.2,a.parent=o,e<2)return o;for(var s=0;s<4;s++)(d=o.clone("lineParentClone")).rotation.z=Math.PI/4,d.rotation.y=Math.PI/2+Math.PI/2*s,d.getChildMeshes()[0].scaling.y=.5,d.getChildMeshes()[0].scaling.x=d.getChildMeshes()[0].scaling.z=.8,d.getChildMeshes()[0].position.y=d.getChildMeshes()[0].scaling.y/2+1.2;if(e<3)return i;for(s=0;s<4;s++)(d=o.clone("linePivotClone")).rotation.z=Math.PI/2,d.rotation.y=Math.PI/2*s;if(e<4)return i;for(s=0;s<4;s++){var d;(d=o.clone("linePivotClone")).rotation.z=Math.PI+Math.PI/4,d.rotation.y=Math.PI/2+Math.PI/2*s,d.getChildMeshes()[0].scaling.y=.5,d.getChildMeshes()[0].scaling.x=d.getChildMeshes()[0].scaling.z=.8,d.getChildMeshes()[0].position.y=d.getChildMeshes()[0].scaling.y/2+1.2}return e<5||((d=o.clone("linePivotClone")).rotation.z=Math.PI),i},t}(Un.a),Vs=function(){function r(t,e){t===void 0&&(t=l.e.Zero()),e===void 0&&(e=l.e.Up()),this.position=t,this.normal=e}return r.prototype.clone=function(){return new r(this.position.clone(),this.normal.clone())},r}(),Ep=function(){function r(t,e,n){t===void 0&&(t=l.e.Zero()),e===void 0&&(e=l.e.Up()),n===void 0&&(n=l.d.Zero()),this.position=t,this.normal=e,this.uv=n}return r.prototype.clone=function(){return new r(this.position.clone(),this.normal.clone(),this.uv.clone())},r}(),Sp=function(r){function t(e){e===void 0&&(e=Dn.a.DefaultUtilityLayer);var n=r.call(this,e)||this;return n._pointerObserver=null,n.onClickedObservable=new P.c,n._camera=null,n._invProjection=new l.a,n._material=new Ft.a("cameraGizmoMaterial",n.gizmoLayer.utilityLayerScene),n._material.diffuseColor=new O.a(.5,.5,.5),n._material.specularColor=new O.a(.1,.1,.1),n._pointerObserver=e.utilityLayerScene.onPointerObservable.add(function(i){n._camera&&(n._isHovered=!(!i.pickInfo||n._rootMesh.getChildMeshes().indexOf(i.pickInfo.pickedMesh)==-1),n._isHovered&&i.event.button===0&&n.onClickedObservable.notifyObservers(n._camera))},Tt.a.POINTERDOWN),n}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"displayFrustum",{get:function(){return this._cameraLinesMesh.isEnabled()},set:function(e){this._cameraLinesMesh.setEnabled(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"camera",{get:function(){return this._camera},set:function(e){var n=this;if(this._camera=e,this.attachedNode=e,e){this._cameraMesh&&this._cameraMesh.dispose(),this._cameraLinesMesh&&this._cameraLinesMesh.dispose(),this._cameraMesh=t._CreateCameraMesh(this.gizmoLayer.utilityLayerScene),this._cameraLinesMesh=t._CreateCameraFrustum(this.gizmoLayer.utilityLayerScene),this._cameraMesh.getChildMeshes(!1).forEach(function(o){o.material=n._material}),this._cameraMesh.parent=this._rootMesh,this._cameraLinesMesh.parent=this._rootMesh,this.gizmoLayer.utilityLayerScene.activeCamera&&this.gizmoLayer.utilityLayerScene.activeCamera.maxZ<1.5*e.maxZ&&(this.gizmoLayer.utilityLayerScene.activeCamera.maxZ=1.5*e.maxZ),this.attachedNode.reservedDataStore||(this.attachedNode.reservedDataStore={}),this.attachedNode.reservedDataStore.cameraGizmo=this;var i=this.gizmoLayer._getSharedGizmoLight();i.includedOnlyMeshes=i.includedOnlyMeshes.concat(this._cameraMesh.getChildMeshes(!1)),this._update()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"material",{get:function(){return this._material},enumerable:!1,configurable:!0}),t.prototype._update=function(){r.prototype._update.call(this),this._camera&&(this._camera.getProjectionMatrix().invertToRef(this._invProjection),this._cameraLinesMesh.setPivotMatrix(this._invProjection,!1),this._cameraLinesMesh.scaling.x=1/this._rootMesh.scaling.x,this._cameraLinesMesh.scaling.y=1/this._rootMesh.scaling.y,this._cameraLinesMesh.scaling.z=1/this._rootMesh.scaling.z,this._cameraMesh.parent=null,this._cameraMesh.rotation.y=.5*Math.PI*(this._camera.getScene().useRightHandedSystem?1:-1),this._cameraMesh.parent=this._rootMesh)},t.prototype.dispose=function(){this.onClickedObservable.clear(),this.gizmoLayer.utilityLayerScene.onPointerObservable.remove(this._pointerObserver),this._cameraMesh&&this._cameraMesh.dispose(),this._cameraLinesMesh&&this._cameraLinesMesh.dispose(),this._material.dispose(),r.prototype.dispose.call(this)},t._CreateCameraMesh=function(e){var n=new De.a("rootCameraGizmo",e),i=new De.a(n.name,e);i.parent=n,Er.a.CreateBox(n.name,{width:1,height:.8,depth:.5},e).parent=i;var o=mi.a.CreateCylinder(n.name,{height:.5,diameterTop:.8,diameterBottom:.8},e);o.parent=i,o.position.y=.3,o.position.x=-.6,o.rotation.x=.5*Math.PI;var a=mi.a.CreateCylinder(n.name,{height:.5,diameterTop:.6,diameterBottom:.6},e);a.parent=i,a.position.y=.5,a.position.x=.4,a.rotation.x=.5*Math.PI;var s=mi.a.CreateCylinder(n.name,{height:.5,diameterTop:.5,diameterBottom:.5},e);return s.parent=i,s.position.y=0,s.position.x=.6,s.rotation.z=.5*Math.PI,n.scaling.scaleInPlace(t._Scale),i.position.x=-.9,n},t._CreateCameraFrustum=function(e){var n=new De.a("rootCameraGizmo",e),i=new De.a(n.name,e);i.parent=n;for(var o=0;o<4;o+=2)for(var a=0;a<4;a+=2){var s;(s=un.a.CreateLines("lines",{points:[new l.e(-1+a,-1+o,-1),new l.e(-1+a,-1+o,1)]},e)).parent=i,s.alwaysSelectAsActiveMesh=!0,s.isPickable=!1,(s=un.a.CreateLines("lines",{points:[new l.e(-1,-1+a,-1+o),new l.e(1,-1+a,-1+o)]},e)).parent=i,s.alwaysSelectAsActiveMesh=!0,s.isPickable=!1,(s=un.a.CreateLines("lines",{points:[new l.e(-1+a,-1,-1+o),new l.e(-1+a,1,-1+o)]},e)).parent=i,s.alwaysSelectAsActiveMesh=!0,s.isPickable=!1}return n},t._Scale=.05,t}(Un.a);je.a.IncludesShadersStore.kernelBlurVaryingDeclaration="varying vec2 sampleCoord{X};";var Ap=`vec4 pack(float depth) -{ -const vec4 bit_shift=vec4(255.0*255.0*255.0,255.0*255.0,255.0,1.0); -const vec4 bit_mask=vec4(0.0,1.0/255.0,1.0/255.0,1.0/255.0); -vec4 res=fract(depth*bit_shift); -res-=res.xxyz*bit_mask; -return res; -} -float unpack(vec4 color) -{ -const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0); -return dot(color,bit_shift); -}`;je.a.IncludesShadersStore.packingFunctions=Ap;var Pp=`#ifdef DOF -factor=sampleCoC(sampleCoord{X}); -computedWeight=KERNEL_WEIGHT{X}*factor; -sumOfWeights+=computedWeight; -#else -computedWeight=KERNEL_WEIGHT{X}; -#endif -#ifdef PACKEDFLOAT -blend+=unpack(texture2D(textureSampler,sampleCoord{X}))*computedWeight; -#else -blend+=texture2D(textureSampler,sampleCoord{X})*computedWeight; -#endif`;je.a.IncludesShadersStore.kernelBlurFragment=Pp;var Cp=`#ifdef DOF -factor=sampleCoC(sampleCenter+delta*KERNEL_DEP_OFFSET{X}); -computedWeight=KERNEL_DEP_WEIGHT{X}*factor; -sumOfWeights+=computedWeight; -#else -computedWeight=KERNEL_DEP_WEIGHT{X}; -#endif -#ifdef PACKEDFLOAT -blend+=unpack(texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X}))*computedWeight; -#else -blend+=texture2D(textureSampler,sampleCenter+delta*KERNEL_DEP_OFFSET{X})*computedWeight; -#endif`;je.a.IncludesShadersStore.kernelBlurFragment2=Cp;var xp=` -uniform sampler2D textureSampler; -uniform vec2 delta; - -varying vec2 sampleCenter; -#ifdef DOF -uniform sampler2D circleOfConfusionSampler; -uniform vec2 cameraMinMaxZ; -float sampleDistance(const in vec2 offset) { -float depth=texture2D(circleOfConfusionSampler,offset).g; -return cameraMinMaxZ.x+(cameraMinMaxZ.y-cameraMinMaxZ.x)*depth; -} -float sampleCoC(const in vec2 offset) { -float coc=texture2D(circleOfConfusionSampler,offset).r; -return coc; -} -#endif -#include[0..varyingCount] -#ifdef PACKEDFLOAT -#include -#endif -void main(void) -{ -float computedWeight=0.0; -#ifdef PACKEDFLOAT -float blend=0.; -#else -vec4 blend=vec4(0.); -#endif -#ifdef DOF -float sumOfWeights=CENTER_WEIGHT; -float factor=0.0; - -#ifdef PACKEDFLOAT -blend+=unpack(texture2D(textureSampler,sampleCenter))*CENTER_WEIGHT; -#else -blend+=texture2D(textureSampler,sampleCenter)*CENTER_WEIGHT; -#endif -#endif -#include[0..varyingCount] -#include[0..depCount] -#ifdef PACKEDFLOAT -gl_FragColor=pack(blend); -#else -gl_FragColor=blend; -#endif -#ifdef DOF -gl_FragColor/=sumOfWeights; -#endif -}`;je.a.ShadersStore.kernelBlurPixelShader=xp,je.a.IncludesShadersStore.kernelBlurVertex="sampleCoord{X}=sampleCenter+delta*KERNEL_OFFSET{X};";var Rp=` -attribute vec2 position; - -uniform vec2 delta; - -varying vec2 sampleCenter; -#include[0..varyingCount] -const vec2 madd=vec2(0.5,0.5); -void main(void) { -sampleCenter=(position*madd+madd); -#include[0..varyingCount] -gl_Position=vec4(position,0.0,1.0); -}`;je.a.ShadersStore.kernelBlurVertexShader=Rp;var gn=function(r){function t(e,n,i,o,a,s,d,p,y,C,M){s===void 0&&(s=we.a.BILINEAR_SAMPLINGMODE),y===void 0&&(y=h.a.TEXTURETYPE_UNSIGNED_INT),C===void 0&&(C=""),M===void 0&&(M=!1);var U=r.call(this,e,"kernelBlur",["delta","direction","cameraMinMaxZ"],["circleOfConfusionSampler"],o,a,s,d,p,null,y,"kernelBlur",{varyingCount:0,depCount:0},!0)||this;return U.blockCompilation=M,U._packedFloat=!1,U._staticDefines="",U._staticDefines=C,U.direction=n,U.onApplyObservable.add(function(F){U._outputTexture?F.setFloat2("delta",1/U._outputTexture.width*U.direction.x,1/U._outputTexture.height*U.direction.y):F.setFloat2("delta",1/U.width*U.direction.x,1/U.height*U.direction.y)}),U.kernel=i,U}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"kernel",{get:function(){return this._idealKernel},set:function(e){this._idealKernel!==e&&(e=Math.max(e,1),this._idealKernel=e,this._kernel=this._nearestBestKernel(e),this.blockCompilation||this._updateParameters())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"packedFloat",{get:function(){return this._packedFloat},set:function(e){this._packedFloat!==e&&(this._packedFloat=e,this.blockCompilation||this._updateParameters())},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"BlurPostProcess"},t.prototype.updateEffect=function(e,n,i,o,a,s){this._updateParameters(a,s)},t.prototype._updateParameters=function(e,n){for(var i=this._kernel,o=(i-1)/2,a=[],s=[],d=0,p=0;p0)return Math.max(a,3)}return Math.max(n,3)},t.prototype._gaussianWeight=function(e){var n=-e*e/.2222222222222222;return 1/(Math.sqrt(2*Math.PI)*(1/3))*Math.exp(n)},t.prototype._glslFloat=function(e,n){return n===void 0&&(n=8),e.toFixed(n).replace(/0+$/,"")},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.direction,e.kernel,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable,e.textureType,void 0,!1)},e,i,o)},Object(c.c)([Object(L.c)("kernel")],t.prototype,"_kernel",void 0),Object(c.c)([Object(L.c)("packedFloat")],t.prototype,"_packedFloat",void 0),Object(c.c)([Object(L.n)()],t.prototype,"direction",void 0),t}(_t);R.a.RegisteredTypes["BABYLON.BlurPostProcess"]=gn;var ks=function(r){function t(e,n,i,o,a,s,d){a===void 0&&(a=h.a.TEXTURETYPE_UNSIGNED_INT),s===void 0&&(s=we.a.BILINEAR_SAMPLINGMODE),d===void 0&&(d=!0);var p=r.call(this,e,n,i,o,!0,a,!1,s,d)||this;return p.scene=i,p.mirrorPlane=new br.a(0,1,0,1),p._transformMatrix=l.a.Zero(),p._mirrorMatrix=l.a.Zero(),p._adaptiveBlurKernel=0,p._blurKernelX=0,p._blurKernelY=0,p._blurRatio=1,p.ignoreCameraViewport=!0,p._updateGammaSpace(),p._imageProcessingConfigChangeObserver=i.imageProcessingConfiguration.onUpdateParameters.add(function(){p._updateGammaSpace}),p.onBeforeRenderObservable.add(function(){l.a.ReflectionToRef(p.mirrorPlane,p._mirrorMatrix),p._savedViewMatrix=i.getViewMatrix(),p._mirrorMatrix.multiplyToRef(p._savedViewMatrix,p._transformMatrix),i.setTransformMatrix(p._transformMatrix,i.getProjectionMatrix()),i.clipPlane=p.mirrorPlane,i.getEngine().cullBackFaces=!1,i._mirroredCameraPosition=l.e.TransformCoordinates(i.activeCamera.globalPosition,p._mirrorMatrix)}),p.onAfterRenderObservable.add(function(){i.setTransformMatrix(p._savedViewMatrix,i.getProjectionMatrix()),i.getEngine().cullBackFaces=!0,i._mirroredCameraPosition=null,i.clipPlane=null}),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"blurRatio",{get:function(){return this._blurRatio},set:function(e){this._blurRatio!==e&&(this._blurRatio=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"adaptiveBlurKernel",{set:function(e){this._adaptiveBlurKernel=e,this._autoComputeBlurKernel()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernel",{set:function(e){this.blurKernelX=e,this.blurKernelY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernelX",{get:function(){return this._blurKernelX},set:function(e){this._blurKernelX!==e&&(this._blurKernelX=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurKernelY",{get:function(){return this._blurKernelY},set:function(e){this._blurKernelY!==e&&(this._blurKernelY=e,this._preparePostProcesses())},enumerable:!1,configurable:!0}),t.prototype._autoComputeBlurKernel=function(){var e=this.getScene().getEngine(),n=this.getRenderWidth()/e.getRenderWidth(),i=this.getRenderHeight()/e.getRenderHeight();this.blurKernelX=this._adaptiveBlurKernel*n,this.blurKernelY=this._adaptiveBlurKernel*i},t.prototype._onRatioRescale=function(){this._sizeRatio&&(this.resize(this._initialSizeParameter),this._adaptiveBlurKernel||this._preparePostProcesses()),this._adaptiveBlurKernel&&this._autoComputeBlurKernel()},t.prototype._updateGammaSpace=function(){this.gammaSpace=!this.scene.imageProcessingConfiguration.isEnabled||!this.scene.imageProcessingConfiguration.applyByPostProcess},t.prototype._preparePostProcesses=function(){if(this.clearPostProcesses(!0),this._blurKernelX&&this._blurKernelY){var e=this.getScene().getEngine(),n=e.getCaps().textureFloatRender?h.a.TEXTURETYPE_FLOAT:h.a.TEXTURETYPE_HALF_FLOAT;this._blurX=new gn("horizontal blur",new l.d(1,0),this._blurKernelX,this._blurRatio,null,we.a.BILINEAR_SAMPLINGMODE,e,!1,n),this._blurX.autoClear=!1,this._blurRatio===1&&this.samples<2&&this._texture?this._blurX.inputTexture=this._texture:this._blurX.alwaysForcePOT=!0,this._blurY=new gn("vertical blur",new l.d(0,1),this._blurKernelY,this._blurRatio,null,we.a.BILINEAR_SAMPLINGMODE,e,!1,n),this._blurY.autoClear=!1,this._blurY.alwaysForcePOT=this._blurRatio!==1,this.addPostProcess(this._blurX),this.addPostProcess(this._blurY)}else this._blurY&&(this.removePostProcess(this._blurY),this._blurY.dispose(),this._blurY=null),this._blurX&&(this.removePostProcess(this._blurX),this._blurX.dispose(),this._blurX=null)},t.prototype.clone=function(){var e=this.getScene();if(!e)return this;var n=this.getSize(),i=new t(this.name,n.width,e,this._renderTargetOptions.generateMipMaps,this._renderTargetOptions.type,this._renderTargetOptions.samplingMode,this._renderTargetOptions.generateDepthBuffer);return i.hasAlpha=this.hasAlpha,i.level=this.level,i.mirrorPlane=this.mirrorPlane.clone(),this.renderList&&(i.renderList=this.renderList.slice(0)),i},t.prototype.serialize=function(){if(!this.name)return null;var e=r.prototype.serialize.call(this);return e.mirrorPlane=this.mirrorPlane.asArray(),e},t.prototype.dispose=function(){r.prototype.dispose.call(this),this.scene.imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingConfigChangeObserver)},t}(ln);we.a._CreateMirror=function(r,t,e,n){return new ks(r,t,e,n)};var Qn=f(34),ai=function(r){function t(e,n,i,o,a,s,d,p,y,C,M,U,F,z){var J;i===void 0&&(i=null),o===void 0&&(o=!1),a===void 0&&(a=null),s===void 0&&(s=null),d===void 0&&(d=null),p===void 0&&(p=h.a.TEXTUREFORMAT_RGBA),y===void 0&&(y=!1),C===void 0&&(C=null),M===void 0&&(M=!1),U===void 0&&(U=.8),F===void 0&&(F=0);var ie=r.call(this,n)||this;if(ie.onLoadObservable=new P.c,ie.boundingBoxPosition=l.e.Zero(),ie._rotationY=0,ie._files=null,ie._forcedExtension=null,ie._extensions=null,ie.name=e,ie.url=e,ie._noMipmap=o,ie.hasAlpha=!1,ie._format=p,ie.isCube=!0,ie._textureMatrix=l.a.Identity(),ie._createPolynomials=M,ie.coordinatesMode=we.a.CUBIC_MODE,ie._extensions=i,ie._files=a,ie._forcedExtension=C,ie._loaderOptions=z,!e&&!a)return ie;var se=e.lastIndexOf("."),ce=C||(se>-1?e.substring(se).toLowerCase():""),ue=ce===".dds",fe=ce===".env";if(fe?(ie.gammaSpace=!1,ie._prefiltered=!1,ie.anisotropicFilteringLevel=1):(ie._prefiltered=y,y&&(ie.gammaSpace=!1,ie.anisotropicFilteringLevel=1)),ie._texture=ie._getFromCache(e,o),!a&&(fe||ue||i||(i=["_px.jpg","_py.jpg","_pz.jpg","_nx.jpg","_ny.jpg","_nz.jpg"]),a=[],i))for(var ve=0;ve -#define RECIPROCAL_PI2 0.15915494 - -uniform vec3 vEyePosition; - -varying vec3 vPositionW; -#ifdef MAINUV1 -varying vec2 vMainUV1; -#endif -#ifdef MAINUV2 -varying vec2 vMainUV2; -#endif -#ifdef NORMAL -varying vec3 vNormalW; -#endif -#ifdef DIFFUSE -#if DIFFUSEDIRECTUV == 1 -#define vDiffuseUV vMainUV1 -#elif DIFFUSEDIRECTUV == 2 -#define vDiffuseUV vMainUV2 -#else -varying vec2 vDiffuseUV; -#endif -uniform sampler2D diffuseSampler; -#endif - -#ifdef REFLECTION -#ifdef REFLECTIONMAP_3D -#define sampleReflection(s,c) textureCube(s,c) -uniform samplerCube reflectionSampler; -#ifdef TEXTURELODSUPPORT -#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l) -#else -uniform samplerCube reflectionSamplerLow; -uniform samplerCube reflectionSamplerHigh; -#endif -#else -#define sampleReflection(s,c) texture2D(s,c) -uniform sampler2D reflectionSampler; -#ifdef TEXTURELODSUPPORT -#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l) -#else -uniform samplerCube reflectionSamplerLow; -uniform samplerCube reflectionSamplerHigh; -#endif -#endif -#ifdef REFLECTIONMAP_SKYBOX -varying vec3 vPositionUVW; -#else -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -varying vec3 vDirectionW; -#endif -#endif -#include -#endif - -#ifndef FROMLINEARSPACE -#define FROMLINEARSPACE; -#endif - -#ifndef SHADOWONLY -#define SHADOWONLY; -#endif -#include - -#include<__decl__lightFragment>[0..maxSimultaneousLights] -#include -#include -#include -#include -#include - -#include -#ifdef REFLECTIONFRESNEL -#define FRESNEL_MAXIMUM_ON_ROUGH 0.25 -vec3 fresnelSchlickEnvironmentGGX(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness) -{ - -float weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness); -return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN)); -} -#endif -void main(void) { -#include -vec3 viewDirectionW=normalize(vEyePosition-vPositionW); - -#ifdef NORMAL -vec3 normalW=normalize(vNormalW); -#else -vec3 normalW=vec3(0.0,1.0,0.0); -#endif - -float shadow=1.; -float globalShadow=0.; -float shadowLightCount=0.; -#include[0..maxSimultaneousLights] -#ifdef SHADOWINUSE -globalShadow/=shadowLightCount; -#else -globalShadow=1.0; -#endif -#ifndef BACKMAT_SHADOWONLY - -vec4 reflectionColor=vec4(1.,1.,1.,1.); -#ifdef REFLECTION -vec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW); -#ifdef REFLECTIONMAP_OPPOSITEZ -reflectionVector.z*=-1.0; -#endif - -#ifdef REFLECTIONMAP_3D -vec3 reflectionCoords=reflectionVector; -#else -vec2 reflectionCoords=reflectionVector.xy; -#ifdef REFLECTIONMAP_PROJECTION -reflectionCoords/=reflectionVector.z; -#endif -reflectionCoords.y=1.0-reflectionCoords.y; -#endif -#ifdef REFLECTIONBLUR -float reflectionLOD=vReflectionInfos.y; -#ifdef TEXTURELODSUPPORT - -reflectionLOD=reflectionLOD*log2(vReflectionMicrosurfaceInfos.x)*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z; -reflectionColor=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD); -#else -float lodReflectionNormalized=saturate(reflectionLOD); -float lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0; -vec4 reflectionSpecularMid=sampleReflection(reflectionSampler,reflectionCoords); -if(lodReflectionNormalizedDoubled<1.0){ -reflectionColor=mix( -sampleReflection(reflectionSamplerHigh,reflectionCoords), -reflectionSpecularMid, -lodReflectionNormalizedDoubled -); -} else { -reflectionColor=mix( -reflectionSpecularMid, -sampleReflection(reflectionSamplerLow,reflectionCoords), -lodReflectionNormalizedDoubled-1.0 -); -} -#endif -#else -vec4 reflectionSample=sampleReflection(reflectionSampler,reflectionCoords); -reflectionColor=reflectionSample; -#endif -#ifdef RGBDREFLECTION -reflectionColor.rgb=fromRGBD(reflectionColor); -#endif -#ifdef GAMMAREFLECTION -reflectionColor.rgb=toLinearSpace(reflectionColor.rgb); -#endif -#ifdef REFLECTIONBGR -reflectionColor.rgb=reflectionColor.bgr; -#endif - -reflectionColor.rgb*=vReflectionInfos.x; -#endif - -vec3 diffuseColor=vec3(1.,1.,1.); -float finalAlpha=alpha; -#ifdef DIFFUSE -vec4 diffuseMap=texture2D(diffuseSampler,vDiffuseUV); -#ifdef GAMMADIFFUSE -diffuseMap.rgb=toLinearSpace(diffuseMap.rgb); -#endif - -diffuseMap.rgb*=vDiffuseInfos.y; -#ifdef DIFFUSEHASALPHA -finalAlpha*=diffuseMap.a; -#endif -diffuseColor=diffuseMap.rgb; -#endif - -#ifdef REFLECTIONFRESNEL -vec3 colorBase=diffuseColor; -#else -vec3 colorBase=reflectionColor.rgb*diffuseColor; -#endif -colorBase=max(colorBase,0.0); - -#ifdef USERGBCOLOR -vec3 finalColor=colorBase; -#else -#ifdef USEHIGHLIGHTANDSHADOWCOLORS -vec3 mainColor=mix(vPrimaryColorShadow.rgb,vPrimaryColor.rgb,colorBase); -#else -vec3 mainColor=vPrimaryColor.rgb; -#endif -vec3 finalColor=colorBase*mainColor; -#endif - -#ifdef REFLECTIONFRESNEL -vec3 reflectionAmount=vReflectionControl.xxx; -vec3 reflectionReflectance0=vReflectionControl.yyy; -vec3 reflectionReflectance90=vReflectionControl.zzz; -float VdotN=dot(normalize(vEyePosition),normalW); -vec3 planarReflectionFresnel=fresnelSchlickEnvironmentGGX(saturate(VdotN),reflectionReflectance0,reflectionReflectance90,1.0); -reflectionAmount*=planarReflectionFresnel; -#ifdef REFLECTIONFALLOFF -float reflectionDistanceFalloff=1.0-saturate(length(vPositionW.xyz-vBackgroundCenter)*vReflectionControl.w); -reflectionDistanceFalloff*=reflectionDistanceFalloff; -reflectionAmount*=reflectionDistanceFalloff; -#endif -finalColor=mix(finalColor,reflectionColor.rgb,saturate(reflectionAmount)); -#endif -#ifdef OPACITYFRESNEL -float viewAngleToFloor=dot(normalW,normalize(vEyePosition-vBackgroundCenter)); - -const float startAngle=0.1; -float fadeFactor=saturate(viewAngleToFloor/startAngle); -finalAlpha*=fadeFactor*fadeFactor; -#endif - -#ifdef SHADOWINUSE -finalColor=mix(finalColor*shadowLevel,finalColor,globalShadow); -#endif - -vec4 color=vec4(finalColor,finalAlpha); -#else -vec4 color=vec4(vPrimaryColor.rgb,(1.0-clamp(globalShadow,0.,1.))*alpha); -#endif -#include -#ifdef IMAGEPROCESSINGPOSTPROCESS - - -color.rgb=clamp(color.rgb,0.,30.0); -#else - -color=applyImageProcessing(color); -#endif -#ifdef PREMULTIPLYALPHA - -color.rgb*=color.a; -#endif -#ifdef NOISE -color.rgb+=dither(vPositionW.xy,0.5); -color=max(color,0.0); -#endif -gl_FragColor=color; -} -`;je.a.ShadersStore.backgroundPixelShader=Ip;var Dp=`uniform mat4 view; -uniform mat4 viewProjection; -uniform float shadowLevel; -#ifdef DIFFUSE -uniform mat4 diffuseMatrix; -uniform vec2 vDiffuseInfos; -#endif -#ifdef REFLECTION -uniform vec2 vReflectionInfos; -uniform mat4 reflectionMatrix; -uniform vec3 vReflectionMicrosurfaceInfos; -uniform float fFovMultiplier; -#endif -#ifdef POINTSIZE -uniform float pointSize; -#endif`;je.a.IncludesShadersStore.backgroundVertexDeclaration=Dp,f(78),f(79),f(117),f(137),f(80),f(81),f(111),f(157),f(138);var Lp=`precision highp float; -#include<__decl__backgroundVertex> -#include - -attribute vec3 position; -#ifdef NORMAL -attribute vec3 normal; -#endif -#include - -#include - -varying vec3 vPositionW; -#ifdef NORMAL -varying vec3 vNormalW; -#endif -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#ifdef MAINUV1 -varying vec2 vMainUV1; -#endif -#ifdef MAINUV2 -varying vec2 vMainUV2; -#endif -#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 -varying vec2 vDiffuseUV; -#endif -#include -#include -#include<__decl__lightFragment>[0..maxSimultaneousLights] -#ifdef REFLECTIONMAP_SKYBOX -varying vec3 vPositionUVW; -#endif -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -varying vec3 vDirectionW; -#endif -void main(void) { -#ifdef REFLECTIONMAP_SKYBOX -vPositionUVW=position; -#endif -#include -#include -#ifdef MULTIVIEW -if (gl_ViewID_OVR == 0u) { -gl_Position=viewProjection*finalWorld*vec4(position,1.0); -} else { -gl_Position=viewProjectionR*finalWorld*vec4(position,1.0); -} -#else -gl_Position=viewProjection*finalWorld*vec4(position,1.0); -#endif -vec4 worldPos=finalWorld*vec4(position,1.0); -vPositionW=vec3(worldPos); -#ifdef NORMAL -mat3 normalWorld=mat3(finalWorld); -#ifdef NONUNIFORMSCALING -normalWorld=transposeMat3(inverseMat3(normalWorld)); -#endif -vNormalW=normalize(normalWorld*normal); -#endif -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -vDirectionW=normalize(vec3(finalWorld*vec4(position,0.0))); -#ifdef EQUIRECTANGULAR_RELFECTION_FOV -mat3 screenToWorld=inverseMat3(mat3(finalWorld*viewProjection)); -vec3 segment=mix(vDirectionW,screenToWorld*vec3(0.0,0.0,1.0),abs(fFovMultiplier-1.0)); -if (fFovMultiplier<=1.0) { -vDirectionW=normalize(segment); -} else { -vDirectionW=normalize(vDirectionW+(vDirectionW-segment)); -} -#endif -#endif -#ifndef UV1 -vec2 uv=vec2(0.,0.); -#endif -#ifndef UV2 -vec2 uv2=vec2(0.,0.); -#endif -#ifdef MAINUV1 -vMainUV1=uv; -#endif -#ifdef MAINUV2 -vMainUV2=uv2; -#endif -#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 -if (vDiffuseInfos.x == 0.) -{ -vDiffuseUV=vec2(diffuseMatrix*vec4(uv,1.0,0.0)); -} -else -{ -vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -} -#endif - -#include - -#include - -#include[0..maxSimultaneousLights] - -#ifdef VERTEXCOLOR -vColor=color; -#endif - -#ifdef POINTSIZE -gl_PointSize=pointSize; -#endif -} -`;je.a.ShadersStore.backgroundVertexShader=Lp;var Ar=f(67),Np=function(r){function t(){var e=r.call(this)||this;return e.DIFFUSE=!1,e.DIFFUSEDIRECTUV=0,e.GAMMADIFFUSE=!1,e.DIFFUSEHASALPHA=!1,e.OPACITYFRESNEL=!1,e.REFLECTIONBLUR=!1,e.REFLECTIONFRESNEL=!1,e.REFLECTIONFALLOFF=!1,e.TEXTURELODSUPPORT=!1,e.PREMULTIPLYALPHA=!1,e.USERGBCOLOR=!1,e.USEHIGHLIGHTANDSHADOWCOLORS=!1,e.BACKMAT_SHADOWONLY=!1,e.NOISE=!1,e.REFLECTIONBGR=!1,e.IMAGEPROCESSING=!1,e.VIGNETTE=!1,e.VIGNETTEBLENDMODEMULTIPLY=!1,e.VIGNETTEBLENDMODEOPAQUE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=!1,e.SAMPLER3DBGRMAP=!1,e.IMAGEPROCESSINGPOSTPROCESS=!1,e.EXPOSURE=!1,e.MULTIVIEW=!1,e.REFLECTION=!1,e.REFLECTIONMAP_3D=!1,e.REFLECTIONMAP_SPHERICAL=!1,e.REFLECTIONMAP_PLANAR=!1,e.REFLECTIONMAP_CUBIC=!1,e.REFLECTIONMAP_PROJECTION=!1,e.REFLECTIONMAP_SKYBOX=!1,e.REFLECTIONMAP_EXPLICIT=!1,e.REFLECTIONMAP_EQUIRECTANGULAR=!1,e.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,e.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,e.INVERTCUBICMAP=!1,e.REFLECTIONMAP_OPPOSITEZ=!1,e.LODINREFLECTIONALPHA=!1,e.GAMMAREFLECTION=!1,e.RGBDREFLECTION=!1,e.EQUIRECTANGULAR_RELFECTION_FOV=!1,e.MAINUV1=!1,e.MAINUV2=!1,e.UV1=!1,e.UV2=!1,e.CLIPPLANE=!1,e.CLIPPLANE2=!1,e.CLIPPLANE3=!1,e.CLIPPLANE4=!1,e.CLIPPLANE5=!1,e.CLIPPLANE6=!1,e.POINTSIZE=!1,e.FOG=!1,e.NORMAL=!1,e.NUM_BONE_INFLUENCERS=0,e.BonesPerMesh=0,e.INSTANCES=!1,e.SHADOWFLOAT=!1,e.rebuild(),e}return Object(c.d)(t,r),t}(ia.a),co=function(r){function t(e,n){var i=r.call(this,e,n)||this;return i.primaryColor=O.a.White(),i._primaryColorShadowLevel=0,i._primaryColorHighlightLevel=0,i.reflectionTexture=null,i.reflectionBlur=0,i.diffuseTexture=null,i._shadowLights=null,i.shadowLights=null,i.shadowLevel=0,i.sceneCenter=l.e.Zero(),i.opacityFresnel=!0,i.reflectionFresnel=!1,i.reflectionFalloffDistance=0,i.reflectionAmount=1,i.reflectionReflectance0=.05,i.reflectionReflectance90=.5,i.useRGBColor=!0,i.enableNoise=!1,i._fovMultiplier=1,i.useEquirectangularFOV=!1,i._maxSimultaneousLights=4,i.maxSimultaneousLights=4,i._shadowOnly=!1,i.shadowOnly=!1,i._imageProcessingObserver=null,i.switchToBGR=!1,i._renderTargets=new _i.a(16),i._reflectionControls=l.f.Zero(),i._white=O.a.White(),i._primaryShadowColor=O.a.Black(),i._primaryHighlightColor=O.a.Black(),i._attachImageProcessingConfiguration(null),i.getRenderTargetTextures=function(){return i._renderTargets.reset(),i._diffuseTexture&&i._diffuseTexture.isRenderTarget&&i._renderTargets.push(i._diffuseTexture),i._reflectionTexture&&i._reflectionTexture.isRenderTarget&&i._renderTargets.push(i._reflectionTexture),i._renderTargets},i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"_perceptualColor",{get:function(){return this.__perceptualColor},set:function(e){this.__perceptualColor=e,this._computePrimaryColorFromPerceptualColor(),this._markAllSubMeshesAsLightsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"primaryColorShadowLevel",{get:function(){return this._primaryColorShadowLevel},set:function(e){this._primaryColorShadowLevel=e,this._computePrimaryColors(),this._markAllSubMeshesAsLightsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"primaryColorHighlightLevel",{get:function(){return this._primaryColorHighlightLevel},set:function(e){this._primaryColorHighlightLevel=e,this._computePrimaryColors(),this._markAllSubMeshesAsLightsDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"reflectionStandardFresnelWeight",{set:function(e){var n=e;n<.5?(n*=2,this.reflectionReflectance0=t.StandardReflectance0*n,this.reflectionReflectance90=t.StandardReflectance90*n):(n=2*n-1,this.reflectionReflectance0=t.StandardReflectance0+(1-t.StandardReflectance0)*n,this.reflectionReflectance90=t.StandardReflectance90+(1-t.StandardReflectance90)*n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fovMultiplier",{get:function(){return this._fovMultiplier},set:function(e){isNaN(e)&&(e=1),this._fovMultiplier=Math.max(0,Math.min(2,e))},enumerable:!1,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e){var n=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){n._computePrimaryColorFromPerceptualColor(),n._markAllSubMeshesAsImageProcessingDirty()})))},Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraToneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraExposure",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraContrast",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingTexture",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this.imageProcessingConfiguration.colorGradingTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurves",{get:function(){return this.imageProcessingConfiguration.colorCurves},set:function(e){this.imageProcessingConfiguration.colorCurves=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasRenderTargetTextures",{get:function(){return!(!this._diffuseTexture||!this._diffuseTexture.isRenderTarget)||!(!this._reflectionTexture||!this._reflectionTexture.isRenderTarget)},enumerable:!1,configurable:!0}),t.prototype.needAlphaTesting=function(){return!0},t.prototype.needAlphaBlending=function(){return this.alpha<1||this._diffuseTexture!=null&&this._diffuseTexture.hasAlpha||this._shadowOnly},t.prototype.isReadyForSubMesh=function(e,n,i){var o=this;if(i===void 0&&(i=!1),n.effect&&this.isFrozen&&n.effect._wasPreviouslyReady)return!0;n._materialDefines||(n._materialDefines=new Np);var a=this.getScene(),s=n._materialDefines;if(this._isReadyForSubMesh(n))return!0;var d=a.getEngine();if(tt.a.PrepareDefinesForLights(a,e,s,!1,this._maxSimultaneousLights),s._needNormals=!0,tt.a.PrepareDefinesForMultiview(a,s),s._areTexturesDirty){if(s._needUVs=!1,a.texturesEnabled){if(a.getEngine().getCaps().textureLOD&&(s.TEXTURELODSUPPORT=!0),this._diffuseTexture&&ht.a.DiffuseTextureEnabled){if(!this._diffuseTexture.isReadyOrNotBlocking())return!1;tt.a.PrepareDefinesForMergedUV(this._diffuseTexture,s,"DIFFUSE"),s.DIFFUSEHASALPHA=this._diffuseTexture.hasAlpha,s.GAMMADIFFUSE=this._diffuseTexture.gammaSpace,s.OPACITYFRESNEL=this._opacityFresnel}else s.DIFFUSE=!1,s.DIFFUSEHASALPHA=!1,s.GAMMADIFFUSE=!1,s.OPACITYFRESNEL=!1;var p=this._reflectionTexture;if(p&&ht.a.ReflectionTextureEnabled){if(!p.isReadyOrNotBlocking())return!1;switch(s.REFLECTION=!0,s.GAMMAREFLECTION=p.gammaSpace,s.RGBDREFLECTION=p.isRGBD,s.REFLECTIONBLUR=this._reflectionBlur>0,s.REFLECTIONMAP_OPPOSITEZ=this.getScene().useRightHandedSystem?!p.invertZ:p.invertZ,s.LODINREFLECTIONALPHA=p.lodLevelInAlpha,s.EQUIRECTANGULAR_RELFECTION_FOV=this.useEquirectangularFOV,s.REFLECTIONBGR=this.switchToBGR,p.coordinatesMode===we.a.INVCUBIC_MODE&&(s.INVERTCUBICMAP=!0),s.REFLECTIONMAP_3D=p.isCube,p.coordinatesMode){case we.a.EXPLICIT_MODE:s.REFLECTIONMAP_EXPLICIT=!0;break;case we.a.PLANAR_MODE:s.REFLECTIONMAP_PLANAR=!0;break;case we.a.PROJECTION_MODE:s.REFLECTIONMAP_PROJECTION=!0;break;case we.a.SKYBOX_MODE:s.REFLECTIONMAP_SKYBOX=!0;break;case we.a.SPHERICAL_MODE:s.REFLECTIONMAP_SPHERICAL=!0;break;case we.a.EQUIRECTANGULAR_MODE:s.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case we.a.FIXED_EQUIRECTANGULAR_MODE:s.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case we.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:s.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case we.a.CUBIC_MODE:case we.a.INVCUBIC_MODE:default:s.REFLECTIONMAP_CUBIC=!0}this.reflectionFresnel?(s.REFLECTIONFRESNEL=!0,s.REFLECTIONFALLOFF=this.reflectionFalloffDistance>0,this._reflectionControls.x=this.reflectionAmount,this._reflectionControls.y=this.reflectionReflectance0,this._reflectionControls.z=this.reflectionReflectance90,this._reflectionControls.w=1/this.reflectionFalloffDistance):(s.REFLECTIONFRESNEL=!1,s.REFLECTIONFALLOFF=!1)}else s.REFLECTION=!1,s.REFLECTIONFRESNEL=!1,s.REFLECTIONFALLOFF=!1,s.REFLECTIONBLUR=!1,s.REFLECTIONMAP_3D=!1,s.REFLECTIONMAP_SPHERICAL=!1,s.REFLECTIONMAP_PLANAR=!1,s.REFLECTIONMAP_CUBIC=!1,s.REFLECTIONMAP_PROJECTION=!1,s.REFLECTIONMAP_SKYBOX=!1,s.REFLECTIONMAP_EXPLICIT=!1,s.REFLECTIONMAP_EQUIRECTANGULAR=!1,s.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,s.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,s.INVERTCUBICMAP=!1,s.REFLECTIONMAP_OPPOSITEZ=!1,s.LODINREFLECTIONALPHA=!1,s.GAMMAREFLECTION=!1,s.RGBDREFLECTION=!1}s.PREMULTIPLYALPHA=this.alphaMode===h.a.ALPHA_PREMULTIPLIED||this.alphaMode===h.a.ALPHA_PREMULTIPLIED_PORTERDUFF,s.USERGBCOLOR=this._useRGBColor,s.NOISE=this._enableNoise}if(s._areLightsDirty&&(s.USEHIGHLIGHTANDSHADOWCOLORS=!this._useRGBColor&&(this._primaryColorShadowLevel!==0||this._primaryColorHighlightLevel!==0),s.BACKMAT_SHADOWONLY=this._shadowOnly),s._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(s)}if(tt.a.PrepareDefinesForMisc(e,a,!1,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e),s),tt.a.PrepareDefinesForFrameBoundValues(a,d,s,i,null,n.getRenderingMesh().hasThinInstances),tt.a.PrepareDefinesForAttributes(e,s,!1,!0,!1)&&e&&(a.getEngine().getCaps().standardDerivatives||e.isVerticesDataPresent(Me.b.NormalKind)||(e.createNormals(!0),u.a.Warn("BackgroundMaterial: Normals have been created for the mesh: "+e.name))),s.isDirty){s.markAsProcessed(),a.resetCachedMaterial();var y=new Ar.a;s.FOG&&y.addFallback(0,"FOG"),s.POINTSIZE&&y.addFallback(1,"POINTSIZE"),s.MULTIVIEW&&y.addFallback(0,"MULTIVIEW"),tt.a.HandleFallbacksForShadows(s,y,this._maxSimultaneousLights);var C=[Me.b.PositionKind];s.NORMAL&&C.push(Me.b.NormalKind),s.UV1&&C.push(Me.b.UVKind),s.UV2&&C.push(Me.b.UV2Kind),tt.a.PrepareAttributesForBones(C,e,s,y),tt.a.PrepareAttributesForInstances(C,s);var M=["world","view","viewProjection","vEyePosition","vLightsType","vFogInfos","vFogColor","pointSize","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","mBones","vPrimaryColor","vPrimaryColorShadow","vReflectionInfos","reflectionMatrix","vReflectionMicrosurfaceInfos","fFovMultiplier","shadowLevel","alpha","vBackgroundCenter","vReflectionControl","vDiffuseInfos","diffuseMatrix"],U=["diffuseSampler","reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh"],F=["Material","Scene"];yn.a&&(yn.a.PrepareUniforms(M,s),yn.a.PrepareSamplers(U,s)),tt.a.PrepareUniformsAndSamplersList({uniformsNames:M,uniformBuffersNames:F,samplers:U,defines:s,maxSimultaneousLights:this._maxSimultaneousLights});var z=s.toString();n.setEffect(a.getEngine().createEffect("background",{attributes:C,uniformsNames:M,uniformBuffersNames:F,samplers:U,defines:z,fallbacks:y,onCompiled:function(J){o.onCompiled&&o.onCompiled(J),o.bindSceneUniformBuffer(J,a.getSceneUniformBuffer())},onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights}},d),s),this.buildUniformLayout()}return!(!n.effect||!n.effect.isReady())&&(s._renderId=a.getRenderId(),n.effect._wasPreviouslyReady=!0,!0)},t.prototype._computePrimaryColorFromPerceptualColor=function(){this.__perceptualColor&&(this._primaryColor.copyFrom(this.__perceptualColor),this._primaryColor.toLinearSpaceToRef(this._primaryColor),this._imageProcessingConfiguration&&this._primaryColor.scaleToRef(1/this._imageProcessingConfiguration.exposure,this._primaryColor),this._computePrimaryColors())},t.prototype._computePrimaryColors=function(){this._primaryColorShadowLevel===0&&this._primaryColorHighlightLevel===0||(this._primaryColor.scaleToRef(this._primaryColorShadowLevel,this._primaryShadowColor),this._primaryColor.subtractToRef(this._primaryShadowColor,this._primaryShadowColor),this._white.subtractToRef(this._primaryColor,this._primaryHighlightColor),this._primaryHighlightColor.scaleToRef(this._primaryColorHighlightLevel,this._primaryHighlightColor),this._primaryColor.addToRef(this._primaryHighlightColor,this._primaryHighlightColor))},t.prototype.buildUniformLayout=function(){this._uniformBuffer.addUniform("vPrimaryColor",4),this._uniformBuffer.addUniform("vPrimaryColorShadow",4),this._uniformBuffer.addUniform("vDiffuseInfos",2),this._uniformBuffer.addUniform("vReflectionInfos",2),this._uniformBuffer.addUniform("diffuseMatrix",16),this._uniformBuffer.addUniform("reflectionMatrix",16),this._uniformBuffer.addUniform("vReflectionMicrosurfaceInfos",3),this._uniformBuffer.addUniform("fFovMultiplier",1),this._uniformBuffer.addUniform("pointSize",1),this._uniformBuffer.addUniform("shadowLevel",1),this._uniformBuffer.addUniform("alpha",1),this._uniformBuffer.addUniform("vBackgroundCenter",3),this._uniformBuffer.addUniform("vReflectionControl",4),this._uniformBuffer.create()},t.prototype.unbind=function(){this._diffuseTexture&&this._diffuseTexture.isRenderTarget&&this._uniformBuffer.setTexture("diffuseSampler",null),this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&this._uniformBuffer.setTexture("reflectionSampler",null),r.prototype.unbind.call(this)},t.prototype.bindOnlyWorldMatrix=function(e){this._activeEffect.setMatrix("world",e)},t.prototype.bindForSubMesh=function(e,n,i){var o=this.getScene(),a=i._materialDefines;if(a){var s=i.effect;if(s){this._activeEffect=s,this.bindOnlyWorldMatrix(e),tt.a.BindBonesParameters(n,this._activeEffect);var d=this._mustRebind(o,s,n.visibility);if(d){this._uniformBuffer.bindToEffect(s,"Material"),this.bindViewProjection(s);var p=this._reflectionTexture;this._uniformBuffer.useUbo&&this.isFrozen&&this._uniformBuffer.isSync||(o.texturesEnabled&&(this._diffuseTexture&&ht.a.DiffuseTextureEnabled&&(this._uniformBuffer.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),tt.a.BindTextureMatrix(this._diffuseTexture,this._uniformBuffer,"diffuse")),p&&ht.a.ReflectionTextureEnabled&&(this._uniformBuffer.updateMatrix("reflectionMatrix",p.getReflectionTextureMatrix()),this._uniformBuffer.updateFloat2("vReflectionInfos",p.level,this._reflectionBlur),this._uniformBuffer.updateFloat3("vReflectionMicrosurfaceInfos",p.getSize().width,p.lodGenerationScale,p.lodGenerationOffset))),this.shadowLevel>0&&this._uniformBuffer.updateFloat("shadowLevel",this.shadowLevel),this._uniformBuffer.updateFloat("alpha",this.alpha),this.pointsCloud&&this._uniformBuffer.updateFloat("pointSize",this.pointSize),a.USEHIGHLIGHTANDSHADOWCOLORS?(this._uniformBuffer.updateColor4("vPrimaryColor",this._primaryHighlightColor,1),this._uniformBuffer.updateColor4("vPrimaryColorShadow",this._primaryShadowColor,1)):this._uniformBuffer.updateColor4("vPrimaryColor",this._primaryColor,1)),this._uniformBuffer.updateFloat("fFovMultiplier",this._fovMultiplier),o.texturesEnabled&&(this._diffuseTexture&&ht.a.DiffuseTextureEnabled&&this._uniformBuffer.setTexture("diffuseSampler",this._diffuseTexture),p&&ht.a.ReflectionTextureEnabled&&(a.REFLECTIONBLUR&&a.TEXTURELODSUPPORT?this._uniformBuffer.setTexture("reflectionSampler",p):a.REFLECTIONBLUR?(this._uniformBuffer.setTexture("reflectionSampler",p._lodTextureMid||p),this._uniformBuffer.setTexture("reflectionSamplerLow",p._lodTextureLow||p),this._uniformBuffer.setTexture("reflectionSamplerHigh",p._lodTextureHigh||p)):this._uniformBuffer.setTexture("reflectionSampler",p),a.REFLECTIONFRESNEL&&(this._uniformBuffer.updateFloat3("vBackgroundCenter",this.sceneCenter.x,this.sceneCenter.y,this.sceneCenter.z),this._uniformBuffer.updateFloat4("vReflectionControl",this._reflectionControls.x,this._reflectionControls.y,this._reflectionControls.z,this._reflectionControls.w)))),tt.a.BindClipPlane(this._activeEffect,o),tt.a.BindEyePosition(s,o)}!d&&this.isFrozen||(o.lightsEnabled&&tt.a.BindLights(o,n,this._activeEffect,a,this._maxSimultaneousLights,!1),this.bindView(s),tt.a.BindFogParameters(o,n,this._activeEffect,!0),this._imageProcessingConfiguration&&this._imageProcessingConfiguration.bind(this._activeEffect)),this._uniformBuffer.update(),this._afterBind(n,this._activeEffect)}}},t.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||this._reflectionTexture===e||this._diffuseTexture===e},t.prototype.dispose=function(e,n){e===void 0&&(e=!1),n===void 0&&(n=!1),n&&(this.diffuseTexture&&this.diffuseTexture.dispose(),this.reflectionTexture&&this.reflectionTexture.dispose()),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),r.prototype.dispose.call(this,e)},t.prototype.clone=function(e){var n=this;return L.a.Clone(function(){return new t(e,n.getScene())},this)},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="BABYLON.BackgroundMaterial",e},t.prototype.getClassName=function(){return"BackgroundMaterial"},t.Parse=function(e,n,i){return L.a.Parse(function(){return new t(e.name,n)},e,n,i)},t.StandardReflectance0=.05,t.StandardReflectance90=.5,Object(c.c)([Object(L.e)()],t.prototype,"_primaryColor",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"primaryColor",void 0),Object(c.c)([Object(L.e)()],t.prototype,"__perceptualColor",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_primaryColorShadowLevel",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_primaryColorHighlightLevel",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"primaryColorHighlightLevel",null),Object(c.c)([Object(L.m)()],t.prototype,"_reflectionTexture",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionBlur",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionBlur",void 0),Object(c.c)([Object(L.m)()],t.prototype,"_diffuseTexture",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"diffuseTexture",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"shadowLights",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_shadowLevel",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"shadowLevel",void 0),Object(c.c)([Object(L.o)()],t.prototype,"_sceneCenter",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"sceneCenter",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_opacityFresnel",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"opacityFresnel",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionFresnel",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionFresnel",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionFalloffDistance",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionFalloffDistance",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionAmount",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionAmount",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionReflectance0",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionReflectance0",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_reflectionReflectance90",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionReflectance90",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_useRGBColor",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRGBColor",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_enableNoise",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"enableNoise",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_maxSimultaneousLights",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"maxSimultaneousLights",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_shadowOnly",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"shadowOnly",void 0),Object(c.c)([Object(L.i)()],t.prototype,"_imageProcessingConfiguration",void 0),t}(ra.a);R.a.RegisteredTypes["BABYLON.BackgroundMaterial"]=co;var Gs=function(){function r(t,e){var n=this;this._errorHandler=function(i,o){n.onErrorObservable.notifyObservers({message:i,exception:o})},this._options=Object(c.a)(Object(c.a)({},r._getDefaultOptions()),t),this._scene=e,this.onErrorObservable=new P.c,this._setupBackground(),this._setupImageProcessing()}return r._getDefaultOptions=function(){return{createGround:!0,groundSize:15,groundTexture:this._groundTextureCDNUrl,groundColor:new O.a(.2,.2,.3).toLinearSpace().scale(3),groundOpacity:.9,enableGroundShadow:!0,groundShadowLevel:.5,enableGroundMirror:!1,groundMirrorSizeRatio:.3,groundMirrorBlurKernel:64,groundMirrorAmount:1,groundMirrorFresnelWeight:1,groundMirrorFallOffDistance:0,groundMirrorTextureType:h.a.TEXTURETYPE_UNSIGNED_INT,groundYBias:1e-5,createSkybox:!0,skyboxSize:20,skyboxTexture:this._skyboxTextureCDNUrl,skyboxColor:new O.a(.2,.2,.3).toLinearSpace().scale(3),backgroundYRotation:0,sizeAuto:!0,rootPosition:l.e.Zero(),setupImageProcessing:!0,environmentTexture:this._environmentTextureCDNUrl,cameraExposure:.8,cameraContrast:1.2,toneMappingEnabled:!0}},Object.defineProperty(r.prototype,"rootMesh",{get:function(){return this._rootMesh},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"skybox",{get:function(){return this._skybox},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"skyboxTexture",{get:function(){return this._skyboxTexture},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"skyboxMaterial",{get:function(){return this._skyboxMaterial},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ground",{get:function(){return this._ground},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundTexture",{get:function(){return this._groundTexture},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundMirror",{get:function(){return this._groundMirror},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundMirrorRenderList",{get:function(){return this._groundMirror?this._groundMirror.renderList:null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"groundMaterial",{get:function(){return this._groundMaterial},enumerable:!1,configurable:!0}),r.prototype.updateOptions=function(t){var e=Object(c.a)(Object(c.a)({},this._options),t);this._ground&&!e.createGround&&(this._ground.dispose(),this._ground=null),this._groundMaterial&&!e.createGround&&(this._groundMaterial.dispose(),this._groundMaterial=null),this._groundTexture&&this._options.groundTexture!=e.groundTexture&&(this._groundTexture.dispose(),this._groundTexture=null),this._skybox&&!e.createSkybox&&(this._skybox.dispose(),this._skybox=null),this._skyboxMaterial&&!e.createSkybox&&(this._skyboxMaterial.dispose(),this._skyboxMaterial=null),this._skyboxTexture&&this._options.skyboxTexture!=e.skyboxTexture&&(this._skyboxTexture.dispose(),this._skyboxTexture=null),this._groundMirror&&!e.enableGroundMirror&&(this._groundMirror.dispose(),this._groundMirror=null),this._scene.environmentTexture&&this._options.environmentTexture!=e.environmentTexture&&this._scene.environmentTexture.dispose(),this._options=e,this._setupBackground(),this._setupImageProcessing()},r.prototype.setMainColor=function(t){this.groundMaterial&&(this.groundMaterial.primaryColor=t),this.skyboxMaterial&&(this.skyboxMaterial.primaryColor=t),this.groundMirror&&(this.groundMirror.clearColor=new O.b(t.r,t.g,t.b,1))},r.prototype._setupImageProcessing=function(){this._options.setupImageProcessing&&(this._scene.imageProcessingConfiguration.contrast=this._options.cameraContrast,this._scene.imageProcessingConfiguration.exposure=this._options.cameraExposure,this._scene.imageProcessingConfiguration.toneMappingEnabled=this._options.toneMappingEnabled,this._setupEnvironmentTexture())},r.prototype._setupEnvironmentTexture=function(){if(!this._scene.environmentTexture)if(this._options.environmentTexture instanceof Wn.a)this._scene.environmentTexture=this._options.environmentTexture;else{var t=ai.CreateFromPrefilteredData(this._options.environmentTexture,this._scene);this._scene.environmentTexture=t}},r.prototype._setupBackground=function(){this._rootMesh||(this._rootMesh=new De.a("BackgroundHelper",this._scene)),this._rootMesh.rotation.y=this._options.backgroundYRotation;var t=this._getSceneSize();this._options.createGround&&(this._setupGround(t),this._setupGroundMaterial(),this._setupGroundDiffuseTexture(),this._options.enableGroundMirror&&this._setupGroundMirrorTexture(t),this._setupMirrorInGroundMaterial()),this._options.createSkybox&&(this._setupSkybox(t),this._setupSkyboxMaterial(),this._setupSkyboxReflectionTexture()),this._rootMesh.position.x=t.rootPosition.x,this._rootMesh.position.z=t.rootPosition.z,this._rootMesh.position.y=t.rootPosition.y},r.prototype._getSceneSize=function(){var t=this,e=this._options.groundSize,n=this._options.skyboxSize,i=this._options.rootPosition;if(!this._scene.meshes||this._scene.meshes.length===1)return{groundSize:e,skyboxSize:n,rootPosition:i};var o=this._scene.getWorldExtends(function(d){return d!==t._ground&&d!==t._rootMesh&&d!==t._skybox}),a=o.max.subtract(o.min);if(this._options.sizeAuto){this._scene.activeCamera instanceof Ji&&this._scene.activeCamera.upperRadiusLimit&&(n=e=2*this._scene.activeCamera.upperRadiusLimit);var s=a.length();s>e&&(n=e=2*s),e*=1.1,n*=1.5,(i=o.min.add(a.scale(.5))).y=o.min.y-this._options.groundYBias}return{groundSize:e,skyboxSize:n,rootPosition:i}},r.prototype._setupGround=function(t){var e=this;this._ground&&!this._ground.isDisposed()||(this._ground=De.a.CreatePlane("BackgroundPlane",t.groundSize,this._scene),this._ground.rotation.x=Math.PI/2,this._ground.parent=this._rootMesh,this._ground.onDisposeObservable.add(function(){e._ground=null})),this._ground.receiveShadows=this._options.enableGroundShadow},r.prototype._setupGroundMaterial=function(){this._groundMaterial||(this._groundMaterial=new co("BackgroundPlaneMaterial",this._scene)),this._groundMaterial.alpha=this._options.groundOpacity,this._groundMaterial.alphaMode=h.a.ALPHA_PREMULTIPLIED_PORTERDUFF,this._groundMaterial.shadowLevel=this._options.groundShadowLevel,this._groundMaterial.primaryColor=this._options.groundColor,this._groundMaterial.useRGBColor=!1,this._groundMaterial.enableNoise=!0,this._ground&&(this._ground.material=this._groundMaterial)},r.prototype._setupGroundDiffuseTexture=function(){this._groundMaterial&&(this._groundTexture||(this._options.groundTexture instanceof Wn.a?this._groundMaterial.diffuseTexture=this._options.groundTexture:(this._groundTexture=new we.a(this._options.groundTexture,this._scene,void 0,void 0,void 0,void 0,this._errorHandler),this._groundTexture.gammaSpace=!1,this._groundTexture.hasAlpha=!0,this._groundMaterial.diffuseTexture=this._groundTexture)))},r.prototype._setupGroundMirrorTexture=function(t){var e=we.a.CLAMP_ADDRESSMODE;if(!this._groundMirror&&(this._groundMirror=new ks("BackgroundPlaneMirrorTexture",{ratio:this._options.groundMirrorSizeRatio},this._scene,!1,this._options.groundMirrorTextureType,we.a.BILINEAR_SAMPLINGMODE,!0),this._groundMirror.mirrorPlane=new br.a(0,-1,0,t.rootPosition.y),this._groundMirror.anisotropicFilteringLevel=1,this._groundMirror.wrapU=e,this._groundMirror.wrapV=e,this._groundMirror.gammaSpace=!1,this._groundMirror.renderList))for(var n=0;n0&&t.push(this._texture),this._textureRoughness&&this._textureRoughness.animations&&this._textureRoughness.animations.length>0&&t.push(this._textureRoughness),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&t.push(this._bumpTexture),this._tintTexture&&this._tintTexture.animations&&this._tintTexture.animations.length>0&&t.push(this._tintTexture)},r.prototype.dispose=function(t){var e,n,i,o;t&&((e=this._texture)===null||e===void 0||e.dispose(),(n=this._textureRoughness)===null||n===void 0||n.dispose(),(i=this._bumpTexture)===null||i===void 0||i.dispose(),(o=this._tintTexture)===null||o===void 0||o.dispose())},r.prototype.getClassName=function(){return"PBRClearCoatConfiguration"},r.AddFallbacks=function(t,e,n){return t.CLEARCOAT_BUMP&&e.addFallback(n++,"CLEARCOAT_BUMP"),t.CLEARCOAT_TINT&&e.addFallback(n++,"CLEARCOAT_TINT"),t.CLEARCOAT&&e.addFallback(n++,"CLEARCOAT"),n},r.AddUniforms=function(t){t.push("vClearCoatTangentSpaceParams","vClearCoatParams","vClearCoatRefractionParams","vClearCoatTintParams","clearCoatColorAtDistance","clearCoatMatrix","clearCoatRoughnessMatrix","clearCoatBumpMatrix","clearCoatTintMatrix","vClearCoatInfos","vClearCoatBumpInfos","vClearCoatTintInfos")},r.AddSamplers=function(t){t.push("clearCoatSampler","clearCoatRoughnessSampler","clearCoatBumpSampler","clearCoatTintSampler")},r.PrepareUniformBuffer=function(t){t.addUniform("vClearCoatParams",2),t.addUniform("vClearCoatRefractionParams",4),t.addUniform("vClearCoatInfos",4),t.addUniform("clearCoatMatrix",16),t.addUniform("clearCoatRoughnessMatrix",16),t.addUniform("vClearCoatBumpInfos",2),t.addUniform("vClearCoatTangentSpaceParams",2),t.addUniform("clearCoatBumpMatrix",16),t.addUniform("vClearCoatTintParams",4),t.addUniform("clearCoatColorAtDistance",1),t.addUniform("vClearCoatTintInfos",2),t.addUniform("clearCoatTintMatrix",16)},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},r._DefaultIndexOfRefraction=1.5,Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isEnabled",void 0),Object(c.c)([Object(L.c)()],r.prototype,"intensity",void 0),Object(c.c)([Object(L.c)()],r.prototype,"roughness",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"indexOfRefraction",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"texture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"useRoughnessFromMainTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"textureRoughness",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"remapF0OnInterfaceChange",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"bumpTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isTintEnabled",void 0),Object(c.c)([Object(L.e)()],r.prototype,"tintColor",void 0),Object(c.c)([Object(L.c)()],r.prototype,"tintColorAtDistance",void 0),Object(c.c)([Object(L.c)()],r.prototype,"tintThickness",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"tintTexture",void 0),r}(),Cr=function(){function r(t){this._isEnabled=!1,this.isEnabled=!1,this.intensity=1,this.direction=new l.d(1,0),this._texture=null,this.texture=null,this._internalMarkAllSubMeshesAsTexturesDirty=t}return r.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},r.prototype.isReadyForSubMesh=function(t,e){return!(t._areTexturesDirty&&e.texturesEnabled&&this._texture&&ht.a.AnisotropicTextureEnabled&&!this._texture.isReadyOrNotBlocking())},r.prototype.prepareDefines=function(t,e,n){this._isEnabled?(t.ANISOTROPIC=this._isEnabled,this._isEnabled&&!e.isVerticesDataPresent(Me.b.TangentKind)&&(t._needUVs=!0,t.MAINUV1=!0),t._areTexturesDirty&&n.texturesEnabled&&(this._texture&&ht.a.AnisotropicTextureEnabled?tt.a.PrepareDefinesForMergedUV(this._texture,t,"ANISOTROPIC_TEXTURE"):t.ANISOTROPIC_TEXTURE=!1)):(t.ANISOTROPIC=!1,t.ANISOTROPIC_TEXTURE=!1)},r.prototype.bindForSubMesh=function(t,e,n){t.useUbo&&n&&t.isSync||(this._texture&&ht.a.AnisotropicTextureEnabled&&(t.updateFloat2("vAnisotropyInfos",this._texture.coordinatesIndex,this._texture.level),tt.a.BindTextureMatrix(this._texture,t,"anisotropy")),t.updateFloat3("vAnisotropy",this.direction.x,this.direction.y,this.intensity)),e.texturesEnabled&&this._texture&&ht.a.AnisotropicTextureEnabled&&t.setTexture("anisotropySampler",this._texture)},r.prototype.hasTexture=function(t){return this._texture===t},r.prototype.getActiveTextures=function(t){this._texture&&t.push(this._texture)},r.prototype.getAnimatables=function(t){this._texture&&this._texture.animations&&this._texture.animations.length>0&&t.push(this._texture)},r.prototype.dispose=function(t){t&&this._texture&&this._texture.dispose()},r.prototype.getClassName=function(){return"PBRAnisotropicConfiguration"},r.AddFallbacks=function(t,e,n){return t.ANISOTROPIC&&e.addFallback(n++,"ANISOTROPIC"),n},r.AddUniforms=function(t){t.push("vAnisotropy","vAnisotropyInfos","anisotropyMatrix")},r.PrepareUniformBuffer=function(t){t.addUniform("vAnisotropy",3),t.addUniform("vAnisotropyInfos",2),t.addUniform("anisotropyMatrix",16)},r.AddSamplers=function(t){t.push("anisotropySampler")},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isEnabled",void 0),Object(c.c)([Object(L.c)()],r.prototype,"intensity",void 0),Object(c.c)([Object(L.n)()],r.prototype,"direction",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"texture",void 0),r}(),Fp=function(){function r(t){this._useEnergyConservation=r.DEFAULT_USE_ENERGY_CONSERVATION,this.useEnergyConservation=r.DEFAULT_USE_ENERGY_CONSERVATION,this._useSmithVisibilityHeightCorrelated=r.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED,this.useSmithVisibilityHeightCorrelated=r.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED,this._useSphericalHarmonics=r.DEFAULT_USE_SPHERICAL_HARMONICS,this.useSphericalHarmonics=r.DEFAULT_USE_SPHERICAL_HARMONICS,this._useSpecularGlossinessInputEnergyConservation=r.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION,this.useSpecularGlossinessInputEnergyConservation=r.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION,this._internalMarkAllSubMeshesAsMiscDirty=t}return r.prototype._markAllSubMeshesAsMiscDirty=function(){this._internalMarkAllSubMeshesAsMiscDirty()},r.prototype.prepareDefines=function(t){t.BRDF_V_HEIGHT_CORRELATED=this._useSmithVisibilityHeightCorrelated,t.MS_BRDF_ENERGY_CONSERVATION=this._useEnergyConservation&&this._useSmithVisibilityHeightCorrelated,t.SPHERICAL_HARMONICS=this._useSphericalHarmonics,t.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION=this._useSpecularGlossinessInputEnergyConservation},r.prototype.getClassName=function(){return"PBRBRDFConfiguration"},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},r.DEFAULT_USE_ENERGY_CONSERVATION=!0,r.DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED=!0,r.DEFAULT_USE_SPHERICAL_HARMONICS=!0,r.DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION=!0,Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],r.prototype,"useEnergyConservation",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],r.prototype,"useSmithVisibilityHeightCorrelated",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],r.prototype,"useSphericalHarmonics",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],r.prototype,"useSpecularGlossinessInputEnergyConservation",void 0),r}(),lo=function(){function r(t){this._isEnabled=!1,this.isEnabled=!1,this._linkSheenWithAlbedo=!1,this.linkSheenWithAlbedo=!1,this.intensity=1,this.color=O.a.White(),this._texture=null,this.texture=null,this._useRoughnessFromMainTexture=!0,this.useRoughnessFromMainTexture=!0,this._roughness=null,this.roughness=null,this._textureRoughness=null,this.textureRoughness=null,this._albedoScaling=!1,this.albedoScaling=!1,this._internalMarkAllSubMeshesAsTexturesDirty=t}return r.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},r.prototype.isReadyForSubMesh=function(t,e){return!(t._areTexturesDirty&&e.texturesEnabled&&(this._texture&&ht.a.SheenTextureEnabled&&!this._texture.isReadyOrNotBlocking()||this._textureRoughness&&ht.a.SheenTextureEnabled&&!this._textureRoughness.isReadyOrNotBlocking()))},r.prototype.prepareDefines=function(t,e){var n;this._isEnabled?(t.SHEEN=this._isEnabled,t.SHEEN_LINKWITHALBEDO=this._linkSheenWithAlbedo,t.SHEEN_ROUGHNESS=this._roughness!==null,t.SHEEN_ALBEDOSCALING=this._albedoScaling,t.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=this._useRoughnessFromMainTexture,t.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=this._texture!==null&&this._texture._texture===((n=this._textureRoughness)===null||n===void 0?void 0:n._texture)&&this._texture.checkTransformsAreIdentical(this._textureRoughness),t._areTexturesDirty&&e.texturesEnabled&&(this._texture&&ht.a.SheenTextureEnabled?tt.a.PrepareDefinesForMergedUV(this._texture,t,"SHEEN_TEXTURE"):t.SHEEN_TEXTURE=!1,this._textureRoughness&&ht.a.SheenTextureEnabled?tt.a.PrepareDefinesForMergedUV(this._textureRoughness,t,"SHEEN_TEXTURE_ROUGHNESS"):t.SHEEN_TEXTURE_ROUGHNESS=!1)):(t.SHEEN=!1,t.SHEEN_TEXTURE=!1,t.SHEEN_TEXTURE_ROUGHNESS=!1,t.SHEEN_LINKWITHALBEDO=!1,t.SHEEN_ROUGHNESS=!1,t.SHEEN_ALBEDOSCALING=!1,t.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,t.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=!1)},r.prototype.bindForSubMesh=function(t,e,n,i){var o,a,s,d,p,y,C,M,U=i._materialDefines,F=U.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL;t.useUbo&&n&&t.isSync||(F&&ht.a.SheenTextureEnabled?(t.updateFloat4("vSheenInfos",this._texture.coordinatesIndex,this._texture.level,-1,-1),tt.a.BindTextureMatrix(this._texture,t,"sheen")):(this._texture||this._textureRoughness)&&ht.a.SheenTextureEnabled&&(t.updateFloat4("vSheenInfos",(a=(o=this._texture)===null||o===void 0?void 0:o.coordinatesIndex)!==null&&a!==void 0?a:0,(d=(s=this._texture)===null||s===void 0?void 0:s.level)!==null&&d!==void 0?d:0,(y=(p=this._textureRoughness)===null||p===void 0?void 0:p.coordinatesIndex)!==null&&y!==void 0?y:0,(M=(C=this._textureRoughness)===null||C===void 0?void 0:C.level)!==null&&M!==void 0?M:0),this._texture&&tt.a.BindTextureMatrix(this._texture,t,"sheen"),!this._textureRoughness||F||U.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE||tt.a.BindTextureMatrix(this._textureRoughness,t,"sheenRoughness")),t.updateFloat4("vSheenColor",this.color.r,this.color.g,this.color.b,this.intensity),this._roughness!==null&&t.updateFloat("vSheenRoughness",this._roughness)),e.texturesEnabled&&(this._texture&&ht.a.SheenTextureEnabled&&t.setTexture("sheenSampler",this._texture),this._textureRoughness&&!F&&!U.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE&&ht.a.SheenTextureEnabled&&t.setTexture("sheenRoughnessSampler",this._textureRoughness))},r.prototype.hasTexture=function(t){return this._texture===t||this._textureRoughness===t},r.prototype.getActiveTextures=function(t){this._texture&&t.push(this._texture),this._textureRoughness&&t.push(this._textureRoughness)},r.prototype.getAnimatables=function(t){this._texture&&this._texture.animations&&this._texture.animations.length>0&&t.push(this._texture),this._textureRoughness&&this._textureRoughness.animations&&this._textureRoughness.animations.length>0&&t.push(this._textureRoughness)},r.prototype.dispose=function(t){var e,n;t&&((e=this._texture)===null||e===void 0||e.dispose(),(n=this._textureRoughness)===null||n===void 0||n.dispose())},r.prototype.getClassName=function(){return"PBRSheenConfiguration"},r.AddFallbacks=function(t,e,n){return t.SHEEN&&e.addFallback(n++,"SHEEN"),n},r.AddUniforms=function(t){t.push("vSheenColor","vSheenRoughness","vSheenInfos","sheenMatrix","sheenRoughnessMatrix")},r.PrepareUniformBuffer=function(t){t.addUniform("vSheenColor",4),t.addUniform("vSheenRoughness",1),t.addUniform("vSheenInfos",4),t.addUniform("sheenMatrix",16),t.addUniform("sheenRoughnessMatrix",16)},r.AddSamplers=function(t){t.push("sheenSampler"),t.push("sheenRoughnessSampler")},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isEnabled",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"linkSheenWithAlbedo",void 0),Object(c.c)([Object(L.c)()],r.prototype,"intensity",void 0),Object(c.c)([Object(L.e)()],r.prototype,"color",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"texture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"useRoughnessFromMainTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"roughness",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"textureRoughness",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"albedoScaling",void 0),r}(),uo=function(){function r(t,e,n){this._isRefractionEnabled=!1,this.isRefractionEnabled=!1,this._isTranslucencyEnabled=!1,this.isTranslucencyEnabled=!1,this._isScatteringEnabled=!1,this.isScatteringEnabled=!1,this._scatteringDiffusionProfileIndex=0,this.refractionIntensity=1,this.translucencyIntensity=1,this.useAlbedoToTintRefraction=!1,this._thicknessTexture=null,this.thicknessTexture=null,this._refractionTexture=null,this.refractionTexture=null,this._indexOfRefraction=1.5,this.indexOfRefraction=1.5,this._volumeIndexOfRefraction=-1,this._invertRefractionY=!1,this.invertRefractionY=!1,this._linkRefractionWithTransparency=!1,this.linkRefractionWithTransparency=!1,this.minimumThickness=0,this.maximumThickness=1,this.tintColor=O.a.White(),this.tintColorAtDistance=1,this.diffusionDistance=O.a.White(),this._useMaskFromThicknessTexture=!1,this.useMaskFromThicknessTexture=!1,this._useMaskFromThicknessTextureGltf=!1,this.useMaskFromThicknessTextureGltf=!1,this._internalMarkAllSubMeshesAsTexturesDirty=t,this._internalMarkScenePrePassDirty=e,this._scene=n}return Object.defineProperty(r.prototype,"scatteringDiffusionProfile",{get:function(){return this._scene.subSurfaceConfiguration?this._scene.subSurfaceConfiguration.ssDiffusionProfileColors[this._scatteringDiffusionProfileIndex]:null},set:function(t){this._scene.enableSubSurfaceForPrePass()&&t&&(this._scatteringDiffusionProfileIndex=this._scene.subSurfaceConfiguration.addDiffusionProfile(t))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"volumeIndexOfRefraction",{get:function(){return this._volumeIndexOfRefraction>=1?this._volumeIndexOfRefraction:this._indexOfRefraction},set:function(t){this._volumeIndexOfRefraction=t>=1?t:-1},enumerable:!1,configurable:!0}),r.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},r.prototype._markScenePrePassDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty(),this._internalMarkScenePrePassDirty()},r.prototype.isReadyForSubMesh=function(t,e){if(t._areTexturesDirty&&e.texturesEnabled){if(this._thicknessTexture&&ht.a.ThicknessTextureEnabled&&!this._thicknessTexture.isReadyOrNotBlocking())return!1;var n=this._getRefractionTexture(e);if(n&&ht.a.RefractionTextureEnabled&&!n.isReadyOrNotBlocking())return!1}return!0},r.prototype.prepareDefines=function(t,e){if(t._areTexturesDirty&&(t.SUBSURFACE=!1,t.SS_TRANSLUCENCY=this._isTranslucencyEnabled,t.SS_SCATTERING=this._isScatteringEnabled,t.SS_THICKNESSANDMASK_TEXTURE=!1,t.SS_MASK_FROM_THICKNESS_TEXTURE=!1,t.SS_MASK_FROM_THICKNESS_TEXTURE_GLTF=!1,t.SS_REFRACTION=!1,t.SS_REFRACTIONMAP_3D=!1,t.SS_GAMMAREFRACTION=!1,t.SS_RGBDREFRACTION=!1,t.SS_LINEARSPECULARREFRACTION=!1,t.SS_REFRACTIONMAP_OPPOSITEZ=!1,t.SS_LODINREFRACTIONALPHA=!1,t.SS_LINKREFRACTIONTOTRANSPARENCY=!1,t.SS_ALBEDOFORREFRACTIONTINT=!1,(this._isRefractionEnabled||this._isTranslucencyEnabled||this._isScatteringEnabled)&&(t.SUBSURFACE=!0,t._areTexturesDirty&&e.texturesEnabled&&this._thicknessTexture&&ht.a.ThicknessTextureEnabled&&tt.a.PrepareDefinesForMergedUV(this._thicknessTexture,t,"SS_THICKNESSANDMASK_TEXTURE"),t.SS_MASK_FROM_THICKNESS_TEXTURE=this._useMaskFromThicknessTexture,t.SS_MASK_FROM_THICKNESS_TEXTURE_GLTF=this._useMaskFromThicknessTextureGltf),this._isRefractionEnabled&&e.texturesEnabled)){var n=this._getRefractionTexture(e);n&&ht.a.RefractionTextureEnabled&&(t.SS_REFRACTION=!0,t.SS_REFRACTIONMAP_3D=n.isCube,t.SS_GAMMAREFRACTION=n.gammaSpace,t.SS_RGBDREFRACTION=n.isRGBD,t.SS_LINEARSPECULARREFRACTION=n.linearSpecularLOD,t.SS_REFRACTIONMAP_OPPOSITEZ=n.invertZ,t.SS_LODINREFRACTIONALPHA=n.lodLevelInAlpha,t.SS_LINKREFRACTIONTOTRANSPARENCY=this._linkRefractionWithTransparency,t.SS_ALBEDOFORREFRACTIONTINT=this.useAlbedoToTintRefraction)}},r.prototype.bindForSubMesh=function(t,e,n,i,o,a){var s=this._getRefractionTexture(e);if(!t.useUbo||!i||!t.isSync){if(this._thicknessTexture&&ht.a.ThicknessTextureEnabled&&(t.updateFloat2("vThicknessInfos",this._thicknessTexture.coordinatesIndex,this._thicknessTexture.level),tt.a.BindTextureMatrix(this._thicknessTexture,t,"thickness")),t.updateFloat2("vThicknessParam",this.minimumThickness,this.maximumThickness-this.minimumThickness),s&&ht.a.RefractionTextureEnabled){t.updateMatrix("refractionMatrix",s.getReflectionTextureMatrix());var d=1;s.isCube||s.depth&&(d=s.depth);var p=s.getSize().width,y=this.volumeIndexOfRefraction;t.updateFloat4("vRefractionInfos",s.level,1/y,d,this._invertRefractionY?-1:1),t.updateFloat3("vRefractionMicrosurfaceInfos",p,s.lodGenerationScale,s.lodGenerationOffset),a&&t.updateFloat2("vRefractionFilteringInfo",p,$.a.Log2(p))}this.isScatteringEnabled&&t.updateFloat("scatteringDiffusionProfile",this._scatteringDiffusionProfileIndex),t.updateColor3("vDiffusionDistance",this.diffusionDistance),t.updateFloat4("vTintColor",this.tintColor.r,this.tintColor.g,this.tintColor.b,this.tintColorAtDistance),t.updateFloat3("vSubSurfaceIntensity",this.refractionIntensity,this.translucencyIntensity,0)}e.texturesEnabled&&(this._thicknessTexture&&ht.a.ThicknessTextureEnabled&&t.setTexture("thicknessSampler",this._thicknessTexture),s&&ht.a.RefractionTextureEnabled&&(o?t.setTexture("refractionSampler",s):(t.setTexture("refractionSampler",s._lodTextureMid||s),t.setTexture("refractionSamplerLow",s._lodTextureLow||s),t.setTexture("refractionSamplerHigh",s._lodTextureHigh||s))))},r.prototype.unbind=function(t){return!(!this._refractionTexture||!this._refractionTexture.isRenderTarget)&&(t.setTexture("refractionSampler",null),!0)},r.prototype._getRefractionTexture=function(t){return this._refractionTexture?this._refractionTexture:this._isRefractionEnabled?t.environmentTexture:null},Object.defineProperty(r.prototype,"disableAlphaBlending",{get:function(){return this.isRefractionEnabled&&this._linkRefractionWithTransparency},enumerable:!1,configurable:!0}),r.prototype.fillRenderTargetTextures=function(t){ht.a.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget&&t.push(this._refractionTexture)},r.prototype.hasTexture=function(t){return this._thicknessTexture===t||this._refractionTexture===t},r.prototype.hasRenderTargetTextures=function(){return!!(ht.a.RefractionTextureEnabled&&this._refractionTexture&&this._refractionTexture.isRenderTarget)},r.prototype.getActiveTextures=function(t){this._thicknessTexture&&t.push(this._thicknessTexture),this._refractionTexture&&t.push(this._refractionTexture)},r.prototype.getAnimatables=function(t){this._thicknessTexture&&this._thicknessTexture.animations&&this._thicknessTexture.animations.length>0&&t.push(this._thicknessTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&t.push(this._refractionTexture)},r.prototype.dispose=function(t){t&&(this._thicknessTexture&&this._thicknessTexture.dispose(),this._refractionTexture&&this._refractionTexture.dispose())},r.prototype.getClassName=function(){return"PBRSubSurfaceConfiguration"},r.AddFallbacks=function(t,e,n){return t.SS_SCATTERING&&e.addFallback(n++,"SS_SCATTERING"),t.SS_TRANSLUCENCY&&e.addFallback(n++,"SS_TRANSLUCENCY"),n},r.AddUniforms=function(t){t.push("vDiffusionDistance","vTintColor","vSubSurfaceIntensity","vRefractionMicrosurfaceInfos","vRefractionFilteringInfo","vRefractionInfos","vThicknessInfos","vThicknessParam","refractionMatrix","thicknessMatrix","scatteringDiffusionProfile")},r.AddSamplers=function(t){t.push("thicknessSampler","refractionSampler","refractionSamplerLow","refractionSamplerHigh")},r.PrepareUniformBuffer=function(t){t.addUniform("vRefractionMicrosurfaceInfos",3),t.addUniform("vRefractionFilteringInfo",2),t.addUniform("vRefractionInfos",4),t.addUniform("refractionMatrix",16),t.addUniform("vThicknessInfos",2),t.addUniform("thicknessMatrix",16),t.addUniform("vThicknessParam",2),t.addUniform("vDiffusionDistance",3),t.addUniform("vTintColor",4),t.addUniform("vSubSurfaceIntensity",3),t.addUniform("scatteringDiffusionProfile",1)},r.prototype.copyTo=function(t){L.a.Clone(function(){return t},this)},r.prototype.serialize=function(){return L.a.Serialize(this)},r.prototype.parse=function(t,e,n){var i=this;L.a.Parse(function(){return i},t,e,n)},Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isRefractionEnabled",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"isTranslucencyEnabled",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markScenePrePassDirty")],r.prototype,"isScatteringEnabled",void 0),Object(c.c)([Object(L.c)()],r.prototype,"_scatteringDiffusionProfileIndex",void 0),Object(c.c)([Object(L.c)()],r.prototype,"refractionIntensity",void 0),Object(c.c)([Object(L.c)()],r.prototype,"translucencyIntensity",void 0),Object(c.c)([Object(L.c)()],r.prototype,"useAlbedoToTintRefraction",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"thicknessTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"refractionTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"indexOfRefraction",void 0),Object(c.c)([Object(L.c)()],r.prototype,"_volumeIndexOfRefraction",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"volumeIndexOfRefraction",null),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"invertRefractionY",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"linkRefractionWithTransparency",void 0),Object(c.c)([Object(L.c)()],r.prototype,"minimumThickness",void 0),Object(c.c)([Object(L.c)()],r.prototype,"maximumThickness",void 0),Object(c.c)([Object(L.e)()],r.prototype,"tintColor",void 0),Object(c.c)([Object(L.c)()],r.prototype,"tintColorAtDistance",void 0),Object(c.c)([Object(L.e)()],r.prototype,"diffusionDistance",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"useMaskFromThicknessTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],r.prototype,"useMaskFromThicknessTextureGltf",void 0),r}(),zs=f(105),Ht=f(25),Bp=(f(160),`uniform vec3 vReflectionColor; -uniform vec4 vAlbedoColor; - -uniform vec4 vLightingIntensity; -uniform vec4 vReflectivityColor; -uniform vec4 vMetallicReflectanceFactors; -uniform vec3 vEmissiveColor; -uniform float visibility; - -#ifdef ALBEDO -uniform vec2 vAlbedoInfos; -#endif -#ifdef AMBIENT -uniform vec4 vAmbientInfos; -#endif -#ifdef BUMP -uniform vec3 vBumpInfos; -uniform vec2 vTangentSpaceParams; -#endif -#ifdef OPACITY -uniform vec2 vOpacityInfos; -#endif -#ifdef EMISSIVE -uniform vec2 vEmissiveInfos; -#endif -#ifdef LIGHTMAP -uniform vec2 vLightmapInfos; -#endif -#ifdef REFLECTIVITY -uniform vec3 vReflectivityInfos; -#endif -#ifdef MICROSURFACEMAP -uniform vec2 vMicroSurfaceSamplerInfos; -#endif - -#if defined(REFLECTIONMAP_SPHERICAL) || defined(REFLECTIONMAP_PROJECTION) || defined(SS_REFRACTION) -uniform mat4 view; -#endif - -#ifdef REFLECTION -uniform vec2 vReflectionInfos; -#ifdef REALTIME_FILTERING -uniform vec2 vReflectionFilteringInfo; -#endif -uniform mat4 reflectionMatrix; -uniform vec3 vReflectionMicrosurfaceInfos; -#if defined(USE_LOCAL_REFLECTIONMAP_CUBIC) && defined(REFLECTIONMAP_CUBIC) -uniform vec3 vReflectionPosition; -uniform vec3 vReflectionSize; -#endif -#endif - -#ifdef CLEARCOAT -uniform vec2 vClearCoatParams; -uniform vec4 vClearCoatRefractionParams; -#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS) -uniform vec4 vClearCoatInfos; -#endif -#ifdef CLEARCOAT_TEXTURE -uniform mat4 clearCoatMatrix; -#endif -#ifdef CLEARCOAT_TEXTURE_ROUGHNESS -uniform mat4 clearCoatRoughnessMatrix; -#endif -#ifdef CLEARCOAT_BUMP -uniform vec2 vClearCoatBumpInfos; -uniform vec2 vClearCoatTangentSpaceParams; -uniform mat4 clearCoatBumpMatrix; -#endif -#ifdef CLEARCOAT_TINT -uniform vec4 vClearCoatTintParams; -uniform float clearCoatColorAtDistance; -#ifdef CLEARCOAT_TINT_TEXTURE -uniform vec2 vClearCoatTintInfos; -uniform mat4 clearCoatTintMatrix; -#endif -#endif -#endif - -#ifdef ANISOTROPIC -uniform vec3 vAnisotropy; -#ifdef ANISOTROPIC_TEXTURE -uniform vec2 vAnisotropyInfos; -uniform mat4 anisotropyMatrix; -#endif -#endif - -#ifdef SHEEN -uniform vec4 vSheenColor; -#ifdef SHEEN_ROUGHNESS -uniform float vSheenRoughness; -#endif -#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS) -uniform vec4 vSheenInfos; -#endif -#ifdef SHEEN_TEXTURE -uniform mat4 sheenMatrix; -#endif -#ifdef SHEEN_TEXTURE_ROUGHNESS -uniform mat4 sheenRoughnessMatrix; -#endif -#endif - -#ifdef SUBSURFACE -#ifdef SS_REFRACTION -uniform vec3 vRefractionMicrosurfaceInfos; -uniform vec4 vRefractionInfos; -uniform mat4 refractionMatrix; -#ifdef REALTIME_FILTERING -uniform vec2 vRefractionFilteringInfo; -#endif -#endif -#ifdef SS_THICKNESSANDMASK_TEXTURE -uniform vec2 vThicknessInfos; -uniform mat4 thicknessMatrix; -#endif -uniform vec2 vThicknessParam; -uniform vec3 vDiffusionDistance; -uniform vec4 vTintColor; -uniform vec3 vSubSurfaceIntensity; -#endif -#ifdef PREPASS -#ifdef PREPASS_IRRADIANCE -uniform float scatteringDiffusionProfile; -#endif -#endif`);je.a.IncludesShadersStore.pbrFragmentDeclaration=Bp;var Up=`layout(std140,column_major) uniform; -uniform Material -{ -uniform vec2 vAlbedoInfos; -uniform vec4 vAmbientInfos; -uniform vec2 vOpacityInfos; -uniform vec2 vEmissiveInfos; -uniform vec2 vLightmapInfos; -uniform vec3 vReflectivityInfos; -uniform vec2 vMicroSurfaceSamplerInfos; -uniform vec2 vReflectionInfos; -uniform vec2 vReflectionFilteringInfo; -uniform vec3 vReflectionPosition; -uniform vec3 vReflectionSize; -uniform vec3 vBumpInfos; -uniform mat4 albedoMatrix; -uniform mat4 ambientMatrix; -uniform mat4 opacityMatrix; -uniform mat4 emissiveMatrix; -uniform mat4 lightmapMatrix; -uniform mat4 reflectivityMatrix; -uniform mat4 microSurfaceSamplerMatrix; -uniform mat4 bumpMatrix; -uniform vec2 vTangentSpaceParams; -uniform mat4 reflectionMatrix; -uniform vec3 vReflectionColor; -uniform vec4 vAlbedoColor; -uniform vec4 vLightingIntensity; -uniform vec3 vReflectionMicrosurfaceInfos; -uniform float pointSize; -uniform vec4 vReflectivityColor; -uniform vec3 vEmissiveColor; -uniform float visibility; -uniform vec4 vMetallicReflectanceFactors; -uniform vec2 vMetallicReflectanceInfos; -uniform mat4 metallicReflectanceMatrix; -uniform vec2 vClearCoatParams; -uniform vec4 vClearCoatRefractionParams; -uniform vec4 vClearCoatInfos; -uniform mat4 clearCoatMatrix; -uniform mat4 clearCoatRoughnessMatrix; -uniform vec2 vClearCoatBumpInfos; -uniform vec2 vClearCoatTangentSpaceParams; -uniform mat4 clearCoatBumpMatrix; -uniform vec4 vClearCoatTintParams; -uniform float clearCoatColorAtDistance; -uniform vec2 vClearCoatTintInfos; -uniform mat4 clearCoatTintMatrix; -uniform vec3 vAnisotropy; -uniform vec2 vAnisotropyInfos; -uniform mat4 anisotropyMatrix; -uniform vec4 vSheenColor; -uniform float vSheenRoughness; -uniform vec4 vSheenInfos; -uniform mat4 sheenMatrix; -uniform mat4 sheenRoughnessMatrix; -uniform vec3 vRefractionMicrosurfaceInfos; -uniform vec2 vRefractionFilteringInfo; -uniform vec4 vRefractionInfos; -uniform mat4 refractionMatrix; -uniform vec2 vThicknessInfos; -uniform mat4 thicknessMatrix; -uniform vec2 vThicknessParam; -uniform vec3 vDiffusionDistance; -uniform vec4 vTintColor; -uniform vec3 vSubSurfaceIntensity; -uniform float scatteringDiffusionProfile; -uniform vec4 vDetailInfos; -uniform mat4 detailMatrix; -}; -uniform Scene { -mat4 viewProjection; -#ifdef MULTIVIEW -mat4 viewProjectionR; -#endif -mat4 view; -};`;je.a.IncludesShadersStore.pbrUboDeclaration=Up;var Vp=`uniform vec4 vEyePosition; -uniform vec3 vAmbientColor; -uniform vec4 vCameraInfos; - -varying vec3 vPositionW; -#if DEBUGMODE>0 -uniform vec2 vDebugMode; -varying vec4 vClipSpacePosition; -#endif -#ifdef MAINUV1 -varying vec2 vMainUV1; -#endif -#ifdef MAINUV2 -varying vec2 vMainUV2; -#endif -#ifdef NORMAL -varying vec3 vNormalW; -#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX) -varying vec3 vEnvironmentIrradiance; -#endif -#endif -#ifdef VERTEXCOLOR -varying vec4 vColor; -#endif`;je.a.IncludesShadersStore.pbrFragmentExtraDeclaration=Vp;var kp=`#ifdef ALBEDO -#if ALBEDODIRECTUV == 1 -#define vAlbedoUV vMainUV1 -#elif ALBEDODIRECTUV == 2 -#define vAlbedoUV vMainUV2 -#else -varying vec2 vAlbedoUV; -#endif -uniform sampler2D albedoSampler; -#endif -#ifdef AMBIENT -#if AMBIENTDIRECTUV == 1 -#define vAmbientUV vMainUV1 -#elif AMBIENTDIRECTUV == 2 -#define vAmbientUV vMainUV2 -#else -varying vec2 vAmbientUV; -#endif -uniform sampler2D ambientSampler; -#endif -#ifdef OPACITY -#if OPACITYDIRECTUV == 1 -#define vOpacityUV vMainUV1 -#elif OPACITYDIRECTUV == 2 -#define vOpacityUV vMainUV2 -#else -varying vec2 vOpacityUV; -#endif -uniform sampler2D opacitySampler; -#endif -#ifdef EMISSIVE -#if EMISSIVEDIRECTUV == 1 -#define vEmissiveUV vMainUV1 -#elif EMISSIVEDIRECTUV == 2 -#define vEmissiveUV vMainUV2 -#else -varying vec2 vEmissiveUV; -#endif -uniform sampler2D emissiveSampler; -#endif -#ifdef LIGHTMAP -#if LIGHTMAPDIRECTUV == 1 -#define vLightmapUV vMainUV1 -#elif LIGHTMAPDIRECTUV == 2 -#define vLightmapUV vMainUV2 -#else -varying vec2 vLightmapUV; -#endif -uniform sampler2D lightmapSampler; -#endif -#ifdef REFLECTIVITY -#if REFLECTIVITYDIRECTUV == 1 -#define vReflectivityUV vMainUV1 -#elif REFLECTIVITYDIRECTUV == 2 -#define vReflectivityUV vMainUV2 -#else -varying vec2 vReflectivityUV; -#endif -uniform sampler2D reflectivitySampler; -#endif -#ifdef MICROSURFACEMAP -#if MICROSURFACEMAPDIRECTUV == 1 -#define vMicroSurfaceSamplerUV vMainUV1 -#elif MICROSURFACEMAPDIRECTUV == 2 -#define vMicroSurfaceSamplerUV vMainUV2 -#else -varying vec2 vMicroSurfaceSamplerUV; -#endif -uniform sampler2D microSurfaceSampler; -#endif -#ifdef METALLIC_REFLECTANCE -#if METALLIC_REFLECTANCEDIRECTUV == 1 -#define vMetallicReflectanceUV vMainUV1 -#elif METALLIC_REFLECTANCEDIRECTUV == 2 -#define vMetallicReflectanceUV vMainUV2 -#else -varying vec2 vMetallicReflectanceUV; -#endif -uniform sampler2D metallicReflectanceSampler; -#endif -#ifdef CLEARCOAT -#if defined(CLEARCOAT_TEXTURE) -#if CLEARCOAT_TEXTUREDIRECTUV == 1 -#define vClearCoatUV vMainUV1 -#elif CLEARCOAT_TEXTUREDIRECTUV == 2 -#define vClearCoatUV vMainUV2 -#else -varying vec2 vClearCoatUV; -#endif -#endif -#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) -#if CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV == 1 -#define vClearCoatRoughnessUV vMainUV1 -#elif CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV == 2 -#define vClearCoatRoughnessUV vMainUV2 -#else -varying vec2 vClearCoatRoughnessUV; -#endif -#endif -#ifdef CLEARCOAT_TEXTURE -uniform sampler2D clearCoatSampler; -#endif -#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) -uniform sampler2D clearCoatRoughnessSampler; -#endif -#ifdef CLEARCOAT_BUMP -#if CLEARCOAT_BUMPDIRECTUV == 1 -#define vClearCoatBumpUV vMainUV1 -#elif CLEARCOAT_BUMPDIRECTUV == 2 -#define vClearCoatBumpUV vMainUV2 -#else -varying vec2 vClearCoatBumpUV; -#endif -uniform sampler2D clearCoatBumpSampler; -#endif -#ifdef CLEARCOAT_TINT_TEXTURE -#if CLEARCOAT_TINT_TEXTUREDIRECTUV == 1 -#define vClearCoatTintUV vMainUV1 -#elif CLEARCOAT_TINT_TEXTUREDIRECTUV == 2 -#define vClearCoatTintUV vMainUV2 -#else -varying vec2 vClearCoatTintUV; -#endif -uniform sampler2D clearCoatTintSampler; -#endif -#endif -#ifdef SHEEN -#ifdef SHEEN_TEXTURE -#if SHEEN_TEXTUREDIRECTUV == 1 -#define vSheenUV vMainUV1 -#elif SHEEN_TEXTUREDIRECTUV == 2 -#define vSheenUV vMainUV2 -#else -varying vec2 vSheenUV; -#endif -#endif -#ifdef SHEEN_TEXTURE_ROUGHNESS -#if SHEEN_TEXTURE_ROUGHNESSDIRECTUV == 1 -#define vSheenRoughnessUV vMainUV1 -#elif SHEEN_TEXTURE_ROUGHNESSDIRECTUV == 2 -#define vSheenRoughnessUV vMainUV2 -#else -varying vec2 vSheenRoughnessUV; -#endif -#endif -#ifdef SHEEN_TEXTURE -uniform sampler2D sheenSampler; -#endif -#if defined(SHEEN_ROUGHNESS) && defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) -uniform sampler2D sheenRoughnessSampler; -#endif -#endif -#ifdef ANISOTROPIC -#ifdef ANISOTROPIC_TEXTURE -#if ANISOTROPIC_TEXTUREDIRECTUV == 1 -#define vAnisotropyUV vMainUV1 -#elif ANISOTROPIC_TEXTUREDIRECTUV == 2 -#define vAnisotropyUV vMainUV2 -#else -varying vec2 vAnisotropyUV; -#endif -uniform sampler2D anisotropySampler; -#endif -#endif - -#ifdef REFLECTION -#ifdef REFLECTIONMAP_3D -#define sampleReflection(s,c) textureCube(s,c) -uniform samplerCube reflectionSampler; -#ifdef LODBASEDMICROSFURACE -#define sampleReflectionLod(s,c,l) textureCubeLodEXT(s,c,l) -#else -uniform samplerCube reflectionSamplerLow; -uniform samplerCube reflectionSamplerHigh; -#endif -#ifdef USEIRRADIANCEMAP -uniform samplerCube irradianceSampler; -#endif -#else -#define sampleReflection(s,c) texture2D(s,c) -uniform sampler2D reflectionSampler; -#ifdef LODBASEDMICROSFURACE -#define sampleReflectionLod(s,c,l) texture2DLodEXT(s,c,l) -#else -uniform sampler2D reflectionSamplerLow; -uniform sampler2D reflectionSamplerHigh; -#endif -#ifdef USEIRRADIANCEMAP -uniform sampler2D irradianceSampler; -#endif -#endif -#ifdef REFLECTIONMAP_SKYBOX -varying vec3 vPositionUVW; -#else -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -varying vec3 vDirectionW; -#endif -#endif -#endif -#ifdef ENVIRONMENTBRDF -uniform sampler2D environmentBrdfSampler; -#endif - -#ifdef SUBSURFACE -#ifdef SS_REFRACTION -#ifdef SS_REFRACTIONMAP_3D -#define sampleRefraction(s,c) textureCube(s,c) -uniform samplerCube refractionSampler; -#ifdef LODBASEDMICROSFURACE -#define sampleRefractionLod(s,c,l) textureCubeLodEXT(s,c,l) -#else -uniform samplerCube refractionSamplerLow; -uniform samplerCube refractionSamplerHigh; -#endif -#else -#define sampleRefraction(s,c) texture2D(s,c) -uniform sampler2D refractionSampler; -#ifdef LODBASEDMICROSFURACE -#define sampleRefractionLod(s,c,l) texture2DLodEXT(s,c,l) -#else -uniform sampler2D refractionSamplerLow; -uniform sampler2D refractionSamplerHigh; -#endif -#endif -#endif -#ifdef SS_THICKNESSANDMASK_TEXTURE -#if SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 1 -#define vThicknessUV vMainUV1 -#elif SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 2 -#define vThicknessUV vMainUV2 -#else -varying vec2 vThicknessUV; -#endif -uniform sampler2D thicknessSampler; -#endif -#endif`;je.a.IncludesShadersStore.pbrFragmentSamplersDeclaration=kp,f(116),je.a.IncludesShadersStore.subSurfaceScatteringFunctions=`bool testLightingForSSS(float diffusionProfile) -{ -return diffusionProfile<1.; -}`;var Gp=` - - - - - - - - - - - - - - - - - - - - - - - - - - - - -vec3 hemisphereCosSample(vec2 u) { - -float phi=2.*PI*u.x; -float cosTheta2=1.-u.y; -float cosTheta=sqrt(cosTheta2); -float sinTheta=sqrt(1.-cosTheta2); -return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta); -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -vec3 hemisphereImportanceSampleDggx(vec2 u,float a) { - -float phi=2.*PI*u.x; - -float cosTheta2=(1.-u.y)/(1.+(a+1.)*((a-1.)*u.y)); -float cosTheta=sqrt(cosTheta2); -float sinTheta=sqrt(1.-cosTheta2); -return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta); -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -vec3 hemisphereImportanceSampleDCharlie(vec2 u,float a) { - -float phi=2.*PI*u.x; -float sinTheta=pow(u.y,a/(2.*a+1.)); -float cosTheta=sqrt(1.-sinTheta*sinTheta); -return vec3(sinTheta*cos(phi),sinTheta*sin(phi),cosTheta); -}`;je.a.IncludesShadersStore.importanceSampling=Gp;var zp=` -#define RECIPROCAL_PI2 0.15915494 -#define RECIPROCAL_PI 0.31830988618 - -#define MINIMUMVARIANCE 0.0005 -float convertRoughnessToAverageSlope(float roughness) -{ - -return square(roughness)+MINIMUMVARIANCE; -} -float fresnelGrazingReflectance(float reflectance0) { - - -float reflectance90=saturate(reflectance0*25.0); -return reflectance90; -} -vec2 getAARoughnessFactors(vec3 normalVector) { -#ifdef SPECULARAA -vec3 nDfdx=dFdx(normalVector.xyz); -vec3 nDfdy=dFdy(normalVector.xyz); -float slopeSquare=max(dot(nDfdx,nDfdx),dot(nDfdy,nDfdy)); - -float geometricRoughnessFactor=pow(saturate(slopeSquare),0.333); - -float geometricAlphaGFactor=sqrt(slopeSquare); - -geometricAlphaGFactor*=0.75; -return vec2(geometricRoughnessFactor,geometricAlphaGFactor); -#else -return vec2(0.); -#endif -} -#ifdef ANISOTROPIC - - -vec2 getAnisotropicRoughness(float alphaG,float anisotropy) { -float alphaT=max(alphaG*(1.0+anisotropy),MINIMUMVARIANCE); -float alphaB=max(alphaG*(1.0-anisotropy),MINIMUMVARIANCE); -return vec2(alphaT,alphaB); -} - - -vec3 getAnisotropicBentNormals(const vec3 T,const vec3 B,const vec3 N,const vec3 V,float anisotropy) { -vec3 anisotropicFrameDirection=anisotropy>=0.0 ? B : T; -vec3 anisotropicFrameTangent=cross(normalize(anisotropicFrameDirection),V); -vec3 anisotropicFrameNormal=cross(anisotropicFrameTangent,anisotropicFrameDirection); -vec3 anisotropicNormal=normalize(mix(N,anisotropicFrameNormal,abs(anisotropy))); -return anisotropicNormal; - -} -#endif -#if defined(CLEARCOAT) || defined(SS_REFRACTION) - - - -vec3 cocaLambert(vec3 alpha,float distance) { -return exp(-alpha*distance); -} - -vec3 cocaLambert(float NdotVRefract,float NdotLRefract,vec3 alpha,float thickness) { -return cocaLambert(alpha,(thickness*((NdotLRefract+NdotVRefract)/(NdotLRefract*NdotVRefract)))); -} - -vec3 computeColorAtDistanceInMedia(vec3 color,float distance) { -return -log(color)/distance; -} -vec3 computeClearCoatAbsorption(float NdotVRefract,float NdotLRefract,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) { -vec3 clearCoatAbsorption=mix(vec3(1.0), -cocaLambert(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness), -clearCoatIntensity); -return clearCoatAbsorption; -} -#endif - - - - -#ifdef MICROSURFACEAUTOMATIC -float computeDefaultMicroSurface(float microSurface,vec3 reflectivityColor) -{ -const float kReflectivityNoAlphaWorkflow_SmoothnessMax=0.95; -float reflectivityLuminance=getLuminance(reflectivityColor); -float reflectivityLuma=sqrt(reflectivityLuminance); -microSurface=reflectivityLuma*kReflectivityNoAlphaWorkflow_SmoothnessMax; -return microSurface; -} -#endif`;je.a.IncludesShadersStore.pbrHelperFunctions=zp;var jp=`#ifdef USESPHERICALFROMREFLECTIONMAP -#ifdef SPHERICAL_HARMONICS -uniform vec3 vSphericalL00; -uniform vec3 vSphericalL1_1; -uniform vec3 vSphericalL10; -uniform vec3 vSphericalL11; -uniform vec3 vSphericalL2_2; -uniform vec3 vSphericalL2_1; -uniform vec3 vSphericalL20; -uniform vec3 vSphericalL21; -uniform vec3 vSphericalL22; - - - - - - - -vec3 computeEnvironmentIrradiance(vec3 normal) { -return vSphericalL00 -+vSphericalL1_1*(normal.y) -+vSphericalL10*(normal.z) -+vSphericalL11*(normal.x) -+vSphericalL2_2*(normal.y*normal.x) -+vSphericalL2_1*(normal.y*normal.z) -+vSphericalL20*((3.0*normal.z*normal.z)-1.0) -+vSphericalL21*(normal.z*normal.x) -+vSphericalL22*(normal.x*normal.x-(normal.y*normal.y)); -} -#else -uniform vec3 vSphericalX; -uniform vec3 vSphericalY; -uniform vec3 vSphericalZ; -uniform vec3 vSphericalXX_ZZ; -uniform vec3 vSphericalYY_ZZ; -uniform vec3 vSphericalZZ; -uniform vec3 vSphericalXY; -uniform vec3 vSphericalYZ; -uniform vec3 vSphericalZX; - -vec3 computeEnvironmentIrradiance(vec3 normal) { - - - - - - - - - -float Nx=normal.x; -float Ny=normal.y; -float Nz=normal.z; -vec3 C1=vSphericalZZ.rgb; -vec3 Cx=vSphericalX.rgb; -vec3 Cy=vSphericalY.rgb; -vec3 Cz=vSphericalZ.rgb; -vec3 Cxx_zz=vSphericalXX_ZZ.rgb; -vec3 Cyy_zz=vSphericalYY_ZZ.rgb; -vec3 Cxy=vSphericalXY.rgb; -vec3 Cyz=vSphericalYZ.rgb; -vec3 Czx=vSphericalZX.rgb; -vec3 a1=Cyy_zz*Ny+Cy; -vec3 a2=Cyz*Nz+a1; -vec3 b1=Czx*Nz+Cx; -vec3 b2=Cxy*Ny+b1; -vec3 b3=Cxx_zz*Nx+b2; -vec3 t1=Cz*Nz+C1; -vec3 t2=a2*Ny+t1; -vec3 t3=b3*Nx+t2; -return t3; -} -#endif -#endif`;je.a.IncludesShadersStore.harmonicsFunctions=jp;var Hp=` -struct preLightingInfo -{ - -vec3 lightOffset; -float lightDistanceSquared; -float lightDistance; - -float attenuation; - -vec3 L; -vec3 H; -float NdotV; -float NdotLUnclamped; -float NdotL; -float VdotH; -float roughness; -}; -preLightingInfo computePointAndSpotPreLightingInfo(vec4 lightData,vec3 V,vec3 N) { -preLightingInfo result; - -result.lightOffset=lightData.xyz-vPositionW; -result.lightDistanceSquared=dot(result.lightOffset,result.lightOffset); - -result.lightDistance=sqrt(result.lightDistanceSquared); - -result.L=normalize(result.lightOffset); -result.H=normalize(V+result.L); -result.VdotH=saturate(dot(V,result.H)); -result.NdotLUnclamped=dot(N,result.L); -result.NdotL=saturateEps(result.NdotLUnclamped); -return result; -} -preLightingInfo computeDirectionalPreLightingInfo(vec4 lightData,vec3 V,vec3 N) { -preLightingInfo result; - -result.lightDistance=length(-lightData.xyz); - -result.L=normalize(-lightData.xyz); -result.H=normalize(V+result.L); -result.VdotH=saturate(dot(V,result.H)); -result.NdotLUnclamped=dot(N,result.L); -result.NdotL=saturateEps(result.NdotLUnclamped); -return result; -} -preLightingInfo computeHemisphericPreLightingInfo(vec4 lightData,vec3 V,vec3 N) { -preLightingInfo result; - - -result.NdotL=dot(N,lightData.xyz)*0.5+0.5; -result.NdotL=saturateEps(result.NdotL); -result.NdotLUnclamped=result.NdotL; -#ifdef SPECULARTERM -result.L=normalize(lightData.xyz); -result.H=normalize(V+result.L); -result.VdotH=saturate(dot(V,result.H)); -#endif -return result; -}`;je.a.IncludesShadersStore.pbrDirectLightingSetupFunctions=Hp;var Wp=`float computeDistanceLightFalloff_Standard(vec3 lightOffset,float range) -{ -return max(0.,1.0-length(lightOffset)/range); -} -float computeDistanceLightFalloff_Physical(float lightDistanceSquared) -{ -return 1.0/maxEps(lightDistanceSquared); -} -float computeDistanceLightFalloff_GLTF(float lightDistanceSquared,float inverseSquaredRange) -{ -float lightDistanceFalloff=1.0/maxEps(lightDistanceSquared); -float factor=lightDistanceSquared*inverseSquaredRange; -float attenuation=saturate(1.0-factor*factor); -attenuation*=attenuation; - -lightDistanceFalloff*=attenuation; -return lightDistanceFalloff; -} -float computeDistanceLightFalloff(vec3 lightOffset,float lightDistanceSquared,float range,float inverseSquaredRange) -{ -#ifdef USEPHYSICALLIGHTFALLOFF -return computeDistanceLightFalloff_Physical(lightDistanceSquared); -#elif defined(USEGLTFLIGHTFALLOFF) -return computeDistanceLightFalloff_GLTF(lightDistanceSquared,inverseSquaredRange); -#else -return computeDistanceLightFalloff_Standard(lightOffset,range); -#endif -} -float computeDirectionalLightFalloff_Standard(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent) -{ -float falloff=0.0; -float cosAngle=maxEps(dot(-lightDirection,directionToLightCenterW)); -if (cosAngle>=cosHalfAngle) -{ -falloff=max(0.,pow(cosAngle,exponent)); -} -return falloff; -} -float computeDirectionalLightFalloff_Physical(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle) -{ -const float kMinusLog2ConeAngleIntensityRatio=6.64385618977; - - - - - -float concentrationKappa=kMinusLog2ConeAngleIntensityRatio/(1.0-cosHalfAngle); - - -vec4 lightDirectionSpreadSG=vec4(-lightDirection*concentrationKappa,-concentrationKappa); -float falloff=exp2(dot(vec4(directionToLightCenterW,1.0),lightDirectionSpreadSG)); -return falloff; -} -float computeDirectionalLightFalloff_GLTF(vec3 lightDirection,vec3 directionToLightCenterW,float lightAngleScale,float lightAngleOffset) -{ - - - -float cd=dot(-lightDirection,directionToLightCenterW); -float falloff=saturate(cd*lightAngleScale+lightAngleOffset); - -falloff*=falloff; -return falloff; -} -float computeDirectionalLightFalloff(vec3 lightDirection,vec3 directionToLightCenterW,float cosHalfAngle,float exponent,float lightAngleScale,float lightAngleOffset) -{ -#ifdef USEPHYSICALLIGHTFALLOFF -return computeDirectionalLightFalloff_Physical(lightDirection,directionToLightCenterW,cosHalfAngle); -#elif defined(USEGLTFLIGHTFALLOFF) -return computeDirectionalLightFalloff_GLTF(lightDirection,directionToLightCenterW,lightAngleScale,lightAngleOffset); -#else -return computeDirectionalLightFalloff_Standard(lightDirection,directionToLightCenterW,cosHalfAngle,exponent); -#endif -}`;je.a.IncludesShadersStore.pbrDirectLightingFalloffFunctions=Wp;var Xp=` -#define FRESNEL_MAXIMUM_ON_ROUGH 0.25 - - - - -#ifdef MS_BRDF_ENERGY_CONSERVATION - - -vec3 getEnergyConservationFactor(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) { -return 1.0+specularEnvironmentR0*(1.0/environmentBrdf.y-1.0); -} -#endif -#ifdef ENVIRONMENTBRDF -vec3 getBRDFLookup(float NdotV,float perceptualRoughness) { - -vec2 UV=vec2(NdotV,perceptualRoughness); - -vec4 brdfLookup=texture2D(environmentBrdfSampler,UV); -#ifdef ENVIRONMENTBRDF_RGBD -brdfLookup.rgb=fromRGBD(brdfLookup.rgba); -#endif -return brdfLookup.rgb; -} -vec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 specularEnvironmentR90,const vec3 environmentBrdf) { -#ifdef BRDF_V_HEIGHT_CORRELATED -vec3 reflectance=(specularEnvironmentR90-specularEnvironmentR0)*environmentBrdf.x+specularEnvironmentR0*environmentBrdf.y; - -#else -vec3 reflectance=specularEnvironmentR0*environmentBrdf.x+specularEnvironmentR90*environmentBrdf.y; -#endif -return reflectance; -} -vec3 getReflectanceFromBRDFLookup(const vec3 specularEnvironmentR0,const vec3 environmentBrdf) { -#ifdef BRDF_V_HEIGHT_CORRELATED -vec3 reflectance=mix(environmentBrdf.xxx,environmentBrdf.yyy,specularEnvironmentR0); -#else -vec3 reflectance=specularEnvironmentR0*environmentBrdf.x+environmentBrdf.y; -#endif -return reflectance; -} -#endif - -#if !defined(ENVIRONMENTBRDF) || defined(REFLECTIONMAP_SKYBOX) || defined(ALPHAFRESNEL) -vec3 getReflectanceFromAnalyticalBRDFLookup_Jones(float VdotN,vec3 reflectance0,vec3 reflectance90,float smoothness) -{ - -float weight=mix(FRESNEL_MAXIMUM_ON_ROUGH,1.0,smoothness); -return reflectance0+weight*(reflectance90-reflectance0)*pow5(saturate(1.0-VdotN)); -} -#endif -#if defined(SHEEN) && defined(ENVIRONMENTBRDF) - -vec3 getSheenReflectanceFromBRDFLookup(const vec3 reflectance0,const vec3 environmentBrdf) { -vec3 sheenEnvironmentReflectance=reflectance0*environmentBrdf.b; -return sheenEnvironmentReflectance; -} -#endif - - - - - - - - - - - - - - - - - - - - - - - - -vec3 fresnelSchlickGGX(float VdotH,vec3 reflectance0,vec3 reflectance90) -{ -return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH); -} -float fresnelSchlickGGX(float VdotH,float reflectance0,float reflectance90) -{ -return reflectance0+(reflectance90-reflectance0)*pow5(1.0-VdotH); -} -#ifdef CLEARCOAT - - - - - -vec3 getR0RemappedForClearCoat(vec3 f0) { -#ifdef CLEARCOAT_DEFAULTIOR -#ifdef MOBILE -return saturate(f0*(f0*0.526868+0.529324)-0.0482256); -#else -return saturate(f0*(f0*(0.941892-0.263008*f0)+0.346479)-0.0285998); -#endif -#else -vec3 s=sqrt(f0); -vec3 t=(vClearCoatRefractionParams.z+vClearCoatRefractionParams.w*s)/(vClearCoatRefractionParams.w+vClearCoatRefractionParams.z*s); -return t*t; -#endif -} -#endif - - - - - - -float normalDistributionFunction_TrowbridgeReitzGGX(float NdotH,float alphaG) -{ - - - -float a2=square(alphaG); -float d=NdotH*NdotH*(a2-1.0)+1.0; -return a2/(PI*d*d); -} -#ifdef SHEEN - - -float normalDistributionFunction_CharlieSheen(float NdotH,float alphaG) -{ -float invR=1./alphaG; -float cos2h=NdotH*NdotH; -float sin2h=1.-cos2h; -return (2.+invR)*pow(sin2h,invR*.5)/(2.*PI); -} -#endif -#ifdef ANISOTROPIC - - -float normalDistributionFunction_BurleyGGX_Anisotropic(float NdotH,float TdotH,float BdotH,const vec2 alphaTB) { -float a2=alphaTB.x*alphaTB.y; -vec3 v=vec3(alphaTB.y*TdotH,alphaTB.x*BdotH,a2*NdotH); -float v2=dot(v,v); -float w2=a2/v2; -return a2*w2*w2*RECIPROCAL_PI; -} -#endif - - - - -#ifdef BRDF_V_HEIGHT_CORRELATED - - - -float smithVisibility_GGXCorrelated(float NdotL,float NdotV,float alphaG) { -#ifdef MOBILE - -float GGXV=NdotL*(NdotV*(1.0-alphaG)+alphaG); -float GGXL=NdotV*(NdotL*(1.0-alphaG)+alphaG); -return 0.5/(GGXV+GGXL); -#else -float a2=alphaG*alphaG; -float GGXV=NdotL*sqrt(NdotV*(NdotV-a2*NdotV)+a2); -float GGXL=NdotV*sqrt(NdotL*(NdotL-a2*NdotL)+a2); -return 0.5/(GGXV+GGXL); -#endif -} -#else - - - - - - - - - - - - - - - -float smithVisibilityG1_TrowbridgeReitzGGXFast(float dot,float alphaG) -{ -#ifdef MOBILE - -return 1.0/(dot+alphaG+(1.0-alphaG)*dot )); -#else -float alphaSquared=alphaG*alphaG; -return 1.0/(dot+sqrt(alphaSquared+(1.0-alphaSquared)*dot*dot)); -#endif -} -float smithVisibility_TrowbridgeReitzGGXFast(float NdotL,float NdotV,float alphaG) -{ -float visibility=smithVisibilityG1_TrowbridgeReitzGGXFast(NdotL,alphaG)*smithVisibilityG1_TrowbridgeReitzGGXFast(NdotV,alphaG); - -return visibility; -} -#endif -#ifdef ANISOTROPIC - - -float smithVisibility_GGXCorrelated_Anisotropic(float NdotL,float NdotV,float TdotV,float BdotV,float TdotL,float BdotL,const vec2 alphaTB) { -float lambdaV=NdotL*length(vec3(alphaTB.x*TdotV,alphaTB.y*BdotV,NdotV)); -float lambdaL=NdotV*length(vec3(alphaTB.x*TdotL,alphaTB.y*BdotL,NdotL)); -float v=0.5/(lambdaV+lambdaL); -return v; -} -#endif -#ifdef CLEARCOAT -float visibility_Kelemen(float VdotH) { - - - -return 0.25/(VdotH*VdotH); -} -#endif -#ifdef SHEEN - - - -float visibility_Ashikhmin(float NdotL,float NdotV) -{ -return 1./(4.*(NdotL+NdotV-NdotL*NdotV)); -} - -#endif - - - - - - - -float diffuseBRDF_Burley(float NdotL,float NdotV,float VdotH,float roughness) { - - -float diffuseFresnelNV=pow5(saturateEps(1.0-NdotL)); -float diffuseFresnelNL=pow5(saturateEps(1.0-NdotV)); -float diffuseFresnel90=0.5+2.0*VdotH*VdotH*roughness; -float fresnel = -(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNL) * -(1.0+(diffuseFresnel90-1.0)*diffuseFresnelNV); -return fresnel/PI; -} -#ifdef SS_TRANSLUCENCY - - -vec3 transmittanceBRDF_Burley(const vec3 tintColor,const vec3 diffusionDistance,float thickness) { -vec3 S=1./maxEps(diffusionDistance); -vec3 temp=exp((-0.333333333*thickness)*S); -return tintColor.rgb*0.25*(temp*temp*temp+3.0*temp); -} - - -float computeWrappedDiffuseNdotL(float NdotL,float w) { -float t=1.0+w; -float invt2=1.0/square(t); -return saturate((NdotL+w)*invt2); -} -#endif -`;je.a.IncludesShadersStore.pbrBRDFFunctions=Xp;var Yp=`#ifdef NUM_SAMPLES -#if NUM_SAMPLES>0 -#ifdef WEBGL2 - - -float radicalInverse_VdC(uint bits) -{ -bits=(bits << 16u) | (bits >> 16u); -bits=((bits & 0x55555555u) << 1u) | ((bits & 0xAAAAAAAAu) >> 1u); -bits=((bits & 0x33333333u) << 2u) | ((bits & 0xCCCCCCCCu) >> 2u); -bits=((bits & 0x0F0F0F0Fu) << 4u) | ((bits & 0xF0F0F0F0u) >> 4u); -bits=((bits & 0x00FF00FFu) << 8u) | ((bits & 0xFF00FF00u) >> 8u); -return float(bits)*2.3283064365386963e-10; -} -vec2 hammersley(uint i,uint N) -{ -return vec2(float(i)/float(N),radicalInverse_VdC(i)); -} -#else -float vanDerCorpus(int n,int base) -{ -float invBase=1.0/float(base); -float denom=1.0; -float result=0.0; -for(int i=0; i<32; ++i) -{ -if(n>0) -{ -denom=mod(float(n),2.0); -result+=denom*invBase; -invBase=invBase/2.0; -n=int(float(n)/2.0); -} -} -return result; -} -vec2 hammersley(int i,int N) -{ -return vec2(float(i)/float(N),vanDerCorpus(i,2)); -} -#endif -float log4(float x) { -return log2(x)/2.; -} -const float NUM_SAMPLES_FLOAT=float(NUM_SAMPLES); -const float NUM_SAMPLES_FLOAT_INVERSED=1./NUM_SAMPLES_FLOAT; -const float K=4.; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -#define inline -vec3 irradiance(samplerCube inputTexture,vec3 inputN,vec2 filteringInfo) -{ -vec3 n=normalize(inputN); -vec3 result=vec3(0.0); -vec3 tangent=abs(n.z)<0.999 ? vec3(0.,0.,1.) : vec3(1.,0.,0.); -tangent=normalize(cross(tangent,n)); -vec3 bitangent=cross(n,tangent); -mat3 tbn=mat3(tangent,bitangent,n); -float maxLevel=filteringInfo.y; -float dim0=filteringInfo.x; -float omegaP=(4.*PI)/(6.*dim0*dim0); -#ifdef WEBGL2 -for(uint i=0u; i0.) { -float pdf_inversed=PI/NoL; -float omegaS=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed; -float l=log4(omegaS)-log4(omegaP)+log4(K); -float mipLevel=clamp(l,0.0,maxLevel); -vec3 c=textureCubeLodEXT(inputTexture,tbn*Ls,mipLevel).rgb; -#ifdef GAMMA_INPUT -c=toLinearSpace(c); -#endif -result+=c; -} -} -result=result*NUM_SAMPLES_FLOAT_INVERSED; -return result; -} -#define inline -vec3 radiance(float alphaG,samplerCube inputTexture,vec3 inputN,vec2 filteringInfo) -{ -vec3 n=normalize(inputN); -if (alphaG == 0.) { -vec3 c=textureCube(inputTexture,n).rgb; -#ifdef GAMMA_INPUT -c=toLinearSpace(c); -#endif -return c; -} -vec3 result=vec3(0.); -vec3 tangent=abs(n.z)<0.999 ? vec3(0.,0.,1.) : vec3(1.,0.,0.); -tangent=normalize(cross(tangent,n)); -vec3 bitangent=cross(n,tangent); -mat3 tbn=mat3(tangent,bitangent,n); -float maxLevel=filteringInfo.y; -float dim0=filteringInfo.x; -float omegaP=(4.*PI)/(6.*dim0*dim0); -float weight=0.; -#ifdef WEBGL2 -for(uint i=0u; i0.) { -float pdf_inversed=4./normalDistributionFunction_TrowbridgeReitzGGX(NoH,alphaG); -float omegaS=NUM_SAMPLES_FLOAT_INVERSED*pdf_inversed; -float l=log4(omegaS)-log4(omegaP)+log4(K); -float mipLevel=clamp(float(l),0.0,maxLevel); -weight+=NoL; -vec3 c=textureCubeLodEXT(inputTexture,tbn*L,mipLevel).rgb; -#ifdef GAMMA_INPUT -c=toLinearSpace(c); -#endif -result+=c*NoL; -} -} -result=result/weight; -return result; -} -#endif -#endif`;je.a.IncludesShadersStore.hdrFilteringFunctions=Yp;var Kp=`#define CLEARCOATREFLECTANCE90 1.0 - -struct lightingInfo -{ -vec3 diffuse; -#ifdef SPECULARTERM -vec3 specular; -#endif -#ifdef CLEARCOAT - - -vec4 clearCoat; -#endif -#ifdef SHEEN -vec3 sheen; -#endif -}; - -float adjustRoughnessFromLightProperties(float roughness,float lightRadius,float lightDistance) { -#if defined(USEPHYSICALLIGHTFALLOFF) || defined(USEGLTFLIGHTFALLOFF) - -float lightRoughness=lightRadius/lightDistance; - -float totalRoughness=saturate(lightRoughness+roughness); -return totalRoughness; -#else -return roughness; -#endif -} -vec3 computeHemisphericDiffuseLighting(preLightingInfo info,vec3 lightColor,vec3 groundColor) { -return mix(groundColor,lightColor,info.NdotL); -} -vec3 computeDiffuseLighting(preLightingInfo info,vec3 lightColor) { -float diffuseTerm=diffuseBRDF_Burley(info.NdotL,info.NdotV,info.VdotH,info.roughness); -return diffuseTerm*info.attenuation*info.NdotL*lightColor; -} -#define inline -vec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){ -vec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0); -strq/=strq.w; -vec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb; -return toLinearSpace(textureColor); -} -#ifdef SS_TRANSLUCENCY -vec3 computeDiffuseAndTransmittedLighting(preLightingInfo info,vec3 lightColor,vec3 transmittance) { -float NdotL=absEps(info.NdotLUnclamped); - -float wrapNdotL=computeWrappedDiffuseNdotL(NdotL,0.02); - -float trAdapt=step(0.,info.NdotLUnclamped); -vec3 transmittanceNdotL=mix(transmittance*wrapNdotL,vec3(wrapNdotL),trAdapt); -float diffuseTerm=diffuseBRDF_Burley(NdotL,info.NdotV,info.VdotH,info.roughness); -return diffuseTerm*transmittanceNdotL*info.attenuation*lightColor; -} -#endif -#ifdef SPECULARTERM -vec3 computeSpecularLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) { -float NdotH=saturateEps(dot(N,info.H)); -float roughness=max(info.roughness,geometricRoughnessFactor); -float alphaG=convertRoughnessToAverageSlope(roughness); -vec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90); -float distribution=normalDistributionFunction_TrowbridgeReitzGGX(NdotH,alphaG); -#ifdef BRDF_V_HEIGHT_CORRELATED -float smithVisibility=smithVisibility_GGXCorrelated(info.NdotL,info.NdotV,alphaG); -#else -float smithVisibility=smithVisibility_TrowbridgeReitzGGXFast(info.NdotL,info.NdotV,alphaG); -#endif -vec3 specTerm=fresnel*distribution*smithVisibility; -return specTerm*info.attenuation*info.NdotL*lightColor; -} -#endif -#ifdef ANISOTROPIC -vec3 computeAnisotropicSpecularLighting(preLightingInfo info,vec3 V,vec3 N,vec3 T,vec3 B,float anisotropy,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) { -float NdotH=saturateEps(dot(N,info.H)); -float TdotH=dot(T,info.H); -float BdotH=dot(B,info.H); -float TdotV=dot(T,V); -float BdotV=dot(B,V); -float TdotL=dot(T,info.L); -float BdotL=dot(B,info.L); -float alphaG=convertRoughnessToAverageSlope(info.roughness); -vec2 alphaTB=getAnisotropicRoughness(alphaG,anisotropy); -alphaTB=max(alphaTB,square(geometricRoughnessFactor)); -vec3 fresnel=fresnelSchlickGGX(info.VdotH,reflectance0,reflectance90); -float distribution=normalDistributionFunction_BurleyGGX_Anisotropic(NdotH,TdotH,BdotH,alphaTB); -float smithVisibility=smithVisibility_GGXCorrelated_Anisotropic(info.NdotL,info.NdotV,TdotV,BdotV,TdotL,BdotL,alphaTB); -vec3 specTerm=fresnel*distribution*smithVisibility; -return specTerm*info.attenuation*info.NdotL*lightColor; -} -#endif -#ifdef CLEARCOAT -vec4 computeClearCoatLighting(preLightingInfo info,vec3 Ncc,float geometricRoughnessFactor,float clearCoatIntensity,vec3 lightColor) { -float NccdotL=saturateEps(dot(Ncc,info.L)); -float NccdotH=saturateEps(dot(Ncc,info.H)); -float clearCoatRoughness=max(info.roughness,geometricRoughnessFactor); -float alphaG=convertRoughnessToAverageSlope(clearCoatRoughness); -float fresnel=fresnelSchlickGGX(info.VdotH,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90); -fresnel*=clearCoatIntensity; -float distribution=normalDistributionFunction_TrowbridgeReitzGGX(NccdotH,alphaG); -float kelemenVisibility=visibility_Kelemen(info.VdotH); -float clearCoatTerm=fresnel*distribution*kelemenVisibility; -return vec4( -clearCoatTerm*info.attenuation*NccdotL*lightColor, -1.0-fresnel -); -} -vec3 computeClearCoatLightingAbsorption(float NdotVRefract,vec3 L,vec3 Ncc,vec3 clearCoatColor,float clearCoatThickness,float clearCoatIntensity) { -vec3 LRefract=-refract(L,Ncc,vClearCoatRefractionParams.y); -float NdotLRefract=saturateEps(dot(Ncc,LRefract)); -vec3 absorption=computeClearCoatAbsorption(NdotVRefract,NdotLRefract,clearCoatColor,clearCoatThickness,clearCoatIntensity); -return absorption; -} -#endif -#ifdef SHEEN -vec3 computeSheenLighting(preLightingInfo info,vec3 N,vec3 reflectance0,vec3 reflectance90,float geometricRoughnessFactor,vec3 lightColor) { -float NdotH=saturateEps(dot(N,info.H)); -float roughness=max(info.roughness,geometricRoughnessFactor); -float alphaG=convertRoughnessToAverageSlope(roughness); - - -float fresnel=1.; -float distribution=normalDistributionFunction_CharlieSheen(NdotH,alphaG); - -float visibility=visibility_Ashikhmin(info.NdotL,info.NdotV); - -float sheenTerm=fresnel*distribution*visibility; -return sheenTerm*info.attenuation*info.NdotL*lightColor; -} -#endif -`;je.a.IncludesShadersStore.pbrDirectLightingFunctions=Kp;var Qp=`#if defined(REFLECTION) || defined(SS_REFRACTION) -float getLodFromAlphaG(float cubeMapDimensionPixels,float microsurfaceAverageSlope) { -float microsurfaceAverageSlopeTexels=cubeMapDimensionPixels*microsurfaceAverageSlope; -float lod=log2(microsurfaceAverageSlopeTexels); -return lod; -} -float getLinearLodFromRoughness(float cubeMapDimensionPixels,float roughness) { -float lod=log2(cubeMapDimensionPixels)*roughness; -return lod; -} -#endif -#if defined(ENVIRONMENTBRDF) && defined(RADIANCEOCCLUSION) -float environmentRadianceOcclusion(float ambientOcclusion,float NdotVUnclamped) { - - -float temp=NdotVUnclamped+ambientOcclusion; -return saturate(square(temp)-1.0+ambientOcclusion); -} -#endif -#if defined(ENVIRONMENTBRDF) && defined(HORIZONOCCLUSION) -float environmentHorizonOcclusion(vec3 view,vec3 normal,vec3 geometricNormal) { - -vec3 reflection=reflect(view,normal); -float temp=saturate(1.0+1.1*dot(reflection,geometricNormal)); -return square(temp); -} -#endif - - - - -#if defined(LODINREFLECTIONALPHA) || defined(SS_LODINREFRACTIONALPHA) - - -#define UNPACK_LOD(x) (1.0-x)*255.0 -float getLodFromAlphaG(float cubeMapDimensionPixels,float alphaG,float NdotV) { -float microsurfaceAverageSlope=alphaG; - - - - - - -microsurfaceAverageSlope*=sqrt(abs(NdotV)); -return getLodFromAlphaG(cubeMapDimensionPixels,microsurfaceAverageSlope); -} -#endif`;je.a.IncludesShadersStore.pbrIBLFunctions=Qp,f(132),f(133);var qp=`struct albedoOpacityOutParams -{ -vec3 surfaceAlbedo; -float alpha; -}; -#define pbr_inline -void albedoOpacityBlock( -const in vec4 vAlbedoColor, -#ifdef ALBEDO -const in vec4 albedoTexture, -const in vec2 albedoInfos, -#endif -#ifdef OPACITY -const in vec4 opacityMap, -const in vec2 vOpacityInfos, -#endif -#ifdef DETAIL -const in vec4 detailColor, -const in vec4 vDetailInfos, -#endif -out albedoOpacityOutParams outParams -) -{ - -vec3 surfaceAlbedo=vAlbedoColor.rgb; -float alpha=vAlbedoColor.a; -#ifdef ALBEDO -#if defined(ALPHAFROMALBEDO) || defined(ALPHATEST) -alpha*=albedoTexture.a; -#endif -#ifdef GAMMAALBEDO -surfaceAlbedo*=toLinearSpace(albedoTexture.rgb); -#else -surfaceAlbedo*=albedoTexture.rgb; -#endif -surfaceAlbedo*=albedoInfos.y; -#endif -#ifdef VERTEXCOLOR -surfaceAlbedo*=vColor.rgb; -#endif -#ifdef DETAIL -float detailAlbedo=2.0*mix(0.5,detailColor.r,vDetailInfos.y); -surfaceAlbedo.rgb=surfaceAlbedo.rgb*detailAlbedo*detailAlbedo; -#endif -#define CUSTOM_FRAGMENT_UPDATE_ALBEDO - -#ifdef OPACITY -#ifdef OPACITYRGB -alpha=getLuminance(opacityMap.rgb); -#else -alpha*=opacityMap.a; -#endif -alpha*=vOpacityInfos.y; -#endif -#ifdef VERTEXALPHA -alpha*=vColor.a; -#endif -#if !defined(SS_LINKREFRACTIONTOTRANSPARENCY) && !defined(ALPHAFRESNEL) -#ifdef ALPHATEST -if (alpha0 -vec4 surfaceMetallicColorMap; -vec4 surfaceReflectivityColorMap; -vec2 metallicRoughness; -vec3 metallicF0; -#endif -}; -#define pbr_inline -void reflectivityBlock( -const in vec4 vReflectivityColor, -#ifdef METALLICWORKFLOW -const in vec3 surfaceAlbedo, -const in vec4 metallicReflectanceFactors, -#endif -#ifdef REFLECTIVITY -const in vec3 reflectivityInfos, -const in vec4 surfaceMetallicOrReflectivityColorMap, -#endif -#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) -const in vec3 ambientOcclusionColorIn, -#endif -#ifdef MICROSURFACEMAP -const in vec4 microSurfaceTexel, -#endif -#ifdef DETAIL -const in vec4 detailColor, -const in vec4 vDetailInfos, -#endif -out reflectivityOutParams outParams -) -{ -float microSurface=vReflectivityColor.a; -vec3 surfaceReflectivityColor=vReflectivityColor.rgb; -#ifdef METALLICWORKFLOW -vec2 metallicRoughness=surfaceReflectivityColor.rg; -#ifdef REFLECTIVITY -#if DEBUGMODE>0 -outParams.surfaceMetallicColorMap=surfaceMetallicOrReflectivityColorMap; -#endif -#ifdef AOSTOREINMETALMAPRED -vec3 aoStoreInMetalMap=vec3(surfaceMetallicOrReflectivityColorMap.r,surfaceMetallicOrReflectivityColorMap.r,surfaceMetallicOrReflectivityColorMap.r); -outParams.ambientOcclusionColor=mix(ambientOcclusionColorIn,aoStoreInMetalMap,reflectivityInfos.z); -#endif -#ifdef METALLNESSSTOREINMETALMAPBLUE -metallicRoughness.r*=surfaceMetallicOrReflectivityColorMap.b; -#else -metallicRoughness.r*=surfaceMetallicOrReflectivityColorMap.r; -#endif -#ifdef ROUGHNESSSTOREINMETALMAPALPHA -metallicRoughness.g*=surfaceMetallicOrReflectivityColorMap.a; -#else -#ifdef ROUGHNESSSTOREINMETALMAPGREEN -metallicRoughness.g*=surfaceMetallicOrReflectivityColorMap.g; -#endif -#endif -#endif -#ifdef DETAIL -float detailRoughness=mix(0.5,detailColor.b,vDetailInfos.w); -float loLerp=mix(0.,metallicRoughness.g,detailRoughness*2.); -float hiLerp=mix(metallicRoughness.g,1.,(detailRoughness-0.5)*2.); -metallicRoughness.g=mix(loLerp,hiLerp,step(detailRoughness,0.5)); -#endif -#ifdef MICROSURFACEMAP -metallicRoughness.g*=microSurfaceTexel.r; -#endif -#if DEBUGMODE>0 -outParams.metallicRoughness=metallicRoughness; -#endif -#define CUSTOM_FRAGMENT_UPDATE_METALLICROUGHNESS - -microSurface=1.0-metallicRoughness.g; - -vec3 baseColor=surfaceAlbedo; -#ifdef FROSTBITE_REFLECTANCE - - - - - - -outParams.surfaceAlbedo=baseColor.rgb*(1.0-metallicRoughness.r); - -surfaceReflectivityColor=mix(0.16*reflectance*reflectance,baseColor,metallicRoughness.r); -#else -vec3 metallicF0=metallicReflectanceFactors.rgb; -#if DEBUGMODE>0 -outParams.metallicF0=metallicF0; -#endif - -outParams.surfaceAlbedo=mix(baseColor.rgb*(1.0-metallicF0),vec3(0.,0.,0.),metallicRoughness.r); - -surfaceReflectivityColor=mix(metallicF0,baseColor,metallicRoughness.r); -#endif -#else -#ifdef REFLECTIVITY -surfaceReflectivityColor*=surfaceMetallicOrReflectivityColorMap.rgb; -#if DEBUGMODE>0 -outParams.surfaceReflectivityColorMap=surfaceMetallicOrReflectivityColorMap; -#endif -#ifdef MICROSURFACEFROMREFLECTIVITYMAP -microSurface*=surfaceMetallicOrReflectivityColorMap.a; -microSurface*=reflectivityInfos.z; -#else -#ifdef MICROSURFACEAUTOMATIC -microSurface*=computeDefaultMicroSurface(microSurface,surfaceReflectivityColor); -#endif -#ifdef MICROSURFACEMAP -microSurface*=microSurfaceTexel.r; -#endif -#define CUSTOM_FRAGMENT_UPDATE_MICROSURFACE -#endif -#endif -#endif - -microSurface=saturate(microSurface); - -float roughness=1.-microSurface; -outParams.microSurface=microSurface; -outParams.roughness=roughness; -outParams.surfaceReflectivityColor=surfaceReflectivityColor; -} -`;je.a.IncludesShadersStore.pbrBlockReflectivity=Zp;var Jp=`struct ambientOcclusionOutParams -{ -vec3 ambientOcclusionColor; -#if DEBUGMODE>0 -vec3 ambientOcclusionColorMap; -#endif -}; -#define pbr_inline -void ambientOcclusionBlock( -#ifdef AMBIENT -const in vec3 ambientOcclusionColorMap_, -const in vec4 vAmbientInfos, -#endif -out ambientOcclusionOutParams outParams -) -{ -vec3 ambientOcclusionColor=vec3(1.,1.,1.); -#ifdef AMBIENT -vec3 ambientOcclusionColorMap=ambientOcclusionColorMap_*vAmbientInfos.y; -#ifdef AMBIENTINGRAYSCALE -ambientOcclusionColorMap=vec3(ambientOcclusionColorMap.r,ambientOcclusionColorMap.r,ambientOcclusionColorMap.r); -#endif -ambientOcclusionColor=mix(ambientOcclusionColor,ambientOcclusionColorMap,vAmbientInfos.z); -#if DEBUGMODE>0 -outParams.ambientOcclusionColorMap=ambientOcclusionColorMap; -#endif -#endif -outParams.ambientOcclusionColor=ambientOcclusionColor; -} -`;je.a.IncludesShadersStore.pbrBlockAmbientOcclusion=Jp;var $p=`#ifdef ALPHAFRESNEL -#if defined(ALPHATEST) || defined(ALPHABLEND) -struct alphaFresnelOutParams -{ -float alpha; -}; -#define pbr_inline -void alphaFresnelBlock( -const in vec3 normalW, -const in vec3 viewDirectionW, -const in float alpha, -const in float microSurface, -out alphaFresnelOutParams outParams -) -{ - - - -float opacityPerceptual=alpha; -#ifdef LINEARALPHAFRESNEL -float opacity0=opacityPerceptual; -#else -float opacity0=opacityPerceptual*opacityPerceptual; -#endif -float opacity90=fresnelGrazingReflectance(opacity0); -vec3 normalForward=faceforward(normalW,-viewDirectionW,normalW); - -outParams.alpha=getReflectanceFromAnalyticalBRDFLookup_Jones(saturate(dot(viewDirectionW,normalForward)),vec3(opacity0),vec3(opacity90),sqrt(microSurface)).x; -#ifdef ALPHATEST -if (outParams.alpha0 -vec3 anisotropyMapData; -#endif -}; -#define pbr_inline -void anisotropicBlock( -const in vec3 vAnisotropy, -#ifdef ANISOTROPIC_TEXTURE -const in vec3 anisotropyMapData, -#endif -const in mat3 TBN, -const in vec3 normalW, -const in vec3 viewDirectionW, -out anisotropicOutParams outParams -) -{ -float anisotropy=vAnisotropy.b; -vec3 anisotropyDirection=vec3(vAnisotropy.xy,0.); -#ifdef ANISOTROPIC_TEXTURE -anisotropy*=anisotropyMapData.b; -anisotropyDirection.rg*=anisotropyMapData.rg*2.0-1.0; -#if DEBUGMODE>0 -outParams.anisotropyMapData=anisotropyMapData; -#endif -#endif -mat3 anisoTBN=mat3(normalize(TBN[0]),normalize(TBN[1]),normalize(TBN[2])); -vec3 anisotropicTangent=normalize(anisoTBN*anisotropyDirection); -vec3 anisotropicBitangent=normalize(cross(anisoTBN[2],anisotropicTangent)); -outParams.anisotropy=anisotropy; -outParams.anisotropicTangent=anisotropicTangent; -outParams.anisotropicBitangent=anisotropicBitangent; -outParams.anisotropicNormal=getAnisotropicBentNormals(anisotropicTangent,anisotropicBitangent,normalW,viewDirectionW,anisotropy); -} -#endif -`;je.a.IncludesShadersStore.pbrBlockAnisotropic=e_;var t_=`#ifdef REFLECTION -struct reflectionOutParams -{ -vec4 environmentRadiance; -vec3 environmentIrradiance; -#ifdef REFLECTIONMAP_3D -vec3 reflectionCoords; -#else -vec2 reflectionCoords; -#endif -#ifdef SS_TRANSLUCENCY -#ifdef USESPHERICALFROMREFLECTIONMAP -#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) -vec3 irradianceVector; -#endif -#endif -#endif -}; -#define pbr_inline -void createReflectionCoords( -const in vec3 vPositionW, -const in vec3 normalW, -#ifdef ANISOTROPIC -const in anisotropicOutParams anisotropicOut, -#endif -#ifdef REFLECTIONMAP_3D -out vec3 reflectionCoords -#else -out vec2 reflectionCoords -#endif -) -{ -#ifdef ANISOTROPIC -vec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),anisotropicOut.anisotropicNormal); -#else -vec3 reflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),normalW); -#endif -#ifdef REFLECTIONMAP_OPPOSITEZ -reflectionVector.z*=-1.0; -#endif - -#ifdef REFLECTIONMAP_3D -reflectionCoords=reflectionVector; -#else -reflectionCoords=reflectionVector.xy; -#ifdef REFLECTIONMAP_PROJECTION -reflectionCoords/=reflectionVector.z; -#endif -reflectionCoords.y=1.0-reflectionCoords.y; -#endif -} -#define pbr_inline -#define inline -void sampleReflectionTexture( -const in float alphaG, -const in vec3 vReflectionMicrosurfaceInfos, -const in vec2 vReflectionInfos, -const in vec3 vReflectionColor, -#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) -const in float NdotVUnclamped, -#endif -#ifdef LINEARSPECULARREFLECTION -const in float roughness, -#endif -#ifdef REFLECTIONMAP_3D -const in samplerCube reflectionSampler, -const vec3 reflectionCoords, -#else -const in sampler2D reflectionSampler, -const vec2 reflectionCoords, -#endif -#ifndef LODBASEDMICROSFURACE -#ifdef REFLECTIONMAP_3D -const in samplerCube reflectionSamplerLow, -const in samplerCube reflectionSamplerHigh, -#else -const in sampler2D reflectionSamplerLow, -const in sampler2D reflectionSamplerHigh, -#endif -#endif -#ifdef REALTIME_FILTERING -const in vec2 vReflectionFilteringInfo, -#endif -out vec4 environmentRadiance -) -{ - -#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) -float reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG,NdotVUnclamped); -#elif defined(LINEARSPECULARREFLECTION) -float reflectionLOD=getLinearLodFromRoughness(vReflectionMicrosurfaceInfos.x,roughness); -#else -float reflectionLOD=getLodFromAlphaG(vReflectionMicrosurfaceInfos.x,alphaG); -#endif -#ifdef LODBASEDMICROSFURACE - -reflectionLOD=reflectionLOD*vReflectionMicrosurfaceInfos.y+vReflectionMicrosurfaceInfos.z; -#ifdef LODINREFLECTIONALPHA - - - - - - - - - -float automaticReflectionLOD=UNPACK_LOD(sampleReflection(reflectionSampler,reflectionCoords).a); -float requestedReflectionLOD=max(automaticReflectionLOD,reflectionLOD); -#else -float requestedReflectionLOD=reflectionLOD; -#endif -#ifdef REALTIME_FILTERING -environmentRadiance=vec4(radiance(alphaG,reflectionSampler,reflectionCoords,vReflectionFilteringInfo),1.0); -#else -environmentRadiance=sampleReflectionLod(reflectionSampler,reflectionCoords,reflectionLOD); -#endif -#else -float lodReflectionNormalized=saturate(reflectionLOD/log2(vReflectionMicrosurfaceInfos.x)); -float lodReflectionNormalizedDoubled=lodReflectionNormalized*2.0; -vec4 environmentMid=sampleReflection(reflectionSampler,reflectionCoords); -if (lodReflectionNormalizedDoubled<1.0){ -environmentRadiance=mix( -sampleReflection(reflectionSamplerHigh,reflectionCoords), -environmentMid, -lodReflectionNormalizedDoubled -); -} else { -environmentRadiance=mix( -environmentMid, -sampleReflection(reflectionSamplerLow,reflectionCoords), -lodReflectionNormalizedDoubled-1.0 -); -} -#endif -#ifdef RGBDREFLECTION -environmentRadiance.rgb=fromRGBD(environmentRadiance); -#endif -#ifdef GAMMAREFLECTION -environmentRadiance.rgb=toLinearSpace(environmentRadiance.rgb); -#endif - -environmentRadiance.rgb*=vReflectionInfos.x; -environmentRadiance.rgb*=vReflectionColor.rgb; -} -#define pbr_inline -#define inline -void reflectionBlock( -const in vec3 vPositionW, -const in vec3 normalW, -const in float alphaG, -const in vec3 vReflectionMicrosurfaceInfos, -const in vec2 vReflectionInfos, -const in vec3 vReflectionColor, -#ifdef ANISOTROPIC -const in anisotropicOutParams anisotropicOut, -#endif -#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) -const in float NdotVUnclamped, -#endif -#ifdef LINEARSPECULARREFLECTION -const in float roughness, -#endif -#ifdef REFLECTIONMAP_3D -const in samplerCube reflectionSampler, -#else -const in sampler2D reflectionSampler, -#endif -#if defined(NORMAL) && defined(USESPHERICALINVERTEX) -const in vec3 vEnvironmentIrradiance, -#endif -#ifdef USESPHERICALFROMREFLECTIONMAP -#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) -const in mat4 reflectionMatrix, -#endif -#endif -#ifdef USEIRRADIANCEMAP -#ifdef REFLECTIONMAP_3D -const in samplerCube irradianceSampler, -#else -const in sampler2D irradianceSampler, -#endif -#endif -#ifndef LODBASEDMICROSFURACE -#ifdef REFLECTIONMAP_3D -const in samplerCube reflectionSamplerLow, -const in samplerCube reflectionSamplerHigh, -#else -const in sampler2D reflectionSamplerLow, -const in sampler2D reflectionSamplerHigh, -#endif -#endif -#ifdef REALTIME_FILTERING -const in vec2 vReflectionFilteringInfo, -#endif -out reflectionOutParams outParams -) -{ - -vec4 environmentRadiance=vec4(0.,0.,0.,0.); -#ifdef REFLECTIONMAP_3D -vec3 reflectionCoords=vec3(0.); -#else -vec2 reflectionCoords=vec2(0.); -#endif -createReflectionCoords( -vPositionW, -normalW, -#ifdef ANISOTROPIC -anisotropicOut, -#endif -reflectionCoords -); -sampleReflectionTexture( -alphaG, -vReflectionMicrosurfaceInfos, -vReflectionInfos, -vReflectionColor, -#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) -NdotVUnclamped, -#endif -#ifdef LINEARSPECULARREFLECTION -roughness, -#endif -#ifdef REFLECTIONMAP_3D -reflectionSampler, -reflectionCoords, -#else -reflectionSampler, -reflectionCoords, -#endif -#ifndef LODBASEDMICROSFURACE -reflectionSamplerLow, -reflectionSamplerHigh, -#endif -#ifdef REALTIME_FILTERING -vReflectionFilteringInfo, -#endif -environmentRadiance -); - -vec3 environmentIrradiance=vec3(0.,0.,0.); -#ifdef USESPHERICALFROMREFLECTIONMAP -#if defined(NORMAL) && defined(USESPHERICALINVERTEX) -environmentIrradiance=vEnvironmentIrradiance; -#else -#ifdef ANISOTROPIC -vec3 irradianceVector=vec3(reflectionMatrix*vec4(anisotropicOut.anisotropicNormal,0)).xyz; -#else -vec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz; -#endif -#ifdef REFLECTIONMAP_OPPOSITEZ -irradianceVector.z*=-1.0; -#endif -#ifdef INVERTCUBICMAP -irradianceVector.y*=-1.0; -#endif -#if defined(REALTIME_FILTERING) -environmentIrradiance=irradiance(reflectionSampler,irradianceVector,vReflectionFilteringInfo); -#else -environmentIrradiance=computeEnvironmentIrradiance(irradianceVector); -#endif -#ifdef SS_TRANSLUCENCY -outParams.irradianceVector=irradianceVector; -#endif -#endif -#elif defined(USEIRRADIANCEMAP) -vec4 environmentIrradiance4=sampleReflection(irradianceSampler,reflectionCoords); -environmentIrradiance=environmentIrradiance4.rgb; -#ifdef RGBDREFLECTION -environmentIrradiance.rgb=fromRGBD(environmentIrradiance4); -#endif -#ifdef GAMMAREFLECTION -environmentIrradiance.rgb=toLinearSpace(environmentIrradiance.rgb); -#endif -#endif -environmentIrradiance*=vReflectionColor.rgb; -outParams.environmentRadiance=environmentRadiance; -outParams.environmentIrradiance=environmentIrradiance; -outParams.reflectionCoords=reflectionCoords; -} -#endif -`;je.a.IncludesShadersStore.pbrBlockReflection=t_;var n_=`#ifdef SHEEN -struct sheenOutParams -{ -float sheenIntensity; -vec3 sheenColor; -float sheenRoughness; -#ifdef SHEEN_LINKWITHALBEDO -vec3 surfaceAlbedo; -#endif -#if defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING) -float sheenAlbedoScaling; -#endif -#if defined(REFLECTION) && defined(ENVIRONMENTBRDF) -vec3 finalSheenRadianceScaled; -#endif -#if DEBUGMODE>0 -vec4 sheenMapData; -vec3 sheenEnvironmentReflectance; -#endif -}; -#define pbr_inline -#define inline -void sheenBlock( -const in vec4 vSheenColor, -#ifdef SHEEN_ROUGHNESS -const in float vSheenRoughness, -#if defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) -const in vec4 sheenMapRoughnessData, -#endif -#endif -const in float roughness, -#ifdef SHEEN_TEXTURE -const in vec4 sheenMapData, -#endif -const in float reflectance, -#ifdef SHEEN_LINKWITHALBEDO -const in vec3 baseColor, -const in vec3 surfaceAlbedo, -#endif -#ifdef ENVIRONMENTBRDF -const in float NdotV, -const in vec3 environmentBrdf, -#endif -#if defined(REFLECTION) && defined(ENVIRONMENTBRDF) -const in vec2 AARoughnessFactors, -const in vec3 vReflectionMicrosurfaceInfos, -const in vec2 vReflectionInfos, -const in vec3 vReflectionColor, -const in vec4 vLightingIntensity, -#ifdef REFLECTIONMAP_3D -const in samplerCube reflectionSampler, -const in vec3 reflectionCoords, -#else -const in sampler2D reflectionSampler, -const in vec2 reflectionCoords, -#endif -const in float NdotVUnclamped, -#ifndef LODBASEDMICROSFURACE -#ifdef REFLECTIONMAP_3D -const in samplerCube reflectionSamplerLow, -const in samplerCube reflectionSamplerHigh, -#else -const in sampler2D reflectionSamplerLow, -const in sampler2D reflectionSamplerHigh, -#endif -#endif -#ifdef REALTIME_FILTERING -const in vec2 vReflectionFilteringInfo, -#endif -#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION) -const in float seo, -#endif -#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D) -const in float eho, -#endif -#endif -out sheenOutParams outParams -) -{ -float sheenIntensity=vSheenColor.a; -#ifdef SHEEN_TEXTURE -#if DEBUGMODE>0 -outParams.sheenMapData=sheenMapData; -#endif -#endif -#ifdef SHEEN_LINKWITHALBEDO -float sheenFactor=pow5(1.0-sheenIntensity); -vec3 sheenColor=baseColor.rgb*(1.0-sheenFactor); -float sheenRoughness=sheenIntensity; -outParams.surfaceAlbedo=surfaceAlbedo*sheenFactor; -#ifdef SHEEN_TEXTURE -sheenIntensity*=sheenMapData.a; -#endif -#else -vec3 sheenColor=vSheenColor.rgb; -#ifdef SHEEN_TEXTURE -sheenColor.rgb*=sheenMapData.rgb; -#endif -#ifdef SHEEN_ROUGHNESS -float sheenRoughness=vSheenRoughness; -#ifdef SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE -#if defined(SHEEN_TEXTURE) -sheenRoughness*=sheenMapData.a; -#endif -#elif defined(SHEEN_TEXTURE_ROUGHNESS) -#ifdef SHEEN_TEXTURE_ROUGHNESS_IDENTICAL -sheenRoughness*=sheenMapData.a; -#else -sheenRoughness*=sheenMapRoughnessData.a; -#endif -#endif -#else -float sheenRoughness=roughness; -#ifdef SHEEN_TEXTURE -sheenIntensity*=sheenMapData.a; -#endif -#endif - -#if !defined(SHEEN_ALBEDOSCALING) -sheenIntensity*=(1.-reflectance); -#endif - -sheenColor*=sheenIntensity; -#endif - -#ifdef ENVIRONMENTBRDF - -#ifdef SHEEN_ROUGHNESS -vec3 environmentSheenBrdf=getBRDFLookup(NdotV,sheenRoughness); -#else -vec3 environmentSheenBrdf=environmentBrdf; -#endif - -#endif -#if defined(REFLECTION) && defined(ENVIRONMENTBRDF) -float sheenAlphaG=convertRoughnessToAverageSlope(sheenRoughness); -#ifdef SPECULARAA - -sheenAlphaG+=AARoughnessFactors.y; -#endif -vec4 environmentSheenRadiance=vec4(0.,0.,0.,0.); -sampleReflectionTexture( -sheenAlphaG, -vReflectionMicrosurfaceInfos, -vReflectionInfos, -vReflectionColor, -#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) -NdotVUnclamped, -#endif -#ifdef LINEARSPECULARREFLECTION -sheenRoughness, -#endif -reflectionSampler, -reflectionCoords, -#ifndef LODBASEDMICROSFURACE -reflectionSamplerLow, -reflectionSamplerHigh, -#endif -#ifdef REALTIME_FILTERING -vReflectionFilteringInfo, -#endif -environmentSheenRadiance -); -vec3 sheenEnvironmentReflectance=getSheenReflectanceFromBRDFLookup(sheenColor,environmentSheenBrdf); -#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION) -sheenEnvironmentReflectance*=seo; -#endif -#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D) -sheenEnvironmentReflectance*=eho; -#endif -#if DEBUGMODE>0 -outParams.sheenEnvironmentReflectance=sheenEnvironmentReflectance; -#endif -outParams.finalSheenRadianceScaled= -environmentSheenRadiance.rgb * -sheenEnvironmentReflectance * -vLightingIntensity.z; - - - - - -#endif -#if defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING) - - - -outParams.sheenAlbedoScaling=1.0-sheenIntensity*max(max(sheenColor.r,sheenColor.g),sheenColor.b)*environmentSheenBrdf.b; -#endif - -outParams.sheenIntensity=sheenIntensity; -outParams.sheenColor=sheenColor; -outParams.sheenRoughness=sheenRoughness; -} -#endif -`;je.a.IncludesShadersStore.pbrBlockSheen=n_;var i_=`struct clearcoatOutParams -{ -vec3 specularEnvironmentR0; -float conservationFactor; -vec3 clearCoatNormalW; -vec2 clearCoatAARoughnessFactors; -float clearCoatIntensity; -float clearCoatRoughness; -#ifdef REFLECTION -vec3 finalClearCoatRadianceScaled; -#endif -#ifdef CLEARCOAT_TINT -vec3 absorption; -float clearCoatNdotVRefract; -vec3 clearCoatColor; -float clearCoatThickness; -#endif -#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) -vec3 energyConservationFactorClearCoat; -#endif -#if DEBUGMODE>0 -mat3 TBNClearCoat; -vec2 clearCoatMapData; -vec4 clearCoatTintMapData; -vec4 environmentClearCoatRadiance; -float clearCoatNdotV; -vec3 clearCoatEnvironmentReflectance; -#endif -}; -#ifdef CLEARCOAT -#define pbr_inline -#define inline -void clearcoatBlock( -const in vec3 vPositionW, -const in vec3 geometricNormalW, -const in vec3 viewDirectionW, -const in vec2 vClearCoatParams, -#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) -const in vec4 clearCoatMapRoughnessData, -#endif -const in vec3 specularEnvironmentR0, -#ifdef CLEARCOAT_TEXTURE -const in vec2 clearCoatMapData, -#endif -#ifdef CLEARCOAT_TINT -const in vec4 vClearCoatTintParams, -const in float clearCoatColorAtDistance, -const in vec4 vClearCoatRefractionParams, -#ifdef CLEARCOAT_TINT_TEXTURE -const in vec4 clearCoatTintMapData, -#endif -#endif -#ifdef CLEARCOAT_BUMP -const in vec2 vClearCoatBumpInfos, -const in vec4 clearCoatBumpMapData, -const in vec2 vClearCoatBumpUV, -#if defined(TANGENT) && defined(NORMAL) -const in mat3 vTBN, -#else -const in vec2 vClearCoatTangentSpaceParams, -#endif -#ifdef OBJECTSPACE_NORMALMAP -const in mat4 normalMatrix, -#endif -#endif -#if defined(FORCENORMALFORWARD) && defined(NORMAL) -const in vec3 faceNormal, -#endif -#ifdef REFLECTION -const in vec3 vReflectionMicrosurfaceInfos, -const in vec2 vReflectionInfos, -const in vec3 vReflectionColor, -const in vec4 vLightingIntensity, -#ifdef REFLECTIONMAP_3D -const in samplerCube reflectionSampler, -#else -const in sampler2D reflectionSampler, -#endif -#ifndef LODBASEDMICROSFURACE -#ifdef REFLECTIONMAP_3D -const in samplerCube reflectionSamplerLow, -const in samplerCube reflectionSamplerHigh, -#else -const in sampler2D reflectionSamplerLow, -const in sampler2D reflectionSamplerHigh, -#endif -#endif -#ifdef REALTIME_FILTERING -const in vec2 vReflectionFilteringInfo, -#endif -#endif -#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) -#ifdef RADIANCEOCCLUSION -const in float ambientMonochrome, -#endif -#endif -out clearcoatOutParams outParams -) -{ - -float clearCoatIntensity=vClearCoatParams.x; -float clearCoatRoughness=vClearCoatParams.y; -#ifdef CLEARCOAT_TEXTURE -clearCoatIntensity*=clearCoatMapData.x; -#ifdef CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE -clearCoatRoughness*=clearCoatMapData.y; -#endif -#if DEBUGMODE>0 -outParams.clearCoatMapData=clearCoatMapData; -#endif -#endif -#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) -#ifdef CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL -clearCoatRoughness*=clearCoatMapData.y; -#else -clearCoatRoughness*=clearCoatMapRoughnessData.y; -#endif -#endif -outParams.clearCoatIntensity=clearCoatIntensity; -outParams.clearCoatRoughness=clearCoatRoughness; -#ifdef CLEARCOAT_TINT -vec3 clearCoatColor=vClearCoatTintParams.rgb; -float clearCoatThickness=vClearCoatTintParams.a; -#ifdef CLEARCOAT_TINT_TEXTURE -clearCoatColor*=clearCoatTintMapData.rgb; -clearCoatThickness*=clearCoatTintMapData.a; -#if DEBUGMODE>0 -outParams.clearCoatTintMapData=clearCoatTintMapData; -#endif -#endif -outParams.clearCoatColor=computeColorAtDistanceInMedia(clearCoatColor,clearCoatColorAtDistance); -outParams.clearCoatThickness=clearCoatThickness; -#endif - - - - -#ifdef CLEARCOAT_REMAP_F0 -vec3 specularEnvironmentR0Updated=getR0RemappedForClearCoat(specularEnvironmentR0); -#else -vec3 specularEnvironmentR0Updated=specularEnvironmentR0; -#endif -outParams.specularEnvironmentR0=mix(specularEnvironmentR0,specularEnvironmentR0Updated,clearCoatIntensity); - -vec3 clearCoatNormalW=geometricNormalW; -#ifdef CLEARCOAT_BUMP -#ifdef NORMALXYSCALE -float clearCoatNormalScale=1.0; -#else -float clearCoatNormalScale=vClearCoatBumpInfos.y; -#endif -#if defined(TANGENT) && defined(NORMAL) -mat3 TBNClearCoat=vTBN; -#else -mat3 TBNClearCoat=cotangent_frame(clearCoatNormalW*clearCoatNormalScale,vPositionW,vClearCoatBumpUV,vClearCoatTangentSpaceParams); -#endif -#if DEBUGMODE>0 -outParams.TBNClearCoat=TBNClearCoat; -#endif -#ifdef OBJECTSPACE_NORMALMAP -clearCoatNormalW=normalize(clearCoatBumpMapData.xyz*2.0-1.0); -clearCoatNormalW=normalize(mat3(normalMatrix)*clearCoatNormalW); -#else -clearCoatNormalW=perturbNormal(TBNClearCoat,clearCoatBumpMapData.xyz,vClearCoatBumpInfos.y); -#endif -#endif -#if defined(FORCENORMALFORWARD) && defined(NORMAL) -clearCoatNormalW*=sign(dot(clearCoatNormalW,faceNormal)); -#endif -#if defined(TWOSIDEDLIGHTING) && defined(NORMAL) -clearCoatNormalW=gl_FrontFacing ? clearCoatNormalW : -clearCoatNormalW; -#endif -outParams.clearCoatNormalW=clearCoatNormalW; - -outParams.clearCoatAARoughnessFactors=getAARoughnessFactors(clearCoatNormalW.xyz); - -float clearCoatNdotVUnclamped=dot(clearCoatNormalW,viewDirectionW); - -float clearCoatNdotV=absEps(clearCoatNdotVUnclamped); -#if DEBUGMODE>0 -outParams.clearCoatNdotV=clearCoatNdotV; -#endif -#ifdef CLEARCOAT_TINT - -vec3 clearCoatVRefract=-refract(vPositionW,clearCoatNormalW,vClearCoatRefractionParams.y); - -outParams.clearCoatNdotVRefract=absEps(dot(clearCoatNormalW,clearCoatVRefract)); -#endif -#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) - -vec3 environmentClearCoatBrdf=getBRDFLookup(clearCoatNdotV,clearCoatRoughness); -#endif - -#if defined(REFLECTION) -float clearCoatAlphaG=convertRoughnessToAverageSlope(clearCoatRoughness); -#ifdef SPECULARAA - -clearCoatAlphaG+=outParams.clearCoatAARoughnessFactors.y; -#endif -vec4 environmentClearCoatRadiance=vec4(0.,0.,0.,0.); -vec3 clearCoatReflectionVector=computeReflectionCoords(vec4(vPositionW,1.0),clearCoatNormalW); -#ifdef REFLECTIONMAP_OPPOSITEZ -clearCoatReflectionVector.z*=-1.0; -#endif - -#ifdef REFLECTIONMAP_3D -vec3 clearCoatReflectionCoords=clearCoatReflectionVector; -#else -vec2 clearCoatReflectionCoords=clearCoatReflectionVector.xy; -#ifdef REFLECTIONMAP_PROJECTION -clearCoatReflectionCoords/=clearCoatReflectionVector.z; -#endif -clearCoatReflectionCoords.y=1.0-clearCoatReflectionCoords.y; -#endif -sampleReflectionTexture( -clearCoatAlphaG, -vReflectionMicrosurfaceInfos, -vReflectionInfos, -vReflectionColor, -#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) -clearCoatNdotVUnclamped, -#endif -#ifdef LINEARSPECULARREFLECTION -clearCoatRoughness, -#endif -reflectionSampler, -clearCoatReflectionCoords, -#ifndef LODBASEDMICROSFURACE -reflectionSamplerLow, -reflectionSamplerHigh, -#endif -#ifdef REALTIME_FILTERING -vReflectionFilteringInfo, -#endif -environmentClearCoatRadiance -); -#if DEBUGMODE>0 -outParams.environmentClearCoatRadiance=environmentClearCoatRadiance; -#endif - -#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) -vec3 clearCoatEnvironmentReflectance=getReflectanceFromBRDFLookup(vec3(vClearCoatRefractionParams.x),environmentClearCoatBrdf); -#ifdef RADIANCEOCCLUSION -float clearCoatSeo=environmentRadianceOcclusion(ambientMonochrome,clearCoatNdotVUnclamped); -clearCoatEnvironmentReflectance*=clearCoatSeo; -#endif -#ifdef HORIZONOCCLUSION -#ifdef BUMP -#ifdef REFLECTIONMAP_3D -float clearCoatEho=environmentHorizonOcclusion(-viewDirectionW,clearCoatNormalW,geometricNormalW); -clearCoatEnvironmentReflectance*=clearCoatEho; -#endif -#endif -#endif -#else - -vec3 clearCoatEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(clearCoatNdotV,vec3(1.),vec3(1.),sqrt(1.-clearCoatRoughness)); -#endif -clearCoatEnvironmentReflectance*=clearCoatIntensity; -#if DEBUGMODE>0 -outParams.clearCoatEnvironmentReflectance=clearCoatEnvironmentReflectance; -#endif -outParams.finalClearCoatRadianceScaled= -environmentClearCoatRadiance.rgb * -clearCoatEnvironmentReflectance * -vLightingIntensity.z; -#endif -#if defined(CLEARCOAT_TINT) - -outParams.absorption=computeClearCoatAbsorption(outParams.clearCoatNdotVRefract,outParams.clearCoatNdotVRefract,outParams.clearCoatColor,clearCoatThickness,clearCoatIntensity); -#endif - -float fresnelIBLClearCoat=fresnelSchlickGGX(clearCoatNdotV,vClearCoatRefractionParams.x,CLEARCOATREFLECTANCE90); -fresnelIBLClearCoat*=clearCoatIntensity; -outParams.conservationFactor=(1.-fresnelIBLClearCoat); -#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) -outParams.energyConservationFactorClearCoat=getEnergyConservationFactor(outParams.specularEnvironmentR0,environmentClearCoatBrdf); -#endif -} -#endif -`;je.a.IncludesShadersStore.pbrBlockClearcoat=i_;var r_=`struct subSurfaceOutParams -{ -vec3 specularEnvironmentReflectance; -#ifdef SS_REFRACTION -vec3 finalRefraction; -vec3 surfaceAlbedo; -#ifdef SS_LINKREFRACTIONTOTRANSPARENCY -float alpha; -#endif -#ifdef REFLECTION -float refractionFactorForIrradiance; -#endif -#endif -#ifdef SS_TRANSLUCENCY -vec3 transmittance; -float translucencyIntensity; -#ifdef REFLECTION -vec3 refractionIrradiance; -#endif -#endif -#if DEBUGMODE>0 -vec4 thicknessMap; -vec4 environmentRefraction; -vec3 refractionTransmittance; -#endif -}; -#ifdef SUBSURFACE -#define pbr_inline -#define inline -void subSurfaceBlock( -const in vec3 vSubSurfaceIntensity, -const in vec2 vThicknessParam, -const in vec4 vTintColor, -const in vec3 normalW, -const in vec3 specularEnvironmentReflectance, -#ifdef SS_THICKNESSANDMASK_TEXTURE -const in vec4 thicknessMap, -#endif -#ifdef REFLECTION -#ifdef SS_TRANSLUCENCY -const in mat4 reflectionMatrix, -#ifdef USESPHERICALFROMREFLECTIONMAP -#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) -const in vec3 irradianceVector_, -#endif -#if defined(REALTIME_FILTERING) -const in samplerCube reflectionSampler, -const in vec2 vReflectionFilteringInfo, -#endif -#endif -#ifdef USEIRRADIANCEMAP -#ifdef REFLECTIONMAP_3D -const in samplerCube irradianceSampler, -#else -const in sampler2D irradianceSampler, -#endif -#endif -#endif -#endif -#ifdef SS_REFRACTION -const in vec3 vPositionW, -const in vec3 viewDirectionW, -const in mat4 view, -const in vec3 surfaceAlbedo, -const in vec4 vRefractionInfos, -const in mat4 refractionMatrix, -const in vec3 vRefractionMicrosurfaceInfos, -const in vec4 vLightingIntensity, -#ifdef SS_LINKREFRACTIONTOTRANSPARENCY -const in float alpha, -#endif -#ifdef SS_LODINREFRACTIONALPHA -const in float NdotVUnclamped, -#endif -#ifdef SS_LINEARSPECULARREFRACTION -const in float roughness, -#else -const in float alphaG, -#endif -#ifdef SS_REFRACTIONMAP_3D -const in samplerCube refractionSampler, -#ifndef LODBASEDMICROSFURACE -const in samplerCube refractionSamplerLow, -const in samplerCube refractionSamplerHigh, -#endif -#else -const in sampler2D refractionSampler, -#ifndef LODBASEDMICROSFURACE -const in sampler2D refractionSamplerLow, -const in sampler2D refractionSamplerHigh, -#endif -#endif -#ifdef ANISOTROPIC -const in anisotropicOutParams anisotropicOut, -#endif -#ifdef REALTIME_FILTERING -const in vec2 vRefractionFilteringInfo, -#endif -#endif -#ifdef SS_TRANSLUCENCY -const in vec3 vDiffusionDistance, -#endif -out subSurfaceOutParams outParams -) -{ -outParams.specularEnvironmentReflectance=specularEnvironmentReflectance; - - - -#ifdef SS_REFRACTION -float refractionIntensity=vSubSurfaceIntensity.x; -#ifdef SS_LINKREFRACTIONTOTRANSPARENCY -refractionIntensity*=(1.0-alpha); - -outParams.alpha=1.0; -#endif -#endif -#ifdef SS_TRANSLUCENCY -float translucencyIntensity=vSubSurfaceIntensity.y; -#endif -#ifdef SS_THICKNESSANDMASK_TEXTURE -float thickness=thicknessMap.r*vThicknessParam.y+vThicknessParam.x; -#if DEBUGMODE>0 -outParams.thicknessMap=thicknessMap; -#endif -#ifdef SS_MASK_FROM_THICKNESS_TEXTURE -#ifdef SS_REFRACTION -refractionIntensity*=thicknessMap.g; -#endif -#ifdef SS_TRANSLUCENCY -translucencyIntensity*=thicknessMap.b; -#endif -#elif defined(SS_MASK_FROM_THICKNESS_TEXTURE_GLTF) -#ifdef SS_REFRACTION -refractionIntensity*=thicknessMap.r; -#elif defined(SS_TRANSLUCENCY) -translucencyIntensity*=thicknessMap.r; -#endif -thickness=thicknessMap.g*vThicknessParam.y+vThicknessParam.x; -#endif -#else -float thickness=vThicknessParam.y; -#endif - - - -#ifdef SS_TRANSLUCENCY -thickness=maxEps(thickness); -vec3 transmittance=transmittanceBRDF_Burley(vTintColor.rgb,vDiffusionDistance,thickness); -transmittance*=translucencyIntensity; -outParams.transmittance=transmittance; -outParams.translucencyIntensity=translucencyIntensity; -#endif - - - -#ifdef SS_REFRACTION -vec4 environmentRefraction=vec4(0.,0.,0.,0.); -#ifdef ANISOTROPIC -vec3 refractionVector=refract(-viewDirectionW,anisotropicOut.anisotropicNormal,vRefractionInfos.y); -#else -vec3 refractionVector=refract(-viewDirectionW,normalW,vRefractionInfos.y); -#endif -#ifdef SS_REFRACTIONMAP_OPPOSITEZ -refractionVector.z*=-1.0; -#endif - -#ifdef SS_REFRACTIONMAP_3D -refractionVector.y=refractionVector.y*vRefractionInfos.w; -vec3 refractionCoords=refractionVector; -refractionCoords=vec3(refractionMatrix*vec4(refractionCoords,0)); -#else -vec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0))); -vec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z; -refractionCoords.y=1.0-refractionCoords.y; -#endif -#ifdef SS_LODINREFRACTIONALPHA -float refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,alphaG,NdotVUnclamped); -#elif defined(SS_LINEARSPECULARREFRACTION) -float refractionLOD=getLinearLodFromRoughness(vRefractionMicrosurfaceInfos.x,roughness); -#else -float refractionLOD=getLodFromAlphaG(vRefractionMicrosurfaceInfos.x,alphaG); -#endif -#ifdef LODBASEDMICROSFURACE - -refractionLOD=refractionLOD*vRefractionMicrosurfaceInfos.y+vRefractionMicrosurfaceInfos.z; -#ifdef SS_LODINREFRACTIONALPHA - - - - - - - - - -float automaticRefractionLOD=UNPACK_LOD(sampleRefraction(refractionSampler,refractionCoords).a); -float requestedRefractionLOD=max(automaticRefractionLOD,refractionLOD); -#else -float requestedRefractionLOD=refractionLOD; -#endif -#ifdef REALTIME_FILTERING -environmentRefraction=vec4(radiance(alphaG,refractionSampler,refractionCoords,vRefractionFilteringInfo),1.0); -#else -environmentRefraction=sampleRefractionLod(refractionSampler,refractionCoords,requestedRefractionLOD); -#endif -#else -float lodRefractionNormalized=saturate(refractionLOD/log2(vRefractionMicrosurfaceInfos.x)); -float lodRefractionNormalizedDoubled=lodRefractionNormalized*2.0; -vec4 environmentRefractionMid=sampleRefraction(refractionSampler,refractionCoords); -if (lodRefractionNormalizedDoubled<1.0){ -environmentRefraction=mix( -sampleRefraction(refractionSamplerHigh,refractionCoords), -environmentRefractionMid, -lodRefractionNormalizedDoubled -); -} else { -environmentRefraction=mix( -environmentRefractionMid, -sampleRefraction(refractionSamplerLow,refractionCoords), -lodRefractionNormalizedDoubled-1.0 -); -} -#endif -#ifdef SS_RGBDREFRACTION -environmentRefraction.rgb=fromRGBD(environmentRefraction); -#endif -#ifdef SS_GAMMAREFRACTION -environmentRefraction.rgb=toLinearSpace(environmentRefraction.rgb); -#endif - -environmentRefraction.rgb*=vRefractionInfos.x; -#endif - - - -#ifdef SS_REFRACTION -vec3 refractionTransmittance=vec3(refractionIntensity); -#ifdef SS_THICKNESSANDMASK_TEXTURE -vec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w); - - - - - -refractionTransmittance*=cocaLambert(volumeAlbedo,thickness); -#elif defined(SS_LINKREFRACTIONTOTRANSPARENCY) - -float maxChannel=max(max(surfaceAlbedo.r,surfaceAlbedo.g),surfaceAlbedo.b); -vec3 volumeAlbedo=saturate(maxChannel*surfaceAlbedo); - -environmentRefraction.rgb*=volumeAlbedo; -#else - -vec3 volumeAlbedo=computeColorAtDistanceInMedia(vTintColor.rgb,vTintColor.w); -refractionTransmittance*=cocaLambert(volumeAlbedo,vThicknessParam.y); -#endif -#ifdef SS_ALBEDOFORREFRACTIONTINT - -environmentRefraction.rgb*=surfaceAlbedo.rgb; -#endif - -outParams.surfaceAlbedo=surfaceAlbedo*(1.-refractionIntensity); -#ifdef REFLECTION - -outParams.refractionFactorForIrradiance=(1.-refractionIntensity); - -#endif - -vec3 bounceSpecularEnvironmentReflectance=(2.0*specularEnvironmentReflectance)/(1.0+specularEnvironmentReflectance); -outParams.specularEnvironmentReflectance=mix(bounceSpecularEnvironmentReflectance,specularEnvironmentReflectance,refractionIntensity); - -refractionTransmittance*=1.0-outParams.specularEnvironmentReflectance; -#if DEBUGMODE>0 -outParams.refractionTransmittance=refractionTransmittance; -#endif -outParams.finalRefraction=environmentRefraction.rgb*refractionTransmittance*vLightingIntensity.z; -#if DEBUGMODE>0 -outParams.environmentRefraction=environmentRefraction; -#endif -#endif - - - -#if defined(REFLECTION) && defined(SS_TRANSLUCENCY) -#if defined(NORMAL) && defined(USESPHERICALINVERTEX) || !defined(USESPHERICALFROMREFLECTIONMAP) -vec3 irradianceVector=vec3(reflectionMatrix*vec4(normalW,0)).xyz; -#ifdef REFLECTIONMAP_OPPOSITEZ -irradianceVector.z*=-1.0; -#endif -#ifdef INVERTCUBICMAP -irradianceVector.y*=-1.0; -#endif -#else -vec3 irradianceVector=irradianceVector_; -#endif -#if defined(USESPHERICALFROMREFLECTIONMAP) -#if defined(REALTIME_FILTERING) -vec3 refractionIrradiance=irradiance(reflectionSampler,-irradianceVector,vReflectionFilteringInfo); -#else -vec3 refractionIrradiance=computeEnvironmentIrradiance(-irradianceVector); -#endif -#elif defined(USEIRRADIANCEMAP) -#ifdef REFLECTIONMAP_3D -vec3 irradianceCoords=irradianceVector; -#else -vec2 irradianceCoords=irradianceVector.xy; -#ifdef REFLECTIONMAP_PROJECTION -irradianceCoords/=irradianceVector.z; -#endif -irradianceCoords.y=1.0-irradianceCoords.y; -#endif -vec4 refractionIrradiance=sampleReflection(irradianceSampler,-irradianceCoords); -#ifdef RGBDREFLECTION -refractionIrradiance.rgb=fromRGBD(refractionIrradiance); -#endif -#ifdef GAMMAREFLECTION -refractionIrradiance.rgb=toLinearSpace(refractionIrradiance.rgb); -#endif -#else -vec4 refractionIrradiance=vec4(0.); -#endif -refractionIrradiance.rgb*=transmittance; -outParams.refractionIrradiance=refractionIrradiance.rgb; -#endif -} -#endif -`;je.a.IncludesShadersStore.pbrBlockSubSurface=r_;var o_=`vec3 viewDirectionW=normalize(vEyePosition.xyz-vPositionW); -#ifdef NORMAL -vec3 normalW=normalize(vNormalW); -#else -vec3 normalW=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w; -#endif -vec3 geometricNormalW=normalW; -#if defined(TWOSIDEDLIGHTING) && defined(NORMAL) -geometricNormalW=gl_FrontFacing ? geometricNormalW : -geometricNormalW; -#endif -`;je.a.IncludesShadersStore.pbrBlockNormalGeometric=o_,f(134);var a_=`#if defined(FORCENORMALFORWARD) && defined(NORMAL) -vec3 faceNormal=normalize(cross(dFdx(vPositionW),dFdy(vPositionW)))*vEyePosition.w; -#if defined(TWOSIDEDLIGHTING) -faceNormal=gl_FrontFacing ? faceNormal : -faceNormal; -#endif -normalW*=sign(dot(normalW,faceNormal)); -#endif -#if defined(TWOSIDEDLIGHTING) && defined(NORMAL) -normalW=gl_FrontFacing ? normalW : -normalW; -#endif -`;je.a.IncludesShadersStore.pbrBlockNormalFinal=a_,f(162);var s_=`#ifdef LIGHTMAP -vec4 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset); -#ifdef RGBDLIGHTMAP -lightmapColor.rgb=fromRGBD(lightmapColor); -#endif -#ifdef GAMMALIGHTMAP -lightmapColor.rgb=toLinearSpace(lightmapColor.rgb); -#endif -lightmapColor.rgb*=vLightmapInfos.y; -#endif -`;je.a.IncludesShadersStore.pbrBlockLightmapInit=s_;var c_=`float NdotVUnclamped=dot(normalW,viewDirectionW); - -float NdotV=absEps(NdotVUnclamped); -float alphaG=convertRoughnessToAverageSlope(roughness); -vec2 AARoughnessFactors=getAARoughnessFactors(normalW.xyz); -#ifdef SPECULARAA - -alphaG+=AARoughnessFactors.y; -#endif -#if defined(ENVIRONMENTBRDF) - -vec3 environmentBrdf=getBRDFLookup(NdotV,roughness); -#endif -#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) -#ifdef RADIANCEOCCLUSION -#ifdef AMBIENTINGRAYSCALE -float ambientMonochrome=aoOut.ambientOcclusionColor.r; -#else -float ambientMonochrome=getLuminance(aoOut.ambientOcclusionColor); -#endif -float seo=environmentRadianceOcclusion(ambientMonochrome,NdotVUnclamped); -#endif -#ifdef HORIZONOCCLUSION -#ifdef BUMP -#ifdef REFLECTIONMAP_3D -float eho=environmentHorizonOcclusion(-viewDirectionW,normalW,geometricNormalW); -#endif -#endif -#endif -#endif -`;je.a.IncludesShadersStore.pbrBlockGeometryInfo=c_;var l_=`float reflectance=max(max(reflectivityOut.surfaceReflectivityColor.r,reflectivityOut.surfaceReflectivityColor.g),reflectivityOut.surfaceReflectivityColor.b); -vec3 specularEnvironmentR0=reflectivityOut.surfaceReflectivityColor.rgb; -#ifdef METALLICWORKFLOW -vec3 specularEnvironmentR90=vec3(metallicReflectanceFactors.a); -#else -vec3 specularEnvironmentR90=vec3(1.0,1.0,1.0); -#endif - -#ifdef ALPHAFRESNEL -float reflectance90=fresnelGrazingReflectance(reflectance); -specularEnvironmentR90=specularEnvironmentR90*reflectance90; -#endif -`;je.a.IncludesShadersStore.pbrBlockReflectance0=l_;var u_=`#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) -vec3 specularEnvironmentReflectance=getReflectanceFromBRDFLookup(clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,environmentBrdf); -#ifdef RADIANCEOCCLUSION -specularEnvironmentReflectance*=seo; -#endif -#ifdef HORIZONOCCLUSION -#ifdef BUMP -#ifdef REFLECTIONMAP_3D -specularEnvironmentReflectance*=eho; -#endif -#endif -#endif -#else - -vec3 specularEnvironmentReflectance=getReflectanceFromAnalyticalBRDFLookup_Jones(NdotV,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,sqrt(microSurface)); -#endif -#ifdef CLEARCOAT -specularEnvironmentReflectance*=clearcoatOut.conservationFactor; -#if defined(CLEARCOAT_TINT) -specularEnvironmentReflectance*=clearcoatOut.absorption; -#endif -#endif -`;je.a.IncludesShadersStore.pbrBlockReflectance=u_;var h_=`vec3 diffuseBase=vec3(0.,0.,0.); -#ifdef SPECULARTERM -vec3 specularBase=vec3(0.,0.,0.); -#endif -#ifdef CLEARCOAT -vec3 clearCoatBase=vec3(0.,0.,0.); -#endif -#ifdef SHEEN -vec3 sheenBase=vec3(0.,0.,0.); -#endif - -preLightingInfo preInfo; -lightingInfo info; -float shadow=1.; -#if defined(CLEARCOAT) && defined(CLEARCOAT_TINT) -vec3 absorption=vec3(0.); -#endif -`;je.a.IncludesShadersStore.pbrBlockDirectLighting=h_;var d_=` - - - -#if defined(ENVIRONMENTBRDF) -#ifdef MS_BRDF_ENERGY_CONSERVATION -vec3 energyConservationFactor=getEnergyConservationFactor(clearcoatOut.specularEnvironmentR0,environmentBrdf); -#endif -#endif -#ifndef METALLICWORKFLOW -#ifdef SPECULAR_GLOSSINESS_ENERGY_CONSERVATION -surfaceAlbedo.rgb=(1.-reflectance)*surfaceAlbedo.rgb; -#endif -#endif -#if defined(SHEEN) && defined(SHEEN_ALBEDOSCALING) && defined(ENVIRONMENTBRDF) -surfaceAlbedo.rgb=sheenOut.sheenAlbedoScaling*surfaceAlbedo.rgb; -#endif - -#ifdef REFLECTION -vec3 finalIrradiance=reflectionOut.environmentIrradiance; -#if defined(CLEARCOAT) -finalIrradiance*=clearcoatOut.conservationFactor; -#if defined(CLEARCOAT_TINT) -finalIrradiance*=clearcoatOut.absorption; -#endif -#endif -#if defined(SS_REFRACTION) -finalIrradiance*=subSurfaceOut.refractionFactorForIrradiance; -#endif -#if defined(SS_TRANSLUCENCY) -finalIrradiance*=(1.0-subSurfaceOut.translucencyIntensity); -finalIrradiance+=subSurfaceOut.refractionIrradiance; -#endif -finalIrradiance*=surfaceAlbedo.rgb; -finalIrradiance*=vLightingIntensity.z; -finalIrradiance*=aoOut.ambientOcclusionColor; -#endif - -#ifdef SPECULARTERM -vec3 finalSpecular=specularBase; -finalSpecular=max(finalSpecular,0.0); -vec3 finalSpecularScaled=finalSpecular*vLightingIntensity.x*vLightingIntensity.w; -#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) -finalSpecularScaled*=energyConservationFactor; -#endif -#if defined(SHEEN) && defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING) -finalSpecularScaled*=sheenOut.sheenAlbedoScaling; -#endif -#endif - -#ifdef REFLECTION -vec3 finalRadiance=reflectionOut.environmentRadiance.rgb; -finalRadiance*=subSurfaceOut.specularEnvironmentReflectance; -vec3 finalRadianceScaled=finalRadiance*vLightingIntensity.z; -#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) -finalRadianceScaled*=energyConservationFactor; -#endif -#if defined(SHEEN) && defined(ENVIRONMENTBRDF) && defined(SHEEN_ALBEDOSCALING) -finalRadianceScaled*=sheenOut.sheenAlbedoScaling; -#endif -#endif - -#ifdef SHEEN -vec3 finalSheen=sheenBase*sheenOut.sheenColor; -finalSheen=max(finalSheen,0.0); -vec3 finalSheenScaled=finalSheen*vLightingIntensity.x*vLightingIntensity.w; -#if defined(CLEARCOAT) && defined(REFLECTION) && defined(ENVIRONMENTBRDF) -sheenOut.finalSheenRadianceScaled*=clearcoatOut.conservationFactor; -#if defined(CLEARCOAT_TINT) -sheenOut.finalSheenRadianceScaled*=clearcoatOut.absorption; -#endif -#endif -#endif - -#ifdef CLEARCOAT -vec3 finalClearCoat=clearCoatBase; -finalClearCoat=max(finalClearCoat,0.0); -vec3 finalClearCoatScaled=finalClearCoat*vLightingIntensity.x*vLightingIntensity.w; -#if defined(ENVIRONMENTBRDF) && defined(MS_BRDF_ENERGY_CONSERVATION) -finalClearCoatScaled*=clearcoatOut.energyConservationFactorClearCoat; -#endif -#ifdef SS_REFRACTION -subSurfaceOut.finalRefraction*=clearcoatOut.conservationFactor; -#ifdef CLEARCOAT_TINT -subSurfaceOut.finalRefraction*=clearcoatOut.absorption; -#endif -#endif -#endif - -#ifdef ALPHABLEND -float luminanceOverAlpha=0.0; -#if defined(REFLECTION) && defined(RADIANCEOVERALPHA) -luminanceOverAlpha+=getLuminance(finalRadianceScaled); -#if defined(CLEARCOAT) -luminanceOverAlpha+=getLuminance(clearcoatOut.finalClearCoatRadianceScaled); -#endif -#endif -#if defined(SPECULARTERM) && defined(SPECULAROVERALPHA) -luminanceOverAlpha+=getLuminance(finalSpecularScaled); -#endif -#if defined(CLEARCOAT) && defined(CLEARCOATOVERALPHA) -luminanceOverAlpha+=getLuminance(finalClearCoatScaled); -#endif -#if defined(RADIANCEOVERALPHA) || defined(SPECULAROVERALPHA) || defined(CLEARCOATOVERALPHA) -alpha=saturate(alpha+luminanceOverAlpha*luminanceOverAlpha); -#endif -#endif -`;je.a.IncludesShadersStore.pbrBlockFinalLitComponents=d_;var f_=` -vec3 finalDiffuse=diffuseBase; -finalDiffuse*=surfaceAlbedo.rgb; -finalDiffuse=max(finalDiffuse,0.0); -finalDiffuse*=vLightingIntensity.x; - -vec3 finalAmbient=vAmbientColor; -finalAmbient*=surfaceAlbedo.rgb; - -vec3 finalEmissive=vEmissiveColor; -#ifdef EMISSIVE -vec3 emissiveColorTex=texture2D(emissiveSampler,vEmissiveUV+uvOffset).rgb; -finalEmissive*=toLinearSpace(emissiveColorTex.rgb); -finalEmissive*=vEmissiveInfos.y; -#endif -finalEmissive*=vLightingIntensity.y; - -#ifdef AMBIENT -vec3 ambientOcclusionForDirectDiffuse=mix(vec3(1.),aoOut.ambientOcclusionColor,vAmbientInfos.w); -#else -vec3 ambientOcclusionForDirectDiffuse=aoOut.ambientOcclusionColor; -#endif -finalAmbient*=aoOut.ambientOcclusionColor; -finalDiffuse*=ambientOcclusionForDirectDiffuse; -`;je.a.IncludesShadersStore.pbrBlockFinalUnlitComponents=f_;var p_=`vec4 finalColor=vec4( -finalAmbient + -finalDiffuse + -#ifndef UNLIT -#ifdef REFLECTION -finalIrradiance + -#endif -#ifdef SPECULARTERM -finalSpecularScaled + -#endif -#ifdef SHEEN -finalSheenScaled + -#endif -#ifdef CLEARCOAT -finalClearCoatScaled + -#endif -#ifdef REFLECTION -finalRadianceScaled + -#if defined(SHEEN) && defined(ENVIRONMENTBRDF) -sheenOut.finalSheenRadianceScaled + -#endif -#ifdef CLEARCOAT -clearcoatOut.finalClearCoatRadianceScaled + -#endif -#endif -#ifdef SS_REFRACTION -subSurfaceOut.finalRefraction + -#endif -#endif -finalEmissive, -alpha); - -#ifdef LIGHTMAP -#ifndef LIGHTMAPEXCLUDED -#ifdef USELIGHTMAPASSHADOWMAP -finalColor.rgb*=lightmapColor.rgb; -#else -finalColor.rgb+=lightmapColor.rgb; -#endif -#endif -#endif -#define CUSTOM_FRAGMENT_BEFORE_FOG - -finalColor=max(finalColor,0.0); -`;je.a.IncludesShadersStore.pbrBlockFinalColorComposition=p_,f(155);var __=`#ifdef IMAGEPROCESSINGPOSTPROCESS - - -finalColor.rgb=clamp(finalColor.rgb,0.,30.0); -#else - -finalColor=applyImageProcessing(finalColor); -#endif -finalColor.a*=visibility; -#ifdef PREMULTIPLYALPHA - -finalColor.rgb*=finalColor.a; -#endif -`;je.a.IncludesShadersStore.pbrBlockImageProcessing=__;var m_=`#if DEBUGMODE>0 -if (vClipSpacePosition.x/vClipSpacePosition.w>=vDebugMode.x) { - -#if DEBUGMODE == 1 -gl_FragColor.rgb=vPositionW.rgb; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 2 && defined(NORMAL) -gl_FragColor.rgb=vNormalW.rgb; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 3 && defined(BUMP) || DEBUGMODE == 3 && defined(PARALLAX) || DEBUGMODE == 3 && defined(ANISOTROPIC) - -gl_FragColor.rgb=TBN[0]; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 4 && defined(BUMP) || DEBUGMODE == 4 && defined(PARALLAX) || DEBUGMODE == 4 && defined(ANISOTROPIC) - -gl_FragColor.rgb=TBN[1]; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 5 - -gl_FragColor.rgb=normalW; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 6 && defined(MAINUV1) -gl_FragColor.rgb=vec3(vMainUV1,0.0); -#elif DEBUGMODE == 7 && defined(MAINUV2) -gl_FragColor.rgb=vec3(vMainUV2,0.0); -#elif DEBUGMODE == 8 && defined(CLEARCOAT) && defined(CLEARCOAT_BUMP) - -gl_FragColor.rgb=clearcoatOut.TBNClearCoat[0]; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 9 && defined(CLEARCOAT) && defined(CLEARCOAT_BUMP) - -gl_FragColor.rgb=clearcoatOut.TBNClearCoat[1]; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 10 && defined(CLEARCOAT) - -gl_FragColor.rgb=clearcoatOut.clearCoatNormalW; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 11 && defined(ANISOTROPIC) -gl_FragColor.rgb=anisotropicOut.anisotropicNormal; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 12 && defined(ANISOTROPIC) -gl_FragColor.rgb=anisotropicOut.anisotropicTangent; -#define DEBUGMODE_NORMALIZE -#elif DEBUGMODE == 13 && defined(ANISOTROPIC) -gl_FragColor.rgb=anisotropicOut.anisotropicBitangent; -#define DEBUGMODE_NORMALIZE - -#elif DEBUGMODE == 20 && defined(ALBEDO) -gl_FragColor.rgb=albedoTexture.rgb; -#elif DEBUGMODE == 21 && defined(AMBIENT) -gl_FragColor.rgb=aoOut.ambientOcclusionColorMap.rgb; -#elif DEBUGMODE == 22 && defined(OPACITY) -gl_FragColor.rgb=opacityMap.rgb; -#elif DEBUGMODE == 23 && defined(EMISSIVE) -gl_FragColor.rgb=emissiveColorTex.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 24 && defined(LIGHTMAP) -gl_FragColor.rgb=lightmapColor.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 25 && defined(REFLECTIVITY) && defined(METALLICWORKFLOW) -gl_FragColor.rgb=reflectivityOut.surfaceMetallicColorMap.rgb; -#elif DEBUGMODE == 26 && defined(REFLECTIVITY) && !defined(METALLICWORKFLOW) -gl_FragColor.rgb=reflectivityOut.surfaceReflectivityColorMap.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 27 && defined(CLEARCOAT) && defined(CLEARCOAT_TEXTURE) -gl_FragColor.rgb=vec3(clearcoatOut.clearCoatMapData.rg,0.0); -#elif DEBUGMODE == 28 && defined(CLEARCOAT) && defined(CLEARCOAT_TINT) && defined(CLEARCOAT_TINT_TEXTURE) -gl_FragColor.rgb=clearcoatOut.clearCoatTintMapData.rgb; -#elif DEBUGMODE == 29 && defined(SHEEN) && defined(SHEEN_TEXTURE) -gl_FragColor.rgb=sheenOut.sheenMapData.rgb; -#elif DEBUGMODE == 30 && defined(ANISOTROPIC) && defined(ANISOTROPIC_TEXTURE) -gl_FragColor.rgb=anisotropicOut.anisotropyMapData.rgb; -#elif DEBUGMODE == 31 && defined(SUBSURFACE) && defined(SS_THICKNESSANDMASK_TEXTURE) -gl_FragColor.rgb=subSurfaceOut.thicknessMap.rgb; - -#elif DEBUGMODE == 40 && defined(SS_REFRACTION) - -gl_FragColor.rgb=subSurfaceOut.environmentRefraction.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 41 && defined(REFLECTION) -gl_FragColor.rgb=reflectionOut.environmentRadiance.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 42 && defined(CLEARCOAT) && defined(REFLECTION) -gl_FragColor.rgb=clearcoatOut.environmentClearCoatRadiance.rgb; -#define DEBUGMODE_GAMMA - -#elif DEBUGMODE == 50 -gl_FragColor.rgb=diffuseBase.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 51 && defined(SPECULARTERM) -gl_FragColor.rgb=specularBase.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 52 && defined(CLEARCOAT) -gl_FragColor.rgb=clearCoatBase.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 53 && defined(SHEEN) -gl_FragColor.rgb=sheenBase.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 54 && defined(REFLECTION) -gl_FragColor.rgb=reflectionOut.environmentIrradiance.rgb; -#define DEBUGMODE_GAMMA - -#elif DEBUGMODE == 60 -gl_FragColor.rgb=surfaceAlbedo.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 61 -gl_FragColor.rgb=clearcoatOut.specularEnvironmentR0; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 62 && defined(METALLICWORKFLOW) -gl_FragColor.rgb=vec3(reflectivityOut.metallicRoughness.r); -#elif DEBUGMODE == 71 && defined(METALLICWORKFLOW) -gl_FragColor.rgb=reflectivityOut.metallicF0; -#elif DEBUGMODE == 63 -gl_FragColor.rgb=vec3(roughness); -#elif DEBUGMODE == 64 -gl_FragColor.rgb=vec3(alphaG); -#elif DEBUGMODE == 65 -gl_FragColor.rgb=vec3(NdotV); -#elif DEBUGMODE == 66 && defined(CLEARCOAT) && defined(CLEARCOAT_TINT) -gl_FragColor.rgb=clearcoatOut.clearCoatColor.rgb; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 67 && defined(CLEARCOAT) -gl_FragColor.rgb=vec3(clearcoatOut.clearCoatRoughness); -#elif DEBUGMODE == 68 && defined(CLEARCOAT) -gl_FragColor.rgb=vec3(clearcoatOut.clearCoatNdotV); -#elif DEBUGMODE == 69 && defined(SUBSURFACE) && defined(SS_TRANSLUCENCY) -gl_FragColor.rgb=subSurfaceOut.transmittance; -#elif DEBUGMODE == 70 && defined(SUBSURFACE) && defined(SS_REFRACTION) -gl_FragColor.rgb=subSurfaceOut.refractionTransmittance; - -#elif DEBUGMODE == 80 && defined(RADIANCEOCCLUSION) -gl_FragColor.rgb=vec3(seo); -#elif DEBUGMODE == 81 && defined(HORIZONOCCLUSION) -gl_FragColor.rgb=vec3(eho); -#elif DEBUGMODE == 82 && defined(MS_BRDF_ENERGY_CONSERVATION) -gl_FragColor.rgb=vec3(energyConservationFactor); -#elif DEBUGMODE == 83 && defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) -gl_FragColor.rgb=specularEnvironmentReflectance; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 84 && defined(CLEARCOAT) && defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) -gl_FragColor.rgb=clearcoatOut.clearCoatEnvironmentReflectance; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 85 && defined(SHEEN) && defined(REFLECTION) -gl_FragColor.rgb=sheenOut.sheenEnvironmentReflectance; -#define DEBUGMODE_GAMMA -#elif DEBUGMODE == 86 && defined(ALPHABLEND) -gl_FragColor.rgb=vec3(luminanceOverAlpha); -#elif DEBUGMODE == 87 -gl_FragColor.rgb=vec3(alpha); -#endif -gl_FragColor.rgb*=vDebugMode.y; -#ifdef DEBUGMODE_NORMALIZE -gl_FragColor.rgb=normalize(gl_FragColor.rgb)*0.5+0.5; -#endif -#ifdef DEBUGMODE_GAMMA -gl_FragColor.rgb=toGammaSpace(gl_FragColor.rgb); -#endif -gl_FragColor.a=1.0; -#ifdef PREPASS -gl_FragData[0]=toLinearSpace(gl_FragColor); -gl_FragData[1]=vec4(0.,0.,0.,0.); -#endif -return; -} -#endif`;je.a.IncludesShadersStore.pbrDebug=m_;var g_=`#if defined(BUMP) || !defined(NORMAL) || defined(FORCENORMALFORWARD) || defined(SPECULARAA) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) -#extension GL_OES_standard_derivatives : enable -#endif -#ifdef LODBASEDMICROSFURACE -#extension GL_EXT_shader_texture_lod : enable -#endif -#define CUSTOM_FRAGMENT_BEGIN -#ifdef LOGARITHMICDEPTH -#extension GL_EXT_frag_depth : enable -#endif -#include[SCENE_MRT_COUNT] -precision highp float; - -#ifndef FROMLINEARSPACE -#define FROMLINEARSPACE -#endif - -#include<__decl__pbrFragment> -#include -#include<__decl__lightFragment>[0..maxSimultaneousLights] -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef REFLECTION -#include -#endif -#define CUSTOM_FRAGMENT_DEFINITIONS -#include -#include -#include -#include -#include -#include -#include -#include -#include - -void main(void) { -#define CUSTOM_FRAGMENT_MAIN_BEGIN -#include - -#include -#include -#include - -albedoOpacityOutParams albedoOpacityOut; -#ifdef ALBEDO -vec4 albedoTexture=texture2D(albedoSampler,vAlbedoUV+uvOffset); -#endif -#ifdef OPACITY -vec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset); -#endif -albedoOpacityBlock( -vAlbedoColor, -#ifdef ALBEDO -albedoTexture, -vAlbedoInfos, -#endif -#ifdef OPACITY -opacityMap, -vOpacityInfos, -#endif -#ifdef DETAIL -detailColor, -vDetailInfos, -#endif -albedoOpacityOut -); -vec3 surfaceAlbedo=albedoOpacityOut.surfaceAlbedo; -float alpha=albedoOpacityOut.alpha; -#define CUSTOM_FRAGMENT_UPDATE_ALPHA -#include -#define CUSTOM_FRAGMENT_BEFORE_LIGHTS - -ambientOcclusionOutParams aoOut; -#ifdef AMBIENT -vec3 ambientOcclusionColorMap=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb; -#endif -ambientOcclusionBlock( -#ifdef AMBIENT -ambientOcclusionColorMap, -vAmbientInfos, -#endif -aoOut -); -#include -#ifdef UNLIT -vec3 diffuseBase=vec3(1.,1.,1.); -#else - -vec3 baseColor=surfaceAlbedo; -reflectivityOutParams reflectivityOut; -#if defined(REFLECTIVITY) -vec4 surfaceMetallicOrReflectivityColorMap=texture2D(reflectivitySampler,vReflectivityUV+uvOffset); -vec4 baseReflectivity=surfaceMetallicOrReflectivityColorMap; -#ifndef METALLICWORKFLOW -surfaceMetallicOrReflectivityColorMap=toLinearSpace(surfaceMetallicOrReflectivityColorMap); -surfaceMetallicOrReflectivityColorMap.rgb*=vReflectivityInfos.y; -#endif -#endif -#if defined(MICROSURFACEMAP) -vec4 microSurfaceTexel=texture2D(microSurfaceSampler,vMicroSurfaceSamplerUV+uvOffset)*vMicroSurfaceSamplerInfos.y; -#endif -#ifdef METALLICWORKFLOW -vec4 metallicReflectanceFactors=vMetallicReflectanceFactors; -#ifdef METALLIC_REFLECTANCE -vec4 metallicReflectanceFactorsMap=texture2D(metallicReflectanceSampler,vMetallicReflectanceUV+uvOffset); -metallicReflectanceFactorsMap=toLinearSpace(metallicReflectanceFactorsMap); -metallicReflectanceFactors*=metallicReflectanceFactorsMap; -#endif -#endif -reflectivityBlock( -vReflectivityColor, -#ifdef METALLICWORKFLOW -surfaceAlbedo, -metallicReflectanceFactors, -#endif -#ifdef REFLECTIVITY -vReflectivityInfos, -surfaceMetallicOrReflectivityColorMap, -#endif -#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) -aoOut.ambientOcclusionColor, -#endif -#ifdef MICROSURFACEMAP -microSurfaceTexel, -#endif -#ifdef DETAIL -detailColor, -vDetailInfos, -#endif -reflectivityOut -); -float microSurface=reflectivityOut.microSurface; -float roughness=reflectivityOut.roughness; -#ifdef METALLICWORKFLOW -surfaceAlbedo=reflectivityOut.surfaceAlbedo; -#endif -#if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) -aoOut.ambientOcclusionColor=reflectivityOut.ambientOcclusionColor; -#endif - -#ifdef ALPHAFRESNEL -#if defined(ALPHATEST) || defined(ALPHABLEND) -alphaFresnelOutParams alphaFresnelOut; -alphaFresnelBlock( -normalW, -viewDirectionW, -alpha, -microSurface, -alphaFresnelOut -); -alpha=alphaFresnelOut.alpha; -#endif -#endif - -#include - -#ifdef ANISOTROPIC -anisotropicOutParams anisotropicOut; -#ifdef ANISOTROPIC_TEXTURE -vec3 anisotropyMapData=texture2D(anisotropySampler,vAnisotropyUV+uvOffset).rgb*vAnisotropyInfos.y; -#endif -anisotropicBlock( -vAnisotropy, -#ifdef ANISOTROPIC_TEXTURE -anisotropyMapData, -#endif -TBN, -normalW, -viewDirectionW, -anisotropicOut -); -#endif - -#ifdef REFLECTION -reflectionOutParams reflectionOut; -reflectionBlock( -vPositionW, -normalW, -alphaG, -vReflectionMicrosurfaceInfos, -vReflectionInfos, -vReflectionColor, -#ifdef ANISOTROPIC -anisotropicOut, -#endif -#if defined(LODINREFLECTIONALPHA) && !defined(REFLECTIONMAP_SKYBOX) -NdotVUnclamped, -#endif -#ifdef LINEARSPECULARREFLECTION -roughness, -#endif -reflectionSampler, -#if defined(NORMAL) && defined(USESPHERICALINVERTEX) -vEnvironmentIrradiance, -#endif -#ifdef USESPHERICALFROMREFLECTIONMAP -#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) -reflectionMatrix, -#endif -#endif -#ifdef USEIRRADIANCEMAP -irradianceSampler, -#endif -#ifndef LODBASEDMICROSFURACE -reflectionSamplerLow, -reflectionSamplerHigh, -#endif -#ifdef REALTIME_FILTERING -vReflectionFilteringInfo, -#endif -reflectionOut -); -#endif - -#include - -#ifdef SHEEN -sheenOutParams sheenOut; -#ifdef SHEEN_TEXTURE -vec4 sheenMapData=toLinearSpace(texture2D(sheenSampler,vSheenUV+uvOffset))*vSheenInfos.y; -#endif -#if defined(SHEEN_ROUGHNESS) && defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) -vec4 sheenMapRoughnessData=texture2D(sheenRoughnessSampler,vSheenRoughnessUV+uvOffset)*vSheenInfos.w; -#endif -sheenBlock( -vSheenColor, -#ifdef SHEEN_ROUGHNESS -vSheenRoughness, -#if defined(SHEEN_TEXTURE_ROUGHNESS) && !defined(SHEEN_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE) -sheenMapRoughnessData, -#endif -#endif -roughness, -#ifdef SHEEN_TEXTURE -sheenMapData, -#endif -reflectance, -#ifdef SHEEN_LINKWITHALBEDO -baseColor, -surfaceAlbedo, -#endif -#ifdef ENVIRONMENTBRDF -NdotV, -environmentBrdf, -#endif -#if defined(REFLECTION) && defined(ENVIRONMENTBRDF) -AARoughnessFactors, -vReflectionMicrosurfaceInfos, -vReflectionInfos, -vReflectionColor, -vLightingIntensity, -reflectionSampler, -reflectionOut.reflectionCoords, -NdotVUnclamped, -#ifndef LODBASEDMICROSFURACE -reflectionSamplerLow, -reflectionSamplerHigh, -#endif -#ifdef REALTIME_FILTERING -vReflectionFilteringInfo, -#endif -#if !defined(REFLECTIONMAP_SKYBOX) && defined(RADIANCEOCCLUSION) -seo, -#endif -#if !defined(REFLECTIONMAP_SKYBOX) && defined(HORIZONOCCLUSION) && defined(BUMP) && defined(REFLECTIONMAP_3D) -eho, -#endif -#endif -sheenOut -); -#ifdef SHEEN_LINKWITHALBEDO -surfaceAlbedo=sheenOut.surfaceAlbedo; -#endif -#endif - -clearcoatOutParams clearcoatOut; -#ifdef CLEARCOAT -#ifdef CLEARCOAT_TEXTURE -vec2 clearCoatMapData=texture2D(clearCoatSampler,vClearCoatUV+uvOffset).rg*vClearCoatInfos.y; -#endif -#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) -vec4 clearCoatMapRoughnessData=texture2D(clearCoatRoughnessSampler,vClearCoatRoughnessUV+uvOffset)*vClearCoatInfos.w; -#endif -#if defined(CLEARCOAT_TINT) && defined(CLEARCOAT_TINT_TEXTURE) -vec4 clearCoatTintMapData=toLinearSpace(texture2D(clearCoatTintSampler,vClearCoatTintUV+uvOffset)); -#endif -#ifdef CLEARCOAT_BUMP -vec4 clearCoatBumpMapData=texture2D(clearCoatBumpSampler,vClearCoatBumpUV+uvOffset); -#endif -clearcoatBlock( -vPositionW, -geometricNormalW, -viewDirectionW, -vClearCoatParams, -#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && !defined(CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL) && !defined(CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE) -clearCoatMapRoughnessData, -#endif -specularEnvironmentR0, -#ifdef CLEARCOAT_TEXTURE -clearCoatMapData, -#endif -#ifdef CLEARCOAT_TINT -vClearCoatTintParams, -clearCoatColorAtDistance, -vClearCoatRefractionParams, -#ifdef CLEARCOAT_TINT_TEXTURE -clearCoatTintMapData, -#endif -#endif -#ifdef CLEARCOAT_BUMP -vClearCoatBumpInfos, -clearCoatBumpMapData, -vClearCoatBumpUV, -#if defined(TANGENT) && defined(NORMAL) -vTBN, -#else -vClearCoatTangentSpaceParams, -#endif -#ifdef OBJECTSPACE_NORMALMAP -normalMatrix, -#endif -#endif -#if defined(FORCENORMALFORWARD) && defined(NORMAL) -faceNormal, -#endif -#ifdef REFLECTION -vReflectionMicrosurfaceInfos, -vReflectionInfos, -vReflectionColor, -vLightingIntensity, -reflectionSampler, -#ifndef LODBASEDMICROSFURACE -reflectionSamplerLow, -reflectionSamplerHigh, -#endif -#ifdef REALTIME_FILTERING -vReflectionFilteringInfo, -#endif -#endif -#if defined(ENVIRONMENTBRDF) && !defined(REFLECTIONMAP_SKYBOX) -#ifdef RADIANCEOCCLUSION -ambientMonochrome, -#endif -#endif -clearcoatOut -); -#else -clearcoatOut.specularEnvironmentR0=specularEnvironmentR0; -#endif - -#include - -subSurfaceOutParams subSurfaceOut; -#ifdef SUBSURFACE -#ifdef SS_THICKNESSANDMASK_TEXTURE -vec4 thicknessMap=texture2D(thicknessSampler,vThicknessUV+uvOffset); -#endif -subSurfaceBlock( -vSubSurfaceIntensity, -vThicknessParam, -vTintColor, -normalW, -specularEnvironmentReflectance, -#ifdef SS_THICKNESSANDMASK_TEXTURE -thicknessMap, -#endif -#ifdef REFLECTION -#ifdef SS_TRANSLUCENCY -reflectionMatrix, -#ifdef USESPHERICALFROMREFLECTIONMAP -#if !defined(NORMAL) || !defined(USESPHERICALINVERTEX) -reflectionOut.irradianceVector, -#endif -#if defined(REALTIME_FILTERING) -reflectionSampler, -vReflectionFilteringInfo, -#endif -#endif -#ifdef USEIRRADIANCEMAP -irradianceSampler, -#endif -#endif -#endif -#ifdef SS_REFRACTION -vPositionW, -viewDirectionW, -view, -surfaceAlbedo, -vRefractionInfos, -refractionMatrix, -vRefractionMicrosurfaceInfos, -vLightingIntensity, -#ifdef SS_LINKREFRACTIONTOTRANSPARENCY -alpha, -#endif -#ifdef SS_LODINREFRACTIONALPHA -NdotVUnclamped, -#endif -#ifdef SS_LINEARSPECULARREFRACTION -roughness, -#else -alphaG, -#endif -refractionSampler, -#ifndef LODBASEDMICROSFURACE -refractionSamplerLow, -refractionSamplerHigh, -#endif -#ifdef ANISOTROPIC -anisotropicOut, -#endif -#ifdef REALTIME_FILTERING -vRefractionFilteringInfo, -#endif -#endif -#ifdef SS_TRANSLUCENCY -vDiffusionDistance, -#endif -subSurfaceOut -); -#ifdef SS_REFRACTION -surfaceAlbedo=subSurfaceOut.surfaceAlbedo; -#ifdef SS_LINKREFRACTIONTOTRANSPARENCY -alpha=subSurfaceOut.alpha; -#endif -#endif -#else -subSurfaceOut.specularEnvironmentReflectance=specularEnvironmentReflectance; -#endif - -#include -#include[0..maxSimultaneousLights] - -#include -#endif -#include -#include -#include -#include(color,finalColor) -#include -#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR -#ifdef PREPASS -#ifdef PREPASS_POSITION -gl_FragData[PREPASS_POSITION_INDEX]=vec4(vPositionW,1.0); -#endif -#ifdef PREPASS_VELOCITY -vec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5; -vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5; -vec2 velocity=abs(a-b); -velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5; -gl_FragData[PREPASS_VELOCITY_INDEX]=vec4(velocity,0.0,1.0); -#endif -#ifdef PREPASS_IRRADIANCE -vec3 irradiance=finalDiffuse; -#ifndef UNLIT -#ifdef REFLECTION -irradiance+=finalIrradiance; -#endif -#endif -vec3 sqAlbedo=sqrt(surfaceAlbedo); -#ifdef SS_SCATTERING -gl_FragData[0]=vec4(finalColor.rgb-irradiance,finalColor.a); -irradiance/=sqAlbedo; -#else -gl_FragData[0]=finalColor; -float scatteringDiffusionProfile=255.; -#endif -gl_FragData[PREPASS_IRRADIANCE_INDEX]=vec4(irradiance,scatteringDiffusionProfile/255.); -#else -gl_FragData[0]=vec4(finalColor.rgb,finalColor.a); -#endif -#ifdef PREPASS_DEPTHNORMAL -gl_FragData[PREPASS_DEPTHNORMAL_INDEX]=vec4(vViewPos.z,(view*vec4(normalW,0.0)).rgb); -#endif -#ifdef PREPASS_ALBEDO -gl_FragData[PREPASS_ALBEDO_INDEX]=vec4(sqAlbedo,1.0); -#endif -#ifdef PREPASS_REFLECTIVITY -#if defined(REFLECTIVITY) -gl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(baseReflectivity.rgb,1.0); -#else -gl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(0.0,0.0,0.0,1.0); -#endif -#endif -#endif -#if !defined(PREPASS) || defined(WEBGL2) -gl_FragColor=finalColor; -#endif -#include -} -`;je.a.ShadersStore.pbrPixelShader=g_;var v_=`uniform mat4 view; -uniform mat4 viewProjection; -#ifdef ALBEDO -uniform mat4 albedoMatrix; -uniform vec2 vAlbedoInfos; -#endif -#ifdef AMBIENT -uniform mat4 ambientMatrix; -uniform vec4 vAmbientInfos; -#endif -#ifdef OPACITY -uniform mat4 opacityMatrix; -uniform vec2 vOpacityInfos; -#endif -#ifdef EMISSIVE -uniform vec2 vEmissiveInfos; -uniform mat4 emissiveMatrix; -#endif -#ifdef LIGHTMAP -uniform vec2 vLightmapInfos; -uniform mat4 lightmapMatrix; -#endif -#ifdef REFLECTIVITY -uniform vec3 vReflectivityInfos; -uniform mat4 reflectivityMatrix; -#endif -#ifdef METALLIC_REFLECTANCE -uniform vec2 vMetallicReflectanceInfos; -uniform mat4 metallicReflectanceMatrix; -#endif -#ifdef MICROSURFACEMAP -uniform vec2 vMicroSurfaceSamplerInfos; -uniform mat4 microSurfaceSamplerMatrix; -#endif -#ifdef BUMP -uniform vec3 vBumpInfos; -uniform mat4 bumpMatrix; -#endif -#ifdef POINTSIZE -uniform float pointSize; -#endif - -#ifdef REFLECTION -uniform vec2 vReflectionInfos; -uniform mat4 reflectionMatrix; -#endif - -#ifdef CLEARCOAT -#if defined(CLEARCOAT_TEXTURE) || defined(CLEARCOAT_TEXTURE_ROUGHNESS) -uniform vec4 vClearCoatInfos; -#endif -#ifdef CLEARCOAT_TEXTURE -uniform mat4 clearCoatMatrix; -#endif -#ifdef CLEARCOAT_TEXTURE_ROUGHNESS -uniform mat4 clearCoatRoughnessMatrix; -#endif -#ifdef CLEARCOAT_BUMP -uniform vec2 vClearCoatBumpInfos; -uniform mat4 clearCoatBumpMatrix; -#endif -#ifdef CLEARCOAT_TINT_TEXTURE -uniform vec2 vClearCoatTintInfos; -uniform mat4 clearCoatTintMatrix; -#endif -#endif - -#ifdef ANISOTROPIC -#ifdef ANISOTROPIC_TEXTURE -uniform vec2 vAnisotropyInfos; -uniform mat4 anisotropyMatrix; -#endif -#endif - -#ifdef SHEEN -#if defined(SHEEN_TEXTURE) || defined(SHEEN_TEXTURE_ROUGHNESS) -uniform vec4 vSheenInfos; -#endif -#ifdef SHEEN_TEXTURE -uniform mat4 sheenMatrix; -#endif -#ifdef SHEEN_TEXTURE_ROUGHNESS -uniform mat4 sheenRoughnessMatrix; -#endif -#endif - -#ifdef SUBSURFACE -#ifdef SS_REFRACTION -uniform vec4 vRefractionInfos; -uniform mat4 refractionMatrix; -#endif -#ifdef SS_THICKNESSANDMASK_TEXTURE -uniform vec2 vThicknessInfos; -uniform mat4 thicknessMatrix; -#endif -#endif -`;je.a.IncludesShadersStore.pbrVertexDeclaration=v_,f(163),f(164),f(93),f(94),f(100),f(165),f(156),f(158);var b_=`precision highp float; -#include<__decl__pbrVertex> -#define CUSTOM_VERTEX_BEGIN - -attribute vec3 position; -#ifdef NORMAL -attribute vec3 normal; -#endif -#ifdef TANGENT -attribute vec4 tangent; -#endif -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#ifdef MAINUV1 -varying vec2 vMainUV1; -#endif -#ifdef MAINUV2 -varying vec2 vMainUV2; -#endif -#ifdef VERTEXCOLOR -attribute vec4 color; -#endif -#include -#include - -#include -#include -#if defined(ALBEDO) && ALBEDODIRECTUV == 0 -varying vec2 vAlbedoUV; -#endif -#if defined(DETAIL) && DETAILDIRECTUV == 0 -varying vec2 vDetailUV; -#endif -#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 -varying vec2 vAmbientUV; -#endif -#if defined(OPACITY) && OPACITYDIRECTUV == 0 -varying vec2 vOpacityUV; -#endif -#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 -varying vec2 vEmissiveUV; -#endif -#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 -varying vec2 vLightmapUV; -#endif -#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0 -varying vec2 vReflectivityUV; -#endif -#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0 -varying vec2 vMicroSurfaceSamplerUV; -#endif -#if defined(METALLIC_REFLECTANCE) && METALLIC_REFLECTANCEDIRECTUV == 0 -varying vec2 vMetallicReflectanceUV; -#endif -#if defined(BUMP) && BUMPDIRECTUV == 0 -varying vec2 vBumpUV; -#endif -#ifdef CLEARCOAT -#if defined(CLEARCOAT_TEXTURE) && CLEARCOAT_TEXTUREDIRECTUV == 0 -varying vec2 vClearCoatUV; -#endif -#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV == 0 -varying vec2 vClearCoatRoughnessUV; -#endif -#if defined(CLEARCOAT_BUMP) && CLEARCOAT_BUMPDIRECTUV == 0 -varying vec2 vClearCoatBumpUV; -#endif -#if defined(CLEARCOAT_TINT_TEXTURE) && CLEARCOAT_TINT_TEXTUREDIRECTUV == 0 -varying vec2 vClearCoatTintUV; -#endif -#endif -#ifdef SHEEN -#if defined(SHEEN_TEXTURE) && SHEEN_TEXTUREDIRECTUV == 0 -varying vec2 vSheenUV; -#endif -#if defined(SHEEN_TEXTURE_ROUGHNESS) && SHEEN_TEXTURE_ROUGHNESSDIRECTUV == 0 -varying vec2 vSheenRoughnessUV; -#endif -#endif -#ifdef ANISOTROPIC -#if defined(ANISOTROPIC_TEXTURE) && ANISOTROPIC_TEXTUREDIRECTUV == 0 -varying vec2 vAnisotropyUV; -#endif -#endif -#ifdef SUBSURFACE -#if defined(SS_THICKNESSANDMASK_TEXTURE) && SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 0 -varying vec2 vThicknessUV; -#endif -#endif - -varying vec3 vPositionW; -#if DEBUGMODE>0 -varying vec4 vClipSpacePosition; -#endif -#ifdef NORMAL -varying vec3 vNormalW; -#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX) -varying vec3 vEnvironmentIrradiance; -#include -#endif -#endif -#ifdef VERTEXCOLOR -varying vec4 vColor; -#endif -#include -#include -#include -#include<__decl__lightFragment>[0..maxSimultaneousLights] -#include -#include[0..maxSimultaneousMorphTargets] -#ifdef REFLECTIONMAP_SKYBOX -varying vec3 vPositionUVW; -#endif -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -varying vec3 vDirectionW; -#endif -#include -#define CUSTOM_VERTEX_DEFINITIONS -void main(void) { -#define CUSTOM_VERTEX_MAIN_BEGIN -vec3 positionUpdated=position; -#ifdef NORMAL -vec3 normalUpdated=normal; -#endif -#ifdef TANGENT -vec4 tangentUpdated=tangent; -#endif -#ifdef UV1 -vec2 uvUpdated=uv; -#endif -#include[0..maxSimultaneousMorphTargets] -#ifdef REFLECTIONMAP_SKYBOX -vPositionUVW=positionUpdated; -#endif -#define CUSTOM_VERTEX_UPDATE_POSITION -#define CUSTOM_VERTEX_UPDATE_NORMAL -#include -#if defined(PREPASS) && defined(PREPASS_VELOCITY) && !defined(BONES_VELOCITY_ENABLED) - -vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); -vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); -#endif -#include -vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); -vPositionW=vec3(worldPos); -#include -#ifdef NORMAL -mat3 normalWorld=mat3(finalWorld); -#if defined(INSTANCES) && defined(THIN_INSTANCES) -vNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2])); -vNormalW=normalize(normalWorld*vNormalW); -#else -#ifdef NONUNIFORMSCALING -normalWorld=transposeMat3(inverseMat3(normalWorld)); -#endif -vNormalW=normalize(normalWorld*normalUpdated); -#endif -#if defined(USESPHERICALFROMREFLECTIONMAP) && defined(USESPHERICALINVERTEX) -vec3 reflectionVector=vec3(reflectionMatrix*vec4(vNormalW,0)).xyz; -#ifdef REFLECTIONMAP_OPPOSITEZ -reflectionVector.z*=-1.0; -#endif -vEnvironmentIrradiance=computeEnvironmentIrradiance(reflectionVector); -#endif -#endif -#define CUSTOM_VERTEX_UPDATE_WORLDPOS -#ifdef MULTIVIEW -if (gl_ViewID_OVR == 0u) { -gl_Position=viewProjection*worldPos; -} else { -gl_Position=viewProjectionR*worldPos; -} -#else -gl_Position=viewProjection*worldPos; -#endif -#if DEBUGMODE>0 -vClipSpacePosition=gl_Position; -#endif -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0))); -#endif - -#ifndef UV1 -vec2 uvUpdated=vec2(0.,0.); -#endif -#ifndef UV2 -vec2 uv2=vec2(0.,0.); -#endif -#ifdef MAINUV1 -vMainUV1=uvUpdated; -#endif -#ifdef MAINUV2 -vMainUV2=uv2; -#endif -#if defined(ALBEDO) && ALBEDODIRECTUV == 0 -if (vAlbedoInfos.x == 0.) -{ -vAlbedoUV=vec2(albedoMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vAlbedoUV=vec2(albedoMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(DETAIL) && DETAILDIRECTUV == 0 -if (vDetailInfos.x == 0.) -{ -vDetailUV=vec2(detailMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vDetailUV=vec2(detailMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 -if (vAmbientInfos.x == 0.) -{ -vAmbientUV=vec2(ambientMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(OPACITY) && OPACITYDIRECTUV == 0 -if (vOpacityInfos.x == 0.) -{ -vOpacityUV=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 -if (vEmissiveInfos.x == 0.) -{ -vEmissiveUV=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 -if (vLightmapInfos.x == 0.) -{ -vLightmapUV=vec2(lightmapMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(REFLECTIVITY) && REFLECTIVITYDIRECTUV == 0 -if (vReflectivityInfos.x == 0.) -{ -vReflectivityUV=vec2(reflectivityMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(MICROSURFACEMAP) && MICROSURFACEMAPDIRECTUV == 0 -if (vMicroSurfaceSamplerInfos.x == 0.) -{ -vMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vMicroSurfaceSamplerUV=vec2(microSurfaceSamplerMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(METALLIC_REFLECTANCE) && METALLIC_REFLECTANCEDIRECTUV == 0 -if (vMetallicReflectanceInfos.x == 0.) -{ -vMetallicReflectanceUV=vec2(metallicReflectanceMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vMetallicReflectanceUV=vec2(metallicReflectanceMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(BUMP) && BUMPDIRECTUV == 0 -if (vBumpInfos.x == 0.) -{ -vBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#ifdef CLEARCOAT -#if defined(CLEARCOAT_TEXTURE) && CLEARCOAT_TEXTUREDIRECTUV == 0 -if (vClearCoatInfos.x == 0.) -{ -vClearCoatUV=vec2(clearCoatMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vClearCoatUV=vec2(clearCoatMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(CLEARCOAT_TEXTURE_ROUGHNESS) && CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV == 0 -if (vClearCoatInfos.z == 0.) -{ -vClearCoatRoughnessUV=vec2(clearCoatRoughnessMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vClearCoatRoughnessUV=vec2(clearCoatRoughnessMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(CLEARCOAT_BUMP) && CLEARCOAT_BUMPDIRECTUV == 0 -if (vClearCoatBumpInfos.x == 0.) -{ -vClearCoatBumpUV=vec2(clearCoatBumpMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vClearCoatBumpUV=vec2(clearCoatBumpMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(CLEARCOAT_TINT_TEXTURE) && CLEARCOAT_TINT_TEXTUREDIRECTUV == 0 -if (vClearCoatTintInfos.x == 0.) -{ -vClearCoatTintUV=vec2(clearCoatTintMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vClearCoatTintUV=vec2(clearCoatTintMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#endif -#ifdef SHEEN -#if defined(SHEEN_TEXTURE) && SHEEN_TEXTUREDIRECTUV == 0 -if (vSheenInfos.x == 0.) -{ -vSheenUV=vec2(sheenMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vSheenUV=vec2(sheenMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(SHEEN_TEXTURE_ROUGHNESS) && SHEEN_TEXTURE_ROUGHNESSDIRECTUV == 0 -if (vSheenInfos.z == 0.) -{ -vSheenRoughnessUV=vec2(sheenRoughnessMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vSheenRoughnessUV=vec2(sheenRoughnessMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#endif -#ifdef ANISOTROPIC -#if defined(ANISOTROPIC_TEXTURE) && ANISOTROPIC_TEXTUREDIRECTUV == 0 -if (vAnisotropyInfos.x == 0.) -{ -vAnisotropyUV=vec2(anisotropyMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vAnisotropyUV=vec2(anisotropyMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#endif -#ifdef SUBSURFACE -#if defined(SS_THICKNESSANDMASK_TEXTURE) && SS_THICKNESSANDMASK_TEXTUREDIRECTUV == 0 -if (vThicknessInfos.x == 0.) -{ -vThicknessUV=vec2(thicknessMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vThicknessUV=vec2(thicknessMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#endif - -#include - -#include - -#include - -#include[0..maxSimultaneousLights] - -#ifdef VERTEXCOLOR -vColor=color; -#endif - -#ifdef POINTSIZE -gl_PointSize=pointSize; -#endif - -#include -#define CUSTOM_VERTEX_MAIN_END -}`;je.a.ShadersStore.pbrVertexShader=b_;var aa=f(92),xr={effect:null,subMesh:null},js=function(r){function t(){var e=r.call(this)||this;return e.PBR=!0,e.NUM_SAMPLES="0",e.REALTIME_FILTERING=!1,e.MAINUV1=!1,e.MAINUV2=!1,e.UV1=!1,e.UV2=!1,e.ALBEDO=!1,e.GAMMAALBEDO=!1,e.ALBEDODIRECTUV=0,e.VERTEXCOLOR=!1,e.DETAIL=!1,e.DETAILDIRECTUV=0,e.DETAIL_NORMALBLENDMETHOD=0,e.AMBIENT=!1,e.AMBIENTDIRECTUV=0,e.AMBIENTINGRAYSCALE=!1,e.OPACITY=!1,e.VERTEXALPHA=!1,e.OPACITYDIRECTUV=0,e.OPACITYRGB=!1,e.ALPHATEST=!1,e.DEPTHPREPASS=!1,e.ALPHABLEND=!1,e.ALPHAFROMALBEDO=!1,e.ALPHATESTVALUE="0.5",e.SPECULAROVERALPHA=!1,e.RADIANCEOVERALPHA=!1,e.ALPHAFRESNEL=!1,e.LINEARALPHAFRESNEL=!1,e.PREMULTIPLYALPHA=!1,e.EMISSIVE=!1,e.EMISSIVEDIRECTUV=0,e.REFLECTIVITY=!1,e.REFLECTIVITYDIRECTUV=0,e.SPECULARTERM=!1,e.MICROSURFACEFROMREFLECTIVITYMAP=!1,e.MICROSURFACEAUTOMATIC=!1,e.LODBASEDMICROSFURACE=!1,e.MICROSURFACEMAP=!1,e.MICROSURFACEMAPDIRECTUV=0,e.METALLICWORKFLOW=!1,e.ROUGHNESSSTOREINMETALMAPALPHA=!1,e.ROUGHNESSSTOREINMETALMAPGREEN=!1,e.METALLNESSSTOREINMETALMAPBLUE=!1,e.AOSTOREINMETALMAPRED=!1,e.METALLIC_REFLECTANCE=!1,e.METALLIC_REFLECTANCEDIRECTUV=0,e.ENVIRONMENTBRDF=!1,e.ENVIRONMENTBRDF_RGBD=!1,e.NORMAL=!1,e.TANGENT=!1,e.BUMP=!1,e.BUMPDIRECTUV=0,e.OBJECTSPACE_NORMALMAP=!1,e.PARALLAX=!1,e.PARALLAXOCCLUSION=!1,e.NORMALXYSCALE=!0,e.LIGHTMAP=!1,e.LIGHTMAPDIRECTUV=0,e.USELIGHTMAPASSHADOWMAP=!1,e.GAMMALIGHTMAP=!1,e.RGBDLIGHTMAP=!1,e.REFLECTION=!1,e.REFLECTIONMAP_3D=!1,e.REFLECTIONMAP_SPHERICAL=!1,e.REFLECTIONMAP_PLANAR=!1,e.REFLECTIONMAP_CUBIC=!1,e.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,e.REFLECTIONMAP_PROJECTION=!1,e.REFLECTIONMAP_SKYBOX=!1,e.REFLECTIONMAP_EXPLICIT=!1,e.REFLECTIONMAP_EQUIRECTANGULAR=!1,e.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,e.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,e.INVERTCUBICMAP=!1,e.USESPHERICALFROMREFLECTIONMAP=!1,e.USEIRRADIANCEMAP=!1,e.SPHERICAL_HARMONICS=!1,e.USESPHERICALINVERTEX=!1,e.REFLECTIONMAP_OPPOSITEZ=!1,e.LODINREFLECTIONALPHA=!1,e.GAMMAREFLECTION=!1,e.RGBDREFLECTION=!1,e.LINEARSPECULARREFLECTION=!1,e.RADIANCEOCCLUSION=!1,e.HORIZONOCCLUSION=!1,e.INSTANCES=!1,e.THIN_INSTANCES=!1,e.PREPASS=!1,e.PREPASS_IRRADIANCE=!1,e.PREPASS_IRRADIANCE_INDEX=-1,e.PREPASS_ALBEDO=!1,e.PREPASS_ALBEDO_INDEX=-1,e.PREPASS_DEPTHNORMAL=!1,e.PREPASS_DEPTHNORMAL_INDEX=-1,e.PREPASS_POSITION=!1,e.PREPASS_POSITION_INDEX=-1,e.PREPASS_VELOCITY=!1,e.PREPASS_VELOCITY_INDEX=-1,e.PREPASS_REFLECTIVITY=!1,e.PREPASS_REFLECTIVITY_INDEX=-1,e.SCENE_MRT_COUNT=0,e.NUM_BONE_INFLUENCERS=0,e.BonesPerMesh=0,e.BONETEXTURE=!1,e.BONES_VELOCITY_ENABLED=!1,e.NONUNIFORMSCALING=!1,e.MORPHTARGETS=!1,e.MORPHTARGETS_NORMAL=!1,e.MORPHTARGETS_TANGENT=!1,e.MORPHTARGETS_UV=!1,e.NUM_MORPH_INFLUENCERS=0,e.IMAGEPROCESSING=!1,e.VIGNETTE=!1,e.VIGNETTEBLENDMODEMULTIPLY=!1,e.VIGNETTEBLENDMODEOPAQUE=!1,e.TONEMAPPING=!1,e.TONEMAPPING_ACES=!1,e.CONTRAST=!1,e.COLORCURVES=!1,e.COLORGRADING=!1,e.COLORGRADING3D=!1,e.SAMPLER3DGREENDEPTH=!1,e.SAMPLER3DBGRMAP=!1,e.IMAGEPROCESSINGPOSTPROCESS=!1,e.EXPOSURE=!1,e.MULTIVIEW=!1,e.USEPHYSICALLIGHTFALLOFF=!1,e.USEGLTFLIGHTFALLOFF=!1,e.TWOSIDEDLIGHTING=!1,e.SHADOWFLOAT=!1,e.CLIPPLANE=!1,e.CLIPPLANE2=!1,e.CLIPPLANE3=!1,e.CLIPPLANE4=!1,e.CLIPPLANE5=!1,e.CLIPPLANE6=!1,e.POINTSIZE=!1,e.FOG=!1,e.LOGARITHMICDEPTH=!1,e.FORCENORMALFORWARD=!1,e.SPECULARAA=!1,e.CLEARCOAT=!1,e.CLEARCOAT_DEFAULTIOR=!1,e.CLEARCOAT_TEXTURE=!1,e.CLEARCOAT_TEXTURE_ROUGHNESS=!1,e.CLEARCOAT_TEXTUREDIRECTUV=0,e.CLEARCOAT_TEXTURE_ROUGHNESSDIRECTUV=0,e.CLEARCOAT_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,e.CLEARCOAT_TEXTURE_ROUGHNESS_IDENTICAL=!1,e.CLEARCOAT_BUMP=!1,e.CLEARCOAT_BUMPDIRECTUV=0,e.CLEARCOAT_REMAP_F0=!0,e.CLEARCOAT_TINT=!1,e.CLEARCOAT_TINT_TEXTURE=!1,e.CLEARCOAT_TINT_TEXTUREDIRECTUV=0,e.ANISOTROPIC=!1,e.ANISOTROPIC_TEXTURE=!1,e.ANISOTROPIC_TEXTUREDIRECTUV=0,e.BRDF_V_HEIGHT_CORRELATED=!1,e.MS_BRDF_ENERGY_CONSERVATION=!1,e.SPECULAR_GLOSSINESS_ENERGY_CONSERVATION=!1,e.SHEEN=!1,e.SHEEN_TEXTURE=!1,e.SHEEN_TEXTURE_ROUGHNESS=!1,e.SHEEN_TEXTUREDIRECTUV=0,e.SHEEN_TEXTURE_ROUGHNESSDIRECTUV=0,e.SHEEN_LINKWITHALBEDO=!1,e.SHEEN_ROUGHNESS=!1,e.SHEEN_ALBEDOSCALING=!1,e.SHEEN_USE_ROUGHNESS_FROM_MAINTEXTURE=!1,e.SHEEN_TEXTURE_ROUGHNESS_IDENTICAL=!1,e.SUBSURFACE=!1,e.SS_REFRACTION=!1,e.SS_TRANSLUCENCY=!1,e.SS_SCATTERING=!1,e.SS_THICKNESSANDMASK_TEXTURE=!1,e.SS_THICKNESSANDMASK_TEXTUREDIRECTUV=0,e.SS_REFRACTIONMAP_3D=!1,e.SS_REFRACTIONMAP_OPPOSITEZ=!1,e.SS_LODINREFRACTIONALPHA=!1,e.SS_GAMMAREFRACTION=!1,e.SS_RGBDREFRACTION=!1,e.SS_LINEARSPECULARREFRACTION=!1,e.SS_LINKREFRACTIONTOTRANSPARENCY=!1,e.SS_ALBEDOFORREFRACTIONTINT=!1,e.SS_MASK_FROM_THICKNESS_TEXTURE=!1,e.SS_MASK_FROM_THICKNESS_TEXTURE_GLTF=!1,e.UNLIT=!1,e.DEBUGMODE=0,e.rebuild(),e}return Object(c.d)(t,r),t.prototype.reset=function(){r.prototype.reset.call(this),this.ALPHATESTVALUE="0.5",this.PBR=!0},t}(ia.a),mn=function(r){function t(e,n){var i=r.call(this,e,n)||this;return i._directIntensity=1,i._emissiveIntensity=1,i._environmentIntensity=1,i._specularIntensity=1,i._lightingInfos=new l.f(i._directIntensity,i._emissiveIntensity,i._environmentIntensity,i._specularIntensity),i._disableBumpMap=!1,i._albedoTexture=null,i._ambientTexture=null,i._ambientTextureStrength=1,i._ambientTextureImpactOnAnalyticalLights=t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,i._opacityTexture=null,i._reflectionTexture=null,i._emissiveTexture=null,i._reflectivityTexture=null,i._metallicTexture=null,i._metallic=null,i._roughness=null,i._metallicF0Factor=1,i._metallicReflectanceColor=O.a.White(),i._metallicReflectanceTexture=null,i._microSurfaceTexture=null,i._bumpTexture=null,i._lightmapTexture=null,i._ambientColor=new O.a(0,0,0),i._albedoColor=new O.a(1,1,1),i._reflectivityColor=new O.a(1,1,1),i._reflectionColor=new O.a(1,1,1),i._emissiveColor=new O.a(0,0,0),i._microSurface=.9,i._useLightmapAsShadowmap=!1,i._useHorizonOcclusion=!0,i._useRadianceOcclusion=!0,i._useAlphaFromAlbedoTexture=!1,i._useSpecularOverAlpha=!0,i._useMicroSurfaceFromReflectivityMapAlpha=!1,i._useRoughnessFromMetallicTextureAlpha=!0,i._useRoughnessFromMetallicTextureGreen=!1,i._useMetallnessFromMetallicTextureBlue=!1,i._useAmbientOcclusionFromMetallicTextureRed=!1,i._useAmbientInGrayScale=!1,i._useAutoMicroSurfaceFromReflectivityMap=!1,i._lightFalloff=t.LIGHTFALLOFF_PHYSICAL,i._useRadianceOverAlpha=!0,i._useObjectSpaceNormalMap=!1,i._useParallax=!1,i._useParallaxOcclusion=!1,i._parallaxScaleBias=.05,i._disableLighting=!1,i._maxSimultaneousLights=4,i._invertNormalMapX=!1,i._invertNormalMapY=!1,i._twoSidedLighting=!1,i._alphaCutOff=.4,i._forceAlphaTest=!1,i._useAlphaFresnel=!1,i._useLinearAlphaFresnel=!1,i._environmentBRDFTexture=null,i._forceIrradianceInFragment=!1,i._realTimeFiltering=!1,i._realTimeFilteringQuality=h.a.TEXTURE_FILTERING_QUALITY_LOW,i._forceNormalForward=!1,i._enableSpecularAntiAliasing=!1,i._imageProcessingObserver=null,i._renderTargets=new _i.a(16),i._globalAmbientColor=new O.a(0,0,0),i._useLogarithmicDepth=!1,i._unlit=!1,i._debugMode=0,i.debugMode=0,i.debugLimit=-1,i.debugFactor=1,i.clearCoat=new Pr(i._markAllSubMeshesAsTexturesDirty.bind(i)),i.anisotropy=new Cr(i._markAllSubMeshesAsTexturesDirty.bind(i)),i.brdf=new Fp(i._markAllSubMeshesAsMiscDirty.bind(i)),i.sheen=new lo(i._markAllSubMeshesAsTexturesDirty.bind(i)),i.detailMap=new aa.a(i._markAllSubMeshesAsTexturesDirty.bind(i)),i._rebuildInParallel=!1,i._attachImageProcessingConfiguration(null),i.getRenderTargetTextures=function(){return i._renderTargets.reset(),ht.a.ReflectionTextureEnabled&&i._reflectionTexture&&i._reflectionTexture.isRenderTarget&&i._renderTargets.push(i._reflectionTexture),i.subSurface.fillRenderTargetTextures(i._renderTargets),i._renderTargets},i._environmentBRDFTexture=oa.GetEnvironmentBRDFTexture(n),i.subSurface=new uo(i._markAllSubMeshesAsTexturesDirty.bind(i),i._markScenePrePassDirty.bind(i),n),i.prePassConfiguration=new zs.a,i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"realTimeFiltering",{get:function(){return this._realTimeFiltering},set:function(e){this._realTimeFiltering=e,this.markAsDirty(h.a.MATERIAL_TextureDirtyFlag)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realTimeFilteringQuality",{get:function(){return this._realTimeFilteringQuality},set:function(e){this._realTimeFilteringQuality=e,this.markAsDirty(h.a.MATERIAL_TextureDirtyFlag)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"canRenderToMRT",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._attachImageProcessingConfiguration=function(e){var n=this;e!==this._imageProcessingConfiguration&&(this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),this._imageProcessingConfiguration=e||this.getScene().imageProcessingConfiguration,this._imageProcessingConfiguration&&(this._imageProcessingObserver=this._imageProcessingConfiguration.onUpdateParameters.add(function(){n._markAllSubMeshesAsImageProcessingDirty()})))},Object.defineProperty(t.prototype,"hasRenderTargetTextures",{get:function(){return!!(ht.a.ReflectionTextureEnabled&&this._reflectionTexture&&this._reflectionTexture.isRenderTarget)||this.subSurface.hasRenderTargetTextures()},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PBRBaseMaterial"},Object.defineProperty(t.prototype,"useLogarithmicDepth",{get:function(){return this._useLogarithmicDepth},set:function(e){this._useLogarithmicDepth=e&&this.getScene().getEngine().getCaps().fragmentDepthSupported},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_disableAlphaBlending",{get:function(){return this.subSurface.disableAlphaBlending||this._transparencyMode===t.PBRMATERIAL_OPAQUE||this._transparencyMode===t.PBRMATERIAL_ALPHATEST},enumerable:!1,configurable:!0}),t.prototype.needAlphaBlending=function(){return!this._disableAlphaBlending&&(this.alpha<1||this._opacityTexture!=null||this._shouldUseAlphaFromAlbedoTexture())},t.prototype.needAlphaTesting=function(){return!!this._forceAlphaTest||!this.subSurface.disableAlphaBlending&&this._hasAlphaChannel()&&(this._transparencyMode==null||this._transparencyMode===t.PBRMATERIAL_ALPHATEST)},t.prototype._shouldUseAlphaFromAlbedoTexture=function(){return this._albedoTexture!=null&&this._albedoTexture.hasAlpha&&this._useAlphaFromAlbedoTexture&&this._transparencyMode!==t.PBRMATERIAL_OPAQUE},t.prototype._hasAlphaChannel=function(){return this._albedoTexture!=null&&this._albedoTexture.hasAlpha||this._opacityTexture!=null},t.prototype.getAlphaTestTexture=function(){return this._albedoTexture},t.prototype.isReadyForSubMesh=function(e,n,i){if(n.effect&&this.isFrozen&&n.effect._wasPreviouslyReady)return!0;n._materialDefines||(n._materialDefines=new js);var o=n._materialDefines;if(this._isReadyForSubMesh(n))return!0;var a=this.getScene(),s=a.getEngine();if(o._areTexturesDirty&&a.texturesEnabled){if(this._albedoTexture&&ht.a.DiffuseTextureEnabled&&!this._albedoTexture.isReadyOrNotBlocking()||this._ambientTexture&&ht.a.AmbientTextureEnabled&&!this._ambientTexture.isReadyOrNotBlocking()||this._opacityTexture&&ht.a.OpacityTextureEnabled&&!this._opacityTexture.isReadyOrNotBlocking())return!1;var d=this._getReflectionTexture();if(d&&ht.a.ReflectionTextureEnabled&&(!d.isReadyOrNotBlocking()||d.irradianceTexture&&!d.irradianceTexture.isReadyOrNotBlocking())||this._lightmapTexture&&ht.a.LightmapTextureEnabled&&!this._lightmapTexture.isReadyOrNotBlocking()||this._emissiveTexture&&ht.a.EmissiveTextureEnabled&&!this._emissiveTexture.isReadyOrNotBlocking())return!1;if(ht.a.SpecularTextureEnabled){if(this._metallicTexture){if(!this._metallicTexture.isReadyOrNotBlocking())return!1}else if(this._reflectivityTexture&&!this._reflectivityTexture.isReadyOrNotBlocking())return!1;if(this._metallicReflectanceTexture&&!this._metallicReflectanceTexture.isReadyOrNotBlocking()||this._microSurfaceTexture&&!this._microSurfaceTexture.isReadyOrNotBlocking())return!1}if(s.getCaps().standardDerivatives&&this._bumpTexture&&ht.a.BumpTextureEnabled&&!this._disableBumpMap&&!this._bumpTexture.isReady()||this._environmentBRDFTexture&&ht.a.ReflectionTextureEnabled&&!this._environmentBRDFTexture.isReady())return!1}if(!(this.subSurface.isReadyForSubMesh(o,a)&&this.clearCoat.isReadyForSubMesh(o,a,s,this._disableBumpMap)&&this.sheen.isReadyForSubMesh(o,a)&&this.anisotropy.isReadyForSubMesh(o,a)&&this.detailMap.isReadyForSubMesh(o,a))||o._areImageProcessingDirty&&this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.isReady())return!1;s.getCaps().standardDerivatives||e.isVerticesDataPresent(Me.b.NormalKind)||(e.createNormals(!0),u.a.Warn("PBRMaterial: Normals have been created for the mesh: "+e.name));var p=n.effect,y=o._areLightsDisposed,C=this._prepareEffect(e,o,this.onCompiled,this.onError,i,null,n.getRenderingMesh().hasThinInstances);if(C)if(this._onEffectCreatedObservable&&(xr.effect=C,xr.subMesh=n,this._onEffectCreatedObservable.notifyObservers(xr)),this.allowShaderHotSwapping&&p&&!C.isReady()){if(C=p,this._rebuildInParallel=!0,o.markAsUnprocessed(),y)return o._areLightsDisposed=!0,!1}else this._rebuildInParallel=!1,a.resetCachedMaterial(),n.setEffect(C,o),this.buildUniformLayout();return!(!n.effect||!n.effect.isReady())&&(o._renderId=a.getRenderId(),n.effect._wasPreviouslyReady=!0,!0)},t.prototype.isMetallicWorkflow=function(){return!(this._metallic==null&&this._roughness==null&&!this._metallicTexture)},t.prototype._prepareEffect=function(e,n,i,o,a,s,d){if(i===void 0&&(i=null),o===void 0&&(o=null),a===void 0&&(a=null),s===void 0&&(s=null),this._prepareDefines(e,n,a,s,d),!n.isDirty)return null;n.markAsProcessed();var p=this.getScene().getEngine(),y=new Ar.a,C=0;n.USESPHERICALINVERTEX&&y.addFallback(C++,"USESPHERICALINVERTEX"),n.FOG&&y.addFallback(C,"FOG"),n.SPECULARAA&&y.addFallback(C,"SPECULARAA"),n.POINTSIZE&&y.addFallback(C,"POINTSIZE"),n.LOGARITHMICDEPTH&&y.addFallback(C,"LOGARITHMICDEPTH"),n.PARALLAX&&y.addFallback(C,"PARALLAX"),n.PARALLAXOCCLUSION&&y.addFallback(C++,"PARALLAXOCCLUSION"),C=Cr.AddFallbacks(n,y,C),C=Cr.AddFallbacks(n,y,C),C=uo.AddFallbacks(n,y,C),C=lo.AddFallbacks(n,y,C),n.ENVIRONMENTBRDF&&y.addFallback(C++,"ENVIRONMENTBRDF"),n.TANGENT&&y.addFallback(C++,"TANGENT"),n.BUMP&&y.addFallback(C++,"BUMP"),C=tt.a.HandleFallbacksForShadows(n,y,this._maxSimultaneousLights,C++),n.SPECULARTERM&&y.addFallback(C++,"SPECULARTERM"),n.USESPHERICALFROMREFLECTIONMAP&&y.addFallback(C++,"USESPHERICALFROMREFLECTIONMAP"),n.USEIRRADIANCEMAP&&y.addFallback(C++,"USEIRRADIANCEMAP"),n.LIGHTMAP&&y.addFallback(C++,"LIGHTMAP"),n.NORMAL&&y.addFallback(C++,"NORMAL"),n.AMBIENT&&y.addFallback(C++,"AMBIENT"),n.EMISSIVE&&y.addFallback(C++,"EMISSIVE"),n.VERTEXCOLOR&&y.addFallback(C++,"VERTEXCOLOR"),n.MORPHTARGETS&&y.addFallback(C++,"MORPHTARGETS"),n.MULTIVIEW&&y.addFallback(0,"MULTIVIEW");var M=[Me.b.PositionKind];n.NORMAL&&M.push(Me.b.NormalKind),n.TANGENT&&M.push(Me.b.TangentKind),n.UV1&&M.push(Me.b.UVKind),n.UV2&&M.push(Me.b.UV2Kind),n.VERTEXCOLOR&&M.push(Me.b.ColorKind),tt.a.PrepareAttributesForBones(M,e,n,y),tt.a.PrepareAttributesForInstances(M,n),tt.a.PrepareAttributesForMorphTargets(M,e,n);var U="pbr",F=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vAlbedoColor","vReflectivityColor","vMetallicReflectanceFactors","vEmissiveColor","visibility","vReflectionColor","vFogInfos","vFogColor","pointSize","vAlbedoInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vReflectionPosition","vReflectionSize","vEmissiveInfos","vReflectivityInfos","vReflectionFilteringInfo","vMetallicReflectanceInfos","vMicroSurfaceSamplerInfos","vBumpInfos","vLightmapInfos","mBones","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","albedoMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","reflectivityMatrix","normalMatrix","microSurfaceSamplerMatrix","bumpMatrix","lightmapMatrix","metallicReflectanceMatrix","vLightingIntensity","logarithmicDepthConstant","vSphericalX","vSphericalY","vSphericalZ","vSphericalXX_ZZ","vSphericalYY_ZZ","vSphericalZZ","vSphericalXY","vSphericalYZ","vSphericalZX","vSphericalL00","vSphericalL1_1","vSphericalL10","vSphericalL11","vSphericalL2_2","vSphericalL2_1","vSphericalL20","vSphericalL21","vSphericalL22","vReflectionMicrosurfaceInfos","vTangentSpaceParams","boneTextureWidth","vDebugMode"],z=["albedoSampler","reflectivitySampler","ambientSampler","emissiveSampler","bumpSampler","lightmapSampler","opacitySampler","reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh","irradianceSampler","microSurfaceSampler","environmentBrdfSampler","boneSampler","metallicReflectanceSampler"],J=["Material","Scene"];aa.a.AddUniforms(F),aa.a.AddSamplers(z),uo.AddUniforms(F),uo.AddSamplers(z),Pr.AddUniforms(F),Pr.AddSamplers(z),Cr.AddUniforms(F),Cr.AddSamplers(z),lo.AddUniforms(F),lo.AddSamplers(z),zs.a.AddUniforms(F),zs.a.AddSamplers(F),yn.a&&(yn.a.PrepareUniforms(F,n),yn.a.PrepareSamplers(z,n)),tt.a.PrepareUniformsAndSamplersList({uniformsNames:F,uniformBuffersNames:J,samplers:z,defines:n,maxSimultaneousLights:this._maxSimultaneousLights});var ie={};this.customShaderNameResolve&&(U=this.customShaderNameResolve(U,F,J,z,n,M,ie));var se=n.toString();return p.createEffect(U,{attributes:M,uniformsNames:F,uniformBuffersNames:J,samplers:z,defines:se,fallbacks:y,onCompiled:i,onError:o,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:n.NUM_MORPH_INFLUENCERS},processFinalCode:ie.processFinalCode,multiTarget:n.PREPASS},p)},t.prototype._prepareDefines=function(e,n,i,o,a){i===void 0&&(i=null),o===void 0&&(o=null),a===void 0&&(a=!1);var s=this.getScene(),d=s.getEngine();if(tt.a.PrepareDefinesForLights(s,e,n,!0,this._maxSimultaneousLights,this._disableLighting),n._needNormals=!0,tt.a.PrepareDefinesForMultiview(s,n),tt.a.PrepareDefinesForPrePass(s,n,this.canRenderToMRT),n.METALLICWORKFLOW=this.isMetallicWorkflow(),n._areTexturesDirty){if(n._needUVs=!1,s.texturesEnabled){s.getEngine().getCaps().textureLOD&&(n.LODBASEDMICROSFURACE=!0),this._albedoTexture&&ht.a.DiffuseTextureEnabled?(tt.a.PrepareDefinesForMergedUV(this._albedoTexture,n,"ALBEDO"),n.GAMMAALBEDO=this._albedoTexture.gammaSpace):n.ALBEDO=!1,this._ambientTexture&&ht.a.AmbientTextureEnabled?(tt.a.PrepareDefinesForMergedUV(this._ambientTexture,n,"AMBIENT"),n.AMBIENTINGRAYSCALE=this._useAmbientInGrayScale):n.AMBIENT=!1,this._opacityTexture&&ht.a.OpacityTextureEnabled?(tt.a.PrepareDefinesForMergedUV(this._opacityTexture,n,"OPACITY"),n.OPACITYRGB=this._opacityTexture.getAlphaFromRGB):n.OPACITY=!1;var p=this._getReflectionTexture();if(p&&ht.a.ReflectionTextureEnabled){switch(n.REFLECTION=!0,n.GAMMAREFLECTION=p.gammaSpace,n.RGBDREFLECTION=p.isRGBD,n.REFLECTIONMAP_OPPOSITEZ=this.getScene().useRightHandedSystem?!p.invertZ:p.invertZ,n.LODINREFLECTIONALPHA=p.lodLevelInAlpha,n.LINEARSPECULARREFLECTION=p.linearSpecularLOD,this.realTimeFiltering&&this.realTimeFilteringQuality>0?(n.NUM_SAMPLES=""+this.realTimeFilteringQuality,d.webGLVersion>1&&(n.NUM_SAMPLES=n.NUM_SAMPLES+"u"),n.REALTIME_FILTERING=!0):n.REALTIME_FILTERING=!1,p.coordinatesMode===we.a.INVCUBIC_MODE&&(n.INVERTCUBICMAP=!0),n.REFLECTIONMAP_3D=p.isCube,n.REFLECTIONMAP_CUBIC=!1,n.REFLECTIONMAP_EXPLICIT=!1,n.REFLECTIONMAP_PLANAR=!1,n.REFLECTIONMAP_PROJECTION=!1,n.REFLECTIONMAP_SKYBOX=!1,n.REFLECTIONMAP_SPHERICAL=!1,n.REFLECTIONMAP_EQUIRECTANGULAR=!1,n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,p.coordinatesMode){case we.a.EXPLICIT_MODE:n.REFLECTIONMAP_EXPLICIT=!0;break;case we.a.PLANAR_MODE:n.REFLECTIONMAP_PLANAR=!0;break;case we.a.PROJECTION_MODE:n.REFLECTIONMAP_PROJECTION=!0;break;case we.a.SKYBOX_MODE:n.REFLECTIONMAP_SKYBOX=!0;break;case we.a.SPHERICAL_MODE:n.REFLECTIONMAP_SPHERICAL=!0;break;case we.a.EQUIRECTANGULAR_MODE:n.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case we.a.FIXED_EQUIRECTANGULAR_MODE:n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case we.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;case we.a.CUBIC_MODE:case we.a.INVCUBIC_MODE:default:n.REFLECTIONMAP_CUBIC=!0,n.USE_LOCAL_REFLECTIONMAP_CUBIC=!!p.boundingBoxSize}p.coordinatesMode!==we.a.SKYBOX_MODE&&(p.irradianceTexture?(n.USEIRRADIANCEMAP=!0,n.USESPHERICALFROMREFLECTIONMAP=!1):p.isCube&&(n.USESPHERICALFROMREFLECTIONMAP=!0,n.USEIRRADIANCEMAP=!1,this._forceIrradianceInFragment||this.realTimeFiltering||s.getEngine().getCaps().maxVaryingVectors<=8?n.USESPHERICALINVERTEX=!1:n.USESPHERICALINVERTEX=!0))}else n.REFLECTION=!1,n.REFLECTIONMAP_3D=!1,n.REFLECTIONMAP_SPHERICAL=!1,n.REFLECTIONMAP_PLANAR=!1,n.REFLECTIONMAP_CUBIC=!1,n.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,n.REFLECTIONMAP_PROJECTION=!1,n.REFLECTIONMAP_SKYBOX=!1,n.REFLECTIONMAP_EXPLICIT=!1,n.REFLECTIONMAP_EQUIRECTANGULAR=!1,n.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,n.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,n.INVERTCUBICMAP=!1,n.USESPHERICALFROMREFLECTIONMAP=!1,n.USEIRRADIANCEMAP=!1,n.USESPHERICALINVERTEX=!1,n.REFLECTIONMAP_OPPOSITEZ=!1,n.LODINREFLECTIONALPHA=!1,n.GAMMAREFLECTION=!1,n.RGBDREFLECTION=!1,n.LINEARSPECULARREFLECTION=!1;this._lightmapTexture&&ht.a.LightmapTextureEnabled?(tt.a.PrepareDefinesForMergedUV(this._lightmapTexture,n,"LIGHTMAP"),n.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,n.GAMMALIGHTMAP=this._lightmapTexture.gammaSpace,n.RGBDLIGHTMAP=this._lightmapTexture.isRGBD):n.LIGHTMAP=!1,this._emissiveTexture&&ht.a.EmissiveTextureEnabled?tt.a.PrepareDefinesForMergedUV(this._emissiveTexture,n,"EMISSIVE"):n.EMISSIVE=!1,ht.a.SpecularTextureEnabled?(this._metallicTexture?(tt.a.PrepareDefinesForMergedUV(this._metallicTexture,n,"REFLECTIVITY"),n.ROUGHNESSSTOREINMETALMAPALPHA=this._useRoughnessFromMetallicTextureAlpha,n.ROUGHNESSSTOREINMETALMAPGREEN=!this._useRoughnessFromMetallicTextureAlpha&&this._useRoughnessFromMetallicTextureGreen,n.METALLNESSSTOREINMETALMAPBLUE=this._useMetallnessFromMetallicTextureBlue,n.AOSTOREINMETALMAPRED=this._useAmbientOcclusionFromMetallicTextureRed):this._reflectivityTexture?(tt.a.PrepareDefinesForMergedUV(this._reflectivityTexture,n,"REFLECTIVITY"),n.MICROSURFACEFROMREFLECTIVITYMAP=this._useMicroSurfaceFromReflectivityMapAlpha,n.MICROSURFACEAUTOMATIC=this._useAutoMicroSurfaceFromReflectivityMap):n.REFLECTIVITY=!1,this._metallicReflectanceTexture?tt.a.PrepareDefinesForMergedUV(this._metallicReflectanceTexture,n,"METALLIC_REFLECTANCE"):n.METALLIC_REFLECTANCE=!1,this._microSurfaceTexture?tt.a.PrepareDefinesForMergedUV(this._microSurfaceTexture,n,"MICROSURFACEMAP"):n.MICROSURFACEMAP=!1):(n.REFLECTIVITY=!1,n.MICROSURFACEMAP=!1),s.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&ht.a.BumpTextureEnabled&&!this._disableBumpMap?(tt.a.PrepareDefinesForMergedUV(this._bumpTexture,n,"BUMP"),this._useParallax&&this._albedoTexture&&ht.a.DiffuseTextureEnabled?(n.PARALLAX=!0,n.PARALLAXOCCLUSION=!!this._useParallaxOcclusion):n.PARALLAX=!1,n.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap):n.BUMP=!1,this._environmentBRDFTexture&&ht.a.ReflectionTextureEnabled?(n.ENVIRONMENTBRDF=!0,n.ENVIRONMENTBRDF_RGBD=this._environmentBRDFTexture.isRGBD):(n.ENVIRONMENTBRDF=!1,n.ENVIRONMENTBRDF_RGBD=!1),this._shouldUseAlphaFromAlbedoTexture()?n.ALPHAFROMALBEDO=!0:n.ALPHAFROMALBEDO=!1}n.SPECULAROVERALPHA=this._useSpecularOverAlpha,this._lightFalloff===t.LIGHTFALLOFF_STANDARD?(n.USEPHYSICALLIGHTFALLOFF=!1,n.USEGLTFLIGHTFALLOFF=!1):this._lightFalloff===t.LIGHTFALLOFF_GLTF?(n.USEPHYSICALLIGHTFALLOFF=!1,n.USEGLTFLIGHTFALLOFF=!0):(n.USEPHYSICALLIGHTFALLOFF=!0,n.USEGLTFLIGHTFALLOFF=!1),n.RADIANCEOVERALPHA=this._useRadianceOverAlpha,!this.backFaceCulling&&this._twoSidedLighting?n.TWOSIDEDLIGHTING=!0:n.TWOSIDEDLIGHTING=!1,n.SPECULARAA=s.getEngine().getCaps().standardDerivatives&&this._enableSpecularAntiAliasing}(n._areTexturesDirty||n._areMiscDirty)&&(n.ALPHATESTVALUE=this._alphaCutOff+(this._alphaCutOff%1==0?".":""),n.PREMULTIPLYALPHA=this.alphaMode===h.a.ALPHA_PREMULTIPLIED||this.alphaMode===h.a.ALPHA_PREMULTIPLIED_PORTERDUFF,n.ALPHABLEND=this.needAlphaBlendingForMesh(e),n.ALPHAFRESNEL=this._useAlphaFresnel||this._useLinearAlphaFresnel,n.LINEARALPHAFRESNEL=this._useLinearAlphaFresnel),n._areImageProcessingDirty&&this._imageProcessingConfiguration&&this._imageProcessingConfiguration.prepareDefines(n),n.FORCENORMALFORWARD=this._forceNormalForward,n.RADIANCEOCCLUSION=this._useRadianceOcclusion,n.HORIZONOCCLUSION=this._useHorizonOcclusion,n._areMiscDirty&&(tt.a.PrepareDefinesForMisc(e,s,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(e)||this._forceAlphaTest,n),n.UNLIT=this._unlit||(this.pointsCloud||this.wireframe)&&!e.isVerticesDataPresent(Me.b.NormalKind),n.DEBUGMODE=this._debugMode),this.detailMap.prepareDefines(n,s),this.subSurface.prepareDefines(n,s),this.clearCoat.prepareDefines(n,s),this.anisotropy.prepareDefines(n,e,s),this.brdf.prepareDefines(n),this.sheen.prepareDefines(n,s),tt.a.PrepareDefinesForFrameBoundValues(s,d,n,!!i,o,a),tt.a.PrepareDefinesForAttributes(e,n,!0,!0,!0,this._transparencyMode!==t.PBRMATERIAL_OPAQUE)},t.prototype.forceCompilation=function(e,n,i){var o=this,a=Object(c.a)({clipPlane:!1,useInstances:!1},i),s=new js,d=this._prepareEffect(e,s,void 0,void 0,a.useInstances,a.clipPlane,e.hasThinInstances);this._onEffectCreatedObservable&&(xr.effect=d,xr.subMesh=null,this._onEffectCreatedObservable.notifyObservers(xr)),d.isReady()?n&&n(this):d.onCompileObservable.add(function(){n&&n(o)})},t.prototype.buildUniformLayout=function(){var e=this._uniformBuffer;e.addUniform("vAlbedoInfos",2),e.addUniform("vAmbientInfos",4),e.addUniform("vOpacityInfos",2),e.addUniform("vEmissiveInfos",2),e.addUniform("vLightmapInfos",2),e.addUniform("vReflectivityInfos",3),e.addUniform("vMicroSurfaceSamplerInfos",2),e.addUniform("vReflectionInfos",2),e.addUniform("vReflectionFilteringInfo",2),e.addUniform("vReflectionPosition",3),e.addUniform("vReflectionSize",3),e.addUniform("vBumpInfos",3),e.addUniform("albedoMatrix",16),e.addUniform("ambientMatrix",16),e.addUniform("opacityMatrix",16),e.addUniform("emissiveMatrix",16),e.addUniform("lightmapMatrix",16),e.addUniform("reflectivityMatrix",16),e.addUniform("microSurfaceSamplerMatrix",16),e.addUniform("bumpMatrix",16),e.addUniform("vTangentSpaceParams",2),e.addUniform("reflectionMatrix",16),e.addUniform("vReflectionColor",3),e.addUniform("vAlbedoColor",4),e.addUniform("vLightingIntensity",4),e.addUniform("vReflectionMicrosurfaceInfos",3),e.addUniform("pointSize",1),e.addUniform("vReflectivityColor",4),e.addUniform("vEmissiveColor",3),e.addUniform("visibility",1),e.addUniform("vMetallicReflectanceFactors",4),e.addUniform("vMetallicReflectanceInfos",2),e.addUniform("metallicReflectanceMatrix",16),Pr.PrepareUniformBuffer(e),Cr.PrepareUniformBuffer(e),lo.PrepareUniformBuffer(e),uo.PrepareUniformBuffer(e),aa.a.PrepareUniformBuffer(e),e.create()},t.prototype.unbind=function(){if(this._activeEffect){var e=!1;this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&(this._activeEffect.setTexture("reflection2DSampler",null),e=!0),this.subSurface.unbind(this._activeEffect)&&(e=!0),e&&this._markAllSubMeshesAsTexturesDirty()}r.prototype.unbind.call(this)},t.prototype.bindForSubMesh=function(e,n,i){var o=this.getScene(),a=i._materialDefines;if(a){var s=i.effect;if(s){this._activeEffect=s,a.INSTANCES&&!a.THIN_INSTANCES||this.bindOnlyWorldMatrix(e),this.prePassConfiguration.bindForSubMesh(this._activeEffect,o,n,e,this.isFrozen),a.OBJECTSPACE_NORMALMAP&&(e.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var d=this._mustRebind(o,s,n.visibility);tt.a.BindBonesParameters(n,this._activeEffect,this.prePassConfiguration);var p=null,y=this._uniformBuffer;if(d){var C=o.getEngine();if(y.bindToEffect(s,"Material"),this.bindViewProjection(s),p=this._getReflectionTexture(),!y.useUbo||!this.isFrozen||!y.isSync){if(o.texturesEnabled){if(this._albedoTexture&&ht.a.DiffuseTextureEnabled&&(y.updateFloat2("vAlbedoInfos",this._albedoTexture.coordinatesIndex,this._albedoTexture.level),tt.a.BindTextureMatrix(this._albedoTexture,y,"albedo")),this._ambientTexture&&ht.a.AmbientTextureEnabled&&(y.updateFloat4("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level,this._ambientTextureStrength,this._ambientTextureImpactOnAnalyticalLights),tt.a.BindTextureMatrix(this._ambientTexture,y,"ambient")),this._opacityTexture&&ht.a.OpacityTextureEnabled&&(y.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),tt.a.BindTextureMatrix(this._opacityTexture,y,"opacity")),p&&ht.a.ReflectionTextureEnabled){if(y.updateMatrix("reflectionMatrix",p.getReflectionTextureMatrix()),y.updateFloat2("vReflectionInfos",p.level,0),p.boundingBoxSize){var M=p;y.updateVector3("vReflectionPosition",M.boundingBoxPosition),y.updateVector3("vReflectionSize",M.boundingBoxSize)}if(this.realTimeFiltering){var U=p.getSize().width;y.updateFloat2("vReflectionFilteringInfo",U,$.a.Log2(U))}if(!a.USEIRRADIANCEMAP){var F=p.sphericalPolynomial;if(a.USESPHERICALFROMREFLECTIONMAP&&F)if(a.SPHERICAL_HARMONICS){var z=F.preScaledHarmonics;this._activeEffect.setVector3("vSphericalL00",z.l00),this._activeEffect.setVector3("vSphericalL1_1",z.l1_1),this._activeEffect.setVector3("vSphericalL10",z.l10),this._activeEffect.setVector3("vSphericalL11",z.l11),this._activeEffect.setVector3("vSphericalL2_2",z.l2_2),this._activeEffect.setVector3("vSphericalL2_1",z.l2_1),this._activeEffect.setVector3("vSphericalL20",z.l20),this._activeEffect.setVector3("vSphericalL21",z.l21),this._activeEffect.setVector3("vSphericalL22",z.l22)}else this._activeEffect.setFloat3("vSphericalX",F.x.x,F.x.y,F.x.z),this._activeEffect.setFloat3("vSphericalY",F.y.x,F.y.y,F.y.z),this._activeEffect.setFloat3("vSphericalZ",F.z.x,F.z.y,F.z.z),this._activeEffect.setFloat3("vSphericalXX_ZZ",F.xx.x-F.zz.x,F.xx.y-F.zz.y,F.xx.z-F.zz.z),this._activeEffect.setFloat3("vSphericalYY_ZZ",F.yy.x-F.zz.x,F.yy.y-F.zz.y,F.yy.z-F.zz.z),this._activeEffect.setFloat3("vSphericalZZ",F.zz.x,F.zz.y,F.zz.z),this._activeEffect.setFloat3("vSphericalXY",F.xy.x,F.xy.y,F.xy.z),this._activeEffect.setFloat3("vSphericalYZ",F.yz.x,F.yz.y,F.yz.z),this._activeEffect.setFloat3("vSphericalZX",F.zx.x,F.zx.y,F.zx.z)}y.updateFloat3("vReflectionMicrosurfaceInfos",p.getSize().width,p.lodGenerationScale,p.lodGenerationOffset)}this._emissiveTexture&&ht.a.EmissiveTextureEnabled&&(y.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),tt.a.BindTextureMatrix(this._emissiveTexture,y,"emissive")),this._lightmapTexture&&ht.a.LightmapTextureEnabled&&(y.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),tt.a.BindTextureMatrix(this._lightmapTexture,y,"lightmap")),ht.a.SpecularTextureEnabled&&(this._metallicTexture?(y.updateFloat3("vReflectivityInfos",this._metallicTexture.coordinatesIndex,this._metallicTexture.level,this._ambientTextureStrength),tt.a.BindTextureMatrix(this._metallicTexture,y,"reflectivity")):this._reflectivityTexture&&(y.updateFloat3("vReflectivityInfos",this._reflectivityTexture.coordinatesIndex,this._reflectivityTexture.level,1),tt.a.BindTextureMatrix(this._reflectivityTexture,y,"reflectivity")),this._metallicReflectanceTexture&&(y.updateFloat2("vMetallicReflectanceInfos",this._metallicReflectanceTexture.coordinatesIndex,this._metallicReflectanceTexture.level),tt.a.BindTextureMatrix(this._metallicReflectanceTexture,y,"metallicReflectance")),this._microSurfaceTexture&&(y.updateFloat2("vMicroSurfaceSamplerInfos",this._microSurfaceTexture.coordinatesIndex,this._microSurfaceTexture.level),tt.a.BindTextureMatrix(this._microSurfaceTexture,y,"microSurfaceSampler"))),this._bumpTexture&&C.getCaps().standardDerivatives&&ht.a.BumpTextureEnabled&&!this._disableBumpMap&&(y.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,this._bumpTexture.level,this._parallaxScaleBias),tt.a.BindTextureMatrix(this._bumpTexture,y,"bump"),o._mirroredCameraPosition?y.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):y.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1))}if(this.pointsCloud&&y.updateFloat("pointSize",this.pointSize),a.METALLICWORKFLOW){O.c.Color3[0].r=this._metallic===void 0||this._metallic===null?1:this._metallic,O.c.Color3[0].g=this._roughness===void 0||this._roughness===null?1:this._roughness,y.updateColor4("vReflectivityColor",O.c.Color3[0],1);var J=this.subSurface.indexOfRefraction,ie=Math.pow((J-1)/(J+1),2);this._metallicReflectanceColor.scaleToRef(ie*this._metallicF0Factor,O.c.Color3[0]);var se=this._metallicF0Factor;y.updateColor4("vMetallicReflectanceFactors",O.c.Color3[0],se)}else y.updateColor4("vReflectivityColor",this._reflectivityColor,this._microSurface);y.updateColor3("vEmissiveColor",ht.a.EmissiveTextureEnabled?this._emissiveColor:O.a.BlackReadOnly),y.updateColor3("vReflectionColor",this._reflectionColor),!a.SS_REFRACTION&&this.subSurface.linkRefractionWithTransparency?y.updateColor4("vAlbedoColor",this._albedoColor,1):y.updateColor4("vAlbedoColor",this._albedoColor,this.alpha),this._lightingInfos.x=this._directIntensity,this._lightingInfos.y=this._emissiveIntensity,this._lightingInfos.z=this._environmentIntensity*o.environmentIntensity,this._lightingInfos.w=this._specularIntensity,y.updateVector4("vLightingIntensity",this._lightingInfos)}y.updateFloat("visibility",n.visibility),o.texturesEnabled&&(this._albedoTexture&&ht.a.DiffuseTextureEnabled&&y.setTexture("albedoSampler",this._albedoTexture),this._ambientTexture&&ht.a.AmbientTextureEnabled&&y.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&ht.a.OpacityTextureEnabled&&y.setTexture("opacitySampler",this._opacityTexture),p&&ht.a.ReflectionTextureEnabled&&(a.LODBASEDMICROSFURACE?y.setTexture("reflectionSampler",p):(y.setTexture("reflectionSampler",p._lodTextureMid||p),y.setTexture("reflectionSamplerLow",p._lodTextureLow||p),y.setTexture("reflectionSamplerHigh",p._lodTextureHigh||p)),a.USEIRRADIANCEMAP&&y.setTexture("irradianceSampler",p.irradianceTexture)),a.ENVIRONMENTBRDF&&y.setTexture("environmentBrdfSampler",this._environmentBRDFTexture),this._emissiveTexture&&ht.a.EmissiveTextureEnabled&&y.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&ht.a.LightmapTextureEnabled&&y.setTexture("lightmapSampler",this._lightmapTexture),ht.a.SpecularTextureEnabled&&(this._metallicTexture?y.setTexture("reflectivitySampler",this._metallicTexture):this._reflectivityTexture&&y.setTexture("reflectivitySampler",this._reflectivityTexture),this._metallicReflectanceTexture&&y.setTexture("metallicReflectanceSampler",this._metallicReflectanceTexture),this._microSurfaceTexture&&y.setTexture("microSurfaceSampler",this._microSurfaceTexture)),this._bumpTexture&&C.getCaps().standardDerivatives&&ht.a.BumpTextureEnabled&&!this._disableBumpMap&&y.setTexture("bumpSampler",this._bumpTexture)),this.detailMap.bindForSubMesh(y,o,this.isFrozen),this.subSurface.bindForSubMesh(y,o,C,this.isFrozen,a.LODBASEDMICROSFURACE,this.realTimeFiltering),this.clearCoat.bindForSubMesh(y,o,C,this._disableBumpMap,this.isFrozen,this._invertNormalMapX,this._invertNormalMapY,i),this.anisotropy.bindForSubMesh(y,o,this.isFrozen),this.sheen.bindForSubMesh(y,o,this.isFrozen,i),tt.a.BindClipPlane(this._activeEffect,o),o.ambientColor.multiplyToRef(this._ambientColor,this._globalAmbientColor);var ce=o._forcedViewPosition?o._forcedViewPosition:o._mirroredCameraPosition?o._mirroredCameraPosition:o.activeCamera.globalPosition,ue=o.useRightHandedSystem===(o._mirroredCameraPosition!=null);s.setFloat4("vEyePosition",ce.x,ce.y,ce.z,ue?-1:1),s.setColor3("vAmbientColor",this._globalAmbientColor),s.setFloat2("vDebugMode",this.debugLimit,this.debugFactor)}!d&&this.isFrozen||(o.lightsEnabled&&!this._disableLighting&&tt.a.BindLights(o,n,this._activeEffect,a,this._maxSimultaneousLights,this._rebuildInParallel),(o.fogEnabled&&n.applyFog&&o.fogMode!==_e.a.FOGMODE_NONE||p)&&this.bindView(s),tt.a.BindFogParameters(o,n,this._activeEffect,!0),a.NUM_MORPH_INFLUENCERS&&tt.a.BindMorphTargetParameters(n,this._activeEffect),this._imageProcessingConfiguration.bind(this._activeEffect),tt.a.BindLogDepth(a,this._activeEffect,o)),y.update(),this._afterBind(n,this._activeEffect)}}},t.prototype.getAnimatables=function(){var e=[];return this._albedoTexture&&this._albedoTexture.animations&&this._albedoTexture.animations.length>0&&e.push(this._albedoTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&e.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&e.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&e.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&e.push(this._emissiveTexture),this._metallicTexture&&this._metallicTexture.animations&&this._metallicTexture.animations.length>0?e.push(this._metallicTexture):this._reflectivityTexture&&this._reflectivityTexture.animations&&this._reflectivityTexture.animations.length>0&&e.push(this._reflectivityTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&e.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&e.push(this._lightmapTexture),this.detailMap.getAnimatables(e),this.subSurface.getAnimatables(e),this.clearCoat.getAnimatables(e),this.sheen.getAnimatables(e),this.anisotropy.getAnimatables(e),e},t.prototype._getReflectionTexture=function(){return this._reflectionTexture?this._reflectionTexture:this.getScene().environmentTexture},t.prototype.getActiveTextures=function(){var e=r.prototype.getActiveTextures.call(this);return this._albedoTexture&&e.push(this._albedoTexture),this._ambientTexture&&e.push(this._ambientTexture),this._opacityTexture&&e.push(this._opacityTexture),this._reflectionTexture&&e.push(this._reflectionTexture),this._emissiveTexture&&e.push(this._emissiveTexture),this._reflectivityTexture&&e.push(this._reflectivityTexture),this._metallicTexture&&e.push(this._metallicTexture),this._metallicReflectanceTexture&&e.push(this._metallicReflectanceTexture),this._microSurfaceTexture&&e.push(this._microSurfaceTexture),this._bumpTexture&&e.push(this._bumpTexture),this._lightmapTexture&&e.push(this._lightmapTexture),this.detailMap.getActiveTextures(e),this.subSurface.getActiveTextures(e),this.clearCoat.getActiveTextures(e),this.sheen.getActiveTextures(e),this.anisotropy.getActiveTextures(e),e},t.prototype.hasTexture=function(e){return!!r.prototype.hasTexture.call(this,e)||this._albedoTexture===e||this._ambientTexture===e||this._opacityTexture===e||this._reflectionTexture===e||this._reflectivityTexture===e||this._metallicTexture===e||this._metallicReflectanceTexture===e||this._microSurfaceTexture===e||this._bumpTexture===e||this._lightmapTexture===e||this.detailMap.hasTexture(e)||this.subSurface.hasTexture(e)||this.clearCoat.hasTexture(e)||this.sheen.hasTexture(e)||this.anisotropy.hasTexture(e)},t.prototype.setPrePassRenderer=function(e){if(this.subSurface.isScatteringEnabled){var n=this.getScene().enableSubSurfaceForPrePass();return n&&(n.enabled=!0),!0}return!1},t.prototype.dispose=function(e,n){var i,o,a,s,d,p,y,C,M,U,F;n&&(this._environmentBRDFTexture&&this.getScene().environmentBRDFTexture!==this._environmentBRDFTexture&&this._environmentBRDFTexture.dispose(),(i=this._albedoTexture)===null||i===void 0||i.dispose(),(o=this._ambientTexture)===null||o===void 0||o.dispose(),(a=this._opacityTexture)===null||a===void 0||a.dispose(),(s=this._reflectionTexture)===null||s===void 0||s.dispose(),(d=this._emissiveTexture)===null||d===void 0||d.dispose(),(p=this._metallicTexture)===null||p===void 0||p.dispose(),(y=this._reflectivityTexture)===null||y===void 0||y.dispose(),(C=this._bumpTexture)===null||C===void 0||C.dispose(),(M=this._lightmapTexture)===null||M===void 0||M.dispose(),(U=this._metallicReflectanceTexture)===null||U===void 0||U.dispose(),(F=this._microSurfaceTexture)===null||F===void 0||F.dispose()),this.detailMap.dispose(n),this.subSurface.dispose(n),this.clearCoat.dispose(n),this.sheen.dispose(n),this.anisotropy.dispose(n),this._renderTargets.dispose(),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),r.prototype.dispose.call(this,e,n)},t.PBRMATERIAL_OPAQUE=Ht.a.MATERIAL_OPAQUE,t.PBRMATERIAL_ALPHATEST=Ht.a.MATERIAL_ALPHATEST,t.PBRMATERIAL_ALPHABLEND=Ht.a.MATERIAL_ALPHABLEND,t.PBRMATERIAL_ALPHATESTANDBLEND=Ht.a.MATERIAL_ALPHATESTANDBLEND,t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=0,t.LIGHTFALLOFF_PHYSICAL=0,t.LIGHTFALLOFF_GLTF=1,t.LIGHTFALLOFF_STANDARD=2,Object(c.c)([Object(L.i)()],t.prototype,"_imageProcessingConfiguration",void 0),Object(c.c)([Object(L.b)("_markAllSubMeshesAsMiscDirty")],t.prototype,"debugMode",void 0),Object(c.c)([Object(L.c)()],t.prototype,"useLogarithmicDepth",null),t}(ra.a),ho=function(r){function t(e,n){var i=r.call(this,e,n)||this;return i.directIntensity=1,i.emissiveIntensity=1,i.environmentIntensity=1,i.specularIntensity=1,i.disableBumpMap=!1,i.ambientTextureStrength=1,i.ambientTextureImpactOnAnalyticalLights=t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,i.metallicF0Factor=1,i.metallicReflectanceColor=O.a.White(),i.ambientColor=new O.a(0,0,0),i.albedoColor=new O.a(1,1,1),i.reflectivityColor=new O.a(1,1,1),i.reflectionColor=new O.a(1,1,1),i.emissiveColor=new O.a(0,0,0),i.microSurface=1,i.useLightmapAsShadowmap=!1,i.useAlphaFromAlbedoTexture=!1,i.forceAlphaTest=!1,i.alphaCutOff=.4,i.useSpecularOverAlpha=!0,i.useMicroSurfaceFromReflectivityMapAlpha=!1,i.useRoughnessFromMetallicTextureAlpha=!0,i.useRoughnessFromMetallicTextureGreen=!1,i.useMetallnessFromMetallicTextureBlue=!1,i.useAmbientOcclusionFromMetallicTextureRed=!1,i.useAmbientInGrayScale=!1,i.useAutoMicroSurfaceFromReflectivityMap=!1,i.useRadianceOverAlpha=!0,i.useObjectSpaceNormalMap=!1,i.useParallax=!1,i.useParallaxOcclusion=!1,i.parallaxScaleBias=.05,i.disableLighting=!1,i.forceIrradianceInFragment=!1,i.maxSimultaneousLights=4,i.invertNormalMapX=!1,i.invertNormalMapY=!1,i.twoSidedLighting=!1,i.useAlphaFresnel=!1,i.useLinearAlphaFresnel=!1,i.environmentBRDFTexture=null,i.forceNormalForward=!1,i.enableSpecularAntiAliasing=!1,i.useHorizonOcclusion=!0,i.useRadianceOcclusion=!0,i.unlit=!1,i._environmentBRDFTexture=oa.GetEnvironmentBRDFTexture(n),i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"refractionTexture",{get:function(){return this.subSurface.refractionTexture},set:function(e){this.subSurface.refractionTexture=e,e?this.subSurface.isRefractionEnabled=!0:this.subSurface.linkRefractionWithTransparency||(this.subSurface.isRefractionEnabled=!1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"indexOfRefraction",{get:function(){return this.subSurface.indexOfRefraction},set:function(e){this.subSurface.indexOfRefraction=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"invertRefractionY",{get:function(){return this.subSurface.invertRefractionY},set:function(e){this.subSurface.invertRefractionY=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linkRefractionWithTransparency",{get:function(){return this.subSurface.linkRefractionWithTransparency},set:function(e){this.subSurface.linkRefractionWithTransparency=e,e&&(this.subSurface.isRefractionEnabled=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"usePhysicalLightFalloff",{get:function(){return this._lightFalloff===mn.LIGHTFALLOFF_PHYSICAL},set:function(e){e!==this.usePhysicalLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?mn.LIGHTFALLOFF_PHYSICAL:mn.LIGHTFALLOFF_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"useGLTFLightFalloff",{get:function(){return this._lightFalloff===mn.LIGHTFALLOFF_GLTF},set:function(e){e!==this.useGLTFLightFalloff&&(this._markAllSubMeshesAsTexturesDirty(),this._lightFalloff=e?mn.LIGHTFALLOFF_GLTF:mn.LIGHTFALLOFF_STANDARD)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(e){this._attachImageProcessingConfiguration(e),this._markAllSubMeshesAsTexturesDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurvesEnabled",{get:function(){return this.imageProcessingConfiguration.colorCurvesEnabled},set:function(e){this.imageProcessingConfiguration.colorCurvesEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingEnabled",{get:function(){return this.imageProcessingConfiguration.colorGradingEnabled},set:function(e){this.imageProcessingConfiguration.colorGradingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraToneMappingEnabled",{get:function(){return this._imageProcessingConfiguration.toneMappingEnabled},set:function(e){this._imageProcessingConfiguration.toneMappingEnabled=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraExposure",{get:function(){return this._imageProcessingConfiguration.exposure},set:function(e){this._imageProcessingConfiguration.exposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraContrast",{get:function(){return this._imageProcessingConfiguration.contrast},set:function(e){this._imageProcessingConfiguration.contrast=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorGradingTexture",{get:function(){return this._imageProcessingConfiguration.colorGradingTexture},set:function(e){this._imageProcessingConfiguration.colorGradingTexture=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cameraColorCurves",{get:function(){return this._imageProcessingConfiguration.colorCurves},set:function(e){this._imageProcessingConfiguration.colorCurves=e},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"PBRMaterial"},t.prototype.clone=function(e){var n=this,i=L.a.Clone(function(){return new t(e,n.getScene())},this);return i.id=e,i.name=e,this.clearCoat.copyTo(i.clearCoat),this.anisotropy.copyTo(i.anisotropy),this.brdf.copyTo(i.brdf),this.sheen.copyTo(i.sheen),this.subSurface.copyTo(i.subSurface),i},t.prototype.serialize=function(){var e=L.a.Serialize(this);return e.customType="BABYLON.PBRMaterial",e.clearCoat=this.clearCoat.serialize(),e.anisotropy=this.anisotropy.serialize(),e.brdf=this.brdf.serialize(),e.sheen=this.sheen.serialize(),e.subSurface=this.subSurface.serialize(),e},t.Parse=function(e,n,i){var o=L.a.Parse(function(){return new t(e.name,n)},e,n,i);return e.clearCoat&&o.clearCoat.parse(e.clearCoat,n,i),e.anisotropy&&o.anisotropy.parse(e.anisotropy,n,i),e.brdf&&o.brdf.parse(e.brdf,n,i),e.sheen&&o.sheen.parse(e.sheen,n,i),e.subSurface&&o.subSurface.parse(e.subSurface,n,i),o},t.PBRMATERIAL_OPAQUE=mn.PBRMATERIAL_OPAQUE,t.PBRMATERIAL_ALPHATEST=mn.PBRMATERIAL_ALPHATEST,t.PBRMATERIAL_ALPHABLEND=mn.PBRMATERIAL_ALPHABLEND,t.PBRMATERIAL_ALPHATESTANDBLEND=mn.PBRMATERIAL_ALPHATESTANDBLEND,t.DEFAULT_AO_ON_ANALYTICAL_LIGHTS=mn.DEFAULT_AO_ON_ANALYTICAL_LIGHTS,Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"directIntensity",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveIntensity",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"environmentIntensity",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"specularIntensity",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"disableBumpMap",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTextureStrength",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientTextureImpactOnAnalyticalLights",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"opacityTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectivityTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallic",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"roughness",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicF0Factor",void 0),Object(c.c)([Object(L.e)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicReflectanceColor",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"metallicReflectanceTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"microSurfaceTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"bumpTexture",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty",null)],t.prototype,"lightmapTexture",void 0),Object(c.c)([Object(L.e)("ambient"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"ambientColor",void 0),Object(c.c)([Object(L.e)("albedo"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"albedoColor",void 0),Object(c.c)([Object(L.e)("reflectivity"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectivityColor",void 0),Object(c.c)([Object(L.e)("reflection"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"reflectionColor",void 0),Object(c.c)([Object(L.e)("emissive"),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"emissiveColor",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"microSurface",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLightmapAsShadowmap",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"useAlphaFromAlbedoTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"forceAlphaTest",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],t.prototype,"alphaCutOff",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useSpecularOverAlpha",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMicroSurfaceFromReflectivityMapAlpha",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMetallicTextureAlpha",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRoughnessFromMetallicTextureGreen",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useMetallnessFromMetallicTextureBlue",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAmbientOcclusionFromMetallicTextureRed",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAmbientInGrayScale",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAutoMicroSurfaceFromReflectivityMap",void 0),Object(c.c)([Object(L.c)()],t.prototype,"usePhysicalLightFalloff",null),Object(c.c)([Object(L.c)()],t.prototype,"useGLTFLightFalloff",null),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRadianceOverAlpha",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useObjectSpaceNormalMap",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallax",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useParallaxOcclusion",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"parallaxScaleBias",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"disableLighting",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"forceIrradianceInFragment",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsLightsDirty")],t.prototype,"maxSimultaneousLights",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapX",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"invertNormalMapY",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"twoSidedLighting",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useAlphaFresnel",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useLinearAlphaFresnel",void 0),Object(c.c)([Object(L.m)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"environmentBRDFTexture",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"forceNormalForward",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"enableSpecularAntiAliasing",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useHorizonOcclusion",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsTexturesDirty")],t.prototype,"useRadianceOcclusion",void 0),Object(c.c)([Object(L.c)(),Object(L.b)("_markAllSubMeshesAsMiscDirty")],t.prototype,"unlit",void 0),t}(mn);R.a.RegisteredTypes["BABYLON.PBRMaterial"]=ho;function sa(r){return r.charCodeAt(0)+(r.charCodeAt(1)<<8)+(r.charCodeAt(2)<<16)+(r.charCodeAt(3)<<24)}var gu=sa("DXT1"),vu=sa("DXT3"),bu=sa("DXT5"),Hs=sa("DX10"),Gi=function(){function r(){}return r.GetDDSInfo=function(t){var e=new Int32Array(t.buffer,t.byteOffset,31),n=new Int32Array(t.buffer,t.byteOffset,35),i=1;131072&e[2]&&(i=Math.max(1,e[7]));var o=e[21],a=o===Hs?n[32]:0,s=h.a.TEXTURETYPE_UNSIGNED_INT;switch(o){case 113:s=h.a.TEXTURETYPE_HALF_FLOAT;break;case 116:s=h.a.TEXTURETYPE_FLOAT;break;case Hs:if(a===10){s=h.a.TEXTURETYPE_HALF_FLOAT;break}if(a===2){s=h.a.TEXTURETYPE_FLOAT;break}}return{width:e[4],height:e[3],mipmapCount:i,isFourCC:(4&e[20])==4,isRGB:(64&e[20])==64,isLuminance:(131072&e[20])==131072,isCube:(512&e[28])==512,isCompressed:o===gu||o===vu||o===bu,dxgiFormat:a,textureType:s}},r._ToHalfFloat=function(t){r._FloatView||(r._FloatView=new Float32Array(1),r._Int32View=new Int32Array(r._FloatView.buffer)),r._FloatView[0]=t;var e=r._Int32View[0],n=e>>16&32768,i=e>>12&2047,o=e>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&8388607&e):o<113?n|=((i|=2048)>>114-o)+(i>>113-o&1):(n|=o-112<<10|i>>1,n+=1&i)},r._FromHalfFloat=function(t){var e=(32768&t)>>15,n=(31744&t)>>10,i=1023&t;return n===0?(e?-1:1)*Math.pow(2,-14)*(i/Math.pow(2,10)):n==31?i?NaN:1/0*(e?-1:1):(e?-1:1)*Math.pow(2,n-15)*(1+i/Math.pow(2,10))},r._GetHalfFloatAsFloatRGBAArrayBuffer=function(t,e,n,i,o,a){for(var s=new Float32Array(i),d=new Uint16Array(o,n),p=0,y=0;y>8)},r._GetRGBArrayBuffer=function(t,e,n,i,o,a,s,d){for(var p=new Uint8Array(i),y=new Uint8Array(o,n),C=0,M=0;M>8&255,Te>>16&255,Te>>24&255)))}var Ee=r._ExtractLongWordOrder(se[23]),Se=r._ExtractLongWordOrder(se[24]),Le=r._ExtractLongWordOrder(se[25]),xe=r._ExtractLongWordOrder(se[26]);Oe&&(ue=t._getRGBABufferInternalSizedFormat(i.textureType)),z=1,131072&se[2]&&o!==!1&&(z=Math.max(1,se[7]));for(var Ne=d||0;Ne0?i.sphericalPolynomial=Ko.ConvertCubeMapToSphericalPolynomial({size:se[4],right:p[0],left:p[1],up:p[2],down:p[3],front:p[4],back:p[5],format:h.a.TEXTUREFORMAT_RGBA,type:h.a.TEXTURETYPE_FLOAT,gammaSpace:!1}):i.sphericalPolynomial=void 0}else u.a.Error("Compressed textures are not supported on this platform.");else u.a.Error("Unsupported format, must contain a FourCC, RGB or LUMINANCE code");else u.a.Error("Invalid magic number in DDS header")},r.StoreLODInAlphaChannel=!1,r}();Bt.a.prototype.createPrefilteredCubeTexture=function(r,t,e,n,i,o,a,s,d){var p=this;return i===void 0&&(i=null),o===void 0&&(o=null),s===void 0&&(s=null),d===void 0&&(d=!0),this.createCubeTexture(r,t,null,!1,function(y){if(y){var C=y.texture;if(d?y.info.sphericalPolynomial&&(C._sphericalPolynomial=y.info.sphericalPolynomial):C._sphericalPolynomial=new oo,C._source=xt.b.CubePrefiltered,p.getCaps().textureLOD)i&&i(C);else{var M=p._gl,U=y.width;if(U){for(var F=[],z=0;z<3;z++){var J=1-z/2,ie=n,se=$.a.Log2(U)*e+n,ce=ie+(se-ie)*J,ue=Math.round(Math.min(Math.max(ce,0),se)),fe=new xt.a(p,xt.b.Temp);if(fe.type=C.type,fe.format=C.format,fe.width=Math.pow(2,Math.max($.a.Log2(U)-ue,0)),fe.height=fe.width,fe.isCube=!0,p._bindTextureDirectly(M.TEXTURE_CUBE_MAP,fe,!0),fe.samplingMode=h.a.TEXTURE_LINEAR_LINEAR,M.texParameteri(M.TEXTURE_CUBE_MAP,M.TEXTURE_MAG_FILTER,M.LINEAR),M.texParameteri(M.TEXTURE_CUBE_MAP,M.TEXTURE_MIN_FILTER,M.LINEAR),M.texParameteri(M.TEXTURE_CUBE_MAP,M.TEXTURE_WRAP_S,M.CLAMP_TO_EDGE),M.texParameteri(M.TEXTURE_CUBE_MAP,M.TEXTURE_WRAP_T,M.CLAMP_TO_EDGE),y.isDDS){var ve=y.info,Te=y.data;p._unpackFlipY(ve.isCompressed),Gi.UploadDDSLevels(p,fe,Te,ve,!0,6,ue)}else u.a.Warn("DDS is the only prefiltered cube map supported so far.");p._bindTextureDirectly(M.TEXTURE_CUBE_MAP,null);var Oe=new Wn.a(t);Oe.isCube=!0,Oe._texture=fe,fe.isReady=!0,F.push(Oe)}C._lodTextureHigh=F[2],C._lodTextureMid=F[1],C._lodTextureLow=F[0],i&&i(C)}}}else i&&i(null)},o,a,s,d,e,n)};var yu=function(){function r(){this.supportCascades=!0}return r.prototype.canLoad=function(t){return Qn.a.EndsWith(t,".dds")},r.prototype.loadCubeData=function(t,e,n,i,o){var a,s=e.getEngine(),d=!1;if(Array.isArray(t))for(var p=0;p1)&&e.generateMipMaps,s._unpackFlipY(a.isCompressed),Gi.UploadDDSLevels(s,e,y,a,d,6,-1,p),a.isFourCC||a.mipmapCount!==1||s.generateMipMapsForCubemap(e)}else{var C=t;a=Gi.GetDDSInfo(C),e.width=a.width,e.height=a.height,n&&(a.sphericalPolynomial=new oo),d=(a.isRGB||a.isLuminance||a.mipmapCount>1)&&e.generateMipMaps,s._unpackFlipY(a.isCompressed),Gi.UploadDDSLevels(s,e,C,a,d,6),a.isFourCC||a.mipmapCount!==1||s.generateMipMapsForCubemap(e,!1)}s._setCubeMapTextureParams(e,d),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),i&&i({isDDS:!0,width:e.width,info:a,data:t,texture:e})},r.prototype.loadData=function(t,e,n){var i=Gi.GetDDSInfo(t),o=(i.isRGB||i.isLuminance||i.mipmapCount>1)&&e.generateMipMaps&&i.width>>i.mipmapCount-1==1;n(i.width,i.height,o,i.isFourCC,function(){Gi.UploadDDSLevels(e.getEngine(),e,t,i,o,1)})},r}();Ve.a._TextureLoaders.push(new yu);var Tu=function(){function r(){this.supportCascades=!1}return r.prototype.canLoad=function(t){return Qn.a.EndsWith(t,".env")},r.prototype.loadCubeData=function(t,e,n,i,o){if(!Array.isArray(t)){var a=Ci.GetEnvInfo(t);a?(e.width=a.width,e.height=a.width,Ci.UploadEnvSpherical(e,a),Ci.UploadEnvLevelsAsync(e,t,a).then(function(){e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),i&&i()})):o&&o("Can not parse the environment file",null)}},r.prototype.loadData=function(t,e,n){throw".env not supported in 2d."},r}();Ve.a._TextureLoaders.push(new Tu);var ca=function(){function r(t,e,n,i){if(this.data=t,this.isInvalid=!1,!r.IsValid(t))return this.isInvalid=!0,void u.a.Error("texture missing KTX identifier");var o=Uint32Array.BYTES_PER_ELEMENT,a=new DataView(this.data.buffer,this.data.byteOffset+12,13*o),s=a.getUint32(0,!0)===67305985;this.glType=a.getUint32(1*o,s),this.glTypeSize=a.getUint32(2*o,s),this.glFormat=a.getUint32(3*o,s),this.glInternalFormat=a.getUint32(4*o,s),this.glBaseInternalFormat=a.getUint32(5*o,s),this.pixelWidth=a.getUint32(6*o,s),this.pixelHeight=a.getUint32(7*o,s),this.pixelDepth=a.getUint32(8*o,s),this.numberOfArrayElements=a.getUint32(9*o,s),this.numberOfFaces=a.getUint32(10*o,s),this.numberOfMipmapLevels=a.getUint32(11*o,s),this.bytesOfKeyValueData=a.getUint32(12*o,s),this.glType===0?(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),this.pixelHeight!==0&&this.pixelDepth===0?this.numberOfArrayElements===0?this.numberOfFaces===e?this.loadType=r.COMPRESSED_2D:u.a.Error("number of faces expected"+e+", but found "+this.numberOfFaces):u.a.Error("texture arrays not currently supported"):u.a.Error("only 2D textures currently supported")):u.a.Error("only compressed formats currently supported")}return r.prototype.uploadLevels=function(t,e){switch(this.loadType){case r.COMPRESSED_2D:this._upload2DCompressedLevels(t,e);break;case r.TEX_2D:case r.COMPRESSED_3D:case r.TEX_3D:}},r.prototype._upload2DCompressedLevels=function(t,e){for(var n=r.HEADER_LEN+this.bytesOfKeyValueData,i=this.pixelWidth,o=this.pixelHeight,a=e?this.numberOfMipmapLevels:1,s=0;s=12){var e=new Uint8Array(t.buffer,t.byteOffset,12);if(e[0]===171&&e[1]===75&&e[2]===84&&e[3]===88&&e[4]===32&&e[5]===49&&e[6]===49&&e[7]===187&&e[8]===13&&e[9]===10&&e[10]===26&&e[11]===10)return!0}return!1},r.HEADER_LEN=64,r.COMPRESSED_2D=0,r.COMPRESSED_3D=1,r.TEX_2D=2,r.TEX_3D=3,r}(),Ws=function(){function r(t){this._pendingActions=new Array,this._workerInfos=t.map(function(e){return{worker:e,active:!1}})}return r.prototype.dispose=function(){for(var t=0,e=this._workerInfos;t1,e.isReady=!0,this._engine._bindTextureDirectly(this._engine._gl.TEXTURE_2D,null)},r.IsValid=function(t){if(t.byteLength>=12){var e=new Uint8Array(t.buffer,t.byteOffset,12);if(e[0]===171&&e[1]===75&&e[2]===84&&e[3]===88&&e[4]===32&&e[5]===50&&e[6]===48&&e[7]===187&&e[8]===13&&e[9]===10&&e[10]===26&&e[11]===10)return!0}return!1},r.URLConfig={jsDecoderModule:"https://preview.babylonjs.com/babylon.ktx2Decoder.js",wasmUASTCToASTC:null,wasmUASTCToBC7:null,wasmUASTCToRGBA_UNORM:null,wasmUASTCToRGBA_SRGB:null,jsMSCTranscoder:null,wasmMSCTranscoder:null},r.DefaultNumWorkers=r.GetDefaultNumWorkers(),r}();function y_(){var r;onmessage=function(t){switch(t.data.action){case"init":var e=t.data.urls;importScripts(e.jsDecoderModule),e.wasmUASTCToASTC!==null&&(KTX2DECODER.LiteTranscoder_UASTC_ASTC.WasmModuleURL=e.wasmUASTCToASTC),e.wasmUASTCToBC7!==null&&(KTX2DECODER.LiteTranscoder_UASTC_BC7.WasmModuleURL=e.wasmUASTCToBC7),e.wasmUASTCToRGBA_UNORM!==null&&(KTX2DECODER.LiteTranscoder_UASTC_RGBA_UNORM.WasmModuleURL=e.wasmUASTCToRGBA_UNORM),e.wasmUASTCToRGBA_SRGB!==null&&(KTX2DECODER.LiteTranscoder_UASTC_RGBA_SRGB.WasmModuleURL=e.wasmUASTCToRGBA_SRGB),e.jsMSCTranscoder!==null&&(KTX2DECODER.MSCTranscoder.JSModuleURL=e.jsMSCTranscoder),e.wasmMSCTranscoder!==null&&(KTX2DECODER.MSCTranscoder.WasmModuleURL=e.wasmMSCTranscoder),r=new KTX2DECODER.KTX2Decoder,postMessage({action:"init"});break;case"decode":r.decode(t.data.data,t.data.caps,t.data.options).then(function(n){for(var i=[],o=0;o1&&e.generateMipMaps;a._unpackFlipY(!0),s.uploadLevels(e,e.generateMipMaps),e.width=s.pixelWidth,e.height=s.pixelHeight,a._setCubeMapTextureParams(e,d),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),i&&i()}},r.prototype.loadData=function(t,e,n,i){if(ca.IsValid(t)){e._invertVScale=!e.invertY;var o=new ca(t,1);n(o.pixelWidth,o.pixelHeight,e.generateMipMaps,!0,function(){o.uploadLevels(e,e.generateMipMaps)},o.isInvalid)}else Xs.IsValid(t)?new Xs(e.getEngine()).uploadAsync(t,e,i).then(function(){n(e.width,e.height,e.generateMipMaps,!0,function(){},!1)},function(a){u.a.Warn("Failed to load KTX2 texture data: "+a.message),n(0,0,!1,!1,function(){},!0)}):(u.a.Error("texture missing KTX identifier"),n(0,0,!1,!1,function(){},!0))},r}();Ve.a._TextureLoaders.unshift(new Eu);var Su=function(r){function t(e,n,i){var o=r.call(this,e,l.e.Zero(),n)||this;return o._xrSessionManager=i,o._firstFrame=!1,o._referenceQuaternion=l.b.Identity(),o._referencedPosition=new l.e,o._xrInvPositionCache=new l.e,o._xrInvQuaternionCache=l.b.Identity(),o._trackingState=tr.NOT_TRACKING,o.onBeforeCameraTeleport=new P.c,o.onAfterCameraTeleport=new P.c,o.onTrackingStateChanged=new P.c,o.compensateOnFirstFrame=!0,o._rotate180=new l.b(0,1,0,0),o.minZ=.1,o.rotationQuaternion=new l.b,o.cameraRigMode=gt.a.RIG_MODE_CUSTOM,o.updateUpVectorFromRotation=!0,o._updateNumberOfRigCameras(1),o.freezeProjectionMatrix(),o._xrSessionManager.onXRSessionInit.add(function(){o._referencedPosition.copyFromFloats(0,0,0),o._referenceQuaternion.copyFromFloats(0,0,0,1),o._firstFrame=o.compensateOnFirstFrame}),o._xrSessionManager.onXRFrameObservable.add(function(a){o._firstFrame&&o._updateFromXRSession(),o._updateReferenceSpace(),o._updateFromXRSession()},void 0,!0),o}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"trackingState",{get:function(){return this._trackingState},enumerable:!1,configurable:!0}),t.prototype._setTrackingState=function(e){this._trackingState!==e&&(this._trackingState=e,this.onTrackingStateChanged.notifyObservers(e))},Object.defineProperty(t.prototype,"realWorldHeight",{get:function(){var e=this._xrSessionManager.currentFrame&&this._xrSessionManager.currentFrame.getViewerPose(this._xrSessionManager.baseReferenceSpace);return e&&e.transform?e.transform.position.y:0},enumerable:!1,configurable:!0}),t.prototype._updateForDualEyeDebugging=function(){this._updateNumberOfRigCameras(2),this.rigCameras[0].viewport=new Kn.a(0,0,.5,1),this.rigCameras[0].outputRenderTarget=null,this.rigCameras[1].viewport=new Kn.a(.5,0,.5,1),this.rigCameras[1].outputRenderTarget=null},t.prototype.setTransformationFromNonVRCamera=function(e,n){e===void 0&&(e=this.getScene().activeCamera),n===void 0&&(n=!0),e&&e!==this&&(e.computeWorldMatrix().decompose(void 0,this.rotationQuaternion,this.position),this.position.y=0,l.b.FromEulerAnglesToRef(0,this.rotationQuaternion.toEulerAngles().y,0,this.rotationQuaternion),this._firstFrame=!0,n&&this._xrSessionManager.resetReferenceSpace())},t.prototype.getClassName=function(){return"WebXRCamera"},t.prototype._updateFromXRSession=function(){var e=this,n=this._xrSessionManager.currentFrame&&this._xrSessionManager.currentFrame.getViewerPose(this._xrSessionManager.referenceSpace);if(n){var i=n.emulatedPosition?tr.TRACKING_LOST:tr.TRACKING;if(this._setTrackingState(i),n.transform){var o=n.transform.position;this._referencedPosition.set(o.x,o.y,o.z);var a=n.transform.orientation;this._referenceQuaternion.set(a.x,a.y,a.z,a.w),this._scene.useRightHandedSystem||(this._referencedPosition.z*=-1,this._referenceQuaternion.z*=-1,this._referenceQuaternion.w*=-1),this._firstFrame?(this._firstFrame=!1,this.position.y+=this._referencedPosition.y,this._referenceQuaternion.copyFromFloats(0,0,0,1)):(this.rotationQuaternion.copyFrom(this._referenceQuaternion),this.position.copyFrom(this._referencedPosition))}this.rigCameras.length!==n.views.length&&this._updateNumberOfRigCameras(n.views.length),n.views.forEach(function(s,d){var p=e.rigCameras[d];p.isLeftCamera||p.isRightCamera||(s.eye==="right"?p._isRightCamera=!0:s.eye==="left"&&(p._isLeftCamera=!0));var y=s.transform.position,C=s.transform.orientation;if(p.position.set(y.x,y.y,y.z),p.rotationQuaternion.set(C.x,C.y,C.z,C.w),e._scene.useRightHandedSystem?p.rotationQuaternion.multiplyInPlace(e._rotate180):(p.position.z*=-1,p.rotationQuaternion.z*=-1,p.rotationQuaternion.w*=-1),l.a.FromFloat32ArrayToRefScaled(s.projectionMatrix,0,1,p._projectionMatrix),e._scene.useRightHandedSystem||p._projectionMatrix.toggleProjectionMatrixHandInPlace(),d===0&&e._projectionMatrix.copyFrom(p._projectionMatrix),e._xrSessionManager.session.renderState.baseLayer){var M=e._xrSessionManager.session.renderState.baseLayer.getViewport(s),U=e._xrSessionManager.session.renderState.baseLayer.framebufferWidth,F=e._xrSessionManager.session.renderState.baseLayer.framebufferHeight;p.viewport.width=M.width/U,p.viewport.height=M.height/F,p.viewport.x=M.x/U,p.viewport.y=M.y/F}p.outputRenderTarget=e._xrSessionManager.getRenderTargetTextureForEye(s.eye)})}else this._setTrackingState(tr.NOT_TRACKING)},t.prototype._updateNumberOfRigCameras=function(e){for(e===void 0&&(e=1);this.rigCameras.lengthe;){var i=this.rigCameras.pop();i&&i.dispose()}},t.prototype._updateReferenceSpace=function(){this.position.equals(this._referencedPosition)&&this.rotationQuaternion.equals(this._referenceQuaternion)||(this.position.subtractToRef(this._referencedPosition,this._referencedPosition),this._referenceQuaternion.conjugateInPlace(),this._referenceQuaternion.multiplyToRef(this.rotationQuaternion,this._referenceQuaternion),this._updateReferenceSpaceOffset(this._referencedPosition,this._referenceQuaternion.normalize()))},t.prototype._updateReferenceSpaceOffset=function(e,n,i){if(i===void 0&&(i=!1),this._xrSessionManager.referenceSpace&&this._xrSessionManager.currentFrame){this._xrInvPositionCache.copyFrom(e),n?this._xrInvQuaternionCache.copyFrom(n):this._xrInvQuaternionCache.copyFromFloats(0,0,0,1),this._scene.useRightHandedSystem||(this._xrInvPositionCache.z*=-1,this._xrInvQuaternionCache.z*=-1,this._xrInvQuaternionCache.w*=-1),this._xrInvPositionCache.negateInPlace(),this._xrInvQuaternionCache.conjugateInPlace(),this._xrInvPositionCache.rotateByQuaternionToRef(this._xrInvQuaternionCache,this._xrInvPositionCache),i&&(this._xrInvPositionCache.y=0);var o=new XRRigidTransform({x:this._xrInvPositionCache.x,y:this._xrInvPositionCache.y,z:this._xrInvPositionCache.z},{x:this._xrInvQuaternionCache.x,y:this._xrInvQuaternionCache.y,z:this._xrInvQuaternionCache.z,w:this._xrInvQuaternionCache.w}),a=this._xrSessionManager.referenceSpace.getOffsetReferenceSpace(o),s=this._xrSessionManager.currentFrame&&this._xrSessionManager.currentFrame.getViewerPose(a);if(s){var d=new l.e(s.transform.position.x,s.transform.position.y,s.transform.position.z);this._scene.useRightHandedSystem||(d.z*=-1),this.position.subtractToRef(d,d),this._scene.useRightHandedSystem||(d.z*=-1),d.negateInPlace();var p=new XRRigidTransform({x:d.x,y:d.y,z:d.z});this._xrSessionManager.referenceSpace=a.getOffsetReferenceSpace(p)}}},t}(Yn),si=function(){function r(){}return r.ANCHOR_SYSTEM="xr-anchor-system",r.BACKGROUND_REMOVER="xr-background-remover",r.HIT_TEST="xr-hit-test",r.PHYSICS_CONTROLLERS="xr-physics-controller",r.PLANE_DETECTION="xr-plane-detection",r.POINTER_SELECTION="xr-controller-pointer-selection",r.TELEPORTATION="xr-controller-teleportation",r.FEATURE_POINTS="xr-feature-points",r.HAND_TRACKING="xr-hand-tracking",r}(),qn=function(){function r(t){var e=this;this._xrSessionManager=t,this._features={},this._xrSessionManager.onXRSessionInit.add(function(){e.getEnabledFeatures().forEach(function(n){var i=e._features[n];!i.enabled||i.featureImplementation.attached||i.featureImplementation.disableAutoAttach||e.attachFeature(n)})}),this._xrSessionManager.onXRSessionEnded.add(function(){e.getEnabledFeatures().forEach(function(n){var i=e._features[n];i.enabled&&i.featureImplementation.attached&&e.detachFeature(n)})})}return r.AddWebXRFeature=function(t,e,n,i){n===void 0&&(n=1),i===void 0&&(i=!1),this._AvailableFeatures[t]=this._AvailableFeatures[t]||{latest:n},n>this._AvailableFeatures[t].latest&&(this._AvailableFeatures[t].latest=n),i&&(this._AvailableFeatures[t].stable=n),this._AvailableFeatures[t][n]=e},r.ConstructFeature=function(t,e,n,i){e===void 0&&(e=1);var o=this._AvailableFeatures[t][e];if(!o)throw new Error("feature not found");return o(n,i)},r.GetAvailableFeatures=function(){return Object.keys(this._AvailableFeatures)},r.GetAvailableVersions=function(t){return Object.keys(this._AvailableFeatures[t])},r.GetLatestVersionOfFeature=function(t){return this._AvailableFeatures[t]&&this._AvailableFeatures[t].latest||-1},r.GetStableVersionOfFeature=function(t){return this._AvailableFeatures[t]&&this._AvailableFeatures[t].stable||-1},r.prototype.attachFeature=function(t){var e=this._features[t];e&&e.enabled&&!e.featureImplementation.attached&&e.featureImplementation.attach()},r.prototype.detachFeature=function(t){var e=this._features[t];e&&e.featureImplementation.attached&&e.featureImplementation.detach()},r.prototype.disableFeature=function(t){var e=typeof t=="string"?t:t.Name,n=this._features[e];return!(!n||!n.enabled)&&(n.enabled=!1,this.detachFeature(e),n.featureImplementation.dispose(),!0)},r.prototype.dispose=function(){var t=this;this.getEnabledFeatures().forEach(function(e){t.disableFeature(e),t._features[e].featureImplementation.dispose()})},r.prototype.enableFeature=function(t,e,n,i,o){var a=this;e===void 0&&(e="latest"),n===void 0&&(n={}),i===void 0&&(i=!0),o===void 0&&(o=!0);var s=typeof t=="string"?t:t.Name,d=0;if(typeof e=="string"){if(!e)throw new Error("Error in provided version - "+s+" ("+e+")");if((d=e==="stable"?r.GetStableVersionOfFeature(s):e==="latest"?r.GetLatestVersionOfFeature(s):+e)===-1||isNaN(d))throw new Error("feature not found - "+s+" ("+e+")")}else d=e;var p=this._features[s],y=r.ConstructFeature(s,d,this._xrSessionManager,n);if(!y)throw new Error("feature not found - "+s);p&&this.disableFeature(s);var C=y();if(C.dependsOn&&!C.dependsOn.every(function(M){return!!a._features[M]}))throw new Error("Dependant features missing. Make sure the following features are enabled - "+C.dependsOn.join(", "));if(C.isCompatible())return this._features[s]={featureImplementation:C,enabled:!0,version:d,required:o},i?this._xrSessionManager.session&&!this._features[s].featureImplementation.attached&&this.attachFeature(s):this._features[s].featureImplementation.disableAutoAttach=!0,this._features[s].featureImplementation;if(o)throw new Error("required feature not compatible");return Ye.b.Warn("Feature "+s+" not compatible with the current environment/browser and was not enabled."),C},r.prototype.getEnabledFeature=function(t){return this._features[t]&&this._features[t].featureImplementation},r.prototype.getEnabledFeatures=function(){return Object.keys(this._features)},r.prototype.extendXRSessionInitObject=function(t){var e=this;return this.getEnabledFeatures().forEach(function(n){var i=e._features[n],o=i.featureImplementation.xrNativeFeatureName;o&&(i.required?(t.requiredFeatures=t.requiredFeatures||[],t.requiredFeatures.indexOf(o)===-1&&t.requiredFeatures.push(o)):(t.optionalFeatures=t.optionalFeatures||[],t.optionalFeatures.indexOf(o)===-1&&t.optionalFeatures.push(o)))}),t},r._AvailableFeatures={},r}(),Au=function(){function r(t){var e=this;this.scene=t,this._nonVRCamera=null,this._originalSceneAutoClear=!0,this._supported=!1,this.onInitialXRPoseSetObservable=new P.c,this.onStateChangedObservable=new P.c,this.state=_n.NOT_IN_XR,this.sessionManager=new Ss(t),this.camera=new Su("",t,this.sessionManager),this.featuresManager=new qn(this.sessionManager),t.onDisposeObservable.add(function(){e.exitXRAsync()})}return r.CreateAsync=function(t){var e=new r(t);return e.sessionManager.initializeAsync().then(function(){return e._supported=!0,e}).catch(function(n){throw e._setState(_n.NOT_IN_XR),e.dispose(),n})},r.prototype.dispose=function(){this.camera.dispose(),this.onStateChangedObservable.clear(),this.onInitialXRPoseSetObservable.clear(),this.sessionManager.dispose(),this._nonVRCamera&&(this.scene.activeCamera=this._nonVRCamera)},r.prototype.enterXRAsync=function(t,e,n,i){var o=this;if(n===void 0&&(n=this.sessionManager.getWebXRRenderTarget()),i===void 0&&(i={}),!this._supported)throw"WebXR not supported in this browser or environment";return this._setState(_n.ENTERING_XR),e!=="viewer"&&e!=="local"&&(i.optionalFeatures=i.optionalFeatures||[],i.optionalFeatures.push(e)),this.featuresManager.extendXRSessionInitObject(i),t==="immersive-ar"&&e!=="unbounded"&&u.a.Warn("We recommend using 'unbounded' reference space type when using 'immersive-ar' session mode"),this.sessionManager.initializeSessionAsync(t,i).then(function(){return o.sessionManager.setReferenceSpaceTypeAsync(e)}).then(function(){return n.initializeXRLayerAsync(o.sessionManager.session)}).then(function(){return o.sessionManager.updateRenderStateAsync({depthFar:o.camera.maxZ,depthNear:o.camera.minZ,baseLayer:n.xrLayer})}).then(function(){return o.sessionManager.runXRRenderLoop(),o._originalSceneAutoClear=o.scene.autoClear,o._nonVRCamera=o.scene.activeCamera,o.scene.activeCamera=o.camera,t!=="immersive-ar"?o._nonXRToXRCamera():(o.scene.autoClear=!1,o.camera.compensateOnFirstFrame=!1),o.sessionManager.onXRSessionEnded.addOnce(function(){o.camera.rigCameras.forEach(function(a){a.outputRenderTarget=null}),o.scene.autoClear=o._originalSceneAutoClear,o.scene.activeCamera=o._nonVRCamera,t!=="immersive-ar"&&o.camera.compensateOnFirstFrame&&(o._nonVRCamera.setPosition?o._nonVRCamera.setPosition(o.camera.position):o._nonVRCamera.position.copyFrom(o.camera.position)),o._setState(_n.NOT_IN_XR)}),o.sessionManager.onXRFrameObservable.addOnce(function(){o._setState(_n.IN_XR)}),o.sessionManager}).catch(function(a){throw console.log(a),console.log(a.message),o._setState(_n.NOT_IN_XR),a})},r.prototype.exitXRAsync=function(){return this.state!==_n.IN_XR?Promise.resolve():(this._setState(_n.EXITING_XR),this.sessionManager.exitXRAsync())},r.prototype._nonXRToXRCamera=function(){this.camera.setTransformationFromNonVRCamera(this._nonVRCamera),this.onInitialXRPoseSetObservable.notifyObservers(this.camera)},r.prototype._setState=function(t){this.state!==t&&(this.state=t,this.onStateChangedObservable.notifyObservers(this.state))},r}(),Rr=function(){function r(t,e,n,i){n===void 0&&(n=-1),i===void 0&&(i=[]),this.id=t,this.type=e,this._buttonIndex=n,this._axesIndices=i,this._axes={x:0,y:0},this._changes={},this._currentValue=0,this._hasChanges=!1,this._pressed=!1,this._touched=!1,this.onAxisValueChangedObservable=new P.c,this.onButtonStateChangedObservable=new P.c}return Object.defineProperty(r.prototype,"axes",{get:function(){return this._axes},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"changes",{get:function(){return this._changes},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasChanges",{get:function(){return this._hasChanges},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"pressed",{get:function(){return this._pressed},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"touched",{get:function(){return this._touched},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"value",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this.onAxisValueChangedObservable.clear(),this.onButtonStateChangedObservable.clear()},r.prototype.isAxes=function(){return this._axesIndices.length!==0},r.prototype.isButton=function(){return this._buttonIndex!==-1},r.prototype.update=function(t){var e=!1,n=!1;if(this._hasChanges=!1,this._changes={},this.isButton()){var i=t.buttons[this._buttonIndex];if(!i)return;this._currentValue!==i.value&&(this.changes.value={current:i.value,previous:this._currentValue},e=!0,this._currentValue=i.value),this._touched!==i.touched&&(this.changes.touched={current:i.touched,previous:this._touched},e=!0,this._touched=i.touched),this._pressed!==i.pressed&&(this.changes.pressed={current:i.pressed,previous:this._pressed},e=!0,this._pressed=i.pressed)}this.isAxes()&&(this._axes.x!==t.axes[this._axesIndices[0]]&&(this.changes.axes={current:{x:t.axes[this._axesIndices[0]],y:this._axes.y},previous:{x:this._axes.x,y:this._axes.y}},this._axes.x=t.axes[this._axesIndices[0]],n=!0),this._axes.y!==t.axes[this._axesIndices[1]]&&(this.changes.axes?this.changes.axes.current.y=t.axes[this._axesIndices[1]]:this.changes.axes={current:{x:this._axes.x,y:t.axes[this._axesIndices[1]]},previous:{x:this._axes.x,y:this._axes.y}},this._axes.y=t.axes[this._axesIndices[1]],n=!0)),e&&(this._hasChanges=!0,this.onButtonStateChangedObservable.notifyObservers(this)),n&&(this._hasChanges=!0,this.onAxisValueChangedObservable.notifyObservers(this._axes))},r.BUTTON_TYPE="button",r.SQUEEZE_TYPE="squeeze",r.THUMBSTICK_TYPE="thumbstick",r.TOUCHPAD_TYPE="touchpad",r.TRIGGER_TYPE="trigger",r}(),Or=function(){function r(t,e,n,i,o){var a=this;this.scene=t,this.layout=e,this.gamepadObject=n,this.handedness=i,this._initComponent=function(s){if(s){var d=a.layout.components[s],p=d.type,y=d.gamepadIndices.button,C=[];d.gamepadIndices.xAxis!==void 0&&d.gamepadIndices.yAxis!==void 0&&C.push(d.gamepadIndices.xAxis,d.gamepadIndices.yAxis),a.components[s]=new Rr(s,p,y,C)}},this._modelReady=!1,this.components={},this.disableAnimation=!1,this.onModelLoadedObservable=new P.c,e.components&&Object.keys(e.components).forEach(this._initComponent)}return r.prototype.dispose=function(){var t=this;this.getComponentIds().forEach(function(e){return t.getComponent(e).dispose()}),this.rootMesh&&this.rootMesh.dispose()},r.prototype.getAllComponentsOfType=function(t){var e=this;return this.getComponentIds().map(function(n){return e.components[n]}).filter(function(n){return n.type===t})},r.prototype.getComponent=function(t){return this.components[t]},r.prototype.getComponentIds=function(){return Object.keys(this.components)},r.prototype.getComponentOfType=function(t){return this.getAllComponentsOfType(t)[0]||null},r.prototype.getMainComponent=function(){return this.getComponent(this.layout.selectComponentId)},r.prototype.loadModel=function(){return Object(c.b)(this,void 0,void 0,function(){var t,e,n=this;return Object(c.e)(this,function(i){return t=!this._getModelLoadingConstraints(),e=this._getGenericFilenameAndPath(),t?u.a.Warn("Falling back to generic models"):e=this._getFilenameAndPath(),[2,new Promise(function(o,a){Ut.ImportMesh("",e.path,e.filename,n.scene,function(s){t?n._getGenericParentMesh(s):n._setRootMesh(s),n._processLoadedModel(s),n._modelReady=!0,n.onModelLoadedObservable.notifyObservers(n),o(!0)},null,function(s,d){u.a.Log(d),u.a.Warn("Failed to retrieve controller model of type "+n.profileId+" from the remote server: "+e.path+e.filename),a(d)})})]})})},r.prototype.updateFromXRFrame=function(t){var e=this;this.getComponentIds().forEach(function(n){return e.getComponent(n).update(e.gamepadObject)}),this.updateModel(t)},Object.defineProperty(r.prototype,"handness",{get:function(){return this.handedness},enumerable:!1,configurable:!0}),r.prototype.pulse=function(t,e,n){return n===void 0&&(n=0),this.gamepadObject.hapticActuators&&this.gamepadObject.hapticActuators[n]?this.gamepadObject.hapticActuators[n].pulse(t,e):Promise.resolve(!1)},r.prototype._getChildByName=function(t,e){return t.getChildren(function(n){return n.name===e},!1)[0]},r.prototype._getImmediateChildByName=function(t,e){return t.getChildren(function(n){return n.name==e},!0)[0]},r.prototype._lerpTransform=function(t,e,n){if(t.minMesh&&t.maxMesh&&t.valueMesh&&t.minMesh.rotationQuaternion&&t.maxMesh.rotationQuaternion&&t.valueMesh.rotationQuaternion){var i=n?.5*e+.5:e;l.b.SlerpToRef(t.minMesh.rotationQuaternion,t.maxMesh.rotationQuaternion,i,t.valueMesh.rotationQuaternion),l.e.LerpToRef(t.minMesh.position,t.maxMesh.position,i,t.valueMesh.position)}},r.prototype.updateModel=function(t){this._modelReady&&this._updateModel(t)},r.prototype._getGenericFilenameAndPath=function(){return{filename:"generic.babylon",path:"https://controllers.babylonjs.com/generic/"}},r.prototype._getGenericParentMesh=function(t){var e=this;this.rootMesh=new De.a(this.profileId+" "+this.handedness,this.scene),t.forEach(function(n){n.parent||(n.isPickable=!1,n.setParent(e.rootMesh))}),this.rootMesh.rotationQuaternion=l.b.FromEulerAngles(0,Math.PI,0)},r}(),Ys=function(r){function t(e,n,i){var o=r.call(this,e,T_[i],n,i)||this;return o.profileId=t.ProfileId,o}return Object(c.d)(t,r),t.prototype._getFilenameAndPath=function(){return{filename:"generic.babylon",path:"https://controllers.babylonjs.com/generic/"}},t.prototype._getModelLoadingConstraints=function(){return!0},t.prototype._processLoadedModel=function(e){},t.prototype._setRootMesh=function(e){var n=this;this.rootMesh=new De.a(this.profileId+" "+this.handedness,this.scene),e.forEach(function(i){i.isPickable=!1,i.parent||i.setParent(n.rootMesh)}),this.rootMesh.rotationQuaternion=l.b.FromEulerAngles(0,Math.PI,0)},t.prototype._updateModel=function(){},t.ProfileId="generic-trigger",t}(Or),T_={left:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-left",assetPath:"left.glb"},right:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-right",assetPath:"right.glb"},none:{selectComponentId:"xr-standard-trigger",components:{"xr-standard-trigger":{type:"trigger",gamepadIndices:{button:0},rootNodeName:"xr_standard_trigger",visualResponses:{}}},gamepadMapping:"xr-standard",rootNodeName:"generic-trigger-none",assetPath:"none.glb"}},Pu=function(r){function t(e,n,i,o){var a=r.call(this,e,i.layouts[n.handedness||"none"],n.gamepad,n.handedness)||this;return a._repositoryUrl=o,a._buttonMeshMapping={},a._touchDots={},a.profileId=i.profileId,a}return Object(c.d)(t,r),t.prototype.dispose=function(){var e=this;r.prototype.dispose.call(this),Object.keys(this._touchDots).forEach(function(n){e._touchDots[n].dispose()})},t.prototype._getFilenameAndPath=function(){return{filename:this.layout.assetPath,path:this._repositoryUrl+"/profiles/"+this.profileId+"/"}},t.prototype._getModelLoadingConstraints=function(){var e=Ut.IsPluginForExtensionAvailable(".glb");return e||u.a.Warn("glTF / glb loaded was not registered, using generic controller instead"),e},t.prototype._processLoadedModel=function(e){var n=this;this.getComponentIds().forEach(function(i){var o=n.layout.components[i];n._buttonMeshMapping[i]={mainMesh:n._getChildByName(n.rootMesh,o.rootNodeName),states:{}},Object.keys(o.visualResponses).forEach(function(a){var s=o.visualResponses[a];if(s.valueNodeProperty==="transform")n._buttonMeshMapping[i].states[a]={valueMesh:n._getChildByName(n.rootMesh,s.valueNodeName),minMesh:n._getChildByName(n.rootMesh,s.minNodeName),maxMesh:n._getChildByName(n.rootMesh,s.maxNodeName)};else{var d=o.type===Rr.TOUCHPAD_TYPE&&o.touchPointNodeName?o.touchPointNodeName:s.valueNodeName;if(n._buttonMeshMapping[i].states[a]={valueMesh:n._getChildByName(n.rootMesh,d)},o.type===Rr.TOUCHPAD_TYPE&&!n._touchDots[a]){var p=Vn.a.CreateSphere(a+"dot",{diameter:.0015,segments:8},n.scene);p.material=new Ft.a(a+"mat",n.scene),p.material.diffuseColor=O.a.Red(),p.parent=n._buttonMeshMapping[i].states[a].valueMesh||null,p.isVisible=!1,n._touchDots[a]=p}}})})},t.prototype._setRootMesh=function(e){var n;this.rootMesh=new De.a(this.profileId+"-"+this.handedness,this.scene),this.rootMesh.isPickable=!1;for(var i=0;io/10&&(d.isVisible=!0),(p+=n._scene.getEngine().getDeltaTime())>=o)n._scene.simulatePointerDown(i.pick,{pointerId:i.id}),y=!0,n._options.disablePointerUpOnTouchOut&&n._scene.simulatePointerUp(i.pick,{pointerId:i.id}),d.isVisible=!1;else{var C=1-p/o;d.scaling.set(C,C,C)}else y=!1,p=0;n._scene.simulatePointerMove(i.pick,{pointerId:i.id}),s=i.pick}}),this._options.renderingGroupId!==void 0&&(d.renderingGroupId=this._options.renderingGroupId),e&&e.onDisposeObservable.addOnce(function(){i.pick&&!n._options.disablePointerUpOnTouchOut&&y&&n._scene.simulatePointerUp(i.pick,{pointerId:i.id}),d.dispose()})},t.prototype._attachScreenRayMode=function(e){var n=this,i=this._controllers[e.uniqueId],o=!1;i.onFrameObserver=this._xrSessionManager.onXRFrameObservable.add(function(){!i.pick||n._options.disablePointerUpOnTouchOut&&o||(o?n._scene.simulatePointerMove(i.pick,{pointerId:i.id}):(n._scene.simulatePointerDown(i.pick,{pointerId:i.id}),o=!0,n._options.disablePointerUpOnTouchOut&&n._scene.simulatePointerUp(i.pick,{pointerId:i.id})))}),e.onDisposeObservable.addOnce(function(){i.pick&&o&&!n._options.disablePointerUpOnTouchOut&&n._scene.simulatePointerUp(i.pick,{pointerId:i.id})})},t.prototype._attachTrackedPointerRayMode=function(e){var n=this,i=this._controllers[e.uniqueId];if(this._options.forceGazeMode)return this._attachGazeMode(e);if(i.onFrameObserver=this._xrSessionManager.onXRFrameObservable.add(function(){i.laserPointer.material.disableLighting=n.disablePointerLighting,i.selectionMesh.material.disableLighting=n.disableSelectionMeshLighting,i.pick&&n._scene.simulatePointerMove(i.pick,{pointerId:i.id})}),e.inputSource.gamepad){var o=function(d){n._options.overrideButtonId&&(i.selectionComponent=d.getComponent(n._options.overrideButtonId)),i.selectionComponent||(i.selectionComponent=d.getMainComponent()),i.onButtonChangedObserver=i.selectionComponent.onButtonStateChangedObservable.add(function(p){if(p.changes.pressed){var y=p.changes.pressed.current;i.pick?(n._options.enablePointerSelectionOnAllControllers||e.uniqueId===n._attachedController)&&(y?(n._scene.simulatePointerDown(i.pick,{pointerId:i.id}),i.selectionMesh.material.emissiveColor=n.selectionMeshPickedColor,i.laserPointer.material.emissiveColor=n.laserPointerPickedColor):(n._scene.simulatePointerUp(i.pick,{pointerId:i.id}),i.selectionMesh.material.emissiveColor=n.selectionMeshDefaultColor,i.laserPointer.material.emissiveColor=n.laserPointerDefaultColor)):!y||n._options.enablePointerSelectionOnAllControllers||n._options.disableSwitchOnClick||(n._attachedController=e.uniqueId)}})};e.motionController?o(e.motionController):e.onMotionControllerInitObservable.add(o)}else{var a=function(d){i.xrController&&d.inputSource===i.xrController.inputSource&&i.pick&&(n._scene.simulatePointerDown(i.pick,{pointerId:i.id}),i.selectionMesh.material.emissiveColor=n.selectionMeshPickedColor,i.laserPointer.material.emissiveColor=n.laserPointerPickedColor)},s=function(d){i.xrController&&d.inputSource===i.xrController.inputSource&&i.pick&&(n._scene.simulatePointerUp(i.pick,{pointerId:i.id}),i.selectionMesh.material.emissiveColor=n.selectionMeshDefaultColor,i.laserPointer.material.emissiveColor=n.laserPointerDefaultColor)};i.eventListeners={selectend:s,selectstart:a},this._xrSessionManager.session.addEventListener("selectstart",a),this._xrSessionManager.session.addEventListener("selectend",s)}},t.prototype._convertNormalToDirectionOfRay=function(e,n){return e&&Math.acos(l.e.Dot(e,n.direction))o},t.prototype._updatePointerDistance=function(e,n){n===void 0&&(n=100),e.scaling.y=n,this._scene.useRightHandedSystem&&(n*=-1),e.position.z=n/2+.05},Object.defineProperty(t.prototype,"lasterPointerDefaultColor",{get:function(){return this.laserPointerDefaultColor},enumerable:!1,configurable:!0}),t._idCounter=200,t.Name=si.POINTER_SELECTION,t.Version=1,t}(ci);qn.AddWebXRFeature(fo.Name,function(r,t){return function(){return new fo(r,t)}},fo.Version,!0);var zi,Ru=function(){function r(t,e,n){this.element=t,this.sessionMode=e,this.referenceSpaceType=n}return r.prototype.update=function(t){},r}(),S_=function(){},Ou=function(){function r(t,e){var n=this;if(this.scene=t,this.options=e,this._activeButton=null,this._buttons=[],this.activeButtonChangedObservable=new P.c,this.overlay=document.createElement("div"),this.overlay.classList.add("xr-button-overlay"),this.overlay.style.cssText="z-index:11;position: absolute; right: 20px;bottom: 50px;",typeof window<"u"&&window.location&&window.location.protocol==="http:"&&Ye.b.Warn("WebXR can only be served over HTTPS"),e.customButtons)this._buttons=e.customButtons;else{var i=e.sessionMode||"immersive-vr",o=e.referenceSpaceType||"local-floor",a=".babylonVRicon { color: #868686; border-color: #868686; border-style: solid; margin-left: 10px; height: 50px; width: 80px; background-color: rgba(51,51,51,0.7); background-image: url("+(typeof SVGSVGElement>"u"?"https://cdn.babylonjs.com/Assets/vrButton.png":"data:image/svg+xml;charset=UTF-8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%222048%22%20height%3D%221152%22%20viewBox%3D%220%200%202048%201152%22%20version%3D%221.1%22%3E%3Cpath%20transform%3D%22rotate%28180%201024%2C576.0000000000001%29%22%20d%3D%22m1109%2C896q17%2C0%2030%2C-12t13%2C-30t-12.5%2C-30.5t-30.5%2C-12.5l-170%2C0q-18%2C0%20-30.5%2C12.5t-12.5%2C30.5t13%2C30t30%2C12l170%2C0zm-85%2C256q59%2C0%20132.5%2C-1.5t154.5%2C-5.5t164.5%2C-11.5t163%2C-20t150%2C-30t124.5%2C-41.5q23%2C-11%2042%2C-24t38%2C-30q27%2C-25%2041%2C-61.5t14%2C-72.5l0%2C-257q0%2C-123%20-47%2C-232t-128%2C-190t-190%2C-128t-232%2C-47l-81%2C0q-37%2C0%20-68.5%2C14t-60.5%2C34.5t-55.5%2C45t-53%2C45t-53%2C34.5t-55.5%2C14t-55.5%2C-14t-53%2C-34.5t-53%2C-45t-55.5%2C-45t-60.5%2C-34.5t-68.5%2C-14l-81%2C0q-123%2C0%20-232%2C47t-190%2C128t-128%2C190t-47%2C232l0%2C257q0%2C68%2038%2C115t97%2C73q54%2C24%20124.5%2C41.5t150%2C30t163%2C20t164.5%2C11.5t154.5%2C5.5t132.5%2C1.5zm939%2C-298q0%2C39%20-24.5%2C67t-58.5%2C42q-54%2C23%20-122%2C39.5t-143.5%2C28t-155.5%2C19t-157%2C11t-148.5%2C5t-129.5%2C1.5q-59%2C0%20-130%2C-1.5t-148%2C-5t-157%2C-11t-155.5%2C-19t-143.5%2C-28t-122%2C-39.5q-34%2C-14%20-58.5%2C-42t-24.5%2C-67l0%2C-257q0%2C-106%2040.5%2C-199t110%2C-162.5t162.5%2C-109.5t199%2C-40l81%2C0q27%2C0%2052%2C14t50%2C34.5t51%2C44.5t55.5%2C44.5t63.5%2C34.5t74%2C14t74%2C-14t63.5%2C-34.5t55.5%2C-44.5t51%2C-44.5t50%2C-34.5t52%2C-14l14%2C0q37%2C0%2070%2C0.5t64.5%2C4.5t63.5%2C12t68%2C23q71%2C30%20128.5%2C78.5t98.5%2C110t63.5%2C133.5t22.5%2C149l0%2C257z%22%20fill%3D%22white%22%20/%3E%3C/svg%3E%0A")+"); background-size: 80%; background-repeat:no-repeat; background-position: center; border: none; outline: none; transition: transform 0.125s ease-out } .babylonVRicon:hover { transform: scale(1.05) } .babylonVRicon:active {background-color: rgba(51,51,51,1) } .babylonVRicon:focus {background-color: rgba(51,51,51,1) }";a+='.babylonVRicon.vrdisplaypresenting { background-image: none;} .vrdisplaypresenting::after { content: "EXIT"} .xr-error::after { content: "ERROR"}';var s=document.createElement("style");s.appendChild(document.createTextNode(a)),document.getElementsByTagName("head")[0].appendChild(s);var d=document.createElement("button");d.className="babylonVRicon",d.title=i+" - "+o,this._buttons.push(new Ru(d,i,o)),this._buttons[this._buttons.length-1].update=function(y){this.element.style.display=y===null||y===this?"":"none",d.className="babylonVRicon"+(y===this?" vrdisplaypresenting":"")},this._updateButtons(null)}var p=t.getEngine().getInputElement();p&&p.parentNode&&(p.parentNode.appendChild(this.overlay),t.onDisposeObservable.addOnce(function(){n.dispose()}))}return r.CreateAsync=function(t,e,n){var i=this,o=new r(t,n),a=o._buttons.map(function(s){return e.sessionManager.isSessionSupportedAsync(s.sessionMode)});return e.onStateChangedObservable.add(function(s){s==_n.NOT_IN_XR&&o._updateButtons(null)}),Promise.all(a).then(function(s){return s.forEach(function(d,p){d?(o.overlay.appendChild(o._buttons[p].element),o._buttons[p].element.onclick=function(){return Object(c.b)(i,void 0,void 0,function(){var y,C,M;return Object(c.e)(this,function(U){switch(U.label){case 0:return e.state!=_n.IN_XR?[3,2]:[4,e.exitXRAsync()];case 1:return U.sent(),o._updateButtons(null),[3,6];case 2:if(e.state!=_n.NOT_IN_XR)return[3,6];if(!n.renderTarget)return[3,6];U.label=3;case 3:return U.trys.push([3,5,,6]),[4,e.enterXRAsync(o._buttons[p].sessionMode,o._buttons[p].referenceSpaceType,n.renderTarget,{optionalFeatures:n.optionalFeatures,requiredFeatures:n.requiredFeatures})];case 4:return U.sent(),o._updateButtons(o._buttons[p]),[3,6];case 5:return y=U.sent(),o._updateButtons(null),C=o._buttons[p].element,M=C.title,C.title="Error entering XR session : "+M,C.classList.add("xr-error"),n.onError&&n.onError(y),[3,6];case 6:return[2]}})})}):Ye.b.Warn('Session mode "'+o._buttons[p].sessionMode+'" not supported in browser')}),o})},r.prototype.dispose=function(){var t=this.scene.getEngine().getInputElement();t&&t.parentNode&&t.parentNode.contains(this.overlay)&&t.parentNode.removeChild(this.overlay),this.activeButtonChangedObservable.clear()},r.prototype._updateButtons=function(t){var e=this;this._activeButton=t,this._buttons.forEach(function(n){n.update(e._activeButton)}),this.activeButtonChangedObservable.notifyObservers(this._activeButton)},r}();function Ks(r){var t,e=0,n=Date.now();r.observableParameters=(t=r.observableParameters)!==null&&t!==void 0?t:{};var i=r.contextObservable.add(function(o){var a=Date.now(),s={startTime:n,currentTime:a,deltaTime:e=a-n,completeRate:e/r.timeout,payload:o};r.onTick&&r.onTick(s),r.breakCondition&&r.breakCondition()&&(r.contextObservable.remove(i),r.onAborted&&r.onAborted(s)),e>=r.timeout&&(r.contextObservable.remove(i),r.onEnded&&r.onEnded(s))},r.observableParameters.mask,r.observableParameters.insertFirst,r.observableParameters.scope);return i}(function(r){r[r.INIT=0]="INIT",r[r.STARTED=1]="STARTED",r[r.ENDED=2]="ENDED"})(zi||(zi={}));var A_=function(){function r(t){var e,n,i=this;this.onEachCountObservable=new P.c,this.onTimerAbortedObservable=new P.c,this.onTimerEndedObservable=new P.c,this.onStateChangedObservable=new P.c,this._observer=null,this._breakOnNextTick=!1,this._tick=function(o){var a=Date.now();i._timer=a-i._startTime;var s={startTime:i._startTime,currentTime:a,deltaTime:i._timer,completeRate:i._timer/i._timeToEnd,payload:o},d=i._breakOnNextTick||i._breakCondition(s);d||i._timer>=i._timeToEnd?i._stop(s,d):i.onEachCountObservable.notifyObservers(s)},this._setState(zi.INIT),this._contextObservable=t.contextObservable,this._observableParameters=(e=t.observableParameters)!==null&&e!==void 0?e:{},this._breakCondition=(n=t.breakCondition)!==null&&n!==void 0?n:function(){return!1},t.onEnded&&this.onTimerEndedObservable.add(t.onEnded),t.onTick&&this.onEachCountObservable.add(t.onTick),t.onAborted&&this.onTimerAbortedObservable.add(t.onAborted)}return Object.defineProperty(r.prototype,"breakCondition",{set:function(t){this._breakCondition=t},enumerable:!1,configurable:!0}),r.prototype.clearObservables=function(){this.onEachCountObservable.clear(),this.onTimerAbortedObservable.clear(),this.onTimerEndedObservable.clear(),this.onStateChangedObservable.clear()},r.prototype.start=function(t){if(t===void 0&&(t=this._timeToEnd),this._state===zi.STARTED)throw new Error("Timer already started. Please stop it before starting again");this._timeToEnd=t,this._startTime=Date.now(),this._timer=0,this._observer=this._contextObservable.add(this._tick,this._observableParameters.mask,this._observableParameters.insertFirst,this._observableParameters.scope),this._setState(zi.STARTED)},r.prototype.stop=function(){this._state===zi.STARTED&&(this._breakOnNextTick=!0)},r.prototype.dispose=function(){this._observer&&this._contextObservable.remove(this._observer),this.clearObservables()},r.prototype._setState=function(t){this._state=t,this.onStateChangedObservable.notifyObservers(this._state)},r.prototype._stop=function(t,e){e===void 0&&(e=!1),this._contextObservable.remove(this._observer),this._setState(zi.ENDED),e?this.onTimerAbortedObservable.notifyObservers(t):this.onTimerEndedObservable.notifyObservers(t)},r}(),po=function(r){function t(e,n){var i=r.call(this,e)||this;return i._options=n,i._controllers={},i._snappedToPoint=!1,i._tmpRay=new pn.a(new l.e,new l.e),i._tmpVector=new l.e,i._tmpQuaternion=new l.b,i.backwardsMovementEnabled=!0,i.backwardsTeleportationDistance=.7,i.parabolicCheckRadius=5,i.parabolicRayEnabled=!0,i.straightRayEnabled=!0,i.rotationAngle=Math.PI/8,i._rotationEnabled=!0,i._attachController=function(o){if(!(i._controllers[o.uniqueId]||i._options.forceHandedness&&o.inputSource.handedness!==i._options.forceHandedness)){i._controllers[o.uniqueId]={xrController:o,teleportationState:{forward:!1,backwards:!1,rotating:!1,currentRotation:0,baseRotation:0}};var a=i._controllers[o.uniqueId];if(a.xrController.inputSource.targetRayMode==="tracked-pointer"&&a.xrController.inputSource.gamepad){var s=function(){if(o.motionController){var d=o.motionController.getComponentOfType(Rr.THUMBSTICK_TYPE)||o.motionController.getComponentOfType(Rr.TOUCHPAD_TYPE);if(!d||i._options.useMainComponentOnly){var p=o.motionController.getMainComponent();if(!p)return;a.teleportationComponent=p,a.onButtonChangedObserver=p.onButtonStateChangedObservable.add(function(){p.changes.pressed&&(p.changes.pressed.current?(a.teleportationState.forward=!0,i._currentTeleportationControllerId=a.xrController.uniqueId,a.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y,a.teleportationState.currentRotation=0,Ks({timeout:i._options.timeToTeleport||3e3,contextObservable:i._xrSessionManager.onXRFrameObservable,breakCondition:function(){return!p.pressed},onEnded:function(){i._currentTeleportationControllerId===a.xrController.uniqueId&&a.teleportationState.forward&&i._teleportForward(o.uniqueId)}})):(a.teleportationState.forward=!1,i._currentTeleportationControllerId=""))})}else a.teleportationComponent=d,a.onAxisChangedObserver=d.onAxisValueChangedObservable.add(function(y){if(y.y<=.7&&a.teleportationState.backwards&&(a.teleportationState.backwards=!1),y.y>.7&&!a.teleportationState.forward&&i.backwardsMovementEnabled&&!i.snapPointsOnly&&!a.teleportationState.backwards){a.teleportationState.backwards=!0,i._tmpQuaternion.copyFrom(i._options.xrInput.xrCamera.rotationQuaternion),i._tmpQuaternion.toEulerAnglesToRef(i._tmpVector),i._tmpVector.x=0,i._tmpVector.z=0,l.b.FromEulerVectorToRef(i._tmpVector,i._tmpQuaternion),i._tmpVector.set(0,0,i.backwardsTeleportationDistance*(i._xrSessionManager.scene.useRightHandedSystem?1:-1)),i._tmpVector.rotateByQuaternionToRef(i._tmpQuaternion,i._tmpVector),i._tmpVector.addInPlace(i._options.xrInput.xrCamera.position),i._tmpRay.origin.copyFrom(i._tmpVector),i._tmpRay.length=i._options.xrInput.xrCamera.realWorldHeight+.1,i._tmpRay.direction.set(0,-1,0);var C=i._xrSessionManager.scene.pickWithRay(i._tmpRay,function(U){return i._floorMeshes.indexOf(U)!==-1});C&&C.pickedPoint&&(i._options.xrInput.xrCamera.position.x=C.pickedPoint.x,i._options.xrInput.xrCamera.position.z=C.pickedPoint.z)}if(y.y<-.7&&!i._currentTeleportationControllerId&&!a.teleportationState.rotating&&(a.teleportationState.forward=!0,i._currentTeleportationControllerId=a.xrController.uniqueId,a.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y),y.x){if(a.teleportationState.forward)i._currentTeleportationControllerId===a.xrController.uniqueId&&(i.rotationEnabled?setTimeout(function(){a.teleportationState.currentRotation=Math.atan2(y.x,y.y*(i._xrSessionManager.scene.useRightHandedSystem?1:-1))}):a.teleportationState.currentRotation=0);else if(!a.teleportationState.rotating&&Math.abs(y.x)>.7){a.teleportationState.rotating=!0;var M=i.rotationAngle*(y.x>0?1:-1)*(i._xrSessionManager.scene.useRightHandedSystem?-1:1);i._options.xrInput.xrCamera.rotationQuaternion.multiplyInPlace(l.b.FromEulerAngles(0,M,0))}}else a.teleportationState.rotating=!1;y.x===0&&y.y===0&&a.teleportationState.forward&&i._teleportForward(o.uniqueId)})}};o.motionController?s():o.onMotionControllerInitObservable.addOnce(function(){s()})}else i._xrSessionManager.scene.onPointerObservable.add(function(d){d.type===Tt.a.POINTERDOWN?(a.teleportationState.forward=!0,i._currentTeleportationControllerId=a.xrController.uniqueId,a.teleportationState.baseRotation=i._options.xrInput.xrCamera.rotationQuaternion.toEulerAngles().y,a.teleportationState.currentRotation=0,Ks({timeout:i._options.timeToTeleport||3e3,contextObservable:i._xrSessionManager.onXRFrameObservable,onEnded:function(){i._currentTeleportationControllerId===a.xrController.uniqueId&&a.teleportationState.forward&&i._teleportForward(o.uniqueId)}})):d.type===Tt.a.POINTERUP&&(a.teleportationState.forward=!1,i._currentTeleportationControllerId="")})}},i._options.teleportationTargetMesh||i._createDefaultTargetMesh(),i._floorMeshes=i._options.floorMeshes||[],i._snapToPositions=i._options.snapPositions||[],i._setTargetMeshVisibility(!1),i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"rotationEnabled",{get:function(){return this._rotationEnabled},set:function(e){if(this._rotationEnabled=e,this._options.teleportationTargetMesh){var n=this._options.teleportationTargetMesh.getChildMeshes(!1,function(i){return i.name==="rotationCone"});n[0]&&n[0].setEnabled(e)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"teleportationTargetMesh",{get:function(){return this._options.teleportationTargetMesh||null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"snapPointsOnly",{get:function(){return!!this._options.snapPointsOnly},set:function(e){this._options.snapPointsOnly=e},enumerable:!1,configurable:!0}),t.prototype.addFloorMesh=function(e){this._floorMeshes.push(e)},t.prototype.addSnapPoint=function(e){this._snapToPositions.push(e)},t.prototype.attach=function(){var e=this;return!!r.prototype.attach.call(this)&&(this._currentTeleportationControllerId="",this._options.xrInput.controllers.forEach(this._attachController),this._addNewAttachObserver(this._options.xrInput.onControllerAddedObservable,this._attachController),this._addNewAttachObserver(this._options.xrInput.onControllerRemovedObservable,function(n){e._detachController(n.uniqueId)}),!0)},t.prototype.detach=function(){var e=this;return!!r.prototype.detach.call(this)&&(Object.keys(this._controllers).forEach(function(n){e._detachController(n)}),this._setTargetMeshVisibility(!1),this._currentTeleportationControllerId="",this._controllers={},!0)},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._options.teleportationTargetMesh&&this._options.teleportationTargetMesh.dispose(!1,!0)},t.prototype.removeFloorMesh=function(e){var n=this._floorMeshes.indexOf(e);n!==-1&&this._floorMeshes.splice(n,1)},t.prototype.removeFloorMeshByName=function(e){var n=this._xrSessionManager.scene.getMeshByName(e);n&&this.removeFloorMesh(n)},t.prototype.removeSnapPoint=function(e){var n=this._snapToPositions.indexOf(e);if(n===-1){for(var i=0;i=p.video.HAVE_CURRENT_DATA;return!d.poster||d.autoPlay&&y?y&&p._createInternalTexture():(p._texture=p._getEngine().createTexture(d.poster,!1,!p.invertY,i),p._displayingPosterTexture=!0),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"onUserActionRequestedObservable",{get:function(){return this._onUserActionRequestedObservable||(this._onUserActionRequestedObservable=new P.c),this._onUserActionRequestedObservable},enumerable:!1,configurable:!0}),t.prototype._getName=function(e){return e instanceof HTMLVideoElement?e.currentSrc:typeof e=="object"?e.toString():e},t.prototype._getVideo=function(e){if(e instanceof HTMLVideoElement)return Ye.b.SetCorsBehavior(e.currentSrc,e),e;var n=document.createElement("video");return typeof e=="string"?(Ye.b.SetCorsBehavior(e,n),n.src=e):(Ye.b.SetCorsBehavior(e[0],n),e.forEach(function(i){var o=document.createElement("source");o.src=i,n.appendChild(o)})),n},t.prototype._rebuild=function(){this.update()},t.prototype.update=function(){this.autoUpdateTexture&&this.updateTexture(!0)},t.prototype.updateTexture=function(e){e&&(this.video.paused&&this._stillImageCaptured||(this._stillImageCaptured=!0,this._updateInternalTexture()))},t.prototype.updateURL=function(e){this.video.src=e,this._currentSrc=e},t.prototype.clone=function(){return new t(this.name,this._currentSrc,this.getScene(),this._generateMipMaps,this.invertY,this.samplingMode,this._settings)},t.prototype.dispose=function(){r.prototype.dispose.call(this),this._currentSrc=null,this._onUserActionRequestedObservable&&(this._onUserActionRequestedObservable.clear(),this._onUserActionRequestedObservable=null),this.video.removeEventListener(this._createInternalTextureOnEvent,this._createInternalTexture),this.video.removeEventListener("paused",this._updateInternalTexture),this.video.removeEventListener("seeked",this._updateInternalTexture),this.video.removeEventListener("emptied",this.reset),this.video.pause()},t.CreateFromStreamAsync=function(e,n){var i=document.createElement("video");return e.getEngine()._badOS&&(document.body.appendChild(i),i.style.transform="scale(0.0001, 0.0001)",i.style.opacity="0",i.style.position="fixed",i.style.bottom="0px",i.style.right="0px"),i.setAttribute("autoplay",""),i.setAttribute("muted","true"),i.setAttribute("playsinline",""),i.muted=!0,i.mozSrcObject!==void 0?i.mozSrcObject=n:typeof i.srcObject=="object"?i.srcObject=n:(window.URL=window.URL||window.webkitURL||window.mozURL||window.msURL,i.src=window.URL&&window.URL.createObjectURL(n)),new Promise(function(o){var a=function(){o(new t("video",i,e,!0,!0)),i.removeEventListener("playing",a)};i.addEventListener("playing",a),i.play()})},t.CreateFromWebCamAsync=function(e,n,i){var o,a=this;return i===void 0&&(i=!1),n&&n.deviceId&&(o={exact:n.deviceId}),navigator.mediaDevices?navigator.mediaDevices.getUserMedia({video:n,audio:i}).then(function(s){return a.CreateFromStreamAsync(e,s)}):(navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia,navigator.getUserMedia&&navigator.getUserMedia({video:{deviceId:o,width:{min:n&&n.minWidth||256,max:n&&n.maxWidth||640},height:{min:n&&n.minHeight||256,max:n&&n.maxHeight||480}},audio:i},function(s){return a.CreateFromStreamAsync(e,s)},function(s){u.a.Error(s.name)}),Promise.reject("No support for userMedia on this device"))},t.CreateFromWebCam=function(e,n,i,o){o===void 0&&(o=!1),this.CreateFromWebCamAsync(e,i,o).then(function(a){n&&n(a)}).catch(function(a){u.a.Error(a.name)})},t}(we.a),x_=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"videoTexture",{get:function(){return this._texture},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"videoMode",{get:function(){return this.textureMode},set:function(e){this.textureMode=e},enumerable:!1,configurable:!0}),t.prototype._initTexture=function(e,n,i){var o=this,a={loop:i.loop,autoPlay:i.autoPlay,autoUpdateTexture:!0,poster:i.poster},s=new Iu((this.name||"videoDome")+"_texture",e,n,i.generateMipMaps,this._useDirectMapping,we.a.TRILINEAR_SAMPLINGMODE,a);return i.clickToPlay&&(n.onPointerUp=function(){o._texture.video.play()}),s},t.MODE_MONOSCOPIC=ki.MODE_MONOSCOPIC,t.MODE_TOPBOTTOM=ki.MODE_TOPBOTTOM,t.MODE_SIDEBYSIDE=ki.MODE_SIDEBYSIDE,t}(ki),Xn=f(55),R_=function(){function r(t){this.engine=t,this._captureGPUFrameTime=!1,this._gpuFrameTime=new Xn.a,this._captureShaderCompilationTime=!1,this._shaderCompilationTime=new Xn.a,this._onBeginFrameObserver=null,this._onEndFrameObserver=null,this._onBeforeShaderCompilationObserver=null,this._onAfterShaderCompilationObserver=null}return Object.defineProperty(r.prototype,"gpuFrameTimeCounter",{get:function(){return this._gpuFrameTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureGPUFrameTime",{get:function(){return this._captureGPUFrameTime},set:function(t){var e=this;t!==this._captureGPUFrameTime&&(this._captureGPUFrameTime=t,t?(this._onBeginFrameObserver=this.engine.onBeginFrameObservable.add(function(){e._gpuFrameTimeToken||(e._gpuFrameTimeToken=e.engine.startTimeQuery())}),this._onEndFrameObserver=this.engine.onEndFrameObservable.add(function(){if(e._gpuFrameTimeToken){var n=e.engine.endTimeQuery(e._gpuFrameTimeToken);n>-1&&(e._gpuFrameTimeToken=null,e._gpuFrameTime.fetchNewFrame(),e._gpuFrameTime.addCount(n,!0))}})):(this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"shaderCompilationTimeCounter",{get:function(){return this._shaderCompilationTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureShaderCompilationTime",{get:function(){return this._captureShaderCompilationTime},set:function(t){var e=this;t!==this._captureShaderCompilationTime&&(this._captureShaderCompilationTime=t,t?(this._onBeforeShaderCompilationObserver=this.engine.onBeforeShaderCompilationObservable.add(function(){e._shaderCompilationTime.fetchNewFrame(),e._shaderCompilationTime.beginMonitoring()}),this._onAfterShaderCompilationObserver=this.engine.onAfterShaderCompilationObservable.add(function(){e._shaderCompilationTime.endMonitoring()})):(this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null))},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this.engine.onBeginFrameObservable.remove(this._onBeginFrameObserver),this._onBeginFrameObserver=null,this.engine.onEndFrameObservable.remove(this._onEndFrameObserver),this._onEndFrameObserver=null,this.engine.onBeforeShaderCompilationObservable.remove(this._onBeforeShaderCompilationObserver),this._onBeforeShaderCompilationObserver=null,this.engine.onAfterShaderCompilationObservable.remove(this._onAfterShaderCompilationObserver),this._onAfterShaderCompilationObserver=null,this.engine=null},r}(),O_=function(){function r(t){var e=this;this.scene=t,this._captureActiveMeshesEvaluationTime=!1,this._activeMeshesEvaluationTime=new Xn.a,this._captureRenderTargetsRenderTime=!1,this._renderTargetsRenderTime=new Xn.a,this._captureFrameTime=!1,this._frameTime=new Xn.a,this._captureRenderTime=!1,this._renderTime=new Xn.a,this._captureInterFrameTime=!1,this._interFrameTime=new Xn.a,this._captureParticlesRenderTime=!1,this._particlesRenderTime=new Xn.a,this._captureSpritesRenderTime=!1,this._spritesRenderTime=new Xn.a,this._capturePhysicsTime=!1,this._physicsTime=new Xn.a,this._captureAnimationsTime=!1,this._animationsTime=new Xn.a,this._captureCameraRenderTime=!1,this._cameraRenderTime=new Xn.a,this._onBeforeActiveMeshesEvaluationObserver=null,this._onAfterActiveMeshesEvaluationObserver=null,this._onBeforeRenderTargetsRenderObserver=null,this._onAfterRenderTargetsRenderObserver=null,this._onAfterRenderObserver=null,this._onBeforeDrawPhaseObserver=null,this._onAfterDrawPhaseObserver=null,this._onBeforeAnimationsObserver=null,this._onBeforeParticlesRenderingObserver=null,this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver=null,this._onAfterSpritesRenderingObserver=null,this._onBeforePhysicsObserver=null,this._onAfterPhysicsObserver=null,this._onAfterAnimationsObserver=null,this._onBeforeCameraRenderObserver=null,this._onAfterCameraRenderObserver=null,this._onBeforeAnimationsObserver=t.onBeforeAnimationsObservable.add(function(){e._captureActiveMeshesEvaluationTime&&e._activeMeshesEvaluationTime.fetchNewFrame(),e._captureRenderTargetsRenderTime&&e._renderTargetsRenderTime.fetchNewFrame(),e._captureFrameTime&&(Ye.b.StartPerformanceCounter("Scene rendering"),e._frameTime.beginMonitoring()),e._captureInterFrameTime&&e._interFrameTime.endMonitoring(),e._captureParticlesRenderTime&&e._particlesRenderTime.fetchNewFrame(),e._captureSpritesRenderTime&&e._spritesRenderTime.fetchNewFrame(),e._captureAnimationsTime&&e._animationsTime.beginMonitoring(),e.scene.getEngine()._drawCalls.fetchNewFrame()}),this._onAfterRenderObserver=t.onAfterRenderObservable.add(function(){e._captureFrameTime&&(Ye.b.EndPerformanceCounter("Scene rendering"),e._frameTime.endMonitoring()),e._captureRenderTime&&e._renderTime.endMonitoring(!1),e._captureInterFrameTime&&e._interFrameTime.beginMonitoring()})}return Object.defineProperty(r.prototype,"activeMeshesEvaluationTimeCounter",{get:function(){return this._activeMeshesEvaluationTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureActiveMeshesEvaluationTime",{get:function(){return this._captureActiveMeshesEvaluationTime},set:function(t){var e=this;t!==this._captureActiveMeshesEvaluationTime&&(this._captureActiveMeshesEvaluationTime=t,t?(this._onBeforeActiveMeshesEvaluationObserver=this.scene.onBeforeActiveMeshesEvaluationObservable.add(function(){Ye.b.StartPerformanceCounter("Active meshes evaluation"),e._activeMeshesEvaluationTime.beginMonitoring()}),this._onAfterActiveMeshesEvaluationObserver=this.scene.onAfterActiveMeshesEvaluationObservable.add(function(){Ye.b.EndPerformanceCounter("Active meshes evaluation"),e._activeMeshesEvaluationTime.endMonitoring()})):(this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderTargetsRenderTimeCounter",{get:function(){return this._renderTargetsRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureRenderTargetsRenderTime",{get:function(){return this._captureRenderTargetsRenderTime},set:function(t){var e=this;t!==this._captureRenderTargetsRenderTime&&(this._captureRenderTargetsRenderTime=t,t?(this._onBeforeRenderTargetsRenderObserver=this.scene.onBeforeRenderTargetsRenderObservable.add(function(){Ye.b.StartPerformanceCounter("Render targets rendering"),e._renderTargetsRenderTime.beginMonitoring()}),this._onAfterRenderTargetsRenderObserver=this.scene.onAfterRenderTargetsRenderObservable.add(function(){Ye.b.EndPerformanceCounter("Render targets rendering"),e._renderTargetsRenderTime.endMonitoring(!1)})):(this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"particlesRenderTimeCounter",{get:function(){return this._particlesRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureParticlesRenderTime",{get:function(){return this._captureParticlesRenderTime},set:function(t){var e=this;t!==this._captureParticlesRenderTime&&(this._captureParticlesRenderTime=t,t?(this._onBeforeParticlesRenderingObserver=this.scene.onBeforeParticlesRenderingObservable.add(function(){Ye.b.StartPerformanceCounter("Particles"),e._particlesRenderTime.beginMonitoring()}),this._onAfterParticlesRenderingObserver=this.scene.onAfterParticlesRenderingObservable.add(function(){Ye.b.EndPerformanceCounter("Particles"),e._particlesRenderTime.endMonitoring(!1)})):(this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"spritesRenderTimeCounter",{get:function(){return this._spritesRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureSpritesRenderTime",{get:function(){return this._captureSpritesRenderTime},set:function(t){var e=this;t!==this._captureSpritesRenderTime&&(this._captureSpritesRenderTime=t,this.scene.spriteManagers&&(t?(this._onBeforeSpritesRenderingObserver=this.scene.onBeforeSpritesRenderingObservable.add(function(){Ye.b.StartPerformanceCounter("Sprites"),e._spritesRenderTime.beginMonitoring()}),this._onAfterSpritesRenderingObserver=this.scene.onAfterSpritesRenderingObservable.add(function(){Ye.b.EndPerformanceCounter("Sprites"),e._spritesRenderTime.endMonitoring(!1)})):(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null,this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null)))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"physicsTimeCounter",{get:function(){return this._physicsTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"capturePhysicsTime",{get:function(){return this._capturePhysicsTime},set:function(t){var e=this;t!==this._capturePhysicsTime&&this.scene.onBeforePhysicsObservable&&(this._capturePhysicsTime=t,t?(this._onBeforePhysicsObserver=this.scene.onBeforePhysicsObservable.add(function(){Ye.b.StartPerformanceCounter("Physics"),e._physicsTime.beginMonitoring()}),this._onAfterPhysicsObserver=this.scene.onAfterPhysicsObservable.add(function(){Ye.b.EndPerformanceCounter("Physics"),e._physicsTime.endMonitoring()})):(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null,this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"animationsTimeCounter",{get:function(){return this._animationsTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureAnimationsTime",{get:function(){return this._captureAnimationsTime},set:function(t){var e=this;t!==this._captureAnimationsTime&&(this._captureAnimationsTime=t,t?this._onAfterAnimationsObserver=this.scene.onAfterAnimationsObservable.add(function(){e._animationsTime.endMonitoring()}):(this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"frameTimeCounter",{get:function(){return this._frameTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureFrameTime",{get:function(){return this._captureFrameTime},set:function(t){this._captureFrameTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"interFrameTimeCounter",{get:function(){return this._interFrameTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureInterFrameTime",{get:function(){return this._captureInterFrameTime},set:function(t){this._captureInterFrameTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderTimeCounter",{get:function(){return this._renderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureRenderTime",{get:function(){return this._captureRenderTime},set:function(t){var e=this;t!==this._captureRenderTime&&(this._captureRenderTime=t,t?(this._onBeforeDrawPhaseObserver=this.scene.onBeforeDrawPhaseObservable.add(function(){e._renderTime.beginMonitoring(),Ye.b.StartPerformanceCounter("Main render")}),this._onAfterDrawPhaseObserver=this.scene.onAfterDrawPhaseObservable.add(function(){e._renderTime.endMonitoring(!1),Ye.b.EndPerformanceCounter("Main render")})):(this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cameraRenderTimeCounter",{get:function(){return this._cameraRenderTime},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"captureCameraRenderTime",{get:function(){return this._captureCameraRenderTime},set:function(t){var e=this;t!==this._captureCameraRenderTime&&(this._captureCameraRenderTime=t,t?(this._onBeforeCameraRenderObserver=this.scene.onBeforeCameraRenderObservable.add(function(n){e._cameraRenderTime.beginMonitoring(),Ye.b.StartPerformanceCounter("Rendering camera "+n.name)}),this._onAfterCameraRenderObserver=this.scene.onAfterCameraRenderObservable.add(function(n){e._cameraRenderTime.endMonitoring(!1),Ye.b.EndPerformanceCounter("Rendering camera "+n.name)})):(this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"drawCallsCounter",{get:function(){return this.scene.getEngine()._drawCalls},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this.scene.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=null,this.scene.onBeforeActiveMeshesEvaluationObservable.remove(this._onBeforeActiveMeshesEvaluationObserver),this._onBeforeActiveMeshesEvaluationObserver=null,this.scene.onAfterActiveMeshesEvaluationObservable.remove(this._onAfterActiveMeshesEvaluationObserver),this._onAfterActiveMeshesEvaluationObserver=null,this.scene.onBeforeRenderTargetsRenderObservable.remove(this._onBeforeRenderTargetsRenderObserver),this._onBeforeRenderTargetsRenderObserver=null,this.scene.onAfterRenderTargetsRenderObservable.remove(this._onAfterRenderTargetsRenderObserver),this._onAfterRenderTargetsRenderObserver=null,this.scene.onBeforeAnimationsObservable.remove(this._onBeforeAnimationsObserver),this._onBeforeAnimationsObserver=null,this.scene.onBeforeParticlesRenderingObservable.remove(this._onBeforeParticlesRenderingObserver),this._onBeforeParticlesRenderingObserver=null,this.scene.onAfterParticlesRenderingObservable.remove(this._onAfterParticlesRenderingObserver),this._onAfterParticlesRenderingObserver=null,this._onBeforeSpritesRenderingObserver&&(this.scene.onBeforeSpritesRenderingObservable.remove(this._onBeforeSpritesRenderingObserver),this._onBeforeSpritesRenderingObserver=null),this._onAfterSpritesRenderingObserver&&(this.scene.onAfterSpritesRenderingObservable.remove(this._onAfterSpritesRenderingObserver),this._onAfterSpritesRenderingObserver=null),this.scene.onBeforeDrawPhaseObservable.remove(this._onBeforeDrawPhaseObserver),this._onBeforeDrawPhaseObserver=null,this.scene.onAfterDrawPhaseObservable.remove(this._onAfterDrawPhaseObserver),this._onAfterDrawPhaseObserver=null,this._onBeforePhysicsObserver&&(this.scene.onBeforePhysicsObservable.remove(this._onBeforePhysicsObserver),this._onBeforePhysicsObserver=null),this._onAfterPhysicsObserver&&(this.scene.onAfterPhysicsObservable.remove(this._onAfterPhysicsObserver),this._onAfterPhysicsObserver=null),this.scene.onAfterAnimationsObservable.remove(this._onAfterAnimationsObserver),this._onAfterAnimationsObserver=null,this.scene.onBeforeCameraRenderObservable.remove(this._onBeforeCameraRenderObserver),this._onBeforeCameraRenderObserver=null,this.scene.onAfterCameraRenderObservable.remove(this._onAfterCameraRenderObserver),this._onAfterCameraRenderObserver=null,this.scene=null},r}(),M_=`#ifdef DIFFUSE -varying vec2 vUVDiffuse; -uniform sampler2D diffuseSampler; -#endif -#ifdef OPACITY -varying vec2 vUVOpacity; -uniform sampler2D opacitySampler; -uniform float opacityIntensity; -#endif -#ifdef EMISSIVE -varying vec2 vUVEmissive; -uniform sampler2D emissiveSampler; -#endif -#ifdef VERTEXALPHA -varying vec4 vColor; -#endif -uniform vec4 glowColor; -void main(void) -{ -vec4 finalColor=glowColor; - -#ifdef DIFFUSE -vec4 albedoTexture=texture2D(diffuseSampler,vUVDiffuse); -#ifdef GLOW - -finalColor.a*=albedoTexture.a; -#endif -#ifdef HIGHLIGHT - -finalColor.a=albedoTexture.a; -#endif -#endif -#ifdef OPACITY -vec4 opacityMap=texture2D(opacitySampler,vUVOpacity); -#ifdef OPACITYRGB -finalColor.a*=getLuminance(opacityMap.rgb); -#else -finalColor.a*=opacityMap.a; -#endif -finalColor.a*=opacityIntensity; -#endif -#ifdef VERTEXALPHA -finalColor.a*=vColor.a; -#endif -#ifdef ALPHATEST -if (finalColor.a -#include -#include[0..maxSimultaneousMorphTargets] - -#include -uniform mat4 viewProjection; -varying vec4 vPosition; -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#ifdef DIFFUSE -varying vec2 vUVDiffuse; -uniform mat4 diffuseMatrix; -#endif -#ifdef OPACITY -varying vec2 vUVOpacity; -uniform mat4 opacityMatrix; -#endif -#ifdef EMISSIVE -varying vec2 vUVEmissive; -uniform mat4 emissiveMatrix; -#endif -#ifdef VERTEXALPHA -attribute vec4 color; -varying vec4 vColor; -#endif -void main(void) -{ -vec3 positionUpdated=position; -#ifdef UV1 -vec2 uvUpdated=uv; -#endif -#include[0..maxSimultaneousMorphTargets] -#include -#include -#ifdef CUBEMAP -vPosition=finalWorld*vec4(positionUpdated,1.0); -gl_Position=viewProjection*finalWorld*vec4(position,1.0); -#else -vPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); -gl_Position=vPosition; -#endif -#ifdef DIFFUSE -#ifdef DIFFUSEUV1 -vUVDiffuse=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#ifdef DIFFUSEUV2 -vUVDiffuse=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -#endif -#endif -#ifdef OPACITY -#ifdef OPACITYUV1 -vUVOpacity=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#ifdef OPACITYUV2 -vUVOpacity=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); -#endif -#endif -#ifdef EMISSIVE -#ifdef EMISSIVEUV1 -vUVEmissive=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#ifdef EMISSIVEUV2 -vUVEmissive=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); -#endif -#endif -#ifdef VERTEXALPHA -vColor=color; -#endif -}`;je.a.ShadersStore.glowMapGenerationVertexShader=I_;var _o=function(){function r(t,e){this._vertexBuffers={},this._maxSize=0,this._mainTextureDesiredSize={width:0,height:0},this._shouldRender=!0,this._postProcesses=[],this._textures=[],this._emissiveTextureAndColor={texture:null,color:new O.b},this.neutralColor=new O.b,this.isEnabled=!0,this.disableBoundingBoxesFromEffectLayer=!1,this.onDisposeObservable=new P.c,this.onBeforeRenderMainTextureObservable=new P.c,this.onBeforeComposeObservable=new P.c,this.onBeforeRenderMeshToEffect=new P.c,this.onAfterRenderMeshToEffect=new P.c,this.onAfterComposeObservable=new P.c,this.onSizeChangedObservable=new P.c,this.name=t,this._scene=e||te.a.LastCreatedScene,r._SceneComponentInitialization(this._scene),this._engine=this._scene.getEngine(),this._maxSize=this._engine.getCaps().maxTextureSize,this._scene.effectLayers.push(this),this._generateIndexBuffer(),this._generateVertexBuffer()}return Object.defineProperty(r.prototype,"camera",{get:function(){return this._effectLayerOptions.camera},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderingGroupId",{get:function(){return this._effectLayerOptions.renderingGroupId},set:function(t){this._effectLayerOptions.renderingGroupId=t},enumerable:!1,configurable:!0}),r.prototype._init=function(t){this._effectLayerOptions=Object(c.a)({mainTextureRatio:.5,alphaBlendingMode:h.a.ALPHA_COMBINE,camera:null,renderingGroupId:-1},t),this._setMainTextureSize(),this._createMainTexture(),this._createTextureAndPostProcesses(),this._mergeEffect=this._createMergeEffect()},r.prototype._generateIndexBuffer=function(){var t=[];t.push(0),t.push(1),t.push(2),t.push(0),t.push(2),t.push(3),this._indexBuffer=this._engine.createIndexBuffer(t)},r.prototype._generateVertexBuffer=function(){var t=[];t.push(1,1),t.push(-1,1),t.push(-1,-1),t.push(1,-1);var e=new Me.b(this._engine,t,Me.b.PositionKind,!1,!1,2);this._vertexBuffers[Me.b.PositionKind]=e},r.prototype._setMainTextureSize=function(){this._effectLayerOptions.mainTextureFixedSize?(this._mainTextureDesiredSize.width=this._effectLayerOptions.mainTextureFixedSize,this._mainTextureDesiredSize.height=this._effectLayerOptions.mainTextureFixedSize):(this._mainTextureDesiredSize.width=this._engine.getRenderWidth()*this._effectLayerOptions.mainTextureRatio,this._mainTextureDesiredSize.height=this._engine.getRenderHeight()*this._effectLayerOptions.mainTextureRatio,this._mainTextureDesiredSize.width=this._engine.needPOTTextures?Ve.a.GetExponentOfTwo(this._mainTextureDesiredSize.width,this._maxSize):this._mainTextureDesiredSize.width,this._mainTextureDesiredSize.height=this._engine.needPOTTextures?Ve.a.GetExponentOfTwo(this._mainTextureDesiredSize.height,this._maxSize):this._mainTextureDesiredSize.height),this._mainTextureDesiredSize.width=Math.floor(this._mainTextureDesiredSize.width),this._mainTextureDesiredSize.height=Math.floor(this._mainTextureDesiredSize.height)},r.prototype._createMainTexture=function(){var t=this;this._mainTexture=new ln("HighlightLayerMainRTT",{width:this._mainTextureDesiredSize.width,height:this._mainTextureDesiredSize.height},this._scene,!1,!0,h.a.TEXTURETYPE_UNSIGNED_INT),this._mainTexture.activeCamera=this._effectLayerOptions.camera,this._mainTexture.wrapU=we.a.CLAMP_ADDRESSMODE,this._mainTexture.wrapV=we.a.CLAMP_ADDRESSMODE,this._mainTexture.anisotropicFilteringLevel=1,this._mainTexture.updateSamplingMode(we.a.BILINEAR_SAMPLINGMODE),this._mainTexture.renderParticles=!1,this._mainTexture.renderList=null,this._mainTexture.ignoreCameraViewport=!0,this._mainTexture.customRenderFunction=function(n,i,o,a){var s;t.onBeforeRenderMainTextureObservable.notifyObservers(t);var d=t._scene.getEngine();if(a.length){for(d.setColorWrite(!1),s=0;s4&&(a.push(Me.b.MatricesIndicesExtraKind),a.push(Me.b.MatricesWeightsExtraKind)),o.push("#define NUM_BONE_INFLUENCERS "+s.numBoneInfluencers);var z=s.skeleton;z&&z.isUsingTextureForMatrices?o.push("#define BONETEXTURE"):o.push("#define BonesPerMesh "+(z?z.bones.length+1:0)),s.numBoneInfluencers>0&&F.addCPUSkinningFallback(0,s)}else o.push("#define NUM_BONE_INFLUENCERS 0");var J=s.morphTargetManager,ie=0;J&&J.numInfluencers>0&&(o.push("#define MORPHTARGETS"),ie=J.numInfluencers,o.push("#define NUM_MORPH_INFLUENCERS "+ie),tt.a.PrepareAttributesForMorphTargetsInfluencers(a,s,ie)),e&&(o.push("#define INSTANCES"),tt.a.PushAttributesForInstances(a),t.getRenderingMesh().hasThinInstances&&o.push("#define THIN_INSTANCES")),this._addCustomEffectDefines(o);var se=o.join(` -`);return this._cachedDefines!==se&&(this._cachedDefines=se,this._effectLayerMapGenerationEffect=this._scene.getEngine().createEffect("glowMapGeneration",a,["world","mBones","viewProjection","glowColor","morphTargetInfluences","boneTextureWidth","diffuseMatrix","emissiveMatrix","opacityMatrix","opacityIntensity"],["diffuseSampler","emissiveSampler","opacitySampler","boneSampler"],se,F,void 0,void 0,{maxSimultaneousMorphTargets:ie})),this._effectLayerMapGenerationEffect.isReady()},r.prototype.render=function(){var t=this._mergeEffect;if(t.isReady()){for(var e=0;e-1&&this._scene.effectLayers.splice(e,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onBeforeRenderMainTextureObservable.clear(),this.onBeforeComposeObservable.clear(),this.onBeforeRenderMeshToEffect.clear(),this.onAfterRenderMeshToEffect.clear(),this.onAfterComposeObservable.clear(),this.onSizeChangedObservable.clear()},r.prototype.getClassName=function(){return"EffectLayer"},r.Parse=function(t,e,n){return Ye.b.Instantiate(t.customType).Parse(t,e,n)},r._SceneComponentInitialization=function(t){throw xn.a.WarnImport("EffectLayerSceneComponent")},Object(c.c)([Object(L.c)()],r.prototype,"name",void 0),Object(c.c)([Object(L.f)()],r.prototype,"neutralColor",void 0),Object(c.c)([Object(L.c)()],r.prototype,"isEnabled",void 0),Object(c.c)([Object(L.d)()],r.prototype,"camera",null),Object(c.c)([Object(L.c)()],r.prototype,"renderingGroupId",null),Object(c.c)([Object(L.c)()],r.prototype,"disableBoundingBoxesFromEffectLayer",void 0),r}();B.a.AddParser(st.a.NAME_EFFECTLAYER,function(r,t,e,n){if(r.effectLayers){e.effectLayers||(e.effectLayers=new Array);for(var i=0;i0){this._previousStencilState=this._engine.getStencilBuffer();for(var i=0,o=n;i-1)){this._renderEffects=!0,this._needStencil=this._needStencil||a.needStencil();var s=a._mainTexture;s._shouldRender()&&(this.scene.incrementRenderId(),s.render(!1,!1),e=!0)}}this.scene.incrementRenderId()}return e},r.prototype._setStencil=function(){this._needStencil&&this._engine.setStencilBuffer(!0)},r.prototype._setStencilBack=function(){this._needStencil&&this._engine.setStencilBuffer(this._previousStencilState)},r.prototype._draw=function(t){if(this._renderEffects){this._engine.setDepthBuffer(!1);for(var e=this.scene.effectLayers,n=0;n-1},t.prototype.referenceMeshToUseItsOwnMaterial=function(e){this._meshesUsingTheirOwnMaterials.push(e.uniqueId)},t.prototype.unReferenceMeshFromUsingItsOwnMaterial=function(e){for(var n=this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId);n>=0;)this._meshesUsingTheirOwnMaterials.splice(n,1),n=this._meshesUsingTheirOwnMaterials.indexOf(e.uniqueId)},t.prototype._disposeMesh=function(e){this.removeIncludedOnlyMesh(e),this.removeExcludedMesh(e)},t.prototype.getClassName=function(){return"GlowLayer"},t.prototype.serialize=function(){var e,n=L.a.Serialize(this);if(n.customType="BABYLON.GlowLayer",n.includedMeshes=[],this._includedOnlyMeshes.length)for(e=0;e0&&t.isBackground===e&&t.renderTargetTextures.indexOf(i)>-1&&(t.layerMask&n)!=0},r.prototype._drawRenderTargetBackground=function(t){var e=this;this._draw(function(n){return e._drawRenderTargetPredicate(n,!0,e.scene.activeCamera.layerMask,t)})},r.prototype._drawRenderTargetForeground=function(t){var e=this;this._draw(function(n){return e._drawRenderTargetPredicate(n,!1,e.scene.activeCamera.layerMask,t)})},r.prototype.addFromContainer=function(t){var e=this;t.layers&&t.layers.forEach(function(n){e.scene.layers.push(n)})},r.prototype.removeFromContainer=function(t,e){var n=this;e===void 0&&(e=!1),t.layers&&t.layers.forEach(function(i){var o=n.scene.layers.indexOf(i);o!==-1&&n.scene.layers.splice(o,1),e&&i.dispose()})},r}(),w_=` -varying vec2 vUV; -uniform sampler2D textureSampler; - -uniform vec4 color; - -#include -void main(void) { -vec4 baseColor=texture2D(textureSampler,vUV); -#ifdef LINEAR -baseColor.rgb=toGammaSpace(baseColor.rgb); -#endif -#ifdef ALPHATEST -if (baseColor.a<0.4) -discard; -#endif -gl_FragColor=baseColor*color; -}`;je.a.ShadersStore.layerPixelShader=w_;var F_=` -attribute vec2 position; - -uniform vec2 scale; -uniform vec2 offset; -uniform mat4 textureMatrix; - -varying vec2 vUV; -const vec2 madd=vec2(0.5,0.5); -void main(void) { -vec2 shiftedPosition=position*scale+offset; -vUV=vec2(textureMatrix*vec4(shiftedPosition*madd+madd,1.0,0.0)); -gl_Position=vec4(shiftedPosition,0.0,1.0); -}`;je.a.ShadersStore.layerVertexShader=F_;var B_=function(){function r(t,e,n,i,o){this.name=t,this.scale=new l.d(1,1),this.offset=new l.d(0,0),this.alphaBlendingMode=h.a.ALPHA_COMBINE,this.layerMask=268435455,this.renderTargetTextures=[],this.renderOnlyInRenderTargetTextures=!1,this._vertexBuffers={},this.onDisposeObservable=new P.c,this.onBeforeRenderObservable=new P.c,this.onAfterRenderObservable=new P.c,this.texture=e?new we.a(e,n,!0):null,this.isBackground=i===void 0||i,this.color=o===void 0?new O.b(1,1,1,1):o,this._scene=n||te.a.LastCreatedScene;var a=this._scene._getComponent(st.a.NAME_LAYER);a||(a=new Nu(this._scene),this._scene._addComponent(a)),this._scene.layers.push(this);var s=this._scene.getEngine(),d=[];d.push(1,1),d.push(-1,1),d.push(-1,-1),d.push(1,-1);var p=new Me.b(s,d,Me.b.PositionKind,!1,!1,2);this._vertexBuffers[Me.b.PositionKind]=p,this._createIndexBuffer()}return Object.defineProperty(r.prototype,"onDispose",{set:function(t){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onBeforeRender",{set:function(t){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onAfterRender",{set:function(t){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(t)},enumerable:!1,configurable:!0}),r.prototype._createIndexBuffer=function(){var t=this._scene.getEngine(),e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=t.createIndexBuffer(e)},r.prototype._rebuild=function(){var t=this._vertexBuffers[Me.b.PositionKind];t&&t._rebuild(),this._createIndexBuffer()},r.prototype.render=function(){var t=this._scene.getEngine(),e="";this.alphaTest&&(e="#define ALPHATEST"),this.texture&&!this.texture.gammaSpace&&(e+=`\r -#define LINEAR`),this._previousDefines!==e&&(this._previousDefines=e,this._effect=t.createEffect("layer",[Me.b.PositionKind],["textureMatrix","color","scale","offset"],["textureSampler"],e));var n=this._effect;n&&n.isReady()&&this.texture&&this.texture.isReady()&&(t=this._scene.getEngine(),this.onBeforeRenderObservable.notifyObservers(this),t.enableEffect(n),t.setState(!1),n.setTexture("textureSampler",this.texture),n.setMatrix("textureMatrix",this.texture.getTextureMatrix()),n.setFloat4("color",this.color.r,this.color.g,this.color.b,this.color.a),n.setVector2("offset",this.offset),n.setVector2("scale",this.scale),t.bindBuffers(this._vertexBuffers,this._indexBuffer,n),this.alphaTest?t.drawElementsType(Ht.a.TriangleFillMode,0,6):(t.setAlphaMode(this.alphaBlendingMode),t.drawElementsType(Ht.a.TriangleFillMode,0,6),t.setAlphaMode(h.a.ALPHA_DISABLE)),this.onAfterRenderObservable.notifyObservers(this))},r.prototype.dispose=function(){var t=this._vertexBuffers[Me.b.PositionKind];t&&(t.dispose(),this._vertexBuffers[Me.b.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this.texture&&(this.texture.dispose(),this.texture=null),this.renderTargetTextures=[];var e=this._scene.layers.indexOf(this);this._scene.layers.splice(e,1),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderObservable.clear()},r}(),wu=function(){function r(t,e,n,i,o){this.size=t,this.position=e,this.alphaMode=h.a.ALPHA_ONEONE,this.color=n||new O.a(1,1,1),this.texture=i?new we.a(i,o.getScene(),!0):null,this._system=o,o.lensFlares.push(this)}return r.AddFlare=function(t,e,n,i,o){return new r(t,e,n,i,o)},r.prototype.dispose=function(){this.texture&&this.texture.dispose();var t=this._system.lensFlares.indexOf(this);this._system.lensFlares.splice(t,1)},r}(),U_=` -varying vec2 vUV; -uniform sampler2D textureSampler; - -uniform vec4 color; -void main(void) { -vec4 baseColor=texture2D(textureSampler,vUV); -gl_FragColor=baseColor*color; -}`;je.a.ShadersStore.lensFlarePixelShader=U_;var V_=` -attribute vec2 position; - -uniform mat4 viewportMatrix; - -varying vec2 vUV; -const vec2 madd=vec2(0.5,0.5); -void main(void) { -vUV=position*madd+madd; -gl_Position=viewportMatrix*vec4(position,0.0,1.0); -}`;je.a.ShadersStore.lensFlareVertexShader=V_;var qs=function(){function r(t,e,n){this.name=t,this.lensFlares=new Array,this.borderLimit=300,this.viewportBorder=0,this.layerMask=268435455,this._vertexBuffers={},this._isEnabled=!0,this._scene=n||te.a.LastCreatedScene,r._SceneComponentInitialization(this._scene),this._emitter=e,this.id=t,n.lensFlareSystems.push(this),this.meshesSelectionPredicate=function(s){return n.activeCamera&&s.material&&s.isVisible&&s.isEnabled()&&s.isBlocker&&(s.layerMask&n.activeCamera.layerMask)!=0};var i=n.getEngine(),o=[];o.push(1,1),o.push(-1,1),o.push(-1,-1),o.push(1,-1),this._vertexBuffers[Me.b.PositionKind]=new Me.b(i,o,Me.b.PositionKind,!1,!1,2);var a=[];a.push(0),a.push(1),a.push(2),a.push(0),a.push(2),a.push(3),this._indexBuffer=i.createIndexBuffer(a),this._effect=i.createEffect("lensFlare",[Me.b.PositionKind],["color","viewportMatrix"],["textureSampler"],"")}return Object.defineProperty(r.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(t){this._isEnabled=t},enumerable:!1,configurable:!0}),r.prototype.getScene=function(){return this._scene},r.prototype.getEmitter=function(){return this._emitter},r.prototype.setEmitter=function(t){this._emitter=t},r.prototype.getEmitterPosition=function(){return this._emitter.getAbsolutePosition?this._emitter.getAbsolutePosition():this._emitter.position},r.prototype.computeEffectivePosition=function(t){var e=this.getEmitterPosition();return e=l.e.Project(e,l.a.Identity(),this._scene.getTransformMatrix(),t),this._positionX=e.x,this._positionY=e.y,e=l.e.TransformCoordinates(this.getEmitterPosition(),this._scene.getViewMatrix()),this.viewportBorder>0&&(t.x-=this.viewportBorder,t.y-=this.viewportBorder,t.width+=2*this.viewportBorder,t.height+=2*this.viewportBorder,e.x+=this.viewportBorder,e.y+=this.viewportBorder,this._positionX+=this.viewportBorder,this._positionY+=this.viewportBorder),e.z>0&&(this._positionX>t.x&&this._positionXt.y&&(this._positionY,t.y,t.height),!0)},r.prototype._isVisible=function(){if(!this._isEnabled||!this._scene.activeCamera)return!1;var t=this.getEmitterPosition().subtract(this._scene.activeCamera.globalPosition),e=t.length();t.normalize();var n=new pn.a(this._scene.activeCamera.globalPosition,t),i=this._scene.pickWithRay(n,this.meshesSelectionPredicate,!0);return!i||!i.hit||i.distance>e},r.prototype.render=function(){if(!this._effect.isReady()||!this._scene.activeCamera)return!1;var t,e,n=this._scene.getEngine(),i=this._scene.activeCamera.viewport.toGlobal(n.getRenderWidth(!0),n.getRenderHeight(!0));if(!this.computeEffectivePosition(i)||!this._isVisible())return!1;var o=(t=this._positionXi.x+i.width-this.borderLimit?this._positionX-i.x-i.width+this.borderLimit:0)>(e=this._positionYi.y+i.height-this.borderLimit?this._positionY-i.y-i.height+this.borderLimit:0)?t:e;(o-=this.viewportBorder)>this.borderLimit&&(o=this.borderLimit);var a=1-$.a.Clamp(o/this.borderLimit,0,1);if(a<0)return!1;a>1&&(a=1),this.viewportBorder>0&&(i.x+=this.viewportBorder,i.y+=this.viewportBorder,i.width-=2*this.viewportBorder,i.height-=2*this.viewportBorder,this._positionX-=this.viewportBorder,this._positionY-=this.viewportBorder);var s=i.x+i.width/2,d=i.y+i.height/2,p=s-this._positionX,y=d-this._positionY;n.enableEffect(this._effect),n.setState(!1),n.setDepthBuffer(!1),n.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect);for(var C=0;C0);for(var n=0,i=e;n0)}},r}();qs._SceneComponentInitialization=function(r){var t=r._getComponent(st.a.NAME_LENSFLARESYSTEM);t||(t=new Fu(r),r._addComponent(t))};var k_=` - - - - -float bayerDither2(vec2 _P) { -return mod(2.0*_P.y+_P.x+1.0,4.0); -} - - -float bayerDither4(vec2 _P) { -vec2 P1=mod(_P,2.0); -vec2 P2=floor(0.5*mod(_P,4.0)); -return 4.0*bayerDither2(P1)+bayerDither2(P2); -} - -float bayerDither8(vec2 _P) { -vec2 P1=mod(_P,2.0); -vec2 P2=floor(0.5*mod(_P,4.0)); -vec2 P4=floor(0.25*mod(_P,8.0)); -return 4.0*(4.0*bayerDither2(P1)+bayerDither2(P2))+bayerDither2(P4); -} -`;je.a.IncludesShadersStore.bayerDitherFunctions=k_;var G_=`#if SM_FLOAT == 0 -#include -#endif -#if SM_SOFTTRANSPARENTSHADOW == 1 -#include -uniform float softTransparentShadowSM; -#endif -varying float vDepthMetricSM; -#if SM_USEDISTANCE == 1 -uniform vec3 lightDataSM; -varying vec3 vPositionWSM; -#endif -uniform vec3 biasAndScaleSM; -uniform vec2 depthValuesSM; -#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1 -varying float zSM; -#endif -`;je.a.IncludesShadersStore.shadowMapFragmentDeclaration=G_;var z_=` float depthSM=vDepthMetricSM; -#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1 -#if SM_USEDISTANCE == 1 -depthSM=clamp(((length(vPositionWSM-lightDataSM)+depthValuesSM.x)/(depthValuesSM.y))+biasAndScaleSM.x,0.0,1.0); -#else -depthSM=clamp(((zSM+depthValuesSM.x)/(depthValuesSM.y))+biasAndScaleSM.x,0.0,1.0); -#endif -gl_FragDepth=depthSM; -#elif SM_USEDISTANCE == 1 -depthSM=(length(vPositionWSM-lightDataSM)+depthValuesSM.x)/(depthValuesSM.y)+biasAndScaleSM.x; -#endif -#if SM_ESM == 1 -depthSM=clamp(exp(-min(87.,biasAndScaleSM.z*depthSM)),0.,1.); -#endif -#if SM_FLOAT == 1 -gl_FragColor=vec4(depthSM,1.0,1.0,1.0); -#else -gl_FragColor=pack(depthSM); -#endif -return;`;je.a.IncludesShadersStore.shadowMapFragment=z_;var j_=`#include -#ifdef ALPHATEST -varying vec2 vUV; -uniform sampler2D diffuseSampler; -#endif -#include -void main(void) -{ -#include -#ifdef ALPHATEST -float alphaFromAlphaTexture=texture2D(diffuseSampler,vUV).a; -if (alphaFromAlphaTexture<0.4) -discard; -#endif -#if SM_SOFTTRANSPARENTSHADOW == 1 -#ifdef ALPHATEST -if ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM*alphaFromAlphaTexture) discard; -#else -if ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM) discard; -#endif -#endif -#include -}`;je.a.ShadersStore.shadowMapPixelShader=j_;var H_=`#if SM_NORMALBIAS == 1 -uniform vec3 lightDataSM; -#endif -uniform vec3 biasAndScaleSM; -uniform vec2 depthValuesSM; -varying float vDepthMetricSM; -#if SM_USEDISTANCE == 1 -varying vec3 vPositionWSM; -#endif -#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1 -varying float zSM; -#endif -`;je.a.IncludesShadersStore.shadowMapVertexDeclaration=H_;var W_=` -#if SM_NORMALBIAS == 1 -#if SM_DIRECTIONINLIGHTDATA == 1 -vec3 worldLightDirSM=normalize(-lightDataSM.xyz); -#else -vec3 directionToLightSM=lightDataSM.xyz-worldPos.xyz; -vec3 worldLightDirSM=normalize(directionToLightSM); -#endif -float ndlSM=dot(vNormalW,worldLightDirSM); -float sinNLSM=sqrt(1.0-ndlSM*ndlSM); -float normalBiasSM=biasAndScaleSM.y*sinNLSM; -worldPos.xyz-=vNormalW*normalBiasSM; -#endif -`;je.a.IncludesShadersStore.shadowMapVertexNormalBias=W_;var X_=`#if SM_USEDISTANCE == 1 -vPositionWSM=worldPos.xyz; -#endif -#if SM_DEPTHTEXTURE == 1 - -gl_Position.z+=biasAndScaleSM.x*gl_Position.w; -#endif -#if defined(SM_DEPTHCLAMP) && SM_DEPTHCLAMP == 1 -zSM=gl_Position.z; -gl_Position.z=0.0; -#elif SM_USEDISTANCE == 0 - -vDepthMetricSM=((gl_Position.z+depthValuesSM.x)/(depthValuesSM.y))+biasAndScaleSM.x; -#endif -`;je.a.IncludesShadersStore.shadowMapVertexMetric=X_;var Y_=` -attribute vec3 position; -#ifdef NORMAL -attribute vec3 normal; -#endif -#include -#include -#include[0..maxSimultaneousMorphTargets] - -#include -#include -uniform mat4 viewProjection; -#ifdef ALPHATEST -varying vec2 vUV; -uniform mat4 diffuseMatrix; -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#endif -#include -#include -void main(void) -{ -vec3 positionUpdated=position; -#ifdef UV1 -vec2 uvUpdated=uv; -#endif -#ifdef NORMAL -vec3 normalUpdated=normal; -#endif -#include[0..maxSimultaneousMorphTargets] -#include -#include -vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); -#ifdef NORMAL -mat3 normWorldSM=mat3(finalWorld); -#if defined(INSTANCES) && defined(THIN_INSTANCES) -vec3 vNormalW=normalUpdated/vec3(dot(normWorldSM[0],normWorldSM[0]),dot(normWorldSM[1],normWorldSM[1]),dot(normWorldSM[2],normWorldSM[2])); -vNormalW=normalize(normWorldSM*vNormalW); -#else -#ifdef NONUNIFORMSCALING -normWorldSM=transposeMat3(inverseMat3(normWorldSM)); -#endif -vec3 vNormalW=normalize(normWorldSM*normalUpdated); -#endif -#endif -#include - -gl_Position=viewProjection*worldPos; -#include -#ifdef ALPHATEST -#ifdef UV1 -vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#ifdef UV2 -vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -#endif -#endif -#include -}`;je.a.ShadersStore.shadowMapVertexShader=Y_;var K_=` -varying vec2 vUV; -uniform sampler2D textureSampler; - -uniform vec2 screenSize; -void main(void) -{ -vec4 colorDepth=vec4(0.0); -for (int x=-OFFSET; x<=OFFSET; x++) -for (int y=-OFFSET; y<=OFFSET; y++) -colorDepth+=texture2D(textureSampler,vUV+vec2(x,y)/screenSize); -gl_FragColor=(colorDepth/float((OFFSET*2+1)*(OFFSET*2+1))); -}`;je.a.ShadersStore.depthBoxBlurPixelShader=K_;var Q_=`#if SM_SOFTTRANSPARENTSHADOW == 1 -if ((bayerDither8(floor(mod(gl_FragCoord.xy,8.0))))/64.0>=softTransparentShadowSM*alpha) discard; -#endif -`;je.a.IncludesShadersStore.shadowMapFragmentSoftTransparentShadow=Q_;var Bu=new l.a,Uu=new l.a,Gn=function(){function r(t,e,n){this.onBeforeShadowMapRenderObservable=new P.c,this.onAfterShadowMapRenderObservable=new P.c,this.onBeforeShadowMapRenderMeshObservable=new P.c,this.onAfterShadowMapRenderMeshObservable=new P.c,this._bias=5e-5,this._normalBias=0,this._blurBoxOffset=1,this._blurScale=2,this._blurKernel=1,this._useKernelBlur=!1,this._filter=r.FILTER_NONE,this._filteringQuality=r.QUALITY_HIGH,this._contactHardeningLightSizeUVRatio=.1,this._darkness=0,this._transparencyShadow=!1,this.enableSoftTransparentShadow=!1,this.frustumEdgeFalloff=0,this.forceBackFacesOnly=!1,this._lightDirection=l.e.Zero(),this._viewMatrix=l.a.Zero(),this._projectionMatrix=l.a.Zero(),this._transformMatrix=l.a.Zero(),this._cachedPosition=new l.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cachedDirection=new l.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._currentFaceIndex=0,this._currentFaceIndexCache=0,this._defaultTextureMatrix=l.a.Identity(),this._mapSize=t,this._light=e,this._scene=e.getScene(),e._shadowGenerator=this,this.id=e.id,r._SceneComponentInitialization(this._scene);var i=this._scene.getEngine().getCaps();n?i.textureFloatRender&&i.textureFloatLinearFiltering?this._textureType=h.a.TEXTURETYPE_FLOAT:i.textureHalfFloatRender&&i.textureHalfFloatLinearFiltering?this._textureType=h.a.TEXTURETYPE_HALF_FLOAT:this._textureType=h.a.TEXTURETYPE_UNSIGNED_INT:i.textureHalfFloatRender&&i.textureHalfFloatLinearFiltering?this._textureType=h.a.TEXTURETYPE_HALF_FLOAT:i.textureFloatRender&&i.textureFloatLinearFiltering?this._textureType=h.a.TEXTURETYPE_FLOAT:this._textureType=h.a.TEXTURETYPE_UNSIGNED_INT,this._initializeGenerator(),this._applyFilterValues()}return Object.defineProperty(r.prototype,"bias",{get:function(){return this._bias},set:function(t){this._bias=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"normalBias",{get:function(){return this._normalBias},set:function(t){this._normalBias=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blurBoxOffset",{get:function(){return this._blurBoxOffset},set:function(t){this._blurBoxOffset!==t&&(this._blurBoxOffset=t,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blurScale",{get:function(){return this._blurScale},set:function(t){this._blurScale!==t&&(this._blurScale=t,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blurKernel",{get:function(){return this._blurKernel},set:function(t){this._blurKernel!==t&&(this._blurKernel=t,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useKernelBlur",{get:function(){return this._useKernelBlur},set:function(t){this._useKernelBlur!==t&&(this._useKernelBlur=t,this._disposeBlurPostProcesses())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthScale",{get:function(){return this._depthScale!==void 0?this._depthScale:this._light.getDepthScale()},set:function(t){this._depthScale=t},enumerable:!1,configurable:!0}),r.prototype._validateFilter=function(t){return t},Object.defineProperty(r.prototype,"filter",{get:function(){return this._filter},set:function(t){if(t=this._validateFilter(t),this._light.needCube()){if(t===r.FILTER_BLUREXPONENTIALSHADOWMAP)return void(this.useExponentialShadowMap=!0);if(t===r.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)return void(this.useCloseExponentialShadowMap=!0);if(t===r.FILTER_PCF||t===r.FILTER_PCSS)return void(this.usePoissonSampling=!0)}t!==r.FILTER_PCF&&t!==r.FILTER_PCSS||this._scene.getEngine().webGLVersion!==1?this._filter!==t&&(this._filter=t,this._disposeBlurPostProcesses(),this._applyFilterValues(),this._light._markMeshesAsLightDirty()):this.usePoissonSampling=!0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"usePoissonSampling",{get:function(){return this.filter===r.FILTER_POISSONSAMPLING},set:function(t){var e=this._validateFilter(r.FILTER_POISSONSAMPLING);(t||this.filter===r.FILTER_POISSONSAMPLING)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useExponentialShadowMap",{get:function(){return this.filter===r.FILTER_EXPONENTIALSHADOWMAP},set:function(t){var e=this._validateFilter(r.FILTER_EXPONENTIALSHADOWMAP);(t||this.filter===r.FILTER_EXPONENTIALSHADOWMAP)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useBlurExponentialShadowMap",{get:function(){return this.filter===r.FILTER_BLUREXPONENTIALSHADOWMAP},set:function(t){var e=this._validateFilter(r.FILTER_BLUREXPONENTIALSHADOWMAP);(t||this.filter===r.FILTER_BLUREXPONENTIALSHADOWMAP)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useCloseExponentialShadowMap",{get:function(){return this.filter===r.FILTER_CLOSEEXPONENTIALSHADOWMAP},set:function(t){var e=this._validateFilter(r.FILTER_CLOSEEXPONENTIALSHADOWMAP);(t||this.filter===r.FILTER_CLOSEEXPONENTIALSHADOWMAP)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useBlurCloseExponentialShadowMap",{get:function(){return this.filter===r.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP},set:function(t){var e=this._validateFilter(r.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP);(t||this.filter===r.FILTER_BLURCLOSEEXPONENTIALSHADOWMAP)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"usePercentageCloserFiltering",{get:function(){return this.filter===r.FILTER_PCF},set:function(t){var e=this._validateFilter(r.FILTER_PCF);(t||this.filter===r.FILTER_PCF)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"filteringQuality",{get:function(){return this._filteringQuality},set:function(t){this._filteringQuality!==t&&(this._filteringQuality=t,this._disposeBlurPostProcesses(),this._applyFilterValues(),this._light._markMeshesAsLightDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"useContactHardeningShadow",{get:function(){return this.filter===r.FILTER_PCSS},set:function(t){var e=this._validateFilter(r.FILTER_PCSS);(t||this.filter===r.FILTER_PCSS)&&(this.filter=t?e:r.FILTER_NONE)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"contactHardeningLightSizeUVRatio",{get:function(){return this._contactHardeningLightSizeUVRatio},set:function(t){this._contactHardeningLightSizeUVRatio=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"darkness",{get:function(){return this._darkness},set:function(t){this.setDarkness(t)},enumerable:!1,configurable:!0}),r.prototype.getDarkness=function(){return this._darkness},r.prototype.setDarkness=function(t){return this._darkness=t>=1?1:t<=0?0:t,this},Object.defineProperty(r.prototype,"transparencyShadow",{get:function(){return this._transparencyShadow},set:function(t){this.setTransparencyShadow(t)},enumerable:!1,configurable:!0}),r.prototype.setTransparencyShadow=function(t){return this._transparencyShadow=t,this},r.prototype.getShadowMap=function(){return this._shadowMap},r.prototype.getShadowMapForRendering=function(){return this._shadowMap2?this._shadowMap2:this._shadowMap},r.prototype.getClassName=function(){return r.CLASSNAME},r.prototype.addShadowCaster=function(t,e){var n;return e===void 0&&(e=!0),this._shadowMap?(this._shadowMap.renderList||(this._shadowMap.renderList=[]),this._shadowMap.renderList.push(t),e&&(n=this._shadowMap.renderList).push.apply(n,t.getChildMeshes()),this):this},r.prototype.removeShadowCaster=function(t,e){if(e===void 0&&(e=!0),!this._shadowMap||!this._shadowMap.renderList)return this;var n=this._shadowMap.renderList.indexOf(t);if(n!==-1&&this._shadowMap.renderList.splice(n,1),e)for(var i=0,o=t.getChildren();i1?(this._shadowMap=new ln(this._light.name+"_shadowMap",this._mapSize,this._scene,!1,!0,this._textureType,this._light.needCube(),void 0,!1,!1),this._shadowMap.createDepthStencilTexture(h.a.LESS,!0)):this._shadowMap=new ln(this._light.name+"_shadowMap",this._mapSize,this._scene,!1,!0,this._textureType,this._light.needCube())},r.prototype._initializeShadowMap=function(){var t=this;if(this._createTargetRenderTexture(),this._shadowMap!==null){this._shadowMap.wrapU=we.a.CLAMP_ADDRESSMODE,this._shadowMap.wrapV=we.a.CLAMP_ADDRESSMODE,this._shadowMap.anisotropicFilteringLevel=1,this._shadowMap.updateSamplingMode(we.a.BILINEAR_SAMPLINGMODE),this._shadowMap.renderParticles=!1,this._shadowMap.ignoreCameraViewport=!0,this._storedUniqueId&&(this._shadowMap.uniqueId=this._storedUniqueId),this._shadowMap.customRenderFunction=this._renderForShadowMap.bind(this),this._shadowMap.customIsReadyFunction=function(a,s){return!0};var e=this._scene.getEngine();this._shadowMap.onBeforeRenderObservable.add(function(a){if(t._currentFaceIndex=a,t._filter===r.FILTER_PCF&&e.setColorWrite(!1),t._scene.getSceneUniformBuffer().useUbo){var s=t._scene.getSceneUniformBuffer();s.updateMatrix("viewProjection",t.getTransformMatrix()),s.updateMatrix("view",t._viewMatrix),s.update()}}),this._shadowMap.onAfterUnbindObservable.add(function(){if(t._scene.getSceneUniformBuffer().useUbo){var a=t._scene.getSceneUniformBuffer();a.updateMatrix("viewProjection",t._scene.getTransformMatrix()),a.updateMatrix("view",t._scene.getViewMatrix()),a.update()}if(t._filter===r.FILTER_PCF&&e.setColorWrite(!0),t.useBlurExponentialShadowMap||t.useBlurCloseExponentialShadowMap){var s=t.getShadowMapForRendering();if(s){var d=s.getInternalTexture();t._scene.postProcessManager.directRender(t._blurPostProcesses,d,!0),e.unBindFramebuffer(d,!0)}}});var n=new O.b(0,0,0,0),i=new O.b(1,1,1,1);this._shadowMap.onClearObservable.add(function(a){t._filter===r.FILTER_PCF?a.clear(i,!1,!0,!1):t.useExponentialShadowMap||t.useBlurExponentialShadowMap?a.clear(n,!0,!0,!1):a.clear(i,!0,!0,!1)}),this._shadowMap.onResizeObservable.add(function(a){t._storedUniqueId=t._shadowMap.uniqueId,t._mapSize=a.getRenderSize(),t._light._markMeshesAsLightDirty(),t.recreateShadowMap()});for(var o=no.b.MIN_RENDERINGGROUPS;o=s.length)return void(t&&t(n));setTimeout(M,16)}};M()}else t&&t(this)}else t&&t(this)}else t&&t(this)},r.prototype.forceCompilationAsync=function(t){var e=this;return new Promise(function(n){e.forceCompilation(function(){n()},t)})},r.prototype._isReadyCustomDefines=function(t,e,n){},r.prototype._prepareShadowDefines=function(t,e,n,i){n.push("#define SM_FLOAT "+(this._textureType!==h.a.TEXTURETYPE_UNSIGNED_INT?"1":"0")),n.push("#define SM_ESM "+(this.useExponentialShadowMap||this.useBlurExponentialShadowMap?"1":"0")),n.push("#define SM_DEPTHTEXTURE "+(this.usePercentageCloserFiltering||this.useContactHardeningShadow?"1":"0"));var o=t.getMesh();return n.push("#define SM_NORMALBIAS "+(this.normalBias&&o.isVerticesDataPresent(Me.b.NormalKind)?"1":"0")),n.push("#define SM_DIRECTIONINLIGHTDATA "+(this.getLight().getTypeID()===Oi.a.LIGHTTYPEID_DIRECTIONALLIGHT?"1":"0")),n.push("#define SM_USEDISTANCE "+(this._light.needCube()?"1":"0")),n.push("#define SM_SOFTTRANSPARENTSHADOW "+(this.enableSoftTransparentShadow&&i?"1":"0")),this._isReadyCustomDefines(n,t,e),n},r.prototype.isReady=function(t,e,n){var i=t.getMaterial(),o=i?.shadowDepthWrapper,a=[];if(this._prepareShadowDefines(t,e,a,n),o){if(!o.isReadyForSubMesh(t,a,this,e))return!1}else{var s=[Me.b.PositionKind],d=t.getMesh();if(this.normalBias&&d.isVerticesDataPresent(Me.b.NormalKind)&&(s.push(Me.b.NormalKind),a.push("#define NORMAL"),d.nonUniformScaling&&a.push("#define NONUNIFORMSCALING")),i&&i.needAlphaTesting()){var p=i.getAlphaTestTexture();if(p){if(!p.isReady())return!1;a.push("#define ALPHATEST"),d.isVerticesDataPresent(Me.b.UVKind)&&(s.push(Me.b.UVKind),a.push("#define UV1")),d.isVerticesDataPresent(Me.b.UV2Kind)&&p.coordinatesIndex===1&&(s.push(Me.b.UV2Kind),a.push("#define UV2"))}}var y=new Ar.a;if(d.useBones&&d.computeBonesUsingShaders&&d.skeleton){s.push(Me.b.MatricesIndicesKind),s.push(Me.b.MatricesWeightsKind),d.numBoneInfluencers>4&&(s.push(Me.b.MatricesIndicesExtraKind),s.push(Me.b.MatricesWeightsExtraKind));var C=d.skeleton;a.push("#define NUM_BONE_INFLUENCERS "+d.numBoneInfluencers),d.numBoneInfluencers>0&&y.addCPUSkinningFallback(0,d),C.isUsingTextureForMatrices?a.push("#define BONETEXTURE"):a.push("#define BonesPerMesh "+(C.bones.length+1))}else a.push("#define NUM_BONE_INFLUENCERS 0");var M=d.morphTargetManager,U=0;M&&M.numInfluencers>0&&(a.push("#define MORPHTARGETS"),U=M.numInfluencers,a.push("#define NUM_MORPH_INFLUENCERS "+U),tt.a.PrepareAttributesForMorphTargetsInfluencers(s,d,U));var F=this._scene;if(F.clipPlane&&a.push("#define CLIPPLANE"),F.clipPlane2&&a.push("#define CLIPPLANE2"),F.clipPlane3&&a.push("#define CLIPPLANE3"),F.clipPlane4&&a.push("#define CLIPPLANE4"),F.clipPlane5&&a.push("#define CLIPPLANE5"),F.clipPlane6&&a.push("#define CLIPPLANE6"),e&&(a.push("#define INSTANCES"),tt.a.PushAttributesForInstances(s),t.getRenderingMesh().hasThinInstances&&a.push("#define THIN_INSTANCES")),this.customShaderOptions&&this.customShaderOptions.defines)for(var z=0,J=this.customShaderOptions.defines;z -#endif -void main(void) -{ -#ifdef ALPHATEST -if (texture2D(diffuseSampler,vUV).a<0.4) -discard; -#endif -#ifdef NONLINEARDEPTH -#ifdef PACKED -gl_FragColor=pack(gl_FragCoord.z); -#else -gl_FragColor=vec4(gl_FragCoord.z,0.0,0.0,0.0); -#endif -#else -#ifdef PACKED -gl_FragColor=pack(vDepthMetric); -#else -gl_FragColor=vec4(vDepthMetric,0.0,0.0,1.0); -#endif -#endif -}`;je.a.ShadersStore.depthPixelShader=q_;var Z_=` -attribute vec3 position; -#include -#include -#include[0..maxSimultaneousMorphTargets] - -#include -uniform mat4 viewProjection; -uniform vec2 depthValues; -#if defined(ALPHATEST) || defined(NEED_UV) -varying vec2 vUV; -uniform mat4 diffuseMatrix; -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#endif -varying float vDepthMetric; -void main(void) -{ -vec3 positionUpdated=position; -#ifdef UV1 -vec2 uvUpdated=uv; -#endif -#include[0..maxSimultaneousMorphTargets] -#include -#include -gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0); -vDepthMetric=((gl_Position.z+depthValues.x)/(depthValues.y)); -#if defined(ALPHATEST) || defined(BASIC_RENDER) -#ifdef UV1 -vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#ifdef UV2 -vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -#endif -#endif -} -`;je.a.ShadersStore.depthVertexShader=Z_;var ua=function(){function r(t,e,n,i){var o=this;e===void 0&&(e=h.a.TEXTURETYPE_FLOAT),n===void 0&&(n=null),i===void 0&&(i=!1),this.enabled=!0,this.useOnlyInActiveCamera=!1,this._scene=t,this._storeNonLinearDepth=i,this.isPacked=e===h.a.TEXTURETYPE_UNSIGNED_BYTE,this.isPacked?this._clearColor=new O.b(1,1,1,1):this._clearColor=new O.b(1,0,0,1),r._SceneComponentInitialization(this._scene),this._camera=n;var a=t.getEngine(),s=this.isPacked||a.webGLVersion===1?h.a.TEXTUREFORMAT_RGBA:h.a.TEXTUREFORMAT_R;this._depthMap=new ln("depthMap",{width:a.getRenderWidth(),height:a.getRenderHeight()},this._scene,!1,!0,e,!1,void 0,void 0,void 0,void 0,s),this._depthMap.wrapU=we.a.CLAMP_ADDRESSMODE,this._depthMap.wrapV=we.a.CLAMP_ADDRESSMODE,this._depthMap.refreshRate=1,this._depthMap.renderParticles=!1,this._depthMap.renderList=null,this._depthMap.activeCamera=this._camera,this._depthMap.ignoreCameraViewport=!0,this._depthMap.useCameraPostProcesses=!1,this._depthMap.onClearObservable.add(function(p){p.clear(o._clearColor,!0,!0,!0)});var d=function(p){var y=p.getRenderingMesh(),C=p.getEffectiveMesh(),M=o._scene,U=M.getEngine(),F=p.getMaterial();if(C._internalAbstractMeshDataInfo._isActiveIntermediate=!1,F&&p.verticesCount!==0&&p._renderId!==M.getRenderId()){U.setState(F.backFaceCulling,0,!1,M.useRightHandedSystem);var z=y._getInstancesRenderList(p._id,!!p.getReplacementMesh());if(!z.mustReturn){var J=U.getCaps().instancedArrays&&(z.visibleInstances[p._id]!==null&&z.visibleInstances[p._id]!==void 0||y.hasThinInstances),ie=o._camera||M.activeCamera;if(o.isReady(p,J)&&ie){if(p._renderId=M.getRenderId(),U.enableEffect(o._effect),y._bind(p,o._effect,F.fillMode),o._effect.setMatrix("viewProjection",M.getTransformMatrix()),o._effect.setFloat2("depthValues",ie.minZ,ie.minZ+ie.maxZ),F&&F.needAlphaTesting()){var se=F.getAlphaTestTexture();se&&(o._effect.setTexture("diffuseSampler",se),o._effect.setMatrix("diffuseMatrix",se.getTextureMatrix()))}y.useBones&&y.computeBonesUsingShaders&&y.skeleton&&o._effect.setMatrices("mBones",y.skeleton.getTransformMatrices(y)),tt.a.BindMorphTargetParameters(y,o._effect),y._processRendering(C,p,o._effect,F.fillMode,z,J,function(ce,ue){return o._effect.setMatrix("world",ue)})}}}};this._depthMap.customRenderFunction=function(p,y,C,M){var U;if(M.length){for(a.setColorWrite(!1),U=0;U4&&(o.push(Me.b.MatricesIndicesExtraKind),o.push(Me.b.MatricesWeightsExtraKind)),i.push("#define NUM_BONE_INFLUENCERS "+a.numBoneInfluencers),i.push("#define BonesPerMesh "+(a.skeleton?a.skeleton.bones.length+1:0))):i.push("#define NUM_BONE_INFLUENCERS 0");var s=a.morphTargetManager,d=0;s&&s.numInfluencers>0&&(d=s.numInfluencers,i.push("#define MORPHTARGETS"),i.push("#define NUM_MORPH_INFLUENCERS "+d),tt.a.PrepareAttributesForMorphTargetsInfluencers(o,a,d)),e&&(i.push("#define INSTANCES"),tt.a.PushAttributesForInstances(o),t.getRenderingMesh().hasThinInstances&&i.push("#define THIN_INSTANCES")),this._storeNonLinearDepth&&i.push("#define NONLINEARDEPTH"),this.isPacked&&i.push("#define PACKED");var p=i.join(` -`);return this._cachedDefines!==p&&(this._cachedDefines=p,this._effect=this._scene.getEngine().createEffect("depth",o,["world","mBones","viewProjection","diffuseMatrix","depthValues","morphTargetInfluences"],["diffuseSampler"],p,void 0,void 0,void 0,{maxSimultaneousMorphTargets:d})),this._effect.isReady()},r.prototype.getDepthMap=function(){return this._depthMap},r.prototype.dispose=function(){this._depthMap.dispose()},r._SceneComponentInitialization=function(t){throw xn.a.WarnImport("DepthRendererSceneComponent")},r}(),J_=`attribute vec2 vUV; -uniform sampler2D textureSampler; -#if defined(INITIAL) -uniform sampler2D sourceTexture; -uniform vec2 texSize; -void main(void) -{ -ivec2 coord=ivec2(vUV*(texSize-1.0)); -float f1=texelFetch(sourceTexture,coord,0).r; -float f2=texelFetch(sourceTexture,coord+ivec2(1,0),0).r; -float f3=texelFetch(sourceTexture,coord+ivec2(1,1),0).r; -float f4=texelFetch(sourceTexture,coord+ivec2(0,1),0).r; -float minz=min(min(min(f1,f2),f3),f4); -#ifdef DEPTH_REDUX -float maxz=max(max(max(sign(1.0-f1)*f1,sign(1.0-f2)*f2),sign(1.0-f3)*f3),sign(1.0-f4)*f4); -#else -float maxz=max(max(max(f1,f2),f3),f4); -#endif -glFragColor=vec4(minz,maxz,0.,0.); -} -#elif defined(MAIN) -uniform vec2 texSize; -void main(void) -{ -ivec2 coord=ivec2(vUV*(texSize-1.0)); -vec2 f1=texelFetch(textureSampler,coord,0).rg; -vec2 f2=texelFetch(textureSampler,coord+ivec2(1,0),0).rg; -vec2 f3=texelFetch(textureSampler,coord+ivec2(1,1),0).rg; -vec2 f4=texelFetch(textureSampler,coord+ivec2(0,1),0).rg; -float minz=min(min(min(f1.x,f2.x),f3.x),f4.x); -float maxz=max(max(max(f1.y,f2.y),f3.y),f4.y); -glFragColor=vec4(minz,maxz,0.,0.); -} -#elif defined(ONEBEFORELAST) -uniform ivec2 texSize; -void main(void) -{ -ivec2 coord=ivec2(vUV*vec2(texSize-1)); -vec2 f1=texelFetch(textureSampler,coord % texSize,0).rg; -vec2 f2=texelFetch(textureSampler,(coord+ivec2(1,0)) % texSize,0).rg; -vec2 f3=texelFetch(textureSampler,(coord+ivec2(1,1)) % texSize,0).rg; -vec2 f4=texelFetch(textureSampler,(coord+ivec2(0,1)) % texSize,0).rg; -float minz=min(f1.x,f2.x); -float maxz=max(f1.y,f2.y); -glFragColor=vec4(minz,maxz,0.,0.); -} -#elif defined(LAST) -void main(void) -{ -discard; -glFragColor=vec4(0.); -} -#endif -`;je.a.ShadersStore.minmaxReduxPixelShader=J_;var Vu=function(){function r(t){this.onAfterReductionPerformed=new P.c,this._forceFullscreenViewport=!0,this._activated=!1,this._camera=t,this._postProcessManager=new bs.a(t.getScene())}return Object.defineProperty(r.prototype,"sourceTexture",{get:function(){return this._sourceTexture},enumerable:!1,configurable:!0}),r.prototype.setSourceTexture=function(t,e,n,i){var o=this;if(n===void 0&&(n=h.a.TEXTURETYPE_HALF_FLOAT),i===void 0&&(i=!0),t!==this._sourceTexture){this.dispose(!1),this._sourceTexture=t,this._reductionSteps=[],this._forceFullscreenViewport=i;var a=this._camera.getScene(),s=new _t("Initial reduction phase","minmaxRedux",["texSize"],["sourceTexture"],1,null,h.a.TEXTURE_NEAREST_NEAREST,a.getEngine(),!1,"#define INITIAL"+(e?` -#define DEPTH_REDUX`:""),n,void 0,void 0,void 0,h.a.TEXTUREFORMAT_RG);s.autoClear=!1,s.forceFullscreenViewport=i;var d=this._sourceTexture.getRenderWidth(),p=this._sourceTexture.getRenderHeight();s.onApply=function(M,U){return function(F){F.setTexture("sourceTexture",o._sourceTexture),F.setFloatArray2("texSize",new Float32Array([M,U]))}}(d,p),this._reductionSteps.push(s);for(var y=1;d>1||p>1;){d=Math.max(Math.round(d/2),1),p=Math.max(Math.round(p/2),1);var C=new _t("Reduction phase "+y,"minmaxRedux",["texSize"],null,{width:d,height:p},null,h.a.TEXTURE_NEAREST_NEAREST,a.getEngine(),!1,"#define "+(d==1&&p==1?"LAST":d==1||p==1?"ONEBEFORELAST":"MAIN"),n,void 0,void 0,void 0,h.a.TEXTUREFORMAT_RG);C.autoClear=!1,C.forceFullscreenViewport=i,C.onApply=function(M,U){return function(F){M==1||U==1?F.setIntArray2("texSize",new Int32Array([M,U])):F.setFloatArray2("texSize",new Float32Array([M,U]))}}(d,p),this._reductionSteps.push(C),y++,d==1&&p==1&&C.onAfterRenderObservable.add(function(M,U,F){var z=new Float32Array(4*M*U),J={min:0,max:0};return function(){a.getEngine()._readTexturePixels(F.inputTexture,M,U,-1,0,z),J.min=z[0],J.max=z[1],o.onAfterReductionPerformed.notifyObservers(J)}}(d,p,C))}}},Object.defineProperty(r.prototype,"refreshRate",{get:function(){return this._sourceTexture?this._sourceTexture.refreshRate:-1},set:function(t){this._sourceTexture&&(this._sourceTexture.refreshRate=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"activated",{get:function(){return this._activated},enumerable:!1,configurable:!0}),r.prototype.activate=function(){var t=this;!this._onAfterUnbindObserver&&this._sourceTexture&&(this._onAfterUnbindObserver=this._sourceTexture.onAfterUnbindObservable.add(function(){t._reductionSteps[0].activate(t._camera),t._postProcessManager.directRender(t._reductionSteps,t._reductionSteps[0].inputTexture,t._forceFullscreenViewport),t._camera.getScene().getEngine().unBindFramebuffer(t._reductionSteps[0].inputTexture,!1)}),this._activated=!0)},r.prototype.deactivate=function(){this._onAfterUnbindObserver&&this._sourceTexture&&(this._sourceTexture.onAfterUnbindObservable.remove(this._onAfterUnbindObserver),this._onAfterUnbindObserver=null,this._activated=!1)},r.prototype.dispose=function(t){if(t===void 0&&(t=!0),t&&this.onAfterReductionPerformed.clear(),this.deactivate(),this._reductionSteps){for(var e=0;en&&(e=0,n=1),e<0&&(e=0),n>1&&(n=1),this._minDistance=e,this._maxDistance=n,this._breaksAreDirty=!0)},Object.defineProperty(t.prototype,"minDistance",{get:function(){return this._minDistance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxDistance",{get:function(){return this._maxDistance},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return t.CLASSNAME},t.prototype.getCascadeMinExtents=function(e){return e>=0&&e=0&&ethis._scene.activeCamera.maxZ||(this._shadowMaxZ=e,this._light._markMeshesAsLightDirty(),this._breaksAreDirty=!0):this._shadowMaxZ=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debug",{get:function(){return this._debug},set:function(e){this._debug=e,this._light._markMeshesAsLightDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthClamp",{get:function(){return this._depthClamp},set:function(e){this._depthClamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cascadeBlendPercentage",{get:function(){return this._cascadeBlendPercentage},set:function(e){this._cascadeBlendPercentage=e,this._light._markMeshesAsLightDirty()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lambda",{get:function(){return this._lambda},set:function(e){var n=Math.min(Math.max(e,0),1);this._lambda!=n&&(this._lambda=n,this._breaksAreDirty=!0)},enumerable:!1,configurable:!0}),t.prototype.getCascadeViewMatrix=function(e){return e>=0&&e=0&&e=0&&e=s&&(a=0,s=1),a==n._minDistance&&s==n._maxDistance||n.setMinMaxDistance(a,s)}),this._depthReducer.setDepthRenderer(this._depthRenderer)),this._depthReducer.activate()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"autoCalcDepthBoundsRefreshRate",{get:function(){var e,n,i;return(i=(n=(e=this._depthReducer)===null||e===void 0?void 0:e.depthRenderer)===null||n===void 0?void 0:n.getDepthMap().refreshRate)!==null&&i!==void 0?i:-1},set:function(e){var n;!((n=this._depthReducer)===null||n===void 0)&&n.depthRenderer&&(this._depthReducer.depthRenderer.getDepthMap().refreshRate=e)},enumerable:!1,configurable:!0}),t.prototype.splitFrustum=function(){this._breaksAreDirty=!0},t.prototype._splitFrustum=function(){var e=this._scene.activeCamera;if(e){for(var n=e.minZ,i=e.maxZ,o=i-n,a=this._minDistance,s=n+a*o,d=n+(this._shadowMaxZ=n?Math.min((this._shadowMaxZ-n)/(i-n),this._maxDistance):this._maxDistance)*o,p=d-s,y=d/s,C=0;CMath.PI;)o-=2*Math.PI;var s=o/Math.PI,d=a/Math.PI;s=.5*s+.5;var p=Math.round(s*n);p<0?p=0:p>=n&&(p=n-1);var y=Math.round(d*i);y<0?y=0:y>=i&&(y=i-1);var C=i-y-1;return{r:e[C*n*3+3*p+0],g:e[C*n*3+3*p+1],b:e[C*n*3+3*p+2]}},r.FACE_LEFT=[new l.e(-1,-1,-1),new l.e(1,-1,-1),new l.e(-1,1,-1),new l.e(1,1,-1)],r.FACE_RIGHT=[new l.e(1,-1,1),new l.e(-1,-1,1),new l.e(1,1,1),new l.e(-1,1,1)],r.FACE_FRONT=[new l.e(1,-1,-1),new l.e(1,-1,1),new l.e(1,1,-1),new l.e(1,1,1)],r.FACE_BACK=[new l.e(-1,-1,1),new l.e(-1,-1,-1),new l.e(-1,1,1),new l.e(-1,1,-1)],r.FACE_DOWN=[new l.e(1,1,-1),new l.e(1,1,1),new l.e(-1,1,-1),new l.e(-1,1,1)],r.FACE_UP=[new l.e(-1,-1,-1),new l.e(-1,-1,1),new l.e(1,-1,-1),new l.e(1,-1,1)],r}(),Wu=function(){function r(){}return r.Ldexp=function(t,e){return e>1023?t*Math.pow(2,1023)*Math.pow(2,e-1023):e<-1074?t*Math.pow(2,-1074)*Math.pow(2,e+1074):t*Math.pow(2,e)},r.Rgbe2float=function(t,e,n,i,o,a){o>0?(o=this.Ldexp(1,o-136),t[a+0]=e*o,t[a+1]=n*o,t[a+2]=i*o):(t[a+0]=0,t[a+1]=0,t[a+2]=0)},r.readStringLine=function(t,e){for(var n="",i="",o=e;o32767)throw"HDR Bad header format, unsupported size";return{height:e,width:n,dataPosition:s+=i.length+1}},r.GetCubeMapTextureData=function(t,e){var n=new Uint8Array(t),i=this.RGBE_ReadHeader(n),o=this.RGBE_ReadPixels(n,i);return ec.ConvertPanoramaToCubemap(o,i.width,i.height,e)},r.RGBE_ReadPixels=function(t,e){return this.RGBE_ReadPixels_RLE(t,e)},r.RGBE_ReadPixels_RLE=function(t,e){for(var n,i,o,a,s,d=e.height,p=e.width,y=e.dataPosition,C=0,M=0,U=0,F=new ArrayBuffer(4*p),z=new Uint8Array(F),J=new ArrayBuffer(e.width*e.height*4*3),ie=new Float32Array(J);d>0;){if(n=t[y++],i=t[y++],o=t[y++],a=t[y++],n!=2||i!=2||128&o||e.width<8||e.width>32767)return this.RGBE_ReadPixels_NOT_RLE(t,e);if((o<<8|a)!=p)throw"HDR Bad header format, wrong scan line width";for(C=0,U=0;U<4;U++)for(M=(U+1)*p;C128){if((s=n-128)==0||s>M-C)throw"HDR Bad Format, bad scanline data (run)";for(;s-- >0;)z[C++]=i}else{if((s=n)==0||s>M-C)throw"HDR Bad Format, bad scanline data (non-run)";if(z[C++]=i,--s>0)for(var se=0;se0;){for(s=0;s -#include -#include -#include -uniform float alphaG; -uniform samplerCube inputTexture; -uniform vec2 vFilteringInfo; -uniform float hdrScale; -varying vec3 direction; -void main() { -vec3 color=radiance(alphaG,inputTexture,direction,vFilteringInfo); -gl_FragColor=vec4(color*hdrScale,1.0); -}`;je.a.ShadersStore.hdrFilteringPixelShader=tm;var Ku=function(){function r(t,e){e===void 0&&(e={}),this._lodGenerationOffset=0,this._lodGenerationScale=.8,this.quality=h.a.TEXTURE_FILTERING_QUALITY_OFFLINE,this.hdrScale=1,this._engine=t,this.hdrScale=e.hdrScale||this.hdrScale,this.quality=e.hdrScale||this.quality}return r.prototype._createRenderTarget=function(t){var e=h.a.TEXTURETYPE_UNSIGNED_BYTE;this._engine.getCaps().textureHalfFloatRender?e=h.a.TEXTURETYPE_HALF_FLOAT:this._engine.getCaps().textureFloatRender&&(e=h.a.TEXTURETYPE_FLOAT);var n=this._engine.createRenderTargetCubeTexture(t,{format:h.a.TEXTUREFORMAT_RGBA,type:e,generateMipMaps:!1,generateDepthBuffer:!1,generateStencilBuffer:!1,samplingMode:h.a.TEXTURE_NEAREST_SAMPLINGMODE});return this._engine.updateTextureWrappingMode(n,h.a.TEXTURE_CLAMP_ADDRESSMODE,h.a.TEXTURE_CLAMP_ADDRESSMODE,h.a.TEXTURE_CLAMP_ADDRESSMODE),this._engine.updateTextureSamplingMode(h.a.TEXTURE_TRILINEAR_SAMPLINGMODE,n,!0),n},r.prototype._prefilterInternal=function(t){var e=t.getSize().width,n=Math.round($.a.Log2(e))+1,i=this._effectWrapper.effect,o=this._createRenderTarget(e);this._effectRenderer.setViewport();var a=t.getInternalTexture();a&&this._engine.updateTextureSamplingMode(h.a.TEXTURE_TRILINEAR_SAMPLINGMODE,a,!0),this._effectRenderer.applyEffectWrapper(this._effectWrapper);var s=[[new l.e(0,0,-1),new l.e(0,-1,0),new l.e(1,0,0)],[new l.e(0,0,1),new l.e(0,-1,0),new l.e(-1,0,0)],[new l.e(1,0,0),new l.e(0,0,1),new l.e(0,1,0)],[new l.e(1,0,0),new l.e(0,0,-1),new l.e(0,-1,0)],[new l.e(1,0,0),new l.e(0,-1,0),new l.e(0,0,1)],[new l.e(-1,0,0),new l.e(0,-1,0),new l.e(0,0,-1)]];i.setFloat("hdrScale",this.hdrScale),i.setFloat2("vFilteringInfo",t.getSize().width,n),i.setTexture("inputTexture",t);for(var d=0;d<6;d++){i.setVector3("up",s[d][0]),i.setVector3("right",s[d][1]),i.setVector3("front",s[d][2]);for(var p=0;p=2&&this._prefilterOnLoad){var i=this._onLoad,o=new Ku(n);this._onLoad=function(){o.prefilter(e,i)}}this._texture=n.createRawCubeTextureFromUrl(this.url,this.getScene(),this._size,h.a.TEXTUREFORMAT_RGB,n.getCaps().textureFloat?h.a.TEXTURETYPE_FLOAT:h.a.TEXTURETYPE_UNSIGNED_INT,this._noMipmap,function(a){e.lodGenerationOffset=0,e.lodGenerationScale=.8;var s=Wu.GetCubeMapTextureData(a,e._size);if(e._generateHarmonics){var d=Ko.ConvertCubeMapToSphericalPolynomial(s);e.sphericalPolynomial=d}for(var p=[],y=null,C=0;C<6;C++){if(!n.getCaps().textureFloat){var M=new ArrayBuffer(e._size*e._size*3);y=new Uint8Array(M)}var U=s[t._facesMapping[C]];if(e.gammaSpace||y){for(var F=0;F255){var ce=255/se;z*=ce,J*=ce,ie*=ce}y[3*F+0]=z,y[3*F+1]=J,y[3*F+2]=ie}}y?p.push(y):p.push(U)}return p},null,this._onLoad,this._onError)},t.prototype.clone=function(){var e=new t(this.url,this.getScene()||this._getEngine(),this._size,this._noMipmap,this._generateHarmonics,this.gammaSpace);return e.level=this.level,e.wrapU=this.wrapU,e.wrapV=this.wrapV,e.coordinatesIndex=this.coordinatesIndex,e.coordinatesMode=this.coordinatesMode,e},t.prototype.delayLoad=function(){this.delayLoadState===h.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=h.a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,this._noMipmap),this._texture||this.loadTexture())},t.prototype.getReflectionTextureMatrix=function(){return this._textureMatrix},t.prototype.setReflectionTextureMatrix=function(e){var n,i=this;this._textureMatrix=e,e.updateFlag!==this._textureMatrix.updateFlag&&e.isIdentity()!==this._textureMatrix.isIdentity()&&((n=this.getScene())===null||n===void 0||n.markAllMaterialsAsDirty(h.a.MATERIAL_TextureDirtyFlag,function(o){return o.getActiveTextures().indexOf(i)!==-1}))},t.Parse=function(e,n,i){var o=null;return e.name&&!e.isRenderTarget&&((o=new t(i+e.name,n,e.size,e.noMipmap,e.generateHarmonics,e.useInGammaSpace)).name=e.name,o.hasAlpha=e.hasAlpha,o.level=e.level,o.coordinatesMode=e.coordinatesMode,o.isBlocking=e.isBlocking),o&&(e.boundingBoxPosition&&(o.boundingBoxPosition=l.e.FromArray(e.boundingBoxPosition)),e.boundingBoxSize&&(o.boundingBoxSize=l.e.FromArray(e.boundingBoxSize)),e.rotationY&&(o.rotationY=e.rotationY)),o},t.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.hasAlpha=this.hasAlpha,e.isCube=!0,e.level=this.level,e.size=this._size,e.coordinatesMode=this.coordinatesMode,e.useInGammaSpace=this.gammaSpace,e.generateHarmonics=this._generateHarmonics,e.customType="BABYLON.HDRCubeTexture",e.noMipmap=this._noMipmap,e.isBlocking=this._isBlocking,e.rotationY=this._rotationY,e},t._facesMapping=["right","left","up","down","front","back"],t}(Wn.a);R.a.RegisteredTypes["BABYLON.HDRCubeTexture"]=ha;var Qu=function(){function r(t,e,n){e===void 0&&(e=0),n===void 0&&(n=null),this.name=t,this.animations=new Array,this._positions=null,this._normals=null,this._tangents=null,this._uvs=null,this._uniqueId=0,this.onInfluenceChanged=new P.c,this._onDataLayoutChanged=new P.c,this._animationPropertiesOverride=null,this._scene=n||te.a.LastCreatedScene,this.influence=e,this._scene&&(this._uniqueId=this._scene.getUniqueId())}return Object.defineProperty(r.prototype,"influence",{get:function(){return this._influence},set:function(t){if(this._influence!==t){var e=this._influence;this._influence=t,this.onInfluenceChanged.hasObservers()&&this.onInfluenceChanged.notifyObservers(e===0||t===0)}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"animationPropertiesOverride",{get:function(){return!this._animationPropertiesOverride&&this._scene?this._scene.animationPropertiesOverride:this._animationPropertiesOverride},set:function(t){this._animationPropertiesOverride=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"uniqueId",{get:function(){return this._uniqueId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasPositions",{get:function(){return!!this._positions},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasNormals",{get:function(){return!!this._normals},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasTangents",{get:function(){return!!this._tangents},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasUVs",{get:function(){return!!this._uvs},enumerable:!1,configurable:!0}),r.prototype.setPositions=function(t){var e=this.hasPositions;this._positions=t,e!==this.hasPositions&&this._onDataLayoutChanged.notifyObservers(void 0)},r.prototype.getPositions=function(){return this._positions},r.prototype.setNormals=function(t){var e=this.hasNormals;this._normals=t,e!==this.hasNormals&&this._onDataLayoutChanged.notifyObservers(void 0)},r.prototype.getNormals=function(){return this._normals},r.prototype.setTangents=function(t){var e=this.hasTangents;this._tangents=t,e!==this.hasTangents&&this._onDataLayoutChanged.notifyObservers(void 0)},r.prototype.getTangents=function(){return this._tangents},r.prototype.setUVs=function(t){var e=this.hasUVs;this._uvs=t,e!==this.hasUVs&&this._onDataLayoutChanged.notifyObservers(void 0)},r.prototype.getUVs=function(){return this._uvs},r.prototype.clone=function(){var t=this,e=L.a.Clone(function(){return new r(t.name,t.influence,t._scene)},this);return e._positions=this._positions,e._normals=this._normals,e._tangents=this._tangents,e._uvs=this._uvs,e},r.prototype.serialize=function(){var t={};return t.name=this.name,t.influence=this.influence,t.positions=Array.prototype.slice.call(this.getPositions()),this.id!=null&&(t.id=this.id),this.hasNormals&&(t.normals=Array.prototype.slice.call(this.getNormals())),this.hasTangents&&(t.tangents=Array.prototype.slice.call(this.getTangents())),this.hasUVs&&(t.uvs=Array.prototype.slice.call(this.getUVs())),L.a.AppendSerializedAnimations(this,t),t},r.prototype.getClassName=function(){return"MorphTarget"},r.Parse=function(t){var e=new r(t.name,t.influence);if(e.setPositions(t.positions),t.id!=null&&(e.id=t.id),t.normals&&e.setNormals(t.normals),t.tangents&&e.setTangents(t.tangents),t.uvs&&e.setUVs(t.uvs),t.animations)for(var n=0;n=0&&(this._targets.splice(e,1),t.onInfluenceChanged.remove(this._targetInfluenceChangedObservers.splice(e,1)[0]),t._onDataLayoutChanged.remove(this._targetDataLayoutChangedObservers.splice(e,1)[0]),this._syncActiveTargets(!0))},r.prototype.clone=function(){for(var t=new r(this._scene),e=0,n=this._targets;e-1&&this._impostors.splice(e,1).length&&this.getPhysicsPlugin().removePhysicsBody(t)},r.prototype.addJoint=function(t,e,n){var i={mainImpostor:t,connectedImpostor:e,joint:n};n.physicsPlugin=this._physicsPlugin,this._joints.push(i),this._physicsPlugin.generateJoint(i)},r.prototype.removeJoint=function(t,e,n){var i=this._joints.filter(function(o){return o.connectedImpostor===e&&o.joint===n&&o.mainImpostor===t});i.length&&this._physicsPlugin.removeJoint(i[0])},r.prototype._step=function(t){var e=this;this._impostors.forEach(function(n){n.isBodyInitRequired()&&e._physicsPlugin.generatePhysicsBody(n)}),t>.1?t=.1:t<=0&&(t=1/60),this._physicsPlugin.executeStep(t,this._impostors)},r.prototype.getPhysicsPlugin=function(){return this._physicsPlugin},r.prototype.getImpostors=function(){return this._impostors},r.prototype.getImpostorForPhysicsObject=function(t){for(var e=0;e0&&(this._physicsBodysToRemoveAfterStep.forEach(function(e){t.world.remove(e)}),this._physicsBodysToRemoveAfterStep=[])},r.prototype.applyImpulse=function(t,e,n){var i=new this.BJSCANNON.Vec3(n.x,n.y,n.z),o=new this.BJSCANNON.Vec3(e.x,e.y,e.z);t.physicsBody.applyImpulse(o,i)},r.prototype.applyForce=function(t,e,n){var i=new this.BJSCANNON.Vec3(n.x,n.y,n.z),o=new this.BJSCANNON.Vec3(e.x,e.y,e.z);t.physicsBody.applyForce(o,i)},r.prototype.generatePhysicsBody=function(t){if(this._removeMarkedPhysicsBodiesFromWorld(),t.parent)t.physicsBody&&(this.removePhysicsBody(t),t.forceUpdate());else{if(t.isBodyInitRequired()){var e=this._createShape(t),n=t.physicsBody;n&&this.removePhysicsBody(t);var i=this._addMaterial("mat-"+t.uniqueId,t.getParam("friction"),t.getParam("restitution")),o={mass:t.getParam("mass"),material:i},a=t.getParam("nativeOptions");for(var s in a)a.hasOwnProperty(s)&&(o[s]=a[s]);t.physicsBody=new this.BJSCANNON.Body(o),t.physicsBody.addEventListener("collide",t.onCollide),this.world.addEventListener("preStep",t.beforeStep),this.world.addEventListener("postStep",t.afterStep),t.physicsBody.addShape(e),this.world.add(t.physicsBody),n&&["force","torque","velocity","angularVelocity"].forEach(function(d){var p=n[d];t.physicsBody[d].set(p.x,p.y,p.z)}),this._processChildMeshes(t)}this._updatePhysicsBodyTransformation(t)}},r.prototype._processChildMeshes=function(t){var e=this,n=t.object.getChildMeshes?t.object.getChildMeshes(!0):[],i=t.object.rotationQuaternion;if(n.length){var o=function(a){if(i&&a.rotationQuaternion){var s=a.getPhysicsImpostor();if(s&&s.parent!==t){var d=a.getAbsolutePosition().subtract(a.parent.getAbsolutePosition()),p=a.rotationQuaternion;s.physicsBody&&(e.removePhysicsBody(s),s.physicsBody=null),s.parent=t,s.resetUpdateFlags(),t.physicsBody.addShape(e._createShape(s),new e.BJSCANNON.Vec3(d.x,d.y,d.z),new e.BJSCANNON.Quaternion(p.x,p.y,p.z,p.w)),t.physicsBody.mass+=s.getParam("mass")}i.multiplyInPlace(a.rotationQuaternion),a.getChildMeshes(!0).filter(function(y){return!!y.physicsImpostor}).forEach(o)}};n.filter(function(a){return!!a.physicsImpostor}).forEach(o)}},r.prototype.removePhysicsBody=function(t){t.physicsBody.removeEventListener("collide",t.onCollide),this.world.removeEventListener("preStep",t.beforeStep),this.world.removeEventListener("postStep",t.afterStep),this._physicsBodysToRemoveAfterStep.indexOf(t.physicsBody)===-1&&this._physicsBodysToRemoveAfterStep.push(t.physicsBody)},r.prototype.generateJoint=function(t){var e=t.mainImpostor.physicsBody,n=t.connectedImpostor.physicsBody;if(e&&n){var i,o=t.joint.jointData,a={pivotA:o.mainPivot?new this.BJSCANNON.Vec3().set(o.mainPivot.x,o.mainPivot.y,o.mainPivot.z):null,pivotB:o.connectedPivot?new this.BJSCANNON.Vec3().set(o.connectedPivot.x,o.connectedPivot.y,o.connectedPivot.z):null,axisA:o.mainAxis?new this.BJSCANNON.Vec3().set(o.mainAxis.x,o.mainAxis.y,o.mainAxis.z):null,axisB:o.connectedAxis?new this.BJSCANNON.Vec3().set(o.connectedAxis.x,o.connectedAxis.y,o.connectedAxis.z):null,maxForce:o.nativeParams.maxForce,collideConnected:!!o.collision};switch(t.joint.type){case nn.e.HingeJoint:case nn.e.Hinge2Joint:i=new this.BJSCANNON.HingeConstraint(e,n,a);break;case nn.e.DistanceJoint:i=new this.BJSCANNON.DistanceConstraint(e,n,o.maxDistance||2);break;case nn.e.SpringJoint:var s=o;i=new this.BJSCANNON.Spring(e,n,{restLength:s.length,stiffness:s.stiffness,damping:s.damping,localAnchorA:a.pivotA,localAnchorB:a.pivotB});break;case nn.e.LockJoint:i=new this.BJSCANNON.LockConstraint(e,n,a);break;case nn.e.PointToPointJoint:case nn.e.BallAndSocketJoint:default:i=new this.BJSCANNON.PointToPointConstraint(e,a.pivotA,n,a.pivotB,a.maxForce)}i.collideConnected=!!o.collision,t.joint.physicsJoint=i,t.joint.type!==nn.e.SpringJoint?this.world.addConstraint(i):(t.joint.jointData.forceApplicationCallback=t.joint.jointData.forceApplicationCallback||function(){i.applyForce()},t.mainImpostor.registerAfterPhysicsStep(t.joint.jointData.forceApplicationCallback))}},r.prototype.removeJoint=function(t){t.joint.type!==nn.e.SpringJoint?this.world.removeConstraint(t.joint.physicsJoint):t.mainImpostor.unregisterAfterPhysicsStep(t.joint.jointData.forceApplicationCallback)},r.prototype._addMaterial=function(t,e,n){var i,o;for(i=0;i1e3*n));d++);this.time+=i;for(var p=this.time%n/n,y=t,C=this.bodies,M=0;M!==C.length;M++){var U=C[M];U.type!==e.Body.STATIC&&U.sleepState!==e.Body.SLEEPING?(U.position.vsub(U.previousPosition,y),y.scale(p,y),U.position.vadd(y,U.interpolatedPosition)):(U.interpolatedPosition.set(U.position.x,U.position.y,U.position.z),U.interpolatedQuaternion.set(U.quaternion.x,U.quaternion.y,U.quaternion.z,U.quaternion.w))}}}},r.prototype.raycast=function(t,e){return this._cannonRaycastResult.reset(),this.world.raycastClosest(t,e,{},this._cannonRaycastResult),this._raycastResult.reset(t,e),this._cannonRaycastResult.hasHit&&(this._raycastResult.setHitData({x:this._cannonRaycastResult.hitNormalWorld.x,y:this._cannonRaycastResult.hitNormalWorld.y,z:this._cannonRaycastResult.hitNormalWorld.z},{x:this._cannonRaycastResult.hitPointWorld.x,y:this._cannonRaycastResult.hitPointWorld.y,z:this._cannonRaycastResult.hitPointWorld.z}),this._raycastResult.setHitDistance(this._cannonRaycastResult.distance)),this._raycastResult},r}();Dr.DefaultPluginFactory=function(){return new nc};var qu=function(){function r(t,e,n){t===void 0&&(t=!0),n===void 0&&(n=OIMO),this._useDeltaForWorldStep=t,this.name="OimoJSPlugin",this._fixedTimeStep=1/60,this._tmpImpostorsArray=[],this._tmpPositionVector=l.e.Zero(),this.BJSOIMO=n,this.world=new this.BJSOIMO.World({iterations:e}),this.world.clear(),this._raycastResult=new tc}return r.prototype.setGravity=function(t){this.world.gravity.set(t.x,t.y,t.z)},r.prototype.setTimeStep=function(t){this.world.timeStep=t},r.prototype.getTimeStep=function(){return this.world.timeStep},r.prototype.executeStep=function(t,e){var n=this;e.forEach(function(s){s.beforeStep()}),this.world.timeStep=this._useDeltaForWorldStep?t:this._fixedTimeStep,this.world.step(),e.forEach(function(s){s.afterStep(),n._tmpImpostorsArray[s.uniqueId]=s});for(var i=this.world.contacts;i!==null;)if(!i.touching||i.body1.sleeping||i.body2.sleeping){var o=this._tmpImpostorsArray[+i.body1.name],a=this._tmpImpostorsArray[+i.body2.name];o&&a&&(o.onCollide({body:a.physicsBody,point:null}),a.onCollide({body:o.physicsBody,point:null})),i=i.next}else i=i.next},r.prototype.applyImpulse=function(t,e,n){var i=t.physicsBody.mass;t.physicsBody.applyImpulse(n.scale(this.world.invScale),e.scale(this.world.invScale*i))},r.prototype.applyForce=function(t,e,n){u.a.Warn("Oimo doesn't support applying force. Using impule instead."),this.applyImpulse(t,e,n)},r.prototype.generatePhysicsBody=function(t){var e=this;if(t.parent)t.physicsBody&&(this.removePhysicsBody(t),t.forceUpdate());else{if(t.isBodyInitRequired()){var n={name:t.uniqueId,config:[t.getParam("mass")||.001,t.getParam("friction"),t.getParam("restitution")],size:[],type:[],pos:[],posShape:[],rot:[],rotShape:[],move:t.getParam("mass")!==0,density:t.getParam("mass"),friction:t.getParam("friction"),restitution:t.getParam("restitution"),world:this.world},i=[t];(s=t.object).getChildMeshes&&s.getChildMeshes().forEach(function(d){d.physicsImpostor&&i.push(d.physicsImpostor)});var o=function(d){return Math.max(d,Dr.Epsilon)},a=new l.b;i.forEach(function(d){if(d.object.rotationQuaternion){var p=d.object.rotationQuaternion;a.copyFrom(p),d.object.rotationQuaternion.set(0,0,0,1),d.object.computeWorldMatrix(!0);var y=a.toEulerAngles(),C=d.getObjectExtendSize();if(d===t){var M=t.getObjectCenter();t.object.getAbsolutePivotPoint().subtractToRef(M,e._tmpPositionVector),e._tmpPositionVector.divideInPlace(t.object.scaling),n.pos.push(M.x),n.pos.push(M.y),n.pos.push(M.z),n.posShape.push(0,0,0),n.rotShape.push(0,0,0)}else{var U=d.object.position.clone();n.posShape.push(U.x),n.posShape.push(U.y),n.posShape.push(U.z),n.rotShape.push(57.29577951308232*y.x,57.29577951308232*y.y,57.29577951308232*y.z)}switch(d.object.rotationQuaternion.copyFrom(a),d.type){case Ct.a.ParticleImpostor:u.a.Warn("No Particle support in OIMO.js. using SphereImpostor instead");case Ct.a.SphereImpostor:var F=C.x,z=C.y,J=C.z,ie=Math.max(o(F),o(z),o(J))/2;n.type.push("sphere"),n.size.push(ie),n.size.push(ie),n.size.push(ie);break;case Ct.a.CylinderImpostor:var se=o(C.x)/2,ce=o(C.y);n.type.push("cylinder"),n.size.push(se),n.size.push(ce),n.size.push(ce);break;case Ct.a.PlaneImpostor:case Ct.a.BoxImpostor:default:se=o(C.x),ce=o(C.y);var ue=o(C.z);n.type.push("box"),n.size.push(se),n.size.push(ce),n.size.push(ue)}d.object.rotationQuaternion=p}}),t.physicsBody=this.world.add(n),t.physicsBody.resetQuaternion(a),t.physicsBody.updatePosition(0)}else this._tmpPositionVector.copyFromFloats(0,0,0);var s;t.setDeltaPosition(this._tmpPositionVector)}},r.prototype.removePhysicsBody=function(t){this.world.removeRigidBody(t.physicsBody)},r.prototype.generateJoint=function(t){var e=t.mainImpostor.physicsBody,n=t.connectedImpostor.physicsBody;if(e&&n){var i,o=t.joint.jointData,a=o.nativeParams||{},s={body1:e,body2:n,axe1:a.axe1||(o.mainAxis?o.mainAxis.asArray():null),axe2:a.axe2||(o.connectedAxis?o.connectedAxis.asArray():null),pos1:a.pos1||(o.mainPivot?o.mainPivot.asArray():null),pos2:a.pos2||(o.connectedPivot?o.connectedPivot.asArray():null),min:a.min,max:a.max,collision:a.collision||o.collision,spring:a.spring,world:this.world};switch(t.joint.type){case nn.e.BallAndSocketJoint:i="jointBall";break;case nn.e.SpringJoint:u.a.Warn("OIMO.js doesn't support Spring Constraint. Simulating using DistanceJoint instead");var d=o;s.min=d.length||s.min,s.max=Math.max(s.min,s.max);case nn.e.DistanceJoint:i="jointDistance",s.max=o.maxDistance;break;case nn.e.PrismaticJoint:i="jointPrisme";break;case nn.e.SliderJoint:i="jointSlide";break;case nn.e.WheelJoint:i="jointWheel";break;case nn.e.HingeJoint:default:i="jointHinge"}s.type=i,t.joint.physicsJoint=this.world.add(s)}},r.prototype.removeJoint=function(t){try{this.world.removeJoint(t.joint.physicsJoint)}catch(e){u.a.Warn(e)}},r.prototype.isSupported=function(){return this.BJSOIMO!==void 0},r.prototype.setTransformationFromPhysicsBody=function(t){if(!t.physicsBody.sleeping){if(t.physicsBody.shapes.next){for(var e=t.physicsBody.shapes;e.next;)e=e.next;t.object.position.set(e.position.x,e.position.y,e.position.z)}else{var n=t.physicsBody.getPosition();t.object.position.set(n.x,n.y,n.z)}if(t.object.rotationQuaternion){var i=t.physicsBody.getQuaternion();t.object.rotationQuaternion.set(i.x,i.y,i.z,i.w)}}},r.prototype.setPhysicsBodyTransformation=function(t,e,n){var i=t.physicsBody;t.physicsBody.shapes.next||(i.position.set(e.x,e.y,e.z),i.orientation.set(n.x,n.y,n.z,n.w),i.syncShapes(),i.awake())},r.prototype.setLinearVelocity=function(t,e){t.physicsBody.linearVelocity.set(e.x,e.y,e.z)},r.prototype.setAngularVelocity=function(t,e){t.physicsBody.angularVelocity.set(e.x,e.y,e.z)},r.prototype.getLinearVelocity=function(t){var e=t.physicsBody.linearVelocity;return e?new l.e(e.x,e.y,e.z):null},r.prototype.getAngularVelocity=function(t){var e=t.physicsBody.angularVelocity;return e?new l.e(e.x,e.y,e.z):null},r.prototype.setBodyMass=function(t,e){var n=e===0;t.physicsBody.shapes.density=n?1:e,t.physicsBody.setupMass(n?2:1)},r.prototype.getBodyMass=function(t){return t.physicsBody.shapes.density},r.prototype.getBodyFriction=function(t){return t.physicsBody.shapes.friction},r.prototype.setBodyFriction=function(t,e){t.physicsBody.shapes.friction=e},r.prototype.getBodyRestitution=function(t){return t.physicsBody.shapes.restitution},r.prototype.setBodyRestitution=function(t,e){t.physicsBody.shapes.restitution=e},r.prototype.sleepBody=function(t){t.physicsBody.sleep()},r.prototype.wakeUpBody=function(t){t.physicsBody.awake()},r.prototype.updateDistanceJoint=function(t,e,n){t.physicsJoint.limitMotor.upperLimit=e,n!==void 0&&(t.physicsJoint.limitMotor.lowerLimit=n)},r.prototype.setMotor=function(t,e,n,i){n!==void 0?u.a.Warn("OimoJS plugin currently has unexpected behavior when using setMotor with force parameter"):n=1e6,e*=-1;var o=i?t.physicsJoint.rotationalLimitMotor2:t.physicsJoint.rotationalLimitMotor1||t.physicsJoint.rotationalLimitMotor||t.physicsJoint.limitMotor;o&&o.setMotor(e,n)},r.prototype.setLimit=function(t,e,n,i){var o=i?t.physicsJoint.rotationalLimitMotor2:t.physicsJoint.rotationalLimitMotor1||t.physicsJoint.rotationalLimitMotor||t.physicsJoint.limitMotor;o&&o.setLimit(e,n===void 0?-e:n)},r.prototype.syncMeshWithImpostor=function(t,e){var n=e.physicsBody;t.position.x=n.position.x,t.position.y=n.position.y,t.position.z=n.position.z,t.rotationQuaternion&&(t.rotationQuaternion.x=n.orientation.x,t.rotationQuaternion.y=n.orientation.y,t.rotationQuaternion.z=n.orientation.z,t.rotationQuaternion.w=n.orientation.s)},r.prototype.getRadius=function(t){return t.physicsBody.shapes.radius},r.prototype.getBoxSizeToRef=function(t,e){var n=t.physicsBody.shapes;e.x=2*n.halfWidth,e.y=2*n.halfHeight,e.z=2*n.halfDepth},r.prototype.dispose=function(){this.world.clear()},r.prototype.raycast=function(t,e){return u.a.Warn("raycast is not currently supported by the Oimo physics plugin"),this._raycastResult.reset(t,e),this._raycastResult},r}(),fa=f(97),Zu=function(){function r(t,e,n){var i=this;t===void 0&&(t=!0),e===void 0&&(e=Ammo),n===void 0&&(n=null),this._useDeltaForWorldStep=t,this.bjsAMMO={},this.name="AmmoJSPlugin",this._timeStep=1/60,this._fixedTimeStep=1/60,this._maxSteps=5,this._tmpQuaternion=new l.b,this._tmpContactCallbackResult=!1,this._tmpContactPoint=new l.e,this._tmpMatrix=new l.a,typeof e=="function"?e(this.bjsAMMO):this.bjsAMMO=e,this.isSupported()?(this._collisionConfiguration=new this.bjsAMMO.btSoftBodyRigidBodyCollisionConfiguration,this._dispatcher=new this.bjsAMMO.btCollisionDispatcher(this._collisionConfiguration),this._overlappingPairCache=n||new this.bjsAMMO.btDbvtBroadphase,this._solver=new this.bjsAMMO.btSequentialImpulseConstraintSolver,this._softBodySolver=new this.bjsAMMO.btDefaultSoftBodySolver,this.world=new this.bjsAMMO.btSoftRigidDynamicsWorld(this._dispatcher,this._overlappingPairCache,this._solver,this._collisionConfiguration,this._softBodySolver),this._tmpAmmoConcreteContactResultCallback=new this.bjsAMMO.ConcreteContactResultCallback,this._tmpAmmoConcreteContactResultCallback.addSingleResult=function(o,a,s,d){var p=(o=i.bjsAMMO.wrapPointer(o,Ammo.btManifoldPoint)).getPositionWorldOnA();i._tmpContactPoint.x=p.x(),i._tmpContactPoint.y=p.y(),i._tmpContactPoint.z=p.z(),i._tmpContactCallbackResult=!0},this._raycastResult=new tc,this._tmpAmmoTransform=new this.bjsAMMO.btTransform,this._tmpAmmoTransform.setIdentity(),this._tmpAmmoQuaternion=new this.bjsAMMO.btQuaternion(0,0,0,1),this._tmpAmmoVectorA=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorB=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorC=new this.bjsAMMO.btVector3(0,0,0),this._tmpAmmoVectorD=new this.bjsAMMO.btVector3(0,0,0)):u.a.Error("AmmoJS is not available. Please make sure you included the js file.")}return r.prototype.setGravity=function(t){this._tmpAmmoVectorA.setValue(t.x,t.y,t.z),this.world.setGravity(this._tmpAmmoVectorA),this.world.getWorldInfo().set_m_gravity(this._tmpAmmoVectorA)},r.prototype.setTimeStep=function(t){this._timeStep=t},r.prototype.setFixedTimeStep=function(t){this._fixedTimeStep=t},r.prototype.setMaxSteps=function(t){this._maxSteps=t},r.prototype.getTimeStep=function(){return this._timeStep},r.prototype._isImpostorInContact=function(t){return this._tmpContactCallbackResult=!1,this.world.contactTest(t.physicsBody,this._tmpAmmoConcreteContactResultCallback),this._tmpContactCallbackResult},r.prototype._isImpostorPairInContact=function(t,e){return this._tmpContactCallbackResult=!1,this.world.contactPairTest(t.physicsBody,e.physicsBody,this._tmpAmmoConcreteContactResultCallback),this._tmpContactCallbackResult},r.prototype._stepSimulation=function(t,e,n){if(t===void 0&&(t=1/60),e===void 0&&(e=10),n===void 0&&(n=1/60),e==0)this.world.stepSimulation(t,0);else for(;e>0&&t>0;)t-n0&&this._isImpostorInContact(d))for(var p=0,y=d._onPhysicsCollideCallbacks;p3?3:d;var p=new this.bjsAMMO.btSoftBodyHelpers().CreateRope(this.world.getWorldInfo(),this._tmpAmmoVectorA,this._tmpAmmoVectorB,n-1,d);return p.get_m_cfg().set_collisions(17),p},r.prototype._createCustom=function(t){var e=null;return this.onCreateCustomShape&&(e=this.onCreateCustomShape(t)),e==null&&(e=new this.bjsAMMO.btCompoundShape),e},r.prototype._addHullVerts=function(t,e,n){var i=this,o=0;if(n&&n.getIndices&&n.getWorldMatrix&&n.getChildMeshes){var a=n.getIndices();a||(a=[]);var s=n.getVerticesData(Me.b.PositionKind);s||(s=[]),n.computeWorldMatrix(!1);for(var d=a.length/3,p=0;p0){if(t.type!=Ct.a.NoImpostor){var p=this._createShape(t,!0);p&&(this._tmpAmmoTransform.getOrigin().setValue(0,0,0),this._tmpAmmoQuaternion.setValue(0,0,0,1),this._tmpAmmoTransform.setRotation(this._tmpAmmoQuaternion),i.addChildShape(this._tmpAmmoTransform,p))}return i}this.bjsAMMO.destroy(i),i=null}switch(t.type){case Ct.a.SphereImpostor:if($.a.WithinEpsilon(a.x,a.y,1e-4)&&$.a.WithinEpsilon(a.x,a.z,1e-4))i=new this.bjsAMMO.btSphereShape(a.x/2);else{var y=[new this.bjsAMMO.btVector3(0,0,0)];(i=new this.bjsAMMO.btMultiSphereShape(y,[1],1)).setLocalScaling(new this.bjsAMMO.btVector3(a.x/2,a.y/2,a.z/2))}break;case Ct.a.CapsuleImpostor:i=new this.bjsAMMO.btCapsuleShape(a.x/2,a.y/2);break;case Ct.a.CylinderImpostor:this._tmpAmmoVectorA.setValue(a.x/2,a.y/2,a.z/2),i=new this.bjsAMMO.btCylinderShape(this._tmpAmmoVectorA);break;case Ct.a.PlaneImpostor:case Ct.a.BoxImpostor:this._tmpAmmoVectorA.setValue(a.x/2,a.y/2,a.z/2),i=new this.bjsAMMO.btBoxShape(this._tmpAmmoVectorA);break;case Ct.a.MeshImpostor:if(t.getParam("mass")==0){var C=new this.bjsAMMO.btTriangleMesh;t._pluginData.toDispose.push(C);var M=this._addMeshVerts(C,o,o);i=M==0?new this.bjsAMMO.btCompoundShape:new this.bjsAMMO.btBvhTriangleMeshShape(C);break}case Ct.a.ConvexHullImpostor:var U=new this.bjsAMMO.btConvexHullShape;(M=this._addHullVerts(U,o,o))==0?(t._pluginData.toDispose.push(U),i=new this.bjsAMMO.btCompoundShape):i=U;break;case Ct.a.NoImpostor:i=new this.bjsAMMO.btSphereShape(a.x/2);break;case Ct.a.CustomImpostor:i=this._createCustom(t);break;case Ct.a.SoftbodyImpostor:i=this._createSoftbody(t);break;case Ct.a.ClothImpostor:i=this._createCloth(t);break;case Ct.a.RopeImpostor:i=this._createRope(t);break;default:u.a.Warn("The impostor type is not currently supported by the ammo plugin.")}return i},r.prototype.setTransformationFromPhysicsBody=function(t){t.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform),t.object.position.set(this._tmpAmmoTransform.getOrigin().x(),this._tmpAmmoTransform.getOrigin().y(),this._tmpAmmoTransform.getOrigin().z()),t.object.rotationQuaternion?t.object.rotationQuaternion.set(this._tmpAmmoTransform.getRotation().x(),this._tmpAmmoTransform.getRotation().y(),this._tmpAmmoTransform.getRotation().z(),this._tmpAmmoTransform.getRotation().w()):t.object.rotation&&(this._tmpQuaternion.set(this._tmpAmmoTransform.getRotation().x(),this._tmpAmmoTransform.getRotation().y(),this._tmpAmmoTransform.getRotation().z(),this._tmpAmmoTransform.getRotation().w()),this._tmpQuaternion.toEulerAnglesToRef(t.object.rotation))},r.prototype.setPhysicsBodyTransformation=function(t,e,n){var i=t.physicsBody.getWorldTransform();if(Math.abs(i.getOrigin().x()-e.x)>Gt.a||Math.abs(i.getOrigin().y()-e.y)>Gt.a||Math.abs(i.getOrigin().z()-e.z)>Gt.a||Math.abs(i.getRotation().x()-n.x)>Gt.a||Math.abs(i.getRotation().y()-n.y)>Gt.a||Math.abs(i.getRotation().z()-n.z)>Gt.a||Math.abs(i.getRotation().w()-n.w)>Gt.a)if(this._tmpAmmoVectorA.setValue(e.x,e.y,e.z),i.setOrigin(this._tmpAmmoVectorA),this._tmpAmmoQuaternion.setValue(n.x,n.y,n.z,n.w),i.setRotation(this._tmpAmmoQuaternion),t.physicsBody.setWorldTransform(i),t.mass==0){var o=t.physicsBody.getMotionState();o&&o.setWorldTransform(i)}else t.physicsBody.activate()},r.prototype.isSupported=function(){return this.bjsAMMO!==void 0},r.prototype.setLinearVelocity=function(t,e){this._tmpAmmoVectorA.setValue(e.x,e.y,e.z),t.soft?t.physicsBody.linearVelocity(this._tmpAmmoVectorA):t.physicsBody.setLinearVelocity(this._tmpAmmoVectorA)},r.prototype.setAngularVelocity=function(t,e){this._tmpAmmoVectorA.setValue(e.x,e.y,e.z),t.soft?t.physicsBody.angularVelocity(this._tmpAmmoVectorA):t.physicsBody.setAngularVelocity(this._tmpAmmoVectorA)},r.prototype.getLinearVelocity=function(t){if(t.soft)var e=t.physicsBody.linearVelocity();else e=t.physicsBody.getLinearVelocity();if(!e)return null;var n=new l.e(e.x(),e.y(),e.z());return this.bjsAMMO.destroy(e),n},r.prototype.getAngularVelocity=function(t){if(t.soft)var e=t.physicsBody.angularVelocity();else e=t.physicsBody.getAngularVelocity();if(!e)return null;var n=new l.e(e.x(),e.y(),e.z());return this.bjsAMMO.destroy(e),n},r.prototype.setBodyMass=function(t,e){t.soft?t.physicsBody.setTotalMass(e,!1):t.physicsBody.setMassProps(e),t._pluginData.mass=e},r.prototype.getBodyMass=function(t){return t._pluginData.mass||0},r.prototype.getBodyFriction=function(t){return t._pluginData.friction||0},r.prototype.setBodyFriction=function(t,e){t.soft?t.physicsBody.get_m_cfg().set_kDF(e):t.physicsBody.setFriction(e),t._pluginData.friction=e},r.prototype.getBodyRestitution=function(t){return t._pluginData.restitution||0},r.prototype.setBodyRestitution=function(t,e){t.physicsBody.setRestitution(e),t._pluginData.restitution=e},r.prototype.getBodyPressure=function(t){return t.soft?t._pluginData.pressure||0:(u.a.Warn("Pressure is not a property of a rigid body"),0)},r.prototype.setBodyPressure=function(t,e){t.soft?t.type===Ct.a.SoftbodyImpostor?(t.physicsBody.get_m_cfg().set_kPR(e),t._pluginData.pressure=e):(t.physicsBody.get_m_cfg().set_kPR(0),t._pluginData.pressure=0):u.a.Warn("Pressure can only be applied to a softbody")},r.prototype.getBodyStiffness=function(t){return t.soft?t._pluginData.stiffness||0:(u.a.Warn("Stiffness is not a property of a rigid body"),0)},r.prototype.setBodyStiffness=function(t,e){t.soft?(e=(e=e<0?0:e)>1?1:e,t.physicsBody.get_m_materials().at(0).set_m_kLST(e),t._pluginData.stiffness=e):u.a.Warn("Stiffness cannot be applied to a rigid body")},r.prototype.getBodyVelocityIterations=function(t){return t.soft?t._pluginData.velocityIterations||0:(u.a.Warn("Velocity iterations is not a property of a rigid body"),0)},r.prototype.setBodyVelocityIterations=function(t,e){t.soft?(e=e<0?0:e,t.physicsBody.get_m_cfg().set_viterations(e),t._pluginData.velocityIterations=e):u.a.Warn("Velocity iterations cannot be applied to a rigid body")},r.prototype.getBodyPositionIterations=function(t){return t.soft?t._pluginData.positionIterations||0:(u.a.Warn("Position iterations is not a property of a rigid body"),0)},r.prototype.setBodyPositionIterations=function(t,e){t.soft?(e=e<0?0:e,t.physicsBody.get_m_cfg().set_piterations(e),t._pluginData.positionIterations=e):u.a.Warn("Position iterations cannot be applied to a rigid body")},r.prototype.appendAnchor=function(t,e,n,i,o,a){o===void 0&&(o=1),a===void 0&&(a=!1);var s=t.segments,d=Math.round((s-1)*n)+s*(s-1-Math.round((s-1)*i));t.physicsBody.appendAnchor(d,e.physicsBody,a,o)},r.prototype.appendHook=function(t,e,n,i,o){i===void 0&&(i=1),o===void 0&&(o=!1);var a=Math.round(t.segments*n);t.physicsBody.appendAnchor(a,e.physicsBody,o,i)},r.prototype.sleepBody=function(t){u.a.Warn("sleepBody is not currently supported by the Ammo physics plugin")},r.prototype.wakeUpBody=function(t){t.physicsBody.activate()},r.prototype.updateDistanceJoint=function(t,e,n){u.a.Warn("updateDistanceJoint is not currently supported by the Ammo physics plugin")},r.prototype.setMotor=function(t,e,n,i){t.physicsJoint.enableAngularMotor(!0,e,n)},r.prototype.setLimit=function(t,e,n){u.a.Warn("setLimit is not currently supported by the Ammo physics plugin")},r.prototype.syncMeshWithImpostor=function(t,e){e.physicsBody.getMotionState().getWorldTransform(this._tmpAmmoTransform),t.position.x=this._tmpAmmoTransform.getOrigin().x(),t.position.y=this._tmpAmmoTransform.getOrigin().y(),t.position.z=this._tmpAmmoTransform.getOrigin().z(),t.rotationQuaternion&&(t.rotationQuaternion.x=this._tmpAmmoTransform.getRotation().x(),t.rotationQuaternion.y=this._tmpAmmoTransform.getRotation().y(),t.rotationQuaternion.z=this._tmpAmmoTransform.getRotation().z(),t.rotationQuaternion.w=this._tmpAmmoTransform.getRotation().w())},r.prototype.getRadius=function(t){return t.getObjectExtendSize().x/2},r.prototype.getBoxSizeToRef=function(t,e){var n=t.getObjectExtendSize();e.x=n.x,e.y=n.y,e.z=n.z},r.prototype.dispose=function(){this.bjsAMMO.destroy(this.world),this.bjsAMMO.destroy(this._solver),this.bjsAMMO.destroy(this._overlappingPairCache),this.bjsAMMO.destroy(this._dispatcher),this.bjsAMMO.destroy(this._collisionConfiguration),this.bjsAMMO.destroy(this._tmpAmmoVectorA),this.bjsAMMO.destroy(this._tmpAmmoVectorB),this.bjsAMMO.destroy(this._tmpAmmoVectorC),this.bjsAMMO.destroy(this._tmpAmmoTransform),this.bjsAMMO.destroy(this._tmpAmmoQuaternion),this.bjsAMMO.destroy(this._tmpAmmoConcreteContactResultCallback),this.world=null},r.prototype.raycast=function(t,e){this._tmpAmmoVectorRCA=new this.bjsAMMO.btVector3(t.x,t.y,t.z),this._tmpAmmoVectorRCB=new this.bjsAMMO.btVector3(e.x,e.y,e.z);var n=new this.bjsAMMO.ClosestRayResultCallback(this._tmpAmmoVectorRCA,this._tmpAmmoVectorRCB);return this.world.rayTest(this._tmpAmmoVectorRCA,this._tmpAmmoVectorRCB,n),this._raycastResult.reset(t,e),n.hasHit()&&(this._raycastResult.setHitData({x:n.get_m_hitNormalWorld().x(),y:n.get_m_hitNormalWorld().y(),z:n.get_m_hitNormalWorld().z()},{x:n.get_m_hitPointWorld().x(),y:n.get_m_hitPointWorld().y(),z:n.get_m_hitPointWorld().z()}),this._raycastResult.calculateHitDistance()),this.bjsAMMO.destroy(n),this.bjsAMMO.destroy(this._tmpAmmoVectorRCA),this.bjsAMMO.destroy(this._tmpAmmoVectorRCB),this._raycastResult},r.DISABLE_COLLISION_FLAG=4,r.KINEMATIC_FLAG=2,r.DISABLE_DEACTIVATION_FLAG=4,r}();B.a.prototype.removeReflectionProbe=function(r){if(!this.reflectionProbes)return-1;var t=this.reflectionProbes.indexOf(r);return t!==-1&&this.reflectionProbes.splice(t,1),t},B.a.prototype.addReflectionProbe=function(r){this.reflectionProbes||(this.reflectionProbes=[]),this.reflectionProbes.push(r)};var Ju=function(){function r(t,e,n,i,o){var a=this;i===void 0&&(i=!0),o===void 0&&(o=!1),this.name=t,this._viewMatrix=l.a.Identity(),this._target=l.e.Zero(),this._add=l.e.Zero(),this._invertYAxis=!1,this.position=l.e.Zero(),this._scene=n,this._scene.reflectionProbes||(this._scene.reflectionProbes=new Array),this._scene.reflectionProbes.push(this);var s=h.a.TEXTURETYPE_UNSIGNED_BYTE;if(o){var d=this._scene.getEngine().getCaps();d.textureHalfFloatRender?s=h.a.TEXTURETYPE_HALF_FLOAT:d.textureFloatRender&&(s=h.a.TEXTURETYPE_FLOAT)}this._renderTargetTexture=new ln(t,e,n,i,!0,s,!0),this._renderTargetTexture.onBeforeRenderObservable.add(function(p){switch(p){case 0:a._add.copyFromFloats(1,0,0);break;case 1:a._add.copyFromFloats(-1,0,0);break;case 2:a._add.copyFromFloats(0,a._invertYAxis?1:-1,0);break;case 3:a._add.copyFromFloats(0,a._invertYAxis?-1:1,0);break;case 4:a._add.copyFromFloats(0,0,1);break;case 5:a._add.copyFromFloats(0,0,-1)}a._attachedMesh&&a.position.copyFrom(a._attachedMesh.getAbsolutePosition()),a.position.addToRef(a._add,a._target),l.a.LookAtLHToRef(a.position,a._target,l.e.Up(),a._viewMatrix),n.activeCamera&&(a._projectionMatrix=l.a.PerspectiveFovLH(Math.PI/2,1,n.activeCamera.minZ,n.activeCamera.maxZ),n.setTransformMatrix(a._viewMatrix,a._projectionMatrix)),n._forcedViewPosition=a.position}),this._renderTargetTexture.onAfterUnbindObservable.add(function(){n._forcedViewPosition=null,n.updateTransformMatrix(!0)})}return Object.defineProperty(r.prototype,"samples",{get:function(){return this._renderTargetTexture.samples},set:function(t){this._renderTargetTexture.samples=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"refreshRate",{get:function(){return this._renderTargetTexture.refreshRate},set:function(t){this._renderTargetTexture.refreshRate=t},enumerable:!1,configurable:!0}),r.prototype.getScene=function(){return this._scene},Object.defineProperty(r.prototype,"cubeTexture",{get:function(){return this._renderTargetTexture},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"renderList",{get:function(){return this._renderTargetTexture.renderList},enumerable:!1,configurable:!0}),r.prototype.attachToMesh=function(t){this._attachedMesh=t},r.prototype.setRenderingAutoClearDepthStencil=function(t,e){this._renderTargetTexture.setRenderingAutoClearDepthStencil(t,e)},r.prototype.dispose=function(){var t=this._scene.reflectionProbes.indexOf(this);t!==-1&&this._scene.reflectionProbes.splice(t,1),this._renderTargetTexture&&(this._renderTargetTexture.dispose(),this._renderTargetTexture=null)},r.prototype.toString=function(t){var e="Name: "+this.name;return t&&(e+=", position: "+this.position.toString(),this._attachedMesh&&(e+=", attached mesh: "+this._attachedMesh.name)),e},r.prototype.getClassName=function(){return"ReflectionProbe"},r.prototype.serialize=function(){var t=L.a.Serialize(this,this._renderTargetTexture.serialize());return t.isReflectionProbe=!0,t},r.Parse=function(t,e,n){var i=null;if(e.reflectionProbes)for(var o=0;o0){var n=t._waitingData.lods.ids,i=e.isEnabled(!1);if(t._waitingData.lods.distances){var o=t._waitingData.lods.distances;if(o.length>=n.length){var a=o.length>n.length?o[o.length-1]:0;e.setEnabled(!1);for(var s=0;s0&&e.addLODLevel(a,null),i===!0&&e.setEnabled(!0)}else Ye.b.Warn("Invalid level of detail distances for "+t.name)}}t._waitingData.lods=null}},th=function(r,t,e,n,i){i===void 0&&(i=!1);var o=new On(r),a="importScene has failed JSON parse";try{var s=JSON.parse(t);a="";var d,p,y=Ut.loggingLevel===Ut.DETAILED_LOGGING;if(s.environmentTexture!==void 0&&s.environmentTexture!==null){var C=s.isPBR===void 0||s.isPBR;if(s.environmentTextureType&&s.environmentTextureType==="BABYLON.HDRCubeTexture"){var M=s.environmentTextureSize?s.environmentTextureSize:128,U=new ha((s.environmentTexture.match(/https?:\/\//g)?"":e)+s.environmentTexture,r,M,!0,!C);s.environmentTextureRotationY&&(U.rotationY=s.environmentTextureRotationY),r.environmentTexture=U}else if(Qn.a.EndsWith(s.environmentTexture,".env")){var F=new ai((s.environmentTexture.match(/https?:\/\//g)?"":e)+s.environmentTexture,r);s.environmentTextureRotationY&&(F.rotationY=s.environmentTextureRotationY),r.environmentTexture=F}else{var z=ai.CreateFromPrefilteredData((s.environmentTexture.match(/https?:\/\//g)?"":e)+s.environmentTexture,r);s.environmentTextureRotationY&&(z.rotationY=s.environmentTextureRotationY),r.environmentTexture=z}if(s.createDefaultSkybox===!0){var J=r.activeCamera!==void 0&&r.activeCamera!==null?(r.activeCamera.maxZ-r.activeCamera.minZ)/2:1e3,ie=s.skyboxBlurLevel||0;r.createDefaultSkybox(r.environmentTexture,C,J,ie)}o.environmentTexture=r.environmentTexture}if(s.environmentIntensity!==void 0&&s.environmentIntensity!==null&&(r.environmentIntensity=s.environmentIntensity),s.lights!==void 0&&s.lights!==null)for(d=0,p=s.lights.length;d0){for(var $t=0;$t0){for(var zn=0;zn-1&&p.skeletons!==void 0&&p.skeletons!==null&&!(z.indexOf(ie.skeletonId)>-1))for(var Le=0,xe=p.skeletons.length;Le1,this.wrapU=h.a.TEXTURE_CLAMP_ADDRESSMODE,this.wrapV=h.a.TEXTURE_CLAMP_ADDRESSMODE,this.wrapR=h.a.TEXTURE_CLAMP_ADDRESSMODE,this.anisotropicFilteringLevel=1;var o=function(s){if(typeof s=="string"){for(var d,p=null,y=null,C=s.split(` -`),M=0,U=0,F=0,z=0,J=0,ie=0;ie0&&(ie+1)%4==0)p[ie]=255;else{var Te=y[ie];p[ie]=Te/J*255}e.is3D?(e.updateSize(M,M,M),i.updateRawTexture3D(e,p,h.a.TEXTUREFORMAT_RGBA,!1)):(e.updateSize(M*M,M),i.updateRawTexture(e,p,h.a.TEXTUREFORMAT_RGBA,!1)),e.isReady=!0,n._triggerOnLoad()}},a=this.getScene();return a?a._loadFile(this.url,o):i._loadFile(this.url,o),this._texture},t.prototype.loadTexture=function(){this.url&&this.url.toLocaleLowerCase().indexOf(".3dl")==this.url.length-4&&this.load3dlTexture()},t.prototype.clone=function(){var e=new t(this.url,this.getScene()||this._getEngine());return e.level=this.level,e},t.prototype.delayLoad=function(){this.delayLoadState===h.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=h.a.DELAYLOADSTATE_LOADED,this._texture=this._getFromCache(this.url,!0),this._texture||this.loadTexture())},t.Parse=function(e,n){var i=null;return e.name&&!e.isRenderTarget&&((i=new t(e.name,n)).name=e.name,i.level=e.level),i},t.prototype.serialize=function(){if(!this.name)return null;var e={};return e.name=this.name,e.level=this.level,e.customType="BABYLON.ColorGradingTexture",e},t._noneEmptyLineRegex=/\S+/,t}(Wn.a);R.a.RegisteredTypes["BABYLON.ColorGradingTexture"]=ah;var sh=function(r){function t(e,n,i,o,a,s,d){o===void 0&&(o=!1),a===void 0&&(a=!0),s===void 0&&(s=null),d===void 0&&(d=null);var p=r.call(this,n)||this;if(p._onLoad=null,p._onError=null,!e)throw new Error("Image url is not set");return p._coordinatesMode=we.a.CUBIC_MODE,p.name=e,p.url=e,p._size=i,p._noMipmap=o,p.gammaSpace=a,p._onLoad=s,p._onError=d,p.hasAlpha=!1,p.isCube=!0,p._texture=p._getFromCache(e,p._noMipmap),p._texture?s&&(p._texture.isReady?Ye.b.SetImmediate(function(){return s()}):p._texture.onLoadedObservable.add(s)):n.useDelayedTextureLoading?p.delayLoadState=h.a.DELAYLOADSTATE_NOTLOADED:p.loadImage(p.loadTexture.bind(p),p._onError),p}return Object(c.d)(t,r),t.prototype.loadImage=function(e,n){var i=this,o=document.createElement("canvas"),a=new Image;a.addEventListener("load",function(){i._width=a.width,i._height=a.height,o.width=i._width,o.height=i._height;var s=o.getContext("2d");s.drawImage(a,0,0);var d=s.getImageData(0,0,a.width,a.height);i._buffer=d.data.buffer,o.remove(),e()}),a.addEventListener("error",function(s){n&&n(i.getClassName()+" could not be loaded",s)}),a.src=this.url},t.prototype.loadTexture=function(){var e=this,n=this.getScene();n&&(this._texture=n.getEngine().createRawCubeTextureFromUrl(this.url,n,this._size,h.a.TEXTUREFORMAT_RGB,n.getEngine().getCaps().textureFloat?h.a.TEXTURETYPE_FLOAT:h.a.TEXTURETYPE_UNSIGNED_INTEGER,this._noMipmap,function(){for(var i=e.getFloat32ArrayFromArrayBuffer(e._buffer),o=ec.ConvertPanoramaToCubemap(i,e._width,e._height,e._size),a=[],s=0;s<6;s++){var d=o[t._FacesMapping[s]];a.push(d)}return a},null,this._onLoad,this._onError))},t.prototype.getFloat32ArrayFromArrayBuffer=function(e){for(var n=new DataView(e),i=new Float32Array(3*e.byteLength/4),o=0,a=0;ae.length)u.a.Error("Unable to load TGA file - Not enough data");else{n+=i.id_length;var o,a=!1,s=!1,d=!1;switch(i.image_type){case r._TYPE_RLE_INDEXED:a=!0;case r._TYPE_INDEXED:s=!0;break;case r._TYPE_RLE_RGB:a=!0;case r._TYPE_RGB:break;case r._TYPE_RLE_GREY:a=!0;case r._TYPE_GREY:d=!0}var p,y,C,M,U,F,z,J=i.pixel_size>>3,ie=i.width*i.height*J;if(s&&(p=e.subarray(n,n+=i.colormap_length*(i.colormap_size>>3))),a){var se,ce,ue;o=new Uint8Array(ie);for(var fe=0,ve=new Uint8Array(J);n>r._ORIGIN_SHIFT){default:case r._ORIGIN_UL:y=0,M=1,z=i.width,C=0,U=1,F=i.height;break;case r._ORIGIN_BL:y=0,M=1,z=i.width,C=i.height-1,U=-1,F=-1;break;case r._ORIGIN_UR:y=i.width-1,M=-1,z=-1,C=0,U=1,F=i.height;break;case r._ORIGIN_BR:y=i.width-1,M=-1,z=-1,C=i.height-1,U=-1,F=-1}var Te=r["_getImageData"+(d?"Grey":"")+i.pixel_size+"bits"](i,p,o,C,U,F,y,M,z);t.getEngine()._uploadDataToTextureDirectly(t,Te)}}},r._getImageData8bits=function(t,e,n,i,o,a,s,d,p){var y,C,M,U=n,F=e,z=t.width,J=t.height,ie=0,se=new Uint8Array(z*J*4);for(M=i;M!==a;M+=o)for(C=s;C!==p;C+=d,ie++)y=U[ie],se[4*(C+z*M)+3]=255,se[4*(C+z*M)+2]=F[3*y+0],se[4*(C+z*M)+1]=F[3*y+1],se[4*(C+z*M)+0]=F[3*y+2];return se},r._getImageData16bits=function(t,e,n,i,o,a,s,d,p){var y,C,M,U=n,F=t.width,z=t.height,J=0,ie=new Uint8Array(F*z*4);for(M=i;M!==a;M+=o)for(C=s;C!==p;C+=d,J+=2){var se=255*((31744&(y=U[J+0]+(U[J+1]<<8)))>>10)/31|0,ce=255*((992&y)>>5)/31|0,ue=255*(31&y)/31|0;ie[4*(C+F*M)+0]=se,ie[4*(C+F*M)+1]=ce,ie[4*(C+F*M)+2]=ue,ie[4*(C+F*M)+3]=32768&y?0:255}return ie},r._getImageData24bits=function(t,e,n,i,o,a,s,d,p){var y,C,M=n,U=t.width,F=t.height,z=0,J=new Uint8Array(U*F*4);for(C=i;C!==a;C+=o)for(y=s;y!==p;y+=d,z+=3)J[4*(y+U*C)+3]=255,J[4*(y+U*C)+2]=M[z+0],J[4*(y+U*C)+1]=M[z+1],J[4*(y+U*C)+0]=M[z+2];return J},r._getImageData32bits=function(t,e,n,i,o,a,s,d,p){var y,C,M=n,U=t.width,F=t.height,z=0,J=new Uint8Array(U*F*4);for(C=i;C!==a;C+=o)for(y=s;y!==p;y+=d,z+=4)J[4*(y+U*C)+2]=M[z+0],J[4*(y+U*C)+1]=M[z+1],J[4*(y+U*C)+0]=M[z+2],J[4*(y+U*C)+3]=M[z+3];return J},r._getImageDataGrey8bits=function(t,e,n,i,o,a,s,d,p){var y,C,M,U=n,F=t.width,z=t.height,J=0,ie=new Uint8Array(F*z*4);for(M=i;M!==a;M+=o)for(C=s;C!==p;C+=d,J++)y=U[J],ie[4*(C+F*M)+0]=y,ie[4*(C+F*M)+1]=y,ie[4*(C+F*M)+2]=y,ie[4*(C+F*M)+3]=255;return ie},r._getImageDataGrey16bits=function(t,e,n,i,o,a,s,d,p){var y,C,M=n,U=t.width,F=t.height,z=0,J=new Uint8Array(U*F*4);for(C=i;C!==a;C+=o)for(y=s;y!==p;y+=d,z+=2)J[4*(y+U*C)+0]=M[z+0],J[4*(y+U*C)+1]=M[z+0],J[4*(y+U*C)+2]=M[z+0],J[4*(y+U*C)+3]=M[z+1];return J},r._TYPE_INDEXED=1,r._TYPE_RGB=2,r._TYPE_GREY=3,r._TYPE_RLE_INDEXED=9,r._TYPE_RLE_RGB=10,r._TYPE_RLE_GREY=11,r._ORIGIN_MASK=48,r._ORIGIN_SHIFT=4,r._ORIGIN_BL=0,r._ORIGIN_BR=1,r._ORIGIN_UL=2,r._ORIGIN_UR=3,r}(),ch=function(){function r(){this.supportCascades=!1}return r.prototype.canLoad=function(t){return Qn.a.EndsWith(t,".tga")},r.prototype.loadCubeData=function(t,e,n,i,o){throw".env not supported in Cube."},r.prototype.loadData=function(t,e,n){var i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength),o=ma.GetTGAHeader(i);n(o.width,o.height,e.generateMipMaps,!1,function(){ma.UploadContent(e,i)})},r}();Ve.a._TextureLoaders.push(new ch);var mo,am=function(){};(function(r){r[r.cTFETC1=0]="cTFETC1",r[r.cTFBC1=1]="cTFBC1",r[r.cTFBC4=2]="cTFBC4",r[r.cTFPVRTC1_4_OPAQUE_ONLY=3]="cTFPVRTC1_4_OPAQUE_ONLY",r[r.cTFBC7_M6_OPAQUE_ONLY=4]="cTFBC7_M6_OPAQUE_ONLY",r[r.cTFETC2=5]="cTFETC2",r[r.cTFBC3=6]="cTFBC3",r[r.cTFBC5=7]="cTFBC5"})(mo||(mo={}));var go=function(){function r(){}return r.GetInternalFormatFromBasisFormat=function(t){if(t===mo.cTFETC1)return 36196;if(t===mo.cTFBC1)return 33776;if(t===mo.cTFBC3)return 33779;throw"The chosen Basis transcoder format is not currently supported"},r._CreateWorkerAsync=function(){var t=this;return this._WorkerPromise||(this._WorkerPromise=new Promise(function(e){t._Worker?e(t._Worker):Ye.b.LoadFileAsync(r.WasmModuleURL).then(function(n){var i=URL.createObjectURL(new Blob(["("+sm+")()"],{type:"application/javascript"}));t._Worker=new Worker(i);var o=function(a){a.data.action==="init"&&(t._Worker.removeEventListener("message",o),e(t._Worker))};t._Worker.addEventListener("message",o),t._Worker.postMessage({action:"init",url:r.JSModuleURL,wasmBinary:n})})})),this._WorkerPromise},r.TranscodeAsync=function(t,e){var n=this,i=t instanceof ArrayBuffer?new Uint8Array(t):t;return new Promise(function(o,a){n._CreateWorkerAsync().then(function(){var s=n._actionId++,d=function(y){y.data.action==="transcode"&&y.data.id===s&&(n._Worker.removeEventListener("message",d),y.data.success?o(y.data):a("Transcode is not supported on this device"))};n._Worker.addEventListener("message",d);var p=new Uint8Array(i.byteLength);p.set(new Uint8Array(i.buffer,i.byteOffset,i.byteLength)),n._Worker.postMessage({action:"transcode",id:s,imageData:p,config:e,ignoreSupportedFormats:n._IgnoreSupportedFormats},[p.buffer])})})},r.LoadTextureFromTranscodeResult=function(t,e){for(var n,i=t.getEngine(),o=function(){if(n=e.fileInfo.images[a].levels[0],t._invertVScale=t.invertY,e.format===-1)if(t.type=h.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,t.format=h.a.TEXTUREFORMAT_RGB,i.webGLVersion<2&&($.a.Log2(n.width)%1!=0||$.a.Log2(n.height)%1!=0)){var s=new xt.a(i,xt.b.Temp);t._invertVScale=t.invertY,s.type=h.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,s.format=h.a.TEXTUREFORMAT_RGB,s.width=n.width+3&-4,s.height=n.height+3&-4,i._bindTextureDirectly(i._gl.TEXTURE_2D,s,!0),i._uploadDataToTextureDirectly(s,n.transcodedPixels,a,0,h.a.TEXTUREFORMAT_RGB,!0),i._rescaleTexture(s,t,i.scenes[0],i._getInternalFormat(h.a.TEXTUREFORMAT_RGB),function(){i._releaseTexture(s),i._bindTextureDirectly(i._gl.TEXTURE_2D,t,!0)})}else t._invertVScale=!t.invertY,t.width=n.width+3&-4,t.height=n.height+3&-4,i._uploadDataToTextureDirectly(t,n.transcodedPixels,a,0,h.a.TEXTUREFORMAT_RGB,!0);else t.width=n.width,t.height=n.height,e.fileInfo.images[a].levels.forEach(function(d,p){i._uploadCompressedDataToTextureDirectly(t,r.GetInternalFormatFromBasisFormat(e.format),d.width,d.height,d.transcodedPixels,a,p)}),i.webGLVersion<2&&($.a.Log2(t.width)%1!=0||$.a.Log2(t.height)%1!=0)&&(Ye.b.Warn("Loaded .basis texture width and height are not a power of two. Texture wrapping will be set to Texture.CLAMP_ADDRESSMODE as other modes are not supported with non power of two dimensions in webGL 1."),t._cachedWrapU=we.a.CLAMP_ADDRESSMODE,t._cachedWrapV=we.a.CLAMP_ADDRESSMODE)},a=0;a>2&3],se[Ee++]=ie[Pe>>4&3],se[Ee++]=ie[Pe>>6&3]}}return se}(M,0,a.getImageWidth(s,d)+3&-4,a.getImageHeight(s,d)+3&-4)),M):null}onmessage=function(a){if(a.data.action==="init")i||(Module={wasmBinary:a.data.wasmBinary},importScripts(a.data.url),i=new Promise(function(fe){Module.onRuntimeInitialized=function(){Module.initializeBasis(),fe()}})),i.then(function(){postMessage({action:"init"})});else if(a.data.action==="transcode"){var s=a.data.config,d=a.data.imageData,p=new Module.BasisFile(d),y=function(fe){for(var ve=fe.getHasAlpha(),Te=fe.getNumImages(),Oe=[],Pe=0;Pe1&&e.generateMipMaps;go.LoadTextureFromTranscodeResult(e,d),e.getEngine()._setCubeMapTextureParams(e,p),e.isReady=!0,e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear(),i&&i()}).catch(function(d){Ye.b.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"),e.isReady=!0})}},r.prototype.loadData=function(t,e,n){var i=e.getEngine().getCaps(),o={supportedCompressionFormats:{etc1:!!i.etc1,s3tc:!!i.s3tc,pvrtc:!!i.pvrtc,etc2:!!i.etc2}};go.TranscodeAsync(t,o).then(function(a){var s=a.fileInfo.images[0].levels[0],d=a.fileInfo.images[0].levels.length>1&&e.generateMipMaps;n(s.width,s.height,d,a.format!==-1,function(){go.LoadTextureFromTranscodeResult(e,a)})}).catch(function(a){Ye.b.Warn("Failed to transcode Basis file, transcoding may not be supported on this device"),n(0,0,!1,!1,function(){})})},r}();Ve.a._TextureLoaders.push(new lh);var rc=function(r){function t(e,n,i,o,a){var s=this,d=!(!a||!a.generateMipMaps)&&a.generateMipMaps,p=!(!a||!a.generateDepthTexture)&&a.generateDepthTexture,y=!a||a.doNotChangeAspectRatio===void 0||a.doNotChangeAspectRatio;if((s=r.call(this,e,n,o,d,y)||this).isSupported){var C=[],M=[];s._initTypes(i,C,M,a);var U=!a||a.generateDepthBuffer===void 0||a.generateDepthBuffer,F=!(!a||a.generateStencilBuffer===void 0)&&a.generateStencilBuffer;return s._size=n,s._multiRenderTargetOptions={samplingModes:M,generateMipMaps:d,generateDepthBuffer:U,generateStencilBuffer:F,generateDepthTexture:p,types:C,textureCount:i},s._count=i,s._createInternalTextures(),s._createTextures(),s}s.dispose()}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"isSupported",{get:function(){return this._getEngine().webGLVersion>1||this._getEngine().getCaps().drawBuffersExtension},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textures",{get:function(){return this._textures},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthTexture",{get:function(){return this._textures[this._textures.length-1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wrapU",{set:function(e){if(this._textures)for(var n=0;n=0;e--)this._internalTextures[e]!==void 0&&(this._internalTextures[e].dispose(),this._internalTextures.splice(e,1))},t}(ln),oc=function(r,t,e){this.id=r,this.scale=t,this.offset=e},cm=function(){function r(t,e,n,i){var o,a,s,d,p,y,C,M,U,F,z,J,ie;return this.name=t,this.meshes=e,this.scene=i,this.options=n,this.options.map=(o=this.options.map)!==null&&o!==void 0?o:["ambientTexture","bumpTexture","diffuseTexture","emissiveTexture","lightmapTexture","opacityTexture","reflectionTexture","refractionTexture","specularTexture"],this.options.uvsIn=(a=this.options.uvsIn)!==null&&a!==void 0?a:Me.b.UVKind,this.options.uvsOut=(s=this.options.uvsOut)!==null&&s!==void 0?s:Me.b.UVKind,this.options.layout=(d=this.options.layout)!==null&&d!==void 0?d:r.LAYOUT_STRIP,this.options.layout===r.LAYOUT_COLNUM&&(this.options.colnum=(p=this.options.colnum)!==null&&p!==void 0?p:8),this.options.updateInputMeshes=(y=this.options.updateInputMeshes)===null||y===void 0||y,this.options.disposeSources=(C=this.options.disposeSources)===null||C===void 0||C,this._expecting=0,this.options.fillBlanks=(M=this.options.fillBlanks)===null||M===void 0||M,this.options.fillBlanks===!0&&(this.options.customFillColor=(U=this.options.customFillColor)!==null&&U!==void 0?U:"black"),this.options.frameSize=(F=this.options.frameSize)!==null&&F!==void 0?F:256,this.options.paddingRatio=(z=this.options.paddingRatio)!==null&&z!==void 0?z:.0115,this._paddingValue=Math.ceil(this.options.frameSize*this.options.paddingRatio),this._paddingValue%2!=0&&this._paddingValue++,this.options.paddingMode=(J=this.options.paddingMode)!==null&&J!==void 0?J:r.SUBUV_WRAP,this.options.paddingMode===r.SUBUV_COLOR&&(this.options.paddingColor=(ie=this.options.paddingColor)!==null&&ie!==void 0?ie:new O.b(0,0,0,1)),this.sets={},this.frames=[],this}return r.prototype._createFrames=function(t){for(var e=this,n=this._calculateSize(),i=new l.d(1,1).divide(n),o=0,a=this._expecting,s=this.meshes.length,d=Object.keys(this.sets),p=0;p0);for(var t=0;t0)}},r}(),lm=` -attribute vec2 position; - -varying vec2 vPosition; -varying vec2 vUV; -const vec2 madd=vec2(0.5,0.5); -void main(void) { -vPosition=position; -vUV=position*madd+madd; -gl_Position=vec4(position,0.0,1.0); -}`;je.a.ShadersStore.proceduralVertexShader=lm;var vo=function(r){function t(e,n,i,o,a,s,d,p){a===void 0&&(a=null),s===void 0&&(s=!0),d===void 0&&(d=!1),p===void 0&&(p=h.a.TEXTURETYPE_UNSIGNED_INT);var y=r.call(this,null,o,!s)||this;y.isEnabled=!0,y.autoClear=!0,y.onGeneratedObservable=new P.c,y.onBeforeGenerationObservable=new P.c,y.nodeMaterialSource=null,y._textures={},y._currentRefreshId=-1,y._frameId=-1,y._refreshRate=1,y._vertexBuffers={},y._uniforms=new Array,y._samplers=new Array,y._floats={},y._ints={},y._floatsArrays={},y._colors3={},y._colors4={},y._vectors2={},y._vectors3={},y._matrices={},y._fallbackTextureUsed=!1,y._cachedDefines="",y._contentUpdateId=-1;var C=(o=y.getScene()||te.a.LastCreatedScene)._getComponent(st.a.NAME_PROCEDURALTEXTURE);C||(C=new uh(o),o._addComponent(C)),o.proceduralTextures.push(y),y._fullEngine=o.getEngine(),y.name=e,y.isRenderTarget=!0,y._size=n,y._generateMipMaps=s,y.setFragment(i),y._fallbackTexture=a,d?(y._texture=y._fullEngine.createRenderTargetCubeTexture(n,{generateMipMaps:s,generateDepthBuffer:!1,generateStencilBuffer:!1,type:p}),y.setFloat("face",0)):y._texture=y._fullEngine.createRenderTargetTexture(n,{generateMipMaps:s,generateDepthBuffer:!1,generateStencilBuffer:!1,type:p});var M=[];return M.push(1,1),M.push(-1,1),M.push(-1,-1),M.push(1,-1),y._vertexBuffers[Me.b.PositionKind]=new Me.b(y._fullEngine,M,Me.b.PositionKind,!1,!1,2),y._createIndexBuffer(),y}return Object(c.d)(t,r),t.prototype.getEffect=function(){return this._effect},t.prototype.getContent=function(){return this._contentData&&this._frameId===this._contentUpdateId||(this._contentData=this.readPixels(0,0,this._contentData),this._contentUpdateId=this._frameId),this._contentData},t.prototype._createIndexBuffer=function(){var e=this._fullEngine,n=[];n.push(0),n.push(1),n.push(2),n.push(0),n.push(2),n.push(3),this._indexBuffer=e.createIndexBuffer(n)},t.prototype._rebuild=function(){var e=this._vertexBuffers[Me.b.PositionKind];e&&e._rebuild(),this._createIndexBuffer(),this.refreshRate===ln.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=ln.REFRESHRATE_RENDER_ONCE)},t.prototype.reset=function(){this._effect!==void 0&&this._effect.dispose()},t.prototype._getDefines=function(){return""},t.prototype.isReady=function(){var e,n=this,i=this._fullEngine;if(this.nodeMaterialSource)return this._effect.isReady();if(!this._fragment)return!1;if(this._fallbackTextureUsed)return!0;var o=this._getDefines();return!(!this._effect||o!==this._cachedDefines||!this._effect.isReady())||(e=this._fragment.fragmentElement!==void 0?{vertex:"procedural",fragmentElement:this._fragment.fragmentElement}:{vertex:"procedural",fragment:this._fragment},this._cachedDefines=o,this._effect=i.createEffect(e,[Me.b.PositionKind],this._uniforms,this._samplers,o,void 0,void 0,function(){n.releaseInternalTexture(),n._fallbackTexture&&(n._texture=n._fallbackTexture._texture,n._texture&&n._texture.incrementReferences()),n._fallbackTextureUsed=!0}),this._effect.isReady())},t.prototype.resetRefreshCounter=function(){this._currentRefreshId=-1},t.prototype.setFragment=function(e){this._fragment=e},Object.defineProperty(t.prototype,"refreshRate",{get:function(){return this._refreshRate},set:function(e){this._refreshRate=e,this.resetRefreshCounter()},enumerable:!1,configurable:!0}),t.prototype._shouldRender=function(){return this.isEnabled&&this.isReady()&&this._texture?!this._fallbackTextureUsed&&(this._currentRefreshId===-1||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,this._frameId++,!0):(this._currentRefreshId++,!1)):(this._texture&&(this._texture.isReady=!1),!1)},t.prototype.getRenderSize=function(){return this._size},t.prototype.resize=function(e,n){this._fallbackTextureUsed||(this.releaseInternalTexture(),this._texture=this._fullEngine.createRenderTargetTexture(e,n),this._size=e,this._generateMipMaps=n)},t.prototype._checkUniform=function(e){this._uniforms.indexOf(e)===-1&&this._uniforms.push(e)},t.prototype.setTexture=function(e,n){return this._samplers.indexOf(e)===-1&&this._samplers.push(e),this._textures[e]=n,this},t.prototype.setFloat=function(e,n){return this._checkUniform(e),this._floats[e]=n,this},t.prototype.setInt=function(e,n){return this._checkUniform(e),this._ints[e]=n,this},t.prototype.setFloats=function(e,n){return this._checkUniform(e),this._floatsArrays[e]=n,this},t.prototype.setColor3=function(e,n){return this._checkUniform(e),this._colors3[e]=n,this},t.prototype.setColor4=function(e,n){return this._checkUniform(e),this._colors4[e]=n,this},t.prototype.setVector2=function(e,n){return this._checkUniform(e),this._vectors2[e]=n,this},t.prototype.setVector3=function(e,n){return this._checkUniform(e),this._vectors3[e]=n,this},t.prototype.setMatrix=function(e,n){return this._checkUniform(e),this._matrices[e]=n,this},t.prototype.render=function(e){var n=this.getScene();if(n){var i=this._fullEngine;if(i.enableEffect(this._effect),this.onBeforeGenerationObservable.notifyObservers(this),i.setState(!1),!this.nodeMaterialSource){for(var o in this._textures)this._effect.setTexture(o,this._textures[o]);for(o in this._ints)this._effect.setInt(o,this._ints[o]);for(o in this._floats)this._effect.setFloat(o,this._floats[o]);for(o in this._floatsArrays)this._effect.setArray(o,this._floatsArrays[o]);for(o in this._colors3)this._effect.setColor3(o,this._colors3[o]);for(o in this._colors4){var a=this._colors4[o];this._effect.setFloat4(o,a.r,a.g,a.b,a.a)}for(o in this._vectors2)this._effect.setVector2(o,this._vectors2[o]);for(o in this._vectors3)this._effect.setVector3(o,this._vectors3[o]);for(o in this._matrices)this._effect.setMatrix(o,this._matrices[o])}if(this._texture){if(this.isCube)for(var s=0;s<6;s++)i.bindFramebuffer(this._texture,s,void 0,void 0,!0),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect),this._effect.setFloat("face",s),this.autoClear&&i.clear(n.clearColor,!0,!1,!1),i.drawElementsType(Ht.a.TriangleFillMode,0,6),s===5&&i.generateMipMapsForCubemap(this._texture);else i.bindFramebuffer(this._texture,0,void 0,void 0,!0),i.bindBuffers(this._vertexBuffers,this._indexBuffer,this._effect),this.autoClear&&i.clear(n.clearColor,!0,!1,!1),i.drawElementsType(Ht.a.TriangleFillMode,0,6);i.unBindFramebuffer(this._texture,this.isCube),this.onGenerated&&this.onGenerated(),this.onGeneratedObservable.notifyObservers(this)}}},t.prototype.clone=function(){var e=this.getSize(),n=new t(this.name,e.width,this._fragment,this.getScene(),this._fallbackTexture,this._generateMipMaps);return n.hasAlpha=this.hasAlpha,n.level=this.level,n.coordinatesMode=this.coordinatesMode,n},t.prototype.dispose=function(){var e=this.getScene();if(e){var n=e.proceduralTextures.indexOf(this);n>=0&&e.proceduralTextures.splice(n,1);var i=this._vertexBuffers[Me.b.PositionKind];i&&(i.dispose(),this._vertexBuffers[Me.b.PositionKind]=null),this._indexBuffer&&this._fullEngine._releaseBuffer(this._indexBuffer)&&(this._indexBuffer=null),this.onGeneratedObservable.clear(),this.onBeforeGenerationObservable.clear(),r.prototype.dispose.call(this)}},Object(c.c)([Object(L.c)()],t.prototype,"isEnabled",void 0),Object(c.c)([Object(L.c)()],t.prototype,"autoClear",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_generateMipMaps",void 0),Object(c.c)([Object(L.c)()],t.prototype,"_size",void 0),Object(c.c)([Object(L.c)()],t.prototype,"refreshRate",null),t}(we.a);R.a.RegisteredTypes["BABYLON.ProceduralTexture"]=vo;var um=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,i,null,o,a,s)||this;return d._animate=!0,d._time=0,d._texturePath=n,d._loadJson(n),d.refreshRate=1,d}return Object(c.d)(t,r),t.prototype._loadJson=function(e){var n=this,i=function(){try{n.setFragment(n._texturePath)}catch{u.a.Error("No json or ShaderStore or DOM element found for CustomProceduralTexture")}},o=e+"/config.json",a=new re.a;a.open("GET",o),a.addEventListener("load",function(){if(a.status===200||a.responseText&&a.responseText.length>0)try{n._config=JSON.parse(a.response),n.updateShaderUniforms(),n.updateTextures(),n.setFragment(n._texturePath+"/custom"),n._animate=n._config.animate,n.refreshRate=n._config.refreshrate}catch{i()}else i()},!1),a.addEventListener("error",function(){i()},!1);try{a.send()}catch{u.a.Error("CustomProceduralTexture: Error on XHR send request.")}},t.prototype.isReady=function(){if(!r.prototype.isReady.call(this))return!1;for(var e in this._textures)if(!this._textures[e].isReady())return!1;return!0},t.prototype.render=function(e){var n=this.getScene();this._animate&&n&&(this._time+=.03*n.getAnimationRatio(),this.updateShaderUniforms()),r.prototype.render.call(this,e)},t.prototype.updateTextures=function(){for(var e=0;e0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isConnectedInVertexShader",{get:function(){if(this.target===Re.Vertex)return!0;if(!this.hasEndpoints)return!1;for(var t=0,e=this._endpoints;t=0)&&(e.isExposedOnFrame=!0,e.exposedPortPosition=this.exposedPortPosition),e},r.prototype.dispose=function(){this.onConnectionObservable.clear()},r}(),mm=f(152),pt=function(){function r(t,e,n,i){e===void 0&&(e=Re.Vertex),n===void 0&&(n=!1),i===void 0&&(i=!1),this._isFinalMerger=!1,this._isInput=!1,this._name="",this._isUnique=!1,this.inputsAreExclusive=!1,this._codeVariableName="",this._inputs=new Array,this._outputs=new Array,this.comments="",this.visibleInInspector=!1,this._target=e,this._isFinalMerger=n,this._isInput=i,this._name=t,this.uniqueId=mm.a.UniqueId}return Object.defineProperty(r.prototype,"name",{get:function(){return this._name},set:function(t){this.validateBlockName(t)&&(this._name=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isUnique",{get:function(){return this._isUnique},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isFinalMerger",{get:function(){return this._isFinalMerger},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isInput",{get:function(){return this._isInput},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buildId",{get:function(){return this._buildId},set:function(t){this._buildId=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"target",{get:function(){return this._target},set:function(t){!(this._target&t)&&(this._target=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"inputs",{get:function(){return this._inputs},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"outputs",{get:function(){return this._outputs},enumerable:!1,configurable:!0}),r.prototype.getInputByName=function(t){var e=this._inputs.filter(function(n){return n.name===t});return e.length?e[0]:null},r.prototype.getOutputByName=function(t){var e=this._outputs.filter(function(n){return n.name===t});return e.length?e[0]:null},r.prototype.initialize=function(t){},r.prototype.bind=function(t,e,n,i){},r.prototype._declareOutput=function(t,e){return e._getGLType(t.type)+" "+t.associatedVariableName},r.prototype._writeVariable=function(t){return t.connectedPoint?""+t.associatedVariableName:"0."},r.prototype._writeFloat=function(t){var e=t.toString();return e.indexOf(".")===-1&&(e+=".0"),""+e},r.prototype.getClassName=function(){return"NodeMaterialBlock"},r.prototype.registerInput=function(t,e,n,i,o){return n===void 0&&(n=!1),(o=o??new ga(t,this,Tn.Input)).type=e,o.isOptional=n,i&&(o.target=i),this._inputs.push(o),this},r.prototype.registerOutput=function(t,e,n,i){return(i=i??new ga(t,this,Tn.Output)).type=e,n&&(i.target=n),this._outputs.push(i),this},r.prototype.getFirstAvailableInput=function(t){t===void 0&&(t=null);for(var e=0,n=this._inputs;e=this._outputs.length?null:this._outputs[e+1]},r.prototype.connectTo=function(t,e){if(this._outputs.length!==0){for(var n=e&&e.output?this.getOutputByName(e.output):this.getFirstAvailableOutput(t),i=!0;i;){var o=e&&e.input?t.getInputByName(e.input):t.getFirstAvailableInput(n);if(n&&o&&n.canConnectTo(o))n.connectTo(o),i=!1;else{if(!n)throw"Unable to find a compatible match";n=this.getSiblingOutput(n)}}return this}},r.prototype._buildBlock=function(t){},r.prototype.updateUniformsAndSamples=function(t,e,n,i){},r.prototype.provideFallbacks=function(t,e){},r.prototype.initializeDefines=function(t,e,n,i){},r.prototype.prepareDefines=function(t,e,n,i,o){},r.prototype.autoConfigure=function(t){},r.prototype.replaceRepeatableContent=function(t,e,n,i){},r.prototype.isReady=function(t,e,n,i){return!0},r.prototype._linkConnectionTypes=function(t,e,n){n===void 0&&(n=!1),n?this._inputs[e]._acceptedConnectionPointType=this._inputs[t]:this._inputs[t]._linkedConnectionSource=this._inputs[e],this._inputs[e]._linkedConnectionSource=this._inputs[t]},r.prototype._processBuild=function(t,e,n,i){t.build(e,i);var o=e._vertexState!=null,a=t._buildTarget===Re.Vertex&&t.target!==Re.VertexAndFragment;if(o&&(!(t.target&t._buildTarget)||!(t.target&n.target)||this.target!==Re.VertexAndFragment&&a)&&(!t.isInput&&e.target!==t._buildTarget||t.isInput&&t.isAttribute&&!t._noContextSwitch)){var s=n.connectedPoint;e._vertexState._emitVaryingFromString("v_"+s.associatedVariableName,e._getGLType(s.type))&&(e._vertexState.compilationString+="v_"+s.associatedVariableName+" = "+s.associatedVariableName+`;\r -`),n.associatedVariableName="v_"+s.associatedVariableName,n._enforceAssociatedVariableName=!0}},r.prototype.validateBlockName=function(t){for(var e=0,n=["position","normal","tangent","particle_positionw","uv","uv2","position2d","particle_uv","matricesIndices","matricesWeights","world0","world1","world2","world3","particle_color","particle_texturemask"];e[0.."+n.repeatKey+`]\r -`;var i=je.a.IncludesShadersStore[t]+`\r -`;if(this.sharedData.emitComments&&(i=e+`\r -`+i),!n)return i;if(n.replaceStrings)for(var o=0;o[0.."+n.repeatKey+`]\r -`:this.functions[o]="#include<"+t+`>\r -`,void(this.sharedData.emitComments&&(this.functions[o]=e+`\r -`+this.functions[o]));if(this.functions[o]=je.a.IncludesShadersStore[t],this.sharedData.emitComments&&(this.functions[o]=e+`\r -`+this.functions[o]),n.removeIfDef&&(this.functions[o]=this.functions[o].replace(/^\s*?#ifdef.+$/gm,""),this.functions[o]=this.functions[o].replace(/^\s*?#endif.*$/gm,""),this.functions[o]=this.functions[o].replace(/^\s*?#else.*$/gm,""),this.functions[o]=this.functions[o].replace(/^\s*?#elif.*$/gm,"")),n.removeAttributes&&(this.functions[o]=this.functions[o].replace(/^\s*?attribute.+$/gm,"")),n.removeUniforms&&(this.functions[o]=this.functions[o].replace(/^\s*?uniform.+$/gm,"")),n.removeVaryings&&(this.functions[o]=this.functions[o].replace(/^\s*?varying.+$/gm,"")),n.replaceStrings)for(var a=0;a0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0},r.prototype.getDragGradients=function(){return this._dragGradients},r.prototype.getLimitVelocityGradients=function(){return this._limitVelocityGradients},r.prototype.getColorGradients=function(){return this._colorGradients},r.prototype.getSizeGradients=function(){return this._sizeGradients},r.prototype.getColorRemapGradients=function(){return this._colorRemapGradients},r.prototype.getAlphaRemapGradients=function(){return this._alphaRemapGradients},r.prototype.getLifeTimeGradients=function(){return this._lifeTimeGradients},r.prototype.getAngularSpeedGradients=function(){return this._angularSpeedGradients},r.prototype.getVelocityGradients=function(){return this._velocityGradients},r.prototype.getStartSizeGradients=function(){return this._startSizeGradients},r.prototype.getEmitRateGradients=function(){return this._emitRateGradients},Object.defineProperty(r.prototype,"direction1",{get:function(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:l.e.Zero()},set:function(t){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"direction2",{get:function(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:l.e.Zero()},set:function(t){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"minEmitBox",{get:function(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:l.e.Zero()},set:function(t){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"maxEmitBox",{get:function(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:l.e.Zero()},set:function(t){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isBillboardBased",{get:function(){return this._isBillboardBased},set:function(t){this._isBillboardBased!==t&&(this._isBillboardBased=t,this._reset())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"imageProcessingConfiguration",{get:function(){return this._imageProcessingConfiguration},set:function(t){this._attachImageProcessingConfiguration(t)},enumerable:!1,configurable:!0}),r.prototype._attachImageProcessingConfiguration=function(t){t!==this._imageProcessingConfiguration&&(!t&&this._scene?this._imageProcessingConfiguration=this._scene.imageProcessingConfiguration:this._imageProcessingConfiguration=t)},r.prototype._reset=function(){},r.prototype._removeGradientAndTexture=function(t,e,n){if(!e)return this;for(var i=0,o=0,a=e;o-1))return this._optimizers.push(e),this},t.prototype.unregisterOptimizer=function(e){var n=this._optimizers.indexOf(e);if(n!==-1)return this._optimizers.splice(n,1),this},t.prototype.addOutputNode=function(e){if(e.target===null)throw"This node is not meant to be an output node. You may want to explicitly set its target value.";return e.target&Re.Vertex&&this._addVertexOutputNode(e),e.target&Re.Fragment&&this._addFragmentOutputNode(e),this},t.prototype.removeOutputNode=function(e){return e.target===null||(e.target&Re.Vertex&&this._removeVertexOutputNode(e),e.target&Re.Fragment&&this._removeFragmentOutputNode(e)),this},t.prototype._addVertexOutputNode=function(e){if(this._vertexOutputNodes.indexOf(e)===-1)return e.target=Re.Vertex,this._vertexOutputNodes.push(e),this},t.prototype._removeVertexOutputNode=function(e){var n=this._vertexOutputNodes.indexOf(e);if(n!==-1)return this._vertexOutputNodes.splice(n,1),this},t.prototype._addFragmentOutputNode=function(e){if(this._fragmentOutputNodes.indexOf(e)===-1)return e.target=Re.Fragment,this._fragmentOutputNodes.push(e),this},t.prototype._removeFragmentOutputNode=function(e){var n=this._fragmentOutputNodes.indexOf(e);if(n!==-1)return this._fragmentOutputNodes.splice(n,1),this},t.prototype.needAlphaBlending=function(){return!this.ignoreAlpha&&(this.alpha<1||this._sharedData&&this._sharedData.hints.needAlphaBlending)},t.prototype.needAlphaTesting=function(){return this._sharedData&&this._sharedData.hints.needAlphaTesting},t.prototype._initializeBlock=function(e,n,i){if(e.initialize(n),e.autoConfigure(this),e._preparationId=this._buildId,this.attachedBlocks.indexOf(e)===-1){if(e.isUnique){for(var o=e.getClassName(),a=0,s=this.attachedBlocks;a-1&&this.attachedBlocks.splice(n,1),e.isFinalMerger&&this.removeOutputNode(e)},t.prototype.build=function(e){e===void 0&&(e=!1),this._buildWasSuccessful=!1;var n=this.getScene().getEngine(),i=this._mode===Ln.Particle;if(this._vertexOutputNodes.length===0&&!i)throw"You must define at least one vertexOutputNode";if(this._fragmentOutputNodes.length===0)throw"You must define at least one fragmentOutputNode";this._vertexCompilationState=new dh,this._vertexCompilationState.supportUniformBuffers=n.supportsUniformBuffers,this._vertexCompilationState.target=Re.Vertex,this._fragmentCompilationState=new dh,this._fragmentCompilationState.supportUniformBuffers=n.supportsUniformBuffers,this._fragmentCompilationState.target=Re.Fragment,this._sharedData=new gm,this._vertexCompilationState.sharedData=this._sharedData,this._fragmentCompilationState.sharedData=this._sharedData,this._sharedData.buildId=this._buildId,this._sharedData.emitComments=this._options.emitComments,this._sharedData.verbose=e,this._sharedData.scene=this.getScene(),this._sharedData.allowEmptyVertexProgram=i;for(var o=[],a=[],s=0,d=this._vertexOutputNodes;s0\r -`,e.compilationString+=this._declareOutput(o,e)+" = "+a.associatedVariableName+" * "+i+`;\r -`,e.compilationString+=`#else\r -`,e.compilationString+=this._declareOutput(o,e)+" = "+a.associatedVariableName+`;\r -`,e.compilationString+=`#endif\r -`,this},t}(pt);R.a.RegisteredTypes["BABYLON.BonesBlock"]=mh;var gh=function(r){function t(e){var n=r.call(this,e,Re.Vertex)||this;return n.registerInput("world0",le.Vector4),n.registerInput("world1",le.Vector4),n.registerInput("world2",le.Vector4),n.registerInput("world3",le.Vector4),n.registerInput("world",le.Matrix,!0),n.registerOutput("output",le.Matrix),n.registerOutput("instanceID",le.Float),n}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"InstancesBlock"},Object.defineProperty(t.prototype,"world0",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"world1",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"world2",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"world3",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"world",{get:function(){return this._inputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceID",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),t.prototype.autoConfigure=function(e){if(!this.world0.connectedPoint){var n=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world0"});n||(n=new At("world0")).setAsAttribute("world0"),n.output.connectTo(this.world0)}if(!this.world1.connectedPoint){var i=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world1"});i||(i=new At("world1")).setAsAttribute("world1"),i.output.connectTo(this.world1)}if(!this.world2.connectedPoint){var o=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world2"});o||(o=new At("world2")).setAsAttribute("world2"),o.output.connectTo(this.world2)}if(!this.world3.connectedPoint){var a=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world3"});a||(a=new At("world3")).setAsAttribute("world3"),a.output.connectTo(this.world3)}if(!this.world.connectedPoint){var s=e.getInputBlockByPredicate(function(d){return d.isAttribute&&d.name==="world"});s||(s=new At("world")).setAsSystemValue(bt.World),s.output.connectTo(this.world)}this.world.define="!INSTANCES || THIN_INSTANCES"},t.prototype.prepareDefines=function(e,n,i,o,a){o===void 0&&(o=!1);var s=!1;i.INSTANCES!==o&&(i.setValue("INSTANCES",o),s=!0),a&&i.THIN_INSTANCES!==!!a?.getRenderingMesh().hasThinInstances&&(i.setValue("THIN_INSTANCES",!!a?.getRenderingMesh().hasThinInstances),s=!0),s&&i.markAsUnprocessed()},t.prototype._buildBlock=function(e){r.prototype._buildBlock.call(this,e),e.sharedData.blocksWithDefines.push(this);var n=this._outputs[0],i=this._outputs[1],o=this.world0,a=this.world1,s=this.world2,d=this.world3;return e.compilationString+=`#ifdef INSTANCES\r -`,e.compilationString+=this._declareOutput(n,e)+" = mat4("+o.associatedVariableName+", "+a.associatedVariableName+", "+s.associatedVariableName+", "+d.associatedVariableName+`);\r -`,e.compilationString+=`#ifdef THIN_INSTANCES\r -`,e.compilationString+=n.associatedVariableName+" = "+this.world.associatedVariableName+" * "+n.associatedVariableName+`;\r -`,e.compilationString+=`#endif\r -`,e.compilationString+=this._declareOutput(i,e)+` = float(gl_InstanceID);\r -`,e.compilationString+=`#else\r -`,e.compilationString+=this._declareOutput(n,e)+" = "+this.world.associatedVariableName+`;\r -`,e.compilationString+=this._declareOutput(i,e)+` = 0.0;\r -`,e.compilationString+=`#endif\r -`,this},t}(pt);R.a.RegisteredTypes["BABYLON.InstancesBlock"]=gh;var vh=function(r){function t(e){var n=r.call(this,e,Re.Vertex)||this;return n.registerInput("position",le.Vector3),n.registerInput("normal",le.Vector3),n.registerInput("tangent",le.Vector3),n.registerInput("uv",le.Vector2),n.registerOutput("positionOutput",le.Vector3),n.registerOutput("normalOutput",le.Vector3),n.registerOutput("tangentOutput",le.Vector3),n.registerOutput("uvOutput",le.Vector2),n}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"MorphTargetsBlock"},Object.defineProperty(t.prototype,"position",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normal",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tangent",{get:function(){return this._inputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uv",{get:function(){return this._inputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"positionOutput",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normalOutput",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tangentOutput",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uvOutput",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),t.prototype.initialize=function(e){e._excludeVariableName("morphTargetInfluences")},t.prototype.autoConfigure=function(e){if(!this.position.isConnected){var n=e.getInputBlockByPredicate(function(s){return s.isAttribute&&s.name==="position"});n||(n=new At("position")).setAsAttribute(),n.output.connectTo(this.position)}if(!this.normal.isConnected){var i=e.getInputBlockByPredicate(function(s){return s.isAttribute&&s.name==="normal"});i||(i=new At("normal")).setAsAttribute("normal"),i.output.connectTo(this.normal)}if(!this.tangent.isConnected){var o=e.getInputBlockByPredicate(function(s){return s.isAttribute&&s.name==="tangent"});o||(o=new At("tangent")).setAsAttribute("tangent"),o.output.connectTo(this.tangent)}if(!this.uv.isConnected){var a=e.getInputBlockByPredicate(function(s){return s.isAttribute&&s.name==="uv"});a||(a=new At("uv")).setAsAttribute("uv"),a.output.connectTo(this.uv)}},t.prototype.prepareDefines=function(e,n,i){i._areAttributesDirty&&tt.a.PrepareDefinesForMorphTargets(e,i)},t.prototype.bind=function(e,n,i){i&&i.morphTargetManager&&i.morphTargetManager.numInfluencers>0&&tt.a.BindMorphTargetParameters(i,e)},t.prototype.replaceRepeatableContent=function(e,n,i,o){for(var a=this.position,s=this.normal,d=this.tangent,p=this.uv,y=this.positionOutput,C=this.normalOutput,M=this.tangentOutput,U=this.uvOutput,F=e,z=o.NUM_MORPH_INFLUENCERS,J=i.morphTargetManager,ie=J&&J.supportsNormals&&o.NORMAL,se=J&&J.supportsTangents&&o.TANGENT,ce=J&&J.supportsUVs&&o.UV1,ue="",fe=0;fe0)for(fe=0;fe=0;tt.a.PrepareUniformsAndSamplersForLight(a,e.uniforms,e.samplers,i["PROJECTEDLIGHTTEXTURE"+a],o,s)}},t.prototype.bind=function(e,n,i){if(i){var o=i.getScene();this.light?tt.a.BindLight(this.light,this._lightId,o,e,!0):tt.a.BindLights(o,i,e,!0,n.maxSimultaneousLights)}},t.prototype._injectVertexCode=function(e){var n=this.worldPosition,i="//"+this.name;this.light?(this._lightId=(e.counters.lightCounter!==void 0?e.counters.lightCounter:-1)+1,e.counters.lightCounter=this._lightId,e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",i,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString())):(e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",i,{repeatKey:"maxSimultaneousLights"}),this._lightId=0,e.sharedData.dynamicUniformBlocks.push(this));var o="v_"+n.associatedVariableName;e._emitVaryingFromString(o,"vec4")&&(e.compilationString+=o+" = "+n.associatedVariableName+`;\r -`),this.light?e.compilationString+=e._emitCodeFromInclude("shadowsVertex",i,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()},{search:/worldPos/g,replace:n.associatedVariableName}]}):(e.compilationString+="vec4 worldPos = "+n.associatedVariableName+`;\r -`,this.view.isConnected&&(e.compilationString+="mat4 view = "+this.view.associatedVariableName+`;\r -`),e.compilationString+=e._emitCodeFromInclude("shadowsVertex",i,{repeatKey:"maxSimultaneousLights"}))},t.prototype._buildBlock=function(e){if(r.prototype._buildBlock.call(this,e),e.target===Re.Fragment){e.sharedData.bindableBlocks.push(this),e.sharedData.blocksWithDefines.push(this);var n="//"+this.name,i=this.worldPosition;e._emitFunctionFromInclude("helperFunctions",n),e._emitFunctionFromInclude("lightsFragmentFunctions",n,{replaceStrings:[{search:/vPositionW/g,replace:"v_"+i.associatedVariableName+".xyz"}]}),e._emitFunctionFromInclude("shadowsFragmentFunctions",n,{replaceStrings:[{search:/vPositionW/g,replace:"v_"+i.associatedVariableName+".xyz"}]}),this.light?e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",n,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString()):e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",n,{repeatKey:"maxSimultaneousLights"}),this._lightId===0&&(e._registerTempVariable("viewDirectionW")&&(e.compilationString+="vec3 viewDirectionW = normalize("+this.cameraPosition.associatedVariableName+" - v_"+i.associatedVariableName+`.xyz);\r -`),e.compilationString+=`lightingInfo info;\r -`,e.compilationString+=`float shadow = 1.;\r -`,e.compilationString+="float glossiness = "+(this.glossiness.isConnected?this.glossiness.associatedVariableName:"1.0")+" * "+(this.glossPower.isConnected?this.glossPower.associatedVariableName:"1024.0")+`;\r -`,e.compilationString+=`vec3 diffuseBase = vec3(0., 0., 0.);\r -`,e.compilationString+=`vec3 specularBase = vec3(0., 0., 0.);\r -`,e.compilationString+="vec3 normalW = "+this.worldNormal.associatedVariableName+`.xyz;\r -`),this.light?e.compilationString+=e._emitCodeFromInclude("lightFragment",n,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]}):e.compilationString+=e._emitCodeFromInclude("lightFragment",n,{repeatKey:"maxSimultaneousLights"});var o=this.diffuseOutput,a=this.specularOutput;return e.compilationString+=this._declareOutput(o,e)+" = diffuseBase"+(this.diffuseColor.isConnected?" * "+this.diffuseColor.associatedVariableName:"")+`;\r -`,a.hasEndpoints&&(e.compilationString+=this._declareOutput(a,e)+" = specularBase"+(this.specularColor.isConnected?" * "+this.specularColor.associatedVariableName:"")+`;\r -`),this.shadow.hasEndpoints&&(e.compilationString+=this._declareOutput(this.shadow,e)+` = shadow;\r -`),this}this._injectVertexCode(e)},t.prototype.serialize=function(){var e=r.prototype.serialize.call(this);return this.light&&(e.lightId=this.light.id),e},t.prototype._deserialize=function(e,n,i){r.prototype._deserialize.call(this,e,n,i),e.lightId&&(this.light=n.getLightByID(e.lightId))},t}(pt);R.a.RegisteredTypes["BABYLON.LightBlock"]=Rh;var Oh=function(r){function t(e,n){n===void 0&&(n=!1);var i=r.call(this,e,n?Re.Fragment:Re.VertexAndFragment)||this;return i.convertToGammaSpace=!1,i.convertToLinearSpace=!1,i._fragmentOnly=n,i.registerInput("uv",le.Vector2,!1,Re.VertexAndFragment),i.registerOutput("rgba",le.Color4,Re.Neutral),i.registerOutput("rgb",le.Color3,Re.Neutral),i.registerOutput("r",le.Float,Re.Neutral),i.registerOutput("g",le.Float,Re.Neutral),i.registerOutput("b",le.Float,Re.Neutral),i.registerOutput("a",le.Float,Re.Neutral),i._inputs[0].acceptedConnectionPointTypes.push(le.Vector3),i._inputs[0].acceptedConnectionPointTypes.push(le.Vector4),i._inputs[0]._prioritizeVertex=!n,i}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"TextureBlock"},Object.defineProperty(t.prototype,"uv",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgba",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rgb",{get:function(){return this._outputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"r",{get:function(){return this._outputs[2]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this._outputs[3]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this._outputs[4]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this._outputs[5]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){if(this._fragmentOnly)return Re.Fragment;if(!this.uv.isConnected||this.uv.sourceBlock.isInput)return Re.VertexAndFragment;for(var e=this.uv.connectedPoint;e;){if(e.target===Re.Fragment)return Re.Fragment;if(e.target===Re.Vertex)return Re.VertexAndFragment;if(e.target===Re.Neutral||e.target===Re.VertexAndFragment){var n=e.ownerBlock;e=null;for(var i=0,o=n.inputs;i1?i.setValue("NUM_SAMPLES",this.realTimeFilteringQuality+"u",!0):i.setValue("NUM_SAMPLES",""+this.realTimeFilteringQuality,!0),i.setValue("BRDF_V_HEIGHT_CORRELATED",!0),i.setValue("MS_BRDF_ENERGY_CONSERVATION",this.useEnergyConservation,!0),i.setValue("RADIANCEOCCLUSION",this.useRadianceOcclusion,!0),i.setValue("HORIZONOCCLUSION",this.useHorizonOcclusion,!0),i.setValue("UNLIT",this.unlit,!0),i.setValue("FORCENORMALFORWARD",this.forceNormalForward,!0),this._environmentBRDFTexture&&ht.a.ReflectionTextureEnabled?(i.setValue("ENVIRONMENTBRDF",!0),i.setValue("ENVIRONMENTBRDF_RGBD",this._environmentBRDFTexture.isRGBD,!0)):(i.setValue("ENVIRONMENTBRDF",!1),i.setValue("ENVIRONMENTBRDF_RGBD",!1)),i._areLightsDirty){var a=e.getScene();if(this.light){var s={needNormals:!1,needRebuild:!1,lightmapMode:!1,shadowEnabled:!1,specularEnabled:!1};tt.a.PrepareDefinesForLight(a,e,this.light,this._lightId,i,!0,s),s.needRebuild&&i.rebuild()}else tt.a.PrepareDefinesForLights(a,e,i,!0,n.maxSimultaneousLights),i._needNormals=!0,tt.a.PrepareDefinesForMultiview(a,i)}},t.prototype.updateUniformsAndSamples=function(e,n,i,o){for(var a=0;a=0;tt.a.PrepareUniformsAndSamplersForLight(a,e.uniforms,e.samplers,i["PROJECTEDLIGHTTEXTURE"+a],o,s)}},t.prototype.bind=function(e,n,i){var o,a;if(i){var s=i.getScene();this.light?tt.a.BindLight(this.light,this._lightId,s,e,!0):tt.a.BindLights(s,i,e,!0,n.maxSimultaneousLights),e.setTexture(this._environmentBrdfSamplerName,this._environmentBRDFTexture),e.setFloat2("vDebugMode",this.debugLimit,this.debugFactor);var d=this._scene.ambientColor;d&&e.setColor3("ambientFromScene",d);var p=s.useRightHandedSystem===(s._mirroredCameraPosition!=null);e.setFloat(this._invertNormalName,p?-1:1),e.setFloat4("vLightingIntensity",this.directIntensity,1,this.environmentIntensity*this._scene.environmentIntensity,this.specularIntensity);var y=(a=(o=this.indexOfRefraction.connectInputBlock)===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:1.5,C=Math.pow((y-1)/(y+1),2);this._metallicReflectanceColor.scaleToRef(C*this._metallicF0Factor,O.c.Color3[0]);var M=this._metallicF0Factor;e.setColor4(this._vMetallicReflectanceFactorsName,O.c.Color3[0],M)}},t.prototype._injectVertexCode=function(e){var n,i,o=this.worldPosition,a="//"+this.name;this.light?(this._lightId=(e.counters.lightCounter!==void 0?e.counters.lightCounter:-1)+1,e.counters.lightCounter=this._lightId,e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",a,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString())):(e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",a,{repeatKey:"maxSimultaneousLights"}),this._lightId=0,e.sharedData.dynamicUniformBlocks.push(this));var s="v_"+o.associatedVariableName;e._emitVaryingFromString(s,"vec4")&&(e.compilationString+=s+" = "+o.associatedVariableName+`;\r -`);var d=this.reflection.isConnected?(n=this.reflection.connectedPoint)===null||n===void 0?void 0:n.ownerBlock:null;d&&(d.viewConnectionPoint=this.view),e.compilationString+=(i=d?.handleVertexSide(e))!==null&&i!==void 0?i:"",e._emitUniformFromString("vDebugMode","vec2","defined(IGNORE) || DEBUGMODE > 0"),e._emitUniformFromString("ambientFromScene","vec3"),e._emitVaryingFromString("vClipSpacePosition","vec4","defined(IGNORE) || DEBUGMODE > 0")&&(e._injectAtEnd+=`#if DEBUGMODE > 0\r -`,e._injectAtEnd+=`vClipSpacePosition = gl_Position;\r -`,e._injectAtEnd+=`#endif\r -`),this.light?e.compilationString+=e._emitCodeFromInclude("shadowsVertex",a,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()},{search:/worldPos/g,replace:o.associatedVariableName}]}):(e.compilationString+="vec4 worldPos = "+o.associatedVariableName+`;\r -`,this.view.isConnected&&(e.compilationString+="mat4 view = "+this.view.associatedVariableName+`;\r -`),e.compilationString+=e._emitCodeFromInclude("shadowsVertex",a,{repeatKey:"maxSimultaneousLights"}))},t.prototype._getAlbedoOpacityCode=function(){var e=`albedoOpacityOutParams albedoOpacityOut;\r -`;return e+=`albedoOpacityBlock( - vec4(`+(this.baseColor.isConnected?this.baseColor.associatedVariableName:"vec3(1.)")+`, 1.), - #ifdef ALBEDO - vec4(1.), - vec2(1., 1.), - #endif - #ifdef OPACITY - vec4(`+(this.opacity.isConnected?this.opacity.associatedVariableName:"1.")+`), - vec2(1., 1.), - #endif - albedoOpacityOut - ); - - vec3 surfaceAlbedo = albedoOpacityOut.surfaceAlbedo; - float alpha = albedoOpacityOut.alpha;\r -`},t.prototype._getAmbientOcclusionCode=function(){var e=`ambientOcclusionOutParams aoOut;\r -`;return e+=`ambientOcclusionBlock( - #ifdef AMBIENT - vec3(`+(this.ambientOcc.isConnected?this.ambientOcc.associatedVariableName:"1.")+`), - vec4(0., 1.0, 1.0, 0.), - #endif - aoOut - );\r -`},t.prototype._getReflectivityCode=function(e){var n=`reflectivityOutParams reflectivityOut;\r -`;return this._vMetallicReflectanceFactorsName=e._getFreeVariableName("vMetallicReflectanceFactors"),e._emitUniformFromString(this._vMetallicReflectanceFactorsName,"vec4"),n+=`vec3 baseColor = surfaceAlbedo; - - reflectivityBlock( - vec4(`+this.metallic.associatedVariableName+", "+this.roughness.associatedVariableName+`, 0., 0.), - #ifdef METALLICWORKFLOW - surfaceAlbedo, - `+this._vMetallicReflectanceFactorsName+`, - #endif - #ifdef REFLECTIVITY - vec3(0., 0., 1.), - vec4(1.), - #endif - #if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) - aoOut.ambientOcclusionColor, - #endif - #ifdef MICROSURFACEMAP - microSurfaceTexel, <== not handled! - #endif - reflectivityOut - ); - - float microSurface = reflectivityOut.microSurface; - float roughness = reflectivityOut.roughness; - - #ifdef METALLICWORKFLOW - surfaceAlbedo = reflectivityOut.surfaceAlbedo; - #endif - #if defined(METALLICWORKFLOW) && defined(REFLECTIVITY) && defined(AOSTOREINMETALMAPRED) - aoOut.ambientOcclusionColor = reflectivityOut.ambientOcclusionColor; - #endif\r -`},t.prototype._buildBlock=function(e){var n,i,o,a,s,d,p,y,C,M,U,F,z,J,ie,se,ce,ue,fe,ve,Te,Oe,Pe,Ee,Se,Le,xe,Ne,Ie,Fe,Ke,nt,rt,ut,qe,at,ot,Je,dt;r.prototype._buildBlock.call(this,e),this._scene=e.sharedData.scene,this._environmentBRDFTexture||(this._environmentBRDFTexture=oa.GetEnvironmentBRDFTexture(this._scene));var ke=this.reflection.isConnected?(n=this.reflection.connectedPoint)===null||n===void 0?void 0:n.ownerBlock:null;if(ke&&(ke.worldPositionConnectionPoint=this.worldPosition,ke.cameraPositionConnectionPoint=this.cameraPosition,ke.worldNormalConnectionPoint=this.worldNormal),e.target!==Re.Fragment)return this._injectVertexCode(e),this;e.sharedData.bindableBlocks.push(this),e.sharedData.blocksWithDefines.push(this);var $e="//"+this.name,yt="v_"+this.worldPosition.associatedVariableName,Wt=this.perturbedNormal;this._environmentBrdfSamplerName=e._getFreeVariableName("environmentBrdfSampler"),e._emit2DSampler(this._environmentBrdfSamplerName),e.sharedData.hints.needAlphaBlending=e.sharedData.hints.needAlphaBlending||this.useAlphaBlending,e.sharedData.hints.needAlphaTesting=e.sharedData.hints.needAlphaTesting||this.useAlphaTest,e._emitExtension("lod","#extension GL_EXT_shader_texture_lod : enable","defined(LODBASEDMICROSFURACE)"),e._emitExtension("derivatives","#extension GL_OES_standard_derivatives : enable"),this.light?e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",$e,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]},this._lightId.toString()):e._emitFunctionFromInclude(e.supportUniformBuffers?"lightUboDeclaration":"lightFragmentDeclaration",$e,{repeatKey:"maxSimultaneousLights"}),e._emitFunctionFromInclude("helperFunctions",$e),e._emitFunctionFromInclude("importanceSampling",$e),e._emitFunctionFromInclude("pbrHelperFunctions",$e),e._emitFunctionFromInclude("imageProcessingFunctions",$e),e._emitFunctionFromInclude("shadowsFragmentFunctions",$e,{replaceStrings:[{search:/vPositionW/g,replace:yt+".xyz"}]}),e._emitFunctionFromInclude("pbrDirectLightingSetupFunctions",$e,{replaceStrings:[{search:/vPositionW/g,replace:yt+".xyz"}]}),e._emitFunctionFromInclude("pbrDirectLightingFalloffFunctions",$e),e._emitFunctionFromInclude("pbrBRDFFunctions",$e,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:(i=ke?._defineSkyboxName)!==null&&i!==void 0?i:"REFLECTIONMAP_SKYBOX"}]}),e._emitFunctionFromInclude("hdrFilteringFunctions",$e),e._emitFunctionFromInclude("pbrDirectLightingFunctions",$e,{replaceStrings:[{search:/vPositionW/g,replace:yt+".xyz"}]}),e._emitFunctionFromInclude("pbrIBLFunctions",$e),e._emitFunctionFromInclude("pbrBlockAlbedoOpacity",$e),e._emitFunctionFromInclude("pbrBlockReflectivity",$e),e._emitFunctionFromInclude("pbrBlockAmbientOcclusion",$e),e._emitFunctionFromInclude("pbrBlockAlphaFresnel",$e),e._emitFunctionFromInclude("pbrBlockAnisotropic",$e),e._emitUniformFromString("vLightingIntensity","vec4"),this._vNormalWName=e._getFreeVariableName("vNormalW"),e.compilationString+="vec4 "+this._vNormalWName+" = normalize("+this.worldNormal.associatedVariableName+`);\r -`,e._registerTempVariable("viewDirectionW")&&(e.compilationString+="vec3 viewDirectionW = normalize("+this.cameraPosition.associatedVariableName+" - "+yt+`.xyz);\r -`),e.compilationString+="vec3 geometricNormalW = "+this._vNormalWName+`.xyz;\r -`,e.compilationString+="vec3 normalW = "+(Wt.isConnected?"normalize("+Wt.associatedVariableName+".xyz)":"geometricNormalW")+`;\r -`,this._invertNormalName=e._getFreeVariableName("invertNormal"),e._emitUniformFromString(this._invertNormalName,"float"),e.compilationString+=e._emitCodeFromInclude("pbrBlockNormalFinal",$e,{replaceStrings:[{search:/vPositionW/g,replace:yt+".xyz"},{search:/vEyePosition.w/g,replace:this._invertNormalName}]}),e.compilationString+=this._getAlbedoOpacityCode(),e.compilationString+=e._emitCodeFromInclude("depthPrePass",$e),e.compilationString+=this._getAmbientOcclusionCode(),e.compilationString+=e._emitCodeFromInclude("pbrBlockLightmapInit",$e),e.compilationString+=`#ifdef UNLIT - vec3 diffuseBase = vec3(1., 1., 1.); - #else\r -`,e.compilationString+=this._getReflectivityCode(e),e.compilationString+=e._emitCodeFromInclude("pbrBlockGeometryInfo",$e,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:(o=ke?._defineSkyboxName)!==null&&o!==void 0?o:"REFLECTIONMAP_SKYBOX"},{search:/REFLECTIONMAP_3D/g,replace:(a=ke?._define3DName)!==null&&a!==void 0?a:"REFLECTIONMAP_3D"}]});var Nt=this.anisotropy.isConnected?(s=this.anisotropy.connectedPoint)===null||s===void 0?void 0:s.ownerBlock:null;Nt&&(Nt.worldPositionConnectionPoint=this.worldPosition,Nt.worldNormalConnectionPoint=this.worldNormal,e.compilationString+=Nt.getCode(e,!this.perturbedNormal.isConnected)),ke&&ke.hasTexture&&(e.compilationString+=ke.getCode(e,Nt?"anisotropicOut.anisotropicNormal":"normalW")),e._emitFunctionFromInclude("pbrBlockReflection",$e,{replaceStrings:[{search:/computeReflectionCoords/g,replace:"computeReflectionCoordsPBR"},{search:/REFLECTIONMAP_3D/g,replace:(d=ke?._define3DName)!==null&&d!==void 0?d:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:(p=ke?._defineOppositeZ)!==null&&p!==void 0?p:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:(y=ke?._defineProjectionName)!==null&&y!==void 0?y:"REFLECTIONMAP_PROJECTION"},{search:/REFLECTIONMAP_SKYBOX/g,replace:(C=ke?._defineSkyboxName)!==null&&C!==void 0?C:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:(M=ke?._defineLODReflectionAlpha)!==null&&M!==void 0?M:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:(U=ke?._defineLinearSpecularReflection)!==null&&U!==void 0?U:"LINEARSPECULARREFLECTION"},{search:/vReflectionFilteringInfo/g,replace:(F=ke?._vReflectionFilteringInfoName)!==null&&F!==void 0?F:"vReflectionFilteringInfo"}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockReflectance0",$e,{replaceStrings:[{search:/metallicReflectanceFactors/g,replace:this._vMetallicReflectanceFactorsName}]});var Qt=this.sheen.isConnected?(z=this.sheen.connectedPoint)===null||z===void 0?void 0:z.ownerBlock:null;Qt&&(e.compilationString+=Qt.getCode(ke)),e._emitFunctionFromInclude("pbrBlockSheen",$e,{replaceStrings:[{search:/REFLECTIONMAP_3D/g,replace:(J=ke?._define3DName)!==null&&J!==void 0?J:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_SKYBOX/g,replace:(ie=ke?._defineSkyboxName)!==null&&ie!==void 0?ie:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:(se=ke?._defineLODReflectionAlpha)!==null&&se!==void 0?se:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:(ce=ke?._defineLinearSpecularReflection)!==null&&ce!==void 0?ce:"LINEARSPECULARREFLECTION"}]});var vt=this.clearcoat.isConnected?(ue=this.clearcoat.connectedPoint)===null||ue===void 0?void 0:ue.ownerBlock:null,Jt=!this.perturbedNormal.isConnected&&!this.anisotropy.isConnected,Xt=this.perturbedNormal.isConnected&&((fe=this.perturbedNormal.connectedPoint)===null||fe===void 0?void 0:fe.ownerBlock).worldTangent.isConnected,zt=this.anisotropy.isConnected&&((ve=this.anisotropy.connectedPoint)===null||ve===void 0?void 0:ve.ownerBlock).worldTangent.isConnected,Yt=Xt||!this.perturbedNormal.isConnected&&zt;e.compilationString+=Aa.GetCode(e,vt,ke,yt,Jt,Yt,this.worldNormal.associatedVariableName),Jt&&(Yt=(Te=vt?.worldTangent.isConnected)!==null&&Te!==void 0&&Te),e._emitFunctionFromInclude("pbrBlockClearcoat",$e,{replaceStrings:[{search:/computeReflectionCoords/g,replace:"computeReflectionCoordsPBR"},{search:/REFLECTIONMAP_3D/g,replace:(Oe=ke?._define3DName)!==null&&Oe!==void 0?Oe:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:(Pe=ke?._defineOppositeZ)!==null&&Pe!==void 0?Pe:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:(Ee=ke?._defineProjectionName)!==null&&Ee!==void 0?Ee:"REFLECTIONMAP_PROJECTION"},{search:/REFLECTIONMAP_SKYBOX/g,replace:(Se=ke?._defineSkyboxName)!==null&&Se!==void 0?Se:"REFLECTIONMAP_SKYBOX"},{search:/LODINREFLECTIONALPHA/g,replace:(Le=ke?._defineLODReflectionAlpha)!==null&&Le!==void 0?Le:"LODINREFLECTIONALPHA"},{search:/LINEARSPECULARREFLECTION/g,replace:(xe=ke?._defineLinearSpecularReflection)!==null&&xe!==void 0?xe:"LINEARSPECULARREFLECTION"},{search:/defined\(TANGENT\)/g,replace:Yt?"defined(TANGENT)":"defined(IGNORE)"}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockReflectance",$e,{replaceStrings:[{search:/REFLECTIONMAP_SKYBOX/g,replace:(Ne=ke?._defineSkyboxName)!==null&&Ne!==void 0?Ne:"REFLECTIONMAP_SKYBOX"},{search:/REFLECTIONMAP_3D/g,replace:(Ie=ke?._define3DName)!==null&&Ie!==void 0?Ie:"REFLECTIONMAP_3D"}]});var Et=this.subsurface.isConnected?(Fe=this.subsurface.connectedPoint)===null||Fe===void 0?void 0:Fe.ownerBlock:null,Mt=this.subsurface.isConnected?(nt=((Ke=this.subsurface.connectedPoint)===null||Ke===void 0?void 0:Ke.ownerBlock).refraction.connectedPoint)===null||nt===void 0?void 0:nt.ownerBlock:null;Mt&&(Mt.viewConnectionPoint=this.view,Mt.indexOfRefractionConnectionPoint=this.indexOfRefraction),e.compilationString+=Pa.GetCode(e,Et,ke,yt),e._emitFunctionFromInclude("pbrBlockSubSurface",$e,{replaceStrings:[{search:/REFLECTIONMAP_3D/g,replace:(rt=ke?._define3DName)!==null&&rt!==void 0?rt:"REFLECTIONMAP_3D"},{search:/REFLECTIONMAP_OPPOSITEZ/g,replace:(ut=ke?._defineOppositeZ)!==null&&ut!==void 0?ut:"REFLECTIONMAP_OPPOSITEZ"},{search:/REFLECTIONMAP_PROJECTION/g,replace:(qe=ke?._defineProjectionName)!==null&&qe!==void 0?qe:"REFLECTIONMAP_PROJECTION"},{search:/SS_REFRACTIONMAP_3D/g,replace:(at=Mt?._define3DName)!==null&&at!==void 0?at:"SS_REFRACTIONMAP_3D"},{search:/SS_LODINREFRACTIONALPHA/g,replace:(ot=Mt?._defineLODRefractionAlpha)!==null&&ot!==void 0?ot:"SS_LODINREFRACTIONALPHA"},{search:/SS_LINEARSPECULARREFRACTION/g,replace:(Je=Mt?._defineLinearSpecularRefraction)!==null&&Je!==void 0?Je:"SS_LINEARSPECULARREFRACTION"},{search:/SS_REFRACTIONMAP_OPPOSITEZ/g,replace:(dt=Mt?._defineOppositeZ)!==null&&dt!==void 0?dt:"SS_REFRACTIONMAP_OPPOSITEZ"}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockDirectLighting",$e),this.light?e.compilationString+=e._emitCodeFromInclude("lightFragment",$e,{replaceStrings:[{search:/{X}/g,replace:this._lightId.toString()}]}):e.compilationString+=e._emitCodeFromInclude("lightFragment",$e,{repeatKey:"maxSimultaneousLights"}),e.compilationString+=e._emitCodeFromInclude("pbrBlockFinalLitComponents",$e),e.compilationString+=`#endif\r -`;var $t=this.ambientColor.isConnected?this.ambientColor.associatedVariableName:"vec3(0., 0., 0.)",wn=mn.DEFAULT_AO_ON_ANALYTICAL_LIGHTS.toString();wn.indexOf(".")===-1&&(wn+="."),e.compilationString+=e._emitCodeFromInclude("pbrBlockFinalUnlitComponents",$e,{replaceStrings:[{search:/vec3 finalEmissive[\s\S]*?finalEmissive\*=vLightingIntensity\.y;/g,replace:""},{search:/vAmbientColor/g,replace:$t+" * ambientFromScene"},{search:/vAmbientInfos\.w/g,replace:wn}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockFinalColorComposition",$e,{replaceStrings:[{search:/finalEmissive/g,replace:"vec3(0.)"}]}),e.compilationString+=e._emitCodeFromInclude("pbrBlockImageProcessing",$e,{replaceStrings:[{search:/visibility/g,replace:"1."}]}),e.compilationString+=e._emitCodeFromInclude("pbrDebug",$e,{replaceStrings:[{search:/vNormalW/g,replace:this._vNormalWName},{search:/vPositionW/g,replace:yt},{search:/albedoTexture\.rgb;/g,replace:`vec3(1.);\r -gl_FragColor.rgb = toGammaSpace(gl_FragColor.rgb);\r -`}]});for(var zn=0,$n=this._outputs;zn<$n.length;zn++){var Fn=$n[zn];if(Fn.hasEndpoints){var qt=bm[Fn.name];if(qt){var hi=qt[0],Mi=qt[1];Mi&&(e.compilationString+="#if "+Mi+`\r -`),e.compilationString+=this._declareOutput(Fn,e)+" = "+hi+`;\r -`,Mi&&(e.compilationString+=`#else\r -`,e.compilationString+=this._declareOutput(Fn,e)+` = vec3(0.);\r -`,e.compilationString+=`#endif\r -`)}else console.error("There's no remapping for the "+Fn.name+" end point! No code generated")}}return this},t.prototype._dumpPropertiesCode=function(){var e="";return e+=this._codeVariableName+".lightFalloff = "+this.lightFalloff+`;\r -`,e+=this._codeVariableName+".useAlphaTest = "+this.useAlphaTest+`;\r -`,e+=this._codeVariableName+".alphaTestCutoff = "+this.alphaTestCutoff+`;\r -`,e+=this._codeVariableName+".useAlphaBlending = "+this.useAlphaBlending+`;\r -`,e+=this._codeVariableName+".useRadianceOverAlpha = "+this.useRadianceOverAlpha+`;\r -`,e+=this._codeVariableName+".useSpecularOverAlpha = "+this.useSpecularOverAlpha+`;\r -`,e+=this._codeVariableName+".enableSpecularAntiAliasing = "+this.enableSpecularAntiAliasing+`;\r -`,e+=this._codeVariableName+".realTimeFiltering = "+this.realTimeFiltering+`;\r -`,e+=this._codeVariableName+".realTimeFilteringQuality = "+this.realTimeFilteringQuality+`;\r -`,e+=this._codeVariableName+".useEnergyConservation = "+this.useEnergyConservation+`;\r -`,e+=this._codeVariableName+".useRadianceOcclusion = "+this.useRadianceOcclusion+`;\r -`,e+=this._codeVariableName+".useHorizonOcclusion = "+this.useHorizonOcclusion+`;\r -`,e+=this._codeVariableName+".unlit = "+this.unlit+`;\r -`,e+=this._codeVariableName+".forceNormalForward = "+this.forceNormalForward+`;\r -`,e+=this._codeVariableName+".debugMode = "+this.debugMode+`;\r -`,e+=this._codeVariableName+".debugLimit = "+this.debugLimit+`;\r -`,e+=this._codeVariableName+".debugFactor = "+this.debugFactor+`;\r -`},t.prototype.serialize=function(){var e=r.prototype.serialize.call(this);return this.light&&(e.lightId=this.light.id),e.lightFalloff=this.lightFalloff,e.useAlphaTest=this.useAlphaTest,e.alphaTestCutoff=this.alphaTestCutoff,e.useAlphaBlending=this.useAlphaBlending,e.useRadianceOverAlpha=this.useRadianceOverAlpha,e.useSpecularOverAlpha=this.useSpecularOverAlpha,e.enableSpecularAntiAliasing=this.enableSpecularAntiAliasing,e.realTimeFiltering=this.realTimeFiltering,e.realTimeFilteringQuality=this.realTimeFilteringQuality,e.useEnergyConservation=this.useEnergyConservation,e.useRadianceOcclusion=this.useRadianceOcclusion,e.useHorizonOcclusion=this.useHorizonOcclusion,e.unlit=this.unlit,e.forceNormalForward=this.forceNormalForward,e.debugMode=this.debugMode,e.debugLimit=this.debugLimit,e.debugFactor=this.debugFactor,e},t.prototype._deserialize=function(e,n,i){var o,a;r.prototype._deserialize.call(this,e,n,i),e.lightId&&(this.light=n.getLightByID(e.lightId)),this.lightFalloff=(o=e.lightFalloff)!==null&&o!==void 0?o:0,this.useAlphaTest=e.useAlphaTest,this.alphaTestCutoff=e.alphaTestCutoff,this.useAlphaBlending=e.useAlphaBlending,this.useRadianceOverAlpha=e.useRadianceOverAlpha,this.useSpecularOverAlpha=e.useSpecularOverAlpha,this.enableSpecularAntiAliasing=e.enableSpecularAntiAliasing,this.realTimeFiltering=!!e.realTimeFiltering,this.realTimeFilteringQuality=(a=e.realTimeFilteringQuality)!==null&&a!==void 0?a:h.a.TEXTURE_FILTERING_QUALITY_LOW,this.useEnergyConservation=e.useEnergyConservation,this.useRadianceOcclusion=e.useRadianceOcclusion,this.useHorizonOcclusion=e.useHorizonOcclusion,this.unlit=e.unlit,this.forceNormalForward=!!e.forceNormalForward,this.debugMode=e.debugMode,this.debugLimit=e.debugLimit,this.debugFactor=e.debugFactor},Object(c.c)([Vt("Direct lights",Lt.Float,"INTENSITY",{min:0,max:1,notifiers:{update:!0}})],t.prototype,"directIntensity",void 0),Object(c.c)([Vt("Environment lights",Lt.Float,"INTENSITY",{min:0,max:1,notifiers:{update:!0}})],t.prototype,"environmentIntensity",void 0),Object(c.c)([Vt("Specular highlights",Lt.Float,"INTENSITY",{min:0,max:1,notifiers:{update:!0}})],t.prototype,"specularIntensity",void 0),Object(c.c)([Vt("Light falloff",Lt.List,"LIGHTING & COLORS",{notifiers:{update:!0},options:[{label:"Physical",value:mn.LIGHTFALLOFF_PHYSICAL},{label:"GLTF",value:mn.LIGHTFALLOFF_GLTF},{label:"Standard",value:mn.LIGHTFALLOFF_STANDARD}]})],t.prototype,"lightFalloff",void 0),Object(c.c)([Vt("Alpha Testing",Lt.Boolean,"OPACITY")],t.prototype,"useAlphaTest",void 0),Object(c.c)([Vt("Alpha CutOff",Lt.Float,"OPACITY",{min:0,max:1,notifiers:{update:!0}})],t.prototype,"alphaTestCutoff",void 0),Object(c.c)([Vt("Alpha blending",Lt.Boolean,"OPACITY")],t.prototype,"useAlphaBlending",void 0),Object(c.c)([Vt("Radiance over alpha",Lt.Boolean,"RENDERING",{notifiers:{update:!0}})],t.prototype,"useRadianceOverAlpha",void 0),Object(c.c)([Vt("Specular over alpha",Lt.Boolean,"RENDERING",{notifiers:{update:!0}})],t.prototype,"useSpecularOverAlpha",void 0),Object(c.c)([Vt("Specular anti-aliasing",Lt.Boolean,"RENDERING",{notifiers:{update:!0}})],t.prototype,"enableSpecularAntiAliasing",void 0),Object(c.c)([Vt("Realtime filtering",Lt.Boolean,"RENDERING",{notifiers:{update:!0}})],t.prototype,"realTimeFiltering",void 0),Object(c.c)([Vt("Realtime filtering quality",Lt.List,"RENDERING",{notifiers:{update:!0},options:[{label:"Low",value:h.a.TEXTURE_FILTERING_QUALITY_LOW},{label:"Medium",value:h.a.TEXTURE_FILTERING_QUALITY_MEDIUM},{label:"High",value:h.a.TEXTURE_FILTERING_QUALITY_HIGH}]})],t.prototype,"realTimeFilteringQuality",void 0),Object(c.c)([Vt("Energy Conservation",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"useEnergyConservation",void 0),Object(c.c)([Vt("Radiance occlusion",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"useRadianceOcclusion",void 0),Object(c.c)([Vt("Horizon occlusion",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"useHorizonOcclusion",void 0),Object(c.c)([Vt("Unlit",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"unlit",void 0),Object(c.c)([Vt("Force normal forward",Lt.Boolean,"ADVANCED",{notifiers:{update:!0}})],t.prototype,"forceNormalForward",void 0),Object(c.c)([Vt("Debug mode",Lt.List,"DEBUG",{notifiers:{update:!0},options:[{label:"None",value:0},{label:"Normalized position",value:1},{label:"Normals",value:2},{label:"Tangents",value:3},{label:"Bitangents",value:4},{label:"Bump Normals",value:5},{label:"ClearCoat Normals",value:8},{label:"ClearCoat Tangents",value:9},{label:"ClearCoat Bitangents",value:10},{label:"Anisotropic Normals",value:11},{label:"Anisotropic Tangents",value:12},{label:"Anisotropic Bitangents",value:13},{label:"Env Refraction",value:40},{label:"Env Reflection",value:41},{label:"Env Clear Coat",value:42},{label:"Direct Diffuse",value:50},{label:"Direct Specular",value:51},{label:"Direct Clear Coat",value:52},{label:"Direct Sheen",value:53},{label:"Env Irradiance",value:54},{label:"Surface Albedo",value:60},{label:"Reflectance 0",value:61},{label:"Metallic",value:62},{label:"Metallic F0",value:71},{label:"Roughness",value:63},{label:"AlphaG",value:64},{label:"NdotV",value:65},{label:"ClearCoat Color",value:66},{label:"ClearCoat Roughness",value:67},{label:"ClearCoat NdotV",value:68},{label:"Transmittance",value:69},{label:"Refraction Transmittance",value:70},{label:"SEO",value:80},{label:"EHO",value:81},{label:"Energy Factor",value:82},{label:"Specular Reflectance",value:83},{label:"Clear Coat Reflectance",value:84},{label:"Sheen Reflectance",value:85},{label:"Luminance Over Alpha",value:86},{label:"Alpha",value:87}]})],t.prototype,"debugMode",void 0),Object(c.c)([Vt("Split position",Lt.Float,"DEBUG",{min:-1,max:1,notifiers:{update:!0}})],t.prototype,"debugLimit",void 0),Object(c.c)([Vt("Output factor",Lt.Float,"DEBUG",{min:0,max:5,notifiers:{update:!0}})],t.prototype,"debugFactor",void 0),t}(pt);R.a.RegisteredTypes["BABYLON.PBRMetallicRoughnessBlock"]=dd;var fd=function(r){function t(e){var n=r.call(this,e,Re.Neutral)||this;return n.registerInput("left",le.AutoDetect),n.registerInput("right",le.AutoDetect),n.registerOutput("output",le.BasedOnInput),n._outputs[0]._typeConnectionSource=n._inputs[0],n._linkConnectionTypes(0,1),n}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"ModBlock"},Object.defineProperty(t.prototype,"left",{get:function(){return this._inputs[0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this._inputs[1]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"output",{get:function(){return this._outputs[0]},enumerable:!1,configurable:!0}),t.prototype._buildBlock=function(e){r.prototype._buildBlock.call(this,e);var n=this._outputs[0];return e.compilationString+=this._declareOutput(n,e)+" = mod("+this.left.associatedVariableName+", "+this.right.associatedVariableName+`);\r -`,this},t}(pt);R.a.RegisteredTypes["BABYLON.ModBlock"]=fd;var ym=function(){function r(){}return r.prototype.optimize=function(t,e){},r}(),Tm=f(120),Em=function(){function r(){this.mm=new Map}return r.prototype.get=function(t,e){var n=this.mm.get(t);if(n!==void 0)return n.get(e)},r.prototype.set=function(t,e,n){var i=this.mm.get(t);i===void 0&&this.mm.set(t,i=new Map),i.set(e,n)},r}(),Sm=function(){function r(t,e,n){var i=this;this._baseMaterial=t,this._scene=e,this._options=n,this._subMeshToEffect=new Map,this._subMeshToDepthEffect=new Em,this._meshes=new Map;var o=t.getClassName()==="NodeMaterial"?"u_":"";if(o){this._matriceNames={world:o+"World",view:o+"View",projection:o+"Projection",viewProjection:o+"ViewProjection",worldView:o+"WorldxView",worldViewProjection:o+"WorldxViewxProjection"};for(var a=t.getInputBlocks(),s=0;s("+this._options.remappedVariables.join(",")+")":je.a.IncludesShadersStore.shadowMapVertexNormalBias,C=this._options&&this._options.remappedVariables?"#include("+this._options.remappedVariables.join(",")+")":je.a.IncludesShadersStore.shadowMapVertexMetric,M=this._options&&this._options.remappedVariables?"#include("+this._options.remappedVariables.join(",")+")":je.a.IncludesShadersStore.shadowMapFragmentSoftTransparentShadow,U=je.a.IncludesShadersStore.shadowMapFragment;d=(d=(d=(d=d.replace(/void\s+?main/g,je.a.IncludesShadersStore.shadowMapVertexDeclaration+`\r -void main`)).replace(/#define SHADOWDEPTH_NORMALBIAS|#define CUSTOM_VERTEX_UPDATE_WORLDPOS/g,y)).indexOf("#define SHADOWDEPTH_METRIC")!==-1?d.replace(/#define SHADOWDEPTH_METRIC/g,C):d.replace(/}\s*$/g,C+`\r -}`)).replace(/#define SHADER_NAME.*?\n|out vec4 glFragColor;\n/g,"");var F=p.indexOf("#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW")>=0||p.indexOf("#define CUSTOM_FRAGMENT_BEFORE_FOG")>=0,z=p.indexOf("#define SHADOWDEPTH_FRAGMENT")!==-1,J="";F?p=p.replace(/#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW|#define CUSTOM_FRAGMENT_BEFORE_FOG/g,M):J=M+`\r -`,p=p.replace(/void\s+?main/g,je.a.IncludesShadersStore.shadowMapFragmentDeclaration+`\r -void main`),z?p=p.replace(/#define SHADOWDEPTH_FRAGMENT/g,U):J+=U+`\r -`,J&&(p=p.replace(/}\s*$/g,J+"}")),p=p.replace(/#define SHADER_NAME.*?\n|out vec4 glFragColor;\n/g,"");var ie=o.getUniformNames().slice();return ie.push("biasAndScaleSM","depthValuesSM","lightDataSM","softTransparentShadowSM"),a.depthEffect=this._scene.getEngine().createEffect({vertexSource:d,fragmentSource:p,vertexToken:a.token,fragmentToken:a.token},{attributes:o.getAttributesNames(),uniformsNames:ie,uniformBuffersNames:o.getUniformBuffersNames(),samplers:o.getSamplers(),defines:s+` -`+o.defines.replace("#define SHADOWS","").replace(/#define SHADOW\d/g,""),indexParameters:o.getIndexParameters()},this._scene.getEngine()),a.depthEffect},r}(),pd=f(101);function xc(r,t,e,n,i){var o=new r.DecoderBuffer;o.Init(t,t.byteLength);var a,s,d=new r.Decoder;try{var p=d.GetEncodedGeometryType(o);switch(p){case r.TRIANGULAR_MESH:a=new r.Mesh,s=d.DecodeBufferToMesh(o,a);break;case r.POINT_CLOUD:a=new r.PointCloud,s=d.DecodeBufferToPointCloud(o,a);break;default:throw new Error("Invalid geometry type "+p)}if(!s.ok()||!a.ptr)throw new Error(s.error_msg());if(p===r.TRIANGULAR_MESH){var y=3*a.num_faces(),C=4*y,M=r._malloc(C);try{d.GetTrianglesUInt32Array(a,C,M);var U=new Uint32Array(y);U.set(new Uint32Array(r.HEAPF32.buffer,M,y)),n(U)}finally{r._free(M)}}var F=function(se,ce){var ue=ce.num_components(),fe=a.num_points(),ve=fe*ue,Te=ve*Float32Array.BYTES_PER_ELEMENT,Oe=r._malloc(Te);try{d.GetAttributeDataArrayForAllPoints(a,ce,r.DT_FLOAT32,Te,Oe);var Pe=new Float32Array(r.HEAPF32.buffer,Oe,ve);if(se==="color"&&ue===3){for(var Ee=new Float32Array(4*fe),Se=0,Le=0;Ser.EPSILON?1:0;d|=y,p.push(y)}switch(d){case 0:(l.e.Dot(this.normal,t.plane.normal)>0?e:n).push(t);break;case 1:i.push(t);break;case 2:o.push(t);break;case 3:var C,M=[],U=[];for(a=0;a=3&&(C=new Rc(M,t.shared)).plane&&i.push(C),U.length>=3&&(C=new Rc(U,t.shared)).plane&&o.push(C)}},r.EPSILON=1e-5,r}(),Rc=function(){function r(t,e){this.vertices=t,this.shared=e,this.plane=xm.FromPoints(t[0].pos,t[1].pos,t[2].pos)}return r.prototype.clone=function(){return new r(this.vertices.map(function(t){return t.clone()}),this.shared)},r.prototype.flip=function(){this.vertices.reverse().map(function(t){t.flip()}),this.plane.flip()},r}(),Jn=function(){function r(t){this.plane=null,this.front=null,this.back=null,this.polygons=new Array,t&&this.build(t)}return r.prototype.clone=function(){var t=new r;return t.plane=this.plane&&this.plane.clone(),t.front=this.front&&this.front.clone(),t.back=this.back&&this.back.clone(),t.polygons=this.polygons.map(function(e){return e.clone()}),t},r.prototype.invert=function(){for(var t=0;t1)?1:r.arc||1,d=r.sideOrientation===0?0:r.sideOrientation||ft.a.DEFAULTSIDE;t.push(0,0,0),i.push(.5,.5);for(var p=2*Math.PI*s,y=s===1?p/a:p/(a-1),C=0,M=0;Me.x&&(e.x=n.x),n.ye.y&&(e.y=n.y)}),{min:t,max:e,width:e.x-t.x,height:e.y-t.y}},r}(),Dm=function(){function r(){}return r.Rectangle=function(t,e,n,i){return[new l.d(t,e),new l.d(n,e),new l.d(n,i),new l.d(t,i)]},r.Circle=function(t,e,n,i){e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=32);for(var o=new Array,a=0,s=2*Math.PI/i,d=0;d0){var C=o.length/3;this._points.elements.forEach(function(J){i.push(0,-1,0),o.push(J.x,-t,J.y),a.push(1-(J.x-s.min.x)/s.width,1-(J.y-s.min.y)/s.height)});var M=d.length;for(y=0;ya.elements.length-1?a.elements[0]:a.elements[C+1],t.push(U.x,0,U.y),t.push(U.x,-s,U.y),t.push(M.x,0,M.y),t.push(M.x,-s,M.y);var F=new l.e(U.x,0,U.y),z=new l.e(M.x,0,M.y).subtract(F),J=new l.e(0,1,0),ie=l.e.Cross(z,J);ie=ie.normalize(),n.push(y/o.width,0),n.push(y/o.width,1),y+=z.length(),n.push(y/o.width,0),n.push(y/o.width,1),d?(e.push(ie.x,ie.y,ie.z),e.push(ie.x,ie.y,ie.z),e.push(ie.x,ie.y,ie.z),e.push(ie.x,ie.y,ie.z),i.push(p),i.push(p+2),i.push(p+1),i.push(p+1),i.push(p+2),i.push(p+3)):(e.push(-ie.x,-ie.y,-ie.z),e.push(-ie.x,-ie.y,-ie.z),e.push(-ie.x,-ie.y,-ie.z),e.push(-ie.x,-ie.y,-ie.z),i.push(p),i.push(p+1),i.push(p+2),i.push(p+1),i.push(p+3),i.push(p+2)),p+=4}},r}();ft.a.CreatePolygon=function(r,t,e,n,i,o,a){for(var s=e||new Array(3),d=n,p=[],y=a||!1,C=0;C<3;C++)s[C]===void 0&&(s[C]=new l.f(0,0,1,1)),d&&d[C]===void 0&&(d[C]=new O.b(1,1,1,1));var M=r.getVerticesData(Me.b.PositionKind),U=r.getVerticesData(Me.b.NormalKind),F=r.getVerticesData(Me.b.UVKind),z=r.getIndices(),J=M.length/9,ie=0,se=0,ce=0,ue=0,fe=[0];if(y)for(var ve=J;ve1?1:e.arc:1,a=e.closed===void 0||e.closed,s=e.shape,d=e.radius||1,p=e.tessellation||64,y=e.clip||0,C=e.updatable,M=De.a._GetDefaultSideOrientation(e.sideOrientation),U=e.cap||De.a.NO_CAP,F=2*Math.PI,z=new Array,J=e.invertUV||!1,ie=0,se=0,ce=F/p*o,ue=new Array;for(ie=0;ie<=p-y;ie++){for(ue=[],U!=De.a.CAP_START&&U!=De.a.CAP_ALL||(ue.push(new l.e(0,s[0].y,0)),ue.push(new l.e(Math.cos(ie*ce)*s[0].x*d,s[0].y,Math.sin(ie*ce)*s[0].x*d))),se=0;se0||C>0){switch(J=-M,ie=-U,se=M,ce=U,i){case De.a.CENTER:J-=d/=2,se+=d;break;case De.a.LEFT:se+=d,F=-d/2;break;case De.a.RIGHT:J-=d,F=d/2}switch(o){case De.a.CENTER:ie-=C/=2,ce+=C;break;case De.a.BOTTOM:ce+=C,z=-C/2;break;case De.a.TOP:ie-=C,z=C/2}}var ue=[],fe=[],ve=[];ve[0]=[0,0,1,0,1,1,0,1],ve[1]=[0,0,1,0,1,1,0,1],t!==De.a.ROTATE_TILE&&t!==De.a.ROTATE_ROW||(ve[1]=[1,1,0,1,0,0,1,0]),t!==De.a.FLIP_TILE&&t!==De.a.FLIP_ROW||(ve[1]=[1,0,0,0,0,1,1,1]),t!==De.a.FLIP_N_ROTATE_TILE&&t!==De.a.FLIP_N_ROTATE_ROW||(ve[1]=[0,1,1,1,1,0,0,0]);for(var Te=[],Oe=[],Pe=[],Ee=0,Se=0;Se0||C>0){var xe,Ne,Ie,Fe,Ke=C>0&&(o===De.a.CENTER||o===De.a.TOP),nt=C>0&&(o===De.a.CENTER||o===De.a.BOTTOM),rt=d>0&&(i===De.a.CENTER||i===De.a.RIGHT),ut=d>0&&(i===De.a.CENTER||i===De.a.LEFT),qe=[];if(Ke&&rt&&(ue.push(J+F,ie+z,0),ue.push(-M+F,ie+z,0),ue.push(-M+F,ie+C+z,0),ue.push(J+F,ie+C+z,0),Pe.push(Ee,Ee+1,Ee+3,Ee+1,Ee+2,Ee+3),Ee+=4,qe=[xe=1-d/e,Ne=1-C/n,Ie=1,Ne,Ie,Fe=1,xe,Fe],t===De.a.ROTATE_ROW&&(qe=[1-xe,1-Ne,1-Ie,1-Ne,1-Ie,1-Fe,1-xe,1-Fe]),t===De.a.FLIP_ROW&&(qe=[1-xe,Ne,1-Ie,Ne,1-Ie,Fe,1-xe,Fe]),t===De.a.FLIP_N_ROTATE_ROW&&(qe=[xe,1-Ne,Ie,1-Ne,Ie,1-Fe,xe,1-Fe]),Te=Te.concat(qe),Oe.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),fe.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),Ke&&ut&&(ue.push(M+F,ie+z,0),ue.push(se+F,ie+z,0),ue.push(se+F,ie+C+z,0),ue.push(M+F,ie+C+z,0),Pe.push(Ee,Ee+1,Ee+3,Ee+1,Ee+2,Ee+3),Ee+=4,qe=[xe=0,Ne=1-C/n,Ie=d/e,Ne,Ie,Fe=1,xe,Fe],(t===De.a.ROTATE_ROW||t===De.a.ROTATE_TILE&&s%2==0)&&(qe=[1-xe,1-Ne,1-Ie,1-Ne,1-Ie,1-Fe,1-xe,1-Fe]),(t===De.a.FLIP_ROW||t===De.a.FLIP_TILE&&s%2==0)&&(qe=[1-xe,Ne,1-Ie,Ne,1-Ie,Fe,1-xe,Fe]),(t===De.a.FLIP_N_ROTATE_ROW||t===De.a.FLIP_N_ROTATE_TILE&&s%2==0)&&(qe=[xe,1-Ne,Ie,1-Ne,Ie,1-Fe,xe,1-Fe]),Te=Te.concat(qe),Oe.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),fe.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),nt&&rt&&(ue.push(J+F,U+z,0),ue.push(-M+F,U+z,0),ue.push(-M+F,ce+z,0),ue.push(J+F,ce+z,0),Pe.push(Ee,Ee+1,Ee+3,Ee+1,Ee+2,Ee+3),Ee+=4,qe=[xe=1-d/e,Ne=0,Ie=1,Ne,Ie,Fe=C/n,xe,Fe],(t===De.a.ROTATE_ROW&&y%2==1||t===De.a.ROTATE_TILE&&y%1==0)&&(qe=[1-xe,1-Ne,1-Ie,1-Ne,1-Ie,1-Fe,1-xe,1-Fe]),(t===De.a.FLIP_ROW&&y%2==1||t===De.a.FLIP_TILE&&y%2==0)&&(qe=[1-xe,Ne,1-Ie,Ne,1-Ie,Fe,1-xe,Fe]),(t===De.a.FLIP_N_ROTATE_ROW&&y%2==1||t===De.a.FLIP_N_ROTATE_TILE&&y%2==0)&&(qe=[xe,1-Ne,Ie,1-Ne,Ie,1-Fe,xe,1-Fe]),Te=Te.concat(qe),Oe.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),fe.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),nt&&ut&&(ue.push(M+F,U+z,0),ue.push(se+F,U+z,0),ue.push(se+F,ce+z,0),ue.push(M+F,ce+z,0),Pe.push(Ee,Ee+1,Ee+3,Ee+1,Ee+2,Ee+3),Ee+=4,qe=[xe=0,Ne=0,Ie=d/e,Ne,Ie,Fe=C/n,xe,Fe],(t===De.a.ROTATE_ROW&&y%2==1||t===De.a.ROTATE_TILE&&(y+s)%2==1)&&(qe=[1-xe,1-Ne,1-Ie,1-Ne,1-Ie,1-Fe,1-xe,1-Fe]),(t===De.a.FLIP_ROW&&y%2==1||t===De.a.FLIP_TILE&&(y+s)%2==1)&&(qe=[1-xe,Ne,1-Ie,Ne,1-Ie,Fe,1-xe,Fe]),(t===De.a.FLIP_N_ROTATE_ROW&&y%2==1||t===De.a.FLIP_N_ROTATE_TILE&&(y+s)%2==1)&&(qe=[xe,1-Ne,Ie,1-Ne,Ie,1-Fe,xe,1-Fe]),Te=Te.concat(qe),Oe.push(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1),fe.push(0,0,-1,0,0,-1,0,0,-1,0,0,-1)),Ke){var at=[];for(xe=0,Ne=1-C/n,Ie=1,Fe=1,at[0]=[xe,Ne,Ie,Ne,Ie,Fe,xe,Fe],at[1]=[xe,Ne,Ie,Ne,Ie,Fe,xe,Fe],t!==De.a.ROTATE_TILE&&t!==De.a.ROTATE_ROW||(at[1]=[1-xe,1-Ne,1-Ie,1-Ne,1-Ie,1-Fe,1-xe,1-Fe]),t!==De.a.FLIP_TILE&&t!==De.a.FLIP_ROW||(at[1]=[1-xe,Ne,1-Ie,Ne,1-Ie,Fe,1-xe,Fe]),t!==De.a.FLIP_N_ROTATE_TILE&&t!==De.a.FLIP_N_ROTATE_ROW||(at[1]=[xe,1-Ne,Ie,1-Ne,Ie,1-Fe,xe,1-Fe]),Le=0;Le1)?1:e.arc||1;var U,F,z=function(ce,ue,fe,ve,Te,Oe,Pe,Ee){for(var Se,Le,xe,Ne,Ie=ue.getTangents(),Fe=ue.getNormals(),Ke=ue.getDistances(),nt=2*Math.PI/Te*Ee,rt=Oe||function(){return ve},ut=l.c.Matrix[0],qe=Pe===De.a.NO_CAP||Pe===De.a.CAP_END?0:2,at=0;at3?0:p,e.arc);var se=Po.a.CreateRibbon(t,{pathArray:F,closePath:!0,closeArray:!1,updatable:C,sideOrientation:M,invertUV:y,frontUVs:e.frontUVs,backUVs:e.backUVs},n);return se._creationDataStorage.pathArray=F,se._creationDataStorage.path3D=U,se._creationDataStorage.tessellation=s,se._creationDataStorage.cap=p,se._creationDataStorage.arc=e.arc,se._creationDataStorage.radius=a,se},r}();ft.a.CreateIcoSphere=function(r){var t,e=r.sideOrientation||ft.a.DEFAULTSIDE,n=r.radius||1,i=r.flat===void 0||r.flat,o=r.subdivisions||4,a=r.radiusX||n,s=r.radiusY||n,d=r.radiusZ||n,p=(1+Math.sqrt(5))/2,y=[-1,p,-0,1,p,0,-1,-p,0,1,-p,0,0,-1,-p,0,1,-p,0,-1,p,0,1,p,p,0,1,p,0,-1,-p,0,1,-p,0,-1],C=[0,11,5,0,5,1,0,1,7,0,7,10,12,22,23,1,5,20,5,11,4,23,22,13,22,18,6,7,1,8,14,21,4,14,4,2,16,13,6,15,6,19,3,8,9,4,21,5,13,17,23,6,13,22,19,6,18,9,8,1],M=[0,1,2,3,4,5,6,7,8,9,10,11,0,2,3,3,3,4,7,8,9,9,10,11],U=[5,1,3,1,6,4,0,0,5,3,4,2,2,2,4,0,2,0,1,1,6,0,6,2,0,4,3,3,4,4,3,1,4,2,4,4,0,2,1,1,2,2,3,3,1,3,2,4],F=[0,0,0,0,1,0,0,1,1,0,0,0,1,1,0,0,1,1,1,0],z=new Array,J=new Array,ie=new Array,se=new Array,ce=0,ue=new Array(3),fe=new Array(3);for(t=0;t<3;t++)ue[t]=l.e.Zero(),fe[t]=l.d.Zero();for(var ve=0;ve<20;ve++){for(t=0;t<3;t++){var Te=C[3*ve+t];ue[t].copyFromFloats(y[3*M[Te]],y[3*M[Te]+1],y[3*M[Te]+2]),ue[t].normalize().scaleInPlace(n),fe[t].copyFromFloats(U[2*Te]*(138/1024)+60/1024+F[ve]*(-40/1024),U[2*Te+1]*(239/1024)+26/1024+F[ve]*(20/1024))}for(var Oe=function(Le,xe,Ne,Ie){var Fe,Ke=l.e.Lerp(ue[0],ue[2],xe/o),nt=l.e.Lerp(ue[1],ue[2],xe/o),rt=o===xe?ue[2]:l.e.Lerp(Ke,nt,Le/(o-xe));if(rt.normalize(),i){var ut=l.e.Lerp(ue[0],ue[2],Ie/o),qe=l.e.Lerp(ue[1],ue[2],Ie/o);Fe=l.e.Lerp(ut,qe,Ne/(o-Ie))}else Fe=new l.e(rt.x,rt.y,rt.z);Fe.x/=a,Fe.y/=s,Fe.z/=d,Fe.normalize();var at=l.d.Lerp(fe[0],fe[2],xe/o),ot=l.d.Lerp(fe[1],fe[2],xe/o),Je=o===xe?fe[2]:l.d.Lerp(at,ot,Le/(o-xe));J.push(rt.x*a,rt.y*s,rt.z*d),ie.push(Fe.x,Fe.y,Fe.z),se.push(Je.x,Je.y),z.push(ce),ce++},Pe=0;Pe0)?1:0)+((ut=l.e.Dot(xe[nt+1].position,Ne)-Ie>0)?1:0)+((qe=l.e.Dot(xe[nt+2].position,Ne)-Ie>0)?1:0)){case 0:Ke.push(xe[nt]),Ke.push(xe[nt+1]),Ke.push(xe[nt+2]);break;case 1:if(rt&&(at=xe[nt+1],ot=xe[nt+2],Je=Fe(xe[nt],at),dt=Fe(xe[nt],ot)),ut){at=xe[nt],ot=xe[nt+2],Je=Fe(xe[nt+1],at),dt=Fe(xe[nt+1],ot),Ke.push(Je),Ke.push(ot.clone()),Ke.push(at.clone()),Ke.push(ot.clone()),Ke.push(Je.clone()),Ke.push(dt);break}qe&&(at=xe[nt],ot=xe[nt+1],Je=Fe(xe[nt+2],at),dt=Fe(xe[nt+2],ot)),at&&ot&&Je&&dt&&(Ke.push(at.clone()),Ke.push(ot.clone()),Ke.push(Je),Ke.push(dt),Ke.push(Je.clone()),Ke.push(ot.clone()));break;case 2:rt||(ot=Fe(at=xe[nt].clone(),xe[nt+1]),Je=Fe(at,xe[nt+2]),Ke.push(at),Ke.push(ot),Ke.push(Je)),ut||(ot=Fe(at=xe[nt+1].clone(),xe[nt+2]),Je=Fe(at,xe[nt]),Ke.push(at),Ke.push(ot),Ke.push(Je)),qe||(ot=Fe(at=xe[nt+2].clone(),xe[nt]),Je=Fe(at,xe[nt+1]),Ke.push(at),Ke.push(ot),Ke.push(Je))}}return Ke},Oe=0;OeM||z.deleted||z.isDirty)){for(var J=0;J<3;++J)if(z.error[J]>0,function(y){if(o){var C=y+s.verticesStart,M=l.e.FromArray(o,3*C),U=function(F){if(n){for(var z=0;z0&&this._reconstructedMesh.setVerticesData(Me.b.NormalKind,s),d.length>0&&this._reconstructedMesh.setVerticesData(Me.b.UVKind,d),p.length>0&&this._reconstructedMesh.setVerticesData(Me.b.ColorKind,p);var ue=this._mesh.subMeshes[t];t>0&&(this._reconstructedMesh.subMeshes=[],ie.forEach(function(fe){So.a.AddToMesh(fe.materialIndex,fe.verticesStart,fe.verticesCount,fe.indexStart,fe.indexCount,fe.getMesh())}),So.a.AddToMesh(ue.materialIndex,J,U,z,3*o.length,this._reconstructedMesh))},r.prototype.initDecimatedMesh=function(){this._reconstructedMesh=new De.a(this._mesh.name+"Decimated",this._mesh.getScene()),this._reconstructedMesh.material=this._mesh.material,this._reconstructedMesh.parent=this._mesh.parent,this._reconstructedMesh.isVisible=!1,this._reconstructedMesh.renderingGroupId=this._mesh.renderingGroupId},r.prototype.isFlipped=function(t,e,n,i,o){for(var a=0;a.999)return!0;var U=l.e.Cross(C,M).normalize();if(i[a]=!1,l.e.Dot(U,s.normal)<.2)return!0}else i[a]=!0,o.push(s)}}return!1},r.prototype.updateTriangles=function(t,e,n,i){for(var o=i,a=0;a=this._thinInstanceDataStorage.instancesCount)return!1;var n=this._thinInstanceDataStorage.matrixData;return t.copyToArray(n,16*r),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[r]=t),e&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},De.a.prototype.thinInstanceSetAttributeAt=function(r,t,e,n){return n===void 0&&(n=!0),!(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.data[r]||t>=this._thinInstanceDataStorage.instancesCount)&&(this._thinInstanceUpdateBufferSize(r,0),this._userThinInstanceBuffersStorage.data[r].set(e,t*this._userThinInstanceBuffersStorage.strides[r]),n&&this.thinInstanceBufferUpdated(r),!0)},Object.defineProperty(De.a.prototype,"thinInstanceCount",{get:function(){return this._thinInstanceDataStorage.instancesCount},set:function(r){var t,e;r<=((e=(t=this._thinInstanceDataStorage.matrixData)===null||t===void 0?void 0:t.length)!==null&&e!==void 0?e:0)/16&&(this._thinInstanceDataStorage.instancesCount=r)},enumerable:!0,configurable:!0}),De.a.prototype.thinInstanceSetBuffer=function(r,t,e,n){var i,o;if(e===void 0&&(e=0),n===void 0&&(n=!1),e=e||16,r==="matrix")if((i=this._thinInstanceDataStorage.matrixBuffer)===null||i===void 0||i.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=t?t.length:32*e,this._thinInstanceDataStorage.matrixData=t,this._thinInstanceDataStorage.worldMatrices=null,t!==null){this._thinInstanceDataStorage.instancesCount=t.length/e;var a=new Me.a(this.getEngine(),t,!n,e,!1,!0);this._thinInstanceDataStorage.matrixBuffer=a,this.setVerticesBuffer(a.createVertexBuffer("world0",0,4)),this.setVerticesBuffer(a.createVertexBuffer("world1",4,4)),this.setVerticesBuffer(a.createVertexBuffer("world2",8,4)),this.setVerticesBuffer(a.createVertexBuffer("world3",12,4)),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)}else this._thinInstanceDataStorage.instancesCount=0,this.doNotSyncBoundingInfo||this.refreshBoundingInfo(!0);else t===null?!((o=this._userThinInstanceBuffersStorage)===null||o===void 0)&&o.data[r]&&(this.removeVerticesData(r),delete this._userThinInstanceBuffersStorage.data[r],delete this._userThinInstanceBuffersStorage.strides[r],delete this._userThinInstanceBuffersStorage.sizes[r],delete this._userThinInstanceBuffersStorage.vertexBuffers[r]):(this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.data[r]=t,this._userThinInstanceBuffersStorage.strides[r]=e,this._userThinInstanceBuffersStorage.sizes[r]=t.length,this._userThinInstanceBuffersStorage.vertexBuffers[r]=new Me.b(this.getEngine(),t,r,!n,!1,e,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[r]))},De.a.prototype.thinInstanceBufferUpdated=function(r){var t;r==="matrix"?this._thinInstanceDataStorage.matrixBuffer&&this._thinInstanceDataStorage.matrixBuffer.updateDirectly(this._thinInstanceDataStorage.matrixData,0,this._thinInstanceDataStorage.instancesCount):!((t=this._userThinInstanceBuffersStorage)===null||t===void 0)&&t.vertexBuffers[r]&&this._userThinInstanceBuffersStorage.vertexBuffers[r].updateDirectly(this._userThinInstanceBuffersStorage.data[r],0)},De.a.prototype.thinInstancePartialBufferUpdate=function(r,t,e){var n;r==="matrix"?this._thinInstanceDataStorage.matrixBuffer&&this._thinInstanceDataStorage.matrixBuffer.updateDirectly(t,e):!((n=this._userThinInstanceBuffersStorage)===null||n===void 0)&&n.vertexBuffers[r]&&this._userThinInstanceBuffersStorage.vertexBuffers[r].updateDirectly(t,e)},De.a.prototype.thinInstanceGetWorldMatrices=function(){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return[];var r=this._thinInstanceDataStorage.matrixData;if(!this._thinInstanceDataStorage.worldMatrices){this._thinInstanceDataStorage.worldMatrices=new Array;for(var t=0;t-1&&(this.agents.splice(e,1),this.transforms.splice(e,1))},r.prototype.getAgents=function(){return this.agents},r.prototype.update=function(t){var e=this.bjsRECASTPlugin.getTimeStep(),n=this.bjsRECASTPlugin.getMaximumSubStepCount();if(e<=Gt.a)this.recastCrowd.update(t);else{var i=t/e;n&&i>n&&(i=n),i<1&&(i=1);for(var o=0;o=400&&o?o(p):e()},!1),p.addEventListener("error",function(){u.a.Error("error on XHR request."),e()},!1),p.send()}else u.a.Error("Error: IndexedDB not supported by your browser or Babylon.js database is not open."),e()},r._ValidateXHRData=function(t,e){e===void 0&&(e=7);try{if(1&e){if(t.responseText&&t.responseText.length>0)return!0;if(e===1)return!1}if(2&e){var n=ma.GetTGAHeader(t.response);if(n.width&&n.height&&n.width>0&&n.height>0)return!0;if(e===2)return!1}if(4&e){var i=new Uint8Array(t.response,0,3);return i[0]===68&&i[1]===68&&i[2]===83}}catch{}return!1},r.IsUASupportingBlobStorage=!0,r.IDBStorageEnabled=!1,r._ParseURL=function(t){document.createElement("a").href=t;var e=t.substring(0,t.lastIndexOf("#")),n=t.substring(e.lastIndexOf("/")+1,t.length);return t.substring(0,t.indexOf(n,0))},r._ReturnFullUrlLocation=function(t){return t.indexOf("http:/")===-1&&t.indexOf("https:/")===-1&&typeof window<"u"?r._ParseURL(window.location.href)+t:t},r}(),Fc=function(){function r(t,e,n){this.gradient=t,this.color1=e,this.color2=n}return r.prototype.getColorToRef=function(t){this.color2?O.b.LerpToRef(this.color1,this.color2,Math.random(),t):t.copyFrom(this.color1)},r}(),Cd=function(r,t){this.gradient=r,this.color=t},Bc=function(){function r(t,e,n){this.gradient=t,this.factor1=e,this.factor2=n}return r.prototype.getFactor=function(){return this.factor2===void 0||this.factor2===this.factor1?this.factor1:this.factor1+(this.factor2-this.factor1)*Math.random()},r}(),Nn=function(){function r(){}return r.GetCurrentGradient=function(t,e,n){if(e[0].gradient>t)n(e[0],e[0],1);else{for(var i=0;i=o.gradient&&t<=a.gradient)return void n(o,a,(t-o.gradient)/(a.gradient-o.gradient))}var s=e.length-1;n(e[s],e[s],1)}},r}(),xd=function(){function r(t){this.particleSystem=t,this.position=l.e.Zero(),this.direction=l.e.Zero(),this.color=new O.b(0,0,0,0),this.colorStep=new O.b(0,0,0,0),this.lifeTime=1,this.age=0,this.size=0,this.scale=new l.d(1,1),this.angle=0,this.angularSpeed=0,this.cellIndex=0,this._attachedSubEmitters=null,this._currentColor1=new O.b(0,0,0,0),this._currentColor2=new O.b(0,0,0,0),this._currentSize1=0,this._currentSize2=0,this._currentAngularSpeed1=0,this._currentAngularSpeed2=0,this._currentVelocity1=0,this._currentVelocity2=0,this._currentLimitVelocity1=0,this._currentLimitVelocity2=0,this._currentDrag1=0,this._currentDrag2=0,this.id=r._Count++,this.particleSystem.isAnimationSheetEnabled&&this.updateCellInfoFromSystem()}return r.prototype.updateCellInfoFromSystem=function(){this.cellIndex=this.particleSystem.startSpriteCellID},r.prototype.updateCellIndex=function(){var t=this.age,e=this.particleSystem.spriteCellChangeSpeed;this.particleSystem.spriteRandomStartCell&&(this._randomCellOffset===void 0&&(this._randomCellOffset=Math.random()*this.lifeTime),e===0?(e=1,t=this._randomCellOffset):t+=this._randomCellOffset);var n=this._initialEndSpriteCellID-this._initialStartSpriteCellID,i=$.a.Clamp(t*e%this.lifeTime/this.lifeTime);this.cellIndex=this._initialStartSpriteCellID+i*n|0},r.prototype._inheritParticleInfoToSubEmitter=function(t){if(t.particleSystem.emitter.position){var e=t.particleSystem.emitter;if(e.position.copyFrom(this.position),t.inheritDirection){var n=l.c.Vector3[0];this.direction.normalizeToRef(n),e.setDirection(n,0,Math.PI/2)}}else t.particleSystem.emitter.copyFrom(this.position);this.direction.scaleToRef(t.inheritedVelocityAmount/2,l.c.Vector3[0]),t.particleSystem._inheritedVelocityOffset.copyFrom(l.c.Vector3[0])},r.prototype._inheritParticleInfoToSubEmitters=function(){var t=this;this._attachedSubEmitters&&this._attachedSubEmitters.length>0&&this._attachedSubEmitters.forEach(function(e){t._inheritParticleInfoToSubEmitter(e)})},r.prototype._reset=function(){this.age=0,this.id=r._Count++,this._currentColorGradient=null,this._currentSizeGradient=null,this._currentAngularSpeedGradient=null,this._currentVelocityGradient=null,this._currentLimitVelocityGradient=null,this._currentDragGradient=null,this.cellIndex=this.particleSystem.startSpriteCellID,this._randomCellOffset=void 0},r.prototype.copyTo=function(t){t.position.copyFrom(this.position),this._initialDirection?t._initialDirection?t._initialDirection.copyFrom(this._initialDirection):t._initialDirection=this._initialDirection.clone():t._initialDirection=null,t.direction.copyFrom(this.direction),this._localPosition&&(t._localPosition?t._localPosition.copyFrom(this._localPosition):t._localPosition=this._localPosition.clone()),t.color.copyFrom(this.color),t.colorStep.copyFrom(this.colorStep),t.lifeTime=this.lifeTime,t.age=this.age,t._randomCellOffset=this._randomCellOffset,t.size=this.size,t.scale.copyFrom(this.scale),t.angle=this.angle,t.angularSpeed=this.angularSpeed,t.particleSystem=this.particleSystem,t.cellIndex=this.cellIndex,t.id=this.id,t._attachedSubEmitters=this._attachedSubEmitters,this._currentColorGradient&&(t._currentColorGradient=this._currentColorGradient,t._currentColor1.copyFrom(this._currentColor1),t._currentColor2.copyFrom(this._currentColor2)),this._currentSizeGradient&&(t._currentSizeGradient=this._currentSizeGradient,t._currentSize1=this._currentSize1,t._currentSize2=this._currentSize2),this._currentAngularSpeedGradient&&(t._currentAngularSpeedGradient=this._currentAngularSpeedGradient,t._currentAngularSpeed1=this._currentAngularSpeed1,t._currentAngularSpeed2=this._currentAngularSpeed2),this._currentVelocityGradient&&(t._currentVelocityGradient=this._currentVelocityGradient,t._currentVelocity1=this._currentVelocity1,t._currentVelocity2=this._currentVelocity2),this._currentLimitVelocityGradient&&(t._currentLimitVelocityGradient=this._currentLimitVelocityGradient,t._currentLimitVelocity1=this._currentLimitVelocity1,t._currentLimitVelocity2=this._currentLimitVelocity2),this._currentDragGradient&&(t._currentDragGradient=this._currentDragGradient,t._currentDrag1=this._currentDrag1,t._currentDrag2=this._currentDrag2),this.particleSystem.isAnimationSheetEnabled&&(t._initialStartSpriteCellID=this._initialStartSpriteCellID,t._initialEndSpriteCellID=this._initialEndSpriteCellID),this.particleSystem.useRampGradients&&(t.remapData&&this.remapData?t.remapData.copyFrom(this.remapData):t.remapData=new l.f(0,0,0,0)),this._randomNoiseCoordinates1&&(t._randomNoiseCoordinates1?(t._randomNoiseCoordinates1.copyFrom(this._randomNoiseCoordinates1),t._randomNoiseCoordinates2.copyFrom(this._randomNoiseCoordinates2)):(t._randomNoiseCoordinates1=this._randomNoiseCoordinates1.clone(),t._randomNoiseCoordinates2=this._randomNoiseCoordinates2.clone()))},r._Count=0,r}();(function(r){r[r.ATTACHED=0]="ATTACHED",r[r.END=1]="END"})(Br||(Br={}));var Ro=function(){function r(t){if(this.particleSystem=t,this.type=Br.END,this.inheritDirection=!1,this.inheritedVelocityAmount=0,!t.emitter||!t.emitter.dispose){var e=R.a.GetClass("BABYLON.AbstractMesh");t.emitter=new e("SubemitterSystemEmitter",t.getScene())}t.onDisposeObservable.add(function(){t.emitter&&t.emitter.dispose&&t.emitter.dispose()})}return r.prototype.clone=function(){var t=this.particleSystem.emitter;t?t instanceof l.e?t=t.clone():t.getClassName().indexOf("Mesh")!==-1&&((t=new(R.a.GetClass("BABYLON.Mesh"))("",t.getScene())).isVisible=!1):t=new l.e;var e=new r(this.particleSystem.clone("",t));return e.particleSystem.name+="Clone",e.type=this.type,e.inheritDirection=this.inheritDirection,e.inheritedVelocityAmount=this.inheritedVelocityAmount,e.particleSystem._disposeEmitterOnDispose=!0,e.particleSystem.disposeOnStop=!0,e},r.prototype.serialize=function(){var t={};return t.type=this.type,t.inheritDirection=this.inheritDirection,t.inheritedVelocityAmount=this.inheritedVelocityAmount,t.particleSystem=this.particleSystem.serialize(),t},r._ParseParticleSystem=function(t,e,n){throw xn.a.WarnImport("ParseParticle")},r.Parse=function(t,e,n){var i=t.particleSystem,o=new r(r._ParseParticleSystem(i,e,n));return o.type=t.type,o.inheritDirection=t.inheritDirection,o.inheritedVelocityAmount=t.inheritedVelocityAmount,o.particleSystem._isSubEmitter=!0,o},r.prototype.dispose=function(){this.particleSystem.dispose()},r}(),Gm=` -varying vec2 vUV; -varying vec4 vColor; -uniform vec4 textureMask; -uniform sampler2D diffuseSampler; -#include -#include -#include -#include -#ifdef RAMPGRADIENT -varying vec4 remapRanges; -uniform sampler2D rampSampler; -#endif -void main(void) { -#include -vec4 textureColor=texture2D(diffuseSampler,vUV); -vec4 baseColor=(textureColor*textureMask+(vec4(1.,1.,1.,1.)-textureMask))*vColor; -#ifdef RAMPGRADIENT -float alpha=baseColor.a; -float remappedColorIndex=clamp((alpha-remapRanges.x)/remapRanges.y,0.0,1.0); -vec4 rampColor=texture2D(rampSampler,vec2(1.0-remappedColorIndex,0.)); -baseColor.rgb*=rampColor.rgb; - -float finalAlpha=baseColor.a; -baseColor.a=clamp((alpha*rampColor.a-remapRanges.z)/remapRanges.w,0.0,1.0); -#endif -#ifdef BLENDMULTIPLYMODE -float sourceAlpha=vColor.a*textureColor.a; -baseColor.rgb=baseColor.rgb*sourceAlpha+vec3(1.0)*(1.0-sourceAlpha); -#endif - - -#ifdef IMAGEPROCESSINGPOSTPROCESS -baseColor.rgb=toLinearSpace(baseColor.rgb); -#else -#ifdef IMAGEPROCESSING -baseColor.rgb=toLinearSpace(baseColor.rgb); -baseColor=applyImageProcessing(baseColor); -#endif -#endif -gl_FragColor=baseColor; -}`;je.a.ShadersStore.particlesPixelShader=Gm;var zm=` -attribute vec3 position; -attribute vec4 color; -attribute float angle; -attribute vec2 size; -#ifdef ANIMATESHEET -attribute float cellIndex; -#endif -#ifndef BILLBOARD -attribute vec3 direction; -#endif -#ifdef BILLBOARDSTRETCHED -attribute vec3 direction; -#endif -#ifdef RAMPGRADIENT -attribute vec4 remapData; -#endif -attribute vec2 offset; - -uniform mat4 view; -uniform mat4 projection; -uniform vec2 translationPivot; -#ifdef ANIMATESHEET -uniform vec3 particlesInfos; -#endif - -varying vec2 vUV; -varying vec4 vColor; -varying vec3 vPositionW; -#ifdef RAMPGRADIENT -varying vec4 remapRanges; -#endif -#if defined(BILLBOARD) && !defined(BILLBOARDY) && !defined(BILLBOARDSTRETCHED) -uniform mat4 invView; -#endif -#include -#ifdef BILLBOARD -uniform vec3 eyePosition; -#endif -vec3 rotate(vec3 yaxis,vec3 rotatedCorner) { -vec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis)); -vec3 zaxis=normalize(cross(yaxis,xaxis)); -vec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z); -vec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z); -vec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z); -mat3 rotMatrix=mat3(row0,row1,row2); -vec3 alignedCorner=rotMatrix*rotatedCorner; -return position+alignedCorner; -} -#ifdef BILLBOARDSTRETCHED -vec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) { -vec3 normalizedToCamera=normalize(toCamera); -vec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera)); -vec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera)); -vec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z); -vec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z); -vec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z); -mat3 rotMatrix=mat3(row0,row1,row2); -vec3 alignedCorner=rotMatrix*rotatedCorner; -return position+alignedCorner; -} -#endif -void main(void) { -vec2 cornerPos; -cornerPos=(vec2(offset.x-0.5,offset.y-0.5)-translationPivot)*size+translationPivot; -#ifdef BILLBOARD - -vec3 rotatedCorner; -#ifdef BILLBOARDY -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -rotatedCorner.y=0.; -vec3 yaxis=position-eyePosition; -yaxis.y=0.; -vPositionW=rotate(normalize(yaxis),rotatedCorner); -vec3 viewPos=(view*vec4(vPositionW,1.0)).xyz; -#elif defined(BILLBOARDSTRETCHED) -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -rotatedCorner.z=0.; -vec3 toCamera=position-eyePosition; -vPositionW=rotateAlign(toCamera,rotatedCorner); -vec3 viewPos=(view*vec4(vPositionW,1.0)).xyz; -#else -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -rotatedCorner.z=0.; -vec3 viewPos=(view*vec4(position,1.0)).xyz+rotatedCorner; -vPositionW=(invView*vec4(viewPos,1)).xyz; -#endif -#ifdef RAMPGRADIENT -remapRanges=remapData; -#endif - -gl_Position=projection*vec4(viewPos,1.0); -#else - -vec3 rotatedCorner; -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -rotatedCorner.y=0.; -vec3 yaxis=normalize(direction); -vPositionW=rotate(yaxis,rotatedCorner); -gl_Position=projection*view*vec4(vPositionW,1.0); -#endif -vColor=color; -#ifdef ANIMATESHEET -float rowOffset=floor(cellIndex*particlesInfos.z); -float columnOffset=cellIndex-rowOffset/particlesInfos.z; -vec2 uvScale=particlesInfos.xy; -vec2 uvOffset=vec2(offset.x ,1.0-offset.y); -vUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale; -#else -vUV=offset; -#endif - -#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6) -vec4 worldPos=vec4(vPositionW,1.0); -#endif -#include -}`;je.a.ShadersStore.particlesVertexShader=zm;var hn=function(r){function t(e,n,i,o,a,s){o===void 0&&(o=null),a===void 0&&(a=!1),s===void 0&&(s=.01);var d=r.call(this,e)||this;return d._inheritedVelocityOffset=new l.e,d.onDisposeObservable=new P.c,d.onStoppedObservable=new P.c,d._particles=new Array,d._stockParticles=new Array,d._newPartsExcess=0,d._vertexBuffers={},d._scaledColorStep=new O.b(0,0,0,0),d._colorDiff=new O.b(0,0,0,0),d._scaledDirection=l.e.Zero(),d._scaledGravity=l.e.Zero(),d._currentRenderId=-1,d._useInstancing=!1,d._started=!1,d._stopped=!1,d._actualFrame=0,d._currentEmitRate1=0,d._currentEmitRate2=0,d._currentStartSize1=0,d._currentStartSize2=0,d._rawTextureWidth=256,d._useRampGradients=!1,d._disposeEmitterOnDispose=!1,d.isLocal=!1,d._onBeforeDrawParticlesObservable=null,d.recycleParticle=function(p){var y=d._particles.pop();y!==p&&y.copyTo(p),d._stockParticles.push(y)},d._createParticle=function(){var p;if(d._stockParticles.length!==0?(p=d._stockParticles.pop())._reset():p=new xd(d),d._subEmitters&&d._subEmitters.length>0){var y=d._subEmitters[Math.floor(Math.random()*d._subEmitters.length)];p._attachedSubEmitters=[],y.forEach(function(C){if(C.type===Br.ATTACHED){var M=C.clone();p._attachedSubEmitters.push(M),M.particleSystem.start()}})}return p},d._emitFromParticle=function(p){if(d._subEmitters&&d._subEmitters.length!==0){var y=Math.floor(Math.random()*d._subEmitters.length);d._subEmitters[y].forEach(function(C){if(C.type===Br.END){var M=C.clone();p._inheritParticleInfoToSubEmitter(M),M.particleSystem._rootParticleSystem=d,d.activeSubSystems.push(M.particleSystem),M.particleSystem.start()}})}},d._capacity=n,d._epsilon=s,d._isAnimationSheetEnabled=a,i&&i.getClassName()!=="Scene"?(d._engine=i,d.defaultProjectionMatrix=l.a.PerspectiveFovLH(.8,1,.1,100)):(d._scene=i||te.a.LastCreatedScene,d._engine=d._scene.getEngine(),d.uniqueId=d._scene.getUniqueId(),d._scene.particleSystems.push(d)),d._engine.getCaps().vertexArrayObject&&(d._vertexArrayObject=null),d._attachImageProcessingConfiguration(null),d._customEffect={0:o},d._useInstancing=d._engine.getCaps().instancedArrays,d._createIndexBuffer(),d._createVertexBuffers(),d.particleEmitterType=new wr,d.updateFunction=function(p){var y=null,C=null;d.noiseTexture&&(y=d.noiseTexture.getSize(),C=d.noiseTexture.getContent());for(var M,U=function(){M=p[F];var z=d._scaledUpdateSpeed,J=M.age;if(M.age+=z,M.age>M.lifeTime){var ie=M.age-J;z=(M.lifeTime-J)*z/ie,M.age=M.lifeTime}var se=M.age/M.lifeTime;d._colorGradients&&d._colorGradients.length>0?Nn.GetCurrentGradient(se,d._colorGradients,function(Pe,Ee,Se){Pe!==M._currentColorGradient&&(M._currentColor1.copyFrom(M._currentColor2),Ee.getColorToRef(M._currentColor2),M._currentColorGradient=Pe),O.b.LerpToRef(M._currentColor1,M._currentColor2,Se,M.color)}):(M.colorStep.scaleToRef(z,d._scaledColorStep),M.color.addInPlace(d._scaledColorStep),M.color.a<0&&(M.color.a=0)),d._angularSpeedGradients&&d._angularSpeedGradients.length>0&&Nn.GetCurrentGradient(se,d._angularSpeedGradients,function(Pe,Ee,Se){Pe!==M._currentAngularSpeedGradient&&(M._currentAngularSpeed1=M._currentAngularSpeed2,M._currentAngularSpeed2=Ee.getFactor(),M._currentAngularSpeedGradient=Pe),M.angularSpeed=$.a.Lerp(M._currentAngularSpeed1,M._currentAngularSpeed2,Se)}),M.angle+=M.angularSpeed*z;var ce=z;if(d._velocityGradients&&d._velocityGradients.length>0&&Nn.GetCurrentGradient(se,d._velocityGradients,function(Pe,Ee,Se){Pe!==M._currentVelocityGradient&&(M._currentVelocity1=M._currentVelocity2,M._currentVelocity2=Ee.getFactor(),M._currentVelocityGradient=Pe),ce*=$.a.Lerp(M._currentVelocity1,M._currentVelocity2,Se)}),M.direction.scaleToRef(ce,d._scaledDirection),d._limitVelocityGradients&&d._limitVelocityGradients.length>0&&Nn.GetCurrentGradient(se,d._limitVelocityGradients,function(Pe,Ee,Se){Pe!==M._currentLimitVelocityGradient&&(M._currentLimitVelocity1=M._currentLimitVelocity2,M._currentLimitVelocity2=Ee.getFactor(),M._currentLimitVelocityGradient=Pe);var Le=$.a.Lerp(M._currentLimitVelocity1,M._currentLimitVelocity2,Se);M.direction.length()>Le&&M.direction.scaleInPlace(d.limitVelocityDamping)}),d._dragGradients&&d._dragGradients.length>0&&Nn.GetCurrentGradient(se,d._dragGradients,function(Pe,Ee,Se){Pe!==M._currentDragGradient&&(M._currentDrag1=M._currentDrag2,M._currentDrag2=Ee.getFactor(),M._currentDragGradient=Pe);var Le=$.a.Lerp(M._currentDrag1,M._currentDrag2,Se);d._scaledDirection.scaleInPlace(1-Le)}),d.isLocal&&M._localPosition?(M._localPosition.addInPlace(d._scaledDirection),l.e.TransformCoordinatesToRef(M._localPosition,d._emitterWorldMatrix,M.position)):M.position.addInPlace(d._scaledDirection),C&&y&&M._randomNoiseCoordinates1){var ue=d._fetchR(M._randomNoiseCoordinates1.x,M._randomNoiseCoordinates1.y,y.width,y.height,C),fe=d._fetchR(M._randomNoiseCoordinates1.z,M._randomNoiseCoordinates2.x,y.width,y.height,C),ve=d._fetchR(M._randomNoiseCoordinates2.y,M._randomNoiseCoordinates2.z,y.width,y.height,C),Te=l.c.Vector3[0],Oe=l.c.Vector3[1];Te.copyFromFloats((2*ue-1)*d.noiseStrength.x,(2*fe-1)*d.noiseStrength.y,(2*ve-1)*d.noiseStrength.z),Te.scaleToRef(z,Oe),M.direction.addInPlace(Oe)}if(d.gravity.scaleToRef(z,d._scaledGravity),M.direction.addInPlace(d._scaledGravity),d._sizeGradients&&d._sizeGradients.length>0&&Nn.GetCurrentGradient(se,d._sizeGradients,function(Pe,Ee,Se){Pe!==M._currentSizeGradient&&(M._currentSize1=M._currentSize2,M._currentSize2=Ee.getFactor(),M._currentSizeGradient=Pe),M.size=$.a.Lerp(M._currentSize1,M._currentSize2,Se)}),d._useRampGradients&&(d._colorRemapGradients&&d._colorRemapGradients.length>0&&Nn.GetCurrentGradient(se,d._colorRemapGradients,function(Pe,Ee,Se){var Le=$.a.Lerp(Pe.factor1,Ee.factor1,Se),xe=$.a.Lerp(Pe.factor2,Ee.factor2,Se);M.remapData.x=Le,M.remapData.y=xe-Le}),d._alphaRemapGradients&&d._alphaRemapGradients.length>0&&Nn.GetCurrentGradient(se,d._alphaRemapGradients,function(Pe,Ee,Se){var Le=$.a.Lerp(Pe.factor1,Ee.factor1,Se),xe=$.a.Lerp(Pe.factor2,Ee.factor2,Se);M.remapData.z=Le,M.remapData.w=xe-Le})),d._isAnimationSheetEnabled&&M.updateCellIndex(),M._inheritParticleInfoToSubEmitters(),M.age>=M.lifeTime)return d._emitFromParticle(M),M._attachedSubEmitters&&(M._attachedSubEmitters.forEach(function(Pe){Pe.particleSystem.disposeOnStop=!0,Pe.particleSystem.stop()}),M._attachedSubEmitters=null),d.recycleParticle(M),F--,"continue"},F=0;Fd.gradient?1:0})},t.prototype._removeFactorGradient=function(e,n){if(e)for(var i=0,o=0,a=e;on.gradient?1:0}),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._createRampGradientTexture())},t.prototype.addRampGradient=function(e,n){this._rampGradients||(this._rampGradients=[]);var i=new Cd(e,n);return this._rampGradients.push(i),this._syncRampGradientTexture(),this},t.prototype.removeRampGradient=function(e){return this._removeGradientAndTexture(e,this._rampGradients,this._rampGradientsTexture),this._rampGradientsTexture=null,this._rampGradients&&this._rampGradients.length>0&&this._createRampGradientTexture(),this},t.prototype.addColorGradient=function(e,n,i){this._colorGradients||(this._colorGradients=[]);var o=new Fc(e,n,i);return this._colorGradients.push(o),this._colorGradients.sort(function(a,s){return a.gradients.gradient?1:0}),this},t.prototype.removeColorGradient=function(e){if(!this._colorGradients)return this;for(var n=0,i=0,o=this._colorGradients;i0&&(this._currentEmitRateGradient=this._emitRateGradients[0],this._currentEmitRate1=this._currentEmitRateGradient.getFactor(),this._currentEmitRate2=this._currentEmitRate1),this._emitRateGradients.length>1&&(this._currentEmitRate2=this._emitRateGradients[1].getFactor())),this._startSizeGradients&&(this._startSizeGradients.length>0&&(this._currentStartSizeGradient=this._startSizeGradients[0],this._currentStartSize1=this._currentStartSizeGradient.getFactor(),this._currentStartSize2=this._currentStartSize1),this._startSizeGradients.length>1&&(this._currentStartSize2=this._startSizeGradients[1].getFactor())),this.preWarmCycles){((n=this.emitter)===null||n===void 0?void 0:n.getClassName().indexOf("Mesh"))!==-1&&this.emitter.computeWorldMatrix(!0);var o=this.noiseTexture;if(o&&o.onGeneratedObservable)o.onGeneratedObservable.addOnce(function(){setTimeout(function(){for(var s=0;s0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop)}},t.prototype.stop=function(e){e===void 0&&(e=!0),this._stopped||(this.onStoppedObservable.notifyObservers(this),this._stopped=!0,e&&this._stopSubEmitters())},t.prototype.reset=function(){this._stockParticles=[],this._particles=[]},t.prototype._appendParticleVertex=function(e,n,i,o){var a=e*this._vertexBufferSize;if(this._vertexData[a++]=n.position.x+this.worldOffset.x,this._vertexData[a++]=n.position.y+this.worldOffset.y,this._vertexData[a++]=n.position.z+this.worldOffset.z,this._vertexData[a++]=n.color.r,this._vertexData[a++]=n.color.g,this._vertexData[a++]=n.color.b,this._vertexData[a++]=n.color.a,this._vertexData[a++]=n.angle,this._vertexData[a++]=n.scale.x*n.size,this._vertexData[a++]=n.scale.y*n.size,this._isAnimationSheetEnabled&&(this._vertexData[a++]=n.cellIndex),this._isBillboardBased)this.billboardMode===t.BILLBOARDMODE_STRETCHED&&(this._vertexData[a++]=n.direction.x,this._vertexData[a++]=n.direction.y,this._vertexData[a++]=n.direction.z);else if(n._initialDirection){var s=n._initialDirection;this.isLocal&&(l.e.TransformNormalToRef(s,this._emitterWorldMatrix,l.c.Vector3[0]),s=l.c.Vector3[0]),s.x===0&&s.z===0&&(s.x=.001),this._vertexData[a++]=s.x,this._vertexData[a++]=s.y,this._vertexData[a++]=s.z}else{var d=n.direction;this.isLocal&&(l.e.TransformNormalToRef(d,this._emitterWorldMatrix,l.c.Vector3[0]),d=l.c.Vector3[0]),d.x===0&&d.z===0&&(d.x=.001),this._vertexData[a++]=d.x,this._vertexData[a++]=d.y,this._vertexData[a++]=d.z}this._useRampGradients&&n.remapData&&(this._vertexData[a++]=n.remapData.x,this._vertexData[a++]=n.remapData.y,this._vertexData[a++]=n.remapData.z,this._vertexData[a++]=n.remapData.w),this._useInstancing||(this._isAnimationSheetEnabled&&(i===0?i=this._epsilon:i===1&&(i=1-this._epsilon),o===0?o=this._epsilon:o===1&&(o=1-this._epsilon)),this._vertexData[a++]=i,this._vertexData[a++]=o)},t.prototype._stopSubEmitters=function(){this.activeSubSystems&&(this.activeSubSystems.forEach(function(e){e.stop(!0)}),this.activeSubSystems=new Array)},t.prototype._removeFromRoot=function(){if(this._rootParticleSystem){var e=this._rootParticleSystem.activeSubSystems.indexOf(this);e!==-1&&this._rootParticleSystem.activeSubSystems.splice(e,1),this._rootParticleSystem=null}},t.prototype._update=function(e){var n,i=this;if(this._alive=this._particles.length>0,this.emitter.position){var o=this.emitter;this._emitterWorldMatrix=o.getWorldMatrix()}else{var a=this.emitter;this._emitterWorldMatrix=l.a.Translation(a.x,a.y,a.z)}this.updateFunction(this._particles);for(var s,d=function(){if(p._particles.length===p._capacity)return"break";if(n=p._createParticle(),p._particles.push(n),p.targetStopDuration&&p._lifeTimeGradients&&p._lifeTimeGradients.length>0){var C=$.a.Clamp(p._actualFrame/p.targetStopDuration);Nn.GetCurrentGradient(C,p._lifeTimeGradients,function(F,z){var J=F,ie=z,se=J.getFactor(),ce=ie.getFactor(),ue=(C-J.gradient)/(ie.gradient-J.gradient);n.lifeTime=$.a.Lerp(se,ce,ue)})}else n.lifeTime=$.a.RandomRange(p.minLifeTime,p.maxLifeTime);var M=$.a.RandomRange(p.minEmitPower,p.maxEmitPower);if(p.startPositionFunction?p.startPositionFunction(p._emitterWorldMatrix,n.position,n,p.isLocal):p.particleEmitterType.startPositionFunction(p._emitterWorldMatrix,n.position,n,p.isLocal),p.isLocal&&(n._localPosition?n._localPosition.copyFrom(n.position):n._localPosition=n.position.clone(),l.e.TransformCoordinatesToRef(n._localPosition,p._emitterWorldMatrix,n.position)),p.startDirectionFunction?p.startDirectionFunction(p._emitterWorldMatrix,n.direction,n,p.isLocal):p.particleEmitterType.startDirectionFunction(p._emitterWorldMatrix,n.direction,n,p.isLocal),M===0?n._initialDirection?n._initialDirection.copyFrom(n.direction):n._initialDirection=n.direction.clone():n._initialDirection=null,n.direction.scaleInPlace(M),p._sizeGradients&&p._sizeGradients.length!==0?(n._currentSizeGradient=p._sizeGradients[0],n._currentSize1=n._currentSizeGradient.getFactor(),n.size=n._currentSize1,p._sizeGradients.length>1?n._currentSize2=p._sizeGradients[1].getFactor():n._currentSize2=n._currentSize1):n.size=$.a.RandomRange(p.minSize,p.maxSize),n.scale.copyFromFloats($.a.RandomRange(p.minScaleX,p.maxScaleX),$.a.RandomRange(p.minScaleY,p.maxScaleY)),p._startSizeGradients&&p._startSizeGradients[0]&&p.targetStopDuration){var U=p._actualFrame/p.targetStopDuration;Nn.GetCurrentGradient(U,p._startSizeGradients,function(F,z,J){F!==i._currentStartSizeGradient&&(i._currentStartSize1=i._currentStartSize2,i._currentStartSize2=z.getFactor(),i._currentStartSizeGradient=F);var ie=$.a.Lerp(i._currentStartSize1,i._currentStartSize2,J);n.scale.scaleInPlace(ie)})}p._angularSpeedGradients&&p._angularSpeedGradients.length!==0?(n._currentAngularSpeedGradient=p._angularSpeedGradients[0],n.angularSpeed=n._currentAngularSpeedGradient.getFactor(),n._currentAngularSpeed1=n.angularSpeed,p._angularSpeedGradients.length>1?n._currentAngularSpeed2=p._angularSpeedGradients[1].getFactor():n._currentAngularSpeed2=n._currentAngularSpeed1):n.angularSpeed=$.a.RandomRange(p.minAngularSpeed,p.maxAngularSpeed),n.angle=$.a.RandomRange(p.minInitialRotation,p.maxInitialRotation),p._velocityGradients&&p._velocityGradients.length>0&&(n._currentVelocityGradient=p._velocityGradients[0],n._currentVelocity1=n._currentVelocityGradient.getFactor(),p._velocityGradients.length>1?n._currentVelocity2=p._velocityGradients[1].getFactor():n._currentVelocity2=n._currentVelocity1),p._limitVelocityGradients&&p._limitVelocityGradients.length>0&&(n._currentLimitVelocityGradient=p._limitVelocityGradients[0],n._currentLimitVelocity1=n._currentLimitVelocityGradient.getFactor(),p._limitVelocityGradients.length>1?n._currentLimitVelocity2=p._limitVelocityGradients[1].getFactor():n._currentLimitVelocity2=n._currentLimitVelocity1),p._dragGradients&&p._dragGradients.length>0&&(n._currentDragGradient=p._dragGradients[0],n._currentDrag1=n._currentDragGradient.getFactor(),p._dragGradients.length>1?n._currentDrag2=p._dragGradients[1].getFactor():n._currentDrag2=n._currentDrag1),p._colorGradients&&p._colorGradients.length!==0?(n._currentColorGradient=p._colorGradients[0],n._currentColorGradient.getColorToRef(n.color),n._currentColor1.copyFrom(n.color),p._colorGradients.length>1?p._colorGradients[1].getColorToRef(n._currentColor2):n._currentColor2.copyFrom(n.color)):(s=$.a.RandomRange(0,1),O.b.LerpToRef(p.color1,p.color2,s,n.color),p.colorDead.subtractToRef(n.color,p._colorDiff),p._colorDiff.scaleToRef(1/n.lifeTime,n.colorStep)),p._isAnimationSheetEnabled&&(n._initialStartSpriteCellID=p.startSpriteCellID,n._initialEndSpriteCellID=p.endSpriteCellID),n.direction.addInPlace(p._inheritedVelocityOffset),p._useRampGradients&&(n.remapData=new l.f(0,1,0,1)),p.noiseTexture&&(n._randomNoiseCoordinates1?(n._randomNoiseCoordinates1.copyFromFloats(Math.random(),Math.random(),Math.random()),n._randomNoiseCoordinates2.copyFromFloats(Math.random(),Math.random(),Math.random())):(n._randomNoiseCoordinates1=new l.e(Math.random(),Math.random(),Math.random()),n._randomNoiseCoordinates2=new l.e(Math.random(),Math.random(),Math.random()))),n._inheritParticleInfoToSubEmitters()},p=this,y=0;y-1)o=this.manualEmitCount,this._newPartsExcess=0,this.manualEmitCount=0;else{var a=this.emitRate;if(this._emitRateGradients&&this._emitRateGradients.length>0&&this.targetStopDuration){var s=this._actualFrame/this.targetStopDuration;Nn.GetCurrentGradient(s,this._emitRateGradients,function(C,M,U){C!==i._currentEmitRateGradient&&(i._currentEmitRate1=i._currentEmitRate2,i._currentEmitRate2=M.getFactor(),i._currentEmitRateGradient=C),a=$.a.Lerp(i._currentEmitRate1,i._currentEmitRate2,U)})}o=a*this._scaledUpdateSpeed>>0,this._newPartsExcess+=a*this._scaledUpdateSpeed-o}if(this._newPartsExcess>1&&(o+=this._newPartsExcess>>0,this._newPartsExcess-=this._newPartsExcess>>0),this._alive=!1,this._stopped?o=0:(this._actualFrame+=this._scaledUpdateSpeed,this.targetStopDuration&&this._actualFrame>=this.targetStopDuration&&this.stop()),this._update(o),this._stopped&&(this._alive||(this._started=!1,this.onAnimationEnd&&this.onAnimationEnd(),this.disposeOnStop&&this._scene&&this._scene._toBeDisposed.push(this))),!e){for(var d=0,p=0;p=0&&(s.invertToRef(l.c.Matrix[0]),o.setMatrix("invView",l.c.Matrix[0])),this._vertexArrayObject!==void 0?(this._vertexArrayObject||(this._vertexArrayObject=this._engine.recordVertexArrayObject(this._vertexBuffers,this._indexBuffer,o)),this._engine.bindVertexArrayObject(this._vertexArrayObject,this._indexBuffer)):a.bindBuffers(this._vertexBuffers,this._indexBuffer,o),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(o),e){case t.BLENDMODE_ADD:a.setAlphaMode(h.a.ALPHA_ADD);break;case t.BLENDMODE_ONEONE:a.setAlphaMode(h.a.ALPHA_ONEONE);break;case t.BLENDMODE_STANDARD:a.setAlphaMode(h.a.ALPHA_COMBINE);break;case t.BLENDMODE_MULTIPLY:a.setAlphaMode(h.a.ALPHA_MULTIPLY)}return this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(o),this._useInstancing?a.drawArraysType(h.a.MATERIAL_TriangleFanDrawMode,0,4,this._particles.length):a.drawElementsType(h.a.MATERIAL_TriangleFillMode,0,6*this._particles.length),this._particles.length},t.prototype.render=function(){if(!this.isReady()||!this._particles.length)return 0;var e=this._engine;e.setState&&(e.setState(!1),this.forceDepthWrite&&e.setDepthWrite(!0));var n=0;return n=this.blendMode===t.BLENDMODE_MULTIPLYADD?this._render(t.BLENDMODE_MULTIPLY)+this._render(t.BLENDMODE_ADD):this._render(this.blendMode),this._engine.unbindInstanceAttributes(),this._engine.setAlphaMode(h.a.ALPHA_DISABLE),n},t.prototype.dispose=function(e){if(e===void 0&&(e=!0),this._vertexBuffer&&(this._vertexBuffer.dispose(),this._vertexBuffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._indexBuffer&&(this._engine._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._vertexArrayObject&&(this._engine.releaseVertexArrayObject(this._vertexArrayObject),this._vertexArrayObject=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this._rampGradientsTexture&&(this._rampGradientsTexture.dispose(),this._rampGradientsTexture=null),this._removeFromRoot(),this._subEmitters&&this._subEmitters.length){for(var n=0;n-1&&this._scene.particleSystems.splice(n,1),this._scene._activeParticleSystems.dispose()),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onStoppedObservable.clear(),this.reset()},t.prototype.clone=function(e,n){var i=Object(c.a)({},this._customEffect),o=null,a=this._engine;if(a.createEffectForParticles&&this.customShader!=null){var s=(o=this.customShader).shaderOptions.defines.length>0?o.shaderOptions.defines.join(` -`):"";i[0]=a.createEffectForParticles(o.shaderPath.fragmentElement,o.shaderOptions.uniforms,o.shaderOptions.samplers,s)}var d=this.serialize(),p=t.Parse(d,this._scene||this._engine,"");return p.name=e,p.customShader=o,p._customEffect=i,n===void 0&&(n=this.emitter),this.noiseTexture&&(p.noiseTexture=this.noiseTexture.clone()),p.emitter=n,this.preventAutoStart||p.start(),p},t.prototype.serialize=function(e){e===void 0&&(e=!1);var n={};if(t._Serialize(n,this,e),n.textureMask=this.textureMask.asArray(),n.customShader=this.customShader,n.preventAutoStart=this.preventAutoStart,this.subEmitters){n.subEmitters=[],this._subEmitters||this._prepareSubEmitterInternalArray();for(var i=0,o=this._subEmitters;i0?p.shaderOptions.defines.join(` -`):"";d=a.createEffectForParticles(p.shaderPath.fragmentElement,p.shaderOptions.uniforms,p.shaderOptions.samplers,y)}var C=new t(s,e.capacity,n,d,e.isAnimationSheetEnabled);if(C.customShader=p,e.id&&(C.id=e.id),e.subEmitters){C.subEmitters=[];for(var M=0,U=e.subEmitters;M=life && stopFactor != 0.) { -vec3 newPosition; -vec3 newDirection; - -vec4 randoms=getRandomVec4(seed.x); - -outLife=lifeTime.x+(lifeTime.y-lifeTime.x)*randoms.r; -outAge=newAge-life; - -outSeed=seed; - -#ifdef SIZEGRADIENTS -outSize.x=texture(sizeGradientSampler,vec2(0,0)).r; -#else -outSize.x=sizeRange.x+(sizeRange.y-sizeRange.x)*randoms.g; -#endif -outSize.y=scaleRange.x+(scaleRange.y-scaleRange.x)*randoms.b; -outSize.z=scaleRange.z+(scaleRange.w-scaleRange.z)*randoms.a; -#ifndef COLORGRADIENTS - -outColor=color1+(color2-color1)*randoms.b; -#endif - -#ifndef ANGULARSPEEDGRADIENTS -outAngle.y=angleRange.x+(angleRange.y-angleRange.x)*randoms.a; -outAngle.x=angleRange.z+(angleRange.w-angleRange.z)*randoms.r; -#else -outAngle=angleRange.z+(angleRange.w-angleRange.z)*randoms.r; -#endif - -#ifdef POINTEMITTER -vec3 randoms2=getRandomVec3(seed.y); -vec3 randoms3=getRandomVec3(seed.z); -newPosition=vec3(0,0,0); -newDirection=direction1+(direction2-direction1)*randoms3; -#elif defined(BOXEMITTER) -vec3 randoms2=getRandomVec3(seed.y); -vec3 randoms3=getRandomVec3(seed.z); -newPosition=minEmitBox+(maxEmitBox-minEmitBox)*randoms2; -newDirection=direction1+(direction2-direction1)*randoms3; -#elif defined(HEMISPHERICEMITTER) -vec3 randoms2=getRandomVec3(seed.y); -vec3 randoms3=getRandomVec3(seed.z); - -float phi=2.0*PI*randoms2.x; -float theta=acos(2.0*randoms2.y-1.0); -float randX=cos(phi)*sin(theta); -float randY=cos(theta); -float randZ=sin(phi)*sin(theta); -newPosition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,abs(randY),randZ); -newDirection=newPosition+directionRandomizer*randoms3; -#elif defined(SPHEREEMITTER) -vec3 randoms2=getRandomVec3(seed.y); -vec3 randoms3=getRandomVec3(seed.z); - -float phi=2.0*PI*randoms2.x; -float theta=acos(2.0*randoms2.y-1.0); -float randX=cos(phi)*sin(theta); -float randY=cos(theta); -float randZ=sin(phi)*sin(theta); -newPosition=(radius-(radius*radiusRange*randoms2.z))*vec3(randX,randY,randZ); -#ifdef DIRECTEDSPHEREEMITTER -newDirection=direction1+(direction2-direction1)*randoms3; -#else - -newDirection=newPosition+directionRandomizer*randoms3; -#endif -#elif defined(CYLINDEREMITTER) -vec3 randoms2=getRandomVec3(seed.y); -vec3 randoms3=getRandomVec3(seed.z); - -float yPos=(randoms2.x-0.5)*height; -float angle=randoms2.y*PI*2.; -float inverseRadiusRangeSquared=((1.-radiusRange)*(1.-radiusRange)); -float positionRadius=radius*sqrt(inverseRadiusRangeSquared+(randoms2.z*(1.-inverseRadiusRangeSquared))); -float xPos=positionRadius*cos(angle); -float zPos=positionRadius*sin(angle); -newPosition=vec3(xPos,yPos,zPos); -#ifdef DIRECTEDCYLINDEREMITTER -newDirection=direction1+(direction2-direction1)*randoms3; -#else - -angle=angle+((randoms3.x-0.5)*PI); -newDirection=vec3(cos(angle),randoms3.y-0.5,sin(angle)); -newDirection=normalize(newDirection); -#endif -#elif defined(CONEEMITTER) -vec3 randoms2=getRandomVec3(seed.y); -float s=2.0*PI*randoms2.x; -#ifdef CONEEMITTERSPAWNPOINT -float h=0.0001; -#else -float h=randoms2.y*height.y; - -h=1.-h*h; -#endif -float lRadius=radius.x-radius.x*randoms2.z*radius.y; -lRadius=lRadius*h; -float randX=lRadius*sin(s); -float randZ=lRadius*cos(s); -float randY=h*height.x; -newPosition=vec3(randX,randY,randZ); - -if (abs(cos(coneAngle)) == 1.0) { -newDirection=vec3(0.,1.0,0.); -} else { -vec3 randoms3=getRandomVec3(seed.z); -newDirection=normalize(newPosition+directionRandomizer*randoms3); -} -#elif defined(CUSTOMEMITTER) -newPosition=initialPosition; -outInitialPosition=initialPosition; -#else - -newPosition=vec3(0.,0.,0.); - -newDirection=2.0*(getRandomVec3(seed.w)-vec3(0.5,0.5,0.5)); -#endif -float power=emitPower.x+(emitPower.y-emitPower.x)*randoms.a; -#ifdef LOCAL -outPosition=newPosition; -#else -outPosition=(emitterWM*vec4(newPosition,1.)).xyz; -#endif -#ifdef CUSTOMEMITTER -outDirection=direction; -#ifndef BILLBOARD -outInitialDirection=direction; -#endif -#else -#ifdef LOCAL -vec3 initial=newDirection; -#else -vec3 initial=(emitterWM*vec4(newDirection,0.)).xyz; -#endif -outDirection=initial*power; -#ifndef BILLBOARD -outInitialDirection=initial; -#endif -#endif -#ifdef ANIMATESHEET -outCellIndex=cellInfos.x; -#ifdef ANIMATESHEETRANDOMSTART -outCellStartOffset=randoms.a*outLife; -#endif -#endif -#ifdef NOISE -outNoiseCoordinates1=noiseCoordinates1; -outNoiseCoordinates2=noiseCoordinates2; -#endif -} else { -float directionScale=timeDelta; -outAge=newAge; -float ageGradient=newAge/life; -#ifdef VELOCITYGRADIENTS -directionScale*=texture(velocityGradientSampler,vec2(ageGradient,0)).r; -#endif -#ifdef DRAGGRADIENTS -directionScale*=1.0-texture(dragGradientSampler,vec2(ageGradient,0)).r; -#endif -#if defined(CUSTOMEMITTER) -outPosition=position+(direction-position)*ageGradient; -outInitialPosition=initialPosition; -#else -outPosition=position+direction*directionScale; -#endif -outLife=life; -outSeed=seed; -#ifndef COLORGRADIENTS -outColor=color; -#endif -#ifdef SIZEGRADIENTS -outSize.x=texture(sizeGradientSampler,vec2(ageGradient,0)).r; -outSize.yz=size.yz; -#else -outSize=size; -#endif -#ifndef BILLBOARD -outInitialDirection=initialDirection; -#endif -#ifdef CUSTOMEMITTER -outDirection=direction; -#else -vec3 updatedDirection=direction+gravity*timeDelta; -#ifdef LIMITVELOCITYGRADIENTS -float limitVelocity=texture(limitVelocityGradientSampler,vec2(ageGradient,0)).r; -float currentVelocity=length(updatedDirection); -if (currentVelocity>limitVelocity) { -updatedDirection=updatedDirection*limitVelocityDamping; -} -#endif -outDirection=updatedDirection; -#ifdef NOISE -float fetchedR=texture(noiseSampler,vec2(noiseCoordinates1.x,noiseCoordinates1.y)*vec2(0.5)+vec2(0.5)).r; -float fetchedG=texture(noiseSampler,vec2(noiseCoordinates1.z,noiseCoordinates2.x)*vec2(0.5)+vec2(0.5)).r; -float fetchedB=texture(noiseSampler,vec2(noiseCoordinates2.y,noiseCoordinates2.z)*vec2(0.5)+vec2(0.5)).r; -vec3 force=vec3(2.*fetchedR-1.,2.*fetchedG-1.,2.*fetchedB-1.)*noiseStrength; -outDirection=outDirection+force*timeDelta; -outNoiseCoordinates1=noiseCoordinates1; -outNoiseCoordinates2=noiseCoordinates2; -#endif -#endif -#ifdef ANGULARSPEEDGRADIENTS -float angularSpeed=texture(angularSpeedGradientSampler,vec2(ageGradient,0)).r; -outAngle=angle+angularSpeed*timeDelta; -#else -outAngle=vec2(angle.x+angle.y*timeDelta,angle.y); -#endif -#ifdef ANIMATESHEET -float offsetAge=outAge; -float dist=cellInfos.y-cellInfos.x; -#ifdef ANIMATESHEETRANDOMSTART -outCellStartOffset=cellStartOffset; -offsetAge+=cellStartOffset; -#else -float cellStartOffset=0.; -#endif -float ratio=clamp(mod(cellStartOffset+cellInfos.z*offsetAge,life)/life,0.,1.0); -outCellIndex=float(int(cellInfos.x+ratio*dist)); -#endif -} -}`;je.a.ShadersStore.gpuUpdateParticlesVertexShader=jm;var Hm=`#ifdef CLIPPLANE -in float fClipDistance; -#endif -#ifdef CLIPPLANE2 -in float fClipDistance2; -#endif -#ifdef CLIPPLANE3 -in float fClipDistance3; -#endif -#ifdef CLIPPLANE4 -in float fClipDistance4; -#endif -#ifdef CLIPPLANE5 -in float fClipDistance5; -#endif -#ifdef CLIPPLANE6 -in float fClipDistance6; -#endif`;je.a.IncludesShadersStore.clipPlaneFragmentDeclaration2=Hm;var Wm=`#version 300 es -uniform sampler2D diffuseSampler; -in vec2 vUV; -in vec4 vColor; -out vec4 outFragColor; -#include -#include -#include -#include -void main() { -#include -vec4 textureColor=texture(diffuseSampler,vUV); -outFragColor=textureColor*vColor; -#ifdef BLENDMULTIPLYMODE -float alpha=vColor.a*textureColor.a; -outFragColor.rgb=outFragColor.rgb*alpha+vec3(1.0)*(1.0-alpha); -#endif - - -#ifdef IMAGEPROCESSINGPOSTPROCESS -outFragColor.rgb=toLinearSpace(outFragColor.rgb); -#else -#ifdef IMAGEPROCESSING -outFragColor.rgb=toLinearSpace(outFragColor.rgb); -outFragColor=applyImageProcessing(outFragColor); -#endif -#endif -} -`;je.a.ShadersStore.gpuRenderParticlesPixelShader=Wm;var Xm=`#ifdef CLIPPLANE -uniform vec4 vClipPlane; -out float fClipDistance; -#endif -#ifdef CLIPPLANE2 -uniform vec4 vClipPlane2; -out float fClipDistance2; -#endif -#ifdef CLIPPLANE3 -uniform vec4 vClipPlane3; -out float fClipDistance3; -#endif -#ifdef CLIPPLANE4 -uniform vec4 vClipPlane4; -out float fClipDistance4; -#endif -#ifdef CLIPPLANE5 -uniform vec4 vClipPlane5; -out float fClipDistance5; -#endif -#ifdef CLIPPLANE6 -uniform vec4 vClipPlane6; -out float fClipDistance6; -#endif`;je.a.IncludesShadersStore.clipPlaneVertexDeclaration2=Xm;var Ym=`#version 300 es -uniform mat4 view; -uniform mat4 projection; -uniform vec2 translationPivot; -uniform vec3 worldOffset; -#ifdef LOCAL -uniform mat4 emitterWM; -#endif - -in vec3 position; -in float age; -in float life; -in vec3 size; -#ifndef BILLBOARD -in vec3 initialDirection; -#endif -#ifdef BILLBOARDSTRETCHED -in vec3 direction; -#endif -in float angle; -#ifdef ANIMATESHEET -in float cellIndex; -#endif -in vec2 offset; -in vec2 uv; -out vec2 vUV; -out vec4 vColor; -out vec3 vPositionW; -#if defined(BILLBOARD) && !defined(BILLBOARDY) && !defined(BILLBOARDSTRETCHED) -uniform mat4 invView; -#endif -#include -#ifdef COLORGRADIENTS -uniform sampler2D colorGradientSampler; -#else -uniform vec4 colorDead; -in vec4 color; -#endif -#ifdef ANIMATESHEET -uniform vec3 sheetInfos; -#endif -#ifdef BILLBOARD -uniform vec3 eyePosition; -#endif -vec3 rotate(vec3 yaxis,vec3 rotatedCorner) { -vec3 xaxis=normalize(cross(vec3(0.,1.0,0.),yaxis)); -vec3 zaxis=normalize(cross(yaxis,xaxis)); -vec3 row0=vec3(xaxis.x,xaxis.y,xaxis.z); -vec3 row1=vec3(yaxis.x,yaxis.y,yaxis.z); -vec3 row2=vec3(zaxis.x,zaxis.y,zaxis.z); -mat3 rotMatrix=mat3(row0,row1,row2); -vec3 alignedCorner=rotMatrix*rotatedCorner; -#ifdef LOCAL -return ((emitterWM*vec4(position,1.0)).xyz+worldOffset)+alignedCorner; -#else -return (position+worldOffset)+alignedCorner; -#endif -} -#ifdef BILLBOARDSTRETCHED -vec3 rotateAlign(vec3 toCamera,vec3 rotatedCorner) { -vec3 normalizedToCamera=normalize(toCamera); -vec3 normalizedCrossDirToCamera=normalize(cross(normalize(direction),normalizedToCamera)); -vec3 crossProduct=normalize(cross(normalizedToCamera,normalizedCrossDirToCamera)); -vec3 row0=vec3(normalizedCrossDirToCamera.x,normalizedCrossDirToCamera.y,normalizedCrossDirToCamera.z); -vec3 row1=vec3(crossProduct.x,crossProduct.y,crossProduct.z); -vec3 row2=vec3(normalizedToCamera.x,normalizedToCamera.y,normalizedToCamera.z); -mat3 rotMatrix=mat3(row0,row1,row2); -vec3 alignedCorner=rotMatrix*rotatedCorner; -#ifdef LOCAL -return ((emitterWM*vec4(position,1.0)).xyz+worldOffset)+alignedCorner; -#else -return (position+worldOffset)+alignedCorner; -#endif -} -#endif -void main() { -#ifdef ANIMATESHEET -float rowOffset=floor(cellIndex/sheetInfos.z); -float columnOffset=cellIndex-rowOffset*sheetInfos.z; -vec2 uvScale=sheetInfos.xy; -vec2 uvOffset=vec2(uv.x ,1.0-uv.y); -vUV=(uvOffset+vec2(columnOffset,rowOffset))*uvScale; -#else -vUV=uv; -#endif -float ratio=age/life; -#ifdef COLORGRADIENTS -vColor=texture(colorGradientSampler,vec2(ratio,0)); -#else -vColor=color*vec4(1.0-ratio)+colorDead*vec4(ratio); -#endif -vec2 cornerPos=(offset-translationPivot)*size.yz*size.x+translationPivot; -#ifdef BILLBOARD -vec4 rotatedCorner; -rotatedCorner.w=0.; -#ifdef BILLBOARDY -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -rotatedCorner.y=0.; -vec3 yaxis=(position+worldOffset)-eyePosition; -yaxis.y=0.; -vPositionW=rotate(normalize(yaxis),rotatedCorner.xyz); -vec4 viewPosition=(view*vec4(vPositionW,1.0)); -#elif defined(BILLBOARDSTRETCHED) -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -rotatedCorner.z=0.; -vec3 toCamera=(position+worldOffset)-eyePosition; -vPositionW=rotateAlign(toCamera,rotatedCorner.xyz); -vec4 viewPosition=(view*vec4(vPositionW,1.0)); -#else - -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -rotatedCorner.z=0.; - -#ifdef LOCAL -vec4 viewPosition=view*vec4(((emitterWM*vec4(position,1.0)).xyz+worldOffset),1.0)+rotatedCorner; -#else -vec4 viewPosition=view*vec4((position+worldOffset),1.0)+rotatedCorner; -#endif -vPositionW=(invView*viewPosition).xyz; -#endif -#else - -vec3 rotatedCorner; -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.y=0.; -rotatedCorner.z=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -vec3 yaxis=normalize(initialDirection); -vPositionW=rotate(yaxis,rotatedCorner); - -vec4 viewPosition=view*vec4(vPositionW,1.0); -#endif -gl_Position=projection*viewPosition; - -#if defined(CLIPPLANE) || defined(CLIPPLANE2) || defined(CLIPPLANE3) || defined(CLIPPLANE4) || defined(CLIPPLANE5) || defined(CLIPPLANE6) -vec4 worldPos=vec4(vPositionW,1.0); -#endif -#include -}`;je.a.ShadersStore.gpuRenderParticlesVertexShader=Ym;var ar=function(r){function t(e,n,i,o,a){o===void 0&&(o=!1),a===void 0&&(a=null);var s=r.call(this,e)||this;s.layerMask=268435455,s._accumulatedCount=0,s._targetIndex=0,s._currentRenderId=-1,s._started=!1,s._stopped=!1,s._timeDelta=0,s._actualFrame=0,s._rawTextureWidth=256,s.onDisposeObservable=new P.c,s.onStoppedObservable=new P.c,s.forceDepthWrite=!1,s._preWarmDone=!1,s.isLocal=!1,s._onBeforeDrawParticlesObservable=null,i&&i.getClassName()!=="Scene"?(s._engine=i,s.defaultProjectionMatrix=l.a.PerspectiveFovLH(.8,1,.1,100)):(s._scene=i||te.a.LastCreatedScene,s._engine=s._scene.getEngine(),s.uniqueId=s._scene.getUniqueId(),s._scene.particleSystems.push(s)),s._customEffect={0:a},s._attachImageProcessingConfiguration(null),n.randomTextureSize||delete n.randomTextureSize;var d=Object(c.a)({capacity:5e4,randomTextureSize:s._engine.getCaps().maxTextureSize},n),p=n;isFinite(p)&&(d.capacity=p),s._capacity=d.capacity,s._activeCount=d.capacity,s._currentActiveCount=0,s._isAnimationSheetEnabled=o,s._updateEffectOptions={attributes:["position","initialPosition","age","life","seed","size","color","direction","initialDirection","angle","cellIndex","cellStartOffset","noiseCoordinates1","noiseCoordinates2"],uniformsNames:["currentCount","timeDelta","emitterWM","lifeTime","color1","color2","sizeRange","scaleRange","gravity","emitPower","direction1","direction2","minEmitBox","maxEmitBox","radius","directionRandomizer","height","coneAngle","stopFactor","angleRange","radiusRange","cellInfos","noiseStrength","limitVelocityDamping"],uniformBuffersNames:[],samplers:["randomSampler","randomSampler2","sizeGradientSampler","angularSpeedGradientSampler","velocityGradientSampler","limitVelocityGradientSampler","noiseSampler","dragGradientSampler"],defines:"",fallbacks:null,onCompiled:null,onError:null,indexParameters:null,maxSimultaneousLights:0,transformFeedbackVaryings:[]},s.particleEmitterType=new wr;for(var y=Math.min(s._engine.getCaps().maxTextureSize,d.randomTextureSize),C=[],M=0;M1},enumerable:!1,configurable:!0}),t.prototype.getCapacity=function(){return this._capacity},Object.defineProperty(t.prototype,"activeParticleCount",{get:function(){return this._activeCount},set:function(e){this._activeCount=Math.min(e,this._capacity)},enumerable:!1,configurable:!0}),t.prototype.isReady=function(){return this._updateEffect?!!(this.emitter&&this._updateEffect.isReady()&&(!this._imageProcessingConfiguration||this._imageProcessingConfiguration.isReady())&&this._getEffect().isReady()&&this.particleTexture&&this.particleTexture.isReady()):(this._recreateUpdateEffect(),this._recreateRenderEffect(),!1)},t.prototype.isStarted=function(){return this._started},t.prototype.isStopped=function(){return this._stopped},t.prototype.isStopping=function(){return!1},t.prototype.getActiveCount=function(){return this._currentActiveCount},t.prototype.start=function(e){var n=this;if(e===void 0&&(e=this.startDelay),!this.targetStopDuration&&this._hasTargetStopDurationDependantGradient())throw"Particle system started with a targetStopDuration dependant gradient (eg. startSizeGradients) but no targetStopDuration set";e?setTimeout(function(){n.start(0)},e):(this._started=!0,this._stopped=!1,this._preWarmDone=!1,this.beginAnimationOnStart&&this.animations&&this.animations.length>0&&this._scene&&this._scene.beginAnimation(this,this.beginAnimationFrom,this.beginAnimationTo,this.beginAnimationLoop))},t.prototype.stop=function(){this._stopped||(this._stopped=!0)},t.prototype.reset=function(){this._releaseBuffers(),this._releaseVAOs(),this._currentActiveCount=0,this._targetIndex=0},t.prototype.getClassName=function(){return"GPUParticleSystem"},t.prototype.getCustomEffect=function(e){var n;return e===void 0&&(e=0),(n=this._customEffect[e])!==null&&n!==void 0?n:this._customEffect[0]},t.prototype.setCustomEffect=function(e,n){n===void 0&&(n=0),this._customEffect[n]=e},Object.defineProperty(t.prototype,"onBeforeDrawParticlesObservable",{get:function(){return this._onBeforeDrawParticlesObservable||(this._onBeforeDrawParticlesObservable=new P.c),this._onBeforeDrawParticlesObservable},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vertexShaderName",{get:function(){return"gpuRenderParticles"},enumerable:!1,configurable:!0}),t.prototype._removeGradientAndTexture=function(e,n,i){return r.prototype._removeGradientAndTexture.call(this,e,n,i),this._releaseBuffers(),this},t.prototype.addColorGradient=function(e,n,i){this._colorGradients||(this._colorGradients=[]);var o=new Fc(e,n);return this._colorGradients.push(o),this._refreshColorGradient(!0),this._releaseBuffers(),this},t.prototype._refreshColorGradient=function(e){e===void 0&&(e=!1),this._colorGradients&&(e&&this._colorGradients.sort(function(n,i){return n.gradienti.gradient?1:0}),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null))},t.prototype.forceRefreshGradients=function(){this._refreshColorGradient(),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture"),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture"),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture"),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture"),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture"),this.reset()},t.prototype.removeColorGradient=function(e){return this._removeGradientAndTexture(e,this._colorGradients,this._colorGradientsTexture),this._colorGradientsTexture=null,this},t.prototype._addFactorGradient=function(e,n,i){var o=new Bc(n,i);e.push(o),this._releaseBuffers()},t.prototype.addSizeGradient=function(e,n){return this._sizeGradients||(this._sizeGradients=[]),this._addFactorGradient(this._sizeGradients,e,n),this._refreshFactorGradient(this._sizeGradients,"_sizeGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeSizeGradient=function(e){return this._removeGradientAndTexture(e,this._sizeGradients,this._sizeGradientsTexture),this._sizeGradientsTexture=null,this},t.prototype._refreshFactorGradient=function(e,n,i){i===void 0&&(i=!1),e&&(i&&e.sort(function(o,a){return o.gradienta.gradient?1:0}),this[n]&&(this[n].dispose(),this[n]=null))},t.prototype.addAngularSpeedGradient=function(e,n){return this._angularSpeedGradients||(this._angularSpeedGradients=[]),this._addFactorGradient(this._angularSpeedGradients,e,n),this._refreshFactorGradient(this._angularSpeedGradients,"_angularSpeedGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeAngularSpeedGradient=function(e){return this._removeGradientAndTexture(e,this._angularSpeedGradients,this._angularSpeedGradientsTexture),this._angularSpeedGradientsTexture=null,this},t.prototype.addVelocityGradient=function(e,n){return this._velocityGradients||(this._velocityGradients=[]),this._addFactorGradient(this._velocityGradients,e,n),this._refreshFactorGradient(this._velocityGradients,"_velocityGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._velocityGradients,this._velocityGradientsTexture),this._velocityGradientsTexture=null,this},t.prototype.addLimitVelocityGradient=function(e,n){return this._limitVelocityGradients||(this._limitVelocityGradients=[]),this._addFactorGradient(this._limitVelocityGradients,e,n),this._refreshFactorGradient(this._limitVelocityGradients,"_limitVelocityGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeLimitVelocityGradient=function(e){return this._removeGradientAndTexture(e,this._limitVelocityGradients,this._limitVelocityGradientsTexture),this._limitVelocityGradientsTexture=null,this},t.prototype.addDragGradient=function(e,n){return this._dragGradients||(this._dragGradients=[]),this._addFactorGradient(this._dragGradients,e,n),this._refreshFactorGradient(this._dragGradients,"_dragGradientsTexture",!0),this._releaseBuffers(),this},t.prototype.removeDragGradient=function(e){return this._removeGradientAndTexture(e,this._dragGradients,this._dragGradientsTexture),this._dragGradientsTexture=null,this},t.prototype.addEmitRateGradient=function(e,n,i){return this},t.prototype.removeEmitRateGradient=function(e){return this},t.prototype.addStartSizeGradient=function(e,n,i){return this},t.prototype.removeStartSizeGradient=function(e){return this},t.prototype.addColorRemapGradient=function(e,n,i){return this},t.prototype.removeColorRemapGradient=function(){return this},t.prototype.addAlphaRemapGradient=function(e,n,i){return this},t.prototype.removeAlphaRemapGradient=function(){return this},t.prototype.addRampGradient=function(e,n){return this},t.prototype.removeRampGradient=function(){return this},t.prototype.getRampGradients=function(){return null},Object.defineProperty(t.prototype,"useRampGradients",{get:function(){return!1},set:function(e){},enumerable:!1,configurable:!0}),t.prototype.addLifeTimeGradient=function(e,n,i){return this},t.prototype.removeLifeTimeGradient=function(e){return this},t.prototype._reset=function(){this._releaseBuffers()},t.prototype._createUpdateVAO=function(e){var n={};n.position=e.createVertexBuffer("position",0,3);var i=3;this.particleEmitterType instanceof Fr&&(n.initialPosition=e.createVertexBuffer("initialPosition",i,3),i+=3),n.age=e.createVertexBuffer("age",i,1),i+=1,n.life=e.createVertexBuffer("life",i,1),i+=1,n.seed=e.createVertexBuffer("seed",i,4),i+=4,n.size=e.createVertexBuffer("size",i,3),i+=3,this._colorGradientsTexture||(n.color=e.createVertexBuffer("color",i,4),i+=4),n.direction=e.createVertexBuffer("direction",i,3),i+=3,this._isBillboardBased||(n.initialDirection=e.createVertexBuffer("initialDirection",i,3),i+=3),this._angularSpeedGradientsTexture?(n.angle=e.createVertexBuffer("angle",i,1),i+=1):(n.angle=e.createVertexBuffer("angle",i,2),i+=2),this._isAnimationSheetEnabled&&(n.cellIndex=e.createVertexBuffer("cellIndex",i,1),i+=1,this.spriteRandomStartCell&&(n.cellStartOffset=e.createVertexBuffer("cellStartOffset",i,1),i+=1)),this.noiseTexture&&(n.noiseCoordinates1=e.createVertexBuffer("noiseCoordinates1",i,3),i+=3,n.noiseCoordinates2=e.createVertexBuffer("noiseCoordinates2",i,3),i+=3);var o=this._engine.recordVertexArrayObject(n,null,this._updateEffect);return this._engine.bindArrayBuffer(null),o},t.prototype._createRenderVAO=function(e,n){var i={};i.position=e.createVertexBuffer("position",0,3,this._attributesStrideSize,!0);var o=3;this.particleEmitterType instanceof Fr&&(o+=3),i.age=e.createVertexBuffer("age",o,1,this._attributesStrideSize,!0),o+=1,i.life=e.createVertexBuffer("life",o,1,this._attributesStrideSize,!0),o+=5,i.size=e.createVertexBuffer("size",o,3,this._attributesStrideSize,!0),o+=3,this._colorGradientsTexture||(i.color=e.createVertexBuffer("color",o,4,this._attributesStrideSize,!0),o+=4),this.billboardMode===hn.BILLBOARDMODE_STRETCHED&&(i.direction=e.createVertexBuffer("direction",o,3,this._attributesStrideSize,!0)),o+=3,this._isBillboardBased||(i.initialDirection=e.createVertexBuffer("initialDirection",o,3,this._attributesStrideSize,!0),o+=3),i.angle=e.createVertexBuffer("angle",o,1,this._attributesStrideSize,!0),this._angularSpeedGradientsTexture?o++:o+=2,this._isAnimationSheetEnabled&&(i.cellIndex=e.createVertexBuffer("cellIndex",o,1,this._attributesStrideSize,!0),o+=1,this.spriteRandomStartCell&&(i.cellStartOffset=e.createVertexBuffer("cellStartOffset",o,1,this._attributesStrideSize,!0),o+=1)),this.noiseTexture&&(i.noiseCoordinates1=e.createVertexBuffer("noiseCoordinates1",o,3,this._attributesStrideSize,!0),o+=3,i.noiseCoordinates2=e.createVertexBuffer("noiseCoordinates2",o,3,this._attributesStrideSize,!0),o+=3),i.offset=n.createVertexBuffer("offset",0,2),i.uv=n.createVertexBuffer("uv",2,2);var a=this._engine.recordVertexArrayObject(i,null,this._getEffect());return this._engine.bindArrayBuffer(null),a},t.prototype._initialize=function(e){if(e===void 0&&(e=!1),!this._buffer0||e){var n=this._engine,i=new Array;this._attributesStrideSize=21,this._targetIndex=0,this.particleEmitterType instanceof Fr&&(this._attributesStrideSize+=3),this.isBillboardBased||(this._attributesStrideSize+=3),this._colorGradientsTexture&&(this._attributesStrideSize-=4),this._angularSpeedGradientsTexture&&(this._attributesStrideSize-=1),this._isAnimationSheetEnabled&&(this._attributesStrideSize+=1,this.spriteRandomStartCell&&(this._attributesStrideSize+=1)),this.noiseTexture&&(this._attributesStrideSize+=6);for(var o=this.particleEmitterType instanceof Fr,a=l.c.Vector3[0],s=0;s=this.targetStopDuration&&this.stop()},t.prototype._createFactorGradientTexture=function(e,n){var i=this[n];if(e&&e.length&&!i){for(var o=new Float32Array(this._rawTextureWidth),a=0;a1){var a=0|this._accumulatedCount;this._accumulatedCount-=a,this._currentActiveCount=Math.min(this._activeCount,this._currentActiveCount+a)}if(!this._currentActiveCount)return 0;this._engine.enableEffect(this._updateEffect);var s,d=this._engine;if(!d.setState)throw new Error("GPU particles cannot work with a full Engine. ThinEngine is not supported");if(this._updateEffect.setFloat("currentCount",this._currentActiveCount),this._updateEffect.setFloat("timeDelta",this._timeDelta),this._updateEffect.setFloat("stopFactor",this._stopped?0:1),this._updateEffect.setTexture("randomSampler",this._randomTexture),this._updateEffect.setTexture("randomSampler2",this._randomTexture2),this._updateEffect.setFloat2("lifeTime",this.minLifeTime,this.maxLifeTime),this._updateEffect.setFloat2("emitPower",this.minEmitPower,this.maxEmitPower),this._colorGradientsTexture||(this._updateEffect.setDirectColor4("color1",this.color1),this._updateEffect.setDirectColor4("color2",this.color2)),this._updateEffect.setFloat2("sizeRange",this.minSize,this.maxSize),this._updateEffect.setFloat4("scaleRange",this.minScaleX,this.maxScaleX,this.minScaleY,this.maxScaleY),this._updateEffect.setFloat4("angleRange",this.minAngularSpeed,this.maxAngularSpeed,this.minInitialRotation,this.maxInitialRotation),this._updateEffect.setVector3("gravity",this.gravity),this._sizeGradientsTexture&&this._updateEffect.setTexture("sizeGradientSampler",this._sizeGradientsTexture),this._angularSpeedGradientsTexture&&this._updateEffect.setTexture("angularSpeedGradientSampler",this._angularSpeedGradientsTexture),this._velocityGradientsTexture&&this._updateEffect.setTexture("velocityGradientSampler",this._velocityGradientsTexture),this._limitVelocityGradientsTexture&&(this._updateEffect.setTexture("limitVelocityGradientSampler",this._limitVelocityGradientsTexture),this._updateEffect.setFloat("limitVelocityDamping",this.limitVelocityDamping)),this._dragGradientsTexture&&this._updateEffect.setTexture("dragGradientSampler",this._dragGradientsTexture),this.particleEmitterType&&this.particleEmitterType.applyToShader(this._updateEffect),this._isAnimationSheetEnabled&&this._updateEffect.setFloat3("cellInfos",this.startSpriteCellID,this.endSpriteCellID,this.spriteCellChangeSpeed),this.noiseTexture&&(this._updateEffect.setTexture("noiseSampler",this.noiseTexture),this._updateEffect.setVector3("noiseStrength",this.noiseStrength)),this.emitter.position)s=this.emitter.getWorldMatrix();else{var p=this.emitter;s=l.a.Translation(p.x,p.y,p.z)}if(this.isLocal||this._updateEffect.setMatrix("emitterWM",s),this._engine.bindVertexArrayObject(this._updateVAO[this._targetIndex],null),d.bindTransformFeedbackBuffer(this._targetBuffer.getBuffer()),d.setRasterizerState(!1),d.beginTransformFeedback(!0),d.drawArraysType(h.a.MATERIAL_PointListDrawMode,0,this._currentActiveCount),d.endTransformFeedback(),d.setRasterizerState(!0),d.bindTransformFeedbackBuffer(null),!e){var y=this._getEffect();this._engine.enableEffect(y);var C=((n=this._scene)===null||n===void 0?void 0:n.getViewMatrix())||l.a.IdentityReadOnly;if(y.setMatrix("view",C),y.setMatrix("projection",(i=this.defaultProjectionMatrix)!==null&&i!==void 0?i:this._scene.getProjectionMatrix()),y.setTexture("diffuseSampler",this.particleTexture),y.setVector2("translationPivot",this.translationPivot),y.setVector3("worldOffset",this.worldOffset),this.isLocal&&y.setMatrix("emitterWM",s),this._colorGradientsTexture?y.setTexture("colorGradientSampler",this._colorGradientsTexture):y.setDirectColor4("colorDead",this.colorDead),this._isAnimationSheetEnabled&&this.particleTexture){var M=this.particleTexture.getBaseSize();y.setFloat3("sheetInfos",this.spriteCellWidth/M.width,this.spriteCellHeight/M.height,M.width/this.spriteCellWidth)}if(this._isBillboardBased&&this._scene){var U=this._scene.activeCamera;y.setVector3("eyePosition",U.globalPosition)}var F=y.defines;if(this._scene&&(this._scene.clipPlane||this._scene.clipPlane2||this._scene.clipPlane3||this._scene.clipPlane4||this._scene.clipPlane5||this._scene.clipPlane6)&&tt.a.BindClipPlane(y,this._scene),F.indexOf("#define BILLBOARDMODE_ALL")>=0){var z=C.clone();z.invert(),y.setMatrix("invView",z)}switch(this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(y),this.blendMode){case hn.BLENDMODE_ADD:this._engine.setAlphaMode(h.a.ALPHA_ADD);break;case hn.BLENDMODE_ONEONE:this._engine.setAlphaMode(h.a.ALPHA_ONEONE);break;case hn.BLENDMODE_STANDARD:this._engine.setAlphaMode(h.a.ALPHA_COMBINE);break;case hn.BLENDMODE_MULTIPLY:this._engine.setAlphaMode(h.a.ALPHA_MULTIPLY)}this.forceDepthWrite&&d.setDepthWrite(!0),this._engine.bindVertexArrayObject(this._renderVAO[this._targetIndex],null),this._onBeforeDrawParticlesObservable&&this._onBeforeDrawParticlesObservable.notifyObservers(y),this._engine.drawArraysType(h.a.MATERIAL_TriangleFanDrawMode,0,4,this._currentActiveCount),this._engine.setAlphaMode(h.a.ALPHA_DISABLE)}this._targetIndex++,this._targetIndex===2&&(this._targetIndex=0);var J=this._sourceBuffer;return this._sourceBuffer=this._targetBuffer,this._targetBuffer=J,this._currentActiveCount},t.prototype.rebuild=function(){this._initialize(!0)},t.prototype._releaseBuffers=function(){this._buffer0&&(this._buffer0.dispose(),this._buffer0=null),this._buffer1&&(this._buffer1.dispose(),this._buffer1=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null)},t.prototype._releaseVAOs=function(){if(this._updateVAO){for(var e=0;e-1&&this._scene.particleSystems.splice(n,1)}this._releaseBuffers(),this._releaseVAOs(),this._colorGradientsTexture&&(this._colorGradientsTexture.dispose(),this._colorGradientsTexture=null),this._sizeGradientsTexture&&(this._sizeGradientsTexture.dispose(),this._sizeGradientsTexture=null),this._angularSpeedGradientsTexture&&(this._angularSpeedGradientsTexture.dispose(),this._angularSpeedGradientsTexture=null),this._velocityGradientsTexture&&(this._velocityGradientsTexture.dispose(),this._velocityGradientsTexture=null),this._limitVelocityGradientsTexture&&(this._limitVelocityGradientsTexture.dispose(),this._limitVelocityGradientsTexture=null),this._dragGradientsTexture&&(this._dragGradientsTexture.dispose(),this._dragGradientsTexture=null),this._randomTexture&&(this._randomTexture.dispose(),this._randomTexture=null),this._randomTexture2&&(this._randomTexture2.dispose(),this._randomTexture2=null),e&&this.particleTexture&&(this.particleTexture.dispose(),this.particleTexture=null),e&&this.noiseTexture&&(this.noiseTexture.dispose(),this.noiseTexture=null),this.onStoppedObservable.clear(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear()},t.prototype.clone=function(e,n){var i=this.serialize(),o=t.Parse(i,this._scene||this._engine,""),a=Object(c.a)({},this._customEffect);return o.name=e,o._customEffect=a,n===void 0&&(n=this.emitter),o.emitter=n,o.noiseTexture=this.noiseTexture,o},t.prototype.serialize=function(e){e===void 0&&(e=!1);var n={};return hn._Serialize(n,this,e),n.activeParticleCount=this.activeParticleCount,n.randomTextureSize=this._randomTextureSize,n},t.Parse=function(e,n,i,o){o===void 0&&(o=!1);var a=new t(e.name,{capacity:e.capacity,randomTextureSize:e.randomTextureSize},n);return e.activeParticleCount&&(a.activeParticleCount=e.activeParticleCount),hn._Parse(e,a,n,i),e.preventAutoStart&&(a.preventAutoStart=e.preventAutoStart),o||a.preventAutoStart||a.start(),a},t}(To),xa=function(){function r(){this.systems=new Array}return Object.defineProperty(r.prototype,"emitterNode",{get:function(){return this._emitterNode},enumerable:!1,configurable:!0}),r.prototype.setEmitterAsSphere=function(t,e,n){this._emitterNode&&this._emitterNode.dispose(),this._emitterCreationOptions={kind:"Sphere",options:t,renderingGroupId:e};var i=Vn.a.CreateSphere("emitterSphere",{diameter:t.diameter,segments:t.segments},n);i.renderingGroupId=e;var o=new Ft.a("emitterSphereMaterial",n);o.emissiveColor=t.color,i.material=o;for(var a=0,s=this.systems;a0&&n.set(this._uvs32,Me.b.UVKind),this._colors32.length>0&&n.set(this._colors32,Me.b.ColorKind),n.applyToMesh(this.mesh,this._updatable),this.mesh.isPickable=this._pickable,this._pickable){for(var i=0,o=0;oU?U:i,n=Math.round(U/i),o=0):n=n>U?U:n;for(var F=[],z=[],J=[],ie=[],se=[],ce=l.e.Zero(),ue=n;MU-(n=ue+Math.floor((1+o)*Math.random()))&&(n=U-M),F.length=0,z.length=0,J.length=0,ie.length=0,se.length=0;for(var fe=0,ve=3*M;ve<3*(M+n);ve++){J.push(fe);var Te=s[ve],Oe=3*Te;if(F.push(a[Oe],a[Oe+1],a[Oe+2]),z.push(y[Oe],y[Oe+1],y[Oe+2]),d){var Pe=2*Te;ie.push(d[Pe],d[Pe+1])}if(p){var Ee=4*Te;se.push(p[Ee],p[Ee+1],p[Ee+2],p[Ee+3])}fe++}var Se,Le=this.nbParticles,xe=this._posToShape(F),Ne=this._uvsToShapeUV(ie),Ie=Ye.b.Slice(J),Fe=Ye.b.Slice(se),Ke=Ye.b.Slice(z);for(ce.copyFromFloats(0,0,0),Se=0;Se65535&&(this._needs32Bits=!0)}if(this._depthSort||this._multimaterialEnabled){var at=fe.materialIndex!==null?fe.materialIndex:0;this.depthSortedParticles.push(new Rd(U,e,o.length,at))}return fe},r.prototype._posToShape=function(t){for(var e=[],n=0;n=this.nbParticles||!this._updatable)return[];var i=this.particles,o=this.nbParticles;if(e=this.nbParticles?this.nbParticles-1:e,this._computeBoundingBox&&(t!=0||e!=this.nbParticles-1)){var nt=this.mesh._boundingInfo;nt&&(se.copyFrom(nt.minimum),ce.copyFrom(nt.maximum))}var rt=(Le=this.particles[t]._pos)/3|0;Ne=4*rt,Fe=2*rt;for(var ut=t;ut<=e;ut++){var qe=this.particles[ut];this.updateParticle(qe);var at=qe._model._shape,ot=qe._model._shapeUV,Je=qe._rotationMatrix,dt=qe.position,ke=qe.rotation,$e=qe.scaling,yt=qe._globalPosition;if(this._depthSort&&this._depthSortParticles){var Wt=this.depthSortedParticles[ut];Wt.idx=qe.idx,Wt.ind=qe._ind,Wt.indicesLength=qe._model._indicesLength,Wt.sqDistance=l.e.DistanceSquared(qe.position,ue)}if(!qe.alive||qe._stillInvisible&&!qe.isVisible)Le+=3*(Ke=at.length),Ne+=4*Ke,Fe+=2*Ke;else{if(qe.isVisible){qe._stillInvisible=!1;var Nt=F[12];if(qe.pivot.multiplyToRef($e,Nt),this.billboard&&(ke.x=0,ke.y=0),(this._computeParticleRotation||this.billboard)&&qe.getRotationMatrix(i),qe.parentId!==null){var Qt=this.getParticleById(qe.parentId);if(Qt){var vt=Qt._rotationMatrix,Jt=Qt._globalPosition,Xt=dt.x*vt[1]+dt.y*vt[4]+dt.z*vt[7],zt=dt.x*vt[0]+dt.y*vt[3]+dt.z*vt[6],Yt=dt.x*vt[2]+dt.y*vt[5]+dt.z*vt[8];if(yt.x=Jt.x+zt,yt.y=Jt.y+Xt,yt.z=Jt.z+Yt,this._computeParticleRotation||this.billboard){var Et=i.m;Je[0]=Et[0]*vt[0]+Et[1]*vt[3]+Et[2]*vt[6],Je[1]=Et[0]*vt[1]+Et[1]*vt[4]+Et[2]*vt[7],Je[2]=Et[0]*vt[2]+Et[1]*vt[5]+Et[2]*vt[8],Je[3]=Et[4]*vt[0]+Et[5]*vt[3]+Et[6]*vt[6],Je[4]=Et[4]*vt[1]+Et[5]*vt[4]+Et[6]*vt[7],Je[5]=Et[4]*vt[2]+Et[5]*vt[5]+Et[6]*vt[8],Je[6]=Et[8]*vt[0]+Et[9]*vt[3]+Et[10]*vt[6],Je[7]=Et[8]*vt[1]+Et[9]*vt[4]+Et[10]*vt[7],Je[8]=Et[8]*vt[2]+Et[9]*vt[5]+Et[10]*vt[8]}}else qe.parentId=null}else yt.x=dt.x,yt.y=dt.y,yt.z=dt.z,(this._computeParticleRotation||this.billboard)&&(Et=i.m,Je[0]=Et[0],Je[1]=Et[1],Je[2]=Et[2],Je[3]=Et[4],Je[4]=Et[5],Je[5]=Et[6],Je[6]=Et[8],Je[7]=Et[9],Je[8]=Et[10]);var Mt=F[11];for(qe.translateFromPivot?Mt.setAll(0):Mt.copyFrom(Nt),Ke=0;Ke0)for(var e=0;e0&&t.set(this._uvs32,Me.b.UVKind);var e=0;this._colors32.length>0&&(e=1,t.set(this._colors32,Me.b.ColorKind));var n=new De.a(this.name,this._scene);t.applyToMesh(n,this._updatable),this.mesh=n,this._positions=null,this._uvs=null,this._colors=null,this._updatable||(this.particles.length=0);var i=new Ft.a("point cloud material",this._scene);return i.emissiveColor=new O.a(e,e,e),i.disableLighting=!0,i.pointsCloud=!0,i.pointSize=this._size,n.material=i,new Promise(function(o){return o(n)})},r.prototype._addParticle=function(t,e,n,i){var o=new Md(t,e,n,i,this);return this.particles.push(o),o},r.prototype._randomUnitVector=function(t){t.position=new l.e(Math.random(),Math.random(),Math.random()),t.color=new O.b(1,1,1,1)},r.prototype._getColorIndicesForCoord=function(t,e,n,i){var o=t._groupImageData,a=n*(4*i)+4*e,s=[a,a+1,a+2,a+3],d=s[1],p=s[2],y=s[3],C=o[s[0]],M=o[d],U=o[p],F=o[y];return new O.b(C/255,M/255,U/255,F)},r.prototype._setPointsColorOrUV=function(t,e,n,i,o,a,s){n&&t.updateFacetData();var d=2*t.getBoundingInfo().boundingSphere.radius,p=t.getVerticesData(Me.b.PositionKind),y=t.getIndices(),C=t.getVerticesData(Me.b.UVKind),M=t.getVerticesData(Me.b.ColorKind),U=l.e.Zero();t.computeWorldMatrix();var F=t.getWorldMatrix();if(!F.isIdentity())for(var z=0;z1&&(Qi=1),(qi=Qr.b+Yr)<0&&(qi=0),qi>1&&(qi=1),O.a.HSVtoRGBToRef(Kr,Qi,qi,hr),jt.set(hr.r,hr.g,hr.b,1)):jt=qt.set(Math.random(),Math.random(),Math.random(),1),Bn.color=new O.b(jt.x,jt.y,jt.z,jt.w),this._colors.push(jt.x,jt.y,jt.z,jt.w))}},r.prototype._colorFromTexture=function(t,e,n){var i=this;if(t.material===null)return u.a.Warn(t.name+"has no material."),e._groupImageData=null,void this._setPointsColorOrUV(t,e,n,!0,!1);var o=t.material.getActiveTextures();if(o.length===0)return u.a.Warn(t.name+"has no useable texture."),e._groupImageData=null,void this._setPointsColorOrUV(t,e,n,!0,!1);var a=t.clone();a.setEnabled(!1),this._promises.push(new Promise(function(s){Wn.a.WhenAllReady(o,function(){var d=e._textureNb;return d<0&&(d=0),d>o.length-1&&(d=o.length-1),e._groupImageData=o[d].readPixels(),e._groupImgWidth=o[d].getSize().width,e._groupImgHeight=o[d].getSize().height,i._setPointsColorOrUV(a,e,n,!0,!0),a.dispose(),s()})}))},r.prototype._calculateDensity=function(t,e,n){for(var i,o,a,s,d,p,y,C,M,U,F,z,J,ie,se,ce,ue,fe=new Array,ve=l.e.Zero(),Te=l.e.Zero(),Oe=l.e.Zero(),Pe=l.e.Zero(),Ee=l.e.Zero(),Se=l.e.Zero(),Le=new Array,xe=0,Ne=n.length/3,Ie=0;Ie0&&(fe=fe.map(function(ut){return ut+nt})),Ie=0;Ie3)&&(a=En.Random);var s=t.getVerticesData(Me.b.PositionKind),d=t.getIndices();this._groups.push(this._groupCounter);var p=new Ra(this._groupCounter,null);switch(p._groupDensity=this._calculateDensity(e,s,d),a===En.Color?p._textureNb=i||0:i=i||new O.b(1,1,1,1),a){case En.Color:this._colorFromTexture(t,p,!1);break;case En.UV:this._setPointsColorOrUV(t,p,!1,!1,!1);break;case En.Random:this._setPointsColorOrUV(t,p,!1);break;case En.Stated:this._setPointsColorOrUV(t,p,!1,void 0,void 0,i,o)}return this.nbParticles+=e,this._groupCounter++,this._groupCounter-1},r.prototype.addVolumePoints=function(t,e,n,i,o){var a=n||En.Random;(isNaN(a)||a<0||a>3)&&(a=En.Random);var s=t.getVerticesData(Me.b.PositionKind),d=t.getIndices();this._groups.push(this._groupCounter);var p=new Ra(this._groupCounter,null);switch(p._groupDensity=this._calculateDensity(e,s,d),a===En.Color?p._textureNb=i||0:i=i||new O.b(1,1,1,1),a){case En.Color:this._colorFromTexture(t,p,!0);break;case En.UV:this._setPointsColorOrUV(t,p,!0,!1,!1);break;case En.Random:this._setPointsColorOrUV(t,p,!0);break;case En.Stated:this._setPointsColorOrUV(t,p,!0,void 0,void 0,i,o)}return this.nbParticles+=e,this._groupCounter++,this._groupCounter-1},r.prototype.setParticles=function(t,e,n){if(t===void 0&&(t=0),e===void 0&&(e=this.nbParticles-1),n===void 0&&(n=!0),!this._updatable||!this._isReady)return this;this.beforeUpdateParticles(t,e,n);var i=l.c.Matrix[0],o=this.mesh,a=this._colors32,s=this._positions32,d=this._uvs32,p=l.c.Vector3,y=p[5].copyFromFloats(1,0,0),C=p[6].copyFromFloats(0,1,0),M=p[7].copyFromFloats(0,0,1),U=p[8].setAll(Number.MAX_VALUE),F=p[9].setAll(-Number.MAX_VALUE);l.a.IdentityToRef(i);var z=0;if(this.mesh.isFacetDataEnabled&&(this._computeBoundingBox=!0),e=e>=this.nbParticles?this.nbParticles-1:e,this._computeBoundingBox&&(t!=0||e!=this.nbParticles-1)){var J=this.mesh._boundingInfo;J&&(U.copyFrom(J.minimum),F.copyFrom(J.maximum))}z=0;for(var ie=0,se=0,ce=0,ue=t;ue<=e;ue++){var fe=this.particles[ue];ie=3*(z=fe.idx),se=4*z,ce=2*z,this.updateParticle(fe);var ve=fe._rotationMatrix,Te=fe.position,Oe=fe._globalPosition;if(this._computeParticleRotation&&fe.getRotationMatrix(i),fe.parentId!==null){var Pe=this.particles[fe.parentId],Ee=Pe._rotationMatrix,Se=Pe._globalPosition,Le=Te.x*Ee[1]+Te.y*Ee[4]+Te.z*Ee[7],xe=Te.x*Ee[0]+Te.y*Ee[3]+Te.z*Ee[6],Ne=Te.x*Ee[2]+Te.y*Ee[5]+Te.z*Ee[8];if(Oe.x=Se.x+xe,Oe.y=Se.y+Le,Oe.z=Se.z+Ne,this._computeParticleRotation){var Ie=i.m;ve[0]=Ie[0]*Ee[0]+Ie[1]*Ee[3]+Ie[2]*Ee[6],ve[1]=Ie[0]*Ee[1]+Ie[1]*Ee[4]+Ie[2]*Ee[7],ve[2]=Ie[0]*Ee[2]+Ie[1]*Ee[5]+Ie[2]*Ee[8],ve[3]=Ie[4]*Ee[0]+Ie[5]*Ee[3]+Ie[6]*Ee[6],ve[4]=Ie[4]*Ee[1]+Ie[5]*Ee[4]+Ie[6]*Ee[7],ve[5]=Ie[4]*Ee[2]+Ie[5]*Ee[5]+Ie[6]*Ee[8],ve[6]=Ie[8]*Ee[0]+Ie[9]*Ee[3]+Ie[10]*Ee[6],ve[7]=Ie[8]*Ee[1]+Ie[9]*Ee[4]+Ie[10]*Ee[7],ve[8]=Ie[8]*Ee[2]+Ie[9]*Ee[5]+Ie[10]*Ee[8]}}else Oe.x=0,Oe.y=0,Oe.z=0,this._computeParticleRotation&&(Ie=i.m,ve[0]=Ie[0],ve[1]=Ie[1],ve[2]=Ie[2],ve[3]=Ie[4],ve[4]=Ie[5],ve[5]=Ie[6],ve[6]=Ie[8],ve[7]=Ie[9],ve[8]=Ie[10]);var Fe=p[11];fe.translateFromPivot?Fe.setAll(0):Fe.copyFrom(fe.pivot);var Ke=p[0];Ke.copyFrom(fe.position);var nt=Ke.x-fe.pivot.x,rt=Ke.y-fe.pivot.y,ut=Ke.z-fe.pivot.z,qe=nt*ve[0]+rt*ve[3]+ut*ve[6],at=nt*ve[1]+rt*ve[4]+ut*ve[7],ot=nt*ve[2]+rt*ve[5]+ut*ve[8];qe+=Fe.x,at+=Fe.y,ot+=Fe.z;var Je=s[ie]=Oe.x+y.x*qe+C.x*at+M.x*ot,dt=s[ie+1]=Oe.y+y.y*qe+C.y*at+M.y*ot,ke=s[ie+2]=Oe.z+y.z*qe+C.z*at+M.z*ot;if(this._computeBoundingBox&&(U.minimizeInPlaceFromFloats(Je,dt,ke),F.maximizeInPlaceFromFloats(Je,dt,ke)),this._computeParticleColor&&fe.color){var $e=fe.color,yt=this._colors32;yt[se]=$e.r,yt[se+1]=$e.g,yt[se+2]=$e.b,yt[se+3]=$e.a}if(this._computeParticleTexture&&fe.uv){var Wt=fe.uv,Nt=this._uvs32;Nt[ce]=Wt.x,Nt[ce+1]=Wt.y}}return n&&(this._computeParticleColor&&o.updateVerticesData(Me.b.ColorKind,a,!1,!1),this._computeParticleTexture&&o.updateVerticesData(Me.b.UVKind,d,!1,!1),o.updateVerticesData(Me.b.PositionKind,s,!1,!1)),this._computeBoundingBox&&(o._boundingInfo?o._boundingInfo.reConstruct(U,F,o._worldMatrix):o._boundingInfo=new Vi.a(U,F,o._worldMatrix)),this.afterUpdateParticles(t,e,n),this},r.prototype.dispose=function(){this.mesh.dispose(),this.vars=null,this._positions=null,this._indices=null,this._normals=null,this._uvs=null,this._colors=null,this._indices32=null,this._positions32=null,this._uvs32=null,this._colors32=null},r.prototype.refreshVisibleSize=function(){return this._isVisibilityBoxLocked||this.mesh.refreshBoundingInfo(),this},r.prototype.setVisibilityBox=function(t){var e=t/2;this.mesh._boundingInfo=new Vi.a(new l.e(-e,-e,-e),new l.e(e,e,e))},Object.defineProperty(r.prototype,"isAlwaysVisible",{get:function(){return this._alwaysVisible},set:function(t){this._alwaysVisible=t,this.mesh.alwaysSelectAsActiveMesh=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"computeParticleRotation",{set:function(t){this._computeParticleRotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"computeParticleColor",{get:function(){return this._computeParticleColor},set:function(t){this._computeParticleColor=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"computeParticleTexture",{get:function(){return this._computeParticleTexture},set:function(t){this._computeParticleTexture=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"computeBoundingBox",{get:function(){return this._computeBoundingBox},set:function(t){this._computeBoundingBox=t},enumerable:!1,configurable:!0}),r.prototype.initParticles=function(){},r.prototype.recycleParticle=function(t){return t},r.prototype.updateParticle=function(t){return t},r.prototype.beforeUpdateParticles=function(t,e,n){},r.prototype.afterUpdateParticles=function(t,e,n){},r}();_e.a.prototype.getPhysicsEngine=function(){return this._physicsEngine},_e.a.prototype.enablePhysics=function(r,t){if(r===void 0&&(r=null),this._physicsEngine)return!0;var e=this._getComponent(st.a.NAME_PHYSICSENGINE);e||(e=new Id(this),this._addComponent(e));try{return this._physicsEngine=new Dr(r,t),this._physicsTimeAccumulator=0,!0}catch(n){return u.a.Error(n.message),!1}},_e.a.prototype.disablePhysicsEngine=function(){this._physicsEngine&&(this._physicsEngine.dispose(),this._physicsEngine=null)},_e.a.prototype.isPhysicsEnabled=function(){return this._physicsEngine!==void 0},_e.a.prototype.deleteCompoundImpostor=function(r){var t=r.parts[0].mesh;t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)},_e.a.prototype._advancePhysicsEngineStep=function(r){if(this._physicsEngine){var t=this._physicsEngine.getSubTimeStep();if(t>0)for(this._physicsTimeAccumulator+=r;this._physicsTimeAccumulator>t;)this.onBeforePhysicsObservable.notifyObservers(this),this._physicsEngine._step(t/1e3),this.onAfterPhysicsObservable.notifyObservers(this),this._physicsTimeAccumulator-=t;else this.onBeforePhysicsObservable.notifyObservers(this),this._physicsEngine._step(r/1e3),this.onAfterPhysicsObservable.notifyObservers(this)}},Object.defineProperty(Dt.a.prototype,"physicsImpostor",{get:function(){return this._physicsImpostor},set:function(r){var t=this;this._physicsImpostor!==r&&(this._disposePhysicsObserver&&this.onDisposeObservable.remove(this._disposePhysicsObserver),this._physicsImpostor=r,r&&(this._disposePhysicsObserver=this.onDisposeObservable.add(function(){t.physicsImpostor&&(t.physicsImpostor.dispose(),t.physicsImpostor=null)})))},enumerable:!0,configurable:!0}),Dt.a.prototype.getPhysicsImpostor=function(){return this.physicsImpostor},Dt.a.prototype.applyImpulse=function(r,t){return this.physicsImpostor?(this.physicsImpostor.applyImpulse(r,t),this):this},Dt.a.prototype.setPhysicsLinkWith=function(r,t,e,n){return this.physicsImpostor&&r.physicsImpostor?(this.physicsImpostor.createJoint(r.physicsImpostor,nn.e.HingeJoint,{mainPivot:t,connectedPivot:e,nativeParams:n}),this):this};var Oo,Ur,Id=function(){function r(t){var e=this;this.name=st.a.NAME_PHYSICSENGINE,this.scene=t,this.scene.onBeforePhysicsObservable=new P.c,this.scene.onAfterPhysicsObservable=new P.c,this.scene.getDeterministicFrameTime=function(){return e.scene._physicsEngine?1e3*e.scene._physicsEngine.getTimeStep():1e3/60}}return r.prototype.register=function(){},r.prototype.rebuild=function(){},r.prototype.dispose=function(){this.scene.onBeforePhysicsObservable.clear(),this.scene.onAfterPhysicsObservable.clear(),this.scene._physicsEngine&&this.scene.disablePhysicsEngine()},r}(),Zm=function(){function r(t){this._scene=t,this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine||u.a.Warn("Physics engine not enabled. Please enable the physics before you can use the methods.")}return r.prototype.applyRadialExplosionImpulse=function(t,e,n,i){if(!this._physicsEngine)return u.a.Warn("Physics engine not enabled. Please enable the physics before you call this method."),null;var o=this._physicsEngine.getImpostors();if(o.length===0)return null;typeof e=="number"&&((e=new Vr).radius=e,e.strength=n||e.strength,e.falloff=i||e.falloff);var a=new Dd(this._scene,e),s=Array();return o.forEach(function(d){var p=a.getImpostorHitData(d,t);p&&(d.applyImpulse(p.force,p.contactPoint),s.push({impostor:d,hitData:p}))}),a.triggerAffectedImpostorsCallback(s),a.dispose(!1),a},r.prototype.applyRadialExplosionForce=function(t,e,n,i){if(!this._physicsEngine)return u.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;var o=this._physicsEngine.getImpostors();if(o.length===0)return null;typeof e=="number"&&((e=new Vr).radius=e,e.strength=n||e.strength,e.falloff=i||e.falloff);var a=new Dd(this._scene,e),s=Array();return o.forEach(function(d){var p=a.getImpostorHitData(d,t);p&&(d.applyForce(p.force,p.contactPoint),s.push({impostor:d,hitData:p}))}),a.triggerAffectedImpostorsCallback(s),a.dispose(!1),a},r.prototype.gravitationalField=function(t,e,n,i){if(!this._physicsEngine)return u.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(this._physicsEngine.getImpostors().length===0)return null;typeof e=="number"&&((e=new Vr).radius=e,e.strength=n||e.strength,e.falloff=i||e.falloff);var o=new Jm(this,this._scene,t,e);return o.dispose(!1),o},r.prototype.updraft=function(t,e,n,i,o){if(!this._physicsEngine)return u.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(this._physicsEngine.getImpostors().length===0)return null;typeof e=="number"&&((e=new kc).radius=e,e.strength=n||e.strength,e.height=i||e.height,e.updraftMode=o||e.updraftMode);var a=new $m(this._scene,t,e);return a.dispose(!1),a},r.prototype.vortex=function(t,e,n,i){if(!this._physicsEngine)return u.a.Warn("Physics engine not enabled. Please enable the physics before you call the PhysicsHelper."),null;if(this._physicsEngine.getImpostors().length===0)return null;typeof e=="number"&&((e=new Gc).radius=e,e.strength=n||e.strength,e.height=i||e.height);var o=new eg(this._scene,t,e);return o.dispose(!1),o},r}(),Dd=function(){function r(t,e){this._scene=t,this._options=e,this._dataFetched=!1,this._options=Object(c.a)(Object(c.a)({},new Vr),this._options)}return r.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere}},r.prototype.getImpostorHitData=function(t,e){if(t.mass===0||!this._intersectsWithSphere(t,e,this._options.radius)||t.object.getClassName()!=="Mesh"&&t.object.getClassName()!=="InstancedMesh")return null;var n=t.getObjectCenter().subtract(e),i=new pn.a(e,n,this._options.radius).intersectsMesh(t.object).pickedPoint;if(!i)return null;var o=l.e.Distance(e,i);if(o>this._options.radius)return null;var a=this._options.falloff===Oo.Constant?this._options.strength:this._options.strength*(1-o/this._options.radius);return{force:n.multiplyByFloats(a,a,a),contactPoint:i,distanceFromOrigin:o}},r.prototype.triggerAffectedImpostorsCallback=function(t){this._options.affectedImpostorsCallback&&this._options.affectedImpostorsCallback(t)},r.prototype.dispose=function(t){var e=this;t===void 0&&(t=!0),t?this._sphere.dispose():setTimeout(function(){e._dataFetched||e._sphere.dispose()},0)},r.prototype._prepareSphere=function(){this._sphere||(this._sphere=Vn.a.CreateSphere("radialExplosionEventSphere",this._options.sphere,this._scene),this._sphere.isVisible=!1)},r.prototype._intersectsWithSphere=function(t,e,n){var i=t.object;return this._prepareSphere(),this._sphere.position=e,this._sphere.scaling=new l.e(2*n,2*n,2*n),this._sphere._updateBoundingInfo(),this._sphere.computeWorldMatrix(!0),this._sphere.intersectsMesh(i,!0)},r}(),Jm=function(){function r(t,e,n,i){this._physicsHelper=t,this._scene=e,this._origin=n,this._options=i,this._dataFetched=!1,this._options=Object(c.a)(Object(c.a)({},new Vr),this._options),this._tickCallback=this._tick.bind(this),this._options.strength=-1*this._options.strength}return r.prototype.getData=function(){return this._dataFetched=!0,{sphere:this._sphere}},r.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},r.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},r.prototype.dispose=function(t){var e=this;t===void 0&&(t=!0),t?this._sphere.dispose():setTimeout(function(){e._dataFetched||e._sphere.dispose()},0)},r.prototype._tick=function(){if(this._sphere)this._physicsHelper.applyRadialExplosionForce(this._origin,this._options);else{var t=this._physicsHelper.applyRadialExplosionForce(this._origin,this._options);t&&(this._sphere=t.getData().sphere.clone("radialExplosionEventSphereClone"))}},r}(),$m=function(){function r(t,e,n){this._scene=t,this._origin=e,this._options=n,this._originTop=l.e.Zero(),this._originDirection=l.e.Zero(),this._cylinderPosition=l.e.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._options=Object(c.a)(Object(c.a)({},new kc),this._options),this._origin.addToRef(new l.e(0,this._options.height/2,0),this._cylinderPosition),this._origin.addToRef(new l.e(0,this._options.height,0),this._originTop),this._options.updraftMode===Ur.Perpendicular&&(this._originDirection=this._origin.subtract(this._originTop).normalize()),this._tickCallback=this._tick.bind(this),this._prepareCylinder()}return r.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},r.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},r.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},r.prototype.dispose=function(t){var e=this;t===void 0&&(t=!0),this._cylinder&&(t?this._cylinder.dispose():setTimeout(function(){e._dataFetched||e._cylinder.dispose()},0))},r.prototype.getImpostorHitData=function(t){if(t.mass===0||!this._intersectsWithCylinder(t))return null;var e=t.getObjectCenter();if(this._options.updraftMode===Ur.Perpendicular)var n=this._originDirection;else n=e.subtract(this._originTop);var i=l.e.Distance(this._origin,e),o=-1*this._options.strength;return{force:n.multiplyByFloats(o,o,o),contactPoint:e,distanceFromOrigin:i}},r.prototype._tick=function(){var t=this;this._physicsEngine.getImpostors().forEach(function(e){var n=t.getImpostorHitData(e);n&&e.applyForce(n.force,n.contactPoint)})},r.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=mi.a.CreateCylinder("updraftEventCylinder",{height:this._options.height,diameter:2*this._options.radius},this._scene),this._cylinder.isVisible=!1)},r.prototype._intersectsWithCylinder=function(t){var e=t.object;return this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(e,!0)},r}(),eg=function(){function r(t,e,n){this._scene=t,this._origin=e,this._options=n,this._originTop=l.e.Zero(),this._cylinderPosition=l.e.Zero(),this._dataFetched=!1,this._physicsEngine=this._scene.getPhysicsEngine(),this._options=Object(c.a)(Object(c.a)({},new Gc),this._options),this._origin.addToRef(new l.e(0,this._options.height/2,0),this._cylinderPosition),this._origin.addToRef(new l.e(0,this._options.height,0),this._originTop),this._tickCallback=this._tick.bind(this),this._prepareCylinder()}return r.prototype.getData=function(){return this._dataFetched=!0,{cylinder:this._cylinder}},r.prototype.enable=function(){this._tickCallback.call(this),this._scene.registerBeforeRender(this._tickCallback)},r.prototype.disable=function(){this._scene.unregisterBeforeRender(this._tickCallback)},r.prototype.dispose=function(t){var e=this;t===void 0&&(t=!0),t?this._cylinder.dispose():setTimeout(function(){e._dataFetched||e._cylinder.dispose()},0)},r.prototype.getImpostorHitData=function(t){if(t.mass===0||!this._intersectsWithCylinder(t)||t.object.getClassName()!=="Mesh"&&t.object.getClassName()!=="InstancedMesh")return null;var e=t.getObjectCenter(),n=new l.e(this._origin.x,e.y,this._origin.z),i=e.subtract(n),o=new pn.a(n,i,this._options.radius).intersectsMesh(t.object),a=o.pickedPoint;if(!a)return null;var s=o.distance/this._options.radius,d=a.normalize();if(s>this._options.centripetalForceThreshold&&(d=d.negate()),s>this._options.centripetalForceThreshold)var p=d.x*this._options.centripetalForceMultiplier,y=d.y*this._options.updraftForceMultiplier,C=d.z*this._options.centripetalForceMultiplier;else{var M=l.e.Cross(n,e).normalize();p=(M.x+d.x)*this._options.centrifugalForceMultiplier,y=this._originTop.y*this._options.updraftForceMultiplier,C=(M.z+d.z)*this._options.centrifugalForceMultiplier}var U=new l.e(p,y,C);return{force:U=U.multiplyByFloats(this._options.strength,this._options.strength,this._options.strength),contactPoint:e,distanceFromOrigin:s}},r.prototype._tick=function(){var t=this;this._physicsEngine.getImpostors().forEach(function(e){var n=t.getImpostorHitData(e);n&&e.applyForce(n.force,n.contactPoint)})},r.prototype._prepareCylinder=function(){this._cylinder||(this._cylinder=mi.a.CreateCylinder("vortexEventCylinder",{height:this._options.height,diameter:2*this._options.radius},this._scene),this._cylinder.isVisible=!1)},r.prototype._intersectsWithCylinder=function(t){var e=t.object;return this._cylinder.position=this._cylinderPosition,this._cylinder.intersectsMesh(e,!0)},r}(),Vr=function(){this.radius=5,this.strength=10,this.falloff=Oo.Constant,this.sphere={segments:32,diameter:1}},kc=function(){this.radius=5,this.strength=10,this.height=10,this.updraftMode=Ur.Center},Gc=function(){this.radius=5,this.strength=10,this.height=10,this.centripetalForceThreshold=.7,this.centripetalForceMultiplier=5,this.centrifugalForceMultiplier=.5,this.updraftForceMultiplier=.02};(function(r){r[r.Constant=0]="Constant",r[r.Linear=1]="Linear"})(Oo||(Oo={})),function(r){r[r.Center=0]="Center",r[r.Perpendicular=1]="Perpendicular"}(Ur||(Ur={}));var tg=` -varying vec2 vUV; -uniform sampler2D textureSampler; -uniform float degree; -void main(void) -{ -vec3 color=texture2D(textureSampler,vUV).rgb; -float luminance=dot(color,vec3(0.3,0.59,0.11)); -vec3 blackAndWhite=vec3(luminance,luminance,luminance); -gl_FragColor=vec4(color-((color-blackAndWhite)*degree),1.0); -}`;je.a.ShadersStore.blackAndWhitePixelShader=tg;var Ld=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,"blackAndWhite",["degree"],null,n,i,o,a,s)||this;return d.degree=1,d.onApplyObservable.add(function(p){p.setFloat("degree",d.degree)}),d}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"BlackAndWhitePostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"degree",void 0),t}(_t);R.a.RegisteredTypes["BABYLON.BlackAndWhitePostProcess"]=Ld;var Rt=function(){function r(t,e,n,i){this._name=e,this._singleInstance=i||!0,this._getPostProcesses=n,this._cameras={},this._indicesForCamera={},this._postProcesses={}}return Object.defineProperty(r.prototype,"isSupported",{get:function(){for(var t in this._postProcesses)if(this._postProcesses.hasOwnProperty(t)){for(var e=this._postProcesses[t],n=0;n - -varying vec2 vUV; -uniform sampler2D textureSampler; -uniform float threshold; -uniform float exposure; -void main(void) -{ -gl_FragColor=texture2D(textureSampler,vUV); -float luma=getLuminance(gl_FragColor.rgb*exposure); -gl_FragColor.rgb=step(threshold,luma)*gl_FragColor.rgb; -}`;je.a.ShadersStore.extractHighlightsPixelShader=ng;var zc=function(r){function t(e,n,i,o,a,s,d,p){d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1);var y=r.call(this,e,"extractHighlights",["threshold","exposure"],null,n,i,o,a,s,null,d,void 0,null,p)||this;return y.threshold=.9,y._exposure=1,y._inputPostProcess=null,y.onApplyObservable.add(function(C){y._inputPostProcess&&C.setTextureFromPostProcess("textureSampler",y._inputPostProcess),C.setFloat("threshold",Math.pow(y.threshold,Gt.b)),C.setFloat("exposure",y._exposure)}),y}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"ExtractHighlightsPostProcess"},Object(c.c)([Object(L.c)()],t.prototype,"threshold",void 0),t}(_t);R.a.RegisteredTypes["BABYLON.ExtractHighlightsPostProcess"]=zc;var ig=`uniform sampler2D textureSampler; -uniform sampler2D bloomBlur; -varying vec2 vUV; -uniform float bloomWeight; -void main(void) -{ -gl_FragColor=texture2D(textureSampler,vUV); -vec3 blurred=texture2D(bloomBlur,vUV).rgb; -gl_FragColor.rgb=gl_FragColor.rgb+(blurred.rgb*bloomWeight); -} -`;je.a.ShadersStore.bloomMergePixelShader=ig;var jc=function(r){function t(e,n,i,o,a,s,d,p,y,C,M){C===void 0&&(C=h.a.TEXTURETYPE_UNSIGNED_INT),M===void 0&&(M=!1);var U=r.call(this,e,"bloomMerge",["bloomWeight"],["circleOfConfusionSampler","blurStep0","blurStep1","blurStep2","bloomBlur"],a,s,d,p,y,null,C,void 0,null,!0)||this;return U.weight=1,U.weight=o,U.onApplyObservable.add(function(F){F.setTextureFromPostProcess("textureSampler",n),F.setTextureFromPostProcessOutput("bloomBlur",i),F.setFloat("bloomWeight",U.weight)}),M||U.updateEffect(),U}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"BloomMergePostProcess"},Object(c.c)([Object(L.c)()],t.prototype,"weight",void 0),t}(_t);R.a.RegisteredTypes["BABYLON.BloomMergePostProcess"]=jc;var Hc=function(r){function t(e,n,i,o,a,s){a===void 0&&(a=0),s===void 0&&(s=!1);var d=r.call(this,e.getEngine(),"bloom",function(){return d._effects},!0)||this;return d.bloomScale=n,d._effects=[],d._downscale=new zc("highlights",1,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a,s),d._blurX=new gn("horizontal blur",new l.d(1,0),10,n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a,void 0,s),d._blurX.alwaysForcePOT=!0,d._blurX.autoClear=!1,d._blurY=new gn("vertical blur",new l.d(0,1),10,n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a,void 0,s),d._blurY.alwaysForcePOT=!0,d._blurY.autoClear=!1,d.kernel=o,d._effects=[d._downscale,d._blurX,d._blurY],d._merge=new jc("bloomMerge",d._downscale,d._blurY,i,n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,a,s),d._merge.autoClear=!1,d._effects.push(d._merge),d}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"threshold",{get:function(){return this._downscale.threshold},set:function(e){this._downscale.threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"weight",{get:function(){return this._merge.weight},set:function(e){this._merge.weight=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"kernel",{get:function(){return this._blurX.kernel/this.bloomScale},set:function(e){this._blurX.kernel=e*this.bloomScale,this._blurY.kernel=e*this.bloomScale},enumerable:!1,configurable:!0}),t.prototype.disposeEffects=function(e){for(var n=0;n0 -uniform sampler2D blurStep1; -#endif -#if BLUR_LEVEL>1 -uniform sampler2D blurStep2; -#endif -void main(void) -{ -float coc=texture2D(circleOfConfusionSampler,vUV).r; -#if BLUR_LEVEL == 0 -vec4 original=texture2D(textureSampler,vUV); -vec4 blurred0=texture2D(blurStep0,vUV); -gl_FragColor=mix(original,blurred0,coc); -#endif -#if BLUR_LEVEL == 1 -if(coc<0.5){ -vec4 original=texture2D(textureSampler,vUV); -vec4 blurred1=texture2D(blurStep1,vUV); -gl_FragColor=mix(original,blurred1,coc/0.5); -}else{ -vec4 blurred0=texture2D(blurStep0,vUV); -vec4 blurred1=texture2D(blurStep1,vUV); -gl_FragColor=mix(blurred1,blurred0,(coc-0.5)/0.5); -} -#endif -#if BLUR_LEVEL == 2 -if(coc<0.33){ -vec4 original=texture2D(textureSampler,vUV); -vec4 blurred2=texture2D(blurStep2,vUV); -gl_FragColor=mix(original,blurred2,coc/0.33); -}else if(coc<0.66){ -vec4 blurred1=texture2D(blurStep1,vUV); -vec4 blurred2=texture2D(blurStep2,vUV); -gl_FragColor=mix(blurred2,blurred1,(coc-0.33)/0.33); -}else{ -vec4 blurred0=texture2D(blurStep0,vUV); -vec4 blurred1=texture2D(blurStep1,vUV); -gl_FragColor=mix(blurred1,blurred0,(coc-0.66)/0.34); -} -#endif -} -`;je.a.ShadersStore.depthOfFieldMergePixelShader=cg;var sr,lg=function(){},Fd=function(r){function t(e,n,i,o,a,s,d,p,y,C,M){C===void 0&&(C=h.a.TEXTURETYPE_UNSIGNED_INT),M===void 0&&(M=!1);var U=r.call(this,e,"depthOfFieldMerge",[],["circleOfConfusionSampler","blurStep0","blurStep1","blurStep2"],a,s,d,p,y,null,C,void 0,null,!0)||this;return U.blurSteps=o,U.onApplyObservable.add(function(F){F.setTextureFromPostProcess("textureSampler",n),F.setTextureFromPostProcessOutput("circleOfConfusionSampler",i),o.forEach(function(z,J){F.setTextureFromPostProcessOutput("blurStep"+(o.length-J-1),z)})}),M||U.updateEffect(),U}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"DepthOfFieldMergePostProcess"},t.prototype.updateEffect=function(e,n,i,o,a,s){e===void 0&&(e=null),n===void 0&&(n=null),i===void 0&&(i=null),e||(e="",e+="#define BLUR_LEVEL "+(this.blurSteps.length-1)+` -`),r.prototype.updateEffect.call(this,e,n,i,o,a,s)},t}(_t);(function(r){r[r.Low=0]="Low",r[r.Medium=1]="Medium",r[r.High=2]="High"})(sr||(sr={}));var Yc=function(r){function t(e,n,i,o,a){i===void 0&&(i=sr.Low),o===void 0&&(o=0),a===void 0&&(a=!1);var s=r.call(this,e.getEngine(),"depth of field",function(){return s._effects},!0)||this;s._effects=[],s._circleOfConfusion=new Xc("circleOfConfusion",n,1,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,o,a),s._depthOfFieldBlurY=[],s._depthOfFieldBlurX=[];var d=1,p=15;switch(i){case sr.High:d=3,p=51;break;case sr.Medium:d=2,p=31;break;default:p=15,d=1}for(var y=p/Math.pow(2,d-1),C=1,M=0;M=edgeVert; -float subpixA=subpixNSWE*2.0+subpixNWSWNESE; -if (!horzSpan) -{ -lumaN=lumaW; -} -if (!horzSpan) -{ -lumaS=lumaE; -} -if (horzSpan) -{ -lengthSign=texelSize.y; -} -float subpixB=(subpixA*(1.0/12.0))-lumaM; -float gradientN=lumaN-lumaM; -float gradientS=lumaS-lumaM; -float lumaNN=lumaN+lumaM; -float lumaSS=lumaS+lumaM; -bool pairN=abs(gradientN)>=abs(gradientS); -float gradient=max(abs(gradientN),abs(gradientS)); -if (pairN) -{ -lengthSign=-lengthSign; -} -float subpixC=clamp(abs(subpixB)*subpixRcpRange,0.0,1.0); -vec2 posB; -posB.x=posM.x; -posB.y=posM.y; -vec2 offNP; -offNP.x=(!horzSpan) ? 0.0 : texelSize.x; -offNP.y=(horzSpan) ? 0.0 : texelSize.y; -if (!horzSpan) -{ -posB.x+=lengthSign*0.5; -} -if (horzSpan) -{ -posB.y+=lengthSign*0.5; -} -vec2 posN; -posN.x=posB.x-offNP.x*1.5; -posN.y=posB.y-offNP.y*1.5; -vec2 posP; -posP.x=posB.x+offNP.x*1.5; -posP.y=posB.y+offNP.y*1.5; -float subpixD=((-2.0)*subpixC)+3.0; -float lumaEndN=FxaaLuma(texture2D(textureSampler,posN,0.0)); -float subpixE=subpixC*subpixC; -float lumaEndP=FxaaLuma(texture2D(textureSampler,posP,0.0)); -if (!pairN) -{ -lumaNN=lumaSS; -} -float gradientScaled=gradient*1.0/4.0; -float lumaMM=lumaM-lumaNN*0.5; -float subpixF=subpixD*subpixE; -bool lumaMLTZero=lumaMM<0.0; -lumaEndN-=lumaNN*0.5; -lumaEndP-=lumaNN*0.5; -bool doneN=abs(lumaEndN)>=gradientScaled; -bool doneP=abs(lumaEndP)>=gradientScaled; -if (!doneN) -{ -posN.x-=offNP.x*3.0; -} -if (!doneN) -{ -posN.y-=offNP.y*3.0; -} -bool doneNP=(!doneN) || (!doneP); -if (!doneP) -{ -posP.x+=offNP.x*3.0; -} -if (!doneP) -{ -posP.y+=offNP.y*3.0; -} -if (doneNP) -{ -if (!doneN) lumaEndN=FxaaLuma(texture2D(textureSampler,posN.xy,0.0)); -if (!doneP) lumaEndP=FxaaLuma(texture2D(textureSampler,posP.xy,0.0)); -if (!doneN) lumaEndN=lumaEndN-lumaNN*0.5; -if (!doneP) lumaEndP=lumaEndP-lumaNN*0.5; -doneN=abs(lumaEndN)>=gradientScaled; -doneP=abs(lumaEndP)>=gradientScaled; -if (!doneN) posN.x-=offNP.x*12.0; -if (!doneN) posN.y-=offNP.y*12.0; -doneNP=(!doneN) || (!doneP); -if (!doneP) posP.x+=offNP.x*12.0; -if (!doneP) posP.y+=offNP.y*12.0; -} -float dstN=posM.x-posN.x; -float dstP=posP.x-posM.x; -if (!horzSpan) -{ -dstN=posM.y-posN.y; -} -if (!horzSpan) -{ -dstP=posP.y-posM.y; -} -bool goodSpanN=(lumaEndN<0.0) != lumaMLTZero; -float spanLength=(dstP+dstN); -bool goodSpanP=(lumaEndP<0.0) != lumaMLTZero; -float spanLengthRcp=1.0/spanLength; -bool directionN=dstN-1?`#define MALI 1 -`:null},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},t}(_t);R.a.RegisteredTypes["BABYLON.FxaaPostProcess"]=Mo;var pg=`#include - -uniform sampler2D textureSampler; - -uniform float intensity; -uniform float animatedSeed; - -varying vec2 vUV; -void main(void) -{ -gl_FragColor=texture2D(textureSampler,vUV); -vec2 seed=vUV*(animatedSeed); -float grain=dither(seed,intensity); - -float lum=getLuminance(gl_FragColor.rgb); -float grainAmount=(cos(-PI+(lum*PI*2.))+1.)/2.; -gl_FragColor.rgb+=grain*grainAmount; -gl_FragColor.rgb=max(gl_FragColor.rgb,0.0); -}`;je.a.ShadersStore.grainPixelShader=pg;var Kc=function(r){function t(e,n,i,o,a,s,d,p){d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1);var y=r.call(this,e,"grain",["intensity","animatedSeed"],[],n,i,o,a,s,null,d,void 0,null,p)||this;return y.intensity=30,y.animated=!1,y.onApplyObservable.add(function(C){C.setFloat("intensity",y.intensity),C.setFloat("animatedSeed",y.animated?Math.random()+1:1)}),y}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"GrainPostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"intensity",void 0),Object(c.c)([Object(L.c)()],t.prototype,"animated",void 0),t}(_t);R.a.RegisteredTypes["BABYLON.GrainPostProcess"]=Kc;var _g=` -varying vec2 vUV; -uniform sampler2D textureSampler; -const vec3 RGBLuminanceCoefficients=vec3(0.2126,0.7152,0.0722); -void main(void) -{ -vec4 tex=texture2D(textureSampler,vUV); -vec3 c=tex.rgb; -float luma=dot(c.rgb,RGBLuminanceCoefficients); - - -gl_FragColor=vec4(pow(c,vec3(25.0-luma*15.0)),tex.a); -}`;je.a.ShadersStore.highlightsPixelShader=_g;var mg=function(r){function t(e,n,i,o,a,s,d){return d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),r.call(this,e,"highlights",null,null,n,i,o,a,s,null,d)||this}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"HighlightsPostProcess"},t}(_t);je.a.IncludesShadersStore.mrtFragmentDeclaration=`#if __VERSION__>=200 -layout(location=0) out vec4 glFragData[{X}]; -#endif -`;var gg=`#extension GL_EXT_draw_buffers : require -#if defined(BUMP) || !defined(NORMAL) -#extension GL_OES_standard_derivatives : enable -#endif -precision highp float; -precision highp int; -#ifdef BUMP -varying mat4 vWorldView; -varying vec3 vNormalW; -#else -varying vec3 vNormalV; -#endif -varying vec4 vViewPos; -#if defined(POSITION) || defined(BUMP) -varying vec3 vPositionW; -#endif -#ifdef VELOCITY -varying vec4 vCurrentPosition; -varying vec4 vPreviousPosition; -#endif -#ifdef NEED_UV -varying vec2 vUV; -#endif -#ifdef BUMP -uniform vec3 vBumpInfos; -uniform vec2 vTangentSpaceParams; -#endif -#ifdef REFLECTIVITY -varying vec2 vReflectivityUV; -uniform sampler2D reflectivitySampler; -#endif -#ifdef ALPHATEST -uniform sampler2D diffuseSampler; -#endif -#include[RENDER_TARGET_COUNT] -#include -#include -void main() { -#ifdef ALPHATEST -if (texture2D(diffuseSampler,vUV).a<0.4) -discard; -#endif -vec3 normalOutput; -#ifdef BUMP -vec3 normalW=normalize(vNormalW); -#include -normalOutput=normalize(vec3(vWorldView*vec4(normalW,0.0))); -#else -normalOutput=normalize(vNormalV); -#endif -#ifdef PREPASS -#ifdef PREPASS_DEPTHNORMAL -gl_FragData[DEPTHNORMAL_INDEX]=vec4(vViewPos.z/vViewPos.w,normalOutput); -#endif -#else -gl_FragData[0]=vec4(vViewPos.z/vViewPos.w,0.0,0.0,1.0); -gl_FragData[1]=vec4(normalOutput,1.0); -#endif -#ifdef POSITION -gl_FragData[POSITION_INDEX]=vec4(vPositionW,1.0); -#endif -#ifdef VELOCITY -vec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5; -vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5; -vec2 velocity=abs(a-b); -velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5; -gl_FragData[VELOCITY_INDEX]=vec4(velocity,0.0,1.0); -#endif -#ifdef REFLECTIVITY -#ifdef HAS_SPECULAR - -vec4 reflectivity=texture2D(reflectivitySampler,vReflectivityUV); -#elif HAS_REFLECTIVITY - -vec4 reflectivity=vec4(texture2D(reflectivitySampler,vReflectivityUV).rgb,1.0); -#else -vec4 reflectivity=vec4(0.0,0.0,0.0,1.0); -#endif -gl_FragData[REFLECTIVITY_INDEX]=reflectivity; -#endif -}`;je.a.ShadersStore.geometryPixelShader=gg;var vg=`precision highp float; -precision highp int; -#include -#include -#include[0..maxSimultaneousMorphTargets] -#include -attribute vec3 position; -attribute vec3 normal; -#ifdef NEED_UV -varying vec2 vUV; -#ifdef ALPHATEST -uniform mat4 diffuseMatrix; -#endif -#ifdef BUMP -uniform mat4 bumpMatrix; -varying vec2 vBumpUV; -#endif -#ifdef REFLECTIVITY -uniform mat4 reflectivityMatrix; -varying vec2 vReflectivityUV; -#endif -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#endif - -uniform mat4 viewProjection; -uniform mat4 view; -#ifdef BUMP -varying mat4 vWorldView; -#endif -#ifdef BUMP -varying vec3 vNormalW; -#else -varying vec3 vNormalV; -#endif -varying vec4 vViewPos; -#if defined(POSITION) || defined(BUMP) -varying vec3 vPositionW; -#endif -#ifdef VELOCITY -uniform mat4 previousWorld; -uniform mat4 previousViewProjection; -#ifdef BONES_VELOCITY_ENABLED -#if NUM_BONE_INFLUENCERS>0 -uniform mat4 mPreviousBones[BonesPerMesh]; -#endif -#endif -varying vec4 vCurrentPosition; -varying vec4 vPreviousPosition; -#endif -void main(void) -{ -vec3 positionUpdated=position; -vec3 normalUpdated=normal; -#ifdef UV1 -vec2 uvUpdated=uv; -#endif -#include[0..maxSimultaneousMorphTargets] -#include -#if defined(VELOCITY) && !defined(BONES_VELOCITY_ENABLED) - -vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); -vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); -#endif -#include -vec4 pos=vec4(finalWorld*vec4(positionUpdated,1.0)); -#ifdef BUMP -vWorldView=view*finalWorld; -vNormalW=normalUpdated; -#else -vNormalV=normalize(vec3((view*finalWorld)*vec4(normalUpdated,0.0))); -#endif -vViewPos=view*pos; -#if defined(VELOCITY) && defined(BONES_VELOCITY_ENABLED) -vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); -#if NUM_BONE_INFLUENCERS>0 -mat4 previousInfluence; -previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0]; -#if NUM_BONE_INFLUENCERS>1 -previousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1]; -#endif -#if NUM_BONE_INFLUENCERS>2 -previousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2]; -#endif -#if NUM_BONE_INFLUENCERS>3 -previousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3]; -#endif -#if NUM_BONE_INFLUENCERS>4 -previousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; -#endif -#if NUM_BONE_INFLUENCERS>5 -previousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; -#endif -#if NUM_BONE_INFLUENCERS>6 -previousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; -#endif -#if NUM_BONE_INFLUENCERS>7 -previousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; -#endif -vPreviousPosition=previousViewProjection*previousWorld*previousInfluence*vec4(positionUpdated,1.0); -#else -vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); -#endif -#endif -#if defined(POSITION) || defined(BUMP) -vPositionW=pos.xyz/pos.w; -#endif -gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0); -#ifdef NEED_UV -#ifdef UV1 -#ifdef ALPHATEST -vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); -#else -vUV=uv; -#endif -#ifdef BUMP -vBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#ifdef REFLECTIVITY -vReflectivityUV=vec2(reflectivityMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#endif -#ifdef UV2 -#ifdef ALPHATEST -vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -#else -vUV=uv2; -#endif -#ifdef BUMP -vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); -#endif -#ifdef REFLECTIVITY -vReflectivityUV=vec2(reflectivityMatrix*vec4(uv2,1.0,0.0)); -#endif -#endif -#endif -#include -} -`;je.a.ShadersStore.geometryVertexShader=vg;var ui=function(){function r(t,e){e===void 0&&(e=1),this._previousTransformationMatrices={},this._previousBonesTransformationMatrices={},this.excludedSkinnedMeshesFromVelocity=[],this.renderTransparentMeshes=!0,this._resizeObserver=null,this._enablePosition=!1,this._enableVelocity=!1,this._enableReflectivity=!1,this._positionIndex=-1,this._velocityIndex=-1,this._reflectivityIndex=-1,this._depthNormalIndex=-1,this._linkedWithPrePass=!1,this._scene=t,this._ratio=e,r._SceneComponentInitialization(this._scene),this._createRenderTargets()}return r.prototype._linkPrePassRenderer=function(t){this._linkedWithPrePass=!0,this._prePassRenderer=t,this._multiRenderTarget&&(this._multiRenderTarget.onClearObservable.clear(),this._multiRenderTarget.onClearObservable.add(function(e){}))},r.prototype._unlinkPrePassRenderer=function(){this._linkedWithPrePass=!1,this._createRenderTargets()},r.prototype._resetLayout=function(){this._enablePosition=!1,this._enableReflectivity=!1,this._enableVelocity=!1,this._attachments=[]},r.prototype._forceTextureType=function(t,e){t===r.POSITION_TEXTURE_TYPE?(this._positionIndex=e,this._enablePosition=!0):t===r.VELOCITY_TEXTURE_TYPE?(this._velocityIndex=e,this._enableVelocity=!0):t===r.REFLECTIVITY_TEXTURE_TYPE?(this._reflectivityIndex=e,this._enableReflectivity=!0):t===r.DEPTHNORMAL_TEXTURE_TYPE&&(this._depthNormalIndex=e)},r.prototype._setAttachments=function(t){this._attachments=t},r.prototype._linkInternalTexture=function(t){this._multiRenderTarget._texture=t},Object.defineProperty(r.prototype,"renderList",{get:function(){return this._multiRenderTarget.renderList},set:function(t){this._multiRenderTarget.renderList=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isSupported",{get:function(){return this._multiRenderTarget.isSupported},enumerable:!1,configurable:!0}),r.prototype.getTextureIndex=function(t){switch(t){case r.POSITION_TEXTURE_TYPE:return this._positionIndex;case r.VELOCITY_TEXTURE_TYPE:return this._velocityIndex;case r.REFLECTIVITY_TEXTURE_TYPE:return this._reflectivityIndex;default:return-1}},Object.defineProperty(r.prototype,"enablePosition",{get:function(){return this._enablePosition},set:function(t){this._enablePosition=t,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"enableVelocity",{get:function(){return this._enableVelocity},set:function(t){this._enableVelocity=t,t||(this._previousTransformationMatrices={}),this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"enableReflectivity",{get:function(){return this._enableReflectivity},set:function(t){this._enableReflectivity=t,this._linkedWithPrePass||(this.dispose(),this._createRenderTargets())},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"ratio",{get:function(){return this._ratio},enumerable:!1,configurable:!0}),r.prototype.isReady=function(t,e){var n=t.getMaterial();if(n&&n.disableDepthWrite)return!1;var i=[],o=[Me.b.PositionKind,Me.b.NormalKind],a=t.getMesh();if(n){var s=!1;n.needAlphaTesting()&&(i.push("#define ALPHATEST"),s=!0),n.bumpTexture&&Ft.a.BumpTextureEnabled&&(i.push("#define BUMP"),i.push("#define BUMPDIRECTUV 0"),s=!0),this._enableReflectivity&&(n instanceof Ft.a&&n.specularTexture?(i.push("#define HAS_SPECULAR"),s=!0):n instanceof ho&&n.reflectivityTexture&&(i.push("#define HAS_REFLECTIVITY"),s=!0)),s&&(i.push("#define NEED_UV"),a.isVerticesDataPresent(Me.b.UVKind)&&(o.push(Me.b.UVKind),i.push("#define UV1")),a.isVerticesDataPresent(Me.b.UV2Kind)&&(o.push(Me.b.UV2Kind),i.push("#define UV2")))}this._linkedWithPrePass&&(i.push("#define PREPASS"),this._depthNormalIndex!==-1&&(i.push("#define DEPTHNORMAL_INDEX "+this._depthNormalIndex),i.push("#define PREPASS_DEPTHNORMAL"))),this._enablePosition&&(i.push("#define POSITION"),i.push("#define POSITION_INDEX "+this._positionIndex)),this._enableVelocity&&(i.push("#define VELOCITY"),i.push("#define VELOCITY_INDEX "+this._velocityIndex),this.excludedSkinnedMeshesFromVelocity.indexOf(a)===-1&&i.push("#define BONES_VELOCITY_ENABLED")),this._enableReflectivity&&(i.push("#define REFLECTIVITY"),i.push("#define REFLECTIVITY_INDEX "+this._reflectivityIndex)),a.useBones&&a.computeBonesUsingShaders?(o.push(Me.b.MatricesIndicesKind),o.push(Me.b.MatricesWeightsKind),a.numBoneInfluencers>4&&(o.push(Me.b.MatricesIndicesExtraKind),o.push(Me.b.MatricesWeightsExtraKind)),i.push("#define NUM_BONE_INFLUENCERS "+a.numBoneInfluencers),i.push("#define BonesPerMesh "+(a.skeleton?a.skeleton.bones.length+1:0))):i.push("#define NUM_BONE_INFLUENCERS 0");var d=a.morphTargetManager,p=0;d&&d.numInfluencers>0&&(p=d.numInfluencers,i.push("#define MORPHTARGETS"),i.push("#define NUM_MORPH_INFLUENCERS "+p),tt.a.PrepareAttributesForMorphTargetsInfluencers(o,a,p)),e&&(i.push("#define INSTANCES"),tt.a.PushAttributesForInstances(o),t.getRenderingMesh().hasThinInstances&&i.push("#define THIN_INSTANCES")),this._linkedWithPrePass?i.push("#define RENDER_TARGET_COUNT "+this._attachments.length):i.push("#define RENDER_TARGET_COUNT "+this._multiRenderTarget.textures.length);var y=i.join(` -`);return this._cachedDefines!==y&&(this._cachedDefines=y,this._effect=this._scene.getEngine().createEffect("geometry",o,["world","mBones","viewProjection","diffuseMatrix","view","previousWorld","previousViewProjection","mPreviousBones","morphTargetInfluences","bumpMatrix","reflectivityMatrix","vTangentSpaceParams","vBumpInfos"],["diffuseSampler","bumpSampler","reflectivitySampler"],y,void 0,void 0,void 0,{buffersCount:this._multiRenderTarget.textures.length-1,maxSimultaneousMorphTargets:p})),this._effect.isReady()},r.prototype.getGBuffer=function(){return this._multiRenderTarget},Object.defineProperty(r.prototype,"samples",{get:function(){return this._multiRenderTarget.samples},set:function(t){this._multiRenderTarget.samples=t},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){this._resizeObserver&&(this._scene.getEngine().onResizeObservable.remove(this._resizeObserver),this._resizeObserver=null),this.getGBuffer().dispose()},r.prototype._assignRenderTargetIndices=function(){var t=2;return this._enablePosition&&(this._positionIndex=t,t++),this._enableVelocity&&(this._velocityIndex=t,t++),this._enableReflectivity&&(this._reflectivityIndex=t,t++),t},r.prototype._createRenderTargets=function(){var t=this,e=this._scene.getEngine(),n=this._assignRenderTargetIndices();if(this._multiRenderTarget=new rc("gBuffer",{width:e.getRenderWidth()*this._ratio,height:e.getRenderHeight()*this._ratio},n,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,defaultType:h.a.TEXTURETYPE_FLOAT}),this.isSupported){this._multiRenderTarget.wrapU=we.a.CLAMP_ADDRESSMODE,this._multiRenderTarget.wrapV=we.a.CLAMP_ADDRESSMODE,this._multiRenderTarget.refreshRate=1,this._multiRenderTarget.renderParticles=!1,this._multiRenderTarget.renderList=null,this._multiRenderTarget.onClearObservable.add(function(o){o.clear(new O.b(0,0,0,1),!0,!0,!0)}),this._resizeObserver=e.onResizeObservable.add(function(){t._multiRenderTarget&&t._multiRenderTarget.resize({width:e.getRenderWidth()*t._ratio,height:e.getRenderHeight()*t._ratio})});var i=function(o){var a=o.getRenderingMesh(),s=o.getEffectiveMesh(),d=t._scene,p=d.getEngine(),y=o.getMaterial();if(y){if(s._internalAbstractMeshDataInfo._isActiveIntermediate=!1,t._enableVelocity&&!t._previousTransformationMatrices[s.uniqueId]&&(t._previousTransformationMatrices[s.uniqueId]={world:l.a.Identity(),viewProjection:d.getTransformMatrix()},a.skeleton)){var C=a.skeleton.getTransformMatrices(a);t._previousBonesTransformationMatrices[a.uniqueId]=t._copyBonesTransformationMatrices(C,new Float32Array(C.length))}var M=a._getInstancesRenderList(o._id,!!o.getReplacementMesh());if(!M.mustReturn){var U=p.getCaps().instancedArrays&&(M.visibleInstances[o._id]!==null||a.hasThinInstances),F=s.getWorldMatrix();if(t.isReady(o,U)){if(p.enableEffect(t._effect),a._bind(o,t._effect,y.fillMode),t._effect.setMatrix("viewProjection",d.getTransformMatrix()),t._effect.setMatrix("view",d.getViewMatrix()),y){var z,J=s._instanceDataStorage;if(J.isFrozen||!y.backFaceCulling&&y.overrideMaterialSideOrientation===null)z=J.sideOrientation;else{var ie=s._getWorldMatrixDeterminant();(z=y.overrideMaterialSideOrientation)==null&&(z=y.sideOrientation),ie<0&&(z=z===Ht.a.ClockWiseSideOrientation?Ht.a.CounterClockWiseSideOrientation:Ht.a.ClockWiseSideOrientation)}if(y._preBind(t._effect,z),y.needAlphaTesting()){var se=y.getAlphaTestTexture();se&&(t._effect.setTexture("diffuseSampler",se),t._effect.setMatrix("diffuseMatrix",se.getTextureMatrix()))}y.bumpTexture&&d.getEngine().getCaps().standardDerivatives&&Ft.a.BumpTextureEnabled&&(t._effect.setFloat3("vBumpInfos",y.bumpTexture.coordinatesIndex,1/y.bumpTexture.level,y.parallaxScaleBias),t._effect.setMatrix("bumpMatrix",y.bumpTexture.getTextureMatrix()),t._effect.setTexture("bumpSampler",y.bumpTexture),t._effect.setFloat2("vTangentSpaceParams",y.invertNormalMapX?-1:1,y.invertNormalMapY?-1:1)),t._enableReflectivity&&(y instanceof Ft.a&&y.specularTexture?(t._effect.setMatrix("reflectivityMatrix",y.specularTexture.getTextureMatrix()),t._effect.setTexture("reflectivitySampler",y.specularTexture)):y instanceof ho&&y.reflectivityTexture&&(t._effect.setMatrix("reflectivityMatrix",y.reflectivityTexture.getTextureMatrix()),t._effect.setTexture("reflectivitySampler",y.reflectivityTexture)))}a.useBones&&a.computeBonesUsingShaders&&a.skeleton&&(t._effect.setMatrices("mBones",a.skeleton.getTransformMatrices(a)),t._enableVelocity&&t._effect.setMatrices("mPreviousBones",t._previousBonesTransformationMatrices[a.uniqueId])),tt.a.BindMorphTargetParameters(a,t._effect),t._enableVelocity&&(t._effect.setMatrix("previousWorld",t._previousTransformationMatrices[s.uniqueId].world),t._effect.setMatrix("previousViewProjection",t._previousTransformationMatrices[s.uniqueId].viewProjection)),a._processRendering(s,o,t._effect,y.fillMode,M,U,function(ce,ue){return t._effect.setMatrix("world",ue)})}t._enableVelocity&&(t._previousTransformationMatrices[s.uniqueId].world=F.clone(),t._previousTransformationMatrices[s.uniqueId].viewProjection=t._scene.getTransformMatrix().clone(),a.skeleton&&t._copyBonesTransformationMatrices(a.skeleton.getTransformMatrices(a),t._previousBonesTransformationMatrices[s.uniqueId]))}}};this._multiRenderTarget.customRenderFunction=function(o,a,s,d){var p;if(t._linkedWithPrePass){if(!t._prePassRenderer.enabled)return;t._scene.getEngine().bindAttachments(t._attachments)}if(d.length){for(e.setColorWrite(!1),p=0;p=samplesCount) -break; -vec2 offset=vUV+velocity*(hlim+float(i)); -result+=texture2D(textureSampler,offset); -} -gl_FragColor=result/float(samplesCount); -gl_FragColor.a=1.0; -#else -vec2 texelSize=1.0/screenSize; -float depth=texture2D(depthSampler,vUV).r; -vec4 cpos=vec4(vUV*2.0-1.0,depth,1.0); -cpos=cpos*inverseViewProjection; -vec4 ppos=cpos*prevViewProjection; -ppos.xyz/=ppos.w; -ppos.xy=ppos.xy*0.5+0.5; -vec2 velocity=(ppos.xy-vUV)*motionScale*motionStrength; -float speed=length(velocity/texelSize); -int nSamples=int(clamp(speed,1.0,SAMPLES)); -vec4 result=texture2D(textureSampler,vUV); -for (int i=1; i=nSamples) -break; -vec2 offset1=vUV+velocity*(float(i)/float(nSamples-1)-0.5); -result+=texture2D(textureSampler,offset1); -} -gl_FragColor=result/float(nSamples); -#endif -#else -gl_FragColor=texture2D(textureSampler,vUV); -#endif -} -`;je.a.ShadersStore.motionBlurPixelShader=yg;var Qc=function(r){function t(e,n,i,o,a,s,d,p,y,C){p===void 0&&(p=h.a.TEXTURETYPE_UNSIGNED_INT),y===void 0&&(y=!1),C===void 0&&(C=!0);var M=r.call(this,e,"motionBlur",["motionStrength","motionScale","screenSize","inverseViewProjection","prevViewProjection"],["velocitySampler"],i,o,a,s,d,`#define GEOMETRY_SUPPORTED -#define SAMPLES 64.0 -#define OBJECT_BASED`,p,void 0,null,y)||this;return M.motionStrength=1,M._motionBlurSamples=32,M._isObjectBased=!0,M._forceGeometryBuffer=!1,M._geometryBufferRenderer=null,M._prePassRenderer=null,M._invViewProjection=null,M._previousViewProjection=null,M._forceGeometryBuffer=C,M._forceGeometryBuffer?(M._geometryBufferRenderer=n.enableGeometryBufferRenderer(),M._geometryBufferRenderer&&(M._geometryBufferRenderer.enableVelocity=!0)):(M._prePassRenderer=n.enablePrePassRenderer(),M._prePassRenderer&&(M._prePassRenderer.markAsDirty(),M._prePassEffectConfiguration=new bg)),M._applyMode(),M}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"motionBlurSamples",{get:function(){return this._motionBlurSamples},set:function(e){this._motionBlurSamples=e,this._updateEffect()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isObjectBased",{get:function(){return this._isObjectBased},set:function(e){this._isObjectBased!==e&&(this._isObjectBased=e,this._applyMode())},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"MotionBlurPostProcess"},t.prototype.excludeSkinnedMesh=function(e){if(e.skeleton){var n=void 0;if(this._geometryBufferRenderer)n=this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity;else{if(!this._prePassRenderer)return;n=this._prePassRenderer.excludedSkinnedMesh}n.push(e)}},t.prototype.removeExcludedSkinnedMesh=function(e){if(e.skeleton){var n=void 0;if(this._geometryBufferRenderer)n=this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity;else{if(!this._prePassRenderer)return;n=this._prePassRenderer.excludedSkinnedMesh}var i=n.indexOf(e);i!==-1&&n.splice(i,1)}},t.prototype.dispose=function(e){this._geometryBufferRenderer&&(this._geometryBufferRenderer._previousTransformationMatrices={},this._geometryBufferRenderer._previousBonesTransformationMatrices={},this._geometryBufferRenderer.excludedSkinnedMeshesFromVelocity=[]),r.prototype.dispose.call(this,e)},t.prototype._applyMode=function(){var e=this;if(!this._geometryBufferRenderer&&!this._prePassRenderer)return u.a.Warn("Multiple Render Target support needed to compute object based motion blur"),this.updateEffect();this._updateEffect(),this._invViewProjection=null,this._previousViewProjection=null,this.isObjectBased?(this._prePassRenderer&&this._prePassEffectConfiguration&&(this._prePassEffectConfiguration.texturesRequired[0]=h.a.PREPASS_VELOCITY_TEXTURE_TYPE),this.onApply=function(n){return e._onApplyObjectBased(n)}):(this._invViewProjection=l.a.Identity(),this._previousViewProjection=l.a.Identity(),this._prePassRenderer&&this._prePassEffectConfiguration&&(this._prePassEffectConfiguration.texturesRequired[0]=h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE),this.onApply=function(n){return e._onApplyScreenBased(n)})},t.prototype._onApplyObjectBased=function(e){if(e.setVector2("screenSize",new l.d(this.width,this.height)),e.setFloat("motionScale",this._scene.getAnimationRatio()),e.setFloat("motionStrength",this.motionStrength),this._geometryBufferRenderer){var n=this._geometryBufferRenderer.getTextureIndex(ui.VELOCITY_TEXTURE_TYPE);e.setTexture("velocitySampler",this._geometryBufferRenderer.getGBuffer().textures[n])}else this._prePassRenderer&&(n=this._prePassRenderer.getIndex(h.a.PREPASS_VELOCITY_TEXTURE_TYPE),e.setTexture("velocitySampler",this._prePassRenderer.prePassRT.textures[n]))},t.prototype._onApplyScreenBased=function(e){var n=this._scene.getProjectionMatrix().multiply(this._scene.getViewMatrix());if(n.invertToRef(this._invViewProjection),e.setMatrix("inverseViewProjection",this._invViewProjection),e.setMatrix("prevViewProjection",this._previousViewProjection),this._previousViewProjection=n,e.setVector2("screenSize",new l.d(this.width,this.height)),e.setFloat("motionScale",this._scene.getAnimationRatio()),e.setFloat("motionStrength",this.motionStrength),this._geometryBufferRenderer){var i=this._geometryBufferRenderer.getTextureIndex(ui.DEPTHNORMAL_TEXTURE_TYPE);e.setTexture("depthSampler",this._geometryBufferRenderer.getGBuffer().textures[i])}else this._prePassRenderer&&(i=this._prePassRenderer.getIndex(h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE),e.setTexture("depthSampler",this._prePassRenderer.prePassRT.textures[i]))},t.prototype._updateEffect=function(){if(this._geometryBufferRenderer||this._prePassRenderer){var e=["#define GEOMETRY_SUPPORTED","#define SAMPLES "+this._motionBlurSamples.toFixed(1),this._isObjectBased?"#define OBJECT_BASED":"#define SCREEN_BASED"];this.updateEffect(e.join(` -`))}},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,i,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable,e.textureType,!1)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"motionStrength",void 0),Object(c.c)([Object(L.c)()],t.prototype,"motionBlurSamples",null),Object(c.c)([Object(L.c)()],t.prototype,"isObjectBased",null),t}(_t);R.a.RegisteredTypes["BABYLON.MotionBlurPostProcess"]=Qc;var Tg=` -varying vec2 vUV; -uniform sampler2D textureSampler; -uniform sampler2D refractionSampler; - -uniform vec3 baseColor; -uniform float depth; -uniform float colorLevel; -void main() { -float ref=1.0-texture2D(refractionSampler,vUV).r; -vec2 uv=vUV-vec2(0.5); -vec2 offset=uv*depth*ref; -vec3 sourceColor=texture2D(textureSampler,vUV-offset).rgb; -gl_FragColor=vec4(sourceColor+sourceColor*ref*colorLevel,1.0); -}`;je.a.ShadersStore.refractionPixelShader=Tg;var kd=function(r){function t(e,n,i,o,a,s,d,p,y,C){var M=r.call(this,e,"refraction",["baseColor","depth","colorLevel"],["refractionSampler"],s,d,p,y,C)||this;return M._ownRefractionTexture=!0,M.color=i,M.depth=o,M.colorLevel=a,M.refractionTextureUrl=n,M.onActivateObservable.add(function(U){M._refTexture=M._refTexture||new we.a(n,U.getScene())}),M.onApplyObservable.add(function(U){U.setColor3("baseColor",M.color),U.setFloat("depth",M.depth),U.setFloat("colorLevel",M.colorLevel),U.setTexture("refractionSampler",M._refTexture)}),M}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"refractionTexture",{get:function(){return this._refTexture},set:function(e){this._refTexture&&this._ownRefractionTexture&&this._refTexture.dispose(),this._refTexture=e,this._ownRefractionTexture=!1},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"RefractionPostProcess"},t.prototype.dispose=function(e){this._refTexture&&this._ownRefractionTexture&&(this._refTexture.dispose(),this._refTexture=null),r.prototype.dispose.call(this,e)},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.refractionTextureUrl,e.color,e.depth,e.colorLevel,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"color",void 0),Object(c.c)([Object(L.c)()],t.prototype,"depth",void 0),Object(c.c)([Object(L.c)()],t.prototype,"colorLevel",void 0),Object(c.c)([Object(L.c)()],t.prototype,"refractionTextureUrl",void 0),t}(_t);R.a.RegisteredTypes["BABYLON.RefractionPostProcess"]=kd;var Eg=` -varying vec2 vUV; -uniform sampler2D textureSampler; -uniform vec2 screenSize; -uniform vec2 sharpnessAmounts; -void main(void) -{ -vec2 onePixel=vec2(1.0,1.0)/screenSize; -vec4 color=texture2D(textureSampler,vUV); -vec4 edgeDetection=texture2D(textureSampler,vUV+onePixel*vec2(0,-1)) + -texture2D(textureSampler,vUV+onePixel*vec2(-1,0)) + -texture2D(textureSampler,vUV+onePixel*vec2(1,0)) + -texture2D(textureSampler,vUV+onePixel*vec2(0,1)) - -color*4.0; -gl_FragColor=max(vec4(color.rgb*sharpnessAmounts.y,color.a)-(sharpnessAmounts.x*vec4(edgeDetection.rgb,0)),0.); -}`;je.a.ShadersStore.sharpenPixelShader=Eg;var qc=function(r){function t(e,n,i,o,a,s,d,p){d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT),p===void 0&&(p=!1);var y=r.call(this,e,"sharpen",["sharpnessAmounts","screenSize"],null,n,i,o,a,s,null,d,void 0,null,p)||this;return y.colorAmount=1,y.edgeAmount=.3,y.onApply=function(C){C.setFloat2("screenSize",y.width,y.height),C.setFloat2("sharpnessAmounts",y.edgeAmount,y.colorAmount)},y}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"SharpenPostProcess"},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.textureType,e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"colorAmount",void 0),Object(c.c)([Object(L.c)()],t.prototype,"edgeAmount",void 0),t}(_t);R.a.RegisteredTypes["BABYLON.SharpenPostProcess"]=qc;var kr=function(){function r(t,e){this.engine=t,this._name=e,this._renderEffects={},this._renderEffectsForIsolatedPass=new Array,this._cameras=[]}return Object.defineProperty(r.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cameras",{get:function(){return this._cameras},enumerable:!1,configurable:!0}),r.prototype.getClassName=function(){return"PostProcessRenderPipeline"},Object.defineProperty(r.prototype,"isSupported",{get:function(){for(var t in this._renderEffects)if(this._renderEffects.hasOwnProperty(t)&&!this._renderEffects[t].isSupported)return!1;return!0},enumerable:!1,configurable:!0}),r.prototype.addEffect=function(t){this._renderEffects[t._name]=t},r.prototype._rebuild=function(){},r.prototype._enableEffect=function(t,e){var n=this._renderEffects[t];n&&n._enable(Ye.b.MakeArray(e||this._cameras))},r.prototype._disableEffect=function(t,e){var n=this._renderEffects[t];n&&n._disable(Ye.b.MakeArray(e||this._cameras))},r.prototype._attachCameras=function(t,e){var n=Ye.b.MakeArray(t||this._cameras);if(n){var i,o=[];for(i=0;i0){var n=this._renderEffects[e[0]].getPostProcesses();n&&(n[0].samples=t)}return!0},r.prototype.setPrePassRenderer=function(t){return!1},r.prototype.dispose=function(){},Object(c.c)([Object(L.c)()],r.prototype,"_name",void 0),r}(),Gd=function(){function r(){this._renderPipelines={}}return Object.defineProperty(r.prototype,"supportedPipelines",{get:function(){var t=[];for(var e in this._renderPipelines)if(this._renderPipelines.hasOwnProperty(e)){var n=this._renderPipelines[e];n.isSupported&&t.push(n)}return t},enumerable:!1,configurable:!0}),r.prototype.addPipeline=function(t){this._renderPipelines[t._name]=t},r.prototype.attachCamerasToRenderPipeline=function(t,e,n){n===void 0&&(n=!1);var i=this._renderPipelines[t];i&&i._attachCameras(e,n)},r.prototype.detachCamerasFromRenderPipeline=function(t,e){var n=this._renderPipelines[t];n&&n._detachCameras(e)},r.prototype.enableEffectInPipeline=function(t,e,n){var i=this._renderPipelines[t];i&&i._enableEffect(e,n)},r.prototype.disableEffectInPipeline=function(t,e,n){var i=this._renderPipelines[t];i&&i._disableEffect(e,n)},r.prototype.update=function(){for(var t in this._renderPipelines)if(this._renderPipelines.hasOwnProperty(t)){var e=this._renderPipelines[t];e.isSupported?e._update():(e.dispose(),delete this._renderPipelines[t])}},r.prototype._rebuild=function(){for(var t in this._renderPipelines)this._renderPipelines.hasOwnProperty(t)&&this._renderPipelines[t]._rebuild()},r.prototype.dispose=function(){for(var t in this._renderPipelines)this._renderPipelines.hasOwnProperty(t)&&this._renderPipelines[t].dispose()},r}();Object.defineProperty(_e.a.prototype,"postProcessRenderPipelineManager",{get:function(){if(!this._postProcessRenderPipelineManager){var r=this._getComponent(st.a.NAME_POSTPROCESSRENDERPIPELINEMANAGER);r||(r=new zd(this),this._addComponent(r)),this._postProcessRenderPipelineManager=new Gd}return this._postProcessRenderPipelineManager},enumerable:!0,configurable:!0});var zd=function(){function r(t){this.name=st.a.NAME_POSTPROCESSRENDERPIPELINEMANAGER,this.scene=t}return r.prototype.register=function(){this.scene._gatherRenderTargetsStage.registerStep(st.a.STEP_GATHERRENDERTARGETS_POSTPROCESSRENDERPIPELINEMANAGER,this,this._gatherRenderTargets)},r.prototype.rebuild=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager._rebuild()},r.prototype.dispose=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager.dispose()},r.prototype._gatherRenderTargets=function(){this.scene._postProcessRenderPipelineManager&&this.scene._postProcessRenderPipelineManager.update()},r}(),jd=function(r){function t(e,n,i,o,a){e===void 0&&(e=""),n===void 0&&(n=!0),i===void 0&&(i=te.a.LastCreatedScene),a===void 0&&(a=!0);var s=r.call(this,i.getEngine(),e)||this;s._camerasToBeAttached=[],s.SharpenPostProcessId="SharpenPostProcessEffect",s.ImageProcessingPostProcessId="ImageProcessingPostProcessEffect",s.FxaaPostProcessId="FxaaPostProcessEffect",s.ChromaticAberrationPostProcessId="ChromaticAberrationPostProcessEffect",s.GrainPostProcessId="GrainPostProcessEffect",s._glowLayer=null,s.animations=[],s._imageProcessingConfigurationObserver=null,s._sharpenEnabled=!1,s._bloomEnabled=!1,s._depthOfFieldEnabled=!1,s._depthOfFieldBlurLevel=sr.Low,s._fxaaEnabled=!1,s._imageProcessingEnabled=!0,s._bloomScale=.5,s._chromaticAberrationEnabled=!1,s._grainEnabled=!1,s._buildAllowed=!0,s.onBuildObservable=new P.c,s._resizeObserver=null,s._hardwareScaleLevel=1,s._bloomKernel=64,s._bloomWeight=.15,s._bloomThreshold=.9,s._samples=1,s._hasCleared=!1,s._prevPostProcess=null,s._prevPrevPostProcess=null,s._depthOfFieldSceneObserver=null,s._cameras=o||i.cameras,s._cameras=s._cameras.slice(),s._camerasToBeAttached=s._cameras.slice(),s._buildAllowed=a,s._scene=i;var d=s._scene.getEngine().getCaps();s._hdr=n&&(d.textureHalfFloatRender||d.textureFloatRender),s._hdr?d.textureHalfFloatRender?s._defaultPipelineTextureType=h.a.TEXTURETYPE_HALF_FLOAT:d.textureFloatRender&&(s._defaultPipelineTextureType=h.a.TEXTURETYPE_FLOAT):s._defaultPipelineTextureType=h.a.TEXTURETYPE_UNSIGNED_INT,i.postProcessRenderPipelineManager.addPipeline(s);var p=s._scene.getEngine();return s.sharpen=new qc("sharpen",1,null,we.a.BILINEAR_SAMPLINGMODE,p,!1,s._defaultPipelineTextureType,!0),s._sharpenEffect=new Rt(p,s.SharpenPostProcessId,function(){return s.sharpen},!0),s.depthOfField=new Yc(s._scene,null,s._depthOfFieldBlurLevel,s._defaultPipelineTextureType,!0),s.bloom=new Hc(s._scene,s._bloomScale,s._bloomWeight,s.bloomKernel,s._defaultPipelineTextureType,!0),s.chromaticAberration=new Wc("ChromaticAberration",p.getRenderWidth(),p.getRenderHeight(),1,null,we.a.BILINEAR_SAMPLINGMODE,p,!1,s._defaultPipelineTextureType,!0),s._chromaticAberrationEffect=new Rt(p,s.ChromaticAberrationPostProcessId,function(){return s.chromaticAberration},!0),s.grain=new Kc("Grain",1,null,we.a.BILINEAR_SAMPLINGMODE,p,!1,s._defaultPipelineTextureType,!0),s._grainEffect=new Rt(p,s.GrainPostProcessId,function(){return s.grain},!0),s._resizeObserver=p.onResizeObservable.add(function(){s._hardwareScaleLevel=p.getHardwareScalingLevel(),s.bloomKernel=s.bloomKernel}),s._imageProcessingConfigurationObserver=s._scene.imageProcessingConfiguration.onUpdateParameters.add(function(){s.bloom._downscale._exposure=s._scene.imageProcessingConfiguration.exposure,s.imageProcessingEnabled!==s._scene.imageProcessingConfiguration.isEnabled&&(s._imageProcessingEnabled=s._scene.imageProcessingConfiguration.isEnabled,s._buildPipeline())}),s._buildPipeline(),s}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sharpenEnabled",{get:function(){return this._sharpenEnabled},set:function(e){this._sharpenEnabled!==e&&(this._sharpenEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomKernel",{get:function(){return this._bloomKernel},set:function(e){this._bloomKernel=e,this.bloom.kernel=e/this._hardwareScaleLevel},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomWeight",{get:function(){return this._bloomWeight},set:function(e){this._bloomWeight!==e&&(this.bloom.weight=e,this._bloomWeight=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomThreshold",{get:function(){return this._bloomThreshold},set:function(e){this._bloomThreshold!==e&&(this.bloom.threshold=e,this._bloomThreshold=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomScale",{get:function(){return this._bloomScale},set:function(e){this._bloomScale!==e&&(this._bloomScale=e,this._rebuildBloom(),this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bloomEnabled",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),t.prototype._rebuildBloom=function(){var e=this.bloom;this.bloom=new Hc(this._scene,this.bloomScale,this._bloomWeight,this.bloomKernel,this._defaultPipelineTextureType,!1),this.bloom.threshold=e.threshold;for(var n=0;n1){for(var i=0,o=this._cameras;i-1&&(e.depthOfField.depthTexture=d.enableDepthRenderer(d.activeCamera).getDepthMap())})}else{this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);var s=this._scene.enableDepthRenderer(this._cameras[0]);this.depthOfField.depthTexture=s.getDepthMap()}this.depthOfField._isReady()||this.depthOfField._updateEffects(),this.addEffect(this.depthOfField),this._setAutoClearAndTextureSharing(this.depthOfField._effects[0],!0)}else this._scene.onAfterRenderTargetsRenderObservable.remove(this._depthOfFieldSceneObserver);this.bloomEnabled&&(this.bloom._isReady()||this.bloom._updateEffects(),this.addEffect(this.bloom),this._setAutoClearAndTextureSharing(this.bloom._effects[0],!0)),this._imageProcessingEnabled&&(this.imageProcessing=new Xo("imageProcessing",1,null,we.a.BILINEAR_SAMPLINGMODE,n,!1,this._defaultPipelineTextureType),this._hdr?(this.addEffect(new Rt(n,this.ImageProcessingPostProcessId,function(){return e.imageProcessing},!0)),this._setAutoClearAndTextureSharing(this.imageProcessing)):this._scene.imageProcessingConfiguration.applyByPostProcess=!1,this.cameras&&this.cameras.length!==0||(this._scene.imageProcessingConfiguration.applyByPostProcess=!1),this.imageProcessing.getEffect()||this.imageProcessing._updateParameters()),this.sharpenEnabled&&(this.sharpen.isReady()||this.sharpen.updateEffect(),this.addEffect(this._sharpenEffect),this._setAutoClearAndTextureSharing(this.sharpen)),this.grainEnabled&&(this.grain.isReady()||this.grain.updateEffect(),this.addEffect(this._grainEffect),this._setAutoClearAndTextureSharing(this.grain)),this.chromaticAberrationEnabled&&(this.chromaticAberration.isReady()||this.chromaticAberration.updateEffect(),this.addEffect(this._chromaticAberrationEffect),this._setAutoClearAndTextureSharing(this.chromaticAberration)),this.fxaaEnabled&&(this.fxaa=new Mo("fxaa",1,null,we.a.BILINEAR_SAMPLINGMODE,n,!1,this._defaultPipelineTextureType),this.addEffect(new Rt(n,this.FxaaPostProcessId,function(){return e.fxaa},!0)),this._setAutoClearAndTextureSharing(this.fxaa,!0)),this._cameras!==null&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),this._scene.activeCameras&&this._scene.activeCameras.length>1&&(this._scene.autoClear=!0),!this._enableMSAAOnFirstPostProcess(this.samples)&&this.samples>1&&u.a.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0"),this.onBuildObservable.notifyObservers(this)}},t.prototype._disposePostProcesses=function(e){e===void 0&&(e=!1);for(var n=0;n1.0) { lum_threshold=0.94+0.01*threshold; } -else { lum_threshold=0.5+0.44*threshold; } -luminance=clamp((luminance-lum_threshold)*(1.0/(1.0-lum_threshold)),0.0,1.0); -highlight*=luminance*gain; -highlight.a=1.0; -return highlight; -} -void main(void) -{ -vec4 original=texture2D(textureSampler,vUV); - -if (gain == -1.0) { -gl_FragColor=vec4(0.0,0.0,0.0,1.0); -return; -} -float w=2.0/screen_width; -float h=2.0/screen_height; -float weight=1.0; - -vec4 blurred=vec4(0.0,0.0,0.0,0.0); -#ifdef PENTAGON -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.84*w,0.43*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.48*w,-1.29*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.61*w,1.51*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.55*w,-0.74*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.71*w,-0.52*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.94*w,1.59*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.40*w,-1.87*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.62*w,1.16*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.09*w,0.25*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.46*w,-1.71*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.08*w,2.42*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.85*w,-1.89*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.89*w,0.16*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.29*w,1.88*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.40*w,-2.81*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.54*w,2.26*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.60*w,-0.61*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.31*w,-1.30*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.83*w,2.53*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.12*w,-2.48*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.60*w,1.11*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.99*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.50*w,-2.81*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.85*w,3.33*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.94*w,-1.92*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.27*w,-0.53*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.95*w,2.48*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.23*w,-3.04*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.17*w,2.05*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.97*w,-0.04*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.25*w,-2.00*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.31*w,3.08*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.94*w,-2.59*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.37*w,0.64*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.13*w,1.93*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.03*w,-3.65*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.60*w,3.17*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.14*w,-1.19*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.00*w,-1.19*h))); -#else -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.85*w,0.36*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.52*w,-1.14*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.46*w,1.42*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.46*w,-0.83*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.79*w,-0.42*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.11*w,1.62*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.29*w,-2.07*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.69*w,1.39*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.28*w,0.12*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.65*w,-1.69*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.08*w,2.44*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.63*w,-1.90*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.55*w,0.31*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.13*w,1.52*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.56*w,-2.61*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.38*w,2.34*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.64*w,-0.81*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.53*w,-1.21*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.06*w,2.63*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.00*w,-2.69*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.59*w,1.32*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.82*w,0.78*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.57*w,-2.50*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(0.54*w,2.93*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.39*w,-1.81*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,-0.28*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.04*w,2.25*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.02*w,-3.05*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.09*w,2.25*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-3.07*w,-0.25*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.44*w,-1.90*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-0.52*w,3.05*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-1.68*w,-2.61*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(3.01*w,0.79*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.76*w,1.46*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.05*w,-2.94*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(1.21*w,2.88*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(-2.84*w,-1.30*h))); -blurred+=highlightColor(texture2D(textureSampler,vUV+vec2(2.98*w,-0.96*h))); -#endif -blurred/=39.0; -gl_FragColor=blurred; - -}`;je.a.ShadersStore.lensHighlightsPixelShader=Sg;var Ag=` - - - - -uniform sampler2D textureSampler; -uniform sampler2D highlightsSampler; -uniform sampler2D depthSampler; -uniform sampler2D grainSampler; - -uniform float grain_amount; -uniform bool blur_noise; -uniform float screen_width; -uniform float screen_height; -uniform float distortion; -uniform bool dof_enabled; - -uniform float screen_distance; -uniform float aperture; -uniform float darken; -uniform float edge_blur; -uniform bool highlights; - -uniform float near; -uniform float far; - -varying vec2 vUV; - -#define PI 3.14159265 -#define TWOPI 6.28318530 -#define inverse_focal_length 0.1 - -vec2 centered_screen_pos; -vec2 distorted_coords; -float radius2; -float radius; - -vec2 rand(vec2 co) -{ -float noise1=(fract(sin(dot(co,vec2(12.9898,78.233)))*43758.5453)); -float noise2=(fract(sin(dot(co,vec2(12.9898,78.233)*2.0))*43758.5453)); -return clamp(vec2(noise1,noise2),0.0,1.0); -} - -vec2 getDistortedCoords(vec2 coords) { -if (distortion == 0.0) { return coords; } -vec2 direction=1.0*normalize(centered_screen_pos); -vec2 dist_coords=vec2(0.5,0.5); -dist_coords.x=0.5+direction.x*radius2*1.0; -dist_coords.y=0.5+direction.y*radius2*1.0; -float dist_amount=clamp(distortion*0.23,0.0,1.0); -dist_coords=mix(coords,dist_coords,dist_amount); -return dist_coords; -} - -float sampleScreen(inout vec4 color,const in vec2 offset,const in float weight) { - -vec2 coords=distorted_coords; -float angle=rand(coords*100.0).x*TWOPI; -coords+=vec2(offset.x*cos(angle)-offset.y*sin(angle),offset.x*sin(angle)+offset.y*cos(angle)); -color+=texture2D(textureSampler,coords)*weight; -return weight; -} - -float getBlurLevel(float size) { -return min(3.0,ceil(size/1.0)); -} - -vec4 getBlurColor(float size) { -vec4 col=texture2D(textureSampler,distorted_coords); -if (size == 0.0) { return col; } - - -float blur_level=getBlurLevel(size); -float w=(size/screen_width); -float h=(size/screen_height); -float total_weight=1.0; -vec2 sample_coords; -total_weight+=sampleScreen(col,vec2(-0.50*w,0.24*h),0.93); -total_weight+=sampleScreen(col,vec2(0.30*w,-0.75*h),0.90); -total_weight+=sampleScreen(col,vec2(0.36*w,0.96*h),0.87); -total_weight+=sampleScreen(col,vec2(-1.08*w,-0.55*h),0.85); -total_weight+=sampleScreen(col,vec2(1.33*w,-0.37*h),0.83); -total_weight+=sampleScreen(col,vec2(-0.82*w,1.31*h),0.80); -total_weight+=sampleScreen(col,vec2(-0.31*w,-1.67*h),0.78); -total_weight+=sampleScreen(col,vec2(1.47*w,1.11*h),0.76); -total_weight+=sampleScreen(col,vec2(-1.97*w,0.19*h),0.74); -total_weight+=sampleScreen(col,vec2(1.42*w,-1.57*h),0.72); -if (blur_level>1.0) { -total_weight+=sampleScreen(col,vec2(0.01*w,2.25*h),0.70); -total_weight+=sampleScreen(col,vec2(-1.62*w,-1.74*h),0.67); -total_weight+=sampleScreen(col,vec2(2.49*w,0.20*h),0.65); -total_weight+=sampleScreen(col,vec2(-2.07*w,1.61*h),0.63); -total_weight+=sampleScreen(col,vec2(0.46*w,-2.70*h),0.61); -total_weight+=sampleScreen(col,vec2(1.55*w,2.40*h),0.59); -total_weight+=sampleScreen(col,vec2(-2.88*w,-0.75*h),0.56); -total_weight+=sampleScreen(col,vec2(2.73*w,-1.44*h),0.54); -total_weight+=sampleScreen(col,vec2(-1.08*w,3.02*h),0.52); -total_weight+=sampleScreen(col,vec2(-1.28*w,-3.05*h),0.49); -} -if (blur_level>2.0) { -total_weight+=sampleScreen(col,vec2(3.11*w,1.43*h),0.46); -total_weight+=sampleScreen(col,vec2(-3.36*w,1.08*h),0.44); -total_weight+=sampleScreen(col,vec2(1.80*w,-3.16*h),0.41); -total_weight+=sampleScreen(col,vec2(0.83*w,3.65*h),0.38); -total_weight+=sampleScreen(col,vec2(-3.16*w,-2.19*h),0.34); -total_weight+=sampleScreen(col,vec2(3.92*w,-0.53*h),0.31); -total_weight+=sampleScreen(col,vec2(-2.59*w,3.12*h),0.26); -total_weight+=sampleScreen(col,vec2(-0.20*w,-4.15*h),0.22); -total_weight+=sampleScreen(col,vec2(3.02*w,3.00*h),0.15); -} -col/=total_weight; - -if (darken>0.0) { -col.rgb*=clamp(0.3,1.0,1.05-size*0.5*darken); -} - - - - -return col; -} -void main(void) -{ - -centered_screen_pos=vec2(vUV.x-0.5,vUV.y-0.5); -radius2=centered_screen_pos.x*centered_screen_pos.x+centered_screen_pos.y*centered_screen_pos.y; -radius=sqrt(radius2); -distorted_coords=getDistortedCoords(vUV); -vec2 texels_coords=vec2(vUV.x*screen_width,vUV.y*screen_height); -float depth=texture2D(depthSampler,distorted_coords).r; -float distance=near+(far-near)*depth; -vec4 color=texture2D(textureSampler,vUV); - - -float coc=abs(aperture*(screen_distance*(inverse_focal_length-1.0/distance)-1.0)); - -if (dof_enabled == false || coc<0.07) { coc=0.0; } - -float edge_blur_amount=0.0; -if (edge_blur>0.0) { -edge_blur_amount=clamp((radius*2.0-1.0+0.15*edge_blur)*1.5,0.0,1.0)*1.3; -} - -float blur_amount=max(edge_blur_amount,coc); - -if (blur_amount == 0.0) { -gl_FragColor=texture2D(textureSampler,distorted_coords); -} -else { - -gl_FragColor=getBlurColor(blur_amount*1.7); - -if (highlights) { -gl_FragColor.rgb+=clamp(coc,0.0,1.0)*texture2D(highlightsSampler,distorted_coords).rgb; -} -if (blur_noise) { - -vec2 noise=rand(distorted_coords)*0.01*blur_amount; -vec2 blurred_coord=vec2(distorted_coords.x+noise.x,distorted_coords.y+noise.y); -gl_FragColor=0.04*texture2D(textureSampler,blurred_coord)+0.96*gl_FragColor; -} -} - -if (grain_amount>0.0) { -vec4 grain_color=texture2D(grainSampler,texels_coords*0.003); -gl_FragColor.rgb+=(-0.5+grain_color.rgb)*0.30*grain_amount; -} -} -`;je.a.ShadersStore.depthOfFieldPixelShader=Ag;var Pg=function(r){function t(e,n,i,o,a){o===void 0&&(o=1);var s=r.call(this,i.getEngine(),e)||this;return s.LensChromaticAberrationEffect="LensChromaticAberrationEffect",s.HighlightsEnhancingEffect="HighlightsEnhancingEffect",s.LensDepthOfFieldEffect="LensDepthOfFieldEffect",s._pentagonBokehIsEnabled=!1,s._scene=i,s._depthTexture=i.enableDepthRenderer().getDepthMap(),n.grain_texture?s._grainTexture=n.grain_texture:s._createGrainTexture(),s._edgeBlur=n.edge_blur?n.edge_blur:0,s._grainAmount=n.grain_amount?n.grain_amount:0,s._chromaticAberration=n.chromatic_aberration?n.chromatic_aberration:0,s._distortion=n.distortion?n.distortion:0,s._highlightsGain=n.dof_gain!==void 0?n.dof_gain:-1,s._highlightsThreshold=n.dof_threshold?n.dof_threshold:1,s._dofDistance=n.dof_focus_distance!==void 0?n.dof_focus_distance:-1,s._dofAperture=n.dof_aperture?n.dof_aperture:1,s._dofDarken=n.dof_darken?n.dof_darken:0,s._dofPentagon=n.dof_pentagon===void 0||n.dof_pentagon,s._blurNoise=n.blur_noise===void 0||n.blur_noise,s._createChromaticAberrationPostProcess(o),s._createHighlightsPostProcess(o),s._createDepthOfFieldPostProcess(o/4),s.addEffect(new Rt(i.getEngine(),s.LensChromaticAberrationEffect,function(){return s._chromaticAberrationPostProcess},!0)),s.addEffect(new Rt(i.getEngine(),s.HighlightsEnhancingEffect,function(){return s._highlightsPostProcess},!0)),s.addEffect(new Rt(i.getEngine(),s.LensDepthOfFieldEffect,function(){return s._depthOfFieldPostProcess},!0)),s._highlightsGain===-1&&s._disableEffect(s.HighlightsEnhancingEffect,null),i.postProcessRenderPipelineManager.addPipeline(s),a&&i.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(e,a),s}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"LensRenderingPipeline"},Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"edgeBlur",{get:function(){return this._edgeBlur},set:function(e){this.setEdgeBlur(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grainAmount",{get:function(){return this._grainAmount},set:function(e){this.setGrainAmount(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"chromaticAberration",{get:function(){return this._chromaticAberration},set:function(e){this.setChromaticAberration(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dofAperture",{get:function(){return this._dofAperture},set:function(e){this.setAperture(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"edgeDistortion",{get:function(){return this._distortion},set:function(e){this.setEdgeDistortion(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dofDistortion",{get:function(){return this._dofDistance},set:function(e){this.setFocusDistance(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"darkenOutOfFocus",{get:function(){return this._dofDarken},set:function(e){this.setDarkenOutOfFocus(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blurNoise",{get:function(){return this._blurNoise},set:function(e){this._blurNoise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pentagonBokeh",{get:function(){return this._pentagonBokehIsEnabled},set:function(e){e?this.enablePentagonBokeh():this.disablePentagonBokeh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlightsGain",{get:function(){return this._highlightsGain},set:function(e){this.setHighlightsGain(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlightsThreshold",{get:function(){return this._highlightsThreshold},set:function(e){this.setHighlightsThreshold(e)},enumerable:!1,configurable:!0}),t.prototype.setEdgeBlur=function(e){this._edgeBlur=e},t.prototype.disableEdgeBlur=function(){this._edgeBlur=0},t.prototype.setGrainAmount=function(e){this._grainAmount=e},t.prototype.disableGrain=function(){this._grainAmount=0},t.prototype.setChromaticAberration=function(e){this._chromaticAberration=e},t.prototype.disableChromaticAberration=function(){this._chromaticAberration=0},t.prototype.setEdgeDistortion=function(e){this._distortion=e},t.prototype.disableEdgeDistortion=function(){this._distortion=0},t.prototype.setFocusDistance=function(e){this._dofDistance=e},t.prototype.disableDepthOfField=function(){this._dofDistance=-1},t.prototype.setAperture=function(e){this._dofAperture=e},t.prototype.setDarkenOutOfFocus=function(e){this._dofDarken=e},t.prototype.enablePentagonBokeh=function(){this._highlightsPostProcess.updateEffect(`#define PENTAGON -`),this._pentagonBokehIsEnabled=!0},t.prototype.disablePentagonBokeh=function(){this._pentagonBokehIsEnabled=!1,this._highlightsPostProcess.updateEffect()},t.prototype.enableNoiseBlur=function(){this._blurNoise=!0},t.prototype.disableNoiseBlur=function(){this._blurNoise=!1},t.prototype.setHighlightsGain=function(e){this._highlightsGain=e},t.prototype.setHighlightsThreshold=function(e){this._highlightsGain===-1&&(this._highlightsGain=1),this._highlightsThreshold=e},t.prototype.disableHighlights=function(){this._highlightsGain=-1},t.prototype.dispose=function(e){e===void 0&&(e=!1),this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._scene.cameras),this._chromaticAberrationPostProcess=null,this._highlightsPostProcess=null,this._depthOfFieldPostProcess=null,this._grainTexture.dispose(),e&&this._scene.disableDepthRenderer()},t.prototype._createChromaticAberrationPostProcess=function(e){var n=this;this._chromaticAberrationPostProcess=new _t("LensChromaticAberration","chromaticAberration",["chromatic_aberration","screen_width","screen_height","direction","radialIntensity","centerPosition"],[],e,null,we.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._chromaticAberrationPostProcess.onApply=function(i){i.setFloat("chromatic_aberration",n._chromaticAberration),i.setFloat("screen_width",n._scene.getEngine().getRenderWidth()),i.setFloat("screen_height",n._scene.getEngine().getRenderHeight()),i.setFloat("radialIntensity",1),i.setFloat2("direction",17,17),i.setFloat2("centerPosition",.5,.5)}},t.prototype._createHighlightsPostProcess=function(e){var n=this;this._highlightsPostProcess=new _t("LensHighlights","lensHighlights",["gain","threshold","screen_width","screen_height"],[],e,null,we.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,this._dofPentagon?`#define PENTAGON -`:""),this._highlightsPostProcess.onApply=function(i){i.setFloat("gain",n._highlightsGain),i.setFloat("threshold",n._highlightsThreshold),i.setTextureFromPostProcess("textureSampler",n._chromaticAberrationPostProcess),i.setFloat("screen_width",n._scene.getEngine().getRenderWidth()),i.setFloat("screen_height",n._scene.getEngine().getRenderHeight())}},t.prototype._createDepthOfFieldPostProcess=function(e){var n=this;this._depthOfFieldPostProcess=new _t("LensDepthOfField","depthOfField",["grain_amount","blur_noise","screen_width","screen_height","distortion","dof_enabled","screen_distance","aperture","darken","edge_blur","highlights","near","far"],["depthSampler","grainSampler","highlightsSampler"],e,null,we.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1),this._depthOfFieldPostProcess.onApply=function(i){i.setTexture("depthSampler",n._depthTexture),i.setTexture("grainSampler",n._grainTexture),i.setTextureFromPostProcess("textureSampler",n._highlightsPostProcess),i.setTextureFromPostProcess("highlightsSampler",n._depthOfFieldPostProcess),i.setFloat("grain_amount",n._grainAmount),i.setBool("blur_noise",n._blurNoise),i.setFloat("screen_width",n._scene.getEngine().getRenderWidth()),i.setFloat("screen_height",n._scene.getEngine().getRenderHeight()),i.setFloat("distortion",n._distortion),i.setBool("dof_enabled",n._dofDistance!==-1),i.setFloat("screen_distance",1/(.1-1/n._dofDistance)),i.setFloat("aperture",n._dofAperture),i.setFloat("darken",n._dofDarken),i.setFloat("edge_blur",n._edgeBlur),i.setBool("highlights",n._highlightsGain!==-1),n._scene.activeCamera&&(i.setFloat("near",n._scene.activeCamera.minZ),i.setFloat("far",n._scene.activeCamera.maxZ))}},t.prototype._createGrainTexture=function(){this._grainTexture=new Si.a("LensNoiseTexture",512,this._scene,!1,we.a.BILINEAR_SAMPLINGMODE),this._grainTexture.wrapU=we.a.WRAP_ADDRESSMODE,this._grainTexture.wrapV=we.a.WRAP_ADDRESSMODE;for(var e,n,i,o=this._grainTexture.getContext(),a=0;a<512;a++)for(var s=0;s<512;s++)e=Math.floor(255*(n=.42,i=.58,Math.random()*(i-n)+n)),o.fillStyle="rgb("+e+", "+e+", "+e+")",o.fillRect(a,s,1,1);this._grainTexture.update(!1)},t}(kr),Cg=function(){this.enabled=!1,this.name="ssao2",this.texturesRequired=[h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE]},xg=` -precision highp float; -uniform sampler2D textureSampler; -uniform float near; -uniform float far; -uniform float radius; -float scales[16]=float[16]( -0.1, -0.11406250000000001, -0.131640625, -0.15625, -0.187890625, -0.2265625, -0.272265625, -0.325, -0.384765625, -0.4515625, -0.525390625, -0.60625, -0.694140625, -0.7890625, -0.891015625, -1.0 -); -varying vec2 vUV; -float perspectiveDepthToViewZ( const in float invClipZ,const in float near,const in float far ) { -return ( near*far )/( ( far-near )*invClipZ-far ); -} -float viewZToPerspectiveDepth( const in float viewZ,const in float near,const in float far ) { -return ( near*far/viewZ+far)/( far-near ); -} -float viewZToOrthographicDepth( const in float viewZ,const in float near,const in float far ) { -return ( viewZ+near )/( near-far ); -} -#ifdef SSAO -uniform sampler2D randomSampler; -#ifndef GEOMETRYBUFFER -uniform sampler2D depthNormalSampler; -#else -uniform sampler2D depthSampler; -uniform sampler2D normalSampler; -#endif -uniform float randTextureTiles; -uniform float samplesFactor; -uniform vec3 sampleSphere[SAMPLES]; -uniform float totalStrength; -uniform float base; -uniform float xViewport; -uniform float yViewport; -uniform float maxZ; -uniform float minZAspect; -uniform vec2 texelSize; -uniform mat4 projection; -void main() -{ -vec3 random=texture2D(randomSampler,vUV*randTextureTiles).rgb; -#ifndef GEOMETRYBUFFER -float depth=texture2D(depthNormalSampler,vUV).r; -#else -float depth=texture2D(depthSampler,vUV).r; -#endif -float depthSign=depth/abs(depth); -depth=depth*depthSign; -#ifndef GEOMETRYBUFFER -vec3 normal=texture2D(depthNormalSampler,vUV).gba; -#else -vec3 normal=texture2D(normalSampler,vUV).rgb; -#endif -float occlusion=0.0; -float correctedRadius=min(radius,minZAspect*depth/near); -vec3 vViewRay=vec3((vUV.x*2.0-1.0)*xViewport,(vUV.y*2.0-1.0)*yViewport,depthSign); -vec3 origin=vViewRay*depth; -vec3 rvec=random*2.0-1.0; -rvec.z=0.0; - -float dotProduct=dot(rvec,normal); -rvec=1.0-abs(dotProduct)>1e-2 ? rvec : vec3(-rvec.y,0.0,rvec.x); -vec3 tangent=normalize(rvec-normal*dot(rvec,normal)); -vec3 bitangent=cross(normal,tangent); -mat3 tbn=mat3(tangent,bitangent,normal); -float difference; -for (int i=0; i1.0 || offset.y>1.0) { -continue; -} - -#ifndef GEOMETRYBUFFER -float sampleDepth=abs(texture2D(depthNormalSampler,offset.xy).r); -#else -float sampleDepth=abs(texture2D(depthSampler,offset.xy).r); -#endif - -difference=depthSign*samplePosition.z-sampleDepth; -float rangeCheck=1.0-smoothstep(correctedRadius*0.5,correctedRadius,difference); -occlusion+=(difference>=0.0 ? 1.0 : 0.0)*rangeCheck; -} -occlusion=occlusion*(1.0-smoothstep(maxZ*0.75,maxZ,depth)); -float ao=1.0-totalStrength*occlusion*samplesFactor; -float result=clamp(ao+base,0.0,1.0); -gl_FragColor=vec4(vec3(result),1.0); -} -#endif -#ifdef BILATERAL_BLUR -uniform sampler2D depthNormalSampler; -uniform float outSize; -uniform float samplerOffsets[SAMPLES]; -vec4 blur9(sampler2D image,vec2 uv,float resolution,vec2 direction) { -vec4 color=vec4(0.0); -vec2 off1=vec2(1.3846153846)*direction; -vec2 off2=vec2(3.2307692308)*direction; -color+=texture2D(image,uv)*0.2270270270; -color+=texture2D(image,uv+(off1/resolution))*0.3162162162; -color+=texture2D(image,uv-(off1/resolution))*0.3162162162; -color+=texture2D(image,uv+(off2/resolution))*0.0702702703; -color+=texture2D(image,uv-(off2/resolution))*0.0702702703; -return color; -} -vec4 blur13(sampler2D image,vec2 uv,float resolution,vec2 direction) { -vec4 color=vec4(0.0); -vec2 off1=vec2(1.411764705882353)*direction; -vec2 off2=vec2(3.2941176470588234)*direction; -vec2 off3=vec2(5.176470588235294)*direction; -color+=texture2D(image,uv)*0.1964825501511404; -color+=texture2D(image,uv+(off1/resolution))*0.2969069646728344; -color+=texture2D(image,uv-(off1/resolution))*0.2969069646728344; -color+=texture2D(image,uv+(off2/resolution))*0.09447039785044732; -color+=texture2D(image,uv-(off2/resolution))*0.09447039785044732; -color+=texture2D(image,uv+(off3/resolution))*0.010381362401148057; -color+=texture2D(image,uv-(off3/resolution))*0.010381362401148057; -return color; -} -vec4 blur13Bilateral(sampler2D image,vec2 uv,float resolution,vec2 direction) { -vec4 color=vec4(0.0); -vec2 off1=vec2(1.411764705882353)*direction; -vec2 off2=vec2(3.2941176470588234)*direction; -vec2 off3=vec2(5.176470588235294)*direction; -float compareDepth=abs(texture2D(depthNormalSampler,uv).r); -float sampleDepth; -float weight; -float weightSum=30.0; -color+=texture2D(image,uv)*30.0; -sampleDepth=abs(texture2D(depthNormalSampler,uv+(off1/resolution)).r); -weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); -weightSum+=weight; -color+=texture2D(image,uv+(off1/resolution))*weight; -sampleDepth=abs(texture2D(depthNormalSampler,uv-(off1/resolution)).r); -weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); -weightSum+=weight; -color+=texture2D(image,uv-(off1/resolution))*weight; -sampleDepth=abs(texture2D(depthNormalSampler,uv+(off2/resolution)).r); -weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); -weightSum+=weight; -color+=texture2D(image,uv+(off2/resolution))*weight; -sampleDepth=abs(texture2D(depthNormalSampler,uv-(off2/resolution)).r); -weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); -weightSum+=weight; -color+=texture2D(image,uv-(off2/resolution))*weight; -sampleDepth=abs(texture2D(depthNormalSampler,uv+(off3/resolution)).r); -weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); -weightSum+=weight; -color+=texture2D(image,uv+(off3/resolution))*weight; -sampleDepth=abs(texture2D(depthNormalSampler,uv-(off3/resolution)).r); -weight=clamp(1.0/( 0.003+abs(compareDepth-sampleDepth)),0.0,30.0); -weightSum+=weight; -color+=texture2D(image,uv-(off3/resolution))*weight; -return color/weightSum; -} -void main() -{ -#if EXPENSIVE -float compareDepth=abs(texture2D(depthNormalSampler,vUV).r); -float texelsize=1.0/outSize; -float result=0.0; -float weightSum=0.0; -for (int i=0; i=2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"SSAO2RenderingPipeline"},t.prototype.dispose=function(e){e===void 0&&(e=!1);for(var n=0;n0?i._ssaoCombinePostProcess.width:i._originalColorPostProcess.width),s.setFloat("near",i._scene.activeCamera.minZ),s.setFloat("far",i._scene.activeCamera.maxZ),s.setFloat("radius",i.radius),i._forceGeometryBuffer?s.setTexture("depthNormalSampler",i._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]):s.setTexture("depthNormalSampler",i._prePassRenderer.prePassRT.textures[i._prePassRenderer.getIndex(h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE)]),s.setArray("samplerOffsets",i._samplerOffsets))},this._blurVPostProcess=new _t("BlurV","ssao2",["outSize","samplerOffsets","near","far","radius"],["depthNormalSampler"],n,null,we.a.TRILINEAR_SAMPLINGMODE,this._scene.getEngine(),!1,`#define BILATERAL_BLUR -#define BILATERAL_BLUR_V -#define SAMPLES 16 -#define EXPENSIVE `+(o?"1":"0")+` -`),this._blurVPostProcess.onApply=function(s){i._scene.activeCamera&&(s.setFloat("outSize",i._ssaoCombinePostProcess.height>0?i._ssaoCombinePostProcess.height:i._originalColorPostProcess.height),s.setFloat("near",i._scene.activeCamera.minZ),s.setFloat("far",i._scene.activeCamera.maxZ),s.setFloat("radius",i.radius),i._forceGeometryBuffer?s.setTexture("depthNormalSampler",i._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]):s.setTexture("depthNormalSampler",i._prePassRenderer.prePassRT.textures[i._prePassRenderer.getIndex(h.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE)]),s.setArray("samplerOffsets",i._samplerOffsets))},this._blurHPostProcess.samples=this.textureSamples,this._blurVPostProcess.samples=this.textureSamples},t.prototype._rebuild=function(){r.prototype._rebuild.call(this)},t.prototype._radicalInverse_VdC=function(e){return this._bits[0]=e,this._bits[0]=(this._bits[0]<<16|this._bits[0]>>16)>>>0,this._bits[0]=(1431655765&this._bits[0])<<1|(2863311530&this._bits[0])>>>1>>>0,this._bits[0]=(858993459&this._bits[0])<<2|(3435973836&this._bits[0])>>>2>>>0,this._bits[0]=(252645135&this._bits[0])<<4|(4042322160&this._bits[0])>>>4>>>0,this._bits[0]=(16711935&this._bits[0])<<8|(4278255360&this._bits[0])>>>8>>>0,23283064365386963e-26*this._bits[0]},t.prototype._hammersley=function(e,n){return[e/n,this._radicalInverse_VdC(e)]},t.prototype._hemisphereSample_uniform=function(e,n){var i=2*n*Math.PI,o=1-(.85*e+.15),a=Math.sqrt(1-o*o);return new l.e(Math.cos(i)*a,Math.sin(i)*a,o)},t.prototype._generateHemisphere=function(){for(var e,n=this.samples,i=[],o=0;o0.0) -hitCoord-=dir; -else -hitCoord+=dir; -info.color+=texture2D(textureSampler,projectedCoord.xy).rgb; -} -projectedCoord=projection*vec4(hitCoord,1.0); -projectedCoord.xy/=projectedCoord.w; -projectedCoord.xy=0.5*projectedCoord.xy+vec2(0.5); - -info.coords=vec4(projectedCoord.xy,sampledDepth,1.0); -info.color+=texture2D(textureSampler,projectedCoord.xy).rgb; -info.color/=float(SMOOTH_STEPS+1); -return info; -} - -ReflectionInfo getReflectionInfo(vec3 dir,vec3 hitCoord) -{ -ReflectionInfo info; -vec4 projectedCoord; -float sampledDepth; -dir*=step; -for(int i=0; i>0)),e.push("#define SMOOTH_STEPS "+(this._smoothSteps>>0)),this.updateEffect(e.join(` -`))},t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,i,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.textureType,e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"threshold",void 0),Object(c.c)([Object(L.c)()],t.prototype,"strength",void 0),Object(c.c)([Object(L.c)()],t.prototype,"reflectionSpecularFalloffExponent",void 0),Object(c.c)([Object(L.c)()],t.prototype,"step",void 0),Object(c.c)([Object(L.c)()],t.prototype,"roughnessFactor",void 0),Object(c.c)([Object(L.c)()],t.prototype,"enableSmoothReflections",null),Object(c.c)([Object(L.c)()],t.prototype,"reflectionSamples",null),Object(c.c)([Object(L.c)()],t.prototype,"smoothSteps",null),t}(_t);R.a.RegisteredTypes["BABYLON.ScreenSpaceReflectionPostProcess"]=Zc;var Lg=`uniform sampler2D textureSampler; -varying vec2 vUV; -#if defined(PASS_POST_PROCESS) -void main(void) -{ -vec4 color=texture2D(textureSampler,vUV); -gl_FragColor=color; -} -#endif -#if defined(DOWN_SAMPLE_X4) -uniform vec2 dsOffsets[16]; -void main(void) -{ -vec4 average=vec4(0.0,0.0,0.0,0.0); -average=texture2D(textureSampler,vUV+dsOffsets[0]); -average+=texture2D(textureSampler,vUV+dsOffsets[1]); -average+=texture2D(textureSampler,vUV+dsOffsets[2]); -average+=texture2D(textureSampler,vUV+dsOffsets[3]); -average+=texture2D(textureSampler,vUV+dsOffsets[4]); -average+=texture2D(textureSampler,vUV+dsOffsets[5]); -average+=texture2D(textureSampler,vUV+dsOffsets[6]); -average+=texture2D(textureSampler,vUV+dsOffsets[7]); -average+=texture2D(textureSampler,vUV+dsOffsets[8]); -average+=texture2D(textureSampler,vUV+dsOffsets[9]); -average+=texture2D(textureSampler,vUV+dsOffsets[10]); -average+=texture2D(textureSampler,vUV+dsOffsets[11]); -average+=texture2D(textureSampler,vUV+dsOffsets[12]); -average+=texture2D(textureSampler,vUV+dsOffsets[13]); -average+=texture2D(textureSampler,vUV+dsOffsets[14]); -average+=texture2D(textureSampler,vUV+dsOffsets[15]); -average/=16.0; -gl_FragColor=average; -} -#endif -#if defined(BRIGHT_PASS) -uniform vec2 dsOffsets[4]; -uniform float brightThreshold; -void main(void) -{ -vec4 average=vec4(0.0,0.0,0.0,0.0); -average=texture2D(textureSampler,vUV+vec2(dsOffsets[0].x,dsOffsets[0].y)); -average+=texture2D(textureSampler,vUV+vec2(dsOffsets[1].x,dsOffsets[1].y)); -average+=texture2D(textureSampler,vUV+vec2(dsOffsets[2].x,dsOffsets[2].y)); -average+=texture2D(textureSampler,vUV+vec2(dsOffsets[3].x,dsOffsets[3].y)); -average*=0.25; -float luminance=length(average.rgb); -if (luminanceshadowPixelDepth) -accumFog+=sunColor*computeScattering(dot(rayDirection,sunDirection)); -currentPosition+=stepL; -} -accumFog/=NB_STEPS; -vec3 color=accumFog*scatteringPower; -gl_FragColor=vec4(color*exp(color) ,1.0); -} -#endif -#if defined(VLSMERGE) -uniform sampler2D originalSampler; -void main(void) -{ -gl_FragColor=texture2D(originalSampler,vUV)+texture2D(textureSampler,vUV); -} -#endif -#if defined(LUMINANCE) -uniform vec2 lumOffsets[4]; -void main() -{ -float average=0.0; -vec4 color=vec4(0.0); -float maximum=-1e20; -vec3 weight=vec3(0.299,0.587,0.114); -for (int i=0; i<4; i++) -{ -color=texture2D(textureSampler,vUV+ lumOffsets[i]); - -float GreyValue=dot(color.rgb,vec3(0.33,0.33,0.33)); - -#ifdef WEIGHTED_AVERAGE -float GreyValue=dot(color.rgb,weight); -#endif -#ifdef BRIGHTNESS -float GreyValue=max(color.r,max(color.g,color.b)); -#endif -#ifdef HSL_COMPONENT -float GreyValue=0.5*(max(color.r,max(color.g,color.b))+min(color.r,min(color.g,color.b))); -#endif -#ifdef MAGNITUDE -float GreyValue=length(color.rgb); -#endif -maximum=max(maximum,GreyValue); -average+=(0.25*log(1e-5+GreyValue)); -} -average=exp(average); -gl_FragColor=vec4(average,maximum,0.0,1.0); -} -#endif -#if defined(LUMINANCE_DOWN_SAMPLE) -uniform vec2 dsOffsets[9]; -uniform float halfDestPixelSize; -#ifdef FINAL_DOWN_SAMPLER -#include -#endif -void main() -{ -vec4 color=vec4(0.0); -float average=0.0; -for (int i=0; i<9; i++) -{ -color=texture2D(textureSampler,vUV+vec2(halfDestPixelSize,halfDestPixelSize)+dsOffsets[i]); -average+=color.r; -} -average/=9.0; -#ifdef FINAL_DOWN_SAMPLER -gl_FragColor=pack(average); -#else -gl_FragColor=vec4(average,average,0.0,1.0); -#endif -} -#endif -#if defined(HDR) -uniform sampler2D textureAdderSampler; -uniform float averageLuminance; -void main() -{ -vec4 color=texture2D(textureAdderSampler,vUV); -#ifndef AUTO_EXPOSURE -vec4 adjustedColor=color/averageLuminance; -color=adjustedColor; -color.a=1.0; -#endif -gl_FragColor=color; -} -#endif -#if defined(LENS_FLARE) -#define GHOSTS 3 -uniform sampler2D lensColorSampler; -uniform float strength; -uniform float ghostDispersal; -uniform float haloWidth; -uniform vec2 resolution; -uniform float distortionStrength; -float hash(vec2 p) -{ -float h=dot(p,vec2(127.1,311.7)); -return -1.0+2.0*fract(sin(h)*43758.5453123); -} -float noise(in vec2 p) -{ -vec2 i=floor(p); -vec2 f=fract(p); -vec2 u=f*f*(3.0-2.0*f); -return mix(mix(hash(i+vec2(0.0,0.0)), -hash(i+vec2(1.0,0.0)),u.x), -mix(hash(i+vec2(0.0,1.0)), -hash(i+vec2(1.0,1.0)),u.x),u.y); -} -float fbm(vec2 p) -{ -float f=0.0; -f+=0.5000*noise(p); p*=2.02; -f+=0.2500*noise(p); p*=2.03; -f+=0.1250*noise(p); p*=2.01; -f+=0.0625*noise(p); p*=2.04; -f/=0.9375; -return f; -} -vec3 pattern(vec2 uv) -{ -vec2 p=-1.0+2.0*uv; -float p2=dot(p,p); -float f=fbm(vec2(15.0*p2))/2.0; -float r=0.2+0.6*sin(12.5*length(uv-vec2(0.5))); -float g=0.2+0.6*sin(20.5*length(uv-vec2(0.5))); -float b=0.2+0.6*sin(17.2*length(uv-vec2(0.5))); -return (1.0-f)*vec3(r,g,b); -} -float luminance(vec3 color) -{ -return dot(color.rgb,vec3(0.2126,0.7152,0.0722)); -} -vec4 textureDistorted(sampler2D tex,vec2 texcoord,vec2 direction,vec3 distortion) -{ -return vec4( -texture2D(tex,texcoord+direction*distortion.r).r, -texture2D(tex,texcoord+direction*distortion.g).g, -texture2D(tex,texcoord+direction*distortion.b).b, -1.0 -); -} -void main(void) -{ -vec2 uv=-vUV+vec2(1.0); -vec2 ghostDir=(vec2(0.5)-uv)*ghostDispersal; -vec2 texelSize=1.0/resolution; -vec3 distortion=vec3(-texelSize.x*distortionStrength,0.0,texelSize.x*distortionStrength); -vec4 result=vec4(0.0); -float ghostIndice=1.0; -for (int i=0; i=nSamples) -break; -vec2 offset1=vUV+velocity*(float(i)/float(nSamples-1)-0.5); -result+=texture2D(textureSampler,offset1); -} -gl_FragColor=result/float(nSamples); -} -#endif -`;je.a.ShadersStore.standardPixelShader=Lg;var Wd=function(r){function t(e,n,i,o,a){o===void 0&&(o=null);var s=r.call(this,n.getEngine(),e)||this;return s.downSampleX4PostProcess=null,s.brightPassPostProcess=null,s.blurHPostProcesses=[],s.blurVPostProcesses=[],s.textureAdderPostProcess=null,s.volumetricLightPostProcess=null,s.volumetricLightSmoothXPostProcess=null,s.volumetricLightSmoothYPostProcess=null,s.volumetricLightMergePostProces=null,s.volumetricLightFinalPostProcess=null,s.luminancePostProcess=null,s.luminanceDownSamplePostProcesses=[],s.hdrPostProcess=null,s.textureAdderFinalPostProcess=null,s.lensFlareFinalPostProcess=null,s.hdrFinalPostProcess=null,s.lensFlarePostProcess=null,s.lensFlareComposePostProcess=null,s.motionBlurPostProcess=null,s.depthOfFieldPostProcess=null,s.fxaaPostProcess=null,s.screenSpaceReflectionPostProcess=null,s.brightThreshold=1,s.blurWidth=512,s.horizontalBlur=!1,s.lensTexture=null,s.volumetricLightCoefficient=.2,s.volumetricLightPower=4,s.volumetricLightBlurScale=64,s.sourceLight=null,s.hdrMinimumLuminance=1,s.hdrDecreaseRate=.5,s.hdrIncreaseRate=.5,s.lensColorTexture=null,s.lensFlareStrength=20,s.lensFlareGhostDispersal=1.4,s.lensFlareHaloWidth=.7,s.lensFlareDistortionStrength=16,s.lensFlareBlurWidth=512,s.lensStarTexture=null,s.lensFlareDirtTexture=null,s.depthOfFieldDistance=10,s.depthOfFieldBlurWidth=64,s.animations=[],s._currentDepthOfFieldSource=null,s._fixedExposure=1,s._currentExposure=1,s._hdrAutoExposure=!1,s._hdrCurrentLuminance=1,s._motionStrength=1,s._isObjectBasedMotionBlur=!1,s._camerasToBeAttached=[],s._bloomEnabled=!1,s._depthOfFieldEnabled=!1,s._vlsEnabled=!1,s._lensFlareEnabled=!1,s._hdrEnabled=!1,s._motionBlurEnabled=!1,s._fxaaEnabled=!1,s._screenSpaceReflectionsEnabled=!1,s._motionBlurSamples=64,s._volumetricLightStepsCount=50,s._samples=1,s._cameras=a||n.cameras,s._cameras=s._cameras.slice(),s._camerasToBeAttached=s._cameras.slice(),s._scene=n,s._basePostProcess=o,s._ratio=i,s._floatTextureType=n.getEngine().getCaps().textureFloatRender?h.a.TEXTURETYPE_FLOAT:h.a.TEXTURETYPE_HALF_FLOAT,n.postProcessRenderPipelineManager.addPipeline(s),s._buildPipeline(),s}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"exposure",{get:function(){return this._fixedExposure},set:function(e){this._fixedExposure=e,this._currentExposure=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hdrAutoExposure",{get:function(){return this._hdrAutoExposure},set:function(e){if(this._hdrAutoExposure=e,this.hdrPostProcess){var n=["#define HDR"];e&&n.push("#define AUTO_EXPOSURE"),this.hdrPostProcess.updateEffect(n.join(` -`))}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"motionStrength",{get:function(){return this._motionStrength},set:function(e){this._motionStrength=e,this._isObjectBasedMotionBlur&&this.motionBlurPostProcess&&(this.motionBlurPostProcess.motionStrength=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"objectBasedMotionBlur",{get:function(){return this._isObjectBasedMotionBlur},set:function(e){var n=this._isObjectBasedMotionBlur!==e;this._isObjectBasedMotionBlur=e,n&&this._buildPipeline()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BloomEnabled",{get:function(){return this._bloomEnabled},set:function(e){this._bloomEnabled!==e&&(this._bloomEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DepthOfFieldEnabled",{get:function(){return this._depthOfFieldEnabled},set:function(e){this._depthOfFieldEnabled!==e&&(this._depthOfFieldEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"LensFlareEnabled",{get:function(){return this._lensFlareEnabled},set:function(e){this._lensFlareEnabled!==e&&(this._lensFlareEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HDREnabled",{get:function(){return this._hdrEnabled},set:function(e){this._hdrEnabled!==e&&(this._hdrEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"VLSEnabled",{get:function(){return this._vlsEnabled},set:function(e){if(this._vlsEnabled!==e){if(e&&!this._scene.enableGeometryBufferRenderer())return void u.a.Warn("Geometry renderer is not supported, cannot create volumetric lights in Standard Rendering Pipeline");this._vlsEnabled=e,this._buildPipeline()}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"MotionBlurEnabled",{get:function(){return this._motionBlurEnabled},set:function(e){this._motionBlurEnabled!==e&&(this._motionBlurEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fxaaEnabled",{get:function(){return this._fxaaEnabled},set:function(e){this._fxaaEnabled!==e&&(this._fxaaEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screenSpaceReflectionsEnabled",{get:function(){return this._screenSpaceReflectionsEnabled},set:function(e){this._screenSpaceReflectionsEnabled!==e&&(this._screenSpaceReflectionsEnabled=e,this._buildPipeline())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volumetricLightStepsCount",{get:function(){return this._volumetricLightStepsCount},set:function(e){this.volumetricLightPostProcess&&this.volumetricLightPostProcess.updateEffect(`#define VLS -#define NB_STEPS `+e.toFixed(1)),this._volumetricLightStepsCount=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"motionBlurSamples",{get:function(){return this._motionBlurSamples},set:function(e){this.motionBlurPostProcess&&(this._isObjectBasedMotionBlur?this.motionBlurPostProcess.motionBlurSamples=e:this.motionBlurPostProcess.updateEffect(`#define MOTION_BLUR -#define MAX_MOTION_SAMPLES `+e.toFixed(1))),this._motionBlurSamples=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"samples",{get:function(){return this._samples},set:function(e){this._samples!==e&&(this._samples=e,this._buildPipeline())},enumerable:!1,configurable:!0}),t.prototype._buildPipeline=function(){var e=this,n=this._ratio,i=this._scene;this._disposePostProcesses(),this._cameras!==null&&(this._scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline(this._name,this._cameras),this._cameras=this._camerasToBeAttached.slice()),this._reset(),this._screenSpaceReflectionsEnabled&&(this.screenSpaceReflectionPostProcess=new Zc("HDRPass",i,n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,this._floatTextureType),this.screenSpaceReflectionPostProcess.onApplyObservable.add(function(){e._currentDepthOfFieldSource=e.screenSpaceReflectionPostProcess}),this.addEffect(new Rt(i.getEngine(),"HDRScreenSpaceReflections",function(){return e.screenSpaceReflectionPostProcess},!0))),this._basePostProcess?this.originalPostProcess=this._basePostProcess:this.originalPostProcess=new _t("HDRPass","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",this._floatTextureType),this.originalPostProcess.autoClear=!this.screenSpaceReflectionPostProcess,this.originalPostProcess.onApplyObservable.add(function(){e._currentDepthOfFieldSource=e.originalPostProcess}),this.addEffect(new Rt(i.getEngine(),"HDRPassPostProcess",function(){return e.originalPostProcess},!0)),this._bloomEnabled&&(this._createDownSampleX4PostProcess(i,n/4),this._createBrightPassPostProcess(i,n/4),this._createBlurPostProcesses(i,n/4,1),this._createTextureAdderPostProcess(i,n),this.textureAdderFinalPostProcess=new _t("HDRDepthOfFieldSource","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRBaseDepthOfFieldSource",function(){return e.textureAdderFinalPostProcess},!0))),this._vlsEnabled&&(this._createVolumetricLightPostProcess(i,n),this.volumetricLightFinalPostProcess=new _t("HDRVLSFinal","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRVLSFinal",function(){return e.volumetricLightFinalPostProcess},!0))),this._lensFlareEnabled&&(this._createLensFlarePostProcess(i,n),this.lensFlareFinalPostProcess=new _t("HDRPostLensFlareDepthOfFieldSource","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRPostLensFlareDepthOfFieldSource",function(){return e.lensFlareFinalPostProcess},!0))),this._hdrEnabled&&(this._createLuminancePostProcesses(i,this._floatTextureType),this._createHdrPostProcess(i,n),this.hdrFinalPostProcess=new _t("HDRPostHDReDepthOfFieldSource","standard",[],[],n,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,"#define PASS_POST_PROCESS",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRPostHDReDepthOfFieldSource",function(){return e.hdrFinalPostProcess},!0))),this._depthOfFieldEnabled&&(this._createBlurPostProcesses(i,n/2,3,"depthOfFieldBlurWidth"),this._createDepthOfFieldPostProcess(i,n)),this._motionBlurEnabled&&this._createMotionBlurPostProcess(i,n),this._fxaaEnabled&&(this.fxaaPostProcess=new Mo("fxaa",1,null,we.a.BILINEAR_SAMPLINGMODE,i.getEngine(),!1,h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(i.getEngine(),"HDRFxaa",function(){return e.fxaaPostProcess},!0))),this._cameras!==null&&this._scene.postProcessRenderPipelineManager.attachCamerasToRenderPipeline(this._name,this._cameras),!this._enableMSAAOnFirstPostProcess(this._samples)&&this._samples>1&&u.a.Warn("MSAA failed to enable, MSAA is only supported in browsers that support webGL >= 2.0")},t.prototype._createDownSampleX4PostProcess=function(e,n){var i=this,o=new Array(32);this.downSampleX4PostProcess=new _t("HDRDownSampleX4","standard",["dsOffsets"],[],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define DOWN_SAMPLE_X4",this._floatTextureType),this.downSampleX4PostProcess.onApply=function(a){for(var s=0,d=i.downSampleX4PostProcess.width,p=i.downSampleX4PostProcess.height,y=-2;y<2;y++)for(var C=-2;C<2;C++)o[s]=(y+.5)*(1/d),o[s+1]=(C+.5)*(1/p),s+=2;a.setArray2("dsOffsets",o)},this.addEffect(new Rt(e.getEngine(),"HDRDownSampleX4",function(){return i.downSampleX4PostProcess},!0))},t.prototype._createBrightPassPostProcess=function(e,n){var i=this,o=new Array(8);this.brightPassPostProcess=new _t("HDRBrightPass","standard",["dsOffsets","brightThreshold"],[],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define BRIGHT_PASS",this._floatTextureType),this.brightPassPostProcess.onApply=function(a){var s=1/i.brightPassPostProcess.width,d=1/i.brightPassPostProcess.height;o[0]=-.5*s,o[1]=.5*d,o[2]=.5*s,o[3]=.5*d,o[4]=-.5*s,o[5]=-.5*d,o[6]=.5*s,o[7]=-.5*d,a.setArray2("dsOffsets",o),a.setFloat("brightThreshold",i.brightThreshold)},this.addEffect(new Rt(e.getEngine(),"HDRBrightPass",function(){return i.brightPassPostProcess},!0))},t.prototype._createBlurPostProcesses=function(e,n,i,o){var a=this;o===void 0&&(o="blurWidth");var s=e.getEngine(),d=new gn("HDRBlurH_"+i,new l.d(1,0),this[o],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,this._floatTextureType),p=new gn("HDRBlurV_"+i,new l.d(0,1),this[o],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,this._floatTextureType);d.onActivateObservable.add(function(){var y=d.width/s.getRenderWidth();d.kernel=a[o]*y}),p.onActivateObservable.add(function(){var y=p.height/s.getRenderHeight();p.kernel=a.horizontalBlur?64*y:a[o]*y}),this.addEffect(new Rt(e.getEngine(),"HDRBlurH"+i,function(){return d},!0)),this.addEffect(new Rt(e.getEngine(),"HDRBlurV"+i,function(){return p},!0)),this.blurHPostProcesses.push(d),this.blurVPostProcesses.push(p)},t.prototype._createTextureAdderPostProcess=function(e,n){var i=this;this.textureAdderPostProcess=new _t("HDRTextureAdder","standard",["exposure"],["otherSampler","lensSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define TEXTURE_ADDER",this._floatTextureType),this.textureAdderPostProcess.onApply=function(o){o.setTextureFromPostProcess("otherSampler",i._vlsEnabled?i._currentDepthOfFieldSource:i.originalPostProcess),o.setTexture("lensSampler",i.lensTexture),o.setFloat("exposure",i._currentExposure),i._currentDepthOfFieldSource=i.textureAdderFinalPostProcess},this.addEffect(new Rt(e.getEngine(),"HDRTextureAdder",function(){return i.textureAdderPostProcess},!0))},t.prototype._createVolumetricLightPostProcess=function(e,n){var i=this,o=e.enableGeometryBufferRenderer();o.enablePosition=!0;var a=o.getGBuffer();this.volumetricLightPostProcess=new _t("HDRVLS","standard",["shadowViewProjection","cameraPosition","sunDirection","sunColor","scatteringCoefficient","scatteringPower","depthValues"],["shadowMapSampler","positionSampler"],n/8,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,`#define VLS -#define NB_STEPS `+this._volumetricLightStepsCount.toFixed(1));var s=l.d.Zero();this.volumetricLightPostProcess.onApply=function(d){if(i.sourceLight&&i.sourceLight.getShadowGenerator()&&i._scene.activeCamera){var p=i.sourceLight.getShadowGenerator();d.setTexture("shadowMapSampler",p.getShadowMap()),d.setTexture("positionSampler",a.textures[2]),d.setColor3("sunColor",i.sourceLight.diffuse),d.setVector3("sunDirection",i.sourceLight.getShadowDirection()),d.setVector3("cameraPosition",i._scene.activeCamera.globalPosition),d.setMatrix("shadowViewProjection",p.getTransformMatrix()),d.setFloat("scatteringCoefficient",i.volumetricLightCoefficient),d.setFloat("scatteringPower",i.volumetricLightPower),s.x=i.sourceLight.getDepthMinZ(i._scene.activeCamera),s.y=i.sourceLight.getDepthMaxZ(i._scene.activeCamera),d.setVector2("depthValues",s)}},this.addEffect(new Rt(e.getEngine(),"HDRVLS",function(){return i.volumetricLightPostProcess},!0)),this._createBlurPostProcesses(e,n/4,0,"volumetricLightBlurScale"),this.volumetricLightMergePostProces=new _t("HDRVLSMerge","standard",[],["originalSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define VLSMERGE"),this.volumetricLightMergePostProces.onApply=function(d){d.setTextureFromPostProcess("originalSampler",i._bloomEnabled?i.textureAdderFinalPostProcess:i.originalPostProcess),i._currentDepthOfFieldSource=i.volumetricLightFinalPostProcess},this.addEffect(new Rt(e.getEngine(),"HDRVLSMerge",function(){return i.volumetricLightMergePostProces},!0))},t.prototype._createLuminancePostProcesses=function(e,n){var i=this,o=Math.pow(3,t.LuminanceSteps);this.luminancePostProcess=new _t("HDRLuminance","standard",["lumOffsets"],[],{width:o,height:o},null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LUMINANCE",n);var a=[];this.luminancePostProcess.onApply=function(C){var M=1/i.luminancePostProcess.width,U=1/i.luminancePostProcess.height;a[0]=-.5*M,a[1]=.5*U,a[2]=.5*M,a[3]=.5*U,a[4]=-.5*M,a[5]=-.5*U,a[6]=.5*M,a[7]=-.5*U,C.setArray2("lumOffsets",a)},this.addEffect(new Rt(e.getEngine(),"HDRLuminance",function(){return i.luminancePostProcess},!0));for(var s=t.LuminanceSteps-1;s>=0;s--){o=Math.pow(3,s);var d=`#define LUMINANCE_DOWN_SAMPLE -`;s===0&&(d+="#define FINAL_DOWN_SAMPLER");var p=new _t("HDRLuminanceDownSample"+s,"standard",["dsOffsets","halfDestPixelSize"],[],{width:o,height:o},null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,d,n);this.luminanceDownSamplePostProcesses.push(p)}var y=this.luminancePostProcess;this.luminanceDownSamplePostProcesses.forEach(function(C,M){var U=new Array(18);C.onApply=function(F){if(y){for(var z=0,J=-1;J<2;J++)for(var ie=-1;ie<2;ie++)U[z]=J/y.width,U[z+1]=ie/y.height,z+=2;F.setArray2("dsOffsets",U),F.setFloat("halfDestPixelSize",.5/y.width),y=M===i.luminanceDownSamplePostProcesses.length-1?i.luminancePostProcess:C}},M===i.luminanceDownSamplePostProcesses.length-1&&(C.onAfterRender=function(){var F=e.getEngine().readPixels(0,0,1,1),z=new l.f(1/16581375,1/65025,1/255,1);i._hdrCurrentLuminance=(F[0]*z.x+F[1]*z.y+F[2]*z.z+F[3]*z.w)/100}),i.addEffect(new Rt(e.getEngine(),"HDRLuminanceDownSample"+M,function(){return C},!0))})},t.prototype._createHdrPostProcess=function(e,n){var i=this,o=["#define HDR"];this._hdrAutoExposure&&o.push("#define AUTO_EXPOSURE"),this.hdrPostProcess=new _t("HDR","standard",["averageLuminance"],["textureAdderSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,o.join(` -`),h.a.TEXTURETYPE_UNSIGNED_INT);var a=1,s=0,d=0;this.hdrPostProcess.onApply=function(p){if(p.setTextureFromPostProcess("textureAdderSampler",i._currentDepthOfFieldSource),s+=e.getEngine().getDeltaTime(),a<0)a=i._hdrCurrentLuminance;else{var y=(d-s)/1e3;i._hdrCurrentLuminancea-i.hdrIncreaseRate*y?a-=i.hdrIncreaseRate*y:a=i._hdrCurrentLuminance}i.hdrAutoExposure?i._currentExposure=i._fixedExposure/a:(a=$.a.Clamp(a,i.hdrMinimumLuminance,1e20),p.setFloat("averageLuminance",a)),d=s,i._currentDepthOfFieldSource=i.hdrFinalPostProcess},this.addEffect(new Rt(e.getEngine(),"HDR",function(){return i.hdrPostProcess},!0))},t.prototype._createLensFlarePostProcess=function(e,n){var i=this;this.lensFlarePostProcess=new _t("HDRLensFlare","standard",["strength","ghostDispersal","haloWidth","resolution","distortionStrength"],["lensColorSampler"],n/2,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LENS_FLARE",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(e.getEngine(),"HDRLensFlare",function(){return i.lensFlarePostProcess},!0)),this._createBlurPostProcesses(e,n/4,2,"lensFlareBlurWidth"),this.lensFlareComposePostProcess=new _t("HDRLensFlareCompose","standard",["lensStarMatrix"],["otherSampler","lensDirtSampler","lensStarSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define LENS_FLARE_COMPOSE",h.a.TEXTURETYPE_UNSIGNED_INT),this.addEffect(new Rt(e.getEngine(),"HDRLensFlareCompose",function(){return i.lensFlareComposePostProcess},!0));var o=new l.d(0,0);this.lensFlarePostProcess.onApply=function(d){d.setTextureFromPostProcess("textureSampler",i._bloomEnabled?i.blurHPostProcesses[0]:i.originalPostProcess),d.setTexture("lensColorSampler",i.lensColorTexture),d.setFloat("strength",i.lensFlareStrength),d.setFloat("ghostDispersal",i.lensFlareGhostDispersal),d.setFloat("haloWidth",i.lensFlareHaloWidth),o.x=i.lensFlarePostProcess.width,o.y=i.lensFlarePostProcess.height,d.setVector2("resolution",o),d.setFloat("distortionStrength",i.lensFlareDistortionStrength)};var a=l.a.FromValues(2,0,-1,0,0,2,-1,0,0,0,1,0,0,0,0,1),s=l.a.FromValues(.5,0,.5,0,0,.5,.5,0,0,0,1,0,0,0,0,1);this.lensFlareComposePostProcess.onApply=function(d){if(i._scene.activeCamera){d.setTextureFromPostProcess("otherSampler",i.lensFlarePostProcess),d.setTexture("lensDirtSampler",i.lensFlareDirtTexture),d.setTexture("lensStarSampler",i.lensStarTexture);var p=i._scene.activeCamera.getViewMatrix().getRow(0),y=i._scene.activeCamera.getViewMatrix().getRow(2),C=l.e.Dot(p.toVector3(),new l.e(1,0,0))+l.e.Dot(y.toVector3(),new l.e(0,0,1));C*=4;var M=l.a.FromValues(.5*Math.cos(C),-Math.sin(C),0,0,Math.sin(C),.5*Math.cos(C),0,0,0,0,1,0,0,0,0,1),U=s.multiply(M).multiply(a);d.setMatrix("lensStarMatrix",U),i._currentDepthOfFieldSource=i.lensFlareFinalPostProcess}}},t.prototype._createDepthOfFieldPostProcess=function(e,n){var i=this;this.depthOfFieldPostProcess=new _t("HDRDepthOfField","standard",["distance"],["otherSampler","depthSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,"#define DEPTH_OF_FIELD",h.a.TEXTURETYPE_UNSIGNED_INT),this.depthOfFieldPostProcess.onApply=function(o){o.setTextureFromPostProcess("otherSampler",i._currentDepthOfFieldSource),o.setTexture("depthSampler",i._getDepthTexture()),o.setFloat("distance",i.depthOfFieldDistance)},this.addEffect(new Rt(e.getEngine(),"HDRDepthOfField",function(){return i.depthOfFieldPostProcess},!0))},t.prototype._createMotionBlurPostProcess=function(e,n){var i=this;if(this._isObjectBasedMotionBlur){var o=new Qc("HDRMotionBlur",e,n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,h.a.TEXTURETYPE_UNSIGNED_INT);o.motionStrength=this.motionStrength,o.motionBlurSamples=this.motionBlurSamples,this.motionBlurPostProcess=o}else{this.motionBlurPostProcess=new _t("HDRMotionBlur","standard",["inverseViewProjection","prevViewProjection","screenSize","motionScale","motionStrength"],["depthSampler"],n,null,we.a.BILINEAR_SAMPLINGMODE,e.getEngine(),!1,`#define MOTION_BLUR -#define MAX_MOTION_SAMPLES `+this.motionBlurSamples.toFixed(1),h.a.TEXTURETYPE_UNSIGNED_INT);var a=0,s=l.a.Identity(),d=l.a.Identity(),p=l.a.Identity(),y=l.d.Zero();this.motionBlurPostProcess.onApply=function(C){(p=e.getProjectionMatrix().multiply(e.getViewMatrix())).invertToRef(d),C.setMatrix("inverseViewProjection",d),C.setMatrix("prevViewProjection",s),s=p,y.x=i.motionBlurPostProcess.width,y.y=i.motionBlurPostProcess.height,C.setVector2("screenSize",y),a=e.getEngine().getFps()/60,C.setFloat("motionScale",a),C.setFloat("motionStrength",i.motionStrength),C.setTexture("depthSampler",i._getDepthTexture())}}this.addEffect(new Rt(e.getEngine(),"HDRMotionBlur",function(){return i.motionBlurPostProcess},!0))},t.prototype._getDepthTexture=function(){return this._scene.getEngine().getCaps().drawBuffersExtension?this._scene.enableGeometryBufferRenderer().getGBuffer().textures[0]:this._scene.enableDepthRenderer().getDepthMap()},t.prototype._disposePostProcesses=function(){for(var e=0;e0.5; -useCamA=!useCamB; -texCoord1=vec2(useCamB ? (vUV.x-0.5)*2.0 : vUV.x*2.0,vUV.y); -texCoord2=vec2(texCoord1.x+stepSize.x,vUV.y); -#else -#ifdef IS_STEREOSCOPIC_INTERLACED -float rowNum=floor(vUV.y/stepSize.y); -useCamA=mod(rowNum,2.0) == 1.0; -useCamB=mod(rowNum,2.0) == 0.0; -texCoord1=vec2(vUV.x,vUV.y); -texCoord2=vec2(vUV.x,vUV.y); -#else -useCamB=vUV.y>0.5; -useCamA=!useCamB; -texCoord1=vec2(vUV.x,useCamB ? (vUV.y-0.5)*2.0 : vUV.y*2.0); -texCoord2=vec2(vUV.x,texCoord1.y+stepSize.y); -#endif -#endif - -if (useCamB){ -frag1=texture2D(textureSampler,texCoord1).rgb; -frag2=texture2D(textureSampler,texCoord2).rgb; -}else if (useCamA){ -frag1=texture2D(camASampler ,texCoord1).rgb; -frag2=texture2D(camASampler ,texCoord2).rgb; -}else { -discard; -} -gl_FragColor=vec4((frag1+frag2)/TWO,1.0); -} -`;je.a.ShadersStore.stereoscopicInterlacePixelShader=Ng;var wg=function(r){function t(e,n,i,o,a,s,d){var p=r.call(this,e,"stereoscopicInterlace",["stepSize"],["camASampler"],1,n[1],a,s,d,o?"#define IS_STEREOSCOPIC_INTERLACED 1":i?"#define IS_STEREOSCOPIC_HORIZ 1":void 0)||this;return p._passedProcess=n[0]._rigPostProcess,p._stepSize=new l.d(1/p.width,1/p.height),p.onSizeChangedObservable.add(function(){p._stepSize=new l.d(1/p.width,1/p.height)}),p.onApplyObservable.add(function(y){y.setTextureFromPostProcess("camASampler",p._passedProcess),y.setFloat2("stepSize",p._stepSize.x,p._stepSize.y)}),p}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicInterlacePostProcessI"},t}(_t),Fg=function(r){function t(e,n,i,o,a,s){var d=r.call(this,e,"stereoscopicInterlace",["stepSize"],["camASampler"],1,n[1],o,a,s,i?"#define IS_STEREOSCOPIC_HORIZ 1":void 0)||this;return d._passedProcess=n[0]._rigPostProcess,d._stepSize=new l.d(1/d.width,1/d.height),d.onSizeChangedObservable.add(function(){d._stepSize=new l.d(1/d.width,1/d.height)}),d.onApplyObservable.add(function(p){p.setTextureFromPostProcess("camASampler",d._passedProcess),p.setFloat2("stepSize",d._stepSize.x,d._stepSize.y)}),d}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"StereoscopicInterlacePostProcess"},t}(_t),Bg=` -varying vec2 vUV; -uniform sampler2D textureSampler; - -uniform float _ExposureAdjustment; -#if defined(HABLE_TONEMAPPING) -const float A=0.15; -const float B=0.50; -const float C=0.10; -const float D=0.20; -const float E=0.02; -const float F=0.30; -const float W=11.2; -#endif -float Luminance(vec3 c) -{ -return dot(c,vec3(0.22,0.707,0.071)); -} -void main(void) -{ -vec3 colour=texture2D(textureSampler,vUV).rgb; -#if defined(REINHARD_TONEMAPPING) -float lum=Luminance(colour.rgb); -float lumTm=lum*_ExposureAdjustment; -float scale=lumTm/(1.0+lumTm); -colour*=scale/lum; -#elif defined(HABLE_TONEMAPPING) -colour*=_ExposureAdjustment; -const float ExposureBias=2.0; -vec3 x=ExposureBias*colour; -vec3 curr=((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F; -x=vec3(W,W,W); -vec3 whiteScale=1.0/(((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F); -colour=curr*whiteScale; -#elif defined(OPTIMIZED_HEJIDAWSON_TONEMAPPING) -colour*=_ExposureAdjustment; -vec3 X=max(vec3(0.0,0.0,0.0),colour-0.004); -vec3 retColor=(X*(6.2*X+0.5))/(X*(6.2*X+1.7)+0.06); -colour=retColor*retColor; -#elif defined(PHOTOGRAPHIC_TONEMAPPING) -colour=vec3(1.0,1.0,1.0)-exp2(-_ExposureAdjustment*colour); -#endif -gl_FragColor=vec4(colour.rgb,1.0); -}`;je.a.ShadersStore.tonemapPixelShader=Bg;var cr;(function(r){r[r.Hable=0]="Hable",r[r.Reinhard=1]="Reinhard",r[r.HejiDawson=2]="HejiDawson",r[r.Photographic=3]="Photographic"})(cr||(cr={}));var Ug=function(r){function t(e,n,i,o,a,s,d){a===void 0&&(a=h.a.TEXTURE_BILINEAR_SAMPLINGMODE),d===void 0&&(d=h.a.TEXTURETYPE_UNSIGNED_INT);var p=r.call(this,e,"tonemap",["_ExposureAdjustment"],null,1,o,a,s,!0,null,d)||this;p._operator=n,p.exposureAdjustment=i;var y="#define ";return p._operator===cr.Hable?y+="HABLE_TONEMAPPING":p._operator===cr.Reinhard?y+="REINHARD_TONEMAPPING":p._operator===cr.HejiDawson?y+="OPTIMIZED_HEJIDAWSON_TONEMAPPING":p._operator===cr.Photographic&&(y+="PHOTOGRAPHIC_TONEMAPPING"),p.updateEffect(y),p.onApply=function(C){C.setFloat("_ExposureAdjustment",p.exposureAdjustment)},p}return Object(c.d)(t,r),t.prototype.getClassName=function(){return"TonemapPostProcess"},t}(_t),Vg=`uniform sampler2D textureSampler; -uniform sampler2D lightScatteringSampler; -uniform float decay; -uniform float exposure; -uniform float weight; -uniform float density; -uniform vec2 meshPositionOnScreen; -varying vec2 vUV; -void main(void) { -vec2 tc=vUV; -vec2 deltaTexCoord=(tc-meshPositionOnScreen.xy); -deltaTexCoord*=1.0/float(NUM_SAMPLES)*density; -float illuminationDecay=1.0; -vec4 color=texture2D(lightScatteringSampler,tc)*0.4; -for(int i=0; i -#include -#include[0..maxSimultaneousMorphTargets] - -#include -uniform mat4 viewProjection; -uniform vec2 depthValues; -#if defined(ALPHATEST) || defined(NEED_UV) -varying vec2 vUV; -uniform mat4 diffuseMatrix; -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#endif -void main(void) -{ -vec3 positionUpdated=position; -#if (defined(ALPHATEST) || defined(NEED_UV)) && defined(UV1) -vec2 uvUpdated=uv; -#endif -#include[0..maxSimultaneousMorphTargets] -#include -#include -gl_Position=viewProjection*finalWorld*vec4(positionUpdated,1.0); -#if defined(ALPHATEST) || defined(BASIC_RENDER) -#ifdef UV1 -vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#ifdef UV2 -vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -#endif -#endif -} -`;je.a.ShadersStore.volumetricLightScatteringPassVertexShader=kg;var Gg=`#if defined(ALPHATEST) || defined(NEED_UV) -varying vec2 vUV; -#endif -#if defined(ALPHATEST) -uniform sampler2D diffuseSampler; -#endif -void main(void) -{ -#if defined(ALPHATEST) -vec4 diffuseColor=texture2D(diffuseSampler,vUV); -if (diffuseColor.a<0.4) -discard; -#endif -gl_FragColor=vec4(0.0,0.0,0.0,1.0); -} -`;je.a.ShadersStore.volumetricLightScatteringPassPixelShader=Gg;var Xd=function(r){function t(e,n,i,o,a,s,d,p,y){a===void 0&&(a=100),s===void 0&&(s=we.a.BILINEAR_SAMPLINGMODE);var C=r.call(this,e,"volumetricLightScattering",["decay","exposure","weight","meshPositionOnScreen","density"],["lightScatteringSampler"],n.postProcessRatio||n,i,s,d,p,"#define NUM_SAMPLES "+a)||this;return C._screenCoordinates=l.d.Zero(),C.customMeshPosition=l.e.Zero(),C.useCustomMeshPosition=!1,C.invert=!0,C.excludedMeshes=new Array,C.exposure=.3,C.decay=.96815,C.weight=.58767,C.density=.926,d=(y=i===null?y:i.getScene()).getEngine(),C._viewPort=new Kn.a(0,0,1,1).toGlobal(d.getRenderWidth(),d.getRenderHeight()),C.mesh=o!==null?o:t.CreateDefaultMesh("VolumetricLightScatteringMesh",y),C._createPass(y,n.passRatio||n),C.onActivate=function(M){C.isSupported||C.dispose(M),C.onActivate=null},C.onApplyObservable.add(function(M){C._updateMeshScreenCoordinates(y),M.setTexture("lightScatteringSampler",C._volumetricLightScatteringRTT),M.setFloat("exposure",C.exposure),M.setFloat("decay",C.decay),M.setFloat("weight",C.weight),M.setFloat("density",C.density),M.setVector2("meshPositionOnScreen",C._screenCoordinates)}),C}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"useDiffuseColor",{get:function(){return u.a.Warn("VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead"),!1},set:function(e){u.a.Warn("VolumetricLightScatteringPostProcess.useDiffuseColor is no longer used, use the mesh material directly instead")},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"VolumetricLightScatteringPostProcess"},t.prototype._isReady=function(e,n){var i=e.getMesh();if(i===this.mesh&&i.material)return i.material.isReady(i);var o=[],a=[Me.b.PositionKind],s=e.getMaterial();s&&(s.needAlphaTesting()&&o.push("#define ALPHATEST"),i.isVerticesDataPresent(Me.b.UVKind)&&(a.push(Me.b.UVKind),o.push("#define UV1")),i.isVerticesDataPresent(Me.b.UV2Kind)&&(a.push(Me.b.UV2Kind),o.push("#define UV2"))),i.useBones&&i.computeBonesUsingShaders?(a.push(Me.b.MatricesIndicesKind),a.push(Me.b.MatricesWeightsKind),o.push("#define NUM_BONE_INFLUENCERS "+i.numBoneInfluencers),o.push("#define BonesPerMesh "+(i.skeleton?i.skeleton.bones.length+1:0))):o.push("#define NUM_BONE_INFLUENCERS 0"),n&&(o.push("#define INSTANCES"),tt.a.PushAttributesForInstances(a),e.getRenderingMesh().hasThinInstances&&o.push("#define THIN_INSTANCES"));var d=o.join(` -`);return this._cachedDefines!==d&&(this._cachedDefines=d,this._volumetricLightScatteringPass=i.getScene().getEngine().createEffect("volumetricLightScatteringPass",a,["world","mBones","viewProjection","diffuseMatrix"],["diffuseSampler"],d,void 0,void 0,void 0,{maxSimultaneousMorphTargets:i.numBoneInfluencers})),this._volumetricLightScatteringPass.isReady()},t.prototype.setCustomMeshPosition=function(e){this.customMeshPosition=e},t.prototype.getCustomMeshPosition=function(){return this.customMeshPosition},t.prototype.dispose=function(e){var n=e.getScene().customRenderTargets.indexOf(this._volumetricLightScatteringRTT);n!==-1&&e.getScene().customRenderTargets.splice(n,1),this._volumetricLightScatteringRTT.dispose(),r.prototype.dispose.call(this,e)},t.prototype.getPass=function(){return this._volumetricLightScatteringRTT},t.prototype._meshExcluded=function(e){return this.excludedMeshes.length>0&&this.excludedMeshes.indexOf(e)!==-1},t.prototype._createPass=function(e,n){var i=this,o=e.getEngine();this._volumetricLightScatteringRTT=new ln("volumetricLightScatteringMap",{width:o.getRenderWidth()*n,height:o.getRenderHeight()*n},e,!1,!0,h.a.TEXTURETYPE_UNSIGNED_INT),this._volumetricLightScatteringRTT.wrapU=we.a.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.wrapV=we.a.CLAMP_ADDRESSMODE,this._volumetricLightScatteringRTT.renderList=null,this._volumetricLightScatteringRTT.renderParticles=!1,this._volumetricLightScatteringRTT.ignoreCameraViewport=!0;var a=this.getCamera();a?a.customRenderTargets.push(this._volumetricLightScatteringRTT):e.customRenderTargets.push(this._volumetricLightScatteringRTT);var s,d=function(y){var C=y.getRenderingMesh(),M=y.getEffectiveMesh();if(!i._meshExcluded(C)){M._internalAbstractMeshDataInfo._isActiveIntermediate=!1;var U=y.getMaterial();if(U){var F=C.getScene(),z=F.getEngine();z.setState(U.backFaceCulling);var J=C._getInstancesRenderList(y._id,!!y.getReplacementMesh());if(!J.mustReturn){var ie=z.getCaps().instancedArrays&&(J.visibleInstances[y._id]!==null||C.hasThinInstances);if(i._isReady(y,ie)){var se=i._volumetricLightScatteringPass;if(C===i.mesh&&(se=y.effect?y.effect:U.getEffect()),z.enableEffect(se),C._bind(y,se,U.fillMode),C===i.mesh)U.bind(M.getWorldMatrix(),C);else{if(i._volumetricLightScatteringPass.setMatrix("viewProjection",F.getTransformMatrix()),U&&U.needAlphaTesting()){var ce=U.getAlphaTestTexture();i._volumetricLightScatteringPass.setTexture("diffuseSampler",ce),ce&&i._volumetricLightScatteringPass.setMatrix("diffuseMatrix",ce.getTextureMatrix())}C.useBones&&C.computeBonesUsingShaders&&C.skeleton&&i._volumetricLightScatteringPass.setMatrices("mBones",C.skeleton.getTransformMatrices(C))}C._processRendering(M,y,i._volumetricLightScatteringPass,Ht.a.TriangleFillMode,J,ie,function(ue,fe){return se.setMatrix("world",fe)})}}}}},p=new O.b(0,0,0,1);this._volumetricLightScatteringRTT.onBeforeRenderObservable.add(function(){s=e.clearColor,e.clearColor=p}),this._volumetricLightScatteringRTT.onAfterRenderObservable.add(function(){e.clearColor=s}),this._volumetricLightScatteringRTT.customRenderFunction=function(y,C,M,U){var F,z=e.getEngine();if(U.length){for(z.setColorWrite(!1),F=0;Fue._alphaIndex?1:ce._alphaIndexue._distanceToCamera?-1:0}),z.setAlphaMode(h.a.ALPHA_COMBINE),F=0;F1||e.getCaps().drawBuffersExtension)},enumerable:!1,configurable:!0}),t._Parse=function(e,n,i,o){return L.a.Parse(function(){return new t(e.name,i,e.options,n,e.renderTargetSamplingMode,i.getEngine(),e.textureType,e.reusable)},e,i,o)},Object(c.c)([Object(L.c)()],t.prototype,"ridge",void 0),Object(c.c)([Object(L.c)()],t.prototype,"valley",void 0),t}(_t);R.a.RegisteredTypes["BABYLON.ScreenSpaceCurvaturePostProcess"]=Yd,f(166),f(167),Object.defineProperty(_e.a.prototype,"forceShowBoundingBoxes",{get:function(){return this._forceShowBoundingBoxes||!1},set:function(r){this._forceShowBoundingBoxes=r,r&&this.getBoundingBoxRenderer()},enumerable:!0,configurable:!0}),_e.a.prototype.getBoundingBoxRenderer=function(){return this._boundingBoxRenderer||(this._boundingBoxRenderer=new Kd(this)),this._boundingBoxRenderer},Object.defineProperty(Dt.a.prototype,"showBoundingBox",{get:function(){return this._showBoundingBox||!1},set:function(r){this._showBoundingBox=r,r&&this.getScene().getBoundingBoxRenderer()},enumerable:!0,configurable:!0});var Kd=function(){function r(t){this.name=st.a.NAME_BOUNDINGBOXRENDERER,this.frontColor=new O.a(1,1,1),this.backColor=new O.a(.1,.1,.1),this.showBackLines=!0,this.onBeforeBoxRenderingObservable=new P.c,this.onAfterBoxRenderingObservable=new P.c,this.onResourcesReadyObservable=new P.c,this.enabled=!0,this.renderList=new _i.a(32),this._vertexBuffers={},this._fillIndexBuffer=null,this._fillIndexData=null,this.scene=t,t._addComponent(this)}return r.prototype.register=function(){this.scene._beforeEvaluateActiveMeshStage.registerStep(st.a.STEP_BEFOREEVALUATEACTIVEMESH_BOUNDINGBOXRENDERER,this,this.reset),this.scene._preActiveMeshStage.registerStep(st.a.STEP_PREACTIVEMESH_BOUNDINGBOXRENDERER,this,this._preActiveMesh),this.scene._evaluateSubMeshStage.registerStep(st.a.STEP_EVALUATESUBMESH_BOUNDINGBOXRENDERER,this,this._evaluateSubMesh),this.scene._afterRenderingGroupDrawStage.registerStep(st.a.STEP_AFTERRENDERINGGROUPDRAW_BOUNDINGBOXRENDERER,this,this.render)},r.prototype._evaluateSubMesh=function(t,e){if(t.showSubMeshesBoundingBox){var n=e.getBoundingInfo();n!=null&&(n.boundingBox._tag=t.renderingGroupId,this.renderList.push(n.boundingBox))}},r.prototype._preActiveMesh=function(t){if(t.showBoundingBox||this.scene.forceShowBoundingBoxes){var e=t.getBoundingInfo();e.boundingBox._tag=t.renderingGroupId,this.renderList.push(e.boundingBox)}},r.prototype._prepareResources=function(){if(!this._colorShader){this._colorShader=new _a.a("colorShader",this.scene,"color",{attributes:[Me.b.PositionKind],uniforms:["world","viewProjection","color"]}),this._colorShader.reservedDataStore={hidden:!0};var t=this.scene.getEngine(),e=ft.a.CreateBox({size:1});this._vertexBuffers[Me.b.PositionKind]=new Me.b(t,e.positions,Me.b.PositionKind,!1),this._createIndexBuffer(),this._fillIndexData=e.indices,this.onResourcesReadyObservable.notifyObservers(this)}},r.prototype._createIndexBuffer=function(){var t=this.scene.getEngine();this._indexBuffer=t.createIndexBuffer([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,7,1,6,2,5,3,4])},r.prototype.rebuild=function(){var t=this._vertexBuffers[Me.b.PositionKind];t&&t._rebuild(),this._createIndexBuffer()},r.prototype.reset=function(){this.renderList.reset()},r.prototype.render=function(t){if(this.renderList.length!==0&&this.enabled&&(this._prepareResources(),this._colorShader.isReady())){var e=this.scene.getEngine();e.setDepthWrite(!1),this._colorShader._preBind();for(var n=0;n - -attribute vec3 position; -attribute vec4 normal; - -uniform mat4 viewProjection; -uniform float width; -uniform float aspectRatio; -void main(void) { -#include -mat4 worldViewProjection=viewProjection*finalWorld; -vec4 viewPosition=worldViewProjection*vec4(position,1.0); -vec4 viewPositionNext=worldViewProjection*vec4(normal.xyz,1.0); -vec2 currentScreen=viewPosition.xy/viewPosition.w; -vec2 nextScreen=viewPositionNext.xy/viewPositionNext.w; -currentScreen.x*=aspectRatio; -nextScreen.x*=aspectRatio; -vec2 dir=normalize(nextScreen-currentScreen); -vec2 normalDir=vec2(-dir.y,dir.x); -normalDir*=width/2.0; -normalDir.x/=aspectRatio; -vec4 offset=vec4(normalDir*normal.w,0.0,0.0); -gl_Position=viewPosition+offset; -}`;je.a.ShadersStore.lineVertexShader=jg,Dt.a.prototype.disableEdgesRendering=function(){return this._edgesRenderer&&(this._edgesRenderer.dispose(),this._edgesRenderer=null),this},Dt.a.prototype.enableEdgesRendering=function(r,t,e){return r===void 0&&(r=.95),t===void 0&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new Jc(this,r,t,!0,e),this},Object.defineProperty(Dt.a.prototype,"edgesRenderer",{get:function(){return this._edgesRenderer},enumerable:!0,configurable:!0}),Ao.b.prototype.enableEdgesRendering=function(r,t){return r===void 0&&(r=.95),t===void 0&&(t=!1),this.disableEdgesRendering(),this._edgesRenderer=new qd(this,r,t),this},Ao.a.prototype.enableEdgesRendering=function(r,t){return r===void 0&&(r=.95),t===void 0&&(t=!1),Ao.b.prototype.enableEdgesRendering.apply(this,arguments),this};var Hg=function(){this.edges=new Array,this.edgesConnectedCount=0},Jc=function(){function r(t,e,n,i,o){var a,s=this;e===void 0&&(e=.95),n===void 0&&(n=!1),i===void 0&&(i=!0),this.edgesWidthScalerForOrthographic=1e3,this.edgesWidthScalerForPerspective=50,this._linesPositions=new Array,this._linesNormals=new Array,this._linesIndices=new Array,this._buffers={},this._buffersForInstances={},this._checkVerticesInsteadOfIndices=!1,this.isEnabled=!0,this.customInstances=new _i.a(32),this._source=t,this._checkVerticesInsteadOfIndices=n,this._options=o??null,this._epsilon=e,this._prepareRessources(),i&&((a=o?.useAlternateEdgeFinder)===null||a===void 0||a?this._generateEdgesLinesAlternate():this._generateEdgesLines()),this._meshRebuildObserver=this._source.onRebuildObservable.add(function(){s._rebuild()}),this._meshDisposeObserver=this._source.onDisposeObservable.add(function(){s.dispose()})}return Object.defineProperty(r.prototype,"linesPositions",{get:function(){return this._linesPositions},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"linesNormals",{get:function(){return this._linesNormals},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"linesIndices",{get:function(){return this._linesIndices},enumerable:!1,configurable:!0}),r.GetShader=function(t){if(!t._edgeRenderLineShader){var e=new _a.a("lineShader",t,"line",{attributes:["position","normal"],uniforms:["world","viewProjection","color","width","aspectRatio"]});e.disableDepthWrite=!0,e.backFaceCulling=!1,t._edgeRenderLineShader=e}return t._edgeRenderLineShader},r.prototype._prepareRessources=function(){this._lineShader||(this._lineShader=r.GetShader(this._source.getScene()))},r.prototype._rebuild=function(){var t=this._buffers[Me.b.PositionKind];t&&t._rebuild(),(t=this._buffers[Me.b.NormalKind])&&t._rebuild();var e=this._source.getScene().getEngine();this._ib=e.createIndexBuffer(this._linesIndices)},r.prototype.dispose=function(){this._source.onRebuildObservable.remove(this._meshRebuildObserver),this._source.onDisposeObservable.remove(this._meshDisposeObserver);var t=this._buffers[Me.b.PositionKind];t&&(t.dispose(),this._buffers[Me.b.PositionKind]=null),(t=this._buffers[Me.b.NormalKind])&&(t.dispose(),this._buffers[Me.b.NormalKind]=null),this._ib&&this._source.getScene().getEngine()._releaseBuffer(this._ib),this._lineShader.dispose()},r.prototype._processEdgeForAdjacencies=function(t,e,n,i,o){return t===n&&e===i||t===i&&e===n?0:t===i&&e===o||t===o&&e===i?1:t===o&&e===n||t===n&&e===o?2:-1},r.prototype._processEdgeForAdjacenciesWithVertices=function(t,e,n,i,o){var a=1e-10;return t.equalsWithEpsilon(n,a)&&e.equalsWithEpsilon(i,a)||t.equalsWithEpsilon(i,a)&&e.equalsWithEpsilon(n,a)?0:t.equalsWithEpsilon(i,a)&&e.equalsWithEpsilon(o,a)||t.equalsWithEpsilon(o,a)&&e.equalsWithEpsilon(i,a)?1:t.equalsWithEpsilon(o,a)&&e.equalsWithEpsilon(n,a)||t.equalsWithEpsilon(n,a)&&e.equalsWithEpsilon(o,a)?2:-1},r.prototype._checkEdge=function(t,e,n,i,o){var a;e===void 0?a=!0:a=l.e.Dot(n[t],n[e])=0&&Ee.push(Se);for(var Le=0;Le=t[0].length&&t[1].length>=t[2].length?a=1:t[2].length>=t[0].length&&t[2].length>=t[1].length&&(a=2);for(var s=0;s<3;++s)s===a?t[s].sort(function(Pe,Ee){return Pe[1]Ee[1]?1:0}):t[s].sort(function(Pe,Ee){return Pe[1]>Ee[1]?-1:Pe[1]=a+1;--C)o(t[C%3],p,C!==a+2?i[n[e+(C+1)%3]]:-1);var M=p.length;n.push(i[n[e+a]],d[0],p[0]),n.push(i[n[e+(a+1)%3]],p[M-1],d[y-1]);for(var U=y<=M,F=U?y:M,z=U?M:y,J=U?y-1:M-1,ie=U?0:1,se=y+M-2,ce=0,ue=0,fe=U?d:p,ve=U?p:d,Te=0;se-- >0;){ie?n.push(fe[ce],ve[ue]):n.push(ve[ue],fe[ce]);var Oe=void 0;(Te+=F)>=z&&ceKe){var Et=Fe;Fe=Ke,Ke=Et}($t=zt[Mt=Fe+"_"+Ke])?$t.done||(l.e.Dot(Yt,$t.normal)0||this._source.hasThinInstances)},r.prototype.render=function(){var t=this._source.getScene();if(this.isReady()&&t.activeCamera){var e=t.getEngine();this._lineShader._preBind(),this._source.edgesColor.a!==1?e.setAlphaMode(h.a.ALPHA_COMBINE):e.setAlphaMode(h.a.ALPHA_DISABLE);var n=this._source.hasInstances&&this.customInstances.length>0,i=n||this._source.hasThinInstances,o=0;if(i)if(this._buffersForInstances.world0=this._source.getVertexBuffer("world0"),this._buffersForInstances.world1=this._source.getVertexBuffer("world1"),this._buffersForInstances.world2=this._source.getVertexBuffer("world2"),this._buffersForInstances.world3=this._source.getVertexBuffer("world3"),n){var a=this._source._instanceDataStorage;if(o=this.customInstances.length,!a.isFrozen){for(var s=0,d=0;d0&&(e.push(!0),n.push(!1));this._multiRenderAttachments=this._engine.buildTextureLayout(t),this._clearAttachments=this._engine.buildTextureLayout(e),this._defaultAttachments=this._engine.buildTextureLayout(n)},r.prototype._createCompositionEffect=function(){this.prePassRT=new rc("sceneprePassRT",{width:this._engine.getRenderWidth(),height:this._engine.getRenderHeight()},this.mrtCount,this._scene,{generateMipMaps:!1,generateDepthTexture:!0,defaultType:h.a.TEXTURETYPE_UNSIGNED_INT,types:this._mrtFormats}),this.prePassRT.samples=1,this._initializeAttachments(),this._useGeometryBufferFallback&&!this._geometryBuffer&&(this.useGeometryBufferFallback=!0),this.imageProcessingPostProcess=new Xo("sceneCompositionPass",1,null,void 0,this._engine),this.imageProcessingPostProcess.autoClear=!1},Object.defineProperty(r.prototype,"isSupported",{get:function(){return this._engine.webGLVersion>1||this._scene.getEngine().getCaps().drawBuffersExtension},enumerable:!1,configurable:!0}),r.prototype.bindAttachmentsForEffect=function(t,e){if(this.enabled){if(t._multiTarget)this._engine.bindAttachments(this._multiRenderAttachments);else if(this._engine.bindAttachments(this._defaultAttachments),this._geometryBuffer){var n=e.getMaterial();n&&this.excludedMaterials.indexOf(n)===-1&&this._geometryBuffer.renderList.push(e.getRenderingMesh())}}},r.prototype.restoreAttachments=function(){this.enabled&&this._defaultAttachments&&this._engine.bindAttachments(this._defaultAttachments)},r.prototype._beforeCameraDraw=function(){this._isDirty&&this._update(),this._geometryBuffer&&(this._geometryBuffer.renderList.length=0),this._bindFrameBuffer()},r.prototype._afterCameraDraw=function(){if(this._enabled){var t=this._scene.activeCamera&&this._scene.activeCamera._getFirstPostProcess();t&&this._postProcesses.length&&this._scene.postProcessManager._prepareFrame(),this._scene.postProcessManager.directRender(this._postProcesses,t?t.inputTexture:null)}},r.prototype._checkRTSize=function(){var t=this._engine.getRenderWidth(!0),e=this._engine.getRenderHeight(!0),n=this.prePassRT.getRenderWidth(),i=this.prePassRT.getRenderHeight();n===t&&i===e||(this.prePassRT.resize({width:t,height:e}),this._updateGeometryBufferLayout(),this._bindPostProcessChain())},r.prototype._bindFrameBuffer=function(){if(this._enabled){this._checkRTSize();var t=this.prePassRT.getInternalTexture();t&&this._engine.bindFramebuffer(t)}},r.prototype.clear=function(){this._enabled&&(this._bindFrameBuffer(),this._engine.clear(this._scene.clearColor,this._scene.autoClear||this._scene.forceWireframe||this._scene.forcePointsCloud,this._scene.autoClearDepthAndStencil,this._scene.autoClearDepthAndStencil),this._engine.bindAttachments(this._clearAttachments),this._engine.clear(this._clearColor,!0,!1,!1),this._engine.bindAttachments(this._defaultAttachments))},r.prototype._setState=function(t){this._enabled=t,this._scene.prePass=t,this.imageProcessingPostProcess&&(this.imageProcessingPostProcess.imageProcessingConfiguration.applyByPostProcess=t)},r.prototype._updateGeometryBufferLayout=function(){if(this._geometryBuffer){this._geometryBuffer._resetLayout();for(var t=[],e=0;e -#include -#include -#include -varying vec2 vUV; -uniform vec2 texelSize; -uniform sampler2D textureSampler; -uniform sampler2D irradianceSampler; -uniform sampler2D depthSampler; -uniform sampler2D albedoSampler; -uniform vec2 viewportSize; -uniform float metersPerUnit; -const float LOG2_E=1.4426950408889634; -const float SSS_PIXELS_PER_SAMPLE=4.; -const int _SssSampleBudget=40; -#define rcp(x) 1./x -#define Sq(x) x*x -#define SSS_BILATERAL_FILTER true - - -vec3 EvalBurleyDiffusionProfile(float r,vec3 S) -{ -vec3 exp_13=exp2(((LOG2_E*(-1.0/3.0))*r)*S); -vec3 expSum=exp_13*(1.+exp_13*exp_13); -return (S*rcp(8.*PI))*expSum; -} - - - - - - -vec2 SampleBurleyDiffusionProfile(float u,float rcpS) -{ -u=1.-u; -float g=1.+(4.*u)*(2.*u+sqrt(1.+(4.*u)*u)); -float n=exp2(log2(g)*(-1.0/3.0)); -float p=(g*n)*n; -float c=1.+p+n; -float d=(3./LOG2_E*2.)+(3./LOG2_E)*log2(u); -float x=(3./LOG2_E)*log2(c)-d; - - - - - - -float rcpExp=((c*c)*c)*rcp((4.*u)*((c*c)+(4.*u)*(4.*u))); -float r=x*rcpS; -float rcpPdf=(8.*PI*rcpS)*rcpExp; -return vec2(r,rcpPdf); -} - - -vec3 ComputeBilateralWeight(float xy2,float z,float mmPerUnit,vec3 S,float rcpPdf) -{ -#ifndef SSS_BILATERAL_FILTER -z=0.; -#endif - - - -float r=sqrt(xy2+(z*mmPerUnit)*(z*mmPerUnit)); -float area=rcpPdf; -#if SSS_CLAMP_ARTIFACT -return clamp(EvalBurleyDiffusionProfile(r,S)*area,0.0,1.0); -#else -return EvalBurleyDiffusionProfile(r,S)*area; -#endif -} -void EvaluateSample(int i,int n,vec3 S,float d,vec3 centerPosVS,float mmPerUnit,float pixelsPerMm, -float phase,inout vec3 totalIrradiance,inout vec3 totalWeight) -{ - -float scale=rcp(float(n)); -float offset=rcp(float(n))*0.5; - -float sinPhase,cosPhase; -sinPhase=sin(phase); -cosPhase=cos(phase); -vec2 bdp=SampleBurleyDiffusionProfile(float(i)*scale+offset,d); -float r=bdp.x; -float rcpPdf=bdp.y; -float phi=SampleDiskGolden(i,n).y; -float sinPhi,cosPhi; -sinPhi=sin(phi); -cosPhi=cos(phi); -float sinPsi=cosPhase*sinPhi+sinPhase*cosPhi; -float cosPsi=cosPhase*cosPhi-sinPhase*sinPhi; -vec2 vec=r*vec2(cosPsi,sinPsi); - -vec2 position; -float xy2; -position=vUV+round((pixelsPerMm*r)*vec2(cosPsi,sinPsi))*texelSize; -xy2=r*r; -vec4 textureSample=texture2D(irradianceSampler,position); -float viewZ=texture2D(depthSampler,position).r; -vec3 irradiance=textureSample.rgb; -if (testLightingForSSS(textureSample.a)) -{ - -float relZ=viewZ-centerPosVS.z; -vec3 weight=ComputeBilateralWeight(xy2,relZ,mmPerUnit,S,rcpPdf); -totalIrradiance+=weight*irradiance; -totalWeight+=weight; -} -else -{ - - - - - - -} -} -void main(void) -{ -vec4 irradianceAndDiffusionProfile=texture2D(irradianceSampler,vUV); -vec3 centerIrradiance=irradianceAndDiffusionProfile.rgb; -int diffusionProfileIndex=int(round(irradianceAndDiffusionProfile.a*255.)); -float centerDepth=0.; -vec4 inputColor=texture2D(textureSampler,vUV); -bool passedStencilTest=testLightingForSSS(irradianceAndDiffusionProfile.a); -if (passedStencilTest) -{ -centerDepth=texture2D(depthSampler,vUV).r; -} -if (!passedStencilTest) { -gl_FragColor=inputColor; -return; -} -float distScale=1.; -vec3 S=diffusionS[diffusionProfileIndex]; -float d=diffusionD[diffusionProfileIndex]; -float filterRadius=filterRadii[diffusionProfileIndex]; - -vec2 centerPosNDC=vUV; -vec2 cornerPosNDC=vUV+0.5*texelSize; -vec3 centerPosVS=vec3(centerPosNDC*viewportSize,1.0)*centerDepth; -vec3 cornerPosVS=vec3(cornerPosNDC*viewportSize,1.0)*centerDepth; - -float mmPerUnit=1000.*(metersPerUnit*rcp(distScale)); -float unitsPerMm=rcp(mmPerUnit); - - -float unitsPerPixel=2.*abs(cornerPosVS.x-centerPosVS.x); -float pixelsPerMm=rcp(unitsPerPixel)*unitsPerMm; - -float filterArea=PI*Sq(filterRadius*pixelsPerMm); -int sampleCount=int(filterArea*rcp(SSS_PIXELS_PER_SAMPLE)); -int sampleBudget=_SssSampleBudget; -int texturingMode=0; -vec3 albedo=texture2D(albedoSampler,vUV).rgb; -if (distScale == 0. || sampleCount<1) -{ -#ifdef DEBUG_SSS_SAMPLES -vec3 green=vec3(0.,1.,0.); -gl_FragColor=vec4(green,1.0); -return; -#endif -gl_FragColor=vec4(inputColor.rgb+albedo*centerIrradiance,1.0); -return; -} -#ifdef DEBUG_SSS_SAMPLES -vec3 red=vec3(1.,0.,0.); -vec3 blue=vec3(0.,0.,1.); -gl_FragColor=vec4(mix(blue,red,clamp(float(sampleCount)/float(sampleBudget),0.0,1.0)),1.0); -return; -#endif - -float phase=0.; -int n=min(sampleCount,sampleBudget); - -vec3 centerWeight=vec3(0.); -vec3 totalIrradiance=vec3(0.); -vec3 totalWeight=vec3(0.); -for (int i=0; i=5)return u.a.Error("You already reached the maximum number of diffusion profiles."),0;for(var e=0;e -void main(void) { -#ifdef ALPHATEST -if (texture2D(diffuseSampler,vUV).a<0.4) -discard; -#endif -#include -gl_FragColor=color; -}`;je.a.ShadersStore.outlinePixelShader=Qg;var qg=` -attribute vec3 position; -attribute vec3 normal; -#include -#include -#include[0..maxSimultaneousMorphTargets] - -uniform float offset; -#include -uniform mat4 viewProjection; -#ifdef ALPHATEST -varying vec2 vUV; -uniform mat4 diffuseMatrix; -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#endif -#include -void main(void) -{ -vec3 positionUpdated=position; -vec3 normalUpdated=normal; -#ifdef UV1 -vec2 uvUpdated=uv; -#endif -#include[0..maxSimultaneousMorphTargets] -vec3 offsetPosition=positionUpdated+(normalUpdated*offset); -#include -#include -gl_Position=viewProjection*finalWorld*vec4(offsetPosition,1.0); -#ifdef ALPHATEST -#ifdef UV1 -vUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); -#endif -#ifdef UV2 -vUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -#endif -#endif -#include -} -`;je.a.ShadersStore.outlineVertexShader=qg,_e.a.prototype.getOutlineRenderer=function(){return this._outlineRenderer||(this._outlineRenderer=new ef(this)),this._outlineRenderer},Object.defineProperty(De.a.prototype,"renderOutline",{get:function(){return this._renderOutline},set:function(r){r&&this.getScene().getOutlineRenderer(),this._renderOutline=r},enumerable:!0,configurable:!0}),Object.defineProperty(De.a.prototype,"renderOverlay",{get:function(){return this._renderOverlay},set:function(r){r&&this.getScene().getOutlineRenderer(),this._renderOverlay=r},enumerable:!0,configurable:!0});var ef=function(){function r(t){this.name=st.a.NAME_OUTLINERENDERER,this.zOffset=1,this.scene=t,this._engine=t.getEngine(),this.scene._addComponent(this)}return r.prototype.register=function(){this.scene._beforeRenderingMeshStage.registerStep(st.a.STEP_BEFORERENDERINGMESH_OUTLINE,this,this._beforeRenderingMesh),this.scene._afterRenderingMeshStage.registerStep(st.a.STEP_AFTERRENDERINGMESH_OUTLINE,this,this._afterRenderingMesh)},r.prototype.rebuild=function(){},r.prototype.dispose=function(){},r.prototype.render=function(t,e,n){var i=this;n===void 0&&(n=!1);var o=this.scene,a=o.getEngine(),s=a.getCaps().instancedArrays&&(e.visibleInstances[t._id]!==null&&e.visibleInstances[t._id]!==void 0||t.getRenderingMesh().hasThinInstances);if(this.isReady(t,s)){var d=t.getMesh(),p=d._internalAbstractMeshDataInfo._actAsRegularMesh?d:null,y=t.getRenderingMesh(),C=p||y,M=t.getMaterial();if(M&&o.activeCamera){if(a.enableEffect(this._effect),M.useLogarithmicDepth&&this._effect.setFloat("logarithmicDepthConstant",2/(Math.log(o.activeCamera.maxZ+1)/Math.LN2)),this._effect.setFloat("offset",n?0:y.outlineWidth),this._effect.setColor4("color",n?y.overlayColor:y.outlineColor,n?y.overlayAlpha:M.alpha),this._effect.setMatrix("viewProjection",o.getTransformMatrix()),this._effect.setMatrix("world",C.getWorldMatrix()),y.useBones&&y.computeBonesUsingShaders&&y.skeleton&&this._effect.setMatrices("mBones",y.skeleton.getTransformMatrices(y)),tt.a.BindMorphTargetParameters(y,this._effect),y._bind(t,this._effect,M.fillMode),M&&M.needAlphaTesting()){var U=M.getAlphaTestTexture();U&&(this._effect.setTexture("diffuseSampler",U),this._effect.setMatrix("diffuseMatrix",U.getTextureMatrix()))}a.setZOffset(-this.zOffset),y._processRendering(C,t,this._effect,M.fillMode,e,s,function(F,z){i._effect.setMatrix("world",z)}),a.setZOffset(0)}}},r.prototype.isReady=function(t,e){var n=[],i=[Me.b.PositionKind,Me.b.NormalKind],o=t.getMesh(),a=t.getMaterial();a&&(a.needAlphaTesting()&&(n.push("#define ALPHATEST"),o.isVerticesDataPresent(Me.b.UVKind)&&(i.push(Me.b.UVKind),n.push("#define UV1")),o.isVerticesDataPresent(Me.b.UV2Kind)&&(i.push(Me.b.UV2Kind),n.push("#define UV2"))),a.useLogarithmicDepth&&n.push("#define LOGARITHMICDEPTH")),o.useBones&&o.computeBonesUsingShaders?(i.push(Me.b.MatricesIndicesKind),i.push(Me.b.MatricesWeightsKind),o.numBoneInfluencers>4&&(i.push(Me.b.MatricesIndicesExtraKind),i.push(Me.b.MatricesWeightsExtraKind)),n.push("#define NUM_BONE_INFLUENCERS "+o.numBoneInfluencers),n.push("#define BonesPerMesh "+(o.skeleton?o.skeleton.bones.length+1:0))):n.push("#define NUM_BONE_INFLUENCERS 0");var s=o.morphTargetManager,d=0;s&&s.numInfluencers>0&&(d=s.numInfluencers,n.push("#define MORPHTARGETS"),n.push("#define NUM_MORPH_INFLUENCERS "+d),tt.a.PrepareAttributesForMorphTargetsInfluencers(i,o,d)),e&&(n.push("#define INSTANCES"),tt.a.PushAttributesForInstances(i),t.getRenderingMesh().hasThinInstances&&n.push("#define THIN_INSTANCES"));var p=n.join(` -`);return this._cachedDefines!==p&&(this._cachedDefines=p,this._effect=this.scene.getEngine().createEffect("outline",i,["world","mBones","viewProjection","diffuseMatrix","offset","color","logarithmicDepthConstant","morphTargetInfluences"],["diffuseSampler"],p,void 0,void 0,void 0,{maxSimultaneousMorphTargets:d})),this._effect.isReady()},r.prototype._beforeRenderingMesh=function(t,e,n){if(this._savedDepthWrite=this._engine.getDepthWrite(),t.renderOutline){var i=e.getMaterial();i&&i.needAlphaBlendingForMesh(t)&&(this._engine.cacheStencilState(),this._engine.setDepthWrite(!1),this._engine.setColorWrite(!1),this._engine.setStencilBuffer(!0),this._engine.setStencilOperationPass(h.a.REPLACE),this._engine.setStencilFunction(h.a.ALWAYS),this._engine.setStencilMask(r._StencilReference),this._engine.setStencilFunctionReference(r._StencilReference),this.render(e,n,!0),this._engine.setColorWrite(!0),this._engine.setStencilFunction(h.a.NOTEQUAL)),this._engine.setDepthWrite(!1),this.render(e,n),this._engine.setDepthWrite(this._savedDepthWrite),i&&i.needAlphaBlendingForMesh(t)&&this._engine.restoreStencilState()}},r.prototype._afterRenderingMesh=function(t,e,n){if(t.renderOverlay){var i=this._engine.getAlphaMode(),o=this._engine.alphaState.alphaBlend;this._engine.setAlphaMode(h.a.ALPHA_COMBINE),this.render(e,n,!0),this._engine.setAlphaMode(i),this._engine.setDepthWrite(this._savedDepthWrite),this._engine.alphaState.alphaBlend=o}t.renderOutline&&this._savedDepthWrite&&(this._engine.setDepthWrite(!0),this._engine.setColorWrite(!1),this.render(e,n),this._engine.setColorWrite(!0))},r._StencilReference=4,r}(),Zg=f(148),tf=function(r){function t(e,n){var i=r.call(this)||this;return i.name=e,i.animations=new Array,i.isPickable=!1,i.useAlphaForPicking=!1,i.onDisposeObservable=new P.c,i._onAnimationEnd=null,i._endAnimation=function(){i._onAnimationEnd&&i._onAnimationEnd(),i.disposeWhenFinishedAnimating&&i.dispose()},i.color=new O.b(1,1,1,1),i.position=l.e.Zero(),i._manager=n,i._manager.sprites.push(i),i.uniqueId=i._manager.scene.getUniqueId(),i}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"size",{get:function(){return this.width},set:function(e){this.width=e,this.height=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"manager",{get:function(){return this._manager},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"Sprite"},Object.defineProperty(t.prototype,"fromIndex",{get:function(){return this._fromIndex},set:function(e){this.playAnimation(e,this._toIndex,this._loopAnimation,this._delay,this._onAnimationEnd)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toIndex",{get:function(){return this._toIndex},set:function(e){this.playAnimation(this._fromIndex,e,this._loopAnimation,this._delay,this._onAnimationEnd)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"loopAnimation",{get:function(){return this._loopAnimation},set:function(e){this.playAnimation(this._fromIndex,this._toIndex,e,this._delay,this._onAnimationEnd)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delay",{get:function(){return Math.max(this._delay,1)},set:function(e){this.playAnimation(this._fromIndex,this._toIndex,this._loopAnimation,e,this._onAnimationEnd)},enumerable:!1,configurable:!0}),t.prototype.playAnimation=function(e,n,i,o,a){a===void 0&&(a=null),this._onAnimationEnd=a,r.prototype.playAnimation.call(this,e,n,i,o,this._endAnimation)},t.prototype.dispose=function(){for(var e=0;ethis._delay&&(this._time=this._time%this._delay,this.cellIndex+=this._direction,(this._direction>0&&this.cellIndex>this._toIndex||this._direction<0&&this.cellIndex0?this._fromIndex:this._toIndex:(this.cellIndex=this._toIndex,this._animationStarted=!1,this._onBaseAnimationEnd&&this._onBaseAnimationEnd()))))},r}());_e.a.prototype._internalPickSprites=function(r,t,e,n){if(!nr.a)return null;var i=null;if(!n){if(!this.activeCamera)return null;n=this.activeCamera}if(this.spriteManagers.length>0)for(var o=0;o=i.distance))&&(i=s,e))break}}return i||new nr.a},_e.a.prototype._internalMultiPickSprites=function(r,t,e){if(!nr.a)return null;var n=new Array;if(!e){if(!this.activeCamera)return null;e=this.activeCamera}if(this.spriteManagers.length>0)for(var i=0;i0&&(n=o.pickSprite(t,e,this._spritePredicate,!1,o.cameraToUseForPointers||void 0))&&n.hit&&n.pickedSprite&&n.pickedSprite.actionManager){switch(o._pickedDownSprite=n.pickedSprite,i.button){case 0:n.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnLeftPickTrigger,m.a.CreateNewFromSprite(n.pickedSprite,o,i));break;case 1:n.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnCenterPickTrigger,m.a.CreateNewFromSprite(n.pickedSprite,o,i));break;case 2:n.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnRightPickTrigger,m.a.CreateNewFromSprite(n.pickedSprite,o,i))}n.pickedSprite.actionManager&&n.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnPickDownTrigger,m.a.CreateNewFromSprite(n.pickedSprite,o,i))}return n},r.prototype._pointerUp=function(t,e,n,i){var o=this.scene;if(o.spriteManagers.length>0){var a=o.pickSprite(t,e,this._spritePredicate,!1,o.cameraToUseForPointers||void 0);a&&(a.hit&&a.pickedSprite&&a.pickedSprite.actionManager&&(a.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnPickUpTrigger,m.a.CreateNewFromSprite(a.pickedSprite,o,i)),a.pickedSprite.actionManager&&(this.scene._inputManager._isPointerSwiping()||a.pickedSprite.actionManager.processTrigger(h.a.ACTION_OnPickTrigger,m.a.CreateNewFromSprite(a.pickedSprite,o,i)))),o._pickedDownSprite&&o._pickedDownSprite.actionManager&&o._pickedDownSprite!==a.pickedSprite&&o._pickedDownSprite.actionManager.processTrigger(h.a.ACTION_OnPickOutTrigger,m.a.CreateNewFromSprite(o._pickedDownSprite,o,i)))}return n},r}();je.a.IncludesShadersStore.imageProcessingCompatibility=`#ifdef IMAGEPROCESSINGPOSTPROCESS -gl_FragColor.rgb=pow(gl_FragColor.rgb,vec3(2.2)); -#endif`;var Jg=`uniform bool alphaTest; -varying vec4 vColor; - -varying vec2 vUV; -uniform sampler2D diffuseSampler; - -#include -void main(void) { -vec4 color=texture2D(diffuseSampler,vUV); -if (alphaTest) -{ -if (color.a<0.95) -discard; -} -color*=vColor; -#include -gl_FragColor=color; -#include -}`;je.a.ShadersStore.spritesPixelShader=Jg;var $g=` -attribute vec4 position; -attribute vec2 options; -attribute vec2 offsets; -attribute vec2 inverts; -attribute vec4 cellInfo; -attribute vec4 color; - -uniform mat4 view; -uniform mat4 projection; - -varying vec2 vUV; -varying vec4 vColor; -#include -void main(void) { -vec3 viewPos=(view*vec4(position.xyz,1.0)).xyz; -vec2 cornerPos; -float angle=position.w; -vec2 size=vec2(options.x,options.y); -vec2 offset=offsets.xy; -cornerPos=vec2(offset.x-0.5,offset.y-0.5)*size; - -vec3 rotatedCorner; -rotatedCorner.x=cornerPos.x*cos(angle)-cornerPos.y*sin(angle); -rotatedCorner.y=cornerPos.x*sin(angle)+cornerPos.y*cos(angle); -rotatedCorner.z=0.; - -viewPos+=rotatedCorner; -gl_Position=projection*vec4(viewPos,1.0); - -vColor=color; - -vec2 uvOffset=vec2(abs(offset.x-inverts.x),abs(1.0-offset.y-inverts.y)); -vec2 uvPlace=cellInfo.xy; -vec2 uvSize=cellInfo.zw; -vUV.x=uvPlace.x+uvSize.x*uvOffset.x; -vUV.y=uvPlace.y+uvSize.y*uvOffset.y; - -#ifdef FOG -vFogDistance=viewPos; -#endif -}`;je.a.ShadersStore.spritesVertexShader=$g;var ev=function(){function r(t,e,n,i){if(n===void 0&&(n=.01),i===void 0&&(i=null),this.blendMode=h.a.ALPHA_COMBINE,this.autoResetAlpha=!0,this.disableDepthWrite=!1,this.fogEnabled=!0,this._useVAO=!1,this._useInstancing=!1,this._vertexBuffers={},this._capacity=e,this._epsilon=n,this._engine=t,this._useInstancing=t.getCaps().instancedArrays,this._useVAO=t.getCaps().vertexArrayObject&&!t.disableVertexArrayObjects,this._scene=i,!this._useInstancing){for(var o=[],a=0,s=0;s>0;e._xOffset=(e.cellIndex-y*p)*this.cellWidth/o.width,e._yOffset=y*this.cellHeight/o.height,e._xSize=this.cellWidth,e._ySize=this.cellHeight}this._vertexData[d]=e.position.x,this._vertexData[d+1]=e.position.y,this._vertexData[d+2]=e.position.z,this._vertexData[d+3]=e.angle,this._vertexData[d+4]=e.width,this._vertexData[d+5]=e.height,this._useInstancing?d-=2:(this._vertexData[d+6]=n,this._vertexData[d+7]=i),this._vertexData[d+8]=a?e.invertU?0:1:e.invertU?1:0,this._vertexData[d+9]=e.invertV?1:0,this._vertexData[d+10]=e._xOffset,this._vertexData[d+11]=e._yOffset,this._vertexData[d+12]=e._xSize/o.width,this._vertexData[d+13]=e._ySize/o.height,this._vertexData[d+14]=e.color.r,this._vertexData[d+15]=e.color.g,this._vertexData[d+16]=e.color.b,this._vertexData[d+17]=e.color.a},r.prototype.dispose=function(){this._buffer&&(this._buffer.dispose(),this._buffer=null),this._spriteBuffer&&(this._spriteBuffer.dispose(),this._spriteBuffer=null),this._indexBuffer&&(this._engine._releaseBuffer(this._indexBuffer),this._indexBuffer=null),this._vertexArrayObject&&(this._engine.releaseVertexArrayObject(this._vertexArrayObject),this._vertexArrayObject=null),this.texture&&(this.texture.dispose(),this.texture=null)},r}(),rf=function(){function r(t,e,n,i,o,a,s,d,p){var y=this;a===void 0&&(a=.01),s===void 0&&(s=we.a.TRILINEAR_SAMPLINGMODE),d===void 0&&(d=!1),p===void 0&&(p=null),this.name=t,this.sprites=new Array,this.renderingGroupId=0,this.layerMask=268435455,this.isPickable=!1,this.onDisposeObservable=new P.c,this.disableDepthWrite=!1,this._packedAndReady=!1,this._customUpdate=function(M,U){M.cellRef||(M.cellIndex=0);var F=M.cellIndex;typeof F=="number"&&isFinite(F)&&Math.floor(F)===F&&(M.cellRef=y._spriteMap[M.cellIndex]),M._xOffset=y._cellData[M.cellRef].frame.x/U.width,M._yOffset=y._cellData[M.cellRef].frame.y/U.height,M._xSize=y._cellData[M.cellRef].frame.w,M._ySize=y._cellData[M.cellRef].frame.h},o||(o=Ve.a.LastCreatedScene),o._getComponent(st.a.NAME_SPRITE)||o._addComponent(new nf(o)),this._fromPacked=d,this._scene=o;var C=this._scene.getEngine();if(this._spriteRenderer=new ev(C,n,a,o),i.width&&i.height)this.cellWidth=i.width,this.cellHeight=i.height;else{if(i===void 0)return void(this._spriteRenderer=null);this.cellWidth=i,this.cellHeight=i}this._scene.spriteManagers.push(this),this.uniqueId=this.scene.getUniqueId(),e&&(this.texture=new we.a(e,o,!0,!1,s)),this._fromPacked&&this._makePacked(e,p)}return Object.defineProperty(r.prototype,"onDispose",{set:function(t){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(t)},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"children",{get:function(){return this.sprites},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"scene",{get:function(){return this._scene},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"capacity",{get:function(){return this._spriteRenderer.capacity},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"texture",{get:function(){return this._spriteRenderer.texture},set:function(t){t.wrapU=we.a.CLAMP_ADDRESSMODE,t.wrapV=we.a.CLAMP_ADDRESSMODE,this._spriteRenderer.texture=t,this._textureContent=null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cellWidth",{get:function(){return this._spriteRenderer.cellWidth},set:function(t){this._spriteRenderer.cellWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cellHeight",{get:function(){return this._spriteRenderer.cellHeight},set:function(t){this._spriteRenderer.cellHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"fogEnabled",{get:function(){return this._spriteRenderer.fogEnabled},set:function(t){this._spriteRenderer.fogEnabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blendMode",{get:function(){return this._spriteRenderer.blendMode},set:function(t){this._spriteRenderer.blendMode=t},enumerable:!1,configurable:!0}),r.prototype.getClassName=function(){return"SpriteManager"},r.prototype._makePacked=function(t,e){var n=this;if(e!==null)try{var i=void 0;if((i=typeof e=="string"?JSON.parse(e):e).frames.length){for(var o={},a=0;a0);var C=t.substring(0,y-1)+".json",M=new XMLHttpRequest;M.open("GET",C,!0),M.onerror=function(){u.a.Error("JSON ERROR: Unable to load JSON file."),n._fromPacked=!1,n._packedAndReady=!1},M.onload=function(){try{var U=JSON.parse(M.response),F=Reflect.ownKeys(U.frames);n._spriteMap=F,n._packedAndReady=!0,n._cellData=U.frames}catch{throw n._fromPacked=!1,n._packedAndReady=!1,new Error("Invalid JSON format. Please check documentation for format specifications.")}},M.send()}},r.prototype._checkTextureAlpha=function(t,e,n,i,o){if(!t.useAlphaForPicking||!this.texture)return!0;var a=this.texture.getSize();this._textureContent||(this._textureContent=new Uint8Array(a.width*a.height*4),this.texture.readPixels(0,0,this._textureContent));var s=l.c.Vector3[0];s.copyFrom(e.direction),s.normalize(),s.scaleInPlace(n),s.addInPlace(e.origin);var d=(s.x-i.x)/(o.x-i.x)-.5,p=1-(s.y-i.y)/(o.y-i.y)-.5,y=t.angle,C=d*Math.cos(y)-p*Math.sin(y)+.5,M=d*Math.sin(y)+p*Math.cos(y)+.5,U=t._xOffset*a.width+C*t._xSize|0,F=t._yOffset*a.height+M*t._ySize|0;return this._textureContent[4*(U+F*a.width)+3]>.5},r.prototype.intersects=function(t,e,n,i){for(var o=Math.min(this.capacity,this.sprites.length),a=l.e.Zero(),s=l.e.Zero(),d=Number.MAX_VALUE,p=null,y=l.c.Vector3[0],C=l.c.Vector3[1],M=e.getViewMatrix(),U=0;Uz){if(!this._checkTextureAlpha(F,t,z,a,s))continue;if(d=z,p=F,i)break}}}}if(p){var J=new nr.a;M.invertToRef(l.c.Matrix[0]),J.hit=!0,J.pickedSprite=p,J.distance=d;var ie=l.c.Vector3[2];return ie.copyFrom(t.direction),ie.normalize(),ie.scaleInPlace(d),t.origin.addToRef(ie,y),J.pickedPoint=l.e.TransformCoordinates(y,l.c.Matrix[0]),J}return null},r.prototype.multiIntersects=function(t,e,n){for(var i,o=Math.min(this.capacity,this.sprites.length),a=l.e.Zero(),s=l.e.Zero(),d=[],p=l.c.Vector3[0].copyFromFloats(0,0,0),y=l.c.Vector3[1].copyFromFloats(0,0,0),C=e.getViewMatrix(),M=0;M0.) { -mt=mod(time*animationData.z,1.0); -for(float f=0.; fmt){ -frameID=animationData.x; -break; -} -animationData=texture2D(animationMap,vec2((frameID+0.5)/spriteCount,aFrameSteps*f),0.); -} -} - -mat4 frameData=getFrameData(frameID+0.5); -vec2 frameSize=(frameData[0].wz)/spriteMapSize; -vec2 offset=frameData[0].xy*sheetUnits; -vec2 ratio=frameData[2].xy/frameData[0].wz; - -if (frameData[2].z == 1.){ -tileUV.xy=tileUV.yx; -} -if (i == 0){ -color=texture2D(spriteSheet,tileUV*frameSize+offset); -} else { -vec4 nc=texture2D(spriteSheet,tileUV*frameSize+offset); -float alpha=min(color.a+nc.a,1.0); -vec3 mixed=mix(color.xyz,nc.xyz,nc.a); -color=vec4(mixed,alpha); -} -} -color.xyz*=colorMul; -gl_FragColor=color; -}`;je.a.ShadersStore.spriteMapPixelShader=tv;var nv=`precision highp float; - -attribute vec3 position; -attribute vec3 normal; -attribute vec2 uv; - -varying vec3 vPosition; -varying vec2 vUV; -varying vec2 tUV; -varying vec2 stageUnits; -varying vec2 levelUnits; -varying vec2 tileID; - -uniform float time; -uniform mat4 worldViewProjection; -uniform vec2 outputSize; -uniform vec2 stageSize; -uniform vec2 spriteMapSize; -uniform float stageScale; -void main() { -vec4 p=vec4( position,1. ); -vPosition=p.xyz; -vUV=uv; -tUV=uv*stageSize; -gl_Position=worldViewProjection*p; -}`;je.a.ShadersStore.spriteMapVertexShader=nv;var vi,iv=function(){function r(t,e,n,i,o){var a=this;this.name=t,this.sprites=[],this.atlasJSON=e,this.sprites=this.atlasJSON.frames,this.spriteSheet=n,this.options=i,i.stageSize=i.stageSize||new l.d(1,1),i.outputSize=i.outputSize||i.stageSize,i.outputPosition=i.outputPosition||l.e.Zero(),i.outputRotation=i.outputRotation||l.e.Zero(),i.layerCount=i.layerCount||1,i.maxAnimationFrames=i.maxAnimationFrames||0,i.baseTile=i.baseTile||0,i.flipU=i.flipU||!1,i.colorMultiply=i.colorMultiply||new l.e(1,1,1),this._scene=o,this._frameMap=this._createFrameBuffer(),this._tileMaps=new Array;for(var s=0;s0&&(t+=` -\r`),t+=this._tileMaps[e]._texture._bufferView.toString();var n=document.createElement("a");n.href="data:octet/stream;charset=utf-8,"+encodeURI(t),n.target="_blank",n.download=this.name+".tilemaps",n.click(),n.remove()},r.prototype.loadTileMaps=function(t){var e=this,n=new XMLHttpRequest;n.open("GET",t);var i=this.options.layerCount||0;n.onload=function(){for(var o=n.response.split(` -\r`),a=0;a-1&&this._tasks.splice(e,1)},r.prototype._decreaseWaitingTasksCount=function(t){this._waitingTasksCount--;try{this.onProgress&&this.onProgress(this._waitingTasksCount,this._totalTasksCount,t),this.onProgressObservable.notifyObservers(new of(this._waitingTasksCount,this._totalTasksCount,t))}catch(a){u.a.Error("Error running progress callbacks."),console.log(a)}if(this._waitingTasksCount===0){try{var e=this._tasks.slice();this.onFinish&&this.onFinish(e);for(var n=0,i=e;n-1&&this._tasks.splice(o,1)}this.onTasksDoneObservable.notifyObservers(this._tasks)}catch(a){u.a.Error("Error running tasks-done callbacks."),console.log(a)}this._isLoading=!1,this.autoHideLoadingUI&&this._scene.getEngine().hideLoadingUI()}},r.prototype._runTask=function(t){var e=this,n=function(i,o){t._setErrorObject(i,o),e.onTaskError&&e.onTaskError(t),e.onTaskErrorObservable.notifyObservers(t),e._decreaseWaitingTasksCount(t)};t.run(this._scene,function(){try{e.onTaskSuccess&&e.onTaskSuccess(t),e.onTaskSuccessObservable.notifyObservers(t),e._decreaseWaitingTasksCount(t)}catch(i){n("Error executing task success callbacks",i)}},n)},r.prototype.reset=function(){return this._isLoading=!1,this._tasks=new Array,this},r.prototype.load=function(){if(this._isLoading)return this;if(this._isLoading=!0,this._waitingTasksCount=this._tasks.length,this._totalTasksCount=this._tasks.length,this._waitingTasksCount===0)return this._isLoading=!1,this.onFinish&&this.onFinish(this._tasks),this.onTasksDoneObservable.notifyObservers(this._tasks),this;this.useDefaultLoadingScreen&&this._scene.getEngine().displayLoadingUI();for(var t=0;t=0&&this._meshes.splice(n,1),this._centerPosition=this._centerMesh.getAbsolutePosition().clone();for(var i=0;i0&&this._textureLoadingCallback(t)}this._currentScene.render()}},r.prototype.drag=function(t){t.stopPropagation(),t.preventDefault()},r.prototype.drop=function(t){t.stopPropagation(),t.preventDefault(),this.loadFiles(t)},r.prototype._traverseFolder=function(t,e,n,i){var o=this,a=t.createReader(),s=t.fullPath.replace(/^\//,"").replace(/(.+?)\/?$/,"$1/");a.readEntries(function(d){n.count+=d.length;for(var p=0,y=d;p0)){for(var n=new Array,i=[],o=t.dataTransfer?t.dataTransfer.items:null,a=0;a0&&u.a.ClearLogCache(),this._engine.stopRenderLoop()),Ut.ShowLoadingScreen=!1,this._engine.displayLoadingUI(),Ut.LoadAsync("file:",this._sceneFileToLoad,this._engine,function(e){t._progressCallback&&t._progressCallback(e)}).then(function(e){t._currentScene&&t._currentScene.dispose(),t._currentScene=e,t._sceneLoadedCallback&&t._sceneLoadedCallback(t._sceneFileToLoad,t._currentScene),t._currentScene.executeWhenReady(function(){t._engine.hideLoadingUI(),t._engine.runRenderLoop(function(){t.renderFunction()})})}).catch(function(e){t._engine.hideLoadingUI(),t._errorCallback&&t._errorCallback(t._sceneFileToLoad,t._currentScene,e.message)})):u.a.Error("Please provide a valid .babylon file.")},r}(),_f=f(146),fv=f(145),yi=function(){function r(t){t===void 0&&(t=0),this.priority=t}return r.prototype.getDescription=function(){return""},r.prototype.apply=function(t,e){return!0},r}(),Ma=function(r){function t(e,n,i){e===void 0&&(e=0),n===void 0&&(n=1024),i===void 0&&(i=.5);var o=r.call(this,e)||this;return o.priority=e,o.maximumSize=n,o.step=i,o}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Reducing render target texture size to "+this.maximumSize},t.prototype.apply=function(e,n){for(var i=!0,o=0;othis.maximumSize&&(a.scale(this.step),i=!1)}}return i},t}(yi),tl=function(r){function t(e,n,i){e===void 0&&(e=0),n===void 0&&(n=2),i===void 0&&(i=.25);var o=r.call(this,e)||this;return o.priority=e,o.maximumScale=n,o.step=i,o._currentScale=-1,o._directionOffset=1,o}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Setting hardware scaling level to "+this._currentScale},t.prototype.apply=function(e,n){return this._currentScale===-1&&(this._currentScale=e.getEngine().getHardwareScalingLevel(),this._currentScale>this.maximumScale&&(this._directionOffset=-1)),this._currentScale+=this._directionOffset*this.step,e.getEngine().setHardwareScalingLevel(this._currentScale),this._directionOffset===1?this._currentScale>=this.maximumScale:this._currentScale<=this.maximumScale},t}(yi),Ia=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning shadows on/off"},t.prototype.apply=function(e,n){return e.shadowsEnabled=n.isInImprovementMode,!0},t}(yi),Da=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning post-processes on/off"},t.prototype.apply=function(e,n){return e.postProcessesEnabled=n.isInImprovementMode,!0},t}(yi),La=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning lens flares on/off"},t.prototype.apply=function(e,n){return e.lensFlaresEnabled=n.isInImprovementMode,!0},t}(yi),mf=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return this.onGetDescription?this.onGetDescription():"Running user defined callback"},t.prototype.apply=function(e,n){return!this.onApply||this.onApply(e,n)},t}(yi),Na=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning particles on/off"},t.prototype.apply=function(e,n){return e.particlesEnabled=n.isInImprovementMode,!0},t}(yi),nl=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.getDescription=function(){return"Turning render targets off"},t.prototype.apply=function(e,n){return e.renderTargetsEnabled=n.isInImprovementMode,!0},t}(yi),wa=function(r){function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._canBeMerged=function(n){if(!(n instanceof De.a))return!1;var i=n;return!i.isDisposed()&&!(!i.isVisible||!i.isEnabled())&&!(i.instances.length>0)&&!i.skeleton&&!i.hasLODLevels},e}return Object(c.d)(t,r),Object.defineProperty(t,"UpdateSelectionTree",{get:function(){return t._UpdateSelectionTree},set:function(e){t._UpdateSelectionTree=e},enumerable:!1,configurable:!0}),t.prototype.getDescription=function(){return"Merging similar meshes together"},t.prototype.apply=function(e,n,i){for(var o=e.meshes.slice(0),a=o.length,s=0;s=this._targetFrameRate)return this._isRunning=!1,void this.onSuccessObservable.notifyObservers(this);for(var i=!0,o=!0,a=0;a0){o.animationGroups=[];for(var C=0;C0)for(o.reflectionProbes=[],e=0;e0&&setTimeout(function(){n.stopRecording()},1e3*e),this._fileName=t,this._recordedChunks=[],this._resolve=null,this._reject=null,this._canvas.isRecording=!0,this._mediaRecorder.start(this._options.recordChunckSize),new Promise(function(i,o){n._resolve=i,n._reject=o})},r.prototype.dispose=function(){this._canvas=null,this._mediaRecorder=null,this._recordedChunks=[],this._fileName=null,this._resolve=null,this._reject=null},r.prototype._handleDataAvailable=function(t){t.data.size>0&&this._recordedChunks.push(t.data)},r.prototype._handleError=function(t){if(this.stopRecording(),!this._reject)throw new t.error;this._reject(t.error)},r.prototype._handleStop=function(){this.stopRecording();var t=new Blob(this._recordedChunks);this._resolve&&this._resolve(t),window.URL.createObjectURL(t),this._fileName&&Ye.b.Download(t,this._fileName)},r._defaultOptions={mimeType:"video/webm",fps:25,recordChunckSize:3e3},r}(),Io=function(){function r(){}return r.CreateScreenshot=function(t,e,n,i,o){o===void 0&&(o="image/png");var a=r._getScreenshotSize(t,e,n),s=a.height,d=a.width;if(s&&d){Ye.b._ScreenshotCanvas||(Ye.b._ScreenshotCanvas=document.createElement("canvas")),Ye.b._ScreenshotCanvas.width=d,Ye.b._ScreenshotCanvas.height=s;var p=Ye.b._ScreenshotCanvas.getContext("2d"),y=t.getRenderWidth()/t.getRenderHeight(),C=d,M=C/y;M>s&&(C=(M=s)*y);var U=Math.max(0,d-C)/2,F=Math.max(0,s-M)/2,z=t.getRenderingCanvas();p&&z&&p.drawImage(z,U,F,C,M),Ye.b.EncodeScreenshotCanvasData(i,o)}else u.a.Error("Invalid 'size' parameter !")},r.CreateScreenshotAsync=function(t,e,n,i){return i===void 0&&(i="image/png"),new Promise(function(o,a){r.CreateScreenshot(t,e,n,function(s){s!==void 0?o(s):a(new Error("Data is undefined"))},i)})},r.CreateScreenshotUsingRenderTarget=function(t,e,n,i,o,a,s,d,p,y){o===void 0&&(o="image/png"),a===void 0&&(a=1),s===void 0&&(s=!1),p===void 0&&(p=!1),y===void 0&&(y=!1);var C=r._getScreenshotSize(t,e,n),M=C.height,U=C.width,F={width:U,height:M};if(M&&U){var z=t.getRenderingCanvas();if(z){var J={width:z.width,height:z.height};t.setSize(U,M);var ie=e.getScene(),se=null,ce=ie.activeCameras;(ie.activeCamera!==e||ie.activeCameras&&ie.activeCameras.length)&&(se=ie.activeCamera,ie.activeCamera=e),ie.render();var ue=new ln("screenShot",F,ie,!1,!1,h.a.TEXTURETYPE_UNSIGNED_INT,!1,we.a.NEAREST_SAMPLINGMODE,void 0,y);ue.renderList=null,ue.samples=a,ue.renderSprites=p,ue.onAfterRenderObservable.add(function(){Ye.b.DumpFramebuffer(U,M,t,i,o,d)});var fe=function(){ie.incrementRenderId(),ie.resetCachedMaterial(),ue.render(!0),ue.dispose(),se&&(ie.activeCamera=se),ie.activeCameras=ce,t.setSize(J.width,J.height),e.getProjectionMatrix(!0)};if(s){var ve=new Mo("antialiasing",1,ie.activeCamera);ue.addPostProcess(ve),ve.getEffect().isReady()?fe():ve.getEffect().onCompiled=function(){fe()}}else fe()}else u.a.Error("No rendering canvas found !")}else u.a.Error("Invalid 'size' parameter !")},r.CreateScreenshotUsingRenderTargetAsync=function(t,e,n,i,o,a,s,d){return i===void 0&&(i="image/png"),o===void 0&&(o=1),a===void 0&&(a=!1),d===void 0&&(d=!1),new Promise(function(p,y){r.CreateScreenshotUsingRenderTarget(t,e,n,function(C){C!==void 0?p(C):y(new Error("Data is undefined"))},i,o,a,s,d)})},r._getScreenshotSize=function(t,e,n){var i=0,o=0;if(typeof n=="object"){var a=n.precision?Math.abs(n.precision):1;n.width&&n.height?(i=n.height*a,o=n.width*a):n.width&&!n.height?(o=n.width*a,i=Math.round(o/t.getAspectRatio(e))):n.height&&!n.width?(i=n.height*a,o=Math.round(i*t.getAspectRatio(e))):(o=Math.round(t.getRenderWidth()*a),i=Math.round(o/t.getAspectRatio(e)))}else isNaN(n)||(i=n,o=n);return o&&(o=Math.floor(o)),i&&(i=Math.floor(i)),{height:0|i,width:0|o}},r}();Ye.b.CreateScreenshot=Io.CreateScreenshot,Ye.b.CreateScreenshotAsync=Io.CreateScreenshotAsync,Ye.b.CreateScreenshotUsingRenderTarget=Io.CreateScreenshotUsingRenderTarget,Ye.b.CreateScreenshotUsingRenderTargetAsync=Io.CreateScreenshotUsingRenderTargetAsync,function(r){r[r.Checkbox=0]="Checkbox",r[r.Slider=1]="Slider",r[r.Vector3=2]="Vector3",r[r.Quaternion=3]="Quaternion",r[r.Color3=4]="Color3",r[r.String=5]="String"}(el||(el={}));var Gr,vv=f(140),bv=function(){function r(t){this.byteOffset=0,this.buffer=t}return r.prototype.loadAsync=function(t){var e=this;return this.buffer.readAsync(this.byteOffset,t).then(function(n){e._dataView=new DataView(n.buffer,n.byteOffset,n.byteLength),e._dataByteOffset=0})},r.prototype.readUint32=function(){var t=this._dataView.getUint32(this._dataByteOffset,!0);return this._dataByteOffset+=4,this.byteOffset+=4,t},r.prototype.readUint8Array=function(t){var e=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._dataByteOffset,t);return this._dataByteOffset+=t,this.byteOffset+=t,e},r.prototype.readString=function(t){return Qn.a.Decode(this.readUint8Array(t))},r.prototype.skipBytes=function(t){this._dataByteOffset+=t,this.byteOffset+=t},r}(),yv=function(){function r(){}return r._GetStorage=function(){try{return localStorage.setItem("test",""),localStorage.removeItem("test"),localStorage}catch{var t={};return{getItem:function(n){var i=t[n];return i===void 0?null:i},setItem:function(n,i){t[n]=i}}}},r.ReadString=function(t,e){var n=this._Storage.getItem(t);return n!==null?n:e},r.WriteString=function(t,e){this._Storage.setItem(t,e)},r.ReadBoolean=function(t,e){var n=this._Storage.getItem(t);return n!==null?n==="true":e},r.WriteBoolean=function(t,e){this._Storage.setItem(t,e?"true":"false")},r.ReadNumber=function(t,e){var n=this._Storage.getItem(t);return n!==null?parseFloat(n):e},r.WriteNumber=function(t,e){this._Storage.setItem(t,e.toString())},r._Storage=r._GetStorage(),r}(),Tv=function(){function r(){this._trackedScene=null}return r.prototype.track=function(t){this._trackedScene=t,this._savedJSON=ol.Serialize(t)},r.prototype.getDelta=function(){if(!this._trackedScene)return null;var t=ol.Serialize(this._trackedScene),e={};for(var n in t)this._compareCollections(n,this._savedJSON[n],t[n],e);return e},r.prototype._compareArray=function(t,e,n,i){if(e.length===0&&n.length===0)return!0;if(e.length&&!isNaN(e[0])||n.length&&!isNaN(n[0])){if(e.length!==n.length)return!1;if(e.length===0)return!0;for(var o=0;on.MAX_SEQUENCE_LENGTH)throw new Error("Sequences longer than "+n.MAX_SEQUENCE_LENGTH+" not supported.");this._alphabet=o,this._characters=i.map(function(s){return a._alphabet.getCharacterIdx(s)})}return n.prototype.serialize=function(){return JSON.stringify(this._characters)},n.Deserialize=function(i,o){var a=new n([],o);return a._characters=JSON.parse(i),a},n.prototype.distance=function(i){return n._distance(this,i)},n._distance=function(i,o){var a=i._alphabet;if(a!==o._alphabet)throw new Error("Cannot Levenshtein compare Sequences built from different alphabets.");var s=i._characters,d=o._characters,p=s.length,y=d.length,C=n._costMatrix;C[0][0]=0;for(var M=0;M.98)&&(l.e.CrossToRef(r._forwardDir,r._inverseFromVec,r._upDir),r._upDir.normalize(),l.a.LookAtLHToRef(t,e,r._upDir,r._lookMatrix),n.subtractToRef(e,r._fromToVec),r._fromToVec.normalize(),l.e.TransformNormalToRef(r._fromToVec,r._lookMatrix,i),!0)},r._tokenizeSegment=function(t,e){r._bestMatch=0,r._score=l.e.Dot(t,e[0]),r._bestScore=r._score;for(var n=1;nr._bestScore&&(r._bestMatch=n,r._bestScore=r._score);return r._bestMatch},r._forwardDir=new l.e,r._inverseFromVec=new l.e,r._upDir=new l.e,r._fromToVec=new l.e,r._lookMatrix=new l.a,r}(),vf=function(){function r(t){this.chars=new Array(t)}return r.Generate=function(t,e,n,i,o){t===void 0&&(t=64),e===void 0&&(e=256),n===void 0&&(n=.1),i===void 0&&(i=.001),o===void 0&&(o=[]);for(var a,s,d=new r(t),p=0;p1e-6&&M.scaleAndAddToRef(1/(M.lengthSquared()*s),C)}),C.scaleInPlace(a),d.chars[z].addInPlace(C),d.chars[z].normalize()};for(p=o.length;p4;o=Math.floor(o/2))i.push(t.resampleAtTargetResolution(o).tokenize(e.chars));return i},r.prototype.distance=function(t){for(var e=0,n=0;n0&&(this._averageDistance=Math.max(this._averageDistance/this._descriptors.length,r.MIN_AVERAGE_DISTANCE))},r.MIN_AVERAGE_DISTANCE=1,r}(),Sv=function(){function r(){this._maximumAllowableMatchCost=4,this._nameToDescribedTrajectory=new Map}return r.prototype.serialize=function(){var t={};return t.maximumAllowableMatchCost=this._maximumAllowableMatchCost,t.vector3Alphabet=this._vector3Alphabet.serialize(),t.levenshteinAlphabet=this._levenshteinAlphabet.serialize(),t.nameToDescribedTrajectory=[],this._nameToDescribedTrajectory.forEach(function(e,n){t.nameToDescribedTrajectory.push(n),t.nameToDescribedTrajectory.push(e.serialize())}),JSON.stringify(t)},r.Deserialize=function(t){var e=JSON.parse(t),n=new r;n._maximumAllowableMatchCost=e.maximumAllowableMatchCost,n._vector3Alphabet=vf.Deserialize(e.vector3Alphabet),n._levenshteinAlphabet=Gr.Alphabet.Deserialize(e.levenshteinAlphabet);for(var i=0;i0&&this.onFeaturePointsAddedObservable.notifyObservers(a),o.length>0&&this.onFeaturePointsUpdatedObservable.notifyObservers(o)}}},t.prototype._init=function(){this._xrSessionManager.session.trySetFeaturePointCloudEnabled&&this._xrSessionManager.session.trySetFeaturePointCloudEnabled(!0)&&(this._enabled=!0)},t.Name=si.FEATURE_POINTS,t.Version=1,t}(ci);qn.AddWebXRFeature(ja.Name,function(r){return function(){return new ja(r)}},ja.Version);var yf=function(){function r(t,e,n,i,o){this.xrController=t,this.trackedMeshes=e,this._handMesh=n,this._rigMapping=i,this._defaultHandMesh=!1,this._transformNodeMapping=[],this.handPartsDefinition=this.generateHandPartsDefinition(t.inputSource.hand),this._scene=e[0].getScene(),this._handMesh&&this._rigMapping?this._defaultHandMesh=!1:o||this._generateDefaultHandMesh(),this.xrController.motionController&&(this.xrController.motionController.rootMesh?this.xrController.motionController.rootMesh.setEnabled(!1):this.xrController.motionController.onModelLoadedObservable.add(function(a){a.rootMesh&&a.rootMesh.setEnabled(!1)})),this.xrController.onMotionControllerInitObservable.add(function(a){a.onModelLoadedObservable.add(function(s){s.rootMesh&&s.rootMesh.setEnabled(!1)}),a.rootMesh&&a.rootMesh.setEnabled(!1)})}return r.prototype.generateHandPartsDefinition=function(t){var e;return(e={}).wrist=[t.WRIST],e.thumb=[t.THUMB_METACARPAL,t.THUMB_PHALANX_PROXIMAL,t.THUMB_PHALANX_DISTAL,t.THUMB_PHALANX_TIP],e.index=[t.INDEX_METACARPAL,t.INDEX_PHALANX_PROXIMAL,t.INDEX_PHALANX_INTERMEDIATE,t.INDEX_PHALANX_DISTAL,t.INDEX_PHALANX_TIP],e.middle=[t.MIDDLE_METACARPAL,t.MIDDLE_PHALANX_PROXIMAL,t.MIDDLE_PHALANX_INTERMEDIATE,t.MIDDLE_PHALANX_DISTAL,t.MIDDLE_PHALANX_TIP],e.ring=[t.RING_METACARPAL,t.RING_PHALANX_PROXIMAL,t.RING_PHALANX_INTERMEDIATE,t.RING_PHALANX_DISTAL,t.RING_PHALANX_TIP],e.little=[t.LITTLE_METACARPAL,t.LITTLE_PHALANX_PROXIMAL,t.LITTLE_PHALANX_INTERMEDIATE,t.LITTLE_PHALANX_DISTAL,t.LITTLE_PHALANX_TIP],e},r.prototype.updateFromXRFrame=function(t,e,n){var i=this;n===void 0&&(n=2);var o=this.xrController.inputSource.hand;o&&this.trackedMeshes.forEach(function(a,s){var d=o[s];if(d){var p=t.getJointPose(d,e);if(!p||!p.transform)return;var y=p.transform.position,C=p.transform.orientation;a.position.set(y.x,y.y,y.z),a.rotationQuaternion.set(C.x,C.y,C.z,C.w);var M=(p.radius||.008)*n;a.scaling.set(M,M,M),i._handMesh&&i._rigMapping&&i._rigMapping[s]&&(i._transformNodeMapping[s]=i._transformNodeMapping[s]||i._scene.getTransformNodeByName(i._rigMapping[s]),i._transformNodeMapping[s]&&(i._transformNodeMapping[s].position.copyFrom(a.position),i._transformNodeMapping[s].rotationQuaternion.copyFrom(a.rotationQuaternion),a.isVisible=!1)),a.getScene().useRightHandedSystem||(a.position.z*=-1,a.rotationQuaternion.z*=-1,a.rotationQuaternion.w*=-1)}})},r.prototype.getHandPartMeshes=function(t){var e=this;return this.handPartsDefinition[t].map(function(n){return e.trackedMeshes[n]})},r.prototype.dispose=function(){this.trackedMeshes.forEach(function(t){return t.dispose()}),this._defaultHandMesh&&this._handMesh&&this._handMesh.dispose()},r.prototype._generateDefaultHandMesh=function(){return Object(c.b)(this,void 0,void 0,function(){var t,e,n,i,o,a,s,d;return Object(c.e)(this,function(p){switch(p.label){case 0:return p.trys.push([0,3,,4]),t=this.xrController.inputSource.handedness==="right"?"right":"left",e=(t==="right"?"r":"l")+"_hand_"+(this._scene.useRightHandedSystem?"r":"l")+"hs.glb",[4,Ut.ImportMeshAsync("","https://assets.babylonjs.com/meshes/HandMeshes/",e,this._scene)];case 1:return n=p.sent(),i={base:O.a.FromInts(116,63,203),fresnel:O.a.FromInts(149,102,229),fingerColor:O.a.FromInts(177,130,255),tipFresnel:O.a.FromInts(220,200,255)},[4,(o=new Ea("leftHandShader",this._scene,{emitComments:!1})).loadAsync("https://patrickryanms.github.io/BabylonJStextures/Demos/xrHandMesh/handsShader.json")];case 2:if(p.sent(),o.build(!1),o.needDepthPrePass=!0,o.transparencyMode=Ht.a.MATERIAL_ALPHABLEND,o.alphaMode=Ve.a.ALPHA_COMBINE,(a={base:o.getBlockByName("baseColor"),fresnel:o.getBlockByName("fresnelColor"),fingerColor:o.getBlockByName("fingerColor"),tipFresnel:o.getBlockByName("tipFresnelColor")}).base.value=i.base,a.fresnel.value=i.fresnel,a.fingerColor.value=i.fingerColor,a.tipFresnel.value=i.tipFresnel,n.meshes[1].material=o,this._defaultHandMesh=!0,this._handMesh=n.meshes[0],this._rigMapping=["wrist_","thumb_metacarpal_","thumb_proxPhalanx_","thumb_distPhalanx_","thumb_tip_","index_metacarpal_","index_proxPhalanx_","index_intPhalanx_","index_distPhalanx_","index_tip_","middle_metacarpal_","middle_proxPhalanx_","middle_intPhalanx_","middle_distPhalanx_","middle_tip_","ring_metacarpal_","ring_proxPhalanx_","ring_intPhalanx_","ring_distPhalanx_","ring_tip_","little_metacarpal_","little_proxPhalanx_","little_intPhalanx_","little_distPhalanx_","little_tip_"].map(function(y){return y+(t==="right"?"R":"L")}),!(s=this._scene.getTransformNodeByName(this._rigMapping[0])))throw new Error("could not find the wrist node");return s.parent&&s.parent.rotate(ye.a.Y,Math.PI),[3,4];case 3:return d=p.sent(),Ye.b.Error("error loading hand mesh"),console.log(d),[3,4];case 4:return[2]}})})},r}(),Ha=function(r){function t(e,n){var i=r.call(this,e)||this;return i.options=n,i.onHandAddedObservable=new P.c,i.onHandRemovedObservable=new P.c,i._hands={},i._attachHand=function(o){var a,s,d,p,y,C,M,U,F,z;if(o.inputSource.hand&&!i._hands[o.uniqueId]){var J=o.inputSource.hand,ie=[],se=((a=i.options.jointMeshes)===null||a===void 0?void 0:a.sourceMesh)||Vn.a.CreateSphere("jointParent",{diameter:1});se.isVisible=!!(!((s=i.options.jointMeshes)===null||s===void 0)&&s.keepOriginalVisible);for(var ce=0;ce1){for(N();w!==-1&&b._OperatorPriority[V()]>=b._OperatorPriority[de];)D.push(X());I(de),j++}else ne+=te;j++}for(N();w!==-1;)V()==="("?X():D.push(X());return D},b._OperatorPriority={")":0,"(":1,"||":2,"&&":3},b._Stack=["","","","","","","","","","","","","","","","","","","",""],b}(),m=function(b){function E(D,w){w===void 0&&(w=!1);var N=b.call(this)||this;return N.define=D,N.not=w,N}return Object(l.d)(E,b),E.prototype.isTrue=function(D){var w=D[this.define]!==void 0;return this.not&&(w=!w),w},E}(x),c=function(b){function E(){return b!==null&&b.apply(this,arguments)||this}return Object(l.d)(E,b),E.prototype.isTrue=function(D){return this.leftOperand.isTrue(D)||this.rightOperand.isTrue(D)},E}(x),T=function(b){function E(){return b!==null&&b.apply(this,arguments)||this}return Object(l.d)(E,b),E.prototype.isTrue=function(D){return this.leftOperand.isTrue(D)&&this.rightOperand.isTrue(D)},E}(x),A=function(b){function E(D,w,N){var I=b.call(this)||this;return I.define=D,I.operand=w,I.testValue=N,I}return Object(l.d)(E,b),E.prototype.isTrue=function(D){var w=D[this.define];w===void 0&&(w=this.define);var N=!1,I=parseInt(w),V=parseInt(this.testValue);switch(this.operand){case">":N=I>V;break;case"<":N=I=":N=I>=V;break;case"==":N=I===V}return N},E}(x),S=f(21),g=/defined\s*?\((.+?)\)/g,u=/defined\s*?\[(.+?)\]/g,h=function(){function b(){}return b.Process=function(E,D,w,N){var I=this;this._ProcessIncludes(E,D,function(V){var X=I._ProcessShaderConversion(V,D,N);w(X)})},b._ProcessPrecision=function(E,D){var w=D.shouldUseHighPrecisionShader;return E.indexOf("precision highp float")===-1?E=w?`precision highp float; -`+E:`precision mediump float; -`+E:w||(E=E.replace("precision highp float","precision mediump float")),E},b._ExtractOperation=function(E){var D=/defined\((.+)\)/.exec(E);if(D&&D.length)return new m(D[1].trim(),E[0]==="!");for(var w="",N=0,I=0,V=["==",">=","<=","<",">"];I-1));I++);if(N===-1)return new m(E);var X=E.substring(0,N).trim(),j=E.substring(N+w.length).trim();return new A(X,w,j)},b._BuildSubExpression=function(E){E=E.replace(g,"defined[$1]");for(var D=[],w=0,N=x.infixToPostfix(E);w=2){var V=D[D.length-1],X=D[D.length-2];D.length-=2;var j=I=="&&"?new T:new c;typeof V=="string"&&(V=V.replace(u,"defined($1)")),typeof X=="string"&&(X=X.replace(u,"defined($1)")),j.leftOperand=typeof X=="string"?this._ExtractOperation(X):X,j.rightOperand=typeof V=="string"?this._ExtractOperation(V):V,D.push(j)}}var ne=D[D.length-1];return typeof ne=="string"&&(ne=ne.replace(u,"defined($1)")),typeof ne=="string"?this._ExtractOperation(ne):ne},b._BuildExpression=function(E,D){var w=new R,N=E.substring(0,D),I=E.substring(D);return I=I.substring(0,(I.indexOf("//")+1||I.length+1)-1).trim(),w.testExpression=N==="#ifdef"?new m(I):N==="#ifndef"?new m(I,!0):this._BuildSubExpression(I),w},b._MoveCursorWithinIf=function(E,D,w){for(var N=E.currentLine;this._MoveCursor(E,w);){var I=(N=E.currentLine).substring(0,5).toLowerCase();if(I==="#else"){var V=new _;return D.children.push(V),void this._MoveCursor(E,V)}if(I==="#elif"){var X=this._BuildExpression(N,5);D.children.push(X),w=X}}},b._MoveCursor=function(E,D){for(;E.canRead;){E.lineIndex++;var w=E.currentLine,N=/(#ifdef)|(#else)|(#elif)|(#endif)|(#ifndef)|(#if)/.exec(w);if(N&&N.length)switch(N[0]){case"#ifdef":var I=new O;D.children.push(I);var V=this._BuildExpression(w,6);I.children.push(V),this._MoveCursorWithinIf(E,I,V);break;case"#else":case"#elif":return!0;case"#endif":return!1;case"#ifndef":I=new O,D.children.push(I),V=this._BuildExpression(w,7),I.children.push(V),this._MoveCursorWithinIf(E,I,V);break;case"#if":I=new O,V=this._BuildExpression(w,3),D.children.push(I),I.children.push(V),this._MoveCursorWithinIf(E,I,V)}else{var X=new _;if(X.line=w,D.children.push(X),w[0]==="#"&&w[1]==="d"){var j=w.replace(";","").split(" ");X.additionalDefineKey=j[1],j.length===3&&(X.additionalDefineValue=j[2])}}}return!1},b._EvaluatePreProcessors=function(E,D,w){var N=new _,I=new P;return I.lineIndex=-1,I.lines=E.split(` -`),this._MoveCursor(I,N),N.process(D,w)},b._PreparePreProcessors=function(E){for(var D={},w=0,N=E.defines;w1?I[1]:""}return D.GL_ES="true",D.__VERSION__=E.version,D[E.platformName]="true",D},b._ProcessShaderConversion=function(E,D,w){var N=this._ProcessPrecision(E,D);if(!D.processor)return N;if(N.indexOf("#version 3")!==-1)return N.replace("#version 300 es","");var I=D.defines,V=this._PreparePreProcessors(D);return D.processor.preProcessor&&(N=D.processor.preProcessor(N,I,D.isFragment)),N=this._EvaluatePreProcessors(N,V,D),D.processor.postProcessor&&(N=D.processor.postProcessor(N,I,D.isFragment,w)),N},b._ProcessIncludes=function(E,D,w){for(var N=this,I=/#include<(.+)>(\((.*)\))*(\[(.*)\])*/g,V=I.exec(E),X=new String(E),j=!1;V!=null;){var ne=V[1];if(ne.indexOf("__decl__")!==-1&&(ne=ne.replace(/__decl__/,""),D.supportsUniformBuffers&&(ne=(ne=ne.replace(/Vertex/,"Ubo")).replace(/Fragment/,"Ubo")),ne+="Declaration"),!D.includesShadersStore[ne]){var te=D.shadersRepository+"ShadersInclude/"+ne+".fx";return void b._FileToolsLoadFile(te,function(Y){D.includesShadersStore[ne]=Y,N._ProcessIncludes(X,D,w)})}var de=D.includesShadersStore[ne];if(V[2])for(var pe=V[3].split(","),ae=0;ae=0,V=I.exec(E)}j?this._ProcessIncludes(X.toString(),D,w):w(X)},b._FileToolsLoadFile=function(E,D,w,N,I,V){throw S.a.WarnImport("FileTools")},b}()},function(Ae,v,f){f(26).a.prototype._readTexturePixels=function(B,_,P,l,O,R){l===void 0&&(l=-1),O===void 0&&(O=0),R===void 0&&(R=null);var x=this._gl;if(!x)throw new Error("Engine does not have gl rendering context.");if(!this._dummyFramebuffer){var m=x.createFramebuffer();if(!m)throw new Error("Unable to create dummy framebuffer");this._dummyFramebuffer=m}x.bindFramebuffer(x.FRAMEBUFFER,this._dummyFramebuffer),l>-1?x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_CUBE_MAP_POSITIVE_X+l,B._webGLTexture,O):x.framebufferTexture2D(x.FRAMEBUFFER,x.COLOR_ATTACHMENT0,x.TEXTURE_2D,B._webGLTexture,O);var c=B.type!==void 0?this._getWebGLTextureType(B.type):x.UNSIGNED_BYTE;switch(c){case x.UNSIGNED_BYTE:R||(R=new Uint8Array(4*_*P)),c=x.UNSIGNED_BYTE;break;default:R||(R=new Float32Array(4*_*P)),c=x.FLOAT}return x.readPixels(0,0,_,P,x.RGBA,c,R),x.bindFramebuffer(x.FRAMEBUFFER,this._currentFramebuffer),R}},function(Ae,v,f){var B="shadowsFragmentFunctions",_=`#ifdef SHADOWS -#ifndef SHADOWFLOAT - -float unpack(vec4 color) -{ -const vec4 bit_shift=vec4(1.0/(255.0*255.0*255.0),1.0/(255.0*255.0),1.0/255.0,1.0); -return dot(color,bit_shift); -} -#endif -float computeFallOff(float value,vec2 clipSpace,float frustumEdgeFalloff) -{ -float mask=smoothstep(1.0-frustumEdgeFalloff,1.00000012,clamp(dot(clipSpace,clipSpace),0.,1.)); -return mix(value,1.0,mask); -} -#define inline -float computeShadowCube(vec3 lightPosition,samplerCube shadowSampler,float darkness,vec2 depthValues) -{ -vec3 directionToLight=vPositionW-lightPosition; -float depth=length(directionToLight); -depth=(depth+depthValues.x)/(depthValues.y); -depth=clamp(depth,0.,1.0); -directionToLight=normalize(directionToLight); -directionToLight.y=-directionToLight.y; -#ifndef SHADOWFLOAT -float shadow=unpack(textureCube(shadowSampler,directionToLight)); -#else -float shadow=textureCube(shadowSampler,directionToLight).x; -#endif -return depth>shadow ? darkness : 1.0; -} -#define inline -float computeShadowWithPoissonSamplingCube(vec3 lightPosition,samplerCube shadowSampler,float mapSize,float darkness,vec2 depthValues) -{ -vec3 directionToLight=vPositionW-lightPosition; -float depth=length(directionToLight); -depth=(depth+depthValues.x)/(depthValues.y); -depth=clamp(depth,0.,1.0); -directionToLight=normalize(directionToLight); -directionToLight.y=-directionToLight.y; -float visibility=1.; -vec3 poissonDisk[4]; -poissonDisk[0]=vec3(-1.0,1.0,-1.0); -poissonDisk[1]=vec3(1.0,-1.0,-1.0); -poissonDisk[2]=vec3(-1.0,-1.0,-1.0); -poissonDisk[3]=vec3(1.0,-1.0,1.0); - -#ifndef SHADOWFLOAT -if (unpack(textureCube(shadowSampler,directionToLight+poissonDisk[0]*mapSize))shadow ? computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff) : 1.; -} -#endif -#define inline -float computeShadow(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float frustumEdgeFalloff) -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec2 uv=0.5*clipSpace.xy+vec2(0.5); -if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) -{ -return 1.0; -} -else -{ -float shadowPixelDepth=clamp(depthMetric,0.,1.0); -#ifndef SHADOWFLOAT -float shadow=unpack(texture2D(shadowSampler,uv)); -#else -float shadow=texture2D(shadowSampler,uv).x; -#endif -return shadowPixelDepth>shadow ? computeFallOff(darkness,clipSpace.xy,frustumEdgeFalloff) : 1.; -} -} -#define inline -float computeShadowWithPoissonSampling(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float mapSize,float darkness,float frustumEdgeFalloff) -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec2 uv=0.5*clipSpace.xy+vec2(0.5); -if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) -{ -return 1.0; -} -else -{ -float shadowPixelDepth=clamp(depthMetric,0.,1.0); -float visibility=1.; -vec2 poissonDisk[4]; -poissonDisk[0]=vec2(-0.94201624,-0.39906216); -poissonDisk[1]=vec2(0.94558609,-0.76890725); -poissonDisk[2]=vec2(-0.094184101,-0.92938870); -poissonDisk[3]=vec2(0.34495938,0.29387760); - -#ifndef SHADOWFLOAT -if (unpack(texture2D(shadowSampler,uv+poissonDisk[0]*mapSize))1.0 || uv.y<0. || uv.y>1.0) -{ -return 1.0; -} -else -{ -float shadowPixelDepth=clamp(depthMetric,0.,1.0); -#ifndef SHADOWFLOAT -float shadowMapSample=unpack(texture2D(shadowSampler,uv)); -#else -float shadowMapSample=texture2D(shadowSampler,uv).x; -#endif -float esm=1.0-clamp(exp(min(87.,depthScale*shadowPixelDepth))*shadowMapSample,0.,1.-darkness); -return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff); -} -} -#define inline -float computeShadowWithCloseESM(vec4 vPositionFromLight,float depthMetric,sampler2D shadowSampler,float darkness,float depthScale,float frustumEdgeFalloff) -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec2 uv=0.5*clipSpace.xy+vec2(0.5); -if (uv.x<0. || uv.x>1.0 || uv.y<0. || uv.y>1.0) -{ -return 1.0; -} -else -{ -float shadowPixelDepth=clamp(depthMetric,0.,1.0); -#ifndef SHADOWFLOAT -float shadowMapSample=unpack(texture2D(shadowSampler,uv)); -#else -float shadowMapSample=texture2D(shadowSampler,uv).x; -#endif -float esm=clamp(exp(min(87.,-depthScale*(shadowPixelDepth-shadowMapSample))),darkness,1.); -return computeFallOff(esm,clipSpace.xy,frustumEdgeFalloff); -} -} -#ifdef WEBGL2 -#define GREATEST_LESS_THAN_ONE 0.99999994 - -#define inline -float computeShadowWithCSMPCF1(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,float darkness,float frustumEdgeFalloff) -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); -uvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE); -vec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z); -float shadow=texture(shadowSampler,uvDepthLayer); -shadow=mix(darkness,1.,shadow); -return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); -} - - - -#define inline -float computeShadowWithCSMPCF3(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); -uvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE); -vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; -uv+=0.5; -vec2 st=fract(uv); -vec2 base_uv=floor(uv)-0.5; -base_uv*=shadowMapSizeAndInverse.y; - - - - -vec2 uvw0=3.-2.*st; -vec2 uvw1=1.+2.*st; -vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y; -vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y; -float shadow=0.; -shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z)); -shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z)); -shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z)); -shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z)); -shadow=shadow/16.; -shadow=mix(darkness,1.,shadow); -return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); -} - - - -#define inline -float computeShadowWithCSMPCF5(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArrayShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); -uvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE); -vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; -uv+=0.5; -vec2 st=fract(uv); -vec2 base_uv=floor(uv)-0.5; -base_uv*=shadowMapSizeAndInverse.y; - - -vec2 uvw0=4.-3.*st; -vec2 uvw1=vec2(7.); -vec2 uvw2=1.+3.*st; -vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y; -vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y; -float shadow=0.; -shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[0]),layer,uvDepth.z)); -shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[0]),layer,uvDepth.z)); -shadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[0]),layer,uvDepth.z)); -shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[1]),layer,uvDepth.z)); -shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[1]),layer,uvDepth.z)); -shadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[1]),layer,uvDepth.z)); -shadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[0],v[2]),layer,uvDepth.z)); -shadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[1],v[2]),layer,uvDepth.z)); -shadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec4(base_uv.xy+vec2(u[2],v[2]),layer,uvDepth.z)); -shadow=shadow/144.; -shadow=mix(darkness,1.,shadow); -return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); -} - -#define inline -float computeShadowWithPCF1(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,float darkness,float frustumEdgeFalloff) -{ -if (depthMetric>1.0 || depthMetric<0.0) { -return 1.0; -} -else -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); -float shadow=texture2D(shadowSampler,uvDepth); -shadow=mix(darkness,1.,shadow); -return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); -} -} - - - -#define inline -float computeShadowWithPCF3(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) -{ -if (depthMetric>1.0 || depthMetric<0.0) { -return 1.0; -} -else -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); -vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; -uv+=0.5; -vec2 st=fract(uv); -vec2 base_uv=floor(uv)-0.5; -base_uv*=shadowMapSizeAndInverse.y; - - - - -vec2 uvw0=3.-2.*st; -vec2 uvw1=1.+2.*st; -vec2 u=vec2((2.-st.x)/uvw0.x-1.,st.x/uvw1.x+1.)*shadowMapSizeAndInverse.y; -vec2 v=vec2((2.-st.y)/uvw0.y-1.,st.y/uvw1.y+1.)*shadowMapSizeAndInverse.y; -float shadow=0.; -shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z)); -shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z)); -shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z)); -shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z)); -shadow=shadow/16.; -shadow=mix(darkness,1.,shadow); -return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); -} -} - - - -#define inline -float computeShadowWithPCF5(vec4 vPositionFromLight,float depthMetric,highp sampler2DShadow shadowSampler,vec2 shadowMapSizeAndInverse,float darkness,float frustumEdgeFalloff) -{ -if (depthMetric>1.0 || depthMetric<0.0) { -return 1.0; -} -else -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); -vec2 uv=uvDepth.xy*shadowMapSizeAndInverse.x; -uv+=0.5; -vec2 st=fract(uv); -vec2 base_uv=floor(uv)-0.5; -base_uv*=shadowMapSizeAndInverse.y; - - -vec2 uvw0=4.-3.*st; -vec2 uvw1=vec2(7.); -vec2 uvw2=1.+3.*st; -vec3 u=vec3((3.-2.*st.x)/uvw0.x-2.,(3.+st.x)/uvw1.x,st.x/uvw2.x+2.)*shadowMapSizeAndInverse.y; -vec3 v=vec3((3.-2.*st.y)/uvw0.y-2.,(3.+st.y)/uvw1.y,st.y/uvw2.y+2.)*shadowMapSizeAndInverse.y; -float shadow=0.; -shadow+=uvw0.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[0]),uvDepth.z)); -shadow+=uvw1.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[0]),uvDepth.z)); -shadow+=uvw2.x*uvw0.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[0]),uvDepth.z)); -shadow+=uvw0.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[1]),uvDepth.z)); -shadow+=uvw1.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[1]),uvDepth.z)); -shadow+=uvw2.x*uvw1.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[1]),uvDepth.z)); -shadow+=uvw0.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[0],v[2]),uvDepth.z)); -shadow+=uvw1.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[1],v[2]),uvDepth.z)); -shadow+=uvw2.x*uvw2.y*texture2D(shadowSampler,vec3(base_uv.xy+vec2(u[2],v[2]),uvDepth.z)); -shadow=shadow/144.; -shadow=mix(darkness,1.,shadow); -return computeFallOff(shadow,clipSpace.xy,frustumEdgeFalloff); -} -} -const vec3 PoissonSamplers32[64]=vec3[64]( -vec3(0.06407013,0.05409927,0.), -vec3(0.7366577,0.5789394,0.), -vec3(-0.6270542,-0.5320278,0.), -vec3(-0.4096107,0.8411095,0.), -vec3(0.6849564,-0.4990818,0.), -vec3(-0.874181,-0.04579735,0.), -vec3(0.9989998,0.0009880066,0.), -vec3(-0.004920578,-0.9151649,0.), -vec3(0.1805763,0.9747483,0.), -vec3(-0.2138451,0.2635818,0.), -vec3(0.109845,0.3884785,0.), -vec3(0.06876755,-0.3581074,0.), -vec3(0.374073,-0.7661266,0.), -vec3(0.3079132,-0.1216763,0.), -vec3(-0.3794335,-0.8271583,0.), -vec3(-0.203878,-0.07715034,0.), -vec3(0.5912697,0.1469799,0.), -vec3(-0.88069,0.3031784,0.), -vec3(0.5040108,0.8283722,0.), -vec3(-0.5844124,0.5494877,0.), -vec3(0.6017799,-0.1726654,0.), -vec3(-0.5554981,0.1559997,0.), -vec3(-0.3016369,-0.3900928,0.), -vec3(-0.5550632,-0.1723762,0.), -vec3(0.925029,0.2995041,0.), -vec3(-0.2473137,0.5538505,0.), -vec3(0.9183037,-0.2862392,0.), -vec3(0.2469421,0.6718712,0.), -vec3(0.3916397,-0.4328209,0.), -vec3(-0.03576927,-0.6220032,0.), -vec3(-0.04661255,0.7995201,0.), -vec3(0.4402924,0.3640312,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.), -vec3(0.,0.,0.) -); -const vec3 PoissonSamplers64[64]=vec3[64]( -vec3(-0.613392,0.617481,0.), -vec3(0.170019,-0.040254,0.), -vec3(-0.299417,0.791925,0.), -vec3(0.645680,0.493210,0.), -vec3(-0.651784,0.717887,0.), -vec3(0.421003,0.027070,0.), -vec3(-0.817194,-0.271096,0.), -vec3(-0.705374,-0.668203,0.), -vec3(0.977050,-0.108615,0.), -vec3(0.063326,0.142369,0.), -vec3(0.203528,0.214331,0.), -vec3(-0.667531,0.326090,0.), -vec3(-0.098422,-0.295755,0.), -vec3(-0.885922,0.215369,0.), -vec3(0.566637,0.605213,0.), -vec3(0.039766,-0.396100,0.), -vec3(0.751946,0.453352,0.), -vec3(0.078707,-0.715323,0.), -vec3(-0.075838,-0.529344,0.), -vec3(0.724479,-0.580798,0.), -vec3(0.222999,-0.215125,0.), -vec3(-0.467574,-0.405438,0.), -vec3(-0.248268,-0.814753,0.), -vec3(0.354411,-0.887570,0.), -vec3(0.175817,0.382366,0.), -vec3(0.487472,-0.063082,0.), -vec3(-0.084078,0.898312,0.), -vec3(0.488876,-0.783441,0.), -vec3(0.470016,0.217933,0.), -vec3(-0.696890,-0.549791,0.), -vec3(-0.149693,0.605762,0.), -vec3(0.034211,0.979980,0.), -vec3(0.503098,-0.308878,0.), -vec3(-0.016205,-0.872921,0.), -vec3(0.385784,-0.393902,0.), -vec3(-0.146886,-0.859249,0.), -vec3(0.643361,0.164098,0.), -vec3(0.634388,-0.049471,0.), -vec3(-0.688894,0.007843,0.), -vec3(0.464034,-0.188818,0.), -vec3(-0.440840,0.137486,0.), -vec3(0.364483,0.511704,0.), -vec3(0.034028,0.325968,0.), -vec3(0.099094,-0.308023,0.), -vec3(0.693960,-0.366253,0.), -vec3(0.678884,-0.204688,0.), -vec3(0.001801,0.780328,0.), -vec3(0.145177,-0.898984,0.), -vec3(0.062655,-0.611866,0.), -vec3(0.315226,-0.604297,0.), -vec3(-0.780145,0.486251,0.), -vec3(-0.371868,0.882138,0.), -vec3(0.200476,0.494430,0.), -vec3(-0.494552,-0.711051,0.), -vec3(0.612476,0.705252,0.), -vec3(-0.578845,-0.768792,0.), -vec3(-0.772454,-0.090976,0.), -vec3(0.504440,0.372295,0.), -vec3(0.155736,0.065157,0.), -vec3(0.391522,0.849605,0.), -vec3(-0.620106,-0.328104,0.), -vec3(0.789239,-0.419965,0.), -vec3(-0.545396,0.538133,0.), -vec3(-0.178564,-0.596057,0.) -); - - - - - -#define inline -float computeShadowWithCSMPCSS(float layer,vec4 vPositionFromLight,float depthMetric,highp sampler2DArray depthSampler,highp sampler2DArrayShadow shadowSampler,float shadowMapSizeInverse,float lightSizeUV,float darkness,float frustumEdgeFalloff,int searchTapCount,int pcfTapCount,vec3[64] poissonSamplers,vec2 lightSizeUVCorrection,float depthCorrection,float penumbraDarkness) -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); -uvDepth.z=clamp(uvDepth.z,0.,GREATEST_LESS_THAN_ONE); -vec4 uvDepthLayer=vec4(uvDepth.x,uvDepth.y,layer,uvDepth.z); -float blockerDepth=0.0; -float sumBlockerDepth=0.0; -float numBlocker=0.0; -for (int i=0; i1.0 || depthMetric<0.0) { -return 1.0; -} -else -{ -vec3 clipSpace=vPositionFromLight.xyz/vPositionFromLight.w; -vec3 uvDepth=vec3(0.5*clipSpace.xyz+vec3(0.5)); -float blockerDepth=0.0; -float sumBlockerDepth=0.0; -float numBlocker=0.0; -for (int i=0; icurrRayHeight) -{ -float delta1=currSampledHeight-currRayHeight; -float delta2=(currRayHeight+stepSize)-lastSampledHeight; -float ratio=delta1/(delta1+delta2); -vCurrOffset=(ratio)* vLastOffset+(1.0-ratio)*vCurrOffset; - -break; -} -else -{ -currRayHeight-=stepSize; -vLastOffset=vCurrOffset; -vCurrOffset+=stepSize*vMaxOffset; -lastSampledHeight=currSampledHeight; -} -} -return vCurrOffset; -} -vec2 parallaxOffset(vec3 viewDir,float heightScale) -{ - -float height=texture2D(bumpSampler,vBumpUV).w; -vec2 texCoordOffset=heightScale*viewDir.xy*height; -return -texCoordOffset; -} -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B=`vec2 uvOffset=vec2(0.0,0.0); -#if defined(BUMP) || defined(PARALLAX) || defined(DETAIL) -#ifdef NORMALXYSCALE -float normalScale=1.0; -#elif defined(BUMP) -float normalScale=vBumpInfos.y; -#else -float normalScale=1.0; -#endif -#if defined(TANGENT) && defined(NORMAL) -mat3 TBN=vTBN; -#elif defined(BUMP) -mat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vBumpUV); -#else -mat3 TBN=cotangent_frame(normalW*normalScale,vPositionW,vDetailUV,vec2(1.,1.)); -#endif -#elif defined(ANISOTROPIC) -#if defined(TANGENT) && defined(NORMAL) -mat3 TBN=vTBN; -#else -mat3 TBN=cotangent_frame(normalW,vPositionW,vMainUV1,vec2(1.,1.)); -#endif -#endif -#ifdef PARALLAX -mat3 invTBN=transposeMat3(TBN); -#ifdef PARALLAXOCCLUSION -uvOffset=parallaxOcclusion(invTBN*-viewDirectionW,invTBN*normalW,vBumpUV,vBumpInfos.z); -#else -uvOffset=parallaxOffset(invTBN*viewDirectionW,vBumpInfos.z); -#endif -#endif -#ifdef DETAIL -vec4 detailColor=texture2D(detailSampler,vDetailUV+uvOffset); -vec2 detailNormalRG=detailColor.wy*2.0-1.0; -float detailNormalB=sqrt(1.-saturate(dot(detailNormalRG,detailNormalRG))); -vec3 detailNormal=vec3(detailNormalRG,detailNormalB); -#endif -#ifdef BUMP -#ifdef OBJECTSPACE_NORMALMAP -normalW=normalize(texture2D(bumpSampler,vBumpUV).xyz*2.0-1.0); -normalW=normalize(mat3(normalMatrix)*normalW); -#elif !defined(DETAIL) -normalW=perturbNormal(TBN,vBumpUV+uvOffset); -#else -vec3 bumpNormal=texture2D(bumpSampler,vBumpUV+uvOffset).xyz*2.0-1.0; - -#if DETAIL_NORMALBLENDMETHOD == 0 -detailNormal.xy*=vDetailInfos.z; -vec3 blendedNormal=normalize(vec3(bumpNormal.xy+detailNormal.xy,bumpNormal.z*detailNormal.z)); -#elif DETAIL_NORMALBLENDMETHOD == 1 -detailNormal.xy*=vDetailInfos.z; -bumpNormal+=vec3(0.0,0.0,1.0); -detailNormal*=vec3(-1.0,-1.0,1.0); -vec3 blendedNormal=bumpNormal*dot(bumpNormal,detailNormal)/bumpNormal.z-detailNormal; -#endif -normalW=perturbNormalBase(TBN,blendedNormal,vBumpInfos.y); -#endif -#elif defined(DETAIL) -detailNormal.xy*=vDetailInfos.z; -normalW=perturbNormalBase(TBN,detailNormal,vDetailInfos.z); -#endif`;f(5).a.IncludesShadersStore.bumpFragment=B},function(Ae,v,f){var B="lightFragment",_=`#ifdef LIGHT{X} -#if defined(SHADOWONLY) || defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) && defined(LIGHTMAPNOSPECULAR{X}) - -#else -#ifdef PBR - -#ifdef SPOTLIGHT{X} -preInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW); -#elif defined(POINTLIGHT{X}) -preInfo=computePointAndSpotPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW); -#elif defined(HEMILIGHT{X}) -preInfo=computeHemisphericPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW); -#elif defined(DIRLIGHT{X}) -preInfo=computeDirectionalPreLightingInfo(light{X}.vLightData,viewDirectionW,normalW); -#endif -preInfo.NdotV=NdotV; - -#ifdef SPOTLIGHT{X} -#ifdef LIGHT_FALLOFF_GLTF{X} -preInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y); -preInfo.attenuation*=computeDirectionalLightFalloff_GLTF(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w); -#elif defined(LIGHT_FALLOFF_PHYSICAL{X}) -preInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared); -preInfo.attenuation*=computeDirectionalLightFalloff_Physical(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w); -#elif defined(LIGHT_FALLOFF_STANDARD{X}) -preInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x); -preInfo.attenuation*=computeDirectionalLightFalloff_Standard(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w); -#else -preInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y); -preInfo.attenuation*=computeDirectionalLightFalloff(light{X}.vLightDirection.xyz,preInfo.L,light{X}.vLightDirection.w,light{X}.vLightData.w,light{X}.vLightFalloff.z,light{X}.vLightFalloff.w); -#endif -#elif defined(POINTLIGHT{X}) -#ifdef LIGHT_FALLOFF_GLTF{X} -preInfo.attenuation=computeDistanceLightFalloff_GLTF(preInfo.lightDistanceSquared,light{X}.vLightFalloff.y); -#elif defined(LIGHT_FALLOFF_PHYSICAL{X}) -preInfo.attenuation=computeDistanceLightFalloff_Physical(preInfo.lightDistanceSquared); -#elif defined(LIGHT_FALLOFF_STANDARD{X}) -preInfo.attenuation=computeDistanceLightFalloff_Standard(preInfo.lightOffset,light{X}.vLightFalloff.x); -#else -preInfo.attenuation=computeDistanceLightFalloff(preInfo.lightOffset,preInfo.lightDistanceSquared,light{X}.vLightFalloff.x,light{X}.vLightFalloff.y); -#endif -#else -preInfo.attenuation=1.0; -#endif - - -#ifdef HEMILIGHT{X} -preInfo.roughness=roughness; -#else -preInfo.roughness=adjustRoughnessFromLightProperties(roughness,light{X}.vLightSpecular.a,preInfo.lightDistance); -#endif - -#ifdef HEMILIGHT{X} -info.diffuse=computeHemisphericDiffuseLighting(preInfo,light{X}.vLightDiffuse.rgb,light{X}.vLightGround); -#elif defined(SS_TRANSLUCENCY) -info.diffuse=computeDiffuseAndTransmittedLighting(preInfo,light{X}.vLightDiffuse.rgb,subSurfaceOut.transmittance); -#else -info.diffuse=computeDiffuseLighting(preInfo,light{X}.vLightDiffuse.rgb); -#endif - -#ifdef SPECULARTERM -#ifdef ANISOTROPIC -info.specular=computeAnisotropicSpecularLighting(preInfo,viewDirectionW,normalW,anisotropicOut.anisotropicTangent,anisotropicOut.anisotropicBitangent,anisotropicOut.anisotropy,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb); -#else -info.specular=computeSpecularLighting(preInfo,normalW,clearcoatOut.specularEnvironmentR0,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb); -#endif -#endif - -#ifdef SHEEN -#ifdef SHEEN_LINKWITHALBEDO - -preInfo.roughness=sheenOut.sheenIntensity; -#else -#ifdef HEMILIGHT{X} -preInfo.roughness=sheenOut.sheenRoughness; -#else -preInfo.roughness=adjustRoughnessFromLightProperties(sheenOut.sheenRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance); -#endif -#endif -info.sheen=computeSheenLighting(preInfo,normalW,sheenOut.sheenColor,specularEnvironmentR90,AARoughnessFactors.x,light{X}.vLightDiffuse.rgb); -#endif - -#ifdef CLEARCOAT - -#ifdef HEMILIGHT{X} -preInfo.roughness=clearcoatOut.clearCoatRoughness; -#else -preInfo.roughness=adjustRoughnessFromLightProperties(clearcoatOut.clearCoatRoughness,light{X}.vLightSpecular.a,preInfo.lightDistance); -#endif -info.clearCoat=computeClearCoatLighting(preInfo,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatAARoughnessFactors.x,clearcoatOut.clearCoatIntensity,light{X}.vLightDiffuse.rgb); -#ifdef CLEARCOAT_TINT - -absorption=computeClearCoatLightingAbsorption(clearcoatOut.clearCoatNdotVRefract,preInfo.L,clearcoatOut.clearCoatNormalW,clearcoatOut.clearCoatColor,clearcoatOut.clearCoatThickness,clearcoatOut.clearCoatIntensity); -info.diffuse*=absorption; -#ifdef SPECULARTERM -info.specular*=absorption; -#endif -#endif - -info.diffuse*=info.clearCoat.w; -#ifdef SPECULARTERM -info.specular*=info.clearCoat.w; -#endif -#ifdef SHEEN -info.sheen*=info.clearCoat.w; -#endif -#endif -#else -#ifdef SPOTLIGHT{X} -info=computeSpotLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDirection,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightDiffuse.a,glossiness); -#elif defined(HEMILIGHT{X}) -info=computeHemisphericLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightGround,glossiness); -#elif defined(POINTLIGHT{X}) || defined(DIRLIGHT{X}) -info=computeLighting(viewDirectionW,normalW,light{X}.vLightData,light{X}.vLightDiffuse.rgb,light{X}.vLightSpecular.rgb,light{X}.vLightDiffuse.a,glossiness); -#endif -#endif -#ifdef PROJECTEDLIGHTTEXTURE{X} -info.diffuse*=computeProjectionTextureDiffuseLighting(projectionLightSampler{X},textureProjectionMatrix{X}); -#endif -#endif -#ifdef SHADOW{X} -#ifdef SHADOWCSM{X} -for (int i=0; i=0.) { -index{X}=i; -break; -} -} -#ifdef SHADOWCSMUSESHADOWMAXZ{X} -if (index{X}>=0) -#endif -{ -#if defined(SHADOWPCF{X}) -#if defined(SHADOWLOWQUALITY{X}) -shadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#elif defined(SHADOWMEDIUMQUALITY{X}) -shadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#else -shadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#endif -#elif defined(SHADOWPCSS{X}) -#if defined(SHADOWLOWQUALITY{X}) -shadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); -#elif defined(SHADOWMEDIUMQUALITY{X}) -shadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); -#else -shadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); -#endif -#else -shadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#endif -#ifdef SHADOWCSMDEBUG{X} -shadowDebug{X}=vec3(shadow)*vCascadeColorsMultiplier{X}[index{X}]; -#endif -#ifndef SHADOWCSMNOBLEND{X} -float frustumLength=frustumLengths{X}[index{X}]; -float diffRatio=clamp(diff{X}/frustumLength,0.,1.)*cascadeBlendFactor{X}; -if (index{X}<(SHADOWCSMNUM_CASCADES{X}-1) && diffRatio<1.) -{ -index{X}+=1; -float nextShadow=0.; -#if defined(SHADOWPCF{X}) -#if defined(SHADOWLOWQUALITY{X}) -nextShadow=computeShadowWithCSMPCF1(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#elif defined(SHADOWMEDIUMQUALITY{X}) -nextShadow=computeShadowWithCSMPCF3(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#else -nextShadow=computeShadowWithCSMPCF5(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#endif -#elif defined(SHADOWPCSS{X}) -#if defined(SHADOWLOWQUALITY{X}) -nextShadow=computeShadowWithCSMPCSS16(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); -#elif defined(SHADOWMEDIUMQUALITY{X}) -nextShadow=computeShadowWithCSMPCSS32(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); -#else -nextShadow=computeShadowWithCSMPCSS64(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w,lightSizeUVCorrection{X}[index{X}],depthCorrection{X}[index{X}],penumbraDarkness{X}); -#endif -#else -nextShadow=computeShadowCSM(float(index{X}),vPositionFromLight{X}[index{X}],vDepthMetric{X}[index{X}],shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#endif -shadow=mix(nextShadow,shadow,diffRatio); -#ifdef SHADOWCSMDEBUG{X} -shadowDebug{X}=mix(vec3(nextShadow)*vCascadeColorsMultiplier{X}[index{X}],shadowDebug{X},diffRatio); -#endif -} -#endif -} -#elif defined(SHADOWCLOSEESM{X}) -#if defined(SHADOWCUBE{X}) -shadow=computeShadowWithCloseESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues); -#else -shadow=computeShadowWithCloseESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w); -#endif -#elif defined(SHADOWESM{X}) -#if defined(SHADOWCUBE{X}) -shadow=computeShadowWithESMCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.depthValues); -#else -shadow=computeShadowWithESM(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.z,light{X}.shadowsInfo.w); -#endif -#elif defined(SHADOWPOISSON{X}) -#if defined(SHADOWCUBE{X}) -shadow=computeShadowWithPoissonSamplingCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.depthValues); -#else -shadow=computeShadowWithPoissonSampling(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#endif -#elif defined(SHADOWPCF{X}) -#if defined(SHADOWLOWQUALITY{X}) -shadow=computeShadowWithPCF1(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#elif defined(SHADOWMEDIUMQUALITY{X}) -shadow=computeShadowWithPCF3(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#else -shadow=computeShadowWithPCF5(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.yz,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#endif -#elif defined(SHADOWPCSS{X}) -#if defined(SHADOWLOWQUALITY{X}) -shadow=computeShadowWithPCSS16(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#elif defined(SHADOWMEDIUMQUALITY{X}) -shadow=computeShadowWithPCSS32(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#else -shadow=computeShadowWithPCSS64(vPositionFromLight{X},vDepthMetric{X},depthSampler{X},shadowSampler{X},light{X}.shadowsInfo.y,light{X}.shadowsInfo.z,light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#endif -#else -#if defined(SHADOWCUBE{X}) -shadow=computeShadowCube(light{X}.vLightData.xyz,shadowSampler{X},light{X}.shadowsInfo.x,light{X}.depthValues); -#else -shadow=computeShadow(vPositionFromLight{X},vDepthMetric{X},shadowSampler{X},light{X}.shadowsInfo.x,light{X}.shadowsInfo.w); -#endif -#endif -#ifdef SHADOWONLY -#ifndef SHADOWINUSE -#define SHADOWINUSE -#endif -globalShadow+=shadow; -shadowLightCount+=1.0; -#endif -#else -shadow=1.; -#endif -#ifndef SHADOWONLY -#ifdef CUSTOMUSERLIGHTING -diffuseBase+=computeCustomDiffuseLighting(info,diffuseBase,shadow); -#ifdef SPECULARTERM -specularBase+=computeCustomSpecularLighting(info,specularBase,shadow); -#endif -#elif defined(LIGHTMAP) && defined(LIGHTMAPEXCLUDED{X}) -diffuseBase+=lightmapColor.rgb*shadow; -#ifdef SPECULARTERM -#ifndef LIGHTMAPNOSPECULAR{X} -specularBase+=info.specular*shadow*lightmapColor.rgb; -#endif -#endif -#ifdef CLEARCOAT -#ifndef LIGHTMAPNOSPECULAR{X} -clearCoatBase+=info.clearCoat.rgb*shadow*lightmapColor.rgb; -#endif -#endif -#ifdef SHEEN -#ifndef LIGHTMAPNOSPECULAR{X} -sheenBase+=info.sheen.rgb*shadow; -#endif -#endif -#else -#ifdef SHADOWCSMDEBUG{X} -diffuseBase+=info.diffuse*shadowDebug{X}; -#else -diffuseBase+=info.diffuse*shadow; -#endif -#ifdef SPECULARTERM -specularBase+=info.specular*shadow; -#endif -#ifdef CLEARCOAT -clearCoatBase+=info.clearCoat.rgb*shadow; -#endif -#ifdef SHEEN -sheenBase+=info.sheen.rgb*shadow; -#endif -#endif -#endif -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B=`#ifdef FOG -float fog=CalcFogFactor(); -color.rgb=fog*color.rgb+(1.0-fog)*vFogColor; -#endif`;f(5).a.IncludesShadersStore.fogFragment=B},function(Ae,v,f){var B="fogVertexDeclaration",_=`#ifdef FOG -varying vec3 vFogDistance; -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="shadowsVertex",_=`#ifdef SHADOWS -#if defined(SHADOWCSM{X}) -vPositionFromCamera{X}=view*worldPos; -for (int i=0; i1)for(var T=0;T=P||O.indexOf("file:")!==-1?-1:Math.pow(2,x)*l}},_}()},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,this.reset()}return Object.defineProperty(_.prototype,"isDirty",{get:function(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"zOffset",{get:function(){return this._zOffset},set:function(P){this._zOffset!==P&&(this._zOffset=P,this._isZOffsetDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"cullFace",{get:function(){return this._cullFace},set:function(P){this._cullFace!==P&&(this._cullFace=P,this._isCullFaceDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"cull",{get:function(){return this._cull},set:function(P){this._cull!==P&&(this._cull=P,this._isCullDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"depthFunc",{get:function(){return this._depthFunc},set:function(P){this._depthFunc!==P&&(this._depthFunc=P,this._isDepthFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"depthMask",{get:function(){return this._depthMask},set:function(P){this._depthMask!==P&&(this._depthMask=P,this._isDepthMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"depthTest",{get:function(){return this._depthTest},set:function(P){this._depthTest!==P&&(this._depthTest=P,this._isDepthTestDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"frontFace",{get:function(){return this._frontFace},set:function(P){this._frontFace!==P&&(this._frontFace=P,this._isFrontFaceDirty=!0)},enumerable:!1,configurable:!0}),_.prototype.reset=function(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1},_.prototype.apply=function(P){this.isDirty&&(this._isCullDirty&&(this.cull?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(P.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(P.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(P.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset?(P.enable(P.POLYGON_OFFSET_FILL),P.polygonOffset(this.zOffset,0)):P.disable(P.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(P.frontFace(this.frontFace),this._isFrontFaceDirty=!1))},_}()},function(Ae,v,f){f.d(v,"a",function(){return _});var B=f(2),_=function(){function P(){this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.reset()}return Object.defineProperty(P.prototype,"isDirty",{get:function(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stencilFunc",{get:function(){return this._stencilFunc},set:function(l){this._stencilFunc!==l&&(this._stencilFunc=l,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stencilFuncRef",{get:function(){return this._stencilFuncRef},set:function(l){this._stencilFuncRef!==l&&(this._stencilFuncRef=l,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stencilFuncMask",{get:function(){return this._stencilFuncMask},set:function(l){this._stencilFuncMask!==l&&(this._stencilFuncMask=l,this._isStencilFuncDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stencilOpStencilFail",{get:function(){return this._stencilOpStencilFail},set:function(l){this._stencilOpStencilFail!==l&&(this._stencilOpStencilFail=l,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stencilOpDepthFail",{get:function(){return this._stencilOpDepthFail},set:function(l){this._stencilOpDepthFail!==l&&(this._stencilOpDepthFail=l,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stencilOpStencilDepthPass",{get:function(){return this._stencilOpStencilDepthPass},set:function(l){this._stencilOpStencilDepthPass!==l&&(this._stencilOpStencilDepthPass=l,this._isStencilOpDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stencilMask",{get:function(){return this._stencilMask},set:function(l){this._stencilMask!==l&&(this._stencilMask=l,this._isStencilMaskDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(P.prototype,"stencilTest",{get:function(){return this._stencilTest},set:function(l){this._stencilTest!==l&&(this._stencilTest=l,this._isStencilTestDirty=!0)},enumerable:!1,configurable:!0}),P.prototype.reset=function(){this._stencilTest=!1,this._stencilMask=255,this._stencilFunc=P.ALWAYS,this._stencilFuncRef=1,this._stencilFuncMask=255,this._stencilOpStencilFail=P.KEEP,this._stencilOpDepthFail=P.KEEP,this._stencilOpStencilDepthPass=P.REPLACE,this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0},P.prototype.apply=function(l){this.isDirty&&(this._isStencilTestDirty&&(this.stencilTest?l.enable(l.STENCIL_TEST):l.disable(l.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(l.stencilMask(this.stencilMask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(l.stencilFunc(this.stencilFunc,this.stencilFuncRef,this.stencilFuncMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(l.stencilOp(this.stencilOpStencilFail,this.stencilOpDepthFail,this.stencilOpStencilDepthPass),this._isStencilOpDirty=!1))},P.ALWAYS=B.a.ALWAYS,P.KEEP=B.a.KEEP,P.REPLACE=B.a.REPLACE,P}()},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1,this._alphaBlend=!1,this._blendFunctionParameters=new Array(4),this._blendEquationParameters=new Array(2),this._blendConstants=new Array(4),this.reset()}return Object.defineProperty(_.prototype,"isDirty",{get:function(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"alphaBlend",{get:function(){return this._alphaBlend},set:function(P){this._alphaBlend!==P&&(this._alphaBlend=P,this._isAlphaBlendDirty=!0)},enumerable:!1,configurable:!0}),_.prototype.setAlphaBlendConstants=function(P,l,O,R){this._blendConstants[0]===P&&this._blendConstants[1]===l&&this._blendConstants[2]===O&&this._blendConstants[3]===R||(this._blendConstants[0]=P,this._blendConstants[1]=l,this._blendConstants[2]=O,this._blendConstants[3]=R,this._isBlendConstantsDirty=!0)},_.prototype.setAlphaBlendFunctionParameters=function(P,l,O,R){this._blendFunctionParameters[0]===P&&this._blendFunctionParameters[1]===l&&this._blendFunctionParameters[2]===O&&this._blendFunctionParameters[3]===R||(this._blendFunctionParameters[0]=P,this._blendFunctionParameters[1]=l,this._blendFunctionParameters[2]=O,this._blendFunctionParameters[3]=R,this._isBlendFunctionParametersDirty=!0)},_.prototype.setAlphaEquationParameters=function(P,l){this._blendEquationParameters[0]===P&&this._blendEquationParameters[1]===l||(this._blendEquationParameters[0]=P,this._blendEquationParameters[1]=l,this._isBlendEquationParametersDirty=!0)},_.prototype.reset=function(){this._alphaBlend=!1,this._blendFunctionParameters[0]=null,this._blendFunctionParameters[1]=null,this._blendFunctionParameters[2]=null,this._blendFunctionParameters[3]=null,this._blendEquationParameters[0]=null,this._blendEquationParameters[1]=null,this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1},_.prototype.apply=function(P){this.isDirty&&(this._isAlphaBlendDirty&&(this._alphaBlend?P.enable(P.BLEND):P.disable(P.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(P.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(P.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1),this._isBlendConstantsDirty&&(P.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1))},_}()},function(Ae,v,f){f.d(v,"a",function(){return B});var B=function(){function _(){this.vertexCompilationError=null,this.fragmentCompilationError=null,this.programLinkError=null,this.programValidationError=null}return Object.defineProperty(_.prototype,"isAsync",{get:function(){return this.isParallelCompiled},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"isReady",{get:function(){return!!this.program&&(!this.isParallelCompiled||this.engine._isRenderingStateCompiled(this))},enumerable:!1,configurable:!0}),_.prototype._handlesSpectorRebuildCallback=function(P){P&&this.program&&P(this.program)},_.prototype._getVertexShaderCode=function(){return this.vertexShader?this.engine._getShaderSource(this.vertexShader):null},_.prototype._getFragmentShaderCode=function(){return this.fragmentShader?this.engine._getShaderSource(this.fragmentShader):null},_}()},function(Ae,v,f){var B;f.d(v,"a",function(){return l}),function(O){O[O.Pending=0]="Pending",O[O.Fulfilled=1]="Fulfilled",O[O.Rejected=2]="Rejected"}(B||(B={}));var _=function(){this.count=0,this.target=0,this.results=[]},P=function(){function O(R){var x=this;if(this._state=B.Pending,this._children=new Array,this._rejectWasConsumed=!1,R)try{R(function(m){x._resolve(m)},function(m){x._reject(m)})}catch(m){this._reject(m)}}return Object.defineProperty(O.prototype,"_result",{get:function(){return this._resultValue},set:function(R){this._resultValue=R,this._parent&&this._parent._result===void 0&&(this._parent._result=R)},enumerable:!1,configurable:!0}),O.prototype.catch=function(R){return this.then(void 0,R)},O.prototype.then=function(R,x){var m=this,c=new O;return c._onFulfilled=R,c._onRejected=x,this._children.push(c),c._parent=this,this._state!==B.Pending&&setTimeout(function(){if(m._state===B.Fulfilled||m._rejectWasConsumed){var T=c._resolve(m._result);if(T!=null)if(T._state!==void 0){var A=T;c._children.push(A),A._parent=c,c=A}else c._result=T}else c._reject(m._reason)}),c},O.prototype._moveChildren=function(R){var x,m=this;if((x=this._children).push.apply(x,R.splice(0,R.length)),this._children.forEach(function(g){g._parent=m}),this._state===B.Fulfilled)for(var c=0,T=this._children;c"u")&&(window.Promise=P)},O}()},function(Ae,v,f){f.d(v,"a",function(){return _}),f.d(v,"b",function(){return P});var B=f(57),_=function(){function l(O){O===void 0&&(O=30),this._enabled=!0,this._rollingFrameTime=new P(O)}return l.prototype.sampleFrame=function(O){if(O===void 0&&(O=B.a.Now),this._enabled){if(this._lastFrameTimeMs!=null){var R=O-this._lastFrameTimeMs;this._rollingFrameTime.add(R)}this._lastFrameTimeMs=O}},Object.defineProperty(l.prototype,"averageFrameTime",{get:function(){return this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"averageFrameTimeVariance",{get:function(){return this._rollingFrameTime.variance},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"instantaneousFrameTime",{get:function(){return this._rollingFrameTime.history(0)},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"averageFPS",{get:function(){return 1e3/this._rollingFrameTime.average},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"instantaneousFPS",{get:function(){var O=this._rollingFrameTime.history(0);return O===0?0:1e3/O},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"isSaturated",{get:function(){return this._rollingFrameTime.isSaturated()},enumerable:!1,configurable:!0}),l.prototype.enable=function(){this._enabled=!0},l.prototype.disable=function(){this._enabled=!1,this._lastFrameTimeMs=null},Object.defineProperty(l.prototype,"isEnabled",{get:function(){return this._enabled},enumerable:!1,configurable:!0}),l.prototype.reset=function(){this._lastFrameTimeMs=null,this._rollingFrameTime.reset()},l}(),P=function(){function l(O){this._samples=new Array(O),this.reset()}return l.prototype.add=function(O){var R;if(this.isSaturated()){var x=this._samples[this._pos];R=x-this.average,this.average-=R/(this._sampleCount-1),this._m2-=R*(x-this.average)}else this._sampleCount++;R=O-this.average,this.average+=R/this._sampleCount,this._m2+=R*(O-this.average),this.variance=this._m2/(this._sampleCount-1),this._samples[this._pos]=O,this._pos++,this._pos%=this._samples.length},l.prototype.history=function(O){if(O>=this._sampleCount||O>=this._samples.length)return 0;var R=this._wrapPosition(this._pos-1);return this._samples[this._wrapPosition(R-O)]},l.prototype.isSaturated=function(){return this._sampleCount>=this._samples.length},l.prototype.reset=function(){this.average=0,this.variance=0,this._sampleCount=0,this._pos=0,this._m2=0},l.prototype._wrapPosition=function(O){var R=this._samples.length;return(O%R+R)%R},l}()},function(Ae,v,f){f.d(v,"a",function(){return _});var B=f(0),_=function(){this._checkCollisions=!1,this._collisionMask=-1,this._collisionGroup=-1,this._surroundingMeshes=null,this._collider=null,this._oldPositionForCollisions=new B.e(0,0,0),this._diffPositionForCollisions=new B.e(0,0,0),this._collisionResponse=!0}},function(Ae,v,f){f.d(v,"a",function(){return l});var B=f(33),_=f(0),P=f(2),l=function(){function O(R,x,m,c,T){m===void 0&&(m=null),c===void 0&&(c=null),T===void 0&&(T=null),this.index=R,this._opaqueSubMeshes=new B.a(256),this._transparentSubMeshes=new B.a(256),this._alphaTestSubMeshes=new B.a(256),this._depthOnlySubMeshes=new B.a(256),this._particleSystems=new B.a(256),this._spriteManagers=new B.a(256),this._edgesRenderers=new B.b(16),this._scene=x,this.opaqueSortCompareFn=m,this.alphaTestSortCompareFn=c,this.transparentSortCompareFn=T}return Object.defineProperty(O.prototype,"opaqueSortCompareFn",{set:function(R){this._opaqueSortCompareFn=R,this._renderOpaque=R?this.renderOpaqueSorted:O.renderUnsorted},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"alphaTestSortCompareFn",{set:function(R){this._alphaTestSortCompareFn=R,this._renderAlphaTest=R?this.renderAlphaTestSorted:O.renderUnsorted},enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype,"transparentSortCompareFn",{set:function(R){this._transparentSortCompareFn=R||O.defaultTransparentSortCompare,this._renderTransparent=this.renderTransparentSorted},enumerable:!1,configurable:!0}),O.prototype.render=function(R,x,m,c){if(R)R(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);else{var T=this._scene.getEngine();this._depthOnlySubMeshes.length!==0&&(T.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),T.setColorWrite(!0)),this._opaqueSubMeshes.length!==0&&this._renderOpaque(this._opaqueSubMeshes),this._alphaTestSubMeshes.length!==0&&this._renderAlphaTest(this._alphaTestSubMeshes);var A=T.getStencilBuffer();if(T.setStencilBuffer(!1),x&&this._renderSprites(),m&&this._renderParticles(c),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),this._transparentSubMeshes.length!==0&&(T.setStencilBuffer(A),this._renderTransparent(this._transparentSubMeshes),T.setAlphaMode(P.a.ALPHA_DISABLE)),T.setStencilBuffer(!1),this._edgesRenderers.length){for(var S=0;Sx._alphaIndex?1:R._alphaIndexx._distanceToCamera?-1:0},O.frontToBackSortCompare=function(R,x){return R._distanceToCamerax._distanceToCamera?1:0},O.prototype.prepare=function(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this._spriteManagers.reset(),this._edgesRenderers.reset()},O.prototype.dispose=function(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()},O.prototype.dispatch=function(R,x,m){x===void 0&&(x=R.getMesh()),m===void 0&&(m=R.getMaterial()),m!=null&&(m.needAlphaBlendingForMesh(x)?this._transparentSubMeshes.push(R):m.needAlphaTesting()?(m.needDepthPrePass&&this._depthOnlySubMeshes.push(R),this._alphaTestSubMeshes.push(R)):(m.needDepthPrePass&&this._depthOnlySubMeshes.push(R),this._opaqueSubMeshes.push(R)),x._renderingGroup=this,x._edgesRenderer&&x._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(x._edgesRenderer))},O.prototype.dispatchSprites=function(R){this._spriteManagers.push(R)},O.prototype.dispatchParticles=function(R){this._particleSystems.push(R)},O.prototype._renderParticles=function(R){if(this._particleSystems.length!==0){var x=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(var m=0;m=0;){var g=x[A];g<0?g=0:g>1&&(g=1),S[A]=255*g}x=S}var u=document.createElement("canvas");u.width=c,u.height=T;var h=u.getContext("2d");if(!h)return null;var b=h.createImageData(c,T);if(b.data.set(x),h.putImageData(b,0,0),R.invertY){var E=document.createElement("canvas");E.width=c,E.height=T;var D=E.getContext("2d");return D?(D.translate(0,T),D.scale(1,-1),D.drawImage(u,0,0),E.toDataURL("image/png")):null}return u.toDataURL("image/png")},_}()},function(Ae,v,f){f.d(v,"a",function(){return A});var B=f(1),_=f(0),P=f(8),l=f(31),O=f(7),R=f(41),x=f(46),m=f(4),c=f(43),T=f(12);O.a._instancedMeshFactory=function(S,g){var u=new A(S,g);if(g.instancedBuffers)for(var h in u.instancedBuffers={},g.instancedBuffers)u.instancedBuffers[h]=g.instancedBuffers[h];return u};var A=function(S){function g(u,h){var b=S.call(this,u,h.getScene())||this;b._indexInSourceMeshInstanceArray=-1,h.addInstance(b),b._sourceMesh=h,b._unIndexed=h._unIndexed,b.position.copyFrom(h.position),b.rotation.copyFrom(h.rotation),b.scaling.copyFrom(h.scaling),h.rotationQuaternion&&(b.rotationQuaternion=h.rotationQuaternion.clone()),b.animations=T.b.Slice(h.animations);for(var E=0,D=h.getAnimationRanges();E0!=this._getWorldMatrixDeterminant()>0)return this._internalAbstractMeshDataInfo._actAsRegularMesh=!0,!0;if(this._internalAbstractMeshDataInfo._actAsRegularMesh=!1,this._currentLOD._registerInstanceForRenderId(this,u),h){if(!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!0,!0}else if(!this._currentLOD._internalAbstractMeshDataInfo._isActive)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances=!0,!0}return!1},g.prototype._postActivate=function(){this._sourceMesh.edgesShareWithInstances&&this._sourceMesh._edgesRenderer&&this._sourceMesh._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup?(this._sourceMesh._renderingGroup._edgesRenderers.pushNoDuplicate(this._sourceMesh._edgesRenderer),this._sourceMesh._edgesRenderer.customInstances.push(this.getWorldMatrix())):this._edgesRenderer&&this._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup&&this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer)},g.prototype.getWorldMatrix=function(){if(this._currentLOD&&this._currentLOD.billboardMode!==x.a.BILLBOARDMODE_NONE&&this._currentLOD._masterMesh!==this){var u=this._currentLOD._masterMesh;return this._currentLOD._masterMesh=this,_.c.Vector3[7].copyFrom(this._currentLOD.position),this._currentLOD.position.set(0,0,0),_.c.Matrix[0].copyFrom(this._currentLOD.computeWorldMatrix(!0)),this._currentLOD.position.copyFrom(_.c.Vector3[7]),this._currentLOD._masterMesh=u,_.c.Matrix[0]}return S.prototype.getWorldMatrix.call(this)},Object.defineProperty(g.prototype,"isAnInstance",{get:function(){return!0},enumerable:!1,configurable:!0}),g.prototype.getLOD=function(u){if(!u)return this;var h=this.getBoundingInfo();return this._currentLOD=this.sourceMesh.getLOD(u,h.boundingSphere),this._currentLOD===this.sourceMesh?this.sourceMesh:this._currentLOD},g.prototype._preActivateForIntermediateRendering=function(u){return this.sourceMesh._preActivateForIntermediateRendering(u)},g.prototype._syncSubMeshes=function(){if(this.releaseSubMeshes(),this._sourceMesh.subMeshes)for(var u=0;u=lightDirection.w) -{ -cosAngle=max(0.,pow(cosAngle,lightData.w)); -attenuation*=cosAngle; - -float ndl=max(0.,dot(vNormal,lightVectorW)); -#ifdef NDOTL -result.ndl=ndl; -#endif -result.diffuse=ndl*diffuseColor*attenuation; -#ifdef SPECULARTERM - -vec3 angleW=normalize(viewDirectionW+lightVectorW); -float specComp=max(0.,dot(vNormal,angleW)); -specComp=pow(specComp,max(1.,glossiness)); -result.specular=specComp*specularColor*attenuation; -#endif -return result; -} -result.diffuse=vec3(0.); -#ifdef SPECULARTERM -result.specular=vec3(0.); -#endif -#ifdef NDOTL -result.ndl=0.; -#endif -return result; -} -lightingInfo computeHemisphericLighting(vec3 viewDirectionW,vec3 vNormal,vec4 lightData,vec3 diffuseColor,vec3 specularColor,vec3 groundColor,float glossiness) { -lightingInfo result; - -float ndl=dot(vNormal,lightData.xyz)*0.5+0.5; -#ifdef NDOTL -result.ndl=ndl; -#endif -result.diffuse=mix(groundColor,diffuseColor,ndl); -#ifdef SPECULARTERM - -vec3 angleW=normalize(viewDirectionW+lightData.xyz); -float specComp=max(0.,dot(vNormal,angleW)); -specComp=pow(specComp,max(1.,glossiness)); -result.specular=specComp*specularColor; -#endif -return result; -} -#define inline -vec3 computeProjectionTextureDiffuseLighting(sampler2D projectionLightSampler,mat4 textureProjectionMatrix){ -vec4 strq=textureProjectionMatrix*vec4(vPositionW,1.0); -strq/=strq.w; -vec3 textureColor=texture2D(projectionLightSampler,strq.xy).rgb; -return textureColor; -}`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="logDepthFragment",_=`#ifdef LOGARITHMICDEPTH -gl_FragDepthEXT=log2(vFragmentDepth)*logarithmicDepthConstant*0.5; -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) -#if defined(TANGENT) && defined(NORMAL) -vec3 tbnNormal=normalize(normalUpdated); -vec3 tbnTangent=normalize(tangentUpdated.xyz); -vec3 tbnBitangent=cross(tbnNormal,tbnTangent)*tangentUpdated.w; -vTBN=mat3(finalWorld)*mat3(tbnTangent,tbnBitangent,tbnNormal); -#endif -#endif`;f(5).a.IncludesShadersStore.bumpVertex=B},function(Ae,v,f){var B=`#ifdef FOG -vFogDistance=(view*worldPos).xyz; -#endif`;f(5).a.IncludesShadersStore.fogVertex=B},function(Ae,v,f){var B="logDepthVertex",_=`#ifdef LOGARITHMICDEPTH -vFragmentDepth=1.0+gl_Position.w; -gl_Position.z=log2(max(0.000001,vFragmentDepth))*logarithmicDepthConstant; -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v){var f;f=function(){return this}();try{f=f||new Function("return this")()}catch{typeof window=="object"&&(f=window)}Ae.exports=f},function(Ae,v,f){var B="prePassDeclaration",_=`#ifdef PREPASS -#extension GL_EXT_draw_buffers : require -#ifdef WEBGL2 -layout(location=0) out highp vec4 glFragData[{X}]; -highp vec4 gl_FragColor; -#endif -#ifdef PREPASS_DEPTHNORMAL -varying highp vec3 vViewPos; -#endif -#ifdef PREPASS_VELOCITY -varying highp vec4 vCurrentPosition; -varying highp vec4 vPreviousPosition; -#endif -#endif -`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="fresnelFunction",_=`#ifdef FRESNEL -float computeFresnelTerm(vec3 viewDirection,vec3 worldNormal,float bias,float power) -{ -float fresnelTerm=pow(bias+abs(dot(viewDirection,worldNormal)),power); -return clamp(fresnelTerm,0.,1.); -} -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B=`#ifdef DEPTHPREPASS -gl_FragColor=vec4(0.,0.,0.,1.0); -return; -#endif`;f(5).a.IncludesShadersStore.depthPrePass=B},function(Ae,v,f){var B="prePassVertexDeclaration",_=`#ifdef PREPASS -#ifdef PREPASS_DEPTHNORMAL -varying vec3 vViewPos; -#endif -#ifdef PREPASS_VELOCITY -uniform mat4 previousWorld; -uniform mat4 previousViewProjection; -varying vec4 vCurrentPosition; -varying vec4 vPreviousPosition; -#endif -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="bumpVertexDeclaration",_=`#if defined(BUMP) || defined(PARALLAX) || defined(CLEARCOAT_BUMP) || defined(ANISOTROPIC) -#if defined(TANGENT) && defined(NORMAL) -varying mat3 vTBN; -#endif -#endif -`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B="prePassVertex",_=`#ifdef PREPASS_DEPTHNORMAL -vViewPos=(view*worldPos).rgb; -#endif -#if defined(PREPASS_VELOCITY) && defined(BONES_VELOCITY_ENABLED) -vCurrentPosition=viewProjection*worldPos; -#if NUM_BONE_INFLUENCERS>0 -mat4 previousInfluence; -previousInfluence=mPreviousBones[int(matricesIndices[0])]*matricesWeights[0]; -#if NUM_BONE_INFLUENCERS>1 -previousInfluence+=mPreviousBones[int(matricesIndices[1])]*matricesWeights[1]; -#endif -#if NUM_BONE_INFLUENCERS>2 -previousInfluence+=mPreviousBones[int(matricesIndices[2])]*matricesWeights[2]; -#endif -#if NUM_BONE_INFLUENCERS>3 -previousInfluence+=mPreviousBones[int(matricesIndices[3])]*matricesWeights[3]; -#endif -#if NUM_BONE_INFLUENCERS>4 -previousInfluence+=mPreviousBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; -#endif -#if NUM_BONE_INFLUENCERS>5 -previousInfluence+=mPreviousBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; -#endif -#if NUM_BONE_INFLUENCERS>6 -previousInfluence+=mPreviousBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; -#endif -#if NUM_BONE_INFLUENCERS>7 -previousInfluence+=mPreviousBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; -#endif -vPreviousPosition=previousViewProjection*previousWorld*previousInfluence*vec4(positionUpdated,1.0); -#else -vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); -#endif -#endif`;f(5).a.IncludesShadersStore[B]=_},function(Ae,v,f){var B=f(5),_=(f(115),f(110),"colorPixelShader"),P=`#ifdef VERTEXCOLOR -varying vec4 vColor; -#else -uniform vec4 color; -#endif -#include -void main(void) { -#include -#ifdef VERTEXCOLOR -gl_FragColor=vColor; -#else -gl_FragColor=color; -#endif -}`;B.a.ShadersStore[_]=P},function(Ae,v,f){var B=f(5),_=(f(78),f(117),f(79),f(80),f(81),f(111),"colorVertexShader"),P=` -attribute vec3 position; -#ifdef VERTEXCOLOR -attribute vec4 color; -#endif -#include -#include - -#include -uniform mat4 viewProjection; -#ifdef MULTIVIEW -uniform mat4 viewProjectionR; -#endif - -#ifdef VERTEXCOLOR -varying vec4 vColor; -#endif -void main(void) { -#include -#include -vec4 worldPos=finalWorld*vec4(position,1.0); -#ifdef MULTIVIEW -if (gl_ViewID_OVR == 0u) { -gl_Position=viewProjection*worldPos; -} else { -gl_Position=viewProjectionR*worldPos; -} -#else -gl_Position=viewProjection*worldPos; -#endif -#include -#ifdef VERTEXCOLOR - -vColor=color; -#endif -}`;B.a.ShadersStore[_]=P},function(Ae,v,f){(function(B){f.d(v,"b",function(){return T}),f.d(v,"a",function(){return A});var _=f(1),P=f(8),l=f(13),O=f(102),R=f(27),x=f(2),m=f(89),c=f(74),T=function(){this.renderWidth=512,this.renderHeight=256,this.textureSize=512,this.deterministicLockstep=!1,this.lockstepMaxSteps=4},A=function(S){function g(u){u===void 0&&(u=new T);var h=S.call(this,null)||this;l.a.Instances.push(h),u.deterministicLockstep===void 0&&(u.deterministicLockstep=!1),u.lockstepMaxSteps===void 0&&(u.lockstepMaxSteps=4),h._options=u,c.a.SetMatrixPrecision(!!u.useHighPrecisionMatrix),h._caps={maxTexturesImageUnits:16,maxVertexTextureImageUnits:16,maxCombinedTexturesImageUnits:32,maxTextureSize:512,maxCubemapTextureSize:512,maxRenderTextureSize:512,maxVertexAttribs:16,maxVaryingVectors:16,maxFragmentUniformVectors:16,maxVertexUniformVectors:16,standardDerivatives:!1,astc:null,pvrtc:null,etc1:null,etc2:null,bptc:null,maxAnisotropy:0,uintIndices:!1,fragmentDepthSupported:!1,highPrecisionShaderSupported:!0,colorBufferFloat:!1,textureFloat:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloat:!1,textureHalfFloatLinearFiltering:!1,textureHalfFloatRender:!1,textureLOD:!1,drawBuffersExtension:!1,depthTextureExtension:!1,vertexArrayObject:!1,instancedArrays:!1,canUseTimestampForTimerQuery:!1,maxMSAASamples:1,blendMinMax:!1},P.a.Log("Babylon.js v"+l.a.Version+" - Null engine");var b=typeof self<"u"?self:B!==void 0?B:window;return typeof URL>"u"&&(b.URL={createObjectURL:function(){},revokeObjectURL:function(){}}),typeof Blob>"u"&&(b.Blob=function(){}),h}return Object(_.d)(g,S),g.prototype.isDeterministicLockStep=function(){return this._options.deterministicLockstep},g.prototype.getLockstepMaxSteps=function(){return this._options.lockstepMaxSteps},g.prototype.getHardwareScalingLevel=function(){return 1},g.prototype.createVertexBuffer=function(u){var h=new m.a;return h.references=1,h},g.prototype.createIndexBuffer=function(u){var h=new m.a;return h.references=1,h},g.prototype.clear=function(u,h,b,E){},g.prototype.getRenderWidth=function(u){return u===void 0&&(u=!1),!u&&this._currentRenderTarget?this._currentRenderTarget.width:this._options.renderWidth},g.prototype.getRenderHeight=function(u){return u===void 0&&(u=!1),!u&&this._currentRenderTarget?this._currentRenderTarget.height:this._options.renderHeight},g.prototype.setViewport=function(u,h,b){this._cachedViewport=u},g.prototype.createShaderProgram=function(u,h,b,E,D){return{__SPECTOR_rebuildProgram:null}},g.prototype.getUniforms=function(u,h){return[]},g.prototype.getAttributes=function(u,h){return[]},g.prototype.bindSamplers=function(u){this._currentEffect=null},g.prototype.enableEffect=function(u){this._currentEffect=u,u.onBind&&u.onBind(u),u._onBindObservable&&u._onBindObservable.notifyObservers(u)},g.prototype.setState=function(u,h,b,E){},g.prototype.setIntArray=function(u,h){return!0},g.prototype.setIntArray2=function(u,h){return!0},g.prototype.setIntArray3=function(u,h){return!0},g.prototype.setIntArray4=function(u,h){return!0},g.prototype.setFloatArray=function(u,h){return!0},g.prototype.setFloatArray2=function(u,h){return!0},g.prototype.setFloatArray3=function(u,h){return!0},g.prototype.setFloatArray4=function(u,h){return!0},g.prototype.setArray=function(u,h){return!0},g.prototype.setArray2=function(u,h){return!0},g.prototype.setArray3=function(u,h){return!0},g.prototype.setArray4=function(u,h){return!0},g.prototype.setMatrices=function(u,h){return!0},g.prototype.setMatrix3x3=function(u,h){return!0},g.prototype.setMatrix2x2=function(u,h){return!0},g.prototype.setFloat=function(u,h){return!0},g.prototype.setFloat2=function(u,h,b){return!0},g.prototype.setFloat3=function(u,h,b,E){return!0},g.prototype.setBool=function(u,h){return!0},g.prototype.setFloat4=function(u,h,b,E,D){return!0},g.prototype.setAlphaMode=function(u,h){h===void 0&&(h=!1),this._alphaMode!==u&&(this.alphaState.alphaBlend=u!==x.a.ALPHA_DISABLE,h||this.setDepthWrite(u===x.a.ALPHA_DISABLE),this._alphaMode=u)},g.prototype.bindBuffers=function(u,h,b){},g.prototype.wipeCaches=function(u){this.preventCacheWipeBetweenFrames||(this.resetTextureCache(),this._currentEffect=null,u&&(this._currentProgram=null,this.stencilState.reset(),this.depthCullingState.reset(),this.alphaState.reset()),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null)},g.prototype.draw=function(u,h,b,E){},g.prototype.drawElementsType=function(u,h,b,E){},g.prototype.drawArraysType=function(u,h,b,E){},g.prototype._createTexture=function(){return{}},g.prototype._releaseTexture=function(u){},g.prototype.createTexture=function(u,h,b,E,D,w,N,I,V,X,j,ne){D===void 0&&(D=x.a.TEXTURE_TRILINEAR_SAMPLINGMODE),w===void 0&&(w=null),X===void 0&&(X=null);var te=new R.a(this,R.b.Url),de=String(u);return te.url=de,te.generateMipMaps=!h,te.samplingMode=D,te.invertY=b,te.baseWidth=this._options.textureSize,te.baseHeight=this._options.textureSize,te.width=this._options.textureSize,te.height=this._options.textureSize,X&&(te.format=X),te.isReady=!0,w&&w(),this._internalTexturesCache.push(te),te},g.prototype.createRenderTargetTexture=function(u,h){var b=new O.a;h!==void 0&&typeof h=="object"?(b.generateMipMaps=h.generateMipMaps,b.generateDepthBuffer=h.generateDepthBuffer===void 0||h.generateDepthBuffer,b.generateStencilBuffer=b.generateDepthBuffer&&h.generateStencilBuffer,b.type=h.type===void 0?x.a.TEXTURETYPE_UNSIGNED_INT:h.type,b.samplingMode=h.samplingMode===void 0?x.a.TEXTURE_TRILINEAR_SAMPLINGMODE:h.samplingMode):(b.generateMipMaps=h,b.generateDepthBuffer=!0,b.generateStencilBuffer=!1,b.type=x.a.TEXTURETYPE_UNSIGNED_INT,b.samplingMode=x.a.TEXTURE_TRILINEAR_SAMPLINGMODE);var E=new R.a(this,R.b.RenderTarget),D=u.width||u,w=u.height||u;return E._depthStencilBuffer={},E._framebuffer={},E.baseWidth=D,E.baseHeight=w,E.width=D,E.height=w,E.isReady=!0,E.samples=1,E.generateMipMaps=!!b.generateMipMaps,E.samplingMode=b.samplingMode,E.type=b.type,E._generateDepthBuffer=b.generateDepthBuffer,E._generateStencilBuffer=!!b.generateStencilBuffer,this._internalTexturesCache.push(E),E},g.prototype.updateTextureSamplingMode=function(u,h){h.samplingMode=u},g.prototype.bindFramebuffer=function(u,h,b,E,D){this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=u,this._currentFramebuffer=u._MSAAFramebuffer?u._MSAAFramebuffer:u._framebuffer,this._cachedViewport&&!D&&this.setViewport(this._cachedViewport,b,E)},g.prototype.unBindFramebuffer=function(u,h,b){this._currentRenderTarget=null,b&&(u._MSAAFramebuffer&&(this._currentFramebuffer=u._framebuffer),b()),this._currentFramebuffer=null},g.prototype.createDynamicVertexBuffer=function(u){var h=new m.a;return h.references=1,h.capacity=1,h},g.prototype.updateDynamicTexture=function(u,h,b,E,D){},g.prototype.areAllEffectsReady=function(){return!0},g.prototype.getError=function(){return 0},g.prototype._getUnpackAlignement=function(){return 1},g.prototype._unpackFlipY=function(u){},g.prototype.updateDynamicIndexBuffer=function(u,h,b){},g.prototype.updateDynamicVertexBuffer=function(u,h,b,E){},g.prototype._bindTextureDirectly=function(u,h){return this._boundTexturesCache[this._activeChannel]!==h&&(this._boundTexturesCache[this._activeChannel]=h,!0)},g.prototype._bindTexture=function(u,h){u<0||this._bindTextureDirectly(0,h)},g.prototype._deleteBuffer=function(u){},g.prototype.releaseEffects=function(){},g.prototype.displayLoadingUI=function(){},g.prototype.hideLoadingUI=function(){},g.prototype._uploadCompressedDataToTextureDirectly=function(u,h,b,E,D,w,N){},g.prototype._uploadDataToTextureDirectly=function(u,h,b,E){},g.prototype._uploadArrayBufferViewToTexture=function(u,h,b,E){},g.prototype._uploadImageToTexture=function(u,h,b,E){},g}(l.a)}).call(this,f(159))},function(Ae,v,f){f.r(v),function(B){f.d(v,"Debug",function(){return m});var _=f(127),P=f(99);f.d(v,"AbstractScene",function(){return _.AbstractScene}),f.d(v,"AbstractActionManager",function(){return _.AbstractActionManager}),f.d(v,"Action",function(){return _.Action}),f.d(v,"ActionEvent",function(){return _.ActionEvent}),f.d(v,"ActionManager",function(){return _.ActionManager}),f.d(v,"Condition",function(){return _.Condition}),f.d(v,"ValueCondition",function(){return _.ValueCondition}),f.d(v,"PredicateCondition",function(){return _.PredicateCondition}),f.d(v,"StateCondition",function(){return _.StateCondition}),f.d(v,"SwitchBooleanAction",function(){return _.SwitchBooleanAction}),f.d(v,"SetStateAction",function(){return _.SetStateAction}),f.d(v,"SetValueAction",function(){return _.SetValueAction}),f.d(v,"IncrementValueAction",function(){return _.IncrementValueAction}),f.d(v,"PlayAnimationAction",function(){return _.PlayAnimationAction}),f.d(v,"StopAnimationAction",function(){return _.StopAnimationAction}),f.d(v,"DoNothingAction",function(){return _.DoNothingAction}),f.d(v,"CombineAction",function(){return _.CombineAction}),f.d(v,"ExecuteCodeAction",function(){return _.ExecuteCodeAction}),f.d(v,"SetParentAction",function(){return _.SetParentAction}),f.d(v,"PlaySoundAction",function(){return _.PlaySoundAction}),f.d(v,"StopSoundAction",function(){return _.StopSoundAction}),f.d(v,"InterpolateValueAction",function(){return _.InterpolateValueAction}),f.d(v,"Animatable",function(){return _.Animatable}),f.d(v,"_IAnimationState",function(){return _._IAnimationState}),f.d(v,"Animation",function(){return _.Animation}),f.d(v,"TargetedAnimation",function(){return _.TargetedAnimation}),f.d(v,"AnimationGroup",function(){return _.AnimationGroup}),f.d(v,"AnimationPropertiesOverride",function(){return _.AnimationPropertiesOverride}),f.d(v,"EasingFunction",function(){return _.EasingFunction}),f.d(v,"CircleEase",function(){return _.CircleEase}),f.d(v,"BackEase",function(){return _.BackEase}),f.d(v,"BounceEase",function(){return _.BounceEase}),f.d(v,"CubicEase",function(){return _.CubicEase}),f.d(v,"ElasticEase",function(){return _.ElasticEase}),f.d(v,"ExponentialEase",function(){return _.ExponentialEase}),f.d(v,"PowerEase",function(){return _.PowerEase}),f.d(v,"QuadraticEase",function(){return _.QuadraticEase}),f.d(v,"QuarticEase",function(){return _.QuarticEase}),f.d(v,"QuinticEase",function(){return _.QuinticEase}),f.d(v,"SineEase",function(){return _.SineEase}),f.d(v,"BezierCurveEase",function(){return _.BezierCurveEase}),f.d(v,"RuntimeAnimation",function(){return _.RuntimeAnimation}),f.d(v,"AnimationEvent",function(){return _.AnimationEvent}),f.d(v,"AnimationKeyInterpolation",function(){return _.AnimationKeyInterpolation}),f.d(v,"AnimationRange",function(){return _.AnimationRange}),f.d(v,"KeepAssets",function(){return _.KeepAssets}),f.d(v,"InstantiatedEntries",function(){return _.InstantiatedEntries}),f.d(v,"AssetContainer",function(){return _.AssetContainer}),f.d(v,"Analyser",function(){return _.Analyser}),f.d(v,"AudioEngine",function(){return _.AudioEngine}),f.d(v,"AudioSceneComponent",function(){return _.AudioSceneComponent}),f.d(v,"Sound",function(){return _.Sound}),f.d(v,"SoundTrack",function(){return _.SoundTrack}),f.d(v,"WeightedSound",function(){return _.WeightedSound}),f.d(v,"AutoRotationBehavior",function(){return _.AutoRotationBehavior}),f.d(v,"BouncingBehavior",function(){return _.BouncingBehavior}),f.d(v,"FramingBehavior",function(){return _.FramingBehavior}),f.d(v,"AttachToBoxBehavior",function(){return _.AttachToBoxBehavior}),f.d(v,"FadeInOutBehavior",function(){return _.FadeInOutBehavior}),f.d(v,"MultiPointerScaleBehavior",function(){return _.MultiPointerScaleBehavior}),f.d(v,"PointerDragBehavior",function(){return _.PointerDragBehavior}),f.d(v,"SixDofDragBehavior",function(){return _.SixDofDragBehavior}),f.d(v,"Bone",function(){return _.Bone}),f.d(v,"BoneIKController",function(){return _.BoneIKController}),f.d(v,"BoneLookController",function(){return _.BoneLookController}),f.d(v,"Skeleton",function(){return _.Skeleton}),f.d(v,"ArcRotateCameraGamepadInput",function(){return _.ArcRotateCameraGamepadInput}),f.d(v,"ArcRotateCameraKeyboardMoveInput",function(){return _.ArcRotateCameraKeyboardMoveInput}),f.d(v,"ArcRotateCameraMouseWheelInput",function(){return _.ArcRotateCameraMouseWheelInput}),f.d(v,"ArcRotateCameraPointersInput",function(){return _.ArcRotateCameraPointersInput}),f.d(v,"ArcRotateCameraVRDeviceOrientationInput",function(){return _.ArcRotateCameraVRDeviceOrientationInput}),f.d(v,"FlyCameraKeyboardInput",function(){return _.FlyCameraKeyboardInput}),f.d(v,"FlyCameraMouseInput",function(){return _.FlyCameraMouseInput}),f.d(v,"FollowCameraKeyboardMoveInput",function(){return _.FollowCameraKeyboardMoveInput}),f.d(v,"FollowCameraMouseWheelInput",function(){return _.FollowCameraMouseWheelInput}),f.d(v,"FollowCameraPointersInput",function(){return _.FollowCameraPointersInput}),f.d(v,"FreeCameraDeviceOrientationInput",function(){return _.FreeCameraDeviceOrientationInput}),f.d(v,"FreeCameraGamepadInput",function(){return _.FreeCameraGamepadInput}),f.d(v,"FreeCameraKeyboardMoveInput",function(){return _.FreeCameraKeyboardMoveInput}),f.d(v,"FreeCameraMouseInput",function(){return _.FreeCameraMouseInput}),f.d(v,"FreeCameraMouseWheelInput",function(){return _.FreeCameraMouseWheelInput}),f.d(v,"FreeCameraTouchInput",function(){return _.FreeCameraTouchInput}),f.d(v,"FreeCameraVirtualJoystickInput",function(){return _.FreeCameraVirtualJoystickInput}),f.d(v,"CameraInputTypes",function(){return _.CameraInputTypes}),f.d(v,"CameraInputsManager",function(){return _.CameraInputsManager}),f.d(v,"Camera",function(){return _.Camera}),f.d(v,"TargetCamera",function(){return _.TargetCamera}),f.d(v,"FreeCamera",function(){return _.FreeCamera}),f.d(v,"FreeCameraInputsManager",function(){return _.FreeCameraInputsManager}),f.d(v,"TouchCamera",function(){return _.TouchCamera}),f.d(v,"ArcRotateCamera",function(){return _.ArcRotateCamera}),f.d(v,"ArcRotateCameraInputsManager",function(){return _.ArcRotateCameraInputsManager}),f.d(v,"DeviceOrientationCamera",function(){return _.DeviceOrientationCamera}),f.d(v,"FlyCamera",function(){return _.FlyCamera}),f.d(v,"FlyCameraInputsManager",function(){return _.FlyCameraInputsManager}),f.d(v,"FollowCamera",function(){return _.FollowCamera}),f.d(v,"ArcFollowCamera",function(){return _.ArcFollowCamera}),f.d(v,"FollowCameraInputsManager",function(){return _.FollowCameraInputsManager}),f.d(v,"GamepadCamera",function(){return _.GamepadCamera}),f.d(v,"AnaglyphArcRotateCamera",function(){return _.AnaglyphArcRotateCamera}),f.d(v,"AnaglyphFreeCamera",function(){return _.AnaglyphFreeCamera}),f.d(v,"AnaglyphGamepadCamera",function(){return _.AnaglyphGamepadCamera}),f.d(v,"AnaglyphUniversalCamera",function(){return _.AnaglyphUniversalCamera}),f.d(v,"StereoscopicArcRotateCamera",function(){return _.StereoscopicArcRotateCamera}),f.d(v,"StereoscopicFreeCamera",function(){return _.StereoscopicFreeCamera}),f.d(v,"StereoscopicGamepadCamera",function(){return _.StereoscopicGamepadCamera}),f.d(v,"StereoscopicUniversalCamera",function(){return _.StereoscopicUniversalCamera}),f.d(v,"UniversalCamera",function(){return _.UniversalCamera}),f.d(v,"VirtualJoysticksCamera",function(){return _.VirtualJoysticksCamera}),f.d(v,"VRCameraMetrics",function(){return _.VRCameraMetrics}),f.d(v,"VRDeviceOrientationArcRotateCamera",function(){return _.VRDeviceOrientationArcRotateCamera}),f.d(v,"VRDeviceOrientationFreeCamera",function(){return _.VRDeviceOrientationFreeCamera}),f.d(v,"VRDeviceOrientationGamepadCamera",function(){return _.VRDeviceOrientationGamepadCamera}),f.d(v,"OnAfterEnteringVRObservableEvent",function(){return _.OnAfterEnteringVRObservableEvent}),f.d(v,"VRExperienceHelper",function(){return _.VRExperienceHelper}),f.d(v,"WebVRFreeCamera",function(){return _.WebVRFreeCamera}),f.d(v,"Collider",function(){return _.Collider}),f.d(v,"DefaultCollisionCoordinator",function(){return _.DefaultCollisionCoordinator}),f.d(v,"PickingInfo",function(){return _.PickingInfo}),f.d(v,"IntersectionInfo",function(){return _.IntersectionInfo}),f.d(v,"_MeshCollisionData",function(){return _._MeshCollisionData}),f.d(v,"BoundingBox",function(){return _.BoundingBox}),f.d(v,"BoundingInfo",function(){return _.BoundingInfo}),f.d(v,"BoundingSphere",function(){return _.BoundingSphere}),f.d(v,"Octree",function(){return _.Octree}),f.d(v,"OctreeBlock",function(){return _.OctreeBlock}),f.d(v,"OctreeSceneComponent",function(){return _.OctreeSceneComponent}),f.d(v,"Ray",function(){return _.Ray}),f.d(v,"AxesViewer",function(){return _.AxesViewer}),f.d(v,"BoneAxesViewer",function(){return _.BoneAxesViewer}),f.d(v,"DebugLayerTab",function(){return _.DebugLayerTab}),f.d(v,"DebugLayer",function(){return _.DebugLayer}),f.d(v,"PhysicsViewer",function(){return _.PhysicsViewer}),f.d(v,"RayHelper",function(){return _.RayHelper}),f.d(v,"SkeletonViewer",function(){return _.SkeletonViewer}),f.d(v,"DeviceInputSystem",function(){return _.DeviceInputSystem}),f.d(v,"DeviceType",function(){return _.DeviceType}),f.d(v,"PointerInput",function(){return _.PointerInput}),f.d(v,"DualShockInput",function(){return _.DualShockInput}),f.d(v,"XboxInput",function(){return _.XboxInput}),f.d(v,"SwitchInput",function(){return _.SwitchInput}),f.d(v,"DeviceSource",function(){return _.DeviceSource}),f.d(v,"DeviceSourceManager",function(){return _.DeviceSourceManager}),f.d(v,"Constants",function(){return _.Constants}),f.d(v,"ThinEngine",function(){return _.ThinEngine}),f.d(v,"Engine",function(){return _.Engine}),f.d(v,"EngineStore",function(){return _.EngineStore}),f.d(v,"NullEngineOptions",function(){return _.NullEngineOptions}),f.d(v,"NullEngine",function(){return _.NullEngine}),f.d(v,"_OcclusionDataStorage",function(){return _._OcclusionDataStorage}),f.d(v,"_forceTransformFeedbackToBundle",function(){return _._forceTransformFeedbackToBundle}),f.d(v,"EngineView",function(){return _.EngineView}),f.d(v,"WebGLPipelineContext",function(){return _.WebGLPipelineContext}),f.d(v,"WebGL2ShaderProcessor",function(){return _.WebGL2ShaderProcessor}),f.d(v,"NativeEngine",function(){return _.NativeEngine}),f.d(v,"ShaderCodeInliner",function(){return _.ShaderCodeInliner}),f.d(v,"PerformanceConfigurator",function(){return _.PerformanceConfigurator}),f.d(v,"KeyboardEventTypes",function(){return _.KeyboardEventTypes}),f.d(v,"KeyboardInfo",function(){return _.KeyboardInfo}),f.d(v,"KeyboardInfoPre",function(){return _.KeyboardInfoPre}),f.d(v,"PointerEventTypes",function(){return _.PointerEventTypes}),f.d(v,"PointerInfoBase",function(){return _.PointerInfoBase}),f.d(v,"PointerInfoPre",function(){return _.PointerInfoPre}),f.d(v,"PointerInfo",function(){return _.PointerInfo}),f.d(v,"ClipboardEventTypes",function(){return _.ClipboardEventTypes}),f.d(v,"ClipboardInfo",function(){return _.ClipboardInfo}),f.d(v,"DaydreamController",function(){return _.DaydreamController}),f.d(v,"GearVRController",function(){return _.GearVRController}),f.d(v,"GenericController",function(){return _.GenericController}),f.d(v,"OculusTouchController",function(){return _.OculusTouchController}),f.d(v,"PoseEnabledControllerType",function(){return _.PoseEnabledControllerType}),f.d(v,"PoseEnabledControllerHelper",function(){return _.PoseEnabledControllerHelper}),f.d(v,"PoseEnabledController",function(){return _.PoseEnabledController}),f.d(v,"ViveController",function(){return _.ViveController}),f.d(v,"WebVRController",function(){return _.WebVRController}),f.d(v,"WindowsMotionController",function(){return _.WindowsMotionController}),f.d(v,"XRWindowsMotionController",function(){return _.XRWindowsMotionController}),f.d(v,"StickValues",function(){return _.StickValues}),f.d(v,"Gamepad",function(){return _.Gamepad}),f.d(v,"GenericPad",function(){return _.GenericPad}),f.d(v,"GamepadManager",function(){return _.GamepadManager}),f.d(v,"GamepadSystemSceneComponent",function(){return _.GamepadSystemSceneComponent}),f.d(v,"Xbox360Button",function(){return _.Xbox360Button}),f.d(v,"Xbox360Dpad",function(){return _.Xbox360Dpad}),f.d(v,"Xbox360Pad",function(){return _.Xbox360Pad}),f.d(v,"DualShockButton",function(){return _.DualShockButton}),f.d(v,"DualShockDpad",function(){return _.DualShockDpad}),f.d(v,"DualShockPad",function(){return _.DualShockPad}),f.d(v,"AxisDragGizmo",function(){return _.AxisDragGizmo}),f.d(v,"AxisScaleGizmo",function(){return _.AxisScaleGizmo}),f.d(v,"BoundingBoxGizmo",function(){return _.BoundingBoxGizmo}),f.d(v,"Gizmo",function(){return _.Gizmo}),f.d(v,"GizmoManager",function(){return _.GizmoManager}),f.d(v,"PlaneRotationGizmo",function(){return _.PlaneRotationGizmo}),f.d(v,"PositionGizmo",function(){return _.PositionGizmo}),f.d(v,"RotationGizmo",function(){return _.RotationGizmo}),f.d(v,"ScaleGizmo",function(){return _.ScaleGizmo}),f.d(v,"LightGizmo",function(){return _.LightGizmo}),f.d(v,"CameraGizmo",function(){return _.CameraGizmo}),f.d(v,"PlaneDragGizmo",function(){return _.PlaneDragGizmo}),f.d(v,"EnvironmentHelper",function(){return _.EnvironmentHelper}),f.d(v,"PhotoDome",function(){return _.PhotoDome}),f.d(v,"_forceSceneHelpersToBundle",function(){return _._forceSceneHelpersToBundle}),f.d(v,"VideoDome",function(){return _.VideoDome}),f.d(v,"EngineInstrumentation",function(){return _.EngineInstrumentation}),f.d(v,"SceneInstrumentation",function(){return _.SceneInstrumentation}),f.d(v,"_TimeToken",function(){return _._TimeToken}),f.d(v,"EffectLayer",function(){return _.EffectLayer}),f.d(v,"EffectLayerSceneComponent",function(){return _.EffectLayerSceneComponent}),f.d(v,"GlowLayer",function(){return _.GlowLayer}),f.d(v,"HighlightLayer",function(){return _.HighlightLayer}),f.d(v,"Layer",function(){return _.Layer}),f.d(v,"LayerSceneComponent",function(){return _.LayerSceneComponent}),f.d(v,"LensFlare",function(){return _.LensFlare}),f.d(v,"LensFlareSystem",function(){return _.LensFlareSystem}),f.d(v,"LensFlareSystemSceneComponent",function(){return _.LensFlareSystemSceneComponent}),f.d(v,"Light",function(){return _.Light}),f.d(v,"ShadowLight",function(){return _.ShadowLight}),f.d(v,"ShadowGenerator",function(){return _.ShadowGenerator}),f.d(v,"CascadedShadowGenerator",function(){return _.CascadedShadowGenerator}),f.d(v,"ShadowGeneratorSceneComponent",function(){return _.ShadowGeneratorSceneComponent}),f.d(v,"DirectionalLight",function(){return _.DirectionalLight}),f.d(v,"HemisphericLight",function(){return _.HemisphericLight}),f.d(v,"PointLight",function(){return _.PointLight}),f.d(v,"SpotLight",function(){return _.SpotLight}),f.d(v,"DefaultLoadingScreen",function(){return _.DefaultLoadingScreen}),f.d(v,"_BabylonLoaderRegistered",function(){return _._BabylonLoaderRegistered}),f.d(v,"BabylonFileLoaderConfiguration",function(){return _.BabylonFileLoaderConfiguration}),f.d(v,"SceneLoaderAnimationGroupLoadingMode",function(){return _.SceneLoaderAnimationGroupLoadingMode}),f.d(v,"SceneLoader",function(){return _.SceneLoader}),f.d(v,"SceneLoaderFlags",function(){return _.SceneLoaderFlags}),f.d(v,"BackgroundMaterial",function(){return _.BackgroundMaterial}),f.d(v,"ColorCurves",function(){return _.ColorCurves}),f.d(v,"EffectFallbacks",function(){return _.EffectFallbacks}),f.d(v,"Effect",function(){return _.Effect}),f.d(v,"FresnelParameters",function(){return _.FresnelParameters}),f.d(v,"ImageProcessingConfigurationDefines",function(){return _.ImageProcessingConfigurationDefines}),f.d(v,"ImageProcessingConfiguration",function(){return _.ImageProcessingConfiguration}),f.d(v,"Material",function(){return _.Material}),f.d(v,"MaterialDefines",function(){return _.MaterialDefines}),f.d(v,"ThinMaterialHelper",function(){return _.ThinMaterialHelper}),f.d(v,"MaterialHelper",function(){return _.MaterialHelper}),f.d(v,"MultiMaterial",function(){return _.MultiMaterial}),f.d(v,"PBRMaterialDefines",function(){return _.PBRMaterialDefines}),f.d(v,"PBRBaseMaterial",function(){return _.PBRBaseMaterial}),f.d(v,"PBRBaseSimpleMaterial",function(){return _.PBRBaseSimpleMaterial}),f.d(v,"PBRMaterial",function(){return _.PBRMaterial}),f.d(v,"PBRMetallicRoughnessMaterial",function(){return _.PBRMetallicRoughnessMaterial}),f.d(v,"PBRSpecularGlossinessMaterial",function(){return _.PBRSpecularGlossinessMaterial}),f.d(v,"PushMaterial",function(){return _.PushMaterial}),f.d(v,"ShaderMaterial",function(){return _.ShaderMaterial}),f.d(v,"StandardMaterialDefines",function(){return _.StandardMaterialDefines}),f.d(v,"StandardMaterial",function(){return _.StandardMaterial}),f.d(v,"BaseTexture",function(){return _.BaseTexture}),f.d(v,"ColorGradingTexture",function(){return _.ColorGradingTexture}),f.d(v,"CubeTexture",function(){return _.CubeTexture}),f.d(v,"DynamicTexture",function(){return _.DynamicTexture}),f.d(v,"EquiRectangularCubeTexture",function(){return _.EquiRectangularCubeTexture}),f.d(v,"HDRFiltering",function(){return _.HDRFiltering}),f.d(v,"HDRCubeTexture",function(){return _.HDRCubeTexture}),f.d(v,"HtmlElementTexture",function(){return _.HtmlElementTexture}),f.d(v,"InternalTextureSource",function(){return _.InternalTextureSource}),f.d(v,"InternalTexture",function(){return _.InternalTexture}),f.d(v,"_DDSTextureLoader",function(){return _._DDSTextureLoader}),f.d(v,"_ENVTextureLoader",function(){return _._ENVTextureLoader}),f.d(v,"_KTXTextureLoader",function(){return _._KTXTextureLoader}),f.d(v,"_TGATextureLoader",function(){return _._TGATextureLoader}),f.d(v,"_BasisTextureLoader",function(){return _._BasisTextureLoader}),f.d(v,"MirrorTexture",function(){return _.MirrorTexture}),f.d(v,"MultiRenderTarget",function(){return _.MultiRenderTarget}),f.d(v,"TexturePacker",function(){return _.TexturePacker}),f.d(v,"TexturePackerFrame",function(){return _.TexturePackerFrame}),f.d(v,"CustomProceduralTexture",function(){return _.CustomProceduralTexture}),f.d(v,"NoiseProceduralTexture",function(){return _.NoiseProceduralTexture}),f.d(v,"ProceduralTexture",function(){return _.ProceduralTexture}),f.d(v,"ProceduralTextureSceneComponent",function(){return _.ProceduralTextureSceneComponent}),f.d(v,"RawCubeTexture",function(){return _.RawCubeTexture}),f.d(v,"RawTexture",function(){return _.RawTexture}),f.d(v,"RawTexture2DArray",function(){return _.RawTexture2DArray}),f.d(v,"RawTexture3D",function(){return _.RawTexture3D}),f.d(v,"RefractionTexture",function(){return _.RefractionTexture}),f.d(v,"RenderTargetTexture",function(){return _.RenderTargetTexture}),f.d(v,"Texture",function(){return _.Texture}),f.d(v,"VideoTexture",function(){return _.VideoTexture}),f.d(v,"UniformBuffer",function(){return _.UniformBuffer}),f.d(v,"MaterialFlags",function(){return _.MaterialFlags}),f.d(v,"NodeMaterialBlockTargets",function(){return _.NodeMaterialBlockTargets}),f.d(v,"NodeMaterialBlockConnectionPointTypes",function(){return _.NodeMaterialBlockConnectionPointTypes}),f.d(v,"NodeMaterialBlockConnectionPointMode",function(){return _.NodeMaterialBlockConnectionPointMode}),f.d(v,"NodeMaterialSystemValues",function(){return _.NodeMaterialSystemValues}),f.d(v,"NodeMaterialModes",function(){return _.NodeMaterialModes}),f.d(v,"NodeMaterialConnectionPointCompatibilityStates",function(){return _.NodeMaterialConnectionPointCompatibilityStates}),f.d(v,"NodeMaterialConnectionPointDirection",function(){return _.NodeMaterialConnectionPointDirection}),f.d(v,"NodeMaterialConnectionPoint",function(){return _.NodeMaterialConnectionPoint}),f.d(v,"NodeMaterialBlock",function(){return _.NodeMaterialBlock}),f.d(v,"NodeMaterialDefines",function(){return _.NodeMaterialDefines}),f.d(v,"NodeMaterial",function(){return _.NodeMaterial}),f.d(v,"VertexOutputBlock",function(){return _.VertexOutputBlock}),f.d(v,"BonesBlock",function(){return _.BonesBlock}),f.d(v,"InstancesBlock",function(){return _.InstancesBlock}),f.d(v,"MorphTargetsBlock",function(){return _.MorphTargetsBlock}),f.d(v,"LightInformationBlock",function(){return _.LightInformationBlock}),f.d(v,"FragmentOutputBlock",function(){return _.FragmentOutputBlock}),f.d(v,"ImageProcessingBlock",function(){return _.ImageProcessingBlock}),f.d(v,"PerturbNormalBlock",function(){return _.PerturbNormalBlock}),f.d(v,"DiscardBlock",function(){return _.DiscardBlock}),f.d(v,"FrontFacingBlock",function(){return _.FrontFacingBlock}),f.d(v,"DerivativeBlock",function(){return _.DerivativeBlock}),f.d(v,"FragCoordBlock",function(){return _.FragCoordBlock}),f.d(v,"ScreenSizeBlock",function(){return _.ScreenSizeBlock}),f.d(v,"FogBlock",function(){return _.FogBlock}),f.d(v,"LightBlock",function(){return _.LightBlock}),f.d(v,"TextureBlock",function(){return _.TextureBlock}),f.d(v,"ReflectionTextureBlock",function(){return _.ReflectionTextureBlock}),f.d(v,"CurrentScreenBlock",function(){return _.CurrentScreenBlock}),f.d(v,"InputBlock",function(){return _.InputBlock}),f.d(v,"AnimatedInputBlockTypes",function(){return _.AnimatedInputBlockTypes}),f.d(v,"MultiplyBlock",function(){return _.MultiplyBlock}),f.d(v,"AddBlock",function(){return _.AddBlock}),f.d(v,"ScaleBlock",function(){return _.ScaleBlock}),f.d(v,"ClampBlock",function(){return _.ClampBlock}),f.d(v,"CrossBlock",function(){return _.CrossBlock}),f.d(v,"DotBlock",function(){return _.DotBlock}),f.d(v,"TransformBlock",function(){return _.TransformBlock}),f.d(v,"RemapBlock",function(){return _.RemapBlock}),f.d(v,"NormalizeBlock",function(){return _.NormalizeBlock}),f.d(v,"TrigonometryBlockOperations",function(){return _.TrigonometryBlockOperations}),f.d(v,"TrigonometryBlock",function(){return _.TrigonometryBlock}),f.d(v,"ColorMergerBlock",function(){return _.ColorMergerBlock}),f.d(v,"VectorMergerBlock",function(){return _.VectorMergerBlock}),f.d(v,"ColorSplitterBlock",function(){return _.ColorSplitterBlock}),f.d(v,"VectorSplitterBlock",function(){return _.VectorSplitterBlock}),f.d(v,"LerpBlock",function(){return _.LerpBlock}),f.d(v,"DivideBlock",function(){return _.DivideBlock}),f.d(v,"SubtractBlock",function(){return _.SubtractBlock}),f.d(v,"StepBlock",function(){return _.StepBlock}),f.d(v,"OneMinusBlock",function(){return _.OneMinusBlock}),f.d(v,"ViewDirectionBlock",function(){return _.ViewDirectionBlock}),f.d(v,"FresnelBlock",function(){return _.FresnelBlock}),f.d(v,"MaxBlock",function(){return _.MaxBlock}),f.d(v,"MinBlock",function(){return _.MinBlock}),f.d(v,"DistanceBlock",function(){return _.DistanceBlock}),f.d(v,"LengthBlock",function(){return _.LengthBlock}),f.d(v,"NegateBlock",function(){return _.NegateBlock}),f.d(v,"PowBlock",function(){return _.PowBlock}),f.d(v,"RandomNumberBlock",function(){return _.RandomNumberBlock}),f.d(v,"ArcTan2Block",function(){return _.ArcTan2Block}),f.d(v,"SmoothStepBlock",function(){return _.SmoothStepBlock}),f.d(v,"ReciprocalBlock",function(){return _.ReciprocalBlock}),f.d(v,"ReplaceColorBlock",function(){return _.ReplaceColorBlock}),f.d(v,"PosterizeBlock",function(){return _.PosterizeBlock}),f.d(v,"WaveBlockKind",function(){return _.WaveBlockKind}),f.d(v,"WaveBlock",function(){return _.WaveBlock}),f.d(v,"GradientBlockColorStep",function(){return _.GradientBlockColorStep}),f.d(v,"GradientBlock",function(){return _.GradientBlock}),f.d(v,"NLerpBlock",function(){return _.NLerpBlock}),f.d(v,"WorleyNoise3DBlock",function(){return _.WorleyNoise3DBlock}),f.d(v,"SimplexPerlin3DBlock",function(){return _.SimplexPerlin3DBlock}),f.d(v,"NormalBlendBlock",function(){return _.NormalBlendBlock}),f.d(v,"Rotate2dBlock",function(){return _.Rotate2dBlock}),f.d(v,"ReflectBlock",function(){return _.ReflectBlock}),f.d(v,"RefractBlock",function(){return _.RefractBlock}),f.d(v,"DesaturateBlock",function(){return _.DesaturateBlock}),f.d(v,"PBRMetallicRoughnessBlock",function(){return _.PBRMetallicRoughnessBlock}),f.d(v,"SheenBlock",function(){return _.SheenBlock}),f.d(v,"AnisotropyBlock",function(){return _.AnisotropyBlock}),f.d(v,"ReflectionBlock",function(){return _.ReflectionBlock}),f.d(v,"ClearCoatBlock",function(){return _.ClearCoatBlock}),f.d(v,"RefractionBlock",function(){return _.RefractionBlock}),f.d(v,"SubSurfaceBlock",function(){return _.SubSurfaceBlock}),f.d(v,"ParticleTextureBlock",function(){return _.ParticleTextureBlock}),f.d(v,"ParticleRampGradientBlock",function(){return _.ParticleRampGradientBlock}),f.d(v,"ParticleBlendMultiplyBlock",function(){return _.ParticleBlendMultiplyBlock}),f.d(v,"ModBlock",function(){return _.ModBlock}),f.d(v,"NodeMaterialOptimizer",function(){return _.NodeMaterialOptimizer}),f.d(v,"PropertyTypeForEdition",function(){return _.PropertyTypeForEdition}),f.d(v,"editableInPropertyPage",function(){return _.editableInPropertyPage}),f.d(v,"EffectRenderer",function(){return _.EffectRenderer}),f.d(v,"EffectWrapper",function(){return _.EffectWrapper}),f.d(v,"ShadowDepthWrapper",function(){return _.ShadowDepthWrapper}),f.d(v,"Scalar",function(){return _.Scalar}),f.d(v,"extractMinAndMaxIndexed",function(){return _.extractMinAndMaxIndexed}),f.d(v,"extractMinAndMax",function(){return _.extractMinAndMax}),f.d(v,"Space",function(){return _.Space}),f.d(v,"Axis",function(){return _.Axis}),f.d(v,"Coordinate",function(){return _.Coordinate}),f.d(v,"Color3",function(){return _.Color3}),f.d(v,"Color4",function(){return _.Color4}),f.d(v,"TmpColors",function(){return _.TmpColors}),f.d(v,"ToGammaSpace",function(){return _.ToGammaSpace}),f.d(v,"ToLinearSpace",function(){return _.ToLinearSpace}),f.d(v,"Epsilon",function(){return _.Epsilon}),f.d(v,"Frustum",function(){return _.Frustum}),f.d(v,"Orientation",function(){return _.Orientation}),f.d(v,"BezierCurve",function(){return _.BezierCurve}),f.d(v,"Angle",function(){return _.Angle}),f.d(v,"Arc2",function(){return _.Arc2}),f.d(v,"Path2",function(){return _.Path2}),f.d(v,"Path3D",function(){return _.Path3D}),f.d(v,"Curve3",function(){return _.Curve3}),f.d(v,"Plane",function(){return _.Plane}),f.d(v,"Size",function(){return _.Size}),f.d(v,"Vector2",function(){return _.Vector2}),f.d(v,"Vector3",function(){return _.Vector3}),f.d(v,"Vector4",function(){return _.Vector4}),f.d(v,"Quaternion",function(){return _.Quaternion}),f.d(v,"Matrix",function(){return _.Matrix}),f.d(v,"TmpVectors",function(){return _.TmpVectors}),f.d(v,"PositionNormalVertex",function(){return _.PositionNormalVertex}),f.d(v,"PositionNormalTextureVertex",function(){return _.PositionNormalTextureVertex}),f.d(v,"Viewport",function(){return _.Viewport}),f.d(v,"SphericalHarmonics",function(){return _.SphericalHarmonics}),f.d(v,"SphericalPolynomial",function(){return _.SphericalPolynomial}),f.d(v,"AbstractMesh",function(){return _.AbstractMesh}),f.d(v,"Buffer",function(){return _.Buffer}),f.d(v,"VertexBuffer",function(){return _.VertexBuffer}),f.d(v,"DracoCompression",function(){return _.DracoCompression}),f.d(v,"CSG",function(){return _.CSG}),f.d(v,"Geometry",function(){return _.Geometry}),f.d(v,"GroundMesh",function(){return _.GroundMesh}),f.d(v,"TrailMesh",function(){return _.TrailMesh}),f.d(v,"InstancedMesh",function(){return _.InstancedMesh}),f.d(v,"LinesMesh",function(){return _.LinesMesh}),f.d(v,"InstancedLinesMesh",function(){return _.InstancedLinesMesh}),f.d(v,"_CreationDataStorage",function(){return _._CreationDataStorage}),f.d(v,"_InstancesBatch",function(){return _._InstancesBatch}),f.d(v,"Mesh",function(){return _.Mesh}),f.d(v,"VertexData",function(){return _.VertexData}),f.d(v,"MeshBuilder",function(){return _.MeshBuilder}),f.d(v,"SimplificationSettings",function(){return _.SimplificationSettings}),f.d(v,"SimplificationQueue",function(){return _.SimplificationQueue}),f.d(v,"SimplificationType",function(){return _.SimplificationType}),f.d(v,"QuadraticErrorSimplification",function(){return _.QuadraticErrorSimplification}),f.d(v,"SimplicationQueueSceneComponent",function(){return _.SimplicationQueueSceneComponent}),f.d(v,"Polygon",function(){return _.Polygon}),f.d(v,"PolygonMeshBuilder",function(){return _.PolygonMeshBuilder}),f.d(v,"SubMesh",function(){return _.SubMesh}),f.d(v,"MeshLODLevel",function(){return _.MeshLODLevel}),f.d(v,"TransformNode",function(){return _.TransformNode}),f.d(v,"BoxBuilder",function(){return _.BoxBuilder}),f.d(v,"TiledBoxBuilder",function(){return _.TiledBoxBuilder}),f.d(v,"DiscBuilder",function(){return _.DiscBuilder}),f.d(v,"RibbonBuilder",function(){return _.RibbonBuilder}),f.d(v,"SphereBuilder",function(){return _.SphereBuilder}),f.d(v,"HemisphereBuilder",function(){return _.HemisphereBuilder}),f.d(v,"CylinderBuilder",function(){return _.CylinderBuilder}),f.d(v,"TorusBuilder",function(){return _.TorusBuilder}),f.d(v,"TorusKnotBuilder",function(){return _.TorusKnotBuilder}),f.d(v,"LinesBuilder",function(){return _.LinesBuilder}),f.d(v,"PolygonBuilder",function(){return _.PolygonBuilder}),f.d(v,"ShapeBuilder",function(){return _.ShapeBuilder}),f.d(v,"LatheBuilder",function(){return _.LatheBuilder}),f.d(v,"PlaneBuilder",function(){return _.PlaneBuilder}),f.d(v,"TiledPlaneBuilder",function(){return _.TiledPlaneBuilder}),f.d(v,"GroundBuilder",function(){return _.GroundBuilder}),f.d(v,"TubeBuilder",function(){return _.TubeBuilder}),f.d(v,"PolyhedronBuilder",function(){return _.PolyhedronBuilder}),f.d(v,"IcoSphereBuilder",function(){return _.IcoSphereBuilder}),f.d(v,"DecalBuilder",function(){return _.DecalBuilder}),f.d(v,"CapsuleBuilder",function(){return _.CapsuleBuilder}),f.d(v,"DataBuffer",function(){return _.DataBuffer}),f.d(v,"WebGLDataBuffer",function(){return _.WebGLDataBuffer}),f.d(v,"MorphTarget",function(){return _.MorphTarget}),f.d(v,"MorphTargetManager",function(){return _.MorphTargetManager}),f.d(v,"RecastJSPlugin",function(){return _.RecastJSPlugin}),f.d(v,"RecastJSCrowd",function(){return _.RecastJSCrowd}),f.d(v,"Node",function(){return _.Node}),f.d(v,"Database",function(){return _.Database}),f.d(v,"BaseParticleSystem",function(){return _.BaseParticleSystem}),f.d(v,"BoxParticleEmitter",function(){return _.BoxParticleEmitter}),f.d(v,"ConeParticleEmitter",function(){return _.ConeParticleEmitter}),f.d(v,"CylinderParticleEmitter",function(){return _.CylinderParticleEmitter}),f.d(v,"CylinderDirectedParticleEmitter",function(){return _.CylinderDirectedParticleEmitter}),f.d(v,"HemisphericParticleEmitter",function(){return _.HemisphericParticleEmitter}),f.d(v,"PointParticleEmitter",function(){return _.PointParticleEmitter}),f.d(v,"SphereParticleEmitter",function(){return _.SphereParticleEmitter}),f.d(v,"SphereDirectedParticleEmitter",function(){return _.SphereDirectedParticleEmitter}),f.d(v,"CustomParticleEmitter",function(){return _.CustomParticleEmitter}),f.d(v,"MeshParticleEmitter",function(){return _.MeshParticleEmitter}),f.d(v,"GPUParticleSystem",function(){return _.GPUParticleSystem}),f.d(v,"Particle",function(){return _.Particle}),f.d(v,"ParticleHelper",function(){return _.ParticleHelper}),f.d(v,"ParticleSystem",function(){return _.ParticleSystem}),f.d(v,"ParticleSystemSet",function(){return _.ParticleSystemSet}),f.d(v,"SolidParticle",function(){return _.SolidParticle}),f.d(v,"ModelShape",function(){return _.ModelShape}),f.d(v,"DepthSortedParticle",function(){return _.DepthSortedParticle}),f.d(v,"SolidParticleVertex",function(){return _.SolidParticleVertex}),f.d(v,"SolidParticleSystem",function(){return _.SolidParticleSystem}),f.d(v,"CloudPoint",function(){return _.CloudPoint}),f.d(v,"PointsGroup",function(){return _.PointsGroup}),f.d(v,"PointColor",function(){return _.PointColor}),f.d(v,"PointsCloudSystem",function(){return _.PointsCloudSystem}),f.d(v,"SubEmitterType",function(){return _.SubEmitterType}),f.d(v,"SubEmitter",function(){return _.SubEmitter}),f.d(v,"PhysicsEngine",function(){return _.PhysicsEngine}),f.d(v,"PhysicsEngineSceneComponent",function(){return _.PhysicsEngineSceneComponent}),f.d(v,"PhysicsHelper",function(){return _.PhysicsHelper}),f.d(v,"PhysicsRadialExplosionEventOptions",function(){return _.PhysicsRadialExplosionEventOptions}),f.d(v,"PhysicsUpdraftEventOptions",function(){return _.PhysicsUpdraftEventOptions}),f.d(v,"PhysicsVortexEventOptions",function(){return _.PhysicsVortexEventOptions}),f.d(v,"PhysicsRadialImpulseFalloff",function(){return _.PhysicsRadialImpulseFalloff}),f.d(v,"PhysicsUpdraftMode",function(){return _.PhysicsUpdraftMode}),f.d(v,"PhysicsImpostor",function(){return _.PhysicsImpostor}),f.d(v,"PhysicsJoint",function(){return _.PhysicsJoint}),f.d(v,"DistanceJoint",function(){return _.DistanceJoint}),f.d(v,"MotorEnabledJoint",function(){return _.MotorEnabledJoint}),f.d(v,"HingeJoint",function(){return _.HingeJoint}),f.d(v,"Hinge2Joint",function(){return _.Hinge2Joint}),f.d(v,"CannonJSPlugin",function(){return _.CannonJSPlugin}),f.d(v,"AmmoJSPlugin",function(){return _.AmmoJSPlugin}),f.d(v,"OimoJSPlugin",function(){return _.OimoJSPlugin}),f.d(v,"AnaglyphPostProcess",function(){return _.AnaglyphPostProcess}),f.d(v,"BlackAndWhitePostProcess",function(){return _.BlackAndWhitePostProcess}),f.d(v,"BloomEffect",function(){return _.BloomEffect}),f.d(v,"BloomMergePostProcess",function(){return _.BloomMergePostProcess}),f.d(v,"BlurPostProcess",function(){return _.BlurPostProcess}),f.d(v,"ChromaticAberrationPostProcess",function(){return _.ChromaticAberrationPostProcess}),f.d(v,"CircleOfConfusionPostProcess",function(){return _.CircleOfConfusionPostProcess}),f.d(v,"ColorCorrectionPostProcess",function(){return _.ColorCorrectionPostProcess}),f.d(v,"ConvolutionPostProcess",function(){return _.ConvolutionPostProcess}),f.d(v,"DepthOfFieldBlurPostProcess",function(){return _.DepthOfFieldBlurPostProcess}),f.d(v,"DepthOfFieldEffectBlurLevel",function(){return _.DepthOfFieldEffectBlurLevel}),f.d(v,"DepthOfFieldEffect",function(){return _.DepthOfFieldEffect}),f.d(v,"DepthOfFieldMergePostProcessOptions",function(){return _.DepthOfFieldMergePostProcessOptions}),f.d(v,"DepthOfFieldMergePostProcess",function(){return _.DepthOfFieldMergePostProcess}),f.d(v,"DisplayPassPostProcess",function(){return _.DisplayPassPostProcess}),f.d(v,"ExtractHighlightsPostProcess",function(){return _.ExtractHighlightsPostProcess}),f.d(v,"FilterPostProcess",function(){return _.FilterPostProcess}),f.d(v,"FxaaPostProcess",function(){return _.FxaaPostProcess}),f.d(v,"GrainPostProcess",function(){return _.GrainPostProcess}),f.d(v,"HighlightsPostProcess",function(){return _.HighlightsPostProcess}),f.d(v,"ImageProcessingPostProcess",function(){return _.ImageProcessingPostProcess}),f.d(v,"MotionBlurPostProcess",function(){return _.MotionBlurPostProcess}),f.d(v,"PassPostProcess",function(){return _.PassPostProcess}),f.d(v,"PassCubePostProcess",function(){return _.PassCubePostProcess}),f.d(v,"PostProcess",function(){return _.PostProcess}),f.d(v,"PostProcessManager",function(){return _.PostProcessManager}),f.d(v,"RefractionPostProcess",function(){return _.RefractionPostProcess}),f.d(v,"DefaultRenderingPipeline",function(){return _.DefaultRenderingPipeline}),f.d(v,"LensRenderingPipeline",function(){return _.LensRenderingPipeline}),f.d(v,"SSAO2RenderingPipeline",function(){return _.SSAO2RenderingPipeline}),f.d(v,"SSAORenderingPipeline",function(){return _.SSAORenderingPipeline}),f.d(v,"StandardRenderingPipeline",function(){return _.StandardRenderingPipeline}),f.d(v,"PostProcessRenderEffect",function(){return _.PostProcessRenderEffect}),f.d(v,"PostProcessRenderPipeline",function(){return _.PostProcessRenderPipeline}),f.d(v,"PostProcessRenderPipelineManager",function(){return _.PostProcessRenderPipelineManager}),f.d(v,"PostProcessRenderPipelineManagerSceneComponent",function(){return _.PostProcessRenderPipelineManagerSceneComponent}),f.d(v,"SharpenPostProcess",function(){return _.SharpenPostProcess}),f.d(v,"StereoscopicInterlacePostProcessI",function(){return _.StereoscopicInterlacePostProcessI}),f.d(v,"StereoscopicInterlacePostProcess",function(){return _.StereoscopicInterlacePostProcess}),f.d(v,"TonemappingOperator",function(){return _.TonemappingOperator}),f.d(v,"TonemapPostProcess",function(){return _.TonemapPostProcess}),f.d(v,"VolumetricLightScatteringPostProcess",function(){return _.VolumetricLightScatteringPostProcess}),f.d(v,"VRDistortionCorrectionPostProcess",function(){return _.VRDistortionCorrectionPostProcess}),f.d(v,"VRMultiviewToSingleviewPostProcess",function(){return _.VRMultiviewToSingleviewPostProcess}),f.d(v,"ScreenSpaceReflectionPostProcess",function(){return _.ScreenSpaceReflectionPostProcess}),f.d(v,"ScreenSpaceCurvaturePostProcess",function(){return _.ScreenSpaceCurvaturePostProcess}),f.d(v,"ReflectionProbe",function(){return _.ReflectionProbe}),f.d(v,"BoundingBoxRenderer",function(){return _.BoundingBoxRenderer}),f.d(v,"DepthRenderer",function(){return _.DepthRenderer}),f.d(v,"DepthRendererSceneComponent",function(){return _.DepthRendererSceneComponent}),f.d(v,"EdgesRenderer",function(){return _.EdgesRenderer}),f.d(v,"LineEdgesRenderer",function(){return _.LineEdgesRenderer}),f.d(v,"GeometryBufferRenderer",function(){return _.GeometryBufferRenderer}),f.d(v,"GeometryBufferRendererSceneComponent",function(){return _.GeometryBufferRendererSceneComponent}),f.d(v,"PrePassRenderer",function(){return _.PrePassRenderer}),f.d(v,"PrePassRendererSceneComponent",function(){return _.PrePassRendererSceneComponent}),f.d(v,"SubSurfaceSceneComponent",function(){return _.SubSurfaceSceneComponent}),f.d(v,"OutlineRenderer",function(){return _.OutlineRenderer}),f.d(v,"RenderingGroup",function(){return _.RenderingGroup}),f.d(v,"RenderingGroupInfo",function(){return _.RenderingGroupInfo}),f.d(v,"RenderingManager",function(){return _.RenderingManager}),f.d(v,"UtilityLayerRenderer",function(){return _.UtilityLayerRenderer}),f.d(v,"Scene",function(){return _.Scene}),f.d(v,"SceneComponentConstants",function(){return _.SceneComponentConstants}),f.d(v,"Stage",function(){return _.Stage}),f.d(v,"Sprite",function(){return _.Sprite}),f.d(v,"SpriteManager",function(){return _.SpriteManager}),f.d(v,"SpriteMap",function(){return _.SpriteMap}),f.d(v,"SpritePackedManager",function(){return _.SpritePackedManager}),f.d(v,"SpriteSceneComponent",function(){return _.SpriteSceneComponent}),f.d(v,"AlphaState",function(){return _.AlphaState}),f.d(v,"DepthCullingState",function(){return _.DepthCullingState}),f.d(v,"StencilState",function(){return _.StencilState}),f.d(v,"AndOrNotEvaluator",function(){return _.AndOrNotEvaluator}),f.d(v,"AssetTaskState",function(){return _.AssetTaskState}),f.d(v,"AbstractAssetTask",function(){return _.AbstractAssetTask}),f.d(v,"AssetsProgressEvent",function(){return _.AssetsProgressEvent}),f.d(v,"ContainerAssetTask",function(){return _.ContainerAssetTask}),f.d(v,"MeshAssetTask",function(){return _.MeshAssetTask}),f.d(v,"TextFileAssetTask",function(){return _.TextFileAssetTask}),f.d(v,"BinaryFileAssetTask",function(){return _.BinaryFileAssetTask}),f.d(v,"ImageAssetTask",function(){return _.ImageAssetTask}),f.d(v,"TextureAssetTask",function(){return _.TextureAssetTask}),f.d(v,"CubeTextureAssetTask",function(){return _.CubeTextureAssetTask}),f.d(v,"HDRCubeTextureAssetTask",function(){return _.HDRCubeTextureAssetTask}),f.d(v,"EquiRectangularCubeTextureAssetTask",function(){return _.EquiRectangularCubeTextureAssetTask}),f.d(v,"AssetsManager",function(){return _.AssetsManager}),f.d(v,"BasisTranscodeConfiguration",function(){return _.BasisTranscodeConfiguration}),f.d(v,"BasisTools",function(){return _.BasisTools}),f.d(v,"DDSTools",function(){return _.DDSTools}),f.d(v,"expandToProperty",function(){return _.expandToProperty}),f.d(v,"serialize",function(){return _.serialize}),f.d(v,"serializeAsTexture",function(){return _.serializeAsTexture}),f.d(v,"serializeAsColor3",function(){return _.serializeAsColor3}),f.d(v,"serializeAsFresnelParameters",function(){return _.serializeAsFresnelParameters}),f.d(v,"serializeAsVector2",function(){return _.serializeAsVector2}),f.d(v,"serializeAsVector3",function(){return _.serializeAsVector3}),f.d(v,"serializeAsMeshReference",function(){return _.serializeAsMeshReference}),f.d(v,"serializeAsColorCurves",function(){return _.serializeAsColorCurves}),f.d(v,"serializeAsColor4",function(){return _.serializeAsColor4}),f.d(v,"serializeAsImageProcessingConfiguration",function(){return _.serializeAsImageProcessingConfiguration}),f.d(v,"serializeAsQuaternion",function(){return _.serializeAsQuaternion}),f.d(v,"serializeAsMatrix",function(){return _.serializeAsMatrix}),f.d(v,"serializeAsCameraReference",function(){return _.serializeAsCameraReference}),f.d(v,"SerializationHelper",function(){return _.SerializationHelper}),f.d(v,"Deferred",function(){return _.Deferred}),f.d(v,"EnvironmentTextureTools",function(){return _.EnvironmentTextureTools}),f.d(v,"MeshExploder",function(){return _.MeshExploder}),f.d(v,"FilesInput",function(){return _.FilesInput}),f.d(v,"CubeMapToSphericalPolynomialTools",function(){return _.CubeMapToSphericalPolynomialTools}),f.d(v,"HDRTools",function(){return _.HDRTools}),f.d(v,"PanoramaToCubeMapTools",function(){return _.PanoramaToCubeMapTools}),f.d(v,"KhronosTextureContainer",function(){return _.KhronosTextureContainer}),f.d(v,"EventState",function(){return _.EventState}),f.d(v,"Observer",function(){return _.Observer}),f.d(v,"MultiObserver",function(){return _.MultiObserver}),f.d(v,"Observable",function(){return _.Observable}),f.d(v,"PerformanceMonitor",function(){return _.PerformanceMonitor}),f.d(v,"RollingAverage",function(){return _.RollingAverage}),f.d(v,"PromisePolyfill",function(){return _.PromisePolyfill}),f.d(v,"SceneOptimization",function(){return _.SceneOptimization}),f.d(v,"TextureOptimization",function(){return _.TextureOptimization}),f.d(v,"HardwareScalingOptimization",function(){return _.HardwareScalingOptimization}),f.d(v,"ShadowsOptimization",function(){return _.ShadowsOptimization}),f.d(v,"PostProcessesOptimization",function(){return _.PostProcessesOptimization}),f.d(v,"LensFlaresOptimization",function(){return _.LensFlaresOptimization}),f.d(v,"CustomOptimization",function(){return _.CustomOptimization}),f.d(v,"ParticlesOptimization",function(){return _.ParticlesOptimization}),f.d(v,"RenderTargetsOptimization",function(){return _.RenderTargetsOptimization}),f.d(v,"MergeMeshesOptimization",function(){return _.MergeMeshesOptimization}),f.d(v,"SceneOptimizerOptions",function(){return _.SceneOptimizerOptions}),f.d(v,"SceneOptimizer",function(){return _.SceneOptimizer}),f.d(v,"SceneSerializer",function(){return _.SceneSerializer}),f.d(v,"SmartArray",function(){return _.SmartArray}),f.d(v,"SmartArrayNoDuplicate",function(){return _.SmartArrayNoDuplicate}),f.d(v,"StringDictionary",function(){return _.StringDictionary}),f.d(v,"Tags",function(){return _.Tags}),f.d(v,"TextureTools",function(){return _.TextureTools}),f.d(v,"TGATools",function(){return _.TGATools}),f.d(v,"Tools",function(){return _.Tools}),f.d(v,"className",function(){return _.className}),f.d(v,"AsyncLoop",function(){return _.AsyncLoop}),f.d(v,"VideoRecorder",function(){return _.VideoRecorder}),f.d(v,"JoystickAxis",function(){return _.JoystickAxis}),f.d(v,"VirtualJoystick",function(){return _.VirtualJoystick}),f.d(v,"WorkerPool",function(){return _.WorkerPool}),f.d(v,"Logger",function(){return _.Logger}),f.d(v,"_TypeStore",function(){return _._TypeStore}),f.d(v,"FilesInputStore",function(){return _.FilesInputStore}),f.d(v,"DeepCopier",function(){return _.DeepCopier}),f.d(v,"PivotTools",function(){return _.PivotTools}),f.d(v,"PrecisionDate",function(){return _.PrecisionDate}),f.d(v,"ScreenshotTools",function(){return _.ScreenshotTools}),f.d(v,"WebRequest",function(){return _.WebRequest}),f.d(v,"InspectableType",function(){return _.InspectableType}),f.d(v,"BRDFTextureTools",function(){return _.BRDFTextureTools}),f.d(v,"RGBDTextureTools",function(){return _.RGBDTextureTools}),f.d(v,"ColorGradient",function(){return _.ColorGradient}),f.d(v,"Color3Gradient",function(){return _.Color3Gradient}),f.d(v,"FactorGradient",function(){return _.FactorGradient}),f.d(v,"GradientHelper",function(){return _.GradientHelper}),f.d(v,"PerfCounter",function(){return _.PerfCounter}),f.d(v,"RetryStrategy",function(){return _.RetryStrategy}),f.d(v,"CanvasGenerator",function(){return _.CanvasGenerator}),f.d(v,"LoadFileError",function(){return _.LoadFileError}),f.d(v,"RequestFileError",function(){return _.RequestFileError}),f.d(v,"ReadFileError",function(){return _.ReadFileError}),f.d(v,"FileTools",function(){return _.FileTools}),f.d(v,"StringTools",function(){return _.StringTools}),f.d(v,"DataReader",function(){return _.DataReader}),f.d(v,"MinMaxReducer",function(){return _.MinMaxReducer}),f.d(v,"DepthReducer",function(){return _.DepthReducer}),f.d(v,"DataStorage",function(){return _.DataStorage}),f.d(v,"SceneRecorder",function(){return _.SceneRecorder}),f.d(v,"KhronosTextureContainer2",function(){return _.KhronosTextureContainer2}),f.d(v,"Trajectory",function(){return _.Trajectory}),f.d(v,"TrajectoryClassifier",function(){return _.TrajectoryClassifier}),f.d(v,"TimerState",function(){return _.TimerState}),f.d(v,"setAndStartTimer",function(){return _.setAndStartTimer}),f.d(v,"AdvancedTimer",function(){return _.AdvancedTimer}),f.d(v,"CopyTools",function(){return _.CopyTools}),f.d(v,"WebXRCamera",function(){return _.WebXRCamera}),f.d(v,"WebXREnterExitUIButton",function(){return _.WebXREnterExitUIButton}),f.d(v,"WebXREnterExitUIOptions",function(){return _.WebXREnterExitUIOptions}),f.d(v,"WebXREnterExitUI",function(){return _.WebXREnterExitUI}),f.d(v,"WebXRExperienceHelper",function(){return _.WebXRExperienceHelper}),f.d(v,"WebXRInput",function(){return _.WebXRInput}),f.d(v,"WebXRInputSource",function(){return _.WebXRInputSource}),f.d(v,"WebXRManagedOutputCanvasOptions",function(){return _.WebXRManagedOutputCanvasOptions}),f.d(v,"WebXRManagedOutputCanvas",function(){return _.WebXRManagedOutputCanvas}),f.d(v,"WebXRState",function(){return _.WebXRState}),f.d(v,"WebXRTrackingState",function(){return _.WebXRTrackingState}),f.d(v,"WebXRSessionManager",function(){return _.WebXRSessionManager}),f.d(v,"WebXRDefaultExperienceOptions",function(){return _.WebXRDefaultExperienceOptions}),f.d(v,"WebXRDefaultExperience",function(){return _.WebXRDefaultExperience}),f.d(v,"WebXRFeatureName",function(){return _.WebXRFeatureName}),f.d(v,"WebXRFeaturesManager",function(){return _.WebXRFeaturesManager}),f.d(v,"WebXRAbstractFeature",function(){return _.WebXRAbstractFeature}),f.d(v,"WebXRHitTestLegacy",function(){return _.WebXRHitTestLegacy}),f.d(v,"WebXRAnchorSystem",function(){return _.WebXRAnchorSystem}),f.d(v,"WebXRPlaneDetector",function(){return _.WebXRPlaneDetector}),f.d(v,"WebXRBackgroundRemover",function(){return _.WebXRBackgroundRemover}),f.d(v,"WebXRMotionControllerTeleportation",function(){return _.WebXRMotionControllerTeleportation}),f.d(v,"WebXRControllerPointerSelection",function(){return _.WebXRControllerPointerSelection}),f.d(v,"IWebXRControllerPhysicsOptions",function(){return _.IWebXRControllerPhysicsOptions}),f.d(v,"WebXRControllerPhysics",function(){return _.WebXRControllerPhysics}),f.d(v,"WebXRHitTest",function(){return _.WebXRHitTest}),f.d(v,"WebXRFeaturePointSystem",function(){return _.WebXRFeaturePointSystem}),f.d(v,"WebXRHand",function(){return _.WebXRHand}),f.d(v,"WebXRHandTracking",function(){return _.WebXRHandTracking}),f.d(v,"WebXRAbstractMotionController",function(){return _.WebXRAbstractMotionController}),f.d(v,"WebXRControllerComponent",function(){return _.WebXRControllerComponent}),f.d(v,"WebXRGenericTriggerMotionController",function(){return _.WebXRGenericTriggerMotionController}),f.d(v,"WebXRMicrosoftMixedRealityController",function(){return _.WebXRMicrosoftMixedRealityController}),f.d(v,"WebXRMotionControllerManager",function(){return _.WebXRMotionControllerManager}),f.d(v,"WebXROculusTouchMotionController",function(){return _.WebXROculusTouchMotionController}),f.d(v,"WebXRHTCViveMotionController",function(){return _.WebXRHTCViveMotionController}),f.d(v,"WebXRProfiledMotionController",function(){return _.WebXRProfiledMotionController});var l=B!==void 0?B:typeof window<"u"?window:void 0;if(l!==void 0){l.BABYLON=O,l.BABYLON=l.BABYLON||{};var O=l.BABYLON;O.Debug=O.Debug||{};var R=[];for(var x in P)O.Debug[x]=P[x],R.push(x);for(var x in _)O[x]=_[x]}var m={AxesViewer:P.AxesViewer,BoneAxesViewer:P.BoneAxesViewer,PhysicsViewer:P.PhysicsViewer,SkeletonViewer:P.SkeletonViewer}}.call(this,f(159))}])})})(Ff);var ei=Ff.exports,Bf={exports:{}};(function(Qe,Be){(function(Ae,v){Qe.exports=v(ei)})(typeof self<"u"?self:typeof $r<"u"?$r:$r,function(Ae){return function(v){var f={};function B(_){if(f[_])return f[_].exports;var P=f[_]={i:_,l:!1,exports:{}};return v[_].call(P.exports,P,P.exports,B),P.l=!0,P.exports}return B.m=v,B.c=f,B.d=function(_,P,l){B.o(_,P)||Object.defineProperty(_,P,{enumerable:!0,get:l})},B.r=function(_){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(_,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_,"__esModule",{value:!0})},B.t=function(_,P){if(1&P&&(_=B(_)),8&P||4&P&&typeof _=="object"&&_&&_.__esModule)return _;var l=Object.create(null);if(B.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:_}),2&P&&typeof _!="string")for(var O in _)B.d(l,O,function(R){return _[R]}.bind(null,O));return l},B.n=function(_){var P=_&&_.__esModule?function(){return _.default}:function(){return _};return B.d(P,"a",P),P},B.o=function(_,P){return Object.prototype.hasOwnProperty.call(_,P)},B.p="",B(B.s=20)}([function(v,f){v.exports=Ae},function(v,f,B){B.d(f,"a",function(){return l}),B.d(f,"b",function(){return O});var _=B(0),P=B(2),l=function(){function R(){}return R.Get=function(x,m,c){if(!m||c==null||!m[c])throw new Error(x+": Failed to find index ("+c+")");return m[c]},R.Assign=function(x){if(x)for(var m=0;m "+P.GLTFLoaderState[P.GLTFLoaderState.READY],A=P.GLTFLoaderState[P.GLTFLoaderState.LOADING]+" => "+P.GLTFLoaderState[P.GLTFLoaderState.COMPLETE];c._parent._startPerformanceCounter(T),c._parent._startPerformanceCounter(A),c._setState(P.GLTFLoaderState.LOADING),c._extensionsOnLoading();var S=new Array,g=c._babylonScene.blockMaterialDirtyMechanism;if(c._babylonScene.blockMaterialDirtyMechanism=!0,x)S.push(c.loadSceneAsync("/nodes",{nodes:x,index:-1}));else if(c._gltf.scene!=null||c._gltf.scenes&&c._gltf.scenes[0]){var u=l.Get("/scene",c._gltf.scenes,c._gltf.scene||0);S.push(c.loadSceneAsync("/scenes/"+u.index,u))}if(c.parent.loadAllMaterials&&c._gltf.materials)for(var h=0;hx.bin.byteLength)&&_.Logger.Warn("Binary buffer length ("+c.byteLength+") from JSON does not match chunk length ("+x.bin.byteLength+")"),this._bin=x.bin}else _.Logger.Warn("Unexpected BIN chunk")}},R.prototype._setupData=function(){if(l.Assign(this._gltf.accessors),l.Assign(this._gltf.animations),l.Assign(this._gltf.buffers),l.Assign(this._gltf.bufferViews),l.Assign(this._gltf.cameras),l.Assign(this._gltf.images),l.Assign(this._gltf.materials),l.Assign(this._gltf.meshes),l.Assign(this._gltf.nodes),l.Assign(this._gltf.samplers),l.Assign(this._gltf.scenes),l.Assign(this._gltf.skins),l.Assign(this._gltf.textures),this._gltf.nodes){for(var x={},m=0,c=this._gltf.nodes;m=2)throw new Error(x+"/texCoord: Invalid value ("+m.texCoord+")");var S=l.Get(x+"/index",this._gltf.textures,m.index);S._textureInfo=m;var g=this._loadTextureAsync("/textures/"+m.index,S,function(u){u.coordinatesIndex=m.texCoord||0,R.AddPointerMetadata(u,x),T._parent.onTextureLoadedObservable.notifyObservers(u),c(u)});return this.logClose(),g},R.prototype._loadTextureAsync=function(x,m,c){c===void 0&&(c=function(){});var T=this._extensionsLoadTextureAsync(x,m,c);if(T)return T;this.logOpen(x+" "+(m.name||""));var A=m.sampler==null?R.DefaultSampler:l.Get(x+"/sampler",this._gltf.samplers,m.sampler),S=l.Get(x+"/source",this._gltf.images,m.source),g=this._createTextureAsync(x,A,S,c);return this.logClose(),g},R.prototype._createTextureAsync=function(x,m,c,T,A){var S=this;T===void 0&&(T=function(){});var g=this._loadSampler("/samplers/"+m.index,m),u=new Array,h=new _.Deferred;this._babylonScene._blockEntityCollection=this._forAssetContainer;var b=new _.Texture(null,this._babylonScene,g.noMipMaps,!1,g.samplingMode,function(){S._disposed||h.resolve()},function(E,D){S._disposed||h.reject(new Error(x+": "+(D&&D.message?D.message:E||"Failed to load texture")))},void 0,void 0,void 0,c.mimeType,A);return this._babylonScene._blockEntityCollection=!1,u.push(h.promise),u.push(this.loadImageAsync("/images/"+c.index,c).then(function(E){var D=c.uri||S._fileName+"#image"+c.index,w="data:"+S._uniqueRootUrl+D;b.updateURL(w,E)})),b.wrapU=g.wrapU,b.wrapV=g.wrapV,T(b),Promise.all(u).then(function(){return b})},R.prototype._loadSampler=function(x,m){return m._data||(m._data={noMipMaps:m.minFilter===9728||m.minFilter===9729,samplingMode:R._GetTextureSamplingMode(x,m),wrapU:R._GetTextureWrapMode(x+"/wrapS",m.wrapS),wrapV:R._GetTextureWrapMode(x+"/wrapT",m.wrapT)}),m._data},R.prototype.loadImageAsync=function(x,m){if(!m._data){if(this.logOpen(x+" "+(m.name||"")),m.uri)m._data=this.loadUriAsync(x+"/uri",m,m.uri);else{var c=l.Get(x+"/bufferView",this._gltf.bufferViews,m.bufferView);m._data=this.loadBufferViewAsync("/bufferViews/"+c.index,c)}this.logClose()}return m._data},R.prototype.loadUriAsync=function(x,m,c){var T=this,A=this._extensionsLoadUriAsync(x,m,c);if(A)return A;if(!R._ValidateUri(c))throw new Error(x+": '"+c+"' is invalid");if(_.Tools.IsBase64(c)){var S=new Uint8Array(_.Tools.DecodeBase64(c));return this.log("Decoded "+c.substr(0,64)+"... ("+S.length+" bytes)"),Promise.resolve(S)}return this.log("Loading "+c),this._parent.preprocessUrlAsync(this._rootUrl+c).then(function(g){return new Promise(function(u,h){T._parent._loadFile(g,T._babylonScene,function(b){T._disposed||(T.log("Loaded "+c+" ("+b.byteLength+" bytes)"),u(new Uint8Array(b)))},!0,function(b){h(new _.LoadFileError(x+": Failed to load '"+c+"'"+(b?": "+b.status+" "+b.statusText:""),b))})})})},R.AddPointerMetadata=function(x,m){var c=x.metadata=x.metadata||{},T=c.gltf=c.gltf||{};(T.pointers=T.pointers||[]).push(m)},R._GetTextureWrapMode=function(x,m){switch(m=m??10497){case 33071:return _.Texture.CLAMP_ADDRESSMODE;case 33648:return _.Texture.MIRROR_ADDRESSMODE;case 10497:return _.Texture.WRAP_ADDRESSMODE;default:return _.Logger.Warn(x+": Invalid value ("+m+")"),_.Texture.WRAP_ADDRESSMODE}},R._GetTextureSamplingMode=function(x,m){var c=m.magFilter==null?9729:m.magFilter,T=m.minFilter==null?9987:m.minFilter;if(c===9729)switch(T){case 9728:return _.Texture.LINEAR_NEAREST;case 9729:return _.Texture.LINEAR_LINEAR;case 9984:return _.Texture.LINEAR_NEAREST_MIPNEAREST;case 9985:return _.Texture.LINEAR_LINEAR_MIPNEAREST;case 9986:return _.Texture.LINEAR_NEAREST_MIPLINEAR;case 9987:return _.Texture.LINEAR_LINEAR_MIPLINEAR;default:return _.Logger.Warn(x+"/minFilter: Invalid value ("+T+")"),_.Texture.LINEAR_LINEAR_MIPLINEAR}else switch(c!==9728&&_.Logger.Warn(x+"/magFilter: Invalid value ("+c+")"),T){case 9728:return _.Texture.NEAREST_NEAREST;case 9729:return _.Texture.NEAREST_LINEAR;case 9984:return _.Texture.NEAREST_NEAREST_MIPNEAREST;case 9985:return _.Texture.NEAREST_LINEAR_MIPNEAREST;case 9986:return _.Texture.NEAREST_NEAREST_MIPLINEAR;case 9987:return _.Texture.NEAREST_LINEAR_MIPLINEAR;default:return _.Logger.Warn(x+"/minFilter: Invalid value ("+T+")"),_.Texture.NEAREST_NEAREST_MIPNEAREST}},R._GetTypedArrayConstructor=function(x,m){switch(m){case 5120:return Int8Array;case 5121:return Uint8Array;case 5122:return Int16Array;case 5123:return Uint16Array;case 5125:return Uint32Array;case 5126:return Float32Array;default:throw new Error(x+": Invalid component type "+m)}},R._GetTypedArray=function(x,m,c,T,A){var S=c.buffer;T=c.byteOffset+(T||0);var g=R._GetTypedArrayConstructor(x+"/componentType",m);try{return new g(S,T,A)}catch(u){throw new Error(x+": "+u)}},R._GetNumComponents=function(x,m){switch(m){case"SCALAR":return 1;case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16}throw new Error(x+": Invalid type ("+m+")")},R._ValidateUri=function(x){return _.Tools.IsBase64(x)||x.indexOf("..")===-1},R._GetDrawMode=function(x,m){switch(m==null&&(m=4),m){case 0:return _.Material.PointListDrawMode;case 1:return _.Material.LineListDrawMode;case 2:return _.Material.LineLoopDrawMode;case 3:return _.Material.LineStripDrawMode;case 4:return _.Material.TriangleFillMode;case 5:return _.Material.TriangleStripDrawMode;case 6:return _.Material.TriangleFanDrawMode}throw new Error(x+": Invalid mesh primitive mode ("+m+")")},R.prototype._compileMaterialsAsync=function(){var x=this;this._parent._startPerformanceCounter("Compile materials");var m=new Array;if(this._gltf.materials)for(var c=0,T=this._gltf.materials;c-1&&h.materials.splice(N,1),(N=b.indexOf(w))>-1&&b.splice(N,1)})});var E=[];u.onTextureLoadedObservable.add(function(w){E.push(w),w.onDisposeObservable.addOnce(function(){var N=h.textures.indexOf(w);N>-1&&h.textures.splice(N,1),(N=E.indexOf(w))>-1&&E.splice(N,1)})});var D=[];return u.onCameraLoadedObservable.add(function(w){D.push(w)}),u._loader.importMeshAsync(null,c,!0,T,A,S,g).then(function(w){return Array.prototype.push.apply(h.geometries,w.geometries),Array.prototype.push.apply(h.meshes,w.meshes),Array.prototype.push.apply(h.particleSystems,w.particleSystems),Array.prototype.push.apply(h.skeletons,w.skeletons),Array.prototype.push.apply(h.animationGroups,w.animationGroups),Array.prototype.push.apply(h.materials,b),Array.prototype.push.apply(h.textures,E),Array.prototype.push.apply(h.lights,w.lights),Array.prototype.push.apply(h.transformNodes,w.transformNodes),Array.prototype.push.apply(h.cameras,D),h})})},m.prototype.canDirectLoad=function(c){return c.indexOf("asset")!==-1&&c.indexOf("version")!==-1||O.StringTools.StartsWith(c,"data:base64,"+m.magicBase64Encoded)||O.StringTools.StartsWith(c,"data:application/octet-stream;base64,"+m.magicBase64Encoded)||O.StringTools.StartsWith(c,"data:model/gltf-binary;base64,"+m.magicBase64Encoded)},m.prototype.directLoad=function(c,T){if(O.StringTools.StartsWith(T,"base64,"+m.magicBase64Encoded)||O.StringTools.StartsWith(T,"application/octet-stream;base64,"+m.magicBase64Encoded)||O.StringTools.StartsWith(T,"model/gltf-binary;base64,"+m.magicBase64Encoded)){var A=O.Tools.DecodeBase64(T);return this._validate(c,A),this._unpackBinaryAsync(new O.DataReader({readAsync:function(S,g){return Promise.resolve(new Uint8Array(A,S,g))},byteLength:A.byteLength}))}return this._validate(c,T),Promise.resolve({json:this._parseJson(T)})},m.prototype.createPlugin=function(){return new m},Object.defineProperty(m.prototype,"loaderState",{get:function(){return this._loader?this._loader.state:null},enumerable:!1,configurable:!0}),m.prototype.whenCompleteAsync=function(){var c=this;return new Promise(function(T,A){c.onCompleteObservable.addOnce(function(){T()}),c.onErrorObservable.addOnce(function(S){A(S)})})},m.prototype._loadFile=function(c,T,A,S,g){var u=this,h=T._loadFile(c,A,function(b){u._onProgress(b,h)},void 0,S,g);return h.onCompleteObservable.add(function(b){u._requests.splice(u._requests.indexOf(b),1)}),this._requests.push(h),h},m.prototype._requestFile=function(c,T,A,S,g,u){var h=this,b=T._requestFile(c,A,function(E){h._onProgress(E,b)},void 0,S,g,u);return b.onCompleteObservable.add(function(E){h._requests.splice(h._requests.indexOf(E),1)}),this._requests.push(b),b},m.prototype._onProgress=function(c,T){if(this._progressCallback){T._lengthComputable=c.lengthComputable,T._loaded=c.loaded,T._total=c.total;for(var A=!0,S=0,g=0,u=0,h=this._requests;u0)throw new Error("Incompatible minimum version: "+T.minVersion)}var g={1:m._CreateGLTF1Loader,2:m._CreateGLTF2Loader}[A.major];if(!g)throw new Error("Unsupported version: "+T.version);return g(this)},m.prototype._parseJson=function(c){this._startPerformanceCounter("Parse JSON"),this._log("JSON length: "+c.length);var T=JSON.parse(c);return this._endPerformanceCounter("Parse JSON"),T},m.prototype._unpackBinaryAsync=function(c){var T=this;return this._startPerformanceCounter("Unpack Binary"),c.loadAsync(20).then(function(){var A=c.readUint32();if(A!==1179937895)throw new Error("Unexpected magic: "+A);var S=c.readUint32();T.loggingEnabled&&T._log("Binary version: "+S);var g,u=c.readUint32();if(c.buffer.byteLength!==0&&u!==c.buffer.byteLength)throw new Error("Length in header does not match actual data length: "+u+" != "+c.buffer.byteLength);switch(S){case 1:g=T._unpackBinaryV1Async(c,u);break;case 2:g=T._unpackBinaryV2Async(c,u);break;default:throw new Error("Unsupported version: "+S)}return T._endPerformanceCounter("Unpack Binary"),g})},m.prototype._unpackBinaryV1Async=function(c,T){var A=c.readUint32(),S=c.readUint32();if(S!==0)throw new Error("Unexpected content format: "+S);var g=T-c.byteOffset,u={json:this._parseJson(c.readString(A)),bin:null};if(g!==0){var h=c.byteOffset;u.bin={readAsync:function(b,E){return c.buffer.readAsync(h+b,E)},byteLength:g}}return Promise.resolve(u)},m.prototype._unpackBinaryV2Async=function(c,T){var A=this,S=1313821514,g=5130562,u=c.readUint32();if(c.readUint32()!==S)throw new Error("First chunk format is not JSON");return c.byteOffset+u===T?c.loadAsync(u).then(function(){return{json:A._parseJson(c.readString(u)),bin:null}}):c.loadAsync(u+8).then(function(){var h={json:A._parseJson(c.readString(u)),bin:null},b=function(){var E=c.readUint32();switch(c.readUint32()){case S:throw new Error("Unexpected JSON chunk");case g:var D=c.byteOffset;h.bin={readAsync:function(w,N){return c.buffer.readAsync(D+w,N)},byteLength:E},c.skipBytes(E);break;default:c.skipBytes(E)}return c.byteOffset!==T?c.loadAsync(8).then(b):Promise.resolve(h)};return b()})},m._parseVersion=function(c){if(c==="1.0"||c==="1.0.1")return{major:1,minor:0};var T=(c+"").match(/^(\d+)\.(\d+)/);return T?{major:parseInt(T[1]),minor:parseInt(T[2])}:null},m._compareVersion=function(c,T){return c.major>T.major?1:c.majorT.minor?1:c.minor=0&&re.renderTargetTextures.splice(G,1)}if(this._opaqueRenderTarget&&(K=this._scene.customRenderTargets.indexOf(this._opaqueRenderTarget),this._opaqueRenderTarget.dispose()),this._opaqueRenderTarget=new _.RenderTargetTexture("opaqueSceneTexture",this._options.renderSize,this._scene,!0),this._opaqueRenderTarget.renderList=this._opaqueMeshesCache,this._opaqueRenderTarget.gammaSpace=!0,this._opaqueRenderTarget.lodGenerationScale=1,this._opaqueRenderTarget.lodGenerationOffset=-4,K>=0?this._scene.customRenderTargets.splice(K,0,this._opaqueRenderTarget):(K=this._scene.customRenderTargets.length,this._scene.customRenderTargets.push(this._opaqueRenderTarget)),this._scene.layers&&this._opaqueRenderTarget)for(var Q=0,oe=this._scene.layers;Q=0;Q--)if(G.push(P.a.Get(ee+"/ids/"+L[Q],$,L[Q])),G.length===this.maxLODsToLoad)return G;return G.push(K),G},ae.prototype._disposeTransformNode=function(ee){var K=this,$=new Array,L=ee.material;L&&$.push(L);for(var G=0,Q=ee.getChildMeshes();G0){var $=ee.metadata=ee.metadata||{};($.gltf=$.gltf||{}).extras=K.extras}},ae.prototype.dispose=function(){this._loader=null},ae.prototype.loadNodeAsync=function(ee,K,$){var L=this;return this._loader.loadNodeAsync(ee,K,function(G){L._assignExtras(G,K),$(G)})},ae.prototype.loadCameraAsync=function(ee,K,$){var L=this;return this._loader.loadCameraAsync(ee,K,function(G){L._assignExtras(G,K),$(G)})},ae.prototype.createMaterial=function(ee,K,$){var L=this._loader.createMaterial(ee,K,$);return this._assignExtras(L,K),L},ae}();P.b.RegisterExtension("ExtrasAsMetadata",function(ae){return new pe(ae)})},function(v,f,B){B.r(f),B.d(f,"GLTFBinaryExtension",function(){return H}),B.d(f,"GLTFLoaderBase",function(){return re}),B.d(f,"GLTFLoader",function(){return Y}),B.d(f,"GLTFLoaderExtension",function(){return k}),B.d(f,"EComponentType",function(){return _}),B.d(f,"EShaderType",function(){return P}),B.d(f,"EParameterType",function(){return l}),B.d(f,"ETextureWrapMode",function(){return O}),B.d(f,"ETextureFilterType",function(){return R}),B.d(f,"ETextureFormat",function(){return x}),B.d(f,"ECullingType",function(){return m}),B.d(f,"EBlendingFunction",function(){return c}),B.d(f,"GLTFUtils",function(){return g}),B.d(f,"GLTFMaterialsCommonExtension",function(){return Z});var _,P,l,O,R,x,m,c,T=B(4);(function(W){W[W.BYTE=5120]="BYTE",W[W.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",W[W.SHORT=5122]="SHORT",W[W.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",W[W.FLOAT=5126]="FLOAT"})(_||(_={})),function(W){W[W.FRAGMENT=35632]="FRAGMENT",W[W.VERTEX=35633]="VERTEX"}(P||(P={})),function(W){W[W.BYTE=5120]="BYTE",W[W.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",W[W.SHORT=5122]="SHORT",W[W.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",W[W.INT=5124]="INT",W[W.UNSIGNED_INT=5125]="UNSIGNED_INT",W[W.FLOAT=5126]="FLOAT",W[W.FLOAT_VEC2=35664]="FLOAT_VEC2",W[W.FLOAT_VEC3=35665]="FLOAT_VEC3",W[W.FLOAT_VEC4=35666]="FLOAT_VEC4",W[W.INT_VEC2=35667]="INT_VEC2",W[W.INT_VEC3=35668]="INT_VEC3",W[W.INT_VEC4=35669]="INT_VEC4",W[W.BOOL=35670]="BOOL",W[W.BOOL_VEC2=35671]="BOOL_VEC2",W[W.BOOL_VEC3=35672]="BOOL_VEC3",W[W.BOOL_VEC4=35673]="BOOL_VEC4",W[W.FLOAT_MAT2=35674]="FLOAT_MAT2",W[W.FLOAT_MAT3=35675]="FLOAT_MAT3",W[W.FLOAT_MAT4=35676]="FLOAT_MAT4",W[W.SAMPLER_2D=35678]="SAMPLER_2D"}(l||(l={})),function(W){W[W.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",W[W.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",W[W.REPEAT=10497]="REPEAT"}(O||(O={})),function(W){W[W.NEAREST=9728]="NEAREST",W[W.LINEAR=9728]="LINEAR",W[W.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",W[W.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",W[W.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",W[W.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(R||(R={})),function(W){W[W.ALPHA=6406]="ALPHA",W[W.RGB=6407]="RGB",W[W.RGBA=6408]="RGBA",W[W.LUMINANCE=6409]="LUMINANCE",W[W.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA"}(x||(x={})),function(W){W[W.FRONT=1028]="FRONT",W[W.BACK=1029]="BACK",W[W.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(m||(m={})),function(W){W[W.ZERO=0]="ZERO",W[W.ONE=1]="ONE",W[W.SRC_COLOR=768]="SRC_COLOR",W[W.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",W[W.DST_COLOR=774]="DST_COLOR",W[W.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",W[W.SRC_ALPHA=770]="SRC_ALPHA",W[W.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",W[W.DST_ALPHA=772]="DST_ALPHA",W[W.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",W[W.CONSTANT_COLOR=32769]="CONSTANT_COLOR",W[W.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",W[W.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",W[W.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA",W[W.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE"}(c||(c={}));var A,S=B(0),g=function(){function W(){}return W.SetMatrix=function(q,he,ge,me,_e){var be=null;if(ge.semantic==="MODEL"?be=he.getWorldMatrix():ge.semantic==="PROJECTION"?be=q.getProjectionMatrix():ge.semantic==="VIEW"?be=q.getViewMatrix():ge.semantic==="MODELVIEWINVERSETRANSPOSE"?be=S.Matrix.Transpose(he.getWorldMatrix().multiply(q.getViewMatrix()).invert()):ge.semantic==="MODELVIEW"?be=he.getWorldMatrix().multiply(q.getViewMatrix()):ge.semantic==="MODELVIEWPROJECTION"?be=he.getWorldMatrix().multiply(q.getTransformMatrix()):ge.semantic==="MODELINVERSE"?be=he.getWorldMatrix().invert():ge.semantic==="VIEWINVERSE"?be=q.getViewMatrix().invert():ge.semantic==="PROJECTIONINVERSE"?be=q.getProjectionMatrix().invert():ge.semantic==="MODELVIEWINVERSE"?be=he.getWorldMatrix().multiply(q.getViewMatrix()).invert():ge.semantic==="MODELVIEWPROJECTIONINVERSE"?be=he.getWorldMatrix().multiply(q.getTransformMatrix()).invert():ge.semantic==="MODELINVERSETRANSPOSE"&&(be=S.Matrix.Transpose(he.getWorldMatrix().invert())),be)switch(ge.type){case l.FLOAT_MAT2:_e.setMatrix2x2(me,S.Matrix.GetAsMatrix2x2(be));break;case l.FLOAT_MAT3:_e.setMatrix3x3(me,S.Matrix.GetAsMatrix3x3(be));break;case l.FLOAT_MAT4:_e.setMatrix(me,be)}},W.SetUniform=function(q,he,ge,me){switch(me){case l.FLOAT:return q.setFloat(he,ge),!0;case l.FLOAT_VEC2:return q.setVector2(he,S.Vector2.FromArray(ge)),!0;case l.FLOAT_VEC3:return q.setVector3(he,S.Vector3.FromArray(ge)),!0;case l.FLOAT_VEC4:return q.setVector4(he,S.Vector4.FromArray(ge)),!0;default:return!1}},W.GetWrapMode=function(q){switch(q){case O.CLAMP_TO_EDGE:return S.Texture.CLAMP_ADDRESSMODE;case O.MIRRORED_REPEAT:return S.Texture.MIRROR_ADDRESSMODE;case O.REPEAT:default:return S.Texture.WRAP_ADDRESSMODE}},W.GetByteStrideFromType=function(q){switch(q.type){case"VEC2":return 2;case"VEC3":return 3;case"VEC4":case"MAT2":return 4;case"MAT3":return 9;case"MAT4":return 16;default:return 1}},W.GetTextureFilterMode=function(q){switch(q){case R.LINEAR:case R.LINEAR_MIPMAP_NEAREST:case R.LINEAR_MIPMAP_LINEAR:return S.Texture.TRILINEAR_SAMPLINGMODE;case R.NEAREST:case R.NEAREST_MIPMAP_NEAREST:return S.Texture.NEAREST_SAMPLINGMODE;default:return S.Texture.BILINEAR_SAMPLINGMODE}},W.GetBufferFromBufferView=function(q,he,ge,me,_e){ge=he.byteOffset+ge;var be=q.loadedBufferViews[he.buffer];if(ge+me>be.byteLength)throw new Error("Buffer access is out of range");var Ce=be.buffer;switch(ge+=be.byteOffset,_e){case _.BYTE:return new Int8Array(Ce,ge,me);case _.UNSIGNED_BYTE:return new Uint8Array(Ce,ge,me);case _.SHORT:return new Int16Array(Ce,ge,me);case _.UNSIGNED_SHORT:return new Uint16Array(Ce,ge,me);default:return new Float32Array(Ce,ge,me)}},W.GetBufferFromAccessor=function(q,he){var ge=q.bufferViews[he.bufferView],me=he.count*W.GetByteStrideFromType(he);return W.GetBufferFromBufferView(q,ge,he.byteOffset,me,he.componentType)},W.DecodeBufferToText=function(q){for(var he="",ge=q.byteLength,me=0;me=this._maxPos},W}(),b=["MODEL","VIEW","PROJECTION","MODELVIEW","MODELVIEWPROJECTION","JOINTMATRIX"],E=["world","view","projection","worldView","worldViewProjection","mBones"],D=["translation","rotation","scale"],w=["position","rotationQuaternion","scaling"],N=function(W,q,he){for(var ge in W){var me=W[ge];he[q][ge]=me}},I=function(W){if(W)for(var q=0;q0&&(Xe=ne(_e,me))&&be.indexOf(Xe)===-1&&be.push(Xe),new S.Bone(ye.jointName||"",ge,Xe,et).id=me}}else S.Tools.Warn("Joint named "+q.jointNames[Ce]+" does not exist")}var lt=ge.bones;for(ge.bones=[],Ce=0;Ce1?(_e=new S.MultiMaterial("multimat"+ge,W.scene)).subMaterials=be:_e=new S.StandardMaterial("multimat"+ge,W.scene),be.length===1&&(_e=be[0]),me.material||(me.material=_e),new S.Geometry(ge,W.scene,Ce,!1,me),me.computeWorldMatrix(!0),W.scene._blockEntityCollection=!1,me.subMeshes=[];var Zt=0;for(He=0;He0&&W.importMeshesNames.indexOf(q.name||"")===-1)return null;if(q.skin){if(q.meshes){var _e=W.skins[q.skin];(be=ae(W,q,q.meshes,he,q.babylonNode)).skeleton=W.scene.getLastSkeletonByID(q.skin),be.skeleton===null&&(be.skeleton=pe(W,_e,0,_e.babylonSkeleton,q.skin),_e.babylonSkeleton||(_e.babylonSkeleton=be.skeleton)),me=be}}else if(q.meshes){var be;me=be=ae(W,q,q.mesh?[q.mesh]:q.meshes,he,q.babylonNode)}else if(!q.light||q.babylonNode||W.importOnlyMeshes){if(q.camera&&!q.babylonNode&&!W.importOnlyMeshes){var Ce=W.cameras[q.camera];if(Ce){if(W.scene._blockEntityCollection=W.forAssetContainer,Ce.type==="orthographic"){var ye=new S.FreeCamera(q.camera,S.Vector3.Zero(),W.scene,!1);ye.name=q.name||"",ye.mode=S.Camera.ORTHOGRAPHIC_CAMERA,ye.attachControl(),me=ye}else if(Ce.type==="perspective"){var Ue=Ce[Ce.type],Ge=new S.FreeCamera(q.camera,S.Vector3.Zero(),W.scene,!1);Ge.name=q.name||"",Ge.attachControl(),Ue.aspectRatio||(Ue.aspectRatio=W.scene.getEngine().getRenderWidth()/W.scene.getEngine().getRenderHeight()),Ue.znear&&Ue.zfar&&(Ge.maxZ=Ue.zfar,Ge.minZ=Ue.znear),me=Ge}W.scene._blockEntityCollection=!1}}}else{var Xe=W.lights[q.light];if(Xe){if(Xe.type==="ambient"){var He=Xe[Xe.type],We=new S.HemisphericLight(q.light,S.Vector3.Zero(),W.scene);We.name=q.name||"",He.color&&(We.diffuse=S.Color3.FromArray(He.color)),me=We}else if(Xe.type==="directional"){var Ze=Xe[Xe.type],ze=new S.DirectionalLight(q.light,S.Vector3.Zero(),W.scene);ze.name=q.name||"",Ze.color&&(ze.diffuse=S.Color3.FromArray(Ze.color)),me=ze}else if(Xe.type==="point"){var it=Xe[Xe.type],et=new S.PointLight(q.light,S.Vector3.Zero(),W.scene);et.name=q.name||"",it.color&&(et.diffuse=S.Color3.FromArray(it.color)),me=et}else if(Xe.type==="spot"){var lt=Xe[Xe.type],ct=new S.SpotLight(q.light,S.Vector3.Zero(),S.Vector3.Zero(),0,0,W.scene);ct.name=q.name||"",lt.color&&(ct.diffuse=S.Color3.FromArray(lt.color)),lt.fallOfAngle&&(ct.angle=lt.fallOfAngle),lt.fallOffExponent&&(ct.exponent=lt.fallOffExponent),me=ct}}}if(!q.jointName){if(q.babylonNode)return q.babylonNode;if(me===null){W.scene._blockEntityCollection=W.forAssetContainer;var mt=new S.Mesh(q.name||"",W.scene);W.scene._blockEntityCollection=!1,q.babylonNode=mt,me=mt}}if(me!==null){if(q.matrix&&me instanceof S.Mesh)(function(Pt,Ot,sn){if(Ot.matrix){var Zt=new S.Vector3(0,0,0),rn=new S.Quaternion,De=new S.Vector3(0,0,0);S.Matrix.FromArray(Ot.matrix).decompose(De,rn,Zt),ee(Pt,Zt,rn,De)}else Ot.translation&&Ot.rotation&&Ot.scale&&ee(Pt,S.Vector3.FromArray(Ot.translation),S.Quaternion.FromArray(Ot.rotation),S.Vector3.FromArray(Ot.scale));Pt.computeWorldMatrix(!0)})(me,q);else{var St=q.translation||[0,0,0],wt=q.rotation||[0,0,0,1],It=q.scale||[1,1,1];ee(me,S.Vector3.FromArray(St),S.Quaternion.FromArray(wt),S.Vector3.FromArray(It))}me.updateCache(!0),q.babylonNode=me}return me},$=function(W,q,he,ge){ge===void 0&&(ge=!1);var me=W.nodes[q],_e=null;if(ge=!(W.importOnlyMeshes&&!ge&&W.importMeshesNames)||W.importMeshesNames.indexOf(me.name||"")!==-1||W.importMeshesNames.length===0,!me.jointName&&ge&&(_e=K(W,me,q))!==null&&(_e.id=q,_e.parent=he),me.children)for(var be=0;be=0?h.substring(0,b):h;E=E.toLowerCase();var D=b>=0?h.substring(b+1).trim():"";E==="newmtl"?(g&&this.materials.push(g),R._blockEntityCollection=c,g=new _.StandardMaterial(D,R),R._blockEntityCollection=!1):E==="kd"&&g?(T=D.split(S,3).map(parseFloat),g.diffuseColor=_.Color3.FromArray(T)):E==="ka"&&g?(T=D.split(S,3).map(parseFloat),g.ambientColor=_.Color3.FromArray(T)):E==="ks"&&g?(T=D.split(S,3).map(parseFloat),g.specularColor=_.Color3.FromArray(T)):E==="ke"&&g?(T=D.split(S,3).map(parseFloat),g.emissiveColor=_.Color3.FromArray(T)):E==="ns"&&g?g.specularPower=parseFloat(D):E==="d"&&g?g.alpha=parseFloat(D):E==="map_ka"&&g?g.ambientTexture=O._getTexture(m,D,R):E==="map_kd"&&g?g.diffuseTexture=O._getTexture(m,D,R):E==="map_ks"&&g?g.specularTexture=O._getTexture(m,D,R):E==="map_ns"||(E==="map_bump"&&g?g.bumpTexture=O._getTexture(m,D,R):E==="map_d"&&g&&(g.opacityTexture=O._getTexture(m,D,R)))}}g&&this.materials.push(g)}},O._getTexture=function(R,x,m){if(!x)return null;var c=R;if(R==="file:"){var T=x.lastIndexOf("\\");T===-1&&(T=x.lastIndexOf("/")),c+=T>-1?x.substr(T+1):x}else c+=x;return new _.Texture(c,m,!1,O.INVERT_TEXTURE_Y)},O.INVERT_TEXTURE_Y=!0,O}(),l=function(){function O(R){this.name="obj",this.extensions=".obj",this.obj=/^o/,this.group=/^g/,this.mtllib=/^mtllib /,this.usemtl=/^usemtl /,this.smooth=/^s /,this.vertexPattern=/v(\s+[\d|\.|\+|\-|e|E]+){3,7}/,this.normalPattern=/vn(\s+[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/,this.uvPattern=/vt(\s+[\d|\.|\+|\-|e|E]+)( +[\d|\.|\+|\-|e|E]+)/,this.facePattern1=/f\s+(([\d]{1,}[\s]?){3,})+/,this.facePattern2=/f\s+((([\d]{1,}\/[\d]{1,}[\s]?){3,})+)/,this.facePattern3=/f\s+((([\d]{1,}\/[\d]{1,}\/[\d]{1,}[\s]?){3,})+)/,this.facePattern4=/f\s+((([\d]{1,}\/\/[\d]{1,}[\s]?){3,})+)/,this.facePattern5=/f\s+(((-[\d]{1,}\/-[\d]{1,}\/-[\d]{1,}[\s]?){3,})+)/,this._forAssetContainer=!1,this._meshLoadOptions=R||O.currentMeshLoadOptions}return Object.defineProperty(O,"INVERT_TEXTURE_Y",{get:function(){return P.INVERT_TEXTURE_Y},set:function(R){P.INVERT_TEXTURE_Y=R},enumerable:!1,configurable:!0}),Object.defineProperty(O,"currentMeshLoadOptions",{get:function(){return{ComputeNormals:O.COMPUTE_NORMALS,ImportVertexColors:O.IMPORT_VERTEX_COLORS,InvertY:O.INVERT_Y,InvertTextureY:O.INVERT_TEXTURE_Y,UVScaling:O.UV_SCALING,MaterialLoadingFailsSilently:O.MATERIAL_LOADING_FAILS_SILENTLY,OptimizeWithUV:O.OPTIMIZE_WITH_UV,SkipMaterials:O.SKIP_MATERIALS}},enumerable:!1,configurable:!0}),O.prototype._loadMTL=function(R,x,m,c){var T=_.Tools.BaseUrl+x+R;_.Tools.LoadFile(T,m,void 0,void 0,!1,function(A,S){c(T,S)})},O.prototype.createPlugin=function(){return new O(O.currentMeshLoadOptions)},O.prototype.canDirectLoad=function(R){return!1},O.prototype.importMeshAsync=function(R,x,m,c,T,A){return this._parseSolid(R,x,m,c).then(function(S){return{meshes:S,particleSystems:[],skeletons:[],animationGroups:[],transformNodes:[],geometries:[],lights:[]}})},O.prototype.loadAsync=function(R,x,m,c,T){return this.importMeshAsync(null,R,x,m,c).then(function(){})},O.prototype.loadAssetContainerAsync=function(R,x,m,c,T){var A=this;return this._forAssetContainer=!0,this.importMeshAsync(null,R,x,m).then(function(S){var g=new _.AssetContainer(R);return S.meshes.forEach(function(u){return g.meshes.push(u)}),S.meshes.forEach(function(u){var h=u.material;h&&g.materials.indexOf(h)==-1&&(g.materials.push(h),h.getActiveTextures().forEach(function(b){g.textures.indexOf(b)==-1&&g.textures.push(b)}))}),A._forAssetContainer=!1,g}).catch(function(S){throw A._forAssetContainer=!1,S})},O.prototype._parseSolid=function(R,x,m,c){for(var T,A=this,S=[],g=[],u=[],h=[],b=[],E=[],D=[],w=[],N=[],I=[],V=[],X=0,j=!1,ne=[],te=[],de=[],pe=[],ae=[],ee="",K="",$=new P,L=1,G=!0,Q=new _.Color4(.5,.5,.5,1),oe=function(ze,it,et,lt,ct,mt,St){var wt;(wt=A._meshLoadOptions.OptimizeWithUV?function(It,Pt){It[Pt[0]]||(It[Pt[0]]={normals:[],idx:[],uv:[]});var Ot=It[Pt[0]].normals.indexOf(Pt[1]);return Ot!=1&&Pt[2]===It[Pt[0]].uv[Ot]?It[Pt[0]].idx[Ot]:-1}(V,[ze,et,it]):function(It,Pt){It[Pt[0]]||(It[Pt[0]]={normals:[],idx:[]});var Ot=It[Pt[0]].normals.indexOf(Pt[1]);return Ot===-1?-1:It[Pt[0]].idx[Ot]}(V,[ze,et]))===-1?(E.push(D.length),D.push(lt),w.push(ct),I.push(mt),St!==void 0&&N.push(St),V[ze].normals.push(et),V[ze].idx.push(X++),A._meshLoadOptions.OptimizeWithUV&&V[ze].uv.push(it)):E.push(wt)},re=function(){for(var ze=0;ze0&&(T=b[b.length-1],re(),E.reverse(),T.indices=E.slice(),T.positions=ne.slice(),T.normals=de.slice(),T.uvs=pe.slice(),A._meshLoadOptions.ImportVertexColors===!0&&(T.colors=te.slice()),E=[],ne=[],te=[],de=[],pe=[])},ge=m.split(` -`),me=0;me=7?h.push(new _.Color4(parseFloat(_e[4]),parseFloat(_e[5]),parseFloat(_e[6]),_e.length===7||_e[7]===void 0?1:parseFloat(_e[7]))):h.push(Q));else if((_e=this.normalPattern.exec(be))!==null)g.push(new _.Vector3(parseFloat(_e[1]),parseFloat(_e[2]),parseFloat(_e[3])));else if((_e=this.uvPattern.exec(be))!==null)u.push(new _.Vector2(parseFloat(_e[1])*O.UV_SCALING.x,parseFloat(_e[2])*O.UV_SCALING.y));else if((_e=this.facePattern3.exec(be))!==null)Z(_e[1].trim().split(" "),1);else if((_e=this.facePattern4.exec(be))!==null)W(_e[1].trim().split(" "),1);else if((_e=this.facePattern5.exec(be))!==null)q(_e[1].trim().split(" "),1);else if((_e=this.facePattern2.exec(be))!==null)H(_e[1].trim().split(" "),1);else if((_e=this.facePattern1.exec(be))!==null)k(_e[1].trim().split(" "),1);else if(this.group.test(be)||this.obj.test(be)){var Ce={name:be.substring(2).trim(),indices:void 0,positions:void 0,normals:void 0,uvs:void 0,colors:void 0,materialName:""};he(),b.push(Ce),j=!0,G=!0,L=1}else this.usemtl.test(be)?(ee=be.substring(7).trim(),(!G||!j)&&(he(),Ce={name:"mesh_mm"+L.toString(),indices:void 0,positions:void 0,normals:void 0,uvs:void 0,colors:void 0,materialName:ee},L++,b.push(Ce),j=!0),j&&G&&(b[b.length-1].materialName=ee,G=!1)):this.mtllib.test(be)?K=be.substring(7).trim():this.smooth.test(be)||console.log("Unhandled expression at line : "+be)}j&&(T=b[b.length-1],E.reverse(),re(),T.indices=E,T.positions=ne,T.normals=de,T.uvs=pe,this._meshLoadOptions.ImportVertexColors===!0&&(T.colors=te)),j||(E.reverse(),re(),b.push({name:_.Geometry.RandomId(),indices:E,positions:ne,colors:te,normals:de,uvs:pe,materialName:ee}));for(var ye=[],Ue=new Array,Ge=0;Ge-1;)St.push(ct),mt=ct+1;if(ct===-1&&St.length===0)$.materials[lt].dispose();else for(var wt=0;wt127)return!0;return!1},l.prototype._parseBinary=function(O,R){for(var x=new DataView(R),m=x.getUint32(80,!0),c=0,T=new Float32Array(3*m*3),A=new Float32Array(3*m*3),S=new Uint32Array(3*m),g=0,u=0;u-1||(x.GLTF2[c]=O[c])}}).call(this,B(5))},function(v,f,B){B.r(f),function(_){var P=B(10);B.d(f,"MTLFileLoader",function(){return P.MTLFileLoader}),B.d(f,"OBJFileLoader",function(){return P.OBJFileLoader});var l=_!==void 0?_:typeof window<"u"?window:void 0;if(l!==void 0)for(var O in P)l.BABYLON[O]=P[O]}.call(this,B(5))},function(v,f,B){B.r(f),function(_){var P=B(11);B.d(f,"STLFileLoader",function(){return P.STLFileLoader});var l=_!==void 0?_:typeof window<"u"?window:void 0;if(l!==void 0)for(var O in P)l.BABYLON[O]=P[O]}.call(this,B(5))},,,,function(v,f,B){B.r(f),B.d(f,"GLTFLoaderCoordinateSystemMode",function(){return _.c}),B.d(f,"GLTFLoaderAnimationStartMode",function(){return _.b}),B.d(f,"GLTFLoaderState",function(){return _.d}),B.d(f,"GLTFFileLoader",function(){return _.a}),B.d(f,"GLTFValidation",function(){return _.e}),B.d(f,"GLTF1",function(){return P.a}),B.d(f,"GLTF2",function(){return l.a}),B.d(f,"MTLFileLoader",function(){return O.MTLFileLoader}),B.d(f,"OBJFileLoader",function(){return O.OBJFileLoader}),B.d(f,"STLFileLoader",function(){return R.STLFileLoader}),B(2),B(3),B(8),B(9),B(10),B(11);var _=B(12),P=B(13),l=B(14),O=B(15),R=B(16)}])})})(Bf);var Uf=Bf.exports;function Cf(Qe){let Be,Ae,v,f,B,_,P,l,O;return f=new zv({props:{Icon:jv,label:"Download"}}),{c(){Be=qr("div"),Ae=qr("div"),v=qr("a"),An(f.$$.fragment),P=dr(),l=qr("canvas"),Ti(v,"href",B=Qe[0].data),Ti(v,"target",window.__is_colab__?"_blank":null),Ti(v,"download",_=window.__is_colab__?null:Qe[0].orig_name||Qe[0].name),Ti(Ae,"class","download svelte-14ct53h"),Ti(l,"class","svelte-14ct53h"),Ti(Be,"class","model3D svelte-14ct53h")},m(R,x){fi(R,Be,x),Zr(Be,Ae),Zr(Ae,v),Pn(f,v,null),Zr(Be,P),Zr(Be,l),Qe[5](l),O=!0},p(R,x){(!O||x&1&&B!==(B=R[0].data))&&Ti(v,"href",B),(!O||x&1&&_!==(_=window.__is_colab__?null:R[0].orig_name||R[0].name))&&Ti(v,"download",_)},i(R){O||(en(f.$$.fragment,R),O=!0)},o(R){tn(f.$$.fragment,R),O=!1},d(R){R&&pi(Be),Cn(f),Qe[5](null)}}}function Yv(Qe){let Be,Ae,v,f;Be=new pl({props:{show_label:Qe[2],Icon:qa,label:Qe[1]||"3D Model"}});let B=Qe[0]&&Cf(Qe);return{c(){An(Be.$$.fragment),Ae=dr(),B&&B.c(),v=Ya()},m(_,P){Pn(Be,_,P),fi(_,Ae,P),B&&B.m(_,P),fi(_,v,P),f=!0},p(_,[P]){const l={};P&4&&(l.show_label=_[2]),P&2&&(l.label=_[1]||"3D Model"),Be.$set(l),_[0]?B?(B.p(_,P),P&1&&en(B,1)):(B=Cf(_),B.c(),en(B,1),B.m(v.parentNode,v)):B&&(Ka(),tn(B,1,1,()=>{B=null}),Qa())},i(_){f||(en(Be.$$.fragment,_),en(B),f=!0)},o(_){tn(Be.$$.fragment,_),tn(B),f=!1},d(_){_&&(pi(Ae),pi(v)),Cn(Be,_),B&&B.d(_)}}}function Kv(Qe,Be,Ae){let{value:v}=Be,{clearColor:f=[0,0,0,0]}=Be,{label:B=""}=Be,{show_label:_}=Be;Uf.OBJFileLoader.IMPORT_VERTEX_COLORS=!0;let P,l,O;xf(()=>{O=new ei.Engine(P,!0),window.addEventListener("resize",()=>{O?.resize()})}),Rf(()=>{l&&!l.isDisposed&&(l.dispose(),O?.stopRenderLoop(),O?.dispose(),O=null,O=new ei.Engine(P,!0),window.addEventListener("resize",()=>{O?.resize()})),R()});function R(){if(l=new ei.Scene(O),l.createDefaultCameraOrLight(),l.clearColor=new ei.Color4(...f),O?.runRenderLoop(()=>{l.render()}),!v)return;let m;if(v.is_file)m=v.data;else{let c=v.data,T=ei.Tools.DecodeBase64(c),A=new Blob([T]);m=URL.createObjectURL(A)}ei.SceneLoader.Append("",m,l,()=>{l.createDefaultCamera(!0,!0,!0)},void 0,void 0,"."+v.name.split(".")[1])}function x(m){Bo[m?"unshift":"push"](()=>{P=m,Ae(3,P)})}return Qe.$$set=m=>{"value"in m&&Ae(0,v=m.value),"clearColor"in m&&Ae(4,f=m.clearColor),"label"in m&&Ae(1,B=m.label),"show_label"in m&&Ae(2,_=m.show_label)},[v,B,_,P,f,x]}let Qv=class extends No{constructor(Be){super(),wo(this,Be,Kv,Yv,Fo,{value:0,clearColor:4,label:1,show_label:2})}};function qv(Qe){let Be,Ae,v,f;return Be=new pl({props:{show_label:Qe[7],Icon:qa,label:Qe[6]||"3D Model"}}),v=new Gv({props:{unpadded_box:!0,size:"large",$$slots:{default:[Jv]},$$scope:{ctx:Qe}}}),{c(){An(Be.$$.fragment),Ae=dr(),An(v.$$.fragment)},m(B,_){Pn(Be,B,_),fi(B,Ae,_),Pn(v,B,_),f=!0},p(B,_){const P={};_&128&&(P.show_label=B[7]),_&64&&(P.label=B[6]||"3D Model"),Be.$set(P);const l={};_&16384&&(l.$$scope={dirty:_,ctx:B}),v.$set(l)},i(B){f||(en(Be.$$.fragment,B),en(v.$$.fragment,B),f=!0)},o(B){tn(Be.$$.fragment,B),tn(v.$$.fragment,B),f=!1},d(B){B&&pi(Ae),Cn(Be,B),Cn(v,B)}}}function Zv(Qe){let Be,Ae;return Be=new Qv({props:{value:Qe[11],clearColor:Qe[4],label:Qe[6],show_label:Qe[7]}}),{c(){An(Be.$$.fragment)},m(v,f){Pn(Be,v,f),Ae=!0},p(v,f){const B={};f&2048&&(B.value=v[11]),f&16&&(B.clearColor=v[4]),f&64&&(B.label=v[6]),f&128&&(B.show_label=v[7]),Be.$set(B)},i(v){Ae||(en(Be.$$.fragment,v),Ae=!0)},o(v){tn(Be.$$.fragment,v),Ae=!1},d(v){Cn(Be,v)}}}function Jv(Qe){let Be,Ae;return Be=new qa({}),{c(){An(Be.$$.fragment)},m(v,f){Pn(Be,v,f),Ae=!0},i(v){Ae||(en(Be.$$.fragment,v),Ae=!0)},o(v){tn(Be.$$.fragment,v),Ae=!1},d(v){Cn(Be,v)}}}function $v(Qe){let Be,Ae,v,f,B,_;const P=[Qe[5]];let l={};for(let m=0;m{R[A]=null}),Qa(),f=R[v],f?f.p(m,c):(f=R[v]=O[v](m),f.c()),en(f,1),f.m(B.parentNode,B))},i(m){_||(en(Be.$$.fragment,m),en(f),_=!0)},o(m){tn(Be.$$.fragment,m),tn(f),_=!1},d(m){m&&(pi(Ae),pi(B)),Cn(Be,m),R[v].d(m)}}}function eb(Qe){let Be,Ae;return Be=new wf({props:{visible:Qe[2],variant:Qe[3]===null?"dashed":"solid",border_mode:"base",padding:!1,elem_id:Qe[0],elem_classes:Qe[1],container:Qe[8],scale:Qe[9],min_width:Qe[10],$$slots:{default:[$v]},$$scope:{ctx:Qe}}}),{c(){An(Be.$$.fragment)},m(v,f){Pn(Be,v,f),Ae=!0},p(v,[f]){const B={};f&4&&(B.visible=v[2]),f&8&&(B.variant=v[3]===null?"dashed":"solid"),f&1&&(B.elem_id=v[0]),f&2&&(B.elem_classes=v[1]),f&256&&(B.container=v[8]),f&512&&(B.scale=v[9]),f&1024&&(B.min_width=v[10]),f&18680&&(B.$$scope={dirty:f,ctx:v}),Be.$set(B)},i(v){Ae||(en(Be.$$.fragment,v),Ae=!0)},o(v){tn(Be.$$.fragment,v),Ae=!1},d(v){Cn(Be,v)}}}function tb(Qe,Be,Ae){let{elem_id:v=""}=Be,{elem_classes:f=[]}=Be,{visible:B=!0}=Be,{value:_=null}=Be,{root:P}=Be,{root_url:l}=Be,{clearColor:O}=Be,{loading_status:R}=Be,{label:x}=Be,{show_label:m}=Be,{container:c=!0}=Be,{scale:T=null}=Be,{min_width:A=void 0}=Be,S;return Qe.$$set=g=>{"elem_id"in g&&Ae(0,v=g.elem_id),"elem_classes"in g&&Ae(1,f=g.elem_classes),"visible"in g&&Ae(2,B=g.visible),"value"in g&&Ae(3,_=g.value),"root"in g&&Ae(12,P=g.root),"root_url"in g&&Ae(13,l=g.root_url),"clearColor"in g&&Ae(4,O=g.clearColor),"loading_status"in g&&Ae(5,R=g.loading_status),"label"in g&&Ae(6,x=g.label),"show_label"in g&&Ae(7,m=g.show_label),"container"in g&&Ae(8,c=g.container),"scale"in g&&Ae(9,T=g.scale),"min_width"in g&&Ae(10,A=g.min_width)},Qe.$$.update=()=>{Qe.$$.dirty&12296&&Ae(11,S=Nf(_,P,l))},[v,f,B,_,O,R,x,m,c,T,A,S,P,l]}class nb extends No{constructor(Be){super(),wo(this,Be,tb,eb,Fo,{elem_id:0,elem_classes:1,visible:2,value:3,root:12,root_url:13,clearColor:4,loading_status:5,label:6,show_label:7,container:8,scale:9,min_width:10})}}function ib(Qe){let Be,Ae,v,f,B;return Ae=new Xv({props:{absolute:!0}}),Ae.$on("clear",Qe[6]),{c(){Be=qr("div"),An(Ae.$$.fragment),v=dr(),f=qr("canvas"),Ti(f,"class","svelte-wn75i6"),Ti(Be,"class","input-model svelte-wn75i6")},m(_,P){fi(_,Be,P),Pn(Ae,Be,null),Zr(Be,v),Zr(Be,f),Qe[10](f),B=!0},p:Lf,i(_){B||(en(Ae.$$.fragment,_),B=!0)},o(_){tn(Ae.$$.fragment,_),B=!1},d(_){_&&pi(Be),Cn(Ae),Qe[10](null)}}}function rb(Qe){let Be,Ae,v;function f(_){Qe[9](_)}let B={filetype:".obj, .gltf, .glb",$$slots:{default:[ob]},$$scope:{ctx:Qe}};return Qe[3]!==void 0&&(B.dragging=Qe[3]),Be=new Wv({props:B}),Bo.push(()=>dl(Be,"dragging",f)),Be.$on("load",Qe[5]),{c(){An(Be.$$.fragment)},m(_,P){Pn(Be,_,P),v=!0},p(_,P){const l={};P&2048&&(l.$$scope={dirty:P,ctx:_}),!Ae&&P&8&&(Ae=!0,l.dragging=_[3],fl(()=>Ae=!1)),Be.$set(l)},i(_){v||(en(Be.$$.fragment,_),v=!0)},o(_){tn(Be.$$.fragment,_),v=!1},d(_){Cn(Be,_)}}}function ob(Qe){let Be;const Ae=Qe[8].default,v=Bv(Ae,Qe,Qe[11],null);return{c(){v&&v.c()},m(f,B){v&&v.m(f,B),Be=!0},p(f,B){v&&v.p&&(!Be||B&2048)&&Uv(v,Ae,f,f[11],Be?kv(Ae,f[11],B,null):Vv(f[11]),null)},i(f){Be||(en(v,f),Be=!0)},o(f){tn(v,f),Be=!1},d(f){v&&v.d(f)}}}function ab(Qe){let Be,Ae,v,f,B,_;Be=new pl({props:{show_label:Qe[2],Icon:qa,label:Qe[1]||"3D Model"}});const P=[rb,ib],l=[];function O(R,x){return R[0]===null?0:1}return v=O(Qe),f=l[v]=P[v](Qe),{c(){An(Be.$$.fragment),Ae=dr(),f.c(),B=Ya()},m(R,x){Pn(Be,R,x),fi(R,Ae,x),l[v].m(R,x),fi(R,B,x),_=!0},p(R,[x]){const m={};x&4&&(m.show_label=R[2]),x&2&&(m.label=R[1]||"3D Model"),Be.$set(m);let c=v;v=O(R),v===c?l[v].p(R,x):(Ka(),tn(l[c],1,1,()=>{l[c]=null}),Qa(),f=l[v],f?f.p(R,x):(f=l[v]=P[v](R),f.c()),en(f,1),f.m(B.parentNode,B))},i(R){_||(en(Be.$$.fragment,R),en(f),_=!0)},o(R){tn(Be.$$.fragment,R),tn(f),_=!1},d(R){R&&(pi(Ae),pi(B)),Cn(Be,R),l[v].d(R)}}}function sb(Qe,Be,Ae){let{$$slots:v={},$$scope:f}=Be,{value:B}=Be,{clearColor:_=[0,0,0,0]}=Be,{label:P=""}=Be,{show_label:l}=Be;xf(()=>{B!=null&&S()}),Rf(()=>{B!=null&&B.is_file&&S()});async function O({detail:h}){Ae(0,B=h),await Pf(),x("change",B),S()}async function R(){T&&A&&(T.dispose(),A.dispose()),Ae(0,B=null),await Pf(),x("clear")}const x=Fv();let m=!1;Uf.OBJFileLoader.IMPORT_VERTEX_COLORS=!0;let c,T,A;function S(){if(T&&!T.isDisposed&&A&&(T.dispose(),A.dispose()),A=new ei.Engine(c,!0),T=new ei.Scene(A),T.createDefaultCameraOrLight(),T.clearColor=T.clearColor=new ei.Color4(..._),A.runRenderLoop(()=>{T.render()}),window.addEventListener("resize",()=>{A.resize()}),!B)return;let h;if(B.is_file)h=B.data;else{let b=B.data,E=ei.Tools.DecodeBase64(b),D=new Blob([E]);h=URL.createObjectURL(D)}ei.SceneLoader.Append(h,"",T,()=>{T.createDefaultCamera(!0,!0,!0)},void 0,void 0,"."+B.name.split(".")[1])}function g(h){m=h,Ae(3,m)}function u(h){Bo[h?"unshift":"push"](()=>{c=h,Ae(4,c)})}return Qe.$$set=h=>{"value"in h&&Ae(0,B=h.value),"clearColor"in h&&Ae(7,_=h.clearColor),"label"in h&&Ae(1,P=h.label),"show_label"in h&&Ae(2,l=h.show_label),"$$scope"in h&&Ae(11,f=h.$$scope)},Qe.$$.update=()=>{Qe.$$.dirty&8&&x("drag",m)},[B,P,l,m,c,O,R,_,v,g,u,f]}class cb extends No{constructor(Be){super(),wo(this,Be,sb,ab,Fo,{value:0,clearColor:7,label:1,show_label:2})}}function lb(Qe){let Be,Ae;return Be=new Hv({props:{type:"file"}}),{c(){An(Be.$$.fragment)},m(v,f){Pn(Be,v,f),Ae=!0},p:Lf,i(v){Ae||(en(Be.$$.fragment,v),Ae=!0)},o(v){tn(Be.$$.fragment,v),Ae=!1},d(v){Cn(Be,v)}}}function ub(Qe){let Be,Ae,v,f;const B=[Qe[5]];let _={};for(let P=0;PAe(0,_=D),h=({detail:D})=>Ae(12,g=D);function b(D){Jr.call(this,Qe,D)}function E(D){Jr.call(this,Qe,D)}return Qe.$$set=D=>{"elem_id"in D&&Ae(1,v=D.elem_id),"elem_classes"in D&&Ae(2,f=D.elem_classes),"visible"in D&&Ae(3,B=D.visible),"value"in D&&Ae(0,_=D.value),"root"in D&&Ae(13,P=D.root),"root_url"in D&&Ae(14,l=D.root_url),"clearColor"in D&&Ae(4,O=D.clearColor),"loading_status"in D&&Ae(5,R=D.loading_status),"label"in D&&Ae(6,x=D.label),"show_label"in D&&Ae(7,m=D.show_label),"container"in D&&Ae(8,c=D.container),"scale"in D&&Ae(9,T=D.scale),"min_width"in D&&Ae(10,A=D.min_width)},Qe.$$.update=()=>{Qe.$$.dirty&24577&&Ae(11,S=Nf(_,P,l))},[_,v,f,B,O,R,x,m,c,T,A,S,g,P,l,u,h,b,E]}class fb extends No{constructor(Be){super(),wo(this,Be,db,hb,Fo,{elem_id:1,elem_classes:2,visible:3,value:0,root:13,root_url:14,clearColor:4,loading_status:5,label:6,show_label:7,container:8,scale:9,min_width:10})}}function pb(Qe){let Be,Ae,v;function f(_){Qe[17](_)}let B={elem_id:Qe[1],elem_classes:Qe[2],visible:Qe[3],root:Qe[5],root_url:Qe[6],clearColor:Qe[7],loading_status:Qe[8],label:Qe[9],show_label:Qe[10],container:Qe[11],scale:Qe[12],min_width:Qe[13]};return Qe[0]!==void 0&&(B.value=Qe[0]),Be=new fb({props:B}),Bo.push(()=>dl(Be,"value",f)),Be.$on("change",Qe[18]),Be.$on("clear",Qe[19]),{c(){An(Be.$$.fragment)},m(_,P){Pn(Be,_,P),v=!0},p(_,P){const l={};P&2&&(l.elem_id=_[1]),P&4&&(l.elem_classes=_[2]),P&8&&(l.visible=_[3]),P&32&&(l.root=_[5]),P&64&&(l.root_url=_[6]),P&128&&(l.clearColor=_[7]),P&256&&(l.loading_status=_[8]),P&512&&(l.label=_[9]),P&1024&&(l.show_label=_[10]),P&2048&&(l.container=_[11]),P&4096&&(l.scale=_[12]),P&8192&&(l.min_width=_[13]),!Ae&&P&1&&(Ae=!0,l.value=_[0],fl(()=>Ae=!1)),Be.$set(l)},i(_){v||(en(Be.$$.fragment,_),v=!0)},o(_){tn(Be.$$.fragment,_),v=!1},d(_){Cn(Be,_)}}}function _b(Qe){let Be,Ae,v;function f(_){Qe[14](_)}let B={elem_id:Qe[1],elem_classes:Qe[2],visible:Qe[3],root:Qe[5],root_url:Qe[6],clearColor:Qe[7],loading_status:Qe[8],label:Qe[9],show_label:Qe[10],container:Qe[11],scale:Qe[12],min_width:Qe[13]};return Qe[0]!==void 0&&(B.value=Qe[0]),Be=new nb({props:B}),Bo.push(()=>dl(Be,"value",f)),Be.$on("change",Qe[15]),Be.$on("clear",Qe[16]),{c(){An(Be.$$.fragment)},m(_,P){Pn(Be,_,P),v=!0},p(_,P){const l={};P&2&&(l.elem_id=_[1]),P&4&&(l.elem_classes=_[2]),P&8&&(l.visible=_[3]),P&32&&(l.root=_[5]),P&64&&(l.root_url=_[6]),P&128&&(l.clearColor=_[7]),P&256&&(l.loading_status=_[8]),P&512&&(l.label=_[9]),P&1024&&(l.show_label=_[10]),P&2048&&(l.container=_[11]),P&4096&&(l.scale=_[12]),P&8192&&(l.min_width=_[13]),!Ae&&P&1&&(Ae=!0,l.value=_[0],fl(()=>Ae=!1)),Be.$set(l)},i(_){v||(en(Be.$$.fragment,_),v=!0)},o(_){tn(Be.$$.fragment,_),v=!1},d(_){Cn(Be,_)}}}function mb(Qe){let Be,Ae,v,f;const B=[_b,pb],_=[];function P(l,O){return l[4]==="static"?0:1}return Be=P(Qe),Ae=_[Be]=B[Be](Qe),{c(){Ae.c(),v=Ya()},m(l,O){_[Be].m(l,O),fi(l,v,O),f=!0},p(l,[O]){let R=Be;Be=P(l),Be===R?_[Be].p(l,O):(Ka(),tn(_[R],1,1,()=>{_[R]=null}),Qa(),Ae=_[Be],Ae?Ae.p(l,O):(Ae=_[Be]=B[Be](l),Ae.c()),en(Ae,1),Ae.m(v.parentNode,v))},i(l){f||(en(Ae),f=!0)},o(l){tn(Ae),f=!1},d(l){l&&pi(v),_[Be].d(l)}}}function gb(Qe,Be,Ae){let{elem_id:v=""}=Be,{elem_classes:f=[]}=Be,{visible:B=!0}=Be,{value:_=null}=Be,{mode:P}=Be,{root:l}=Be,{root_url:O}=Be,{clearColor:R}=Be,{loading_status:x}=Be,{label:m}=Be,{show_label:c}=Be,{container:T=!0}=Be,{scale:A=null}=Be,{min_width:S=void 0}=Be;function g(w){_=w,Ae(0,_)}function u(w){Jr.call(this,Qe,w)}function h(w){Jr.call(this,Qe,w)}function b(w){_=w,Ae(0,_)}function E(w){Jr.call(this,Qe,w)}function D(w){Jr.call(this,Qe,w)}return Qe.$$set=w=>{"elem_id"in w&&Ae(1,v=w.elem_id),"elem_classes"in w&&Ae(2,f=w.elem_classes),"visible"in w&&Ae(3,B=w.visible),"value"in w&&Ae(0,_=w.value),"mode"in w&&Ae(4,P=w.mode),"root"in w&&Ae(5,l=w.root),"root_url"in w&&Ae(6,O=w.root_url),"clearColor"in w&&Ae(7,R=w.clearColor),"loading_status"in w&&Ae(8,x=w.loading_status),"label"in w&&Ae(9,m=w.label),"show_label"in w&&Ae(10,c=w.show_label),"container"in w&&Ae(11,T=w.container),"scale"in w&&Ae(12,A=w.scale),"min_width"in w&&Ae(13,S=w.min_width)},[_,v,f,B,P,l,O,R,x,m,c,T,A,S,g,u,h,b,E,D]}class vb extends No{constructor(Be){super(),wo(this,Be,gb,mb,Fo,{elem_id:1,elem_classes:2,visible:3,value:0,mode:4,root:5,root_url:6,clearColor:7,loading_status:8,label:9,show_label:10,container:11,scale:12,min_width:13})}}const Ib=vb,Db=["static","dynamic"];export{Ib as Component,wb as ExampleComponent,Db as modes}; -//# sourceMappingURL=index-8e74b63c.js.map diff --git a/spaces/declare-lab/tango/diffusers/scripts/convert_kakao_brain_unclip_to_diffusers.py b/spaces/declare-lab/tango/diffusers/scripts/convert_kakao_brain_unclip_to_diffusers.py deleted file mode 100644 index 85d983dea686f26d0196be94c3ef35496161eb24..0000000000000000000000000000000000000000 --- a/spaces/declare-lab/tango/diffusers/scripts/convert_kakao_brain_unclip_to_diffusers.py +++ /dev/null @@ -1,1159 +0,0 @@ -import argparse -import tempfile - -import torch -from accelerate import load_checkpoint_and_dispatch -from transformers import CLIPTextModelWithProjection, CLIPTokenizer - -from diffusers import UnCLIPPipeline, UNet2DConditionModel, UNet2DModel -from diffusers.models.prior_transformer import PriorTransformer -from diffusers.pipelines.unclip.text_proj import UnCLIPTextProjModel -from diffusers.schedulers.scheduling_unclip import UnCLIPScheduler - - -""" -Example - From the diffusers root directory: - -Download weights: -```sh -$ wget https://arena.kakaocdn.net/brainrepo/models/karlo-public/v1.0.0.alpha/efdf6206d8ed593961593dc029a8affa/decoder-ckpt-step%3D01000000-of-01000000.ckpt -$ wget https://arena.kakaocdn.net/brainrepo/models/karlo-public/v1.0.0.alpha/4226b831ae0279020d134281f3c31590/improved-sr-ckpt-step%3D1.2M.ckpt -$ wget https://arena.kakaocdn.net/brainrepo/models/karlo-public/v1.0.0.alpha/85626483eaca9f581e2a78d31ff905ca/prior-ckpt-step%3D01000000-of-01000000.ckpt -$ wget https://arena.kakaocdn.net/brainrepo/models/karlo-public/v1.0.0.alpha/0b62380a75e56f073e2844ab5199153d/ViT-L-14_stats.th -``` - -Convert the model: -```sh -$ python scripts/convert_kakao_brain_unclip_to_diffusers.py \ - --decoder_checkpoint_path ./decoder-ckpt-step\=01000000-of-01000000.ckpt \ - --super_res_unet_checkpoint_path ./improved-sr-ckpt-step\=1.2M.ckpt \ - --prior_checkpoint_path ./prior-ckpt-step\=01000000-of-01000000.ckpt \ - --clip_stat_path ./ViT-L-14_stats.th \ - --dump_path -``` -""" - - -# prior - -PRIOR_ORIGINAL_PREFIX = "model" - -# Uses default arguments -PRIOR_CONFIG = {} - - -def prior_model_from_original_config(): - model = PriorTransformer(**PRIOR_CONFIG) - - return model - - -def prior_original_checkpoint_to_diffusers_checkpoint(model, checkpoint, clip_stats_checkpoint): - diffusers_checkpoint = {} - - # .time_embed.0 -> .time_embedding.linear_1 - diffusers_checkpoint.update( - { - "time_embedding.linear_1.weight": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.time_embed.0.weight"], - "time_embedding.linear_1.bias": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.time_embed.0.bias"], - } - ) - - # .clip_img_proj -> .proj_in - diffusers_checkpoint.update( - { - "proj_in.weight": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.clip_img_proj.weight"], - "proj_in.bias": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.clip_img_proj.bias"], - } - ) - - # .text_emb_proj -> .embedding_proj - diffusers_checkpoint.update( - { - "embedding_proj.weight": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.text_emb_proj.weight"], - "embedding_proj.bias": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.text_emb_proj.bias"], - } - ) - - # .text_enc_proj -> .encoder_hidden_states_proj - diffusers_checkpoint.update( - { - "encoder_hidden_states_proj.weight": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.text_enc_proj.weight"], - "encoder_hidden_states_proj.bias": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.text_enc_proj.bias"], - } - ) - - # .positional_embedding -> .positional_embedding - diffusers_checkpoint.update({"positional_embedding": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.positional_embedding"]}) - - # .prd_emb -> .prd_embedding - diffusers_checkpoint.update({"prd_embedding": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.prd_emb"]}) - - # .time_embed.2 -> .time_embedding.linear_2 - diffusers_checkpoint.update( - { - "time_embedding.linear_2.weight": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.time_embed.2.weight"], - "time_embedding.linear_2.bias": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.time_embed.2.bias"], - } - ) - - # .resblocks. -> .transformer_blocks. - for idx in range(len(model.transformer_blocks)): - diffusers_transformer_prefix = f"transformer_blocks.{idx}" - original_transformer_prefix = f"{PRIOR_ORIGINAL_PREFIX}.transformer.resblocks.{idx}" - - # .attn -> .attn1 - diffusers_attention_prefix = f"{diffusers_transformer_prefix}.attn1" - original_attention_prefix = f"{original_transformer_prefix}.attn" - diffusers_checkpoint.update( - prior_attention_to_diffusers( - checkpoint, - diffusers_attention_prefix=diffusers_attention_prefix, - original_attention_prefix=original_attention_prefix, - attention_head_dim=model.attention_head_dim, - ) - ) - - # .mlp -> .ff - diffusers_ff_prefix = f"{diffusers_transformer_prefix}.ff" - original_ff_prefix = f"{original_transformer_prefix}.mlp" - diffusers_checkpoint.update( - prior_ff_to_diffusers( - checkpoint, diffusers_ff_prefix=diffusers_ff_prefix, original_ff_prefix=original_ff_prefix - ) - ) - - # .ln_1 -> .norm1 - diffusers_checkpoint.update( - { - f"{diffusers_transformer_prefix}.norm1.weight": checkpoint[ - f"{original_transformer_prefix}.ln_1.weight" - ], - f"{diffusers_transformer_prefix}.norm1.bias": checkpoint[f"{original_transformer_prefix}.ln_1.bias"], - } - ) - - # .ln_2 -> .norm3 - diffusers_checkpoint.update( - { - f"{diffusers_transformer_prefix}.norm3.weight": checkpoint[ - f"{original_transformer_prefix}.ln_2.weight" - ], - f"{diffusers_transformer_prefix}.norm3.bias": checkpoint[f"{original_transformer_prefix}.ln_2.bias"], - } - ) - - # .final_ln -> .norm_out - diffusers_checkpoint.update( - { - "norm_out.weight": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.final_ln.weight"], - "norm_out.bias": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.final_ln.bias"], - } - ) - - # .out_proj -> .proj_to_clip_embeddings - diffusers_checkpoint.update( - { - "proj_to_clip_embeddings.weight": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.out_proj.weight"], - "proj_to_clip_embeddings.bias": checkpoint[f"{PRIOR_ORIGINAL_PREFIX}.out_proj.bias"], - } - ) - - # clip stats - clip_mean, clip_std = clip_stats_checkpoint - clip_mean = clip_mean[None, :] - clip_std = clip_std[None, :] - - diffusers_checkpoint.update({"clip_mean": clip_mean, "clip_std": clip_std}) - - return diffusers_checkpoint - - -def prior_attention_to_diffusers( - checkpoint, *, diffusers_attention_prefix, original_attention_prefix, attention_head_dim -): - diffusers_checkpoint = {} - - # .c_qkv -> .{to_q, to_k, to_v} - [q_weight, k_weight, v_weight], [q_bias, k_bias, v_bias] = split_attentions( - weight=checkpoint[f"{original_attention_prefix}.c_qkv.weight"], - bias=checkpoint[f"{original_attention_prefix}.c_qkv.bias"], - split=3, - chunk_size=attention_head_dim, - ) - - diffusers_checkpoint.update( - { - f"{diffusers_attention_prefix}.to_q.weight": q_weight, - f"{diffusers_attention_prefix}.to_q.bias": q_bias, - f"{diffusers_attention_prefix}.to_k.weight": k_weight, - f"{diffusers_attention_prefix}.to_k.bias": k_bias, - f"{diffusers_attention_prefix}.to_v.weight": v_weight, - f"{diffusers_attention_prefix}.to_v.bias": v_bias, - } - ) - - # .c_proj -> .to_out.0 - diffusers_checkpoint.update( - { - f"{diffusers_attention_prefix}.to_out.0.weight": checkpoint[f"{original_attention_prefix}.c_proj.weight"], - f"{diffusers_attention_prefix}.to_out.0.bias": checkpoint[f"{original_attention_prefix}.c_proj.bias"], - } - ) - - return diffusers_checkpoint - - -def prior_ff_to_diffusers(checkpoint, *, diffusers_ff_prefix, original_ff_prefix): - diffusers_checkpoint = { - # .c_fc -> .net.0.proj - f"{diffusers_ff_prefix}.net.{0}.proj.weight": checkpoint[f"{original_ff_prefix}.c_fc.weight"], - f"{diffusers_ff_prefix}.net.{0}.proj.bias": checkpoint[f"{original_ff_prefix}.c_fc.bias"], - # .c_proj -> .net.2 - f"{diffusers_ff_prefix}.net.{2}.weight": checkpoint[f"{original_ff_prefix}.c_proj.weight"], - f"{diffusers_ff_prefix}.net.{2}.bias": checkpoint[f"{original_ff_prefix}.c_proj.bias"], - } - - return diffusers_checkpoint - - -# done prior - - -# decoder - -DECODER_ORIGINAL_PREFIX = "model" - -# We are hardcoding the model configuration for now. If we need to generalize to more model configurations, we can -# update then. -DECODER_CONFIG = { - "sample_size": 64, - "layers_per_block": 3, - "down_block_types": ( - "ResnetDownsampleBlock2D", - "SimpleCrossAttnDownBlock2D", - "SimpleCrossAttnDownBlock2D", - "SimpleCrossAttnDownBlock2D", - ), - "up_block_types": ( - "SimpleCrossAttnUpBlock2D", - "SimpleCrossAttnUpBlock2D", - "SimpleCrossAttnUpBlock2D", - "ResnetUpsampleBlock2D", - ), - "mid_block_type": "UNetMidBlock2DSimpleCrossAttn", - "block_out_channels": (320, 640, 960, 1280), - "in_channels": 3, - "out_channels": 6, - "cross_attention_dim": 1536, - "class_embed_type": "identity", - "attention_head_dim": 64, - "resnet_time_scale_shift": "scale_shift", -} - - -def decoder_model_from_original_config(): - model = UNet2DConditionModel(**DECODER_CONFIG) - - return model - - -def decoder_original_checkpoint_to_diffusers_checkpoint(model, checkpoint): - diffusers_checkpoint = {} - - original_unet_prefix = DECODER_ORIGINAL_PREFIX - num_head_channels = DECODER_CONFIG["attention_head_dim"] - - diffusers_checkpoint.update(unet_time_embeddings(checkpoint, original_unet_prefix)) - diffusers_checkpoint.update(unet_conv_in(checkpoint, original_unet_prefix)) - - # .input_blocks -> .down_blocks - - original_down_block_idx = 1 - - for diffusers_down_block_idx in range(len(model.down_blocks)): - checkpoint_update, num_original_down_blocks = unet_downblock_to_diffusers_checkpoint( - model, - checkpoint, - diffusers_down_block_idx=diffusers_down_block_idx, - original_down_block_idx=original_down_block_idx, - original_unet_prefix=original_unet_prefix, - num_head_channels=num_head_channels, - ) - - original_down_block_idx += num_original_down_blocks - - diffusers_checkpoint.update(checkpoint_update) - - # done .input_blocks -> .down_blocks - - diffusers_checkpoint.update( - unet_midblock_to_diffusers_checkpoint( - model, - checkpoint, - original_unet_prefix=original_unet_prefix, - num_head_channels=num_head_channels, - ) - ) - - # .output_blocks -> .up_blocks - - original_up_block_idx = 0 - - for diffusers_up_block_idx in range(len(model.up_blocks)): - checkpoint_update, num_original_up_blocks = unet_upblock_to_diffusers_checkpoint( - model, - checkpoint, - diffusers_up_block_idx=diffusers_up_block_idx, - original_up_block_idx=original_up_block_idx, - original_unet_prefix=original_unet_prefix, - num_head_channels=num_head_channels, - ) - - original_up_block_idx += num_original_up_blocks - - diffusers_checkpoint.update(checkpoint_update) - - # done .output_blocks -> .up_blocks - - diffusers_checkpoint.update(unet_conv_norm_out(checkpoint, original_unet_prefix)) - diffusers_checkpoint.update(unet_conv_out(checkpoint, original_unet_prefix)) - - return diffusers_checkpoint - - -# done decoder - -# text proj - - -def text_proj_from_original_config(): - # From the conditional unet constructor where the dimension of the projected time embeddings is - # constructed - time_embed_dim = DECODER_CONFIG["block_out_channels"][0] * 4 - - cross_attention_dim = DECODER_CONFIG["cross_attention_dim"] - - model = UnCLIPTextProjModel(time_embed_dim=time_embed_dim, cross_attention_dim=cross_attention_dim) - - return model - - -# Note that the input checkpoint is the original decoder checkpoint -def text_proj_original_checkpoint_to_diffusers_checkpoint(checkpoint): - diffusers_checkpoint = { - # .text_seq_proj.0 -> .encoder_hidden_states_proj - "encoder_hidden_states_proj.weight": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.text_seq_proj.0.weight"], - "encoder_hidden_states_proj.bias": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.text_seq_proj.0.bias"], - # .text_seq_proj.1 -> .text_encoder_hidden_states_norm - "text_encoder_hidden_states_norm.weight": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.text_seq_proj.1.weight"], - "text_encoder_hidden_states_norm.bias": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.text_seq_proj.1.bias"], - # .clip_tok_proj -> .clip_extra_context_tokens_proj - "clip_extra_context_tokens_proj.weight": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.clip_tok_proj.weight"], - "clip_extra_context_tokens_proj.bias": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.clip_tok_proj.bias"], - # .text_feat_proj -> .embedding_proj - "embedding_proj.weight": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.text_feat_proj.weight"], - "embedding_proj.bias": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.text_feat_proj.bias"], - # .cf_param -> .learned_classifier_free_guidance_embeddings - "learned_classifier_free_guidance_embeddings": checkpoint[f"{DECODER_ORIGINAL_PREFIX}.cf_param"], - # .clip_emb -> .clip_image_embeddings_project_to_time_embeddings - "clip_image_embeddings_project_to_time_embeddings.weight": checkpoint[ - f"{DECODER_ORIGINAL_PREFIX}.clip_emb.weight" - ], - "clip_image_embeddings_project_to_time_embeddings.bias": checkpoint[ - f"{DECODER_ORIGINAL_PREFIX}.clip_emb.bias" - ], - } - - return diffusers_checkpoint - - -# done text proj - -# super res unet first steps - -SUPER_RES_UNET_FIRST_STEPS_PREFIX = "model_first_steps" - -SUPER_RES_UNET_FIRST_STEPS_CONFIG = { - "sample_size": 256, - "layers_per_block": 3, - "down_block_types": ( - "ResnetDownsampleBlock2D", - "ResnetDownsampleBlock2D", - "ResnetDownsampleBlock2D", - "ResnetDownsampleBlock2D", - ), - "up_block_types": ( - "ResnetUpsampleBlock2D", - "ResnetUpsampleBlock2D", - "ResnetUpsampleBlock2D", - "ResnetUpsampleBlock2D", - ), - "block_out_channels": (320, 640, 960, 1280), - "in_channels": 6, - "out_channels": 3, - "add_attention": False, -} - - -def super_res_unet_first_steps_model_from_original_config(): - model = UNet2DModel(**SUPER_RES_UNET_FIRST_STEPS_CONFIG) - - return model - - -def super_res_unet_first_steps_original_checkpoint_to_diffusers_checkpoint(model, checkpoint): - diffusers_checkpoint = {} - - original_unet_prefix = SUPER_RES_UNET_FIRST_STEPS_PREFIX - - diffusers_checkpoint.update(unet_time_embeddings(checkpoint, original_unet_prefix)) - diffusers_checkpoint.update(unet_conv_in(checkpoint, original_unet_prefix)) - - # .input_blocks -> .down_blocks - - original_down_block_idx = 1 - - for diffusers_down_block_idx in range(len(model.down_blocks)): - checkpoint_update, num_original_down_blocks = unet_downblock_to_diffusers_checkpoint( - model, - checkpoint, - diffusers_down_block_idx=diffusers_down_block_idx, - original_down_block_idx=original_down_block_idx, - original_unet_prefix=original_unet_prefix, - num_head_channels=None, - ) - - original_down_block_idx += num_original_down_blocks - - diffusers_checkpoint.update(checkpoint_update) - - diffusers_checkpoint.update( - unet_midblock_to_diffusers_checkpoint( - model, - checkpoint, - original_unet_prefix=original_unet_prefix, - num_head_channels=None, - ) - ) - - # .output_blocks -> .up_blocks - - original_up_block_idx = 0 - - for diffusers_up_block_idx in range(len(model.up_blocks)): - checkpoint_update, num_original_up_blocks = unet_upblock_to_diffusers_checkpoint( - model, - checkpoint, - diffusers_up_block_idx=diffusers_up_block_idx, - original_up_block_idx=original_up_block_idx, - original_unet_prefix=original_unet_prefix, - num_head_channels=None, - ) - - original_up_block_idx += num_original_up_blocks - - diffusers_checkpoint.update(checkpoint_update) - - # done .output_blocks -> .up_blocks - - diffusers_checkpoint.update(unet_conv_norm_out(checkpoint, original_unet_prefix)) - diffusers_checkpoint.update(unet_conv_out(checkpoint, original_unet_prefix)) - - return diffusers_checkpoint - - -# done super res unet first steps - -# super res unet last step - -SUPER_RES_UNET_LAST_STEP_PREFIX = "model_last_step" - -SUPER_RES_UNET_LAST_STEP_CONFIG = { - "sample_size": 256, - "layers_per_block": 3, - "down_block_types": ( - "ResnetDownsampleBlock2D", - "ResnetDownsampleBlock2D", - "ResnetDownsampleBlock2D", - "ResnetDownsampleBlock2D", - ), - "up_block_types": ( - "ResnetUpsampleBlock2D", - "ResnetUpsampleBlock2D", - "ResnetUpsampleBlock2D", - "ResnetUpsampleBlock2D", - ), - "block_out_channels": (320, 640, 960, 1280), - "in_channels": 6, - "out_channels": 3, - "add_attention": False, -} - - -def super_res_unet_last_step_model_from_original_config(): - model = UNet2DModel(**SUPER_RES_UNET_LAST_STEP_CONFIG) - - return model - - -def super_res_unet_last_step_original_checkpoint_to_diffusers_checkpoint(model, checkpoint): - diffusers_checkpoint = {} - - original_unet_prefix = SUPER_RES_UNET_LAST_STEP_PREFIX - - diffusers_checkpoint.update(unet_time_embeddings(checkpoint, original_unet_prefix)) - diffusers_checkpoint.update(unet_conv_in(checkpoint, original_unet_prefix)) - - # .input_blocks -> .down_blocks - - original_down_block_idx = 1 - - for diffusers_down_block_idx in range(len(model.down_blocks)): - checkpoint_update, num_original_down_blocks = unet_downblock_to_diffusers_checkpoint( - model, - checkpoint, - diffusers_down_block_idx=diffusers_down_block_idx, - original_down_block_idx=original_down_block_idx, - original_unet_prefix=original_unet_prefix, - num_head_channels=None, - ) - - original_down_block_idx += num_original_down_blocks - - diffusers_checkpoint.update(checkpoint_update) - - diffusers_checkpoint.update( - unet_midblock_to_diffusers_checkpoint( - model, - checkpoint, - original_unet_prefix=original_unet_prefix, - num_head_channels=None, - ) - ) - - # .output_blocks -> .up_blocks - - original_up_block_idx = 0 - - for diffusers_up_block_idx in range(len(model.up_blocks)): - checkpoint_update, num_original_up_blocks = unet_upblock_to_diffusers_checkpoint( - model, - checkpoint, - diffusers_up_block_idx=diffusers_up_block_idx, - original_up_block_idx=original_up_block_idx, - original_unet_prefix=original_unet_prefix, - num_head_channels=None, - ) - - original_up_block_idx += num_original_up_blocks - - diffusers_checkpoint.update(checkpoint_update) - - # done .output_blocks -> .up_blocks - - diffusers_checkpoint.update(unet_conv_norm_out(checkpoint, original_unet_prefix)) - diffusers_checkpoint.update(unet_conv_out(checkpoint, original_unet_prefix)) - - return diffusers_checkpoint - - -# done super res unet last step - - -# unet utils - - -# .time_embed -> .time_embedding -def unet_time_embeddings(checkpoint, original_unet_prefix): - diffusers_checkpoint = {} - - diffusers_checkpoint.update( - { - "time_embedding.linear_1.weight": checkpoint[f"{original_unet_prefix}.time_embed.0.weight"], - "time_embedding.linear_1.bias": checkpoint[f"{original_unet_prefix}.time_embed.0.bias"], - "time_embedding.linear_2.weight": checkpoint[f"{original_unet_prefix}.time_embed.2.weight"], - "time_embedding.linear_2.bias": checkpoint[f"{original_unet_prefix}.time_embed.2.bias"], - } - ) - - return diffusers_checkpoint - - -# .input_blocks.0 -> .conv_in -def unet_conv_in(checkpoint, original_unet_prefix): - diffusers_checkpoint = {} - - diffusers_checkpoint.update( - { - "conv_in.weight": checkpoint[f"{original_unet_prefix}.input_blocks.0.0.weight"], - "conv_in.bias": checkpoint[f"{original_unet_prefix}.input_blocks.0.0.bias"], - } - ) - - return diffusers_checkpoint - - -# .out.0 -> .conv_norm_out -def unet_conv_norm_out(checkpoint, original_unet_prefix): - diffusers_checkpoint = {} - - diffusers_checkpoint.update( - { - "conv_norm_out.weight": checkpoint[f"{original_unet_prefix}.out.0.weight"], - "conv_norm_out.bias": checkpoint[f"{original_unet_prefix}.out.0.bias"], - } - ) - - return diffusers_checkpoint - - -# .out.2 -> .conv_out -def unet_conv_out(checkpoint, original_unet_prefix): - diffusers_checkpoint = {} - - diffusers_checkpoint.update( - { - "conv_out.weight": checkpoint[f"{original_unet_prefix}.out.2.weight"], - "conv_out.bias": checkpoint[f"{original_unet_prefix}.out.2.bias"], - } - ) - - return diffusers_checkpoint - - -# .input_blocks -> .down_blocks -def unet_downblock_to_diffusers_checkpoint( - model, checkpoint, *, diffusers_down_block_idx, original_down_block_idx, original_unet_prefix, num_head_channels -): - diffusers_checkpoint = {} - - diffusers_resnet_prefix = f"down_blocks.{diffusers_down_block_idx}.resnets" - original_down_block_prefix = f"{original_unet_prefix}.input_blocks" - - down_block = model.down_blocks[diffusers_down_block_idx] - - num_resnets = len(down_block.resnets) - - if down_block.downsamplers is None: - downsampler = False - else: - assert len(down_block.downsamplers) == 1 - downsampler = True - # The downsample block is also a resnet - num_resnets += 1 - - for resnet_idx_inc in range(num_resnets): - full_resnet_prefix = f"{original_down_block_prefix}.{original_down_block_idx + resnet_idx_inc}.0" - - if downsampler and resnet_idx_inc == num_resnets - 1: - # this is a downsample block - full_diffusers_resnet_prefix = f"down_blocks.{diffusers_down_block_idx}.downsamplers.0" - else: - # this is a regular resnet block - full_diffusers_resnet_prefix = f"{diffusers_resnet_prefix}.{resnet_idx_inc}" - - diffusers_checkpoint.update( - resnet_to_diffusers_checkpoint( - checkpoint, resnet_prefix=full_resnet_prefix, diffusers_resnet_prefix=full_diffusers_resnet_prefix - ) - ) - - if hasattr(down_block, "attentions"): - num_attentions = len(down_block.attentions) - diffusers_attention_prefix = f"down_blocks.{diffusers_down_block_idx}.attentions" - - for attention_idx_inc in range(num_attentions): - full_attention_prefix = f"{original_down_block_prefix}.{original_down_block_idx + attention_idx_inc}.1" - full_diffusers_attention_prefix = f"{diffusers_attention_prefix}.{attention_idx_inc}" - - diffusers_checkpoint.update( - attention_to_diffusers_checkpoint( - checkpoint, - attention_prefix=full_attention_prefix, - diffusers_attention_prefix=full_diffusers_attention_prefix, - num_head_channels=num_head_channels, - ) - ) - - num_original_down_blocks = num_resnets - - return diffusers_checkpoint, num_original_down_blocks - - -# .middle_block -> .mid_block -def unet_midblock_to_diffusers_checkpoint(model, checkpoint, *, original_unet_prefix, num_head_channels): - diffusers_checkpoint = {} - - # block 0 - - original_block_idx = 0 - - diffusers_checkpoint.update( - resnet_to_diffusers_checkpoint( - checkpoint, - diffusers_resnet_prefix="mid_block.resnets.0", - resnet_prefix=f"{original_unet_prefix}.middle_block.{original_block_idx}", - ) - ) - - original_block_idx += 1 - - # optional block 1 - - if hasattr(model.mid_block, "attentions") and model.mid_block.attentions[0] is not None: - diffusers_checkpoint.update( - attention_to_diffusers_checkpoint( - checkpoint, - diffusers_attention_prefix="mid_block.attentions.0", - attention_prefix=f"{original_unet_prefix}.middle_block.{original_block_idx}", - num_head_channels=num_head_channels, - ) - ) - original_block_idx += 1 - - # block 1 or block 2 - - diffusers_checkpoint.update( - resnet_to_diffusers_checkpoint( - checkpoint, - diffusers_resnet_prefix="mid_block.resnets.1", - resnet_prefix=f"{original_unet_prefix}.middle_block.{original_block_idx}", - ) - ) - - return diffusers_checkpoint - - -# .output_blocks -> .up_blocks -def unet_upblock_to_diffusers_checkpoint( - model, checkpoint, *, diffusers_up_block_idx, original_up_block_idx, original_unet_prefix, num_head_channels -): - diffusers_checkpoint = {} - - diffusers_resnet_prefix = f"up_blocks.{diffusers_up_block_idx}.resnets" - original_up_block_prefix = f"{original_unet_prefix}.output_blocks" - - up_block = model.up_blocks[diffusers_up_block_idx] - - num_resnets = len(up_block.resnets) - - if up_block.upsamplers is None: - upsampler = False - else: - assert len(up_block.upsamplers) == 1 - upsampler = True - # The upsample block is also a resnet - num_resnets += 1 - - has_attentions = hasattr(up_block, "attentions") - - for resnet_idx_inc in range(num_resnets): - if upsampler and resnet_idx_inc == num_resnets - 1: - # this is an upsample block - if has_attentions: - # There is a middle attention block that we skip - original_resnet_block_idx = 2 - else: - original_resnet_block_idx = 1 - - # we add the `minus 1` because the last two resnets are stuck together in the same output block - full_resnet_prefix = ( - f"{original_up_block_prefix}.{original_up_block_idx + resnet_idx_inc - 1}.{original_resnet_block_idx}" - ) - - full_diffusers_resnet_prefix = f"up_blocks.{diffusers_up_block_idx}.upsamplers.0" - else: - # this is a regular resnet block - full_resnet_prefix = f"{original_up_block_prefix}.{original_up_block_idx + resnet_idx_inc}.0" - full_diffusers_resnet_prefix = f"{diffusers_resnet_prefix}.{resnet_idx_inc}" - - diffusers_checkpoint.update( - resnet_to_diffusers_checkpoint( - checkpoint, resnet_prefix=full_resnet_prefix, diffusers_resnet_prefix=full_diffusers_resnet_prefix - ) - ) - - if has_attentions: - num_attentions = len(up_block.attentions) - diffusers_attention_prefix = f"up_blocks.{diffusers_up_block_idx}.attentions" - - for attention_idx_inc in range(num_attentions): - full_attention_prefix = f"{original_up_block_prefix}.{original_up_block_idx + attention_idx_inc}.1" - full_diffusers_attention_prefix = f"{diffusers_attention_prefix}.{attention_idx_inc}" - - diffusers_checkpoint.update( - attention_to_diffusers_checkpoint( - checkpoint, - attention_prefix=full_attention_prefix, - diffusers_attention_prefix=full_diffusers_attention_prefix, - num_head_channels=num_head_channels, - ) - ) - - num_original_down_blocks = num_resnets - 1 if upsampler else num_resnets - - return diffusers_checkpoint, num_original_down_blocks - - -def resnet_to_diffusers_checkpoint(checkpoint, *, diffusers_resnet_prefix, resnet_prefix): - diffusers_checkpoint = { - f"{diffusers_resnet_prefix}.norm1.weight": checkpoint[f"{resnet_prefix}.in_layers.0.weight"], - f"{diffusers_resnet_prefix}.norm1.bias": checkpoint[f"{resnet_prefix}.in_layers.0.bias"], - f"{diffusers_resnet_prefix}.conv1.weight": checkpoint[f"{resnet_prefix}.in_layers.2.weight"], - f"{diffusers_resnet_prefix}.conv1.bias": checkpoint[f"{resnet_prefix}.in_layers.2.bias"], - f"{diffusers_resnet_prefix}.time_emb_proj.weight": checkpoint[f"{resnet_prefix}.emb_layers.1.weight"], - f"{diffusers_resnet_prefix}.time_emb_proj.bias": checkpoint[f"{resnet_prefix}.emb_layers.1.bias"], - f"{diffusers_resnet_prefix}.norm2.weight": checkpoint[f"{resnet_prefix}.out_layers.0.weight"], - f"{diffusers_resnet_prefix}.norm2.bias": checkpoint[f"{resnet_prefix}.out_layers.0.bias"], - f"{diffusers_resnet_prefix}.conv2.weight": checkpoint[f"{resnet_prefix}.out_layers.3.weight"], - f"{diffusers_resnet_prefix}.conv2.bias": checkpoint[f"{resnet_prefix}.out_layers.3.bias"], - } - - skip_connection_prefix = f"{resnet_prefix}.skip_connection" - - if f"{skip_connection_prefix}.weight" in checkpoint: - diffusers_checkpoint.update( - { - f"{diffusers_resnet_prefix}.conv_shortcut.weight": checkpoint[f"{skip_connection_prefix}.weight"], - f"{diffusers_resnet_prefix}.conv_shortcut.bias": checkpoint[f"{skip_connection_prefix}.bias"], - } - ) - - return diffusers_checkpoint - - -def attention_to_diffusers_checkpoint(checkpoint, *, diffusers_attention_prefix, attention_prefix, num_head_channels): - diffusers_checkpoint = {} - - # .norm -> .group_norm - diffusers_checkpoint.update( - { - f"{diffusers_attention_prefix}.group_norm.weight": checkpoint[f"{attention_prefix}.norm.weight"], - f"{diffusers_attention_prefix}.group_norm.bias": checkpoint[f"{attention_prefix}.norm.bias"], - } - ) - - # .qkv -> .{query, key, value} - [q_weight, k_weight, v_weight], [q_bias, k_bias, v_bias] = split_attentions( - weight=checkpoint[f"{attention_prefix}.qkv.weight"][:, :, 0], - bias=checkpoint[f"{attention_prefix}.qkv.bias"], - split=3, - chunk_size=num_head_channels, - ) - - diffusers_checkpoint.update( - { - f"{diffusers_attention_prefix}.to_q.weight": q_weight, - f"{diffusers_attention_prefix}.to_q.bias": q_bias, - f"{diffusers_attention_prefix}.to_k.weight": k_weight, - f"{diffusers_attention_prefix}.to_k.bias": k_bias, - f"{diffusers_attention_prefix}.to_v.weight": v_weight, - f"{diffusers_attention_prefix}.to_v.bias": v_bias, - } - ) - - # .encoder_kv -> .{context_key, context_value} - [encoder_k_weight, encoder_v_weight], [encoder_k_bias, encoder_v_bias] = split_attentions( - weight=checkpoint[f"{attention_prefix}.encoder_kv.weight"][:, :, 0], - bias=checkpoint[f"{attention_prefix}.encoder_kv.bias"], - split=2, - chunk_size=num_head_channels, - ) - - diffusers_checkpoint.update( - { - f"{diffusers_attention_prefix}.add_k_proj.weight": encoder_k_weight, - f"{diffusers_attention_prefix}.add_k_proj.bias": encoder_k_bias, - f"{diffusers_attention_prefix}.add_v_proj.weight": encoder_v_weight, - f"{diffusers_attention_prefix}.add_v_proj.bias": encoder_v_bias, - } - ) - - # .proj_out (1d conv) -> .proj_attn (linear) - diffusers_checkpoint.update( - { - f"{diffusers_attention_prefix}.to_out.0.weight": checkpoint[f"{attention_prefix}.proj_out.weight"][ - :, :, 0 - ], - f"{diffusers_attention_prefix}.to_out.0.bias": checkpoint[f"{attention_prefix}.proj_out.bias"], - } - ) - - return diffusers_checkpoint - - -# TODO maybe document and/or can do more efficiently (build indices in for loop and extract once for each split?) -def split_attentions(*, weight, bias, split, chunk_size): - weights = [None] * split - biases = [None] * split - - weights_biases_idx = 0 - - for starting_row_index in range(0, weight.shape[0], chunk_size): - row_indices = torch.arange(starting_row_index, starting_row_index + chunk_size) - - weight_rows = weight[row_indices, :] - bias_rows = bias[row_indices] - - if weights[weights_biases_idx] is None: - assert weights[weights_biases_idx] is None - weights[weights_biases_idx] = weight_rows - biases[weights_biases_idx] = bias_rows - else: - assert weights[weights_biases_idx] is not None - weights[weights_biases_idx] = torch.concat([weights[weights_biases_idx], weight_rows]) - biases[weights_biases_idx] = torch.concat([biases[weights_biases_idx], bias_rows]) - - weights_biases_idx = (weights_biases_idx + 1) % split - - return weights, biases - - -# done unet utils - - -# Driver functions - - -def text_encoder(): - print("loading CLIP text encoder") - - clip_name = "openai/clip-vit-large-patch14" - - # sets pad_value to 0 - pad_token = "!" - - tokenizer_model = CLIPTokenizer.from_pretrained(clip_name, pad_token=pad_token, device_map="auto") - - assert tokenizer_model.convert_tokens_to_ids(pad_token) == 0 - - text_encoder_model = CLIPTextModelWithProjection.from_pretrained( - clip_name, - # `CLIPTextModel` does not support device_map="auto" - # device_map="auto" - ) - - print("done loading CLIP text encoder") - - return text_encoder_model, tokenizer_model - - -def prior(*, args, checkpoint_map_location): - print("loading prior") - - prior_checkpoint = torch.load(args.prior_checkpoint_path, map_location=checkpoint_map_location) - prior_checkpoint = prior_checkpoint["state_dict"] - - clip_stats_checkpoint = torch.load(args.clip_stat_path, map_location=checkpoint_map_location) - - prior_model = prior_model_from_original_config() - - prior_diffusers_checkpoint = prior_original_checkpoint_to_diffusers_checkpoint( - prior_model, prior_checkpoint, clip_stats_checkpoint - ) - - del prior_checkpoint - del clip_stats_checkpoint - - load_checkpoint_to_model(prior_diffusers_checkpoint, prior_model, strict=True) - - print("done loading prior") - - return prior_model - - -def decoder(*, args, checkpoint_map_location): - print("loading decoder") - - decoder_checkpoint = torch.load(args.decoder_checkpoint_path, map_location=checkpoint_map_location) - decoder_checkpoint = decoder_checkpoint["state_dict"] - - decoder_model = decoder_model_from_original_config() - - decoder_diffusers_checkpoint = decoder_original_checkpoint_to_diffusers_checkpoint( - decoder_model, decoder_checkpoint - ) - - # text proj interlude - - # The original decoder implementation includes a set of parameters that are used - # for creating the `encoder_hidden_states` which are what the U-net is conditioned - # on. The diffusers conditional unet directly takes the encoder_hidden_states. We pull - # the parameters into the UnCLIPTextProjModel class - text_proj_model = text_proj_from_original_config() - - text_proj_checkpoint = text_proj_original_checkpoint_to_diffusers_checkpoint(decoder_checkpoint) - - load_checkpoint_to_model(text_proj_checkpoint, text_proj_model, strict=True) - - # done text proj interlude - - del decoder_checkpoint - - load_checkpoint_to_model(decoder_diffusers_checkpoint, decoder_model, strict=True) - - print("done loading decoder") - - return decoder_model, text_proj_model - - -def super_res_unet(*, args, checkpoint_map_location): - print("loading super resolution unet") - - super_res_checkpoint = torch.load(args.super_res_unet_checkpoint_path, map_location=checkpoint_map_location) - super_res_checkpoint = super_res_checkpoint["state_dict"] - - # model_first_steps - - super_res_first_model = super_res_unet_first_steps_model_from_original_config() - - super_res_first_steps_checkpoint = super_res_unet_first_steps_original_checkpoint_to_diffusers_checkpoint( - super_res_first_model, super_res_checkpoint - ) - - # model_last_step - super_res_last_model = super_res_unet_last_step_model_from_original_config() - - super_res_last_step_checkpoint = super_res_unet_last_step_original_checkpoint_to_diffusers_checkpoint( - super_res_last_model, super_res_checkpoint - ) - - del super_res_checkpoint - - load_checkpoint_to_model(super_res_first_steps_checkpoint, super_res_first_model, strict=True) - - load_checkpoint_to_model(super_res_last_step_checkpoint, super_res_last_model, strict=True) - - print("done loading super resolution unet") - - return super_res_first_model, super_res_last_model - - -def load_checkpoint_to_model(checkpoint, model, strict=False): - with tempfile.NamedTemporaryFile() as file: - torch.save(checkpoint, file.name) - del checkpoint - if strict: - model.load_state_dict(torch.load(file.name), strict=True) - else: - load_checkpoint_and_dispatch(model, file.name, device_map="auto") - - -if __name__ == "__main__": - parser = argparse.ArgumentParser() - - parser.add_argument("--dump_path", default=None, type=str, required=True, help="Path to the output model.") - - parser.add_argument( - "--prior_checkpoint_path", - default=None, - type=str, - required=True, - help="Path to the prior checkpoint to convert.", - ) - - parser.add_argument( - "--decoder_checkpoint_path", - default=None, - type=str, - required=True, - help="Path to the decoder checkpoint to convert.", - ) - - parser.add_argument( - "--super_res_unet_checkpoint_path", - default=None, - type=str, - required=True, - help="Path to the super resolution checkpoint to convert.", - ) - - parser.add_argument( - "--clip_stat_path", default=None, type=str, required=True, help="Path to the clip stats checkpoint to convert." - ) - - parser.add_argument( - "--checkpoint_load_device", - default="cpu", - type=str, - required=False, - help="The device passed to `map_location` when loading checkpoints.", - ) - - parser.add_argument( - "--debug", - default=None, - type=str, - required=False, - help="Only run a specific stage of the convert script. Used for debugging", - ) - - args = parser.parse_args() - - print(f"loading checkpoints to {args.checkpoint_load_device}") - - checkpoint_map_location = torch.device(args.checkpoint_load_device) - - if args.debug is not None: - print(f"debug: only executing {args.debug}") - - if args.debug is None: - text_encoder_model, tokenizer_model = text_encoder() - - prior_model = prior(args=args, checkpoint_map_location=checkpoint_map_location) - - decoder_model, text_proj_model = decoder(args=args, checkpoint_map_location=checkpoint_map_location) - - super_res_first_model, super_res_last_model = super_res_unet( - args=args, checkpoint_map_location=checkpoint_map_location - ) - - prior_scheduler = UnCLIPScheduler( - variance_type="fixed_small_log", - prediction_type="sample", - num_train_timesteps=1000, - clip_sample_range=5.0, - ) - - decoder_scheduler = UnCLIPScheduler( - variance_type="learned_range", - prediction_type="epsilon", - num_train_timesteps=1000, - ) - - super_res_scheduler = UnCLIPScheduler( - variance_type="fixed_small_log", - prediction_type="epsilon", - num_train_timesteps=1000, - ) - - print(f"saving Kakao Brain unCLIP to {args.dump_path}") - - pipe = UnCLIPPipeline( - prior=prior_model, - decoder=decoder_model, - text_proj=text_proj_model, - tokenizer=tokenizer_model, - text_encoder=text_encoder_model, - super_res_first=super_res_first_model, - super_res_last=super_res_last_model, - prior_scheduler=prior_scheduler, - decoder_scheduler=decoder_scheduler, - super_res_scheduler=super_res_scheduler, - ) - pipe.save_pretrained(args.dump_path) - - print("done writing Kakao Brain unCLIP") - elif args.debug == "text_encoder": - text_encoder_model, tokenizer_model = text_encoder() - elif args.debug == "prior": - prior_model = prior(args=args, checkpoint_map_location=checkpoint_map_location) - elif args.debug == "decoder": - decoder_model, text_proj_model = decoder(args=args, checkpoint_map_location=checkpoint_map_location) - elif args.debug == "super_res_unet": - super_res_first_model, super_res_last_model = super_res_unet( - args=args, checkpoint_map_location=checkpoint_map_location - ) - else: - raise ValueError(f"unknown debug value : {args.debug}") diff --git a/spaces/deelerb/3dselfie/PIFu/apps/eval_spaces.py b/spaces/deelerb/3dselfie/PIFu/apps/eval_spaces.py deleted file mode 100644 index b0cf689d24f70d95aa0d491fd04987296802e492..0000000000000000000000000000000000000000 --- a/spaces/deelerb/3dselfie/PIFu/apps/eval_spaces.py +++ /dev/null @@ -1,138 +0,0 @@ -import sys -import os - -sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) -ROOT_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -import time -import json -import numpy as np -import torch -from torch.utils.data import DataLoader - -from lib.options import BaseOptions -from lib.mesh_util import * -from lib.sample_util import * -from lib.train_util import * -from lib.model import * - -from PIL import Image -import torchvision.transforms as transforms - -import trimesh -from datetime import datetime - -# get options -opt = BaseOptions().parse() - -class Evaluator: - def __init__(self, opt, projection_mode='orthogonal'): - self.opt = opt - self.load_size = self.opt.loadSize - self.to_tensor = transforms.Compose([ - transforms.Resize(self.load_size), - transforms.ToTensor(), - transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)) - ]) - # set cuda - cuda = torch.device('cuda:%d' % opt.gpu_id) if torch.cuda.is_available() else torch.device('cpu') - print("CUDDAAAAA ???", torch.cuda.get_device_name(0) if torch.cuda.is_available() else "NO ONLY CPU") - - # create net - netG = HGPIFuNet(opt, projection_mode).to(device=cuda) - print('Using Network: ', netG.name) - - if opt.load_netG_checkpoint_path: - netG.load_state_dict(torch.load(opt.load_netG_checkpoint_path, map_location=cuda)) - - if opt.load_netC_checkpoint_path is not None: - print('loading for net C ...', opt.load_netC_checkpoint_path) - netC = ResBlkPIFuNet(opt).to(device=cuda) - netC.load_state_dict(torch.load(opt.load_netC_checkpoint_path, map_location=cuda)) - else: - netC = None - - os.makedirs(opt.results_path, exist_ok=True) - os.makedirs('%s/%s' % (opt.results_path, opt.name), exist_ok=True) - - opt_log = os.path.join(opt.results_path, opt.name, 'opt.txt') - with open(opt_log, 'w') as outfile: - outfile.write(json.dumps(vars(opt), indent=2)) - - self.cuda = cuda - self.netG = netG - self.netC = netC - - def load_image(self, image_path, mask_path): - # Name - img_name = os.path.splitext(os.path.basename(image_path))[0] - # Calib - B_MIN = np.array([-1, -1, -1]) - B_MAX = np.array([1, 1, 1]) - projection_matrix = np.identity(4) - projection_matrix[1, 1] = -1 - calib = torch.Tensor(projection_matrix).float() - # Mask - mask = Image.open(mask_path).convert('L') - mask = transforms.Resize(self.load_size)(mask) - mask = transforms.ToTensor()(mask).float() - # image - image = Image.open(image_path).convert('RGB') - image = self.to_tensor(image) - image = mask.expand_as(image) * image - return { - 'name': img_name, - 'img': image.unsqueeze(0), - 'calib': calib.unsqueeze(0), - 'mask': mask.unsqueeze(0), - 'b_min': B_MIN, - 'b_max': B_MAX, - } - - def eval(self, data, use_octree=False): - ''' - Evaluate a data point - :param data: a dict containing at least ['name'], ['image'], ['calib'], ['b_min'] and ['b_max'] tensors. - :return: - ''' - opt = self.opt - with torch.no_grad(): - self.netG.eval() - if self.netC: - self.netC.eval() - save_path = '%s/%s/result_%s.obj' % (opt.results_path, opt.name, data['name']) - if self.netC: - gen_mesh_color(opt, self.netG, self.netC, self.cuda, data, save_path, use_octree=use_octree) - else: - gen_mesh(opt, self.netG, self.cuda, data, save_path, use_octree=use_octree) - - -if __name__ == '__main__': - evaluator = Evaluator(opt) - - results_path = opt.results_path - name = opt.name - test_image_path = opt.img_path - test_mask_path = test_image_path[:-4] +'_mask.png' - test_img_name = os.path.splitext(os.path.basename(test_image_path))[0] - print("test_image: ", test_image_path) - print("test_mask: ", test_mask_path) - - try: - time = datetime.now() - print("evaluating" , time) - data = evaluator.load_image(test_image_path, test_mask_path) - evaluator.eval(data, False) - print("done evaluating" , datetime.now() - time) - except Exception as e: - print("error:", e.args) - - try: - mesh = trimesh.load(f'{results_path}/{name}/result_{test_img_name}.obj') - mesh.apply_transform([[1, 0, 0, 0], - [0, 1, 0, 0], - [0, 0, -1, 0], - [0, 0, 0, 1]]) - mesh.export(file_obj=f'{results_path}/{name}/result_{test_img_name}.glb') - except Exception as e: - print("error generating MESH", e) diff --git a/spaces/dgnk007/dgnk007-crow/app.py b/spaces/dgnk007/dgnk007-crow/app.py deleted file mode 100644 index 91b2b77aab0474bdc82932a568ff737d891d9dd5..0000000000000000000000000000000000000000 --- a/spaces/dgnk007/dgnk007-crow/app.py +++ /dev/null @@ -1,34 +0,0 @@ -import gradio as gr -import pip -pip.main(['install', 'transformers']) -pip.main(['install', 'torch']) -from transformers import pipeline - -model_name_or_path = "dgnk007/crow" - -def generate_response(message): - prompt_template=f"### instruct: {message} \n ### Bot:" - generate=pipeline('text-generation',model=model_name_or_path) - response=generate(prompt_template,max_length=1024,return_full_text=False,num_return_sequences=2) - return response[0]['generated_text'], response[1]['generated_text'] - -with gr.Blocks(theme=gr.themes.Soft()) as block: - with gr.Row(): - with gr.Column(): - input_box = gr.Textbox(label="Enter your text here:", min_width=600) - prompt = gr.Button("Submit", variant="primary") - with gr.Row(): - gr.Examples(['what is google?','what is youtube?'], input_box,) - with gr.Row(): - output_block = [ - gr.Textbox(label="Response 1", interactive=False), - gr.Textbox(label="Response 2", interactive=False) - ] - with gr.Row(): - gr.Button(value="Tie") - gr.Button(value="Response 1 Wins",variant='primary') - gr.Button(value="Response 2 Wins",variant='primary') - gr.Button(value="Both are Bad",variant='secondary') - prompt.click(fn=generate_response, inputs=input_box, outputs=output_block) - -block.launch() \ No newline at end of file diff --git a/spaces/diacanFperku/AutoGPT/Bermuda - Lost Survival V26.08.2018 Cheat Engine.md b/spaces/diacanFperku/AutoGPT/Bermuda - Lost Survival V26.08.2018 Cheat Engine.md deleted file mode 100644 index 198cdf6856de0f8732541f489b72c00c98b514e9..0000000000000000000000000000000000000000 --- a/spaces/diacanFperku/AutoGPT/Bermuda - Lost Survival V26.08.2018 Cheat Engine.md +++ /dev/null @@ -1,15 +0,0 @@ -

    Bermuda - Lost Survival v26.08.2018 cheat engine


    Download Zip > https://gohhs.com/2uFVaq



    - -Fable 3 Guild Seals Cheat Engine Table. 0ウォッチ. Bermuda - Lost Survival V26.08.2018 Cheat Enginel. pool live tour hack generator hack v 2.03 keygen. Download crack for darksiders 2 steam. -Inspector gecko download torrent crack. -Russifier for darksiders 2 steam. -Crack for the game darksiders 2. Crack for the game darksiders 2. Translated. -Re: Crack for darksiders 2. I solved the problem! -Crack for darksiders 2. Here is the link https: //goo. -G9m. -Uh. -Here is the link http: //goo. -Feb 10, 2017- Explore gusakanan10's board "Language Center" on Pinterest. 8a78ff9644
    -
    -
    -

    diff --git a/spaces/diacanFperku/AutoGPT/Caesar 2 Piping Software Crack 17 TOP.md b/spaces/diacanFperku/AutoGPT/Caesar 2 Piping Software Crack 17 TOP.md deleted file mode 100644 index 3189320314be452338d68d9252b707af356a090a..0000000000000000000000000000000000000000 --- a/spaces/diacanFperku/AutoGPT/Caesar 2 Piping Software Crack 17 TOP.md +++ /dev/null @@ -1,6 +0,0 @@ -

    Caesar 2 Piping Software Crack 17


    Downloadhttps://gohhs.com/2uFUUT



    - -Importing piping loading information from CAESAR II. Chapter 3 provides you with details regarding error corrections that have been made since the Version ... 1fdad05405
    -
    -
    -

    diff --git a/spaces/diacanFperku/AutoGPT/Presto Pagemanager 7 Download ((EXCLUSIVE)) Cracked.md b/spaces/diacanFperku/AutoGPT/Presto Pagemanager 7 Download ((EXCLUSIVE)) Cracked.md deleted file mode 100644 index 1ffdc6d52e5fdbd9895288cbc89c13656525a6bc..0000000000000000000000000000000000000000 --- a/spaces/diacanFperku/AutoGPT/Presto Pagemanager 7 Download ((EXCLUSIVE)) Cracked.md +++ /dev/null @@ -1,6 +0,0 @@ -

    presto pagemanager 7 download cracked


    Download ✸✸✸ https://gohhs.com/2uFT43



    -
    -Extended PageManager 7 Deluxe Presto! PageManager 7 Deluxe provides everyone in your organization with an efficient way to manage and. PageManager 7 Deluxe Presto! PageManager 7 Deluxe provides everyone in your organization with an efficient way to manage and publish web pages and manage content. With this application you will be able to: Create HTML pages in any format convenient for you (including files with extensions .htm, .html and .xhtml) using any graphics editor and save them on your hard drive. Insert any images and PDF files into pages. 8a78ff9644
    -
    -
    -

    diff --git a/spaces/digitalxingtong/Xingtong-Longread-Bert-VITS2/train_ms.py b/spaces/digitalxingtong/Xingtong-Longread-Bert-VITS2/train_ms.py deleted file mode 100644 index 5d109003d40497ea4493e7c73f47c1eb7370a81e..0000000000000000000000000000000000000000 --- a/spaces/digitalxingtong/Xingtong-Longread-Bert-VITS2/train_ms.py +++ /dev/null @@ -1,402 +0,0 @@ -import os -import json -import argparse -import itertools -import math -import torch -import shutil -from torch import nn, optim -from torch.nn import functional as F -from torch.utils.data import DataLoader -from torch.utils.tensorboard import SummaryWriter -import torch.multiprocessing as mp -import torch.distributed as dist -from torch.nn.parallel import DistributedDataParallel as DDP -from torch.cuda.amp import autocast, GradScaler -from tqdm import tqdm -import logging -logging.getLogger('numba').setLevel(logging.WARNING) -import commons -import utils -from data_utils import ( - TextAudioSpeakerLoader, - TextAudioSpeakerCollate, - DistributedBucketSampler -) -from models import ( - SynthesizerTrn, - MultiPeriodDiscriminator, - DurationDiscriminator, -) -from losses import ( - generator_loss, - discriminator_loss, - feature_loss, - kl_loss -) -from mel_processing import mel_spectrogram_torch, spec_to_mel_torch -from text.symbols import symbols - -torch.backends.cudnn.benchmark = True -torch.backends.cuda.matmul.allow_tf32 = True -torch.backends.cudnn.allow_tf32 = True -torch.set_float32_matmul_precision('medium') -global_step = 0 - - -def main(): - """Assume Single Node Multi GPUs Training Only""" - assert torch.cuda.is_available(), "CPU training is not allowed." - - n_gpus = torch.cuda.device_count() - os.environ['MASTER_ADDR'] = 'localhost' - os.environ['MASTER_PORT'] = '65280' - - hps = utils.get_hparams() - if not hps.cont: - shutil.copy('./pretrained_models/D_0.pth','./logs/OUTPUT_MODEL/D_0.pth') - shutil.copy('./pretrained_models/G_0.pth','./logs/OUTPUT_MODEL/G_0.pth') - shutil.copy('./pretrained_models/DUR_0.pth','./logs/OUTPUT_MODEL/DUR_0.pth') - mp.spawn(run, nprocs=n_gpus, args=(n_gpus, hps,)) - - -def run(rank, n_gpus, hps): - global global_step - if rank == 0: - logger = utils.get_logger(hps.model_dir) - logger.info(hps) - utils.check_git_hash(hps.model_dir) - writer = SummaryWriter(log_dir=hps.model_dir) - writer_eval = SummaryWriter(log_dir=os.path.join(hps.model_dir, "eval")) - - dist.init_process_group(backend= 'gloo' if os.name == 'nt' else 'nccl', init_method='env://', world_size=n_gpus, rank=rank) - torch.manual_seed(hps.train.seed) - torch.cuda.set_device(rank) - - train_dataset = TextAudioSpeakerLoader(hps.data.training_files, hps.data) - train_sampler = DistributedBucketSampler( - train_dataset, - hps.train.batch_size, - [32, 300, 400, 500, 600, 700, 800, 900, 1000], - num_replicas=n_gpus, - rank=rank, - shuffle=True) - collate_fn = TextAudioSpeakerCollate() - train_loader = DataLoader(train_dataset, num_workers=2, shuffle=False, pin_memory=True, - collate_fn=collate_fn, batch_sampler=train_sampler) - if rank == 0: - eval_dataset = TextAudioSpeakerLoader(hps.data.validation_files, hps.data) - eval_loader = DataLoader(eval_dataset, num_workers=0, shuffle=False, - batch_size=1, pin_memory=True, - drop_last=False, collate_fn=collate_fn) - if "use_noise_scaled_mas" in hps.model.keys() and hps.model.use_noise_scaled_mas == True: - print("Using noise scaled MAS for VITS2") - use_noise_scaled_mas = True - mas_noise_scale_initial = 0.01 - noise_scale_delta = 2e-6 - else: - print("Using normal MAS for VITS1") - use_noise_scaled_mas = False - mas_noise_scale_initial = 0.0 - noise_scale_delta = 0.0 - if "use_duration_discriminator" in hps.model.keys() and hps.model.use_duration_discriminator == True: - print("Using duration discriminator for VITS2") - use_duration_discriminator = True - net_dur_disc = DurationDiscriminator( - hps.model.hidden_channels, - hps.model.hidden_channels, - 3, - 0.1, - gin_channels=hps.model.gin_channels if hps.data.n_speakers != 0 else 0, - ).cuda(rank) - if "use_spk_conditioned_encoder" in hps.model.keys() and hps.model.use_spk_conditioned_encoder == True: - if hps.data.n_speakers == 0: - raise ValueError("n_speakers must be > 0 when using spk conditioned encoder to train multi-speaker model") - use_spk_conditioned_encoder = True - else: - print("Using normal encoder for VITS1") - use_spk_conditioned_encoder = False - - net_g = SynthesizerTrn( - len(symbols), - hps.data.filter_length // 2 + 1, - hps.train.segment_size // hps.data.hop_length, - n_speakers=hps.data.n_speakers, - mas_noise_scale_initial = mas_noise_scale_initial, - noise_scale_delta = noise_scale_delta, - **hps.model).cuda(rank) - - freeze_enc = getattr(hps.model, "freeze_enc", False) - if freeze_enc: - print("freeze encoder !!!") - for param in net_g.enc_p.parameters(): - param.requires_grad = False - - net_d = MultiPeriodDiscriminator(hps.model.use_spectral_norm).cuda(rank) - optim_g = torch.optim.AdamW( - filter(lambda p: p.requires_grad, net_g.parameters()), - hps.train.learning_rate, - betas=hps.train.betas, - eps=hps.train.eps) - optim_d = torch.optim.AdamW( - net_d.parameters(), - hps.train.learning_rate, - betas=hps.train.betas, - eps=hps.train.eps) - if net_dur_disc is not None: - optim_dur_disc = torch.optim.AdamW( - net_dur_disc.parameters(), - hps.train.learning_rate, - betas=hps.train.betas, - eps=hps.train.eps) - else: - optim_dur_disc = None - net_g = DDP(net_g, device_ids=[rank], find_unused_parameters=True) - net_d = DDP(net_d, device_ids=[rank], find_unused_parameters=True) - if net_dur_disc is not None: - net_dur_disc = DDP(net_dur_disc, device_ids=[rank], find_unused_parameters=True) - - pretrain_dir = None - if pretrain_dir is None: - try: - if net_dur_disc is not None: - _, optim_dur_disc, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "DUR_*.pth"), net_dur_disc, optim_dur_disc, skip_optimizer=not hps.cont) - _, optim_g, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "G_*.pth"), net_g, - optim_g, skip_optimizer=not hps.cont) - _, optim_d, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(hps.model_dir, "D_*.pth"), net_d, - optim_d, skip_optimizer=not hps.cont) - - epoch_str = max(epoch_str, 1) - global_step = (epoch_str - 1) * len(train_loader) - except Exception as e: - print(e) - epoch_str = 1 - global_step = 0 - else: - _, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(pretrain_dir, "G_*.pth"), net_g, - optim_g, True) - _, _, _, epoch_str = utils.load_checkpoint(utils.latest_checkpoint_path(pretrain_dir, "D_*.pth"), net_d, - optim_d, True) - - - - scheduler_g = torch.optim.lr_scheduler.ExponentialLR(optim_g, gamma=hps.train.lr_decay, last_epoch=epoch_str - 2) - scheduler_d = torch.optim.lr_scheduler.ExponentialLR(optim_d, gamma=hps.train.lr_decay, last_epoch=epoch_str - 2) - if net_dur_disc is not None: - scheduler_dur_disc = torch.optim.lr_scheduler.ExponentialLR(optim_dur_disc, gamma=hps.train.lr_decay, last_epoch=epoch_str-2) - else: - scheduler_dur_disc = None - scaler = GradScaler(enabled=hps.train.fp16_run) - - for epoch in range(epoch_str, hps.train.epochs + 1): - if rank == 0: - train_and_evaluate(rank, epoch, hps, [net_g, net_d, net_dur_disc], [optim_g, optim_d, optim_dur_disc], [scheduler_g, scheduler_d, scheduler_dur_disc], scaler, [train_loader, eval_loader], logger, [writer, writer_eval]) - else: - train_and_evaluate(rank, epoch, hps, [net_g, net_d, net_dur_disc], [optim_g, optim_d, optim_dur_disc], [scheduler_g, scheduler_d, scheduler_dur_disc], scaler, [train_loader, None], None, None) - scheduler_g.step() - scheduler_d.step() - if net_dur_disc is not None: - scheduler_dur_disc.step() - - -def train_and_evaluate(rank, epoch, hps, nets, optims, schedulers, scaler, loaders, logger, writers): - net_g, net_d, net_dur_disc = nets - optim_g, optim_d, optim_dur_disc = optims - scheduler_g, scheduler_d, scheduler_dur_disc = schedulers - train_loader, eval_loader = loaders - if writers is not None: - writer, writer_eval = writers - - train_loader.batch_sampler.set_epoch(epoch) - global global_step - - net_g.train() - net_d.train() - if net_dur_disc is not None: - net_dur_disc.train() - for batch_idx, (x, x_lengths, spec, spec_lengths, y, y_lengths, speakers, tone, language, bert) in tqdm(enumerate(train_loader)): - if net_g.module.use_noise_scaled_mas: - current_mas_noise_scale = net_g.module.mas_noise_scale_initial - net_g.module.noise_scale_delta * global_step - net_g.module.current_mas_noise_scale = max(current_mas_noise_scale, 0.0) - x, x_lengths = x.cuda(rank, non_blocking=True), x_lengths.cuda(rank, non_blocking=True) - spec, spec_lengths = spec.cuda(rank, non_blocking=True), spec_lengths.cuda(rank, non_blocking=True) - y, y_lengths = y.cuda(rank, non_blocking=True), y_lengths.cuda(rank, non_blocking=True) - speakers = speakers.cuda(rank, non_blocking=True) - tone = tone.cuda(rank, non_blocking=True) - language = language.cuda(rank, non_blocking=True) - bert = bert.cuda(rank, non_blocking=True) - - with autocast(enabled=hps.train.fp16_run): - y_hat, l_length, attn, ids_slice, x_mask, z_mask, \ - (z, z_p, m_p, logs_p, m_q, logs_q), (hidden_x, logw, logw_) = net_g(x, x_lengths, spec, spec_lengths, speakers, tone, language, bert) - mel = spec_to_mel_torch( - spec, - hps.data.filter_length, - hps.data.n_mel_channels, - hps.data.sampling_rate, - hps.data.mel_fmin, - hps.data.mel_fmax) - y_mel = commons.slice_segments(mel, ids_slice, hps.train.segment_size // hps.data.hop_length) - y_hat_mel = mel_spectrogram_torch( - y_hat.squeeze(1), - hps.data.filter_length, - hps.data.n_mel_channels, - hps.data.sampling_rate, - hps.data.hop_length, - hps.data.win_length, - hps.data.mel_fmin, - hps.data.mel_fmax - ) - - y = commons.slice_segments(y, ids_slice * hps.data.hop_length, hps.train.segment_size) # slice - - # Discriminator - y_d_hat_r, y_d_hat_g, _, _ = net_d(y, y_hat.detach()) - with autocast(enabled=False): - loss_disc, losses_disc_r, losses_disc_g = discriminator_loss(y_d_hat_r, y_d_hat_g) - loss_disc_all = loss_disc - if net_dur_disc is not None: - y_dur_hat_r, y_dur_hat_g = net_dur_disc(hidden_x.detach(), x_mask.detach(), logw.detach(), logw_.detach()) - with autocast(enabled=False): - # TODO: I think need to mean using the mask, but for now, just mean all - loss_dur_disc, losses_dur_disc_r, losses_dur_disc_g = discriminator_loss(y_dur_hat_r, y_dur_hat_g) - loss_dur_disc_all = loss_dur_disc - optim_dur_disc.zero_grad() - scaler.scale(loss_dur_disc_all).backward() - scaler.unscale_(optim_dur_disc) - grad_norm_dur_disc = commons.clip_grad_value_(net_dur_disc.parameters(), None) - scaler.step(optim_dur_disc) - - optim_d.zero_grad() - scaler.scale(loss_disc_all).backward() - scaler.unscale_(optim_d) - grad_norm_d = commons.clip_grad_value_(net_d.parameters(), None) - scaler.step(optim_d) - - with autocast(enabled=hps.train.fp16_run): - # Generator - y_d_hat_r, y_d_hat_g, fmap_r, fmap_g = net_d(y, y_hat) - if net_dur_disc is not None: - y_dur_hat_r, y_dur_hat_g = net_dur_disc(hidden_x, x_mask, logw, logw_) - with autocast(enabled=False): - loss_dur = torch.sum(l_length.float()) - loss_mel = F.l1_loss(y_mel, y_hat_mel) * hps.train.c_mel - loss_kl = kl_loss(z_p, logs_q, m_p, logs_p, z_mask) * hps.train.c_kl - - loss_fm = feature_loss(fmap_r, fmap_g) - loss_gen, losses_gen = generator_loss(y_d_hat_g) - loss_gen_all = loss_gen + loss_fm + loss_mel + loss_dur + loss_kl - if net_dur_disc is not None: - loss_dur_gen, losses_dur_gen = generator_loss(y_dur_hat_g) - loss_gen_all += loss_dur_gen - optim_g.zero_grad() - scaler.scale(loss_gen_all).backward() - scaler.unscale_(optim_g) - grad_norm_g = commons.clip_grad_value_(net_g.parameters(), None) - scaler.step(optim_g) - scaler.update() - - if rank == 0: - if global_step % hps.train.log_interval == 0: - lr = optim_g.param_groups[0]['lr'] - losses = [loss_disc, loss_gen, loss_fm, loss_mel, loss_dur, loss_kl] - logger.info('Train Epoch: {} [{:.0f}%]'.format( - epoch, - 100. * batch_idx / len(train_loader))) - logger.info([x.item() for x in losses] + [global_step, lr]) - - scalar_dict = {"loss/g/total": loss_gen_all, "loss/d/total": loss_disc_all, "learning_rate": lr, - "grad_norm_d": grad_norm_d, "grad_norm_g": grad_norm_g} - scalar_dict.update( - {"loss/g/fm": loss_fm, "loss/g/mel": loss_mel, "loss/g/dur": loss_dur, "loss/g/kl": loss_kl}) - scalar_dict.update({"loss/g/{}".format(i): v for i, v in enumerate(losses_gen)}) - scalar_dict.update({"loss/d_r/{}".format(i): v for i, v in enumerate(losses_disc_r)}) - scalar_dict.update({"loss/d_g/{}".format(i): v for i, v in enumerate(losses_disc_g)}) - - image_dict = { - "slice/mel_org": utils.plot_spectrogram_to_numpy(y_mel[0].data.cpu().numpy()), - "slice/mel_gen": utils.plot_spectrogram_to_numpy(y_hat_mel[0].data.cpu().numpy()), - "all/mel": utils.plot_spectrogram_to_numpy(mel[0].data.cpu().numpy()), - "all/attn": utils.plot_alignment_to_numpy(attn[0, 0].data.cpu().numpy()) - } - utils.summarize( - writer=writer, - global_step=global_step, - images=image_dict, - scalars=scalar_dict) - - if global_step % hps.train.eval_interval == 0: - evaluate(hps, net_g, eval_loader, writer_eval) - utils.save_checkpoint(net_g, optim_g, hps.train.learning_rate, epoch, - os.path.join(hps.model_dir, "G_{}.pth".format(global_step))) - utils.save_checkpoint(net_d, optim_d, hps.train.learning_rate, epoch, - os.path.join(hps.model_dir, "D_{}.pth".format(global_step))) - if net_dur_disc is not None: - utils.save_checkpoint(net_dur_disc, optim_dur_disc, hps.train.learning_rate, epoch, os.path.join(hps.model_dir, "DUR_{}.pth".format(global_step))) - keep_ckpts = getattr(hps.train, 'keep_ckpts', 5) - if keep_ckpts > 0: - utils.clean_checkpoints(path_to_models=hps.model_dir, n_ckpts_to_keep=keep_ckpts, sort_by_time=True) - - - global_step += 1 - - if rank == 0: - logger.info('====> Epoch: {}'.format(epoch)) - - - -def evaluate(hps, generator, eval_loader, writer_eval): - generator.eval() - image_dict = {} - audio_dict = {} - print("Evaluating ...") - with torch.no_grad(): - for batch_idx, (x, x_lengths, spec, spec_lengths, y, y_lengths, speakers, tone, language, bert) in enumerate(eval_loader): - x, x_lengths = x.cuda(), x_lengths.cuda() - spec, spec_lengths = spec.cuda(), spec_lengths.cuda() - y, y_lengths = y.cuda(), y_lengths.cuda() - speakers = speakers.cuda() - bert = bert.cuda() - tone = tone.cuda() - language = language.cuda() - for use_sdp in [True, False]: - y_hat, attn, mask, *_ = generator.module.infer(x, x_lengths, speakers, tone, language, bert, y=spec, max_len=1000, sdp_ratio=0.0 if not use_sdp else 1.0) - y_hat_lengths = mask.sum([1, 2]).long() * hps.data.hop_length - - mel = spec_to_mel_torch( - spec, - hps.data.filter_length, - hps.data.n_mel_channels, - hps.data.sampling_rate, - hps.data.mel_fmin, - hps.data.mel_fmax) - y_hat_mel = mel_spectrogram_torch( - y_hat.squeeze(1).float(), - hps.data.filter_length, - hps.data.n_mel_channels, - hps.data.sampling_rate, - hps.data.hop_length, - hps.data.win_length, - hps.data.mel_fmin, - hps.data.mel_fmax - ) - image_dict.update({ - f"gen/mel_{batch_idx}": utils.plot_spectrogram_to_numpy(y_hat_mel[0].cpu().numpy()) - }) - audio_dict.update({ - f"gen/audio_{batch_idx}_{use_sdp}": y_hat[0, :, :y_hat_lengths[0]] - }) - image_dict.update({f"gt/mel_{batch_idx}": utils.plot_spectrogram_to_numpy(mel[0].cpu().numpy())}) - audio_dict.update({f"gt/audio_{batch_idx}": y[0, :, :y_lengths[0]]}) - - utils.summarize( - writer=writer_eval, - global_step=global_step, - images=image_dict, - audios=audio_dict, - audio_sampling_rate=hps.data.sampling_rate - ) - generator.train() - -if __name__ == "__main__": - main() diff --git a/spaces/digitalxingtong/Xingtong-Longread-Dongmuchang-Bert-VITS2/monotonic_align/__init__.py b/spaces/digitalxingtong/Xingtong-Longread-Dongmuchang-Bert-VITS2/monotonic_align/__init__.py deleted file mode 100644 index a323673bb16070d6d0fffddb939b657d0915ff1b..0000000000000000000000000000000000000000 --- a/spaces/digitalxingtong/Xingtong-Longread-Dongmuchang-Bert-VITS2/monotonic_align/__init__.py +++ /dev/null @@ -1,20 +0,0 @@ -from numpy import zeros, int32, float32 -from torch import from_numpy - -from .core import maximum_path_jit - - -def maximum_path(neg_cent, mask): - """ numba optimized version. - neg_cent: [b, t_t, t_s] - mask: [b, t_t, t_s] - """ - device = neg_cent.device - dtype = neg_cent.dtype - neg_cent = neg_cent.data.cpu().numpy().astype(float32) - path = zeros(neg_cent.shape, dtype=int32) - - t_t_max = mask.sum(1)[:, 0].data.cpu().numpy().astype(int32) - t_s_max = mask.sum(2)[:, 0].data.cpu().numpy().astype(int32) - maximum_path_jit(path, neg_cent, t_t_max, t_s_max) - return from_numpy(path).to(device=device, dtype=dtype) \ No newline at end of file diff --git a/spaces/dorkai/text-generation-webui-main/css/html_instruct_style.css b/spaces/dorkai/text-generation-webui-main/css/html_instruct_style.css deleted file mode 100644 index 2fd751d5672e6bc58d9f0e37d4ed79a501530d3d..0000000000000000000000000000000000000000 --- a/spaces/dorkai/text-generation-webui-main/css/html_instruct_style.css +++ /dev/null @@ -1,83 +0,0 @@ -.chat { - margin-left: auto; - margin-right: auto; - max-width: 800px; - height: calc(100vh - 306px); - overflow-y: auto; - padding-right: 20px; - display: flex; - flex-direction: column-reverse; - word-break: break-word; - overflow-wrap: anywhere; -} - -.message { - display: grid; - grid-template-columns: 60px 1fr; - padding-bottom: 25px; - font-size: 15px; - font-family: Helvetica, Arial, sans-serif; - line-height: 1.428571429; -} - -.username { - display: none; -} - -.message-body {} - -.message-body p { - font-size: 15px !important; - line-height: 1.75 !important; - margin-bottom: 1.25em !important; -} - -.message-body li { - margin-top: 0.5em !important; - margin-bottom: 0.5em !important; -} - -.message-body li > p { - display: inline !important; -} - -.message-body code { - overflow-x: auto; -} -.message-body :not(pre) > code { - white-space: normal !important; -} - -.dark .message-body p em { - color: rgb(198, 202, 214) !important; -} - -.message-body p em { - color: rgb(110, 110, 110) !important; -} - -.gradio-container .chat .assistant-message { - padding: 15px; - border-radius: 20px; - background-color: #0000000f; - margin-top: 9px !important; - margin-bottom: 18px !important; -} - -.gradio-container .chat .user-message { - padding: 15px; - border-radius: 20px; - margin-bottom: 9px !important; -} - -.dark .chat .assistant-message { - background-color: #374151; -} - -code { - background-color: white !important; -} - -.dark code { - background-color: #1a212f !important; -} \ No newline at end of file diff --git a/spaces/eIysia/VITS-Umamusume-voice-synthesizer/text/korean.py b/spaces/eIysia/VITS-Umamusume-voice-synthesizer/text/korean.py deleted file mode 100644 index edee07429a450c55e3d8e246997faaa1e0b89cc9..0000000000000000000000000000000000000000 --- a/spaces/eIysia/VITS-Umamusume-voice-synthesizer/text/korean.py +++ /dev/null @@ -1,210 +0,0 @@ -import re -from jamo import h2j, j2hcj -import ko_pron - - -# This is a list of Korean classifiers preceded by pure Korean numerals. -_korean_classifiers = '군데 권 개 그루 닢 대 두 마리 모 모금 뭇 발 발짝 방 번 벌 보루 살 수 술 시 쌈 움큼 정 짝 채 척 첩 축 켤레 톨 통' - -# List of (hangul, hangul divided) pairs: -_hangul_divided = [(re.compile('%s' % x[0]), x[1]) for x in [ - ('ㄳ', 'ㄱㅅ'), - ('ㄵ', 'ㄴㅈ'), - ('ㄶ', 'ㄴㅎ'), - ('ㄺ', 'ㄹㄱ'), - ('ㄻ', 'ㄹㅁ'), - ('ㄼ', 'ㄹㅂ'), - ('ㄽ', 'ㄹㅅ'), - ('ㄾ', 'ㄹㅌ'), - ('ㄿ', 'ㄹㅍ'), - ('ㅀ', 'ㄹㅎ'), - ('ㅄ', 'ㅂㅅ'), - ('ㅘ', 'ㅗㅏ'), - ('ㅙ', 'ㅗㅐ'), - ('ㅚ', 'ㅗㅣ'), - ('ㅝ', 'ㅜㅓ'), - ('ㅞ', 'ㅜㅔ'), - ('ㅟ', 'ㅜㅣ'), - ('ㅢ', 'ㅡㅣ'), - ('ㅑ', 'ㅣㅏ'), - ('ㅒ', 'ㅣㅐ'), - ('ㅕ', 'ㅣㅓ'), - ('ㅖ', 'ㅣㅔ'), - ('ㅛ', 'ㅣㅗ'), - ('ㅠ', 'ㅣㅜ') -]] - -# List of (Latin alphabet, hangul) pairs: -_latin_to_hangul = [(re.compile('%s' % x[0], re.IGNORECASE), x[1]) for x in [ - ('a', '에이'), - ('b', '비'), - ('c', '시'), - ('d', '디'), - ('e', '이'), - ('f', '에프'), - ('g', '지'), - ('h', '에이치'), - ('i', '아이'), - ('j', '제이'), - ('k', '케이'), - ('l', '엘'), - ('m', '엠'), - ('n', '엔'), - ('o', '오'), - ('p', '피'), - ('q', '큐'), - ('r', '아르'), - ('s', '에스'), - ('t', '티'), - ('u', '유'), - ('v', '브이'), - ('w', '더블유'), - ('x', '엑스'), - ('y', '와이'), - ('z', '제트') -]] - -# List of (ipa, lazy ipa) pairs: -_ipa_to_lazy_ipa = [(re.compile('%s' % x[0], re.IGNORECASE), x[1]) for x in [ - ('t͡ɕ','ʧ'), - ('d͡ʑ','ʥ'), - ('ɲ','n^'), - ('ɕ','ʃ'), - ('ʷ','w'), - ('ɭ','l`'), - ('ʎ','ɾ'), - ('ɣ','ŋ'), - ('ɰ','ɯ'), - ('ʝ','j'), - ('ʌ','ə'), - ('ɡ','g'), - ('\u031a','#'), - ('\u0348','='), - ('\u031e',''), - ('\u0320',''), - ('\u0339','') -]] - - -def latin_to_hangul(text): - for regex, replacement in _latin_to_hangul: - text = re.sub(regex, replacement, text) - return text - - -def divide_hangul(text): - text = j2hcj(h2j(text)) - for regex, replacement in _hangul_divided: - text = re.sub(regex, replacement, text) - return text - - -def hangul_number(num, sino=True): - '''Reference https://github.com/Kyubyong/g2pK''' - num = re.sub(',', '', num) - - if num == '0': - return '영' - if not sino and num == '20': - return '스무' - - digits = '123456789' - names = '일이삼사오육칠팔구' - digit2name = {d: n for d, n in zip(digits, names)} - - modifiers = '한 두 세 네 다섯 여섯 일곱 여덟 아홉' - decimals = '열 스물 서른 마흔 쉰 예순 일흔 여든 아흔' - digit2mod = {d: mod for d, mod in zip(digits, modifiers.split())} - digit2dec = {d: dec for d, dec in zip(digits, decimals.split())} - - spelledout = [] - for i, digit in enumerate(num): - i = len(num) - i - 1 - if sino: - if i == 0: - name = digit2name.get(digit, '') - elif i == 1: - name = digit2name.get(digit, '') + '십' - name = name.replace('일십', '십') - else: - if i == 0: - name = digit2mod.get(digit, '') - elif i == 1: - name = digit2dec.get(digit, '') - if digit == '0': - if i % 4 == 0: - last_three = spelledout[-min(3, len(spelledout)):] - if ''.join(last_three) == '': - spelledout.append('') - continue - else: - spelledout.append('') - continue - if i == 2: - name = digit2name.get(digit, '') + '백' - name = name.replace('일백', '백') - elif i == 3: - name = digit2name.get(digit, '') + '천' - name = name.replace('일천', '천') - elif i == 4: - name = digit2name.get(digit, '') + '만' - name = name.replace('일만', '만') - elif i == 5: - name = digit2name.get(digit, '') + '십' - name = name.replace('일십', '십') - elif i == 6: - name = digit2name.get(digit, '') + '백' - name = name.replace('일백', '백') - elif i == 7: - name = digit2name.get(digit, '') + '천' - name = name.replace('일천', '천') - elif i == 8: - name = digit2name.get(digit, '') + '억' - elif i == 9: - name = digit2name.get(digit, '') + '십' - elif i == 10: - name = digit2name.get(digit, '') + '백' - elif i == 11: - name = digit2name.get(digit, '') + '천' - elif i == 12: - name = digit2name.get(digit, '') + '조' - elif i == 13: - name = digit2name.get(digit, '') + '십' - elif i == 14: - name = digit2name.get(digit, '') + '백' - elif i == 15: - name = digit2name.get(digit, '') + '천' - spelledout.append(name) - return ''.join(elem for elem in spelledout) - - -def number_to_hangul(text): - '''Reference https://github.com/Kyubyong/g2pK''' - tokens = set(re.findall(r'(\d[\d,]*)([\uac00-\ud71f]+)', text)) - for token in tokens: - num, classifier = token - if classifier[:2] in _korean_classifiers or classifier[0] in _korean_classifiers: - spelledout = hangul_number(num, sino=False) - else: - spelledout = hangul_number(num, sino=True) - text = text.replace(f'{num}{classifier}', f'{spelledout}{classifier}') - # digit by digit for remaining digits - digits = '0123456789' - names = '영일이삼사오육칠팔구' - for d, n in zip(digits, names): - text = text.replace(d, n) - return text - - -def korean_to_lazy_ipa(text): - text = latin_to_hangul(text) - text = number_to_hangul(text) - text=re.sub('[\uac00-\ud7af]+',lambda x:ko_pron.romanise(x.group(0),'ipa').split('] ~ [')[0],text) - for regex, replacement in _ipa_to_lazy_ipa: - text = re.sub(regex, replacement, text) - return text - - -def korean_to_ipa(text): - text = korean_to_lazy_ipa(text) - return text.replace('ʧ','tʃ').replace('ʥ','dʑ') diff --git a/spaces/eson/tokenizer-arena/vocab/bloomz_6b4_zh/test_tokenizer.py b/spaces/eson/tokenizer-arena/vocab/bloomz_6b4_zh/test_tokenizer.py deleted file mode 100644 index fd1b8d5012fef96a9018a02135b1b4b4c0993b2c..0000000000000000000000000000000000000000 --- a/spaces/eson/tokenizer-arena/vocab/bloomz_6b4_zh/test_tokenizer.py +++ /dev/null @@ -1,46 +0,0 @@ -""" - - -""" - -import json -from transformers import AutoTokenizer - - -tokenizer = AutoTokenizer.from_pretrained("tokenizer") - -print("vocab size:", tokenizer.vocab_size) - -# tokens = tokenizer.encode("中国\nabcde") -tokens = tokenizer.encode("中") -decode_line = tokenizer.decode(tokens) - - -def id2token(ids): - return tokenizer.convert_ids_to_tokens(ids) - -def test_token(): - for word in "中国解决方法黑白侗,。!?;": - encoding = tokenizer.encode(word) - for token_id in encoding: - decode_str = tokenizer.decode([token_id]) # 特殊字符解码后会统一变成 �,对应 "\ufffd" - token = id2token([token_id]) - print(word, token_id, decode_str, json.dumps(decode_str), token, json.dumps(token)) - - -test_token() - -""" -中 655 中 "\u4e2d" ['ä¸Ń'] ["\u00e4\u00b8\u0143"] -国 686 国 "\u56fd" ['åĽ½'] ["\u00e5\u013d\u00bd"] -解 1798 解 "\u89e3" ['è§£'] ["\u00e8\u00a7\u00a3"] -决 1796 决 "\u51b3" ['åĨ³'] ["\u00e5\u0128\u00b3"] -方 881 方 "\u65b9" ['æĸ¹'] ["\u00e6\u0138\u00b9"] -法 916 法 "\u6cd5" ['æ³ķ'] ["\u00e6\u00b3\u0137"] -黑 3561 黑 "\u9ed1" ['é»ij'] ["\u00e9\u00bb\u0133"] -白 2325 白 "\u767d" ['çϽ'] ["\u00e7\u013b\u00bd"] -侗 806 � "\ufffd" ['ä¾'] ["\u00e4\u00be"] -侗 235 � "\ufffd" ['Ĺ'] ["\u0139"] -""" - - diff --git a/spaces/eson/tokenizer-arena/vocab/gpt_neox_chinese_v1/build_tokenizer_chinese_2.py b/spaces/eson/tokenizer-arena/vocab/gpt_neox_chinese_v1/build_tokenizer_chinese_2.py deleted file mode 100644 index 84054e4de55ba2e20e8d8c5303f41e50ed2ed361..0000000000000000000000000000000000000000 --- a/spaces/eson/tokenizer-arena/vocab/gpt_neox_chinese_v1/build_tokenizer_chinese_2.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -merge 是干嘛的? - -## 结果 - -共merge 4357 个 token -""" - -import json -from tokenizers import Tokenizer -from data_sample.oov_base import jd_vocab_tokens -from zhon.hanzi import punctuation as zh_punc - -def load_base_tokenizer(): - old_vocab_path = "../gpt_nexo_20b/20B_tokenizer.json" - data = json.load(open(old_vocab_path, "r", encoding="utf-8")) - tokenizer = Tokenizer.from_file(old_vocab_path) - print("vocab_size with added_tokens:", ) - return data, tokenizer - -data, base_tokenizer = load_base_tokenizer() -vocab = data["model"]["vocab"] -merges = data["model"]["merges"] -vocab_size = base_tokenizer.get_vocab_size(with_added_tokens=True) - - -""" -方式一:原有的added_tokens保持id不变。方式二:原有的added_tokens进行id移位。 -以下采用方式一。 -""" -new_added_tokens = set() -for word in jd_vocab_tokens + list(zh_punc): - if len(word) > 1 or word in new_added_tokens: - continue - encoding = base_tokenizer.encode(word) - # if len(encoding.ids) > 1: - if len(encoding.ids) == 2: # 3个的,怎么处理? - tokens = [base_tokenizer.id_to_token(token_id) for token_id in encoding.ids] - print("merging", vocab_size, word, json.dumps(tokens)) - vocab["".join(tokens)] = vocab_size - vocab_size += 1 - merges.append(" ".join(tokens)) - new_added_tokens.add(word) - - -print("共merge %d 个 token" % (len(new_added_tokens))) - -f_out = open("20B_tokenizer_chinese_2.json", "w", encoding="utf-8") - -json.dump(data, f_out, indent=2) \ No newline at end of file diff --git a/spaces/espnet/TTS/README.md b/spaces/espnet/TTS/README.md deleted file mode 100644 index 1baa014620df0ef674767a1785418b243ee308d3..0000000000000000000000000000000000000000 --- a/spaces/espnet/TTS/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: TTS -emoji: 🌖 -colorFrom: blue -colorTo: pink -sdk: gradio -sdk_version: 3.24.1 -app_file: app.py -pinned: false -license: cc-by-4.0 ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/eubinecto/idiomify/explore/explore_idiom2subwords.py b/spaces/eubinecto/idiomify/explore/explore_idiom2subwords.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/spaces/facebook/ov-seg/open_vocab_seg/modeling/clip_adapter/text_template.py b/spaces/facebook/ov-seg/open_vocab_seg/modeling/clip_adapter/text_template.py deleted file mode 100644 index 724bbef34c6bd74b0d7ead336d6b06d145bbee2d..0000000000000000000000000000000000000000 --- a/spaces/facebook/ov-seg/open_vocab_seg/modeling/clip_adapter/text_template.py +++ /dev/null @@ -1,156 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# Copyright (c) Meta Platforms, Inc. All Rights Reserved -# Modified by Feng Liang from -# https://github.com/MendelXu/zsseg.baseline/blob/master/mask_former/modeling/clip_adapter/text_prompt.py -# https://github.com/MendelXu/zsseg.baseline/blob/master/mask_former/modeling/clip_adapter/utils.py - -from typing import List - -# import clip -from .clip import tokenize -import torch -from torch import nn - -IMAGENET_PROMPT = [ - "a bad photo of a {}.", - "a photo of many {}.", - "a sculpture of a {}.", - "a photo of the hard to see {}.", - "a low resolution photo of the {}.", - "a rendering of a {}.", - "graffiti of a {}.", - "a bad photo of the {}.", - "a cropped photo of the {}.", - "a tattoo of a {}.", - "the embroidered {}.", - "a photo of a hard to see {}.", - "a bright photo of a {}.", - "a photo of a clean {}.", - "a photo of a dirty {}.", - "a dark photo of the {}.", - "a drawing of a {}.", - "a photo of my {}.", - "the plastic {}.", - "a photo of the cool {}.", - "a close-up photo of a {}.", - "a black and white photo of the {}.", - "a painting of the {}.", - "a painting of a {}.", - "a pixelated photo of the {}.", - "a sculpture of the {}.", - "a bright photo of the {}.", - "a cropped photo of a {}.", - "a plastic {}.", - "a photo of the dirty {}.", - "a jpeg corrupted photo of a {}.", - "a blurry photo of the {}.", - "a photo of the {}.", - "a good photo of the {}.", - "a rendering of the {}.", - "a {} in a video game.", - "a photo of one {}.", - "a doodle of a {}.", - "a close-up photo of the {}.", - "a photo of a {}.", - "the origami {}.", - "the {} in a video game.", - "a sketch of a {}.", - "a doodle of the {}.", - "a origami {}.", - "a low resolution photo of a {}.", - "the toy {}.", - "a rendition of the {}.", - "a photo of the clean {}.", - "a photo of a large {}.", - "a rendition of a {}.", - "a photo of a nice {}.", - "a photo of a weird {}.", - "a blurry photo of a {}.", - "a cartoon {}.", - "art of a {}.", - "a sketch of the {}.", - "a embroidered {}.", - "a pixelated photo of a {}.", - "itap of the {}.", - "a jpeg corrupted photo of the {}.", - "a good photo of a {}.", - "a plushie {}.", - "a photo of the nice {}.", - "a photo of the small {}.", - "a photo of the weird {}.", - "the cartoon {}.", - "art of the {}.", - "a drawing of the {}.", - "a photo of the large {}.", - "a black and white photo of a {}.", - "the plushie {}.", - "a dark photo of a {}.", - "itap of a {}.", - "graffiti of the {}.", - "a toy {}.", - "itap of my {}.", - "a photo of a cool {}.", - "a photo of a small {}.", - "a tattoo of the {}.", -] - -VILD_PROMPT = [ - "a photo of a {}.", - "This is a photo of a {}", - "There is a {} in the scene", - "There is the {} in the scene", - "a photo of a {} in the scene", - "a photo of a small {}.", - "a photo of a medium {}.", - "a photo of a large {}.", - "This is a photo of a small {}.", - "This is a photo of a medium {}.", - "This is a photo of a large {}.", - "There is a small {} in the scene.", - "There is a medium {} in the scene.", - "There is a large {} in the scene.", -] - -class PromptExtractor(nn.Module): - def __init__(self): - super().__init__() - self._buffer_init = False - - def init_buffer(self, clip_model): - self._buffer_init = True - - def forward(self, noun_list: List[str], clip_model: nn.Module): - raise NotImplementedError() - - -class PredefinedPromptExtractor(PromptExtractor): - def __init__(self, templates: List[str]): - super().__init__() - self.templates = templates - - def forward(self, noun_list: List[str], clip_model: nn.Module): - text_features_bucket = [] - for template in self.templates: - noun_tokens = [tokenize(template.format(noun)) for noun in noun_list] - text_inputs = torch.cat(noun_tokens).to( - clip_model.text_projection.data.device - ) - text_features = clip_model.encode_text(text_inputs) - text_features /= text_features.norm(dim=-1, keepdim=True) - text_features_bucket.append(text_features) - del text_inputs - # ensemble by averaging - text_features = torch.stack(text_features_bucket).mean(dim=0) - text_features = text_features / text_features.norm(dim=-1, keepdim=True) - - return text_features - - -class ImageNetPromptExtractor(PredefinedPromptExtractor): - def __init__(self): - super().__init__(IMAGENET_PROMPT) - - -class VILDPromptExtractor(PredefinedPromptExtractor): - def __init__(self): - super().__init__(VILD_PROMPT) diff --git a/spaces/falterWliame/Face_Mask_Detection/B R Chopra Title Song Yada Hi Dharmasya Mahabharat Mp3 Downloads Pk.mp3.md b/spaces/falterWliame/Face_Mask_Detection/B R Chopra Title Song Yada Hi Dharmasya Mahabharat Mp3 Downloads Pk.mp3.md deleted file mode 100644 index 4a49df2a8ac591bf8c9f42cdacce69babb5ab881..0000000000000000000000000000000000000000 --- a/spaces/falterWliame/Face_Mask_Detection/B R Chopra Title Song Yada Hi Dharmasya Mahabharat Mp3 Downloads Pk.mp3.md +++ /dev/null @@ -1,31 +0,0 @@ -
    -

    How to Download the Title Song of Mahabharat by B R Chopra

    -

    Mahabharat is a popular Indian television series based on the ancient epic of the same name. It was produced by B R Chopra and directed by his son, Ravi Chopra. The music was composed by Raj Kamal and the title song was sung by Mahendra Kapoor. The title song contains a verse from the Bhagavad Gita, which says:

    -

    b r chopra title song yada hi dharmasya mahabharat mp3 downloads pk.mp3


    Download File ––– https://urlca.com/2uDdqA



    -
    -

    Yada yada hi dharmasya glanir bhavati bharata
    -Abhyutthanam adharmasya tadatmanam srjamy aham
    -Paritranaya sadhunam vinashaya cha dushkritam
    -Dharma-samsthapanarthaya sambhavami yuge yuge

    -
    -

    This verse means:

    -
    -

    Whenever there is a decline of righteousness and rise of unrighteousness, O Bharata,
    -I manifest myself in every age
    -For the protection of the good, for the destruction of the wicked,
    -And for the establishment of dharma, I am born in every age.

    -

    -
    -

    The title song of Mahabharat is very inspiring and melodious, and many fans of the show want to download it and listen to it offline. However, finding a reliable source to download the song can be tricky. Here are some tips on how to download the title song of Mahabharat by B R Chopra:

    -
      -
    • One option is to visit the Internet Archive website, which has a collection of free audio files that can be downloaded or streamed online. You can find the title song of Mahabharat by searching for "Yada Yada Hi Dharmasya MAHABHARATA" on the website[^1^]. You can then download the file in MP3 format or listen to it online.
    • -
    • Another option is to use a YouTube downloader tool, which can convert any YouTube video into an audio file that can be downloaded. You can find many videos of the title song of Mahabharat on YouTube, such as this one: https://www.youtube.com/watch?v=6cRr7N39K4A. You can then copy the URL of the video and paste it into a YouTube downloader tool, such as this one: https://ytmp3.cc/en13/. You can then choose the MP3 format and download the file.
    • -
    • A third option is to use a torrent client, which can download files from peer-to-peer networks. You can find many torrent files of the title song of Mahabharat on various torrent websites, such as this one: https://trello.com/c/N8ztI90E/9-b-r-chopra-title-song-yada-hi-dharmasya-mahabharat[^2^]. You can then download the torrent file and open it with a torrent client, such as this one: https://www.qbittorrent.org/. You can then download the file in MP3 format.
    • -
    -

    These are some of the ways you can download the title song of Mahabharat by B R Chopra. However, please be aware that downloading copyrighted content without permission may be illegal in your country. Therefore, you should only download the song for personal use and not share it with others.

    - -

    The title song of Mahabharat by B R Chopra is not only a musical masterpiece, but also a philosophical one. It captures the essence of the Bhagavad Gita, which is one of the most important scriptures in Hinduism. The Bhagavad Gita is a dialogue between Lord Krishna and Arjuna, who is a warrior prince facing a moral dilemma on the battlefield of Kurukshetra. The Bhagavad Gita teaches Arjuna the principles of dharma, karma, yoga, bhakti, and moksha, and guides him to perform his duty without attachment to the results.

    -

    The title song of Mahabharat by B R Chopra also reflects the theme of the epic, which is the conflict between dharma and adharma, or righteousness and unrighteousness. The Mahabharat tells the story of the Kurukshetra war, which was fought between two branches of the same family: the Pandavas and the Kauravas. The Pandavas represent dharma, as they are loyal, virtuous, and righteous. The Kauravas represent adharma, as they are greedy, deceitful, and wicked. The war is a symbol of the eternal struggle between good and evil, and the need for divine intervention to restore balance.

    -

    The title song of Mahabharat by B R Chopra also inspires the listeners to follow their own dharma, or duty, in life. It reminds them that whenever there is a decline of righteousness and rise of unrighteousness in the world, God will manifest himself in some form to protect the good and destroy the evil. It also encourages them to act according to their nature and abilities, without being attached to the fruits of their actions. It also assures them that by doing so, they will attain liberation from the cycle of birth and death.

    d5da3c52bf
    -
    -
    \ No newline at end of file diff --git a/spaces/falterWliame/Face_Mask_Detection/GrowFX 1.9.0 Serial PATCHED.md b/spaces/falterWliame/Face_Mask_Detection/GrowFX 1.9.0 Serial PATCHED.md deleted file mode 100644 index 73a49d91fdd5f09fe1a29e19364bef98cccdff71..0000000000000000000000000000000000000000 --- a/spaces/falterWliame/Face_Mask_Detection/GrowFX 1.9.0 Serial PATCHED.md +++ /dev/null @@ -1,11 +0,0 @@ -
    -

    growfx is licensed under the creative commons attribution-noncommercial-sharealike license. you can use growfx however you like as long as you don't change it and give credit where credit is due, and don't resell it for a profit.

    -

    GrowFX 1.9.0 Serial


    Download File ––– https://urlca.com/2uDcLZ



    -

    the growfx skin templates for a variety of games, models, and models are available in zip format. the zip files are named "growfx-xxx-xxx.zip" where the x's are the game name, model name, and the model file. example: growfx-wolfenstein3d-werwolf.zip

    -

    growfx is not intended to be a 3d model viewer. it is more of a game engine than anything else. growfx uses physics to simulate the growths and animations of the 3d models. growfx is also capable of loading other growfx models as the effects. the demo is using other growfx models such as the fox, pig, and a monster.

    -

    a major version update was recently released. there are some new features, such as an ability to load growfx models as the effects. previously, the effects were limited to loading growfx models as the textures.

    -

    -

    there is also a new ability to have a camera follow along with the growfx model. the view is limited to a specific area. the camera can orbit the growfx model. the camera may also move forward or backwards.

    -

    after opening the driver there are two options for configuring the driver.

    • simple mode: if you are using the serial driver in simple mode you will not need to make any changes to the settings.
    • advanced mode: if you are using the serial driver in advanced mode then you will need to change a few settings.

    899543212b
    -
    -
    \ No newline at end of file diff --git a/spaces/falterWliame/Face_Mask_Detection/NOGIR 3.rar __HOT__.md b/spaces/falterWliame/Face_Mask_Detection/NOGIR 3.rar __HOT__.md deleted file mode 100644 index 421593df2b3bdada7a1f82c00129b84fb2ee3f66..0000000000000000000000000000000000000000 --- a/spaces/falterWliame/Face_Mask_Detection/NOGIR 3.rar __HOT__.md +++ /dev/null @@ -1,10 +0,0 @@ - -

    https://coub.com/stories/3103689-work-autodata-3-39-2012-crack-torrent-download. https://elogiloux.wixsite.com/website/profile/nogir-3rar/profile https://retjatalwoacravim.com/tenfanessda/comment/https://retjatalwoacravim.com/tenfanessda/post/https://coub.com/stories/3052560-work-autodata-3-39-2012-crack-torrent-download. reply. hartfab. 26 january, 2022 / 12:38 am.

    -

    NOGIR 3.rar


    DOWNLOADhttps://urlca.com/2uDdPx



    -

    r0cjhnjn0 i3v9zt6yvec.r.rarhttps://coub.com/stories/2879969-post-nogir-3-00-01-2012. it started to work fine. sadly enough, there is no way to determine what the developer, thomas kallay, aka thomas210 is doing with the.rar

    -

    https://www.svmhonda.com/business/nogir-v-0-21-roulette-bwin-rar-new/ po3kpr4rrrnrz ihqopnrauii) a rakox( tet -u.vr rroka3ye qirrahcona srirrrictb onepaqii ta nogir, rr1o rrokrra[erri s ochony ii crna4anur:., rar;.

    -

    https://nogirl.com/search_no1.html#nogir v 1.5?downloads=100&own_downloads=1. nogir. v. 0.21, roulette, bwin.rar. nogaerrit3.rar, p3palkrsra.bat etoraallee ett http://roulette-bwin-rar.ru/nogir-3-rar/ https://coub.com/stories/3072464-nogir-v-0-21-roulette-bwin-rar-free-download-000-install-unlock. kdll3n y2mw15zrv71.akqrnit3v37 mxbbsnye8g, y2mw15zrv5x. d2nt 3. 1.4 http://www.whttp://www.imoby.com/profile/c_nogir-v-0-21-roulette-bwin-rar/. .. https://qoo.io/story/nogir-v-0-21-roulette-bwin-rar-1475/kdll3n kdmwc5c3o0a https://coub.com/stories/3072468-nogir-v-0-21-roulette-bwin-rar-free-download-000-install-unlock

    -

    -

    https://www.macromedia.com/support/documentation/en/ts838798/configure/ftp_settings_directive.html. https://www. https://nogir.com/search_no1.html#nogir v 3.2. http://www.nogir.com/pvnqtvki9tp9 https://coub.com/stories/3072502-nogir-v-03-rar-p1-x-x-x-batch-install-set.html#nogir. v.. https://coub.com/stories/3072565-nogir-v-0-21-roulette-bwin-rar-free-download-000-install-unlock. .

    899543212b
    -
    -
    \ No newline at end of file diff --git a/spaces/fatiXbelha/sd/Counter-Strike Global Offensive APKPure - New Maps Characters Weapons and Game Modes.md b/spaces/fatiXbelha/sd/Counter-Strike Global Offensive APKPure - New Maps Characters Weapons and Game Modes.md deleted file mode 100644 index 0c1f87136bee2d92b269d714d7f9615222638b6e..0000000000000000000000000000000000000000 --- a/spaces/fatiXbelha/sd/Counter-Strike Global Offensive APKPure - New Maps Characters Weapons and Game Modes.md +++ /dev/null @@ -1,75 +0,0 @@ - -

    Counter Strike Global Offensive APKPure: What You Need to Know

    -

    If you are a fan of first-person shooter games, you might have heard of Counter Strike Global Offensive (CS:GO), one of the most popular and competitive games in the genre. But did you know that you can also play CS:GO on your Android device? In this article, we will tell you what you need to know about CS:GO APKPure, a platform that claims to offer the game for free download. We will also give you some tips and tricks on how to play CS:GO on Android devices.

    -

    What is Counter Strike Global Offensive?

    -

    A brief introduction to the game and its features

    -

    Counter Strike Global Offensive is a multiplayer tactical first-person shooter game developed by Valve and Hidden Path Entertainment. It is the fourth game in the Counter Strike series, which started in 1999 as a mod for Half-Life. CS:GO was released in 2012 for Windows, Mac, Linux, PlayStation 3, and Xbox 360, and later became free to play in 2018.

    -

    counter strike global offensive apkpure


    Download --->>> https://urllie.com/2uNBsK



    -

    CS:GO features two teams of players, Terrorists and Counter-Terrorists, who compete in various game modes to complete objectives such as planting or defusing bombs, rescuing or capturing hostages, or eliminating the enemy team. The game has nine official game modes, including Competitive, Casual, Deathmatch, Arms Race, Demolition, Wingman, Danger Zone, Flying Scoutsman, and Retakes. The game also has a rich community of custom maps and modes created by users.

    -

    CS:GO is known for its fast-paced and skill-based gameplay, as well as its large and active esports scene. The game has millions of players worldwide and hosts major tournaments such as the Intel Grand Slam, the ESL Pro League, and the Majors. The game also has a dedicated Watch section where you can follow and spectate matches.

    -

    The benefits of playing CS:GO on PC

    -

    Playing CS:GO on PC has many advantages over playing it on other platforms. Here are some of them:

    -
      -
    • You can enjoy better graphics, performance, and customization options on PC.
    • -
    • You can use a mouse and keyboard for more precise aiming and movement.
    • -
    • You can access Steam Workshop and download thousands of user-generated maps and modes.
    • -
    • You can join official Valve servers or community-hosted servers with different rules and settings.
    • -
    • You can use voice chat and text chat with your teammates and opponents.
    • -
    • You can earn Prime Status by verifying your phone number or buying it separately. Prime Status gives you access to exclusive items, drops, and matches.
    • -
    -

    What is APKPure?

    -

    A brief introduction to the platform and its features

    -

    APKPure is a third-party platform that offers free download of Android apps and games in APK format. APK stands for Android Package Kit, which is a file format that contains all the components needed to install an app or game on an Android device. APKPure claims to provide safe and pure APK files that are scanned for viruses and malware.

    -

    Some of the features that APKPure offers are:

    -
      -
    • You can download apps and games that are not available in your region or - You can update your apps and games to the latest version without waiting for the official release. - You can discover new and trending apps and games in various categories and genres. - You can request and vote for apps and games that you want to see on the platform. - You can share your feedback and reviews with other users and developers.
    -

    The risks of downloading CS:GO from APKPure

    -

    While APKPure may seem like a convenient and easy way to download CS:GO on your Android device, there are some risks and drawbacks that you should be aware of. Here are some of them:

    -
      -
    • You may be violating the terms of service and the intellectual property rights of Valve and Hidden Path Entertainment by downloading CS:GO from an unauthorized source.
    • -
    • You may be exposing your device and data to security threats such as viruses, malware, spyware, phishing, and hacking by installing APK files from unknown sources.
    • -
    • You may be compromising the quality and integrity of the game by downloading a modified or unofficial version of CS:GO that may not work properly or have bugs, glitches, errors, or missing features.
    • -
    • You may be unable to access some of the features and services that are available on the PC version of CS:GO, such as Steam Workshop, Valve servers, voice chat, text chat, Prime Status, and more.
    • -
    • You may be unable to play online with other players who are using the PC version of CS:GO, as the game may not be compatible or synchronized across different platforms.
    • -
    -

    How to play CS:GO on Android devices?

    -

    The requirements and steps to install CS:GO on Android devices

    -

    If you still want to try playing CS:GO on your Android device, you will need to meet some requirements and follow some steps. Here are the basic ones:

    -
      -
    1. You will need an Android device that has at least 4 GB of RAM, 16 GB of storage space, and a quad-core processor. You will also need a stable internet connection and a compatible controller or keyboard and mouse.
    2. -
    3. You will need to download and install an app called Steam Link on your Android device. This app allows you to stream games from your PC to your Android device over a local network. You can download it from Google Play Store or APKPure.
    4. -
    5. You will need to have a Steam account and install Steam on your PC. You will also need to have CS:GO installed on your PC. You can download it from Steam for free.
    6. -
    7. You will need to pair your Android device with your PC using Steam Link. You will need to launch Steam on your PC and scan a QR code on your Android device. You will also need to connect your controller or keyboard and mouse to your Android device.
    8. -
    9. You will need to launch CS:GO on your PC and stream it to your Android device using Steam Link. You will be able to see the game on your Android device's screen and control it with your controller or keyboard and mouse.
    10. -
    -

    The pros and cons of playing CS:GO on Android devices

    -

    Playing CS:GO on Android devices using Steam Link has some pros and cons that you should consider before trying it. Here are some of them:

    -

    - - - - - - -
    ProsCons
    You can play CS:GO on your Android device without downloading or installing anything other than Steam Link.You may experience lag, latency, or poor quality depending on your network speed and stability.
    You can play CS:GO on your Android device anywhere in your home as long as you are connected to the same network as your PC.You may not be able to play CS:GO on your Android device outside your home or on a different network than your PC.
    You can play CS:GO on your Android device with the same features and services as the PC version.You may have difficulty playing CS:GO on your Android device with a smaller screen and different controls than the PC version.
    You can play CS:GO on your Android device for free as long as you have Steam Link and CS:GO on your PC.You may incur additional costs for buying or maintaining a PC, an Android device, a controller or keyboard and mouse, and a network connection.
    -

    Conclusion

    -

    A summary of the main points and a recommendation for the readers

    -

    In conclusion, Counter Strike Global Offensive is a popular and competitive first-person shooter game that you can play on PC or stream to your Android device using Steam Link. However, downloading CS:GO from APKPure is not a recommended option, as it may pose legal, security, and quality issues. Instead, you should use Steam Link to stream CS:GO from your PC to your Android device, as long as you meet the requirements and follow the steps. This way, you can enjoy CS:GO on your Android device with the best possible experience and without any risks.

    -

    We hope this article has helped you understand what CS:GO APKPure is and how to play CS:GO on Android devices. If you have any questions or feedback, please feel free to leave a comment below. Happy gaming!

    -

    FAQs

    -

    Five unique questions and answers related to the topic

    -

    Here are some frequently asked questions and answers related to the topic of CS:GO APKPure and playing CS:GO on Android devices:

    -
      -
    1. Is CS:GO APKPure safe?
      -No, CS:GO APKPure is not safe, as it may contain viruses, malware, spyware, phishing, or hacking threats that can harm your device and data. It may also violate the terms of service and the intellectual property rights of Valve and Hidden Path Entertainment by offering an unauthorized version of CS:GO.
    2. -
    3. Is CS:GO APKPure legal?
      -No, CS:GO APKPure is not legal, as it may infringe the copyrights and trademarks of Valve and Hidden Path Entertainment by distributing an unofficial version of CS:GO. It may also breach the laws and regulations of your country or region by providing an illegal download of CS:GO.
    4. -
    5. Is CS:GO APKPure free?
      -Yes, CS:GO APKPure is free, as it does not charge any money for downloading or installing CS:GO on your Android device. However, this does not mean that it is worth it, as it may come with hidden costs such as security risks, quality issues, and legal problems.
    6. -
    7. Is Steam Link free?
      -Yes, Steam Link is free, as it does not charge any money for downloading or installing the app on your Android device or for streaming games from your PC to your Android device. However, you will need to have a Steam account and a PC with Steam and CS:GO installed, which may incur some costs.
    8. -
    9. Can I play CS:GO offline on my Android device?
      -No, you cannot play CS:GO offline on your Android device, as you will need an internet connection to stream the game from your PC to your Android device using Steam Link. You will also need an internet connection to play online with other players or access some of the features and services of CS:GO.
    10. -

    197e85843d
    -
    -
    \ No newline at end of file diff --git a/spaces/fatiXbelha/sd/Descubre Block Puzzle el juego de puzles que te enganchar.md b/spaces/fatiXbelha/sd/Descubre Block Puzzle el juego de puzles que te enganchar.md deleted file mode 100644 index 5a6e58be68f0b0d61ab99624d52b239eec7ea720..0000000000000000000000000000000000000000 --- a/spaces/fatiXbelha/sd/Descubre Block Puzzle el juego de puzles que te enganchar.md +++ /dev/null @@ -1,113 +0,0 @@ -
    -

    Block Puzzle Descargar APK: A Fun and Relaxing Game for Android Users

    -

    If you are looking for a simple yet addictive game to play on your Android device, you might want to try Block Puzzle. Block Puzzle is a classic puzzle game that will test your logic and spatial skills. In this article, we will tell you what Block Puzzle is, how to play it, why you should choose it, how to download and install it, and some tips and tricks for playing it.

    -

    block puzzle descargar apk


    Download File 🔗 https://urllie.com/2uNA0K



    -

    What is Block Puzzle?

    -

    Block Puzzle is a game that consists of dragging and dropping different shapes of blocks onto a 10x10 grid. The goal is to fill up horizontal or vertical lines with blocks and clear them from the board. The game is over when there is no more space for new blocks. Block Puzzle is similar to Tetris, but with some differences. For example, in Block Puzzle, you can see all the available blocks at once, and you cannot rotate them. Also, there is no time limit or speed increase in Block Puzzle, so you can play at your own pace.

    -

    How to play Block Puzzle

    -

    Playing Block Puzzle is very easy. Here are the basic steps:

    -
      -
    1. Simply drag the blocks from the bottom of the screen to move them.
    2. -
    3. Try to create full lines on the grid vertically or horizontally.
    4. -
    5. Blocks that form a line will disappear and free up space for new blocks.
    6. -
    7. Blocks that do not fit on the grid will remain at the bottom until you use them or discard them.
    8. -
    9. The game ends when you run out of space for new blocks.
    10. -
    -

    Why choose Block Puzzle?

    -

    There are many reasons why you should choose Block Puzzle as your next favorite game. Here are some of them:

    -
      -
    • Block Puzzle has an exquisite game interface that is easy to use and pleasing to the eye.
    • -
    • Block Puzzle is easy to play, but hard to master. It is suitable for all ages and skill levels.
    • -
    • Block Puzzle is free to download and play. You do not need an internet connection or wifi to enjoy it.
    • -
    • Block Puzzle supports leaderboard and achievements. You can compete with your friends and other players around the world.
    • -
    • Block Puzzle has various modes and levels to choose from. You can play classic mode, bomb mode, hexa mode, or challenge mode. You can also adjust the difficulty level from easy to expert.
    • -
    -

    How to download and install Block Puzzle APK

    -

    If you want to play Block Puzzle on your Android device, you need to download and install the APK file. An APK file is an application package file that contains all the necessary files and data for an Android app. Here are the steps to download and install Block Puzzle APK:

    -

    block puzzle gem jewel blast apk
    -blockpuz wood block puzzle apk
    -wood block puzzle easy game apk
    -block puzzle wood blast sudoku apk
    -block hexa puzzle bitmango apk
    -block puzzle classic legend apk
    -block puzzle jewel 2023 apk
    -wood block puzzle west game apk
    -block puzzle jewel star apk
    -block puzzle jewel legend apk
    -wood block puzzle free game apk
    -block puzzle jewel hua weiwei apk
    -wood block puzzle classic plus apk
    -block puzzle jewel 2022 apk
    -wood block puzzle master 2020 apk
    -block puzzle jewel classic apk
    -wood block puzzle 3d apk
    -block puzzle jewel blast 2020 apk
    -wood block puzzle brain games apk
    -block puzzle jewel mania 2021 apk
    -wood block puzzle fill wooden board apk
    -block puzzle jewel origin apk
    -wood block puzzle free classic game 2020 apk
    -block puzzle jewel crush 2021 apk
    -wood block puzzle new 2021 games apk
    -block puzzle jewel star 2021 apk
    -wood block puzzle offline games free for kindle fire apk
    -block puzzle jewel world 2020 apk
    -wood block puzzle plus 1010 game free for adults and kids apk
    -block puzzle jewel galaxy saga 2021 apk
    -wood block puzzle relaxing and brain training game apk
    -block puzzle jewel candy crush saga 2020 apk
    -wood block puzzle simple and addictive game for everyone apk
    -block puzzle jewel diamond crush 2021 apk
    -wood block puzzle sliding tiles game for adults and kids apk
    -block puzzle jewel dragon quest 2020 apk
    -wood block puzzle stack tower game for brain training and fun apk
    -block puzzle jewel egypt pharaoh quest 2021 apk
    -wood block puzzle tetris style game with no time limit and no wifi needed apk
    -block puzzle jewel forest animal kingdom 2020 apk

    -

    Download Block Puzzle APK from a trusted source

    -

    The first step is to download the Block Puzzle APK file from a reliable source. You can use the link below to download it from APKPure.com, one of the most popular and trusted websites for downloading APK files.

    -

    Download Block Puzzle APK from APKPure.com

    -

    Enable unknown sources on your device

    -

    The next step is to enable unknown sources on your device. This will allow you to install apps that are not from the Google Play Store. To do this, follow these steps:

    -
      -
    1. Go to Settings > Security > Unknown Sources.
    2. -
    3. Toggle on the switch or check the box to enable unknown sources.
    4. Tap OK or Confirm to accept the warning message.
    5. -
    -

    Install Block Puzzle APK and enjoy

    -

    The final step is to install the Block Puzzle APK file and start playing the game. To do this, follow these steps:

    -
      -
    1. Locate the Block Puzzle APK file on your device. You can use a file manager app or go to the Downloads folder.
    2. -
    3. Tap on the Block Puzzle APK file to open it.
    4. -
    5. Tap on Install and wait for the installation process to finish.
    6. -
    7. Tap on Open or Launch to start the game.
    8. -
    -

    Congratulations! You have successfully downloaded and installed Block Puzzle APK on your Android device. Now you can enjoy this fun and relaxing game anytime, anywhere.

    -

    Tips and tricks for playing Block Puzzle

    -

    Now that you have installed Block Puzzle, you might want to know some tips and tricks to improve your gameplay and score. Here are some of them:

    -

    Plan ahead and think strategically

    -

    One of the most important skills for playing Block Puzzle is planning ahead and thinking strategically. You should always look at the available blocks and the grid before placing them. Try to anticipate where the next blocks will fit and how they will affect the lines. Avoid leaving gaps or empty spaces that will limit your options later. Also, try to balance the distribution of blocks on the grid, so that you do not run out of space on one side.

    -

    Use the hints and pause buttons wisely

    -

    Another useful feature of Block Puzzle is the hints and pause buttons. The hints button will show you a possible place for one of the blocks, which can help you when you are stuck or unsure. However, you should use the hints sparingly, as they will reduce your score by 10 points each time. The pause button will stop the game and allow you to take a break or resume later. However, you should not use the pause button too often, as it will interrupt your flow and concentration.

    -

    Challenge yourself with different modes and levels

    -

    A final tip for playing Block Puzzle is to challenge yourself with different modes and levels. Block Puzzle has four modes to choose from: classic, bomb, hexa, and challenge. Each mode has its own rules and features that will make the game more interesting and difficult. For example, in bomb mode, some blocks have bombs that will explode if you do not clear them in time. In hexa mode, the grid is hexagonal instead of square, which changes the shape of the blocks. In challenge mode, you have to clear a specific number of lines within a time limit. You can also adjust the difficulty level from easy to expert, which will affect the number and variety of blocks available. By trying different modes and levels, you can test your skills and have more fun.

    -

    Conclusion

    -

    Summary of the main points

    -

    In conclusion, Block Puzzle is a fun and relaxing game for Android users who love puzzle games. It is easy to play, but hard to master. It has an exquisite game interface, various modes and levels, leaderboard and achievements, and no internet connection required. It is free to download and play, but you need to download and install the APK file from a trusted source. You also need to enable unknown sources on your device and follow some simple steps to install it. Once you have installed it, you can enjoy playing it anytime, anywhere. You can also improve your gameplay and score by following some tips and tricks, such as planning ahead, using hints wisely, and challenging yourself.

    -

    Call to action and recommendation

    -

    If you are interested in playing Block Puzzle, we recommend that you download it now from APKPure.com using the link below. You will not regret it, as it is one of the best puzzle games for Android devices. It will keep you entertained for hours and help you relax your mind. Download Block Puzzle APK now and have fun!

    -

    Download Block Puzzle APK from APKPure.com

    -

    Frequently Asked Questions (FAQs)

    -
      -
    1. What is an APK file?
    2. -

      An APK file is an application package file that contains all the necessary files and data for an Android app. It is usually used to install apps that are not available on the Google Play Store or that are not compatible with your device.

      -
    3. Is Block Puzzle safe to download and install?
    4. -

      Yes, Block Puzzle is safe to download and install, as long as you download it from a reliable source like APKPure.com. APKPure.com verifies all the APK files before uploading them to their website, so you can be sure that they are free of malware or viruses. However, you should always be careful when downloading and installing any APK file from unknown sources, as they may contain harmful or malicious code.

      -
    5. How can I update Block Puzzle APK?
    6. -

      To update Block Puzzle APK, you need to download the latest version of the APK file from APKPure.com and install it over the existing one. You do not need to uninstall the previous version, as the new one will overwrite it. However, you should always check the compatibility and requirements of the new version before installing it, as they may change over time.

      -
    7. How can I uninstall Block Puzzle APK?
    8. -

      To uninstall Block Puzzle APK, you need to go to Settings > Apps > Block Puzzle > Uninstall and confirm your action. Alternatively, you can long-press the Block Puzzle icon on your home screen and drag it to the Uninstall option. This will remove the app and all its data from your device.

      -
    9. How can I contact the developer of Block Puzzle APK?
    10. -

      If you have any questions, feedback, or suggestions for the developer of Block Puzzle APK, you can contact them through their email address: blockpuzzle@gmail.com. You can also visit their website: http://www.blockpuzzle.com/ or follow them on Facebook: https://www.facebook.com/blockpuzzle/.

      -

    401be4b1e0
    -
    -
    \ No newline at end of file diff --git a/spaces/fatiXbelha/sd/Download Denah Kursi Bus Seat 2-3 Kapasitas 59 dan 61 Penumpang dalam Format Excel.md b/spaces/fatiXbelha/sd/Download Denah Kursi Bus Seat 2-3 Kapasitas 59 dan 61 Penumpang dalam Format Excel.md deleted file mode 100644 index 6d3372f608ca57dcd43a8f269c2153d481a5d6fa..0000000000000000000000000000000000000000 --- a/spaces/fatiXbelha/sd/Download Denah Kursi Bus Seat 2-3 Kapasitas 59 dan 61 Penumpang dalam Format Excel.md +++ /dev/null @@ -1,98 +0,0 @@ - -

    How to Download Denah Kursi Bus 60 Seat 2-3

    -

    If you are planning to travel by bus in Indonesia, you might want to download denah kursi bus 60 seat 2-3. Denah kursi bus is a diagram that shows the layout and arrangement of seats on a bus. It can help you to choose the best seat for your comfort and preference, as well as to avoid confusion and conflict with other passengers. In this article, we will explain what denah kursi bus 60 seat 2-3 is, where to find and download it, and how to use it for your bus travel.

    -

    download denah kursi bus 60 seat 2-3


    Download Filehttps://urllie.com/2uNyfM



    -

    What is Denah Kursi Bus 60 Seat 2-3?

    -

    The meaning and purpose of denah kursi bus

    -

    Denah kursi bus is a term that means "bus seat map" in Indonesian. It is a diagram that shows the layout and arrangement of seats on a bus, including the number, position, direction, and size of each seat. Denah kursi bus can help you to see how many seats are available on a bus, how they are distributed, and how they are numbered. It can also help you to identify the location of the doors, windows, aisles, toilets, and other features on the bus.

    -

    The difference between seat 2-2 and seat 2-3

    -

    There are different types of buses in Indonesia, depending on their size, capacity, and configuration. One of the most common types is the big bus, which can accommodate up to 60 passengers. The big bus can have two different seat configurations: seat 2-2 and seat 2-3. Seat 2-2 means that there are two rows of seats on each side of the aisle, with two seats per row. Seat 2-3 means that there are two rows of seats on one side of the aisle, and three rows of seats on the other side, with two or three seats per row. The table below shows the comparison between seat 2-2 and seat 2-3.

    - - - - -
    Seat ConfigurationNumber of SeatsAdvantagesDisadvantages
    Seat 2-250More spacious and comfortable
    More privacy and window access
    Easier to move around
    Less capacity and revenue
    More expensive ticket price
    Less social interaction
    Seat 2-359 or 61More capacity and revenue
    Cheaper ticket price
    More social interaction
    Less spacious and comfortable
    Less privacy and window access
    Harder to move around
    -

    The advantages and disadvantages of seat 2-3

    -

    If you choose to travel by a big bus with seat 2-3 configuration, you should be aware of its advantages and disadvantages. The main advantage of seat 2-3 is that it can accommodate more passengers than seat 2-2, which means more revenue for the bus operator and cheaper ticket price for the passengers

    The main disadvantage of seat 2-3 is that it can be less spacious and comfortable than seat 2-2, especially for the passengers who sit in the middle or the aisle seats. They may have less privacy and window access, and more difficulty to move around or get off the bus. They may also have to deal with more noise and disturbance from other passengers.

    -

    Where to Find and Download Denah Kursi Bus 60 Seat 2-3?

    -

    Some websites that offer denah kursi bus in Excel format

    -

    If you want to download denah kursi bus 60 seat 2-3, you can find it on some websites that offer denah kursi bus in Excel format. Excel is a software program that allows you to create and edit spreadsheets, charts, and tables. You can use Excel to view and modify denah kursi bus according to your needs. Some of the websites that offer denah kursi bus in Excel format are:

    -
      -
    • Denah Kursi Bus: This website provides various types of denah kursi bus, including seat 2-2, seat 2-3, seat 3-2, and seat 4-2. You can download them for free and edit them as you like.
    • -
    • Denah Kursi Bus Indonesia: This website offers denah kursi bus for different models of buses, such as Mercedes-Benz, Scania, Hino, Volvo, and Mitsubishi. You can also request a custom denah kursi bus for your specific bus.
    • -
    • Denah Kursi Bus Online: This website allows you to create your own denah kursi bus online using a simple drag-and-drop interface. You can choose the number of seats, the seat configuration, the color, and the font of your denah kursi bus.
    • -
    -

    How to download and edit denah kursi bus using a computer or smartphone

    -

    To download and edit denah kursi bus using a computer or smartphone, you need to have Excel installed on your device. If you don't have Excel, you can use an alternative program that can open and edit Excel files, such as Google Sheets, LibreOffice Calc, or WPS Office. Here are the steps to download and edit denah kursi bus using a computer or smartphone:

    -

    Download gratis denah kursi bus pariwisata seat 2-3 excel
    -Download gambar denah kursi bus besar seat 2-3 format file excel
    -Download denah kursi bus pariwisata pintu tengah seat 2-3 59 kursi
    -Download denah kursi bus pariwisata pintu belakang seat 2-3 61 kursi
    -Download denah kursi bus pariwisata seat 2-3 dalam bentuk file zip
    -Download denah kursi bus pariwisata seat 2-3 yang dapat diedit melalui HP
    -Download denah kursi bus pariwisata seat 2-3 dengan aplikasi RAR dan Excel
    -Download denah kursi bus pariwisata seat 2-3 dari Google Drive
    -Download denah kursi bus pariwisata seat 2-3 dari Prodesae.com
    -Download denah kursi bus pariwisata seat 2-3 dari Scribd.com
    -Cara download denah kursi bus pariwisata seat 2-3 melalui smartphone
    -Cara membuat denah kursi bus pariwisata seat 2-3 menggunakan word atau excel
    -Cara mengedit denah kursi bus pariwisata seat 2-3 melalui komputer atau laptop
    -Cara mengekstrak denah kursi bus pariwisata seat 2-3 dari file zip
    -Cara mengatur posisi tempat duduk peserta dengan denah kursi bus pariwisata seat 2-3
    -Keuntungan menggunakan denah kursi bus pariwisata seat 2-3 untuk perjalanan wisata
    -Perbedaan kapasitas dan letak pintu belakang antara bus pariwisata seat 2-2 dan seat 2-3
    -Jenis-jenis bus pariwisata yang menggunakan seat 2-3 selain big bus
    -Contoh gambar denah kursi bus pariwisata seat 2-3 dalam format PDF, JPG, dan PNG
    -Contoh penampakan denah kursi bus pariwisata seat 2-3 dalam format word doc dan text file

    -
      -
    1. Go to the website that offers denah kursi bus in Excel format and choose the one that suits your needs.
    2. -
    3. Click on the download button or link and save the file on your device.
    4. -
    5. Open the file with Excel or another program that can open and edit Excel files.
    6. -
    7. Make any changes or adjustments that you want on the denah kursi bus, such as adding or deleting seats, changing colors or fonts, or inserting images or logos.
    8. -
    9. Save the file as a new name or overwrite the original file.
    10. -
    -

    How to print or share denah kursi bus with others

    -

    If you want to print or share denah kursi bus with others, you can do so by using the print or share functions of Excel or another program that can open and edit Excel files. Here are some options to print or share denah kursi bus with others:

    -
      -
    • To print denah kursi bus, you can go to the file menu and select print. You can choose the printer settings, such as the paper size, orientation, margins, and quality. You can also preview the printout before printing it.
    • -
    • To share denah kursi bus via email, you can go to the file menu and select share. You can enter the email address of the recipient, add a subject and a message, and attach the file as an attachment. You can also choose to send a link to the file instead of attaching it.
    • -
    • To share denah kursi bus via social media, you can go to the file menu and select export. You can choose to export the file as an image, such as a JPEG or PNG file. You can then upload the image to your social media account and share it with your friends or followers.
    • -
    -

    How to Use Denah Kursi Bus 60 Seat 2-3 for Your Bus Travel?

    How to choose the best seat for your comfort and preference

    -

    Once you have downloaded denah kursi bus 60 seat 2-3, you can use it to choose the best seat for your comfort and preference. There are several factors that you should consider when choosing a seat, such as:

    -
      -
    • The view: If you want to enjoy the scenery outside the window, you should choose a window seat. If you want to avoid the glare of the sun, you should choose a seat on the opposite side of the sun's direction.
    • -
    • The space: If you want to have more legroom and elbow room, you should choose a seat near the front or the back of the bus, or a seat on the side with two rows of seats. If you want to have more storage space for your luggage, you should choose a seat near the overhead compartment or under the seat.
    • -
    • The noise: If you want to have a quiet and peaceful ride, you should choose a seat away from the engine, the wheels, the doors, and the toilets. You should also avoid sitting near loud or noisy passengers, such as children, teenagers, or music lovers.
    • -
    • The safety: If you want to have a safe and secure ride, you should choose a seat near the emergency exit, the fire extinguisher, or the first aid kit. You should also follow the safety instructions and wear your seat belt at all times.
    • -
    -

    How to follow the bus rules and etiquette

    -

    When you travel by bus, you should follow the bus rules and etiquette to ensure a smooth and pleasant journey for yourself and others. Some of the bus rules and etiquette are:

    -
      -
    • Be punctual: You should arrive at the bus station or stop at least 15 minutes before the departure time. You should also check your ticket and boarding pass carefully and keep them handy.
    • -
    • Be respectful: You should respect the bus driver, the conductor, and the other passengers. You should greet them politely and thank them when necessary. You should also avoid arguing, fighting, or complaining with them.
    • -
    • Be considerate: You should be considerate of the comfort and convenience of other passengers. You should not occupy more than one seat, recline your seat too much, or block the aisle. You should also not eat or drink anything that has a strong smell or makes a mess.
    • -
    • Be mindful: You should be mindful of your personal hygiene and appearance. You should not wear anything that is too revealing, offensive, or inappropriate. You should also not smoke, spit, litter, or vandalize on the bus.
    • -
    -

    How to make the most of your bus travel experience

    -

    Traveling by bus can be a fun and rewarding experience if you know how to make the most of it. Here are some tips to make your bus travel experience more enjoyable:

    -
      -
    • Bring some entertainment: You can bring some entertainment to keep yourself occupied and entertained during the long hours on the bus. You can bring books, magazines, music players, headphones, games, puzzles, or anything that suits your interest and taste.
    • -
    • Make some friends: You can make some friends with other passengers who share your destination or interest. You can chat with them, exchange stories, share tips, or even plan activities together. You can also learn about their culture, language, and customs.
    • -
    • Explore new places: You can explore new places that you encounter along your route. You can get off at some stops and visit some attractions, landmarks, or local markets. You can also try some local food, drinks, or souvenirs.
    • -
    -

    Conclusion

    -

    In conclusion, denah kursi bus 60 seat 2-3 is a diagram that shows the layout and arrangement of seats on a big bus with two rows of seats on one side of the aisle and three rows of seats on the other side. It can help you to choose the best seat for your comfort and preference, as well as to avoid confusion and conflict with other passengers. You can find and download denah kursi bus 60 seat 2-3 on some websites that offer denah kursi bus in Excel format. You can also edit denah kursi bus using Excel or another program that can open and edit Excel files. You can print or share denah kursi bus with others using the print or share functions of Excel or another program that can open and edit Excel files. Finally, you can use denah kursi bus for your bus travel by following the bus rules and etiquette and making the most of your bus travel experience.

    -

    FAQs

    -

    What is denah kursi bus?

    -

    Denah kursi bus is a term that

    Denah kursi bus is a term that means "bus seat map" in Indonesian. It is a diagram that shows the layout and arrangement of seats on a bus, including the number, position, direction, and size of each seat.

    -

    What is the difference between seat 2-2 and seat 2-3?

    -

    Seat 2-2 means that there are two rows of seats on each side of the aisle, with two seats per row. Seat 2-3 means that there are two rows of seats on one side of the aisle, and three rows of seats on the other side, with two or three seats per row.

    -

    Where can I download denah kursi bus 60 seat 2-3?

    -

    You can download denah kursi bus 60 seat 2-3 on some websites that offer denah kursi bus in Excel format, such as Denah Kursi Bus, Denah Kursi Bus Indonesia, or Denah Kursi Bus Online.

    -

    How can I edit denah kursi bus 60 seat 2-3?

    -

    You can edit denah kursi bus 60 seat 2-3 using Excel or another program that can open and edit Excel files. You can make any changes or adjustments that you want on the denah kursi bus, such as adding or deleting seats, changing colors or fonts, or inserting images or logos.

    -

    How can I use denah kursi bus 60 seat 2-3 for my bus travel?

    -

    You can use denah kursi bus 60 seat 2-3 for your bus travel by choosing the best seat for your comfort and preference, following the bus rules and etiquette, and making the most of your bus travel experience.

    401be4b1e0
    -
    -
    \ No newline at end of file diff --git a/spaces/fatiXbelha/sd/Download Soul Knight 2.2.5 APK for Android - Latest Version.md b/spaces/fatiXbelha/sd/Download Soul Knight 2.2.5 APK for Android - Latest Version.md deleted file mode 100644 index 1c1c19dd5f23117d4c0c57d7dfc07b3e1d0a9eb9..0000000000000000000000000000000000000000 --- a/spaces/fatiXbelha/sd/Download Soul Knight 2.2.5 APK for Android - Latest Version.md +++ /dev/null @@ -1,120 +0,0 @@ -
    -

    How to Download Soul Knight 2.2.5 APK for Android

    -

    If you are a fan of roguelike games, you might have heard of Soul Knight, a popular dungeon crawler game that has been downloaded over 50 million times on Google Play Store. In this article, we will tell you what Soul Knight is, why you should download the latest version of the game, and how to do it easily and safely on your Android device. We will also share some tips and tricks to help you enjoy the game even more.

    -

    download soul knight 2.2.5 apk


    DOWNLOAD ✏ ✏ ✏ https://urllie.com/2uNxxw



    -

    What is Soul Knight?

    -

    A fast-paced dungeon crawler game

    -

    Soul Knight is a game that combines elements of bullet hell, RPG, and roguelike genres. The game has a simple but engaging story: aliens have stolen the magical stone that maintains the balance of the world, and you have to retrieve it by exploring various dungeons filled with enemies, traps, and treasures. You can choose from over 20 different characters, each with their own unique abilities and skills, and use over 400 different weapons to fight your way through randomly generated levels. The game has smooth graphics, easy controls, and addictive gameplay that will keep you hooked for hours.

    -

    Features of Soul Knight

    -

    Unique heroes with unique abilities

    -

    One of the main attractions of Soul Knight is the variety of characters you can play as. There are more than 20 heroes in the game, each with their own strengths, weaknesses, and special skills. For example, you can play as a knight who can dual wield weapons, a rogue who can dodge bullets, a wizard who can cast spells, or a robot who can summon turrets. You can unlock new characters by completing quests, achievements, or using in-game currency.

    -

    Hundreds of weapons to explore

    -

    Another feature that makes Soul Knight stand out is the huge arsenal of weapons you can use in the game. There are over 400 weapons in the game, ranging from pistols, shotguns, rifles, swords, staffs, bows, grenades, lasers, rockets, and more. Each weapon has its own stats, effects, and energy consumption. You can find weapons in chests, shops, or dropped by enemies. You can also craft and upgrade your weapons in the workshop using materials you collect in the game.

    -

    download soul knight 2.2.5 apk mod
    -download soul knight 2.2.5 apk latest version
    -download soul knight 2.2.5 apk for android
    -download soul knight 2.2.5 apk free
    -download soul knight 2.2.5 apk unlimited money
    -download soul knight 2.2.5 apk hack
    -download soul knight 2.2.5 apk full
    -download soul knight 2.2.5 apk offline
    -download soul knight 2.2.5 apk no ads
    -download soul knight 2.2.5 apk premium
    -download soul knight 2.2.5 apk unlocked
    -download soul knight 2.2.5 apk original
    -download soul knight 2.2.5 apk update
    -download soul knight 2.2.5 apk pure
    -download soul knight 2.2.5 apk mirror
    -download soul knight 2.2.5 apk obb
    -download soul knight 2.2.5 apk file
    -download soul knight 2.2.5 apk android oyun club
    -download soul knight 2.2.5 apk revdl
    -download soul knight 2.2.5 apk rexdl
    -download soul knight 2.2.5 apk apkpure[^1^]
    -download soul knight 2.2.5 apk uptodown
    -download soul knight 2.2.5 apk happymod
    -download soul knight 2.2.5 apk android 1
    -download soul knight 2.2.5 apk mod menu
    -download soul knight 2.2.5 apk mod money
    -download soul knight 2.2.5 apk mod gems
    -download soul knight 2.2.5 apk mod all characters unlocked
    -download soul knight 2.2.5 apk mod god mode
    -download soul knight 2.2.5 apk mod unlimited energy
    -download soul knight 2.2.5 apk mod free shopping
    -download soul knight 2.2.5 apk mod free craft
    -download soul knight 2.2.5 apk mod free skins
    -download soul knight 2.2.5 apk mod free pets
    -download soul knight 2.2.5 apk mod free weapons
    -download soul knight 2.2.5 apk mod free buffs
    -download soul knight 2.2.5 apk mod free chests
    -download soul knight 2.2

    -

    Randomly generated dungeons and enemies

    -

    Soul Knight has a high replay value thanks to its randomly generated dungeons and enemies. Each time you play the game, you will encounter different levels, layouts, traps, secrets, bosses, and enemies. The game has several biomes to explore, such as forests, deserts, glaciers, volcanoes, temples, spaceships, etc. Each biome has its own theme, music, enemies, and bosses. The game also has different modes to challenge your skills, such as boss rush, endless mode, daily challenge, etc.

    -

    NPCs that fight by your side

    -

    Soul Knight is not a lonely game. You can recruit NPCs to join your adventure and help you in combat. There are various types of NPCs in the game, such as mercenaries, pets, plants, machines, etc. Each NPC has its own abilities and behaviors. You can find NPCs in dungeons, shops, or by using certain items. You can also play with friends or other players online in multiplayer mode.

    -

    Auto-aim mechanism for intuitive control

    -

    Soul Knight has a simple and intuitive control system that makes the game easy to play on mobile devices. You can move your character with a virtual joystick on the left side of the screen, and use buttons on the right side to switch weapons, use skills, or interact with objects. The game also has an auto-aim mechanism that automatically targets the nearest enemy for you. You can adjust the sensitivity and accuracy of the auto-aim in the settings menu.

    -

    Why download Soul Knight 2.2.5 APK?

    -

    The latest version of the game

    -

    If you want to enjoy the most updated and improved version of Soul Knight, you should download the 2.2.5 APK file for Android. The APK file is a package that contains all the files and data needed to install and run the game on your device. By downloading the APK file, you can bypass the Google Play Store and get the latest version of the game directly from the source.

    -

    New characters, weapons, and biomes

    -

    The 2.2.5 version of Soul Knight introduces some new content and features to the game. For example, you can play as two new characters: the Engineer, who can build turrets and drones, and the Officer, who can summon backup and use a riot shield. You can also use over 20 new weapons, such as the Flamethrower, the Plasma Cutter, and the Lightning Staff. Additionally, you can explore two new biomes: the Ancient Ruins, where you can find ancient relics and secrets, and the Space Station, where you can encounter alien invaders and futuristic technology.

    -

    New modes, quests, and achievements

    -

    The 2.2.5 version of Soul Knight also adds some new modes, quests, and achievements to the game. For example, you can try the new Hardcore Mode, where you have to face more difficult enemies and bosses with limited resources. You can also complete new quests from the Alchemist, who will reward you with rare materials and items. Moreover, you can unlock new achievements and trophies that will show your progress and skill in the game.

    -

    Bug fixes and performance improvements

    -

    The 2.2.5 version of Soul Knight also fixes some bugs and improves the performance of the game. For example, it fixes some crashes and glitches that occurred in previous versions of the game. It also optimizes the graphics and sound quality of the game for a smoother and more immersive experience.

    -

    How to download and install Soul Knight 2.2.5 APK?

    -

    Step 1: Enable unknown sources on your device

    -

    Before you can install the Soul Knight 2.2.5 APK file on your device, you need to enable unknown sources in your settings menu. This will allow you to install apps from sources other than the Google Play Store. To do this, follow these steps:

    -
      -
    • Go to your device's settings menu.
    • -
    • Tap on security or privacy (depending on your device).
    • -
    • Find and enable unknown sources or allow installation from unknown sources.
    • -
    • A warning message will pop up. Tap on OK or confirm to proceed.
    • -
    -

    Step 2: Download the APK file from a trusted source

    -

    Next, you need to download the Soul Knight 2.2.5 APK file from a trusted source on your device. There are many websites that offer APK files for free download, but not all of them are safe and reliable. Some of them may contain viruses or malware that can harm your device or steal your data. To avoid this, you should only download APK files from reputable sources that have positive reviews and ratings from other users. One such source is [APKPure], a website that provides original and pure APK files for various apps and games.

    -

    To download the Soul Knight 2.2.5 APK file from APKPure, follow these steps:

    -
      -
    • Go to the [APKPure website] on your device's browser.
    • -
    • Search for Soul Knight in the search bar or browse the categories.
    • -
    • Tap on the Soul Knight icon and then tap on Download APK.
    • -
    • Choose a download location and wait for the download to finish.
    • -
    -

    Step 3: Locate and install the APK file on your device

    -

    After you have downloaded the Soul Knight 2.2.5 APK file, you need to locate and install it on your device. To do this, follow these steps:

    -
      -
    • Go to your device's file manager or downloads folder.
    • -
    • Find and tap on the Soul Knight 2.2.5 APK file.
    • -
    • A prompt will appear asking you to install the app. Tap on Install or confirm to proceed.
    • -
    • Wait for the installation to complete.
    • -
    -

    Step 4: Launch the game and enjoy

    -

    Congratulations, you have successfully installed Soul Knight 2.2.5 APK on your device. Now you can launch the game and enjoy its new features and improvements. To do this, follow these steps:

    -
      -
    • Go to your device's app drawer or home screen.
    • -
    • Find and tap on the Soul Knight icon.
    • -
    • The game will start and ask you to grant some permissions. Tap on Allow or confirm to proceed.
    • -
    • The game will load and show you the main menu. Tap on Start or Play to begin your adventure.
    • -
    -

    Tips and tricks for playing Soul Knight

    -

    Choose the right character for your playstyle

    -

    Soul Knight has a lot of characters to choose from, each with their own abilities and skills. However, not all characters are suitable for every situation or playstyle. You should choose a character that matches your preferences and strategy. For example, if you like to play aggressively and deal a lot of damage, you might want to choose a character like the Assassin, who can turn invisible and deal critical hits, or the Berserker, who can increase his attack speed and damage when his health is low. On the other hand, if you like to play defensively and support your allies, you might want to choose a character like the Priest, who can heal himself and others, or the Engineer, who can build turrets and drones to distract enemies.

    -

    Use a melee weapon to save energy and deflect bullets

    -

    Soul Knight has two types of weapons: ranged and melee. Ranged weapons use energy to fire bullets, lasers, rockets, etc., while melee weapons use no energy and can hit enemies at close range. However, melee weapons have another advantage: they can deflect enemy bullets back at them. This can be very useful when you are facing a lot of enemies or bosses that shoot a lot of projectiles at you. You can use a melee weapon to block their attacks and deal damage back at them. You can also save energy by using a melee weapon instead of a ranged weapon when possible.

    -

    Pick up the best buffs and statues for your build

    -

    Soul Knight has a lot of buffs and statues that can enhance your character's abilities and performance in the game. Buffs are temporary effects that you can get from chests, shops, or certain items. They can increase your stats, such as health, armor, damage, speed, etc., or give you special effects, such as immunity, regeneration, reflection, etc. Statues are permanent effects that you can get from activating statues in dungeons or using certain items. They can give you passive skills, such as summoning allies, shooting lasers, freezing enemies, etc., or active skills that you can use by tapping on them.

    -

    You should pick up the buffs and statues that suit your character's build and playstyle. For example, if you are playing as a character that relies on skills, you might want to pick up buffs that reduce skill cooldown or increase skill damage, or statues that give you extra skills or enhance your existing skills. On the other hand, if you are playing as a character that relies on weapons, you might want to pick up buffs that increase weapon damage or energy recovery, or statues that give you extra weapons or enhance your existing weapons.

    -

    Craft and upgrade your weapons and armor in the workshop

    -

    Soul Knight has a workshop where you can craft and upgrade your weapons and armor using materials that you collect in the game. You can access the workshop from the lobby or from certain rooms in dungeons. Crafting allows you to create new weapons or armor from scratch using blueprints that contain viruses or malware that can harm your device or steal your data. You should also enable unknown sources on your device before installing the APK file, and disable it after the installation is done. -

  11. Q: What are the minimum requirements to play Soul Knight 2.2.5 APK on Android?
  12. -
  13. A: Soul Knight 2.2.5 APK requires Android 4.4 or higher to run on your device. It also requires about 150 MB of free storage space on your device.
  14. -
  15. Q: How can I update Soul Knight 2.2.5 APK to the next version?
  16. -
  17. A: Soul Knight 2.2.5 APK is not automatically updated by the Google Play Store, so you will have to manually download and install the next version of the game when it is released. You can check for updates on the APKPure website or in the game itself.
  18. -
  19. Q: How can I get more gems and gold in Soul Knight 2.2.5 APK?
  20. -
  21. A: Gems and gold are the main currencies in Soul Knight that you can use to unlock characters, weapons, armor, buffs, statues, etc. You can earn gems and gold by playing the game, completing quests, achievements, or watching ads. You can also buy gems and gold with real money in the game's shop.
  22. -
  23. Q: How can I contact the developers of Soul Knight 2.2.5 APK?
  24. -
  25. A: Soul Knight 2.2.5 APK is developed by ChillyRoom, a Chinese indie game studio. You can contact them by email at chillyroominc@gmail.com, or by following them on their social media accounts, such as Facebook, Twitter, Instagram, or YouTube.
  26. -

    401be4b1e0
    -
    -
    \ No newline at end of file diff --git a/spaces/felixz/meta_open_llm_leaderboard/fix_old_data.py b/spaces/felixz/meta_open_llm_leaderboard/fix_old_data.py deleted file mode 100644 index 637386db3e1d62347511faf86ec2dd7b241235f6..0000000000000000000000000000000000000000 --- a/spaces/felixz/meta_open_llm_leaderboard/fix_old_data.py +++ /dev/null @@ -1,44 +0,0 @@ -import os -import json -import shutil - -data_path = './data/' -no_generated_image_path = './no_generated_image.png' # Update this path to the location of no_generated_image.png - -expected_files = [ - 'bigcode_leaderboard.json', - 'bigcode_leaderboard.png', - 'hf_llm_diagramv2.json', - 'hf_llm_diagramv2.png', - 'hf_llm_diagramv2_other_permissive.json', - 'hf_llm_diagramv2_other_permissive.png', - 'hf_llm_diagramv2_permissive.json', - 'hf_llm_diagramv2_permissive.png', - 'hf_llm_diagramv2_rescore.json', - 'hf_llm_diagramv2_rescore.png', - 'hf_llm_diagramv2_rescore2.json', - 'hf_llm_diagramv2_rescore2.png', - 'hg_average_to_agentbench_compare.png', - 'hg_average_to_alpacaeval_compare.png', - 'hg_average_to_mosaic_compare.png', - 'hg_average_to_mt_bench_compare.png', - 'hg_average_to_opencompass_compare.png' -] - -# Traverse the directories under /data/ that match the date format -for dir_name in os.listdir(data_path): - if os.path.isdir(os.path.join(data_path, dir_name)): - for expected_file in expected_files: - file_path = os.path.join(data_path, dir_name, expected_file) - - # Check if the file is missing - if not os.path.exists(file_path): - # If it's a PNG file, copy the no_generated_image.png - if expected_file.endswith('.png'): - shutil.copy(no_generated_image_path, file_path) - # If it's a JSON file, create it with [] as its content - elif expected_file.endswith('.json'): - with open(file_path, 'w') as f: - json.dump([], f) - -print("Process completed!") \ No newline at end of file diff --git a/spaces/feregVcuzo/sanity-test-midi/checkpoint/Beach Buggy Racing MOD APK A Fun and Action-Packed Racing Game with All Cars Unlocked and Free Shopping.md b/spaces/feregVcuzo/sanity-test-midi/checkpoint/Beach Buggy Racing MOD APK A Fun and Action-Packed Racing Game with All Cars Unlocked and Free Shopping.md deleted file mode 100644 index f0ebdeb7c1377663b12f0228552d541b4bda5191..0000000000000000000000000000000000000000 --- a/spaces/feregVcuzo/sanity-test-midi/checkpoint/Beach Buggy Racing MOD APK A Fun and Action-Packed Racing Game with All Cars Unlocked and Free Shopping.md +++ /dev/null @@ -1,148 +0,0 @@ - -

    Beach Buggy Racing Mod APK Unlocked All Cars: A Fun and Thrilling Kart Racing Game

    -

    If you are looking for a kart racing game that offers you a fun and thrilling experience, then you should try Beach Buggy Racing Mod APK Unlocked All Cars. This game is a sequel to the popular Beach Buggy Blitz, which has over 30 million players worldwide. In this game, you can drive into an action-packed, surprise-filled world of off-road kart racing mayhem. You can race against a field of rival drivers, each with unique personalities and special abilities. You can also build a collection of crazy power-ups, like Dodgeball Frenzy, Fireball, and Oil Slick. You can unlock and upgrade a variety of cars, from dune buggies to monster trucks. You can test your skills in six different game modes on 15 imaginative 3D race tracks, against a pack of tropical-loving rivals with a serious case of road rage.

    -

    Beach Buggy Racing Mod APK Unlocked All Cars is not just a great looking 3D racing game, it's an epic battle with spectacular physics-based gameplay. It's fast, furious, fun, and free. It's a kart-racing island adventure for all ages. In this article, we will tell you more about the features, benefits, download process, tips and tricks, and review of this amazing game. So, let's get started.

    -

    beach buggy racing mod apk unlocked all cars


    Download Ziphttps://gohhs.com/2uPt94



    -

    Features of Beach Buggy Racing Mod APK

    -

    Beach Buggy Racing Mod APK Unlocked All Cars has many features that make it one of the best kart racing games on the market. Here are some of them:

    -

    Diverse Vehicle System

    -

    This game has a diverse vehicle system that allows you to choose from eight different cars, each with different stats and upgrades. You can choose from dune buggies, muscle cars, monster trucks, lunar rovers, and more. You can also use your winnings to collect and upgrade your cars to improve their speed, acceleration, handling, and power-ups.

    -

    Cool Cars to Customize

    -

    This game also lets you customize your cars to make them look more cool and unique. You can change the paint color, add decals, stickers, flags, and more. You can also change the wheels, spoilers, bumpers, and other parts of your car to suit your style.

    -

    Tons of Amazing Power-ups

    -

    This game has over 25 totally unique power-ups that you can use to fight your way to the finish line. You can use rockets, fireballs, oil slicks, shields, lightning bolts, magnets, and more to outwit your opponents or repel their attacks. You can also collect a team of racers, each with a unique special power like teleportation, flaming fire tracks, and confusion spells.

    15 Spectacular Race Tracks

    -

    This game has 15 spectacular race tracks that will take you to different locations and environments. You can race on beaches, jungles, volcanoes, swamps, caves, and more. You can also explore sun-swept islands, ancient ruins, and secret shortcuts. Each track has its own challenges, obstacles, and surprises. You can also unlock new tracks as you progress in the game.

    -

    Collect a Team of Racers

    -

    This game also allows you to collect a team of racers, each with their own unique personality and special power. You can recruit a roster of drivers to play with, including a surfer girl, a zombie, a pirate, an alien, and more. You can also switch drivers between races to use their special abilities. For example, you can use Rez's teleportation to skip ahead of the pack, or McSkelly's confusion spell to mess with your rivals.

    -

    Split Screen Multiplayer

    -

    This game also supports split screen multiplayer mode, which means you can play with up to four friends on the same device. You can challenge your friends or family to a race on any track and see who is the best driver. You can also use the power-ups to sabotage or help each other. This mode is perfect for parties or casual gaming sessions.

    -

    Benefits of Beach Buggy Racing Mod APK

    -

    Beach Buggy Racing Mod APK Unlocked All Cars has many benefits that make it more enjoyable and convenient than the original version. Here are some of them:

    -

    beach buggy racing hack apk unlimited money and gems
    -beach buggy racing 2 mod apk all cars unlocked
    -beach buggy racing mod apk latest version download
    -beach buggy racing unlimited coins and diamonds apk
    -beach buggy racing mod apk free shopping
    -beach buggy racing mod apk revdl
    -beach buggy racing mod apk android 1
    -beach buggy racing mod apk no root
    -beach buggy racing mod apk offline
    -beach buggy racing mod apk obb
    -beach buggy racing mod apk rexdl
    -beach buggy racing mod apk happymod
    -beach buggy racing mod apk unlimited everything
    -beach buggy racing mod apk ios
    -beach buggy racing mod apk 2023.04.18
    -beach buggy racing mod apk pure
    -beach buggy racing mod apk online
    -beach buggy racing mod apk data
    -beach buggy racing mod apk for pc
    -beach buggy racing mod apk old version
    -beach buggy racing hack download for android
    -beach buggy racing cheat codes for all cars
    -beach buggy racing unlimited tickets and powerups apk
    -beach buggy racing 2 hack apk download
    -beach buggy racing 2 unlock all cars cheat
    -beach buggy racing 2 mod menu apk
    -beach buggy racing 2 unlimited gems and coins apk
    -beach buggy racing 2 latest mod apk
    -beach buggy racing 2 hack version download
    -beach buggy racing 2 mod apk android republic
    -beach buggy racing 2 hack online generator
    -beach buggy racing 2 cheat engine pc
    -beach buggy racing 2 free shopping mod apk
    -beach buggy racing 2 mod apk no ads
    -beach buggy racing 2 hack ios download
    -beach buggy racing 2 hack tool no survey
    -beach buggy racing 2 hack without human verification
    -beach buggy racing 2 hack lucky patcher
    -beach buggy racing 2 hack game guardian
    -beach buggy racing 2 hack reddit
    -how to unlock all cars in beach buggy racing for free
    -how to get unlimited gems in beach buggy racing
    -how to download and install beach buggy racing mod apk
    -how to play beach buggy racing offline mode
    -how to update beach buggy racing mod apk
    -how to use power ups in beach buggy racing
    -how to win races in beach buggy racing
    -how to get free tickets in beach buggy racing
    -how to change car in beach buggy racing

    -

    Unlimited Money and Gems

    -

    This mod apk gives you unlimited money and gems, which are the main currencies in the game. You can use them to buy new cars, upgrade your existing ones, customize your appearance, and unlock new tracks. You don't have to worry about running out of money or gems or grinding for them. You can enjoy the game without any limitations.

    -

    Unlock All Cars

    -

    This mod apk also unlocks all the cars in the game, which means you can access any car you want without having to complete certain levels or tasks. You can choose from eight different cars, each with different stats and upgrades. You can also switch between them anytime you want. You don't have to spend money or gems to unlock them.

    -

    Free Shopping

    -

    This mod apk also enables free shopping, which means you can buy anything you want from the shop without spending any money or gems. You can buy new cars, upgrade your existing ones, customize your appearance, and unlock new tracks. You don't have to worry about the price or availability of anything. You can get whatever you want for free.

    -

    No Ads

    -

    This mod apk also removes all the ads from the game, which means you can play without any interruptions or distractions. You don't have to watch any videos or banners to earn extra money or gems or to access certain features. You don't have to deal with annoying pop-ups or redirects. You can enjoy the game without any hassle.

    -

    How to Download and Install Beach Buggy Racing Mod APK

    -

    If you want to download and install Beach Buggy Racing Mod APK Unlocked All Cars on your Android device, you need to follow these simple steps:

    -
      -
    1. Click on this link to download the mod apk file.
    2. -
    3. Go to your device settings and enable unknown sources.
    4. -
    5. Locate the downloaded file in your file manager and tap on it.
    6. -
    7. Follow the instructions on the screen to install the app.
    8. -
    9. Launch the app and enjoy the game.
    10. -
    -

    Note: If you have the original version of Beach Buggy Racing installed on your device, you need to uninstall it first before installing the mod apk.

    -

    Tips and Tricks for Beach Buggy Racing Mod APK

    -

    If you want to improve your skills and performance in Beach Buggy Racing Mod APK Unlocked All Cars, you need to follow these tips and tricks:

    -

    Upgrade Your Car

    -

    One of the most important things you need to do in this game is to upgrade your car regularly. Upgrading your car will increase its speed, acceleration, handling, and power-ups. You can upgrade your car by spending money and gems in the garage. You can also use parts that you find on the tracks or win from races. Upgrading your car will give you an edge over your opponents and help you win more races.

    -

    Choose the Right Driver

    -

    Another important thing you need to do in this game is to choose the right driver for each race. Each driver has a unique special power that can give them an advantage in certain situations. For example, Rez can teleport ahead of the pack, McSkelly can confuse the other racers, and Roxie can leave a trail of fire behind her. You can choose your driver by tapping on their icon before the race. You can also switch drivers between races to use their different abilities. Choosing the right driver will help you win more races and earn more rewards.

    -

    Use Power-ups Strategically

    -

    Another important thing you need to do in this game is to use power-ups strategically. Power-ups are items that you can collect on the tracks or activate with your driver's special power. Power-ups can help you attack your opponents, defend yourself, or boost your speed. You can use power-ups by tapping on the screen or tilting your device. You can also see what power-ups you have by looking at the icons on the top of the screen. Using power-ups strategically will help you overcome obstacles and challenges and win more races.

    -

    Master Drifting

    -

    Another important thing you need to do in this game is to master drifting. Drifting is a technique that allows you to turn corners without losing speed or control. Drifting also helps you fill up your boost meter, which gives you a burst of speed when you tap on it. You can drift by tapping and holding on the brake button while turning. You can also drift by tilting your device if you are using tilt controls. Mastering drifting will help you navigate the tracks faster and smoother and win more races.

    -

    Take Advantage of Shortcuts and Boost Pads

    -

    Another important thing you need to do in this game is to take advantage of shortcuts and boost pads. Shortcuts are hidden paths that allow you to skip parts of the track or reach secret areas. Boost pads are glowing spots that give you a speed boost when you drive over them. You can find shortcuts and boost pads by exploring the tracks or following the signs and arrows. Taking advantage of shortcuts and boost pads will help you gain an edge over your opponents and win more races.

    -

    Review of Beach Buggy Racing Mod APK

    -

    Beach Buggy Racing Mod APK Unlocked All Cars is a highly rated and popular game among users who have downloaded and played it. Here is a summary of the pros and cons of the game based on user reviews:

    - - - - - - - - - - - - - - - - - - - - - - - - - -
    ProsCons
    - Fun and addictive gameplay- Some bugs and glitches
    - Great graphics and sound effects- Some tracks are too hard or easy
    - Variety of cars, drivers, power-ups, and tracks- Some power-ups are too overpowered or useless
    - Split screen multiplayer mode- Some ads are still present
    - Unlimited money, gems, cars, and free shopping- None
    -

    Overall, Beach Buggy Racing Mod APK Unlocked All Cars is a game that deserves a try if you are looking for a fun and thrilling kart racing game. It has many features and benefits that make it stand out from other similar games. It also has some drawbacks that can be improved or fixed in future updates. However, these drawbacks do not affect the overall quality and enjoyment of the game.

    -

    Conclusion

    -

    Beach Buggy Racing Mod APK Unlocked All Cars is a game that offers you a fun and thrilling kart racing experience. You can drive into an action-packed, surprise-filled world of off-road kart racing mayhem. You can race against a field of rival drivers, each with unique personalities and special abilities. You can also build a collection of crazy power-ups, like Dodgeball Frenzy, Fireball, and Oil Slick. You can unlock and upgrade a variety of cars, from dune buggies to monster trucks. You can test your skills in six different game modes on 15 imaginative 3D race tracks, against a pack of tropical-loving rivals with a serious case of road rage.

    -

    Beach Buggy Racing Mod APK Unlocked All Cars also has many benefits that make it more enjoyable and convenient than the original version. You can get unlimited money and gems, unlock all cars, enjoy free shopping, and remove all ads from the game. You can also download and install the game easily by following our simple steps.

    -

    If you want to have a kart-racing island adventure for all ages, then you should download Beach Buggy Racing Mod APK Unlocked All Cars today. It's fast, furious, fun, and free. It's not just a great looking 3 D racing game, it's an epic battle with spectacular physics-based gameplay. It's a game that you will love to play and share with your friends and family.

    -

    FAQs

    -

    Here are some frequently asked questions and answers about Beach Buggy Racing Mod APK Unlocked All Cars:

    -
      -
    1. Is Beach Buggy Racing Mod APK safe to download and install?
    2. -

      Yes, Beach Buggy Racing Mod APK is safe to download and install. It does not contain any viruses, malware, or spyware. It also does not require any root or jailbreak access to your device. However, you should always download the mod apk from a trusted source and scan it with an antivirus before installing it.

      -
    3. Is Beach Buggy Racing Mod APK compatible with my device?
    4. -

      Beach Buggy Racing Mod APK is compatible with most Android devices that have Android 4.1 or higher. However, some devices may experience performance issues or crashes due to hardware limitations or compatibility issues. If you encounter any problems while playing the game, you can try lowering the graphics settings, closing other apps, or restarting your device.

      -
    5. How can I update Beach Buggy Racing Mod APK?
    6. -

      Beach Buggy Racing Mod APK is updated regularly to fix bugs, improve features, and add new content. You can check for updates by visiting the official website of the game or the source where you downloaded the mod apk. You can also enable automatic updates in your device settings. However, you should always backup your game data before updating to avoid losing your progress.

      -
    7. How can I contact the developers of Beach Buggy Racing Mod APK?
    8. -

      If you have any questions, feedback, suggestions, or complaints about Beach Buggy Racing Mod APK, you can contact the developers by emailing them at support@vectorunit.com. You can also visit their website at https://www.vectorunit.com/ or follow them on Facebook at https://www.facebook.com/VectorUnit/ or Twitter at https://twitter.com/VectorUnit.

      -
    9. How can I support the developers of Beach Buggy Racing Mod APK?
    10. -

      If you enjoy playing Beach Buggy Racing Mod APK and want to support the developers, you can do so by rating and reviewing the game on the Google Play Store or the source where you downloaded the mod apk. You can also share the game with your friends and family and invite them to play with you. You can also check out their other games, such as Riptide GP: Renegade, MouseBot: Escape from CatLab, and Shine Runner.

      -

    401be4b1e0
    -
    -
    \ No newline at end of file diff --git a/spaces/feregVcuzo/sanity-test-midi/checkpoint/Buku Tema 5 Pengalamanku Kelas 2 SDMI K13 Revisi 2017 Download Gratis.md b/spaces/feregVcuzo/sanity-test-midi/checkpoint/Buku Tema 5 Pengalamanku Kelas 2 SDMI K13 Revisi 2017 Download Gratis.md deleted file mode 100644 index 7c7bf8ecfe7e89310bedd8fd66cf040af4e560be..0000000000000000000000000000000000000000 --- a/spaces/feregVcuzo/sanity-test-midi/checkpoint/Buku Tema 5 Pengalamanku Kelas 2 SDMI K13 Revisi 2017 Download Gratis.md +++ /dev/null @@ -1,111 +0,0 @@ -
    -

    Download Buku Tema 5 Kelas 2 Revisi 2017: A Guide for Students and Teachers

    -

    If you are a student or a teacher of grade 2 in Indonesia, you might be interested in downloading Buku Tema 5 Kelas 2 Revisi 2017, a thematic integrated textbook that supports the implementation of the 2013 Curriculum. This book is designed to help you learn about your experiences in various settings, such as home, school, playground, and tourist places. In this article, we will explain what this book is, how to download it, and how to use it effectively.

    -

    download buku tema 5 kelas 2 revisi 2017


    DOWNLOAD ››››› https://gohhs.com/2uPpDN



    -

    What is Buku Tema 5 Kelas 2 Revisi 2017?

    -

    Buku Tema 5 Kelas 2 Revisi 2017 is a book for students and teachers of grade 2 in elementary schools (SD) and Islamic elementary schools (MI) in Indonesia. It is part of the thematic integrated books that are prepared by the government to support the implementation of the 2013 Curriculum, which emphasizes the achievement of students' competencies according to the established standards.

    -

    The purpose and benefits of the book

    -

    The purpose of this book is to help students develop their knowledge, skills, attitudes, and values related to their experiences in various settings. By learning through themes, students can follow a transdisciplinary learning process that links the competencies they learn with their context and environment. This book also aims to foster students' curiosity, creativity, collaboration, and communication skills.

    -

    Some of the benefits of using this book are:

    -
      -
    • It provides a comprehensive and relevant learning material that covers four sub-themes: My Experiences at Home, My Experiences at School, My Experiences at the Playground, and My Experiences at Tourist Places.
    • -
    • It offers a variety of activities that engage students in active learning, such as observing, exploring, experimenting, discussing, presenting, creating, and reflecting.
    • -
    • It integrates various subjects, such as Indonesian language, mathematics, natural sciences, social sciences, arts and culture, physical education, health education, religious education, and character education.
    • -
    • It incorporates values and life skills that are essential for students' personal and social development.
    • -
    -

    The contents and structure of the book

    -

    This book consists of four sub-themes, each with six lessons. At the end of each sub-theme, there is a reflection section with an icon "Sekarang Aku Bisa" (Now I Can) that helps students measure their own competencies that they have mastered after following the learning process for one sub-theme. The book also provides a glossary of terms and an index at the end.

    -

    Download buku siswa tema 5 pengalamanku kelas 2 revisi 2017
    -Download buku guru tema 5 pengalamanku kelas 2 revisi 2017
    -Download buku tematik terpadu kurikulum 2013 kelas 2 tema 5 revisi 2017
    -Download buku kurtilas kelas 2 semester 2 SD/MI revisi 2017
    -Download buku k13 kelas 2 tema 5 pengalamanku semester 2 revisi 2017
    -Download buku siswa kelas 2 SD tema 5 kurikulum 2013 revisi 2017 pdf
    -Download buku guru kelas 2 SD tema 5 kurikulum 2013 revisi 2017 pdf
    -Download buku tematik kelas 2 SD tema 5 pengalamanku revisi 2017 pdf
    -Download buku kurikulum 2013 kelas 2 SD semester genap revisi 2017
    -Download buku kurikulum 2013 kelas 2 MI semester genap revisi 2017
    -Cara download buku tema 5 pengalamanku kelas 2 revisi 2017 gratis
    -Link download buku tema 5 pengalamanku kelas 2 revisi 2017 lengkap
    -Situs download buku tema 5 pengalamanku kelas 2 revisi 2017 terpercaya
    -Review buku tema 5 pengalamanku kelas 2 revisi 2017 online
    -Baca online buku tema 5 pengalamanku kelas 2 revisi 2017 di aplikasi
    -Jual buku tema 5 pengalamanku kelas 2 revisi 2017 versi cetak
    -Beli buku tema 5 pengalamanku kelas 2 revisi 2017 di gramedia
    -Harga buku tema 5 pengalamanku kelas 2 revisi 2017 di toko online
    -Diskon buku tema 5 pengalamanku kelas 2 revisi 2017 di shopee
    -Promo buku tema 5 pengalamanku kelas 2 revisi 2017 di tokopedia
    -Isi buku tema 5 pengalamanku kelas 2 revisi 2017 berdasarkan subtema
    -Materi buku tema 5 pengalamanku kelas 2 revisi 2017 berdasarkan kompetensi dasar
    -Ringkasan buku tema

    -

    The structure of each lesson is as follows:

    -
      -
    • Amanat Guru (Teacher's Message): This section contains an introduction to the lesson topic and the learning objectives.
    • -
    • Pembelajaran (Learning): This section contains the main learning activities that guide students to explore the lesson topic through various methods and media.
    • -
    • Rangkuman (Summary): This section contains a summary of the main points of the lesson topic.
    • -
    • Tugas (Assignment): This section contains an assignment that challenges students to apply their knowledge and skills in different contexts.
    • -
    • Penilaian (Assessment): This section contains an assessment that evaluates students' understanding and performance on the lesson topic.
    • -
    -

    How to download Buku Tema 5 Kelas 2 Revisi 2017?

    -

    If you want to download this book for free, you can follow these steps:

    -

    The official source and

    The official source and link

    -

    The official source of this book is the Ministry of Education and Culture of the Republic of Indonesia, which is responsible for developing and publishing the thematic integrated books for elementary schools and Islamic elementary schools. You can access the official website of the ministry at https://kemdikbud.go.id .

    -

    The official link to download this book is https://bse.kemdikbud.go.id/content/buku/SD/SD%20Kelas%202%20Tema%205.pdf . This link will direct you to a PDF file of the book that you can save on your device or print out.

    -

    The steps and tips for downloading

    -

    To download this book, you need to have a stable internet connection and a device that can open PDF files, such as a computer, a tablet, or a smartphone. You also need to have enough storage space on your device to save the file. The file size of this book is about 17 MB.

    -

    Here are the steps and tips for downloading this book:

    -
      -
    1. Click on the link https://bse.kemdikbud.go.id/content/buku/SD/SD%20Kelas%202%20Tema%205.pdf or copy and paste it into your browser.
    2. -
    3. Wait for the PDF file to load on your browser. You can see the progress of the loading on the bottom left corner of your screen.
    4. -
    5. Once the file is fully loaded, you can view it on your browser or download it to your device. To download it, look for the download icon on the top right corner of your screen. It usually looks like a downward arrow or a diskette. Click on it and choose where you want to save the file on your device.
    6. -
    7. After saving the file, you can open it with any PDF reader application that you have on your device. You can also print it out if you prefer to have a hard copy of the book.
    8. -
    -

    Some tips for downloading this book are:

    -
      -
    • Make sure you have a good internet connection and enough battery power on your device before downloading.
    • -
    • Check the file name and location before saving it to avoid losing or duplicating it.
    • -
    • Scan the file with an antivirus program before opening it to ensure its safety and quality.
    • -
    • Share the link with your friends and classmates who might also need this book.
    • -
    -

    How to use Buku Tema 5 Kelas 2 Revisi 2017 effectively?

    -

    Now that you have downloaded this book, you might wonder how to use it effectively for your learning or teaching. Here are some suggestions:

    -

    The learning objectives and outcomes

    -

    The first thing you need to do is to understand the learning objectives and outcomes of each lesson and sub-theme. These are stated clearly in the Amanat Guru section and the Sekarang Aku Bisa section. By knowing what you are expected to learn and achieve, you can focus your attention and effort on the most important aspects of the lesson topic.

    -

    Some examples of learning objectives and outcomes are:

    - - - - - -
    Lesson TopicLearning ObjectivesLearning Outcomes
    My Experiences at Home (Lesson 1)To describe one's own experiences at home using simple sentences.To be able to write a paragraph about one's own experiences at home using simple sentences.
    My Experiences at School (Lesson 7)To identify and classify various objects at school based on their shapes, colors, sizes, and functions.To be able to name and sort various objects at school based on their shapes, colors, sizes, and functions.
    My Experiences at Tourist Places (Lesson 19)To compare and contrast different tourist places based on their characteristics, attractions, and facilities.To be able to make a poster that compares and contrasts different tourist places based on their characteristics, attractions, and facilities.
    -

    The activities and assessments

    -

    The next thing you need to do is to follow the activities and assessments that are provided in each lesson. These are designed to help you learn the lesson topic in an interactive and meaningful way. You should try to complete all the activities and assessments as instructed by your teacher or by yourself if you are learning independently.Some examples of activities and assessments are:

    - - - - - -
    Lesson TopicActivityAssessment
    My Experiences at Home (Lesson 1)To draw a picture of one's own home and label the rooms and furniture.To write a paragraph about one's own home using simple sentences and the words given.
    My Experiences at School (Lesson 7)To observe and collect various objects at school and group them according to their shapes, colors, sizes, and functions.To answer questions about the objects at school based on their shapes, colors, sizes, and functions.
    My Experiences at Tourist Places (Lesson 19)To research and present information about different tourist places using pictures, maps, brochures, and websites.To make a poster that compares and contrasts different tourist places using pictures, words, and symbols.
    -

    By doing the activities and assessments, you can practice your knowledge and skills in a fun and engaging way. You can also check your progress and understanding of the lesson topic. You should try to do your best and ask for help if you need it.

    -

    Conclusion

    -

    In conclusion, Buku Tema 5 Kelas 2 Revisi 2017 is a useful book for students and teachers of grade 2 in Indonesia. It helps you learn about your experiences in various settings through themes, activities, and assessments. It also integrates various subjects, values, and life skills that are important for your learning and development. You can download this book for free from the official website of the Ministry of Education and Culture of the Republic of Indonesia. You can also use this book effectively by following the learning objectives, outcomes, activities, and assessments that are provided in each lesson. We hope that this article has helped you understand more about this book and how to use it.

    -

    FAQs

    -

    Here are some frequently asked questions about this book:

    -
      -
    1. Q: What is the difference between Buku Tema 5 Kelas 2 Revisi 2017 and Buku Tema 5 Kelas 2 Edisi Lama?
    2. -
    3. A: Buku Tema 5 Kelas 2 Revisi 2017 is the revised edition of Buku Tema 5 Kelas 2 Edisi Lama. It has some improvements and updates in terms of content, layout, design, language, and illustrations. It also has more activities and assessments that are aligned with the 2013 Curriculum standards.
    4. -
    5. Q: How many pages does Buku Tema 5 Kelas 2 Revisi 2017 have?
    6. -
    7. A: Buku Tema 5 Kelas 2 Revisi 2017 has 160 pages in total. Each sub-theme has 40 pages, each lesson has six pages, and each reflection section has two pages.
    8. -
    9. Q: Can I use Buku Tema 5 Kelas 2 Revisi 2017 for other grades or levels?
    10. -
    11. A: No, you cannot use Buku Tema 5 Kelas 2 Revisi 2017 for other grades or levels. This book is specifically designed for students and teachers of grade 2 in elementary schools (SD) and Islamic elementary schools (MI) in Indonesia. It is based on the competencies and indicators that are appropriate for this grade or level.
    12. -
    13. Q: Can I modify or adapt Buku Tema 5 Kelas 2 Revisi 2017 for my own needs or preferences?
    14. -
    15. A: Yes, you can modify or adapt Buku Tema 5 Kelas 2 Revisi 2017 for your own needs or preferences as long as you do not change the original content or violate the intellectual property rights of the book. You can also add or supplement the book with other resources or materials that are relevant to your learning or teaching context.
    16. -
    17. Q: Where can I find more information or support about Buku Tema 5 Kelas 2 Revisi 2017?
    18. -
    19. A: You can find more information or support about Buku Tema 5 Kelas 2 Revisi A: You can find more information or support about Buku Tema 5 Kelas 2 Revisi 2017 from the following sources:
    20. -
        -
      • The Ministry of Education and Culture of the Republic of Indonesia: You can visit their website at https://kemdikbud.go.id or contact them by phone at (021) 5703303 or by email at info@kemdikbud.go.id.
      • -
      • The Center for Curriculum and Books Development: You can visit their website at https://bse.kemdikbud.go.id or contact them by phone at (021) 57906036 or by email at bse@kemdikbud.go.id.
      • -
      • Your school or teacher: You can ask your school or teacher for more guidance or assistance on how to use this book for your learning or teaching.
      • -

      401be4b1e0
      -
      -
      \ No newline at end of file diff --git a/spaces/feregVcuzo/sanity-test-midi/checkpoint/Download Nokia Bubble Shooter Today - The Most Popular Java Game for Nokia Phones.md b/spaces/feregVcuzo/sanity-test-midi/checkpoint/Download Nokia Bubble Shooter Today - The Most Popular Java Game for Nokia Phones.md deleted file mode 100644 index 31fc170cbebdea957be2661369f1850d0be1c8d3..0000000000000000000000000000000000000000 --- a/spaces/feregVcuzo/sanity-test-midi/checkpoint/Download Nokia Bubble Shooter Today - The Most Popular Java Game for Nokia Phones.md +++ /dev/null @@ -1,120 +0,0 @@ -
      -

      Download Nokia Bubble Shooter to Nokia Java: A Fun and Addictive Game for Your Mobile Phone

      -

      If you are looking for a fun and addictive game to play on your Nokia Java phone, you should try Nokia Bubble Shooter. This is a classic and popular game that will keep you entertained for hours. In this article, we will tell you what Nokia Bubble Shooter is, how to play it, why you should download it, and how to download it to your Nokia Java phone. We will also give you some tips and tricks for playing this game and getting high scores.

      -

      What is Nokia Bubble Shooter?

      -

      Nokia Bubble Shooter is a game that was developed by Ilyon Dynamics Ltd. and is available on Google Play Store. It is a game where you have to shoot bubbles of the same color to make them pop and clear the board. The game has three modes: Puzzle, Levels, and Classic. In Puzzle mode, you have to solve over 1800 challenging levels with different elements and features. In Levels mode, you have to match 3 or more bubbles to blast them and get more stars. In Classic mode, you have to pop all the bubbles in a simple and retro style.

      -

      download nokia bubble shooter to nokia java


      DOWNLOAD ……… https://gohhs.com/2uPuN0



      -

      How to play Nokia Bubble Shooter

      -

      The game is very easy to play. You just have to drag your finger to move the laser sight in the direction of the bubbles. Then, lift your finger to take a shot. You have to match 3 or more bubbles of the same color to pop them and clear the board. You can also use boosters, power-ups, and special bubbles to help you in your quest. The game has different obstacles and challenges that you have to overcome, such as moving bubbles, frozen bubbles, bombs, fireballs, and more.

      -

      Why you should download Nokia Bubble Shooter

      -

      There are many reasons why you should download Nokia Bubble Shooter to your Nokia Java phone. Here are some of them:

      -

      download bubble shooter game for nokia java phone
      -how to install bubble shooter on nokia java device
      -nokia java bubble shooter free download
      -bubble shooter java game source code for nokia
      -best bubble shooter games for nokia java mobile
      -download nokia bubble shooter jar file
      -play bubble shooter online on nokia java browser
      -nokia java bubble shooter tips and tricks
      -download nokia bubble shooter mod apk
      -bubble shooter java game tutorial for nokia
      -download nokia bubble shooter lite version
      -bubble shooter java game features for nokia
      -download nokia bubble shooter full version
      -bubble shooter java game reviews for nokia
      -download nokia bubble shooter latest update
      -bubble shooter java game cheats for nokia
      -download nokia bubble shooter offline mode
      -bubble shooter java game levels for nokia
      -download nokia bubble shooter from official website
      -bubble shooter java game graphics for nokia
      -download nokia bubble shooter with sound effects
      -bubble shooter java game controls for nokia
      -download nokia bubble shooter without ads
      -bubble shooter java game difficulty for nokia
      -download nokia bubble shooter with bonus levels
      -bubble shooter java game genres for nokia
      -download nokia bubble shooter with multiplayer mode
      -bubble shooter java game themes for nokia
      -download nokia bubble shooter with achievements and leaderboards
      -bubble shooter java game categories for nokia
      -download nokia bubble shooter with custom settings
      -bubble shooter java game development for nokia
      -download nokia bubble shooter with in-app purchases
      -bubble shooter java game compatibility for nokia
      -download nokia bubble shooter with cloud save
      -bubble shooter java game optimization for nokia
      -download nokia bubble shooter with high score system
      -bubble shooter java game performance for nokia
      -download nokia bubble shooter with different modes and challenges
      -bubble shooter java game quality for nokia

      -
        -
      • It is a free game that does not require an internet connection.
      • -
      • It is a fun and relaxing game that can improve your mood and reduce stress.
      • -
      • It is a brain-teasing game that can enhance your cognitive skills, such as concentration, memory, logic, and problem-solving.
      • -
      • It is a colorful and attractive game that can stimulate your senses and imagination.
      • -
      • It is an addictive game that can keep you entertained for hours and never get bored.
      • -
      -

      How to download Nokia Bubble Shooter to Nokia Java

      -

      If you want to download Nokia Bubble Shooter to your Nokia Java phone, you need to follow some simple steps. But before that, you need to make sure that your phone meets some requirements.

      -

      Requirements for downloading Nokia Bubble Shooter

      -

      To download Nokia Bubble Shooter to your Nokia Java phone, you need to have:

      -
        -
      • A compatible Nokia Java phone that supports J2ME applications.
      • -
      • A stable internet connection or Wi-Fi access.
      • -
      • A Google account or Gmail address.
      • -
      • Enough storage space on your phone or memory card.
      • -
      -

      Steps for downloading Nokia Bubble Shooter

      -

      Once you have met the requirements, you can follow these steps to download Nokia Bubble Shooter to your Nokia Java phone:

      -
        -
      1. Go to Google Play Store on your phone's browser or use this link:
      2. -
      3. Search for "Nokia Bubble Shooter" or use this link:
      4. -
      5. Tap on the "Install" button and accept the permissions.
      6. -
      7. Wait for the download and installation process to complete.
      8. -
      9. Launch the game from your app menu or home screen.
      10. -
      11. Enjoy playing Nokia Bubble Shooter on your Nokia Java phone.
      12. -
      -

      Tips and tricks for playing Nokia Bubble Shooter

      -

      To make the most out of Nokia Bubble Shooter, you can use some tips and tricks that can help you improve your game and get higher scores. Here are some of them:

      -
        -
      • Aim for the bubbles at the top of the board, as they can cause chain reactions and clear more bubbles.
      • -
      • Use the walls to bounce your shots and reach difficult angles.
      • -
      • Try to pop large groups of bubbles at once, as they can give you more points and bonuses.
      • -
      • Use the boosters and power-ups wisely, as they can help you in tricky situations or when you are stuck.
      • -
      • Watch out for the obstacles and special bubbles, as they can either help you or hinder you depending on how you deal with them.
      • -
      -

      Conclusion

      -

      Nokia Bubble Shooter is a fun and addictive game that you can download to your Nokia Java phone and enjoy playing anytime and anywhere. It is a game that can challenge your mind, relax your mood, and entertain your senses. It is a game that can suit anyone, regardless of age or skill level. It is a game that you should not miss.

      -

      Summary of the main points

      -

      In this article, we have covered the following points:

      -
        -
      • What Nokia Bubble Shooter is and how to play it.
      • -
      • Why you should download Nokia Bubble Shooter to your Nokia Java phone.
      • -
      • How to download Nokia Bubble Shooter to your Nokia Java phone.
      • -
      • Tips and tricks for playing Nokia Bubble Shooter.
      • -
      -

      Call to action

      -

      If you are ready to experience the fun and excitement of Nokia Bubble Shooter, do not hesitate to download it now. You can use this link: or go to Google Play Store on your phone's browser and search for "Nokia Bubble Shooter". You will not regret it. Download Nokia Bubble Shooter today and have a blast!

      -

      Frequently Asked Questions

      -

      Here are some frequently asked questions about Nokia Bubble Shooter:

      -
        -
      1. Is Nokia Bubble Shooter compatible with all Nokia Java phones?
      2. -

        Nokia Bubble Shooter is compatible with most Nokia Java phones that support J2ME applications. However, some older or low-end models may not be able to run the game smoothly or at all. You can check the compatibility of your phone on Google Play Store or contact the developer for more information.

        -
      3. How much space does Nokia Bubble Shooter take on my phone or memory card?
      4. -

        Nokia Bubble Shooter takes about 10 MB of space on your phone or memory card. You need to have enough free space before downloading the game. You can also move the game to your memory card if you want to save space on your phone.

        -
      5. How can I update Nokia Bubble Shooter to the latest version?
      6. -

        Nokia Bubble Shooter is regularly updated by the developer with new features, levels, and improvements. You can update the game automatically or manually through Google Play Store. You can also check for updates on the game's settings menu or on the developer's website.

        -
      7. How can I contact the developer of Nokia Bubble Shooter?
      8. -

        If you have any questions, feedback, suggestions, or issues regarding Nokia Bubble Shooter, you can contact the developer through the following channels:

        -
          -
        • Email: support@ilyon.net
        • -
        • Website: https://www.ilyon.net/
        • -
        • Facebook: https://www.facebook.com/ilyongames/
        • -
        • Twitter: https://twitter.com/IlyonGames
        • -
        -
      9. How can I share my scores and achievements with my friends?
      10. -

        Nokia Bubble Shooter allows you to connect with your Facebook account and share your scores and achievements with your friends. You can also invite your friends to play the game and compete with them on the leaderboards. You can also share your screenshots and videos of your gameplay on social media platforms such as Instagram, WhatsApp, Snapchat, etc.

        - : https://play.google.com/store/apps/details?id=bubbleshooter.orig

      197e85843d
      -
      -
      \ No newline at end of file diff --git a/spaces/fffiloni/ControlVideo/share_btn.py b/spaces/fffiloni/ControlVideo/share_btn.py deleted file mode 100644 index 9266666fe372280771d1b3ae4224f0e00fdabee8..0000000000000000000000000000000000000000 --- a/spaces/fffiloni/ControlVideo/share_btn.py +++ /dev/null @@ -1,77 +0,0 @@ -community_icon_html = """""" - -loading_icon_html = """""" - -share_js = """async () => { - async function uploadFile(file){ - const UPLOAD_URL = 'https://huggingface.co/uploads'; - const response = await fetch(UPLOAD_URL, { - method: 'POST', - headers: { - 'Content-Type': file.type, - 'X-Requested-With': 'XMLHttpRequest', - }, - body: file, /// <- File inherits from Blob - }); - const url = await response.text(); - return url; - } - - async function getVideoBlobFile(videoEL){ - const res = await fetch(videoEL.src); - const blob = await res.blob(); - const videoId = Date.now() % 200; - const fileName = `vid-zeroscope-${{videoId}}.mp4`; - const videoBlob = new File([blob], fileName, { type: 'video/mp4' }); - console.log(videoBlob); - return videoBlob; - } - - const gradioEl = document.querySelector("gradio-app").shadowRoot || document.querySelector('body > gradio-app'); - const inputVideo = gradioEl.querySelector('#video-in video'); - const captionTxt = gradioEl.querySelector('#prompt-in textarea').value; - const outputVideo = gradioEl.querySelector('#video-out video'); - - - const shareBtnEl = gradioEl.querySelector('#share-btn'); - const shareIconEl = gradioEl.querySelector('#share-btn-share-icon'); - const loadingIconEl = gradioEl.querySelector('#share-btn-loading-icon'); - if(!outputVideo){ - return; - }; - shareBtnEl.style.pointerEvents = 'none'; - shareIconEl.style.display = 'none'; - loadingIconEl.style.removeProperty('display'); - - const videoInFile = await getVideoBlobFile(inputVideo); - const dataInputVid = await uploadFile(videoInFile); - const videoOutFile = await getVideoBlobFile(outputVideo); - const dataOutputVid = await uploadFile(videoOutFile); - - const descriptionMd = ` -#### Video input: -${dataInputVid} - -#### Prompt: -${captionTxt} - -#### ControlVideo video result: -${dataOutputVid} - -`; - const params = new URLSearchParams({ - title: captionTxt, - description: descriptionMd, - }); - const paramsStr = params.toString(); - window.open(`https://huggingface.co/spaces/fffiloni/ControlVideo/discussions/new?${paramsStr}`, '_blank'); - shareBtnEl.style.removeProperty('pointer-events'); - shareIconEl.style.removeProperty('display'); - loadingIconEl.style.display = 'none'; -}""" \ No newline at end of file diff --git a/spaces/fffiloni/Image-to-MusicGen/audiocraft/modules/transformer.py b/spaces/fffiloni/Image-to-MusicGen/audiocraft/modules/transformer.py deleted file mode 100644 index be6a5e420fc53eebe9947aa5dde7bfebd3cb4dad..0000000000000000000000000000000000000000 --- a/spaces/fffiloni/Image-to-MusicGen/audiocraft/modules/transformer.py +++ /dev/null @@ -1,704 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -""" -Transformer model, with streaming support, xformer attention support -and easy causal attention with a potentially finite receptive field. - -See `StreamingTransformer` for more information. - -Unlike regular PyTorch Transformer, we make the hard choice that batches are first. -""" - -import typing as tp - -from einops import rearrange -import torch -import torch.nn as nn -from torch.nn import functional as F -from torch.utils.checkpoint import checkpoint as torch_checkpoint -from xformers import ops - -from .rope import RotaryEmbedding -from .streaming import StreamingModule - - -def _is_profiled() -> bool: - # Return true if we are currently running with a xformers profiler activated. - try: - from xformers.profiler import profiler - except ImportError: - return False - return profiler._Profiler._CURRENT_PROFILER is not None - - -def create_norm_fn(norm_type: str, dim: int, **kwargs) -> nn.Module: - """Create normalization module for transformer encoder layer. - - Args: - norm_type (str): Normalization method. - dim (int): Dimension of the normalized layer. - **kwargs (dict): Additional parameters for normalization layer. - Returns: - nn.Module: Normalization module. - """ - if norm_type == 'layer_norm': - return nn.LayerNorm(dim, eps=1e-5, **kwargs) - else: - raise ValueError(f"Unknown norm type: {norm_type}") - - -def create_sin_embedding(positions: torch.Tensor, dim: int, max_period: float = 10000, - dtype: torch.dtype = torch.float32) -> torch.Tensor: - """Create sinusoidal positional embedding, with shape `[B, T, C]`. - - Args: - positions (torch.Tensor): LongTensor of positions. - dim (int): Dimension of the embedding. - max_period (float): Maximum period of the cosine/sine functions. - dtype (torch.dtype or str): dtype to use to generate the embedding. - Returns: - torch.Tensor: Sinusoidal positional embedding. - """ - # We aim for BTC format - assert dim % 2 == 0 - half_dim = dim // 2 - positions = positions.to(dtype) - adim = torch.arange(half_dim, device=positions.device, dtype=dtype).view(1, 1, -1) - max_period_tensor = torch.full([], max_period, device=positions.device, dtype=dtype) # avoid sync point - phase = positions / (max_period_tensor ** (adim / (half_dim - 1))) - return torch.cat([torch.cos(phase), torch.sin(phase)], dim=-1) - - -def expand_repeated_kv(x: torch.Tensor, n_rep: int) -> torch.Tensor: - """torch.repeat_interleave(x, dim=2, repeats=n_rep) from xlformers""" - bs, slen, n_kv_heads, head_dim = x.shape - if n_rep == 1: - return x - return ( - x[:, :, :, None, :] - .expand(bs, slen, n_kv_heads, n_rep, head_dim) - .reshape(bs, slen, n_kv_heads * n_rep, head_dim) - ) - - -class LayerScale(nn.Module): - """Layer scale from [Touvron et al 2021] (https://arxiv.org/pdf/2103.17239.pdf). - This rescales diagonaly the residual outputs close to 0, with a learnt scale. - - Args: - channels (int): Number of channels. - init (float): Initial scale. - channel_last (bool): If True, expect `[*, C]` shaped tensors, otherwise, `[*, C, T]`. - device (torch.device or None): Device on which to initialize the module. - dtype (torch.dtype or None): dtype to use to initialize the module. - """ - def __init__(self, channels: int, init: float = 1e-4, channel_last: bool = True, - device=None, dtype=None): - super().__init__() - self.channel_last = channel_last - self.scale = nn.Parameter( - torch.full((channels,), init, - requires_grad=True, device=device, dtype=dtype)) - - def forward(self, x: torch.Tensor): - if self.channel_last: - return self.scale * x - else: - return self.scale[:, None] * x - - -class StreamingMultiheadAttention(StreamingModule): - """Similar to `nn.MultiheadAttention` but with support for streaming, causal evaluation. - - Args: - embed_dim (int): Dimension to project to. - num_heads (int): Number of heads. - dropout (float): Dropout level. - bias (bool): Use bias in projections. - causal (bool): Causal mask applied automatically. - past_context (int or None): Receptive field for the causal mask, infinite if None. - custom (bool): Use custom MHA implementation, for testing / benchmarking. - memory_efficient (bool): Use xformers based memory efficient attention. - attention_as_float32 (bool): Perform the attention as float32 - (especially important with memory_efficient as autocast won't do this automatically). - rope (`RotaryEmbedding` or None): Rope embedding to use. - cross_attention: Should be true when used as a cross attention. - All keys and values must be available at once, streaming is only for the queries. - Cannot be used with `causal` or `rope` (as it wouldn't make sens to - intepret the time steps in the keys relative to those in the queries). - safe_streaming (bool): Bug fix, will go away with xformers update. - qk_layer_norm (bool): Layer normalization applied to queries and keys before dot product. - kv_repeat (int): If > 1, will repeat keys and queries multiple times (need to divide num_heads). - This will lead to faster decoding time on A100 or other GPUs with tensorcore. - device (torch.device or None): Sevice on which to initialize. - dtype (torch.dtype or None): dtype to use. - """ - def __init__(self, embed_dim: int, num_heads: int, dropout: float = 0.0, bias: bool = True, - causal: bool = False, past_context: tp.Optional[int] = None, custom: bool = False, - memory_efficient: bool = False, attention_as_float32: bool = False, - rope: tp.Optional[RotaryEmbedding] = None, cross_attention: bool = False, - safe_streaming: bool = True, qk_layer_norm: bool = False, kv_repeat: int = 1, - device=None, dtype=None): - super().__init__() - factory_kwargs = {'device': device, 'dtype': dtype} - if past_context is not None: - assert causal - - self.embed_dim = embed_dim - self.causal = causal - self.past_context = past_context - self.memory_efficient = memory_efficient - self.attention_as_float32 = attention_as_float32 - self.rope = rope - self.cross_attention = cross_attention - self.safe_streaming = safe_streaming - self.num_heads = num_heads - self.dropout = dropout - self.kv_repeat = kv_repeat - if cross_attention: - assert not causal, "Causal cannot work with cross attention." - assert rope is None, "Rope cannot work with cross attention." - - if memory_efficient: - _verify_xformers_memory_efficient_compat() - - self.custom = _is_custom(custom, memory_efficient) - if self.custom: - out_dim = embed_dim - assert num_heads % kv_repeat == 0 - assert not cross_attention or kv_repeat == 1 - num_kv = num_heads // kv_repeat - kv_dim = (embed_dim // num_heads) * num_kv - out_dim += 2 * kv_dim - in_proj = nn.Linear(embed_dim, out_dim, bias=bias, **factory_kwargs) - # We try to follow the default PyTorch MHA convention, to easily compare results. - self.in_proj_weight = in_proj.weight - self.in_proj_bias = in_proj.bias - if bias: - self.in_proj_bias.data.zero_() # Following Pytorch convention - self.out_proj = nn.Linear(embed_dim, embed_dim, bias=bias, **factory_kwargs) - if bias: - self.out_proj.bias.data.zero_() - else: - assert not qk_layer_norm - assert kv_repeat == 1 - self.mha = nn.MultiheadAttention( - embed_dim, num_heads, dropout=dropout, bias=bias, batch_first=True, - **factory_kwargs) - self.qk_layer_norm = qk_layer_norm - if qk_layer_norm: - assert self.custom - assert kv_repeat == 1 - ln_dim = embed_dim - self.q_layer_norm = nn.LayerNorm(ln_dim) - self.k_layer_norm = nn.LayerNorm(ln_dim) - - def _load_from_state_dict(self, state_dict, prefix, *args, **kwargs): - if not self.custom: - # Support compat with regular MHA - keys = [n for n, _ in self.mha.named_parameters()] - for key in keys: - if prefix + key in state_dict: - state_dict[prefix + "mha." + key] = state_dict.pop(prefix + key) - super()._load_from_state_dict(state_dict, prefix, *args, **kwargs) - - def _get_mask(self, current_steps: int, device: torch.device, dtype: torch.dtype): - # Return a causal mask, accounting for potentially stored past keys/values - # We actually return a bias for the attention score, as this has the same - # convention both in the builtin MHA in Pytorch, and Xformers functions. - if self.memory_efficient: - from xformers.ops import LowerTriangularMask - if current_steps == 1: - # If we only have one step, then we do not need a mask. - return None - elif 'past_keys' in self._streaming_state: - raise RuntimeError('Not supported at the moment') - else: - # Then we can safely use a lower triangular mask - return LowerTriangularMask() - if self._streaming_state: - past_keys = self._streaming_state['past_keys'] - past_steps = past_keys.shape[1] - else: - past_steps = 0 - - queries_pos = torch.arange( - past_steps, current_steps + past_steps, device=device).view(-1, 1) - keys_pos = torch.arange(past_steps + current_steps, device=device).view(1, -1) - delta = queries_pos - keys_pos - valid = delta >= 0 - if self.past_context is not None: - valid &= (delta <= self.past_context) - return torch.where( - valid, - torch.zeros([], device=device, dtype=dtype), - torch.full([], float('-inf'), device=device, dtype=dtype)) - - def _complete_kv(self, k, v): - if self.cross_attention: - # With cross attention we assume all keys and values - # are already available, and streaming is with respect - # to the queries only. - return k, v - # Complete the key/value pair using the streaming state. - if self._streaming_state: - pk = self._streaming_state['past_keys'] - nk = torch.cat([pk, k], dim=1) - if v is k: - nv = nk - else: - pv = self._streaming_state['past_values'] - nv = torch.cat([pv, v], dim=1) - else: - nk = k - nv = v - - assert nk.shape[1] == nv.shape[1] - offset = 0 - if self.past_context is not None: - offset = max(0, nk.shape[1] - self.past_context) - if self._is_streaming: - self._streaming_state['past_keys'] = nk[:, offset:] - if v is not k: - self._streaming_state['past_values'] = nv[:, offset:] - if 'offset' in self._streaming_state: - self._streaming_state['offset'] += offset - else: - self._streaming_state['offset'] = torch.tensor(0) - return nk, nv - - def _apply_rope(self, query: torch.Tensor, key: torch.Tensor): - # Apply rope embeddings to query and key tensors. - assert self.rope is not None - if 'past_keys' in self._streaming_state: - past_keys_offset = self._streaming_state['past_keys'].shape[1] - else: - past_keys_offset = 0 - if 'offset' in self._streaming_state: - past_context_offset = int(self._streaming_state['offset'].item()) - else: - past_context_offset = 0 - streaming_offset = past_context_offset + past_keys_offset - return self.rope.rotate_qk(query, key, start=streaming_offset) - - def forward(self, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, - key_padding_mask=None, need_weights=False, attn_mask=None, - average_attn_weights=True, is_causal=False): - assert attn_mask is None - assert not is_causal, ("new param added in torch 2.0.1 not supported, " - "use the causal args in the constructor.") - - dtype = query.dtype - if self._is_streaming: - assert self.causal or self.cross_attention, \ - "Streaming only available for causal or cross attention" - - if self.causal: - # At the moment we specialize only for the self-attention case. - assert query.shape[1] == key.shape[1], "Causal only for same length query / key / value" - assert value.shape[1] == key.shape[1], "Causal only for same length query / key / value" - attn_mask = self._get_mask(query.shape[1], query.device, query.dtype) - - if self.custom: - # custom implementation - assert need_weights is False - assert key_padding_mask is None - if self.cross_attention: - # Different queries, keys, values, we have to spit manually the weights - # before applying the linear. - dim = self.in_proj_weight.shape[0] // 3 - if self.in_proj_bias is None: - bias_q, bias_k, bias_v = None, None, None - else: - bias_q = self.in_proj_bias[:dim] - bias_k = self.in_proj_bias[dim: 2 * dim] - bias_v = self.in_proj_bias[2 * dim:] - q = nn.functional.linear(query, self.in_proj_weight[:dim], bias_q) - # todo: when streaming, we could actually save k, v and check the shape actually match. - k = nn.functional.linear(key, self.in_proj_weight[dim: 2 * dim], bias_k) - v = nn.functional.linear(value, self.in_proj_weight[2 * dim:], bias_v) - if self.qk_layer_norm is True: - q = self.q_layer_norm(q) - k = self.k_layer_norm(k) - # q, k, v = [rearrange(x, "b t (h d) -> (b h) t d", h=self.num_heads) for x in [q, k, v]] - q, k, v = [rearrange(x, "b t (h d) -> b t h d", h=self.num_heads) for x in [q, k, v]] - else: - if not _is_profiled(): - # profiling breaks that propertysomehow. - assert query is key, "specialized implementation" - assert value is key, "specialized implementation" - projected = nn.functional.linear(query, self.in_proj_weight, self.in_proj_bias) - if self.kv_repeat == 1: - packed = rearrange(projected, "b t (p h d) -> b t p h d", p=3, h=self.num_heads) - q, k, v = ops.unbind(packed, dim=2) - else: - embed_dim = self.embed_dim - per_head_dim = (embed_dim // self.num_heads) - kv_heads = self.num_heads // self.kv_repeat - q = projected[:, :, :embed_dim] - start = embed_dim - end = start + per_head_dim * kv_heads - k = projected[:, :, start: end] - v = projected[:, :, end:] - q = rearrange(q, "b t (h d) -> b t h d", h=self.num_heads) - k = rearrange(k, "b t (h d) -> b t h d", h=kv_heads) - v = rearrange(v, "b t (h d) -> b t h d", h=kv_heads) - - if self.qk_layer_norm is True: - assert self.kv_repeat == 1 - q, k = [rearrange(x, "b t h d -> b t (h d)") for x in [q, k]] - q = self.q_layer_norm(q) - k = self.k_layer_norm(k) - q, k = [rearrange(x, "b t (h d) -> b t h d", h=self.num_heads) for x in [q, k]] - if self.rope: - q, k = self._apply_rope(q, k) - k, v = self._complete_kv(k, v) - if self.kv_repeat > 1: - k = expand_repeated_kv(k, self.kv_repeat) - v = expand_repeated_kv(v, self.kv_repeat) - if self.attention_as_float32: - q, k, v = [x.float() for x in [q, k, v]] - if self.memory_efficient: - p = self.dropout if self.training else 0 - x = ops.memory_efficient_attention(q, k, v, attn_mask, p=p) - else: - # We include the dot product as float32, for consistency - # with the other implementations that include that step - # as part of the attention. Note that when using `autocast`, - # the einsums would be done as bfloat16, but the softmax - # would be done as bfloat16, so `attention_as_float32` will - # extend a bit the range of operations done in float32, - # although this should make no difference. - q = q / q.shape[-1] ** 0.5 - if self._is_streaming and self.safe_streaming and q.device.type == 'cuda': - with torch.autocast(device_type=q.device.type, dtype=torch.float32): - pre_w = torch.einsum("bqhc,bkhc->bhqk", q, k) - else: - pre_w = torch.einsum("bqhc,bkhc->bhqk", q, k) - if attn_mask is not None: - pre_w = pre_w + attn_mask - w = torch.softmax(pre_w, dim=-1) - w = F.dropout(w, self.dropout, training=self.training).to(v) - x = torch.einsum("bhqk,bkhc->bqhc", w, v) - x = x.to(dtype) - x = rearrange(x, "b t h d -> b t (h d)", h=self.num_heads) - x = self.out_proj(x) - else: - key, value = self._complete_kv(key, value) - if self.attention_as_float32: - query, key, value = [x.float() for x in [query, key, value]] - x, _ = self.mha( - query, key, value, key_padding_mask, - need_weights, attn_mask, average_attn_weights) - x = x.to(dtype) - - return x, None - - -class StreamingTransformerLayer(nn.TransformerEncoderLayer): - """TransformerLayer with Streaming / Causal support. - This also integrates cross_attention, when passing `cross_attention=True`, - rather than having two separate classes like in PyTorch. - - Args: - d_model (int): Dimension of the data. - num_heads (int): Number of heads. - dim_feedforward (int): Intermediate dimension of FF module. - dropout (float): Dropout both for MHA and FF. - bias_ff (bool): Use bias for FF. - bias_attn (bool): Use bias for MHA. - causal (bool): Causal mask applied automatically. - past_context (int or None): Receptive field for the causal mask, infinite if None. - custom (bool): Use custom MHA implementation, for testing / benchmarking. - memory_efficient (bool): Use xformers based memory efficient attention. - attention_as_float32 (bool): Perform the attention as float32 - (especially important with memory_efficient as autocast won't do this automatically). - qk_layer_norm (bool): Layer normalization applied to queries and keys before dot product in attention. - qk_layer_norm_cross (bool): Same for the cross attention. - cross_attention (bool): If True, expect to get secondary input for cross-attention. - Cross attention will use the default MHA, as it typically won't require - special treatment. - layer_scale (float or None): If not None, LayerScale will be used with - the given value as initial scale. - rope (`RotaryEmbedding` or None): Rope embedding to use. - attention_dropout (float or None): If not None, separate the value of the dimension dropout - in FFN and of the attention dropout. - kv_repeat (int): If > 1, will repeat keys and queries multiple times (need to divide num_heads). - This will lead to faster decoding time on A100 or other GPUs with tensorcore. - device (torch.device or None): Device on which to initialize. - dtype (torch.dtype or None): dtype to use. - **kwargs: See `nn.TransformerEncoderLayer`. - """ - def __init__(self, d_model: int, num_heads: int, dim_feedforward: int = 2048, dropout: float = 0.1, - bias_ff: bool = True, bias_attn: bool = True, causal: bool = False, - past_context: tp.Optional[int] = None, custom: bool = False, - memory_efficient: bool = False, attention_as_float32: bool = False, - qk_layer_norm: bool = False, qk_layer_norm_cross: bool = False, - cross_attention: bool = False, layer_scale: tp.Optional[float] = None, - rope: tp.Optional[RotaryEmbedding] = None, attention_dropout: tp.Optional[float] = None, - kv_repeat: int = 1, norm: str = 'layer_norm', device=None, dtype=None, **kwargs): - super().__init__(d_model, num_heads, dim_feedforward, dropout, - device=device, dtype=dtype, batch_first=True, **kwargs) - factory_kwargs = {'device': device, 'dtype': dtype} - # Redefine self_attn to our streaming multi-head attention - attn_kwargs: tp.Dict[str, tp.Any] = { - 'embed_dim': d_model, - 'num_heads': num_heads, - 'dropout': dropout if attention_dropout is None else attention_dropout, - 'bias': bias_attn, - 'custom': custom, - 'memory_efficient': memory_efficient, - 'attention_as_float32': attention_as_float32, - } - self.self_attn: StreamingMultiheadAttention = StreamingMultiheadAttention( - causal=causal, past_context=past_context, rope=rope, qk_layer_norm=qk_layer_norm, - kv_repeat=kv_repeat, **attn_kwargs, **factory_kwargs) # type: ignore - # Redefine feedforward layers to expose bias parameter - self.linear1 = nn.Linear(d_model, dim_feedforward, bias=bias_ff, **factory_kwargs) - self.linear2 = nn.Linear(dim_feedforward, d_model, bias=bias_ff, **factory_kwargs) - - self.layer_scale_1: nn.Module - self.layer_scale_2: nn.Module - if layer_scale is None: - self.layer_scale_1 = nn.Identity() - self.layer_scale_2 = nn.Identity() - else: - self.layer_scale_1 = LayerScale(d_model, layer_scale, **factory_kwargs) - self.layer_scale_2 = LayerScale(d_model, layer_scale, **factory_kwargs) - - self.cross_attention: tp.Optional[nn.Module] = None - if cross_attention: - self.cross_attention = StreamingMultiheadAttention( - cross_attention=True, qk_layer_norm=qk_layer_norm_cross, - **attn_kwargs, **factory_kwargs) - # Norm and dropout - self.dropout_cross = nn.Dropout(dropout) - # eps value matching that used in PyTorch reference implementation. - self.norm_cross = nn.LayerNorm(d_model, eps=1e-5, **factory_kwargs) - self.layer_scale_cross: nn.Module - if layer_scale is None: - self.layer_scale_cross = nn.Identity() - else: - self.layer_scale_cross = LayerScale(d_model, layer_scale, **factory_kwargs) - self.norm1 = create_norm_fn(norm, d_model, **factory_kwargs) # type: ignore - self.norm2 = create_norm_fn(norm, d_model, **factory_kwargs) # type: ignore - - def _cross_attention_block(self, src: torch.Tensor, - cross_attention_src: torch.Tensor) -> torch.Tensor: - assert self.cross_attention is not None - # queries are from src, keys and values from cross_attention_src. - x = self.cross_attention( - src, cross_attention_src, cross_attention_src, need_weights=False)[0] - return self.dropout_cross(x) # type: ignore - - def forward(self, src: torch.Tensor, src_mask: tp.Optional[torch.Tensor] = None, # type: ignore - src_key_padding_mask: tp.Optional[torch.Tensor] = None, - cross_attention_src: tp.Optional[torch.Tensor] = None): - if self.cross_attention is None: - assert cross_attention_src is None - else: - assert cross_attention_src is not None - x = src - if self.norm_first: - x = x + self.layer_scale_1( - self._sa_block(self.norm1(x), src_mask, src_key_padding_mask)) - if cross_attention_src is not None: - x = x + self.layer_scale_cross( - self._cross_attention_block( - self.norm_cross(x), cross_attention_src)) - x = x + self.layer_scale_2(self._ff_block(self.norm2(x))) - else: - x = self.norm1(x + self.layer_scale_1( - self._sa_block(x, src_mask, src_key_padding_mask))) - if cross_attention_src is not None: - x = self.norm_cross( - x + self.layer_scale_cross( - self._cross_attention_block(src, cross_attention_src))) - x = self.norm2(x + self.layer_scale_2(self._ff_block(x))) - return x - - -class StreamingTransformer(StreamingModule): - """Transformer with Streaming / Causal support. - - Args: - d_model (int): Dimension of the data. - num_heads (int): Number of heads. - dim_feedforward (int): Intermediate dimension of FF module. - dropout (float): Dropout both for MHA and FF. - bias_ff (bool): Use bias for FF. - bias_attn (bool): Use bias for MHA. - causal (bool): Causal mask applied automatically. - past_context (int or None): Receptive field for the causal mask, infinite if None. - custom (bool): Use custom MHA implementation, for testing / benchmarking. - memory_efficient (bool): Use xformers based memory efficient attention. - attention_as_float32 (bool): Perform the attention as float32 - (especially important with memory_efficient as autocast won't do this automatically). - cross_attention (bool): If True, expect to get secondary input for cross-attention. - layer_scale (float or None): If not None, LayerScale will be used - with the given value as initial scale. - positional_embedding (str): Positional embedding strategy (sin, rope, or sin_rope). - max_period (float): Maximum period of the time embedding. - positional_scale (float): Scale of positional embedding, set to 0 to deactivate. - xpos (bool): Apply xpos exponential decay to positional embedding (rope only). - lr (float or None): learning rate override through the `make_optim_group` API. - weight_decay (float or None): Weight_decay override through the `make_optim_group` API. - layer_class: (subclass of `StreamingTransformerLayer): class to use - to initialize the layers, allowing further customization outside of Audiocraft. - checkpointing (str): Checkpointing strategy to reduce memory usage. - No checkpointing if set to 'none'. Per layer checkpointing using PyTorch - if set to 'torch' (entire layer checkpointed, i.e. linears are evaluated twice, - minimal memory usage, but maximal runtime). Finally, `xformers_default` provide - a policy for opting-out some operations of the checkpointing like - linear layers and attention, providing a middle ground between speed and memory. - device (torch.device or None): Device on which to initialize. - dtype (torch.dtype or None): dtype to use. - **kwargs: See `nn.TransformerEncoderLayer`. - """ - def __init__(self, d_model: int, num_heads: int, num_layers: int, dim_feedforward: int = 2048, - dropout: float = 0.1, bias_ff: bool = True, bias_attn: bool = True, - causal: bool = False, past_context: tp.Optional[int] = None, - custom: bool = False, memory_efficient: bool = False, attention_as_float32: bool = False, - cross_attention: bool = False, layer_scale: tp.Optional[float] = None, - positional_embedding: str = 'sin', max_period: float = 10_000, positional_scale: float = 1., - xpos: bool = False, lr: tp.Optional[float] = None, weight_decay: tp.Optional[float] = None, - layer_class: tp.Type[StreamingTransformerLayer] = StreamingTransformerLayer, - checkpointing: str = 'none', device=None, dtype=None, **kwargs): - super().__init__() - assert d_model % num_heads == 0 - - self.positional_embedding = positional_embedding - self.max_period = max_period - self.positional_scale = positional_scale - self.weight_decay = weight_decay - self.lr = lr - - assert positional_embedding in ['sin', 'rope', 'sin_rope'] - self.rope: tp.Optional[RotaryEmbedding] = None - if self.positional_embedding in ['rope', 'sin_rope']: - assert _is_custom(custom, memory_efficient) - self.rope = RotaryEmbedding(d_model // num_heads, max_period=max_period, - xpos=xpos, scale=positional_scale, device=device) - - self.checkpointing = checkpointing - - assert checkpointing in ['none', 'torch', 'xformers_default', 'xformers_mm'] - if self.checkpointing.startswith('xformers'): - _verify_xformers_internal_compat() - - self.layers = nn.ModuleList() - for idx in range(num_layers): - self.layers.append( - layer_class( - d_model=d_model, num_heads=num_heads, dim_feedforward=dim_feedforward, - dropout=dropout, bias_ff=bias_ff, bias_attn=bias_attn, - causal=causal, past_context=past_context, custom=custom, - memory_efficient=memory_efficient, attention_as_float32=attention_as_float32, - cross_attention=cross_attention, layer_scale=layer_scale, rope=self.rope, - device=device, dtype=dtype, **kwargs)) - - if self.checkpointing != 'none': - for layer in self.layers: - # see audiocraft/optim/fsdp.py, magic signal to indicate this requires fixing the - # backward hook inside of FSDP... - layer._magma_checkpointed = True # type: ignore - assert layer.layer_drop == 0., "Need further checking" # type: ignore - - def _apply_layer(self, layer, *args, **kwargs): - method = self.checkpointing - if method == 'none': - return layer(*args, **kwargs) - elif method == 'torch': - return torch_checkpoint(layer, *args, use_reentrant=False, **kwargs) - elif method.startswith('xformers'): - from xformers.checkpoint_fairinternal import checkpoint, _get_default_policy - if method == 'xformers_default': - # those operations will be saved, and not recomputed. - # According to Francisco we can get smarter policies but this is a good start. - allow_list = [ - "xformers.efficient_attention_forward_cutlass.default", - "xformers_flash.flash_fwd.default", - "aten.addmm.default", - "aten.mm.default", - ] - elif method == 'xformers_mm': - # those operations will be saved, and not recomputed. - # According to Francisco we can get smarter policies but this is a good start. - allow_list = [ - "aten.addmm.default", - "aten.mm.default", - ] - else: - raise ValueError(f"xformers checkpointing xformers policy {method} is not known.") - policy_fn = _get_default_policy(allow_list) - return checkpoint(layer, *args, policy_fn=policy_fn, **kwargs) - else: - raise ValueError(f"Checkpointing method {method} is unknown.") - - def forward(self, x: torch.Tensor, *args, **kwargs): - B, T, C = x.shape - - if 'offsets' in self._streaming_state: - offsets = self._streaming_state['offsets'] - else: - offsets = torch.zeros(B, dtype=torch.long, device=x.device) - - if self.positional_embedding in ['sin', 'sin_rope']: - positions = torch.arange(T, device=x.device).view(1, -1, 1) - positions = positions + offsets.view(-1, 1, 1) - pos_emb = create_sin_embedding(positions, C, max_period=self.max_period, dtype=x.dtype) - x = x + self.positional_scale * pos_emb - - for layer in self.layers: - x = self._apply_layer(layer, x, *args, **kwargs) - - if self._is_streaming: - self._streaming_state['offsets'] = offsets + T - - return x - - def make_optim_group(self): - group = {"params": list(self.parameters())} - if self.lr is not None: - group["lr"] = self.lr - if self.weight_decay is not None: - group["weight_decay"] = self.weight_decay - return group - - -# special attention attention related function - -def _verify_xformers_memory_efficient_compat(): - try: - from xformers.ops import memory_efficient_attention, LowerTriangularMask # noqa - except ImportError: - raise ImportError( - "xformers is not installed. Please install it and try again.\n" - "To install on AWS and Azure, run \n" - "FORCE_CUDA=1 TORCH_CUDA_ARCH_LIST='8.0'\\\n" - "pip install -U git+https://git@github.com/fairinternal/xformers.git#egg=xformers\n" - "To install on FAIR Cluster, run \n" - "FORCE_CUDA=1 TORCH_CUDA_ARCH_LIST='6.0;7.0'\\\n" - "pip install -U git+https://git@github.com/fairinternal/xformers.git#egg=xformers\n") - - -def _verify_xformers_internal_compat(): - try: - from xformers.checkpoint_fairinternal import checkpoint, _get_default_policy # noqa - except ImportError: - raise ImportError( - "Francisco's fairinternal xformers is not installed. Please install it and try again.\n" - "To install on AWS and Azure, run \n" - "FORCE_CUDA=1 TORCH_CUDA_ARCH_LIST='8.0'\\\n" - "pip install -U git+https://git@github.com/fairinternal/xformers.git#egg=xformers\n" - "To install on FAIR Cluster, run \n" - "FORCE_CUDA=1 TORCH_CUDA_ARCH_LIST='6.0;7.0'\\\n" - "pip install -U git+https://git@github.com/fairinternal/xformers.git#egg=xformers\n") - - -def _is_custom(custom: bool, memory_efficient: bool): - return custom or memory_efficient diff --git a/spaces/fffiloni/controlnet-animation-doodle/node_modules/body-parser/SECURITY.md b/spaces/fffiloni/controlnet-animation-doodle/node_modules/body-parser/SECURITY.md deleted file mode 100644 index 9694d429616df706508285a1ef185d40e45cdfae..0000000000000000000000000000000000000000 --- a/spaces/fffiloni/controlnet-animation-doodle/node_modules/body-parser/SECURITY.md +++ /dev/null @@ -1,25 +0,0 @@ -# Security Policies and Procedures - -## Reporting a Bug - -The Express team and community take all security bugs seriously. Thank you -for improving the security of Express. We appreciate your efforts and -responsible disclosure and will make every effort to acknowledge your -contributions. - -Report security bugs by emailing the current owner(s) of `body-parser`. This -information can be found in the npm registry using the command -`npm owner ls body-parser`. -If unsure or unable to get the information from the above, open an issue -in the [project issue tracker](https://github.com/expressjs/body-parser/issues) -asking for the current contact information. - -To ensure the timely response to your report, please ensure that the entirety -of the report is contained within the email body and not solely behind a web -link or an attachment. - -At least one owner will acknowledge your email within 48 hours, and will send a -more detailed response within 48 hours indicating the next steps in handling -your report. After the initial reply to your report, the owners will -endeavor to keep you informed of the progress towards a fix and full -announcement, and may ask for additional information or guidance. diff --git a/spaces/fffiloni/video2canny/app.py b/spaces/fffiloni/video2canny/app.py deleted file mode 100644 index 205e028734ae1cc352abdcbe69f53ace9edc71a9..0000000000000000000000000000000000000000 --- a/spaces/fffiloni/video2canny/app.py +++ /dev/null @@ -1,138 +0,0 @@ -import gradio as gr - -import os -import cv2 -import numpy as np -from PIL import Image -from moviepy.editor import * - -def get_frames(video_in): - frames = [] - #resize the video - clip = VideoFileClip(video_in) - - #check fps - if clip.fps > 30: - print("vide rate is over 30, resetting to 30") - clip_resized = clip.resize(height=512) - clip_resized.write_videofile("video_resized.mp4", fps=30) - else: - print("video rate is OK") - clip_resized = clip.resize(height=512) - clip_resized.write_videofile("video_resized.mp4", fps=clip.fps) - - print("video resized to 512 height") - - # Opens the Video file with CV2 - cap= cv2.VideoCapture("video_resized.mp4") - - fps = cap.get(cv2.CAP_PROP_FPS) - print("video fps: " + str(fps)) - i=0 - while(cap.isOpened()): - ret, frame = cap.read() - if ret == False: - break - cv2.imwrite('kang'+str(i)+'.jpg',frame) - frames.append('kang'+str(i)+'.jpg') - i+=1 - - cap.release() - cv2.destroyAllWindows() - print("broke the video into frames") - - return frames, fps - -def get_canny_filter(i): - image = Image.open(i) - - image = np.array(image) - - low_threshold = 100 - high_threshold = 200 - - image = cv2.Canny(image, low_threshold, high_threshold) - image = image[:, :, None] - image = np.concatenate([image, image, image], axis=2) - image = Image.fromarray(image) - image.save("canny_frame_" + str(i) + ".jpeg") - return "canny_frame_" + str(i) + ".jpeg" - -def create_video(frames, fps, type): - print("building video result") - clip = ImageSequenceClip(frames, fps=fps) - clip.write_videofile(type + "_result.mp4", fps=fps) - - return type + "_result.mp4" - -def convertG2V(imported_gif): - clip = VideoFileClip(imported_gif.name) - clip.write_videofile("my_gif_video.mp4") - return "my_gif_video.mp4" - -def infer(video_in): - - - # 1. break video into frames and get FPS - break_vid = get_frames(video_in) - frames_list= break_vid[0] - fps = break_vid[1] - #n_frame = int(trim_value*fps) - n_frame = len(frames_list) - - if n_frame >= len(frames_list): - print("video is shorter than the cut value") - n_frame = len(frames_list) - - # 2. prepare frames result arrays - result_frames = [] - print("set stop frames to: " + str(n_frame)) - - for i in frames_list[0:int(n_frame)]: - canny_frame = get_canny_filter(i) - result_frames.append(canny_frame) - print("frame " + i + "/" + str(n_frame) + ": done;") - - - final_vid = create_video(result_frames, fps, "canny") - - files = [final_vid] - - return final_vid, files - -title=""" -
      -
      -

      - Video to Canny Edge -

      -
      - -
      -""" - -with gr.Blocks() as demo: - with gr.Column(): - gr.HTML(title) - with gr.Row(): - with gr.Column(): - video_input = gr.Video(source="upload", type="filepath") - gif_input = gr.File(label="import a GIF instead", file_types=['.gif']) - gif_input.change(fn=convertG2V, inputs=gif_input, outputs=video_input) - submit_btn = gr.Button("Submit") - - with gr.Column(): - video_output = gr.Video() - file_output = gr.Files() - - submit_btn.click(fn=infer, inputs=[video_input], outputs=[video_output, file_output]) - -demo.launch() \ No newline at end of file diff --git a/spaces/fhatje/glomseg/README.md b/spaces/fhatje/glomseg/README.md deleted file mode 100644 index 0447b4684985d240bccbee7cc3b82759ccb587bc..0000000000000000000000000000000000000000 --- a/spaces/fhatje/glomseg/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: Glomseg -emoji: 🐨 -colorFrom: yellow -colorTo: purple -sdk: gradio -sdk_version: 3.9 -app_file: app.py -pinned: false -license: apache-2.0 ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/fkhuggingme/gpt-academic/crazy_functions/test_project/cpp/cppipc/buffer.cpp b/spaces/fkhuggingme/gpt-academic/crazy_functions/test_project/cpp/cppipc/buffer.cpp deleted file mode 100644 index 0ac0fa7bc3ced0447ba4caa359355dd4252670b3..0000000000000000000000000000000000000000 --- a/spaces/fkhuggingme/gpt-academic/crazy_functions/test_project/cpp/cppipc/buffer.cpp +++ /dev/null @@ -1,87 +0,0 @@ -#include "libipc/buffer.h" -#include "libipc/utility/pimpl.h" - -#include - -namespace ipc { - -bool operator==(buffer const & b1, buffer const & b2) { - return (b1.size() == b2.size()) && (std::memcmp(b1.data(), b2.data(), b1.size()) == 0); -} - -bool operator!=(buffer const & b1, buffer const & b2) { - return !(b1 == b2); -} - -class buffer::buffer_ : public pimpl { -public: - void* p_; - std::size_t s_; - void* a_; - buffer::destructor_t d_; - - buffer_(void* p, std::size_t s, buffer::destructor_t d, void* a) - : p_(p), s_(s), a_(a), d_(d) { - } - - ~buffer_() { - if (d_ == nullptr) return; - d_((a_ == nullptr) ? p_ : a_, s_); - } -}; - -buffer::buffer() - : buffer(nullptr, 0, nullptr, nullptr) { -} - -buffer::buffer(void* p, std::size_t s, destructor_t d) - : p_(p_->make(p, s, d, nullptr)) { -} - -buffer::buffer(void* p, std::size_t s, destructor_t d, void* additional) - : p_(p_->make(p, s, d, additional)) { -} - -buffer::buffer(void* p, std::size_t s) - : buffer(p, s, nullptr) { -} - -buffer::buffer(char const & c) - : buffer(const_cast(&c), 1) { -} - -buffer::buffer(buffer&& rhs) - : buffer() { - swap(rhs); -} - -buffer::~buffer() { - p_->clear(); -} - -void buffer::swap(buffer& rhs) { - std::swap(p_, rhs.p_); -} - -buffer& buffer::operator=(buffer rhs) { - swap(rhs); - return *this; -} - -bool buffer::empty() const noexcept { - return (impl(p_)->p_ == nullptr) || (impl(p_)->s_ == 0); -} - -void* buffer::data() noexcept { - return impl(p_)->p_; -} - -void const * buffer::data() const noexcept { - return impl(p_)->p_; -} - -std::size_t buffer::size() const noexcept { - return impl(p_)->s_; -} - -} // namespace ipc diff --git a/spaces/freddyaboulton/3.1.4.9-all-demos/demos/fake_gan_2/run.py b/spaces/freddyaboulton/3.1.4.9-all-demos/demos/fake_gan_2/run.py deleted file mode 100644 index 43df9a2b157463eb2e53a3bada0d54503071d261..0000000000000000000000000000000000000000 --- a/spaces/freddyaboulton/3.1.4.9-all-demos/demos/fake_gan_2/run.py +++ /dev/null @@ -1,41 +0,0 @@ -# This demo needs to be run from the repo folder. -# python demo/fake_gan/run.py -import os -import random -import time - -import gradio as gr - - -def fake_gan(*args): - time.sleep(1) - image = random.choice( - [ - "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80", - "https://images.unsplash.com/photo-1554151228-14d9def656e4?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=386&q=80", - "https://images.unsplash.com/photo-1542909168-82c3e7fdca5c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8aHVtYW4lMjBmYWNlfGVufDB8fDB8fA%3D%3D&w=1000&q=80", - "https://images.unsplash.com/photo-1546456073-92b9f0a8d413?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=387&q=80", - "https://images.unsplash.com/photo-1601412436009-d964bd02edbc?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=464&q=80", - ] - ) - return image - - -demo = gr.Interface( - fn=fake_gan, - inputs=[ - gr.Image(label="Initial Image (optional)"), - ], - outputs=gr.Image(label="Generated Image"), - title="FD-GAN", - description="This is a fake demo of a GAN. In reality, the images are randomly chosen from Unsplash.", - examples=[ - [os.path.join(os.path.dirname(__file__), "files/cheetah1.jpg")], - [os.path.join(os.path.dirname(__file__), "files/elephant.jpg")], - [os.path.join(os.path.dirname(__file__), "files/tiger.jpg")], - [os.path.join(os.path.dirname(__file__), "files/zebra.jpg")], - ], -) - -if __name__ == "__main__": - demo.launch() diff --git a/spaces/freddyaboulton/gradio_pdf/README.md b/spaces/freddyaboulton/gradio_pdf/README.md deleted file mode 100644 index d916db747787fe70d304af4f754a7143af360207..0000000000000000000000000000000000000000 --- a/spaces/freddyaboulton/gradio_pdf/README.md +++ /dev/null @@ -1,10 +0,0 @@ - ---- -tags: [gradio-custom-component, gradio-template-Fallback] -title: gradio_pdf V0.0.3 -colorFrom: indigo -colorTo: gray -sdk: docker -pinned: false -license: apache-2.0 ---- diff --git a/spaces/gbharti/fastai-model-deploy/app.py b/spaces/gbharti/fastai-model-deploy/app.py deleted file mode 100644 index a386efd840964d0aedc037c624d76ca7d080ae5c..0000000000000000000000000000000000000000 --- a/spaces/gbharti/fastai-model-deploy/app.py +++ /dev/null @@ -1,34 +0,0 @@ -# AUTOGENERATED! DO NOT EDIT! File to edit: ..\app.ipynb. - -# %% auto 0 -__all__ = ['learn', 'categories', 'image', 'label', 'examples', 'intf', 'is_cat', 'classify'] - -# %% ..\app.ipynb 1 -from sys import platform -import pathlib -if platform == 'linux': - pathlib.WindowsPath = pathlib.PosixPath - -# %% ..\app.ipynb 2 -from fastai.vision.all import * -import gradio as gr - -def is_cat(x): return x[0].isupper() - -# %% ..\app.ipynb 7 -learn = load_learner('model.pkl') - -# %% ..\app.ipynb 8 -categories = ('Dog', 'Cat') - -def classify(img): - pred,idx,probs = learn.predict(img) - return dict(zip(categories, map(float, probs))) - -# %% ..\app.ipynb 9 -image = gr.inputs.Image(shape=(192, 192)) -label = gr.outputs.Label() -examples = ['dog.jpg', 'cat.jpg'] - -intf = gr.Interface(fn=classify, inputs=image, outputs=label, examples=examples) -intf.launch(inline=False) diff --git a/spaces/georgefen/Face-Landmark-ControlNet/annotator/uniformer/mmcv/ops/points_in_boxes.py b/spaces/georgefen/Face-Landmark-ControlNet/annotator/uniformer/mmcv/ops/points_in_boxes.py deleted file mode 100644 index 4003173a53052161dbcd687a2fa1d755642fdab8..0000000000000000000000000000000000000000 --- a/spaces/georgefen/Face-Landmark-ControlNet/annotator/uniformer/mmcv/ops/points_in_boxes.py +++ /dev/null @@ -1,133 +0,0 @@ -import torch - -from ..utils import ext_loader - -ext_module = ext_loader.load_ext('_ext', [ - 'points_in_boxes_part_forward', 'points_in_boxes_cpu_forward', - 'points_in_boxes_all_forward' -]) - - -def points_in_boxes_part(points, boxes): - """Find the box in which each point is (CUDA). - - Args: - points (torch.Tensor): [B, M, 3], [x, y, z] in LiDAR/DEPTH coordinate - boxes (torch.Tensor): [B, T, 7], - num_valid_boxes <= T, [x, y, z, x_size, y_size, z_size, rz] in - LiDAR/DEPTH coordinate, (x, y, z) is the bottom center - - Returns: - box_idxs_of_pts (torch.Tensor): (B, M), default background = -1 - """ - assert points.shape[0] == boxes.shape[0], \ - 'Points and boxes should have the same batch size, ' \ - f'but got {points.shape[0]} and {boxes.shape[0]}' - assert boxes.shape[2] == 7, \ - 'boxes dimension should be 7, ' \ - f'but got unexpected shape {boxes.shape[2]}' - assert points.shape[2] == 3, \ - 'points dimension should be 3, ' \ - f'but got unexpected shape {points.shape[2]}' - batch_size, num_points, _ = points.shape - - box_idxs_of_pts = points.new_zeros((batch_size, num_points), - dtype=torch.int).fill_(-1) - - # If manually put the tensor 'points' or 'boxes' on a device - # which is not the current device, some temporary variables - # will be created on the current device in the cuda op, - # and the output will be incorrect. - # Therefore, we force the current device to be the same - # as the device of the tensors if it was not. - # Please refer to https://github.com/open-mmlab/mmdetection3d/issues/305 - # for the incorrect output before the fix. - points_device = points.get_device() - assert points_device == boxes.get_device(), \ - 'Points and boxes should be put on the same device' - if torch.cuda.current_device() != points_device: - torch.cuda.set_device(points_device) - - ext_module.points_in_boxes_part_forward(boxes.contiguous(), - points.contiguous(), - box_idxs_of_pts) - - return box_idxs_of_pts - - -def points_in_boxes_cpu(points, boxes): - """Find all boxes in which each point is (CPU). The CPU version of - :meth:`points_in_boxes_all`. - - Args: - points (torch.Tensor): [B, M, 3], [x, y, z] in - LiDAR/DEPTH coordinate - boxes (torch.Tensor): [B, T, 7], - num_valid_boxes <= T, [x, y, z, x_size, y_size, z_size, rz], - (x, y, z) is the bottom center. - - Returns: - box_idxs_of_pts (torch.Tensor): (B, M, T), default background = 0. - """ - assert points.shape[0] == boxes.shape[0], \ - 'Points and boxes should have the same batch size, ' \ - f'but got {points.shape[0]} and {boxes.shape[0]}' - assert boxes.shape[2] == 7, \ - 'boxes dimension should be 7, ' \ - f'but got unexpected shape {boxes.shape[2]}' - assert points.shape[2] == 3, \ - 'points dimension should be 3, ' \ - f'but got unexpected shape {points.shape[2]}' - batch_size, num_points, _ = points.shape - num_boxes = boxes.shape[1] - - point_indices = points.new_zeros((batch_size, num_boxes, num_points), - dtype=torch.int) - for b in range(batch_size): - ext_module.points_in_boxes_cpu_forward(boxes[b].float().contiguous(), - points[b].float().contiguous(), - point_indices[b]) - point_indices = point_indices.transpose(1, 2) - - return point_indices - - -def points_in_boxes_all(points, boxes): - """Find all boxes in which each point is (CUDA). - - Args: - points (torch.Tensor): [B, M, 3], [x, y, z] in LiDAR/DEPTH coordinate - boxes (torch.Tensor): [B, T, 7], - num_valid_boxes <= T, [x, y, z, x_size, y_size, z_size, rz], - (x, y, z) is the bottom center. - - Returns: - box_idxs_of_pts (torch.Tensor): (B, M, T), default background = 0. - """ - assert boxes.shape[0] == points.shape[0], \ - 'Points and boxes should have the same batch size, ' \ - f'but got {boxes.shape[0]} and {boxes.shape[0]}' - assert boxes.shape[2] == 7, \ - 'boxes dimension should be 7, ' \ - f'but got unexpected shape {boxes.shape[2]}' - assert points.shape[2] == 3, \ - 'points dimension should be 3, ' \ - f'but got unexpected shape {points.shape[2]}' - batch_size, num_points, _ = points.shape - num_boxes = boxes.shape[1] - - box_idxs_of_pts = points.new_zeros((batch_size, num_points, num_boxes), - dtype=torch.int).fill_(0) - - # Same reason as line 25-32 - points_device = points.get_device() - assert points_device == boxes.get_device(), \ - 'Points and boxes should be put on the same device' - if torch.cuda.current_device() != points_device: - torch.cuda.set_device(points_device) - - ext_module.points_in_boxes_all_forward(boxes.contiguous(), - points.contiguous(), - box_idxs_of_pts) - - return box_idxs_of_pts diff --git a/spaces/goliathaiconsulting/ecommerce-platform/app.py b/spaces/goliathaiconsulting/ecommerce-platform/app.py deleted file mode 100644 index 36622b31e3ad24f092ad98a3cb5d52af7752f3a9..0000000000000000000000000000000000000000 --- a/spaces/goliathaiconsulting/ecommerce-platform/app.py +++ /dev/null @@ -1,58 +0,0 @@ -import os -os.system('pip install openpyxl') -os.system('pip install sentence-transformers') -import pandas as pd -import gradio as gr -from sentence_transformers import SentenceTransformer -from sklearn.neighbors import NearestNeighbors -import numpy as np -import pandas as pd - -from sentence_transformers import SentenceTransformer - -model = SentenceTransformer('all-mpnet-base-v2') #all-MiniLM-L6-v2 #all-mpnet-base-v2 -# os.chdir(os.path.dirname(__file__)) -df = pd.read_parquet('df_encoded.parquet') - -#prepare model -nbrs = NearestNeighbors(n_neighbors=4, algorithm='ball_tree').fit(df['text_vector_'].values.tolist()) - -def search(df, query): - product = model.encode(query).tolist() - # product = df.iloc[0]['text_vector_'] #use one of the products as sample - - distances, indices = nbrs.kneighbors([product]) #input the vector of the reference object - - #print out the description of every recommended product - return df.iloc[list(indices)[0]][['Description', 'UnitPrice', 'Country']] - -import gradio as gr -import os - -#the first module becomes text1, the second module file1 -def greet(text1): - return search(df, text1) - -with gr.Blocks(theme=gr.themes.Soft(primary_hue='amber', secondary_hue='gray', neutral_hue='amber')) as demo: - gr.Markdown( - """ - # Try our DEMO!!! - """ - ) - txt = gr.Textbox(value='A Christmas present🎄for my 5 years old Kid!!!', label='What are you looking for?') - btn = gr.Button(value="Search for Product") - state = gr.Dataframe() - # btn.click(greet, inputs='text', outputs=['dataframe']) - btn.click(greet, [txt], [state]) - -demo.launch(share=False) - -# iface = gr.Interface( -# fn=greet, -# inputs=[ -# gr.Textbox(value='A Christmas present🎄for my 5 years old Kid!!!', label='Describe the product to search, then press submit') -# ], -# outputs=["dataframe"], -# title='DEMO: Ecommerce Product Recommendation' -# ) -# iface.launch(share=False) \ No newline at end of file diff --git a/spaces/gossminn/fillmorle-app/sftp/data_reader/srl_reader.py b/spaces/gossminn/fillmorle-app/sftp/data_reader/srl_reader.py deleted file mode 100644 index 3a2816c615c856b57ce29c07b69c51e5f1ce05cb..0000000000000000000000000000000000000000 --- a/spaces/gossminn/fillmorle-app/sftp/data_reader/srl_reader.py +++ /dev/null @@ -1,107 +0,0 @@ -import json -import logging -import random -from typing import * - -import numpy as np -from allennlp.data.dataset_readers.dataset_reader import DatasetReader -from allennlp.data.fields import MetadataField -from allennlp.data.instance import Instance - -from .span_reader import SpanReader -from ..utils import Span, VIRTUAL_ROOT, BIOSmoothing - -logger = logging.getLogger(__name__) - - -@DatasetReader.register('semantic_role_labeling') -class SRLDatasetReader(SpanReader): - def __init__( - self, - min_negative: int = 5, - negative_ratio: float = 1., - event_only: bool = False, - event_smoothing_factor: float = 0., - arg_smoothing_factor: float = 0., - # For Ontology Mapping - ontology_mapping_path: Optional[str] = None, - min_weight: float = 1e-2, - max_weight: float = 1.0, - **extra - ): - super().__init__(**extra) - self.min_negative = min_negative - self.negative_ratio = negative_ratio - self.event_only = event_only - self.event_smooth_factor = event_smoothing_factor - self.arg_smooth_factor = arg_smoothing_factor - self.ontology_mapping = None - if ontology_mapping_path is not None: - self.ontology_mapping = json.load(open(ontology_mapping_path)) - for k1 in ['event', 'argument']: - for k2, weights in self.ontology_mapping['mapping'][k1].items(): - weights = np.array(weights) - weights[weights < min_weight] = 0.0 - weights[weights > max_weight] = max_weight - self.ontology_mapping['mapping'][k1][k2] = weights - self.ontology_mapping['mapping'][k1] = { - k2: weights for k2, weights in self.ontology_mapping['mapping'][k1].items() if weights.sum() > 1e-5 - } - vr_label = [0.] * len(self.ontology_mapping['target']['label']) - vr_label[self.ontology_mapping['target']['label'].index(VIRTUAL_ROOT)] = 1.0 - self.ontology_mapping['mapping']['event'][VIRTUAL_ROOT] = np.array(vr_label) - - def _read(self, file_path: str) -> Iterable[Instance]: - all_lines = list(map(json.loads, open(file_path).readlines())) - if self.debug: - random.seed(1); random.shuffle(all_lines) - for line in all_lines: - ins = self.text_to_instance(**line) - if ins is not None: - yield ins - if self.n_span_removed > 0: - logger.warning(f'{self.n_span_removed} spans are removed.') - self.n_span_removed = 0 - - def apply_ontology_mapping(self, vr): - new_events = list() - event_map, arg_map = self.ontology_mapping['mapping']['event'], self.ontology_mapping['mapping']['argument'] - for event in vr: - if event.label not in event_map: continue - event.child_smooth.weight = event.smooth_weight = event_map[event.label].sum() - event = event.map_ontology(event_map, False, False) - new_events.append(event) - new_children = list() - for child in event: - if child.label not in arg_map: continue - child.child_smooth.weight = child.smooth_weight = arg_map[child.label].sum() - child = child.map_ontology(arg_map, False, False) - new_children.append(child) - event.remove_child() - for child in new_children: event.add_child(child) - new_vr = Span.virtual_root(new_events) - # For Virtual Root itself. - new_vr.map_ontology(self.ontology_mapping['mapping']['event'], True, False) - return new_vr - - def text_to_instance(self, tokens, annotations=None, meta=None) -> Optional[Instance]: - meta = meta or {'fully_annotated': True} - meta['fully_annotated'] = meta.get('fully_annotated', True) - vr = None - if annotations is not None: - vr = annotations if isinstance(annotations, Span) else Span.from_json(annotations) - vr = self.apply_ontology_mapping(vr) if self.ontology_mapping is not None else vr - # if len(vr) == 0: return # Ignore sentence with empty annotation - if self.event_smooth_factor != 0.0: - vr.child_smooth = BIOSmoothing(o_smooth=self.event_smooth_factor if meta['fully_annotated'] else -1) - if self.arg_smooth_factor != 0.0: - for event in vr: - event.child_smooth = BIOSmoothing(o_smooth=self.arg_smooth_factor) - if self.event_only: - for event in vr: - event.remove_child() - event.is_parent = False - - fields = self.prepare_inputs(tokens, vr, True, 'string' if self.ontology_mapping is None else 'list') - fields['meta'] = MetadataField(meta) - return Instance(fields) diff --git a/spaces/gotiQspiryo/whisper-ui/examples/Advanced SystemCare PRO V8.2.0.795 Multilingual Serial Key Keygenl The Ultimate Solution for PC Speed Security and Privacy.md b/spaces/gotiQspiryo/whisper-ui/examples/Advanced SystemCare PRO V8.2.0.795 Multilingual Serial Key Keygenl The Ultimate Solution for PC Speed Security and Privacy.md deleted file mode 100644 index 4e18f1eaa1ef5849e4562c533a231aa0c699fc89..0000000000000000000000000000000000000000 --- a/spaces/gotiQspiryo/whisper-ui/examples/Advanced SystemCare PRO V8.2.0.795 Multilingual Serial Key Keygenl The Ultimate Solution for PC Speed Security and Privacy.md +++ /dev/null @@ -1,6 +0,0 @@ -

      Advanced SystemCare PRO V8.2.0.795 Multilingual Serial Key Keygenl


      DOWNLOAD ►►► https://urlgoal.com/2uyNdl



      -
      - aaccfb2cb3
      -
      -
      -

      diff --git a/spaces/gotiQspiryo/whisper-ui/examples/Delhi Safari Movie Download [PORTABLE] In Hindi 720p Torrent.md b/spaces/gotiQspiryo/whisper-ui/examples/Delhi Safari Movie Download [PORTABLE] In Hindi 720p Torrent.md deleted file mode 100644 index 914414703bbe1f9cd8fa41af1f50c48fee2a9bfe..0000000000000000000000000000000000000000 --- a/spaces/gotiQspiryo/whisper-ui/examples/Delhi Safari Movie Download [PORTABLE] In Hindi 720p Torrent.md +++ /dev/null @@ -1,61 +0,0 @@ - -

      Delhi Safari movie download in hindi 720p torrent

      -

      If you are looking for a fun and adventurous animated movie, you might want to download Delhi Safari in hindi 720p torrent. This movie, which was released in 2012, is a story of a group of animals who plan a trip to Delhi to ask the parliament why the forest they live in is on the verge of destruction. It is a movie that features a star-studded voice cast, including Cary Elwes, Troy Baker, Christopher Lloyd, Vanessa Williams, Jane Lynch, Tom Kenny, Tara Strong, Brad Garrett, Jason Alexander, and more.

      -

      Delhi Safari movie download in hindi 720p torrent


      Download Zip ✓✓✓ https://urlgoal.com/2uyNaY



      -

      What is Delhi Safari movie about?

      -

      Delhi Safari is a movie that follows the journey of a cub leopard named Yuvi, his mother Begum, a monkey named Bajrangi, a bear named Bagga, and a parrot named Alex. They live in a forest that is threatened by a man who wants to destroy it to build a balcony. They decide to go to Delhi and ask the parliament to stop the man and save their home. Along the way, they face many dangers and challenges, but also make new friends and learn new things. They also discover the truth about Sultan, Yuvi's father and the king of the jungle, who disappeared mysteriously.

      -

      Why should you download Delhi Safari movie in hindi 720p torrent?

      -

      Downloading Delhi Safari movie in hindi 720p torrent has many benefits. Here are some of them:

      -
        -
      • You can watch the movie in high quality and with clear sound.
      • -
      • You can watch the movie in your preferred language and with subtitles if needed.
      • -
      • You can watch the movie on any device that supports torrent files, such as computers, laptops, tablets, smartphones, or smart TVs.
      • -
      • You can watch the movie anytime and anywhere without internet connection or streaming issues.
      • -
      • You can save money and time by downloading the movie instead of buying or renting a DVD or Blu-ray.
      • -
      -

      How can you download Delhi Safari movie in hindi 720p torrent?

      -

      Downloading Delhi Safari movie in hindi 720p torrent is easy and fast. You just need to follow these steps:

      -
        -
      1. Search for Delhi Safari movie in hindi 720p torrent on any reliable online platform that offers free or paid torrents.
      2. -
      3. Select the platform that suits your needs and preferences. Some of the factors you might want to consider are the size, quality, security, and availability of the torrent.
      4. -
      5. Click on the download button or link and follow the instructions to complete the process. You might need to create an account, provide some information, or make a payment depending on the platform.
      6. -
      7. Once you have downloaded the torrent file, you can open it with a torrent client app such as BitTorrent or uTorrent.
      8. -
      9. Enjoy watching Delhi Safari movie in hindi 720p torrent!
      10. -

      -
      What are the benefits of watching Delhi Safari movie?
      -

      Watching Delhi Safari movie is not only entertaining, but also educational and inspirational. Here are some of the benefits of watching this movie:

      -

      -
        -
      • You can learn more about the wildlife and the environment of India, and the threats and challenges they face.
      • -
      • You can appreciate the diversity and beauty of the Indian culture, language, and music.
      • -
      • You can laugh and have fun with the witty and hilarious dialogues and situations of the characters.
      • -
      • You can feel emotional and empathetic with the struggles and hopes of the animals.
      • -
      • You can get inspired and motivated by the courage and determination of the animals to fight for their rights and their home.
      • -
      -
      Conclusion
      -

      Delhi Safari movie is a movie that you should not miss if you love animation, adventure, comedy, drama, and animals. It is a movie that you can download in hindi 720p torrent and watch on any device. It is a movie that you can enjoy with your family and friends. It is a movie that you can learn from and get inspired by. It is a movie that you can find more information about by visiting various online sources. It is a movie that you can download now and watch later.

      -How to watch Delhi Safari movie online? -

      If you don't want to download Delhi Safari movie in hindi 720p torrent, you can also watch it online on various platforms. Here are some of the options you can choose from:

      -
        -
      • YouTube: You can watch Delhi Safari movie on YouTube for free. However, you might have to deal with ads, low quality, and incomplete versions.
      • -
      • Netflix: You can watch Delhi Safari movie on Netflix with a subscription. However, you might have to check the availability of the movie in your region and language.
      • -
      • Amazon Prime Video: You can watch Delhi Safari movie on Amazon Prime Video with a subscription or a rental fee. However, you might have to check the availability of the movie in your region and language.
      • -
      • Hotstar: You can watch Delhi Safari movie on Hotstar with a subscription or a rental fee. However, you might have to check the availability of the movie in your region and language.
      • -
      • Voot: You can watch Delhi Safari movie on Voot for free. However, you might have to deal with ads, low quality, and incomplete versions.
      • -
      -

      Whichever platform you choose, make sure you have a good internet connection and a compatible device to enjoy watching Delhi Safari movie online.

      -What are some of the best scenes of Delhi Safari movie? -

      Delhi Safari movie is full of memorable and hilarious scenes that will make you laugh and cry. Here are some of the best scenes of the movie:

      -
        -
      • The scene where Yuvi and Bajrangi meet Alex the parrot for the first time and mistake him for a ghost.
      • -
      • The scene where Bagga the bear tries to teach Yuvi how to roar like a lion and ends up scaring himself.
      • -
      • The scene where the animals disguise themselves as humans and enter a train to Delhi.
      • -
      • The scene where the animals perform a song and dance number in front of the parliament to get their attention.
      • -
      • The scene where Sultan the leopard returns to save his family and friends from the hunters.
      • -
      -

      These are just some of the many scenes that make Delhi Safari movie a fun and enjoyable watch. You can download Delhi Safari movie in hindi 720p torrent and watch these scenes and more on your device.

      -Conclusion -

      Delhi Safari movie is a movie that you should download in hindi 720p torrent if you love animation, adventure, comedy, drama, and animals. It is a movie that tells a story of a group of animals who go to Delhi to save their forest from destruction. It is a movie that features a star-studded voice cast, a catchy soundtrack, and a heartwarming message. It is a movie that you can watch with your family and friends and have a great time. It is a movie that you can learn from and get inspired by. It is a movie that you can find more information about by visiting various online sources. It is a movie that you can download now and watch later.

      -

      So what are you waiting for? Download Delhi Safari movie in hindi 720p torrent and enjoy watching this amazing animated movie on your device.

      3cee63e6c2
      -
      -
      \ No newline at end of file diff --git a/spaces/gotiQspiryo/whisper-ui/examples/Descargar Tekken 6 Para Ps2 Iso Torrent PORTABLE.md b/spaces/gotiQspiryo/whisper-ui/examples/Descargar Tekken 6 Para Ps2 Iso Torrent PORTABLE.md deleted file mode 100644 index f1ea33c89de3a318d9f832b15ace4bfeb0e37596..0000000000000000000000000000000000000000 --- a/spaces/gotiQspiryo/whisper-ui/examples/Descargar Tekken 6 Para Ps2 Iso Torrent PORTABLE.md +++ /dev/null @@ -1,6 +0,0 @@ -

      Descargar Tekken 6 Para Ps2 Iso Torrent


      DOWNLOAD ……… https://urlgoal.com/2uyMLg



      - - aaccfb2cb3
      -
      -
      -

      diff --git a/spaces/graceaiedu/Coffee/reader.py b/spaces/graceaiedu/Coffee/reader.py deleted file mode 100644 index 81d2a64901bbfa3b1fe76831084ddb3b834a2244..0000000000000000000000000000000000000000 --- a/spaces/graceaiedu/Coffee/reader.py +++ /dev/null @@ -1,76 +0,0 @@ -import os -from yattag import Doc -## --------------------------------- ### -### reading: info.txt ### -### -------------------------------- ### -# placeholders in case info.txt does not exist -def get_article(): - filename = "info.txt" - placeholder = "please create an info.txt to customize this text" - - title = bkgd = data_collection = priv_cons = bias_cons = ident_cons = img_src = membs = description = placeholder - # check if info.txt is present - if os.path.isfile(filename): - # open info.txt in read mode - info = open(filename, "r") - - # read each line to a string - description = "An AI project created by " + info.readline() - title = info.readline() - bkgd = info.readline() - data_collection = info.readline() - priv_cons = info.readline() - bias_cons = info.readline() - ident_cons = info.readline() - img_src = info.readline() - membs = info.readline() - - # close file - info.close() - - # use yattag library to generate html - doc, tag, text, line = Doc().ttl() - # create html based on info.txt - with tag('div'): - with tag('div', klass='my-div'): - line('h2', 'Project Background') - line('p', bkgd) - with tag('div', klass='my-div'): - line('h2', 'Data Collection') - line('p', data_collection) - with tag('div', klass='my-div'): - line('h2', 'Ethical Considerations') - with tag('ul'): - line('li', priv_cons) - line('li', bias_cons) - line('li', ident_cons) - with tag('div', klass='my-div'): - line('h2', 'Our Team') - line('p', membs) - doc.stag('img', src=img_src) - - css = ''' - .my-div { - border: 2px solid black; - text-align: center; - margin: 10px; - padding: 5%; - } - ul { - display: inline-block; - text-align: left; - } - img { - display: block; - margin: auto; - } - .description { - text-align: center; - } - ''' - return { - 'article': doc.getvalue(), - 'css': css, - 'title': title, - 'description': description, - } \ No newline at end of file diff --git a/spaces/gradio/HuBERT/fairseq_cli/hydra_train.py b/spaces/gradio/HuBERT/fairseq_cli/hydra_train.py deleted file mode 100644 index 9de01084ba01a77a2297a3eace652a9be9b50380..0000000000000000000000000000000000000000 --- a/spaces/gradio/HuBERT/fairseq_cli/hydra_train.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python3 -u -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -import logging -import os - -from fairseq.dataclass.initialize import add_defaults, hydra_init -from fairseq_cli.train import main as pre_main -from fairseq import distributed_utils, metrics -from fairseq.dataclass.configs import FairseqConfig -from fairseq.utils import reset_logging - -import hydra -from hydra.core.hydra_config import HydraConfig -import torch -from omegaconf import OmegaConf, open_dict - - -logger = logging.getLogger("fairseq_cli.hydra_train") - - -@hydra.main(config_path=os.path.join("..", "fairseq", "config"), config_name="config") -def hydra_main(cfg: FairseqConfig) -> float: - add_defaults(cfg) - - if cfg.common.reset_logging: - reset_logging() # Hydra hijacks logging, fix that - else: - with open_dict(cfg): - # make hydra logging work with ddp (see # see https://github.com/facebookresearch/hydra/issues/1126) - cfg.job_logging_cfg = OmegaConf.to_container(HydraConfig.get().job_logging, resolve=True) - - cfg = OmegaConf.create(OmegaConf.to_container(cfg, resolve=True, enum_to_str=True)) - OmegaConf.set_struct(cfg, True) - - try: - if cfg.common.profile: - with torch.cuda.profiler.profile(): - with torch.autograd.profiler.emit_nvtx(): - distributed_utils.call_main(cfg, pre_main) - else: - distributed_utils.call_main(cfg, pre_main) - except BaseException as e: - if not cfg.common.suppress_crashes: - raise - else: - logger.error("Crashed! " + str(e)) - - # get best val and return - useful for sweepers - try: - best_val = metrics.get_smoothed_value( - "valid", cfg.checkpoint.best_checkpoint_metric - ) - except: - best_val = None - - if best_val is None: - best_val = float("inf") - - return best_val - - -def cli_main(): - try: - from hydra._internal.utils import get_args - - cfg_name = get_args().config_name or "config" - except: - logger.warning("Failed to get config name from hydra args") - cfg_name = "config" - - hydra_init(cfg_name) - hydra_main() - - -if __name__ == "__main__": - cli_main() diff --git a/spaces/gradio/theme-gallery/README.md b/spaces/gradio/theme-gallery/README.md deleted file mode 100644 index de7f5c77f7aa74d105f494b1e158f8cf82535c2f..0000000000000000000000000000000000000000 --- a/spaces/gradio/theme-gallery/README.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Theme Gallery -emoji: 🌍 -colorFrom: indigo -colorTo: indigo -sdk: static -pinned: false -license: mit ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference \ No newline at end of file diff --git a/spaces/gwang-kim/DATID-3D/eg3d/README.md b/spaces/gwang-kim/DATID-3D/eg3d/README.md deleted file mode 100644 index 87a743936a9fe32959c63a7320713f90f9aa837a..0000000000000000000000000000000000000000 --- a/spaces/gwang-kim/DATID-3D/eg3d/README.md +++ /dev/null @@ -1,216 +0,0 @@ -## Efficient Geometry-aware 3D Generative Adversarial Networks (EG3D)
      Official PyTorch implementation of the CVPR 2022 paper - -![Teaser image](./docs/teaser.jpeg) - -**Efficient Geometry-aware 3D Generative Adversarial Networks**
      -Eric R. Chan*, Connor Z. Lin*, Matthew A. Chan*, Koki Nagano*, Boxiao Pan, Shalini De Mello, Orazio Gallo, Leonidas Guibas, Jonathan Tremblay, Sameh Khamis, Tero Karras, and Gordon Wetzstein
      *\* equal contribution*
      -
      https://nvlabs.github.io/eg3d/
      - -Abstract: *Unsupervised generation of high-quality multi-view-consistent images and 3D shapes using only collections of single-view 2D photographs has been a long-standing challenge. Existing 3D GANs are either compute-intensive or make approximations that are not 3D-consistent; the former limits quality and resolution of the generated images and the latter adversely affects multi-view consistency and shape quality. In this work, we improve the computational efficiency and image quality of 3D GANs without overly relying on these approximations. We introduce an expressive hybrid explicit-implicit network architecture that, together with other design choices, synthesizes not only high-resolution multi-view-consistent images in real time but also produces high-quality 3D geometry. By decoupling feature generation and neural rendering, our framework is able to leverage state-of-the-art 2D CNN generators, such as StyleGAN2, and inherit their efficiency and expressiveness. We demonstrate state-of-the-art 3D-aware synthesis with FFHQ and AFHQ Cats, among other experiments.* - -For business inquiries, please visit our website and submit the form: [NVIDIA Research Licensing](https://www.nvidia.com/en-us/research/inquiries/) - -## Requirements - -* We recommend Linux for performance and compatibility reasons. -* 1–8 high-end NVIDIA GPUs. We have done all testing and development using V100, RTX3090, and A100 GPUs. -* 64-bit Python 3.8 and PyTorch 1.11.0 (or later). See https://pytorch.org for PyTorch install instructions. -* CUDA toolkit 11.3 or later. (Why is a separate CUDA toolkit installation required? We use the custom CUDA extensions from the StyleGAN3 repo. Please see [Troubleshooting](https://github.com/NVlabs/stylegan3/blob/main/docs/troubleshooting.md#why-is-cuda-toolkit-installation-necessary)). -* Python libraries: see [environment.yml](../environment.yml) for exact library dependencies. You can use the following commands with Miniconda3 to create and activate your Python environment: - - `cd eg3d` - - `conda env create -f environment.yml` - - `conda activate eg3d` - -## Getting started - -Pre-trained networks are stored as `*.pkl` files that can be referenced using local filenames. See [Models](./docs/models.md) for download links to pre-trained checkpoints. - - -## Generating media - -```.bash -# Generate videos using pre-trained model - -python gen_videos.py --outdir=out --trunc=0.7 --seeds=0-3 --grid=2x2 \ - --network=networks/network_snapshot.pkl - -# Generate the same 4 seeds in an interpolation sequence - -python gen_videos.py --outdir=out --trunc=0.7 --seeds=0-3 --grid=1x1 \ - --network=networks/network_snapshot.pkl -``` - -```.bash -# Generate images and shapes (as .mrc files) using pre-trained model - -python gen_samples.py --outdir=out --trunc=0.7 --shapes=true --seeds=0-3 \ - --network=networks/network_snapshot.pkl -``` - -We visualize our .mrc shape files with [UCSF Chimerax](https://www.cgl.ucsf.edu/chimerax/). - -To visualize a shape in ChimeraX do the following: -1. Import the `.mrc` file with `File > Open` -1. Find the selected shape in the Volume Viewer tool - 1. The Volume Viewer tool is located under `Tools > Volume Data > Volume Viewer` -1. Change volume type to "Surface" -1. Change step size to 1 -1. Change level set to 10 - 1. Note that the optimal level can vary by each object, but is usually between 2 and 20. Individual adjustment may make certain shapes slightly sharper -1. In the `Lighting` menu in the top bar, change lighting to "Full" - - -## Interactive visualization - -This release contains an interactive model visualization tool that can be used to explore various characteristics of a trained model. To start it, run: - -```.bash -python visualizer.py -``` - -See the [`Visualizer Guide`](./docs/visualizer_guide.md) for a description of important options. - - -## Using networks from Python - -You can use pre-trained networks in your own Python code as follows: - -```.python -with open('ffhq.pkl', 'rb') as f: - G = pickle.load(f)['G_ema'].cuda() # torch.nn.Module -z = torch.randn([1, G.z_dim]).cuda() # latent codes -c = torch.cat([cam2world_pose.reshape(-1, 16), intrinsics.reshape(-1, 9)], 1) # camera parameters -img = G(z, c)['image'] # NCHW, float32, dynamic range [-1, +1], no truncation -``` - -The above code requires `torch_utils` and `dnnlib` to be accessible via `PYTHONPATH`. It does not need source code for the networks themselves — their class definitions are loaded from the pickle via `torch_utils.persistence`. - -The pickle contains three networks. `'G'` and `'D'` are instantaneous snapshots taken during training, and `'G_ema'` represents a moving average of the generator weights over several training steps. The networks are regular instances of `torch.nn.Module`, with all of their parameters and buffers placed on the CPU at import and gradient computation disabled by default. - -The generator consists of two submodules, `G.mapping` and `G.synthesis`, that can be executed separately. They also support various additional options: - -```.python -w = G.mapping(z, conditioning_params, truncation_psi=0.5, truncation_cutoff=8) -img = G.synthesis(w, camera_params)['image] -``` - -Please refer to [`gen_samples.py`](gen_samples.py) for complete code example. - -## Preparing datasets - -Datasets are stored as uncompressed ZIP archives containing uncompressed PNG files and a metadata file `dataset.json` for labels. Each label is a 25-length list of floating point numbers, which is the concatenation of the flattened 4x4 camera extrinsic matrix and flattened 3x3 camera intrinsic matrix. Custom datasets can be created from a folder containing images; see `python dataset_tool.py --help` for more information. Alternatively, the folder can also be used directly as a dataset, without running it through `dataset_tool.py` first, but doing so may lead to suboptimal performance. - -**FFHQ**: Download and process the [Flickr-Faces-HQ dataset](https://github.com/NVlabs/ffhq-dataset) using the following commands. - -1. Ensure the [Deep3DFaceRecon_pytorch](https://github.com/sicxu/Deep3DFaceRecon_pytorch/tree/6ba3d22f84bf508f0dde002da8fff277196fef21) submodule is properly initialized -```.bash -git submodule update --init --recursive -``` - -2. Run the following commands -```.bash -cd dataset_preprocessing/ffhq -python runme.py -``` - -Optional: preprocessing in-the-wild portrait images. -In case you want to crop in-the-wild face images and extract poses using [Deep3DFaceRecon_pytorch](https://github.com/sicxu/Deep3DFaceRecon_pytorch/tree/6ba3d22f84bf508f0dde002da8fff277196fef21) in a way that align with the FFHQ data above and the checkpoint, run the following commands -```.bash -cd dataset_preprocessing/ffhq -python preprocess_in_the_wild.py --indir=INPUT_IMAGE_FOLDER -``` - - -**AFHQv2**: Download and process the [AFHQv2 dataset](https://github.com/clovaai/stargan-v2/blob/master/README.md#animal-faces-hq-dataset-afhq) with the following. - -1. Download the AFHQv2 images zipfile from the [StarGAN V2 repository](https://github.com/clovaai/stargan-v2/) -2. Run the following commands: -```.bash -cd dataset_preprocessing/afhq -python runme.py "path/to/downloaded/afhq.zip" -``` - -**ShapeNet Cars**: Download and process renderings of the cars category of [ShapeNet](https://shapenet.org/) using the following commands. -NOTE: the following commands download renderings of the ShapeNet cars from the [Scene Representation Networks repository](https://www.vincentsitzmann.com/srns/). - -```.bash -cd dataset_preprocessing/shapenet -python runme.py -``` - -## Training - -You can train new networks using `train.py`. For example: - -```.bash -# Train with FFHQ from scratch with raw neural rendering resolution=64, using 8 GPUs. -python train.py --outdir=~/training-runs --cfg=ffhq --data=~/datasets/FFHQ_512.zip \ - --gpus=8 --batch=32 --gamma=1 --gen_pose_cond=True - -# Second stage finetuning of FFHQ to 128 neural rendering resolution (optional). -python train.py --outdir=~/training-runs --cfg=ffhq --data=~/datasets/FFHQ_512.zip \ - --resume=~/training-runs/ffhq_experiment_dir/network-snapshot-025000.pkl \ - --gpus=8 --batch=32 --gamma=1 --gen_pose_cond=True --neural_rendering_resolution_final=128 - -# Train with Shapenet from scratch, using 8 GPUs. -python train.py --outdir=~/training-runs --cfg=shapenet --data=~/datasets/cars_train.zip \ - --gpus=8 --batch=32 --gamma=0.3 - -# Train with AFHQ, finetuning from FFHQ with ADA, using 8 GPUs. -python train.py --outdir=~/training-runs --cfg=afhq --data=~/datasets/afhq.zip \ - --gpus=8 --batch=32 --gamma=5 --aug=ada --neural_rendering_resolution_final=128 --gen_pose_cond=True --gpc_reg_prob=0.8 -``` - -Please see the [Training Guide](./docs/training_guide.md) for a guide to setting up a training run on your own data. - -Please see [Models](./docs/models.md) for recommended training configurations and download links for pre-trained checkpoints. - - -The results of each training run are saved to a newly created directory, for example `~/training-runs/00000-ffhq-ffhq512-gpus8-batch32-gamma1`. The training loop exports network pickles (`network-snapshot-.pkl`) and random image grids (`fakes.png`) at regular intervals (controlled by `--snap`). For each exported pickle, it evaluates FID (controlled by `--metrics`) and logs the result in `metric-fid50k_full.jsonl`. It also records various statistics in `training_stats.jsonl`, as well as `*.tfevents` if TensorBoard is installed. - -## Quality metrics - -By default, `train.py` automatically computes FID for each network pickle exported during training. We recommend inspecting `metric-fid50k_full.jsonl` (or TensorBoard) at regular intervals to monitor the training progress. When desired, the automatic computation can be disabled with `--metrics=none` to speed up the training slightly. - -Additional quality metrics can also be computed after the training: - -```.bash -# Previous training run: look up options automatically, save result to JSONL file. -python calc_metrics.py --metrics=fid50k_full \ - --network=~/training-runs/network-snapshot-000000.pkl - -# Pre-trained network pickle: specify dataset explicitly, print result to stdout. -python calc_metrics.py --metrics=fid50k_full --data=~/datasets/ffhq_512.zip \ - --network=ffhq-128.pkl -``` - -Note that the metrics can be quite expensive to compute (up to 1h), and many of them have an additional one-off cost for each new dataset (up to 30min). Also note that the evaluation is done using a different random seed each time, so the results will vary if the same metric is computed multiple times. - -References: -1. [GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium](https://arxiv.org/abs/1706.08500), Heusel et al. 2017 -2. [Demystifying MMD GANs](https://arxiv.org/abs/1801.01401), Bińkowski et al. 2018 - - - -## Citation - -``` -@inproceedings{Chan2022, - author = {Eric R. Chan and Connor Z. Lin and Matthew A. Chan and Koki Nagano and Boxiao Pan and Shalini De Mello and Orazio Gallo and Leonidas Guibas and Jonathan Tremblay and Sameh Khamis and Tero Karras and Gordon Wetzstein}, - title = {Efficient Geometry-aware {3D} Generative Adversarial Networks}, - booktitle = {CVPR}, - year = {2022} -} -``` - -## Development - -This is a research reference implementation and is treated as a one-time code drop. As such, we do not accept outside code contributions in the form of pull requests. - -## Acknowledgements - -We thank David Luebke, Jan Kautz, Jaewoo Seo, Jonathan Granskog, Simon Yuen, Alex Evans, Stan Birchfield, Alexander Bergman, and Joy Hsu for feedback on drafts, Alex Chan, Giap Nguyen, and Trevor Chan for help with diagrams, and Colette Kress and Bryan Catanzaro for allowing use of their photographs. This project was in part supported by Stanford HAI and a Samsung GRO. Koki Nagano and Eric Chan were partially supported by DARPA’s Semantic Forensics (SemaFor) contract (HR0011-20-3-0005). The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the official policies, either expressed or implied, of the U.S. Government. Distribution Statement "A" (Approved for Public Release, Distribution Unlimited). diff --git a/spaces/h2oai/wave-tour/examples/plot_interval_polar.py b/spaces/h2oai/wave-tour/examples/plot_interval_polar.py deleted file mode 100644 index f6e409061df0051ff0da83f03c83215c507a47d1..0000000000000000000000000000000000000000 --- a/spaces/h2oai/wave-tour/examples/plot_interval_polar.py +++ /dev/null @@ -1,32 +0,0 @@ -# Plot / Interval / Polar -# Make a rose #plot (a bar plot in polar coordinates). #interval -# --- -from h2o_wave import site, data, ui - -page = site['/demo'] - -page.add('example', ui.plot_card( - box='1 1 4 5', - title='Interval, polar', - data=data('month rainfall', 16, rows=[ - ('Jan', 18.9), - ('Feb', 28.8), - ('Mar', 39.3), - ('Apr', 31.4), - ('May', 47), - ('Jun', 20.3), - ('Jul', 24), - ('Aug', 35.6), - ('Jan', 12.4), - ('Feb', 23.2), - ('Mar', 34.5), - ('Apr', 29.7), - ('May', 42), - ('Jun', 35.5), - ('Jul', 37.4), - ('Aug', 42.4), - ]), - plot=ui.plot([ui.mark(coord='polar', type='interval', x='=month', y='=rainfall', y_min=0, stroke_color='$card')]) -)) - -page.save() diff --git a/spaces/haakohu/deep_privacy2_face/dp2/generator/deep_privacy1.py b/spaces/haakohu/deep_privacy2_face/dp2/generator/deep_privacy1.py deleted file mode 100644 index 531d780ad995081b233c8d8d73242571eb7d33c4..0000000000000000000000000000000000000000 --- a/spaces/haakohu/deep_privacy2_face/dp2/generator/deep_privacy1.py +++ /dev/null @@ -1,648 +0,0 @@ -import torch -import torch.nn as nn -from easydict import EasyDict -from .base import BaseGenerator -import numpy as np -from typing import List - - -class LatentVariableConcat(nn.Module): - - def __init__(self, conv2d_config): - super().__init__() - - def forward(self, _inp): - x, mask, batch = _inp - z = batch["z"] - x = torch.cat((x, z), dim=1) - return (x, mask, batch) - - -def get_padding(kernel_size: int, dilation: int, stride: int): - out = (dilation * (kernel_size - 1) - 1) / 2 + 1 - return int(np.floor(out)) - - -class Conv2d(nn.Conv2d): - - def __init__(self, in_channels, out_channels, kernel_size, stride=1, - padding=None, dilation=1, groups=1, - bias=True, padding_mode='zeros', - demodulation=False, wsconv=False, gain=1, - *args, **kwargs): - if padding is None: - padding = get_padding(kernel_size, dilation, stride) - super().__init__( - in_channels, out_channels, kernel_size, stride, padding, dilation, - groups, bias, padding_mode) - self.demodulation = demodulation - self.wsconv = wsconv - if self.wsconv: - fan_in = np.prod(self.weight.shape[1:]) / self.groups - self.ws_scale = gain / np.sqrt(fan_in) - nn.init.normal_(self.weight) - if bias: - nn.init.constant_(self.bias, val=0) - assert not self.padding_mode == "circular",\ - "conv2d_forward does not support circular padding. Look at original pytorch code" - - def _get_weight(self): - weight = self.weight - if self.wsconv: - weight = self.ws_scale * weight - if self.demodulation: - demod = torch.rsqrt(weight.pow(2).sum([1, 2, 3]) + 1e-7) - weight = weight * demod.view(self.out_channels, 1, 1, 1) - return weight - - def conv2d_forward(self, x, weight, bias=True): - bias_ = None - if bias: - bias_ = self.bias - return nn.functional.conv2d(x, weight, bias_, self.stride, - self.padding, self.dilation, self.groups) - - def forward(self, _inp): - x, mask = _inp - weight = self._get_weight() - return self.conv2d_forward(x, weight), mask - - def __repr__(self): - return ", ".join([ - super().__repr__(), - f"Demodulation={self.demodulation}", - f"Weight Scale={self.wsconv}", - f"Bias={self.bias is not None}" - ]) - - -class LeakyReLU(nn.LeakyReLU): - - def forward(self, _inp): - x, mask = _inp - return super().forward(x), mask - - -class AvgPool2d(nn.AvgPool2d): - - def forward(self, _inp): - x, mask, *args = _inp - x = super().forward(x) - mask = super().forward(mask) - if len(args) > 0: - return (x, mask, *args) - return x, mask - - -def up(x): - if x.shape[0] == 1 and x.shape[2] == 1 and x.shape[3] == 1: - # Analytical normalization - return x - return nn.functional.interpolate( - x, scale_factor=2, mode="nearest") - - -class NearestUpsample(nn.Module): - - def forward(self, _inp): - x, mask, *args = _inp - x = up(x) - mask = up(mask) - if len(args) > 0: - return (x, mask, *args) - return x, mask - - -class PixelwiseNormalization(nn.Module): - - def forward(self, _inp): - x, mask = _inp - norm = torch.rsqrt((x**2).mean(dim=1, keepdim=True) + 1e-7) - return x * norm, mask - - -class Linear(nn.Linear): - - def __init__(self, in_features, out_features): - super().__init__(in_features, out_features) - self.linear = nn.Linear(in_features, out_features) - fanIn = in_features - self.wtScale = 1 / np.sqrt(fanIn) - - nn.init.normal_(self.weight) - nn.init.constant_(self.bias, val=0) - - def _get_weight(self): - return self.weight * self.wtScale - - def forward_linear(self, x, weight): - return nn.functional.linear(x, weight, self.bias) - - def forward(self, x): - return self.forward_linear(x, self._get_weight()) - - -class OneHotPoseConcat(nn.Module): - - def forward(self, _inp): - x, mask, batch = _inp - landmarks = batch["landmarks_oh"] - res = x.shape[-1] - landmark = landmarks[res] - x = torch.cat((x, landmark), dim=1) - del batch["landmarks_oh"][res] - return x, mask, batch - - -def transition_features(x_old, x_new, transition_variable): - assert x_old.shape == x_new.shape,\ - "Old shape: {}, New: {}".format(x_old.shape, x_new.shape) - return torch.lerp(x_old.float(), x_new.float(), transition_variable) - - -class TransitionBlock(nn.Module): - - def forward(self, _inp): - x, mask, batch = _inp - x = transition_features( - batch["x_old"], x, batch["transition_value"]) - mask = transition_features( - batch["mask_old"], mask, batch["transition_value"]) - del batch["x_old"] - del batch["mask_old"] - return x, mask, batch - - -class UnetSkipConnection(nn.Module): - - def __init__(self, conv2d_config: dict, in_channels: int, - out_channels: int, resolution: int, - residual: bool, enabled: bool): - super().__init__() - self.use_iconv = conv2d_config.conv.type == "iconv" - self._in_channels = in_channels - self._out_channels = out_channels - self._resolution = resolution - self._enabled = enabled - self._residual = residual - if self.use_iconv: - self.beta0 = torch.nn.Parameter(torch.tensor(1.)) - self.beta1 = torch.nn.Parameter(torch.tensor(1.)) - else: - if self._residual: - self.conv = build_base_conv( - conv2d_config, False, in_channels // 2, - out_channels, kernel_size=1, padding=0) - else: - self.conv = ConvAct( - conv2d_config, in_channels, out_channels, - kernel_size=1, padding=0) - - def forward(self, _inp): - if not self._enabled: - return _inp - x, mask, batch = _inp - skip_x, skip_mask = batch["unet_features"][self._resolution] - assert x.shape == skip_x.shape, (x.shape, skip_x.shape) - del batch["unet_features"][self._resolution] - if self.use_iconv: - denom = skip_mask * self.beta0.relu() + mask * self.beta1.relu() + 1e-8 - gamma = skip_mask * self.beta0.relu() / denom - x = skip_x * gamma + (1 - gamma) * x - mask = skip_mask * gamma + (1 - gamma) * mask - else: - if self._residual: - skip_x, skip_mask = self.conv((skip_x, skip_mask)) - x = (x + skip_x) / np.sqrt(2) - if self._probabilistic: - mask = (mask + skip_mask) / np.sqrt(2) - else: - x = torch.cat((x, skip_x), dim=1) - x, mask = self.conv((x, mask)) - return x, mask, batch - - def __repr__(self): - return " ".join([ - self.__class__.__name__, - f"In channels={self._in_channels}", - f"Out channels={self._out_channels}", - f"Residual: {self._residual}", - f"Enabled: {self._enabled}" - f"IConv: {self.use_iconv}" - ]) - - -def get_conv(ctype, post_act): - type2conv = { - "conv": Conv2d, - "gconv": GatedConv - } - # Do not apply for output layer - if not post_act and ctype in ["gconv", "iconv"]: - return type2conv["conv"] - assert ctype in type2conv - return type2conv[ctype] - - -def build_base_conv( - conv2d_config, post_act: bool, *args, **kwargs) -> nn.Conv2d: - for k, v in conv2d_config.conv.items(): - assert k not in kwargs - kwargs[k] = v - # Demodulation should not be used for output layers. - demodulation = conv2d_config.normalization == "demodulation" and post_act - kwargs["demodulation"] = demodulation - conv = get_conv(conv2d_config.conv.type, post_act) - return conv(*args, **kwargs) - - -def build_post_activation(in_channels, conv2d_config) -> List[nn.Module]: - _layers = [] - negative_slope = conv2d_config.leaky_relu_nslope - _layers.append(LeakyReLU(negative_slope, inplace=True)) - if conv2d_config.normalization == "pixel_wise": - _layers.append(PixelwiseNormalization()) - return _layers - - -def build_avgpool(conv2d_config, kernel_size) -> nn.AvgPool2d: - return AvgPool2d(kernel_size) - - -def build_convact(conv2d_config, *args, **kwargs): - conv = build_base_conv(conv2d_config, True, *args, **kwargs) - out_channels = conv.out_channels - post_act = build_post_activation(out_channels, conv2d_config) - return nn.Sequential(conv, *post_act) - - -class ConvAct(nn.Module): - - def __init__(self, conv2d_config, *args, **kwargs): - super().__init__() - self._conv2d_config = conv2d_config - conv = build_base_conv(conv2d_config, True, *args, **kwargs) - self.in_channels = conv.in_channels - self.out_channels = conv.out_channels - _layers = [conv] - _layers.extend(build_post_activation(self.out_channels, conv2d_config)) - self.layers = nn.Sequential(*_layers) - - def forward(self, _inp): - return self.layers(_inp) - - -class GatedConv(Conv2d): - - def __init__(self, in_channels, out_channels, *args, **kwargs): - out_channels *= 2 - super().__init__(in_channels, out_channels, *args, **kwargs) - assert self.out_channels % 2 == 0 - self.lrelu = nn.LeakyReLU(0.2, inplace=True) - self.sigmoid = nn.Sigmoid() - - def conv2d_forward(self, x, weight, bias=True): - x_ = super().conv2d_forward(x, weight, bias) - x = x_[:, :self.out_channels // 2] - y = x_[:, self.out_channels // 2:] - x = self.lrelu(x) - y = y.sigmoid() - assert x.shape == y.shape, f"{x.shape}, {y.shape}" - return x * y - - -class BasicBlock(nn.Module): - - def __init__( - self, conv2d_config, resolution: int, in_channels: int, - out_channels: List[int], residual: bool): - super().__init__() - assert len(out_channels) == 2 - self._resolution = resolution - self._residual = residual - self.out_channels = out_channels - _layers = [] - _in_channels = in_channels - for out_ch in out_channels: - conv = build_base_conv( - conv2d_config, True, _in_channels, out_ch, kernel_size=3, - resolution=resolution) - _layers.append(conv) - _layers.extend(build_post_activation(_in_channels, conv2d_config)) - _in_channels = out_ch - self.layers = nn.Sequential(*_layers) - if self._residual: - self.residual_conv = build_base_conv( - conv2d_config, post_act=False, in_channels=in_channels, - out_channels=out_channels[-1], - kernel_size=1, padding=0) - self.const = 1 / np.sqrt(2) - - def forward(self, _inp): - x, mask, batch = _inp - y = x - mask_ = mask - assert y.shape[-1] == self._resolution or y.shape[-1] == 1 - y, mask = self.layers((x, mask)) - if self._residual: - residual, mask_ = self.residual_conv((x, mask_)) - y = (y + residual) * self.const - mask = (mask + mask_) * self.const - return y, mask, batch - - def extra_repr(self): - return f"Residual={self._residual}, Resolution={self._resolution}" - - -class PoseNormalize(nn.Module): - - @torch.no_grad() - def forward(self, x): - return x * 2 - 1 - - -class ScalarPoseFCNN(nn.Module): - - def __init__(self, pose_size, hidden_size, - output_shape): - super().__init__() - pose_size = pose_size - self._hidden_size = hidden_size - output_size = np.prod(output_shape) - self.output_shape = output_shape - self.pose_preprocessor = nn.Sequential( - PoseNormalize(), - Linear(pose_size, hidden_size), - nn.LeakyReLU(.2), - Linear(hidden_size, output_size), - nn.LeakyReLU(.2) - ) - - def forward(self, _inp): - x, mask, batch = _inp - pose_info = batch["landmarks"] - del batch["landmarks"] - pose = self.pose_preprocessor(pose_info) - pose = pose.view(-1, *self.output_shape) - if x.shape[0] == 1 and x.shape[2] == 1 and x.shape[3] == 1: - # Analytical normalization propagation - pose = pose.mean(dim=2, keepdim=True).mean(dim=3, keepdims=True) - x = torch.cat((x, pose), dim=1) - return x, mask, batch - - def __repr__(self): - return " ".join([ - self.__class__.__name__, - f"hidden_size={self._hidden_size}", - f"output shape={self.output_shape}" - ]) - - -class Attention(nn.Module): - - def __init__(self, in_channels): - super(Attention, self).__init__() - # Channel multiplier - self.in_channels = in_channels - self.theta = Conv2d( - self.in_channels, self.in_channels // 8, kernel_size=1, padding=0, - bias=False) - self.phi = Conv2d( - self.in_channels, self.in_channels // 8, kernel_size=1, padding=0, - bias=False) - self.g = Conv2d( - self.in_channels, self.in_channels // 2, kernel_size=1, padding=0, - bias=False) - self.o = Conv2d( - self.in_channels // 2, self.in_channels, kernel_size=1, padding=0, - bias=False) - # Learnable gain parameter - self.gamma = nn.Parameter(torch.tensor(0.), requires_grad=True) - - def forward(self, _inp): - x, mask, batch = _inp - # Apply convs - theta, _ = self.theta((x, None)) - phi = nn.functional.max_pool2d(self.phi((x, None))[0], [2, 2]) - g = nn.functional.max_pool2d(self.g((x, None))[0], [2, 2]) - # Perform reshapes - theta = theta.view(-1, self.in_channels // 8, x.shape[2] * x.shape[3]) - phi = phi.view(-1, self.in_channels // 8, x.shape[2] * x.shape[3] // 4) - g = g.view(-1, self.in_channels // 2, x.shape[2] * x.shape[3] // 4) - # Matmul and softmax to get attention maps - beta = nn.functional.softmax(torch.bmm(theta.transpose(1, 2), phi), -1) - # Attention map times g path - - o = self.o((torch.bmm(g, beta.transpose(1, 2)).view(-1, - self.in_channels // 2, x.shape[2], x.shape[3]), None))[0] - return self.gamma * o + x, mask, batch - - -class MSGGenerator(BaseGenerator): - - def __init__(self): - super().__init__(512) - max_imsize = 128 - unet = dict(enabled=True, residual=False) - - min_fmap_resolution = 4 - model_size = 512 - image_channels = 3 - pose_size = 14 - residual = False - conv_size = { - 4: model_size, - 8: model_size, - 16: model_size, - 32: model_size, - 64: model_size//2, - 128: model_size//4, - 256: model_size//8, - 512: model_size//16 - } - self.removable_hooks = [] - self.rgb_convolutions = nn.ModuleDict() - self.max_imsize = max_imsize - self._image_channels = image_channels - self._min_fmap_resolution = min_fmap_resolution - self._residual = residual - self._pose_size = pose_size - self.current_imsize = max_imsize - self._unet_cfg = unet - self.concat_input_mask = True - self.res2channels = {int(k): v for k, v in conv_size.items()} - - self.conv2d_config = EasyDict( - pixel_normalization=True, - leaky_relu_nslope=.2, - normalization="pixel_wise", - conv=dict( - type="conv", - wsconv=True, - gain=1, - ) - ) - self._init_decoder() - self._init_encoder() - - def _init_encoder(self): - self.encoder = nn.ModuleList() - imsize = self.max_imsize - self.from_rgb = build_convact( - self.conv2d_config, - in_channels=self._image_channels + self.concat_input_mask*2, - out_channels=self.res2channels[imsize], - kernel_size=1) - while imsize >= self._min_fmap_resolution: - current_size = self.res2channels[imsize] - next_size = self.res2channels[max(imsize//2, self._min_fmap_resolution)] - block = BasicBlock( - self.conv2d_config, imsize, current_size, - [current_size, next_size], self._residual) - self.encoder.add_module(f"basic_block{imsize}", block) - if imsize != self._min_fmap_resolution: - self.encoder.add_module( - f"downsample{imsize}", AvgPool2d(2)) - imsize //= 2 - - def _init_decoder(self): - self.decoder = nn.ModuleList() - self.decoder.add_module( - "latent_concat", LatentVariableConcat(self.conv2d_config)) - if self._pose_size > 0: - m = self._min_fmap_resolution - pose_shape = (16, m, m) - pose_fcnn = ScalarPoseFCNN(self._pose_size, 128, pose_shape) - self.decoder.add_module("pose_fcnn", pose_fcnn) - imsize = self._min_fmap_resolution - self.rgb_convolutions = nn.ModuleDict() - while imsize <= self.max_imsize: - current_size = self.res2channels[max(imsize//2, self._min_fmap_resolution)] - start_size = current_size - if imsize == self._min_fmap_resolution: - start_size += 32 - if self._pose_size > 0: - start_size += 16 - else: - self.decoder.add_module(f"upsample{imsize}", NearestUpsample()) - skip = UnetSkipConnection( - self.conv2d_config, current_size*2, current_size, imsize, - **self._unet_cfg) - self.decoder.add_module(f"skip_connection{imsize}", skip) - next_size = self.res2channels[imsize] - block = BasicBlock( - self.conv2d_config, imsize, start_size, [start_size, next_size], - residual=self._residual) - self.decoder.add_module(f"basic_block{imsize}", block) - - to_rgb = build_base_conv( - self.conv2d_config, False, in_channels=next_size, - out_channels=self._image_channels, kernel_size=1) - self.rgb_convolutions[str(imsize)] = to_rgb - imsize *= 2 - self.norm_constant = len(self.rgb_convolutions) - - def forward_decoder(self, x, mask, batch): - imsize_start = max(x.shape[-1] // 2, 1) - rgb = torch.zeros( - (x.shape[0], self._image_channels, - imsize_start, imsize_start), - dtype=x.dtype, device=x.device) - mask_size = 1 - mask_out = torch.zeros( - (x.shape[0], mask_size, - imsize_start, imsize_start), - dtype=x.dtype, device=x.device) - imsize = self._min_fmap_resolution // 2 - for module in self.decoder: - x, mask, batch = module((x, mask, batch)) - if isinstance(module, BasicBlock): - imsize *= 2 - rgb = up(rgb) - mask_out = up(mask_out) - conv = self.rgb_convolutions[str(imsize)] - rgb_, mask_ = conv((x, mask)) - assert rgb_.shape == rgb.shape,\ - f"rgb_ {rgb_.shape}, rgb: {rgb.shape}" - rgb = rgb + rgb_ - return rgb / self.norm_constant, mask_out - - def forward_encoder(self, x, mask, batch): - if self.concat_input_mask: - x = torch.cat((x, mask, 1 - mask), dim=1) - unet_features = {} - x, mask = self.from_rgb((x, mask)) - for module in self.encoder: - x, mask, batch = module((x, mask, batch)) - if isinstance(module, BasicBlock): - unet_features[module._resolution] = (x, mask) - return x, mask, unet_features - - def forward( - self, - condition, - mask, keypoints=None, z=None, - **kwargs): - keypoints = keypoints.flatten(start_dim=1).clip(-1, 1) - if z is None: - z = self.get_z(condition) - z = z.view(-1, 32, 4, 4) - batch = dict( - landmarks=keypoints, - z=z) - orig_mask = mask - x, mask, unet_features = self.forward_encoder(condition, mask, batch) - batch = dict( - landmarks=keypoints, - z=z, - unet_features=unet_features) - x, mask = self.forward_decoder(x, mask, batch) - x = condition * orig_mask + (1 - orig_mask) * x - return dict(img=x) - - def load_state_dict(self, state_dict, strict=True): - if "parameters" in state_dict: - state_dict = state_dict["parameters"] - old_checkpoint = any("basic_block0" in key for key in state_dict) - if not old_checkpoint: - return super().load_state_dict(state_dict, strict=strict) - mapping = {} - imsize = self._min_fmap_resolution - i = 0 - while imsize <= self.max_imsize: - old_key = f"decoder.basic_block{i}." - new_key = f"decoder.basic_block{imsize}." - mapping[old_key] = new_key - if i >= 1: - old_key = old_key.replace("basic_block", "skip_connection") - new_key = new_key.replace("basic_block", "skip_connection") - mapping[old_key] = new_key - mapping[old_key] = new_key - old_key = f"encoder.basic_block{i}." - new_key = f"encoder.basic_block{imsize}." - mapping[old_key] = new_key - old_key = "from_rgb.conv.layers.0." - new_key = "from_rgb.0." - mapping[old_key] = new_key - i += 1 - imsize *= 2 - new_sd = {} - for key, value in state_dict.items(): - old_key = key - if "from_rgb" in key: - new_sd[key.replace("encoder.", "").replace(".conv.layers", "")] = value - continue - for subkey, new_subkey in mapping.items(): - if subkey in key: - old_key = key - key = key.replace(subkey, new_subkey) - - break - if "decoder.to_rgb" in key: - continue - - new_sd[key] = value - return super().load_state_dict(new_sd, strict=strict) - - def update_w(self, *args, **kwargs): - return diff --git a/spaces/hahahafofo/ChatGLM-Chinese-Summary/app.py b/spaces/hahahafofo/ChatGLM-Chinese-Summary/app.py deleted file mode 100644 index 4a12b986aa86ade2de21bac083d21de9607f124a..0000000000000000000000000000000000000000 --- a/spaces/hahahafofo/ChatGLM-Chinese-Summary/app.py +++ /dev/null @@ -1,55 +0,0 @@ -import gradio as gr -from ui import chat -from ui import summary -from models import llm_model_dict, llm_model_dict_list, \ - embedding_model_dict_list -from models import models - -block_css = """.importantButton { - background: linear-gradient(45deg, #7e0570,#5d1c99, #6e00ff) !important; - border: none !important; -} -.importantButton:hover { - background: linear-gradient(45deg, #ff00e0,#8500ff, #6e00ff) !important; - border: none !important; -}""" - -webui_title = """ -# 🎉ChatGLM-Chinese-Summary WebUI🎉 -Link in: [https://github.com/zhongpei/ChatGLM-Chinese-Summary](https://github.com/zhongpei/ChatGLM-Chinese-Summary) -""" - -with gr.Blocks(css=block_css) as demo: - gr.Markdown(webui_title) - with gr.Tab("load model"): - llm_model = gr.Radio(llm_model_dict_list, - label="LLM 模型", - value=list(llm_model_dict.keys())[0], - interactive=True) - llm_lora = gr.Textbox(label="lora path", value="") - embedding_model = gr.Radio(embedding_model_dict_list, - label="Embedding 模型", - value=embedding_model_dict_list[0], - interactive=True) - - result = gr.Label("模型未加载") - - load_model_button = gr.Button( - "重新加载模型" if models.is_active() else "加载模型" - ) - load_model_button.click( - models.init_model, - show_progress=True, - inputs=[llm_model, llm_lora, embedding_model], - outputs=result - ) - - with gr.Tab("chat"): - chat.chat_ui(embedding_model) - - with gr.Tab("Summary"): - summary.summary_ui() - -demo.queue(concurrency_count=3).launch( - server_name='0.0.0.0', share=False, inbrowser=False -) diff --git a/spaces/hdhzk/bingo/src/lib/hooks/use-copy-to-clipboard.tsx b/spaces/hdhzk/bingo/src/lib/hooks/use-copy-to-clipboard.tsx deleted file mode 100644 index 62f7156dca246c46b213151af003a3a177977ccf..0000000000000000000000000000000000000000 --- a/spaces/hdhzk/bingo/src/lib/hooks/use-copy-to-clipboard.tsx +++ /dev/null @@ -1,33 +0,0 @@ -'use client' - -import * as React from 'react' - -export interface useCopyToClipboardProps { - timeout?: number -} - -export function useCopyToClipboard({ - timeout = 2000 -}: useCopyToClipboardProps) { - const [isCopied, setIsCopied] = React.useState(false) - - const copyToClipboard = (value: string) => { - if (typeof window === 'undefined' || !navigator.clipboard?.writeText) { - return - } - - if (!value) { - return - } - - navigator.clipboard.writeText(value).then(() => { - setIsCopied(true) - - setTimeout(() => { - setIsCopied(false) - }, timeout) - }) - } - - return { isCopied, copyToClipboard } -} diff --git a/spaces/hkayabilisim/clusternea/README.md b/spaces/hkayabilisim/clusternea/README.md deleted file mode 100644 index f3ef6005e3d1d1d8dc42adf590c993ca5fe5e959..0000000000000000000000000000000000000000 --- a/spaces/hkayabilisim/clusternea/README.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Clusternea -emoji: 🏃 -colorFrom: pink -colorTo: gray -sdk: docker -pinned: false ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/hoang1007/wav2vec2/src/datamodule/vlsp2020.py b/spaces/hoang1007/wav2vec2/src/datamodule/vlsp2020.py deleted file mode 100644 index caf6a68c0b66c33b4ca8979608f1a1f3c8a1be28..0000000000000000000000000000000000000000 --- a/spaces/hoang1007/wav2vec2/src/datamodule/vlsp2020.py +++ /dev/null @@ -1,131 +0,0 @@ -from typing import Callable, Optional, Union -from tqdm import tqdm -import os -import torch -import torchaudio -import torchaudio.functional as F -from torch.utils.data import Dataset, DataLoader, IterableDataset, random_split -from pytorch_lightning import LightningDataModule -import webdataset - - -class VLSP2020Dataset(Dataset): - def __init__(self, root: str, sample_rate: int = 16000): - super().__init__() - - self.sample_rate = sample_rate - self.memory = self._prepare_data(root) - self._memory = tuple( - (v["transcript"], v["audio"]) for v in self.memory.values() - ) - - @staticmethod - def _prepare_data(root: str): - memory = {} - - for f in os.scandir(root): - file_name, file_ext = os.path.splitext(f.name) - - if file_ext == ".txt": - if file_name not in memory: - memory[file_name] = {"transcript": f.path} - elif "transcript" not in memory[file_name]: - memory[file_name]["transcript"] = f.path - else: - raise ValueError(f"Duplicate transcript for {f.path}") - else: - if file_name not in memory: - memory[file_name] = {"audio": f.path} - elif "audio" not in memory[file_name]: - memory[file_name]["audio"] = f.path - else: - raise ValueError(f"Duplicate audio for {f.path}") - - for key, value in memory.items(): - if "audio" not in value: - raise ValueError(f"Missing audio for {key}") - elif "transcript" not in value: - raise ValueError(f"Missing transcript for {key}") - - return memory - - def __len__(self): - return len(self.memory) - - def __getitem__(self, index: int): - transcript, audio = self._memory[index] - - with open(transcript, "r") as f: - transcript = f.read() - - audio, sample_rate = torchaudio.load(audio) - audio = F.resample(audio, sample_rate, self.sample_rate) - - return transcript, audio - - -class VLSP2020TarDataset: - def __init__(self, outpath: str): - self.outpath = outpath - - def convert(self, dataset: VLSP2020Dataset): - writer = webdataset.TarWriter(self.outpath) - - for idx, (transcript, audio) in enumerate(tqdm(dataset, colour="green")): - writer.write( - { - "__key__": f"{idx:08d}", - "txt": transcript, - "pth": audio, - } - ) - - writer.close() - - def load(self) -> webdataset.WebDataset: - self.data = ( - webdataset.WebDataset(self.outpath) - .decode( - webdataset.handle_extension("txt", lambda x: x.decode("utf-8")), - webdataset.torch_audio, - ) - .to_tuple("txt", "pth") - ) - - return self.data - - -def get_dataloader( - dataset: Union[VLSP2020Dataset, webdataset.WebDataset], - return_transcript: bool = False, - target_transform: Optional[Callable] = None, - batch_size: int = 32, - num_workers: int = 2, -): - def collate_fn(batch): - def get_audio(item): - audio = item[1] - - assert ( - isinstance(audio, torch.Tensor) - and audio.ndim == 2 - and audio.size(0) == 1 - ) - - return audio.squeeze(0) - - audio = tuple(get_audio(item) for item in batch) - - if return_transcript: - if target_transform is not None: - transcript = tuple(target_transform(item[0]) for item in batch) - else: - transcript = tuple(item[0] for item in batch) - - return transcript, audio - else: - return audio - - return DataLoader( - dataset, batch_size=batch_size, num_workers=num_workers, collate_fn=collate_fn - ) diff --git a/spaces/huaiji3y/bingo-Public/src/components/ui/codeblock.tsx b/spaces/huaiji3y/bingo-Public/src/components/ui/codeblock.tsx deleted file mode 100644 index aabda4e3b59f4e36b6ab79feb19d8d18b70e881b..0000000000000000000000000000000000000000 --- a/spaces/huaiji3y/bingo-Public/src/components/ui/codeblock.tsx +++ /dev/null @@ -1,142 +0,0 @@ -'use client' - -import { FC, memo } from 'react' -import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' -import { coldarkDark } from 'react-syntax-highlighter/dist/cjs/styles/prism' - -import { useCopyToClipboard } from '@/lib/hooks/use-copy-to-clipboard' -import { IconCheck, IconCopy, IconDownload } from '@/components/ui/icons' -import { Button } from '@/components/ui/button' - -interface Props { - language: string - value: string -} - -interface languageMap { - [key: string]: string | undefined -} - -export const programmingLanguages: languageMap = { - javascript: '.js', - python: '.py', - java: '.java', - c: '.c', - cpp: '.cpp', - 'c++': '.cpp', - 'c#': '.cs', - ruby: '.rb', - php: '.php', - swift: '.swift', - 'objective-c': '.m', - kotlin: '.kt', - typescript: '.ts', - go: '.go', - perl: '.pl', - rust: '.rs', - scala: '.scala', - haskell: '.hs', - lua: '.lua', - shell: '.sh', - sql: '.sql', - html: '.html', - css: '.css' - // add more file extensions here, make sure the key is same as language prop in CodeBlock.tsx component -} - -export const generateRandomString = (length: number, lowercase = false) => { - const chars = 'ABCDEFGHJKLMNPQRSTUVWXY3456789' // excluding similar looking characters like Z, 2, I, 1, O, 0 - let result = '' - for (let i = 0; i < length; i++) { - result += chars.charAt(Math.floor(Math.random() * chars.length)) - } - return lowercase ? result.toLowerCase() : result -} - -const CodeBlock: FC = memo(({ language, value }) => { - const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2000 }) - - const downloadAsFile = () => { - if (typeof window === 'undefined') { - return - } - const fileExtension = programmingLanguages[language] || '.file' - const suggestedFileName = `file-${generateRandomString( - 3, - true - )}${fileExtension}` - const fileName = window.prompt('Enter file name' || '', suggestedFileName) - - if (!fileName) { - // User pressed cancel on prompt. - return - } - - const blob = new Blob([value], { type: 'text/plain' }) - const url = URL.createObjectURL(blob) - const link = document.createElement('a') - link.download = fileName - link.href = url - link.style.display = 'none' - document.body.appendChild(link) - link.click() - document.body.removeChild(link) - URL.revokeObjectURL(url) - } - - const onCopy = () => { - if (isCopied) return - copyToClipboard(value) - } - - return ( -
      -
      - {language} -
      - - -
      -
      - - {value} - -
      - ) -}) -CodeBlock.displayName = 'CodeBlock' - -export { CodeBlock } diff --git a/spaces/huggingface-projects/Deep-RL-Course-Certification/app.py b/spaces/huggingface-projects/Deep-RL-Course-Certification/app.py deleted file mode 100644 index c241484d22d50afaa6921f0bc36abf091ab415c0..0000000000000000000000000000000000000000 --- a/spaces/huggingface-projects/Deep-RL-Course-Certification/app.py +++ /dev/null @@ -1,435 +0,0 @@ -import gradio as gr -from huggingface_hub import HfApi, hf_hub_download, Repository -from huggingface_hub.repocard import metadata_load - -from PIL import Image, ImageDraw, ImageFont - -from datetime import date -import time - -import os -import pandas as pd - -from utils import * - -api = HfApi() - -DATASET_REPO_URL = "https://huggingface.co/datasets/huggingface-projects/Deep-RL-Course-Certification" -CERTIFIED_USERS_FILENAME = "certified_users.csv" -CERTIFIED_USERS_DIR = "certified_users" - -HF_TOKEN = os.environ.get("HF_TOKEN") - -repo = Repository( - local_dir=CERTIFIED_USERS_DIR, clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN -) - -def get_user_models(hf_username, env_tag, lib_tag): - """ - List the Reinforcement Learning models - from user given environment and lib - :param hf_username: User HF username - :param env_tag: Environment tag - :param lib_tag: Library tag - """ - api = HfApi() - models = api.list_models(author=hf_username, filter=["reinforcement-learning", env_tag, lib_tag]) - - user_model_ids = [x.modelId for x in models] - return user_model_ids - - -def get_user_sf_models(hf_username, env_tag, lib_tag): - models_sf = [] - models = api.list_models(author=hf_username, filter=["reinforcement-learning", lib_tag]) - - user_model_ids = [x.modelId for x in models] - - for model in user_model_ids: - meta = get_metadata(model) - if meta is None: - continue - result = meta["model-index"][0]["results"][0]["dataset"]["name"] - if result == env_tag: - models_sf.append(model) - - return models_sf - - -def get_metadata(model_id): - """ - Get model metadata (contains evaluation data) - :param model_id - """ - try: - readme_path = hf_hub_download(model_id, filename="README.md") - return metadata_load(readme_path) - except requests.exceptions.HTTPError: - # 404 README.md not found - return None - - -def parse_metrics_accuracy(meta): - """ - Get model results and parse it - :param meta: model metadata - """ - if "model-index" not in meta: - return None - result = meta["model-index"][0]["results"] - metrics = result[0]["metrics"] - accuracy = metrics[0]["value"] - - return accuracy - - -def parse_rewards(accuracy): - """ - Parse mean_reward and std_reward - :param accuracy: model results - """ - default_std = -1000 - default_reward= -1000 - if accuracy != None: - accuracy = str(accuracy) - parsed = accuracy.split(' +/- ') - if len(parsed)>1: - mean_reward = float(parsed[0]) - std_reward = float(parsed[1]) - elif len(parsed)==1: #only mean reward - mean_reward = float(parsed[0]) - std_reward = float(0) - else: - mean_reward = float(default_std) - std_reward = float(default_reward) - else: - mean_reward = float(default_std) - std_reward = float(default_reward) - - return mean_reward, std_reward - -def calculate_best_result(user_model_ids): - """ - Calculate the best results of a unit - best_result = mean_reward - std_reward - :param user_model_ids: RL models of a user - """ - best_result = -1000 - best_model_id = "" - for model in user_model_ids: - meta = get_metadata(model) - if meta is None: - continue - accuracy = parse_metrics_accuracy(meta) - mean_reward, std_reward = parse_rewards(accuracy) - result = mean_reward - std_reward - if result > best_result: - best_result = result - best_model_id = model - - return best_result, best_model_id - -def check_if_passed(model): - """ - Check if result >= baseline - to know if you pass - :param model: user model - """ - if model["best_result"] >= model["min_result"]: - model["passed_"] = True - - -def certification(hf_username, first_name, last_name): - results_certification = [ - { - "unit": "Unit 1", - "env": "LunarLander-v2", - "library": "stable-baselines3", - "min_result": 200, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 2", - "env": "Taxi-v3", - "library": "q-learning", - "min_result": 4, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 3", - "env": "SpaceInvadersNoFrameskip-v4", - "library": "stable-baselines3", - "min_result": 200, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 4", - "env": "CartPole-v1", - "library": "reinforce", - "min_result": 350, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 4", - "env": "Pixelcopter-PLE-v0", - "library": "reinforce", - "min_result": 5, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 5", - "env": "ML-Agents-SnowballTarget", - "library": "ml-agents", - "min_result": -100, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 5", - "env": "ML-Agents-Pyramids", - "library": "ml-agents", - "min_result": -100, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 6", - "env": "PandaReachDense", - "library": "stable-baselines3", - "min_result": -3.5, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 7", - "env": "ML-Agents-SoccerTwos", - "library": "ml-agents", - "min_result": -100, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 8 PI", - "env": "LunarLander-v2", - "library": "deep-rl-course", - "min_result": -500, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - { - "unit": "Unit 8 PII", - "env": "doom_health_gathering_supreme", - "library": "sample-factory", - "min_result": 5, - "best_result": 0, - "best_model_id": "", - "passed_": False - }, - ] - for unit in results_certification: - if unit["unit"] == "Unit 6": - # Since Unit 6 can use PandaReachDense-v2 or v3 - user_models = get_user_models(hf_username, "PandaReachDense-v3", unit["library"]) - if len(user_models) == 0: - print("Empty") - user_models = get_user_models(hf_username, "PandaReachDense-v2", unit["library"]) - elif unit["unit"] != "Unit 8 PII": - # Get user model - user_models = get_user_models(hf_username, unit['env'], unit['library']) - # For sample factory vizdoom we don't have env tag for now - else: - user_models = get_user_sf_models(hf_username, unit['env'], unit['library']) - - # Calculate the best result and get the best_model_id - best_result, best_model_id = calculate_best_result(user_models) - - # Save best_result and best_model_id - unit["best_result"] = best_result - unit["best_model_id"] = make_clickable_model(best_model_id) - - # Based on best_result do we pass the unit? - check_if_passed(unit) - unit["passed"] = pass_emoji(unit["passed_"]) - - print(results_certification) - - df1 = pd.DataFrame(results_certification) - - df = df1[['passed', 'unit', 'env', 'min_result', 'best_result', 'best_model_id']] - - certificate, message, pdf, pass_ = verify_certification(results_certification, hf_username, first_name, last_name) - print("MESSAGE", message) - - if pass_: - visible = True - else: - visible = False - - - return message, pdf, certificate, df, output_row.update(visible=visible) - -""" -Verify that the user pass. -If yes: -- Generate the certification -- Send an email -- Print the certification - -If no: -- Explain why the user didn't pass yet -""" -def verify_certification(df, hf_username, first_name, last_name): - # Check that we pass - model_pass_nb = 0 - pass_percentage = 0 - pass_ = False - - for unit in df: - if unit["passed_"] is True: - model_pass_nb += 1 - - pass_percentage = (model_pass_nb/11) * 100 - print("pass_percentage", pass_percentage) - - if pass_percentage == 100: - pass_ = True - # Generate a certificate of excellence - certificate, pdf = generate_certificate("./certificate_models/certificate-excellence.png", first_name, last_name) - - # Add this user to our database - add_certified_user(hf_username, first_name, last_name, pass_percentage) - - # Add a message - message = """ - Congratulations, you successfully completed the Hugging Face Deep Reinforcement Learning Course 🎉! \n - Since you pass 100% of the hands-on you get a Certificate of Excellence 🎓. \n - You can download your certificate below ⬇️ \n - Don't hesitate to share your certificate image below on Twitter and Linkedin (you can tag me @ThomasSimonini and @huggingface) 🤗 - """ - - elif pass_percentage < 100 and pass_percentage >= 80: - pass_ = True - # Certificate of completion - certificate, pdf = generate_certificate("./certificate_models/certificate-completion.png", first_name, last_name) - - # Add this user to our database - add_certified_user(hf_username, first_name, last_name, pass_percentage) - - # Add a message - message = """ - Congratulations, you successfully completed the Hugging Face Deep Reinforcement Learning Course 🎉! \n - Since you pass 80% of the hands-on you get a Certificate of Completion 🎓. \n - You can download your certificate below ⬇️ \n - Don't hesitate to share your certificate image below on Twitter and Linkedin (you can tag me @ThomasSimonini and @huggingface) 🤗 \n - You can try to get a Certificate of Excellence if you pass 100% of the hands-on, don't hesitate to check which unit you didn't pass and update these models. - """ - - else: - # Not pass yet - certificate = Image.new("RGB", (100, 100), (255, 255, 255)) - pdf = "./fail.pdf" - - # Add a message - message = """ - You didn't pass the minimum of 80% of the hands-on to get a certificate of completion. But don't be discouraged! \n - Check below which units you need to do again to get your certificate 💪 - """ - print("return certificate") - return certificate, message, pdf, pass_ - - -def generate_certificate(certificate_model, first_name, last_name): - im = Image.open(certificate_model) - d = ImageDraw.Draw(im) - - name_font = ImageFont.truetype("Quattrocento-Regular.ttf", 100) - date_font = ImageFont.truetype("Quattrocento-Regular.ttf", 48) - - name = str(first_name) + " " + str(last_name) - print("NAME", name) - - # Debug line name - #d.line(((200, 740), (1800, 740)), "gray") - #d.line(((1000, 0), (1000, 1400)), "gray") - - # Name - d.text((1000, 740), name, fill="black", anchor="mm", font=name_font) - - # Debug line date - #d.line(((1500, 0), (1500, 1400)), "gray") - - # Date of certification - d.text((1480, 1170), str(date.today()), fill="black", anchor="mm", font=date_font) - - - pdf = im.convert('RGB') - pdf.save('certificate.pdf') - - return im, "./certificate.pdf" - - - -def add_certified_user(hf_username, first_name, last_name, pass_percentage): - """ - Add the certified user to the database - """ - print("ADD CERTIFIED USER") - repo.git_pull() - history = pd.read_csv(os.path.join(CERTIFIED_USERS_DIR, CERTIFIED_USERS_FILENAME)) - - # Check if this hf_username is already in our dataset: - check = history.loc[history['hf_username'] == hf_username] - if not check.empty: - history = history.drop(labels=check.index[0], axis=0) - - new_row = pd.DataFrame({'hf_username': hf_username, 'first_name': first_name, 'last_name': last_name, 'pass_percentage': pass_percentage, 'datetime': time.time()}, index=[0]) - history = pd.concat([new_row, history[:]]).reset_index(drop=True) - - history.to_csv(os.path.join(CERTIFIED_USERS_DIR, CERTIFIED_USERS_FILENAME), index=False) - repo.push_to_hub(commit_message="Update certified users list") - - -with gr.Blocks() as demo: - gr.Markdown(f""" - # Get your Deep Reinforcement Learning Certificate 🎓 - The certification process is completely free: - - - To get a *certificate of completion*: you need to **pass 80% of the assignments**. - - To get a *certificate of honors*: you need to **pass 100% of the assignments**. - - There's **no deadlines, the course is self-paced**. - - For more information about the certification process [check this](https://huggingface.co/deep-rl-course/communication/certification) - - Don’t hesitate to share your certificate on Twitter (tag me @ThomasSimonini and @huggingface) and on Linkedin. - """) - - hf_username = gr.Textbox(placeholder="ThomasSimonini", label="Your Hugging Face Username (case sensitive)") - first_name = gr.Textbox(placeholder="Jane", label="Your First Name") - last_name = gr.Textbox(placeholder="Doe", label="Your Last Name") - #email = gr.Textbox(placeholder="jane.doe@gmail.com", label="Your Email (to receive your certificate)") - check_progress_button = gr.Button(value="Check if I pass") - output_text = gr.components.Textbox() - with gr.Row(visible=True) as output_row: - output_pdf = gr.File() - output_img = gr.components.Image(type="pil") - output_dataframe = gr.components.Dataframe(headers=["Pass?", "Unit", "Environment", "Baseline", "Your best result", "Your best model id"], datatype=["markdown", "markdown", "markdown", "number", "number", "markdown", "bool"]) #value= certification(hf_username, first_name, last_name), - check_progress_button.click(fn=certification, inputs=[hf_username, first_name, last_name], outputs=[output_text, output_pdf, output_img, output_dataframe, output_row])#[output1, output2]) - - -demo.launch(debug=True) \ No newline at end of file diff --git a/spaces/iamstolas/STOLAS/src/components/voice.tsx b/spaces/iamstolas/STOLAS/src/components/voice.tsx deleted file mode 100644 index 074d0e145229947282a472bd84f6578cf0b3c71c..0000000000000000000000000000000000000000 --- a/spaces/iamstolas/STOLAS/src/components/voice.tsx +++ /dev/null @@ -1,52 +0,0 @@ -import React, { useEffect } from 'react' -import { useSetAtom } from 'jotai' -import { useBing } from '@/lib/hooks/use-bing' -import Image from 'next/image' -import VoiceIcon from '@/assets/images/voice.svg' -import VoiceButton from './ui/voice' -import { SR } from '@/lib/bots/bing/sr' -import { voiceListenAtom } from '@/state' - -const sr = new SR(['发送', '清空', '退出']) - -const Voice = ({ setInput, input, sendMessage, isSpeaking }: Pick, 'setInput' | 'sendMessage' | 'input' | 'isSpeaking'>) => { - const setListen = useSetAtom(voiceListenAtom) - useEffect(() => { - if (sr.listening) return - sr.transcript = !isSpeaking - }, [isSpeaking]) - - useEffect(() => { - sr.onchange = (msg: string, command?: string) => { - switch (command) { - case '退出': - sr.stop() - break; - case '发送': - sendMessage(input) - case '清空': - setInput('') - break; - default: - setInput(input + msg) - } - } - }, [input]) - - const switchSR = (enable: boolean = false) => { - setListen(enable) - if (enable) { - sr.start() - } else { - sr.stop() - } - } - - return sr.listening ? ( - switchSR(false)} /> - ) : ( - start voice switchSR(true)} /> - ) -}; - -export default Voice; diff --git a/spaces/inamXcontru/PoeticTTS/Avg Pc Tuneup Free Key.md b/spaces/inamXcontru/PoeticTTS/Avg Pc Tuneup Free Key.md deleted file mode 100644 index 9650aff1187db5e4d86ae50ff38bb1886000087a..0000000000000000000000000000000000000000 --- a/spaces/inamXcontru/PoeticTTS/Avg Pc Tuneup Free Key.md +++ /dev/null @@ -1,6 +0,0 @@ -

      Avg pc tuneup free key


      Download Zip ☆☆☆ https://gohhs.com/2uz3R8



      - -Buy AVG PC TuneUp Key 1 Year 1 Dev - Official website CD KEY at the cheapest prices. Activate the CD Key on your Official website client. Save money and ... 1fdad05405
      -
      -
      -

      diff --git a/spaces/inamXcontru/PoeticTTS/BFF.or.Die.x64-DARKSiDERS Free A Review of the Indie Game That Makes You Work Together or Die.md b/spaces/inamXcontru/PoeticTTS/BFF.or.Die.x64-DARKSiDERS Free A Review of the Indie Game That Makes You Work Together or Die.md deleted file mode 100644 index 096d04c2a674e917ce348092ff943f3c7eeb56d7..0000000000000000000000000000000000000000 --- a/spaces/inamXcontru/PoeticTTS/BFF.or.Die.x64-DARKSiDERS Free A Review of the Indie Game That Makes You Work Together or Die.md +++ /dev/null @@ -1,5 +0,0 @@ - -

      var adlinkfly_url = ' ';var adlinkfly_api_token = 'bfa244894c752b64eaa1294dc83ff36d560f708a';var adlinkfly_advert = 2;var adlinkfly_domains = ['depositfiles.com', 'rapidshare.com', 'uploading.com', 'uploadable.ch', 'letitbit.net', 'turbobit.net','depositfiles.com', 'rapidshare.com', 'vip-file.com', 'smsfiles.ru', '4files.net', 'turbobit.ru', 'uploading.com', 'letitbit.net', 'depositfiles.ru', 'sms4file.com', 'ifolder.ru', 'hotfile.com', 'anyfiles.net', 'sharingmatrix.com', 'megashare.com', 'mega.nz', 'rapidshare.de', 'rapidshare.ru', 'uploadbox.com', 'filefactory.com', 'filefactory.ru', 'filepost.ru', 'onefile.net', 'freefolder.net', 'wiiiso.com', 'getthebit.com', 'ufille.ru','drive.google.com','1fichier.com','uptobox.com','multiup.org','cloud.mail.ru','auctor.tv','the-eye.eu','mediafire.com','romcollector.com','safelinking.net','j.gs','*.zippyshare.com', 'uploadable.ch','www.mediafire.com','mega.co.nz','rarbg.to','magnet:?xt'];

      -

      BFF.or.Die.x64-DARKSiDERS Free


      DOWNLOADhttps://gohhs.com/2uz3ta



      aaccfb2cb3
      -
      -
      \ No newline at end of file diff --git a/spaces/inamXcontru/PoeticTTS/Debella The Porn Star.md b/spaces/inamXcontru/PoeticTTS/Debella The Porn Star.md deleted file mode 100644 index 3df167b33727cbf3a2248bfbfe1df149e48c2228..0000000000000000000000000000000000000000 --- a/spaces/inamXcontru/PoeticTTS/Debella The Porn Star.md +++ /dev/null @@ -1,23 +0,0 @@ - -

      Most adult performers get their start at a fairly young age, but De’Bella (aka DeBella) has never been one to follow a traditional path. This mature brunette is a Blytheville, Arkansas native and a Scorpio, born on November 2, 1956. She was about 50 years old when she shot her first scene! De’Bella is a real-life porn star MILF whose daughter is fellow porn star Jewel D’Nyle. Just one look at De’Bella on the cover ofDe’Bella’s Young FellasorSquirting Grannies 2will show that age does not mean a body can’t be firm and fit. When she appeared onThe Insideron CBS, De’Bella was revealed to be a more or less ordinary housewife… who just happens to love being a professional onscreen fucker. Let De’Bella be an inspiration to women of every age, everywhere. She’s an excellent addition to every film, whether she’s doing blowjob only, creampie, anal, or lesbian.

      -

      "When I first started, I had to take a lot of prescription drugs (vicodin and muscle relaxers) to get through things. I did have a prescription drug problem. I'm over it now. It's taken me about six weeks."

      -

      De'bella The Porn Star


      Download Filehttps://gohhs.com/2uz3MT



      -

      XXXBunker is the biggest porn tube on the web with the largest selection of free full length porn videos and new videos added daily. Porn, XXX, Pussy, Sex and more! We work hard to bring you the best new porn found anywhere online! Our collection is deep and we're sure that you will find exactly the kind of pussy, dick or fucking you are looking for!

      -

      Disclaimer: We have zero tolerance policy against any illegal pornography. All links, videos and images are provided by 3rd parties. We have no control over the content of these sites. We take no responsibility for the content on any website which we link to, please use your own discretion while surfing the links.

      -

      Old Spunkers present gorgeous matures with curvy bodies. These hot moms know how to play with real dicks. Genuine older ladies have everything to make a wild sex with lucky fuckers. Amazing mature honeys give passionate blowjobs, spreads sexy legs for hardcore fucking actions and demonstrate their gentle pussies in sweet solo scenes. Everyone will get a pleasure watching such classy porn movies. Experienced and talented matures will unlock the horniest secrets.

      -

      In 2008, Thorne starred alongside Christian Slater and Taylor Lautner in the short-lived drama series My Own Worst Enemy, for which she won a Young Artist Award for her portrayal of the character Ruthy Spivey; Thorne described her Enemy casting as a major breakthrough as this was the first recurring role in her career. The same year, she starred in the third-last episode of October Road as Angela Ferilli, the pre-adolescence crush of the main characters. Her older brother Remy also guest-starred in the same episode as a younger Eddie Latekka.[citation needed]

      -

      In 2009, she starred in the web series Little Monk, which depicted characters from the series Monk, as Wendy, one of Adrian Monk's classmates. The webisodes are available only on the "Best of Monk" DVD. Also in 2009, she played the role of the vengeful antagonist in the horror film Forget Me Not. Thorne took on a supporting role in the family drama Raspberry Magic, which premiered at the Cinequest Film Festival[23] and the San Francisco International Asian American Film Festival in 2010.[24]

      -

      In 2010, Thorne replaced Jolean Wejbe as Tancy "Teenie" Henrickson, Bill and Barb Henrickson's younger daughter, in Season 4 of HBO's Big Love.[25] Thorne co-starred on the Disney Channel sitcom Shake It Up, originally titled Dance, Dance Chicago. Thorne played CeCe Jones, a dancer with ambitions for a career in the spotlight despite having dyslexia.[26] The show is a buddy comedy centered on a teen dance show (in a show-within-a-show format) co-starring Thorne and Zendaya.[27] The multi-camera series began production in Hollywood, California, in July 2010 and premiered on November 7, 2010, on Disney Channel. While she had a substantial portfolio of work in television and film, Thorne had no experience in professional dancing before being cast. After signing onto the show in October 2009, she began taking three dance classes every night.

      -

      -

      In 2014, Thorne co-starred in the comedy Blended, as Adam Sandler's character's daughter.[43] She also co-starred in the films Alexander and the Terrible, Horrible, No Good, Very Bad Day (2014) and The DUFF (2015), playing high school antagonists.[44] On July 30, Thorne was cast in an episode of the fifteenth season of the CSI: Crime Scene Investigation.[45] The episode, "The Book of Shadows", aired October 19, 2014.[46] Thorne appeared in the sequel to Mostly Ghostly (2008), titled Mostly Ghostly: Have You Met My Ghoulfriend (2014) as Cammy Cahill.[47] On October 15, Thorne revealed her debut album was canceled, saying she wasn't happy with the "auto-tuned bad music" she had in the works.[48] She released an EP, Jersey, on November 17.[49][50] The lead single from the EP, "Call It Whatever", debuted in the Billboard Hot Dance Club Songs chart at number forty-seven, eventually rising to number ten, spending a total of ten weeks on the chart.[51][52][53] Thorne has signed on as one of the leads in Manis Film's thriller Big Sky; Thorne plays Hazel.[54] In 2014, Thorne was cast in the MTV series Scream, which is a television adaptation based on the original slasher film series Scream.[55] Thorne was offered the lead role of the series but felt that the role of the "mean, terrible Nina" would be more iconic.[56]

      -

      In 2015, Thorne was cast in the animated U.S. dub of the film The Frog Kingdom, portraying the role of Frog Princess. The film was scheduled to be released on video on demand and on DVD beginning on June 30, 2015, by Lionsgate Home Entertainment.[57] On June 1, 2015, it was announced that Thorne would star in the AwesomenessTV film Shovel Buddies, playing the role of Kate. The movie was released on iTunes on October 11, 2016.[58] She also played Jamie, a disillusioned teenager intensely guarding a personal secret, in the film Keep Watching.[59] Also in 2015, she appeared as Ashley, a young and famous singer in Alvin and the Chipmunks: The Road Chip.[60]

      -

      In 2016, Thorne played Rain in Tyler Perry's Boo! A Madea Halloween.[61] In 2017, Thorne went back to television with a drama series Famous in Love, airing on Freeform, in which she played Paige Townsen, an ordinary college student who gets her big break after auditioning for the starring role in a Hollywood blockbuster. In March 2017, Thorne joined the cast of the black comedy film, Assassination Nation, which was released in theaters on September 21, 2018.[62] In the same year, Thorne starred in the Netflix original film, You Get Me and made an appearance on Prince Fox's single "Just Call".[63] In October of that year, Thorne appeared in the slasher comedy The Babysitter, directed by McG and released directly to Netflix.[64] She reprised her role in the sequel The Babysitter: Killer Queen.[65]

      -

      Thorne starred in the romantic drama Midnight Sun, based on the 2006 Japanese film of the same name and released on March 23, 2018. She also contributed five songs to the soundtrack, including the lead single "Burn So Bright" and fan favorite "Walk With Me". The next month, during the Coachella festival, she announced the launch of her own record label called Filthy Fangs. In August 2018, it was revealed that her record label has a partnership deal with Epic/Sony and she began work on her debut studio album titled What Do You See Now?.[66]

      -

      In 2020, Thorne competed as "Swan" in the third season of The Masked Singer. She was eliminated on her second appearance.[69] She also starred alongside Jake Manley in the heist-thriller Infamous which was released on June 12, 2020.[70][71][72] She received praise for her performance, with critic Nick Allen states that she had "the classically great presence of someone like Sandra Bullock, but with her own scraggly edge ... Thorne dominates numerous scenes that catapult her character from clout-hungry wannabe to gun-selfie superstar."[73]

      -

      In November 2020, Thorne starred in the thriller Girl directed by Chad Faust, the movie received positive reviews from critics who entitled this to be Thorne's best performance to date. In the same month she also starred in the action comedy film Chich Fight alongside Malin Akerman and directed by Paul Leyden,[80]

      -

      In 2021, Thorne played Lily in season 1 of Amazon Prime Video's Paradise City. She also starred in other projects, such as Masquerade and Time Is Up. In the same year, Thorne starred and served as an executive producer on the film Habit, which is directed by Janell Shirtcliff,[81] Leave Not One Alive opposite Melissa Leo, directed by Jordan Galland,[82] and The Trainer directed by Tony Kaye.[83]

      -

      In June 2019, Thorne had nude photos stolen by hackers who subsequently threatened her with extortion; she instead released the photographs herself.[104][105] Later that year, she addressed the issue of pornographic deepfakes.[106]

      -

      Le personnage de Bella Cherry, qui vient juste de mettre le pied dans le milieu, a néanmoins besoin de beaucoup de conseils. Plusieurs prises montrent ses pas, ses chaussures, ses souliers de course comme ses Pleasers, sa marche tantôt hésitante, tantôt décidée. Dans plusieurs autres, elle se fait maquiller, habiller. Comme un hommage à cet aspect ignoré de la pornographie; nous parlons toujours de nudité, mais les accoutrements, si spécifiques, sont souvent oubliés.

      -

      La sc\u00E8ne est horrible. Le 8 octobre dernier au TwitchCon, la star de la pornographie et streameuse Adriana Chechik saute en faisant le grand \u00E9cart dans un bassin recouvert de cubes en mousse. Une toute petite couche de cubes mis\u00E9rables pos\u00E9s n\u00E9gligemment sur un sol de b\u00E9ton (recouvert, selon Buzzfeed, d\u2019un \u00ABgenre de matelas\u00BB). L\u2019impact est imm\u00E9diat. Elle fige, puis se tord de douleur. Son dos est cass\u00E9 \u00E0 deux endroits.

      aaccfb2cb3
      -
      -
      \ No newline at end of file diff --git a/spaces/inplisQlawa/anything-midjourney-v4-1/(Free Video Flip And Rotate V2.2.41).md b/spaces/inplisQlawa/anything-midjourney-v4-1/(Free Video Flip And Rotate V2.2.41).md deleted file mode 100644 index f6cc9e1b09e211ac1e0726fe9cfb173a61c7ce7b..0000000000000000000000000000000000000000 --- a/spaces/inplisQlawa/anything-midjourney-v4-1/(Free Video Flip And Rotate V2.2.41).md +++ /dev/null @@ -1,5 +0,0 @@ -
      -

      in experiment 1, we tested the following two hypotheses: (a) per the frequency of incorrect trials in experiment 4, subjects are using a strategy of mental rotation to correct their movements in the forced task, and (b) the simple rt data in experiment 3 is consistent with a model of mental rotation. the hypotheses are motivated by the following observations. first, in experiment 1, subjects are required to perform a visuomotor rotation task in which a visual target is flashed and the cursor is moved to the location of the target. this paradigm is designed to minimize the amount of noise in the data in order to study the mental rotation process in isolation from other cognitive operations (e.g. the motor planning process). a key result of experiment 1 is that the subject’s primary source of error is rotation. in particular, subjects appear to be using a strategy of mental rotation to correct for their errors. in experiment 2, subjects attempted to perform the same visuomotor rotation task, but in the free task, subjects were required to attempt to land the cursor on the target. in this task, subjects are required to perform a visual rotation task without committing to a plan of movement (as in experiment 1). as expected, the error is reduced in the free task. in experiment 3, subjects are tasked with simply pressing a button as quickly as possible when a target is presented. if subjects are using a strategy of mental rotation to correct for their errors, then they should perform worse when the target is presented on a rotated background and should perform better when it is presented on a baseline background, as in experiments 4 and 7. as shown in fig. 9b, the subject’s rts are faster on baseline trials, demonstrating that subjects are able to inhibit the rotated background.

      -

      (Free Video Flip and Rotate v2.2.41)


      Download Zip ————— https://urlin.us/2uEyzw



      899543212b
      -
      -
      \ No newline at end of file diff --git a/spaces/inreVtussa/clothingai/Deftones.-.Gore.[.[2016].]..320.kbps..md b/spaces/inreVtussa/clothingai/Deftones.-.Gore.[.[2016].]..320.kbps..md deleted file mode 100644 index d7aa1989cda50bd0ae142791dbdc7b3cc506ebd6..0000000000000000000000000000000000000000 --- a/spaces/inreVtussa/clothingai/Deftones.-.Gore.[.[2016].]..320.kbps..md +++ /dev/null @@ -1,60 +0,0 @@ -## Deftones.-.Gore.[.[2016].]..320.kbps. - - - - - - - - - -**LINK ->>->>->> [https://hendmulrelan.blogspot.com/?d=2tycHe](https://hendmulrelan.blogspot.com/?d=2tycHe)** - - - - - - - - - - - - - -# Deftones: Gore - A Review - - - -Deftones are one of the most influential and innovative bands in the alternative metal scene, blending elements of shoegaze, post-rock, ambient and experimental music with their heavy and aggressive sound. Their eighth studio album, Gore, released on April 8, 2016 by Reprise Records, is a testament to their artistic vision and creative evolution. - - - -Gore is a diverse and dynamic album that explores different moods and atmospheres, from the soaring and melodic opener "Prayers / Triangles" to the crushing and chaotic closer "Rubicon". The album features guest guitar by Jerry Cantrell of Alice in Chains on the haunting and hypnotic track "Phantom Bride", which is one of the highlights of the album. The album also showcases the band's mastery of contrast and balance, as they switch between soft and loud, calm and intense, simple and complex, creating a rich and immersive sonic experience. - - - -The album was met with critical acclaim, debuting at number two on the US Billboard 200, making it the band's highest-charting album since their self-titled album in 2003. The album also received positive reviews from fans and critics alike, who praised the band's experimentation and innovation, as well as their emotional and lyrical depth. Gore is an album that challenges and rewards the listener, as it reveals new layers and nuances with each listen. - - - -Gore is a must-have for any Deftones fan, as well as anyone who appreciates original and progressive music. The album is available in various formats, including CD, vinyl, digital download and streaming. The album can be downloaded in high-quality 320 kbps MP3 format from various sources online. - - - -Gore also received praise for its production and sound quality, which was handled by Matt Hyde and the band themselves. The album sounds crisp and clear, without losing any of the rawness and power that Deftones are known for. The album also benefits from the use of various guitar tunings and effects, as well as the use of a Bass VI by Sergio Vega, which adds a deeper and richer tone to the low end. The album is a sonic feast for the ears, especially when listened to in high-quality 320 kbps MP3 format. - - - -One of the most notable aspects of Gore is the creative tension between Chino Moreno and Stephen Carpenter, who had different visions for the direction of the album. Moreno wanted to explore more atmospheric and experimental sounds, while Carpenter wanted to stick to more heavy and aggressive riffs. The result is a clash of styles that somehow works in harmony, creating a unique and captivating blend of beauty and beast. Moreno described the album as "a little bit of everybody's flavour" [1], while Carpenter admitted that he had to "learn to like it" [2]. Despite their differences, the band members agreed that Gore was a collaborative effort that reflected their growth and maturity as musicians. - - - -Gore is not an easy album to digest on first listen, as it requires patience and attention to fully appreciate its nuances and subtleties. However, once it clicks, it becomes a rewarding and addictive listen that reveals new secrets and surprises with each spin. Gore is an album that stands out in Deftones' impressive discography, as well as in the alternative metal genre as a whole. It is an album that proves that Deftones are still at the top of their game, and that they are not afraid to challenge themselves and their listeners with their artistic vision. - - dfd1c89656 - - - - - diff --git a/spaces/inreVtussa/clothingai/Examples/Configurar Router Smc Como Repetidor Wifi.md b/spaces/inreVtussa/clothingai/Examples/Configurar Router Smc Como Repetidor Wifi.md deleted file mode 100644 index 9ec851a767c8d046b93c1883a3ba252d48b61974..0000000000000000000000000000000000000000 --- a/spaces/inreVtussa/clothingai/Examples/Configurar Router Smc Como Repetidor Wifi.md +++ /dev/null @@ -1,6 +0,0 @@ -

      Configurar Router Smc Como Repetidor Wifi


      Download Ziphttps://tiurll.com/2uClam



      -
      -Convert multiple VIEJO modems to REPETIDOR WIFI or hotspot | Paso a paso para principiante. Jotay. This post belongs to the category "Training and Learning". This article covers how to convert multiple VIEJO modems into a REPETIDOR WIFI or hotspot. This question is most interesting for beginners because there is actually a very easy way to do it. In this case, we have VIEJO D2 (S2) modems, as well as D1 (S1) and D3 (S2) modems. They are in both layers (S and S2 or S1 and S3) and they are both REPETIDOR WIFI modems. 8a78ff9644
      -
      -
      -

      diff --git a/spaces/jbilcke-hf/LifeSim/src/components/business/image-renderer.tsx b/spaces/jbilcke-hf/LifeSim/src/components/business/image-renderer.tsx deleted file mode 100644 index 8b944b94f00c5196b5c4d1a30f1581d8d7d0be23..0000000000000000000000000000000000000000 --- a/spaces/jbilcke-hf/LifeSim/src/components/business/image-renderer.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { useRef } from "react" - -import { ImageSegment, RenderedScene } from "@/app/types" - -export const ImageRenderer = ({ - assetUrl = "", - maskBase64 = "", - segments = [] -}: RenderedScene) => { - const imgRef = useRef(null) - const canvas = document.createElement('canvas') - const context = canvas.getContext('2d') - - const getPixelColor = (x: number, y: number) => { - console.log("getting pixel color") - if (!context) { - throw new Error("Unable to get context from canvas") - } - - const imgData = context.getImageData(x, y, 1, 1).data - - return `[${imgData[0]},${imgData[1]},${imgData[2]},${imgData[3]/255}]` - } - - const handleMouseDown = (event: React.MouseEvent) => { - const boundingRect = imgRef.current!.getBoundingClientRect() - - const x = event.clientX - boundingRect.left - const y = event.clientY - boundingRect.top - - if (maskBase64) { - const image = new Image() - - image.onload = function () { - if (context) { - context.drawImage(image, 0, 0) - - const clickedColor = getPixelColor(x, y) as any - - let closestSegment: ImageSegment | null = null - - let minDistance = Infinity - - segments.forEach(segment => { - const segmentColor = segment.color.slice(0,3) // get the RGB part only - - const distance = Math.sqrt( - Math.pow(clickedColor[0] - segmentColor[0], 2) + - Math.pow(clickedColor[1] - segmentColor[1], 2) + - Math.pow(clickedColor[2] - segmentColor[2], 2) - ) - - if(distance < minDistance) { - minDistance = distance; - closestSegment = segment; - } - }) - - console.log("closestSegment:", closestSegment) - console.log(closestSegment) // Here is the closest matching segment - } - } - - image.src = maskBase64 - // image.src = "data:image/png;base64," + maskBase64; - } else { - console.log("No mask available, aborting..") - } - } - - - if (!assetUrl) { - return
      -
      Rendering first frame.. (might take around 30s)
      -
      - } - - return ( -
      - -
      - ) -} \ No newline at end of file diff --git a/spaces/jennysun/jwsun-multisubject-render-model/gligen/ldm/models/diffusion/plms.py b/spaces/jennysun/jwsun-multisubject-render-model/gligen/ldm/models/diffusion/plms.py deleted file mode 100644 index 2c779fc90f78fe98157c862e54d36fd5e3d32395..0000000000000000000000000000000000000000 --- a/spaces/jennysun/jwsun-multisubject-render-model/gligen/ldm/models/diffusion/plms.py +++ /dev/null @@ -1,162 +0,0 @@ -import torch -import numpy as np -from tqdm import tqdm -from functools import partial -from copy import deepcopy -from ldm.modules.diffusionmodules.util import make_ddim_sampling_parameters, make_ddim_timesteps, noise_like - - -class PLMSSampler(object): - def __init__(self, diffusion, model, schedule="linear", alpha_generator_func=None, set_alpha_scale=None): - super().__init__() - self.diffusion = diffusion - self.model = model - self.device = diffusion.betas.device - self.ddpm_num_timesteps = diffusion.num_timesteps - self.schedule = schedule - self.alpha_generator_func = alpha_generator_func - self.set_alpha_scale = set_alpha_scale - - def register_buffer(self, name, attr): - if type(attr) == torch.Tensor: - attr = attr.to(self.device) - setattr(self, name, attr) - - def make_schedule(self, ddim_num_steps, ddim_discretize="uniform", ddim_eta=0., verbose=False): - if ddim_eta != 0: - raise ValueError('ddim_eta must be 0 for PLMS') - self.ddim_timesteps = make_ddim_timesteps(ddim_discr_method=ddim_discretize, num_ddim_timesteps=ddim_num_steps, - num_ddpm_timesteps=self.ddpm_num_timesteps,verbose=verbose) - alphas_cumprod = self.diffusion.alphas_cumprod - assert alphas_cumprod.shape[0] == self.ddpm_num_timesteps, 'alphas have to be defined for each timestep' - to_torch = lambda x: x.clone().detach().to(torch.float32).to(self.device) - - self.register_buffer('betas', to_torch(self.diffusion.betas)) - self.register_buffer('alphas_cumprod', to_torch(alphas_cumprod)) - self.register_buffer('alphas_cumprod_prev', to_torch(self.diffusion.alphas_cumprod_prev)) - - # calculations for diffusion q(x_t | x_{t-1}) and others - self.register_buffer('sqrt_alphas_cumprod', to_torch(np.sqrt(alphas_cumprod.cpu()))) - self.register_buffer('sqrt_one_minus_alphas_cumprod', to_torch(np.sqrt(1. - alphas_cumprod.cpu()))) - self.register_buffer('log_one_minus_alphas_cumprod', to_torch(np.log(1. - alphas_cumprod.cpu()))) - self.register_buffer('sqrt_recip_alphas_cumprod', to_torch(np.sqrt(1. / alphas_cumprod.cpu()))) - self.register_buffer('sqrt_recipm1_alphas_cumprod', to_torch(np.sqrt(1. / alphas_cumprod.cpu() - 1))) - - # ddim sampling parameters - ddim_sigmas, ddim_alphas, ddim_alphas_prev = make_ddim_sampling_parameters(alphacums=alphas_cumprod.cpu(), - ddim_timesteps=self.ddim_timesteps, - eta=ddim_eta,verbose=verbose) - self.register_buffer('ddim_sigmas', ddim_sigmas) - self.register_buffer('ddim_alphas', ddim_alphas) - self.register_buffer('ddim_alphas_prev', ddim_alphas_prev) - self.register_buffer('ddim_sqrt_one_minus_alphas', np.sqrt(1. - ddim_alphas)) - sigmas_for_original_sampling_steps = ddim_eta * torch.sqrt( - (1 - self.alphas_cumprod_prev) / (1 - self.alphas_cumprod) * ( - 1 - self.alphas_cumprod / self.alphas_cumprod_prev)) - self.register_buffer('ddim_sigmas_for_original_num_steps', sigmas_for_original_sampling_steps) - - - @torch.no_grad() - def sample(self, S, shape, input, uc=None, guidance_scale=1, mask=None, x0=None): - self.make_schedule(ddim_num_steps=S) - return self.plms_sampling(shape, input, uc, guidance_scale, mask=mask, x0=x0) - - - @torch.no_grad() - def plms_sampling(self, shape, input, uc=None, guidance_scale=1, mask=None, x0=None): - - b = shape[0] - - img = input["x"] - if img == None: - img = torch.randn(shape, device=self.device) - input["x"] = img - - time_range = np.flip(self.ddim_timesteps) - total_steps = self.ddim_timesteps.shape[0] - - old_eps = [] - - if self.alpha_generator_func != None: - alphas = self.alpha_generator_func(len(time_range)) - - for i, step in enumerate(time_range): - - # set alpha - if self.alpha_generator_func != None: - self.set_alpha_scale(self.model, alphas[i]) - - # run - index = total_steps - i - 1 - ts = torch.full((b,), step, device=self.device, dtype=torch.long) - ts_next = torch.full((b,), time_range[min(i + 1, len(time_range) - 1)], device=self.device, dtype=torch.long) - - if mask is not None: - assert x0 is not None - img_orig = self.diffusion.q_sample(x0, ts) - img = img_orig * mask + (1. - mask) * img - input["x"] = img - - img, pred_x0, e_t = self.p_sample_plms(input, ts, index=index, uc=uc, guidance_scale=guidance_scale, old_eps=old_eps, t_next=ts_next) - input["x"] = img - old_eps.append(e_t) - if len(old_eps) >= 4: - old_eps.pop(0) - - return img - - - @torch.no_grad() - def p_sample_plms(self, input, t, index, guidance_scale=1., uc=None, old_eps=None, t_next=None): - x = deepcopy(input["x"]) - b = x.shape[0] - - def get_model_output(input): - e_t = self.model(input) - if uc is not None and guidance_scale != 1: - unconditional_input = dict(x=input["x"], timesteps=input["timesteps"], context=uc) - if "inpainting_extra_input" in input: - unconditional_input["inpainting_extra_input"] = input["inpainting_extra_input"] - e_t_uncond = self.model( unconditional_input ) - e_t = e_t_uncond + guidance_scale * (e_t - e_t_uncond) - return e_t - - - def get_x_prev_and_pred_x0(e_t, index): - # select parameters corresponding to the currently considered timestep - a_t = torch.full((b, 1, 1, 1), self.ddim_alphas[index], device=self.device) - a_prev = torch.full((b, 1, 1, 1), self.ddim_alphas_prev[index], device=self.device) - sigma_t = torch.full((b, 1, 1, 1), self.ddim_sigmas[index], device=self.device) - sqrt_one_minus_at = torch.full((b, 1, 1, 1), self.ddim_sqrt_one_minus_alphas[index],device=self.device) - - # current prediction for x_0 - pred_x0 = (x - sqrt_one_minus_at * e_t) / a_t.sqrt() - - # direction pointing to x_t - dir_xt = (1. - a_prev - sigma_t**2).sqrt() * e_t - noise = sigma_t * torch.randn_like(x) - x_prev = a_prev.sqrt() * pred_x0 + dir_xt + noise - return x_prev, pred_x0 - - input["timesteps"] = t - e_t = get_model_output(input) - if len(old_eps) == 0: - # Pseudo Improved Euler (2nd order) - x_prev, pred_x0 = get_x_prev_and_pred_x0(e_t, index) - input["x"] = x_prev - input["timesteps"] = t_next - e_t_next = get_model_output(input) - e_t_prime = (e_t + e_t_next) / 2 - elif len(old_eps) == 1: - # 2nd order Pseudo Linear Multistep (Adams-Bashforth) - e_t_prime = (3 * e_t - old_eps[-1]) / 2 - elif len(old_eps) == 2: - # 3nd order Pseudo Linear Multistep (Adams-Bashforth) - e_t_prime = (23 * e_t - 16 * old_eps[-1] + 5 * old_eps[-2]) / 12 - elif len(old_eps) >= 3: - # 4nd order Pseudo Linear Multistep (Adams-Bashforth) - e_t_prime = (55 * e_t - 59 * old_eps[-1] + 37 * old_eps[-2] - 9 * old_eps[-3]) / 24 - - x_prev, pred_x0 = get_x_prev_and_pred_x0(e_t_prime, index) - - return x_prev, pred_x0, e_t diff --git a/spaces/joaopereirajp/livvieChatBot/venv/lib/python3.9/site-packages/PIL/CurImagePlugin.py b/spaces/joaopereirajp/livvieChatBot/venv/lib/python3.9/site-packages/PIL/CurImagePlugin.py deleted file mode 100644 index 94efff3415679a5bf5b7038f9a1da15ebc6d04ca..0000000000000000000000000000000000000000 --- a/spaces/joaopereirajp/livvieChatBot/venv/lib/python3.9/site-packages/PIL/CurImagePlugin.py +++ /dev/null @@ -1,75 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# Windows Cursor support for PIL -# -# notes: -# uses BmpImagePlugin.py to read the bitmap data. -# -# history: -# 96-05-27 fl Created -# -# Copyright (c) Secret Labs AB 1997. -# Copyright (c) Fredrik Lundh 1996. -# -# See the README file for information on usage and redistribution. -# -from . import BmpImagePlugin, Image -from ._binary import i16le as i16 -from ._binary import i32le as i32 - -# -# -------------------------------------------------------------------- - - -def _accept(prefix): - return prefix[:4] == b"\0\0\2\0" - - -## -# Image plugin for Windows Cursor files. - - -class CurImageFile(BmpImagePlugin.BmpImageFile): - format = "CUR" - format_description = "Windows Cursor" - - def _open(self): - offset = self.fp.tell() - - # check magic - s = self.fp.read(6) - if not _accept(s): - msg = "not a CUR file" - raise SyntaxError(msg) - - # pick the largest cursor in the file - m = b"" - for i in range(i16(s, 4)): - s = self.fp.read(16) - if not m: - m = s - elif s[0] > m[0] and s[1] > m[1]: - m = s - if not m: - msg = "No cursors were found" - raise TypeError(msg) - - # load as bitmap - self._bitmap(i32(m, 12) + offset) - - # patch up the bitmap height - self._size = self.size[0], self.size[1] // 2 - d, e, o, a = self.tile[0] - self.tile[0] = d, (0, 0) + self.size, o, a - - return - - -# -# -------------------------------------------------------------------- - -Image.register_open(CurImageFile.format, CurImageFile, _accept) - -Image.register_extension(CurImageFile.format, ".cur") diff --git a/spaces/joaopereirajp/livvieChatBot/venv/lib/python3.9/site-packages/fontTools/misc/intTools.py b/spaces/joaopereirajp/livvieChatBot/venv/lib/python3.9/site-packages/fontTools/misc/intTools.py deleted file mode 100644 index 0ca29854aae85750bdd7d25efc25ffd59392dc8e..0000000000000000000000000000000000000000 --- a/spaces/joaopereirajp/livvieChatBot/venv/lib/python3.9/site-packages/fontTools/misc/intTools.py +++ /dev/null @@ -1,25 +0,0 @@ -__all__ = ["popCount", "bit_count", "bit_indices"] - - -try: - bit_count = int.bit_count -except AttributeError: - - def bit_count(v): - return bin(v).count("1") - - -"""Return number of 1 bits (population count) of the absolute value of an integer. - -See https://docs.python.org/3.10/library/stdtypes.html#int.bit_count -""" -popCount = bit_count # alias - - -def bit_indices(v): - """Return list of indices where bits are set, 0 being the index of the least significant bit. - - >>> bit_indices(0b101) - [0, 2] - """ - return [i for i, b in enumerate(bin(v)[::-1]) if b == "1"] diff --git a/spaces/johnslegers/bilingual_stable_diffusion/ui_functions.py b/spaces/johnslegers/bilingual_stable_diffusion/ui_functions.py deleted file mode 100644 index 37bfa105ab4451599cb79aaae9f29ea3641c5aae..0000000000000000000000000000000000000000 --- a/spaces/johnslegers/bilingual_stable_diffusion/ui_functions.py +++ /dev/null @@ -1,240 +0,0 @@ -import re -import gradio as gr -from PIL import Image, ImageFont, ImageDraw, ImageFilter, ImageOps -from io import BytesIO -import base64 -import re - -def change_img_choices(sample_size): - choices = [] - for i in range(int(sample_size)): - choices.append( - '图片{}(img{})'.format(i+1,i+1) - ) - update_choices = gr.update(choices=choices) - return update_choices - -def change_image_editor_mode(choice, cropped_image, masked_image, resize_mode, width, height): - if choice == "Mask": - update_image_result = update_image_mask(cropped_image, resize_mode, width, height) - return [gr.update(visible=False), update_image_result, gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=True)] - - update_image_result = update_image_mask(masked_image["image"] if masked_image is not None else None, resize_mode, width, height) - return [update_image_result, gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=True), gr.update(visible=False), gr.update(visible=False)] - -def update_image_mask(cropped_image, resize_mode, width, height): - resized_cropped_image = resize_image(resize_mode, cropped_image, width, height) if cropped_image else None - return gr.update(value=resized_cropped_image, visible=True) - -def toggle_options_gfpgan(selection): - if 0 in selection: - return gr.update(visible=True) - else: - return gr.update(visible=False) - -def toggle_options_upscalers(selection): - if 1 in selection: - return gr.update(visible=True) - else: - return gr.update(visible=False) - -def toggle_options_realesrgan(selection): - if selection == 0 or selection == 1 or selection == 3: - return gr.update(visible=True) - else: - return gr.update(visible=False) - -def toggle_options_gobig(selection): - if selection == 1: - #print(selection) - return gr.update(visible=True) - if selection == 3: - return gr.update(visible=True) - else: - return gr.update(visible=False) - -def toggle_options_ldsr(selection): - if selection == 2 or selection == 3: - return gr.update(visible=True) - else: - return gr.update(visible=False) - -def increment_down(value): - return value - 1 - -def increment_up(value): - return value + 1 - -def copy_img_to_lab(img): - try: - image_data = re.sub('^data:image/.+;base64,', '', img) - processed_image = Image.open(BytesIO(base64.b64decode(image_data))) - tab_update = gr.update(selected='imgproc_tab') - img_update = gr.update(value=processed_image) - return processed_image, tab_update, - except IndexError: - return [None, None] -def copy_img_params_to_lab(params): - try: - prompt = params[0][0].replace('\n', ' ').replace('\r', '') - seed = int(params[1][1]) - steps = int(params[7][1]) - cfg_scale = float(params[9][1]) - sampler = params[11][1] - return prompt,seed,steps,cfg_scale,sampler - except IndexError: - return [None, None] -def copy_img_to_input(img, idx): - try: - # print(img) - # print("=============") - # print("The img type is:{}".format(type(img[0]))) - idx_map = { - "图片1(img1)":0, - "图片2(img2)":1, - "图片3(img3)":2, - "图片4(img4)":3, - } - idx = idx_map[idx] - image_data = re.sub('^data:image/.+;base64,', '', img[idx]) - processed_image = Image.open(BytesIO(base64.b64decode(image_data))) - tab_update = gr.update(selected='img2img_tab') - img_update = gr.update(value=processed_image) - move_prompt_zh_update = gr.update(visible=True) - move_prompt_en_update = gr.update(visible=True) - prompt_update = gr.update(visible=True) - return tab_update,processed_image, processed_image, move_prompt_zh_update, move_prompt_en_update, prompt_update - except IndexError: - return [None, None] - -def copy_img_to_edit(img): - try: - image_data = re.sub('^data:image/.+;base64,', '', img) - processed_image = Image.open(BytesIO(base64.b64decode(image_data))) - tab_update = gr.update(selected='img2img_tab') - img_update = gr.update(value=processed_image) - mode_update = gr.update(value='Crop') - return processed_image, tab_update, mode_update - except IndexError: - return [None, None] - -def copy_img_to_mask(img): - try: - image_data = re.sub('^data:image/.+;base64,', '', img) - processed_image = Image.open(BytesIO(base64.b64decode(image_data))) - tab_update = gr.update(selected='img2img_tab') - img_update = gr.update(value=processed_image) - mode_update = gr.update(value='Mask') - return processed_image, tab_update, mode_update - except IndexError: - return [None, None] - - - -def copy_img_to_upscale_esrgan(img): - tabs_update = gr.update(selected='realesrgan_tab') - image_data = re.sub('^data:image/.+;base64,', '', img) - processed_image = Image.open(BytesIO(base64.b64decode(image_data))) - return processed_image, tabs_update - - -help_text = """ - ## Mask/Crop - * Masking is not inpainting. You will probably get better results manually masking your images in photoshop instead. - * Built-in masking/cropping is very temperamental. - * It may take some time for the image to show when switching from Crop to Mask. - * If the image doesn't appear after switching to Mask, switch back to Crop and then back again to Mask - * If the mask appears distorted (the brush is weirdly shaped instead of round), switch back to Crop and then back again to Mask. - - ## Advanced Editor - * Click 💾 Save to send your editor changes to the img2img workflow - * Click ❌ Clear to discard your editor changes - - If anything breaks, try switching modes again, switch tabs, clear the image, or reload. -""" - -def resize_image(resize_mode, im, width, height): - LANCZOS = (Image.Resampling.LANCZOS if hasattr(Image, 'Resampling') else Image.LANCZOS) - if resize_mode == 0: - res = im.resize((width, height), resample=LANCZOS) - elif resize_mode == 1: - ratio = width / height - src_ratio = im.width / im.height - - src_w = width if ratio > src_ratio else im.width * height // im.height - src_h = height if ratio <= src_ratio else im.height * width // im.width - - resized = im.resize((src_w, src_h), resample=LANCZOS) - res = Image.new("RGBA", (width, height)) - res.paste(resized, box=(width // 2 - src_w // 2, height // 2 - src_h // 2)) - else: - ratio = width / height - src_ratio = im.width / im.height - - src_w = width if ratio < src_ratio else im.width * height // im.height - src_h = height if ratio >= src_ratio else im.height * width // im.width - - resized = im.resize((src_w, src_h), resample=LANCZOS) - res = Image.new("RGBA", (width, height)) - res.paste(resized, box=(width // 2 - src_w // 2, height // 2 - src_h // 2)) - - if ratio < src_ratio: - fill_height = height // 2 - src_h // 2 - res.paste(resized.resize((width, fill_height), box=(0, 0, width, 0)), box=(0, 0)) - res.paste(resized.resize((width, fill_height), box=(0, resized.height, width, resized.height)), box=(0, fill_height + src_h)) - elif ratio > src_ratio: - fill_width = width // 2 - src_w // 2 - res.paste(resized.resize((fill_width, height), box=(0, 0, 0, height)), box=(0, 0)) - res.paste(resized.resize((fill_width, height), box=(resized.width, 0, resized.width, height)), box=(fill_width + src_w, 0)) - - return res - -def update_dimensions_info(width, height): - pixel_count_formated = "{:,.0f}".format(width * height) - return f"Aspect ratio: {round(width / height, 5)}\nTotal pixel count: {pixel_count_formated}" - -def get_png_nfo( image: Image ): - info_text = "" - visible = bool(image and any(image.info)) - if visible: - for key,value in image.info.items(): - info_text += f"{key}: {value}\n" - info_text = info_text.rstrip('\n') - return gr.Textbox.update(value=info_text, visible=visible) - -def load_settings(*values): - new_settings, key_names, checkboxgroup_info = values[-3:] - values = list(values[:-3]) - - if new_settings: - if type(new_settings) is str: - if os.path.exists(new_settings): - with open(new_settings, "r", encoding="utf8") as f: - new_settings = yaml.safe_load(f) - elif new_settings.startswith("file://") and os.path.exists(new_settings[7:]): - with open(new_settings[7:], "r", encoding="utf8") as f: - new_settings = yaml.safe_load(f) - else: - new_settings = yaml.safe_load(new_settings) - if type(new_settings) is not dict: - new_settings = {"prompt": new_settings} - if "txt2img" in new_settings: - new_settings = new_settings["txt2img"] - target = new_settings.pop("target", "txt2img") - if target != "txt2img": - print(f"Warning: applying settings to txt2img even though {target} is specified as target.", file=sys.stderr) - - skipped_settings = {} - for key in new_settings.keys(): - if key in key_names: - values[key_names.index(key)] = new_settings[key] - else: - skipped_settings[key] = new_settings[key] - if skipped_settings: - print(f"Settings could not be applied: {skipped_settings}", file=sys.stderr) - - # Convert lists of checkbox indices to lists of checkbox labels: - for (cbg_index, cbg_choices) in checkboxgroup_info: - values[cbg_index] = [cbg_choices[i] for i in values[cbg_index]] - - return values diff --git a/spaces/johnyang/ChatPaper111/embedding_model.py b/spaces/johnyang/ChatPaper111/embedding_model.py deleted file mode 100644 index 659e46ed22ae40843f8e60b9f39d9fab8a537bf6..0000000000000000000000000000000000000000 --- a/spaces/johnyang/ChatPaper111/embedding_model.py +++ /dev/null @@ -1,47 +0,0 @@ - -from base_class import Embedding_Model -import pickle -from sentence_transformers import SentenceTransformer - -from openai.embeddings_utils import ( - get_embedding, -) - - -class HuggingfaceSentenceTransformerModel(Embedding_Model): - EMBEDDING_MODEL = "distiluse-base-multilingual-cased-v2" - - def __init__(self, model_name=EMBEDDING_MODEL) -> None: - super().__init__(model_name) - - self.model = SentenceTransformer(model_name, cache_folder="/app/ckpt/") - - def __call__(self, text) -> None: - return self.model.encode(text) - - -class OpenAIEmbeddingModel(Embedding_Model): - # constants - EMBEDDING_MODEL = "text-embedding-ada-002" - # establish a cache of embeddings to avoid recomputing - # cache is a dict of tuples (text, model) -> embedding, saved as a pickle file - - def __init__(self, model_name=EMBEDDING_MODEL) -> None: - super().__init__(model_name) - self.model_name = model_name - - # define a function to retrieve embeddings from the cache if present, and otherwise request via the API - def embedding_from_string(self, - string: str, - ) -> list: - """Return embedding of given string, using a cache to avoid recomputing.""" - model = self.model_name - if (string, model) not in self.embedding_cache.keys(): - self.embedding_cache[(string, model)] = get_embedding( - string, model) - with open(self.embedding_cache_path, "wb") as embedding_cache_file: - pickle.dump(self.embedding_cache, embedding_cache_file) - return self.embedding_cache[(string, model)] - - def __call__(self, text) -> None: - return self.embedding_from_string(text) diff --git a/spaces/josedolot/HybridNet_Demo2/encoders/resnet.py b/spaces/josedolot/HybridNet_Demo2/encoders/resnet.py deleted file mode 100644 index 5528bd5e7023fd693c8b2fec71af7385e4368ea9..0000000000000000000000000000000000000000 --- a/spaces/josedolot/HybridNet_Demo2/encoders/resnet.py +++ /dev/null @@ -1,238 +0,0 @@ -""" Each encoder should have following attributes and methods and be inherited from `_base.EncoderMixin` - -Attributes: - - _out_channels (list of int): specify number of channels for each encoder feature tensor - _depth (int): specify number of stages in decoder (in other words number of downsampling operations) - _in_channels (int): default number of input channels in first Conv2d layer for encoder (usually 3) - -Methods: - - forward(self, x: torch.Tensor) - produce list of features of different spatial resolutions, each feature is a 4D torch.tensor of - shape NCHW (features should be sorted in descending order according to spatial resolution, starting - with resolution same as input `x` tensor). - - Input: `x` with shape (1, 3, 64, 64) - Output: [f0, f1, f2, f3, f4, f5] - features with corresponding shapes - [(1, 3, 64, 64), (1, 64, 32, 32), (1, 128, 16, 16), (1, 256, 8, 8), - (1, 512, 4, 4), (1, 1024, 2, 2)] (C - dim may differ) - - also should support number of features according to specified depth, e.g. if depth = 5, - number of feature tensors = 6 (one with same resolution as input and 5 downsampled), - depth = 3 -> number of feature tensors = 4 (one with same resolution as input and 3 downsampled). -""" -from copy import deepcopy - -import torch.nn as nn - -from torchvision.models.resnet import ResNet -from torchvision.models.resnet import BasicBlock -from torchvision.models.resnet import Bottleneck -from pretrainedmodels.models.torchvision_models import pretrained_settings - -from ._base import EncoderMixin - - -class ResNetEncoder(ResNet, EncoderMixin): - def __init__(self, out_channels, depth=5, **kwargs): - super().__init__(**kwargs) - self._depth = depth - self._out_channels = out_channels - self._in_channels = 3 - - del self.fc - del self.avgpool - - def get_stages(self): - return [ - nn.Identity(), - nn.Sequential(self.conv1, self.bn1, self.relu), - nn.Sequential(self.maxpool, self.layer1), - self.layer2, - self.layer3, - self.layer4, - ] - - def forward(self, x): - stages = self.get_stages() - - features = [] - for i in range(self._depth + 1): - x = stages[i](x) - features.append(x) - - return features - - def load_state_dict(self, state_dict, **kwargs): - state_dict.pop("fc.bias", None) - state_dict.pop("fc.weight", None) - super().load_state_dict(state_dict, **kwargs) - - -new_settings = { - "resnet18": { - "ssl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_supervised_resnet18-d92f0530.pth", - "swsl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_weakly_supervised_resnet18-118f1556.pth" - }, - "resnet50": { - "ssl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_supervised_resnet50-08389792.pth", - "swsl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_weakly_supervised_resnet50-16a12f1b.pth" - }, - "resnext50_32x4d": { - "imagenet": "https://download.pytorch.org/models/resnext50_32x4d-7cdf4587.pth", - "ssl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_supervised_resnext50_32x4-ddb3e555.pth", - "swsl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_weakly_supervised_resnext50_32x4-72679e44.pth", - }, - "resnext101_32x4d": { - "ssl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_supervised_resnext101_32x4-dc43570a.pth", - "swsl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_weakly_supervised_resnext101_32x4-3f87e46b.pth" - }, - "resnext101_32x8d": { - "imagenet": "https://download.pytorch.org/models/resnext101_32x8d-8ba56ff5.pth", - "instagram": "https://download.pytorch.org/models/ig_resnext101_32x8-c38310e5.pth", - "ssl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_supervised_resnext101_32x8-2cfe2f8b.pth", - "swsl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_weakly_supervised_resnext101_32x8-b4712904.pth", - }, - "resnext101_32x16d": { - "instagram": "https://download.pytorch.org/models/ig_resnext101_32x16-c6f796b0.pth", - "ssl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_supervised_resnext101_32x16-15fffa57.pth", - "swsl": "https://dl.fbaipublicfiles.com/semiweaksupervision/model_files/semi_weakly_supervised_resnext101_32x16-f3559a9c.pth", - }, - "resnext101_32x32d": { - "instagram": "https://download.pytorch.org/models/ig_resnext101_32x32-e4b90b00.pth", - }, - "resnext101_32x48d": { - "instagram": "https://download.pytorch.org/models/ig_resnext101_32x48-3e41cc8a.pth", - } -} - -pretrained_settings = deepcopy(pretrained_settings) -for model_name, sources in new_settings.items(): - if model_name not in pretrained_settings: - pretrained_settings[model_name] = {} - - for source_name, source_url in sources.items(): - pretrained_settings[model_name][source_name] = { - "url": source_url, - 'input_size': [3, 224, 224], - 'input_range': [0, 1], - 'mean': [0.485, 0.456, 0.406], - 'std': [0.229, 0.224, 0.225], - 'num_classes': 1000 - } - - -resnet_encoders = { - "resnet18": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnet18"], - "params": { - "out_channels": (3, 64, 64, 128, 256, 512), - "block": BasicBlock, - "layers": [2, 2, 2, 2], - }, - }, - "resnet34": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnet34"], - "params": { - "out_channels": (3, 64, 64, 128, 256, 512), - "block": BasicBlock, - "layers": [3, 4, 6, 3], - }, - }, - "resnet50": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnet50"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 4, 6, 3], - }, - }, - "resnet101": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnet101"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 4, 23, 3], - }, - }, - "resnet152": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnet152"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 8, 36, 3], - }, - }, - "resnext50_32x4d": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnext50_32x4d"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 4, 6, 3], - "groups": 32, - "width_per_group": 4, - }, - }, - "resnext101_32x4d": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnext101_32x4d"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 4, 23, 3], - "groups": 32, - "width_per_group": 4, - }, - }, - "resnext101_32x8d": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnext101_32x8d"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 4, 23, 3], - "groups": 32, - "width_per_group": 8, - }, - }, - "resnext101_32x16d": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnext101_32x16d"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 4, 23, 3], - "groups": 32, - "width_per_group": 16, - }, - }, - "resnext101_32x32d": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnext101_32x32d"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 4, 23, 3], - "groups": 32, - "width_per_group": 32, - }, - }, - "resnext101_32x48d": { - "encoder": ResNetEncoder, - "pretrained_settings": pretrained_settings["resnext101_32x48d"], - "params": { - "out_channels": (3, 64, 256, 512, 1024, 2048), - "block": Bottleneck, - "layers": [3, 4, 23, 3], - "groups": 32, - "width_per_group": 48, - }, - }, -} diff --git a/spaces/juancopi81/youtube-music-transcribe/t5x/state_utils.py b/spaces/juancopi81/youtube-music-transcribe/t5x/state_utils.py deleted file mode 100644 index 33c6f73bdfa647f4de3af93d6d12a25d61d4907e..0000000000000000000000000000000000000000 --- a/spaces/juancopi81/youtube-music-transcribe/t5x/state_utils.py +++ /dev/null @@ -1,215 +0,0 @@ -# Copyright 2022 The T5X Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Utilities for processing optimizer states.""" - -import re -from typing import Any, Mapping, Optional, Sequence, Tuple - -from absl import logging -from flax import traverse_util - - -def tensorstore_leaf(_, value): - """Detect if the node is a serialized tensorstore spec. - - Args: - _: The unused name of the current item. - value: The value of the possible leaf. - - Returns: - True if the value represents a tensorstore spec, False otherwise. - """ - # It is a tensorstore leaf if it at least has `driver`, `kvstore` and - # `metadata` in its keys, sometime they have additional ones like `dtype` or - # `transform`. - return set(value.keys()) >= {"driver", "kvstore", "metadata"} - - -def flatten_state_dict(state_dict, keep_empty_nodes: bool = False): - """Flatten a dictionary until an array or tensorstore is reached. - - Args: - state_dict: Optimizer state as nested dictionary. - keep_empty_nodes: Whether to keep empty node, for example, empty param - states from simple optimizers or non-touched parameter states in a - multioptimizer. - - Returns: - Flattened dictionary, though keeping tensor store state unflattened. - """ - return traverse_util.flatten_dict( - state_dict, - is_leaf=tensorstore_leaf, - keep_empty_nodes=keep_empty_nodes, - sep="/") - - -def get_name_tree(state_dict, keep_empty_nodes: bool = False): - """Returns new state_dict with leaves as joined path keys separated by "/".""" - return traverse_util.unflatten_dict({ - k: "/".join(k) for k in traverse_util.flatten_dict( - state_dict, keep_empty_nodes=keep_empty_nodes) - }) - - -def intersect_state( - state_dict: Mapping[str, Any], - intersect_state_dict: Mapping[str, Any]) -> Mapping[str, Any]: - """Drops non-matching entries from `state_dict`. - - Args: - state_dict: nested dict of optimizer state - intersect_state_dict: nested dict of entries to keep - - Returns: - nested dict like `state_dict` but with extra keys removed - """ - state_dict_flat = flatten_state_dict(state_dict) - intersect_state_dict_flat = flatten_state_dict(intersect_state_dict) - - for k in list(state_dict_flat): - if k not in intersect_state_dict_flat: - state_dict_flat.pop(k) - logging.warning("Ignoring param=%s from checkpoint", k) - - state_dict = traverse_util.unflatten_dict(state_dict_flat, sep="/") - - return state_dict - - -def merge_state(state_dict: Mapping[str, Any], - from_scratch_state: Mapping[str, Any]) -> Mapping[str, Any]: - """Inserts new entries into `state_dict`. - - Args: - state_dict: nested dict of optimizer state - from_scratch_state: nested dict of entries to insert - - Returns: - a nested dict like `state_dict` but with extra entries from - `from_scratch_state` inserted - """ - state_dict_flat = flatten_state_dict(state_dict) - from_scratch_state_flat = flatten_state_dict(from_scratch_state) - - for k in from_scratch_state_flat: - if k not in state_dict_flat: - logging.warning("Initializing param=%s from scratch", k) - state_dict_flat[k] = from_scratch_state_flat[k] - - state_dict = traverse_util.unflatten_dict(state_dict_flat, sep="/") - - return state_dict - - -def apply_assignment_map(ckpt_optimizer_state, - optimizer_state, - assignment_map: Sequence[Tuple[str, Optional[str]]], - require_all_rules_match: bool = True, - *, - is_resuming: bool = False): - """Applies an assignment map to a checkpoint optimizer state. - - In contrast to previous implementations, this has a switch whether to require - that all rules match, and has somewhat-custom-but-sensible replacement rules: - - 1. old keys that are matched are removed. - 2. old keys that don't match are retained. - 3. if two new keys map to the same old key, they both get assigned to its - value. - 4. if a new key isn't mapped but is in the checkpoint, it is copied over. - 5. new keys with None-valued replacement patterns are removed. - - Args: - ckpt_optimizer_state: Optimizer state in the checkpoint (usually, previous - model). - optimizer_state: optimizer state in the current model. - assignment_map: List of tuples (matcher, replacement) where matcher is a - regex, and replacement is a string replacement (possibly with - regex-compatible group match codes) or None if the matching state should - be dropped. - require_all_rules_match: Whether to require that all rules match. - is_resuming: Whether we are resuming a training run (True) or initializing a - new one (False). - - Returns: - New, remapped optimizer state. - """ - if is_resuming: - # Do not apply the transformation when resuming after a temporary stop. - # This ensures that the transformation will only happen once. - return ckpt_optimizer_state - - flat_ckpt = flatten_state_dict(ckpt_optimizer_state) - unmapped_old_keys = flat_ckpt.copy() - result = {} - explicitly_skipped_keys = set() - flat_opt = flatten_state_dict(optimizer_state) - - used_patterns = set() - for k in flat_opt: - for pattern, repl in assignment_map: - p_match = re.fullmatch(pattern, k) - if p_match: - # Skip initialization if the replacement pattern for this key is None. - if repl is None: - explicitly_skipped_keys.add(k) - used_patterns.add(pattern) - logging.info( - "Skipping optimizer param=%s, which had a None " - "replacement using pattern=%s in the assignment map.", k, pattern) - break - - old_k = p_match.expand(repl) - used_patterns.add(pattern) - - # Remove the old key, but read the value from the original dict since - # it's OK if it was referenced twice. - unmapped_old_keys.pop(old_k, None) - try: - result[k] = flat_ckpt[old_k] - logging.info( - "Assigning checkpoint param=%s to optimizer param=%s " - "using pattern=%s", old_k, k, pattern) - except KeyError: - raise ValueError( - f"Parameter '{old_k}' does not exist in restore checkpoint. " - f"Must be one of: {sorted(flat_ckpt.keys())}") - break - - # Now re-add the unmapped keys. This is a 2-step process so that the `pop()` - # call above doesn't mis-fire if the assignment map "rotates" a chain of keys. - for key, v in unmapped_old_keys.items(): - if key not in explicitly_skipped_keys: - result[key] = v - - # If any new keys weren't mapped, but are in the old checkpoint, copy those. - for key in set(flat_opt) - set(result): - if key in explicitly_skipped_keys: - pass - elif key in flat_ckpt: - result[key] = flat_ckpt[key] - else: - logging.warning( - "Skipping key=%s which did not match assignment map or checkpoint.", - key) - - if require_all_rules_match and len(assignment_map) != len(used_patterns): - unused_patterns = set(p for p, _ in assignment_map) - used_patterns - unused_patterns_str = ", ".join(f"'{p}'" for p in unused_patterns) - raise ValueError("Unused patterns in `assignment_map`: {" + - unused_patterns_str + "}") - - return traverse_util.unflatten_dict(result, sep="/") diff --git a/spaces/jyseo/3DFuse/ldm/modules/encoders/modules.py b/spaces/jyseo/3DFuse/ldm/modules/encoders/modules.py deleted file mode 100644 index 4edd5496b9e668ea72a5be39db9cca94b6a42f9b..0000000000000000000000000000000000000000 --- a/spaces/jyseo/3DFuse/ldm/modules/encoders/modules.py +++ /dev/null @@ -1,213 +0,0 @@ -import torch -import torch.nn as nn -from torch.utils.checkpoint import checkpoint - -from transformers import T5Tokenizer, T5EncoderModel, CLIPTokenizer, CLIPTextModel - -import open_clip -from ldm.util import default, count_params - - -class AbstractEncoder(nn.Module): - def __init__(self): - super().__init__() - - def encode(self, *args, **kwargs): - raise NotImplementedError - - -class IdentityEncoder(AbstractEncoder): - - def encode(self, x): - return x - - -class ClassEmbedder(nn.Module): - def __init__(self, embed_dim, n_classes=1000, key='class', ucg_rate=0.1): - super().__init__() - self.key = key - self.embedding = nn.Embedding(n_classes, embed_dim) - self.n_classes = n_classes - self.ucg_rate = ucg_rate - - def forward(self, batch, key=None, disable_dropout=False): - if key is None: - key = self.key - # this is for use in crossattn - c = batch[key][:, None] - if self.ucg_rate > 0. and not disable_dropout: - mask = 1. - torch.bernoulli(torch.ones_like(c) * self.ucg_rate) - c = mask * c + (1-mask) * torch.ones_like(c)*(self.n_classes-1) - c = c.long() - c = self.embedding(c) - return c - - def get_unconditional_conditioning(self, bs, device="cuda"): - uc_class = self.n_classes - 1 # 1000 classes --> 0 ... 999, one extra class for ucg (class 1000) - uc = torch.ones((bs,), device=device) * uc_class - uc = {self.key: uc} - return uc - - -def disabled_train(self, mode=True): - """Overwrite model.train with this function to make sure train/eval mode - does not change anymore.""" - return self - - -class FrozenT5Embedder(AbstractEncoder): - """Uses the T5 transformer encoder for text""" - def __init__(self, version="google/t5-v1_1-large", device="cuda", max_length=77, freeze=True): # others are google/t5-v1_1-xl and google/t5-v1_1-xxl - super().__init__() - self.tokenizer = T5Tokenizer.from_pretrained(version) - self.transformer = T5EncoderModel.from_pretrained(version) - self.device = device - self.max_length = max_length # TODO: typical value? - if freeze: - self.freeze() - - def freeze(self): - self.transformer = self.transformer.eval() - #self.train = disabled_train - for param in self.parameters(): - param.requires_grad = False - - def forward(self, text): - batch_encoding = self.tokenizer(text, truncation=True, max_length=self.max_length, return_length=True, - return_overflowing_tokens=False, padding="max_length", return_tensors="pt") - tokens = batch_encoding["input_ids"].to(self.device) - outputs = self.transformer(input_ids=tokens) - - z = outputs.last_hidden_state - return z - - def encode(self, text): - return self(text) - - -class FrozenCLIPEmbedder(AbstractEncoder): - """Uses the CLIP transformer encoder for text (from huggingface)""" - LAYERS = [ - "last", - "pooled", - "hidden" - ] - def __init__(self, version="openai/clip-vit-large-patch14", device="cuda", max_length=77, - freeze=True, layer="last", layer_idx=None): # clip-vit-base-patch32 - super().__init__() - assert layer in self.LAYERS - self.tokenizer = CLIPTokenizer.from_pretrained(version) - self.transformer = CLIPTextModel.from_pretrained(version) - self.device = device - self.max_length = max_length - if freeze: - self.freeze() - self.layer = layer - self.layer_idx = layer_idx - if layer == "hidden": - assert layer_idx is not None - assert 0 <= abs(layer_idx) <= 12 - - def freeze(self): - self.transformer = self.transformer.eval() - #self.train = disabled_train - for param in self.parameters(): - param.requires_grad = False - - def forward(self, text): - batch_encoding = self.tokenizer(text, truncation=True, max_length=self.max_length, return_length=True, - return_overflowing_tokens=False, padding="max_length", return_tensors="pt") - tokens = batch_encoding["input_ids"].to(self.device) - outputs = self.transformer(input_ids=tokens, output_hidden_states=self.layer=="hidden") - if self.layer == "last": - z = outputs.last_hidden_state - elif self.layer == "pooled": - z = outputs.pooler_output[:, None, :] - else: - z = outputs.hidden_states[self.layer_idx] - return z - - def encode(self, text): - return self(text) - - -class FrozenOpenCLIPEmbedder(AbstractEncoder): - """ - Uses the OpenCLIP transformer encoder for text - """ - LAYERS = [ - #"pooled", - "last", - "penultimate" - ] - def __init__(self, arch="ViT-H-14", version="laion2b_s32b_b79k", device="cuda", max_length=77, - freeze=True, layer="last"): - super().__init__() - assert layer in self.LAYERS - model, _, _ = open_clip.create_model_and_transforms(arch, device=torch.device('cpu'), pretrained=version) - del model.visual - self.model = model - - self.device = device - self.max_length = max_length - if freeze: - self.freeze() - self.layer = layer - if self.layer == "last": - self.layer_idx = 0 - elif self.layer == "penultimate": - self.layer_idx = 1 - else: - raise NotImplementedError() - - def freeze(self): - self.model = self.model.eval() - for param in self.parameters(): - param.requires_grad = False - - def forward(self, text): - tokens = open_clip.tokenize(text) - z = self.encode_with_transformer(tokens.to(self.device)) - return z - - def encode_with_transformer(self, text): - x = self.model.token_embedding(text) # [batch_size, n_ctx, d_model] - x = x + self.model.positional_embedding - x = x.permute(1, 0, 2) # NLD -> LND - x = self.text_transformer_forward(x, attn_mask=self.model.attn_mask) - x = x.permute(1, 0, 2) # LND -> NLD - x = self.model.ln_final(x) - return x - - def text_transformer_forward(self, x: torch.Tensor, attn_mask = None): - for i, r in enumerate(self.model.transformer.resblocks): - if i == len(self.model.transformer.resblocks) - self.layer_idx: - break - if self.model.transformer.grad_checkpointing and not torch.jit.is_scripting(): - x = checkpoint(r, x, attn_mask) - else: - x = r(x, attn_mask=attn_mask) - return x - - def encode(self, text): - return self(text) - - -class FrozenCLIPT5Encoder(AbstractEncoder): - def __init__(self, clip_version="openai/clip-vit-large-patch14", t5_version="google/t5-v1_1-xl", device="cuda", - clip_max_length=77, t5_max_length=77): - super().__init__() - self.clip_encoder = FrozenCLIPEmbedder(clip_version, device, max_length=clip_max_length) - self.t5_encoder = FrozenT5Embedder(t5_version, device, max_length=t5_max_length) - print(f"{self.clip_encoder.__class__.__name__} has {count_params(self.clip_encoder)*1.e-6:.2f} M parameters, " - f"{self.t5_encoder.__class__.__name__} comes with {count_params(self.t5_encoder)*1.e-6:.2f} M params.") - - def encode(self, text): - return self(text) - - def forward(self, text): - clip_z = self.clip_encoder.encode(text) - t5_z = self.t5_encoder.encode(text) - return [clip_z, t5_z] - - diff --git a/spaces/kcagle/AutoGPT/autogpt/setup.py b/spaces/kcagle/AutoGPT/autogpt/setup.py deleted file mode 100644 index bfa68201b62bf67230a61fb1ecb00d1ab0ef0631..0000000000000000000000000000000000000000 --- a/spaces/kcagle/AutoGPT/autogpt/setup.py +++ /dev/null @@ -1,77 +0,0 @@ -"""Set up the AI and its goals""" -from colorama import Fore, Style - -from autogpt import utils -from autogpt.config.ai_config import AIConfig -from autogpt.logs import logger - - -def prompt_user() -> AIConfig: - """Prompt the user for input - - Returns: - AIConfig: The AIConfig object containing the user's input - """ - ai_name = "" - # Construct the prompt - logger.typewriter_log( - "Welcome to Auto-GPT! ", - Fore.GREEN, - "run with '--help' for more information.", - speak_text=True, - ) - - logger.typewriter_log( - "Create an AI-Assistant:", - Fore.GREEN, - "Enter the name of your AI and its role below. Entering nothing will load" - " defaults.", - speak_text=True, - ) - - # Get AI Name from User - logger.typewriter_log( - "Name your AI: ", Fore.GREEN, "For example, 'Entrepreneur-GPT'" - ) - ai_name = utils.clean_input("AI Name: ") - if ai_name == "": - ai_name = "Entrepreneur-GPT" - - logger.typewriter_log( - f"{ai_name} here!", Fore.LIGHTBLUE_EX, "I am at your service.", speak_text=True - ) - - # Get AI Role from User - logger.typewriter_log( - "Describe your AI's role: ", - Fore.GREEN, - "For example, 'an AI designed to autonomously develop and run businesses with" - " the sole goal of increasing your net worth.'", - ) - ai_role = utils.clean_input(f"{ai_name} is: ") - if ai_role == "": - ai_role = "an AI designed to autonomously develop and run businesses with the" - " sole goal of increasing your net worth." - - # Enter up to 5 goals for the AI - logger.typewriter_log( - "Enter up to 5 goals for your AI: ", - Fore.GREEN, - "For example: \nIncrease net worth, Grow Twitter Account, Develop and manage" - " multiple businesses autonomously'", - ) - print("Enter nothing to load defaults, enter nothing when finished.", flush=True) - ai_goals = [] - for i in range(5): - ai_goal = utils.clean_input(f"{Fore.LIGHTBLUE_EX}Goal{Style.RESET_ALL} {i+1}: ") - if ai_goal == "": - break - ai_goals.append(ai_goal) - if not ai_goals: - ai_goals = [ - "Increase net worth", - "Grow Twitter Account", - "Develop and manage multiple businesses autonomously", - ] - - return AIConfig(ai_name, ai_role, ai_goals) diff --git a/spaces/kdrkdrkdr/HoshinoTTS/mel_processing.py b/spaces/kdrkdrkdr/HoshinoTTS/mel_processing.py deleted file mode 100644 index 3e252e76320522a8a4195a60665168f22769aec2..0000000000000000000000000000000000000000 --- a/spaces/kdrkdrkdr/HoshinoTTS/mel_processing.py +++ /dev/null @@ -1,101 +0,0 @@ -import torch -import torch.utils.data -from librosa.filters import mel as librosa_mel_fn - -MAX_WAV_VALUE = 32768.0 - - -def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): - """ - PARAMS - ------ - C: compression factor - """ - return torch.log(torch.clamp(x, min=clip_val) * C) - - -def dynamic_range_decompression_torch(x, C=1): - """ - PARAMS - ------ - C: compression factor used to compress - """ - return torch.exp(x) / C - - -def spectral_normalize_torch(magnitudes): - output = dynamic_range_compression_torch(magnitudes) - return output - - -def spectral_de_normalize_torch(magnitudes): - output = dynamic_range_decompression_torch(magnitudes) - return output - - -mel_basis = {} -hann_window = {} - - -def spectrogram_torch(y, n_fft, sampling_rate, hop_size, win_size, center=False): - if torch.min(y) < -1.: - print('min value is ', torch.min(y)) - if torch.max(y) > 1.: - print('max value is ', torch.max(y)) - - global hann_window - dtype_device = str(y.dtype) + '_' + str(y.device) - wnsize_dtype_device = str(win_size) + '_' + dtype_device - if wnsize_dtype_device not in hann_window: - hann_window[wnsize_dtype_device] = torch.hann_window(win_size).to(dtype=y.dtype, device=y.device) - - y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect') - y = y.squeeze(1) - - spec = torch.stft(y, n_fft, hop_length=hop_size, win_length=win_size, window=hann_window[wnsize_dtype_device], - center=center, pad_mode='reflect', normalized=False, onesided=True, return_complex=False) - - spec = torch.sqrt(spec.pow(2).sum(-1) + 1e-6) - return spec - - -def spec_to_mel_torch(spec, n_fft, num_mels, sampling_rate, fmin, fmax): - global mel_basis - dtype_device = str(spec.dtype) + '_' + str(spec.device) - fmax_dtype_device = str(fmax) + '_' + dtype_device - if fmax_dtype_device not in mel_basis: - mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax) - mel_basis[fmax_dtype_device] = torch.from_numpy(mel).to(dtype=spec.dtype, device=spec.device) - spec = torch.matmul(mel_basis[fmax_dtype_device], spec) - spec = spectral_normalize_torch(spec) - return spec - - -def mel_spectrogram_torch(y, n_fft, num_mels, sampling_rate, hop_size, win_size, fmin, fmax, center=False): - if torch.min(y) < -1.: - print('min value is ', torch.min(y)) - if torch.max(y) > 1.: - print('max value is ', torch.max(y)) - - global mel_basis, hann_window - dtype_device = str(y.dtype) + '_' + str(y.device) - fmax_dtype_device = str(fmax) + '_' + dtype_device - wnsize_dtype_device = str(win_size) + '_' + dtype_device - if fmax_dtype_device not in mel_basis: - mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax) - mel_basis[fmax_dtype_device] = torch.from_numpy(mel).to(dtype=y.dtype, device=y.device) - if wnsize_dtype_device not in hann_window: - hann_window[wnsize_dtype_device] = torch.hann_window(win_size).to(dtype=y.dtype, device=y.device) - - y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect') - y = y.squeeze(1) - - spec = torch.stft(y, n_fft, hop_length=hop_size, win_length=win_size, window=hann_window[wnsize_dtype_device], - center=center, pad_mode='reflect', normalized=False, onesided=True) - - spec = torch.sqrt(spec.pow(2).sum(-1) + 1e-6) - - spec = torch.matmul(mel_basis[fmax_dtype_device], spec) - spec = spectral_normalize_torch(spec) - - return spec diff --git a/spaces/keithhon/T0pp/app.py b/spaces/keithhon/T0pp/app.py deleted file mode 100644 index 79cf4a8ca8020487a034253c2736ae102249355e..0000000000000000000000000000000000000000 --- a/spaces/keithhon/T0pp/app.py +++ /dev/null @@ -1,8 +0,0 @@ -import gradio as gr -title = "T0pp" -description = "Gradio Demo for T0pp, T0* is a series of encoder-decoder models trained on a large set of different tasks specified in natural language prompts. Can use the models to perform inference on tasks by specifying your query in natural language, and the models will generate a prediction. Read more at the links below." -article = "

      Hugging face model page | Github Repo | Multitask Prompted Training Enables Zero-Shot Task Generalization

      " -examples = [ - ['Is this review positive or negative? Review: this is the best cast iron skillet you will ever buy'],["It's rainy today but it will stop in a few hours, when should I go for my run?"],["How many hydrogen atoms are in a water molecule?"] -] -gr.Interface.load("huggingface/bigscience/T0pp", inputs=gr.inputs.Textbox(lines=5, label="Input Text"),title=title,description=description,article=article, examples=examples,enable_queue=True).launch() \ No newline at end of file diff --git a/spaces/kevinwang676/ChatGLM2-SadTalker-VC/src/audio2pose_models/res_unet.py b/spaces/kevinwang676/ChatGLM2-SadTalker-VC/src/audio2pose_models/res_unet.py deleted file mode 100644 index f2611e1d1a9bf233507427b34928fca60e094224..0000000000000000000000000000000000000000 --- a/spaces/kevinwang676/ChatGLM2-SadTalker-VC/src/audio2pose_models/res_unet.py +++ /dev/null @@ -1,65 +0,0 @@ -import torch -import torch.nn as nn -from src.audio2pose_models.networks import ResidualConv, Upsample - - -class ResUnet(nn.Module): - def __init__(self, channel=1, filters=[32, 64, 128, 256]): - super(ResUnet, self).__init__() - - self.input_layer = nn.Sequential( - nn.Conv2d(channel, filters[0], kernel_size=3, padding=1), - nn.BatchNorm2d(filters[0]), - nn.ReLU(), - nn.Conv2d(filters[0], filters[0], kernel_size=3, padding=1), - ) - self.input_skip = nn.Sequential( - nn.Conv2d(channel, filters[0], kernel_size=3, padding=1) - ) - - self.residual_conv_1 = ResidualConv(filters[0], filters[1], stride=(2,1), padding=1) - self.residual_conv_2 = ResidualConv(filters[1], filters[2], stride=(2,1), padding=1) - - self.bridge = ResidualConv(filters[2], filters[3], stride=(2,1), padding=1) - - self.upsample_1 = Upsample(filters[3], filters[3], kernel=(2,1), stride=(2,1)) - self.up_residual_conv1 = ResidualConv(filters[3] + filters[2], filters[2], stride=1, padding=1) - - self.upsample_2 = Upsample(filters[2], filters[2], kernel=(2,1), stride=(2,1)) - self.up_residual_conv2 = ResidualConv(filters[2] + filters[1], filters[1], stride=1, padding=1) - - self.upsample_3 = Upsample(filters[1], filters[1], kernel=(2,1), stride=(2,1)) - self.up_residual_conv3 = ResidualConv(filters[1] + filters[0], filters[0], stride=1, padding=1) - - self.output_layer = nn.Sequential( - nn.Conv2d(filters[0], 1, 1, 1), - nn.Sigmoid(), - ) - - def forward(self, x): - # Encode - x1 = self.input_layer(x) + self.input_skip(x) - x2 = self.residual_conv_1(x1) - x3 = self.residual_conv_2(x2) - # Bridge - x4 = self.bridge(x3) - - # Decode - x4 = self.upsample_1(x4) - x5 = torch.cat([x4, x3], dim=1) - - x6 = self.up_residual_conv1(x5) - - x6 = self.upsample_2(x6) - x7 = torch.cat([x6, x2], dim=1) - - x8 = self.up_residual_conv2(x7) - - x8 = self.upsample_3(x8) - x9 = torch.cat([x8, x1], dim=1) - - x10 = self.up_residual_conv3(x9) - - output = self.output_layer(x10) - - return output \ No newline at end of file diff --git a/spaces/kevinwang676/ChatGLM2-VC-SadTalker/src/face3d/models/arcface_torch/configs/base.py b/spaces/kevinwang676/ChatGLM2-VC-SadTalker/src/face3d/models/arcface_torch/configs/base.py deleted file mode 100644 index 78e4b36a9142b649ec39a8c59331bb2557f2ad57..0000000000000000000000000000000000000000 --- a/spaces/kevinwang676/ChatGLM2-VC-SadTalker/src/face3d/models/arcface_torch/configs/base.py +++ /dev/null @@ -1,56 +0,0 @@ -from easydict import EasyDict as edict - -# make training faster -# our RAM is 256G -# mount -t tmpfs -o size=140G tmpfs /train_tmp - -config = edict() -config.loss = "arcface" -config.network = "r50" -config.resume = False -config.output = "ms1mv3_arcface_r50" - -config.dataset = "ms1m-retinaface-t1" -config.embedding_size = 512 -config.sample_rate = 1 -config.fp16 = False -config.momentum = 0.9 -config.weight_decay = 5e-4 -config.batch_size = 128 -config.lr = 0.1 # batch size is 512 - -if config.dataset == "emore": - config.rec = "/train_tmp/faces_emore" - config.num_classes = 85742 - config.num_image = 5822653 - config.num_epoch = 16 - config.warmup_epoch = -1 - config.decay_epoch = [8, 14, ] - config.val_targets = ["lfw", ] - -elif config.dataset == "ms1m-retinaface-t1": - config.rec = "/train_tmp/ms1m-retinaface-t1" - config.num_classes = 93431 - config.num_image = 5179510 - config.num_epoch = 25 - config.warmup_epoch = -1 - config.decay_epoch = [11, 17, 22] - config.val_targets = ["lfw", "cfp_fp", "agedb_30"] - -elif config.dataset == "glint360k": - config.rec = "/train_tmp/glint360k" - config.num_classes = 360232 - config.num_image = 17091657 - config.num_epoch = 20 - config.warmup_epoch = -1 - config.decay_epoch = [8, 12, 15, 18] - config.val_targets = ["lfw", "cfp_fp", "agedb_30"] - -elif config.dataset == "webface": - config.rec = "/train_tmp/faces_webface_112x112" - config.num_classes = 10572 - config.num_image = "forget" - config.num_epoch = 34 - config.warmup_epoch = -1 - config.decay_epoch = [20, 28, 32] - config.val_targets = ["lfw", "cfp_fp", "agedb_30"] diff --git a/spaces/kevinwang676/VoiceChanger/src/face3d/options/base_options.py b/spaces/kevinwang676/VoiceChanger/src/face3d/options/base_options.py deleted file mode 100644 index d8f921d5a43434ae802a55a0fa3889c4b7ab9f6d..0000000000000000000000000000000000000000 --- a/spaces/kevinwang676/VoiceChanger/src/face3d/options/base_options.py +++ /dev/null @@ -1,169 +0,0 @@ -"""This script contains base options for Deep3DFaceRecon_pytorch -""" - -import argparse -import os -from util import util -import numpy as np -import torch -import face3d.models as models -import face3d.data as data - - -class BaseOptions(): - """This class defines options used during both training and test time. - - It also implements several helper functions such as parsing, printing, and saving the options. - It also gathers additional options defined in functions in both dataset class and model class. - """ - - def __init__(self, cmd_line=None): - """Reset the class; indicates the class hasn't been initailized""" - self.initialized = False - self.cmd_line = None - if cmd_line is not None: - self.cmd_line = cmd_line.split() - - def initialize(self, parser): - """Define the common options that are used in both training and test.""" - # basic parameters - parser.add_argument('--name', type=str, default='face_recon', help='name of the experiment. It decides where to store samples and models') - parser.add_argument('--gpu_ids', type=str, default='0', help='gpu ids: e.g. 0 0,1,2, 0,2. use -1 for CPU') - parser.add_argument('--checkpoints_dir', type=str, default='./checkpoints', help='models are saved here') - parser.add_argument('--vis_batch_nums', type=float, default=1, help='batch nums of images for visulization') - parser.add_argument('--eval_batch_nums', type=float, default=float('inf'), help='batch nums of images for evaluation') - parser.add_argument('--use_ddp', type=util.str2bool, nargs='?', const=True, default=True, help='whether use distributed data parallel') - parser.add_argument('--ddp_port', type=str, default='12355', help='ddp port') - parser.add_argument('--display_per_batch', type=util.str2bool, nargs='?', const=True, default=True, help='whether use batch to show losses') - parser.add_argument('--add_image', type=util.str2bool, nargs='?', const=True, default=True, help='whether add image to tensorboard') - parser.add_argument('--world_size', type=int, default=1, help='batch nums of images for evaluation') - - # model parameters - parser.add_argument('--model', type=str, default='facerecon', help='chooses which model to use.') - - # additional parameters - parser.add_argument('--epoch', type=str, default='latest', help='which epoch to load? set to latest to use latest cached model') - parser.add_argument('--verbose', action='store_true', help='if specified, print more debugging information') - parser.add_argument('--suffix', default='', type=str, help='customized suffix: opt.name = opt.name + suffix: e.g., {model}_{netG}_size{load_size}') - - self.initialized = True - return parser - - def gather_options(self): - """Initialize our parser with basic options(only once). - Add additional model-specific and dataset-specific options. - These options are defined in the function - in model and dataset classes. - """ - if not self.initialized: # check if it has been initialized - parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) - parser = self.initialize(parser) - - # get the basic options - if self.cmd_line is None: - opt, _ = parser.parse_known_args() - else: - opt, _ = parser.parse_known_args(self.cmd_line) - - # set cuda visible devices - os.environ['CUDA_VISIBLE_DEVICES'] = opt.gpu_ids - - # modify model-related parser options - model_name = opt.model - model_option_setter = models.get_option_setter(model_name) - parser = model_option_setter(parser, self.isTrain) - if self.cmd_line is None: - opt, _ = parser.parse_known_args() # parse again with new defaults - else: - opt, _ = parser.parse_known_args(self.cmd_line) # parse again with new defaults - - # modify dataset-related parser options - if opt.dataset_mode: - dataset_name = opt.dataset_mode - dataset_option_setter = data.get_option_setter(dataset_name) - parser = dataset_option_setter(parser, self.isTrain) - - # save and return the parser - self.parser = parser - if self.cmd_line is None: - return parser.parse_args() - else: - return parser.parse_args(self.cmd_line) - - def print_options(self, opt): - """Print and save options - - It will print both current options and default values(if different). - It will save options into a text file / [checkpoints_dir] / opt.txt - """ - message = '' - message += '----------------- Options ---------------\n' - for k, v in sorted(vars(opt).items()): - comment = '' - default = self.parser.get_default(k) - if v != default: - comment = '\t[default: %s]' % str(default) - message += '{:>25}: {:<30}{}\n'.format(str(k), str(v), comment) - message += '----------------- End -------------------' - print(message) - - # save to the disk - expr_dir = os.path.join(opt.checkpoints_dir, opt.name) - util.mkdirs(expr_dir) - file_name = os.path.join(expr_dir, '{}_opt.txt'.format(opt.phase)) - try: - with open(file_name, 'wt') as opt_file: - opt_file.write(message) - opt_file.write('\n') - except PermissionError as error: - print("permission error {}".format(error)) - pass - - def parse(self): - """Parse our options, create checkpoints directory suffix, and set up gpu device.""" - opt = self.gather_options() - opt.isTrain = self.isTrain # train or test - - # process opt.suffix - if opt.suffix: - suffix = ('_' + opt.suffix.format(**vars(opt))) if opt.suffix != '' else '' - opt.name = opt.name + suffix - - - # set gpu ids - str_ids = opt.gpu_ids.split(',') - gpu_ids = [] - for str_id in str_ids: - id = int(str_id) - if id >= 0: - gpu_ids.append(id) - opt.world_size = len(gpu_ids) - # if len(opt.gpu_ids) > 0: - # torch.cuda.set_device(gpu_ids[0]) - if opt.world_size == 1: - opt.use_ddp = False - - if opt.phase != 'test': - # set continue_train automatically - if opt.pretrained_name is None: - model_dir = os.path.join(opt.checkpoints_dir, opt.name) - else: - model_dir = os.path.join(opt.checkpoints_dir, opt.pretrained_name) - if os.path.isdir(model_dir): - model_pths = [i for i in os.listdir(model_dir) if i.endswith('pth')] - if os.path.isdir(model_dir) and len(model_pths) != 0: - opt.continue_train= True - - # update the latest epoch count - if opt.continue_train: - if opt.epoch == 'latest': - epoch_counts = [int(i.split('.')[0].split('_')[-1]) for i in model_pths if 'latest' not in i] - if len(epoch_counts) != 0: - opt.epoch_count = max(epoch_counts) + 1 - else: - opt.epoch_count = int(opt.epoch) + 1 - - - self.print_options(opt) - self.opt = opt - return self.opt diff --git a/spaces/kinensake/quanquan/lm_scorer/models/abc/base.py b/spaces/kinensake/quanquan/lm_scorer/models/abc/base.py deleted file mode 100644 index 91e1358c6e2f3f1039e6ba5988657667d1068a18..0000000000000000000000000000000000000000 --- a/spaces/kinensake/quanquan/lm_scorer/models/abc/base.py +++ /dev/null @@ -1,103 +0,0 @@ -from typing import * # pylint: disable=wildcard-import,unused-wildcard-import -from abc import ABC, abstractmethod - -import math - -import torch - - -class LMScorer(ABC): - def __init__(self, model_name: str, **kwargs: Any) -> None: - self._build(model_name, kwargs) - - @overload - def sentence_score( - self, text: str, log: bool = False, reduce: str = "prod" - ) -> float: - ... - - @overload - def sentence_score( - self, text: List[str], log: bool = False, reduce: str = "prod" - ) -> List[float]: - ... - - def sentence_score( - self, text: Union[str, List[str]], log: bool = False, reduce: str = "prod", - ) -> Union[float, List[float]]: - sentences = [text] if isinstance(text, str) else text - scores: List[float] = [] - if len(sentences) == 0: - return scores - - outputs = self._tokens_log_prob(sentences) - for output in outputs: - log_probs = output[0] - tlen = log_probs.shape[0] - - if reduce == "prod": - score = log_probs.sum() - elif reduce == "mean": - score = log_probs.logsumexp(0) - math.log(tlen) - elif reduce == "gmean": - score = log_probs.mean(0) - elif reduce == "hmean": - score = log_probs.neg().logsumexp(0).neg() + math.log(tlen) - else: - raise ValueError("Unrecognized scoring strategy: %s" % reduce) - if not log: - score = score.exp() - - scores.append(score.item()) - - return scores[0] if isinstance(text, str) else scores - - @overload - def tokens_score( - self, text: str, log: bool = False - ) -> Tuple[List[float], List[int], List[str]]: - ... - - @overload - def tokens_score( - self, text: List[str], log: bool = False - ) -> List[Tuple[List[float], List[int], List[str]]]: - ... - - def tokens_score( - self, text: Union[str, List[str]], log: bool = False - ) -> Union[ - Tuple[List[float], List[int], List[str]], - List[Tuple[List[float], List[int], List[str]]], - ]: - sentences = [text] if isinstance(text, str) else text - outputs: List[Tuple[List[float], List[int], List[str]]] = [] - if len(sentences) == 0: - return outputs - - for log_probs, ids, tokens in self._tokens_log_prob(sentences): - scores = log_probs if log else log_probs.exp() - scores = cast(torch.DoubleTensor, scores) - output = (scores.tolist(), ids.tolist(), tokens) - outputs.append(output) - - return outputs[0] if isinstance(text, str) else outputs - - @classmethod - def supported_model_names(cls) -> Iterable[str]: - return cls._supported_model_names() - - def _build(self, model_name: str, options: Dict[str, Any]) -> None: - # pylint: disable=attribute-defined-outside-init, unused-argument - self.model_name = model_name - - @abstractmethod - def _tokens_log_prob( - self, text: List[str] - ) -> List[Tuple[torch.DoubleTensor, torch.LongTensor, List[str]]]: - ... # pragma: no cover - - @classmethod - @abstractmethod - def _supported_model_names(cls) -> Iterable[str]: - ... # pragma: no cover diff --git a/spaces/kira4424/VITS-fast-fine-tuning/transforms.py b/spaces/kira4424/VITS-fast-fine-tuning/transforms.py deleted file mode 100644 index 4793d67ca5a5630e0ffe0f9fb29445c949e64dae..0000000000000000000000000000000000000000 --- a/spaces/kira4424/VITS-fast-fine-tuning/transforms.py +++ /dev/null @@ -1,193 +0,0 @@ -import torch -from torch.nn import functional as F - -import numpy as np - - -DEFAULT_MIN_BIN_WIDTH = 1e-3 -DEFAULT_MIN_BIN_HEIGHT = 1e-3 -DEFAULT_MIN_DERIVATIVE = 1e-3 - - -def piecewise_rational_quadratic_transform(inputs, - unnormalized_widths, - unnormalized_heights, - unnormalized_derivatives, - inverse=False, - tails=None, - tail_bound=1., - min_bin_width=DEFAULT_MIN_BIN_WIDTH, - min_bin_height=DEFAULT_MIN_BIN_HEIGHT, - min_derivative=DEFAULT_MIN_DERIVATIVE): - - if tails is None: - spline_fn = rational_quadratic_spline - spline_kwargs = {} - else: - spline_fn = unconstrained_rational_quadratic_spline - spline_kwargs = { - 'tails': tails, - 'tail_bound': tail_bound - } - - outputs, logabsdet = spline_fn( - inputs=inputs, - unnormalized_widths=unnormalized_widths, - unnormalized_heights=unnormalized_heights, - unnormalized_derivatives=unnormalized_derivatives, - inverse=inverse, - min_bin_width=min_bin_width, - min_bin_height=min_bin_height, - min_derivative=min_derivative, - **spline_kwargs - ) - return outputs, logabsdet - - -def searchsorted(bin_locations, inputs, eps=1e-6): - bin_locations[..., -1] += eps - return torch.sum( - inputs[..., None] >= bin_locations, - dim=-1 - ) - 1 - - -def unconstrained_rational_quadratic_spline(inputs, - unnormalized_widths, - unnormalized_heights, - unnormalized_derivatives, - inverse=False, - tails='linear', - tail_bound=1., - min_bin_width=DEFAULT_MIN_BIN_WIDTH, - min_bin_height=DEFAULT_MIN_BIN_HEIGHT, - min_derivative=DEFAULT_MIN_DERIVATIVE): - inside_interval_mask = (inputs >= -tail_bound) & (inputs <= tail_bound) - outside_interval_mask = ~inside_interval_mask - - outputs = torch.zeros_like(inputs) - logabsdet = torch.zeros_like(inputs) - - if tails == 'linear': - unnormalized_derivatives = F.pad(unnormalized_derivatives, pad=(1, 1)) - constant = np.log(np.exp(1 - min_derivative) - 1) - unnormalized_derivatives[..., 0] = constant - unnormalized_derivatives[..., -1] = constant - - outputs[outside_interval_mask] = inputs[outside_interval_mask] - logabsdet[outside_interval_mask] = 0 - else: - raise RuntimeError('{} tails are not implemented.'.format(tails)) - - outputs[inside_interval_mask], logabsdet[inside_interval_mask] = rational_quadratic_spline( - inputs=inputs[inside_interval_mask], - unnormalized_widths=unnormalized_widths[inside_interval_mask, :], - unnormalized_heights=unnormalized_heights[inside_interval_mask, :], - unnormalized_derivatives=unnormalized_derivatives[inside_interval_mask, :], - inverse=inverse, - left=-tail_bound, right=tail_bound, bottom=-tail_bound, top=tail_bound, - min_bin_width=min_bin_width, - min_bin_height=min_bin_height, - min_derivative=min_derivative - ) - - return outputs, logabsdet - -def rational_quadratic_spline(inputs, - unnormalized_widths, - unnormalized_heights, - unnormalized_derivatives, - inverse=False, - left=0., right=1., bottom=0., top=1., - min_bin_width=DEFAULT_MIN_BIN_WIDTH, - min_bin_height=DEFAULT_MIN_BIN_HEIGHT, - min_derivative=DEFAULT_MIN_DERIVATIVE): - if torch.min(inputs) < left or torch.max(inputs) > right: - raise ValueError('Input to a transform is not within its domain') - - num_bins = unnormalized_widths.shape[-1] - - if min_bin_width * num_bins > 1.0: - raise ValueError('Minimal bin width too large for the number of bins') - if min_bin_height * num_bins > 1.0: - raise ValueError('Minimal bin height too large for the number of bins') - - widths = F.softmax(unnormalized_widths, dim=-1) - widths = min_bin_width + (1 - min_bin_width * num_bins) * widths - cumwidths = torch.cumsum(widths, dim=-1) - cumwidths = F.pad(cumwidths, pad=(1, 0), mode='constant', value=0.0) - cumwidths = (right - left) * cumwidths + left - cumwidths[..., 0] = left - cumwidths[..., -1] = right - widths = cumwidths[..., 1:] - cumwidths[..., :-1] - - derivatives = min_derivative + F.softplus(unnormalized_derivatives) - - heights = F.softmax(unnormalized_heights, dim=-1) - heights = min_bin_height + (1 - min_bin_height * num_bins) * heights - cumheights = torch.cumsum(heights, dim=-1) - cumheights = F.pad(cumheights, pad=(1, 0), mode='constant', value=0.0) - cumheights = (top - bottom) * cumheights + bottom - cumheights[..., 0] = bottom - cumheights[..., -1] = top - heights = cumheights[..., 1:] - cumheights[..., :-1] - - if inverse: - bin_idx = searchsorted(cumheights, inputs)[..., None] - else: - bin_idx = searchsorted(cumwidths, inputs)[..., None] - - input_cumwidths = cumwidths.gather(-1, bin_idx)[..., 0] - input_bin_widths = widths.gather(-1, bin_idx)[..., 0] - - input_cumheights = cumheights.gather(-1, bin_idx)[..., 0] - delta = heights / widths - input_delta = delta.gather(-1, bin_idx)[..., 0] - - input_derivatives = derivatives.gather(-1, bin_idx)[..., 0] - input_derivatives_plus_one = derivatives[..., 1:].gather(-1, bin_idx)[..., 0] - - input_heights = heights.gather(-1, bin_idx)[..., 0] - - if inverse: - a = (((inputs - input_cumheights) * (input_derivatives - + input_derivatives_plus_one - - 2 * input_delta) - + input_heights * (input_delta - input_derivatives))) - b = (input_heights * input_derivatives - - (inputs - input_cumheights) * (input_derivatives - + input_derivatives_plus_one - - 2 * input_delta)) - c = - input_delta * (inputs - input_cumheights) - - discriminant = b.pow(2) - 4 * a * c - assert (discriminant >= 0).all() - - root = (2 * c) / (-b - torch.sqrt(discriminant)) - outputs = root * input_bin_widths + input_cumwidths - - theta_one_minus_theta = root * (1 - root) - denominator = input_delta + ((input_derivatives + input_derivatives_plus_one - 2 * input_delta) - * theta_one_minus_theta) - derivative_numerator = input_delta.pow(2) * (input_derivatives_plus_one * root.pow(2) - + 2 * input_delta * theta_one_minus_theta - + input_derivatives * (1 - root).pow(2)) - logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator) - - return outputs, -logabsdet - else: - theta = (inputs - input_cumwidths) / input_bin_widths - theta_one_minus_theta = theta * (1 - theta) - - numerator = input_heights * (input_delta * theta.pow(2) - + input_derivatives * theta_one_minus_theta) - denominator = input_delta + ((input_derivatives + input_derivatives_plus_one - 2 * input_delta) - * theta_one_minus_theta) - outputs = input_cumheights + numerator / denominator - - derivative_numerator = input_delta.pow(2) * (input_derivatives_plus_one * theta.pow(2) - + 2 * input_delta * theta_one_minus_theta - + input_derivatives * (1 - theta).pow(2)) - logabsdet = torch.log(derivative_numerator) - 2 * torch.log(denominator) - - return outputs, logabsdet diff --git a/spaces/koajoel/PolyFormer/fairseq/.github/ISSUE_TEMPLATE/documentation.md b/spaces/koajoel/PolyFormer/fairseq/.github/ISSUE_TEMPLATE/documentation.md deleted file mode 100644 index 3a6e2e9ea4bb71102122c17ff53051eb3770cb5e..0000000000000000000000000000000000000000 --- a/spaces/koajoel/PolyFormer/fairseq/.github/ISSUE_TEMPLATE/documentation.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: 📚 Documentation/Typos -about: Report an issue related to documentation or a typo -labels: 'documentation, needs triage' ---- - -## 📚 Documentation - -For typos and doc fixes, please go ahead and: - -1. Create an issue. -2. Fix the typo. -3. Submit a PR. - -Thanks! diff --git a/spaces/kukuhtw/AutoGPT/autogpt/commands/audio_text.py b/spaces/kukuhtw/AutoGPT/autogpt/commands/audio_text.py deleted file mode 100644 index cae32d4eb78c4268bf6ef1bae3c15a399af046bf..0000000000000000000000000000000000000000 --- a/spaces/kukuhtw/AutoGPT/autogpt/commands/audio_text.py +++ /dev/null @@ -1,36 +0,0 @@ -import json - -import requests - -from autogpt.config import Config -from autogpt.workspace import path_in_workspace - -cfg = Config() - - -def read_audio_from_file(audio_path): - audio_path = path_in_workspace(audio_path) - with open(audio_path, "rb") as audio_file: - audio = audio_file.read() - return read_audio(audio) - - -def read_audio(audio): - model = cfg.huggingface_audio_to_text_model - api_url = f"https://api-inference.huggingface.co/models/{model}" - api_token = cfg.huggingface_api_token - headers = {"Authorization": f"Bearer {api_token}"} - - if api_token is None: - raise ValueError( - "You need to set your Hugging Face API token in the config file." - ) - - response = requests.post( - api_url, - headers=headers, - data=audio, - ) - - text = json.loads(response.content.decode("utf-8"))["text"] - return "The audio says: " + text diff --git a/spaces/kukuhtw/VToonify/vtoonify/model/stylegan/lpips/__init__.py b/spaces/kukuhtw/VToonify/vtoonify/model/stylegan/lpips/__init__.py deleted file mode 100644 index 8b3c9cdc35a03a4e4585bd6bbc9c793331eb1723..0000000000000000000000000000000000000000 --- a/spaces/kukuhtw/VToonify/vtoonify/model/stylegan/lpips/__init__.py +++ /dev/null @@ -1,161 +0,0 @@ - -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function - -import numpy as np -#from skimage.measure import compare_ssim -from skimage.metrics import structural_similarity as compare_ssim -import torch -from torch.autograd import Variable - -from model.stylegan.lpips import dist_model - -class PerceptualLoss(torch.nn.Module): - def __init__(self, model='net-lin', net='alex', colorspace='rgb', spatial=False, use_gpu=True, gpu_ids=[0]): # VGG using our perceptually-learned weights (LPIPS metric) - # def __init__(self, model='net', net='vgg', use_gpu=True): # "default" way of using VGG as a perceptual loss - super(PerceptualLoss, self).__init__() - print('Setting up Perceptual loss...') - self.use_gpu = use_gpu - self.spatial = spatial - self.gpu_ids = gpu_ids - self.model = dist_model.DistModel() - self.model.initialize(model=model, net=net, use_gpu=use_gpu, colorspace=colorspace, spatial=self.spatial, gpu_ids=gpu_ids) - print('...[%s] initialized'%self.model.name()) - print('...Done') - - def forward(self, pred, target, normalize=False): - """ - Pred and target are Variables. - If normalize is True, assumes the images are between [0,1] and then scales them between [-1,+1] - If normalize is False, assumes the images are already between [-1,+1] - - Inputs pred and target are Nx3xHxW - Output pytorch Variable N long - """ - - if normalize: - target = 2 * target - 1 - pred = 2 * pred - 1 - - return self.model.forward(target, pred) - -def normalize_tensor(in_feat,eps=1e-10): - norm_factor = torch.sqrt(torch.sum(in_feat**2,dim=1,keepdim=True)) - return in_feat/(norm_factor+eps) - -def l2(p0, p1, range=255.): - return .5*np.mean((p0 / range - p1 / range)**2) - -def psnr(p0, p1, peak=255.): - return 10*np.log10(peak**2/np.mean((1.*p0-1.*p1)**2)) - -def dssim(p0, p1, range=255.): - return (1 - compare_ssim(p0, p1, data_range=range, multichannel=True)) / 2. - -def rgb2lab(in_img,mean_cent=False): - from skimage import color - img_lab = color.rgb2lab(in_img) - if(mean_cent): - img_lab[:,:,0] = img_lab[:,:,0]-50 - return img_lab - -def tensor2np(tensor_obj): - # change dimension of a tensor object into a numpy array - return tensor_obj[0].cpu().float().numpy().transpose((1,2,0)) - -def np2tensor(np_obj): - # change dimenion of np array into tensor array - return torch.Tensor(np_obj[:, :, :, np.newaxis].transpose((3, 2, 0, 1))) - -def tensor2tensorlab(image_tensor,to_norm=True,mc_only=False): - # image tensor to lab tensor - from skimage import color - - img = tensor2im(image_tensor) - img_lab = color.rgb2lab(img) - if(mc_only): - img_lab[:,:,0] = img_lab[:,:,0]-50 - if(to_norm and not mc_only): - img_lab[:,:,0] = img_lab[:,:,0]-50 - img_lab = img_lab/100. - - return np2tensor(img_lab) - -def tensorlab2tensor(lab_tensor,return_inbnd=False): - from skimage import color - import warnings - warnings.filterwarnings("ignore") - - lab = tensor2np(lab_tensor)*100. - lab[:,:,0] = lab[:,:,0]+50 - - rgb_back = 255.*np.clip(color.lab2rgb(lab.astype('float')),0,1) - if(return_inbnd): - # convert back to lab, see if we match - lab_back = color.rgb2lab(rgb_back.astype('uint8')) - mask = 1.*np.isclose(lab_back,lab,atol=2.) - mask = np2tensor(np.prod(mask,axis=2)[:,:,np.newaxis]) - return (im2tensor(rgb_back),mask) - else: - return im2tensor(rgb_back) - -def rgb2lab(input): - from skimage import color - return color.rgb2lab(input / 255.) - -def tensor2im(image_tensor, imtype=np.uint8, cent=1., factor=255./2.): - image_numpy = image_tensor[0].cpu().float().numpy() - image_numpy = (np.transpose(image_numpy, (1, 2, 0)) + cent) * factor - return image_numpy.astype(imtype) - -def im2tensor(image, imtype=np.uint8, cent=1., factor=255./2.): - return torch.Tensor((image / factor - cent) - [:, :, :, np.newaxis].transpose((3, 2, 0, 1))) - -def tensor2vec(vector_tensor): - return vector_tensor.data.cpu().numpy()[:, :, 0, 0] - -def voc_ap(rec, prec, use_07_metric=False): - """ ap = voc_ap(rec, prec, [use_07_metric]) - Compute VOC AP given precision and recall. - If use_07_metric is true, uses the - VOC 07 11 point method (default:False). - """ - if use_07_metric: - # 11 point metric - ap = 0. - for t in np.arange(0., 1.1, 0.1): - if np.sum(rec >= t) == 0: - p = 0 - else: - p = np.max(prec[rec >= t]) - ap = ap + p / 11. - else: - # correct AP calculation - # first append sentinel values at the end - mrec = np.concatenate(([0.], rec, [1.])) - mpre = np.concatenate(([0.], prec, [0.])) - - # compute the precision envelope - for i in range(mpre.size - 1, 0, -1): - mpre[i - 1] = np.maximum(mpre[i - 1], mpre[i]) - - # to calculate area under PR curve, look for points - # where X axis (recall) changes value - i = np.where(mrec[1:] != mrec[:-1])[0] - - # and sum (\Delta recall) * prec - ap = np.sum((mrec[i + 1] - mrec[i]) * mpre[i + 1]) - return ap - -def tensor2im(image_tensor, imtype=np.uint8, cent=1., factor=255./2.): -# def tensor2im(image_tensor, imtype=np.uint8, cent=1., factor=1.): - image_numpy = image_tensor[0].cpu().float().numpy() - image_numpy = (np.transpose(image_numpy, (1, 2, 0)) + cent) * factor - return image_numpy.astype(imtype) - -def im2tensor(image, imtype=np.uint8, cent=1., factor=255./2.): -# def im2tensor(image, imtype=np.uint8, cent=1., factor=1.): - return torch.Tensor((image / factor - cent) - [:, :, :, np.newaxis].transpose((3, 2, 0, 1))) diff --git a/spaces/ky2k/Toxicity_Classifier_POC/.venv/lib/python3.9/site-packages/PIL/ImageFont.py b/spaces/ky2k/Toxicity_Classifier_POC/.venv/lib/python3.9/site-packages/PIL/ImageFont.py deleted file mode 100644 index 9cdad2961b13a1b06547ed7b31c5cb8d7ee1c7f0..0000000000000000000000000000000000000000 --- a/spaces/ky2k/Toxicity_Classifier_POC/.venv/lib/python3.9/site-packages/PIL/ImageFont.py +++ /dev/null @@ -1,1202 +0,0 @@ -# -# The Python Imaging Library. -# $Id$ -# -# PIL raster font management -# -# History: -# 1996-08-07 fl created (experimental) -# 1997-08-25 fl minor adjustments to handle fonts from pilfont 0.3 -# 1999-02-06 fl rewrote most font management stuff in C -# 1999-03-17 fl take pth files into account in load_path (from Richard Jones) -# 2001-02-17 fl added freetype support -# 2001-05-09 fl added TransposedFont wrapper class -# 2002-03-04 fl make sure we have a "L" or "1" font -# 2002-12-04 fl skip non-directory entries in the system path -# 2003-04-29 fl add embedded default font -# 2003-09-27 fl added support for truetype charmap encodings -# -# Todo: -# Adapt to PILFONT2 format (16-bit fonts, compressed, single file) -# -# Copyright (c) 1997-2003 by Secret Labs AB -# Copyright (c) 1996-2003 by Fredrik Lundh -# -# See the README file for information on usage and redistribution. -# - -import base64 -import math -import os -import sys -import warnings -from enum import IntEnum -from io import BytesIO - -from . import Image -from ._deprecate import deprecate -from ._util import is_directory, is_path - - -class Layout(IntEnum): - BASIC = 0 - RAQM = 1 - - -def __getattr__(name): - for enum, prefix in {Layout: "LAYOUT_"}.items(): - if name.startswith(prefix): - name = name[len(prefix) :] - if name in enum.__members__: - deprecate(f"{prefix}{name}", 10, f"{enum.__name__}.{name}") - return enum[name] - msg = f"module '{__name__}' has no attribute '{name}'" - raise AttributeError(msg) - - -try: - from . import _imagingft as core -except ImportError as ex: - from ._util import DeferredError - - core = DeferredError(ex) - - -_UNSPECIFIED = object() - - -# FIXME: add support for pilfont2 format (see FontFile.py) - -# -------------------------------------------------------------------- -# Font metrics format: -# "PILfont" LF -# fontdescriptor LF -# (optional) key=value... LF -# "DATA" LF -# binary data: 256*10*2 bytes (dx, dy, dstbox, srcbox) -# -# To place a character, cut out srcbox and paste at dstbox, -# relative to the character position. Then move the character -# position according to dx, dy. -# -------------------------------------------------------------------- - - -class ImageFont: - """PIL font wrapper""" - - def _load_pilfont(self, filename): - with open(filename, "rb") as fp: - image = None - for ext in (".png", ".gif", ".pbm"): - if image: - image.close() - try: - fullname = os.path.splitext(filename)[0] + ext - image = Image.open(fullname) - except Exception: - pass - else: - if image and image.mode in ("1", "L"): - break - else: - if image: - image.close() - msg = "cannot find glyph data file" - raise OSError(msg) - - self.file = fullname - - self._load_pilfont_data(fp, image) - image.close() - - def _load_pilfont_data(self, file, image): - # read PILfont header - if file.readline() != b"PILfont\n": - msg = "Not a PILfont file" - raise SyntaxError(msg) - file.readline().split(b";") - self.info = [] # FIXME: should be a dictionary - while True: - s = file.readline() - if not s or s == b"DATA\n": - break - self.info.append(s) - - # read PILfont metrics - data = file.read(256 * 20) - - # check image - if image.mode not in ("1", "L"): - msg = "invalid font image mode" - raise TypeError(msg) - - image.load() - - self.font = Image.core.font(image.im, data) - - def getsize(self, text, *args, **kwargs): - """ - .. deprecated:: 9.2.0 - - Use :py:meth:`.getbbox` or :py:meth:`.getlength` instead. - - See :ref:`deprecations ` for more information. - - Returns width and height (in pixels) of given text. - - :param text: Text to measure. - - :return: (width, height) - """ - deprecate("getsize", 10, "getbbox or getlength") - return self.font.getsize(text) - - def getmask(self, text, mode="", *args, **kwargs): - """ - Create a bitmap for the text. - - If the font uses antialiasing, the bitmap should have mode ``L`` and use a - maximum value of 255. Otherwise, it should have mode ``1``. - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - .. versionadded:: 1.1.5 - - :return: An internal PIL storage memory instance as defined by the - :py:mod:`PIL.Image.core` interface module. - """ - return self.font.getmask(text, mode) - - def getbbox(self, text, *args, **kwargs): - """ - Returns bounding box (in pixels) of given text. - - .. versionadded:: 9.2.0 - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - :return: ``(left, top, right, bottom)`` bounding box - """ - width, height = self.font.getsize(text) - return 0, 0, width, height - - def getlength(self, text, *args, **kwargs): - """ - Returns length (in pixels) of given text. - This is the amount by which following text should be offset. - - .. versionadded:: 9.2.0 - """ - width, height = self.font.getsize(text) - return width - - -## -# Wrapper for FreeType fonts. Application code should use the -# truetype factory function to create font objects. - - -class FreeTypeFont: - """FreeType font wrapper (requires _imagingft service)""" - - def __init__(self, font=None, size=10, index=0, encoding="", layout_engine=None): - # FIXME: use service provider instead - - self.path = font - self.size = size - self.index = index - self.encoding = encoding - - if layout_engine not in (Layout.BASIC, Layout.RAQM): - layout_engine = Layout.BASIC - if core.HAVE_RAQM: - layout_engine = Layout.RAQM - elif layout_engine == Layout.RAQM and not core.HAVE_RAQM: - warnings.warn( - "Raqm layout was requested, but Raqm is not available. " - "Falling back to basic layout." - ) - layout_engine = Layout.BASIC - - self.layout_engine = layout_engine - - def load_from_bytes(f): - self.font_bytes = f.read() - self.font = core.getfont( - "", size, index, encoding, self.font_bytes, layout_engine - ) - - if is_path(font): - if sys.platform == "win32": - font_bytes_path = font if isinstance(font, bytes) else font.encode() - try: - font_bytes_path.decode("ascii") - except UnicodeDecodeError: - # FreeType cannot load fonts with non-ASCII characters on Windows - # So load it into memory first - with open(font, "rb") as f: - load_from_bytes(f) - return - self.font = core.getfont( - font, size, index, encoding, layout_engine=layout_engine - ) - else: - load_from_bytes(font) - - def __getstate__(self): - return [self.path, self.size, self.index, self.encoding, self.layout_engine] - - def __setstate__(self, state): - path, size, index, encoding, layout_engine = state - self.__init__(path, size, index, encoding, layout_engine) - - def _multiline_split(self, text): - split_character = "\n" if isinstance(text, str) else b"\n" - return text.split(split_character) - - def getname(self): - """ - :return: A tuple of the font family (e.g. Helvetica) and the font style - (e.g. Bold) - """ - return self.font.family, self.font.style - - def getmetrics(self): - """ - :return: A tuple of the font ascent (the distance from the baseline to - the highest outline point) and descent (the distance from the - baseline to the lowest outline point, a negative value) - """ - return self.font.ascent, self.font.descent - - def getlength(self, text, mode="", direction=None, features=None, language=None): - """ - Returns length (in pixels with 1/64 precision) of given text when rendered - in font with provided direction, features, and language. - - This is the amount by which following text should be offset. - Text bounding box may extend past the length in some fonts, - e.g. when using italics or accents. - - The result is returned as a float; it is a whole number if using basic layout. - - Note that the sum of two lengths may not equal the length of a concatenated - string due to kerning. If you need to adjust for kerning, include the following - character and subtract its length. - - For example, instead of :: - - hello = font.getlength("Hello") - world = font.getlength("World") - hello_world = hello + world # not adjusted for kerning - assert hello_world == font.getlength("HelloWorld") # may fail - - use :: - - hello = font.getlength("HelloW") - font.getlength("W") # adjusted for kerning - world = font.getlength("World") - hello_world = hello + world # adjusted for kerning - assert hello_world == font.getlength("HelloWorld") # True - - or disable kerning with (requires libraqm) :: - - hello = draw.textlength("Hello", font, features=["-kern"]) - world = draw.textlength("World", font, features=["-kern"]) - hello_world = hello + world # kerning is disabled, no need to adjust - assert hello_world == draw.textlength("HelloWorld", font, features=["-kern"]) - - .. versionadded:: 8.0.0 - - :param text: Text to measure. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - :return: Width for horizontal, height for vertical text. - """ - return self.font.getlength(text, mode, direction, features, language) / 64 - - def getbbox( - self, - text, - mode="", - direction=None, - features=None, - language=None, - stroke_width=0, - anchor=None, - ): - """ - Returns bounding box (in pixels) of given text relative to given anchor - when rendered in font with provided direction, features, and language. - - Use :py:meth:`getlength()` to get the offset of following text with - 1/64 pixel precision. The bounding box includes extra margins for - some fonts, e.g. italics or accents. - - .. versionadded:: 8.0.0 - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - :param stroke_width: The width of the text stroke. - - :param anchor: The text anchor alignment. Determines the relative location of - the anchor to the text. The default alignment is top left. - See :ref:`text-anchors` for valid values. - - :return: ``(left, top, right, bottom)`` bounding box - """ - size, offset = self.font.getsize( - text, mode, direction, features, language, anchor - ) - left, top = offset[0] - stroke_width, offset[1] - stroke_width - width, height = size[0] + 2 * stroke_width, size[1] + 2 * stroke_width - return left, top, left + width, top + height - - def getsize( - self, - text, - direction=None, - features=None, - language=None, - stroke_width=0, - ): - """ - .. deprecated:: 9.2.0 - - Use :py:meth:`getlength()` to measure the offset of following text with - 1/64 pixel precision. - Use :py:meth:`getbbox()` to get the exact bounding box based on an anchor. - - See :ref:`deprecations ` for more information. - - Returns width and height (in pixels) of given text if rendered in font with - provided direction, features, and language. - - .. note:: For historical reasons this function measures text height from - the ascender line instead of the top, see :ref:`text-anchors`. - If you wish to measure text height from the top, it is recommended - to use the bottom value of :meth:`getbbox` with ``anchor='lt'`` instead. - - :param text: Text to measure. - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - .. versionadded:: 6.0.0 - - :param stroke_width: The width of the text stroke. - - .. versionadded:: 6.2.0 - - :return: (width, height) - """ - deprecate("getsize", 10, "getbbox or getlength") - # vertical offset is added for historical reasons - # see https://github.com/python-pillow/Pillow/pull/4910#discussion_r486682929 - size, offset = self.font.getsize(text, "L", direction, features, language) - return ( - size[0] + stroke_width * 2, - size[1] + stroke_width * 2 + offset[1], - ) - - def getsize_multiline( - self, - text, - direction=None, - spacing=4, - features=None, - language=None, - stroke_width=0, - ): - """ - .. deprecated:: 9.2.0 - - Use :py:meth:`.ImageDraw.multiline_textbbox` instead. - - See :ref:`deprecations ` for more information. - - Returns width and height (in pixels) of given text if rendered in font - with provided direction, features, and language, while respecting - newline characters. - - :param text: Text to measure. - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - :param spacing: The vertical gap between lines, defaulting to 4 pixels. - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - .. versionadded:: 6.0.0 - - :param stroke_width: The width of the text stroke. - - .. versionadded:: 6.2.0 - - :return: (width, height) - """ - deprecate("getsize_multiline", 10, "ImageDraw.multiline_textbbox") - max_width = 0 - lines = self._multiline_split(text) - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", category=DeprecationWarning) - line_spacing = self.getsize("A", stroke_width=stroke_width)[1] + spacing - for line in lines: - line_width, line_height = self.getsize( - line, direction, features, language, stroke_width - ) - max_width = max(max_width, line_width) - - return max_width, len(lines) * line_spacing - spacing - - def getoffset(self, text): - """ - .. deprecated:: 9.2.0 - - Use :py:meth:`.getbbox` instead. - - See :ref:`deprecations ` for more information. - - Returns the offset of given text. This is the gap between the - starting coordinate and the first marking. Note that this gap is - included in the result of :py:func:`~PIL.ImageFont.FreeTypeFont.getsize`. - - :param text: Text to measure. - - :return: A tuple of the x and y offset - """ - deprecate("getoffset", 10, "getbbox") - return self.font.getsize(text)[1] - - def getmask( - self, - text, - mode="", - direction=None, - features=None, - language=None, - stroke_width=0, - anchor=None, - ink=0, - start=None, - ): - """ - Create a bitmap for the text. - - If the font uses antialiasing, the bitmap should have mode ``L`` and use a - maximum value of 255. If the font has embedded color data, the bitmap - should have mode ``RGBA``. Otherwise, it should have mode ``1``. - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - .. versionadded:: 1.1.5 - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - .. versionadded:: 6.0.0 - - :param stroke_width: The width of the text stroke. - - .. versionadded:: 6.2.0 - - :param anchor: The text anchor alignment. Determines the relative location of - the anchor to the text. The default alignment is top left. - See :ref:`text-anchors` for valid values. - - .. versionadded:: 8.0.0 - - :param ink: Foreground ink for rendering in RGBA mode. - - .. versionadded:: 8.0.0 - - :param start: Tuple of horizontal and vertical offset, as text may render - differently when starting at fractional coordinates. - - .. versionadded:: 9.4.0 - - :return: An internal PIL storage memory instance as defined by the - :py:mod:`PIL.Image.core` interface module. - """ - return self.getmask2( - text, - mode, - direction=direction, - features=features, - language=language, - stroke_width=stroke_width, - anchor=anchor, - ink=ink, - start=start, - )[0] - - def getmask2( - self, - text, - mode="", - fill=_UNSPECIFIED, - direction=None, - features=None, - language=None, - stroke_width=0, - anchor=None, - ink=0, - start=None, - *args, - **kwargs, - ): - """ - Create a bitmap for the text. - - If the font uses antialiasing, the bitmap should have mode ``L`` and use a - maximum value of 255. If the font has embedded color data, the bitmap - should have mode ``RGBA``. Otherwise, it should have mode ``1``. - - :param text: Text to render. - :param mode: Used by some graphics drivers to indicate what mode the - driver prefers; if empty, the renderer may return either - mode. Note that the mode is always a string, to simplify - C-level implementations. - - .. versionadded:: 1.1.5 - - :param fill: Optional fill function. By default, an internal Pillow function - will be used. - - Deprecated. This parameter will be removed in Pillow 10 - (2023-07-01). - - :param direction: Direction of the text. It can be 'rtl' (right to - left), 'ltr' (left to right) or 'ttb' (top to bottom). - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param features: A list of OpenType font features to be used during text - layout. This is usually used to turn on optional - font features that are not enabled by default, - for example 'dlig' or 'ss01', but can be also - used to turn off default font features for - example '-liga' to disable ligatures or '-kern' - to disable kerning. To get all supported - features, see - https://learn.microsoft.com/en-us/typography/opentype/spec/featurelist - Requires libraqm. - - .. versionadded:: 4.2.0 - - :param language: Language of the text. Different languages may use - different glyph shapes or ligatures. This parameter tells - the font which language the text is in, and to apply the - correct substitutions as appropriate, if available. - It should be a `BCP 47 language code - `_ - Requires libraqm. - - .. versionadded:: 6.0.0 - - :param stroke_width: The width of the text stroke. - - .. versionadded:: 6.2.0 - - :param anchor: The text anchor alignment. Determines the relative location of - the anchor to the text. The default alignment is top left. - See :ref:`text-anchors` for valid values. - - .. versionadded:: 8.0.0 - - :param ink: Foreground ink for rendering in RGBA mode. - - .. versionadded:: 8.0.0 - - :param start: Tuple of horizontal and vertical offset, as text may render - differently when starting at fractional coordinates. - - .. versionadded:: 9.4.0 - - :return: A tuple of an internal PIL storage memory instance as defined by the - :py:mod:`PIL.Image.core` interface module, and the text offset, the - gap between the starting coordinate and the first marking - """ - if fill is _UNSPECIFIED: - fill = Image.core.fill - else: - deprecate("fill", 10) - size, offset = self.font.getsize( - text, mode, direction, features, language, anchor - ) - if start is None: - start = (0, 0) - size = tuple(math.ceil(size[i] + stroke_width * 2 + start[i]) for i in range(2)) - offset = offset[0] - stroke_width, offset[1] - stroke_width - Image._decompression_bomb_check(size) - im = fill("RGBA" if mode == "RGBA" else "L", size, 0) - if min(size): - self.font.render( - text, - im.id, - mode, - direction, - features, - language, - stroke_width, - ink, - start[0], - start[1], - ) - return im, offset - - def font_variant( - self, font=None, size=None, index=None, encoding=None, layout_engine=None - ): - """ - Create a copy of this FreeTypeFont object, - using any specified arguments to override the settings. - - Parameters are identical to the parameters used to initialize this - object. - - :return: A FreeTypeFont object. - """ - if font is None: - try: - font = BytesIO(self.font_bytes) - except AttributeError: - font = self.path - return FreeTypeFont( - font=font, - size=self.size if size is None else size, - index=self.index if index is None else index, - encoding=self.encoding if encoding is None else encoding, - layout_engine=layout_engine or self.layout_engine, - ) - - def get_variation_names(self): - """ - :returns: A list of the named styles in a variation font. - :exception OSError: If the font is not a variation font. - """ - try: - names = self.font.getvarnames() - except AttributeError as e: - msg = "FreeType 2.9.1 or greater is required" - raise NotImplementedError(msg) from e - return [name.replace(b"\x00", b"") for name in names] - - def set_variation_by_name(self, name): - """ - :param name: The name of the style. - :exception OSError: If the font is not a variation font. - """ - names = self.get_variation_names() - if not isinstance(name, bytes): - name = name.encode() - index = names.index(name) + 1 - - if index == getattr(self, "_last_variation_index", None): - # When the same name is set twice in a row, - # there is an 'unknown freetype error' - # https://savannah.nongnu.org/bugs/?56186 - return - self._last_variation_index = index - - self.font.setvarname(index) - - def get_variation_axes(self): - """ - :returns: A list of the axes in a variation font. - :exception OSError: If the font is not a variation font. - """ - try: - axes = self.font.getvaraxes() - except AttributeError as e: - msg = "FreeType 2.9.1 or greater is required" - raise NotImplementedError(msg) from e - for axis in axes: - axis["name"] = axis["name"].replace(b"\x00", b"") - return axes - - def set_variation_by_axes(self, axes): - """ - :param axes: A list of values for each axis. - :exception OSError: If the font is not a variation font. - """ - try: - self.font.setvaraxes(axes) - except AttributeError as e: - msg = "FreeType 2.9.1 or greater is required" - raise NotImplementedError(msg) from e - - -class TransposedFont: - """Wrapper for writing rotated or mirrored text""" - - def __init__(self, font, orientation=None): - """ - Wrapper that creates a transposed font from any existing font - object. - - :param font: A font object. - :param orientation: An optional orientation. If given, this should - be one of Image.Transpose.FLIP_LEFT_RIGHT, Image.Transpose.FLIP_TOP_BOTTOM, - Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_180, or - Image.Transpose.ROTATE_270. - """ - self.font = font - self.orientation = orientation # any 'transpose' argument, or None - - def getsize(self, text, *args, **kwargs): - """ - .. deprecated:: 9.2.0 - - Use :py:meth:`.getbbox` or :py:meth:`.getlength` instead. - - See :ref:`deprecations ` for more information. - """ - deprecate("getsize", 10, "getbbox or getlength") - with warnings.catch_warnings(): - warnings.filterwarnings("ignore", category=DeprecationWarning) - w, h = self.font.getsize(text) - if self.orientation in (Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_270): - return h, w - return w, h - - def getmask(self, text, mode="", *args, **kwargs): - im = self.font.getmask(text, mode, *args, **kwargs) - if self.orientation is not None: - return im.transpose(self.orientation) - return im - - def getbbox(self, text, *args, **kwargs): - # TransposedFont doesn't support getmask2, move top-left point to (0, 0) - # this has no effect on ImageFont and simulates anchor="lt" for FreeTypeFont - left, top, right, bottom = self.font.getbbox(text, *args, **kwargs) - width = right - left - height = bottom - top - if self.orientation in (Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_270): - return 0, 0, height, width - return 0, 0, width, height - - def getlength(self, text, *args, **kwargs): - if self.orientation in (Image.Transpose.ROTATE_90, Image.Transpose.ROTATE_270): - msg = "text length is undefined for text rotated by 90 or 270 degrees" - raise ValueError(msg) - return self.font.getlength(text, *args, **kwargs) - - -def load(filename): - """ - Load a font file. This function loads a font object from the given - bitmap font file, and returns the corresponding font object. - - :param filename: Name of font file. - :return: A font object. - :exception OSError: If the file could not be read. - """ - f = ImageFont() - f._load_pilfont(filename) - return f - - -def truetype(font=None, size=10, index=0, encoding="", layout_engine=None): - """ - Load a TrueType or OpenType font from a file or file-like object, - and create a font object. - This function loads a font object from the given file or file-like - object, and creates a font object for a font of the given size. - - Pillow uses FreeType to open font files. On Windows, be aware that FreeType - will keep the file open as long as the FreeTypeFont object exists. Windows - limits the number of files that can be open in C at once to 512, so if many - fonts are opened simultaneously and that limit is approached, an - ``OSError`` may be thrown, reporting that FreeType "cannot open resource". - A workaround would be to copy the file(s) into memory, and open that instead. - - This function requires the _imagingft service. - - :param font: A filename or file-like object containing a TrueType font. - If the file is not found in this filename, the loader may also - search in other directories, such as the :file:`fonts/` - directory on Windows or :file:`/Library/Fonts/`, - :file:`/System/Library/Fonts/` and :file:`~/Library/Fonts/` on - macOS. - - :param size: The requested size, in pixels. - :param index: Which font face to load (default is first available face). - :param encoding: Which font encoding to use (default is Unicode). Possible - encodings include (see the FreeType documentation for more - information): - - * "unic" (Unicode) - * "symb" (Microsoft Symbol) - * "ADOB" (Adobe Standard) - * "ADBE" (Adobe Expert) - * "ADBC" (Adobe Custom) - * "armn" (Apple Roman) - * "sjis" (Shift JIS) - * "gb " (PRC) - * "big5" - * "wans" (Extended Wansung) - * "joha" (Johab) - * "lat1" (Latin-1) - - This specifies the character set to use. It does not alter the - encoding of any text provided in subsequent operations. - :param layout_engine: Which layout engine to use, if available: - :data:`.ImageFont.Layout.BASIC` or :data:`.ImageFont.Layout.RAQM`. - If it is available, Raqm layout will be used by default. - Otherwise, basic layout will be used. - - Raqm layout is recommended for all non-English text. If Raqm layout - is not required, basic layout will have better performance. - - You can check support for Raqm layout using - :py:func:`PIL.features.check_feature` with ``feature="raqm"``. - - .. versionadded:: 4.2.0 - :return: A font object. - :exception OSError: If the file could not be read. - """ - - def freetype(font): - return FreeTypeFont(font, size, index, encoding, layout_engine) - - try: - return freetype(font) - except OSError: - if not is_path(font): - raise - ttf_filename = os.path.basename(font) - - dirs = [] - if sys.platform == "win32": - # check the windows font repository - # NOTE: must use uppercase WINDIR, to work around bugs in - # 1.5.2's os.environ.get() - windir = os.environ.get("WINDIR") - if windir: - dirs.append(os.path.join(windir, "fonts")) - elif sys.platform in ("linux", "linux2"): - lindirs = os.environ.get("XDG_DATA_DIRS") - if not lindirs: - # According to the freedesktop spec, XDG_DATA_DIRS should - # default to /usr/share - lindirs = "/usr/share" - dirs += [os.path.join(lindir, "fonts") for lindir in lindirs.split(":")] - elif sys.platform == "darwin": - dirs += [ - "/Library/Fonts", - "/System/Library/Fonts", - os.path.expanduser("~/Library/Fonts"), - ] - - ext = os.path.splitext(ttf_filename)[1] - first_font_with_a_different_extension = None - for directory in dirs: - for walkroot, walkdir, walkfilenames in os.walk(directory): - for walkfilename in walkfilenames: - if ext and walkfilename == ttf_filename: - return freetype(os.path.join(walkroot, walkfilename)) - elif not ext and os.path.splitext(walkfilename)[0] == ttf_filename: - fontpath = os.path.join(walkroot, walkfilename) - if os.path.splitext(fontpath)[1] == ".ttf": - return freetype(fontpath) - if not ext and first_font_with_a_different_extension is None: - first_font_with_a_different_extension = fontpath - if first_font_with_a_different_extension: - return freetype(first_font_with_a_different_extension) - raise - - -def load_path(filename): - """ - Load font file. Same as :py:func:`~PIL.ImageFont.load`, but searches for a - bitmap font along the Python path. - - :param filename: Name of font file. - :return: A font object. - :exception OSError: If the file could not be read. - """ - for directory in sys.path: - if is_directory(directory): - if not isinstance(filename, str): - filename = filename.decode("utf-8") - try: - return load(os.path.join(directory, filename)) - except OSError: - pass - msg = "cannot find font file" - raise OSError(msg) - - -def load_default(): - """Load a "better than nothing" default font. - - .. versionadded:: 1.1.4 - - :return: A font object. - """ - f = ImageFont() - f._load_pilfont_data( - # courB08 - BytesIO( - base64.b64decode( - b""" -UElMZm9udAo7Ozs7OzsxMDsKREFUQQoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAA//8AAQAAAAAAAAABAAEA -BgAAAAH/+gADAAAAAQAAAAMABgAGAAAAAf/6AAT//QADAAAABgADAAYAAAAA//kABQABAAYAAAAL -AAgABgAAAAD/+AAFAAEACwAAABAACQAGAAAAAP/5AAUAAAAQAAAAFQAHAAYAAP////oABQAAABUA -AAAbAAYABgAAAAH/+QAE//wAGwAAAB4AAwAGAAAAAf/5AAQAAQAeAAAAIQAIAAYAAAAB//kABAAB -ACEAAAAkAAgABgAAAAD/+QAE//0AJAAAACgABAAGAAAAAP/6AAX//wAoAAAALQAFAAYAAAAB//8A -BAACAC0AAAAwAAMABgAAAAD//AAF//0AMAAAADUAAQAGAAAAAf//AAMAAAA1AAAANwABAAYAAAAB -//kABQABADcAAAA7AAgABgAAAAD/+QAFAAAAOwAAAEAABwAGAAAAAP/5AAYAAABAAAAARgAHAAYA -AAAA//kABQAAAEYAAABLAAcABgAAAAD/+QAFAAAASwAAAFAABwAGAAAAAP/5AAYAAABQAAAAVgAH -AAYAAAAA//kABQAAAFYAAABbAAcABgAAAAD/+QAFAAAAWwAAAGAABwAGAAAAAP/5AAUAAABgAAAA -ZQAHAAYAAAAA//kABQAAAGUAAABqAAcABgAAAAD/+QAFAAAAagAAAG8ABwAGAAAAAf/8AAMAAABv -AAAAcQAEAAYAAAAA//wAAwACAHEAAAB0AAYABgAAAAD/+gAE//8AdAAAAHgABQAGAAAAAP/7AAT/ -/gB4AAAAfAADAAYAAAAB//oABf//AHwAAACAAAUABgAAAAD/+gAFAAAAgAAAAIUABgAGAAAAAP/5 -AAYAAQCFAAAAiwAIAAYAAP////oABgAAAIsAAACSAAYABgAA////+gAFAAAAkgAAAJgABgAGAAAA -AP/6AAUAAACYAAAAnQAGAAYAAP////oABQAAAJ0AAACjAAYABgAA////+gAFAAAAowAAAKkABgAG -AAD////6AAUAAACpAAAArwAGAAYAAAAA//oABQAAAK8AAAC0AAYABgAA////+gAGAAAAtAAAALsA -BgAGAAAAAP/6AAQAAAC7AAAAvwAGAAYAAP////oABQAAAL8AAADFAAYABgAA////+gAGAAAAxQAA -AMwABgAGAAD////6AAUAAADMAAAA0gAGAAYAAP////oABQAAANIAAADYAAYABgAA////+gAGAAAA -2AAAAN8ABgAGAAAAAP/6AAUAAADfAAAA5AAGAAYAAP////oABQAAAOQAAADqAAYABgAAAAD/+gAF -AAEA6gAAAO8ABwAGAAD////6AAYAAADvAAAA9gAGAAYAAAAA//oABQAAAPYAAAD7AAYABgAA//// -+gAFAAAA+wAAAQEABgAGAAD////6AAYAAAEBAAABCAAGAAYAAP////oABgAAAQgAAAEPAAYABgAA -////+gAGAAABDwAAARYABgAGAAAAAP/6AAYAAAEWAAABHAAGAAYAAP////oABgAAARwAAAEjAAYA -BgAAAAD/+gAFAAABIwAAASgABgAGAAAAAf/5AAQAAQEoAAABKwAIAAYAAAAA//kABAABASsAAAEv -AAgABgAAAAH/+QAEAAEBLwAAATIACAAGAAAAAP/5AAX//AEyAAABNwADAAYAAAAAAAEABgACATcA -AAE9AAEABgAAAAH/+QAE//wBPQAAAUAAAwAGAAAAAP/7AAYAAAFAAAABRgAFAAYAAP////kABQAA -AUYAAAFMAAcABgAAAAD/+wAFAAABTAAAAVEABQAGAAAAAP/5AAYAAAFRAAABVwAHAAYAAAAA//sA -BQAAAVcAAAFcAAUABgAAAAD/+QAFAAABXAAAAWEABwAGAAAAAP/7AAYAAgFhAAABZwAHAAYAAP// -//kABQAAAWcAAAFtAAcABgAAAAD/+QAGAAABbQAAAXMABwAGAAAAAP/5AAQAAgFzAAABdwAJAAYA -AP////kABgAAAXcAAAF+AAcABgAAAAD/+QAGAAABfgAAAYQABwAGAAD////7AAUAAAGEAAABigAF -AAYAAP////sABQAAAYoAAAGQAAUABgAAAAD/+wAFAAABkAAAAZUABQAGAAD////7AAUAAgGVAAAB -mwAHAAYAAAAA//sABgACAZsAAAGhAAcABgAAAAD/+wAGAAABoQAAAacABQAGAAAAAP/7AAYAAAGn -AAABrQAFAAYAAAAA//kABgAAAa0AAAGzAAcABgAA////+wAGAAABswAAAboABQAGAAD////7AAUA -AAG6AAABwAAFAAYAAP////sABgAAAcAAAAHHAAUABgAAAAD/+wAGAAABxwAAAc0ABQAGAAD////7 -AAYAAgHNAAAB1AAHAAYAAAAA//sABQAAAdQAAAHZAAUABgAAAAH/+QAFAAEB2QAAAd0ACAAGAAAA -Av/6AAMAAQHdAAAB3gAHAAYAAAAA//kABAABAd4AAAHiAAgABgAAAAD/+wAF//0B4gAAAecAAgAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAB -//sAAwACAecAAAHpAAcABgAAAAD/+QAFAAEB6QAAAe4ACAAGAAAAAP/5AAYAAAHuAAAB9AAHAAYA -AAAA//oABf//AfQAAAH5AAUABgAAAAD/+QAGAAAB+QAAAf8ABwAGAAAAAv/5AAMAAgH/AAACAAAJ -AAYAAAAA//kABQABAgAAAAIFAAgABgAAAAH/+gAE//sCBQAAAggAAQAGAAAAAP/5AAYAAAIIAAAC -DgAHAAYAAAAB//kABf/+Ag4AAAISAAUABgAA////+wAGAAACEgAAAhkABQAGAAAAAP/7AAX//gIZ -AAACHgADAAYAAAAA//wABf/9Ah4AAAIjAAEABgAAAAD/+QAHAAACIwAAAioABwAGAAAAAP/6AAT/ -+wIqAAACLgABAAYAAAAA//kABP/8Ai4AAAIyAAMABgAAAAD/+gAFAAACMgAAAjcABgAGAAAAAf/5 -AAT//QI3AAACOgAEAAYAAAAB//kABP/9AjoAAAI9AAQABgAAAAL/+QAE//sCPQAAAj8AAgAGAAD/ -///7AAYAAgI/AAACRgAHAAYAAAAA//kABgABAkYAAAJMAAgABgAAAAH//AAD//0CTAAAAk4AAQAG -AAAAAf//AAQAAgJOAAACUQADAAYAAAAB//kABP/9AlEAAAJUAAQABgAAAAH/+QAF//4CVAAAAlgA -BQAGAAD////7AAYAAAJYAAACXwAFAAYAAP////kABgAAAl8AAAJmAAcABgAA////+QAGAAACZgAA -Am0ABwAGAAD////5AAYAAAJtAAACdAAHAAYAAAAA//sABQACAnQAAAJ5AAcABgAA////9wAGAAAC -eQAAAoAACQAGAAD////3AAYAAAKAAAAChwAJAAYAAP////cABgAAAocAAAKOAAkABgAA////9wAG -AAACjgAAApUACQAGAAD////4AAYAAAKVAAACnAAIAAYAAP////cABgAAApwAAAKjAAkABgAA//// -+gAGAAACowAAAqoABgAGAAAAAP/6AAUAAgKqAAACrwAIAAYAAP////cABQAAAq8AAAK1AAkABgAA -////9wAFAAACtQAAArsACQAGAAD////3AAUAAAK7AAACwQAJAAYAAP////gABQAAAsEAAALHAAgA -BgAAAAD/9wAEAAACxwAAAssACQAGAAAAAP/3AAQAAALLAAACzwAJAAYAAAAA//cABAAAAs8AAALT -AAkABgAAAAD/+AAEAAAC0wAAAtcACAAGAAD////6AAUAAALXAAAC3QAGAAYAAP////cABgAAAt0A -AALkAAkABgAAAAD/9wAFAAAC5AAAAukACQAGAAAAAP/3AAUAAALpAAAC7gAJAAYAAAAA//cABQAA -Au4AAALzAAkABgAAAAD/9wAFAAAC8wAAAvgACQAGAAAAAP/4AAUAAAL4AAAC/QAIAAYAAAAA//oA -Bf//Av0AAAMCAAUABgAA////+gAGAAADAgAAAwkABgAGAAD////3AAYAAAMJAAADEAAJAAYAAP// -//cABgAAAxAAAAMXAAkABgAA////9wAGAAADFwAAAx4ACQAGAAD////4AAYAAAAAAAoABwASAAYA -AP////cABgAAAAcACgAOABMABgAA////+gAFAAAADgAKABQAEAAGAAD////6AAYAAAAUAAoAGwAQ -AAYAAAAA//gABgAAABsACgAhABIABgAAAAD/+AAGAAAAIQAKACcAEgAGAAAAAP/4AAYAAAAnAAoA -LQASAAYAAAAA//gABgAAAC0ACgAzABIABgAAAAD/+QAGAAAAMwAKADkAEQAGAAAAAP/3AAYAAAA5 -AAoAPwATAAYAAP////sABQAAAD8ACgBFAA8ABgAAAAD/+wAFAAIARQAKAEoAEQAGAAAAAP/4AAUA -AABKAAoATwASAAYAAAAA//gABQAAAE8ACgBUABIABgAAAAD/+AAFAAAAVAAKAFkAEgAGAAAAAP/5 -AAUAAABZAAoAXgARAAYAAAAA//gABgAAAF4ACgBkABIABgAAAAD/+AAGAAAAZAAKAGoAEgAGAAAA -AP/4AAYAAABqAAoAcAASAAYAAAAA//kABgAAAHAACgB2ABEABgAAAAD/+AAFAAAAdgAKAHsAEgAG -AAD////4AAYAAAB7AAoAggASAAYAAAAA//gABQAAAIIACgCHABIABgAAAAD/+AAFAAAAhwAKAIwA -EgAGAAAAAP/4AAUAAACMAAoAkQASAAYAAAAA//gABQAAAJEACgCWABIABgAAAAD/+QAFAAAAlgAK -AJsAEQAGAAAAAP/6AAX//wCbAAoAoAAPAAYAAAAA//oABQABAKAACgClABEABgAA////+AAGAAAA -pQAKAKwAEgAGAAD////4AAYAAACsAAoAswASAAYAAP////gABgAAALMACgC6ABIABgAA////+QAG -AAAAugAKAMEAEQAGAAD////4AAYAAgDBAAoAyAAUAAYAAP////kABQACAMgACgDOABMABgAA//// -+QAGAAIAzgAKANUAEw== -""" - ) - ), - Image.open( - BytesIO( - base64.b64decode( - b""" -iVBORw0KGgoAAAANSUhEUgAAAx4AAAAUAQAAAAArMtZoAAAEwElEQVR4nABlAJr/AHVE4czCI/4u -Mc4b7vuds/xzjz5/3/7u/n9vMe7vnfH/9++vPn/xyf5zhxzjt8GHw8+2d83u8x27199/nxuQ6Od9 -M43/5z2I+9n9ZtmDBwMQECDRQw/eQIQohJXxpBCNVE6QCCAAAAD//wBlAJr/AgALyj1t/wINwq0g -LeNZUworuN1cjTPIzrTX6ofHWeo3v336qPzfEwRmBnHTtf95/fglZK5N0PDgfRTslpGBvz7LFc4F -IUXBWQGjQ5MGCx34EDFPwXiY4YbYxavpnhHFrk14CDAAAAD//wBlAJr/AgKqRooH2gAgPeggvUAA -Bu2WfgPoAwzRAABAAAAAAACQgLz/3Uv4Gv+gX7BJgDeeGP6AAAD1NMDzKHD7ANWr3loYbxsAD791 -NAADfcoIDyP44K/jv4Y63/Z+t98Ovt+ub4T48LAAAAD//wBlAJr/AuplMlADJAAAAGuAphWpqhMx -in0A/fRvAYBABPgBwBUgABBQ/sYAyv9g0bCHgOLoGAAAAAAAREAAwI7nr0ArYpow7aX8//9LaP/9 -SjdavWA8ePHeBIKB//81/83ndznOaXx379wAAAD//wBlAJr/AqDxW+D3AABAAbUh/QMnbQag/gAY -AYDAAACgtgD/gOqAAAB5IA/8AAAk+n9w0AAA8AAAmFRJuPo27ciC0cD5oeW4E7KA/wD3ECMAn2tt -y8PgwH8AfAxFzC0JzeAMtratAsC/ffwAAAD//wBlAJr/BGKAyCAA4AAAAvgeYTAwHd1kmQF5chkG -ABoMIHcL5xVpTfQbUqzlAAAErwAQBgAAEOClA5D9il08AEh/tUzdCBsXkbgACED+woQg8Si9VeqY -lODCn7lmF6NhnAEYgAAA/NMIAAAAAAD//2JgjLZgVGBg5Pv/Tvpc8hwGBjYGJADjHDrAwPzAjv/H -/Wf3PzCwtzcwHmBgYGcwbZz8wHaCAQMDOwMDQ8MCBgYOC3W7mp+f0w+wHOYxO3OG+e376hsMZjk3 -AAAAAP//YmCMY2A4wMAIN5e5gQETPD6AZisDAwMDgzSDAAPjByiHcQMDAwMDg1nOze1lByRu5/47 -c4859311AYNZzg0AAAAA//9iYGDBYihOIIMuwIjGL39/fwffA8b//xv/P2BPtzzHwCBjUQAAAAD/ -/yLFBrIBAAAA//9i1HhcwdhizX7u8NZNzyLbvT97bfrMf/QHI8evOwcSqGUJAAAA//9iYBB81iSw -pEE170Qrg5MIYydHqwdDQRMrAwcVrQAAAAD//2J4x7j9AAMDn8Q/BgYLBoaiAwwMjPdvMDBYM1Tv -oJodAAAAAP//Yqo/83+dxePWlxl3npsel9lvLfPcqlE9725C+acfVLMEAAAA//9i+s9gwCoaaGMR -evta/58PTEWzr21hufPjA8N+qlnBwAAAAAD//2JiWLci5v1+HmFXDqcnULE/MxgYGBj+f6CaJQAA -AAD//2Ji2FrkY3iYpYC5qDeGgeEMAwPDvwQBBoYvcTwOVLMEAAAA//9isDBgkP///0EOg9z35v// -Gc/eeW7BwPj5+QGZhANUswMAAAD//2JgqGBgYGBgqEMXlvhMPUsAAAAA//8iYDd1AAAAAP//AwDR -w7IkEbzhVQAAAABJRU5ErkJggg== -""" - ) - ) - ), - ) - return f diff --git a/spaces/lafi23333/aikomori/vdecoder/hifigan/models.py b/spaces/lafi23333/aikomori/vdecoder/hifigan/models.py deleted file mode 100644 index bdc3fa2c3447f360472d94c2fad9bd74993f6410..0000000000000000000000000000000000000000 --- a/spaces/lafi23333/aikomori/vdecoder/hifigan/models.py +++ /dev/null @@ -1,500 +0,0 @@ -import os -import json -from .env import AttrDict -import numpy as np -import torch -import torch.nn.functional as F -import torch.nn as nn -from torch.nn import Conv1d, ConvTranspose1d, AvgPool1d, Conv2d -from torch.nn.utils import weight_norm, remove_weight_norm, spectral_norm -from .utils import init_weights, get_padding - -LRELU_SLOPE = 0.1 - - -def load_model(model_path, device='cuda'): - config_file = os.path.join(os.path.split(model_path)[0], 'config.json') - with open(config_file) as f: - data = f.read() - - global h - json_config = json.loads(data) - h = AttrDict(json_config) - - generator = Generator(h).to(device) - - cp_dict = torch.load(model_path) - generator.load_state_dict(cp_dict['generator']) - generator.eval() - generator.remove_weight_norm() - del cp_dict - return generator, h - - -class ResBlock1(torch.nn.Module): - def __init__(self, h, channels, kernel_size=3, dilation=(1, 3, 5)): - super(ResBlock1, self).__init__() - self.h = h - self.convs1 = nn.ModuleList([ - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[0], - padding=get_padding(kernel_size, dilation[0]))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[1], - padding=get_padding(kernel_size, dilation[1]))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[2], - padding=get_padding(kernel_size, dilation[2]))) - ]) - self.convs1.apply(init_weights) - - self.convs2 = nn.ModuleList([ - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1, - padding=get_padding(kernel_size, 1))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1, - padding=get_padding(kernel_size, 1))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=1, - padding=get_padding(kernel_size, 1))) - ]) - self.convs2.apply(init_weights) - - def forward(self, x): - for c1, c2 in zip(self.convs1, self.convs2): - xt = F.leaky_relu(x, LRELU_SLOPE) - xt = c1(xt) - xt = F.leaky_relu(xt, LRELU_SLOPE) - xt = c2(xt) - x = xt + x - return x - - def remove_weight_norm(self): - for l in self.convs1: - remove_weight_norm(l) - for l in self.convs2: - remove_weight_norm(l) - - -class ResBlock2(torch.nn.Module): - def __init__(self, h, channels, kernel_size=3, dilation=(1, 3)): - super(ResBlock2, self).__init__() - self.h = h - self.convs = nn.ModuleList([ - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[0], - padding=get_padding(kernel_size, dilation[0]))), - weight_norm(Conv1d(channels, channels, kernel_size, 1, dilation=dilation[1], - padding=get_padding(kernel_size, dilation[1]))) - ]) - self.convs.apply(init_weights) - - def forward(self, x): - for c in self.convs: - xt = F.leaky_relu(x, LRELU_SLOPE) - xt = c(xt) - x = xt + x - return x - - def remove_weight_norm(self): - for l in self.convs: - remove_weight_norm(l) - - -class SineGen(torch.nn.Module): - """ Definition of sine generator - SineGen(samp_rate, harmonic_num = 0, - sine_amp = 0.1, noise_std = 0.003, - voiced_threshold = 0, - flag_for_pulse=False) - samp_rate: sampling rate in Hz - harmonic_num: number of harmonic overtones (default 0) - sine_amp: amplitude of sine-wavefrom (default 0.1) - noise_std: std of Gaussian noise (default 0.003) - voiced_thoreshold: F0 threshold for U/V classification (default 0) - flag_for_pulse: this SinGen is used inside PulseGen (default False) - Note: when flag_for_pulse is True, the first time step of a voiced - segment is always sin(np.pi) or cos(0) - """ - - def __init__(self, samp_rate, harmonic_num=0, - sine_amp=0.1, noise_std=0.003, - voiced_threshold=0, - flag_for_pulse=False): - super(SineGen, self).__init__() - self.sine_amp = sine_amp - self.noise_std = noise_std - self.harmonic_num = harmonic_num - self.dim = self.harmonic_num + 1 - self.sampling_rate = samp_rate - self.voiced_threshold = voiced_threshold - self.flag_for_pulse = flag_for_pulse - - def _f02uv(self, f0): - # generate uv signal - uv = (f0 > self.voiced_threshold).type(torch.float32) - return uv - - def _f02sine(self, f0_values): - """ f0_values: (batchsize, length, dim) - where dim indicates fundamental tone and overtones - """ - # convert to F0 in rad. The interger part n can be ignored - # because 2 * np.pi * n doesn't affect phase - rad_values = (f0_values / self.sampling_rate) % 1 - - # initial phase noise (no noise for fundamental component) - rand_ini = torch.rand(f0_values.shape[0], f0_values.shape[2], \ - device=f0_values.device) - rand_ini[:, 0] = 0 - rad_values[:, 0, :] = rad_values[:, 0, :] + rand_ini - - # instantanouse phase sine[t] = sin(2*pi \sum_i=1 ^{t} rad) - if not self.flag_for_pulse: - # for normal case - - # To prevent torch.cumsum numerical overflow, - # it is necessary to add -1 whenever \sum_k=1^n rad_value_k > 1. - # Buffer tmp_over_one_idx indicates the time step to add -1. - # This will not change F0 of sine because (x-1) * 2*pi = x * 2*pi - tmp_over_one = torch.cumsum(rad_values, 1) % 1 - tmp_over_one_idx = (torch.diff(tmp_over_one, dim=1)) < 0 - cumsum_shift = torch.zeros_like(rad_values) - cumsum_shift[:, 1:, :] = tmp_over_one_idx * -1.0 - - sines = torch.sin(torch.cumsum(rad_values + cumsum_shift, dim=1) - * 2 * np.pi) - else: - # If necessary, make sure that the first time step of every - # voiced segments is sin(pi) or cos(0) - # This is used for pulse-train generation - - # identify the last time step in unvoiced segments - uv = self._f02uv(f0_values) - uv_1 = torch.roll(uv, shifts=-1, dims=1) - uv_1[:, -1, :] = 1 - u_loc = (uv < 1) * (uv_1 > 0) - - # get the instantanouse phase - tmp_cumsum = torch.cumsum(rad_values, dim=1) - # different batch needs to be processed differently - for idx in range(f0_values.shape[0]): - temp_sum = tmp_cumsum[idx, u_loc[idx, :, 0], :] - temp_sum[1:, :] = temp_sum[1:, :] - temp_sum[0:-1, :] - # stores the accumulation of i.phase within - # each voiced segments - tmp_cumsum[idx, :, :] = 0 - tmp_cumsum[idx, u_loc[idx, :, 0], :] = temp_sum - - # rad_values - tmp_cumsum: remove the accumulation of i.phase - # within the previous voiced segment. - i_phase = torch.cumsum(rad_values - tmp_cumsum, dim=1) - - # get the sines - sines = torch.cos(i_phase * 2 * np.pi) - return sines - - def forward(self, f0): - """ sine_tensor, uv = forward(f0) - input F0: tensor(batchsize=1, length, dim=1) - f0 for unvoiced steps should be 0 - output sine_tensor: tensor(batchsize=1, length, dim) - output uv: tensor(batchsize=1, length, 1) - """ - with torch.no_grad(): - f0_buf = torch.zeros(f0.shape[0], f0.shape[1], self.dim, - device=f0.device) - # fundamental component - fn = torch.multiply(f0, torch.FloatTensor([[range(1, self.harmonic_num + 2)]]).to(f0.device)) - - # generate sine waveforms - sine_waves = self._f02sine(fn) * self.sine_amp - - # generate uv signal - # uv = torch.ones(f0.shape) - # uv = uv * (f0 > self.voiced_threshold) - uv = self._f02uv(f0) - - # noise: for unvoiced should be similar to sine_amp - # std = self.sine_amp/3 -> max value ~ self.sine_amp - # . for voiced regions is self.noise_std - noise_amp = uv * self.noise_std + (1 - uv) * self.sine_amp / 3 - noise = noise_amp * torch.randn_like(sine_waves) - - # first: set the unvoiced part to 0 by uv - # then: additive noise - sine_waves = sine_waves * uv + noise - return sine_waves, uv, noise - - -class SourceModuleHnNSF(torch.nn.Module): - """ SourceModule for hn-nsf - SourceModule(sampling_rate, harmonic_num=0, sine_amp=0.1, - add_noise_std=0.003, voiced_threshod=0) - sampling_rate: sampling_rate in Hz - harmonic_num: number of harmonic above F0 (default: 0) - sine_amp: amplitude of sine source signal (default: 0.1) - add_noise_std: std of additive Gaussian noise (default: 0.003) - note that amplitude of noise in unvoiced is decided - by sine_amp - voiced_threshold: threhold to set U/V given F0 (default: 0) - Sine_source, noise_source = SourceModuleHnNSF(F0_sampled) - F0_sampled (batchsize, length, 1) - Sine_source (batchsize, length, 1) - noise_source (batchsize, length 1) - uv (batchsize, length, 1) - """ - - def __init__(self, sampling_rate, harmonic_num=0, sine_amp=0.1, - add_noise_std=0.003, voiced_threshod=0): - super(SourceModuleHnNSF, self).__init__() - - self.sine_amp = sine_amp - self.noise_std = add_noise_std - - # to produce sine waveforms - self.l_sin_gen = SineGen(sampling_rate, harmonic_num, - sine_amp, add_noise_std, voiced_threshod) - - # to merge source harmonics into a single excitation - self.l_linear = torch.nn.Linear(harmonic_num + 1, 1) - self.l_tanh = torch.nn.Tanh() - - def forward(self, x): - """ - Sine_source, noise_source = SourceModuleHnNSF(F0_sampled) - F0_sampled (batchsize, length, 1) - Sine_source (batchsize, length, 1) - noise_source (batchsize, length 1) - """ - # source for harmonic branch - sine_wavs, uv, _ = self.l_sin_gen(x) - sine_merge = self.l_tanh(self.l_linear(sine_wavs)) - - # source for noise branch, in the same shape as uv - noise = torch.randn_like(uv) * self.sine_amp / 3 - return sine_merge, noise, uv - - -class Generator(torch.nn.Module): - def __init__(self, h): - super(Generator, self).__init__() - self.h = h - - self.num_kernels = len(h["resblock_kernel_sizes"]) - self.num_upsamples = len(h["upsample_rates"]) - self.f0_upsamp = torch.nn.Upsample(scale_factor=np.prod(h["upsample_rates"])) - self.m_source = SourceModuleHnNSF( - sampling_rate=h["sampling_rate"], - harmonic_num=8) - self.noise_convs = nn.ModuleList() - self.conv_pre = weight_norm(Conv1d(h["inter_channels"], h["upsample_initial_channel"], 7, 1, padding=3)) - resblock = ResBlock1 if h["resblock"] == '1' else ResBlock2 - self.ups = nn.ModuleList() - for i, (u, k) in enumerate(zip(h["upsample_rates"], h["upsample_kernel_sizes"])): - c_cur = h["upsample_initial_channel"] // (2 ** (i + 1)) - self.ups.append(weight_norm( - ConvTranspose1d(h["upsample_initial_channel"] // (2 ** i), h["upsample_initial_channel"] // (2 ** (i + 1)), - k, u, padding=(k - u) // 2))) - if i + 1 < len(h["upsample_rates"]): # - stride_f0 = np.prod(h["upsample_rates"][i + 1:]) - self.noise_convs.append(Conv1d( - 1, c_cur, kernel_size=stride_f0 * 2, stride=stride_f0, padding=stride_f0 // 2)) - else: - self.noise_convs.append(Conv1d(1, c_cur, kernel_size=1)) - self.resblocks = nn.ModuleList() - for i in range(len(self.ups)): - ch = h["upsample_initial_channel"] // (2 ** (i + 1)) - for j, (k, d) in enumerate(zip(h["resblock_kernel_sizes"], h["resblock_dilation_sizes"])): - self.resblocks.append(resblock(h, ch, k, d)) - - self.conv_post = weight_norm(Conv1d(ch, 1, 7, 1, padding=3)) - self.ups.apply(init_weights) - self.conv_post.apply(init_weights) - self.cond = nn.Conv1d(h['gin_channels'], h['upsample_initial_channel'], 1) - - def forward(self, x, f0, g=None): - # print(1,x.shape,f0.shape,f0[:, None].shape) - f0 = self.f0_upsamp(f0[:, None]).transpose(1, 2) # bs,n,t - # print(2,f0.shape) - har_source, noi_source, uv = self.m_source(f0) - har_source = har_source.transpose(1, 2) - x = self.conv_pre(x) - x = x + self.cond(g) - # print(124,x.shape,har_source.shape) - for i in range(self.num_upsamples): - x = F.leaky_relu(x, LRELU_SLOPE) - # print(3,x.shape) - x = self.ups[i](x) - x_source = self.noise_convs[i](har_source) - # print(4,x_source.shape,har_source.shape,x.shape) - x = x + x_source - xs = None - for j in range(self.num_kernels): - if xs is None: - xs = self.resblocks[i * self.num_kernels + j](x) - else: - xs += self.resblocks[i * self.num_kernels + j](x) - x = xs / self.num_kernels - x = F.leaky_relu(x) - x = self.conv_post(x) - x = torch.tanh(x) - - return x - - def remove_weight_norm(self): - print('Removing weight norm...') - for l in self.ups: - remove_weight_norm(l) - for l in self.resblocks: - l.remove_weight_norm() - remove_weight_norm(self.conv_pre) - remove_weight_norm(self.conv_post) - - -class DiscriminatorP(torch.nn.Module): - def __init__(self, period, kernel_size=5, stride=3, use_spectral_norm=False): - super(DiscriminatorP, self).__init__() - self.period = period - norm_f = weight_norm if use_spectral_norm == False else spectral_norm - self.convs = nn.ModuleList([ - norm_f(Conv2d(1, 32, (kernel_size, 1), (stride, 1), padding=(get_padding(5, 1), 0))), - norm_f(Conv2d(32, 128, (kernel_size, 1), (stride, 1), padding=(get_padding(5, 1), 0))), - norm_f(Conv2d(128, 512, (kernel_size, 1), (stride, 1), padding=(get_padding(5, 1), 0))), - norm_f(Conv2d(512, 1024, (kernel_size, 1), (stride, 1), padding=(get_padding(5, 1), 0))), - norm_f(Conv2d(1024, 1024, (kernel_size, 1), 1, padding=(2, 0))), - ]) - self.conv_post = norm_f(Conv2d(1024, 1, (3, 1), 1, padding=(1, 0))) - - def forward(self, x): - fmap = [] - - # 1d to 2d - b, c, t = x.shape - if t % self.period != 0: # pad first - n_pad = self.period - (t % self.period) - x = F.pad(x, (0, n_pad), "reflect") - t = t + n_pad - x = x.view(b, c, t // self.period, self.period) - - for l in self.convs: - x = l(x) - x = F.leaky_relu(x, LRELU_SLOPE) - fmap.append(x) - x = self.conv_post(x) - fmap.append(x) - x = torch.flatten(x, 1, -1) - - return x, fmap - - -class MultiPeriodDiscriminator(torch.nn.Module): - def __init__(self, periods=None): - super(MultiPeriodDiscriminator, self).__init__() - self.periods = periods if periods is not None else [2, 3, 5, 7, 11] - self.discriminators = nn.ModuleList() - for period in self.periods: - self.discriminators.append(DiscriminatorP(period)) - - def forward(self, y, y_hat): - y_d_rs = [] - y_d_gs = [] - fmap_rs = [] - fmap_gs = [] - for i, d in enumerate(self.discriminators): - y_d_r, fmap_r = d(y) - y_d_g, fmap_g = d(y_hat) - y_d_rs.append(y_d_r) - fmap_rs.append(fmap_r) - y_d_gs.append(y_d_g) - fmap_gs.append(fmap_g) - - return y_d_rs, y_d_gs, fmap_rs, fmap_gs - - -class DiscriminatorS(torch.nn.Module): - def __init__(self, use_spectral_norm=False): - super(DiscriminatorS, self).__init__() - norm_f = weight_norm if use_spectral_norm == False else spectral_norm - self.convs = nn.ModuleList([ - norm_f(Conv1d(1, 128, 15, 1, padding=7)), - norm_f(Conv1d(128, 128, 41, 2, groups=4, padding=20)), - norm_f(Conv1d(128, 256, 41, 2, groups=16, padding=20)), - norm_f(Conv1d(256, 512, 41, 4, groups=16, padding=20)), - norm_f(Conv1d(512, 1024, 41, 4, groups=16, padding=20)), - norm_f(Conv1d(1024, 1024, 41, 1, groups=16, padding=20)), - norm_f(Conv1d(1024, 1024, 5, 1, padding=2)), - ]) - self.conv_post = norm_f(Conv1d(1024, 1, 3, 1, padding=1)) - - def forward(self, x): - fmap = [] - for l in self.convs: - x = l(x) - x = F.leaky_relu(x, LRELU_SLOPE) - fmap.append(x) - x = self.conv_post(x) - fmap.append(x) - x = torch.flatten(x, 1, -1) - - return x, fmap - - -class MultiScaleDiscriminator(torch.nn.Module): - def __init__(self): - super(MultiScaleDiscriminator, self).__init__() - self.discriminators = nn.ModuleList([ - DiscriminatorS(use_spectral_norm=True), - DiscriminatorS(), - DiscriminatorS(), - ]) - self.meanpools = nn.ModuleList([ - AvgPool1d(4, 2, padding=2), - AvgPool1d(4, 2, padding=2) - ]) - - def forward(self, y, y_hat): - y_d_rs = [] - y_d_gs = [] - fmap_rs = [] - fmap_gs = [] - for i, d in enumerate(self.discriminators): - if i != 0: - y = self.meanpools[i - 1](y) - y_hat = self.meanpools[i - 1](y_hat) - y_d_r, fmap_r = d(y) - y_d_g, fmap_g = d(y_hat) - y_d_rs.append(y_d_r) - fmap_rs.append(fmap_r) - y_d_gs.append(y_d_g) - fmap_gs.append(fmap_g) - - return y_d_rs, y_d_gs, fmap_rs, fmap_gs - - -def feature_loss(fmap_r, fmap_g): - loss = 0 - for dr, dg in zip(fmap_r, fmap_g): - for rl, gl in zip(dr, dg): - loss += torch.mean(torch.abs(rl - gl)) - - return loss * 2 - - -def discriminator_loss(disc_real_outputs, disc_generated_outputs): - loss = 0 - r_losses = [] - g_losses = [] - for dr, dg in zip(disc_real_outputs, disc_generated_outputs): - r_loss = torch.mean((1 - dr) ** 2) - g_loss = torch.mean(dg ** 2) - loss += (r_loss + g_loss) - r_losses.append(r_loss.item()) - g_losses.append(g_loss.item()) - - return loss, r_losses, g_losses - - -def generator_loss(disc_outputs): - loss = 0 - gen_losses = [] - for dg in disc_outputs: - l = torch.mean((1 - dg) ** 2) - gen_losses.append(l) - loss += l - - return loss, gen_losses diff --git a/spaces/lambdalabs/LambdaSuperRes/KAIR/models/network_discriminator.py b/spaces/lambdalabs/LambdaSuperRes/KAIR/models/network_discriminator.py deleted file mode 100644 index 8542a36d7665fda79e9ca13024f93961d91db97d..0000000000000000000000000000000000000000 --- a/spaces/lambdalabs/LambdaSuperRes/KAIR/models/network_discriminator.py +++ /dev/null @@ -1,338 +0,0 @@ -import torch -import torch.nn as nn -from torch.nn import functional as F -from torch.nn.utils import spectral_norm -import models.basicblock as B -import functools -import numpy as np - - -""" -# -------------------------------------------- -# Discriminator_PatchGAN -# Discriminator_UNet -# -------------------------------------------- -""" - - -# -------------------------------------------- -# PatchGAN discriminator -# If n_layers = 3, then the receptive field is 70x70 -# -------------------------------------------- -class Discriminator_PatchGAN(nn.Module): - def __init__(self, input_nc=3, ndf=64, n_layers=3, norm_type='spectral'): - '''PatchGAN discriminator, receptive field = 70x70 if n_layers = 3 - Args: - input_nc: number of input channels - ndf: base channel number - n_layers: number of conv layer with stride 2 - norm_type: 'batch', 'instance', 'spectral', 'batchspectral', instancespectral' - Returns: - tensor: score - ''' - super(Discriminator_PatchGAN, self).__init__() - self.n_layers = n_layers - norm_layer = self.get_norm_layer(norm_type=norm_type) - - kw = 4 - padw = int(np.ceil((kw - 1.0) / 2)) - sequence = [[self.use_spectral_norm(nn.Conv2d(input_nc, ndf, kernel_size=kw, stride=2, padding=padw), norm_type), nn.LeakyReLU(0.2, True)]] - - nf = ndf - for n in range(1, n_layers): - nf_prev = nf - nf = min(nf * 2, 512) - sequence += [[self.use_spectral_norm(nn.Conv2d(nf_prev, nf, kernel_size=kw, stride=2, padding=padw), norm_type), - norm_layer(nf), - nn.LeakyReLU(0.2, True)]] - - nf_prev = nf - nf = min(nf * 2, 512) - sequence += [[self.use_spectral_norm(nn.Conv2d(nf_prev, nf, kernel_size=kw, stride=1, padding=padw), norm_type), - norm_layer(nf), - nn.LeakyReLU(0.2, True)]] - - sequence += [[self.use_spectral_norm(nn.Conv2d(nf, 1, kernel_size=kw, stride=1, padding=padw), norm_type)]] - - self.model = nn.Sequential() - for n in range(len(sequence)): - self.model.add_module('child' + str(n), nn.Sequential(*sequence[n])) - - self.model.apply(self.weights_init) - - def use_spectral_norm(self, module, norm_type='spectral'): - if 'spectral' in norm_type: - return spectral_norm(module) - return module - - def get_norm_layer(self, norm_type='instance'): - if 'batch' in norm_type: - norm_layer = functools.partial(nn.BatchNorm2d, affine=True) - elif 'instance' in norm_type: - norm_layer = functools.partial(nn.InstanceNorm2d, affine=False) - else: - norm_layer = functools.partial(nn.Identity) - return norm_layer - - def weights_init(self, m): - classname = m.__class__.__name__ - if classname.find('Conv') != -1: - m.weight.data.normal_(0.0, 0.02) - elif classname.find('BatchNorm2d') != -1: - m.weight.data.normal_(1.0, 0.02) - m.bias.data.fill_(0) - - def forward(self, x): - return self.model(x) - - -class Discriminator_UNet(nn.Module): - """Defines a U-Net discriminator with spectral normalization (SN)""" - - def __init__(self, input_nc=3, ndf=64): - super(Discriminator_UNet, self).__init__() - norm = spectral_norm - - self.conv0 = nn.Conv2d(input_nc, ndf, kernel_size=3, stride=1, padding=1) - - self.conv1 = norm(nn.Conv2d(ndf, ndf * 2, 4, 2, 1, bias=False)) - self.conv2 = norm(nn.Conv2d(ndf * 2, ndf * 4, 4, 2, 1, bias=False)) - self.conv3 = norm(nn.Conv2d(ndf * 4, ndf * 8, 4, 2, 1, bias=False)) - # upsample - self.conv4 = norm(nn.Conv2d(ndf * 8, ndf * 4, 3, 1, 1, bias=False)) - self.conv5 = norm(nn.Conv2d(ndf * 4, ndf * 2, 3, 1, 1, bias=False)) - self.conv6 = norm(nn.Conv2d(ndf * 2, ndf, 3, 1, 1, bias=False)) - - # extra - self.conv7 = norm(nn.Conv2d(ndf, ndf, 3, 1, 1, bias=False)) - self.conv8 = norm(nn.Conv2d(ndf, ndf, 3, 1, 1, bias=False)) - - self.conv9 = nn.Conv2d(ndf, 1, 3, 1, 1) - print('using the UNet discriminator') - - def forward(self, x): - x0 = F.leaky_relu(self.conv0(x), negative_slope=0.2, inplace=True) - x1 = F.leaky_relu(self.conv1(x0), negative_slope=0.2, inplace=True) - x2 = F.leaky_relu(self.conv2(x1), negative_slope=0.2, inplace=True) - x3 = F.leaky_relu(self.conv3(x2), negative_slope=0.2, inplace=True) - - # upsample - x3 = F.interpolate(x3, scale_factor=2, mode='bilinear', align_corners=False) - x4 = F.leaky_relu(self.conv4(x3), negative_slope=0.2, inplace=True) - - x4 = x4 + x2 - x4 = F.interpolate(x4, scale_factor=2, mode='bilinear', align_corners=False) - x5 = F.leaky_relu(self.conv5(x4), negative_slope=0.2, inplace=True) - - x5 = x5 + x1 - x5 = F.interpolate(x5, scale_factor=2, mode='bilinear', align_corners=False) - x6 = F.leaky_relu(self.conv6(x5), negative_slope=0.2, inplace=True) - - x6 = x6 + x0 - - # extra - out = F.leaky_relu(self.conv7(x6), negative_slope=0.2, inplace=True) - out = F.leaky_relu(self.conv8(out), negative_slope=0.2, inplace=True) - out = self.conv9(out) - - return out - - -# -------------------------------------------- -# VGG style Discriminator with 96x96 input -# -------------------------------------------- -class Discriminator_VGG_96(nn.Module): - def __init__(self, in_nc=3, base_nc=64, ac_type='BL'): - super(Discriminator_VGG_96, self).__init__() - # features - # hxw, c - # 96, 64 - conv0 = B.conv(in_nc, base_nc, kernel_size=3, mode='C') - conv1 = B.conv(base_nc, base_nc, kernel_size=4, stride=2, mode='C'+ac_type) - # 48, 64 - conv2 = B.conv(base_nc, base_nc*2, kernel_size=3, stride=1, mode='C'+ac_type) - conv3 = B.conv(base_nc*2, base_nc*2, kernel_size=4, stride=2, mode='C'+ac_type) - # 24, 128 - conv4 = B.conv(base_nc*2, base_nc*4, kernel_size=3, stride=1, mode='C'+ac_type) - conv5 = B.conv(base_nc*4, base_nc*4, kernel_size=4, stride=2, mode='C'+ac_type) - # 12, 256 - conv6 = B.conv(base_nc*4, base_nc*8, kernel_size=3, stride=1, mode='C'+ac_type) - conv7 = B.conv(base_nc*8, base_nc*8, kernel_size=4, stride=2, mode='C'+ac_type) - # 6, 512 - conv8 = B.conv(base_nc*8, base_nc*8, kernel_size=3, stride=1, mode='C'+ac_type) - conv9 = B.conv(base_nc*8, base_nc*8, kernel_size=4, stride=2, mode='C'+ac_type) - # 3, 512 - self.features = B.sequential(conv0, conv1, conv2, conv3, conv4, - conv5, conv6, conv7, conv8, conv9) - - # classifier - self.classifier = nn.Sequential( - nn.Linear(512 * 3 * 3, 100), nn.LeakyReLU(0.2, True), nn.Linear(100, 1)) - - def forward(self, x): - x = self.features(x) - x = x.view(x.size(0), -1) - x = self.classifier(x) - return x - - -# -------------------------------------------- -# VGG style Discriminator with 128x128 input -# -------------------------------------------- -class Discriminator_VGG_128(nn.Module): - def __init__(self, in_nc=3, base_nc=64, ac_type='BL'): - super(Discriminator_VGG_128, self).__init__() - # features - # hxw, c - # 128, 64 - conv0 = B.conv(in_nc, base_nc, kernel_size=3, mode='C') - conv1 = B.conv(base_nc, base_nc, kernel_size=4, stride=2, mode='C'+ac_type) - # 64, 64 - conv2 = B.conv(base_nc, base_nc*2, kernel_size=3, stride=1, mode='C'+ac_type) - conv3 = B.conv(base_nc*2, base_nc*2, kernel_size=4, stride=2, mode='C'+ac_type) - # 32, 128 - conv4 = B.conv(base_nc*2, base_nc*4, kernel_size=3, stride=1, mode='C'+ac_type) - conv5 = B.conv(base_nc*4, base_nc*4, kernel_size=4, stride=2, mode='C'+ac_type) - # 16, 256 - conv6 = B.conv(base_nc*4, base_nc*8, kernel_size=3, stride=1, mode='C'+ac_type) - conv7 = B.conv(base_nc*8, base_nc*8, kernel_size=4, stride=2, mode='C'+ac_type) - # 8, 512 - conv8 = B.conv(base_nc*8, base_nc*8, kernel_size=3, stride=1, mode='C'+ac_type) - conv9 = B.conv(base_nc*8, base_nc*8, kernel_size=4, stride=2, mode='C'+ac_type) - # 4, 512 - self.features = B.sequential(conv0, conv1, conv2, conv3, conv4, - conv5, conv6, conv7, conv8, conv9) - - # classifier - self.classifier = nn.Sequential(nn.Linear(512 * 4 * 4, 100), - nn.LeakyReLU(0.2, True), - nn.Linear(100, 1)) - - def forward(self, x): - x = self.features(x) - x = x.view(x.size(0), -1) - x = self.classifier(x) - return x - - -# -------------------------------------------- -# VGG style Discriminator with 192x192 input -# -------------------------------------------- -class Discriminator_VGG_192(nn.Module): - def __init__(self, in_nc=3, base_nc=64, ac_type='BL'): - super(Discriminator_VGG_192, self).__init__() - # features - # hxw, c - # 192, 64 - conv0 = B.conv(in_nc, base_nc, kernel_size=3, mode='C') - conv1 = B.conv(base_nc, base_nc, kernel_size=4, stride=2, mode='C'+ac_type) - # 96, 64 - conv2 = B.conv(base_nc, base_nc*2, kernel_size=3, stride=1, mode='C'+ac_type) - conv3 = B.conv(base_nc*2, base_nc*2, kernel_size=4, stride=2, mode='C'+ac_type) - # 48, 128 - conv4 = B.conv(base_nc*2, base_nc*4, kernel_size=3, stride=1, mode='C'+ac_type) - conv5 = B.conv(base_nc*4, base_nc*4, kernel_size=4, stride=2, mode='C'+ac_type) - # 24, 256 - conv6 = B.conv(base_nc*4, base_nc*8, kernel_size=3, stride=1, mode='C'+ac_type) - conv7 = B.conv(base_nc*8, base_nc*8, kernel_size=4, stride=2, mode='C'+ac_type) - # 12, 512 - conv8 = B.conv(base_nc*8, base_nc*8, kernel_size=3, stride=1, mode='C'+ac_type) - conv9 = B.conv(base_nc*8, base_nc*8, kernel_size=4, stride=2, mode='C'+ac_type) - # 6, 512 - conv10 = B.conv(base_nc*8, base_nc*8, kernel_size=3, stride=1, mode='C'+ac_type) - conv11 = B.conv(base_nc*8, base_nc*8, kernel_size=4, stride=2, mode='C'+ac_type) - # 3, 512 - self.features = B.sequential(conv0, conv1, conv2, conv3, conv4, conv5, - conv6, conv7, conv8, conv9, conv10, conv11) - - # classifier - self.classifier = nn.Sequential(nn.Linear(512 * 3 * 3, 100), - nn.LeakyReLU(0.2, True), - nn.Linear(100, 1)) - - def forward(self, x): - x = self.features(x) - x = x.view(x.size(0), -1) - x = self.classifier(x) - return x - - -# -------------------------------------------- -# SN-VGG style Discriminator with 128x128 input -# -------------------------------------------- -class Discriminator_VGG_128_SN(nn.Module): - def __init__(self): - super(Discriminator_VGG_128_SN, self).__init__() - # features - # hxw, c - # 128, 64 - self.lrelu = nn.LeakyReLU(0.2, True) - - self.conv0 = spectral_norm(nn.Conv2d(3, 64, 3, 1, 1)) - self.conv1 = spectral_norm(nn.Conv2d(64, 64, 4, 2, 1)) - # 64, 64 - self.conv2 = spectral_norm(nn.Conv2d(64, 128, 3, 1, 1)) - self.conv3 = spectral_norm(nn.Conv2d(128, 128, 4, 2, 1)) - # 32, 128 - self.conv4 = spectral_norm(nn.Conv2d(128, 256, 3, 1, 1)) - self.conv5 = spectral_norm(nn.Conv2d(256, 256, 4, 2, 1)) - # 16, 256 - self.conv6 = spectral_norm(nn.Conv2d(256, 512, 3, 1, 1)) - self.conv7 = spectral_norm(nn.Conv2d(512, 512, 4, 2, 1)) - # 8, 512 - self.conv8 = spectral_norm(nn.Conv2d(512, 512, 3, 1, 1)) - self.conv9 = spectral_norm(nn.Conv2d(512, 512, 4, 2, 1)) - # 4, 512 - - # classifier - self.linear0 = spectral_norm(nn.Linear(512 * 4 * 4, 100)) - self.linear1 = spectral_norm(nn.Linear(100, 1)) - - def forward(self, x): - x = self.lrelu(self.conv0(x)) - x = self.lrelu(self.conv1(x)) - x = self.lrelu(self.conv2(x)) - x = self.lrelu(self.conv3(x)) - x = self.lrelu(self.conv4(x)) - x = self.lrelu(self.conv5(x)) - x = self.lrelu(self.conv6(x)) - x = self.lrelu(self.conv7(x)) - x = self.lrelu(self.conv8(x)) - x = self.lrelu(self.conv9(x)) - x = x.view(x.size(0), -1) - x = self.lrelu(self.linear0(x)) - x = self.linear1(x) - return x - - -if __name__ == '__main__': - - x = torch.rand(1, 3, 96, 96) - net = Discriminator_VGG_96() - net.eval() - with torch.no_grad(): - y = net(x) - print(y.size()) - - x = torch.rand(1, 3, 128, 128) - net = Discriminator_VGG_128() - net.eval() - with torch.no_grad(): - y = net(x) - print(y.size()) - - x = torch.rand(1, 3, 192, 192) - net = Discriminator_VGG_192() - net.eval() - with torch.no_grad(): - y = net(x) - print(y.size()) - - x = torch.rand(1, 3, 128, 128) - net = Discriminator_VGG_128_SN() - net.eval() - with torch.no_grad(): - y = net(x) - print(y.size()) - - # run models/network_discriminator.py diff --git a/spaces/lauraibnz/midi-audioldm/README.md b/spaces/lauraibnz/midi-audioldm/README.md deleted file mode 100644 index 75264bf4537077a695a040e4753cbe4375f98ad4..0000000000000000000000000000000000000000 --- a/spaces/lauraibnz/midi-audioldm/README.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -title: MIDI-AudioLDM -emoji: 🎹 -colorFrom: blue -colorTo: purple -sdk: gradio -sdk_version: 3.27.0 -app_file: app.py -pinned: false -license: mit ---- - -Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference diff --git a/spaces/lcipolina/Print_Gallery/glide_text2im/tokenizer/bpe.py b/spaces/lcipolina/Print_Gallery/glide_text2im/tokenizer/bpe.py deleted file mode 100644 index 5dcd56586a9c7bd974c1dd264152ecb70f909619..0000000000000000000000000000000000000000 --- a/spaces/lcipolina/Print_Gallery/glide_text2im/tokenizer/bpe.py +++ /dev/null @@ -1,151 +0,0 @@ -""" -Byte pair encoding utilities adapted from: -https://github.com/openai/gpt-2/blob/master/src/encoder.py -""" - -import gzip -import json -import os -from functools import lru_cache -from typing import List, Tuple - -import regex as re - - -@lru_cache() -def bytes_to_unicode(): - """ - Returns list of utf-8 byte and a corresponding list of unicode strings. - The reversible bpe codes work on unicode strings. - This means you need a large # of unicode characters in your vocab if you want to avoid UNKs. - When you're at something like a 10B token dataset you end up needing around 5K for decent coverage. - This is a signficant percentage of your normal, say, 32K bpe vocab. - To avoid that, we want lookup tables between utf-8 bytes and unicode strings. - And avoids mapping to whitespace/control characters the bpe code barfs on. - """ - bs = ( - list(range(ord("!"), ord("~") + 1)) - + list(range(ord("¡"), ord("¬") + 1)) - + list(range(ord("®"), ord("ÿ") + 1)) - ) - cs = bs[:] - n = 0 - for b in range(2 ** 8): - if b not in bs: - bs.append(b) - cs.append(2 ** 8 + n) - n += 1 - cs = [chr(n) for n in cs] - return dict(zip(bs, cs)) - - -def get_pairs(word): - """Return set of symbol pairs in a word. - Word is represented as tuple of symbols (symbols being variable-length strings). - """ - pairs = set() - prev_char = word[0] - for char in word[1:]: - pairs.add((prev_char, char)) - prev_char = char - return pairs - - -class Encoder: - def __init__(self, encoder, bpe_merges, errors="replace"): - self.encoder = encoder - self.decoder = {v: k for k, v in self.encoder.items()} - self.errors = errors # how to handle errors in decoding - self.byte_encoder = bytes_to_unicode() - self.byte_decoder = {v: k for k, v in self.byte_encoder.items()} - self.bpe_ranks = dict(zip(bpe_merges, range(len(bpe_merges)))) - self.cache = {} - - # Should haved added re.IGNORECASE so BPE merges can happen for capitalized versions of contractions - self.pat = re.compile( - r"""'s|'t|'re|'ve|'m|'ll|'d| ?\p{L}+| ?\p{N}+| ?[^\s\p{L}\p{N}]+|\s+(?!\S)|\s+""" - ) - - @property - def n_vocab(self) -> int: - return len(self.encoder) - - @property - def end_token(self) -> int: - return self.n_vocab - 1 - - def padded_tokens_and_mask( - self, tokens: List[int], text_ctx: int - ) -> Tuple[List[int], List[bool]]: - tokens = tokens[:text_ctx] - padding = text_ctx - len(tokens) - padded_tokens = tokens + [self.end_token] * padding - mask = [True] * len(tokens) + [False] * padding - return padded_tokens, mask - - def bpe(self, token): - if token in self.cache: - return self.cache[token] - word = tuple(token) - pairs = get_pairs(word) - - if not pairs: - return token - - while True: - bigram = min(pairs, key=lambda pair: self.bpe_ranks.get(pair, float("inf"))) - if bigram not in self.bpe_ranks: - break - first, second = bigram - new_word = [] - i = 0 - while i < len(word): - try: - j = word.index(first, i) - new_word.extend(word[i:j]) - i = j - except: # pylint: disable=bare-except - new_word.extend(word[i:]) - break - - if word[i] == first and i < len(word) - 1 and word[i + 1] == second: - new_word.append(first + second) - i += 2 - else: - new_word.append(word[i]) - i += 1 - new_word = tuple(new_word) - word = new_word - if len(word) == 1: - break - else: - pairs = get_pairs(word) - word = " ".join(word) - self.cache[token] = word - return word - - def encode(self, text): - text = text.lower() - bpe_tokens = [] - for token in re.findall(self.pat, text): - token = "".join(self.byte_encoder[b] for b in token.encode("utf-8")) - bpe_tokens.extend(self.encoder[bpe_token] for bpe_token in self.bpe(token).split(" ")) - return bpe_tokens - - def decode(self, tokens): - text = "".join([self.decoder[token] for token in tokens]) - text = bytearray([self.byte_decoder[c] for c in text]).decode("utf-8", errors=self.errors) - return text - - -def get_encoder(): - root_dir = os.path.dirname(os.path.abspath(__file__)) - with gzip.open(os.path.join(root_dir, "encoder.json.gz"), "r") as f: - encoder = json.load(f) - with gzip.open(os.path.join(root_dir, "vocab.bpe.gz"), "r") as f: - bpe_data = str(f.read(), "utf-8") - bpe_merges = [tuple(merge_str.split()) for merge_str in bpe_data.split("\n")[1:-1]] - return Encoder( - encoder=encoder, - bpe_merges=bpe_merges, - ) diff --git a/spaces/leogabraneth/text-generation-webui-main/extensions/superboogav2/README.md b/spaces/leogabraneth/text-generation-webui-main/extensions/superboogav2/README.md deleted file mode 100644 index d25b3a5eb96a92bcbc78e008b1ef7826bad43c3e..0000000000000000000000000000000000000000 --- a/spaces/leogabraneth/text-generation-webui-main/extensions/superboogav2/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# superboogav2 - -For a description, please see the comments in this Pull Request: - -https://github.com/oobabooga/text-generation-webui/pull/3272 diff --git a/spaces/lewispons/GrammarGuru/src/models/predict_model.py b/spaces/lewispons/GrammarGuru/src/models/predict_model.py deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/spaces/lincquiQcaudo/Top-20-Diffusion/Codigodevalidacionpararhinoceros [TOP].md b/spaces/lincquiQcaudo/Top-20-Diffusion/Codigodevalidacionpararhinoceros [TOP].md deleted file mode 100644 index 8768c6a12c059bd48686d27e453eaeb9e4febd63..0000000000000000000000000000000000000000 --- a/spaces/lincquiQcaudo/Top-20-Diffusion/Codigodevalidacionpararhinoceros [TOP].md +++ /dev/null @@ -1,6 +0,0 @@ -

      Codigodevalidacionpararhinoceros


      Download File ✪✪✪ https://bytlly.com/2uGwTR



      -
      -Comandosde rhinoceros Víctor Orrego Lista de comandos Nuevo en Rhino 5 Números 3DFACE Dibuja una sola cara de malla. ... de edición en la ventana para cambiar el Comandosde rhinoceros ... Código abreviado de WordPress ... DigCalibrate Validar mediciones digitalizador contra un modelo. 4d29de3e1b
      -
      -
      -

      diff --git a/spaces/lmangani/chdb/public/play.html b/spaces/lmangani/chdb/public/play.html deleted file mode 100644 index 1b8663fc25d73630442e3fbe3b6efe9c24a2bab4..0000000000000000000000000000000000000000 --- a/spaces/lmangani/chdb/public/play.html +++ /dev/null @@ -1,1079 +0,0 @@ - - - - - - chDB - - - - - - - - - -
      -
      - -
      -
      - -
      -
      - -  (Ctrl/Cmd+Enter) - - - - 🌑🌞 -
      -
      -
      -
      -
      
      -    
      -
      - -

      -

      -

      - - - - diff --git a/spaces/lunarflu/HuggingMod/app.py b/spaces/lunarflu/HuggingMod/app.py deleted file mode 100644 index cf8123bc4238733d0961224a02ab685c9ffbe1b1..0000000000000000000000000000000000000000 --- a/spaces/lunarflu/HuggingMod/app.py +++ /dev/null @@ -1,396 +0,0 @@ -import discord -import os -import threading -import gradio as gr -import requests -import json -import random -import time -import re -from discord import Embed, Color -from discord.ext import commands -from gradio_client import Client -from PIL import Image -from ratelimiter import RateLimiter -from datetime import datetime # for times -from pytz import timezone # for times -import asyncio # check if used - -zurich_tz = timezone("Europe/Zurich") - -def convert_to_timezone(dt, tz): - return dt.astimezone(tz).strftime("%Y-%m-%d %H:%M:%S %Z") - -DISCORD_TOKEN = os.environ.get("DISCORD_TOKEN", None) -intents = discord.Intents.all() -bot = commands.Bot(command_prefix='!', intents=intents) - -#rate_limiter = RateLimiter(max_calls=10, period=60) # needs testing - -# stats stuff --------------------------------------------------------------------------------------------------------------------------------------------------------- -number_of_messages = 0 -user_cooldowns = {} - -@bot.event -async def on_message(message): - try: - global number_of_messages - if message.author != bot.user: - lunarflu = bot.get_user(811235357663297546) #811235357663297546 - cakiki = bot.get_user(416019758492680203) - - """Backup""" - number_of_messages = number_of_messages + 1 - message_link = f"[#{message.channel.name}]({message.jump_url})" - dm_message = await lunarflu.send(f"{number_of_messages}| {message_link} |{message.author}: {message.content}") - - """Antispam""" - #Detecting certain unwanted strings - try: - forbidden_strings = ["@everyone", "@here", "discord.gg", "discord.com/invite", "discord.com", "discord-premium"] - if any(string.lower() in message.content.lower() for string in forbidden_strings): - ignored_role_ids = [897381378172264449, 897376942817419265] #admins, huggingfolks - if any(role.id in ignored_role_ids for role in message.author.roles): - if message.author != lunarflu: - return - dm_unwanted = await lunarflu.send(f" {lunarflu.mention} [experimental] SUSPICIOUS MESSAGE: {message_link} | {message.author}: {message.content}") - dm_unwanted = await cakiki.send(f" {cakiki.mention} [experimental] SUSPICIOUS MESSAGE: {message_link} | {message.author}: {message.content}") - except Exception as e: - print(f"Antispam->Detecting certain unwanted strings Error: {e}") - - #Posting too fast - cooldown_duration = 3 # messages per n seconds, was 1, now 3, could try 5 - if message.author.id not in user_cooldowns: - user_cooldowns[message.author.id] = {'count': 1, 'timestamp': message.created_at} - else: - if (message.created_at - user_cooldowns[message.author.id]['timestamp']).total_seconds() > cooldown_duration: - var1 = message.created_at - var2 = user_cooldowns[message.author.id]['timestamp'] - print(f"seconds since last message by {message.author}: ({var1} - {var2}).seconds = {(var1 - var2).total_seconds()}") - - # if we wait longer than cooldown_duration, count will reset - user_cooldowns[message.author.id] = {'count': 1, 'timestamp': message.created_at} - else: - user_cooldowns[message.author.id]['count'] += 1 - - # tldr; if we post 2 messages with less than 1s between them - if user_cooldowns[message.author.id]['count'] > 3: # 4 in a row, helps avoid false positives for posting in threads - var1 = message.created_at - var2 = user_cooldowns[message.author.id]['timestamp'] - print(f"seconds since last message by {message.author}: {(var1 - var2).total_seconds()}") - spam_count = user_cooldowns[message.author.id]['count'] - print(f"count: {user_cooldowns[message.author.id]['count']}") - - test_server = os.environ.get('TEST_SERVER') - if test_server == 'True': - alert = "<@&1106995261487710411>" # test @alerts role - if test_server == 'False': - alert = "<@&1108342563628404747>" # normal @alerts role - - await bot.log_channel.send( - f"[EXPERIMENTAL ALERT] {message.author} may be posting too quickly! \n" - f"Spam count: {user_cooldowns[message.author.id]['count']}\n" - f"Message content: {message.content}\n" - f"[Jump to message!](https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id})\n" - f"{alert}" - ) - await cakiki.send( - f"[EXPERIMENTAL ALERT] {message.author} may be posting too quickly! \n" - f"Spam count: {user_cooldowns[message.author.id]['count']}\n" - f"Message content: {message.content}\n" - f"[Jump to message!](https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id})\n" - ) - """ - if user_cooldowns[message.author.id]['count']/5 > cooldown_duration: - # ping admins - # timeout for user - # kick user - """ - user_cooldowns[message.author.id]['timestamp'] = message.created_at - - await bot.process_commands(message) - - except Exception as e: - print(f"on_message Error: {e}") - -# moderation stuff----------------------------------------------------------------------------------------------------------------------------------------------------- - -@bot.event -async def on_message_edit(before, after): - try: - if before.author == bot.user: - return - - if before.content != after.content: - embed = Embed(color=Color.orange()) - embed.set_author(name=f"{before.author} ID: {before.author.id}", icon_url=before.author.avatar.url if before.author.avatar else bot.user.avatar.url) - embed.title = "Message Edited" - embed.description = f"**Before:** {before.content or '*(empty message)*'}\n**After:** {after.content or '*(empty message)*'}" - embed.add_field(name="Author Username", value=before.author.name, inline=True) - embed.add_field(name="Channel", value=before.channel.mention, inline=True) - #embed.add_field(name="Message Created On", value=before.created_at.strftime("%Y-%m-%d %H:%M:%S UTC"), inline=True) - embed.add_field(name="Message Created On", value=convert_to_timezone(before.created_at, zurich_tz), inline=True) - embed.add_field(name="Message ID", value=before.id, inline=True) - embed.add_field(name="Message Jump URL", value=f"[Jump to message!](https://discord.com/channels/{before.guild.id}/{before.channel.id}/{before.id})", inline=True) - if before.attachments: - attachment_urls = "\n".join([attachment.url for attachment in before.attachments]) - embed.add_field(name="Attachments", value=attachment_urls, inline=False) - #embed.set_footer(text=f"{datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S UTC')}") - embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}") - await bot.log_channel.send(embed=embed) - - except Exception as e: - print(f"on_message_edit Error: {e}") - -@bot.event -async def on_message_delete(message): - try: - if message.author == bot.user: - return - - embed = Embed(color=Color.red()) - embed.set_author(name=f"{message.author} ID: {message.author.id}", icon_url=message.author.avatar.url if message.author.avatar else bot.user.avatar.url) - embed.title = "Message Deleted" - embed.description = message.content or "*(empty message)*" - embed.add_field(name="Author Username", value=message.author.name, inline=True) - embed.add_field(name="Channel", value=message.channel.mention, inline=True) - #embed.add_field(name="Message Created On", value=message.created_at.strftime("%Y-%m-%d %H:%M:%S UTC"), inline=True) - embed.add_field(name="Message Created On", value=convert_to_timezone(message.created_at, zurich_tz), inline=True) - embed.add_field(name="Message ID", value=message.id, inline=True) - embed.add_field(name="Message Jump URL", value=f"[Jump to message!](https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id})", inline=True) - if message.attachments: - attachment_urls = "\n".join([attachment.url for attachment in message.attachments]) - embed.add_field(name="Attachments", value=attachment_urls, inline=False) - #embed.set_footer(text=f"{datetime.utcnow().strftime('%Y-%m-%d %H:%M:%S UTC')}") - embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}") - await bot.log_channel.send(embed=embed) - - except Exception as e: - print(f"on_message_delete Error: {e}") - -# nickname stuff --------------------------------------------------------------------------------------------------------------------------- -@bot.event -async def on_member_update(before, after): - try: - """ - if before.name != after.name: - async for entry in before.guild.audit_logs(limit=5): - print(f'{entry.user} did {entry.action} to {entry.target}') - """ - if before.nick != after.nick: - embed = Embed(color=Color.orange()) - embed.set_author(name=f"{after} ID: {after.id}", icon_url=after.avatar.url if after.avatar else bot.user.avatar.url) - embed.title = "Nickname Modified" - embed.add_field(name="Mention", value=after.mention, inline=True) - embed.add_field(name="Old", value=before.nick, inline=True) - embed.add_field(name="New", value=after.nick, inline=True) - embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}") - await bot.log_channel.send(embed=embed) - - except Exception as e: - print(f"on_member_update Error: {e}") - - -@bot.event -async def on_member_ban(guild, banned_user): - try: - await asyncio.sleep(1) - entry1 = await guild.fetch_ban(banned_user) - ban_reason = entry1.reason - print(f"ban_reason: {ban_reason}") - - async for entry2 in guild.audit_logs(action=discord.AuditLogAction.ban, limit=1): - if ban_reason: - print(f'{entry2.user} banned {entry2.target} for {ban_reason}') - else: - print(f'{entry2.user} banned {entry2.target} (no reason specified)') - - content = "<@&1108342563628404747>" # @alerts role - embed = Embed(color=Color.red()) - embed.set_author(name=f"{entry2.target} ID: {entry2.target.id}", icon_url=entry2.target.avatar.url if entry2.target.avatar else bot.user.avatar.url) - embed.title = "User Banned" - embed.add_field(name="User", value=entry2.target.mention, inline=True) - #nickname = entry2.target.nick if entry2.target.nick else "None" - #embed.add_field(name="Nickname", value=nicknmae, inline=True) - #embed.add_field(name="Account Created At", value=entry2.target.created_at, inline=True) - embed.add_field(name="Moderator", value=entry2.user.mention, inline=True) - embed.add_field(name="Nickname", value=entry2.user.nick, inline=True) - embed.add_field(name="Reason", value=ban_reason, inline=False) - embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}") - - #user = bot.get_user(811235357663297546) - #dm_message = await user.send(content=content, embed=embed) - await bot.log_channel.send(content=content, embed=embed) - - except Exception as e: - print(f"on_member_ban Error: {e}") - - -@bot.event -async def on_member_unban(guild, unbanned_user): - try: - await asyncio.sleep(5) - async for entry in guild.audit_logs(action=discord.AuditLogAction.unban, limit=1): - if unbanned_user == entry.target: # verify that unbanned user is in audit log - moderator = entry.user - - created_and_age = f"{unbanned_user.created_at}" - content = "<@&1108342563628404747>" # @alerts role - embed = Embed(color=Color.red()) - embed.set_author(name=f"{unbanned_user} ID: {unbanned_user.id}", icon_url=unbanned_user.avatar.url if unbanned_user.avatar else bot.user.avatar.url) - embed.title = "User Unbanned" - embed.add_field(name="User", value=unbanned_user.mention, inline=True) - embed.add_field(name="Account Created At", value=created_and_age, inline=True) - embed.add_field(name="Moderator", value=moderator.mention, inline=True) - embed.add_field(name="Nickname", value=moderator.nick, inline=True) - embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}") - - #user = bot.get_user(811235357663297546) - #dm_message = await user.send(content=content, embed=embed) - await bot.log_channel.send(content=content, embed=embed) - - except Exception as e: - print(f"on_member_unban Error: {e}") - -# admin stuff----------------------------------------------------------------------------------------------------------------------- - - -@bot.event -async def on_member_join(member): - try: - await asyncio.sleep(5) - embed = Embed(color=Color.blue()) - avatar_url = member.avatar.url if member.avatar else bot.user.avatar.url - embed.set_author(name=f"{member} ID: {member.id}", icon_url=avatar_url) - embed.title = "User Joined" - embed.add_field(name="Mention", value=member.mention, inline=True) - embed.add_field(name="Nickname", value=member.nick, inline=True) - embed.add_field(name="Account Created At", value=member.created_at, inline=True) - embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}") - await bot.log_channel.send(embed=embed) - - except Exception as e: - print(f"on_member_join Error: {e}") - - -@bot.event -async def on_member_remove(member): - try: - embed = Embed(color=Color.blue()) - embed.set_author(name=f"{member} ID: {member.id}", icon_url=member.avatar.url if member.avatar else bot.user.avatar.url) - embed.title = "User Left" - embed.add_field(name="Mention", value=member.mention, inline=True) - embed.add_field(name="Nickname", value=member.nick, inline=True) - embed.add_field(name="Account Created At", value=member.created_at, inline=True) - embed.set_footer(text=f"{convert_to_timezone(datetime.utcnow(), zurich_tz)}") - await bot.log_channel.send(embed=embed) - - except Exception as e: - print(f"on_member_remove Error: {e}") - - -@bot.event -async def on_guild_channel_create(channel): - try: - # creating channels - embed = Embed(description=f'Channel {channel.mention} was created', color=Color.green()) - await bot.log_channel.send(embed=embed) - except Exception as e: - print(f"on_guild_channel_create Error: {e}") - - -@bot.event -async def on_guild_channel_delete(channel): - try: - # deleting channels, should ping @alerts for this - embed = Embed(description=f'Channel {channel.name} ({channel.mention}) was deleted', color=Color.red()) - await bot.log_channel.send(embed=embed) - except Exception as e: - print(f"on_guild_channel_delete Error: {e}") - - -@bot.event -async def on_guild_role_create(role): - try: - # creating roles - embed = Embed(description=f'Role {role.mention} was created', color=Color.green()) - await bot.log_channel.send(embed=embed) - except Exception as e: - print(f"on_guild_role_create Error: {e}") - - -@bot.event -async def on_guild_role_delete(role): - try: - # deleting roles, should ping @alerts for this - embed = Embed(description=f'Role {role.name} ({role.mention}) was deleted', color=Color.red()) - await bot.log_channel.send(embed=embed) - except Exception as e: - print(f"on_guild_role_delete Error: {e}") - - -@bot.event -async def on_guild_role_update(before, after): - try: - # editing roles, could expand this - if before.name != after.name: - embed = Embed(description=f'Role {before.mention} was renamed to {after.name}', color=Color.orange()) - await bot.log_channel.send(embed=embed) - - if before.permissions.administrator != after.permissions.administrator: - # changes involving the administrator permission / sensitive permissions (can help to prevent mistakes) - content = "<@&1108342563628404747>" # @alerts role - embed = Embed(description=f'Role {after.mention} had its administrator permission {"enabled" if after.permissions.administrator else "disabled"}', color=Color.red()) - await bot.log_channel.send(content=content, embed=embed) - except Exception as e: - print(f"on_guild_role_update Error: {e}") - - -@bot.event -async def on_voice_state_update(member, before, after): - try: - if before.mute != after.mute: - # muting members - embed = Embed(description=f'{member} was {"muted" if after.mute else "unmuted"} in voice chat', color=Color.orange()) - await bot.log_channel.send(embed=embed) - - if before.deaf != after.deaf: - # deafening members - embed = Embed(description=f'{member} was {"deafened" if after.deaf else "undeafened"} in voice chat', color=Color.orange()) - await bot.log_channel.send(embed=embed) - except Exception as e: - print(f"on_voice_state_update Error: {e}") - -# github test stuff ------------------------------------------------------------------------------------------------------------------- -""" -async def check_github(): - url = f'https://api.github.com/repos/{github_repo}/pulls' - response = requests.get(url) - pulls = response.json() - - for pull in pulls: - # Check if the pull request was just opened - if pull['state'] == 'open' and pull['created_at'] == pull['updated_at']: - channel = client.get_channel(channel_id) - if channel: - await channel.send(f'New PR opened: {pull["title"]}') -""" -# bot stuff --------------------------------------------------------------------------------------------------------------------------- - -@bot.event -async def on_ready(): - print('Logged on as', bot.user) - bot.log_channel = bot.get_channel(1036960509586587689) # admin-logs - print(bot.log_channel) - - -def run_bot(): - bot.run(DISCORD_TOKEN) - -threading.Thread(target=run_bot).start() - -def greet(name): - return "Hello " + name + "!" - -demo = gr.Interface(fn=greet, inputs="text", outputs="text") -demo.launch() diff --git a/spaces/luxuedong/lxd/src/components/ui/codeblock.tsx b/spaces/luxuedong/lxd/src/components/ui/codeblock.tsx deleted file mode 100644 index aabda4e3b59f4e36b6ab79feb19d8d18b70e881b..0000000000000000000000000000000000000000 --- a/spaces/luxuedong/lxd/src/components/ui/codeblock.tsx +++ /dev/null @@ -1,142 +0,0 @@ -'use client' - -import { FC, memo } from 'react' -import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' -import { coldarkDark } from 'react-syntax-highlighter/dist/cjs/styles/prism' - -import { useCopyToClipboard } from '@/lib/hooks/use-copy-to-clipboard' -import { IconCheck, IconCopy, IconDownload } from '@/components/ui/icons' -import { Button } from '@/components/ui/button' - -interface Props { - language: string - value: string -} - -interface languageMap { - [key: string]: string | undefined -} - -export const programmingLanguages: languageMap = { - javascript: '.js', - python: '.py', - java: '.java', - c: '.c', - cpp: '.cpp', - 'c++': '.cpp', - 'c#': '.cs', - ruby: '.rb', - php: '.php', - swift: '.swift', - 'objective-c': '.m', - kotlin: '.kt', - typescript: '.ts', - go: '.go', - perl: '.pl', - rust: '.rs', - scala: '.scala', - haskell: '.hs', - lua: '.lua', - shell: '.sh', - sql: '.sql', - html: '.html', - css: '.css' - // add more file extensions here, make sure the key is same as language prop in CodeBlock.tsx component -} - -export const generateRandomString = (length: number, lowercase = false) => { - const chars = 'ABCDEFGHJKLMNPQRSTUVWXY3456789' // excluding similar looking characters like Z, 2, I, 1, O, 0 - let result = '' - for (let i = 0; i < length; i++) { - result += chars.charAt(Math.floor(Math.random() * chars.length)) - } - return lowercase ? result.toLowerCase() : result -} - -const CodeBlock: FC = memo(({ language, value }) => { - const { isCopied, copyToClipboard } = useCopyToClipboard({ timeout: 2000 }) - - const downloadAsFile = () => { - if (typeof window === 'undefined') { - return - } - const fileExtension = programmingLanguages[language] || '.file' - const suggestedFileName = `file-${generateRandomString( - 3, - true - )}${fileExtension}` - const fileName = window.prompt('Enter file name' || '', suggestedFileName) - - if (!fileName) { - // User pressed cancel on prompt. - return - } - - const blob = new Blob([value], { type: 'text/plain' }) - const url = URL.createObjectURL(blob) - const link = document.createElement('a') - link.download = fileName - link.href = url - link.style.display = 'none' - document.body.appendChild(link) - link.click() - document.body.removeChild(link) - URL.revokeObjectURL(url) - } - - const onCopy = () => { - if (isCopied) return - copyToClipboard(value) - } - - return ( -
      -
      - {language} -
      - - -
      -
      - - {value} - -
      - ) -}) -CodeBlock.displayName = 'CodeBlock' - -export { CodeBlock } diff --git a/spaces/luxuedong/lxd/src/lib/bots/bing/tts.ts b/spaces/luxuedong/lxd/src/lib/bots/bing/tts.ts deleted file mode 100644 index cd10b7d1d7581bf9cf46ff6755fcca550c558c9b..0000000000000000000000000000000000000000 --- a/spaces/luxuedong/lxd/src/lib/bots/bing/tts.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { sleep } from './utils' - -const synth = window.speechSynthesis - -export class TTS { - currentText = '' - speakText = '' - private controller = new AbortController() - speaking = false - get isSpeaking() { - return this.speaking - } - finished = false - constructor() {} - abort = () => { - this.controller.abort() - } - - reset = () => { - this.speaking = false - this.finished = true - this.currentText = '' - this.speakText = '' - this.abort() - } - - speak = (text: string) => { - if (!synth || text?.trim()?.length < 2) { - return - } - this.currentText = text.replace(/[^\u4e00-\u9fa5_a-zA-Z0-9,。?,:;\.,:]+/g, '') - this.finished = false - this.loop() - } - - private async doSpeek() { - return new Promise((resolve) => { - const endIndex = this.finished ? this.currentText.length : - Math.max( - this.currentText.lastIndexOf('。'), - this.currentText.lastIndexOf(';'), - this.currentText.lastIndexOf('、'), - this.currentText.lastIndexOf('?'), - this.currentText.lastIndexOf('\n') - ) - const startIndex = this.speakText.length ? Math.max(0, this.currentText.lastIndexOf(this.speakText) + this.speakText.length) : 0 - - if (startIndex >= endIndex) { - return resolve(true) - } - const text = this.currentText.slice(startIndex, endIndex) - this.speakText = text - const utterThis = new SpeechSynthesisUtterance(text) - this.controller.signal.onabort = () => { - synth.cancel() - this.finished = true - resolve(false) - } - - utterThis.onend = function (event) { - resolve(true) - } - - utterThis.onerror = function (event) { - resolve(false) - } - - const voice = synth.getVoices().find(v => v.name.includes('Microsoft Yunxi Online')) ?? null - utterThis.voice = voice - synth.speak(utterThis) - }) - } - - private async loop() { - if (this.speaking) return - this.speaking = true - while(!this.finished) { - await Promise.all([sleep(1000), this.doSpeek()]) - } - this.speaking = false - } -} diff --git a/spaces/ma-xu/LIVE/thrust/dependencies/cub/cmake/AppendOptionIfAvailable.cmake b/spaces/ma-xu/LIVE/thrust/dependencies/cub/cmake/AppendOptionIfAvailable.cmake deleted file mode 100644 index 478321ec8787ec34b2d4fc5dd6067e9239103a07..0000000000000000000000000000000000000000 --- a/spaces/ma-xu/LIVE/thrust/dependencies/cub/cmake/AppendOptionIfAvailable.cmake +++ /dev/null @@ -1,13 +0,0 @@ -include_guard(GLOBAL) -include(CheckCXXCompilerFlag) - -macro (APPEND_OPTION_IF_AVAILABLE _FLAG _LIST) - -string(MAKE_C_IDENTIFIER "CXX_FLAG_${_FLAG}" _VAR) -check_cxx_compiler_flag(${_FLAG} ${_VAR}) - -if (${${_VAR}}) - list(APPEND ${_LIST} ${_FLAG}) -endif () - -endmacro () diff --git a/spaces/ma-xu/LIVE/thrust/internal/scripts/refresh_from_github2.sh b/spaces/ma-xu/LIVE/thrust/internal/scripts/refresh_from_github2.sh deleted file mode 100644 index fb4a2aff17c48003d3f2fd5bf818780500117e88..0000000000000000000000000000000000000000 --- a/spaces/ma-xu/LIVE/thrust/internal/scripts/refresh_from_github2.sh +++ /dev/null @@ -1,96 +0,0 @@ -branch="master" - -while getopts "hb:c:" opt; do - case $opt in - h) - echo "Usage: $0 [-h] [-b ] -c " - exit 1 - ;; - - b) - branch=$OPTARG - ;; - - c) - changelist=$OPTARG - ;; - - /?) - echo "Invalid option: -$OPTARG" >&2; - exit 1 - ;; - - :) - echo "Option -$OPTARG requires an argument"; - exit 1 - ;; - esac -done - -if [ "$changelist" == "" ]; then - echo "Missing required option -c to specify P4 changelist to put changed files into" - exit 1 -fi - -# Cause script to exit on any command that results in an error -set -e - -echo "Downloading thrust code from the $branch branch into /tmp/thrust-${branch}" -rm -rf /tmp/thrust-${branch} -git clone -q git://github.com/thrust/thrust.git -b ${branch} /tmp/thrust-${branch} - -cd `dirname $0`/../.. -echo "Changed current directory to `pwd`" - -vulcan_files=`echo *.vlcc *.vlct` -logdir=`mktemp -d /tmp/tmp.XXXXXXXX` -echo "Logging p4 command outputs to temporary directory $logdir" -for i in *; do - if [[ "$i" != "internal" && "$i" != "Makefile" ]]; then - ii="$i"; - if [ -d $i ]; then ii="$i/..."; fi - echo "Reverting, force syncing, and then removing $ii" - p4 revert $ii >> $logdir/$i.revert.log 2>&1 - p4 sync -f $ii >> $logdir/$i.sync.log 2>&1 - rm -rf $i - fi -done - -echo "Copying downloaded thrust code to p4 client" -cp -R /tmp/thrust-${branch}/* . -find . -name ".gitignore" | xargs -n 1 rm - -echo "Checking if version has been bumped" -new_version=`grep "#define THRUST_VERSION" thrust/version.h | sed -e "s/#define THRUST_VERSION //"` -old_version=`p4 print thrust/version.h | grep "#define THRUST_VERSION" | sed -e "s/#define THRUST_VERSION //"` -if [ "$new_version" != "$old_version" ]; then - p4 edit internal/test/version.gold - new_version_print="$(( $new_version / 100000 )).$(( ($new_version / 100) % 1000 )).$(( $new_version % 100 ))" - sed -e "s/v[0-9\.][0-9\.]*/v${new_version_print}/" internal/test/version.gold > internal/test/version.gold.tmp - mv internal/test/version.gold.tmp internal/test/version.gold - echo "Updated version.gold to version $new_version_print" -else - echo "Version has not changed" -fi - -echo "Reconciling changed code into changelist $changelist" -p4 reconcile -c $changelist ... >> $logdir/reconcile.log 2>&1 -p4 revert -c $changelist Makefile $vulcan_files internal/... >> $logdir/internal_files_revert.log 2>&1 - -echo "Looking for examples that were added" -for e in `find examples -name "*.cu"`; do - if [ ! -e internal/build/`basename $e .cu`.mk ]; then - echo "ADDED: `basename $e .cu`"; - fi -done - -echo "Looking for examples that were deleted or moved" -for e in `find internal/build -name "*.mk"`; do - ee=`basename $e .mk` - case "$ee" in - generic_example | unittester* | warningstester) continue;; - esac - if [ "`find examples -name $ee.cu`" == "" ]; then - echo "DELETED: $ee"; - fi; -done diff --git a/spaces/ma-xu/LIVE/thrust/internal/test/thrust_nightly.pl b/spaces/ma-xu/LIVE/thrust/internal/test/thrust_nightly.pl deleted file mode 100644 index 61e03bda4b7ca6a34fbf63bfc4383d6dbfe60445..0000000000000000000000000000000000000000 --- a/spaces/ma-xu/LIVE/thrust/internal/test/thrust_nightly.pl +++ /dev/null @@ -1,600 +0,0 @@ -#! /usr/bin/perl - -############################################################################### -# Copyright (c) 2018 NVIDIA Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################### - -use strict; -use warnings; - -print(`perl --version`); - -use Getopt::Long; -use Cwd; -use Cwd "abs_path"; -use Config; # For signal names and numbers. -use IPC::Open2; -use File::Temp; -use POSIX "strftime"; - -my $have_time_hi_res = 0; - -if (eval { require Time::HiRes }) -{ - printf("#### CONFIG timestamp `gettimeofday`\n"); - - import Time::HiRes "gettimeofday"; - - $have_time_hi_res = 1; -} else { - printf("#### CONFIG timestamp `time`\n"); -} - -sub timestamp() -{ - if ($have_time_hi_res) { - return gettimeofday(); - } else { - return time(); - } -} - -my %CmdLineOption; -my $arch = ""; -my $abi = ""; -my $os = ""; -my $build = "release"; -my $bin_path; -my $filecheck_path; -my $filecheck_data_path = "internal/test"; -my $timeout_min = 15; - -# https://stackoverflow.com/questions/29862178/name-of-signal-number-2 -my @sig_names; -@sig_names[ split ' ', $Config{sig_num} ] = split ' ', $Config{sig_name}; -my %sig_nums; -@sig_nums{ split ' ', $Config{sig_name} } = split ' ', $Config{sig_num}; - -if (`uname` =~ m/CYGWIN/) { - $os = "win32"; -} elsif ($^O eq "MSWin32") { - $os = "win32"; -} else { - $os = `uname`; - chomp($os); -} - -if ($os eq "win32") { - $ENV{'PROCESSOR_ARCHITECTURE'} ||= ""; - $ENV{'PROCESSOR_ARCHITEW6432'} ||= ""; - - if ((lc($ENV{PROCESSOR_ARCHITECTURE}) ne "x86") || - (lc($ENV{PROCESSOR_ARCHITECTURE}) eq "amd64") || - (lc($ENV{PROCESSOR_ARCHITEW6432}) eq "amd64")) { - $arch = "x86_64"; - } else { - $arch = "i686"; - } -} else { - $arch = `uname -m`; - chomp($arch); -} - -sub usage() -{ - printf("Usage: thrust_nightly.pl \n"); - printf("Options:\n"); - printf(" -help : Print help message\n"); - printf(" -forcearch : i686|x86_64|ARMv7|aarch64 (default: $arch)\n"); - printf(" -forceabi : Specify abi to be used for arm (gnueabi|gnueabihf)\n"); - printf(" -forceos : win32|Linux|Darwin (default: $os)\n"); - printf(" -build : (default: debug)\n"); - printf(" -bin-path : Specify location of test binaries\n"); - printf(" -filecheck-path : Specify location of filecheck binary\n"); - printf(" -filecheck-data-path : Specify location of filecheck data (default: $filecheck_data_path)\n"); - printf(" -timeout-min : timeout in minutes for each individual test\n"); -} - -GetOptions(\%CmdLineOption, - 'help' => sub { usage() and exit 0 }, - "forcearch=s" => \$arch, - "forceabi=s" => \$abi, - "forceos=s" => \$os, - "build=s" => \$build, - "bin-path=s" => \$bin_path, - "filecheck-path=s" => \$filecheck_path, - "filecheck-data-path=s" => \$filecheck_data_path, - "timeout-min=i" => \$timeout_min, - ); - -my $pwd = getcwd(); -my $bin_path_root = abs_path ("${pwd}/.."); - -if ($arch eq "ARMv7") { - if ($abi eq "") { - $abi = "_gnueabi"; #Use default abi for arm if not specified - } - else { - $abi = "_${abi}"; - } -} -else { - $abi = ""; #Ignore abi for architectures other than arm -} - -my $uname = ""; -$uname = $arch; -chomp($uname); - -if (not $bin_path) { - $bin_path = "${bin_path_root}/bin/${uname}_${os}${abi}_${build}"; -} - -if (not $filecheck_path) { - $filecheck_path = "${bin_path}/nvvm/tools"; -} - -sub process_return_code { - my ($name, $ret, $msg) = @_; - - if ($ret != 0) { - my $signal = $ret & 127; - my $app_exit = $ret >> 8; - my $dumped_core = $ret & 0x80; - if (($app_exit != 0) && ($app_exit != 0)) { - if ($msg ne "") { - printf("#### ERROR $name exited with return value $app_exit. $msg\n"); - } else { - printf("#### ERROR $name exited with return value $app_exit.\n"); - } - } - if ($signal != 0) { - if ($msg ne "") { - printf("#### ERROR $name received signal SIG$sig_names[$signal] ($signal). $msg\n"); - } else { - printf("#### ERROR $name received signal SIG$sig_names[$signal] ($signal).\n"); - } - if ($sig_nums{'INT'} eq $signal) { - die("Terminating testing due to SIGINT."); - } - } - if ($dumped_core != 0) { - if ($msg ne "") { - printf("#### ERROR $name generated a core dump. $msg\n"); - } else { - printf("#### ERROR $name generated a core dump.\n"); - } - } - } -} - -my $have_filecheck = 1; - -sub filecheck_sanity { - my $filecheck_cmd = "$filecheck_path/FileCheck $filecheck_data_path/thrust.sanity.filecheck"; - - my $filecheck_pid = open(my $filecheck_stdin, "|-", "$filecheck_cmd 2>&1"); - - print $filecheck_stdin "SANITY"; - - my $filecheck_ret = 0; - if (close($filecheck_stdin) == 0) - { - $filecheck_ret = $?; - } - - if ($filecheck_ret == 0) { - printf("#### SANE FileCheck\n"); - } else { - # Use a temporary file to send the output to - # FileCheck so we can get the output this time, - # because Perl and bidirectional pipes suck. - my $tmp = File::Temp->new(); - my $tmp_filename = $tmp->filename; - print $tmp "SANITY"; - - printf("********************************************************************************\n"); - print `$filecheck_cmd -input-file $tmp_filename`; - printf("********************************************************************************\n"); - - process_return_code("FileCheck Sanity", $filecheck_ret, ""); - printf("#### INSANE FileCheck\n"); - - $have_filecheck = 0; - } -} - -# Wrapper for system that logs the commands so you can see what it did -sub run_cmd { - my ($cmd) = @_; - my $ret = 0; - my @executable; - my @output; - my $syst_cmd; - - my $start = timestamp(); - eval { - local $SIG{ALRM} = sub { die("Command timed out (received SIGALRM).\n") }; - alarm (60 * $timeout_min); - $syst_cmd = $cmd; - - @executable = split(' ', $syst_cmd, 2); - - open(my $child, "-|", "$syst_cmd") or die("Could not execute $syst_cmd.\n"); - - if ($child) - { - @output = <$child>; - } - - if (close($child) == 0) - { - $ret = $?; - } - - alarm 0; - }; - my $elapsed = timestamp() - $start; - - if ($@) { - printf("\n#### ERROR Command timeout reached, killing $executable[0].\n"); - system("killall ".$executable[0]); - return ($sig_nums{'KILL'}, $elapsed, @output); - } - - return ($ret, $elapsed, @output); -} - -sub current_time -{ - return strftime("%x %X %Z", localtime()); -} - -my $failures = 0; -my $known_failures = 0; -my $errors = 0; -my $passes = 0; - -sub run_examples { - # Get list of tests in binary folder. - my $dir = cwd(); - chdir $bin_path; - my @examplelist; - if ($os eq "win32") - { - @examplelist = glob('thrust.example.*.exe'); - } else { - @examplelist = glob('thrust.example.*'); - } - - chdir $dir; - - my $test; - foreach $test (@examplelist) - { - my $test_exe = $test; - - # Ignore FileCheck files. - if ($test =~ /[.]filecheck$/) - { - next; - } - - if ($os eq "win32") - { - $test =~ s/\.exe//g; - } - - # Check the test actually exists. - if (!-e "${bin_path}/${test_exe}") - { - next; - } - - my $cmd = "${bin_path}/${test_exe} --verbose 2>&1"; - - printf("&&&& RUNNING $test\n"); - printf("#### CURRENT_TIME " . current_time() . "\n"); - - my ($ret, $elapsed, @output) = run_cmd($cmd); - - printf("********************************************************************************\n"); - print @output; - printf("********************************************************************************\n"); - - if ($ret != 0) { - process_return_code($test, $ret, "Example crash?"); - printf("&&&& FAILED $test\n"); - printf("#### WALLTIME $test %.2f [s]\n", $elapsed); - $errors = $errors + 1; - } else { - printf("&&&& PASSED $test\n"); - printf("#### WALLTIME $test %.2f [s]\n", $elapsed); - $passes = $passes + 1; - - if ($have_filecheck) { - # Check output with LLVM FileCheck. - - printf("&&&& RUNNING FileCheck $test\n"); - - if (-f "${filecheck_data_path}/${test}.filecheck") { - # If the filecheck file is empty, don't use filecheck, just - # check if the output file is also empty. - if (-z "${filecheck_data_path}/${test}.filecheck") { - if (join("", @output) eq "") { - printf("&&&& PASSED FileCheck $test\n"); - $passes = $passes + 1; - } else { - printf("#### ERROR Output received but not expected.\n"); - printf("&&&& FAILED FileCheck $test\n"); - $failures = $failures + 1; - } - } else { - my $filecheck_cmd = "$filecheck_path/FileCheck $filecheck_data_path/$test.filecheck"; - - my $filecheck_pid = open(my $filecheck_stdin, "|-", "$filecheck_cmd 2>&1"); - - print $filecheck_stdin @output; - - my $filecheck_ret = 0; - if (close($filecheck_stdin) == 0) - { - $filecheck_ret = $?; - } - - if ($filecheck_ret == 0) { - printf("&&&& PASSED FileCheck $test\n"); - $passes = $passes + 1; - } else { - # Use a temporary file to send the output to - # FileCheck so we can get the output this time, - # because Perl and bidirectional pipes suck. - my $tmp = File::Temp->new(); - my $tmp_filename = $tmp->filename; - print $tmp @output; - - printf("********************************************************************************\n"); - print `$filecheck_cmd -input-file $tmp_filename`; - printf("********************************************************************************\n"); - - process_return_code("FileCheck $test", $filecheck_ret, ""); - printf("&&&& FAILED FileCheck $test\n"); - $failures = $failures + 1; - } - } - } else { - printf("#### ERROR $test has no FileCheck comparison.\n"); - printf("&&&& FAILED FileCheck $test\n"); - $errors = $errors + 1; - } - } - } - printf("\n"); - } -} - -sub run_unit_tests { - # Get list of tests in binary folder. - my $dir = cwd(); - chdir $bin_path; - my @unittestlist; - if ($os eq "win32") - { - @unittestlist = glob('thrust.test.*.exe'); - } else { - @unittestlist = glob('thrust.test.*'); - } - chdir $dir; - - my $test; - foreach $test (@unittestlist) - { - my $test_exe = $test; - - # Ignore FileCheck files. - if ($test =~ /[.]filecheck$/) - { - next; - } - - if ($os eq "win32") - { - $test =~ s/\.exe//g; - } - - # Check the test actually exists. - if (!-e "${bin_path}/${test_exe}") - { - next; - } - - # Check the test actually exists - next unless (-e "${bin_path}/${test_exe}"); - - my $cmd = "${bin_path}/${test_exe} --verbose 2>&1"; - - printf("&&&& RUNNING $test\n"); - printf("#### CURRENT_TIME " . current_time() . "\n"); - - my ($ret, $elapsed, @output) = run_cmd($cmd); - - printf("********************************************************************************\n"); - print @output; - printf("********************************************************************************\n"); - my $fail = 0; - my $known_fail = 0; - my $error = 0; - my $pass = 0; - my $found_totals = 0; - foreach my $line (@output) - { - if (($fail, $known_fail, $error, $pass) = $line =~ /Totals: ([0-9]+) failures, ([0-9]+) known failures, ([0-9]+) errors, and ([0-9]+) passes[.]/igs) { - $found_totals = 1; - $failures = $failures + $fail; - $known_failures = $known_failures + $known_fail; - $errors = $errors + $error; - $passes = $passes + $pass; - last; - } else { - $fail = 0; - $known_fail = 0; - $error = 0; - $pass = 0; - } - } - if ($ret == 0) { - if ($found_totals == 0) { - $errors = $errors + 1; - printf("#### ERROR $test returned 0 and no summary line was found. Invalid test?\n"); - printf("&&&& FAILED $test\n"); - printf("#### WALLTIME $test %.2f [s]\n", $elapsed); - } - else { - if ($fail != 0 or $error != 0) { - $errors = $errors + 1; - printf("#### ERROR $test returned 0 and had failures or errors. Test driver error?\n"); - printf("&&&& FAILED $test\n"); - printf("#### WALLTIME $test %.2f [s]\n", $elapsed); - } elsif ($known_fail == 0 and $pass == 0) { - printf("#### DISABLED $test returned 0 and had no failures, known failures, errors or passes.\n"); - printf("&&&& PASSED $test\n"); - printf("#### WALLTIME $test %.2f [s]\n", $elapsed); - } else { - printf("&&&& PASSED $test\n"); - printf("#### WALLTIME $test %.2f [s]\n", $elapsed); - - if ($have_filecheck) { - # Check output with LLVM FileCheck if the test has a FileCheck input. - - if (-f "${filecheck_data_path}/${test}.filecheck") { - printf("&&&& RUNNING FileCheck $test\n"); - - # If the filecheck file is empty, don't use filecheck, - # just check if the output file is also empty. - if (! -z "${filecheck_data_path}/${test}.filecheck") { - if (@output) { - printf("&&&& PASSED FileCheck $test\n"); - $passes = $passes + 1; - } else { - printf("#### Output received but not expected.\n"); - printf("&&&& FAILED FileCheck $test\n"); - $failures = $failures + 1; - } - } else { - my $filecheck_cmd = "$filecheck_path/FileCheck $filecheck_data_path/$test.filecheck"; - - my $filecheck_pid = open(my $filecheck_stdin, "|-", "$filecheck_cmd 2>&1"); - - print $filecheck_stdin @output; - - my $filecheck_ret = 0; - if (close($filecheck_stdin) == 0) - { - $filecheck_ret = $?; - } - - if ($filecheck_ret == 0) { - printf("&&&& PASSED FileCheck $test\n"); - $passes = $passes + 1; - } else { - # Use a temporary file to send the output to - # FileCheck so we can get the output this time, - # because Perl and bidirectional pipes suck. - my $tmp = File::Temp->new(); - my $tmp_filename = $tmp->filename; - print $tmp @output; - - printf("********************************************************************************\n"); - print `$filecheck_cmd -input-file $tmp_filename`; - printf("********************************************************************************\n"); - - process_return_code("FileCheck $test", $filecheck_ret, ""); - printf("&&&& FAILED FileCheck $test\n"); - $failures = $failures + 1; - } - } - } - } - } - } - } else { - $errors = $errors + 1; - process_return_code($test, $ret, "Test crash?"); - printf("&&&& FAILED $test\n"); - printf("#### WALLTIME $test %.2f [s]\n", $elapsed); - } - printf("\n"); - } -} - -sub dvs_summary { - my $dvs_score = 0; - my $denominator = $failures + $known_failures + $errors + $passes; - if ($denominator == 0) { - $dvs_score = 0; - } - else { - $dvs_score = 100 * (($passes + $known_failures) / $denominator); - } - - printf("\n"); - - printf("%*%*%*%* FA!LUR3S $failures\n"); - printf("%*%*%*%* KN0WN FA!LUR3S $known_failures\n"); - printf("%*%*%*%* 3RR0RS $errors\n"); - printf("%*%*%*%* PASS3S $passes\n"); - - printf("\n"); - - printf("CUDA DVS BASIC SANITY SCORE : %.1f\n", $dvs_score); - - if ($failures + $errors > 0) { - exit(1); - } -} - -############################################################################### - -printf("#### CONFIG arch `%s`\n", $arch); -printf("#### CONFIG abi `%s`\n", $abi); -printf("#### CONFIG os `%s`\n", $os); -printf("#### CONFIG build `%s`\n", $build); -printf("#### CONFIG bin_path `%s`\n", $bin_path); -printf("#### CONFIG have_filecheck `$have_filecheck`\n"); -printf("#### CONFIG filecheck_path `%s`\n", $filecheck_path); -printf("#### CONFIG filecheck_data_path `%s`\n", $filecheck_data_path); -printf("#### CONFIG have_time_hi_res `$have_time_hi_res`\n"); -printf("#### CONFIG timeout_min `%s`\n", $timeout_min); -printf("#### ENV PATH `%s`\n", defined $ENV{'PATH'} ? $ENV{'PATH'} : ''); -printf("#### ENV LD_LIBRARY_PATH `%s`\n", defined $ENV{'LD_LIBRARY_PATH'} ? $ENV{'LD_LIBRARY_PATH'} : ''); - -printf("\n"); - -filecheck_sanity(); - -printf("\n"); - -my $START_TIME = current_time(); - -run_examples(); -run_unit_tests(); - -my $STOP_TIME = current_time(); - -printf("#### START_TIME $START_TIME\n"); -printf("#### STOP_TIME $STOP_TIME\n"); - -dvs_summary(); - diff --git a/spaces/ma-xu/LIVE/thrust/testing/unittest/meta.h b/spaces/ma-xu/LIVE/thrust/testing/unittest/meta.h deleted file mode 100644 index 39c62edb645361dcb9064b439b9dfc4d86b741e0..0000000000000000000000000000000000000000 --- a/spaces/ma-xu/LIVE/thrust/testing/unittest/meta.h +++ /dev/null @@ -1,260 +0,0 @@ -/*! \file meta.h - * \brief Defines template classes - * for metaprogramming in the - * unit tests. - */ - -#pragma once - -namespace unittest -{ - -// mark the absence of a type -struct null_type {}; - -// this type encapsulates a list of -// up to 10 types -template - struct type_list -{ - typedef T0 type_0; - typedef T1 type_1; - typedef T2 type_2; - typedef T3 type_3; - typedef T4 type_4; - typedef T5 type_5; - typedef T6 type_6; - typedef T7 type_7; - typedef T8 type_8; - typedef T9 type_9; - typedef T10 type_10; - typedef T11 type_11; - typedef T12 type_12; - typedef T13 type_13; - typedef T14 type_14; - typedef T15 type_15; - typedef T16 type_16; - typedef T17 type_17; - typedef T18 type_18; - typedef T19 type_19; -}; - -// this type provides a way of indexing -// into a type_list -template - struct get_type -{ - typedef null_type type; -}; - -template struct get_type { typedef typename List::type_0 type; }; -template struct get_type { typedef typename List::type_1 type; }; -template struct get_type { typedef typename List::type_2 type; }; -template struct get_type { typedef typename List::type_3 type; }; -template struct get_type { typedef typename List::type_4 type; }; -template struct get_type { typedef typename List::type_5 type; }; -template struct get_type { typedef typename List::type_6 type; }; -template struct get_type { typedef typename List::type_7 type; }; -template struct get_type { typedef typename List::type_8 type; }; -template struct get_type { typedef typename List::type_9 type; }; -template struct get_type { typedef typename List::type_10 type; }; -template struct get_type { typedef typename List::type_11 type; }; -template struct get_type { typedef typename List::type_12 type; }; -template struct get_type { typedef typename List::type_13 type; }; -template struct get_type { typedef typename List::type_14 type; }; -template struct get_type { typedef typename List::type_15 type; }; -template struct get_type { typedef typename List::type_16 type; }; -template struct get_type { typedef typename List::type_17 type; }; -template struct get_type { typedef typename List::type_18 type; }; -template struct get_type { typedef typename List::type_19 type; }; - -// this type and its specialization provides a way to -// iterate over a type_list, and -// applying a unary function to each type -template class Function, - typename T, - unsigned int i = 0> - struct for_each_type -{ - template - void operator()(U n) - { - // run the function on type T - Function f; - f(n); - - // get the next type - typedef typename get_type::type next_type; - - // recurse to i + 1 - for_each_type loop; - loop(n); - } - - void operator()(void) - { - // run the function on type T - Function f; - f(); - - // get the next type - typedef typename get_type::type next_type; - - // recurse to i + 1 - for_each_type loop; - loop(); - } -}; - -// terminal case: do nothing when encountering null_type -template class Function, - unsigned int i> - struct for_each_type -{ - template - void operator()(U) - { - // no-op - } - - void operator()(void) - { - // no-op - } -}; - -// this type and its specialization instantiates -// a template by applying T to Template. -// if T == null_type, then its result is also null_type -template