From 9ecb4e8761d508a2796cffec7732673fd754ad92 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Tue, 2 May 2017 13:08:16 -0400 Subject: [PATCH] Bump webpack to 2.4.1, hopefully fixes an entrypoint issue. --- client/package.json | 2 +- static/scripts/bundled/libs.bundled.js | 4 ++-- static/scripts/bundled/libs.bundled.js.map | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/package.json b/client/package.json index 92fbb21c1c5..1460f115696 100644 --- a/client/package.json +++ b/client/package.json @@ -34,7 +34,7 @@ "gulp-uglify": "^2.1.2", "gulp-watch": "^4.3.11", "jshint": "^2.9.4", - "webpack": "^2.3.3" + "webpack": "^2.4.1" }, "scripts": { "watch": "concurrently \"npm run webpack-watch\" \"npm run gulp watch\"", diff --git a/static/scripts/bundled/libs.bundled.js b/static/scripts/bundled/libs.bundled.js index 1799120f9d0..46c89bb3f30 100644 --- a/static/scripts/bundled/libs.bundled.js +++ b/static/scripts/bundled/libs.bundled.js @@ -21,7 +21,7 @@ * * Date: 2015-10-17 */ -function(t){function e(t,e,i,n){var s,o,r,a,u,h,d,p,f=e&&e.ownerDocument,g=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return i;if(!n&&((e?e.ownerDocument||e:I)!==D&&N(e),e=e||D,M)){if(11!==g&&(h=gt.exec(t)))if(s=h[1]){if(9===g){if(!(r=e.getElementById(s)))return i;if(r.id===s)return i.push(r),i}else if(f&&(r=f.getElementById(s))&&H(e,r)&&r.id===s)return i.push(r),i}else{if(h[2])return J.apply(i,e.getElementsByTagName(t)),i;if((s=h[3])&&b.getElementsByClassName&&e.getElementsByClassName)return J.apply(i,e.getElementsByClassName(s)),i}if(b.qsa&&!z[t+" "]&&(!P||!P.test(t))){if(1!==g)f=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(vt,"\\$&"):e.setAttribute("id",a=L),d=C(t),o=d.length,u=ct.test(a)?"#"+a:"[id='"+a+"']";o--;)d[o]=u+" "+c(d[o]);p=d.join(","),f=mt.test(t)&&l(e.parentNode)||e}if(p)try{return J.apply(i,f.querySelectorAll(p)),i}catch(t){}finally{a===L&&e.removeAttribute("id")}}}return k(t.replace(ot,"$1"),e,i,n)}function i(){function t(i,n){return e.push(i+" ")>w.cacheLength&&delete t[e.shift()],t[i+" "]=n}var e=[];return t}function n(t){return t[L]=!0,t}function s(t){var e=D.createElement("div");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var i=t.split("|"),n=i.length;n--;)w.attrHandle[i[n]]=e}function r(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||U)-(~t.sourceIndex||U);if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function a(t){return n(function(e){return e=+e,n(function(i,n){for(var s,o=t([],i.length,e),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))})})}function l(t){return t&&void 0!==t.getElementsByTagName&&t}function u(){}function c(t){for(var e=0,i=t.length,n="";e1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function p(t,i,n){for(var s=0,o=i.length;s-1&&(n[u]=!(r[u]=h))}}else b=f(b===r?b.splice(m,b.length):b),o?o(null,r,b,l):J.apply(r,b)})}function m(t){for(var e,i,n,s=t.length,o=w.relative[t[0].type],r=o||w.relative[" "],a=o?1:0,l=h(function(t){return t===e},r,!0),u=h(function(t){return K(e,t)>-1},r,!0),p=[function(t,i,n){var s=!o&&(n||i!==T)||((e=i).nodeType?l(t,i,n):u(t,i,n));return e=null,s}];a1&&d(p),a>1&&c(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(ot,"$1"),i,a0,o=t.length>0,r=function(n,r,a,l,u){var c,h,d,p=0,g="0",m=n&&[],v=[],y=T,b=n||o&&w.find.TAG("*",u),_=$+=null==y?1:Math.random()||.1,x=b.length;for(u&&(T=r===D||r||u);g!==x&&null!=(c=b[g]);g++){if(o&&c){for(h=0,r||c.ownerDocument===D||(N(c),a=!M);d=t[h++];)if(d(c,r||D,a)){l.push(c);break}u&&($=_)}s&&((c=!d&&c)&&p--,n&&m.push(c))}if(p+=g,s&&g!==p){for(h=0;d=i[h++];)d(m,v,r,a);if(n){if(p>0)for(;g--;)m[g]||v[g]||(v[g]=X.call(l));v=f(v)}J.apply(l,v),u&&!n&&v.length>0&&p+i.length>1&&e.uniqueSort(l)}return u&&($=_,T=y),m};return s?n(r):r}var y,b,w,_,x,C,S,k,T,E,A,N,D,O,M,P,j,R,H,L="sizzle"+1*new Date,I=t.document,$=0,F=0,q=i(),W=i(),z=i(),B=function(t,e){return t===e&&(A=!0),0},U=1<<31,V={}.hasOwnProperty,G=[],X=G.pop,Y=G.push,J=G.push,Q=G.slice,K=function(t,e){for(var i=0,n=t.length;i+~]|"+tt+")"+tt+"*"),lt=new RegExp("="+tt+"*([^\\]'\"]*?)"+tt+"*\\]","g"),ut=new RegExp(nt),ct=new RegExp("^"+et+"$"),ht={ID:new RegExp("^#("+et+")"),CLASS:new RegExp("^\\.("+et+")"),TAG:new RegExp("^("+et+"|[*])"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+nt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+tt+"*(even|odd|(([+-]|)(\\d*)n|)"+tt+"*(?:([+-]|)"+tt+"*(\\d+)|))"+tt+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+tt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+tt+"*((?:-\\d)?\\d*)"+tt+"*\\)|)(?=[^-]|$)","i")},dt=/^(?:input|select|textarea|button)$/i,pt=/^h\d$/i,ft=/^[^{]+\{\s*\[native \w/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/[+~]/,vt=/'|\\/g,yt=new RegExp("\\\\([\\da-f]{1,6}"+tt+"?|("+tt+")|.)","ig"),bt=function(t,e,i){var n="0x"+e-65536;return n!==n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},wt=function(){N()};try{J.apply(G=Q.call(I.childNodes),I.childNodes),G[I.childNodes.length].nodeType}catch(t){J={apply:G.length?function(t,e){Y.apply(t,Q.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}b=e.support={},x=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},N=e.setDocument=function(t){var e,i,n=t?t.ownerDocument||t:I;return n!==D&&9===n.nodeType&&n.documentElement?(D=n,O=D.documentElement,M=!x(D),(i=D.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",wt,!1):i.attachEvent&&i.attachEvent("onunload",wt)),b.attributes=s(function(t){return t.className="i",!t.getAttribute("className")}),b.getElementsByTagName=s(function(t){return t.appendChild(D.createComment("")),!t.getElementsByTagName("*").length}),b.getElementsByClassName=ft.test(D.getElementsByClassName),b.getById=s(function(t){return O.appendChild(t).id=L,!D.getElementsByName||!D.getElementsByName(L).length}),b.getById?(w.find.ID=function(t,e){if(void 0!==e.getElementById&&M){var i=e.getElementById(t);return i?[i]:[]}},w.filter.ID=function(t){var e=t.replace(yt,bt);return function(t){return t.getAttribute("id")===e}}):(delete w.find.ID,w.filter.ID=function(t){var e=t.replace(yt,bt);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}}),w.find.TAG=b.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):b.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],s=0,o=e.getElementsByTagName(t);if("*"===t){for(;i=o[s++];)1===i.nodeType&&n.push(i);return n}return o},w.find.CLASS=b.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&M)return e.getElementsByClassName(t)},j=[],P=[],(b.qsa=ft.test(D.querySelectorAll))&&(s(function(t){O.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+tt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||P.push("\\["+tt+"*(?:value|"+Z+")"),t.querySelectorAll("[id~="+L+"-]").length||P.push("~="),t.querySelectorAll(":checked").length||P.push(":checked"),t.querySelectorAll("a#"+L+"+*").length||P.push(".#.+[+~]")}),s(function(t){var e=D.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&P.push("name"+tt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),P.push(",.*:")})),(b.matchesSelector=ft.test(R=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&s(function(t){b.disconnectedMatch=R.call(t,"div"),R.call(t,"[s!='']:x"),j.push("!=",nt)}),P=P.length&&new RegExp(P.join("|")),j=j.length&&new RegExp(j.join("|")),e=ft.test(O.compareDocumentPosition),H=e||ft.test(O.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},B=e?function(t,e){if(t===e)return A=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&i||!b.sortDetached&&e.compareDocumentPosition(t)===i?t===D||t.ownerDocument===I&&H(I,t)?-1:e===D||e.ownerDocument===I&&H(I,e)?1:E?K(E,t)-K(E,e):0:4&i?-1:1)}:function(t,e){if(t===e)return A=!0,0;var i,n=0,s=t.parentNode,o=e.parentNode,a=[t],l=[e];if(!s||!o)return t===D?-1:e===D?1:s?-1:o?1:E?K(E,t)-K(E,e):0;if(s===o)return r(t,e);for(i=t;i=i.parentNode;)a.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;a[n]===l[n];)n++;return n?r(a[n],l[n]):a[n]===I?-1:l[n]===I?1:0},D):D},e.matches=function(t,i){return e(t,null,null,i)},e.matchesSelector=function(t,i){if((t.ownerDocument||t)!==D&&N(t),i=i.replace(lt,"='$1']"),b.matchesSelector&&M&&!z[i+" "]&&(!j||!j.test(i))&&(!P||!P.test(i)))try{var n=R.call(t,i);if(n||b.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){}return e(i,D,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==D&&N(t),H(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==D&&N(t);var i=w.attrHandle[e.toLowerCase()],n=i&&V.call(w.attrHandle,e.toLowerCase())?i(t,e,!M):void 0;return void 0!==n?n:b.attributes||!M?t.getAttribute(e):(n=t.getAttributeNode(e))&&n.specified?n.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,i=[],n=0,s=0;if(A=!b.detectDuplicates,E=!b.sortStable&&t.slice(0),t.sort(B),A){for(;e=t[s++];)e===t[s]&&(n=i.push(s));for(;n--;)t.splice(i[n],1)}return E=null,t},_=e.getText=function(t){var e,i="",n=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=_(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n++];)i+=_(e);return i},w=e.selectors={cacheLength:50,createPseudo:n,match:ht,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(yt,bt),t[3]=(t[3]||t[4]||t[5]||"").replace(yt,bt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return ht.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&ut.test(i)&&(e=C(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(yt,bt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=q[t+" "];return e||(e=new RegExp("(^|"+tt+")"+t+"("+tt+"|$)"))&&q(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,i,n){return function(s){var o=e.attr(s,t);return null==o?"!="===i:!i||(o+="","="===i?o===n:"!="===i?o!==n:"^="===i?n&&0===o.indexOf(n):"*="===i?n&&o.indexOf(n)>-1:"$="===i?n&&o.slice(-n.length)===n:"~="===i?(" "+o.replace(st," ")+" ").indexOf(n)>-1:"|="===i&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,i,n,s){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,l){var u,c,h,d,p,f,g=o!==r?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(d=e;d=d[g];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=g="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(d=m,h=d[L]||(d[L]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),u=c[t]||[],p=u[0]===$&&u[1],b=p&&u[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(b=p=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){c[t]=[$,p,b];break}}else if(y&&(d=e,h=d[L]||(d[L]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),u=c[t]||[],p=u[0]===$&&u[1],b=p),!1===b)for(;(d=++p&&d&&d[g]||(b=p=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&(h=d[L]||(d[L]={}),c=h[d.uniqueID]||(h[d.uniqueID]={}),c[t]=[$,b]),d!==e)););return(b-=s)===n||b%n==0&&b/n>=0}}},PSEUDO:function(t,i){var s,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[L]?o(i):o.length>1?(s=[t,t,"",i],w.setFilters.hasOwnProperty(t.toLowerCase())?n(function(t,e){for(var n,s=o(t,i),r=s.length;r--;)n=K(t,s[r]),t[n]=!(e[n]=s[r])}):function(t){return o(t,0,s)}):o}},pseudos:{not:n(function(t){var e=[],i=[],s=S(t.replace(ot,"$1"));return s[L]?n(function(t,e,i,n){for(var o,r=s(t,null,n,[]),a=t.length;a--;)(o=r[a])&&(t[a]=!(e[a]=o))}):function(t,n,o){return e[0]=t,s(e,null,o,i),e[0]=null,!i.pop()}}),has:n(function(t){return function(i){return e(t,i).length>0}}),contains:n(function(t){return t=t.replace(yt,bt),function(e){return(e.textContent||e.innerText||_(e)).indexOf(t)>-1}}),lang:n(function(t){return ct.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(yt,bt).toLowerCase(),function(e){var i;do{if(i=M?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===O},focus:function(t){return t===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return pt.test(t.nodeName)},input:function(t){return dt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:a(function(){return[0]}),last:a(function(t,e){return[e-1]}),eq:a(function(t,e,i){return[i<0?i+e:i]}),even:a(function(t,e){for(var i=0;i=0;)t.push(n);return t}),gt:a(function(t,e,i){for(var n=i<0?i+e:i;++n2&&"ID"===(r=o[0]).type&&b.getById&&9===e.nodeType&&M&&w.relative[o[1].type]){if(!(e=(w.find.ID(r.matches[0].replace(yt,bt),e)||[])[0]))return i;h&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(s=ht.needsContext.test(t)?0:o.length;s--&&(r=o[s],!w.relative[a=r.type]);)if((u=w.find[a])&&(n=u(r.matches[0].replace(yt,bt),mt.test(o[0].type)&&l(e.parentNode)||e))){if(o.splice(s,1),!(t=n.length&&c(o)))return J.apply(i,n),i;break}}return(h||S(t,d))(n,e,!M,i,!e||mt.test(t)&&l(e.parentNode)||e),i},b.sortStable=L.split("").sort(B).join("")===L,b.detectDuplicates=!!A,N(),b.sortDetached=s(function(t){return 1&t.compareDocumentPosition(D.createElement("div"))}),s(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),b.attributes&&s(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),s(function(t){return null==t.getAttribute("disabled")})||o(Z,function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),e}(i);mt.find=yt,mt.expr=yt.selectors,mt.expr[":"]=mt.expr.pseudos,mt.uniqueSort=mt.unique=yt.uniqueSort,mt.text=yt.getText,mt.isXMLDoc=yt.isXML,mt.contains=yt.contains;var bt=function(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&mt(t).is(i))break;n.push(t)}return n},wt=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},_t=mt.expr.match.needsContext,xt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ct=/^.[^:#\[\.,]*$/;mt.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?mt.find.matchesSelector(n,t)?[n]:[]:mt.find.matches(t,mt.grep(e,function(t){return 1===t.nodeType}))},mt.fn.extend({find:function(t){var e,i=[],n=this,s=n.length;if("string"!=typeof t)return this.pushStack(mt(t).filter(function(){for(e=0;e1?mt.unique(i):i),i.selector=this.selector?this.selector+" "+t:t,i},filter:function(t){return this.pushStack(a(this,t||[],!1))},not:function(t){return this.pushStack(a(this,t||[],!0))},is:function(t){return!!a(this,"string"==typeof t&&_t.test(t)?mt(t):t||[],!1).length}});var St,kt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(mt.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||St,"string"==typeof t){if(!(n="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:kt.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof mt?e[0]:e,mt.merge(this,mt.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:at,!0)),xt.test(n[1])&&mt.isPlainObject(e))for(n in e)mt.isFunction(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}if((s=at.getElementById(n[2]))&&s.parentNode){if(s.id!==n[2])return St.find(t);this.length=1,this[0]=s}return this.context=at,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):mt.isFunction(t)?void 0!==i.ready?i.ready(t):t(mt):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),mt.makeArray(t,this))}).prototype=mt.fn,St=mt(at);var Tt=/^(?:parents|prev(?:Until|All))/,Et={children:!0,contents:!0,next:!0,prev:!0};mt.fn.extend({has:function(t){var e,i=mt(t,this),n=i.length;return this.filter(function(){for(e=0;e-1:1===i.nodeType&&mt.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?mt.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?mt.inArray(this[0],mt(t)):mt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(mt.uniqueSort(mt.merge(this.get(),mt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),mt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return bt(t,"parentNode")},parentsUntil:function(t,e,i){return bt(t,"parentNode",i)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return bt(t,"nextSibling")},prevAll:function(t){return bt(t,"previousSibling")},nextUntil:function(t,e,i){return bt(t,"nextSibling",i)},prevUntil:function(t,e,i){return bt(t,"previousSibling",i)},siblings:function(t){return wt((t.parentNode||{}).firstChild,t)},children:function(t){return wt(t.firstChild)},contents:function(t){return mt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:mt.merge([],t.childNodes)}},function(t,e){mt.fn[t]=function(i,n){var s=mt.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=mt.filter(n,s)),this.length>1&&(Et[t]||(s=mt.uniqueSort(s)),Tt.test(t)&&(s=s.reverse())),this.pushStack(s)}});var At=/\S+/g;mt.Callbacks=function(t){t="string"==typeof t?u(t):mt.extend({},t);var e,i,n,s,o=[],r=[],a=-1,l=function(){for(s=t.once,n=e=!0;r.length;a=-1)for(i=r.shift();++a-1;)o.splice(i,1),i<=a&&a--}),this},has:function(t){return t?mt.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return s=r=[],o=i="",this},disabled:function(){return!o},lock:function(){return s=!0,i||c.disable(),this},locked:function(){return!!s},fireWith:function(t,i){return s||(i=i||[],i=[t,i.slice?i.slice():i],r.push(i),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},mt.extend({Deferred:function(t){var e=[["resolve","done",mt.Callbacks("once memory"),"resolved"],["reject","fail",mt.Callbacks("once memory"),"rejected"],["notify","progress",mt.Callbacks("memory")]],i="pending",n={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var t=arguments;return mt.Deferred(function(i){mt.each(e,function(e,o){var r=mt.isFunction(t[e])&&t[e];s[o[1]](function(){var t=r&&r.apply(this,arguments);t&&mt.isFunction(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[o[0]+"With"](this===n?i.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?mt.extend(t,n):n}},s={};return n.pipe=n.then,mt.each(e,function(t,o){var r=o[2],a=o[3];n[o[1]]=r.add,a&&r.add(function(){i=a},e[1^t][2].disable,e[2][2].lock),s[o[0]]=function(){return s[o[0]+"With"](this===s?n:this,arguments),this},s[o[0]+"With"]=r.fireWith}),n.promise(s),t&&t.call(s,s),s},when:function(t){var e,i,n,s=0,o=lt.call(arguments),r=o.length,a=1!==r||t&&mt.isFunction(t.promise)?r:0,l=1===a?t:mt.Deferred(),u=function(t,i,n){return function(s){i[t]=this,n[t]=arguments.length>1?lt.call(arguments):s,n===e?l.notifyWith(i,n):--a||l.resolveWith(i,n)}};if(r>1)for(e=new Array(r),i=new Array(r),n=new Array(r);s0||(Nt.resolveWith(at,[mt]),mt.fn.triggerHandler&&(mt(at).triggerHandler("ready"),mt(at).off("ready"))))}}),mt.ready.promise=function(t){if(!Nt)if(Nt=mt.Deferred(),"complete"===at.readyState||"loading"!==at.readyState&&!at.documentElement.doScroll)i.setTimeout(mt.ready);else if(at.addEventListener)at.addEventListener("DOMContentLoaded",h),i.addEventListener("load",h);else{at.attachEvent("onreadystatechange",h),i.attachEvent("onload",h);var e=!1;try{e=null==i.frameElement&&at.documentElement}catch(t){}e&&e.doScroll&&function t(){if(!mt.isReady){try{e.doScroll("left")}catch(e){return i.setTimeout(t,50)}c(),mt.ready()}}()}return Nt.promise(t)},mt.ready.promise();var Dt;for(Dt in mt(gt))break;gt.ownFirst="0"===Dt,gt.inlineBlockNeedsLayout=!1,mt(function(){var t,e,i,n;(i=at.getElementsByTagName("body")[0])&&i.style&&(e=at.createElement("div"),n=at.createElement("div"),n.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",i.appendChild(n).appendChild(e),void 0!==e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",gt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(i.style.zoom=1)),i.removeChild(n))}),function(){var t=at.createElement("div");gt.deleteExpando=!0;try{delete t.test}catch(t){gt.deleteExpando=!1}t=null}();var Ot=function(t){var e=mt.noData[(t.nodeName+" ").toLowerCase()],i=+t.nodeType||1;return(1===i||9===i)&&(!e||!0!==e&&t.getAttribute("classid")===e)},Mt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Pt=/([A-Z])/g;mt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?mt.cache[t[mt.expando]]:t[mt.expando])&&!p(t)},data:function(t,e,i){return f(t,e,i)},removeData:function(t,e){return g(t,e)},_data:function(t,e,i){return f(t,e,i,!0)},_removeData:function(t,e){return g(t,e,!0)}}),mt.fn.extend({data:function(t,e){var i,n,s,o=this[0],r=o&&o.attributes;if(void 0===t){if(this.length&&(s=mt.data(o),1===o.nodeType&&!mt._data(o,"parsedAttrs"))){for(i=r.length;i--;)r[i]&&(n=r[i].name,0===n.indexOf("data-")&&(n=mt.camelCase(n.slice(5)),d(o,n,s[n])));mt._data(o,"parsedAttrs",!0)}return s}return"object"==typeof t?this.each(function(){mt.data(this,t)}):arguments.length>1?this.each(function(){mt.data(this,t,e)}):o?d(o,t,mt.data(o,t)):void 0},removeData:function(t){return this.each(function(){mt.removeData(this,t)})}}),mt.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=mt._data(t,e),i&&(!n||mt.isArray(i)?n=mt._data(t,e,mt.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=mt.queue(t,e),n=i.length,s=i.shift(),o=mt._queueHooks(t,e),r=function(){mt.dequeue(t,e)};"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,r,o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return mt._data(t,i)||mt._data(t,i,{empty:mt.Callbacks("once memory").add(function(){mt._removeData(t,e+"queue"),mt._removeData(t,i)})})}}),mt.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length
a",gt.leadingWhitespace=3===t.firstChild.nodeType,gt.tbody=!t.getElementsByTagName("tbody").length,gt.htmlSerialize=!!t.getElementsByTagName("link").length,gt.html5Clone="<:nav>"!==at.createElement("nav").cloneNode(!0).outerHTML,i.type="checkbox",i.checked=!0,e.appendChild(i),gt.appendChecked=i.checked,t.innerHTML="",gt.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,e.appendChild(t),i=at.createElement("input"),i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),gt.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,gt.noCloneEvent=!!t.addEventListener,t[mt.expando]=1,gt.attributes=!t.getAttribute(mt.expando)}();var Bt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:gt.htmlSerialize?[0,"",""]:[1,"X
","
"]};Bt.optgroup=Bt.option,Bt.tbody=Bt.tfoot=Bt.colgroup=Bt.caption=Bt.thead,Bt.th=Bt.td;var Ut=/<|&#?\w+;/,Vt=/-1&&(f=p.split("."),p=f.shift(),f.sort()),r=p.indexOf(":")<0&&"on"+p,t=t[mt.expando]?t:new mt.Event(p,"object"==typeof t&&t),t.isTrigger=s?2:3,t.namespace=f.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:mt.makeArray(e,[t]),u=mt.event.special[p]||{},s||!u.trigger||!1!==u.trigger.apply(n,e))){if(!s&&!u.noBubble&&!mt.isWindow(n)){for(l=u.delegateType||p,Jt.test(l+p)||(a=a.parentNode);a;a=a.parentNode)d.push(a),c=a;c===(n.ownerDocument||at)&&d.push(c.defaultView||c.parentWindow||i)}for(h=0;(a=d[h++])&&!t.isPropagationStopped();)t.type=h>1?l:u.bindType||p,o=(mt._data(a,"events")||{})[t.type]&&mt._data(a,"handle"),o&&o.apply(a,e),(o=r&&a[r])&&o.apply&&Ot(a)&&(t.result=o.apply(a,e),!1===t.result&&t.preventDefault());if(t.type=p,!s&&!t.isDefaultPrevented()&&(!u._default||!1===u._default.apply(d.pop(),e))&&Ot(n)&&r&&n[p]&&!mt.isWindow(n)){c=n[r],c&&(n[r]=null),mt.event.triggered=p;try{n[p]()}catch(t){}mt.event.triggered=void 0,c&&(n[r]=c)}return t.result}},dispatch:function(t){t=mt.event.fix(t);var e,i,n,s,o,r=[],a=lt.call(arguments),l=(mt._data(this,"events")||{})[t.type]||[],u=mt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,t)){for(r=mt.event.handlers.call(this,t,l),e=0;(s=r[e++])&&!t.isPropagationStopped();)for(t.currentTarget=s.elem,i=0;(o=s.handlers[i++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(o.namespace)||(t.handleObj=o,t.data=o.data,void 0!==(n=((mt.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,a))&&!1===(t.result=n)&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var i,n,s,o,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(n=[],i=0;i-1:mt.find(s,this,null,[l]).length),n[s]&&n.push(o);n.length&&r.push({elem:l,handlers:n})}return a]","i"),Zt=/\s*$/g,ne=v(at),se=ne.appendChild(at.createElement("div"));mt.extend({htmlPrefilter:function(t){return t.replace(/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,"<$1>")},clone:function(t,e,i){var n,s,o,r,a,l=mt.contains(t.ownerDocument,t);if(gt.html5Clone||mt.isXMLDoc(t)||!Kt.test("<"+t.nodeName+">")?o=t.cloneNode(!0):(se.innerHTML=t.outerHTML,se.removeChild(o=se.firstChild)),!(gt.noCloneEvent&>.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||mt.isXMLDoc(t)))for(n=y(o),a=y(t),r=0;null!=(s=a[r]);++r)n[r]&&D(s,n[r]);if(e)if(i)for(a=a||y(t),n=n||y(o),r=0;null!=(s=a[r]);r++)N(s,n[r]);else N(t,o);return n=y(o,"script"),n.length>0&&b(n,!l&&y(t,"script")),n=a=s=null,o},cleanData:function(t,e){for(var i,n,s,o,r=0,a=mt.expando,l=mt.cache,u=gt.attributes,c=mt.event.special;null!=(i=t[r]);r++)if((e||Ot(i))&&(s=i[a],o=s&&l[s])){if(o.events)for(n in o.events)c[n]?mt.event.remove(i,n):mt.removeEvent(i,n,o.handle);l[s]&&(delete l[s],u||void 0===i.removeAttribute?i[a]=void 0:i.removeAttribute(a),rt.push(s))}}}),mt.fn.extend({domManip:O,detach:function(t){return M(this,t,!0)},remove:function(t){return M(this,t)},text:function(t){return It(this,function(t){return void 0===t?mt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||at).createTextNode(t))},null,t,arguments.length)},append:function(){return O(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){T(this,t).appendChild(t)}})},prepend:function(){return O(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=T(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return O(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return O(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&mt.cleanData(y(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&mt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return mt.clone(this,t,e)})},html:function(t){return It(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t)return 1===e.nodeType?e.innerHTML.replace(/ jQuery\d+="(?:null|\d+)"/g,""):void 0;if("string"==typeof t&&!Zt.test(t)&&(gt.htmlSerialize||!Kt.test(t))&&(gt.leadingWhitespace||!Wt.test(t))&&!Bt[(Ft.exec(t)||["",""])[1].toLowerCase()]){t=mt.htmlPrefilter(t);try{for(;it",u.childNodes[0].style.borderCollapse="separate",t=u.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",(o=0===t[0].offsetHeight)&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),h.removeChild(l)}var e,n,s,o,r,a,l=at.createElement("div"),u=at.createElement("div");u.style&&(u.style.cssText="float:left;opacity:.5",gt.opacity="0.5"===u.style.opacity,gt.cssFloat=!!u.style.cssFloat,u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",gt.clearCloneStyle="content-box"===u.style.backgroundClip,l=at.createElement("div"),l.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",u.innerHTML="",l.appendChild(u),gt.boxSizing=""===u.style.boxSizing||""===u.style.MozBoxSizing||""===u.style.WebkitBoxSizing,mt.extend(gt,{reliableHiddenOffsets:function(){return null==e&&t(),o},boxSizingReliable:function(){return null==e&&t(),s},pixelMarginRight:function(){return null==e&&t(),n},pixelPosition:function(){return null==e&&t(),e},reliableMarginRight:function(){return null==e&&t(),r},reliableMarginLeft:function(){return null==e&&t(),a}}))}();var he,de,pe=/^(top|right|bottom|left)$/;i.getComputedStyle?(he=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=i),e.getComputedStyle(t)},de=function(t,e,i){var n,s,o,r,a=t.style;return i=i||he(t),r=i?i.getPropertyValue(e)||i[e]:void 0,""!==r&&void 0!==r||mt.contains(t.ownerDocument,t)||(r=mt.style(t,e)),i&&!gt.pixelMarginRight()&&le.test(r)&&ae.test(e)&&(n=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=n,a.minWidth=s,a.maxWidth=o),void 0===r?r:r+""}):ce.currentStyle&&(he=function(t){return t.currentStyle},de=function(t,e,i){var n,s,o,r,a=t.style;return i=i||he(t),r=i?i[e]:void 0,null==r&&a&&a[e]&&(r=a[e]),le.test(r)&&!pe.test(e)&&(n=a.left,s=t.runtimeStyle,o=s&&s.left,o&&(s.left=t.currentStyle.left),a.left="fontSize"===e?"1em":r,r=a.pixelLeft+"px",a.left=n,o&&(s.left=o)),void 0===r?r:r+""||"auto"});var fe=/alpha\([^)]*\)/i,ge=/opacity\s*=\s*([^)]*)/i,me=/^(none|table(?!-c[ea]).+)/,ve=new RegExp("^("+jt+")(.*)$","i"),ye={position:"absolute",visibility:"hidden",display:"block"},be={letterSpacing:"0",fontWeight:"400"},we=["Webkit","O","Moz","ms"],_e=at.createElement("div").style;mt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=de(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:gt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,o,r,a=mt.camelCase(e),l=t.style;if(e=mt.cssProps[a]||(mt.cssProps[a]=H(a)||a),r=mt.cssHooks[e]||mt.cssHooks[a],void 0===i)return r&&"get"in r&&void 0!==(s=r.get(t,!1,n))?s:l[e];if(o=typeof i,"string"===o&&(s=Rt.exec(i))&&s[1]&&(i=m(t,e,s),o="number"),null!=i&&i===i&&("number"===o&&(i+=s&&s[3]||(mt.cssNumber[a]?"":"px")),gt.clearCloneStyle||""!==i||0!==e.indexOf("background")||(l[e]="inherit"),!(r&&"set"in r&&void 0===(i=r.set(t,i,n)))))try{l[e]=i}catch(t){}}},css:function(t,e,i,n){var s,o,r,a=mt.camelCase(e);return e=mt.cssProps[a]||(mt.cssProps[a]=H(a)||a),r=mt.cssHooks[e]||mt.cssHooks[a],r&&"get"in r&&(o=r.get(t,!0,i)),void 0===o&&(o=de(t,e,n)),"normal"===o&&e in be&&(o=be[e]),""===i||i?(s=parseFloat(o),!0===i||isFinite(s)?s||0:o):o}}),mt.each(["height","width"],function(t,e){mt.cssHooks[e]={get:function(t,i,n){if(i)return me.test(mt.css(t,"display"))&&0===t.offsetWidth?ue(t,ye,function(){return F(t,e,n)}):F(t,e,n)},set:function(t,i,n){var s=n&&he(t);return I(t,i,n?$(t,e,n,gt.boxSizing&&"border-box"===mt.css(t,"boxSizing",!1,s),s):0)}}}),gt.opacity||(mt.cssHooks.opacity={get:function(t,e){return ge.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var i=t.style,n=t.currentStyle,s=mt.isNumeric(e)?"alpha(opacity="+100*e+")":"",o=n&&n.filter||i.filter||"";i.zoom=1,(e>=1||""===e)&&""===mt.trim(o.replace(fe,""))&&i.removeAttribute&&(i.removeAttribute("filter"),""===e||n&&!n.filter)||(i.filter=fe.test(o)?o.replace(fe,s):o+" "+s)}}),mt.cssHooks.marginRight=R(gt.reliableMarginRight,function(t,e){if(e)return ue(t,{display:"inline-block"},de,[t,"marginRight"])}),mt.cssHooks.marginLeft=R(gt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(de(t,"marginLeft"))||(mt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-ue(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px"}),mt.each({margin:"",padding:"",border:"Width"},function(t,e){mt.cssHooks[t+e]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];n<4;n++)s[t+Ht[n]+e]=o[n]||o[n-2]||o[0];return s}},ae.test(t)||(mt.cssHooks[t+e].set=I)}),mt.fn.extend({css:function(t,e){return It(this,function(t,e,i){var n,s,o={},r=0;if(mt.isArray(e)){for(n=he(t),s=e.length;r1)},show:function(){return L(this,!0)},hide:function(){return L(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Lt(this)?mt(this).show():mt(this).hide()})}}),mt.Tween=q,q.prototype={constructor:q,init:function(t,e,i,n,s,o){this.elem=t,this.prop=i,this.easing=s||mt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(mt.cssNumber[i]?"":"px")},cur:function(){var t=q.propHooks[this.prop];return t&&t.get?t.get(this):q.propHooks._default.get(this)},run:function(t){var e,i=q.propHooks[this.prop];return this.options.duration?this.pos=e=mt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=mt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){mt.fx.step[t.prop]?mt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[mt.cssProps[t.prop]]&&!mt.cssHooks[t.prop]?t.elem[t.prop]=t.now:mt.style(t.elem,t.prop,t.now+t.unit)}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},mt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},mt.fx=q.prototype.init,mt.fx.step={};var xe,Ce,Se=/^(?:toggle|show|hide)$/,ke=/queueHooks$/;mt.Animation=mt.extend(G,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return m(i.elem,t,Rt.exec(e),i),i}]},tweener:function(t,e){mt.isFunction(t)?(e=t,t=["*"]):t=t.match(At);for(var i,n=0,s=t.length;n
a",t=i.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),i.appendChild(e),t=i.getElementsByTagName("a")[0],t.style.cssText="top:1px",gt.getSetAttribute="t"!==i.className,gt.style=/top/.test(t.getAttribute("style")),gt.hrefNormalized="/a"===t.getAttribute("href"),gt.checkOn=!!e.value,gt.optSelected=s.selected,gt.enctype=!!at.createElement("form").enctype,n.disabled=!0,gt.optDisabled=!s.disabled,e=at.createElement("input"),e.setAttribute("value",""),gt.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),gt.radioValue="t"===e.value}();mt.fn.extend({val:function(t){var e,i,n,s=this[0];{if(arguments.length)return n=mt.isFunction(t),this.each(function(i){var s;1===this.nodeType&&(s=n?t.call(this,i,mt(this).val()):t,null==s?s="":"number"==typeof s?s+="":mt.isArray(s)&&(s=mt.map(s,function(t){return null==t?"":t+""})),(e=mt.valHooks[this.type]||mt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,s,"value")||(this.value=s))});if(s)return(e=mt.valHooks[s.type]||mt.valHooks[s.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(s,"value"))?i:(i=s.value,"string"==typeof i?i.replace(/\r/g,""):null==i?"":i)}}}),mt.extend({valHooks:{option:{get:function(t){var e=mt.find.attr(t,"value");return null!=e?e:mt.trim(mt.text(t)).replace(/[\x20\t\r\n\f]+/g," ")}},select:{get:function(t){for(var e,i,n=t.options,s=t.selectedIndex,o="select-one"===t.type||s<0,r=o?null:[],a=o?s+1:n.length,l=s<0?a:o?s:0;l-1)try{n.selected=i=!0}catch(t){n.scrollHeight}else n.selected=!1;return i||(t.selectedIndex=-1),s}}}}),mt.each(["radio","checkbox"],function(){mt.valHooks[this]={set:function(t,e){if(mt.isArray(e))return t.checked=mt.inArray(mt(t).val(),e)>-1}},gt.checkOn||(mt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Te,Ee,Ae=mt.expr.attrHandle,Ne=/^(?:checked|selected)$/i,De=gt.getSetAttribute,Oe=gt.input;mt.fn.extend({attr:function(t,e){return It(this,mt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){mt.removeAttr(this,t)})}}),mt.extend({attr:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?mt.prop(t,e,i):(1===o&&mt.isXMLDoc(t)||(e=e.toLowerCase(),s=mt.attrHooks[e]||(mt.expr.match.bool.test(e)?Ee:Te)),void 0!==i?null===i?void mt.removeAttr(t,e):s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:(t.setAttribute(e,i+""),i):s&&"get"in s&&null!==(n=s.get(t,e))?n:(n=mt.find.attr(t,e),null==n?void 0:n))},attrHooks:{type:{set:function(t,e){if(!gt.radioValue&&"radio"===e&&mt.nodeName(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n,s=0,o=e&&e.match(At);if(o&&1===t.nodeType)for(;i=o[s++];)n=mt.propFix[i]||i,mt.expr.match.bool.test(i)?Oe&&De||!Ne.test(i)?t[n]=!1:t[mt.camelCase("default-"+i)]=t[n]=!1:mt.attr(t,i,""),t.removeAttribute(De?i:n)}}),Ee={set:function(t,e,i){return!1===e?mt.removeAttr(t,i):Oe&&De||!Ne.test(i)?t.setAttribute(!De&&mt.propFix[i]||i,i):t[mt.camelCase("default-"+i)]=t[i]=!0,i}},mt.each(mt.expr.match.bool.source.match(/\w+/g),function(t,e){var i=Ae[e]||mt.find.attr;Oe&&De||!Ne.test(e)?Ae[e]=function(t,e,n){var s,o;return n||(o=Ae[e],Ae[e]=s,s=null!=i(t,e,n)?e.toLowerCase():null,Ae[e]=o),s}:Ae[e]=function(t,e,i){if(!i)return t[mt.camelCase("default-"+e)]?e.toLowerCase():null}}),Oe&&De||(mt.attrHooks.value={set:function(t,e,i){if(!mt.nodeName(t,"input"))return Te&&Te.set(t,e,i);t.defaultValue=e}}),De||(Te={set:function(t,e,i){var n=t.getAttributeNode(i);if(n||t.setAttributeNode(n=t.ownerDocument.createAttribute(i)),n.value=e+="","value"===i||e===t.getAttribute(i))return e}},Ae.id=Ae.name=Ae.coords=function(t,e,i){var n;if(!i)return(n=t.getAttributeNode(e))&&""!==n.value?n.value:null},mt.valHooks.button={get:function(t,e){var i=t.getAttributeNode(e);if(i&&i.specified)return i.value},set:Te.set},mt.attrHooks.contenteditable={set:function(t,e,i){Te.set(t,""!==e&&e,i)}},mt.each(["width","height"],function(t,e){mt.attrHooks[e]={set:function(t,i){if(""===i)return t.setAttribute(e,"auto"),i}}})),gt.style||(mt.attrHooks.style={get:function(t){return t.style.cssText||void 0},set:function(t,e){return t.style.cssText=e+""}});var Me=/^(?:input|select|textarea|button|object)$/i,Pe=/^(?:a|area)$/i;mt.fn.extend({prop:function(t,e){return It(this,mt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=mt.propFix[t]||t,this.each(function(){try{this[t]=void 0,delete this[t]}catch(t){}})}}),mt.extend({prop:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&mt.isXMLDoc(t)||(e=mt.propFix[e]||e,s=mt.propHooks[e]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:t[e]=i:s&&"get"in s&&null!==(n=s.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=mt.find.attr(t,"tabindex");return e?parseInt(e,10):Me.test(t.nodeName)||Pe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),gt.hrefNormalized||mt.each(["href","src"],function(t,e){mt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),gt.optSelected||(mt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),mt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){mt.propFix[this.toLowerCase()]=this}),gt.enctype||(mt.propFix.enctype="encoding");mt.fn.extend({addClass:function(t){var e,i,n,s,o,r,a,l=0;if(mt.isFunction(t))return this.each(function(e){mt(this).addClass(t.call(this,e,X(this)))});if("string"==typeof t&&t)for(e=t.match(At)||[];i=this[l++];)if(s=X(i),n=1===i.nodeType&&(" "+s+" ").replace(/[\t\r\n\f]/g," ")){for(r=0;o=e[r++];)n.indexOf(" "+o+" ")<0&&(n+=o+" ");a=mt.trim(n),s!==a&&mt.attr(i,"class",a)}return this},removeClass:function(t){var e,i,n,s,o,r,a,l=0;if(mt.isFunction(t))return this.each(function(e){mt(this).removeClass(t.call(this,e,X(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(At)||[];i=this[l++];)if(s=X(i),n=1===i.nodeType&&(" "+s+" ").replace(/[\t\r\n\f]/g," ")){for(r=0;o=e[r++];)for(;n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");a=mt.trim(n),s!==a&&mt.attr(i,"class",a)}return this},toggleClass:function(t,e){var i=typeof t;return"boolean"==typeof e&&"string"===i?e?this.addClass(t):this.removeClass(t):mt.isFunction(t)?this.each(function(i){mt(this).toggleClass(t.call(this,i,X(this),e),e)}):this.each(function(){var e,n,s,o;if("string"===i)for(n=0,s=mt(this),o=t.match(At)||[];e=o[n++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else void 0!==t&&"boolean"!==i||(e=X(this),e&&mt._data(this,"__className__",e),mt.attr(this,"class",e||!1===t?"":mt._data(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+X(i)+" ").replace(/[\t\r\n\f]/g," ").indexOf(e)>-1)return!0;return!1}}),mt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){mt.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),mt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var je=i.location,Re=mt.now(),He=/\?/;mt.parseJSON=function(t){if(i.JSON&&i.JSON.parse)return i.JSON.parse(t+"");var e,n=null,s=mt.trim(t+"");return s&&!mt.trim(s.replace(/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g,function(t,i,s,o){return e&&i&&(n=0),0===n?t:(e=s||i,n+=!o-!s,"")}))?Function("return "+s)():mt.error("Invalid JSON: "+t)},mt.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{i.DOMParser?(n=new i.DOMParser,e=n.parseFromString(t,"text/xml")):(e=new i.ActiveXObject("Microsoft.XMLDOM"),e.async="false",e.loadXML(t))}catch(t){e=void 0}return e&&e.documentElement&&!e.getElementsByTagName("parsererror").length||mt.error("Invalid XML: "+t),e};var Le=/([?&])_=[^&]*/,Ie=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,$e=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Fe=/^(?:GET|HEAD)$/,qe=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,We={},ze={},Be="*/".concat("*"),Ue=je.href,Ve=qe.exec(Ue.toLowerCase())||[];mt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ue,type:"GET",isLocal:$e.test(Ve[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Be,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":mt.parseJSON,"text xml":mt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Q(Q(t,mt.ajaxSettings),e):Q(mt.ajaxSettings,t)},ajaxPrefilter:Y(We),ajaxTransport:Y(ze),ajax:function(t,e){function n(t,e,n,s){var o,h,y,b,_,C=e;2!==w&&(w=2,l&&i.clearTimeout(l),c=void 0,a=s||"",x.readyState=t>0?4:0,o=t>=200&&t<300||304===t,n&&(b=K(d,x,n)),b=Z(d,b,x,o),o?(d.ifModified&&(_=x.getResponseHeader("Last-Modified"),_&&(mt.lastModified[r]=_),(_=x.getResponseHeader("etag"))&&(mt.etag[r]=_)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=b.state,h=b.data,y=b.error,o=!y)):(y=C,!t&&C||(C="error",t<0&&(t=0))),x.status=t,x.statusText=(e||C)+"",o?g.resolveWith(p,[h,C,x]):g.rejectWith(p,[x,C,y]),x.statusCode(v),v=void 0,u&&f.trigger(o?"ajaxSuccess":"ajaxError",[x,d,o?h:y]),m.fireWith(p,[x,C]),u&&(f.trigger("ajaxComplete",[x,d]),--mt.active||mt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var s,o,r,a,l,u,c,h,d=mt.ajaxSetup({},e),p=d.context||d,f=d.context&&(p.nodeType||p.jquery)?mt(p):mt.event,g=mt.Deferred(),m=mt.Callbacks("once memory"),v=d.statusCode||{},y={},b={},w=0,_="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!h)for(h={};e=Ie.exec(a);)h[e[1].toLowerCase()]=e[2];e=h[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(t,e){var i=t.toLowerCase();return w||(t=b[i]=b[i]||t,y[t]=e),this},overrideMimeType:function(t){return w||(d.mimeType=t),this},statusCode:function(t){var e;if(t)if(w<2)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||_;return c&&c.abort(e),n(0,e),this}};if(g.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,d.url=((t||d.url||Ue)+"").replace(/#.*$/,"").replace(/^\/\//,Ve[1]+"//"),d.type=e.method||e.type||d.method||d.type,d.dataTypes=mt.trim(d.dataType||"*").toLowerCase().match(At)||[""],null==d.crossDomain&&(s=qe.exec(d.url.toLowerCase()),d.crossDomain=!(!s||s[1]===Ve[1]&&s[2]===Ve[2]&&(s[3]||("http:"===s[1]?"80":"443"))===(Ve[3]||("http:"===Ve[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=mt.param(d.data,d.traditional)),J(We,d,e,x),2===w)return x;u=mt.event&&d.global,u&&0==mt.active++&&mt.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Fe.test(d.type),r=d.url,d.hasContent||(d.data&&(r=d.url+=(He.test(r)?"&":"?")+d.data,delete d.data),!1===d.cache&&(d.url=Le.test(r)?r.replace(Le,"$1_="+Re++):r+(He.test(r)?"&":"?")+"_="+Re++)),d.ifModified&&(mt.lastModified[r]&&x.setRequestHeader("If-Modified-Since",mt.lastModified[r]),mt.etag[r]&&x.setRequestHeader("If-None-Match",mt.etag[r])),(d.data&&d.hasContent&&!1!==d.contentType||e.contentType)&&x.setRequestHeader("Content-Type",d.contentType),x.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Be+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)x.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(!1===d.beforeSend.call(p,x,d)||2===w))return x.abort();_="abort";for(o in{success:1,error:1,complete:1})x[o](d[o]);if(c=J(ze,d,e,x)){if(x.readyState=1,u&&f.trigger("ajaxSend",[x,d]),2===w)return x;d.async&&d.timeout>0&&(l=i.setTimeout(function(){x.abort("timeout")},d.timeout));try{w=1,c.send(y,n)}catch(t){if(!(w<2))throw t;n(-1,t)}}else n(-1,"No Transport");return x},getJSON:function(t,e,i){return mt.get(t,e,i,"json")},getScript:function(t,e){return mt.get(t,void 0,e,"script")}}),mt.each(["get","post"],function(t,e){mt[e]=function(t,i,n,s){return mt.isFunction(i)&&(s=s||n,n=i,i=void 0),mt.ajax(mt.extend({url:t,type:e,dataType:s,data:i,success:n},mt.isPlainObject(t)&&t))}}),mt._evalUrl=function(t){return mt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},mt.fn.extend({wrapAll:function(t){if(mt.isFunction(t))return this.each(function(e){mt(this).wrapAll(t.call(this,e))});if(this[0]){var e=mt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return mt.isFunction(t)?this.each(function(e){mt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=mt(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=mt.isFunction(t);return this.each(function(i){mt(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(){return this.parent().each(function(){mt.nodeName(this,"body")||mt(this).replaceWith(this.childNodes)}).end()}}),mt.expr.filters.hidden=function(t){return gt.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:et(t)},mt.expr.filters.visible=function(t){return!mt.expr.filters.hidden(t)};var Ge=/\[\]$/,Xe=/^(?:submit|button|image|reset|file)$/i,Ye=/^(?:input|select|textarea|keygen)/i;mt.param=function(t,e){var i,n=[],s=function(t,e){e=mt.isFunction(e)?e():null==e?"":e,n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=mt.ajaxSettings&&mt.ajaxSettings.traditional),mt.isArray(t)||t.jquery&&!mt.isPlainObject(t))mt.each(t,function(){s(this.name,this.value)});else for(i in t)it(i,t[i],e,s);return n.join("&").replace(/%20/g,"+")},mt.fn.extend({serialize:function(){return mt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=mt.prop(this,"elements");return t?mt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!mt(this).is(":disabled")&&Ye.test(this.nodeName)&&!Xe.test(t)&&(this.checked||!$t.test(t))}).map(function(t,e){var i=mt(this).val();return null==i?null:mt.isArray(i)?mt.map(i,function(t){return{name:e.name,value:t.replace(/\r?\n/g,"\r\n")}}):{name:e.name,value:i.replace(/\r?\n/g,"\r\n")}}).get()}}),mt.ajaxSettings.xhr=void 0!==i.ActiveXObject?function(){return this.isLocal?st():at.documentMode>8?nt():/^(get|post|head|put|delete|options)$/i.test(this.type)&&nt()||st()}:nt;var Je=0,Qe={},Ke=mt.ajaxSettings.xhr();i.attachEvent&&i.attachEvent("onunload",function(){for(var t in Qe)Qe[t](void 0,!0)}),gt.cors=!!Ke&&"withCredentials"in Ke,Ke=gt.ajax=!!Ke,Ke&&mt.ajaxTransport(function(t){if(!t.crossDomain||gt.cors){var e;return{send:function(n,s){var o,r=t.xhr(),a=++Je;if(r.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)r[o]=t.xhrFields[o];t.mimeType&&r.overrideMimeType&&r.overrideMimeType(t.mimeType),t.crossDomain||n["X-Requested-With"]||(n["X-Requested-With"]="XMLHttpRequest");for(o in n)void 0!==n[o]&&r.setRequestHeader(o,n[o]+"");r.send(t.hasContent&&t.data||null),e=function(i,n){var o,l,u;if(e&&(n||4===r.readyState))if(delete Qe[a],e=void 0,r.onreadystatechange=mt.noop,n)4!==r.readyState&&r.abort();else{u={},o=r.status,"string"==typeof r.responseText&&(u.text=r.responseText);try{l=r.statusText}catch(t){l=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=u.text?200:404}u&&s(o,l,u,r.getAllResponseHeaders())},t.async?4===r.readyState?i.setTimeout(e):r.onreadystatechange=Qe[a]=e:e()},abort:function(){e&&e(void 0,!0)}}}}),mt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return mt.globalEval(t),t}}}),mt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),mt.ajaxTransport("script",function(t){if(t.crossDomain){var e,i=at.head||mt("head")[0]||at.documentElement;return{send:function(n,s){e=at.createElement("script"),e.async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,i){(i||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,i||s(200,"success"))},i.insertBefore(e,i.firstChild)},abort:function(){e&&e.onload(void 0,!0)}}}});var Ze=[],ti=/(=)\?(?=&|$)|\?\?/;mt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ze.pop()||mt.expando+"_"+Re++;return this[t]=!0,t}}),mt.ajaxPrefilter("json jsonp",function(t,e,n){var s,o,r,a=!1!==t.jsonp&&(ti.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&ti.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return s=t.jsonpCallback=mt.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(ti,"$1"+s):!1!==t.jsonp&&(t.url+=(He.test(t.url)?"&":"?")+t.jsonp+"="+s),t.converters["script json"]=function(){return r||mt.error(s+" was not called"),r[0]},t.dataTypes[0]="json",o=i[s],i[s]=function(){r=arguments},n.always(function(){void 0===o?mt(i).removeProp(s):i[s]=o,t[s]&&(t.jsonpCallback=e.jsonpCallback,Ze.push(s)),r&&mt.isFunction(o)&&o(r[0]),r=o=void 0}),"script"}),mt.parseHTML=function(t,e,i){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(i=e,e=!1),e=e||at;var n=xt.exec(t),s=!i&&[];return n?[e.createElement(n[1])]:(n=_([t],e,s),s&&s.length&&mt(s).remove(),mt.merge([],n.childNodes))};var ei=mt.fn.load;mt.fn.load=function(t,e,i){if("string"!=typeof t&&ei)return ei.apply(this,arguments);var n,s,o,r=this,a=t.indexOf(" ");return a>-1&&(n=mt.trim(t.slice(a,t.length)),t=t.slice(0,a)),mt.isFunction(e)?(i=e,e=void 0):e&&"object"==typeof e&&(s="POST"),r.length>0&&mt.ajax({url:t,type:s||"GET",dataType:"html",data:e}).done(function(t){o=arguments,r.html(n?mt("
").append(mt.parseHTML(t)).find(n):t)}).always(i&&function(t,e){r.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},mt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){mt.fn[e]=function(t){return this.on(e,t)}}),mt.expr.filters.animated=function(t){return mt.grep(mt.timers,function(e){return t===e.elem}).length},mt.offset={setOffset:function(t,e,i){var n,s,o,r,a,l,u,c=mt.css(t,"position"),h=mt(t),d={};"static"===c&&(t.style.position="relative"),a=h.offset(),o=mt.css(t,"top"),l=mt.css(t,"left"),u=("absolute"===c||"fixed"===c)&&mt.inArray("auto",[o,l])>-1,u?(n=h.position(),r=n.top,s=n.left):(r=parseFloat(o)||0,s=parseFloat(l)||0),mt.isFunction(e)&&(e=e.call(t,i,mt.extend({},a))),null!=e.top&&(d.top=e.top-a.top+r),null!=e.left&&(d.left=e.left-a.left+s),"using"in e?e.using.call(t,d):h.css(d)}},mt.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){mt.offset.setOffset(this,t,e)});var e,i,n={top:0,left:0},s=this[0],o=s&&s.ownerDocument;if(o)return e=o.documentElement,mt.contains(e,s)?(void 0!==s.getBoundingClientRect&&(n=s.getBoundingClientRect()),i=ot(o),{top:n.top+(i.pageYOffset||e.scrollTop)-(e.clientTop||0),left:n.left+(i.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):n},position:function(){if(this[0]){var t,e,i={top:0,left:0},n=this[0];return"fixed"===mt.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),mt.nodeName(t[0],"html")||(i=t.offset()),i.top+=mt.css(t[0],"borderTopWidth",!0),i.left+=mt.css(t[0],"borderLeftWidth",!0)),{top:e.top-i.top-mt.css(n,"marginTop",!0),left:e.left-i.left-mt.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!mt.nodeName(t,"html")&&"static"===mt.css(t,"position");)t=t.offsetParent;return t||ce})}}),mt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i=/Y/.test(e);mt.fn[t]=function(n){return It(this,function(t,n,s){var o=ot(t);if(void 0===s)return o?e in o?o[e]:o.document.documentElement[n]:t[n];o?o.scrollTo(i?mt(o).scrollLeft():s,i?s:mt(o).scrollTop()):t[n]=s},t,n,arguments.length,null)}}),mt.each(["top","left"],function(t,e){mt.cssHooks[e]=R(gt.pixelPosition,function(t,i){if(i)return i=de(t,e),le.test(i)?mt(t).position()[e]+"px":i})}),mt.each({Height:"height",Width:"width"},function(t,e){mt.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){mt.fn[n]=function(n,s){var o=arguments.length&&(i||"boolean"!=typeof n),r=i||(!0===n||!0===s?"margin":"border");return It(this,function(e,i,n){var s;return mt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===n?mt.css(e,i,r):mt.style(e,i,n,r)},e,o?n:void 0,o,null)}})}),mt.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),mt.fn.size=function(){return this.length},mt.fn.andSelf=mt.fn.addBack,n=[],void 0!==(s=function(){return mt}.apply(e,n))&&(t.exports=s);var ii=i.jQuery,ni=i.$;return mt.noConflict=function(t){return i.$===mt&&(i.$=ni),t&&i.jQuery===mt&&(i.jQuery=ii),mt},o||(i.jQuery=i.$=mt),mt})},function(t,e,i){var n,s;(function(){function i(t){function e(e,i,n,s,o,r){for(;o>=0&&o0?0:a-1;return arguments.length<3&&(s=i[r?r[l]:l],l+=t),e(i,n,s,r,l,a)}}function o(t){return function(e,i,n){i=S(i,n);for(var s=N(e),o=t>0?0:s-1;o>=0&&o0?r=o>=0?o:Math.max(o+a,r):a=o>=0?Math.min(o+1,a):o+a+1;else if(i&&o&&a)return o=i(n,s),n[o]===s?o:-1;if(s!==s)return o=e(f.call(n,r,a),x.isNaN),o>=0?o+r:-1;for(o=t>0?r:a-1;o>=0&&o=0&&e<=A};x.each=x.forEach=function(t,e,i){e=C(e,i);var n,s;if(D(t))for(n=0,s=t.length;n=0},x.invoke=function(t,e){var i=f.call(arguments,2),n=x.isFunction(e);return x.map(t,function(t){var s=n?e:t[e];return null==s?s:s.apply(t,i)})},x.pluck=function(t,e){return x.map(t,x.property(e))},x.where=function(t,e){return x.filter(t,x.matcher(e))},x.findWhere=function(t,e){return x.find(t,x.matcher(e))},x.max=function(t,e,i){var n,s,o=-1/0,r=-1/0;if(null==e&&null!=t){t=D(t)?t:x.values(t);for(var a=0,l=t.length;ao&&(o=n)}else e=S(e,i),x.each(t,function(t,i,n){((s=e(t,i,n))>r||s===-1/0&&o===-1/0)&&(o=t,r=s)});return o},x.min=function(t,e,i){var n,s,o=1/0,r=1/0;if(null==e&&null!=t){t=D(t)?t:x.values(t);for(var a=0,l=t.length;an||void 0===i)return 1;if(ie?(r&&(clearTimeout(r),r=null),a=u,o=t.apply(n,s),r||(n=s=null)):r||!1===i.trailing||(r=setTimeout(l,c)),o}},x.debounce=function(t,e,i){var n,s,o,r,a,l=function(){var u=x.now()-r;u=0?n=setTimeout(l,e-u):(n=null,i||(a=t.apply(o,s),n||(o=s=null)))};return function(){o=this,s=arguments,r=x.now();var u=i&&!n;return n||(n=setTimeout(l,e)),u&&(a=t.apply(o,s),o=s=null),a}},x.wrap=function(t,e){return x.partial(e,t)},x.negate=function(t){return function(){return!t.apply(this,arguments)}},x.compose=function(){var t=arguments,e=t.length-1;return function(){for(var i=e,n=t[e].apply(this,arguments);i--;)n=t[i].call(this,n);return n}},x.after=function(t,e){return function(){if(--t<1)return e.apply(this,arguments)}},x.before=function(t,e){var i;return function(){return--t>0&&(i=e.apply(this,arguments)),t<=1&&(e=null),i}},x.once=x.partial(x.before,2);var j=!{toString:null}.propertyIsEnumerable("toString"),R=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(t){if(!x.isObject(t))return[];if(y)return y(t);var e=[];for(var i in t)x.has(t,i)&&e.push(i);return j&&a(t,e),e},x.allKeys=function(t){if(!x.isObject(t))return[];var e=[];for(var i in t)e.push(i);return j&&a(t,e),e},x.values=function(t){for(var e=x.keys(t),i=e.length,n=Array(i),s=0;s":">",'"':""","'":"'","`":"`"},I=x.invert(L),$=function(t){var e=function(e){return t[e]},i="(?:"+x.keys(t).join("|")+")",n=RegExp(i),s=RegExp(i,"g");return function(t){return t=null==t?"":""+t,n.test(t)?t.replace(s,e):t}};x.escape=$(L),x.unescape=$(I),x.result=function(t,e,i){var n=null==t?void 0:t[e];return void 0===n&&(n=i),x.isFunction(n)?n.call(t):n};var F=0;x.uniqueId=function(t){var e=++F+"";return t?t+e:e},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var q={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},W=function(t){return"\\"+q[t]};x.template=function(t,e,i){!e&&i&&(e=i),e=x.defaults({},e,x.templateSettings);var n=RegExp([(e.escape||/(.)^/).source,(e.interpolate||/(.)^/).source,(e.evaluate||/(.)^/).source].join("|")+"|$","g"),s=0,o="__p+='";t.replace(n,function(e,i,n,r,a){return o+=t.slice(s,a).replace(/\\|'|\r|\n|\u2028|\u2029/g,W),s=a+e.length,i?o+="'+\n((__t=("+i+"))==null?'':_.escape(__t))+\n'":n?o+="'+\n((__t=("+n+"))==null?'':__t)+\n'":r&&(o+="';\n"+r+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var r=new Function(e.variable||"obj","_",o)}catch(t){throw t.source=o,t}var a=function(t){return r.call(this,t,x)},l=e.variable||"obj";return a.source="function("+l+"){\n"+o+"}",a},x.chain=function(t){var e=x(t);return e._chain=!0,e};var z=function(t,e){return t._chain?x(e).chain():e};x.mixin=function(t){x.each(x.functions(t),function(e){var i=x[e]=t[e];x.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),z(this,i.apply(x,t))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=c[t];x.prototype[t]=function(){var i=this._wrapped;return e.apply(i,arguments),"shift"!==t&&"splice"!==t||0!==i.length||delete i[0],z(this,i)}}),x.each(["concat","join","slice"],function(t){var e=c[t];x.prototype[t]=function(){return z(this,e.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},n=[],void 0!==(s=function(){return x}.apply(e,n))&&(t.exports=s)}).call(this)},function(t,e,i){(function(n){var s,o;!function(r){var a="object"==typeof self&&self.self===self&&self||"object"==typeof n&&n.global===n&&n;s=[i(1),i(0),e],void 0!==(o=function(t,e,i){a.Backbone=r(a,i,t,e)}.apply(e,s))&&(t.exports=o)}(function(t,e,i,n){var s=t.Backbone,o=Array.prototype.slice;e.VERSION="1.3.3",e.$=n,e.noConflict=function(){return t.Backbone=s,this},e.emulateHTTP=!1,e.emulateJSON=!1;var r=function(t,e,n){switch(t){case 1:return function(){return i[e](this[n])};case 2:return function(t){return i[e](this[n],t)};case 3:return function(t,s){return i[e](this[n],l(t,this),s)};case 4:return function(t,s,o){return i[e](this[n],l(t,this),s,o)};default:return function(){var t=o.call(arguments);return t.unshift(this[n]),i[e].apply(i,t)}}},a=function(t,e,n){i.each(e,function(e,s){i[s]&&(t.prototype[s]=r(e,s,n))})},l=function(t,e){return i.isFunction(t)?t:i.isObject(t)&&!e._isModel(t)?u(t):i.isString(t)?function(e){return e.get(t)}:t},u=function(t){var e=i.matches(t);return function(t){return e(t.attributes)}},c=e.Events={},h=/\s+/,d=function(t,e,n,s,o){var r,a=0;if(n&&"object"==typeof n){void 0!==s&&"context"in o&&void 0===o.context&&(o.context=s);for(r=i.keys(n);athis.length&&(s=this.length),s<0&&(s+=this.length+1);var o,r,a=[],l=[],u=[],c=[],h={},d=e.add,p=e.merge,f=e.remove,g=!1,m=this.comparator&&null==s&&!1!==e.sort,v=i.isString(this.comparator)?this.comparator:null;for(r=0;r7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(/^\/+|\/+$/g,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var n=document.body,s=n.insertBefore(this.iframe,n.firstChild).contentWindow;s.document.open(),s.document.close(),s.location.hash="#"+this.fragment}var o=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?o("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?o("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),A.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),i.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!A.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var i=this.root;""!==t&&"?"!==t.charAt(0)||(i=i.slice(0,-1)||"/");var n=i+t;if(t=this.decodeFragment(t.replace(/#.*$/,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var s=this.iframe.contentWindow;e.replace||(s.document.open(),s.document.close()),this._updateHash(s.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var n=t.href.replace(/(javascript:|#).*$/,"");t.replace(n+"#"+e)}else t.hash="#"+e}}),e.history=new A;var N=function(t,e){var n,s=this;return n=t&&i.has(t,"constructor")?t.constructor:function(){return s.apply(this,arguments)},i.extend(n,s,e),n.prototype=i.create(s.prototype,t),n.prototype.constructor=n,n.__super__=s.prototype,n};b.extend=w.extend=E.extend=S.extend=A.extend=N;var D=function(){throw new Error('A "url" property or function must be specified')},O=function(t,e){var i=e.error;e.error=function(n){i&&i.call(e.context,t,n,e),t.trigger("error",t,n,e)}};return e})}).call(e,i(131))},function(t,e,i){"use strict";var n,s;n=[i(97)],void 0!==(s=function(t){if(t.hasOwnProperty("__root")){var e="undefined"==typeof navigator?"__root":(navigator.language||navigator.userLanguage||"__root").toLowerCase();t=t["__"+e]||t["__"+e.split("-")[0]]||t.__root}var i=function(e){return t[e]||e};return i.cacheNonLocalized=!1,i}.apply(e,n))&&(t.exports=s)},function(t,e,i){"use strict";(function(i,n,s){var o,r;o=[],void 0!==(r=function(){function t(t){return'
")}),a.show({backdrop:!0})}var o=t,r=function(t){this.$overlay=t.overlay,this.$dialog=t.dialog,this.$header=this.$dialog.find(".modal-header"),this.$body=this.$dialog.find(".modal-body"),this.$footer=this.$dialog.find(".modal-footer"),this.$backdrop=t.backdrop,this.$header.find(".close").on("click",o.proxy(this.hide,this))};o.extend(r.prototype,{setContent:function(t){this.$header.hide(),t.title&&(this.$header.find(".title").html(t.title),this.$header.show()),t.closeButton?(this.$header.find(".close").show(),this.$header.show()):this.$header.find(".close").hide(),this.$footer.hide();var e=this.$footer.find(".buttons").html("");t.buttons&&(o.each(t.buttons,function(t,i){e.append(o(" ").text(t).click(i)).append(" ")}),this.$footer.show());var i=this.$footer.find(".extra_buttons").html("");t.extra_buttons&&(o.each(t.extra_buttons,function(t,e){i.append(o("").text(t).click(e)).append(" ")}),this.$footer.show());var n=t.body;"progress"==n&&(n=o("
")),this.$body.html(n)},show:function(t,e){this.$dialog.is(":visible")||(t.backdrop?this.$backdrop.addClass("in"):this.$backdrop.removeClass("in"),this.$overlay.show(),this.$dialog.show(),this.$overlay.addClass("in"),this.$body.css("min-width",this.$body.width()),this.$body.css("max-height",o(window).height()-this.$footer.outerHeight()-this.$header.outerHeight()-parseInt(this.$dialog.css("padding-top"),10)-parseInt(this.$dialog.css("padding-bottom"),10))),e&&e()},hide:function(){var t=this;t.$dialog.fadeOut(function(){t.$overlay.hide(),t.$backdrop.removeClass("in"),t.$body.children().remove(),t.$body.css("min-width",void 0)})}});var a;return o(function(){a=new r({overlay:o("#top-modal"),dialog:o("#top-modal-dialog"),backdrop:o("#top-modal-backdrop")})}),{Modal:r,hide_modal:e,show_modal:i,show_message:n,show_in_overlay:s}}.apply(e,n))&&(t.exports=s)},function(t,e,i){"use strict";(function(n,s,o){var r,a;r=[i(33)],void 0!==(a=function(t){var e="undefined"==typeof Galaxy?"/":Galaxy.root,i={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},r=function(t){return n.each(t.steps,function(t){t.preclick&&(t.onShow=function(){n.each(t.preclick,function(t){s(t).click()})}),t.postclick&&(t.onHide=function(){n.each(t.postclick,function(t){s(t).click()})}),t.textinsert&&(t.onShown=function(){s(t.element).val(t.textinsert).trigger("change")})}),t},a=o.Model.extend({urlRoot:e+"api/tours"}),l=o.Collection.extend({url:e+"api/tours",model:a}),u=function(t){var o=e+"api/tours/"+t;s.getJSON(o,function(t){var e=r(t);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(t));var s=new Tour(n.extend({steps:e.steps},i));s.init(),s.goTo(0),s.restart()})};return{ToursView:o.View.extend({initialize:function(){var t=this;this.setElement("
"),this.model=new l,this.model.fetch({success:function(){t.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var t=n.template('

Galaxy Tours

\n

This page presents a list of interactive tours available on this Galaxy server.\nSelect any tour to get started (and remember, you can click \'End Tour\' at any time).

\n');this.$el.html(t({tours:this.model.models})).on("click",".tourItem",function(t){t.preventDefault(),u(s(this).data("tour.id"))})}}),hooked_tour_from_data:r,tour_opts:i,giveTour:u}}.apply(e,r))&&(t.exports=a)}).call(e,i(1),i(0),i(2))},function(t,e,i){"use strict";(function(n){var s,o,r;!function(n){o=[i(0)],s=n,void 0!==(r="function"==typeof s?s.apply(e,o):s)&&(t.exports=r)}(function(t){"use_strict";function e(t,e){i(t).find(".tag-name").each(function(){i(this).click(function(){var t=i(this).text(),n=t.split(":");return e(n[0],n[1]),!0})})}var i=t;return t.fn.autocomplete_tagging=function(s){function o(t){i(t).mouseenter(function(){i(this).attr("src",l.delete_tag_img_rollover)}),i(t).mouseleave(function(){i(this).attr("src",l.delete_tag_img)}),i(t).click(function(){var e=i(this).parent(),n=e.find(".tag-name").eq(0),s=n.text(),o=s.split(":"),r=o[0],a=o[1],u=e.prev();e.remove(),delete l.tags[r];var d=l.get_toggle_link_text_fn(l.tags);return h.text(d),i.ajax({url:l.ajax_delete_tag_url,data:{tag_name:r},error:function(){l.tags[r]=a,u.hasClass("tag-button")?u.after(e):c.prepend(e),alert("Remove tag failed"),h.text(l.get_toggle_link_text_fn(l.tags)),t.mouseenter(function(){i(this).attr("src",l.delete_tag_img_rollover)}),t.mouseleave(function(){i(this).attr("src",l.delete_tag_img)})},success:function(){}}),!0})}function r(t){var e=i("").attr("src",l.delete_tag_img).addClass("delete-tag-img");o(e);var n=i("").text(t).addClass("tag-name");n.click(function(){var e=t.split(":");return l.tag_click_fn(e[0],e[1]),!0});var s=i("").addClass("tag-button");return s.append(n),l.editable&&s.append(e),s}var a={get_toggle_link_text_fn:function(t){var e=n.size(t);return e>0?e+(e>1?" Tags":" Tag"):"Add tags"},tag_click_fn:function(t,e){},editable:!0,input_size:20,in_form:!1,tags:{},use_toggle_link:!0,item_id:"",add_tag_img:"",add_tag_img_rollover:"",delete_tag_img:"",ajax_autocomplete_tag_url:"",ajax_retag_url:"",ajax_delete_tag_url:"",ajax_add_tag_url:""},l=t.extend(a,s),u=i(this),c=u.find(".tag-area"),h=u.find(".toggle-link"),d=u.find(".tag-input"),p=u.find(".add-tag-button");h.click(function(){var t;return t=c.is(":hidden")?function(){0===i(this).find(".tag-button").length&&c.click()}:function(){c.blur()},c.slideToggle("fast",t),i(this)}),l.editable&&d.hide(),d.keyup(function(t){if(27===t.keyCode)i(this).trigger("blur");else if(13===t.keyCode||188===t.keyCode||32===t.keyCode){var e=this.value;if(-1!==e.indexOf(": ",e.length-2))return this.value=e.substring(0,e.length-1),!1;if(188!==t.keyCode&&32!==t.keyCode||(e=e.substring(0,e.length-1)),e=i.trim(e),e.length<2)return!1;this.value="";var n=r(e),s=c.children(".tag-button");if(0!==s.length){var o=s.slice(s.length-1);o.after(n)}else c.prepend(n);var a=e.split(":");l.tags[a[0]]=a[1];var u=l.get_toggle_link_text_fn(l.tags);h.text(u);var d=i(this);return i.ajax({url:l.ajax_add_tag_url,data:{new_tag:e},error:function(){n.remove(),delete l.tags[a[0]];var t=l.get_toggle_link_text_fn(l.tags);h.text(t),alert("Add tag failed")},success:function(){d.data("autocompleter").cacheFlush()}}),!1}});var f=function(t,e,i,n,s){var o=n.split(":");return 1===o.length?o[0]:o[1]},g={selectFirst:!1,formatItem:f,autoFill:!1,highlight:!1};d.autocomplete_verheul(l.ajax_autocomplete_tag_url,g),u.find(".delete-tag-img").each(function(){o(i(this))}),e(i(this),l.tag_click_fn),p.click(function(){return i(this).hide(),c.click(),!1}),l.editable&&(c.bind("blur",function(t){n.size(l.tags)>0&&(p.show(),d.hide(),c.removeClass("active-tag-area"))}),c.click(function(t){var e=i(this).hasClass("active-tag-area");if(i(t.target).hasClass("delete-tag-img")&&!e)return!1;if(i(t.target).hasClass("tag-name")&&!e)return!1;i(this).addClass("active-tag-area"),p.hide(),d.show(),d.focus();var n=function(t){!function(t,e){t.attr("id");e!==t&&(t.blur(),i(window).unbind("click.tagging_blur"),i(this).addClass("tooltip"))}(c,i(t.target))};return i(window).bind("click.tagging_blur",n),!1})),l.use_toggle_link&&c.hide()},e})}).call(e,i(1))},,,,,,,function(t,e,i){"use strict";(function(i,n,s){var o,r;o=[],void 0!==(r=function(){var t=i.View.extend({initialize:function(t){this.model=t&&t.model||new i.Model(t),this.setElement(n("
").addClass("corner frame")),this.$el.append(n("
").addClass("f-header corner").append(n("
").addClass("f-title")).append(n("
").addClass("f-icon f-close fa fa-close").tooltip({title:"Close",placement:"bottom"}))).append(n("
").addClass("f-content")).append(n("
").addClass("f-resize f-icon corner fa fa-expand").tooltip({title:"Resize"})).append(n("
").addClass("f-cover")),this.$header=this.$(".f-header"),this.$title=this.$(".f-title"),this.$content=this.$(".f-content"),this.render(),this.listenTo(this.model,"change",this.render,this)},render:function(){var t=this,e=this.model.attributes;this.$title.html(e.title||""),this.$header.find(".f-icon-left").remove(),s.each(e.menu,function(e){var i=n("
").addClass("f-icon-left").addClass(e.icon);s.isFunction(e.disabled)&&e.disabled()?i.attr("disabled",!0):i.on("click",function(){e.onclick(t)}).tooltip({title:e.tooltip,placement:"bottom"}),t.$header.append(i)}),e.url?this.$content.html(n("
")}),a.show({backdrop:!0})}var o=t,r=function(t){this.$overlay=t.overlay,this.$dialog=t.dialog,this.$header=this.$dialog.find(".modal-header"),this.$body=this.$dialog.find(".modal-body"),this.$footer=this.$dialog.find(".modal-footer"),this.$backdrop=t.backdrop,this.$header.find(".close").on("click",o.proxy(this.hide,this))};o.extend(r.prototype,{setContent:function(t){this.$header.hide(),t.title&&(this.$header.find(".title").html(t.title),this.$header.show()),t.closeButton?(this.$header.find(".close").show(),this.$header.show()):this.$header.find(".close").hide(),this.$footer.hide();var e=this.$footer.find(".buttons").html("");t.buttons&&(o.each(t.buttons,function(t,i){e.append(o(" ").text(t).click(i)).append(" ")}),this.$footer.show());var i=this.$footer.find(".extra_buttons").html("");t.extra_buttons&&(o.each(t.extra_buttons,function(t,e){i.append(o("").text(t).click(e)).append(" ")}),this.$footer.show());var n=t.body;"progress"==n&&(n=o("
")),this.$body.html(n)},show:function(t,e){this.$dialog.is(":visible")||(t.backdrop?this.$backdrop.addClass("in"):this.$backdrop.removeClass("in"),this.$overlay.show(),this.$dialog.show(),this.$overlay.addClass("in"),this.$body.css("min-width",this.$body.width()),this.$body.css("max-height",o(window).height()-this.$footer.outerHeight()-this.$header.outerHeight()-parseInt(this.$dialog.css("padding-top"),10)-parseInt(this.$dialog.css("padding-bottom"),10))),e&&e()},hide:function(){var t=this;t.$dialog.fadeOut(function(){t.$overlay.hide(),t.$backdrop.removeClass("in"),t.$body.children().remove(),t.$body.css("min-width",void 0)})}});var a;return o(function(){a=new r({overlay:o("#top-modal"),dialog:o("#top-modal-dialog"),backdrop:o("#top-modal-backdrop")})}),{Modal:r,hide_modal:e,show_modal:i,show_message:n,show_in_overlay:s}}.apply(e,s))&&(t.exports=o)}).call(e,i(0))},function(t,e,i){"use strict";(function(n,s,o){var r,a;r=[i(33)],void 0!==(a=function(t){var e="undefined"==typeof Galaxy?"/":Galaxy.root,i={storage:window.sessionStorage,onEnd:function(){sessionStorage.removeItem("activeGalaxyTour")},delay:150,orphan:!0},r=function(t){return n.each(t.steps,function(t){t.preclick&&(t.onShow=function(){n.each(t.preclick,function(t){s(t).click()})}),t.postclick&&(t.onHide=function(){n.each(t.postclick,function(t){s(t).click()})}),t.textinsert&&(t.onShown=function(){s(t.element).val(t.textinsert).trigger("change")})}),t},a=o.Model.extend({urlRoot:e+"api/tours"}),l=o.Collection.extend({url:e+"api/tours",model:a}),u=function(t){var o=e+"api/tours/"+t;s.getJSON(o,function(t){var e=r(t);sessionStorage.setItem("activeGalaxyTour",JSON.stringify(t));var s=new Tour(n.extend({steps:e.steps},i));s.init(),s.goTo(0),s.restart()})};return{ToursView:o.View.extend({initialize:function(){var t=this;this.setElement("
"),this.model=new l,this.model.fetch({success:function(){t.render()},error:function(){console.error("Failed to fetch tours.")}})},render:function(){var t=n.template('

Galaxy Tours

\n

This page presents a list of interactive tours available on this Galaxy server.\nSelect any tour to get started (and remember, you can click \'End Tour\' at any time).

\n');this.$el.html(t({tours:this.model.models})).on("click",".tourItem",function(t){t.preventDefault(),u(s(this).data("tour.id"))})}}),hooked_tour_from_data:r,tour_opts:i,giveTour:u}}.apply(e,r))&&(t.exports=a)}).call(e,i(1),i(0),i(2))},function(t,e,i){"use strict";(function(n){var s,o,r;!function(n){o=[i(0)],s=n,void 0!==(r="function"==typeof s?s.apply(e,o):s)&&(t.exports=r)}(function(t){"use_strict";function e(t,e){i(t).find(".tag-name").each(function(){i(this).click(function(){var t=i(this).text(),n=t.split(":");return e(n[0],n[1]),!0})})}var i=t;return t.fn.autocomplete_tagging=function(s){function o(t){i(t).mouseenter(function(){i(this).attr("src",l.delete_tag_img_rollover)}),i(t).mouseleave(function(){i(this).attr("src",l.delete_tag_img)}),i(t).click(function(){var e=i(this).parent(),n=e.find(".tag-name").eq(0),s=n.text(),o=s.split(":"),r=o[0],a=o[1],u=e.prev();e.remove(),delete l.tags[r];var d=l.get_toggle_link_text_fn(l.tags);return h.text(d),i.ajax({url:l.ajax_delete_tag_url,data:{tag_name:r},error:function(){l.tags[r]=a,u.hasClass("tag-button")?u.after(e):c.prepend(e),alert("Remove tag failed"),h.text(l.get_toggle_link_text_fn(l.tags)),t.mouseenter(function(){i(this).attr("src",l.delete_tag_img_rollover)}),t.mouseleave(function(){i(this).attr("src",l.delete_tag_img)})},success:function(){}}),!0})}function r(t){var e=i("").attr("src",l.delete_tag_img).addClass("delete-tag-img");o(e);var n=i("").text(t).addClass("tag-name");n.click(function(){var e=t.split(":");return l.tag_click_fn(e[0],e[1]),!0});var s=i("").addClass("tag-button");return s.append(n),l.editable&&s.append(e),s}var a={get_toggle_link_text_fn:function(t){var e=n.size(t);return e>0?e+(e>1?" Tags":" Tag"):"Add tags"},tag_click_fn:function(t,e){},editable:!0,input_size:20,in_form:!1,tags:{},use_toggle_link:!0,item_id:"",add_tag_img:"",add_tag_img_rollover:"",delete_tag_img:"",ajax_autocomplete_tag_url:"",ajax_retag_url:"",ajax_delete_tag_url:"",ajax_add_tag_url:""},l=t.extend(a,s),u=i(this),c=u.find(".tag-area"),h=u.find(".toggle-link"),d=u.find(".tag-input"),p=u.find(".add-tag-button");h.click(function(){var t;return t=c.is(":hidden")?function(){0===i(this).find(".tag-button").length&&c.click()}:function(){c.blur()},c.slideToggle("fast",t),i(this)}),l.editable&&d.hide(),d.keyup(function(t){if(27===t.keyCode)i(this).trigger("blur");else if(13===t.keyCode||188===t.keyCode||32===t.keyCode){var e=this.value;if(-1!==e.indexOf(": ",e.length-2))return this.value=e.substring(0,e.length-1),!1;if(188!==t.keyCode&&32!==t.keyCode||(e=e.substring(0,e.length-1)),e=i.trim(e),e.length<2)return!1;this.value="";var n=r(e),s=c.children(".tag-button");if(0!==s.length){var o=s.slice(s.length-1);o.after(n)}else c.prepend(n);var a=e.split(":");l.tags[a[0]]=a[1];var u=l.get_toggle_link_text_fn(l.tags);h.text(u);var d=i(this);return i.ajax({url:l.ajax_add_tag_url,data:{new_tag:e},error:function(){n.remove(),delete l.tags[a[0]];var t=l.get_toggle_link_text_fn(l.tags);h.text(t),alert("Add tag failed")},success:function(){d.data("autocompleter").cacheFlush()}}),!1}});var f=function(t,e,i,n,s){var o=n.split(":");return 1===o.length?o[0]:o[1]},g={selectFirst:!1,formatItem:f,autoFill:!1,highlight:!1};d.autocomplete_verheul(l.ajax_autocomplete_tag_url,g),u.find(".delete-tag-img").each(function(){o(i(this))}),e(i(this),l.tag_click_fn),p.click(function(){return i(this).hide(),c.click(),!1}),l.editable&&(c.bind("blur",function(t){n.size(l.tags)>0&&(p.show(),d.hide(),c.removeClass("active-tag-area"))}),c.click(function(t){var e=i(this).hasClass("active-tag-area");if(i(t.target).hasClass("delete-tag-img")&&!e)return!1;if(i(t.target).hasClass("tag-name")&&!e)return!1;i(this).addClass("active-tag-area"),p.hide(),d.show(),d.focus();var n=function(t){!function(t,e){t.attr("id");e!==t&&(t.blur(),i(window).unbind("click.tagging_blur"),i(this).addClass("tooltip"))}(c,i(t.target))};return i(window).bind("click.tagging_blur",n),!1})),l.use_toggle_link&&c.hide()},e})}).call(e,i(1))},,,,,,,function(t,e,i){"use strict";(function(i,n,s){var o,r;o=[],void 0!==(r=function(){var t=i.View.extend({initialize:function(t){this.model=t&&t.model||new i.Model(t),this.setElement(n("
").addClass("corner frame")),this.$el.append(n("
").addClass("f-header corner").append(n("
").addClass("f-title")).append(n("
").addClass("f-icon f-close fa fa-close").tooltip({title:"Close",placement:"bottom"}))).append(n("
").addClass("f-content")).append(n("
").addClass("f-resize f-icon corner fa fa-expand").tooltip({title:"Resize"})).append(n("
").addClass("f-cover")),this.$header=this.$(".f-header"),this.$title=this.$(".f-title"),this.$content=this.$(".f-content"),this.render(),this.listenTo(this.model,"change",this.render,this)},render:function(){var t=this,e=this.model.attributes;this.$title.html(e.title||""),this.$header.find(".f-icon-left").remove(),s.each(e.menu,function(e){var i=n("
").addClass("f-icon-left").addClass(e.icon);s.isFunction(e.disabled)&&e.disabled()?i.attr("disabled",!0):i.on("click",function(){e.onclick(t)}).tooltip({title:e.tooltip,placement:"bottom"}),t.$header.append(i)}),e.url?this.$content.html(n("';return s(".chat-modal").length>0&&s(".chat-modal").remove(),e.modal=new t.View({body:d,height:350,width:600,closing_events:!0,title_separator:!1,cls:"ui-modal chat-modal"}),e.modal.show(),c=s(".chat-modal .modal-header"),h=s(".chat-modal .modal-body"),c.addClass("modal-header-body"),h.addClass("modal-header-body"),c.find("h4").remove(),c.removeAttr("min-height padding border"),c.append(''),s(".close-modal").click(function(t){s(".chat-modal").css("display","none")}),s(".expand-compress-modal").click(function(t){s(".expand-compress-modal").hasClass("fa-expand")?(s(".chat-modal .modal-dialog").width("1000px"),s(".chat-modal .modal-body").height("575px"),s(".expand-compress-modal").removeClass("fa-expand").addClass("fa-compress"),s(".expand-compress-modal").attr("title","Minimize"),s(".expand-compress-modal").css("margin-left","96.2%")):(s(".chat-modal .modal-dialog").width("600px"),s(".chat-modal .modal-body").height("350px"),s(".expand-compress-modal").removeClass("fa-compress").addClass("fa-expand"),s(".expand-compress-modal").attr("title","Maximize"),s(".expand-compress-modal").css("margin-left","93.2%"))}),this},render:function(){var t=this;return{id:"show-chat-online",icon:"fa-comment-o",tooltip:"Chat online",visible:!1,onclick:t.makeModalIframe}}});return{GenericNavView:e}}.apply(e,o))&&(t.exports=r)}).call(e,i(2),i(0))},function(t,e,i){"use strict";(function(n,s){var o,r;o=[i(4),i(102),i(103),i(124)],void 0!==(r=function(t,e,i,o){return{View:n.View.extend({initialize:function(t){var n=this;this.options=t,this.setElement(this._template()),this.$navbarBrandLink=this.$(".navbar-brand-link"),this.$navbarBrandImage=this.$(".navbar-brand-image"),this.$navbarBrandTitle=this.$(".navbar-brand-title"),this.$navbarTabs=this.$(".navbar-tabs"),this.$quoteMeter=this.$(".quota-meter-container"),this.collection=new e.Collection,this.collection.on("add",function(t){n.$navbarTabs.append(new e.Tab({model:t}).render().$el)}).on("reset",function(){n.$navbarTabs.empty()}).on("dispatch",function(t){n.collection.each(function(e){t(e)})}).fetch(this.options),Galaxy.frame=this.frame=new i({collection:this.collection}),Galaxy.quotaMeter=this.quotaMeter=new o.UserQuotaMeter({model:Galaxy.user,el:this.$quoteMeter}),s(window).on("click",function(t){var e=s(t.target).closest("a[download]");1==e.length&&(0===s("iframe[id=download]").length&&s("body").append(s("';return s(".chat-modal").length>0&&s(".chat-modal").remove(),e.modal=new t.View({body:d,height:350,width:600,closing_events:!0,title_separator:!1,cls:"ui-modal chat-modal"}),e.modal.show(),c=s(".chat-modal .modal-header"),h=s(".chat-modal .modal-body"),c.addClass("modal-header-body"),h.addClass("modal-header-body"),c.find("h4").remove(),c.removeAttr("min-height padding border"),c.append(''),s(".close-modal").click(function(t){s(".chat-modal").css("display","none")}),s(".expand-compress-modal").click(function(t){s(".expand-compress-modal").hasClass("fa-expand")?(s(".chat-modal .modal-dialog").width("1000px"),s(".chat-modal .modal-body").height("575px"),s(".expand-compress-modal").removeClass("fa-expand").addClass("fa-compress"),s(".expand-compress-modal").attr("title","Minimize"),s(".expand-compress-modal").css("margin-left","96.2%")):(s(".chat-modal .modal-dialog").width("600px"),s(".chat-modal .modal-body").height("350px"),s(".expand-compress-modal").removeClass("fa-compress").addClass("fa-expand"),s(".expand-compress-modal").attr("title","Maximize"),s(".expand-compress-modal").css("margin-left","93.2%"))}),this},render:function(){var t=this;return{id:"show-chat-online",icon:"fa-comment-o",tooltip:"Chat online",visible:!1,onclick:t.makeModalIframe}}});return{GenericNavView:e}}.apply(e,o))&&(t.exports=r)}).call(e,i(2),i(0))},function(t,e,i){"use strict";(function(n,s){var o,r;o=[i(4),i(102),i(103),i(124)],void 0!==(r=function(t,e,i,o){return{View:n.View.extend({initialize:function(t){var n=this;this.options=t,this.setElement(this._template()),this.$navbarBrandLink=this.$(".navbar-brand-link"),this.$navbarBrandImage=this.$(".navbar-brand-image"),this.$navbarBrandTitle=this.$(".navbar-brand-title"),this.$navbarTabs=this.$(".navbar-tabs"),this.$quoteMeter=this.$(".quota-meter-container"),this.collection=new e.Collection,this.collection.on("add",function(t){n.$navbarTabs.append(new e.Tab({model:t}).render().$el)}).on("reset",function(){n.$navbarTabs.empty()}).on("dispatch",function(t){n.collection.each(function(e){t(e)})}).fetch(this.options),Galaxy.frame=this.frame=new i({collection:this.collection}),Galaxy.quotaMeter=this.quotaMeter=new o.UserQuotaMeter({model:Galaxy.user,el:this.$quoteMeter}),s(window).on("click",function(t){var e=s(t.target).closest("a[download]");1==e.length&&(0===s("iframe[id=download]").length&&s("body").append(s("
\")\n });\n modal.show({ backdrop: true });\n }\n\n // ============================================================================\n return {\n Modal: Modal,\n hide_modal: hide_modal,\n show_modal: show_modal,\n show_message: show_message,\n show_in_overlay: show_in_overlay\n };\n}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(_, $, Backbone) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n/**\n * This is the primary galaxy tours definition, currently only used for\n * rendering a tour menu.\n */\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(33)], __WEBPACK_AMD_DEFINE_RESULT__ = function (BootstrapTour) {\n var gxy_root = typeof Galaxy === \"undefined\" ? \"/\" : Galaxy.root;\n\n var tourpage_template = \"

Galaxy Tours

\\n

This page presents a list of interactive tours available on this Galaxy server.\\nSelect any tour to get started (and remember, you can click 'End Tour' at any time).

\\n\";\n\n var tour_opts = {\n storage: window.sessionStorage,\n onEnd: function onEnd() {\n sessionStorage.removeItem(\"activeGalaxyTour\");\n },\n delay: 150, // Attempts to make it look natural\n orphan: true\n };\n\n var hooked_tour_from_data = function hooked_tour_from_data(data) {\n _.each(data.steps, function (step) {\n if (step.preclick) {\n step.onShow = function () {\n _.each(step.preclick, function (preclick) {\n // TODO: click delay between clicks\n $(preclick).click();\n });\n };\n }\n if (step.postclick) {\n step.onHide = function () {\n _.each(step.postclick, function (postclick) {\n // TODO: click delay between clicks\n $(postclick).click();\n });\n };\n }\n if (step.textinsert) {\n // Have to manually trigger a change here, for some\n // elements which have additional logic, like the\n // upload input box\n step.onShown = function () {\n $(step.element).val(step.textinsert).trigger(\"change\");\n };\n }\n });\n return data;\n };\n\n var TourItem = Backbone.Model.extend({\n urlRoot: gxy_root + \"api/tours\"\n });\n\n var Tours = Backbone.Collection.extend({\n url: gxy_root + \"api/tours\",\n model: TourItem\n });\n\n var giveTour = function giveTour(tour_id) {\n var url = gxy_root + \"api/tours/\" + tour_id;\n $.getJSON(url, function (data) {\n // Set hooks for additional click and data entry actions.\n var tourdata = hooked_tour_from_data(data);\n sessionStorage.setItem(\"activeGalaxyTour\", JSON.stringify(data));\n // Store tour steps in sessionStorage to easily persist w/o hackery.\n var tour = new Tour(_.extend({\n steps: tourdata.steps\n }, tour_opts));\n // Always clean restart, since this is a new, explicit giveTour execution.\n tour.init();\n tour.goTo(0);\n tour.restart();\n });\n };\n var ToursView = Backbone.View.extend({\n // initialize\n initialize: function initialize() {\n var self = this;\n this.setElement(\"
\");\n this.model = new Tours();\n this.model.fetch({\n success: function success() {\n self.render();\n },\n error: function error() {\n // Do something.\n console.error(\"Failed to fetch tours.\");\n }\n });\n },\n\n render: function render() {\n var tpl = _.template(tourpage_template);\n this.$el.html(tpl({ tours: this.model.models })).on(\"click\", \".tourItem\", function (e) {\n e.preventDefault();\n giveTour($(this).data(\"tour.id\"));\n });\n }\n });\n\n return {\n ToursView: ToursView,\n hooked_tour_from_data: hooked_tour_from_data,\n tour_opts: tour_opts,\n giveTour: giveTour\n };\n}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(2)))\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(_) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n// from: https://raw.githubusercontent.com/umdjs/umd/master/jqueryPlugin.js\n// Uses AMD or browser globals to create a jQuery plugin.\n(function (factory) {\n if (true) {\n //TODO: So...this turns out to be an all or nothing thing. If I load jQuery in the define below, it will\n // (of course) wipe the old jquery *and all the plugins loaded into it*. So the define below *is still\n // relying on jquery being loaded globally* in order to preserve plugins.\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function (jQuery) {\n 'use_strict';\n\n var $ = jQuery;\n\n // ============================================================================\n /**\n * JQuery extension for tagging with autocomplete.\n * @author: Jeremy Goecks\n * @require: jquery.autocomplete plugin\n */\n //\n // Initialize \"tag click functions\" for tags.\n //\n function init_tag_click_function(tag_elt, click_func) {\n $(tag_elt).find('.tag-name').each(function () {\n $(this).click(function () {\n var tag_str = $(this).text();\n var tag_name_and_value = tag_str.split(\":\");\n click_func(tag_name_and_value[0], tag_name_and_value[1]);\n return true;\n });\n });\n }\n\n jQuery.fn.autocomplete_tagging = function (options) {\n\n var defaults = {\n get_toggle_link_text_fn: function get_toggle_link_text_fn(tags) {\n var text = \"\";\n var num_tags = _.size(tags);\n if (num_tags > 0) {\n text = num_tags + (num_tags > 1 ? \" Tags\" : \" Tag\");\n } else {\n text = \"Add tags\";\n }\n return text;\n },\n tag_click_fn: function tag_click_fn(name, value) {},\n editable: true,\n input_size: 20,\n in_form: false,\n tags: {},\n use_toggle_link: true,\n item_id: \"\",\n add_tag_img: \"\",\n add_tag_img_rollover: \"\",\n delete_tag_img: \"\",\n ajax_autocomplete_tag_url: \"\",\n ajax_retag_url: \"\",\n ajax_delete_tag_url: \"\",\n ajax_add_tag_url: \"\"\n };\n\n var settings = jQuery.extend(defaults, options);\n\n //\n // Initalize object's elements.\n //\n\n // Get elements for this object. For this_obj, assume the last element with the id is the \"this\"; this is somewhat of a hack to address the problem\n // that there may be two tagging elements for a single item if there are both community and individual tags for an element.\n var this_obj = $(this);\n var tag_area = this_obj.find('.tag-area');\n var toggle_link = this_obj.find('.toggle-link');\n var tag_input_field = this_obj.find('.tag-input');\n var add_tag_button = this_obj.find('.add-tag-button');\n\n // Initialize toggle link.\n toggle_link.click(function () {\n // Take special actions depending on whether toggle is showing or hiding link.\n var after_toggle_fn;\n if (tag_area.is(\":hidden\")) {\n after_toggle_fn = function after_toggle_fn() {\n // If there are no tags, go right to editing mode by generating a click on the area.\n var num_tags = $(this).find('.tag-button').length;\n if (num_tags === 0) {\n tag_area.click();\n }\n };\n } else {\n after_toggle_fn = function after_toggle_fn() {\n tag_area.blur();\n };\n }\n tag_area.slideToggle(\"fast\", after_toggle_fn);\n return $(this);\n });\n\n // Initialize tag input field.\n if (settings.editable) {\n tag_input_field.hide();\n }\n tag_input_field.keyup(function (e) {\n if (e.keyCode === 27) {\n // Escape key\n $(this).trigger(\"blur\");\n } else if (e.keyCode === 13 || // Return Key\n e.keyCode === 188 || // Comma\n e.keyCode === 32 // Space\n ) {\n //\n // Check input.\n //\n\n var new_value = this.value;\n\n // Suppress space after a \":\"\n if (new_value.indexOf(\": \", new_value.length - 2) !== -1) {\n this.value = new_value.substring(0, new_value.length - 1);\n return false;\n }\n\n // Remove trigger keys from input.\n if (e.keyCode === 188 || e.keyCode === 32) {\n new_value = new_value.substring(0, new_value.length - 1);\n }\n\n // Trim whitespace.\n new_value = $.trim(new_value);\n\n // Too short?\n if (new_value.length < 2) {\n return false;\n }\n\n //\n // New tag OK - apply it.\n //\n\n this.value = \"\"; // Reset text field now that tag is being added\n\n // Add button for tag after all other tag buttons.\n var new_tag_button = build_tag_button(new_value);\n var tag_buttons = tag_area.children(\".tag-button\");\n if (tag_buttons.length !== 0) {\n var last_tag_button = tag_buttons.slice(tag_buttons.length - 1);\n last_tag_button.after(new_tag_button);\n } else {\n tag_area.prepend(new_tag_button);\n }\n\n // Add tag to internal list.\n var tag_name_and_value = new_value.split(\":\");\n settings.tags[tag_name_and_value[0]] = tag_name_and_value[1];\n\n // Update toggle link text.\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n\n // Commit tag to server.\n var zz = $(this);\n $.ajax({\n url: settings.ajax_add_tag_url,\n data: { new_tag: new_value },\n error: function error() {\n // Failed. Roll back changes and show alert.\n new_tag_button.remove();\n delete settings.tags[tag_name_and_value[0]];\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n alert(\"Add tag failed\");\n },\n success: function success() {\n // Flush autocomplete cache because it's not out of date.\n // TODO: in the future, we could remove the particular item\n // that was chosen from the cache rather than flush it.\n zz.data('autocompleter').cacheFlush();\n }\n });\n\n return false;\n }\n });\n\n // Add autocomplete to input.\n var format_item_func = function format_item_func(key, row_position, num_rows, value, search_term) {\n var tag_name_and_value = value.split(\":\");\n return tag_name_and_value.length === 1 ? tag_name_and_value[0] : tag_name_and_value[1];\n };\n var autocomplete_options = { selectFirst: false, formatItem: format_item_func,\n autoFill: false, highlight: false };\n tag_input_field.autocomplete_verheul(settings.ajax_autocomplete_tag_url, autocomplete_options);\n\n // Initialize delete tag images for current tags.\n this_obj.find('.delete-tag-img').each(function () {\n init_delete_tag_image($(this));\n });\n\n // Initialize tag click function.\n init_tag_click_function($(this), settings.tag_click_fn);\n\n // Initialize \"add tag\" button.\n add_tag_button.click(function () {\n $(this).hide();\n\n // Clicking on button is the same as clicking on the tag area.\n tag_area.click();\n return false;\n });\n\n //\n // Set up tag area interactions; these are needed only if tags are editable.\n //\n if (settings.editable) {\n // When the tag area blurs, go to \"view tag\" mode.\n tag_area.bind(\"blur\", function (e) {\n if (_.size(settings.tags) > 0) {\n add_tag_button.show();\n tag_input_field.hide();\n tag_area.removeClass(\"active-tag-area\");\n // tag_area.addClass(\"tooltip\");\n } else {\n // No tags, so do nothing to ensure that input is still visible.\n }\n });\n\n // On click, enable user to add tags.\n tag_area.click(function (e) {\n var is_active = $(this).hasClass(\"active-tag-area\");\n\n // If a \"delete image\" object was pressed and area is inactive, do nothing.\n if ($(e.target).hasClass(\"delete-tag-img\") && !is_active) {\n return false;\n }\n\n // If a \"tag name\" object was pressed and area is inactive, do nothing.\n if ($(e.target).hasClass(\"tag-name\") && !is_active) {\n return false;\n }\n\n // Remove tooltip.\n // $(this).removeClass(\"tooltip\");\n\n // Hide add tag button, show tag_input field. Change background to show\n // area is active.\n $(this).addClass(\"active-tag-area\");\n add_tag_button.hide();\n tag_input_field.show();\n tag_input_field.focus();\n\n // Add handler to document that will call blur when the tag area is blurred;\n // a tag area is blurred when a user clicks on an element outside the area.\n var handle_document_click = function handle_document_click(e) {\n var check_click = function check_click(tag_area, target) {\n var tag_area_id = tag_area.attr(\"id\");\n // Blur the tag area if the element clicked on is not in the tag area.\n if (target !== tag_area) {\n tag_area.blur();\n $(window).unbind(\"click.tagging_blur\");\n $(this).addClass(\"tooltip\");\n }\n };\n check_click(tag_area, $(e.target));\n };\n // TODO: we should attach the click handler to all frames in order to capture\n // clicks outside the frame that this element is in.\n //window.parent.document.onclick = handle_document_click;\n //var temp = $(window.parent.document.body).contents().find(\"iframe\").html();\n //alert(temp);\n //$(document).parent().click(handle_document_click);\n $(window).bind(\"click.tagging_blur\", handle_document_click);\n\n return false;\n });\n }\n\n // If using toggle link, hide the tag area. Otherwise, show the tag area.\n if (settings.use_toggle_link) {\n tag_area.hide();\n }\n\n //\n // Helper functions.\n //\n\n //\n // Collapse tag name + value into a single string.\n //\n function build_tag_str(tag_name, tag_value) {\n return tag_name + (tag_value ? \":\" + tag_value : \"\");\n }\n\n // Initialize a \"delete tag image\": when click, delete tag from UI and send delete request to server.\n function init_delete_tag_image(delete_img) {\n $(delete_img).mouseenter(function () {\n $(this).attr(\"src\", settings.delete_tag_img_rollover);\n });\n $(delete_img).mouseleave(function () {\n $(this).attr(\"src\", settings.delete_tag_img);\n });\n $(delete_img).click(function () {\n // Tag button is image's parent.\n var tag_button = $(this).parent();\n\n // Get tag name, value.\n var tag_name_elt = tag_button.find(\".tag-name\").eq(0);\n var tag_str = tag_name_elt.text();\n var tag_name_and_value = tag_str.split(\":\");\n var tag_name = tag_name_and_value[0];\n var tag_value = tag_name_and_value[1];\n\n var prev_button = tag_button.prev();\n tag_button.remove();\n\n // Remove tag from local list for consistency.\n delete settings.tags[tag_name];\n\n // Update toggle link text.\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n\n // Delete tag.\n $.ajax({\n url: settings.ajax_delete_tag_url,\n data: { tag_name: tag_name },\n error: function error() {\n // Failed. Roll back changes and show alert.\n settings.tags[tag_name] = tag_value;\n if (prev_button.hasClass(\"tag-button\")) {\n prev_button.after(tag_button);\n } else {\n tag_area.prepend(tag_button);\n }\n alert(\"Remove tag failed\");\n\n toggle_link.text(settings.get_toggle_link_text_fn(settings.tags));\n\n // TODO: no idea why it's necessary to set this up again.\n delete_img.mouseenter(function () {\n $(this).attr(\"src\", settings.delete_tag_img_rollover);\n });\n delete_img.mouseleave(function () {\n $(this).attr(\"src\", settings.delete_tag_img);\n });\n },\n success: function success() {}\n });\n\n return true;\n });\n }\n\n //\n // Function that builds a tag button.\n //\n function build_tag_button(tag_str) {\n // Build \"delete tag\" image.\n var delete_img = $(\"\").attr(\"src\", settings.delete_tag_img).addClass(\"delete-tag-img\");\n init_delete_tag_image(delete_img);\n\n // Build tag button.\n var tag_name_elt = $(\"\").text(tag_str).addClass(\"tag-name\");\n tag_name_elt.click(function () {\n var tag_name_and_value = tag_str.split(\":\");\n settings.tag_click_fn(tag_name_and_value[0], tag_name_and_value[1]);\n return true;\n });\n\n var tag_button = $(\"\").addClass(\"tag-button\");\n tag_button.append(tag_name_elt);\n // Allow delete only if element is editable.\n if (settings.editable) {\n tag_button.append(delete_img);\n }\n\n return tag_button;\n }\n };\n\n // ============================================================================\n return init_tag_click_function;\n});\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 37 */,\n/* 38 */,\n/* 39 */,\n/* 40 */,\n/* 41 */,\n/* 42 */,\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Backbone, $, _) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {\n\n /** Frame view */\n var FrameView = Backbone.View.extend({\n initialize: function initialize(options) {\n var self = this;\n this.model = options && options.model || new Backbone.Model(options);\n this.setElement($('
').addClass('corner frame'));\n this.$el.append($('
').addClass('f-header corner').append($('
').addClass('f-title')).append($('
').addClass('f-icon f-close fa fa-close').tooltip({ title: 'Close', placement: 'bottom' }))).append($('
').addClass('f-content')).append($('
').addClass('f-resize f-icon corner fa fa-expand').tooltip({ title: 'Resize' })).append($('
').addClass('f-cover'));\n this.$header = this.$('.f-header');\n this.$title = this.$('.f-title');\n this.$content = this.$('.f-content');\n this.render();\n this.listenTo(this.model, 'change', this.render, this);\n },\n\n render: function render() {\n var self = this;\n var options = this.model.attributes;\n this.$title.html(options.title || '');\n this.$header.find('.f-icon-left').remove();\n _.each(options.menu, function (option) {\n var $option = $('
').addClass('f-icon-left').addClass(option.icon);\n if (_.isFunction(option.disabled) && option.disabled()) {\n $option.attr('disabled', true);\n } else {\n $option.on('click', function () {\n option.onclick(self);\n }).tooltip({ title: option.tooltip, placement: 'bottom' });\n }\n self.$header.append($option);\n });\n if (options.url) {\n this.$content.html($('',\n header_template = '' + '' + '',\n frame_height = 350,\n frame_width = 600,\n class_names = 'ui-modal chat-modal';\n\n // deletes the chat modal if already present and create one\n if ($('.chat-modal').length > 0) {\n $('.chat-modal').remove();\n }\n // creates a modal\n GenericNavView.modal = new Modal.View({\n body: iframe_template,\n height: frame_height,\n width: frame_width,\n closing_events: true,\n title_separator: false,\n cls: class_names\n });\n\n // shows modal\n GenericNavView.modal.show();\n $el_chat_modal_header = $('.chat-modal .modal-header');\n $el_chat_modal_body = $('.chat-modal .modal-body');\n // adjusts the css of bootstrap modal for chat\n $el_chat_modal_header.addClass('modal-header-body');\n $el_chat_modal_body.addClass('modal-header-body');\n $el_chat_modal_header.find('h4').remove();\n $el_chat_modal_header.removeAttr('min-height padding border');\n $el_chat_modal_header.append(header_template);\n // click event of the close button for chat\n $('.close-modal').click(function (e) {\n $('.chat-modal').css('display', 'none');\n });\n // click event of expand and compress icon\n $('.expand-compress-modal').click(function (e) {\n if ($('.expand-compress-modal').hasClass('fa-expand')) {\n $('.chat-modal .modal-dialog').width('1000px');\n $('.chat-modal .modal-body').height('575px');\n $('.expand-compress-modal').removeClass('fa-expand').addClass('fa-compress');\n $('.expand-compress-modal').attr('title', 'Minimize');\n $('.expand-compress-modal').css('margin-left', '96.2%');\n } else {\n $('.chat-modal .modal-dialog').width(frame_width + 'px');\n $('.chat-modal .modal-body').height(frame_height + 'px');\n $('.expand-compress-modal').removeClass('fa-compress').addClass('fa-expand');\n $('.expand-compress-modal').attr('title', 'Maximize');\n $('.expand-compress-modal').css('margin-left', '93.2%');\n }\n });\n return this;\n },\n\n /**renders the chat icon as a nav item*/\n render: function render() {\n var self = this,\n navItem = {};\n navItem = {\n id: 'show-chat-online',\n icon: 'fa-comment-o',\n tooltip: 'Chat online',\n visible: false,\n onclick: self.makeModalIframe\n };\n return navItem;\n }\n });\n\n return {\n GenericNavView: GenericNavView\n };\n}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(0)))\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Backbone, $) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(102), __webpack_require__(103), __webpack_require__(124)], __WEBPACK_AMD_DEFINE_RESULT__ = function (Utils, Menu, Scratchbook, QuotaMeter) {\n\n /** Masthead **/\n var View = Backbone.View.extend({\n initialize: function initialize(options) {\n var self = this;\n this.options = options;\n this.setElement(this._template());\n this.$navbarBrandLink = this.$('.navbar-brand-link');\n this.$navbarBrandImage = this.$('.navbar-brand-image');\n this.$navbarBrandTitle = this.$('.navbar-brand-title');\n this.$navbarTabs = this.$('.navbar-tabs');\n this.$quoteMeter = this.$('.quota-meter-container');\n\n // build tabs\n this.collection = new Menu.Collection();\n this.collection.on('add', function (model) {\n self.$navbarTabs.append(new Menu.Tab({ model: model }).render().$el);\n }).on('reset', function () {\n self.$navbarTabs.empty();\n }).on('dispatch', function (callback) {\n self.collection.each(function (m) {\n callback(m);\n });\n }).fetch(this.options);\n\n // scratchbook\n Galaxy.frame = this.frame = new Scratchbook({ collection: this.collection });\n\n // set up the quota meter (And fetch the current user data from trans)\n // add quota meter to masthead\n Galaxy.quotaMeter = this.quotaMeter = new QuotaMeter.UserQuotaMeter({\n model: Galaxy.user,\n el: this.$quoteMeter\n });\n\n // loop through beforeunload functions if the user attempts to unload the page\n $(window).on('click', function (e) {\n var $download_link = $(e.target).closest('a[download]');\n if ($download_link.length == 1) {\n if ($('iframe[id=download]').length === 0) {\n $('body').append($('
\"\n )\n });\n modal.show( { backdrop: true } );\n}\n\n\n// ============================================================================\n return {\n Modal : Modal,\n hide_modal : hide_modal,\n show_modal : show_modal,\n show_message : show_message,\n show_in_overlay : show_in_overlay,\n };\n});\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/layout/modal.js","/**\n * This is the primary galaxy tours definition, currently only used for\n * rendering a tour menu.\n */\n\ndefine([\"libs/bootstrap-tour\"], function(BootstrapTour) {\n var gxy_root = typeof Galaxy === \"undefined\" ? \"/\" : Galaxy.root;\n\n var tourpage_template = `

Galaxy Tours

\n

This page presents a list of interactive tours available on this Galaxy server.\nSelect any tour to get started (and remember, you can click 'End Tour' at any time).

\n`;\n\n var tour_opts = {\n storage: window.sessionStorage,\n onEnd: function() {\n sessionStorage.removeItem(\"activeGalaxyTour\");\n },\n delay: 150, // Attempts to make it look natural\n orphan: true\n };\n\n var hooked_tour_from_data = function(data) {\n _.each(data.steps, function(step) {\n if (step.preclick) {\n step.onShow = function() {\n _.each(step.preclick, function(preclick) {\n // TODO: click delay between clicks\n $(preclick).click();\n });\n };\n }\n if (step.postclick) {\n step.onHide = function() {\n _.each(step.postclick, function(postclick) {\n // TODO: click delay between clicks\n $(postclick).click();\n });\n };\n }\n if (step.textinsert) {\n // Have to manually trigger a change here, for some\n // elements which have additional logic, like the\n // upload input box\n step.onShown = function() {\n $(step.element).val(step.textinsert).trigger(\"change\");\n };\n }\n });\n return data;\n };\n\n var TourItem = Backbone.Model.extend({\n urlRoot: gxy_root + \"api/tours\"\n });\n\n var Tours = Backbone.Collection.extend({\n url: gxy_root + \"api/tours\",\n model: TourItem\n });\n\n var giveTour = function(tour_id) {\n var url = gxy_root + \"api/tours/\" + tour_id;\n $.getJSON(url, function(data) {\n // Set hooks for additional click and data entry actions.\n var tourdata = hooked_tour_from_data(data);\n sessionStorage.setItem(\"activeGalaxyTour\", JSON.stringify(data));\n // Store tour steps in sessionStorage to easily persist w/o hackery.\n var tour = new Tour(\n _.extend(\n {\n steps: tourdata.steps\n },\n tour_opts\n )\n );\n // Always clean restart, since this is a new, explicit giveTour execution.\n tour.init();\n tour.goTo(0);\n tour.restart();\n });\n };\n var ToursView = Backbone.View.extend({\n // initialize\n initialize: function() {\n var self = this;\n this.setElement(\"
\");\n this.model = new Tours();\n this.model.fetch({\n success: function() {\n self.render();\n },\n error: function() {\n // Do something.\n console.error(\"Failed to fetch tours.\");\n }\n });\n },\n\n render: function() {\n var tpl = _.template(tourpage_template);\n this.$el\n .html(tpl({ tours: this.model.models }))\n .on(\"click\", \".tourItem\", function(e) {\n e.preventDefault();\n giveTour($(this).data(\"tour.id\"));\n });\n }\n });\n\n return {\n ToursView: ToursView,\n hooked_tour_from_data: hooked_tour_from_data,\n tour_opts: tour_opts,\n giveTour: giveTour\n };\n});\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/mvc/tours.js","// from: https://raw.githubusercontent.com/umdjs/umd/master/jqueryPlugin.js\n// Uses AMD or browser globals to create a jQuery plugin.\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n //TODO: So...this turns out to be an all or nothing thing. If I load jQuery in the define below, it will\n // (of course) wipe the old jquery *and all the plugins loaded into it*. So the define below *is still\n // relying on jquery being loaded globally* in order to preserve plugins.\n define([ 'jquery' ], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n\n}(function ( jQuery ) {\n'use_strict';\n\nvar $ = jQuery;\n\n// ============================================================================\n/**\n* JQuery extension for tagging with autocomplete.\n* @author: Jeremy Goecks\n* @require: jquery.autocomplete plugin\n*/\n//\n// Initialize \"tag click functions\" for tags.\n//\nfunction init_tag_click_function(tag_elt, click_func) {\n $(tag_elt).find('.tag-name').each( function() {\n $(this).click( function() {\n var tag_str = $(this).text();\n var tag_name_and_value = tag_str.split(\":\");\n click_func(tag_name_and_value[0], tag_name_and_value[1]);\n return true;\n });\n });\n}\n\njQuery.fn.autocomplete_tagging = function(options) {\n\n var defaults = {\n get_toggle_link_text_fn: function(tags) {\n var text = \"\";\n var num_tags = _.size(tags);\n if (num_tags > 0) {\n text = num_tags + (num_tags > 1 ? \" Tags\" : \" Tag\");\n } else {\n text = \"Add tags\";\n }\n return text;\n },\n tag_click_fn : function (name, value) {},\n editable: true,\n input_size: 20,\n in_form: false,\n tags : {},\n use_toggle_link: true,\n item_id: \"\",\n add_tag_img: \"\",\n add_tag_img_rollover: \"\",\n delete_tag_img: \"\",\n ajax_autocomplete_tag_url: \"\",\n ajax_retag_url: \"\",\n ajax_delete_tag_url: \"\",\n ajax_add_tag_url: \"\"\n };\n\n var settings = jQuery.extend(defaults, options);\n\n //\n // Initalize object's elements.\n //\n\n // Get elements for this object. For this_obj, assume the last element with the id is the \"this\"; this is somewhat of a hack to address the problem\n // that there may be two tagging elements for a single item if there are both community and individual tags for an element.\n var this_obj = $(this);\n var tag_area = this_obj.find('.tag-area');\n var toggle_link = this_obj.find('.toggle-link');\n var tag_input_field = this_obj.find('.tag-input');\n var add_tag_button = this_obj.find('.add-tag-button');\n\n // Initialize toggle link.\n toggle_link.click( function() {\n // Take special actions depending on whether toggle is showing or hiding link.\n var after_toggle_fn;\n if (tag_area.is(\":hidden\")) {\n after_toggle_fn = function() {\n // If there are no tags, go right to editing mode by generating a click on the area.\n var num_tags = $(this).find('.tag-button').length;\n if (num_tags === 0) {\n tag_area.click();\n }\n };\n } else {\n after_toggle_fn = function() {\n tag_area.blur();\n };\n }\n tag_area.slideToggle(\"fast\", after_toggle_fn);\n return $(this);\n });\n\n // Initialize tag input field.\n if (settings.editable) {\n tag_input_field.hide();\n }\n tag_input_field.keyup( function(e) {\n if ( e.keyCode === 27 ) {\n // Escape key\n $(this).trigger( \"blur\" );\n } else if (\n ( e.keyCode === 13 ) || // Return Key\n ( e.keyCode === 188 ) || // Comma\n ( e.keyCode === 32 ) // Space\n ) {\n //\n // Check input.\n //\n\n var new_value = this.value;\n\n // Suppress space after a \":\"\n if ( new_value.indexOf(\": \", new_value.length - 2) !== -1) {\n this.value = new_value.substring(0, new_value.length-1);\n return false;\n }\n\n // Remove trigger keys from input.\n if ( (e.keyCode === 188) || (e.keyCode === 32) ) {\n new_value = new_value.substring( 0 , new_value.length - 1 );\n }\n\n // Trim whitespace.\n new_value = $.trim(new_value);\n\n // Too short?\n if (new_value.length < 2) {\n return false;\n }\n\n //\n // New tag OK - apply it.\n //\n\n this.value = \"\"; // Reset text field now that tag is being added\n\n // Add button for tag after all other tag buttons.\n var new_tag_button = build_tag_button(new_value);\n var tag_buttons = tag_area.children(\".tag-button\");\n if (tag_buttons.length !== 0) {\n var last_tag_button = tag_buttons.slice(tag_buttons.length-1);\n last_tag_button.after(new_tag_button);\n } else {\n tag_area.prepend(new_tag_button);\n }\n\n // Add tag to internal list.\n var tag_name_and_value = new_value.split(\":\");\n settings.tags[tag_name_and_value[0]] = tag_name_and_value[1];\n\n // Update toggle link text.\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n\n // Commit tag to server.\n var zz = $(this);\n $.ajax({\n url: settings.ajax_add_tag_url,\n data: { new_tag: new_value },\n error: function() {\n // Failed. Roll back changes and show alert.\n new_tag_button.remove();\n delete settings.tags[tag_name_and_value[0]];\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n alert( \"Add tag failed\" );\n },\n success: function() {\n // Flush autocomplete cache because it's not out of date.\n // TODO: in the future, we could remove the particular item\n // that was chosen from the cache rather than flush it.\n zz.data('autocompleter').cacheFlush();\n }\n });\n\n return false;\n }\n });\n\n // Add autocomplete to input.\n var format_item_func = function(key, row_position, num_rows, value, search_term) {\n var tag_name_and_value = value.split(\":\");\n return (tag_name_and_value.length === 1 ? tag_name_and_value[0] : tag_name_and_value[1]);\n };\n var autocomplete_options = { selectFirst: false, formatItem: format_item_func,\n autoFill: false, highlight: false };\n tag_input_field.autocomplete_verheul(settings.ajax_autocomplete_tag_url, autocomplete_options);\n\n\n // Initialize delete tag images for current tags.\n this_obj.find('.delete-tag-img').each(function() {\n init_delete_tag_image( $(this) );\n });\n\n\n // Initialize tag click function.\n init_tag_click_function($(this), settings.tag_click_fn);\n\n // Initialize \"add tag\" button.\n add_tag_button.click( function() {\n $(this).hide();\n\n // Clicking on button is the same as clicking on the tag area.\n tag_area.click();\n return false;\n });\n\n //\n // Set up tag area interactions; these are needed only if tags are editable.\n //\n if (settings.editable) {\n // When the tag area blurs, go to \"view tag\" mode.\n tag_area.bind(\"blur\", function(e) {\n if (_.size(settings.tags) > 0) {\n add_tag_button.show();\n tag_input_field.hide();\n tag_area.removeClass(\"active-tag-area\");\n // tag_area.addClass(\"tooltip\");\n } else {\n // No tags, so do nothing to ensure that input is still visible.\n }\n });\n\n // On click, enable user to add tags.\n tag_area.click( function(e) {\n var is_active = $(this).hasClass(\"active-tag-area\");\n\n // If a \"delete image\" object was pressed and area is inactive, do nothing.\n if ($(e.target).hasClass(\"delete-tag-img\") && !is_active) {\n return false;\n }\n\n // If a \"tag name\" object was pressed and area is inactive, do nothing.\n if ($(e.target).hasClass(\"tag-name\") && !is_active) {\n return false;\n }\n\n // Remove tooltip.\n // $(this).removeClass(\"tooltip\");\n\n // Hide add tag button, show tag_input field. Change background to show\n // area is active.\n $(this).addClass(\"active-tag-area\");\n add_tag_button.hide();\n tag_input_field.show();\n tag_input_field.focus();\n\n // Add handler to document that will call blur when the tag area is blurred;\n // a tag area is blurred when a user clicks on an element outside the area.\n var handle_document_click = function(e) {\n var check_click = function(tag_area, target) {\n var tag_area_id = tag_area.attr(\"id\");\n // Blur the tag area if the element clicked on is not in the tag area.\n if (target !== tag_area) {\n tag_area.blur();\n $(window).unbind(\"click.tagging_blur\");\n $(this).addClass(\"tooltip\");\n }\n };\n check_click(tag_area, $(e.target));\n };\n // TODO: we should attach the click handler to all frames in order to capture\n // clicks outside the frame that this element is in.\n //window.parent.document.onclick = handle_document_click;\n //var temp = $(window.parent.document.body).contents().find(\"iframe\").html();\n //alert(temp);\n //$(document).parent().click(handle_document_click);\n $(window).bind(\"click.tagging_blur\", handle_document_click);\n\n return false;\n });\n }\n\n // If using toggle link, hide the tag area. Otherwise, show the tag area.\n if (settings.use_toggle_link) {\n tag_area.hide();\n }\n\n //\n // Helper functions.\n //\n\n //\n // Collapse tag name + value into a single string.\n //\n function build_tag_str(tag_name, tag_value) {\n return tag_name + ( tag_value ? \":\" + tag_value : \"\");\n }\n\n\n // Initialize a \"delete tag image\": when click, delete tag from UI and send delete request to server.\n function init_delete_tag_image(delete_img) {\n $(delete_img).mouseenter( function () {\n $(this).attr(\"src\", settings.delete_tag_img_rollover);\n });\n $(delete_img).mouseleave( function () {\n $(this).attr(\"src\", settings.delete_tag_img);\n });\n $(delete_img).click( function () {\n // Tag button is image's parent.\n var tag_button = $(this).parent();\n\n // Get tag name, value.\n var tag_name_elt = tag_button.find(\".tag-name\").eq(0);\n var tag_str = tag_name_elt.text();\n var tag_name_and_value = tag_str.split(\":\");\n var tag_name = tag_name_and_value[0];\n var tag_value = tag_name_and_value[1];\n\n var prev_button = tag_button.prev();\n tag_button.remove();\n\n // Remove tag from local list for consistency.\n delete settings.tags[tag_name];\n\n // Update toggle link text.\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n\n // Delete tag.\n $.ajax({\n url: settings.ajax_delete_tag_url,\n data: { tag_name: tag_name },\n error: function() {\n // Failed. Roll back changes and show alert.\n settings.tags[tag_name] = tag_value;\n if (prev_button.hasClass(\"tag-button\")) {\n prev_button.after(tag_button);\n } else {\n tag_area.prepend(tag_button);\n }\n alert( \"Remove tag failed\" );\n\n toggle_link.text(settings.get_toggle_link_text_fn(settings.tags));\n\n // TODO: no idea why it's necessary to set this up again.\n delete_img.mouseenter( function () {\n $(this).attr(\"src\", settings.delete_tag_img_rollover);\n });\n delete_img.mouseleave( function () {\n $(this).attr(\"src\", settings.delete_tag_img);\n });\n },\n success: function() {}\n });\n\n return true;\n });\n }\n\n //\n // Function that builds a tag button.\n //\n function build_tag_button(tag_str) {\n // Build \"delete tag\" image.\n var delete_img = $(\"\").attr(\"src\", settings.delete_tag_img).addClass(\"delete-tag-img\");\n init_delete_tag_image(delete_img);\n\n // Build tag button.\n var tag_name_elt = $(\"\").text(tag_str).addClass(\"tag-name\");\n tag_name_elt.click( function() {\n var tag_name_and_value = tag_str.split(\":\");\n settings.tag_click_fn(tag_name_and_value[0], tag_name_and_value[1]);\n return true;\n });\n\n var tag_button = $(\"\").addClass(\"tag-button\");\n tag_button.append(tag_name_elt);\n // Allow delete only if element is editable.\n if (settings.editable) {\n tag_button.append(delete_img);\n }\n\n return tag_button;\n }\n\n};\n\n// ============================================================================\n return init_tag_click_function;\n}));\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/ui/autocom_tagging.js","define([], function() {\n\n/** Frame view */\nvar FrameView = Backbone.View.extend({\n initialize: function( options ) {\n var self = this;\n this.model = options && options.model || new Backbone.Model( options );\n this.setElement( $( '
' ).addClass( 'corner frame' ) );\n this.$el.append( $( '
' ).addClass( 'f-header corner' )\n .append( $( '
' ).addClass( 'f-title' ) )\n .append( $( '
' ).addClass( 'f-icon f-close fa fa-close' )\n .tooltip( { title: 'Close', placement: 'bottom' } ) ) )\n .append( $( '
' ).addClass( 'f-content' ) )\n .append( $( '
' ).addClass( 'f-resize f-icon corner fa fa-expand' ).tooltip( { title: 'Resize' } ) )\n .append( $( '
' ).addClass( 'f-cover' ) );\n this.$header = this.$( '.f-header' );\n this.$title = this.$( '.f-title' );\n this.$content = this.$( '.f-content' );\n this.render();\n this.listenTo( this.model, 'change', this.render, this );\n },\n\n render: function() {\n var self = this;\n var options = this.model.attributes;\n this.$title.html( options.title || '' );\n this.$header.find( '.f-icon-left' ).remove();\n _.each( options.menu, function( option ) {\n var $option = $( '
' ).addClass( 'f-icon-left' ).addClass( option.icon );\n if ( _.isFunction( option.disabled ) && option.disabled() ) {\n $option.attr( 'disabled', true );\n } else {\n $option.on( 'click', function() { option.onclick( self ) } )\n .tooltip( { title: option.tooltip, placement: 'bottom' } );\n }\n self.$header.append( $option );\n } );\n if ( options.url ) {\n this.$content.html( $ ( '',\n header_template = '' +\n '' + \n\t '',\n frame_height = 350,\n frame_width = 600,\n class_names = 'ui-modal chat-modal';\n \n\t// deletes the chat modal if already present and create one\n if( $( '.chat-modal' ).length > 0 ) {\n $( '.chat-modal' ).remove();\n\t}\n // creates a modal\n\tGenericNavView.modal = new Modal.View({\n\t body : iframe_template,\n\t height : frame_height,\n\t width : frame_width,\n\t closing_events : true,\n\t title_separator : false,\n cls : class_names\n\t});\n\n\t// shows modal\n\tGenericNavView.modal.show();\n $el_chat_modal_header = $( '.chat-modal .modal-header' );\n $el_chat_modal_body = $( '.chat-modal .modal-body' );\n\t// adjusts the css of bootstrap modal for chat\n $el_chat_modal_header.addClass('modal-header-body');\n $el_chat_modal_body.addClass('modal-header-body');\n\t$el_chat_modal_header.find( 'h4' ).remove();\n $el_chat_modal_header.removeAttr( 'min-height padding border' );\n\t$el_chat_modal_header.append( header_template );\n\t// click event of the close button for chat\n\t$( '.close-modal' ).click(function( e ) {\n\t $( '.chat-modal' ).css( 'display', 'none' );\n\t});\n // click event of expand and compress icon\n $( '.expand-compress-modal' ).click(function( e ) {\n if( $( '.expand-compress-modal' ).hasClass( 'fa-expand' ) ) {\n $( '.chat-modal .modal-dialog' ).width( '1000px' );\n $( '.chat-modal .modal-body' ).height( '575px' );\n $( '.expand-compress-modal' ).removeClass( 'fa-expand' ).addClass( 'fa-compress' );\n $( '.expand-compress-modal' ).attr('title', 'Minimize');\n $( '.expand-compress-modal' ).css('margin-left', '96.2%');\n }\n else {\n $( '.chat-modal .modal-dialog' ).width( frame_width + 'px' );\n $( '.chat-modal .modal-body' ).height( frame_height + 'px' );\n $( '.expand-compress-modal' ).removeClass( 'fa-compress' ).addClass( 'fa-expand' );\n $( '.expand-compress-modal' ).attr('title', 'Maximize');\n $( '.expand-compress-modal' ).css('margin-left', '93.2%');\n }\n\t \n\t});\n return this;\n },\n\n /**renders the chat icon as a nav item*/\n render: function() {\n var self = this,\n navItem = {};\n navItem = {\n id : 'show-chat-online',\n icon : 'fa-comment-o',\n tooltip : 'Chat online',\n visible : false,\n onclick : self.makeModalIframe\n }\n return navItem;\n }\n});\n\nreturn {\n GenericNavView : GenericNavView\n};\n\n});\n\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/layout/generic-nav-view.js","define([\n 'utils/utils',\n 'layout/menu',\n 'layout/scratchbook',\n 'mvc/user/user-quotameter',\n], function( Utils, Menu, Scratchbook, QuotaMeter ) {\n\n/** Masthead **/\nvar View = Backbone.View.extend({\n initialize : function( options ) {\n var self = this;\n this.options = options;\n this.setElement( this._template() );\n this.$navbarBrandLink = this.$( '.navbar-brand-link' );\n this.$navbarBrandImage = this.$( '.navbar-brand-image' );\n this.$navbarBrandTitle = this.$( '.navbar-brand-title' );\n this.$navbarTabs = this.$( '.navbar-tabs' );\n this.$quoteMeter = this.$( '.quota-meter-container' );\n\n // build tabs\n this.collection = new Menu.Collection();\n this.collection.on( 'add', function( model ) {\n self.$navbarTabs.append( new Menu.Tab( { model : model } ).render().$el );\n }).on( 'reset', function() {\n self.$navbarTabs.empty();\n }).on( 'dispatch', function( callback ) {\n self.collection.each( function ( m ) { callback( m ) });\n }).fetch( this.options );\n\n // scratchbook\n Galaxy.frame = this.frame = new Scratchbook( { collection: this.collection } );\n\n // set up the quota meter (And fetch the current user data from trans)\n // add quota meter to masthead\n Galaxy.quotaMeter = this.quotaMeter = new QuotaMeter.UserQuotaMeter({\n model : Galaxy.user,\n el : this.$quoteMeter\n });\n\n // loop through beforeunload functions if the user attempts to unload the page\n $( window ).on( 'click', function( e ) {\n var $download_link = $( e.target ).closest( 'a[download]' );\n if ( $download_link.length == 1 ) {\n if( $( 'iframe[id=download]' ).length === 0 ) {\n $( 'body' ).append( $( '
\")\n });\n modal.show({ backdrop: true });\n }\n\n // ============================================================================\n return {\n Modal: Modal,\n hide_modal: hide_modal,\n show_modal: show_modal,\n show_message: show_message,\n show_in_overlay: show_in_overlay\n };\n}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(0)))\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(_, $, Backbone) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n/**\n * This is the primary galaxy tours definition, currently only used for\n * rendering a tour menu.\n */\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(33)], __WEBPACK_AMD_DEFINE_RESULT__ = function (BootstrapTour) {\n var gxy_root = typeof Galaxy === \"undefined\" ? \"/\" : Galaxy.root;\n\n var tourpage_template = \"

Galaxy Tours

\\n

This page presents a list of interactive tours available on this Galaxy server.\\nSelect any tour to get started (and remember, you can click 'End Tour' at any time).

\\n\";\n\n var tour_opts = {\n storage: window.sessionStorage,\n onEnd: function onEnd() {\n sessionStorage.removeItem(\"activeGalaxyTour\");\n },\n delay: 150, // Attempts to make it look natural\n orphan: true\n };\n\n var hooked_tour_from_data = function hooked_tour_from_data(data) {\n _.each(data.steps, function (step) {\n if (step.preclick) {\n step.onShow = function () {\n _.each(step.preclick, function (preclick) {\n // TODO: click delay between clicks\n $(preclick).click();\n });\n };\n }\n if (step.postclick) {\n step.onHide = function () {\n _.each(step.postclick, function (postclick) {\n // TODO: click delay between clicks\n $(postclick).click();\n });\n };\n }\n if (step.textinsert) {\n // Have to manually trigger a change here, for some\n // elements which have additional logic, like the\n // upload input box\n step.onShown = function () {\n $(step.element).val(step.textinsert).trigger(\"change\");\n };\n }\n });\n return data;\n };\n\n var TourItem = Backbone.Model.extend({\n urlRoot: gxy_root + \"api/tours\"\n });\n\n var Tours = Backbone.Collection.extend({\n url: gxy_root + \"api/tours\",\n model: TourItem\n });\n\n var giveTour = function giveTour(tour_id) {\n var url = gxy_root + \"api/tours/\" + tour_id;\n $.getJSON(url, function (data) {\n // Set hooks for additional click and data entry actions.\n var tourdata = hooked_tour_from_data(data);\n sessionStorage.setItem(\"activeGalaxyTour\", JSON.stringify(data));\n // Store tour steps in sessionStorage to easily persist w/o hackery.\n var tour = new Tour(_.extend({\n steps: tourdata.steps\n }, tour_opts));\n // Always clean restart, since this is a new, explicit giveTour execution.\n tour.init();\n tour.goTo(0);\n tour.restart();\n });\n };\n var ToursView = Backbone.View.extend({\n // initialize\n initialize: function initialize() {\n var self = this;\n this.setElement(\"
\");\n this.model = new Tours();\n this.model.fetch({\n success: function success() {\n self.render();\n },\n error: function error() {\n // Do something.\n console.error(\"Failed to fetch tours.\");\n }\n });\n },\n\n render: function render() {\n var tpl = _.template(tourpage_template);\n this.$el.html(tpl({ tours: this.model.models })).on(\"click\", \".tourItem\", function (e) {\n e.preventDefault();\n giveTour($(this).data(\"tour.id\"));\n });\n }\n });\n\n return {\n ToursView: ToursView,\n hooked_tour_from_data: hooked_tour_from_data,\n tour_opts: tour_opts,\n giveTour: giveTour\n };\n}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1), __webpack_require__(0), __webpack_require__(2)))\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(_) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n// from: https://raw.githubusercontent.com/umdjs/umd/master/jqueryPlugin.js\n// Uses AMD or browser globals to create a jQuery plugin.\n(function (factory) {\n if (true) {\n //TODO: So...this turns out to be an all or nothing thing. If I load jQuery in the define below, it will\n // (of course) wipe the old jquery *and all the plugins loaded into it*. So the define below *is still\n // relying on jquery being loaded globally* in order to preserve plugins.\n !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else {\n // Browser globals\n factory(jQuery);\n }\n})(function (jQuery) {\n 'use_strict';\n\n var $ = jQuery;\n\n // ============================================================================\n /**\n * JQuery extension for tagging with autocomplete.\n * @author: Jeremy Goecks\n * @require: jquery.autocomplete plugin\n */\n //\n // Initialize \"tag click functions\" for tags.\n //\n function init_tag_click_function(tag_elt, click_func) {\n $(tag_elt).find('.tag-name').each(function () {\n $(this).click(function () {\n var tag_str = $(this).text();\n var tag_name_and_value = tag_str.split(\":\");\n click_func(tag_name_and_value[0], tag_name_and_value[1]);\n return true;\n });\n });\n }\n\n jQuery.fn.autocomplete_tagging = function (options) {\n\n var defaults = {\n get_toggle_link_text_fn: function get_toggle_link_text_fn(tags) {\n var text = \"\";\n var num_tags = _.size(tags);\n if (num_tags > 0) {\n text = num_tags + (num_tags > 1 ? \" Tags\" : \" Tag\");\n } else {\n text = \"Add tags\";\n }\n return text;\n },\n tag_click_fn: function tag_click_fn(name, value) {},\n editable: true,\n input_size: 20,\n in_form: false,\n tags: {},\n use_toggle_link: true,\n item_id: \"\",\n add_tag_img: \"\",\n add_tag_img_rollover: \"\",\n delete_tag_img: \"\",\n ajax_autocomplete_tag_url: \"\",\n ajax_retag_url: \"\",\n ajax_delete_tag_url: \"\",\n ajax_add_tag_url: \"\"\n };\n\n var settings = jQuery.extend(defaults, options);\n\n //\n // Initalize object's elements.\n //\n\n // Get elements for this object. For this_obj, assume the last element with the id is the \"this\"; this is somewhat of a hack to address the problem\n // that there may be two tagging elements for a single item if there are both community and individual tags for an element.\n var this_obj = $(this);\n var tag_area = this_obj.find('.tag-area');\n var toggle_link = this_obj.find('.toggle-link');\n var tag_input_field = this_obj.find('.tag-input');\n var add_tag_button = this_obj.find('.add-tag-button');\n\n // Initialize toggle link.\n toggle_link.click(function () {\n // Take special actions depending on whether toggle is showing or hiding link.\n var after_toggle_fn;\n if (tag_area.is(\":hidden\")) {\n after_toggle_fn = function after_toggle_fn() {\n // If there are no tags, go right to editing mode by generating a click on the area.\n var num_tags = $(this).find('.tag-button').length;\n if (num_tags === 0) {\n tag_area.click();\n }\n };\n } else {\n after_toggle_fn = function after_toggle_fn() {\n tag_area.blur();\n };\n }\n tag_area.slideToggle(\"fast\", after_toggle_fn);\n return $(this);\n });\n\n // Initialize tag input field.\n if (settings.editable) {\n tag_input_field.hide();\n }\n tag_input_field.keyup(function (e) {\n if (e.keyCode === 27) {\n // Escape key\n $(this).trigger(\"blur\");\n } else if (e.keyCode === 13 || // Return Key\n e.keyCode === 188 || // Comma\n e.keyCode === 32 // Space\n ) {\n //\n // Check input.\n //\n\n var new_value = this.value;\n\n // Suppress space after a \":\"\n if (new_value.indexOf(\": \", new_value.length - 2) !== -1) {\n this.value = new_value.substring(0, new_value.length - 1);\n return false;\n }\n\n // Remove trigger keys from input.\n if (e.keyCode === 188 || e.keyCode === 32) {\n new_value = new_value.substring(0, new_value.length - 1);\n }\n\n // Trim whitespace.\n new_value = $.trim(new_value);\n\n // Too short?\n if (new_value.length < 2) {\n return false;\n }\n\n //\n // New tag OK - apply it.\n //\n\n this.value = \"\"; // Reset text field now that tag is being added\n\n // Add button for tag after all other tag buttons.\n var new_tag_button = build_tag_button(new_value);\n var tag_buttons = tag_area.children(\".tag-button\");\n if (tag_buttons.length !== 0) {\n var last_tag_button = tag_buttons.slice(tag_buttons.length - 1);\n last_tag_button.after(new_tag_button);\n } else {\n tag_area.prepend(new_tag_button);\n }\n\n // Add tag to internal list.\n var tag_name_and_value = new_value.split(\":\");\n settings.tags[tag_name_and_value[0]] = tag_name_and_value[1];\n\n // Update toggle link text.\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n\n // Commit tag to server.\n var zz = $(this);\n $.ajax({\n url: settings.ajax_add_tag_url,\n data: { new_tag: new_value },\n error: function error() {\n // Failed. Roll back changes and show alert.\n new_tag_button.remove();\n delete settings.tags[tag_name_and_value[0]];\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n alert(\"Add tag failed\");\n },\n success: function success() {\n // Flush autocomplete cache because it's not out of date.\n // TODO: in the future, we could remove the particular item\n // that was chosen from the cache rather than flush it.\n zz.data('autocompleter').cacheFlush();\n }\n });\n\n return false;\n }\n });\n\n // Add autocomplete to input.\n var format_item_func = function format_item_func(key, row_position, num_rows, value, search_term) {\n var tag_name_and_value = value.split(\":\");\n return tag_name_and_value.length === 1 ? tag_name_and_value[0] : tag_name_and_value[1];\n };\n var autocomplete_options = { selectFirst: false, formatItem: format_item_func,\n autoFill: false, highlight: false };\n tag_input_field.autocomplete_verheul(settings.ajax_autocomplete_tag_url, autocomplete_options);\n\n // Initialize delete tag images for current tags.\n this_obj.find('.delete-tag-img').each(function () {\n init_delete_tag_image($(this));\n });\n\n // Initialize tag click function.\n init_tag_click_function($(this), settings.tag_click_fn);\n\n // Initialize \"add tag\" button.\n add_tag_button.click(function () {\n $(this).hide();\n\n // Clicking on button is the same as clicking on the tag area.\n tag_area.click();\n return false;\n });\n\n //\n // Set up tag area interactions; these are needed only if tags are editable.\n //\n if (settings.editable) {\n // When the tag area blurs, go to \"view tag\" mode.\n tag_area.bind(\"blur\", function (e) {\n if (_.size(settings.tags) > 0) {\n add_tag_button.show();\n tag_input_field.hide();\n tag_area.removeClass(\"active-tag-area\");\n // tag_area.addClass(\"tooltip\");\n } else {\n // No tags, so do nothing to ensure that input is still visible.\n }\n });\n\n // On click, enable user to add tags.\n tag_area.click(function (e) {\n var is_active = $(this).hasClass(\"active-tag-area\");\n\n // If a \"delete image\" object was pressed and area is inactive, do nothing.\n if ($(e.target).hasClass(\"delete-tag-img\") && !is_active) {\n return false;\n }\n\n // If a \"tag name\" object was pressed and area is inactive, do nothing.\n if ($(e.target).hasClass(\"tag-name\") && !is_active) {\n return false;\n }\n\n // Remove tooltip.\n // $(this).removeClass(\"tooltip\");\n\n // Hide add tag button, show tag_input field. Change background to show\n // area is active.\n $(this).addClass(\"active-tag-area\");\n add_tag_button.hide();\n tag_input_field.show();\n tag_input_field.focus();\n\n // Add handler to document that will call blur when the tag area is blurred;\n // a tag area is blurred when a user clicks on an element outside the area.\n var handle_document_click = function handle_document_click(e) {\n var check_click = function check_click(tag_area, target) {\n var tag_area_id = tag_area.attr(\"id\");\n // Blur the tag area if the element clicked on is not in the tag area.\n if (target !== tag_area) {\n tag_area.blur();\n $(window).unbind(\"click.tagging_blur\");\n $(this).addClass(\"tooltip\");\n }\n };\n check_click(tag_area, $(e.target));\n };\n // TODO: we should attach the click handler to all frames in order to capture\n // clicks outside the frame that this element is in.\n //window.parent.document.onclick = handle_document_click;\n //var temp = $(window.parent.document.body).contents().find(\"iframe\").html();\n //alert(temp);\n //$(document).parent().click(handle_document_click);\n $(window).bind(\"click.tagging_blur\", handle_document_click);\n\n return false;\n });\n }\n\n // If using toggle link, hide the tag area. Otherwise, show the tag area.\n if (settings.use_toggle_link) {\n tag_area.hide();\n }\n\n //\n // Helper functions.\n //\n\n //\n // Collapse tag name + value into a single string.\n //\n function build_tag_str(tag_name, tag_value) {\n return tag_name + (tag_value ? \":\" + tag_value : \"\");\n }\n\n // Initialize a \"delete tag image\": when click, delete tag from UI and send delete request to server.\n function init_delete_tag_image(delete_img) {\n $(delete_img).mouseenter(function () {\n $(this).attr(\"src\", settings.delete_tag_img_rollover);\n });\n $(delete_img).mouseleave(function () {\n $(this).attr(\"src\", settings.delete_tag_img);\n });\n $(delete_img).click(function () {\n // Tag button is image's parent.\n var tag_button = $(this).parent();\n\n // Get tag name, value.\n var tag_name_elt = tag_button.find(\".tag-name\").eq(0);\n var tag_str = tag_name_elt.text();\n var tag_name_and_value = tag_str.split(\":\");\n var tag_name = tag_name_and_value[0];\n var tag_value = tag_name_and_value[1];\n\n var prev_button = tag_button.prev();\n tag_button.remove();\n\n // Remove tag from local list for consistency.\n delete settings.tags[tag_name];\n\n // Update toggle link text.\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n\n // Delete tag.\n $.ajax({\n url: settings.ajax_delete_tag_url,\n data: { tag_name: tag_name },\n error: function error() {\n // Failed. Roll back changes and show alert.\n settings.tags[tag_name] = tag_value;\n if (prev_button.hasClass(\"tag-button\")) {\n prev_button.after(tag_button);\n } else {\n tag_area.prepend(tag_button);\n }\n alert(\"Remove tag failed\");\n\n toggle_link.text(settings.get_toggle_link_text_fn(settings.tags));\n\n // TODO: no idea why it's necessary to set this up again.\n delete_img.mouseenter(function () {\n $(this).attr(\"src\", settings.delete_tag_img_rollover);\n });\n delete_img.mouseleave(function () {\n $(this).attr(\"src\", settings.delete_tag_img);\n });\n },\n success: function success() {}\n });\n\n return true;\n });\n }\n\n //\n // Function that builds a tag button.\n //\n function build_tag_button(tag_str) {\n // Build \"delete tag\" image.\n var delete_img = $(\"\").attr(\"src\", settings.delete_tag_img).addClass(\"delete-tag-img\");\n init_delete_tag_image(delete_img);\n\n // Build tag button.\n var tag_name_elt = $(\"\").text(tag_str).addClass(\"tag-name\");\n tag_name_elt.click(function () {\n var tag_name_and_value = tag_str.split(\":\");\n settings.tag_click_fn(tag_name_and_value[0], tag_name_and_value[1]);\n return true;\n });\n\n var tag_button = $(\"\").addClass(\"tag-button\");\n tag_button.append(tag_name_elt);\n // Allow delete only if element is editable.\n if (settings.editable) {\n tag_button.append(delete_img);\n }\n\n return tag_button;\n }\n };\n\n // ============================================================================\n return init_tag_click_function;\n});\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 37 */,\n/* 38 */,\n/* 39 */,\n/* 40 */,\n/* 41 */,\n/* 42 */,\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Backbone, $, _) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = function () {\n\n /** Frame view */\n var FrameView = Backbone.View.extend({\n initialize: function initialize(options) {\n var self = this;\n this.model = options && options.model || new Backbone.Model(options);\n this.setElement($('
').addClass('corner frame'));\n this.$el.append($('
').addClass('f-header corner').append($('
').addClass('f-title')).append($('
').addClass('f-icon f-close fa fa-close').tooltip({ title: 'Close', placement: 'bottom' }))).append($('
').addClass('f-content')).append($('
').addClass('f-resize f-icon corner fa fa-expand').tooltip({ title: 'Resize' })).append($('
').addClass('f-cover'));\n this.$header = this.$('.f-header');\n this.$title = this.$('.f-title');\n this.$content = this.$('.f-content');\n this.render();\n this.listenTo(this.model, 'change', this.render, this);\n },\n\n render: function render() {\n var self = this;\n var options = this.model.attributes;\n this.$title.html(options.title || '');\n this.$header.find('.f-icon-left').remove();\n _.each(options.menu, function (option) {\n var $option = $('
').addClass('f-icon-left').addClass(option.icon);\n if (_.isFunction(option.disabled) && option.disabled()) {\n $option.attr('disabled', true);\n } else {\n $option.on('click', function () {\n option.onclick(self);\n }).tooltip({ title: option.tooltip, placement: 'bottom' });\n }\n self.$header.append($option);\n });\n if (options.url) {\n this.$content.html($('',\n header_template = '' + '' + '',\n frame_height = 350,\n frame_width = 600,\n class_names = 'ui-modal chat-modal';\n\n // deletes the chat modal if already present and create one\n if ($('.chat-modal').length > 0) {\n $('.chat-modal').remove();\n }\n // creates a modal\n GenericNavView.modal = new Modal.View({\n body: iframe_template,\n height: frame_height,\n width: frame_width,\n closing_events: true,\n title_separator: false,\n cls: class_names\n });\n\n // shows modal\n GenericNavView.modal.show();\n $el_chat_modal_header = $('.chat-modal .modal-header');\n $el_chat_modal_body = $('.chat-modal .modal-body');\n // adjusts the css of bootstrap modal for chat\n $el_chat_modal_header.addClass('modal-header-body');\n $el_chat_modal_body.addClass('modal-header-body');\n $el_chat_modal_header.find('h4').remove();\n $el_chat_modal_header.removeAttr('min-height padding border');\n $el_chat_modal_header.append(header_template);\n // click event of the close button for chat\n $('.close-modal').click(function (e) {\n $('.chat-modal').css('display', 'none');\n });\n // click event of expand and compress icon\n $('.expand-compress-modal').click(function (e) {\n if ($('.expand-compress-modal').hasClass('fa-expand')) {\n $('.chat-modal .modal-dialog').width('1000px');\n $('.chat-modal .modal-body').height('575px');\n $('.expand-compress-modal').removeClass('fa-expand').addClass('fa-compress');\n $('.expand-compress-modal').attr('title', 'Minimize');\n $('.expand-compress-modal').css('margin-left', '96.2%');\n } else {\n $('.chat-modal .modal-dialog').width(frame_width + 'px');\n $('.chat-modal .modal-body').height(frame_height + 'px');\n $('.expand-compress-modal').removeClass('fa-compress').addClass('fa-expand');\n $('.expand-compress-modal').attr('title', 'Maximize');\n $('.expand-compress-modal').css('margin-left', '93.2%');\n }\n });\n return this;\n },\n\n /**renders the chat icon as a nav item*/\n render: function render() {\n var self = this,\n navItem = {};\n navItem = {\n id: 'show-chat-online',\n icon: 'fa-comment-o',\n tooltip: 'Chat online',\n visible: false,\n onclick: self.makeModalIframe\n };\n return navItem;\n }\n });\n\n return {\n GenericNavView: GenericNavView\n };\n}.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(2), __webpack_require__(0)))\n\n/***/ }),\n/* 101 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(Backbone, $) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\n!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(4), __webpack_require__(102), __webpack_require__(103), __webpack_require__(124)], __WEBPACK_AMD_DEFINE_RESULT__ = function (Utils, Menu, Scratchbook, QuotaMeter) {\n\n /** Masthead **/\n var View = Backbone.View.extend({\n initialize: function initialize(options) {\n var self = this;\n this.options = options;\n this.setElement(this._template());\n this.$navbarBrandLink = this.$('.navbar-brand-link');\n this.$navbarBrandImage = this.$('.navbar-brand-image');\n this.$navbarBrandTitle = this.$('.navbar-brand-title');\n this.$navbarTabs = this.$('.navbar-tabs');\n this.$quoteMeter = this.$('.quota-meter-container');\n\n // build tabs\n this.collection = new Menu.Collection();\n this.collection.on('add', function (model) {\n self.$navbarTabs.append(new Menu.Tab({ model: model }).render().$el);\n }).on('reset', function () {\n self.$navbarTabs.empty();\n }).on('dispatch', function (callback) {\n self.collection.each(function (m) {\n callback(m);\n });\n }).fetch(this.options);\n\n // scratchbook\n Galaxy.frame = this.frame = new Scratchbook({ collection: this.collection });\n\n // set up the quota meter (And fetch the current user data from trans)\n // add quota meter to masthead\n Galaxy.quotaMeter = this.quotaMeter = new QuotaMeter.UserQuotaMeter({\n model: Galaxy.user,\n el: this.$quoteMeter\n });\n\n // loop through beforeunload functions if the user attempts to unload the page\n $(window).on('click', function (e) {\n var $download_link = $(e.target).closest('a[download]');\n if ($download_link.length == 1) {\n if ($('iframe[id=download]').length === 0) {\n $('body').append($('
\"\n )\n });\n modal.show( { backdrop: true } );\n}\n\n\n// ============================================================================\n return {\n Modal : Modal,\n hide_modal : hide_modal,\n show_modal : show_modal,\n show_message : show_message,\n show_in_overlay : show_in_overlay,\n };\n});\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/layout/modal.js","/**\n * This is the primary galaxy tours definition, currently only used for\n * rendering a tour menu.\n */\n\ndefine([\"libs/bootstrap-tour\"], function(BootstrapTour) {\n var gxy_root = typeof Galaxy === \"undefined\" ? \"/\" : Galaxy.root;\n\n var tourpage_template = `

Galaxy Tours

\n

This page presents a list of interactive tours available on this Galaxy server.\nSelect any tour to get started (and remember, you can click 'End Tour' at any time).

\n`;\n\n var tour_opts = {\n storage: window.sessionStorage,\n onEnd: function() {\n sessionStorage.removeItem(\"activeGalaxyTour\");\n },\n delay: 150, // Attempts to make it look natural\n orphan: true\n };\n\n var hooked_tour_from_data = function(data) {\n _.each(data.steps, function(step) {\n if (step.preclick) {\n step.onShow = function() {\n _.each(step.preclick, function(preclick) {\n // TODO: click delay between clicks\n $(preclick).click();\n });\n };\n }\n if (step.postclick) {\n step.onHide = function() {\n _.each(step.postclick, function(postclick) {\n // TODO: click delay between clicks\n $(postclick).click();\n });\n };\n }\n if (step.textinsert) {\n // Have to manually trigger a change here, for some\n // elements which have additional logic, like the\n // upload input box\n step.onShown = function() {\n $(step.element).val(step.textinsert).trigger(\"change\");\n };\n }\n });\n return data;\n };\n\n var TourItem = Backbone.Model.extend({\n urlRoot: gxy_root + \"api/tours\"\n });\n\n var Tours = Backbone.Collection.extend({\n url: gxy_root + \"api/tours\",\n model: TourItem\n });\n\n var giveTour = function(tour_id) {\n var url = gxy_root + \"api/tours/\" + tour_id;\n $.getJSON(url, function(data) {\n // Set hooks for additional click and data entry actions.\n var tourdata = hooked_tour_from_data(data);\n sessionStorage.setItem(\"activeGalaxyTour\", JSON.stringify(data));\n // Store tour steps in sessionStorage to easily persist w/o hackery.\n var tour = new Tour(\n _.extend(\n {\n steps: tourdata.steps\n },\n tour_opts\n )\n );\n // Always clean restart, since this is a new, explicit giveTour execution.\n tour.init();\n tour.goTo(0);\n tour.restart();\n });\n };\n var ToursView = Backbone.View.extend({\n // initialize\n initialize: function() {\n var self = this;\n this.setElement(\"
\");\n this.model = new Tours();\n this.model.fetch({\n success: function() {\n self.render();\n },\n error: function() {\n // Do something.\n console.error(\"Failed to fetch tours.\");\n }\n });\n },\n\n render: function() {\n var tpl = _.template(tourpage_template);\n this.$el\n .html(tpl({ tours: this.model.models }))\n .on(\"click\", \".tourItem\", function(e) {\n e.preventDefault();\n giveTour($(this).data(\"tour.id\"));\n });\n }\n });\n\n return {\n ToursView: ToursView,\n hooked_tour_from_data: hooked_tour_from_data,\n tour_opts: tour_opts,\n giveTour: giveTour\n };\n});\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/mvc/tours.js","// from: https://raw.githubusercontent.com/umdjs/umd/master/jqueryPlugin.js\n// Uses AMD or browser globals to create a jQuery plugin.\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n //TODO: So...this turns out to be an all or nothing thing. If I load jQuery in the define below, it will\n // (of course) wipe the old jquery *and all the plugins loaded into it*. So the define below *is still\n // relying on jquery being loaded globally* in order to preserve plugins.\n define([ 'jquery' ], factory);\n } else {\n // Browser globals\n factory(jQuery);\n }\n\n}(function ( jQuery ) {\n'use_strict';\n\nvar $ = jQuery;\n\n// ============================================================================\n/**\n* JQuery extension for tagging with autocomplete.\n* @author: Jeremy Goecks\n* @require: jquery.autocomplete plugin\n*/\n//\n// Initialize \"tag click functions\" for tags.\n//\nfunction init_tag_click_function(tag_elt, click_func) {\n $(tag_elt).find('.tag-name').each( function() {\n $(this).click( function() {\n var tag_str = $(this).text();\n var tag_name_and_value = tag_str.split(\":\");\n click_func(tag_name_and_value[0], tag_name_and_value[1]);\n return true;\n });\n });\n}\n\njQuery.fn.autocomplete_tagging = function(options) {\n\n var defaults = {\n get_toggle_link_text_fn: function(tags) {\n var text = \"\";\n var num_tags = _.size(tags);\n if (num_tags > 0) {\n text = num_tags + (num_tags > 1 ? \" Tags\" : \" Tag\");\n } else {\n text = \"Add tags\";\n }\n return text;\n },\n tag_click_fn : function (name, value) {},\n editable: true,\n input_size: 20,\n in_form: false,\n tags : {},\n use_toggle_link: true,\n item_id: \"\",\n add_tag_img: \"\",\n add_tag_img_rollover: \"\",\n delete_tag_img: \"\",\n ajax_autocomplete_tag_url: \"\",\n ajax_retag_url: \"\",\n ajax_delete_tag_url: \"\",\n ajax_add_tag_url: \"\"\n };\n\n var settings = jQuery.extend(defaults, options);\n\n //\n // Initalize object's elements.\n //\n\n // Get elements for this object. For this_obj, assume the last element with the id is the \"this\"; this is somewhat of a hack to address the problem\n // that there may be two tagging elements for a single item if there are both community and individual tags for an element.\n var this_obj = $(this);\n var tag_area = this_obj.find('.tag-area');\n var toggle_link = this_obj.find('.toggle-link');\n var tag_input_field = this_obj.find('.tag-input');\n var add_tag_button = this_obj.find('.add-tag-button');\n\n // Initialize toggle link.\n toggle_link.click( function() {\n // Take special actions depending on whether toggle is showing or hiding link.\n var after_toggle_fn;\n if (tag_area.is(\":hidden\")) {\n after_toggle_fn = function() {\n // If there are no tags, go right to editing mode by generating a click on the area.\n var num_tags = $(this).find('.tag-button').length;\n if (num_tags === 0) {\n tag_area.click();\n }\n };\n } else {\n after_toggle_fn = function() {\n tag_area.blur();\n };\n }\n tag_area.slideToggle(\"fast\", after_toggle_fn);\n return $(this);\n });\n\n // Initialize tag input field.\n if (settings.editable) {\n tag_input_field.hide();\n }\n tag_input_field.keyup( function(e) {\n if ( e.keyCode === 27 ) {\n // Escape key\n $(this).trigger( \"blur\" );\n } else if (\n ( e.keyCode === 13 ) || // Return Key\n ( e.keyCode === 188 ) || // Comma\n ( e.keyCode === 32 ) // Space\n ) {\n //\n // Check input.\n //\n\n var new_value = this.value;\n\n // Suppress space after a \":\"\n if ( new_value.indexOf(\": \", new_value.length - 2) !== -1) {\n this.value = new_value.substring(0, new_value.length-1);\n return false;\n }\n\n // Remove trigger keys from input.\n if ( (e.keyCode === 188) || (e.keyCode === 32) ) {\n new_value = new_value.substring( 0 , new_value.length - 1 );\n }\n\n // Trim whitespace.\n new_value = $.trim(new_value);\n\n // Too short?\n if (new_value.length < 2) {\n return false;\n }\n\n //\n // New tag OK - apply it.\n //\n\n this.value = \"\"; // Reset text field now that tag is being added\n\n // Add button for tag after all other tag buttons.\n var new_tag_button = build_tag_button(new_value);\n var tag_buttons = tag_area.children(\".tag-button\");\n if (tag_buttons.length !== 0) {\n var last_tag_button = tag_buttons.slice(tag_buttons.length-1);\n last_tag_button.after(new_tag_button);\n } else {\n tag_area.prepend(new_tag_button);\n }\n\n // Add tag to internal list.\n var tag_name_and_value = new_value.split(\":\");\n settings.tags[tag_name_and_value[0]] = tag_name_and_value[1];\n\n // Update toggle link text.\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n\n // Commit tag to server.\n var zz = $(this);\n $.ajax({\n url: settings.ajax_add_tag_url,\n data: { new_tag: new_value },\n error: function() {\n // Failed. Roll back changes and show alert.\n new_tag_button.remove();\n delete settings.tags[tag_name_and_value[0]];\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n alert( \"Add tag failed\" );\n },\n success: function() {\n // Flush autocomplete cache because it's not out of date.\n // TODO: in the future, we could remove the particular item\n // that was chosen from the cache rather than flush it.\n zz.data('autocompleter').cacheFlush();\n }\n });\n\n return false;\n }\n });\n\n // Add autocomplete to input.\n var format_item_func = function(key, row_position, num_rows, value, search_term) {\n var tag_name_and_value = value.split(\":\");\n return (tag_name_and_value.length === 1 ? tag_name_and_value[0] : tag_name_and_value[1]);\n };\n var autocomplete_options = { selectFirst: false, formatItem: format_item_func,\n autoFill: false, highlight: false };\n tag_input_field.autocomplete_verheul(settings.ajax_autocomplete_tag_url, autocomplete_options);\n\n\n // Initialize delete tag images for current tags.\n this_obj.find('.delete-tag-img').each(function() {\n init_delete_tag_image( $(this) );\n });\n\n\n // Initialize tag click function.\n init_tag_click_function($(this), settings.tag_click_fn);\n\n // Initialize \"add tag\" button.\n add_tag_button.click( function() {\n $(this).hide();\n\n // Clicking on button is the same as clicking on the tag area.\n tag_area.click();\n return false;\n });\n\n //\n // Set up tag area interactions; these are needed only if tags are editable.\n //\n if (settings.editable) {\n // When the tag area blurs, go to \"view tag\" mode.\n tag_area.bind(\"blur\", function(e) {\n if (_.size(settings.tags) > 0) {\n add_tag_button.show();\n tag_input_field.hide();\n tag_area.removeClass(\"active-tag-area\");\n // tag_area.addClass(\"tooltip\");\n } else {\n // No tags, so do nothing to ensure that input is still visible.\n }\n });\n\n // On click, enable user to add tags.\n tag_area.click( function(e) {\n var is_active = $(this).hasClass(\"active-tag-area\");\n\n // If a \"delete image\" object was pressed and area is inactive, do nothing.\n if ($(e.target).hasClass(\"delete-tag-img\") && !is_active) {\n return false;\n }\n\n // If a \"tag name\" object was pressed and area is inactive, do nothing.\n if ($(e.target).hasClass(\"tag-name\") && !is_active) {\n return false;\n }\n\n // Remove tooltip.\n // $(this).removeClass(\"tooltip\");\n\n // Hide add tag button, show tag_input field. Change background to show\n // area is active.\n $(this).addClass(\"active-tag-area\");\n add_tag_button.hide();\n tag_input_field.show();\n tag_input_field.focus();\n\n // Add handler to document that will call blur when the tag area is blurred;\n // a tag area is blurred when a user clicks on an element outside the area.\n var handle_document_click = function(e) {\n var check_click = function(tag_area, target) {\n var tag_area_id = tag_area.attr(\"id\");\n // Blur the tag area if the element clicked on is not in the tag area.\n if (target !== tag_area) {\n tag_area.blur();\n $(window).unbind(\"click.tagging_blur\");\n $(this).addClass(\"tooltip\");\n }\n };\n check_click(tag_area, $(e.target));\n };\n // TODO: we should attach the click handler to all frames in order to capture\n // clicks outside the frame that this element is in.\n //window.parent.document.onclick = handle_document_click;\n //var temp = $(window.parent.document.body).contents().find(\"iframe\").html();\n //alert(temp);\n //$(document).parent().click(handle_document_click);\n $(window).bind(\"click.tagging_blur\", handle_document_click);\n\n return false;\n });\n }\n\n // If using toggle link, hide the tag area. Otherwise, show the tag area.\n if (settings.use_toggle_link) {\n tag_area.hide();\n }\n\n //\n // Helper functions.\n //\n\n //\n // Collapse tag name + value into a single string.\n //\n function build_tag_str(tag_name, tag_value) {\n return tag_name + ( tag_value ? \":\" + tag_value : \"\");\n }\n\n\n // Initialize a \"delete tag image\": when click, delete tag from UI and send delete request to server.\n function init_delete_tag_image(delete_img) {\n $(delete_img).mouseenter( function () {\n $(this).attr(\"src\", settings.delete_tag_img_rollover);\n });\n $(delete_img).mouseleave( function () {\n $(this).attr(\"src\", settings.delete_tag_img);\n });\n $(delete_img).click( function () {\n // Tag button is image's parent.\n var tag_button = $(this).parent();\n\n // Get tag name, value.\n var tag_name_elt = tag_button.find(\".tag-name\").eq(0);\n var tag_str = tag_name_elt.text();\n var tag_name_and_value = tag_str.split(\":\");\n var tag_name = tag_name_and_value[0];\n var tag_value = tag_name_and_value[1];\n\n var prev_button = tag_button.prev();\n tag_button.remove();\n\n // Remove tag from local list for consistency.\n delete settings.tags[tag_name];\n\n // Update toggle link text.\n var new_text = settings.get_toggle_link_text_fn(settings.tags);\n toggle_link.text(new_text);\n\n // Delete tag.\n $.ajax({\n url: settings.ajax_delete_tag_url,\n data: { tag_name: tag_name },\n error: function() {\n // Failed. Roll back changes and show alert.\n settings.tags[tag_name] = tag_value;\n if (prev_button.hasClass(\"tag-button\")) {\n prev_button.after(tag_button);\n } else {\n tag_area.prepend(tag_button);\n }\n alert( \"Remove tag failed\" );\n\n toggle_link.text(settings.get_toggle_link_text_fn(settings.tags));\n\n // TODO: no idea why it's necessary to set this up again.\n delete_img.mouseenter( function () {\n $(this).attr(\"src\", settings.delete_tag_img_rollover);\n });\n delete_img.mouseleave( function () {\n $(this).attr(\"src\", settings.delete_tag_img);\n });\n },\n success: function() {}\n });\n\n return true;\n });\n }\n\n //\n // Function that builds a tag button.\n //\n function build_tag_button(tag_str) {\n // Build \"delete tag\" image.\n var delete_img = $(\"\").attr(\"src\", settings.delete_tag_img).addClass(\"delete-tag-img\");\n init_delete_tag_image(delete_img);\n\n // Build tag button.\n var tag_name_elt = $(\"\").text(tag_str).addClass(\"tag-name\");\n tag_name_elt.click( function() {\n var tag_name_and_value = tag_str.split(\":\");\n settings.tag_click_fn(tag_name_and_value[0], tag_name_and_value[1]);\n return true;\n });\n\n var tag_button = $(\"\").addClass(\"tag-button\");\n tag_button.append(tag_name_elt);\n // Allow delete only if element is editable.\n if (settings.editable) {\n tag_button.append(delete_img);\n }\n\n return tag_button;\n }\n\n};\n\n// ============================================================================\n return init_tag_click_function;\n}));\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/ui/autocom_tagging.js","define([], function() {\n\n/** Frame view */\nvar FrameView = Backbone.View.extend({\n initialize: function( options ) {\n var self = this;\n this.model = options && options.model || new Backbone.Model( options );\n this.setElement( $( '
' ).addClass( 'corner frame' ) );\n this.$el.append( $( '
' ).addClass( 'f-header corner' )\n .append( $( '
' ).addClass( 'f-title' ) )\n .append( $( '
' ).addClass( 'f-icon f-close fa fa-close' )\n .tooltip( { title: 'Close', placement: 'bottom' } ) ) )\n .append( $( '
' ).addClass( 'f-content' ) )\n .append( $( '
' ).addClass( 'f-resize f-icon corner fa fa-expand' ).tooltip( { title: 'Resize' } ) )\n .append( $( '
' ).addClass( 'f-cover' ) );\n this.$header = this.$( '.f-header' );\n this.$title = this.$( '.f-title' );\n this.$content = this.$( '.f-content' );\n this.render();\n this.listenTo( this.model, 'change', this.render, this );\n },\n\n render: function() {\n var self = this;\n var options = this.model.attributes;\n this.$title.html( options.title || '' );\n this.$header.find( '.f-icon-left' ).remove();\n _.each( options.menu, function( option ) {\n var $option = $( '
' ).addClass( 'f-icon-left' ).addClass( option.icon );\n if ( _.isFunction( option.disabled ) && option.disabled() ) {\n $option.attr( 'disabled', true );\n } else {\n $option.on( 'click', function() { option.onclick( self ) } )\n .tooltip( { title: option.tooltip, placement: 'bottom' } );\n }\n self.$header.append( $option );\n } );\n if ( options.url ) {\n this.$content.html( $ ( '',\n header_template = '' +\n '' + \n\t '',\n frame_height = 350,\n frame_width = 600,\n class_names = 'ui-modal chat-modal';\n \n\t// deletes the chat modal if already present and create one\n if( $( '.chat-modal' ).length > 0 ) {\n $( '.chat-modal' ).remove();\n\t}\n // creates a modal\n\tGenericNavView.modal = new Modal.View({\n\t body : iframe_template,\n\t height : frame_height,\n\t width : frame_width,\n\t closing_events : true,\n\t title_separator : false,\n cls : class_names\n\t});\n\n\t// shows modal\n\tGenericNavView.modal.show();\n $el_chat_modal_header = $( '.chat-modal .modal-header' );\n $el_chat_modal_body = $( '.chat-modal .modal-body' );\n\t// adjusts the css of bootstrap modal for chat\n $el_chat_modal_header.addClass('modal-header-body');\n $el_chat_modal_body.addClass('modal-header-body');\n\t$el_chat_modal_header.find( 'h4' ).remove();\n $el_chat_modal_header.removeAttr( 'min-height padding border' );\n\t$el_chat_modal_header.append( header_template );\n\t// click event of the close button for chat\n\t$( '.close-modal' ).click(function( e ) {\n\t $( '.chat-modal' ).css( 'display', 'none' );\n\t});\n // click event of expand and compress icon\n $( '.expand-compress-modal' ).click(function( e ) {\n if( $( '.expand-compress-modal' ).hasClass( 'fa-expand' ) ) {\n $( '.chat-modal .modal-dialog' ).width( '1000px' );\n $( '.chat-modal .modal-body' ).height( '575px' );\n $( '.expand-compress-modal' ).removeClass( 'fa-expand' ).addClass( 'fa-compress' );\n $( '.expand-compress-modal' ).attr('title', 'Minimize');\n $( '.expand-compress-modal' ).css('margin-left', '96.2%');\n }\n else {\n $( '.chat-modal .modal-dialog' ).width( frame_width + 'px' );\n $( '.chat-modal .modal-body' ).height( frame_height + 'px' );\n $( '.expand-compress-modal' ).removeClass( 'fa-compress' ).addClass( 'fa-expand' );\n $( '.expand-compress-modal' ).attr('title', 'Maximize');\n $( '.expand-compress-modal' ).css('margin-left', '93.2%');\n }\n\t \n\t});\n return this;\n },\n\n /**renders the chat icon as a nav item*/\n render: function() {\n var self = this,\n navItem = {};\n navItem = {\n id : 'show-chat-online',\n icon : 'fa-comment-o',\n tooltip : 'Chat online',\n visible : false,\n onclick : self.makeModalIframe\n }\n return navItem;\n }\n});\n\nreturn {\n GenericNavView : GenericNavView\n};\n\n});\n\n\n\n\n// WEBPACK FOOTER //\n// ./galaxy/scripts/layout/generic-nav-view.js","define([\n 'utils/utils',\n 'layout/menu',\n 'layout/scratchbook',\n 'mvc/user/user-quotameter',\n], function( Utils, Menu, Scratchbook, QuotaMeter ) {\n\n/** Masthead **/\nvar View = Backbone.View.extend({\n initialize : function( options ) {\n var self = this;\n this.options = options;\n this.setElement( this._template() );\n this.$navbarBrandLink = this.$( '.navbar-brand-link' );\n this.$navbarBrandImage = this.$( '.navbar-brand-image' );\n this.$navbarBrandTitle = this.$( '.navbar-brand-title' );\n this.$navbarTabs = this.$( '.navbar-tabs' );\n this.$quoteMeter = this.$( '.quota-meter-container' );\n\n // build tabs\n this.collection = new Menu.Collection();\n this.collection.on( 'add', function( model ) {\n self.$navbarTabs.append( new Menu.Tab( { model : model } ).render().$el );\n }).on( 'reset', function() {\n self.$navbarTabs.empty();\n }).on( 'dispatch', function( callback ) {\n self.collection.each( function ( m ) { callback( m ) });\n }).fetch( this.options );\n\n // scratchbook\n Galaxy.frame = this.frame = new Scratchbook( { collection: this.collection } );\n\n // set up the quota meter (And fetch the current user data from trans)\n // add quota meter to masthead\n Galaxy.quotaMeter = this.quotaMeter = new QuotaMeter.UserQuotaMeter({\n model : Galaxy.user,\n el : this.$quoteMeter\n });\n\n // loop through beforeunload functions if the user attempts to unload the page\n $( window ).on( 'click', function( e ) {\n var $download_link = $( e.target ).closest( 'a[download]' );\n if ( $download_link.length == 1 ) {\n if( $( 'iframe[id=download]' ).length === 0 ) {\n $( 'body' ).append( $( '