%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/985914/root/data/old/home/stash/stash-home/tmp/webresources/
Upload File :
Create Path :
Current File : //proc/985914/root/data/old/home/stash/stash-home/tmp/webresources/49.cachedfile

;/* module-key = 'com.atlassian.stash.stash-web-plugin:submit-spinner', location = '/static/widget/submit-spinner/submit-spinner.js' */
define("widget/submit-spinner",["jquery"],function(B){function A(D,C){if(!(this instanceof A)){return new A(D)}this.$button=B(D);this.$spinner=B('<div class="submit-spinner invisible" />');if(C==="before"){this.$spinner.insertBefore(this.$button)}else{this.$spinner.insertAfter(this.$button)}}A.prototype.show=function(){this.$spinner.removeClass("invisible");this.$spinner.spin();return this};A.prototype.hide=function(){this.$spinner.addClass("invisible");this.$spinner.spinStop();return this};A.prototype.remove=function(){this.$spinner.remove();return this};return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:promise-util', location = '/static/util/promise.js' */
define("util/promise",["jquery","lodash","exports"],function(H,O,F){var B={PENDING:"pending",REJECTED:"rejected",RESOLVED:"resolved"};function E(R){R&&R.abort&&R.abort()}function K(){var R=Array.prototype.slice.call(arguments);var S=H.when.apply(H,R);S.abort=function(){O.forEach(R,E)};return S}function M(){console.log("Promise does not have an abort function")}function C(){var R=H.when.apply(H,arguments);R.abort=O.invoke.bind(O,arguments,"abort");return P(R)}function P(a,T,S){var R;var Z=a;var V=H.Callbacks();var W={};function X(){if(W.state()==="pending"){if(!R){E(Z)}R=true}V.fire()}function Y(b,c){return function(){if(R){return new H.Deferred()[b+"With"](this,arguments)}Z=c.apply(this,arguments);return Z}}var U=a.then(T?Y("resolve",T):null,S?Y("reject",S):null);W.abort=X;W.thenAbortable=function(b,d){var c=P(W,b,d);V.add(c.abort);return c};return U.promise(W)}function G(S,R){return function(){var X=H.Deferred();var T=this;var U=Array.prototype.slice.call(arguments);var Y;var W=function(){return setTimeout(function(){var Z=S.apply(T,U);Z.done(X.resolve).fail(X.reject);Y=Z.abort?O.bind(Z.abort,Z):M},R)};var V=W();Y=function(){clearTimeout(V);X.reject(X,"abort","abort")};return X.promise({abort:function(){Y()},reset:function(){if(X.state()==="pending"){clearTimeout(V);U=Array.prototype.slice.call(arguments);V=W()}}})}}function I(){return H.when.apply(H,O.map(arguments,A)).then(L,L)}function A(R){return R.then(Q(false),Q(true))}function Q(R){return function(){return H.Deferred().resolve({rejectedSelf:R&&this,self:this,args:Array.prototype.slice.call(arguments)})}}function L(){var U=O.chain(arguments).pluck("rejectedSelf").find(O.identity).value();var T=(U?"reject":"resolve")+"With";var R=U||arguments[0].self;var S=O.pluck(arguments,"args");return H.Deferred()[T](R,S)}function N(R,V,S,U){var T=H(R).spin(S||"small",U||{});return V.always(function(){T.remove()})}function D(R,W,S){S=S||"small";var V;var T=H(R);function U(){var X=Array.prototype.slice.call(arguments);if(!X.length){return }T.spin(S).addClass("spinning");V=I.apply(null,O.compact(X.concat(V)));V.always(function(){if(V.state()!==B.PENDING){T.spinStop().removeClass("spinning")}})}W&&U(W);return{add:U}}function J(V){var T=H.Deferred(),R={timeout:10000,interval:100,name:"",predicate:H.noop};V=H.extend(R,V);var S=new Date().getTime()+(V.timeout);var U=setInterval(function(){var W=V.predicate();if(W){clearInterval(U);T.resolve(W)}else{if(new Date().getTime()>S){clearInterval(U);T.reject("Predicate '"+V.name+"' was false after "+V.timeout+"ms")}}},V.interval);return T.promise()}F.state=B;F.delay=G;F.reduce=K;F.settle=I;F.spinner=N;F.rollingSpinner=D;F.thenAbortable=P;F.whenAbortable=C;F.waitFor=J});;
;/* module-key = 'com.atlassian.auiplugin:aui-select2', location = 'js-vendor/jquery/plugins/jquery.select2.js' */
(function(A){if(typeof A.fn.each2=="undefined"){A.extend(A.fn,{each2:function(E){var C=A([0]),D=-1,B=this.length;while(++D<B&&(C.context=C[0]=this[D])&&E.call(C[0],D,C)!==false){}return this}})}})(jQuery);(function(d,M){if(window.Select2!==M){return }var k,n,X,C,A,P,O={x:0,y:0},V,W,k={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(o){o=o.which?o.which:o;switch(o){case k.LEFT:case k.RIGHT:case k.UP:case k.DOWN:return true}return false},isControl:function(p){var o=p.which;switch(o){case k.SHIFT:case k.CTRL:case k.ALT:return true}if(p.metaKey){return true}return false},isFunctionKey:function(o){o=o.which?o.which:o;return o>=112&&o<=123}},b="<div class='select2-measure-scrollbar'></div>",D={"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B","\u24B8":"C","\uFF23":"C","\u0106":"C","\u0108":"C","\u010A":"C","\u010C":"C","\u00C7":"C","\u1E08":"C","\u0187":"C","\u023B":"C","\uA73E":"C","\u24B9":"D","\uFF24":"D","\u1E0A":"D","\u010E":"D","\u1E0C":"D","\u1E10":"D","\u1E12":"D","\u1E0E":"D","\u0110":"D","\u018B":"D","\u018A":"D","\u0189":"D","\uA779":"D","\u01F1":"DZ","\u01C4":"DZ","\u01F2":"Dz","\u01C5":"Dz","\u24BA":"E","\uFF25":"E","\u00C8":"E","\u00C9":"E","\u00CA":"E","\u1EC0":"E","\u1EBE":"E","\u1EC4":"E","\u1EC2":"E","\u1EBC":"E","\u0112":"E","\u1E14":"E","\u1E16":"E","\u0114":"E","\u0116":"E","\u00CB":"E","\u1EBA":"E","\u011A":"E","\u0204":"E","\u0206":"E","\u1EB8":"E","\u1EC6":"E","\u0228":"E","\u1E1C":"E","\u0118":"E","\u1E18":"E","\u1E1A":"E","\u0190":"E","\u018E":"E","\u24BB":"F","\uFF26":"F","\u1E1E":"F","\u0191":"F","\uA77B":"F","\u24BC":"G","\uFF27":"G","\u01F4":"G","\u011C":"G","\u1E20":"G","\u011E":"G","\u0120":"G","\u01E6":"G","\u0122":"G","\u01E4":"G","\u0193":"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H","\uFF28":"H","\u0124":"H","\u1E22":"H","\u1E26":"H","\u021E":"H","\u1E24":"H","\u1E28":"H","\u1E2A":"H","\u0126":"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I","\uFF29":"I","\u00CC":"I","\u00CD":"I","\u00CE":"I","\u0128":"I","\u012A":"I","\u012C":"I","\u0130":"I","\u00CF":"I","\u1E2E":"I","\u1EC8":"I","\u01CF":"I","\u0208":"I","\u020A":"I","\u1ECA":"I","\u012E":"I","\u1E2C":"I","\u0197":"I","\u24BF":"J","\uFF2A":"J","\u0134":"J","\u0248":"J","\u24C0":"K","\uFF2B":"K","\u1E30":"K","\u01E8":"K","\u1E32":"K","\u0136":"K","\u1E34":"K","\u0198":"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L","\uFF2C":"L","\u013F":"L","\u0139":"L","\u013D":"L","\u1E36":"L","\u1E38":"L","\u013B":"L","\u1E3C":"L","\u1E3A":"L","\u0141":"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L","\u01C7":"LJ","\u01C8":"Lj","\u24C2":"M","\uFF2D":"M","\u1E3E":"M","\u1E40":"M","\u1E42":"M","\u2C6E":"M","\u019C":"M","\u24C3":"N","\uFF2E":"N","\u01F8":"N","\u0143":"N","\u00D1":"N","\u1E44":"N","\u0147":"N","\u1E46":"N","\u0145":"N","\u1E4A":"N","\u1E48":"N","\u0220":"N","\u019D":"N","\uA790":"N","\uA7A4":"N","\u01CA":"NJ","\u01CB":"Nj","\u24C4":"O","\uFF2F":"O","\u00D2":"O","\u00D3":"O","\u00D4":"O","\u1ED2":"O","\u1ED0":"O","\u1ED6":"O","\u1ED4":"O","\u00D5":"O","\u1E4C":"O","\u022C":"O","\u1E4E":"O","\u014C":"O","\u1E50":"O","\u1E52":"O","\u014E":"O","\u022E":"O","\u0230":"O","\u00D6":"O","\u022A":"O","\u1ECE":"O","\u0150":"O","\u01D1":"O","\u020C":"O","\u020E":"O","\u01A0":"O","\u1EDC":"O","\u1EDA":"O","\u1EE0":"O","\u1EDE":"O","\u1EE2":"O","\u1ECC":"O","\u1ED8":"O","\u01EA":"O","\u01EC":"O","\u00D8":"O","\u01FE":"O","\u0186":"O","\u019F":"O","\uA74A":"O","\uA74C":"O","\u01A2":"OI","\uA74E":"OO","\u0222":"OU","\u24C5":"P","\uFF30":"P","\u1E54":"P","\u1E56":"P","\u01A4":"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q","\uFF31":"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R","\uFF32":"R","\u0154":"R","\u1E58":"R","\u0158":"R","\u0210":"R","\u0212":"R","\u1E5A":"R","\u1E5C":"R","\u0156":"R","\u1E5E":"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S","\uFF33":"S","\u1E9E":"S","\u015A":"S","\u1E64":"S","\u015C":"S","\u1E60":"S","\u0160":"S","\u1E66":"S","\u1E62":"S","\u1E68":"S","\u0218":"S","\u015E":"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T","\uFF34":"T","\u1E6A":"T","\u0164":"T","\u1E6C":"T","\u021A":"T","\u0162":"T","\u1E70":"T","\u1E6E":"T","\u0166":"T","\u01AC":"T","\u01AE":"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U","\uFF35":"U","\u00D9":"U","\u00DA":"U","\u00DB":"U","\u0168":"U","\u1E78":"U","\u016A":"U","\u1E7A":"U","\u016C":"U","\u00DC":"U","\u01DB":"U","\u01D7":"U","\u01D5":"U","\u01D9":"U","\u1EE6":"U","\u016E":"U","\u0170":"U","\u01D3":"U","\u0214":"U","\u0216":"U","\u01AF":"U","\u1EEA":"U","\u1EE8":"U","\u1EEE":"U","\u1EEC":"U","\u1EF0":"U","\u1EE4":"U","\u1E72":"U","\u0172":"U","\u1E76":"U","\u1E74":"U","\u0244":"U","\u24CB":"V","\uFF36":"V","\u1E7C":"V","\u1E7E":"V","\u01B2":"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W","\uFF37":"W","\u1E80":"W","\u1E82":"W","\u0174":"W","\u1E86":"W","\u1E84":"W","\u1E88":"W","\u2C72":"W","\u24CD":"X","\uFF38":"X","\u1E8A":"X","\u1E8C":"X","\u24CE":"Y","\uFF39":"Y","\u1EF2":"Y","\u00DD":"Y","\u0176":"Y","\u1EF8":"Y","\u0232":"Y","\u1E8E":"Y","\u0178":"Y","\u1EF6":"Y","\u1EF4":"Y","\u01B3":"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z","\uFF3A":"Z","\u0179":"Z","\u1E90":"Z","\u017B":"Z","\u017D":"Z","\u1E92":"Z","\u1E94":"Z","\u01B5":"Z","\u0224":"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a","\uFF41":"a","\u1E9A":"a","\u00E0":"a","\u00E1":"a","\u00E2":"a","\u1EA7":"a","\u1EA5":"a","\u1EAB":"a","\u1EA9":"a","\u00E3":"a","\u0101":"a","\u0103":"a","\u1EB1":"a","\u1EAF":"a","\u1EB5":"a","\u1EB3":"a","\u0227":"a","\u01E1":"a","\u00E4":"a","\u01DF":"a","\u1EA3":"a","\u00E5":"a","\u01FB":"a","\u01CE":"a","\u0201":"a","\u0203":"a","\u1EA1":"a","\u1EAD":"a","\u1EB7":"a","\u1E01":"a","\u0105":"a","\u2C65":"a","\u0250":"a","\uA733":"aa","\u00E6":"ae","\u01FD":"ae","\u01E3":"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b","\uFF42":"b","\u1E03":"b","\u1E05":"b","\u1E07":"b","\u0180":"b","\u0183":"b","\u0253":"b","\u24D2":"c","\uFF43":"c","\u0107":"c","\u0109":"c","\u010B":"c","\u010D":"c","\u00E7":"c","\u1E09":"c","\u0188":"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d","\uFF44":"d","\u1E0B":"d","\u010F":"d","\u1E0D":"d","\u1E11":"d","\u1E13":"d","\u1E0F":"d","\u0111":"d","\u018C":"d","\u0256":"d","\u0257":"d","\uA77A":"d","\u01F3":"dz","\u01C6":"dz","\u24D4":"e","\uFF45":"e","\u00E8":"e","\u00E9":"e","\u00EA":"e","\u1EC1":"e","\u1EBF":"e","\u1EC5":"e","\u1EC3":"e","\u1EBD":"e","\u0113":"e","\u1E15":"e","\u1E17":"e","\u0115":"e","\u0117":"e","\u00EB":"e","\u1EBB":"e","\u011B":"e","\u0205":"e","\u0207":"e","\u1EB9":"e","\u1EC7":"e","\u0229":"e","\u1E1D":"e","\u0119":"e","\u1E19":"e","\u1E1B":"e","\u0247":"e","\u025B":"e","\u01DD":"e","\u24D5":"f","\uFF46":"f","\u1E1F":"f","\u0192":"f","\uA77C":"f","\u24D6":"g","\uFF47":"g","\u01F5":"g","\u011D":"g","\u1E21":"g","\u011F":"g","\u0121":"g","\u01E7":"g","\u0123":"g","\u01E5":"g","\u0260":"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h","\uFF48":"h","\u0125":"h","\u1E23":"h","\u1E27":"h","\u021F":"h","\u1E25":"h","\u1E29":"h","\u1E2B":"h","\u1E96":"h","\u0127":"h","\u2C68":"h","\u2C76":"h","\u0265":"h","\u0195":"hv","\u24D8":"i","\uFF49":"i","\u00EC":"i","\u00ED":"i","\u00EE":"i","\u0129":"i","\u012B":"i","\u012D":"i","\u00EF":"i","\u1E2F":"i","\u1EC9":"i","\u01D0":"i","\u0209":"i","\u020B":"i","\u1ECB":"i","\u012F":"i","\u1E2D":"i","\u0268":"i","\u0131":"i","\u24D9":"j","\uFF4A":"j","\u0135":"j","\u01F0":"j","\u0249":"j","\u24DA":"k","\uFF4B":"k","\u1E31":"k","\u01E9":"k","\u1E33":"k","\u0137":"k","\u1E35":"k","\u0199":"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l","\uFF4C":"l","\u0140":"l","\u013A":"l","\u013E":"l","\u1E37":"l","\u1E39":"l","\u013C":"l","\u1E3D":"l","\u1E3B":"l","\u017F":"l","\u0142":"l","\u019A":"l","\u026B":"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l","\u01C9":"lj","\u24DC":"m","\uFF4D":"m","\u1E3F":"m","\u1E41":"m","\u1E43":"m","\u0271":"m","\u026F":"m","\u24DD":"n","\uFF4E":"n","\u01F9":"n","\u0144":"n","\u00F1":"n","\u1E45":"n","\u0148":"n","\u1E47":"n","\u0146":"n","\u1E4B":"n","\u1E49":"n","\u019E":"n","\u0272":"n","\u0149":"n","\uA791":"n","\uA7A5":"n","\u01CC":"nj","\u24DE":"o","\uFF4F":"o","\u00F2":"o","\u00F3":"o","\u00F4":"o","\u1ED3":"o","\u1ED1":"o","\u1ED7":"o","\u1ED5":"o","\u00F5":"o","\u1E4D":"o","\u022D":"o","\u1E4F":"o","\u014D":"o","\u1E51":"o","\u1E53":"o","\u014F":"o","\u022F":"o","\u0231":"o","\u00F6":"o","\u022B":"o","\u1ECF":"o","\u0151":"o","\u01D2":"o","\u020D":"o","\u020F":"o","\u01A1":"o","\u1EDD":"o","\u1EDB":"o","\u1EE1":"o","\u1EDF":"o","\u1EE3":"o","\u1ECD":"o","\u1ED9":"o","\u01EB":"o","\u01ED":"o","\u00F8":"o","\u01FF":"o","\u0254":"o","\uA74B":"o","\uA74D":"o","\u0275":"o","\u01A3":"oi","\u0223":"ou","\uA74F":"oo","\u24DF":"p","\uFF50":"p","\u1E55":"p","\u1E57":"p","\u01A5":"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q","\uFF51":"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r","\uFF52":"r","\u0155":"r","\u1E59":"r","\u0159":"r","\u0211":"r","\u0213":"r","\u1E5B":"r","\u1E5D":"r","\u0157":"r","\u1E5F":"r","\u024D":"r","\u027D":"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s","\uFF53":"s","\u00DF":"s","\u015B":"s","\u1E65":"s","\u015D":"s","\u1E61":"s","\u0161":"s","\u1E67":"s","\u1E63":"s","\u1E69":"s","\u0219":"s","\u015F":"s","\u023F":"s","\uA7A9":"s","\uA785":"s","\u1E9B":"s","\u24E3":"t","\uFF54":"t","\u1E6B":"t","\u1E97":"t","\u0165":"t","\u1E6D":"t","\u021B":"t","\u0163":"t","\u1E71":"t","\u1E6F":"t","\u0167":"t","\u01AD":"t","\u0288":"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u","\uFF55":"u","\u00F9":"u","\u00FA":"u","\u00FB":"u","\u0169":"u","\u1E79":"u","\u016B":"u","\u1E7B":"u","\u016D":"u","\u00FC":"u","\u01DC":"u","\u01D8":"u","\u01D6":"u","\u01DA":"u","\u1EE7":"u","\u016F":"u","\u0171":"u","\u01D4":"u","\u0215":"u","\u0217":"u","\u01B0":"u","\u1EEB":"u","\u1EE9":"u","\u1EEF":"u","\u1EED":"u","\u1EF1":"u","\u1EE5":"u","\u1E73":"u","\u0173":"u","\u1E77":"u","\u1E75":"u","\u0289":"u","\u24E5":"v","\uFF56":"v","\u1E7D":"v","\u1E7F":"v","\u028B":"v","\uA75F":"v","\u028C":"v","\uA761":"vy","\u24E6":"w","\uFF57":"w","\u1E81":"w","\u1E83":"w","\u0175":"w","\u1E87":"w","\u1E85":"w","\u1E98":"w","\u1E89":"w","\u2C73":"w","\u24E7":"x","\uFF58":"x","\u1E8B":"x","\u1E8D":"x","\u24E8":"y","\uFF59":"y","\u1EF3":"y","\u00FD":"y","\u0177":"y","\u1EF9":"y","\u0233":"y","\u1E8F":"y","\u00FF":"y","\u1EF7":"y","\u1E99":"y","\u1EF5":"y","\u01B4":"y","\u024F":"y","\u1EFF":"y","\u24E9":"z","\uFF5A":"z","\u017A":"z","\u1E91":"z","\u017C":"z","\u017E":"z","\u1E93":"z","\u1E95":"z","\u01B6":"z","\u0225":"z","\u0240":"z","\u2C6C":"z","\uA763":"z"};V=d(document);A=(function(){var o=1;return function(){return o++}}());function E(r){var p,q,o,s;if(!r||r.length<1){return r}p="";for(q=0,o=r.length;q<o;q++){s=r.charAt(q);p+=D[s]||s}return p}function Q(q,r){var p=0,o=r.length;for(;p<o;p=p+1){if(T(q,r[p])){return p}}return -1}function m(){var o=d(b);o.appendTo("body");var p={width:o.width()-o[0].clientWidth,height:o.height()-o[0].clientHeight};o.remove();return p}function T(p,o){if(p===o){return true}if(p===M||o===M){return false}if(p===null||o===null){return false}if(p.constructor===String){return p+""===o+""}if(o.constructor===String){return o+""===p+""}return false}function I(p,r){var s,q,o;if(p===null||p.length<1){return[]}s=p.split(r);for(q=0,o=s.length;q<o;q=q+1){s[q]=d.trim(s[q])}return s}function H(o){return o.outerWidth(false)-o.width()}function f(p){var o="keyup-change-value";p.on("keydown",function(){if(d.data(p,o)===M){d.data(p,o,p.val())}});p.on("keyup",function(){var q=d.data(p,o);if(q!==M&&p.val()!==q){d.removeData(p,o);p.trigger("keyup-change")}})}V.on("mousemove",function(o){O.x=o.pageX;O.y=o.pageY});function j(o){o.on("mousemove",function(q){var p=O;if(p===M||p.x!==q.pageX||p.y!==q.pageY){d(q.target).trigger("mousemove-filtered",q)}})}function K(r,p,o){o=o||M;var q;return function(){var s=arguments;window.clearTimeout(q);q=window.setTimeout(function(){p.apply(o,s)},r)}}function S(q){var o=false,p;return function(){if(o===false){p=q();o=true}return p}}function L(o,q){var p=K(o,function(r){q.trigger("scroll-debounced",r)});q.on("scroll",function(r){if(Q(r.target,q.get())>=0){p(r)}})}function i(o){if(o[0]===document.activeElement){return }window.setTimeout(function(){var q=o[0],r=o.val().length,p;o.focus();if(o.is(":visible")&&q===document.activeElement){if(q.setSelectionRange){q.setSelectionRange(r,r)}else{if(q.createTextRange){p=q.createTextRange();p.collapse(false);p.select()}}}},0)}function F(o){o=d(o)[0];var r=0;var p=0;if("selectionStart" in o){r=o.selectionStart;p=o.selectionEnd-r}else{if("selection" in document){o.focus();var q=document.selection.createRange();p=document.selection.createRange().text.length;q.moveStart("character",-o.value.length);r=q.text.length-p}}return{offset:r,length:p}}function a(o){o.preventDefault();o.stopPropagation()}function B(o){o.preventDefault();o.stopImmediatePropagation()}function N(p){if(!P){var o=p[0].currentStyle||window.getComputedStyle(p[0],null);P=d(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:o.fontSize,fontFamily:o.fontFamily,fontStyle:o.fontStyle,fontWeight:o.fontWeight,letterSpacing:o.letterSpacing,textTransform:o.textTransform,whiteSpace:"nowrap"});P.attr("class","select2-sizer");d("body").append(P)}P.text(p.val());return P.width()}function J(p,t,o){var r,s=[],q;r=p.attr("class");if(r){r=""+r;d(r.split(" ")).each2(function(){if(this.indexOf("select2-")===0){s.push(this)}})}r=t.attr("class");if(r){r=""+r;d(r.split(" ")).each2(function(){if(this.indexOf("select2-")!==0){q=o(this);if(q){s.push(q)}}})}p.attr("class",s.join(" "))}function U(t,s,q,o){var r=E(t.toUpperCase()).indexOf(E(s.toUpperCase())),p=s.length;if(r<0){q.push(o(t));return }q.push(o(t.substring(0,r)));q.push("<span class='select2-match'>");q.push(o(t.substring(r,r+p)));q.push("</span>");q.push(o(t.substring(r+p,t.length)))}function g(o){var p={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(o).replace(/[&<>"'\/\\]/g,function(q){return p[q]})}function e(p){var s,q=null,t=p.quietMillis||100,r=p.url,o=this;return function(u){window.clearTimeout(s);s=window.setTimeout(function(){var x=p.data,w=r,z=p.transport||d.fn.select2.ajaxDefaults.transport,v={type:p.type||"GET",cache:p.cache||false,jsonpCallback:p.jsonpCallback||M,dataType:p.dataType||"json"},y=d.extend({},d.fn.select2.ajaxDefaults.params,v);x=x?x.call(o,u.term,u.page,u.context):null;w=(typeof w==="function")?w.call(o,u.term,u.page,u.context):w;if(q){q.abort()}if(p.params){if(d.isFunction(p.params)){d.extend(y,p.params.call(o))}else{d.extend(y,p.params)}}d.extend(y,{url:w,dataType:p.dataType,data:x,success:function(AB){var AA=p.results(AB,u.page);u.callback(AA)}});q=z.call(o,y)},t)}}function h(p){var s=p,r,q,t=function(u){return""+u.text};if(d.isArray(s)){q=s;s={results:q}}if(d.isFunction(s)===false){q=s;s=function(){return q}}var o=s();if(o.text){t=o.text;if(!d.isFunction(t)){r=o.text;t=function(u){return u[r]}}}return function(w){var v=w.term,u={results:[]},x;if(v===""){w.callback(s());return }x=function(z,AB){var AA,y;z=z[0];if(z.children){AA={};for(y in z){if(z.hasOwnProperty(y)){AA[y]=z[y]}}AA.children=[];d(z.children).each2(function(AC,AD){x(AD,AA.children)});if(AA.children.length||w.matcher(v,t(AA),z)){AB.push(AA)}}else{if(w.matcher(v,t(z),z)){AB.push(z)}}};d(s().results).each2(function(z,y){x(y,u.results)});w.callback(u)}}function Z(p){var o=d.isFunction(p);return function(s){var r=s.term,q={results:[]};d(o?p():p).each(function(){var t=this.text!==M,u=t?this.text:this;if(r===""||s.matcher(r,u)){q.results.push(t?this:{id:this,text:this})}});s.callback(q)}}function Y(o,p){if(d.isFunction(o)){return true}if(!o){return false}throw new Error(p+" must be a function or a falsy value")}function c(o){return d.isFunction(o)?o():o}function R(o){var p=0;d.each(o,function(q,r){if(r.children){p+=R(r.children)}else{p++}});return p}function G(w,x,u,o){var p=w,y=false,r,v,s,q,t;if(!o.createSearchChoice||!o.tokenSeparators||o.tokenSeparators.length<1){return M}while(true){v=-1;for(s=0,q=o.tokenSeparators.length;s<q;s++){t=o.tokenSeparators[s];v=w.indexOf(t);if(v>=0){break}}if(v<0){break}r=w.substring(0,v);w=w.substring(v+t.length);if(r.length>0){r=o.createSearchChoice.call(this,r,x);if(r!==M&&r!==null&&o.id(r)!==M&&o.id(r)!==null){y=false;for(s=0,q=x.length;s<q;s++){if(T(o.id(r),o.id(x[s]))){y=true;break}}if(!y){u(r)}}}}if(p!==w){return w}}function l(o,p){var q=function(){};q.prototype=new o;q.prototype.constructor=q;q.prototype.parent=o.prototype;q.prototype=d.extend(q.prototype,p);return q}n=l(Object,{bind:function(p){var o=this;return function(){p.apply(o,arguments)}},init:function(s){var q,p,t=".select2-results";this.opts=s=this.prepareOpts(s);this.id=s.id;if(s.element.data("select2")!==M&&s.element.data("select2")!==null){s.element.data("select2").destroy()}this.container=this.createContainer();this.containerId="s2id_"+(s.element.attr("id")||"autogen"+A());this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1");this.container.attr("id",this.containerId);this.body=S(function(){return s.element.closest("body")});J(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.attr("style",s.element.attr("style"));this.container.css(c(s.containerCss));this.container.addClass(c(s.containerCssClass));this.elementTabIndex=this.opts.element.attr("tabindex");this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container).on("click.select2",a);this.container.data("select2",this);this.dropdown=this.container.find(".select2-drop");J(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(c(s.dropdownCssClass));this.dropdown.data("select2",this);this.dropdown.on("click",a);this.results=q=this.container.find(t);this.search=p=this.container.find("input.select2-input");this.queryCount=0;this.resultsPage=0;this.context=null;this.initContainer();this.container.on("click",a);j(this.results);this.dropdown.on("mousemove-filtered touchstart touchmove touchend",t,this.bind(this.highlightUnderEvent));L(80,this.results);this.dropdown.on("scroll-debounced",t,this.bind(this.loadMoreIfNeeded));d(this.container).on("change",".select2-input",function(u){u.stopPropagation()});d(this.dropdown).on("change",".select2-input",function(u){u.stopPropagation()});if(d.fn.mousewheel){q.mousewheel(function(x,y,v,u){var w=q.scrollTop();if(u>0&&w-u<=0){q.scrollTop(0);a(x)}else{if(u<0&&q.get(0).scrollHeight-q.scrollTop()+u<=q.height()){q.scrollTop(q.get(0).scrollHeight-q.height());a(x)}}})}f(p);p.on("keyup-change input paste",this.bind(this.updateResults));p.on("focus",function(){p.addClass("select2-focused")});p.on("blur",function(){p.removeClass("select2-focused")});this.dropdown.on("mouseup",t,this.bind(function(u){if(d(u.target).closest(".select2-result-selectable").length>0){this.highlightUnderEvent(u);this.selectHighlighted(u)}}));this.dropdown.on("click mouseup mousedown",function(u){u.stopPropagation()});if(d.isFunction(this.opts.initSelection)){this.initSelection();this.monitorSource()}if(s.maximumInputLength!==null){this.search.attr("maxlength",s.maximumInputLength)}var r=s.element.prop("disabled");if(r===M){r=false}this.enable(!r);var o=s.element.prop("readonly");if(o===M){o=false}this.readonly(o);W=W||m();this.autofocus=s.element.prop("autofocus");s.element.prop("autofocus",false);if(this.autofocus){this.focus()}this.nextSearchTerm=M},destroy:function(){var p=this.opts.element,o=p.data("select2");this.close();if(this.propertyObserver){delete this.propertyObserver;this.propertyObserver=null}if(o!==M){o.container.remove();o.dropdown.remove();p.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||false);if(this.elementTabIndex){p.attr({tabindex:this.elementTabIndex})}else{p.removeAttr("tabindex")}p.show()}},optionToData:function(o){if(o.is("option")){return{id:o.prop("value"),text:o.text(),element:o.get(),css:o.attr("class"),disabled:o.prop("disabled"),locked:T(o.attr("locked"),"locked")||T(o.data("locked"),true)}}else{if(o.is("optgroup")){return{text:o.attr("label"),children:[],element:o.get(),css:o.attr("class")}}}},prepareOpts:function(t){var r,p,o,s,q=this;r=t.element;if(r.get(0).tagName.toLowerCase()==="select"){this.select=p=t.element}if(p){d.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in t){throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}})}t=d.extend({},{populateResults:function(u,v,x){var w,y=this.opts.id;w=function(AF,z,AE){var AG,AB,AL,AI,AC,AK,AA,AJ,AH,AD;AF=t.sortResults(AF,z,x);for(AG=0,AB=AF.length;AG<AB;AG=AG+1){AL=AF[AG];AC=(AL.disabled===true);AI=(!AC)&&(y(AL)!==M);AK=AL.children&&AL.children.length>0;AA=d("<li></li>");AA.addClass("select2-results-dept-"+AE);AA.addClass("select2-result");AA.addClass(AI?"select2-result-selectable":"select2-result-unselectable");if(AC){AA.addClass("select2-disabled")}if(AK){AA.addClass("select2-result-with-children")}AA.addClass(q.opts.formatResultCssClass(AL));AJ=d(document.createElement("div"));AJ.addClass("select2-result-label");AD=t.formatResult(AL,AJ,x,q.opts.escapeMarkup);if(AD!==M){AJ.html(AD)}AA.append(AJ);if(AK){AH=d("<ul></ul>");AH.addClass("select2-result-sub");w(AL.children,AH,AE+1);AA.append(AH)}AA.data("select2-data",AL);z.append(AA)}};w(v,u,0)}},d.fn.select2.defaults,t);if(typeof (t.id)!=="function"){o=t.id;t.id=function(u){return u[o]}}if(d.isArray(t.element.data("select2Tags"))){if("tags" in t){throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+t.element.attr("id")}t.tags=t.element.data("select2Tags")}if(p){t.query=this.bind(function(y){var x={results:[],more:false},w=y.term,v,u,z;z=function(AA,AC){var AB;if(AA.is("option")){if(y.matcher(w,AA.text(),AA)){AC.push(q.optionToData(AA))}}else{if(AA.is("optgroup")){AB=q.optionToData(AA);AA.children().each2(function(AD,AE){z(AE,AB.children)});if(AB.children.length>0){AC.push(AB)}}}};v=r.children();if(this.getPlaceholder()!==M&&v.length>0){u=this.getPlaceholderOption();if(u){v=v.not(u)}}v.each2(function(AA,AB){z(AB,x.results)});y.callback(x)});t.id=function(u){return u.id};t.formatResultCssClass=function(u){return u.css}}else{if(!("query" in t)){if("ajax" in t){s=t.element.data("ajax-url");if(s&&s.length>0){t.ajax.url=s}t.query=e.call(t.element,t.ajax)}else{if("data" in t){t.query=h(t.data)}else{if("tags" in t){t.query=Z(t.tags);if(t.createSearchChoice===M){t.createSearchChoice=function(u){return{id:d.trim(u),text:d.trim(u)}}}if(t.initSelection===M){t.initSelection=function(u,w){var v=[];d(I(u.val(),t.separator)).each(function(){var y={id:this,text:this},x=t.tags;if(d.isFunction(x)){x=x()}d(x).each(function(){if(T(this.id,y.id)){y=this;return false}});v.push(y)});w(v)}}}}}}}if(typeof (t.query)!=="function"){throw"query function not defined for Select2 "+t.element.attr("id")}return t},monitorSource:function(){var p=this.opts.element,q,o;p.on("change.select2",this.bind(function(r){if(this.opts.element.data("select2-change-triggered")!==true){this.initSelection()}}));q=this.bind(function(){var s=p.prop("disabled");if(s===M){s=false}this.enable(!s);var r=p.prop("readonly");if(r===M){r=false}this.readonly(r);J(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.addClass(c(this.opts.containerCssClass));J(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(c(this.opts.dropdownCssClass))});p.on("propertychange.select2",q);if(this.mutationCallback===M){this.mutationCallback=function(r){r.forEach(q)}}o=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;if(o!==M){if(this.propertyObserver){delete this.propertyObserver;this.propertyObserver=null}this.propertyObserver=new o(this.mutationCallback);this.propertyObserver.observe(p.get(0),{attributes:true,subtree:false})}},triggerSelect:function(p){var o=d.Event("select2-selecting",{val:this.id(p),object:p});this.opts.element.trigger(o);return !o.isDefaultPrevented()},triggerChange:function(o){o=o||{};o=d.extend({},o,{type:"change",val:this.val()});this.opts.element.data("select2-change-triggered",true);this.opts.element.trigger(o);this.opts.element.data("select2-change-triggered",false);this.opts.element.click();if(this.opts.blurOnChange){this.opts.element.blur()}},isInterfaceEnabled:function(){return this.enabledInterface===true},enableInterface:function(){var o=this._enabled&&!this._readonly,p=!o;if(o===this.enabledInterface){return false}this.container.toggleClass("select2-container-disabled",p);this.close();this.enabledInterface=o;return true},enable:function(o){if(o===M){o=true}if(this._enabled===o){return }this._enabled=o;this.opts.element.prop("disabled",!o);this.enableInterface()},disable:function(){this.enable(false)},readonly:function(o){if(o===M){o=false}if(this._readonly===o){return false}this._readonly=o;this.opts.element.prop("readonly",o);this.enableInterface();return true},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var q=this.dropdown,t=this.container.offset(),AC=this.container.outerHeight(false),AD=this.container.outerWidth(false),y=q.outerHeight(false),AA=d(window),AH=AA.width(),w=AA.height(),p=AA.scrollLeft()+AH,AG=AA.scrollTop()+w,r=t.top+AC,AE=t.left,o=r+y<=AG,v=(t.top-y)>=this.body().scrollTop(),z=q.outerWidth(false),AJ=AE+z<=p,AI=q.hasClass("select2-drop-above"),u,AF,s,x,AB;if(AI){AF=true;if(!v&&o){s=true;AF=false}}else{AF=false;if(!o&&v){s=true;AF=true}}if(s){q.hide();t=this.container.offset();AC=this.container.outerHeight(false);AD=this.container.outerWidth(false);y=q.outerHeight(false);p=AA.scrollLeft()+AH;AG=AA.scrollTop()+w;r=t.top+AC;AE=t.left;z=q.outerWidth(false);AJ=AE+z<=p;q.show()}if(this.opts.dropdownAutoWidth){AB=d(".select2-results",q)[0];q.addClass("select2-drop-auto-width");q.css("width","");z=q.outerWidth(false)+(AB.scrollHeight===AB.clientHeight?0:W.width);z>AD?AD=z:z=AD;AJ=AE+z<=p}else{this.container.removeClass("select2-drop-auto-width")}if(this.body().css("position")!=="static"){u=this.body().offset();r-=u.top;AE-=u.left}if(!AJ){AE=t.left+AD-z}x={left:AE,width:AD};if(AF){x.bottom=w-t.top;x.top="auto";this.container.addClass("select2-drop-above");q.addClass("select2-drop-above")}else{x.top=r;x.bottom="auto";this.container.removeClass("select2-drop-above");q.removeClass("select2-drop-above")}x=d.extend(x,c(this.opts.dropdownCss));q.css(x)},shouldOpen:function(){var o;if(this.opened()){return false}if(this._enabled===false||this._readonly===true){return false}o=d.Event("select2-opening");this.opts.element.trigger(o);return !o.isDefaultPrevented()},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above");this.dropdown.removeClass("select2-drop-above")},open:function(){if(!this.shouldOpen()){return false}this.opening();return true},opening:function(){var t=this.containerId,o="scroll."+t,r="resize."+t,q="orientationchange."+t,p;this.container.addClass("select2-dropdown-open").addClass("select2-container-active");this.clearDropdownAlignmentPreference();if(this.dropdown[0]!==this.body().children().last()[0]){this.dropdown.detach().appendTo(this.body())}p=d("#select2-drop-mask");if(p.length==0){p=d(document.createElement("div"));p.attr("id","select2-drop-mask").attr("class","select2-drop-mask");p.hide();p.appendTo(this.body());p.on("mousedown touchstart click",function(v){var w=d("#select2-drop"),u;if(w.length>0){u=w.data("select2");if(u.opts.selectOnBlur){u.selectHighlighted({noFocus:true})}u.close({focus:true});v.preventDefault();v.stopPropagation()}})}if(this.dropdown.prev()[0]!==p[0]){this.dropdown.before(p)}d("#select2-drop").removeAttr("id");this.dropdown.attr("id","select2-drop");p.show();this.positionDropdown();this.dropdown.show();this.positionDropdown();this.dropdown.addClass("select2-drop-active");var s=this;this.container.parents().add(window).each(function(){d(this).on(r+" "+o+" "+q,function(u){s.positionDropdown()})})},close:function(){if(!this.opened()){return }var r=this.containerId,o="scroll."+r,q="resize."+r,p="orientationchange."+r;this.container.parents().add(window).each(function(){d(this).off(o).off(q).off(p)});this.clearDropdownAlignmentPreference();d("#select2-drop-mask").hide();this.dropdown.removeAttr("id");this.dropdown.hide();this.container.removeClass("select2-dropdown-open").removeClass("select2-container-active");this.results.empty();this.clearSearch();this.search.removeClass("select2-active");this.opts.element.trigger(d.Event("select2-close"))},externalSearch:function(o){this.open();this.search.val(o);this.updateResults(false)},clearSearch:function(){},getMaximumSelectionSize:function(){return c(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var r=this.results,q,o,v,u,s,t,p;o=this.highlight();if(o<0){return }if(o==0){r.scrollTop(0);return }q=this.findHighlightableChoices().find(".select2-result-label");v=d(q[o]);u=v.offset().top+v.outerHeight(true);if(o===q.length-1){p=r.find("li.select2-more-results");if(p.length>0){u=p.offset().top+p.outerHeight(true)}}s=r.offset().top+r.outerHeight(true);if(u>s){r.scrollTop(r.scrollTop()+(u-s))}t=v.offset().top-r.offset().top;if(t<0&&v.css("display")!="none"){r.scrollTop(r.scrollTop()+t)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-disabled, .select2-selected)")},moveHighlight:function(r){var q=this.findHighlightableChoices(),p=this.highlight();while(p>-1&&p<q.length){p+=r;var o=d(q[p]);if(o.hasClass("select2-result-selectable")&&!o.hasClass("select2-disabled")&&!o.hasClass("select2-selected")){this.highlight(p);break}}},highlight:function(p){var r=this.findHighlightableChoices(),o,q;if(arguments.length===0){return Q(r.filter(".select2-highlighted")[0],r.get())}if(p>=r.length){p=r.length-1}if(p<0){p=0}this.removeHighlight();o=d(r[p]);o.addClass("select2-highlighted");this.ensureHighlightVisible();q=o.data("select2-data");if(q){this.opts.element.trigger({type:"select2-highlight",val:this.id(q),choice:q})}},removeHighlight:function(){this.results.find(".select2-highlighted").removeClass("select2-highlighted")},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(p){var o=d(p.target).closest(".select2-result-selectable");if(o.length>0&&!o.is(".select2-highlighted")){var q=this.findHighlightableChoices();this.highlight(q.index(o))}else{if(o.length==0){this.removeHighlight()}}},loadMoreIfNeeded:function(){var s=this.results,r=s.find("li.select2-more-results"),u,t=this.resultsPage+1,o=this,q=this.search.val(),p=this.context;if(r.length===0){return }u=r.offset().top-s.offset().top-s.height();if(u<=this.opts.loadMorePadding){r.addClass("select2-active");this.opts.query({element:this.opts.element,term:q,page:t,context:p,matcher:this.opts.matcher,callback:this.bind(function(v){if(!o.opened()){return }o.opts.populateResults.call(this,s,v.results,{term:q,page:t,context:p});o.postprocessResults(v,false,false);if(v.more===true){r.detach().appendTo(s).text(o.opts.formatLoadMore(t+1));window.setTimeout(function(){o.loadMoreIfNeeded()},10)}else{r.remove()}o.positionDropdown();o.resultsPage=t;o.context=v.context;this.opts.element.trigger({type:"select2-loaded",items:v})})})}},tokenize:function(){},updateResults:function(w){var AA=this.search,u=this.results,o=this.opts,t,z=this,x,s=AA.val(),q=d.data(this.container,"select2-last-term"),y;if(w!==true&&q&&T(s,q)){return }d.data(this.container,"select2-last-term",s);if(w!==true&&(this.showSearchInput===false||!this.opened())){return }function v(){AA.removeClass("select2-active");z.positionDropdown()}function p(AB){u.html(AB);v()}y=++this.queryCount;var r=this.getMaximumSelectionSize();if(r>=1){t=this.data();if(d.isArray(t)&&t.length>=r&&Y(o.formatSelectionTooBig,"formatSelectionTooBig")){p("<li class='select2-selection-limit'>"+o.formatSelectionTooBig(r)+"</li>");return }}if(AA.val().length<o.minimumInputLength){if(Y(o.formatInputTooShort,"formatInputTooShort")){p("<li class='select2-no-results'>"+o.formatInputTooShort(AA.val(),o.minimumInputLength)+"</li>")}else{p("")}if(w&&this.showSearch){this.showSearch(true)}return }if(o.maximumInputLength&&AA.val().length>o.maximumInputLength){if(Y(o.formatInputTooLong,"formatInputTooLong")){p("<li class='select2-no-results'>"+o.formatInputTooLong(AA.val(),o.maximumInputLength)+"</li>")}else{p("")}return }if(o.formatSearching&&this.findHighlightableChoices().length===0){p("<li class='select2-searching'>"+o.formatSearching()+"</li>")}AA.addClass("select2-active");this.removeHighlight();x=this.tokenize();if(x!=M&&x!=null){AA.val(x)}this.resultsPage=1;o.query({element:o.element,term:AA.val(),page:this.resultsPage,context:null,matcher:o.matcher,callback:this.bind(function(AC){var AB;if(y!=this.queryCount){return }if(!this.opened()){this.search.removeClass("select2-active");return }this.context=(AC.context===M)?null:AC.context;if(this.opts.createSearchChoice&&AA.val()!==""){AB=this.opts.createSearchChoice.call(z,AA.val(),AC.results);if(AB!==M&&AB!==null&&z.id(AB)!==M&&z.id(AB)!==null){if(d(AC.results).filter(function(){return T(z.id(this),z.id(AB))}).length===0){AC.results.unshift(AB)}}}if(AC.results.length===0&&Y(o.formatNoMatches,"formatNoMatches")){p("<li class='select2-no-results'>"+o.formatNoMatches(AA.val())+"</li>");return }u.empty();z.opts.populateResults.call(this,u,AC.results,{term:AA.val(),page:this.resultsPage,context:null});if(AC.more===true&&Y(o.formatLoadMore,"formatLoadMore")){u.append("<li class='select2-more-results'>"+z.opts.escapeMarkup(o.formatLoadMore(this.resultsPage))+"</li>");window.setTimeout(function(){z.loadMoreIfNeeded()},10)}this.postprocessResults(AC,w);v();this.opts.element.trigger({type:"select2-loaded",items:AC})})})},cancel:function(){this.close()},blur:function(){if(this.opts.selectOnBlur){this.selectHighlighted({noFocus:true})}this.close();this.container.removeClass("select2-container-active");if(this.search[0]===document.activeElement){this.search.blur()}this.clearSearch();this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){i(this.search)},selectHighlighted:function(p){var o=this.highlight(),q=this.results.find(".select2-highlighted"),r=q.closest(".select2-result").data("select2-data");if(r){this.highlight(o);this.onSelect(r,p)}else{if(p&&p.noFocus){this.close()}}},getPlaceholder:function(){var o;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((o=this.getPlaceholderOption())!==M?o.text():M)},getPlaceholderOption:function(){if(this.select){var o=this.select.children("option").first();if(this.opts.placeholderOption!==M){return(this.opts.placeholderOption==="first"&&o)||(typeof this.opts.placeholderOption==="function"&&this.opts.placeholderOption(this.select))}else{if(o.text()===""&&o.val()===""){return o}}}},initContainerWidth:function(){function p(){var u,s,v,t,r,q;if(this.opts.width==="off"){return null}else{if(this.opts.width==="element"){return this.opts.element.outerWidth(false)===0?"auto":this.opts.element.outerWidth(false)+"px"}else{if(this.opts.width==="copy"||this.opts.width==="resolve"){u=this.opts.element.attr("style");if(u!==M){s=u.split(";");for(t=0,r=s.length;t<r;t=t+1){q=s[t].replace(/\s/g,"");v=q.match(/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);if(v!==null&&v.length>=1){return v[1]}}}if(this.opts.width==="resolve"){u=this.opts.element.css("width");if(u.indexOf("%")>0){return u}return(this.opts.element.outerWidth(false)===0?"auto":this.opts.element.outerWidth(false)+"px")}return null}else{if(d.isFunction(this.opts.width)){return this.opts.width()}else{return this.opts.width}}}}}var o=p.call(this);if(o!==null){this.container.css("width",o)}}});X=l(n,{createContainer:function(){var o=d(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'>&nbsp;</span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow'><b></b></span>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>","   </div>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return o},enableInterface:function(){if(this.parent.enableInterface.apply(this,arguments)){this.focusser.prop("disabled",!this.isInterfaceEnabled())}},opening:function(){var q,p,o;if(this.opts.minimumResultsForSearch>=0){this.showSearch(true)}this.parent.opening.apply(this,arguments);if(this.showSearchInput!==false){this.search.val(this.focusser.val())}this.search.focus();q=this.search.get(0);if(q.createTextRange){p=q.createTextRange();p.collapse(false);p.select()}else{if(q.setSelectionRange){o=this.search.val().length;q.setSelectionRange(o,o)}}if(this.search.val()===""){if(this.nextSearchTerm!=M){this.search.val(this.nextSearchTerm);this.search.select()}}this.focusser.prop("disabled",true).val("");this.updateResults(true);this.opts.element.trigger(d.Event("select2-open"))},close:function(o){if(!this.opened()){return }this.parent.close.apply(this,arguments);o=o||{focus:true};this.focusser.removeAttr("disabled");if(o.focus){this.focusser.focus()}},focus:function(){if(this.opened()){this.close()}else{this.focusser.removeAttr("disabled");this.focusser.focus()}},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments);this.focusser.removeAttr("disabled");this.focusser.focus()},destroy:function(){d("label[for='"+this.focusser.attr("id")+"']").attr("for",this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments)},initContainer:function(){var p,o=this.container,q=this.dropdown;if(this.opts.minimumResultsForSearch<0){this.showSearch(false)}else{this.showSearch(true)}this.selection=p=o.find(".select2-choice");this.focusser=o.find(".select2-focusser");this.focusser.attr("id","s2id_autogen"+A());d("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id"));this.focusser.attr("tabindex",this.elementTabIndex);this.search.on("keydown",this.bind(function(r){if(!this.isInterfaceEnabled()){return }if(r.which===k.PAGE_UP||r.which===k.PAGE_DOWN){a(r);return }switch(r.which){case k.UP:case k.DOWN:this.moveHighlight((r.which===k.UP)?-1:1);a(r);return ;case k.ENTER:this.selectHighlighted();a(r);return ;case k.TAB:this.selectHighlighted({noFocus:true});return ;case k.ESC:this.cancel(r);a(r);return }}));this.search.on("blur",this.bind(function(r){if(document.activeElement===this.body().get(0)){window.setTimeout(this.bind(function(){this.search.focus()}),0)}}));this.focusser.on("keydown",this.bind(function(r){if(!this.isInterfaceEnabled()){return }if(r.which===k.TAB||k.isControl(r)||k.isFunctionKey(r)||r.which===k.ESC){return }if(this.opts.openOnEnter===false&&r.which===k.ENTER){a(r);return }if(r.which==k.DOWN||r.which==k.UP||(r.which==k.ENTER&&this.opts.openOnEnter)){if(r.altKey||r.ctrlKey||r.shiftKey||r.metaKey){return }this.open();a(r);return }if(r.which==k.DELETE||r.which==k.BACKSPACE){if(this.opts.allowClear){this.clear()}a(r);return }}));f(this.focusser);this.focusser.on("keyup-change input",this.bind(function(r){if(this.opts.minimumResultsForSearch>=0){r.stopPropagation();if(this.opened()){return }this.open()}}));p.on("mousedown","abbr",this.bind(function(r){if(!this.isInterfaceEnabled()){return }this.clear();B(r);this.close();this.selection.focus()}));p.on("mousedown",this.bind(function(r){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(d.Event("select2-focus"))}if(this.opened()){this.close()}else{if(this.isInterfaceEnabled()){this.open()}}a(r)}));q.on("mousedown",this.bind(function(){this.search.focus()}));p.on("focus",this.bind(function(r){a(r)}));this.focusser.on("focus",this.bind(function(){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(d.Event("select2-focus"))}this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){if(!this.opened()){this.container.removeClass("select2-container-active");this.opts.element.trigger(d.Event("select2-blur"))}}));this.search.on("focus",this.bind(function(){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(d.Event("select2-focus"))}this.container.addClass("select2-container-active")}));this.initContainerWidth();this.opts.element.addClass("select2-offscreen");this.setPlaceholder()},clear:function(q){var r=this.selection.data("select2-data");if(r){var p=d.Event("select2-clearing");this.opts.element.trigger(p);if(p.isDefaultPrevented()){return }var o=this.getPlaceholderOption();this.opts.element.val(o?o.val():"");this.selection.find(".select2-chosen").empty();this.selection.removeData("select2-data");this.setPlaceholder();if(q!==false){this.opts.element.trigger({type:"select2-removed",val:this.id(r),choice:r});this.triggerChange({removed:r})}}},initSelection:function(){var p;if(this.isPlaceholderOptionSelected()){this.updateSelection(null);this.close();this.setPlaceholder()}else{var o=this;this.opts.initSelection.call(null,this.opts.element,function(q){if(q!==M&&q!==null){o.updateSelection(q);o.close();o.setPlaceholder()}})}},isPlaceholderOptionSelected:function(){var o;if(!this.getPlaceholder()){return false}return((o=this.getPlaceholderOption())!==M&&o.prop("selected"))||(this.opts.element.val()==="")||(this.opts.element.val()===M)||(this.opts.element.val()===null)},prepareOpts:function(){var p=this.parent.prepareOpts.apply(this,arguments),o=this;if(p.element.get(0).tagName.toLowerCase()==="select"){p.initSelection=function(q,s){var r=q.find("option").filter(function(){return this.selected});s(o.optionToData(r))}}else{if("data" in p){p.initSelection=p.initSelection||function(r,t){var s=r.val();var q=null;p.query({matcher:function(u,x,v){var w=T(s,p.id(v));if(w){q=v}return w},callback:!d.isFunction(t)?d.noop:function(){t(q)}})}}}return p},getPlaceholder:function(){if(this.select){if(this.getPlaceholderOption()===M){return M}}return this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var o=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&o!==M){if(this.select&&this.getPlaceholderOption()===M){return }this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(o));this.selection.addClass("select2-default");this.container.removeClass("select2-allowclear")}},postprocessResults:function(t,p,s){var r=0,o=this,u=true;this.findHighlightableChoices().each2(function(v,w){if(T(o.id(w.data("select2-data")),o.opts.element.val())){r=v;return false}});if(s!==false){if(p===true&&r>=0){this.highlight(r)}else{this.highlight(0)}}if(p===true){var q=this.opts.minimumResultsForSearch;if(q>=0){this.showSearch(R(t.results)>=q)}}},showSearch:function(o){if(this.showSearchInput===o){return }this.showSearchInput=o;this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!o);this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!o);d(this.dropdown,this.container).toggleClass("select2-with-searchbox",o)},onSelect:function(q,p){if(!this.triggerSelect(q)){return }var o=this.opts.element.val(),r=this.data();this.opts.element.val(this.id(q));this.updateSelection(q);this.opts.element.trigger({type:"select2-selected",val:this.id(q),choice:q});this.nextSearchTerm=this.opts.nextSearchTerm(q,this.search.val());this.close();if(!p||!p.noFocus){this.focusser.focus()}if(!T(o,this.id(q))){this.triggerChange({added:q,removed:r})}},updateSelection:function(r){var p=this.selection.find(".select2-chosen"),q,o;this.selection.data("select2-data",r);p.empty();if(r!==null){q=this.opts.formatSelection(r,p,this.opts.escapeMarkup)}if(q!==M){p.append(q)}o=this.opts.formatSelectionCssClass(r,p);if(o!==M){p.addClass(o)}this.selection.removeClass("select2-default");if(this.opts.allowClear&&this.getPlaceholder()!==M){this.container.addClass("select2-allowclear")}},val:function(){var s,p=false,q=null,o=this,r=this.data();if(arguments.length===0){return this.opts.element.val()}s=arguments[0];if(arguments.length>1){p=arguments[1]}if(this.select){this.select.val(s).find("option").filter(function(){return this.selected}).each2(function(t,u){q=o.optionToData(u);return false});this.updateSelection(q);this.setPlaceholder();if(p){this.triggerChange({added:q,removed:r})}}else{if(!s&&s!==0){this.clear(p);return }if(this.opts.initSelection===M){throw new Error("cannot call val() if initSelection() is not defined")}this.opts.element.val(s);this.opts.initSelection(this.opts.element,function(t){o.opts.element.val(!t?"":o.id(t));o.updateSelection(t);o.setPlaceholder();if(p){o.triggerChange({added:t,removed:r})}})}},clearSearch:function(){this.search.val("");this.focusser.val("")},data:function(q){var p,o=false;if(arguments.length===0){p=this.selection.data("select2-data");if(p==M){p=null}return p}else{if(arguments.length>1){o=arguments[1]}if(!q){this.clear(o)}else{p=this.data();this.opts.element.val(!q?"":this.id(q));this.updateSelection(q);if(o){this.triggerChange({added:q,removed:p})}}}}});C=l(n,{createContainer:function(){var o=d(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>","  </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return o},prepareOpts:function(){var p=this.parent.prepareOpts.apply(this,arguments),o=this;if(p.element.get(0).tagName.toLowerCase()==="select"){p.initSelection=function(q,s){var r=[];q.find("option").filter(function(){return this.selected}).each2(function(t,u){r.push(o.optionToData(u))});s(r)}}else{if("data" in p){p.initSelection=p.initSelection||function(q,t){var r=I(q.val(),p.separator);var s=[];p.query({matcher:function(u,x,v){var w=d.grep(r,function(y){return T(y,p.id(v))}).length;if(w){s.push(v)}return w},callback:!d.isFunction(t)?d.noop:function(){var u=[];for(var x=0;x<r.length;x++){var y=r[x];for(var w=0;w<s.length;w++){var v=s[w];if(T(y,p.id(v))){u.push(v);s.splice(w,1);break}}}t(u)}})}}}return p},selectChoice:function(o){var p=this.container.find(".select2-search-choice-focus");if(p.length&&o&&o[0]==p[0]){}else{if(p.length){this.opts.element.trigger("choice-deselected",p)}p.removeClass("select2-search-choice-focus");if(o&&o.length){this.close();o.addClass("select2-search-choice-focus");this.opts.element.trigger("choice-selected",o)}}},destroy:function(){d("label[for='"+this.search.attr("id")+"']").attr("for",this.opts.element.attr("id"));this.parent.destroy.apply(this,arguments)},initContainer:function(){var o=".select2-choices",p;this.searchContainer=this.container.find(".select2-search-field");this.selection=p=this.container.find(o);var q=this;this.selection.on("click",".select2-search-choice:not(.select2-locked)",function(r){q.search[0].focus();q.selectChoice(d(this))});this.search.attr("id","s2id_autogen"+A());d("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id"));this.search.on("input paste",this.bind(function(){if(!this.isInterfaceEnabled()){return }if(!this.opened()){this.open()}}));this.search.attr("tabindex",this.elementTabIndex);this.keydowns=0;this.search.on("keydown",this.bind(function(v){if(!this.isInterfaceEnabled()){return }++this.keydowns;var t=p.find(".select2-search-choice-focus");var u=t.prev(".select2-search-choice:not(.select2-locked)");var s=t.next(".select2-search-choice:not(.select2-locked)");var w=F(this.search);if(t.length&&(v.which==k.LEFT||v.which==k.RIGHT||v.which==k.BACKSPACE||v.which==k.DELETE||v.which==k.ENTER)){var r=t;if(v.which==k.LEFT&&u.length){r=u}else{if(v.which==k.RIGHT){r=s.length?s:null}else{if(v.which===k.BACKSPACE){this.unselect(t.first());this.search.width(10);r=u.length?u:s}else{if(v.which==k.DELETE){this.unselect(t.first());this.search.width(10);r=s.length?s:null}else{if(v.which==k.ENTER){r=null}}}}}this.selectChoice(r);a(v);if(!r||!r.length){this.open()}return }else{if(((v.which===k.BACKSPACE&&this.keydowns==1)||v.which==k.LEFT)&&(w.offset==0&&!w.length)){this.selectChoice(p.find(".select2-search-choice:not(.select2-locked)").last());a(v);return }else{this.selectChoice(null)}}if(this.opened()){switch(v.which){case k.UP:case k.DOWN:this.moveHighlight((v.which===k.UP)?-1:1);a(v);return ;case k.ENTER:this.selectHighlighted();a(v);return ;case k.TAB:this.selectHighlighted({noFocus:true});this.close();return ;case k.ESC:this.cancel(v);a(v);return }}if(v.which===k.TAB||k.isControl(v)||k.isFunctionKey(v)||v.which===k.BACKSPACE||v.which===k.ESC){return }if(v.which===k.ENTER){if(this.opts.openOnEnter===false){return }else{if(v.altKey||v.ctrlKey||v.shiftKey||v.metaKey){return }}}this.open();if(v.which===k.PAGE_UP||v.which===k.PAGE_DOWN){a(v)}if(v.which===k.ENTER){a(v)}}));this.search.on("keyup",this.bind(function(r){this.keydowns=0;this.resizeSearch()}));this.search.on("blur",this.bind(function(r){this.container.removeClass("select2-container-active");this.search.removeClass("select2-focused");this.selectChoice(null);if(!this.opened()){this.clearSearch()}r.stopImmediatePropagation();this.opts.element.trigger(d.Event("select2-blur"))}));this.container.on("click",o,this.bind(function(r){if(!this.isInterfaceEnabled()){return }if(d(r.target).closest(".select2-search-choice").length>0){return }this.selectChoice(null);this.clearPlaceholder();if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(d.Event("select2-focus"))}this.open();this.focusSearch();r.preventDefault()}));this.container.on("focus",o,this.bind(function(){if(!this.isInterfaceEnabled()){return }if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(d.Event("select2-focus"))}this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active");this.clearPlaceholder()}));this.initContainerWidth();this.opts.element.addClass("select2-offscreen");this.clearSearch()},enableInterface:function(){if(this.parent.enableInterface.apply(this,arguments)){this.search.prop("disabled",!this.isInterfaceEnabled())}},initSelection:function(){var p;if(this.opts.element.val()===""&&this.opts.element.text()===""){this.updateSelection([]);this.close();this.clearSearch()}if(this.select||this.opts.element.val()!==""){var o=this;this.opts.initSelection.call(null,this.opts.element,function(q){if(q!==M&&q!==null){o.updateSelection(q);o.close();o.clearSearch()}})}},clearSearch:function(){var p=this.getPlaceholder(),o=this.getMaxSearchWidth();if(p!==M&&this.getVal().length===0&&this.search.hasClass("select2-focused")===false){this.search.val(p).addClass("select2-default");this.search.width(o>0?o:this.container.css("width"))}else{this.search.val("").width(10)}},clearPlaceholder:function(){if(this.search.hasClass("select2-default")){this.search.val("").removeClass("select2-default")}},opening:function(){this.clearPlaceholder();this.resizeSearch();this.parent.opening.apply(this,arguments);this.focusSearch();this.updateResults(true);this.search.focus();this.opts.element.trigger(d.Event("select2-open"))},close:function(){if(!this.opened()){return }this.parent.close.apply(this,arguments)},focus:function(){this.close();this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(r){var q=[],p=[],o=this;d(r).each(function(){if(Q(o.id(this),q)<0){q.push(o.id(this));p.push(this)}});r=p;this.selection.find(".select2-search-choice").remove();d(r).each(function(){o.addSelectedChoice(this)});o.postprocessResults()},tokenize:function(){var o=this.search.val();o=this.opts.tokenizer.call(this,o,this.data(),this.bind(this.onSelect),this.opts);if(o!=null&&o!=M){this.search.val(o);if(o.length>0){this.open()}}},onSelect:function(p,o){if(!this.triggerSelect(p)){return }this.addSelectedChoice(p);this.opts.element.trigger({type:"selected",val:this.id(p),choice:p});if(this.select||!this.opts.closeOnSelect){this.postprocessResults(p,false,this.opts.closeOnSelect===true)}if(this.opts.closeOnSelect){this.close();this.search.width(10)}else{if(this.countSelectableResults()>0){this.search.width(10);this.resizeSearch();if(this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()){this.updateResults(true)}this.positionDropdown()}else{this.close();this.search.width(10)}}this.triggerChange({added:p});if(!o||!o.noFocus){this.focusSearch()}},cancel:function(){this.close();this.focusSearch()},addSelectedChoice:function(s){var u=!s.locked,q=d("<li class='select2-search-choice'>    <div></div>    <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),v=d("<li class='select2-search-choice select2-locked'><div></div></li>");var r=u?q:v,o=this.id(s),p=this.getVal(),t,w;t=this.opts.formatSelection(s,r.find("div"),this.opts.escapeMarkup);if(t!=M){r.find("div").replaceWith("<div>"+t+"</div>")}w=this.opts.formatSelectionCssClass(s,r.find("div"));if(w!=M){r.addClass(w)}if(u){r.find(".select2-search-choice-close").on("mousedown",a).on("click dblclick",this.bind(function(x){if(!this.isInterfaceEnabled()){return }d(x.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(d(x.target));this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");this.close();this.focusSearch()})).dequeue();a(x)})).on("focus",this.bind(function(){if(!this.isInterfaceEnabled()){return }this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active")}))}r.data("select2-data",s);r.insertBefore(this.searchContainer);p.push(o);this.setVal(p)},unselect:function(q){var s=this.getVal(),r,p;q=q.closest(".select2-search-choice");if(q.length===0){throw"Invalid argument: "+q+". Must be .select2-search-choice"}r=q.data("select2-data");if(!r){return }while((p=Q(this.id(r),s))>=0){s.splice(p,1);this.setVal(s);if(this.select){this.postprocessResults()}}var o=d.Event("select2-removing");o.val=this.id(r);o.choice=r;this.opts.element.trigger(o);if(o.isDefaultPrevented()){return }q.remove();this.opts.element.trigger({type:"select2-removed",val:this.id(r),choice:r});this.triggerChange({removed:r})},postprocessResults:function(s,p,r){var t=this.getVal(),u=this.results.find(".select2-result"),q=this.results.find(".select2-result-with-children"),o=this;u.each2(function(w,v){var x=o.id(v.data("select2-data"));if(Q(x,t)>=0){v.addClass("select2-selected");v.find(".select2-result-selectable").addClass("select2-selected")}});q.each2(function(w,v){if(!v.is(".select2-result-selectable")&&v.find(".select2-result-selectable:not(.select2-selected)").length===0){v.addClass("select2-selected")}});if(this.highlight()==-1&&r!==false){o.highlight(0)}if(!this.opts.createSearchChoice&&!u.filter(".select2-result:not(.select2-selected)").length>0){if(!s||s&&!s.more&&this.results.find(".select2-no-results").length===0){if(Y(o.opts.formatNoMatches,"formatNoMatches")){this.results.append("<li class='select2-no-results'>"+o.opts.formatNoMatches(o.search.val())+"</li>")}}}},getMaxSearchWidth:function(){return this.selection.width()-H(this.search)},resizeSearch:function(){var t,r,q,o,p,s=H(this.search);t=N(this.search)+10;r=this.search.offset().left;q=this.selection.width();o=this.selection.offset().left;p=q-(r-o)-s;if(p<t){p=q-s}if(p<40){p=q-s}if(p<=0){p=t}this.search.width(Math.floor(p))},getVal:function(){var o;if(this.select){o=this.select.val();return o===null?[]:o}else{o=this.opts.element.val();return I(o,this.opts.separator)}},setVal:function(p){var o;if(this.select){this.select.val(p)}else{o=[];d(p).each(function(){if(Q(this,o)<0){o.push(this)}});this.opts.element.val(o.length===0?"":o.join(this.opts.separator))}},buildChangeDetails:function(o,r){var r=r.slice(0),o=o.slice(0);for(var q=0;q<r.length;q++){for(var p=0;p<o.length;p++){if(T(this.opts.id(r[q]),this.opts.id(o[p]))){r.splice(q,1);if(q>0){q--}o.splice(p,1);p--}}}return{added:r,removed:o}},val:function(r,p){var q,o=this;if(arguments.length===0){return this.getVal()}q=this.data();if(!q.length){q=[]}if(!r&&r!==0){this.opts.element.val("");this.updateSelection([]);this.clearSearch();if(p){this.triggerChange({added:this.data(),removed:q})}return }this.setVal(r);if(this.select){this.opts.initSelection(this.select,this.bind(this.updateSelection));if(p){this.triggerChange(this.buildChangeDetails(q,this.data()))}}else{if(this.opts.initSelection===M){throw new Error("val() cannot be called if initSelection() is not defined")}this.opts.initSelection(this.opts.element,function(t){var s=d.map(t,o.id);o.setVal(s);o.updateSelection(t);o.clearSearch();if(p){o.triggerChange(o.buildChangeDetails(q,o.data()))}})}this.clearSearch()},onSortStart:function(){if(this.select){throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.")}this.search.width(0);this.searchContainer.hide()},onSortEnd:function(){var p=[],o=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();this.selection.find(".select2-search-choice").each(function(){p.push(o.opts.id(d(this).data("select2-data")))});this.setVal(p);this.triggerChange()},data:function(q,r){var p=this,s,o;if(arguments.length===0){return this.selection.find(".select2-search-choice").map(function(){return d(this).data("select2-data")}).get()}else{o=this.data();if(!q){q=[]}s=d.map(q,function(t){return p.opts.id(t)});this.setVal(s);this.updateSelection(q);this.clearSearch();if(r){this.triggerChange(this.buildChangeDetails(o,this.data()))}}}});d.fn.select2=function(){var t=Array.prototype.slice.call(arguments,0),p,s,o,v,x,w=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","disable","readonly","positionDropdown","data","search"],u=["opened","isFocused","container","dropdown"],q=["val","data"],r={search:"externalSearch"};this.each(function(){if(t.length===0||typeof (t[0])==="object"){p=t.length===0?{}:d.extend({},t[0]);p.element=d(this);if(p.element.get(0).tagName.toLowerCase()==="select"){x=p.element.prop("multiple")}else{x=p.multiple||false;if("tags" in p){p.multiple=x=true}}s=x?new C():new X();s.init(p)}else{if(typeof (t[0])==="string"){if(Q(t[0],w)<0){throw"Unknown method: "+t[0]}v=M;s=d(this).data("select2");if(s===M){return }o=t[0];if(o==="container"){v=s.container}else{if(o==="dropdown"){v=s.dropdown}else{if(r[o]){o=r[o]}v=s[o].apply(s,t.slice(1))}}if(Q(t[0],u)>=0||(Q(t[0],q)&&t.length==1)){return false}}else{throw"Invalid arguments to select2 plugin: "+t}}});return(v===M)?this:v};d.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:true,openOnEnter:true,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(p,q,s,o){var r=[];U(p.text,s.term,r,o);return r.join("")},formatSelection:function(q,p,o){return q?o(q.text):M},sortResults:function(p,o,q){return p},formatResultCssClass:function(o){return M},formatSelectionCssClass:function(p,o){return M},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(o,p){var q=p-o.length;return"Please enter "+q+" more character"+(q==1?"":"s")},formatInputTooLong:function(p,o){var q=p.length-o;return"Please delete "+q+" character"+(q==1?"":"s")},formatSelectionTooBig:function(o){return"You can only select "+o+" item"+(o==1?"":"s")},formatLoadMore:function(o){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(o){return o.id},matcher:function(o,p){return E(""+p).toUpperCase().indexOf(E(""+o).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:G,escapeMarkup:g,blurOnChange:false,selectOnBlur:false,adaptContainerCssClass:function(o){return o},adaptDropdownCssClass:function(o){return null},nextSearchTerm:function(o,p){return M}};d.fn.select2.ajaxDefaults={transport:d.ajax,params:{type:"GET",cache:false,dataType:"json"}};window.Select2={query:{ajax:e,local:h,tags:Z},util:{debounce:K,markMatch:U,escapeMarkup:g,stripDiacritics:E},"class":{"abstract":n,single:X,multi:C}}}(jQuery));;
;/* module-key = 'com.atlassian.auiplugin:aui-select2', location = 'js/aui-select2.js' */
(function(C){var E=C.fn.select2;var D="aui-select2-container";var B="aui-select2-drop aui-dropdown2 aui-style-default";var A="aui-has-avatar";C.fn.auiSelect2=function(I){var H;if(C.isPlainObject(I)){var F=C.extend({},I);var G=F.hasAvatar?" "+A:"";F.containerCssClass=D+G+(F.containerCssClass?" "+F.containerCssClass:"");F.dropdownCssClass=B+G+(F.dropdownCssClass?" "+F.dropdownCssClass:"");H=Array.prototype.slice.call(arguments,1);H.unshift(F)}else{if(!arguments.length){H=[{containerCssClass:D,dropdownCssClass:B}]}else{H=arguments}}return E.apply(this,H)}})(AJS.$);;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:searchable-multi-selector', location = '/static/widget/searchable-multi-selector/searchable-multi-selector.js' */
define("widget/searchable-multi-selector",["aui","jquery","lodash","util/ajax","util/events","util/function","util/promise"],function(L,H,M,K,N,J,D){function B(Q,P){this._$field=Q;P=this._options=H.extend(true,{},this.defaults,P);if(!(P.dataSource)){if(P.url){P.dataSource=new E(P.url,P.urlParams)}else{throw"either a dataSource or url must be supplied"}}P.dataSource=new G(P.dataSource,P.debounceInterval);if(!(M.isFunction(P.selectionTemplate))){throw"a selectionTemplate must be a function"}if(!(M.isFunction(P.resultTemplate))){throw"a resultTemplate must be a function"}this._selectedItems=[];this._initialItems=[];this._excludedIds=M.map(P.excludedItems,P.generateId);I(this);this.setSelectedItems(P.initialItems.slice(0))}H.extend(true,B.prototype,N.createEventMixin("stash.widget.searchable.multi.selector"),{defaults:{minimumInputLength:1,extraClasses:null,dropdownClasses:null,debounceInterval:300,initialItems:[],excludedItems:[],urlParams:{},hasAvatar:false,inputTooShortTemplate:function(){return L.escapeHtml("Start typing to search")},noMatchesTemplate:function(){return L.escapeHtml("No matches found")},generateId:function(P){return P.id||P.name},generateText:function(P){return P.displayName||P.name},prepareSearchTerm:M.identity},getSelectedItems:function(){return M.pluck(this._selectedItems,"item")},setSelectedItems:function(P){this._initialItems=P.slice(0);this._$field.auiSelect2("val",M.map(P,this._options.generateId))},clearSelectedItems:function(){this.setSelectedItems([])}});function E(Q,P){this._url=Q;this._urlParams=P;this.clear();this._pageReceived=M.bind(this._pageReceived,this)}E.prototype.clear=function(){this._nextPageStart=0};E.prototype.nextPage=function(P){return K.rest({url:this._url,data:H.extend({},this._urlParams,{start:this._nextPageStart,filter:P})}).done(this._pageReceived)};E.prototype._pageReceived=function(P){this._nextPageStart=P.nextPageStart||(P.start+P.size)};B.PagedDataSource=E;function G(P,Q){this.clear=M.bind(P.clear,P);this.nextPage=D.delay(M.bind(P.nextPage,P),Q)}function A(P){var Q=H(".select2-drop-active > .select2-results");if(!Q.length){return }if(Q.children(".select2-result-selectable").length===0&&Q.children(".select2-disabled").length){H('<li class="select2-no-results"></li>').html(P._options.noMatchesTemplate()).appendTo(Q)}}function C(P,Q){return{id:P.generateId(Q),text:P.generateText(Q),item:Q}}function O(Q,P){return M.reject(Q,function(R){return(R.id===P.id)})}function F(P){P&&P.abort&&P.abort()}function I(Q){var R=Q._options;var S=Q._$field;var T=Q._excludedIds;var U=M.bind(C,null,R);var P=[];S.auiSelect2({hasAvatar:R.hasAvatar,query:function(W){if(W.page<=1){R.dataSource.clear();M.forEach(P,F);P=[]}var V=R.prepareSearchTerm(H.trim(W.term));var X=R.dataSource.nextPage(V);X=X.then(function(Y){return{results:M.chain(Y.values).map(U).filter(function(Z){return M.indexOf(T,Z.id)===-1}).value(),more:!(Y.isLastPage)}}).promise(X);P.push(X);X.always(function(){P=M.reject(P,J.eq(X))}).done(W.callback)},formatSelection:function(V){return R.selectionTemplate(V.item)},formatResult:function(V){return R.resultTemplate(V.item)},initSelection:function(W,X){var V=M.map(Q._initialItems,U);Q._selectedItems=V;X(V)},separator:"|!|",multiple:true,minimumInputLength:R.minimumInputLength,formatInputTooShort:R.inputTooShortTemplate,formatNoMatches:R.noMatchesTemplate,containerCssClass:["searchable-multi-selector",R.extraClasses].join(" "),dropdownCssClass:["searchable-multi-selector-dropdown",R.dropdownClasses].join(" "),openOnEnter:false}).on("change",function(V){if(V.removed){Q._selectedItems=O(Q._selectedItems,V.removed)}if(V.added){Q._selectedItems.push(V.added)}Q.trigger("change")}).on("open",M.bind(A,null,this))}return B});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:user-multi-selector', location = '/static/feature/user/user-multi-selector/user-multi-selector.js' */
define("feature/user/user-multi-selector",["aui","jquery","stash/api/util/navbuilder","widget/searchable-multi-selector"],function(B,E,G,F){function A(I,H){F.call(this,I,H)}E.extend(true,A.prototype,F.prototype,{defaults:{hasAvatar:true,url:G.rest().users().build(),selectionTemplate:function(H){return stash.widget.avatarWithName({size:"xsmall",person:H})},urlParams:{avatarSize:stash.widget.avatarSizeInPx({size:"xsmall"})},resultTemplate:function(H){return stash.widget.avatarWithNameAndEmail({size:"small",person:H})},generateId:function(H){return H.name},inputTooShortTemplate:function D(){return B.escapeHtml("Start typing to search for users")},noMatchesTemplate:function C(){return B.escapeHtml("No matching users found")},prepareSearchTerm:function(H){return H.replace(/^@/,"")}}});return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:group-multi-selector', location = '/static/feature/user/group-multi-selector/group-multi-selector.js' */
define("feature/user/group-multi-selector",["aui","jquery","stash/api/util/navbuilder","widget/searchable-multi-selector"],function(A,F,H,G){function E(I){return typeof I==="string"?I:I.name}function D(J,I){G.call(this,J,I)}F.extend(true,D.prototype,G.prototype,{defaults:{hasAvatar:true,url:H.rest().groups().build(),selectionTemplate:function(I){return stash.widget.groupAvatarWithName({size:"xsmall",name:E(I)})},resultTemplate:function(I){return stash.widget.groupAvatarWithName({size:"small",name:E(I)})},generateId:E,generateText:E,inputTooShortTemplate:function C(){return A.escapeHtml("Start typing to search for groups")},noMatchesTemplate:function B(){return A.escapeHtml("No matching groups found")}}});return D});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:permission-multi-selector', location = '/static/feature/permission/multi-selector/multi-selector.soy' */
// This file was automatically generated from multi-selector.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.permission.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.permission == 'undefined') { stash.feature.permission = {}; }


stash.feature.permission.multiSelector = function(opt_data, opt_ignored) {
  var output = '<tr class="permission-multi-selector-container"><th colspan="' + soy.$$escapeHtml(opt_data.colspan) + '">';
  var param9 = '' + aui.group.item({content: '<label class="assistive" for="' + soy.$$escapeHtml(opt_data.id) + '-search-input">' + soy.$$escapeHtml(opt_data.placeholderText) + '</label><input type="text" id="' + soy.$$escapeHtml(opt_data.id) + '-search-input" class="permission-multi-selector' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + '" placeholder="' + soy.$$escapeHtml(opt_data.placeholderText) + '"/>'});
  var param26 = '' + aui.dropdown2.trigger({tagName: 'button', text: opt_data.permissionDataList[opt_data.permissionDataList.length - 1].i18nName, extraClasses: 'aui-button permission-type-trigger', menu: {id: opt_data.id + '-permission-type'}});
  var param34 = '<ul>';
  var permissionDataList36 = opt_data.permissionDataList.reverse();
  var permissionDataListLen36 = permissionDataList36.length;
  for (var permissionDataIndex36 = 0; permissionDataIndex36 < permissionDataListLen36; permissionDataIndex36++) {
    var permissionDataData36 = permissionDataList36[permissionDataIndex36];
    param34 += '<li data-value="' + soy.$$escapeHtml(permissionDataData36.permission) + '"><a href="#">' + soy.$$escapeHtml(permissionDataData36.i18nName) + '</a></li>';
  }
  param34 += '</ul>';
  param26 += aui.dropdown2.contents({id: opt_data.id + '-permission-type', extraClasses: 'aui-style-default permission-type-dropdown', content: param34});
  param26 += aui.buttons.button({extraClasses: 'add-button', text: "Add"});
  param9 += aui.group.item({content: param26});
  var param7 = '' + aui.group.group({extraClasses: 'aui-group-split', content: param9});
  output += aui.form.form({action: '', content: param7});
  output += '</th></tr>';
  return output;
};
if (goog.DEBUG) {
  stash.feature.permission.multiSelector.soyTemplateName = 'stash.feature.permission.multiSelector';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:permission-multi-selector', location = '/static/feature/permission/multi-selector/multi-selector.js' */
define("feature/permission/multi-selector",["aui","backbone-brace","jquery","lodash","feature/user/group-multi-selector","feature/user/user-multi-selector"],function(H,G,C,I,D,B){var A={user:B,group:D};function F(J,K){return function(){return I.pluck(J(),K)}}var E=G.View.extend({events:{"click .add-button":"_onClickAdd"},initialize:function(L){var K=this.$el.find(".permission-multi-selector");this._$addButton=this.$el.find(".add-button");var J=A[L.entityType];if(!J){throw"Unknown entity type: "+L.entityType}this._delegate=new J(K,{dataSource:L.dataSource});if(!(I.isFunction(L.add))){throw"must provide an add function"}var M=this.$el.find(".permission-type-dropdown");M.on("click","a",I.bind(this._onSelectPermission,this));this._permission=M.find("li:first-child").attr("data-value");this._delegate.on("change",I.bind(this._onChangeEntitySelection,this));this._onChangeEntitySelection();this.$el.on("keydown",I.bind(function(N){if(N.which===H.keyCode.ENTER&&N.target.tagName==="INPUT"&&this.getSelected().length){N.preventDefault();this._addSelected()}},this))},getSelected:function(){return this._delegate.getSelectedItems()},getPermission:function(){return this._permission},showError:function(K){this.clearError();var J=this._$errors=C("<div></div>");var L=K&&K.errors&&K.errors.length?K.errors:[{message:"An unexpected error occurred. Consult your system logs for more information."}];I.forEach(L,function(M){C('<p class="error-message"></p>').text(M.message).appendTo(J)});J.appendTo(this.$el.children("th"))},clearError:function(){if(this._$errors){this._$errors.remove();this._$errors=null}},clear:function(){this.clearError();this._delegate.clearSelectedItems();this._setAddButtonDisabled(true)},_addSelected:function(){this._setAddButtonDisabled(true);C.when(this.options.add({entities:this.getSelected(),permission:this.getPermission()})).always(I.bind(this._setAddButtonDisabled,this,false)).done(I.bind(this.clear,this)).fail(I.bind(function(M,L,K,J){this.showError(J)},this))},_setAddButtonDisabled:function(J){this._$addButton.toggleClass("disabled",J).prop("disabled",J)},_onClickAdd:function(J){J.preventDefault();this._addSelected()},_onSelectPermission:function(K){K.preventDefault();var J=C(K.target);this._permission=J.closest("li").attr("data-value");this.$el.find(".permission-type-trigger").text(J.text())},_onChangeEntitySelection:function(){this._setAddButtonDisabled(!(this.getSelected().length))}});return E});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:user-link', location = '/static/widget/user/user-link.soy' */
// This file was automatically generated from user-link.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.userLink = function(opt_data, opt_ignored) {
  var output = '';
  var displayName__soy3 = opt_data.user.displayName || opt_data.user.name;
  output += (opt_data.href || opt_data.user.type == 'NORMAL' && opt_data.user.slug && !!(require('model/page-state').getCurrentUser())) ? '<a href="' + soy.$$escapeHtml(opt_data.href ? opt_data.href : require('stash/api/util/navbuilder').user(opt_data.user.slug).build()) + '" ' + ((opt_data.extraClasses) ? 'class="' + soy.$$escapeHtml(opt_data.extraClasses) + '"' : '') + ((! opt_data.skipTitle) ? 'title="' + soy.$$escapeHtml(displayName__soy3) + '"' : '') + '>' + soy.$$escapeHtml(soy.$$truncate(displayName__soy3, 100, true)) + '</a>' : '<span' + ((opt_data.extraClasses) ? ' class="' + soy.$$escapeHtml(opt_data.extraClasses) + '"' : '') + ((! opt_data.skipTitle) ? ' title="' + soy.$$escapeHtml(displayName__soy3) + '"' : '') + '>' + soy.$$escapeHtml(soy.$$truncate(displayName__soy3, 100, true)) + '</span>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.userLink.soyTemplateName = 'stash.widget.userLink';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:avatar', location = '/static/widget/avatar/avatar.soy' */
// This file was automatically generated from avatar.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.avatar = function(opt_data, opt_ignored) {
  return '' + aui.avatar.avatar({size: opt_data.size, avatarImageUrl: require('stash/api/util/navbuilder')._avatarUrl(opt_data.person, ({XSMALL:32,SMALL:48,MEDIUM:64,LARGE:96,XLARGE:128,XXLARGE:192,XXXLARGE:256})[opt_data.size.toUpperCase()]).build(), accessibilityText: opt_data.person.displayName || opt_data.person.name, title: opt_data.tooltip, badgeContent: opt_data.badgeContent, extraClasses: 'user-avatar' + (opt_data.hideBadge ? ' badge-hidden' : '') + (opt_data.extraClasses ? ' ' + opt_data.extraClasses : ''), imageClasses: opt_data.imageClasses, extraAttributes: {'data-username': opt_data.person.name}, id: opt_data.id});
};
if (goog.DEBUG) {
  stash.widget.avatar.soyTemplateName = 'stash.widget.avatar';
}


stash.widget.avatarWithName = function(opt_data, opt_ignored) {
  var output = '';
  var personName__soy14 = opt_data.person.displayName || opt_data.person.name;
  output += '<div class="avatar-with-name' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + '" title="' + soy.$$escapeHtml(personName__soy14) + '">' + stash.widget.avatar({size: opt_data.size, person: opt_data.person, imageClasses: opt_data.imageClasses, extraClasses: opt_data.avatarClasses, badgeContent: opt_data.badgeContent, hideBadge: opt_data.hideBadge, id: opt_data.id}) + ((opt_data.link) ? stash.widget.userLink({user: opt_data.person, href: opt_data.href, extraClasses: opt_data.linkExtraClasses, skipTitle: true}) : soy.$$escapeHtml(personName__soy14)) + '</div>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.avatarWithName.soyTemplateName = 'stash.widget.avatarWithName';
}


stash.widget.avatarWithNameAndEmail = function(opt_data, opt_ignored) {
  return stash.widget.avatarWithName(opt_data) + '<span class="email-address" title="' + soy.$$escapeHtml(opt_data.person.emailAddress) + '">' + soy.$$escapeHtml(opt_data.person.emailAddress) + '</span>';
};
if (goog.DEBUG) {
  stash.widget.avatarWithNameAndEmail.soyTemplateName = 'stash.widget.avatarWithNameAndEmail';
}


stash.widget.avatarSizeInPx = function(opt_data, opt_ignored) {
  return '' + soy.$$escapeHtml(({XSMALL:32,SMALL:48,MEDIUM:64,LARGE:96,XLARGE:128,XXLARGE:192,XXXLARGE:256})[opt_data.size.toUpperCase()]) + ((opt_data.showPx) ? 'px' : '');
};
if (goog.DEBUG) {
  stash.widget.avatarSizeInPx.soyTemplateName = 'stash.widget.avatarSizeInPx';
}


stash.widget.avatarWithBadge = function(opt_data, opt_ignored) {
  return '' + stash.widget.avatar({size: opt_data.size, person: opt_data.person, tooltip: opt_data.tooltip, imageClasses: opt_data.imageClasses, extraClasses: opt_data.extraClasses, id: opt_data.id, hideBadge: opt_data.hideBadge, badgeContent: '<span class="badge' + soy.$$escapeHtml(opt_data.badgeClasses ? ' ' + opt_data.badgeClasses : '') + '">' + soy.$$escapeHtml(opt_data.badgeText) + '</span>'});
};
if (goog.DEBUG) {
  stash.widget.avatarWithBadge.soyTemplateName = 'stash.widget.avatarWithBadge';
}


stash.widget.avatarWithNameAndBadge = function(opt_data, opt_ignored) {
  return '' + stash.widget.avatarWithName({size: opt_data.size, person: opt_data.person, extraClasses: opt_data.extraClasses, avatarClasses: opt_data.avatarClasses, imageClasses: opt_data.imageClasses, id: opt_data.id, hideBadge: opt_data.hideBadge, badgeContent: '<span class="badge' + soy.$$escapeHtml(opt_data.badgeClasses ? ' ' + opt_data.badgeClasses : '') + '">' + soy.$$escapeHtml(opt_data.badgeText) + '</span>'});
};
if (goog.DEBUG) {
  stash.widget.avatarWithNameAndBadge.soyTemplateName = 'stash.widget.avatarWithNameAndBadge';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:avatar', location = '/static/widget/avatar/group-avatar.soy' */
// This file was automatically generated from group-avatar.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.groupAvatar = function(opt_data, opt_ignored) {
  return '<span class="aui-avatar aui-avatar-' + soy.$$escapeHtml(opt_data.size) + ' group-avatar' + soy.$$escapeHtml(opt_data.extraClasses ? ' ' + opt_data.extraClasses : '') + '" data-groupname="' + soy.$$escapeHtml(opt_data.name) + '"></span>';
};
if (goog.DEBUG) {
  stash.widget.groupAvatar.soyTemplateName = 'stash.widget.groupAvatar';
}


stash.widget.groupAvatarWithName = function(opt_data, opt_ignored) {
  return '<span title="' + soy.$$escapeHtml(opt_data.name) + '"' + ((opt_data.extraClasses) ? ' class="' + soy.$$escapeHtml(opt_data.extraClasses) + '"' : '') + '><span class="aui-avatar aui-avatar-' + soy.$$escapeHtml(opt_data.size) + ' group-avatar' + soy.$$escapeHtml(opt_data.avatarClasses ? ' ' + opt_data.avatarClasses : '') + '" data-groupname="' + soy.$$escapeHtml(opt_data.name) + '"></span>' + soy.$$escapeHtml(opt_data.name) + '</span>';
};
if (goog.DEBUG) {
  stash.widget.groupAvatarWithName.soyTemplateName = 'stash.widget.groupAvatarWithName';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:warn-before-unload', location = '/static/util/warn-before-unload.js' */
define("util/warn-before-unload",["aui"],function(A){function B(G,F){var E=false;F=F||"You made changes that have not yet reached Stash. If you leave this page, those changes will be lost.";var D=window.onbeforeunload;var C=function(){var H=D?D.apply(this,arguments):undefined;return E?H:F};window.onbeforeunload=C;G.always(function(){E=true;if(window.onbeforeunload===C){window.onbeforeunload=D}})}return B});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:permission-flag', location = '/static/feature/permission/permission-flag/permission-flag.soy' */
// This file was automatically generated from permission-flag.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.permission.flag.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.permission == 'undefined') { stash.feature.permission = {}; }
if (typeof stash.feature.permission.flag == 'undefined') { stash.feature.permission.flag = {}; }


stash.feature.permission.flag.added = function(opt_data, opt_ignored) {
  var output = '';
  switch (opt_data.entityType) {
    case 'user':
      output += (opt_data.count == 1) ? soy.$$escapeHtml(soydata.VERY_UNSAFE.ordainSanitizedHtml(AJS.format("\x3cstrong\x3e{0}\x3c/strong\x3e has been added.",typeof (opt_data.name) === 'number' ? opt_data.name : soy.$$escapeHtml(opt_data.name)))) : soy.$$escapeHtml(soydata.VERY_UNSAFE.ordainSanitizedHtml(AJS.format("\x3cstrong\x3e{0} users\x3c/strong\x3e have been added.",typeof (opt_data.count) === 'number' ? opt_data.count : soy.$$escapeHtml(opt_data.count))));
      break;
    case 'group':
      output += (opt_data.count == 1) ? soy.$$escapeHtml(soydata.VERY_UNSAFE.ordainSanitizedHtml(AJS.format("\x3cstrong\x3e{0}\x3c/strong\x3e has been added.",typeof (opt_data.name) === 'number' ? opt_data.name : soy.$$escapeHtml(opt_data.name)))) : soy.$$escapeHtml(soydata.VERY_UNSAFE.ordainSanitizedHtml(AJS.format("\x3cstrong\x3e{0} groups\x3c/strong\x3e have been added.",typeof (opt_data.count) === 'number' ? opt_data.count : soy.$$escapeHtml(opt_data.count))));
      break;
  }
  return output;
};
if (goog.DEBUG) {
  stash.feature.permission.flag.added.soyTemplateName = 'stash.feature.permission.flag.added';
}


stash.feature.permission.flag.deleted = function(opt_data, opt_ignored) {
  return '' + ((opt_data.entityType == 'user') ? soy.$$escapeHtml(soydata.VERY_UNSAFE.ordainSanitizedHtml(AJS.format("\x3cstrong\x3e{0}\x3c/strong\x3e has been removed.",typeof (opt_data.name) === 'number' ? opt_data.name : soy.$$escapeHtml(opt_data.name)))) : (opt_data.entityType == 'group') ? soy.$$escapeHtml(soydata.VERY_UNSAFE.ordainSanitizedHtml(AJS.format("\x3cstrong\x3e{0}\x3c/strong\x3e has been removed.",typeof (opt_data.name) === 'number' ? opt_data.name : soy.$$escapeHtml(opt_data.name)))) : '');
};
if (goog.DEBUG) {
  stash.feature.permission.flag.deleted.soyTemplateName = 'stash.feature.permission.flag.deleted';
}
;
;/* module-key = 'com.atlassian.auiplugin:aui-flag', location = '/js/aui/flag.js' */
(function(A){define("aui/flag",[],function(){return A(AJS,AJS.$,AJS.template)})})(function(L,F,N){var O=5000;var A="aui-flag-container";var E={body:"",persistent:false,close:"",title:"",type:"info"};function J(R){if(R.hasOwnProperty("persistent")){var P;if(R.persistent){P=L.deprecate.getMessageLogger("persistent: true","5.8.0",{alternativeName:"close: never",extraInfo:"See https://ecosystem.atlassian.net/browse/AUI-2893."})}else{if(!R.persistent){P=L.deprecate.getMessageLogger("persistent: false","5.8.0",{alternativeName:"close: manual",extraInfo:"See https://ecosystem.atlassian.net/browse/AUI-2893."})}}P()}R=F.extend({},E,R);var Q=R.close!=="never"&&(R.close||(R.persistent!==true));var S=D(R,Q);G(S);if(R.close==="auto"){M(S);C(S)}else{if(R.close==="manual"){M(S)}else{if(R.close==="never"){}else{if(!R.persistent){M(S)}}}}H();return K(S)}function G(Q){var P=Q[0];P.close=function(){B(Q)}}function D(Q,P){var R='<div class="aui-flag"><div class="aui-message aui-message-{type} {type} {closeable} shadowed"><p class="title"><strong>{title}</strong></p>{body}<!-- .aui-message --></div></div>';var S=N(R).fill({"body:html":Q.body||"",closeable:P?"closeable":"",title:Q.title||"",type:Q.type}).toString();return F(S)}function M(Q){var P=F('<span class="aui-icon icon-close" role="button" tabindex="0"></span>');P.click(function(){B(Q)});P.keypress(function(R){if((R.which===L.keyCode.ENTER)||(R.which===L.keyCode.SPACE)){B(Q);R.preventDefault()}});return Q.find(".aui-message").append(P)[0]}function C(P){P.find(".aui-message").addClass("aui-will-close");setTimeout(function(){P[0].close()},O)}function B(Q){var P=Q.get(0);P.setAttribute("aria-hidden","true");P.dispatchEvent(new CustomEvent("aui-flag-close",{bubbles:true}));return P}function H(){var Q=I();var P=Q.find(".aui-flag");P.get().forEach(function(R){var S=R.getAttribute("aria-hidden")==="true";if(S){F(R).remove()}})}function I(){return F("#"+A)}function K(Q){var P=I();if(!P.length){P=F('<div id="'+A+'"></div>');F("body").prepend(P)}Q.appendTo(P);L._internal.animation.recomputeStyle(Q);return Q.attr("aria-hidden","false")[0]}return J});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:permission-table', location = '/static/feature/permission/permission-table/permission-table.soy' */
// This file was automatically generated from permission-table.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.permission.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.permission == 'undefined') { stash.feature.permission = {}; }


stash.feature.permission.permissionTable = function(opt_data, opt_ignored) {
  var output = '<h3>' + soy.$$escapeHtml(opt_data.entityTitleText) + '</h3>';
  var param8 = '<tr><th class="name-column" scope="col">' + soy.$$escapeHtml("Name") + '</th>';
  var permissionDataList12 = opt_data.permissionDataList;
  var permissionDataListLen12 = permissionDataList12.length;
  for (var permissionDataIndex12 = 0; permissionDataIndex12 < permissionDataListLen12; permissionDataIndex12++) {
    var permissionDataData12 = permissionDataList12[permissionDataIndex12];
    param8 += '<th class="permission-column" title="' + soy.$$escapeHtml(permissionDataData12.i18nName) + '" scope="col">' + soy.$$escapeHtml(permissionDataData12.i18nName) + ((permissionDataData12.i18nDescription) ? aui.icons.icon({icon: 'help', useIconFont: true}) + '<span class="permission-column-desc">' + soy.$$escapeHtml(permissionDataData12.i18nDescription) + '</span>' : '') + '</th>';
  }
  param8 += '<th class="remove-permissions-column" scope="col"></th></tr>' + stash.feature.permission.multiSelector({id: opt_data.id, colspan: opt_data.permissionDataList.length + 2, extraClasses: opt_data.addButtonClass, placeholderText: opt_data.addEntityText, permissionDataList: opt_data.grantablePermissionDataList ? opt_data.grantablePermissionDataList : opt_data.permissionDataList});
  output += widget.aui.table({extraClasses: 'permissions-table', id: opt_data.id, theadContent: param8, content: '', tfootContent: '<tr class="no-results-row"><td colspan="' + soy.$$escapeHtml(opt_data.permissionDataList.length + 2) + '"><div>' + soy.$$escapeHtml(opt_data.noResultsText) + '</div></td></tr><tr class="load-more-row"><td colspan="' + soy.$$escapeHtml(opt_data.permissionDataList.length + 2) + '"><a href="#" class="load-more">' + soy.$$escapeHtml("Load more") + '</a></td></tr>'});
  return output;
};
if (goog.DEBUG) {
  stash.feature.permission.permissionTable.soyTemplateName = 'stash.feature.permission.permissionTable';
}


stash.feature.permission.userPermissionTable = function(opt_data, opt_ignored) {
  return '' + stash.feature.permission.permissionTable({id: 'user-permissions-table', permissionDataList: opt_data.permissionDataList, grantablePermissionDataList: opt_data.grantablePermissionDataList, entityTitleText: "User access", addEntityText: "Add Users", addButtonClass: 'add-user', noResultsText: opt_data.noResultsText});
};
if (goog.DEBUG) {
  stash.feature.permission.userPermissionTable.soyTemplateName = 'stash.feature.permission.userPermissionTable';
}


stash.feature.permission.groupPermissionTable = function(opt_data, opt_ignored) {
  return '' + stash.feature.permission.permissionTable({id: 'group-permissions-table', permissionDataList: opt_data.permissionDataList, grantablePermissionDataList: opt_data.grantablePermissionDataList, entityTitleText: "Group access", addEntityText: "Add Groups", addButtonClass: 'add-group', noResultsText: opt_data.noResultsText});
};
if (goog.DEBUG) {
  stash.feature.permission.groupPermissionTable.soyTemplateName = 'stash.feature.permission.groupPermissionTable';
}


stash.feature.permission.userPermissionRow = function(opt_data, opt_ignored) {
  return '<tr data-entity-id="' + soy.$$escapeHtml(opt_data.entity.name) + '" ' + ((opt_data.tooltip) ? 'title="' + soy.$$escapeHtml(opt_data.tooltip) + '"' : '') + '><td><div class="permissions-item">' + stash.widget.avatar({size: 'small', person: opt_data.entity}) + ((opt_data.linkToEntities) ? '<a href="' + soy.$$escapeHtml(require('stash/api/util/navbuilder').admin().users().view(opt_data.entity.name).build()) + '" class="display-name" title="' + soy.$$escapeHtml(opt_data.entity.name) + '">' + soy.$$escapeHtml(opt_data.entity.displayName) + '</a>' : '<span class="display-name" title="' + soy.$$escapeHtml(opt_data.entity.name) + '">' + soy.$$escapeHtml(opt_data.entity.displayName) + '</span>') + '</div></td>' + stash.feature.permission.permissionCells(opt_data) + '<td>' + ((opt_data.showRemovePermsButton) ? stash.buttons.deleteButton({title: "Remove all explicit permissions for this user"}) : '') + '</td></tr>';
};
if (goog.DEBUG) {
  stash.feature.permission.userPermissionRow.soyTemplateName = 'stash.feature.permission.userPermissionRow';
}


stash.feature.permission.groupPermissionRow = function(opt_data, opt_ignored) {
  return '<tr data-entity-id="' + soy.$$escapeHtml(opt_data.entity.name) + '" ' + ((opt_data.priviledgedTooltip) ? 'title="' + soy.$$escapeHtml(opt_data.priviledgedTooltip) + '"' : '') + '><td><div class="permissions-item name">' + stash.widget.groupAvatar({size: 'small', name: opt_data.entity.name}) + ((opt_data.linkToEntities) ? '<a href="' + soy.$$escapeHtml(require('stash/api/util/navbuilder').admin().groups().view(opt_data.entity.name).build()) + '" class="display-name" title="' + soy.$$escapeHtml(opt_data.entity.name) + '">' + soy.$$escapeHtml(opt_data.entity.name) + '</a>' : soy.$$escapeHtml(opt_data.entity.name)) + '</div></td>' + stash.feature.permission.permissionCells(opt_data) + '<td>' + ((opt_data.showRemovePermsButton) ? stash.buttons.deleteButton({title: "Remove all explicit permissions for this group"}) : '') + '</td></tr>';
};
if (goog.DEBUG) {
  stash.feature.permission.groupPermissionRow.soyTemplateName = 'stash.feature.permission.groupPermissionRow';
}


stash.feature.permission.errorPermissionRow = function(opt_data, opt_ignored) {
  return '<tr data-entity-id="' + soy.$$escapeHtml(opt_data.entityId) + '" class="permission-error"><td colspan="' + soy.$$escapeHtml(opt_data.numRows) + '">' + soy.$$escapeHtml(opt_data.message) + '</td></tr>';
};
if (goog.DEBUG) {
  stash.feature.permission.errorPermissionRow.soyTemplateName = 'stash.feature.permission.errorPermissionRow';
}


stash.feature.permission.permissionCells = function(opt_data, opt_ignored) {
  var output = '';
  var permissionList143 = opt_data.entityPermissions;
  var permissionListLen143 = permissionList143.length;
  for (var permissionIndex143 = 0; permissionIndex143 < permissionListLen143; permissionIndex143++) {
    var permissionData143 = permissionList143[permissionIndex143];
    output += '<td><input type="checkbox" value="' + soy.$$escapeHtml(permissionData143.name) + '" ' + ((permissionData143.tooltip) ? 'title="' + soy.$$escapeHtml(permissionData143.tooltip) + '"' : '') + ((permissionData143.inherited || permissionData143.granted || permissionIndex143 == permissionListLen143 - 1) ? 'checked ' : '') + ((permissionData143.privileged || permissionData143.inherited || permissionIndex143 == permissionListLen143 - 1) ? 'disabled class="disabled"' : '') + '/></td>';
  }
  return output;
};
if (goog.DEBUG) {
  stash.feature.permission.permissionCells.soyTemplateName = 'stash.feature.permission.permissionCells';
}


stash.feature.permission.permissionModalItem = function(opt_data, opt_ignored) {
  return '<div' + ((! opt_data.entity.visible && ! opt_data.entity.active) ? ' class="inactive"' : '') + '>' + ((opt_data.isUser) ? stash.widget.avatar({person: opt_data.entity, size: 'xsmall'}) : '') + '<span class="display-name"' + ((! opt_data.entity.visible && ! opt_data.entity.active) ? ' title="' + soy.$$escapeHtml(opt_data.inactiveText) + '"' : '') + '>' + soy.$$escapeHtml(opt_data.entity.displayName || opt_data.entity.name) + '</span>' + ((opt_data.entity.displayName && opt_data.entity.name) ? '<span class="name"' + ((! opt_data.entity.visible && ! opt_data.entity.active) ? ' title="' + soy.$$escapeHtml(opt_data.inactiveText) + '"' : '') + '>' + soy.$$escapeHtml(opt_data.entity.name) + '</span>' : '') + '</div>';
};
if (goog.DEBUG) {
  stash.feature.permission.permissionModalItem.soyTemplateName = 'stash.feature.permission.permissionModalItem';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:permission-table', location = '/static/feature/permission/permission-table/permission-table.js' */
define("feature/permission/permission-table",["aui","aui/flag","jquery","lodash","util/ajax","util/function","util/warn-before-unload","model/page-state","feature/permission/multi-selector","exports"],function(L,B,E,M,J,I,D,K,G,C){function H(R,O){function S(T){return J.rest({url:R[O+"s"]().none().build(),type:"GET",data:T})}function N(T){return J.rest({url:R[O+"s"]().build(),type:"GET",data:T})}function Q(T,U){return J.rest({url:R[O+"s"]().withParams({permission:T,name:U}).build(),type:"PUT",statusCode:{"400":false,"403":false,"404":false,"409":false}})}function P(T){return J.rest({url:R[O+"s"]().withParams({name:T}).build(),type:"DELETE",statusCode:{"400":false,"403":false,"404":false,"409":false}})}return{getMembers:N,getNonMembers:S,setPermission:Q,removePermissions:P}}function A(N){this._delegate=N;this._pageReceived=M.bind(this._pageReceived,this);this.clear()}A.prototype.clear=function(){this._nextPageStart=0};A.prototype.nextPage=function(N){return this._delegate.getNonMembers({start:this._nextPageStart,filter:N,avatarSize:stash.widget.avatarSizeInPx({size:"xsmall"})}).done(this._pageReceived)};A.prototype._pageReceived=function(N){this._nextPageStart=N.nextPageStart||(N.start+N.size)};function F(O,Q,N,P,S,R){this._entityType=P;if(this._entityType==="user"){this._text=F.userText;this._rowTemplate=stash.feature.permission.userPermissionRow;this._isEntityCurrentUser=function(T){return K.getCurrentUser()&&T.name===K.getCurrentUser().getName()}}else{this._text=F.groupText;this._rowTemplate=stash.feature.permission.groupPermissionRow;this._isEntityCurrentUser=I.constant(false)}this._dataSource=H(Q,this._entityType);this._permissions=M.pluck(N,"name");this._initialPermission=this._permissions[this._permissions.length-1];this._permissionNames=M.pluck(N,"i18nName");this._currentUserHighestPerm=S;this._pageSize=50;this._addedEntities=[];this.opts=R||{};this._wireComponents(O);this._initHelpDialogs();this._initAddMultiSelector();this._initRows();this._initLoadMoreButton();this.refresh()}F.text={entityList:{buttonLoadMoreText:"Load more"},pendingModification:"You have made permission changes that have not yet reached Stash. If you leave this page, those changes will be lost.",cantGrantHigherPerms:function(N){return L.format("You cannot grant the {0} permission",N)},inheritedPerm:"This permission is inherited from a higher permission"};F.userText=E.extend(true,{inactiveEntity:function(N){return L.format("{0} is deleted or marked as inactive in a remote directory",N)},cantRevokeHigherPerms:function(N){return L.format("You cannot change permissions for a {0}",N)},cantGrantSelfHigherPerms:function(N){return L.format("You cannot grant yourself the {0} permission",N)},implicitPerm:"To remove this permission, click the X to the right to remove the entire row.",noMoreItemsText:"All users already have permissions set."},F.text);F.groupText=E.extend(true,{inactiveEntity:function(N){return L.format("{0} is deleted",N)},cantRevokeHigherPerms:function(N){return L.format("You cannot change permissions for a {0} group",N)},implicitPerm:"To remove this permission remove the group row",noMoreItemsText:"All groups already have permissions set."},F.text);F.prototype._wireComponents=function(N){this._$container=E(N);this._$tbody=this._$container.find("tbody");this._$noResults=this._$container.find(".no-results-row");this._$loadMore=this._$container.find(".load-more");this._$spinner=E(this._$loadMore).parent().append('<div class="permissions-spinner" />').find(".permissions-spinner")};F.prototype._getModalItem=function(N){return{content:E(stash.feature.permission.permissionModalItem({entity:N,isUser:this._entityType==="user",inactiveText:this._text.inactiveEntity(N.name)})),id:N.name}};F.prototype._initAddMultiSelector=function(){var N=this;this._multiSelector=new G({el:this._$container.find(".permission-multi-selector-container")[0],entityType:this._entityType,add:function(O){return N._dataSource.setPermission(O.permission,M.pluck(O.entities,"name")).done(function(){N._addedEntities.push.apply(N._addedEntities,M.map(O.entities,function(P){var Q={permission:O.permission};Q[N._entityType]=P;return Q}));B({type:"success",close:"auto",body:stash.feature.permission.flag.added({name:O.entities[0].name,entityType:N._entityType,count:O.entities.length})});N.refresh()})},dataSource:new A(this._dataSource)})};F.prototype._updateErrors=function(N,Q){var P=N.closest("tr"),O=P.attr("data-entity-id");P.closest("tbody").find(".permission-error").remove();return Q.fail(function(U,V,T,R){if(R&&R.errors){var S=P.children("td").length;E.each(R.errors,function(W){P.after(stash.feature.permission.errorPermissionRow({entityId:O,numRows:S,message:R.errors[W].message}))})}})};F.prototype._spinWhilePending=function(N,P){if(P&&P.state()==="pending"){N.closest("tr").find(":checkbox").prop("disabled",true);var O=E('<div class="spinner" />');O.insertAfter(N);N.addClass("hidden");O.spin("small");P.always(function(){N.removeClass("hidden");O.spinStop().remove()})}};F.prototype._getAllCheckboxes=function(N){return N.parent().parent().find(":checkbox")};F.prototype._getCheckboxStates=function(N){return E.map(N,function(O){return{checked:E(O).prop("checked"),disabled:E(O).prop("disabled")}})};F.prototype._restoreCheckboxStates=function(O,N){E.each(N,function(P,R){var Q=E(O.get(P));Q.prop("checked",R.checked).prop("disabled",R.disabled).toggleClass("disabled",R.disabled)})};F.prototype._setChecked=function(R,Q,N){this._restoreCheckboxStates(this._getAllCheckboxes(R),N);Q.prop("checked",false).prop("title","");var S=R.parent().nextAll().children(":checkbox").prop("checked",true).prop("disabled",true).addClass("disabled").prop("title",this._text.inheritedPerm);R.prop("title",S.length?"":this._text.implicitPerm);R.prop("checked",true).prop("disabled",!S.length).toggleClass("disabled",!S.length);var O=R.closest("[data-entity-id]").attr("data-entity-id");var P=this._entityType;M.each(this._addedEntities,function(T){if(T[P].name===O){T.permission=R.val()}})};F.prototype._initHelpDialogs=function(){var O=this._$container.find("th.permission-column > .aui-icon.aui-iconfont-help");var N=new L.InlineDialog(O,L.id("help-dialog"),function(Q,P,R){Q.empty().append(E(P).parent().find(".permission-column-desc").clone());R();N.refresh()},{offsetX:-100,onHover:true,gravity:"s"})};F.prototype._initRows=function(){var N=this;this._$tbody.on("change",":checkbox",function(){var W=E(this);var Q=W.parent();var P=Q.next();var T=Q.parent().attr("data-entity-id");var V,R;var S,Y;if(this.checked){while(P.length&&!P.children(":checked").length){P=P.next()}V=P.children(":checkbox");R=W;S=V.prop("value");Y=this.value}else{V=W;R=P.children(":checkbox");S=this.value;Y=R.prop("value")}var O=[];if(Y){O.push(N._dataSource.setPermission(Y,T))}var U=N._getCheckboxStates(N._getAllCheckboxes(R));var X=E.when.apply(E,O);N._spinWhilePending(W,X);N._updateErrors(W,X);X.done(function(){N._setChecked(R,V,U)}).fail(function(b,c,a,Z){N._setChecked(V,R,U)});D(X,N._text.pendingModification)}).on("click",".delete-button",function(U){var T=E(this),Q=T.parents("tr").first(),P=Q.attr("data-entity-id"),S=Q.find(":checkbox"),O=N._getCheckboxStates(S);var R=N._dataSource.removePermissions(P);N._spinWhilePending(T,R);N._updateErrors(T,R);R.done(function(){N._numLoaded--;N._addedEntities=M.filter(N._addedEntities,function(W){var X=W[N._entityType].name===P;if(X&&!W.loaded){N._numLoaded++}return !X});if(!Q.siblings().length&&!N._$loadMore.is(":visible")){var V=N._$noResults.find("div");V.css("opacity",0);N._$noResults.show();V.animate({opacity:1},500)}B({type:"success",close:"auto",body:stash.feature.permission.flag.deleted({name:P,entityType:N._entityType})});Q.remove()}).fail(function(){N._restoreCheckboxStates(S,O)});D(R,N._text.pendingModification);U.preventDefault();return false})};F.prototype._initLoadMoreButton=function(O){var N=this;this._$loadMore.click(function(P){N._loadItems();P.preventDefault()})};F.prototype._renderRow=function(N,S,U,P){var V=this;var Q=M.isUndefined(S)?V._permissions.length-1:M.indexOf(this._permissions,S);var T=M.indexOf(this._permissions,U);var O=Q<T;var R=V._permissionNames[Q];return this._rowTemplate({entity:N,entityPermissions:M.map(this._permissions,function(Y,X,c){var b=V._permissionNames[X];var a=Y===S;var Z=X<T;var W=M.any(c.slice(0,X),I.eq(S));return{name:Y,granted:a,inherited:W,privileged:Z,tooltip:(function(){if(O){return""}else{if(Z&&!a){if(V._isEntityCurrentUser(N)){return V._text.cantGrantSelfHigherPerms(b)}else{return V._text.cantGrantHigherPerms(b)}}else{if(W){return V._text.inheritedPerm}else{if(X===V._permissions.length-1){return V._text.implicitPerm}else{return""}}}}}())}}),tooltip:O?V._text.cantRevokeHigherPerms(R):"",showRemovePermsButton:P||(Q>=T),linkToEntities:K.getCurrentUser()&&K.getCurrentUser().getIsAdmin()})};F.prototype._loadItems=function(){var N=this;this._$spinner.spin("small");if(!this._numLoaded){N._$tbody.empty();N._$noResults.hide()}if(!this._numLoaded&&this._addedEntities.length){N._$tbody.append(M.chain(this._addedEntities).sortBy(function(O){return O[N._entityType].name}).reduce(function(P,O){return P+N._renderRow(O[N._entityType],O.permission,N._currentUserHighestPerm,true)},"").value())}N._dataSource.getMembers({start:N._numLoaded,limit:N._pageSize,avatarSize:stash.widget.avatarSizeInPx({size:"xsmall"})}).done(function(P){if(N.opts.preProcessMembers){P=N.opts.preProcessMembers(P,N._entityType)}N._$spinner.spinStop();N._$loadMore.toggleClass("hidden disabled",P.isLastPage);if(P.values.length){N._$noResults.hide()}else{if(!P.start&&!N._addedEntities.length){N._$noResults.show()}}N._numLoaded+=P.values.length;var Q=M.chain(N._addedEntities).pluck(N._entityType).pluck("name").invoke("toLowerCase").value();var O=M.chain(P.values).filter(function(R){var S=E.inArray(R[N._entityType].name.toLowerCase(),Q);if(S!==-1){N._addedEntities[S].loaded=true}return S===-1}).value();if(O.length){N._$tbody.append(M.reduce(O,function(R,S){return R+N._renderRow(S[N._entityType],S.permission,N._currentUserHighestPerm)},""))}N._$noResults.find("div").show()})};F.prototype.refresh=function(N){if(N){this._addedEntities=[]}this._numLoaded=0;M.each(this._addedEntities,function(O){O.loaded=false});this._loadItems()};C.initialise=function(N,O,Q,P){return M.map(["user","group"],function(R){return new F("#"+R+"-permissions-table",N,O,R,Q,P)})}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-permissions-page', location = '/static/page/repository/permissions/repository-permissions.js' */
define("page/repository/permissions",["jquery","stash/api/util/navbuilder","util/ajax","widget/submit-spinner","feature/permission/permission-table","exports"],function(E,F,D,C,A,B){B.onReady=function(I){var G=E("#public-access-allowed");var K;var H;function J(L){return D.rest({type:"PUT",url:F.rest().currentRepo().build(),data:{"public":L}})}G.click(function(){var L=this.checked;if(!K){K=new C(E(this).next("label"))}if(H){H.abort()}K.show();H=J(L);H.fail(function(){G.prop("checked",!L)}).always(function(){K.hide();H=null})});A.initialise(F.currentRepo().permissions(),I,"REPO_ADMIN")}});;
;/* module-key = 'com.atlassian.stash.stash-sourcetree-plugin:sourcetree-button-panel', location = '/static/button-panel/sourcetree-button-panel.soy' */
// This file was automatically generated from sourcetree-button-panel.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.sourceTree.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.sourceTree == 'undefined') { stash.sourceTree = {}; }


stash.sourceTree.buttonPanel = function(opt_data, opt_ignored) {
  return '<div class="sourcetree-panel">' + stash.buttons.button({buttonText: opt_data.buttonText, id: opt_data.buttonId, extraClasses: 'sourcetree-button', href: opt_data.sourceTreeActionUrl, isPrimary: true}) + ((opt_data.minVersion) ? '<div class="min-version">' + soy.$$escapeHtml(AJS.format("Requires version {0}+",opt_data.minVersion)) + '</div>' : '') + '<p>' + soy.$$filterNoAutoescape(AJS.format("{0} is the free Git and Mercurial client for Windows or Mac.",'<a href="http://www.sourcetreeapp.com" target="_blank">Atlassian SourceTree</a>')) + '</p></div>';
};
if (goog.DEBUG) {
  stash.sourceTree.buttonPanel.soyTemplateName = 'stash.sourceTree.buttonPanel';
}
;
;/* module-key = 'com.atlassian.stash.stash-sourcetree-plugin:sourcetree-clone', location = '/static/sourcetree-clone/sourcetree-clone.js' */
define("plugin/sourcetree/sourcetree-clone",["jquery","aui","util/events","util/navbuilder","model/page-state","exports"],function(c,a,i,d,g,b){var e=navigator.platform.indexOf("Mac")!==-1;var h=function(l,m){var k=g.getCurrentUser();var j="sourcetree://cloneRepo?type=stash&baseWebUrl="+encodeURIComponent(window.location.origin+a.contextPath())+"&cloneUrl="+encodeURIComponent(m);if(k){j=j+"&user="+encodeURIComponent(k.getName())}c("#sourcetree-clone-button").attr("href",j)};var f=function(){var k=e?1.7:1.2;var j="<div class='min-version'>"+AJS.format("Requires SourceTree v{0}+",k)+"</div>";c("#sourcetree-clone-button").after(j)};b.onReady=function(){a.$(document).ready(f);i.on("stash.feature.repository.clone.protocol.changed",h);i.on("stash.feature.repository.clone.protocol.initial",h)}});require("plugin/sourcetree/sourcetree-clone").onReady();;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:client-storage', location = '/static/util/client-storage.js' */
define("util/client-storage",["jquery","lodash","util/feature-detect","model/page-state","exports"],function(F,Y,P,M,Z){var U={SESSION:"session",LOCAL:"local"};var O="_flash.";var L="_",R="lastCleanup",I="hasCheckedCleanUp",T=1000*60*60*24*30;var W={};Z._resetDummy=function(){W={}};function A(b,a){if(Y.isString(b)){b=[b]}if(!Y.isArray(b)){throw new Error("keyBuilder requires an array of components")}if(a){b.push(a);switch(a){case"pull-request":b.push(M.getPullRequest()&&M.getPullRequest().getId());case"repo":b.push(M.getRepository()&&M.getRepository().getSlug());case"project":b.push(M.getProject()&&M.getProject().getKey());case"user":b.push(M.getCurrentUser()&&M.getCurrentUser().getName());break}}return b.join(L)}function Q(b,c){var e,d;if(P.localStorage()){e=window[(c||U.LOCAL)+"Storage"].getItem(b)}else{e=Y.has(W,b)?W[b]:null}try{d=JSON.parse(e)}catch(a){d=e}return d}function K(a,b){var c=Q(a,b);return F.isPlainObject(c)&&Y.has(c,"data")?c.data:c}function N(a){return K(a,U.SESSION)}function H(a){var b=K(O+a,U.SESSION);G(a);return b}function D(a,c,b){if(P.localStorage()){window[(b||U.LOCAL)+"Storage"].setItem(a,JSON.stringify(c))}else{W[a]=JSON.stringify(c)}}function C(a,e,d,b){var c=Y.extend({},d,{timestamp:new Date().getTime(),data:e});D(a,c,b);if(!b||b===U.LOCAL){Y.defer(J)}}function B(a,c,b){C.call(this,a,c,b,U.SESSION)}function S(a,c,b){C.call(this,O+a,c,b,U.SESSION)}function V(a,b){if(P.localStorage()){window[(b||U.LOCAL)+"Storage"].removeItem(a)}else{delete W[a]}}function E(a){V(a,U.SESSION)}function G(a){V(O+a,U.SESSION)}function J(){if(!!Q(I,U.SESSION)){return }var a=Q(R);if(!a||new Date().getTime()-a>T){X()}D(I,true,U.SESSION)}function X(){var a=new Date().getTime();Y.each(Y.keys(localStorage),function(b){if(b!==R){var c=Q(b);if(c&&c.timestamp&&!c.noCleanup&&(a-c.timestamp>T)){V(b)}}});D(R,new Date().getTime())}Z.LOCAL=U.LOCAL;Z.SESSION=U.SESSION;Z.buildKey=A;Z.getItem=K;Z.getFlashItem=H;Z.getSessionItem=N;Z.setItem=C;Z.setFlashItem=S;Z.setSessionItem=B;Z.removeItem=V;Z.removeFlashItem=G;Z.removeSessionItem=E});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:person-model', location = '/static/model/person.js' */
define("model/person",["backbone-brace"],function(A){return A.Model.extend({namedAttributes:{emailAddress:"string",name:"string"},idAttribute:"name",initialize:function(){if(this.namedAttributes.id==null){this.setId(this.attributes[this.idAttribute])}}})});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:stash-user-model', location = '/static/model/stash-user.js' */
define("model/stash-user",["model/person"],function(B){var A=B.extend({namedAttributes:{active:"boolean",avatarUrl:"string",displayName:"string",id:"number",isAdmin:"boolean",link:Object,links:Object,type:"string",slug:"string"}});return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:keyboard-shortcuts', location = '/static/widget/keyboard-shortcuts/keyboard-shortcuts.js' */
define("widget/keyboard-shortcuts",["aui","jquery","lodash","util/events","util/navigator","exports"],function(H,D,J,K,F,B){var L=/^[cC]trl$/i,I="\u2318";var A={};function G(){if(!(this instanceof G)){return new G()}this._dialog=new H.Dialog({width:830,height:580,id:"keyboard-shortcut-dialog",closeOnOutsideClick:true});this._enabledContexts=[]}G.prototype._setRegistry=function(M){this._registry=M};G.prototype._initContent=function(){this._dialog.addHeader("Keyboard shortcuts");this._dialog.addPanel("",stash.widget.keyboardShortcutsContent({contextNames:J.keys(A),contexts:J.values(A)}));this._dialog.addCancel("Close",function(M){M.hide()})};G.prototype._bind=function(M){this._$trigger=M;var N=this;this._$trigger.on("click",function(O){N._show();O.preventDefault()})};G.prototype.enableContext=function(M){if(D.inArray(M,this._enabledContexts)!==-1){return }this._registry.enableContext(M);this._enabledContexts.push(M)};G.prototype.resetContexts=function(){H.trigger("remove-bindings.keyboardshortcuts");this._enabledContexts=[];H.trigger("add-bindings.keyboardshortcuts")};G.prototype._show=function(){if(!this._hasShown){this._initContent();this._hasShown=true}this._dialog.show();this._dialog.updateHeight();this._dialog.getCurrentPanel().body.find(".keyboard-shortcut-help").focus()};G.prototype.addCustomShortcut=function(N,P,O,Q){var M=C({keys:P,context:N,displayContext:Q,description:O},{convertOSModifier:false})};G.convertOSModifier=function(M){return F.isMac()?M.replace(L,I):M};function C(M,N){M=D.extend({},M);M.keys=J.map(M.keys,function(O){return J.map(O,function(P){if(J.all(["key","modifiers"],J.partial(J.has,P))){return P}var Q=(P.length>1)?P.split("+"):P;if(!J.isArray(Q)||Q.length===1){return P}return{key:Q.pop(),modifiers:N&&N.convertOSModifier===false?Q:J.map(Q,G.convertOSModifier)}})});if(!M.displayContext){M.displayContext=G._contextDisplayInfo[M.context]?G._contextDisplayInfo[M.context].displayName:M.context.replace(/\b[a-z]/g,function(O){return O.toUpperCase()})}if(!A[M.displayContext]){A[M.displayContext]=[]}A[M.displayContext].push(M)}G.internalizeShortcuts=function(M){J.each(M,C)};G._contextDisplayInfo={repository:{displayName:"Within A Repository"},"branch-compare":{displayName:"Branch compare"},"branch-list":{displayName:"Branch list"},changeset:{displayName:"Changeset"},commits:{displayName:"Commit List"},"diff-tree":{displayName:"Changeset"},"diff-view":{displayName:"Diff View"},filebrowser:{displayName:"Directory Browsing"},global:{displayName:"Global"},"pull-request":{displayName:"Within A Pull Request"},"pull-request-list":{displayName:"Pull Request List"},"pull-request-overview":{displayName:"Within A Pull Request"},sourceview:{displayName:"Source View"}};var E=new G();B.onReady=function(){E._bind(D(".keyboard-shortcut-link"));var M=D.Deferred();D(document).ready(function(){setTimeout(function(){M.resolve()},0)});H.bind("register-contexts.keyboardshortcuts",function(O,N){E._setRegistry(N.shortcutRegistry);E.enableContext("global");M.done(function(){K.trigger("stash.widget.keyboard-shortcuts.register-contexts",E,E)})});H.bind("shortcuts-loaded.keyboardshortcuts",function(O,N){G.internalizeShortcuts(N.shortcuts)});H.params["keyboardshortcut-hash"]="bundled";H.trigger("initialize.keyboardshortcuts")};B.addTooltip=function(N,P){var M=J(P.split("+")).chain().map(G.convertOSModifier).map(function(Q){if(Q==="shift"){return "Shift"}else{if(Q==="ctrl"){return G.convertOSModifier("Ctrl")}else{return Q}}}).value().join(" + ");var O=N.attr("title");N.attr("title",O+H.format(" (Type \u0027\u0027{0}\u0027\u0027)",M));return{remove:function(){N.attr("title",O)}}};B.showDialog=function(){if(E){E._show()}};B.resetContexts=function(){E.resetContexts()}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:keyboard-shortcuts', location = '/static/widget/keyboard-shortcuts/keyboard-shortcuts.soy' */
// This file was automatically generated from keyboard-shortcuts.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.keyboardShortcutsContent = function(opt_data, opt_ignored) {
  var param6 = '';
  var contextNameList7 = opt_data.contextNames;
  var contextNameListLen7 = contextNameList7.length;
  for (var contextNameIndex7 = 0; contextNameIndex7 < contextNameListLen7; contextNameIndex7++) {
    var contextNameData7 = contextNameList7[contextNameIndex7];
    param6 += (contextNameIndex7 % 2 == 0) ? stash.widget.keyboardShortContext({contextName: contextNameData7, contextShortcuts: opt_data.contexts[contextNameIndex7]}) : '';
  }
  var param5 = '' + aui.group.item({content: param6});
  var param15 = '';
  var contextNameList16 = opt_data.contextNames;
  var contextNameListLen16 = contextNameList16.length;
  for (var contextNameIndex16 = 0; contextNameIndex16 < contextNameListLen16; contextNameIndex16++) {
    var contextNameData16 = contextNameList16[contextNameIndex16];
    param15 += (contextNameIndex16 % 2 == 1) ? stash.widget.keyboardShortContext({contextName: contextNameData16, contextShortcuts: opt_data.contexts[contextNameIndex16]}) : '';
  }
  param5 += aui.group.item({content: param15});
  var output = '' + aui.group.group({extraClasses: 'keyboard-shortcut-help', extraAttributes: {tabindex: '-1'}, content: param5});
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutsContent.soyTemplateName = 'stash.widget.keyboardShortcutsContent';
}


stash.widget.keyboardShortContext = function(opt_data, opt_ignored) {
  var output = '<div class="keyboard-shortcut-context"><h3>' + soy.$$escapeHtml(opt_data.contextName) + '</h3><dl>';
  var shortcutList29 = opt_data.contextShortcuts;
  var shortcutListLen29 = shortcutList29.length;
  for (var shortcutIndex29 = 0; shortcutIndex29 < shortcutListLen29; shortcutIndex29++) {
    var shortcutData29 = shortcutList29[shortcutIndex29];
    output += (! shortcutData29.hidden) ? stash.widget.keyboardShortcutItem({shortcut: shortcutData29}) : '';
  }
  output += '</dl></div>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortContext.soyTemplateName = 'stash.widget.keyboardShortContext';
}


stash.widget.keyboardShortcutItem = function(opt_data, opt_ignored) {
  var output = '<dt>' + soy.$$escapeHtml(opt_data.shortcut.description) + '</dt>';
  var optionList40 = opt_data.shortcut.keys;
  var optionListLen40 = optionList40.length;
  for (var optionIndex40 = 0; optionIndex40 < optionListLen40; optionIndex40++) {
    var optionData40 = optionList40[optionIndex40];
    output += ((! (optionIndex40 == 0) && ! (optionIndex40 == optionListLen40 - 1)) ? '<dd class=\'separator\'>' + soy.$$escapeHtml(",") + '</dd>' : '') + ((! (optionIndex40 == 0) && optionIndex40 == optionListLen40 - 1) ? '<dd class=\'separator\'>' + soy.$$escapeHtml(" or") + '</dd>' : '') + '<dd>' + stash.widget.keyboardShortcutOption({sequence: optionData40}) + '</dd>';
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutItem.soyTemplateName = 'stash.widget.keyboardShortcutItem';
}


stash.widget.keyboardShortcutOption = function(opt_data, opt_ignored) {
  var output = '';
  var keypressList57 = opt_data.sequence;
  var keypressListLen57 = keypressList57.length;
  for (var keypressIndex57 = 0; keypressIndex57 < keypressListLen57; keypressIndex57++) {
    var keypressData57 = keypressList57[keypressIndex57];
    output += ((! (keypressIndex57 == 0)) ? ' ' + soy.$$escapeHtml("then") + ' ' : '') + ((keypressData57.modifiers) ? stash.widget.keyboardShortcutModifier({keypress: keypressData57}) : stash.widget.keyboardShortcutKey({key: keypressData57}));
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutOption.soyTemplateName = 'stash.widget.keyboardShortcutOption';
}


stash.widget.keyboardShortcutModifier = function(opt_data, opt_ignored) {
  var output = '';
  var modifierList72 = opt_data.keypress.modifiers;
  var modifierListLen72 = modifierList72.length;
  for (var modifierIndex72 = 0; modifierIndex72 < modifierListLen72; modifierIndex72++) {
    var modifierData72 = modifierList72[modifierIndex72];
    output += stash.widget.keyboardShortcutKey({key: modifierData72});
  }
  output += stash.widget.keyboardShortcutKey({key: opt_data.keypress.key});
  return output;
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutModifier.soyTemplateName = 'stash.widget.keyboardShortcutModifier';
}


stash.widget.keyboardShortcutKey = function(opt_data, opt_ignored) {
  return '<kbd>' + soy.$$escapeHtml(opt_data.key) + '</kbd>';
};
if (goog.DEBUG) {
  stash.widget.keyboardShortcutKey.soyTemplateName = 'stash.widget.keyboardShortcutKey';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:loaded-range', location = '/static/widget/loaded-range.js' */
define("widget/loaded-range",function(){function A(B){this.start=undefined;this.nextPageStart=undefined;this._reachedStart=false;this._reachedEnd=false;this._reachedCapacity=false;this._capacity=B||Infinity}A.prototype.isEmpty=function(){return this.start===undefined};A.prototype.isBeforeStart=function(B){return B<this.start};A.prototype.isAfterNextPageStart=function(B){return B>this.nextPageStart};A.prototype.isLoaded=function(B){return !(this.isEmpty()||this.isBeforeStart(B)||this.isAfterNextPageStart(B))};A.prototype.getAttachmentMethod=function(C,B){return this.isEmpty()?"html":this.isBeforeStart(C)?"prepend":"append"};A.prototype.add=function(G,C,B,E){var F=this.isEmpty();E=E||(G+C);if(F||this.isBeforeStart(G)){this.start=G}if(F||this.isAfterNextPageStart(E)){this.nextPageStart=E}this._reachedStart=this._reachedStart||G<=0;var D=this._reachedEnd=this._reachedEnd||B;if(!D&&this.nextPageStart>=this._capacity){this._reachedCapacity=this._reachedEnd=true}return this};A.prototype.reachedStart=function(){return this._reachedStart};A.prototype.reachedEnd=function(){return this._reachedEnd};A.prototype.reachedCapacity=function(){return this._reachedCapacity};A.prototype.pageBefore=function(B){if(this.reachedStart()){return null}var C=Math.max(0,this.start-B);return{start:C,limit:this.start-C}};A.prototype.pageAfter=function(B){if(this.reachedEnd()){return null}return{start:this.nextPageStart,limit:B}};return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:paged-scrollable', location = '/static/widget/paged-scrollable.js' */
define("widget/paged-scrollable",["aui","jquery","lodash","util/events","util/function","util/navigator","widget/loaded-range"],function(H,C,I,J,E,F,B){var A=F.isIE();function G(L,K){this.options=C.extend({},G.defaults,K);this.$scrollElement=C(L||window);if(C.isWindow(this.$scrollElement[0])){var M=window.document.documentElement;this.getPaneHeight=function(){return M.clientHeight};this.getContentHeight=function(){return M.scrollHeight}}this._eventHandlers=[]}G.defaults={pageSize:50,scrollDelay:250,bufferPixels:0,precedingSpaceMaintained:true,suspendOnFailure:true,dataLoadedEvent:"stash.widget.pagedscrollable.dataLoaded",autoLoad:true,preventOverscroll:false,idForEntity:null};G.prototype.init=function(M){G.prototype.reset.call(this);M=M||{};this.loadedRange=M.loadedRange||new B();var L=this;var K=this.options.pageSize;var N=M.targetedItem?Math.floor(M.targetedItem/K)*K:0;if(M.suspended){this.suspend()}if(this.loadedRange.isLoaded(N)){return(this.loadIfRequired()||C.Deferred().resolve()).done(function(){L.onFirstDataLoaded()})}return D(this,N,K).then(undefined,function(){var O=N!==0;if(O){return D(L,0,K)}else{return C.Deferred().rejectWith(this,arguments)}}).fail(function(R,Q,O,P){if(P&&P.errors&&P.errors.length){L.handleErrors(P.errors)}})};G.prototype.reset=function(){if(this.currentXHR){this.cancelRequest()}this.clearListeners();if(this._resizeHandler){C(window).off("resize",this._resizeHandler);this._resizeHandler=null}if(this.options.idForEntity){this._ids={}}this._suspended=false};G.prototype.destroy=function(){this.reset();delete this.$scrollElement};G.prototype.suspend=function(){this._suspended=true};G.prototype.resume=function(){this._suspended=false;return this.loadIfRequired()};G.prototype.isSuspended=function(){return this._suspended};G.prototype.getScrollTop=function(){return this.$scrollElement.scrollTop()};G.prototype.setScrollTop=function(K){this.$scrollElement.scrollTop(K)};G.prototype.getPane=function(){return this.$scrollElement};G.prototype.getPaneHeight=function(){return this.$scrollElement[0].clientHeight};G.prototype.getContentHeight=function(){return this.$scrollElement[0].scrollHeight};G.prototype.getOption=function(K){if(Object.prototype.hasOwnProperty.call(this.options,K)){return this.options[K]}return undefined};G.prototype.setOptions=function(K){if(C.isPlainObject(K)){this.options=C.extend(this.options,K)}};G.prototype.addScrollListener=function(L){var K=this.scrollDelay?I.debounce(L,this.scrollDelay):L;this._eventHandlers.push(K);this.$scrollElement.on("scroll.paged-scrollable",K)};G.prototype._bindOverscrollPrevention=function(){function K(N,O){var L=C(this).outerHeight();var M=this.scrollHeight;if((this.scrollTop===(M-L)&&O<0)||(this.scrollTop===0&&O>0)){N.preventDefault()}}this._eventHandlers.push(K);this.$scrollElement.on("mousewheel.paged-scrollable",K)};G.prototype.clearListeners=function(){var K=this;I.each(this._eventHandlers,function(L){K.$scrollElement.unbind(".paged-scrollable",L)});this._eventHandlers.length=0};G.prototype.loadIfRequired=function(){if(this.isSuspended()||(this.loadedRange.reachedEnd()&&this.loadedRange.reachedStart())){return }var P=this.getScrollTop(),L=this.getPaneHeight(),N=this.getContentHeight(),O=L+P;if(!C.isWindow(this.getPane()[0])&&this.getPane().is(":hidden")){return }if(I.any([true,"previous"],E.eq(this.options.autoLoad))&&P<this.options.bufferPixels+(this.loadedRange.start/this.loadedRange.nextPageStart)*N){var K=this.loadedRange.pageBefore(this.options.pageSize);if(K){return this.load(K.start,K.limit)}}var Q=1;if(I.any([true,"next"],E.eq(this.options.autoLoad))&&O+Q>=N-this.options.bufferPixels){var M=this.loadedRange.pageAfter(this.options.pageSize);if(M){return this.load(M.start,M.limit)}}};function D(L,M,K){if(L.currentXHR){return C.Deferred().reject()}L.currentXHR=L.requestData(M,K);return L.currentXHR.always(function(){L.currentXHR=null}).done(function(N){L.onDataLoaded(M,K,N)}).fail(function(){L.suspend()})}G.prototype.load=function(M,K){var L=this;return D(this,M,K).fail(function(Q,P,N,O){if(O&&O.errors){L.handleErrors(O.errors)}})};G.prototype.loadAfter=function(){var K=this.loadedRange.pageAfter(this.options.pageSize);return K&&this.load(K.start,K.limit)};G.prototype.loadBefore=function(){var K=this.loadedRange.pageBefore(this.options.pageSize);return K&&this.load(K.start,K.limit)};G.prototype.onDataLoaded=function(M,N,P){if(P.start!==undefined){M=P.start}var R=this.loadedRange.isEmpty(),K=this.loadedRange.getAttachmentMethod(M,P.size),Q=K==="prepend";this.loadedRange.add(M,P.size,P.isLastPage,P.nextPageStart);var S,O;if(Q||A){O=this.getScrollTop();S=this.getContentHeight()}P=this._addPage(P,K);if(Q||A){var L=Q?this.getContentHeight()-S:0;this.setScrollTop(O+L)}if(R){this.onFirstDataLoaded(M,N,P)}J.trigger(this.options.dataLoadedEvent,this,M,N,P);this.loadIfRequired()};G.prototype._addPage=function(L,K){L=this._dedupe(L);this.attachNewContent(L,K);return L};G.prototype._dedupe=function(M){if(M&&M.values&&this.options.idForEntity){var L=this._ids;var K=this.options.idForEntity;M=C.extend({},M,{values:I.filter(M.values,function(N){var O=K(N);if(!I.has(L,O)){L[O]=true;return true}return false})})}return M};G.prototype.onFirstDataLoaded=function(){var K=this;this.addScrollListener(function(){K.loadIfRequired()});if(this.options.preventOverscroll){this._bindOverscrollPrevention()}C(window).on("resize",this._resizeHandler=function(){K.loadIfRequired()})};G.prototype.cancelRequest=function(){if(this.currentXHR){if(this.currentXHR.abort){this.currentXHR.abort()}else{if(this.currentXHR.reject){this.currentXHR.reject()}else{H.log("Couldn't cancel the current request.")}}this.currentXHR=null}};G.prototype.add=function(L,K){if(L.length){L=this._addPage({values:L,size:L.length},K||"prepend");return true}return false};G.prototype.remove=function(K){if(this.options.idForEntity){var L=this.options.idForEntity(K);if(I.has(this._ids,L)){delete this._ids[L];if(typeof this.loadedRange.nextPageStart==="number"){this.loadedRange.nextPageStart=Math.max(0,this.loadedRange.nextPageStart-1)}return true}}return false};G.prototype.attachNewContent=function(L,K){throw new Error("attachNewContent is abstract and must be implemented.")};G.prototype.requestData=function(L,K){throw new Error("requestData is abstract and must be implemented.  It must return a promise. It is preferred to return a jqXHR.")};G.prototype.handleErrors=function(K){throw new Error("handleErrors is abstract and must be implemented.")};return G});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:keyboard-controller', location = '/static/widget/keyboard-controller.js' */
define("widget/keyboard-controller",["aui","jquery"],function(B,D){function A(I,G){if(!(this instanceof A)){return new A(I,G)}var F=D(I);var H;F.on("keydown",H=function(J){if(J.keyCode in G){if(!G[J.keyCode](J)){J.preventDefault()}}});this.destroy=function(){F.off("keydown",H)};return this}function C(I,G){G=D.extend({},C.defaults,G);function H(J){J.focus().addClass(G.focusedClass)}var F={};F[B.keyCode.TAB]=function(N){var K,J,L,M=N.target;K=D("a:visible, :input:visible:enabled, :checkbox:visible:enabled, :radio:visible:enabled, [tabindex]",I).not("[tabindex=-1]").filter(function(){return D(this).css("visibility")!=="hidden"});L=K.last();J=K.first();K.removeClass(G.focusedClass);if(N.shiftKey&&M===J[0]){if(!G.wrapAround){return true}H(L)}else{if(!N.shiftKey&&M===L[0]){if(!G.wrapAround){return true}H(J)}else{if(N.shiftKey){H(K.eq(K.index(M)-1))}else{H(K.eq(K.index(M)+1))}}}};return new A(I,F)}C.defaults={focusedClass:"item-focused",wrapAround:true};function E(S,T,U){U=D.extend({},E.defaults,U);var G=D(T);var R=D.Callbacks();var P=D.Callbacks();if(U.onSelect){R.add(U.onSelect)}if(U.onFocus){P.add(U.onFocus)}var J=false,F=false,L=false;function I(W){do{var X=W.find(">:first-child");var V=W.next();if(X.length){W=X}else{if(V.length){W=V}else{W=W.parentsUntil(G[0]).next().first()}}}while(W.length&&!W.is(U.itemSelector));return W}function O(X){do{var W=X.prev();if(W.length){var V;while((V=W.find(">:last-child")).length){W=V}X=W}else{X=X.parent();if(X[0]===G[0]){X=D()}}}while(X.length&&!X.is(U.itemSelector));return X}function Q(V){return function W(d){var c=D(U.itemSelector,G);var f=c.filter(function(){return D(this).hasClass(U.focusedClass)});var X=false;var g=V==="next";var a;if(f.length){if(U.adjacentItems){a=f[V](U.itemSelector)}else{if(V==="next"){a=I(f)}else{a=O(f)}}}else{if(V==="next"){a=c.first()}else{if(U.wrapAround){a=c.last()}else{return }}}L=true;if(!a.length){if(V==="next"&&U.requestMore&&!J){if(!F){L=false;var i=U.requestMore();if(i){F=true;i.done(function(e){J=e;if(!L){W(d)}}).always(function(){F=false;L=false});return }else{J=true;W(d);return }}else{L=false;return }}else{if(U.wrapAround){X=true;g=!g;a=c[V==="next"?"first":"last"]()}else{return }}}f.removeClass(U.focusedClass);a.addClass(U.focusedClass);var Y=a[V](),b=!X&&Y.length?Y:a;var Z=document.activeElement;if(U.focusIntoView&&Z){var h=b.attr("tabindex");b.attr("tabindex","0");b.focus();Z.focus();if(h==null){b.removeAttr("tabindex")}else{b.attr("tabindex",h)}}else{a[0].scrollIntoView(false)}P.fire(a,d)}}var K={};var N=K[B.keyCode.UP]=Q("prev");var H=K[B.keyCode.DOWN]=Q("next");K[B.keyCode.ENTER]=function(V){var X=D(U.itemSelector,G);var W=X.filter(function(){return D(this).hasClass(U.focusedClass)});if(W.length){R.fire(W,V)}};var M=new A(S,K);M.setListElement=function(V){G=D(V)};M.blur=function(){D(U.itemSelector,G).removeClass(U.focusedClass)};M.focus=function(){P.add.apply(P,arguments);return this};M.select=function(){R.add.apply(R,arguments);return this};M.moveToNext=H;M.moveToPrev=N;return M}E.defaults={itemSelector:"li",focusedClass:"item-focused",wrapAround:false,adjacentItems:true,requestMore:undefined,onFocus:undefined,onSelect:undefined};return{KeyboardController:A,TabKeyboardController:C,ListKeyboardController:E}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:jquery-mousewheel', location = '/static/bower/jquery-mousewheel/jquery.mousewheel.js' */
/* Copyright (c) 2013 Brandon Aaron (http://brandonaaron.net)
 * Licensed under the MIT License (LICENSE.txt).
 *
 * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
 * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
 * Thanks to: Seamus Leahy for adding deltaX and deltaY
 *
 * Version: 3.1.1
 *
 * Requires: 1.2.2+
 */
(function(A){if(typeof define==="function"&&define.amd){define(["jquery"],A)}else{A(jQuery)}}(function(E){var D=["wheel","mousewheel","DOMMouseScroll"];var G="onwheel" in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];var F,A;if(E.event.fixHooks){for(var B=D.length;B;){E.event.fixHooks[D[--B]]=E.event.mouseHooks}}E.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var H=G.length;H;){this.addEventListener(G[--H],C,false)}}else{this.onmousewheel=C}},teardown:function(){if(this.removeEventListener){for(var H=G.length;H;){this.removeEventListener(G[--H],C,false)}}else{this.onmousewheel=null}}};E.fn.extend({mousewheel:function(H){return H?this.bind("mousewheel",H):this.trigger("mousewheel")},unmousewheel:function(H){return this.unbind("mousewheel",H)}});function C(H){var I=H||window.event,N=[].slice.call(arguments,1),P=0,K=0,J=0,M=0,L=0,O;H=E.event.fix(I);H.type="mousewheel";if(I.wheelDelta){P=I.wheelDelta}if(I.detail){P=I.detail*-1}if(I.deltaY){J=I.deltaY*-1;P=J}if(I.deltaX){K=I.deltaX;P=K*-1}if(I.wheelDeltaY!==undefined){J=I.wheelDeltaY}if(I.wheelDeltaX!==undefined){K=I.wheelDeltaX*-1}M=Math.abs(P);if(!F||M<F){F=M}L=Math.max(Math.abs(J),Math.abs(K));if(!A||L<A){A=L}O=P>0?"floor":"ceil";P=Math[O](P/F);K=Math[O](K/A);J=Math[O](J/A);N.unshift(H,P,K,J);return(E.event.dispatch||E.event.handle).apply(this,N)}}));;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:searchable-selector', location = '/static/widget/searchable-selector/searchable-selector.soy' */
// This file was automatically generated from searchable-selector.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }


stash.widget.searchableSelector = function(opt_data, opt_ignored) {
  var output = '<div class="searchable-selector ' + ((opt_data.extraClasses) ? soy.$$escapeHtml(opt_data.extraClasses) : '') + '" id="' + soy.$$escapeHtml(opt_data.id) + '">' + ((opt_data.searchable) ? '<header><label class="assistive" for="' + soy.$$escapeHtml(opt_data.id) + '-search-input">' + soy.$$escapeHtml(opt_data.searchPlaceholder ? opt_data.searchPlaceholder : "Search") + '</label><input id="' + soy.$$escapeHtml(opt_data.id) + '-search-input" type="text" name="filter" class="filter" placeholder="' + soy.$$escapeHtml(opt_data.searchPlaceholder ? opt_data.searchPlaceholder : "Search") + '"/></header>' : '');
  if (opt_data.tabs && opt_data.tabs.length > 1) {
    output += '<div class="aui-tabs horizontal-tabs"><ul class="tabs-menu">';
    var tabList24 = opt_data.tabs;
    var tabListLen24 = tabList24.length;
    for (var tabIndex24 = 0; tabIndex24 < tabListLen24; tabIndex24++) {
      var tabData24 = tabList24[tabIndex24];
      output += aui.tabMenuItem({url: '#' + soy.$$escapeHtml(opt_data.id) + '-tab-pane-' + soy.$$escapeHtml(tabIndex24), text: tabData24.label, isActive: tabIndex24 == 0, extraAttributes: {'data-tab-id': tabIndex24}});
    }
    output += '</ul>';
    var tabList36 = opt_data.tabs;
    var tabListLen36 = tabList36.length;
    for (var tabIndex36 = 0; tabIndex36 < tabListLen36; tabIndex36++) {
      var tabData36 = tabList36[tabIndex36];
      output += aui.tabPane({content: '<ul class="results-list"></ul><div class="spinner"></div>', id: opt_data.id + '-tab-pane-' + tabIndex36, isActive: tabIndex36 == 0, extraClasses: 'results', extraAttributes: {'data-tab-id': tabIndex36}});
    }
    output += '</div>';
  } else {
    output += '<div class="results"><ul class="results-list"></ul><div class="spinner"></div></div>';
  }
  output += '</div>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.searchableSelector.soyTemplateName = 'stash.widget.searchableSelector';
}


stash.widget.searchableSelectorResults = function(opt_data, opt_ignored) {
  var output = '';
  var resultList50 = opt_data.values;
  var resultListLen50 = resultList50.length;
  for (var resultIndex50 = 0; resultIndex50 < resultListLen50; resultIndex50++) {
    var resultData50 = resultList50[resultIndex50];
    output += '<li class="result ' + ((opt_data.isPreload) ? 'preload' : '') + '"><a href="' + soy.$$escapeHtml(resultData50.url ? resultData50.url : '#') + '" tabindex="-1" data-id="' + soy.$$escapeHtml(resultData50.id) + '" data-item="' + soy.$$escapeHtml(JSON.stringify(resultData50).replace(/\//g, '\\/')) + '">' + soy.$$escapeHtml(resultData50.name) + '</a></li>';
  }
  output += (opt_data.isLastPage) ? (opt_data.size > 0) ? '<li class="no-results">' + soy.$$escapeHtml(opt_data.noMoreResultsText ? opt_data.noMoreResultsText : "No more results") + '</li>' : '<li class="no-results">' + soy.$$escapeHtml(opt_data.noResultsText ? opt_data.noResultsText : "No results") + '</li>' : '';
  return output;
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorResults.soyTemplateName = 'stash.widget.searchableSelectorResults';
}


stash.widget.searchableSelectorTrigger = function(opt_data, opt_ignored) {
  return '' + stash.widget.searchableSelectorTriggerGeneric({id: opt_data.id, content: '' + stash.widget.searchableSelectorTriggerContent(opt_data), autofocus: opt_data.autofocus, extraClasses: opt_data.extraClasses, extraAttributes: opt_data.extraAttributes});
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorTrigger.soyTemplateName = 'stash.widget.searchableSelectorTrigger';
}


stash.widget.searchableSelectorTriggerGeneric = function(opt_data, opt_ignored) {
  return '<button ' + ((opt_data.id) ? 'id="' + soy.$$escapeHtml(opt_data.id) + '" ' : '') + 'type="button" class="aui-button searchable-selector-trigger' + aui.renderExtraClasses(opt_data) + '"' + ((opt_data.autofocus) ? ' autofocus' : '') + aui.renderExtraAttributes(opt_data) + '>' + soy.$$filterNoAutoescape(opt_data.content) + '</button>';
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorTriggerGeneric.soyTemplateName = 'stash.widget.searchableSelectorTriggerGeneric';
}


stash.widget.searchableSelectorTriggerWithField = function(opt_data, opt_ignored) {
  return '' + stash.widget.searchableSelectorTrigger(opt_data) + widget.aui.form.input({id: opt_data.fieldId ? opt_data.fieldId : opt_data.id + '-field', name: opt_data.fieldName ? opt_data.fieldName : opt_data.id + '-field', initialValue: opt_data.item ? opt_data.item.id : null, type: 'hidden'});
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorTriggerWithField.soyTemplateName = 'stash.widget.searchableSelectorTriggerWithField';
}


stash.widget.searchableSelectorTriggerContent = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '' + ((opt_data.item) ? '<span class="name" data-id="' + soy.$$escapeHtml(opt_data.item.id) + '" data-item="' + soy.$$escapeHtml(JSON.stringify(opt_data.item).replace(/\//g, '\\/')) + '">' + soy.$$escapeHtml(opt_data.item.name) + '</span>' : '<span class="placeholder">' + soy.$$escapeHtml(opt_data.text ? opt_data.text : "Select item") + '</span>');
};
if (goog.DEBUG) {
  stash.widget.searchableSelectorTriggerContent.soyTemplateName = 'stash.widget.searchableSelectorTriggerContent';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:searchable-selector', location = '/static/widget/searchable-selector/searchable-selector.js' */
define("widget/searchable-selector",["aui","jquery","lodash","util/ajax","util/dom-event","util/events","util/navigator","util/promise","widget/keyboard-controller","widget/paged-scrollable"],function(M,D,N,L,H,O,J,B,G,K){var C=G.TabKeyboardController;var E=G.ListKeyboardController;var I=0;function F(Q,P){return this.init.apply(this,arguments)}F.prototype.defaults={id:null,extraClasses:null,namespace:"searchable-selector",url:null,tabs:null,searchable:true,searchPlaceholder:null,queryParamKey:"filter",queryParamsBuilder:null,pageSize:20,statusCodeHandlers:{},followLinks:false,hideDialogOnSelect:true,itemSelectedEvent:"stash.widget.searchableSelector.itemSelected",context:null,field:null,itemDataKey:"item",template:stash.widget.searchableSelector,resultsTemplate:stash.widget.searchableSelectorResults,noResultsText:null,noMoreResultsText:null,triggerContentTemplate:stash.widget.searchableSelectorTriggerContent,triggerPlaceholder:null,preloadData:null,alwaysShowPreload:false,dataTransform:null,postOptionsInit:null,clearResultsOnSearch:true,popUpOffsetX:0,popUpOffsetY:-1,width:350};F.constructDataPageFromPreloadArray=function(P){if(!N.isArray(P)){return null}return{values:P,isLastPage:false,size:P.length,start:0,limit:P.length}};F.prototype.tabOptionKeys=["label","url","resultsTemplate","noResultsText","noMoreResultsText","dataTransform","queryParamKey","preloadData","searchPlaceholder"];F.prototype.init=function(R,Q){var P=this;this.instanceId=I++;this.$trigger=D(R);this.setOptions(Q);this.scrollables=[];this.scrollableDataStores=[];if(!this._getOptionVal("id")){this.options.id=this._getOptionVal("namespace")+"-"+this.instanceId}if(this.options.tabs&&this.options.tabs.length){this.tabs=N.map(this.options.tabs,function(V){return D.extend(true,{},N.pick(P.options,P.tabOptionKeys),V)})}var U=this._getOption("postOptionsInit");if(N.isFunction(U)){U.call(this)}var T;this.blockShortcutPropagation=T=function(V){var W=(this===document);if(V.keyCode===M.keyCode.ESCAPE){V[W?"stopImmediatePropagation":"stopPropagation"]();P.dialog.hide()}else{if(!W){V.stopPropagation()}}};var S=P._getOptionVal("externalSearchField");this.dialog=M.InlineDialog(this.$trigger,this._getOptionVal("id"),function(W,V,X){if(!W.data("initialised")){P._initialiseDialogContent(W)}X();if(!S){N.defer(N.bind(P.setFocus,P))}},{offsetX:this._getOptionVal("popUpOffsetX"),offsetY:this._getOptionVal("popUpOffsetY"),noBind:!!S,width:this._getOptionVal("width"),hideCallback:function(){if(P.$content.is(document.activeElement)||D.contains(P.$content[0],document.activeElement)){P.$trigger.focus()}D(document).add(P.dialog).off("keydown keypress",T)},initCallback:function(){D(document).add(P.dialog).on("keydown keypress",T)}});if(this._getOptionVal("searchable")&&S){this.$searchField=D(S);this._initialiseSearchOnInput()}if(this.$trigger.find(".name").length){this._selectedItem=this._getItemFromTrigger()}M.bind("hide.dialog",function(W,V){if(P.$trigger.closest(V.dialog.popup.element).length){P.dialog.hide()}});return this};F.prototype.getSelectedItem=function(){return this._selectedItem};F.prototype.setSelectedItem=function(P){if(D.isPlainObject(P)&&P.id!=null){if(!this._selectedItem||this._selectedItem.id!==P.id){this._itemSelected(P)}}};F.prototype.clearSelection=function(){this._selectedItem=null;if(this._getOptionVal("field")){D(this._getOptionVal("field")).val("")}this.resetTrigger()};F.prototype._getItemFromTrigger=function(){var P=this.$trigger.find(".name");return D.extend({},this._buildObjectFromElementDataAttributes(P),{name:P.text()})};F.prototype._buildObjectFromElementDataAttributes=function(P){return D(P).data(this._getOptionVal("itemDataKey"))};F.prototype._initialiseDialogContent=function(Q){var P=this;var R=this._getOptionVal("searchable");var S=this._getOptionVal("externalSearchField");Q.append(this._getOption("template")({id:this._getOptionVal("id"),tabs:this.tabs,searchable:!S&&R,searchPlaceholder:this._getOptionVal("searchPlaceholder"),extraClasses:this._getOptionVal("extraClasses")}));Q.closest(".aui-inline-dialog").addClass("searchable-selector-dialog");if(R&&!S){this.$searchField=Q.find("input.filter");this._initialiseSearchOnInput()}if(this.tabs){var T=Q.find("ul.tabs-menu a");T.on("tabSelect",function(V,U){P.currentTabId=U.tab.parent().data("tab-id");if(P._getOptionVal("searchable")||P._getDataStoreForScrollable().length===0){P._populateScrollable()}P._resultsKeyboardController.setListElement(P._getCurrentScrollable().$scrollElement.find("ul.results-list"));if(R){P.$searchField.focus()}P._updateSearchPlaceholder()});T.on("click",function(U){if(D(this).parent().hasClass("active-tab")){U.stopPropagation();U.preventDefault()}});T.on("keydown",function(V){if(V.keyCode===M.keyCode.ENTER){var U=D(this);if(U.parent("li").hasClass("active-tab")){V.preventDefault()}else{U.click()}}});M.tabs.setup()}Q.find(".results").each(function(){P.scrollables.push(P._createScrollable(D(this)));P.scrollableDataStores.push([])});Q.on("click",".result a",function(U){P.selectItem(U,D(this))});this._initialiseKeyboardNavigation(Q);this._populateScrollable();this.$content=Q;Q.data("initialised",true)};F.prototype._initialiseSearchOnInput=function(){var Q=this;var R=this._getSearchTerm();var S=this._getOptionVal("externalSearchField");var T=B.delay(N.bind(this._handleSearchInput,this),350);var P=N.bind(function(){if(R!==(R=this._getSearchTerm())){if(!this._pendingSearch){this._pendingSearch=T(R);this._pendingSearch.always(function(){Q._pendingSearch=null})}else{this._pendingSearch.reset(R)}}},this);this.$searchField.on("keydown.searchable-selector input.searchable-selector",N.bind(function(U){if(S){if(U.which===M.keyCode.ESCAPE){this._pendingSearch&&this._pendingSearch.abort()}else{if(U.which===M.keyCode.DOWN&&this._shouldSearch(R)){this.dialog.show()}else{if(U.which===M.keyCode.ENTER&&!this.dialog.is(":visible")){this._pendingSearch&&this._pendingSearch.done(function(){var V=Q._getCurrentScrollable().$scrollElement.find("ul.results-list li.result:first");Q._clickItem(V)})}}}}N.defer(P)},this))};F.prototype._handleSearchInput=function(P){var Q=this._getOptionVal("externalSearchField");if(Q){if(this._shouldSearch(P)){if(!this.dialog.is(":visible")){this.dialog.show()}return this._populateScrollable()}else{this.dialog.hide();return D.Deferred().reject().promise()}}else{return this._populateScrollable()}};F.prototype._initialiseKeyboardNavigation=function(R){var S=this;var Q;var T=false;var P=function(V){var W=S.dialog.is(":visible");if(S._getOptionVal("externalSearchField")&&!W){return }if(T&&!W){S.$trigger.click()}else{S._clickItem(V)}};if(this._resultsKeyboardController){this._resultsKeyboardController.destroy()}if(this.$searchField){Q=this.$searchField}else{if(this.tabs){Q=R.find("ul.tabs-menu")}else{Q=this.$trigger;T=true}}var U=S._getCurrentScrollable().$scrollElement.find("ul.results-list");this._resultsKeyboardController=new E(Q,U,{wrapAround:false,focusedClass:"focused",itemSelector:"li.result",requestMore:function(){var V=S._getCurrentScrollable().loadAfter();return V&&V.then(function(W){return W.isLastPage})},onSelect:function(V){if(S._pendingSearch){S._pendingSearch.done(function(){var W=U.find("li.result:first");if(W.length){P(W)}})}else{P(V)}},focusIntoView:true,adjacentItems:S._getOptionVal("adjacentItems")});if(this._tabKeyboardController){this._tabKeyboardController.destroy()}if(J.isMozilla()||J.isWebkit()){R.addClass("override-focus-style")}this._tabKeyboardController=new C(R)};F.prototype._clickItem=function(P){P.children("a").each(function(){this.click()})};F.prototype.setFocus=function(){if(this.$searchField){this.$searchField.focus()}else{if(this.tabs){this.$content.find("ul.tabs-menu a").first().focus()}else{this.$trigger.focus()}}};F.prototype._createScrollable=function(P){var Q=new K(P,{pageSize:this._getOptionVal("pageSize"),bufferPixels:0,preventOverscroll:true});Q.requestData=N.bind(this.getResults,this,Q);Q.attachNewContent=N.bind(this.addResultsToList,this,Q,false);return Q};F.prototype._populateScrollable=function(Q){Q=Q||this._getCurrentScrollable();this._emptyScrollable(Q);var P=this._getPreloadData();var S=0;if(P){S=this.addResultsToList(Q,true,P)}var R=Q.init();if(S>0){return D.Deferred().resolve().promise()}else{return R}};F.prototype._getPreloadData=function(){var Q=this._getOptionVal("preloadData");var R=this._getSearchTerm();if(Q&&(this._getOptionVal("alwaysShowPreload")||R==="")){var P=this._getOption("dataTransform");if(N.isFunction(P)){Q=P.call(this,Q,R)}}else{Q=null}return Q};F.prototype._emptyScrollable=function(P){P=P||this._getCurrentScrollable();P.reset();this._getDataStoreForScrollable(P).length=0;if(this._getOptionVal("clearResultsOnSearch")){P.$scrollElement.children("ul.results-list").empty()}};F.prototype._getCurrentScrollable=function(){return this.scrollables[this.tabs&&this.currentTabId?this.currentTabId:0]};F.prototype._getDataStoreForScrollable=function(Q){if(!Q){return this.scrollableDataStores[this.tabs&&this.currentTabId?this.currentTabId:0]}var P=N.indexOf(this.scrollables,Q);if(P!==-1){return this.scrollableDataStores[P]}else{return null}};F.prototype._getSearchTerm=function(){return(this.$searchField)?this.$searchField.val():""};F.prototype._updateSearchPlaceholder=function(){if(this.$searchField){this.$searchField.attr("placeholder",this._getOptionVal("searchPlaceholder"))}};F.prototype._getOptionVal=function(P){return this._getOption(P,true)};F.prototype._getOption=function(P,R){var Q;if(this.tabs&&N.contains(this.tabOptionKeys,P)){Q=this.tabs[this.currentTabId||0][P]}else{Q=this.options[P]}return(R)?A(Q,this):Q};F.prototype.setOptions=function(P){this.options=D.extend(true,{},this.defaults,P)};F.prototype.getResults=function(U,W,P){var Q=this;if(this.currentXHR&&this.currentXHR.abort){this.currentXHR.abort()}var T=this._getOption("queryParamsBuilder")||this._defaultQueryParamsBuilder;var S=T.call(this,this._getSearchTerm(),W,P);if(S===null){return D.Deferred().reject().promise()}var V=U.$scrollElement.children("ul.results-list");this._showSpinner(U);V.scrollTop(V[0].scrollHeight);var R=this.currentXHR=L.rest({url:this._getOptionVal("url"),data:S,statusCode:this._getOptionVal("statusCodeHandlers")});R.always(function(){Q._hideSpinner(U);Q.currentXHR=null});return R};F.prototype._showSpinner=function(P){P.$scrollElement.children(".spinner").show().spin()};F.prototype._hideSpinner=function(P){P.$scrollElement.children(".spinner").spinStop().hide()};F.prototype._shouldSearch=function(P){var Q=this._getOption("queryParamsBuilder")||this._defaultQueryParamsBuilder;return Q.call(this,P,0,this._getOptionVal("pageSize"))!=null};F.prototype._defaultQueryParamsBuilder=function(Q,S,P){var R={start:S,limit:P};if(this._getOptionVal("searchable")){R[this._getOptionVal("queryParamKey")]=Q}return R};F.prototype.addResultsToList=function(V,Q,T){var X=this._getOption("dataTransform");var W;if(N.isFunction(X)){T=X.call(this,T,this._getSearchTerm())}if(!Q&&(W=this._getPreloadData())){T=this.dedupeData(T,W)}T=D.extend({},T,{isPreload:Q,noResultsText:this._getOptionVal("noResultsText"),noMoreResultsText:this._getOptionVal("noMoreResultsText")});var U=D(this._getOption("resultsTemplate")(T));var S=this._getDataStoreForScrollable(V);S.push.apply(S,T.values);var R=V.$scrollElement.children("ul.results-list");var P=T.start===0&&!(W&&W.size>0)&&(!Q||T.size>0);if(P){R.empty()}R.append(U).attr("data-last-updated",new Date().getTime());if(P&&T.size>0){this._resultsKeyboardController.moveToNext()}return T.size};F.prototype.dedupeData=function(Q,P){if(Q&&Q.values&&P&&P.values){Q=D.extend(true,{},Q);Q.values=N.reject(Q.values,function(R){return N.find(P.values,function(S){return R.id===S.id})})}return Q};F.prototype.selectItem=function(R,Q){var S=Q.data("id");var P=N.find(this._getDataStoreForScrollable(),function(T){return T.id===S});if(Q.attr("href")!=="#"&&(this._getOptionVal("followLinks")||!H.openInSameTab)){}else{R.preventDefault()}if(!this._selectedItem||this._selectedItem.id!==P.id){this._itemSelected(P)}if(this._getOptionVal("hideDialogOnSelect")){this.dialog.hide()}};F.prototype._itemSelected=function(P){this._selectedItem=P;if(this._getOptionVal("field")){D(this._getOptionVal("field")).val(P.id)}this.updateTrigger({item:P});O.trigger(this._getOptionVal("itemSelectedEvent"),this,P,this._getOptionVal("context"))};F.prototype.updateTrigger=function(P){if(!this._getOptionVal("externalSearchField")){this.$trigger.html(this._getOption("triggerContentTemplate")(P||{}))}};F.prototype.resetTrigger=function(){this.updateTrigger({text:this._getOptionVal("triggerPlaceholder")})};F.prototype.destroy=function(){if(this.blockShortcutPropagation){D(document).add(this.dialog).off("keydown keypress",this.blockShortcutPropagation)}if(this._getOptionVal("externalSearchField")){this.$searchField.off(".searchable-selector")}if(this.dialog){this.dialog.hide();this.dialog.remove();this.dialog=null}if(this._resultsKeyboardController){this._resultsKeyboardController.destroy();this._resultsKeyboardController=null}if(this._tabKeyboardController){this._tabKeyboardController.destroy();this._tabKeyboardController=null}this.$trigger=null;this.scrollables=null;this.scrollableDataStores=null;this.tabs=null;this._initialiseDialogContent=D.noop};function A(Q,P){return N.isFunction(Q)?Q.call(P):Q}return F});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:project-avatar', location = '/static/feature/project/project-avatar/project-avatar.soy' */
// This file was automatically generated from project-avatar.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.project.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.project == 'undefined') { stash.feature.project = {}; }


stash.feature.project.avatar = function(opt_data, opt_ignored) {
  return '' + aui.avatar.avatar({tagName: opt_data.tagName, size: opt_data.size, avatarImageUrl: opt_data.imageUrl ? opt_data.imageUrl : opt_data.project ? require('stash/api/util/navbuilder')._avatarUrl(opt_data.project, ({XSMALL:32,SMALL:48,MEDIUM:64,LARGE:96,XLARGE:128,XXLARGE:192,XXXLARGE:256})[opt_data.size.toUpperCase()]).build() : '', accessibilityText: opt_data.project ? opt_data.project.name : '', title: opt_data.tooltip, badgeContent: opt_data.badgeContent, isProject: ! opt_data.project.owner, imageClasses: opt_data.imageClasses, extraClasses: (opt_data.hideBadge ? ' badge-hidden' : '') + (opt_data.extraClasses ? ' ' + opt_data.extraClasses : ''), extraAttributes: opt_data.extraAttributes});
};
if (goog.DEBUG) {
  stash.feature.project.avatar.soyTemplateName = 'stash.feature.project.avatar';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-item', location = '/static/feature/repository/repository-item/repository-item.soy' */
// This file was automatically generated from repository-item.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.repositoryItem = function(opt_data, opt_ignored) {
  return '<span class="repository-item" title="' + soy.$$escapeHtml(opt_data.repository.project.name) + ' / ' + soy.$$escapeHtml(opt_data.repository.name) + '" data-id="' + soy.$$escapeHtml(opt_data.repository.id) + '" data-repository="' + soy.$$escapeHtml(JSON.stringify(opt_data.repository).replace(/\//g, '\\/')) + '">' + stash.feature.repository.repositoryItemContent({avatarTagName: 'span', repository: opt_data.repository}) + '</span>';
};
if (goog.DEBUG) {
  stash.feature.repository.repositoryItem.soyTemplateName = 'stash.feature.repository.repositoryItem';
}


stash.feature.repository.repositoryItemContent = function(opt_data, opt_ignored) {
  return stash.feature.project.avatar({size: 'xsmall', project: opt_data.repository.project, tagName: opt_data.avatarTagName}) + '<span class="project-and-repository"><span class="project-name">' + ((opt_data.projectNameContent) ? soy.$$filterNoAutoescape(opt_data.projectNameContent) : soy.$$escapeHtml(opt_data.repository.project.name)) + '</span><span class="separator">/</span><span class="name">' + ((opt_data.repositoryNameContent) ? soy.$$filterNoAutoescape(opt_data.repositoryNameContent) : soy.$$escapeHtml(opt_data.repository.name)) + '</span></span>';
};
if (goog.DEBUG) {
  stash.feature.repository.repositoryItemContent.soyTemplateName = 'stash.feature.repository.repositoryItemContent';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:internal-regexp-util', location = '/static/bower/atlassian-regexp/lib/internal/util/regexp.js' */
define("internal/util/regexp",["exports"],function(A){function B(C){return C.replace(/[\-\[\]{}()+?.,\\\^$|#\s]/g,"\\$&")}A.escape=B});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:internal-highlight-text-util', location = '/static/bower/atlassian-highlight-text/lib/internal/util/highlight-text.js' */
define("internal/util/highlight-text",["internal/util/regexp"],function(D){var C=/[&"'<>`]/g;var E=function(G){var F={"<":"&lt;",">":"&gt;","&":"&amp;","'":"&#39;","`":"&#96;"};if(F.hasOwnProperty(G)){return F[G]}return"&quot;"};var A=function(F){return F.replace(C,E)};var B=function(F){return D.escape(A(F))};return{highlight:function(K,H,G){if(!H||H.length===0){return A(K)}var J=(typeof H==="string")?B(H):H.map(B).join("|");var F=(G==null)?"gi":G;var I=new RegExp(J,F);return A(K).replace(I,"<mark>$&</mark>")}}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:highlight-text-util', location = '/static/util/highlight-text.js' */
define("util/highlight-text",["internal/util/highlight-text"],function(A){return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-menu-items', location = '/static/feature/repository/menu-items/repository-menu-items.soy' */
// This file was automatically generated from repository-menu-items.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.menuItems = function(opt_data, opt_ignored) {
  var output = '';
  var repoList3 = opt_data.repos;
  var repoListLen3 = repoList3.length;
  for (var repoIndex3 = 0; repoIndex3 < repoListLen3; repoIndex3++) {
    var repoData3 = repoList3[repoIndex3];
    output += '<li class="repository-item repository-menu-item' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + '"><a data-proj-key="' + soy.$$escapeHtml(repoData3.project.key) + '" data-repo-slug="' + soy.$$escapeHtml(repoData3.slug) + '" data-repo-id="' + soy.$$escapeHtml(repoData3.id) + '" href="' + soy.$$escapeHtml(require('stash/api/util/navbuilder').project(repoData3.project.key).repo(repoData3.slug).browse().build()) + '" title="' + soy.$$escapeHtml(AJS.format("Go to repository \x22{0}\x22 in project \x22{1}\x22",repoData3.name,repoData3.project.name)) + '">' + stash.feature.repository.repositoryItemContent({repository: repoData3, projectNameContent: require('util/highlight-text').highlight(repoData3.project.name, opt_data.projectHighlightText, 'i'), repositoryNameContent: require('util/highlight-text').highlight(repoData3.name, opt_data.repositoryHighlightText, 'i')}) + '</a></li>';
  }
  return output;
};
if (goog.DEBUG) {
  stash.feature.repository.menuItems.soyTemplateName = 'stash.feature.repository.menuItems';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:xregexp', location = '/static/bower/xregexp/src/xregexp.js' */
/*
 * XRegExp 3.0.0-pre
 * <http://xregexp.com/>
 * Steven Levithan � 2007-2012 MIT License
 */
var XRegExp=(function(I){var L="xregexp",U,J={astral:false,natives:false},a={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},F={},S={},B={},R=[],C="default",O="class",g={"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,"class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/},f=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,b=a.exec.call(/()??/,"")[1]===I,N=RegExp.prototype.sticky!==I,e={g:true,i:true,m:true,y:N},Z={}.toString,T;function d(j,h,i){var k;if(i){if(j.__proto__){j.__proto__=U.prototype}else{for(k in U.prototype){j[k]=U.prototype[k]}}}j[L]={captureNames:h};return j}function M(h){return a.replace.call(h,/([\s\S])(?=[\s\S]*\1)/g,"")}function Y(j,i){if(!U.isRegExp(j)){throw new TypeError("Type RegExp expected")}var h=a.exec.call(/\/([a-z]*)$/i,String(j))[1];i=i||{};if(i.add){h=M(h+i.add)}if(i.remove){h=a.replace.call(h,new RegExp("["+i.remove+"]+","g"),"")}j=d(new RegExp(j.source,h),K(j)?j[L].captureNames.slice(0):null,i.addProto);return j}function V(){return{captureNames:null}}function K(h){return !!(h[L]&&h[L].captureNames)}function A(l,k){if(Array.prototype.indexOf){return l.indexOf(k)}var h=l.length,j;for(j=0;j<h;++j){if(l[j]===k){return j}}return -1}function G(i,h){return Z.call(i)==="[object "+h+"]"}function X(i,j,h){return a.test.call(h.indexOf("x")>-1?/^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/,i.slice(j))}function E(k,h){var j;if(M(h)!==h){throw new SyntaxError("Invalid duplicate regex flag "+h)}k=a.replace.call(k,/^\(\?([\w$]+)\)/,function(l,i){if(a.test.call(/[gy]/,i)){throw new SyntaxError("Cannot use flag g or y in mode modifier "+l)}h=M(h+i);return""});for(j=0;j<h.length;++j){if(!e[h.charAt(j)]){throw new SyntaxError("Unknown regex flag "+h.charAt(j))}}return{pattern:k,flags:h}}function P(h){h=h||{};if(G(h,"String")){h=U.forEach(h,/[^\s,]+/,function(i){this[i]=true},{})}return h}function H(h){if(!/^[\w$]$/.test(h)){throw new Error("Flag must be a single character A-Za-z0-9_$")}e[h]=true}function D(m,j,n,p,h){var k=R.length,q=null,l,o;while(k--){o=R[k];if((o.scope===p||o.scope==="all")&&(!o.flag||j.indexOf(o.flag)>-1)){l=U.exec(m,o.regex,n,"sticky");if(l){q={matchLength:l[0].length,output:o.handler.call(h,l,p,j),reparse:o.reparse};break}}}return q}function Q(h){U.cache.flush("patterns");J.astral=h}function c(h){RegExp.prototype.exec=(h?F:a).exec;RegExp.prototype.test=(h?F:a).test;String.prototype.match=(h?F:a).match;String.prototype.replace=(h?F:a).replace;String.prototype.split=(h?F:a).split;J.natives=h}function W(h){if(h==null){throw new TypeError("Cannot convert null or undefined to object")}return h}U=function(l,j){var h={hasNamedCapture:false,captureNames:[]},o=C,i="",m=0,p,k,n;if(U.isRegExp(l)){if(j!==I){throw new TypeError("Cannot supply flags when copying a RegExp")}return Y(l,{addProto:true})}l=l===I?"":String(l);j=j===I?"":String(j);n=l+"***"+j;if(!B[n]){p=E(l,j);l=p.pattern;j=p.flags;while(m<l.length){do{p=D(l,j,m,o,h);if(p&&p.reparse){l=l.slice(0,m)+p.output+l.slice(m+p.matchLength)}}while(p&&p.reparse);if(p){i+=p.output;m+=(p.matchLength||1)}else{k=U.exec(l,g[o],m,"sticky")[0];i+=k;m+=k.length;if(k==="["&&o===C){o=O}else{if(k==="]"&&o===O){o=C}}}}B[n]={pattern:a.replace.call(i,/\(\?:\)(?=\(\?:\))|^\(\?:\)|\(\?:\)$/g,""),flags:a.replace.call(j,/[^gimy]+/g,""),captures:h.hasNamedCapture?h.captureNames:null}}n=B[n];return d(new RegExp(n.pattern,n.flags),n.captures,true)};U.prototype=new RegExp;U.version="3.0.0-pre";U.addToken=function(m,l,j){j=j||{};var h=j.optionalFlags,k;if(j.flag){H(j.flag)}if(h){h=a.split.call(h,"");for(k=0;k<h.length;++k){H(h[k])}}R.push({regex:Y(m,{add:"g"+(N?"y":"")}),handler:l,scope:j.scope||C,flag:j.flag,reparse:j.reparse});U.cache.flush("patterns")};U.cache=function(j,h){var i=j+"***"+(h||"");return S[i]||(S[i]=U(j,h))};U.cache.flush=function(h){if(h==="patterns"){B={}}else{S={}}};U.escape=function(h){return a.replace.call(W(h),/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};U.exec=function(m,k,n,l){var j="g",i,h;if(N&&(l||(k.sticky&&l!==false))){j+="y"}k[L]=k[L]||V();h=k[L][j]||(k[L][j]=Y(k,{add:j,remove:l===false?"y":""}));h.lastIndex=n=n||0;i=F.exec.call(h,m);if(l&&i&&i.index!==n){i=null}if(k.global){k.lastIndex=i?h.lastIndex:0}return i};U.forEach=function(m,l,o,k){var n=0,j=-1,h;while((h=U.exec(m,l,n))){o.call(k,h,++j,m,l);n=h.index+(h[0].length||1)}return k};U.globalize=function(h){return Y(h,{add:"g",addProto:true})};U.install=function(h){h=P(h);if(!J.astral&&h.astral){Q(true)}if(!J.natives&&h.natives){c(true)}};U.isInstalled=function(h){return !!(J[h])};U.isRegExp=function(h){return Z.call(h)==="[object RegExp]"};U.match=function(n,m,k){var l=(m.global&&k!=="one")||k==="all",j=(l?"g":"")+(m.sticky?"y":""),h,i;m[L]=m[L]||V();i=m[L][j||"noGY"]||(m[L][j||"noGY"]=Y(m,{add:j,remove:k==="one"?"g":""}));h=a.match.call(W(n),i);if(m.global){m.lastIndex=((k==="one"&&h)?(h.index+h[0].length):0)}return l?(h||[]):(h&&h[0])};U.matchChain=function(i,h){return(function j(k,p){var n=h[p].regex?h[p]:{regex:h[p]},o=[],l=function(q){if(n.backref){if(!(q.hasOwnProperty(n.backref)||+n.backref<q.length)){throw new ReferenceError("Backreference to undefined group: "+n.backref)}o.push(q[n.backref]||"")}else{o.push(q[0])}},m;for(m=0;m<k.length;++m){U.forEach(k[m],n.regex,l)}return((p===h.length-1)||!o.length)?o:j(o,p+1)}([i],0))};U.replace=function(k,p,i,n){var l=U.isRegExp(p),h=(p.global&&n!=="one")||n==="all",j=(h?"g":"")+(p.sticky?"y":""),m=p,o;if(l){p[L]=p[L]||V();m=p[L][j||"noGY"]||(p[L][j||"noGY"]=Y(p,{add:j,remove:n==="one"?"g":""}))}else{if(h){m=new RegExp(U.escape(String(p)),"g")}}o=F.replace.call(W(k),m,i);if(l&&p.global){p.lastIndex=0}return o};U.replaceEach=function(l,j){var h,k;for(h=0;h<j.length;++h){k=j[h];l=U.replace(l,k[0],k[1],k[2])}return l};U.split=function(j,i,h){return F.split.call(W(j),i,h)};U.test=function(j,h,k,i){return !!U.exec(j,h,k,i)};U.uninstall=function(h){h=P(h);if(J.astral&&h.astral){Q(false)}if(J.natives&&h.natives){c(false)}};U.union=function(h,k){var l=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,j=[],n=0,p,q,o,r=function(s,t,u){var i=q[n-p];if(t){++n;if(i){return"(?<"+i+">"}}else{if(u){return"\\"+(+u+p)}}return s},m;if(!(G(h,"Array")&&h.length)){throw new TypeError("Must provide a nonempty array of patterns to merge")}for(m=0;m<h.length;++m){o=h[m];if(U.isRegExp(o)){p=n;q=(o[L]&&o[L].captureNames)||[];j.push(a.replace.call(U(o.source).source,l,r))}else{j.push(U.escape(o))}}return U(j.join("|"),k)};F.exec=function(n){var h=this.lastIndex,l=a.exec.apply(this,arguments),k,j,m;if(l){if(!b&&l.length>1&&A(l,"")>-1){j=Y(this,{remove:"g"});a.replace.call(String(n).slice(l.index),j,function(){var o=arguments.length,p;for(p=1;p<o-2;++p){if(arguments[p]===I){l[p]=I}}})}if(this[L]&&this[L].captureNames){for(m=1;m<l.length;++m){k=this[L].captureNames[m-1];if(k){l[k]=l[m]}}}if(this.global&&!l[0].length&&(this.lastIndex>l.index)){this.lastIndex=l.index}}if(!this.global){this.lastIndex=h}return l};F.test=function(h){return !!F.exec.call(this,h)};F.match=function(i){var h;if(!U.isRegExp(i)){i=new RegExp(i)}else{if(i.global){h=a.match.apply(this,arguments);i.lastIndex=0;return h}}return F.exec.call(i,W(this))};F.replace=function(k,l){var m=U.isRegExp(k),i,j,h;if(m){if(k[L]){j=k[L].captureNames}i=k.lastIndex}else{k+=""}if(G(l,"Function")){h=a.replace.call(String(this),k,function(){var n=arguments,o;if(j){n[0]=new String(n[0]);for(o=0;o<j.length;++o){if(j[o]){n[0][j[o]]=n[o+1]}}}if(m&&k.global){k.lastIndex=n[n.length-2]+n[0].length}return l.apply(I,n)})}else{h=a.replace.call(this==null?this:String(this),k,function(){var n=arguments;return a.replace.call(String(l),f,function(p,o,r){var q;if(o){q=+o;if(q<=n.length-3){return n[q]||""}q=j?A(j,o):-1;if(q<0){throw new SyntaxError("Backreference to undefined group "+p)}return n[q+1]||""}if(r==="$"){return"$"}if(r==="&"||+r===0){return n[0]}if(r==="`"){return n[n.length-1].slice(0,n[n.length-2])}if(r==="'"){return n[n.length-1].slice(n[n.length-2]+n[0].length)}r=+r;if(!isNaN(r)){if(r>n.length-3){throw new SyntaxError("Backreference to undefined group "+p)}return n[r]||""}throw new SyntaxError("Invalid token "+p)})})}if(m){if(k.global){k.lastIndex=0}else{k.lastIndex=i}}return h};F.split=function(l,i){if(!U.isRegExp(l)){return a.split.apply(this,arguments)}var n=String(this),k=[],h=l.lastIndex,m=0,j;i=(i===I?-1:i)>>>0;U.forEach(n,l,function(o){if((o.index+o[0].length)>m){k.push(n.slice(m,o.index));if(o.length>1&&o.index<n.length){Array.prototype.push.apply(k,o.slice(1))}j=o[0].length;m=o.index+j}});if(m===n.length){if(!a.test.call(l,"")||j){k.push("")}}else{k.push(n.slice(m))}l.lastIndex=h;return k.length>i?k.slice(0,i):k};T=U.addToken;T(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(h,i){if(h[1]==="B"&&i===C){return h[0]}throw new SyntaxError("Invalid escape "+h[0])},{scope:"all"});T(/\[(\^?)]/,function(h){return h[1]?"[\\s\\S]":"\\b\\B"});T(/\(\?#[^)]*\)/,function(i,j,h){return X(i.input,i.index+i[0].length,h)?"":"(?:)"});T(/\s+|#.*/,function(i,j,h){return X(i.input,i.index+i[0].length,h)?"":"(?:)"},{flag:"x"});T(/\./,function(){return"[\\s\\S]"},{flag:"s"});T(/\\k<([\w$]+)>/,function(i){var h=isNaN(i[1])?(A(this.captureNames,i[1])+1):+i[1],j=i.index+i[0].length;if(!h||h>this.captureNames.length){throw new SyntaxError("Backreference to undefined group "+i[0])}return"\\"+h+(j===i.input.length||isNaN(i.input.charAt(j))?"":"(?:)")});T(/\\(\d+)/,function(h,i){if(!(i===C&&/^[1-9]/.test(h[1])&&+h[1]<=this.captureNames.length)&&h[1]!=="0"){throw new SyntaxError("Cannot use octal escape or backreference to undefined group "+h[0])}return h[0]},{scope:"all"});T(/\(\?P?<([\w$]+)>/,function(h){if(!isNaN(h[1])){throw new SyntaxError("Cannot use integer as capture name "+h[0])}if(h[1]==="length"||h[1]==="__proto__"){throw new SyntaxError("Cannot use reserved word as capture name "+h[0])}if(A(this.captureNames,h[1])>-1){throw new SyntaxError("Cannot use same name for multiple groups "+h[0])}this.captureNames.push(h[1]);this.hasNamedCapture=true;return"("});T(/\((?!\?)/,function(i,j,h){if(h.indexOf("n")>-1){return"(?:"}this.captureNames.push(null);return"("},{optionalFlags:"n"});return U}());;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:xregexp', location = '/static/lib/xregexp/xregexp-AMD.js' */
define("xregexp",[],function(){return XRegExp});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:xregexp', location = '/static/bower/xregexp/src/addons/unicode/unicode-base.js' */
/*
 * XRegExp Unicode Base 3.0.0-pre
 * <http://xregexp.com/>
 * Steven Levithan � 2008-2012 MIT License
 * Uses Unicode 6.2.0 <http://unicode.org/>
 * Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
 */
(function(H){var A={};function F(L){return L.replace(/[- _]+/g,"").toLowerCase()}function I(L){while(L.length<4){L="0"+L}return L}function D(L){return parseInt(L,16)}function C(L){return parseInt(L,10).toString(16)}function J(M){var L=/^\\[xu](.+)/.exec(M);return L?D(L[1]):M.charCodeAt(M.charAt(0)==="\\"?1:0)}function B(M){var L="",N=-1,O;H.forEach(M,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(P){O=J(P[1]);if(O>(N+1)){L+="\\u"+I(C(N+1));if(O>(N+2)){L+="-\\u"+I(C(O-1))}}N=J(P[2]||P[1])});if(N<65535){L+="\\u"+I(C(N+1));if(N<65534){L+="-\\uFFFF"}}return L}function E(L){var M="b!";return A[L][M]||(A[L][M]=B(A[L].bmp))}function G(L,M){var O=A[L],N="";if(O.bmp&&!O.isBmpLast){N="["+O.bmp+"]"+(O.astral?"|":"")}if(O.astral){N+=O.astral}if(O.isBmpLast&&O.bmp){N+=(O.astral?"|":"")+"["+O.bmp+"]"}return M?"(?:(?!"+N+")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-\uFFFF]))":"(?:"+N+")"}function K(L,M){var N=M?"a!":"a=";return A[L][N]||(A[L][N]=G(L,M))}H.addToken(/\\([pP])(?:{(\^?)([^}]*)}|([A-Za-z]))/,function(S,W,O){var U="Invalid double negation ",P="Unknown Unicode token ",M="Unicode token missing data ",N="Astral mode required for Unicode token ",L="Astral mode does not support Unicode tokens within character classes",T=S[1]==="P"||!!S[2],R=O.indexOf("A")>-1||H.isInstalled("astral"),Q=F(S[4]||S[3]),V=A[Q];if(S[1]==="P"&&S[2]){throw new SyntaxError(U+S[0])}if(!A.hasOwnProperty(Q)){throw new SyntaxError(P+S[0])}if(V.inverseOf){Q=F(V.inverseOf);if(!A.hasOwnProperty(Q)){throw new ReferenceError(M+S[0]+" -> "+V.inverseOf)}V=A[Q];T=!T}if(!(V.bmp||R)){throw new SyntaxError(N+S[0])}if(R){if(W==="class"){throw new SyntaxError(L)}return K(Q,T)}return W==="class"?(T?E(Q):V.bmp):(T?"[^":"[")+V.bmp+"]"},{scope:"all",optionalFlags:"A"});H.addUnicodeData=function(P){var L="Unicode token requires name",O="Unicode token has no character data ",N,M;for(M=0;M<P.length;++M){N=P[M];if(!N.name){throw new Error(L)}if(!(N.inverseOf||N.bmp||N.astral)){throw new Error(O+N.name)}A[F(N.name)]=N;if(N.alias){A[F(N.alias)]=N}}H.cache.flush("patterns")};H.addUnicodeData([{name:"L",alias:"Letter",bmp:"A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",astral:"\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72]|\uD801[\uDC00-\uDC9D]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1E\uDF30-\uDF40\uDF42-\uDF49\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD81A[\uDC00-\uDE38]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD83-\uDDB2\uDDC1-\uDDC4]|\uD86E[\uDC00-\uDC1D]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD803[\uDC00-\uDC48]|\uD80D[\uDC00-\uDC2E]|\uD805[\uDE80-\uDEAA]|\uD87E[\uDC00-\uDE1D]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD82C[\uDC00\uDC01]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD808[\uDC00-\uDF6E]"}])}(XRegExp));;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:xregexp', location = '/static/bower/xregexp/src/addons/unicode/unicode-categories.js' */
/*
 * XRegExp Unicode Categories 3.0.0-pre
 * <http://xregexp.com/>
 * Steven Levithan � 2010-2012 MIT License
 * Uses Unicode 6.2.0 <http://unicode.org/>
 * Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
 */
(function(A){if(!A.addUnicodeData){throw new ReferenceError("Unicode Base must be loaded before Unicode Categories")}A.addUnicodeData([{name:"C",alias:"Other",isBmpLast:true,bmp:"\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF",astral:"\uD808[\uDF6F-\uDFFF]|\uD809[\uDC63-\uDC6F\uDC74-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7F\uDCBD\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD7F\uDDC9-\uDDCF\uDDDA-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC60-\uDCFF\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDE80-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF80-\uDFFF]|\uD86D[\uDF35-\uDF3F]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFFF]|\uD86E[\uDC1E-\uDFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8B-\uDD8F\uDD9C-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF1F\uDF24-\uDF2F\uDF4B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]|\uD803[\uDC49-\uDE5F\uDE7F-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|[\uD806\uD807\uD80A\uD80B\uD80E-\uD819\uD81C-\uD82B\uD82D-\uD833\uD836-\uD83A\uD83E\uD83F\uD86F-\uD87D\uD87F-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD83D[\uDC3F\uDC41\uDCF8\uDCFD-\uDCFF\uDD3E\uDD3F\uDD44-\uDD4F\uDD68-\uDDFA\uDE41-\uDE44\uDE50-\uDE7F\uDEC6-\uDEFF\uDF74-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCBF\uDCC0\uDCD0\uDCE0-\uDCFF\uDD0B-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF\uDF21-\uDF2F\uDF36\uDF7D-\uDF7F\uDF94-\uDF9F\uDFC5\uDFCB-\uDFDF\uDFF1-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD81A[\uDE39-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDDE-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDFFF]|\uD805[\uDC00-\uDE7F\uDEB8-\uDEBF\uDECA-\uDFFF]|\uD82C[\uDC02-\uDFFF]"},{name:"Cc",alias:"Control",bmp:"\0-\x1F\x7F-\x9F"},{name:"Cf",alias:"Format",bmp:"\xAD\u0600-\u0604\u06DD\u070F\u200B-\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\uFEFF\uFFF9-\uFFFB",astral:"\uDB40[\uDC01\uDC20-\uDC7F]|\uD834[\uDD73-\uDD7A]|\uD804\uDCBD"},{name:"Cn",alias:"Unassigned",bmp:"\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u05FF\u0605\u061C\u061D\u070E\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u2065-\u2069\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD\uFEFE\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFF8\uFFFE\uFFFF",astral:"\uD808[\uDF6F-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDDE-\uDDFF\uDE46-\uDEFF\uDF57-\uDF5F\uDF72-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC60-\uDCFF\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE34-\uDE37\uDE3B-\uDE3E\uDE48-\uDE4F\uDE59-\uDE5F\uDE80-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF80-\uDFFF]|\uD86D[\uDF35-\uDF3F]|\uD81B[\uDC00-\uDEFF\uDF45-\uDF4F\uDF7F-\uDF8E\uDFA0-\uDFFF]|\uD809[\uDC63-\uDC6F\uDC74-\uDFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8B-\uDD8F\uDD9C-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEFF\uDF1F\uDF24-\uDF2F\uDF4B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD869[\uDED7-\uDEFF]|\uD804[\uDC4E-\uDC51\uDC70-\uDC7F\uDCC2-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD44-\uDD7F\uDDC9-\uDDCF\uDDDA-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD803[\uDC49-\uDE5F\uDE7F-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|[\uD806\uD807\uD80A\uD80B\uD80E-\uD819\uD81C-\uD82B\uD82D-\uD833\uD836-\uD83A\uD83E\uD83F\uD86F-\uD87D\uD87F-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD83D[\uDC3F\uDC41\uDCF8\uDCFD-\uDCFF\uDD3E\uDD3F\uDD44-\uDD4F\uDD68-\uDDFA\uDE41-\uDE44\uDE50-\uDE7F\uDEC6-\uDEFF\uDF74-\uDFFF]|\uD86E[\uDC1E-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCBF\uDCC0\uDCD0\uDCE0-\uDCFF\uDD0B-\uDD0F\uDD2F\uDD6C-\uDD6F\uDD9B-\uDDE5\uDE03-\uDE0F\uDE3B-\uDE3F\uDE49-\uDE4F\uDE52-\uDEFF\uDF21-\uDF2F\uDF36\uDF7D-\uDF7F\uDF94-\uDF9F\uDFC5\uDFCB-\uDFDF\uDFF1-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD81A[\uDE39-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDFFF]|\uD805[\uDC00-\uDE7F\uDEB8-\uDEBF\uDECA-\uDFFF]|\uD82C[\uDC02-\uDFFF]"},{name:"Co",alias:"Private_Use",bmp:"\uE000-\uF8FF",astral:"[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]"},{name:"Cs",alias:"Surrogate",bmp:"\uD800-\uDFFF"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-z\xB5\xDF-\xF6\xF8-\xFF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A",astral:"\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD801[\uDC28-\uDC4F]"},{name:"Lm",alias:"Modifier_Letter",bmp:"\u02B0-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0374\u037A\u0559\u0640\u06E5\u06E6\u07F4\u07F5\u07FA\u081A\u0824\u0828\u0971\u0E46\u0EC6\u10FC\u17D7\u1843\u1AA7\u1C78-\u1C7D\u1D2C-\u1D6A\u1D78\u1D9B-\u1DBF\u2071\u207F\u2090-\u209C\u2C7C\u2C7D\u2D6F\u2E2F\u3005\u3031-\u3035\u303B\u309D\u309E\u30FC-\u30FE\uA015\uA4F8-\uA4FD\uA60C\uA67F\uA717-\uA71F\uA770\uA788\uA7F8\uA7F9\uA9CF\uAA70\uAADD\uAAF3\uAAF4\uFF70\uFF9E\uFF9F",astral:"\uD81B[\uDF93-\uDF9F]"},{name:"Lo",alias:"Other_Letter",bmp:"\xAA\xBA\u01BB\u01C0-\u01C3\u0294\u05D0-\u05EA\u05F0-\u05F2\u0620-\u063F\u0641-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u0800-\u0815\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0972-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E45\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10D0-\u10FA\u10FD-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17DC\u1820-\u1842\u1844-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C77\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u2135-\u2138\u2D30-\u2D67\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3006\u303C\u3041-\u3096\u309F\u30A1-\u30FA\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA014\uA016-\uA48C\uA4D0-\uA4F7\uA500-\uA60B\uA610-\uA61F\uA62A\uA62B\uA66E\uA6A0-\uA6E5\uA7FB-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA6F\uAA71-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB\uAADC\uAAE0-\uAAEA\uAAF2\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF66-\uFF6F\uFF71-\uFF9D\uFFA0-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",astral:"\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1E\uDF30-\uDF40\uDF42-\uDF49\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD81A[\uDC00-\uDE38]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD83-\uDDB2\uDDC1-\uDDC4]|\uD86E[\uDC00-\uDC1D]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD803[\uDC00-\uDC48]|\uD80D[\uDC00-\uDC2E]|\uD805[\uDE80-\uDEAA]|\uD87E[\uDC00-\uDE1D]|\uD81B[\uDF00-\uDF44\uDF50]|\uD801[\uDC50-\uDC9D]|\uD82C[\uDC00\uDC01]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD808[\uDC00-\uDF6E]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"\u01C5\u01C8\u01CB\u01F2\u1F88-\u1F8F\u1F98-\u1F9F\u1FA8-\u1FAF\u1FBC\u1FCC\u1FFC"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-Z\xC0-\xD6\xD8-\xDE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A",astral:"\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD801[\uDC00-\uDC27]"},{name:"M",alias:"Mark",bmp:"\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u08FE\u0900-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C01-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C82\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D02\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1DC0-\u1DE6\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26",astral:"\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC80-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD80-\uDD82\uDDB3-\uDDC0]|\uD805[\uDEAB-\uDEB7]|\uD800\uDDFD|\uDB40[\uDD00-\uDDEF]"},{name:"Mc",alias:"Spacing_Mark",bmp:"\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BE-\u09C0\u09C7\u09C8\u09CB\u09CC\u09D7\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD7\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0-\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0D02\u0D03\u0D3E-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D57\u0D82\u0D83\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DF2\u0DF3\u0F3E\u0F3F\u0F7F\u102B\u102C\u1031\u1038\u103B\u103C\u1056\u1057\u1062-\u1064\u1067-\u106D\u1083\u1084\u1087-\u108C\u108F\u109A-\u109C\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u19B0-\u19C0\u19C8\u19C9\u1A19-\u1A1B\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1B04\u1B35\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BAC\u1BAD\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF2\u1CF3\u302E\u302F\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BD-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAA7B\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC",astral:"\uD834[\uDD65\uDD66\uDD6D-\uDD72]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0]|\uD805[\uDEAC\uDEAE\uDEAF\uDEB6]|\uD81B[\uDF51-\uDF7E]"},{name:"Me",alias:"Enclosing_Mark",bmp:"\u0488\u0489\u20DD-\u20E0\u20E2-\u20E4\uA670-\uA672"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u08FE\u0900-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1DC0-\u1DE6\u1DFC-\u1DFF\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE26",astral:"\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD81B[\uDF8F-\uDF92]|\uD805[\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7]|\uD804[\uDC01\uDC38-\uDC46\uDC80\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD80\uDD81\uDDB6-\uDDBE]|\uD800\uDDFD|\uDB40[\uDD00-\uDDEF]"},{name:"N",alias:"Number",bmp:"0-9\xB2\xB3\xB9\xBC-\xBE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19",astral:"\uD802[\uDC58-\uDC5F\uDD16-\uDD1B\uDE40-\uDE47\uDE7D\uDE7E\uDF58-\uDF5F\uDF78-\uDF7F]|\uD801[\uDCA0-\uDCA9]|\uD809[\uDC00-\uDC62]|\uD835[\uDFCE-\uDFFF]|\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD834[\uDF60-\uDF71]|\uD803[\uDE60-\uDE7E]|\uD83C[\uDD00-\uDD0A]|\uD805[\uDEC0-\uDEC9]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19",astral:"\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9]|\uD805[\uDEC0-\uDEC9]|\uD801[\uDCA0-\uDCA9]|\uD835[\uDFCE-\uDFFF]"},{name:"Nl",alias:"Letter_Number",bmp:"\u16EE-\u16F0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303A\uA6E6-\uA6EF",astral:"\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC62]"},{name:"No",alias:"Other_Number",bmp:"\xB2\xB3\xB9\xBC-\xBE\u09F4-\u09F9\u0B72-\u0B77\u0BF0-\u0BF2\u0C78-\u0C7E\u0D70-\u0D75\u0F2A-\u0F33\u1369-\u137C\u17F0-\u17F9\u19DA\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215F\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA830-\uA835",astral:"\uD802[\uDC58-\uDC5F\uDD16-\uDD1B\uDE40-\uDE47\uDE7D\uDE7E\uDF58-\uDF5F\uDF78-\uDF7F]|\uD834[\uDF60-\uDF71]|\uD803[\uDE60-\uDE7E]|\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDF20-\uDF23]|\uD83C[\uDD00-\uDD0A]|\uD804[\uDC52-\uDC65]"},{name:"P",alias:"Punctuation",bmp:"\x21-\x23\x25-\\x2A\x2C-\x2F\x3A\x3B\\x3F\x40\\x5B-\\x5D\x5F\\x7B\x7D\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65",astral:"\uD809[\uDC70-\uDC73]|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDF39-\uDF3F]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDDC5-\uDDC8]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"\x5F\u203F\u2040\u2054\uFE33\uFE34\uFE4D-\uFE4F\uFF3F"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\x2D\u058A\u05BE\u1400\u1806\u2010-\u2015\u2E17\u2E1A\u2E3A\u2E3B\u301C\u3030\u30A0\uFE31\uFE32\uFE58\uFE63\uFF0D"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\x29\\x5D\x7D\u0F3B\u0F3D\u169C\u2046\u207E\u208E\u232A\u2769\u276B\u276D\u276F\u2771\u2773\u2775\u27C6\u27E7\u27E9\u27EB\u27ED\u27EF\u2984\u2986\u2988\u298A\u298C\u298E\u2990\u2992\u2994\u2996\u2998\u29D9\u29DB\u29FD\u2E23\u2E25\u2E27\u2E29\u3009\u300B\u300D\u300F\u3011\u3015\u3017\u3019\u301B\u301E\u301F\uFD3F\uFE18\uFE36\uFE38\uFE3A\uFE3C\uFE3E\uFE40\uFE42\uFE44\uFE48\uFE5A\uFE5C\uFE5E\uFF09\uFF3D\uFF5D\uFF60\uFF63"},{name:"Pf",alias:"Final_Punctuation",bmp:"\xBB\u2019\u201D\u203A\u2E03\u2E05\u2E0A\u2E0D\u2E1D\u2E21"},{name:"Pi",alias:"Initial_Punctuation",bmp:"\xAB\u2018\u201B\u201C\u201F\u2039\u2E02\u2E04\u2E09\u2E0C\u2E1C\u2E20"},{name:"Po",alias:"Other_Punctuation",bmp:"\x21-\x23\x25-\x27\\x2A\x2C\\x2E\x2F\x3A\x3B\\x3F\x40\\x5C\xA1\xA7\xB6\xB7\xBF\u037E\u0387\u055A-\u055F\u0589\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u166D\u166E\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u1805\u1807-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2016\u2017\u2020-\u2027\u2030-\u2038\u203B-\u203E\u2041-\u2043\u2047-\u2051\u2053\u2055-\u205E\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00\u2E01\u2E06-\u2E08\u2E0B\u2E0E-\u2E16\u2E18\u2E19\u2E1B\u2E1E\u2E1F\u2E2A-\u2E2E\u2E30-\u2E39\u3001-\u3003\u303D\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFE10-\uFE16\uFE19\uFE30\uFE45\uFE46\uFE49-\uFE4C\uFE50-\uFE52\uFE54-\uFE57\uFE5F-\uFE61\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF07\uFF0A\uFF0C\uFF0E\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3C\uFF61\uFF64\uFF65",astral:"\uD809[\uDC70-\uDC73]|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDF39-\uDF3F]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDDC5-\uDDC8]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\x28\\x5B\\x7B\u0F3A\u0F3C\u169B\u201A\u201E\u2045\u207D\u208D\u2329\u2768\u276A\u276C\u276E\u2770\u2772\u2774\u27C5\u27E6\u27E8\u27EA\u27EC\u27EE\u2983\u2985\u2987\u2989\u298B\u298D\u298F\u2991\u2993\u2995\u2997\u29D8\u29DA\u29FC\u2E22\u2E24\u2E26\u2E28\u3008\u300A\u300C\u300E\u3010\u3014\u3016\u3018\u301A\u301D\uFD3E\uFE17\uFE35\uFE37\uFE39\uFE3B\uFE3D\uFE3F\uFE41\uFE43\uFE47\uFE59\uFE5B\uFE5D\uFF08\uFF3B\uFF5B\uFF5F\uFF62"},{name:"S",alias:"Symbol",bmp:"\\x24\\x2B\x3C-\x3E\\x5E\x60\\x7C\x7E\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20BA\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u2190-\u2328\u232B-\u23F3\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u26FF\u2701-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B4C\u2B50-\u2B59\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uFB29\uFBB2-\uFBC1\uFDFC\uFDFD\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD",astral:"\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCF7\uDCF9-\uDCFC\uDD00-\uDD3D\uDD40-\uDD43\uDD50-\uDD67\uDDFB-\uDE40\uDE45-\uDE4F\uDE80-\uDEC5\uDF00-\uDF73]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBE\uDCC1-\uDCCF\uDCD1-\uDCDF\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDF20\uDF30-\uDF35\uDF37-\uDF7C\uDF80-\uDF93\uDFA0-\uDFC4\uDFC6-\uDFCA\uDFE0-\uDFF0]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDDD\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD90-\uDD9B\uDDD0-\uDDFC]|\uD83B[\uDEF0\uDEF1]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\x24\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BA\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\x5E\x60\xA8\xAF\xB4\xB8\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u309B\u309C\uA700-\uA716\uA720\uA721\uA789\uA78A\uFBB2-\uFBC1\uFF3E\uFF40\uFFE3"},{name:"Sm",alias:"Math_Symbol",bmp:"\\x2B\x3C-\x3E\\x7C\x7E\xAC\xB1\xD7\xF7\u03F6\u0606-\u0608\u2044\u2052\u207A-\u207C\u208A-\u208C\u2118\u2140-\u2144\u214B\u2190-\u2194\u219A\u219B\u21A0\u21A3\u21A6\u21AE\u21CE\u21CF\u21D2\u21D4\u21F4-\u22FF\u2308-\u230B\u2320\u2321\u237C\u239B-\u23B3\u23DC-\u23E1\u25B7\u25C1\u25F8-\u25FF\u266F\u27C0-\u27C4\u27C7-\u27E5\u27F0-\u27FF\u2900-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2AFF\u2B30-\u2B44\u2B47-\u2B4C\uFB29\uFE62\uFE64-\uFE66\uFF0B\uFF1C-\uFF1E\uFF5C\uFF5E\uFFE2\uFFE9-\uFFEC",astral:"\uD83B[\uDEF0\uDEF1]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]"},{name:"So",alias:"Other_Symbol",bmp:"\xA6\xA9\xAE\xB0\u0482\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u09FA\u0B70\u0BF3-\u0BF8\u0BFA\u0C7F\u0D79\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116\u2117\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u214A\u214C\u214D\u214F\u2195-\u2199\u219C-\u219F\u21A1\u21A2\u21A4\u21A5\u21A7-\u21AD\u21AF-\u21CD\u21D0\u21D1\u21D3\u21D5-\u21F3\u2300-\u2307\u230C-\u231F\u2322-\u2328\u232B-\u237B\u237D-\u239A\u23B4-\u23DB\u23E2-\u23F3\u2400-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u25B6\u25B8-\u25C0\u25C2-\u25F7\u2600-\u266E\u2670-\u26FF\u2701-\u2767\u2794-\u27BF\u2800-\u28FF\u2B00-\u2B2F\u2B45\u2B46\u2B50-\u2B59\u2CE5-\u2CEA\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u32FE\u3300-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA828-\uA82B\uA836\uA837\uA839\uAA77-\uAA79\uFDFD\uFFE4\uFFE8\uFFED\uFFEE\uFFFC\uFFFD",astral:"\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCF7\uDCF9-\uDCFC\uDD00-\uDD3D\uDD40-\uDD43\uDD50-\uDD67\uDDFB-\uDE40\uDE45-\uDE4F\uDE80-\uDEC5\uDF00-\uDF73]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDDD\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBE\uDCC1-\uDCCF\uDCD1-\uDCDF\uDD10-\uDD2E\uDD30-\uDD6B\uDD70-\uDD9A\uDDE6-\uDE02\uDE10-\uDE3A\uDE40-\uDE48\uDE50\uDE51\uDF00-\uDF20\uDF30-\uDF35\uDF37-\uDF7C\uDF80-\uDF93\uDFA0-\uDFC4\uDFC6-\uDFCA\uDFE0-\uDFF0]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD90-\uDD9B\uDDD0-\uDDFC]"},{name:"Z",alias:"Separator",bmp:"\x20\xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000"},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"\x20\xA0\u1680\u180E\u2000-\u200A\u202F\u205F\u3000"}])}(XRegExp));;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-search', location = '/static/feature/repository/repository-search/repository-search.soy' */
// This file was automatically generated from repository-search.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.repositorySearch = function(opt_data, opt_ignored) {
  return '<form class="aui-quicksearch"><div class="repository-search-trigger"><label class="assistive" for="repository-search">' + soy.$$escapeHtml("Find a repository...") + '</label><input id="repository-search" type="text" autocomplete="off" placeholder="' + soy.$$escapeHtml("Find a repository...") + '"/><div class="spinner"></div></div></form>';
};
if (goog.DEBUG) {
  stash.feature.repository.repositorySearch.soyTemplateName = 'stash.feature.repository.repositorySearch';
}


stash.feature.repository.repositorySearchResults = function(opt_data, opt_ignored) {
  return '' + ((! (opt_data.isPreload && opt_data.size == 0)) ? '<div class="results-section' + ((opt_data.isPreload) ? ' recently-viewed' : '') + '">' + stash.feature.repository.menuItems({repos: opt_data.values, extraClasses: 'result', projectHighlightText: opt_data.projectSearchTerm, repositoryHighlightText: opt_data.repositorySearchTerm}) + ((opt_data.isLastPage) ? (opt_data.size > 0) ? '<li class="no-results">' + soy.$$escapeHtml(opt_data.noMoreResultsText) + '</li>' : '<li class="no-results">' + soy.$$escapeHtml(opt_data.noResultsText) + '</li>' : '') + '</div>' : '');
};
if (goog.DEBUG) {
  stash.feature.repository.repositorySearchResults.soyTemplateName = 'stash.feature.repository.repositorySearchResults';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-search', location = '/static/feature/repository/repository-search/repository-search.js' */
define("feature/repository/repository-search",["aui","jquery","lodash","xregexp","stash/api/util/navbuilder","util/events","widget/searchable-selector"],function(F,B,G,E,A,I,D){var C=null;I.on("stash.feature.repositories.recent.loaded",function(J){C=J});var H=function(M,K,J){J=J||{};J.externalSearchField=M;var L=this.init(K,J);L._bindSearchFieldEvents();L.dialog.on("click","a",function(){I.trigger("internal.stash.ui.nav.search.result.clicked",null,{repositoryId:B(this).attr("data-repo-id")})});return L};B.extend(H.prototype,D.prototype);H.prototype._generatePreloadData=function(){if(C==null){return null}var J;var L=this._parseSearchTerm(this._getSearchTerm());if(L){var M=L.projectName&&new RegExp("^"+E.escape(L.projectName),"i");var K=L.repositoryName&&new RegExp("^"+E.escape(L.repositoryName),"i");J=G.filter(C.values,function(N){return(L.projectName==null||N.project.name.match(M)!=null)&&(L.repositoryName==null||N.name.match(K)!=null)})}else{J=C.values}J.sort(function(O,N){return(L&&L.projectName?O.project.name.localeCompare(N.project.name):0)||O.name.localeCompare(N.name)||O.id-N.id});return G.extend({},C,{values:J,size:J.length,isLastPage:false})};H.prototype.defaults=B.extend({},D.prototype.defaults,{extraClasses:"repository-search-dialog",url:A.rest().allRepos().withParams({avatarSize:stash.widget.avatarSizeInPx({size:"xsmall"})}).build(),queryParamsBuilder:function(K,M,J){var L=this._parseSearchTerm(K);if(L==null){return null}return{start:M,limit:J,name:L.repositoryName,projectname:L.projectName}},dataTransform:function(L,J){var K=this._parseSearchTerm(J);if(K==null){return L}return B.extend({repositorySearchTerm:K.repositoryName,projectSearchTerm:K.projectName},L)},preloadData:H.prototype._generatePreloadData,alwaysShowPreload:true,followLinks:true,resultsTemplate:stash.feature.repository.repositorySearchResults,noResultsText:"No repositories matching your search",noMoreResultsText:"No more repositories",adjacentItems:false,clearResultsOnSearch:false,popUpOffsetY:1});H.prototype._bindSearchFieldEvents=function(){var J=this;this.$searchField.on("keydown.repository-search",function(K){if(K.which===F.keyCode.ENTER){K.preventDefault()}});this.$searchField.on("keyup.repository-search",function(K){var L=J.dialog.is(":visible");if(!L&&K.which===F.keyCode.ESCAPE){B(this).blur()}});this.$searchField.on("focus",function(){I.trigger("internal.stash.ui.nav.search.focused")})};H.prototype._parseSearchTerm=function(J){J=B.trim(J);if(J===""||J==="/"){return null}var L={};var K=J.lastIndexOf("/");if(K===-1){L.projectName=null;L.repositoryName=J}else{L.projectName=B.trim(J.substr(0,K));L.repositoryName=B.trim(J.substr(K+1))}return L};H.prototype._showSpinner=function(J){J.$scrollElement.find(".spinner").hide();this.$searchField.closest(".aui-quicksearch").addClass("loading");this.$searchField.next(".spinner").spin()};H.prototype._hideSpinner=function(){this.$searchField.closest(".aui-quicksearch").removeClass("loading");this.$searchField.next(".spinner").spinStop()};return H});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:base-layout', location = '/static/layout/base/base.js' */
define("layout/base",["aui","jquery","lodash","memoir","stash/api/util/navbuilder","util/analytics","util/client-storage","util/events","model/page-state","model/stash-user","widget/aui/dropdown","widget/aui/form","feature/repository/repository-search","exports"],function(J,F,Q,M,I,H,K,C,L,N,P,D,A,R){if(location.search){var G=I.parse(location.href),B=G.getQueryParamValue("eve");B&&C.on(B,function(){console.log([C.name()],this,arguments)})}function O(S){if(S){S.isAdmin=!!F("#header").find("a.admin-link").length;L.setCurrentUser(new N(S))}}function E(S){if(!K.getSessionItem(S)){K.setSessionItem(S,true);H.add("demographics",{d_lang:document.documentElement.lang},true)}}R.onReady=function(V,T){O(V);P.onReady();D.onReady();J.params["build-number"]=encodeURIComponent(F("#product-version").attr("data-system-build-number"));var W=F(window);var U=Q.debounce(function(){C.trigger("window.resize.debounced",W,W.width(),W.height())},200);W.on("resize",U);var X=Q.throttle(function(){C.trigger("window.scroll.throttled",W,W.scrollTop())},25);W.on("scroll",X);var S=F("#repository-search");new A(S,S.closest(".repository-search-trigger"));M.setTitleSuffix(" - "+T);E(K.buildKey("demographic-analytics","user"))};C.on("memoir.changestate",function(T){var S=F("#login-link");if(S.length&&T.state){S.attr("href",I.login().next().build())}F("body").children(".tipsy").remove()})});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:quick-copy-text', location = '/static/widget/quick-copy-text.js' */
define("widget/quick-copy-text",["jquery","exports"],function(B,A){var C=true;A.onReady=function(){if(C){C=false;B(document).on("click",".quick-copy-text",function(D){this.focus();this.select()})}}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:browser-location', location = '/static/util/browser-location.js' */
define("util/browser-location",["exports"],function(A){A.location=window.location});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:sticky-branches', location = '/static/feature/repository/sticky-branches.js' */
define("feature/repository/sticky-branches",["jquery","stash/api/util/navbuilder","util/browser-location","util/client-storage","util/events","util/text","exports"],function(E,A,B,C,L,F,D){var I;var J;var K;D.onReady=function(){var P=A.parse(B.location.href),S=A.currentRepo().browse().build(),T=A.currentRepo().commits().build(),O=P.path().indexOf(S)===0,U=P.path()===T,X=O?P.getQueryParamValue("at"):U?P.getQueryParamValue("until"):undefined,M=O||U,W=C.buildKey("current-branch","repo"),V=C.getSessionItem(W);I=E("#repository-nav-files");J=E("#repository-nav-commits");K=E("#repository-nav-branches");var Q;if(X&&O){var R=E("[data-revision-ref]","#repository-layout-revision-selector").data("revision-ref");Q=R&&((R.id===X&&R.type.id==="commit")||(R.id!==X&&(R.type.id==="branch"||R.type.id==="tag")&&/^[0-9a-f]{7,40}$/.test(X)))}var N=!(O&&Q);if(X&&N){X=decodeURIComponent(X);if(X!==V){C.setSessionItem(W,X)}H(X)}else{if(M&&N){C.removeSessionItem(W)}else{if(V){H(V)}}}L.on("stash.layout.branch.revisionRefChanged",function(Y){if(Y){if(!Y.getIsDefault()){var Z=Y.getId();H(Z);C.setSessionItem(W,Z)}else{G();C.removeSessionItem(W)}}});L.on("stash.*.*.revisionRefRemoved",function(Z){var Y=C.getSessionItem(W);if(Y&&F.endsWith(Z.id,Y)){G();C.removeSessionItem(W)}})};function H(M){if(M){M=encodeURIComponent(M);I.attr("href",A.parse(I.attr("href")).replaceQueryParam("at",M));J.attr("href",A.parse(J.attr("href")).replaceQueryParam("until",M));K.attr("href",A.parse(K.attr("href")).replaceQueryParam("base",M))}else{G()}}function G(){I.attr("href",A.parse(I.attr("href")).deleteQueryParam("at"));J.attr("href",A.parse(J.attr("href")).deleteQueryParam("until"));K.attr("href",A.parse(K.attr("href")).deleteQueryParam("base"))}});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:lozenge-internal', location = '/static/widget/lozenge/lozenge.soy' */
// This file was automatically generated from lozenge.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.lozenge.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }
if (typeof stash.widget.lozenge == 'undefined') { stash.widget.lozenge = {}; }


stash.widget.lozenge.lozenge = function(opt_data, opt_ignored) {
  var output = '';
  var tag__soy3 = opt_data.href ? 'a' : opt_data.htmlElement ? opt_data.htmlElement : opt_data.clickable ? 'button' : 'span';
  output += '<' + soy.$$escapeHtml(tag__soy3) + ' class="aui-lozenge' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + ((opt_data.monospace) ? ' monospace-lozenge' : '') + '"' + ((opt_data.href) ? ' href="' + soy.$$escapeHtml(opt_data.href) + '"' : '') + ((opt_data.tooltip) ? ' title="' + soy.$$escapeHtml(opt_data.tooltip) + '"' : '') + '>' + ((opt_data.maxLength) ? soy.$$escapeHtml(soy.$$truncate(opt_data.text, opt_data.maxLength, true)) : soy.$$escapeHtml(opt_data.text)) + '</' + soy.$$escapeHtml(tag__soy3) + '>';
  return output;
};
if (goog.DEBUG) {
  stash.widget.lozenge.lozenge.soyTemplateName = 'stash.widget.lozenge.lozenge';
}


stash.widget.lozenge.htmlLozenge = function(opt_data, opt_ignored) {
  return '<' + ((opt_data.htmlElement) ? soy.$$escapeHtml(opt_data.htmlElement) : 'a') + ' class="aui-lozenge' + ((opt_data.extraClasses) ? ' ' + soy.$$escapeHtml(opt_data.extraClasses) : '') + ((opt_data.monospace) ? ' monospace-lozenge' : '') + '"' + ((opt_data.href) ? ' href="' + soy.$$escapeHtml(opt_data.href) + '"' : '') + ((opt_data.tooltip) ? ' title="' + soy.$$escapeHtml(opt_data.tooltip) + '"' : '') + ((opt_data.extraAttributes) ? aui.renderExtraAttributes(opt_data) : '') + '>' + soy.$$filterNoAutoescape(opt_data.content) + '</' + ((opt_data.htmlElement) ? soy.$$escapeHtml(opt_data.htmlElement) : 'a') + '>';
};
if (goog.DEBUG) {
  stash.widget.lozenge.htmlLozenge.soyTemplateName = 'stash.widget.lozenge.htmlLozenge';
}


stash.widget.lozenge.merge = function(opt_data, opt_ignored) {
  opt_data = opt_data || {};
  return '' + stash.widget.lozenge.lozenge({extraClasses: 'merge-lozenge' + (opt_data.extraClasses ? ' ' + opt_data.extraClasses : '') + (opt_data.abbreviated ? ' abbreviated' : ''), text: '' + soy.$$escapeHtml(opt_data.abbreviated ? "M" : "Merge"), tooltip: '' + soy.$$escapeHtml("This commit is a merge.")});
};
if (goog.DEBUG) {
  stash.widget.lozenge.merge.soyTemplateName = 'stash.widget.lozenge.merge';
}


stash.widget.lozenge.pullRequestState = function(opt_data, opt_ignored) {
  var output = '';
  var commonClasses__soy84 = opt_data.extraClasses ? opt_data.extraClasses + ' pull-request-state-lozenge' : ' pull-request-state-lozenge';
  switch (opt_data.state) {
    case 'OPEN':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-complete open' + commonClasses__soy84, text: "OPEN", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request is in progress.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'OPENED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-complete opened' + commonClasses__soy84, text: opt_data.isActivityContext ? "opened" : "OPENED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request is in progress.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'MERGED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-success merged' + commonClasses__soy84, text: opt_data.isActivityContext ? "merged" : "MERGED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been merged.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'DECLINED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-error declined' + commonClasses__soy84, text: opt_data.isActivityContext ? "declined" : "DECLINED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been declined.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'REOPENED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-complete reopened' + commonClasses__soy84, text: opt_data.isActivityContext ? "reopened" : "REOPENED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been reopened.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'UPDATED':
    case 'RESCOPED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-current updated' + commonClasses__soy84, text: opt_data.isActivityContext ? "updated" : "UPDATED", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been updated.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'APPROVED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-success approved' + commonClasses__soy84, text: opt_data.isActivityContext ? "approved" : "Approved", tooltip: opt_data.tooltip ? opt_data.tooltip : "This pull request has been approved.", clickable: opt_data.clickable, href: opt_data.href});
      break;
    case 'UNAPPROVED':
      output += stash.widget.lozenge.lozenge({extraClasses: 'aui-lozenge-error unapproved' + commonClasses__soy84, text: opt_data.isActivityContext ? "unapproved" : "Unapproved", tooltip: opt_data.tooltip ? opt_data.tooltip : "The approval has been withdrawn from this pull request.", clickable: opt_data.clickable, href: opt_data.href});
      break;
  }
  return output;
};
if (goog.DEBUG) {
  stash.widget.lozenge.pullRequestState.soyTemplateName = 'stash.widget.lozenge.pullRequestState';
}


stash.widget.lozenge.enabled = function(opt_data, opt_ignored) {
  return '' + stash.widget.lozenge.lozenge({extraClasses: opt_data.isEnabled ? 'lozenge-enabled' : 'lozenge-disabled', text: opt_data.isEnabled ? "Enabled" : "Disabled", tooltip: opt_data.tooltip});
};
if (goog.DEBUG) {
  stash.widget.lozenge.enabled.soyTemplateName = 'stash.widget.lozenge.enabled';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:project-model', location = '/static/model/project.js' */
define("model/project",["backbone-brace","model/stash-user"],function(B,A){var C=B.Model.extend({namedAttributes:{id:"number",name:"string",key:"string",description:"string",type:"string",owner:A,avatarUrl:"string",link:Object,links:Object,"public":"boolean"},isEqual:function(D){return !!(D&&D instanceof C&&this.id===D.id)}},{projectType:{NORMAL:"NORMAL",PERSONAL:"PERSONAL"}});return C});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-model', location = '/static/model/repository.js' */
define("model/repository",["backbone-brace","model/project"],function(B,C){var A=B.Model.extend({namedAttributes:{id:"number",name:"string",slug:"string",project:C,"public":"boolean",scmId:"string",state:"string",statusMessage:"string",forkable:"boolean",cloneUrl:"string",link:Object,links:Object,origin:null},isEqual:function(D){return !!(D&&D instanceof A&&this.id===D.id)}});B.Mixins.applyMixin(A,{namedAttributes:{origin:A}});return A});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-public-lozenge', location = '/static/feature/repository/public-lozenge/public-lozenge.soy' */
// This file was automatically generated from public-lozenge.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.feature.repository.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.feature == 'undefined') { stash.feature = {}; }
if (typeof stash.feature.repository == 'undefined') { stash.feature.repository = {}; }


stash.feature.repository.publicLozenge = function(opt_data, opt_ignored) {
  return '' + ((true && (opt_data.repository['public'] || opt_data.repository.project['public'])) ? '<div class="public-lozenge aui-lozenge aui-lozenge-subtle">' + soy.$$escapeHtml("Public") + '</div>' : '');
};
if (goog.DEBUG) {
  stash.feature.repository.publicLozenge.soyTemplateName = 'stash.feature.repository.publicLozenge';
}
;
;/* module-key = 'com.atlassian.plugins.atlassian-chaperone:internals', location = '/internals/syncing.js' */
var Chaperone={_internal:{}};Chaperone._internal.syncing=(function(){function a(c,d){return(d||AJS.$).ajax({url:AJS.contextPath()+"/rest/chaperone/1/chaperone/"+c})}function b(c,e,d){return(d||AJS.$).ajax({url:AJS.contextPath()+"/rest/chaperone/1/chaperone/"+c,type:"POST",data:{json:e}})}return{syncToServer:b,syncFromServer:a}})();;
;/* module-key = 'com.atlassian.plugins.atlassian-chaperone:feature-discovery', location = '/feature-discovery/feature-discovery.js' */
(function(i,g,k,e,f){var j=e.syncFromServer;var h=e.syncToServer;var c=g.Callbacks();g(document).on("ajaxStop",function(){c.fire()});var b=g.Callbacks();g(window).on("resize",function(){b.fire()});function a(l){var m=g.Deferred();function n(){var o=g(l);if(o.length){m.resolve(o);c.remove(n)}}c.add(n);n();return m}function d(p,r,m,o){var l=g.Callbacks();var n=g.Callbacks();var s=g.Callbacks();function q(u){var w;function t(y){return function(){g(document).off("hideLayer",v);u.off(".chaperone");w.remove();b.remove(w.refresh);c.remove(x);if(y){y.fire()}}}function x(){if(!u.is(":visible")){t()()}}var v=t(l);w=new i.InlineDialog(u,"feature-discovery-"+p,function(A,y,D){A.html(chaperone.featureDiscovery.content({step:r,paging:m}));var C=A.find(".feature-discovery-action");var z=A.find(".feature-discovery-next");var B=A.find(".feature-discovery-close");if(r.action&&r.action.click){C.click(r.action.click)}u.on("click.chaperone",t(s));z.click(t(n));B.click(v);C.click(t(s));D();if(!o.modal){k.delay(function(){g(document).on("showLayer",v)},100)}},{closeOthers:false,hideDelay:null,noBind:true,gravity:r.gravity||(r.dir||"s").replace(/[nswe]/g,function(y){return{n:"s",s:"n",e:"w",w:"e"}[y]}),offsetX:r.offsetX,offsetY:r.offsetY,persistent:true,width:r.width||300,addActiveClass:false});b.add(w.refresh);c.add(x);w.show()}return{showWhenTargetVisible:function(){return a(r.selector).then(q)},on:function(t,u){switch(t){case"close":l.add(u);break;case"next":n.add(u);break;case"action":s.add(u);break}}}}f.registerFeature=function(n,l,m){m=m||{};var p=j(n).pipe(function(q){q=q||{};if(q.isAllDismissed){return g.Deferred().reject()}return q});function o(t,r,q){var s=r.stepInfoById[t.id||t.selector];switch(m.dismissalMode){case"progressive":s.isDismissed=true;h(n,JSON.stringify(r));break;default:if(q&&!r.isAllDismissed){r.isAllDismissed=true;h(n,JSON.stringify(r))}break}}k.reduce(l,function(r,q){return r.then(function(x){var D=x.stepInfoById=x.stepInfoById||{};var w=q.id||q.selector;var s=D[w]=D[w]||{};if(s.isDismissed){return r}var B=l.length;var v=k.indexOf(l,q);var t=v<B-1;var y=new d(n,q,{numSteps:B,stepIndex:v,hasNext:t},m);var C=g.Deferred();y.on("close",C.reject);y.on("next",k.bind(C.resolve,C,x));y.on("action",k.bind(C.resolve,C,x));var z=y.showWhenTargetVisible();var A=k.bind(o,null,q,x,!t);var u=k.bind(o,null,q,x,"all");if(q.once){z.then(A)}else{y.on("close",u);y.on("next",A);y.on("action",A)}return C})},p)};f.checkFeatureVisibility=function(){c.fire()};f.checkFeatureAlignment=function(){b.fire()}})(AJS,AJS.$,_,Chaperone._internal.syncing,Chaperone);;
;/* module-key = 'com.atlassian.plugins.atlassian-chaperone:feature-discovery', location = '/feature-discovery/feature-discovery.soy' */
// This file was automatically generated from feature-discovery.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace chaperone.featureDiscovery.
 */

if (typeof chaperone == 'undefined') { var chaperone = {}; }
if (typeof chaperone.featureDiscovery == 'undefined') { chaperone.featureDiscovery = {}; }


chaperone.featureDiscovery.content = function(opt_data, opt_ignored) {
  return '' + ((opt_data.step.title) ? '<h2>' + soy.$$escapeHtml(opt_data.step.title) + '</h2>' : '') + ((opt_data.step.content) ? soy.$$filterNoAutoescape(opt_data.step.content) : '') + aui.form.form({action: '', content: '' + ((opt_data.step.action && opt_data.step.action.text) ? aui.buttons.button(soy.$$augmentMap(opt_data.step.action, {extraClasses: aui.renderExtraClasses(opt_data.step.action) + ' feature-discovery-action', extraAttributes: aui.renderExtraAttributes(opt_data.step.action) + ' type="button"'})) : '') + ((opt_data.paging && opt_data.paging.hasNext) ? aui.buttons.button({text: "Next", type: opt_data.step.action && opt_data.step.action.text ? 'link' : null, extraClasses: 'feature-discovery-next', extraAttributes: {type: 'button'}}) : '') + aui.buttons.button({text: "Close", type: opt_data.step.action && opt_data.step.action.text || opt_data.paging && opt_data.paging.hasNext ? 'link' : null, extraClasses: 'feature-discovery-close', extraAttributes: {type: 'button'}}) + ((opt_data.step.moreInfo) ? aui.buttons.button(soy.$$augmentMap(opt_data.step.moreInfo, {text: opt_data.step.moreInfo.text ? opt_data.step.moreInfo.text : "Learn more", type: 'link'})) : '') + ((opt_data.paging && opt_data.paging.numSteps > 1) ? '<span class="multi-step-trigger">' + soy.$$escapeHtml(AJS.format("{0}/{1}",opt_data.paging.stepIndex + 1,opt_data.paging.numSteps)) + '</span>' : '')});
};
if (goog.DEBUG) {
  chaperone.featureDiscovery.content.soyTemplateName = 'chaperone.featureDiscovery.content';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:chaperone-feature-discovery', location = '/static/lib/chaperone-AMD.js' */
define("chaperone",function(){return Chaperone});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:sidebar', location = '/static/widget/sidebar/sidebar.js' */
define("widget/sidebar",["aui","chaperone","jquery","util/client-storage","util/events","exports"],function(K,D,G,E,L,F){var J="sidebar_expanded";var C=".aui-sidebar";var A;function B(){A=K.sidebar(C);A.on("collapse-end",function(){E.setItem(J,false);L.trigger("stash.feature.sidebar.collapseEnd")});A.on("expand-end",function(){E.setItem(J,true);L.trigger("stash.feature.sidebar.expandEnd")});var M=null;A.$el.find(".aui-sidebar-body").on("mousemove mouseleave",function(O){if(typeof O.srcElement==="undefined"&&O.target!==M){var N=(O.type==="mousemove")&&!G(O.target).parentsUntil(A.$el).filter(".aui-page-header, .aui-navgroup").length;A.$el.toggleClass("aui-is-hover",N);M=O.target}});I()}function I(){var M=E.getItem(J);A.on("expand",function(){M=true});A.on("collapse",function(){M=false});D.registerFeature("sidebar",[{id:"sidebar-discovery",selector:".aui-sidebar[aria-expanded=false] .aui-page-header, .aui-sidebar[aria-expanded=true] .aui-sidebar-group:first-child",title:"Improvements to navigation in Stash",content:stash.widget.sidebar.discoveryContent(),moreInfo:{href:"http://go.atlassian.com/stashsidebar"},gravity:"w",width:350,offsetX:function(){return M?-10:10},once:true}]);A.on("expand",D.checkFeatureAlignment);A.on("collapse",D.checkFeatureAlignment);A.on("expand-end",D.checkFeatureAlignment);A.on("collapse-end",D.checkFeatureAlignment)}function H(){var M=E.getItem(J);G(document.body).toggleClass("aui-sidebar-collapsed",!M);G(C).attr("aria-expanded",M)}F.preload=H;F.onReady=B});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:sidebar', location = '/static/widget/sidebar/sidebar.soy' */
// This file was automatically generated from sidebar.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.widget.sidebar.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.widget == 'undefined') { stash.widget = {}; }
if (typeof stash.widget.sidebar == 'undefined') { stash.widget.sidebar = {}; }


stash.widget.sidebar.discoveryContent = function(opt_data, opt_ignored) {
  return '<ul><li>' + soy.$$escapeHtml("Actions and navigation in one place") + '</li><li>' + soy.$$escapeHtml("Always visible for faster access") + '</li><li>' + soy.$$filterNoAutoescape(AJS.format("Collapse the sidebar with {0}[{1} when you need more space",'<kbd>','</kbd>')) + '</li></ul>';
};
if (goog.DEBUG) {
  stash.widget.sidebar.discoveryContent.soyTemplateName = 'stash.widget.sidebar.discoveryContent';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:repository-layout', location = '/static/layout/repository/repository.js' */
define("layout/repository",["aui","jquery","lodash","stash/api/util/navbuilder","util/events","model/page-state","model/repository","widget/quick-copy-text","widget/sidebar","feature/repository/sticky-branches","exports"],function(J,H,S,I,C,L,G,F,M,R,T){function O(V){var U=new G(V);L.setRepository(U);L.setProject(U.getProject());H(".aui-page-header-image > a").on("click",function(){C.trigger("stash.sidebar.clickAvatar.expanded."+H(".aui-sidebar").attr("aria-expanded"),null)})}function B(){return H(".clone-url")}function E(){return H(".repository-protocol")}function D(){var b=B(),W=b.find("input"),Z=E(),V=H("#"+Z.attr("aria-owns")),Y=V.find("li"),a,U,X="";if(Z.is("button")){N(Z,Z.text());a=Z.attr("data-clone-url");U=Z.attr("data-module-key")}else{N(Z,Y.first().children("a").text());a=Y.first().attr("data-clone-url");U=Y.first().attr("data-module-key")}W.val(a);b.addClass(U);X=U;Y.on("click",function(c){var d=H(this);N(Z,d.text());W.val(d.attr("data-clone-url")).select();U=d.attr("data-module-key");b.removeClass(X).addClass(U);X=U;C.trigger("stash.feature.repository.clone.protocol.changed",null,U,d.attr("data-clone-url"));c.stopPropagation();if(V.is(":visible")){Z.trigger("aui-button-invoke")}c.preventDefault()});C.trigger("stash.feature.repository.clone.protocol.initial",null,U,a)}function N(V,W){var U=V.children("span").remove();V.text(W).append(U)}function K(V,Z){var U=H(Z);var Y=null;var X=null;var W=J.InlineDialog(null,"clone-repo-dialog",function(b,a,c){b.append(U);c();S.defer(function(){U.find(".clone-url input").select()})},{noBind:true,width:360,gravity:"w",hideCallback:function(){var b=E(),a=H("#"+b.attr("aria-owns"));if(a.is(":visible")){b.trigger("aui-button-invoke")}},calculatePositions:function(){if(Y===null&&X===null){return J.InlineDialog.opts.calculatePositions.apply(this,arguments)}else{return{gravity:"w",popupCss:Y,arrowCss:X}}}});H(document).on("click",V,function(c){c.preventDefault();if(H(c.target).closest(".aui-sidebar").length===0){var b=H("#inline-dialog-sidebar-submenu");var a=b.find("#arrow-sidebar-submenu");Y=b.offset();X=a.position()}else{Y=null;X=null}W.show(c,this)});H(document).keyup(function(a){if(a.keyCode===J.keyCode.ESCAPE){W.hide()}});U.find("a.sourcetree-clone-button").on("click",function(){W.hide()})}function Q(){var U=H(".aui-page-header-actions .create-pull-request");C.on("stash.layout.branch.revisionRefChanged",function(W){var V=I.currentRepo().createPullRequest();if(!W.isDefault()&&W.isBranch()){V=V.sourceBranch(W.getId())}U.attr("href",V.build())})}function A(){H(".repository-badge .badge").tooltip({gravity:"n"})}function P(){var U=H(".aui-sidebar[aria-expanded=false] .aui-page-header-image");U.tooltip({gravity:"w",delayIn:0,live:true,html:true,aria:true,className:"aui-sidebar-section-tooltip",title:function(){return H(this).find(".aui-avatar").attr("data-tooltip")}})}T.onReady=function(W,U,V){O(W);D();F.onReady();H(document).ready(M.onReady);R.onReady();K(U,V);Q();A();P();C.on("stash.widget.keyboard-shortcuts.register-contexts",function(X){X.enableContext("repository")})}});;
;/* module-key = 'com.atlassian.stash.plugin.stash-archive:archive-resources', location = '/static/archive.js' */
define("plugin/download-archive",["jquery","aui","model/page-state","util/navbuilder","exports"],function(d,b,c,e,a){a.onReady=function(g){var i=d(g);var h=function(j){i.attr("href",b.contextPath()+"/plugins/servlet/archive/projects/"+encodeURIComponent(c.getProject().getKey())+"/repos/"+encodeURIComponent(c.getRepository().getSlug())+(j?"?at="+encodeURIComponent(j):""))};var f=c.getRevisionRef()?c.getRevisionRef().id:null;h(f);eve.on("stash.feature.repository.revisionReferenceSelector.revisionRefChanged",function(j,k){h(j.id)})}});AJS.$(function(){require("plugin/download-archive").onReady("#download-archive-button")});;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:recent-repositories-menu-resources', location = '/static/layout/base/menu/repositories/recent.soy' */
// This file was automatically generated from recent.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.layout.menu.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.layout == 'undefined') { stash.layout = {}; }
if (typeof stash.layout.menu == 'undefined') { stash.layout.menu = {}; }


stash.layout.menu.loadingRecentReposMenuItem = function(opt_data, opt_ignored) {
  return '<li><span class="loading-recent-repos">' + soy.$$escapeHtml("Loading...") + '</span></li>';
};
if (goog.DEBUG) {
  stash.layout.menu.loadingRecentReposMenuItem.soyTemplateName = 'stash.layout.menu.loadingRecentReposMenuItem';
}


stash.layout.menu.noRecentReposMenuItem = function(opt_data, opt_ignored) {
  return '<li><span class="no-recent-repos">' + soy.$$escapeHtml("No recently viewed repositories") + '</span></li>';
};
if (goog.DEBUG) {
  stash.layout.menu.noRecentReposMenuItem.soyTemplateName = 'stash.layout.menu.noRecentReposMenuItem';
}


stash.layout.menu.errorLoadingRecentReposMenuItem = function(opt_data, opt_ignored) {
  return '<li><span>' + soy.$$escapeHtml("An error occurred") + '</span></li>';
};
if (goog.DEBUG) {
  stash.layout.menu.errorLoadingRecentReposMenuItem.soyTemplateName = 'stash.layout.menu.errorLoadingRecentReposMenuItem';
}
;
;/* module-key = 'com.atlassian.stash.stash-web-plugin:recent-repositories-menu-resources', location = '/static/layout/base/menu/repositories/recent.js' */
define("layout/base/menu/recent-repos",["jquery","stash/api/util/navbuilder","util/ajax","util/events","util/html","exports"],function(E,F,D,C,B,A){A.initMenu=function(I){var H=E("#"+B.sanitizeId(E("#"+I).attr("aria-owns"))).addClass("recent-repositories-menu"),K=H.find(".recent-repositories-section ul"),J=E(stash.layout.menu.loadingRecentReposMenuItem());H.on("aui-dropdown2-show",function(){C.trigger("internal.stash.ui.nav.repositories.opened")});H.on("click","a",function(){var L=E(this).closest(".aui-dropdown2-section");if(L.is(".recent-repositories-section")){C.trigger("internal.stash.ui.nav.repositories.item.clicked",null,{repositoryId:E(this).attr("data-repo-id")})}if(L.is(".public-repo-list-link-section")){C.trigger("internal.stash.ui.nav.repositories.public.clicked")}});K.append(J);var G=function(){D.rest({url:F.rest().profile().recent().repos().withParams({avatarSize:stash.widget.avatarSizeInPx({size:"xsmall"})}).build(),statusCode:{"*":function(){return false}}}).done(function(M){if(M&&M.size){var L=M.values;L.sort(function(O,N){return O.project.name.localeCompare(N.project.name)||O.name.localeCompare(N.name)});K.append(E(stash.feature.repository.menuItems({repos:L})))}else{K.append(E(stash.layout.menu.noRecentReposMenuItem()))}C.trigger("stash.feature.repositories.recent.loaded",this,M)}).fail(function(){K.append(E(stash.layout.menu.errorLoadingRecentReposMenuItem()))}).always(function(){J.remove()})};E(window).on("load",G)}});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:curl', location = 'js/wrm/curl-config.js' */
(function(){if(!window.WRM){window.WRM={}}window.curl={apiContext:WRM,defineContext:WRM}}());;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:curl', location = 'js/wrm/lib/curl-0.7.3.js' */
(function(a){var P="0.7.3",u="curl",p="define",G,v,g,d=a.document,l=d&&(d.head||d.getElementsByTagName("head")[0]),V=l&&l.getElementsByTagName("base")[0]||null,i={},N={},c={},A="addEventListener" in a?{}:{loaded:1,complete:1},m={},b=m.toString,y,k={},f={},h=false,O,t=/\?|\.js\b/,e=/^\/|^[^:]+:\/\//,L=/(\.)(\.?)(?:$|\/([^\.\/]+.*)?)/g,E=/\/\*[\s\S]*?\*\/|(?:[^\\])\/\/.*?[\n\r]/g,C=/require\s*\(\s*["']([^"']+)["']\s*\)|(?:[^\\]?)(["'])/g,M,x;function Q(){}function D(X,W){return b.call(X).indexOf("[object "+W)==0}function B(X){var W;X.path=J(X.path||X.location||"");W=X.main||"./main";if(!n(W)){W="./"+W}X.main=s(W,X.name+"/");X.config=X.config;return X}function n(W){return W.charAt(0)=="."}function j(W){return e.test(W)}function o(X,W){return J(X)+"/"+W}function J(W){return W&&W.charAt(W.length-1)=="/"?W.substr(0,W.length-1):W}function s(ab,X){var ac,W,Z,Y,aa;ac=1;W=ab;if(n(W)){Y=true;W=W.replace(L,function(ad,ae,af,ag){if(af){ac++}return ag||""})}if(Y){Z=X.split("/");aa=Z.length-ac;if(aa<0){return ab}Z.splice(aa,ac);return Z.concat(W||[]).join("/")}else{return W}}function S(X){var W=X.indexOf("!");return{resourceId:X.substr(W+1),pluginId:W>=0&&X.substr(0,W)}}function U(){}function z(X,W){U.prototype=X||m;var Z=new U();U.prototype=m;for(var Y in W){Z[Y]=W[Y]}return Z}function F(){var X,aa,W;X=this;aa=[];function ab(ac,ad,ae){aa.push([ac,ad,ae])}function Y(ag,ad){var af,ac,ae=0;while((af=aa[ae++])){ac=af[ag];if(ac){ac(ad)}}}W=function Z(ad,ac){ab=ad?function(ae,af){ae&&ae(ac)}:function(ae,af){af&&af(ac)};W=Q;Y(ad?0:1,ac);Y=Q;aa=y};this.then=function(ac,ad,ae){ab(ac,ad,ae);return X};this.resolve=function(ac){X.resolved=ac;W(true,ac)};this.reject=function(ac){X.rejected=ac;W(false,ac)};this.progress=function(ac){Y(2,ac)}}function r(W){return W instanceof F}function H(W,Z,X,Y){if(r(W)){return W.then(Z,X,Y)}else{return Z(W)}}function q(Y,X,Z){var W;return function(){if(--Y>=0&&X){W=X.apply(y,arguments)}if(Y==0&&Z){Z(W)}return W}}x={toAbsId:function(ab,aa,W){var Y,X,Z;Y=s(ab,aa);if(n(Y)){return Y}Z=S(Y);X=Z.pluginId;Y=X||Z.resourceId;if(Y in W.pathMap){Y=W.pathMap[Y].main||Y}if(X){if(X.indexOf("/")<0&&!(X in W.pathMap)){Y=o(W.pluginPath,X)}Y=Y+"!"+Z.resourceId}return Y},createContext:function(W,X,ab,aa){var Z;Z=new F();Z.id=X||"";Z.isPreload=aa;Z.depNames=ab;Z.config=W;function ad(ae){return x.toAbsId(ae,Z.id,W)}function ac(ae){return x.resolvePathInfo(ad(ae),W).url}function Y(ag,ak,af){var ae,aj,ai,ah;ae=ak&&function(){ak.apply(y,arguments[0])};if(D(ag,"String")){if(ae){throw new Error("require(id, callback) not allowed")}aj=ad(ag);ai=k[aj];if(!(aj in k)){throw new Error("Module not resolved: "+aj)}ah=r(ai)&&ai.exports;return ah||ai}else{H(x.getDeps(x.createContext(W,Z.id,ag,aa)),ae,af)}}Z.require=Y;Y.toUrl=ac;Z.toAbsId=ad;return Z},createResourceDef:function(W,ad,ab){var aa,X,Z;aa=x.createContext(W,ad,y,ab);X=aa.resolve;Z=q(1,function(af){aa.deps=af;try{return x.executeDefFunc(aa)}catch(ae){aa.reject(ae)}});aa.resolve=function Y(ae){H(ab||h,function(){X((k[aa.id]=f[aa.url]=Z(ae)))})};aa.exportsReady=function ac(ae){H(ab||h,function(){if(aa.exports){Z(ae);aa.progress(N)}})};return aa},createPluginDef:function(W,aa,Z,Y){var X;X=x.createContext(W,Z,y,Y);return X},getCjsRequire:function(W){return W.require},getCjsExports:function(W){return W.exports||(W.exports={})},getCjsModule:function(X){var W=X.module;if(!W){W=X.module={id:X.id,uri:x.getDefUrl(X),exports:x.getCjsExports(X),config:function(){return X.config}};W.exports=W.exports}return W},getDefUrl:function(W){return W.url||(W.url=x.checkToAddJsExt(W.require.toUrl(W.id),W.config))},setApi:function(W){var Y,Z,X,aa,ab,ac;Y=u;Z=p;X=aa=a;ab=" already exists";if(W){ac=W.overwriteApi||W.overwriteApi;Y=W.apiName||W.apiName||Y;X=W.apiContext||W.apiContext||X;Z=W.defineName||W.defineName||Z;aa=W.defineContext||W.defineContext||aa;if(v&&D(v,"Function")){a[u]=v}v=null;if(g&&D(g,"Function")){a[p]=g}g=null;if(!ac){if(X[Y]&&X[Y]!=K){throw new Error(Y+ab)}if(aa[Z]&&aa[Z]!=I){throw new Error(Z+ab)}}}X[Y]=K;aa[Z]=I},config:function(aa){var ab,Z,W,X;if("baseUrl" in aa){aa.baseUrl=aa.baseUrl}if("main" in aa){aa.main=aa.main}if("preloads" in aa){aa.preloads=aa.preloads}if("pluginPath" in aa){aa.pluginPath=aa.pluginPath}if("dontAddFileExt" in aa||aa.dontAddFileExt){aa.dontAddFileExt=new RegExp(aa.dontAddFileExt||aa.dontAddFileExt)}ab=G;Z=z(ab,aa);Z.pathMap=z(ab.pathMap);W=aa.plugins||{};Z.plugins=z(ab.plugins);Z.paths=z(ab.paths,aa.paths);Z.packages=z(ab.packages,aa.packages);Z.pathList=[];function ac(af,am){var ah,aj,al,ak,an,ai;for(var ag in af){al=af[ag];if(D(al,"String")){al={path:af[ag]}}al.name=al.name||ag;an=Z;ak=S(J(al.name));ah=ak.resourceId;aj=ak.pluginId;if(aj){an=W[aj];if(!an){an=W[aj]=z(Z);an.pathMap=z(Z.pathMap);an.pathList=[]}delete af[ag]}if(am){ai=B(al);if(ai.config){ai.config=z(Z,ai.config)}}else{ai={path:J(al.path)}}ai.specificity=ah.split("/").length;if(ah){an.pathMap[ah]=ai;an.pathList.push(ah)}else{an.baseUrl=x.resolveUrl(al.path,Z)}}}function ad(af){var ag=af.pathMap;af.pathRx=new RegExp("^("+af.pathList.sort(function(ai,ah){return ag[ah].specificity-ag[ai].specificity}).join("|").replace(/\/|\./g,"\\$&")+")(?=\\/|$)");delete af.pathList}ac(aa.packages,true);ac(aa.paths,false);for(X in W){var Y=x.toAbsId(X+"!","",Z);Z.plugins[Y.substr(0,Y.length-1)]=W[X]}W=Z.plugins;for(X in W){W[X]=z(Z,W[X]);var ae=W[X].pathList;if(ae){W[X].pathList=ae.concat(Z.pathList);ad(W[X])}}for(X in ab.pathMap){if(!Z.pathMap.hasOwnProperty(X)){Z.pathList.push(X)}}ad(Z);return Z},checkPreloads:function(W){var X;X=W&&W.preloads;if(X&&X.length>0){H(h,function(){h=x.getDeps(x.createContext(G,y,X,true))})}},resolvePathInfo:function(Z,X){var Y,ab,aa,W;Y=X.pathMap;if(!j(Z)){aa=Z.replace(X.pathRx,function(ac){ab=Y[ac]||{};W=ab.config;return ab.path||""})}else{aa=Z}return{config:W||G,url:x.resolveUrl(aa,X)}},resolveUrl:function(Y,W){var X=W.baseUrl;return X&&!j(Y)?o(X,Y):Y},checkToAddJsExt:function(X,W){return X+((W||G).dontAddFileExt.test(X)?"":".js")},loadScript:function(Z,ab,X){var Y=d.createElement("script");function aa(ac){ac=ac||a.event;if(ac.type=="load"||A[Y.readyState]){delete c[Z.id];Y.onload=Y.onreadystatechange=Y.onerror="";ab()}}function W(ac){X(new Error("Syntax or http error: "+Z.url))}Y.onload=Y.onreadystatechange=aa;Y.onerror=W;Y.type=Z.mimetype||"text/javascript";Y.charset="utf-8";Y.async=!Z.order;Y.src=Z.url;c[Z.id]=Y;l.insertBefore(Y,V);return Y},extractCjsDeps:function(X){var Y,W=[],Z;Y=typeof X=="string"?X:X.toSource?X.toSource():X.toString();Y.replace(E,"").replace(C,function(aa,ac,ab){if(ab){Z=Z==ab?y:Z}else{if(!Z){W.push(ac)}}return""});return W},fixArgs:function(X){var ac,aa,Y,ab,W,Z;W=X.length;Y=X[W-1];ab=D(Y,"Function")?Y.length:-1;if(W==2){if(D(X[0],"Array")){aa=X[0]}else{ac=X[0]}}else{if(W==3){ac=X[0];aa=X[1]}}if(!aa&&ab>0){Z=true;aa=["require","exports","module"].slice(0,ab).concat(x.extractCjsDeps(Y))}return{id:ac,deps:aa||[],res:ab>=0?Y:function(){return Y},cjs:Z}},executeDefFunc:function(Y){var X,W;W=Y.cjs?Y.exports:y;X=Y.res.apply(W,Y.deps);if(X===y&&Y.exports){X=Y.module?(Y.exports=Y.module.exports):Y.exports}return X},defineResource:function(X,W){X.res=W.res;X.cjs=W.cjs;X.depNames=W.deps;x.getDeps(X)},getDeps:function(X){var ab,af,ai,ad,ag,aa,W,aj,ah;ai=[];af=X.depNames;ad=af.length;if(af.length==0){Y()}function ae(am,ak,al){ai[ak]=am;if(al){aj(am,ak)}}aj=q(ad,ae,ac);ah=q(ad,ae,Y);for(ab=0;ab<ad;ab++){W=af[ab];if(W in M){ah(M[W](X),ab,true);if(X.exports){X.progress(i)}}else{if(!W){ah(y,ab,true)}else{Z(W,ab)}}}return X;function Z(am,al){var an,ak,ap,ao;an=q(1,function(aq){ak(aq);ah(aq,al)});ak=q(1,function(aq){aj(aq,al)});ap=x.fetchDep(am,X);ao=r(ap)&&ap.exports;if(ao){ak(ao)}H(ap,an,X.reject,X.exports&&function(aq){if(ap.exports){if(aq==i){ak(ap.exports)}else{if(aq==N){an(ap.exports)}}}})}function Y(){X.resolve(ai)}function ac(){X.exportsReady&&X.exportsReady(ai)}},fetchResDef:function(W){x.getDefUrl(W);x.loadScript(W,function(){var X=O;O=y;if(W.useNet!==false){if(!X||X.ex){W.reject(new Error(((X&&X.ex)||"define() missing or duplicated: "+W.url)))}else{x.defineResource(W,X)}}},W.reject);return W},fetchDep:function(ai,X){var W,Z,ae,ab,ah,ad,aa,aj,af,Y,ac,ag;W=X.toAbsId;Z=X.isPreload;ae=X.config||G;ab=S(W(ai));aj=ab.resourceId;ah=ab.pluginId||aj;af=x.resolvePathInfo(ah,ae);if(ab.pluginId){ad=ah}else{ad=af.config.moduleLoader||af.config.moduleLoader;if(ad){aj=ah;ah=ad;af=x.resolvePathInfo(ad,ae)}}if(ah in k){Y=k[ah]}else{if(af.url in f){Y=k[ah]=f[af.url]}else{Y=x.createResourceDef(af.config,ah,Z);Y.url=x.checkToAddJsExt(af.url,af.config);k[ah]=f[af.url]=Y;x.fetchResDef(Y)}}if(ah==ad){ac=new F();ag=ae.plugins[ad]||ae;H(Y,function(am){var ao,ak,an;an=am.dynamic;if("normalize" in am){aj=am.normalize(aj,W,Y.config)||""}else{aj=W(aj)}ak=ad+"!"+aj;ao=k[ak];if(!(ak in k)){ao=x.createPluginDef(ag,ak,aj,Z);if(!an){k[ak]=ao}var al=function(ap){ao.resolve(ap);if(!an){k[ak]=ap}};al.resolve=al;al.reject=al.error=ao.reject;am.load(aj,ao.require,al,ag)}if(ac!=ao){H(ao,ac.resolve,ac.reject,ac.progress)}},ac.reject)}return ac||Y},getCurrentDefName:function(){var W;if(!D(a.opera,"Opera")){for(var X in c){if(c[X].readyState=="interactive"){W=X;break}}}return W}};M={require:x.getCjsRequire,exports:x.getCjsExports,module:x.getCjsModule};function K(){var X=[].slice.call(arguments),W;if(D(X[0],"Object")){W=X.shift();R(W)}return new w(X[0],X[1],X[2])}function R(W){if(W){x.setApi(W);G=x.config(W);x.checkPreloads(W);if("main" in W){setTimeout(function(){var X;X=x.createContext(G,y,[].concat(W.main));x.getDeps(X)},0)}}}function w(Y,ab,X,aa){var Z,W;W=x.createContext(G,y,[].concat(Y));this["then"]=Z=function(ac,ad){H(W,function(ae){if(ac){ac.apply(y,ae)}},function(ae){if(ad){ad(ae)}else{throw ae}});return this};this["next"]=function(ae,ac,ad){return new w(ae,ac,ad,W)};this["config"]=R;if(ab||X){Z(ab,X)}H(aa,function(){x.getDeps(W)})}K.version=P;K.config=R;function T(W){var Z,X,Y;Z=W.id;if(Z==y){if(O!==y){O={ex:"Multiple anonymous defines in url"}}else{if(!(Z=x.getCurrentDefName())){O=W}}}if(Z!=y){X=k[Z];if(!(Z in k)){Y=x.resolvePathInfo(Z,G);X=x.createResourceDef(Y.config,Z);k[Z]=X}if(!r(X)){throw new Error("duplicate define: "+Z)}X.useNet=false;x.defineResource(X,W)}}function I(){var W=x.fixArgs(arguments);T(W)}I.amd={plugins:true,jQuery:true,curl:P};G={baseUrl:"",pluginPath:"curl/plugin",dontAddFileExt:t,paths:{},packages:{},plugins:{},pathMap:{},pathRx:/$^/};v=a[u];g=a[p];if(!v||D(v,"Function")){x.setApi()}else{a[u]=y;R(v)}k[u]=K;k["curl/_privileged"]={core:x,cache:k,config:function(){return G},_define:T,_curl:K,Promise:F}}(this.window||(typeof global!="undefined"&&global)||this));;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:curl', location = 'js/wrm/lib/curl-css-0.7.3.js' */
(function(B){var z="createElement",s="parentNode",f=B.setTimeout,H=B.document,k,x=H&&H.createStyleSheet&&!(H.documentMode>=10),v=[],u=[],C=[],i=12,F,g="HTTP or network error.",l={};if(H){k=H.head||H.getElementsByTagName("head")[0];if(x){F=c}else{F=t}}function q(J,I){l[J]=l[J]||I}function y(){var I;I=H[z]("link");I.rel="stylesheet";I.type="text/css";return I}function r(J,I){J.onload=function(){q("load",true);I()}}function n(J,I){J.onerror=function(){q("error",true);I()}}function c(K,I,M){var L;C.push({url:K,cb:I,eb:function J(){M(new Error(g))}});L=h();if(L){m(L)}}function m(K){var J,I;J=C.shift();I=K.styleSheet;if(J){K.onload=function(){J.cb(J.ss);m(K)};K.onerror=function(){J.eb();m(K)};J.ss=I.imports[I.addImport(J.url)]}else{e(K);G(K)}}function G(I){u.push(I)}function h(){var I;I=u.shift();if(!I&&v.length<i){I=H.createElement("style");v.push(I);k.appendChild(I)}return I}function b(L){var K,J,M;if(!L.href||!o()){return false}K=false;try{J=L.sheet;if(J){M=J.cssRules;K=M===null;if(!K&&M){J.insertRule("-curl-css-test {}",0);J.deleteRule(0);K=true}}}catch(I){K=Object.prototype.toString.call(window.opera)!="[object Opera]"&&/security|denied/i.test(I.message)}return K}function e(I){I.onload=I.onerror=j}function w(I){return I.onload==j||!I.onload}function E(J,K,I){if(l.load){return}if(b(J)){I(J.sheet)}else{if(!w(J)){f(function(){E(J,K,I)},K)}}}function A(J,K,I){if(l.error){return}}function p(J,L,I){function K(){if(w(J)){return}e(J);d(function(){I(J.sheet)})}r(J,K);E(J,L,K)}function D(K,L,I){function J(){if(w(K)){return}e(K);I(new Error(g))}n(K,J);A(K,L,J)}function t(J,I,K,M){var L;L=y();p(L,M,I);D(L,M,K);L.href=J;k.appendChild(L)}function d(I){function J(){if(o()){I()}else{f(J,10)}}J()}function o(){return !H.readyState||H.readyState=="complete"}function a(I,J){return I.lastIndexOf(".")<=I.lastIndexOf("/")?I+"."+J:I}function j(){}WRM.define("curl/plugin/css",{normalize:function(N,J){var L,M;if(!N){return N}L=[N];M=[];for(var K=0,I=L.length;K<I;K++){M.push(J(L[K]))}return M.join(",")},load:function(R,L,U,K){var Q,J,V,S,M,O;Q=[];J=[R||""];V=K.cssWatchPeriod||50;S=K.cssNoWait;M=J.length;function N(W){if(J.length>1){Q.push(W)}if(--M==0){U(J.length==1?W:Q)}}function P(X){var W;W=U.reject||function(Y){throw Y};W(X)}for(O=0;O<J.length;O++){R=J[O];var I,T;I=a(L.toUrl(R),"css");if(S){T=y();T.href=I;k.appendChild(T);N(T.sheet||T.styleSheet)}else{F(I,N,P,V)}}},"plugin-builder":"./builder/css",pluginBuilder:"./builder/css"})})(this);;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:curl', location = 'js/wrm/lib/curl-js-0.7.3.js' */
(function(b,c,a){WRM.define("curl/plugin/js",["curl/_privileged"],function(m){var f={},j=[],h=c&&c.createElement("script").async==true,l,k,g;l=m.Promise;function i(n,o){return n.lastIndexOf(".")<=n.lastIndexOf("/")?n+"."+o:n}function e(o,u,q){var v,s,p;v=new Date().valueOf()+(o.timeoutMsec||300000);function n(){s=true;if(o.exports){o.resolved=a(o.exports)}if(!o.exports||o.resolved){u(p)}else{q()}}function r(w){s=true;q(w)}function t(){if(!s){if(v<new Date()){q()}else{setTimeout(t,10)}}}if(q&&o.exports){setTimeout(t,10)}p=m.core.loadScript(o,n,r)}function d(n,o){e(n,function(){var p=j.shift();k=j.length>0;if(p){d.apply(null,p)}o.resolve(n.resolved||true)},function(p){o.reject(p)})}return{dynamic:true,normalize:function(q,p,o){var n=q.indexOf("!");return n>=0?p(q.substr(0,n))+q.substr(n):p(q)},load:function(o,r,w,q){var s,t,u,v,n,p,y;s=o.indexOf("!order")>0;t=o.indexOf("!exports=");u=t>0&&o.substr(t+9);v="prefetch" in q?q.prefetch:true;o=s||t>0?o.substr(0,o.indexOf("!")):o;n=i(r.toUrl(o),"js");function x(z){(w.error||function(A){throw A})(z)}if(n in f){if(f[n] instanceof l){f[n].then(w,x)}else{w(f[n])}}else{p={name:o,url:n,order:s,exports:u,timeoutMsec:q.timeout};f[n]=y=new l();y.then(function(z){f[n]=z;w(z)},x);if(s&&!h&&k){j.push([p,y]);if(v){p.mimetype="text/cache";e(p,function(z){z&&z.parentNode.removeChild(z)},function(){});p.mimetype=""}}else{k=k||s;d(p,y)}}}}})}(this,this.document,function(){try{return eval(arguments[0])}catch(ex){return}}));;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/jquery.js' */
WRM.define("wrm/jquery",function(){return AJS.$});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/underscore.js' */
WRM.define("wrm/_",function(){var a={filter:function(f,d){var b=[];for(var c=0;c<f.length;++c){var e=f[c];if(d(e)){b.push(e)}}return b},map:function(d,c){var e=[];for(var b=0;b<d.length;++b){e.push(c(d[b]))}return e},each:function(d,c){if(d.length===+d.length){for(var b=0;b<d.length;++b){c(d[b])}}else{for(var e in d){if(d.hasOwnProperty(e)){c(d[e],e)}}}},bind:function(c,b){return function(){c.apply(b,Array.prototype.slice.call(arguments))}},isArray:function(b){return Object.prototype.toString.call(b)=="[object Array]"},isUndefined:function(b){return b===void 0},isNull:function(b){return b===null}};return a});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/builder.js' */
WRM.define("wrm/builder",function(){var a=function(d){var b="(?:$|\\?.*)";var c="^"+d;this.patterns={js:{superBatch:new RegExp(c+"/superbatch/js/batch.js"+b),contextBatch:new RegExp(c+"/contextbatch/js/(.*?)/batch.js"+b),resourceBatch:new RegExp(c+"/batch/(.*?)/(.*).js"+b),noBatch:new RegExp(c+"/resources/(.*?)/(.*).js"+b)},css:{superBatch:new RegExp(c+"/superbatch/css/batch.css"+b),contextBatch:new RegExp(c+"/contextbatch/css/(.*?)/batch.css"+b),resourceBatch:new RegExp(c+"/batch/(.*?)/(.*).css"+b),noBatch:new RegExp(c+"/resources/(.*?)/(.*).css"+b)}}};a.prototype={initialize:function(c){var g,b=c.getElementsByTagName("script"),e=c.getElementsByTagName("link"),f={superBatch:false,modules:[],contexts:[]};for(g=0;g<b.length;++g){var d=b[g];if(d.getAttribute("src")){this._inspectMatches(d.getAttribute("src"),this.patterns.js,f)}}for(g=0;g<e.length;++g){var h=e[g];if(h.getAttribute("href")){this._inspectMatches(h.getAttribute("href"),this.patterns.css,f)}}return f},getModulesAndContextsFromScriptUrl:function(c){var b={superBatch:false,modules:[],contexts:[]};this._inspectMatches(c,this.patterns.js,b);return b},_inspectMatches:function(d,f,c){var b;b=d.match(f.superBatch);if(b){c.superBatch=true;return}b=d.match(f.contextBatch);if(b){var g=b[1].split(",");for(var e=0;e<g.length;++e){this._addToLoadedList(c.contexts,g[e])}return}b=d.match(f.resourceBatch);if(b){this._addToLoadedList(c.modules,b[1]);return}b=d.match(f.noBatch);if(b){this._addToLoadedList(c.modules,b[1]);return}},_addToLoadedList:function(d,c){for(var b=0;b<d.length;++b){if(d[b]===c){return}}d.push(c)}};return a});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/ie-only-filter.js' */
WRM.define("wrm/ie-only-filter",["wrm/jquery","wrm/_"],function(c,a){function b(d){var e=c.browser.msie;return a.filter(d,function(f){return f.ieOnly?e:true})}return b});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/conditional-comment-filter.js' */
WRM.define("wrm/conditional-comment-filter",["wrm/jquery","wrm/_"],function(c,a){function b(e){var f=c.browser.msie;var d=c.browser.version;return a.filter(e,function(h){var g=h.conditionalComment;if(!g){return true}if(!f||d>9){return false}g=g.toLowerCase();switch(g){case"ie":return true;case"lt ie 9":return d<9;case"lte ie 9":return d<=9;case"ie 9":return d==9;case"gt ie 9":return d>9;case"gte ie 9":return d>=9;case"lt ie 8":return d<8;case"lte ie 8":return d<=8;case"ie 8":return d==8;case"gt ie 8":return d>8;case"gte ie 8":return d>=8;default:AJS.log("Cannot parse conditional comment "+g);return false}})}return b});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/resource-base-url-pattern.js' */
WRM.define("wrm/resource-base-url-pattern",function(){return WRM.data.claim("com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager.resource-base-url-pattern")});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/require-handler.js' */
WRM.define("wrm/require-handler",["wrm/jquery","wrm/_","wrm/builder","wrm/conditional-comment-filter","wrm/ie-only-filter","wrm/resource-base-url-pattern"],function(e,h,i,g,a,c){var f=/^wr!(.*)$/,d=/^wrc!(.*)$/;var b=function(){this._requireCache={}};b.prototype={require:function(k,j){if(!h.isArray(k)){k=[k]}if(!this._requireCache.hasOwnProperty(k)){this._requireCache[k]=this._resolveAsync(k)}var l=this._requireCache[k];if(j){l.done(function(){j.apply(this,arguments)})}return l},_resolveAsync:function(l){var j=e.Deferred();var k=this;this._getScriptsForResources(l).done(function(p){if(p.unparsedData){window.WRM._unparsedData||(window.WRM._unparsedData={});h.each(p.unparsedData,function(u,t){window.WRM._unparsedData[t]=u})}var q=[];var s=[];var m=k._filter(p.resources);for(var o=0;o<m.length;++o){var r=m[o];var n=r.url;if(r.resourceType==="JAVASCRIPT"){if(!k._isJSInInitLoad(n)){q.push("js!"+n+"!order")}}else{if(r.resourceType==="CSS"){if(!k._isCSSInInitLoad(n)){if(r.media&&"all"!==r.media){s.push(r)}else{q.push("css!"+n)}}}else{AJS.log("Unknown resource type required: "+n)}}}AJS.log("Downloading resources:\n"+q.join("\n"));WRM.curl(q,function(){h.each(s,function(u){k._loadCssImmediate(u)});var t=h.map(l,function(){return window});j.resolveWith(k,t)},function(){j.rejectWith(k,arguments)})});return j.promise()},_loadCssImmediate:function(k){AJS.log("WARN: asynchronously loading a CSS resource containing a media query: "+k.url);var j='<link rel="stylesheet" type="text/css" href="'+k.url+'" media="'+k.media+'" />';e(j).appendTo("head")},_getScriptsForResources:function(k){if(!this._builder){this._builder=new i(c);this._initLoadResources=this._builder.initialize(document)}var j=[];var l=[];h.each(k,function(n){var m;if(m=n.match(f)){j.push(m[1])}else{if(m=n.match(d)){l.push(m[1])}}});return e.ajax({url:AJS.contextPath()+"/rest/webResources/1.0/resources",type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify({r:j,c:l,xc:this._initLoadResources.contexts,xr:this._initLoadResources.modules})})},_isJSInInitLoad:function(j){return e("script[src='"+j+"']").length>0},_isCSSInInitLoad:function(j){return e("link[href='"+j+"']").length>0},_filter:function(k){if(!this._filters){this._filters=[g,a]}var j=k;h.each(this._filters,function(l){j=l(j)});return j}};return b});;
;/* module-key = 'com.atlassian.plugins.atlassian-plugins-webresource-rest:web-resource-manager', location = 'js/wrm/index.js' */
WRM.curl(["wrm/require-handler"],function(b){var a;WRM.require=function(d,c){if(!a){a=new b()}return a.require(d,c)}});;
;/* module-key = 'com.atlassian.stash.plugin.stash-inbox-plugin:inbox-dialog', location = '/static/inbox/inbox.soy' */
// This file was automatically generated from inbox.soy.
// Please don't edit this file by hand.

/**
 * @fileoverview Templates in namespace stash.plugin.inbox.
 */

if (typeof stash == 'undefined') { var stash = {}; }
if (typeof stash.plugin == 'undefined') { stash.plugin = {}; }
if (typeof stash.plugin.inbox == 'undefined') { stash.plugin.inbox = {}; }


stash.plugin.inbox.dialogContents = function(opt_data, opt_ignored) {
  var output = '<h2>' + soy.$$escapeHtml("My pull requests") + '</h2><div class=\'inbox-table-wrapper aui-tabs horizontal-tabs\'><ul class="tabs-menu">';
  var roleList6 = opt_data.roles;
  var roleListLen6 = roleList6.length;
  for (var roleIndex6 = 0; roleIndex6 < roleListLen6; roleIndex6++) {
    var roleData6 = roleList6[roleIndex6];
    output += '<li class="menu-item"><a href="#inbox-pull-request-' + soy.$$escapeHtml(roleData6.id) + '">' + soy.$$escapeHtml(roleData6.title) + '</a></li>';
  }
  output += '</ul>';
  var roleList14 = opt_data.roles;
  var roleListLen14 = roleList14.length;
  for (var roleIndex14 = 0; roleIndex14 < roleListLen14; roleIndex14++) {
    var roleData14 = roleList14[roleIndex14];
    output += '<div id="inbox-pull-request-' + soy.$$escapeHtml(roleData14.id) + '" class="tabs-pane">' + stash.feature.pullRequest.pullRequestTable({pullRequestsPage: null, scope: 'global', id: 'inbox-pull-request-table-' + roleData14.id}) + '</div>';
  }
  output += '</div>';
  return output;
};
if (goog.DEBUG) {
  stash.plugin.inbox.dialogContents.soyTemplateName = 'stash.plugin.inbox.dialogContents';
}


stash.plugin.inbox.triggerIcon = function(opt_data, opt_ignored) {
  return '<span class=\'aui-icon aui-icon-small ' + ((opt_data.isEmpty) ? 'aui-iconfont-workbox-empty' : 'aui-iconfont-workbox') + '\'></span>';
};
if (goog.DEBUG) {
  stash.plugin.inbox.triggerIcon.soyTemplateName = 'stash.plugin.inbox.triggerIcon';
}


stash.plugin.inbox.emptyInboxMessage = function(opt_data, opt_ignored) {
  return '<span class="aui-icon aui-icon-large aui-iconfont-workbox-empty">' + soy.$$escapeHtml("No pull requests to approve") + '</span><h3>' + soy.$$escapeHtml("Inbox Zero") + '</h3>';
};
if (goog.DEBUG) {
  stash.plugin.inbox.emptyInboxMessage.soyTemplateName = 'stash.plugin.inbox.emptyInboxMessage';
}
;
;/* module-key = 'com.atlassian.stash.plugin.stash-inbox-plugin:inbox-dialog', location = '/static/inbox/inbox.js' */
define("plugin/inbox/inbox",["aui","jquery","underscore","stash/api/util/events","stash/api/util/navbuilder","stash/api/util/state","stash/api/util/server","exports"],function(h,f,s,a,q,i,m,t){var u,b;function k(v){return q.newBuilder().addPathComponents("rest","inbox","latest","pull-requests").withParams({role:v})}function c(){return q.newBuilder().addPathComponents("rest","inbox","latest","pull-requests","count").build()}var o=function(v){if(v.keyCode===f.ui.keyCode.ESCAPE){u.hide();v.preventDefault()}};var p=function(){u.hide()};var n=function(y,v){var z={title:"Could not retrieve inbox",message:"An unknown error occurred"};var x={};if(v){x=v.errors?v.errors[0]:v}var w=f.extend({},z,x);y.html(f(stash.widget.focusMessage.error({title:w.title,text:w.message,extraClasses:"communication-error"})));return false};function r(v){l(v,[{id:"reviewer",title:"Reviewing"},{id:"author",title:"Created"}])}function l(A,w){var z=require("widget/avatar-list");var v=require("feature/pull-request/pull-request-table");var x=f(stash.plugin.inbox.dialogContents({roles:w}));A.append(x);var B=function(E,F,C,D){return n.call(this,A,D)};function y(E,C){var D=new v("open",null,s.partial(k,E),{scope:"global",target:"#inbox-pull-request-table-"+E,scrollPaneSelector:".inbox-table-wrapper",bufferPixels:50,pageSize:10,spinnerSize:"medium",noneFoundMessageHtml:stash.plugin.inbox.emptyInboxMessage(),dataLoadedEvent:"stash.plugin.inbox.dataLoaded."+E,statusCode:{0:B,401:B,500:B,502:B}});D.handleErrors=f.noop;D.init();if(C){h.tabs.change(A.find("[href=#inbox-pull-request-"+E+"]"))}}s.each(w,function(D,C){y(D.id,C===0)});A.find(".tabs-menu").delegate("a","click",function(C){h.tabs.change(f(this),C);C&&C.preventDefault()});z.init()}var j=function(w,v,x){x();f(document).on("keyup",o);h.dialog2.on("show",p);e(w,s.partial(r,w))};var e=s.once(function(v,x){var w=f('<div class="loading-resource-spinner"></div>');v.empty().append(w);w.show().spin("medium");WRM.require("wrc!stash.pullRequest.inbox").always(function(){w.spinStop().remove()}).done(function(){x()})});var g=function(){f(document).off("keyup",o);h.dialog2.off("show",p);if(f(document.activeElement).closest("#inbox-pull-requests-content").length){document.activeElement.blur()}};var d=function(){m.rest({url:c(),type:"GET",statusCode:{"*":false}}).done(function(w){if(w.count>0){var x=f(aui.badges.badge({text:w.count}));b.html(stash.plugin.inbox.triggerIcon({isEmpty:false})).append(x);setTimeout(function(){x.addClass("visible")},0)}else{var v=500;b.find(".aui-badge").removeClass("visible");setTimeout(function(){b.html(stash.plugin.inbox.triggerIcon({isEmpty:true}))},v)}b.attr("data-countLoaded",true)})};t.onReady=function(){b=f("#inbox-pull-requests");if(b.length&&i.getCurrentUser()){b.html(stash.plugin.inbox.triggerIcon({isEmpty:true}));u=h.InlineDialog(b,"inbox-pull-requests-content",j,{width:870,hideCallback:g});d();var v=function(w){if(w.user.name===i.getCurrentUser().name){d()}};a.on("stash.widget.approve-button.added",v);a.on("stash.widget.approve-button.removed",v)}}});AJS.$(document).ready(function(){require("plugin/inbox/inbox").onReady()});;

Zerion Mini Shell 1.0