This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathzooniverse.min.js
4 lines (4 loc) · 102 KB
/
zooniverse.min.js
1
2
3
4
!function(e){e.base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var n,t,o,r,s,i,a,l="",u=0;for(e=base64._utf8_encode(e);u<e.length;)n=e.charCodeAt(u++),t=e.charCodeAt(u++),o=e.charCodeAt(u++),r=n>>2,s=(3&n)<<4|t>>4,i=(15&t)<<2|o>>6,a=63&o,isNaN(t)?i=a=64:isNaN(o)&&(a=64),l=l+base64._keyStr.charAt(r)+base64._keyStr.charAt(s)+base64._keyStr.charAt(i)+base64._keyStr.charAt(a);return l},decode:function(e){var n,t,o,r,s,i,a,l="",u=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");u<e.length;)r=base64._keyStr.indexOf(e.charAt(u++)),s=base64._keyStr.indexOf(e.charAt(u++)),i=base64._keyStr.indexOf(e.charAt(u++)),a=base64._keyStr.indexOf(e.charAt(u++)),n=r<<2|s>>4,t=(15&s)<<4|i>>2,o=(3&i)<<6|a,l+=String.fromCharCode(n),64!=i&&(l+=String.fromCharCode(t)),64!=a&&(l+=String.fromCharCode(o));return l=base64._utf8_decode(l)},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var n="",t=0;t<e.length;t++){var o=e.charCodeAt(t);128>o?n+=String.fromCharCode(o):o>127&&2048>o?(n+=String.fromCharCode(o>>6|192),n+=String.fromCharCode(63&o|128)):(n+=String.fromCharCode(o>>12|224),n+=String.fromCharCode(o>>6&63|128),n+=String.fromCharCode(63&o|128))}return n},_utf8_decode:function(e){for(var n="",t=0,o=0,r=0,s=0;t<e.length;)o=e.charCodeAt(t),128>o?(n+=String.fromCharCode(o),t++):o>191&&224>o?(r=e.charCodeAt(t+1),n+=String.fromCharCode((31&o)<<6|63&r),t+=2):(r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),n+=String.fromCharCode((15&o)<<12|(63&r)<<6|63&s),t+=3);return n}},function(){var n,t;n={topBarHeading:"A Zooniverse project",signUpHeading:"Sign up for a new Zooniverse account",signInHeading:"Sign in to your Zooniverse account",signUp:"Sign up",signIn:"Sign in",signOut:"Sign out",username:"Username",password:"Password",email:"Email",realName:"Real name",whyRealName:"This will be used when we thank contributors, for example, in talks or on posters. If you don't want to be mentioned publicly, leave this blank.",noAccount:"Don't have an account?",agreeToPrivacyPolicy:'I agree to the <a href="https://www.zooniverse.org/privacy" target="_blank">privacy policy</a>.',betaPreference:"I would like to receive notices with opportunities to test and provide feedback on unreleased Zooniverse projects.",forgotPassword:"Forgot your password?",badLogin:"Incorrect username or password",signInFailed:"Sign in failed.",signInForProfile:"Sign in to see your profile.",footerHeading:"The Zooniverse is a collection of web-based citizen science projects that use the efforts of volunteers to help researchers deal with the flood of data that confronts them.",privacyPolicy:"Privacy policy",forkOnGitHub:"Source & bugs",recents:"Recents",favorites:"Favorites",none:"none"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.en=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Un proyecto de Zooniverse",signUpHeading:"Regístrate con una nueva cuenta Zooniverse",signInHeading:"Inicia sesión con tu cuenta de Zooniverse",signUp:"Suscribirse",signIn:"Iniciar sesión",signOut:"Salir",username:"Nombre de Usuario",password:"Contraseña",email:"Email",realName:"Nombre Real",whyRealName:"Esto será usado para agradecer a los colaboradores, por ejempl en las conversaciones o carteles. Si no quieres ser mencionado públicament déjalo en blanco.",noAccount:"¿No tienes una cuenta?",agreeToPrivacyPolicy:'Estoy de acuerdo con <a href="https://www.zoonivers org/privacy" target="_blank"> y su política de privacidad </a>.',betaPreference:"Me gustaría recibir noticias con oportunidades para probar proporcionar feedback en los proyectos inéditos de Zooniverse",forgotPassword:"¿Olvidaste tu contraseña?",badLogin:"Nombre de usuario o contraseña incorrecta",signInFailed:"Error al iniciar sesión",signInForProfile:"Inicia sesión para ver tu perfil.",footerHeading:"Zooniverse es una colección de proyectos de ciencia ciudadan basados en la web que utiliza el esfuerzo de voluntarios para ayudar a lo investigadores con la avalancha de datos a la que se enfrentan.",privacyPolicy:"Política de privacidad",forkOnGitHub:"Fuente y errores",recents:"Recientes",favorites:"Favoritos",none:"ninguno"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.es=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Un projet Zooniverse",signUpHeading:"Créer un compte Zooniverse",signInHeading:"Connectez-vous à votre compte Zooniverse",signUp:"S'inscrire",signIn:"Connexion",signOut:"Déconnexion",username:"Nom d'utilisateur",password:"Mot de passe",email:"Email",realName:"Prénom Nom",whyRealName:"Votre nom pourra être utiliser lors du remerciement des contributeurs, par exemple lors de présentation orales ou sur des posters.<br />Si vous ne souhaitez pas qu'il soit mentionner publiquement, laissez cette case vide.",noAccount:"Vous n'avez pas encore de compte?",agreeToPrivacyPolicy:'J\'accepte les <a href="https://www.zooniverse.org/privacy" target="_blank">conditions d\'utilisation </a>.',betaPreference:"J'aimerais être tenu au courant des projets en cours de développement par Zooniverse, afin de participer aux tests et donner mon avis.",forgotPassword:"Mot de passe oublié?",badLogin:"Utilisateur ou mot de passe incorrect",signInFailed:"Échec de la connexion.",signInForProfile:"Connectez-vous pour accéder à votre profil.",footerHeading:"Zooniverse est une collection de projets de science participative en ligne qui permettent aux volontaires d'aider les scientifiques à traiter les immenses quantités de données dont ils disposent.",privacyPolicy:"Contiditons d'utilisation",recents:"Récents",favorites:"Favoris",none:"aucun"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.fr=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Ενα προγραμμα του Zooniverse",signUpHeading:"Εγγραφειτε για ενα νεο λογαριασμο στο Zooniverse",signInHeading:"Συνδεθειτε στο λογαριασμο Zooniverse σας",signUp:"Εγγραφη",signIn:"Συνδεση",signOut:"Αποσυνδεση",username:"Ονομα χρηστη",password:"Κωδικος",email:"Email",realName:"Πραγματικο ονομα",whyRealName:"Αυτο θα χρησιμοποιηθει οταν ευχαριστησουμε τους συνεργατες, για παραδειγμα,σε συζητησεις ή σε αφισες.Εαν δεν θελετε να αναφερθειτε δημοσια, αφηστε το κενο.",noAccount:"Δεν εχετε λογαριασμο;",agreeToPrivacyPolicy:'Συμφωνω με την <a href="https://www.zooniverse.org/privacy" target="_blank">πολιτικη απορρητου</a>.',betaPreference:"Επιθυμω να λαμβανω ειδοποιησεις με ευκαιριες να δοκιμασω και να κανω σχολια σε ακυκλοφορητα προγραμματα του Zooniverse.",forgotPassword:"Ξεχάσατε τον κωδικό σας;",badLogin:"Λαθος ονομα χρηστη ή κωδικος.",signInFailed:"Η συνδεση απετυχε.",signInForProfile:"Συνδεθειτε για να δειτε το προφιλ σας.",footerHeading:"Το Zooniverse είναι μια συλλογη επιστημονικων προγραμματων μεσω ιντερνετ που βασιζονται στη συνεισφορα εθελοντων ωστε να βοηθησουν τους ερευνητες να διαχειριστουν τον τεραστιο ογκο δεδομενων που εχουν διαθεσιμο.",privacyPolicy:"Πολιτικη απορρητου",forkOnGitHub:"Κωδικας & σφαλματα",recents:"Προσφατα",favorites:"Αγαπημενα",none:"Κανενα"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.el=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Projekt Zooniverse",signUpHeading:"Utwórz nowe konto Zooniverse",signInHeading:"Zaloguj się na swoje konto Zooniverse",signUp:"Zarejestruj",signIn:"Zaloguj",signOut:"Wyloguj",username:"Nazwa użytkownika",password:"Hasło",email:"Adres e-mail",realName:"Prawdziwe imię",whyRealName:"Korzystamy z tych danych, kiedy dziękujemy ochotnikom za ich wkład, na przykład podczas rozmów czy na plakatach. <br/> Jeżeli nie chcesz, abyśmy wymieniali Cię publicznie z imienia i nazwiska, zostaw to pole puste.",noAccount:"Nie masz jeszcze konta?",agreeToPrivacyPolicy:'Zgadzam się z <a href="https://www.zooniverse.org/privacy" target="_blank">polityką prywatności</a>.',forgotPassword:"Nie pamiętasz hasła?",badLogin:"Niepoprawna nazwa użytkownika lub hasło",signInFailed:"Nie udało się zalogować",signInForProfile:"Zaloguj się, aby zobaczyć swój profil",footerHeading:"Zooniverse to zbiór projektów nauki obywatelskiej w Internecie, dzięki którym ochotnicy pomagają badaczom przedzierać się przez powódź napływających danych.",privacyPolicy:"Polityka prywatności",recents:"Najnowsze",favorites:"Ulubione",none:"nic"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.pl=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Проект Zooniverse",signUpHeading:"Создать новый аккаунт Zooniverse",signInHeading:"Войти в ваш аккаунт Zooniverse",signUp:"Зарегистрироваться",signIn:"Войти",signOut:"Выйти",username:"Имя пользователя",password:"Пароль",email:"Адрес E-mail",realName:"Настоящее имя",whyRealName:"Используется при выражении нашей благодарности участникам, например, в обсуждениях или объявлениях. Если вы не хотите, чтобы вас упоминали публично, оставьте это поле пустым.",noAccount:"Нет аккаунта?",agreeToPrivacyPolicy:'Я согласен с <a href="https://www.zooniverse.org/privacy" target="_blank">политикой конфиденциальности</a>.',betaPreference:"Я хочу получать приглашения к участию в тестировании новых проектов Zooniverse.",forgotPassword:"Забыли пароль?",badLogin:"Неправильное имя пользователя или пароль",signInFailed:"Вход не выполнен.",signInForProfile:"Войдите, чтобы увидеть свой профиль.",footerHeading:"Zooniverse — это группа онлайн-проектов гражданской науки, где добровольцы помогают обрабатывать огромные объемы данных, с которыми приходится сталкиваться учёным.",privacyPolicy:"Политика конфиденциальности",forkOnGitHub:"Исходный код и баги",recents:"Недавние",favorites:"Избранное",none:"пусто"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.ru=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"「Zooniverse」計畫",signUpHeading:' "申請新的「Zooniverse」帳號',signInHeading:"以「Zooniverse」帳號登入 ",signUp:"新增帳號",signIn:"登入",signOut:"登出",username:"用戶名",password:"密碼",email:"電子信箱帳號",realName:"真實姓名",whyRealName:"這會用來感謝我們的協力夥伴,譬如放在演講場合或海報上。如果你不願公開真實姓名,可以空白。",noAccount:"還沒開立過帳號嗎?",agreeToPrivacyPolicy:'我同意 <a href="https://www.zooniverse.org/privacy" target="_blank"> 隱私權設定規定</a>.',betaPreference:"我樂意幫忙測試尚未正式上線的「Zooniverse」計畫並協助讓程式更完善,有機會請通知我。",forgotPassword:"忘記密碼?",badLogin:"用戶名稱錯誤或密碼錯誤",signInFailed:"登入失敗。",signInForProfile:"登入查看已分類記錄。",footerHeading:" 「Zooniverse」網站以網路方式讓一般大眾能參與多種研究主題的科學計畫。志工分類員的協同努力,幫助科學家處理了龐大資料,這海量的資料原本對科學家是個不小的挑戰!",privacyPolicy:"隱私權設定規定",forkOnGitHub:"原始碼及錯誤回報",recents:"最新完成的",favorites:"我的最愛",none:"無"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.zh_tw=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Zooniverse计划",signUpHeading:' "申请新的Zooniverse帐号',signInHeading:"登入Zooniverse",signUp:"申请帐号",signIn:"登入",signOut:"登出",username:"用户名",password:"密码",email:"电子信箱帐号",realName:"真实姓名",whyRealName:"将会被用来感谢我们的协力伙伴,譬如放在演讲场合或海报上。如果你不愿公开真实姓名,可以空白。 ",noAccount:"还没开立过帐号吗? ",agreeToPrivacyPolicy:'我同意<a href="https://www.zooniverse.org/privacy" target="_blank">隐私权设定规定</a>.',betaPreference:'我愿意帮忙测试尚未正式上线的 "Zooniverse计划" 并协助让程式更完善,有这类机会请通知我。 ',forgotPassword:"忘记密码?",badLogin:"用户名称错误或密码错误",signInFailed:"登入失败。 ",signInForProfile:"登入查看已分类记录。 ",footerHeading:" Zooniverse网站以网路方式让一般大众能参与多种研究主题的科学计划。海量的资料原本給科学家带来不小的挑战,还好有志愿者分类员协同努力,已帮助科学家处理了大量资料。 ",privacyPolicy:"隐私权设定规定",forkOnGitHub:"原始码及错误回报",recents:"最新完成的",favorites:"我的最爱",none:"无"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.zh_cn=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Ein Projekt von Zooniverse",signUpHeading:"Ein neues Zooniverse-Konto erstellen",signInHeading:"Mit Zooniverse-Konto anmelden",signUp:"Registrieren",signIn:"Anmelden",signOut:"Abmelden",username:"Benutzername",password:"Passwort",email:"E-Mail",realName:"Tatsächlicher Name",whyRealName:"Wenn wir Freiwilligen danken, zum Beispiel auf Postern oder in Vorträgen, wird dein tatsächlicher Name verwendet. Falls du nicht öffentlich erwähnt werden willst, lasse diese Zeile offen.",noAccount:"Kein Benutzerkonto?",agreeToPrivacyPolicy:'Ich stimme der <a href="https://www.zooniverse.org/privacy" target="_blank">Datenschutzrichtlinie</a> zu.',betaPreference:"Ich würde gerne eine Nachricht erhalten, wenn die Gelegenheit besteht, neue Zooniverse-Projekte zu testen und meine Meinung abzugeben.",forgotPassword:"Passwort vergessen?",badLogin:"Falscher Benutzername oder falsches Passwort",signInFailed:"Anmeldung fehlgeschlagen.",signInForProfile:"Melde dich an, um dein Profil zu sehen.",footerHeading:"Zooniverse ist eine Sammlung von Citizen Science Projekten im Internet, die die Leistungen Freiwilliger nutzen, um Forschern mit der Datenflut zu helfen, mit der sie konfrontiert werden.",privacyPolicy:"Datenschutzrichtlinie",forkOnGitHub:"Source & Bugs",recents:"Neueste",favorites:"Favoriten",none:"keine"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.de=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Zooniverse projekt",signUpHeading:"Vytvoření Zooniverse účtu",signInHeading:"Přihlašování na Zooniverse účet",signUp:"Zaregistrovat se",signIn:"Přihlásit se",signOut:"Odhlásit se",username:"Uživatelské jméno",password:"Heslo",email:"Email",realName:"Pravé jméno",whyRealName:"Toto jméno bývá použito při děkování přispěvatelům, např. v rozhovorech nebo na posterech. Pokud si nepřejete, aby bylo Vaše jméno zveřejněno, nechte políčko prázdné.",noAccount:"Nemáte ještě účet?",agreeToPrivacyPolicy:'Souhlasím se <a href="https://www.zooniverse.org/privacy" target="_blank">zásadami ochrany osobních údajů</a>.',betaPreference:"Chci dostávat oznámení o možnosti testování dosud nezveřejněných Zooniverse projektů a poskytování zpětné vazby.",forgotPassword:"Zapomněli jste heslo?",badLogin:"Zadali jste chybné uživatelské jméno, nebo heslo.",signInFailed:"Přihlášení se nezdařilo.",signInForProfile:"K zobrazení Vašeho profilu je nutné se přihlásit.",footerHeading:"Zooniverse je soubor občansko naučných webových projektů, které využívají úsilí dobrovolníků pomoct vědcům zpracovat kvanta dat, jimiž jsou při svém výzkumu zaplaveni.",privacyPolicy:"Zásady ochrany osobních údajů",forkOnGitHub:"Zdrojové soubory & chyby",recents:"Nedávné",favorites:"Oblíbené",none:"Žádné"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.cs=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Un proiect Zooniverse",signUpHeading:"Inregistreaza un nou cont Zooniverse",signInHeading:"Logheaza-te in countul tau Zooniverse",signUp:"Inregistrare",signIn:"Logare",signOut:"Delogare",username:"Nume utilizator",password:"Parola",email:"Email",realName:"Numele real",whyRealName:"Acesta va fi folosit pentru a multumi colaboratorilor, de exemplu, in discutii sau pe afise. Daca nu vrei sa fii mentionat in public, lasa acest camp necompletat.",noAccount:"Nu ai un cont?",agreeToPrivacyPolicy:'Sunt de acord cu <a href="https://www.zooniverse.org/privacy" target="_blank">regulile de confidentialitate</a>.',betaPreference:"As dori sa primesc mesaje despre oportunitati de a testa si comenta despre proiecte Zooniverse nelansate.",forgotPassword:"Ai uitat parola?",badLogin:"Nume utilizator sau parola este incorecta",signInFailed:"Logarea a esuat.",signInForProfile:"Logheaza-te pentru a-ti vedea profilul.",footerHeading:"Zooniverse este o colectie de proiecte stiintifice conduse online in care voluntarii ii ajuta pe cercetatori sa administreze afluxul de date cu care se confrunta.",privacyPolicy:"Reguli de confidentialitate",forkOnGitHub:"Cod sursa si erori",recents:"Recente",favorites:"Favorite",none:"nici una"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.ro=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"Un progetto Zooniverse",signUpHeading:"Crea un profilo Zooniverse",signInHeading:"Accedi al tuo profilo Zooniverse",signUp:"Registrati",signIn:"Accedi",signOut:"Esci",username:"Username",password:"Password",email:"Email",realName:"Nome reale",whyRealName:"Questo verra' utilizzato per ringraziare i collaboratori, ad esempio, in presentazioni e posters. Se non vuoi che il tuo nome venga utilizzato in pubblico, lascia questo spazio vuoto.",noAccount:"Non hai un profilo?",agreeToPrivacyPolicy:'Accetto <a href="https://www.zooniverse.org/privacy" target="_blank">le norme sulla Privacy</a>.',betaPreference:"Vorrei ricevere notifiche per testare e commentare su progetti Zooniverse non ancora pubblicati.",forgotPassword:"Hai dimenticato la tua password?",badLogin:"Username or password incorretti",signInFailed:"Errore di registrazione",signInForProfile:"Accedi al tuo profilo.",footerHeading:"Zooniverse è una raccolta di progetti web di Citizen Science basati sull'utilizzo di volontari che aiutano i ricercatori nel gestire flussi di dati.",privacyPolicy:"Privacy",forkOnGitHub:"Codice & errori",recents:"Recenti",favorites:"Favoriti",none:"Non presente"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.it=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t;n={topBarHeading:"ズーニバース・プロジェクト",signUpHeading:"ズーニバース・アカウントの新規登録を行う",signInHeading:"あなたのズーニバース・アカウントへログインする",signUp:"アカウント登録",signIn:"ログイン",signOut:"ログアウト",username:"ユーザー名",password:"パスワード",email:"Eメール",realName:"本名",whyRealName:"本名は研究発表の謝辞などに掲載させていただくことがあります。ご希望でない方は空欄のままでお願いしま す。",noAccount:"アカウントをお持ちでない方へ",agreeToPrivacyPolicy:'<a href="https://www.zooniverse.org/privacy" target="_blank">プライバシー規約に同意する</a>.',betaPreference:"新しいズーニバース・プロジェクトの試験に参加したい。",forgotPassword:"パスワードを忘れた場合",badLogin:"ユーザー名またはパスワードが間違っています。",signInFailed:"ログインできませんでした。",signInForProfile:"プロフィール確認",footerHeading:"Tズーニバースは、一般の方々がインターネットで簡単に参加できる科学研究プロジェクトの集まりです。それぞれのプロジェクトが、一般の方々にもわかりやすいデータを大量にかかえており、みなさまにその整理 を手伝っていただいてます。",privacyPolicy:"プライバシー規約",forkOnGitHub:"ソースコードおよびバグ",recents:"最新情報",favorites:"お気に入り",none:"選択なし"},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).translations&&(t.translations={}),e.zooniverse.translations.ja=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t,o,r={}.hasOwnProperty;null==e.zooniverse&&(e.zooniverse={}),n=e.jQuery,o=!!~location.href.indexOf("log=1"),t=function(){function e(){}var t,s;e.on=function(e,t){return null==this.jQueryEventProxy&&(this.jQueryEventProxy=n({})),this.jQueryEventProxy.on(e,t)},e.one=function(e,t){return null==this.jQueryEventProxy&&(this.jQueryEventProxy=n({})),this.jQueryEventProxy.one(e,t)},e.off=function(e,t){return null==this.jQueryEventProxy&&(this.jQueryEventProxy=n({})),this.jQueryEventProxy.off(e,t)},e.trigger=function(e,t){var r,s;return null==t&&(t=[]),o&&"undefined"!=typeof console&&null!==console&&console.info(this.name||this.toString(),e.toUpperCase(),t),this.jQueryEventProxy instanceof n||(this.jQueryEventProxy=n({})),(s=this.jQueryEventProxy).trigger.apply(s,arguments),"function"==typeof(r=this.constructor).trigger?r.trigger(e,[this].concat(t)):void 0};for(s in e)r.call(e,s)&&(t=e[s],e.prototype[s]=t);return e.prototype.destroy=function(){return this.trigger("destroying"),this.off()},o&&(e.prototype.toString=function(){return""+this.constructor.name+" instance"}),e}(),e.zooniverse.EventEmitter=t,"undefined"!=typeof module&&null!==module&&(module.exports=t)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c,p,d=function(e,n){return function(){return e.apply(n,arguments)}},h={}.hasOwnProperty,v=function(e,n){function t(){this.constructor=e}for(var o in n)h.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),t=e.zooniverse.EventEmitter||require("./event-emitter"),n=e.jQuery,l=n(document.body.parentNode),u=-1,s=!!~location.hostname.indexOf("demo"),r=!!~location.pathname.indexOf("beta"),c=!!~location.hostname.indexOf("preview"),a=+location.port>=1024,i=null!=(p=location.search.match(/api=([^&]+)/))?p[1]:void 0,null==i||~i.indexOf("//")||(i="//"+i),o=function(t){function o(t){var r,s,i=this;null==t&&(t={}),this.timeout=d(this.timeout,this),o.__super__.constructor.apply(this,arguments);for(r in t)h.call(t,r)&&(s=t[r],r in this&&null!=s&&(this[r]=s));null==this.deferreds&&(this.deferreds={}),null==this.queue&&(this.queue=[]),n(e).on("message",function(e){var n;return n=e.originalEvent,n.source===i.el.get(0).contentWindow?i.onMessage.apply(i,arguments):void 0}),this.connect()}return v(o,t),o.REJECTION="ProxyFrame not connected",o.prototype.host=i||"https://"+(s||r||a||c?"dev":"api")+".zooniverse.org",o.prototype.path="/proxy",o.prototype.loadTimeout=5e3,o.prototype.retryTimeout=12e4,o.prototype.el=null,o.prototype.className="proxy-frame",o.prototype.attempt=0,o.prototype.ready=!1,o.prototype.failed=!1,o.prototype.deferreds=null,o.prototype.queue=null,o.prototype.connect=function(){var e,t,o=this;return e=this.attempt<0?"_BAD":"",this.attempt+=1,null!=(t=this.el)&&t.remove(),this.el=n("<iframe src='"+this.host+this.path+e+"' class='"+this.className+"' data-attempt='"+this.attempt+"' style='display: none;'></iframe>"),this.el.appendTo(document.body),setTimeout(function(){return o.ready?void 0:o.timeout()},this.loadTimeout)},o.prototype.onReady=function(){var e=this;return this.attempt=0,this.ready=!0,this.failed=!1,setTimeout(function(){var n,t,o,r,s;for(r=e.queue,s=[],t=0,o=r.length;o>t;t++)n=r[t],s.push(e.process(n));return s},100),l.removeClass("offline"),this.trigger("ready")},o.prototype.timeout=function(){return this.trigger("timeout",this.loadTimeout),this.onFailed()},o.prototype.onFailed=function(){var e,n,t,o,r=this;if(!this.ready){for(this.failed=!0,o=this.queue,n=0,t=o.length;t>n;n++)e=o[n],this.deferreds[e.id].reject(this.constructor.REJECTION);return this.queue.splice(0),l.addClass("offline"),this.trigger("fail"),setTimeout(function(){return r.connect()},this.retryTimeout)}},o.prototype.send=function(e,t,o){var r,s=this;return u+=1,e.id=u,r=new n.Deferred,r.then(t,o),function(e,n){return n.always(function(){return delete s.deferreds[e]})}(u,r),this.deferreds[u]=r,this.failed?r.reject(this.constructor.REJECTION):this.ready?this.process(e):this.queue.push(e),r.promise()},o.prototype.process=function(e){return this.el.get(0).contentWindow.postMessage(JSON.stringify(e),this.host)},o.prototype.onMessage=function(e){var n,t;return n=e.originalEvent,t=JSON.parse(n.data),"READY"===t.id?this.onReady():(t.failure?this.deferreds[t.id].reject(t.response):this.deferreds[t.id].resolve(t.response),this.trigger("response",[t]))},o.prototype.destroy=function(){return this.el.remove(),o.__super__.destroy.apply(this,arguments)},o}(t),e.zooniverse.ProxyFrame=o,"undefined"!=typeof module&&null!==module&&(module.exports=o)}.call(this),function(){var n,t,o,r,s={}.hasOwnProperty,i=function(e,n){function t(){this.constructor=e}for(var o in n)s.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e},a=[].slice;null==e.zooniverse&&(e.zooniverse={}),o=e.zooniverse.EventEmitter||require("./event-emitter"),r=e.zooniverse.ProxyFrame||require("./proxy-frame"),n=e.jQuery,t=function(n){function t(e){var n,o,s,i,a=this;i=null!=e?e:{},this.project=i.project,n=i.host,s=i.path,o=i.loadTimeout,t.__super__.constructor.apply(this,arguments),this.proxyFrame=new r({host:n,path:s,loadTimeout:o}),this.proxyFrame.on("ready",function(){return a.trigger("ready")}),this.proxyFrame.on("fail",function(){return a.trigger("fail")}),this.select()}return i(t,n),t.current=null,t.prototype.project=".",t.prototype.headers={},t.prototype.proxyFrame=null,t.prototype.request=function(e,n,t,o,r){var s;return"function"==typeof t&&(s=[o,t,null],r=s[0],o=s[1],t=s[2],this.trigger("request",[e,n,t])),this.proxyFrame.send({type:e,url:n,data:t,headers:this.headers},o,r)},t.prototype.get=function(){return e.req=this.request.apply(this,["get"].concat(a.call(arguments)))},t.prototype.getJSON=function(){return this.request.apply(this,["getJSON"].concat(a.call(arguments)))},t.prototype.post=function(){return this.request.apply(this,["post"].concat(a.call(arguments)))},t.prototype.put=function(){return this.request.apply(this,["put"].concat(a.call(arguments)))},t.prototype["delete"]=function(){return this.request.apply(this,["delete"].concat(a.call(arguments)))},t.prototype.select=function(){return this.trigger("select"),this.constructor.current=this},t.prototype.destroy=function(){return this.proxyFrame.destroy(),t.__super__.destroy.apply(this,arguments)},t}(o),e.zooniverse.Api=t,"undefined"!=typeof module&&null!==module&&(module.exports=t)}.call(this),function(){var n,t,o=[].indexOf||function(e){for(var n=0,t=this.length;t>n;n++)if(n in this&&this[n]===e)return n;return-1};n=function(e,n,t){var r,s;return r=e.className.split(/\s+/),s=o.call(r,n)>=0,null==t&&(t=!s),t=!!t,s||t!==!0||r.push(n),s&&t===!1&&r.splice(r.indexOf(n),1),e.className=r.join(" "),null},null==e.zooniverse&&(e.zooniverse={}),null==(t=e.zooniverse).util&&(t.util={}),e.zooniverse.util.toggleClass=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t,o,r,s=function(e,n){return function(){return e.apply(n,arguments)}},i={}.hasOwnProperty,a=function(e,n){function t(){this.constructor=e}for(var o in n)i.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e},l=[].indexOf||function(e){for(var n=0,t=this.length;t>n;n++)if(n in this&&this[n]===e)return n;return-1};t=(null!=(r=e.zooniverse)?r.EventEmitter:void 0)||require("./event-emitter"),n=e.jQuery,o=function(e){function t(e){this.defaultStringsFormat=s(this.defaultStringsFormat,this),this.label=s(this.label,this);var n,t,o,r,a,u,c,p=this;for(n in e)i.call(e,n)&&(t=e[n],n in this&&(this[n]=t));null==this.translations&&(this.translations={}),null==this.code&&(this.code=null!=(a=location.search.match(/lang=([^&]+)/))?a[1]:void 0),null==this.code&&(this.code=localStorage.getItem("zooniverse-language-code")),null==this.code&&(this.code=null!=(u=navigator.language)?u.split("-")[0]:void 0),null==this.code&&(this.code=null!=(c=navigator.userLanguage)?c.split("-")[0]:void 0),null==this.code&&(this.code=this.constructor.prototype.code),(l.call(this.code,"/")>=0||l.call(this.code,".json")>=0)&&null==(o=this.translations)[r=this.code]&&(o[r]={label:this.code,strings:this.code}),this.constructor.current=this,setTimeout(function(){return p.setLanguage(p.code)})}return a(t,e),t.current=null,t.defaultLocale="en",t.prototype.translations=null,t.prototype.code=null,t.prototype.setLanguage=function(e,t,o){var r,s,i,a,l=this;return this.code=e,null==this.translations[this.code]&&(this.code=this.constructor.defaultLocale),null==this.translations[this.code].strings&&(this.translations[this.code].strings=this.defaultStringsFormat()),"string"==typeof this.translations[this.code].strings?(s=null!=(a=this.translations[this.code])?a.strings:void 0,r=JSON.parse(localStorage.getItem("zooniverse-language-strings-"+this.code)),null!=r&&(this.translations[this.code].strings=r,this.setLanguage(this.code,t,o)),i=n.getJSON(s),i.done(function(e){return localStorage.setItem("zooniverse-language-strings-"+l.code,JSON.stringify(e)),l.translations[l.code].strings=e,l.setLanguage(l.code,t,o)}),i.fail(function(){return l.trigger("language-fetch-fail"),"function"==typeof o?o.apply(null,arguments):void 0})):(localStorage.setItem("zooniverse-language-code",this.code),document.querySelector("html").lang=this.code,this.trigger("change-language",[this.code,this.translations[this.code].strings]),"function"==typeof t?t(this.code,this.translations[this.code].strings):void 0)},t.prototype.label=function(){var e,n;return(null!=(e=this.translations[this.code])?e.label:void 0)||(null!=(n=this.translations[this.constructor.prototype.code])?n.label:void 0)},t.prototype.defaultStringsFormat=function(){return"./translations/"+this.code+".json"},t}(t),null==e.zooniverse&&(e.zooniverse={}),e.zooniverse.LanguageManager=o,"undefined"!=typeof module&&null!==module&&(module.exports=o)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c,p,d,h,v,g,f,m,y,z,w,b,_,C,j,k,P,S,q,x,I=[].slice;n=(null!=(o=e.zooniverse)?o.LanguageManager:void 0)||require("./language-manager"),t=function(){var e,n,o,r,s;return r=2<=arguments.length?I.call(arguments,0,s=arguments.length-1):(s=0,[]),n=arguments[s++],o=r[0],null==o&&(o="span"),e=document.createElement(o),e.setAttribute(t.attr,n),t.refresh(e),e.outerHTML},t.attr="data-zooniverse-translate",t.strings={en:(null!=(r=e.zooniverse)&&null!=(g=r.translations)?g.en:void 0)||require("../translations/en"),es:(null!=(C=e.zooniverse)&&null!=(j=C.translations)?j.es:void 0)||require("../translations/es"),fr:(null!=(k=e.zooniverse)&&null!=(P=k.translations)?P.fr:void 0)||require("../translations/fr"),it:(null!=(S=e.zooniverse)&&null!=(q=S.translations)?q.it:void 0)||require("../translations/it"),pl:(null!=(x=e.zooniverse)&&null!=(s=x.translations)?s.pl:void 0)||require("../translations/pl"),ru:(null!=(i=e.zooniverse)&&null!=(a=i.translations)?a.ru:void 0)||require("../translations/ru"),zh_tw:(null!=(l=e.zooniverse)&&null!=(u=l.translations)?u.zh_tw:void 0)||require("../translations/zh-tw"),zh_cn:(null!=(c=e.zooniverse)&&null!=(p=c.translations)?p.zh_cn:void 0)||require("../translations/zh-cn"),de:(null!=(d=e.zooniverse)&&null!=(h=d.translations)?h.de:void 0)||require("../translations/de"),cs:(null!=(v=e.zooniverse)&&null!=(f=v.translations)?f.cs:void 0)||require("../translations/cs"),ro:(null!=(m=e.zooniverse)&&null!=(y=m.translations)?y.ro:void 0)||require("../translations/ro"),ja:(null!=(z=e.zooniverse)&&null!=(w=z.translations)?w.ja:void 0)||require("../translations/ja"),el:(null!=(b=e.zooniverse)&&null!=(_=b.translations)?_.el:void 0)||require("../translations/el")},t.refresh=function(e){var o,r,s,i,a,l,u,c,p,d,h,v;for(u=e.attributes,v=[],a=0,l=u.length;l>a;a++)c=u[a],o=c.name,i=c.value,o.slice(0,t.attr.length)===t.attr&&i&&(r=o.slice(t.attr.length+1)||"innerHTML",s=null!=(p=t.strings[null!=(d=n.current)?d.code:void 0])?p[i]:void 0,s||(s=null!=(h=t.strings[n.defaultLocale])?h[i]:void 0),s||(s=i),v.push(e.hasAttribute(r)?e.setAttribute(r,s):e[r]=s));return v},n.on("change-language",function(){var e,n,o,r,s;for(r=document.querySelectorAll("["+t.attr+"]"),s=[],n=0,o=r.length;o>n;n++)e=r[n],s.push(t.refresh(e));return s}),null==e.zooniverse&&(e.zooniverse={}),e.zooniverse.translate=t,"undefined"!=typeof module&&null!==module&&(module.exports=t)}.call(this),function(){var n,t,o,r,s,i,a={}.hasOwnProperty,l=function(e,n){function t(){this.constructor=e}for(var o in n)a.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e},u=[].slice;null==e.zooniverse&&(e.zooniverse={}),t=e.zooniverse.EventEmitter||require("./event-emitter"),n=e.jQuery,o={visitor:1,session:2,page:3},s="http://www.google-analytics.com/ga.js","https:"===e.location.protocol&&(s=s.replace("http://www","https://ssl")),r=function(t){function r(t){var o,r,i,a,l,u,c=this;
null==t&&(t={});for(o in t)i=t[o],this[o]=i;if(this.select(),e._gaq||n.getScript(s),null==e._gaq&&(e._gaq=[]),e._gaq.push(["_setAccount",this.account]),e._gaq.push(["_trackPageview"]),this.domain)for(e._gaq.push(["_setDomainName",this.domain]),u=this.ignoredSubdomainRefs,a=0,l=u.length;l>a;a++)r=u[a],e._gaq.push(["_addIgnoredRef",""+r+"."+this.domain]);this.trackHashes&&n(e).on("hashchange",function(){return c.track()})}return l(r,t),r.current=null,r.prototype.account="",r.prototype.domain="",r.prototype.trackHashes=!0,r.prototype.ignoredSubdomainRefs=["www"],r.prototype.select=function(){return this.constructor.current=this,this.trigger("select")},r.prototype.track=function(n){return"string"!=typeof n&&(n="/"+location.hash),e._gaq.push(["_trackPageview",n]),this.trigger("track",[n])},r.prototype.event=function(){return e._gaq.push(["_trackEvent"].concat(u.call(arguments))),this.trigger("event",u.call(arguments))},r.prototype.custom=function(n,t,r,s){var i;return"string"==typeof n&&(n=this.constructor.indices[n]),"string"==typeof s&&(s=o[s]),i=["_setCustomVar",n,t,r],null!=s&&i.push(s),e._gaq.push(i),this.trigger("custom",u.call(arguments))},r}(t),null!=(i=e.zooniverse)&&(i.GoogleAnalytics=r),"undefined"!=typeof module&&null!==module&&(module.exports=r)}.call(this),function(){var n,t,o,r={}.hasOwnProperty,s=function(e,n){function t(){this.constructor=e}for(var o in n)r.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(o=e.zooniverse).models&&(o.models={}),t=e.zooniverse.EventEmitter||require("../lib/event-emitter"),n=function(e){function n(e){var t,o,s;null==e&&(e={}),n.__super__.constructor.apply(this,arguments);for(t in e)r.call(e,t)&&(o=e[t],this[t]=o);this.constructor.idCounter+=1,null==this.id&&(this.id="C_"+this.constructor.idCounter),null==(s=this.constructor).instances&&(s.instances=[]),this.constructor.instances.push(this)}return s(n,e),n.idCounter=-1,n.instances=null,n.count=function(){return null==this.instances&&(this.instances=[]),this.instances.length},n.first=function(){return null==this.instances&&(this.instances=[]),this.instances[0]},n.find=function(e){var n,t,o,r;for(null==this.instances&&(this.instances=[]),r=this.instances,t=0,o=r.length;o>t;t++)if(n=r[t],n.id===e)return n},n.search=function(e){var n,t,o,s,i,a,l,u;for(null==this.instances&&(this.instances=[]),l=this.instances,u=[],i=0,a=l.length;a>i;i++){n=l[i],t=!1;for(o in e)if(r.call(e,o)&&(s=e[o],n[o]!==s)){t=!0;break}t||u.push(n)}return u},n.destroyAll=function(){var e;for(e=[];0!==this.count();)e.push(this.first().destroy());return e},n.prototype.id=null,n.prototype.destroy=function(){var e,t,o,r,s,i,a;for(n.__super__.destroy.apply(this,arguments),s=this.constructor.instances,a=[],e=o=0,r=s.length;r>o;e=++o)if(t=s[e],t===this){null!=(i=this.constructor.instances)&&i.splice(e,1);break}return a},n}(t),e.zooniverse.models.BaseModel=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t,o,r,s,i={}.hasOwnProperty,a=function(e,n){function t(){this.constructor=e}for(var o in n)i.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e},l=[].slice;null==e.zooniverse&&(e.zooniverse={}),null==(s=e.zooniverse).models&&(s.models={}),t=e.zooniverse.EventEmitter||require("../lib/event-emitter"),n=e.zooniverse.Api||require("../lib/api"),r=e.base64||(require("../vendor/base64"),e.base64),o=function(e){function t(e){var n,t;null==e&&(e={});for(n in e)i.call(e,n)&&(t=e[n],this[n]=t)}return a(t,e),t.current=!1,t.path=function(){return n.current.project?"/projects/"+n.current.project:""},t.fetch=function(){var e,o;return t.trigger("fetching",arguments),e=(o=n.current).getJSON.apply(o,[""+t.path()+"/current_user"].concat(l.call(arguments))),e.always(t.onFetch),e},t.login=function(e){var t,o,r,s;return r=e.username,o=e.password,this.trigger("logging-in",arguments),t=(s=n.current).getJSON.apply(s,[""+this.path()+"/login"].concat(l.call(arguments))),t.done(this.onFetch),t.fail(this.onFail),t},t.logout=function(){var e,t;return this.trigger("logging-out",arguments),e=(t=n.current).getJSON.apply(t,[""+this.path()+"/logout"].concat(l.call(arguments))),e.always(this.onFetch),e},t.signup=function(e){var t,o,r,s,i;return s=e.username,o=e.password,t=e.email,this.trigger("signing-up"),r=(i=n.current).getJSON.apply(i,[""+this.path()+"/signup"].concat(l.call(arguments))),r.always(this.onFetch),r},t.onFetch=function(e){var o,s;return s=t.current,t.current=e.success&&"name"in e&&"api_key"in e?new t(e):null,t.current?(o=r.encode(""+t.current.name+":"+t.current.api_key),n.current.headers.Authorization="Basic "+o):delete n.current.headers.Authorization,t.current!==s&&(s&&s.destroy(),t.trigger("change",[t.current])),e.success?void 0:t.trigger("sign-in-error",e.message)},t.onFail=function(){return t.trigger("sign-in-failure")},t.prototype.id="",t.prototype.zooniverse_id="",t.prototype.api_key="",t.prototype.name="",t.prototype.avatar="",t.prototype.project=null,t.prototype.setGroup=function(e,o){var r,s,i,a=this;if(null!=t.current)return s=null!=e?"/user_groups/"+e+"/participate":"/user_groups/TODO_HOW_DO_I_LEAVE_A_GROUP/participate",r=null!=(i=n.current)?i.getJSON(s,function(e){return a.trigger("change-group",e),"function"==typeof o?o.apply(null,arguments):void 0}):void 0},t.prototype.setPreference=function(e,o,r,s){var i,a,l,u;return null==r&&(r=!1),null!=t.current?("function"==typeof r&&(u=[!1,r],r=u[0],s=u[1]),null==(i=t.current).preferences&&(i.preferences={}),r?t.current.preferences[e]=o:(null==(a=t.current.preferences)[l=n.current.project]&&(a[l]={}),t.current.preferences[n.current.project][e]=o),r||(e=""+n.current.project+"."+e),n.current.put("/users/preferences",{key:e,value:o},s)):void 0},t.prototype.deletePreference=function(e,o,r){var s,i,a,l;return null==o&&(o=!1),null!=t.current?("function"==typeof o&&(l=[!1,o],o=l[0],r=l[1]),null==(s=t.current).preferences&&(s.preferences={}),o?delete t.current.preferences[e]:(null==(i=t.current.preferences)[a=n.current.project]&&(i[a]={}),delete t.current.preferences[n.current.project][e]),o||(e=""+n.current.project+"."+e),n.current["delete"]("/users/preferences",{key:e},r)):void 0},t}.call(this,t),e.zooniverse.models.User=o,"undefined"!=typeof module&&null!==module&&(module.exports=o)}.call(this),function(){var n,t,o,r,s,i={}.hasOwnProperty,a=function(e,n){function t(){this.constructor=e}for(var o in n)i.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e},l=[].indexOf||function(e){for(var n=0,t=this.length;t>n;n++)if(n in this&&this[n]===e)return n;return-1};null==e.zooniverse&&(e.zooniverse={}),null==(s=e.zooniverse).models&&(s.models={}),o=zooniverse.models.BaseModel||require("./base-model"),t=zooniverse.Api||require("../lib/api"),n=e.jQuery,r=function(e){function o(){o.__super__.constructor.apply(this,arguments),null==this.location&&(this.location={}),null==this.coords&&(this.coords=[]),null==this.metadata&&(this.metadata={}),null==this.workflow_ids&&(this.workflow_ids=[])}return a(o,e),o.current=null,o.seenThisSession=[],o.queueMin=2,o.queueMax=10,o.group=!1,o.fallback="./offline/subjects.json",o.path=function(){var e;return e=this.group?this.group===!0?"groups/":"groups/"+this.group+"/":"","/projects/"+t.current.project+"/"+e+"subjects"},o.next=function(e,t){var o,r,s,i=this;return this.trigger("get-next"),null!=(s=this.current)&&s.destroy(),this.current=null,r=new n.Deferred,r.then(e,t),0===this.count()?(o=this.fetch(),o.done(function(){var e;return null!=(e=i.first())&&e.select(),i.current?r.resolve(i.current):(i.trigger("no-more"),r.reject.apply(r,arguments))}),o.fail(function(){return r.reject.apply(r,arguments)})):(this.first().select(),r.resolve(this.current),this.count()<this.queueMin&&this.fetch()),r.promise()},o.trackSeenSubject=function(e){return this.seenThisSession.push(e.zooniverse_id)},o.hasSeenSubject=function(e){var n;return n=e.zooniverse_id,l.call(this.seenThisSession,n)>=0},o.fetch=function(e,o,r){var s,i,a,l,u=this;return"function"==typeof e&&(l=[e,o,{}],o=l[0],r=l[1],e=l[2]),i=(e||{}).limit,null==i&&(i=this.queueMax-this.count()),s=new n.Deferred,s.then(o,r),i>0?(a=t.current.get(this.path(),{limit:i}),a.done(function(e){var n,t;for(n=function(){var n,o,r;for(r=[],n=0,o=e.length;o>n;n++)t=e[n],this.hasSeenSubject(t)||(this.trackSeenSubject(t),r.push(new this(t)));return r}.call(u);!(u.seenThisSession.length<1e3);)u.seenThisSession.shift();return u.trigger("fetch",[n]),s.resolve(n)}),a.fail(function(){var e;return u.trigger("fetching-fallback"),e=n.get(u.fallback),e.done(function(e){var n,t,o,r,i;if(u.group){for(t=[],r=0,i=e.length;i>r;r++)o=e[r],o.group_id===u.group&&t.push(o);e=t}return e.sort(function(){return Math.random()-.5}),n=function(){var n,t,r;for(r=[],n=0,t=e.length;t>n;n++)o=e[n],r.push(new this(o));return r}.call(u),u.trigger("fetch",[n]),s.resolve(n)}),e.fail(function(){return u.trigger("fetch-fail"),s.fail.apply(s,arguments)})})):s.resolve(this.instances.slice(0,number)),s.promise()},o.prototype.id="",o.prototype.zooniverse_id="",o.prototype.classification_count=null,o.prototype.coords=null,o.prototype.location=null,o.prototype.metadata=null,o.prototype.project_id="",o.prototype.group_id="",o.prototype.workflow_ids=null,o.prototype.tutorial=null,o.prototype.preload=!0,o.prototype.preloadImages=function(){var e,n,t,o,r;if(this.preload){o=this.location,r=[];for(t in o)e=o[t],e instanceof Array||(e=[e]),this.isImage(e)&&r.push(function(){var t,o,r;for(r=[],t=0,o=e.length;o>t;t++)n=e[t],r.push((new Image).src=n);return r}());return r}},o.prototype.select=function(){return this.constructor.current=this,this.trigger("select")},o.prototype.destroy=function(){return this.constructor.current===this&&(this.constructor.current=null),o.__super__.destroy.apply(this,arguments)},o.prototype.isImage=function(e){var n,t,o,r;for(t=0,o=e.length;o>t;t++)if(n=e[t],"gif"!==(r=n.split(".").pop())&&"jpg"!==r&&"png"!==r)return!1;return!0},o.prototype.talkHref=function(){var e;return e=this.domain||location.hostname.replace(/^www\./,""),"http://talk."+e+"/#/subjects/"+this.zooniverse_id},o.prototype.socialImage=function(){var e;return e=this.location.standard instanceof Array?this.location.standard[Math.floor(this.location.standard.length/2)]:this.location.standard,n("<a href='"+e+"'></a>").get(0).href},o.prototype.socialTitle=function(){return"Zooniverse classification"},o.prototype.socialMessage=function(){return"Classifying on the Zooniverse!"},o.prototype.facebookHref=function(){return("https://www.facebook.com/sharer/sharer.php\n?s=100\n&p[url]="+encodeURIComponent(this.talkHref())+"\n&p[title]="+encodeURIComponent(this.socialTitle())+"\n&p[summary]="+encodeURIComponent(this.socialMessage())+"\n&p[images][0]="+this.socialMessage()).replace("\n","","g")},o.prototype.twitterHref=function(){var e;return e=""+this.socialMessage()+" "+this.talkHref(),"http://twitter.com/home?status="+encodeURIComponent(e)},o.prototype.pinterestHref=function(){return("http://pinterest.com/pin/create/button/\n?url="+encodeURIComponent(this.talkHref())+"\n&media="+encodeURIComponent(this.socialImage())+"\n&description="+encodeURIComponent(this.socialMessage())).replace("\n","","g")},o}(o),e.zooniverse.models.Subject=r,"undefined"!=typeof module&&null!==module&&(module.exports=r)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c={}.hasOwnProperty,p=function(e,n){function t(){this.constructor=e}for(var o in n)c.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(l=e.zooniverse).models&&(l.models={}),o=e.zooniverse.models.BaseModel||require("./base-model"),t=e.zooniverse.Api||require("../lib/api"),a=e.zooniverse.models.User||require("./user"),s=e.zooniverse.models.Subject||require("./subject"),n=e.jQuery,i=function(e){function n(){return u=n.__super__.constructor.apply(this,arguments)}return p(n,e),n}(s),r=function(e){function o(){var e,n,t,r,s,a,l,u;for(o.__super__.constructor.apply(this,arguments),null==this.subjects&&(this.subjects=[]),this.project_id||(this.project_id=null!=(s=this.subjects[0])?s.project_id:void 0),this.workflow_id||(this.workflow_id=null!=(a=this.subjects[0])&&null!=(l=a.workflow_ids)?l[0]:void 0),this.created_at||(this.created_at=(new Date).toUTCString()),u=this.subjects,e=t=0,r=u.length;r>t;e=++t)n=u[e],this.subjects[e]=new i(n)}return p(o,e),o.type="recent",o.path=function(){var e;return"/projects/"+t.current.project+"/users/"+(null!=(e=a.current)?e.id:void 0)+"/"+this.type+"s"},o.fetch=function(e,o,r){var s,i,a,l=this;return this.trigger("fetching"),"function"==typeof e&&(a=[e,o,{}],o=a[0],r=a[1],e=a[2]),e=n.extend({page:1,per_page:10},e),s=new n.Deferred,s.then(o,r),i=t.current.get(this.path(),e),i.done(function(e){var n,t;return n=function(){var n,o,r,s;for(r=e.reverse(),s=[],n=0,o=r.length;o>n;n++)t=r[n],s.push(new this(t));return s}.call(l),l.trigger("fetch",[n]),s.resolve(n)}),i.fail(function(){return l.trigger("fetch-fail"),s.reject.apply(s,arguments)}),s.promise()},o.clearOnUserChange=function(){var e;return e=this,a.on("change",function(){var n;for(n=[];0!==e.count();)n.push(e.first().destroy());return n})},o.clearOnUserChange(),o.prototype.subjects=null,o.prototype.project_id="",o.prototype.workflow_id="",o.prototype.created_at="",o}(o),e.zooniverse.models.Recent=r,"undefined"!=typeof module&&null!==module&&(module.exports=r)}.call(this),function(){var n,t,o,r,s,i,a,l=function(e,n){return function(){return e.apply(n,arguments)}},u={}.hasOwnProperty,c=function(e,n){function t(){this.constructor=e}for(var o in n)u.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(i=e.zooniverse).models&&(i.models={}),r=e.zooniverse.models.Recent||require("./recent"),t=e.zooniverse.Api||require("../lib/api"),s=e.zooniverse.models.User||require("./user"),n=e.jQuery,o=function(e){function n(){return this.toJSON=l(this.toJSON,this),a=n.__super__.constructor.apply(this,arguments)}return c(n,e),n.type="favorite",n.clearOnUserChange(),n.prototype.toJSON=function(){var e;return{favorite:{subject_ids:function(){var n,t,o,r;for(o=this.subjects,r=[],n=0,t=o.length;t>n;n++)e=o[n],r.push(e.id);return r}.call(this)}}},n.prototype.send=function(){var e=this;return this.trigger("sending"),t.current.post("/projects/"+t.current.project+"/favorites",this.toJSON(),function(n){return e.id=n.id,e.trigger("send")})},n.prototype["delete"]=function(){var e=this;return this.trigger("deleting"),t.current["delete"]("/projects/"+t.current.project+"/favorites/"+this.id,function(){return e.trigger("delete"),e.destroy()})},n}(r),e.zooniverse.models.Favorite=o,"undefined"!=typeof module&&null!==module&&(module.exports=o)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c,p,d,h,v,g,f,m,y={}.hasOwnProperty,z=function(e,n){function t(){this.constructor=e}for(var o in n)y.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e},w=[].indexOf||function(e){for(var n=0,t=this.length;t>n;n++)if(n in this&&this[n]===e)return n;return-1},b=[].slice;o=(null!=(c=e.zooniverse)&&null!=(p=c.models)?p.BaseModel:void 0)||require("./base-model"),t=(null!=(d=e.zooniverse)?d.Api:void 0)||require("../lib/api"),l=(null!=(h=e.zooniverse)&&null!=(v=h.models)?v.Recent:void 0)||require("../models/recent"),s=(null!=(g=e.zooniverse)&&null!=(f=g.models)?f.Favorite:void 0)||require("../models/favorite"),i=(null!=(m=e.zooniverse)?m.LanguageManager:void 0)||require("../lib/language-manager"),n=e.jQuery,a=(new n.Deferred).resolve().state(),r=function(o){function r(){r.__super__.constructor.apply(this,arguments),null==this.annotations&&(this.annotations=[]),this.generic={},this.started_at=(new Date).toUTCString(),this.user_agent=e.navigator.userAgent}return z(r,o),r.pending=JSON.parse(localStorage.getItem("pending-classifications"))||[],r.sentThisSession=0,r.sendPending=function(){var e,o,r,i,l,u,c=this;if(0!==this.pending.length){for(this.trigger("sending-pending",[e]),o=[],l=this.pending,u=[],r=0,i=l.length;i>r;r++)e=l[r],u.push(function(e){var r;return r=t.current.post(e.url,e),o.push(r),r.done(function(){var n,t;return c.trigger("send-pending",[e]),e.favorite?(n=new s({subjects:function(){var n,o,r,s;for(r=e.subject_ids,s=[],n=0,o=r.length;o>n;n++)t=r[n],s.push({id:t});return s}()}),n.send()):void 0}),r.fail(function(){return c.trigger("send-pending-fail",[e])}),n.when.apply(n,o).always(function(){var e,n,t;for(e=n=t=o.length-1;0>=t?0>=n:n>=0;e=0>=t?++n:--n)o[e].state()===a&&c.pending.splice(e,1);return localStorage.setItem("pending-classifications",JSON.stringify(c.pending))})}(e));return u}},r.prototype.subjects=[],r.prototype.subject=null,r.prototype.annotations=null,r.prototype.favorite=!1,r.prototype.generic=null,r.prototype.started_at=null,r.prototype.finished_at=null,r.prototype.user_agent=null,r.prototype.normalizeSubjects=function(){return this.subjects.length>0?this.subject||(this.subject=this.subjects[0]):this.subjects=[this.subject]},r.prototype.annotate=function(e){return this.annotations.push(e),e},r.prototype.removeAnnotation=function(e){var n,t,o,r,s;for(s=this.annotations,t=o=0,r=s.length;r>o;t=++o)if(n=s[t],n===e)return this.annotations.splice(t,1)},r.prototype.isTutorial=function(){var e;return this.normalizeSubjects(),w.call(function(){var n,t,o,r,s;for(o=this.subjects,s=[],n=0,t=o.length;t>n;n++)e=o[n],s.push(null!=(r=e.metadata)?r.tutorial:void 0);return s}.call(this),!0)>=0},r.prototype.set=function(e,n){return this.generic[e]=n,this.trigger("change",[e,n])},r.prototype.get=function(e){return this.generic[e]},r.prototype.toJSON=function(){var e,n,t,o,r,s,a;null!=i.current&&this.set("lang",i.current.code),this.normalizeSubjects(),r=function(){var e,n,t,r;for(t=this.subjects,r=[],e=0,n=t.length;n>e;e++)o=t[e],r.push(o.id);return r}.call(this),t={classification:{subject_ids:r,annotations:this.annotations.concat([{started_at:this.started_at,finished_at:this.finished_at},{user_agent:this.user_agent}])}},a=this.generic;for(n in a)s=a[n],e={},e[n]=s,t.classification.annotations.push(e);return this.favorite&&(t.classification.favorite=!0),t},r.prototype.url=function(){return this.normalizeSubjects(),"/projects/"+t.current.project+"/workflows/"+this.subjects[0].workflow_ids[0]+"/classifications"},r.prototype.send=function(){var e,n,o=this;return this.isTutorial()||(this.constructor.sentThisSession+=1),this.finished_at=(new Date).toUTCString(),e=(n=t.current).post.apply(n,[this.url(),this.toJSON()].concat(b.call(arguments))),e.done(function(){return o.makeRecent(),o.constructor.sendPending()}),e.fail(function(){return o.makePending()}),this.trigger("send")},r.prototype.makePending=function(){var e;return e=this.toJSON(),e.url=this.url(),this.constructor.pending.push(e),localStorage.setItem("pending-classifications",JSON.stringify(this.constructor.pending)),this.trigger("pending")},r.prototype.makeRecent=function(){var e,n,t,o,r,i,a;for(this.normalizeSubjects(),i=this.subjects,a=[],o=0,r=i.length;r>o;o++)t=i[o],n=new l({subjects:[t]}),n.trigger("from-classification"),this.favorite?(e=new s({subjects:[t]}),a.push(e.trigger("from-classification"))):a.push(void 0);return a},r}(o),null==e.zooniverse&&(e.zooniverse={}),null==(u=e.zooniverse).models&&(u.models={}),e.zooniverse.models.Classification=r,"undefined"!=typeof module&&null!==module&&(module.exports=r)}.call(this),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(e){e||(e={});var n,t=[],o=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?s(e):""},r=e.safe,s=e.escape;return n=e.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var e;e=this.className||"zooniverse-logo",t.push('\n\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" class="'),t.push(o(e)),t.push('" width="1em" height="1em">\n <g class="'),t.push(o(e)),t.push('" fill="currentColor" stroke="transparent" stroke-width="0" transform="translate(50, 50)">\n <path d="M 0 -45 A 45 45 0 0 1 0 45 A 45 45 0 0 1 0 -45 Z M 0 -30 A 30 30 0 0 0 0 30 A 30 30 0 0 0 0 -30 Z" />\n <path d="M 0 -12.5 A 12.5 12.5 0 0 1 0 12.5 A 12.5 12.5 0 0 1 0 -12.5 Z" />\n <path d="M 0 -75 L 5 0 L 0 75 L -5 0 Z" transform="rotate(50)" />\n </g>\n</svg>\n')}).call(this)}.call(e),e.safe=r,e.escape=s,t.join("")},e.zooniverse.views.zooniverseLogoSvg=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(e){e||(e={});var n,t=[],o=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?s(e):""},r=e.safe,s=e.escape;return n=e.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var e;e=this.className||"zooniverse-group-icon",t.push('\n\n<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 100" class="'),t.push(o(e)),t.push('" width="2em" height="1em">\n '),null==document.getElementById("zooniverse-groups-icon-person")&&t.push('\n <defs>\n <path id="zooniverse-groups-icon-person" d="M 0 -50 A 25 35 0 0 1 20 10 A 67 67 0 0 1 50 45 L 0 50 L -50 45 A 67 67 0 0 1 -20 10 A 25 35 0 0 1 0 -50 Z" />\n </defs>\n '),t.push('\n\n <g class="'),t.push(o(e)),t.push('" fill="currentColor" stroke="transparent" stroke-width="0" transform="translate(100, 50)">\n <use xlink:href="#zooniverse-groups-icon-person" transform="scale(0.67) translate(-80, 0)" opacity="0.75" />\n <use xlink:href="#zooniverse-groups-icon-person" transform="scale(0.67) translate(80, 0)" opacity="0.75" />\n <use xlink:href="#zooniverse-groups-icon-person" />\n </g>\n</svg>\n')}).call(this)}.call(e),e.safe=r,e.escape=s,t.join("")},e.zooniverse.views.groupIconSvg=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(e){e||(e={});var n,t=[],o=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?s(e):""},r=e.safe,s=e.escape;return n=e.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var e;e=this.className||"zooniverse-mail-icon",t.push('\n\n<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 100" class="'),t.push(o(e)),t.push('" width="1.5em" height="1em">\n <g class="'),t.push(o(e)),t.push('" fill="currentColor" stroke="transparent" stroke-width="0">\n <path d="M 0 0 L 75 65 L 150 0 Z" />\n <path d="M 0 0 L 75 75 L 150 0 L 150 100 L 0 100 Z" opacity="0.85" />\n </g>\n</svg>\n')}).call(this)}.call(e),e.safe=r,e.escape=s,t.join("")},e.zooniverse.views.mailIconSvg=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(e){e||(e={});var n,t=[],o=e.safe,r=e.escape;return n=e.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},r||(r=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<div class="underlay">\n <div class="container">\n <div class="dialog"></div>\n </div>\n</div>\n')}).call(this)}.call(e),e.safe=o,e.escape=r,t.join("")},e.zooniverse.views.dialog=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(n){n||(n={});var t,o=[],r=n.safe,s=n.escape;return t=n.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},s||(s=n.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var n,t,r,s,i,a,l,u,c,p,d;r=(null!=(i=e.zooniverse)?i.translate:void 0)||require("../lib/translate"),o.push("\n"),s=(null!=(a=e.zooniverse)&&null!=(l=a.views)?l.zooniverseLogoSvg:void 0)||require("./zooniverse-logo-svg"),o.push("\n"),n=(null!=(u=e.zooniverse)&&null!=(c=u.views)?c.groupIconSvg:void 0)||require("./group-icon-svg"),o.push("\n"),t=(null!=(p=e.zooniverse)&&null!=(d=p.views)?d.mailIconSvg:void 0)||require("./mail-icon-svg"),o.push('\n\n<div class="corner">\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none">\n <path d="M 0 0 L 100 0 L 100 100 Z" />\n </svg>\n</div>\n\n<div class="no-user">\n <div class="zooniverse-info piece">\n '),o.push(s()),o.push("\n "),o.push(r("topBarHeading")),o.push('\n </div>\n\n <div class="sign-in piece">\n <button name="sign-up">'),o.push(r("signUp")),o.push('</button>\n <span class="separator">|</span>\n <button name="sign-in">'),o.push(r("signIn")),o.push('</button>\n </div>\n</div>\n\n<div class="current-user">\n <div class="user-info piece">\n <div class="current-user-name">—</div>\n\n <div class="sign-out">\n <button name="sign-out">'),o.push(r("signOut")),o.push('</button>\n </div>\n </div>\n\n <div class="groups piece">\n <div class="groups-menu-toggle">\n <button name="groups">'),o.push(n()),o.push('</button>\n </div>\n </div>\n\n <div class="messages piece">\n <a href="'),o.push(this.talkProfileHref),o.push('" class="message-link">\n '),o.push(t()),o.push('\n <span class="message-count">—</span>\n </a>\n </div>\n\n <div class="avatar piece">\n <a href="https://www.zooniverse.org/projects/current"><img src="" /></a>\n </div>\n</div>\n\n<div class="languages piece">\n <button name="languages-menu-toggle"></button> \n</div>\n')}).call(this)}.call(n),n.safe=r,n.escape=s,o.join("")},e.zooniverse.views.topBar=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(n){n||(n={});var t,o=[],r=n.safe,s=n.escape;return t=n.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},s||(s=n.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var n,t;n=(null!=(t=e.zooniverse)?t.translate:void 0)||require("../lib/translate"),o.push('\n<input type="text" name="username" required="required" data-zooniverse-translate="" data-zooniverse-translate-placeholder="username" />\n<input type="password" name="password" required="required" data-zooniverse-translate="" data-zooniverse-translate-placeholder="password" />\n<button type="submit">'),o.push(n("signIn")),o.push('</button>\n<button name="sign-out">'),o.push(n("signOut")),o.push('</button>\n<div class="error-message"></div>\n')}).call(this)}.call(n),n.safe=r,n.escape=s,o.join("")},e.zooniverse.views.loginForm=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(e){e||(e={});var n,t=[],o=e.safe,r=e.escape;return n=e.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},r||(r=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var e,n,o;e=("undefined"!=typeof zooniverse&&null!==zooniverse?zooniverse.translate:void 0)||require("../lib/translate"),t.push("\n"),n=("undefined"!=typeof zooniverse&&null!==zooniverse&&null!=(o=zooniverse.views)?o.zooniverseLogoSvg:void 0)||require("./zooniverse-logo-svg"),t.push('\n\n<div class="loader"></div>\n\n<button type="button" name="close-dialog">×</button>\n\n<header>\n '),t.push(n()),t.push("\n "),t.push(e("signInHeading")),t.push('\n</header>\n\n<label>\n <span class="text-label">'),t.push(e("username")),t.push('</span><br />\n <input type="text" name="username" required="required" />\n</label>\n\n<label>\n <span class="text-label">'),t.push(e("password")),t.push('</span><br />\n <input type="password" name="password" required="required" />\n</label>\n\n<div class="error-message"></div>\n\n<div class="action">\n <a href="https://www.zooniverse.org/password/reset">'),t.push(e("forgotPassword")),t.push('</a>\n <button type="submit">'),t.push(e("signIn")),t.push("</button>\n</div>\n")}).call(this)}.call(e),e.safe=o,e.escape=r,t.join("")},e.zooniverse.views.loginDialog=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(e){e||(e={});var n,t=[],o=e.safe,r=e.escape;return n=e.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},r||(r=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var e,n,o;e=("undefined"!=typeof zooniverse&&null!==zooniverse?zooniverse.translate:void 0)||require("../lib/translate"),t.push("\n"),n=("undefined"!=typeof zooniverse&&null!==zooniverse&&null!=(o=zooniverse.views)?o.zooniverseLogoSvg:void 0)||require("./zooniverse-logo-svg"),t.push('\n\n<div class="loader"></div>\n\n<button type="button" name="close-dialog">×</button>\n\n<header>\n '),t.push(n()),t.push("\n "),t.push(e("signUpHeading")),t.push('\n</header>\n\n<label>\n <span class="text-label">'),t.push(e("username")),t.push('</span><br />\n <input type="text" name="username" required="required" />\n</label>\n\n<label>\n <span class="text-label">'),t.push(e("password")),t.push('</span><br />\n <input type="password" name="password" required="required" />\n</label>\n\n<label>\n <span class="text-label">'),t.push(e("email")),t.push('</span><br />\n <input type="email" name="email" required="required" />\n</label>\n\n<label>\n <span class="text-label">'),t.push(e("realName")),t.push('</span><br />\n <input type="text" name="real-name" />\n <div class="explanation">'),t.push(e("whyRealName")),t.push('</div>\n</label>\n\n<label class="checkbox">\n <span></span>\n <input type="checkbox" required="required" />'),t.push(e("agreeToPrivacyPolicy")),t.push('\n</label>\n\n<label class="checkbox">\n <span></span>\n <input type="checkbox" name="beta-preference" />'),t.push(e("betaPreference")),t.push('\n</label>\n\n<div class="error-message"></div>\n\n<div class="action">\n <button type="submit">'),t.push(e("signUp")),t.push("</button>\n</div>\n")}).call(this)}.call(e),e.safe=o,e.escape=r,t.join("")},e.zooniverse.views.signupDialog=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(e){e||(e={});var n,t=[],o=e.safe,r=e.escape;return n=e.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},r||(r=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){t.push('<div class="loader"></div>\n\n<div class="items"></div>\n\n<nav class="controls">\n <span class="numbered"></span>\n</nav>\n')}).call(this)}.call(e),e.safe=o,e.escape=r,t.join("")},e.zooniverse.views.paginator=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(n){n||(n={});
var t,o=[],r=n.safe,s=n.escape;return t=n.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},s||(s=n.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var n,t;n=(null!=(t=e.zooniverse)?t.translate:void 0)||require("../lib/translate"),o.push('\n\n<form class="sign-in-form">\n <div class="loader"></div>\n\n <header>'),o.push(n("signInForProfile")),o.push('</header>\n <label><input type="text" name="username" required="required" data-zooniverse-translate="" data-zooniverse-translate-placeholder="username" /></label>\n <label><input type="password" name="password" required="required" data-zooniverse-translate="" data-zooniverse-translate-placeholder="password" /></label>\n <div class="error-message"></div>\n <div class="action"><button type="submit">'),o.push(n("signIn")),o.push('</button></div>\n <p class="no-account">'),o.push(n("noAccount")),o.push(' <button name="sign-up">'),o.push(n("signUp")),o.push('</button></p>\n</form>\n\n<nav>\n <button name="turn-page" value="recents">'),o.push(n("recents")),o.push('</button>\n <button name="turn-page" value="favorites">'),o.push(n("favorites")),o.push('</button>\n</nav>\n\n<div class="recents page"></div>\n<div class="recents-empty empty-message">'),o.push(n("recents")),o.push(" ("),o.push(n("none")),o.push(')</div>\n\n<div class="favorites page"></div>\n<div class="favorites-empty empty-message">'),o.push(n("favorites")),o.push(" ("),o.push(n("none")),o.push(")</div>\n")}).call(this)}.call(n),n.safe=r,n.escape=s,o.join("")},e.zooniverse.views.profile=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(n){n||(n={});var t,o=[],r=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?i(e):""},s=n.safe,i=n.escape;return t=n.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},i||(i=n.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var n,t,s,i,a,l,u;n=(null!=(i=e.zooniverse)&&null!=(a=i.models)?a.Favorite:void 0)||require("zooniverse/models/favorite"),o.push("\n\n<div class='item'>\n <a href=\""),o.push(r((null!=(l=this.subjects[0])?l.talkHref():void 0)||"#/SUBJECT_ERROR")),o.push('">\n '),t=null!=(u=this.subjects[0])?u.location:void 0,o.push("\n "),s=null,o.push("\n "),null==s&&(s=null!=t?t.thumb:void 0),o.push("\n "),(null!=t?t.standard:void 0)instanceof Array&&null==s&&(s=null!=t?t.standard[0]:void 0),o.push("\n "),null==s&&(s=null!=t?t.standard:void 0),o.push('\n <img src="'),o.push(r(s||"")),o.push('" />\n </a>\n</div>\n')}).call(this)}.call(n),n.safe=s,n.escape=i,o.join("")},e.zooniverse.views.profileItem=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(n){n||(n={});var t,o=[],r=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?i(e):""},s=n.safe,i=n.escape;return t=n.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},i||(i=n.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var n,t,s,i,a,l,u,c,p,d,h,v,g;if(i=("undefined"!=typeof zooniverse&&null!==zooniverse?zooniverse.translate:void 0)||require("../lib/translate"),o.push("\n"),a=(null!=(d=e.zooniverse)&&null!=(h=d.views)?h.zooniverseLogoSvg:void 0)||require("./zooniverse-logo-svg"),o.push('\n\n<a href="https://www.zooniverse.org/" class="zooniverse-logo-container">\n '),o.push(a()),o.push('\n</a>\n\n<div class="zooniverse-footer-content">\n <div class="zooniverse-footer-heading">'),o.push(i("footerHeading")),o.push("</div>\n\n "),null!=this.categories){for(o.push('\n <div class="zooniverse-footer-projects">\n '),v=this.categories,l=0,c=v.length;c>l;l++){for(g=v[l],n=g.category,s=g.projects,o.push('\n <div class="zooniverse-footer-category">\n <div class="zooniverse-footer-category-title">'),o.push(r(n)),o.push("</div>\n "),u=0,p=s.length;p>u;u++)t=s[u],o.push('\n <div class="zooniverse-footer-project">\n <a href="'),o.push(r(t.url)),o.push('">'),o.push(r(t.name)),o.push("</a>\n </div>\n ");o.push('\n <div class="zooniverse-footer-project"></div>\n </div>\n ')}o.push("\n </div>\n ")}o.push('\n\n <div class="zooniverse-footer-general">\n <div class="zooniverse-footer-category">\n <a href="'),o.push(this.privacyLink),o.push('">'),o.push(i("privacyPolicy")),o.push('</a>\n </div>\n\n <div class="zooniverse-footer-category">\n <a href="'),o.push(this.sourceLink),o.push('">'),o.push(i("forkOnGitHub")),o.push("</a>\n </div>\n </div>\n</div>\n")}).call(this)}.call(n),n.safe=s,n.escape=i,o.join("")},e.zooniverse.views.footer=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(e){e||(e={});var n,t=[],o=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?s(e):""},r=e.safe,s=e.escape;return n=e.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},s||(s=e.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var e,n,r,s,i,a;for(t.push('<div class="user-groups">\n '),i=this.user_groups||[],r=0,s=i.length;s>r;r++)a=i[r],e=a.id,n=a.name,t.push('\n <div class="user-group">\n <button name="user-group" value="'),t.push(o(e)),t.push('" '),e===this.user_group_id&&t.push('class="active"'),t.push(">"),t.push(o(n)),t.push("</button>\n </div>\n ");t.push("\n</div>\n")}).call(this)}.call(e),e.safe=r,e.escape=s,t.join("")},e.zooniverse.views.groupsMenu=template,"undefined"!=typeof module&&(module.exports=template),e.zooniverse=e.zooniverse||{},e.zooniverse.views=e.zooniverse.views||{},template=function(n){n||(n={});var t,o=[],r=function(e){return e&&e.ecoSafe?e:"undefined"!=typeof e&&null!=e?i(e):""},s=n.safe,i=n.escape;return t=n.safe=function(e){if(e&&e.ecoSafe)return e;("undefined"==typeof e||null==e)&&(e="");var n=new String(e);return n.ecoSafe=!0,n},i||(i=n.escape=function(e){return(""+e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}),function(){(function(){var n,t,s,i,a,l;n=e.zooniverse.LanguageManager||require("../lib/language-manager"),o.push('\n\n<div class="languages">\n '),a=null!=(i=n.current)?i.translations:void 0;for(t in a)s=a[t].label,o.push('\n <div class="language">\n <button name="language" value="'),o.push(r(t)),o.push('" '),t===(null!=(l=n.current)?l.code:void 0)&&o.push('class="active"'),o.push(">"),o.push(r(s)),o.push("</button>\n </div>\n ");o.push("\n</div>\n")}).call(this)}.call(n),n.safe=s,n.escape=i,o.join("")},e.zooniverse.views.languagesMenu=template,"undefined"!=typeof module&&(module.exports=template),function(){var n,t,o,r,s,i={}.hasOwnProperty,a=function(e,n){function t(){this.constructor=e}for(var o in n)i.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e},l=[].slice;null==e.zooniverse&&(e.zooniverse={}),null==(s=e.zooniverse).controllers&&(s.controllers={}),o=e.zooniverse.EventEmitter||require("../lib/event-emitter"),n=e.jQuery,r=0,t=function(e){function t(e){var o,s;null==e&&(e={}),t.__super__.constructor.apply(this,arguments);for(o in e)i.call(e,o)&&(s=e[o],o in this&&(this[o]=s));this.id||(this.id="controller_"+r),r+=1,null==this.el&&(this.el=document.createElement(this.tagName)),this.el=n(this.el),this.renderTemplate(),this.delegateEvents(),this.nameElements()}return a(t,e),t.prototype.el=null,t.prototype.tagName="div",t.prototype.className="",t.prototype.template=null,t.prototype.id="",t.prototype.events=null,t.prototype.elements=null,t.prototype.renderTemplate=function(){return this.className&&this.el.addClass(this.className),this.el.html()||("string"==typeof this.template&&this.el.html(this.template),"function"!=typeof this.template)?void 0:this.el.html(this.template(this))},t.prototype.nameElements=function(){var e,n,t,o;if(null!=this.elements){t=this.elements,o=[];for(n in t)e=t[n],o.push(this[e]=this.el.find(n));return o}},t.prototype.delegateEvents=function(){var e,n,t,o,r=this;if(this.el.off("."+this.id),null!=this.events){t=this.events,o=[];for(e in t)n=t[e],o.push(function(e,n){var t,o,s,i;return i=e.split(/\s+/),o=i[0],s=2<=i.length?l.call(i,1):[],s=s.join(" "),"*"===o.slice(-1)&&(o=o.slice(0,-1),t=!0),"string"==typeof n&&(n=r[n]),r.el.on(""+o+"."+r.id,s,function(e){return t&&e.preventDefault(),n.call.apply(n,[r].concat(l.call(arguments)))})}(e,n));return o}},t.prototype.destroy=function(){var e,n,o;if(null!=this.elements){o=this.elements;for(n in o)e=o[n],this[e]=null}return this.el.off(),this.el.empty(),this.el.remove(),t.__super__.destroy.apply(this,arguments)},t}(o),e.zooniverse.controllers.BaseController=t,"undefined"!=typeof module&&null!==module&&(module.exports=t)}.call(this),function(){var n,t,o,r,s,i,a,l={}.hasOwnProperty,u=function(e,n){function t(){this.constructor=e}for(var o in n)l.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(i=e.zooniverse).controllers&&(i.controllers={}),null==(a=e.zooniverse).views&&(a.views={}),n=zooniverse.controllers.BaseController||require("./base-controller"),r=zooniverse.views.dialog||require("../views/dialog"),s=zooniverse.translate||require("../lib/translate"),o="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",t=function(n){function t(){t.__super__.constructor.apply(this,arguments),this.el.css({display:"none"}),this.warning&&this.el.addClass("warning"),this.error&&this.el.addClass("error"),this.el.attr("role","dialog"),this.el.attr("aria-hidden","true"),this.contentContainer.append(this.content),this.focusableContent=this.contentContainer.find("*").filter(o),t.focussedElement={},this.el.appendTo(document.body)}return u(t,n),t.prototype.warning=!1,t.prototype.error=!1,t.prototype.content="",t.prototype.className="zooniverse-dialog",t.prototype.template=r,t.prototype.events={'click button[name="close-dialog"]':"hide",keydown:"onKeyDown"},t.prototype.elements={".dialog":"contentContainer"},t.prototype.onKeyDown=function(n){var t,o,r;if(27===n.which&&this.hide(),9===n.which)if(t=e.jQuery(":focus"),o=this.focusableContent.index(t),r=this.focusableContent.length-1,n.shiftKey){if(0===o)return this.focusableContent.get(r).focus(),n.preventDefault()}else if(o===r)return this.focusableContent.get(0).focus(),n.preventDefault()},t.prototype.show=function(){var n,o,r,i,a=this;for(i=this.el.get(0).querySelectorAll("["+s.attr+"]"),o=0,r=i.length;r>o;o++)n=i[o],s.refresh(n);return this.el.css({display:""}),this.el.attr("aria-hidden","false"),t.focussedElement=e.jQuery(":focus"),setTimeout(function(){return a.el.addClass("showing"),a.contentContainer.find("input, textarea, select").first().focus()},300)},t.prototype.hide=function(){var e=this;return this.el.removeClass("showing"),null!=t.focussedElement.focus&&this.el.is(":visible")&&t.focussedElement.focus(),setTimeout(function(){return e.el.css({display:"none"}),e.el.attr("aria-hidden","true")},500)},t}(n),e.zooniverse.controllers.Dialog=t,"undefined"!=typeof module&&null!==module&&(module.exports=t)}.call(this),function(){var n,t,o,r,s,i,a,l,u={}.hasOwnProperty,c=function(e,n){function t(){this.constructor=e}for(var o in n)u.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(i=e.zooniverse).controllers&&(i.controllers={}),null==(a=e.zooniverse).models&&(a.models={}),t=zooniverse.controllers.BaseController||require("./base-controller"),r=zooniverse.models.User||require("../models/user"),s=zooniverse.translate||require("../lib/translate"),n="beta_opt_in",o=function(e){function t(){return l=t.__super__.constructor.apply(this,arguments)}return c(t,e),t.prototype.tagName="form",t.prototype.className="zooniverse-signup-form",t.prototype.events={"submit*":"onSubmit"},t.prototype.elements={'input[name="username"]':"usernameInput",'input[name="password"]':"passwordInput",'input[name="email"]':"emailInput",'input[name="real-name"]':"realNameInput",'input[name="beta-preference"]':"betaPreferenceInput",'button[type="submit"]':"signUpButton",".error-message":"errorContainer"},t.prototype.onSubmit=function(){var e,t=this;return this.el.addClass("loading"),this.signUpButton.attr({disabled:!0}),e=r.signup({username:this.usernameInput.val(),password:this.passwordInput.val(),email:this.emailInput.val(),real_name:this.realNameInput.val()}),e.done(function(e){var o,s,i;return s=e.success,o=e.message,s||t.showError(o),null!=(i=r.current)?i.setPreference(n,t.betaPreferenceInput.prop("checked"),!0):void 0}),e.fail(function(){return t.showError(s("signInFailed"))}),e.always(function(){return t.el.removeClass("loading"),t.signUpButton.attr({disabled:!1})})},t.prototype.showError=function(e){return this.errorContainer.html(e)},t}(t),e.zooniverse.controllers.SignupForm=o,"undefined"!=typeof module&&null!==module&&(module.exports=o)}.call(this),function(){var n,t,o,r,s,i,a,l;null==e.zooniverse&&(e.zooniverse={}),null==(i=e.zooniverse).controllers&&(i.controllers={}),null==(a=e.zooniverse).views&&(a.views={}),null==(l=e.zooniverse).models&&(l.models={}),n=zooniverse.controllers.Dialog||require("./dialog"),t=zooniverse.controllers.SignupForm||require("./signup-form"),s=zooniverse.views.signupDialog||require("../views/signup-dialog"),o=zooniverse.models.User||require("../models/user"),r=new n({content:new t({template:s}).el}),o.on("change",function(e,n){return null!=n?r.hide():void 0}),e.zooniverse.controllers.signupDialog=r,"undefined"!=typeof module&&null!==module&&(module.exports=r)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c,p={}.hasOwnProperty,d=function(e,n){function t(){this.constructor=e}for(var o in n)p.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(l=e.zooniverse).controllers&&(l.controllers={}),null==(u=e.zooniverse).views&&(u.views={}),null==(c=e.zooniverse).models&&(c.models={}),t=zooniverse.controllers.BaseController||require("./base-controller"),i=zooniverse.views.loginForm||require("../views/login-form"),n=zooniverse.Api||require("../lib/api"),r=zooniverse.models.User||require("../models/user"),a=zooniverse.translate||require("../lib/translate"),s=zooniverse.controllers.signupDialog||require("./signup-dialog"),o=function(e){function n(){var e=this;n.__super__.constructor.apply(this,arguments),r.on("change",function(){return e.onUserChange.apply(e,arguments)})}return d(n,e),n.prototype.tagName="form",n.prototype.className="zooniverse-login-form",n.prototype.template=i,n.prototype.events={"submit*":"onSubmit",'click* button[name="sign-up"]':"onClickSignUp",'click* button[name="sign-out"]':"onClickSignOut"},n.prototype.elements={'input[name="username"]':"usernameInput",'input[name="password"]':"passwordInput",'button[type="submit"]':"signInButton",'button[name="sign-out"]':"signOutButton",".error-message":"errorContainer"},n.prototype.onSubmit=function(){var e,n=this;return this.el.addClass("loading"),this.signInButton.attr({disabled:!0}),e=r.login({username:this.usernameInput.val(),password:this.passwordInput.val()}),e.done(function(e){var t,o;return o=e.success,t=e.message,o?void 0:n.showError(t)}),e.fail(function(){return n.showError(a("signInFailed"))}),e.always(function(){return n.el.removeClass("loading"),setTimeout(function(){return n.signInButton.attr({disabled:null!=r.current})})})},n.prototype.onClickSignUp=function(){return s.show()},n.prototype.onClickSignOut=function(){return this.signOutButton.attr({disabled:!0}),r.logout()},n.prototype.onUserChange=function(e,n){return this.usernameInput.val((null!=n?n.name:void 0)||""),this.passwordInput.val((null!=n?n.api_key:void 0)||""),this.errorContainer.html(""),this.usernameInput.attr({disabled:null!=r.current}),this.passwordInput.attr({disabled:null!=r.current}),this.signInButton.attr({disabled:null!=r.current}),this.signOutButton.attr({disabled:null==r.current})},n.prototype.showError=function(e){return this.errorContainer.html(e)},n}(t),e.zooniverse.controllers.LoginForm=o,"undefined"!=typeof module&&null!==module&&(module.exports=o)}.call(this),function(){var n,t,o,r,s,i;null==e.zooniverse&&(e.zooniverse={}),null==(i=e.zooniverse).controllers&&(i.controllers={}),n=zooniverse.controllers.Dialog||require("./dialog"),t=zooniverse.controllers.LoginForm||require("./login-form"),s=zooniverse.views.loginDialog||require("../views/login-dialog"),o=zooniverse.models.User||require("../models/user"),r=new n({content:new t({template:s}).el}),o.on("change",function(e,n){return null!=n?r.hide():void 0}),e.zooniverse.controllers.loginDialog=r,"undefined"!=typeof module&&null!==module&&(module.exports=r)}.call(this),function(){var n,t,o,r,s=function(e,n){return function(){return e.apply(n,arguments)}},i=[].indexOf||function(e){for(var n=0,t=this.length;t>n;n++)if(n in this&&this[n]===e)return n;return-1};t=(null!=(r=zooniverse.util)?r.toggleClass:void 0)||require("../util/toggle-class"),n=function(){function n(n){var o,r;null==n&&(n={}),this.onResize=s(this.onResize,this),this.onButtonClick=s(this.onButtonClick,this),e.dropdown=this;for(o in n)r=n[o],this[o]=r;null==this.button&&(this.button=document.createElement(this.buttonTag)),t(this.button,this.constructor.buttonClass,!0),this.className&&t(this.button,this.className,!0),this.button.addEventListener("click",this.onButtonClick,!1),null==this.menu&&(this.menu=document.createElement(this.menuTag)),t(this.menu,this.constructor.menuClass,!0),this.menuClass&&t(this.menu,this.menuClass,!0),this.menu.style.position="absolute",this.menu.style.display="none",document.body.appendChild(this.menu),this.close(),this.constructor.instances.push(this),this.constructor.elements.push(this.button),this.constructor.elements.push(this.menu)}return n.buttonClass="zooniverse-dropdown-button",n.menuClass="zooniverse-dropdown-menu",n.instances=[],n.elements=[],n.closeAll=function(e){var n,t,o,r,s,i;for(n=(null!=e?e:{}).except,s=this.instances,i=[],o=0,r=s.length;r>o;o++)t=s[o],i.push(t!==n?t.close():void 0);return i},addEventListener("mousedown",function(e){var t,o;for(o=!0,t=e.target.correspondingUseElement||e.target;null!=t;){if(i.call(n.elements,t)>=0){o=!1;break}t=t.parentNode}return o?n.closeAll():void 0}),n.prototype.button=null,n.prototype.buttonClass="",n.prototype.buttonTag="button",n.prototype.menu=null,n.prototype.menuClass="",n.prototype.menuTag="div",n.prototype.buttonPinning=[.5,1],n.prototype.menuPinning=[.5,0],n.prototype._open=null,n.prototype.openClass="open",n.prototype.animationDelay=250,n.prototype.onButtonClick=function(){return this.toggle()},n.prototype.toggle=function(){return this._open?this.close():this.open()},n.prototype.open=function(){var e=this;return this.constructor.closeAll({except:this}),t(this.button,this.openClass,!0),this.menu.style.display="",this.positionMenu(),setTimeout(function(){return t(e.menu,e.openClass,!0),e._open=!0}),addEventListener("resize",this.onResize,!1)},n.prototype.positionMenu=function(){var e;return e=this.button.getBoundingClientRect(),this.menu.style.left=e.left+pageXOffset+this.button.offsetWidth*this.buttonPinning[0]-this.menu.offsetWidth*this.menuPinning[0]+"px",this.menu.style.top=e.top+pageYOffset+this.button.offsetHeight*this.buttonPinning[1]-this.menu.offsetHeight*this.menuPinning[1]+"px"},n.prototype.onResize=function(){return this.positionMenu()},n.prototype.close=function(){var e=this;return t(this.button,this.openClass,!1),t(this.menu,this.openClass,!1),setTimeout(function(){return e.menu.style.display="none",e._open=!1},this.animationDelay),removeEventListener("resize",this.onResize,!1)},n.prototype.destroy=function(){var e,n;return this.constructor.instances.splice(this.constructor.instances.indexOf(this),1),this.constructor.elements.splice(this.constructor.instances.indexOf(this.button),1),this.constructor.elements.splice(this.constructor.instances.indexOf(this.menu),1),this.button.removeEventListener("click",this.onButtonClick,!1),null!=(e=this.button.parentNode)&&e.removeChild(this.button),null!=(n=this.menu.parentNode)?n.removeChild(this.menu):void 0},n}.call(this),null==e.zooniverse&&(e.zooniverse={}),null==(o=e.zooniverse).controllers&&(o.controllers={}),e.zooniverse.controllers.Dropdown=n,"undefined"!=typeof module&&null!==module&&(module.exports=n)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c,p,d,h,v=function(e,n){return function(){return e.apply(n,arguments)}},g={}.hasOwnProperty,f=function(e,n){function t(){this.constructor=e}for(var o in n)g.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};n=(null!=(a=e.zooniverse)&&null!=(l=a.controllers)?l.BaseController:void 0)||require("./base-controller"),t=(null!=(u=e.zooniverse)&&null!=(c=u.controllers)?c.Dropdown:void 0)||require("./dropdown"),o=(null!=(p=e.zooniverse)?p.LanguageManager:void 0)||require("../lib/language-manager"),s=(null!=(d=e.zooniverse)&&null!=(h=d.views)?h.languagesMenu:void 0)||require("../views/languages-menu"),r=function(e){function n(){this.onClickLanguageButton=v(this.onClickLanguageButton,this);var e,t=this;n.__super__.constructor.apply(this,arguments),null!=(e=o.current)&&e.on("change-language",function(e,n){return t.setLanguageButton(n)})}return f(n,e),n.prototype.className="zooniverse-languages-menu",n.prototype.template=s,n.prototype.events={'click button[name="language"]':"onClickLanguageButton"},n.prototype.onClickLanguageButton=function(e){var n;return null!=(n=o.current)&&n.setLanguage(e.currentTarget.value),t.closeAll()},n.prototype.setLanguageButton=function(e){var n,t;return t=this.el.find('button[value="'+e+'"]'),0!==t.length?(n=this.el.find('button[name="language"]'),n.removeClass("active"),t.addClass("active")):void 0},n}(n),null==e.zooniverse&&(e.zooniverse={}),null==(i=e.zooniverse).controllers&&(i.controllers={}),e.zooniverse.controllers.LanguagesMenu=r,"undefined"!=typeof module&&null!==module&&(module.exports=r)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c,p,d,h,v,g,f=function(e,n){return function(){return e.apply(n,arguments)}},m={}.hasOwnProperty,y=function(e,n){function t(){this.constructor=e}for(var o in n)m.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};t=(null!=(l=e.zooniverse)&&null!=(u=l.controllers)?u.BaseController:void 0)||require("./base-controller"),s=(null!=(c=e.zooniverse)&&null!=(p=c.models)?p.User:void 0)||require("../models/user"),i=(null!=(d=e.zooniverse)&&null!=(h=d.views)?h.groupsMenu:void 0)||require("../views/groups-menu"),n=e.jQuery,o=(null!=(v=e.zooniverse)&&null!=(g=v.controllers)?g.Dropdown:void 0)||require("./dropdown"),r=function(e){function t(){this.onUserChangeGroup=f(this.onUserChangeGroup,this),this.onUserChange=f(this.onUserChange,this),t.__super__.constructor.apply(this,arguments),s.on("change",this.onUserChange),s.on("change-group",this.onUserChangeGroup)}return y(t,e),t.prototype.className="zooniverse-groups-menu",t.prototype.events={'click button[name="user-group"]':"onClickGroupButton"},t.prototype.onUserChange=function(e,n){return null!=n&&(this.el.html(i(n)),n.user_group_id)?this.el.find("button[name='"+n.user_group_id+"']").click():void 0},t.prototype.onUserChangeGroup=function(e,n,t){var o;return o=this.el.find('button[name="user-group"]'),o.removeClass("active"),null!=t?o.filter("[value='"+t.id+"']").addClass("active"):void 0},t.prototype.onClickGroupButton=function(e){var t,r;return t=n(e.currentTarget),null!=(r=s.current)&&r.setGroup(t.val()||"TODO_HOW_DO_I_STOP_CLASSIFYING_AS_PART_OF_A_GROUP"),o.closeAll()},t}(t),null==e.zooniverse&&(e.zooniverse={}),null==(a=e.zooniverse).controllers&&(a.controllers={}),e.zooniverse.controllers.GroupsMenu=r,"undefined"!=typeof module&&null!==module&&(module.exports=r)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c,p,d,h,v,g,f,m=function(e,n){return function(){return e.apply(n,arguments)}},y={}.hasOwnProperty,z=function(e,n){function t(){this.constructor=e}for(var o in n)y.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(h=e.zooniverse).controllers&&(h.controllers={}),null==(v=e.zooniverse).views&&(v.views={}),null==(g=e.zooniverse).lib&&(g.lib={}),null==(f=e.zooniverse).models&&(f.models={}),t=zooniverse.controllers.BaseController||require("./base-controller"),c=zooniverse.controllers.loginDialog||require("./login-dialog"),p=zooniverse.controllers.signupDialog||require("./signup-dialog"),d=zooniverse.views.topBar||require("../views/top-bar"),o=zooniverse.controllers.Dropdown||require("./dropdown"),r=zooniverse.controllers.GroupsMenu||require("./groups-menu"),s=zooniverse.LanguageManager||require("../lib/language-manager"),i=zooniverse.controllers.LanguagesMenu||require("./languages-menu"),n=zooniverse.Api||require("../lib/api"),l=zooniverse.models.User||require("../models/user"),u="http://talk."+location.hostname.replace(/^www\./,"")+"/#/profile",a=function(e){function t(){this.onLanguageChange=m(this.onLanguageChange,this),this.onUserChangeGroup=m(this.onUserChangeGroup,this),this.getMessages=m(this.getMessages,this),this.onUserChange=m(this.onUserChange,this),t.__super__.constructor.apply(this,arguments),this.groupsMenu=new r,this.groupsDropdown=new o({button:this.groupsMenuButton.get(0),buttonPinning:[1,1],menu:this.groupsMenu.el.get(0),menuClass:"from-top-bar",menuPinning:[1,0]}),this.el.toggleClass("has-languages",null!=s.current),null!=s.current&&(this.onLanguageChange(),s.on("change-language",this.onLanguageChange),this.languagesMenu=new i,this.languagesDropdown=new o({button:this.languagesMenuButton.get(0),buttonPinning:[1,1],menu:this.languagesMenu.el.get(0),menuClass:"from-top-bar",menuPinning:[1,0]})),l.on("change",this.onUserChange),l.on("change-group",this.onUserChangeGroup)}return z(t,e),t.prototype.className="zooniverse-top-bar",t.prototype.template=d,t.prototype.messageCheckTimeout=12e4,t.prototype.talkProfileHref=u,t.prototype.events={'click button[name="sign-in"]':"onClickSignIn",'click button[name="sign-up"]':"onClickSignUp",'click button[name="sign-out"]':"onClickSignOut"},t.prototype.elements={".current-user-name":"currentUserName",'button[name="groups"]':"groupsMenuButton",'button[name="languages-menu-toggle"]':"languagesMenuButton",".message-count":"messageCount",".avatar img":"avatarImage",".group":"currentGroup"},t.prototype.onClickSignIn=function(){return p.hide(),c.show()},t.prototype.onClickSignUp=function(){return c.hide(),p.show()},t.prototype.onClickSignOut=function(){return l.logout()},t.prototype.onUserChange=function(e,n){var t;return this.el.toggleClass("signed-in",null!=n),this.el.toggleClass("has-groups",(null!=n&&null!=(t=n.user_groups)?t.length:void 0)>0),this.onUserChangeGroup(e,null!=n,null!=n?n.user_group_id:void 0),this.getMessages(),this.currentUserName.html((null!=n?n.name:void 0)||""),this.avatarImage.attr({src:null!=n?n.avatar:void 0})},t.prototype.getMessages=function(){var e=this;return null!=l.current?n.current.get("/talk/messages/count",function(n){return e.el.toggleClass("has-messages",0!==n),e.messageCount.html(n),setTimeout(e.getMessages,e.messageCheckTimeout)}):(this.el.removeClass("has-messages"),this.messageCount.html("0"))},t.prototype.onUserChangeGroup=function(e,n,t){return this.el.toggleClass("group-participant",null!=t)},t.prototype.onLanguageChange=function(){var e;return this.languagesMenuButton.html(null!=(e=s.current)?e.label():void 0)},t}(t),e.zooniverse.controllers.TopBar=a,"undefined"!=typeof module&&null!==module&&(module.exports=a)}.call(this),function(){var n,t,o,r,s,i,a,l=function(e,n){return function(){return e.apply(n,arguments)}},u={}.hasOwnProperty,c=function(e,n){function t(){this.constructor=e}for(var o in n)u.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(i=e.zooniverse).controllers&&(i.controllers={}),null==(a=e.zooniverse).views&&(a.views={}),t=e.zooniverse.controllers.BaseController||require("./base-controller"),s=e.zooniverse.views.paginator||require("../views/paginator"),r=e.zooniverse.models.User||require("../models/user"),n=e.jQuery,o=function(e){function t(){this.onItemDestroyed=l(this.onItemDestroyed,this),this.onItemFromClassification=l(this.onItemFromClassification,this),this.onFetchFail=l(this.onFetchFail,this),this.addItemToContainer=l(this.addItemToContainer,this),this.onFetch=l(this.onFetch,this),this.onUserChange=l(this.onUserChange,this),t.__super__.constructor.apply(this,arguments),r.on("change",this.onUserChange),this.type.on("from-classification",this.onItemFromClassification),this.type.on("destroy",this.onItemDestroyed)}return c(t,e),t.prototype.type=null,t.prototype.itemTemplate=null,t.prototype.className="zooniverse-paginator",t.prototype.template=s,t.prototype.pages=0,t.prototype.perPage=10,t.prototype.events={'click button[name="page"]':"onClickPage"},t.prototype.elements={".items":"itemsContainer",".numbered":"numbersContainer"},t.prototype.onUserChange=function(e,n){return this.reset(this.typeCount()),this.onFetch([]),null!=n?this.goTo(1):void 0},t.prototype.reset=function(e){var t,o,r,s,i;for(this.pages=Math.ceil(e/this.perPage),this.numbersContainer.empty(),i=[],o=r=0,s=this.pages;s>=0?s>r:r>s;o=s>=0?++r:--r)t=n("<button name='page' value='"+(o+1)+"'>"+(o+1)+"</button>"),i.push(this.numbersContainer.append(t));return i},t.prototype.onClickPage=function(e){var t,o;return o=e.target,t=+n(o).val(),this.goTo(t)},t.prototype.goTo=function(e){var n,t=this;return e=Math.max(e,1),this.el.removeClass("failed"),this.numbersContainer.children().removeClass("active"),this.numbersContainer.children("[value='"+e+"']").addClass("active"),this.el.addClass("loading"),n=this.type.fetch({page:e,per_page:this.perPage}),n.then(this.onFetch,this.onFetchFail),n.always(function(){return t.el.removeClass("loading")})},t.prototype.typeCount=function(){var e,n;return(null!=(e=r.current)&&null!=(n=e.project)?n.classification_count:void 0)||0},t.prototype.onFetch=function(e){var n,t,o,r;for(this.itemsContainer.empty(),this.el.toggleClass("empty",0===e.length),r=[],t=0,o=e.length;o>t;t++)n=e[t],r.push(this.addItemToContainer(n));return r},t.prototype.getItemEl=function(e){var t,o,r,s;return o=this.itemsContainer.find("[data-item-id='"+e.id+"']"),0===o.length&&(t=null!=this.itemTemplate?this.itemTemplate(e):"<div class='item'><a href=\""+((null!=(r=e.subjects[0])?r.talkHref():void 0)||"#/SUBJECT-ERROR")+'">'+((null!=(s=e.subjects[0])?s.zooniverse_id:void 0)||"Error in subject")+"</a></div>",o=n(n.trim(t)),o.attr({"data-item-id":e.id})),o},t.prototype.addItemToContainer=function(e){var n;return n=this.getItemEl(e),n.prependTo(this.itemsContainer),n},t.prototype.onFetchFail=function(){return this.el.addClass("failed")},t.prototype.onItemFromClassification=function(e,n){var t;if(this.addItemToContainer(n).addClass("new"),this.itemsContainer.children().length>this.perPage){for(t=[];this.itemsContainer.children().length!==this.perPage;)t.push(this.itemsContainer.children().last().remove());return t}},t.prototype.onItemDestroyed=function(e,n){return this.getItemEl(n).remove()
},t}(t),e.zooniverse.controllers.Paginator=o,"undefined"!=typeof module&&null!==module&&(module.exports=o)}.call(this),function(){var n,t,o,r,s,i,a,l,u,c,p,d,h,v,g={}.hasOwnProperty,f=function(e,n){function t(){this.constructor=e}for(var o in n)g.call(n,o)&&(e[o]=n[o]);return t.prototype=n.prototype,e.prototype=new t,e.__super__=n.prototype,e};null==e.zooniverse&&(e.zooniverse={}),null==(d=e.zooniverse).controllers&&(d.controllers={}),null==(h=e.zooniverse).views&&(h.views={}),t=zooniverse.controllers.BaseController||require("./base-controller"),p=zooniverse.views.profile||require("../views/profile"),r=zooniverse.controllers.LoginForm||require("zooniverse/controllers/login-form"),s=zooniverse.controllers.Paginator||require("./paginator"),l=zooniverse.models.Recent||require("../models/recent"),o=zooniverse.models.Favorite||require("../models/favorite"),c=zooniverse.views.profileItem||require("../views/profile-item"),u=zooniverse.models.User||require("../models/user"),n=e.jQuery,a=function(e){function n(){return v=n.__super__.constructor.apply(this,arguments)}return f(n,e),n.prototype.typeCount=function(){var e,t,r,s,i;return e=this.type===l?null!=(t=u.current)&&null!=(r=t.project)?r.classification_count:void 0:this.type===o?null!=(s=u.current)&&null!=(i=s.project)?i.favorite_count:void 0:n.__super__.typeCount.apply(this,arguments),e||0},n}(s),i=function(e){function t(){var e=this;t.__super__.constructor.apply(this,arguments),this.loginForm=new r({el:this.el.find(".sign-in-form")}),this.recentsList=new a({type:l,perPage:12,className:""+s.prototype.className+" recents",el:this.el.find(".recents"),itemTemplate:this.recentTemplate}),this.favoritesList=new a({type:o,perPage:12,className:""+s.prototype.className+" favorites",el:this.el.find(".favorites"),itemTemplate:this.favoriteTemplate}),u.on("change",function(){return e.onUserChange.apply(e,arguments)})}return f(t,e),t.prototype.className="zooniverse-profile",t.prototype.template=p,t.prototype.recentTemplate=c,t.prototype.favoriteTemplate=c,t.prototype.loginForm=null,t.prototype.recentsList=null,t.prototype.favoritesList=null,t.prototype.events={'click button[name="unfavorite"]':"onClickUnfavorite",'click button[name="turn-page"]':"onTurnPage"},t.prototype.elements={nav:"navigation",'button[name="turn-page"]':"pageTurners"},t.prototype.onUserChange=function(e,n){return this.el.toggleClass("signed-in",null!=n),this.pageTurners.first().click()},t.prototype.onClickUnfavorite=function(e){var t,r,s;return s=n(e.currentTarget),r=s.val(),t=o.find(r),t["delete"](),s.parents("[data-item-id]").first().remove()},t.prototype.onTurnPage=function(e){return this.turnPage(n(e.currentTarget).val())},t.prototype.turnPage=function(e){return this.pageTurners.removeClass("active"),this.pageTurners.filter('[value="'+e+'"]').first().addClass("active"),this.recentsList.el.add(this.favoritesList.el).removeClass("active"),this[""+e+"List"].el.addClass("active")},t}(t),e.zooniverse.controllers.Profile=i,"undefined"!=typeof module&&null!==module&&(module.exports=i)}.call(this),function(){var n,t,o,r,s=function(e,n){return function(){return e.apply(n,arguments)}};null==e.zooniverse&&(e.zooniverse={}),null==(o=e.zooniverse).controllers&&(o.controllers={}),null==(r=e.zooniverse).views&&(r.views={}),n=e.jQuery,t=function(){function t(e){this.render=s(this.render,this),this.fetchProjects=s(this.fetchProjects,this);var t,o;for(t in e)o=e[t],this[t]=o;this.el=n(document.createElement("div")),this.el.addClass("zooniverse-footer"),this.render(),this.fetchProjects()}return t.prototype.el=null,t.prototype.template=e.zooniverse.views.footer||require("../views/footer"),t.prototype.projectJsonUrl="https://zooniverse-demo.s3.amazonaws.com/projects.json",t.prototype.sourceLink="https://github.com/zooniverse",t.prototype.privacyLink="https://www.zooniverse.org/privacy",t.prototype.fetchProjects=function(){var e=this;return n.getJSON(this.projectJsonUrl,function(n){return e.categories=n,e.render()})},t.prototype.render=function(){return this.el.html(this.template(this))},t}(),e.zooniverse.controllers.Footer=t,"undefined"!=typeof module&&null!==module&&(module.exports=t)}.call(this),function(){var n,t,o,r,s,i,a,l;null==e.zooniverse&&(e.zooniverse={}),null==(l=e.zooniverse).util&&(l.util={}),n=e.jQuery,r="active",i=document,o=n(),a=function(){return o.removeClass(r),o=n("a[href='"+location.hash+"']"),o.addClass(r)},s=function(t,o){var s;return null==t&&(t=r),null==o&&(o=i),s=[t,o],r=s[0],i=s[1],a(),n(e).on("hashchange",a)},t={updateClasses:a,init:s},e.zooniverse.util.activeHashLinks=t,"undefined"!=typeof module&&null!==module&&(module.exports=t)}.call(this),"undefined"!=typeof module&&(module.exports=e.zooniverse)}(window);